summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/binutils/ChangeLog6712
-rw-r--r--contrib/binutils/Makefile.in425
-rw-r--r--contrib/binutils/bfd/ChangeLog12862
-rw-r--r--contrib/binutils/bfd/ChangeLog-91937851
-rw-r--r--contrib/binutils/bfd/ChangeLog-949510043
-rw-r--r--contrib/binutils/bfd/ChangeLog-96976711
-rw-r--r--contrib/binutils/bfd/Makefile.am334
-rw-r--r--contrib/binutils/bfd/Makefile.in639
-rw-r--r--contrib/binutils/bfd/README3
-rw-r--r--contrib/binutils/bfd/acinclude.m466
-rw-r--r--contrib/binutils/bfd/aclocal.m4818
-rw-r--r--contrib/binutils/bfd/aout-arm.c552
-rw-r--r--contrib/binutils/bfd/aout-sparcle.c32
-rw-r--r--contrib/binutils/bfd/aout-target.h18
-rw-r--r--contrib/binutils/bfd/aout-tic30.c50
-rw-r--r--contrib/binutils/bfd/aoutf1.h8
-rw-r--r--contrib/binutils/bfd/aoutx.h153
-rw-r--r--contrib/binutils/bfd/archive.c79
-rw-r--r--contrib/binutils/bfd/archures.c134
-rw-r--r--contrib/binutils/bfd/armnetbsd.c49
-rw-r--r--contrib/binutils/bfd/bfd-in.h78
-rw-r--r--contrib/binutils/bfd/bfd-in2.h501
-rw-r--r--contrib/binutils/bfd/bfd.c74
-rw-r--r--contrib/binutils/bfd/binary.c59
-rw-r--r--contrib/binutils/bfd/cache.c23
-rw-r--r--contrib/binutils/bfd/coff-alpha.c24
-rw-r--r--contrib/binutils/bfd/coff-arm.c2552
-rw-r--r--contrib/binutils/bfd/coff-i386.c362
-rw-r--r--contrib/binutils/bfd/coff-mips.c101
-rw-r--r--contrib/binutils/bfd/coff-ppc.c2969
-rw-r--r--contrib/binutils/bfd/coff-sparc.c214
-rw-r--r--contrib/binutils/bfd/coff-tic30.c8
-rw-r--r--contrib/binutils/bfd/coff-z8k.c42
-rw-r--r--contrib/binutils/bfd/coffcode.h1506
-rw-r--r--contrib/binutils/bfd/coffgen.c197
-rw-r--r--contrib/binutils/bfd/cofflink.c539
-rw-r--r--contrib/binutils/bfd/coffswap.h44
-rwxr-xr-xcontrib/binutils/bfd/config.bfd253
-rw-r--r--contrib/binutils/bfd/config.in200
-rwxr-xr-xcontrib/binutils/bfd/configure3308
-rw-r--r--contrib/binutils/bfd/configure.host3
-rw-r--r--contrib/binutils/bfd/configure.in195
-rw-r--r--contrib/binutils/bfd/cpu-alpha.c41
-rw-r--r--contrib/binutils/bfd/cpu-arm.c143
-rw-r--r--contrib/binutils/bfd/cpu-i386.c18
-rw-r--r--contrib/binutils/bfd/cpu-mips.c2
-rw-r--r--contrib/binutils/bfd/cpu-powerpc.c124
-rw-r--r--contrib/binutils/bfd/cpu-sparc.c16
-rw-r--r--contrib/binutils/bfd/cpu-v850.c11
-rw-r--r--contrib/binutils/bfd/dep-in.sed2
-rw-r--r--contrib/binutils/bfd/doc/ChangeLog33
-rw-r--r--contrib/binutils/bfd/doc/Makefile.am4
-rw-r--r--contrib/binutils/bfd/doc/Makefile.in193
-rw-r--r--contrib/binutils/bfd/doc/bfd.texinfo4
-rw-r--r--contrib/binutils/bfd/doc/bfdint.texi1885
-rw-r--r--contrib/binutils/bfd/dwarf1.c578
-rw-r--r--contrib/binutils/bfd/dwarf2.c578
-rw-r--r--contrib/binutils/bfd/ecoff.c66
-rw-r--r--contrib/binutils/bfd/ecofflink.c14
-rw-r--r--contrib/binutils/bfd/elf-bfd.h393
-rw-r--r--contrib/binutils/bfd/elf.c1721
-rw-r--r--contrib/binutils/bfd/elf32-arc.c12
-rw-r--r--contrib/binutils/bfd/elf32-arm.h3239
-rw-r--r--contrib/binutils/bfd/elf32-gen.c43
-rw-r--r--contrib/binutils/bfd/elf32-i386.c334
-rw-r--r--contrib/binutils/bfd/elf32-mips.c5378
-rw-r--r--contrib/binutils/bfd/elf32-ppc.c3761
-rw-r--r--contrib/binutils/bfd/elf32-sparc.c450
-rw-r--r--contrib/binutils/bfd/elf32-v850.c861
-rw-r--r--contrib/binutils/bfd/elf64-alpha.c1477
-rw-r--r--contrib/binutils/bfd/elf64-gen.c43
-rw-r--r--contrib/binutils/bfd/elf64-mips.c380
-rw-r--r--contrib/binutils/bfd/elf64-sparc.c1064
-rw-r--r--contrib/binutils/bfd/elfarm-nabi.c672
-rw-r--r--contrib/binutils/bfd/elfarm-oabi.c420
-rw-r--r--contrib/binutils/bfd/elfcode.h212
-rw-r--r--contrib/binutils/bfd/elfcore.h437
-rw-r--r--contrib/binutils/bfd/elflink.c159
-rw-r--r--contrib/binutils/bfd/elflink.h2322
-rw-r--r--contrib/binutils/bfd/elfxx-target.h135
-rw-r--r--contrib/binutils/bfd/format.c27
-rw-r--r--contrib/binutils/bfd/freebsd.h6
-rw-r--r--contrib/binutils/bfd/gen-aout.c6
-rw-r--r--contrib/binutils/bfd/hash.c6
-rw-r--r--contrib/binutils/bfd/hosts/alphalinux.h4
-rw-r--r--contrib/binutils/bfd/i386linux.c15
-rw-r--r--contrib/binutils/bfd/ieee.c210
-rw-r--r--contrib/binutils/bfd/ihex.c31
-rw-r--r--contrib/binutils/bfd/libaout.h4
-rw-r--r--contrib/binutils/bfd/libbfd-in.h28
-rw-r--r--contrib/binutils/bfd/libbfd.c230
-rw-r--r--contrib/binutils/bfd/libbfd.h112
-rw-r--r--contrib/binutils/bfd/libcoff-in.h51
-rw-r--r--contrib/binutils/bfd/libcoff.h90
-rw-r--r--contrib/binutils/bfd/libecoff.h4
-rw-r--r--contrib/binutils/bfd/linker.c67
-rw-r--r--contrib/binutils/bfd/mipsbsd.c28
-rw-r--r--contrib/binutils/bfd/netbsd-core.c5
-rw-r--r--contrib/binutils/bfd/netbsd.h6
-rw-r--r--contrib/binutils/bfd/opncls.c103
-rw-r--r--contrib/binutils/bfd/osf-core.c8
-rw-r--r--contrib/binutils/bfd/pe-arm.c47
-rw-r--r--contrib/binutils/bfd/pe-i386.c9
-rw-r--r--contrib/binutils/bfd/pe-mips.c998
-rw-r--r--contrib/binutils/bfd/pe-ppc.c44
-rw-r--r--contrib/binutils/bfd/po/Make-in251
-rw-r--r--contrib/binutils/bfd/po/POTFILES.in234
-rw-r--r--contrib/binutils/bfd/po/bfd.pot2051
-rw-r--r--contrib/binutils/bfd/ppcboot.c537
-rw-r--r--contrib/binutils/bfd/ptrace-core.c8
-rw-r--r--contrib/binutils/bfd/reloc.c781
-rw-r--r--contrib/binutils/bfd/reloc16.c13
-rw-r--r--contrib/binutils/bfd/sco5-core.c431
-rw-r--r--contrib/binutils/bfd/section.c196
-rw-r--r--contrib/binutils/bfd/sparclinux.c771
-rw-r--r--contrib/binutils/bfd/sparcnetbsd.c34
-rw-r--r--contrib/binutils/bfd/srec.c78
-rw-r--r--contrib/binutils/bfd/stabs.c14
-rw-r--r--contrib/binutils/bfd/syms.c171
-rw-r--r--contrib/binutils/bfd/sysdep.h21
-rw-r--r--contrib/binutils/bfd/targets.c125
-rw-r--r--contrib/binutils/bfd/tekhex.c16
-rw-r--r--contrib/binutils/bfd/trad-core.c30
-rw-r--r--contrib/binutils/binutils/ChangeLog2123
-rw-r--r--contrib/binutils/binutils/Makefile.am309
-rw-r--r--contrib/binutils/binutils/Makefile.in925
-rw-r--r--contrib/binutils/binutils/NEWS32
-rw-r--r--contrib/binutils/binutils/README103
-rw-r--r--contrib/binutils/binutils/aclocal.m4763
-rw-r--r--contrib/binutils/binutils/addr2line.c29
-rw-r--r--contrib/binutils/binutils/ar.132
-rw-r--r--contrib/binutils/binutils/ar.c272
-rw-r--r--contrib/binutils/binutils/arparse.y7
-rw-r--r--contrib/binutils/binutils/arsup.c43
-rw-r--r--contrib/binutils/binutils/binutils.texi739
-rw-r--r--contrib/binutils/binutils/bucomm.c76
-rw-r--r--contrib/binutils/binutils/bucomm.h56
-rw-r--r--contrib/binutils/binutils/coffdump.c27
-rw-r--r--contrib/binutils/binutils/config.in161
-rwxr-xr-xcontrib/binutils/binutils/configure2884
-rw-r--r--contrib/binutils/binutils/configure.in100
-rw-r--r--contrib/binutils/binutils/debug.c197
-rw-r--r--contrib/binutils/binutils/deflex.l11
-rw-r--r--contrib/binutils/binutils/defparse.y49
-rw-r--r--contrib/binutils/binutils/dlltool.c1981
-rw-r--r--contrib/binutils/binutils/dlltool.h5
-rw-r--r--contrib/binutils/binutils/dllwrap.c1249
-rw-r--r--contrib/binutils/binutils/dyn-string.c107
-rw-r--r--contrib/binutils/binutils/dyn-string.h34
-rw-r--r--contrib/binutils/binutils/filemode.c6
-rw-r--r--contrib/binutils/binutils/ieee.c173
-rw-r--r--contrib/binutils/binutils/nm.c68
-rw-r--r--contrib/binutils/binutils/objcopy.189
-rw-r--r--contrib/binutils/binutils/objcopy.c1286
-rw-r--r--contrib/binutils/binutils/objdump.116
-rw-r--r--contrib/binutils/binutils/objdump.c768
-rw-r--r--contrib/binutils/binutils/po/Make-in251
-rw-r--r--contrib/binutils/binutils/po/POTFILES.in55
-rw-r--r--contrib/binutils/binutils/po/binutils.pot3756
-rw-r--r--contrib/binutils/binutils/prdbg.c8
-rw-r--r--contrib/binutils/binutils/rclex.l211
-rw-r--r--contrib/binutils/binutils/rcparse.y66
-rw-r--r--contrib/binutils/binutils/rdcoff.c36
-rw-r--r--contrib/binutils/binutils/rddbg.c20
-rw-r--r--contrib/binutils/binutils/readelf.c7362
-rw-r--r--contrib/binutils/binutils/rename.c220
-rw-r--r--contrib/binutils/binutils/resbin.c163
-rw-r--r--contrib/binutils/binutils/rescoff.c71
-rw-r--r--contrib/binutils/binutils/resrc.c530
-rw-r--r--contrib/binutils/binutils/resres.c659
-rw-r--r--contrib/binutils/binutils/size.c35
-rw-r--r--contrib/binutils/binutils/srconv.c39
-rw-r--r--contrib/binutils/binutils/stabs.c327
-rw-r--r--contrib/binutils/binutils/strings.16
-rw-r--r--contrib/binutils/binutils/strings.c24
-rw-r--r--contrib/binutils/binutils/strip.14
-rw-r--r--contrib/binutils/binutils/sysdump.c32
-rw-r--r--contrib/binutils/binutils/version.c9
-rw-r--r--contrib/binutils/binutils/wrstabs.c25
-rw-r--r--contrib/binutils/config-ml.in82
-rwxr-xr-xcontrib/binutils/config.guess546
-rwxr-xr-xcontrib/binutils/config.sub392
-rw-r--r--contrib/binutils/config/ChangeLog86
-rwxr-xr-xcontrib/binutils/config/acinclude.m41994
-rw-r--r--contrib/binutils/config/mh-armpic1
-rw-r--r--contrib/binutils/config/mh-ppcpic1
-rw-r--r--contrib/binutils/config/mh-sparcpic1
-rw-r--r--contrib/binutils/config/mh-sysv58
-rw-r--r--contrib/binutils/config/mt-armpic1
-rw-r--r--contrib/binutils/config/mt-linux2
-rw-r--r--contrib/binutils/config/mt-ospace3
-rw-r--r--contrib/binutils/config/mt-ppcpic1
-rw-r--r--contrib/binutils/config/mt-sparcpic1
-rwxr-xr-xcontrib/binutils/configure188
-rw-r--r--contrib/binutils/configure.in337
-rw-r--r--contrib/binutils/etc/ChangeLog507
-rw-r--r--contrib/binutils/etc/Makefile.in88
-rw-r--r--contrib/binutils/etc/add-log.el573
-rw-r--r--contrib/binutils/etc/add-log.vi11
-rw-r--r--contrib/binutils/etc/configbuild.ein149
-rw-r--r--contrib/binutils/etc/configbuild.fig50
-rw-r--r--contrib/binutils/etc/configbuild.jinbin0 -> 11123 bytes
-rw-r--r--contrib/binutils/etc/configbuild.tin9
-rw-r--r--contrib/binutils/etc/configdev.ein185
-rw-r--r--contrib/binutils/etc/configdev.fig80
-rw-r--r--contrib/binutils/etc/configdev.jinbin0 -> 17967 bytes
-rw-r--r--contrib/binutils/etc/configdev.tin17
-rw-r--r--contrib/binutils/etc/configure.texi4066
-rw-r--r--contrib/binutils/gas/CONTRIBUTORS9
-rw-r--r--contrib/binutils/gas/ChangeLog10147
-rw-r--r--contrib/binutils/gas/ChangeLog-929513110
-rw-r--r--contrib/binutils/gas/ChangeLog-96975960
-rw-r--r--contrib/binutils/gas/Makefile.am1623
-rw-r--r--contrib/binutils/gas/Makefile.in2194
-rw-r--r--contrib/binutils/gas/NEWS46
-rw-r--r--contrib/binutils/gas/README2
-rw-r--r--contrib/binutils/gas/acinclude.m412
-rw-r--r--contrib/binutils/gas/aclocal.m4775
-rw-r--r--contrib/binutils/gas/app.c273
-rw-r--r--contrib/binutils/gas/as.c288
-rw-r--r--contrib/binutils/gas/as.h87
-rw-r--r--contrib/binutils/gas/asintl.h44
-rw-r--r--contrib/binutils/gas/atof-generic.c4
-rw-r--r--contrib/binutils/gas/cgen.c280
-rw-r--r--contrib/binutils/gas/cgen.h94
-rw-r--r--contrib/binutils/gas/cond.c122
-rw-r--r--contrib/binutils/gas/config.in270
-rw-r--r--contrib/binutils/gas/config/atof-ieee.c39
-rw-r--r--contrib/binutils/gas/config/e-i386aout.c17
-rw-r--r--contrib/binutils/gas/config/obj-aout.c141
-rw-r--r--contrib/binutils/gas/config/obj-aout.h29
-rw-r--r--contrib/binutils/gas/config/obj-coff.c750
-rw-r--r--contrib/binutils/gas/config/obj-coff.h91
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.c32
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.h17
-rw-r--r--contrib/binutils/gas/config/obj-elf.c910
-rw-r--r--contrib/binutils/gas/config/obj-elf.h161
-rw-r--r--contrib/binutils/gas/config/obj-ieee.c8
-rw-r--r--contrib/binutils/gas/config/obj-multi.h138
-rw-r--r--contrib/binutils/gas/config/tc-alpha.c1671
-rw-r--r--contrib/binutils/gas/config/tc-alpha.h66
-rw-r--r--contrib/binutils/gas/config/tc-arc.c105
-rw-r--r--contrib/binutils/gas/config/tc-arc.h4
-rw-r--r--contrib/binutils/gas/config/tc-arm.c7204
-rw-r--r--contrib/binutils/gas/config/tc-arm.h211
-rw-r--r--contrib/binutils/gas/config/tc-i386.c4143
-rw-r--r--contrib/binutils/gas/config/tc-i386.h338
-rw-r--r--contrib/binutils/gas/config/tc-ppc.c5026
-rw-r--r--contrib/binutils/gas/config/tc-ppc.h289
-rw-r--r--contrib/binutils/gas/config/tc-sparc.c1565
-rw-r--r--contrib/binutils/gas/config/tc-sparc.h88
-rw-r--r--contrib/binutils/gas/config/tc-tic30.c27
-rw-r--r--contrib/binutils/gas/config/tc-tic30.h2
-rw-r--r--contrib/binutils/gas/config/tc-v850.c836
-rw-r--r--contrib/binutils/gas/config/tc-v850.h7
-rw-r--r--contrib/binutils/gas/config/tc-z8k.c82
-rw-r--r--contrib/binutils/gas/config/tc-z8k.h10
-rw-r--r--contrib/binutils/gas/config/te-ppcnw.h31
-rw-r--r--contrib/binutils/gas/config/te-sparcaout.h21
-rwxr-xr-xcontrib/binutils/gas/configure2878
-rw-r--r--contrib/binutils/gas/configure.in282
-rw-r--r--contrib/binutils/gas/dep-in.sed2
-rw-r--r--contrib/binutils/gas/depend.c4
-rw-r--r--contrib/binutils/gas/doc/Makefile.am13
-rw-r--r--contrib/binutils/gas/doc/Makefile.in256
-rw-r--r--contrib/binutils/gas/doc/all.texi16
-rw-r--r--contrib/binutils/gas/doc/as.110
-rw-r--r--contrib/binutils/gas/doc/as.texinfo435
-rw-r--r--contrib/binutils/gas/doc/c-arm.texi267
-rw-r--r--contrib/binutils/gas/doc/c-i386.texi315
-rw-r--r--contrib/binutils/gas/doc/c-sparc.texi194
-rw-r--r--contrib/binutils/gas/doc/c-v850.texi61
-rw-r--r--contrib/binutils/gas/doc/internals.texi265
-rw-r--r--contrib/binutils/gas/dwarf2dbg.c770
-rw-r--r--contrib/binutils/gas/dwarf2dbg.h69
-rw-r--r--contrib/binutils/gas/ecoff.c246
-rw-r--r--contrib/binutils/gas/ecoff.h23
-rw-r--r--contrib/binutils/gas/expr.c273
-rw-r--r--contrib/binutils/gas/expr.h35
-rw-r--r--contrib/binutils/gas/frags.c40
-rw-r--r--contrib/binutils/gas/frags.h17
-rw-r--r--contrib/binutils/gas/gasp.c224
-rw-r--r--contrib/binutils/gas/hash.c1103
-rw-r--r--contrib/binutils/gas/hash.h87
-rw-r--r--contrib/binutils/gas/input-file.c29
-rw-r--r--contrib/binutils/gas/input-scrub.c41
-rw-r--r--contrib/binutils/gas/itbl-ops.c59
-rw-r--r--contrib/binutils/gas/itbl-ops.h8
-rw-r--r--contrib/binutils/gas/listing.c360
-rw-r--r--contrib/binutils/gas/listing.h1
-rw-r--r--contrib/binutils/gas/macro.c86
-rw-r--r--contrib/binutils/gas/macro.h42
-rw-r--r--contrib/binutils/gas/messages.c30
-rw-r--r--contrib/binutils/gas/obj.h13
-rw-r--r--contrib/binutils/gas/output-file.c22
-rw-r--r--contrib/binutils/gas/po/Make-in251
-rw-r--r--contrib/binutils/gas/po/POTFILES.in175
-rw-r--r--contrib/binutils/gas/po/gas.pot7722
-rw-r--r--contrib/binutils/gas/read.c860
-rw-r--r--contrib/binutils/gas/read.h14
-rw-r--r--contrib/binutils/gas/sb.h2
-rw-r--r--contrib/binutils/gas/stabs.c191
-rw-r--r--contrib/binutils/gas/struc-symbol.h126
-rw-r--r--contrib/binutils/gas/subsegs.c82
-rw-r--r--contrib/binutils/gas/subsegs.h9
-rw-r--r--contrib/binutils/gas/symbols.c954
-rw-r--r--contrib/binutils/gas/symbols.h117
-rw-r--r--contrib/binutils/gas/write.c367
-rw-r--r--contrib/binutils/gas/write.h13
-rw-r--r--contrib/binutils/include/ChangeLog391
-rw-r--r--contrib/binutils/include/ansidecl.h76
-rw-r--r--contrib/binutils/include/aout/ChangeLog9
-rw-r--r--contrib/binutils/include/aout/aout64.h4
-rw-r--r--contrib/binutils/include/aout/stab.def8
-rw-r--r--contrib/binutils/include/bfdlink.h31
-rw-r--r--contrib/binutils/include/bin-bugs.h3
-rw-r--r--contrib/binutils/include/coff/ChangeLog135
-rw-r--r--contrib/binutils/include/coff/arm.h303
-rw-r--r--contrib/binutils/include/coff/internal.h76
-rw-r--r--contrib/binutils/include/coff/pe.h65
-rw-r--r--contrib/binutils/include/coff/powerpc.h199
-rw-r--r--contrib/binutils/include/coff/sh.h38
-rw-r--r--contrib/binutils/include/coff/sparc.h210
-rw-r--r--contrib/binutils/include/demangle.h21
-rw-r--r--contrib/binutils/include/dis-asm.h51
-rw-r--r--contrib/binutils/include/elf/ChangeLog578
-rw-r--r--contrib/binutils/include/elf/alpha.h72
-rw-r--r--contrib/binutils/include/elf/arc.h18
-rw-r--r--contrib/binutils/include/elf/arm-oabi.h88
-rw-r--r--contrib/binutils/include/elf/arm.h99
-rw-r--r--contrib/binutils/include/elf/common.h7
-rw-r--r--contrib/binutils/include/elf/dwarf.h5
-rw-r--r--contrib/binutils/include/elf/dwarf2.h89
-rw-r--r--contrib/binutils/include/elf/external.h17
-rw-r--r--contrib/binutils/include/elf/i386.h49
-rw-r--r--contrib/binutils/include/elf/internal.h20
-rw-r--r--contrib/binutils/include/elf/mips.h405
-rw-r--r--contrib/binutils/include/elf/ppc.h127
-rw-r--r--contrib/binutils/include/elf/reloc-macros.h116
-rw-r--r--contrib/binutils/include/elf/sh.h82
-rw-r--r--contrib/binutils/include/elf/sparc.h140
-rw-r--r--contrib/binutils/include/elf/v850.h59
-rw-r--r--contrib/binutils/include/fnmatch.h3
-rw-r--r--contrib/binutils/include/getopt.h2
-rw-r--r--contrib/binutils/include/hashtab.h128
-rw-r--r--contrib/binutils/include/libiberty.h57
-rw-r--r--contrib/binutils/include/objalloc.h3
-rw-r--r--contrib/binutils/include/obstack.h333
-rw-r--r--contrib/binutils/include/opcode/ChangeLog857
-rw-r--r--contrib/binutils/include/opcode/alpha.h9
-rw-r--r--contrib/binutils/include/opcode/arm.h294
-rw-r--r--contrib/binutils/include/opcode/cgen.h1338
-rw-r--r--contrib/binutils/include/opcode/i386.h1971
-rw-r--r--contrib/binutils/include/opcode/mips.h42
-rw-r--r--contrib/binutils/include/opcode/ppc.h251
-rw-r--r--contrib/binutils/include/opcode/v850.h12
-rw-r--r--contrib/binutils/include/partition.h81
-rw-r--r--contrib/binutils/include/remote-sim.h52
-rw-r--r--contrib/binutils/include/splay-tree.h117
-rw-r--r--contrib/binutils/include/symcat.h4
-rwxr-xr-xcontrib/binutils/install-sh36
-rw-r--r--contrib/binutils/ld/ChangeLog2311
-rw-r--r--contrib/binutils/ld/Makefile.am348
-rw-r--r--contrib/binutils/ld/Makefile.in793
-rw-r--r--contrib/binutils/ld/NEWS33
-rw-r--r--contrib/binutils/ld/aclocal.m4761
-rw-r--r--contrib/binutils/ld/config.in150
-rwxr-xr-xcontrib/binutils/ld/configure3061
-rw-r--r--contrib/binutils/ld/configure.host112
-rw-r--r--contrib/binutils/ld/configure.in97
-rw-r--r--contrib/binutils/ld/configure.tgt124
-rw-r--r--contrib/binutils/ld/deffile.h128
-rw-r--r--contrib/binutils/ld/deffilep.y1024
-rw-r--r--contrib/binutils/ld/emulparams/armaoutb.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armaoutl.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armcoff.sh6
-rw-r--r--contrib/binutils/ld/emulparams/armelf.sh22
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux.sh19
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux26.sh20
-rw-r--r--contrib/binutils/ld/emulparams/armelf_oabi.sh21
-rw-r--r--contrib/binutils/ld/emulparams/armnbsd.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armpe.sh9
-rw-r--r--contrib/binutils/ld/emulparams/coff_sparc.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh1
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bmipn32.sh75
-rw-r--r--contrib/binutils/ld/emulparams/elf32ebmip.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf32elmip.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf32lppc.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppclinux.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh34
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf64bmip.sh79
-rw-r--r--contrib/binutils/ld/emulparams/i386pe.sh3
-rw-r--r--contrib/binutils/ld/emulparams/i386pe_posix.sh9
-rw-r--r--contrib/binutils/ld/emulparams/ppcmacos.sh4
-rw-r--r--contrib/binutils/ld/emulparams/ppcnw.sh7
-rw-r--r--contrib/binutils/ld/emulparams/ppcpe.sh7
-rw-r--r--contrib/binutils/ld/emulparams/sparcaout.sh8
-rw-r--r--contrib/binutils/ld/emulparams/sparclinux.sh7
-rw-r--r--contrib/binutils/ld/emulparams/sparcnbsd.sh5
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em292
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em1293
-rw-r--r--contrib/binutils/ld/emultempl/armelf_oabi.em177
-rw-r--r--contrib/binutils/ld/emultempl/astring.sed13
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em154
-rw-r--r--contrib/binutils/ld/emultempl/generic.em16
-rw-r--r--contrib/binutils/ld/emultempl/linux.em41
-rw-r--r--contrib/binutils/ld/emultempl/ostring.sed4
-rw-r--r--contrib/binutils/ld/emultempl/pe.em1189
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em12
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh42
-rw-r--r--contrib/binutils/ld/ld.142
-rw-r--r--contrib/binutils/ld/ld.h74
-rw-r--r--contrib/binutils/ld/ld.texinfo3680
-rw-r--r--contrib/binutils/ld/ldcref.c34
-rw-r--r--contrib/binutils/ld/ldctor.c149
-rw-r--r--contrib/binutils/ld/ldctor.h12
-rw-r--r--contrib/binutils/ld/ldemul.c62
-rw-r--r--contrib/binutils/ld/ldemul.h22
-rw-r--r--contrib/binutils/ld/ldexp.c131
-rw-r--r--contrib/binutils/ld/ldexp.h17
-rw-r--r--contrib/binutils/ld/ldfile.c84
-rw-r--r--contrib/binutils/ld/ldfile.h3
-rw-r--r--contrib/binutils/ld/ldgram.y228
-rw-r--r--contrib/binutils/ld/ldint.texinfo160
-rw-r--r--contrib/binutils/ld/ldlang.c2165
-rw-r--r--contrib/binutils/ld/ldlang.h24
-rw-r--r--contrib/binutils/ld/ldlex.l31
-rw-r--r--contrib/binutils/ld/ldmain.c197
-rw-r--r--contrib/binutils/ld/ldmain.h8
-rw-r--r--contrib/binutils/ld/ldmisc.c40
-rw-r--r--contrib/binutils/ld/ldver.c6
-rw-r--r--contrib/binutils/ld/ldwrite.c8
-rw-r--r--contrib/binutils/ld/lexsup.c425
-rw-r--r--contrib/binutils/ld/mri.c13
-rw-r--r--contrib/binutils/ld/pe-dll.c1924
-rw-r--r--contrib/binutils/ld/pe-dll.h48
-rw-r--r--contrib/binutils/ld/po/Make-in251
-rw-r--r--contrib/binutils/ld/po/POTFILES.in29
-rw-r--r--contrib/binutils/ld/po/ld.pot1502
-rw-r--r--contrib/binutils/ld/scripttempl/aout.sc6
-rw-r--r--contrib/binutils/ld/scripttempl/armaout.sc35
-rw-r--r--contrib/binutils/ld/scripttempl/armcoff.sc62
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc184
-rw-r--r--contrib/binutils/ld/scripttempl/elfppc.sc288
-rw-r--r--contrib/binutils/ld/scripttempl/pe.sc60
-rw-r--r--contrib/binutils/ld/scripttempl/ppcpe.sc198
-rw-r--r--contrib/binutils/ld/scripttempl/sparccoff.sc48
-rw-r--r--contrib/binutils/ld/scripttempl/v850.sc45
-rw-r--r--contrib/binutils/ld/sysdep.h4
-rw-r--r--contrib/binutils/libiberty/ChangeLog1343
-rw-r--r--contrib/binutils/libiberty/Makefile.in350
-rw-r--r--contrib/binutils/libiberty/README109
-rw-r--r--contrib/binutils/libiberty/acconfig.h11
-rw-r--r--contrib/binutils/libiberty/alloca-conf.h24
-rw-r--r--contrib/binutils/libiberty/alloca.c42
-rw-r--r--contrib/binutils/libiberty/argv.c12
-rw-r--r--contrib/binutils/libiberty/atexit.c6
-rw-r--r--contrib/binutils/libiberty/basename.c39
-rw-r--r--contrib/binutils/libiberty/calloc.c29
-rw-r--r--contrib/binutils/libiberty/choose-temp.c112
-rw-r--r--contrib/binutils/libiberty/clock.c24
-rw-r--r--contrib/binutils/libiberty/config.in224
-rw-r--r--contrib/binutils/libiberty/config.table75
-rw-r--r--contrib/binutils/libiberty/config/mh-cxux74
-rw-r--r--contrib/binutils/libiberty/config/mh-openedition3
-rwxr-xr-xcontrib/binutils/libiberty/configure2953
-rw-r--r--contrib/binutils/libiberty/configure.in424
-rw-r--r--contrib/binutils/libiberty/cplus-dem.c2547
-rw-r--r--contrib/binutils/libiberty/floatformat.c22
-rw-r--r--contrib/binutils/libiberty/fnmatch.c18
-rw-r--r--contrib/binutils/libiberty/getcwd.c14
-rw-r--r--contrib/binutils/libiberty/getopt.c116
-rw-r--r--contrib/binutils/libiberty/getopt1.c9
-rw-r--r--contrib/binutils/libiberty/getpagesize.c55
-rw-r--r--contrib/binutils/libiberty/getpwd.c115
-rw-r--r--contrib/binutils/libiberty/getruntime.c38
-rw-r--r--contrib/binutils/libiberty/hashtab.c429
-rw-r--r--contrib/binutils/libiberty/memchr.c4
-rw-r--r--contrib/binutils/libiberty/memcpy.c2
-rw-r--r--contrib/binutils/libiberty/memmove.c2
-rw-r--r--contrib/binutils/libiberty/mkstemps.c128
-rw-r--r--contrib/binutils/libiberty/objalloc.c4
-rw-r--r--contrib/binutils/libiberty/obstack.c177
-rw-r--r--contrib/binutils/libiberty/partition.c185
-rw-r--r--contrib/binutils/libiberty/pexecute.c186
-rw-r--r--contrib/binutils/libiberty/putenv.c68
-rw-r--r--contrib/binutils/libiberty/random.c43
-rw-r--r--contrib/binutils/libiberty/setenv.c163
-rw-r--r--contrib/binutils/libiberty/splay-tree.c370
-rw-r--r--contrib/binutils/libiberty/strchr.c2
-rw-r--r--contrib/binutils/libiberty/strerror.c18
-rw-r--r--contrib/binutils/libiberty/strrchr.c2
-rw-r--r--contrib/binutils/libiberty/strsignal.c18
-rw-r--r--contrib/binutils/libiberty/strtol.c9
-rw-r--r--contrib/binutils/libiberty/strtoul.c11
-rw-r--r--contrib/binutils/libiberty/tmpnam.c2
-rw-r--r--contrib/binutils/libiberty/vasprintf.c7
-rw-r--r--contrib/binutils/libiberty/vfprintf.c22
-rw-r--r--contrib/binutils/libiberty/vprintf.c2
-rw-r--r--contrib/binutils/libiberty/xmalloc.c64
-rw-r--r--contrib/binutils/libiberty/xmemdup.c22
-rw-r--r--contrib/binutils/libiberty/xstrdup.c16
-rwxr-xr-xcontrib/binutils/ltconfig2316
-rw-r--r--contrib/binutils/ltmain.sh3745
-rw-r--r--contrib/binutils/missing70
-rwxr-xr-xcontrib/binutils/move-if-change2
-rw-r--r--contrib/binutils/opcodes/ChangeLog2119
-rw-r--r--contrib/binutils/opcodes/Makefile.am220
-rw-r--r--contrib/binutils/opcodes/Makefile.in546
-rw-r--r--contrib/binutils/opcodes/aclocal.m4752
-rw-r--r--contrib/binutils/opcodes/alpha-dis.c22
-rw-r--r--contrib/binutils/opcodes/alpha-opc.c184
-rw-r--r--contrib/binutils/opcodes/arc-dis.c4
-rw-r--r--contrib/binutils/opcodes/arc-opc.c17
-rw-r--r--contrib/binutils/opcodes/arm-dis.c1065
-rw-r--r--contrib/binutils/opcodes/arm-opc.h284
-rw-r--r--contrib/binutils/opcodes/cgen-asm.c249
-rw-r--r--contrib/binutils/opcodes/cgen-dis.c222
-rw-r--r--contrib/binutils/opcodes/cgen-opc.c405
-rw-r--r--contrib/binutils/opcodes/config.in127
-rwxr-xr-xcontrib/binutils/opcodes/configure2746
-rw-r--r--contrib/binutils/opcodes/configure.in49
-rw-r--r--contrib/binutils/opcodes/dis-buf.c53
-rw-r--r--contrib/binutils/opcodes/disassemble.c68
-rw-r--r--contrib/binutils/opcodes/i386-dis.c3749
-rw-r--r--contrib/binutils/opcodes/opintl.h30
-rw-r--r--contrib/binutils/opcodes/po/Make-in251
-rw-r--r--contrib/binutils/opcodes/po/POTFILES.in73
-rw-r--r--contrib/binutils/opcodes/po/opcodes.pot345
-rw-r--r--contrib/binutils/opcodes/ppc-dis.c237
-rw-r--r--contrib/binutils/opcodes/ppc-opc.c3124
-rw-r--r--contrib/binutils/opcodes/sh-dis.c353
-rw-r--r--contrib/binutils/opcodes/sh-opc.h731
-rw-r--r--contrib/binutils/opcodes/sparc-dis.c60
-rw-r--r--contrib/binutils/opcodes/sparc-opc.c124
-rw-r--r--contrib/binutils/opcodes/tic30-dis.c5
-rw-r--r--contrib/binutils/opcodes/v850-dis.c130
-rw-r--r--contrib/binutils/opcodes/v850-opc.c336
-rw-r--r--contrib/binutils/opcodes/z8k-dis.c1
-rw-r--r--contrib/binutils/opcodes/z8kgen.c1
-rwxr-xr-xcontrib/binutils/ylwrap22
542 files changed, 236481 insertions, 45858 deletions
diff --git a/contrib/binutils/ChangeLog b/contrib/binutils/ChangeLog
new file mode 100644
index 0000000..78a8122
--- /dev/null
+++ b/contrib/binutils/ChangeLog
@@ -0,0 +1,6712 @@
+2000-03-29 Jason Merrill <jason@casey.cygnus.com>
+
+ * configure.in: -linux-gnu*, not -linux-gnu.
+
+2000-03-10 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.in (all-gcc): Backed out the last change.
+
+2000-03-10 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.in (all-gcc): Run ld/ld-new if necessary.
+
+Fri Mar 3 18:44:08 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (taz): Set PACKAGE to TOOL when not defined.
+ (do-tar-bz2): Replace TOOL with PACKAGE.
+ (gdb.tar.bz2): Remove GDBTK from GDB package.
+ (gdb+dejagnu.tar.bz2, insight.tar.bz2, insight+dejagnu.tar.bz2,
+ dejagnu.tar.bz2): New packages.
+
+2000-02-27 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add entry for mips*-*-linux*, move catch all
+ *-*-*linux* entry below this one.
+
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
+
+ * ltconfig, ltmain.sh: Update to libtool 1.3.4.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Support an OS of "wince".
+
+Thu Feb 24 16:15:56 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config.guess, config.sub: Updated to match config's 2000-02-15
+ version.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * config.sub: Add support for Linux/IBM 370.
+ * configure.in: Likewise.
+
+2000-02-22 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add mips-pe, sh-pe and arm-wince-pe targets.
+
+2000-02-20 Christopher Faylor <cgf@cygnus.com>
+
+ * config.guess: Guess "cygwin" rather than "cygwin32".
+
+2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure (gcc_version): When setting, narrow search to
+ lines containing `version_string'.
+
+2000-01-06 Geoff Keating <geoffk@cygnus.com>
+
+ * configure.in: Use mt-aix43 to handle *_TARGET defs,
+ not mh-aix43.
+
+1999-09-04 Steve Chamberlain <sac@pobox.com>
+
+ * config.sub: Add support for configuring for pj.
+
+1999-08-31 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub (maybe_os): Add support for configuring for fr30.
+
+1999-08-27 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Do not configure or build ld for AIX
+ platforms. ld is known to be broken on these platforms.
+
+1999-08-09 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.in (LDFLAGS): Define.
+
+1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * configure.in (i[3456]-*-mingw32*): Don't put gprof in
+ noconfigdirs.
+ (*-*-cygwin*): Likewise.
+
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
+
+ * mkdep: New file.
+ * Makefile.in (GAS_SUPPORT_DIRS): Add mkdep.
+ (BINUTILS_SUPPORT_DIRS): Add mkdep.
+
+ From Eli Zaretskii <eliz@is.elta.co.il>:
+ * configure (tmpfile): Change cONf$$ to cNf$$ to avoid an overly
+ long file name when using DJGPP on MS-DOS.
+
+1999-07-30 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * Makefile.in (check-target-libio): Remove all-target-libstdc++
+ dependency as this causes "make check" to globally "make all"
+
+1999-07-22 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.in (binutils.tar.bz2): Don't pass makeall.bat and
+ configure.bat in SUPPORT_FILES.
+ (gas+binutils.tar.bz2): Likewise.
+
+ * makeall.bat: Remove; obsolete.
+
+1999-07-21 Ian Lance Taylor <ian@zembu.com>
+
+ From Mark Elbrecht:
+ * configure.bat: Remove; obsolete.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * configure: Add -W -Wall to the default CFLAGS when compiling with
+ gcc.
+
+Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * configure.in: Build ld, binutils & gas for hppa*-*-linux-gnu*.
+
+1999-06-30 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in: Build ld on IRIX6.
+
+1999-06-12 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.in: Change distribution targets to use bzip2 instead of
+ gzip.
+ (TEXINFO_SUPPORT): Set to just texinfo/texinfo.tex.
+ (taz): Don't use texinfo/gpl.texinfo or texinfo/lgpl.texinfo.
+
+1999-06-04 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Add mcore target.
+
+Sun May 30 16:03:16 1999 Cort Dougan <cort@cs.nmt.edu>
+
+ * config.guess (ppc-*-linux-gnu): Also use ld emul elf32ppclinux.
+
+1999-05-24 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Updated to match latest EGCS version.
+
+1999-04-30 Tom Tromey <tromey@cygnus.com>
+
+ * ltmain.sh: [mode link] Always use CC given by ltconfig.
+
+1999-04-23 Tom Tromey <tromey@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update to libtool 1.2f.
+
+1999-04-20 Drew Moseley <dmoseley@cygnus.com>
+
+ * configure.in (noconfigdirs): Don't build libstub for arm-elf targets.
+ (noconfigdirs): Don't build any bsp stuff for for arm-oabi targets.
+ Bad merge removed these two changes.
+
+1999-04-11 Richard Henderson <rth@cygnus.com>
+
+ * configure.in (i?86-*-beos*): Do config gperf; don't config
+ gdb, newlib, or libgloss.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Add support for mcore targets.
+
+1999-04-07 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*): Use config/mt-d30v as makefile fragment,
+ not mt-ospace, in order to shut up assembler warning about using
+ symbols that are named the same as registers.
+
+1999-04-07 Drew Moseley <dmoseley@cygnus.com>
+
+ * Makefile.in (all-target-cygmon): Added all-target-bsp to the
+ dependency list for all-target-cygmon.
+
+1999-04-05 Doug Evans <devans@casey.cygnus.com>
+
+ * config-ml.in: Check $host, not $target, for selective multilibs.
+ (arm-*-*): Allow disabling of biendian, h/w fp, 26 bit apcs,
+ thumb interworking, and underscore prefix multilibs.
+
+1999-04-04 Ian Lance Taylor <ian@zembu.com>
+
+ * missing: Update to version from current automake.
+
+Fri Apr 2 15:11:32 1999 H.J. Lu (hjl@gnu.org)
+
+ * configure (gxx_include_dir): Removed.
+
+ * configure.in (gxx_include_dir): Handle it.
+ * Makefile.in: Likewise.
+
+1999-03-29 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * config.sub (mips64vr4111,mips64vr4111el) Add.
+
+1999-03-21 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Correct typo for detecting ELF on FreeBSD.
+
+Thu Mar 18 00:17:50 1999 Mark Elbrecht <snowball3@usa.net>
+
+ * config/mh-go32: Delete.
+ * config/mh-djgpp: New. Renamed from mh-go32.
+ * configure.in (pc-msdosdjgpp): Set host_makefile_frag to
+ config/mh-djgpp.
+
+Thu Mar 11 18:37:23 1999 Drew Moseley <dmoseley@cygnus.com>
+
+ * Makefile.in (all-target-bsp): Added all-gcc all-binutils and
+ all-target-newlib to dependency list for all-target-bsp.
+
+Thu Mar 11 01:19:31 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * config.sub: Add i386-uwin support.
+ * config.guess: Likewise.
+
+Thu Mar 11 01:07:55 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * configure.in: cleanup, add mh-*pic handling for arm, special
+ case powerpc*-*-aix*
+
+Wed Mar 10 18:35:07 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * configure.in (noconfigdirs): Removed target-libgloss so libnosys.a
+ can be built.
+
+Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com>
+
+ * configure.in: Added bsp support to arm-*-coff and arm-*-elf
+ targets.
+
+1999-03-02 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Rename CYGNUS LOCAL to EGCS LOCAL
+
+Sun Feb 28 02:20:00 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * config.sub: Check for "cygwin*" rather than "cygwin32*"
+
+1999-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Fix typo in arm recognition.
+
+Wed Feb 24 13:51:40 1999 Drew Moseley <dmoseley@cygnus.com>
+
+ * configure.in (noconfigdirs): Changed target_configdirs to
+ include target-bsp only for m68k-*-elf* and m68k-*-coff*
+ rather than m68k-*-* since it is not known to work on
+ m68k-aout. Ditto for arm-*-*oabi.
+
+Wed Feb 24 12:52:17 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.in (*-*-windows*): Remove, no longer used.
+ * config/mh-windows: Ditto.
+
+1999-02-19 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Automatically recognise ELF on FreeBSD. From Niall
+ Smart and improved by Andrew Cagney.
+
+Thu Feb 18 19:55:09 1999 Marc Espie <espie@cvs.openbsd.org>
+
+ * config.guess: Recognize openbsd-*-hppa.
+
+Wed Feb 17 01:38:59 1999 H.J. Lu (hjl@gnu.org)
+
+ * Makefile.in (REALLY_SET_LIB_PATH): Append $$$(RPATH_ENVVAR)
+ only if it is not empty.
+
+1999-02-17 Nick Clifton <nickc@cygnus.com>
+
+ Patch from: Scott Bambrough <scottb@corelcomputer.com>
+
+ * config.guess: Modified to recognize uname's armv* syntax.
+
+ * config.sub: Modified to recognize uname's armv* syntax.
+
+1999-02-17 Mark Salter <msalter@cygnus.com>
+
+ * configure.in: Added target-bsp for sparclite.
+
+Mon Feb 8 14:17:24 1999 Richard Henderson <rth@cygnus.com>
+
+ * config.sub: Recognize alphapca5[67] and up to alphaev8.
+
+1999-02-08 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add support for strongarm port.
+ * config.sub: Add support for strongarm target.
+
+Sun Feb 7 18:01:54 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * configure.in (*-*-cygwin32*): Use config/mh-cygwin instead of
+ the old name config/mh-cygwin32.
+ Enable texinfo.
+
+Thu Feb 4 20:43:25 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Do build ld for ix86 Solaris.
+
+Tue Feb 2 19:46:40 1999 Jim Wilson <wilson@cygnus.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): Set AR to $AR instead of
+ $AR_FOR_TARGET. Likewise for RANLIB.
+
+Tue Feb 2 20:05:05 1999 Catherine Moore <clm@cygnus.com>
+
+ * config.sub (oabi): Recognize.
+ * configure.in (arm-*-oabi): Handle.
+
+Sat Jan 30 06:09:00 1999 Robert Lipe (robertlipe@usa.net)
+
+ * config.guess: Improve detection of i686 on UnixWare 7.
+
+Sat Jan 30 08:04:00 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * config.guess: Add support for i386-pc-interix.
+ * config.sub: Likewise.
+ * configure.in: Likewise.
+ * config/mh-interix: New file.
+
+Mon Jan 18 13:59:20 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.in: Remove unneeded all-target-libio from
+ from all-target-winsup target since it is now unneeded.
+ Add all-target-libtermcap in its place since it is now
+ needed.
+
+Wed Dec 30 20:34:52 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: makefile stub for cygwin target is probably
+ unnecessary. Remove it for now.
+ * config/mt-cygwin: Remove.
+
+Wed Dec 30 01:13:03 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: libtermcap.a should be built when cygwin is the
+ target as well as the host.
+ * config.guess: Allow mixed case in cygwin uname output.
+ * Makefile.in: Add libtermcap target.
+ * config/mt-cygwin: New file. libtermcap target info.
+
+Tue Dec 15 17:02:58 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in: Add cygmon for x86-coff and x86-elf. Configure
+ cygmon for all sparclite targets, regardless of object format.
+
+1998-12-15 Mark Salter <msalter@cygnus.com>
+
+ * configure.in: Added target-bsp for several target architectures.
+
+ * Makefile.in: Added rules for bsp.
+
+Wed Dec 23 00:20:50 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub: Clean up handling of hppa2.0.
+
+Tue Dec 22 23:56:31 1998 Rodney Brown (rodneybrown@pmsc.com)
+
+ * config.guess: Use C code to identify more HP machines.
+
+Thu Dec 17 01:22:30 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub: Handle hppa2.0.
+
+Fri Dec 4 01:34:02 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess: Improve detection of hppa2.0 processors.
+
+Fri Dec 4 01:33:05 1998 Niall Smart <nialls@euristix.ie>
+
+ * config.guess: Recognize FreeBSD using ELF automatically.
+
+1998-11-26 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure (skip-this-dir): Add handling for new shell script, which
+ might be created by a sub-directory's configure to indicate, this particular
+ directory is "unwanted".
+ * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise.
+
+
+Wed Nov 18 18:28:45 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * ltconfig: import from libtool, after changing libtool to
+ account for the cygwin name change.
+
+Wed Nov 18 18:09:14 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.in: CC_FOR_TARGET and CXX_FOR_TARGET should also
+ include newlib/libc/sys/cygwin and newlib/libc/sys/cygwin32.
+
+Wed Nov 18 20:13:29 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Add libtermcap to list of cygwin dependencies.
+
+Tue Nov 17 16:57:51 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.in: modify CC_FOR_TARGET and CXX_FOR_TARGET so that
+ they include winsup/include when it's a cygwin target.
+
+1998-11-12 Tom Tromey <tromey@cygnus.com>
+
+ * configure.in (host_tools): Added zip.
+ * Makefile.in (all-target-libjava): Depend on all-zip.
+ (all-zip): New target.
+ (ALL_MODULES): Added all-zip.
+ (NATIVE_CHECK_MODULES): Added check-zip.
+ (INSTALL_MODULES): Added install-zip.
+ (CLEAN_MODULES): Added clean-zip.
+
+Thu Nov 12 17:27:21 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.in: lose "32" from comment about cygwin.
+
+Thu Nov 5 15:00:31 1998 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Use -Os to build target libraries for the fr30.
+
+Wed Nov 4 18:49:43 1998 Dave Brolley <brolley@cygnus.com>
+
+ * config.sub: Add fr30.
+
+Mon Nov 2 15:19:33 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: drop "32" from config/mh-cygwin32. Check
+ cygwin* instead of cygwin32*.
+ * config.sub: Check cygwin* instead of cygwin32*.
+
+1998-10-20 Syd Polk <spolk@cygnus.com>
+
+ * Makefile.in configure.in: Add the ability to use tcl8.1 and tk8.1
+ if desired.
+
+Sun Oct 18 18:34:50 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.if (cxx_interface, libstdcxx_interface): Do not try to set
+ these if the appropriate directories and files to not exist.
+
+Wed Oct 14 10:29:06 1998 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (DEVO_SUPPORT): Add config.if.
+
+Tue Oct 13 09:17:06 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub: Bring back lost sparcv9.
+
+Wed Sep 30 22:20:50 1998 Robert Lipe <robertl@dgii.com>
+
+ * config.sub: Add support for i[34567]86-pc-udk.
+ * configure.in: Likewise.
+
+Wed Sep 30 19:23:48 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.in: add bzip2 package building bits for user
+ tools module
+ * configure.in: ditto
+
+1998-09-30 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure.in (target_subdir): Remove duplicate line.
+
+Tue Sep 29 22:45:41 1998 Felix Lee <flee@cygnus.com>
+
+ * Makefile.in (all-automake): fix dependencies.
+
+Mon Sep 28 04:04:27 1998 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Minor cleanups for building in the $(target_alias)
+ subdir.
+
+1998-09-22 Jim Wilson <wilson@cygnus.com>
+
+ * Makefile.in (bootstrap): Set r and s before make all. Use
+ BASE_FLAGS_TO_PASS in make all.
+ (cross): Likewise.
+
+1998-09-20 Mark Mitchell <mark@markmitchell.com>
+
+ * Makefile.in (bootstrap): Pass TARGET_FLAGS_TO_PASS to `make all'.
+
+
+Sun Sep 20 00:13:02 1998 Richard Henderson <rth@cygnus.com>
+
+ * config.sub: Fix typo in last change.
+
+1998-09-19 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * config.sub: Add support for C4x target.
+ * configure.in: Likewise.
+
+1998-09-13 David S. Miller <davem@pierdol.cobaltmicro.com>
+
+ * config.sub: Recognize sparcv9 just like sparc64.
+
+Wed Sep 9 15:44:52 1998 Robert Lipe <robertl@dgii.com>
+
+ * config.guess: Match "Pent II" or "PentII" for OpenServer.
+
+Tue Sep 8 01:18:39 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess: Correctly identify Pentium II sco boxes.
+
+ * config.guess: Fix "tr" code. From Weiwen Liu.
+
+Sat Sep 5 13:56:52 1998 John Hughes <john@Calva.COM>
+
+ * configure.in: Do not assume x86-svr4 or x86-unixware can handle
+ stabs.
+
+Sat Sep 5 02:12:02 1998 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (TARGET_CONFIGDIRS): Add libchill.
+ (ALL_TARGET_MODULES): Add all-target-libchill.
+ (CONFIGURE_TARGET_MODULES, CHECK_TARGET_MODULES): Similarly.
+ (INSTALL_TARGET_MODULES, CLEAN_TARGET_MODULES): Similarly.
+ (all-target-libchill): Add dependencies.
+ * configure.in (target_libs): Add libchill.
+
+Sun Aug 30 22:27:02 1998 Lutz Wohlrab <lutz.wohlrab@informatik.tu-chemnitz.de>
+
+ * config.guess: Avoid assumptions about "tr" behaves when
+ LANG is set to something other than English.
+
+Sun Aug 30 22:14:44 1998 H.J. Lu (hjl@gnu.org)
+
+ * configure (gxx_include_dir): Changed to
+ '${prefix}/include/g++'-${libstdcxx_interface}.
+
+ * config.if: New to determine the interfaces.
+
+Sun Aug 30 21:15:19 1998 Mark Klein (mklein@dis.com)
+
+ * config.guess: Detect and handle MPE/IX.
+ * config.sub: Deal with MPE/IX.
+
+Sat Aug 29 14:32:55 1998 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * configure.in: Use mh-aix43.
+
+1998-07-29 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure: Fix --without/--disable cases for gxx-include-dir.
+
+Fri Aug 28 12:28:26 1998 Per Bothner <bothner@cygnus.com>
+
+ * mdata-sh: Imported. Needed for automake support.
+
+Thu Aug 13 12:49:29 1998 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.in (taz): Try "chmod -R og=u ." before
+ "chmod og=u `find . -print`".
+
+Fri Jul 31 09:38:33 1998 Catherine Moore <clm@cygnus.com>
+
+ * configure.in: Add arm-elf and thumb-elf support.
+
+Mon Jul 27 16:23:58 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * Makefile.in: Undo previous patch.
+
+Fri Jul 24 19:55:24 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * Makefile.in (INSTALL_TARGET): Move EXTRA_TARGET_HOST_INSTALL_MODULES
+ to here ...
+ (install-no-fixedincludes): and here
+ (INSTALL_MODULES): ... from here.
+
+Fri Jul 24 17:01:42 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Merge with FSF.
+
+ * config.guess: Merge with FSF.
+
+Fri Jul 24 08:43:36 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * configure (extraconfigdirs): New variable.
+ (SUBDIRS): Add extraconfigdirs and recurse on them too.
+ * Makefile.in (all): Move higher in file.
+ (EXTRA_TARGET_HOST_ALL_MODULES): New variable.
+ (EXTRA_TARGET_HOST_{INSTALL,CHECK}_MODULES): New variables.
+ (ALL_MODULES): Add EXTRA_TARGET_HOST_ALL_MODULES.
+ (CROSS_CHECK_MODULES): Add EXTRA_TARGET_HOST_CHECK_MODULES.
+ (INSTALL_MODULES): Add EXTRA_TARGET_HOST_INSTALL_MODULES.
+
+1998-07-23 Brendan Kehoe <brendan@cygnus.com>
+
+ * Makefile.in (all-target-libjava): Depend on all-gcc and
+ all-target-newlib.
+ (configure-target-libjava): Depend on $(ALL_GCC).
+
+Sat Jul 18 14:32:43 CDT 1998 Robert Lipe <robertl@dgii.com>
+
+ * config.guess: (*-pc-sco3.2v5) Add detection for Pentium II.
+ (*-pc-unixware7) Add detection for Pentium II, Pentium Pro.
+
+Fri Jul 17 13:30:18 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ylwrap: Change absolute path checks to check for DOS style path
+ names.
+
+ * ylwrap: Don't use a full path name if the source file is in the
+ same directory. From hjl@lucon.org (H.J. Lu).
+
+ * config-ml.in: Default to being verbose, to match Feb 18 change to
+ configure.
+
+Thu Jul 16 12:29:51 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ Brought over from egcs:
+
+ Sat Jun 27 22:46:32 1998 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in (target_subdir): Set to ${target_alias} instead
+ of "libraries".
+
+ Mon Sep 1 16:45:44 1997 Jim Wilson <wilson@cygnus.com>
+
+ * configure.in (target_subdir): Set to libraries if enable_multilib.
+
+Wed Jul 15 01:00:54 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in ($(CONFIGURE_TARGET_MODULES)): If there are any
+ multilibs, force reconfiguration the first time we create
+ multilib.out in a subdirectory, in case TARGET_SUBDIR is `.'.
+
+Tue Jul 14 23:41:03 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Strip any --no option from CONFIG_ARGUMENTS, to
+ avoid confusion with --no-recursion.
+
+Tue Jul 14 15:37:41 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: Win32 hosts shouldn't use install -x
+ * install-sh: remove -x option, and special .exe-handling
+ hack.
+
+Tue Jul 14 15:28:41 1998 Richard Henderson <rth@cygnus.com>
+
+ * config.guess: Recognize i586-pc-beos.
+ * configure.in: Don't build some bits for beos.
+
+Tue Jul 14 13:22:18 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: If CC is set but CFLAGS is not, and CC is gcc, make
+ CFLAGS default to -O2.
+
+ * ltmain.sh: Add some hacks to make SunOS --enable-shared work
+ when using GNU ld.
+
+Fri Jul 10 13:18:23 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltmain.sh: Correct install when using a different shell.
+
+Tue Jul 7 15:24:38 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update to libtool 1.2b.
+
+Thu Jul 2 13:57:36 1998 Klaus Kaempf <kkaempf@rmi.de>
+
+ * makefile.vms: Update to build binutils/makefile.vms. Add install
+ target.
+
+Wed Jul 1 16:45:21 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig: Update to correct AIX handling.
+
+Sat Jun 27 22:46:32 1998 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Add TARGET_SUBDIR.
+
+ * configure.in (target_subdir): Set to ${target_alias} instead
+ of "libraries".
+
+1998-06-26 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger.
+ (Makefile): Depend on $(gcc_version_trigger).
+
+ * configure (gcc_version): Change default initializer to empty
+ string.
+ (gcc_version_trigger): New variable; pass this variable down
+ to subdir configures to enable them checking gcc's version
+ themselves. Emit make macros for both gcc_version vars.
+ (topsrcdir): Initialize reliably.
+ (recursion line): Remove --with-gcc-version=${gcc_version}.
+
+1998-06-24 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure (enable_version_specific_runtime_libs): Implement new flag
+ --enable-version-specific-runtime-libs which installs C++ runtime stuff
+ in $(libsubdir); emit definition in each generated Makefile.
+ (gxx_include_dir): Initialize depending on
+ $enable_version_specific_runtime_libs.
+
+1998-06-24 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure (gcc_version): Initialize properly depending on
+ how and where configure is started.
+ (recursion line): Pass a --with-gcc-version=${gcc_version}
+ to configures in subdirs.
+
+Wed Jun 24 16:01:59 1998 John Metzler <jmetzler@cygnus.com>
+
+ * configure.in (noconfigdirs): Add configure pattern for mips tx39
+ cygmon
+
+Tue Jun 23 22:42:32 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Add cygmon and libstub support for mn10200.
+
+1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure (gcc_version): Add new variable describing the
+ particular gcc version we're building.
+ * Makefile.in (libsubdir): Add new macro for the directory
+ in which the compiler finds executables, libraries, etc.
+ (BASE_FLAGS_TO_PASS): Pass down gcc_version, target_alias
+ and libsubdir.
+
+Fri Jun 19 02:36:59 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * Makefile.in (local-clean): remove *.log
+ (warning.log): built with warn_summary from build.log
+ (mail-report.log): run test_summary
+ (mail-report-with-warnings.log): run test_summary including
+ warning.log in the report
+
+Thu Jun 18 11:26:03 1998 Robert Lipe <robertl@dgii.com>
+
+ * config.guess: Detection of Pentium II for *-sco-3.2v5*.
+
+Mon Jun 15 14:53:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (grep): Grep no longer depends on libiberty.
+
+Fri Jun 12 14:03:34 1998 Syd Polk <spolk@cygnus.com>
+
+ * Makefile.in: all-snavigator needs all-libgui.
+
+Thu Jun 11 19:43:47 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Add cygmon and libstub support for mn10300.
+
+Wed Jun 10 11:19:47 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * missing: Update to version from automake 1.3.
+
+ * ltmain.sh: On installation, don't get confused if the same name
+ appears more than once in the list of library names.
+
+Wed Jun 3 14:51:42 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Accept m68060 and m5200 as CPU names.
+
+Mon Jun 1 17:25:16 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Use && rather than using -a in test, because odd
+ strings can confuse test.
+ * configure.in: Likewise.
+
+Thu May 28 19:31:13 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Bring in Visual C++ support.
+
+Sat May 23 23:44:13 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * Makefile.in (boostrap2-lean, bootstrap3-lean,
+ bootstrap4-lean): new targets
+
+Mon May 11 23:11:34 1998 Jeffrey A Law (law@cygnus.com)
+
+ * COPYING.LIB: Update FSF address.
+
+Fri May 8 01:30:20 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update to libtool 1.2a.
+
+ * Makefile.in (GASB_SUPPORT_DIRS): Remove intl; already included via
+ GAS_SUPPORT_DIRS.
+
+Thu May 7 17:27:35 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Avoid producing a version number if
+ -version-info was not used.
+
+Tue May 5 18:02:24 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add --with-newlib to CONFIG_ARGUMENTS if we are
+ building with newlib.
+
+1998-04-30 Paul Eggert <eggert@twinsun.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): Remove backslash at end;
+ Solaris `make' causes it to continue to next definition.
+
+Tue Apr 28 16:24:24 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * Makefile.in (install-gdbtk): Call this 'install-gdb' so that
+ the right GUI libraries and files are installed along with GDB.
+
+Tue Apr 28 18:11:24 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Change alpha to alpha* in several places.
+
+Tue Apr 28 07:42:00 1998 Mark Alexander <marka@cygnus.com>
+
+ * config.sub: Recognize sparc86x.
+
+Tue Apr 28 07:35:02 1998 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (--enable-target-optspace): Remove debug echo.
+
+Thu Apr 23 21:31:16 1998 Jim Wilson <wilson@cygnus.com>
+
+ * configure: Set CXXFLAGS from CXXFLAGS, not CFLAGS.
+
+Thu Apr 23 12:26:38 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig: Update cygwin32 support.
+
+ * Makefile.in (GAS_SUPPORT_DIRS): Add intl.
+ (BINUTILS_SUPPORT_DIRS, GASB_SUPPORT_DIRS): Likewise.
+ (GDB_SUPPORT_DIRS): Likewise.
+
+Wed Apr 22 12:30:10 1998 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (target_makefile_frag): If --enable-target-optspace,
+ use -Os to compile target libraries rather than -O2. Default to
+ using -Os for d10v and m32r if --{enable,disable}-target-optspace is
+ not used.
+ * configure.in (target_cflags): Ditto for d30v.
+
+Tue Apr 21 23:06:54 1998 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (all-bfd): Depend on all-intl.
+ (all-binutils): Likewise.
+ (all-gas): Likewise.
+ (all-gprof): Likewise.
+ (all-ld): Likewise.
+
+
+1998-04-19 Brendan Kehoe <brendan@cygnus.com>
+
+ * configure.in (host_tools): Fix typo, lbtool -> libtool.
+
+Fri Apr 17 16:20:42 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (all-bfd): Depend upon all-libiberty.
+
+ * ltconfig, ltmain.sh: Bring in newer cygwin32 support.
+
+Fri Apr 17 12:22:22 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * Makefile.in: Add libstub.
+
+ * configure.in: Ditto. Build libstub for targets that have cygmon
+ support.
+
+Tue Apr 14 18:01:55 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't set PICFLAG on ix86-cygwin32.
+
+Tue Apr 14 12:24:45 1998 J. Kean Johnston <jkj@sco.com>
+
+ * configure.in: Recognise i[3456]96-*-sysv5* as a valid host, and
+ use mh-sysv5 if specified. Support gprof on SCO Open Server.
+
+Tue Apr 14 11:33:51 1998 Krister Walfridsson <cato@df.lth.se>
+
+ * configure: Define DEFAULT_M4 by searching PATH.
+ * Makfile.in: Use DEFAULT_M4.
+
+Mon Apr 13 15:37:24 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig: Add cygwin32 support.
+
+ * Makefile.in, configure.in: Add libtool as a native only directory
+ to configure and build.
+
+Wed Apr 8 13:18:56 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): XFOO lines shortened.
+
+Thu Apr 2 14:48:44 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.in: add ash make rules
+ * configure.in: add ash to native_only and host_tools lists
+
+Thu Mar 26 12:53:20 1998 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (all-gettext, all-intl): New targets.
+ (ALL_MODULES): Added all-gettext, all-intl.
+ (CROSS_CHECK_MODULES): Added check-gettext, check-intl.
+ (INSTALL_MODULES): Added install-gettext, install-intl.
+ (CLEAN_MODULES): Added clean-gettext, clean-intl.
+
+ * configure.in (host_tools): Added gettext.
+ (native_only): Likewise.
+ (noconfigdirs) [various cases]: Likewise.
+ (host_libs): Added intl.
+
+Thu Mar 26 15:00:11 1998 Keith Seitz <keiths@onions.cygnus.com>
+
+ * configure: Do not disable building gdbtk for cygwin32 hosts.
+
+Wed Mar 25 11:49:12 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * Makefile.in: Revert yesterday's change.
+ (all-target-winsup): all-target-librx stays out of here.
+
+Tue Mar 24 16:58:29 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * Makefile.in (TARGET_CONFIGDIRS, ALL_TARGET_MODULES,
+ CONFIGURE_TARGET_MODULES, CHECK_TARGET_MODULES,
+ INSTALL_TARGET_MODULES, CLEAN_TARGET_MODULES, all-target-winsup):
+ Remove references to librx and libg++.
+
+Tue Mar 24 18:28:12 1998 Eric Mumpower <nocturne@cygnus.com>
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Pass $(lispdir) down to
+ recursive makes
+
+Tue Mar 24 11:37:45 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (CC_FOR_TARGET): Use $(TARGET_SUBDIR) when passing -B
+ for newlib directory.
+ (CXX_FOR_TARGET): Likewise.
+
+Mon Mar 23 11:30:21 1998 Jeffrey A Law (law@cygnus.com)
+
+ * ltconfig: Update after libtool/ltconfig.in change for
+ hpux11.
+
+Fri Mar 20 18:51:43 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update to libtool 1.2.
+
+Fri Mar 20 09:32:14 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * Makefile.in (install-gcc): Don't specify LANGUAGES here.
+ (install-gcc-cross): Instead, override LANGUAGES here.
+
+1998-03-18 Dave Love <d.love@dl.ac.uk>
+
+ * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Set CONFIG_SITE to a
+ non-existent file since /dev/null loses with bash 2.0/autoconf 2.12.
+
+Wed Mar 18 09:24:59 1998 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add Thumb-pe target.
+
+Tue Mar 17 16:59:00 1998 Syd Polk <spolk@cygnus.com>
+ * Makefile.in - changed sn targets to snavigator
+ * configure.in - changed sn targets to snavigator
+
+Tue Mar 17 10:33:28 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * config-ml.in: After building symlink tree call make distclean
+ if a Makefile got linked into ${ml_dir}/${ml_libdir}; this happens
+ to be the case for libiberty.
+
+Tue Mar 17 10:22:37 1998 H.J. Lu (hjl@gnu.ai.mit.edu)
+
+ * configure: When making link, also check the current
+ directory. The configure scripts may create one.
+
+Fri Mar 6 01:02:03 1998 Richard Henderson <rth@cygnus.com>
+
+ * config.sub: Accept alphapca56 and alphaev6 properly.
+
+Fri Mar 6 00:14:55 1998 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * configure.in: Revert 3 Jan change for powerpc-linux-gnulibc1.
+
+
+Mon Feb 23 15:09:18 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de
+
+ * config.sub (sco5): Fix typo.
+
+Mon Feb 23 14:46:06 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL_MODULES): Move install-tcl before
+ install-itcl.
+ (install-itcl): Remove dependency on install-tcl.
+
+Mon Feb 23 09:53:28 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Remove libgloss from noconfigdirs for MN10300.
+
+Fri Feb 20 16:47:24 1998 Tom Tromey <tromey@cygnus.com>
+
+ * configure: Don't let builds be done in source tree.
+
+Thu Feb 19 13:40:41 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't build libgui for a cygwin32 target when not on
+ a cygwin32 host.
+
+Wed Feb 18 12:29:00 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * configure (redirect): Set to null, so default behavior of
+ configure is now --verbose.
+
+1998-02-16 Dave Love <d.love@dl.ac.uk>
+
+ * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Run configure with
+ CONFIG_SITE=/dev/null to forestall lossage with site configuration.
+
+Mon Feb 16 12:23:53 1998 Manfred Hollstein <Manfred.Hollstein@ks.sel.alcatel.de>
+
+ * Makefile.in (BASE_FLAGS_TO_PASS, EXTRA_TARGET_FLAGS): Really add
+ this change to sync Makefile.in with its ChangeLog entries.
+
+Thu Feb 12 15:03:08 1998 H.J. Lu <hjl@gnu.org>
+
+ * ltmain.sh (mkdir): Check that the directory doesn't exist
+ before we exit with error, so that we don't get races during
+ parallel builds.
+
+Sat Feb 7 15:19:18 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update from libtool 1.0i.
+
+Fri Feb 6 01:33:52 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Don't pass PICFLAG and
+ PICFLAG_FOR_TARGET.
+ (EXTRA_TARGET_FLAGS): Don't pass PICFLAG_FOR_TARGET.
+
+ * configure: Emit a definition for the new macro enable_shared
+ into each Makefile.
+
+ * config/mh-sparcpic (PICFLAG): Define to properly according
+ to current multilib configuration.
+ * config/mt-sparcpic (PICFLAG_FOR_TARGET): Define to properly
+ according to current multilib configuration.
+
+Thu Feb 5 17:01:12 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * configure.in (host_tools, native_only): Add libtool.
+
+Wed Feb 4 16:53:58 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: add target-gperf to noconfigdirs for Cygwin32.
+ Fix typo in ming config comment.
+
+Wed Feb 4 18:56:13 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update from libtool 1.0h.
+
+Mon Feb 2 19:38:19 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Add tic30 cases, and map c30 to tic30.
+
+Fri Jan 30 17:18:32 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: Remove expect from noconfigdirs when target
+ is cygwin32. OK to build expect and dejagnu with Canadian
+ Cross.
+
+Wed Jan 28 12:58:49 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Do build expect, dejagnu, and cvssrc for a cygwin32
+ host.
+
+ * config.guess: Use ${UNAME_MACHINE} rather than i386 for cygwin32
+ and mingw32.
+
+Wed Jan 28 10:26:37 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Remove passing $(local_prefix)
+ here as it is not defined in the toplevel Makefile.
+
+Tue Jan 27 23:25:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure (package_makefile_rules_frag): New variable, which names
+ a file with generic rules, ...
+ Change comment to mention we now have FIVE parts.
+ * configure: Undo last change.
+
+Tue Jan 27 23:15:55 1998 Lassi A. Tuura <lat@iki.fi>
+
+ * config.guess: More accurate determination of HP processor types.
+ * config.sub: More accurate determination of HP processor types.
+
+Sat Jan 24 01:59:45 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure (package_makefile_frag): Move inserting the
+ ${package_makefile_frag} to where it should be according
+ to the comment.
+
+Fri Jan 23 00:30:21 1998 Philip Blundell <pb@nexus.co.uk>
+
+ * config.guess: Add support for Linux/ARM.
+
+Thu Jan 22 15:14:01 1998 Fred Fish <fnf@cygnus.com>
+
+ * .cvsignore: Remove *-info and *-install since they match
+ release-info and mpw-install, which we don't want to just ignore.
+
+Thu Jan 22 01:38:33 1998 Richard Henderson <rth@cygnus.com>
+
+ * configure.in: Revert 3 Jan change for alpha-linux-gnulibc1.
+
+Sat Jan 17 21:28:08 1998 Pieter Nagel <pnagel@epiuse.co.za>
+
+ * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and
+ local_prefix to sub-make invocations.
+
+Sat Jan 17 21:04:59 1998 H.J. Lu (hjl@gnu.org)
+
+ * configure.in: Check makefile fragments in the source
+ directory.
+
+Fri Jan 16 00:41:37 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * configure.in: check whether host and target makefile
+ fragments exist before adding them to *_makefile_frag
+
+Wed Jan 14 23:39:10 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in (target_configdirs): Add cygmon for sparc64-elf.
+
+Wed Jan 14 12:48:07 1998 Keith Seitz <keiths@pizza.cygnus.com>
+
+ * configure.in: Make sure we only replace RPATH_ENVVAR on
+ lines which begin with RPATH_ENVVAR, i.e. add "^" to the
+ regexp to sed.
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Pass RRPATH_ENVVAR down
+ to sub-makes.
+
+1998-01-13 Lee Iverson (leei@ai.sri.com)
+
+ * config-ml.in (multi-do): LDFLAGS must include multilib
+ designator.
+
+Tue Jan 13 01:13:24 1998 Robert Lipe (robertl@dgii.com)
+
+ * config.guess: Recognize i[3456]-i586-UnixWare7-sysv5.
+
+Sun Jan 4 01:06:55 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * config.sub: Add mingw32 support.
+ * configure.in: Likewise.
+ * mh-mingw32: New file.
+
+Sat Jan 3 12:11:05 1998 Franz Sirl <franz.sirl-kernel@lauterbach.com>
+
+ * configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1
+
+Sun Dec 28 11:28:58 1997 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (INSTALL_TARGET): Do install-gcc first.
+ * configure (gxx_include_dir): Provide a definition for subdirs
+ which do not use autoconf.
+
+Wed Dec 24 22:46:55 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess: Sync with egcs. Picks up new alpha support,
+ BeOS & some additional linux support.
+
+Tue Dec 23 12:45:50 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess: HP 9000/803 is a PA1.1 machine.
+
+
+Sun Dec 21 16:53:12 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
+
+ * configure.in (host_makefile_frag, target_makefile_frag):
+ Handle multiple config files.
+ (alpha-*-linux*): Treat alpha-*-linux* as alpha-*-linux* and
+ alpha-*-*.
+
+Thu Dec 18 13:13:03 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * mkdep: New file.
+
+Wed Dec 17 09:53:02 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Allow configuring of libide, vmake, etc.
+
+Tue Dec 16 17:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Add libgui directory.
+ (GDB_TK): Add all-libgui.
+ * configure.in: Add libgui directory.
+ * configure: Add all-libgui to GDB_TK.
+
+Mon Dec 15 16:12:28 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config-ml.in (multidirs): Add m32r to multilib list.
+
+Fri Dec 12 10:43:31 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
+
+ * Makefile.in (all-target-gperf): Change dependency to
+ all-target-libstdc++.
+
+Thu Dec 11 23:30:51 1997 Fred Fish <fnf@ninemoons.com>
+
+ * config.guess: Add BeOS support.
+
+Wed Dec 10 15:10:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Source directory cvs renamed to cvssrc:
+ * configure.in (host_tools): Change cvs to cvssrc.
+ (native_only): Likewise.
+ (noconfigdirs) [various cases]: Likewise.
+ * Makefile.in (ALL_MODULES): Change all-cvs to all-cvssrc.
+ (CROSS_CHECK_MODULES): Change check-cvs to check-cvssrc.
+ (INSTALL_MODULES): Change install-cvs to install-cvssrc.
+ (CLEAN_MODULES): Change clean-cvs to clean-cvssrc.
+ (all-cvssrc): Rename target from all-cvs.
+
+Wed Dec 3 07:55:59 1997 Jeffrey A Law (law@cygnus.com)
+
+ * configure (gxx_include_dir): Fix thinko.
+
+Tue Dec 2 10:55:34 1997 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (INSTALL_TARGET_CROSS): Define.
+ (install-cross, install-gcc-cross): New targets.
+
+Tue Dec 2 10:08:31 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (noconfigdirs): Add support for Thumb target.
+
+ * config.sub (maybe_os): Add support for Thumb target.
+
+Sun Nov 30 16:12:27 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * Makefile.in: Add rules for cygmon.
+
+ * configure.in: Build cygmon for sparc-elf and sparclite-aout.
+
+Thu Nov 27 01:31:30 1997 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (INSTALL_TARGET): Do install-gcc first.
+ * configure (gxx_include_dir): Provide a definition for subdirs
+ which do not use autoconf.
+
+Wed Nov 26 11:53:33 1997 Keith Seitz <keiths@onions.cygnus.com>
+
+ * Makefile.in, configure, configure.in, ChangeLog: merge with foundry's
+ 11/18/97 build
+
+Wed Nov 26 16:08:50 1997 Jeffrey A Law (law@cygnus.com)
+
+ * From Franz Sirl.
+ * config.guess (powerpc*-*-linux): Handle glibc2 beta release
+ found on RedHat Linux systems.
+
+Fri Nov 21 09:51:01 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess (alpha stuff): Merge with FSF to avoid incorrect
+ guesses.
+
+Thu Nov 13 11:38:37 1997 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in (i[3456]86-ncr-sysv4.3*): Tweak.
+
+Mon Nov 10 15:23:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * ltmain.sh: If mkdir fails, check whether the directory was created
+ anyhow by some other process.
+
+Mon Nov 10 14:38:03 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Configure all directories.
+
+Sun Nov 9 17:36:20 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Configure newlib, libiberty directories
+ for the D30V.
+
+Sat Nov 8 14:42:59 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Configure target-libgloss on the D30V.
+
+Fri Nov 7 10:34:09 1997 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * include/libiberty.h: Add extern "C" { so it can be used with C++
+ progrms.
+ * include/remote-sim.h: Add extern "C" { so it can be used with C++
+ programs.
+
+Thu Oct 30 11:09:29 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Configure GCC now.
+
+Mon Oct 27 13:17:24 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.in: Remove a "second pass" of tweaking noconfigdirs,
+ is no longer needed.
+
+Mon Oct 27 12:03:53 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in: check-target-libio depends on all-target-libstdc++.
+
+Sun Oct 26 11:48:27 1997 Manfred Hollstein (manfred@s-direktnet.de)
+
+ * Makefile.in (bootstrap-lean): Combined with `normal' bootstrap
+ targets using "$@" to provide support for similar but not identical
+ targets without having to duplicate code.
+
+Mon Oct 20 15:28:49 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * makefile.vms: Fix to work with DEC C.
+
+Tue Oct 7 23:58:57 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config.sub: Add mips-tx39-elf to marketing names.
+
+Tue Oct 7 14:24:41 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltmain.sh: Handle symlinks in generated script.
+
+Wed Oct 1 13:11:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Handle autoconf style directory options: --bindir,
+ --datadir, --includedir, --infodir, --libdir, --libexecdir,
+ --mandir, --oldincludedir, --sbindir, --sharedstatedir,
+ --sysconfdir.
+ * Makefile.in (sbindir, libexecdir, sysconfdir): New variables.
+ (sharedstatedir, localstatedir, oldincludedir): New variables.
+ (BASE_FLAGS_TO_PASS): Pass down bindir, datadir, includedir,
+ infodir, libdir, libexecdir, localstatedir, mandir, oldincludedir,
+ sbindir, sharedstatedir, and sysconfdir.
+
+Mon Sep 29 00:38:08 1997 Aaron Jackson <jackson@negril.msrce.howard.edu>
+
+ * Makefile.in (bootstrap-lean): New target.
+
+Wed Sep 24 18:06:27 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * configure.in (d30v): Remove tcl, tk, expect, gdb, itcl, tix, db,
+ sn, and gnuserv from noconfigdirs.
+
+Wed Sep 24 15:18:32 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ltmain.sh: Tweak shell pattern to avoid bug in NetBSD /bin/sh.
+
+Thu Sep 18 23:58:27 1997 Jeffrey A Law (law@cygnus.com)
+
+* Makefile.in (cross): New target.
+
+Thu Sep 18 21:43:23 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
+ Jeff Law <law@cygnus.com>
+
+ * Makefile.in (bootstrap2, bootstrap3): New targets.
+ (all-bootstrap): Remove outdated and confusing target.
+ (bootstrap, bootstrap2, bootstrap3): Don't pass BOOT_CFLAGS down.
+
+Thu Sep 18 15:37:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure (tooldir): enable_gdbtk=YES for cygwin32, NO for
+ windows. Consistent with gdb/configure.
+
+
+1997-09-15 02:37 Ulrich Drepper <drepper@cygnus.com>
+
+ * config/mt-linux: Define CXXFLAGS to make sure -fvtable-thunks is
+ used.
+ * configure.in: Name Linux target fragment.
+
+ * configure: Rewrite so that project Makefile fragment is inserted
+ first and appears last in the resulting Makefile.
+
+Tue Sep 16 09:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (install-itcl): Install tcl first.
+
+Sun Sep 14 20:53:42 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * config/mh-cygwin32: ok to build split texinfo files
+
+Fri Sep 12 16:19:20 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: remove bison from noconfigdirs for Cygwin32 host
+
+Thu Sep 11 16:40:46 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
+
+ * Makefile.in (local-distclean): Also remove mh-frag mt-frag.
+
+ * configure.in (skipdirs): Add target-librx for Linux.
+ (alpha-*-linux*): Use config/mh-elfalphapic and config/mt-elfalphapic.
+
+Wed Sep 10 21:29:54 1997 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (bootstrap): New target.
+
+Wed Sep 10 15:19:22 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub: Accept 'amigados' for backward compatability.
+
+Mon Sep 8 20:46:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.guess: Merge with FSF.
+
+Sun Sep 7 15:55:28 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config.sub: Add "marketing-names" patch.
+
+Fri Sep 5 16:11:28 1997 Joel Sherrill (joel@OARcorp.com)
+
+ * configure.in (*-*-rtems*): Do not build libgloss for rtems.
+
+Fri Sep 5 12:27:17 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub: Handle v850-elf.
+
+Wed Sep 3 12:15:24 1997 Chris Provenzano <proven@cygnus.com>
+
+ * ltconfig: Set CONFIG_SHELL in libtool.
+ * ltmain.sh: Use CONFIG_SHELL instead of /bin/sh
+
+Mon Sep 1 16:45:44 1997 Jim Wilson <wilson@cygnus.com>
+
+ * configure.in (target_subdir): Set to libraries if enable_multilib.
+
+Wed Aug 27 16:15:11 1997 Jim Wilson <wilson@cygnus.com>
+
+ * config.guess: Update from gcc directory.
+
+Tue Aug 26 16:46:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (all-sim): Depends on all-readline.
+
+Wed Aug 20 19:57:37 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (BISON, YACC): Use $$s.
+ (all-bison): Depend on all-texinfo.
+
+Tue Aug 19 01:41:32 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (BISON): Add -L flag.
+ (YACC): Likewise.
+
+Mon Aug 18 11:30:50 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (noconfigdirs): Add support for v850e target.
+
+ * config.sub (maybe_os): Add support for v850e target.
+
+Mon Aug 18 11:30:50 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (noconfigdirs): Add support for v850ea target.
+
+ * config.sub (maybe_os): Add support for v850ea target.
+
+Mon Aug 18 09:24:06 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config.sub: Add mipstx39. Delete r3900.
+
+Mon Aug 18 17:20:10 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (all-autoconf): Depends on all-texinfo.
+
+Fri Aug 15 23:09:26 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config-ml.in ({powerpc,rs6000}*-*-*): Update to current AIX and
+ eabi targets.
+
+Thu Aug 14 14:42:17 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Get CFLAGS and CXXFLAGS from Makefile, if possible.
+
+ * configure: When handling a Canadian Cross, handle YACC as well as
+ BISON. Just set BISON to bison. When setting YACC, prefer bison.
+ * Makefile.in (all-bison): Depend upon all-texinfo.
+
+Tue Aug 12 20:09:48 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (BISON): bison, not byacc or bison -y.
+ (YACC): bison -y or byacc or yacc.
+ (various): Add *-bison as appropriate.
+ (taz): No need to mess with BISON anymore.
+
+Tue Aug 12 22:33:08 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: If OSTYPE matches *win32*, try to find a good value for
+ CONFIG_SHELL.
+
+Sun Aug 10 14:41:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (taz): Get the version number from AM_INIT_AUTOMAKE in
+ configure.in if it is present.
+
+Sat Aug 9 00:58:01 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (LD_FOR_TARGET): Change ld.new to ld-new.
+
+Fri Aug 8 16:30:13 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.sub: Recognize `arc' cpu.
+ * configure.in: Likewise.
+ * config-ml.in: Likewise.
+
+Thu Aug 7 11:02:34 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in ($(INSTALL_X11_MODULES)): Depend upon installdirs.
+
+Wed Aug 6 16:27:29 1997 Chris Provenzano <proven@cygnus.com>
+
+ * configure: Changed sed delimiter from ':' to '|' when
+ attempting to substitute ${config_shell} for SHELL. On
+ NT ${config_shell} may contain a ':' in it.
+
+Wed Aug 6 12:29:05 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): Fix for non-bash shells.
+
+Wed Aug 6 00:42:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (AS_FOR_TARGET): Change as.new to as-new.
+
+Tue Aug 5 14:08:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (NM_FOR_TARGET): Change nm.new to nm-new.
+
+ * ylwrap: If the program is a relative path, force it to be
+ absolute.
+
+Tue Aug 5 12:12:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure (tooldir): Set BISON to `bison -y' and not just bison.
+
+Mon Aug 4 22:59:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (CC_FOR_TARGET): When winsup/Makefile present,
+ correctly specify the target build directory $(TARGET_SUBDIR)/winsup
+ for libraries.
+
+Mon Aug 4 12:40:24 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): Fix handling of macros with values
+ separated by spaces.
+
+Thu Jul 31 19:49:49 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ylwrap: New file.
+ * Makefile.in (DEVO_SUPPORT): Add ylwrap.
+
+ * ltmain.sh: Handle /bin/sh at start of install program.
+
+ * Makefile.in (DEVO_SUPPORT): Add ltconfig, ltmain.sh, and missing.
+
+ * ltconfig, ltmain.sh: New files, from libtool 1.0.
+ * missing: New file, from automake 1.2.
+
+Thu Jul 24 12:57:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Treat tix like tk, putting it in X11_MODULES. Add
+ check-tk to CHECK_X11_MODULES.
+
+Wed Jul 23 17:03:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Merge with FSF.
+
+Tue Jul 22 19:08:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.guess: Merge with FSF.
+
+Tue Jul 22 14:50:42 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * configure: Treat msdosdjgpp like go32.
+ * configure.in: Likewise. Don't remove gprof for go32.
+
+ * configure: Change Makefile.tem2 to Makefile.tm2.
+
+Mon Jul 21 10:31:26 1997 Stephen Peters <speters@cygnus.com>
+
+ * configure.in (noconfigdirs): For alpha-dec-osf*, don't ignore grep.
+
+Tue Jul 15 14:33:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * install-sh (chmodcmd): Set to null if the DST directory already
+ exists. Same as Nov 11th change.
+
+Mon Jul 14 11:01:15 1997 Martin M. Hunt <hunt@cygnus.com>
+
+ * configure (GDB_TK): Needs itcl and tix.
+
+Mon Jul 14 00:32:10 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * config.guess: Update from FSF.
+
+Fri Jul 11 11:57:11 1997 Martin M. Hunt <hunt@cygnus.com>
+
+ * Makefile.in (GDB_TK): Depend on itcl and tix.
+
+Fri Jul 4 13:25:31 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL_PROGRAM_ARGS): New variable.
+ (INSTALL_PROGRAM): Use $(INSTALL_PROGRAM_ARGS).
+ (INSTALL_SCRIPT): New variable.
+ (BASE_FLAGS_TO_PASS): Pass down INSTALL_SCRIPT.
+ * configure.in: If host is *-*-cygwin32*, set INSTALL_PROGRAM_ARGS
+ to -x.
+ * install-sh: Add support for -x option.
+
+Mon Jun 30 15:51:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in, Makefile.in: Treat tix like itcl.
+
+Thu Jun 26 13:59:19 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (WINDRES): New variable.
+ (WINDRES_FOR_TARGET): New variable.
+ (BASE_FLAGS_TO_PASS): Add WINDRES_FOR_TARGET.
+ (EXTRA_HOST_FLAGS): Add WINDRES.
+ (EXTRA_TARGET_FLAGS): Add WINDRES.
+ (EXTRA_GCC_FLAGS): Add WINDRES.
+ ($(DO_X)): Pass down WINDRES.
+ ($(CONFIGURE_TARGET_MODULES)): Set WINDRES when configuring.
+ * configure: Treat WINDRES like DLLTOOL, and WINDRES_FOR_TARGET like
+ DLLTOOL_FOR_TARGET.
+
+Wed Jun 25 15:01:26 1997 Felix Lee <flee@cygnus.com>
+
+ * configure.in: configure sim before gdb for win32-x-ppc
+
+Wed Jun 25 12:18:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ Move gperf into the toplevel, from libg++.
+ * configure.in (target_tools): Add target-gperf.
+ (native_only): Add target-gperf.
+ * Makefile.in (all-target-gperf): New target, depend on
+ all-target-libg++.
+ (configure-target-gperf): Empty rule.
+ (ALL_TARGET_MODULES): Add all-target-gperf.
+ (CONFIGURE_TARGET_MODULES): Add configure-target-gperf.
+ (CHECK_TARGET_MODULES): Add check-target-gperf.
+ (INSTALL_TARGET_MODULES): Add install-target-gperf.
+ (CLEAN_TARGET_MODULES): Add clean-target-gperf.
+
+Mon Jun 23 10:51:53 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub (mn10200): Recognize new basic machine.
+
+Thu Jun 19 14:16:42 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in: Don't set ENABLE_MULTILIB, so we'll be passing
+ --enable-multilib down to subdirs; setting TARGET_SUBDIR was enough.
+
+Tue Jun 17 15:31:20 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in: If we're building mips-sgi-irix6* native, turn on
+ ENABLE_MULTILIB and set TARGET_SUBDIR.
+
+Tue Jun 17 12:20:59 1997 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (all-sn): Depend on all-grep.
+
+Mon Jun 16 11:11:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Use mh-ppcpic and mt-ppcpic for powerpc*-* targets.
+
+ * configure: Set CFLAGS and CXXFLAGS, and substitute them into
+ Makefile. From Jeff Makey <jeff@cts.com>.
+ * Makefile.in: Add comment for CFLAGS and CXXFLAGS.
+
+ * Makefile.in (DISTBISONFILES): Remove.
+ (taz): Don't futz with DISTBISONFILES. Change BISON to use
+ $(DEFAULT_YACC).
+
+ * configure.in: Build itl, db, sn, etc., when building for native
+ cygwin32.
+
+ * Makefile.in (LD): New variable.
+ (EXTRA_HOST_FLAGS): Pass down LD.
+ ($(DO_X)): Likewise.
+
+Mon Jun 16 11:10:35 1997 Philip Blundell <Philip.Blundell@pobox.com>
+
+ * Makefile.in (INSTALL): Use $(SHELL) when executing install-sh.
+
+Fri Jun 13 10:22:56 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in (targargs): Strip out any supplied --build argument
+ before adding our own. Always add --build.
+
+Thu Jun 12 21:12:28 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in (targargs): Pass --build if we're doing
+ a cross-compile.
+
+Fri Jun 6 21:38:40 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure: Use '|' instead of ":" as the seperator in
+ sed. Otherwise sed chokes on NT path names with drive
+ designators. Also look for "?:*" as the leading characters in an
+ absolute pathname.
+
+Mon Jun 2 13:05:20 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config.sub: Support for r3900.
+
+Wed May 21 17:33:31 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Use install-sh, not install.sh.
+
+Wed May 14 16:06:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (taz): Improve check for BISON so it doesn't try to
+ apply it twice.
+
+Fri May 9 17:22:05 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL_MODULES): Put install-opcodes before
+ install-binutils.
+
+Thu May 8 17:29:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Add automake targets.
+ * configure.in (host_tools): Add automake.
+
+Tue May 6 15:49:52 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Default CXX to c++, not gcc.
+ * Makefile.in (CXX): Set to c++, not gcc.
+ (CXX_FOR_TARGET): When cross, transform c++, not gcc.
+
+Thu May 1 10:11:43 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * install-sh: try appending a .exe if source file doesn't
+ exist
+
+Wed Apr 30 12:05:36 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * configure.in: Turn on multilib by default.
+ (cross_only): Remove target-libiberty.
+
+ * Makefile.in (all-gcc): Don't depend on libiberty.
+
+Mon Apr 28 18:39:45 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * config.guess: improve algorithm for recognizing Gnu Hurd x86.
+
+Thu Apr 24 19:30:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (DEVO_SUPPORT): Add mpw-install.
+ (DISTBISONFILES): Add ld/Makefile.in
+
+Tue Apr 22 17:17:28 1997 Geoffrey Noer <noer@pizza.cygnus.com>
+
+ * configure.in: if target is cygwin32 but host isn't cygwin32,
+ don't configure gdb tcl tk expect, not just gdb.
+
+Mon Apr 21 13:33:39 1997 Tom Tromey <tromey@cygnus.com>
+
+ * configure.in: Added gnuserv everywhere sn appears.
+
+ * Makefile.in (ALL_MODULES): Added all-gnuserv.
+ (CROSS_CHECK_MODULES): Added check-gnuserv.
+ (INSTALL_MODULES): Added install-gnuserv.
+ (CLEAN_MODULES): Added clean-gnuserv.
+ (all-gnuserv): New target.
+
+Thu Apr 17 13:57:06 1997 Per Fogelstrom <pefo@openbsd.org>
+
+ * config.guess: Fixes for MIPS OpenBSD systems.
+
+Tue Apr 15 12:21:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL_XFORM): Remove.
+ (BASE_FLAGS_TO_PASS): Remove INSTALL_XFORM.
+
+ * mkinstalldirs: New file, copied from automake.
+ * Makefile.in (installdirs): Rename from install-dirs. Use
+ mkinstalldirs. Change all users.
+ (DEVO_SUPPORT): Add mkinstalldirs.
+
+Mon Apr 14 11:21:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * install-sh: Rename from install.sh.
+ * Makefile.in (INSTALL): Change install.sh to install-sh.
+ (DEVO_SUPPORT): Likewise.
+
+ * configure: Use ${config_shell} with ${moveifchange}. From Thomas
+ Graichen <graichen@rzpd.de>.
+
+Fri Apr 11 16:37:10 1997 Niklas Hallqvist <niklas@appli.se>
+
+ * config.guess: Recognize OpenBSD systems correctly.
+
+Fri Apr 11 17:07:04 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * README, Makefile.in (ETC_SUPPORT): Remove references to
+ cfg-paper*, configure.{texi,man,info*}._
+
+Sun Apr 6 18:47:57 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
+
+ * Makefile.in (all.normal): Ensure that gcc is built after all
+ the x11 - ie gdb - targets.
+
+Tue Apr 1 16:28:50 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * makefile.vms: Don't run conf-a-gas.
+
+Mon Mar 31 16:26:55 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (hppa1.1-*-rtems*): New target, like hppa-*-*elf*.
+
+Sun Mar 30 12:38:27 1997 Fred Fish <fnf@cygnus.com>
+
+ * configure.in: Remove noconfigdirs case since gdb also
+ configures and builds for tic80-coff.
+
+Fri Mar 28 18:28:52 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Set cache_file to config.cache.
+ * Makefile.in (local-distclean): Remove config.cache.
+
+Wed Mar 26 18:49:39 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * COPYING: Update FSF address.
+
+Wed Mar 26 10:38:25 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (tic80-*-*): Remove G++ libraries and libgloss from
+ noconfigdirs.
+
+Mon Mar 24 15:02:39 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (install-dirs): Don't crash if prefix, and hence
+ MAKEDIRS, is empty.
+
+Mon Mar 24 12:40:55 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.sub: Tweak mn10300 entry.
+
+Fri Mar 21 15:35:27 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (host_tools): Put sim before gdb, so gdb's
+ configure.tgt can determine if the simulator was configured.
+
+Sun Mar 16 16:07:08 1997 Fred Fish <fnf@cygnus.com>
+
+ * config.sub: Move BeOS $os case to be with other Cygnus
+ local cases.
+
+Sun Mar 16 01:34:55 1997 Martin Hunt <hunt@cygnus.com>
+
+ * config.sub: Remove misplaced comment that broke Linux.
+
+Sat Mar 15 22:50:15 1997 Fred Fish <fnf@cygnus.com>
+
+ * config.sub: Add BeOS support.
+
+Mon Mar 10 13:30:11 1997 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (CHECK_X11_MODULES): Don't run check-tk.
+
+Wed Mar 5 12:09:29 1997 Martin <hunt@cygnus.com>
+
+ * configure.in (noconfigdirs): Remove tcl and tk from
+ noconfigdirs for cygwin32 builds.
+
+Fri Feb 28 18:20:15 1997 Fred Fish <fnf@cygnus.com>
+
+ * configure.in (tic80-*-*): Remove ld from noconfigdirs.
+
+Thu Feb 27 14:57:26 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (GAS_SUPPORT_DIRS, BINUTILS_SUPPORT_DIRS): Remove
+ make-all.com, use makefile.vms instead.
+
+Tue Feb 25 18:46:14 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config.sub: Accept -lnews*.
+
+Tue Feb 25 13:19:14 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
+
+ * configure.in (noconfigdirs): Disable target-newlib,
+ target-examples and target-libiberty for d30v.
+
+Fri Feb 21 17:56:25 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * configure.in (noconfigdirs): Enable ld for d30v.
+
+Fri Feb 21 20:58:51 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (tic80-*-*): Build compiler.
+
+Sun Feb 16 15:41:09 1997 Andrew Cagney <cagney@critters.cygnus.com>
+
+ * configure.in (d30v-*): Remove sim directory from list of
+ unsupported d30v directories
+
+Tue Feb 18 17:32:42 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config.sub, configure.in: Add d30v target cpu.
+
+Thu Feb 13 22:04:44 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * makefile.vms: New file.
+ * make-all.com: Remove.
+
+Wed Feb 12 12:54:18 1997 Jim Wilson <wilson@cygnus.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): Add LIBGCC2_DEBUG_CFLAGS.
+
+Sat Feb 8 20:36:49 1997 Michael Meissner <meissner@cygnus.com>
+
+ * Makefile.in (all-itcl): The rule is all-itcl, not all-tcl.
+
+Tue Feb 4 11:39:29 1997 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (ALL_MODULES): Added all-db.
+ (CROSS_CHECK_MODULES): Addec check-db.
+ (INSTALL_MODULES): Added install-db.
+ (CLEAN_MODULES): Added clean-db.
+
+Mon Feb 3 13:29:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.guess: Merge with latest FSF sources.
+
+Tue Jan 28 09:20:37 1997 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (ALL_MODULES): Added all-itcl.
+ (CROSS_CHECK_MODULES): Added check-itcl.
+ (INSTALL_MODULES): Added install-itcl.
+ (CLEAN_MODULES): Added clean-itcl.
+
+Thu Jan 23 01:44:27 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: build gdb for mn10200
+
+Fri Jan 17 15:32:15 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (all-target-winsup): Depend on all-target-libio.
+
+Mon Jan 13 22:46:54 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (tic80-*-*): Turn off most targets right now.
+
+Fri Jan 3 16:04:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (MAKEINFO): Check for the existence of the Makefile,
+ rather than the makeinfo program.
+ (do-info): Depend upon all-texinfo.
+
+Tue Dec 31 16:00:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Remove uses of config/mh-linux.
+
+ * config.sub, config.guess: Merge with latest FSF sources.
+
+Fri Dec 27 23:04:33 1996 Fred Fish <fnf@cygnus.com>
+
+ * config.sub (case $basic_machine): Add tic80 entries.
+
+Fri Dec 27 12:07:59 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub, config.guess: Merge with latest FSF sources.
+
+Wed Dec 18 22:46:39 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-build.in: Build ld before gcc, use NewFolderRecursive.
+ * mpw-config.in: Test for NewFolderRecursive.
+ * mpw-install: Use symbolic name for startup filename.
+ * mpw-README: Add various additional details.
+
+Wed Dec 18 13:11:46 1996 Jim Wilson <wilson@cygnus.com>
+
+ * configure.in (mips*-sgi-irix6*): Remove binutils from noconfigdirs.
+
+Wed Dec 18 10:29:31 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Do build gcc and the target libraries for
+ the mn10200.
+
+Wed Dec 4 16:53:05 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: don't avoid building gdb for mn10300 any more
+ * Makefile.in: double-quote GCC_FOR_TARGET line in EXTRA_GCC_FLAGS
+ instead of single-quoting it.
+
+Tue Dec 3 23:26:50 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * configure.in: Don't use --with-stabs on IRIX 6.
+
+Tue Dec 3 09:05:25 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (m32r): Build gdb, libg++ now.
+
+Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.in (mips*-sgi-irix6*): Remove gdb and related
+ directories from noconfigdirs.
+
+Tue Nov 26 11:45:33 1996 Kim Knuttila <krk@cygnus.com>
+
+ * config.sub (basic_machine): added mips16 configuration
+
+Sat Nov 23 19:26:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.sub: Handle d10v-unknown.
+
+Sat Nov 23 10:23:01 1996 Gavin Koch <gavin@cygnus.com>
+
+ * config.sub: Handle v850-unknown.
+
+Thu Nov 21 16:19:44 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.in: add findutils
+ * configure.in: add findutils to list of host_tools
+
+Wed Nov 20 10:09:01 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config.sub: Handle mn10200 and mn10300.
+
+Tue Nov 19 16:35:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (d10v-*): Do not build librx.
+
+Mon Nov 18 13:28:41 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in (mn10300): Build everything except gdb & libgloss.
+
+Wed Nov 13 14:59:46 1996 Per Bothner <bothner@deneb.cygnus.com>
+
+ * config.guess: Patch for Dansk Data Elektronik servers,
+ from Niels Skou Olsen <nso@dde.dk>.
+
+ For ncr, use /bin/uname rather than uname, since GNU uname does not
+ support -p. Suggested by Mark Mitchell <mmitchell@usa.net>.
+
+ Patch for MIPS R4000 running System V,
+ from Eric S. Raymond <esr@snark.thyrsus.com>.
+
+ Fix thinko for nextstep.
+
+ Patch for OSF1 in i?86, from Dan Murphy <dlm@osf.org> via Harlan Stenn.
+
+ Sat Jun 24 18:58:17 1995 Morten Welinder <terra+@cs.cmu.edu>
+ * config.guess: Guess mips-dec-mach_bsd4.3.
+
+ Thu Oct 10 04:07:04 1996 Harlan Stenn <harlan@pfcs.com>
+ * config.guess (i?86-ncr-sysv*): Emit just enough of the minor
+ release numbers.
+ * config.guess (mips-mips-riscos*): Emit just enough of the
+ release number.
+
+ Tue Oct 8 10:37:22 1996 Frank Vance <fvance@waii.com>
+ * config.guess (sparc-auspex-sunos*): Added.
+ (f300-fujitsu-*): Added.
+
+ Wed Sep 25 22:00:35 1996 Jeff Woolsey <woolsey@jlw.com>
+ * config.guess: Recognize a Tadpole as a sparc.
+
+Wed Nov 13 00:53:09 1996 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu>
+
+ * config.guess: Don't assume that NextStep version is either 2 or
+ 3. NextStep 4 (aka OpenStep 4) has come out now.
+
+Mon Nov 11 23:52:03 1996 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu>
+
+ * config.guess: Support Cray T90 that reports itself as "CRAY TS".
+ From Rik Faith <faith@cs.unc.edu>.
+
+Fri Nov 8 11:34:58 1996 David J. MacKenzie <djm@geech.gnu.ai.mit.edu>
+
+ * config.sub: Contributions from bug-gnu-utils to:
+ Support plain "hppa" (no version given) architecture, reported by
+ OpenStep.
+ OpenBSD like NetBSD.
+ LynxOs is not a hardware supplier.
+
+ * config.guess: Contributions from bug-gnu-utils to add support for:
+ OpenBSD like NetBSD.
+ Stratus systems.
+ More Pyramid systems.
+ i[n>4]86 Intel chips.
+ M680[n>4]0 Motorola chips.
+ Use unknown instead of lynx for hardware manufacturer.
+
+Mon Nov 11 10:09:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * install.sh (chmodcmd): Set to null if the DST directory already
+ exists.
+
+Mon Nov 11 10:43:41 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpc*-{eabi,elf,linux,rtem,sysv,solaris}*): Do
+ not use mt-ppc target Makefile fragment any more.
+
+Sun Nov 3 19:17:07 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * configure.in (*-*-windows): Exclude everything but those dirs
+ needed to build windows.
+
+Tue Oct 29 16:41:31 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (all-target-winsup): Depend on all-target-librx.
+
+Mon Oct 28 17:32:46 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * configure.in: Exclude mmalloc from i386-windows.
+ * config/mh-windows: Add rules for building MSVC makefiles.
+
+Thu Oct 24 09:22:46 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * Undo my previous change.
+
+Thu Oct 24 12:12:04 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): Pass down GCC_FOR_TARGET
+ unconditionally.
+ (MAKEOVERRIDES): Define (revert this part of October 18 change).
+
+Thu Oct 24 09:02:07 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * Makefile.in (FLAGS_TO_PASS): Add $(HOST_FLAGS) to allow the
+ host to add it's own flags.
+ * config/mh-windows (HOST_FLAGS): Set srcroot, which is needed
+ for MSVC build procedure.
+
+Tue Oct 22 15:20:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Handle GCC_FOR_TARGET like CC_FOR_TARGET.
+
+Fri Oct 18 13:37:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (CC_FOR_TARGET): Check for xgcc, not Makefile.
+ (CXX_FOR_TARGET): Likewise.
+ (GCC_FOR_TARGET): Define.
+ (BASE_FLAGS_TO_PASS): Remove GCC_FOR_TARGET.
+ (EXTRA_GCC_FLAGS): Define GCC_FOR_TARGET based on whether
+ CC_FOR_TARGET was specified on the command line.
+ (MAKEOVERRIDES): Don't define.
+
+Thu Oct 17 10:27:56 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (m32r): Fix spelling of libg++ libs.
+
+Thu Oct 10 10:37:17 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config.sub (-apple*): Remove, now redundant.
+
+Thu Oct 10 12:30:54 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Don't get confused by CPU-VENDOR-linux-gnu.
+
+ * configure: Rework yesterday's sed script patch.
+
+ * config.sub: Merge with FSF.
+
+Wed Oct 9 17:24:59 1996 Per Bothner <bothner@deneb.cygnus.com>
+
+ * config.guess: Merge from FSF.
+
+ 1996-09-12 Richard Stallman <rms@ethanol.gnu.ai.mit.edu>
+ * config.guess: Use pc instead of unknown, for pc clone systems.
+ Change linux to linux-gnu.
+
+ Mon Jul 15 23:51:11 1996 Karl Heuer <kwzh@gnu.ai.mit.edu>
+ * config.guess: Avoid non-portable tr syntax.
+
+Wed Oct 9 06:06:46 1996 Jeffrey A Law (law@cygnus.com)
+
+ * test-build.mk (HOLES): Add "xargs" for gdb.
+
+ * configure: Avoid hpux10.20 sed bug.
+
+Tue Oct 8 08:32:48 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * configure.in config/mh-windows: Add support for windows host
+ (that is a build done under the Microsoft build environment).
+
+Tue Oct 8 10:39:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Replace all uses of srcroot with s, to shrink
+ command line lengths.
+
+ Patches from Geoffrey Noer <noer@cygnus.com>:
+ * configure.in: If configuring for newlib, pass --with-newlib to
+ subdirectories.
+ * Makefile.in (CC_FOR_TARGET): If winsup/Makefile exists, pass a
+ -Bnewlib/ and -Lwinsup to gcc.
+ (CXX_FOR_TARGET): Likewise.
+
+Mon Oct 7 10:59:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (ETC_SUPPORT): Add configure.
+
+Fri Oct 4 12:22:58 1996 Angela Marie Thomas (angela@cygnus.com)
+
+ * configure.in: Use config/mh-dgux386 for i[345]86-dg-dgux
+ host configuration file.
+
+Thu Oct 3 09:28:25 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Break mn10x00 support into separate
+ mn10200 and mn10300 configurations.
+ * config.sub: Likewise.
+
+Wed Oct 2 22:27:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Add lots of stuff to noconfigdirs for
+ the mn10x00 targets.
+
+ * config.sub, configure.in: Add mn10x00 support.
+
+Wed Oct 2 15:52:36 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ * make-all.com: Call conf-a-gas, not config-a-gas.
+
+Tue Oct 1 01:28:41 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * configure.in (noconfigdirs): Don't build libgloss for arm-coff
+ targets.
+
+Mon Sep 30 14:24:01 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-README: Add much more detail for native PowerMac.
+ * mpw-install: New file.
+ * mpw-configure: Add --norecursion and --help options.
+ * mpw-config.in: Translate readme and install files when
+ copying to objdir.
+ * mpw-build.in: Don't always depend on byacc and flex.
+ (install-only-top): New action.
+
+Fri Sep 27 17:39:44 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * configure.in: You can now configure GDB for the v850.
+
+Tue Sep 24 19:05:12 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.in (noconfigdirs): Don't configure any C++ dirs
+ if targeting D10V.
+
+Tue Sep 17 12:15:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Recognize mips64vr5000.
+
+Mon Sep 16 17:00:52 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Use a single line for host_tools and native_only.
+
+Mon Sep 9 12:21:30 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.sub, configure.in: Add entries for m32r.
+
+Thu Sep 5 13:52:47 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.in (inet-install): Don't run install-gzip.
+
+Wed Sep 4 17:26:13 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * configure.in: Don't config lots of things for *-*-windows*.
+
+Sat Aug 31 11:45:57 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Test for mpw-true, true, and null-command scripts.
+ (host_libs, host_tools): Copy from configure.in.
+ * mpw-configure: Don't complain about directories not found.
+
+Thu Aug 29 16:44:58 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (i[345]86): Recognize i686 for pentium pro.
+ (i[3456]86-*-dgux*): Use config/mh-sysv for the host configuration
+ file.
+
+ * config.guess (i[345]86): Ditto.
+
+Mon Aug 26 18:34:42 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * configure.in (noconfigdirs): Removed gdb for D10V.
+
+Thu Aug 22 17:13:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Remove ld, target-libio, target-libg++, and
+ target-libstdc++ from noconfigdirs.
+
+Wed Aug 21 18:56:38 1996 Fred Fish <fnf@cygnus.com>
+
+ * configure: Fix three locations where shell scripts were
+ being run directly rather than with config_shell.
+
+Tue Aug 20 13:08:47 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * configure.in (v850-*-*): Set up initial $noconfigdirs.
+ * config.sub (basic_machine): Recognize v850.
+
+Thu Aug 15 12:19:33 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Handle multiple enable/disable options and
+ pass them down recursively, handle -c and -s flags appropriately
+ depending on choice of compiler, add escape mechanism for
+ quoted arguments to gC.
+
+Mon Aug 12 13:15:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpc*-*-*): For eabi, system V.4, Linux, and
+ solaris targets, use config/mt-ppc to set C{,XX}FLAGS_FOR_TARGETS
+ so that -mrelocatable-lib and -mno-eabi are used.
+
+ * Makefile.in (CONFIGURE_TARGET_MODULES): If target compiler does
+ not support --print-multi-lib, don't abort.
+
+Sun Aug 11 20:51:50 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * config/mh-cygwin32 (CFLAGS): Define _WIN32 to be compatible
+ with normal Windows compilation environment.
+
+Thu Aug 8 12:18:59 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ * make-all.com: Run config-a-gas.
+ * setup.com: Don't copy subdirectory files around.
+
+Tue Jul 30 17:49:31 1996 Brendan Kehoe <brendan@cygnus.com>
+
+ * configure.in (*-*-ose): Remove exclusion of libgloss for this
+ target, it now compiles correctly.
+
+Sat Jul 27 15:10:43 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Generate Mac include for elf/dwarf2.h.
+
+Tue Jul 23 10:47:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * configure.in (d10v-*-*): Remove ld from $noconfigdirs.
+
+Mon Jul 22 13:28:51 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in (native_only): Add prms.
+
+Mon Jul 22 12:27:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (GAS_SUPPORT_DIRS): Add make-all.com and setup.com.
+ (BINUTILS_SUPPORT_DIRS): Likewise.
+
+Thu Jul 18 12:55:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (d10v-*-*): Don't configure ld or gdb until the
+ d10v support is added.
+
+Wed Jul 17 14:33:09 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * configure.in (d10v-*-*): New target.
+
+Mon Jul 15 11:53:00 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess (HP 9000/811): Recognize this as a PA1.1
+ machine.
+
+Fri Jul 12 23:21:17 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (do-tar-gz): New target, split out from tail end of
+ taz target. Run each command separately, don't use pipes.
+ (taz): Use it.
+
+Fri Jul 12 12:08:04 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Look for g-mpw-make.sed in config/mpw.
+ * mpw-build.in: No builds should depend on building byacc or flex,
+ they are assumed to be installed already.
+
+Fri Jul 12 09:52:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in (CONFIGURE_TARGET_MODULES): Set r environment
+ variable that CC_FOR_TARGET needs.
+
+Thu Jul 11 10:09:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in (CONFIGURE_TARGET_MODULES): Determine if the multlib
+ options have changed since the last time the subdirectory was
+ configured, and if it has, reconfigure.
+ (CLEAN_TARGET_MODULES): Delete multilib.out and tmpmulti.out, which
+ CONFIGURE_TARGET_MODULES uses to remember the old multilib options.
+
+Wed Jul 10 18:56:59 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (ALL_MODULES,CROSS_CHECK_MODULES,INSTALL_MODULES,
+ CLEAN_MODULES): Add bash.
+ (all-bash): New target.
+
+Mon Jul 8 17:33:14 1996 Jim Wilson <wilson@cygnus.com>
+
+ * configure.in (mips-sgi-irix6*): Use mh-irix6 instead of mh-irix5.
+
+Mon Jul 1 13:31:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.sub (basic_machine): Recognize d10v as a valid processor.
+
+Fri Jun 28 12:14:35 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Add support for --bindir.
+ * mpw-build.in: Use a GCC-specific build script for GCC actions.
+
+Wed Jun 26 17:20:12 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: add bash, time, gawk to list of hosttools and things
+ to only build for native toolchains
+
+Tue Jun 25 23:09:03 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (docdir): Remove.
+
+Tue Jun 25 19:00:08 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (datadir): Set to $(prefix)/share.
+
+Mon Jun 24 23:26:07 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: build diff and patch for cygwin32-hosted
+ toolchains.
+
+Mon Jun 24 15:01:12 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
+
+ * config.sub: Accept -rtems*.
+
+Sun Jun 23 22:41:54 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: enable dosrel for cygwin32-hosted builds,
+ remove diff from the list of things not buildable
+ via Canadian Cross
+
+Sat Jun 22 11:39:01 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (TARGET_SUBDIR): Move comment to previous line so we
+ don't get ". ".
+
+Fri Jun 21 17:24:48 1996 Jim Wilson <wilson@cygnus.com>
+
+ * configure.in (mips*-sgi-irix6*): Set noconfigdirs appropriately.
+
+Thu Jun 20 16:57:40 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (taz): Handle case where tex3patch didn't even get
+ checked out. Also, if it was found, put the symlink in a new util
+ subdirectory.
+
+Thu Jun 20 12:20:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.guess (*:Linux:*:*): Add support for PowerPC Linux.
+
+Tue Jun 18 14:24:12 1996 Klaus Kaempf (kkaempf@progis.de)
+
+ * config.sub: Recognize -openvms.
+ * configure.in (alpha*-*-*vms*): Set noconfigdirs.
+ * make-all.com, setup.com: New files.
+
+Mon Jun 17 16:34:46 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (taz): tex3patch moved to texinfo/util.
+
+Sat Jun 15 17:13:25 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure: enable_gdbtk=no for cygwin32-hosted toolchains
+ * configure.in: remove make from disable-if-Can-Cross list
+ enable gdb if ${host} and ${target} are cygwin32
+
+Fri Jun 7 18:16:52 1996 Harlan Stenn <harlan@pfcs.com>
+
+ * config.guess (i?86-ncr-sysv*): Emit minor release numbers.
+ Recognize the NCR 4850 machine and NCR Pentium-based platforms.
+
+Wed Jun 5 00:09:17 1996 Per Bothner <bothner@wombat.gnu.ai.mit.edu>
+
+ * config.guess: Combine mips-mips-riscos cases, and use cpp to
+ distinguish sysv/svr4/bsd variants.
+ Based on a patch from Harlan Stenn <harlan@pfcs.com>.
+
+Fri Jun 7 14:24:49 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * configure.in: Added copyright notice.
+ * move-if-change: Added copyright notice.
+
+Thu Jun 6 16:27:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpcle-*-solaris*): Until we get shared
+ libraries working, don't build gdb, sim, make, tcl, tk, or
+ expect.
+
+Tue Jun 4 20:41:45 1996 Per Bothner <bothner@deneb.cygnus.com>
+
+ * config.guess: Merge with FSF:
+
+ Mon Jun 3 08:49:14 1996 Karl Heuer <kwzh@gnu.ai.mit.edu>
+ * config.guess (*:Linux:*:*): Add guess for sparc-unknown-linux.
+
+ Fri May 24 18:34:53 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+ * config.guess (AViiON:dgux:*:*): Fix typo in recognizing mc88110.
+
+ Fri Apr 12 20:03:59 1996 Per Bothner <bothner@spiff.gnu.ai.mit.edu>
+ * config.guess: Combine two OSF1 rules.
+ Also recognize field test versions. From mjr@zk3.dec.com.
+ * config.guess (dgux): Use /usr/bin/uname rather than uname,
+ because GNU uname does not support -p. From pmr@pajato.com.
+
+Tue Jun 4 11:07:25 1996 Tom Tromey <tromey@csk3.cygnus.com>
+
+ * Makefile.in (MAKEDIRS): Removed $(tooldir).
+
+Tue May 28 12:30:50 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-README: Document GCCIncludes.
+
+Sun May 26 15:16:27 1996 Fred Fish <fnf@cygnus.com>
+
+ * configure.in (alpha-*-linux*): Set enable_shared to yes.
+
+Tue May 21 15:41:39 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Handle --enable-FOO and --disable-FOO.
+
+Mon May 20 10:12:29 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in (*-*-cygwin32): Configure make.
+
+Tue May 7 14:19:42 1996 Tom Tromey <tromey@snuffle.cygnus.com>
+
+ * Makefile.in (inet-install): Quote value of INSTALL_MODULES.
+
+Fri May 3 08:57:17 1996 Tom Tromey <tromey@lisa.cygnus.com>
+
+ * Makefile.in (all-inet): Depend on all-perl.
+
+ * Makefile.in (inet-install): New target.
+
+ * Makefile.in (all-inet): Depend on all-tcl.
+ (all-inet): Depend on all-send-pr.
+
+Tue Apr 30 13:55:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpcle-*-solaris*): Turn off tk and tcl
+ temporarily.
+
+Thu Apr 25 11:48:20 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't configure --with-gnu-ld on AIX.
+
+Thu Apr 25 06:33:36 1996 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * configure.in (powerpcle-*-solaris*): Turn off gdb temporarily.
+
+Tue Apr 23 09:07:39 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.in (ALL_MODULES): Added all-inet.
+ (CROSS_CHECK_MODULES): Added check-inet.
+ (INSTALL_MODULES): Added install-inet.
+ (CLEAN_MODULES): Added clean-inet.
+ (all-indent): New target.
+
+ * configure.in (host_tools): Added inet.
+ (native_only): Added inet.
+ (noconfigdirs): Added inet.
+
+Fri Apr 19 15:35:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't configure libgloss if we are not configuring
+ newlib.
+
+Wed Apr 17 19:30:01 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Don't configure libgloss for unsupported
+ architectures.
+
+Tue Apr 16 11:17:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in (CLEAN_MODULES): Add clean-apache.
+
+Mon Apr 15 15:09:05 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.in (ALL_MODULES): Include all-apache.
+ (CROSS_CHECK_MODULES): Include check-apache.
+ (INSTALL_MODULES): Include install-apache.
+ (all-apache): New target.
+
+ * configure.in: Added apache everywhere perl is seen.
+
+Mon Apr 15 14:59:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in: Add support for clean-{module} and
+ clean-target-{module} rules.
+
+Wed Apr 10 21:37:41 PDT 1996 Marilyn E. Sander <msander@cygnus.com>
+
+ * configure.in (*-*-ose) do not build libgloss.
+
+Mon Apr 8 16:16:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.guess (prep*:SunOS:5.*:*): Turn into
+ powerpele-unknown-solaris2.
+
+Mon Apr 8 14:45:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Permit --enable-shared to specify a list of
+ directories.
+
+Fri Apr 5 08:17:57 1996 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (host==solaris): Pass only the first word of $CC
+ to /usr/bin/which when checking if we're using /usr/ccs/bin/cc.
+
+Fri Apr 5 03:16:13 1996 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): pass down $(MAKE).
+
+Thu Mar 28 14:11:11 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.in (ALL_MODULES): Include all-perl.
+ (CROSS_CHECK_MODULES): Include check-perl.
+ (INSTALL_MODULES): Include install-perl.
+ (ALL_X11_MODULES): Include all-guile.
+ (CHECK_X11_MODULES): Include check-guile.
+ (INSTALL_X11_MODULES): Include install-guile.
+ (all-perl): New target.
+ (all-guile): New target.
+
+ * configure.in (host_tools): Include perl and guile.
+ (native_only): Include perl and guile.
+ (noconfigdirs): Don't build guile and perl; no ports have been
+ done.
+
+Tue Mar 26 21:18:50 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
+
+ * configure (--enable-*): Handle quoted option lists such as
+ --enable-sim-cflags='-g0 -O' better.
+
+Thu Mar 21 11:53:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in ({,inst}all-target): New rule so we can make and
+ install all of the target directories easily.
+
+Wed Mar 20 18:10:57 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * configure.in: Add missing global flag in sed substitution when
+ deleting `target-' from ${configdirs}.
+
+Thu Mar 14 19:15:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (DO_X): Don't get confused if CC contains `=' in an
+ option.
+
+ * configure.in (mips*-nec-sysvr4*): Use a host_makefile_frag of
+ config/mh-necv4.
+
+ * install.sh: Correct misspelling of transformbasename.
+
+ * config.guess: Recognize mips-*-sysv*.
+
+Mon Mar 11 15:36:42 1996 Dawn Perchik <dawn@critters.cygnus.com>
+
+ * config.sub: Recognize mon960.
+
+Sun Mar 10 13:18:38 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Restore Canadian Cross handling of BISON and LEX,
+ removed in Feb 20 change.
+
+Fri Mar 8 20:07:09 1996 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * README: Suggestions from Torbjorn Granlund <tege@matematik.su.se>:
+ Mention make install. Remove the old copyright date as well the
+ clumsy and rather pointless copyright on the README file.
+
+Fri Mar 8 17:51:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in ($(CONFIGURE_TARGET_MODULES)): If there is a
+ Makefile after running symlink-tree, then run `make distclean' to
+ avoid clobbering any generated files in srcdir.
+
+Tue Mar 5 08:21:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (m68k-*-netbsd*): Build everything now.
+
+Wed Feb 28 12:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (taz): Fix quoting.
+
+Tue Feb 27 11:33:57 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * configure.in (sparclet-*-*): Build everything now.
+
+Tue Feb 27 14:31:51 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * configure.in (m68k-*-linux*): New host.
+
+Mon Feb 26 14:32:44 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Check for bison before byacc.
+
+Tue Feb 20 23:12:35 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * Makefile.in configure: Change the way LEX and BISON/YACC are
+ set. configure now defines DEFAULT_LEX and DEFAULT_YACC by
+ searching PATH. These are used as fallbacks by Makefile.in if
+ flex/bison/byacc aren't in objdir.
+
+Mon Feb 19 11:45:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Make everything which depends upon all-bfd also
+ depend upon all-opcodes, in case --with-commonbfdlib is used.
+
+Thu Feb 15 19:50:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (host *-*-cygwin32): Don't build gdb if we are
+ building NT native compilers on Unix.
+
+Thu Feb 15 17:42:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't get CC from the host Makefile fragment if we
+ can find gcc in PATH, or if this is a Canadian Cross. Move the
+ Solaris test for /usr/ucb/cc to the post target script, just after
+ the compiler sanity test.
+
+Wed Feb 14 16:57:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Merge with FSF.
+
+Tue Feb 13 14:27:48 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (RPATH_ENVVAR): New variable.
+ (REALLY_SET_LIB_PATH): Use it.
+ * configure.in: On HP/UX, set RPATH_ENVVAR to SHLIB_PATH.
+
+Mon Feb 12 15:28:49 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config.sub, configure.in: Recognize sparclet cpu.
+
+Mon Feb 12 15:33:59 1996 Christian Bauernfeind <chrisbfd@theorie3.physik.uni-erlangen.de>
+
+ * config.guess: Support m68k-cbm-sysv4.
+
+Sat Feb 10 12:06:42 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config.guess (*:Linux:*:*): Guess m68k-unknown-linux and
+ m68k-unknown-linuxaout from linker help string. Put quotes around
+ $ld_help_string.
+
+Thu Dec 7 09:03:24 1995 Tom Horsley <Tom.Horsley@mail.hcsc.com>
+
+ * config.guess (powerpc-harris-powerunix): Add guess for port
+ to new target.
+
+Thu Feb 8 15:37:52 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * config.guess (UNAME_VERSION): Recognize X4.x as an OSF version.
+
+Mon Feb 5 16:36:51 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: If --enable-shared was used, set SET_LIB_PATH to
+ $(REALLY_SET_LIB_PATH) in Makefile.
+ * Makefile.in (SET_LIB_PATH): New variable.
+ (REALLY_SET_LIB_PATH): New variable.
+ ($(DO_X)): Use $(SET_LIB_PATH).
+ (install.all, gcc-no-fixedincludes, $(ALL_MODULES)): Likewise.
+ ($(NATIVE_CHECK_MODULES), $(CROSS_CHECK_MODULES)): Likewise.
+ ($(INSTALL_MODULES), $(CONFIGURE_TARGET_MODULES)): Likewise.
+ ($(ALL_TARGET_MODULES), $(CHECK_TARGET_MODULES)): Likewise.
+ ($(INSTALL_TARGET_MODULES), $(ALL_X11_MODULES)): Likewise.
+ ($(CHECK_X11_MODULES), $(INSTALL_X11_MODULES)): Likewise.
+ (all-gcc, all-bootstrap, check-gcc, install-gcc): Likewise.
+ (install-dosrel): Likewise.
+ (all-opcodes): Depend upon all-libiberty.
+
+Sun Feb 4 16:51:11 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * config.guess (*:CYGWIN*): New
+
+Sat Feb 3 10:42:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in (all-target-winsup): All all-target-libiberty.
+
+Fri Feb 2 17:58:56 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (noconfigdirs): Add missing # in front of comment.
+
+Thu Feb 1 14:38:13 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: add second pass to things added to noconfigdirs
+ so *-gm-magic can exclude libgloss properly.
+
+Thu Feb 1 11:10:16 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure (extralibs_name, rez_name): Set correctly
+ for MWC68K compiler.
+
+ * mpw-README: Add more info on the necessary build tools.
+
+Thu Feb 1 10:22:38 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in, config.sub: Recognize cygwin32.
+
+Wed Jan 31 14:17:10 1996 Richard Henderson <rth@tamu.edu>
+
+ * config.guess, config.sub: Recognize A/UX.
+
+Wed Jan 31 13:52:14 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Merge with gcc/config.sub.
+
+Thu Jan 25 11:01:10 1996 Raymond Jou <rjou@mexican.cygnus.com>
+
+ * mpw-build.in (do-binutils): Add build of stamps.
+
+Thu Jan 25 17:05:26 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config.sub: Add recognition for mips64vr4100*-* targets.
+
+Wed Jan 24 12:47:55 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * test-build.mk: Add checking of `hpux9' rather than just `hpux'.
+ Add creation of gconfigargs with `--enable-shared' turned on.
+ ($(host)-stamp-stage2-configured): Pass $(gconfigargs).
+ ($(host)-stamp-stage3-configured): Likewise.
+ (HOLES): Add chatr and ldd.
+ (i386-ncr-sysv4.3*): Add use of /usr/ccs/bin in the PATH and HOLE_DIRS.
+
+Wed Jan 24 20:32:30 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
+
+ * configure: Pass --nfp to recursive configures.
+
+Mon Jan 22 10:41:56 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in (DLLTOOL): New.
+ (DLLTOOL_FOR_TARGET): New.
+ (EXTRA_HOST_FLAGS): Pass down DLLTOOL.
+ (EXTRA_TARGET_FLAGS): Ditto.
+ (EXTRA_GCC_FLAGS): Ditto.
+ (CONFIGURE_TARGET_MODULES): Ditto.
+ (DO_X): Ditto.
+ * configure: Add DLLTOOL.
+
+Fri Jan 19 13:30:15 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ SCO OpenServer 5 changes from Robert Lipe <robertl@dgii.com>:
+ * configure.in (i[345]86-*-sco3.2v5*): Use mh-sysv instead of
+ mh-sco, since old workarounds no longer needed, and don't
+ build ld, since libraries have weak symbols in COFF.
+
+Sun Jan 14 23:01:31 1996 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (CONFIGURE_TARGET_MODULES): Add missing ';'.
+
+Fri Jan 12 15:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Make sure that ${CC} can be used to compile an
+ executable.
+
+Sat Jan 6 07:23:33 1996 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * Makefile.in (all-gdb): Depend on $(GDB_TK).
+ * configure (GDB_TK): Set GDB_TK to either "all-tcl all-tk" or
+ nothing depending on whether gdbtk is being built.
+
+Wed Jan 3 17:54:41 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (newlib.tar.gz): Delete building of newlib's info files.
+
+Mon Jan 1 19:09:14 1996 Brendan Kehoe <brendan@rtl.cygnus.com>
+
+ * configure.in (noconfigdirs): Put ld or gas in this early, if the
+ user specifically used --with-gnu-ld=no or --with-gnu-as=no.
+
+Sat Dec 30 16:08:57 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config-ml.in: Add support for
+ --disable-{softfloat,m68881,m68000,m68020} on m68*-*-*.
+ Simplify setting of multidirs from --disable-foo.
+
+Fri Dec 29 07:56:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Makefile.in (EXTRA_GCC_FLAGS): If any of the make variables
+ LANGUAGES, BOOT_CFLAGS, STMP_FIXPROTO, LIMITS_H_TEST,
+ LIBGCC1_TEST, LIBGCC2_CFLAGS, LIBGCC2_INCLUDES, and ENQUIRE are
+ non-empty, pass them on to the GCC make.
+ (all-bootstrap): New rule that is like all-gcc, except it executes
+ the GCC bootstrap rule instead of the GCC all rule.
+
+Wed Dec 27 15:51:48 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config-ml.in (ml_realsrcdir): New, to account for ${subdir}.
+
+Tue Dec 26 11:45:31 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.guess (AViiON:dgux:*:*): Update from FSF to add pentium
+ DG/UX support.
+
+Fri Dec 15 10:01:27 1995 Stan Cox <coxs@dg-rtp.dg.com>
+
+ * config.sub (i*86*) Change [345] to [3456]
+
+Wed Dec 20 17:41:40 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in (noconfigdirs): Add gas or ld if --with-gnu-as=no or
+ --with-gnu-ld=no.
+
+Wed Dec 20 15:15:35 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config-ml.in (rs6000*, powerpc*): Add switches to control which
+ AIX multilibs get built.
+
+Mon Dec 18 17:55:46 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (i386-win32): Don't build expect if we're not
+ building the tcl subdir.
+
+Mon Dec 18 11:47:19 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * Makefile.in: (configure-target-examples, all-target-examples):
+ New targets, configure and build example programs.
+
+Fri Dec 15 16:13:03 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: If an mpw-config.in generated a file mk.sed,
+ use it as input to sedit the generated MPW makefile.
+ * mpw-README: Add a suggestion about Gestalt.h.
+
+Wed Dec 13 16:43:51 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Accept *-*-ieee*.
+
+Tue Dec 12 11:52:57 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (local-distclean): Remove $(TARGET_SUBDIR). From
+ Ronald F. Guilmette <rfg@monkeys.com>.
+
+Mon Dec 11 15:31:58 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (host==powerpc-pe): Add many directories to noconfigdirs
+ for powerpc-pe native.
+ (target==i386-win32): add tcl, make to noconfigdirs if canadian cross.
+ (target==powerpc-pe): duplicate i386-win32 entry.
+
+Sat Dec 9 14:58:28 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * configure.in (noconfigdirs): Exclude target-newlib for all versions
+ of vxworks, not just vxworks5.1.
+
+Mon Dec 4 12:05:40 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Add support for exec-prefix.
+
+Mon Dec 4 10:22:50 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * config.guess: Recognize HP model 816 machines as having
+ a PA1.1 processor.
+
+Mon Dec 4 12:38:15 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Ignore new autoconf configure options.
+
+Thu Nov 30 14:45:25 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config/mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler
+ defaults to K&R mode, but doesn't have varargs.h, so we have to
+ compile in ANSI mode.
+
+Thu Nov 30 16:57:33 1995 Per Bothner <bothner@wombat.gnu.ai.mit.edu>
+
+ * config.guess: Recognize Pentium under SCO.
+ From Robert Lipe <robertl@arnet.com>.
+
+Wed Nov 29 13:49:08 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (noconfigdirs): Disable target-libio on v810-*-*.
+ * config/mt-v810 (CC_FOR_TARGET, AS_FOR_TARGET, AR_FOR_TARGET,
+ RANLIB_FOR_TARGET): Set as appropriate for NEC v810 toolchain.
+
+Wed Nov 29 12:12:01 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't configure gas for alpha-dec-osf*.
+
+Tue Nov 28 17:16:48 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Default to --with-stabs for some targets for which
+ it makes sense: mips*-*-*, alpha*-*-osf*, i[345]86*-*-sysv4* and
+ i[345]86*-*-unixware*.
+
+Mon Nov 27 13:44:15 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config-ml.in: Get list of multidirs using gcc --print-multi-lib
+ rather than basing it on the target. Simplify handling of options
+ controlling which directories to configure. Remove extraneous
+ slash in multi-clean target.
+
+Fri Nov 24 17:29:29 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * config-ml.in: Prefix more variables with ml_ so they don't collide
+ with configure's.
+
+Wed Nov 22 11:27:02 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Don't turn -v into --v.
+
+Tue Nov 21 16:48:02 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * configure.in (targargs): Fix typo.
+
+ * Makefile.in (DEVO_SUPPORT): Add symlink-tree.
+
+Tue Nov 21 14:08:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Strip --host and --target options from
+ CONFIG_ARGUMENTS, and always configure for --host only. Add
+ --with-cross-host option when building with a cross-compiler.
+ * configure: Canonicalize the arguments put into config.status by
+ always using `=' for an option with an argument. Pass a presumed
+ --host or --target explicitly.
+
+Fri Nov 17 17:50:30 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config.sub: Merge -macos*, -magic*, -pe*, and -win32 cases
+ into general OS recognition case.
+
+Fri Nov 17 17:42:25 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (target_configdirs): add target-winsup only
+ for win32 target systems.
+
+Thu Nov 16 14:04:47 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (all-target-libgloss): Depend upon
+ configure-target-newlib, since when libgloss is built it looks to
+ see if the newlib directory exists.
+
+Wed Nov 15 14:47:52 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (DEVO_SUPPORT): Use config-ml.in instead of
+ cfg-ml-*.in.
+
+Wed Nov 15 11:45:23 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Handle LD and LD_FOR_TARGET when configuring a
+ Canadian Cross.
+
+Tue Nov 14 15:03:12 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * config/mh-i386win32: add LD_FOR_TARGET.
+
+Tue Nov 14 14:56:11 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (target_libs): add target-winsup.
+ (target==i386-win32): add patch diff flex make to $noconfigdirs.
+ (target==ppcle-pe): remove ld from $noconfigdirs.
+
+Tue Nov 14 01:25:50 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (CONFIGURE_TARGET_MODULES): Pass --with-target-subdir.
+ Preserve relative path names in $srcdir. Build symlink tree if
+ configuring cross target dir and srcdir=. (= no VPATH support).
+ (configure-target-libg++): Depend on configure-target-librx.
+ * cfg-ml-com.in, cfg-ml-pos.in: Deleted.
+ * config-ml.in: New file.
+ * symlink-tree: New file.
+ * configure: Ensure srcdir="." if that's what it is.
+
+Mon Nov 13 12:34:20 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-README: Clarify some phrasing, add notes about CodeWarrior
+ includes and FLEX_SKELETON setting.
+ * mpw-configure (--with-gnu-ld): New option, controls whether
+ to use PPCLink or ld with PowerMac GCC.
+ * mpw-build.in (all-grez, do-grez, install-grez): New targets.
+ * mpw-config.in: Configure grez if targeting Mac.
+
+ * config.sub: Accept pmac and pmac-mpw as names for PowerMacs,
+ accept mpw and mac-mpw as names for m68k Macs, change macos7 to
+ just macos.
+ * configure.in: Configure grez resource compiler if targeting Mac.
+ * Makefile.in (all-grez, install-grez): New targets.
+
+Wed Nov 8 17:33:51 1995 Jason Merrill <jason@yorick.cygnus.com>
+
+ * configure: CXX defaults to gcc, not g++. If we find
+ gcc in the path, set CC to gcc -O2.
+
+Tue Nov 7 15:45:17 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Default ${build} correctly. Avoid picking up extra
+ spaces when reading CC and CXX from Makefile. When doing a
+ Canadian Cross, use plausible default values for numerous
+ variables.
+ * configure.in: When doing a Canadian Cross, don't try to
+ configure tools whose configure script can't handle it.
+
+Mon Nov 6 19:32:17 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * cfg-ml-com.in (sh-*-*): Add m2 and ml/m2 to multidirs.
+
+Sun Nov 5 00:15:41 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * configure: Remove dubious bug reporting address.
+
+Fri Nov 3 08:17:54 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in ($(CONFIGURE_TARGET_MODULES)): If subdir has
+ configure script, run that instead of this directory's configure.
+ In either case, print a message that we're configuring the sub-dir.
+
+Thu Nov 2 23:23:36 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * configure.in: Before checking for the existence of various files,
+ use sed to filter out "target-".
+
+Thu Nov 2 13:24:56 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (DO_X): Split rule to decrease command line length
+ for systems with small ARG_MAX values. From phdm@info.ucl.ac.be
+ (Philippe De Muyter).
+
+Wed Nov 1 15:18:35 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in (all-patch): depend on all-libiberty.
+
+Wed Nov 1 12:23:20 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: If the only directory in target_configdirs which
+ actually exists is libiberty, then set target_configdirs to empty,
+ to avoid trying to build a target libiberty in a gas or gdb
+ distribution.
+
+Tue Oct 31 17:52:39 1995 J.T. Conklin <jtc@slave.cygnus.com>
+
+ * configure.in (host_makefile_frag): Use m68k-sun-sunos* instead
+ of m68k-sun-* when selecting mh-sun3 to avoid matching NetBSD/sun3
+ systems.
+
+Tue Oct 31 16:57:32 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * configure.in (copy_dirs): Use sys-include instead of include
+ for --with-headers option.
+
+Tue Oct 31 10:29:36 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in, configure.in: Make winsup builds work with
+ new scheme.
+
+Mon Oct 30 18:57:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Build the linker on AIX.
+
+Mon Oct 30 12:27:16 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Add $(TARGET_SUBDIR)
+ where needed.
+
+Mon Oct 30 12:45:25 1995 Doug Evans <dje@cygnus.com>
+
+ * Makefile.in (all-gcc): Fix typo.
+
+Sat Oct 28 10:27:59 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in ($(CHECK_TARGET_MODULES)): Fix typo.
+
+Fri Oct 27 23:14:12 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * configure.in: Rename libFOO to target-libFOO, and xiberty
+ to target-xiberty, to provide more flexibility.
+ (target_subdir): Define. Create if cross.
+ Set TARGET_SUBDIR in Makefile to ${target_subdir}.
+ * Makefile.in: Rename all-libFOO -> all-target-libFOO, all-xiberty
+ -> all-target-libiberty, configure-libFOO -> configure-target-libFOO,
+ check-libFOO -> check-target-libFOO, etc.
+ ($(DO_X)): Iterate over TARGET_CONFIGDIRS after SUBDIRS.
+ ($(CONFIGURE_TARGET_MODULES), $(CHECK_TARGET_MODULES),
+ $(ALL_TARGET_MODULES), $(INSTALL_TARGET_MODULES)): Update accordingly.
+ (configure-target-XXX): Depend on $(ALL_GCC), not all-gcc, to
+ allow ALL_GCC="" to only configure.
+ (DEVO_SUPPORT): Add cfg-ml-com.in and cfg-ml-pos.in.
+ (ETC_SUPPORT, ETC_SUPPORT_PFX): Merge; update 'taz' accordingly.
+ (LIBGXX_SUPPORT_DIRS): Remove xiberty.
+
+Sat Oct 28 01:53:49 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (taz): Build "info" in etc explicitly.
+
+Fri Oct 27 09:32:30 1995 Stu Grossman (grossman@cygnus.com)
+
+ * configure.in: Make sure that CC is undefined (as opposed to
+ null) if toplevel/config/mh-{host} doesn't define it. Fixes a
+ problem with autoconf trying to configure on a host without GCC.
+
+Thu Oct 26 22:35:01 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Set host alias from choice of host compiler,
+ only use generic MPW Makefile sed if present, edit a file
+ named "hacked_Makefile.in" instead of "Makefile.in" if present.
+ * mpw-README: Add problem notes about CW6 and CW7.
+
+Thu Oct 26 05:45:10 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
+
+ * Makefile.in (taz): Use ";" instead of ";;".
+
+Wed Oct 25 15:18:24 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in (taz): Grep for '^diststuff:' or '^info:' in
+ sub-directory Makefiles, instead of using DISTSTUFFDIRS and
+ DISTDOCDIRS.
+ (DISTSTUFFDIRS, DISTDOCDIRS): Removed - no longer used.
+ (newlib.tar.gz): Don't pass DISTDOCDIRS to recursive make.
+
+Wed Oct 25 14:43:55 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in (DISTDOCDIRS): Remove ld gprof bnutils gas libg++ gdb
+ and gnats, because they are now subsumed by DISTSTUFFDIRS.
+ Move bfd to DISTSTUFFDIRS.
+
+Tue Oct 24 18:19:09 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in (X11_LIB): Removed.
+ (X11_FLAGS_TO_PASS): pass only X11_EXTRA_CFLAGS and X11_EXTRA_LIBS.
+
+ * configure.in (host_makefile_frag): mh-aix & mh-sun removed.
+
+Sun Oct 22 13:04:42 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * cfg-ml-com.in (powerpc*): Shorten some of the multilib directory
+ names.
+
+Fri Oct 20 18:02:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * cfg-ml-com.in (powerpc*-eabi*): Add mcall-aixdesc varients.
+
+Thu Oct 19 10:40:57 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * configure.in (i[345]86-*-win32): Always build newlib.
+ Don't configure cvs, autoconf or texinfo.
+ * Makefile.in (LD_FOR_TARGET): New.
+ (BASE_FLAGS_TO_PASS, EXTRA_TARGET_FLAGS, CONFIGURE_TARGET_MODULES):
+ Pass down LD_FOR_TARGET.
+
+Wed Oct 18 15:53:56 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * winsup: New directory.
+ * Makefile.in: Build winsup.
+ * configure.in: Winsup is configured when target is win32.
+ Can only build win32 target GDB when native.
+
+Mon Oct 16 09:42:31 1995 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess: Recognize HP model 819 machines as having
+ a PA 1.1 processor.
+
+Mon Oct 16 10:49:43 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Fix sed loop which substitutes for CC and CXX to
+ avoid bug found in various sed implementations.
+
+Wed Oct 11 16:16:20 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * cfg-ml-com.in (powerpc-*-eabisim): Delete separate rule for
+ simulator. Use standard powerpc-*-eabi*.
+
+Mon Oct 9 17:21:56 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Stop putting gas and binutils in noconfigdirs for
+ powerpc-*-aix* and rs6000-*-*.
+
+Mon Oct 9 12:38:40 1995 Michael Meissner <meissner@cygnus.com>
+
+ * cfg-ml-com.in (powerpc*-*-eabisim*): Add support for building
+ -mcall-aixdesc libraries.
+
+Fri Oct 6 16:17:57 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config.sub (arm | armel | armeb): Fix shell syntax.
+
+Fri Oct 6 14:40:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * cfg-ml-com.in ({powerpc,rs6000}-ibm-aix*): Add multilibs for
+ -msoft-float and -mcpu=common support.
+ (powerpc*-*-eabisim*): Add support for building -mcall-aix
+ libraries.
+
+Thu Oct 5 13:26:37 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in: Allow configuration and build of emacs19 for the alpha.
+
+Wed Oct 4 22:05:36 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (CC): Get ^CC, not just any old CC, from
+ ${host_makefile_frag}.
+
+Wed Oct 4 21:55:00 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (CC): Try to get CC from
+ ${srcdir}/${host_makefile_frag}, not ${host_makefile_frag}.
+
+Wed Oct 4 21:44:12 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in (TARGET_CONFIGDIRS): configure targetdirs
+ only if it exists in $(srcdir).
+
+Wed Oct 4 11:52:31 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: If CC and CXX are not set in the environment, set
+ them, based on either an existing Makefile or on searching for gcc
+ in PATH. Substitute for CC and CXX in Makefile.
+ * configure.in: Remove libm from target_libs. Separate
+ target_configdirs from configdirs. If CC is not set in
+ environment, try to get it from a host Makefile fragment. Rewrite
+ changes of configdirs to use skipdirs instead. A few minor
+ tweaks. Take directories out of target_configdirs as they are
+ taken out of configdirs. Remove existing Makefile files from
+ subdirectories. Substitute for TARGET_CONFIGDIRS and
+ CONFIG_ARGUMENTS in Makefile.
+ * Makefile.in (TARGET_CONFIGDIRS): New variable, automatically set
+ by configure.in.
+ (CONFIG_ARGUMENTS): Likewise.
+ (CONFIGURE_TARGET_MODULES): New variable.
+ ($(DO_X)): Loop over TARGET_CONFIGDIRS as well as SUBDIRS.
+ ($(CONFIGURE_TARGET_MODULES)): New target.
+ (configure-libg++, configure-libio): New targets.
+ (all-libg++): Depend upon configure-libg++.
+ (all-libio): Depend upon configure-libio.
+ (configure-libgloss, all-libgloss): New targets.
+ (configure-libstdc++): New target.
+ (all-libstdc++): Depend upon configure-libstdc++.
+ (configure-librx, all-librx): New targets.
+ (configure-newlib): New target.
+ (all-newlib): Depend upon configure-newlib
+ (configure-xiberty): New target.
+ (all-xiberty): Depend upon configure-xiberty.
+
+Sat Sep 30 04:32:59 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (host i[345]86-*-win32): Expand the
+ noconfigdirs again.
+
+Thu Sep 28 21:18:49 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-configure: Fix sed command file name.
+
+Thu Sep 28 17:39:56 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * configure.in (host i[345]86-*-win32): Reduce the
+ noconfigdirs again.
+
+Wed Sep 27 12:24:00 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't configure ld and gdb for powerpc*-*-winnt*
+ or powerpc*-*-pe*, since they are not yet supported.
+
+Tue Sep 26 14:30:01 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ Add PowerMac support and many other enhancements.
+ * mpw-configure: New option --cc to select compiler to use,
+ paste options set according to --cc into the generated
+ Makefile, generate the Makefile by sed'ing the Unix Makefile.in
+ if mpw-make.sed is present.
+ * mpw-config.in: Don't test for gC1, test for mpw-touch,
+ add forward includes for PowerPC include files.
+ * mpw-build.in: Build using Makefile.PPC if present.
+ (do-byacc, etc): Remove separate version resource builds.
+ (do-gas): Build "stamps" before "all".
+ (do-gcc): Build "stamps-h" and "stamps-c" before "all".
+ * mpw-README: Update to reflect --cc option, PowerMac support,
+ and recently-reported compatibility problems.
+
+Fri Sep 22 12:15:42 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * cfg-ml-com.in (m68*-*-*): Only build multilibs for
+ embedded m68k systems (-aout, -coff, -elf, -vxworks).
+ (--with-multilib-top): Pass to recursive invocations.
+
+Tue Sep 19 13:51:05 1995 J.T. Conklin <jtc@blues.cygnus.com>
+
+ * configure.in (noconfigdirs): Disable libg++ and libstdc++ on
+ v810-*-*.
+
+Mon Sep 18 23:08:26 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (noconfigdirs): Disable bfd, binutils, gas, gcc,
+ gdb, ld and opcodes on v810-*-*.
+
+Sat Sep 16 18:31:08 PDT 1995 Angela Marie Thomas <angela@cygnus.com>
+
+ * config/mh-ncrsvr43: Removed AR_FLAGS
+
+Tue Sep 12 18:03:31 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (DO_X): Change do-realclean to do-maintainer-clean.
+ (local-maintainer-clean): New target.
+ (maintainer-clean): New target.
+ (realclean): Just depend upon maintainer-clean.
+
+Fri Sep 8 17:11:14 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (noconfigdirs): Disable gdb on m68k-*-netbsd*.
+
+Fri Sep 8 16:46:29 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Build ld in mips*-*-bsd* case.
+
+Thu Sep 7 20:03:41 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config.sub: Accept -lites* OS. From Ian Dall.
+
+Fri Sep 1 08:06:58 1995 James G. Smith <jsmith@beauty.cygnus.com>
+
+ * config.sub: recognise mips64vr4300 and mips64vr4300el as valid
+ targets.
+
+Wed Aug 30 21:06:50 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in: treat i386-win32 canadian cross the same as
+ i386-go32 canadian cross.
+
+Thu Aug 24 14:53:20 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * cfg-ml-com.in (powerpc*-*-eabisim): Add support for PowerPC
+ running under the simulator to build a reduced set of libraries.
+ (powerpc-*-eabiaix): Add fine grained multilib support added to
+ other powerpc targets yesterday.
+
+Wed Aug 23 09:41:56 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * cfg-ml-com.in (powerpc*): Add support for -disable-biendian,
+ -disable-softfloat, -disable-relocatable, -disable-aix, and
+ -disable-sysv to control which multilib libraries get built.
+
+Thu Aug 17 16:03:41 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * configure: Add Makefile.tem to list of files to remove in trap
+ handler.
+
+Mon Aug 14 19:27:56 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * config.guess (*Linux*): Add missing "exit"s.
+ Also, need specific check for alpha-unknown-linux (uses COFF).
+
+Fri Aug 11 15:38:20 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * config.guess: Merge with FSF:
+
+ Wed Jun 28 17:57:27 1995 David Edelsohn <edelsohn@mhpcc.edu>
+ * config.guess (AIX4): More robust release numbering discovery.
+
+ Thu Jun 22 19:01:24 1995 Kenneth Stailey (kstailey@eagle.dol-esa.gov)
+ * config.guess (i386-sequent-ptx): Properly get version number.
+
+ Thu Jun 22 18:36:42 1995 Uwe Seimet (seimet@iris1.chemie.uni-kl.de)
+ * config.guess (mips:*:4*:UMIPS): New case.
+
+Mon Aug 7 09:21:35 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (i386-go32 host): Fix typo (deja-gnu -> dejagnu).
+ (i386-win32 host): Likewise. Don't build readline.
+
+Sat Aug 5 09:51:49 1995 Fred Fish <fnf@rtl.cygnus.com>
+
+ * Makefile.in (GDBTK_SUPPORT_DIRS): Define and pass as part of
+ SUPPORT_FILES to submakes.
+
+Fri Aug 4 13:04:36 1995 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (GDB_SUPPORT_DIRS): Add utils.
+ (DEVO_SUPPORT): Add mpw-README, mpw-build.in, mpw-config.h and
+ mpw-configure.
+
+Wed Aug 2 16:32:40 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * configure.in (appdirs): Use =, not ==, in test expression when
+ trying to build the text to print in the warning message for
+ Solaris users.
+
+Mon Jul 31 09:56:18 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * cfg-ml-com.in (z8k-*-coff): Add 'std' multilib build.
+
+Fri Jul 28 00:16:31 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * config.guess: Recognize lynx-2.3.
+
+Thu Jul 27 15:47:59 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * config.sub (z8ksim): Deleted
+ (z8k-*-coff): New, this is the one true name of the target.
+
+Thu Jul 27 14:33:33 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * cfg-ml-pos.in (dotdot): Work around SunOS sed bug.
+
+Thu Jul 27 13:31:05 1995 Fred Fish (fnf@cygnus.com)
+
+ * config.guess (*:Linux:*:*): First try asking the linker what the
+ default object file format is (elf, aout, or coff). Then if this
+ fails, try previous methods.
+
+Thu Jul 27 11:28:17 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in: Don't build newlib for *-*-vxworks5.1.
+
+Thu Jul 27 11:18:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in: Don't build newlib for a29k-*-vxworks5.1.
+ * test-build.mk: Add setting of --with-headers for a29k-vxworks5.1.
+
+Tue Jul 25 21:25:39 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * cfg-ml-pos.in (MULTITOP): Trim excess trailing "/.".
+
+Fri Jul 21 10:41:12 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * cfg-ml-com.in: New file.
+ * cfg-ml-pos.in: New file.
+
+Wed Jul 19 00:37:27 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * COPYING.NEWLIB: Add HP free copyright to list.
+
+Tue Jul 18 10:58:51 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.sub: Recognize -eabi* for the system, not just -eabi.
+
+Mon Jul 3 13:44:51 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * Makfile.in (DLLTOOL_FOR_TARGET): New name, pass it down.
+ * config.sub, configure.in (win32): New target and host.
+
+Wed Jun 28 23:57:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in: Add i386-pe configuration.
+
+Fri Jun 23 14:28:44 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-build.in (install): Install GDB after LD.
+
+Thu Jun 22 17:10:53 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in (elf/mips.h): Always forward-include, needed
+ for GDB to build.
+
+Wed Jun 21 15:17:30 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testsuite: New directory for customer acceptance and whole tool
+ chain tests.
+
+Wed Jun 21 16:50:29 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * configure: If per-host line isn't found, but AC_OUTPUT is found
+ and a configure script exists, run it instead.
+
+Thu Jun 15 21:09:24 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * config.guess: Update from FSF, for alpha-dec-winnt3.5 and Crays.
+
+Tue Jun 13 21:43:27 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure: Set build_{cpu,vendor,os,alias} to host values when
+ --build isn't specified.
+
+Mon Jun 5 18:26:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
+
+ * Makefile.in (PICFLAG, PICFLAG_FOR_TARGET): New macros.
+ (FLAGS_TO_PASS): Pass them.
+ (EXTRA_TARGET_FLAGS): Ditto.
+
+ * config/m?-*pic: Define PICFLAG* instead of LIB*FLAGS*.
+
+Wed May 31 22:27:42 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * Makefile.in (all-libg++): Depend on all-libstdc++.
+
+Thu May 25 22:40:59 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (noconfigdirs): Enable all packages for
+ i386-unknown-netbsd.
+
+Sat May 20 13:22:31 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
+
+ * configure.in (noconfigdirs): Don't configure tk for i386-go32
+ hosted builds (DOS builds)
+
+Thu May 18 18:08:49 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ Changes for ARM based on patches from Richard Earnshaw:
+ * config.sub: Handle armeb and armel.
+ * configure.in: Omit arm linker only for riscix.
+
+Thu May 11 17:23:26 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * config.guess: Update from FSF.
+
+Tue May 9 15:52:05 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config.sub: Recognize powerpcle as the little endian varient of
+ the PowerPC. Recgonize ppc as a PowerPC variant, and ppcle as a
+ powerpcle variant. Convert pentium into i586, not i486. Add p5
+ alias for i586. Map new x86 variants p6, k5, nexgen into i586
+ temporarily.
+
+Tue May 2 16:29:41 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * configure.in (hppa*-*-lites*): Treat like hppa*-*-*elf*.
+
+Sun Apr 30 21:38:09 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config.sub: Accept -lites* as a basic system type.
+
+Thu Apr 27 11:33:29 1995 Michael Meissner (meissner@cygnus.com)
+
+ * config.guess (*:Linux:*:*): Check for whether the pre-BFD linker is
+ installed, and if so return linuxoldld as the system name.
+
+Wed Apr 26 10:59:02 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config.guess: Add hppa1.1-hp-lites support.
+
+Tue Apr 25 11:08:11 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure.in: Don't build newlib for m68k-vxworks5.1.
+
+Wed Apr 19 17:02:43 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * configure.in (mips-sgi-irix6): Use mh-irix5.
+
+Fri Apr 14 15:21:17 1995 Doug Evans <dje@chestnut.cygnus.com>
+
+ * Makefile.in (all-gcc): Depend on all-ld (for libgcc1-test).
+
+Wed Apr 12 16:06:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
+
+ * test-build.mk: Enable building of shared libraries on IRIX 5 and
+ OSF/1. Fix compiler flags.
+ * build-all.mk: Support Linux and OSF/1 3.0. Fix compiler flags.
+
+Tue Apr 11 18:55:40 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in: Recognize --with-newlib.
+ (sparc-*-sunos4*): Build sim, dejagnu, expect, tcl if cross target.
+
+Mon Apr 10 14:38:20 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in: move {all,check,install}-gdb from *_MODULES
+ to *_X11_MODULES due to gdbtk needing X include files et al.
+
+Mon Apr 10 11:42:22 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ Merge in support for Mac MPW as a host.
+ (Old change descriptions retained for informational value.)
+
+ * mpw-config.in: Add generic include forwards for cpu-specific
+ include files in aout and elf directories.
+
+ * mpw-configure: Added copyright.
+ * mpw-config.in: Check for presence of required build tools.
+ (target_libs): Add newlib.
+ (target_tools): Add examples.
+ (Read Me): Generate as "Read Me for MPW" instead.
+ * mpw-build.in: Base sub-builds on all-foo instead of do-foo.
+ (all-byacc, do-byacc, all-flex, do-flex, do-newlib): New actions.
+ (do-gas, do-gcc, do-gdb, do-ld): Build Version.r first.
+
+ * mpw-configure: Remove subdir-specific makefile hackery,
+ delete mk.tmp after using it.
+
+ * mpw-build.in (all): Display start and end times.
+
+ * mpw-configure (host_canonical): Set.
+ (target_cpu): Always add to makefiles.
+ (ARCHDEFS, EMUL): Add to makefile only if nonempty.
+ (TM_FILE, XM_FILE, NM_FILE): No longer add to makefile.
+ (mpw-mh-mpw): Look for in srcdir and srcroot.
+ Use sed instead of mpw-edit-prefix to edit prefix definitions.
+
+ * mpw-build.in: (install-only): New target.
+
+ * mpw-configure (host_alias, target_alias): Rename from hostalias
+ and targetalias, add into generated Makefile.
+ (mk.tmp): If present, add into generated Makefile.
+ * mpw-build.in (all-gas): Build config.h first before gas proper.
+
+ * mpw-configure (config.status): Write only if changed.
+ * mpw-config.in (readline): Configure it (not built, just used for
+ definitions).
+
+ * mpw-config.in (elf/mips.h): Add a forward include.
+
+ * mpw-config.in: Forward-include most .h files in include into
+ extra-include.
+ (readline): Don't build.
+ mpw-build.in (install): Install GDB.
+
+ * mpw-configure (prefix, mpw_prefix): Handle it.
+ * mpw-config.in (mmalloc, readline): Don't configure.
+ * mpw-build.in (thisscript): Rename to ThisScript.
+ Use mpw-build instead of BuildProgram everywhere.
+ (mmalloc, readline): Don't build.
+ * mpw-README: New file, basic documentation about the MPW port.
+
+ * mpw-config.in: Use forward-include to create include files.
+
+ * mpw-configure: Add more things to the top of each configured
+ Makefile, including contents of config/mpw-mh-mpw.
+ * mpw-config.in (extra-include): Create this directory and fill it
+ with Posix-like include files when configuring.
+
+ * config.sub (apple, mac, mpw): Add various aliases.
+
+ * mpw-build.in: New file, top-level build script fragment for MPW.
+ * mpw-configure: New file, configure script for MPW.
+ * mpw-config.in: New file, config fragment for MPW.
+
+Fri Apr 7 19:33:16 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in (host_libs): Remove glob, since it is gone from the
+ sources.
+
+Fri Mar 31 11:36:17 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in: define empty GDB_NLM_DEPS var.
+
+ * configure.in(target_makefile_frag): use config/mt-netware
+ for netware targets.
+
+Thu Mar 30 13:51:43 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.sub: Merge in recent FSF changes. Remove linux special
+ cases.
+
+Tue Mar 28 14:47:34 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ build-all.mk,config/mh-solaris: revert these two changes:
+
+ Tue Mar 30 10:03:09 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * build-all.mk: Use CC=cc -Xs on Solaris.
+
+ Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/mh-solaris: SunPRO C needs -Xs to be able to get a
+ working xmakefile for Emacs.
+
+Tue Mar 21 10:43:32 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * glob/*: Removed. Schauer's 24 Feb 1994 readline change made us
+ stop using it.
+ * Makefile.in: Nuke all references to glob subdirectory.
+
+Thu Mar 16 13:35:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
+
+ * configure.in: Fix --enable-shared logic in per-host.
+
+Mon Mar 13 12:33:15 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in (*-hp-hpux[78]*): Use mh-hpux8.
+
+Mon Mar 6 10:21:58 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in (noconfigdirs): Don't build gas on AIX, for
+ powerpc*-*-aix* as well as for rs6000*-*-aix*.
+
+Wed Mar 1 12:51:53 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Fix --cache-file to work if the file argument is a
+ relative path.
+
+Tue Feb 28 17:36:07 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: If the --cache-file is used, pass it down to
+ configure in subdirectories.
+
+Mon Feb 27 12:52:46 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * config.sub: add vxworks29k configuration.
+
+Fri Feb 10 16:12:26 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (taz): Do "diststuff" part quietly.
+
+Sun Feb 5 14:16:35 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.sub: Mini-merge with gcc/config.sub.
+
+Sat Feb 4 12:11:35 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * config.guess (IRIX): Sed - to _.
+
+Fri Feb 3 11:54:42 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in (source-vault, binary-vault): New targets.
+
+Thu Jan 26 13:00:11 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config.sub: Recognize -eabi as a basic system type.
+
+Thu Jan 12 13:13:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
+
+ * configure.in (enable_shared stuff): Fix typo.
+
+Thu Jan 12 01:36:51 1995 deanm@medulla.LABS.TEK.COM (Dean Messing)
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): Fix typo in passing LIBCXXFLAGS*.
+
+Wed Jan 11 16:29:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
+
+ * Makefile.in (LIBCXXFLAGS_FOR_TARGET): Add -fno-implicit-templates.
+
+Mon Jan 9 12:48:01 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
+
+ * configure.in (rs6000-*-*): Don't build gas.
+
+Wed Jan 4 23:53:49 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
+
+ * Makefile.in: Use /x/x/ instead of /brokensed/brokensed/, to
+ reduce command line length.
+ (AS_FOR_TARGET): Check for as.new, not Makefile.
+ (NM_FOR_TARGET): Check for nm.new, not Makefile.
+
+Wed Jan 4 13:02:39 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * config.guess: Merge from FSF.
+
+Thu Dec 15 17:11:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * configure: Don't use $ when handling program_suffix.
+
+Mon Dec 12 12:09:37 1994 Stu Grossman (grossman@cygnus.com)
+
+ * configure.in: Configure tk for hppa/hpux.
+
+Fri Dec 2 15:55:38 1994 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in (LIBGXX_SUPPORT_DIRS): Add libstdc++.
+
+Tue Nov 29 19:37:56 1994 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in: Move -fno-implicit-template from CXXFLAGS
+ to LIBCXXFLAGS. Tests are better run without it.
+
+Wed Nov 23 10:29:25 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * Makefile.in (all-ispell): Depend on all-emacs19 instead of all-emacs.
+
+Mon Nov 21 11:14:01 1994 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (*-*-netware*): Don't configure xiberty.
+
+Mon Nov 14 08:49:15 1994 Stu Grossman (grossman@cygnus.com)
+
+ * configure.in: Remove tk from native_only list.
+
+Fri Nov 11 15:31:26 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * build-all.mk: Add mips-ncd-elf target to sun4 targets
+ for special NCD build.
+
+Mon Nov 7 20:58:17 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (DEVO_SUPPORT): Remove configure.bat and
+ makeall.bat, they're only useful for binutils snapshots.
+ (binutils.tar.gz, gas+binutils.tar.gz): Add configure.bat and
+ makeall.bat to specified SUPPORT_FILES.
+
+Mon Nov 7 17:25:18 1994 Bill Cox (bill@cirdan.cygnus.com)
+
+ * build-all.mk: Add Ericsson targets to sun4 and solaris
+ hosts. Add BNR's sun4 target to solaris host, so their
+ build-from-source will be tested in-house first.
+
+Sat Nov 5 18:43:30 1994 Jason Merrill (jason@phydeaux.cygnus.com)
+
+ * Makefile.in (LIBCFLAGS): New variable.
+ (CFLAGS_FOR_TARGET): Ditto.
+ (LIBCFLAGS_FOR_TARGET): Ditto.
+ (LIBCXXFLAGS): Ditto.
+ (CXXFLAGS_FOR_TARGET): Ditto.
+ (LIBCXXFLAGS_FOR_TARGET): Ditto.
+ (BASE_FLAGS_TO_PASS): Pass them.
+ (EXTRA_TARGET_FLAGS): Ditto.
+
+ * configure.in, config/m[th]-*pic: Support --enable-shared.
+
+Sat Nov 5 15:44:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * configure.in (target_libs): Include libstdc++ again.
+ * config.guess: Update from FSF (for FreeBSD).
+
+Thu Nov 3 16:32:30 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (DEVO_SUPPORT): Include configure.bat and
+ makeall.bat.
+ (DISTDOCDIRS): Add `etc'.
+ (ETC_SUPPORT_PFX): New variable.
+ (taz): Include anything from etc starting with a word in
+ ETC_SUPPORT_PFX.
+
+Wed Oct 26 16:19:35 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config.sub: Update for recent FSF changes. Remove obsolete
+ h8300hds entry. Add -windows* and -osx as basic os. Minor
+ spacing changes.
+
+Thu Oct 20 18:41:56 1994 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * configure.in (target_libs): Remove libstdc++ for libg++-2.6.1.
+
+ * config.guess: Merge with FSF.
+ * configure.in: Match on i?86-ncr-sysv4.3, not i?86-ncr-sysv43.
+
+Thu Oct 20 19:26:56 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * configure: Since the "trap 0" handler will override the exit
+ status on many systems, only use it for "exit 1", and make it set
+ a non-zero exit status; reset it before "exit 0". Also, check
+ exit status of config.sub, and error out if it failed.
+
+Wed Oct 19 18:49:55 1994 Rob Savoye (rob@cygnus.com)
+
+ * Makefile.in: (ALL_TARGET_MODULES,INSTALL_TARGET_MODULES) Build
+ and install libgloss.
+
+Tue Oct 18 15:25:24 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * Makefile.in (all-binutils): Depend upon all-byacc.
+
+ * configure.in: Don't build emacs on Irix 5.
+
+Mon Oct 17 16:22:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * configure.in (*-*-netware*): Add libio.
+
+Thu Oct 13 15:51:20 1994 Jason Merrill (jason@phydeaux.cygnus.com)
+
+ * Makefile.in (ALL_TARGET_MODULES): Add libstdc++.
+ (CHECK_TARGET_MODULES): Ditto.
+ (INSTALL_TARGET_MODULES): Ditto.
+ (TARGET_LIBS): Ditto.
+ (all-libstdc++): Note dependencies.
+
+Thu Oct 13 01:43:08 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (BINUTILS_SUPPORT_DIRS): Add gas.
+
+Tue Oct 11 12:12:29 1994 Jason Merrill (jason@phydeaux.cygnus.com)
+
+ * Makefile.in (CXXFLAGS): Use -fno-implicit-templates instead of
+ -fexternal-templates.
+
+ * configure.in (target_libs): Add libstdc++.
+ (noconfigdirs): Add libstdc++ as appropriate.
+
+Thu Oct 6 18:00:54 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Update from FSF.
+
+Tue Oct 4 12:05:42 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * configure: Use ${config_shell} when running ${configsub}.
+
+Mon Oct 3 14:28:34 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.sub: No longer recognize h8300h.
+
+Mon Oct 3 12:40:54 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config.sub: Remove extraneous differences between config.sub and
+ gcc/config.sub.
+
+Sat Oct 1 00:23:12 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (DISTSTUFFDIRS): Add gas.
+
+Thu Sep 22 19:04:55 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * COPYING.NEWLIB: New file.
+
+Mon Sep 19 18:25:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess (HP-UX): Patch from Harlan Stenn
+ <harlan@landmark.com> to also emit release level.
+
+Wed Sep 7 13:15:25 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * config.guess (sun4*:SunOS:*:*): Change '-JL' to '_JL'.
+
+Tue Sep 6 23:23:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.sub: Merge nextstep cleanup from FSF.
+
+Mon Sep 5 05:01:30 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * configure.in (arm-*-*): Don't configure ld for this target.
+
+Thu Sep 1 09:35:00 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * configure.in (*-*-netware): don't configure libg++, libio,
+ librx, or newlib.
+
+Wed Aug 31 13:52:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure.in (alpha-dec-osf*): Use osf*, not osf1*. Don't
+ configure ld--it works, but it doesn't support shared libraries.
+
+Sun Aug 28 18:13:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess (*-unknown-freebsd*): Get rid of possible
+ trailing "(Release)" in version string.
+ Patch from Paul Richards <paul@isl.cf.ac.uk>.
+
+Sat Aug 27 15:00:49 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Fix i486-ncr-sysv43 -> i486-ncr-sysv4.3.
+ Fix type: *-next-neststep -> *-next-nextstep.
+
+ * config.guess: Merge from FSF:
+
+ Fri Aug 26 18:45:25 1994 Philippe De Muyter (phdm@info.ucl.ac.be)
+
+ * config.guess: Recognize powerpc-ibm-aix3.2.5.
+
+ Wed Apr 20 06:36:32 1994 Philippe De Muyter (phdm@info.ucl.ac.be)
+
+ * config.guess: Recognize UnixWare 1.1 (UNAME_SYSTEM is SYSTEM_V
+ instead of UNIX_SV for UnixWare 1.0).
+
+Sat Aug 27 01:56:30 1994 Stu Grossman (grossman@cygnus.com)
+
+ * Makefile.in (all-gdb): Add dependencies on all-gcc and all-ld
+ to make gdb/nlm/* build after the compiler and linker.
+
+Fri Aug 26 14:30:05 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess (netbsd, freebsd, linux): Accept any machine,
+ not just i[34]86.
+ (m68k-atari-sysv4): Relocate to match FSF version.
+
+ * config.guess: More merges from the FSF:
+
+ Add a space before function call or macro invocation.
+
+ Tue May 10 16:53:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
+
+ * config.guess: Add trap cmd to remove dummy.c and dummy when
+ interrupted.
+
+ Wed Apr 20 18:07:13 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
+
+ * config.guess (dummy.c): Redirect stderr for `hostinfo' command.
+ (dummy): Redirect stderr from compilation of dummy.c.
+
+ Sat Apr 9 14:59:28 1994 Christian Kranz (kranz@sent5.uni-duisburg.de)
+
+ * config.guess: Distinguish between NeXTStep 2.1 and 3.x.
+
+Fri Aug 26 13:42:20 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com)
+
+ * configure: Accept and ignore --cache*, for compatibility with
+ new autoconf.
+
+Fri Aug 26 13:05:27 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Merge from FSF:
+
+ Thu Aug 25 20:28:51 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu>
+
+ * config.guess (Pyramid*:OSx*:*:*): New case.
+ (PATH): Add /.attbin at end for finding uname.
+ (dummy.c): Handle i860-alliant-bsd. Follow whitespace conventions.
+
+ Wed Aug 17 18:21:02 1994 Tor Egge (tegge@pvv.unit.no)
+
+ * config.guess (M88*:DolphinOS:*:*): New case.
+
+ Thu Aug 11 17:00:13 1994 Stan Cox (coxs@dg-rtp.dg.com)
+
+ * config.guess (AViiON:dgux:*:*): Use TARGET_BINARY_INTERFACE
+ to select whether to use ELF or COFF.
+
+ Sun Jul 24 16:20:53 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu>
+
+ * config.guess: Recognize i860-stardent-sysv and i860-unknown-sysv.
+
+ Sun May 1 10:23:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
+
+ * config.guess: Guess the OS version for HPUX.
+
+ Tue Mar 1 21:53:03 1994 Karl Heuer (kwzh@hal.gnu.ai.mit.edu)
+
+ * config.guess (UNAME_VERSION): Recognize aix3.2.4 and aix3.2.5.
+
+Fri Aug 26 11:19:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure.in: Recognize --with-headers, --with-libs, and
+ --without-newlib.
+ * Makefile.in (all-xiberty): Depend upon all-ld.
+
+Wed Aug 24 12:36:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure.in: Change i[34]86 to i[345]86.
+
+Mon Aug 22 10:58:33 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure (version): A few more tweaks to help message.
+
+Fri Aug 19 12:40:25 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * Makefile.in: Remove (for now) librx as a host library,
+ now that we're building it for target.
+
+Fri Aug 19 10:49:17 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure: Fix up help message; from karl@owl.hq.ileaf.com
+ (Karl Berry).
+
+Tue Aug 16 16:11:08 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * configure.in: Also configure librx.
+
+Mon Aug 15 16:51:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * Makefile.in: Update various rules to reflect that librx
+ is now needed for libg++.
+
+Fri Aug 12 18:07:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config.sub: Accept mips64orion and mips64orionel as a CPU name.
+
+Mon Aug 8 11:36:17 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * configure.in: Configure the examples directory.
+
+Thu Aug 4 16:12:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure: Simplify Jun 2 1994 change.
+
+Wed Aug 3 04:58:16 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * change CC to /usr/latest/bin/gcc for lynx host builds, since
+ /bin/gcc isn't good enough to build gcc.
+
+Wed Jul 27 09:07:14 1994 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (GDB_SUPPORT_FILES): Remove
+ (setup-dirs-gdb, gdb.tar.gz, make-gdb.tar.gz): Remove old rules.
+ (gdb.tar.gz): Add new rule to use standard distribution building
+ mechanism.
+
+Mon Jul 25 11:10:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Warn about use of /usr/ucb/cc on Solaris. From
+ Bill Cox <bill@cygnus.com>.
+
+Sat Jul 23 12:19:46 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Recognize ISC. Patch from kwzh@gnu.ai.mit.edu.
+
+Fri Jul 22 17:53:59 1994 Stu Grossman (grossman@cygnus.com)
+
+ * configure: Search current dir first in .gdbinit.
+
+Fri Jul 22 11:28:30 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.sub: Recognize freebsd (merged from gcc config.sub).
+
+Thu Jul 21 14:10:52 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.sub: Refer to NeXT's operating system as nextstep.
+
+ * config.sub (case $basic_machine): Re-order the cases, to match
+ the order in the FSF version (which is mostly alphabethical).
+ Merge in some additions and changes from the FSF.
+
+Sat Jul 16 12:03:08 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config.guess: Recognize m68k-atari-sysv4 and m88k-harris-csux7.
+ * config.sub: Recognize cxux7.
+ * configure.in: Use mh-cxux for m88k-harris-cxux*.
+
+Mon Jul 11 14:37:39 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.sub: Fix typo powerpc -> powerpc-*.
+
+Sat Jul 9 13:03:43 1994 Michael Tiemann (tiemann@blues.cygnus.com)
+
+ * Makefile.in: `all-emacs19' depends on `all-byacc'.
+
+ * Makefile.in: Add all-emacs19 and install-emacs19 rules (in
+ parallel with all-emacs and install-emacs). Top-level command
+ `make all-emacs19 CC=gcc' now behaves as `make all-emacs CC=gcc'.
+
+Thu Jun 30 16:53:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * test-build.mk ($(host)-stamp-stage2-installed): Remove
+ $(relbindir)/make before doing ``make install'', and use
+ $(GNU_MAKE) while doing it. Avoids problem on SunOS with
+ installing over running make binary.
+ ($(host)-stamp-stage3-installed): Likewise.
+
+Tue Jun 28 13:43:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Recognize Mach.
+
+Mon Jun 27 16:41:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure: Check ${exec_prefixoption}, not ${exec_prefix}, to
+ see whether --exec-prefix was used.
+
+Sun Jun 26 21:15:54 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * README: Explicitly mention libg++/README. (Zoo's idea.)
+
+Tue Jun 21 12:45:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in: Add all-librx target similar to all-libproc.
+
+Wed Jun 8 23:11:55 1994 Stu Grossman (grossman@cygnus.com)
+
+ * config.guess: Rearrange tests for Alpha-OSF1 to properly deal
+ with post 1.2 uname bogosity.
+
+Thu Jun 9 00:27:59 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure: Remove temporary files on receipt of a signal.
+
+Tue Jun 7 12:06:24 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: If there is a package_makefile_frag, remove
+ ${subdir}/Makefile.tem after copying it in.
+
+Mon Jun 6 21:35:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * build_all.mk: support rs6000 lynx identifies itself as
+ rs6000-lynx-lynxos2.2.2. Also, use /usr/cygnus/progressive/bin/gcc
+ since /bin/gcc is too feeble to compile a modern gcc.
+
+Mon Jun 6 16:06:34 1994 Karen Christiansen (karen@cirdan.cygnus.com)
+
+ * brought devo/test-build.mk update-to-date with progressive/
+ test-build.mk. Add lynx targets and hppa flag info.
+
+Sat Jun 4 17:23:54 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * configure.in: Use mh-ncrsvr43. Patch from
+ Tom McConnell <tmcconne@sedona.intel.com>.
+
+Fri Jun 3 17:47:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess (i386-unknown-bsdi): No longer need to
+ check #if defined(__bsdi__) && defined(__i386__).
+
+Thu Jun 2 18:56:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure: Set program_transform_nameoption correctly.
+
+Thu Jun 2 10:57:06 1994 Karen Christiansen (karen@cirdan.cygnus.com)
+
+ * brought build-all.mk update-to-date with progressive build-all.mk,
+ added new targets and hppa info.
+
+Thu Jun 2 00:12:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure: If config.guess result is a prefix of the user
+ specified target, assume a native build and use the user specified
+ target as the host alias. Remove SunOS patch suffix removal hack.
+ * configure.in: Remove SunOS patch suffix removal hack.
+
+ * Makefile.in (CROSS_CHECK_MODULES): Remove check-flex, since it's
+ in NATIVE_CHECK_MODULES.
+
+Wed Jun 1 10:49:41 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * Makefile.in: Rename HOST_ONLY to NATIVE.
+ * configure: Delete SunOs patch suffix from host_canonical
+ and build_canonical variables that are prepended to Makefiles.
+ * configure.in: Add comments for easier maintenance.
+
+Tue May 31 19:39:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in: Add all-libproc target similar to all-gui.
+
+Tue May 31 17:16:33 1994 Tom Lord (lord@cygnus.com)
+
+ * Makefile.in (CHECK_MODULES): split into
+ HOST_ONLY_CHECK_MODULES and CROSS_CHECK_MODULES.
+
+Tue May 31 16:36:36 1994 Paul Eggert (eggert@twinsun.com)
+
+ * config.guess (i386-unknown-bsdi): New system to guess.
+
+Wed May 25 16:47:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in: Add all-gui target (but not yet build by "all").
+
+Thu May 26 08:53:19 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * config.sub: Move deletion of patch suffix from here...
+ * configure.in: To here, at Ian's suggestion. The top-
+ level scripts might need to know of a patch level.
+
+Wed May 25 09:15:54 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * config.sub: Strip off patch suffix so rtl is recognized
+ as a sunos4.1.3 machine, even though it's been patched.
+
+Fri May 20 08:25:49 1994 Steve Chamberlain (sac@deneb.cygnus.com)
+
+ * Makefile.in (INSTALL_LAST): Delete.
+ (INSTALL_DOSREL): New.
+
+Thu May 19 17:12:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Use ld for i[34]86-*-sysv4* and sparc-*-solaris2*.
+ Don't set use_gnu_ld to no for *-*-sysv4; that only controls
+ whether we pass down --with-gnu-ld anyhow.
+
+Thu May 19 09:29:12 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * Makefile.in (INSTALL_LAST): Change operation so it works
+ on more flavors of make.
+ * configure.in (go32): Don't build libg++ or libio.
+
+Fri May 13 13:28:34 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * Makefile.in (Move HOST_PREFIX_1 and friends up so
+ they can be overriden by templates.
+
+Sat May 7 16:46:44 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * configure.in (target==go32): Don't build gdb.
+ * dosrel: New directory.
+
+Fri May 6 14:19:25 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * configure.in (host==go32): Configure dosrel too.
+ * Makefile.in (INTALL_TARGET): Call INSTALL_LAST last.
+ (HOST_CC, HOST_PREFIX, HOST_PREFIX_1): Undefine, they should
+ be set by incoming names or templates.
+ (INSTALL_LAST): New rule.
+ * config/mh-go32: New fragment.
+
+Thu May 5 17:35:05 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config.sub (sparclitefrw, sparclitefrwcompat): Don't set the os.
+
+Thu May 5 20:06:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/mh-lynxrs6k: Renamed from mh-lynxosrs6k, to make it
+ unique in 8.3 naming schemes.
+ * configure.in (appdirs): New variable. Currently empty, but will
+ be used in gas distribution. If nonempty, lists a set of
+ directories at least one of which must get configured, or top
+ level configuration is considered to have failed.
+ (rs6000-*-lynxos*): Use new file name.
+
+Thu May 5 13:38:36 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Eliminate XTRAFLAGS.
+ * Makefile.in (CC_FOR_TARGET): If newlib exists, refer to the
+ newlib include files using -idirafter, and also use -nostdinc.
+ (CXX_FOR_TARGET): Likewise.
+ (XTRAFLAGS): Removed.
+ (BASE_FLAGS_TO_PASS): Remove XTRAFLAGS_FOR_TARGET.
+ (EXTRA_HOST_FLAGS): Remove XTRAFLAGS.
+ (EXTRA_TARGET_FLAGS, EXTRA_GCC_FLAGS): Likewise.
+ ($(DO_X)): Don't pass down XTRAFLAGS.
+
+Thu May 5 00:16:36 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * configure.in (mips*-dec-bsd*): New target; do build linker.
+ (mips*-*-bsd*): New target; don't build linker.
+
+Wed May 4 20:10:10 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * configure.in: support rs6000-*-lynxos* configuration.
+ support sunos4 as a cross target.
+
+ * config.sub: look for lynx*, not lynx since the OS version may
+ legitimately be part of the name.
+
+Tue May 3 21:48:11 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure.in (i[34]86-*-sco*): Move to be with other i386
+ targets.
+ (romp-*-*): New target. Skip various binary utilities.
+ (vax-*-*): New target. Don't build newlib.
+ (vax-*-vms): Renamed from *-*-vms. Don't build opcodes or newlib.
+
+Thu Apr 28 15:03:05 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure.in: Only set host_makefile_frag if config
+ directory exists.
+
+Wed Apr 27 12:14:30 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * install.sh: If $dstdir exists, don't check whether each
+ component does.
+
+Tue Apr 26 18:11:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * test-build.mk (HOLES): Add sleep; used by rcs/src/conf.sh.
+
+Mon Apr 25 15:06:34 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * configure.in (*-*-lynxos*): Don't configure newlib for either
+ native or cross Lynx.
+
+Sat Apr 16 11:58:16 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * config.sub (sparc64-elf): Fix os.
+ (z8k): Remove duplicate.
+
+Thu Apr 14 23:33:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (gcc-no-fixedincludes): Touch gcc/include/fixed, not
+ gcc/stmp-fixproto, to try to prevent fixproto from being run.
+
+Wed Apr 13 15:14:52 1994 Bill Cox (bill@cygnus.com)
+
+ * configure: Make file links cleanly even if Lynx fails on
+ an NFS symlink (at least fail cleanly).
+
+Mon Apr 11 10:58:56 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * test-build.mk (CC): For mips-sgi-irix4, change -XNh1500 to
+ -XNh2000.
+
+Sat Apr 9 15:10:45 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure: Unknown options are fatal again.
+
+Fri Apr 8 12:01:41 1994 David J. Mackenzie (djm@cygnus.com)
+
+ * configure: Ignore --x-includes and --x-libraries, for Autoconf
+ compatibility.
+
+Thu Apr 7 17:31:43 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * build-all.mk: Add `clean' target.
+
+Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * config.guess: Add SINIX support.
+ * configure.in: Add mips-*-sysv4* support.
+
+Mon Apr 4 17:41:44 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * build-all.mk: Document all useful targets.
+ If canonhost is sparc-sun-solaris2.3, change it to sparc-sun-solaris2.
+ If canonhost is mips-sgi-irix4.0.5H, change it to mips-sgi-irix4.
+
+Thu Mar 31 04:55:57 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure: Support --silent, --quiet.
+
+Wed Mar 30 21:37:38 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure: Support --disable-FEATURE.
+
+Tue Mar 29 19:15:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Recognize NCR running SVR4.3.
+
+Mon Mar 28 14:55:15 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Make BSDI generate i386-unknown-bsd386.
+ Patch from Paul Eggert <eggert@twinsun.com>.
+
+Mon Mar 28 12:54:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in (powerpc-*-aix*): Treat like rs6000-*-*.
+
+Sat Mar 26 11:25:48 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure: Make unrecognized options give nonfatal warnings
+ instead of fatal errors, and pass them to any subdirectory
+ configures in case they recognize them.
+ Make --x equivalent to --with-x.
+
+Fri Mar 25 21:52:10 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure: Add --enable-* options. Clean up usage message and
+ some comments.
+
+Thu Mar 24 09:12:53 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * Makefile.in (NM_FOR_TARGET): Build tree version is now nm.new.
+
+Sun Mar 20 11:28:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * configure.in (hppa*-*-*): Enable binutils.
+
+Sat Mar 19 11:50:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.sub: Recognize cisco.
+
+Fri Mar 18 16:42:32 1994 Jason Merrill (jason@deneb.cygnus.com)
+
+ * Makefile.in (CXXFLAGS): Add -fexternal-templates.
+
+Tue Mar 15 11:25:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: about target *-hitachi-hiuxwe2, don't print more
+ than one configuration name. Add comment.
+
+Sun Mar 6 23:13:38 1994 Hisashi MINAMINO (minamino@sra.co.jp)
+
+ * config.guess: about target *-hitachi-hiuxwe2, fixed
+ machine guessing order. [Hitachi's CPU_IS_HP_MC68K
+ macro is incorrect.]
+
+Sun Mar 13 09:10:08 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (TAGS): Just build TAGS in each subdirectory, rather
+ than the "make ls" stuff which used to be here.
+
+Fri Mar 11 12:52:39 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Recognize i[34]86-unknown-freebsd.
+ From Shawn M Carey <smcarey@rodan.syr.edu>.
+
+Thu Mar 3 14:24:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * configure.in (noconfigdirs for alpha): Remove libg++ and libio.
+
+Wed Mar 2 13:28:48 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
+
+ * config.guess: Check for ptx.
+
+Mon Feb 28 16:46:50 1994 Kung Hsu (kung@mexican.cygnus.com)
+
+ * config.sub: Add os9k checking.
+
+Thu Feb 24 07:09:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config.guess: Handle OSF1 running on HPPA processors
+
+Fri Feb 18 14:14:00 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * configure: If subdir configure fails, print out a message with
+ subdirectory name, in case subdir's configure code didn't identify
+ itself.
+
+Fri Feb 18 12:50:15 1994 Doug Evans (dje@cygnus.com)
+
+ * configure.in: Remove embedded newlines from configdirs.
+ Avoid mismatches of substrings. Fix matching strings at end
+ of configdirs.
+
+Fri Feb 11 15:33:33 1994 Stu Grossman (grossman at cygnus.com)
+
+ * config.guess: Add Lynx/rs6000 config support.
+
+Tue Feb 8 13:41:09 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * configure.in (alpha-dec-osf1*, alpha*-*-*): Build gas.
+
+Mon Feb 7 15:42:36 1994 Jeffrey A. Law (law@cygnus.com)
+
+ * configure.in (hppa*-*-osf*): Treat this just like most other
+ PA configurations (eg no binutils or ld).
+ (hppa*-*-*elf*): These configurations have binutils and ld.
+
+Sun Feb 6 16:35:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config.sub (hiux): Fix typo. From m-kasahr@sramhc.sra.co.JP.
+
+Sat Feb 5 01:00:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in (rs6000-*-*): Build gas.
+
+Wed Feb 2 13:57:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Makefile.in: Avoid bug in losing hpux sed.
+
+Wed Feb 2 14:53:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in, test-build.mk: Remove MUNCH_NM; it was only needed
+ for GDB and GDB has been fixed to not need it.
+
+Mon Jan 31 18:40:55 1994 Stu Grossman (grossman at cygnus.com)
+
+ * config/mh-lynxosrs6k: Account for lack of ranlib!
+
+Sun Jan 30 17:58:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config.guess: Recognize vax hosts.
+
+Fri Jan 28 15:29:38 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure (while loop): Don't use "break 2" inside case
+ statement -- the case statement isn't an enclosing loop.
+
+Mon Jan 24 18:40:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Clean up NeXT support, to allow nextstep
+ on Intel machines. Make OS be nextstep.
+
+Sun Jan 23 18:47:22 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
+
+ * config.guess: Add alternate forms for Convex.
+
+Thu Jan 20 16:13:41 1994 Stu Grossman (grossman at cygnus.com)
+
+ * configure: Completely rewrite option processing. Take
+ advantage of pattern-matching to avoid invoking test frequently.
+ Also clean up host and target defaulting logic.
+
+Mon Jan 17 15:06:56 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * Makefile.in: Replace all occurrances of "rootme" with "r" and
+ "$${rootme}" with "$$r", to increase the likelihood that the do-*
+ commands (plus user environment) will fit SCO limits.
+
+Thu Jan 6 11:20:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Don't issue warnings about directories which are
+ not being configured if -norecursion is set. Correct test for
+ --with-gnu-as and --with-gnu-ld to not get confused by substring
+ matches.
+
+ * configure.in: Don't build gas for alpha-dec-osf1*.
+
+Tue Jan 4 17:10:19 1994 Stu Grossman (grossman at cygnus.com)
+
+ * configure: Back out Per's change of 12/19/1993. It changes the
+ behavior of configure in unexpected and confusing ways.
+
+ Also, use different delim char when calculating
+ program_transform_name so that the name can contain slashes.
+
+Sat Jan 1 13:45:31 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * configure.in, config.sub: Add support for VSTa micro-kernel.
+
+Sat Dec 25 20:00:47 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * configure.in: Nuke hacks which were used to get a special
+ version of GAS for HPPA configurations.
+
+Sun Dec 19 20:40:44 1993 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * configure: If only ${target_alias} is given, use that
+ as the default for ${host_alias}.
+ * configure: Add missing back-slashes before nested quotes.
+
+Wed Dec 15 18:07:18 1993 david d `zoo' zuhn (zoo@andros.cygnus.com)
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): add YACC=$(BISON)
+
+Tue Dec 14 21:25:33 1993 Per Bothner (bothner@cygnus.com)
+
+ * config.guess: Recognize some Tektronix configurations.
+ From Kaveh R. Ghazi <ghazi@noc.rutgers.edu>.
+
+Sat Dec 11 11:18:00 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config.sub: Match any flavor of SH.
+
+Thu Dec 2 17:16:58 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure.in: Don't try to configure newlib for Alpha.
+
+Thu Dec 2 14:35:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Don't build ld for Irix 5. Don't build gas,
+ libg++ or libio for any Alpha target.
+
+ * configure.in (mips*-sgi-irix5*): New target; use mh-irix5.
+ * config/mh-irix5. New file for Irix 5.
+
+Wed Dec 1 17:00:33 1993 Jason Merrill (jason@deneb.cygnus.com)
+
+ * Makefile.in (GZIPPROG): Renamed from GZIP, which gzip uses for
+ default arguments -- so it tried to compress itself.
+
+Tue Nov 30 13:45:15 1993 david d `zoo' zuhn (zoo@andros.cygnus.com)
+
+ * configure.in (notsupp): ensure that a space is always at the end
+ of the configdirs list, since the grep checks for an explicit space
+
+Tue Nov 16 15:04:27 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in (target i386-sysv4.2): don't build ld, since static
+ versions of many libraries are not available.
+
+Tue Nov 16 14:28:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Recognize Apollos (using environment variables).
+ * configure.in: Don't configure ld, binutils, or gprof for Apollo.
+
+Thu Nov 11 12:03:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Recognize Sony news mips running newsos.
+
+Wed Nov 10 16:57:00 1993 Mark Eichin (eichin@cygnus.com)
+
+ * Makefile.in (all-cygnus, build-cygnus): "fi else" needs to be
+ "fi ; else" for bash.
+
+Tue Nov 9 15:54:01 1993 Mark Eichin (eichin@cygnus.com)
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): pass SHELL.
+
+Fri Nov 5 08:07:27 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
+
+ * config.sub: accept unixware as an alias for svr4.2.
+ Fix some inconsistancies with the gcc version.
+
+Fri Nov 5 15:14:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (DISTDOCDIRS): Add gdb.
+
+Fri Nov 5 11:59:42 1993 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * Makefile.in (DISTDOCDIRS): Add libg++ and libio.
+
+Fri Nov 5 10:35:05 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * Makefile.in (taz): Only build "info" in DISTDOCDIRS.
+ (DISTDOCDIRS): Don't assume libg++ and gdb folks necessarily want
+ this now.
+
+Thu Nov 4 18:58:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.sub: Accept hiux* as an OS name.
+
+ * Makefile.in: Change RUNTEST_FLAGS back to RUNTESTFLAGS per
+ etc/make-stds.texi. The underscore came from gcc, and dje now
+ agrees that RUNTESTFLAGS is the correct name.
+
+Thu Nov 4 10:49:01 1993 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * install.sh: Remove 'set -e'. It makes any conditionals
+ in the script useless.
+
+ * config.guess: Automatically recognize arm-acorn-riscix
+ Patch from Richard Earnshaw (rwe11@cl.cam.ac.uk).
+
+Thu Nov 04 08:08:04 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * Makefile.in: Change RUNTESTFLAGS to RUNTEST_FLAGS
+
+Wed Nov 3 22:09:46 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * Makefile.in (DISTDOCDIRS): New variable.
+ (taz): Edit local Makefile.in sooner, instead of proto-toplev
+ Makefile.in later. Build "info" and "dvi" in DISTDOCDIRS.
+
+Wed Nov 3 21:31:52 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in (hppa target): check the source directory for the
+ pagas sub-directory
+
+Wed Nov 3 11:12:22 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config.sub: Allow -aout* and -elf*.
+
+Wed Nov 3 11:08:33 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * configure.in: Don't build ld on i386-solaris2, same as for
+ sparc-solaris2.
+
+Tue Nov 2 14:21:25 1993 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * Makefile.in (taz): Add texinfo/lgpl.texinfo (for libg++).
+
+Tue Nov 2 13:38:30 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.in: Configure gdb for alpha.
+
+Mon Nov 1 10:42:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (CXXFLAGS): Add -O.
+
+Wed Oct 27 10:45:06 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config.guess: added support for DG Aviion
+
+Tue Oct 26 14:37:37 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * configure.in: Produce warning message for subdirectories not
+ configurable for this host/target combination. Don't try to
+ configure gdb for vms.
+
+Mon Oct 25 11:22:15 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * Makefile.in (taz): Replace "byacc" with "bison -y" in the
+ appropriate files before making "diststuff".
+ (DISTBISONFILES): New var: list of files to be edited.
+ (DISTSTUFFDIRS): Add binutils.
+
+Fri Oct 22 20:32:15 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config.sub: also handle mipsel and mips64el (for little endian mips)
+
+Fri Oct 22 07:59:20 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in: Add * to end of all OS names.
+
+Thu Oct 21 11:38:28 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * configure.in: Build newlib for LynxOS native.
+
+Wed Oct 20 09:56:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Add support for delta 88k running SVR3.
+
+ * configure.in: Add comment about HP compiler vs. emacs.
+
+Tue Oct 19 16:02:22 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: don't build ld on solaris2 (not a viable option
+ due to bugs in getpwnam & getpwuid)
+
+Tue Oct 19 15:13:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * configure.in: Accept alpha-dec-osf1*, not just -osf1, since
+ config.guess will produce a full version number.
+
+Tue Oct 19 15:58:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Build linker and binutils for alpha-dec-osf1.
+
+Tue Oct 19 11:41:55 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in: Remove -O from CXXFLAGS for consistency with CFLAGS,
+ and gdb/testsuite/Makefile.in.
+
+Sat Oct 9 18:39:07 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: recognize mips*- instead of mips-
+
+Fri Oct 8 14:15:39 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * config.sub: Accept linux*coff and linux*elf as operating
+ systems.
+
+Thu Oct 7 12:57:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config.sub: Recognize mips64, and mips3 as an alias for it.
+
+Wed Oct 6 13:54:21 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.in: Remove alpha-dec-osf*, no longer necessary now that
+ gdb knows how to handle OSF/1 shared libraries.
+
+Tue Oct 5 11:55:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in: Recognize hppa*-*-hiux* (currently synonym for hpux).
+ * config.guess: Recognize Hitachi's HIUX.
+ * config.sub: Recognize h3050r* and hppahitachi.
+ Remove redundant cases for hp9k[23]*.
+
+Mon Oct 4 16:15:09 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: default to '--with-gnu-as' and '--with-gnu-ld'
+ if gas and ld are in the source tree and are in ${configdirs}.
+ If ${use_gnu_as} or ${use_gnu_ld} are 'no', then don't set the
+ the --with options (but still pass them down on the command line,
+ if they were explicitly specified).
+
+Fri Sep 24 19:11:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure: substitute SHELL value in Makefile.in with
+ ${CONFIG_SHELL}
+
+Thu Sep 23 18:05:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Build gas, ld, and binutils for *-*-sysv4* and
+ *-*-solaris2* targets.
+
+Sun Sep 19 17:01:41 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * Makefile.in: define M4, and pass it down to sub-makes;
+ all-autoconf now depends on all-m4
+
+Sat Sep 18 00:38:23 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * Makefile.in ({AR,RANLIB}_FOR_TARGET): make contingent on
+ presence of {ar,ranlib} instead of a configured directory
+
+Wed Sep 15 08:41:44 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
+
+ * config.guess: Accept 34?? as well as 33?? for NCR.
+
+Mon Sep 13 12:28:43 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: grab mt-hppa for HPPA targets; use 'gas ' instead
+ of 'gas' in sed commands, since 'gash' is now in the tree as well.
+
+Fri Sep 10 11:23:52 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure: grab values for $(CC) and $(CXX) from the
+ environment, so that someone can do "CC=gcc configure; make" and
+ have it work right (matching the way that autoconf works now)
+
+ * configure.in, Makefile.in: add support for gash, the tcl
+ interface to Galaxy
+
+ * config.guess: add NetBSD variants (hp300, x86)
+
+Thu Sep 9 16:48:52 1993 Jason Merrill (jason@deneb.cygnus.com)
+
+ * install.sh: Support -d option (in the manner of SunOS 4 install,
+ as it is more deterministic than that of GNU install)
+ (chmodcmd): Set file to mode 755 by default (should also do default
+ chgrp and chown, but I don't feel like dealing with that now)
+
+Tue Sep 7 11:59:39 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config.sub: Remove h8300hhms alias.
+
+Tue Aug 31 11:00:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in: Match *-*-solaris2* not *-sun-solaris2*.
+
+Mon Aug 30 18:29:10 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * Makefile.in (gcc-no-fixedincludes): touch stmp-fixproto as well
+ as stmp-fixinc
+
+Wed Aug 25 16:35:59 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config.sub: recognize m88110-bug-coff.
+
+Tue Aug 24 10:23:24 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * Makefile.in (all-libio): all dependencies on the toolchain used
+ to build this (gcc, gas, ld, etc)
+
+Fri Aug 20 17:24:24 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Deal with OSF/1 1.3 on alpha.
+
+Thu Aug 19 11:43:04 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * install.sh: add some 'else true' clauses for portability
+
+ * configure.in: don't build libio for h8[35]00-*-* targets
+
+Tue Aug 17 19:02:31 1993 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * Makefile.in: Add support for new libio.
+
+Sun Aug 15 20:48:55 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * install.sh: If one command fails, don't try the rest. Don't try
+ to remove $dsttmp (via trap) unless we have already created it.
+ If $src doesn't exist, detect it and exit with an error.
+
+ * config.guess: Recognize BSD on hp300.
+
+Wed Aug 11 18:35:13 1993 Per Bothner (bothner@kalessin.cygnus.com)
+
+ * config.guess: Map (9000/[34]??:HP-UX:*:*) to m68k-hp-hpux.
+ Bug report from "Hamish (H.I.) Macdonald" <hamish@bnr.ca>.
+
+Wed Aug 11 15:37:51 1993 Jason Merrill (jason@deneb.cygnus.com)
+
+ * Makefile.in (all-send-pr): depends on all-prms
+
+Wed Aug 11 16:56:03 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Fix typo (9000/8??:4.3bsd -> 9000/7??:4.3bsd).
+
+Fri Aug 6 14:45:02 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config.guess: From michael@mercury.cs.mun.ca (Michael Rendell):
+ Added test for mips-mips-riscos5.
+
+Thu Aug 5 15:45:08 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: use mh-hp300 for 68k HP hosts
+
+Mon Aug 2 11:56:53 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure: add support for CONFIG_SHELL, so that you can use
+ some alternate shell for evaluating configure scripts
+
+Sun Aug 1 11:36:27 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * Makefile.in (make-gdb.tar.gz): Sed bug reporting address
+ in configure script to bug-gdb@prep.ai.mit.edu when building
+ distribution archive.
+ * Makefile.in (COMPRESS): Remove def.
+ * Makefile.in (gdb.tar.gz, make-gdb.tar.gz): Renamed from
+ gdb.tar.Z and make-gdb.tar.Z respectively.
+ * Makefile.in (make-gdb.tar.gz): Now only build gzip'd archive.
+ * Makefile.in (make-gdb.tar.gz): Minor changes to move closer
+ to convergence with 'taz' target in Makefile.in.
+
+Fri Jul 30 12:34:57 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * install.sh (dsttmp): use trap to ensure that tmp files go
+ away on error conditions
+
+Wed Jul 28 11:57:36 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * Makefile.in (BASE_FLAGS_TO_PASS): remove LOADLIBES
+
+Tue Jul 27 12:43:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (install-dirs): Deal with a prefix like /gnu;
+ its parent is '/' not ''.
+
+ * Makefile.in (DEVO_SUPPORT): Add comments about ChangeLog.
+
+Fri Jul 23 09:53:37 1993 Jason Merrill (jason@wahini.cygnus.com)
+
+ * configure: if ${newsrcdir}/configure doesn't exist, don't assume
+ that ${newsrcdir}/configure.in does.
+
+Tue Jul 20 11:28:50 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * test-build.mk: support for CONFIG_SHELL
+
+Mon Jul 19 21:54:46 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * config.sub (netware): Add as a basic system type.
+
+Wed Jul 14 12:03:11 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * Makefile.in (Makefile): depend on configure.in. Also drop the
+ $(srcdir)/ from the dependency on Makefile.in.
+
+Tue Jul 13 20:10:58 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config.sub: Recognize h8300hhms as h8300h-hitachi-hms.
+ (h8300hhms is temporary until multi-libraries are implemented).
+ * configure.in: Handle h8300h too.
+
+Sun Jul 11 17:35:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Recognize dpx/2 as m68k-bull-sysv3.
+
+Thu Jul 8 18:26:12 1993 John Gilmore (gnu@cygnus.com)
+
+ * configure: Remove extraneous output when guessing host type.
+ * config.guess: Remove extraneous output when guessing using C
+ compiler rather than uname, or when guessing fails.
+
+Wed Jul 7 17:58:14 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
+
+ * Makefile.in: remove all.cross and install.cross targets
+
+ * configure: remove CROSS=-DCROSS_COMPILE and ALL=all.cross
+ definitions
+
+Tue Jul 6 10:39:44 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * configure.in (target sh): Build gprof.
+
+Thu Jul 1 16:52:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config.sub: change -solaris to -solaris2
+
+Thu Jul 1 15:46:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in: Use config/mh-riscos for mips-*-sysv*.
+
+Wed Jun 30 09:31:58 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: Correct error message for missing Makefile.in to
+ print correct directory.
+
+Tue Jun 29 13:52:16 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * install.sh: kludge around 386BSD shell bug
+
+Tue Jun 29 13:06:49 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * config.guess: Recognize NeXT.
+ * config.guess: Recognize i486-ncr-sysv4.
+ * Makefile.in (taz): rm $(TOOL)-$$VER before linking.
+
+Tue Jun 29 12:50:57 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (MAKEINFOFLAGS): New variable.
+ (FLAGS_TO_PASS): Pass MAKEINFO as MAKEINFO MAKEINFOFLAGS.
+ * build-all.mk, test-build.mk: Pass down --no-split as
+ MAKEINFOFLAGS when hosted on DOS. Compile DOS hosted without -g.
+
+Thu Jun 24 13:39:11 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in (DEVO_SUPPORT): Add COPYING COPYING.LIB install.sh.
+
+Wed Jun 23 12:59:21 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in (libg++.tar.z): New rule.
+ * Makefile.in (taz): Replace 'configure -rm' by 'make distclean'.
+ * Makefile.in (taz): Only do a single chmod.
+
+Fri Jun 18 12:03:10 1993 david d `zoo' zuhn (zoo at majipoor.cygnus.com)
+
+ * install.sh: don't use dirname anymore (replaced with sed usage)
+
+Thu Jun 17 18:43:42 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in: Change extension for gzip'd files from '.z' to
+ '.gz' per new FSF standard usage.
+
+Thu Jun 17 16:58:50 1993 david d `zoo' zuhn (zoo at majipoor.cygnus.com)
+
+ * configure: put quotes around the final value of program_transform_name
+
+Tue Jun 15 16:48:51 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: new install.sh support; update install-info rules
+
+Wed Jun 9 12:31:34 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Build diff for crosses, but not for go32 host.
+
+ * configure.in: Build gprof only for native, and don't build it
+ for mips-*-*, rs6000-*-*, or i[34]86-*-sco*.
+
+Mon Jun 7 13:12:11 1993 david d `zoo' zuhn (zoo at deneb.cygnus.com)
+
+ * configure.in: don't build gas,ld,binutils on for *-*-sysv4
+
+Mon Jun 7 11:40:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * configure.in (host_tools): Add prms.
+
+Fri Jun 4 13:30:42 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: install gcc, do installation of $(INSTALL_MODULES)
+ with $(FLAGS_TO_PASS) on the command line
+
+ * config.sub: Recognize lynx and lynxos
+
+Fri Jun 4 10:59:56 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config.sub: Accept -ecoff*, not just -ecoff.
+
+Thu Jun 3 17:38:54 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (taz): Use .gz suffix instead of .z.
+ (binutils.tar.gz, gas+binutils.tar.gz, gas.tar.gz): Fixed target
+ names.
+
+Thu Jun 3 00:27:06 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in (vault-install): add an 'else true' (for Ultrix)
+
+Wed Jun 2 18:19:16 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in (install-no-fixedincludes): install gcc last, so
+ that rebuilds that might happen during 'make install' don't get
+ bogus gcc include files
+
+Wed Jun 2 16:14:10 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ Change from Utah for HPPA support:
+ * config.guess: Recognize hppa1.x-hp-bsd.
+
+Wed Jun 2 11:53:33 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * config.guess: Add support for Motorola Delta 68k, up to r3v7.
+ Patch from pot@fly.cnuce.cnr.it (Francesco Potorti`).
+
+Tue Jun 1 17:48:42 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config.sub: Add support for rom68k and bug boot monitors.
+
+Mon May 31 09:36:37 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * Makefile.in: Make all-opcodes depend on all-bfd.
+
+Thu May 27 08:05:31 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config.guess: Added special check for i[34]86-univel-sysv4*.
+
+Wed May 26 16:33:40 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config.guess: For i[34]86-unknown-sysv4 use UNAME_MACHINE for
+ the processor rather than assuming i486.
+
+Wed May 26 09:40:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.guess: Recognize SunOS6 as Solaris3.
+
+Tue May 25 23:03:11 1993 Per Bothner (bothner@cygnus.com)
+
+ * config.guess: Fix typo. Avoid #elif (not in K&R 1).
+ Recognize SunOS 5.* only (and not [6-9].*) as being Solaris2.
+
+Tue May 25 12:44:18 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * build-all.mk (all-cross): New target for Canadian Cross.
+ Added Q2 go32 targets.
+ * test-build.mk: Configure go32 cross sparclite-aout and
+ mips-idt-ecoff -with-gnu-ld. Moved build binary directory from
+ PARTIAL_HOLE_DIRS to BUILD_HOLES_DIRS.
+
+Mon May 24 15:30:06 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: fix Alpha GDB typo; also, don't build DejaGnu for
+ GO32 hosted toolchains
+
+Mon May 24 14:18:41 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * configure: change so "-exec-prefix" gets passed down rather
+ than "-exec_prefix" so autoconf generated Makefiles get the
+ exec_prefix set right.
+
+Fri May 21 10:42:25 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config.guess: get the Solaris2 minor version number
+
+ * Makefile.in: add standards.texi and make-stds.texi to ETC_SUPPORT
+
+Fri May 21 06:20:52 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * config.guess: Recognize some Sequent platforms.
+
+Thu May 20 14:33:48 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: added the vault-install target
+
+ * configure.in: actually use the Sun3 makefile fragment that's in
+ config, also added the release dir to configdirs
+
+Thu May 20 14:19:18 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (taz): Fix modes on stuff in $(TOOL) dir also.
+
+Tue May 18 20:26:41 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: remove some program from Alpha targetted toolchains
+
+Tue May 18 15:23:19 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * Makefile.in (DISTSTUFFDIRS): Renamed from PROTODIRS. Add ld and
+ gprof.
+ (taz): Run "make diststuff" in those directories instead of "make
+ proto-dir". Look for "VERSION=" only at start of line in subdir
+ Makefile. Use "gzip -9" for compression.
+ (TEXINFO_SUPPORT, DIST_SUPPORT, BINUTILS_SUPPORT_DIRS): New vars.
+ (binutils.tar.z): New target.
+
+Mon May 17 17:01:15 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * Makefile.in (taz): Include gpl.texinfo.
+
+Fri May 14 06:48:38 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * Makefile.in (setup-dirs): Merged into "taz" target.
+ (taz): Only do `proto-dir' stuff if a directory is actually needed
+ for this target.
+
+Wed May 12 13:09:44 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (MUNCH_NM): New variable, defined to be $(NM).
+ (FLAGS_TO_PASS): Pass down MUNCH_NM.
+ (HOST_CC, HOST_PREFIX, HOST_PREFIX_1): New variables.
+ (EXTRA_GCC_FLAGS): Pass down HOST_* variables.
+ (gcc-no-fixedincludes): Correct for current gcc Makefile.
+
+Tue May 11 10:14:25 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (make-gdb.tar.Z): Add configure, config.guess,
+ config.sub, and move-if-change to gdb testsuite distribution
+ archive, so the testsuite can be extracted, configured, and
+ run separately from the gdb distribution. Blow away the Chill
+ tests that require a Chill compiled executable, since GNU Chill
+ is not yet publically available.
+
+Mon May 10 17:22:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * test-build.mk: set environment variables in a single command,
+ instead of a list of assignments and exports
+
+ * config.guess: recognize Alpha/OSF1 systems
+
+Mon May 10 14:55:51 1993 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * configure: Change help message to prefer --options rather than
+ -options.
+
+Mon May 10 05:58:35 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config.sub: Convergent Tech. "miniframe" uses m68010, sez
+ zippy@ecst.csuchico.edu.
+ * config.guess: Recognize miniframe.
+
+Sun May 9 17:47:57 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Makefile.in: Use srcroot to find runtest rather than rootme.
+ Pass RUNTESTFLAGS and EXPECT down in BASE_FLAGS_TO_PASS.
+
+Fri May 7 14:55:59 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * test-build.mk: Extensive additions to support building on a
+ machine other than the host.
+
+Wed May 5 08:35:04 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * configure (tooldir): Fix for i386-aix again.
+
+Mon May 3 19:00:27 1993 Per Bothner (bothner@cygnus.com)
+
+ * configure, Makefile.in: Change definition of $(tooldir)
+ to match the FSF.
+
+Fri Apr 30 15:55:21 1993 Fred Fish (fnf@cygnus.com)
+
+ * config.guess: Recognize i[34]86/SVR4.
+
+Fri Apr 30 15:52:46 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * Makefile.in (all-gdb): gdb depends on sim.
+
+Thu Apr 29 23:30:48 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (gdb.tar.Z): Make prototype gdb testsuite directory
+ at the same time we make the prototype gdb directory.
+ * Makefile.in (make-gdb.tar.Z): Make the testsuite distribution
+ files at the same time as the gdb base release distribution.
+
+Thu Apr 29 12:50:37 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (check): Use individual check targets rather than
+ DO_X rule.
+ (check-gcc): Added.
+
+Thu Apr 29 09:50:07 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * config.sub: Use sysv3.2 not sysv32 for canonical OS
+ for System V release 3.2.
+
+Thu Apr 29 10:33:22 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config.sub: Recognize hppaosf.
+ * configure.in: Do configure ld/binutils/gas for it.
+
+Tue Apr 27 06:25:34 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * configure (tooldir): Alter syntax used to set this, for systems
+ where "\$" isn't handled right, like i386-aix.
+
+Thu Apr 22 08:17:35 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: Pass program-transform-name, not
+ program_transform_name, to recursive configures.
+
+Thu Apr 22 02:58:21 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * Makefile.in (gas+binutils.tar.z): New rule for building snapshots
+ of gas+ld+binutils.
+
+Mon Apr 19 17:41:30 1993 Per Bothner (bothner@cygnus.com)
+
+ * config.guess: Recognize AIX3.2 as distinct from 3.1.
+
+Sat Apr 17 17:19:50 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: rename m88k-motorola-m88kbcs to m88k-motorola-sysv
+
+ * config/mh-delta88: remove extraneous GCC references
+
+Tue Apr 13 16:52:16 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * Makefile.in (PRMS): Set back to all-prms.
+
+Sat Apr 10 12:04:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * test-build.mk: Pass -with-gnu-as for known MIPS native and MIPS
+ targets, rather than for MIPS hosts.
+
+Fri Apr 9 13:51:06 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: add comment for --with-x default values
+
+ * config.guess: handle Motorola Delta88 box for SVR3 and SVR4.
+
+ * Makefile.in: add check-* targets for each of the directories in
+ the tree. Add a definition of RUNTEST that will use the one we
+ just built, if it exists. Pass this down via FLAGS_TO_PASS.
+
+Thu Apr 8 09:21:30 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Removed obsolete references to bfd_target and
+ target_makefile_frag.
+
+ * build-all.mk: Set assorted targets for Q2.
+ * config.sub: Recognize z8k-sim and h8300-hms.
+ * test-build.mk: Really don't pass host to configure.
+ (HOLES): Added uname.
+
+Wed Apr 7 15:48:19 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: Handle an empty program-prefix, program-suffix or
+ program-transform-name correctly.
+
+Tue Apr 6 13:48:41 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * build-all.mk: -G 8 no longer required for MIPS targets.
+ * test-build.mk: Don't pass host argument to configure; make it
+ guess.
+
+Tue Apr 6 10:36:53 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (gdb.tar.Z): Fix for building gzip'd distribution.
+ * Makefile.in (COMPRESS): New macro, like GZIP.
+
+Fri Apr 2 09:02:31 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * test-build.mk: Use -with-gnu-as for mips-sgi-irix4 as well.
+
+ * build-all.mk: Set GCC to gcc -O -G 8 for MIPS targets, since gcc
+ with gas currently defaults to -G 0.
+
+Thu Apr 1 08:25:42 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (all-flex): flex depends on byacc.
+
+ * build-all.mk: If host not specified, use config.guess. Pass TAG
+ to test-build.mk as RELEASE_TAG.
+ * test-build.mk (configargs): New variable containing arguments to
+ pass to configure. Set to -with-gnu-as on mips-dec-ultrix.
+ (FLAGS_TO_PASS): Pass down RELEASE_TAG.
+
+ * config.guess: Use /bin/uname when checking -X argument on SCO,
+ to avoid invoking GNU uname which doesn't understand -X.
+
+ * test-build.mk: Don't use /usr/unsupported/bin/as on AIX.
+
+ * configure.in: Build gas for mips-*-*.
+
+Wed Mar 31 21:20:58 1993 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in (all.normal): insert missing backslash.
+
+Wed Mar 31 12:31:56 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * build-all.mk, config/mh-irix4: Bump -XNh value to 1500 to match
+ gcc requirements.
+
+ * Makefile.in: Complete overhaul to merge many almost identical
+ targets.
+
+Tue Mar 30 20:17:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (setup-dirs-gdb): Renamed from setup-dirs.
+ (gdb.tar.Z): Adjusted.
+
+ * Makefile.in (setup-dirs, taz): New targets; should be general
+ enough to adapt for gdb sometime. Build only .z file.
+ (gas.tar.z): New target.
+
+Tue Mar 30 10:03:09 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * build-all.mk: Use CC=cc -Xs on Solaris.
+
+Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/mh-sun3: cc needs -J to compile cp-parse.c correctly
+
+ * config/mh-solaris: SunPRO C needs -Xs to be able to get a
+ working xmakefile for Emacs.
+
+Thu Mar 25 15:14:30 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in: Incorporate changes suggested by wilson@cygnus.com
+ for handling BISON for FSF releases.
+
+Thu Mar 25 06:19:48 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * configure: Actually implement the change zoo just documented.
+
+Wed Mar 24 13:02:44 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
+
+ * configure: when using config.guess, only set target_alias when
+ it's not already been set (ie, on the command line)
+
+Mon Mar 22 23:07:39 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: add installcheck target, set PRMS to install-prms
+
+Sun Mar 21 16:46:12 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure: add support for package_makefile_fragment, handle the
+ case where a directory has a configure.in file but no Makefile.in
+ more gracefully (with an actual understandable error message, even);
+ add support for --without (and add this to the usage message); also
+ explicitly add a --host=${host_alias} to the command line when
+ config.guess is used
+
+Sun Mar 21 12:11:58 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * configure: Must use both --host and --target in recursive calls.
+
+Thu Mar 18 12:31:35 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: Change deja-gnu to dejagnu.
+
+Mon Mar 15 15:44:35 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in (h8300-*-*, h8500-*-*): Don't build libg++.
+
+Fri Mar 12 18:30:14 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: canonicalize all instances to *-*-solaris2*,
+ also strip out a number of tools to not build for go32 host
+
+Wed Mar 10 12:08:27 1993 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * config.guess: add GPL.
+
+ * Makefile.in, config.guess, config.sub, configure: bump
+ copyrights to 93.
+
+Wed Mar 10 07:12:48 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (do-info): Removed obsolete check for existence of
+ localenv file.
+
+ * Makefile.in (MAKEOVERRIDES): Define to be empty.
+
+Wed Mar 10 03:11:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: a couple of 'else true' for decstation,
+ support for TclX
+
+ * configure.in: configure tclX too; don't remove Tk on RS/6000 anymore
+
+Tue Mar 9 16:06:12 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in (setup-dirs): change invocation of make to $(MAKE).
+
+Mon Mar 8 14:52:11 1993 Ken Raeburn (raeburn@cambridge)
+
+ * config.guess: Recognize i386-ibm-aix (PS/2).
+ * configure.in: Use config/mh-aix386 file for it.
+
+Mon Mar 8 11:12:43 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (GCC_FOR_TARGET): Eliminated definition; use
+ CC_FOR_TARGET instead.
+ (BASE_FLAGS_TO_PASS): Pass GCC_FOR_TARGET=$(CC_FOR_TARGET).
+
+Wed Mar 3 16:00:28 1993 Steve Chamberlain (sac@ok.cygnus.com)
+
+ * Makefile.in: Add sim to list of directories sent with gdb
+
+Wed Mar 3 11:42:39 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * configure.in: Put back mips-dec-bsd* case.
+
+Tue Mar 2 21:15:58 1993 Fred Fish (fnf@cygnus.com)
+
+ (Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
+ * configure.in (vax-*-ultrix2*): Add Ultrix 2.2 triplet.
+ * config.guess: Change 'VAX*:ULTRIX:*:*' to 'VAX*:ULTRIX*:*:*'.
+ * config/mh-vaxult2: New file.
+
+Tue Mar 2 18:11:03 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: remove no-op mips-dec-bsd* in "case $target"
+
+ * Makefile.in (dir.info): only run gen-info-dir if it exists,
+ (install-info): install dir.info only if it exists,
+ (all-expect, install-expect): pass along X11_FLAGS_TO_PASS
+
+Tue Mar 2 09:01:30 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * configure.in: For vms target, skip bfd, ld, binutils. Do build
+ gas for mips-dec-bsd.
+
+Tue Mar 2 08:35:24 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure (makesrcdir): If ${srcdir} is relative and not ".",
+ and ${subdir} is not ".", set makesrcdir based on ${invsubdir}.
+
+Tue Feb 23 14:18:28 1993 Mike Werner (mtw@poseidon.cygnus.com)
+
+ * configure.in: Added "dejagnu" to hosttools list.
+
+Mon Feb 22 23:28:38 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * config.sub, configure.in, config.guess: Add support
+ for Bosx, an AIX variant from Bull.
+ Patches from F.Pierresteguy@frcl.bull.fr.
+
+Sun Feb 21 11:15:22 1993 Mike Werner (mtw@poseidon.cygnus.com)
+
+ * devo/dejagnu: Initial creation of devo/dejagnu.
+ Migrated dejagnu testcases and support files for testing software
+ tools to reside as subdirectories, currently called "testsuite",
+ within the directory of the software tool. Migrated all programs,
+ support libraries, etc. beloging to dejagnu proper from
+ devo/deja-gnu to devo/dejagnu. These files were moved "as is"
+ with no modifications. The changes to these files which will
+ allow them to configure, build, and execute properly will be made
+ in a future update.
+
+Fri Feb 19 20:19:39 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * Makefile.in: Change send_pr to send-pr.
+ * configure.in: Likewise.
+ * send_pr: Renamed directory to send-pr.
+
+Fri Feb 19 19:00:13 1993 Per Bothner (bothner@cygnus.com)
+
+ * Makefile.in: Add some extra semi-colons (needed if SHELL=bash).
+
+Fri Feb 19 00:59:33 1993 John Gilmore (gnu@cygnus.com)
+
+ * README: Update for gdb-4.8 release.
+ * Makefile.in (gdb.tar.Z): Add texinfo/tex3patch. Build
+ gdb-xxx.tar.z (gzip'd) file also.
+
+Thu Feb 18 09:16:17 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: make all-diff depend on all-libiberty
+
+Tue Feb 16 16:06:31 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * config.guess: add vax-ultrix in the spirit of mips-ultrix.
+
+Tue Feb 16 05:57:15 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in, Makefile.in: add hello, tar, gzip, recode, indent
+
+Tue Feb 16 00:58:20 1993 John Gilmore (gnu@cygnus.com)
+
+ * Makefile.in (DEVO_SUPPORT): Remove etc directory
+ (ETC_SUPPORT): Only add the files GDB wants from etc/.
+ (gdb.tar.Z): Use ETC_SUPPORT. Use byacc when building the file.
+
+Thu Feb 11 20:14:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: makeinfo binary is in a new location
+
+Tue Feb 9 12:42:27 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config.sub: Accept -ecoff as an OS.
+
+ * Makefile.in: Various changes to eliminate a level of make
+ recursion and reduce the required command line length.
+ (BASE_FLAGS_TO_PASS): New variable holding flags passed to all
+ sub-makes.
+ (EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS, EXTRA_GCC_FLAGS): New
+ variables holding settings for specific sub-makes.
+ (FLAGS_TO_PASS, TARGET_FLAGS_TO_PASS, GCC_FLAGS_TO_PASS): Rewrote
+ in terms of BASE_FLAGS_TO_PASS.
+ (TARGET_LIBS): New variable listing directories which use
+ TARGET_FLAGS_TO_PASS.
+ (subdir_do): Eliminated.
+ (do-*): New set of targets to replace subdir_do.
+ (various): All targets which used subdir_do now depend on do-*.
+ (local-clean): Renamed from do_clean.
+ (local-distclean): New target, dependency of distclean and
+ realclean.
+ (install-info): Don't create directories. Depend on dir.info
+ rather than calling make recursively.
+ (install-dir.info): Eliminated.
+ (install-info-dirs): Create all info directories here.
+ (dir.info): Depend upon do-install-info.
+
+ * test-build.mk (HOLES): Added false.
+
+Sat Feb 6 14:05:09 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * config.guess: Recognize BSDI and BSDJ (Jolitz 386bsd).
+
+Thu Feb 4 20:49:18 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in (info): remove dependency on all-texinfo. The
+ problem was really in texinfo/C, not at this level.
+
+Thu Feb 4 13:38:41 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (info): Added dependency on all-texinfo (PR 2112).
+
+Thu Feb 4 01:50:53 1993 John Gilmore (gnu@cygnus.com)
+
+ * Makefile.in (make-gdb.tar.Z): Change BISON to 'bison -y' for
+ GDB releases.
+
+Wed Feb 3 17:22:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure: Include srcdir in message about target of link not
+ being found. Don't convert `-' to `_' in `with' options being
+ passed to subdirs.
+
+Tue Feb 2 18:57:59 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: add uudecode to host_tools
+
+ * Makefile.in: added {all,install}-uudecode targets, added them to
+ the appropriate lists
+
+Tue Feb 2 11:45:53 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (all-gcc): Added dependency on all-gas.
+
+ * configure.in (mips-*-*): Build ld and binutils.
+
+Mon Feb 1 12:35:41 1993 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * configure: check return code from mkdir, print error message and
+ exit on failure.
+
+Sat Jan 30 16:40:28 1993 John Gilmore (gnu@cygnus.com)
+
+ * Makefile.in (make-gdb.tar.Z): New location for texinfo.tex.
+
+Thu Jan 28 15:09:59 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * test-build.mk (HOLES): Added tar, cpio and uudecode.
+
+Wed Jan 27 16:50:32 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * config.sub (h8500): Recognize this as a cpu type.
+
+Sat Jan 23 20:32:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure: source directory missing is no longer a warning
+
+ * configure.in: recognize irix[34]* instead of irix[34]
+
+ * Makefile.in: define and pass down X11_LIB
+
+ * config/mh-sco: define X11_LIB to the mess that SCO ODT requires
+
+Sat Jan 23 13:49:40 1993 Per Bothner (bothner@cygnus.com)
+
+ * guess-systype: Renamed to ...
+ * config.guess: ... by popular request.
+ * configure.in, Makefile.in: Update accordingly.
+
+Thu Jan 21 12:20:55 1993 Per Bothner (bothner@cygnus.com)
+
+ * guess-systype: Patches from John Eaton <jwe@che.utexas.edu>:
+ + Add Convex, Cray/Unicos, and Encore/Multimax support.
+ + Execute ./dummy instead of assuming . is in PATH.
+
+Tue Jan 19 17:18:06 1993 Per Bothner (bothner@cygnus.com)
+
+ * guess-systype: New shell script. Attempts to guess the
+ canonical host name of the executing host.
+ Only a few hosts are supported so far.
+ * configure: Call guess-systype if no host is specified.
+
+Tue Jan 19 08:26:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (gcc-no-fixedincludes): Made to work with current
+ gcc Makefile.
+
+
+Fri Jan 15 10:27:02 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (GCC_FLAGS_TO_PASS): New variable.
+ (all-gcc, install-gcc, subdir_do): Use it.
+
+Wed Jan 13 17:06:45 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * Makefile.in: Rename uninstalled gcc driver from gcc to xgcc.
+
+Wed Jan 6 20:29:16 1993 Mike Werner (mtw@rtl.cygnus.com)
+
+ * Makefile.in: Removed explicit setting of SUBDIRS. SUBDIRS is now
+ set exclusively by configure, using configure.in .
+
+Wed Jan 6 13:44:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * test-build.mk: set $PATH for all builds
+
+ * Makefile.in: pass TARGET_FLAGS_TO_PASS for xiberty and libm
+
+Wed Jan 6 11:02:10 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (GCC_FOR_TARGET): Supply a default that matches
+ the one used in gcc/Makefile.in, so that a null expansion doesn't
+ override the one needed to build gcc with a native cc.
+
+
+Tue Jan 5 07:55:12 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure: Accept -with arguments.
+
+Sun Jan 3 15:15:09 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * Makefile.in: added h8300sim
+
+Tue Dec 29 15:06:00 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/mh-sco: Don't override BISON definition.
+
+ * build-all.mk: If canonhost is i386-unknown-sco3.2v4, change it
+ to i386-sco3.2v4. Set TARGETS and CFLAGS for i386-sco3.2v4.
+ (all-cygnus, native, build-cygnus): Make
+ $(canonhost)-stamp-3stage-done, not $(host)....
+ * test-build.mk (stamp-3stage-compared): Use tail +10c for
+ i386-sco3.2v4. Added else true to if command.
+
+Mon Dec 28 12:08:56 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config.sub: (from FSF) Sequent uses a BSD-like OS.
+
+Mon Dec 28 08:32:06 1992 Minh Tran-Le (mtranle@paris.intellicorp.com)
+
+ * configure.in (i[34]86-*-isc*): added; uses mh-sysv.
+
+Thu Dec 24 17:26:24 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: don't remove binutils from Solaris builds
+
+Thu Dec 24 14:08:38 1992 david d`zoo' zuhn (zoo@cygnus.com)
+
+ * Makefile.in: get rid of earlier definitions for *clean,
+ also handle the recursive info rule better
+
+Thu Dec 24 12:40:21 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in (mostlyclean, distclean, realclean): Fix to
+ do more-or-less the right thing.
+
+Wed Dec 16 10:25:31 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: Add lines defining CC and CXX, and use CXX rather
+ than gcc in definitions of CXX_FOR_BUILD and CXX_FOR_TARGET.
+
+Tue Dec 15 00:34:32 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: change all $(host_cpu)-$(host_vendor)-$(host_os) to
+ $(host_canonical).
+
+ * configure.in: split the configdirs list into 4 categories (native
+ v. cross, library v. tool) and handle the cross-only and native-
+ only in more reasonable (and correct!) way.
+
+Mon Dec 14 17:04:22 1992 Stu Grossman (grossman at cygnus.com)
+
+ * configure.in (hppa*-*-*): Don't remove bfd and gdb from
+ configdirs anymore.
+
+Sun Dec 13 00:37:26 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: extensive cleanup:: removed all of the explicit
+ clean-* targets, collapsed many wrappers around subdir_do into
+ one, added additional targets to satisfy standards.texi, deleted
+ some old targets, some changes for consistency
+
+Fri Dec 11 20:18:02 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: handle some programs as cross-only, and others as
+ native only
+
+ * test-build.mk: handle partial holes in a more generic manner
+
+ * Makefile.in: m4 depends on libiberty
+
+Mon Dec 7 06:43:27 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/mh-sco: don't default $(CC) to gcc
+
+Thu Dec 3 21:52:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: add m4, textutils, fileutils, sed, shellutils,
+ time, wdiff, and find to configdirs
+
+ * Makefile.in: all, clean, and install rules for the new programs
+ added to configure.in
+
+Mon Nov 30 14:54:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: use mh-sun for all *-sun-* hosts
+
+ * config/mh-solaris: rework standard X location to use
+ $OPENWINHOME, if defined.
+
+ * config/mh-sun: handle X11 include locations
+
+ * config/mh-decstation: define NeedFunctionPrototypes to 0, to
+ work around dain-bramaged DECwindows include files
+
+Fri Nov 27 18:35:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: define flags for X11 include files and library file
+ locations, pass them down to the programs that need this info
+
+ * build-all.mk: added a 'native' target, to 3stage the native toolchain
+
+ * config/{mh-hpux,mh-solaris}: define the "standard" locations for
+ the vendor supplied X11 headers and libraries
+
+Sun Nov 22 18:59:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: start building libg++ for HP-UX targets
+
+Wed Nov 18 19:33:11 1992 John Gilmore (gnu@cygnus.com)
+
+ * README: Update references to files moved into etc/.
+
+Sun Nov 15 09:36:08 1992 Fred Fish (fnf@cygnus.com)
+
+ * config.sub (i386sol2, i486sol2): i[34]86-unknown-solaris2.
+ * configure.in (i[34]86-*-solaris2*): Use config/mh-sysv4.
+
+Thu Nov 12 08:50:42 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: accept dash as well as underscore in long option
+ names for FSF compatibility.
+
+Wed Nov 11 08:04:37 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * config.sub: added -sco3.2v4 support from FSF.
+
+Sun Nov 8 21:14:30 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: expand the section that adds or removes
+ directories from the list of programs to build, to handle native
+ vs. cross in addition to host v. native
+
+Sat Nov 7 18:52:27 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in: Replace C++ in macro names with CXX.
+ This is less likely to break ...
+
+Sat Nov 7 15:16:58 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * test-build.mk: add -w to GNU_MAKE
+
+Fri Nov 6 23:10:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config.sub: remove 'sparc'-->'sparc-sun' default transformation,
+ add 'sparc' to list of recognized cpus. This needed to make
+ 'sparc-aout' expand to 'sparc-unknown-aout' instead of 'sparc-sun-aout'.
+ Delete some redundant ose68 variants. Recognize -wrs as an os,
+ then changes that into $CPU-wrs-vxworks.
+
+ * configure.in: remove most references to gdbtest, regularize
+ target based program removal
+
+ * test-build.mk: import from p3 tree (many fixes and changes)
+
+Fri Nov 6 20:59:00 1992 david d `zoo' zuhn (zoo@cygnus.com)
+
+ * Makefile.in: added rules to handle tcl, tk, and expect
+
+ * configure.in: handle those directories if they exist
+
+Thu Nov 5 14:35:41 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config.sub: removed bogus hppabsd and hppahpux names, since
+ "hppa" is not a valid cpu (hppa1.1 or hppa1.0 are, though)
+
+Thu Oct 29 00:12:41 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: all-gcc now depends on all-binutils. all-libg++
+ depends upon all-xiberty
+
+ * Makefile.in: changes from p3, including:
+
+ Thu Oct 8 15:00:17 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (XTRAFLAGS): include newlib directories if
+ newlib/Makefile exists, rather than if host != target.
+
+ Fri Sep 25 13:41:52 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: added -nostdinc to XTRAFLAGS if we are using gcc
+ from the same source tree and not building a cross-compiler. This
+ matters for the libg++ configuration if reconfiguring a tree that
+ has already been installed.
+
+ Thu Sep 10 10:35:51 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: added -I for newlib/targ-include to XTRAFLAGS, to
+ pick up the machine and system specific header files.
+
+ * Makefile.in: added AS_FOR_TARGET, passed down in
+ TARGET_FLAGS_TO_PASS. Added CC_FOR_BUILD, which is intended to be
+ the C compiler to use to create programs which are run in the
+ build environment, set it to default to $(CC), and passed it down
+ in FLAGS_TO_PASS and TARGET_FLAGS_TO_PASS.
+
+ Mon Sep 7 22:34:42 1992 Ian Lance Taylor (ian@cirdan.cygnus.com)
+
+ * Makefile.in: add $(host) = $(target) tests back to *_FOR_TARGET.
+ We need them for unusual native builds, like systems without
+ ranlib.
+
+ * configure: also define $(host_canonical) and
+ $(target_canonical), which are the full, canonical names for the
+ given host and target
+
+Sun Nov 1 16:38:17 1992 Per Bothner (bothner@cygnus.com)
+
+ * Makefile.in: Added separate definitions for C++.
+
+Fri Oct 30 11:37:52 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in (configdirs): Add deja-gnu.
+
+Fri Oct 23 00:39:18 1992 John Gilmore (gnu@cygnus.com)
+
+ * README: Update for configure.texi and gdb-4.7 release.
+
+Wed Oct 21 21:54:27 1992 John Gilmore (gnu@cygnus.com)
+
+ * Makefile.in: Move "all" target to top of file.
+ Previously, first target was ".PHONY" which caused BSD4.4 make
+ to build .PHONY when make was run without arguments.
+
+Mon Oct 19 01:17:54 1992 John Gilmore (gnu@cygnus.com)
+
+ * Makefile.in: Add COPYING.LIB to GDB releases, now that there's
+ Library-copylefted code in libiberty.
+
+Tue Oct 13 01:22:32 1992 John Gilmore (gnu@cygnus.com)
+
+ * config.sub: Replace m68kmote with plain old m68k.
+
+Fri Oct 9 03:14:24 1992 John Gilmore (gnu@cygnus.com)
+
+ * Makefile.in: Remove space from blank line, avoid Make complaints.
+
+Thu Oct 8 18:41:45 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config.sub: Complain if no argument is given. Added support for
+ 386bsd as OS and target alias.
+
+Thu Oct 8 15:07:22 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (XTRAFLAGS): include newlib directories if
+ newlib/Makefile exists, rather than if host != target.
+
+Mon Oct 5 03:00:09 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * config.sub: recognize sparclite-wrs-vxworks.
+
+ * Makefile.in (install-xiberty): added *-xiberty make rules (from
+ p3.) Added clean-xiberty to clean.
+
+Thu Oct 1 17:59:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: use *-*-* instead of nested cases for host and target
+
+Tue Sep 29 14:11:18 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: added -nostdinc to XTRAFLAGS if we are using gcc
+ from the same source tree and not building a cross-compiler. This
+ matters for the libg++ configuration if reconfiguring a tree that
+ has already been installed.
+
+Sep 20 08:53:10 1992 Fred Fish (fnf@cygnus.com)
+
+ * config.sub (i486v/i486v4): Merge in from FSF version.
+
+Fri Sep 18 00:32:00 1992 Mark Eichin (eichin@cygnus.com)
+
+ * configure: only set PWD if it is already set.
+
+Thu Sep 17 23:05:53 1992 Mark Eichin (eichin@cygnus.com)
+
+ * configure: just set PWD=`pwd` at the top, since Ultrix sh
+ doesn't have unset and all success paths (and most error paths)
+ out set it anyway. (Note: should change all uses of ${PWD=`pwd`}
+ to just ${PWD} to avoid confusion.)
+
+Tue Sep 15 16:00:54 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: always set $(tooldir) to $(libdir)/$(target_alias),
+ even for a native compilation.
+
+Tue Sep 15 02:22:56 1992 John Gilmore (gnu@cygnus.com)
+
+ Changes to make the gdb.tar.Z rule work better.
+
+ * Makefile.in (GDB_SUPPORT_DIRS): Add opcodes.
+ (DEVO_SUPPORT): Add configure.texi.
+ (bfd-ilrt.tar.Z): Remove ancient rule.
+
+Thu Sep 10 10:43:19 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: added -I for newlib/targ-include to XTRAFLAGS, to
+ pick up the machine and system specific header files.
+
+ * configure.in, config.sub: added new target m68010-adobe-scout,
+ with alias of adobe68k. Changed configure.in to check for
+ -scout before -sco* to avoid a false match.
+
+ * Makefile.in: added AS_FOR_TARGET, passed down in
+ TARGET_FLAGS_TO_PASS. Added CC_FOR_BUILD, which is intended to be
+ the C compiler to use to create programs which are run in the
+ build environment, set it to default to $(CC), and passed it down
+ in FLAGS_TO_PASS and TARGET_FLAGS_TO_PASS.
+
+Wed Sep 9 12:21:42 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: added TARGET_FLAGS_TO_PASS, CC_FOR_TARGET,
+ AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET. Pass
+ TARGET_FLAGS_TO_PASS, which defines CC, AR, RANLIB and NM as the
+ FOR_TARGET variants, to newlib and libg++.
+
+Tue Sep 8 17:28:30 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (all-gas, all-gdb): Require all-opcodes to be built
+ first.
+
+Wed Sep 2 02:50:05 1992 John Gilmore (gnu@cygnus.com)
+
+ * config.sub: Accept `elf' as an environment.
+
+Tue Sep 1 15:48:30 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * Makefile.in (all-opcodes): cd into the right directory
+
+Sun Aug 30 21:12:11 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure: added -program_transform_name option, used as
+ argument to sed when installing programs.
+ configure.texi: added documentation for -program_prefix,
+ -program_suffix and -program_transform_name.
+
+Thu Aug 27 21:59:44 1992 John Gilmore (gnu@cygnus.com)
+
+ * config.sub: Accept i486 where i386 ok.
+
+Thu Aug 27 13:04:42 1992 Brendan Kehoe (brendan@rtl.cygnus.com)
+
+ * config.sub: accept we32k
+
+Mon Aug 24 14:05:14 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * config.sub, configure.in: accept OSE68000 and OSE68k.
+
+ * Makefile.in: don't create all directories for ``make install'';
+ let the subdirectories create the ones they need.
+
+Tue Aug 11 23:13:17 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * COPYING: new file, GPL v2
+
+Tue Aug 4 01:12:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: use the new gen-info-dir, which needs a template
+ argument (which also lives in texinfo)
+
+ * configure.texi, standards.texi: fix INFO-DIR-ENTRY
+
+Mon Aug 3 15:41:28 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/mh-solaris: removed the -xs from CFLAGS (let the people
+ with Sun's C compiler deal with it themselved)
+
+Mon Aug 3 00:34:17 1992 Fred Fish (fnf@cygnus.com)
+
+ * config.sub (ncr3000): Change i386 to i486.
+
+Thu Jul 23 00:12:17 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: add install-rcs, install-grep to
+ install-no-fixedincludes, removed install-bison and install-libgcc
+
+Tue Jul 21 01:01:50 1992 david d `zoo' zuhn (zoo@cygnus.com)
+
+ * configure.in: grab the HPUX makefile fragment if on HPUX
+
+Mon Jul 20 11:02:09 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * Makefile.in: eradicate bison spoor (ditto libgcc).
+ configure.in: recognise m68{k,000}-ericsson-OSE.
+ es1800 is alias for m68k-ericsson-OSE
+
+Sun Jul 19 17:49:02 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: rearrange the parts that remove programs from
+ configdirs, based now on HOST==TARGET or by canonical triple.
+
+Fri Jul 17 22:52:49 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * test-build.mk: recurse explicitly with -f test-build.mk when
+ appropriate. predicate stage3 and comparison on the existence
+ of gcc. That is, if gcc isn't around, we aren't three-staging.
+ On very clean, also remove ...stamp-co. Build in-place before
+ doing other builds.
+
+Thu Jul 16 18:33:09 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * Makefile.in, configure.in: add tgas
+
+Thu Jul 16 16:05:28 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: a number of changes merged in from progressive.
+
+ * configure.in: add libm.
+
+ * .cvsignore: ignore some stuff that comes from test-build.mk.
+
+Wed Jul 8 00:01:30 1992 Stu Grossman (grossman at cygnus.com)
+
+ * config/mh-solaris: Use -xs when compiling so that Sun-C puts
+ a symbol-table into the executable.
+
+Tue Jul 7 00:24:52 1992 Fred Fish (fnf@cygnus.com)
+
+ * config.sub: Add es1800 (m68k-ericsson-es1800).
+
+Tue Jun 30 20:24:41 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * configure: Add program_suffix (parallel to program_prefix)
+ * Makefile.in: adjust directory-creating script for losing decstation
+
+Mon Jun 22 23:43:48 1992 Per Bothner (bothner@cygnus.com)
+
+ * configure: Minor $subdir-related fixes.
+
+Mon Jun 22 18:30:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * configure: fix various problems with propogating
+ makefile_target_frag in subdirs.
+ * configure.in: config libgcc if its there
+
+Fri Jun 19 15:19:40 1992 Stu Grossman (grossman at cygnus.com)
+
+ * config.sub: HPPA merge.
+
+Mon Jun 15 12:31:52 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/mh-ncr3000 (INSTALL): Don't use /usr/ucb/install,
+ it is broken on ncr 3000's.
+
+Sun Jun 14 10:29:19 1992 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in: Replace all-bison with all-byacc in all
+ dependency lines for other tools (which now use byacc).
+
+Fri Jun 12 22:21:57 1992 John Gilmore (gnu at cygnus.com)
+
+ * config.sub: Add sun4sol2 => sparc-sun-solaris2.
+
+Tue Jun 9 17:18:11 1992 Fred Fish (fnf at cygnus.com)
+
+ * config/{mh-ncr3000, mh-sysv4}: Add INSTALL.
+
+Thu Jun 4 12:07:32 1992 Mark Eichin (eichin@cygnus.com)
+
+ * Makefile.in: make gprof rules similar to byacc rules (instead of
+ vestigal $(unsubdir) that didn't work...)
+
+Thu Jun 4 00:37:05 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * config.sub: Add support for Linux.
+ * Makefile.in: Use $(FLAGS_TO_PASS) more consistently
+ (at least for libg++).
+
+Tue Jun 02 20:03:00 1992 david d `zoo' zuhn (zoo@cygnus.com)
+
+ * configure.texi: fix doc for the -nfp option to configure
+
+Tue Jun 2 17:20:52 1992 Michael Tiemann (tiemann@cygnus.com)
+
+ * Makefile.in (all-binutils): ar needs flex, so depend on all-flex.
+
+Sun May 31 15:04:08 1992 Mark Eichin (eichin at cygnus.com)
+
+ * config.sub: changed [^-]+ to [^-][^-]* so that it works under
+ Sun sed. (BSD 4.3 sed doesn't handle [^-]+ either.)
+ * configure.in: added solaris* host_makefile_frag hook.
+
+Sun May 31 01:10:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config.sub: changed recognition of m68000 so that various
+ m68k types can be specified via m680[01234]0
+
+Sat May 30 21:01:06 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config.sub (basic_machine): fix sed so that '-foo' isn't
+ completely substituted out while .+'-foo' loses the '-foo'
+
+Wed May 27 23:18:52 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
+
+ * config.sub ($os): Add -aout.
+
+Fri May 22 14:00:02 1992 Per Bothner (bothner@cygnus.com)
+
+ * configure: If host_makefile_frag is absolute, don't
+ prefix ${invsubdir} (relevant to libg++ auto-configure).
+
+Thu May 21 18:00:09 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
+
+ * Makefile.in (tooldir): Define it.
+ (all-ld): Depend on all-flex.
+
+Sun May 10 21:45:59 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in (check): Fix libg++ special case.
+
+Fri May 8 08:31:41 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure: do not bury `pwd` into config.status, thus do fewer
+ pwd's.
+
+ * configure: print the "Building in" message only when building in
+ other than "." AND verbose.
+
+ * configure: remove -s, rework -v to better accomodate guested
+ configures.
+
+ * standards.texi: updated to 3 may, fixed librid <-> libdir typo.
+
+Fri May 1 18:00:50 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: macroize flags passed on recursion. remove
+ fileutils.
+
+Thu Apr 30 08:56:20 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure: get makesrcdir right for subdirs deeper than 1.
+
+ * Makefile.in: pass INSTALL, INSTALL_DATA, INSTALL_PROGRAM on
+ install.
+
+Fri Apr 24 15:51:51 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: don't print subdir_do or recursion lines.
+
+Fri Apr 24 15:22:04 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * standards.texi: added menu item.
+
+ * Makefile.in: build and install standards.info.
+
+ * standards.texi: new file.
+
+Wed Apr 22 18:06:55 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * configure: test for and move config.status pieces from
+ ${subdir}/.
+
+Wed Apr 22 14:38:34 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/mh-delta88, config/mh-ncr3000: Replace MINUS_G with
+ CFLAGS per new configuration strategy.
+ * configure: Test for existance of files before trying to mv
+ them, to avoid numerous non-existance messages.
+
+Tue Apr 21 12:31:33 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure: correct final line of config.status.
+
+ * configure: patch from eggert. Avoids a protection problem if
+ the original Makefile.in is read only.
+
+ * configure: use move-if-change from gcc to create config.status.
+ Some makefiles depend on config.status to tell if a directory
+ has been reconfigured for a different host. This change
+ prevents those directories from remaking everything in the case
+ where the reconfig was only intended to rebuild a Makefile.
+
+ * configure: test for config.sub with "config.sub sun4" rather
+ than "config.sub ${host_alias}". Otherwise we can't tell a bad
+ host alias from a missing config.sub.
+
+Mon Apr 20 18:16:36 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: explicitly pass CFLAGS on recursion. no longer pass
+ MINUS_G (this can be done with CFLAGS). Default CFLAGS to -g.
+
+Fri Apr 17 18:27:51 1992 Per Bothner (bothner@cygnus.com)
+
+ * configure: mkdir ${subdir} as needed.
+
+Wed Apr 15 17:37:22 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in,configure.in: added autoconf.
+
+Wed Apr 15 17:27:34 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: no longer pass against on recursion.
+
+ * Makefile.in: added .NOEXPORT: so that stray makefile_frag
+ definitions are not inherited.
+
+ * configure: correct makesrcdir when subdir is .
+
+Tue Apr 14 11:56:09 1992 Per Bothner (bothner@cygnus.com)
+
+ * configure: Add support for 'subdirs' variable, which is
+ like 'configdirs', except that configure doesn't re-invoke
+ itself for subdirs, it just creates a Makefile for each subdir.
+ * configure.texi: Document subdirs.
+
+Mon Apr 13 18:50:16 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: added flex to configdirs
+
+Mon Apr 13 18:43:55 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: remove clean-stamps from clean.
+
+Sat Apr 11 03:52:03 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Add gdbtest to configdirs.
+
+Fri Apr 10 23:11:49 1992 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (MINUS_G): Add macro, default to -g, pass on
+ to recursive makes.
+ * configure.in: Recognize new ncr3000 config.
+
+Wed Apr 8 23:08:12 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in, configure.in: removed references to gdbm.
+
+Tue Apr 7 16:48:20 1992 Per Bothner (bothner@cygnus.com)
+
+ * config.sub: Don't canonicalize os value
+ newsos* to bsd (readline needs to check for newsos).
+ (This fix was earlier made Jan 31, but got re-broken.)
+
+Mon Apr 6 14:34:08 1992 Stu Grossman (grossman at cygnus.com)
+
+ * configure.in: sco is an os, not a vendor!
+
+ * configure: Quote $( better. Keep various shells happy.
+
+Tue Mar 31 16:32:57 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: eliminate stamp-files.
+
+Mon Mar 30 22:20:23 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: add send_pr. remove "force" from .stmp-gprof rule.
+ Supress echoing of all the "if [ -d ... $(MAKE)" lines.
+
+Wed Mar 25 15:20:04 1992 Stu Grossman (grossman@cygnus.com)
+
+ * config.sub: fix iris/iris3.
+
+Wed Mar 25 10:34:19 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure: re-add -rm.
+
+Tue Mar 24 23:50:16 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Maskefile.in: add .stmp-rcs to all.
+
+ * configure.in: remove gas from rs6000 build, use aix host fragment.
+
+Mon Mar 23 19:43:35 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure: pass down site_option during recursion.
+
+Thu Mar 19 16:49:36 1992 Stu Grossman (grossman at cygnus.com)
+
+ * Makefile.in (all.cross): Add .stmp-bfd .stmp-readline.
+
+Wed Mar 18 15:29:33 1992 Mike Stump (mrs@cygnus.com)
+
+ * configure: Change exec_prefix so that it really defaults to prefix.
+
+Sat Mar 14 17:20:38 1992 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in, configure.in: Add support for mmalloc library.
+
+Fri Mar 13 18:44:18 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: add stmp dependencies for a few more things.
+
+Thu Mar 12 04:56:24 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure: adjusted error message on objdir/srcdir configure
+ collision, per john's suggestion.
+
+ * Makefile.in: add libiberty stmp to all and all.cross.
+
+Wed Mar 11 02:07:52 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: remove force dependencies, add grep to all.
+
+Tue Mar 10 21:49:18 1992 K. Richard Pixley (rich@mars.cygnus.com)
+
+ * Makefile.in: drop flex. make stamp files work.
+
+ * configure: added test for conflicting configuration in srcdir,
+ remove trailing slashes from srcdir. Otherwise emacs gdb mode
+ gets cranky. use relative paths for configure and srcdir
+ whenever possible. Send some error messages to stderr that were
+ going to stdout.
+
+Tue Mar 10 18:01:55 1992 Per Bothner (bothner@cygnus.com)
+
+ * Makefile.in: Fix libg++ rule to check for gcc directory
+ before using gcc/gcc. Also pass XTRAFLAGS.
+
+Thu Mar 5 21:45:07 1992 K. Richard Pixley (rich@sendai)
+
+ * Makefile.in: added stmp-files so that directories aren't polled
+ when they are already built.
+
+ * configure.texi: fixed a node pointer problem.
+
+Thu Mar 5 12:05:58 1992 Stu Grossman (grossman at cygnus.com)
+
+ * config.sub configure.in config/mh-irix4 gdb/configure.in
+ gdb/mips-tdep.c gdb/mipsread.c gdb/procfs.c gdb/signame.h
+ gdb/tm-irix3.h gdb/tm-mips.h gdb/xm-irix4.h gdb/config/mt-irix3
+ gdb/config/mh-irix4 texinfo/configure.in: Port to SGI Irix-4.x.
+
+Wed Mar 4 02:57:46 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * configure: -recurring becomes -silent. corrected help message
+ for -site= option.
+
+ * Makefile.in: mkdir $(exec_prefix) and $(tooldir).
+
+Tue Mar 3 14:51:21 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * configure: when building Makefile for crosses, replace
+ tooldir and program_prefix. default srcdir from location of
+ config.sub. remove "for host in hosts" and "for target in
+ targets" loops.
+
+Wed Feb 26 19:48:25 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: Do not pass bindir or mandir to cvs.
+
+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.
+
+ * configure.texi: remove most references to multiple hosts,
+ multiple targets, subdirs, etc.
+
+ * configure.man: removed rcsid. reference config.sub not
+ config.subr.
+
+ * Makefile.in: mkdir $(infodir) on install-info.
+
+Wed Feb 19 15:41:13 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.texi: Explain better about .gdbinit and about
+ the environment that configure.in sections run in.
+
+Fri Feb 7 07:55:00 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Ultrix is only a decstation if it's a MIPS.
+
+Fri Jan 31 21:54:51 1992 John Gilmore (gnu at cygnus.com)
+
+ * README: DOC.configure => cfg-paper.texi.
+
+Fri Jan 31 21:48:18 1992 Stu Grossman (grossman at cygnus.com)
+
+ * config.sub (near case $os): Don't convert newsos* to bsd!
+
+Fri Jan 31 02:27:32 1992 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in: Reinstall change from gdb-4.3 that reduces
+ the number of copies of COPYING that go into the GDB tar file.
+
+Thu Jan 30 16:17:30 1992 Stu Grossman (grossman at cygnus.com)
+
+ * bfd/configure.in, config/mh-sco, gdb/config/mh-i386sco,
+ gdb/config/mt-i386v32, gdb/configure.in, readline/configure.in:
+ Fix SCO configuration stuff.
+
+Tue Jan 28 23:51:07 1992 Per Bothner (bothner at cygnus.com)
+
+ * Makefile.in: For libg++, make sure the -I pointing
+ to the gcc directory goes *after* all the libg++-local -I flags.
+ Also, move just-gcc dependency from just-libg++ to all-libg++.
+
+Tue Jan 28 12:56:24 1992 Stu Grossman (grossman at cygnus.com)
+
+ * configure: Change -x to -f to keep Ultrix /bin/test happy.
+
+Sat Jan 18 17:45:11 1992 Stu Grossman (grossman at cygnus.com)
+
+ * Makefile.in (make-gdb.tar.Z): Remove texinfo targets.
+
+Sat Jan 18 17:03:21 1992 Fred Fish (fnf at cygnus.com)
+
+ * config.sub: Add stratus configuration frags. Also
+ submitted to FSF.
+
+Sat Jan 18 15:35:29 1992 Stu Grossman (grossman at cygnus.com)
+
+ * Makefile.in (DEV_SUPPORT): add configure.man.
+
+ * config.sub(Decode manufacturer-specific): add -none*.
+
+Fri Jan 17 17:58:05 1992 Stu Grossman (grossman at cygnus.com)
+
+ * Makefile.in: remove form feeds to make Sun's make happy.
+ (DEVO_SUPPORT): DOC.configure => cfg-paper.texi.
+
+Sat Jan 4 16:11:44 1992 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in (AR_FLAGS): Make quieter.
+
+Thu Jan 2 22:57:12 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Add libg++.
+ * configure: When verbose, don't output the command line at each
+ level; it will be unremarkably the same as the previous version,
+ which will be the same as what the user typed.
+
+Fri Dec 27 16:26:47 1991 K. Richard Pixley (rich at cygnus.com)
+
+ * configure.in, Makefile.in: fix clean-info, add flex. add
+ fileutils.
+
+ * configure: be less sensitive to spaces in Makefile.in. Do not
+ look for sources in "..". Doing so breaks subdirectories that
+ might have their own configure. If a subdir has it's own
+ configure script, use it.
+
+Thu Dec 26 16:30:26 1991 K. Richard Pixley (rich at cygnus.com)
+
+ * cfg-paper.texi: some changes suggested by rms.
+
+Thu Dec 26 10:13:36 1991 Fred Fish (fnf at cygnus.com)
+
+ * config.sub: Merge in some small additions from the FSF version,
+ taken from the gcc distribution, to bring the Cygnus and FSF
+ versions into closer sync.
+
+Fri Dec 20 11:34:18 1991 Fred Fish (fnf at cygnus.com)
+
+ * configure.in: Changed svr4 references to sysv4.
+
+Thu Dec 19 15:54:29 1991 K. Richard Pixley (rich at cygnus.com)
+
+ * configure: added -V for version number option.
+
+Wed Dec 18 15:39:34 1991 K. Richard Pixley (rich at cygnus.com)
+
+ * DOC.configure, cfg-paper.texi: revised, updated, and texinfo'd.
+ renamed from DOC.configure to cfg-paper.texi.
+
+Mon Dec 16 23:05:19 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * configure, config.subr, config.sub: config.subr is now
+ config.sub again.
+
+Fri Dec 13 01:17:06 1991 K. Richard Pixley (rich at cygnus.com)
+
+ * configure.texi: new file, in progress.
+
+ * Makefile.in: build info file and install the man page for
+ configure.
+
+ * configure.man: new file, first cut.
+
+ * configure: find config.subr again now that configuration "none"
+ has gone. removed all traces of the -ansi option. removed all
+ traces of the -languages option.
+
+ * config.subr: resync from rms.
+
+Wed Dec 11 22:25:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * configure, config.sub, config.subr: merge config.sub into
+ config.subr, call the result config.subr, remove config.sub, use
+ config.subr.
+
+ * Makefile.in: revised install for dir.info.
+
+Tue Dec 10 00:04:35 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * configure.in: add decstation host makefile frag.
+
+ * Makefile.in: BISON now bison -y again. also install-gcc on
+ install. clean-gdbm on clean. infodir belongs in datadir.
+ Make directories for info install. Build dir.info here then
+ install it.
+
+Mon Dec 9 16:48:33 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * Makefile.in: fix for bad directory tests.
+
+Sat Dec 7 00:17:01 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * configure: \{1,2\} appears to be a sysv'ism. Use a different
+ regexp. -srcdir relative was being handled incorrectly.
+
+ * Makefile.in: unwrapped some for loops so that parallel makes
+ work again and so one can focus one's attention on a particular
+ package.
+
+Fri Dec 6 00:22:08 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * configure: added PWD as a stand in for `pwd` (for speed). use
+ elif wherever possible. make -srcdir work without -objdir.
+ -objdir= commented out.
+
+Thu Dec 5 22:46:52 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * configure: +options become --options. -subdirs commented out.
+ added -host, -datadir. Renamed -destdir to -prefix. Comment in
+ Makefile now at top of generated Makefile. Removed cvs log
+ entries. added -srcdir. create .gdbinit only if there is one
+ in ${srcdir}.
+
+ * 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.
+
+Fri Nov 22 07:38:11 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * Freshly created ChangeLog.
+
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 76
+version-control: never
+End:
diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in
index e0d5ba3..beab8be 100644
--- a/contrib/binutils/Makefile.in
+++ b/contrib/binutils/Makefile.in
@@ -35,6 +35,7 @@ includedir=${prefix}/include
oldincludedir=/usr/include
infodir=${prefix}/info
mandir=${prefix}/man
+gxx_include_dir=${includedir}/g++
tooldir = $(exec_prefix)/$(target)
@@ -49,12 +50,16 @@ man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
+infodir = $(prefix)/info
+includedir = $(prefix)/include
+# Directory in which the compiler finds executables, libraries, etc.
+libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
GDB_NLM_DEPS =
SHELL = /bin/sh
# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
-# cygwin32 host.
+# cygwin host.
INSTALL_PROGRAM_ARGS =
INSTALL = $(SHELL) $$s/install-sh -c
@@ -79,6 +84,7 @@ HOST_PREFIX_1 = loser-
CFLAGS = -g
CXXFLAGS = -g -O2
+LDFLAGS =
LIBCFLAGS = $(CFLAGS)
CFLAGS_FOR_TARGET = $(CFLAGS)
LDFLAGS_FOR_TARGET =
@@ -86,12 +92,14 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
+CHILLFLAGS = $(CFLAGS)
+CHILL_LIB = -lchill
CXX = c++
# Use -O2 to stress test the compiler.
-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
-LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
RANLIB = ranlib
@@ -102,12 +110,12 @@ NM = nm
LD = ld
-# Not plain GZIP, since gzip looks there for extra command-line options.
-GZIPPROG = gzip
+BZIPPROG = bzip2
# These values are substituted by configure.
DEFAULT_YACC = yacc
DEFAULT_LEX = lex
+DEFAULT_M4 = m4
BISON = `if [ -f $$r/bison/bison ] ; then \
echo $$r/bison/bison -L $$s/bison/ ; \
@@ -129,7 +137,7 @@ LEX = `if [ -f $$r/flex/flex ] ; \
M4 = `if [ -f $$r/m4/m4 ] ; \
then echo $$r/m4/m4 ; \
- else echo m4 ; fi`
+ else echo ${DEFAULT_M4} ; fi`
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
@@ -159,7 +167,9 @@ 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 newlib libio librx libstdc++ libg++ winsup opcodes cygmon
+
+
+TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
# Target libraries are put under this directory:
# Changed by configure to $(target_alias) if cross.
@@ -178,7 +188,11 @@ RPATH_ENVVAR = LD_LIBRARY_PATH
# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
REALLY_SET_LIB_PATH = \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
+ 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);
ALL = all.normal
@@ -189,15 +203,24 @@ INSTALL_TARGET = installdirs \
$(INSTALL_X11_MODULES) \
$(INSTALL_DOSREL)
+INSTALL_TARGET_CROSS = installdirs \
+ install-gcc-cross \
+ $(INSTALL_MODULES) \
+ $(INSTALL_TARGET_MODULES) \
+ $(INSTALL_X11_MODULES) \
+ $(INSTALL_DOSREL)
CC_FOR_TARGET = ` \
if [ -f $$r/gcc/xgcc ] ; then \
if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
- if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
- 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/newlib/libc/include -nostdinc; \
- else \
- echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
- fi; \
+ 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; \
@@ -215,15 +238,28 @@ CC_FOR_TARGET = ` \
# 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 \
- if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
- echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
- else \
- echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
- fi; \
+ 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; \
@@ -312,6 +348,18 @@ NM_FOR_TARGET = ` \
fi; \
fi`
+# The first rule in the file had better be this one. Don't put any above it.
+# This lives here to allow makefile fragments to contain dependencies.
+all: all.normal
+.PHONY: all
+
+# These can be overridden by config/mt-*.
+# The _TARGET_ is because they're specified in mt-foo.
+# The _HOST_ is because they're programs that run on the host.
+EXTRA_TARGET_HOST_ALL_MODULES =
+EXTRA_TARGET_HOST_INSTALL_MODULES =
+EXTRA_TARGET_HOST_CHECK_MODULES =
+
#### host and target specific makefile fragments come in here.
###
@@ -326,6 +374,9 @@ BASE_FLAGS_TO_PASS = \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "CHILLFLAGS=$(CHILLFLAGS)" \
+ "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
+ "CHILL_LIB=$(CHILL_LIB)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
@@ -346,14 +397,13 @@ BASE_FLAGS_TO_PASS = \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
- "PICFLAG=$(PICFLAG)" \
- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"RPATH_ENVVAR=$(RPATH_ENVVAR)" \
"SHELL=$(SHELL)" \
"EXPECT=$(EXPECT)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+ "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
"YACC=$(YACC)" \
"bindir=$(bindir)" \
@@ -371,7 +421,12 @@ BASE_FLAGS_TO_PASS = \
"sbindir=$(sbindir)" \
"sharedstatedir=$(sharedstatedir)" \
"sysconfdir=$(sysconfdir)" \
- "tooldir=$(tooldir)"
+ "tooldir=$(tooldir)" \
+ "gxx_include_dir=$(gxx_include_dir)" \
+ "gcc_version=$(gcc_version)" \
+ "gcc_version_trigger=$(gcc_version_trigger)" \
+ "target_alias=$(target_alias)" \
+ "libsubdir=$(libsubdir)"
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
@@ -417,7 +472,6 @@ EXTRA_TARGET_FLAGS = \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$$(NM_FOR_TARGET)' \
- 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'
@@ -430,7 +484,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# The HOST_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
- 'AR=$$(AR_FOR_TARGET)' \
+ 'AR=$(AR)' \
'AS=$(AS)' \
'CC=$(CC)' \
'CXX=$(CXX)' \
@@ -439,18 +493,18 @@ EXTRA_GCC_FLAGS = \
'HOST_PREFIX=$(HOST_PREFIX)' \
'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
'NM=$(NM)' \
- 'RANLIB=$$(RANLIB_FOR_TARGET)' \
+ 'RANLIB=$(RANLIB)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
- "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
- "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
+ "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
@@ -458,6 +512,7 @@ GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
# using $(FLAGS_TO_PASS).
ALL_MODULES = \
all-apache \
+ all-ash \
all-autoconf \
all-automake \
all-bash \
@@ -465,6 +520,7 @@ ALL_MODULES = \
all-binutils \
all-bison \
all-byacc \
+ all-bzip2 \
all-cvssrc \
all-db \
all-dejagnu \
@@ -492,6 +548,7 @@ ALL_MODULES = \
all-ld \
all-libgui \
all-libiberty \
+ all-libtool \
all-m4 \
all-make \
all-mmalloc \
@@ -507,15 +564,17 @@ ALL_MODULES = \
all-send-pr \
all-shellutils \
all-sim \
- all-snavigator \
all-tar \
all-tcl \
+ all-tcl8.1 \
all-texinfo \
all-textutils \
all-tgas \
all-time \
all-uudecode \
- all-wdiff
+ all-wdiff \
+ all-zip \
+ $(EXTRA_TARGET_HOST_ALL_MODULES)
# This is a list of the check targets for all of the modules which are
# compiled using $(FLAGS_TO_PASS).
@@ -526,15 +585,18 @@ ALL_MODULES = \
NATIVE_CHECK_MODULES = \
check-bison \
check-byacc \
- check-flex
+ check-flex \
+ check-zip
CROSS_CHECK_MODULES = \
check-apache \
+ check-ash \
check-autoconf \
check-automake \
check-bash \
check-bfd \
check-binutils \
+ check-bzip2 \
check-cvssrc \
check-db \
check-dejagnu \
@@ -559,6 +621,7 @@ CROSS_CHECK_MODULES = \
check-ld \
check-libgui \
check-libiberty \
+ check-libtool \
check-m4 \
check-make \
check-mmcheckoc \
@@ -572,7 +635,6 @@ CROSS_CHECK_MODULES = \
check-sed \
check-send-pr \
check-shellutils \
- check-snavigator \
check-sim \
check-tar \
check-tcl \
@@ -581,7 +643,8 @@ CROSS_CHECK_MODULES = \
check-tgas \
check-time \
check-uudecode \
- check-wdiff
+ check-wdiff \
+ $(EXTRA_TARGET_HOST_CHECK_MODULES)
CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
@@ -594,10 +657,12 @@ CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
# program on installation which uses the Tcl libraries.
INSTALL_MODULES = \
install-apache \
+ install-ash \
install-autoconf \
install-automake \
install-bash \
install-bfd \
+ install-bzip2 \
install-opcodes \
install-binutils \
install-bison \
@@ -626,10 +691,12 @@ INSTALL_MODULES = \
install-intl \
install-ispell \
install-tcl \
+ install-tcl8.1 \
install-itcl \
install-ld \
install-libgui \
install-libiberty \
+ install-libtool \
install-m4 \
install-make \
install-mmalloc \
@@ -643,13 +710,15 @@ INSTALL_MODULES = \
install-send-pr \
install-shellutils \
install-sim \
- install-snavigator \
install-tar \
+ install-texinfo \
install-textutils \
install-tgas \
install-time \
install-uudecode \
- install-wdiff
+ install-wdiff \
+ install-zip \
+ $(EXTRA_TARGET_HOST_INSTALL_MODULES)
# This is a list of the targets for all of the modules which are compiled
# using $(X11_FLAGS_TO_PASS).
@@ -662,6 +731,7 @@ ALL_X11_MODULES = \
all-guile \
all-tclX \
all-tk \
+ all-tk8.1 \
all-tix
# This is a list of the check targets for all of the modules which are
@@ -687,6 +757,7 @@ INSTALL_X11_MODULES = \
install-gash \
install-tclX \
install-tk \
+ install-tk8.1 \
install-tix
# This is a list of the targets for all of the modules which are compiled
@@ -697,11 +768,14 @@ ALL_TARGET_MODULES = \
all-target-librx \
all-target-libg++ \
all-target-newlib \
+ all-target-libtermcap \
all-target-winsup \
all-target-libgloss \
all-target-libiberty \
all-target-gperf \
all-target-examples \
+ all-target-libstub \
+ all-target-bsp \
all-target-cygmon
# This is a list of the configure targets for all of the modules which
@@ -712,11 +786,14 @@ CONFIGURE_TARGET_MODULES = \
configure-target-librx \
configure-target-libg++ \
configure-target-newlib \
+ configure-target-libtermcap \
configure-target-winsup \
configure-target-libgloss \
configure-target-libiberty \
configure-target-gperf \
configure-target-examples \
+ configure-target-libstub \
+ configure-target-bsp \
configure-target-cygmon
# This is a list of the check targets for all of the modules which are
@@ -737,14 +814,17 @@ INSTALL_TARGET_MODULES = \
install-target-libstdc++ \
install-target-libg++ \
install-target-newlib \
+ install-target-libtermcap \
install-target-winsup \
install-target-libgloss \
install-target-libiberty \
+ install-target-bsp \
install-target-gperf
# This is a list of the targets for which we can do a clean-{target}.
CLEAN_MODULES = \
clean-apache \
+ clean-ash \
clean-autoconf \
clean-automake \
clean-bash \
@@ -752,6 +832,7 @@ CLEAN_MODULES = \
clean-binutils \
clean-bison \
clean-byacc \
+ clean-bzip2 \
clean-cvssrc \
clean-db \
clean-dejagnu \
@@ -779,6 +860,7 @@ CLEAN_MODULES = \
clean-ld \
clean-libgui \
clean-libiberty \
+ clean-libtool \
clean-m4 \
clean-make \
clean-mmalloc \
@@ -794,7 +876,6 @@ CLEAN_MODULES = \
clean-send-pr \
clean-shellutils \
clean-sim \
- clean-snavigator \
clean-tar \
clean-tcl \
clean-texinfo \
@@ -802,7 +883,8 @@ CLEAN_MODULES = \
clean-tgas \
clean-time \
clean-uudecode \
- clean-wdiff
+ clean-wdiff \
+ clean-zip
# All of the target modules that can be cleaned
CLEAN_TARGET_MODULES = \
@@ -816,6 +898,8 @@ CLEAN_TARGET_MODULES = \
clean-target-libiberty \
clean-target-gperf \
clean-target-examples \
+ clean-target-libstub \
+ clean-target-bsp \
clean-target-cygmon
# All of the x11 modules that can be cleaned
@@ -830,10 +914,6 @@ CLEAN_X11_MODULES = \
clean-tk \
clean-tix
-# The first rule in the file had better be this one. Don't put any above it.
-all: all.normal
-.PHONY: all
-
# The target built for a native build.
.PHONY: all.normal
all.normal: \
@@ -928,10 +1008,10 @@ install-info: do-install-info dir.info
else true ; fi
local-clean:
- -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
+ -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
local-distclean:
- -rm -f Makefile config.status config.cache
+ -rm -f Makefile config.status config.cache mh-frag mt-frag
-if [ "$(TARGET_SUBDIR)" != "." ]; then \
rm -rf $(TARGET_SUBDIR); \
else true; fi
@@ -983,10 +1063,32 @@ check: $(CHECK_MODULES) \
$(CHECK_X11_MODULES) \
check-gcc
+# Automated reporting of test results.
+
+warning.log: build.log
+ $(srcdir)/contrib/warn_summary build.log > $@
+
+mail-report.log:
+ if test x'$(BOOT_CFLAGS)' != x''; then \
+ BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
+ fi; \
+ $(srcdir)/contrib/test_summary -t >$@
+ chmod +x $@
+ echo If you really want to send e-mail, run ./$@ now
+
+mail-report-with-warnings.log: warning.log
+ if test x'$(BOOT_CFLAGS)' != x''; then \
+ BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
+ fi; \
+ $(srcdir)/contrib/test_summary -t -i warning.log >$@
+ chmod +x $@
+ echo If you really want to send e-mail, run ./$@ now
+
# Installation targets.
-.PHONY: install uninstall source-vault binary-vault vault-install
+.PHONY: install install-cross uninstall source-vault binary-vault vault-install
install: $(INSTALL_TARGET)
+install-cross: $(INSTALL_TARGET_CROSS)
uninstall:
@echo "the uninstall target is not supported in this tree"
@@ -1196,14 +1298,23 @@ $(CONFIGURE_TARGET_MODULES):
libsrcdir="$$s/$${dir}"; \
fi; \
if [ -f $${libsrcdir}/configure ] ; then \
- $(SHELL) $${libsrcdir}/configure \
+ rm -f no-such-file skip-this-dir; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(CONFIG_ARGUMENTS) $${srcdiroption} \
--with-target-subdir="$(TARGET_SUBDIR)"; \
else \
- $(SHELL) $$s/configure \
+ rm -f no-such-file skip-this-dir; \
+ CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
$(CONFIG_ARGUMENTS) $${srcdiroption} \
--with-target-subdir="$(TARGET_SUBDIR)"; \
fi; \
+ if [ -f skip-this-dir ] ; then \
+ sh skip-this-dir; \
+ rm -f skip-this-dir; \
+ cd ..; rmdir $${dir} || true; \
+ else \
+ true; \
+ fi; \
else \
true; \
fi; \
@@ -1312,16 +1423,57 @@ all-gcc:
true; \
fi
-.PHONY: all-bootstrap
-all-bootstrap:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`pwd`; export r; \
- s=`cd $(srcdir); pwd`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
- else \
- true; \
- fi
+# Building GCC uses some tools for rebuilding "source" files
+# like texinfo, bison/byacc, etc. So we must depend on those.
+#
+# While building GCC, it may be necessary to run various target
+# programs like the assembler, linker, etc. So we depend on
+# those too.
+#
+# In theory, on an SMP all those dependencies can be resolved
+# 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
+ @r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Bootstrapping the compiler"; \
+ cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
+ @r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd`; export s; \
+ case "$@" in \
+ *bootstrap4-lean ) \
+ msg="Comparing stage3 and stage4 of the compiler"; \
+ compare=compare3-lean ;; \
+ *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
+ compare=compare3 ;; \
+ *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
+ compare=compare-lean ;; \
+ * ) msg="Comparing stage2 and stage3 of the compiler"; \
+ compare=compare ;; \
+ esac; \
+ $(SET_LIB_PATH) \
+ echo "$$msg"; \
+ cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
+ @r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) all
+
+.PHONY: cross
+cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
+ @r=`pwd`; export r; \
+ 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++"
+ @r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
.PHONY: check-gcc
check-gcc:
@@ -1345,7 +1497,16 @@ install-gcc:
true; \
fi
-
+.PHONY: install-gcc-cross
+install-gcc-cross:
+ @if [ -f ./gcc/Makefile ] ; then \
+ r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd`; export s; \
+ $(SET_LIB_PATH) \
+ (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
+ else \
+ true; \
+ fi
# EXPERIMENTAL STUFF
# This rule is used to install the modules which use FLAGS_TO_PASS.
# To build a target install-X means to cd to X and make install.
@@ -1366,16 +1527,20 @@ install-dosrel-fake:
# This is a list of inter-dependencies among modules.
all-apache:
+all-ash:
all-autoconf: all-m4 all-texinfo
-all-automake:
+all-automake: all-m4 all-texinfo
all-bash:
-all-bfd:
-all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
+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
all-byacc:
+all-bzip2:
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-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
all-db:
all-dejagnu: all-tcl all-expect all-tk
all-diff: all-libiberty
@@ -1389,7 +1554,7 @@ all-fileutils: all-libiberty
all-findutils:
all-find:
all-flex: all-libiberty all-bison all-byacc
-all-gas: all-libiberty all-opcodes all-bfd
+all-gas: all-libiberty all-opcodes all-bfd all-intl
all-gash: all-tcl
all-gawk:
ALL_GCC = all-gcc
@@ -1401,8 +1566,7 @@ all-gettext:
all-gnuserv:
configure-target-gperf: $(ALL_GCC)
all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
-all-gprof: all-libiberty all-bfd all-opcodes
-all-grep: all-libiberty
+all-gprof: all-libiberty all-bfd all-opcodes all-intl
all-grez: all-libiberty all-bfd all-opcodes
all-gui: all-gdb all-libproc all-target-librx
all-guile:
@@ -1412,26 +1576,31 @@ all-indent:
all-inet: all-tcl all-send-pr all-perl
all-intl:
all-ispell: all-emacs19
-all-itcl: all-tcl all-tk
-all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
+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-libgloss: $(ALL_GCC)
all-target-libgloss: configure-target-libgloss configure-target-newlib
configure-target-libio: $(ALL_GCC)
all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
-check-target-libio: all-target-libstdc++
-all-libgui: all-tcl all-tk all-itcl
+check-target-libio:
+all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
all-libiberty:
configure-target-librx: $(ALL_GCC) configure-target-newlib
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)
+all-target-libstub: configure-target-libstub
+all-libtool:
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-patch: all-libiberty
all-perl:
@@ -1443,25 +1612,27 @@ all-sed: all-libiberty
all-send-pr: all-prms
all-shellutils:
all-sim: all-libiberty all-bfd all-opcodes all-readline
-all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep
all-tar: all-libiberty
all-tcl:
+all-tcl8.1:
all-tclX: all-tcl all-tk
all-tk: all-tcl
+all-tk8.1: all-tcl8.1
all-texinfo: all-libiberty
all-textutils:
all-tgas: all-libiberty all-bfd all-opcodes
all-time:
-all-tix: all-tcl all-tk
+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-libio configure-target-winsup
+all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
configure-target-winsup: configure-target-newlib
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-target: $(ALL_TARGET_MODULES)
install-target: $(INSTALL_TARGET_MODULES)
-install-gdbtk: install-tcl install-tk install-itcl install-tix install-libgui install-gdb
+install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
### other supporting targets
MAKEDIRS= \
@@ -1494,7 +1665,7 @@ TAGS: do-TAGS
# with the gnu make, this is done automatically.
-Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
+Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
$(SHELL) ./config.status
#
@@ -1504,7 +1675,7 @@ Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
# ChangeLog omitted because it may refer to files which are not in this
# distribution (perhaps it would be better to include it anyway).
DEVO_SUPPORT= README Makefile.in configure configure.in \
- config.guess config.sub config move-if-change \
+ 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
@@ -1521,9 +1692,8 @@ SUPPORT_FILES = list-of-support-files-for-tool-in-question
.PHONY: taz
-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
- texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
- # Take out texinfo from a few places; make simple BISON=bison line.
+taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ # Take out texinfo from a few places.
sed -e '/^all\.normal: /s/\all-texinfo //' \
-e '/^ install-texinfo /d' \
<Makefile.in >tmp
@@ -1567,68 +1737,94 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
#
mkdir proto-toplev/texinfo
ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
- ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
- ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
if test -r texinfo/util/tex3patch ; then \
mkdir proto-toplev/texinfo/util && \
ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
else true; fi
- chmod og=u `find . -print`
+ 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; \
- $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
+ 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
-do-tar-gz:
- echo "==> Making $(TOOL)-$(VER).tar.gz"
- -rm -f $(TOOL)-$(VER)
- ln -s proto-toplev $(TOOL)-$(VER)
- tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
- $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
+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)
+ $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
-TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
+TEXINFO_SUPPORT= texinfo/texinfo.tex
DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
-.PHONY: gas.tar.gz
-GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
-gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
+.PHONY: gas.tar.bz2
+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 \
SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
# The FSF "binutils" release includes gprof and ld.
-.PHONY: binutils.tar.gz
-BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
-binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
+.PHONY: binutils.tar.bz2
+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 \
- SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
+ SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
-.PHONY: gas+binutils.tar.gz
+.PHONY: gas+binutils.tar.bz2
GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
-gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
+gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
$(MAKE) -f Makefile.in taz TOOL=gas \
- SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
+ SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
-.PHONY: libg++.tar.gz
+.PHONY: libg++.tar.bz2
LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
-libg++.tar.gz: $(DIST_SUPPORT) libg++
+libg++.tar.bz2: $(DIST_SUPPORT) libg++
$(MAKE) -f Makefile.in taz TOOL=libg++ \
SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
GNATS_SUPPORT_DIRS=include libiberty send-pr
-gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
+gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
$(MAKE) -f Makefile.in taz TOOL=gnats \
SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
-.PHONY: gdb.tar.gz
-GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
-GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
-gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
+.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 \
- SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
-
-.PHONY: newlib.tar.gz
+ 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 \
+ 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 \
+ 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 \
+ 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" \
+ SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
+
+.PHONY: newlib.tar.bz2
NEWLIB_SUPPORT_DIRS=libgloss
# taz configures for the sun4 target which won't configure newlib.
# We need newlib configured so that the .info files are made.
@@ -1641,7 +1837,7 @@ NEWLIB_SUPPORT_DIRS=libgloss
# the make distclean. For now punt on the issue of shipping newlib info files
# with newlib net releases and wait for a day when some native target (sun4?)
# supports newlib (if only minimally).
-newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
+newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
$(MAKE) -f Makefile.in taz TOOL=newlib \
SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
@@ -1649,5 +1845,4 @@ newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
.NOEXPORT:
MAKEOVERRIDES=
-
# end of Makefile.in
diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog
index 557679d..b877c08 100644
--- a/contrib/binutils/bfd/ChangeLog
+++ b/contrib/binutils/bfd/ChangeLog
@@ -1,9241 +1,6381 @@
-Mon Apr 27 11:49:55 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-05-09 Alan Modra <alan@linuxcare.com.au>
- * configure.in: Set version number to 2.9.1.
- * configure: Rebuild.
+ * 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.
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * elf.c (bfd_elf_get_bfd_needed_list): New function.
- * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
- * bfd-in2.h: Rebuild.
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
-Fri Apr 24 12:09:18 1998 Ian Lance Taylor <ian@cygnus.com>
+ * versados.c (versados_scan): Init stringlen and pass_2_done.
- * 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 *.
+ * trad-core.c (trad_unix_core_file_p): Return
+ bfd_error_wrong_format rather than bfd_error_file_truncated.
-Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * 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.
+ From Szabolcs Szakacsits <szaka@F-Secure.com>
+ * 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.
- * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
- bfd_elf32_powerpcle_vec.
+2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
- * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
- program segments are zero, don't set p_paddr_valid.
+ * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
+ the .bss section.
+ * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
-Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-29 Andreas Jaeger <aj@suse.de>
- * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
- before any other symbols in the same section.
+ * libbfd-in.h: Correctly check GCC version.
+ * bfd-in.h: Likewise.
+ * libhppa.h: Likewise.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
-Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * archures.c (bfd_default_scan): Add m68k cases back to default
- switch, reverting patch of March 25, since IEEE support depends
- upon them.
+ K&R compiler fixes.
+ * dwarf2.c (concat_filename): Avoid string literal concatenation.
+ * ieee.c (ieee_get_symtab): Don't initialise union in struct.
-Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-12 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am (diststuff): New target.
- * Makefile.in: Rebuild.
+ * dep-in.sed: Match space before file name, not after.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
-Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
- som_offset when we have an extended name table.
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
-Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
+ * po/bfd.pot: Regenerate.
- * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
- trying to copy it.
- * Makefile.in: Rebuild.
+ * 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.
-Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-04-03 H.J. Lu <hjl@gnu.org>
- * 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.
+ * cache.c (bfd_open_file): Unlink the output file only if
+ it has non-zero size.
-Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+2000-04-01 Ken Block USG <block@zk3.dec.com>
- * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
- assertion.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
+ relative relocations for non-loaded sections in shared objects.
+ (elf64_alpha_check_relocs): Similarly.
-Tue Mar 31 16:25:45 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-03-31 Thomas de Lellis <tdel@wrs.com>
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
+ * srec.c : Set CHUNK size to 16 bytes to prevent download failures
+ on some targets.
+ * ihex.c : Ditto.
-Mon Mar 30 16:12:17 1998 Ian Lance Taylor <ian@cygnus.com>
+Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
- * configure.in: Set version number to 2.9.
- * configure: Rebuild.
+ * 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.
-Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
- * 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.
+ * 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.
-Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-03-27 Denis Chertykov <denisc@overta.ru>
- * elf.c (_bfd_elf_copy_private_section_data): Call
- copy_private_bfd_data once we've seen the last SEC_ALLOC section.
+ * 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.
- * cpu-mips.c: Remove trailing comma at end of enumeration list.
+2000-03-24 H.J. Lu <hjl@gnu.org>
-Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
+ (elf64_alpha_find_reloc_at_ofs): Likewise.
- * 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.
+2000-03-17 Alan Modra <alan@linuxcare.com.au>
-Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
+ * 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".
- 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.
+2000-03-14 Doug Evans <dje@casey.transmeta.com>
+
+ * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
+
+2000-03-14 Kazu Hirata <kazu@hxi.com>
-Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
+ * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
+ of shrinks properly, including the last reloc.
+
+2000-03-13 Kazu Hirata <kazu@hxi.com>
- * 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 <nickc@cygnus.com>
-
- * 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 <nickc@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <schwab@issan.informatik.uni-dortmund.de>
-
- * archures.c (bfd_mach_m68*): Add definitions for various m68k
- variants.
- (bfd_default_scan): Remove m68k special cases.
+ * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
+ check for R_MOVL2.
+
+2000-03-11 Alan Modra <alan@linuxcare.com.au>
+
+ * 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-03-10 Geoff Keating <geoffk@cygnus.com>
+
+ * 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-03-10 Geoffrey Keating <geoffk@cygnus.com>
+
+ * 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-03-10 Alan Modra <alan@linuxcare.com.au>
+
+ * 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-03-07 Doug Evans <dje@casey.transmeta.com>
+
+ * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
* 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 <rth@cygnus.com>
-
- * 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 <ian@cygnus.com>
- * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
- * libbfd.h: Rebuild.
+2000-03-06 Nick Clifton <nickc@cygnus.com>
- * 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.
+ * 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.
- * evax-alpha.c (evax_close_and_cleanup): Remove unused local
- variables er and er1.
+2000-03-06 Catherine Moore <clm@cygnus.com>
- * cpu-v850.c: Include <ctype.h>.
- (scan): Case isdigit argument to unsigned char.
+ * elf.c (swap_out_syms): Check for null type_ptr.
- From Yan Meroth <YAN.MEROTH@st.com>:
- * 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.
+2000-03-01 Hans-Peter Nilsson <hp@axis.com>
-Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
+ * 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.
- * 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.
+2000-02-29 H.J. Lu <hjl@gnu.org>
-Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
+ * peicode.h (jtab): Make it static.
- * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
+ * 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.
-Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
+2000-03-01 Nick Clifton <nickc@cygnus.com>
- * coff-arm.c: Add interworking functions to pe backends.
+ * coff-arm.c (bfd_arm_process_before_allocation): Make
+ 'symndx' signed to prevent compile time warning.
-Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coff-mcore.c: Remove unused prototype for pe_object_p.
- * configure.in: Use AM_DISABLE_SHARED.
- * aclocal.m4, configure: Rebuild with libtool 1.2.
-
-Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
-
- * coff-arm.c (coff_arm_relocate_section): Better error messages
- when interowrking conflucts occur. Courtesy of Jonathan Walton
- and Tony Thompson. PR 15357.
- (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
- relocations. Patch courtesy of Jonathan Walton and Tony
- Thompson. PR 15373.
-
-Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
-
- * 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 <nickc@cygnus.com>
-
- * 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 <scox@equinox.cygnus.com>
+ * 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.
- * config.bfd (sparclite-*-elf*): Added.
+ * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
-Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf-m10300.c (mn10300_elf_relax_section): Initialise
+ 'sym_sec'.
- * 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.
+ * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Remove unusued variables and code.
+ (elf_backend_add_symbol_hook): Fix prototype.
-1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
+ 'srelgot'.
- * elf32-i386.c (elf_i386_relocate_section): A pc-relative
- relocation against a now-local symbol should not have a dynamic
- relocation.
+ * elf32-mcore.c (mcore_elf_relocate_section): Initialise
+ 'oldinst'.
-Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Remove unusued variables and code.
+ (elf_backend_add_symbol_hook): Fix prototype.
- * 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
- <jeffdb@netzone.com>.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
-Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
+ * 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.
- * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
- a plt entry when we can determine that we authoritatively define
- the symbol.
+ * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
-Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
+2000-03-01 H.J. Lu <hjl@gnu.org>
- * 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.
+ * 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.
-Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-28 Nick Clifton <nickc@cygnus.com>
- * 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.
+ * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
+ * Makefile.in: Regenerate.
-Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in: Add support for mips and sh pe vectors.
+ * configure: regenerate.
- * 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.
+ * config.bfd: Add support for arm-wince, mips-pe and sh-pe
+ targets.
-Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
+ * targets.c: Add mips and sh pe vectors.
- * Makefile.am (AUTOMAKE_OPTIONS): Define.
- * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
+ * libpei.h (coff_final_link_postscript): Only define if not
+ already defined.
- From H.J. Lu <hjl@gnu.org>:
- * Makefile.am (libbfd_la_LDFLAGS): Define.
+ * 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 <jakub@redhat.com>
+
+ * 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 <ian@zembu.com>
+
+ * 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 <eliz@is.elta.co.il>
+
+ * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
+ name of the libtool directory.
* Makefile.in: Rebuild.
-Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
+Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * 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.
+ * som.c (SOM_HOWTO): Define.
+ (som_hppa_howto_table): Use it.
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * 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.
+2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
- * configure.host: Remove the old shared library build stuff. We
- now use libtool instead.
+ * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
-Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
+ * config.bfd: Enable 64 bit support for Solaris7+/sparc.
- * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
+2000-02-24 Catherine Moore <clm@cygnus.com>
-Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
+ * 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.
- * configure.in: Take stab-syms.lo out of sparclinux_vec list.
- * configure: Rebuild.
+2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
-Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
- * 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.
+ * dwarf2.c (read_address): Read 16-bits addresses.
+ (parse_comp_unit): Accept addr_size == 2.
+
+2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
-Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
+ * bfd-in.h: Update copyright date.
- * configure.in: Change -linux* to -linux-gnu*.
- * config.bfd, configure.host: Likewise.
- * configure: Rebuild.
-
-Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
+2000-02-23 Linas Vepstas <linas@linas.org>
- * 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 <ian@cygnus.com>
+ * 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.
- * configure, aclocal.m4: Rebuild with new libtool.
-
-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 <meissner@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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
- <luked@cse.unsw.edu.au>.
-
-Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * 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.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * bfd-in2.h: Regenerate.
-Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
+2000-02-22 Ian Lance Taylor <ian@zembu.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.
+ * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
+ invalid relocation types, and change them to R_386_NONE.
-Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-22 H.J. Lu <hjl@gnu.org>
- * 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.
+ * elflink.h (elf_link_add_object_symbols): If a version symbol is
+ not defined, don't add a second ELF_VER_CHR.
-Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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.
- * configure.in: Change version to 2.8.4.
- * configure: Regenerated.
+ * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
+ (elf_gc_sections): Same here.
+ (elf_gc_common_finalize_got_offsets): And here.
-Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
+2000-02-21 Ian Lance Taylor <ian@zembu.com>
- 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.
+ 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.
- (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.
+ (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.
-Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
+2000-02-18 Geoff Keating <geoffk@cygnus.com>
- * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
- to lag behind LO16 reloc by a couple of instructions.
+ * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
+ is no bfd_free(). Revert bfd_free part of previous change.
-Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-18 Geoff Keating <geoffk@cygnus.com>
- * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
- make to reexamine the file timestamp.
- ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
+ * 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.
- * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
- 0x100000.
+ * coff-rs6000.c (xcoff_howto_table_16): New variable.
+ (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
+
+2000-02-18 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <rth@cygnus.com>
+
+ * 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 <kevinb@redhat.com>
+
+ * 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 <amylaar@cygnus.co.uk>
+
+ * 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 <rth@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * 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.
-Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
+ * 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.
- * 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.
+2000-02-10 Timothy Wall <twall@cygnus.com>
- * 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.
+ * 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 Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
+Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
- * config.bfd (i[3456]-*-mingw32*): New target.
- * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
- * aclocal.m4, configure: Rebuild.
+ * 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.
-Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-02-09 Timothy Wall <twall@cygnus.com>
- * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
- have a bfd_object.
+ * 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.
-Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
+2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coff-go32.c: Update comment. Update copyright.
+
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
- 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.
+ * 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
- * 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.
+ (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.
-Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * 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-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
+ * coff-i386.c (i3coff_object_p): Remove prototype.
+ Update copyright.
- * coff-arm.c (coff_arm_relocate_section): Fix for PR14752 by
- preserving the contents of t2a3_b_insn.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
+ to name. Update copyright.
-Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
+ * trad-core.c (trad_unix_core_file_p): Cast core_regsec
+ assignment to avoid warning. Update copyright.
- * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
- (i[3456]86sco3.2v5*coff): New target.
+2000-01-24 Robert Lipe (robertl@sco.com)
-Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
+ instead of using GNU C extension.
- * bfd-in2.h: Rebuild with changes to chew--tab expansion.
+2000-01-21 Nick Clifton <nickc@cygnus.com>
-Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
+ * 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.
- * bfd.c (bfd_get_error_handler): Add orthogonal function.
- * bfd-in2.h: Regenerate.
+2000-01-14 Nick Clifton <nickc@cygnus.com>
-Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
+ * linker.c (default_indirect_link_order): oops - fix incorrectly
+ applied patch from Tim Wall.
- * tekhex.c (tekhex_write_object_contents): Check for no symbols.
+2000-01-13 Timothy Wall (twall@tiac.net>
-Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
+ * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
+ = scnhsz, filhsz, relsz, aoutsz, etc)
- * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
- adjust addend for an output common symbol (from Jimmy Blair
- <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
- defined symbol to counteract adjustment made in generic relocation
- code.
+ * coffswap.h: Ditto.
+
+2000-01-13 Nick Clifton <nickc@cygnus.com>
- * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
+ * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
+ interwork thumb to arm stub.
-Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
+2000-01-13 Timothy Wall (twall@tiac.net>
- * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
- (GET_SCNDHR_NLNNO): Likewise.
+ * archures.c (bfd_octets_per_byte): New function: Return
+ target byte size.
+ (bfd_arch_mach_octets_per_byte): New function: Return target
+ byte size.
-Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
+ * section.c: Distinguish between octets and bytes for usage of
+ _cooked_size, _raw_size, and output_offset. Clarify
+ description of bfd_set_section_contents.
- * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
+ * bfd-in2.h: Regenerate.
-Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
+ * 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 <nickc@cygnus.com>
+
+ * 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 <pb@futuretv.com>
+
+ * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
+ (arm*-*-conix*): New target.
+
+2000-01-10 Egor Duda <deo@logos-m.ru>
+
+ * 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
+ <sys/procfs.h>
+ * 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.
- * elf32-m32r.c: Add macros to handle NOP insertion.
+2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
-Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
+ * 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.
- * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
- (xcoff_mark): Likewise.
- (xcoff_build_ldsyms): Mark absolute symbols.
+1999-12-29 Richard Henderson <rth@cygnus.com>
-Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
+ * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
+ if no dynamic sections created.
- * bout.c (b_out_write_object_contents): Sort symbols before output
- to keep {CALL,BAL}NAME symbols adjacent.
- (b_out_symbol_cmp): New function.
+1999-12-27 Nick Clifton <nickc@cygnus.com>
-Tue Dec 30 12:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
+ * peicode.h (pe_bfd_object_p): Only define for PE format
+ targets.
- * elf32-sparc.c (elf32_sparc_check_relocs): If -Bsymbolic, don't
- allocate space for a PC relative reloc against a symbol which is
- defined in a regular file.
- (elf32_sparc_relocate_section): If -Bsymbolic, don't copy a PC
- relative reloc against a symbol which is defined in a regular
- file.
+1999-12-17 Nick Clifton <nickc@cygnus.com>
-Mon Dec 29 18:02:28 1997 Ian Lance Taylor <ian@cygnus.com>
+ * coff-i386.c (i3coff_object_p): Delete.
+ (i386coff_vec): Replace reference to i3coff_object_p with a
+ reference to coff_object_p.
- From Jonathan Stone <jonathan@DSG.Stanford.EDU>:
- * config.bfd (mips-dec-netbsd*): Add ECOFF vectors to
- targ_selvecs.
- (mips*el-*-netbsd*): Like mips-dec-netbsd*.
- (mips*-*-netbsd*): New target.
+ * coff-mcore.c (pe_object_p): Delete.
-Mon Dec 29 17:13:28 1997 H.J. Lu (hjl@gnu.org)
+ * 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 <nickc@cygnus.com>
- * elflink.h (elf_link_assign_sym_version): Change error message
- from "undefined version name" to "undefined versioned symbol
- name".
+ * 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.
-Mon Dec 29 11:41:16 1997 Nick Clifton <nickc@cygnus.com>
+1999-12-14 Nick Clifton <nickc@cygnus.com>
- * coff-arm.c (coff_arm_relocate_section): Fix typo from previous
- delta.
+ * 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 <cagney@cygnus.com>
+
+ * config.bfd: Add support for sparc-*-netbsdelf* and
+ sparc-*-netbsdaout*.
+
+1999-12-13 Nick Clifton <nickc@cygnus.com>
+
+ * elflink.h (elf_link_is_defined_archive_symbol): Check to see
+ if the symbol is in the common section.
+
+1999-12-10 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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.
-Tue Dec 23 17:01:10 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elfxx-target.h: If using COFF archive map, override
+ definition of allow_commons_in_armap and replace with
+ bfd_false.
- * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.
- * libbfd.h: Rebuild.
+ * archive.c (bfd_compute_and_write_armap): Do not place common
+ symbols into the archive map unless _bfd_allow_commons_in_armap
+ returns true.
- * peicode.h (coff_swap_scnhdr_out): Set .reloc section to be
- shared. Set stab* sections to be shared and read. Set .rsrc
- section to be read and shared.
+ * 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.
-Mon Dec 22 13:20:57 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-12-07 Jim Blandy <jimb@cygnus.com>
- * Makefile.am: Rebuild dependencies.
- (ALL_MACHINES_CFILES): Add dwarf2.lo.
- (ALL_MACHINES_CFILES): Add dwarf2.c.
- * Makefile.in: Rebuild.
+ 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.
- * coff-arm.c: Don't include obstack.h.
+1999-12-03 Ian Lance Taylor <ian@zembu.com>
-Mon Dec 22 13:04:33 1997 Joel Sherrill <joel@oarcorp.com>
+ * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
+ value by 4 before storing it back in the field. From
+ Koundinya. K <kk@ddeorg.soft.net>.
- * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
- i[3456]86-go32.
+Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com)
-Thu Dec 18 16:01:25 1997 Doug Evans <devans@canuck.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.
- * configure: Regenerate to get @SHELL@ substituted.
+1999-11-29 Jim Blandy <jimb@cygnus.com>
-Wed Dec 17 09:45:09 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * coff-arm.c (coff_arm_relocate_section): Only look at section
- owner if there is one.
+1999-11-27 Michael Meissner <meissner@cygnus.com>
- * elf.c (assign_file_positions_for_segments): Fail if there is not
- enough room for the program headers. (PR14186)
+ * 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.
-Tue Dec 16 08:09:56 1997 Gavin Koch <gavin@cygnus.com>
+ * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
+ BFD_RELOC_ALPHA_USER_*.
- * elf.c (_bfd_elf_find_nearest_line): Call
- _bfd_dwarf2_find_nearest_line first.
- * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Same.
- * dwarf2.c: New file; implement _bfd_dwarf2_find_nearest_line.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
-Mon Dec 15 16:08:52 1997 Nick Clifton <nickc@cygnus.com>
+1999-11-26 Fred Fish <fnf@cygnus.com>
- * archures.c: Add bfd_mach_m32r.
+ * 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.
-Mon Dec 15 16:11:22 1997 Fred Fish <fnf@cygnus.com>
+1999-11-25 Nick Clifton <nickc@cygnus.com>
- * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined.
- (coff_compute_section_file_positions): Use ALIGN_SECTIONS_IN_FILE
- to decide when to align the file sections for paging.
+ * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add
+ SEC_CODE and SEC_READONLY flags to glue sections.
-Mon Dec 15 15:01:15 1997 Nick Clifton <nickc@cygnus.com>
+ * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
+ SEC_CODE and SEC_READONLY flags to glue sections.
- * elf32-m32r.c (m32r_elf_object_p): New Function.
- (m32r_elf_final_write_processing): New Function.
- (m32r_elf_set_private_flags): New Function.
- (m32r_elf_copy_private_bfd_data): New Function.
- (m32r_elf_merge_private_bfd_data): New Function.
- (m32r_elf_print_private_bfd_data): New Function.
- (elf_backend_object_p): Point to m32r_object_p.
- (elf_backend_final_write_processing): Point to
- m32r_elf_final_write_processing.
- (bfd_elf32_bfd_copy_private_bfd_data): Point to
- m32r_elf_copy_private_bfd_data.
- (bfd_elf32_bfd_merge_private_bfd_data): Point to
- m32r_elf_merge_private_bfd_data.
- (bfd_elf32_bfd_set_private_flags): Point to
- m32r_elf_set_private_bfd_data.
- (bfd_elf32_bfd_print_private_bfd_data): Point to
- m32r_elf_print_private_bfd_data.
+1999-11-20 Nick Clifton <nickc@cygnus.com>
+ * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
+ delta.
- * bfd-in2.h (bfd_mach_m32r): Add identifier for M32R architecture
- machines.
+1999-11-19 Catherine Moore <clm@cygnus.com>
-Fri Dec 12 11:30:28 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
+ * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
+ (elf_cpu32_plt_entry): Likewise.
- * configure: Only build libbfd shared if --enable-shared's value
- was `yes', or was set to `*bfd*'.
- * aclocal.m4: Likewise.
- * NOTE: this really needs to be fixed in libtool/libtool.m4, the
- original source of this bit of code. It's not clear what the best fix
- would be, though.
+1999-11-18 Nick Clifton <nickc@cygnus.com>
-Thu Dec 11 17:48:11 1997 Richard Henderson <rth@cygnus.com>
+ * 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.
- * linker.c (generic_link_add_symbol_list): Always init udata.p so
- that the generic relaxation code can function when input and output
- file formats are mismatched.
+1999-11-17 Richard Henderson <rth@cygnus.com>
-Thu Dec 11 01:02:18 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coff-sh.c (bfd_coff_small_swap_table): Initialize new fields.
+1999-11-09 Ian Lance Taylor <ian@zembu.com>
- * elf.c (assign_file_positions_for_segments): For a loadable
- section, make sure that the load address is correct relative to
- the load address of the segment plus the size of the segment so
- far.
+ * 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.
- * coffcode.h (_coff_link_output_has_begun): Make static.
- (_coff_final_link_postscript): Likewise.
+ * ieee.c (ieee_slurp_debug): Get the length of the debug
+ information right if there is no data part.
-Wed Dec 10 23:37:11 1997 Ian Lance Taylor <ian@cygnus.com>
+Tue Nov 2 01:44:41 1999 Jeffrey A Law (law@cygnus.com)
- * elflink.h (elf_link_input_bfd): Handle a relocateable link in
- which a relocation refers to an indirect or warning symbol.
+ * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
+ R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
-Wed Dec 10 11:15:55 1997 Nick Clifton <nickc@cygnus.com>
+1999-10-28 Ian Lance Taylor <ian@zembu.com>
- * coff-arm.c (bfd_arm_coff_final_link): Function deleted.
- (coff_arm_final_link_postscript): New function.
- (coff_arm_link_output_has_begun): New function.
+ * elflink.h (elf_bfd_final_link): Make last_local signed.
- * libcoff.h (struct bfd_coff_backend_data): Add new fields:
- _bfd_coff_link_output_has_begun and
- _bfd_coff_final_link_postscript. Add new macros:
- bfd_coff_link_output_has_begun() and
- bfd_coff_final_link_postscript().
+1999-10-27 Ian Lance Taylor <ian@zembu.com>
- * cofflink.c (_bfd_coff_final_link): Insert calls to
- bfd_coff_link_output_has_begun() and
- bfd_coff_final_link_postscript().
+ * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
+ starts with a zero.
- * coffcode.h: Add two new fields to bfd_coff_backend_data
- structure: _bfd_coff_link_output_has_begun and
- _bfd_coff_final_link_postscript. Add default initialisers for
- these fields. Add overridable aliases for the coff swap functions
- in the backend data structure.
+Sat Oct 23 17:36:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
- * elf32-v850.c: Update with patches from the branch to fix
- HI16_S/LO16 reloc pairs.
+ * 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 <aph@cygnus.com>
-Tue Dec 9 11:37:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
+ * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
- * archures.c (bfd_mach_mips*): Define.
- (bfd_default_scan): For 3000 and 4000 replace magic constant with
- macro.
+Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com)
- * cpu-mips.c (N): Define.
- (bfd_mips_arch, arch_info_struct): Re-write using macro N, replace
- numbers with bfd_mach_mips* macros.
+ * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
-Fri Dec 5 11:13:46 1997 Nick Clifton <nickc@cygnus.com>
+1999-10-08 Ian Lance Taylor <ian@zembu.com>
- * elf32-v850.c (v850_elf_reloc, v850_elf_store_addend_in_insn,
- v850_elf_relocate_section): Fix PR2 14180 and 14181
- (v850_elf_section_from_bfd_section, v850_elf_symbol_processing,
- v850_elf_add_symbol_hook, v850_elf_link_output_symbol_hook,
- v850_elf_section_from_shdr, v850_elf_fake_sections): New functions
- (for PR14180) to create and handle special common sections.
- (v850_elf_final_link_relocate): Fix HI16 and HI16_S relocations
- which have data stored in the instructions. PR14258.
+ * elflink.h (elf_merge_symbol): When overriding a weak symbol with
+ a defined symbol in a shared library, clear the DEF_DYNAMIC flag
+ too.
-Tue Dec 2 10:26:16 1997 Nick Clifton <nickc@cygnus.com>
+Fri Oct 8 13:03:45 1999 Geoffrey Keating <geoffk@cygnus.com>
- * coff-arm.c (TARGET_UNDERSCORE): Revert back to '_'
- (USER_LABEL_PREFIX): Revert back to '_'
+ * 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.
- * config.bfd (targ_cpu): Add support for Thumb target.
+Mon Oct 4 17:49:45 1999 Nick Clifton <nickc@cygnus.com>
-Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * 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.
- * coff-sh.c (sh_coff_howtos): Add R_SH_SWITCH8 entry.
- (get_symbol_value): Handle R_SH_SWITCH8.
- (sh_relax_delete_bytes): Likewise.
+1999-09-28 Fred Fish <fnf@cygnus.com>
+
+ * 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.
-Wed Nov 26 14:13:34 1997 Nick Clifton <nickc@cygnus.com>
+1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
- * coff-arm.c (TARGET_UNDERSCORE): Changed to match definition in
- gcc/config/arm/semi.h
+ * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
+ (mips_elf_relocate_got_local): Unused, delete.
+ (mips_elf_relocate_global_got): Unused, delete.
- * coffcode.h (coff_slurp_symbol_table): Add ARM and Thumb symbol
- classes.
+1999-09-24 Fred Fish <fnf@cygnus.com>
-Sun Nov 23 16:02:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
+ * 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.
- * freebsd.h (SWAP_MAGIC): Read magic number little and not big
- endian.
+Sun Sep 19 12:16:47 1999 Jeffrey A Law (law@cygnus.com)
-Wed Nov 26 09:30:37 1997 Nick Clifton <nickc@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.
- * coffcode.h (coff_mkobject_hook): Only set private flags for non
- PE ARM ports.
+ * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
+ in PA2.0.
-Tue Nov 25 15:33:23 1997 Richard Henderson <rth@cygnus.com>
+1999-09-17 Alan Modra <alan@spri.levels.unisa.edu.au>
- * binary.c (binary_set_section_contents): Also ignore NEVER_LOAD
- sections.
+ * 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.
-Tue Nov 25 10:55:36 1997 Nick Clifton <nickc@cygnus.com>
+1999-09-17 Nick Clifton <nickc@cygnus.com>
- * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Do not
- complain if inout and output formats differ.
+ * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
+ previous delta. Set sec->gc_mark instead.
-Tue Nov 25 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com>
+Thu Sep 16 11:21:13 1999 Catherine Moore <clm@cygnus.com>
- * Makefile.am (BFD32_BACKENDS): Remove tekhex.lo.
- (BFD32_BACKENDS_CFILES): Remove tekhex.c.
- * Makefile.in: Rebuild.
- * aclocal.m4, configure, src/Makefile.in: Rebuild with current
- automake and autoconf.
+ * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
+ (elf_cpu32_plt_entry): Likewise.
- * coff-arm.c (arm_allocate_interworking_sections): Fix typo
- (COFF_WITH_PR to COFF_WITH_PE).
+Thu Sep 16 10:48:17 1999 Jeffrey A Law (law@cygnus.com)
-Mon Nov 24 15:47:49 1997 Nick Clifton <nickc@cygnus.com>
+ * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
- * coff-arm.c: Make variables and some functions static, so that
- this file can be included in multiple object files.
- (coff_arm_bfd_final_link): Fix minor bug.
+ * 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).
-Sat Nov 22 15:16:00 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * coff-arm.c: Add support for PIC and APCS-FLOAT type binaries.
+1999-09-16 Nick Clifton <nickc@cygnus.com>
- * coffcode.h: Add support for PIC and APCS-FLOAT type binaries.
+ * 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.
-Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>
+Wed Sep 15 02:31:57 1999 Jeffrey A Law (law@cygnus.com)
- * evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
+ * 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.
-Sat Nov 22 12:29:30 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-09-14 Michael Meissner <meissner@cygnus.com>
- * sunos.c (sunos_add_one_symbol): When overriding a defined
- symbol, set it to undefined, not new.
+ * 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.
- * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL
- relocs.
+1999-09-14 Nick Clifton <nickc@cygnus.com>
-Fri Nov 21 14:14:22 1997 Richard Henderson <rth@cygnus.com>
+ * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
+ Mitsubishi).
- * coff-sh.c (sh_relax_section): Force sign extention of USES r_offset.
- (sh_relax_delete_bytes): Don't kill LABEL relocs.
+Mon Sep 13 20:01:47 1999 Jeffrey A Law (law@cygnus.com)
-Mon Nov 17 15:08:38 1997 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-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
- (mn10300_elf_relax_section): Likewise.
+ * 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.
-Sat Nov 15 15:36:07 1997 Fred Fish <fnf@cygnus.com>
+1999-09-13 Donn Terry <donn@interix.com>
- * peicode.h (coff_swap_aouthdr_in): Cast second arg of
- bfd_h_get_* calls to "bfd_byte *".
+ * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
+ handling to support both GNU and MS objects.
-Tue Nov 11 10:37:23 1997 Jeffrey A Law (law@cygnus.com)
+ * coffcode.h (coff_write_object_contents): Don't check reloc_count
+ when determining whether to set F_RELFLG.
- * 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.
+1999-09-13 Philip Blundell <pb@nexus.co.uk>
-Mon Nov 10 14:32:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
- a version dependency could not be found.
-
-Tue Nov 4 12:05:56 1997 Klaus K"ampf <kkaempf@progis.de>
-
- * configure.com: Get version info from configure.in
-
-Fri Oct 24 11:15:58 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
-
- * elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
- New function. Avoid mixing US1 and HAL R1 code.
- Set resulting memory ordering to the strongest one used.
- (sparc64_elf_object_p): Set bfd_mach correctly.
-
-Thu Oct 23 14:09:33 1997 Richard Henderson <rth@cygnus.com>
-
- * elf64-sparc.c (sparc64_elf_howto_table): Add UA64 & UA16.
- (sparc64_elf_check_relocs): Handle them.
- (sparc64_elf_relocate_section): Likewise. Before emitting a dyn reloc,
- check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
-
-Thu Oct 23 00:53:14 1997 Richard Henderson <rth@dot.cygnus.com>
-
- * configure.in (sparc*-*-linux*): Use trad-core and ...
- * hosts/sparclinux.h: New file.
-
-Thu Oct 23 00:25:29 1997 Richard Henderson <rth@dot.cygnus.com>
-
- * config.bfd (sparc64-*-linux*): New target.
-
- * elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
- * elflink.c (_bfd_elf_create_got_section): Set .got alignment based
- on arch_size.
- (_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
- Set .plt alignment from new plt_alignment.
- * elflink.h (elf_link_create_dynamic_sections): Set version section
- alignment to LOG_FILE_ALIGN.
- * elfxx-target.h (elf_backend_plt_alignment): Provide default.
- (elfXX_bed): Init plt_alignment.
-
- * elf64-sparc.c (sparc64_elf_check_relocs,
- sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
- sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
- sparc64_elf_finish_dynamic_sections): New functions.
- (sparc64_elf_howto_table): Fix a few name strings.
- (ELF_DYNAMIC_INTERPRETER): New definition.
- (sparc64_elf_relocate_section): Handle shared libraries.
-
- * elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
- sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
- PLT definitions sparc64-linux originally choose. These will go
- away soon in favour of the official abi definitions.
-
-Wed Oct 22 16:08:45 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-sh.c (coff_small_object_p): New static function.
- (coff_small_new_section_hook): New static function.
- (bfd_coff_small_swap_table): New static const structure.
- (coff_small_close_and_cleanup): Define.
- (coff_small_bfd_free_cached_info): Define.
- (coff_small_get_section_contents): Define.
- (coff_small_get_section_contents_in_window): Define.
- (shcoff_small_vec): New static structure.
- (shlcoff_small_vec): New static structure.
- * targets.c (bfd_target_vector): Add shcoff_small_vec and
- shlcoff_small_vec.
- * config.bfd (sh-*-elf*): Add shcoff_small_vec and
- shlcoff_small_vec to targ_selvecs.
- (sh-*-*): Likewise.
- * configure.in: Add shcoff_small_vec and shlcoff_small_vec cases.
- * configure: Rebuild.
+ * 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 <alan@spri.levels.unisa.edu.au>
-Mon Oct 20 15:01:27 1997 Klaus K"ampf <kkaempf@progis.de>
+ * elfcode.h (write_relocs): Check for the_bfd NULL when handling
+ an absolute symbol in REL relocs.
- * evax-egsd.c: Weak symbols are global.
+Sun Sep 12 23:47:58 1999 Jeffrey A Law (law@cygnus.com)
- * evax-emh.c: Use proper casts.
+ * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
+ Stub SEGREL32. Return an error for any relocation not handled.
- * evax-egsd.c (_bfd_evax_write_egsd): Remove unneeded uname.
+1999-09-12 Ian Lance Taylor <ian@zembu.com>
- * evax-egsd.c: Section names and symbols have different
- length restrictions. Add length parameter to
- _bfd_evax_length_hash_symbol.
- * evax-etir.c: Likewise.
- * evax-misc.c (_bfd_evax_length_hash_symbol): Add length
- parameter.
- * evax.h (EOBJ_S_C_SECSIZ): Define.
+ * cofflink.c (coff_link_add_symbols): Look for special MSVC string
+ constant symbols, and avoid multiple definition errors on them.
- * evax-alpha.c: Remove duplicate test.
+1999-09-12 Donn Terry <donn@interix.com>
- * evax-emh.c: SYS$ functions are upper-case.
+ * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
+ significant bit is set.
- * evax-egsd.c: Create separate sections for common symbols.
- * evax-etir.c: Don't output common section.
- * evax.h: Bump up section count.
+1999-09-11 Ian Lance Taylor <ian@zembu.com>
- * configure.com: Use 64bit integers with DEC C.
+ * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
- * evax-egsd.c: Make section flags dec c compatible.
+ * elfcode.h (write_relocs): Handle an absolute symbol in REL
+ relocs as we do for RELA relocs.
-Mon Oct 20 09:38:31 1997 Jeffrey A Law (law@cygnus.com)
+1999-09-11 Donn Terry <donn@interix.com>
- * som.c (normalize): Delete function.
- (som_bfd_ar_write_symbol_stuff): New parameter elength. All callers
- changed. Use passed in elength to determine size of the extended
- name table instead of computing it again.
+ * 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.
-Sun Oct 19 23:36:21 1997 Jim Wilson <wilson@cygnus.com>
+ * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
+ section flags based on the section name.
- * peicode.h (coff_swap_scnhdr_out): Use |= not = to set
- IMAGE_SCN_MEM_READ for an unrecognized section.
+ * 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.
-Sun Oct 19 21:04:56 1997 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * som.c (som_bfd_ar_write_symbol_stuff): Account for trailing
- '/' in the extended name table.
+ * 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.
-Fri Oct 17 00:04:13 1997 Richard Henderson <rth@cygnus.com>
+ * 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.
- * elflink.h (elf_link_assign_sym_version): For explicitly versioned
- symbols, check globals list before matching on locals.
+ * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
+ special handling.
-Thu Oct 16 08:17:06 1997 Michael Meissner <meissner@cygnus.com>
+ * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
+ don't write out the associated line numbers.
- * peicode.h (coff_swap_scnhdr_out,pe_print_idata): Fix mangled
- patch.
+ * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
+ aux entries.
-Wed Oct 15 13:45:10 1997 Ian Lance Taylor <ian@cygnus.com>
+ * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
+ changes when the base type is unknown.
- * peicode.h (pe_mkobject_hook): Set DLL flag.
- (pe_bfd_copy_private_bfd_data): Copy DLL flag.
+ * coffgen.c (coff_print_symbol): Fix printing of aux record for
+ function symbols.
- * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_DISCARDABLE
- for .stab* sections. Replace strlen of constant strings with
- number.
+ * 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.
-Tue Oct 14 15:42:45 1997 Richard Henderson <rth@cygnus.com>
+1999-09-10 Ian Lance Taylor <ian@zembu.com>
- * elf64-alpha.c (elf64_alpha_merge_ind_symbols): New function to
- merge got and reloc entries from ind syms to their target.
- (elf64_alpha_always_size_sections): Call it.
- (elf64_alpha_check_relocs): Operate on the target of indirect symbols.
- (elf64_alpha_can_merge_gots): Likewise.
- (elf64_alpha_merge_gots): Likewise.
+ * 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.
- * elf64-alpha.c (elf64_alpha_relocate_section): Back out HJ's change,
- as it is insufficient to handle the relocation changes as well.
+1999-09-10 H.J. Lu <hjl@gnu.org>
-Mon Oct 13 23:10:08 1997 Richard Henderson <rth@cygnus.com>
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
+ _bfd_filnmlen field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
- * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Allow for RELATIVE
- relocs for symbols in shlibs that have been forced local.
- (elf64_alpha_relocate_section): Output RELATIVEs in .got for same.
+Fri Sep 10 00:35:14 1999 Jeffrey A Law (law@cygnus.com)
-Mon Oct 13 21:24:04 1997 Richard Henderson <rth@cygnus.com>
+ * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
+ for FPTR relocs involving local symbols.
- * elf64-alpha.c (elf64_alpha_relocate_section): Use the
- got_enties of the default symbol for the default versioned
- symbol. Patch from hjl@gnu.ai.mit.edu, modified not to use
- alloca in the loop.
+ * 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.
-Mon Oct 13 17:37:37 1997 Nick Clifton <nickc@cygnus.com>
+ * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
+ (elf_hppa_remark_useless_dynamic_symbols): Similarly.
+ (elf_hppa_final_link): Call them.
- * elf32-v850.c (v850_elf_final_link_relocate): Only use the bottom
- 24 bits of the PC when computing a PC relative relocation.
+1999-09-10 Ian Lance Taylor <ian@zembu.com>
-Fri Oct 10 16:01:30 1997 Nick Clifton <nickc@cygnus.com>
+ * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
+ (elf_adjust_dynamic_symbol): ...from here.
- * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate):
- Correct value for maximum positive 22 bit PC relative relocation.
- (v850_elf_final_link_relocate): Prevent overflow from HI16_S and
- HI_16 relocations. Correct bit adjustment in TDA offsets.
+Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
-Thu Oct 9 16:43:39 1997 Doug Evans <dje@canuck.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.
- * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
- (sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
+ * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
+ (elf_hppa_relocate_insn): Similarly.
-Wed Oct 8 11:38:45 1997 Richard Henderson <rth@cygnus.com>
+ * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
+ GPREL* relocations.
+ (elf_hppa_relocate_insn): Similarly.
- * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
- be LOG_FILE_ALIGN.
+ * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
+ Handle LTOFF_TP* relocs.
+ (elf_hppa_relocate_insn): Similarly.
-Wed Oct 8 11:36:00 1997 Richard Henderson <rth@cygnus.com>
+ * 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.
- * config.bfd: Missed one alpha* change.
+ * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
+ DIR32, DIR64 and FPTR64 relocations.
+ (elf_hppa_relocate_insn): Similarly.
-Tue Oct 7 13:00:17 1997 Doug Evans <dje@canuck.cygnus.com>
+ * 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.
- * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove BFD64 support.
- * elf64-sparc.c (SPARC64_OLD_RELOCS): Undef.
- (MINUS_ONE): New macro.
- (sparc_elf_notsup_reloc): New function.
- (sparc64_elf_howto_table): Add entries for DISP64,PLT64,HIX22,LOX10,
- H44,M44,L44,REGISTER.
- (sparc_reloc_map): Likewise. Map BFD_RELOC_CTOR to R_SPARC_64.
- (init_insn_reloc): New function.
- (sparc_elf_wdisp16_reloc): Use it.
- (sparc64_elf_relocate_section): Add entries for OLO10,HIX22,LOX10.
-
-Tue Oct 7 11:40:37 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * som.c (som_construct_extended_name_table): Remove static
- function, and define as macro instead.
-
-Fri Oct 3 14:02:17 1997 Richard Henderson <rth@cygnus.com>
-
- * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
- recognizes alphaev5 etc.
- * configure.host: Likewise.
-
-Fri Oct 3 11:23:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Make ld -s work on AIX:
- * xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
- section if we are stripping.
- (bfd_xcoff_size_dynamic_sections): Don't set the .debug section
- size if we are stripping.
- (_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
- and don't write out relocs, if we are stripping.
- (xcoff_link_input_bfd): Don't set up reloc if we are stripping.
- (xcoff_write_global_symbol): Don't write out symbol or reloc if we
- are stripping.
-
- * configure.in: Don't include elf.lo again for ELF targets; it's
- always in the library anyhow.
- * configure: Rebuild.
+1999-09-08 Ulrich Drepper <drepper@cygnus.com>
- * bfd-in2.h: Rebuild.
+ * 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.
- * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
- char *, when calling bfd_get_32 and bfd_put_32.
- * sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
- when calling strcpy.
+Tue Sep 7 17:25:12 1999 Jeffrey A Law (law@cygnus.com)
-Thu Oct 2 16:15:50 1997 Doug Evans <dje@canuck.cygnus.com>
+ * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
+ relocs.
+ (elf_hppa_relocate_insn): Similarly.
- * reloc.c (bfd_check_overflow): New function.
- (bfd_perform_relocation, bfd_install_relocation): Use it.
- (BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
- (BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
- * bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
+ * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
+ DLTREL14WD relocs.
+ (elf_hppa_relocate_insn): Similarly.
-Thu Oct 2 13:17:18 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
- unrecognized section. From Jon Thackray <jont@harlequin.co.uk>.
+1999-09-07 Ian Lance Taylor <ian@zembu.com>
-Wed Oct 1 14:03:44 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
- (stmp-bfd-h): Rename from stmp-bfd.h.
- (BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
- ($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
- (stmp-bin2-h): New target.
- ($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
- (stmp-lbfd-h): New target.
- ($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
- (stmp-lcoff-h): New target.
- (CLEANFILES): Change stmp-bfd.h to stmp-bfd-h. Add stmp-bin2.h,
- stmp-lbfd-h, and stmp-lcoff-h.
- * Makefile.in: Rebuild.
+1999-09-06 Donn Terry <donn@interix.com>
- * configure.in: Use a diversion to set enable_shared before the
- arguments are parsed.
- * configure: Rebuild.
+ * 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.
-Tue Sep 30 14:18:32 1997 Doug Evans <dje@canuck.cygnus.com>
+ * 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.
- * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
- renamed to R_SPARC_UNUSED_42.
- (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
- * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
- renamed to R_SPARC_UNUSED_42.
- (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
- * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
- * bfd-in2.h: Regenerated.
- * libbfd.h: Regenerated.
+ * 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.
-Thu Sep 25 12:15:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * coff-i386.c (in_reloc_p): Add declaration.
+ (i386coff_vec): Simplify initialization of
+ application_section_flags.
- * elflink.h (elf_merge_symbol): Don't check the hash creator until
- after we have set *sym_hash.
+ * 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.
-Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
+ * 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'.
- * config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
+ * 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.
-Wed Sep 24 11:27:23 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-09-06 Andreas Schwab <schwab@suse.de>
- * Makefile.am (libbfd_a_SOURCES): Define.
- * Makefile.in: Rebuild.
+ * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
+ to version symbols.
- * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
- * aclocal.m4: Rebuild with new libtool.
- * configure: Rebuild.
+1999-09-06 Nick Clifton <nickc@cygnus.com>
-Tue Sep 23 19:03:13 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
+ bfd_realloc instead of calloc and realloc.
- * elf.c (map_sections_to_segments): Even if we are not demand
- paged, don't put a loadable section after a nonloadable section.
- (assign_file_positions_for_segments): Increment the file offset
- for a section with contents, even if it is not loadable.
+1999-09-04 Steve Chamberlain <sac@pobox.com>
-Thu Sep 18 15:04:57 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * elf32-v850.c (v850_elf_check_relocs): Improve error message.
+1999-09-04 Ian Lance Taylor <ian@zembu.com>
-Wed Sep 17 09:54:51 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * elf32-v850.c (v850_elf_final_link_relocate): Add checks to catch
- relocations against non-existant symbols.
+1999-09-03 Ian Lance Taylor <ian@zembu.com>
-Tue Sep 16 14:20:27 1997 Nick Clifton <nickc@cygnus.com>
+ * elflink.h (elf_bfd_final_link): When counting relocations, don't
+ count those in sections we are not including in the link.
- * reloc.c: Add BFR_RELOC_V850_TDA_16_16_OFFSET.
+Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com)
- * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate,
- v850_elf_howto_table, v850_elf_reloc_map): Add support for a 16
- bit reloc in the tiny data area.
+ * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
+ field in hpux11 shared libraries.
-Wed Sep 10 15:17:25 1997 Nick Clifton <nickc@cygnus.com>
+1999-09-02 Nick Clifton <nickc@cygnus.com>
- * elf32-v850.c (v850_elf_reloc): Remove spurious error message.
+ * elflink.h (elf_gc_record_vtentry): Fix memory leak.
-Wed Sep 10 11:17:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
+Wed Sep 1 13:34:29 1999 Jeffrey A Law (law@cygnus.com)
- * archures.c (bfd_default_scan): Use strcasecmp.
- (bfd_default_scan): Test for match with arch_name + ":" +
- printable_name.
- (bfd_default_scan): Test for match with printable_name - ":".
- (bfd_default_scan): Delete w65, h8300, h8500, z8k, i960 special
- cases. Each implements their own scan function.
- (bfd_default_scan): Delete 386, 2900, 860, mips 2000, mips 4400
- special cases. Since info->mach == 0. The test mach == number
- fails.
- (bfd_arch_list): New function, return name of all the supported
- architectures.
+ * 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.
-Tue Sep 9 10:21:56 1997 Nick Clifton <nickc@cygnus.com>
+1999-08-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
- * elf32-v850.c (v850_elf_print_private_bfd_data): Break after
- decoding architecture.
- (v850_elf_reloc): Do not complain if a R_V850_LO16 reloc has bit
- 15 set.
+ * elflink.h (record_link_assignment): When possible, keep the
+ original type of the symbol.
-Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
+Mon Aug 30 15:26:48 1999 Jeffrey A Law (law@cygnus.com)
- * bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
+ * 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.
-Thu Sep 4 09:44:10 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-26 Mark Mitchell <mark@codesourcery.com>
- * Makefile.am: Rebuild dependencies.
- (ALL_MACHINES_CFILES): Add cpu-v850.c.
- (ALL_MACHINES_CFILES): Add elf32-v850.c.
- * Makefile.in: Rebuild.
+ * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
+ GOT entries for GOT16 relocations; they're not required.
- * reloc.c: Remove extraneous commas from relocation entries.
- Remove BFD_RELOC_V850_16_PCREL.
- * bfd-in2.h: Rebuild.
+1999-08-24 Nick Clifton <nickc@cygnus.com>
- * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
- in sections named .tocbss rather than .bss.
+ From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
-Wed Sep 3 11:23:23 1997 Nick Clifton <nickc@cygnus.com>
+ * config.bfd (arm-*-netbsd*): New target.
+ * configure.in (armnetbsd_vec): New target vector.
+ * configure: Regenerate
+ * targets.c (bfd_target_vector): Add &armnetbsd_vec.
- * libbfd.h, bfd-in2.h, elf32-v850.c: Removed
- BFD_RELOC_V850_16_PCREL.
+ * 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 Sep 2 20:44:10 1997 Fred Fish <fnf@cygnus.com>
+Tue Aug 24 00:25:58 1999 Jeffrey A Law (law@cygnus.com)
- * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
- the same as C_EXT syms.
- (coff_link_add_symbols): Ditto.
- (_bfd_coff_link_input_bfd): Ditto.
- (_bfd_coff_write_task_globals): Add save_global_to_static. Use
- it to preserve and restore state of global_to_static flag.
+ * som.c (som_slurp_symbol_table): Fix typo in comment.
-Tue Sep 2 17:45:22 1997 Nick Clifton <nickc@cygnus.com>
+Fri Aug 20 17:01:23 1999 Jeffrey A Law (law@cygnus.com)
- * elf32-v850.c (v850_elf_object_p): Set machine number based on
- bits in e_flags field rather than magic numbers.
- (v850_elf_final_write_processing, v850_elf_set_private_flags,
- v850_elf_copy_private_bfd_data, v850_elf_merge_private_bfd_data,
- v850_elf_print_private_bfd_data): New functions.
+ * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
+ here instead of using elf_section_data...
+1999-08-19 Nick Clifton <nickc@cygnus.com>
-Tue Sep 2 17:35:05 1997 Doug Evans <dje@canuck.cygnus.com>
+ * 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.
- * cpu-arc.c (arc_get_mach): Properly scan defined mach entries.
+1999-08-19 Nick Clifton <nickc@cygnus.com>
-Tue Sep 2 18:29:37 1997 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
- instructions are relative to the next instruction, not the
- current instruction.
- (mn10200_elf_relax_section): Similarly.
+1999-08-18 Donn Terry <donn@interix.com>
-Tue Sep 2 15:45:45 1997 Nick Clifton <nickc@cygnus.com>
+ * cofflink.c: Move definitions of N_TMASK, et. al., out of
+ _bfd_coff_link_input_bfd into top level.
- * cpu-v850.c: Use a macro to construct bfd_arch_info_type
- entries.
+ * 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.
- * reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
- BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
- specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
+1999-08-17 H.J. Lu <hjl@gnu.org>
-Thu Aug 28 17:01:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
+ * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
+ macro definition.
- * cpu-v850.c: Remove "plain" from v850 printable name.
- (scan): Use strcasecmp.
+1999-08-17 Ian Lance Taylor <ian@zembu.com>
- * archures.c (bfd_mach_v850): Define.
+ * 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.
- * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
- just sh/SH, use strcasecmp.
- (arch_info_struct): Add entries for sh3 et.al.
+1999-08-15 Mark Mitchell <mark@codesourcery.com>
- * archures.c (bfd_mach_sh, ...): Define.
+ * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
+ coincidence of variable names between old and new code.
-Wed Aug 27 17:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
+1999-08-12 Nick Clifton <nickc@cygnus.com>
- * archures.c (bfd_archures_list): Always NULL terminate the list.
+ * 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.
-Tue Aug 26 17:26:51 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-11 Robin Farine <advanc@dial.eunet.ch>
- * Makefile.am: Rebuild dependencies.
- (ALL_MACHINES_CFILES): Add cpu-arc.c.
- (ALL_MACHINES_CFILES): Add elf32-arc.c.
- (elf32-arc.lo): Remove explicit dependency.
- * Makefile.in: Rebuild.
+ * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
+ in R_ARM_PC24 relocs.
- * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
- * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
- * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
+Tue Aug 10 12:48:09 1999 Jeffrey A Law (law@cygnus.com)
-Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
+ * elf-hppa.h (elf_hppa_fake_sections): New function.
+ * elf32-hppa.c (elf_backend_fake_sections): Define.
- * configure: Rebuild with latest devo autoconf for NT support
+ * elf-hppa.h (elf_hppa_final_write_processing): Update for
+ recent changes to the arch_info structure.
-Mon Aug 25 16:11:04 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * cpu-arm.c (compatible): If B is a default type, return A.
+Tue Aug 10 00:34:29 1999 Mark P. Mitchell <mark@codesourcery.com>
+ Ralf Baechle <ralf@uni-koblenz.de>
-Mon Aug 25 15:35:46 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * cpu-v850.c (scan): New function.
- (arch_info_struct): New structure.
- (bfd_v850_arch): Add link into arch_info_structure.
+Tue Aug 10 00:21:08 1999 Mark P. Mitchell <mark@codesourcery.com>
- * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
- architecture.
+ * 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.
- * elf32-v850.c (v850_elf_object_p): New function.
+1999-08-09 Mark Mitchell <mark@codesourcery.com>
+ * 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 25 14:07:33 1997 Ian Lance Taylor <ian@cygnus.com>
+Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com)
- * syms.c (_bfd_stab_section_find_nearest_line): Clear the
- cached_stab field if the offset prevents us from using the cache.
+ * 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.
-Mon Aug 25 12:08:13 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-09 Mark Mitchell <mark@codesourcery.com>
- * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
- flags.
- * aout-arm.c (aout_arm_little_vec): Likewise.
- (aout_arm_big_vec): Likewise.
- * bout.c (b_out_vec_big_host): Likewise.
- (b_out_vec_little_host): Likewise.
- * mipsbsd.c (aout_mips_little_vec): Likewise.
- (aout_mips_big_vec): Likewise.
+ * 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.
-Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
+1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
- * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
- (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
- * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
- * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
- COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
- of two for I960 only.
- * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
- PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
- default definitions.
- (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
- GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
- (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
+ * 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.
-Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
+1999-08-09 Geoff Keating <geoffk@cygnus.com>
- * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
- v850_elf_check_relocs, v850_elf_reloc,
- v850_elf_final_link_relocate): Add support for
- BFD_RELOC_V850_16_PCREL relocation.
+ * 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.
- * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
- relocation.
+1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
- * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
+ * 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.
- * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
+ * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
+ * bfd-in2.h: Rebuild.
-Fri Aug 15 12:01:28 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
- * coffgen.c (coff_find_nearest_line): Correctly handle the offset
- argument as section relative, rather than an absolute address.
- From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
+ * 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.
-Fri Aug 15 04:58:02 1997 Doug Evans <dje@canuck.cygnus.com>
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
- * config.bfd (arc-*-elf*): Add.
- * configure.in (bfd_elf32_{little,big}arc_vec): Add.
- * configure: Rebuild.
- * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
- (BFD32_BACKENDS): Add elf32-arc.lo.
- (cpu-arc.lo,elf32-arc.lo): Add rules for.
+ * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
+ MKDEP.
* Makefile.in: Rebuild.
- * archures.c (architecture list): Add bfd_arch_arc.
- (bfd_archures_list): Add bfd_arc_arch.
- (bfd_mach_arc_base): Define.
- * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
- * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
- (bfd_target_vect): Add them.
- * bfd-in2.h, libbfd.h: Rebuild.
- * cpu-arc.c, elf32-arc.c: New files.
- * elf.c (pre_headers): Recognize bfd_arch_arc.
-Tue Aug 12 11:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
- * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
- data section is correctly rounded to a page in the file.
-
-Mon Aug 11 12:45:43 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
- there are no symbols.
+ * 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.
-Sun Aug 10 14:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
- * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
- file system 14 character limit.
- * Makefile.am, configure.in: Corresponding changes.
- * Makefile.in, configure: Rebuild.
+ * coffcode.h (coff_classify_symbol): Comment out part of
+ 1999-08-05 change which breaks cygwin DLLs.
-Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
+ * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
+ * aclocal.m4, configure: Rebuild.
- * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
- Rebuild dependencies.
- * Makefile.in: Rebuild.
+1999-08-06 Ian Lance Taylor <ian@zembu.com>
+
+ * section.c (global_syms): Only initialize union field if
+ __STDC__.
+
+1999-08-04 Mark Mitchell <mark@codesourcery.com>
+
+ * 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 <ian@zembu.com>
+
+ Based on patches from Donn Terry <donn@interix.com>:
+ * 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 6 18:56:51 1997 Ian Lance Taylor <ian@cygnus.com>
+Wed Aug 4 18:08:07 1999 Jeffrey A Law (law@cygnus.com)
- * Makefile.am (docdir): Define.
- * Makefile.in: Rebuild.
+ * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
+ (e_ltpsel, e_rtpsel): Similarly.
-Tue Aug 5 23:05:03 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
+ and 14bit ertpsel. Handle 64bit psel.
- * configure: Rebuild with autoconf 2.12.1.
+1999-08-04 Mark Mitchell <mark@codesourcery.com>
-Mon Aug 4 12:00:35 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * aclocal.m4, configure: Rebuild with new automake patches.
+1999-08-03 Mark Mitchell <mark@codesourcery.com>
-Sun Aug 3 08:15:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+ * 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.
- * rs6000-core.c (make_bfd_asection): New function to add a section
- to the core file bfd.
- (rs6000coff_core_p): Use make_bfd_asection to add the core file
- sections.
- Use BFD routines to seek, read and stat the core file.
- Handle .data sections from loaded objects and anonymously mmapped
- regions, these are available in AIX 4 core files.
+1999-08-03 Ian Lance Taylor <ian@zembu.com>
-Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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 <drow@false.org>.
- * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
- * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
- copy; use a patches libtool instead.
- * acmacros.m4: Remove.
- * Makefile.in, aclocal.m4, configure: Rebuild.
+ * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
-Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am: New file, based on old Makefile.in.
- * acmacros.m4: New file, copied from old aclocal.m4.
- * acinclude.m4: New file.
- * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
- handling; now handled by libtool. Replace AC_CONFIG_HEADER with
- AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
- Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
- .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
- * acconfig.h: Mention PACKAGE and VERSION.
- * stamp-h.in: New file.
- * dep-in.sed: Change .o to .lo.
- * Makefile.in: Now built with automake.
- * aclocal.m4: Now built with aclocal.
- * config.in, configure: Rebuild.
- * VERSION: Remove.
-
-Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
- if there is only a relocation to a read-only but not allocatable
- section (like .stab).
- * elf32-sparc.c (elf32_sparc_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 (mips_elf_size_dynamic_sections): Likewise.
- * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
-
- * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
- (ppc_elf_create_linker_section): These sections are not
- created by the linker (that is, they are created by the user
- putting data in them). In particular, they can be the source
- and target of relocations.
- (ppc_elf_adjust_dynamic_symbol): Check postcondition of
- bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
- objects (for instance, 'long double') to 16-byte boundaries.
- (ppc_elf_size_dynamic_sections): Make the code that generates
- section symbols exactly the same as for sparc, reducing the
- number of section symbols output.
- (ppc_elf_check_relocs): Check postcondition of
- bfd_elf32_link_record_dynamic_symbol. Make default case the
- same as corresponding code for sparc, fixing bug involving
- .rela.stabs.
- (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
- forced to be local because of versioning (by replicating
- corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
- as usual in ELF, not as pseudo-REL relocs (as the sparc linker
- does).
- (ppc_elf_relocate_section): Add handy debugging code for when
- assertion fails. Add some more 'symbol made local because of
- versioning' cases.
-
- * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
- processing a GOT relocation as required by ABI.
-
-Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
- version info if this symbol came from a dynamic object.
- (elf_link_add_object_symbols): Set the version info of a symbol
- only if the object actually contains version definitions and
- defines this symbol.
-
-Mon Jul 28 18:07:43 1997 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
- * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
- win32 dependencies.
- * configure: Regenerated with autoconf 2.12.
- * doc/Makefile.in: Add $(EXEEXT) to chew executable.
-
-Mon Jul 28 02:50:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
- a warning rather than returning an error.
-
-Sun Jul 27 19:54:14 1997 Felix Lee <flee@cygnus.com>
-
- * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
-
-Fri Jul 25 14:50:08 1997 Felix Lee <flee@cygnus.com>
-
- * cisco-core.c: define signals for wingdb.
-
-Fri Jul 25 16:27:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
- the same number of aux entries.
-
-Fri Jul 25 08:22:15 1997 Jeffrey A Law (law@cygnus.com)
-
- * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
- difference of two symbols if the relocation size is 32 bits.
- (som_write_fixups): Handle R_DATA_EXPR.
-
-Wed Jul 23 16:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
- its value if COFF_WITH_PE is defined.
-
-Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
-
- * coff-stubgo32.c: New file.
- * go32stub.h: New file.
- * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
- * coffswap.h (coff_swap_filehdr_in): Invoke
- COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
- are defined.
- (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
- COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
- (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
- COFF_ADJUST_AUX_IN_POST if they are defined.
- (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
- COFF_ADJUST_AUX_OUT_POST if they are defined.
- (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
- COFF_ADJUST_SCNHDR_IN_POST if they are defined.
- (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
- COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
- * targets.c (go32stubbedcoff_vec): Declare.
- (bfd_target_vector): Add go32stubbedcoff_vec.
- * configure.in (go32coff_vec): New target vector.
- (go32stubbedcoff_vec): Likewise.
- * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
- (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add coff-stubgo32.o.
- (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
- (HFILES): Add go32stub.h.
-
-Tue Jul 22 15:09:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Check for fdopen.
- * configure, config.in: Rebuild.
- * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
- __GO32__. Reindent a bit.
+ * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
+ look for generated file correctly.
+ * aclocal.m4, configure: Rebuild.
-Sun Jul 20 20:05:20 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-02 Mark Mitchell <mark@codesourcery.com>
+
+ * 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 <jj@ultra.linux.cz>
+
+ * 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 <mark@codesourcery.com>
+
+ * 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 <jj@ultra.linux.cz>
+
+ * 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 <jj@ultra.linux.cz>
+
+ * 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.
- * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
- flag for newly created sections.
- (sunos_add_dynamic_symbols): Don't discard newly created sections
- if shared library is dynobj.
+1999-07-30 Catherine Moore <clm@cygnus.com>
-Mon Jul 14 15:33:55 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for
+ R_ARM_GNU_VTENTRY.
- * elf.c (map_sections_to_segments): When checking whether
- including a section in a segment would force us to skip a page,
- align the address of the next segment to avoid wraparound
- problems.
+1999-07-29 Richard Henderson <rth@cygnus.com>
-Mon Jul 7 16:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
+ dynamic_sections_created.
- * coff-i386.c (coff_i386_is_local_label_name): New static function
- if TARGET_UNDERSCORE.
- (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
- (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
+1999-07-29 Richard Henderson <rth@cygnus.com>
-Mon Jun 30 14:29:26 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
- complain_overflow_signed, for 32 bit PC relative relocations.
+1999-07-28 Mark Mitchell <mark@codesourcery.com>
-Thu Jun 26 01:26:31 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
- * elflink.h (elf_link_add_object_symbols): When a version
- indirection symbol is overridden, make the original symbol point
- at the real overriding symbol.
+1999-07-27 Nick Clifton <nickc@cygnus.com>
- * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
- string index.
+ Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
+
+ * coff-arm.c (coff_arm_is_local_label_name): Change to strip
+ out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
- * elflink.h (elf_link_output_extsym): Use the right section for a
- common symbol.
- * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
- symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
+1999-07-23 Donn Terry <donn@interix.com>
-Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+ * 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.
- * elflink.h (elf_merge_symbols): Resolve indirect and warning
- symbols before checking for new symbols.
+ * config.bfd (i[3456]86-*-interix*): New target.
- * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
+1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
-Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
- file, not aoutsz bytes (they are different in XCOFF .o files).
+1999-07-21 Ian Lance Taylor <ian@zembu.com>
- * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
- redefined by objects included from archives.
+ From Mark Elbrecht:
+ * makefile.dos: Remove; obsolete.
+ * configure.bat: Remove; obsolete.
-Mon Jun 23 18:03:27 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-21 H.J. Lu <hjl@gnu.org>
- * elflink.h (elf_merge_symbol): In the case of a new defined
- symbol overriding an old defined symbol, return the hash table
- entry which we modify, even if it is the target of an
- indirection.
- (elf_link_add_object_symbols): If the real name of the symbol gets
- overridden, convert the versioned symbol into an indirect symbol
- to the real symbol.
+ * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
- * elflink.h (elf_merge_symbol): New static function, broken out of
- elf_link_add_object_symbols.
- (elf_link_add_object_symbols): Call it.
+1999-07-21 Philippe De Muyter <phdm@macqel.be>
-Sun Jun 22 19:40:57 1997 Ian Lance Taylor <ian@cygnus.com>
+ * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
+ message and fail if a symbol index is out of range.
- * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
- handle case where COFF filehdr does not immediately follow PE
- header.
- * coffgen.c (coff_object_p): Remove useless seek to current
- location.
-
-Wed Jun 18 19:03:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
- REFC.
-
-Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
- symbols, skip N_ABS symbols with debugging storage classes.
-
-Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
-
- * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
- relocs in shared libraries which refer to local symbols. Cope
- with addend when processing a GOT relocation.
-
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
- for sections that the linker didn't create.
- (ppc_elf_finish_dynamic_sections): Only try to write out a section
- symbol if it was created in ppc_elf_size_dynamic_sections.
- (ppc_elf_relocate_section): Complain if we have to generate a reloc
- relative to a section for which we didn't output a symbol.
-
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
- relocs are 'rela' relocs, like everything else. .rela.plt is not
- a read-only section, so we don't have to special-case it.
-
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
- .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
-
- * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
- (ppc_elf_relocate_section): @got offsets are 4 from start of the
- actual .got section.
- * elflink.c (_bfd_elf_create_got_section): The three reserved
- words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
-
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
- characters, not 4.
-
- * elf32-ppc.c (ppc_elf_check_relocs): Use
- _bfd_elf_create_got_section to create the GOT rather than
- ppc_elf_create_linker_section. Create the '.rela.got' section
- ourselves.
- (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
- symbol has a GOT entry.
- (ppc_elf_relocate_section): Record when a symbol is used through
- the GOT, and allocate space in the GOT for each such symbol.
- (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
- (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
- stuff.
-
- * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
- treated in a similar way to ADDR16_HA relocs.
- (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
- shared objects; the linker must deal with them.
- (ppc_elf_create_linker_section): Stop setting
- _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
- LINKER_SECTION_PLT stuff.
- (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
- (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
- section, not ELF-specific calls.
- (elf_backend_plt_not_loaded): Set to 1.
- (elf_backend_got_symbol_offset): Set to 4.
- * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
- for when ld.so fills in the PLT; and 'got_symbol_offset' member.
- * elflink.c (_bfd_elf_create_dynamic_sections): Apply
- plt_not_loaded member.
- (_bfd_elf_create_got_section): Apply got_symbol_offset.
- * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
- 'loaded'.
- (elf_backend_G_O_T_offset): Set default to 0.
- (elfNN_bed): Set added fields.
-
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
- DT_RELENT in shared objects; should be DT_RELAENT.
-
- * elf32-ppc.c (ppc_elf_relocate_section): Propagate
- R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
- such a reloc (in a non-shared object) refers to a symbol that's
- not defined.
-
-Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * elfcode.h (put_signed_word): Define.
- (get_signed_word): Define.
- (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
- (elf_swap_reloca_out): Use put_signed_word for the r_addend
- field.
- * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
- bfd_get_signed_32 to set the r_addend field.
- * elf64-mips.c (mips_elf64_swap_reloca_in): Use
- bfd_h_get_signed_64 to set the r_addend field.
-
-Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-i386.c (elf_i386_relocate_section): When generating a
- shared library, do the relocation if the input section is not
- allocated in memory.
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
- elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
- (elf_fix_symbol_flags): New static function, broken out of
- elf_adjust_dynamic_symbol.
- (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
- (elf_link_assign_sym_version): Likewise. Permit a symbol to be
- forced local even if NEEDS_PLT is set. When forcing a symbol to
- be local, clear NEEDS_PLT.
- (elf_link_output_extsym): Remove unused local bed.
-
-Wed Jun 11 22:44:20 1997 Jeffrey A Law (law@cygnus.com)
-
- * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
- for derived elf linker hash table entries. References to
- elf_link_hash_entry changed appropriately.
- (elf32_mn10300_link_hash_table): New structure for derived elf
- linker hash table.
- (elf32_mn10300_hash_table): Define.
- (elf32_mn10300_link_hash_traverse): Likewise.
- (elf32_mn10300_link_hash_newfunc): New function.
- (elf32_mn10300_link_hash_table_create): Likewise.
- (elf32_mn10300_finish_hash_table_entry): Likewise.
- (mn10300_elf_relax_section): Handle "call" -> "calls", removal
- of prologue code, and call:32->call:16 relaxing.
- (compute_function_info: New function.
- (bfd_elf32_bfd_ilink_hash_table_create): Define.
-
-Wed Jun 11 00:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
- for a symbol which is being forced to be local.
- * elf32-i386.c (elf_i386_relocate_section): Write out the
- relocation value for a GOT reloc for a symbol which is turning
- into a local symbol.
- (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
- local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
- reloc.
- * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
+1999-07-21 Ian Lance Taylor <ian@zembu.com>
- * elf32-i386.c (elf_i386_relocate_section): Get the relocation
- value if the symbol is turning into a local symbol.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
-
-1997-06-10 22:58 Ulrich Drepper <drepper@cygnus.com>
-
- * elflink.h (elf_link_add_object_symbols): Also read verneed
- information by calling `_bfd_elf_slurp_version_tables'.
- (elf_link_add_object_symbols): For undefined symbols look for
- version information in the verneed records.
- (elf_link_add_object_symbols): Use soname of shared object
- for verneed record if it is available.
+ * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
+ when looking at a R_MIPS_GOT16 relocation.
-Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+1999-07-20 Nick Clifton <nickc@cygnus.com>
- * cpu-arm.c: Add prototypes for compatible and scan.
- * cofflink.c: Add prototype for mark_relocs.
+ * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
- * archive.c (bfd_special_undocumented_glue): Change filename to
- const pointer. Add prototype.
+Mon Jul 19 14:03:44 1999 Mark P. Mitchell <mark@codesourcery.com>
-Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * 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.
- * elflink.h (elf_link_add_object_symbols): Ignore relocations of
- sections that will be discarded.
+1999-07-19 Ian Lance Taylor <ian@zembu.com>
-1997-06-06 22:58 Ulrich Drepper <drepper@cygnus.com>
+ * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
+ structure.
- * elflink.h (elf_link_find_version_dependencies): When searching
- for known version symbol skip non-matching verdef records, not
- matching records.
+ * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
+ if they appear to be specially created by the linker.
-Thu Jun 5 15:52:45 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-19 Nick Clifton <nickc@cygnus.com>
- * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
- not a bfd_vma, to the base file, to match how dlltool reads it.
-
-Tue Jun 3 16:57:45 1997 Nick Clifton <nickc@cygnus.com>
-
- * reloc.c: Add thumb relocations.
+ * 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.
- * bfd-in2.h: Add Thumb relocations.
+ * 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 <schwab@suse.de>
+
+ * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
+ and rel_hdr.
+
+Sat Jul 17 02:28:28 1999 Mark P. Mitchell <mark@codesourcery.com>
+
+ * 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.
- * libbfd.h: Add Thumb relocations.
+ * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
+ a relocateable object.
+ (_bfd_mips_elf_relocate_section): Handle relocateable links.
-Mon Jun 2 10:41:52 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
- * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
+ * 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.
-Fri May 30 12:46:27 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
- for a section even if it is not loaded.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
+ DT_SPARC_PLTFMT.
- * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
- section VMA.
- (_bfd_coff_link_input_bfd): Separate section VMA handling for
- input and output files.
- (_bfd_coff_generic_relocate_section): Check whether input file,
- not output file, is a PE file.
+1999-07-16 Ian Lance Taylor <ian@zembu.com>
-Wed May 28 15:48:43 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
+1999-07-16 Andreas Schwab <schwab@suse.de>
-Wed May 28 16:16:04 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
+ variables `link' and `elfsec'.
+ (elf_bfd_final_link): Remove unused variable `os'.
- * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
- R_IMAGEBASE reloc.
+Thu Jul 15 17:55:31 1999 Mark P. Mitchell <mark@codesourcery.com>
-Wed May 28 09:48:43 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * cpu-arm.c (compatible): Add test for supersets of ARM
- architectures.
+1999-07-15 J.T. Conklin <jtc@redback.com>
-Tue May 27 19:42:03 1997 Bob Manson <manson@charmed.cygnus.com>
+ * config.bfd (i[3456]86-*-vxworks*): New target.
- * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
- member.
+1999-07-15 Mark Mitchell <mark@codesourcery.com>
-Tue May 27 14:34:08 1997 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
- called directly by gas/config/tc-arm.c.
+1999-07-15 Ian Lance Taylor <ian@zembu.com>
-Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
+ * configure.in: Bump version number to 2.9.5.
+ * configure: Rebuild.
- * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
- (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
+Thu Jul 15 02:56:15 1999 Jeffrey A Law (law@cygnus.com)
-Mon May 26 14:05:13 1997 Ian Lance Taylor <ian@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.
- * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
- section VMA.
+1999-07-14 Mark Mitchell <mark@codesourcery.com>
-Mon May 26 10:57:48 1997 Fred Fish <fnf@cygnus.com>
+ * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
+ things relocated by R_MIPS16_GPREL.
+ (mips_elf_perform_relocation): Likewise.
- * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
- (coff_bfd_copy_private_bfd_data): Ditto.
- * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
- (coff_arm_bfd_print_private_bfd_data): Ditto.
- (coff_arm_bfd_set_private_flags): Ditto.
- (coff_arm_bfd_copy_private_bfd_data): Ditto.
+Wed Jul 14 15:23:19 1999 Jim Wilson <wilson@cygnus.com>
-Fri May 23 15:14:58 1997 Fred Fish <fnf@cygnus.com>
+ * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
- * libcoff-in.h (struct coff_final_link_info): Add boolean
- global_to_static member for support of task linking.
- (_bfd_coff_write_task_globals): Add prototype.
- * libcoff.h: Regenerate.
- * coffcode.h (coff_write_object_contents): Use #ifdef to
- check RS6000COFF_C, to be consistent with all other uses
- in this file.
- * cofflink.c (_bfd_coff_final_link): If doing task linking,
- call _bfd_coff_write_task_globals.
- (_bfd_coff_link_input_bfd): If doing task linking, convert
- global functions to static.
- (_bfd_coff_write_global_sym): If doing task linking, convert
- global variables to static.
- (_bfd_coff_write_task_globals): New function.
+1999-07-14 Richard Henderson <rth@cygnus.com>
-Wed May 21 17:15:50 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
- COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
- value.
- * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
- callers. If PE file, don't add section VMA.
- (coff_write_alien_symbol): If PE file, don't add section VMA.
- * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
- (_bfd_coff_write_global_sym): Likewise.
- (_bfd_coff_generic_relocate_section): Likewise.
+1999-07-14 Mark Mitchell <mark@codesourcery.com>
- * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
- is 64 bits.
+ * 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.
-Wed May 21 09:58:10 1997 Nick Clifton <nickc@cygnus.com>
+1999-07-13 Mark Mitchell <mark@codesourcery.com>
+
+ * 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 <rth@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Thinko last change.
+ Always overwrite p_flags.
+
+1999-07-13 Richard Henderson <rth@cygnus.com>
+
+ * 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 <rth@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
+
+1999-07-13 Richard Henderson <rth@cygnus.com>
+
+ * 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 <mark@codesourcery.com>
+
+ * 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 <mark@codesourcery.com>
+
+ * 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 <ian@zembu.com>
- * cofflink.c (mark_relocs): Add new function to mark symbols which
- are used by relocations.
- (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
- suppress the skipping of symbols that have thus been marked.
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
-Tue May 20 18:45:26 1997 Ian Lance Taylor <ian@cygnus.com>
+ * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
+ * bfd-in2.h: Rebuild.
- * coff-sh.c (sh_merge_private_data): New static function.
- (coff_bfd_merge_private_bfd_data): Define.
+ * 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 <schwab@suse.de>
+
+ * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
+ * m68klinux.c: Likewise.
+
+1999-07-12 Ian Lance Taylor <ian@zembu.com>
+
+ * 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.
-Fri May 16 10:23:03 1997 Jeffrey A Law (law@cygnus.com)
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
- * elf-m10300.c (elf32_mn10300_relax_section): Read in all
- the symbols associated with each BFD.
- (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
- more than once.
- * elf-m10200.c: Likewise.
- * elf32-m32r.c: Likewise.
- * elf32-sh.c: Likewise.
+ * 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.
-Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elflink.h (elf_link_add_object_symbols): Don't decrease the
- alignment of a common symbol. If two symbols that look like
- common symbols are found in two shared libraries, and the size is
- different, use the larger size, and warn if --warn-common. If a
- common symbol overrides a definition in a shared library, set the
- size to the larger size, and warn if --warn-common.
+1999-07-11 Mark Mitchell <mark@codesourcery.com>
-Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
+ * 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 <dave@hiauly1.hia.nrc.ca>
+
+ * config.bfd (hppa*-*-linux-gnu*): New target
+
+1999-07-07 Mark Mitchell <mark@codesourcery.com>
+
+ * 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.
- * cpu-arm.c (compatible): Allow default machine to be polymorphed
- into any other machine type.
+1999-07-07 Mark Mitchell <mark@codesourcery.com>
- * coffcode.h (coff_set_flags): Initialise flags variable to 0.
+ * 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 <ian@zembu.com>
+
+ * 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.
- * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
- data into an unitialised destination set its machine type as well.
+ Based on patch from H.J. Lu <hjl@gnu.org>:
+ * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
+ shared library to override a weak definition in a regular object.
-Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
+Tue Jul 6 10:23:39 1999 Jeffrey A Law (law@cygnus.com)
- * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
- to common symbol size. Consistently treat uninitialized symbols
- in shared objects as common symbols.
+ * libhppa.h: Revert July 2, 1999 patch.
-Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
+ need to generate DLTIND relocations, not DLTREL relocations.
- * archures.c (constants): Added new constants to identify the
- type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
- bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
+1999-07-05 Nick Clifton <nickc@cygnus.com>
- * bfd-in2.h (constants): Added new constants to identify
- the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
- bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
- bfd_mach_arm_4T. This file is auto-magically generated from the
- archures.c file. This update is just to save work.
+ * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
+ architectures.
+ (coff_set_flags): Recognise arm 5 architectures.
- * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
- coff_arm_bfd_print_private_bfd_data,
- coff_arm_bfd_set_private_flags,
- coff_arm_bfd_copy_private_bfd_data): Added these new functions.
- (global): Macro redefinitions set up to use these new functions.
+ * cpu-arm.c: Add support for strongarm and arm9 cpus.
+ Add support for armv5 architecture.
- * coffcode.h (coff_mkobject_hook): Added call to
- coff_arm_bfd_set_private_flags().
- (coff_set_arch_mach_hook): Added code to set machine type based on
- bits stored in internal flags.
- (coff_set_flags): Added code to set the new bits in the flags
- field based on the machine number.
- (function definition macros): Made all function definition macros
- conditional so that they can be overridden by target specific
- files.
+ * 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.
- * cpu-arm.c (compatible): Added this function. (arch_info_struct):
- Structure extended to include new types, one each for ARMv2,
- ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
+1999-07-02 Mark Mitchell <mark@codesourcery.com>
+
+ * 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.
- * libcoff-in.h (struct coff_tdata): Added flags field.
+1999-07-02 Ian Lance Taylor <ian@zembu.com>
-Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config.bfd: Add * at the end of i[3456]86-*-unixware.
- * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
+Fri Jul 2 12:21:10 1999 Jeffrey A Law (law@cygnus.com)
- * config.bfd: Change #if 0 around uses of host_aout_vec to #if
- HAVE_host_aout_vec.
+ * libhppa.h (HPPA_R_ARG_RELOC): Delete.
+ (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
-Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
+1999-07-01 Mark Mitchell <mark@codesourcery.com>
- * coffgen.c (coff_find_nearest_line): If there are no syments,
- just return false.
+ * 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 <mark@codesourcery.com>
+
+ * 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 <ian@zembu.com>
+
+ * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
+ relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
+
+1999-06-04 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf_backend_got_header_size): Define.
+ (elf_backend_plt_header_size): Likewise.
+
+1999-06-28 Jim Pick <jim@jimpick.com>
+
+ * 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 <mark@codesourcery.com>
+
+ * 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.
-Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
+1999-06-26 Mark Mitchell <mark@codesourcery.com>
+
+ * 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.
- * config.bfd: cope with '*-*-linux-gnuaout' targets.
+ * 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 <khan@xraylith.wisc.edu>
-Thu May 1 11:31:12 1997 Ian Lance Taylor <ian@cygnus.com>
+ * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
+ as writable PE sections.
- * targmatch.sed: Add explicit \n characters to work around bug in
- HP/UX 10.20 sed program.
+1999-06-26 David Mosberger <davidm@hpl.hp.com>
-Wed Apr 30 12:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
- extension problems.
+1999-06-26 David Mosberger <davidm@hpl.hp.com>
-Tue Apr 22 12:06:08 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
+1999-06-26 Ian Lance Taylor <ian@zembu.com>
-Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
+ shared library to have an undefined symbol.
- * elf32-m68k.c: Follow the last changes in elf32-i386.c:
- (struct elf_m68k_pcrel_relocs_copied, struct
- elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
- elf_m68k_link_hash_traverse, elf_m68k_hash_table,
- elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
- elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
- New definitions.
- (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
- PC relative relocs for a global symbol defined in a regular
- object, and count the number of PC relative relocs copied for any
- global symbol.
- (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
- traverse with elf_m68k_discard_copies.
+ From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
+ * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
-Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
+Thu Jun 24 20:59:11 1999 Jeffrey A Law (law@cygnus.com)
- * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
- relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
+ * 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.
- * coffcode.h (coff_compute_section_file_positions): Force the
- potential last byte in the file to be written out when
- COFF_IMAGE_WITH_PE.
+1999-06-22 Mark Mitchell <mark@codesourcery.com>
-Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
+ * elflink.h (size_dynamic_sections): Use user-specified init/fini
+ functions instead of _init/_fini if requested.
- * configure.host (mips*-*-openbsd*): New host.
+1999-06-23 Ian Lance Taylor <ian@zembu.com>
-Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
+ field.
- * elflink.h (elf_link_add_object_symbols): Only subtract the
- section VMA from the symbol value if this is a fully linked file.
+1999-06-22 Ian Lance Taylor <ian@zembu.com>
- * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
- (struct elf_i386_link_hash_entry): Define.
- (struct elf_i386_link_hash_table): Define.
- (elf_i386_link_hash_traverse): Define.
- (elf_i386_hash_table): Define.
- (elf_i386_link_hash_newfunc): New static function.
- (elf_i386_link_hash_table_create): New static function.
- (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
- PC relative relocs for a global symbol defined in a regular
- object, and count the number of PC relative relocs copied for any
- global symbol.
- (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
- traverse with elf_i386_discard_copies.
- (elf_i386_discard_copies): New static function.
- (bfd_elf32_bfd_link_hash_table_create): Define.
+ From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
+ * 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.
- From Gordon W. Ross <gwr@mc.com>:
- * aoutf1.h (MY_entry_is_text_address): Define if not defined.
- (sunos4_aout_backend): Use MY_entry_is_text_address.
+1999-06-22 Mark Mitchell <mark@codesourcery.com>
-Wed Apr 16 14:02:29 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (link_read_relocs): Explicitly cast external_relocs to
+ bfd_byte * before performing pointer arithmetic.
- From Gordon W. Ross <gwr@mc.com>:
- * netbsd.h (N_SHARED_LIB): Define.
- (SEGMENT_SIZE): Don't define.
- * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
- April 11).
- * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
- (SEGMENT_SIZE): Don't define.
+Tue Jun 22 13:06:25 1999 Jeffrey A Law (law@cygnus.com)
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
- to sizeof Rela structure, not sizeof Rel structure. From Gary
- Thomas <g.thomas@opengroup.org>.
+ * 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.
-Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-22 Nick Clifton <nickc@cygnus.com>
- * aout-target.h (MY(callback)): If entry_is_text_address, adjust
- whenever entry is larger than text address, but only by whole
- pages. From Gordon W. Ross <gwr@mc.com>.
+ * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
+ handling R_V850_22_PCREL relocation.
- * Makefile.in (install): Depend upon installdirs. Use
- mkinstalldirs to build $(oldincludedir).
- (installdirs): New target.
+1999-06-21 Ian Lance Taylor <ian@zembu.com>
- * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
- if this is a debugging section which we are stripping.
+ * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
+ type.
-Mon Apr 14 12:39:30 1997 Richard Henderson <rth@tamu.edu>
+Sun Jun 20 14:13:57 1999 Richard Henderson <rth@cygnus.com>
- * elf64-alpha.c (elf64_alpha_object_p): Allocate the
- alpha-specific target data struct.
+ * section.c (_bfd_strip_section_from_output): Ignore sections
+ DISCARDed by the link script.
-Mon Apr 14 11:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-19 Ian Lance Taylor <ian@zembu.com>
- From Thomas Graichen <graichen@rzpd.de>:
- * Makefile.in: Always use $(SHELL) when running move-if-change.
- * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
- * configure: Rebuild.
+ * elflink.h (elf_link_remove_section_and_adjust_dynindices):
+ Remove unused local variable spp.
-Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
+ * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
+ the entry symbol is not set.
- * elfcode.h (elf_slurp_symbol_table): Only subtract the section
- VMA if this is an executable file or a shared object.
+Fri Jun 18 04:24:57 1999 Richard Henderson <rth@cygnus.com>
- * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
- <gwr@mc.com>.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
+ GPDISP or LITUSE in a relocatable link.
- * libaout.h (struct aout_backend_data): Add entry_is_text_address
- field.
- * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
- start of the file. Remove uses later on which switch using
- ifdef.
- (MY(callback)): Handle entry_is_text_address.
- (MY_entry_is_text_address): Define if not defined.
- (MY(backend_data)): Initialize new field.
- * aoutf1.h (sunos4_aout_backend): Likewise.
- * i386aout.c (MY(backend_data)): Likewise.
- * i386mach3.c (MY(backend_data)): Likewise.
- * mipsbsd.c (MY(backend_data)): Likewise.
- * sparclynx.c (sparclynx_aout_backend): Likewise.
- * netbsd.h (SEGMENT_SIZE): Define if not defined.
- (MY_entry_is_text_address): Define.
- * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
-
- * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
- whose name starts with `.'.
-
-Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
-
- * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
- mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
- powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
- * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
- m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
- sparc-*-openbsd*): New targets.
- * configure: Rebuild.
+Thu Jun 17 21:24:43 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
+ * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
+ * (alloc_dwarf1_func): Likewise.
- * stabs.c (struct stab_section_info): New field
- `cumulative_skips'.
- (_bfd_link_section_stabs): Fill the above array.
- (_bfd_stab_section_offset): Use `cumulative_skips' to
- speed up offset calculation.
+Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com)
-Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
+ * libhppa.h: Fix various formatting errors.
+ (assemble_3); Rewrite using CATENATE.
+ (assemble_17): Fix various bugs.
- * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
- addend for non pc-relative relocations.
+1999-06-16 Nick Clifton <nickc@cygnus.com>
- * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
- for non-existent function.
+ * elf32-mcore.c (R_MCORE_RAW): Fix definition.
- * elf-m10300.c (mn10300_elf_relax_section): New function.
- (mn10300_elf_relax_delete_bytes): Likewise.
- (mn10300_elf_symbol_address_p): Likewise.
- (mn10300_elf_get_relocated_section_contents): Likewise.
- (bfd_elf32_bfd_relax_section): Define.
- (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
+1999-06-15 Richard Henderson <rth@cygnus.com>
-Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
+ * section.c (SEC_SHORT): Define.
+ * bfd-in2.h: Rebuild.
- * configure.host: Set SHLIB_LIBS.
- * configure.in: Substitute SHLIB_LIBS.
- * configure: Rebuild.
- * Makefile.in (SHLIB_LIBS): New variable.
- ($(SHLIB)): Use $(SHLIB_LIBS).
+1999-06-13 Mark Mitchell <mark@codesourcery.com>
-Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
+ * 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.
- * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
- with bfd_section_vma.
+1999-06-13 Alan Modra <alan@spri.levels.unisa.edu.au>
-Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
+ complain_overflow_bitfield to complain_overflow_signed.
- * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
- Correct CPU file names for mn10[23]00.
- * configure: Rebuild.
+1999-06-13 Mark Mitchell <mark@codesourcery.com>
- * bfd.c (bfd_record_phdr): Cast count to size_t before
- subtraction.
+ * elflink.h (elf_link_read_relocs_from_section): New function,
+ split out from ...
+ (elf_link_read_relocs): Here. Use it for both relocation
+ sections.
- * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
- * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
- (xcoff_write_archive_contents): LIkewise.
- * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
- (mips_elf_create_procedure_table): Likewise.
- * peicode.h (pe_print_idata): Likewise.
- (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
- * xcofflink.c (xcoff_get_section_contents): Likewise.
- (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
- (xcoff_link_add_symbols): Likewise.
- (xcoff_link_add_symbols): Likewise.
+1999-06-12 Mark Mitchell <mark@codesourcery.com>
- * ppcboot.c (ppcboot_set_arch_mach): Make static.
- (ppcboot_bfd_print_private_bfd_data): Likewise.
+ * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
+ asect->reloc_count is valid.
- * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
- to complain_overflow_signed.
+1999-06-12 Ian Lance Taylor <ian@zembu.com>
-Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c (mips_elf32_section_processing): Permit a
+ SHT_MIPS_REGINFO section to have a size of 0.
- * VERSION: Set to 2.8.1.
+1999-06-12 David O'Brien <obrien@freebsd.org>
- * Branched binutils 2.8.
+ * config.bfd (alpha*-*-freebsd*): New target.
+ (i[3456]86-*-freebsd*): Now defaults to ELF.
- * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
- deciding whether to copy a reloc into a shared object.
- (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
- relocs in unallocated sections.
- * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
- R_SPARC_RELATIVE relocs in unallocated sections.
+1999-06-11 Ian Lance Taylor <ian@zembu.com>
-Wed Apr 2 16:19:41 1997 Mike Meissner <meissner@cygnus.com>
+ * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
+ wrap if the relocation covers the high bit of an address.
- * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
- always create got section so that the _GLOBAL_OFFSET_TABLE_ label
- is always created.
+ * dwarf2.c (decode_line_info): Remove unused variable first_time.
-Wed Apr 2 10:49:07 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
- * elflink.h (elf_link_add_object_symbols): Let a common symbol
- override an uninitialized symbol from a shared library with a
- smaller size.
+ * 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.
- * elf-m10200.c: Rename from elf32-mn10200.c.
- * elf-m10300.c: Rename from elf32-mn10300.c.
- * cpu-m10200.c: Rename from cpu-mn10200.c
- * cpu-m10300.c: Rename from cpu-mn10300.c
- * Makefile.in: Update accordingly.
+1999-06-07 Richard Henderson <rth@cygnus.com>
- * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
- (elf_mips_isa): Move to earlier in file.
- (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
- (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
- specially.
+ * section.c (_bfd_strip_section_from_output): Remove output
+ sections with no initial link_order.
- * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
- calling abort.
+1999-06-07 Nick Clifton <nickc@cygnus.com>
-Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
+ * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
- * configure.com: New file.
- * config.h-vms: Remove file.
- * makefile.vms: Update for new configure scheme.
+Mon Jun 7 11:49:43 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+ * Makefile.am (SOURCE_HFILES): Add missing headers.
+ * Makefile.in: Regenerated.
- * libcoff-in.h (ppc_allocate_toc_section): Declare.
- (ppc_process_before_allocation): Declare.
- * libcoff.h: Rebuild.
+1999-06-06 Mark Mitchell <mark@codesourcery.com>
- * coffcode.h (coff_mkobject_hook): Declare if not a macro.
+ * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
+ the N32 ABI.
-Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
+1999-06-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
- * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
+ * 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.
-Mon Mar 31 16:11:35 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-04 Nick Clifton <nickc@cygnus.com>
- * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
- symbol index for a R_IHCONST reloc.
+ * 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.
-Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+1999-06-04 Ian Lance Taylor <ian@zembu.com>
- * targmatch.sed: Do not use \(\) recursively.
+ * Makefile.am: Rebuild dependencies.
+ (BFD32_BACKENDS): Add dwarf1.lo.
+ (BFD32_BACKENDS_CFILES): Add dwarf1.c.
+ * Makefile.in: Rebuild.
-Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+1999-06-04 Nick Clifton <nickc@cygnus.com>
- * m68klinux.c (MACHTYPE_OK): Define.
- * i386linux.c (MACHTYPE_OK): Define.
+ * 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.
-Fri Mar 28 11:56:15 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-03 Nick Clifton <nickc@cygnus.com>
- From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
- <hjl@gnu.ai.mit.edu>:
- * sparclinux.c: New file.
- * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
- * bfd-in2.h: Rebuild.
- * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
- * configure.in (sparclinux_vec): Add to list of vectors.
- * configure: Rebuild.
- * targets.c (sparclinux_vec): Declare.
- (bfd_target_vector): Add sparclinux_vec.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add sparclinux.o.
- (BFD32_BACKENDS_CFILES): Add sparclinux.c.
-
- * coff-mips.c (mips_ecoff_backend_data): Initialize new
- bfd_coff_backend_data field.
- * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
-
- * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
- for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
- <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
-
- * bfd.c: Include "libiberty.h".
- (strerror): Don't declare.
- (bfd_errmsg): Call xstrerror rather than strerror.
-
-Thu Mar 27 12:55:42 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
- reloc even if the symbol is in the .bss section.
- * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
- * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
-
- * coffcode.h (bfd_coff_backend_data): Add new field
- _bfd_coff_default_section_alignment_power.
- (bfd_coff_default_section_alignment_power): Define.
- (bfd_coff_std_swap_table): Initialize new field.
- * libcoff.h: Rebuild.
- * cofflink.c (coff_link_add_symbols): Limit alignment of a common
- symbol to the default section alignment.
+ * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
- * COPYING: Update FSF address.
+Fri Jun 4 10:05:11 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-Wed Mar 26 14:50:20 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf.c (elf_fake_sections): Undo change of 1999-05-10.
- * elflink.c (_bfd_elf_create_linker_section): Don't set
- bss_section and rel_section from existing sections.
+Fri Jun 4 03:10:49 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
- * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
- if it is needed.
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
+ start / stop for recalculating of r_addend of R_SH_SWITCH*.
-Tue Mar 25 22:26:56 1997 Stu Grossman (grossman@critters.cygnus.com)
+Fri Jun 4 02:53:13 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
- * aoutx.h (some_aout_object_p): Change executable test to fix
- problems with embedded a.out systems.
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
+ in other text sections.
-Tue Mar 25 14:35:37 1997 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 4 02:29:34 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
- * stabs.c (_bfd_stab_section_offset): New function.
- * libbfd-in.h (_bfd_stab_section_offset): Declare.
- * libbfd.h: Rebuild.
- * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
- stab reloc.
- * 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.
+ * 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.
- * stabs.c (_bfd_link_section_stabs): Copy over the first header
- symbol. Check for memory allocation failure of *psinfo.
- (_bfd_write_section_stabs): Add psinfo parameter. Change all
- callers. Set the value of the header symbol.
- * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
- * libbfd.h: Rebuild.
+1999-06-03 Ulrich Drepper <drepper@cygnus.com>
-Mon Mar 24 13:41:00 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * targmatch.sed: Use the hold space to put the #ifdef around the
- the string constant.
- * targets.c (UNSUPPORTED_TARGET): Don't define.
- (find_target): Don't check for UNSUPPORTED_TARGET.
- (bfd_set_default_target): Don't try to optimize by checking for
- default.
-
- * Makefile.in: Rebuild dependencies.
- (ALL_MACHINES_CFILES): Add cpu-m32r.c.
- (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
- (elf32-m32r.o): Remove explicit target.
-
- * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
- i[3456]86-*-linux*.
-
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
- count section symbols for sections that were created by the
- linker, or are not allocatable or not loadable.
- (elf32_sparc_finish_dynamic_sections): Output output section
- symbols for section for which we made space for them.
-
-Fri Mar 21 13:08:26 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
- no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
-
-Fri Mar 21 12:36:46 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
- (m32r_hi16_list): New static local.
- (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
- (m32r_elf_do_hi16_reloc): Delete.
- (m32r_elf_relocate_hi16): New function.
- (m32r_elf_lo16_reloc): New function.
- (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
- LO16 reloc.
-
- Mon Mar 10 16:03:31 1997 Doug Evans <dje@seba.cygnus.com>
-
- * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
- (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
- (m32r_elf_final_sda_base): New function.
- (m32r_elf_relocate_section): Rewrite sdata support.
- (m32r_elf_finish_dynamic_sections): Delete.
-
-Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
- * coff-svm68k.c: New file. Just defines some macros and includes
- coff-m68k.c.
- * coff-m68k.c: Add functions to handle common addends, moved in
- from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
- Control whether relocs are visible using STATIC_RELOCS.
- * cf-m68klynx.c: Simplify greatly: just define macros to control
- coff-m68k.c.
- * coff-aux.c: Likewise. Just leave add_one_symbol routine.
- * targets. (m68ksysvcoff_vec): Declare.
- (bfd_target_vector): Add m68ksysvcoff_vec.
- * config.bfd (m68*-motorola-sysv*): New target.
- * configure.in (m68ksysvcoff_vec): New vector.
- * configure: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add coff-svm68k.o.
- (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
+ * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
- * binary.c (binary_set_section_contents): Don't get misled if the
- first section is not loadable. From Matthew L. Martin
- <mlm@xedia.com>.
+1999-06-03 Ian Lance Taylor <ian@zembu.com>
- * elflink.h (elf_bfd_final_link): Set the value of a section
- symbol to the section address unless doing a relocateable link.
+ * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
+ prototype.
+ (bfd_elf32_arm_process_before_allocation): Likewise.
+ * bfd-in2.h: Rebuild.
-Tue Mar 18 23:03:17 1997 Richard Henderson <rth@tamu.edu>
+1999-06-03 David Mosberger <davidm@hpl.hp.com>
+
+ * 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 <Mark Mitchell <mark@codesourcery.com>>
+
+ * 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 <msalter@cygnus.com>
+
+ * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
+ COFF_WITH_PE defined.
+
+1999-06-02 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <mark@codesourcery.com>
+
+ * 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 <miodrag@multimania.com>
+
+ * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
+
+Tue Jun 1 17:57:58 1999 Mark P. Mitchell <mitchell@n02.acl.lanl.gov>
+
+ * 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 <schwab@issan.cs.uni-dortmund.de>
+
+ * 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 <philb@gnu.org>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 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.
- * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
- .plt entry if we've taken the function's address.
- (elf64_alpha_merge_gots): Merge collected flags info as well.
+1999-05-28 Nick Clifton <nickc@cygnus.com>
-Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
+ * elf-bfd.h (struct elf_backend_data): Add new field:
+ elf_backend_post_process_headers.
- * Many files: Add function prototypes.
- * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
- * ecofflink.c: Include "libcoff.h" and "libecoff.h".
- * elf32-ppc.c (ppc_elf_fake_sections): Make static.
- * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
- * peicode.h: Change several void * parameters to PTR.
- * srec.c (srec_get_symbol_info): Make static.
- * syms.c (bfd_symbol_is_absolute): Remove.
- * Makefile.in: Rebuild dependencies.
+ * elfxx-target.h (elf_backend_post_process_headers): Define to
+ NULL if not already defined.
+ (elfNN_bed): Initialise elf_backend_post_process_headers field.
-Tue Mar 18 12:58:08 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
- (bfd_elf32_bfd_is_local_label): Don't define.
+1999-05-28 Ian Lance Taylor <ian@zembu.com>
- * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
- than malloc.
+ * 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.
-Mon Mar 17 11:32:53 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-05-28 Martin Dorey <mdorey@madge.com>
- * bfd-in.h: Don't include obstack.h.
- (struct bfd_hash_table): Change memory field to PTR.
- * bfd.c (struct _bfd): Change memory field to PTR.
- * bfd-in2.h: Rebuild.
- * libbfd-in.h (bfd_release): Declare as function, don't define as
- macro.
- * libbfd.h: Rebuild.
- * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
- objalloc routines rather than obstack routines.
- (obstack_chunk_alloc, obstack_chunk_free): Don't define.
- (getpagesize): Don't define.
- (_bfd_new_bfd): Don't set _bfd_chunksize.
- (bfd_openr): Free new bfd and objalloc on failure.
- (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
- (bfd_alloc_size): Remove.
- (bfd_release): New function.
- * hash.c: Include "objalloc.h" rather than "obstack.h". Use
- objalloc routines rather than obstack routines.
- (obstack_chunk_alloc, obstack_chunk_free): Don't define.
- * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
- objalloc routines rather than obstack routines.
- (obstack_chunk_alloc, obstack_chunk_free): Don't define.
- (struct accumulate): Change memory to struct objalloc *.
- * liboasys.h (oasys_data_type): Remove oasys_obstack field.
- * dep-in.sed: Don't remove obstack.h from dependency list.
- * Makefile.in: Rebuild dependencies.
- (BFD_H_DEPS): Remove obstack.h.
- (install): Don't install obstack.h.
- * Many files: Don't include "obstack.h".
- * VERSION: Bump.
-
- * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
- * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
- * libbfd.h: Rebuild.
- * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
- * sunos.c (sunos_add_dynamic_symbols): Likewise.
- * srec.c (srec_scan): Rewrite to not use obstack_1grow.
+ * 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.
- * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
- old version of bfd_alloc.
- * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
- * libbfd.h: Rebuild.
- * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
-
-Sat Mar 15 15:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
- ELF local label syntax as well.
-
-Sat Mar 15 10:16:42 1997 Fred Fish <fnf@cygnus.com>
-
- * config.bfd (powerpc-*-beos*): New target.
- * configure.in (powerpc-*-beos*): Add case that explicitly
- does not set COREFILE for now. A future BeOS version is
- expected to support core files.
- * configure: Regenerate with autoconf.
-
-Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
- seen with a local symbol, rather than crashing.
-
- * elfcode.h (elf_slurp_symbol_table): Don't try to read the
- version symbols if there aren't any.
-
-Thu Mar 13 14:08:53 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_link_add_object_symbols): Don't warn about type
- or size changes because of a weak symbol.
-
- * cisco-core.c (SIGEMT): Define if not defined.
-
-Wed Mar 12 21:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_link_add_object_symbols): Use extsymoff when
- setting ever. Sanity check the version number. Sort out copying
- flags and other information when adding an indirect symbol.
- (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
- symbols added by the backend. Clear the entire contents of the
- versym section.
- (elf_export_symbol): Ignore indirect symbols.
- (elf_link_output_extsym): Accept a section without an owner in an
- assert.
- * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
- version count. Correct the allocation of x_versymp.
-
- * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
- the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
- Don't return bfd_und_section_ptr when info->shared.
- (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
- (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
- (mips_elf_check_relocs): Resolve an indirect symbol in
- sym_hashes.
- (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
- SHN_MIPS_TEXT or SHN_MIPS_DATA.
-
- * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
-
-Tue Mar 11 01:38:36 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
- * elf.c (bfd_elf_print_symbol): Correct errors in last change.
- * elflink.h (elf_link_add_object_symbols): Handle cases in which a
- versioned symbol appears in both a regular and a shared object.
- (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
- appropriate. Improve error message.
- (struct elf_outext_info): Rename from elf_finfo_failed. Change
- all uses. Add localsyms field.
- (elf_bfd_final_link): When generating a shared library, call
- elf_link_output_extsym to output all local symbols.
- (elf_link_output_extsym): Handle symbols which were forced to
- become local.
-
-Sun Mar 9 23:08:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * elf-bfd.h (elf_symbol_type): Add version field.
- * elfcode.h (elf_slurp_symbol_table): Set version field.
- * elflink.h (elf_link_add_object_symbols): When creating an
- indirect symbol for a default version symbol, set DEF_DYNAMIC if
- appropriate. Set up an indirection from the nondefault version of
- the symbol as well.
- (NAME(bfd_elf,size_dynamic_sections)): Call
- elf_link_assign_sym_version before checking whether there are any
- versions. Always record the version name as a dynamic symbol.
- Initialize counters.
- (elf_link_assign_sym_version): After finding a version, see if a
- symbol should be forced to local scope. Create a new version
- definition if appropriate.
- (elf_link_output_extsym): Correct indirect symbol handling.
- * elf.c (bfd_elf_print_symbol): Print version information.
- (bfd_section_from_shdr): Turn version sections into BFD sections.
- (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
- if sh_info is not already set.
- (_bfd_elf_copy_private_section_data): Copy sh_info for version
- sections.
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
- _bfd_stringtab_add to copy the name into permanent memory if
- appropriate.
+1999-05-27 Nick Clifton <nickc@cygnus.com>
-Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+ * 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.
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
+1999-05-25 Philip Blundell <pb@nexus.co.uk>
-Fri Mar 7 10:37:30 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coffcode.h (bfd_coff_backend_data): Change
- _bfd_coff_compute_section_file_positions to return a boolean
- value. Change all callers.
- (coff_compute_section_file_positions): Change return type to
- boolean. If the size of the last section changed, then output a
- zero byte at the end of the file.
- * libcoff.h: Rebuild.
+1999-05-25 Catherine Moore <clm@cygnus.com>
- * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
- for at least 6 output symbols.
- (xcoff_write_global_symbol): When emitting TOC entry relocs, also
- emit a TC csect to represent the space they take up. For an XO
- symbol, just emit a reference, not a csect.
+ * coff-arm.c (coff_arm_relocate_section): Don't emit
+ base file entries for pc-relative values.
- * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
- Solaris doesn't like the combined options, and the -f is
- unnecessary.
- (stamp-tshlink, install): Likewise.
+1999-05-25 DJ Delorie <dj@cygnus.com>
- * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
- handling when little endian.
+ * 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.
-Thu Mar 6 13:51:51 1997 Jeffrey A Law (law@cygnus.com)
+1999-05-24 Philip Blundell <pb@nexus.co.uk>
- * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
- (mn10300_elf_relocate_section): Likewise.
- (elf_backend_relocate_section): Define.
+ * elf32-arm.h (elf32_arm_relocate_section): Undo change of
+ 1999-03-25.
- * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
- relocs. Replace them with generic PCREL_{8,16,32} relocs.
- (elf32_mn10300_howto_table): Likewise.
- (elf32_mn10300_reloc_map): Likewise.
- (bfd_elf32_mn10300_reloc): Delete unused function.
-
-Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
-
- * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
- code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
- block. Use NULL for initializations of "ptr" rather than bare 0.
- * coff-h8300.c: Fix typo in comment.
- * coff-h8500.c: Ditto.
- * coff-w65.c: Ditto
- * coff-z8k.c: Ditto.
-
-Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
-
- * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
- (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
- m32r_elf_get_relocated_section_contents): First pass at relax support.
-
-Mon Mar 3 13:27:09 1997 Ulrich Drepper <drepper@rtl.cygnus.com>
-
- * elflink.h (elf_link_add_object_symbols): Use correct sh_size
- entry for reading verdef records.
- Use correct braces for computing increments of extverdaux and
- exteverdef record pointers.
-
-Sun Mar 2 16:25:35 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_link_find_version_dependencies): Check that
- DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
- set.
-
-Fri Feb 28 15:06:45 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * targets.c (bfd_default_vector): Make non-const.
- (find_target): New static function, broken out of
- bfd_find_target.
- (bfd_set_default_target): New function.
- (bfd_find_target): Call find_target. When defaulting, use
- bfd_default_vector[0] if it is not NULL.
- * libbfd-in.h (bfd_default_vector): Adjust declaration.
- * bfd-in2.h, libbfd.h: Rebuild.
-
- * syms.c (bfd_is_local_label): Return false if the symbol has no
- name.
- * coff-i960.c (coff_i960_is_local_label_name): New function.
- (coff_bfd_is_local_label_name): Define.
- * coff-m68k.c (m68k_coff_is_local_label_name): New function.
- (coff_bfd_is_local_label_name): Define.
- * coff-rs6000.c (xcoff_is_local_label_name): New function.
- (coff_bfd_is_local_label_name): Define.
- * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
- with .. or _.L_ as local.
- * elf32-i386.c (elf_i386_is_local_label_name): New function.
- (bfd_elf32_bfd_is_local_label_name): Define.
- * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
- beginning with $ as local.
-
-Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
- rather than comparing against info->lprefix.
- * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
- * elflink.h (elf_link_input_bfd): Likewise.
- * linker.c (_bfd_generic_link_output_symbols): Likewise.
- * xcofflink.c (xcoff_link_input_bfd): Likewise.
-
- * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
- _bfd_elf_is_local_label_name if not already defined.
- * elf.c (_bfd_elf_is_local_label_name): New function.
- * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
-
- * coff-m88k.c (coff_bfd_is_local_label_name): Define.
- (m88k_is_local_label_name): New static function.
-
- * coffcode.h (coff_bfd_is_local_label_name): Define as
- _bfd_coff_is_local_label_name if not already defined.
- * coffgen.c (_bfd_coff_is_local_label_name): New function.
- * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
- * libcoff.h: Rebuild.
+Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
- * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
- to _bfd_is_local_label_name.
- (bfd_target): Likewise.
- * syms.c (bfd_is_local_label): Define as function, not macro.
- (bfd_is_local_name): Define.
- * libbfd.c (bfd_generic_is_local_label_name): Rename from
- bfd_generic_is_local_label, and take a string rather than a
- symbol.
- * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
- (_bfd_nosymbols_bfd_is_local_label_name): Define.
- (bfd_generic_is_local_label): Don't declare.
- (bfd_generic_is_local_label_name): Declare.
- * bfd-in2.h, libbfd.h: Rebuild.
- * All backends: Change local_label to local_label_name.
-
- * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
- (mips_elf_relocate_got_local): Change return type to boolean.
- Don't assume that the first zero entry is unassigned; instead, use
- assigned_gotno.
- (mips_elf_relocate_section): Check return value of
- mips_elf_relocate_got_local.
- (mips_elf_create_got_section): Initialize assigned_gotno field.
-
-Wed Feb 26 13:33:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
- that have no contents merely because linker_mark is not set.
-
-Tue Feb 25 18:51:35 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * config.bfd (mips*-*-lnews*): New target.
- * coff-mips.c (mips_relocate_section): Make assert compare
- content byteorder instead of header byteorder.
- (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
- data.
- * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
- * configure.in (ecoff_biglittle_vec): Add case.
- * configure: Update.
-
-Tue Feb 25 00:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
- name begins with ".note".
- (map_sections_to_segments): Add a PT_NOTE segment for any loadable
- section whose name begins with ".note".
- (get_program_header_size): Corresponding change.
-
- * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
- jal and for jal overflow.
-
-Mon Feb 24 17:53:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * elflink.h (elf_link_add_archive_symbols): If a default symbol is
- not found, try looking it up again without the version name.
- (elf_link_add_object_symbols): Always link against the dynamic
- symbol table of a dynamic object. When linking against a dynamic
- object, include version strings in symbol names, and set up
- version information. Add indirect symbols for default versions.
- (elf_link_create_dynamic_sections): Add special version sections.
- (struct elf_assign_sym_version_info): Define.
- (struct elf_find_verdep_info): Define.
- (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
- up version sections.
- (elf_adjust_dynamic_symbol): Ignore indirect symbols.
- (elf_link_find_version_dependencies): New static function.
- (elf_link_assign_sym_version): New static function.
- (elf_link_renumber_dynsyms): New static function.
- (struct elf_final_link_info): Add symver_sec field.
- (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
- local symbols of a dynamic object. Handle DT_VER* constants.
- (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
- dynamic object. Skip indirect symbols from ELF objects. Remove
- the version name before choosing a hash bucket. Write out the
- version information if appropriate.
- (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
- * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
- (bfd_elf64_size_dynamic_sections): Likewise.
- * bfd-in2.h: Rebuild.
- * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
- Change elf_link_hash_flags to unsigned short.
- (ELF_LINK_HIDDEN): Define.
- (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
- dynverdef_hdr, dynversym_section, dynverdef_section,
- dynverref_section, cverdefs, cverrefs, verdef, verref.
- (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
- (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
- (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
- (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
- (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
- (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
- (_bfd_elf_slurp_version_tables): Declare.
- * elf.c (_bfd_elf_swap_verdef_in): New function.
- (_bfd_elf_swap_verdef_out): Likewise.
- (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
- (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
- (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
- (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
- (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
- version information if there is any.
- (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
- (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
- (elf_fake_sections): Handle .gnu.version* section names.
- (assign_section_numbers): Handle SHT_GNU_ver* section types.
- (_bfd_elf_slurp_version_tables): New function.
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
- version name in string entered in dynamic hash table.
- * elfcode.h: Include fnmatch.h.
- * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
- symbol which was forced to become local.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
+ * 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.
-Fri Feb 21 16:15:18 1997 Jeffrey A Law (law@cygnus.com)
+1999-05-16 Nick Clifton <nickc@cygnus.com>
- * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
- somewhat.
- (mn10200_elf_relax_section): Correctly compute a symbol's value
- when the symbol is local, but not in the same section as we are
- relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
- relaxing.
+ * coff-mcore.c (in_reloc_p): Reinstate.
-Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
+1999-05-15 Nick Clifton <nickc@cygnus.com>
- * elf32-m32r.c: Rewrite to use ELF backend linker.
- Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
- Add small data area support (R_M32R_SDA16).
- * reloc.c: Document BFD_RELOC_M32R_SDA16.
- * bfd-in2.h,libbfd.h: Regenerated.
+ * 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 <schwab@issan.cs.uni-dortmund.de>
+
+ * 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 <dj@cygnus.com>
+
+ * 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 <clm@cygnus.com>
+
+ * 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.
-Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
+1999-05-10 Nick Clifton <nickc@cygnus.com>
- * elf32-mn10200.c (mn10200_elf_relax_section): New function.
- (mn10200_elf_relax_delete_bytes): Likewise.
- (mn10200_elf_symbol_address_p): Likewise.
- (mn10200_elf_get_relocated_section_contents): Likewise.
- (bfd_elf32_bfd_relax_section): Define.
- (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
+ * elf.c (elf_fake_sections): Check for .rel. as start of rel
+ section, not just .rel. Same for .rela.
- * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
- (mn10200_elf_relocate_section): Likewise.
- (elf_backend_relocate_section): Define.
+1999-05-07 Nick Clifton <nickc@cygnus.com>
-Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
+ * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
+ endianism with an error message.
- * reloc.c (struct reloc_howto_struct): Fix typo in comment.
- * bfd-in2.h: Regenerated.
+Thu May 6 17:09:09 1999 Fred Fish <fnf@be.com>
-Tue Feb 18 11:41:00 1996 Dawn Perchik <dawn@cygnus.com>
+ * 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.
- * sysdep.h: Don't define errno in MSVC if error.h is included.
+1999-05-05 Catherine Moore <clm@cygnus.com>
-Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
+ * coff-arm.c (coff_arm_relocate_section): Add one to
+ address of ARM_RVA32 thumb functions.
- * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
- is initialized before it is used.
+1999-05-05 Catherine Moore <clm@cygnus.com>
-Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * hp300hpux.c (convert_sym_type): Don't convert a secondary common
- symbol into a weak undefined symbol; leave it as a common symbol.
+Mon May 3 09:24:49 1999 Jeffrey A Law (law@cygnus.com)
-Fri Feb 14 19:08:03 1997 Ian Lance Taylor <ian@cygnus.com>
+ * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
+ and R_LONG_PCREL_MODE.
- * elflink.h (elf_link_add_object_symbols): Don't issue a warning
- about a symbol defined in a dynamic object if it has already been
- defined in a regular object.
+1999-04-29 Nick Clifton <nickc@cygnus.com>
-Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
+ * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
- * makefile.vms: Add gcc flags to allow compiling with current gcc
- snapshot
- (targmatch.h): New dependency.
+Fri Apr 28 16:36:19 1999 Stan Cox <scox@cygnus.com>
- * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
- openVMS/Alpha.
- * evax.h (ALPHA_R_CODEADDR): New relocation.
- * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
- openVMS/Alpha.
- * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
- relocation.
- * bfd-in2.h, libbfd.h: Rebuild.
+ * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
+ in relocation calculation.
- Restrict symbol length to 64 bytes, case preserving:
- * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
- * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
- (_bfd_evax_length_hash_symbol): Added.
- * evax-etir.c (_bfd_evax_write_etir): Call
- _bfd_evax_length_hash_symbol before output of symbol.
- * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
- * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
+1999-04-26 Tom Tromey <tromey@cygnus.com>
- * evax-emh.c: Output filename to object file without path.
+ * aclocal.m4, configure: Updated for new version of libtool.
- * evax-egsd.c: New sections for local and global commons.
+1999-04-21 Nick Clifton <nickc@cygnus.com>
- * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
- evax-misc.c, evax.h: Remove 8 bit characters from copyright
- notices. Replace AXP with Alpha.
+ * coff-mcore.c: Add support for mcore relocs.
-Wed Feb 12 18:10:30 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-04-20 Gavin Romig-Koch <gavin@cygnus.com>
- * sunos.c (sunos_create_dynamic_sections): We need the dynamic
- sections if we are creating a shared library.
+ * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
+ incorrect use EF_MIPS_xxBITPTRS.
-Tue Feb 11 15:45:43 1997 Doug Evans <dje@canuck.cygnus.com>
+1999-04-18 Ian Lance Taylor <ian@zembu.com>
- * configure.host (i386-windows): Don't set host64=true.
+ * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
+ variable insn.
-Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
+ * bfd-in2.h: Rebuild.
+ * libbfd.h: Rebuild.
- * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
- (elf_mips16_gprel_howto): New static variable.
- (mips16_gprel_reloc): New static function.
- (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
- (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
- (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
- * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
- * bfd-in2.h, libbfd.h: Rebuild.
+Sat Apr 17 20:55:15 1999 Catherine Moore <clm@cygnus.com>
-Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.cygnus.com>
+ * 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.
- * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
- for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
+1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
-Fri Feb 7 12:39:11 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
+ (bfd_elf32_bfd_print_private_bfd_data): New.
- * elflink.h (elf_link_input_bfd): If we've discarded a section,
- the output section will be the absolute section; don't print an
- assertion message for that case when doing a relocateable link.
+1999-04-15 Doug Evans <devans@casey.cygnus.com>
-Thu Feb 6 16:55:43 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
- (struct mips_elf_link_hash_entry): Add new fields fn_stub,
- need_fn_sub, call_stub, and call_fp_stub.
- (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
- (mips_elf_link_hash_newfunc): Initialize new fields.
- (mips_elf_link_hash_table_create): Likewise.
- (mips_elf_relocate_section): Redirect relocations to use mips16
- stubs when appropriate.
- (mips_elf_check_relocs): Attach stub sections to the appropriate
- symbol. Set need_fn_stub when appropriate.
- (mips_elf_always_size_sections): New static function.
- (mips_elf_check_mips16_stubs): New static function.
- (elf_backend_always_size_sections): Define.
- * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
+Wed Apr 14 14:33:08 1999 Richard Henderson <rth@cygnus.com>
- * elflink.h (elf_link_input_bfd): Discard local symbols that are
- attached to sections which are not being included in the link.
+ * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
+ * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
-Wed Feb 5 13:20:17 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-04-13 David Mosberger <davidm@hpl.hp.com>
- * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
- symbol value when computing the addend for a pc_relative
- pcrel_offset reloc.
+ * 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.
-Mon Feb 3 11:54:06 1997 Ian Lance Taylor <ian@cygnus.com>
+Tue Apr 13 21:27:19 1999 Catherine Moore <clm@cygnus.com>
- * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
- relocateable link, just skip pc_relative pcrel_offset relocs.
- * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
- structure for an ARM26 reloc which can be resolved.
- (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
- reloc can be resolved.
+ * 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.
- * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
- error in overflow check for R_RELBYTE.
+1999-04-13 Philip Blundell <philb@gnu.org>
-Fri Jan 31 14:07:27 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
+ relocs 17 through 19.
- * ieee.c (ieee_slurp_section_data): Pick up the start address.
- From Mark Rasin <mark.rasin@telrad.co.il>.
+Sun Apr 11 01:25:17 1999 Richard Henderson <rth@cygnus.com>
- * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
- debugging symbols.
+ * elfcode.h: Remove fnmatch.h.
+ * elflink.h (elf_link_assign_sym_version): Call back to ld
+ instead of calling fnmatch.
-Wed Jan 29 00:00:49 1997 Jeffrey A Law (law@cygnus.com)
+ * config.bfd (i?86-*-beoself): Include pe vecs.
- * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
- (elf_mn10200_howto_table): Likewise.
- (mn10200_reloc_map): Likewise.
+Sun Apr 11 01:14:06 1999 Richard Henderson <rth@cygnus.com>
-Mon Jan 27 12:07:35 1997 Doug Evans <dje@seba.cygnus.com>
+ * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
+ to go missing.
- * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
- * bfd-in2.h, libbfd.h: Regenerated.
- * elf32-m32r.c: Add support for them.
+1999-04-10 Richard Henderson <rth@cygnus.com>
-Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
- * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
- * elf32-v850.c (v850_elf_final_link_relocate): Remove used
- r_format and r_pcrel. Always return a value.
- * riscix.c (MY_final_link_callback): Define to dummy value.
+Sat Apr 10 15:12:09 1999 Richard Henderson <rth@cygnus.com>
- * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
- relocations against the text segment, look up the output name of
- the reloc section.
+ * 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-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
-
-Thu Jan 16 17:45:57 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
- auxiliary_filters parameter to be const char * const *. Accept a
- NULL terminated array.
- * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
- (bfd_elf32_size_dynamic_sections): Update declaration.
- * bfd-in2.h: Rebuild.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
+ * bfd-in2.h: Update.
-Wed Jan 15 11:21:32 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-04-09 Ian Lance Taylor <ian@zembu.com>
- * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
- NOTYPE symbol in a text section as a FUNC symbol.
+ * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
- * coffcode.h (coff_compute_section_file_positions): Force
- relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
+1999-04-08 Nick Clifton <nickc@cygnus.com>
-Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libaout.h (machine_type): Reserve several values for sparclet.
-
-Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-v850.c (v850_elf_howto_table): Set the special_function
- table to v850_elf_reloc for all non-standard relocations.
- (v850_elf_check_relocs): Add check for h being non-null.
- (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
- statement instead of multiple ifs.
- (v850_elf_relocate_section): Fix up error message, don't just call
- abort.
-
-Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
-
- * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
- Use bfd_elf_generic_reloc as special function for all relocs.
- (bfd_elf32_mn10200_reloc): Remove unnecessary function.
-
- * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
- 24bit pc-relative reloc.
+ * 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.
-Fri Jan 3 16:54:08 1997 Jeffrey A Law (law@cygnus.com)
+1999-04-07 Nick Clifton <nickc@cygnus.com>
- * reloc.c: Add BFD_RELOC_24.
- * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
- (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
- * bfd-in2.h, libbfd.h: Rebuilt.
+ * 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.
-Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
+1999-04-06 Ian Lance Taylor <ian@zembu.com>
- elf64-alpha multiple .got rewrite:
+ * sysdep.h (LC_MESSAGES): Never define.
- * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
- (bfd_elf*_mkobject): Don't define here ...
- * elfxx-target.h: ... but rather here. Default always_size_sections
- hook to NULL.
- * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
- what the #defines in elf-bfd.h transmuted it to anyway.
+1999-04-06 Chris Torek <torek@bsdi.com>
- * section.c: Add SEC_LINKER_CREATED flag.
+ * reloc.c (bfd_check_overflow): Add addrsize parameter. Change
+ all callers. Rewrite completely.
+ (_bfd_relocate_contents): Rewrite overflow checking.
* bfd-in2.h: Rebuild.
- * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
- relocation section flags.
- (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
- SEC_IN_MEMORY to recognize generated bits.
- * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
- Likewise.
- * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
- mips_elf_create_compact_rel_section, mips_elf_create_got_section,
- mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
- * elf32-ppc.c (ppc_elf_create_linker_section,
- ppc_elf_size_dynamic_sections): Likewise.
- * elf32-sparc.c (elf32_sparc_check_relocs,
- elf32_sparc_size_dynamic_sections): Likewise.
- * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
- section flags.
- (_bfd_elf_create_dynamic_sections): Likewise.
- (_bfd_elf_make_linker_section_rela): Likewise.
- * elflink.h (elf_link_create_dynamic_sections): Likewise.
- (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
- (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
- to identify generated bits.
- (elf_link_input_bfd): Likewise.
- * elf64-alpha.c: Rewrite everything touching relocations.
+1999-04-05 Ian Lance Taylor <ian@zembu.com>
-Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+ From Gabriel Paubert <paubert@iram.es>:
+ * 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.
- * elf32-v850.c (all functions and static variables): Go through
- and regularize names to be of the form v850_elf_<xxx>.
- (toplevel): Include <elf/v850.h>.
- (enum reloc_type): Move to include/elf/v850.h.
- (v850_elf_check_relocs): For common variables, if the variable is
- referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
- into the appropriate section.
- (elf_backend_check_relocs): Define.
+ * 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.
-Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
+ * srec.c (srec_scan): Accept \r in symbol definitions.
+ (srec_object_p): Set HAS_SYMS if we saw any symbols.
+ (symbolsrec_object_p): Likewise.
- * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
+1999-04-04 Don Bowman <don@pixsci.com>
-Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
- * config.bfd (mips*el-*-linux*): New target.
- (mips*-*-linux*): New target.
+1999-04-04 Ian Lance Taylor <ian@zembu.com>
- * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
- Return a useful value.
-
- * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
-
- * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
- ac_cv_func_mmap.
- * configure: Rebuild.
- * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
- ac_cv_func_mmap in bfd/configure.host.
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
- filter_shlib and auxiliary_filter_shlib parameters.
- * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
- DT_FILTER.
- * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
- (bfd_elf64_size_dynamic_sections): Likewise.
- * bfd-in2.h: Rebuild.
+ * 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.
-Mon Dec 30 18:48:52 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-03-31 Nick Clifton <nickc@cygnus.com>
- * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
- symbols, don't export a symbol which is defined by an object in an
- archive which contains shared objects.
+ * 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.
-Mon Dec 30 11:54:56 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-03-30 Nick Clifton <nickc@cygnus.com>
- * libbfd.c: Patch up the mmap code so that it is only built if BFD
- is configured with --with-mmap.
+ * 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.
-Fri Dec 27 20:56:41 1996 Fred Fish <fnf@cygnus.com>
+ * linker.c: Replace direct references to fields in BFD structure
+ with accessor macros.
- * TODO: Correct a misspelling.
+ * elflink.h: Replace direct references to fields in BFD structure
+ with accessor macros.
-Fri Dec 27 11:48:12 1996 H.J. Lu <hjl@lucon.org>
+1999-03-25 Philip Blundell <pb@nexus.co.uk>
- * elflink.h (elf_buckets): Add some more values for larger
- binaries.
+ * config.bfd: Eliminate redundancy in checks for Linux/ARM.
-Thu Dec 26 18:36:54 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
+ account when adjusting section symbols during a partial link.
- * Makefile.in (install): Move subdir_do out of conditional. From
- Fred Fish <fnf@cygnus.com>.
+1999-03-24 Nick Clifton <nickc@cygnus.com>
-Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com)
+ * 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-mn10200.c (enum reloc_type): Enable basic 8, 16, and
- 32 bit relocs.
- (elf_mn10200_howto_table): Likewise.
- (mn10200_reloc_map): Likewise.
+1999-03-17 Martin Hunt <hunt@cygnus.com>
-Tue Dec 17 11:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
- mips16 symbol during the link.
- (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
- mips16 symbol.
- (mips_elf_link_output_symbol_hook): New static function.
- (elf_backend_link_output_symbol_hook): Define.
+1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
- * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
- not zero.
+ * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
+ of certian similar cpus.
-Mon Dec 16 14:38:39 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
- * elf.c (bfd_section_from_shdr): Don't check for reloc sections
- against SEC_DEBUGGING sections here (revert patch of December 5).
- * elfcode.h (elf_object_p): Check for them here, instead.
+ * 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.
-Sun Dec 15 14:46:06 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-03-11 Doug Evans <devans@casey.cygnus.com>
- * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
- * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
- slurp_reloc_table.
- (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
- (_bfd_elf_canonicalize_dynamic_reloc): New function.
- * elf-bfd.h (struct elf_size_info): Update declaration of
- slurp_reloc_table.
- (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
- (_bfd_elf_canonicalize_dynamic_reloc): Declare.
- * elfxx-target.h: Use new dynamic reloc routines by default.
- * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
- parameter.
+ * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
-Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
+1999-03-11 Nick Clifton <nickc@cygnus.com>
- * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
- if NAMES_HAVE_UNDERSCORE is defined.
+ * 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.
-Fri Dec 13 11:13:23 1996 Doug Evans <dje@canuck.cygnus.com>
+1999-02-24 Jim Blandy <jimb@zwingli.cygnus.com>
- * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
+ * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
-Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+1999-02-22 Jim Lemke <jlemke@cygnus.com>
- * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
- supported relocs.
+ * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
-Thu Dec 12 14:55:41 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Feb 22 18:26:51 1999 Ian Lance Taylor <ian@cygnus.com>
- * elflink.h (elf_link_add_object_symbols): Only add a weak
- symbol if the real definition is in the dynamic symbol table.
- After finding the real definition, then, if it is dynamic, add the
- weak symbol to the dynamic symbol table.
+ * 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.
- * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
+Fri Feb 19 16:01:12 1999 Ian Lance Taylor <ian@cygnus.com>
- * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
+ * elflink.h (elf_merge_symbol): When overriding a dynamic
+ definition with a weak undefined symbol, set NEEDS_PLT if it is a
function.
- (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
- array.
-
-Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
- variants.
- (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
- (bfd_elf32_mn10300_reloc): Write data in little endian format.
- * reloc.c: Remove mn10300 big endian relocs.
- * bfd-in2.h, libbfd.h: Rebuilt.
-
- * elf32-mn10200.c: Update from elf32-mn10300.c.
-
-Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-mn10300.c (elf_symbol_leading_char): Define.
-
- * elf32-mn10300.c: Add some comments.
-
-Fri Dec 6 17:16:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ihex.c (ihex_scan): Always initialize buf before jumping to
- error_return.
- (ihex_read_section): Likewise.
-
-Thu Dec 5 22:29:18 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
- inplace for most relocs.
+ (elf_link_add_object_symbols): Don't copy the other field if we
+ are overridding.
-Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Feb 18 18:07:43 1999 Ian Lance Taylor <ian@cygnus.com>
- * elflink.h (elf_link_add_object_symbols): Calling check_relocs
- even if SEC_ALLOC is not set.
- * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
- when deciding whether to copy a reloc into a shared object.
- (elf_i386_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
- (elf32_sparc_relocate_section): Likewise.
- * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
- reloc section if it is not set in the source section.
- * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
- * elf.c (bfd_section_from_shdr): Mark a reloc section associated
- with a SEC_DEBUGGING section as SEC_DEBUGGING.
-
-Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
- expects a .got.plt until we actually create it.
-
-Mon Dec 2 12:13:51 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
- message for bfd_reloc_outofrange, rather than aborting. From
- Philippe De Muyter <phdm@info.ucl.ac.be>.
-
- * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
- a relocateable link, don't try to process them. From Heinz Wrobel
- <wrobel@lpr.e-technik.tu-muenchen.de>.
-
-Mon Dec 2 00:39:24 1996 Jeffrey A Law (law@cygnus.com)
+ * elflink.h (elf_merge_symbol): Do not merge any symbol from a
+ shared object with a weak undefined symbol.
- * elf32-mn10300.c (mn10300_info_howto): Renamed from
- mn10300_info_howto_rel. Tweak reloc argument to be an
- Elf32_Internal_Rela.
- (USE_RELA): Define instead of USE_REL.
- (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
+1999-02-18 Nick Clifton <nickc@cygnus.com>
-Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+ * elfarm-nabi.c: Set partial_inplace back to false.
- * configure.in, configure: Handle mips*-sgi-irix6*.
- * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
- core files.
+1999-02-17 Nick Clifton <nickc@cygnus.com>
-Wed Nov 27 12:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
+ * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
+ (USER_LABEL_PREFIX): Set to "_".
- * elf32-i386.c (elf_i386_relocate_section): Warn about a
- relocation against a symbol defined in a section with no output
- section.
-
-Tue Nov 26 11:07:31 1996 Ian Lance Taylor <ian@cygnus.com>
+ The following patches are from: Scott Bambrough
+ <scottb@corelcomputer.com>
- * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
- * configure, config.in: Rebuild with autoconf 2.12.
+ * libaout.h (M_ARM6_NETBSD): Set to 143.
- * elf-bfd.h (struct elf_link_hash_entry): Add other field.
- * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
- (swap_out_syms): Set st_other from existing st_other field.
- * elflink.h (elf_link_add_object_symbols): Store st_other in hash
- table other field.
- (elf_link_output_extsym): Set the other field from the global hash
- table entry.
- * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
- (elf_mips16_jump_howto): New static variable.
- (mips16_jump_reloc): New static function.
- (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
- (mips_info_to_howto_rel): Handle R_MIPS16_26.
- (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
- to a mips16 symbol.
- * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
- * bfd-in2.h, libbfd.h: Rebuild.
- * cpu-mips.c (arch_info_struct): Add mips:16 entry.
-
-Mon Nov 25 11:23:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Use long long for mips-sgi-irix6*.
-
- * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
- only a warning. From Philippe De Muyter <phdemuyt@ulb.ac.be>.
-
-Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
- (enum reloc_type): Add more reloc types.
- (elf32_mn10300_howto_table): Update for new reloc types.
- (elf32_mn10300_reloc_map): Update for new reloc types.
- * reloc.c: Add some new relocs for the mn10300 series.
- * bfd-in2.h, libbfd.h: Rebuilt.
-
-Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
-
- * som.c (setup_sections): Don't lose for a space which has
- no data, but some symbols.
-
-Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sunos.c (struct sunos_link_hash_table): Add got_needed field.
- (sunos_link_hash_table_create): Initialize got_needed.
- (sunos_create_dynamic_sections): Only set .got section size if it
- is not already set. Set got_needed.
- (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
- sdynptr, and only handle dynamic sections, if dynamic sections are
- needed.
- (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
- Initialize .got section.
- (sunos_scan_ext_relocs): Likewise.
- (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
- a dynamic symbol.
- (sunos_finish_dynamic_link): Check got_needed. Only set up
- dynamic linking information if needed.
+ * 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.
-Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
+ * 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 <scox@cygnus.com>
+
+ * 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.
- * config.bfd: Added VersaDOS format to the Ericsson configuration.
+Wed Feb 17 12:07:23 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
+ * 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-mn10300.c: Rough cut at relocs for the mn10300.
+ * 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.
-Wed Nov 13 08:12:38 1996 Jeffrey A Law (law@cygnus.com)
+Tue Feb 16 22:44:37 1999 Ian Lance Taylor <ian@cygnus.com>
- * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
- anymore.
+ * 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.
-Tue Nov 12 13:30:00 1996 Dawn Perchik <dawn@cygnus.com>
+1999-02-08 Nick Clifton <nickc@cygnus.com>
- * filemode.c: Include sysdep.h.
- * ihex.c: Add casts to eliminate compiler warnings.
- * sunos.c: Add casts to eliminate compiler warnings.
+ * config.bfd: Add support for strongarm target.
-Mon Nov 11 10:37:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Mon Feb 8 11:18:14 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
- * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
- section.
- (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
- appropriate relocations in the .so file if shared.
- (ppc_elf_relocate_section): Ditto.
+ * elf32-m68k.c (reloc_map): Use the correct types for the struct
+ fields instead of unsigned char.
-Tue Oct 29 15:03:02 1996 Doug Evans <dje@canuck.cygnus.com>
+Fri Feb 5 00:22:36 1999 Ian Lance Taylor <ian@cygnus.com>
- * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
- complain_overflow_unsigned.
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
-Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Thu Feb 4 22:30:13 1999 Ian Lance Taylor <ian@cygnus.com>
- * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
- overflows for R_D10V_16 and R_D10V_18.
+ * 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.
-Tue Oct 29 13:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-02-04 DJ Delorie <dj@cygnus.com>
- * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
- (do_with_relocs): Likewise.
- (do_as_repeat): Likewise.
- (copy_expression): Likewise.
+ * 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.
-Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Feb 4 12:38:10 1999 Stan Cox <scox@cygnus.com>
- * ieee.c (ieee_write_external_part): Correctly record whether
- there is an external part.
+ * elf32-mips.c (mips_elf_relocate_section): Insure that the target
+ of a jump is in the current 256 MB region.
-Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
+Thu Feb 4 12:15:38 1999 Ian Lance Taylor <ian@cygnus.com>
- * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
- handle tda offsets for sld.w and sst.w instructions.
- Fix alignment check in sld.w and sst.w tda reloc handling.
+ * format.c (bfd_check_format_matches): Change last patch to only
+ take effect for the binary target.
-Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
+Wed Feb 3 19:40:12 1999 Ian Lance Taylor <ian@cygnus.com>
- * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
+ * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
-Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
+Wed Feb 3 15:02:44 1999 Catherine Moore <clm@cygnus.com>
- * elf32-v850.c: Add comments about assumptions about
- char, short & long sizes.
- (elf32_v850_bfd_final_link_relocate): Fix sign extension
- problems for several relocs.
+ * elf32-fr30.c (fr30_elf_check_relocs): New routine.
- * elf32-v850.c (elf32_v850_howto_table): Fix typo in
- R_V850_SDA_OFFSET entry.
+Tue Feb 2 21:38:28 1999 Ian Lance Taylor <ian@cygnus.com>
-Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
+ * format.c (bfd_check_format_matches): If the target was
+ previously specified, don't check other targets when checking for
+ an archive file.
- * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
- Store import file index in ldindx.
- (xcoff_build_ldsyms): Assume that ldsym was not previously
- allocated. For an imported symbol, copy ldindx into l_ifile.
+Tue Feb 2 18:16:43 1999 Catherine Moore <clm@cygnus.com>
-Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * elf32-v850.c (elf_v850_howto_table): Fix ordering of
- R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
- fields in R_V850_TDA_OFFSET.
- (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
- relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
- relocations.
+Mon Feb 1 19:49:21 1999 Catherine Moore <clm@cygnus.com>
- * elf32-v850.c: Include bfdlink.h.
- (bfd_elf32_v850_reloc): Return an error if we get a reloc
- we can't handle.
- (elf32_v850_bfd_final_link_relocate): New function.
- (v850_elf_relocation_section): Likewise.
- (elf_backend_relocate_section): Define.
+ * 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.
-Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-02-01 Nick Clifton <nickc@cygnus.com>
- * binary.c (binary_set_section_contents): Ignore sections which
- don't have SEC_LOAD and SEC_ALLOC set.
+ * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
+ (fr30_elf_gc_sweep_hook): New function.
+ (elf_backend_can_gc_sections): Define.
-Mon Oct 21 12:13:05 1996 Jeffrey A Law (law@cygnus.com)
+Mon Feb 1 12:21:47 1999 Catherine Moore <clm@cygnus.com>
- * linker.c (_bfd_generic_final_link): Avoid losing static
- symbols in the .bss section.
+ * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec
+ and bfd_elf32_bigarm_oabi_vec.
-Mon Oct 21 10:54:58 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Feb 1 11:46:31 1999 Catherine Moore <clm@cygnus.com>
- * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
- (mips32_64bit_reloc): New static function.
- (mips_reloc_map): Add entry for BFD_RELOC_64.
- (mips_elf_relocate_section): Handle R_MIPS_64.
+ * 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.
- * linker.c (default_indirect_link_order): Print an error message
- when attempting to do a relocateable link with different object
- file formats, rather than calling abort.
+Mon Feb 1 11:52:12 1999 Frank Ch. Eigler <fche@cygnus.com>
-Thu Oct 17 10:43:29 1996 Doug Evans <dje@canuck.cygnus.com>
+ * binary.c (binary_set_section_contents): Omit warnings for
+ unloadable sections.
- * reloc.c (m32r relocs): Rename them.
- * bfd-in2.h, libbfd.h: Regenerated.
- * elf32-m32r.c: Update.
- (m32r_elf_10_pcrel_reloc): New function.
- (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
- (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
+1999-01-31 Michael Meissner <meissner@cygnus.com>
-Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
+ * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
+ powerpc{,le}-*-eabi.
- * linker.c (_bfd_generic_final_link): Set "linker_mark" for
- all sections that will be included in the output file.
- (_bfd_generic_link_output_symbols): Discard symbols in sections
- which are being discarded.
- * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
- R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
- (elf_v850_howto_table): Corresponding changes.
- (elf_v850_reloc_map): Corresponding changes.
- * reloc.c: Add additional V850 relocations.
- * bfd-in2.h, libbfd.h: Rebuilt.
+1999-01-29 Nick Clifton <nickc@cygnus.com>
- * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
- no longer want in pc-relative relocs.
+ * dwarf2.c (read_unsigned_leb128): Remove unused variables.
+ * dwarf2.c (read_signed_leb128): Remove unused variables.
-Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
+Fri Jan 29 00:47:21 1999 H.J. Lu <hjl@gnu.org>
- * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
- accept a reloc against an undefined sybmol!
+ * elf.c (assign_file_positions_for_segments): Only adjust
+ p_align when needed.
-Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
+Thu Jan 28 20:05:22 1999 Ian Lance Taylor <ian@cygnus.com>
- * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
+ * 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 <macro@ds2.pg.gda.pl>.
-Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-01-28 Nick Clifton <nickc@cygnus.com>
- * VERSION: Bump for new relocation.
+ * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
+ R_FR30_GNU_VTENTRY relocs.
- * hosts/i386bsd.h: If NBPG is not defined, define it as
- PAGE_SIZE, for recent versions of FreeBSD.
+Thu Jan 28 11:08:16 1999 Catherine Moore <clm@cygnus.com>
-Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_link_output_sym): Zero syms which are
+ part of sections which have been excluded.
- * configure.host: Use `long long' as the 64 bit type on a Solaris
- host, since both gcc and the SunPRO compilers support it.
+Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
-Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
+ * 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.
- * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
- mistake to have reused the ECOFF LITERAL for ELF since they have
- different semantics.
- * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
- * bfd-in2.h, libbfd.h: Rebuild.
+1999-01-27 Nick Clifton <nickc@cygnus.com>
- * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
- section overflow.
+ * 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.
- * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
- dynamic relocation for an undefweak symbol when we are building
- a static executable.
+1999-01-26 Frank Ch. Eigler <fche@cygnus.com>
-Thu Oct 10 11:15:06 1996 Stan Shebs <shebs@andros.cygnus.com>
+ * binary.c (binary_set_section_contents): Emit warning for
+ huge file offsets due to widely-dispersed section LMAs.
- * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
- point explicitly to srcdir.
- (targmatch.h): Edit references to point explicitly to objdir.
+Mon Jan 18 03:35:35 1999 Ian Lance Taylor <ian@cygnus.com>
-Thu Oct 10 14:14:23 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf.c (assign_file_positions_for_segments): If not D_PAGED,
+ align first section to largest section alignment, not first
+ section alignment.
- * config.bfd: When setting targ_cpu, don't get confused by
- linux-gnu.
+1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
-Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
+ * configure.in: Require autoconf 2.12.1 or higher.
- * configure.host: Add support for windows host (a build done
- under the Microsoft build environment).
+Tue Dec 22 15:21:41 1998 Catherine Moore <clm@cygnus.com>
-Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
+ * archures.c (bfd_mach_i386_i386_intel_syntax): Define.
+ * bfd-in2.h: Likewise.
+ * cpu-i386.c (bfd_i386_arch_intel_syntax): New.
- * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
- definition in a dynamic object, add it to the dynamic symbol table
- if any dynamic object mentions it. Reverts part of last patch.
+1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
- * sunos.c (struct sunos_link_hash_table): Add got_base field.
- (sunos_link_hash_table_create): Initialize got_base.
- (bfd_sunos_size_dynamic_sections): If the .got section is more
- than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
- 0x1000.
- (sunos_check_dynamic_reloc): Subtract got_base from a base
- relative relocation.
+ * 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.
- * elf32-mips.c (elf_mips_isa): New static function.
- (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
- -mips1 and -mips2 code together, or -mips3 and -mips4 code.
+1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
-Mon Oct 7 11:44:17 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c (elf_mips_abi_name): New.
+ (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
- * archive.c (do_slurp_coff_armap): Only treat archive as little
- endian for i960 COFF.
+1998-12-12 Gavin Romig-Koch <gavin@cygnus.com>
-Fri Oct 4 13:49:01 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing):
+ Handle bfd_mach_mips4300.
- * coffcode.h (coff_compute_section_file_positions): Adjust sofar
- by the change in size of the section when EXEC_P is not set.
+1998-12-11 Ulrich Drepper <drepper@cygnus.com>
- * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
- (m68kcoff_rtype_to_howto): New static function.
- * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
- VMA to the addend for a PC relative reloc.
+ * elf32-i386.c: Remove leaked development code from patch
+ 1998-12-10 by Richard Henderson.
- * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
- HP/UX 10.20.
- * Makefile.in: Rebuild dependencies.
+1998-12-10 Richard Henderson <rth@cygnus.com>
- * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
- som.h is included.
+ * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
+ in debug sections for symbol defined externally.
-Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
+Thu Dec 10 10:58:38 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
- * Makefile.in: Remove explicit dependencies for mn10200 and
- mn10300 files.
- (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
- (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
- (dependencies): Rebuilt.
+ * targets.c (bfd_target_vector): Remove duplicate entry for
+ tekhex_vec.
-Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-12-09 Nick Clifton <nickc@cygnus.com>
- * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
- during this function.
+ * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
+ since we are using RELAs.
- * elflink.c (_bfd_elf_create_linker_section): Only use an existing
- section if the flags are compatible.
+Tue Dec 8 22:15:48 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Add havevecs, and put it in tdefaults.
- * mpw-config.in: Likewise.
- * configure: Rebuild.
- * targmatch.sed: New file; a sed script to build targmatch.h from
- config.bfd.
- * config.bfd: Add #if, #endif, and comments for targmatch.h.
- * targets.c: Include "fnmatch.h".
- (struct targmatch): Define.
- (bfd_target_match): Define by including targmatch.h.
- (bfd_find_target): If the target is not found by name, search for
- it as a configuration triplet.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
- i386dynix.o, m68k4knetbsd.o, and riscix.o.
- (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
- hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
- (HFILES): Add targmatch.h. Also, alphabetize and reindent.
- (CFILES): Remove i386dynix.c and hp300bsd.c.
- (targmatch.h): New target.
- (do_clean): Remove targmatch.h.
-
- * configure.in: Add BFD_NEED_DECLARATION(getenv).
- * acconfig.h: Add NEED_DECLARATION_GETENV.
+ SCO Open Server Release 5 core file support, from Jouke Numan
+ <jnuman@hiscom.nl>:
+ * 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 <mklein@dis.com>
+
+ * 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 <sys/dir.h>.
+ * 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.
- * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
- * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
-
-Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
-
- * cpu-mn10x00.c, elf32-mn10x00: Removed.
- * cpu-mn10200.c, cpu-mn10300.c: New files.
- * elf32-mn10200.c, elf32-mn10300.c: New files.
- * Makefile.in: Break mn10x00 support into two separate
- configurations, mn10200 and mn10300.
- * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
- * bfd-in2.h, configure: Rebuilt.
-
-Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (do_clean): Move config.log to do_distclean.
-
-Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
-
- * cpu-mn10x00.c, elf32-mn10x00.c: New files.
- * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
- (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
- (elf32-mn10x00.o): Add dependencies.
- * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
- (bfd_mn10x00_arch): Declare.
- (bfd_archures_list): Add bfd_mn10x00_arch.
- * config.bfd: Add mn10x00-*-*.
- * configure.in: Add bfd_elf32_mn10x00_vec.
- * elf.c (prep_headers): Handle bfd_arch_mn10x00.
- * targets.c (bfd_elf32_mn10x00_vec): Declare.
- (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
- * bfd-in2.h, configure: Rebuilt.
-
-Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
-
- openVMS/Alpha: Provide filename and case_hack flags via
- symbol table from gas.
- Add case_hack code for symbol output from vax/vms.
- * evax-alpha.c (evax_initialize): Remove filename handling,
- filename is provided via symbol table.
- (evax_get_symtab): Use local symbol count when setting up table.
- * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
- debugging.
- (_bfd_evax_write_egsd): Skip file name symbol.
- * evax-emh.c (get_vms_time_string): Local function now.
- (_bfd_evax_write_emh): Extract source filename and case_hack flags
- from symbol table.
- * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
- through _bfd_evax_case_hack_symbol.
- * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
- functions.
- (_bfd_evax_basename): Removed.
- (_bfd_get_vms_time_string): Moved to evax-emh.c.
- * evax.h (evax_private_data_struct): Remove filename.
- (flag_hash_long_names, flag_show_after_trunc,
- flag_no_hash_mixed_case, vms_name_mapping): New flags for
- vms_case_hack.
-
-Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
- (N_GETMID_NET, N_GETFLAG_NET): Likewise.
- (NO_SWAP_MAGIC): Don't define.
- (SWAP_MAGIC): Define.
-
- * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
- no hash table entry for a global symbol.
-
-Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
-
- * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
-
-Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * cofflink.c (coff_link_add_symbols): Don't override a meaningful
- symbol type with T_NULL. Warn if symbol type changes. Based on
- patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
-
- * elflink.h (elf_link_add_object_symbols): Only put a symbol from
- a dynamic object in the dynamic symbol table if it is referenced
- or defined by a regular object.
-
-Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
- remove dwarf local labels. Shrinks binaries by a factor of 3!
-
-Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
- by hand, rather than by calling bfd_make_section.
-
-Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
-
- * reloc.c: Rename m32r relocs.
- * bfd-in2.h, libbfd.h: Rebuilt.
- * elf32-m32r.c: Update.
-Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * aoutx.h (aout_link_input_section_ext): When doing a relocateable
- link, adjust the symbol index of a base relative reloc. Don't
- change the addend of a PC relative reloc if pcrel_offset is set.
- * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
- a relocateable link.
-
- * reloc.c (bfd_perform_relocation): Apply the relocation even if
- it is zero, in case src_mask matters.
- (bfd_install_relocation): Likewise.
-
-Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (xcoff_link_add_symbols): Always initialize
- keep_syms.
- (_bfd_xcoff_bfd_final_link): Don't set target_index
- to an uninitialized value.
-
-Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
- indices, rather than crashing.
- (coff_slurp_reloc_table): Likewise. Check whether the howto field
- is NULL.
- * coff-sh.c (sh_relocate_section): Check for an illegal symbol
- index.
-
-Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
- reloc to 0.
- (coff_arm_adjust_symndx): New static function.
- (coff_adjust_symndx): Define.
-
- * srec.c (srec_scan): Accept multiple symbols on a single line.
- From Pascal Martin <pmartin@alsys.com>.
-
- * README: New file.
-
-Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
+Tue Dec 8 16:21:35 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <taylor@texas.cygnus.com>
+
+ The following changes were made by David Taylor
+ <taylor@texas.cygnus.com>, Edith Epstein
+ <eepstein@sophia.cygnus.com>, Jim Blandy
+ <jimb@zwingli.cygnus.com>, and Elena Zannoni
+ <ezannoni@kwikemart.cygnus.com> 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 <nickc@cygnus.com>
+
+ * elf32-fr30.c (fr30_final_link_relocate): Using signed
+ relocations for signed values.
+
+Sun Dec 6 16:30:33 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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
+ <snowball3@usa.net>:
+ * 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.
- * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
- (sunos_merge_private_bfd_data): New function.
+ * elf.c (copy_private_bfd_data): Always initialize the
+ includes_phdrs field.
-Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
+ file defines a symbol first mentioned in an ELF file.
- * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
- than input BFD.
- (bfd_merge_private_bfd_data): Likewise.
- * section.c (bfd_copy_private_section_data): Likewise.
- * syms.c (bfd_copy_private_symbol_data): Likewise.
+ * 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.
- * aout-target.h (MY_bfd_copy_private_section_data): Check that
- both BFD's are the right flavour.
- * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
- * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
- * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
- (_bfd_mips_elf_merge_private_bfd_data): Likewise.
- * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
- (ppc_elf_merge_private_bfd_data): Likewise.
- * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
- * peicode.h (pe_bfd_copy_private_section_data): Likewise.
-
- * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
- R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
- its sanity check.
-
-Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
-
- * reloc.c: Add m32r relocs.
- * bfd-in2.h, libbfd.h: Rebuilt.
- * cpu-m32r.c,elf32-m32r.c: New files.
-
-Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
-
-Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * tekhex.c (first_phase): Change type parameter from char to int.
- (out): Likewise.
- (pass_over): Change func to expect int, not char.
-
- * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
- rather than SEC_LOAD when aligning the file offset for the first
- section in a segment.
-
-Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
-
- * syms.c (coff_section_type): Make arg const.
- * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
- to make_bfd_asection().
- * elf-bfd.h (bfd_section_from_phdr): Add prototype.
- * elfcode.h (bfd_section_from_phdr): Remove prototype.
- (_bfd_elf_stringtab_init): Remove prototype.
-
- * netbsd-core.c (swap_abort): Add prototype.
- * aix386-core.c (swap_abort): Ditto & make static
- * hpux-core.c (swap_abort): Ditto & make static.
- * irix-core.c (swap_abort): Ditto & make static.
- * ptrace-core.c (swap_abort): Ditto & make static.
- * trad-core.c (swap_abort): Ditto & make static.
- * coffswap.h (coff_swap_reloc_in): Ditto.
- (coff_swap_reloc_out): Ditto.
- (coff_swap_filehdr_in): Ditto.
- (coff_swap_filehdr_out): Ditto.
- (coff_swap_sym_in): Ditto.
- (coff_swap_sym_out): Ditto.
- (coff_swap_aux_in): Ditto.
- (coff_swap_aux_out): Ditto.
- (coff_swap_lineno_in): Ditto.
- (coff_swap_lineno_out): Ditto.
- (coff_swap_aouthdr_in): Ditto.
- (coff_swap_aouthdr_out): Ditto.
- (coff_swap_scnhdr_in): Ditto.
- (coff_swap_scnhdr_out): Ditto.
- * ihex.c (ihex_sizeof_headers): Ditto.
- * tekhex.c (getsym): Ditto.
- (find_chunk): Ditto & make static.
- (insert_byte): Ditto.
- (first_phase): Ditto.
- (pass_over): Ditto.
- (tekhex_get_symtab): Ditto & make static.
- (tekhex_get_symtab_upper_bound): Ditto & make static.
- (tekhex_mkobject): Ditto.
- (tekhex_object_p): Ditto.
- (move_section_contents): Ditto.
- (tekhex_get_section_contents): Ditto.
- (tekhex_set_arch_mach): Ditto & make static.
- (tekhex_set_section_contents): Ditto.
- (writevalue): Ditto.
- (writesym): Ditto.
- (out): Ditto.
- (tekhex_write_object_contents): Ditto.
- (tekhex_sizeof_headers): Ditto.
- (tekhex_make_empty_symbol): Ditto.
- (tekhex_get_symbol_info): Ditto.
- (tekhex_print_symbol): Ditto.
- * irix-core.c (make_bfd_asection): Ditto.
- (irix_core_core_file_p): Ditto.
- (irix_core_core_file_failing_command): Ditto.
- (irix_core_core_file_failing_signal): Ditto.
- (irix_core_core_file_matches_executable_p): Ditto.
- (irix_core_make_empty_symbol): Ditto.
- * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
- * srec.c (srec_new_symbol): Ditto.
- (srec_get_section_contents): Ditto.
- (srec_set_arch_mach): Ditto.
- (srec_set_section_contents): Ditto.
- (internal_srec_write_object_contents): Ditto.
- (srec_write_object_contents): Ditto.
- (symbolsrec_write_object_contents): Ditto.
- (srec_sizeof_headers): Ditto.
- (srec_make_empty_symbol): Ditto.
- (srec_get_symtab_upper_bound): Ditto.
- (srec_get_symtab): Ditto.
- (srec_print_symbol): Ditto and make static.
- * elf.c (elf_read): Ditto
- (assign_section_numbers): Ditto.
- (elf_fake_sections): Ditto.
- (sym_is_global): Ditto.
- (elf_map_symbols): Ditto.
- (get_program_header_size): Ditto.
- * coffgen.c (make_a_section_from_file): Ditto.
- (coff_real_object_p): Ditto.
- (fixup_symbol_value): Ditto.
- (build_debug_section): Ditto.
- (copy_name): Ditto.
- * syms.c (coff_section_type): Ditto.
-
-Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * bfd-in2.h: Rebuilt after m32r changes.
-
-Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * config.bfd,configure.in,configure: Add m32r support.
- * Makefile.in,archures.c,elf.c,targets.c: Likewise.
- * config.bfd: Keep target list alphabetically sorted.
-
-Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
- to add in the constant part found in the instruction itself.
- (case R_V850_HI16_S): Likewise.
-
-Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
- and R_D10V_18 to be 1 (word).
-
-Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stabs.c (_bfd_link_section_stabs): If the output_section field
- of either section is bfd_abs_section, then the linker is
- discarding the section and we should not optimize it.
-
-Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (aout-sparcle.o): New target.
- * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
- * config.bfd (sparclet-*-aout*): Add case.
- * configure.in (sparcle_aout_vec): Add case.
- * configure: Regenerated.
- * targets.c (sparcle_aout_vec): Declare.
- (bfd_target_vector): Add sparcle_aout_vec.
- * aout-sparcle.c: New file.
-
-Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
- low order sign bit propogation for R_V850_HI16_S.
-
- * elf32-v850.c (bfd_elf32_v850_reloc): New function for
- handling V850 specific relocs.
- (elf_v850_howto_table): Use the new function for some
- relocations. Twiddle masks & shifts for some relocs.
- Set partial_inplace where needed.
-
-Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * cpu-mips.c: Add an explicit mips:3000 entry, and change the
- default architecture to a machine number of 0.
- * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
- for E_MIPS_ARCH_1.
- (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
- the output BFD is the default, set it from the first input BFD.
-
-Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
- insert at bitpos zero. The HI16 relocs are shifted right
- by 16 bits. Fix src_mask for all relocs.
- (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
- little endian!
- (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
- endian!
-
-Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
- Rewrite to use BFD file read routines and to avoid using a fixed
- length for the file name.
-
-Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
-
- * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
- (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
- (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
- to R_V850_{32,16,8}.
-
-Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
-
- * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
- (elf_v850_howto_table): Add info for HI16_S reloc.
- (v850_reloc_map): Add HI_16_S reloc.
- * reloc.c: Define BFD_RELOC_V850_* relocs.
-Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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
+ <joel.schantz@argosys.boeing.com>.
- Add SH ELF support.
- * elf32-sh.c: New file.
- * elf.c (prep_headers): Handle bfd_arch_sh.
- * elfcode.h (write_relocs): Handle absolute symbol.
- * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
- (_bfd_elf64_link_read_relocs): Declare.
- * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
- elf_link_read_relocs. Make globally visible. Change all
- callers.
- (elf_link_input_bfd): Get external symbols from cache in
- symtab_hdr->contents. Get contents from cache in
- elf_section_data.
- * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
- already defined.
- * reloc.c: Define BFD_RELOC_SH_* relocs.
- * libbfd-in.h (_bfd_sh_align_load_span): Declare.
- * coff-sh.c (sh_insns_conflict): Fix a return value.
- (_bfd_sh_align_load_span): New globally visible function, broken
- out of sh_align_load.
- (sh_align_load): Call _bfd_sh_align_load_span.
- (sh_swap_insns): Change relocs parameter to PTR.
- * bfd-in2.h, libbfd.h: Rebuild.
- * targets.c (bfd_elf32_sh_vec): Declare.
- (bfd_elf32_shl_vec): Declare.
- * config.bfd (sh-*-elf*): New target.
- * configure.in (bfd_elf32_sh_vec): New target vector.
- (bfd_elf32_shl_vec): New target vector.
- * configure: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add elf32-sh.o.
- (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
-
- * elf.c (map_sections_to_segments): Check that LMA does not skip a
- page before checking D_PAGED.
-
- * ihex.c (ihex_scan): Removed unnecessary extbase variable.
- (ihex_write_object_contents): Remove extbase; always use segbase
- instead.
-
-Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent
+ <aymeric.vincent@emi.u-bordeaux.fr>.
- * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
- * configure.host (i[345]86-*-*): Ditto.
- * config.bfd (i[345]86-*-*): Ditto.
- * configure: Regenerate.
+1998-12-04 Jim Blandy <jimb@zwingli.cygnus.com>
- * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
- elf.
+ * 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)
-Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
+1998-12-03 Nick Clifton <nickc@cygnus.com>
- * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
- * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
- * som.c (hppa_som_gen_reloc_type): Add new argument. If
- we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
- will have an ST_CODE type, change the symbol's type to ST_DATA.
- * som.c (hppa_som_gen_reloc_type): Update prototype.
+ * 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
-Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Dec 2 00:58:37 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
- R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
- (mips_elf_size_dynamic_sections): Don't require .got to exist.
- (mips_elf_finish_dynamic_sections): Likewise.
+ * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
+ link against a dynamic symbol with no type or size.
-Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-12-01 Ulrich Drepper <drepper@cygnus.com>
- * configure.host (HLDENV): New variable to set. Set it for
- *-*-sysv4*, since those linkers may not support -R but they always
- support LD_RUN_PATH.
+ * 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.
- * libieee.h (NSECTIONS): Don't define.
- (ieee_data_struct): Change section_table to asection **. Add
- section_table_size.
- * ieee.c (get_section_entry): If the table isn't big enough, make
- it bigger.
- (ieee_slurp_sections): Remove assertion about number of sections.
- (ieee_object_p): Adjust initialization of ieee to match changes to
- the structure.
+Tue Dec 1 11:33:33 1998 Jim Wilson <wilson@cygnus.com>
- * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
- symbols merely because we are generating a shared library.
- (xcoff_build_ldsyms): Don't set up global linkage code for an
- undefined symbol merely because we are generating a shared
- library.
+ * 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.
-Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+1998-12-01 Nick Clifton <nickc@cygnus.com>
- * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
- (BFD32_BACKENDS) Add elf32-v850.o.
- * archures.c: Add bfd_v850_arch.
- * bfd-in2.h: Add bfd_v850_arch.
- * config.bfd (v850-*-*): New target.
- * configure: (bfd_elf32_v850_vec) New vector.
- * configure.in: (bfd_elf32_v850_vec) New vector.
- * cpu-v850.c: New file.
- * elf.c (prep_headers): Added case bfd_arch_v850.
- * elf32-v850.c: New file.
- * targets.c (bfd_elf32_v850_vec): New vector.
+ * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
+ a hash table.
-Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Nov 30 15:28:09 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
- * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
- a function code symbol for an XMC_XO symbol.
+ * 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.
-Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
+Fri Nov 27 17:51:38 1998 Geoff Keating <geoffk@ozemail.com.au>
- * mpw-config.in: Update editing of autoconf vars to reflect
- Jul 18 configure.in change.
- * mpw-make.sed: Update editing of include pathnames to be
- more general, add @DASH_C_FLAG@ to explicit compile rule edit.
+ * elflink.h (compute_bucket_count): Don't allow minsize==0, it
+ causes division by zero later on.
-Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
+Thu Nov 26 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
- * elf64-alpha.c (elf64_alpha_output_extsym): The section from
- which to offset to get the .plt entry address is ".plt".
+ * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
+ needed.
-Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
+1998-11-25 DJ Delorie <dj@cygnus.com>
- * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
- BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
- Added, for internal use by the ARM gas.
- * libbfd.h: Rebuilt
- * bfd-in2.h: Rebuilt
+ * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation
+ hook now.
-Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
+Tue Nov 24 10:25:27 1998 Nick Clifton <nickc@cygnus.com>
- * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
- in section dynidx start.
+ * 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.
-Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
+ chain to empty.
- * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
- name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
- optimization for g++.
+ The following changes are based on a patch submitted by Gianluca
+ Moro <glctr@abc.it>:
-Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ (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.
- * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
- the -mrelocatable-lib bit set and the other doesn't, clear the
- -mrelocatable-lib bit in the header.
+1998-11-23 DJ Delorie <dj@cygnus.com>
-Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elflink.h (elf_link_add_object_symbols): Do not resolve a common
- symbol against a STT_FUNC symbol in a shared library.
+1998-11-23 DJ Delorie <dj@cygnus.com>
-Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
+ * opncls.c (bfd_make_readable): need more cleanup for symbols and
+ relents. Call bfd_check_format to reinitialize.
- * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
- symbol is found, automatically define the corresponding function
- code.
+Fri Nov 20 14:21:36 1998 Nick Clifton <nickc@cygnus.com>
- * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
- if sym.n_numaux is not zero.
- (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
- entry to disagree about the number of aux entries if the symbol
- has zero.
-
- * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
- section if it might be needed, not just if info->shared.
- (mips_elf_adjust_dynamic_symbol): Make room for a null element at
- the start of .rel.dyn if we are going to use it.
- (mips_elf_finish_dynamic_sections): Only clear the first element
- of .rel.dyn if the size is greater than zero.
-
-Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (xcoff_link_input_bfd): If we already called the
- undefined_symbol callback for a symbol, then don't issue any more
- warnings about loader relocs.
- (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
- after calling the undefined_symbol callback.
-
- * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
- (xcoff_link_add_symbols): Permit multiple definitions of a symbol
- as the AIX linker seems to do.
-
-Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
- (evax_initialize): Remove evax_reloc_table.
- (evax_close_and_cleanup): Ditto.
- (reloc_nil): Ditto.
- (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
- entries.
- (evax_bfd_reloc_type_lookup): Ditto.
- * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
- cooked_size == raw_size.
- * evax-emh.c (_bfd_evax_register_filename): Remove.
- * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
- * evax-misc.c (add_new_contents): Malloc section at full size.
- (_bfd_save_evax_section): Memcpy section contents directly.
- * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
- (evax_reloc_table): Remove.
-
- * hosts/alphavms.h (O_ACCMODE): Define if needed.
-
- * makefile.vms: Add better support for DEC C compilation
- Add evax.h dependencies
-
- * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
- (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
- (BFD_RELOC_ALPHA_BASEREG): Remove.
- * bfd-in2.h, libbfd.h: Rebuild.
-
-Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * archive.c (bsd_write_armap): Ifdef around calls to getuid and
- getgid if _WIN32 is defined.
- * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
-
-Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
- Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
- include file.
- * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
- isn't defined.
-
-Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
- realloc.
- * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
- (NEED_DECLARATION_REALLOC): New macro.
- * configure, config.in: Rebuild.
- * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
- (realloc): Declare if NEED_DECLARATION_REALLOC.
+ * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
+ warnings.
- * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
- <strings.h> if they exist.
+Thu Nov 19 14:42:15 1998 Geoffrey Noer <noer@cygnus.com>
- * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
+ * aclocal.m4: regenerate
+ * configure: regenerate
-Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Nov 17 20:23:35 1998 Richard Henderson <rth@cygnus.com>
- * cpu-i386.c (i8086_arch): Architecture info for the i8086.
+ * 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.
- Based on patches from Eric Valette <valette@crf.canon.fr>:
- * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
- LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
- (elf_howto_table): Add entries for new relocs.
- (elf_i386_reloc_type_lookup): Handle new relocs.
- (elf_i386_info_to_howto): Just call abort.
- (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
- (elf_i386_relocate_section): Likewise.
+Tue Nov 17 15:28:31 1998 Nick Clifton <nickc@cygnus.com>
-Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
+ reloc number.
- * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
+Mon Nov 16 22:19:21 1998 DJ Delorie <dj@cygnus.com>
-Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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)
- * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
- only get the LMA from the phdr if they are in the same part of the
- file.
+Mon Nov 16 19:15:19 1998 Dave Brolley <brolley@cygnus.com>
- * elf.c (map_sections_to_segments): Rewrite tests for starting a
- new segment to make them more comprehensible. If the relationship
- between the LMA and the VMA changed, start a new segment. Don't
- check dynsec when deciding whether to start a new segment for a
- writeable section; -N will now handle this.
-
-Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
-
- * libhppa.h: Remove "esel" changes. Not the right approach.
- * som.c: Corresponding changes.
- (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
- which don't have a SOM symbol type associated with them.
- Reverses a 1994 change.
-
-Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Make ld -N more reasonable for ELF:
- * elf.c (map_sections_to_segments): If D_PAGED is not set, set
- phdr_in_section to false, and always use a single load segment.
- (elf_sort_sections): Sort sections by LMA after VMA.
- (assign_file_positions_for_segments): If D_PAGED is not set, don't
- align to maxpagesize.
- (assign_file_positions_except_relocs): Likewise.
- * elfcode.h (elf_object_p): If a section is loaded but not page
- aligned, clear D_PAGED.
-
-Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
- Added, for internal use by the ARM gas.
- * libbfd.h: Rebuilt
- * bfd-in2.h: Rebuilt
-
-Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
-
- * libhppa.h (R_HPPA_ESEL): New field selector.
- (e_esel): Similarly.
- * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
- then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
- (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
-
-Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
- archive search before looking for stripped dynamic objects.
-
-Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
- symbol a warning rather than an error.
-
-Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf.c (assign_file_positions_for_segments): Track the virtual
- memory position separately from the file position, and use it to
- compute the alignment adjustment.
-
-Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
- and fixed mask on R_D10V_10_PCREL_L.
-
-Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf64-mips.c: Include "aout/ar.h".
- (mips_elf64_slurp_armap): New static function.
- (mips_elf64_write_armap): New static function.
- (bfd_elf64_archive_*): Define.
- * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
- Use instead of bfd_generic_archive_p.
- (bfd_elfNN_write_archive_contents): Define if not defined. Use
- instead of _bfd_write_archive_contents.
- (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
- _bfd_generic_mkarchive.
- (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
- bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
- _bfd_archive_coff.
- (TARGET_LITTLE_SYM): Likewise.
- * archive.c (bfd_slurp_armap): Check for and reject an archive map
- name of /SYM64/.
- * Makefile.in: Rebuild dependencies.
-
- * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
- SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
- SHT_MIPS_EVENTS sections.
- (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
- SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
- sections.
- (_bfd_mips_elf_fake_sections): Likewise.
+ * po/bfd.pot: Regenerated.
- * libecoff.h (ecoff_data_type): Add rdata_in_text field.
- * ecoff.c (ecoff_compute_section_file_positions): Copy
- rdata_in_text from backend info to tdata. Clear it if any data
- section comes before .rdata.
- (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
- tdata rather than backend info.
+Mon Nov 16 10:57:06 1998 Nick Clifton <nickc@cygnus.com>
-Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-v850.c (hi16s_location): Replaced fixed size array with
+ linked list.
- * configure.in: Fix test for whether a compiler has a 64 bit
- type. From Jim Wilson <wilson@cygnus.com>.
+Sun Nov 15 20:28:25 1998 Richard Henderson <rth@cygnus.com>
-Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * configure.host (mips-sgi-irix6*): New host.
+Sat Nov 14 15:16:01 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
- (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
- BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
- to AC_OUTPUT call.
+ * 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.
- * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
- (BFD_HOST_64_BIT): Define conditionally.
- (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
- (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
- (symvalue, bfd_size_type): Likewise.
- * bfd-in2.h: Rebuild.
- * Makefile.in (do_clean): Remove bfd-tmp.h.
- (do_distclean): Remove bfd-in3.h.
- (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
- (bfd-in3.h): New target.
-
- * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
- Andrew Gierth <ANDREWG@microlise.co.uk>.
-
- * configure.host: Set INSTALL_SHLIB.
- * configure.in: Call AC_SUBST (INSTALL_SHLIB).
- * configure: Rebuild.
- * Makefile.in (install): Use @INSTALL_SHLIB@.
-
- * config.bfd (mips*-*-irix6*): New target.
- * configure.host: Handle Irix 6 shared library like Irix 5.
-
- * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
- symbol for a magic name.
- (xcoff_link_input_bfd): Don't change the reloc symbol for an
- XMC_TD symbol.
- (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
- XMC_TD symbol.
-
-Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Add ELF support to mips config, create the
- elf32-target.h file in the object dir.
- * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
-
-Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
- * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
- Also removed most abort calls, in favor of using bfd reporting.
+Thu Nov 12 19:19:54 1998 Dave Brolley <brolley@cygnus.com>
-Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * po/bfd.pot: Regenerated.
- * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
- (BFD32_BACKENDS) Add elf32-d10v.o.
- * archures.c: Add bfd_d10v_arch.
- * bfd-in2.h: Add bfd_d10v_arch.
- * config.bfd (d10v-*-*): New target.
- * configure: (bfd_elf32_d10v_vec) New vector.
- * configure.in: (bfd_elf32_d10v_vec) New vector.
- * cpu-d10v.c: New file.
- * elf.c (prep_headers): Added case bfd_arch_d10v.
- * elf32-d10v.c: New file.
- * libbfd.h: Rebuild.
- * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
- BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
- * targets.c (bfd_elf32_d10v_vec): New vector.
-
-Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
-
- * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
-
-Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
- bfd_mach_i386_i8086 machine types.
-
-Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
- and _FINI sections.
-
-Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
-
- * coffcode.h (coff_set_section_contents): A/UX does not require
- special handling of the _LIB section.
-
-Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
-
- * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
- value for R_RELBYTE.
-
- * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
- array if one was allocated.
-
-Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
- * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
- use_rld_obj_head and rld_value.
- (mips_elf_link_hash_table_create): Initialize new fields.
- (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
- dynamic.
- (mips_elf_create_dynamic_sections): Create .rld_map section. If
- __rld_obj_head symbol not seen, create an __rld_map symbol.
- (mips_elf_size_dynamic_sections): Make space in .rld_map section.
- Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
- (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
- __rld_obj_head symbol.
- (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
+Tue Nov 10 16:17:06 1998 Geoffrey Noer <noer@cygnus.com>
-Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
+ * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
+ * aclocal.m4, configure: regenerate
- * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
+Tue Nov 10 15:13:59 1998 Nick Clifton <nickc@cygnus.com>
- * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
- ppc_elf_addr16_ha_reloc.
- (ppc_elf_addr16_ha_reloc): New static function.
+ * elf.c (prep_headers): Add support for bfd_arch_fr30.
- * coff-mips.c (struct mips_hi): Define.
- (mips_refhi_list): New static variable.
- (mips_refhi_addr, mips_refhi_addend): Remove.
- (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
- (mips_reflo_reloc): Process mips_refhi_list.
- (mips_relhi_list): New static variable.
- (mips_relhi_addr, mips_relhi_addend): Remove.
- (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
- (mips_rello_reloc): Process mips_relhi_list.
- (mips_relocate_section): Permit an arbitrary number of REFHI or
- RELHI relocs before the associated REFLO or RELLO reloc.
+Tue Nov 10 13:37:36 1998 Felix Lee <flee@cygnus.com>
-Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * aout-target.h (MY(callback)): Set reloc_count fields.
+Tue Nov 10 14:31:01 1998 Catherine Moore <clm@cygnus.com>
-Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
- sections unless this is a SunOS link.
+Sat Nov 7 18:07:51 1998 Peter Schauer <peter.schauer@regent.e-technik.tu-muenchen.de>
- * VERSION: Set to 2.7.1.
+ * 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.
- * Released binutils 2.7.
+Wed Nov 4 15:58:48 1998 Nick Clifton <nickc@cygnus.com>
-Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * i386aout.c: Include "aout/aout64.h".
- (i386aout_write_object_contents): New static function.
- (MY_write_object_contents): Define.
+Mon Nov 2 14:59:33 1998 Geoffrey Noer <noer@cygnus.com>
- * netbsd.h (MY(write_object_contents)): Make sure that
- adjust_sizes_and_vmas is called before fiddling with the magic
- number.
+ * configure.in: detect cygwin* instead of cygwin32*
+ * configure: regenerate
-Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
+Sun Nov 1 19:32:28 1998 Jeffrey A Law (law@cygnus.com)
- * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
+ * 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 Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
+Sun Nov 1 16:20:35 1998 Ian Lance Taylor <ian@cygnus.com>
- * libbfd-in.h (itos, stoi): Don't define.
+ * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
* libbfd.h: Rebuild.
- * i386lynx.c (KEEPIT): Define as udata.i.
- (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
- (NAME(lynx,swap_ext_reloc_out)): Likewise.
- * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
- flags. Don't use stoi.
-
- * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
-
- * elf.c (map_sections_to_segments): Don't start a new segment for
- a writable section if it's on the same page as the previous
- segment. Reset the writable variable for a readonly section.
-
-Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
-
- * peicode.h (coff_swap_aouthdr_in): Missing initializations of
- first_thunk_address, thunk_size, and import_table_size.
- * peicode.h: Improved some diagnostics regarding edata sections.
-
- * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
- on IMGLUE relocs.
- (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
- (TARGET_LITTLE_SYM): Added missing D_PAGED.
-
-Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
- with XCOFF_DEF_DYNAMIC set is really defined.
- (xcoff_link_check_dynamic_ar_symbols): Likewise.
- (xcoff_link_add_symbols): Only create special sections if using an
- XCOFF hash table.
-
- * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
- aixcoff-rs6000.
- (bfd_install_relocation): Likewise.
-
-Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
- * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
+ * 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.
- (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
- (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
- (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
- (elf64_alpha_link_hash_newfunc): Initialize flags field.
- (elf64_alpha_check_relocs): Record types of LITUSE entries that
- are found for LITERAL relocs.
- (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
- taken, we cannot generate a .plt entry for the symbol.
-
-Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add AC_ISC_POSIX, and check for setitimer and
- sysconf functions (for gprof).
- * configure, config.in: Rebuild.
-
-Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
- an archive if it has a map. If the object file has the wrong
- xvec, reject it.
-
- * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
- BRADDR, SREL16, SREL32, or SREL64 reloc against an external
- symbol.
- (alpha_relocate_section): Likewise.
-
- * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
- (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
- (coff_swap_sym_out): Use SYMESZ, not sizeof.
- (coff_swap_aux_out): Use AUXESZ, not sizeof.
- (coff_swap_lineno_out): Use LINESZ, not sizeof.
- (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
- (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
- * peicode.h: Corresponding changes.
-
-Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elflink.h (elf_create_pointer_linker_section): Comment out code
- dealing with making GOT pointers negative of the GOT symbol for
- now.
-
-Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
-
- * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
- increment the .rela.plt size until after we're done creating the
- .plt entry.
- (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
- .rela.plt offset directly rather than calculating it.
-
-Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
- Use autoconf-set values.
- * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
- includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
- values.
- (docdir): Deleted.
- * configure.in (AC_PREREQ): autoconf v2.5 or higher.
- * configure: Rebuilt.
-
-Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
-
- * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
- handling code > 1k away.
-
-Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elflink.h (elf_create_pointer_linker_section): If DEBUG is
- defined, output whenever the symbol is updated.
-
-Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
-
- * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
- section to 0 if user_set_vma is set.
- * elflink.h (elf_bfd_final_link): Likewise.
-
-Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
-
- Partially undo patch of Jun 20.
- * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
- (coff_compute_section_file_positions): Likewise.
- (coff_write_object_contents): Likewise. Re-add deleted code, but
- use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
- * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
-
-Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
-
- * config.bfd: Add support for *-*-rtems* configurations.
-
-Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
+ (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.
- * elf.c (prep_headers): Add bfd_arch_alpha case.
+Sun Nov 1 12:46:53 1998 Geoff Keating <geoffk@ozemail.com.au>
-Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
+ * 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.
- * elf64-alpha.c: New file.
- * config.bfd (alpha-*-linuxecoff*): New target.
- (alpha-*-linux*, alpha-*-elf*): New targets.
- * configure.in (bfd_elf64_alpha_vec): New vector.
- * configure: Rebuild.
- * targets.c (bfd_elf64_alpha_vec): Declare.
- (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
- * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
- * bfd-in2.h, libbfd.h: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD64_BACKENDS): Add elf64-alpha.o.
- (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
-
-Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
- than relying on a right shift of 32.
-
-Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
+Sat Oct 31 20:10:09 1998 Jeffrey A Law (law@cygnus.com)
- * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
- ifdef to COFF_WITH_PE.
- (coff_compute_section_file_positions): Likewise.
- (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
- * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
- * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
- COFF_IMAGE_WITH_PE, always include.
+ * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
- * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
+1998-10-26 15:58 Ulrich Drepper <drepper@cygnus.com>
-Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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 (map_sections_to_segments): Fix up the test for -Ttext to
- approximate the correct answer if SIZEOF_HEADERS was not used.
+ * elf.c (bfd_elf_hash): Optimize the hash function a bit.
- * binary.c (binary_set_section_contents): Set section file
- position based on LMA rather than VMA.
+Mon Oct 19 20:03:21 1998 Catherine Moore <clm@cygnus.com>
-Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
+ * 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.
- * linker.c (_bfd_generic_link_output_symbols): Don't output any
- symbols if info->strip == strip_all.
+Mon Oct 19 16:57:05 1998 Felix Lee <flee@cygnus.com>
-Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+ * acinclude.m4: undo previous gettext change
+ * aclocal.m4: rebuild with right version of aclocal.
- * coff-h8300.c: Remove #if 0 code.
- (compatable): Don't allow mixing/matching of different architectures.
+Mon Oct 19 01:47:21 1998 Felix Lee <flee@cygnus.com>
- * archures.c (bfd_mach_h8300s): Add.
- * bfd-in2.h: Rebuilt.
- * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
- (BADMAG): Likewise.
- (h8300_reloc16_estimate): Likewise.
- (h8300_reloc16_extra_cases): Likewise.
- (h8300_bfd_link_add_symbols): Likewise.
- * coffcode.h (coff_set_arch_mach_hook): Likewise.
- (coff_set_flags): Likewise.
- * cpu-h8300.c (h8300_scan): Likewise.
- Add H8/S to bfd_h8300_arch list.
+ * acinclude.m4, aclocal.m4: move gettext-related fragments from
+ aclocal.m4 to acinclude.m4, so they don't get lost.
-Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
+ * 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.
- Added support for Alpha OpenVMS:
- * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
- * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
- * config.h-vms, makefile.vms: New files.
- * config.bfd (alpha-*-*vms*): New target.
- * configure.in (evax_alpha_vec): New target vector.
- * configure: Rebuild.
- * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
- (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
- * targets.c (bfd_target_evax_flavour): Define.
- (evax_alpha_vec): Declare.
- (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
- if BFD64 is defined.
- * bfd-in2.h, libbfd.h: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
- evax-emh.o, and evax-misc.o.
- (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
- evax-etir.c, evax-emh.c, and evax-misc.c.
- (HFILES): Add evax.h.
+Fri Oct 16 14:07:45 1998 Catherine Moore <clm@cygnus.com>
-Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
- pointer.
- (h8300_bfd_link_add_symbols): Likewise.
+Mon Oct 12 14:18:40 1998 Nick Clifton <nickc@cygnus.com>
-Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+ * coff-arm.c (arm_relocate_section): Remove redundant test.
- * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
- * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
+ * 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.
-Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
- * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
- for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
- created.
- (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
- R_MIPS_32 relocs if creating a shared library.
+ * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
+ relocs.
-Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
+Tue Oct 6 09:20:44 1998 Catherine Moore <clm@cygnus.com>
- * peicode.h (add_data_entry): Use pei_section_data rather than
- _cooked_size. Corresponds to May 13 change in coffcode.h.
+ * 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.
-Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Oct 5 14:55:30 1998 Jeffrey A Law (law@cygnus.com)
- * cofflink.c (_bfd_coff_final_link): Handle long section names.
- * coffcode.h (coff_write_object_contents): If there are long
- section names, always set the f_symptr field, even if there are no
- symbols.
- * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
- if there are no symbols.
+ * som.c (som_finish_writing): Perform some sanity checks when
+ writing an executable or shared library.
- * coffgen.c (make_a_section_from_file): Check return value of
- _bfd_coff_read_string_table.
- (coff_real_object_p): Check return value of
- make_a_section_from_file.
- (_bfd_coff_read_string_table): Check that there are some symbols
- before trying to read the string table size.
+Mon Oct 5 12:02:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
-Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * xcofflink.c (xcoff_link_add_symbols): When considering whether
- to replace a symbol in a dynamic object with a symbol from another
- dynamic object, do the replacement if the existing symbol is
- global linkage code.
+Mon Oct 5 10:06:22 1998 Catherine Moore <clm@cygnus.com>
- * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
- for _ptrgl, and treat it as global linkage code.
+ * elflink.h (elf_gc_sections): Do not allow garbage
+ collection if dynamic sections have been created.
- * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
- filename or N_SO symbol past the offset, and use it to indicate
- that there is no line number or function when appropriate.
+Mon Oct 5 09:07:37 1998 Catherine Moore <clm@cygnus.com>
-Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
- common symbol defined by the linker. Don't export function code
- even if export_defineds is set.
+Mon Oct 5 09:04:25 1998 Catherine Moore <clm@cygnus.com>
-Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume
+ that dynobj exists.
- * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
- and R_JMP_DEL.
- (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
- (h8300_symbol_address_p): New function.
- (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
- relaxing.
+Sun Oct 4 23:29:34 1998 David Edelsohn <edelsohn@mhpcc.edu>
-Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
- problems.
- (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
- correctly for the two variants. Allow relaxing if the target
- is 128 bytes away since after relaxation it'll be 126 bytes away.
- (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
- "dot" and "value". Allow relaxing if the target is 128 bytes
- away since after relaxation it'll be 126 bytes away.
- * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
- the given section until nothing changes.
+Sun Oct 4 20:38:29 1998 Jeffrey A Law (law@cygnus.com)
-Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
+ * 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.
- * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
- alignment hack--we can get the lnnoptr info another way without
- suddenly increasing the alignment requirements. Set the flags for
- the _PDATA section.
- (ecoff_compute_section_file_positions): Do so.
+Sun Oct 4 21:19:09 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * ieee.c (ieee_write_object_contents): Put a timestamp in the file
- to keep the HP emulator database happy.
+ * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
+ correctly.
- * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
- From Kevin Buettner <kev@primenet.com>.
+1998-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): Undo last change.
- * aoutx.h (translate_to_native_sym_flags): Don't try to print the
- name of a NULL section.
+Wed Sep 23 16:09:31 1998 Richard Henderson <rth@cygnus.com>
-Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
+ symbol for the indirect alias to a versioned symbol.
- * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
- set, always call the notice callback.
+Mon Sep 21 12:15:22 1998 Catherine Moore <clm@cygnus.com>
- * VERSION: Increment for bfdlink.h change.
+ * 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.
-Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
+Sun Sep 20 00:48:07 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
- (sh_relax_delete_bytes): Correct handling of differently sized
- trailing alignment reloc.
+ * 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.
- * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
- * bfd-in2.h: Rebuild.
- * configure.in: Warn if there is no known 64 bit type.
- * configure: Rebuild.
+Sun Sep 20 00:09:25 1998 Chris Torek <torek@bsdi.com>
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add ppcboot.o.
- (BFD32_BACKENDS_CFILES): Add ppcboot.c.
-
- * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
- From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
-
-Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
- (bfd_mips_elf64_swap_reginfo_out): Move from here...
- * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
- (bfd_mips_elf64_swap_reginfo_out): ...to here.
-
-Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf64-mips.c: Improve reloc special_functions and handling of
- SHT_MIPS_OPTIONS section.
- * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
- mips_elf_hi16_reloc and make globally visible.
- (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
- make globally visible.
- (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
- make globally visible.
- (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
- and make globally visible.
- (gprel16_with_gp): Check howto->src_mask before using value in
- insn.
- (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
- and make globally visible.
- (gprel32_with_gp): Check howto->src_mask before fetching value.
- (bfd_mips_elf_swap_options_in): New function.
- (bfd_mips_elf_swap_options_out): New function.
- (_bfd_mips_elf_set_private_flags): Rename from
- mips_elf_set_private_flags and make globally visible.
- (_bfd_mips_elf_copy_private_bfd_data): Rename from
- mips_elf_copy_private_bfd_data and make globally visible.
- (_bfd_mips_elf_merge_private_bfd_data): Rename from
- mips_elf_merge_private_bfd_data and make globally visible.
- (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
- for a SHT_MIPS_OPTIONS section.
- (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
- (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
- name of a SHT_MIPS_OPTIONS section.
- (_bfd_mips_elf_set_section_contents): New function.
- (mips_elf32_section_processing): Set the GP value in a
- SHT_MIPS_OPTIONS section.
- (_bfd_mips_elf_find_nearest_line): Rename from
- mips_elf_find_nearest_line and make globally visible.
- (bfd_elf32_set_section_contents): Define.
- * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
- (_bfd_mips_elf_lo16_reloc): Declare.
- (_bfd_mips_elf_gprel16_reloc): Declare.
- (_bfd_mips_elf_got16_reloc): Declare.
- (_bfd_mips_elf_gprel32_reloc): Declare.
- (_bfd_mips_elf_set_private_flags): Declare.
- (_bfd_mips_elf_copy_private_bfd_data): Declare.
- (_bfd_mips_elf_merge_private_bfd_data): Declare.
- (_bfd_mips_elf_find_nearest_line): Declare.
- (_bfd_mips_elf_set_section_contents): Declare.
-
- * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
- elf_info_to_howto.
- (elf_info_to_howto): Define.
- * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
- elf_info_to_howto.
- (elf_info_to_howto): Define.
- * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
- elf_info_to_howto.
- (elf_info_to_howto): Define.
-
- * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
- R_MOV16B[12], to match change in coff/internal.h.
-
-Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf64-mips.c: Extensive additions to provide better support for
- writing files and for gas.
- * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
- of mips_elf_object_p.
- (mips_elf32_object_p): Rename from mips_elf_object_p; call
- _bfd_mips_elf_object_p.
- (_bfd_mips_elf_final_write_processing): Rename from
- mips_elf_final_write_processing and make globally visible.
- (_bfd_mips_elf_fake_sections): Rename from
- mips_elf_fake_sections and make globally visible.
- (_bfd_mips_elf_section_from_bfd_section): Rename from
- mips_elf_section_from_bfd_section and make globally visible.
- (_bfd_mips_elf_section_processing): New function, broken out of
- mips_elf_section_processing.
- (mips_elf32_section_processing): Rename from
- mips_elf_section_processing; call
- _bfd_mips_elf_section_processing.
- (_bfd_mips_elf_symbol_processing): Rename from
- mips_elf_symbol_processing and make globally visible.
- (_bfd_mips_elf_read_ecoff_info): Rename from
- mips_elf_read_ecoff_info and make globally visible.
- (mips_elf32_ecoff_debug_swap): Rename from
- mips_elf_ecoff_debug_swap.
- * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
- struct symbol_cache_entry.
- (_bfd_elf_validate_reloc): New function, moved in from
- elfcode.h:validate_reloc.
- * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
- to _bfd_elf_validate_reloc. Change all callers.
- * elf-bfd.h (bfd_section_from_shdr): Declare.
- (_bfd_elf_symbol_from_bfd_symbol): Declare.
- (_bfd_elf_validate_reloc): Declare.
- (_bfd_mips_elf_object_p): Declare.
- (_bfd_mips_elf_fake_sections): Declare.
- (_bfd_mips_elf_section_from_bfd_section): Declare.
- (_bfd_mips_elf_section_processing): Declare.
- (_bfd_mips_elf_symbol_processing): Declare.
- (_bfd_mips_elf_read_ecoff_info): Declare.
- (_bfd_mips_elf_final_write_processing): Declare.
- * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
- if already defined.
-
- * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
- (mips_elf_final_write_processing): Likewise.
-
-Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- 64-bit MIPS ELF ABI objdump support:
- * elf64-mips.c: New file.
- * Makefile.in: Rebuild dependencies.
- (BFD64_BACKENDS): Add elf64-mips.o.
- (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
- * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
- bfd_elf64_littlemips_vec to targ_selvecs.
- (mips*-*-elf*): Likewise.
- * confingure.in: Add bfd_elf64_bigmips_vec and
- bfd_elf64_littlemips_vec to vector switch.
- * configure: Rebuild.
- * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
- broken out of mips_elf_section_from_shdr.
- (mips_elf32_section_from_shdr): Rename from
- mips_elf_section_from_shdr. Call new function.
- (elf_backend_section_from_shdr): Update name of renamed function.
- * elf-bfd.h (struct elf_size_info): Change second parameter of
- write_out_phdrs to be const. Likewise for second parameter of
- swap_symbol_out.
- (struct bfd_elf_section_data): Add rel_hdr2 field.
- (bfd_elf32_swap_symbol_in): Change second parameter to be const.
- (bfd_elf32_swap_symbol_out): Likewise.
- (bfd_elf32_swap_reloc_in): Likewise.
- (bfd_elf32_swap_reloc_out): Likewise.
- (bfd_elf32_swap_reloca_in): Likewise.
- (bfd_elf32_swap_reloca_out): Likewise.
- (bfd_elf32_swap_phdr_in): Likewise.
- (bfd_elf32_swap_phdr_out): Likewise.
- (bfd_elf32_swap_dyn_in): Likewise.
- (bfd_elf32_swap_dyn_out): Likewise.
- (bfd_elf32_slurp_symbol_table): Declare.
- (bfd_elf32_write_shdrs_and_ehdr): Declare.
- (bfd_elf32_write_out_phdrs): Declare.
- (bfd_elf64_swap_symbol_in): Change second parameter to be const.
- (bfd_elf64_swap_symbol_out): Likewise.
- (bfd_elf64_swap_reloc_in): Likewise.
- (bfd_elf64_swap_reloc_out): Likewise.
- (bfd_elf64_swap_reloca_in): Likewise.
- (bfd_elf64_swap_reloca_out): Likewise.
- (bfd_elf64_swap_phdr_in): Likewise.
- (bfd_elf64_swap_phdr_out): Likewise.
- (bfd_elf64_swap_dyn_in): Likewise.
- (bfd_elf64_swap_dyn_out): Likewise.
- (bfd_elf64_slurp_symbol_table): Declare.
- (bfd_elf64_write_shdrs_and_ehdr): Declare.
- (bfd_elf64_write_out_phdrs): Declare.
- (_bfd_mips_elf_section_from_shdr): Declare.
- * elf.c (bfd_section_from_shdr): Remove assertion requiring
- SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
- section for the section, add the new one to rel_hdr2. Increment
- reloc_count rather than setting it.
- * elfcode.h (elf_slurp_symbol_table): Define name as macro.
- Remove static declaration.
- (elf_write_shdrs_and_ehdr): Define name as macro.
- (elf_write_out_phdrs): Likewise.
- (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
- (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
- (elf_swap_symbol_in): Change second parameter to be const.
- (elf_swap_symbol_out): Likewise.
- (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
- (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
- (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
- (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
- (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
- (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
- parameter to be const. Make non-static.
- (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
- Make non-static.
- (elf_slurp_symbol_table): Make non-static.
- (NAME(_bfd_elf,size_info)): Update names of renamed functions.
- * elfxx-target.h (elf_info_to_howto): Define if not defined.
- (elf_backend_size_info): Likewise.
- (elfNN_bed): Use elf_backend_size_info.
- * targets.c (bfd_elf64_bigmips_vec): Declare.
- (bfd_elf64_littlemips_vec): Declare.
- (bfd_target_vector): Add bfd_elf64_bigmips_vec and
- bfd_elf64_littlemips_vec if BFD64 is defined.
-
- * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
-
-Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
- zeroes, in alignment holes.
-
- * configure: Rebuild with autoconf 2.10.
-
- * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
- potential leading underscore in the allocated buffer.
-
-Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
- symbols into .sbss if this is a relocatable link.
-
-Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
- undefined symbols when creating a shared library.
-
-Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-sh.c: Add a bunch of new code and static const arrays to
- support aligning loads and stores on four byte memory boundaries.
- Also:
- (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
- R_SH_LABEL.
- (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
- call sh_align_loads.
- (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
- as unused.
-
-Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * cache.c (bfd_open_file): Unlink the file before opening it for
- write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
-
- * opncls.c (bfd_fdopenr): Set opened_once.
-
-Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * som.c (som_slurp_reloc_table): Clear external_relocs cache after
- freeing it.
-
- * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
- the code unconditionally.
-
-Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libcoff-in.h (struct pei_section_tdata): Define structure.
- (pei_section_data): Define macro.
- * libcoff.h: Rebuild.
- * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
- store s_paddr field in pei_section_data.
- (coff_compute_section_file_positions): Use pei_section_data rather
- than _cooked_size, and don't overwrite an existing value.
- (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
- 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
- * peicode.h (coff_bfd_copy_private_section_data): Define if
- COFF_IMAGE_WITH_PE.
- (pe_bfd_copy_private_section_data): New static function if
- COFF_IMAGE_WITH_PE.
+ * libbfd.c (bfd_getb32): Rewrite expression to get better code.
+ (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
-Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
+ * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
+ after.
- * srec.c (srec_set_arch_mach): Write as a function rather than a
- macro definition.
+Sat Sep 19 22:42:23 1998 Doug Rabson <dfr@nlsystems.com>
- * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
- no map, just check each member in turn to see whether it is
- required.
+ * elflink.h (elf_link_add_object_symbols): Ensure that the warning
+ message has a null byte terminator.
-Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Fri Sep 18 14:35:29 1998 Nick Clifton <nickc@cygnus.com>
- * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
- table. Call BFD_ASSERT to validate header size, instead of
- calling fatal.
- (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
- name.
+ * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
+ word subject to R_V850_32 relocation.
-Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Thu Sep 17 17:20:36 1998 Nick Clifton <nickc@cygnus.com>
- * ppcboot.c: New target for looking at PPCbug boot records.
+ * dwarf2.c: Add comment describing problem computing line numbers
+ for undefined symbols at link time.
- * config{ure.in,.bfd}: Add support for ppcboot target.
- * targets.c: Ditto.
- * configure: Regenerate.
+Thu Sep 17 16:03:28 1998 Richard Henderson <rth@cygnus.com>
-Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * coff-h8300.c (howto_table): Update names to match recent
- changes to include/coff/internal.h. Fix minor errors in the
- existing relocs. Add R_MOVL1 and R_MOVL2.
- (rtype2howto): Similarly.
- (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
- existing relaxing code and peform more relaxing.
- (h8300_reloc16_extra_cases): Likewise.
+Wed Sep 16 18:03:13 1998 Nick Clifton <nickc@cygnus.com>
-Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
+ * elf.c (swap_out_syms): Always treat section symbols as
+ special, even if they are attached to a common section.
- * reloc16.c (bfd_coff_reloc16_get_value): Handle common
- symbols correctly.
+Wed Sep 16 10:34:13 1998 Nick Clifton <nickc@cygnus.com>
-Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+ * 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.
- * elfcode.h (elf_object_p): Reject generic ELF target if
- e_machine matches an alternate machine code in a specific backend.
+Wed Sep 16 11:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
- * netbsd-core.c (netbsd_core_vec): Remove initializer for
- obsolete align_power_min field.
+ * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print
+ statement.
-Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
+1998-09-15 Geoff Keating <geoffk@ozemail.com.au>
- * coff-h8300.c (reloc_howto_type): Add howto entry for
- R_PCRWORD_B.
- (rtype2howto): Handle R_PCRWORD_B.
- (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
- (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
- pc-relative branch (R_PCRWORD) into an 8bit pc-relative
- branch (R_PCWORD_B).
+ * 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.
-Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Sep 15 12:40:05 1998 Catherine Moore <clm@cygnus.com>
- * aoutx.h (translate_from_native_sym_flags): Set the section for
- BSF_CONSTRUCTOR symbols.
+ * elf-bfd.h: Add argument to elf_backend_get_symbol_type.
- * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
- last_bf_index.
+Tue Sep 15 08:34:40 1998 Catherine Moore <clm@cygnus.com>
-Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
+ * 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.
- * coffcode.h (coff_write_object_contents): In comdat section lookup,
- stop looking when section is found.
+1998-09-10 Geoff Keating <geoffk@ozemail.com.au>
-Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
+ assume there is no PLT or GOT.
- * coffcode.h (STRING_SIZE_SIZE): Define.
- (styp_to_sec_flags): Handle long symbol names when looking for the
- section symbol.
- (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
- (bfd_coff_long_section_names): Define.
- (coff_write_object_contents): Handle long section names.
- (bfd_coff_std_swap_table): Initialize new field.
- * libcoff.h: Rebuild.
- * coffgen.c (make_a_section_from_file): Handle long section
- names.
- (coff_write_symbols): Handle long section names.
- * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
- * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
- * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
- * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
- * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
- * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
- * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
+Wed Sep 9 14:24:12 1998 Nick Clifton <nickc@cygnus.com>
- * bout.c (b_out_callback): Set lma of sections.
- (b_out_bfd_get_relocated_section_contents): Rename in_abfd
- parameter to output_bfd. Used input_bfd instead of output_bfd in
- several places.
+ * 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.
-Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Sep 7 13:24:03 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
- * aoutx.h (translate_from_native_sym_flags): Don't create
- SEC_CONSTRUCTOR sections.
- * ecoff.c (ecoff_set_symbol_info): Likewise.
+ * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only.
- * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
- From Don Bowman <bowman@waterloo.hp.com>.
+Sat Sep 5 20:40:18 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
- SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
-
-Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-mips.c (struct mips_elf_link_hash_entry): Add
- mips_32_relocs field.
- (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
- (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
- relocs against a global symbol which is not defined in a regular
- file.
- (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
- against a global symbol, increment mips_32_relocs.
- (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
- the symbol is not defined in a regular file, make room in the
- .rel.dyn section.
-
-Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.c (ecoff_compute_section_file_positions): Track the real
- file position and the virtual file position separately. Set
- filepos information bsaed on the real file position.
- (_bfd_ecoff_set_section_contents): Handle .lib sections like the
- Jan 23 change to coffcode.h.
-
- * som.c (som_slurp_symbol_table): Set the symbol count to the
- number of BFD symbols created.
-
-Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
- output file if linking shared objects. Loop to check all relocs,
- rather than returning false on first error.
-
-Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
- (ppc_elf_additional_program_headers): If .interp section, bump #
- of program headers by 1.
- (ppc_elf_adjust_dynamic_symbol): Flesh out support.
- (ppc_elf_size_dynamic_sections): Add support for .plt section.
- (ppc_elf_check_relocs): Print out filename in debug code. Enable
- PLT support.
- (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
- debug output.
- (ppc_elf_relocate_section): If the output section isn't defined,
- don't abort, just give an error message.
-
- * elflink.c (_bfd_elf_create_dynamic_sections): If the section
- being created is .sdata or .sdata2, don't make the symbol dynamic.
-
-Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
- members of an archive for dynamic objects with no symbols, and
- pass them directly to check_archive_element.
- (xcoff_link_check_ar_symbols): Pass dynamic objects to
- xcoff_link_check_dynamic_ar_symbols.
- (xcoff_link_check_dynamic_ar_symbols): New static function.
-
- * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
- from _bfd_nodynamic to _bfd_xcoff.
- * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
- Declare.
- (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
- (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
- (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
- * libcoff.h: Rebuild.
- * xcofflink.c (xcoff_swap_ldrel_in): New static function.
- (xcoff_get_section_contents): New static function.
- (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
- (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
- (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
- (xcoff_dynamic_reloc): New static variable.
- (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
- (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
-
-Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
- if reloc_entry->addend is not 0.
- (CALC_ADDEND): Just set the addend to reloc.r_offset.
-
-Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
- R_SPARC_GLOB_JMP.
- * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
- Add entries for R_SPARC_[56].
- (sparc_reloc_map): Add entries for R_SPARC_[56].
-
-Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Optimize linking of stabs in sections as used in ELF and COFF.
- * stabs.c: New file.
- * libbfd-in.h (_bfd_link_section_stabs): Declare.
- (_bfd_write_section_stabs): Declare.
- (_bfd_write_stab_strings): Declare.
+ * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
+ match definition of _bfd_gc_sections field.
* libbfd.h: Rebuild.
- * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
- (struct coff_link_hash_table): Add stab_info field.
- * libcoff.h: Rebuild.
- * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
- stab_info field.
- (coff_link_add_symbols): Call _bfd_link_section_stabs if
- appropriate.
- (_bfd_coff_final_link): Write out stab strings hash table.
- (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
- * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
- hash table.
- * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
- (struct bfd_elf_section_data): Add stab_info field.
- * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
- field.
- * elflink.h (elf_link_add_object_symbols): If appropriate, call
- _bfd_link_section_stabs.
- (elf_bfd_final_link): Write out stab strings hash table.
- (elf_link_input_bfd): Handle optimized stabs sections.
- * reloc.c (_bfd_final_link_relocate): Check address against
- _raw_size rather than _cooked_size.
- * Makefile.in: Rebuild dependencies.
- (BFD_LIBS): Add stabs.o
- (BFD_LIBS_CFILES): Add stabs.c.
-
- * VERSION: Increment for bfdlink.h change.
-
- * coffgen.c (coff_renumber_symbols): Correct handling of
- BSF_NOT_AT_END common symbols.
-
-Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-ppc.c (record_toc): Add cast to avoid warning.
- (ppc_allocate_toc_section): Likewise.
- (coff_ppc_relocate_section): Remove ANSI C string concatenation.
- (ppc_coff_reloc_type_lookup): Remove unreached code.
- * coffcode.h (coff_write_object_contents): Don't take the address
- of an array.
- * peicode.h (pe_print_idata): Add casts to avoid warning.
- (pe_print_edata): Likewise.
- (pe_print_reloc): Remove ANSI C string concatenation.
-Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Sep 4 13:54:23 1998 David Miller <davem@dm.cobaltmicro.com>
- * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
- and last_bf fields.
- * libcoff.h: Rebuild.
- * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
- symbols.
- (coff_swap_aux_out): Likewise.
- * peicode.h (coff_swap_aux_in): Likewise.
- (coff_swap_aux_out): Likewise.
- * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
- symbols.
- * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
- field.
- (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
- Fix up .bf endndx link fields.
- * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
- field.
- * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
- symbols.
-
-Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
- on Solaris PowerPC systems doesn't get confused.
-
- * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
- #ifdef PPC.
-
- * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
- (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
- update did_reg and did_reg2.
+ * 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.
-Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Sep 3 17:28:50 1998 Richard Henderson <rth@cygnus.com>
- * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
+ * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
+ bed has a size_dynamic_sections routine before trying to use it.
- * linker.c (_bfd_generic_link_add_one_symbol): When calling the
- callback routines, pass h->root.string rather than name, in case
- copy is true and name is transient.
+Mon Aug 31 14:49:22 1998 Richard Henderson <rth@cygnus.com>
-Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
+ * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
+ _bfd_elf_rel_vtable_reloc_fn.
- * elfcore.h: Add support for core files with multiple threads.
- (Primarily for Solaris.)
+Mon Aug 31 10:23:40 1998 Catherine Moore <clm@cygnus.com>
-Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
- section->orelocation is NULL.
+Fri Aug 28 19:44:07 1998 Richard Henderson <rth@cygnus.com>
- * coffgen.c (bfd_coff_get_syment): New function.
- (bfd_coff_get_auxent): New function.
- * bfd-in.h (bfd_coff_get_syment): Declare.
- (bfd_coff_get_auxent): Declare.
+ * archures.c (bfd_mach_alpha_ev[456]): New.
+ * cpu-alpha.c: Rework to match these types.
* bfd-in2.h: Rebuild.
-Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf32-mips.c (struct mips_hi16): Define.
- (mips_hi16_addr, mips_hi16_addend): Remove.
- (mips_hi16_list): New static variable.
- (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
- (mips_elf_lo16_reloc): Process mips_hi16_list.
- (mips_elf_relocate_section): Permit an arbitrary number of HI16
- relocs before the associated LO16 reloc.
+Fri Aug 28 19:38:53 1998 Richard Henderson <rth@cygnus.com>
-Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
+ * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
- * versados.c (versados_scan): Check bfd_alloc return value.
- (versados_object_p): Check all bfd_read return values. Require
- that lang field be less than 10, to avoid confusion with Intel Hex
- files.
+ * 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.
- * libaout.h (WRITE_HEADERS): Write out the relocs even if there
- aren't any symbols.
- * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
- not 0, for an absolute symbol.
- (NAME(aout,swap_ext_reloc_out)): Likewise.
+Thu Aug 20 15:03:45 1998 Nick Clifton <nickc@cygnus.com>
- * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
- (ihex_write_object_contents): For a large start address, output
- the full 32 bit address in record type 5.
+ * 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().
- * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
- to int to avoid promotion problems in prototype.
+Thu Aug 20 11:30:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf.c: comment and formatting cleanups.
+ * elfcore.h: ditto.
- * configure.host: Use ${srcdir} when looking for picfrag.
+Wed Aug 19 15:43:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
- * configure.host: Switch on ${libdir}, not $(libdir). From
- alan@spri.levels.unisa.edu.au (Alan Modra).
+ * 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.
- * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
- entry point, not just for DYNAMIC objects.
- * sunos.c (sunos_add_dynamic_symbols): Always call
- sunos_create_dynamic_sections. If called with a non DYNAMIC
- object, don't do anything else.
- (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
+ * elf32-sparc.c (elf32_sparc_final_write_processing):
+ add break statement to default case.
-Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-08-19 Vladimir N. Makarov <vmakarov@cygnus.com>
- * configure.in: Permit --enable-shared to specify a list of
- directories.
- * configure: Rebuild.
+ * 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.
- * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
- host when configuring with --enable-shard.
+Tue Aug 18 11:48:12 1998 Catherine Moore <clm@cygnus.com>
-Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
+ elf32_arm_allocate_interworking_sections and
+ elf32_arm_process_before_allocation.
- * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
- <jdp@polstra.com>.
+Tue Aug 18 11:46:00 1998 Nick Clifton <nickc@cygnus.com>
- * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
- to avoid crashing in bfd_hash_replace.
+ * bfd-in.h: Ammend prototype for
+ elf32_arm_process_before_allocation to remove surplus third
+ argument.
- * sysdep.h: Use #ifdef, not #if.
-
-Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config.in: Rebuild.
-
-Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
- (AC_CHECK_HEADERS): Check for sys/time.h
- (AC_HEADER_TIME): Add macro.
- * configure: Rebuild.
- * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
- to control what combination of <time> and <sys/time.h>
- get included.
-
-Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
- (aout_32_sunos4_write_object_contents): Likewise.
- * aoutx.h (NAME(aout,machine_type)): Handle
- bfd_mach_sparc_{sparclet,sparclite}.
- * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
- (bfd_mach_sparc_v9_p): Update.
- * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
- * libaout.h (enum machine_type): Add M_SPARCLET.
- * sunos.c (MACHTYPE_OK): Define.
- * bfd-in2.h: Regenerated.
-
-Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
- * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
- * elflink.c (_bfd_elf_create_got_section): Store the
- _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
- * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
- global offset table goes over 0x1000, set the value of
- _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
- (elf32_sparc_relocate_section): Subtract the offset of
- _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
-
- * elfcode.h: Don't include <string.h>.
-
-Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
+ * bfd-in2.h: Regenerate.
- * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
- generic_link_hash_newfunc. All references changed.
- * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
- moved here from libbfd-in.h.
- * libbfd-in.h: Corresponding changes.
- * libbfd.h: Regenerated.
+Sat Aug 15 20:55:08 1998 Richard Henderson <rth@cygnus.com>
-Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
- * aoutx.h (aout_link_input_section_std): When reporting an
- overflow error, use the name of the symbol in the hash table if
- available.
- (aout_link_input_section_ext): Likewise.
+Fri Aug 14 09:12:28 1998 Stan Cox <scox@cygnus.com>
- * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
- defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
+ * aoutx.h (aout_link_input_section_ext): Use the relocation already
+ calculated for RELOC_SPARC_REV32 case.
-Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
+Thu Aug 13 14:02:02 1998 Catherine Moore <clm@cygnus.com>
- * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
- * coffcode.h (coff_compute_section_file_positions): Likewise.
- (coff_write_object_contents): Likewise.
+ * 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.
-Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Aug 12 19:00:39 1998 Geoff Keating <geoffk@ozemail.com.au>
- * section.c (SEC_LINK_ONCE): Define.
- (SEC_LINK_DUPLICATES): Define.
- (SEC_LINK_DUPLICATES_DISCARD): Define.
- (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
- (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
- (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
- * bfd-in2.h: Rebuild.
- * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
- SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
- (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
- into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
- SEC_LINK_ONCE, and look through the symbol table for the setting
- for SEC_LINK_DUPLICATES.
- (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
- set for a section, find the section symbol in the symbol table,
- and set the aux entry based on SEC_LINK_DUPLICATES.
- * coffgen.c (coff_print_symbol): Add a space before "checksum".
- * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
- SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
- * coff-i386.c (i386coff_vec): Likewise.
- * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
-
- * VERSION: Bump to 2.6.1.
- * Makefile.in (stamp-h): Depend upon VERSION.
-
-Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
-
- * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
- * libbfd.h: Rebuilt.
- * linker.c (generic_link_hash_newfunc): No longer static.
- * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
- to override.
- * coff-h8300.c: Add two derived hash tables and their associated
- funtions and #defines for use by the h8300 linker.
- (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
- the function vector as needed. Place the address of the function
- vector entry in the location specified by the R_MEM_INDIRECT reloc.
- Rewrite the vectors section contents as necessary.
- (h8300_bfd_link_add_symbols): New function for the h8300 linker.
- (coff_bfd_link_add_symbols): Define to use h8300 specific version.
- (coff_bfd_link_hash_table_create): Likewise.
-
-Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libhppa.h: If gcc 2.7 or higher, declare all the functions with
- __attribute__ ((__unused__)) so that -Wall doesn't warn about
- them.
- (hppa_rebuild_insn): Pass pointer to correct type to
- low_sign_unext and dis_assemble_21.
-
-Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
- Stick with sparc-*-{sysv4*,solaris2*}.
-
-Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
- (coff_swap_aux_out): Swap out extra PE x_scn fields.
- * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
- * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
- fields is non-zero, print them.
-
- * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
- ifdef. Remove unused variables.
- (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
- variables.
- (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
- (get_symbol_value): Ifdef out.
- (pe_ppc_reloc): Ifdef out. Remove unused variables.
- (coff_ppc_relocate_section): Remove unused variables. Make
- fprintf strings and argument types correspond. Put before_addr in
- DEBUG_RELOC ifdef.
- (dump_toc): Make fprintf strings and argument types correspond.
- (ppc_process_before_allocation): Remove unused variables. Always
- return a value.
- (ppc_reflo_reloc): Ifdef out.
- (ppc_addr32nb_reloc): Ifdef out.
- (ppc_coff_rtype2howto): Make fprintf strings and argument types
- correspond.
- (coff_ppc_rtype_to_howto): Likewise.
- (ppc_coff_swap_sym_in_hook): Remove unused variables.
-
- * peicode.h (pe_print_idata): Move otherwise unused variables into
- the #ifdef where they are used. Always return a value.
- (pe_print_edata): Make fprintf strings and argument types
- correspond. Always return a value.
- (pe_print_pdata): Removed unused variable addr_value. Always
- return a value.
- (pe_print_reloc): Remove unused variable onaline. Make fprintf
- strings and argument types correspond. Always return a value.
-
- * elf32-ppc.c (ppc_elf_fake_sections): Return true.
- (ppc_elf_finish_dynamic_symbol): Move definition of unused
- variable rela inside #if 0 section where it is used.
-
- * ns32k.h: New file.
- * cpu-ns32k.h: Include ns32k.h. Rename externally visible
- functions to start with _bfd_.
- * aout-ns32k.c: Include ns32k.h. Change references to renamed
- functions in cpu-ns32k.h.
- * Makefile.in: Rebuild dependencies.
- (HFILES): Add ns32k.h.
-
- * section.c (struct sec): Add linker_mark field. Change
- user_set_vma and reloc_done to be single bit fields.
- (STD_SECTION): Update accordingly.
- * bfd-in2.h: Rebuild.
- * aoutx.h (NAME(aout,final_link)): Mark sections included in the
- link.
- (aout_link_input_bfd): Don't link unmarked sections.
- * cofflink.c (_bfd_coff_final_link): Mark sections included in the
- link.
- (_bfd_coff_link_input_bfd): Don't link unmarked sections.
- * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
- the link.
- * elflink.h (elf_bfd_final_link): Mark sections included in the
- link.
- (elf_link_input_bfd): Don't link unmarked sections.
- * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
- in the link.
- (xcoff_link_input_bfd): Don't link unmarked sections.
+ * 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.
- * coffswap.h (coff_swap_scnhdr_out): Include section name in
- overflow error messages.
+Wed Aug 12 14:48:33 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
+ * libaout.h: Remove nested comment to avoid warning.
- * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
- is not set, print "BFD: " before the error message.
+Wed Aug 12 08:10:11 1998 Catherine Moore <clm@cygnus.com>
- * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
- Miles Bader <miles@gnu.ai.mit.edu>.
- * configure: Rebuild.
+ * elf32-arm.c (elf32_arm_final_link_relocate): Rework
+ R_ARM_PC24 relocation.
-Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Aug 11 14:42:26 1998 Catherine Moore <clm@cygnus.com>
- * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
- symbols.
+ * 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.
- * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
- m68k-aout, m68k-coff, and m68k-elf targets.
+Mon Aug 10 20:38:39 1998 Richard Henderson <rth@cygnus.com>
-Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
+ * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
+ to not count too few relocs for dynamicly linked executables.
- * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
- (ieee_generic_stat_arch_elt): Restructured to prevent
- ieee_object_p from being called repeatedly.
+Mon Aug 10 15:35:34 1998 Richard Henderson <rth@cygnus.com>
-Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
+ * 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.
- * coffcode.h (coff_write_object_contents): Allocate
- buffers large enough for any FILEHDR or AOUTHDR.
+Mon Aug 10 15:31:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
+ * elflink.h (elf_gc_common_finalize_got_offsets): For backends
+ that use a .got.plt section start the got offset at zero.
- * ecofflink.c (lookup_line): New static function, renamed and
- slighly changed from old _bfd_ecoff_locate_line.
- (_bfd_ecoff_locate_line): Cache line number information. Use
- lookup_line for actual lookup.
+Mon Aug 10 17:31:21 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * ieee.c (ieee_write_processor): Correct the processor ID written
+ out for bfd_arch_m68k, accommodating change of March 25.
- * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
- multiple of 20 bytes.
+Sun Aug 9 20:55:44 1998 Catherine Moore <clm@cygnus.com>
-Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-arm.c (elf32_arm_final_link_relocate): Rework
+ R_ARM_THM_RPC22 relocations.
- * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
- allocate ecoff_find_line, and don't initialize by hand.
- * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
- mips_elf_find_line, and don't call memset.
+Sat Aug 8 15:15:30 1998 Richard Henderson <rth@cygnus.com>
- * coffcode.h (coff_compute_section_file_positions): If not
- producing a final executable, don't consider sofar when aligning
- the section to the correct size.
+ * 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 Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Aug 5 15:48:08 1998 Nick Clifton <nickc@cygnus.com>
- * coffcode.h (coff_add_missing_symbols): Ifdef out.
- (coff_write_object_contents): Don't call coff_add_missing_symbols.
- * coffgen.c (coff_section_symbol): Ifdef out.
+ * 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 Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Aug 3 17:10:15 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
- output_bfd is not NULL.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
+ a local symbol.
+ (elf32_sparc_relocate_section): Likewise.
-Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
+Sun Aug 2 03:19:23 1998 Richard Henderson <rth@cygnus.com>
- * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
- of bfd_alloc (fixes fix_line not being initialized).
- Delete zeroing of fix_{value,tag,end,scnlen} fields.
+ * 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.
-Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
+1998-08-01 Ulrich Drepper <drepper@cygnus.com>
- * coffcode.h: Allow specific backends to override the
- bfd_link_add_symbols routine.
+ * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
+ ".liblist" string through gettext.
- * coff-h8300.c: Include genlink.h.
- (howto_table): Add R_MEM_INDIRECT.
- (rtype2howto): Support R_MEM_INDIRECT.
- (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
- for now.
+Fri Jul 31 16:38:14 1998 Catherine Moore <clm@cygnus.com>
-Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
+ * 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.
- * coff-alpha.c (alpha_relocate_section): Use
- info->callbacks_warning, rather than _bfd_error_handler, for
- "multiple gp" warning.
+Tue Jun 28 19:05:28 1998 Stan Cox <scox@cygnus.com>
-Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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
- * linker.c (bfd_wrapped_link_hash_lookup): New function.
- (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
- table string. Use bfd_wrapped_link_hash_lookup.
- (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
- table string.
- * aoutx.h (aout_link_write_symbols): Use the name from the hash
- table, if any, when writing out symbols.
- (aout_link_input_section_std): Use the name from the hash table,
- if any, when reporting undefined symbols.
- (aout_link_input_section_ext): Likewise.
- (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
- * bout.c (get_value): Likewise.
- * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
- * ecoff.c (ecoff_reloc_link_order): Likewise.
- * elflink.h (elf_link_add_object_symbols): Likewise.
- (elf_reloc_link_order): Likewise.
- * linker.c (_bfd_generic_link_output_symbols): Likewise.
- (_bfd_generic_reloc_link_order): Likewise.
- (default_indirect_link_order): Likewise.
- * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
- * sunos.c (sunos_add_one_symbol): Likewise.
- * xcofflink.c (xcoff_link_add_symbols): Likewise.
- (bfd_xcoff_link_count_reloc): Likewise.
- (xcoff_reloc_link_order): Likewise.
+Fri Jul 24 13:54:19 1998 Nick Clifton <nickc@cygnus.com>
- * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
- into -1 for intern->rss.
+ * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
+ actually mapping the output sections.
- * configure: Rebuild with autoconf 2.8.
+Fri Jul 24 11:24:29 1998 Jeffrey A Law (law@cygnus.com)
-Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
- * stab-syms.c (__define_stab_duplicate): Define.
- (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
- switch.
- * bfd-in.h (bfd_get_stab_name): Declare.
- * bfd-in2.h: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD_LIBS): Add stab-syms.o.
- (BFD_LIBS_CFILES): Add stab-syms.c.
- (BFD32_BACKENDS): Remove stab-syms.o.
- (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
- * configure.in: Don't list stab-syms.o in bfd_backends.
- * configure: Rebuild.
- * libaout.h (aout_stab_name): Don't declare.
- * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
- not aout_stab_name.
+ * 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 Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jul 24 12:36:04 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf.c (assign_file_positions_for_segments): Adjust file offset
- for section alignment even if SEC_LOAD is not set.
+ * 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.
-Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-07-24 Ulrich Drepper <drepper@cygnus.com>
- * configure.in: Don't set SHLIB or SHLINK to an empty string,
- since they appear as targets in Makefile.in.
- * configure: Rebuild.
+ * elf64-mips.c: Remove reloc_type definition completely. It's now
+ in elf/mips.h.
- * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
- don't fiddle with a symbol which is not defined anywhere.
+Thu Jul 23 13:33:19 1998 Doug Evans <devans@canuck.cygnus.com>
-Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
+ as they are defined in elf/mips.h now.
- * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
- though they are defined in a shared library.
- (xcoff_build_ldsyms): Likewise.
+Thu Jul 23 11:29:43 1998 Jeffrey A Law (law@cygnus.com)
- * coffgen.c (coff_find_nearest_line): Don't look at the line
- numbers for the section if section->lineno is NULL.
- * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
- message rather than calling BFD_ASSERT.
- * elfcode.h (write_relocs): Check return value of
- _bfd_elf_symbol_from_bfd_symbol.
+ * 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.
-Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Thu Jul 23 11:38:05 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
- for .sbss section.
+ * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
+ * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
-Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
+1998-07-22 Ulrich Drepper <drepper@cygnus.com>
- * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
- and R_HPPA_NLRSEL.
- (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
- hppa_reloc_field_selector_type_alt.
- (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
- * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
- selectors.
- (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
+ * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
-Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Jul 22 16:27:18 1998 Nick Clifton <nickc@cygnus.com>
- * elf.c (assign_file_positions_for_segments): Adjust the segment
- memory size for the alignment of a SEC_ALLOC section, not just a
- SEC_LOAD section.
+ * elf32-hppa.h: Let ELF header define the enum containing the
+ external reloc numbers.
+ * elf32-i386.h: Likewise.
-Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+1998-07-22 14:57 Ulrich Drepper <drepper@cygnus.com>
- * m68klinux.c: New file.
- * hosts/m68klinux.h: New file.
- * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
- * configure.in (m68*-*-linux*): New native host.
- (m68klinux_vec): New vector.
- * configure: Rebuild.
- * targets.c (m68klinux_vec): Declare.
- * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
- bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
- * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
- declaration from bfd_linux_size_dynamic_sections.
- (bfd_m68klinux_size_dynamic_sections): Declare.
- * bfd-in2.h: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add m68klinux.o.
- (BFD32_BACKENDS_CFILES): Add m68klinux.c.
+ * elf-m10300.c: Let ELF header now define the macros to get the enum.
+ * elf32-mips.c: Likewise.
+ * elf32-ppc.c: Likewise.
-Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
+Wed Jul 22 13:53:52 1998 Nick Clifton <nickc@cygnus.com>
- * libhppa.h (pa_arch): Add pa20.
- (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
- (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
- (hppa_field_adjust): Handle e_nsel.
- * som.c: Provide default definitions for many new relocs found only
- in hpux10 include files.
- (som_fixup_formats): Add several new relocs from hpux10.
- (som_hppa_howto_table): Add hpux10 relocs.
- (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
+ * 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.
-Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
+Wed Jul 22 16:43:24 1998 Ian Lance Taylor <ian@cygnus.com>
- * mpw-make.sed: Edit out recent shared library support, and
- rules to rebuild .h files using doc/chew.
+ * ieee.c (ieee_find_nearest_line): Change filename_ptr and
+ functionname_ptr to be const. Change line_ptr to be unsigned.
-Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
+ * 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.
- * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
- size even of sections with no contents.
+1998-07-22 13:08 Ulrich Drepper <drepper@cygnus.com>
-Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
- starting with '$' the way we skip names starting with '.'. When
- updating x_endndx, don't be fooled by an index which has been
- merged.
+Wed Jul 22 13:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
- * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
- struct/union/enum type with no elements.
+ * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
+ temporary patch over to elf64-mips.c as well.
-Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-07-21 Ulrich Drepper <drepper@cygnus.com>
- * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
+ * elf32-mips.c (reloc_type): Temporarily disable definition of
+ standard relocation since they are now defined in elf/mips.h.
- * archive.c (bfd_generic_archive_p): If the first file in the
- archive can not be recognized as an object, don't assume that this
- is the wrong format.
+Tue Jul 21 09:47:00 1998 Catherine Moore <clm@cygnus.com>
- * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
- format is not bfd_object.
- (bfd_elf_get_dt_soname): Likewise.
+ * elf-m10200.c (mn10200_elf_final_link_relocate):
+ Modify range test for case R_MN10200_8.
-Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf-m10300.c (mn10300_elf_final_link_relocate):
+ Modify range test for case R_MN10300_8.
- * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
- reloc.
+Mon Jul 20 18:50:54 1998 Richard Henderson <rth@cygnus.com>
-Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+ * 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.
- * bfd.c (tdata): Add netbsd_core_data.
- * bfd-in2.h: Regenerated.
+ * 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.
-Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sunos.c (SUNOS_CONSTRUCTOR): Define.
- (sunos_add_one_symbol): Don't let a symbol from a dynamic object
- override a constructor symbol. Set SUNOS_CONSTRUCTOR when
- appropriate.
-
- * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
- to get the symbol index, matching 14 Jul 95 change.
-
-Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
-
- * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
- Remove duplicate definition of gp.
-
-Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
- assume that we can set the GP value and then get the same value,
- since it won't be true if the output file is neither ELF nor
- ECOFF.
- * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
- _bfd_get_gp_value here.
- (mips_gprel_reloc): Don't assume we can set and get the GP value.
- * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
- mips_elf_final_gp.
- (mips_elf_lo16_reloc): Likewise.
- (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
- Don't require that the BFD be ELF.
- (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
- (mips_elf_gprel32_reloc): Likewise.
- (mips_elf_relocate_section): Don't assume we can set and get the
- GP value.
- (mips_elf_finish_dynamic_symbol): Don't bother to use
- _bfd_get_gp_value here.
-
- * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
- Don't change epdr between malloc and free. Be careful not to free
- NULL pointers. Zero out the first RPDR.
-
- * configure.host: On Linux, only pass -rpath option if $(libdir)
- is neither /lib nor /usr/lib. From Alan Modra
- <alan@mullet.Levels.UniSA.Edu.Au>.
-
- * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
- dt_name.
- (elf_dt_name): Rename from elf_dt_needed_name.
- * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
- elf_dt_needed_name.
- (bfd_elf_get_dt_soname): New function.
- * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
- elf_dt_needed_name. Save the SONAME back in elf_dt_name.
- * bfd-in.h (bfd_elf_get_dt_soname): Declare.
- * bfd-in2.h: Rebuild.
+Mon Jul 20 12:47:26 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
+ * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
+ directory name at the line number.
- * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
- _bfd_sparc_elf_reloc_type_lookup.
- (bfd_elf32_bfd_reloc_type_lookup): Update.
- * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
- (sparc64_elf_howto_table): Define.
- (sparc_reloc_map): Define.
- (sparc64_elf_reloc_type_lookup): New function.
- (sparc_elf_wdisp16_reloc): New function.
- (elf_info_to_howto): Use sparc64_elf_howto_table.
- (sparc64_elf_relocate_section): Likewise.
- (bfd_elf64_bfd_reloc_type_lookup): Update.
+ * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
+ with an unspecified type.
-Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Jul 15 11:20:01 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.host: Check for 'do not mix' from native linker before
- trying to use -rpath.
+ * sunos.c: Add undef of valid to avoid problem on SunOS.
-Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Jul 14 15:30:59 1998 Richard Henderson <rth@cygnus.com>
- * bfd.c (_bfd_get_gp_value): New function.
- (_bfd_set_gp_value): New function.
- * libbfd-in.h (_bfd_get_gp_value): Declare.
- (_bfd_set_gp_value): Declare.
- * libbfd.h: Rebuild.
- * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
- _bfd_get_gp_value and _bfd_set_gp_value rather than referring
- directly to the fields in the tdata information.
- (alpha_relocate_section): Likewise.
- * coff-mips.c (mips_adjust_reloc_in): Likewise.
- (mips_gprel_reloc): Likewise.
- (mips_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
- (mips_elf_lo16_reloc): Likewise.
- (mips_elf_final_gp): Likewise.
- (mips_elf_gprel16_reloc): Likewise.
- (mips_elf_gprel32_reloc): Likewise.
- (mips_elf_relocate_section): Likewise.
- (mips_elf_finish_dynamic_symbol): Likewise.
+ * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
- * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
+Tue Jul 14 11:22:21 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * configure.in: Call AC_PROG_CC before configure.host.
- * configure: Rebuild.
- * configure.host: Don't set information which autoconf should
- figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
+ * 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.
- * configure.host: Remove go32 and win32 host information, since it
- should no longer be needed.
+Tue Jul 14 11:18:14 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf.c (map_sections_to_segments): If we have a .dynamic section,
- then start a new segment rather than put a writable section in a
- readonly segment.
+ * elflink.h (elf_gc_sections): Return true rather than falling off
+ the bottom.
- * configure.host: Set RPATH_ENVVAR.
+ * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
+ xmalloc.
- * Makefile.in: Rebuild dependencies.
+Mon Jul 13 11:06:31 1998 Nick Clifton <nickc@cygnus.com>
- * elflink.c (_bfd_elf_create_linker_section): Remove unused
- zero_section variable.
+ * 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.
-Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
+Mon Jul 13 13:06:54 1998 Ian Lance Taylor <ian@cygnus.com>
- * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
- ($(srcdir)/libbfd.h): Rename from libbfd.h.
- ($(srcdir)/libcoff.h): Rename from libcoff.h.
+ * ieee.c (ieee_slurp_external_symbols): Handle call optimization
+ information ATN records.
-Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
+Fri Jul 10 16:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
- * ieee.c (ieee_write_expression): Only use an R variable for a
- local symbol. Don't output a zero offset. Handle a zero address.
- (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
- (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
- PCREL_OFFSET.
- (parse_expression): Don't try to handle multiple occurrences of a
- P variable. Handle I variables differently from X variables. Fix
- the order of minus expressions.
- (ieee_slurp_external_symbols): Generate an I variable for an NN
- record. Fix handling of ATI and ATX records.
- (ieee_slurp_sections): Only set minimal section attributes.
- Adjust them later, based on the section contents.
- (ieee_object_p): Read in the file until just after the ME record.
- Call ieee_slurp_section_data to set the section flags.
- (do_one): Add iterations parameter. Only repeat the first load
- item. Set the section and file reloc flags.
- (ieee_slurp_section_data): Set section flags. Pass iterations to
- do_one.
- (ieee_canonicalize_reloc): Handle I variables.
- (do_with_relocs): Only emit relocation size when necessary.
- Increase MAXRUN to 127. Change ov to be assigned, and take
- src_mask and pcrel_offset into account.
- (ieee_write_data_part): Skip sections that are not loaded.
- (ieee_write_external_part): Don't output optional last entry of WX
- records.
- (ieee_write_me_part): Make setting of me_record neater.
- (ieee_generic_stat_arch_elt): Get the size of an archive element.
-
- * syms.c (stt): Add entries for zerovars, vars, and code.
-
- * elfcode.h (validate_reloc): New static function.
- (write_relocs): Call validate_reloc for non ELF relocs.
-
- * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
- (TARGET_BIG_SYM): Use elf_symbol_leading_char.
- (TARGET_LITTLE_SYM): Likewise.
-
- * config.bfd (m68*-*-psos*): New target.
-
-Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
-
- * i386msdos.c: Remove some #if 0 code.
- (msdos_write_object_contents): Don't include empty sections in the
- size computation, regardless of their address.
-
-Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
- is NULL, ie, the -r switch is used.
-
-Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
- (BFD_RELOC_MIPS_GOT_LO16): Define.
- (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
- * bfd-in2.h, libbfd.h: Rebuild.
- * elf32-mips.c (mips_reloc_map): Map new relocs.
-
- * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
-
- * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
- $(SHLINK).
-
- * ieee.c (get_symbol): Set the section to bfd_abs_section.
- (do_with_relocs): If EXEC_P is set and there are no relocs, use a
- simple number for the section address, rather than an expression.
- Limit the number of bytes between relocs to MAXRUN.
- (ieee_write_me_part): Set me_record to the file offset after the
- start address.
- (ieee_write_processor): New static function.
- (ieee_write_object_contents): Use ieee_write_processor.
-
-Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
-
- * coff-aux.c: Change include of aux.h to aux-coff.h.
+ * 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 <CHolland@de.lucent.com>.
-Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
- relocation put the addend both in the reloc entry and the data.
- (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
- GOT offset value.
+Wed Jul 8 11:29:56 1998 Manfred Hollstein <manfred@s-direktnet.de>
- * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
- a R_68K_PCxx reloc against a defined global symbol directly.
- (elf_m68k_check_relocs): Don't count such a reloc.
-
- * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
- a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
- symbol for now, otherwise always record the symbol as dynamic.
- (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
- is not referenced by a dynamic object, and we are not making a
- shared object, then don't make a PLT entry. If we do make a PLT
- entry, make sure the symbol has been recorded as dynamic.
-
-Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.host: When making a shared library, set HLDFLAGS to
- pass an appropriate -rpath option. Use the make variable SONAME
- as the shared library soname, rather than computing it here. On
- SunOS, build stamp-tshlink in place of $(SHLINK).
- * Makefile.in (SONAME): New variable.
- ($(SHLINK)): Make a link to the transformed name, as well.
- (stamp-tshlink): New target.
- (install): Skip stamp-tshlink during install.
-
-Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
- linker sections have been set up yet.
+ * coff-m88k.c (m88k_special_reloc): Don't lose the information
+ that a symbol is undefined.
- * elf.c (make_mapping): Add an additional argument to suppress
- making the first section include the program headers.
- (map_sections_to_segments): If the user used -Ttext such that the
- program headers are on a different page, do not set the flags
- saying that this section includes the program headers.
+Tue Jul 7 21:47:02 1998 Jeffrey A Law (law@cygnus.com)
-Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+ * som.c (som_bfd_gc_sections): Define.
- * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
- don't define TRAD_HEADER.
- * configure: Rebuild.
+Mon Jul 6 11:35:50 1998 Nick Clifton <nickc@cygnus.com>
- * netbsd-core.c: New file, support for NetBSD core files.
- * hosts/*nbsd.h: Removed.
-
-Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
- (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
- * libbfd.h, bfd-in2.h: Regenerated.
- * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
- bfd_elf32_bfd_reloc_type_lookup.
- (reloc_type{,_names}): Deleted.
- (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
- Add sparc64 relocs.
- (sparc_reloc_map): Add sparc64 relocs.
- (sparc_elf_notsupported_reloc): New static function.
- (sparc_elf_wdisp16_reloc): New static function.
- (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
- (elf32_sparc_relocate_section): Likewise.
- (bfd_elf32_bfd_reloc_type_lookup): Define.
- * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
- (reloc_type{,_names}): Deleted.
- (elf_sparc_howto_table): Deleted.
- (sparc_reloc_map): Deleted.
- (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
- (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
+ * 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 <rjb@dcs.gla.ac.uk>
-Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
+Sat Jul 4 12:25:36 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
- *-*-hpux* host.
+ * coffcode.h (coff_write_object_contents): If we have any long
+ section names, call coff_write_symbols even if there are no
+ symbols.
- * Makefile.in (program_transform_name): New variable.
- (install): Transform library name before installing it.
+Fri Jul 3 13:11:35 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * archures.c (bfd_mach_i960_hx): Define.
+ * 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 <amylaar@cygnus.co.uk>
+
+ * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
+
+Fri Jul 3 14:35:48 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
+ floating point operations.
+
+Thu Jul 2 18:37:25 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
+ function symbols.
+
+Thu Jul 2 14:59:42 1998 Klaus Kaempf <kkaempf@rmi.de>
+
+ 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.
- * cpu-i960.c (scan_960_mach): Accept machine "hx".
- (MATRIX): Expand entries for HX.
- (arch_info_struct): Add i960:hx entry.
- * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
- * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
- (coff_set_flags): Handle bfd_mach_i960_hx.
-
- Support for building as a shared library, based on patches from
- Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
- New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
- SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
- * configure: Rebuild.
- * configure.host: If --enable-shared, adjust shared library stuff
- based on the host. If the host is SunOS, and the linker supports
- -rpath, set HLDFLAGS to use it.
- * Makefile.in (ALLLIBS): New variable.
- (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
- (COMMON_SHLIB, SHLINK): New variables.
- (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
- (STAGESTUFF): Remove variable.
- (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
- $(TARGETLIB).
- (stamp-ofiles): New target, like old ofiles target, but build
- using a temporary file and move-if-change, and touch stamp-ofiles
- when done.
- (ofiles): Just depend upon stamp-ofiles.
- (stamp-piclist, piclist): New targets.
- ($(SHLIB), $(SHLINK)): New targets.
- (targets.o, archures.o): Build twice if PICFLAG is set.
- (do_mostlyclean): Remove pic/*.o.
- (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
- stamp-piclist.
- (do_distclean): Remove pic and stamp-picdir.
- (install): Install shared libraries.
- ($(OFILES)): Depend upon stamp-picdir.
- (stamp-picdir): New target.
-
- * libcoff-in.h: Add comment reminding people that libcoff.h is a
- generated file.
- * libcoff.h: Rebuild.
+ * configure.in, Makefile.in, aclocal.m4: Rebuild.
- * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
- flavour of a section with no owner.
+Thu Jul 2 13:31:55 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
- ELF_LINK_NON_ELF flag.
- (mips_elf_create_got_section): Likewise.
+ Based on patch from Matt Semersky <matts@scd.hp.com>:
+ * linker.c (_bfd_generic_final_link): Force a trailing NULL
+ pointer on abfd->outsymbols.
+ (generic_add_output_symbol): Handle NULL sym parameter.
- * elf.c: Revert last change, since it breaks dynamic linking.
- * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
- field.
- * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
- * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
- (elfNN_bed): Don't initialize want_hdr_in_seg field.
-
-Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf.c (assign_file_positions_for_segments): If the backend does
- not want the elf header or the program headers in the address
- space, do not include them in the calculations.
-
- * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
- function to determine if we need additional program headers.
- (ppc_elf_modify_segment_map): Define as a NOP function for now.
- (ppc_elf_create_linker_section): .sdata2 is a read-only section.
-
-Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coffcode.h: Move today's libcoff.h change into coffcode.h.
-
-Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
+Wed Jul 1 17:05:53 1998 Nick Clifton <nickc@cygnus.com>
- * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
- back into one line. Some compilers (sunos 4.1.3 for example)
- won't accept args split across more than one line.
+ * elf.c (copy_private_bfd_data): Add support for changing VMA or
+ LMA of sections.
-Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
+Wed Jul 1 16:58:50 1998 Ian Lance Taylor <ian@cygnus.com>
- * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
- * configure: Regenerate.
-
-Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
- try to do arithmetic on a void *, cast it to a unsigned char * first.
+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 <rth@cygnus.com>
+
+ 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 entires.
+ 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.
-Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 26 10:48:23 1998 Jeffrey A Law (law@cygnus.com)
- * elf-bfd.h (ELF_LINK_NON_ELF): Define.
- * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
- ELF_LINK_NON_ELF.
- * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
- flag for a newly defined symbol.
- (NAME(bfd_elf,record_link_assignment)): Likewise.
- (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
- set the DEF or REF_REGULAR flags correctly.
+ * 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.
- * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
- (libbfd.h, libcoff.h): Corresponding change.
+Thu Jun 25 18:31:08 1998 Nick Clifton <nickc@cygnus.com>
- * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
- a PLT32 reloc as dynamic.
- (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
- is not referenced by a dynamic object, and we are not making a
- shared object, then don't make a PLT entry. If we do make a PLT
- entry, make sure the symbol has been recorded as dynamic.
+ * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
+ relocation.
-Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
+Wed Jun 24 17:17:57 1998 Ian Lance Taylor <ian@cygnus.com>
- * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
- * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
- (powerpcle-*-cygwin32): New.
- * peicode.h (add_data_entry): Get address from vma.
+ * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
+ link_next field, not the next field.
-Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Sun Jun 21 19:38:39 1998 Ian Lance Taylor <ian@cygnus.com>
- * elflink.c (_bfd_elf_create_linker_section): If the symbol
- attached to the section has already been created as an undefined
- symbol, treat it as if it hasn't been created yet.
+ * elf.c (map_sections_to_segments): Check the section address
+ against the phdr size both with and without a modulo of
+ maxpagesize.
-Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 19 17:08:18 1998 Ian Lance Taylor <ian@cygnus.com>
- * elflink.h (elf_bfd_final_link): Don't output initial dummy
- symbol or section symbols if stripping all symbols and this is not
- a relocateable link. Don't output the symbol string table if
- there are no symbols.
- (elf_link_flush_output_syms): Don't do anything if there are no
- symbols to flush.
+ * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
+ linker created empty input section if the output section has the
+ same name.
-Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
+ * elflink.h (elf_link_output_extsym): Print an error message if
+ _bfd_elf_section_from_bfd_section fails.
- * coff-aux.c: New file.
- * hosts/m68kaux.h: New file.
- * config.bfd (m68*-apple-aux*): New target.
- * configure.in (m68*-apple-aux*): New native host.
- (m68kaux_coff_vec): New vector.
- * configure: Rebuild.
- * targets.c (m68kaux_coff_vec): Declare.
- * coffcode.h (bfd_coff_backend_data): Add field
- _bfd_coff_link_add_one_symbol.
- (bfd_coff_link_add_one_symbol): Define.
- (compare_arelent_ptr): New static function if TARG_AUX.
- (coff_write_relocs): If TARG_AUX, sort the relocs.
- (coff_write_object_contents): Set A/UX aouthdr magic number.
- (coff_link_add_one_symbol): Define if not defined.
- (bfd_coff_std_swap_table): Initialize new field.
- * libcoff.h: Rebuild.
- * cofflink.c (coff_link_add_symbols): Call
- bfd_coff_link_add_one_symbol rather than
- _bfd_generic_link_add_one_symbol.
- * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
- * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add coff-aux.o.
- (BFD32_BACKENDS_CFILES): Add coff-aux.c.
+ * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
+ failure.
-Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+Tue Jun 16 11:55:55 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
- relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
+ * elf.c (copy_private_bfd_data): Improve handling of Solaris
+ native linker output. Avoid putting an empty section in more than
+ one segment.
-Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 12 13:30:17 1998 Tom Tromey <tromey@cygnus.com>
- * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
- $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
- (maintainer-clean): Warn about deleting special files.
- (bfd-in2.h, libbfd.h, libcoff.h): New targets.
+ * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
+ ($(PACKAGE).pot): Unconditionally depend on POTFILES.
- * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
- warning symbols correctly.
- * elf32-i386.c (elf_i386_relocate_section): Likewise.
- * 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-sparc.c (sparc64_elf_relocate_section): Likewise.
+Fri Jun 12 13:34:02 1998 Doug Evans <devans@canuck.cygnus.com>
- * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
- warnings.
+ * 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 Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
+Mon Jun 8 15:20:57 1998 Nick Clifton <nickc@cygnus.com>
- * libcoff-in.h: aligned newly exported names with bfd naming
- conventions. Removed an erroneous define of POWERPC_LE_PE.
- * libcoff.h: Rebuild.
- * cofflink.c, coff-ppc.c: the above function name changes
+ * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
+ against 'addend' be signed rather than unsigned.
-Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
+Sat Jun 6 00:31:21 1998 Nick Clifton <nickc@cygnus.com>
- From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
- * ecoff.c (struct extsym_info): Define.
- (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
- to ecoff_link_write_external.
- (ecoff_link_write_external): Accept a struct extsym_info pointer.
- Strip symbols when appropriate.
+ * elf32-m32r.c: Add prototyps for static functions.
- Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
- * syms.c (BSF_OBJECT): Define.
- (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
- * bfd-in2.h: Rebuild.
- * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
- STT_OBJECT symbol.
- * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
- is set.
-
- * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
- copying relocs into a shared object, treat a defined global symbol
- as a local symbol.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * coff-arm.c: Add prototypes for static functions.
- * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
- real defined symbol, not to a weak defined symbol.
+Fri Jun 5 17:21:51 1998 Nick Clifton <nickc@cygnus.com>
-Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
+ * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
+ LMA is used to order sections in a segment.
- * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
- and made a few static functions externs.
+ * elf32-v850.c: Add prototypes for static functions.
+ Change type of addend parameter to bfd_vma in various functions.
- * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
- POWERPC_LE_PE hack in cofflink.
+Fri Jun 5 18:09:58 1998 Ian Lance Taylor <ian@cygnus.com>
- * libcoff-in.h: promoted the following from cofflink.c to allow
- _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
- coff_debug_merge_element, struct coff_debug_merge_type,
- coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
- coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
- coff_debug_merge_hash_lookup, coff_link_section_info,
- coff_final_link_info, coff_debug_merge_hash_newfunc,
- coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
+ * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
+ complain_overflow_signed instead of complain_overflow_bitfield.
- * libcoff.h: re-gen'd
+Fri Jun 5 15:11:11 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elf.c (elf_map_symbols): Don't add section VMA to symbol value
+ when comparing against 0.
- * syms.c: Include "bfdlink.h".
- (struct stab_find_info): Define.
- (_bfd_stab_section_find_nearest_line): New function.
- * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
- * libbfd.h: Rebuild.
- * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
- * elf.c (_bfd_elf_find_nearest_line): Try calling
- _bfd_stab_section_find_nearest_line before searching the ELF
- symbol table. Find the closest STT_FUNC symbol, not the last one.
- * libcoff-in.h (coff_data_type): Add line_info field.
- * libcoff.h: Rebuild.
- * coffgen.c (coff_find_nearest_line): Try calling
- _bfd_stab_section_find_nearest_line before searching the COFF
- symbol table.
- * Makefile.in: Rebuild dependencies.
-
-Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
- 4 bytes, so we get the correct value when updating the register
- field in little endian mode.
-
-Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
- entry_section fields. Add sntoc and snentry fields.
- * libcoff.h: Rebuild.
- * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
- not toc_section and entry_section (the COFF file does not have any
- sections at this point).
- (coff_write_object_contents): Set o_snentry and o_sntoc from
- snentry and sntoc rather than entry_section and toc_section.
- * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
- snentry, not toc_section and entry_section.
- * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
- entry_section from hentry.
- (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
- set snenty.
- (xcoff_link_input_bfd): Set sntoc, not toc_section.
- (xcoff_write_global_symbol): Get toc_section from sntoc, rather
- than using toc_section directly.
-
- * archures.c: Add missing `.' in enum bfd_architecture.
- * bfd-in2.h: Rebuild.
+Wed Jun 3 17:52:49 1998 Ian Lance Taylor <ian@cygnus.com>
- * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
- Robert Lipe <robertl@arnet.com>.
+ * Makefile.am (config.status): New target.
+ * Makefile.in: Rebuild.
-Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Wed Jun 3 12:18:24 1998 Stan Cox <scox@equinox.cygnus.com>
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
- to sections we allocate. Use bfd_zalloc to allocate initialial
- sections, not bfd_alloc.
- (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
- SDA{,2}I16 relocations.
- (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
- whether to put something in .sbss or not.
- (ppc_elf_relocate_section): Add support for more relocations. Add
- in sec->output_offset where appropriate. Make error messages
- include the symbol name.
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
+ error if previous object endianness doesn't match current object.
- * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
- trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
- doesn't get redefined messages if -shared.
+Tue Jun 2 17:50:59 1998 Nick Clifton <nickc@cygnus.com>
- * elflink.h (elf_create_pointer_linker_section) Only bump RELA
- section if the rel_section field has been set up.
+ * elf32-v850.c (v850_elf_print_private_bfd_data): Call
+ _bfd_elf_print_private)bfd_data ().
-Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Tue Jun 2 15:29:35 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
- relocations.
+ * 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.
-Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
+ * elf32-mips.c (mips_elf_relocate_section): If we issue an
+ undefined symbol error, don't also issue an overflow error.
- * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
- of flags, only flags used are controlled by mach number. Bump up
- output file mach number to highest of input file mach numbers.
- (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
- (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
+Tue Jun 2 13:51:00 1998 Geoff Keating <geoffk@ozemail.com.au>
- * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
- bfd_elf64_sparc_vec support.
+ * 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.
-Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Mon Jun 1 18:23:12 1998 Yuli Barcohen <yuli.barcohen@telrad.co.il>
- * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
- the embedded bit is set on some objects and not on others. Just
- or it together.
- (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
- relocations.
+ * 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 <ctype.h>.
+ (ieee_object_p): Parse out process ID string to make it more
+ likely to be acceptable for bfd_scan_arch.
+ * bfd-in2.h: Rebuild.
-Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Jun 1 11:12:02 1998 Nick Clifton <nickc@cygnus.com>
- * coffcode.h (coff_new_section_hook): Don't try to align the
- .stabstr section.
+ * 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.
- * coffcode.h (coff_set_section_contents): Fix the handling of the
- .lib section to work even if the entire section contents are
- written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
- Robert Lipe <robertl@arnet.com>.
+Mon Jun 1 12:14:28 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
+ 0x68. Reindent. Add some comments.
- * elflink.h (elf_finish_pointer_linker_section): Don't allocate
- memory here for contents.
+Fri May 29 09:58:08 1998 Nick Clifton <nickc@cygnus.com>
- * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
- _SDA2_BASE_ by 32768.
- (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
- started using. Allocate contents for .sdata and .sdata2 sections
- also.
- (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
- rather than _name.
- (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
- size _SDA{,2}_BASE_.
- (ppc_elf_relocate_section): Change how sdata{,2} relocations are
- done.
+ * elf.c (copy_private_bfd_data): Adjust physical address of
+ segment in output BFD to contain LMAs of its sections.
-Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
+Tue May 26 19:37:47 1998 Stan Cox <scox@equinox.cygnus.com>
- * elflink.h (elf_finish_pointer_linker_section): Fix typo.
+ * 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.
- * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
- (bfd_mach_sparc_{v8plus,v8plusa}): Define.
- (bfd_mach_sparc_v9a): Define.
- (bfd_mach_sparc_v9_p): Define.
- * bfd-in2.h: Regenerated.
- * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
- bfd_mach_sparc_v9.
- * elf64-sparc.c (sparc64_elf_object_p): Likewise.
- * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
- to bfd_elf32_sparc_vec.
- * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
- Add v8plus{,a} support.
- Add v9a support.
- (sparc_compatible): New function.
- * elf32-sparc.h: #include "elf/sparc.h".
- (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
- elf32_sparc_final_write_processing): New functions.
- (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
- elf_backend_final_write_processing): Define.
-
-Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf-bfd.h (struct elf_link_hash_entry): Add
- linker_section_pointer field.
- (enum elf_linker_section_enum): Enumeration for new way of
- creating linker dynamic sections and symbols.
- (elf_linker_section{,_pointers}): New structures for creating
- dynamic sections and symbols.
- (elf_obj_tdata): Add linker_section_pointers and linker_section
- fields.
- (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
- (_bfd_elf_create_linker_section): New declarations.
- (_bfd_elf_find_pointer_linker_section): Ditto.
- (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
- (_bfd_elf_make_linker_section_rela): Ditto.
-
- * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
-
- * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
- (ppc_elf_create_linker_section): New function to create the
- sections .got, .sdata, and .sdata2.
- (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
- needed.
- (ppc_elf_check_relocs): Support more of the eabi relocations.
- (ppc_elf_relocate_section): Ditto.
- (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
- if the .sdata{,2} + .sbss{,2} section size is > 32k.
-
- * elflink.h (elf_create_pointer_linker_section): New function to
- create initialized pointers in dynamic linker sections.
- (elf_finish_pointer_linker_section): Actually intialize the
- pointers created above.
-
- * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
- macros to provide both 32 and 64 bit versions of
- elf_create_pointer_linker_section.
- (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
- provide both 32 and 64 bit versions of
- elf_finish_pointer_linker_section.
-
- * elflink.c (_bfd_elf_create_linker_section): New function to
- create a linker section.
- (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
- given address in the linker pointer offsets created for a given
- symbol.
- (_bfd_elf_make_linker_section_rela): Make a RELA section
- corresponding to the generated linker section.
+Thu May 21 16:59:28 1998 Nick Clifton <nickc@cygnus.com>
-Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
+ * peicode.h (add_data_entry): Fix precedence of operators in if ()
+ statement.
- * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
+Tue May 19 18:41:19 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
+ * bfd-in.h: Move over patch to bfd-in2.h.
- * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
- (coff_ppc_relocate_section): Handle special values for gcc built dlls.
- (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
- Also begin the toc at 4 as an eye catcher ('31313131' marks the first
- toc entry in an objdump) for now.
- (ppc_do_last, ppc_get_last): New function - needed to save processing
- the toc owner to the end.
- (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
- toc owner last.
+ * reloc.c (bfd_check_overflow): Add casts before shifts which may
+ not fit in 32 bits.
+ (_bfd_relocate_contents): Likewise.
- * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
- toc owner from being done till last. Must define POWERPC_LE_PC
- to enable it.
+Mon May 18 14:44:15 1998 Nick Clifton <nickc@cygnus.com>
- * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
+ * peicode.h (add_data_entry): If the section has no private data
+ then do not create a Data Dictionary entry for it.
- * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
- to INFO.
- (coff_swap_aouthdr_out): Removed a non-working hack for computing the
- SizeOfImage for PowerPC. Ignore the size of the .junk section.
+Mon May 18 00:09:28 1998 Richard Henderson <rth@cygnus.com>
-Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elfcore.h: Include <signal.h> before <sys/procfs.h>.
+Thu May 14 14:22:58 1998 Nick Clifton <nickc@cygnus.com>
-Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * cpu-powerpc.c (arch_info_struct): Change last entry to not point
- back to first.
- (bfd_powerpc_arch): Point at first entry in arch_info_struct.
+Sun May 10 22:33:59 1998 Jeffrey A Law (law@cygnus.com)
-Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
+ * po/Make-in (install-info): New target.
- * elf.c (assign_file_positions_for_segments): Don't increment file
- offset for a segment which contains no loadable sections.
+Thu May 7 17:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * filemode.c: Remove; not used.
- * reloc.c: Add new PowerPC relocations.
- * {bfd-in2,libbfd}.h: Regenerate.
+ If sysdep.h includes a header file, don't include it again:
+ * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
+ <errno.h>.
+ * aoutx.h: Don't include <string.h>. Use "sysdep.h" rather than
+ <sysdep.h>.
+ * archive.c: Don't include <string.h> or <errno.h>.
+ * evax-alpha.c; Don't include <stdio.h>.
+ * evax-egsd.c: Likewise.
+ * evax-etir.c: Likewise.
+ * evax-misc.c: Likewise.
+ * evax-emh.c: Likewise. Also, don't include <sys/types.h>.
+ * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
+ <errno.h>.
+ * hpux-core.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * som.c: Likewise.
+ * libbfd.c: Don't include <sys/types.h>.
+ * nlmcode.h: Don't include <string.h>.
+ * osf-core.c: Don't include <string.h> or <stdio.h>.
+ * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
+ <errno.h>, or <unistd.h>.
+ * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
- * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
- (ppc_elf_reloc_type_lookup): Lookup new relocations.
+Thu May 7 13:12:50 1998 Klaus Kaempf <kkaempf@progis.de>
-Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
+ * configure.com: If the version number can not be found in
+ configure.in, set it to "unknown" rather than "2.8.1".
- * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
- entries.
+Wed May 6 09:46:05 1998 Gavin Koch <gavin@cygnus.com>
- * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
- info->shared.
+ * 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.
- * coffgen.c (coff_find_nearest_line): Don't try to cache
- information in sections that are not owned by a BFD. From Richard
- Henderson <richard@atheist.tamu.edu>.
+Tue May 5 21:01:53 1998 Richard Henderson <rth@cygnus.com>
- * elf32-mips.c: Numerous changes to dynamic linking code, mostly
- from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
- * elflink.h (elf_link_output_extsym): Remove special check for
- _rld_new_interface.
+ * syms.c (bfd_is_local_label): Revert last change.
+ * srec.c (srec_write_symbols): Discard debugging symbols.
- * ecoffswap.h: Add prototypes for static functions.
+Tue May 5 23:36:06 1998 Ian Lance Taylor <ian@cygnus.com>
-Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * som.c: Include <ctype.h>.
+ * som.h: Don't include sysdep.h.
- * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
- (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
- references.
- (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
- to satisfy a TOC16 relocation. Rewrite unsupported relocation
- support. Begin support for R_PPC_SDA{2,}REL.
+Tue May 5 18:29:24 1998 Tom Tromey <tromey@cygnus.com>
-Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * libbfd.h: Rebuilt.
+ * libbfd-in.h: Removed gettext includes and defines.
+ * sysdep.h: Moved gettext-related includes and defines here.
- * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
- create the .got and .got.neg sections.
- (ppc_elf_size_dynamic_sections): Call it.
- (ppc_elf_check_relocs): Call it.
- (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
- (ppc_elf_check_relocs): Add error messages for relocations we
- don't yet support. Do not include R_PPC_SDAREL16 like a GOT
- relocation.
+Tue May 5 16:47:54 1998 Richard Henderson <rth@cygnus.com>
-Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * 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.
- * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
- section flags for V.4 and eabi.
+Mon May 4 16:10:33 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * elf.c (assign_file_positions_for_segments): If a segment
- contains no sections, don't mark it as readable.
+Mon May 4 10:08:18 1998 Tom Tromey <tromey@cygnus.com>
- * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
- * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
+ * libbfd.h: Rebuilt.
+ * libbfd-in.h (_): Define as dgettext.
- * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
- dynamic section, if there is one.
- * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
- (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
- (bfd_elf64_swap_dyn_in): Likewise.
- * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
- PTR.
- (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
+Mon May 4 11:02:23 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
- DT_TEXTREL entry because of .rel.plt. From Martin Pirker
- <pirker@eiunix.tuwien.ac.at>.
+ * 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.
-Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Wed Apr 29 15:35:03 1998 Ian Lance Taylor <ian@cygnus.com>
- * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
- PowerPC V.4 and eabi.
- * bfd-in2.h: Regenerate.
- * libfd.h: Regenerate.
+ * 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.
- * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
+Tue Apr 28 20:05:52 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
- section type and SHF_EXCLUDE section flag, turning them into the
- appropriate bfd section flag.
+ * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
+ * configure: Rebuild.
-Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com)
- * xcofflink.c (xcoff_link_add_symbols): Create the special
- sections if we see a DYNAMIC object, in case that is the only
- XCOFF input object we see.
+ * config.bfd: Update OSR5/Unixware patterns.
- * elf32-mips.c: Extensive changes for a start at dynamic linking
- support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+Mon Apr 27 18:02:24 1998 Richard Henderson <rth@cygnus.com>
- * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
- (struct elf_backend_data): Remove
- elf_backend_create_program_headers field. Add
- elf_backend_additional_program_headers and
- elf_backend_modify_segment_map fields.
- * elfxx-target.h (elf_backend_type_change_ok): Define if not
- defined.
- (elf_backend_additional_program_headers): Likewise.
- (elf_backend_modify_segment_map): Likewise.
- (elf_backend_create_program_headers): Don't define.
- (elfNN_bed): Change to account for field changes.
- * elf.c (assign_file_positions_for_segments): Call new
- modify_segment_map backend function. Don't call old
- create_program_headers backend function.
- (get_program_header_size): Call additional_program_headers rather
- than create_program_headers.
- * elflink.h (elf_link_add_object_symbols): Initialize
- type_change_ok from new backend field.
- (elf_link_output_extsym): Don't warn if _rld_new_interface is
- defined.
- (elf_reloc_link_order): Treat a reloc against a defined symbol as
- a reloc against the appropriate section.
-
- * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
- (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
- (elf_flags_init): Rename from elf_ppc_flags_init.
- * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
- elf_ppc_flags_init.
- (ppc_elf_copy_private_bfd_data): Likewise.
- (ppc_elf_merge_private_bfd_data): Likewise.
-
- * elf32-m68k.c (howto_table): Change src_mask to 0 for all
- relocation entries.
-
-Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
-
- * coff-alpha.c (alpha_relocate_section): During final link, allow
- output .lita section to be bigger than 64k by adjusting gp value
- on a per-input section basis.
- * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
- field.
- (struct ecoff_section_tdata): Add gp field.
+ * elf.c (assign_file_positions_for_segments): Allow for holes
+ between sections added by a link script.
-Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Apr 27 11:49:55 1998 Ian Lance Taylor <ian@cygnus.com>
- Handle Alpha ECOFF changes in OSF/1 3.2.
- * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
- field.
- * coff-alpha.c: Include "aout/ar.h".
- (alpha_ecoff_get_relocated_section_contents): Don't require an
- ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
- 3.2 doesn't generate one.
- (alpha_relocate_section): Likewise.
- (alpha_ecoff_slurp_armap): Define.
- (alpha_ecoff_slurp_extended_name_table): Define.
- (alpha_ecoff_construct_extended_name_table): Define.
- (alpha_ecoff_truncate_arname): Define.
- (alpha_ecoff_write_armap): Define.
- (alpha_ecoff_generic_stat_arch_elt): Define.
- (alpha_ecoff_update_armap_timestamp): Define.
- (ARFZMAG): Define.
- (alpha_ecoff_read_ar_hdr): New static function.
- (alpha_ecoff_get_elt_at_filepos): New static function.
- (alpha_ecoff_openr_next_archived_file): New static function.
- (alpha_ecoff_get_elt_at_index): New static function.
- (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
- (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
- _bfd_ecoff to alpha_ecoff.
- * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
- field from backend structure, rather than always calling
- _bfd_get_elt_at_filepos.
- * coff-mips.c (mips_ecoff_backend_data): Initialize
- get_elt_at_filepos field.
- * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
- from _bfd_generic_read_ar_hdr with minor changes.
- (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
- * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
- * libbfd.h: Rebuild.
+ * configure.in: Change version number to 2.9.4
+ * configure: Rebuild.
- * bfd-in.h (BFD_IN_MEMORY): Define.
- * libbfd-in.h (struct bfd_in_memory): Define.
- * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
- (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
- (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
- (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
- * bfd.c (struct _bfd): Change iostream field from char * to PTR.
- (bfd_get_size): Handle BFD_IN_MEMORY flag.
- * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
- (bfd_open_file): Cast to PTR, not char *, when setting iostream.
- (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
- * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
- iostream.
- (bfd_openstreamr): Likewise.
- * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
- BFD_IN_MEMORY is not set.
- * riscix.c (riscix_some_aout_object_p): Likewise.
- * bfd-in2.h, libbfd.h: Rebuild.
-
- * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
- (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
- (bfd_get_elt_at_index): Define.
- * archive.c (_bfd_generic_get_elt_at_index): Rename from
- bfd_get_elt_at_index. Change index parameter from int to
- symindex.
- * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
- (_bfd_noarchive_get_elt_at_index): Define.
- (_bfd_archive_bsd_get_elt_at_index): Define.
- (_bfd_archive_coff_get_elt_at_index): Define.
- * bfd-in2.h, libbfd.h: Rebuild.
- * aout-target.h (MY_get_elt_at_index): Define if not defined.
- * coff-rs6000.c (xcoff_get_elt_at_index): Define.
- * ieee.c (ieee_get_elt_at_index): Define.
- * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
- * oasys.c (oasys_get_elt_at_index): Define.
- * som.c (som_get_elt_at_index): Define.
-
- * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
- numbers to the .text section.
-
-Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_write_debug_part): Change return type to boolean.
- If there is a SEC_DEBUGGING section, get the contents of the debug
- information part from it.
- (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
- section in memory.
- (ieee_write_object_contents): Check ieee_write_debug_part return.
-
-Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
-
- * config.bfd (i[345]86-*-freebsd*): Add target.
- * configure.in (i386freebsd_vec): Add vec.
- * configure: Regenerate.
- * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
- (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
- Rebuild dependencies..
- * freebsd.h: New file.
- * i386freebsd.c: New file.
- * targets.c (i386freebsd_vec): Declare.
- (bfd_target_vector): Add i386freebsd_vec.
- * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
- * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
-
-Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.c (ieee_slurp_debug): New static function.
- (ieee_object_p): Call it.
- (ieee_slurp_section_data): Skip debugging sections.
- (ieee_get_reloc_upper_bound): Likewise.
- (ieee_get_section_contents): Likewise.
- (ieee_canonicalize_reloc): Likewise.
- (ieee_write_section_part): Likewise.
- (ieee_write_debug_part): Likewise.
- (ieee_write_data_part): Likewise.
- (init_for_output): Likewise.
-
-Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
- work.
- (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
- relocs, since ppc_elf_relocate_section handles the linker case.
- (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
- used.
- (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
- ppc_elf_relocate_section since that is now the only caller.
- (ppc_elf_relocate_section): Ditto.
-
-Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * coffcode.h (coff_write_object_contents): If we don't know the
- section of the entry point for an XCOFF executable, always set the
- entry address to -1.
-
-Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf.c (bfd_section_from_shdr): Add support for note sections.
-
-Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfd-in.h (struct _symbol_info): Add stab_type field.
+ Based on patch from H.J. Lu <hjl@gnu.org>:
+ * elf.c (bfd_elf_get_bfd_needed_list): New function.
+ * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
* bfd-in2.h: Rebuild.
- * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
-
- * elf32-ppc.c: Remove trailing newline from calls to
- _bfd_error_handler.
- (ppc_elf_merge_private_bfd_data): Only warn about endianness
- difference if target endianness is known.
-
-Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
- * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
- old style TOC16 references without using R_PPC_GOT.
- (ppc_reloc_type): Ditto.
- (ppc_elf_reloc_type_lookup): Add support for TOC16.
- (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
- (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
- (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
- (ppc_elf_check_relocs): New function for GOT/PLT support that is
- work in progress.
- (ppc_elf_adjust_dynamic_symbol): Ditto.
- (ppc_elf_adjust_dynindx): Ditto.
- (ppc_elf_size_dynamic_sections): Ditto.
- (ppc_elf_finish_dynamic_symbol): Ditto.
- (ppc_elf_finish_dynamic_sections): Ditto.
- (ELF_DYNAMIC_INTERPRETER): Define.
+Sat Apr 25 20:07:53 1998 Richard Henderson <rth@cygnus.com>
-Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
+ * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
+ Change all users.
- * elf.c (copy_private_bfd_data): When attaching sections to
- segments ignore sections that won't be allocated. Patch from
- Andreas Schwab.
+Sat Apr 25 18:29:07 1998 Richard Henderson <rth@cygnus.com>
-Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
+ * 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.
- * config.bfd: Match on m68k-cbm-* only if OS doesn't match
- anything else.
+Sat Apr 25 14:07:29 1998 Richard Henderson <rth@cygnus.com>
-Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coff-i960.c (CALC_ADDEND): Define.
- (coff_i960_relocate_section): Add the input section VMA to the
- addend for PC relative relocs.
+Fri Apr 24 09:16:00 1998 Nick Clifton <nickc@cygnus.com>
-Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
+ * elf32-v850.c (v850_elf_print_private_bfd_data): Add
+ internationalisation of printed information.
- * peicode.h (pe_print_pdata): Must test the entire entry for zero
- to correctly terminate.
+ * coff-arm.c (coff_arm_print_private_bfd_data): Add
+ internationalisation of printed information.
-Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * targets.c (enum bfd_endian): Define.
- (bfd_target): Rename byteorder_big_p to byteorder, and change it
- from boolean to enum bfd_endian. Change header_byteorder_big_p
- correspondingly.
- * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
- (bfd_header_big_endian, bfd_header_little_endian): New macros.
- * bfd-in2.h: Rebuild.
- * All targets: Change initialization of byteorder and
- header_byteorder to use enum bfd_endian values rather than
- booleans.
- * All files: Change all references to byteorder_big_p and
- header_byteorder_big_p to use new bfd_*_endian macros.
-
- * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
- s_vaddr.
- * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
- vma.
- * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
-
-Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
-
-Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
+Fri Apr 24 12:09:18 1998 Ian Lance Taylor <ian@cygnus.com>
- * ieee.c: Lots of minor cleanups. Make many functions return
- errors rather than calling abort. Also:
- (ieee_write_twobyte): Remove; change callers to call existing
- ieee_write_2bytes function.
- (ieee_write_expression): Don't output the section twice when
- outputting a local symbol. Don't emit an extraneous zero if there
- is only one term.
- (ieee_slurp_sections): Set the lma as well as the vma.
- (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
+ * 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 *.
- * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
- a recognized one or bfd_arch_unknown.
- (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
- to succeed.
- (ihex_get_symtab): Likewise.
+Thu Apr 23 08:13:04 1998 Nick Clifton <nickc@cygnus.com>
-Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
+ * peicode.h (dir_names): Add missing N_() macros to dir_names array.
- * aoutx.h: Include <ctype.h>.
- (struct aout_link_includes_table): Define.
- (struct aout_link_includes_totals): Define.
- (struct aout_link_includes_entry): Define.
- (aout_link_includes_lookup): Define macro.
- (struct aout_final_link_info): Add includes field.
- (aout_link_includes_newfunc): New static function.
- (NAME(aout,final_link)): Initialize includes hash table.
- (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
+Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
-Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
+ * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
- * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
+Wed Apr 22 17:48:48 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
+ * Makefile.am (install-data-local): Make $(includedir).
+ * Makefile.in: Rebuild.
- * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
+Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
-Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
+ * libbfd-in.h: Use `gettext' and not `dgettext' for now.
- * peicode.h (pe_print_reloc): New function to dump the .reloc section.
- (pe_print_private_bfd_data): call pe_print_reloc.
- * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
- * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
- up some debugging as well.
+Wed Apr 22 12:53:40 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
+ * Makefile.in: Rebuild.
- * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
- <rfg@monkeys.com>.
+ * bfd-in2.h: Rebuild for Nick's changes.
-Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
+Tue Apr 21 23:11:51 1998 Richard Henderson <rth@cygnus.com>
- * elflink.h (elf_link_add_object_symbols): Set section_count to 0
- when setting sections to NULL.
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
+ change wrt length == max_namelen.
-Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
+Tue Apr 21 21:19:36 1998 Tom Tromey <tromey@scribbles.cygnus.com>
- * xcofflink.c (struct xcoff_loader_info): Add export_defineds
- field.
- (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
- (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
- for all symbols.
- * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
- * bfd-in2.h: Rebuild.
+ * 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.
-Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
+Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
+ * 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.
-Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
+Tue Apr 21 10:00:12 1998 Nick Clifton <nickc@cygnus.com>
- * ihex.c (ihex_scan): Handle record types 4 and 5.
- (ihex_object_p): Permit types 4 and 5.
- (ihex_set_section_contents): Remove check for out of range
- addresses.
- (ihex_write_object_contents): Generate types 4 and 5.
+ * 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.
- * elflink.h (elf_link_output_extsym): Just ignore warning and
- indirect references to symbols which don't really exist.
+Tue Apr 21 00:11:51 1998 Richard Henderson <rth@cygnus.com>
-Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
- * peicode.h (pe_print_idata): Minor format fixes
- (pe_print_edata): New function. Under private printing, this formats
- the edata section of a PE file.
- (pe_print_private_bfd_data): Added call to pe_print_edata.
+ * 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.
-Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
- * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
- index, don't call stoi.
+ * config.bfd: Added sparc86x support.
-Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
+Fri Apr 17 22:29:04 1998 Ian Lance Taylor <ian@cygnus.com>
- * srec.c (srec_scan): Set lma as well as vma.
+ * elf32-mips.c (mips_elf_relocate_section): Do not complain about
+ an out of range pc-relative jump/call to an undefined weak symbol.
- * ihex.c: New file; support for Intel Hex format.
- * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
- (ihex_vec): Declare.
- (bfd_target_vector): Always include ihex_vec.
- * bfd.c (struct _bfd): Add ihex_data field to tdata union.
- * Makefile.in: Rebuild dependencies.
- (BFD_LIBS): Add ihex.o
- (BFD_LIBS_CFILES): Add ihex.c.
- * bfd-in2.h: Rebuild.
+Thu Apr 16 13:49:00 1998 Richard Henderson <rth@cygnus.com>
- * elf.c (assign_file_positions_for_segments): Sort the sections in
- each segment.
- (get_program_header_size): Return the right size if segment_map is
- not NULL.
- (copy_private_bfd_data): Don't bother to sort the sections.
+ * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
+ comparisons signed.
- * bfd.c (bfd_record_phdr): New function.
- * bfd-in.h (bfd_record_phdr): Declare.
- * bfd_in2.h: Rebuild.
+Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
- * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
- BFD_ASSERT.
+ * 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.
- * libbfd.c (bfd_malloc, bfd_realloc): New functions.
- (bfd_zmalloc): Return PTR, not char *. Take size_t, not
- bfd_size_type.
- * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
- (bfd_zmalloc): Change declaration.
- * libbfd.h: Rebuild.
- * Many files: Use bfd_malloc and bfd_realloc rather than malloc
- and realloc. Don't set bfd_error_no_memory if they fail.
-
-Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
-
- * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
- uses as well. Added a new howto to deal with TOCREL16 relocs that
- are TOCDEFN as well.
- (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
- to handle RVA relocs from dlltool.
- (ppc_coff_rtype2howto): TOCDEFN reloc addition.
- (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
- (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
-
- * coffcode.h (coff_set_alignment_hook): check idata$X sections
- to get the right section alignment.
-
-Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
- p_paddr if p_paddr is zero.
- (make_mapping): Set includes_filehdr and includes_phdrs for first
- PT_LOAD segment.
- (map_sections_to_segments): Set includes_phdrs for PT_PHDR
- segment.
- (assign_file_positions_for_segments): Handle includes_filehdr and
- includes_phdrs. Remove special handling of PT_PHDR and first
- PT_LOAD segments.
- (copy_private_bfd_data): Set includes_filehdr and includes_phdr
- when appropriate. Remove special handling of PT_PHDR segment.
- Use a more complex condition for when a section is included in a
- segment to handle Solaris linker oddities.
-
-Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * coff-m88k.c (howto_table): Reformatted for easier reading;
- special_function now points to new function m88k_special_reloc.
- (howto_hvrt16): Function previously used for handling HVRT16 relocs
- removed.
- (rtype2howto): Do not add reloc's r_offset to the addend, this will
- be done correctly by m88k_special_reloc.
- (reloc_processing): New function to be used by RELOC_PROCESSING.
- (RELOC_PROCESSING): Define to call reloc_processing.
-
-Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
- (pe_print_pdata): Likewise.
-
- * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
- obstack_alloc fails.
- (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
- fails.
- * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
- * Many files: don't set bfd_error_no_memory if one of the above
- routines fails.
-
- * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
- if p_paddr_valid is set.
- (copy_private_bfd_data): New static function.
- (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
-
- * elf.c (assign_file_positions_for_segments): Fix case where extra
- program headers were allocated.
-
- * elf.c (_bfd_elf_print_private_bfd_data): New function.
- * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
- * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
- _bfd_elf_print_private_bfd_data.
-
- * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
- r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
- Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
- (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
- RELOC_SECTION_LITA for ALPHA_R_IGNORE.
- (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
- RELOC_SECTION_ABS to RELOC_SECTION_NONE.
-
-Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
- * elf.c (make_mapping): New static function.
- (map_sections_to_segments): New static function.
- (elf_sort_sections): New static function.
- (assign_file_positions_for_segments): New static function.
- (map_program_segments): Remove.
- (get_program_header_size): Remove sorted_hdrs, count, and
- maxpagesize parameters. Simplify.
- (assign_file_positions_except_relocs): When generating an
- executable, use assign_file_positions_for_segments.
- (elf_sort_hdrs): Remove.
- (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
- to get_program_header_size.
-
-Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * hp300hpux.c (MY(callback)): Set lma as well as vma.
-
- * configure, config.in: Regenerate with autoconf 2.7.
-
- * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
- * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
-
-Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
- (ecoff_sec_to_styp_flags): Likewise.
- (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
- (ecoff_set_symbol_info): Handle scRConst.
- (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
- (ecoff_compute_section_file_positions): Handle .rconst section.
- (_bfd_ecoff_write_object_contents): Likewise.
- (ecoff_link_check_archive_element): Handle scRConst.
- (ecoff_link_add_externals): Likewise.
- (ecoff_link_write_external): Handle .rconst section.
- (ecoff_reloc_link_order): Likewise.
- * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
- * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
- section.
- (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
+ * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
+ bfd_elf32_powerpcle_vec.
- * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
- DEF_DYNAMIC flag is set.
+ * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
+ program segments are zero, don't set p_paddr_valid.
-Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
+Wed Apr 15 22:15:16 1998 Richard Henderson <rth@cygnus.com>
+
+ * 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 <rth@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
+ * configure: Rebuild.
- * host-aout.c: If TRAD_HEADER is defined, include it.
+Mon Apr 13 16:46:27 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * aclocal.m4 (AC_PROG_CC): Remove local definition.
- (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
- (BFD_NEED_DECLARATION): New function.
- * configure.in: Use BFD_NEED_DECLARATION.
- * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
- * configure, config.in: Rebuild with autoconf 2.6.
+Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
- * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
- special_sections before returning when called with a non XCOFF
- BFD.
+ * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
+ before any other symbols in the same section.
- * coffgen.c (coff_renumber_symbols): Sort common symbols with
- global symbols.
+Wed Apr 8 14:50:23 1998 Michael Meissner <meissner@cygnus.com>
- * coffcode.h (coff_compute_section_file_positions): Only pad the
- previous section to force file alignment when creating an
- executable.
+ * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
+ systems.
-Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
+Tue Apr 7 16:25:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
- * coffcode.h (coff_compute_section_file_positions): If
- RS6000COFF_C, set up the .debug section.
+ * 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.
- * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
- if it is not large enough to accomodate the entire TOC area with
- signed 16 bit offsets.
- (xcoff_write_global_symbol): Handle negative TOC offsets in global
- linkage code.
- (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
- TOC anchor to use the TOC value used in the output file.
+Tue Apr 7 15:44:47 1998 Gavin Romig-Koch <gavin@cygnus.com>
-Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
+ * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
- * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
- (_bfd_coff_read_string_table): Likewise.
+Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
-Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+ * archures.c (bfd_default_scan): Add m68k cases back to default
+ switch, reverting patch of March 25, since IEEE support depends
+ upon them.
- * pe-arm.c: Fix typos.
- * coff-arm.c: Likewise.
+Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
+ * Makefile.am (diststuff): New target.
+ * Makefile.in: Rebuild.
- * coff-ppc.c (list_ele): Added "cat"egory member.
- (record_toc): New category parameter (priv or pub).
- (ppc_record_toc_entry): Check to see if toc bounds exceeded.
- (ppc_process_before_allocation): Removed embrionic data-in-toc from
- the mainline. It addes extra toc cells in error.
- (ppc_coff_swap_sym_in_hook): Added some documentation.
- (dump_toc): Can now diagnose "virtual toc" chicanery.
+Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
-Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
+ * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
+ som_offset when we have an extended name table.
- * elf-bfd.h (struct elf_link_hash_table): Change type of
- dynsymcount and bucketcount fields from size_t to bfd_size_type.
+Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
-Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
+ trying to copy it.
+ * Makefile.in: Rebuild.
- * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
- pointerize C_LEAFSTAT or C_LEAFEXT entries.
+Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
- DT_INIT and DT_FINI entries if the _init or _fini symbol is
- defined or mentioned in a regular file.
+ * 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.
-Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
+Wed Apr 1 16:04:02 1998 Nick Clifton <nickc@cygnus.com>
- * coff-ppc.c (ppc_record_data_in_toc_entry): new function
- (coff_ppc_relocate_section): Handle TOCDEFN attribute
- (coff_ppc_relocate_section): Correct REL24 handling
- (ppc_process_before_allocation): Correct TOCDEFN handling
+ * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
+ value 11.
- * peicode.h (dir_names): Added name descriptions
+Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
+ * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
+ assertion.
- * VERSION: Updated to cygnus-2.6.
+Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com)
-Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
+ * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
+ absolute symbols.
- * targets.c (m68k4knetbsd_vec): Declare.
+Mon Mar 30 12:46:15 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in: Set version to 2.9.1.
+ * configure: Rebuild.
- * targets.c (bfd_target): Change type of second argument to
- _bfd_print_private_bfd_data from void * to PTR.
- * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
- using PTR rather than void *.
- * bfd-in2, libbfd.h: Rebuild.
- * peicode.h (pe_print_private_bfd_data): Change vfile from void *
- to PTR.
- * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
- _bfd_generic_bfd_print_private_bfd_data rather than casting
- bfd_true.
+ * Branched binutils 2.9.
-Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
+Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
- * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
- "DO NOT DELETE" lines or blank lines that mkdep writes on some
- systems.
- (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
- BFD64_BACKENDS_CFILES): New variables.
- (CFILES): Use them.
-
-Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
- not at the file position of the first section.
- * coffcode.h (coff_compute_section_file_positions): Avoid using
- unportable #elif.
- (coff_write_object_contents): When generating a PPC PE executable
- with no symbols, round up the file size to a COFF_PAGE_SIZE
- boundary.
- * cofflink.c (_bfd_coff_final_link): If there are no symbols,
- don't write out a string table.
-
- * elf.c (bfd_section_from_shdr): When using a different section
- header, pass the new one to _bfd_elf_make_section_from_shdr.
- (elf_fake_sections): Don't set sh_info and sh_entsize fields.
- (elf_map_symbols): Add section VMA to symbol value when comparing
- against 0.
- (_bfd_elf_compute_section_file_positions): Only build symbol table
- if there are some symbols. Set file offset of symtab and strtab
- sections.
- (assign_file_positions_except_relocs): Remove dosyms parameter.
- Change all callers. Never set file offset of symtab and strtab
- sections.
- (_bfd_elf_copy_private_section_data): New function.
- (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
- (_bfd_elf_copy_private_symbol_data): New function.
- (swap_out_syms): Check for special mapping of st_shndx created by
- copy_private_symbol_data.
- * elfxx-target.h: Use new copy routines.
- * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
- (_bfd_elf_copy_private_section_data): Declare.
+ * 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.
- * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
+Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
- * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
- C_NT_WEAK.
+ * elf.c (_bfd_elf_copy_private_section_data): Call
+ copy_private_bfd_data once we've seen the last SEC_ALLOC section.
- * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
- _bfd_dummy_target, matching the recent change to archive
- recognition.
+ * cpu-mips.c: Remove trailing comma at end of enumeration list.
-Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
+Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
- * libbfd.c (bfd_get_file_window): Use casts to avoid doing
- arithmetic on PTR types.
+ * 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.
- * aout-target.h (MY(callback)): Set the lma of the sections.
+Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
- * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
- symbol into a reloc against the section.
+ 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.
-Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
+Fri Mar 27 10:10:46 1998 Catherine Moore <clm@cygnus.com>
+
+ * 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.
- * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
- glue for the relocs: IMGLUE and IFGLUE.
- (record_toc): new function - tracks toc contents
- (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
- (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
- (ppc_coff_rtype2howto): removed invalid IMGLUE hack
- (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
- (ppc_record_toc_entry): Removed a debug define (duh)
+Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
- * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
- (pe_print_idata): New function - formats the idata section data
- (pe_print_pdata): New function - formats the pdata section data
- (pe_print_private_bfd_data): calls to above
+ * coffcode.h (coff_new_section_hook): Set the type and storage
+ class in the native symbol information allocated for a new section
+ symbol.
-Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
+Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
- * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
- * coff-rs6000.c (rs6000coff_vec): Add conditional defines
- TARGET_SYM and TARGET_NAME for vector and BFD name.
- * coff-pmac.c (pmac_xcoff_vec): Remove.
- (TARGET_SYM, TARGET_NAME): Define.
- * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
- machine to 0, not all PowerMacs are 601s.
+ * peicode.h: Chain together calls to
+ coff_bfd_copy_private_bfd_data and
+ coff_bfd_print_private_bfd_data.
-Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
+ * coff-arm.c: Add prototypes for
+ coff_arm_bfd_print_private_bfd_data and
+ coff_arm_bfd_copy_private_bfd_data.
- * elfcode.h (elf_object_p): Read in any program headers.
- * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
- based on the program headers, if any.
- (elf_fake_sections): Set sh_addr from the vma, not the lma.
- (map_program_segments): Set p_paddr of program headers based on
- the lma.
+Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
-Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
+ * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
+ build.
- * archive.c (bfd_generic_archive_p): Preserve tdata in case of
- failure.
+ * peicode.h: Call arm-coff private data functions after handling
+ pe private data.
- * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
- trying to do a relocateable link with a non-a.out object file.
+ * coff-arm.c: Turn statics into globals so that they can be shared
+ both pe and pei backends.
- * archive.c (bfd_generic_archive_p): Check the first object file
- in an archive even if target_defaulted is set. If the object file
- has the wrong xvec, reject it.
+Wed Mar 25 15:19:38 1998 Ian Lance Taylor <ian@cygnus.com>
- * aoutx.h (NAME(aout,set_section_contents)): If a section can not
- be represented, report the name via _bfd_error_handler.
- (translate_to_native_sym_flags): Likewise.
- * elf32-mips.c (mips_elf_final_link): Likewise.
- * oasys.c (oasys_write_sections): Likewise.
+ * 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 (coff_set_alignment_hook): Write RS6000COFF_C version
- which checks for STYP_OVRFLO sections.
- (coff_compute_section_file_positions): If RS6000COFF_C, handle
- reloc and lineno count overflows.
- (coff_write_object_contents): Call coff_count_linenumbers before
- coff_compute_section_file_positions. If RS6000COFF_C, handle
- reloc and lineno count overflows.
- * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
- relocs before dealing with .pad sections. Count overflow section
- headers when handling .pad sections.
-
- * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
- if RS6000COFF_C.
-
- * xcofflink.c (XCOFF_DESCRIPTOR): Define.
- (struct xcoff_link_hash_table): Add descriptor_section and
- special_sections fields.
- (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
- (xcoff_link_add_symbols): Set linkage section alignment. Create
- descriptor section. Check for magic symbol names (_text, etc.),
- and record them in special_sections if found. Set
- XCOFF_DESCRIPTOR flag for a function descriptor, and set its
- descriptor field to point back to the function code symbol.
- (xcoff_sweep): Always mark the special descriptor_section.
- (bfd_xcoff_export_symbol): Check whether the symbol might be a
- function descriptor, and mark it if it is.
- (bfd_xcoff_size_dynamic_sections): Add new special_sections
- parameter, and fill it in. Allocate space for the descriptor
- section.
- (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
- global linkage code. If an undefined function descriptor is
- exported, arrange to define it. Warn about any other undefined
- exported symbol.
- (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
- (xcoff_write_global_symbol): Create a function descriptor when
- necessary.
- * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
- * bfd-in2.h: Rebuild.
+Wed Mar 25 13:59:24 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
-
- * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
- (ppc_coff_link_hash_table): new types for hashing
- (ppc_coff_link_hash_newfunc): hash entry constructor
- (ppc_coff_link_hash_table_init): hash table initializer
- (ppc_coff_link_hash_table_create): hash table constructor
- (ppc_record_toc_entry): changed references to hash table
- (coff_ppc_relocate_section): changed references to hash table
-
- * libcoff-in.h (coff_link_hash_entry): removed toc_offset
- * libcoff.h: Rebuild
-
- * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
- (coff_link_add_symbols): removed toc_offset init
-
-Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * Makefile.in (.dep1): Make sure the file mkdep is to write exists
- first.
-
- * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
- if it is given and mmep is available.
- * acconfig.h: Undef USE_MMAP.
- * configure, config.in: Regenerated.
- * aoutx.h: If USE_MMAP is not defined, do all symbol and string
- table handling the old way.
- (aout_get_external_symbols): Don't complain if last byte of string
- table is nonzero.
- * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
- (bfd_free_window) [! USE_MMAP]: Don't define.
- (bfd_get_file_window,
- _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
-
-Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
-
- * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
- 0xffff0000.
-
-Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
- compatible with AMD generated COFF files. Try to support both AMD
- and GNU formats simultaneously.
- (coff_a29k_relocate_section): Likewise.
-
- * libbfd.c (bfd_get_file_window): Change writable parameter from
- int to boolean; update all callers. Pass MAP_SHARED if not
- writable--it's required on Solaris. Cast fprintf argument to
- avoid warning.
- * bfd-in.h (bfd_get_file_window): Update declaration.
- * bfd-in2.h: Rebuild.
- * aoutx.h: Update calls to bfd_get_file_window.
-
- * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
- Change all uses.
- (xcoff_swap_ldhdr_in): New static function.
- (xcoff_swap_ldsym_in): New static function.
- (xcoff_find_reloc): Handle the case of a single reloc correctly.
- (xcoff_link_add_symbols): If we just created a descriptor, pass it
- to _bfd_generic_link_add_one_symbol, to save a hash lookup.
- Handle XTY_ER/XMC_XO symbols correctly.
- (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
- rather than normal symbol table.
- (bfd_xcoff_import_symbol): It's not an error if the symbol is
- already defined with the same absolute value.
- (xcoff_mark): When considering called symbols, check whether the
- descriptor is from a dynamic object, rather than the symbol
- itself.
- (xcoff_build_ldsyms): Likewise.
-
- * libbfd.c (bfd_get_file_window): Change return type to boolean.
- Cast realloc and malloc return values. If malloc or realloc fail,
- set bfd_error_no_memory.
- * bfd-in.h (bfd_get_file_window): Change type to boolean.
+ * 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.
-Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
+ * 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-ppc.c (ppc_record_toc_entry): new function.
- (in_reloc_p): changed return value.
- (coff_ppc_relocate_section): much rework.
- (ppc_allocate_toc_section): new function.
- (ppc_process_before_allocation): new function.
- (ppc_coff_swap_sym_in_hook): new function.
+ * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
- * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
- (coff_link_add_symbols): initialize toc_offset.
+ * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
+ and call bfd_default_set_arch_mach to do the real work.
- * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
- (coff_swap_aouthdr_out): Added more sections to the data
- dictionary for the pe file header. Also changed linker version
- number on the ppc side.
- (dir_names): small improvements to the dictionary printing.
- (pe_mkobject_hook): save the file level flags.
+Wed Mar 25 10:41:35 1998 Richard Henderson <rth@cygnus.com>
- * libcoff-in.h (coff_link_hash_entry): added toc_offset field
- (pe_tdata): added real_flags field
- (coff_tdata): added local_toc_sym_map and access macro
+ * bout.c (BALX): Include return register g14 as part of the insn.
+ (BALX_MASK): New.
+ (calljx_callback): Use it.
- * libcoff.h (coff_link_hash_entry): added toc_offset field
- (pe_tdata): added real_flags field
- (coff_tdata): added local_toc_sym_map and access macro
+Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
- * coffcode.h (coff_set_alignment_hook): added hook for PE.
- (coff_mkobject): init for local_toc_sym_map
- (coff_write_object_contents): set the internal_a.magic to
- IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
- ppc compilers use.
+ * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
+ * libbfd.h: Rebuild.
-Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
- entries until both the line number address and the function name
- address are too large.
+ * evax-alpha.c (evax_close_and_cleanup): Remove unused local
+ variables er and er1.
- * configure.in: Call AC_CHECK_PROG to find and cache AR.
- * configure: Rebuilt.
+ * cpu-v850.c: Include <ctype.h>.
+ (scan): Case isdigit argument to unsigned char.
- * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
- is defined in the environment.
+ From Yan Meroth <YAN.MEROTH@st.com>:
+ * 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 Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
+Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
- * som.c (som_get_section_contents_in_window): Define to use
- generic version.
+ * 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 Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
+Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
- * coff-i860.c: New file, based on coff-i386.c.
- * cpu-i860.c: New file, based on cpu-i386.c.
- * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
- * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
- targets, using i860coff_vec.
- * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
- trad-core.o and hosts/i860mach3.h.
- (i860coff_vec): Use coff-i860.o and cofflink.o.
- * configure: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (ALL_MACHINES): Add cpu-i860.o.
- (BFD32_BACKENDS): Add coff-i860.o.
- (CFILES): Add cpu-i860.c and coff-i860.c.
- * targets.c (i860coff_vec): Declare.
- (bfd_target_vector): Add &i860coff_vec.
- * archures.c (bfd_i860_arch): Declare.
- (bfd_archures_list): Add &bfd_i860_arch.
- * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
- (coff_set_flags): Handle bfd_arch_i860.
- (coff_write_object_contents): Handle I860 a.out magic number.
-
-Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
- the created .tc section to 2.
- (xcoff_mark): Don't keep a .loader reloc for a call to an
- undefined symbol when creating a shared library.
- (xcoff_build_ldsyms): When creating a shared library, generate
- global linkage code for a call to an undefined symbol.
-
-Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
- BFD32_BACKENDS, BFD64_BACKENDS.
- (.dep1): Put mkdep output in a separate file.
- Rebuilt dependencies.
-
- * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
- value.
-
- Permit use of mmap when available:
-
- * configure.in: Check for mmap, madvise, mprotect.
- * config.in, configure: Regenerated.
-
- * libbfd.c (struct _bfd_window_internal): Define type.
- (bfd_init_window, bfd_free_window, bfd_get_file_window): New
- functions.
- (ok_to_map): New static variable for debugging.
- (_bfd_generic_get_section_contents_in_window): New function.
- * bfd-in.h (bfd_window_internal): Declare type.
- (bfd_window): Define type.
- (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
- * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
- Declare.
-
- * libaout.h (struct aoutdata): Add two window fields.
- (obj_aout_sym_window, obj_aout_string_window): New macros.
- * aoutx.h (some_aout_object_p): Initialize windows.
- (aout_get_external_symbols): Get symbol data and strings in
- windows instead of explicitly allocated buffers.
- (slurp_symbol_table): Free window instead of memory.
- (bfd_free_cached_info): Release windows instead of freeing storage
- directly.
- (aout_link_free_symbols): Ditto.
-
- * targets.c (bfd_target): Add new field for
- get_section_contents_in_window.
- (BFD_JUMP_TABLE_GENERIC): Updated.
- * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
- coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
- libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
- macros for get_section_contents_in_window field.
-
-Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
-
- * core.c: Renamed to corefile.c
- * makefile.dos (OBJS): Change core.o to corefile.o
- * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
-
-Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
- to o. Clobber and restore the list of new csects around the call
- to _bfd_generic_link_add_one_symbol, in case it wants to report a
- linker error and the linker wants to read the symbol table. Reset
- the line number count of a real section even if it has no relocs.
- (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
-
- * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
- is too small.
-
-Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
- an undefined symbol in a shared link.
-
- * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
- oldtype from bfd_link_order_type to bfd_link_hash_type. From
- phdm@info.ucl.ac.be (Philippe De Muyter).
-
-Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * coff-m88k.c (rtype2howto): New static function.
- (RTYPE2HOWTO): Use it rather than a macro definition.
-
- * coffcode.h (coff_write_object_contents): set internal_a.magic
- to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
-
- * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
- define TRAD_HEADER to new file hosts/delta68.h.
- m88*-motorola-sysv*, however, does use ptrace-core.o.
- * hosts/delta68.h: New file.
-
- * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
- bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
-
-Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * i386linux.c (MY(vec)): Declare before use.
-
-Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
- Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
-
- * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
- BFD is not of the right type.
- (bfd_elf_get_needed_list): Likewise.
- * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
- * sunos.c (bfd_sunos_get_needed_list): Likewise.
- * xcofflink.c (XCOFF_XVECP): Define.
- (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
- of the right type.
- (bfd_xcoff_import_symbol): Likewise.
- (bfd_xcoff_export_symbol): Likewise.
- (bfd_xcoff_link_count_reloc): Likewise.
- (bfd_xcoff_record_link_assignment): Likewise.
- (bfd_xcoff_size_dynamic_sections): Likewise.
-
- * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
- table index against the number of symbols for a base relative
- reloc.
+ * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
- * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
- static function.
- * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
- full_aouthdr flag here...
- (_bfd_xcoff_bfd_final_link): ...not here.
-
-Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
-
- * libelf.h: Rename to elf-bfd.h to avoid conflict with
- systems that have a system <libelf.h>.
- * Makefile.in: Globally replace libelf.h with elf-bfd.h.
- * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
- elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
- elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
- elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
- elfxx-target.h: Include elf-bfd.h rather than libelf.h.
- * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
-
-Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
-
- * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
- set, set BSF_WEAK in symbol. Change all callers.
- (ecoff_get_extr): Set weakext based on BSF_WEAK.
- (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
- _bfd_generic_link_add_one_symbol.
- (ecoff_indirect_link_order): Check that the section tdata relocs
- are not NULL before using them.
-
- * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
- define TRAD_HEADER as hosts/alphalinux.h.
- * configure: Rebuild.
- * hosts/alphalinux.h: New file.
- * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
- not int.
+Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
-Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
+ * coff-arm.c: Add interworking functions to pe backends.
- * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
- C_ECOMM storage classes.
+Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
- * xcofflink.c (xcoff_mark_symbol): New static function, broken out
- of xcoff_mark.
- (xcoff_mark): Call xcoff_mark_symbol.
- (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
- (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
- doing it by hand.
- (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
+ * configure.in: Use AM_DISABLE_SHARED.
+ * aclocal.m4, configure: Rebuild with libtool 1.2.
-Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
+Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
- * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
- field.
- (xcoff_find_reloc): New static function.
- (xcoff_link_add_symbols): Use it.
- (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
- (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
- relocate the value of C_DECL.
+ * 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.
- * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
+Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
-Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
+ * 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.
- * cofflink.c (_bfd_coff_generic_relocate_section): Make
- callback decide what goes in .relocs.
- * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
- * peicode.h (pe_mkobject_hook): Only copy aouthdr if
- there is one.
+Wed Mar 18 09:26:25 1998 Nick Clifton <nickc@cygnus.com>
-Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config.bfd (targ_cpu): Add thumb-pe target.
- * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
- absolute section.
+ * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
+ functions in PE build.
-Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
+Sun Mar 8 23:37:26 1998 Stan Cox <scox@equinox.cygnus.com>
- * xcofflink.c: More improvements, mostly to fix handling of
- constructors and a few other special cases.
- * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
- zero, reverting yesterday's change.
- * bfd-in.h (bfd_xcoff_link_record_set): Declare.
- (bfd_xcoff_link_count_reloc): Declare.
- (bfd_xcoff_record_link_assignment): Declare.
- * bfd-in2.h: Rebuild.
+ * config.bfd (sparclite-*-elf*): Added.
-Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
+Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
- * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
- aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
- i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
- i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
- ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
- Change PAGE_SIZE to TARGET_PAGE_SIZE.
+ * 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.
- * m68knetbsd.c: Ditto as well as add support for the m68k4k object
- format.
+1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
- * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
- segments includes the a.out header. See to that the magic number
- *always* is big-endian.
+ * elf32-i386.c (elf_i386_relocate_section): A pc-relative
+ relocation against a now-local symbol should not have a dynamic
+ relocation.
- * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
- m68k4k NetBSD configurations.
+Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in, configure: Separate i386 & mips NetBSD
- configurations from other BSD ones. Don't assume DEC is the only
- thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
- configurations. Add support for m68k4k NetBSD object format.
+ * 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
+ <jeffdb@netzone.com>.
- * libaout.h: Added M_68K4K_NETBSD magic.
+Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
- * m68k4knetbsd.c: New file.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
+ a plt entry when we can determine that we authoritatively define
+ the symbol.
- * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
+Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
- * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
- <machine/endian.h>.
+ * 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.
- * hosts/mipsnbsd.h: New file.
+Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * xcofflink.c: Numerous changes to get closer to a working XCOFF
- linker.
- * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
- toc_section, and entry_section fields.
- (struct xcoff_section_tdata): Remove ldrel_count field.
- * libcoff.h: Rebuild.
- * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
- fields.
- (coff_compute_section_file_positions): If RS6000COFF_C, generate
- full a.out header if full_aouthdr is set in xcoff_data.
- (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
- based on sections stored in xcoff_data.
- * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
- fields.
- (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
- (rs6000coff_vec): Set symbol_leading_char to '.'.
- * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
- value stored in ret rather than returning a pointer value.
+Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+ * 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.
- * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
- format for now.
+Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
+ * Makefile.am (AUTOMAKE_OPTIONS): Define.
+ * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
- * som.c (som_slurp_string_table): Allocate the strings with malloc
- since they're free'd by free_cached_info.
- (som_slurp_symbol_table): Similarly for the symbol table.
+ From H.J. Lu <hjl@gnu.org>:
+ * Makefile.am (libbfd_la_LDFLAGS): Define.
+ * Makefile.in: Rebuild.
-Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
+Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
- * Makefile.in (diststuff): Don't make headers.
+ NetBSD patches from Gordon W. Ross <gwr@mc.com>:
+ * 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.
-Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
+ NetBSD patches from Gordon W. Ross <gwr@mc.com>:
+ * 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.
- * Makefile.in: Rebuild dependencies.
+ * configure.host: Remove the old shared library build stuff. We
+ now use libtool instead.
- * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
- output_bfd is not SunOS.
- (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
- non-SunOS input files.
+Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
- * xcofflink.c: Extensive changes to support linking shared objects
- and generating a .loader section.
- * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
- (struct xcoff_section_tdata): Add lineno_count, first_symndx,
- last_symndx, and ldrel_count fields.
- * libcoff.h: Rebuild.
- * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
- * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
- is set.
- * bfd-in.h (bfd_xcoff_import_symbol): Declare.
- (bfd_xcoff_export_symbol): Declare.
- (bfd_xcoff_size_dynamic_sections): Declare.
- * bfd-in2.h: Rebuild.
+ * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
-Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
+Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
- * configure.in: Add xcofflink.o to pmac_xcoff_vec.
+ * configure.in: Take stab-syms.lo out of sparclinux_vec list.
* configure: Rebuild.
- * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
- * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
- contents.
- (pmac_xcoff_vec): Update to use new xcoff support.
- * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
- (xcoff_write_armap): Declare buf as unsigned char.
- * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
-
- * mpw-make.sed: Generalize subdir_do edit.
-
-Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
-
- * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
- correctly. Don't initialize asect->vma.
-
-Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
- something a little less than the page size.
-
-Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
-
-Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * coff-i386.c (coff_i386_reloc_type_lookup): New.
- * coffcode.h (coff_write_object_contents): If .bss is before
- .data us that as data_start.
- * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
- calc correct.
- * peicode.h (add_data_entry): Use _cooked_size of data directory.
- (coff_swap_outhdr_out): Hardwire in version number.
-
-Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * sunos.c (sunos_add_dynamic_symbols): Rename local variables
- major and minor to *_vno, since the former are also macros in
- SunOS header files. Cast result of bfd_alloc to appropriate
- type.
-
- * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
- before assigning to sec_data.
-
-Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
- now relative to the section, not absolute.
- * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
- get the file name when there is a N_SO directory name. When
- handling stabs, remember that section->vma was added to the
- offset.
-
-Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sunos.c (struct sunos_link_hash_table): Add needed field.
- (sunos_link_hash_table_create): Call bfd_release, not free.
- (sunos_link_hash_table_create): Initialize needed field.
- (sunos_add_dynamic_symbols): Record needed objects.
- (bfd_sunos_get_needed_list): New function.
- * bfd-in.h (bfd_sunos_get_needed_list): Declare.
- * bfd-in2.h: Rebuild.
-
-Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libcoff-in.h (pe_data_type.in_reloc_p): New.
-Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
+Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
+ * 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.
- * bfd-in.h (struct bfd_link_needed_list): Rename from
- bfd_elf_link_needed_list.
- * bfd-in2.h: Rebuild.
- * elf.c, elflink.h, libelf.h: Corresponding changes.
+Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
- Add start at AIX linker support; no shared libraries yet.
- * xcofflink.c: New file.
- * configure.in (rs600coff_vec): Use xcofflink.o.
+ * configure.in: Change -linux* to -linux-gnu*.
+ * config.bfd, configure.host: Likewise.
* configure: Rebuild.
- * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
- fields.
- (struct xcoff_section_tdata): Define.
- (xcoff_section_data): Define macro.
- (_bfd_xcoff_bfd_link_hash_table_create): Declare.
- (_bfd_xcoff_bfd_link_add_symbols): Declare.
- (_bfd_xcoff_bfd_final_link): Declare.
- (_bfd_ppc_xcoff_relocate_section): Declare.
- * libcoff.h: Rebuild.
- * coff-rs6000.c: Clean up a bit.
- (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
- cputype, csects, and debug_indices.
- (xcoff_copy_private_bfd_data): Copy cputype.
- (xcoff_howto_table): Rename from rs6000coff_howto_table.
- (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
- (xcoff_reloc_type_lookup): Rename from
- rs6000coff_reloc_type_lookup.
- (coff_relocate_section): Define.
- (_bfd_xcoff_sizeof_headers): Define.
- (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
- (_bfd_xcoff_bfd_relax_section): Define.
- (_bfd_xcoff_bfd_link_split_section): Define.
- (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
- coff.
- * coffcode.h (coff_compute_section_file_positions): If AIX,
- increment sofar by SMALL_AOUTSZ if not executable.
- (coff_write_object_contents): If AIX, always output an a.out
- header; if not executable, header size of SMALL_AOUTSZ.
- * hash.c (struct bfd_strtab_hash): Add xcoff field.
- (_bfd_stringtab_init): Initialize xcoff field.
- (_bfd_xcoff_stringtab_init): New function.
- (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
- (_bfd_stringtab_emit): In XCOFF mode, write out length.
- * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
- * libbfd.h: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (BFD32_BACKENDS): Add xcofflink.o.
- (CFILES): Add xcofflink.c.
-
- * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
- SEC_NO_FLAGS, for .acommon section. From Peter Schauer
- <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
-
-Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
- * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
-
-Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
- * config.in: Regenerated.
-
- * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
- (_bfd_chunksize): New variable.
- (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
- for obstack chunk size.
- * configure.in: Check for getpagesize.
- * configure: Regenerated.
-
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * trad-core.c (rawptr): Make it a local variable of
- ptrace_unix_core_file_p.
-
-Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * coff-arm.c (in_reloc_p): New.
- * coff-i386.c (in_reloc_p): New.
- * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
- (coff_write_object_contents): Only set has_reloc_section
- if PE_IMAGE.
- * cofflink.c (_bfd_coff_generic_relocate_section): Call
- in_reloc_p to decide if reloc should be emitted.
- * libcoff.h (pe_data_type.in_reloc_p): New.
- * peicode.h (pe_mkobject): Initialize in_reloc_p.
-
-Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
- (_bfd_coff_read_internal_relocs): Likewise.
- * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
- (_bfd_coff_read_internal_relocs): Likewise.
+Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
- * elflink.h (elf_link_add_object_symbols): Correct conditions
- under which type and size change warnings are issued.
+ * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
+ LO16/HI16S bug and improve comments about what is going on.
-Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
+Sat Feb 7 15:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
- * coffgen.c (coff_count_linenumbers): Don't count line numbers for
- a symbol which is not in a real section.
- (coff_write_native_symbol): Corresponding change.
+ * configure, aclocal.m4: Rebuild with new libtool.
- * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
- coff_link_hash_newfunc and make non-static.
- (_bfd_coff_link_hash_table_init): New function, broken out of
- _bfd_coff_link_hash_table_create.
- (_bfd_coff_link_hash_table_create): Use it.
- (process_embedded_commands): Make static.
- * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
- (_bfd_coff_link_hash_table_init): Declare.
- * libcoff.h: Rebuild.
+Fri Feb 6 14:48:20 1998 Nick Clifton <nickc@cygnus.com>
- * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
- field in XCOFF tdata.
- (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
- U802ROMAGIC, for clarity. Try to set arch and machine correctly
- based on cputype stored in a.out header, or in n_type of initial
- .file symbol.
- (coff_write_object_contents): Set cputype correctly in a.out
- header.
- (coff_slurp_symbol_table): Add casts to file_ptr to avoid
- warnings.
- * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
- (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
- old resv1 field.
- * libcoff-in.h (struct xcoff_tdata): Add cputype field.
- * libcoff.h: Rebuild.
+ * 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.
- * cpu-rs6000.c (rs6000_compatible): New static function.
- (bfd_rs6000_arch): Use it.
- * cpu-powerpc.c (powerpc_compatible): New static function.
- (arch_info_struct): Define various flavours of PowerPC.
- (bfd_powerpc_arch): Use powerpc_compatible. Point at
- arch_info_struct.
+Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com)
-Tue Oct 10 10:50:46 1995 Fred Fish <fnf@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.
- * Makefile.in (FLAGS_TO_PASS): Remove BISON.
+Thu Feb 5 14:21:34 1998 Michael Meissner <meissner@cygnus.com>
-Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
+ * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
+ to wrap, just return all 1's bits instead.
+ * libbfd.h: Regenerate.
- * elflink.h (elf_link_add_object_symbols): Don't warn about
- changing the size or type if the old definition was weak.
+Thu Feb 5 11:51:05 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * coffcode.h (combined_entry_type): Add fix_line field.
- (coff_slurp_line_table): Warn if we try to set the lineno field of
- a symbol twice.
- (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
- C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
- * coffgen.c (coff_mangle_symbols): Handle fix_line.
- (coff_write_symbol): Only use N_DEBUG if the symbol is in the
- absolute section.
- (coff_print_symbol): Print fix_value symbols in a useful fashion.
- * libcoff.h: Rebuild.
+ * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
+ rather than swapping out r_offset twice. From Luke Deller
+ <luked@cse.unsw.edu.au>.
- * libcoff-in.h (struct xcoff_tdata): Define.
- (xcoff_data): Define.
- * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
- * bfd-in2.h, libcoff.h: Rebuild.
- * coff-rs6000.c (xcoff_mkobject): New static function.
- (coff_mkobject): Define.
- (xcoff_copy_private_bfd_data): New static function.
- (coff_bfd_copy_private_bfd_data): Define.
- (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
- signed to bitfield.
- (rs6000coff_vec): Add DYNAMIC to object_flags.
- * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
- .loader sections specially.
- (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
- section alignment from the XCOFF tdata information.
- (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
- F_SHROBJ, and copy the extra a.out header information into the
- XCOFF tdata structure.
- (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
- F_DYNLOAD and the extra a.out header information.
- (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
- C_HIDEXT symbol with attached csect information.
- * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
- in the o_maxdata field.
- (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
- * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
- end if BSF_NOT_AT_END is set.
-
- * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
- _bfd_read_ar_hdr_fn.
- * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
- * bfd-in2.h, libbfd.h: Rebuild.
- * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
- return value.
- (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
- (bfd_slurp_bsd_armap_f2): Likewise.
- (_bfd_slurp_extended_name_table): Likewise.
-
-Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
-
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
- when the symbol table is empty.
-
- * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
- space for section symbols, since we don't output them either.
- (elf_m68k_adjust_dynindx): Removed.
-
- * ptrace-core.c (rawptr): Make it a local variable of
- ptrace_unix_core_file_p.
-
-Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
- NULL.
-
- * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
- Mac object file formats.
-
-Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * coffgen.c (coff_fix_symbol_name): Don't try to set up file
- auxent if there isn't one.
- (coff_write_symbols): If there is no file auxent, use SYMNMLEN
- rather than FILNMLEN as the maximum name length.
-
- * coffcode.h (bfd_coff_backend_data): Add new field
- _bfd_coff_print_aux.
- (bfd_coff_print_aux): New static function.
- (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
- scnlen field of an XTY_LD csect aux entry.
- (coff_print_aux): New static function.
- (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
- in coff_pointerize_aux_hook.
- (bfd_coff_std_swap_table): Initialize new field.
- * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
- * libcoff.h: Rebuild.
- * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
+Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
- * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
- if there are symbols, for native AIX ld compatibility.
+ * 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.
- * coffcode.h (bfd_coff_backend_data): Add new field
- _bfd_coff_pointerize_aux_hook.
- (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
- or I960, and as 0 otherwise.
- (bfd_coff_std_swap_table): Initialize new field.
- * libcoff.h: Rebuild.
- * coffgen.c (coff_pointerize_aux): Change parameters to take
- symbol pointer instead of type and class, and to take aux index.
- Call _bfd_coff_pointerize_aux_hook if it is defined.
- (coff_get_normalized_symtab): Always call coff_pointerize_aux.
- * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
+Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
- * coff-rs6000.c: Add full support for AIX archives. Rewrite old
- read-only/host-only support.
-
- * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
- BSF_LOCAL.
- (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
- RS6000COFF_C.
-
- * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
- BFD_JUMP_TABLE_ARCHIVE accordingly.
- * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
- (_bfd_compute_and_write_armap): Declare.
- (_bfd_generic_read_ar_hdr): Declare.
- (_bfd_read_ar_hdr): Define.
- (_bfd_noarchive_read_ar_hdr): Define.
- (_bfd_archive_bsd_read_ar_hdr): Define.
- (_bfd_archive_coff_read_ar_hdr): Define.
- * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
- _bfd_read_ar_hdr instead.
- (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
- (_bfd_compute_and_write_armap): Rename from
- compute_and_write_armap. Make non-static. Change all callers.
- * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
- than _bfd_snarf_ar_hdr.
- * aout-target.h (MY_read_ar_hdr): Define if not defined.
- * ieee.c (ieee_read_ar_hdr): Define.
- * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
- * oasys.c (oasys_read_ar_hdr): Define.
- * som.c (som_read_ar_hdr): Define.
- * bfd-in2.h, libbfd.h: Rebuild.
-
-Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * peicode.c (coff_swap_filehdr_in): If symptr is
- zero, there aren't any symbols, even if nsyms is set.
-
-Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libecoff.h (struct ecoff_backend_data): Add adjust_headers
- field.
- * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
- sections, and set styp correctly for them: .got, .hash, .dynamic,
- .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
- (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
- types.
- (ecoff_sort_hdrs): New static function.
- (ecoff_compute_section_file_positions): Return boolean, not void.
- Sort the sections by VMA before looking through them. Put the
- first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
- section on an appropriate boundary within the page.
- (ecoff_compute_reloc_file_positions): Check return value of
- ecoff_compute_section_file_positions.
- (_bfd_ecoff_set_section_contents): Likewise.
- (_bfd_ecoff_write_object_contents): Check for various Alpha
- section types when incrementing text_size and data_size. Call
- adjust_headers backend function if it exists.
- * coff-alpha.c (alpha_adjust_headers): New static function.
- (alpha_ecoff_backend_data): Initialize adjust_headers field.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
+ * 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.
- * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
+Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
+ * 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.
- * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
- of ALTERNATE_AIX_CORE_FORMAT.
- * configure.in (aix4): No longer need CORE_FLAGS.
- * configure: Updated.
+Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
-Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
+ * configure.in: Change version to 2.8.4.
+ * configure: Regenerated.
- NS32k changes from Ian Dall:
- * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
- macros.
- (aout_link_input_section_std, aout_link_input_section_ext,
- aout_link_reloc_link_order): Call them instead of _bfd_*
- versions.
- * aout-target.h (MY_exec_header_not_counted): New macro, defaults
- to zero.
- (backend_data): Use it instead of hardcoded zero.
+Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
- * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
- (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
+ 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.
- * ns32knetbsd.c: Include bfd.h.
- (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
- (MY_bfd_reloc_type_lookup): Declare function too.
- * pc532-mach.c (set_sizes): Don't declare.
- (MY_text_includes_header, MY_exec_header_not_counted): Define.
- (backend_data, MY_backend_data): Don't define.
+Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
- * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
- ns32k-*-lites* like ns32k-*-netbsd*.
+ * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
+ to lag behind LO16 reloc by a couple of instructions.
- * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
- compile on lites.
+Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
+ make to reexamine the file timestamp.
+ ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
- * coffcode.h (coff_write_object_contents): Restore setting
- f_timdat to 0, deleted on August 22.
+ * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
+ 0x100000.
-Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
+Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
- * coffcode.h (coff_bfd_copy_private_symbol_data,
- coff_bfd_copy_private_section_data,
- coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
- * peicode.h (coff_bfd_copy_private_bfd_data): New
- (pe_bfd_copy_private_bfd_data): New.
- (coff_swap_scnhdr_in): Swap bss size into the right place.
- (pe_print_private_bfd_data): Add some newlines.
+ * 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.
-Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
+ * 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.
- * som.c (setup_sections): Don't die if a space has no subspaces.
+Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
-Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config.bfd (i[3456]-*-mingw32*): New target.
+ * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
+ * aclocal.m4, configure: Rebuild.
- * elflink.h (elf_link_add_object_symbols): Don't let a weak
- dynamic symbol override a common symbol. Don't change the size or
- type if they have been set and the new symbol is not a definition.
- Warn if the size or type changes.
+Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
-Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
+ * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
+ have a bfd_object.
- * som.c (som_begin_writing): Don't write the symbol table or
- symbol strings.
- (som_finish_writing): Write them here. Place them after the
- subspace data, but before the relocs.
+Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
-Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
+ 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.
- * sunos.c (sunos_add_one_symbol): Just pass false, not
- info->shared_library, to sunos_create_dynamic_sections.
- (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
- section.
- (sunos_check_dynamic_reloc): Remove .text section assertion.
-
-Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
- * configure, configure.in: Add pmac_xcoff_vec case.
- * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
- * coff-pmac.c: New file, PowerMac XCOFF support.
- * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
- * targets.c (pmac_xcoff_vec): Declare.
-
- * mpw-config.in: Various changes to be compatible with the
- autoconf-based configury.
- * mpw-make.sed: New file, sed commands to translate Unix
- makefile into MPW syntax.
- * mpw-make.in: Remove.
- * hosts/mpw.h: Remove.
- * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
- true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
-
-Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * binary.c (binary_get_symtab): Return an empty string on error.
- * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
-
-Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
-
- * coff-ppc.c: Reformatted according to gnu conventions
- Removed irrelevant "if 0" code
-
-Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
- symbols rather than as indirect symbols.
- (MY(slurp_symbol_table)): Don't do anything special about
- secondary symbols.
-
- * coffcode.h (coff_new_section_hook): Make sure that the alignment
- of .ctors and .dtors sections is no larger than 2.
-
- * sunos.c (sunos_add_one_symbol): Don't change
- bfd_link_hash_common to bfd_link_hash_new, since it may be on the
- undef list.
- (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
- dynamic symbols when creating a shared library.
- (sunos_scan_ext_relocs): Handle relocs correctly when creating a
- shared library.
- (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
- written even if it is not defined in a regular object.
- (sunos_write_dynamic_symbol): Use plt_offset for the address of
- the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
- rather than the constant 22.
- (sunos_check_dynamic_reloc): Handle creating a shared library.
- (sunos_finish_dynamic_link): Set the first entry in the GOT to
- zero when creating a shared library.
- * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
- write it out at the start of the symbol table.
-
- * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
-
-Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * config.bfd: Add arm-*-coff.
- * configure.in, configure: Add armcoff_{little,big}_vec.
- * targets.c (armcoff_{little,big}_vec): Declare.
- (bfd_target_vector): Add armcoff_{little,big}_vec.
- * coff-arm.c (armcoff_{little,big}_vec): Always define.
-
-Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * targets.c (bfd_find_target): Remove debugging code.
-
-Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
-
- * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
- support on powerpc.
- * Makefile.in: added *-ppc files
- * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
- allow pe based .o's to be shared with other tools on ppc/NT
- * config.bfd: added powerpc[le]-[pe|winnt] config support
- * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
- * peicode.h: Added more section flags for PE on ppc
- Added coff_swap_filehdr_out to allow peicode.h to be
- used for non-image PE files on ppc.
- Check for image, or not, before copying pe_opthdr
- * targets.c: Added new bfd's
- * targets.c: Removed two inactive bfds that shouldn't have made it this
- far.
-
-Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
- explicit values to initialize all relocs. Change all users.
- (ppc_elf_brtaken_inner): New function to handle branch predicition
- relocs.
- (ppc_elf_brtaken_reloc): Ditto.
- (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
- relocs use ppc_elf_unsupported_reloc.
- (ppc_elf_merge_private_bfd_data): Keep track of whether an error
- needs to be reported.
- (ppc_elf_relocate_section): Support branch prediction relocs.
-
-Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfd.c (bfd_assert): Remove \n from string passed to
- _bfd_error_handler.
-
- * coff-i386.c: (TWO_DATA_SECS): Don't define.
- * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
- (bfd_coff_make_section_hook): Don't define.
- (coff_make_section_hook): Remove.
- (sec_to_styp_flags): Remove TWO_DATA_SECS case.
- (styp_to_sec_flags): Likewise.
- (coff_write_object_contents): Likewise.
- (bfd_coff_std_swap_table): Don't initialize make_section_hook
- field.
- * libcoff.h: Rebuild.
- * coffgen.c (make_a_section_from_file): Just call
- bfd_make_section_anyway, not bfd_make_section or
- bfd_coff_make_section_hook.
- * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
- * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
- * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
- make_section_hook field.
- * coff-mips.c (mips_ecoff_backend_data): Likewise.
+ * 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.
- * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
- pointers into value field for warning and indirect symbols; just
- leave the value field alone.
- * linker.c (generic_link_add_symbol_list): Use next symbol for
- warning and indirect symbols, rather than looking in symbol value.
- * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
- parameter. Change all callers. Remove support for indirect
- symbols; it didn't work anyhow.
- (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
- * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
- * bfd-in2.h: Rebuild.
+Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
-Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.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.
- * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
- go back to telling the tools this reloc operates on 32 bits.
+Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
-Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
+ * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
+ t2a3_b_insn.
- * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
- rather than a direct fprintf.
- * archive.c (_bfd_write_archive_contents): Likewise.
- * coffcode.h (coff_slurp_symbol_table): Likewise.
- * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
- (ppc_elf_unsupported_reloc): Likewise.
- (ppc_elf_relocate_section): Likewise.
- * i386linux.c (linux_tally_symbols): Likewise.
- (linux_finish_dynamic_link): Likewise.
- * osf-core.c (osf_core_core_file_p): Likewise.
- * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
- * som.c (som_sizeof_headers): Likewise.
- * srec.c (srec_bad_byte): Likewise.
- * bfd.c (bfd_assert): Likewise. Also change file to be const.
- * libbfd-in.h (bfd_assert): Declare first parameter const.
- * libbfd.h: Rebuild.
- * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
- bfd_reloc_overflow is enough.
- * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
- * coff-h8500.c (rtype2howto): Likewise.
- * coff-z8k.c (rtype2howto): Likewise.
- * coffcode.h (dummy_reloc16_extra_cases): Likewise.
- * elf.c (_bfd_elf_get_lineno): Likewise.
- (_bfd_elf_no_info_to_howto): Likewise.
- (_bfd_elf_no_info_to_howto_rel): Likewise.
- * hp300hpux.c (convert_sym_type): Likewise.
- (MY(swap_std_reloc_in)): Likewise.
- * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
-
- * libaout.h (struct aoutdata): Add line_buf field.
- * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
- and filename_buffer. Instead, use a malloc buffer stored in the
- new line_buf field. Remove length restrictions.
-
- * coffgen.c (string_size): Remove static variable.
- (debug_string_size, debug_string_section): Likewise.
- (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
- and debug_string_size_p parameters. Use them instead of the
- global variables. Change all callers.
- (coff_write_symbol): Likewise.
- (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
- (coff_write_symbols): Add local variables to replace removed
- global variables.
-
- * libcoff-in.h (struct coff_section_tdata): Add offset, i,
- function, and line_base fields.
- * libcoff.h: Rebuild.
- * coffgen.c (coff_find_nearest_line): Use section tdata to cache
- information, rather than using static variables.
+Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
- * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
- file. From Peter DeWolf <pld@amt.tay1.dec.com>.
+ * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
+ (i[3456]86sco3.2v5*coff): New target.
- * init.c (initialized): Remove static variable.
- (bfd_init): Don't bother setting initialized.
- (bfd_check_init): Remove.
- * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
- * libbfd.h: Rebuild.
+Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
-Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * rs6000-core.c (rs6000coff_core_p): Don't check the core file
- size for full core dumps. Copy core file header to private data.
- (rs6000coff_core_file_failing_command,
- rs6000coff_core_file_failing_signal): New functions to extract
- the file name and terminating signal from the core file.
- * coff-rs6000.c: Use them.
-
-Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Change arch info to be const, initialized at compile time.
- * archures.c: Reindent many functions. Change CONST to const.
- (bfd_arch_info_type): Make arch_name const. Remove disassemble;
- nothing set it anyhow. Make next const.
- (bfd_arch_info_list): Remove.
- (bfd_archures_list): Rename from archures_init_table. Change from
- a table of function pointers to a table of bfd_arch_info_type
- structure addresses.
- (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
- (bfd_lookup_arch): Likewise.
- (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
- const pointer.
- (bfd_default_arch_struct): Make const.
- (bfd_arch_init, bfd_arch_linkin): Remove.
- (bfd_get_arch_info): Return a const pointer.
- * init.c (bfd_init): Don't call bfd_arch_init.
- * bfd.c (struct _bfd): Make arch_info const.
- * bfd-in2.h: Rebuild.
- * libbfd.h: Rebuild.
- * configure.in: Put & before everything in $selarchs.
- * configure: Rebuild.
- * cpu-*.c: Change bfd_*_arch from a function which calls
- bfd_arch_linkin to a const structure.
- * ieee.c (ieee_object_p): Make arch const.
+ * bfd-in2.h: Rebuild with changes to chew--tab expansion.
-Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
- * reloc.c (bfd_reloc_code_type): Add relocations to support all of
- PowerPC V.4.
+ * bfd.c (bfd_get_error_handler): Add orthogonal function.
* bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
-
- * elf32-ppc.c (reloc_type): Update names to match current draft.
- (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
- relative. Update names to current V.4 draft.
- (ppc_elf_reloc_type_lookup): Add support for more relocations.
- (ppc_elf_relocate_section): Rename relocations to match draft.
-
-Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
-
- * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
- compiled with -mrelocatable-lib to be linked with either normal
- modules or -mrelocatable modules.
-
-Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * coffcode.h (coff_write_object_contents): Clear the vstamp field
- in the a.out header.
-
- * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
- a reloc against a local symbol, even if it's not a section.
-
-Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * targets.c (bfd_target): Remove unused align_power_min field.
- * bfd-in2.h: Rebuild.
- * All backends: Remove initialization of align_power_min.
-
-Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
-
-Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
- * config.bfd (mips-dec-netbsd*): New target.
- * configure.host (mips-dec-netbsd*): New host.
- * configure.in (mips-dec-netbsd*): New native.
- * configure: Rebuild.
-
-Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Make the COFF backend linker merge common types:
- * cofflink.c (struct coff_debug_merge_element): Define.
- (struct coff_debug_merge_type): Define.
- (struct coff_debug_merge_hash_entry): Define.
- (struct coff_debug_merge_hash_table): Define.
- (coff_debug_merge_hash_table_init): Define.
- (coff_debug_merge_hash_table_free): Define.
- (coff_debug_merge_hash_lookup): Define.
- (struct coff_final_link_info): Add debug_merge field.
- (coff_debug_merge_hash_newfunc): New static function.
- (_bfd_coff_final_link): Allocate and free debug_merge table.
- (coff_link_input_bfd): Merge identical enum, struct and union
- types.
-
-Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
-
- Convert i960 COFF to use COFF backend linker.
- * coff-i960.c (coff_i960_relocate): Use a coff_section_data
- structure to store the symbol being used.
- (coff_i960_start_final_link): New static function.
- (coff_i960_relocate_section): New static function.
- (coff_i960_adjust_symndx): New static function.
- (coff_start_final_link): Define.
- (coff_relocate_section): Define.
- (coff_adjust_symndx): Define.
- * coffcode.h (bfd_coff_backend_data): Add new callback function
- _bfd_coff_start_final_link.
- (bfd_coff_start_final_link): Define.
- (coff_start_final_link): Define if not defined.
- (bfd_coff_std_swap_table): Add coff_start_final_link.
- * cofflink.c (_bfd_coff_internal_syment_name): Make globally
- visible.
- (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
- function callback is not NULL.
- * libcoff-in.h (struct coff_section_tdata): Add tdata field.
- (_bfd_coff_internal_syment_name): Declare.
- * libcoff.h: Rebuild.
- * configure.in (icoff_big_vec): Add cofflink.o.
- (icoff_little_vec): Likewise.
- * configure: Rebuild.
-
-Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
-
- * Makefile.in (clean-info): Remove extraneous tab from line
- following action.
-
-Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * cofflink.c (coff_link_input_bfd): Fail if a section with no
- contents has relocs.
-
-Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * coffcode.h (coff_compute_section_file_positions): Keep the
- raw size safe.
- (coff_write_object_contents): Remember if it's a relocatable
- file.
- * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
- * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
- if relocatable file. Swap out saved raw size.
-
-Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (do_maintainer_clean): Rename from do_realclean.
- (maintainer-clean): Rename from realclean, passing
- maintainer-clean down to subdirectories, but leave realclean as a
- synonym.
-
- * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
- warning callback.
-
- * dep-in.sed: Remove config.h from generated dependencies.
-
- * sunos.c (sunos_slurp_dynamic_symtab): New static function,
- broken out of sunos_canonicalize_dynamic_symtab.
- (sunos_canonicalize_dynamic_symtab): Call new function
- sunos_slurp_dynamic_symtab.
- (sunos_add_dynamic_symbols): Add three new parameters. Return the
- dynamic symbol table to the caller.
- * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
- callback to override the symbols being read.
- * libaout.h (struct aout_backend_data): Add three new parameters
- to add_dynamic_symbols callback.
-
- Extensive minor changes to avoid various gcc warnings. Also:
- * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
- * archures.c (bfd_arch_info_type): Change mach field from long to
- unsigned long.
- (bfd_lookup_arch): Change machine parameter from long to unsigned
- long.
-
-Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
- a symbol with a non-zero plt_offset.
-
-Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * elfcode.h (align_file_position): Remove; not used.
-
- * configure.in: Only check for <sys/procfs.h> on a native system,
- and make sure it defines prstatus_t.
- * configure: Rebuild.
-
-Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
-
- * 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 (do_distclean): Remove config.h and stamp-h.
- (Makefile): Just rebuild Makefile.
- (config.h, stamp-h): New targets.
- * configure.in: Create stamp-h when rebuilding config.h.
- * configure: Rebuild.
-
-Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Call AC_CONFIG_HEADER. Substitute
- HOST_64BIT_LONG. Check that various header files exist. Check
- that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
- and/or free need to be declared. Don't make a link to sysdep.h.
- Define TRAD_HEADER for various hosts.
- * configure: Rebuild.
- * configure.host: Don't set my_host. Add definitions taken from
- host header files for various entries. Remove entries which now
- do nothing.
- * acconfig.h: New file.
- * config.h.in: New file, built by autoheader.
- * sysdep.h: New file.
- * Makefile.in (do_distclean): Don't remove sysdep.h.
- (RECONFIG): Remove.
- (LOCAL_H_DEPS): New variable.
- ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
- $(RECONFIG).
- ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
- ($(OPTIONAL_BACKENDS)): Likewise.
- (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
- looking through sysdep.h.
- * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
- (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
- (fprintf_vma, sprintf_vma): Likewise.
- (int64_type, uint64_type): Don't define.
- * bfd-in2.h: Rebuild.
- * archures.c, bfd.c, srec.c: Include <ctype.h>.
- * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
- * lynx-core.c: Include stuff from old hosts/lynx.h.
- * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
- rather than NO_FCNTL.
- * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
- rather than NATIVE_HPPAHPUX_COMPILER.
- * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
- is defined.
- * hosts/*.h: Remove all header files which merely include,
- declare, and define things. Leave header files which define
- information needed by trad-core.c.
-
- * aclocal.m4 (BFD_BINARY_FOPEN): Define.
- (BFD_CC_FOR_BUILD): Define.
- * configure.in: Use BFD_CC_FOR_BUILD.
- * configure: Rebuild.
-
-Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
- * configure: Rebuild.
-
- * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
- a global symbol.
-
-Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * config.bfd: i386pe_ve -> i386pe_vec.
-
-Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
+Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
- * configure.host: Incorporate host Makefile fragments by setting
- shell variables.
- * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
- AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
- value based on whether the code is being compiled by a cross
- compiler. Don't substitute host_makefile_frag or frags.
- * aclocal.m4: New file to define local AC_PROG_CC.
- * configure: Rebuild.
- * Makefile.in (INSTALL): Set to @INSTALL@.
- (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
- (INSTALL_DATA): Set to @INSTALL_DATA@.
- (AR): Set to @AR@.
- (CC): Define as @CC@.
- (CFLAGS): Set to @CFLAGS@.
- (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
- (@host_makefile_frag@): Remove.
- (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
- after other options.
- (config.status): Remove dependency upon @frags@.
- * config/*.mh, config/README: Remove.
-
- * config.bfd: Rewrite to incorporate the contents of the Makefile
- fragments by setting shell variables, rather than merely returning
- the name of a Makefile fragment.
- * configure.in: Use shell variables set by config.bfd rather than
- looking at the target Makefile fragment files. Don't substitute
- target_makefile_frag. Do substitute TDEFINES.
- * configure: Rebuild.
- * Makefile.in (@target_makefile_frag@): Remove.
- (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
- * config/*.mt: Remove.
+ * tekhex.c (tekhex_write_object_contents): Check for no symbols.
-Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
+Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Put changequote lines around "i[345]86" patterns
- section of core file support.
+ * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
+ adjust addend for an output common symbol (from Jimmy Blair
+ <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
+ defined symbol to counteract adjustment made in generic relocation
+ code.
-Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
+ * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
- * som.c (som_bfd_print_private_bfd_data): Define to use the
- generic version.
+Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
-Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
+ * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
+ (GET_SCNDHR_NLNNO): Likewise.
- * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
- entry, text_start and data_start.
+Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
+ * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
- * Makefile.in (OFILES): Remove $(TDEPFILES).
- * config/apollo.mt (TDEPFILES): Remove.
- * config/README: Update.
+Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
- * configure.in: For a native configuration, set COREFILE and
- COREFLAG based on the canonical host name.
- * configure: Rebuild.
- * Makefile.in: Rebuild dependencies.
- (ALL_CFLAGS): Add @COREFLAG@.
- (OFILES): Replace $(HDEPFILES) with @COREFILE@.
- * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
- support routines. Check LYNX_CORE rather than HOST_LYNX.
- * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
- * i386lynx.c: Likewise.
- * m68klynx.c: Likewise.
- * sparclynx.c: Likewise.
- * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
- * *-core.c: Comment changes.
- * config/decstation.mh (HDEPFILES): Remove.
- (HDEFINES): Remove -DTRAD_CORE.
- * config/irix3.mh (RANLIB): Remove.
- * config/irix4.mh (HDEPFILES, RANLIB): Remove.
- (HDEFINES): Remove -DIRIX_CORE.
- * config/riscos.mh (RANLIB, HDEPFILES): Remove.
- (HDEFINES): Remove -DTRAD_CORE.
- * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
- * config/ultra3.mh (RANLIB): Remove.
- * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
- * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
- * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
- * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
- * config/hppahpux.mh, config/hppaosf.mh: Remove.
- * config/i386aix.mh, config/i386bsd.mh: Remove.
- * config/i386linux.mh, config/i386mach3.mh: Remove.
- * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
- * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
- * config/mipsmach3.mh, config/news-mips.mh: Remove.
- * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
- * config/rs600.mh, config/rs6000lynx.mh: Remove.
- * config/solaris2.mh, config/stratus.mh: Remove.
- * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
- * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
-
-Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
-
- * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
- DT_FINI entry if the appropriate symbol is not in the hash table.
-
- * libelf.h (struct elf_backend_data): Add create_program_headers
- and want_hdr_in_seg fields.
- * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
- defined.
- (elf_backend_create_program_headers): Likewise.
- (elfNN_bed): Initialize create_program_headers and
- want_hdr_in_seg.
- * elf.c (get_program_header_size): Call create_program_headers
- backend routine.
- (map_program_segments): Check want_hdr_in_seg backend field. Call
- create_program_headers backend routine.
-
- * elf.c (assign_file_positions_except_relocs): Align non allocated
- sections when creating an executable.
-
- * elfcode.h (elf_swap_phdr_in): Make non static.
- (elf_swap_phdr_out): Make non static.
- * libelf.h (bfd_elf32_swap_phdr_in): Declare.
- (bfd_elf32_swap_phdr_out): Declare.
- (bfd_elf64_swap_phdr_in): Declare.
- (bfd_elf64_swap_phdr_out): Declare.
-
- * ecofflink.c (ecoff_collect_shuffle): New static function.
- (_bfd_ecoff_get_accumulated_pdr): New function.
- (_bfd_ecoff_get_accumulated_sym): New function.
- (_bfd_ecoff_get_accumulated_ss): New function.
- * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
- (_bfd_ecoff_get_accumulated_sym): Declare.
- (_bfd_ecoff_get_accumulated_ss): Declare.
- * libbfd.h: Rebuild.
+ * elf32-m32r.c: Add macros to handle NOP insertion.
-Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
-
- * elflink.h (elf_link_add_object_symbols): Handle indirect and
- warning symbols. If any section is named .gnu.warning.XXX, treat
- the contents as a warning to be issued if the symbol XXX is
- referenced.
- (elf_link_output_extsym): For an indirect or warning symbol, just
- output the symbol it points to.
-
- * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
- if bfd_hash_allocate fails, since it will already be set.
- (generic_link_hash_newfunc): Likewise.
- (archive_hash_newfunc): Likewise.
- (hash_entry_bfd): New static function.
- (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
- callback. Allocate a new warning using the hash table newfunc.
- Use bfd_hash_replace to update the entry in the hash table, rather
- than assuming we can copy the fields with structure assignment.
-
- * hash.c (bfd_hash_replace): New function.
- * bfd-in.h (bfd_hash_replace): Declare.
- * bfd-in2.h: Rebuild.
+Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
-Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
+ * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
+ (xcoff_mark): Likewise.
+ (xcoff_build_ldsyms): Mark absolute symbols.
- * config.bfd: Add mips*vr4300-*-elf* target.
- * config/mipsbvr4300.mt: Added.
+Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
-See file ChangeLog.2
+ * 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
diff --git a/contrib/binutils/bfd/ChangeLog-9193 b/contrib/binutils/bfd/ChangeLog-9193
new file mode 100644
index 0000000..15af931
--- /dev/null
+++ b/contrib/binutils/bfd/ChangeLog-9193
@@ -0,0 +1,7851 @@
+Fri Dec 31 16:23:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Minor cleanups suggested by CodeCenter.
+ * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
+ linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
+ appropriate.
+ * aoutx.h (struct external_exec): Removed unnecessary declaration.
+ (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
+ (adjust_z_magic): Removed useless variable data_vma.
+ (stringtab_init): Initialize hash_zero.
+ (add_to_stringtab): Removed unused fourth argument.
+ (NAME(aout,swap_std_reloc_out)): Removed useless variable
+ r_addend.
+ (aout_link_input_section): Added some casts.
+ * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
+ bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
+ Minor code rewriting to make it more C like.
+ (do_slurp_bsd_armap): Added some casts.
+ * ecoff.c (ecoff_write_object_contents): Removed useless variable
+ scn_base.
+ (ecoff_write_armap): Added some casts. Use "" rather than "\0".
+ * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
+ * libaout.h (struct internal_exec): Removed unnecessary
+ declaration.
+ * linker.c (_bfd_generic_indirect_link_order): Added a cast.
+ * opncls.c (new_bfd): Removed a cast.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Added
+ some casts.
+ * srec.c (internal_srec_write_object_contents): Removed useless
+ variable bytes_written.
+
+Fri Dec 31 11:46:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * i386mach3.c (N_TXTADDR): Don't define after all.
+ (TEXT_START_ADDR): Don't include exec header size in value.
+
+Thu Dec 30 15:47:54 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * i386mach3.c (N_TXTADDR): Define.
+
+Thu Dec 30 13:37:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Extensive changes to move the bulk of the linker into BFD so that
+ more efficient backend code can be written for specific object
+ files. Only existing efficient backend is a.out.
+ * seclet.c, seclet.h: Removed.
+ * hash.c, linker.c, genlink.h: New files.
+ * bfd-in.h: Removed bfd_error_vector. Declared hash table
+ structures and functions.
+ (JUMP_TABLE): Removed bfd_seclet_link, added
+ bfd_link_hash_table_create, bfd_link_add_symbols and
+ bfd_final_link.
+ * All backends: Changed accordingly.
+ * bfd-in2.h: Rebuilt.
+ * bfd.c (struct _bfd): Added link_next and archive_pass fields.
+ Removed ld_symbols field.
+ (bfd_nonrepresentable_section, bfd_undefined_symbol,
+ bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
+ bfd_error_vector): Removed.
+ (bfd_default_error_trap, bfd_error_trap,
+ bfd_error_nonrepresentabltrap): Removed.
+ (bfd_get_relocated_section_contents): Pass link_info. Pass
+ link_order instead of seclet. Pass symbols.
+ (bfd_relax_section): Pass link_info.
+ (bfd_seclet_link): Removed.
+ (bfd_link_hash_table_create, bfd_link_add_symbols,
+ bfd_final_link): New macros.
+ * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
+ alloca as __builtin_alloca. Declare internal linking functions.
+ * libbfd.h: Rebuilt.
+ * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
+ for months.
+ * reloc.c (reloc_howto_type): Added error_message argument to
+ special_function field. Changed all callers and all definitions.
+ (bfd_get_reloc_size): Make argument a const pointer.
+ (bfd_perform_relocation): Add error_message argument to hold
+ string set if return value if bfd_reloc_dangerous. Changed all
+ callers.
+ (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
+ * section.c (asection): Renamed seclets_head and seclets_tail to
+ link_order_head and link_order_tail.
+ * targets.c (bfd_target): Replaced seclet argument with link_info
+ and link_order and symbols arguments in
+ bfd_get_relocated_section_contents. Added symbols argument to
+ bfd_relax_section. Removed bfd_seclet_link. Added
+ bfd_link_hash_table_create, bfd_link_add_symbols and
+ bfd_final_link.
+ * libaout.h (struct aoutdata): Added external_syms,
+ external_sym_count, external_strings, sym_hashes fields.
+ (obj_aout_external_syms, obj_aout_external_sym_count,
+ obj_aout_external_strings, obj_aout_sym_hashes): New accessor
+ macros.
+ (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
+ * aoutx.h: Wrote new back end linker routines.
+ (translate_to_native_sym_flags): Return boolean value. Don't use
+ bfd_error_vector.
+ (NAME(aout,write_syms)): Return boolean value. Check return value
+ of translate_to_native_sym_flags and bfd_write.
+ * aout-target.h (final_link_callback): New function.
+ (MY_bfd_final_link): New function.
+ * aout-adobe.c (aout_adobe_write_object_contents): Check return
+ value of aout_32_write_syms.
+ * hp300hpux.c (MY(write_object_contents)): Likewise.
+ * i386lynx.c (WRITE_HEADERS): Likewise.
+ * libaout.h (WRITE_HEADERS): Likewise.
+ * bout.c: Changed functions to use link_info->callbacks rather
+ than bfd_error_vector, and link_orders rather than seclets.
+ * coff-alpha.c: Likewise.
+ * coff-h8300.c: Likewise.
+ * coff-h8500.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-z8k.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * reloc16.c: Likewise.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
+ up _gp in the hash table rather than in outsymbols.
+ * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
+ argument rather than printing them.
+ * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
+ link_order arguments rather than seclet. Changed all uses and
+ definitions.
+ (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
+ all uses and definitions.
+ * libcoff.h: Rebuilt.
+ * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
+ not by ECOFF, make it scAbs.
+ (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
+ rewritten.
+ * elf32-mips.c (mips_elf_final_link): Renamed from
+ mips_elf_seclet_link and rewritten.
+ * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
+ field.
+ (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
+ hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
+ Added link_info arguments. Changed all callers.
+ * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
+ not NULL.
+ * oasys.c (oasys_write_sections): Return boolean value rather than
+ using bfd_error_vector.
+ (oasys_write_object_contents): Check return value of
+ oasys_write_sections.
+ * hosts/std-host.h: Don't declare qsort or strtol.
+ * Makefile.in: Rebuild dependencies.
+ (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
+ (CFILES): Removed seclet.c. Added hash.c and linker.c.
+ (HFILES): Removed seclet.h. Added genlink.h.
+
+Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * section.c (bfd_get_section_contents): Return zero filled buffer
+ if section has no contents.
+
+Tue Dec 28 12:43:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
+ then skip bfd_perform_relocation even if the addend is non-zero.
+
+Tue Dec 21 09:22:19 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
+ addend to r_offset field.
+
+ * Makefile.in (CFILES): Added coff-sparc.c. Rebuild dependencies.
+
+ * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
+ CALC_ADDEND): Define.
+
+ * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
+ the offsetof because AIX /bin/cc does not like to take the address
+ of an array. (From Minh Tran-Le.)
+
+Thu Dec 16 13:06:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Thu Dec 16 15:41:06 1993 Peter Hoogenboom (hoogen@cs.utah.edu)
+
+ * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
+ the return pointer into %r2 if no jump-in-call-delay-slot
+ optimization was done.
+
+ * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
+
+Wed Dec 15 08:04:16 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
+
+ * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
+ (HOST_SEGMENT_SIZE): Set to 0 for same reason.
+
+ * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
+ (TEXT_START_ADDR): Correct.
+ (MY_backend_data): Define.
+
+ * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
+ New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
+
+Tue Dec 14 21:48:33 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_begin_writing): Fix thinkos in auxiliary header
+ support.
+ (bfd_som_attach_aux_hdr): Likewise.
+
+Mon Dec 13 23:34:48 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
+ selectors for PIC code.
+
+ * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
+ (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
+ relocations needed by PIC.
+
+Tue Dec 7 15:47:51 1993 Stu Grossman (grossman at cygnus.com)
+
+ * nlmcode.h: Fixes to avoid compiler warnings...
+
+Tue Dec 7 15:10:54 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libnlm.h (nlm_backend_data): Removed macro definition.
+ (nlm_alpha_backend_data): Adjusted accordingly.
+
+Sun Dec 5 19:32:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_begin_writing): Flesh out code for handling simple
+ auxiliary headers.
+ (bfd_som_attach_aux_hdr): New function.
+
+ * som.h (struct somdata): Add fields for attaching version and
+ copyright headers. Add accessor macros.
+
+ * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
+ definitions for old versions of HPUX which fail to define them.
+ (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
+ now that they're safe. Delete bogus R_STATEMENT relocations.
+
+ * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
+ extra R_DATA_OVERRIDE.
+ (hppa_som_gen_reloc_type): Generate a relocation for the rounding
+ mode selector if needed.
+ (som_write_fixups): Handle requests for a change in the default
+ rounding mode. Rounding modes do not consume input bytes, but
+ are just markers much like R_ENTRY and R_EXIT.
+
+Sat Dec 4 19:40:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
+
+ * elf32-hppa.c: (hppa_elf_reloc): Do not do code reordering when
+ the branch instruction as originally been nullified.
+ hppa_elf_reloc): Avoid useless call to bfd_put_32 () in the
+ case of no code reordering due to an LDO instruction in the
+ delay slot of the branch. Make sure to relocate the correct
+ instruction. Do not perform instruction reordering for millicode
+ calls.
+ (hppa_elf_build_arg_reloc_stub): Change the relocation type
+ to R_HPPA_STUB_CALL_17 when special processing might be needed.
+ (hppa_elf_build_long_branch_stub): Prevent code reordering on
+ a call from a linker stub to another linker stub and for millicode
+ calls. Do not trash the return register for calls from one linker
+ stub to a second linker stub.
+
+ * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
+ relocations are not pc-relative.
+
+ * hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in
+ linker stub code.
+ (COPY_2_31): Likewise.
+
+Fri Dec 3 18:40:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/solaris2.mh (HDEFINES): Remove -Dconst=
+ * hosts/solaris.h: If not __GNUC__, define const as empty.
+
+Thu Dec 2 15:43:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c: Added various casts for 32/64 bit cross targeting.
+ (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
+ section so that the linker ignores it.
+ * ecofflink.c: Added various casts for 32/64 bit cross targeting.
+ (ecoff_add_bytes): Changed need argument to size_t.
+ (bfd_ecoff_debug_link_other): Check return value of
+ ecoff_add_string.
+
+ * libbfd-in.h (new_bfd): Use void rather than an empty parameter
+ list.
+ * libbfd.h: Rebuilt.
+
+ * libnlm.h (struct nlm_obj_tdata): New field backend_data.
+ (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
+ (struct nlm_backend_data): New field no_uninitialized_data.
+ (nlm_no_uninitialized_data): New accessor macro.
+ * nlmcode.h (nlm_compute_section_file_positions): Handle
+ no_uninitialized_data.
+ (nlm_external_reloc_compare): Sort relocs by address for a
+ particular symbol, to make the sort more stable.
+ (nlm_write_object_contents): Cast the arguments to qsort. Get the
+ value of a debugging symbol the same way we get the value of a
+ normal symbol.
+ * nlm32-alpha.c: Various changes. Write out GP and .lita relocs.
+ Set no_uninitialized_data to true.
+ * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
+ (nlm32_sparc_backend): Set no_uninitialized_data field false.
+ * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
+ before filling it in.
+
+Wed Dec 1 21:47:58 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_section_type, som_decode_symcalss): New functions.
+ (som_get_symbol_info): Use them.
+ (som_slurp_symbol_table): Set the section of common and undefined
+ symbols correctly.
+
+Wed Dec 1 14:15:10 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
+ make gcc happy.
+
+ * mipsbsd.c: Changes from Ralph Campbell:
+ (mips_howto_table_ext): MIPS_RELOC_LO16 should use
+ complain_overflow_dont.
+ (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
+ make gdb happy.
+
+ * bfd.c (bfd_errmsgs): Reword invalid-target message.
+
+ * config.bfd: For sparc*-*-coff, use sparc-coff.
+ * configure.in: Handle sparccoff_vec.
+ * targets.c (sparccoff_vec): Declare.
+
+ * reloc.c (bfd_get_reloc_size): New function.
+ (struct reloc_howto_type): Update documentation of size field.
+
+Wed Dec 1 14:39:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
+ * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
+ * config/alpha-nlm.mt: New file.
+ * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
+ nlm32.o, and nlm.o.
+ * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
+ (CFILES): Added nlm32-alpha.c.
+ Rebuilt dependencies.
+ * targets.c (nlm32_alpha_vec): Declare.
+
+ * libnlm.h (struct nlm_backend_data): New fields
+ optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
+ nlm_set_public_section, nlm_get_public_offset. Removed unused
+ nlm_write_reloc field. Changed nlm_write_import to remove
+ unnecessary symbol argument. Renamed nlm_write_externals to
+ nlm_write_external, and changed cound argument from bfd_vma to
+ bfd_size_type.
+ (nlm_optional_prefix_size, nlm_backend_object_p_func,
+ nlm_write_prefix_func, nlm_set_public_section_func,
+ nlm_get_public_offset_func): New accessor macros.
+ (nlm_write_reloc_func): Removed.
+ (nlm_write_external_func): Adjusted for field renaming.
+ * nlm32-i386.c (nlm_i386_write_import): Renamed from
+ nlm_i386_write_reloc. Removed old nlm_i386_write_import which
+ just called old nlm_i386_write_reloc.
+ (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
+ Declared. Changed second argument from bfd_vma to bfd_size_type.
+ (nlm32_i386_backend): Adjusted for changes to fields and names.
+ * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
+ ifdeffed out code.
+ (nlm_sparc_write_import): Removed second argument.
+ (nlm_sparc_write_external): Renamed from
+ nlm_sparc_write_externals. Changed second argument from bfd_vma
+ to bfd_size_type.
+ (nlm32_sparc_backend): Adjusted for changes to fields and names.
+ * nlmcode.h: Removed some unused code.
+ (nlm_object_p): Don't destroy tdata pointer. Call
+ backend_object_p function if it exists.
+ (nlm_slurp_symbol_table): Removed unused variable rcount. Call
+ set_public_section_func if it exists instead of checking
+ NLM_HIBIT.
+ (nlm_compute_section_file_positions): Account for
+ optional_prefix_size.
+ (nlm_write_object_contents): Account for optional_prefix_size.
+ Removed useless variable write_reloc_func. Changed declaration
+ and call of write_import_func. Call write_prefix_func if it
+ exists. Removed unused variables len and temp. Call
+ get_public_offset_func if it exists rather than setting NLM_HIBIT.
+ * nlmswap.h: Declare functions.
+
+ * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
+ for clarity.
+ (fprintf_vma, sprintf_vma): Use %lx, not %x.
+ * bfd-in2.h: Rebuilt.
+ * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
+ to unsigned long.
+
+ * config.bfd: Don't set target64 here, as the setting is ignored.
+ * configure.in (ecoffalpha_little_vec): Set target64.
+
+ * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
+ in TDEFINES is wrong.
+
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
+ Remove unused variable output_section.
+
+Tue Nov 30 16:45:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * irix-core.c: New file for Irix 4 and Irix 5 core support.
+ Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
+ * coff-mips.c: Irix 4 core file support moved to irix-core.c.
+ * targets.c: If IRIX_CORE defined, include irix_core_vec in
+ target_vector.
+ * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
+ (HDEPFILES): Define to be irix-core.o.
+ * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
+ (HDEPFILES): Define to be irix-core.o.
+ * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
+ sco-core.o, which no longer exists.
+ (CFILES): Added all *-core.c files.
+ Rebuilt dependencies.
+
+Wed Nov 24 02:02:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (map_program_segments): Restore check of file_size !=
+ mem_size, but only if SHT_PROGBITS.
+
+ * ecofflink.c: New file to hold ECOFF debug information linking
+ routines.
+ * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
+ ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
+ ecofflink.c.
+ (ecoff_get_extr, ecoff_set_index): New functions.
+ (ecoff_slurp_symbolic_info): Don't save raw_size.
+ (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
+ (ecoff_compute_section_file_positions): Don't set EXEC_P just
+ because there is a start address.
+ (ecoff_write_object_contents): Handle external symbols here. Use
+ ecofflink.c functions to write out debugging information.
+ * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
+ mips_elf_set_index): New functions.
+ (mips_elf_seclet_link): Discard empty sections, the .options
+ section and .gptab sections. Handle linking .mdebug section.
+ * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
+ * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
+ * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
+ called by gas, so they are public).
+ * bfd-in2.h: Rebuilt.
+ * Makefile.in (BFD_LIBS): Added ecofflink.o.
+ (CFILES): Added ecofflink.c.
+ (ecofflink.o): New target. Rebuilt dependencies.
+
+Mon Nov 22 22:26:42 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
+ a valid magic number if it's been defined.
+
+Mon Nov 22 14:17:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
+ no longer requires it.
+ (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
+ ecoff_write_object_contents): Don't treat .scommon section
+ specially.
+
+Mon Nov 22 10:54:27 1993 Fred Fish (fnf@cygnus.com)
+
+ Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
+ * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
+ * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
+ * bfd/ptrace-core.c: New file for dealing with core files with
+ start with the ptrace_user structure found on BCS compliant systems.
+ * bfd/targets.c (ptrace_core_vec): New vector.
+
+Mon Nov 22 02:33:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Minimal support for reading SOM fixup streams. Allows
+ objdump -r to do something reasonable.
+ * som.c (som_get_reloc_upper_bound): Implement.
+ (som_canonicalize_reloc): Implement.
+ (som_set_reloc_info, som_slurp_reloc_table): New functions.
+
+Sun Nov 21 13:46:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
+ * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
+
+Fri Nov 19 14:34:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
+ signed_value before sign extending it. Don't subtract out
+ reloc_entry->address. This makes it compatible with what gas is
+ generating.
+
+ * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
+ SHT_NOBITS sections.
+ (map_program_segments): Don't leave the loop after the first
+ SHT_NOBITS section.
+ (assign_file_positions_except_relocs): Only force sh_offset and
+ sh_addr to match modulo maxpagesize for a section which is not
+ SHT_NOBITS. Changed the method used to force page alignment after
+ a SHT_NOBITS section to only do it for the last such consecutive
+ section, and to really force page alignment.
+
+Fri Nov 19 04:02:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * coffcode.h (coff_slurp_symbol_table): Print more verbose message
+ in the case of an unknown (or unhandled) storage class.
+
+ * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
+ not be defined here, since it is a host attribute, not a target
+ one.
+ * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
+
+ * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
+ defined.
+
+ * coff-sparc.c: Define some relocations, based on ELF relocations.
+ (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
+ struct coff_reloc_map, sparc_reloc_map,
+ coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
+ elf.c, renamed.
+ (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
+ (rtype2howto): Index into coff_sparc_howto_table using
+ dst->r_type.
+
+Thu Nov 18 11:45:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
+ * configure.host (mips-sgi-irix5*) New host; use irix5 (no
+ hosts/irix5.h created; just use std-host.h).
+ * config/irix5.mh: New file; like irix4.mh, but don't use -G or
+ -lmalloc.
+ * Makefile.in: Rebuilt dependencies.
+
+ * ecoffswap.h: Changed type of internal pointers for swap out
+ functions to const *.
+
+ * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
+ correctly for assembler, but linker support not implemented.
+ (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
+ (mips_elf_sym_is_global): New function; at least on Irix 5, all
+ non section symbols are considered global.
+ (elf_backend_sym_is_global): Define.
+ (mips_elf_final_write_processing): New function. Set the MIPS
+ architecture level correctly.
+ (elf_backend_final_write_processing): Define.
+ (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
+ (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
+ section to 1. Handle .options section.
+ (mips_elf_acom_section, mips_elf_acom_symbol,
+ mips_elf_acom_symbol_ptr): New static variables, used to build a
+ generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
+ (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
+ putting them all in a global .acommon section.
+
+ * elfcode.h (bfd_section_from_shdr): Don't dump core if target
+ section has no ELF section data.
+ (elf_make_sections): Set addralign of reloc section to 4.
+ (elf_fake_sections): Likewise.
+ (map_program_segments): Don't consider section 0.
+ (assign_file_positions_except_relocs): Don't consider section 0.
+ In the main loop, skip the symtab and strtab sections, since their
+ positions are set elsewhere.
+ (swap_out_syms): Set addralign of symtab section to 4. Set
+ addralign of strtab sections to 1.
+ (assign_file_positions_for_relocs): Don't consider section 0.
+ (write_object_contents): Don't write out section 0.
+
+ * libelf.h (struct elf_backend_data): Added fields
+ elf_backend_sym_is_global and elf_backend_final_write_processing.
+ * elf32-target.h (elf32_bed): Added corresponding initializers.
+ * elf64-target.h (elf64_bed): Likewise.
+ * elfcode.h (sym_is_global): Take abfd argument. Call
+ elf_backend_sym_is_global if it is not NULL.
+ (elf_map_symbols): Pass abfd to sym_is_global.
+ (write_object_contents): Call elf_backend_final_write_processing
+ if it is defined.
+
+Wed Nov 17 18:43:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libecoff.h: Include coff/ecoff.h.
+ (struct ecoff_backend_data): Move external debugging information
+ fields into a single field pointing to an ecoff_debug_swap
+ structure.
+ (ecoff_data_type): Move debugging information fields into a single
+ field pointing to an ecoff_debug_info structure.
+ * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
+
+Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
+
+ * nlmswap.h: New file to swap fixed header. Included by NLM
+ backends.
+ * libnlm.h (struct reloc_and_sec): Define.
+ (struct nlm_backend_data): Add fields fixed_header_size,
+ nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
+ nlm_swap_fhdr_out.
+ (nlm_fixed_header_size, nlm_read_import_func,
+ nlm_write_import_func, nlm_swap_fixed_header_in_func,
+ nlm_swap_fixed_header_out_func, nlm_write_external_func): New
+ accessor macros.
+ * nlmcode.h: Use new functions.
+ * nlm32-i386.c: Provide new functions.
+ * nlm32-sparc.c: New file; SPARC NLM backend.
+
+Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
+ garbage bits appearing in the upper end of symbolnums.
+
+ * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
+
+Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
+
+ * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
+ * m68klynx.c: Define core file macros.
+ * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
+ non-architecture specific stuff into lynx.h.
+
+Tue Nov 16 15:45:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
+ change PAGE_SIZE to 4096.
+
+Mon Nov 15 11:48:08 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * Makefile.in (diststuff): New target.
+
+ * VERSION: Updated.
+
+Sun Nov 14 23:33:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_object_setup): Do not create dummy ".text", ".data",
+ and ".bss" sections.
+ (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
+ is zero. Recognize BSS type sections and turn off SEC_LOAD and
+ SEC_DATA (so binutils/size works). Set the correct value for
+ a section's _raw_size.
+ (som_slurp_symbol_table): Program entry points, and millicode are
+ also functions. Mark them as such. Also mark L$* symbols as
+ debugging symbols.
+
+ * bfd-in2.h: Rebuilt.
+
+Sat Nov 13 15:27:15 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
+ a pointer to constant data. Delete bogus #define which made the
+ function useless.
+
+ * som.c (som_prep_for_fixups): New function.
+ (som_write_fixups): New function.
+ (som_write_space_strings): New function.
+ (som_write_symbol_strings): New function.
+ (som_begin_writing): New function.
+
+Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_write_object_contents): Do not abort. Flesh out.
+ (som_set_section_contents): Do not abort. Flesh out.
+
+ * som.c (som_write_headers): New function.
+ (som_prep_headers): New function.
+ (som_build_and_write_symbol_table): New function.
+
+ * som.c (som_sizeof_headers): Add missing prototype.
+ (som_set_arch_mach): Do not abort.
+
+ * som.c (som_count_spaces): New function.
+ (som_count_subspaces): New function.
+ (compare_syms): New function.
+ (som_compute_checksum): New function.
+
+ * som.c (hppa_som_gen_reloc_type): New function.
+ (som_bfd_reloc_type_lookup): New function.
+
+ * som.c (try_prev_fixup): New function.
+ (som_reloc_skip): New function.
+ (som_reloc_addend): New function.
+ (som_reloc_call): New function.
+
+ * som.c (som_initialize_reloc_queue): New function.
+ (som_reloc_queue_insert): Likewise.
+ (som_reloc_queue_fix): Likewise.
+ (som_reloc_queue_find): Likewise.
+
+ * som.c (som_hppa_howto_table): SOM howto relocation table.
+ (hppa_som_reloc): New function.
+
+ * som.c (struct reloc_queue): New structure to keep track of
+ the last four multibyte relocations emitted.
+ (enum pa_symbol_type): Type to fully describe the symbol types
+ associated with .import/.export assembler directives.
+
+ * som.c: Include libhppa.h
+
+ * som.c (bfd_som_set_section_attributes): New function.
+ (bfd_som_set_subsection_attributes): Likewise.
+ (bfd_som_set_symboL_type): Likewise.
+ (bfd_som_attach_unwind_info): Likewise.
+ * som.h: Declare new exported functions.
+
+ * som.h (struct som_symbol): Add new fields to hold additional
+ information needed to build/write symbol tables and fixup streams.
+ (struct som_section_data_struct): Add new fields to hold additional
+ information needed to build/write space and subspace headers.
+ (som_symbol_data): New accessor macro for SOM symbol information.
+ (R_HPPA_*): Basic relocation types to be used by the assembler.
+
+Fri Nov 12 11:00:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * trad-core.c (trad_unix_core_file_p): If new hook
+ TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
+ corefile being too big.
+ * hosts/i386sco.h: Define it.
+
+Thu Nov 11 15:16:28 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * bfd.c (struct _bfd): Add hppabsd_core_data.
+ * targets.c (target_vector): Add hppabsd_core_vec.
+ * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
+ section is encountered during core section scanning.
+ * hppabsd-core.c: New file.
+ * config/hppabsd.mh: Enable HPPA BSD core files.
+
+ * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
+ which is either commented out or ifdef'd out. Add, update and
+ clean comments. Fix various indention and spacing problems. Handle
+ problems related to using "ble" to jump to a stub rather than "bl"
+ (%r31 is trashed by "ble", but not by "bl").
+ (NEW_INSTRUCTION): Put inside curly braces.
+ (CURRENT_STUB_OFFSET): Fix indention problems.
+ (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
+ Add, update and clean comments. Handle "ble" %r31 lossage problems.
+ (hppa_elf_build_long_branch_stub): Likewise.
+ (hppa_look_for_stubs_in_section): Likewise.
+ (hppa_elf_stub_check): Remove obsolete function.
+
+ * hppa_stubs.h: Add new instructions to deal with %r31 lossage
+ problems. Delete unused instructions.
+
+Tue Nov 9 11:40:27 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
+
+Tue Nov 9 11:26:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_object_p): Rather than looking through an array
+ of architectures, get the ELF EM_xxx code from the backend
+ information. Let the generic ELF target match any EM_xxx code not
+ matched by another ELF target. Call elf_backend_object_p to let
+ the backend do more checks and set global information.
+ * libelf.h (struct elf_backend_data): Added elf_machine_code and
+ elf_backend_object_p fields.
+ (struct bfd_elf_arch_map): Removed.
+ (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
+ * elf32-target.h, elf64-target.h: Initialize elf_machine_code
+ field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
+ field with elf_backend_object_p (if it is defined).
+ * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
+ elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
+ elf64-gen.c (ELF_MACHINE_CODE): Defined.
+ * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
+ routines.
+ (mips_elf_object_p): Set the right machine number.
+ (mips_elf_ecoff_debug_swap): Defined.
+ (elf_backend_object_p): Defined to be mips_elf_object_p.
+ (elf_backend_ecoff_debug_swap): Defined to be
+ mips_elf_ecoff_debug_swap.
+ * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
+
+ * libbfd-in.h (target_vector, default_vector): Declare.
+ * libbfd.h: Rebuilt.
+ * format.c (target_vector, default_vector): Don't declare.
+
+ * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
+ for R_MIPS_26. Correct overflow detection requires matching the
+ upper four bits of the destination against the PC. From Ted Lemon
+ <mellon@pepper.ncd.com>.
+
+ * bout.c (b_out_reloc_type_lookup): Return type should point to
+ const data.
+ * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
+ * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
+ * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
+ * coff-i386.c (coff_i386_reloc): Made howto const.
+ * oasys.c (oasys_write_data): Made how const.
+
+ * libelf.h: Added some comments.
+ (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
+ field. Removed unused write_relocs field.
+ * elf32-target.h: Adjusted elf_backend_data initialization
+ accordingly.
+ * elf64-target.h: Corrected elf_backend_data initialization to
+ fill in all fields and to set elf_64_p to 1.
+
+Mon Nov 8 18:13:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
+ to filepos in SHT_STRTAB case.
+ (assign_file_position_for_section): Set BFD section filepos as
+ well as ELF section sh_offset.
+
+ * reloc.c: Use const instead of CONST.
+ (bfd_perform_relocation): Make variable howto a const pointer.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+Mon Nov 8 12:19:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (realclean): Don't remove generated headers. Reverts
+ change of 2 Jul 1993.
+
+Mon Nov 8 06:08:31 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
+
+ * configure.bfd: make unixware equivalent to sysv4.
+
+ * config/i386-nlm.mt: bring in elf config; make it the default.
+
+Sun Nov 7 20:21:38 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * libbfd.c (bfd_put_8): Add parens around reference to "val"
+ argument.
+
+Fri Nov 5 21:45:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
+ i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
+
+Fri Nov 5 15:17:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coffcode.h (coff_write_object_contents): Zero out internal_a.
+
+Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
+ core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
+ section.c, syms.c, targets.c:
+ Doc cleanup (spelling, punctuation, grammar, formatting).
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com)
+
+ * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
+ * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
+
+Thu Nov 4 08:54:30 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * From Pete Hoogenboom (hoogen@cs.utah.edu)
+ * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
+ in last change. Always rebuild symbol extension section the first
+ time though if output sections exist (fixes ld -r problems).
+
+Thu Nov 04 08:08:46 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * Makefile.in: Add .PHONY for check and installcheck rules.
+
+Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
+
+ * libbfd-in.h (artdata): Use long, not time_t for portability, at
+ least to HPUX. File below is a derived file.
+
+Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
+
+ * libbfd.h (artdata): Use long, not time_t for portability, at
+ least to HPUX.
+
+Tue Nov 2 09:32:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.bfd: Use bigmips for mips*-*-bsd*.
+
+Mon Nov 1 14:30:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
+ Handle symbol number of zero.
+
+ * reloc.c (enum bfd_reloc_code_real): Added
+ BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
+ BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
+ * bfd-in2.h: Rebuilt.
+ * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
+ BFD_RELOC_MIPS_LITERAL.
+ * elf32-mips.c (mips_reloc_map): Handle new relocs.
+ (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
+ checks slightly.
+
+ * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
+ MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
+ (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
+ MY_bfd_seclet_link): Define.
+ (MY_bfd_reloc_type_lookup): Rename from
+ MY_reloc_howto_type_lookup.
+ (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
+ (MY(vec)): Use JUMP_TABLE rather than listing functions.
+ * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
+ MY_canonicalize_reloc, MY_write_object_contents): Don't define in
+ terms of MY, because that causes a recusive invocation of CAT when
+ expanded within JUMP_TABLE, and ANSI compilers don't expand
+ recursive macros.
+ * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
+ MY_reloc_howto_type_lookup, and don't define in terms of MY.
+ (MY_canonicalize_reloc): Don't define in terms of MY.
+ (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
+ than listing functions.
+
+Mon Nov 1 09:12:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.bfd: Use m68k-elf for m68*-*-sysv4*.
+
+Sun Oct 31 09:35:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * targets.c: Move enum target_flavour outside of struct and change
+ the name to enum bfd_flavour. This means bfd clients can use it.
+ * bfd-in.h: Add macro bfd_get_flavour.
+ * bfd-in2.h: Rebuilt.
+
+ * som.c: Add comment about how abort() on corrupt executable is evil.
+
+Sat Oct 30 12:27:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (aout,slurp_reloc_table): Avoid a goto.
+
+Fri Oct 29 16:04:33 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * gen-aout.c, libbfd.c: exit(1) instead of exit(-1).
+
+Fri Oct 29 13:17:21 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * bfd-in.h: Added commands for object file flag values.
+ * bfd-in2.h: Rebuilt.
+ * elfcode.h (elf_object_p): If type is ET_DYN, set DYNAMIC flag,
+ not EXEC_P.
+ * bout.c, coff-h8300.c, coff-sh.c: Add BFD_IS_RELAXABLE to
+ object_flags field for target vector.
+ * aix386-core.c, aout-adobe.c, aout-target.h, bout.c, coff-a29k.c,
+ coff-alpha.c, coff-apollo.c, coff-h8300.c, coff-h8500.c,
+ coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c, coff-mips.c,
+ coff-rs6000.c, coff-sh.c, coff-we32k.c, coff-z8k.c, hpux-core.c,
+ ieee.c, mipsbsd.c, nlm-target.h, oasys.c, osf-core.c, som.c,
+ srec.c, tekhex.c, trad-core.c: Remove DYNAMIC from object_flags
+ field for target vector.
+
+Thu Oct 28 20:02:31 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * hosts/std-host.h: Don't declare time; causes error on mach3.
+ * configure.in (i386mach3_vec): Require aout32.o stab-syms.o.
+
+Thu Oct 28 16:33:26 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ LynxOS and Sparc LynxOS changes:
+ * config.bfd: Recognize sparc-*-lynxos*.
+ * configure.host: Recognize sparc-*-lynxos*.
+ * configure.in: Recognize Sparc Lynx vectors.
+ * targets.c (sparclynx_aout_vec): Declare.
+ (sparclynx_coff_vec): Declare.
+ (target_vector): Add them.
+ * cf-i386lynx.c: New file, renamed from i386lynx-cf.c.
+ * cf-m68klynx.c: New file, renamed from m68klynx-cf.c.
+ * cf-sparclynx.c: New file, support for coff in Sparc LynxOS.
+ * coff-sparc.c: New file, basic Sparc coff support.
+ * sparclynx.c: New file, support for a.out in Sparc LynxOS.
+ * Makefile.in: Change filenames appropriately, add Sparc rules.
+ * coffcode.h (coff_set_arch_mach_hook): Recognize Sparc magic
+ number.
+ (coff_set_flags): Use LynxOS magic number for i386, m68k, and
+ Sparc LynxOS, set Sparc magic number for Sparcs.
+ * config/m68k-lynx.mt (SELECT_VECS): Remove redundant vector.
+ * config/sparc-lynx.mt: New file.
+ * hosts/i386lynx.h: Cosmetic improvements.
+ * hosts/m68klynx.h: Add ifdefs, #define of cfree.
+ * hosts/sparclynx.h: New file.
+
+Thu Oct 28 16:23:40 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ gcc -Wall lint:
+ * coff-h8300.c (h8300_reloc16_estimate): Declare return type.
+ Remove useless statement probably left by code copy.
+ * cpu-i960.c (compatible): Fully bracket matrix initializer.
+ * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Use bfd_xmalloc
+ rather than xmalloc. Use realloc and check the return value
+ rather than xrealloc.
+ (hppa_elf_get_section_contents): Add some casts.
+ * elf32-i386.c (elf_i386_reloc_type_lookup): Remove unused
+ variable. Add default case to switch.
+ * hp300hpux.c: Declare aout_32_write_syms.
+ * i386bsd.c, i386linux.c, netbsd386.c (N_SHARED_LIB): Define as 0
+ (definition from aout/aout64.h is always 0 anyhow).
+ * i386lynx.c (swap_std_reloc_in): Remove unused variable.
+ * ieee.c (ieee_write_id): length can never be negative.
+ (read_id): Likewise.
+ (ieee_archive_p): Remove unused variable.
+ * libcoff-in.h (bfd_perform_slip): Declare.
+ * libcoff.h: Rebuilt.
+ * oasys.c (oasys_write_sections): Remove zero initialization of
+ static structure.
+ * reloc16.c: Indentation change.
+
+Wed Oct 27 16:51:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in, config/i386-mach3.mt: Update for new configuration
+ (--with-targets and so on).
+ * hosts/i386mach3.h: Declare errno.
+ * targets.c: Declare i386mach3_vec.
+
+Wed Oct 27 12:18:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlmcode.h (nlm_swap_auxiliary_headers_in,
+ nlm_swap_auxiliary_headers_out): Handle sharedDebugRecordOffset
+ and sharedDebugRecordCount fields.
+
+Tue Oct 26 16:21:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * targets.c (target_vector): Remove SCO_CORE. On Sep 11 1993,
+ we started using trad-core.c for SCO instead.
+
+ * targets.c (target_vector): Re-enable generic ELF and NLM targets.
+
+Tue Oct 26 16:53:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (assign_file_position_for_section): Align sh_offset to
+ sh_addralign (this is what UnixWare does, and it shouldn't hurt).
+
+Tue Oct 26 10:16:54 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ From Jeff Law and Pete Hoogenboom at Utah:
+
+ * elf32-hppa.h (hppa_elf_stub_finish): Add prototype.
+ (ELF32_HPPA_R_ARG_RELOC): Renamed without the ELF32 prefix
+ and moved into libhppa.h. All references changed.
+ (ELF32_HPPA_R_CONSTANT, ELF32_HPPA_R_ADDEND): Likewise.
+ (get_opcode and opcode defines): Move into libhppa.h
+ * elf32-hppa.c (hppa_elf_insn2fmt): Rename and move info
+ libhppa.h.
+ * libhppa.h (HPPA_R_*): Moved here. Reformatted slightly to make
+ for easier reading.
+ (get_opcode): Moved here. FIXME! this really should be a C function
+ inside the opcode library!
+ (bfd_hppa_insn2fmt): Likewise.
+
+ * targets.c (target_vector): Enable elf32-hppa vector.
+
+ * elf32-hppa.c (hppa_elf_get_section_contents): Add new comments
+ and clarify existing comments. Do not use DEFUN to declare this
+ function. Fix numerous indention problems. Correctly handle cases
+ where symbol extension section may need to be read from disk,
+ read from memory, or built then read from memory.
+
+ * elf32-hppa.h: Reformat with gnu-indent and hand fix numerous
+ formatting and indention problems gnu-indent can not handle.
+ Clarify some comments about relocation types. Comment basic
+ relocation "classes". Group PARAM declarations together.
+ (HPPA_SXT_{NULL, SYMNDX, RG_RELOC}): Make members of a new
+ enumerated type rather than #defines.
+
+Tue Oct 26 02:40:46 1993 Stu Grossman (grossman at cygnus.com)
+
+ * som.c (hppa_object_setup): Set SEC_CODE for .text section so
+ that GDB can figure out text_start and text_end.
+
+Mon Oct 25 16:05:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Fix up warnings from gcc -Wall:
+ * coffgen.c (coff_print_symbol): Use %lx and cast n_value to
+ unsigned long. Use %ld for tagndx. Use %lx for offset + vma and
+ cast it to unsigned long.
+ * ecoff.c (ecoff_emit_aggregate): Use %ld.
+ (ecoff_print_symbol): Use %ld, and cast indx and sym_base to long.
+ * coffcode.h (dummy_reloc16_estimate): Specify return type.
+
+ * libbfd.c (bfd_write): If not everything is written out, set
+ bfd_error to system_call_error. If the return value is
+ non-negative, set errno to ENOSPC (if ENOSPC is defined).
+ (bfd_seek): If the seek fails, set bfd_error to system_call_error.
+ (bfd_generic_set_section_contents): For a bad offset + count, set
+ bfd_error to bad_value.
+ * seclet.c (rel): Don't abort. Instead, return false.
+
+Mon Oct 25 09:59:37 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_SPARC_WDISP22.
+
+Fri Oct 22 20:35:54 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config.bfd: handle mips*-* instead of mips-*, use mips*el
+ instead of mips-*-*l
+
+Fri Oct 22 14:03:33 1993 Mark Eichin (eichin@cygnus.com)
+
+ * m68k-lynx.mt, i386-lynx.mt (TDEFINES): set
+ FPRINTF_ALREADY_DECLARED because the objdump.c declaration of
+ fprintf collides with the native one.
+
+Fri Oct 22 11:50:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * targets.c (target_vector): Enable MIPS ELF vectors.
+
+Fri Oct 22 07:51:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.bfd: Use bigmips for mips-sony-bsd*.
+
+ * configure.host, config.bfd: Add * to end of all OS names.
+
+Thu Oct 21 12:16:26 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * elfcode.h (FILE_ALIGN): Renamed from EALIGN, to avoid conflict
+ with Ultrix header files.
+
+ * som.h (struct som_section_data_struct): Renamed from
+ som_section_data to avoid conflict with macro by that name.
+
+ Changes from Jeff Law and Peter Hoogenboom at Utah:
+
+ * elf32-hppa.c (hppa_elf_reloc): Target register for a 'jump
+ in delay slot' optimization in combination with a long call
+ stub should always be r31.
+
+ * elf32-hppa.c: (hppa_elf_relocate_insn): To be consistent
+ across all relocation types, retrieve instruction addends from
+ the relocation entry rather than from the instruction itself.
+
+ * elf32-hppa.c: (hppa_elf_relocate_insn): Fix a relocation
+ error that only occurred when the addend of an 'addil' or
+ 'ldil' was larger than 21 bits and very close to a 2K byte
+ boundary.
+
+ * elf32-hppa.c: (hppa_elf_reloc): Handle the optimization in
+ which a jump is placed in the delay slot of a function call.
+ The jump was being accomplished via an adjustment to the
+ return pointer. This optimization would break the long call
+ stub code, if there was any.
+
+ * elf32-hppa.c: (hppa_elf_build_long_branch_stub): Corrections
+ to long branch stubs to avoid use of general register 2.
+
+ * hppa_stubs.h: New stub instructions.
+
+ * elfcode.h: Declare bfd_elf_find_section.
+
+ * som.h (som_section_data): Add new "subspace_index" field.
+
+ * som.c (setup_sections): Save the original SOM subspace index
+ in the BFD section associated with that subspace.
+ (som_get_symtab_upper_bound): Implement.
+ (som_get_symtab): Implement.
+ (som_print_symbol): Implement.
+ (som_slurp_string_table): New function to read a string table
+ from a SOM object file.
+ (som_section_from_subspace_index): New function to return the
+ section which corresponds to a SOM subspace index.
+ (som_slurp_symbol_table): New function to read the symbol
+ table from a SOM object file.
+ (som_make_empty_symbol): Check for errors from bfd_zalloc.
+ (som_new_section_hook): Initialize subspace_index field to
+ -1 instead of 0.
+
+ * som.c (som_object_setup): Fix polarity of test to set HAS_RELOC.
+ Set EXEC_P for executables.
+ (setup_sections): Correctly identify when a section has
+ relocations.
+ (log2): New function.
+ (setup_sections): Correctly convert between SOM alignments and BFD
+ alignments.
+
+ * som.c (setup_sections): Do not set SEC_ALLOC or SEC_LOAD
+ for sections which correspond to SOM spaces, doing so confuses
+ many utilities. Set assorted SEC_* flags for SOM subspaces
+ which correspond to BFD sections.
+
+ * elf32-hppa.c: (elf32_hppa_backend_fake_sections): The stab
+ string table should have sh_type == SHT_STRTAB. Add
+ processing to make it so.
+
+ * elfcode.h: (bfd_section_from_shdr): String tables (other
+ than .strtab) were not getting the file offsets recorded, so
+ they could not be read from disk.
+
+ * elfcode.h: (elf_make_sections): Leave the sh_addr field of
+ the section header and the vma field of a section at 0 if the
+ section is not part of the program execution image. (e.g.,
+ .stab)
+
+ * som.[hc]: Change target vector prefix from "hppa" to "som".
+ Consistently use obj_som prefix to access fields in backend data
+ structures. Fix all callers/references.
+
+ * som.h: Do not include files only needed for core file reading here.
+ Include a.out for both HOST_HPPAHPUX and HOST_HPPABSD. Delete
+ forward structure declarations, they are unnecessary.
+ (struct somdata): Delete aux_hdr, and hp_symbol_entry_size fields.
+ Change "symbols" to "symtab". Add "stringtab" and "reloc_filepos"
+ fields for future use. Change obj_som_* macros as appropriate.
+ (som_section_data): New structure to keep SOM specific information
+ about BFD sections (for future use).
+
+ * som.c: Provide PARAMS declarations for all functions currently
+ in this file.
+ (struct container): Delete unwanted structure definition.
+ (som_object_setup): Add comments. Use som_mkobject to allocate
+ SOM specific information in the BFD; use information from the
+ file and (possibly empty) auxiliary headers to initialize this
+ information. Delete redundant bfd_get_symcount (abfd) "calls".
+ (setup_sections): Return type is now boolean, fix return statements.
+ "Fix" handling of BSS like subspaces in the computation of the
+ containing space's size. If the subspace has relocations, set the
+ appropriate BFD section flags and record the index into and the
+ size of the fixup stream. Always return a value.
+ (som_object_p): Set bfd_error appropriately if errors are detected
+ from bfd_{read,seek} functions. Handle EXECLIBMAGIC type files.
+ Do not try to read a non-existant auxiliary header.
+ (som_mkobject): Flesh out.
+ (som_section_hook): Allocate space to hold SOM specific information
+ about sections.
+
+Thu Oct 21 12:41:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ gcc -Wall lint:
+ * coff-h8300.c, coffcode.h: Change shrink parameter
+ in *_reloc16_estimate to unsigned to match prototype.
+ * archive.c: Avoid "/*" in comment.
+
+Thu Oct 21 13:05:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * dep-in.sed: Create our own line breaks for a more aesthetic
+ Makefile.
+ * Makefile.in: Rebuilt dependencies.
+
+ * elf32-mips.c: Include "seclet.h".
+ (mips_elf_fake_sections): Force size of .reginfo section to sizeof
+ Elf32_External_RegInfo.
+ (mips_elf_seclet_link): New function. Link the .reginfo section
+ specially, and pass everything else to the generic routine.
+ (bfd_elf32_bfd_seclet_link): Define macro.
+ * elf32-target.h: If bfd_elf32_bfd_seclet_link is already defined,
+ don't override it.
+
+Wed Oct 20 12:22:37 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libnlm.h (nlm_backend_data): Added signature field.
+ (nlm_signature): New macro.
+ * nlmcode.h (nlm_object_p, nlm_write_object_contents): Use the NLM
+ signature from the backend rather than the constant NLM_SIGNATURE.
+ * nlm32-i386.c (nlm32_i386_backend): Initialize signature field.
+
+ * aoutf1.h (MACHTYPE_OK): Accept M_UNKNOWN.
+ (NAME(sunos,set_arch_mach)): Treat M_UNKNOWN as 68000, not 68020.
+
+Wed Oct 20 10:28:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/i386bsd.h [__bsdi__]: Define HOST_DATA_START_ADDR.
+
+Wed Oct 20 10:10:07 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * Makefile.in (HFILES): New variable, for use in "make dep".
+ (.dep): Depend on $(CFILES) and $(HFILES). Delete .dep1 and
+ remake it, so that "$?" is complete.
+ (.dep1): Don't need to remove .dep1 first.
+ (dep.sed): Depend on config.status, not Makefile.
+ (CFILES): Add nlm.c.
+
+Tue Oct 19 15:26:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-alpha.c: Implemented reloc handling for the linker, made
+ various other related changes.
+ * libecoff.h (ecoff_backend_data): Added rdata_in_text field.
+ Renamed finish_reloc to adjust_reloc_in. Added adjust_reloc_out
+ field.
+ (ecoff_bfd_get_relocated_section_contents): Don't define.
+ * ecoff.c (ecoff_sec_to_styp_flags, ecoff_styp_to_sec_flags):
+ Handle .lita section.
+ (ecoff_slurp_reloc_table): Handle RELOC_SECTION_FINI.
+ finish_reloc backend field renamed to adjust_reloc_in.
+ (ecoff_bfd_seclet_link): Adjust number of aux entries to
+ debug_align boundary.
+ (ecoff_compute_section_file_positions): If rdata_in_text put
+ .rdata section in text segment, not data segment. Put .pdata
+ section in text segment.
+ (ecoff_write_object_contents): Likewise. Also, call
+ adjust_reloc_out, and handle .lita, .xdata, .pdata, .fini and
+ absolute sections when writing out relocs.
+ * coffswap.h (coff_swap_aouthdr_out): For ALPHAECOFF, output 2 for
+ bldrev field, as on Alpha OSF/1. Padding field is now 2 bytes.
+ * coff-mips.c (mips_ecoff_swap_reloc_out): Added assertion.
+ (mips_adjust_reloc_in): Renamed from mips_finish_reloc.
+ (mips_adjust_reloc_out): New function (does nothing).
+ (mips_ecoff_backend_data): Initialize new fields.
+ (ecoff_bfd_get_relocation_section_contents): Define to be
+ bfd_generic_get_relocated_section_contents.
+
+ * reloc.c (bfd_perform_relocation): Added casts to avoid Alpha
+ OSF/1 cc bug.
+
+Thu Oct 14 01:10:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Add comments attempting to
+ explain PC relative relocations.
+
+ * coffcode.h (styp_to_sec_flags): Don't set SEC_DEBUGGING until it
+ is made to work.
+ (coff_compute_section_file_positions): Remove check for
+ USE_DISCARDED_SECTIONS_COUNT.
+ * coff-i386.c: Don't define USE_DISCARDED_SECTIONS_COUNT. Basing
+ it on host defines is wrong.
+
+ * ecoff.c (ecoff_bfd_seclet_link): Don't link a .reginfo section.
+ (ecoff_write_object_contents): Don't require the .reginfo section
+ to be a particular size.
+
+Wed Oct 13 18:39:03 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (dep-in): New rule, for editing dependencies into
+ Makefile.in in $(srcdir). Use move-if-change.
+ (.dep1, dep): Use move-if-change.
+ (CFILES): Add coff-apollo.c.
+
+ Sun Oct 10 18:02:56 1993 Troy Rollo (troy@cbme.unsw.EDU.AU)
+
+ * Makefile.in: Recognise new file, coff-apollo.o
+
+ * coff-apollo.c: New file
+
+ * coffcode.h: Recognise apollo magic numbers and writable text
+
+ * coffswap.h: Swap Apollo optional header entries
+
+ * config.bfd: Add line for Apollo
+
+ * configure.host: Replace apollo68b and apollo68v with Apollo
+
+ * configure.in: Recognise apollocoff_vec
+
+ * targets.c: Likewise
+
+ * config/apollo.mh, config/apollo.mt: New files
+
+ * hosts/apollo68.h: Remove inclusion of strings.h
+
+Wed Oct 13 14:28:17 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * coff-i386.c (i3coff_object_p): Now static.
+
+ * Makefile.in: Updated dependencies.
+ (.dep, .dep1, dep.sed): New targets, to make "make dep" work
+ better.
+ * dep-in.sed: New file.
+
+ * m68klynx-cf.c (ONLY_DECLARE_RELOCS): Define, to avoid name
+ conflicts when "--with-targets=all".
+ * coff-m68k.c (m68kcoff_howto_table, m68k_rtype2howto,
+ m68k_howto2rtype): Rename via macros to keep namespace clean.
+ * configure.in: For m68klynx_coff_vec, include coff-m68k.o for
+ now.
+
+Tue Oct 12 17:03:27 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-mips.c: Extensive additions to do relocations and to
+ handle MIPS specific sections.
+ * libelf.h (elf_backend_data): Pass fourth argument to
+ elf_backend_section_from_bfd_section to permit it to control the
+ section index to use.
+ (elf_obj_tdata): Add gp and gp_size fields.
+ (elf_gp, elf_gp_size): New accessor macros.
+ * elfcode.h: Removed a number of unused local variables.
+ (elf_fake_sections): Clear section header before calling
+ elf_backend_fake_sections, not after.
+ (prep_headers): Return true at end.
+ (elf_section_from_bfd_section): Pass retval argument to
+ elf_backend_section_from_bfd_section.
+ * elf32-hppa.c (elf32_hppa_backend_section_from_bfd_section):
+ Accept and ignore new retval argument.
+ * bfd.c: Include libelf.h.
+ (bfd_set_gp_size): Handle ELF targets.
+ * Makefile.in (bfd.o): Depends upon libelf.h.
+ (elf32-mips.o): Depends upon $(INCDIR)/elf/mips.h.
+
+Mon Oct 11 17:25:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_mkobject): Check bfd_make_section return value.
+ (ecoff_mkobject_hook): New function.
+ (ecoff_new_section_hook, ecoff_sizeof_headers,
+ ecoff_compute_section_file_positions, ecoff_set_section_contents,
+ ecoff_write_object_contents): Handle dummy REGINFO section.
+ (ecoff_get_section_contents): New function to handle reading
+ REGINFO section.
+ * libecoff.h (ecoff_get_section_contents): Change from macro
+ definition to function prototype.
+ (ecoff_mkobject_hook): New prototype.
+ * coff-alpha.c (alpha_ecoff_mkobject_hook): Removed.
+ (alpha_ecoff_backend_data): Use ecoff_mkobject_hook.
+ * coff-mips.c (mips_ecoff_mkobject_hook): Removed.
+ (mips_ecoff_backend_data): Use ecoff_mkobject_hook.
+
+Fri Oct 8 15:25:33 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * libbfd.c (bfd_get*32, bfd_get*64): Prevent ANSI sign extension
+ by casting the most significant byte to bfd_vma.
+
+Fri Oct 8 02:34:21 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.in: Do not define SELECT_VECS, SELECT_ARCHITECTURES
+ if configuring --with-targets=all.
+
+Thu Oct 7 17:34:07 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * aoutx.h (howto_table_std): Correct the "size" field in some
+ entries.
+
+ * reloc.c (reloc_howto_type): Change documentation to dispel any
+ notion that the "size" field is a power-of-two indicator.
+
+Thu Oct 7 10:50:38 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * coffswap.h: (bfd_swap_reloc_in): a symndx is signed.
+
+ Make support for relaxing more generic.
+ * reloc16.c: Add new target entry - bfd_coff_reloc16_estimate,
+ fix bit rot.
+ * libcoff.h, libcoff-in.h: declarations. Prototypes
+ * coffcode.h (bfd_coff_std_swap_table): Add calls to
+ coff_reloc_16_extra_cases and coff_reloc16_estimate.
+ (dummy_reloc16_estimate): New function.
+ * coff-h8300.c (h8300_reloc16_estimate): New function
+
+Thu Oct 7 14:24:13 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elfcode.h (EALIGN): Define, dependent on ARCH_SIZE.
+ (align_file_position): New function.
+ (elf_locate_sh): Disabled function deleted.
+ (assign_file_positions_for_symtab_and_strtabs): Align position,
+ then place symtab, then do other sections.
+ (map_program_segments): Align program header.
+ (assign_file_positions_except_relocs): Align section headers.
+ (assign_file_positions_for_relocs): Align relocation sections.
+
+Tue Oct 5 10:44:32 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.host: Recognize hppa*-*-hiux* (currently synonym for hpux).
+ Change other hppa entries to use -*- not -hp-.
+ * config.bfd: Recognize hppa*-*-hiux* (currently synonym for hpux).
+
+ * coff-rs6000.c, cpu-rs6000.c, rs6000-core.c: Change non-ASCII
+ characters in comment to octal escapes.
+
+Sun Oct 3 12:35:15 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * coff-i386lynx.c: Removed, name too long.
+ * i386lynx-cf.c: New file, was coff-i386lynx.c.
+ * configure.in: Reflect file name changes.
+ * Makefile.in: Mention Lynx-related files.
+
+ * i386lynx.c (lynx_32_swap_ext_reloc_in): get reloc bits in i386
+ Lynx-specific way.
+
+ * m68klynx-cf.c: New file, defines coff format for M68K LynxOS.
+ * m68klynx.c: Remove coff vector definition, now in m68klynx-cf.c.
+
+ * coffcode.h (sec_to_styp_flags): Set section flag to STYP_INFO
+ for .stab, .stabstr and .debug sections, and set SEC_DEBUGGING for
+ sections of type STYP_INFO. (from Minh Tran-Le)
+ (coff_compute_section_file_positions): Add discarded_sections_count
+ to abfd->section_count, which helps `strip' keep the size
+ of the executable header constant.
+ * coff-i386.c (discarded_sections_count): New variable, initialized
+ to zero. For use by `strip'. Currently being used only in aix386
+ coff, but may be useful for other coff systems. (from Minh Tran-Le)
+
+ * coffswap.h (coff_swap_filehdr_out): Added a missing cast.
+
+ * archive.c: Cosmetic improvements.
+ * opncls.c: Cosmetic improvements.
+ (new_bfd): Removed redundant structure slot init.
+
+Sat Oct 2 18:48:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config/news-mips.mh, hosts/news-mips.h: New files.
+ * configure.host: Use news-mips for mips-sony-bsd*.
+
+Fri Oct 1 13:14:17 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * configure.in: i386lynx_coff_vec requires coff-i386lynx.o.
+ * coff-i386lynx.c: New file, defines Lynx target vector and name,
+ includes coff-i386.c.
+ * coff-i386.c (i386coff_vec): Allow redefinition of target vector
+ symbol and name, if TARGET_SYM and/or TARGET_NAME are defined.
+ * i386lynx.c: Remove coff vector definition entirely.
+ (lynx_32_swap_ext_reloc_in): Define.
+ (lynx_32_swap_std_reloc_in): Define, get reloc bits in i386
+ Lynx-specific way.
+ (lynx_32_swap_ext_reloc_out): Define.
+ (lynx_32_swap_std_reloc_out): Define.
+ (lynx_32_slurp_reloc_table): Define, call Lynx swapping fns.
+ (lynx_32_squirt_out_relocs): Define, call Lynx swapping fns.
+ (lynx_32_canonicalize_reloc): Define, call Lynx swapping fns.
+ (WRITE_HEADERS): Define, call Lynx swapping fns.
+
+ * config/i386-lynx.mt (SELECT_VECS): Remove redundant vector.
+
+Thu Sep 30 17:50:52 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * reloc.c (bfd_reloc_code_type): Add linkage-table relative
+ relocations of size 8, 16, 32. Sort generic relocs by type rather
+ than size. Added a little documentation too.
+
+ * aoutx.h (howto_table_std): Add BASE16 and BASE32 relocs.
+ (TABLE_SIZE): New macro.
+ (reloc_type_lookup): Handle BFD_RELOC_{16,32}_BASEREL for std
+ relocs.
+ (swap_std_reloc_out): Write baserel relocs correctly.
+ (swap_std_reloc_in): Handle r_baserel field. Assert that
+ r_jmptable and r_relative fields are clear, and that the computed
+ index does refer to a defined entry of the howto table.
+
+Tue Sep 28 14:47:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * section.c (bfd_make_section_anyway): New function.
+ * section.c: Change comments to say several sections can have
+ the same name.
+ * bfd-in2.h: Re-generate to reflect above change.
+ * coffgen.c (make_a_section_from_file): Call bfd_make_section_anyway
+ if still no section after the bfd_coff_make_section_hook.
+ * coffcode.h: Add comment about TWO_DATA_SECS.
+
+Tue Sep 28 03:22:24 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * ecoff.c (ecoff_slurp_symbolic_info): Always determine raw_size
+ explicitly.
+ * ecoff.c (ecoff_sec_to_styp_flags, ecoff_styp_to_sec_flags): Handle
+ .fini section.
+
+Mon Sep 27 18:29:18 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * config.bfd configure.host: Match on *-lynxos* for LynxOS,
+ add m68*-*-lynxos*.
+ * configure.in : Replaced i386lynx_vec with i386lynx_aout_vec
+ and i386lynx_coff_vec.
+ Added m68klynx_aout_vec and m68klynx_coff_vec.
+ * targets.c (target_vector): Removed i386lynx_vec, added
+ {i386,m68k}lynx_{aout,coff}_vec.
+ * i386lynx.c: Added copy of i386coff.c, renamed bfd target to
+ i386lynx_coff_vec.
+ * m68klynx.c: New file.
+ * config/i386-lynx.mt: Replaced i386lynx_vec with i386lynx_aout_vec
+ and i386lynx_coff_vec.
+ * config/m68k-lynx.mt: New file.
+ * hosts/i386lynx.h: Added definition of cfree as free (from Eichin).
+ * hosts/m68klynx.h: New file.
+
+Mon Sep 27 18:00:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * archive.c: Define offsetof here.
+ * hosts/*.h: Don't define it here.
+
+Mon Sep 27 19:09:27 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (bfd_section_from_shdr): Set filepos for SHT_STRTAB
+ section.
+
+Fri Sep 24 15:47:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hpux-core.c: Add comment about hpux version 7.
+
+Fri Sep 24 16:50:26 1993 Stu Grossman (grossman at cygnus.com)
+
+ * lynx-core.c (lynx_core_file_p): Change per-thread register
+ section names from .regXXX to .reg/XXX to avoid parsing ambiguity
+ in gdb/corelow.c. Create alias .reg section for the currently
+ running thread.
+
+Fri Sep 24 13:22:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libecoff.h (ecoff_backend_data): Removed big_magic and
+ little_magic fields.
+ * coff-alpha.c (alpha_ecoff_backend_data): Removed initialization
+ of big_magic and little_magic.
+ * coff-mips.c (mips_ecoff_bad_format_hook): Make sure magic number
+ matches endianess of bfd.
+ (mips_ecoff_backend_data): Removed initialization of big_magic and
+ little_magic.
+ * ecoff.c (ecoff_set_arch_mach_hook): Set MIPS machine number
+ based on magic number. Support r4000 magic numbers.
+ (ecoff_get_magic): New function.
+ (ecoff_write_object_contents): Use ecoff_get_magic, not fields in
+ the backend structure.
+ * cpu-mips.c (arch_info_struct): Added case for r6000.
+
+ For MIPS configurations put both big and little endian versions in
+ the list of targets; the code is getting compiled in anyhow.
+ * bigmips.mt (SELECT_VECS): Define to be ecoff_little_vec.
+ * decstation.mt (SELECT_VECS): Define to be ecoff_big_vec.
+ * mipsbelf.mt (SELECT_VECS): Define to be bfd_elf32_littlemips_vec.
+ * mipslelf.mt (SELECT_VECS): Define to be bfd_elf32_bitmips_vec.
+ * riscos.mt (SELECT_VECS): Define to be ecoff_little_vec.
+
+Fri Sep 24 00:42:23 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * osf-core.c: New file for OSF/1 core file support.
+ * config/alphaosf.mh (HDEFINES): Add -DOSF_CORE.
+ (HDEPFILES): Set to osf-core.o.
+ * bfd-in2.h (union tdata): Add osf_core_data member.
+ * targets.c: If OSF_CORE is defined, add osf_core_vec to target list.
+ * Makefile.in (OPTIONAL_BACKENDS): Add osf-core.o.
+ (osf-core.o): New dependency.
+
+Thu Sep 23 21:04:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * TODO: Remove note about making --with-bfd-targets use canonical
+ target configuration name (already done); reword item about
+ separating reading and writing stuff to not refer to a
+ non-existent item.
+
+ * ecoff.h (ecoff_set_arch_mach_hook): Accept MIPS_MAGIC_LITTLE2
+ and MIPS_MAGIC_BIG2.
+
+Thu Sep 23 11:06:34 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * gen-aout.c (main): Output newline after end of comment, not
+ before. (Reported by Jonathan Stone,
+ jonathan@oscar.stanford.edu).
+
+Thu Sep 23 10:48:27 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * archive.c (compute_and_write_armap): Put weak symbols in the
+ armap.
+
+ * elfcode.h (fix_up_strtabs): Set sh_entsize for the .stab
+ section, not the .stabstr section. Set the type of the .stabstr
+ section to SHT_STRTAB.
+ (elf_section_from_bfd_section): Handle SHT_STRTAB sections.
+
+ * section.c (SEC_DEBUGGING): New section flag.
+ * elfcode.h (bfd_section_from_shdr): If section is SHT_PROGBITS,
+ and the name starts with .debug, .line or .stab, set
+ SEC_DEBUGGING. If SHT_STRTAB, check for .debug and .stab.
+ * elf32-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added
+ SEC_DEBUGGING to section_flags.
+ * elf64-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added
+ SEC_DEBUGGING and SEC_CODE to section_flags.
+ * bfd-in2.h: Updated.
+
+Wed Sep 22 16:34:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * bfd.c (tdata): Add lynx_core_data.
+
+ * ecoff.c (ecoff_compute_section_file_positions): Set filepos for
+ sections with SEC_LOAD set, even if SEC_HAS_CONTENTS is clear.
+ (ecoff_write_object_contents): Don't set scnptr to zero just
+ because size of section is zero. Needed for Irix 4.0.5F.
+
+Wed Sep 22 09:49:32 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.bfd: Use i960-bout, not i960-coff for i960-*-nindy*.
+
+Wed Sep 22 07:34:09 1993 Stu Grossman (grossman at cygnus.com)
+
+ * Makefile.in (OPTIONAL_BACKENDS): Add lynx-core.o.
+ * bfd-in2.h (tdata): Add lynx_core_data;
+ * config.bfd configure.host: Get rid of superfluous netbsd and
+ lynxos entries.
+ * configure.in: Add lynx-core.o to Lynx config.
+ * i386lynx.c: Add defs for core file support.
+ * lynx-core.c: New file with Lynx core file support.
+ * hosts/i386lynx.h: Move lots of host specific includes to here.
+ Add def of HOST_LYNX. Remove unnecessary defs.
+
+Mon Sep 20 19:18:10 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (bfd_section_from_shdr): Only set SEC_DATA for a
+ SHF_PROGBITS or SHT_STRTAB section if SEC_ALLOC is set. Never set
+ SEC_DATA for a SHF_NOBITS section.
+
+ * nlm32-i386.c (nlm_i386_mangle_relocs): Check SEC_LOAD rather
+ than SEC_CODE | SEC_DATA. Add some casts to avoid warnings.
+ * nlmcode.h: Add some casts to avoid warnings.
+ (nlm_write_object_contents): Ignore relocs for sections that are
+ neither code nor data. Just use the symbol value for debugging
+ symbols; don't offset by the section vma.
+
+Fri Sep 17 18:08:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Don't return an error when
+ performing a reloc against an undefined weak symbol.
+ * syms.c (bfd_print_symbol_vandf): Show value of BSF_WEAK rather
+ than obsolete BSF_EXPORT.
+
+Fri Sep 17 02:04:31 1993 John Gilmore (gnu@cygnus.com)
+
+ * hosts/{alphaosf.h, amix.h, apollo68.h, apollov68.h,
+ decstation.h, delta88.h, dgux.h, dose.h, go32.h, harris.h,
+ hp300.h, hp300bsd.h, hppabsd.h, hppahpux.h, i386aix.h, i386bsd.h,
+ i386linux.h, i386lynx.h, i386v.h, i386v4.h, irix3.h, irix4.h,
+ mipsbsd.h, ncr3000.h, rs6000.h, rtbsd.h, solaris2.h, sparc-ll.h,
+ std-host.h, stratus.h, sun3.h, sysv4.h, tahoe.h, ultra3.h,
+ vaxult.h, vaxult2.h, we32k.h}: Make sure that "offsetof" is
+ defined on all hosts, now that archive.c uses it.
+
+Thu Sep 16 18:20:30 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_map_symbols): Create section symbols for all
+ sections, not just allocated sections; debugging sections can have
+ relocs.
+ (elf_symbol_from_bfd_symbol): If there is an output section, use
+ the section index from that rather than the input section.
+
+Thu Sep 16 12:20:50 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * libbfd-in.h (bfd_flush, bfd_stat): Reflect John's changes to
+ libbfd.h, which is regenerated from this file.
+
+ * bfd-in.h (symtype): Deleted typedef.
+
+Wed Sep 15 11:48:37 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libbfd.c (COERCExx): Cast x to bfd_signed_vma before doing the
+ xor and subtract. Otherwise it will not sign extend if the type
+ of bfd_vma is larger than int.
+
+ * ecoffswap.h (ecoff_swap_pdr_in): Get regoffset, iopt, fregoffset
+ and frameoffset as signed numbers. From Peter Schauer.
+
+Tue Sep 14 18:20:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-i386.c (elf_howto_table): Add bfd_elf_generic_reloc
+ special function for all reloc entries.
+ * elf32-target.h (TARGET_LITTLE_SYM): Add SEC_CODE to
+ section_flags.
+ * libelf.h (elf_symbol_type): Remove desc, type and other fields.
+ * Makefile.in (elf32-*.o): These depend upon elf32-target.h.
+
+Tue Sep 14 14:34:45 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * libbfd-in.h (struct artdata): Add armap_timestamp and
+ armap_datepos here too.
+
+Mon Sep 13 21:03:18 1993 John Gilmore (gnu@cacophony.cygnus.com)
+
+ Improve timestamp support in BSD archive files to avoid linker
+ warnings.
+
+ * libbfd.h (struct artdata): Add armap_timestamp and armap_datepos.
+ (bfd_flush, bfd_stat): Add prototypes.
+ * libbfd.c (bfd_flush): Add, does fflush on a BFD.
+ (bfd_stat): Add, does fstat on a BFD.
+
+ * archive.c (_bfd_write_archive_contents): At end of file writing,
+ verify and possibly update the timestamp in the armap, if a BSD
+ archive. FIXME! Kludge recognizes BSD archive, rather than
+ vectoring properly. Should add to xvec.
+ (compute_and_write_armap): Move prototype to top, avoid PROTO.
+ (bsd_write_armap): Save timestamp and file location thereof, when
+ writing the armap in a BSD file.
+ (bsd_update_armap_timestamp): New function to check and
+ rewrite the timestamp.
+
+ * hosts/std-host.h (offsetof): Define, if not already, for archive.c.
+
+Sat Sep 11 18:13:42 1993 Jim Kingdon (kingdon@poseidon.cygnus.com)
+
+ * hosts/i386sco.h: Define a bunch of stuff for core files.
+ * sco-core.c: Remove, replace by trad-core.c.
+ * trad-core.c: If HOST_STACK_START_ADDR is defined, use it.
+ * config/i386sco.mh: Use trad-core not sco-core.
+ * hosts/i386isc.h, config/i386isc.mh: Remove.
+ * configure.host: Use i386sco for isc.
+ * config/i386-sco.mt: Remove, identical to i386-coff.mt.
+ * config.bfd: Use i386-coff not i386-sco.
+
+ * config.bfd: Recognize i[34]86-*-solaris2* specifically rather
+ than using *-*-solaris2* (i486-unknown-solaris2 is i386-elf, not
+ i486-elf which doesn't exist).
+
+Fri Sep 10 12:56:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coffswap.h (coff_swap_aouthdr_out): For ALPHAECOFF, force
+ padding field to zero.
+
+ * config.bfd (i[34]86-*-netbsd*): New target; use i386-netbsd.
+ * configure.in: Remove bogus netbsd386 handling.
+
+ * coff-mips.c: Don't warn about overflow for MIPS_R_JMPADDR reloc.
+ Correct overflow detection requires matching the upper four bits
+ of the destination against the PC.
+
+Thu Sep 9 16:57:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in: Make 64-bit stuff work with "--with-targets=all".
+
+Tue Sep 7 14:17:02 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libbfd-in.h: Removed swapping routines declarations.
+ * bfd-in.h: Added swapping routine declarations, and renamed them
+ from _do_* to bfd_*.
+ * libbfd.c: Renamed swapping routines from _do_* to _bfd_*.
+ * Changed all callers.
+ * libbfd.h, bfd-in2.h: Rebuilt.
+
+Mon Sep 6 15:28:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-i386.c (elf_howto_table): Set pcrel_offset to true for
+ R_386_PC32.
+
+Fri Sep 3 13:06:12 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in: Reorganized setting of makefile variables so
+ 64-bit stuff works again.
+
+ * libbfd-in.h (_do_get*, _do_put*): Renamed via macros to clean up
+ namespace.
+
+ * libelf.h (elf32_symbol_type, elf64_symbol_type): Deleted
+ "native_elf_sym" field, merged to make new type "elf_symbol_type".
+ (struct elf_obj_tdata): Field symbols is now elf_symbol_type*.
+ Deleted field raw_syms.
+ (obj_symbols): Remove cast.
+ (obj_raw_syms): Deleted.
+ * elfcode.h (elf_slurp_symbol_table): Don't set raw_syms or
+ native_elf_sym fields.
+ * elf32-hppa.c: Changed uses of elf32_symbol_type to
+ elf_symbol_type.
+
+ From Pete Hoogenboom and Jeff Law:
+
+ * elf32-hppa.c (ELF_MAXPAGESIZE): Define.
+
+ * elf32-hppa.c (elf_hppa_tc_symbol): If the argument relocation
+ bits are zero (e.g., they specify no relocations), then do not
+ even bother adding their entries to the symextn section.
+
+ * elf32-hppa.c (elf_hppa_tc_symbol): Any function, regardless
+ of scope can have an argument relocation stub.
+
+ * elf32-hppa.c: (Elf32_hppa_Stub_description): Rename this
+ structure and type to elf32_hppa_stub_description. This makes
+ it consistent with the GNU coding conventions.
+ (elf32_hppa_stub_description): Added a 'next' field to allow
+ linking of stub description structures.
+ (elf32_hppa_stub_description): Added a 'stub_listP' field to
+ keep track of individual stubs.
+ (Elf32_hppa_Stub_list, Elf32_hppa_Stub_list_struct): Removed.
+ Combined with the elf32_hppa_stub_description structure.
+ (elf32_hppa_stub_name_list): New type to keep track of
+ individual stubs.
+ (add_stub): Removed.
+ (add_stub_by_name): New function.
+ (find_stub_by_name): New function.
+ (hppa_elf_build_arg_reloc_stub): Allow reusing stubs that
+ already exist.
+ (hppa_elf_build_long_branch_stub): Allow reusing stubs that
+ already exist.
+
+ * elf32-hppa.c: (retval_mismatches): The direction of argument
+ relocation was reversed.
+ (hppa_elf_build_arg_reloc_stub): Return address was not being
+ restored.
+ (hppa_elf_arg_reloc_needed_p): Add argument containing caller
+ argument relocation bits so this function can be used in the check
+ for plabel stubs.
+ (hppa_elf_stub_check): Pass caller argument relocation bits into
+ hppa_elf_arg_reloc_needed_p().
+ (hppa_look_for_stubs_in_section): Add check for plabel stubs and
+ pass caller argument relocation bits into
+ hppa_elf_arg_reloc_needed_p().
+
+Thu Sep 2 00:59:55 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * libhppa.h (hppa_field_adjust): Remove unused `init_value' variable.
+
+ * hosts/delta88v4.h: New for SVR4.
+ * configure.hosts: Use it.
+
+Wed Sep 1 14:23:32 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * libaout.h, netbsd386.c: Change M_I386 to M_386_NETBSD. M_I386
+ is an SCO pre-define.
+
+Tue Aug 31 12:50:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlmcode.h (nlm_object_p): Set HAS_SYMS if there are external
+ references.
+ (nlm_swap_auxiliary_headers_{in,out}): The copyright length is
+ only one byte.
+ (nlm_get_symtab_upper_bound): Include debugging symbols in symbol
+ count.
+ (nlm_slurp_symbol_table): Make symlength unsigned. Read debugging
+ symbols as BFD local symbols.
+ (nlm_write_object_contents): Don't bother writing out exported
+ symbols more than once; they now appear in the symbol table more
+ than once (with and without a prefix) if necessary. Set offset
+ values to be non-zero as NLMLINK does.
+
+Tue Aug 31 12:07:43 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * libhppa.h: Restore #undefs of e_fsel and other e_* symbols.
+
+Fri Aug 27 16:43:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * section.c (struct sec): Move position of user_set_vma, and
+ document it.
+ (SEC_BALIGN): Disable for now. I don't think it's currently used.
+
+ * elf32-hppa.c (elf_hppa_howto_table): Now static.
+ (symext_rootP, symext_lastP, global_value, GOT_value,
+ global_symbol, global_sym_defined, symextn_contents,
+ symextn_contents_real_size, elf_hppa_stub_rootP,
+ elf32_hppa_symextn_map, elf32_hppa_symextn_map_size): Rely on
+ default initialization.
+ (hppa_elf_gen_reloc_type): Macro "UNDEFINED" doesn't need a
+ trailing semicolon.
+ (hppa_look_for_stubs_in_section): Introduce temporaries to make
+ code more readable in 80 columns.
+
+ * libhppa.h (all functions): Now inline under GNU C.
+
+ More patches from Jeff Law:
+
+ * elf32-hppa.c (AR_WARN): Give argument which caused the
+ invalid argument relocation.
+ (AR_UNIMP): Delete unused macro.
+ (hppa_elf_set_section_contents): Always return a value.
+ (elf32_hppa_backend_table_processing): Likewise.
+ (elf32_hppa_backend_section_processing: Likewise.
+
+ * som.c: New file containing SOM specific code extracted
+ from hppa.c
+
+ * som.h: New file containing SOM specific code extracted
+ from libhppa.h
+
+ * hppa.c: Deleted.
+
+ * libhppa.h: Delete SOM specific code. Add generic PA
+ code which can be shared by both SOM and ELF backends.
+
+ * Makefile.in: Replace hppa.c with som.c. elf32-hppa.o
+ depends on libhppa.h now.
+
+ * configure.in (hppa_vec): Needs som.o module instead of
+ hppa.o.
+
+ * elf32-hppa.c: Include libhppa.h. Do not define
+ BYTES_IN_WORD.
+
+ * elf32-hppa.h (hppa_reloc_field_selector_type): Delete
+ now lives in libhppa.h.
+ (hppa_reloc_field_selector_type_alt): Likewise.
+
+ * hosts/hppabsd.h: Include <stdlib.h> and <unistd.h>. Do not
+ define malloc or free.
+
+ * config/hppa-elf.mt (SELECT_ARCHITECTURES): Don't define
+ SELECT_VECS.
+
+ * elf32-hppa.c (hppa_elf_relocate_unwind_table): Delete unused
+ variables.
+ (elf_hppa_reloc_type_lookup): Likewise.
+ (elf_hppa_tc_make_sections): Likewise.
+ (hppa_elf_arg_reloc_needed_p): Likewise.
+ (hppa_elf_build_long_branch_stub): Likewise.
+ (elf_reloc_map): Delete, no longer used.
+ (elf_hppa_reloc_map): Likewise.
+ (elf32_hppa_symextn_map_max_size): Likewise.
+ (elf32_hppa_get_sym_extn): Abort if type is bogus.
+
+ * elf32-hppa.c (elf32_hppa_backend_fake_sections): Add processing
+ of the .hppa_unwind section.
+
+Wed Aug 25 16:13:49 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config.bfd: recognize m88110.
+
+Tue Aug 24 16:32:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ Merged changes from Jeff Law and Pete Hoogenboom at Utah:
+
+ * elfcode.h (elf_section_from_bfd_section): Add detection of
+ SHT_NOTE sections.
+
+ * elf32-hppa.c:
+ (hppa_elf_build_long_branch_stub,hppa_elf_long_branch_needed_p):
+ New functions for support of long branch stubs.
+ (hppa_elf_stub_check,hppa_look_for_stubs_in_section): Add
+ check for long branch stubs.
+ (hppa_look_for_stubs): Unused function. Removed.
+ (hppa_elf_set_section_contents): Implement a PA/ELF-specific
+ version of bfd_set_section_contents.
+ (hppa_elf_long_branch_needed_p): Only output debugging diagnostics
+ when BFD is configured for debugging.
+
+ * elf32-hppa.c: (elf32_hppa_get_symextn_chain): New function
+ to return a list of symbols that have non-zero argument
+ relocation bits.
+ (hppa_elf_stub_finish): Make sure stub generation is done only
+ once.
+
+ * elf32-hppa.c: (hppa_elf_stub_reloc): New function for
+ generation relocation entries within a stub.
+ (hppa_elf_build_arg_reloc_stub): Corrections to argument
+ relocation stubs.
+
+ * elf32-hppa.c: New #define's for argument relocation types.
+ (mismatches, retval_mismatches): Updated to reflect new
+ argument relocation types.
+ (CURRENT_STUB_OFFSET): New macro.
+
+ * elfcode.h (map_program_segments): Set the PF_X bit for data
+ segments.
+
+ * elf32-hppa.c: (elf_hppa_howto_table): Add
+ R_HPPA_STUB_CALL_17 for support of linker stub generation.
+ (hppa_elf_reloc): Add support of R_HPPA_STUB_CALL_17
+ relocation type.
+
+ * elf32-hppa.h: (elf32_hppa_reloc_type): Add
+ R_HPPA_STUB_CALL_17 for support of linker stub generation.
+
+ * hppa_stubs.h: Add new instructions that are used in linker
+ stub generation.
+
+ * elf32-hppa.c (hppa_elf_relocate_unwind_table): The offsets in an
+ unwind descriptor were incorrect.
+
+ * libelf.h (bfd_elf_find_section): Declare.
+
+ * elf32-hppa.c: (elf32_hppa_backend_symbol_processing): New
+ function in place of global_sym field in elf_backend_data
+ structure.
+ (elf32_hppa_backend_symbol_table_processing,
+ elf32_hppa_backend_section_processing,
+ elf32_hppa_backend_fake_sections,
+ elf32_hppa_backend_section_from_shdr,
+ elf32_hppa_backend_section_from_bfd_section): New functions to
+ provide support of symbol extension sections and argument
+ relocation stubs.
+ (elf_info_to_howto): Remove call to abort().
+
+ * elf32-target.h: Support for special processing by the backend.
+ (struct elf_backend_data): Added elf_backend_symbol_processing,
+ elf_backend_symbol_table_processing,
+ elf_backend_section_processing, elf_backend_section_from_shdr,
+ elf_backend_fake_sections, and
+ elf_backend_section_from_bfd_section fields.
+ * elfcode.h: (bfd_section_from_shdr): Add a check for
+ processor-specific section types.
+ (elf_fake_sections): Add a check for processor-specific
+ section types.
+ (bfd_elf32_write_object_contents): Add a check to see if
+ there is any final section processing to be done by the
+ backend.
+ (elf_section_from_bfd_section): Add a check for
+ processor-specific section types.
+ (elf_slurp_symbol_table): Remove reference to global_sym in the
+ elf_backend_data structure. Replace it with a call to
+ elf_backend_symbol_processing.
+ * libelf.h: Remove global_sym field in the elf_backend_data
+ structure. Replace it with a series of backend-specific
+ functions.
+
+ * elf32-hppa.c (hppa_elf_stub_branch_reloc): The formal argument
+ stub_sym should be called target_sym.
+ (hppa_elf_build_arg_reloc_stub): Refer to the stub bfd (abfd)
+ rather than the output bfd (output_bfd).
+ (hppa_elf_reloc): Get rid of references to the global_sym field in
+ the elf_backend_data structure.
+
+ * elfcode.h (elf_fake_sections): Check the correct condition for
+ .bss. Also, detect the existence of a .note section.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): r_format argument should
+ have been r_field.
+
+ * hosts/hppabsd.h (HOST_MACHINE_ARCH): Reference to bfd_arch_m68k
+ should be a reference to bfd_arch_hppa.
+
+ * hppa.c (hppa_vec): Replace bfd_false with _bfd_dummy_target in
+ the bfd_check_format structure to avoid a type mismatch.
+
+Mon Aug 23 1993 Sean Fagan (sef@cygnus.com)
+ and Jim Kingdon (kingdon@cygnus.com)
+
+ Add NetBSD support:
+ * netbsd386.c: New file.
+ * aoutx.h: Make sym_is_debugger_info true for N_FN.
+ * Makefile.in, aout-target.h, config.bfd, configure.host, configure.in,
+ libaout.h, targets.c: Other changes.
+
+Fri Aug 20 17:04:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config/m88k-elf.mt: New file.
+ * config.bfd: Use it for m88*-*-sysv4*.
+
+Fri Aug 20 15:16:58 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elfcode.h (elf_build_phdrs): Unused function deleted.
+ (bfd_shdr_from_section): Ditto.
+ (write_relocs): Don't change section contents for addend.
+ (elf_locate_sh): Return type is now always elf_internal_shdr,
+ since the other types were really aliases for this type anyways.
+ Don't compile this function, since it is static and doesn't appear
+ to be used in this file.
+ (sym_is_global): Return non-zero for weak symbols. Abort if
+ section pointer is null.
+ (swap_out_syms): Reorder tests so function symbols can be weak.
+ (elf_slurp_symbol_table): Don't use BSF_EXPORT.
+ (elf_slurp_reloca_table): Make RELOC_PROCESSING section smaller by
+ extracting out some common code. Abort if BFD section symbol has
+ null name.
+ (elf_slurp_reloc_table): Translate ELF section symbols into BFD
+ section symbols. Don't read section contents to fill in addend
+ field.
+
+ * elf32-i386.c (elf_howto_table): All partial_inplace fields
+ should be "true".
+
+ * Merged from OSF:
+
+ Tue Jun 15 14:38:32 1993 Michael Meissner (meissner@osf.org)
+
+ * libelf.h (struct Elf_Sym_Extra): New structure to contain ELF
+ specific information for a symbol. Put in elf_sym_num, which
+ gives the external symbol number in the elf object file, since
+ local symbols must come before global symbols.
+ (elf_sym_extra): New macro.
+ (elf_symtab_map): Delete, in favor of using Elf_Sym_Extra.
+ * elfcode.h (elf_map_symbols): Use Elf_Sym_Extra to map internal
+ symbol number to external number. Store the address of the
+ Elf_Sym_Extra field for the symbol in the udata field.
+ (elf_write_object_contents): Use Elf_Sym_Extra to map out symbols.
+
+ Sun Jun 20 16:30:11 1993 Michael Meissner (meissner@osf.org)
+
+ * elfcode.h (elf_obj_tdata): Add field to count the size of the
+ array of pointers to section symbols.
+ (elf_map_symbols): Bump the max index of the section symbols so
+ that we don't overwrite memory. Store the max index into the
+ elf_obj_tdata field.
+
+ Sat Jun 19 10:12:27 1993 Michael Meissner (meissner@osf.org)
+
+ * elfcode.h (elf_obj_tdata): Add pointer to an array of pointers
+ to the section symbols we created. Remove unused field
+ internal_syms.
+ (elf_map_symbols): Fill in array of pointers to section symbols.
+ Only create section symbols for sections that have SEC_ALLOC set,
+ and have non-zero size.
+ (elf_symbol_from_bfd_symbol): If udata is NULL, and this is a
+ section symbol, look up the section in the list of section
+ symbols, and set the udata pointer appropriately. Otherwise, if
+ udata is still NULL, fail an assertion, and use 0, instead of
+ dropping core.
+
+Fri Aug 20 12:18:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config.bfd (mips-*-elfl*, mips-*-elf*): New targets, using
+ mipslelf and mipsbelf respectively.
+ * config/mipslelf.mt, config/mipsbelf.mt: New files.
+ * elf32-mips.c: Added some reloc information.
+ * configure.in: Fixed error message.
+
+ * ecoff.c (ECOFF_LONG_SIZE): Removed. Just use constants.
+
+Thu Aug 19 09:45:51 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * Makefile.in (BFD_LIBS, ALL_MACHINES, BFD32_BACKENDS, BFD64_BACKENDS,
+ OPTIONAL_BACKENDS): Alphabetize entries and add a few missing ones.
+ * archures.c: Alphabetize decls.
+
+ * configure.in, targets.c: Add missing vectors to the tables.
+ * targets.c (target_vector) [!SELECT_VECS]: Add DEFAULT_VECTOR.
+ Remove hp300bsd_vec due to clash with sunos_big_vec.
+
+Tue Aug 17 18:12:32 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/i386{mach3,osf1mk}.h: New files, for Mach hosting.
+ * hosts/i386mach.h: removed, replaced by i386osf1mk.h.
+ * config/i386mach3.mt, i386mach3.c: New files, for Mach a.out format.
+ * Makefile.in, configure.host, config.bfd: Corresponding changes.
+ * hosts/decstation.h: Include <sys/param.h> not <machine/param.h>.
+
+Tue Aug 17 15:19:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coffgen.c (coff_section_symbol): If section's output_section is
+ not yet set, point to itself. This is needed because this is
+ called on the output file, not the input file.
+
+ * coff-rs6000.c (dummy_reloc, RTYPE2HOWTO): Set howto field to a
+ dummy value, rather than leaving it NULL.
+
+ * archures.c (bfd_default_set_arch_mach): Set bfd_error on
+ failure.
+ * aoutx.h (NAME(aout,set_arch_mach)): Check return value of
+ bfd_default_set_arch_mach.
+
+Tue Aug 17 09:42:16 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * config.bfd (cpu): Extract from canonical name with sed.
+ * configure.in: Don't pass it.
+
+Sun Aug 15 20:45:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * bfd-in.h: Remove {BYTE,WORD,LONG}_SIZE; they are pointless and
+ BYTE_SIZE conflicts with a Mach header.
+ * ecoff.c: Change LONG_SIZE to ECOFF_LONG_SIZE and define it.
+
+ * configure.host: Make sure all OS fields end in *.
+
+Fri Aug 13 16:33:33 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_slurp_reloc_table): Use bfd_abs_section for
+ RELOC_SECTION_NONE and RELOC_SECTION_ABS. If a reloc section
+ doesn't exist, don't try to create it.
+
+ * nlmcode.h (nlm_write_object_contents): procedure offsets are
+ from start of code segment, not start of file.
+ * config/i386-nlm.mt (DEFAULT_VECTOR): It's nlm32_i386_vec, not
+ bfd_nlm32_i386_vec.
+ * configure.in (SELECT_VECS switch): Likewise.
+
+Thu Aug 12 10:32:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * format.c (bfd_check_format): If the target matches the default
+ target, set match_count to 1, to ignore any previous matches.
+
+ * Makefile.in (BFD32_BACKENDS): Remove srec.o, add reloc16.o.
+
+ * configure.in: Add reloc16.o when we add
+ coff-h8300.o, coff-h8500.o, coff-sh.o, coff-z8k.o.
+ Makefile.in (BFD_LIBS): Remove reloc16.o.
+
+ * config/u68k-coff.mt: Fix typo, DEFAULT_TARGET for
+ DEFAULT_VECTOR.
+
+ * config/h8300-coff.mt, h8500-coff.mt, sh-coff.mt, st2000.mt,
+ z8k-coff.mt (DEFAULT_VECTOR): Define. Don't explicitly add
+ S-records via SELECT_VECS.
+
+ * targets.c (target_vector), Makefile.in (BFD_LIBS): Always
+ support S-records, for convenience.
+
+Thu Aug 12 08:30:05 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-alpha.c (alpha_howto_table, alpha_finish_reloc,
+ alpha_ecoff_swap_reloc_{in,out}, alpha_bfd_reloc_type_lookup):
+ Read and write Alpha relocs. Can't process them yet.
+ * ecoff.c (ecoff_slurp_reloc_table): Recognize new reloc sections.
+ If the section does not already exist, create it.
+
+ * ecoffswap.h (ecoff_swap_pdr_{in,out}): Handle new fields defined
+ on the Alpha.
+
+ * libecoff.h (ecoff_backend_data): Added constructor_reloc and
+ finish_reloc fields.
+ * ecoff.c: Move MIPS reloc support from here...
+ * coff-mips.c: to here.
+ * ecoff.c (ecoff_set_symbol_info): Get constructor reloc howto
+ from backend.
+ (ecoff_slurp_reloc_table): Removed MIPS specific stuff. Call
+ finish_reloc backend function.
+ (ecoff_write_object_contents): Removed MIPS specific assertions.
+ * coff-mips.c (mips_finish_reloc): New function.
+ (mips_ecoff_backend_data): Fill in new fields.
+ * coff-alpha.c (alpha_ecoff_backend_data): Use NULL for new
+ fields.
+ * targets.c: Added extern for ecoffalpha_little_vec.
+
+ * bfd.c (_bfd_host_big_endian): Removed.
+ * bfd-in.h (HOST_BYTE_ORDER_BIG_P, bfd_header_twiddle_required):
+ Removed.
+ * bfd-in2.h: Regenerated.
+
+Wed Aug 11 12:11:23 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * config.bfd: New file, broken out of configure.in.
+ * configure.in: Use it, and use standard target names for
+ --with-targets, replacing --with-bfd-targets.
+
+ * archures.c (archures_init_table): Add bfd_sh_arch.
+
+ * configure.in: Include coff-m68k.o for m68kcoffun_vec.
+ Include nlm32.o and nlm.o for bfd_nlm32_i386_vec.
+ Fix error in error message.
+
+ * oasys.c: Make bfd_error_vector extern.
+
+ * configure.in: Include stab-syms.o for a.out/b.out targets
+ and hp300{bsd,hpux}.
+
+Wed Aug 11 06:40:51 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * nlmcode.h (nlm_compute_section_file_positions): Add the .bss
+ section before setting output_has_begun.
+ (nlm_set_section_contents): Remove argument names from
+ mangle_relocs_func prototype.
+ (nlm_write_object_contents): Remove shadowing local variable.
+ Don't write out debugging symbols if debugInfoOffset is -1. Add
+ the codeImageOffset to the start, exit, and check procedure
+ offsets.
+ * nlm32-i386.c (nlm_i386_write_reloc, nlm_i386_mangle_relocs):
+ Don't check partial_inplace field; its value is irrelevant.
+
+ * Base use of sco-core on host, not target.
+ * configure.host (i[34]86-*-sco*): Use i386sco rather than i386v.
+ * config/i386-sco.mt (TDEFINES): Removed.
+ * config/i386sco.mh: New file to use sco-core.
+ * hosts/i386sco.h: New file; just includes hosts/i386v.h.
+
+ * ecoffswap.h (ecoff_swap_{hdr,ext}_{in,out}): Use signed
+ conversions for some fields.
+
+Tue Aug 10 13:32:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_gprel_reloc): If _gp is not defined, give an
+ error rather than aborting.
+
+ * libnlm.h (struct nlm_backend_data): Added mach field.
+ (nlm_machine): New accessor macro.
+ * nlm.c (nlm_mkobject): Set architecture and machine from backend
+ information.
+ * nlm32-i386.c (nlm32_i386_backend): Initialize new mach field.
+
+Tue Aug 10 09:31:18 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * configure.in: Replace calls to sort with shell code
+ to uniq the lists.
+
+Tue Aug 10 06:23:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in: Include aout32.o for any a.out/b.out formats.
+
+Mon Aug 9 09:37:18 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * config/i386-linux.mt (SELECT_VECS): Support bfd_elf32_i386_vec.
+ * config/m68k-elf.mt (SELECT_VECS): Support m68kcoff_vec.
+ * config/i386-elf.mt (SELECT_VECS): Support i386coff_vec.
+ * config/hppa-elf.mt (SELECT_VECS): Support hppa_vec.
+ * config/sparc-elf.mt (SELECT_VECS): Support sunos_big_vec.
+ * config/i386-sco.mt (SELECT_VECS): Don't define; Ian says it was
+ just a hack.
+
+Mon Aug 9 13:15:00 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config/m88k-coff.mt (DEFAULT_VEC -> DEFAULT_VECTOR): renamed.
+
+Mon Aug 9 14:26:45 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * syms.c (BSF_EXPORT): Now same as BSF_GLOBAL.
+
+ * bfd.c (bfd_scan_vma): New function.
+
+Mon Aug 9 11:29:53 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * bfd-in.h (bfd_get_architecture, bfd_get_machine): Removed
+ obsolete macros.
+ * bfd-in2.h: Updated.
+
+ * ecoff.c (ecoff_slurp_armap): Correct bug in initialization of
+ stringbase.
+
+Sun Aug 8 12:21:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * configure.in: Remove unneeded test.
+
+Sun Aug 8 12:41:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in ({dist,real}clean): Use $(MAKE), not make.
+
+Sat Aug 7 09:14:21 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * config/st2000.mt (TDEFINES): Don't define MRI; not used.
+
+ * PORTING, TODO, config/README: Update to reflect below changes.
+
+ * configure.in: Replace MINIMIZE and --with-minimal-bfd with
+ --with-bfd-targets="target1,target2,..." and the special target
+ "all" to get the previous default behavior.
+ Figure out which architecture and backend .o files are needed from
+ DEFAULT_VECTOR, SELECT_VECS, and SELECT_ARCHITECTURES as set in
+ the .mt files. Define TDEFAULTS based on them, also.
+
+ * Makefile.in: Remove references to MINIMIZE.
+ * archures.c, targets.c: Ditto.
+
+ * config/*.mt: Define DEFAULT_VECTOR, SELECT_VECS, and
+ SELECT_ARCHITECTURES as variables rather than as -D arguments to
+ TDEFAULTS.
+
+ * config/a29k-coff.mt,alphaosf.mt, i386-sco.mt, i960-bout.mt,
+ i960-coff.mt (TDEFAULTS): Don't put the default vector in
+ SELECT_VECS manually; it's automatic now.
+
+ * config/i386-sco.mt (TDEFAULTS): Don't put &sco_core_vec in
+ SELECT_VECS manually; -DSCO_CORE does it automatically now.
+
+ * config/h8300-coff.mt,h8500-coff.mt,sh-coff.mt,st2000.mt,z8k-coff.mt
+ (TDEFAULTS): Don't define BFD; not used.
+
+ * config/hppaosf.mh (HDEFINES): Don't define SELECT_ARCHITECTURES;
+ this is a host, not a target.
+
+Sat Aug 7 05:28:03 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * elfcode.h (elf_object_p): Add comment about what this function
+ does and to watch out for side effects. Add FIXME for memory leaks.
+ Fix comment about checking for matching byte order. Preserve
+ pointer to old tdata (if any), and restore it if we don't match
+ file with target vector. If we are going to use goto's, use them
+ consistently and maintainably.
+ * nlmcode.h (nlm_object_p): Expand comments about leaked memory
+ to note that the problem is even more serious than just leaked
+ memory. Replace goto with more traditional return.
+
+Fri Aug 6 12:00:03 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ Fix incorrect or useless makefile variable definitions:
+ * config/news.mt, config/u68k-coff.mt (TDEFAULTS): Use this to
+ define DEFAULT_VECTOR, instead of TDEFINES.
+ * config/i386aix.mh (MINIMIZE): Don't define.
+ * config/hppaosf.mh (MINIMIZE): Don't conditionalize.
+ * config/rs6000.mh (ALLOCA),
+ * config/i386v.mh (ALLOCA),
+ * config/i386linux.mh (ALLOCA),
+ * config/i386isc.mh (ALLOCA),
+ * config/go32.mh (EXTRALIBS): Don't define; not used.
+ * config/solaris2.mh (HDEFINES): Renamed from H_DEFINES.
+ * config/alphaosf.mt (TDEFINES): Set it, not HDEFINES.
+ * config/z8k-coff.mt (CC): Don't define. It's a target, not a host.
+
+ * config/README: New file, explaining the variables.
+
+ * targets.c (target_vector): Add hp300_bsd_vec.
+ * Makefile.in (BFD32_BACKENDS, CFILES): Add hp300bsd.
+ (hp300bsd.o): New rule.
+
+Fri Aug 6 15:13:22 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * libelf.h (NAME): Provide a default definition, that's neither
+ for 32 bits nor for 64.
+
+ Tue Jun 15 14:38:32 1993 Michael Meissner (meissner@osf.org)
+
+ * libelf.h (elf_hash): Change declaration to bfd_elf_hash, since
+ that is what is in elf.c.
+
+Fri Aug 6 12:28:38 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_set_symbol_info): Removed special handling for
+ scBss and scSBss symbols, since it was wrong.
+
+ * Makefile.in (coff-mips.o, coff-alpha.o): Don't depend on
+ coffcode.h.
+
+ * coffcode.h (sec_to_styp_flags): Inspired by mb@tti.COM (Michael
+ Bloom): Only set STYP_BSS for SEC_ALLOC sections.
+
+ * ecoff.c (ecoff_slurp_armap): From Arne Henrik Juul
+ <arnej@kari.fm.unit.no>: Handle a COFF style armap.
+
+Fri Aug 6 09:59:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hpux-core.c: Cast return value from bfd_zalloc.
+
+Thu Aug 5 13:22:44 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * aoutx.h (log2): Delete i387-specific code.
+
+ * Makefile.in (BFD_LIBS): Always include elf.o.
+ (BFD32_BACKENDS): Don't include elf.o here.
+ (ofiles): Delete references to ofiles2 and ofiles3.
+ (do_clean): Delete ofiles.
+ (BFDIN_H): Changed references to $(srcdir)/bfd-in2.h.
+ (stmp-bfd.h): Use bfd.h-new as temporary name, not bfd.h2.
+ (headers): Use bfd-in2.h-new as temporary name, not bfd.h-new.
+
+ * bfd-in.h: Reworded comment to make it clear that bfd-in2.h is a
+ generated file.
+
+ * reloc.c (enum bfd_reloc_code_real): Added i386-elf reloc types
+ (from Meissner's additions to bfd-in2.h).
+
+ * elf32-i386.c (ELF_MAXPAGESIZE): Define.
+
+ Merged:
+
+ Wed Jun 23 06:05:58 1993 Michael Meissner (meissner@osf.org)
+
+ * elfcode.h (elf_write_object_contents): Don't drop core if
+ elf_symbol_from returns a NULL pointer when processing a non-elf
+ symbol, use a 0 size instead.
+
+ Tue Jun 15 14:38:32 1993 Michael Meissner (meissner@osf.org)
+
+ * elfcode.h (elf_hash): Delete macro mapping elf_hash to
+ bfd_elf32_hash, since the hash table is independent of the 32/64
+ bit system.
+
+ * libelf.h (elf_hash): Change declaration to bfd_elf_hash, since
+ that is what is in elf.c.
+
+ Sat Jun 19 10:12:27 1993 Michael Meissner (meissner@osf.org)
+
+ * elf32-i386.h (reloc_type): Reformat spacing.
+ (elf_howto_table): Add the rest of the 386/ELF relocations.
+ (elf_i386_reloc_type_lookup): Ditto.
+ (elf_i386_info_to_howto): Ditto.
+ (elf_i386_info_to_howto_rel): Ditto.
+
+Thu Aug 5 10:07:43 1993 Fred Fish (fnf@cygnus.com)
+
+ * nlmcode.h (nlm_get_reloc_upper_bound): Test return value
+ of nlm_slurp_symbol_table as boolean, not pointer.
+ * nlmcode.h (nlm_canonicalize_reloc): Test return value
+ of nlm_slurp_reloc_fixups as boolean, not pointer.
+
+Wed Aug 4 16:22:55 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config/go32.mh: remove HDEFINES; since __MSDOS__ and __GO32__
+ are now predefined by GCC
+
+Wed Aug 4 16:06:29 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * coffgen.c (coff_print_symbol): Add the section offset to the
+ line number address, so it's printed the same way as the function
+ address. Only showed up for line numbers that aren't in the first
+ section (.text).
+
+Wed Aug 4 08:33:55 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libnlm.h (nlm_backend_data): Added nlm_mangle_relocs.
+ (nlm_mangle_relocs_func): New macro.
+ * nlm32-i386.c (nlm_i386_write_reloc): Rewrote correctly.
+ (nlm_i386_mangle_relocs): New function.
+ * nlmcode.h (nlm_compute_section_file_positions): Move all common
+ symbols into the .bss section.
+ (nlm_set_section_contents): Call the mangle_relocs function.
+ (nlm_write_object_contents): Treat a reloc against any defined
+ symbol as an internal reloc. Fix bug in external reloc counting.
+ Get the offset and debugging type right for .bss symbols. Only
+ output debugging symbols for defined symbols.
+
+ * coff-h8500.c (rtype2howto): Do an fprintf to stderr rather than
+ using printf.
+ * coff-z8k.c (rtype2howto): Likewise.
+ * coffcode.h (dummy_reloc16_extra_cases): Likewise.
+ * elf32-i386.c (TRACE): Likewise.
+ * hp300hpux.c (convert_sym_type, swap_std_reloc_in): Likewise.
+ * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
+ * coffgen.c (coff_print_symbol): Do an fprintf to the file
+ argument rather than using printf.
+
+Tue Aug 3 18:17:25 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffswap.h: Added macros used when accessing several fields;
+ default is the same as before.
+ (coff_swap_aouthdr_{in,out}): Handle the Alpha ECOFF fields.
+ * coff-alpha.c: Defined macros to use the right sizes in
+ coffswap.h.
+ * libecoff.h: Backend information is now in target vector, not
+ BFD. Start of backend information is COFF backend information.
+ * coff-alpha.c, coff-mips.c: Changed accordingly.
+ * ecoff.c (ecoff_mkobject): New function.
+ (ARMAP_START): Changed into backend information, since Alpha uses
+ a different name.
+ (ecoff_slurp_armap): Don't overlay archive header.
+ * bfd.c: Include libcoff.h.
+
+Tue Aug 3 16:33:11 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * Makefile.in (install): Fix sh syntax error.
+
+ * aoutf1.h: Make bfd_error_trap extern; it's defined in bfd.c.
+
+Tue Aug 3 15:19:09 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * nlm_slurp_symbol_table: Don't use '&' on arrays.
+
+Tue Aug 3 11:06:28 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * ecoff.c: New file for generic ECOFF functions.
+ * ecoffswap.h: New file for ECOFF swapping functions which differ
+ only slightly for different targets.
+ * libecoff.h: Added prototypes for ecoff.c functions.
+ (ecoff_backend_data): New structure.
+ (ecoff_tdata): Added backend_data field. Changed external data
+ pointers to be PTR rather than to a particular struct.
+ (ecoff_symbol_struct): Moved in from coff-mips.c.
+ * coff-alpha.c, coff-mips.c: Moved common functions into ecoff.c.
+ Added ECOFF backend structures. Include ecoffswap.h.
+ * coff-msym.c: Removed; superseded by ecoffswap.h.
+ * bfd.c: Include coff/internal.h.
+ * Makefile.in (BFD_LIBS): Removed coff-mips.o and coff-msym.o.
+ Added ecoff.o.
+ (BFD64_BACKENDS): Added coff-alpha.o.
+ (CFILES): Removed coff-msym.c. Added ecoff.c.
+ (bfd.o): Added dependency on $(INCDIR)/coff/sym.h.
+ (coff-mips.o): Added dependency on ecoffswap.h and coff/ecoff.h.
+ (ecoff.o, coff-alpha.o): New targets.
+ (coff-msym.o): Removed target.
+
+Mon Aug 2 23:33:38 1993 John Gilmore (gnu@cygnus.com)
+
+ * elf32-hppa.h, hosts/*: Remove (one more time) all occurrances
+ of EXFUN in the BFD sources. Heave ho!
+
+Mon Aug 2 16:45:57 1993 Stu Grossman (grossman at cygnus.com)
+
+ * coffcode.h (coff_set_arch_mach_hook): Add check for I386LYNXMAGIC.
+
+Mon Aug 2 12:18:03 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * hosts/sun3.h: remove some more conflicting decls
+
+Mon Aug 2 11:48:23 1993 Stu Grossman (grossman at cygnus.com)
+
+ * i386lynx.c: Remove unnecessary def of N_HEADER_IN_TEXT,
+ redefine TEXT_START_ADDR to be 0.
+
+Sun Aug 1 22:54:08 1993 Stu Grossman (grossman at cygnus.com)
+
+ * configure.host, configure.in, hosts/i386lynx.h: Lynx/386
+ host and target info.
+
+Fri Jul 30 18:08:27 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlm32-i386.c: New file. First cut at i386 NLM code.
+ * libnlm.h: Added some more prototypes.
+ (struct nlm_relent): New structure.
+ (nlmNAME(symbol_type)): Added rcnt and relocs fields.
+ (struct nlm_obj_tdata): Added new fields: nlm_symbols,
+ nlm_text_low, nlm_data_low, nlm_reloc_fixups,
+ nlm_reloc_fixup_secs.
+ (struct nlm_backend_data): New structure, with accessor macros.
+ * nlmcode.h: Use NLM_HIBIT rather than MSB.
+ (nlm_object_p): Set SEC_RELOC for .text and .data. Don't set
+ SEC_DATA for .bss. Set HAS_RELOC and HAS_SYMS for abfd. Set the
+ architecture.
+ (nlm_swap_fixed_header_out, nlm_swap_variable_header_out,
+ find_nonzero, nlm_swap_auxiliary_headers_out): New outbound
+ swapping functions.
+ (nlm_get_symtab_upper_bound, nlm_slurp_symbol_table): Include
+ external references in symbol table as undefined symbols.
+ (nlm_get_symtab, nlm_slurp_symbol_table): Fill in alocation
+ argument in get_symtab rather than in slurp_symbol_table.
+ (nlm_slurp_symbol_table): Save symbol information in tdata.
+ (nlm_print_symbol): New function.
+ (nlm_slurp_reloc_fixups, nlm_get_reloc_upper_bound,
+ nlm_canonicalize_reloc): New functions to read relocs.
+ (nlm_compute_section_file_positions, nlm_set_section_contents,
+ nlm_external_reloc_compare, nlm_write_object_contents): New
+ functions to create NLM files.
+ * nlm-target.h: Define all the nlm functions here either as
+ default values or in terms of nlmNAME. Use JUMP_TABLE(nlm). Set
+ the backend_data field to TARGET_BACKEND_DATA.
+ * nlm32-gen.c, nlm64-gen.c: Don't define function macros here;
+ they are now in nlm-target.h.
+ (TARGET_BACKEND_DATA): Define as NULL.
+ * nlm.c (nlm_mkobject): Do allocate the tdata field.
+ (nlm_set_arch_mach): New function.
+ * targets.c: Added nlm32_i386_vec.
+ * Makefile.in (BFD32_BACKENDS): Added nlm32-i386.o.
+ (CFILES): Added nlm32-i386.c.
+ (nlm32-gen.o, nlm64-gen.o): Depend on nlm-target.h.
+ (nlm32-i386.o): New target.
+
+Thu Jul 29 20:20:39 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * hosts/sun3.h: remove some function decls that conflict w/ ANSI
+ C, and aren't needed anyway (return int)
+
+Wed Jul 28 15:46:38 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elfcode.h: Use casts with bfd_alloc and alloca.
+
+Tue Jul 27 12:51:43 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * nlm{32,64}-gen.c (JUMP_TABLE_PREFIX): Delete.
+ * nlm{32,64}-gen.c (JUMP_TABLE_INIT): New macro that works with
+ older cpp's, that don't do additional replacement on the JUMP_TABLE
+ macro's argument.
+ * nlm-target.h (JUMP_TABLE_INIT): Use new macro in place of
+ JUMP_TABLE macro.
+
+Mon Jul 26 17:39:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ Yet another trad-core variant:
+ * config/esix.mh, hosts/esix.h: New files.
+ * configure.hosts: Use them.
+
+Mon Jul 26 13:22:15 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Handle the case of
+ complain_overflow_bitfield, rightshift > bitpos, and a negative
+ number.
+
+Mon Jul 26 14:40:10 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elfcode.h: Reimplement segment writing.
+ (elf_write_phdrs): Use precomputed e_phoff rather than making
+ assumptions.
+ (elf_build_phdrs): Disabled, for now.
+ (assign_file_position_for_section): Don't change file offset for
+ SHT_NOBITS.
+ (assign_file_positions_for_symtab_and_strtabs): New function.
+ (struct seg_info): New type.
+ (map_program_segments): New function.
+ (assign_file_positions_except_relocs): For executables, leave
+ section headers &c for last, and properly align all sections with
+ flag SHF_ALLOC set.
+ (prep_headers): No longer abort when EXEC_P is set.
+ (write_shdrs_and_ehdr): Deleted all code relating to program
+ segments.
+
+ * elfcode.h (various): Deleted some unused code, and debugging
+ "malloc(0)" calls.
+ (write_relocs): Cache value of last symbol looked up, to save
+ time if the symbol is referred to repeatedly.
+ (elf_fake_sections): Check only SEC_RELOC flag, not number of
+ relocs.
+ (assign_section_numbers): Likewise.
+
+ * Makefile.in (ofiles): Stars in wildcards belong outside quotes.
+
+ * libelf.h (struct elf_backend_data): New field, maxpagesize.
+ (struct elf_obj_tdata): New field, phdr.
+ * elf32-target.h (elf32_bed): Initialize maxpagesize from
+ ELF_MAXPAGESIZE.
+ (ELF_MAXPAGESIZE): Default to 1.
+ * elf64-target.h (elf64_bed, ELF_MAXPAGESIZE): Likewise.
+ * elf32-sparc.c (ELF_MAXPAGESIZE): Define.
+ (elf_sparc_howto_table): All relocs should have pcrel_offset=true.
+ Most should have length field of `2'.
+
+ * reloc.c (bfd_perform_relocation): Handle 64-bit relocs.
+
+ * config/sparc-aout.mt (TARGET_BACKENDS): Define.
+
+Mon Jul 26 08:56:16 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Don't look in ${srcdir} for ${target_makefile_frag};
+ the top level script has already adjusted for it.
+
+Mon Jul 26 08:09:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * srec.c (srec_write_symbols): Get CR LF in the right order.
+
+Mon Jul 26 02:08:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/vaxbsd.h: Include std-host.h. Don't include <machine/param.h>.
+
+Sat Jul 24 16:13:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Handle case of rightshift !=
+ bitpos when overflow checking.
+
+Fri Jul 23 10:20:27 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * bfd.c (bfd_nonrepresentable_section, bfd_undefined_symbol,
+ bfd_reloc_value_truncated, bfd_reloc_is_dangerous, bfd_assert):
+ Send error messages to stderr.
+
+Thu Jul 22 15:57:29 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * nlm{32,64}-target.h: Remove.
+ * nlm-target.h: New file, merged from nlm{32,64}-target.h
+ * libnlm.h (NLM_ARCH_SIZE): Define to ARCH_SIZE.
+ * nlm.c (ARCH_SIZE): Remove define to zero.
+ * nlm32-gen.c (ARCH_SIZE): Define to 32.
+ * nlm32-gen.c (JUMP_TABLE_PREFIX): Define to nlm32.
+ * nlm{32,64}-gen.c (nlm-target.h): Include.
+ * targets.c, libnlm.h, nlm.c, nlm{32,64}-gen.c, nlm{32,64}.c,
+ nlmcode.h: Convert prefixes from bfd_nlm<size> to just
+ nlm<size>, and use macros select size.
+
+Thu Jul 22 15:40:14 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * Makefile.in (Makefile): add configure.in, drop redundant
+ $(srcdir), drop redundant ./
+
+Thu Jul 22 13:34:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * hpux-core.c: New file; backend for HP/UX style core files.
+ * bfd.c (struct _bfd): Renamed hppa_core_data field to
+ hpux_core_data.
+ * bfd-in2.h: Updated.
+ * hppa.c (make_bfd_asection, hppa_core_file_p,
+ hppa_core_file_failing_command, hppa_core_file_failing_signal,
+ hppa_core_file_matches_executable_p): Moved into hpux-core.c.
+ Removed from target vector.
+ * libhppa.h (struct hppa_core_struct and accessor macros): Moved
+ into hpux-core.c.
+ * targets.c: If HPUX_CORE is defined, add hpux_core_vec to
+ target list.
+ * config/hp300.mh (HDEFINES): Set to -DHPUX_CORE.
+ (HDEPFILES): Set to hpux-core.o.
+ * config/hppabsd.mh, config/hppahpux.mh: Likewise.
+ * hosts/hp300.h (HOST_HP300HPUX): Define.
+ * Makefile.in (OPTIONAL_BACKENDS): Added sco-core.o,
+ aix386-core.o, hpux-core.o.
+ (sco-core.o, aix386-core.o, hpux-core.o): New dependencies.
+
+ * reloc.c (enum complain_overflow): New enumeration with the
+ various flavours of overflow checking.
+ (srtuct reloc_howto_struct): Changed complain_on_overflow field
+ from boolean to emum complain_overflow. Removed obsolete absolute
+ field.
+ (HOWTO): Removed absolute argument.
+ (bfd_perform_relocation): Do overflow checking on all types of
+ fields.
+ * bfd-in2.h: Updated accordingly.
+ * all targets: Updated initialization of reloc howto tables.
+
+Wed Jul 21 20:34:34 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * opncls.c (bfd_create): Don't use C++ keyword "template" as a C
+ variable name.
+
+Tue Jul 20 15:02:23 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * coff-m68k.c (m68k_howto2rtype): Make arg CONST to match callers.
+
+ * elfcode.h: Fix several illegal pointer combination warnings for
+ usages of bfd_alloc and alloca.
+
+ * libnlm.h (nlm_obj_tdata): Rename hidden struct members to avoid
+ apparent Sun C preprocessor recursion. Fix access macros.
+ * nlmcode.h: Remove spurious '&' before several array references.
+
+Tue Jul 20 14:36:27 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
+
+ * Rename for DOS uniqueness: coff-m68k-un.c -> coff-u68k.c
+ config/m68k-coffun.mt -> u68k-coff.mt.
+ * Makefile.in, configure.in: Corresponding changes.
+
+Tue Jul 20 16:21:52 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf32-sparc.c (elf_sparc_howto_table): Don't use "&" before
+ function name; it's valid without, and some compilers give
+ warnings with it there.
+
+Tue Jul 20 08:21:15 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * bfd-in.h: Apply some of the changes that were made to bfd-in2.h.
+ * bfd.c (union tdata): Add nlm_obj_data;
+ * targets.c (enum target_flavour): Add bfd_target_nlm_flavour.
+
+Mon Jul 19 20:46:18 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * configure.in (*-*-netware, i[34]86-*-netware): New configs.
+ * Makefile.in (BFD32_BACKENDS): Add nlm.o, nlm32.o, nlm32-gen.o.
+ * Makefile.in (BFD64_BACKENDS): Add nlm64.o, nlm64-gen.o.
+ * Makefile.in (CFILES): Add nlm{32,64}.c, nlm{32,64}-gen.c.
+ * Makefile.in (nlm.o, nlm{32,64}.o, nlm{32,64}-gen.o: New targets.
+ * bfd-in2.h (INLINE): Defines moved here.
+ * {aoutx.h, elf.c, elfcode.h}: Move INLINE defines to bfd-in2.h.
+ * libelf.h (CAT4): Move define to bfd-in2.h.
+ * bfd-in2.h (CAT4): Merge CAT4 macro with other CAT macros.
+ * bfd-in2.h (union tdata): Add nlm_obj_data.
+ * bfd-in2.h (enum target_flavour): Add bfd_target_nlm_flavour.
+ * targets.c (bfd_nlm{32,64}_{big,little}_vec): Add prototypes.
+ * targets.c (target_vector): Add bfd_nlm{32,64}_{big,little}_vec.
+ * (libnlm.h, nlm.c, nlmcode.h, nlm{32,64}-gen.c,
+ nlm{32,64}-target.h, nlm{32,64}.c, config/i386-nlm.mt): New files
+ for NLM support.
+
+Mon Jul 19 15:09:01 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.{hosts,in}: add i[34]86-*-lynxos* support
+
+Mon Jul 19 14:53:30 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * elf.c, elfcode.h, libelf.h: Serious reorganization.
+ Deleted `thunk' structure, merged into tdata, duplicate data
+ eliminated.
+ Rearranged functions, grouping by functionality.
+ Broke up many functions in elfcode.h, re-ordered many parts of
+ file writing to handle unpredictable state of section relocation
+ table as provided by various applications.
+ Still needs cleanup: Merge functions back together, split out
+ data structure with only data that is used only when writing out
+ object file.
+
+ * elf.c (bfd_elf_generic_reloc): New function, taken from
+ coff-mips.c.
+ * elf32-sparc.c (elf_sparc_howto_table): Use it, to work around
+ bfd_perform_relocation lossage.
+
+ * Makefile.in (BFD_LIBS): Include coff-mips.o and coff-msym.o, so
+ that gdb will link.
+ (ofiles): Don't use sort or uniq; do it with sh constructs.
+
+Sun Jul 18 19:42:14 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
+
+ * coffcode.h: Recognize I386PTXMAGIC.
+ * aoutf1.h, libaout.h: Add M_386_DYNIX.
+ * trad-core.c (TRAD_CORE_USER_OFFSET, TRAD_CORE_STACK_FILEPOS):
+ New macros; use it if defined.
+ * config/symmetry.mh, hosts/symmetry.h: New files.
+
+Fri Jul 16 14:56:31 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
+
+ * Rename elf{32,64}-generic.c to *-gen.c for 14 char filenames.
+ * Makefile.in: Change accordingly.
+ (CFILES): Add elf64-gen.c.
+
+Fri Jul 16 09:53:23 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c: Use MIPS_AOUT_{OZ}MAGIC rather than {OZ}MAGIC.
+
+Thu Jul 15 16:02:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-m88k.c (howto_table): Corrected bitsize for R_PCR26L from
+ 16 to 26.
+
+Wed Jul 14 15:29:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hppa.c [HOST_HPPABSD]: Use hpux-style core files.
+ * libhppa.h [HOST_HPPABSD]: Include hpux version of core.h
+
+Wed Jul 14 09:30:48 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in: Recognize h8300h-*-*.
+
+Tue Jul 13 12:03:00 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * coff-h8500.c (reloc_processing, rtype2howto): New relocation
+ type R_H8500_HIGH_16.
+ * coff-sh.c (r_imm32): Get the width of the reloc right.
+
+Tue Jul 13 16:48:56 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
+
+ * configure.in: Add new target m68k-coffun to the dpx/2.
+ * config/m68k-coffun.mt: New file, renamed from config/dpx2.mt.
+
+Mon Jul 12 10:42:49 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * reloc.c (enum bfd_reloc_code_real): Move SPARC_BASE13 reloc into
+ sparc-aout-specific list.
+
+ * libelf.h (struct elf_obj_tdata): Add field `thunk'.
+
+ * config/sparc-elf.mt (TARGET_BACKENDS): New make variable.
+
+Thu Jul 1 14:52:47 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
+ and Jim Kingdon (kingdon@cygnus.com)
+
+ * elfcode.h: Use memset not bzero.
+ * trad-core.c: Don't include <sys/file.h>.
+ * i386linux.h: Include <sys/file.h>.
+ * coff-m68k-un.c: new file to handle names with underscores on
+ svr3 machines.
+ * coff-m68k.c (m68k_rtype2howto): added #ifdef ONLY_DECLARE_RELOCS
+ to not duplicate the function in the executable.
+ (TARGET_SYM, TARGET_NAME, NAMES_HAVE_UNDERSCORE): new macros needed
+ by coff-m68k-un.c.
+ * coffcode.h (MC68KBCSMAGIC): case added.
+ * targets.c: Add m68kcoffun_vec.
+ * configure.host: added support for Bull dpx/2.
+ * config/dpx2.mh, hosts/dpx2.h: new files.
+ * Makefile.in: added target coff-m68k-un.
+
+Fri Jul 9 00:43:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * aoutf1.h: Add definition of MACHTYPE_OK.
+
+Thu Jul 8 14:37:44 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Don't subtract the addend
+ again for coff.
+
+ * syms.c, bfd-in2.h: Doc fix.
+
+ * coffcode.h (CALC_ADDEND): Check for common section using the
+ section flag as well as the symbol flag.
+
+Thu Jul 8 13:43:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/i386bsd.h: Conditionalize HOST_STACK_END_ADDR on __bsdi__.
+ i386bsd.c: Remove defines of N_TXT*; the versions in aout64.h should
+ be sufficient. Define TEXT_START_ADDR.
+
+Wed Jul 7 10:56:21 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * aoutx.h (translate_from_native_sym_flags): Removed statep
+ argument. Just let an indirect symbol point to the next symbol
+ without forcing the next symbol to be undefined. Changed all
+ callers.
+ * hp300hpux.c (slurp_symbol_table): Changed call to
+ translate_from_native_sym_flags.
+ * targets.c: Added hp300hpux_vec.
+ * Makefile.in (hp300hpux.o): Added dependencies.
+
+Tue Jul 6 13:24:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * reloc.c (enum bfd_reloc_code_real): Put simple power-of-two
+ relocs together, and add 64-bit versions.
+ (bfd_generic_get_relocated_section_contents): Argument to alloca
+ is size_t.
+
+ * libbfd.c (bfd_xmalloc_by_size_t): New function.
+ * opncls.c (bfd_cache_init, bfd_open_file): Add prototypes to
+ declarations.
+ (obstack_chunk_alloc): Use bfd_xmalloc_by_size_t.
+ (new_bfd): Prototype-style definition, using DEFUN.
+ (bfd_alloc_grow, bfd_alloc, bfd_zalloc, bfd_realloc): Size
+ argument is type size_t, not bfd_size_type.
+ * ieee.c (obstack_chunk_alloc): Use bfd_xmalloc_by_size_t.
+ * bfd.c (bfd_default_error_trap, bfd_error_trap,
+ bfd_error_nonrepresentabltrap): Prototypes.
+ * libbfd-in.h (bfd_alloc, bfd_zalloc, bfd_realloc,
+ bfd_alloc_grow): Adjusted prototypes for arg type change.
+ * archive.c (get_elt_at_filepos, do_slurp_bsd_armap, normalize,
+ do_slurp_coff_armap, bfd_construct_extended_name_table):
+ Prototypes.
+ * elfcode.h (elf_string_from_elf_strtab): Prototypes.
+ * libelf.h (elf_string_from_elf_section, elf_get_str_section):
+ Prototypes.
+
+ * Makefile.in (ALL_MACHINES): Renamed from BFD_MACHINES.
+ (ofiles): New target. Build a list of unique file names, in case
+ any got duplicated.
+ (TARGETLIB): Use list of files from ofiles.
+ * configure.in: Set BFD_MACHINES and BFD_BACKENDS depending on
+ minimal-bfd flag and target makefile frag contents.
+
+ * elfcode.h (elf_read): Delete static declaration, since function
+ has moved.
+ (elf_map_symbols): Write out section symbols for all sections, for
+ now.
+ (elf_symbol_from_bfd_symbol): Allow match if both symbols are
+ section symbols for the same section.
+ (elf_find_nearest_line): Don't print message, just return false.
+
+ * libelf.h (bfd_elf_locate_sh): Declaration deleted.
+
+Mon Jul 5 16:48:11 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * cpu-h8300.c (h8300_scan): Fix parsing of architecture string.
+
+Fri Jul 2 18:27:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (clean): Remove bfd.h and stmp-bfd.h.
+ (realclean): Remove generated headers.
+
+Fri Jul 2 14:51:51 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * section.c (bfd_set_section_content): Deny if file is not opened with
+ the proper mode, set output_has_begun if file is openened for update.
+ * aoutx.h (aout_*_set_section_content): Remove checks that are now
+ done in bfd_set_section_content.
+
+Fri Jul 2 09:25:20 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * hosts/std-host.h: Removed declarations of printf, fprintf,
+ fcntl, fread and fwrite. They are all error prone for one reason
+ or another. Changed declaration of memchr from char * to PTR.
+
+ * configure.in (mips-*-riscos*): New target; use riscos.
+ * configure.host (mips-*-riscos*): New host; use riscos.
+ * config/riscos.mh (HDEFINES): Add -G 4.
+
+ * libaout.h (GET_SWORD): Use the bfd_h_get_signed entry points
+ rather than casting the result of bfd_h_get.
+
+Fri Jul 2 10:13:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in, hosts/delta68.h, config/delta68.mh: Add stuff for
+ Motorola Delta 68.
+
+Wed Jun 30 06:02:43 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * targets.c (bfd_elf64_{big,little}_generic_vec): Declare, and
+ include in search list if BFD64 is defined.
+
+ * libelf.h (CAT4): Added a version for Saber-C, ANSI mode.
+ (bfd_elf64_*): Declarations for 64-bit versions of many routines.
+
+Tue Jun 29 22:50:59 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf64-target.h, elf64-generic.c: New files.
+ * Makefile.in (BFD64_BACKENDS): Include elf64-generic.o.
+ (elf64-generic.o): List dependencies.
+
+ * Makefile.in: List target `all' explicitly before host/target
+ makefile fragments are included, in case they define any new
+ targets.
+
+ * elfcode.h (ELF_R_INFO, ELF_R_SYM): Define as 32- or 64-bit
+ versions as appropriate. Uses updated.
+ (elf_debug_section): Declare before use.
+ (elf_debug_file): New function.
+ (bfd_section_from_shdr, bfd_shdr_from_section, elf_fake_sections):
+ Alignment value in section header is n_bytes, not log2.
+ (new_section_hook): Do nothing for now.
+ (bfd_section_from_shdr): Use Elf_External_Rel[a], not 32-bit
+ version explicitly.
+ (elf_core_file_p): Simplify check for correct class (word size).
+ (elf_make_sections, elf_fake_sections, elf_write_object_contents):
+ Initialize all fields when creating data structures.
+ (elf_locate_sh): Renamed from bfd_elfXX_locate_sh, made static.
+ (elf_compute_section_file_positions): Set correct class in output
+ file.
+ (elf_write_object_contents): Section symbols have empty names in
+ output file.
+
+ * libbfd.c (bfd_xmalloc, zalloc): Be sure to cast malloc, memset
+ args to size_t before call.
+ (bfd_add_to_string_table): Cast zalloc arg to bfd_size_type.
+
+Tue Jun 29 10:49:42 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_find_nearest_line): If procedure has no line
+ number information, return 0 for line number.
+
+Mon Jun 28 10:45:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * aoutx.h (some_aout_object_p): If *oldrawptr is non-NULL, copy it
+ into *rawptr.
+
+Sun Jun 27 09:05:19 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/riscos.h: Define NBPG and UPAGES.
+
+Sun Jun 27 16:28:26 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * elfcode.h (elf_slurp_symbol_table): Don't use obj_raw_syms as
+ lvalue; it contains a cast.
+
+Fri Jun 25 17:09:55 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (hash, compare, struct stringtab_entry, add_to_stringtab):
+ Use unsigned hash values for better hashing.
+ (hash): Hash in the string length for long strings.
+
+Thu Jun 24 15:47:51 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (compare): Replace 3 if's with a subtraction.
+ (translate_to_native_sym_flags, add_to_stringtab): Reorder tests
+ in decreasing order of success, as an optimization.
+ (hash): Take a length arg; ignore chars after #25, for speed.
+ (add_to_stringtab): Pass length to hash.
+
+Thu Jun 24 17:25:51 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * elf32-sparc.c (sparc_reloc_map): Add SPARC_WDISP22 reloc.
+
+ * elfcode.h (elf_new_section_hook): Do nothing for now.
+ (elf_write_object_contents): Output common symbols the way ELF
+ wants them.
+
+Wed Jun 23 16:20:07 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * libelf.h (struct elf_obj_tdata and associated macros): Moved
+ here from elfcode.h. A couple of size-specific structure pointers
+ were changed to PTR; uses fixed appropriately.
+ (elf32_symbol_type, elf64_symbol_type): Separated definitions.
+ (bfd_elf_mkobject): Renamed from bfd_elf32_mkobject.
+ (bfd_elf32_mkobject, bfd_elf64_mkobject, elf_mkobject): New
+ temporary macros to ease name change.
+ * elf.c (elf_read, elf_mkobject, elf_get_str_section,
+ elf_string_from_elf_section, bfd_elf_find_section): Moved here
+ from elfcode.h.
+ * doc/Makefile.in (libbfd.h): Process elf.c too.
+ * Makefile.in (elf.o): Note new dependencies.
+
+ * elfcode.h: Lots of stuff moved elsewhere. Deleted some unused
+ code, tweaked some debug hooks.
+ (elf_slurp_reloca_table): Translate ELF section symbols into BFD
+ section symbols.
+
+Wed Jun 23 11:34:21 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * hosts/riscos.h: New file.
+
+Tue Jun 22 14:35:20 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * elfcode.h (bfd_section_from_shdr, case SHT_PROGBITS): Even if
+ section already exists, use its pointer to fill in rawdata slot.
+
+Tue Jun 22 16:36:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/std-host.h: Return value of puts and fputs is int not void.
+
+Tue Jun 22 14:25:58 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (howto_table_ext): Comment the field names.
+ * reloc.c (bfd_perform_relocation): Fix max and min values.
+
+Mon Jun 21 18:19:14 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * elf32-target.h, elf32-hppa.c, elfcode.h: Use new
+ size-independent elf internal data structures.
+ * elfcode.h (put_word, get_word): Define as appropriate for
+ architecture word size. Structure swapping functions changed to
+ use them as appropriate.
+
+ * configure.in: If compiling 64-bit back ends, do them before
+ 32-bit ones.
+
+ * libelf.h: Use new size-independent versions of elf internal data
+ structures.
+ (symbol_type): Reordered to put any fields dependent on target
+ size at the end.
+ (elf_backend_data): Renamed from elf##_backend_data and made
+ size-independent.
+ (elf_sect_thunk): Now size-independent.
+
+ * libbfd.c (bfd_log2): Now returns unsigned int.
+
+Mon Jun 21 12:30:47 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * Rename config/m88k-aout.mt to config/noop.mt.
+ configure.in: Use it for mips-*-bsd*.
+
+Sun Jun 20 20:32:19 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * cpu-m68k.c (arch_info_struct): Eliminate "partially bracketed
+ initializer" warning from gcc.
+ * cpu-h8500.c (arch_info_struct): Likewise.
+ * cpu-sh.c (arch_info_struct): Likewise.
+
+ * cpu-h8300.c (local_bfd_reloc_type_lookup, howto*_callback,
+ howto_*): Unused functions and variables commented out.
+ * cpu-z8k.c (local_bfd_reloc_type_lookup, howto*_callback,
+ howto_*): Likewise.
+ * cpu-h8500.c (compatible): Likewise.
+ * cpu-sh.c (compatible): Likewise.
+
+ * hp300hpux.c (swap_std_reloc_in): Delete unused variables.
+ Always set a valid length value, even for invalid input.
+
+ * srec.c (srec_write_symbols): Use sprintf_vma.
+
+ * bfd-in.h (uint64_typeLOW, uint64_typeHIGH, int64_type,
+ uint64_type): Provide default definitions.
+ * hosts/std-host.h (int64 stuff): Remove them from here.
+
+ * bfd-in.h (sprintf_vma): Define parallel to fprintf_vma.
+
+ * elf32-i386.c (elf_i386_reloc_type_lookup): Delete unused
+ variable. Added default case to switch.
+
+ * aoutx.h (translate_from_native_sym_flags): Before casting
+ pointers to integers, make sure the integer type is wide enough.
+ * coff-mips.c (ecoff_set_symbol_info): Ditto.
+
+ * section.c (bfd_get_section_contents): Since `count' is unsigned,
+ don't bother comparing for less-than-zero.
+ (bfd_set_section_contents): Ditto.
+
+ * elfcode.h (bfd_add_to_strtab): Now static.
+ (sym_is_global): New function.
+ (elf_map_symbols): Call it. Now returns void. Removed unused
+ local variable.
+ (bfd_section_from_shdr): Mark string tables other than for section
+ and symbol names as normal sections having contents.
+ (fix_up_strtabs): New function; fixes up ELF header fields for
+ stab sections with string tables associated.
+ (elf_write_object_contents): Map fix_up_strtabs over all BFD
+ sections. Reordered condition tests for symbol flags; default to
+ local-object value instead of global-object.
+ (elf_symbol_from_bfd_symbol): Hid conditionally-used variable
+ inside condition test.
+ (elf_print_symbol): Use fprintf_vma.
+ (elf_idx_of_sym, bfd_shdr_from_section): Unused functions
+ commented out.
+
+ * bfd-in.h (int64_type, uint64_type): Define these if we fall
+ back to "long long" for HOST_64_BIT.
+
+ * libelf.h (elfNAME, ElfNAME): New versions to get desired results
+ without using invalid ANSI C preprocessing tokens.
+
+ * elf32-target.h (bfd_elf32_new_section_hook): Delete macro.
+ * libelf.h (bfd_elf32_new_section_hook): Declare.
+ * elfcode.h (new_section_hook): Define here.
+
+ * hosts/sparc.h, hosts/std-host.h, hosts/i386bsd.h: Protect
+ against multiple inclusions.
+
+ * hosts/news.h: Include hosts/std-host.h, not plain std-host.h.
+
+ * Makefile.in (bfd.h): Generate into current directory by grabbing
+ 64-bit definition (if any) from sysdep.h.
+ * bfd-in.h: Put in marker for sysdep.h inclusion.
+
+Fri Jun 18 19:57:23 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Check for overflow on
+ pc-relative relocations if the howto asked for it.
+
+Fri Jun 18 16:00:20 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * Makefile.in (stmp-bfd.h): Ignore nonzero exit status from grep.
+
+Fri Jun 18 16:54:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config/riscos.m{h,t}: New files.
+ * configure.{host,in}: Use them.
+
+Fri Jun 18 12:55:10 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * elf32-mips.c: comment change. This is a mips file, not 88k.
+
+Mon Jun 14 14:02:41 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * cache.c (bfd_cache_init): Increment open_files and call close_one
+ if necessary.
+ (bfd_open_file): Don't increment open_files here.
+
+Fri Jun 18 10:00:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config/delta88.mh: Don't set CC.
+
+ * Makefile.in: Add elf32-{mips,m88k,generic}.
+ elf32-{mips,m88k,generic}.c: New files.
+ targets.c (target_vector): Include bfd_elf32_{mips,m88k,generic}_vec.
+ elfcode.h (elf_object_p): Match elf32-generic for all machines which
+ don't match a different target.
+
+Fri Jun 18 03:12:12 1993 John Gilmore (gnu@cygnus.com)
+
+ Eliminate "int8_type", "int16_type", "int32_type", and their
+ variants from the BFD universe. Leave the 64-bit types for now,
+ since they are in flux.
+
+ * aoutx.h, hp300hpux.c: Eliminate needless (int32_type) casts.
+ * libaout.h (GET_SWORD): Convert (int32_type) to (int).
+ * ieee.c: Convert uint8e_type => unsigned char.
+ * oasys.c: Extensive changes to eliminate obsolete types.
+ These depend on changes in ../include/oasys.h as well.
+ * hosts/*.h: Remove declarations of all these types.
+
+Mon Jun 14 14:02:41 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * hosts/delta88.h: #if 0 out some declarations which conflict with
+ system headers.
+
+Mon Jun 14 17:08:18 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
+
+ * Makefile.in (install): remove parentdir cruft
+
+Mon Jun 14 19:04:09 1993 Stu Grossman (grossman@cygnus.com)
+
+ * hppa.c (hppa_get_symbol_info): Remove redundant copy.
+ * Expurgate random DEFUNs that have crept in.
+
+Mon Jun 14 10:23:53 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_set_symbol_info): Constructor sections should
+ only be aligned to a 4 byte boundary.
+
+Sat Jun 12 16:13:17 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * hosts/std-host.h (struct int64e_struct): Remove needless typedef
+ keyword.
+
+Fri Jun 11 14:25:34 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * aoutf1.h (sunos4_write_object_contents): set flags to 1, breaking
+ 1927 but fixing some other important things.
+
+Thu Jun 10 20:36:22 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * hosts/std-host.h (int64e_type): Fix definition.
+
+Thu Jun 10 11:48:28 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_sec_to_styp_flags): Use STYP_MIPS_INIT for
+ section named _INIT. Don't set STYP_TEXT unless SEC_CODE is set.
+ (ecoff_styp_to_sec_flags): Treat a STYP_MIPS_INIT section like
+ a STYP_TEXT section.
+
+Wed Jun 9 16:48:13 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in (install, headers): don't put comments after a tab
+ in the actions section of a rule
+
+Wed Jun 9 15:00:01 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_mkobject_hook): Mark ZMAGIC files as D_PAGED.
+ (ecoff_write_object_contents): If not D_PAGED, don't add the
+ section headers to text_size. If not D_PAGED, set the magic
+ number to OMAGIC rather than ZMAGIC. If creating a D_PAGED
+ executable, the executable must fully occupy an even number of
+ pages.
+ (ecoff_set_symbol_info, make_bfd_asection, ecoff_little_vec,
+ ecoff_big_vec): Consistently set section alignment power to 4,
+ since ECOFF sections should be multiples of 16 bytes.
+ (ecoff_little_vec, ecoff_big_vec): Added D_PAGED to object_flags.
+ Made ar_pad_char and ar_max_namelen agree for both.
+
+Tue Jun 8 20:28:02 1993 Mark Eichin (eichin at tweedledumber)
+
+ * elfcode.h (elf_slurp_symbol_table): subtract section vma from
+ symbol value, since bfd symbols are section relative, but ELF
+ symbols aren't.
+
+Tue Jun 8 12:08:27 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * cpu-i960.c, cpu-h8300.c (compatible): Make static.
+
+Tue Jun 8 14:27:56 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
+
+ * hosts/news.h, config/news.mh: New files.
+
+Tue Jun 8 12:08:27 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * bfd-in2.h, archures.c (bfd_mach_h8300[h]): new defines.
+ * coff-h8300.c: More addressing modes.
+ * coffcode.h (coff_set_arch_mach_hook): Cope with H8300 magic
+ number.
+ * cpu-h8300.c: Removed disassemble stuff. (h8300_scan): Recognise
+ H8/300H name. (compatible): New function.
+ * reloc16.c (bfd_coff_reloc16_get_relocated_sec): Cope with more
+ addressing modes.
+
+Tue Jun 8 10:30:13 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_compute_section_file_positions,
+ ecoff_write_object_contents): Only round to page boundaries if
+ D_PAGED flag is set for the output BFD.
+
+Fri Jun 4 15:47:52 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * coffcode.h (get_index, coff_slurp_symbol_table): Fix pointer
+ casts to work on machine where sizeof(long) != sizeof(int) !=
+ sizeof(char *).
+ * coffgen.c (coff_get_normalized_symtab): Ditto.
+ * cpu-h8300.c coff-h8300.c: Support for H8/300-H.
+
+Fri Jun 4 15:24:27 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * coffgen.c (coff_write_symbols): For empty string table, write
+ out 4 in correct byte order. (from minyard@bnr.ca)
+
+ * elf32-hppa.c: Don't include libhppa.h for now; define
+ BYTES_IN_WORD instead, until Utah sends a better fix.
+ (hppa_elf_build_arg_reloc_stub): Use xmalloc and xrealloc instead
+ of malloc and realloc.
+
+Fri Jun 4 07:49:01 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in (mips-*-ecoffl*): New target; use decstation.
+ (mips-*-ecoff*): Added trailing '*'.
+
+ * coff-mips.c (ecoff_get_debug): Get the offset from the first PDR
+ for the FDR, not from the first PDR in the file.
+
+Thu Jun 3 16:41:10 1993 Stu Grossman (grossman@cygnus.com)
+
+ * hppa.c (hppa_get_symbol_info): New func needed for JUMP_TABLE.
+
+Thu Jun 3 15:33:57 1993 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * hppa.c (hppa_get_symbol_info): New function.
+
+Thu Jun 3 13:07:42 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elfcode.h (elf_map_symbols): Don't crash if no symbols have been
+ allocated yet.
+
+ From Peter Hoogenboom (hoogen@schafer.cs.utah.edu):
+ * libhppa.h (MAXCOMLEN): Define unconditionally.
+ (_PA_RISC_ID): Only define if not already defined.
+ * elf32-hppa.c: Include libhppa.h.
+
+ From Ralph Campbell:
+ * hosts/mipsbsd.h (HOST_DATA_START_ADDR): Delete definition.
+
+ * elf32-hppa.h (symext_rootP, symext_lastP): Delete decls.
+
+Thu Jun 3 00:23:53 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/go32.mh: define EXTRALIBES to -lm (for binutils), also
+ remove defines of __MSDOS__ and __GO32__ (these are in the
+ compiler now).
+
+Wed Jun 2 17:57:13 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ From Utah:
+ * hosts/hppabsd.h: Eliminate use of obsolete EXFUN.
+ * config/hppabsd.mh: Don't use ranlib.
+
+Tue Jun 1 04:15:57 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * elf.c: New file, for word-size independent code.
+ * elfcode.h (elf_hash): Moved to there, renamed bfd_elf_hash.
+ * Makefile.in: Include elf.o in standard objects.
+
+ * bfd-in.h (CAT3): Define here.
+ * libaout.h, libelf.h: Not here.
+
+ * libelf.h (struct strtab): Define here.
+ (bfd_elf_locate_sh): Declare here.
+ * elfcode.h (struct strtab): Definition deleted.
+
+ * reloc.c (enum bfd_reloc_code_real): Added HPPA_PCREL_CALL_12.
+
+ * Makefile.in: Make "all", not "bfd.h", be the default target.
+ (stmp-bfd.h): New target; prevents rebuilding world if bfd.h
+ hasn't really changed.
+
+ Tue May 25 12:15:15 1993 Michael Meissner (meissner@osf.org)
+
+ * elfcode.h (elf_hash): Provide elf standard hash function.
+ (various): Key off of the machines use_rela_p field to determine
+ whether to use REL or RELA relocations.
+ (elf_swap_reloc_out, elf_swap_reloc_in): New functions.
+ (elf_make_sections): Allocate a pointer to hold all data for a
+ given section, and copy each fragment into the data region.
+ Update the section's pointer with the REL implicit addends if the
+ machine uses REL relocation.
+
+ * elf32-i386.c (elf_bfd_reloc_type_lookup): Rename to
+ elf_i386_bfd_reloc_type_lookup, and use cpp to map the name back
+ into was elf32-target.h expects.
+ (elf_info_to_howto): Rename to elf_i386_info_to_howto.
+ (elf_i386_bfd_reloc_type_lookup): Add relocation support.
+ (elf_i386_info_to_howto): Add minimal relocation support.
+
+ * libelf.h (elf_backend_data): Add use_rela_p, elf_64_p,
+ elf_info_to_howto_rel fields.
+
+ * elf32-target.h (elf_bed): Add support for new fields in
+ elf_backend_data.
+
+ Sun May 30 16:38:24 1993 Peter Hoogenboom (hoogen@fast.cs.utah.edu)
+
+ * elf32-hppa.c: Add symbol extension section support, fix
+ relocation howto table, add stub generation support.
+
+ * elf32-hppa.h: Add symbol extension section support, fix
+ relocation howto table, add stub generation support.
+
+ * elfcode.h (bfd_elf_locate_sh): New function to locate ELF
+ section header.
+
+ * elfcode.h (bfd_add_to_strtab): Made non-static due to a call
+ from elf32-hppa.c.
+
+ * elfcode.h (elf_idx_of_sym): Return STN_UNDEF instead of 0 when
+ the symbol is not found.
+
+ * elfcode.h (elf_compute_section_file_positions): Not all section
+ file positions were computed.
+
+ * elfcode.h (elf_get_sect_thunk): New function.
+
+ * hppa.c (sign_ext): Reimplement.
+
+ * hppa.c (round_down,round,round_up,L,R,LS,RS,LD,RD,LR,RR): Make
+ these functions static.
+
+Tue Jun 1 14:40:41 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in (bfd.h): Move closer to headers - and after 'all'!
+
+ * aoutx.h (translate_from_native_sym_flags): Don't set
+ BSF_DEBUGGING for constructor symbols, only BSF_CONSTRUCTOR.
+ * aoutx.h (translate_to_native_sym_flags): Translate
+ constructor symbols properly.
+
+Thu May 27 16:09:04 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * archures.c (bfd_default_arch_struct): use 4 byte alignment as a
+ minimum.
+ * aout-target.h (minimum_alignment): 8 byte alignment is right.
+ (fix ld/2680)
+
+Thu May 27 13:38:47 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in, Makefile.in: Build bfd-in2.h in source directory,
+ from bfd-in.h and .c files. Build bfd.h in build directory,
+ substituting in requested target word size. Insert word size into
+ makefile, and maybe enable 64-bit targets.
+
+ * bfd-in.h, libbfd.c, demo64.c, targets.c: Define BFD64 if 64 bits
+ are available. Conditionalize on this. Assume HOST_64_BIT
+ will be defined if needed, so 64-bit targets are conditionalized
+ only in the Makefile.
+
+Tue May 25 14:03:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * libbfd.c (COERCE64): Rewrite to avoid out-of-range values.
+
+ * coff-sh.c (rtype2howto): Put error message on stderr.
+ (extra_case): Delete unused variable.
+
+ * coff-mips.c (ecoff_print_symbol): Cast bfd_vma values to long
+ before calling printf.
+
+ * elfcode.h: New file, almost completely derived from old elf32.c.
+ * elf32.c: Now just define ARCH_SIZE and include elfcode.h.
+ * Makefile.in (elf64.o): List dependencies, don't build by
+ default.
+ (elf64.c): Add to list of sources.
+ (elf32.o): Update dependencies.
+ * elf32-*.c: Updated type/macro/structure names. Cleaned up
+ namespace pollution; rename vectors.
+ * targets.c, config/*-elf.mt: Updated.
+ * All uses of 32-bit versions of structures, routines, and macros
+ renamed.
+
+ * Makefile.in (archures.o, targets.o): Depend on Makefile.
+
+Mon May 24 15:53:13 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * elf32-i386.c (enum reloc_type): No comma after last enumerator.
+
+ * elf32.c (elf_string_from_elf_section): Handle index of zero
+ specially.
+ (bfd_section_from_shdr, elf_slurp_symbol_table): Don't need to do
+ so here.
+ (elf_write_object_contents): Deleted one unused variable and
+ initialized another to avoid gcc warnings.
+ (elf_set_section_contents): Delete unused variable.
+
+Fri May 21 19:04:21 1993 Stu Grossman (grossman@cygnus.com)
+
+ * i386lynx.c: New module for Lynx variant of a.out.
+ * Makefile.in (BFD_BACKENDS CFILES depends): Add i386lynx.c.
+ * gen-aout.c: Get rid of defunct endian stuff, print out true
+ pagesize.
+ * targets.c (target_vector): Add i386lynx_vec.
+
+Fri May 21 17:02:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * configure.in: Use i386-sco.mt for i[36]86-*-isc*.
+
+Fri May 21 13:44:18 1993 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * aix386-core.c, aout-target.h, aoutx.h, coff-alpha.c,
+ coff-mips.c, coffgen.c, elf32.c, ieee.c, libaout.h, libcoff-in.h,
+ libelf.h, mipsbsd.c, oasys.c, sco-core.c, srec.c, tekhex.c,
+ trad-core.c: Define a TARGET_get_symbol_info function or macro.
+ Remove the bfd_print_symbol_nm case from TARGET_print_symbol.
+
+ * bfd-in.h: Don't define bfd_print_symbol_nm.
+ Define symbol_info type.
+ (JUMP_TABLE): Set _get_symbol_info element.
+
+ * syms.c (coff_section_type, bfd_symbol_info): New functions.
+ (bfd_decode_symclass): Use coff_section_type.
+
+ * targets.c: Add bfd_get_symbol_info call.
+
+Wed May 19 15:30:52 1993 Stu Grossman (grossman@cygnus.com)
+
+ * coff-i386.c (coff_i386_reloc): Use unsigned char to avoid
+ complaints from ancient gcc's.
+
+Wed May 19 15:51:19 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * trad-core.c: Check macro TRAD_CORE_EXTRA_SIZE_ALLOWED.
+ hosts/i386linux.h: Define it.
+
+Mon May 17 15:00:33 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * VERSION, bfd-in.h: Bump version number to 2.2.
+
+ * hppa.c (assemble_3, dis_assemble_3, assemble_12,
+ dis_assemble_12, assemble_17, dis_assemble_17, assemble_21,
+ dis_assemble_21, sign_ext, ones, sign_unext, low_sign_ext,
+ low_sign_unext, round_down, round, round_up, L, R, LS, RS, LD, RD,
+ LR, RR, hppa_field_adjust): New functions.
+
+Mon May 17 10:04:16 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_set_symbol_info): Added support for indirect
+ stabs symbols, including new indirect_ptr_ptr argument.
+ (ecoff_slurp_symbol_table): Pass new argument in calls to
+ ecoff_set_symbol_info.
+
+Fri May 14 00:05:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in: For m68k sysv systems, use m68k-coff.
+
+ * config/hppa-elf.mt (TDEFINES): Don't define DEFAULT_VECTOR here.
+ (TDEFAULTS): Define it here. Use the new name.
+
+ * elf32-hppa.c (elf_hppa_backend_data): Delete; rely on default
+ values instead.
+
+ * reloc.c (bfd_reloc_code_real_type): Add some HPPA reloc types.
+
+ * aix386-core.c (NO_GETS): Fix PROTO invocation to have correct
+ number of arguments.
+ (aix386_core_file_p): Initialize core_size to correct value.
+
+Wed May 12 14:39:59 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (CC_FOR_BUILD): New variable, set to $(CC).
+ (FLAGS_TO_PASS): Pass down CC_FOR_BUILD.
+
+ * bout.c (aout32_slurp_extended_name_table): Define to be
+ _bfd_slurp_extended_name_table rather than bfd_true.
+
+ * coff-mips.c: Include libaout.h and aout/aout64.h to get
+ definitions for N_SET[ATDB].
+ (ecoff_howto_table): Moved near top of file.
+ (ecoff_set_symbol_info): If a STABS symbol of type N_SET[ATDB] is
+ seen, cook up a constructor section of the same name and put in a
+ reloc pointing to the symbol. This lets the GNU linker build
+ global constructors and destructors without using collect.
+
+Tue May 11 00:33:31 1993 John Gilmore (gnu@cygnus.com)
+
+ * coff-m88k.c (m88kbcs_vec): Symbols have underbars.
+
+Mon May 10 05:55:45 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * hosts/miniframe.h: New file.
+ * configure.host: Use it.
+
+Sun May 9 16:36:59 1993 Fred Fish (fnf@cygnus.com)
+
+ * configure.in (hppa*-*-bsd): Change to hppa*-*-bsd*
+ * configure.in (hppa*-*-hpux): Change to hppa*-*-hpux*
+ * configure.in (m68*-hp-bsd): Change to m68*-hp-bsd*
+ * configure.in (m68*-*-hpux): Change to m68*-*-hpux*
+ * configure.in (*-*-bsd): Change to *-*-bsd*
+
+Wed May 5 16:08:32 1993 Per Bothner (bothner@cygnus.com)
+
+ * elf32-hppa.c (elf_hppa_reloc_type_lookup): Cast enums to
+ int, for the sake of the old Portable C Compiler.
+
+Mon May 3 14:37:01 1993 Stu Grossman (grossman@cygnus.com)
+
+ * Makefile.in (CFILES): Add cpu-sh.c and coff-sh.c.
+
+Mon May 3 14:03:21 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * configure.in: Get target name right for m68*-*-hpux.
+
+Sun May 2 11:39:44 1993 Fred Fish (fnf@cygnus.com)
+
+ * trad-core.c (NO_SIGNED_GET): New macro.
+ * trad-core.c (trad_core_vec): Use new NO_SIGNED_GET instead of
+ signed NO_GET, where appropriate.
+
+ * configure.in (i[34]86-*-linux*): Add; bfd_target = i386-linux.
+ * configure.in (*-*-linux*): Remove until linux port for a
+ non-i386/i486 system is actually available.
+
+Fri Apr 30 20:04:10 1993 Stu Grossman (grossman@cygnus.com)
+
+ * libhppa.h: #undef e_* symbols which come from <machine/som.h>
+ when compiling under HPUX.
+
+Fri Apr 30 17:25:23 1993 Stu Grossman (grossman@cygnus.com)
+
+ * The following patches are from Jeffrey Law <law@cs.utah.edu>.
+ * hppa.c (hppa_core_file_p): Provide a temporary dummy routine
+ for HOST_HPPABSD.
+ * bfd/hosts/hppabsd.h: Fix declarations of malloc and free.
+ * bfd/libhppa.h: Include sysdep here. Conditionalize
+ includes based on HOST_HPPAHPUX or HOST_HPPABSD.
+ Provide definitions for MAXCOMLEN and _PA_RISC_ID suitable
+ for BSD.
+
+Fri Apr 30 17:34:11 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf32-hppa.c: Don't include a.out.h. Apparently not even the
+ GNU version is needed.
+
+Fri Apr 30 09:38:59 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * coffcode.h: use dummy_reloc16_extra_cases rather than casting abort.
+
+Thu Apr 29 11:30:32 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * Makefile.in: Build elf32-hppa.o.
+
+ * syms.c (BSF_FUNCTION): New symbol flag.
+
+ * elf32-hppa.c: Fixed to work with elf32-target.h.
+
+ * hp300hpux.c (NAME, NAME_swap_exec_header_in): Fix for
+ traditional C.
+ * libaout.h (NAME): Don't define if already defined.
+
+ * libelf.h: Protect against multiple inclusions.
+ (elf_symbol_type): Moved here, added new fields.
+ (struct elf_backend_data): New field `global_sym'; I suspect this
+ may be misplaced.
+ * elf32.c (elf_symbol_type): Deleted from here.
+ (struct elf_obj_tdata): New fields raw_syms and internal_syms, to
+ point to backend versions of symbols.
+ (obj_symbols, obj_raw_syms, obj_internal_syms): New macros.
+ (elf_swap_phdr_out, elf_build_phdrs, elf_write_phdrs): New
+ functions.
+ (elf_write_object_contents): Write program headers if appropriate.
+ (bfd_section_from_shdr): Unnamed sections get empty string for
+ name, not "unnamed". Handle SHT_NOBITS separately from
+ SHT_PROGBITS, and set some different flags.
+ (elf_file_p): New routine.
+ (elf_object_p, elf_core_file_p): Call it.
+ (elf_object_p): Handle EM_HPPA.
+ (elf_symbol_from, elf_idx_of_sym): New functions.
+ (elf_make_sections): Get symbol number right for relocations. Set
+ SHF_ALLOC, SHF_WRITE, SHF_EXECINSTR when appropriate.
+ (elf_fake_sections): BSS section should be SHT_NOBITS, not
+ SHT_PROGBITS. Always generate symtab and strtab, not only if
+ relocations are needed. Set SHF_* flags as appropriate.
+ (elf_compute_section_file_positions): Handle bfd_arch_hppa.
+ (elf_write_object_contents): Fix off-by-one error in symbol count.
+ Store a correct value for the symbol; write the size field
+ properly; make some guesses about the type field. Set section
+ type correctly for string tables.
+ (section_from_elf_index): Check for absolute and common sections
+ first.
+ (elf_section_from_bfd_section): Ditto.
+ (elf_slurp_symbol_table): Use elf_symbol_type instead of asymbol.
+ Use empty string instead of "unnamed" for nameless symbols.
+ Handle STTY_FUNC type, and weirdness with "$global$" symbol for
+ HPPA (only?). Don't free raw symbols; keep the pointer around for
+ later.
+ (elf_set_arch_mach): Handle bfd_arch_hppa.
+ (elf_find_nearest_line): Just return false.
+ (elf_write_object_contents, elf_set_section_contents): Set
+ output_has_begun field after computing file positions.
+ (elf_set_section_contents): Write section contents immediately,
+ rather than caching the whole file and writing it at close time.
+
+ * libhppa.h (enum hppa_reloc_field_selector_type, enum
+ hppa_reloc_field_selector_typ_alt, enum hppa_reloc_expr_type, enum
+ hppa_reloc_expr_type_alt): New enumerator types.
+
+ * config/hppa-elf.mt,. config/hppaosf.mh: HP PA/OSF support.
+ * configure.in, configure.host: Use them.
+
+Wed Apr 28 23:21:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf32-target.h: Allow overrides of armap defaults.
+
+ * elf32-hppa.c, elf32-hppa.h: New files.
+
+ * config/hp300hpux.mt: New file.
+
+Tue Apr 27 05:39:40 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * aix386-core.c (NO_GETS): New macro; NO_GET for signed values.
+ (aix386_core_vec): Update for new fields.
+
+ * archive.c (bfd_generic_archive_p): Call target-specific
+ slurp_armap code, instead of bfd_slurp_armap.
+ (bfd_slurp_bsd_armap_f2): New function.
+ * libbfd-in.h (bfd_slurp_bsd_armap_f2): Declare it.
+ * aout-target.h (AR_PAD_CHAR): Define it if not already defined.
+ (vec): Use it.
+ * libaout.h (struct aoutdata): New field for subformat, for
+ differentiating between highly similar a.out formats.
+ * aoutx.h (NAME_swap_exec_header_in): New macro, defaults to local
+ version of function.
+ (swap_exec_header_in): Don't define if NAME_swap_exec_header_in is
+ already defined.
+ * hp300hpux.c: New file.
+ * Makefile.in: Include it.
+
+Mon Apr 26 13:24:43 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * Makefile.in, archures.c, coffcode.h, targets.c: Support for
+ Hitachi SH.
+
+Mon Apr 26 13:55:42 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * trad-core.c (trad_unix_core_file_p): Check the file size.
+
+Mon Apr 26 13:24:43 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-alpha.c: Remove duplicate function and add warnings.
+
+Mon Apr 26 11:25:58 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * sco-core.c (sco_core_vec): Add initializers for new target
+ fields.
+
+Sat Apr 24 21:33:45 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * coffcode.h [_LIT]: Recognize .lit section.
+
+Fri Apr 23 19:00:36 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-alpha.c, cpu-alpha.c, config/alphaosf.mt,
+ config/alphaosf.mt, hosts/alphaosf.h: New files.
+
+Fri Apr 23 16:48:46 1993 Stu Grossman (grossman@cygnus.com)
+
+ * Merge in HPPA/BSD changes from Utah.
+ * hppa.c: Use this for both HPUX & BSD.
+ * targets.c: Enable hppa_vec for both HPUX & BSD.
+ * config/hppabsd.mt: TDEFINES => TDEFAULTS.
+ * hosts/hppabsd.h: #define HOST_HPPABSD.
+
+Wed Apr 21 01:50:10 1993 John Gilmore (gnu@cygnus.com)
+
+ * libbfd.c: Whitespace changes around byteswap macros.
+ * libbfd-in.h: Whitespace changes around byteswap declarations.
+
+Tue Apr 20 15:59:07 1993 Stu Grossman (grossman@cygnus.com)
+
+ * aoutf1.h (sunos4_core_file_p): Don't default bfd_error to
+ system_error anymore. It confuses bfd_check_format().
+
+Mon Apr 19 23:03:08 1993 Stu Grossman (grossman@cygnus.com)
+
+ * bfd.c: Add sgi_core_data to tdata union.
+ * coff-mips.c: Add Irix 4.x core file support.
+ * hosts/irix4.h: #define HOST_IRIX4.
+
+Mon Apr 19 18:52:52 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * aoutx.h (translate_from_native_sym_flags): Check that the
+ symbol's section does get set.
+ (slurp_symbol_table): Zero index means null-string name.
+
+ * aoutx.h (struct stringtab_entry, struct stringtab_data): New
+ data structures.
+ (hash, stringtab_init, add_to_stringtab, emit_strtab, compare):
+ New functions.
+ (write_syms): Use them, to reduce string table size.
+
+Mon Apr 19 16:45:12 1993 Fred Fish (fnf@cygnus.com)
+
+ * trad-core.c (trad_core_vec): Add 6 new initializers to match
+ new signed get/put fields. Minor reformatting to label
+ some fields.
+
+Mon Apr 19 06:09:41 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * bfd-in.h: Insert comment about SVR3 compiler warnings.
+
+ * hosts/{hp300,i386isc,i386v}.h: Remove unused #defines of {r,}index
+ (bfd uses strchr and the broken SVR3.2 cpp loses with the defines).
+
+ * libbfd.c: bfd_put*: Remove casts to bfd_vma.
+
+Fri Apr 16 17:49:27 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * aoutf1.h (internal_sunos_core): Make c_stacktop a bfd_vma.
+ (swapcore_sparc): Make sp a bfd_vma.
+
+Thu Apr 15 09:09:18 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * libbfd.c: Add signed versions of bfd_{h_,}{get,put}_signed_<size>.
+ libbfd.c, libbfd-in.h: Add _do*signed*.
+ targets.c, all targets: Add bfd*signed*.
+ bfd-in.h: Add bfd_signed_vma. Add comments.
+
+ * bfd-in.h (bfd_error), bfd.c (bfd_errmsgs): Add file_truncated.
+
+ * format.c (bfd_check_error): Check error return from
+ _bfd_check_format routines.
+
+Wed Apr 14 23:48:25 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * rs6000-core.c (rs6000coff_core_p): Improve error checking and
+ recognize .data section if present.
+
+Thu Apr 15 01:00:29 1993 John Gilmore (gnu@cygnus.com)
+
+ * aoutx.h (aout_*_adjust_sizes_and_vmas): Avoid `sanity'
+ check for the case where the user sets the address of the BSS
+ section (and the file header can't specify this). Let the user
+ set it wherever they want, regardless of what goes in the header.
+
+ * ieee.c (ieee_slurp_sections): Pass all ieee section names
+ straight through into BFD sections. Add comments.
+
+Wed Apr 14 20:34:54 1993 John Gilmore (gnu@cygnus.com)
+
+ Cleanup in preparation for better 64-bit host support.
+
+ * bfd-in.h (bfd_64_type): Remove.
+ * libbfd.c (_do_getb64, _do_putb64): Use bfd_vma, not bfd_64_type.
+
+ * bfd-in.h (bfd_size): Remove.
+
+ * bfd-in.h (bfd_offset): Remove, after fixing ld/ldlang.[ch].
+
+ * bfd-in.h (bfd_word): Remove.
+ * reloc.c (reloc_howto_type): Replace bfd_word with bfd_vma.
+
+ * bfd-in.h (rawdata_offset): Remove.
+ * reloc.c (arelent): Replace rawdata_offset with bfd_size_type.
+ (bfd_perform_relocation): Lint.
+ (enum bfd_reloc_status): Comment cleanup.
+
+ * aout-adobe.c, cpu-h8300.c, mipsbsd.c, srec.c: lint -Wall.
+
+Tue Apr 13 11:19:52 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * aoutf1.h (swapcore_sparc): Guess the right value of USRSTACK.
+
+Mon Apr 12 14:18:00 1993 John Gilmore (gnu@cygnus.com)
+
+ * elf32.c: Clean up old comments.
+
+Fri Apr 9 10:43:20 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/sun3.h: String argument to fprintf is const.
+
+ * coff-mips.c: Renamed PAGE_SIZE to ROUND_SIZE, to avoid confusion
+ on systems which define PAGE_SIZE in <limits.h>.
+
+Thu Apr 8 10:28:00 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * trad-core.c (trad_unix_core_file_failing_signal): Use new macro
+ TRAD_UNIX_CORE_FILE_FAILING_SIGNAL to allow host files to specify
+ the core file failing signal.
+ * hosts/decstation.h (TRAD_UNIX_CORE_FILE_FAILING_SIGNAL): Define
+ to supply the core file failing signal.
+
+Thu Apr 8 09:17:35 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h (styp_to_sec_flags): Only set SEC_SHARED_LIBRARY for
+ a STYP_NOLOAD | STYP_BSS section if BSS_NOLOAD_IS_SHARED_LIBRARY
+ is defined. On many COFF targets STYP_BSS is always STYP_NOLOAD.
+ * coff-i386.h (BSS_NOLOAD_IS_SHARED_LIBRARY): Define.
+
+Wed Apr 7 11:33:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (PAGESIZE): Correct value.
+
+Tue Apr 6 12:05:44 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_find_nearest_line): Address of first PDR is
+ an offset (patch from Jean-Daniel Fekete <jdf@lri.lri.fr>).
+
+Mon Apr 5 12:07:12 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h (styp_to_sec_flags): Set SEC_SHARED_LIBRARY for a
+ STYP_NOLOAD | STYP_BSS section. Don't set SEC_NEVER_LOAD for a
+ STYP_INFO section.
+ (coff_compute_section_file_positions): Force vma and lma of _LIB
+ section to be zero.
+ (coff_set_section_contents): Count number of entries in new lma
+ field, not in vma.
+ * coffgen.c (make_a_section_from_file): Force lineno_count of
+ SEC_SHARED_LIBRARY section to be zero, since it is non-zero on the
+ SCO 3.2v4 shared library.
+ * seclet.c (rel): Copy over any section with contents, not just
+ loadable sections.
+
+ * coff-mips.c (ecoff_make_empty_symbol): Zero out newly allocated
+ symbol.
+
+ * coff-i386.c (coff_i386_reloc): New function, to generate
+ relocateable output correctly.
+ (howto_table): Use coff_i386_reloc for all reloc types.
+ (CALC_ADDEND): Use a more efficient hack to get the correct addend
+ for a common symbol.
+ (i386comm_value): Removed; no longer needed.
+
+Sun Apr 4 15:08:48 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coffcode.h (coff_set_section_contents): Don't write out
+ sections without a filepos.
+
+Fri Apr 2 14:35:05 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * seclet.c (seclet_dump_seclet): Correct SEC_HAS_CONTENTS test.
+
+Wed Mar 31 17:41:05 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_MIPS_GPREL.
+ * libecoff.h (ecoff_data_type): Added gp_size field.
+ * coff-mips.c (ecoff_mkobject_hook): Initialize gp_size to 8.
+ (ecoff_set_symbol_info): Compare against gp_size, not hardcoded 8.
+ Set flags to 0 for large common symbols.
+ (ecoff_gprel_reloc): Handle non-zero addend for external symbols,
+ which can occur for gas-generated relocs.
+ (ecoff_bfd_reloc_type_lookup): Added BFD_RELOC_MIPS_GPREL case.
+ * bfd.c (bfd_get_gp_size, bfd_set_gp_size): New functions.
+ * Makefile.in (bfd.o): Now depends on coff/sym.h and libecoff.h.
+
+Tue Mar 30 09:33:16 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * srec.c (srec_set_section_contents): Use lma field for load
+ address.
+ * section.c: Add declaration of lma field to section structure.
+ * coffcode.h (coff_write_object_contents): Use lma field for load
+ address.
+ * bfd-in.h (bfd_set_section_vma): Set lma along with vma.
+
+ * aoutx.h (translate_from_native_sym_flags): Now handles indirect
+ symbols in a better way. (translate_to_native_sym_flag): Set the
+ N_INDR bit when necessary. (aout<>slurp_symbol_table): Maintain
+ indirect state.
+ * section.c: Added BFD_IND_SECTION_NAME and bfd_ind_section.
+ (bfd_make_section): Cope with new builtin section.
+ * syms.c (bfd_decode_symclass): Can now print indirect section
+ info.
+
+Wed Mar 24 13:36:33 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * aout-target.h (MY(object_p)): Fail if MACHTYPE_OK is
+ defined, and yields false.
+ * aout-mipsbsd.c, i386bsd.c: Define MACHTYPE_OK appropriately.
+
+ * archive.c (snarf_ar_hdr): Add support for reading (only,
+ so far) BSD-4.4-style extended headers.
+ * archive.c: Some more comments.
+
+Wed Mar 24 02:05:10 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
+
+ * Makefile.in: fix rule for dvi and info, so that the recursive
+ makes does the right thing, instead of always info
+
+Wed Mar 24 02:56:44 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * libbfd.c (bfd_seek): Disable optimized handling for archives and
+ archive members; they need more special reatment. For now, verify
+ that computed and actual file positions correspond.
+
+Tue Mar 23 08:45:33 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * mipsbsd.c: Renamed from aout-mipsbsd.c.
+ (set_arch_mach): Delete non-MIPS code.
+ (reloc_howto_type_lookup): Ditto.
+ * Makefile.in: Adjusted.
+
+ * libbfd.c (bfd_tell): Update `where' field.
+ (bfd_seek): Don't do anything if we're not changing the file
+ position. If FILE_OFFSET_IS_CHAR_INDEX is defined, check `where'
+ field against a SEEK_SET request. Call bfd_tell to re-update
+ `where' field when done.
+ (bfd_read, bfd_write) [FILE_OFFSET_IS_CHAR_INDEX]: Maintain
+ `where' field.
+ * hosts/sparc.h: Define FILE_OFFSET_IS_CHAR_INDEX.
+
+Mon Mar 22 23:18:10 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: added installcheck target
+
+Mon Mar 22 14:57:18 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_set_symbol_info): Relocate encapsulated stabs
+ if the type is not stNil.
+
+Tue Mar 16 10:35:27 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * elf32.c (elf_little_vec, elf_big_vec): Delete now-invalid
+ forward declarations.
+
+ * elf32-sparc.c (elf_sparc_howto_table): Don't use CONST here,
+ it's implied by the type.
+
+Fri Mar 12 18:58:08 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.host: recognize sparc-sun-solaris2* instead of sparc-sun-solaris*
+
+Tue Mar 9 09:23:12 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * rs6000-core.c: Add .ldinfo section.
+
+Fri Mar 12 11:57:52 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (MAKEOVERRIDES): Define to be empty.
+
+Fri Mar 12 08:32:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * section.c (bfd_set_section_contents): whitespace
+ * seclet.c (seclet_dump_seclet): Don't try and fill sections with
+ no contents.
+
+Thu Mar 11 19:26:15 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * hosts/go32.h: don't define POSIX_UTIME
+
+Tue Mar 9 10:52:01 1993 Fred Fish (fnf@cygnus.com)
+
+ * elf32.c (elf_object_p): Use ELF_ARCH stored in xvec to match
+ against machine architecture stored in the ELF header, to resolve
+ ambiguities.
+ * elf32.c (bfd_section_from_shdr): Bfd_make_section can return
+ NULL, so only use results when non-NULL.
+ * targets.c (elf32_m68k_vec, elf32_i860_vec): Add extern decls
+ and add to vector of targets.
+
+Mon Mar 8 15:13:44 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_set_symbol_info): Encapsulated STABS symbols
+ are always just debugging symbols.
+
+ * coff-mips.c (ecoff_[gs]et_sym_index): Moved macros from here...
+ libecoff.h (ecoff_[gs]et_sym_index): ...to here.
+
+Mon Mar 8 14:55:13 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * hppa.c (_PA_RISC_ID): Defined if not already defined (e.g., for
+ hpux 7). Patch from friedman@gnu.ai.mit.edu.
+ (hppa_object_p): Only check for DL_MAGIC and SHL_MAGIC if they're
+ defined, which they aren't in hpux 7.0.
+
+ * aix386-core.c: Include uinfo.h and coredump.h. Patch from Minh
+ Tran-Le, tranle@intellicorp.com.
+
+Fri Mar 5 14:54:21 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_generic_reloc): If the addend is non-zero, go
+ ahead and do the relocation.
+ (ecoff_refhi_reloc): Don't to the relocation here, just remember
+ what needs to be done.
+ (ecoff_reflo_reloc): Do the REFHI relocation here.
+
+Thu Mar 4 14:44:01 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_bfd_reloc_type_lookup): New function.
+ (ecoff_write_object_contents): Added BFD_ASSERT calls to ensure
+ relocs are reasonable.
+ * coff-msym.c: Eliminated uses of DEFUN.
+ (ecoff_swap_tir_out): New function.
+
+Tue Mar 2 17:52:58 1993 Fred Fish (fnf@cygnus.com)
+
+ (Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
+ * configure.host (vax-*-ultrix2*): Add triplet.
+ * hosts/vaxult2.h: New file.
+ * config/vaxult2.mh: New file.
+
+ * aoutx.h (string.h): Include for strchr and friends.
+ * archive.c (string.h): Include for memchr and friends.
+ * elf32.c (string.h): Include for strrchr and friends.
+
+Sat Feb 27 00:44:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * aoutf1.c (sunos4_reloc_type_lookup): Unused; deleted.
+ (MY_set_sizes): Use sunos4_set_sizes.
+
+ * elf32.c: Renamed from elf.c. Several CPU-specific functions
+ deleted, as well as elf-big and elf-little targets.
+ * libelf.h: New file.
+ * elf32-sparc.c, elf32-i386.c, elf32-i860.c, elf32-m68k.c: New
+ files, new targets.
+ * Makefile.in, config/*-elf.mt, targets.c: Adjusted.
+
+ * i386linux.c (TARGETNAME): Use hyphens instead of parentheses.
+
+ * coffcode.h (coff_compute_section_file_positions): Don't need
+ variable "old_sofar" if compiling for i960.
+
+ * reloc.c (bfd_default_reloc_type_lookup): First argument is now a
+ bfd pointer.
+ * libbfd.h: Updated.
+
+ * ieee.c (exten, envi): "static" belongs first in declaration.
+
+Fri Feb 26 17:37:34 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * srec.c: add support for symbolsrec, srecords with symbols in
+ them.
+
+Thu Feb 25 11:43:30 1993 John Gilmore (gnu@cacophony.cygnus.com)
+
+ * ieee.c: cast all arguments of ieee_write_byte to bfd_byte
+ to avoid lint complaints.
+
+Thu Feb 25 02:15:52 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf.c (elf_write_object_contents): Section ".shstrtab" should be
+ type SHT_STRTAB. Don't alter file offset for section 0.
+ (reloc_type_names): Now an array instead of a macro. Still inside
+ "#if 0", since it's used only in debugging code also in "#if 0".
+ (struct elf_reloc_map_elt, struct elf_reloc_map): New types.
+ (sort_reloc_map): New function.
+ (sparc_reloc_map): New variable.
+ (elf_bfd_reloc_type_lookup): New function.
+
+Tue Feb 23 12:17:16 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * bfd-in.h (JUMP_TABLE): Added bfd_reloc_type_lookup and
+ bfd_make_debug_symbol; they were already in the target structure.
+ * Adjusted all uses of JUMP_TABLE.
+ * coffgen.c, libcoff-in.h (coff_bfd_make_debug_symbol): Renamed
+ from coff_make_debug_symbol.
+ * libcoff.h: Updated accordingly.
+
+ * Minor cleanups provoked by gcc warnings:
+ * aoutx.h (NAME(aout, reloc_type_lookup)),
+ cpu-h8300.c (local_bfd_reloc_type_lookup),
+ cpu-z8k.c (local_bfd_reloc_type_lookup): Added default case to
+ switches.
+ * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap),
+ ieee.c (ieee_slurp_section_data),
+ elf.c (elf_make_sections, elf_fake_sections,
+ elf_compute_section_file_positions, elf_write_object_contents):
+ Removed unused variables.
+ * archures.c: Removed /* from within comment.
+ * bout.c (b_out_squirt_out_relocs): Initialize r_extern.
+ * oasys.c (oasys_write_data): Initialize i.
+
+Mon Feb 22 18:40:06 1993 Per Bothner (bothner@rtl.cygnus.com)
+
+ * libcoff.h (obj_raw_syment_coun): New macro.
+ * coffgen.c (coff_get_normalized_symtab): Initialize
+ raw_syment_count.
+ * coffgen.c (coff_find_nearest_line): Numerous little fixes.
+
+Mon Feb 22 15:03:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (ecoff_set_symbol_info): stBlock symbols are always
+ debugging symbols.
+ (ecoff_get_debug): Offset the fdr adr by the adr of the first pdr,
+ for compatibility with tools from MIPS.
+
+ * config/bigmips.mt: New file; default vector is ecoff_big_vec.
+ * config/irix3.mt, config/irix4.mt: Removed.
+ * configure.in (mips-*-ecoff): New target; uses bigmips.mt.
+ (mips-sgi-*, mips-big-*): Use bigmips rather than irix3.
+
+Wed Feb 17 23:40:41 1993 John Gilmore (gnu@cygnus.com)
+
+ * hosts/hp300bsd.h: Add gross hack to determine whether we
+ are running on BSD 4.3 or BSD 4.4, and use appropriate include
+ files (and set other parameters) to match.
+
+Wed Feb 17 12:28:13 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * trad-core.c (trad_unix_make_empty_symbol): wrap PARAMS around an
+ ansi definition which otherwise confuses non-ansi compilers.
+
+ * aout-adobe.c (aout_adobe_object_p): eliminate a warning from vax
+ ultrix cc by forward declaring getenv as is done in
+ bfd_find_target.
+
+Tue Feb 16 17:56:58 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * elf.c (elf_info_to_howto): cast an enum into unsigned char
+ avoiding a fatal error in vax ultrix 4.2 cc.
+
+Tue Feb 16 00:44:54 1993 John Gilmore (gnu@cygnus.com)
+
+ * bfd-in.h, VERSION: Roll to version 2.1.
+
+Mon Feb 15 20:43:51 1993 John Gilmore (gnu@cygnus.com)
+
+ * oasys.c (oasys_write_object_contents): Lint.
+ * srec.c: Whitespace cleanup.
+
+Fri Feb 12 14:23:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffgen.c (coff_print_symbol): Print correct tagndx value;
+ cleaned up output formatting a bit.
+
+Fri Feb 12 08:28:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coffcode.h (coff_set_arch_mach_hook): *FIXME* the H8/300 is always
+ relaxable. Should be moved somewhere else.
+
+Thu Feb 11 14:09:42 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * aout-mipsbsd.c: Eliminated uses of DEFUN.
+ (aout_mips_*_vec): Added seclet_link element.
+
+ * Makefile.in (BFD_BACKENDS, CFILES, aout-mipsbsd.o): Added
+ support for aout-mipsbsd target.
+
+ * bout.c (get_value): Don't truncate 32-bit addend to 16 bits.
+
+Fri Feb 5 08:08:43 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * cpu-h8500.c (scan_mach): return false if it's not an H8/500
+
+Thu Feb 4 12:52:40 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ Add support for the H8/500
+
+ * coff-h8500.c, cpu-h8500.c, archures.c, coffcode.h, targets.c
+
+Thu Feb 4 12:35:02 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libecoff.h: New file. Defines ECOFF backend data for gdb.
+ * coff-mips.c: Now includes libecoff.h.
+ (ecoff_data_type): Moved to libecoff.h.
+ (ecoff_slurp_symbolic_info): Made globally visible so that gdb can
+ call it. If there is ever another ECOFF target, this and the
+ swapping functions should be accessed via an ECOFF specific target
+ vector.
+ * Makefile.in (coff-mips.o): Depends on libecoff.h.
+
+Wed Feb 3 09:14:36 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h: Removed MIPS specific information, since coff-mips.c
+ no longer includes this file.
+
+ * coff-msym.c (ecoff_swap_fdr_in, ecoff_swap_ext_in): Set reserved
+ bits to 0 to make comparison test useful.
+
+ * config/irix3.mh, config/irix4.mh (HDEFINES): Set to -G 4 to
+ avoid overflowing GP accessible sections in binutils/objdump.
+
+Tue Feb 2 15:36:55 1993 Per Bothner (bothner@cygnus.com)
+
+ * aoutx.h (NAME(aout,slurp_symbol_table)): Made symbol
+ reading more robust: Fail if string index is out of string
+ table range.
+
+Tue Feb 2 11:43:25 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * bout.c (b_out_get_relocated_section_contents, cases PCREL24 and
+ PCREL13): Don't take dst_address into account; the input file has
+ already taken care of that.
+
+Tue Feb 2 11:41:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c: Completed support for linker and binutils.
+
+Mon Feb 1 14:45:38 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * bout.c (b_out_get_relocated_section_contents, case ABS32): Keep
+ original addend from section contents.
+
+Thu Jan 28 21:01:37 1993 John Gilmore (gnu@cygnus.com)
+
+ Fix minor bugs reported by Carl Greco, <cgreco@parrot.creighton.edu>:
+ * hosts/delta88.h (strtol): Fix prototype.
+ * config/m88k-coff.mt (SELECT_ARCHITECTURES): Fix name.
+
+Wed Jan 27 17:16:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf.c: Get rid of "#ifdef sparc".
+ (RELOC_TYPE_NAMES): Never used (currently), so don't include it.
+ (elf_sparc_howto_table): Renamed from elf_howto_table, and always
+ used.
+ (elf_info_to_howto): Use runtime conditionals on CPU type, not
+ compile type conditionals on host CPU.
+ (elf_little_vec, elf_big_vec): Use bfd_default_reloc_type_lookup,
+ not null pointer.
+ (reloc_type, RELOC_TYPE_NAMES): Include i386 values.
+
+Tue Jan 26 11:43:14 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * section.c (SEC_IS_COMMON): New section flag, needed for MIPS
+ ECOFF which has two common sections.
+ (bfd_com_section): Set SEC_IS_COMMON flag.
+ * bfd-in.h (bfd_is_com_section): New macro to test SEC_IS_COMMON.
+ * aoutx.h, archive.c, bout.c, coff-a29k.c, coff-m88k.c,
+ coff-mips.c, coffgen.c, ieee.c, oasys.c, reloc.c, syms.: Use
+ bfd_is_com_section macro rather than checking for equality to
+ bfd_com_section.
+
+Mon Jan 25 15:27:36 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h (_bfd_coff_mkobject_hook): Pass aouthdr argument.
+ (coff_mkobject_hook): Accept aouthdr argument.
+ * coffgen.c (coff_real_object_p): Pass aouthdr to mkobject_hook.
+ Handle NULL aouthdr argument.
+ (coff_object_p): If there is no aouthdr, pass it as NULL to
+ coff_real_object_p.
+ * libcoff.h: Rebuilt for mkobject_hook changes.
+
+ * coffswap.h (coff_swap_aouthdr_in, coff_swap_aouthdr_in): Swap
+ additional MIPS ECOFF fields.
+
+Sat Jan 23 18:36:20 PST 1993 Ralph Campbell (ralphc@pyramid.com)
+
+ * configure.host: added mips-dec-bsd*
+ * configure.in: added mips-dec-bsd*
+ * aout-mipsbsd.c: new file for mips-dec-bsd*
+ * aout-target.h: don't define '' if 'MY_BFD_TARGET' is defined.
+ * aoutx.h: added mips support.
+ * archures.c: added mips support to bfd_default_scan().
+ * cpu-mips.c: added support for R4000 (untested).
+ * libaout.h: added MIPS1 & MIPS2 magic numbers.
+ * reloc.c: fix typo's in comments. Added BFD_RELOC entries which I
+ hope will make it into include/bfd.h.
+ * targets.c: added aout_mips_*_vec.
+
+Wed Jan 20 17:15:52 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/decstation.mt: Set DEFAULT_VECTOR to ecoff_little_vec.
+
+Tue Jan 19 09:06:14 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * bfd-in.h (bfd_asymbol_value): Add needed parentheses.
+
+ * libcoff-in.h: Update prototype for coff_count_linenumbers.
+
+Fri Jan 15 18:13:17 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-msym.c (ecoff_swap_hdr_out, ecoff_swap_fdr_out,
+ ecoff_swap_pdr_out, ecoff_swap_sym_out, ecoff_swap_ext_out,
+ ecoff_swap_rndx_out, ecoff_swap_rfd_out, ecoff_swap_opt_in,
+ ecoff_swap_opt_out, ecoff_swap_dnr_in, ecoff_swap_dnr_out): New
+ functions.
+ * coffswap.h: If NO_COFF_RELOCS is defined, don't define
+ bfd_swap_reloc_in or coff_swap_reloc_out.
+ * coff-mips.c: Added code to link and write out symbolic debugging
+ information, and to swap relocs in and out.
+
+Thu Jan 14 15:51:58 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libcoff.h, coffgen.c (coff_count_linenumbers), coffcode.h
+ (coff_write_object_contents): coff_count_linenumbers returns the
+ number of line number records it found.
+
+ * coffgen.c (coff_write_linenumbers): only write out line numbers
+ in the section they belong to.
+
+Mon Jan 11 18:32:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * targets.c (bfd_target): Added relocateable argument to
+ _bfd_get_relocated_section_contents. Added _bfd_seclet_link
+ target vector for linker use.
+ * bfd.c (bfd_seclet_link): New macro.
+ * bfd-in.h (JUMP_TABLE): Added _bfd_seclet_link.
+ * seclet.c (rel, seclet_dump_seclet): Added relocateable argument
+ and boolean return value. Made static.
+ (bfd_generic_seclet_link): Renamed from seclet_dump. Added
+ relocateable argument.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Added
+ relocateable argument (if relocateable, saves relocs).
+ * bout.c (b_out_get_relocated_section_contents),
+ reloc16.c (bfd_coff_reloc16_get_relocated_section_contents): Added
+ relocateable argument (if relocateable, just calls
+ bfd_generic_get_relocated_section_contents).
+ * libcoff-in.h (bfd_coff_reloc16_get_value): Added relocateable
+ argument to prototype.
+ * All targets: Set new _bfd_seclet_link vector to
+ bfd_generic_seclet_link.
+
+Sat Jan 9 21:29:32 1993 Stu Grossman (grossman at cygnus.com)
+
+ * coffgen.c: #include seclet.h.
+
+Sat Jan 9 19:48:14 1993 Stu Grossman (grossman at cygnus.com)
+
+ * hppa.c (hppa_object_setup): Get rid of all knowledge of stabs
+ debug info. Setup info about linker symbols only, and use
+ standard bfd fields to hold the info.
+ * (hppa_object_p): Remove unneeded decls.
+ * (hppa_new_section_hook): Get rid of most of this.
+ * libhppa.h (struct hppadata): Remove ten pounds of useless ugly
+ fat. Remove all knowledge of stabs, remove redundant knowledge of
+ linker symbols.
+ * Remove macros for accessing fields which are now gone.
+
+Fri Jan 8 15:20:00 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on
+ STYP_NOLOAD bit.
+ * coff-z8k.c: delete unused reloc functions
+
+Fri Jan 8 15:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * bfd.c (struct _bfd): Added ecoff_tdata to tdata union.
+ * targets.c (enum target_flavour): Added bfd_target_ecoff_flavour.
+ * coff-msym.c: Use DEFUN for function definitons.
+ * coff-mips.c: Added code to read and print symbols, and to find
+ line numbers.
+
+ * coffcode.h: Moved many generic functions into coffgen.c. Moved
+ swapping functions into coffswap.h for ECOFF use. Moved
+ relocation functions, only used by h8300 and z8k, into reloc16.c.
+ Added hooks for coffgen.c functions to backend data structure, and
+ added hook functions. Still more could be done.
+ * coffswap.h: New file to hold COFF swapping routines.
+ * coffgen.c: New file to hold generic COFF functions.
+ * reloc16.c: New file to hold h8300 and z8k specific relocation
+ functions.
+ * libcoff-in.h: Added declarations for functions in coffgen.c.
+ * libcoff.h: Rebuilt to incorporate changes.
+ * coff-h8300.c: Function name changes.
+ * coff-z8k.c: Function name changes. Use coff_reloc16_extra_cases
+ hook rather than defining EXTRA_CASES.
+ * Makefile.in: Build new files coffgen and reloc16. Added
+ dependencies of coff-*.o on coffswap.h and seclet.h.
+
+Thu Jan 7 16:16:26 1993 Per Bothner (bothner@cygnus.com)
+
+ * ieee.c (ieee_slurp_sections): Add cast to avoid warning
+ about discarding const.
+
+Wed Jan 6 00:16:49 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * archive.c, seclet.c, elf.c use bfd_xmalloc instead of malloc
+
+Tue Jan 5 09:35:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in (post-target): If --with-minimal-bfd is specified,
+ set MINIMIZE=1.
+
+Mon Jan 4 07:20:01 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * srec.c (srec_write_records): one of my boards wants a CR between
+ records.
+
+Wed Dec 30 12:46:30 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * archive.c (do_slurp_coff_armap): set symdef_count correctly
+ (it broke a couple of weeks ago).
+
+Tue Dec 29 21:41:05 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * elf.c (bfd_elf_find_section): Switch back to "struct ..." for
+ return type, so libbfd.h doesn't reference undefined typedefnames.
+
+Tue Dec 29 13:54:35 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h (coff_real_object_p): use name I386AIXMAGIC rather
+ than I386SVMAGIC.
+ (coff_pointerize_aux): don't pointerize a negative tagndx
+ (sometimes generated by SCO 3.2v4 cc).
+
+ * bout.c (calljx_callback, callj_callback,
+ b_out_get_relocated_section_contents): warn if relocating against
+ an undefined symbol.
+
+Mon Dec 28 14:30:55 1992 Stu Grossman (grossman at cygnus.com)
+
+ * hppa.c: Get rid of DEFUN, use more conventional prolog stuff.
+ Make a bunch more routines be static.
+ * hppa.c (fill_spaces): Get rid of this, replace with much better
+ written setup_sections().
+ * (setup_sections): New routine to create BFD sections for each
+ space and subspace in SOM files.
+ * (hppa_object_setup): Use BFD sections created by
+ setup_sections() to locate GDB symbol table info.
+ * (make_unique_section): New routine to create a BFD section. It
+ ensures that the given name is unique, and will generate a unique
+ one if necessary.
+ * (hppa_object_p): Become much more paranoid about file header.
+ * (make_bfd_asection): Call bfd_make_section to do the dirty
+ work. Simplify code somewhat.
+ * (hppa_core_file_p): Use proper name for stack section.
+ * libhppa.h: Remove millicode_start, millicode_end decls.
+
+Mon Dec 28 11:03:22 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * Makefile.in (coff-we32k.o, coff-z8k.o): Note dependencies.
+
+ * reloc.c (bfd_perform_relocation): For normal 2- or 4-byte
+ relocs, don't bother doing the adjustment if the value to add is
+ zero.
+
+Sun Dec 27 17:45:05 1992 Fred Fish (fnf@cygnus.com)
+
+ * bfd.c (bfd_get_size): New function that gets an upper bound
+ on the possible size of any object in a bfd.
+ * elf.c (bfd_elf_find_section, elf_get_str_section,
+ elf_get_symtab_upper_bound): Rewrite to avoid NULL pointer
+ dereferences.
+ * elf.c (elf_big_vec, elf_little_vec): Document last three
+ members initialized to NULL.
+
+Thu Dec 24 17:49:09 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * hppa.c: change a 'const' to 'CONST', or else HP C compiler dies
+
+Mon Dec 21 16:33:34 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * hosts/std-host.h: New file. Attempt at a generic/default
+ set of definitions, to discourage porting to new hosts by copying.
+ * hosts/news.h: Removed.
+ * hosts/sparc.h: Use std-host.h.
+ * bfd-in.h: New macros bfd_asymbol_bfd and bfd_asymbol_flavour;
+ perhaps we can later remove the the_bfd field from each symbol.
+ * syms.c (struct symbol_cache_entry): Remove unused field
+ app_data. Add comment noting that the_bfd is almost redundant,
+ but not quite.
+ * aoutx.h, coff-a29k.c, coff-i386.c, coff-i960.c, coffcode.h:
+ Use new macros bfd_asymbol_bfd and bfd_asymbol_flavour.
+ * hppa.c (fill_spaces): Make slightly more rebust.
+ * configure.in: Allow std-host as the "default" host.
+
+Mon Dec 21 17:24:13 1992 Stu Grossman (grossman at cygnus.com)
+
+ * bfd.c: Add struct hppa_core_data to tdata union.
+ * hppa.c: Conditionalize on HOST_HPPAHPUX instead of hp9000s800.
+ Get rid of HPPA/BSD specific code. That will go somewhere else
+ someday.
+ * (fill_spaces): Don't spin forever and die if you don't find
+ $MILLICODE$ subspace.
+ * (hppa_object_p): Make sure that we have a real honest-to-cthulu
+ exec file!
+ * (hppa_core_file_failing_signal, hppa_core_file_failing_command):
+ Make these work for HPUX.
+ * (make_bfd_asection): New routine to make section creation a
+ little easier.
+ * (hppa_core_file_p): Completely rewrite, leave out bugs.
+ * libhppa.h: #include the right system files. Redefine all of
+ the structs/macros for hacking core files to use more sensible
+ HPUX core file structures.
+ * targets.c (target_vector): Conditionalize hppa_vec on
+ HOST_HPPAHPUX, not hp9000s800.
+ * hosts/hppahpux.h: #include stdlib.h to get correct decls for
+ malloc and realloc. #define HOST_HPPAHPUX.
+
+Mon Dec 21 12:40:10 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Patches from Minh Tran-le <mtranle@paris.intellicorp.com>.
+ * configure.in (i386-*-isc*, i386-*-aix*): New targets.
+ * configure.host (i386-*-isc*, i386-*-aix*): New hosts.
+ * hosts/i386isc.h, config/i386isc.mh: New files for Interactive
+ Unix.
+ * hosts/i386aix.h, config/i386aix.mh: New files for AIX on PS/2.
+ * aix386-core.c: New file for handling core files on AIX on PS/2.
+ * targets.c: if AIX386_CORE, use aix386_core_vec.
+ * coffcode.h (coff_real_object_p): check for I386SVMAGIC as well
+ as I386MAGIC.
+
+Fri Dec 18 10:20:27 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * aoutf1.h (sunos4_write_object_contents): set flags to 0, fixing
+ 1927.
+
+Thu Dec 17 19:35:32 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: added dvi target
+
+Thu Dec 17 00:36:24 1992 John Gilmore (gnu@cygnus.com)
+
+ * bfd.c: Use right name for tekhex tdata struct.
+ * tekhex.c: Insert leading_char (0) into bfd_target struct. Style.
+ * libcoff.h: Updated to get spacing change from coffcode.h.
+ * trad-core.c: leading_char is 0 (no symbols!), not '_'.
+
+Tue Dec 15 15:40:30 1992 Per Bothner (bothner@cygnus.com)
+
+ * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap): New
+ functions, with the "guts" of the old bfd_slurp_bsd_armap
+ and bfd_slurp_coff_armap, but assuming we've already checked
+ if the armap is present or not.
+ Also, rewrite a bit to avoid keeping around obstack data
+ that we don't need.
+ * archive.c (snarf_ar_header, _bfd_slurp_extended_name_table):
+ Various fixes to correctly handle COFF_style archives names.
+ (Note that because these have a trailing '/', the names can
+ have embedded spaces.)
+ * archive.c (bfd_slurp_armap): New function, replaces old
+ bfd_slurp_bsd_armap and bfd_slurp_coff_armap. Recognizes
+ _either_ format, and calls do_slurp_bsd_armap or
+ do_slurp_coff_armap if either form of map is seen.
+ * libbfd-in.h: Changed bfd_slurp_bsd_armap and
+ bfd_slurp_coff_armap into macro synonyms for bfd_slurp_armap.
+ * elf.c (elf_slurp_armap, elf_write_armap): Fix.
+ * Makefile.in (AR_FLAGS): Use rc instead of non-standard qc.
+
+Mon Dec 14 17:08:08 1992 Stu Grossman (grossman at cygnus.com)
+
+ * hppa.c: #include "sysdep.h", not <sysdep.h>.
+ * libhppa.h: Make millicode_start and millicode_end be unsigned
+ int to be same type as CORE_ADDR in GDB. Why are these here?
+
+Sat Dec 12 15:54:36 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-i386.c (CALC_ADDEND): if reloc is PC relative, add the
+ vaddr of the section to the addend.
+ * targets.c: if MINIMIZE is 1, and SCO_CORE is defined, add
+ SCO_CORE to SELECT_VECS.
+ (target_vector): add sco_core_vec.
+ * sco-core.c (sco_core_vec): add leading underscore initializer.
+ * configure.in (i[34]86-*-sco*): use target i386-sco.
+ * config/i386-sco.mt: new file; define SCO_CORE.
+
+Thu Dec 10 02:13:15 1992 John Gilmore (gnu@cygnus.com)
+
+ * aout-adobe.c (aout_adobe_object_p): Fix !strcmp thinko.
+
+Fri Dec 4 14:02:49 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * coffcode.h (bfd_coff_std_swap_table): Now static and const.
+
+Thu Dec 3 16:54:58 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * hosts/i386linux.h: Include unistd.h.
+
+ * aoutx.h (print_symbol): aout_stab_name returns a constant
+ string.
+ * libaout.h (aout_stab_name): Fix prototype.
+ * stab-syms.c (aout_stab_names): Array is now const.
+ (aout_stab_name): Return value is now pointer to const.
+
+ * aoutx.h, archive.c, archures.c, coffcode.h, ctor.c, reloc.c,
+ syms.c: Doc fixes.
+
+ * syms.c (asymbol): Added new field "app_data", for data
+ particular to the application. Some of the linker flags ought to
+ get moved to this field someday.
+
+ * archures.c (bfd_default_scan): Recognize a few more numbers:
+ 80486, 80960, and 960.
+
+ * bfd-in.h (COFF_SWAP_TABLE): New is just address of
+ bfd_coff_std_swap_table, cast to PTR.
+ * bfd.c (bfd_coff_swap_*): Deleted macros.
+ * targets.c (struct bfd_target): Deleted COFF-specific swapping
+ routine pointers.
+ * coffcode.h (type bfd_coff_backend_data): New structure type,
+ contains pointers to the COFF-specific swapping routines.
+ (bfd_coff_std_swap_table): New data structure, to be used when
+ NO_COFF_SYMBOLS and NO_COFF_LINENOS are not defined.
+ (bfd_coff_swap_*): New macros.
+ * coff-mips.c (mips_coff_swap_table): New data structure.
+ (ecoff_big_vec): Use it.
+ * All COFF targets: Moved COFF_SWAP_TABLE to target-specific data.
+ * All other targets: Deleted coff-specific vector entries.
+
+ * trad-core.c: Fixed some `PARAMS' uses that were missing
+ parentheses.
+
+Sun Nov 29 08:37:13 1992 Fred Fish (fnf@cygnus.com)
+
+ * aoutx.h (some_aout_object_p): Protect arg prototype in
+ callback_to_real_object_p with PARAMS macro for non-ANSI compilers.
+
+Sat Nov 28 04:01:21 1992 John Gilmore (gnu@cygnus.com)
+
+ * aout-target.h, aoutf1.h, trad-core.c, coffcode.h, libaout.h,
+ libbfd-in.h, bfd-in.h: Eliminate all PROTO calls, replace with
+ PARAMS for readability.
+
+ * aoutx.h: Add type to callback parameter.
+ * coff-mips.c: Don't call trad-core.h, not needed.
+ * trad-core.c: Incorporate trad-core.h declarations. Fix comments.
+ * trad-core.h: Eliminate, unused.
+
+Wed Nov 18 13:16:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * format.c (bfd_check_format): if default target isn't found
+ then look through the entire list rather than return early.
+
+Mon Nov 16 14:33:03 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/i960-coff.mt: reorder vec to match bfd_check_format (from Per)
+
+Thu Nov 12 17:01:41 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: pass down prefix and exec_prefix in FLAGS_TO_PASS
+
+Thu Nov 12 09:46:47 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-z8k.c: checkpoint, more addressing modes handled
+ * coffcode.h (get_value): don't truncate reloc->addend field, it's
+ a long now.
+
+Wed Nov 11 23:57:55 1992 Brendan Kehoe (brendan@cygnus.com)
+
+ * we32k.mt (TDEFAULTS): Use we32kcoff_vec, not i386coff_vec.
+
+Tue Nov 10 14:04:38 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: minor tweaks to make $(CC) command lines more consistent
+
+Mon Nov 9 23:58:17 1992 John Gilmore (gnu@cygnus.com)
+
+ * opncls.c (bfd_fdopenr, bfd_close): Add doc about cacheing
+ and about when file descriptors are closed.
+
+Sat Nov 7 00:42:20 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * bout.c (b_out_squirt_out_relocs): Make sure alignment relocs get
+ written out correctly.
+
+Thu Nov 5 15:34:19 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * section.c: New section bit SEC_SHARED_LIBRARY.
+ coffcode.h (styp_to_sec_flags): if STYP_NOLOAD && (STYP_TEXT ||
+ STYP_DATA), set SEC_SHARED_LIBRARY. This seems to be correct for
+ i386-sysv.
+
+Thu Nov 5 04:43:09 1992 John Gilmore (gnu@cygnus.com)
+
+ * target.c (struct bfd_target): Eliminate the SDEF and SDEF_FMT
+ macros; use PARAMS to declare the function pointers involved.
+
+ * bfd-in.h, bfd.c, libbfd.h, reloc.c, seclet.h, section.c,
+ targets.c: Rename struct bfd_seclet_struct to struct bfd_seclet.
+
+Thu Nov 5 02:59:09 1992 John Gilmore (gnu@cygnus.com)
+
+ Cleanup: Replace all uses of EXFUN in the BFD sources, with PARAMS.
+
+ * archures.c, reloc.c, section.c, tekhex.c: Use PARAMS in
+ declaring pointers to functions.
+ * cache.c, elf.c: Move static function decls to top, use PARAMS.
+ * seclet.h: Declare external function with PARAMS.
+
+ * doc/chew.c (exfunstuff): Eliminate.
+ (paramstuff): Replace exfunstuff with function to generate PARAMS.
+ * doc/proto.str: Use paramstuff rather than exfunstuff.
+
+ * libbfd.h: Update, based on changes in source code and chew.
+
+Wed Nov 4 22:47:29 1992 John Gilmore (gnu@cygnus.com)
+
+ * libieee.h: Add FIXME about removing limit on number of sections.
+ * bfd-in.h: Improve comments to make it clear that bfd.h is
+ the wrong place to edit this file.
+ * Makefile.in (install): Install ansidecl.h and obstack.h in the
+ same places where we install bfd.h.
+
+Wed Nov 4 13:40:23 1992 Sean Eric Fagan (sef@cygnus.com)
+
+ * coffcode.h (coff_swap_aux_out, coff_swap_aux_in): check for
+ symbol type before blindly modifying the auxent. Specifically,
+ only modify the endndx fields for types that need it, and don't
+ set the array information for non-arrays.
+
+Wed Nov 4 09:30:50 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * aoutx.h (some_aout_object_p): Section list should be set up
+ correctly anyways; don't have to set up "next" pointers manually.
+
+Mon Nov 2 12:36:14 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/delta88.mh, config/hp300.mh, config/hppahpux.mh,
+ config/i386v.mh: removed -DUSG from HDEFINES.
+ hosts/delta88.h, hosts/hp300.h, hosts/hppahpux.h, hosts/i386v.h:
+ defined USE_UTIME.
+ hosts/i386v.h: don't define POSIX_UTIME.
+
+Fri Oct 30 16:13:52 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * ieee.c (ieee_slurp_sections): make a private copy of the
+ section's name before truncating it.
+
+Thu Oct 29 08:30:50 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * hppa.c: add symbol_leading_char entry in transfer vec
+
+,Wed Oct 28 16:11:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * ieee.c (get_symbol): can now cope when two symbols of a
+ different class, but the same index number occur consecutively.
+ (get_section_entry): nicer name for sections being forward
+ referenced. (ieee_archive_p): don't free the filename string,
+ since it was never malloced.
+
+Wed Oct 28 13:42:09 1992 John Gilmore (gnu@cygnus.com)
+
+ * coffcode.h (coff_write_object_contents): Zero timestamp field.
+
+Tue Oct 27 12:24:34 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h (coff_swap_aux_out): set the fcnary info before
+ optionally setting the dimen info, since they are in the same
+ memory locations. Also zero out external auxent.
+ (coff_write_symbol): don't zero external auxent; now done in
+ coff_swap_aux_out.
+
+Fri Oct 23 13:55:35 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Check fclose return value for errors.
+ libbfd.h: bfd_cache_close now returns a boolean.
+ cache.c (bfd_cache_delete): return fclose success value.
+ (bfd_cache_close): return bfd_cache_delete return value.
+ opncls.c (bfd_close, bfd_close_all_done): return result of
+ bfd_cache_close.
+
+Fri Oct 23 10:32:36 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * seclet.c (rel): don't load sections without the SEC_LOAD bit.
+
+Thu Oct 15 10:16:35 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-m68k.c (m68k_howto2type, SELECT_RELOC): new function to
+ work out a coff relocation type from a howto's attributes rather
+ than using the input r_type field. This fixes PR1677 and allows
+ conversion of a.out relocs to coff relocs.
+
+ * coffcode.h (coff_write_relocs): if supplied a relocation
+ relative to an absolute symbol, use the right symbol index.
+
+ * reloc.c (bfd_perform_relocation): do a partial link for coff
+ relocs right.
+
+Fri Oct 23 08:15:56 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * changes to support i386-sysv with shared libraries:
+ * coffcode.h (sec_to_styp_flags): if TWO_DATA_SECS is defined,
+ check for .data2; if _LIB is defined, check for it; map
+ SEC_NEVER_LOAD to STYP_NOLOAD.
+ (styp_to_sec_flags): map STYP_NOLOAD to SEC_NEVER_LOAD.
+ (make_a_section_from_file): if TWO_DATA_SECS, accept .data2.
+ (coff_write_object_contents): force vaddr of .lib to 0; set scnptr
+ if section has contents, not just if it is loadable; if
+ TWO_DATA_SECS, check for .data2
+ (coff_set_section_contents): set vma of .lib section to number of
+ .lib sections.
+ * coff-i386.c: define TWO_DATA_SECS; use a special CALC_ADDEND;
+ don't define coff_write_armap to bsd_write_armap.
+ * hosts/i386v.h: don't include <utime.h>, since it is not provided
+ by SVR3.2.
+
+Thu Oct 22 22:40:20 1992 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * solaris2.h: Get the definition of alloca from alloca.h if we
+ aren't using gcc.
+
+Thu Oct 22 03:07:28 1992 John Gilmore (gnu@cygnus.com)
+
+ * configure.in (i960-*-{aout,bout}): Support these.
+
+Wed Oct 21 03:46:34 1992 John Gilmore (gnu@cygnus.com)
+
+ * config/a29k-aout.mt (DEFAULT_TARGET): Set to one that exists.
+
+Thu Oct 15 15:05:39 1992 Per Bothner (bothner@cygnus.com)
+
+ * apollo68.h, apollov68.h, hp300.h, i386v.h, irix3.h: Remove
+ no-longer-used definitions of L_SET and L_INCR.
+ * i386linux.h: Tweaks to smooth Linux build.
+
+Thu Oct 15 01:32:22 1992 John Gilmore (gnu@cygnus.com)
+
+ * seclet.h: Add enum tag to bfd_seclet_enum_type.
+
+ * bfd-in.h (file_ptr): Update comments, make FIXME re off_t.
+
+ * aout-adobe.c, aoutf1.h, archive.c, bout.c, coff-rs6000.c,
+ coffcode.h, elf.c, ieee.c, libaout.h, libbfd.c, oasys.c,
+ sco-core.c: Lint: Second argument of bfd_seek is always file_ptr.
+ Third argument is SEEK_SET or SEEK_CUR. Result is always 0 or -1.
+
+ * aout-adobe.c, aoutf1.h, aoutx.h, bout.c coff-m68k.c, coff-z8k.c,
+ coffcode.h, elf.c, libaout.h, libbfd-in.h, srec.c: Lint.
+
+Fri Oct 9 03:46:37 1992 John Gilmore (gnu@cygnus.com)
+
+ * configure.host: New file, contains mapping of host configs
+ to host support file names for bfd, binutils, opcodes.
+ * configure.in: Use it.
+ * i386aout.c: Cleanup, dump TARGET_IS_LITTLE_ENDIAN_P.
+ * i386bsd.c: Cleanup, reformat.
+ * config/i386-bsd.mt: Comment changes.
+ * config/i386bsd.mh: New file for core file support.
+ * hosts/i386bsd.h: Merge changes from Peter Schauer.
+ * bout.c (ALIGN): Rename to ALIGNER, since system header files
+ on BSD 4.4 define ALIGN (sigh!).
+
+Thu Oct 8 22:18:10 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * libaout.h (aout_backend_data): added exec_header_not_counted
+ field. For ZMAGIC files only, when text_includes_header is set, by
+ default the length of the exec header is counted in the text
+ section size. For go32, exec header is mapped in but does *not*
+ contribute to the size of section.
+ * aoutx.h (aout_adjust_sizes_and_vmas): if exec_header_not_counted
+ is not set, but ztih is, add the size of the exec header to the
+ recorded size of the text section.
+ * aoutf1.h (sunos4_aout_backend): clear exec_header_not_counted.
+ * i386aout.c (i386aout_backend_data): set exec_header_not_counted.
+ Also set text_includes_header.
+ * aout-target.h (*_backend_data): cleare exec_header_not_counted
+ by default in MY(backend_data).
+
+Thu Oct 8 18:12:49 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * aout-target.h (callback): Don't define this function if it won't be
+ used.
+
+ * aoutx.h (some_aout_object_p): Restore old aout_data value if this
+ type doesn't match. Don't lose if file sections have already been
+ created.
+ (set_arch_mach): Set reloc_entry_size.
+ (slurp_symbol_table): Use bfd_h_get_{16,8} for reaeding symbol data.
+
+ * hosts/i386bsd.h: New file.
+ * configure.in: Recognize i[34]86-*-bsd host.
+
+ * aout-target.h (callback, write_object_contents): Delete unused
+ variables.
+
+ * aoutx.h (reloc_type_lookup): New function.
+ * aout-target.h (MY_reloc_howto_type_lookup): Use it as default.
+ * aoutf1.h (sunos4_reloc_type_lookup): Deleted.
+ (MY_reloc_howto_type_lookup): Don't define it.
+
+ * aoutx.h (adjust_sizes_and_vmas): Don't bother with padding for
+ OMAGIC files.
+ (slurp_symbol_table): Use header byte order, not target byte
+ order, for reading symbol data.
+
+Thu Oct 8 17:33:39 1992 John Gilmore (gnu@cygnus.com)
+
+ * configure.in: Undo some brain damage in the host section.
+ * configure.in: Reformat the target section, test many configs.
+ * Makefile.in (make): Remove obsolete `make make'.
+ * aoutx.h (some_aout_object_p): Make defines line up.
+
+Thu Oct 8 08:52:48 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ Now a bfd knows whether underscores are normally prepended
+ to symbols in its file format.
+
+ * aout-adobe.c, aout-target.h, bout.c, coff-a29k.c, coff-h8300.c,
+ coff-z8k.c: targets set so they have leading underscore
+ * coff-i386.c, coff-i960.c, coff-m68k.c, coff-mips.c, coff-m88k.c,
+ coff-rs6000.c, coff-we32k.c, elf.c, ieee.c, srec.c: targets set
+ without leading underscore flag
+ * targets.c: add symbol leading char to xvec description
+ * bfd-in.h (bfd_get_symbol_leading_char): new macro.
+
+Mon Oct 5 14:32:55 1992 Per Bothner (bothner@cygnus.com)
+
+ * archive.c: Make errno global.
+ * archive.c (_bfd_write_archive_contents): If read fails (and
+ errno!=0) set bfd_error to malformed_archive (since this probably
+ indicates a truncated archive), rather than system_call_error.
+
+Mon Oct 5 03:33:39 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * Makefile.in: added rules for i386bsd.c
+ * i386bsd.c: new file, supporting 386bsd.
+ * configure.in: recognize i386-*-bsd target.
+ * config/i386-bsd.mt: new file - 386bsd target configuration.
+
+Thu Oct 1 17:51:07 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: re-arrange host section to use *-*-* notation,
+ clean up some of the target section as well
+
+ * seclet.c: cast result of bfd_get_relocated_section_contents to
+ avoid compiler warnings
+
+Tue Sep 29 13:24:09 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * coffcode.h (coff_section_symbol): Create section if it doesn't
+ already exist.
+
+ * bout.c: Removed some unused variables.
+
+Tue Sep 29 08:30:21 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Portability fixes from p3:
+ coffcode.h (coff_write_relocs): removed sanity check until it
+ works on all targets (per advice from sac).
+ config/hp9000.mh: new file to define USG.
+ hppa.c: #undef hppa before the JUMP_TABLE.
+ hosts/hppahpux.h: #define NATIVE_HPPAHPUX_COMPILER if not
+ __STDC__.
+ targets.c (bfd_target_list): if NATIVE_HPPAHPUX_COMPILER, make
+ local variable target volatile to avoid mysterious bug in
+ HP9000/700 cc.
+
+Sat Sep 26 03:58:49 1992 John Gilmore (gnu@cygnus.com)
+
+ * config/hppabsd.mh, config.hppahpux.mh: Remove various bogosity.
+ * hosts/hppahpux.h: Remove bcopy and index circumventions.
+
+Fri Sep 25 22:36:52 1992 John Gilmore (gnu@cygnus.com)
+
+ * coff-z8k.c (func_da, func_jr): Lint.
+ * coffcode.h: Use memset rather than bzero.
+ * elf.c: Use memcpy rather than bcopy.
+ * tekhex.c: Use memset rather than bzero.
+
+Fri Sep 25 19:14:48 1992 John Gilmore (gnu@cygnus.com)
+
+ Add Adobe a.out support.
+
+ * aout-adobe.c: New file. So far, only reads a.out.adobe. FIXME.
+ * config/adobe.mt: Add.
+ * configure.in (*-adobe-* target): Add.
+ * targets.c (a_out_adobe_vec): Add.
+ * Makefile.in: add aout-adobe.c.
+
+ * configure.in: Put two dashes in all entries to be matched.
+ Add comments to remind people to do this.
+ Reorder all entries that match manufacturer names, to occur
+ last, so they will only be matched if no more specific match
+ occurs. Remove manufacturers `aout', `bout', `coff', and `elf'.
+
+Fri Sep 25 15:03:22 1992 Brendan Kehoe (brendan@rtl.cygnus.com)
+
+ * elf.c (section_from_elf_index): Return bfd_abs_section, not 0,
+ since we should never have a NULL section.
+ (elf_slurp_symbol_table): If st_shndx doesn't match any of our
+ tests, set the section to bfd_abs_section.
+
+Fri Sep 25 11:11:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-z8k.c: getting closer
+ * coffcode.h (coff_get_relocated_section_contents): allow
+ EXTRA_CASES hooks for different arches to provide different reloc
+ types.
+ * seclet.h: #ifndef around it to allow multiple inclusion
+ * srec.c: minor doc fix
+
+Mon Sep 21 14:33:58 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * hosts/hp9000.h, hosts/irix3.h: changes from WRS.
+
+Sun Sep 20 08:48:25 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in: Use i386-elf for all i386/i486 sysv4 hosts, not
+ just ncr.
+
+Thu Sep 17 06:40:46 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * bout.c (b_out_slurp_reloc_table): Clear howto field before
+ filling in reloc, in case immediately following code doesn't set
+ it.
+
+Fri Sep 11 15:37:06 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * coffcode.h (coff_renumber_symbols): set the last renumbered
+ symbol pointer to NULL, as expected by coff_write_linenumbers.
+ (coff_write_relocs): apparently a non-zero addend is OK for reloc
+ type R_IHCONST used on the 29k.
+
+Thu Sep 10 13:28:24 1992 John Gilmore (gnu@cygnus.com)
+
+ * opncls.c (bfd_fdopenr): Determine whether to fdopen for
+ update, based on how the underlying file was opened. Obsoletes
+ FASCIST_FDOPEN.
+ * hosts/rs6000.h, hosts/tahoe.h, hosts/vaxbsd.h: Remove
+ all FASCIST_FDOPEN config defines.
+
+Tue Sep 8 21:37:58 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * sparc-opc.c: Moved to opcodes library, now that we have one.
+ * Makefile: Don't compile it.
+
+Tue Sep 8 10:10:34 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * aoutx.h: adjust_sizes_and_vmas did not return anything.
+
+Thu Sep 3 19:29:04 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * section.c (bfd_set_section_flags): Remove a sanity check.
+ It is unfortunately broken, and prevents strip from working.
+
+Thu Sep 3 16:14:40 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * sparc-opc.c (condr): Remove extraneous, but harmless, backlash
+ created by last change.
+
+Thu Sep 3 13:52:38 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * reloc.c (reloc_howto_struct): Make size field be unsigned.
+ * bfd-in.h: Bump to version 2.0.
+
+Thu Sep 3 09:05:37 1992 Stu Grossman (grossman at cygnus.com)
+
+ * bout.c, cpu-z8k.c: Use enums when initializing structs to keep
+ braindamaged HP/Apollo compiler happy.
+
+Wed Sep 2 02:53:29 1992 John Gilmore (gnu@cygnus.com)
+
+ * format.c: Fix description of search for matching target.
+ * aoutx.h (some_aout_object_p): Set SEC_CODE and SEC_DATA.
+ * targets.c: Update description of search for matching target.
+ * Makefile.in (do_clean, clean): Fix infant mortality typo.
+ (docdir): Set to ./doc, not ${srcdir}/doc, which has no makefile.
+ (z8k and we32k files): `*.o: *.c': avoid Sun Make bug.
+
+Wed Sep 2 00:26:32 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * Makefile.in: Added mostlyclean/clean/distclean rules.
+
+Tue Sep 1 13:38:40 1992 Per Bothner (bothner@cygnus.com)
+
+ * targets.c (target_vector): Take out oasys (unless that is
+ the default): Because there is no magic number in archives,
+ there can be annoying target mis-matches.
+
+Mon Aug 31 10:11:37 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * sparc-opc.c: Rigorously updated to match architecture manual.
+
+Mon Aug 31 08:07:58 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * aoutx.h (aout<n>swap_ext_reloc_out), bout.c
+ (b_out_squirt_out_relocs): fix bug 1506 where abs symbols attached
+ to the built-in abs_section were not written out correctly.
+
+Fri Aug 28 16:29:15 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * archive.c (bfd_slurp_bsd_armap): if the symdef_count is too
+ large, assume we're using a swapped byte order and fail with
+ wrong_format rather than dumping core.
+
+Fri Aug 28 15:38:03 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * Renamed opc-sparc.c to sparc-opc.c for systems with short
+ filename constraints.
+ * Makefile.in: Updated to reflect change.
+
+Thu Aug 27 13:05:28 1992 Brendan Kehoe (brendan@cygnus.com)
+
+ Add preliminary support for the we32k:
+
+ * Makefile.in, archures.c, coffocode.h, configure.in, targets.c:
+ Minor edits.
+ * coff-we32k.c, cpu-we32k.c, config/we32k.mt, hosts/we32k.h: New files.
+
+Wed Aug 26 14:20:16 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * bout.c: added support for relaxable alignment relocs.
+
+ * seclet.c (rel, seclet_dump_seclet, seclet_dump): get the app to
+ pass down pointer to play area rather than use alloca
+
+ * cpu-z8k.c (compatible): made static to reduce name space
+ polution.
+
+Tue Aug 25 08:39:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ Add basic support for the z8k:
+
+ * Makefile.in, archures.c, coffcode.h, configure.in, reloc.c,
+ section.c, targets.c,
+
+ * syms.c: move mis-inserted patch.
+
+Fri Aug 14 15:39:29 PDT 1992 Howard Chu (hyc@hanauma.jpl.nasa.gov)
+
+ Documentation fixes:
+ * ctors.c, format.c, section.c, reloc.c: append " -" to item tags.
+ * reloc.c, section.c, syms.c, targets.c: add DOCDD before @node
+ comments.
+ * reloc.c: break out addend item from surrounding text.
+
+ * doc.str (DOCDD): Defined. Adds text to output.
+ (bodytext): Put bulletize before kill_bogus_lines.
+ * chew.c (bulletize): End itemization after a blank line, to
+ prevent following text from being swallowed up in an item.
+
+Mon Aug 24 20:50:22 1992 Stu Grossman (grossman at cygnus.com)
+
+ * configure.in: Add sparclite as a target.
+
+Mon Aug 24 12:06:31 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * ieee.c (ieee_get_symtab): always null terminate the symbol list,
+ lint.
+
+ * coffcode.h (coff_add_missing_symbols): if symbols don't come
+ from a coff file (csym is null), dont deref them
+
+ * ieee.c (parse_expression): get the answer right when adding an
+ abs+(sec+off), (ieee_generic_stat_arch_elt): call ieee_object_p
+ on elts so that filename is filled in.
+
+Thu Aug 20 19:05:48 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * bout.c (howto_align_table): New set of relocs, with enough
+ data for "objdump -r" to work.
+ (b_out_reloc_type_lookup): Recognize alignment relocs.
+
+Tue Aug 18 12:57:45 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: added FLAGS_TO_PASS, and used it for all recursive
+ invocations of make. Also, always create installation
+ directories.
+
+ * config/apollov68.mh: removed -g from CC definition.
+
+Mon Aug 17 13:40:08 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/decstation.mh (HDEFINES): Specify "-G 4" to avoid
+ overflowing gp-offset range.
+
+Mon Aug 17 11:44:28 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * srec.c (srec_set_section_contents): don't write out sections
+ without the LOAD and ALLOC attributes
+
+Mon Aug 17 11:55:07 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * archures.c, cpu-m68k.c, cpu-sparc.c: Undo 16 June changes.
+ * libaout.h (struct aout_backend_data): New callback "set_sizes".
+ * aout-target.h (callback): Don't set page/seg sizes.
+ (mkobject): Ditto.
+ (set_sizes): New routine.
+ (backend_data): Point to it.
+ * aoutf1.h (sunos4_set_sizes): Heed architecture when setting sizes.
+ (sunos4_aout_backend): Point to it.
+ * aoutx.h (set_arch_mach): Call set_sizes callback.
+
+Fri Aug 14 19:22:18 1992 Per Bothner (bothner@cygnus.com)
+
+ * aout-target.h: Make _bfd_slurp_extended_name_table be
+ the default. Given that we *write* the suckers (for long
+ archive member names), we really ought to be able to read them!
+ * trad-core.c: Don't include <machine/reg.h>. It doesn't
+ seem to be needed, and many machines don't have it.
+
+Thu Aug 13 09:53:39 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-m68k.c (vector): read and write archives in coff format.
+
+Tue Aug 11 12:19:42 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * opc-sparc.c: New file.
+
+Sat Aug 8 23:15:35 1992 Fred Fish (fnf@cygnus.com)
+
+ * bout.c (bfd_reloc_status_type, callj_callback): Cast void*
+ pointers to bfd_byte* before performing arithmetic on them. Such
+ use with bare void* pointers is a gcc extension.
+ * cache.c (bfd_cache_delete): Forward decl with prototype form.
+ * archive (normalize): Add to CONST to match actual usages with
+ CONST.
+
+Mon Aug 3 00:35:29 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in: Recognize i486 host cpu, and use i386-elf
+ for i486-ncr-sysv4.
+
+Sat Aug 1 13:49:59 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/stratus.mt (CC): Remove definition.
+ * elf.c (bfd_section_from_shdr): Test for the possibility that
+ section_from_elf_index returns NULL and don't dereference it.
+
+Mon Jul 20 02:46:09 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * add hppa_data to bfd tdata (indirectly via sef).
+
+ * config/hppahpux.mh: hpux is -DUSG (patch by sef)
+
+Sat Jul 18 15:50:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: error messages to stderr, not stdout
+
+Fri Jul 17 18:32:46 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * bfd.c, cache.c, coff-a29k.c, coff-i386.c, coff-i960.c,
+ coff-m68k.c, coff-m88k.c, demo64.c, libaout.h, libbfd.c,
+ oasys.c, opncls.c, sunos.c, targets.c: removed rcsid's.
+
+Fri Jul 17 17:06:56 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: recognize hppa* instead of hppa
+
+Thu Jul 16 16:39:25 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-m68k.c: added R_RELLONG_NEG reloc type, and changed
+ RTYPE2HOWTO to cope with same.
+ * reloc.c (bfd_perform_relocation): added support for size of -2
+ (subtract a word reloc type). Updated doc.
+
+Thu Jul 16 16:28:09 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: merged changes from progressive, removed rcsid.
+
+ * archures.c, archive.c, Makefile.dos: removed rcsid.
+
+Thu Jul 16 08:08:25 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * bfd-in.h : add BFD_IS_RELAXABLE flag
+ * bout.c (bout_swap_exec_header_[in_out]): new field in exec
+ header e_relaxable, major hackery in callbacks
+ * libaout.h : add space for a_relaxable.
+ * seclet.c (rel): don't relax empty sections
+
+
+Wed Jul 15 07:57:46 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * section.c (STD_SECTION): add some casts to the initializers for
+ dumb compilers
+
+Tue Jul 14 14:06:28 1992 Stu Grossman (grossman at cygnus.com)
+
+ * rs6000-core.c (rs6000coff_core_p): Greatly simplify expression,
+ and add appropriate casts to keep (picayune) aix-cc happy.
+
+Mon Jul 13 05:06:51 1992 John Gilmore (gnu at cygnus.com)
+
+ * elf.c (elf_slurp_symbol_table): Now 2nd arg is where to write
+ symbol pointers. Punt expensive & useless bfd_realloc. Use
+ malloc for raw symbols, and free it before returning.
+ (bfd_section_from_shdr): Do not slurp symbol table until politely
+ asked. Do not even slurp string tables.
+ (elf_get_symtab_upper_bound): Count 'em without reading them.
+ (elf_get_symtab): This is how to politely ask. Schlurp!
+ This should probably just *become* elf_slurp_symbol_table, FIXME.
+
+Wed Jul 8 16:24:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * archive.c (bsd_write_armap): write the timestamp of the
+ archive header to be just a little bit later than the timestamp of
+ the file, otherwise the linker will complain that the index is
+ out of date.
+
+Tue Jul 7 00:23:23 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in: Add m68k-ericsson-*.
+
+Sat Jul 4 03:29:41 1992 John Gilmore (gnu at cygnus.com)
+
+ * syms.h: Define BSF_FILE, update BSF_SECTION_SYM desc.
+ * elf.c: Remove unconditional debug printf's.
+ (elf_write_object_contents, elf_slurp_symbol_table): Handle
+ BSF_SECTION_SYM <=> STT_SECTION, BSF_FILE <=> STT_FILE.
+ (elf_slurp_symbol_table): Hand out symbols in forward, not
+ reverse order. Simplify duplicate code.
+
+Fri Jul 3 20:23:34 1992 Fred Fish (fnf@cygnus.com)
+
+ * elf.c: Remove "(void)" casts from function calls where the
+ return value is ignored, in accordance with GNU coding standards.
+
+Tue Jun 30 16:49:12 1992 Fred Fish (fnf@cygnus.com)
+
+ * hppa.c: Apply John's standard fix to avoid "empty translation
+ unit" warnings from some ANSI-C compilers.
+
+Thu Jun 25 04:39:25 1992 John Gilmore (gnu at cygnus.com)
+
+ * hosts/solaris2.h: Configure same as sysv4.
+
+Tue Jun 23 21:54:44 1992 Fred Fish (fnf@cygnus.com)
+
+ * libbfd.h, libbfd-in.h (bfd_seek): Make prototype match definition.
+ * reloc.c (bfd_default_reloc_type_lookup): Make cast on return
+ type match actual return type.
+ * elf_print_symbol (section_name): Make CONST.
+
+Mon Jun 22 17:35:24 1992 Per Bothner (bothner@cygnus.com)
+
+ * i386linux.c, hosts/i386linux.h, config/i386-linux.mt:
+ New files, for Linux (a free Unix clone for 386 machines).
+ * Makefile.in, configure.in, targets.c: Update accordingly.
+
+Fri Jun 19 20:23:21 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+ Lints for bfd_reloc_code_type->bfd_reloc_code_real_type, and
+ correct calling of howto special functions and fixes from Raeburn
+ for gas<>bfdness
+ * archures.c: nuke bfd_reloc_code_type
+ * bout.c, cpu-h8300.c, coff-i960.c, coff-m88k.c: special function lint
+ * coffcode.h (styp_to_sec_flags): STYP_INFO is marked as
+ SEC_NEVER_LOAD, various other bfdgas newness
+ * reloc.c->libbfd.h: change protype of bfd_default_reloc_type_lookup
+ * targets.c: change jump table vector to above
+
+
+Fri Jun 19 19:00:45 1992 John Gilmore (gnu at cygnus.com)
+
+ * elf.c (bfd_elf_find_section): Mark as INTERNAL_FUNCTION so
+ its prototype will be included in libbfd.h. Change result type
+ to struct * (rather than equivalent typedef) so it can be used in
+ the prototype, where they typedef won't be known.
+ * libbfd.h: Updated version.
+
+Fri Jun 19 15:21:56 1992 Stu Grossman (grossman at cygnus.com)
+
+ * Makefile.in, archures.c, configure.in, cpu-hppa.c, hppa.c, libhppa.h,
+ targets.c: HPPA merge.
+
+Fri Jun 19 12:21:38 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Separate Solaris2 from SYSV4 on SPARC.
+ * config/solaris2.mh: Kludge around Sun compiler bug.
+
+Wed Jun 17 14:02:46 1992 Stu Grossman (grossman at cygnus.com)
+
+ * libaout.h (aout_backend_data): Change defs of two bitfields to
+ be unsigned chars instead to get around rs6000 compiler problem.
+
+Wed Jun 17 13:55:31 1992 Fred Fish (fnf@cygnus.com)
+
+ * elf.c (bfd_section_from_shdr, elf_slurp_symbol_table):
+ Correct misconception that there can be only one symbol table.
+ Only call elf_slurp_symbol_table on the full symbol table, not
+ the dynamic one which is only a subset of the full one.
+
+Wed Jun 17 15:54:57 1992 Ken Raeburn (Raeburn@Cygnus.COM)
+
+ * coffcode.h (coff_compute_section_file_positions): For I960,
+ don't align sections in file.
+
+Tue Jun 16 06:28:21 1992 Ken Raeburn (Raeburn@Cygnus.COM)
+
+ * targets.c (struct bfd_target): Added field for target-specific
+ (but not file-specific) data, for distinguishing minor
+ characteristics between (e.g.) a.out formats.
+
+ * section.c (struct sec): New field user_set_vma indicates vma
+ field should be heeded, not assumed to be unset.
+ (STD_SECTION): Initialize that field of standard sections to zero.
+ * bfd-in.h (bfd_set_section_vma): Set user_set_vma to true.
+
+ * coffcode.h (coff_write_relocs): Write out swapped reloc, not
+ pre-swapped version.
+
+ * archures.c (struct bfd_arch_info): Fixed order of comment and
+ field decl. New fields indicate size of page and segment for
+ architecture.
+ * cpu-m68k.c (N): Fill in values.
+ * cpu-sparc.c (arch_info_struct): Ditto.
+
+ * libaout.h (struct aout_backend_data): Various bits of data (not
+ all used currently) with characteristics of a.out implementation.
+ Important field for now is text_includes_header, indicating that
+ the text section starts immediately after the file header, which
+ gets mapped in with it.
+ (struct aout_data): New fields indicate whether vma has been
+ adjusted yet (not yet used), and what magic number will be used in
+ the output file (should go away in favor of vma_adjusted).
+ (WRITE_HEADERS): Code for dealing with section sizes and related
+ header fields replaced with call to adjust_sizes_and_vmas.
+ * aoutx.h (some_aout_object_p): Fill in magic number field.
+ Set WP_TEXT flag for ZMAGIC as well as NMAGIC files.
+ (set_arch_mach): Set page size and segment size once CPU
+ type is known.
+ (adjust_sizes_and_vmas): New function; has much code moved
+ from set_section_contents and WRITE_HEADERS. Sets or adjusts vma
+ and size parameters, as well as many header fields, after deciding
+ on magic number for output file. Checks to ensure that this
+ adjustment has only been done once.
+ (set_section_contents): Call adjust_sizes_and_vmas instead of
+ doing much of the work here.
+
+ * aout-target.h (MY_make_debug_symbol, MY_backend_data): Provide
+ default (null) values of these fields.
+ * aoutf1.h (sunos4_write_object_contents): Don't override a_text
+ value in exec header.
+ (sunos4_aout_backend, MY_backend_data): Define backend data
+ indicating file header is included in text section.
+
+ * aoutf1.h (MY_reloc_howto_type_lookup): Fix typo.
+
+ * hosts/sparc.h (abort, exit): Hide these names if compiling with
+ gcc version 2, to avoid warnings.
+
+Mon Jun 15 12:26:56 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/ncr3000.mh (INSTALL, RANLIB): Don't use /usr/ucb/install,
+ it's broken on ncr 3000's. Use simple "true" for RANLIB.
+
+Sat Jun 13 09:16:43 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
+
+ * configure.in (m680[01234]0-wrs-*): Fix typo in match pattern.
+
+Fri Jun 12 19:48:34 1992 John Gilmore (gnu at cygnus.com)
+
+ * section.c (STD_SECTION): Remove extra semicolon in declarations.
+ * configure.in: Rewrite target parsing to use simple format.
+ Handle sparc-sun-solaris2 configuration.
+ * aout64.h: Avoid ANSI C brain death warning.
+ * elf.c: Avoid trigraph (???) or /* in comments.
+
+Fri Jun 12 14:51:14 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/sysv4.mh: new file, RANLIB=echo
+
+ * configure.in: handle Solaris2 as -sysv4 or -solaris2
+
+Thu Jun 11 00:52:03 1992 John Gilmore (gnu at cygnus.com)
+
+ * elf.c (elf_obj_tdata): Merge elf_obj_tdata_struct and
+ elf_core_tdata_struct into a single common struct. Core files
+ wouldn't have worked at all without this.
+ (bfd_elf_find_section): New function for GDB's undercover use
+ to find string sections that BFD hides from it.
+ (elf_get_str_section): Avoid multiple alloc&reads for same data;
+ lint.
+ (elf_object_p, elf_core_file_p): Allocate internal file header
+ storage dynamically.
+ * bfd.c (union {...} tdata): Remove elf_core_tdata_struct.
+ * demo64.c: Prevent "empty translation unit" warnings from idiots.
+
+Tue Jun 9 17:15:26 1992 Fred Fish (fnf at cygnus.com)
+
+ * config/{i386v4.mh, ncr3000.mh}: Update RANLIB, add INSTALL.
+
+Sat Jun 6 17:02:51 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Handle Solaris2 as *-sun-sysv4 or as *-sun-sunos5.
+
+Sun May 31 05:45:00 1992 david d `zoo' zuhn (zoo@cygnus.com)
+
+ * configure.in: handle m680[01234]0 as aliases for m68k
+
+Tue May 26 16:50:59 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-a29k.c: do byte relocs correctly
+ * coffcode.h (styp_to_sec_flags): never load INFO sections
+ * seclet.c (rel): don't relocate INFO sections
+
+Wed May 20 08:18:18 1992 Ken Raeburn (Raeburn@Cygnus.COM)
+
+ * section.c (bfd_*_symbol, bfd_*_section): Initialize statically.
+ Make the symbols unmodifiable.
+ (bfd_section_init): Deleted.
+ * init.c (bfd_init): Don't call bfd_section_init.
+
+ * section.c (bfd_set_section_contents): Ensure that range to be
+ written is within section boundaries.
+ (bfd_get_section_contents): Likewise. Don't bother dispatching if
+ size is zero.
+
+ * libbfd.c (bfd_xmalloc): Text of error message should be const.
+
+ * coff-i960.c (howto_table): Deleted.
+ (howto_rellong, howto_iprmed, howto_optcall): New vars;
+ interesting entries from old howto_table.
+ (RTYPE2HOWTO): Adjusted to use switch.
+ (coff_i960_reloc_type_lookup): New function.
+
+ * coffcode.h (coff_new_section_hook): Allocate storage for aux
+ records for section symbol.
+ (make_abs_section): Unused; deleted.
+ (renumber_symbols): Re-order symbols so undefined symbols come
+ last, as COFF format desires.
+ (coff_write_symbol): Put C_FILE symbols in debug section always.
+ (coff_section_symbol): New function; creates a symbol with the
+ same name as a section, and sets up aux records for it.
+ (coff_add_missing_symbols): New function; adds section symbols to
+ symbol table if they aren't there already. Should someday also
+ add a dummy C_FILE symbol if none is present.
+ (coff_write_object_contents): Add missing symbols before preparing
+ symbol table to be written.
+ (coff_slurp_reloc_table): Verify that symbol indices read in are
+ in a reasonable range.
+ * libcoff-in.h (struct coff_tdata): New field conv_table_size.
+ (obj_conv_table_size): Accessor macro.
+
+ * bout.c (b_out_reloc_type_lookup): New function. Handles three
+ reloc types on i960.
+
+ * bfd-in.h (bfd_get_section_name): New macro. Like
+ bfd_section_name, but returns rvalue, not lvalue.
+ (bfd_get_section_vma, bfd_get_section_alignment): Similar.
+ (bfd_get_section_flags): Now returns rvalue.
+
+ * reloc.c (enum bfd_reloc_code_real): Add several new values, some
+ general, some specific to sparc or i960.
+
+ * aoutx.h (set_section_contents): Set VMA for each section based
+ on previous section. If text section VMA doesn't appear to have
+ been set, make a best guess from the type of file.
+
+ * aout-target.h (MY_reloc_howto_type_lookup): Define as zero if
+ not defined.
+ (MY(vec)): Initialize reloc_type_lookup field.
+
+ * aoutx.h (howto_table_*): Export as aout_#_*_howto_table.
+ (bfd_error_trap, bfd_error_vector): Extern, not common.
+
+ * aoutf1.h (sunos4_reloc_type_lookup): New function. Handles a
+ few types of relocs for sparc; will need enhancement.
+
+ * bout.c (callj_callback): Use DEFUN macro in definition.
+ * coff-i960.c (optcall_callback): Likewise.
+
+ * targets.c (bfd_target): Added fields reloc_type_lookup and
+ _bfd_make_debug_symbol. Also minor comment changes.
+ * syms.c (bfd_make_debug_symbol): New dispatching macro.
+ * reloc.c (bfd_reloc_type_lookup): Take a BFD ptr as arg rather
+ than arch info, and dispatch with BFD_SEND. Callers changed.
+ * archures.c (struct bfd_arch_info): Deleted field
+ reloc_type_lookup.
+ * cpu-*.c: Don't initialize that field.
+
+ * bfd-in.h (enum bfd_error): Add new value "bad_value".
+ * bfd.c (bfd_errmsgs): Now const; added entry for bad_value.
+ (bfd_errmsg): Now returns ptr to const.
+ * bfd-in.h (bfd_errmsg): Fix prototype.
+
+ * cache.c (BFD_CACHE_MAX_OPEN): Fix typo in doc.
+ * reloc.c (bfd_generic_relax_section): Ditto.
+
+ * section.c (Section Output doc): Improve description of use of
+ output_section and output_offset.
+
+Tue May 19 23:42:10 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * sco-core.c: new file from net.
+ * aoutx.h (translate_to_native_sym_flags): bugfix from net:
+ Now we have the hairy linker, it's possible to move symbols from
+ one section into another. Actually make that work!
+
+Sat May 16 17:57:59 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * hosts/sun3.h: fix declaration of free.
+
+Tue May 12 14:08:59 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-a29k.c (perform_reloc): fix bug in jmp/call evaluation
+ * coff-h8300.c (reloc_processing): all relocs are relative to
+ section start.
+ * opncls.c: don't use fdopen on DOS systems
+
+ short patches from Glenn Kasten (glenn@ready.com)
+ * target.c: enabled oasys support
+ * oasys.c: Insert . when UNDERSCORE_HACK is enabled,
+ fix problem where a relocation which crossed a modification byte
+ boundary did not work. Fix problem where a relocation near the end
+ of a data record did not work.
+
+
+Tue May 5 18:11:25 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * archive.c (bfd_slurp_coff_armap): old versions of BFD wrote
+ archvie header string counts the endian way, this heuristic sees
+ how big an archive string to read by trying it one way and if the
+ string table is unreasonably big, trying it the other. *FIXME*.
+ * opncls.c (bfd_fdopenr): can't do fdopens on VMS
+
+Tue May 5 14:18:24 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * bfd-in.h: Increase version number to 1.97, for consistency
+ with ../binutils.
+ * Makefile.in: docdir is ./doc, not ${srcdir}/doc.
+
+Mon May 4 11:49:15 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * bfd-in.h: bump version to 1.96
+ Major change; changed calling convention for
+ bfd_get_relocated_section_contents so that caller allocates
+ memory for section data.
+ * coffcode.h (bfd_coff_get_relocated_section_contents), reloc.c,
+ seclet.c, targets.c, bfd.c: reflect new convention.
+ * coffcode.h (styp_to_sec_flags): if styp_flags is not a special
+ case, then use reasonable default values for SEC_* flags.
+
+Fri May 1 12:58:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coffcode.h (coff_write_object_contents): use RELSZ to work out
+ size of output reloc struct.
+ * targets.c, Makefile.in: comment out tekhex for the moment.
+ * ieee.c: if some places where null pointers were used instead of &bfd_abs_section.
+ * configure.in: tandem target is st2000
+ * coff-m68k.c: rename static howto_table to global
+ m68kcoff_howto_table.
+ * bout.c: remove unnecessary abort
+ * coff-a29k.c: various changes to the way relocations work to cope
+ with the "new order" and latent bugs.
+ * coffcode.h: lint
+
+Wed Apr 29 12:37:07 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * aoutx.h (aout_swap_ext_reloc_out, aout_swap_std_reloc_out)
+ bout.c (b_out_squirt_out_relocs): treat abs sumbols the right way.
+ * reloc.c (bfd_perform-relocation): don't relocate refs to
+ absolute symbols if doing a partial link.
+
+Fri Apr 24 07:35:26 1992 Stu Grossman (grossman at cygnus.com)
+
+ * configure.in: Add a29k-amd-udi.
+
+Thu Apr 23 18:37:55 1992 Fred Fish (fnf@cygnus.com)
+
+ * aoutx.h (aout_<bits>_swap_exec_header_in): Zero out the
+ internal_exec structure before initializing the fields that
+ are used, so that the unused fields are in a known state.
+
+Wed Apr 22 09:36:08 1992 Fred Fish (fnf@cygnus.com)
+
+ * tekhex.c (struct data_struct): Convert from typedef that
+ typedefs nothing to a normal structure declaration.
+ * tekhex.c (pass_over): Prototype args for function that
+ second arg points to.
+
+Mon Apr 20 22:22:51 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: remove old style staging. Do not print recursion
+ lines.
+
+ * Makefile.in: rework CFLAGS so that CFLAGS can be passed from the
+ Makefile command line. Remove MINUS_G. Default CFLAGS to -g.
+ Pass CFLAGS.
+
+Fri Apr 17 09:15:31 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * bfd.c, Makefile.in: added tekhex
+ * aoutx.h (set_section_contents): pages should be padded to the
+ size of a page, not the size of a segment.
+ * configure.in: added go32 host and i386-aout target.
+ * i386aout.c, libaout.h: now works for go32 target
+ * ieee.c: fix bit rot.
+ * seclet.c: support for padding seclet type.
+
+Wed Apr 15 18:11:58 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: added .NOEXPORT:
+
+Tue Apr 14 14:34:42 1992 Fred Fish (fnf@cygnus.com)
+
+ * elf.c (bfd_add_strtab, bfd_add_2_to_strtab): CONST spreads
+ like ooze.
+ * elf.c (elf_compute_section_file_positions,
+ elf_write_object_contents): Return boolean, not NULL (which
+ can be void *).
+ * elf.c (bfd_section_from_shdr): Ifdef-out debugging code.
+ Also ifdef-out code that aborts on unhandled section types.
+
+Fri Apr 10 22:29:18 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in: Recognize ncr3000 config
+ * Makefile.in (MINUS_G): Pass on to recursive makes.
+ * hosts/ncr3000.h, config/ncr3000.mh: Add host config files.
+
+Thu Apr 2 17:42:45 1992 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in: Now that we have sym.h and symconst.h, compile
+ coff-msym.c on all systems.
+ * config/{decstation.mh, irix3.mh, irix4.mh}: Remove coff-msym.o dep.
+ * coff-msym.c: Update include files and comments; add weakext bit.
+
+Wed Apr 1 23:16:38 1992 John Gilmore (gnu at cygnus.com)
+
+ * archive.c, bfd.c, bout.c, coffcode.h, init.c, reloc.c,
+ section.c, srec.c, syms.c, coff-h8300.c: Lint.
+
+Sun Mar 29 09:37:59 1992 John Gilmore (gnu at cygnus.com)
+
+ * bout.c, coff-a29k.c, coff-i960.c: Lint.
+ * configure.in: Add new host and target configs.
+ * elf.c (bfd_prstatus, bfd_fpregset): Avoid typename of register
+ structs, which vary; just use member name.
+ (elf_object_p, elf_core_file_p): Lint, fix comments.
+ * config/sparc-elf.mt, hosts/sysv4.h: New config files.
+
+Sat Mar 28 13:07:02 1992 Fred Fish (fnf@cygnus.com)
+
+ * elf.c (elf_object_p, elf_core_file_p): Fix to use only a single
+ local, disposable, copy of the external form of section header
+ table and program header table entries.
+
+Thu Mar 26 16:59:58 1992 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in: Set MINIMIZE back to 0 for a real release.
+
+Tue Mar 24 15:57:03 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure.in: config/irix4.m[ht], hosts/irix4.h: add support for
+ irix4.
+
+Mon Mar 23 22:37:34 1992 Stu Grossman (grossman at cygnus.com)
+
+ * coff-msym.c (ecoff_swap_rfd_in): remove & for array ref.
+
+Tue Mar 17 14:12:25 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * bout.c (b_out_slurp_reloc_table): Use BFD_ASSERT macro,
+ not internal bfd_assert function (twice).
+
+Tue Mar 17 10:45:12 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * aout-target.h: change ar_max_namelen to 15 (the right value)
+ * coff-a29k, coffcode.h: more hangovers from the bfd_abs_section
+ change
+
+Mon Mar 16 14:57:22 1992 Steve Chamberlain (sac@rtl.cygnus.com)
+
+ * archive.c (bfd_generic_archive_p): check for bout archives too.
+ * bout.c: make it work again.
+
+Sat Mar 14 17:30:40 1992 Fred Fish (fnf@cygnus.com)
+
+ * elf.c (elf_corefile_note): Call bfd_xmalloc() instead of bare
+ malloc().
+ * reloc.c (bfd_generic_get_relocated_section_contents): Call
+ bfd_xmalloc() instead of bare malloc().
+
+Fri Mar 13 15:44:37 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: pass down MAKEINFO on info.
+
+Fri Mar 13 07:41:13 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/mt-<foo> now <foo>.mt, config/mh-<foo> now <foo>.mh.
+ host/h-<foo> now just <foo>.
+ * configure.in: reflect changes
+
+Thu Mar 12 11:15:02 1992 Per Bothner (bothner@cygnus.com)
+
+ * libbfd-in.h (set_tdata): Make change of Feb 27 in the
+ actual source file, not just the generated libbfd.h.
+
+Sat Mar 7 10:33:41 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * coff-i960.c (icoff_little_vec): add COFF_SWAP_TABLE so we can run
+ gdb on little-endian 960 code.
+ * archive.c (compute_and_write_armap): indirect symbols should go
+ into the archive header too.
+
+Fri Mar 6 21:55:16 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: added check target.
+
+Thu Mar 5 23:51:42 1992 John Gilmore (gnu at cygnus.com)
+
+ * coff-msym.c: Move this file from gdb/ecoff.c. It
+ handles byte-swapping for ECOFF (MIPS symbol) files.
+ * config/mh-decstation, config/mh-irix3: Add coff-msym.o
+ to the files built on MIPS-based hosts.
+ * Makefile.in: Add rule for coff-msym.
+
+Thu Mar 5 21:36:05 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: added clean-info target. MINIMIZE=1.
+
+Sun Mar 1 22:32:58 1992 Per Bothner (bothner@cygnus.com)
+
+ * coff-rs6000.c: Move core file functions into separate
+ new file rs6000-core.c. This is needed because reading
+ core files depends on native include files that conflict
+ with ../include/coff/rs6000.h.
+ * config/mh-rs6000: Add rs6000-core.o to HDEPFILES.
+
+Thu Feb 27 22:19:55 1992 Per Bothner (bothner@cygnus.com)
+
+ * aoutx.h (NAME(aout,print_symbol)): Don't print
+ symbol addresss for undefined symbols.
+ * coff-rs6000.c: Various updates (due to target-
+ independent changes).
+ * libbfd.h: Ditto (tdata field is now a union).
+ * hosts/h-sparc.h: Removed prototype for bogus function
+ 'emset' (presumably should have been 'memset' - which is there).
+
+Thu Feb 27 11:46:33 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in (mips-big-* target): Same is Iris.
+
+Thu Feb 27 09:24:56 1992 Steve Chamberlain (sac at thepub.cygnus.com)
+
+ * aoutx.h (translate_from_native_sym_flags): when creating an
+ alias symbol, fill in the section as undefined, rather than
+ leaving it blank. If an output section can't be found for a
+ symbol, then don't core dump.
+
+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.
+
+Wed Feb 26 19:40:59 1992 Steve Chamberlain (sac at thepub.cygnus.com)
+
+ * bfd.c: lint
+ * coff-h8300.c: fix stupid reloc subtraction bug
+ * coffcode.h (coff_swap_aux_out): only swap a tvndx by 2 bytes,
+ since that's how wide it is. (coff_slurp_symbol_table): always zero out
+ the symbol.flags and done_lineno fields.
+
+Tue Feb 25 14:29:24 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * coffcode.h (coff_write_symbol): write out the correct number of
+ auxents.
+ * cpu-h8300.c: fix disassembly bug
+
+Fri Feb 21 21:39:56 1992 John Gilmore (gnu at cygnus.com)
+
+ * bfd-in.h (bfd_errmsg), coffcode.h (coff_swap_aux_in,
+ section_from_bfd_index), cpu-h8300.c (howto*_callback),
+ reloc.c, section.c (bfd_map_over_sections), targets.c
+ (bfd_target_list): Protolint.
+ * libbfd.h: Update to match a libbfd-in.h from a month ago.
+
+Fri Feb 21 10:57:54 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * coffcode.h (coff_swap_aux_in): lint, (coff_print_symbol): prints
+ out tagndx too.
+ * aoutx.h (swap_std_reloc_out, swap_ext_reloc_out): use the output
+ section of a symbol rather than the section of a reffed symbol to
+ determine the r_index of an emmitted reloc.
+
+Thu Feb 20 18:10:34 1992 Per Bothner (bothner at cygnus.com)
+
+ * PORTING: New (preliminary) porting guide.
+
+Wed Feb 19 21:39:37 1992 John Gilmore (gnu at cygnus.com)
+
+ * bout.c (callj_callback), coff-a29k.c (a29k_reloc), coff-m88k.c
+ (howto_hvrt16): lint.
+
+Mon Feb 17 12:02:17 1992 Per Bothner (bothner at cygnus.com)
+
+ * hp300bsd.c (new), config/mt-hp300bsd: Make hp300bsd
+ a full configuration (with possible cross-development),
+ instead of using host-aout.c.
+
+Sun Feb 16 13:01:49 1992 Per Bothner (bothner at cygnus.com)
+
+ * aout-target.h (MY(write_object_contents):
+ Set obj_reloc_entry_size (abfd).
+ * gen-aout.c: Change to emit a .c files, not a .h file.
+
+Thu Feb 13 20:11:47 1992 Fred Fish (fnf at cygnus.com)
+
+ * elf.c (elf_slurp_symbol_table): Remove obsolete use of
+ BSF_ABSOLUTE and replace with bfd_abs_section reference.
+
+Thu Feb 13 17:22:44 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * coffcode.h (get_normalized_symtab): fixed bug where symbols
+ with more than one auxent can cause nasty core dumps.
+
+ * coffcode.h, libcoff.c: added new fielded to coff_symbol_struct
+ "done_lineno" so that a symbol which appears twice in the symbol
+ table only gets it's linenumbers relocated once. Modifed
+ (coff_write_native_symbol) and (coff_make_empty_symbol) to make
+ use of it.
+
+Tue Feb 4 15:39:55 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * aoutx.h: (translate_from_native_sym_flags): fix constructor
+ stuff to use the New Order.
+
+Fri Jan 31 01:34:45 1992 Stu Grossman (grossman at cygnus.com)
+
+ * ieee.c: Change type of envi[] to unsigned char.
+
+ * configure.in: fix vax ultrix configuration.
+
+ * elf.c (bfd_section_from_shdr): Deal with null return from
+ bfd_make_section(). (elf_object_p): Select endianess properly.
+
+Fri Jan 31 01:19:55 1992 John Gilmore (gnu at cygnus.com)
+
+ * hosts/h-tahoe.h, h-vaxbsd.h: Fix stack in core files.
+
+Thu Jan 30 23:51:07 1992 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in: host-aout.c doesn't depend on aout-params.h.
+ * aout-target.h: Use TARGET_BIG_ENDIAN_P to set up vector.
+ * host-aout.c: Don't use aout-params.h; configure these systems
+ in their xm files, not in a randomly generated file.
+ * hosts/h-hp300bsd.h, h-tahoe.h, h-vaxbsd.h, h-vaxult.h:
+ Specify byte order.
+ * hosts/h-vaxbsd.h: Define the form of exec and core files.
+
+Thu Jan 30 13:02:41 1992 Per Bothner (bothner at cygnus.com)
+
+ * config/mt-tahoe, config/mt-vax: Change DEFAULT_VECTOR to
+ host_aout_vec here as well.
+
+Thu Jan 30 11:41:45 1992 Stu Grossman (grossman at cygnus.com)
+
+ * host-aout.c: Change TARGETNAME to "a.out" to be compatible with
+ gdb. config/mt-hp300bsd: Change DEFAULT_VECTOR to host_aout_vec
+ to prevent undefined symbol.
+
+Thu Jan 30 07:26:53 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ Various lints found on PersSony
+ * aoutx.h: cast an enum
+ * coff-a29k.c: many ints in reloc structure turned to enum
+ * coffcode.h: more enums
+ * cpu-h8300.c: more enums
+ * opncls.c: more enums
+
+Thu Jan 30 01:19:56 1992 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Make Tahoe configuration work again.
+ * bfd-in.h: Remove trailing comma from enum declaration.
+ * ieee.c: Can't put byte values >0x7F into a signed char.
+
+Tue Jan 28 21:10:51 1992 Fred Fish (fnf at cygnus.com)
+
+ * Makefile.in: Add dependencies for various coff-*.o files.
+
+ * elf.c: Remove extraneous paren from core_prpsinfo and
+ core_prpstatus macros, rename core_prpstatus to core_prstatus.
+ Replace references to old section "size" member with new
+ "_raw_size" member. Implement elf_make_empty_symbol, which
+ is now used.
+
+Tue Jan 28 14:51:40 1992 Stu Grossman (grossman at cygnus.com)
+
+ * trad-core.c, bfd.c, ../include/bfd.h: Various fixes for PMAX
+ core reading.
+
+Tue Jan 28 10:46:32 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * coffcode.h (bfd_coff_relax_section): now static.
+ (bfd_coff_get_relocated_section_contents): various type lints.
+
+Mon Jan 27 19:44:08 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ New entry point in the transfer vector - bfd_relax_section.
+
+ * aout-target.h: add to vector, call generic_relax
+ * bfd-in.h: add to vector
+ * bfd.c: add #define for vector
+ * bout.c: add to vector, call generic_relax
+ * coffcode.h: add to vector, also now has coff specific relax code
+ for the relaxable H8/300 relocs. Also clean up abs section cruft.
+ * elf.c: call generic_relax
+ * ieee.c: call new vector, clean up some bugs due to the creation
+ of bfd_abs_section
+ * libbfd.h: add bfd_generic_relax_section EXFUN
+ * oasys.c: call generic_relax
+ * reloc.c: implement generic_relax
+ * seclet.c: moved much of this into coffcode.h
+ * srec.c: call generic_relax
+ * targets.c: define new transfer vector
+
+Fri Jan 24 14:40:17 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * everything: now modified to use smaller reloc type. Self hosts
+ on sun3 & sun4.
+
+Sat Jan 18 17:00:16 1992 Fred Fish (fnf at cygnus.com)
+
+ * config/mh-stratus, config/mt-i860-elf, hosts/h-stratus:
+ New files for stratus.
+
+ * configure.in: Add configuration fragments for stratus.
+
+Wed Jan 15 10:02:43 1992 Fred Fish (fnf at cygnus.com)
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Declare various filename
+ variables as CONST since they are set to point to a const char
+ string. Fixes compiler complaints.
+
+Fri Jan 10 17:44:53 1992 Fred Fish (fnf at cygnus.com)
+
+ * hosts/h-amix.h hosts/h-i386v4.h: Change abort() to a function
+ returning void.
+
+Fri Jan 10 14:33:32 1992 Per Bothner (bothner at cygnus.com)
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Recognize N_SOL
+ symbols, so that we can emit the correct file name even
+ if it's an include file.
+
+Thu Jan 2 16:43:34 1992 John Gilmore (gnu at cygnus.com)
+
+ * coff-i960.c: Add COFF_SWAP_TABLE to little_vec as well as big_vec.
+ (Reported by john@labtam.labtam.oz.au (John Carey)).
+
+Wed Jan 1 04:23:06 1992 Fred Fish (fnf at cygnus.com)
+
+ * elf.c: Change all '#if HAVE_PROCFS' to '#ifdef HAVE_PROCFS'.
+
+ * config/mh-amix, config/mh-i386v4: Remove HDEFINES that was
+ being used to -DHAVE_PROCFS.
+
+ * hosts/h-amix, hosts/h-i386v4: Add '#define HAVE_PROCFS'. Move
+ '#include "fopen-same.h"' to end of file to match other h-* files.
+
+Fri Dec 20 12:06:17 1991 Fred Fish (fnf at cygnus.com)
+
+ * configure.in: Change svr4 references to sysv4. Add case
+ "unknown" for target vendor and infer some targets based
+ on the specified operating system.
+
+Wed Dec 18 17:17:59 1991 Stu Grossman (grossman at cygnus.com)
+
+ * bfd-in.h, libaout.h: ANSIfy enums.
+
+Wed Dec 18 16:12:25 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * archive.c (normalize): created version for VMS which removes the
+ VMS directory crap from the front and end of a filename, eg turn
+ [-.foo]bar.obj;123 into bar.obj
+ (bfd_construct_extended_name_table): now writes index into an
+ extended name table in decimal - the same base used to read an
+ extended name table.
+
+Wed Dec 18 14:40:39 1991 Per Bothner (bothner at cygnus.com)
+
+ * aout-encap.c: Fix to use aout-target.h.
+ * aoutf1.h: Use standard MY_object_p and MY_callback
+ in aout-target.h. Remove target-specific versions.
+ * host-aout.c: Re-write to use aout-target.h.
+ * gen-aout.c: New files use with host-aout.c to generate
+ host-specific a.out-related parameters.
+ * Makefile.in: host-aout.o depends on aout-params.h, which is
+ generated by gen-aout.
+ * aout-target.h: Make a little more flexible.
+ * libaout.h, aout-target.h: Removed WORK_OUT_FILE_POSTIONS
+ macro. Instead, inline it in aout-target.h.
+ * newsos3.c: Define N_SHARED_LIB(x) as 0 to avoid
+ a gcc -Wall warning.
+ * archive.c: Add missing commas in DEFUN macro (2 places).
+ * elf.c, coffcode.h, aoutf1.h: Use ANSI functions instead of
+ Berkeley ones, now that libiberty has them:
+ bcopy->memcpy, bzero->memset, bcmp->memcmp.
+ * aoutx.h: Various touch-ups: Re-formatting, fix a cast,
+ remove unused variable.
+
+Tue Dec 17 19:48:59 1991 Fred Fish (fnf at cygnus.com)
+
+ * elf.c (elf_core_file_matches_executable_p): Enclose corename
+ and execname inside HAVE_PROCFS ifdef since they are unused
+ when it is not defined.
+
+Mon Dec 16 12:00:10 1991 Fred Fish (fnf at cygnus.com)
+
+ * elf.c: Flag all sections as either code or data. We can't
+ be sure what they are anyway, since ELF doesn't fit the
+ traditional model of text+data+bss very well. Add new local
+ function elf_read() to simplify code. Record entry point in
+ the bfd structure.
+
+Thu Dec 12 21:01:22 1991 John Gilmore (gnu at cygnus.com)
+
+ * hosts/h-*.h: Configure fopen using ../include/fopen-*.h
+ rather than N copies of the same lines.
+
+Wed Dec 11 16:39:45 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * cpu-h8300.c: disassemble branch displacements correctly
+ * coff-h8300.c: put reloc offsets out in 32bits
+
+ * makefile.dos, configdj.bat: New files from DJ
+ * cache.c: fopen with new macros is needed for DOS.
+ * ieee.c: environ renamed to envi to stop an include file
+ conflict.
+ * opncls.c, coff-rs6000.c: more fopens with macros.
+
+Tue Dec 10 04:07:24 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * Makefile.in: infodir belongs in datadir.
+
+Sat Dec 7 16:39:23 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * Makefile.in: fix where docdir lives
+
+ * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coff-m88k.c,
+ coffcode.h, core.c, ctor.c, elf.c, format.c, ieee.c, init.c,
+ libbfd.c, libbfd.h, libcoff.h, opncls.c, reloc.c, section.c,
+ srec.c, syms.c, targets.c : all new documentation and lint
+ removal.
+
+
+Sat Dec 7 07:22:09 1991 John Gilmore (gnu at cygnus.com)
+
+ * coffcode.h, srec.c: Lint.
+
+Fri Dec 6 22:58:48 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+
+ * Makefile.in: install using INSTALL_DATA, added standards.text
+ support.
+
+ * configure.in: mark directory as target dependent. configure
+ nows works in objdir always so make file existence checks
+ against ${srcdir}.
+
+Thu Dec 5 22:46:19 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 10:14:17 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * aoutf1.h (sunos_<size>_object_p, sunos4_callback): moved the
+ computation of arch and machine type so it's worked out before
+ some_aout_object_p is called.
+ * aoutx.h: (some_aout_object_p): don't set arch and mach to
+ unknown.
+ * archures.c: add extra field 'section_align_power' to hold
+ default section alignment in object files.
+ * cpu-a29k.c, cpu-h8300.c, cpu-i386.c, cpu-i960.c, cpu-m68k.c,
+ cpu-m88k.c, cpu-mips.c, cpu-rs6000.c, cpu-sparc.c, cpu-vax.c:
+ initialize the new field.
+ * bout.c (b_out_callback): replace the text size, since aout
+ fries them.
+ * aoutx.h: Documentation in the new style
+
+Wed Dec 4 02:00:30 1991 John Gilmore (gnu at cygnus.com)
+
+ * bfd.c (bfd_get_mtime): Don't cache mtime any more; only
+ use the saved value if mtime_set is already set (intended
+ for archive files, though apparently not used yet).
+
+Tue Dec 3 22:54:50 1991 John Gilmore (gnu at cygnus.com)
+
+ * targets.c: Revise comments about how to configure the target
+ vector, to match reality. Remove mention of obsolete methods.
+ Remove long lists of capitalized macros that turn into the same
+ thing in lowercase. Normal vector simply lists all known
+ lowercase xvec names; all other cases are handled by SELECT_VECS.
+
+ * config/mt-i386-coff: Set DEFAULT_VECTOR to real identifier,
+ not macro name.
+
+ * config/mt-i960-{coff,bout}: Use SELECT_VECS to make a short
+ list of supported targets.
+
+Tue Dec 3 14:06:15 1991 Per Bothner (bothner at cygnus.com)
+
+ * archive.c (bsd_write_armap): The pad byte sometimes added to
+ the string table in a __.SYMDEF member is now
+ counted as part of the size of the string table.
+ This is compatible with the old ranlib, as well as Sun's.
+
+Tue Dec 3 10:53:30 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * srec.c: Rewrote to fix many bugs; now gets the record type
+ right, doesn't choke on input, sets the start address in an S9 and
+ fills in the filename on an S0.
+
+Sat Nov 30 21:19:15 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * cpu-h8300.c: Add support for MEMIND addressing mode
+
+ * coff-a29k.c: defined RELOC_PROCESSING to take the #ifdef out of
+ coffcode.h
+ * coffcode.h: use the new macro if available
+
+ * elf.c (elf_corefile_note): cast malloc to avoid warning.
+ * Makefile.in: Fixed dependencies due to file rename
+
+ * aout-encap.c, aoutf1.h, aoutx.h, archive.c, bout.c, coff-a29k.c,
+ coff-h8300.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c,
+ coff-mips.c, coff-rs6000.c, cpu-h300.c, elf.c, i386aout.c,
+ newos3.c, stab-syms.c, syms.c: All these files have had their
+ #includes altered to point to the new places.
+
+Fri Nov 29 20:04:49 1991 Fred Fish (fnf at cygnus.com)
+
+ * config/mh-i386v4, config/mh-i386-elf, hosts/h-i386v4.h: New files.
+
+ * configure.in: Add vendor "ncr" as supported per-target vendor.
+ Add svr4 case for i386 per-host case.
+
+ * elf.c (elf_object_p, elf_core_file_p): Add missing "break" to
+ ELFDATA2LSB cases.
+
+Fri Nov 29 12:16:51 1991 Per Bothner (bothner at cygnus.com)
+
+ * syms.c (bfd_decode_symclass): Return 'A'
+ for symbols that are both absolute and global.
+ * archive.c (bfd_special_undocumented_glue): Return NULL
+ if bfd_ar_hdr_from_filesystem returns NULL.
+
+Tue Nov 26 09:10:55 1991 Steve Chamberlain (sac at cygnus.com)
+
+ * Makefile.in: added coff-h8300
+ * configure.in: now h8 is a coff target
+ * cpu-h8300.c: fix various disassembly problems
+ * libcoff.h: took out some code which has been #0ed for a long
+ time.
+ * targets.c: added h8 coff
+ * coff-a29k.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c
+ added new macro RTYPE2HOWTO to take a load of #ifdefs out of
+ coffcode.h
+ * coffcode.h: Started to change the way machine dependencies are
+ handled, from the nest of #ifdefs to macros defined in the
+ including coff-<foo>.c
+
+Fri Nov 22 08:11:42 1991 John Gilmore (gnu at cygnus.com)
+
+ * aoutx.h (some_aout_object_p): Set the `executable' bit
+ if the entry point is contained in the text segment, even if the
+ text segment is at location 0.
+
+ * coff-mips.c, coffcode.h: Peter Schauer's patch to kludge in
+ nonstandard MIPS sections (.rdata, .sdata, etc).
+
+ * aoutx.h, bfd.c, coffcode.h, ieee.c, oasys.c, targets.c: CONST lint.
+ * libbfd-in.h, libbfd.h, aoutx.h, coffcode.h, elf.c, libaout.h:
+ Rename ALIGN to BFD_ALIGN to avoid conflict with BSD <sys/param.h>.
+ * libbfd.c: Lint.
+ * host-aout.c, trad-core.c: Fix write_armap prototypes. Lint.
+
+Thu Nov 21 19:56:40 1991 Per Bothner (bothner at cygnus.com)
+
+ * stab-syms.c, syms.c: Moved bfd_stab_name() and bfd_stab_names[]
+ from syms.c to new file stab-syms.c. Also, since GNU extended
+ type codes such as N_SETT are no longer in ../include/stab.def,
+ include them manually.
+ * stab-syms.c, aoutx.h: Renamed bfd_stab_name() and
+ bfd_stab_names[] to aout_stab_name() and aout_stab_names[].
+ * libaout.h: Added prototype for aout_stab_name().
+ * Makefile.in: Update Makefile for new stab-syms.[co].
+
+Thu Nov 21 11:50:49 1991 John Gilmore (gnu at cygnus.com)
+
+ * libaout.h (WORK_OUT_FILE_POSITIONS): One more try at this
+ rather complicated seeming problem. Eliminate LOGICAL_ versions,
+ just make N_XXX work by excluding the header from the text segment.
+ * aoutx.h: Fix comments to match.
+
+Tue Nov 19 18:49:01 1991 Per Bothner (bothner at cygnus.com)
+
+ * libaout.h (WORK_OUT_FILE_POSITIONS): Use new LOGICAL_TXTADDR,
+ LOGICAL_TXTOFF, LOGICAL_TXTSIZE macros to figure out numbers
+ for the "logical" text segment (i.e. never consider the exec
+ header to be part of the text segment). This change is
+ needed for consistency with various other parts of bfd and ld.
+ * aoutx.h (NAME(aout,soe_aout_object_p)): Fix comment,
+ and move calculation of obj_textsec(abfd)->size to libaout.h.
+ * bfd-in.h: Removed bogus ';'.
+
+ * Makefile.in: Add MINIMIZE flag to select lean
+ or bloated target_vector.
+ * targets.c: Use new MINIMIZE macro, and add trad_core if needed.
+ * newsos3.c: Fixes to ../include/aout64.h remove need
+ for special N_TXTOFF macro, but require N_HEADER_IN_TEXT.
+
+Mon Nov 18 12:00:59 1991 Per Bothner (bothner at cygnus.com)
+
+ * aout-target.h, aoutf1.h, newsos3.c: Make aout-target.h
+ handle both little and big-endian targets, with little
+ the default unless TARGET_IS_BIG_ENDIAN_P is defined.
+ * host-aout.c: Add FIXME note.
+
+Sun Nov 17 13:29:39 1991 Per Bothner (bothner at cygnus.com)
+
+ * targets.c: Make the default target_vector contain
+ just &DEFAULT_VECTOR. This makes executables a lot smaller.
+ Old behavior can be gotten by defining ALL_TARGETS.
+ * aoutf1.h, demo64.c, i386aout.c, newsos3.c, sunos.c:
+ Factored out common code into new file aout-target.h.
+ Saves a lot of duplicate code for a.out variants.
+
+Fri Nov 15 13:00:43 1991 Per Bothner (bothner at cygnus.com)
+
+ Get 'make headers' to work when configured with +subdirs.
+ * Makefile.in: Add $(subdir) to docdir path.
+ * doc/Makefile.in (protos): Add $(srcdir) prefix
+ to name of sed scripts.
+
+Thu Nov 14 19:49:10 1991 Per Bothner (bothner at cygnus.com)
+
+ * aoutx.h (NAME(aout,print_symbol)): Fix thinko.
+ * syms.c (bfd_stab_names): Turn on new GNU_EXTRA_STABS macro
+ to include names of N_SETT etc.
+
+Thu Nov 14 19:11:13 1991 Fred Fish (fnf at cygnus.com)
+
+ * elf.c: Add minimal support for ELF symbol tables. Generates
+ canonical bfd symbol tables from ELF symbol tables. Change the
+ name of some functions from bfd_<name> to elf_<name>.
+
+ * syms.c: Trivial fix to comment to remove a redundant "to".
+
+Wed Nov 13 17:02:01 1991 John Gilmore (gnu at cygnus.com)
+
+ * coff-{i386,m68k,m88k}.c: Change name of file format to standard
+ form that GDB recognizes as COFF.
+
+Wed Nov 13 09:09:41 1991 Steve Chamberlain (sac at cygnus.com)
+
+ * ieee.c (ieee_object_p): cast NULL correctly.
+ * configure.in: added harris host
+
+ * coff-a29k.c: Lots of changes, most from David Wood.
+
+Tue Nov 12 07:21:41 1991 John Gilmore (gnu at cygnus.com)
+
+ * coff-m88k.c (coff_write_armap): Just #undef it.
+
+Mon Nov 11 20:30:18 1991 Steve Chamberlain (sac at cygnus.com)
+
+ * Makefile.in: standardize on MINUS_G to disable debugging
+ * coff-m88k.c: create coff armaps instead of bsd ones.
+ * opncls.c (bfd_close_all_done), (bfd_close): Mask out random bits
+ when calling chmod.
+
+Mon Nov 11 19:07:32 1991 Fred Fish (fnf at cygnus.com)
+
+ * elf.c: Additions to support ELF format core files.
+ * config/mh-amix: Add -DHAVE_PROCFS to HDEFINES, since host
+ has support for /proc (all the include files in particular).
+
+Mon Nov 11 18:36:47 1991 Per Bothner (bothner at cygnus.com)
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Handle the case
+ of two N_SO stabs, one for directory, and one for filename.
+
+ * bfd-in.h (print_vma): Factor out duplicate definition.
+
+ Exit a little more gracefully when malloc returns NULL.
+ * libbfd.c: New function bfd_xmalloc (malloc wrapper).
+ * opncls.c, syms.c, bout.c, aoutx.h: Replace malloc by bfd_xmalloc.
+ * libbfd.h: Rre-generated due to libbfd.c update.
+
+Sat Nov 9 13:45:01 1991 Fred Fish (fnf at cygnus.com)
+
+ * config/mt-m68k-elf: Define DEFAULT_VECTOR as elf_big_vec.
+
+ * elf.c (elf_object_p): Don't try to create a bfd section for
+ the first ELF section header. It is just a placeholder.
+
+Sat Nov 9 03:04:26 1991 John Gilmore (gnu at cygnus.com)
+
+ * coff-rs6000.c, config/mh-rs6000: Make it work on archive and
+ core files, when compiling native.
+ * hosts/h-rs6000.h: Define FASCIST_FDOPEN for bfd_fdopenr.
+
+ FIXME: The aoutf1.h change below needs to be reversed back
+ to the way it was.
+
+Thu Nov 7 11:03:55 1991 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * coffcode.h: Defined new macros [PUT|GET]LINENO_LNNO for
+ manipulation of lnno fields in lineno structs in a coff-<f>.h
+ independent way. Override it in coff-<f>.h to your favourite
+ number if you don't have a 16bit lnno field. (coff_swap_lineno_in)
+ (coff_swap_lineno_out): modified to use the new macros.
+
+Mon Nov 4 11:38:33 1991 Steve Chamberlain (sac at cygnus.com)
+
+ * aoutf1.h (sunos4_callback): Now defaults to 68020 rather than
+ unknown arch when the magic number doesn't specify the
+ architecture, since some OSs (eg old sun3s) don't set the number, and
+ 020 is probably the right answer anyway.
+
+Sun Nov 3 12:07:08 1991 Per Bothner (bothner at cygnus.com)
+
+ * hosts/h-news.h, hosts/h-rtbsd.h:
+ Get rid of MISSING_VFPRINTF, since libiberty provides one.
+ * bfd-in.h (bfd_print_symbol_type_hopw enum): Add new option
+ bfd_print_symbol_nm, for use by nm.
+ * aoutx.h (NAME(aout,print_symbol)): Add code for new
+ bfd_print_symbol_nm option, to print in nm format.
+ * coffcode.h (coff_print_symbol), ieee.c (ieee_print_symbol)
+ oasys.c (oasys_print_symbol): Provide stub implementations
+ for bfd_print_symbol_nm.
+ * syms.c: New function bfd_decode_symclass, used by nm printer.
+ New function bfd_stab_name to look up string name of stab code.
+
+Sat Nov 2 14:26:03 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * Makefile.in: Added ctor.c
+ * archures.c (bfd_default_arch_struct) added
+ bfd_default_reloc_type_lookup.
+ * coffcode.h: removed a load of #if 0ed code.
+ (coff_compute_file_section_positions): now works out the section
+ alignment and size correctly in all cases.
+ (coff_get_symtab): looks for constructor symbols and calls the
+ right function when they're found. (coff_canonicalize_reloc):
+ knows when a section is full of constructors and does the right
+ thing.
+ * cpu-m88k.c: Added default_reloc_type lookup to the architecture
+ description.
+ * libbfd-in.h: (bfd_default_reloc_type_lookup) defun added.
+ * libcoff.h: removed #if 0ed code
+ * reloc.c: (bfd_reloc_code_real_type) added BFD_RELOC_CTOR for
+ arch independent constructor relocation type.
+ (bfd_reloc_type_lookup): removed the comment "this will go away"
+ since it won't. (bfd_howto_32): stolen from 88k, this is a 32bit
+ reloc which is used when BFD_RELOC_CTOR falls through to give a
+ default 32bit reloc for constructors.
+ (bfd_default_reloc_type_lookup): added.
+ * aoutf1.h: fixed SEGMENT_SIZE typo.
+
+Thu Oct 31 18:23:06 1991 John Gilmore (gnu at cygnus.com)
+
+ * coff-rs6000.c: Change name to "aixcoff-rs6000", to avoid
+ matching prefix "coff".
+ * coffcode.h (coff_swap_aux_in, coff_swap_aux_out): Handle
+ rs/6000 csect records.
+
+Sun Oct 27 16:56:58 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * coff-m88k.c, targets.c: change name of m88k_bcs to m88kbcs
+ * configure.in: add motorola delta88 cases
+ * libbfd.h, libbfd-in.h, archive.c, ieee.c, elf.c, srec.c: fix
+ write_armap prototype
+ * libbfd.c: add doc on bfd_write_bigendian_4byte_int
+
+Fri Oct 25 02:48:19 1991 John Gilmore (gnu at cygnus.com)
+
+ * Rename COFF-related files in `coff-ARCH.c' form.
+ coff-a29k.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c,
+ coff-mips.c, coff-rs6000.c to be exact.
+
+ * Makefile.in: Only supply TARGET_DEFAULTS to targets.c, reducing
+ make output clutter.
+ * config/mt-*: Ditto.
+
+Thu Oct 24 22:40:07 1991 John Gilmore (gnu at cygnus.com)
+
+ RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
+ John Gilmore. Archive support from Damon A. Permezel.
+
+ * Makefile.in: Add cpu-rs6000.c and rs6000coff.c.
+ * configure.in: Add rs6000 case.
+ * targets.c: Add rs6000 vector.
+ * archures.c: Add rs6000, fix comment on romp.
+ * bfd-in.h (enum bfd_error): Add no_debug_section error.
+ * libcoff-in.h (struct coff_tdata): Remove unused string_table.
+ * bfd.c (bfd_errmsgs): Add no_debug_section error message.
+ * section.c (bfd_make_section): Return NULL on attempt to create
+ a section twice.
+ * coffcode.h (bfd_swap_reloc_in): Handle r_type and r_size.
+ (bfd_swap_aouthdr_in): Handle lots more members.
+ (make_a_section_from_file): If section has already been seen,
+ just return false rather than overwriting it.
+ (coff_real_object_p): Understand incoming magic numbers.
+ (coff_set_flags): Understand outgoing magic numbers.
+ (coff_compute_section_file_positions): outgoing aouthdr magic #.
+ (build_debug_section): Add fn for reading debug string section.
+ (get_normalized_symtab): Handle symbol names in debug string section.
+ Remove unused obj_string_table.
+ (coff_slurp_symbol_table): Handle rs6000-specific storage classes.
+ * aoutx.h (translate_from_native_sym_flags, N_SET*): Check for
+ existing section before making one.
+ * cpu-rs6000.c: New file.
+ * rs6000coff.c: New file.
+
+Thu Oct 24 02:03:24 1991 Fred Fish (fnf at cygnus.com)
+
+ * elf.c: Add partial support for ELF format corefiles. Still needs
+ support for extracting registers from corefiles.
+
+ * config/t-m68k-elf: Set DEFAULT_VECTOR to elf_big_vec.
+
+ * config/{h-amix,h-dgux,h-irix3,h-ultra3}: For systems where
+ RANLIB is defined as echo, send the output to /dev/null to help
+ reduce clutter in the output from doing a make.
+
+Mon Oct 21 17:48:48 1991 John Gilmore (gnu at cygnus.com)
+
+ * hosts/h-vaxult.h: Remove malloc/free decls covered in stdlib.h.
+ Fix HOST_PAGE_SIZE and HOST_SEGMENT_SIZE. From David Taylor.
+
+Mon Oct 21 09:34:11 1991 Steve Chamberlain (steve at rtl.cygnus.com)
+
+ * coffcode.h (coff_compute_section_file_positions): make it pad
+ section size out if there are alignment restrictions so that the
+ image will be ok on a system where section positions are worked
+ out by accumulating sizes rather than from the section headers.
+ * targets.c (proto write_armap). Changed orl_count to unsigned.
+ * opncls.c (bfd_close_all_done). Added so that generative
+ programs like gas can close a bfd without causing bfd confusion.
+ * libbfd.h (changed becuase of protos)
+ * amdcoff.c: messed with the way that jmp displacements are
+ calcualated. This may not yet be totally correct.
+ * archive.c (coff_write_armap): rewrote the way that ranlibs are
+ written out.
+ * coffcode.h (fixup_symbol_value): now doesn't core dump if a non
+ abs symbol has no section (like a register symbol).
+ (coff_write_symbol) now zeros auxent before filling it up to help
+ with sensitive applications.
+ * libbfd.c (bfd_write_bigendian_4byte_int): added.
+
+Wed Oct 16 22:58:45 1991 John Gilmore (gnu at cygnus.com)
+
+ * bfd.c: Make sure we don't get a macro strerror().
+ * opncls.c (bfd_fdopenr): If FASCIST_FDOPEN, use "r", not "r+".
+ * trad-core.c (trad_unix_core_file_failing_command): Suppress
+ attempt to recover command, ifdef NO_CORE_COMMAND.
+ * hosts/h-tahoe.h: Add FASCIST_FDOPEN and NO_CORE_COMMAND;
+ revamp HOST_*, etc.
+ * hosts/h-i386v.h: Use <utime.h>, not <sys/utime.h>, unlike POSIX.
+
+Wed Oct 16 12:43:49 1991 Per Bothner (bothner at cygnus.com)
+
+ * archive.c (bsd_write_argmap): The size of the ranlib structures
+ should not include the size field itself.
+ * aoutx.h, libaout.h (NAME(aout, sizeof_headers)): Use
+ adata(abfd)->exec_bytes_size field instead of constant macro,
+ because aoutx.h compiles to a simple .o file shared by
+ all 32-bits a.out targets.
+
+Wed Oct 16 11:11:05 1991 John Gilmore (gnu at cygnus.com)
+
+ * configure.in: Allow i386-sco-sysv.
+ * bout.c: Remove unused i960_align; lint dummy core file handlers.
+ * cpu-h8300.c: lint.
+
+ * host-aout.c: New strategy. We use common code, include files,
+ and data structures to handle the file, but set a few parameters
+ from the host's config file (page size, text start addr, etc).
+ * libaout.h: Define HP BSD machine types.
+ * aoutf1.h: Handle reading a.outs with these types.
+
+ * trad-core.c: Pass the u.u_ar0 value as the negative of the
+ virtual-memory-address of the .reg section. We can't just make a
+ section for "all the regs and nothing else" because only GDB knows
+ exactly where the regs are (scattered around the upage and stack).
+ Clean up memory allocation. Remove big- and little-endian
+ vectors, replace with single vector; this only runs on the host,
+ in host byte order. Replace byteswap routines with aborts in case
+ anyone calls them.
+ * targets.c: There's only one trad_core_vec now.
+ * aoutf1.h (sunos_core_file_p): VMA of .reg* now needs to be 0.
+
+Tue Oct 15 08:29:03 1991 John Gilmore (gnu at cygnus.com)
+
+ * hosts/h-amix.h (free): Fix prototype.
+
+ * aoutx.h: Don't use NULL as an integer, for braindead systems
+ that declare it as (void *)0. (From Peter Schauer.)
+
+Mon Oct 14 17:20:47 1991 Per Bothner (bothner at cygnus.com)
+
+ * opncls.c (bfd_fdopenr): Add parentheses to avoid reported
+ problem with bad Ultrix system headers.
+ * aoutx.h (NAME(aout,set_section_contents)): Try to handle the
+ various kinds of alignments for the various kinds of
+ magic numbers.
+
+Mon Oct 14 14:23:10 1991 John Gilmore (gnu at cygnus.com)
+
+ * doc/Makefile: Don't assume . is on the path (from James Clark).
+
+Fri Oct 11 22:45:14 1991 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in: Avoid Sun Make VPATH bugs.
+ * targets.c: Declare trad_core vectors extern.
+
+Fri Oct 11 13:03:02 1991 Per Bothner (bothner at cygnus.com)
+
+ * coffcode.h: Moved ALIGN macro to libbfd.h. Removed i960_align.
+ * libbfd.h: Moved ALIGN macro here.
+ * bout.c (b_out_callback): Replace i960_align by align_power.
+
+ * libaout.h (struct aoutdata): Added fields page_size,
+ segment_size and exec_bytes_size. These help generic code
+ (in aoutx.h and libaout.h) to figure out where to align
+ the various segments in a demand paged file.
+ * libaout.h (WRITE_HEADER): Use new (struct aoutdata) fields
+ to decide if the exec header counts in a_text (text segment size).
+ Also, assume D_PAGED flag is set; don't set it here.
+ * bout.c (b_out_callback): Add initialization of
+ adata fields page_size, segment_size, and exec_bytes_size.
+ * host-aout.c (NAME(host_aout, callback) and
+ NAME(host_aout,mkobject): Ditto.
+ * i386aout.c (aout386_callback) and new aout386_mkobject): Ditto.
+ * newos3.c (newsos3_callback) and new newsos_mkobject): Ditto.
+ * aoutf1.c (sunos4_callback) and new sunos_mkobject): Ditto.
+ * aoutx.h (NAME(aout,some_aout_object_p)): Don't subtract
+ EXEC_BYTES_SIZE from the a_test size; this is only appropriate
+ for some systems (mainly sunos), so do it in the callback instead.
+ Same routine: Add stuff to the THIS_IS_ONLY_DOCUMENTATION comment.
+ * aoutx.h (NAME(aout,set_section_contents): Change the way
+ filepos and size of sections are carried out to support
+ older styles of demand paged executables.
+
+
+Fri Oct 11 12:33:36 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * bfd-in.h: Added more macros to COFF_SWAP_TABLE.
+ * bfd.c: Added macros to enable gas to swap coff records.
+ * coffcode.h: Make the coff_swap_*_out routines return the number
+ of bytes swapped, and cleaned up their prototypes.
+ * configure.in: Added ebmon/coff support
+ * ecoff.c: Changed null definitions of coff_swap_*_out to conform
+ to new prototypes
+ * targets.c: Added new entry points for coff swapping
+
+Fri Oct 11 03:01:52 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 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. Remove refs to
+ ../include/sysdep.h.
+ * cpu-i960.c: Strncmp needed a length arg.
+ * ecoff.c: Don't ever call trad_unix_core_file_p from here.
+ * i386aout.c: Remove dead N_TXTOFF override.
+ * trad-core.c: Don't disable the whole file if SUN4_SYS.
+ * config/: Rename some config files to match up h-*.h names.
+ Remove all the HOST_SYS definitions from the config files.
+ * hosts/h-amix.h, h-i386v.h: Define POSIX_UTIME, not USG.
+ * hosts/h-hp9000.h: Remove USG comment.
+ * hosts/h-rs6000.h: Include <stdlib.h> for malloc.
+ * hosts/h-news.h, h-sparc-64.h: New config files that had
+ previously been kludged in the <sysdep.h> file.
+
+Thu Oct 10 17:54:08 1991 John Gilmore (gnu at cygnus.com)
+
+ * config/*: trad-core support is HOST dependent, not target
+ dependent. Target config files only set DEFAULT_VECTOR and/or
+ other vector elements. Exception: when host-aout.c is in use,
+ in which case we're forced to assume we're native (hp, vax,
+ tahoe). Rename XDEPFILES to HDEPFILES.
+ * Makefile.in: Rename XDEPFILES.
+ * config/h-sun*: Don't force static linking.
+ * trad-core.c: Document how to use it nowadays.
+ * i386aout.c, newsos3.c: Clean up.
+ * i386coff.c: Allow 386 coff files to be used as core files too
+ (for reading core files from embedded systems).
+
+Tue Oct 8 15:30:39 1991 John Gilmore (gnu at cygnus.com)
+
+ * Add i386aout.c for a.out support on the i386.
+
+Tue Oct 8 12:18:54 1991 Roland H. Pesch (pesch at cygnus.com)
+
+ * reloc.c, section.c, syms.c, targets.c: correct info-node
+ structure in *doc* comments.
+ doc/Makefile: stop hiding complaints from makeinfo.
+
+Sun Oct 6 19:10:06 1991 John Gilmore (gnu at cygnus.com)
+
+ * aoutx.h (...some_aout_object_p): Take a third parameter,
+ the internal_exec struct, and avoid ever looking at an
+ external_exec. All callers changed to read the entire
+ external_exec struct, swap and check its magic number,
+ swap in the whole structure, and pass the swapped-in version to
+ some_aout_object_p.
+ * bout.c: Bring into modern era. Use single _object_p routine
+ for big- aand little-endian. Provide internal and external
+ exec header structs. Use separate swap-in and swap-out routines.
+
+ * libaout.h: Move struct internal_exec from ../include/aout64.h
+ to here. Add obj_symbol_entry_size to struct aoutdata.
+ * aoutx.h (...some_aout_object_p): Set obj_symbol_entry_size.
+
+ * ../include/aout64.h: Change EXTERNAL_LIST_SIZE to
+ EXTERNAL_NLIST_SIZE. Callers changed.
+
+Fri Oct 4 18:18:46 1991 John Gilmore (gnu at cygnus.com)
+
+ * bfd.c: Remove strerror() to libiberty.
+
+ * elf.c: Remove elf_set_section_contents, use generic one. Lint.
+ * libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
+ * libbfd.c (bfd_generic_{get,set}_section_contents): Check that
+ last byte of transfer, not first byte, is within the section.
+
+ * host-aout.c: Remove `BSD' archive support. Lint.
+
+ * archures.c: Rename `struct bfd_arch_info_struct' to `struct
+ bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
+ `bfd_arch_info_type'. All uses changed.
+ * reloc.c: Rename `bfd_reloc_status_enum_type' to
+ `bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
+ to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
+ it needs a better name.) All uses changed.
+ * targets.c: Rename `enum target_flavour_enum' to `enum
+ target_flavour', and remove the `_enum' from all of the enum
+ values themselves. All uses changed.
+
+ * configure.in, config/h-i386mach: i386 mach host.
+ * config/t-i386-aout: Use host-aout.c.
+
+ * trad-core.c: Give it its own xvec's to make it independent
+ of other file formats.
+ * ecoff.c, host-aout.c: Remove refs to trad-core.
+ * config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
+ * targets.c: #ifdef TRAD_CORE, include it in the vector.
+
+Fri Oct 4 17:38:03 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * reloc.c: Extended NEWHOWTO macro
+ * ieee.c: Changed the way 8bit pcrel is done
+ * cpu-h8300.c: got the registers in the right order
+
+Thu Oct 3 19:39:55 1991 John Gilmore (gnu at cygnus.com)
+
+ * bfd-in.h: enum boolean => enum bfd_boolean for SVR4. Gumby's
+ prediction is vindicated!
+
+ * bfd-in.h, libbfd-in.h, doc/Makefile, doc/tolibbfd, doc/intobfd:
+ Remove refs to howto.c, since Steve forgot.
+
+Thu Oct 3 07:49:21 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * elf.c: took the abort out of set_arch_mach so that objdump -i will
+ still work. Now allows any architecture/machine to be set.
+
+Wed Oct 2 13:50:35 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * howto.c deleted and moved code to reloc.c
+
+ * libbfd.h, libbfd-in.h removed $id stuff for real
+
+ * cpu-h8300.c Made it match various different spellings of h8300.
+
+ * archures.c: Took out the first char filter which made it only
+ look for a cpu/arch match when the first chars of supplied and
+ tested names were the same.
+
+ * targets.c removed oasys stuff, pending someone to fix the bugs
+ in it.
+
+
+Tue Oct 1 12:29:44 1991 John Gilmore (gnu at cygnus.com)
+
+ * Makefile.in, configure.in, targets.c, elf.c: Add preliminary
+ ELF support good enough for GDB.
+ * configure.in, config/h-amix, config/t-m68k-elf: Handle
+ m68k-cbm-svr4 host and target.
+ * config/t-m68k-coff, t-m88k-coff, t-m88k-aout: Make files nonempty
+ so `diff' and `patch' can cope.
+
+Tue Oct 1 11:24:31 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * archures.c: removed texinfo error
+
+ * init.c: added texinfo hooks, and removed initialization error
+ message.
+
+ * libcoff-in.h, libbfd-in.h removed $id field so cvs can merge
+ without complaints.
+
+Tue Oct 1 05:02:53 1991 John Gilmore (gnu at cygnus.com)
+
+ * cpu-i960.c: Avoid numerical count of initializers.
+
+ Vax Ultrix changes from David Taylor <taylor@think.com>:
+ * host-aout.c: Make little-endian vector really little-endian.
+ * configure.in: Separate vax and tahoe cases, handle ultrix.
+ * config/t-vax: Add trad-core.o.
+ * config/h-vaxult: New host system.
+
+Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
+
+ * bfd-in.h VERSION, change version number to 0.18, this makes a
+ gap, but now is the same as the linker version number.
+
+ * cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
+ cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
+ files will eventually contain processor specific bits for bfd,
+ like strange relocation information and dis/assembly. So far only
+ the H8 has been even partially done. This work also ties in with
+ the change in handling architectures.
+
+ * amdcoff.c: (a29k_reloc) fix error message.
+
+ * aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
+ discover the architecture of the bfd. (sunos4_callback) calls the
+ function bfd_set_arch_mach rather than stuffing stuff directly
+ into the bfd. (sunos4_write_object_contents), changed names of
+ accessor functions.
+
+ * aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
+ setup the environment.
+
+ * archive.c: (bfd_slurp_coff_armap) coff archives always have the
+ headers in big endian format, regardless of the endianess of the
+ host or target.
+
+ * archures.c: totally changed. Now an architecture is represented
+ with a pointer to an info structure rather than an enumerated type
+ and a long. The old info is available as two elements in the
+ structure. Future enhancements to architecure support will
+ involve pointers to methods being placed into the info structure.
+
+ * bfd.c: changed the definition of the bfd structure for the new
+ architecture stuff.
+
+ * bout.c: (b_out_set_arch_mach) changed to use the new
+ architecture mechanism.
+
+ * coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
+ the new architecture mechanism.
+
+ * configure.in: added h8 stuff.
+
+ * ieee.c: too many changes to note. Now ieee files written with
+ bfd gas and ld can be read by gld and ieee only linkers and
+ simulators.
+
+ * libbfd.c, libbfd.h: changed prototype of bfd_write.
+
+ * newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
+ than fixing the structure directly.
+
+ * oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
+ than fixing the structure directly.
+
+ * opncls.c: (new_bfd) makes sure that bfd_init has been called
+ before opening a bfd.
+
+ * srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
+ rather than fixing the structure directly.
+
+ * targets.c: (target_vector) now by defining SELECT_VECS (perhaps
+ in the t/hmake file) a user can select which backends they want
+ linked with bfd without changing the source.
+
+ * init.c: new, looks after initializing modules.
+
+ * howto.c: for future use, will allow an application to work out
+ what cookie to use as a handle on a relcoatio howto.
+
+Mon Sep 30 13:31:15 1991 John Gilmore (gnu at cygnus.com)
+
+ * srec.c: Better error checking, partly from Peter Schauer.
+ (srec_object_p): Avoid assuming any file that starts with 'S' is
+ an S-record file! (Check for 3 uppercase-hex digits after it.)
+ (ISHEX): Define new macro for checking supposedly hex characters.
+ (pass_over): Treat as EOF any S-record line that:
+ * doesn't have hex in either size character
+ * produces a size larger than 0x7F
+ * has an unrecognized type number
+
+Thu Sep 26 15:27:29 1991 John Gilmore (gnu at cygnus.com)
+
+ * aoutf1.h, aoutx.h, bout.c, coffcode.h, host-aout.c, oasys.c,
+ opncls.c: Lint (saber actually).
+
+Thu Sep 26 11:24:24 1991 Per Bothner (bothner at cygnus.com)
+
+ * libaout.h (WRITE_HEADERS): Set header's a_text field always.
+ * newsos3.c: Fixed two types: newos3 -> newsos3.
+ * reloc.c (bfd_perform_relocation): Fix pc-relative relocation
+ to use correct segment.
+
+Mon Sep 23 18:24:34 1991 Per Bothner (bothner at cygnus.com)
+
+ * aoutx.h (print_symbol): Handle missing symbol->name.
+
+Fri Sep 20 12:26:01 1991 Stu Grossman (grossman at cygnus.com)
+
+ * aoutf1.h (swapcore_sparc): Change name of USRSTACK, fix comment
+ at top of routine.
+
+Tue Sep 17 17:23:49 1991 Stu Grossman (grossman at cygnus.com)
+
+ * oasys.c, configure.in, config/h-irix3, config/t-irix3:
+ add sgi/irix support.
+
+Thu Sep 12 14:29:09 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ Changes for the AMD 29000 Ultracomputer port from David Wood.
+ (wood@nyu.edu).
+
+ * opncls.c (bfd_fdopenr): Handle NO_FCNTL.
+
+ * Makefile.in: Make subdirs work by using $(INCDIR) in the
+ crude dependencies.
+
+ * coffcode.h (coff_real_object_p): Pass information about the
+ current file's coff symbol format to BFD via the coff_data struct.
+ (coff_find_nearest_line): obj_icof => coff_data.
+ (coff_swap_sym_{in,out}): Check that SYMNMLEN == E_SYMNMLEN.
+ (coff_swap_aux_{in,out}): Check that FILNMLEN == E_FILNMLEN
+ and DIMNUM == E_DIMNUM.
+ * configure.in: Handle a29k-*-* hosts, and targets
+ a29k-*-coff, a29k-*-aout, and a29k-*-sym1.
+ * libcoff-in.h: Add local_n_btmask, local_n_btshft,
+ local_n_tmask, local_n_tshift, local_symesz, local_auxesz,
+ local_linesz to `coff_data' (tdata) struct.
+ (coff_data, coff_data_type, coff_tdata): Rename struct icofdata.
+ * config/h-ultra3: Handle a29k-*-* hosts as Ultracomputers.
+
+Thu Sep 12 14:07:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
+
+ * Makefile.in: $(MAKE) for make, $(docdir) for doc
+ * doc/Makefile: redundant dependencies for Sun-make VPATH bug
+
+Tue Sep 10 20:34:12 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * aoutf1.h (sunos4_core_file_p): Release the right storage in
+ error case.
+ (sunos4_core_file_matches_executable_p): Fix header comparison.
+ * aoutx.h: Avoid shifts of 32 bits, undefined in C. Lint.
+ * bout.c, icoff.c, ieee.c, libbfd.c, oasys.c: gcc -O -W lint.
+
+Wed Sep 4 00:44:52 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ Allow GDB to patch object files.
+
+ * aoutf1.h (sunos_core_file_p): Set SEC_HAS_CONTENTS on all sections.
+ * trad-core.h (trad_unix_core_file_p): Ditto.
+ * aoutx.h (aout_set_section_contents): On first output, check
+ abfd->direction and complain if erroneous.
+
+ * Makefile.in: Add crude dependencies.
+
+Tue Sep 3 13:46:19 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * config/* aoutx.h configure* shortened all the h/tmake-xxxx
+ to h/t-xxxx files so that everything will work on System V.
+
+Fri Aug 23 13:51:06 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * aoutx.h: Add information on host-aout.c and how to configure
+ to use it, to the manual.
+ * configure.in: Tix typo.
+ * ecoff.c: If compiling for DEC3100, use trad_unix core files,
+ else dummy out the core file support.
+ * trad-core.c (trad_unix_core_file_p): If HOST_DATA_START_ADDR is
+ specified, use it to locate the data section.
+ * coffcode.h (coff_write_symbols): Declare buffer as bfd_bytes
+ rather than as chars (lint).
+
+Thu Aug 22 22:20:19 1991 Stu Grossman (grossman at cygint.cygnus.com)
+
+ * aoutx.h, coffcode.h: saberized.
+
+Thu Aug 22 11:27:06 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
+
+ * bfd.texinfo: some cleanup, reincorporated more intro matter from
+ bfd.doc
+ bfd.c, targets.c: minor rewording of doc segments
+
+
+Wed Aug 21 19:13:22 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * trad-core.c (trad_unix_core_file_p): Use HOST_TEXT_START_ADDR,
+ etc, rather than TEXT_START_ADDR.
+ * host-aout.c: Remove #if 0 around whole thing.
+ Update to modern (32/64-bit) a.out naming conventions.
+ Include a large chunk of ../include/a.out.gnu.h to get macros that
+ are not defined by the system include files.
+ (host_aout_{32,64}_write_object_contents): Use the WRITE_HEADERS
+ macro used by the other a.out implementations.
+ * Makefile.in: Give dependencies to OPTIONAL_BACKENDS.
+
+Wed Aug 21 14:33:06 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
+
+ * Makefile.in: use targets "bfd.dvi" and "bfd.ps" instead of
+ texdoc and psdoc; make these depend on generated .texi's
+
+ * scanit, (new) unPROTO: turn PROTO macros into ANSI declarations in
+ doc
+
+ * bfd.c, reloc.c, syms.c: minor spelling/wording fixes in doc
+ portions
+
+ * Makefile.in, awkscan-ip, awkscan-p, intobfd,
+ libbfd.h, libcoff.h, tolibcoff; new bfd-in.h, libbfd-in.h,
+ libcoff-in.h: (a) use separate files for invariant parts of bfd.h,
+ libbfd.h, and libcoff.h; (b) in generated parts of same, use less
+ obtrusive marks indicating .c origins.
+
+ * bfd.texinfo: generalize most references to linker
+
+Tue Aug 20 15:18:02 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
+
+ * Makefile.in: include core.p in PROTOS (building better bfd.h)
+ * archures.c: remove empty foo() definition (crept in at vn1.9)
+
+Mon Aug 19 13:48:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
+
+ * bfd.texinfo: use @setchapternewpage on instead of lots of
+ @page's; minor rephrasing in Introduction.
+
+ * aoutx.h, archive.c, archures.c, bfd.c, bfd.texinfo, cache.c,
+ coffcode.h, core.c, format.c, ieee.c, libbfd.c, libbfd.h, libcoff.h,
+ oasys.c, opncls.c, reloc.c, section.c, syms.c, targets.c (documentation
+ segments): used BFD (caps) more consistently as a name in
+ discourse, fixed a few other minor typos and uses of fonts
+
+
+Thu Aug 8 16:47:43 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * coffcode.h: fixed bug where string table size wasn't being swapped.
+
+Thu Aug 1 16:35:28 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * section.c: added SEC_CONSTRUCTOR_TEXT|DATA|BSS flags
+
+ * syms.c: added BSF_CONSTRUCTOR, BSF_WARNING and BSF_INDIRECT
+ flags. (bfd_print_symbol_vandf) now knows what to do with the
+ above flags.
+
+ * aoutx.h: made translate_from_native_sym_flags and
+ translate_to_native_sym_flags produce the above flags.
+
+
+Wed Jul 31 09:53:52 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * all files: update copyright notices for GPL version 2.
+ Install header comments and attribute most modules to their
+ authors. BFD's name is now officially "Binary File Descriptor",
+ so remove any conflicting pejoratives.
+ archures.h: Consists solely of comments; remove it.
+
+Fri Jul 26 18:11:34 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * Makefile.in, bfd.c: Made it compile again.
+
+Fri Jul 19 08:17:09 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * newsos3.c, targets.c, coffcode.h: new patches from David Wood
+
+
+Mon Jul 15 16:27:42 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * aoutf1.h archive.c bfd.c coffcode.h core.c ecoff.c ieee.c
+ bfd.texinfo oasys.c opncls.c reloc.c srec.c: More documentation on
+ lint fixes.
+
+ * amdcoff.c bfd.texinfo Makefile.in : Folded in changes for amd
+ 29k coff by David Wood (wood@lab.ultra.nyu.edu).
+
+Thu Jul 4 09:53:16 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * Everything: created some new files, core.c format.c, reloc.c,
+ section.c and syms.c to split the functionality a bit better.
+ Cleaned up the rest of the files a bit, and added some
+ documentation.
+
+
+Mon Jul 1 13:29:47 1991 David Wood (wood at david.ultra.nya.edu)
+
+ * opncls.c, ../include/sys/h-sun3.h ../include/sys/h-sun4.h: fcntl
+ really takes 3 arguments, patched code and ammended prototypes.
+
+Fri Jun 14 13:19:40 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * ../include/bfd.h (struct bfd_target): Added new field
+ "align_power_min" which contains the minimum alignment for a
+ section. This is used in coff_new_section_hook. The field
+ insertion necessitates an update of all backends..
+
+ * aoutf1.h jump table field inserted
+
+ * archive.c(snarf_ar_hdr)(bfd_slurp_coff_armap) can now parse dgux style extended
+ filenames too.
+
+ * bout.c(b_out_squirt_out_relocs) fix to assertion tests. Jump
+ table field inserted.
+
+ * coffcode.h(just about everything) Now patches up symbol tables
+ using a different mechanism. The Intel major bug has been fixed,
+ and the linker can self host on the Aviion and be debugged with
+ gdb.
+
+ * ecoff.c: new include and jump table patch, i386coff.c: new
+ include and jump table patch, icoff.c: new include and jump table
+ patch, ieee.c: can now read archives containing ieee modules.,
+ libcoff.h: added (combined_entry_type), libieee.h: uped max
+ sections to 20, m68kcoff.c: new include and jump table patch,
+ m88kbcs.c: new include and jump table patch, oasys.c: various bugs
+ fixed. opncls.c: added bfd_alloc_grow and bfd_alloc_finish.
+ srec.c: jump table patch. trad-code.c fixed #IF typeo
+
+Fri Jun 7 12:35:46 1991 Sean Fagan (sef at cygint.cygnus.com)
+
+ * coffcode.h (coff_swap_aux_in): added else case to deal with
+ filenames less than 9 characters.
+
+
+Thu Jun 6 18:27:38 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * ../include/oasys.h oasys.c (oasys_archive_p): fixed so it works
+
+ * srec.c: now allows any number of sections to be created in a
+ file. Outputs addresses of the right length.
+
+Thu May 30 15:30:10 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * bfd.c (bfd_check_format): Fixed problem where when a defaulted
+ target didn't match, the format got set to the attempted match,
+ breaking a future test.
+
+ *../include/i386coff.h : fixed typo in type field with size
+
+ * i386coff.c icoff.c m88k-bcs.c ecoff.c ../include/bfd.h : Added
+ support in the jump table for the swapping routines exported to
+ gdb. Now gdb works with the 386.
+
+Tue May 28 17:21:43 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * Merge in changes from gdb-3.95 release.
+ Makefile.in: Allow hmake and tmake files to add OFILES.
+ aoutf1.h:
+ bfd.c: support specific targets as well as searching. When
+ searching, take default target in preference to others.
+ bfd.doc: typos
+ ieee.c, oasys.c: Avoid using the "tdata" macros left of assignment.
+ liba.out.h: Don't hard-code file offsets; use N_ macros for them.
+ libbfd.h: Support specific targets as well as searching.
+ opncls.c: Support specific targets as well as searching.
+ targets.c: Search is short-circuited if default target matches.
+ liboasys.c, libieee.c: Undo bothner changes that make macros
+ work to the left of assignment, but which depend on the
+ representations of different pointer types being the same.
+
+Fri May 24 18:56:52 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * i386coff.c: created.
+ * coffcode.h: added support for 386.
+ * Makefile.in: added support for 386.
+ * ../include/i386coff.h: created
+
+Wed May 22 07:26:38 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * coffcode.h: removed all put_x_<sizes>
+ * libbfd.c: Changed #ifdef __GNUC__ to #ifdef HOST_64_BIT, Added
+ DEFUNS
+
+
+Tue May 21 08:58:58 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+ (bothner)
+ * opncls.c: Changed obstack_chunk_alloc use xmalloc
+
+Mon May 20 17:12:17 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * everything: Removed sysdep.h from bfd.h and put back into files
+ from which it was split out. Now 64 bit version is built with a
+ -DHOST_64_BIT="long long" on the compile line.
+
+Fri May 17 19:35:26 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ Changed all the [get|put][name] routines to use [get|put]_[size
+ in bytes].
+
+ Put in support for 64 bit work. Now two versions of bfd may be
+ generated, according to the state of TARGET_64_BIT, one which is
+ 32 bit only, and one which is 64/32 bits.
+ Created new back end 'demo64' to test 64 bit functionality.
+
+ Renamed some files to work on DOS.
+
+ * archive.c: lint * bfd.c: prototypes and lint. * ecoff.c: added
+ 64bit transfer * icoff.c: added 64bit transfer * ieee.c: name
+ chage, 64 bit transfer. * liba.out.h: Split out common code from
+ sunos and newsos into liba.out. Name changes and prototype mods. *
+ libbfd.c: lint and prototypes, extra 64bit swaps. * libbfd.h:
+ prototypes for new functions. * libcoff.h: lint * libieee.h: make
+ work on DOS * liboasys.h: make work on DOS * m88k-bcs.c: Name
+ change and 64bit stuff.* newsos3.c: common code removed, new jump
+ table. * oasys.c: Name change * opncls.c: Portability fixes *
+ srec.c: Name changes * sunos.c: Removed comon code. * targets.c:
+ Added demo * aout32, aout64.c include aoutx.h * bout.c: used to
+ be called b.out.c * coffcode.h: used to be called coff-code.h, now
+ 64bit ized. * demo64.c: 64 bit a.out back end
+
+Thu May 16 16:02:07 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+ from bothner
+ * libieee.h: Make ieee_data and ieee_ar_data macros usable
+ on LHS of assignment, even when using old compilers.
+ * liboasys.h: Ditto for oasys_data and oasys_ar_data.
+ * m68kcoff.c: Add enum-to-int casts to accomodate old compilers.
+ * newsos3.c: Fix definitions of SEGMENT_SIZE and TEXT_START_ADDR.
+ * opncls.c: Define S_IXUSR, S_IXGRP, S_IXOTH if undefined.
+ * targets.c: Add declaration of newsos3_vec.
+
+Mon May 13 10:03:29 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * aout.c: fixxed some of the problems with filepos calculation.
+ (swap_ext_reloc): fixed problem with creation of relocs.
+ (aout_set_section_contents): fixed filepos problem
+
+ * coff-code.h: (swap_filehdr_in, swap_filehdr_out) add.
+ (swap_filehdr) delete. Changed all the usage of bfd_h_put_x.
+ (swap_aouthdr_in, swap_aouthdr_out) add. (swap_aouthdr) delete.
+ (coff_real_object_p) cleaned up, added MIPS. (coff_object_p)
+ cleaned up. (coff_write_object_contents) cleaned up.
+
+ * ecoff.c: Totally different. Now supports ecoff fully.
+
+ * icoff.c: fixed problems in relocation callout.
+
+ * libcoff.h: (struct icofdata) removed hdr structure from tdata.
+
+ * m68kcoff.c: updated target vector.
+
+ * sunos.c: (choose_reloc_size) added: (sunos4_callback) calls
+ choose_reloc_size. (sunos4_write_object_contents) now calls
+ choose_reloc_size so outputs relocs correctly, also calculates the
+ size of the sections correctly.
+
+
+
+Fri May 10 16:58:53 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ Merge Per Bothner's changes to modularize BFD a.out a bit.
+
+ * libbfd.h, libbfd.c (bfd_generic_get_section_contents): Add.
+ * ieee.c: Cast enums to int before comparing them, for brain-
+ dead compilers.
+ * coff-code.h: Remove coff_get_section_contents, and use the
+ generic one instead.
+
+ * aout.c: Derive new module from sunos.c, containing generic
+ support code for all kinds of a.out files.
+
+ * sunos.c: Remove all code that goes in aout.c. Split out
+ machine dependent followup in sunos4_object_p into
+ sunos4_callback. Use JUMP_TABLE(aout) for the transver vector,
+ and redefine only the names we CHANGE, not all the names. Drop
+ the little-endian vector, and rename the vector as sunos4 rather
+ than generic.
+
+ * b.out.c: Use aout.c routines for most of the work. Slight
+ changes for the new regime. Remove close_and_cleanup and
+ get_section_contents in favor of generics. New transfer vector
+ regime.
+
+ * newsos.c: New support for Sony NEWS, another a.out format.
+
+ * ecoff.c: Remove close_and_cleanup. New tvec regime.
+ * icoff.c, m88k-bcs.c: Add write_contents to tvec.
+ * ieee.c, oasys.c: Remove close_and_cleanup, add write_contents
+ to tvec.
+ * opncls.c (bfd_close): Call format-dependent write_contents
+ routine, if writing, before calling target-dependent
+ close_and_cleanup routine (which is now always generic, I think).
+ * srec.c: Use bfd_alloc instead of malloc. Remove
+ close_and_cleanup and move code from it to
+ srec_write_object_contents. Add write_contents to tvec.
+ * targets.c: Remove a.out little vector, replace a.out big
+ vector with SunOS vector. FIXME: Need Vax support again now.
+
+ * libbfd.h: Add write_contents format-dependent-vector to the
+ bfd_target vector. Supply a generic close_and_cleanup routine.
+ * liba.out.h: Handle the new aout.c split. Add prototypes for
+ all routines defined in aout.c. Rename "sunos" things to "aout"
+ things. Add a few fields where needed for various formats.
+ * Makefile.in: Add aout.c and newsos.c.
+
+ * archive.c, ieee.c, oasys.c: Lint.
+
+Fri May 10 12:34:48 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * ../include/bfd.h
+ changed forward declaration struct stat; to reduce warnings. Changed
+ comment on bfd_h_<x>_x.
+
+ * ../include/m68kcoff.h, ../include/intel-coff.h,
+ ../include/m88k-bcs.h
+ Now there are two incarnations of relocs, linenos and syments. One for
+ internal digestion, and one full of char arrays for I/O. The original
+ names have gone to detect errors.
+
+ * Makefile.in, m68kcoff.c, targets.c
+ Test new structure code with a 68k coff implementaion
+
+ * coff-code.h, icoff.c, coffswap.c, libcoff.h
+ Fixed all the places where there were problems with the size and
+ alignments of structures on disk and structures in memory. #ifed out
+ all the code in coffswap.c, since it should be done using the target
+ swap routines now.
+
+Thu May 9 11:00:45 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * ieee.c (do_one, ieee_slurp_section_data): now supports the load
+ multiple reloc command.
+
+ * sunos.c (sunos4_set_section_contents): Made it so that sections
+ are always padded to their alignment size.
+
+Sat May 4 15:49:43 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * archive.c, bfd.c, coff-code.h, opncls.c, sunos.c, trad-core.c:
+ Clean up types and such (saber C problems).
+ * ecoff.c: Clean up types and such. Remove routines that are
+ not used. Fix up reading and swapping of shorts from files.
+
+ Notes on bfd-0.5.2-patch1a, from Per Bothner:
+
+ * a.out.vax.c: Remove two bogus "static" from prototypes.
+
+ * ecoff.c: Got rid of lots of non-working junk (that had
+ been copied directly from coff-code.h).
+ Updated to be consistent with updates to icoff.c and coff-code.h.
+
+ * libbfd.h: Added definitions for S_IXUSR, S_IXGRP, and S_IXOTH
+ if they're missing (as they are in (BDS-4.3-based) NewsOS-3).
+
+ * sunos.c (n_txtoff): (Re-)Add support for sony. This is a kludge,
+ but until the target_vector is automatically generated,
+ it's as good as any. Note that the text offset is the only
+ difference between NewsOS and SunOs (including magic numbers).
+ (Most of the sunos_* routines should to renamed bsd_*
+ and move to a bsd.c file. Then (and when the target_vector
+ is automatically generated) it might make sense to create
+ a separate Sony target.)
+
+ * sysdep.h: Don't declare fread and fwrite. Causes trouble
+ on some systems, and doesn't help on others.
+ Similarly, only define X_OK if not already defined.
+
+ * trad-core.c: Don't include sys/stat.h - at least
+ on NewsOS 3, it has already been included.
+
+Tue Mar 5 01:47:57 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * coff-code.h (bfd_coff_swap_sym, bfd_coff_swap_aux,
+ bfd_coff_swap_lineno): Export the routines that byte-swap COFF
+ symbol tables if necessary when reading them in, so gdb can use
+ them. Add "bfd_coff_" to the names so they won't conflict with
+ names in calling programs. FIXME-soon: if coff-code.h is
+ included in two BFD modules, this will cause duplicate
+ definitions; the routines should be exported to a separate,
+ common, module (probably along with a mess of other ones).
+
+Sat Mar 2 12:11:26 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ Improve modtime support.
+
+ * bfd.h: Add boolean mtime_set, and declare bfd_get_mtime.
+ Remove #define for bfd_get_mtime. Remove gratuitous comment.
+ * bfd.c (bfd_get_mtime): New fn, caches mtime, gets if not cached.
+ BUG: archive members still do not get correct mod times.
+
+ Improve floating point support for core files.
+
+ * sunos.c (struct core): Change void *fpa_dummy to double fp_stuff.
+ (sunos4_core_file_p): Create a second registers section in the
+ core file, called ".reg2", for the float registers.
+
+Thu Feb 14 15:49:06 1991 Gumby Vinayak Wallace (gumby at cygint.cygnus.com)
+
+ * many changes to improve archive handling; found a logic flaw in
+ bfd_check_format which only just happened to work by cooncidence.
+
+Thu Feb 14 07:53:16 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * bfd.c (bfd_perform_relocation): fixed to use output_offsets
+ correctly.
+
+ * bfd.h: changed type of udata in asymbol to void *, like it
+ should be. Added bfd_reloc_dangerous enum member.
+
+ * coff-code.h: Fixed it so that internally generated symbols get
+ their values relocated correctly in all cases. Removed calls to
+ xmalloc.
+
+ * icoff.c: Not understanding the destination symbol of a reloc is
+ not a failure any more, just 'dangerous'. This allows linking of
+ b.out and coff images.
+
+ * sunos.c: Cleaned up the way that ZMAGIC section sizes are
+ calculated.
+
+
+Tue Feb 12 13:25:46 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * sunos.c (translate_to_native_sym_flags): fixed
+ sym_pointer->n_value so that symbols on the way out get their
+ section relative values calculated correctly.
+
+ * coff-code.h (mangle_symbols): fixed problem where tags were not
+ being relocated for structs, enums, unions. Also various lints.
+
+Mon Feb 11 19:52:26 1991 Gumby Vinayak Wallace (gumby at cygint.cygnus.com)
+
+ * archive.c (get_elt_at_filepos): system_call_error returned
+ incorrectly.
+
+Sun Feb 10 23:18:40 1991 Gumby Vinayak Wallace (gumby at cygint.cygnus.com)
+
+ * Resolve the use of no_error and system_call_error.
+ The bfd library itself now will never set bfd_error to
+ no_error.
+
+ The code still needs to be combed to make sure all the error
+ codes are correct. I suspect they are not always set correctly.
+
+ * The names of all the messages have _ prepended because the sun
+ bundled compiler can't distinguish from a macro which takes an
+ argument and the same identifier in a non-macro context.
+
+ * The reason for the above being that entry points which used to
+ be trampoline functions are now just macros which expand to a
+ direct call through the bfd's xfer vector.
+
+ * (../include/intel-coff.h) F_AR32WR: fix this constant. Why
+ must gas have its own version of everything (the gas version
+ had the correct value)
+
+Tue Feb 5 11:46:53 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ * b.out.c: Added patches supplied by chrisb@mipon2.intel.com to
+ properly support i960 architecture and output correct reloc stuff.
+
+ * bfd.h: added prototype for bfd_printable_arch_mach, added
+ BFD_FAIL
+
+ * coff-code.h: Applied patches from chrisb to support i960
+ architecture, zero relocs and swap them correcly and conditionally
+ compiled the timestamp.
+
+ * sunos.c: Made the default section alignment 2^3 so that doubles
+ are done properly. Fixed the same reloc bug that was in b.out.c
+
+ * sysdep.h: Now compiles on a Posix box
+
+Wed Jan 30 21:36:26 1991 John Gilmore (gnu at cygint.cygnus.com)
+
+ * icoff.c: Fix comment on big-endian version.
+ * coff-code.h: Make HAS_RELOC really work (it's backwards from
+ F_RELFLG). Set F_AR32WR in output files if little endian
+ architecture.
+
+Tue Jan 29 20:56:10 PST 1991 steve@cygnus.com
+
+ * archures.c fixed =/== typo
+
+ * sunos.c added architecture stuff for output. Fixed
+ bug where files where vma(data) != size(text)
+ were processed wrong.
+
+ * coff-code.h added a lint cast
+
+ * (../include/a.out.sun4.h) fixed it so zmagic
+ worked
+
+Mon Jan 28 19:15:29 PST 1991 steve@cygnus.com
+
+ * archive.c removed loads of includes, and fixed bug where string
+ table didn't have a null at the end.
+
+ * bfd.c fixed includes, added symbols argument to
+ canonicalize_reloc entry point.
+
+ * libbfd.c fixed includes and added some lint patches.
+
+ * targets.c added both sorts of intel coff.
+
+ * b.out.c fixed included, changed was the canonical
+ relocs were done.
+
+ * icoff.c added support for callj and big and little
+ enidian tables.
+
+ * opncls.c added chmod+xing for files with EXEC_P set.
+
+ * sunos.c fixed includes. Changed default section
+ alignement to words. Fixed relocation stuff to work with
+ new scheme
+
+ * bfd.h various new types added, prototype for new
+ reloc calls, changed bfd->iostream to a void *
+ to including files don't need stdio.h.
+
+ * libcoff.h added conversion table to tie relocs to
+ canonical symbols
+
+ * sysdep.h created
+
+ * coff-code.h fixed includes. Added code to support
+ big and little endian formats. Various lints. Better
+ processing of symbols. Changed reloc stuff to new
+ order
+
+ * libbfd.h fixed includes
+
+
+Mon Jan 21 11:53:51 PST 1991 steve@cygnus.com
+
+ * bfd.h changed name of alignment entry in sec_struct to
+ alignment_power, because of conflicting uses within bfd.
+ Now it should be obvious that it's a 2**n alignment
+ specifier. Removed start_pad, end_alignment, block, minsize,
+ output_file_alignment, subsection_alignment and original_vma fields.
+ Added align_power() macro. Fixed bfd_section_alignment
+ acessor macros. Added bfd_symbol_same_target macro.
+
+ * b.out.c (b_out_write_object_contents) fixed to use
+ new alignment member. Fixed (callj_callback) to use section
+ relative symbols properly.
+
+ * sunos.c (sunos4_object_p) fixed to use new alignment_power.
+ Fixed (translate_from_native_sym_flags) to correctly make
+ symbols section relative.
+
+ * bfd.c (bfd_errmsg) fixed various enum cast problems.
+ (bfd_make_section) took out initialization of obsolete members.
+ (bfd_print_symbol_vandf) added
+
+ * opncls.c (bfd_create) created.
+
+ * coff-code.h (coff_new_section_hook) took away refs
+ to obsolete members. (make_a_section_from_file) added
+ conversion between alignment types. (coff_symbol_from)
+ added. (coff_count_linenumbers) only counts linenumbers
+ if symbol is of coff-type. (coff_mangle_symbols) only
+ heavily mangles symbols if symbol is coff-type.
+ (coff_write_symbols) various lints. (coff_write_object_contents)
+ various lints and modification for alignment conversion.
+ (coff_slurp_relocs) fixed for use with new asection shape.
+
+Sat Jan 19 16:10:42 PST 1991 steve@cygnus.com
+
+ * archive.c lots of lint
+
+ * b.out.c added callj relocation support, upgrated reloc howto.
+ Fixed so that asymbol and reloc records are output
+ correctly.
+
+ * bfd.c lots of lint, support for new bfd entry point
+ bfd_print_symbol.
+
+ * bfd.h changed definition of asymbol to contain pointer to
+ owning bfd, removed target dependencies.
+
+ * cache.c took out print statements, put in BFD_ASSERT calls.
+
+ * coff-code.h various lints, corrected linenumber output
+ functionality. Added support for new style asymbols and
+ bfd_print_symbol. Fixed so that asymbol and
+ reloc records are handled correctly. Added timestamp.
+
+ * icoff.c Added support for new howto shape.
+
+ * liba.out.h Added support for new asymbol shape
+
+ * libbfd.c various lints
+
+ * libbfd.h various lints
+
+ * libcoff.h added support for new asymbol shape.
+
+ * sunos.c various lints. Added support for new asymbol shape
+ and bfd_print_symbol.
+
+Wed Jan 16 21:38:09 PST 1991 steve@cygnus.com
+
+ * b.out.c removed prototype of sunos4_ennativate_symtab, lots of
+ pointer lint. Added support for callj relocation. Fixed bug where
+ the last 32 bytes of the text section were overwritten by data. Fixed bug
+ where archives of b.out didn't work due bfd_slurp_extended_name_table
+ returning false.
+
+ * sunos.c added support for n_other field. Braced the howto table so
+ that it won't be affected by any lengthing of the howto struct typedef.
+ Various lints
+
+ * bfd.h added support for n_other field, added special_function
+ reloc type, modified bfd_perform_relocation prototype. Added bfd_h_get_x
+ macros.
+
+ * bfd.c upgraded bfd_perform_relocation, various lints.
+
+Wed Jan 16 01:55:53 1991 John Gilmore (gnu at rtl)
+
+ * ChangeLog: Started ChangeLog for BFD.
+ * ToDo: Create file for suggestions.
+
+ * Makefile: Support easy loading into Saber C.
+ Add dependencies for icoff.o and bcs88kcoff.o.
+ Rename coff.c to coff-code.h. Change callers.
+
+ * bfd.c (bfd_check_format): Allow the check_format routines
+ to return the desired target vector, rather than just a Boolean.
+ bfd.h (bfd_check_format): Change function pointer return type.
+ archive.c (bfd_generic_archive_p): change callee.
+ b.out.c (b_out_little_object_p, b_out_big_object_p,
+ b_out_real_object_p): change callee.
+ libbfd.c (_bfd_dummy_target): Dummy routine replacing bfd_false
+ in check_format transfer vectors that need a filler.
+ libbfd.h (bfd_generic_archive_p, _bfd_dummy_target): Fix decls.
+ bcs88kcoff.c: change callee.
+ coff-code.h (coff_real_object_p, coff_big_object_p): change callee.
+ icoff.c: change callee.
+ sunos.c (sunos4_object_p, sunos4_core_file_p): change callee.
+
+ * libbfd.c (zalloc): It should actually zero the storage!
+ This was commented out for some reason.
+
+ * libbfd.h: Add malloc, xmalloc, memcpy, and fatal decls.
+ This is so callers can avoid <stdlib.h> which doesn't exist
+ on older systems.
+
+ * bfd.c (map_over_sections): Add debugging code, since I
+ noticed the section count for sunos core files was bad, but only
+ GDB had detected the problem.
+ (bfd_set_section_lineno_size, bfd_set_section_linenos,
+ bfd_get_section_linenos): Remove obsolete functions.
+ (bfd_apply_relocations): Use longs, not ints, for the math.
+
+ * bfd.h: Declare enum boolean and struct bfd_target as well
+ as typedefs for them. Remove obsolete
+ bfd_get_section_lineno_size.
+
+ * cache.c: Make the "fdopen" support work. Keep better track
+ of how many files are open. Centralize the opening of files
+ and be sure bfd_open[rw] actually try to open the file. Evade
+ linked list initialization problems.
+
+ * b.out.c, coff-code.h, opncls.c, sunos.c: lint.
+
+ * coff-code.h (coff_slurp_symbol_table): Null-terminate symtab names.
+
+ * cplus-dem.c: Delete file, since it is not part of BFD.
+
+ * opncls.c (bfd_openr): Eliminate misplaced #if 0 code.
+ (bfd_openr, bfd_openw): Actually open the file, give error now.
+
+ * sunos.c (sunos4_core_file_p): Set section count.
+ (sunos4_set_section_linenos, stab_names, fprint_name): Eliminiate
+ obsolete definitions.
+ (_write_symbol_table): Initialize <idx> counter.
+ (foop): Eliminate debugging code.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/bfd/ChangeLog-9495 b/contrib/binutils/bfd/ChangeLog-9495
new file mode 100644
index 0000000..9868583
--- /dev/null
+++ b/contrib/binutils/bfd/ChangeLog-9495
@@ -0,0 +1,10043 @@
+Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
+ old style TOC16 references without using R_PPC_GOT.
+ (ppc_reloc_type): Ditto.
+ (ppc_elf_reloc_type_lookup): Add support for TOC16.
+ (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
+ (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
+ (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
+ (ppc_elf_check_relocs): New function for GOT/PLT support that is
+ work in progress.
+ (ppc_elf_adjust_dynamic_symbol): Ditto.
+ (ppc_elf_adjust_dynindx): Ditto.
+ (ppc_elf_size_dynamic_sections): Ditto.
+ (ppc_elf_finish_dynamic_symbol): Ditto.
+ (ppc_elf_finish_dynamic_sections): Ditto.
+ (ELF_DYNAMIC_INTERPRETER): Define.
+
+Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * elf.c (copy_private_bfd_data): When attaching sections to
+ segments ignore sections that won't be allocated. Patch from
+ Andreas Schwab.
+
+Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config.bfd: Match on m68k-cbm-* only if OS doesn't match
+ anything else.
+
+Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i960.c (CALC_ADDEND): Define.
+ (coff_i960_relocate_section): Add the input section VMA to the
+ addend for PC relative relocs.
+
+Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
+
+ * peicode.h (pe_print_pdata): Must test the entire entry for zero
+ to correctly terminate.
+
+Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * targets.c (enum bfd_endian): Define.
+ (bfd_target): Rename byteorder_big_p to byteorder, and change it
+ from boolean to enum bfd_endian. Change header_byteorder_big_p
+ correspondingly.
+ * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
+ (bfd_header_big_endian, bfd_header_little_endian): New macros.
+ * bfd-in2.h: Rebuild.
+ * All targets: Change initialization of byteorder and
+ header_byteorder to use enum bfd_endian values rather than
+ booleans.
+ * All files: Change all references to byteorder_big_p and
+ header_byteorder_big_p to use new bfd_*_endian macros.
+
+ * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
+ s_vaddr.
+ * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
+ vma.
+ * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
+
+Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
+
+Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c: Lots of minor cleanups. Make many functions return
+ errors rather than calling abort. Also:
+ (ieee_write_twobyte): Remove; change callers to call existing
+ ieee_write_2bytes function.
+ (ieee_write_expression): Don't output the section twice when
+ outputting a local symbol. Don't emit an extraneous zero if there
+ is only one term.
+ (ieee_slurp_sections): Set the lma as well as the vma.
+ (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
+
+ * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
+ a recognized one or bfd_arch_unknown.
+ (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
+ to succeed.
+ (ihex_get_symtab): Likewise.
+
+Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h: Include <ctype.h>.
+ (struct aout_link_includes_table): Define.
+ (struct aout_link_includes_totals): Define.
+ (struct aout_link_includes_entry): Define.
+ (aout_link_includes_lookup): Define macro.
+ (struct aout_final_link_info): Add includes field.
+ (aout_link_includes_newfunc): New static function.
+ (NAME(aout,final_link)): Initialize includes hash table.
+ (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
+
+Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
+
+Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
+
+Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
+
+ * peicode.h (pe_print_reloc): New function to dump the .reloc section.
+ (pe_print_private_bfd_data): call pe_print_reloc.
+ * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
+ * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
+ up some debugging as well.
+
+Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
+ <rfg@monkeys.com>.
+
+Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Set section_count to 0
+ when setting sections to NULL.
+
+Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (struct xcoff_loader_info): Add export_defineds
+ field.
+ (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
+ (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
+ for all symbols.
+ * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
+ * bfd-in2.h: Rebuild.
+
+Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
+
+Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ihex.c (ihex_scan): Handle record types 4 and 5.
+ (ihex_object_p): Permit types 4 and 5.
+ (ihex_set_section_contents): Remove check for out of range
+ addresses.
+ (ihex_write_object_contents): Generate types 4 and 5.
+
+ * elflink.h (elf_link_output_extsym): Just ignore warning and
+ indirect references to symbols which don't really exist.
+
+Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
+
+ * peicode.h (pe_print_idata): Minor format fixes
+ (pe_print_edata): New function. Under private printing, this formats
+ the edata section of a PE file.
+ (pe_print_private_bfd_data): Added call to pe_print_edata.
+
+Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
+ index, don't call stoi.
+
+Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * srec.c (srec_scan): Set lma as well as vma.
+
+ * ihex.c: New file; support for Intel Hex format.
+ * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
+ (ihex_vec): Declare.
+ (bfd_target_vector): Always include ihex_vec.
+ * bfd.c (struct _bfd): Add ihex_data field to tdata union.
+ * Makefile.in: Rebuild dependencies.
+ (BFD_LIBS): Add ihex.o
+ (BFD_LIBS_CFILES): Add ihex.c.
+ * bfd-in2.h: Rebuild.
+
+ * elf.c (assign_file_positions_for_segments): Sort the sections in
+ each segment.
+ (get_program_header_size): Return the right size if segment_map is
+ not NULL.
+ (copy_private_bfd_data): Don't bother to sort the sections.
+
+ * bfd.c (bfd_record_phdr): New function.
+ * bfd-in.h (bfd_record_phdr): Declare.
+ * bfd_in2.h: Rebuild.
+
+ * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
+ BFD_ASSERT.
+
+ * libbfd.c (bfd_malloc, bfd_realloc): New functions.
+ (bfd_zmalloc): Return PTR, not char *. Take size_t, not
+ bfd_size_type.
+ * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
+ (bfd_zmalloc): Change declaration.
+ * libbfd.h: Rebuild.
+ * Many files: Use bfd_malloc and bfd_realloc rather than malloc
+ and realloc. Don't set bfd_error_no_memory if they fail.
+
+Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
+ uses as well. Added a new howto to deal with TOCREL16 relocs that
+ are TOCDEFN as well.
+ (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
+ to handle RVA relocs from dlltool.
+ (ppc_coff_rtype2howto): TOCDEFN reloc addition.
+ (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
+ (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
+
+ * coffcode.h (coff_set_alignment_hook): check idata$X sections
+ to get the right section alignment.
+
+Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
+ p_paddr if p_paddr is zero.
+ (make_mapping): Set includes_filehdr and includes_phdrs for first
+ PT_LOAD segment.
+ (map_sections_to_segments): Set includes_phdrs for PT_PHDR
+ segment.
+ (assign_file_positions_for_segments): Handle includes_filehdr and
+ includes_phdrs. Remove special handling of PT_PHDR and first
+ PT_LOAD segments.
+ (copy_private_bfd_data): Set includes_filehdr and includes_phdr
+ when appropriate. Remove special handling of PT_PHDR segment.
+ Use a more complex condition for when a section is included in a
+ segment to handle Solaris linker oddities.
+
+Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
+
+ * coff-m88k.c (howto_table): Reformatted for easier reading;
+ special_function now points to new function m88k_special_reloc.
+ (howto_hvrt16): Function previously used for handling HVRT16 relocs
+ removed.
+ (rtype2howto): Do not add reloc's r_offset to the addend, this will
+ be done correctly by m88k_special_reloc.
+ (reloc_processing): New function to be used by RELOC_PROCESSING.
+ (RELOC_PROCESSING): Define to call reloc_processing.
+
+Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
+ (pe_print_pdata): Likewise.
+
+ * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
+ obstack_alloc fails.
+ (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
+ fails.
+ * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
+ * Many files: don't set bfd_error_no_memory if one of the above
+ routines fails.
+
+ * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
+ if p_paddr_valid is set.
+ (copy_private_bfd_data): New static function.
+ (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
+
+ * elf.c (assign_file_positions_for_segments): Fix case where extra
+ program headers were allocated.
+
+ * elf.c (_bfd_elf_print_private_bfd_data): New function.
+ * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
+ * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
+ _bfd_elf_print_private_bfd_data.
+
+ * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
+ r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
+ Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
+ (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
+ RELOC_SECTION_LITA for ALPHA_R_IGNORE.
+ (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
+ RELOC_SECTION_ABS to RELOC_SECTION_NONE.
+
+Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
+ * elf.c (make_mapping): New static function.
+ (map_sections_to_segments): New static function.
+ (elf_sort_sections): New static function.
+ (assign_file_positions_for_segments): New static function.
+ (map_program_segments): Remove.
+ (get_program_header_size): Remove sorted_hdrs, count, and
+ maxpagesize parameters. Simplify.
+ (assign_file_positions_except_relocs): When generating an
+ executable, use assign_file_positions_for_segments.
+ (elf_sort_hdrs): Remove.
+ (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
+ to get_program_header_size.
+
+Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * hp300hpux.c (MY(callback)): Set lma as well as vma.
+
+ * configure, config.in: Regenerate with autoconf 2.7.
+
+ * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
+ * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
+
+Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
+ (ecoff_sec_to_styp_flags): Likewise.
+ (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
+ (ecoff_set_symbol_info): Handle scRConst.
+ (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
+ (ecoff_compute_section_file_positions): Handle .rconst section.
+ (_bfd_ecoff_write_object_contents): Likewise.
+ (ecoff_link_check_archive_element): Handle scRConst.
+ (ecoff_link_add_externals): Likewise.
+ (ecoff_link_write_external): Handle .rconst section.
+ (ecoff_reloc_link_order): Likewise.
+ * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
+ * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
+ section.
+ (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
+
+ * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
+ DEF_DYNAMIC flag is set.
+
+Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * host-aout.c: If TRAD_HEADER is defined, include it.
+
+Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4 (AC_PROG_CC): Remove local definition.
+ (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
+ (BFD_NEED_DECLARATION): New function.
+ * configure.in: Use BFD_NEED_DECLARATION.
+ * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
+ * configure, config.in: Rebuild with autoconf 2.6.
+
+ * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
+ special_sections before returning when called with a non XCOFF
+ BFD.
+
+ * coffgen.c (coff_renumber_symbols): Sort common symbols with
+ global symbols.
+
+ * coffcode.h (coff_compute_section_file_positions): Only pad the
+ previous section to force file alignment when creating an
+ executable.
+
+Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_compute_section_file_positions): If
+ RS6000COFF_C, set up the .debug section.
+
+ * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
+ if it is not large enough to accomodate the entire TOC area with
+ signed 16 bit offsets.
+ (xcoff_write_global_symbol): Handle negative TOC offsets in global
+ linkage code.
+ (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
+ TOC anchor to use the TOC value used in the output file.
+
+Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
+ (_bfd_coff_read_string_table): Likewise.
+
+Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * pe-arm.c: Fix typos.
+ * coff-arm.c: Likewise.
+
+Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (list_ele): Added "cat"egory member.
+ (record_toc): New category parameter (priv or pub).
+ (ppc_record_toc_entry): Check to see if toc bounds exceeded.
+ (ppc_process_before_allocation): Removed embrionic data-in-toc from
+ the mainline. It addes extra toc cells in error.
+ (ppc_coff_swap_sym_in_hook): Added some documentation.
+ (dump_toc): Can now diagnose "virtual toc" chicanery.
+
+Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * elf-bfd.h (struct elf_link_hash_table): Change type of
+ dynsymcount and bucketcount fields from size_t to bfd_size_type.
+
+Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
+ pointerize C_LEAFSTAT or C_LEAFEXT entries.
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
+ DT_INIT and DT_FINI entries if the _init or _fini symbol is
+ defined or mentioned in a regular file.
+
+Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (ppc_record_data_in_toc_entry): new function
+ (coff_ppc_relocate_section): Handle TOCDEFN attribute
+ (coff_ppc_relocate_section): Correct REL24 handling
+ (ppc_process_before_allocation): Correct TOCDEFN handling
+
+ * peicode.h (dir_names): Added name descriptions
+
+Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * VERSION: Updated to cygnus-2.6.
+
+Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * targets.c (m68k4knetbsd_vec): Declare.
+
+Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * targets.c (bfd_target): Change type of second argument to
+ _bfd_print_private_bfd_data from void * to PTR.
+ * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
+ using PTR rather than void *.
+ * bfd-in2, libbfd.h: Rebuild.
+ * peicode.h (pe_print_private_bfd_data): Change vfile from void *
+ to PTR.
+ * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
+ _bfd_generic_bfd_print_private_bfd_data rather than casting
+ bfd_true.
+
+Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
+ "DO NOT DELETE" lines or blank lines that mkdep writes on some
+ systems.
+ (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
+ BFD64_BACKENDS_CFILES): New variables.
+ (CFILES): Use them.
+
+Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
+ not at the file position of the first section.
+ * coffcode.h (coff_compute_section_file_positions): Avoid using
+ unportable #elif.
+ (coff_write_object_contents): When generating a PPC PE executable
+ with no symbols, round up the file size to a COFF_PAGE_SIZE
+ boundary.
+ * cofflink.c (_bfd_coff_final_link): If there are no symbols,
+ don't write out a string table.
+
+ * elf.c (bfd_section_from_shdr): When using a different section
+ header, pass the new one to _bfd_elf_make_section_from_shdr.
+ (elf_fake_sections): Don't set sh_info and sh_entsize fields.
+ (elf_map_symbols): Add section VMA to symbol value when comparing
+ against 0.
+ (_bfd_elf_compute_section_file_positions): Only build symbol table
+ if there are some symbols. Set file offset of symtab and strtab
+ sections.
+ (assign_file_positions_except_relocs): Remove dosyms parameter.
+ Change all callers. Never set file offset of symtab and strtab
+ sections.
+ (_bfd_elf_copy_private_section_data): New function.
+ (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
+ (_bfd_elf_copy_private_symbol_data): New function.
+ (swap_out_syms): Check for special mapping of st_shndx created by
+ copy_private_symbol_data.
+ * elfxx-target.h: Use new copy routines.
+ * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
+ (_bfd_elf_copy_private_section_data): Declare.
+
+ * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
+
+ * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
+ C_NT_WEAK.
+
+ * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
+ _bfd_dummy_target, matching the recent change to archive
+ recognition.
+
+Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd.c (bfd_get_file_window): Use casts to avoid doing
+ arithmetic on PTR types.
+
+ * aout-target.h (MY(callback)): Set the lma of the sections.
+
+ * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
+ symbol into a reloc against the section.
+
+Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
+ glue for the relocs: IMGLUE and IFGLUE.
+ (record_toc): new function - tracks toc contents
+ (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
+ (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
+ (ppc_coff_rtype2howto): removed invalid IMGLUE hack
+ (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
+ (ppc_record_toc_entry): Removed a debug define (duh)
+
+ * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
+ (pe_print_idata): New function - formats the idata section data
+ (pe_print_pdata): New function - formats the pdata section data
+ (pe_print_private_bfd_data): calls to above
+
+Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
+ * coff-rs6000.c (rs6000coff_vec): Add conditional defines
+ TARGET_SYM and TARGET_NAME for vector and BFD name.
+ * coff-pmac.c (pmac_xcoff_vec): Remove.
+ (TARGET_SYM, TARGET_NAME): Define.
+ * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
+ machine to 0, not all PowerMacs are 601s.
+
+Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_object_p): Read in any program headers.
+ * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
+ based on the program headers, if any.
+ (elf_fake_sections): Set sh_addr from the vma, not the lma.
+ (map_program_segments): Set p_paddr of program headers based on
+ the lma.
+
+Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * archive.c (bfd_generic_archive_p): Preserve tdata in case of
+ failure.
+
+ * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
+ trying to do a relocateable link with a non-a.out object file.
+
+ * archive.c (bfd_generic_archive_p): Check the first object file
+ in an archive even if target_defaulted is set. If the object file
+ has the wrong xvec, reject it.
+
+ * aoutx.h (NAME(aout,set_section_contents)): If a section can not
+ be represented, report the name via _bfd_error_handler.
+ (translate_to_native_sym_flags): Likewise.
+ * elf32-mips.c (mips_elf_final_link): Likewise.
+ * oasys.c (oasys_write_sections): Likewise.
+
+ * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
+ which checks for STYP_OVRFLO sections.
+ (coff_compute_section_file_positions): If RS6000COFF_C, handle
+ reloc and lineno count overflows.
+ (coff_write_object_contents): Call coff_count_linenumbers before
+ coff_compute_section_file_positions. If RS6000COFF_C, handle
+ reloc and lineno count overflows.
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
+ relocs before dealing with .pad sections. Count overflow section
+ headers when handling .pad sections.
+
+ * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
+ if RS6000COFF_C.
+
+ * xcofflink.c (XCOFF_DESCRIPTOR): Define.
+ (struct xcoff_link_hash_table): Add descriptor_section and
+ special_sections fields.
+ (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
+ (xcoff_link_add_symbols): Set linkage section alignment. Create
+ descriptor section. Check for magic symbol names (_text, etc.),
+ and record them in special_sections if found. Set
+ XCOFF_DESCRIPTOR flag for a function descriptor, and set its
+ descriptor field to point back to the function code symbol.
+ (xcoff_sweep): Always mark the special descriptor_section.
+ (bfd_xcoff_export_symbol): Check whether the symbol might be a
+ function descriptor, and mark it if it is.
+ (bfd_xcoff_size_dynamic_sections): Add new special_sections
+ parameter, and fill it in. Allocate space for the descriptor
+ section.
+ (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
+ global linkage code. If an undefined function descriptor is
+ exported, arrange to define it. Warn about any other undefined
+ exported symbol.
+ (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
+ (xcoff_write_global_symbol): Create a function descriptor when
+ necessary.
+ * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
+ * bfd-in2.h: Rebuild.
+
+Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
+ (ppc_coff_link_hash_table): new types for hashing
+ (ppc_coff_link_hash_newfunc): hash entry constructor
+ (ppc_coff_link_hash_table_init): hash table initializer
+ (ppc_coff_link_hash_table_create): hash table constructor
+ (ppc_record_toc_entry): changed references to hash table
+ (coff_ppc_relocate_section): changed references to hash table
+
+ * libcoff-in.h (coff_link_hash_entry): removed toc_offset
+ * libcoff.h: Rebuild
+
+ * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
+ (coff_link_add_symbols): removed toc_offset init
+
+Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (.dep1): Make sure the file mkdep is to write exists
+ first.
+
+ * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
+ if it is given and mmep is available.
+ * acconfig.h: Undef USE_MMAP.
+ * configure, config.in: Regenerated.
+ * aoutx.h: If USE_MMAP is not defined, do all symbol and string
+ table handling the old way.
+ (aout_get_external_symbols): Don't complain if last byte of string
+ table is nonzero.
+ * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
+ (bfd_free_window) [! USE_MMAP]: Don't define.
+ (bfd_get_file_window,
+ _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
+
+Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
+
+ * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
+ 0xffff0000.
+
+Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
+ compatible with AMD generated COFF files. Try to support both AMD
+ and GNU formats simultaneously.
+ (coff_a29k_relocate_section): Likewise.
+
+ * libbfd.c (bfd_get_file_window): Change writable parameter from
+ int to boolean; update all callers. Pass MAP_SHARED if not
+ writable--it's required on Solaris. Cast fprintf argument to
+ avoid warning.
+ * bfd-in.h (bfd_get_file_window): Update declaration.
+ * bfd-in2.h: Rebuild.
+ * aoutx.h: Update calls to bfd_get_file_window.
+
+ * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
+ Change all uses.
+ (xcoff_swap_ldhdr_in): New static function.
+ (xcoff_swap_ldsym_in): New static function.
+ (xcoff_find_reloc): Handle the case of a single reloc correctly.
+ (xcoff_link_add_symbols): If we just created a descriptor, pass it
+ to _bfd_generic_link_add_one_symbol, to save a hash lookup.
+ Handle XTY_ER/XMC_XO symbols correctly.
+ (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
+ rather than normal symbol table.
+ (bfd_xcoff_import_symbol): It's not an error if the symbol is
+ already defined with the same absolute value.
+ (xcoff_mark): When considering called symbols, check whether the
+ descriptor is from a dynamic object, rather than the symbol
+ itself.
+ (xcoff_build_ldsyms): Likewise.
+
+ * libbfd.c (bfd_get_file_window): Change return type to boolean.
+ Cast realloc and malloc return values. If malloc or realloc fail,
+ set bfd_error_no_memory.
+ * bfd-in.h (bfd_get_file_window): Change type to boolean.
+ * bfd-in2.h: Rebuild.
+
+Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (ppc_record_toc_entry): new function.
+ (in_reloc_p): changed return value.
+ (coff_ppc_relocate_section): much rework.
+ (ppc_allocate_toc_section): new function.
+ (ppc_process_before_allocation): new function.
+ (ppc_coff_swap_sym_in_hook): new function.
+
+ * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
+ (coff_link_add_symbols): initialize toc_offset.
+
+ * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
+ (coff_swap_aouthdr_out): Added more sections to the data
+ dictionary for the pe file header. Also changed linker version
+ number on the ppc side.
+ (dir_names): small improvements to the dictionary printing.
+ (pe_mkobject_hook): save the file level flags.
+
+ * libcoff-in.h (coff_link_hash_entry): added toc_offset field
+ (pe_tdata): added real_flags field
+ (coff_tdata): added local_toc_sym_map and access macro
+
+ * libcoff.h (coff_link_hash_entry): added toc_offset field
+ (pe_tdata): added real_flags field
+ (coff_tdata): added local_toc_sym_map and access macro
+
+ * coffcode.h (coff_set_alignment_hook): added hook for PE.
+ (coff_mkobject): init for local_toc_sym_map
+ (coff_write_object_contents): set the internal_a.magic to
+ IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
+ ppc compilers use.
+
+Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
+ entries until both the line number address and the function name
+ address are too large.
+
+ * configure.in: Call AC_CHECK_PROG to find and cache AR.
+ * configure: Rebuilt.
+
+ * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
+ is defined in the environment.
+
+Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (som_get_section_contents_in_window): Define to use
+ generic version.
+
+Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
+
+ * coff-i860.c: New file, based on coff-i386.c.
+ * cpu-i860.c: New file, based on cpu-i386.c.
+ * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
+ * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
+ targets, using i860coff_vec.
+ * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
+ trad-core.o and hosts/i860mach3.h.
+ (i860coff_vec): Use coff-i860.o and cofflink.o.
+ * configure: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (ALL_MACHINES): Add cpu-i860.o.
+ (BFD32_BACKENDS): Add coff-i860.o.
+ (CFILES): Add cpu-i860.c and coff-i860.c.
+ * targets.c (i860coff_vec): Declare.
+ (bfd_target_vector): Add &i860coff_vec.
+ * archures.c (bfd_i860_arch): Declare.
+ (bfd_archures_list): Add &bfd_i860_arch.
+ * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
+ (coff_set_flags): Handle bfd_arch_i860.
+ (coff_write_object_contents): Handle I860 a.out magic number.
+
+Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
+ the created .tc section to 2.
+ (xcoff_mark): Don't keep a .loader reloc for a call to an
+ undefined symbol when creating a shared library.
+ (xcoff_build_ldsyms): When creating a shared library, generate
+ global linkage code for a call to an undefined symbol.
+
+Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
+ BFD32_BACKENDS, BFD64_BACKENDS.
+ (.dep1): Put mkdep output in a separate file.
+ Rebuilt dependencies.
+
+ * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
+ value.
+
+ Permit use of mmap when available:
+
+ * configure.in: Check for mmap, madvise, mprotect.
+ * config.in, configure: Regenerated.
+
+ * libbfd.c (struct _bfd_window_internal): Define type.
+ (bfd_init_window, bfd_free_window, bfd_get_file_window): New
+ functions.
+ (ok_to_map): New static variable for debugging.
+ (_bfd_generic_get_section_contents_in_window): New function.
+ * bfd-in.h (bfd_window_internal): Declare type.
+ (bfd_window): Define type.
+ (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
+ * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
+ Declare.
+
+ * libaout.h (struct aoutdata): Add two window fields.
+ (obj_aout_sym_window, obj_aout_string_window): New macros.
+ * aoutx.h (some_aout_object_p): Initialize windows.
+ (aout_get_external_symbols): Get symbol data and strings in
+ windows instead of explicitly allocated buffers.
+ (slurp_symbol_table): Free window instead of memory.
+ (bfd_free_cached_info): Release windows instead of freeing storage
+ directly.
+ (aout_link_free_symbols): Ditto.
+
+ * targets.c (bfd_target): Add new field for
+ get_section_contents_in_window.
+ (BFD_JUMP_TABLE_GENERIC): Updated.
+ * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
+ coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
+ libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
+ macros for get_section_contents_in_window field.
+
+Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
+
+ * core.c: Renamed to corefile.c
+ * makefile.dos (OBJS): Change core.o to corefile.o
+ * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
+
+Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
+ to o. Clobber and restore the list of new csects around the call
+ to _bfd_generic_link_add_one_symbol, in case it wants to report a
+ linker error and the linker wants to read the symbol table. Reset
+ the line number count of a real section even if it has no relocs.
+ (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
+
+ * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
+ is too small.
+
+Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
+ an undefined symbol in a shared link.
+
+ * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
+ oldtype from bfd_link_order_type to bfd_link_hash_type. From
+ phdm@info.ucl.ac.be (Philippe De Muyter).
+
+Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
+
+ * coff-m88k.c (rtype2howto): New static function.
+ (RTYPE2HOWTO): Use it rather than a macro definition.
+
+ * coffcode.h (coff_write_object_contents): set internal_a.magic
+ to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
+
+ * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
+ define TRAD_HEADER to new file hosts/delta68.h.
+ m88*-motorola-sysv*, however, does use ptrace-core.o.
+ * hosts/delta68.h: New file.
+
+ * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
+ bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
+
+Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * i386linux.c (MY(vec)): Declare before use.
+
+Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
+ Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
+
+ * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
+ BFD is not of the right type.
+ (bfd_elf_get_needed_list): Likewise.
+ * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
+ * sunos.c (bfd_sunos_get_needed_list): Likewise.
+ * xcofflink.c (XCOFF_XVECP): Define.
+ (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
+ of the right type.
+ (bfd_xcoff_import_symbol): Likewise.
+ (bfd_xcoff_export_symbol): Likewise.
+ (bfd_xcoff_link_count_reloc): Likewise.
+ (bfd_xcoff_record_link_assignment): Likewise.
+ (bfd_xcoff_size_dynamic_sections): Likewise.
+
+ * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
+ table index against the number of symbols for a base relative
+ reloc.
+
+ * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
+ static function.
+ * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
+ full_aouthdr flag here...
+ (_bfd_xcoff_bfd_final_link): ...not here.
+
+Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
+
+ * libelf.h: Rename to elf-bfd.h to avoid conflict with
+ systems that have a system <libelf.h>.
+ * Makefile.in: Globally replace libelf.h with elf-bfd.h.
+ * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
+ elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
+ elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
+ elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
+ elfxx-target.h: Include elf-bfd.h rather than libelf.h.
+ * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
+
+Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
+ set, set BSF_WEAK in symbol. Change all callers.
+ (ecoff_get_extr): Set weakext based on BSF_WEAK.
+ (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
+ _bfd_generic_link_add_one_symbol.
+ (ecoff_indirect_link_order): Check that the section tdata relocs
+ are not NULL before using them.
+
+ * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
+ define TRAD_HEADER as hosts/alphalinux.h.
+ * configure: Rebuild.
+ * hosts/alphalinux.h: New file.
+ * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
+ not int.
+
+Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
+ C_ECOMM storage classes.
+
+ * xcofflink.c (xcoff_mark_symbol): New static function, broken out
+ of xcoff_mark.
+ (xcoff_mark): Call xcoff_mark_symbol.
+ (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
+ (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
+ doing it by hand.
+ (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
+
+Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
+ field.
+ (xcoff_find_reloc): New static function.
+ (xcoff_link_add_symbols): Use it.
+ (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
+ (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
+ relocate the value of C_DECL.
+
+ * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
+
+Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Make
+ callback decide what goes in .relocs.
+ * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
+ * peicode.h (pe_mkobject_hook): Only copy aouthdr if
+ there is one.
+
+Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
+ absolute section.
+
+Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c: More improvements, mostly to fix handling of
+ constructors and a few other special cases.
+ * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
+ zero, reverting yesterday's change.
+ * bfd-in.h (bfd_xcoff_link_record_set): Declare.
+ (bfd_xcoff_link_count_reloc): Declare.
+ (bfd_xcoff_record_link_assignment): Declare.
+ * bfd-in2.h: Rebuild.
+
+Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
+
+ * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
+ aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
+ i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
+ i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
+ ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
+ Change PAGE_SIZE to TARGET_PAGE_SIZE.
+
+ * m68knetbsd.c: Ditto as well as add support for the m68k4k object
+ format.
+
+ * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
+ segments includes the a.out header. See to that the magic number
+ *always* is big-endian.
+
+ * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
+ m68k4k NetBSD configurations.
+
+ * configure.in, configure: Separate i386 & mips NetBSD
+ configurations from other BSD ones. Don't assume DEC is the only
+ thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
+ configurations. Add support for m68k4k NetBSD object format.
+
+ * libaout.h: Added M_68K4K_NETBSD magic.
+
+ * m68k4knetbsd.c: New file.
+
+ * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
+
+ * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
+ <machine/endian.h>.
+
+ * hosts/mipsnbsd.h: New file.
+
+Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c: Numerous changes to get closer to a working XCOFF
+ linker.
+ * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
+ toc_section, and entry_section fields.
+ (struct xcoff_section_tdata): Remove ldrel_count field.
+ * libcoff.h: Rebuild.
+ * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
+ fields.
+ (coff_compute_section_file_positions): If RS6000COFF_C, generate
+ full a.out header if full_aouthdr is set in xcoff_data.
+ (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
+ based on sections stored in xcoff_data.
+ * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
+ fields.
+ (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
+ (rs6000coff_vec): Set symbol_leading_char to '.'.
+ * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
+ value stored in ret rather than returning a pointer value.
+
+Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
+ format for now.
+
+Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (som_slurp_string_table): Allocate the strings with malloc
+ since they're free'd by free_cached_info.
+ (som_slurp_symbol_table): Similarly for the symbol table.
+
+Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in (diststuff): Don't make headers.
+
+Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Rebuild dependencies.
+
+ * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
+ output_bfd is not SunOS.
+ (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
+ non-SunOS input files.
+
+ * xcofflink.c: Extensive changes to support linking shared objects
+ and generating a .loader section.
+ * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
+ (struct xcoff_section_tdata): Add lineno_count, first_symndx,
+ last_symndx, and ldrel_count fields.
+ * libcoff.h: Rebuild.
+ * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
+ * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
+ is set.
+ * bfd-in.h (bfd_xcoff_import_symbol): Declare.
+ (bfd_xcoff_export_symbol): Declare.
+ (bfd_xcoff_size_dynamic_sections): Declare.
+ * bfd-in2.h: Rebuild.
+
+Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.in: Add xcofflink.o to pmac_xcoff_vec.
+ * configure: Rebuild.
+ * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
+ * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
+ contents.
+ (pmac_xcoff_vec): Update to use new xcoff support.
+ * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
+ (xcoff_write_armap): Declare buf as unsigned char.
+ * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
+
+ * mpw-make.sed: Generalize subdir_do edit.
+
+Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
+
+ * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
+ correctly. Don't initialize asect->vma.
+
+Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
+ something a little less than the page size.
+
+Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
+
+Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coff-i386.c (coff_i386_reloc_type_lookup): New.
+ * coffcode.h (coff_write_object_contents): If .bss is before
+ .data us that as data_start.
+ * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
+ calc correct.
+ * peicode.h (add_data_entry): Use _cooked_size of data directory.
+ (coff_swap_outhdr_out): Hardwire in version number.
+
+Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * sunos.c (sunos_add_dynamic_symbols): Rename local variables
+ major and minor to *_vno, since the former are also macros in
+ SunOS header files. Cast result of bfd_alloc to appropriate
+ type.
+
+ * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
+ before assigning to sec_data.
+
+Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
+ now relative to the section, not absolute.
+ * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
+ get the file name when there is a N_SO directory name. When
+ handling stabs, remember that section->vma was added to the
+ offset.
+
+Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (struct sunos_link_hash_table): Add needed field.
+ (sunos_link_hash_table_create): Call bfd_release, not free.
+ (sunos_link_hash_table_create): Initialize needed field.
+ (sunos_add_dynamic_symbols): Record needed objects.
+ (bfd_sunos_get_needed_list): New function.
+ * bfd-in.h (bfd_sunos_get_needed_list): Declare.
+ * bfd-in2.h: Rebuild.
+
+Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libcoff-in.h (pe_data_type.in_reloc_p): New.
+
+Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd-in.h (struct bfd_link_needed_list): Rename from
+ bfd_elf_link_needed_list.
+ * bfd-in2.h: Rebuild.
+ * elf.c, elflink.h, libelf.h: Corresponding changes.
+
+ Add start at AIX linker support; no shared libraries yet.
+ * xcofflink.c: New file.
+ * configure.in (rs600coff_vec): Use xcofflink.o.
+ * configure: Rebuild.
+ * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
+ fields.
+ (struct xcoff_section_tdata): Define.
+ (xcoff_section_data): Define macro.
+ (_bfd_xcoff_bfd_link_hash_table_create): Declare.
+ (_bfd_xcoff_bfd_link_add_symbols): Declare.
+ (_bfd_xcoff_bfd_final_link): Declare.
+ (_bfd_ppc_xcoff_relocate_section): Declare.
+ * libcoff.h: Rebuild.
+ * coff-rs6000.c: Clean up a bit.
+ (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
+ cputype, csects, and debug_indices.
+ (xcoff_copy_private_bfd_data): Copy cputype.
+ (xcoff_howto_table): Rename from rs6000coff_howto_table.
+ (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
+ (xcoff_reloc_type_lookup): Rename from
+ rs6000coff_reloc_type_lookup.
+ (coff_relocate_section): Define.
+ (_bfd_xcoff_sizeof_headers): Define.
+ (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
+ (_bfd_xcoff_bfd_relax_section): Define.
+ (_bfd_xcoff_bfd_link_split_section): Define.
+ (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
+ coff.
+ * coffcode.h (coff_compute_section_file_positions): If AIX,
+ increment sofar by SMALL_AOUTSZ if not executable.
+ (coff_write_object_contents): If AIX, always output an a.out
+ header; if not executable, header size of SMALL_AOUTSZ.
+ * hash.c (struct bfd_strtab_hash): Add xcoff field.
+ (_bfd_stringtab_init): Initialize xcoff field.
+ (_bfd_xcoff_stringtab_init): New function.
+ (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
+ (_bfd_stringtab_emit): In XCOFF mode, write out length.
+ * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
+ * libbfd.h: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add xcofflink.o.
+ (CFILES): Add xcofflink.c.
+
+ * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
+ SEC_NO_FLAGS, for .acommon section. From Peter Schauer
+ <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
+
+Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
+
+Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
+ * config.in: Regenerated.
+
+ * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
+ (_bfd_chunksize): New variable.
+ (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
+ for obstack chunk size.
+ * configure.in: Check for getpagesize.
+ * configure: Regenerated.
+
+ Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * trad-core.c (rawptr): Make it a local variable of
+ ptrace_unix_core_file_p.
+
+Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coff-arm.c (in_reloc_p): New.
+ * coff-i386.c (in_reloc_p): New.
+ * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
+ (coff_write_object_contents): Only set has_reloc_section
+ if PE_IMAGE.
+ * cofflink.c (_bfd_coff_generic_relocate_section): Call
+ in_reloc_p to decide if reloc should be emitted.
+ * libcoff.h (pe_data_type.in_reloc_p): New.
+ * peicode.h (pe_mkobject): Initialize in_reloc_p.
+
+Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
+ (_bfd_coff_read_internal_relocs): Likewise.
+ * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
+ (_bfd_coff_read_internal_relocs): Likewise.
+
+ * elflink.h (elf_link_add_object_symbols): Correct conditions
+ under which type and size change warnings are issued.
+
+Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_count_linenumbers): Don't count line numbers for
+ a symbol which is not in a real section.
+ (coff_write_native_symbol): Corresponding change.
+
+ * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
+ coff_link_hash_newfunc and make non-static.
+ (_bfd_coff_link_hash_table_init): New function, broken out of
+ _bfd_coff_link_hash_table_create.
+ (_bfd_coff_link_hash_table_create): Use it.
+ (process_embedded_commands): Make static.
+ * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
+ (_bfd_coff_link_hash_table_init): Declare.
+ * libcoff.h: Rebuild.
+
+ * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
+ field in XCOFF tdata.
+ (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
+ U802ROMAGIC, for clarity. Try to set arch and machine correctly
+ based on cputype stored in a.out header, or in n_type of initial
+ .file symbol.
+ (coff_write_object_contents): Set cputype correctly in a.out
+ header.
+ (coff_slurp_symbol_table): Add casts to file_ptr to avoid
+ warnings.
+ * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
+ (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
+ old resv1 field.
+ * libcoff-in.h (struct xcoff_tdata): Add cputype field.
+ * libcoff.h: Rebuild.
+
+ * cpu-rs6000.c (rs6000_compatible): New static function.
+ (bfd_rs6000_arch): Use it.
+ * cpu-powerpc.c (powerpc_compatible): New static function.
+ (arch_info_struct): Define various flavours of PowerPC.
+ (bfd_powerpc_arch): Use powerpc_compatible. Point at
+ arch_info_struct.
+
+Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (FLAGS_TO_PASS): Remove BISON.
+
+Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Don't warn about
+ changing the size or type if the old definition was weak.
+
+Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (combined_entry_type): Add fix_line field.
+ (coff_slurp_line_table): Warn if we try to set the lineno field of
+ a symbol twice.
+ (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
+ C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
+ * coffgen.c (coff_mangle_symbols): Handle fix_line.
+ (coff_write_symbol): Only use N_DEBUG if the symbol is in the
+ absolute section.
+ (coff_print_symbol): Print fix_value symbols in a useful fashion.
+ * libcoff.h: Rebuild.
+
+ * libcoff-in.h (struct xcoff_tdata): Define.
+ (xcoff_data): Define.
+ * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
+ * bfd-in2.h, libcoff.h: Rebuild.
+ * coff-rs6000.c (xcoff_mkobject): New static function.
+ (coff_mkobject): Define.
+ (xcoff_copy_private_bfd_data): New static function.
+ (coff_bfd_copy_private_bfd_data): Define.
+ (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
+ signed to bitfield.
+ (rs6000coff_vec): Add DYNAMIC to object_flags.
+ * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
+ .loader sections specially.
+ (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
+ section alignment from the XCOFF tdata information.
+ (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
+ F_SHROBJ, and copy the extra a.out header information into the
+ XCOFF tdata structure.
+ (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
+ F_DYNLOAD and the extra a.out header information.
+ (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
+ C_HIDEXT symbol with attached csect information.
+ * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
+ in the o_maxdata field.
+ (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
+ * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
+ end if BSF_NOT_AT_END is set.
+
+ * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
+ _bfd_read_ar_hdr_fn.
+ * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
+ return value.
+ (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
+ (bfd_slurp_bsd_armap_f2): Likewise.
+ (_bfd_slurp_extended_name_table): Likewise.
+
+Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
+ when the symbol table is empty.
+
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
+ space for section symbols, since we don't output them either.
+ (elf_m68k_adjust_dynindx): Removed.
+
+ * ptrace-core.c (rawptr): Make it a local variable of
+ ptrace_unix_core_file_p.
+
+Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
+ NULL.
+
+ * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
+ Mac object file formats.
+
+Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_fix_symbol_name): Don't try to set up file
+ auxent if there isn't one.
+ (coff_write_symbols): If there is no file auxent, use SYMNMLEN
+ rather than FILNMLEN as the maximum name length.
+
+ * coffcode.h (bfd_coff_backend_data): Add new field
+ _bfd_coff_print_aux.
+ (bfd_coff_print_aux): New static function.
+ (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
+ scnlen field of an XTY_LD csect aux entry.
+ (coff_print_aux): New static function.
+ (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
+ in coff_pointerize_aux_hook.
+ (bfd_coff_std_swap_table): Initialize new field.
+ * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
+ * libcoff.h: Rebuild.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+
+ * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
+ if there are symbols, for native AIX ld compatibility.
+
+ * coffcode.h (bfd_coff_backend_data): Add new field
+ _bfd_coff_pointerize_aux_hook.
+ (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
+ or I960, and as 0 otherwise.
+ (bfd_coff_std_swap_table): Initialize new field.
+ * libcoff.h: Rebuild.
+ * coffgen.c (coff_pointerize_aux): Change parameters to take
+ symbol pointer instead of type and class, and to take aux index.
+ Call _bfd_coff_pointerize_aux_hook if it is defined.
+ (coff_get_normalized_symtab): Always call coff_pointerize_aux.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+
+ * coff-rs6000.c: Add full support for AIX archives. Rewrite old
+ read-only/host-only support.
+
+ * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
+ BSF_LOCAL.
+ (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
+ RS6000COFF_C.
+
+ * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
+ BFD_JUMP_TABLE_ARCHIVE accordingly.
+ * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
+ (_bfd_compute_and_write_armap): Declare.
+ (_bfd_generic_read_ar_hdr): Declare.
+ (_bfd_read_ar_hdr): Define.
+ (_bfd_noarchive_read_ar_hdr): Define.
+ (_bfd_archive_bsd_read_ar_hdr): Define.
+ (_bfd_archive_coff_read_ar_hdr): Define.
+ * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
+ _bfd_read_ar_hdr instead.
+ (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
+ (_bfd_compute_and_write_armap): Rename from
+ compute_and_write_armap. Make non-static. Change all callers.
+ * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
+ than _bfd_snarf_ar_hdr.
+ * aout-target.h (MY_read_ar_hdr): Define if not defined.
+ * ieee.c (ieee_read_ar_hdr): Define.
+ * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
+ * oasys.c (oasys_read_ar_hdr): Define.
+ * som.c (som_read_ar_hdr): Define.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * peicode.c (coff_swap_filehdr_in): If symptr is
+ zero, there aren't any symbols, even if nsyms is set.
+
+Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * libecoff.h (struct ecoff_backend_data): Add adjust_headers
+ field.
+ * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
+ sections, and set styp correctly for them: .got, .hash, .dynamic,
+ .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
+ (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
+ types.
+ (ecoff_sort_hdrs): New static function.
+ (ecoff_compute_section_file_positions): Return boolean, not void.
+ Sort the sections by VMA before looking through them. Put the
+ first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
+ section on an appropriate boundary within the page.
+ (ecoff_compute_reloc_file_positions): Check return value of
+ ecoff_compute_section_file_positions.
+ (_bfd_ecoff_set_section_contents): Likewise.
+ (_bfd_ecoff_write_object_contents): Check for various Alpha
+ section types when incrementing text_size and data_size. Call
+ adjust_headers backend function if it exists.
+ * coff-alpha.c (alpha_adjust_headers): New static function.
+ (alpha_ecoff_backend_data): Initialize adjust_headers field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+
+ * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
+
+Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
+
+ * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
+ of ALTERNATE_AIX_CORE_FORMAT.
+ * configure.in (aix4): No longer need CORE_FLAGS.
+ * configure: Updated.
+
+Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ NS32k changes from Ian Dall:
+ * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
+ macros.
+ (aout_link_input_section_std, aout_link_input_section_ext,
+ aout_link_reloc_link_order): Call them instead of _bfd_*
+ versions.
+ * aout-target.h (MY_exec_header_not_counted): New macro, defaults
+ to zero.
+ (backend_data): Use it instead of hardcoded zero.
+
+ * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
+ (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
+
+ * ns32knetbsd.c: Include bfd.h.
+ (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
+ (MY_bfd_reloc_type_lookup): Declare function too.
+ * pc532-mach.c (set_sizes): Don't declare.
+ (MY_text_includes_header, MY_exec_header_not_counted): Define.
+ (backend_data, MY_backend_data): Don't define.
+
+ * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
+ ns32k-*-lites* like ns32k-*-netbsd*.
+
+ * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
+ compile on lites.
+
+Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): Restore setting
+ f_timdat to 0, deleted on August 22.
+
+Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coffcode.h (coff_bfd_copy_private_symbol_data,
+ coff_bfd_copy_private_section_data,
+ coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
+ * peicode.h (coff_bfd_copy_private_bfd_data): New
+ (pe_bfd_copy_private_bfd_data): New.
+ (coff_swap_scnhdr_in): Swap bss size into the right place.
+ (pe_print_private_bfd_data): Add some newlines.
+
+Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
+
+ * som.c (setup_sections): Don't die if a space has no subspaces.
+
+Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Don't let a weak
+ dynamic symbol override a common symbol. Don't change the size or
+ type if they have been set and the new symbol is not a definition.
+ Warn if the size or type changes.
+
+Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
+
+ * som.c (som_begin_writing): Don't write the symbol table or
+ symbol strings.
+ (som_finish_writing): Write them here. Place them after the
+ subspace data, but before the relocs.
+
+Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_add_one_symbol): Just pass false, not
+ info->shared_library, to sunos_create_dynamic_sections.
+ (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
+ section.
+ (sunos_check_dynamic_reloc): Remove .text section assertion.
+
+Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
+ * configure, configure.in: Add pmac_xcoff_vec case.
+ * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
+ * coff-pmac.c: New file, PowerMac XCOFF support.
+ * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
+ * targets.c (pmac_xcoff_vec): Declare.
+
+ * mpw-config.in: Various changes to be compatible with the
+ autoconf-based configury.
+ * mpw-make.sed: New file, sed commands to translate Unix
+ makefile into MPW syntax.
+ * mpw-make.in: Remove.
+ * hosts/mpw.h: Remove.
+ * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
+ true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
+
+Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * binary.c (binary_get_symtab): Return an empty string on error.
+ * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
+
+Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
+
+ * coff-ppc.c: Reformatted according to gnu conventions
+ Removed irrelevant "if 0" code
+
+Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
+ symbols rather than as indirect symbols.
+ (MY(slurp_symbol_table)): Don't do anything special about
+ secondary symbols.
+
+ * coffcode.h (coff_new_section_hook): Make sure that the alignment
+ of .ctors and .dtors sections is no larger than 2.
+
+ * sunos.c (sunos_add_one_symbol): Don't change
+ bfd_link_hash_common to bfd_link_hash_new, since it may be on the
+ undef list.
+ (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
+ dynamic symbols when creating a shared library.
+ (sunos_scan_ext_relocs): Handle relocs correctly when creating a
+ shared library.
+ (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
+ written even if it is not defined in a regular object.
+ (sunos_write_dynamic_symbol): Use plt_offset for the address of
+ the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
+ rather than the constant 22.
+ (sunos_check_dynamic_reloc): Handle creating a shared library.
+ (sunos_finish_dynamic_link): Set the first entry in the GOT to
+ zero when creating a shared library.
+ * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
+ write it out at the start of the symbol table.
+
+ * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
+
+Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * config.bfd: Add arm-*-coff.
+ * configure.in, configure: Add armcoff_{little,big}_vec.
+ * targets.c (armcoff_{little,big}_vec): Declare.
+ (bfd_target_vector): Add armcoff_{little,big}_vec.
+ * coff-arm.c (armcoff_{little,big}_vec): Always define.
+
+Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * targets.c (bfd_find_target): Remove debugging code.
+
+Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
+
+ * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
+ support on powerpc.
+ * Makefile.in: added *-ppc files
+ * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
+ allow pe based .o's to be shared with other tools on ppc/NT
+ * config.bfd: added powerpc[le]-[pe|winnt] config support
+ * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
+ * peicode.h: Added more section flags for PE on ppc
+ Added coff_swap_filehdr_out to allow peicode.h to be
+ used for non-image PE files on ppc.
+ Check for image, or not, before copying pe_opthdr
+ * targets.c: Added new bfd's
+ * targets.c: Removed two inactive bfds that shouldn't have made it this
+ far.
+
+Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
+ explicit values to initialize all relocs. Change all users.
+ (ppc_elf_brtaken_inner): New function to handle branch predicition
+ relocs.
+ (ppc_elf_brtaken_reloc): Ditto.
+ (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
+ relocs use ppc_elf_unsupported_reloc.
+ (ppc_elf_merge_private_bfd_data): Keep track of whether an error
+ needs to be reported.
+ (ppc_elf_relocate_section): Support branch prediction relocs.
+
+Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd.c (bfd_assert): Remove \n from string passed to
+ _bfd_error_handler.
+
+ * coff-i386.c: (TWO_DATA_SECS): Don't define.
+ * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
+ (bfd_coff_make_section_hook): Don't define.
+ (coff_make_section_hook): Remove.
+ (sec_to_styp_flags): Remove TWO_DATA_SECS case.
+ (styp_to_sec_flags): Likewise.
+ (coff_write_object_contents): Likewise.
+ (bfd_coff_std_swap_table): Don't initialize make_section_hook
+ field.
+ * libcoff.h: Rebuild.
+ * coffgen.c (make_a_section_from_file): Just call
+ bfd_make_section_anyway, not bfd_make_section or
+ bfd_coff_make_section_hook.
+ * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
+ * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
+ * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
+ make_section_hook field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+
+ * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
+ pointers into value field for warning and indirect symbols; just
+ leave the value field alone.
+ * linker.c (generic_link_add_symbol_list): Use next symbol for
+ warning and indirect symbols, rather than looking in symbol value.
+ * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
+ parameter. Change all callers. Remove support for indirect
+ symbols; it didn't work anyhow.
+ (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
+ * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
+ * bfd-in2.h: Rebuild.
+
+Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
+ go back to telling the tools this reloc operates on 32 bits.
+
+Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
+ rather than a direct fprintf.
+ * archive.c (_bfd_write_archive_contents): Likewise.
+ * coffcode.h (coff_slurp_symbol_table): Likewise.
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
+ (ppc_elf_unsupported_reloc): Likewise.
+ (ppc_elf_relocate_section): Likewise.
+ * i386linux.c (linux_tally_symbols): Likewise.
+ (linux_finish_dynamic_link): Likewise.
+ * osf-core.c (osf_core_core_file_p): Likewise.
+ * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
+ * som.c (som_sizeof_headers): Likewise.
+ * srec.c (srec_bad_byte): Likewise.
+ * bfd.c (bfd_assert): Likewise. Also change file to be const.
+ * libbfd-in.h (bfd_assert): Declare first parameter const.
+ * libbfd.h: Rebuild.
+ * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
+ bfd_reloc_overflow is enough.
+ * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
+ * coff-h8500.c (rtype2howto): Likewise.
+ * coff-z8k.c (rtype2howto): Likewise.
+ * coffcode.h (dummy_reloc16_extra_cases): Likewise.
+ * elf.c (_bfd_elf_get_lineno): Likewise.
+ (_bfd_elf_no_info_to_howto): Likewise.
+ (_bfd_elf_no_info_to_howto_rel): Likewise.
+ * hp300hpux.c (convert_sym_type): Likewise.
+ (MY(swap_std_reloc_in)): Likewise.
+ * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
+
+ * libaout.h (struct aoutdata): Add line_buf field.
+ * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
+ and filename_buffer. Instead, use a malloc buffer stored in the
+ new line_buf field. Remove length restrictions.
+
+ * coffgen.c (string_size): Remove static variable.
+ (debug_string_size, debug_string_section): Likewise.
+ (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
+ and debug_string_size_p parameters. Use them instead of the
+ global variables. Change all callers.
+ (coff_write_symbol): Likewise.
+ (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
+ (coff_write_symbols): Add local variables to replace removed
+ global variables.
+
+ * libcoff-in.h (struct coff_section_tdata): Add offset, i,
+ function, and line_base fields.
+ * libcoff.h: Rebuild.
+ * coffgen.c (coff_find_nearest_line): Use section tdata to cache
+ information, rather than using static variables.
+
+ * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
+ file. From Peter DeWolf <pld@amt.tay1.dec.com>.
+
+ * init.c (initialized): Remove static variable.
+ (bfd_init): Don't bother setting initialized.
+ (bfd_check_init): Remove.
+ * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
+ * libbfd.h: Rebuild.
+
+Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-core.c (rs6000coff_core_p): Don't check the core file
+ size for full core dumps. Copy core file header to private data.
+ (rs6000coff_core_file_failing_command,
+ rs6000coff_core_file_failing_signal): New functions to extract
+ the file name and terminating signal from the core file.
+ * coff-rs6000.c: Use them.
+
+Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Change arch info to be const, initialized at compile time.
+ * archures.c: Reindent many functions. Change CONST to const.
+ (bfd_arch_info_type): Make arch_name const. Remove disassemble;
+ nothing set it anyhow. Make next const.
+ (bfd_arch_info_list): Remove.
+ (bfd_archures_list): Rename from archures_init_table. Change from
+ a table of function pointers to a table of bfd_arch_info_type
+ structure addresses.
+ (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
+ (bfd_lookup_arch): Likewise.
+ (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
+ const pointer.
+ (bfd_default_arch_struct): Make const.
+ (bfd_arch_init, bfd_arch_linkin): Remove.
+ (bfd_get_arch_info): Return a const pointer.
+ * init.c (bfd_init): Don't call bfd_arch_init.
+ * bfd.c (struct _bfd): Make arch_info const.
+ * bfd-in2.h: Rebuild.
+ * libbfd.h: Rebuild.
+ * configure.in: Put & before everything in $selarchs.
+ * configure: Rebuild.
+ * cpu-*.c: Change bfd_*_arch from a function which calls
+ bfd_arch_linkin to a const structure.
+ * ieee.c (ieee_object_p): Make arch const.
+
+Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * reloc.c (bfd_reloc_code_type): Add relocations to support all of
+ PowerPC V.4.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+ * elf32-ppc.c (reloc_type): Update names to match current draft.
+ (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
+ relative. Update names to current V.4 draft.
+ (ppc_elf_reloc_type_lookup): Add support for more relocations.
+ (ppc_elf_relocate_section): Rename relocations to match draft.
+
+Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
+ compiled with -mrelocatable-lib to be linked with either normal
+ modules or -mrelocatable modules.
+
+Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): Clear the vstamp field
+ in the a.out header.
+
+ * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
+ a reloc against a local symbol, even if it's not a section.
+
+Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * targets.c (bfd_target): Remove unused align_power_min field.
+ * bfd-in2.h: Rebuild.
+ * All backends: Remove initialization of align_power_min.
+
+Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
+
+Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
+
+ * config.bfd (mips-dec-netbsd*): New target.
+ * configure.host (mips-dec-netbsd*): New host.
+ * configure.in (mips-dec-netbsd*): New native.
+ * configure: Rebuild.
+
+Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Make the COFF backend linker merge common types:
+ * cofflink.c (struct coff_debug_merge_element): Define.
+ (struct coff_debug_merge_type): Define.
+ (struct coff_debug_merge_hash_entry): Define.
+ (struct coff_debug_merge_hash_table): Define.
+ (coff_debug_merge_hash_table_init): Define.
+ (coff_debug_merge_hash_table_free): Define.
+ (coff_debug_merge_hash_lookup): Define.
+ (struct coff_final_link_info): Add debug_merge field.
+ (coff_debug_merge_hash_newfunc): New static function.
+ (_bfd_coff_final_link): Allocate and free debug_merge table.
+ (coff_link_input_bfd): Merge identical enum, struct and union
+ types.
+
+Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Convert i960 COFF to use COFF backend linker.
+ * coff-i960.c (coff_i960_relocate): Use a coff_section_data
+ structure to store the symbol being used.
+ (coff_i960_start_final_link): New static function.
+ (coff_i960_relocate_section): New static function.
+ (coff_i960_adjust_symndx): New static function.
+ (coff_start_final_link): Define.
+ (coff_relocate_section): Define.
+ (coff_adjust_symndx): Define.
+ * coffcode.h (bfd_coff_backend_data): Add new callback function
+ _bfd_coff_start_final_link.
+ (bfd_coff_start_final_link): Define.
+ (coff_start_final_link): Define if not defined.
+ (bfd_coff_std_swap_table): Add coff_start_final_link.
+ * cofflink.c (_bfd_coff_internal_syment_name): Make globally
+ visible.
+ (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
+ function callback is not NULL.
+ * libcoff-in.h (struct coff_section_tdata): Add tdata field.
+ (_bfd_coff_internal_syment_name): Declare.
+ * libcoff.h: Rebuild.
+ * configure.in (icoff_big_vec): Add cofflink.o.
+ (icoff_little_vec): Likewise.
+ * configure: Rebuild.
+
+Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
+
+ * Makefile.in (clean-info): Remove extraneous tab from line
+ following action.
+
+Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (coff_link_input_bfd): Fail if a section with no
+ contents has relocs.
+
+Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coffcode.h (coff_compute_section_file_positions): Keep the
+ raw size safe.
+ (coff_write_object_contents): Remember if it's a relocatable
+ file.
+ * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
+ * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
+ if relocatable file. Swap out saved raw size.
+
+Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (do_maintainer_clean): Rename from do_realclean.
+ (maintainer-clean): Rename from realclean, passing
+ maintainer-clean down to subdirectories, but leave realclean as a
+ synonym.
+
+ * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
+ warning callback.
+
+ * dep-in.sed: Remove config.h from generated dependencies.
+
+ * sunos.c (sunos_slurp_dynamic_symtab): New static function,
+ broken out of sunos_canonicalize_dynamic_symtab.
+ (sunos_canonicalize_dynamic_symtab): Call new function
+ sunos_slurp_dynamic_symtab.
+ (sunos_add_dynamic_symbols): Add three new parameters. Return the
+ dynamic symbol table to the caller.
+ * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
+ callback to override the symbols being read.
+ * libaout.h (struct aout_backend_data): Add three new parameters
+ to add_dynamic_symbols callback.
+
+ Extensive minor changes to avoid various gcc warnings. Also:
+ * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
+ * archures.c (bfd_arch_info_type): Change mach field from long to
+ unsigned long.
+ (bfd_lookup_arch): Change machine parameter from long to unsigned
+ long.
+
+Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
+ a symbol with a non-zero plt_offset.
+
+Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (align_file_position): Remove; not used.
+
+ * configure.in: Only check for <sys/procfs.h> on a native system,
+ and make sure it defines prstatus_t.
+ * configure: Rebuild.
+
+Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
+
+ * 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 (do_distclean): Remove config.h and stamp-h.
+ (Makefile): Just rebuild Makefile.
+ (config.h, stamp-h): New targets.
+ * configure.in: Create stamp-h when rebuilding config.h.
+ * configure: Rebuild.
+
+Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Call AC_CONFIG_HEADER. Substitute
+ HOST_64BIT_LONG. Check that various header files exist. Check
+ that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
+ and/or free need to be declared. Don't make a link to sysdep.h.
+ Define TRAD_HEADER for various hosts.
+ * configure: Rebuild.
+ * configure.host: Don't set my_host. Add definitions taken from
+ host header files for various entries. Remove entries which now
+ do nothing.
+ * acconfig.h: New file.
+ * config.h.in: New file, built by autoheader.
+ * sysdep.h: New file.
+ * Makefile.in (do_distclean): Don't remove sysdep.h.
+ (RECONFIG): Remove.
+ (LOCAL_H_DEPS): New variable.
+ ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
+ $(RECONFIG).
+ ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
+ ($(OPTIONAL_BACKENDS)): Likewise.
+ (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
+ looking through sysdep.h.
+ * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
+ (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
+ (fprintf_vma, sprintf_vma): Likewise.
+ (int64_type, uint64_type): Don't define.
+ * bfd-in2.h: Rebuild.
+ * archures.c, bfd.c, srec.c: Include <ctype.h>.
+ * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
+ * lynx-core.c: Include stuff from old hosts/lynx.h.
+ * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
+ rather than NO_FCNTL.
+ * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
+ rather than NATIVE_HPPAHPUX_COMPILER.
+ * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
+ is defined.
+ * hosts/*.h: Remove all header files which merely include,
+ declare, and define things. Leave header files which define
+ information needed by trad-core.c.
+
+ * aclocal.m4 (BFD_BINARY_FOPEN): Define.
+ (BFD_CC_FOR_BUILD): Define.
+ * configure.in: Use BFD_CC_FOR_BUILD.
+ * configure: Rebuild.
+
+Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
+ * configure: Rebuild.
+
+ * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
+ a global symbol.
+
+Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * config.bfd: i386pe_ve -> i386pe_vec.
+
+Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Incorporate host Makefile fragments by setting
+ shell variables.
+ * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
+ AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
+ value based on whether the code is being compiled by a cross
+ compiler. Don't substitute host_makefile_frag or frags.
+ * aclocal.m4: New file to define local AC_PROG_CC.
+ * configure: Rebuild.
+ * Makefile.in (INSTALL): Set to @INSTALL@.
+ (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
+ (INSTALL_DATA): Set to @INSTALL_DATA@.
+ (AR): Set to @AR@.
+ (CC): Define as @CC@.
+ (CFLAGS): Set to @CFLAGS@.
+ (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
+ (@host_makefile_frag@): Remove.
+ (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
+ after other options.
+ (config.status): Remove dependency upon @frags@.
+ * config/*.mh, config/README: Remove.
+
+ * config.bfd: Rewrite to incorporate the contents of the Makefile
+ fragments by setting shell variables, rather than merely returning
+ the name of a Makefile fragment.
+ * configure.in: Use shell variables set by config.bfd rather than
+ looking at the target Makefile fragment files. Don't substitute
+ target_makefile_frag. Do substitute TDEFINES.
+ * configure: Rebuild.
+ * Makefile.in (@target_makefile_frag@): Remove.
+ (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
+ * config/*.mt: Remove.
+
+Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * configure.in: Put changequote lines around "i[345]86" patterns
+ section of core file support.
+
+Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_print_private_bfd_data): Define to use the
+ generic version.
+
+Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
+ entry, text_start and data_start.
+
+Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (OFILES): Remove $(TDEPFILES).
+ * config/apollo.mt (TDEPFILES): Remove.
+ * config/README: Update.
+
+ * configure.in: For a native configuration, set COREFILE and
+ COREFLAG based on the canonical host name.
+ * configure: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (ALL_CFLAGS): Add @COREFLAG@.
+ (OFILES): Replace $(HDEPFILES) with @COREFILE@.
+ * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
+ support routines. Check LYNX_CORE rather than HOST_LYNX.
+ * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
+ * i386lynx.c: Likewise.
+ * m68klynx.c: Likewise.
+ * sparclynx.c: Likewise.
+ * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
+ * *-core.c: Comment changes.
+ * config/decstation.mh (HDEPFILES): Remove.
+ (HDEFINES): Remove -DTRAD_CORE.
+ * config/irix3.mh (RANLIB): Remove.
+ * config/irix4.mh (HDEPFILES, RANLIB): Remove.
+ (HDEFINES): Remove -DIRIX_CORE.
+ * config/riscos.mh (RANLIB, HDEPFILES): Remove.
+ (HDEFINES): Remove -DTRAD_CORE.
+ * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
+ * config/ultra3.mh (RANLIB): Remove.
+ * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
+ * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
+ * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
+ * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
+ * config/hppahpux.mh, config/hppaosf.mh: Remove.
+ * config/i386aix.mh, config/i386bsd.mh: Remove.
+ * config/i386linux.mh, config/i386mach3.mh: Remove.
+ * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
+ * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
+ * config/mipsmach3.mh, config/news-mips.mh: Remove.
+ * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
+ * config/rs600.mh, config/rs6000lynx.mh: Remove.
+ * config/solaris2.mh, config/stratus.mh: Remove.
+ * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
+ * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
+
+Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
+
+ * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
+ DT_FINI entry if the appropriate symbol is not in the hash table.
+
+ * libelf.h (struct elf_backend_data): Add create_program_headers
+ and want_hdr_in_seg fields.
+ * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
+ defined.
+ (elf_backend_create_program_headers): Likewise.
+ (elfNN_bed): Initialize create_program_headers and
+ want_hdr_in_seg.
+ * elf.c (get_program_header_size): Call create_program_headers
+ backend routine.
+ (map_program_segments): Check want_hdr_in_seg backend field. Call
+ create_program_headers backend routine.
+
+ * elf.c (assign_file_positions_except_relocs): Align non allocated
+ sections when creating an executable.
+
+ * elfcode.h (elf_swap_phdr_in): Make non static.
+ (elf_swap_phdr_out): Make non static.
+ * libelf.h (bfd_elf32_swap_phdr_in): Declare.
+ (bfd_elf32_swap_phdr_out): Declare.
+ (bfd_elf64_swap_phdr_in): Declare.
+ (bfd_elf64_swap_phdr_out): Declare.
+
+ * ecofflink.c (ecoff_collect_shuffle): New static function.
+ (_bfd_ecoff_get_accumulated_pdr): New function.
+ (_bfd_ecoff_get_accumulated_sym): New function.
+ (_bfd_ecoff_get_accumulated_ss): New function.
+ * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
+ (_bfd_ecoff_get_accumulated_sym): Declare.
+ (_bfd_ecoff_get_accumulated_ss): Declare.
+ * libbfd.h: Rebuild.
+
+Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
+
+ * elflink.h (elf_link_add_object_symbols): Handle indirect and
+ warning symbols. If any section is named .gnu.warning.XXX, treat
+ the contents as a warning to be issued if the symbol XXX is
+ referenced.
+ (elf_link_output_extsym): For an indirect or warning symbol, just
+ output the symbol it points to.
+
+ * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
+ if bfd_hash_allocate fails, since it will already be set.
+ (generic_link_hash_newfunc): Likewise.
+ (archive_hash_newfunc): Likewise.
+ (hash_entry_bfd): New static function.
+ (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
+ callback. Allocate a new warning using the hash table newfunc.
+ Use bfd_hash_replace to update the entry in the hash table, rather
+ than assuming we can copy the fields with structure assignment.
+
+ * hash.c (bfd_hash_replace): New function.
+ * bfd-in.h (bfd_hash_replace): Declare.
+ * bfd-in2.h: Rebuild.
+
+Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
+
+ * config.bfd: Add mips*vr4300-*-elf* target.
+ * config/mipsbvr4300.mt: Added.
+
+Thu Aug 31 16:00:53 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in: Update dependencies.
+ * aout-target.h (MY_bfd_print_private_bfd_data): New.
+ * bfd-in.h (PE STUFF): Deleted.
+ * bfd.c (tdata->pe_obj_data): New.
+ (bfd_print_private_bfd_data): New.
+ * coff-i386.c, coff-arm.c (coff_*-rtype_to_howto): Get image base from
+ new place.
+ * libcoff.h, libbfd.h, bfd-in2.h: Rebuilt.
+ * coffcode.h (pe_value): Delete
+ (coff_mkobject, coff_mkobject_hook): Conditionally build.
+ (coff_compute_section_file_positions): Look in new place.
+ (add_data_entry, fill_pe_header_info): Deleted.
+ (coff_write_object_contents): Remove PE stuff.
+ (coff_bfd_print_private_bfd_data): New.
+ * coffswap.h: Remove PE stuff.
+ * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): New.
+ * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): New.
+ * libcoff-in.h (pe_data_type): New.
+ * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): New.
+ * targets.c (_bfd_print_private_bfd_data): New.
+ * peicode.h: New file.
+
+Thu Aug 31 11:49:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd-in.h: Add extern "C" if __cplusplus.
+ * bfd-in2.h: Rebuild.
+
+ * coff-mips.c (mips_relocate_section): Don't convert a reloc
+ against an absolute symbol into a reloc against a section.
+
+Thu Aug 31 08:00:14 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coff-arm.c (coff_arm_reloc): Fix common size problem.
+ (i3coff_object_p): Delete.
+
+Wed Aug 30 20:41:27 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coff-arm.c (deletemeacoff_arm_reloc): Deleted.
+ (arm26): Not partial inplace.
+ * coffcode.h (coff_compute_section_file_positions): Don't
+ do page aligning if COFF_PAGE_SIZE isn't defined.
+ * coffswap.h (coff_swap_scnhdr_in): Update image base correctly.
+
+Tue Aug 29 13:50:21 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * coffcode.h (coff_compute_section_file_positions):
+ Compile even if COFF_PAGE_SIZE isn't defined.
+ * cofflink.c (_bfd_coff_generate_reloc_section): Write
+ base file info as rvas.
+ * coff-arm.c (coff_rtype_to_howto): Deal with reloc 11.
+ * coffcode.h (coff_write_object_contents): Remove #if0ed code
+ Only remove empty sections in PE inmage files.
+ * libbfd.h, bfd-in2.h: regenerated.
+ * coff-arm.c (aoutarm_std_relo): New entry at 11.
+ (arm_reloc_type_lookup) : Understand type 11.
+ * coff-i386.c (howto_table): fix name of rva type.
+ (coff-i386_rtype_to_howto): Understand R_IMAGEBASE type.
+ * coffcode.h (sec_to_styp_flags): .edata is data.
+ (coff_compute_section_file_positions): Get page size right for PE.
+ Pagesize info is only valid in PE image files.
+ (fill_pe_header_info): Fix fields.
+ (coff_write_object_contents): Remove end_of_image calc.
+ (_bfd_coff_generate_reloc_section): Remove orphaned comment.
+ * coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
+ Swap in PE header.
+ (coff_swap_scnhdr_out): Setup PE flags correctly.
+ * reloc.c (BFD_RELOC_RVA): New field.
+
+Thu Aug 24 17:49:59 1995 Ian Lance Taylor (ian@cygnus.com)
+
+ * cofflink.c (coff_link_input_bfd): Don't include line numbers for
+ a section if its output section has no contents.
+
+Wed Aug 23 16:48:52 1995 Ian Lance Taylor (ian@cygnus.com)
+
+ * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Add parentheses to FIX
+ expression to avoid compiler bug on HP-UX 9.01.
+
+Wed Aug 23 09:49:39 1995 Steve Chamberlain <sac@rtl.cygnus.com>
+
+ * coffcode.h (pe_value): Unansify.
+
+Mon Aug 21 17:49:28 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * bfd-in.h (bfd_link_subsystem): Turn enum into #defines.
+ (bfd_link_pe_info_dval): New
+ (bfd_link_stack_heap): Renamed and massaged into bfd_link_pe_info.
+ * bfd-in2.h: rebuilt.
+ * bfd.c (NT_subsystem, NT_stack_heap): Deleted.
+ * coffcode.h (pe_value): New function.
+ (fill_pe_header_info): New function.
+ (coff_write_object_contents): Use new function.
+ (coff_write_object_contents): Initialze link_data if not set.
+ * cofflink.c (coff_final_link_info): Remove pe randomness.
+ (dores_com): Update info in bfd_link_pe_info_dval.
+ (process_embedded_commands): Use the bfd_link_pe_info_dval.
+ (_bfd_coff_final_link): Remove PE stuff, initialize
+ coff_data->link_info.
+ * coffswap.h (coff_swap_[aout|filehdr]_out): Use indirect PE pointer.
+ (coff_swap_scnhdr_out): Use real imagebase.
+ * libcoff-in.h (coff_data_type.link_info): New field.
+
+Mon Aug 21 11:10:32 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (link_action): If an undefined reference follows an
+ undefined weak reference, change the type to undefined.
+ * elflink.h (elf_link_add_archive_symbols): Don't record an
+ undefined weak reference as defined, in case it turns into a real
+ undefined reference later in the same archive.
+
+Thu Aug 17 16:29:09 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * coff-sh.c (sh_relax_section): Cast value for used_by_bfd field
+ to PTR, not coff_section_tdata pointer, since PTR is the real type
+ of the field.
+ * cofflink.c (_bfd_coff_read_internal_relocs): Ditto.
+
+Thu Aug 17 14:44:26 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Add support for linking SPARC SunOS PIC compiled code.
+ * sunos.c (SPARC_PLT_PIC_WORD0): Define.
+ (SPARC_PLT_PIC_WORD1, SPARC_PLT_PIC_WORD2): Define.
+ (struct sunos_link_hash_entry): Add got_offset and plt_offset
+ fields.
+ (struct sunos_link_hash_table): Add dynamic_sections_created and
+ dynamic_sections_needed fields.
+ (sunos_link_hash_newfunc): Initialize new fields.
+ (sunos_link_hash_table_create): Initialize new fields.
+ (sunos_create_dynamic_sections): New static function, broken out
+ of sunos_add_dynamic_symbols.
+ (sunos_add_dynamic_symbols): Call sunos_create_dynamic_sections.
+ (sunos_add_one_symbol): Call sunos_create_dynamic_sections.
+ (bfd_sunos_size_dynamic_sections): Call sunos_scan_relocs before
+ checking whether we need to set up the dynamic link information.
+ Define __GLOBAL_OFFSET_TABLE if anything referred to it.
+ (sunos_scan_std_relocs): Call sunos_create_dynamic_sections. Use
+ plt_offset field; only put symbol in .plt if it is not defined by
+ a regular object.
+ (sunos_scan_ext_relocs): Likewise. Handle base relative relocs.
+ (sunos_scan_dynamic_symbol): Store dynobj in local variable.
+ (sunos_write_dynamic_symbol): Check plt_offset rather than
+ checking whether symbol is in .plt section. If symbol is defined
+ in a regular object file, use SPARC_PLT_PIC_WORD[012], and don't
+ add a JMP_TBL reloc.
+ (sunos_check_dynamic_reloc): Add contents and relocationp fields.
+ If plt_offset is set, redirect relocation to PLT. If this is a
+ base relative reloc, redirect relocation to GOT. Check
+ dynamic_sections_needed field rather than whether dynobj is set.
+ (sunos_finish_dynamic_link): Check dynamic_sections_needed field
+ rather than whether dynobj is set. Don't die if .need and .rules
+ sections were not created.
+ * aoutx.h (howto_table_ext): Mark PC10, PC22, and JMP_TBL entries
+ PC relative. Mark PC10 complain_overflow_dont. Mark PC22 and
+ JMP_TBL complain_overflow_signed.
+ (NAME(aout,final_link)): If info->shared is set, set DYNAMIC.
+ (aout_link_input_section_std): Call check_dynamic_reloc for all
+ relocs. Pass contents and &relocation. Don't warn about an
+ undefined symbol until check_dynamic_reloc has been called. Don't
+ warn about an undefined symbol for a base relative reloc.
+ (aout_link_input_section_ext): Likewise. For a base relative
+ reloc, always treat r_index as an index into the symbol table.
+ * libaout.h (struct aout_backend_data): Add contents and
+ relocation argument to check_dynamic_reloc entry point.
+ (struct aoutdata): Add local_got_offsets field.
+
+Wed Aug 16 01:03:07 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_check_relocs): Fix bug in last change.
+
+Mon Aug 14 11:39:24 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,machine_type)): Handle a machine of
+ bfd_mach_sparc or bfd_mach_sparc64.
+
+ * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
+ definition, add it to the dynamic symbol table if any dynamic
+ object mentions it. If we do add it, make sure we add the
+ corresponding real symbol.
+ (elf_adjust_dynamic_symbol): Adjust a weak defined symbol which we
+ put in the dynamic symbol table, even if no regular object refers
+ to it.
+ * elf32-i386.c (elf_i386_check_relocs): When creating a shared
+ library, don't allocate space for a PC relative reloc against a
+ local symbol.
+ * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Change assertion
+ to accept symbol with weakdef set.
+ * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): When creating a shared
+ libary, don't copy over a PC relative reloc against a local
+ symbol.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+Sun Aug 13 00:40:58 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.h (R_HPPA_BEGIN_BRTAB): Define.
+ (R_HPPA_END_BRTAB): Likewise.
+ * som.c (som_write_fixups): Handle R_BEGIN_BRTAB and R_END_BRTAB.
+
+Thu Aug 10 15:53:29 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffswap.h (coff_swap_aux_in): Swap the array dimensions
+ whenever x_fcnary is not being used for something else, rather
+ than only for an array.
+ (coff_swap_aux_out): Likewise.
+
+Tue Aug 8 16:34:57 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Remove most
+ of special case stuff for PE. Now handled by relocs.
+ * coff-i386.c (coff_i386_reloc): Special case of PE type 7s.
+ (howto_table): Type 7 is dir32-rva.
+
+Tue Aug 8 10:15:43 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * configure.host: Recognize aix4 explicitly.
+ * rs6000-core.c (CORE_DATA_SIZE_FIELD): New macro to get a the size
+ of a core dump's data section. Provide alternate definition for aix4.
+ (SAVE_FIELD): Similarly for save state field (register info).
+ (STACK_END_ADDR): Provide definition suitable for aix4.
+ * config/{aix4.mh,aix4.mt}: New configuration files.
+ * hosts/aix4.h: Likewise.
+
+Mon Aug 7 23:03:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * som.c (som_bfd_copy_private_symbol_data): Cast initializations
+ to avoid warnings.
+
+Mon Aug 7 14:51:08 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_decode_symclass): Handle absolute symbols by checking
+ the SOM type (since they will rarely if ever be in the absolute
+ section).
+
+Wed Aug 6 09:12:50 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * archures.c (bfd_mach_sparc, bfd_mach_sparc64): Define.
+ * bfd-in2.h: Regenerated.
+ * cpu-sparc.c (sparc_arch_info): Renamed from arch_info_struct.
+ (sparc64_arch_info): New static variable.
+ (bfd_sparc_arch): Link in sparc64_arch_info.
+ * elf64-sparc.c (sparc64_elf_xxx): Renamed from elf64_xxx.
+ (sparc64_elf_object_p): New static function.
+ (elf_backend_object_p): Define.
+ * config/sparc64-elf.mt (SELECT_VECS): Add bfd_elf32_sparc_vec.
+
+Sat Aug 5 00:04:08 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som (som_get_reloc_upper_bound): Return -1 on error. Compute
+ return value with sizeof (arelent *), not sizeof (arelent).
+
+Wed Aug 2 12:32:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (bfd_section_from_shdr): If the section pointed to by the
+ sh_link field of a reloc section is not a symbol table, and the
+ file contains a single symbol table, clobber the sh_link field of
+ the reloc section to point to the symbol table.
+
+Tue Aug 1 10:09:01 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * coff-arm.c (howto reloc ARM26): Change size from 3 to 2.
+ (howto reloc ARM26D): Likewise.
+
+Mon Jul 24 14:17:50 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Use the line just before
+ the offset, not the one just after. Break out of the loop after
+ finding a function past the offset, not merely when finding a
+ function with a line defined.
+
+ * ecofflink.c (_bfd_ecoff_locate_line): When handling stabs:
+ correct setting of sym_ptr_end to consider symbols skipped when
+ setting sym_ptr; don't leave loop early unless an N_FUN is found
+ with a larger value.
+
+ * coff-sh.c (sh_coff_howtos): Mark R_SH_PCDISP8BY2 and R_SH_PCDISP
+ as PC relative. Describe R_SH_IMM16. Add entries for
+ R_SH_SWITCH16, R_SH_SWITCH32, R_SH_USES, R_SH_COUNT, and
+ R_SH_ALIGN.
+ (SWAP_IN_RELOC_OFFSET): Define.
+ (SWAP_OUT_RELOC_OFFSET): Define.
+ (CALC_ADDEND): Define.
+ (sh_reloc): Change sym_value and addr to type bfd_vma. Skip reloc
+ types other than R_SH_IMM32 and R_SH_PCDISP on an external symbol.
+ (coff_bfd_relax_section): Define.
+ (coff_bfd_get_relocated_section_contents): Define.
+ (sh_relax_section): New static function.
+ (sh_relax_delete_bytes): New static function.
+ (sh_relocate_section): Handle R_SH_PCDISP on an external symbol.
+ (sh_coff_get_relocated_section_contents): New static function.
+
+ * cofflink.c (coff_link_add_object_symbols): Call
+ _bfd_coff_get_external_symbols, not coff_link_get_symbols. Call
+ _bfd_coff_free_symbols, not coff_link_free_symbols. Call
+ _bfd_coff_read_string_table, not coff_read_string_table.
+ (coff_link_check_archive_element): Likewise.
+ (coff_link_input_bfd): Likewise.
+ (coff_link_get_symbols): Move to coffgen.c.
+ (coff_read_string_table): Likewise.
+ (coff_link_free_symbols): Likewise.
+ (_bfd_coff_internal_syment_name): New static function.
+ (coff_link_check_ar_symbols): Use _bfd_coff_internal_syment_name.
+ (coff_link_add_symbols): Likewise.
+ (coff_link_input_bfd): Likewise.
+ (_bfd_coff_generic_relocate_section): Likewise.
+ (_bfd_coff_read_internal_relocs): New function.
+ (coff_link_input_bfd): Use cached section contents if available.
+ Use _bfd_coff_read_internal_relocs.
+ * coffcode.h (coff_slurp_symbol_table): Don't call bfd_seek.
+ (coff_bfd_get_relocated_section_contents): Only define if not
+ already defined.
+ (coff_bfd_relax_section): Likewise.
+ * coffgen.c (build_string_table): Remove.
+ (_bfd_coff_get_external_symbols): New function, moved in from old
+ coff_link_get_symbols in cofflink.c.
+ (_bfd_coff_read_string_table): New function, moved in from old
+ coff_read_string_table in cofflink.c.
+ (_bfd_coff_free_symbols): New function, moved in frmo old
+ coff_link_free_symbols in cofflink.c.
+ (coff_get_normalized_symtab): Use _bfd_coff_get_external_symbols
+ rather than reading the symbols directly. To free them, call
+ _bfd_coff_free_symbols. Use _bfd_coff_read_string_table rather
+ than build_string_table.
+ * libcoff-in.h (obj_coff_keep_syms): Define.
+ (obj_coff_keep_strings): Define.
+ (coff_data_type): Add fields keep_syms and keep_strings.
+ (coff_section_tdata): Define new structure.
+ (coff_section_data): Define.
+ (_bfd_coff_get_external_symbols): Declare.
+ (_bfd_coff_read_string_table): Declare.
+ (_bfd_coff_free_symbols): Declare.
+ (_bfd_coff_read_internal_relocs): Declare.
+ * libcoff.h: Rebuild.
+
+Fri Jul 21 22:32:54 1995 Michael Meissner <meissner@cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_howto_raw): Add support for R_PPC_SDAREL
+ relocation.
+ (ppc_elf_reloc_type_lookup): Ditto.
+ (ppc_elf_got16_inner): Ditto.
+ (ppc_elf_relocate_section): Ditto.
+
+Thu Jul 20 19:19:06 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new (ignored)
+ argument.
+ * elf32-hppa.h: Corresponding change.
+
+Thu Jul 20 19:01:07 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * libaout.h (set_aout_section_data): New macro.
+ * sunos.c (sunos_scan_relocs): Use it.
+
+ * aout-ns32k.c (MY_swap_std_reloc_out): Undef KEEPIT before
+ defining it.
+
+Thu Jul 20 13:48:00 1995 Fred Fish <fnf@cygnus.com>
+
+ * hosts/i386v4.h (getgid, getuid): Change prototypes to be
+ compatible with Unixware 1.x and Unixware 2.x, and probably other
+ i386 svr4 versions as well.
+
+Thu Jul 20 13:41:21 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * targets.c (bfd_target_vector): Since armpe and armpei have been
+ split into big- and little-endian variants, list all of them,
+ instead of the now-nonexistant armpe[i]_vec.
+
+Thu Jul 20 00:06:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (bfd_section_from_phdr): Set lma based on p_paddr.
+ (elf_fake_sections): Set sh_addr based on lma, not vma.
+
+Wed Jul 19 15:52:01 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * coff-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
+ * configure.in (armpe_vec, armpei_vec): Add bi-endian support.
+ * configure: "regenerated".
+ * pe-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
+ (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Replaces TARGET_NAME.
+ * pei-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
+ (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Replaces TARGET_NAME.
+ * targets.c (armpe_vec, armpei_vec): Deleted.
+ (armpe_little_vec, armpe_big_vec, armpei_little_vec, armpei_big_vec):
+ Added.
+ * config/arm-pe.mt (DEFAULT_VECTOR): Default is armpe_little_vec.
+ (SELECT_VECS): Add bi-endian support.
+
+Wed Jul 19 10:47:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c: Clean up and comment.
+ (r_imm32): Remove.
+ (sh_coff_howtos): New static array.
+ (SH_COFF_HOWTO_COUNT): Define.
+ (get_symbol_value): Make relocation bfd_vma rather than long.
+ (RTYPE2HOWTO): Rewrite to use sh_coff_howtos.
+ (coff_relocate_section): Define to sh_relocate_section.
+ (sh_relocate_section): New static function.
+
+Sat Jul 15 01:02:53 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.host: Add support for generic m68k SVR4 host.
+
+Fri Jul 14 13:13:55 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (KEEPIT): Change definition to udata.i.
+ (KEEPITTYPE): Remove.
+ (NAME(aout,reloc_type_lookup)): Add cases to the
+ extended reloc type switch: SPARC_GOT10, SPARC_GOT13, SPARC_GOT22,
+ SPARC_PC10, SPARC_PC22, SPARC_WPLT30.
+ (NAME(aout,swap_std_reloc_out)): Don't bother to use stoi when
+ retrieving KEEPIT value.
+ (NAME(aout,swap_ext_reloc_out)): Likewise. Also, only add in
+ output section VMA for section symbols, and check BSF_SECTION_SYM
+ to control whether to set r_extern to 1.
+
+ * syms.c: Fix comments so that `make info' works.
+
+ * elf32-mips.c (mips_elf_find_nearest_line): Set SEC_HAS_CONTENTS
+ in .mdebug section, in case backend linker has cleared it.
+
+Fri Jul 14 11:58:34 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_addr16_ha_inner): Rewrite to take just one
+ argument, the final relocated address.
+ (ppc_elf_addr16_ha_inner): Adjust ppc_elf_addr16_ha_inner caller.
+ (ppc_elf_relocate_section): Ditto.
+
+Thu Jul 13 17:22:03 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (hppa_som_gen_reloc_type): Choose a reasonable field
+ selector relocation for the difference of two symbols.
+
+Thu Jul 13 10:33:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,slurp_reloc_table)): Cast argument to size_t
+ for malloc.
+ * coff-mips.c (mips_relocate_section): Likewise, for memmove.
+ (mips_relax_section): Likewise, for malloc.
+ * cofflink.c (process_embedded_commands): Likewise.
+ (_bfd_coff_final_link): Likewise.
+ * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
+ (ecoff_final_link_debug_accumulate): Likewise.
+ (ecoff_indirect_link_order): Likewise, for memcpy and malloc.
+ (ecoff_reloc_link_order): Likewise, for malloc.
+ * ecofflink.c (ecoff_align_debug): Likewise, for memset.
+ (ecoff_write_symhdr): Likewise, for malloc.
+ * elf32-hppa.c (elf32_hppa_read_symext_info): Likewise.
+ * elf.c (assign_file_positions_except_relocs): Likewise, for
+ qsort.
+ * elf32-mips.c (mips_elf_read_ecoff_info): Likewise, for malloc.
+ * elfcode.h (elf_slurp_reloc_table): Likewise.
+ * elfcore.h (elf_corefile_note): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Likewise.
+ (elf_link_read_relocs): Likewise.
+ (NAME(bfd_elf,size_dynamic_sections)): Likewise, for memset.
+ * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
+ * ieee.c (do_with_relocs): Likewise.
+ * linker.c (default_indirect_link_order): Likewise, for malloc.
+ * nlmcode.h (nlm_object_p): Likewise.
+ (nlm_write_object_contents): Likewise.
+ * oasys.c (oasys_set_section_contents): Likewise, for memcpy.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Likewise,
+ for malloc.
+ * section.c (bfd_get_section_contents): Likewise, for memcpy.
+ * srec.c (srec_get_section_contents): Likewise.
+ (srec_set_section_contents): Likewise.
+ * sunos.c (bfd_sunos_size_dynamic_sections): Likewise, for
+ realloc and memset.
+ (sunos_scan_relocs): Likewise, for malloc.
+ (sunos_scan_dynamic_symbol): Likewise, for realloc.
+ * syms.c (_bfd_generic_read_minisymbols): Likewise, for malloc.
+ * versados.c (versados_get_section_contents): Likewise, for
+ memcpy.
+
+ * libbfd.c (real_read): Add prototype. Change argument types from
+ int to size_t.
+ (bfd_read): Cast real_read argument to size_t, not int.
+ (bfd_write): Cast fwrite argument to size_t, not int.
+
+ * elf64-gen.c (elf_info_to_howto): Fix definition for recent elf.c
+ changes.
+
+ * configure.in: Fix typo: change {$enableval} to ${enableval}.
+ * configure: Rebuild.
+
+ * Makefile.in (BFD32_BACKENDS): Add elflink.o.
+
+ * targets.c (bfd_target): Add fields _read_minisymbols and
+ _minisymbol_to_symbol.
+ (BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and
+ _minisymbol_to_symbol.
+ (bfd_read_minisymbols): Define.
+ (bfd_minisymbol_to_symbol): Define.
+ * syms.c (_bfd_generic_read_minisymbols): Define.
+ (_bfd_generic_minisymbol_to_symbol): Define.
+ * libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define.
+ (_bfd_nosymbols_minisymbol_to_symbol): Define.
+ (_bfd_generic_read_minisymbols): Declare.
+ (_bfd_generic_minisymbol_to_symbol): Declare.
+ * bfd-in2.h: Rebuild.
+ * libbfd.h: Rebuild.
+ * aoutx.h (MINISYM_THRESHOLD): Define.
+ (NAME(aout,read_minisymbols)): New function.
+ (NAME(aout,minisymbol_to_symbol)): New function.
+ * libaout.h (NAME(aout,read_minisymbols)): Declare.
+ (NAME(aout,minisymbol_to_symbol)): Declare.
+ * aout-target.h (MY_read_minisymbols): Define.
+ (MY_minisymbol_to_symbol): Define.
+ * All targets: Define read_minisymbols and minisymbol_to_symbol.
+
+Wed Jul 12 17:55:55 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Cast return value from
+ bfd_alloc.
+
+ * elfcode.h (size_info): Don't use "&" before function names.
+
+Wed Jul 12 00:16:48 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
+
+ * libelf.h (elf_backend_data): Use unsigned, not unsigned char,
+ for bitfields.
+
+Tue Jul 11 15:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (bfd_section_from_shdr): In case SHT_REL[A], only get the
+ BFD section for the sh_link section if it is a SYMTAB section.
+
+ * aoutx.h (NAME(aout,link_add_symbols)): Don't bother to check
+ that archives hold a.out objects.
+ * cf-i386lynx.c (coff_bfd_link_add_symbols): Don't define.
+ (lynx_link_add_symbols): Remove.
+ * cf-m68klynx.c (coff_bfd_link_add_symbols): Don't define.
+ (lynx_link_add_symbols): Remove.
+ * elflink.h (elf_bfd_link_add_symbols): Don't bother to check that
+ archives hold ELF objects.
+
+ * archive.c (bfd_generic_archive_p): If the archive has a map, and
+ the target was defaulted, but the first object in the archive can
+ not be matched with that target, then return a bad format error.
+
+ * elf64-sparc.c (elf_sparc_howto_table): Set howto for WDISP16 to
+ elf64_wdisp16_reloc.
+ (elf64_wdisp16_reloc): New static function.
+ (elf64_sparc_relocate_section): New static function.
+ (elf_backend_relocate_section): Define.
+
+ * libelf.h (struct elf_size_info): Change type of last argument to
+ swap_symbol_out from char * to PTR.
+ (bfd_elf32_swap_symbol_out): Update declaration.
+ (bfd_elf64_swap_symbol_out): Likewise.
+ * elfcode.h (elf_swap_symbol_out): Change type of cdst from char *
+ to PTR.
+ * elf.c (swap_out_syms): Cast to PTR, not char *, when calling
+ swap_symbol_out routine.
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Likewise.
+ (elf_link_output_sym): Likewise.
+ (elf_link_output_extsym): Likewise.
+ * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Likewise.
+
+Tue Jul 11 12:29:49 1995 Rick Sladkey <jrs@world.std.com>
+
+ * elf.c (_bfd_elf_find_nearest_line): Handle the simple case where
+ there is no debugging information.
+
+Mon Jul 10 11:45:55 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * makefile.dos (OBJS): Add binary.o and tekhex.o. From DJ
+ Delorie.
+
+Mon Jul 10 11:09:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (set_symbol_from_hash): bfd_link_hash_new case: Don't
+ abort; it can happen for constructor symbols when not building
+ constructors.
+
+ * coff-i960.c (coff_i960_relocate): Correct typo: use ! on strcmp,
+ not on string.
+ * cofflink.c (_bfd_coff_generic_relocate_section): Remove unused
+ local i.
+ * coff-arm.c (coff_arm_rtype_to_howto): Don't declare.
+ (PCRELOFFSET): Define if not already defined.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add coff-arm.o
+ (CFILES): Add coff-arm.c, pe-arm.c, pei-arm.c.
+
+ * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
+ using bfd_alloc, not malloc.
+ * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
+ * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
+ * i386linux.c (linux_link_hash_table_create): Likewise.
+ * linker.c (_bfd_generic_link_hash_table_create): Likewise.
+ * sunos.c (sunos_link_hash_table_create): Likewise.
+
+ Based on patches from Eric Youngdale <eric@aib.com>:
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): If -Bsymbolic,
+ output a DT_SYMBOLIC dynamic entry.
+ (elf_adjust_dynamic_symbol): If -Bsymbolic, don't require a PLT
+ entry for a locally defined symbol.
+ * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, do warn
+ about undefined symbols, and fill in the GOT entry for a symbol
+ defined in a regular object file.
+ (elf_i386_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
+ reloc rather than a GLOB_DAT reloc for a symbol defined in a
+ regular object file.
+ * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, do warn
+ about undefined symbols, and fill in the GOT entry for a symbol
+ defined in a regular object file.
+ (elf_m68k_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
+ reloc rather than a GLOB_DAT reloc for a symbol defined in a
+ regular object file.
+ * elf32-sparc.c (elf32_sparc_relocate_section): If -Bsymbolic, do
+ warn about undefined symbols, and fill in the GOT entry for a
+ symbol defined in a regular object file.
+ (elf32_sparc_finish_dynamic_symbol): If -Bsymbolic, output a
+ RELATIVE reloc rather than a GLOB_DAT reloc for a symbol defined
+ in a regular object file.
+
+ * config/m68k-coff.mt (SELECT_VECS): Rename from SELECT_VECTORS.
+ Correct elements to be actual BFD vector names.
+
+ * Makefile.in (Makefile): Don't depend upon @frags@.
+ (config.status): Depend upon @frags@.
+
+Fri Jul 7 17:36:44 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_renumber_symbols): Sort defined symbols that are
+ neither BSF_FUNCTION not BSF_NOT_AT_END just before undefined
+ symbols.
+ * coffcode.h (coff_slurp_symbol_table): Set BSF_FUNCTION as well
+ as BSF_NOT_AT_END.
+
+Fri Jul 7 17:16:15 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (do_mostlyclean): Remove config.log.
+ (do_distclean): Remove config.cache.
+
+Thu Jul 6 14:37:43 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Revert May 24 patch.
+ Don't copy PC32 reloc against section into shared object.
+
+ * Makefile.in: Rebuild dependencies.
+ (CFILES): Added elflink.c.
+ (Makefile): Depend upon config.status, not configure.in.
+ (config.status): New target; depend upon configure configure.host
+ and config.bfd.
+
+Wed Jul 5 20:17:14 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * elfcore.h, elflink.h, elfcode.h, elf.c, elflink.c: Moved some
+ primarily size-independent code from elfcode.h to elf.c and new
+ file elflink.c; moved out other core- or linker-related routines
+ into other new .h files for clarity. Renamed many routines to
+ start with bfd_elf or _bfd_elf. Added a structure of
+ size-dependent but target-independent info to elfcode.h.
+ * Makefile.in: Build elflink.o. Update dependencies.
+ * libelf.h: Updated some declarations. Added a definition for the
+ new structure in elfcode.h. Added more fields to elf backend data
+ structure.
+ * elfxx-target.h: Refer to the appropriate size-dependent info.
+ * elf32-*.c: Changed some function names. Moved common
+ create_dynamic_sections code from m68k, sparc, and i386 support
+ into elflink.c. Define some new macros to fill in new fields of
+ back end data. Also clean up some "gcc -Wall" warnings regarding
+ unused or uninitialized variables.
+
+ * Makefile.in (BFD_LIBS): No, don't put elflink.o here.
+ * configure.in: Include it here whenever elf.o is specified.
+
+Wed Jul 5 10:31:47 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_object_p): Unconditionally set
+ elf_bad_symtab, since sometimes the symbol table is messed up and
+ the last symbol is global.
+
+ * ecoff.c (_bfd_ecoff_bfd_is_local_label): New function.
+ * libecoff.h (_bfd_ecoff_bfd_is_local_label): Declare.
+ * elf32-mips.c (mips_elf_is_local_label): New static function.
+ (bfd_elf32_bfd_is_local_label): Define.
+
+ * configure.in: Use $ac_config_sub, not $configsub.
+ * configure: Likewise.
+
+ Permit --enable-targets=ieee:
+ * config.bfd (*-*-ieee*): New target.
+ * config/ieee.mt: New file.
+
+Wed Jul 5 04:16:35 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
+
+ * config/i386aix.mh (HDEFINES): Remove -DFASCIST_FDOPEN.
+
+ Autoconfiscation:
+ * configure.in, Makefile.in, doc/Makefile.in: Switch from Cygnus
+ configure to autoconf ways of processing --enable arguments,
+ setting up symlinks, incorporating makefile fragments, printing
+ messages at configuration time, setting variables in Makefile.
+ Deleted some unused variables. Check for ranlib via autoconf.
+ For now, configure script removes doc/config.status.
+ * configure: New file.
+ * dep-in.sed: Use @SRCDIR@ instead of @srcdir@, so Makefile.in
+ line doesn't get broken by configure.
+ * doc/configure.in: Removed.
+
+Tue Jul 4 12:22:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * archive.c (_bfd_construct_extended_name_table): If
+ BFD_TRADITIONAL_FORMAT is set, limit the length of all file names
+ to ar_max_namelen.
+ (bfd_dont_truncate_arname): If BFD_TRADITIONAL_FORMAT is set, call
+ bfd_bsd_truncate_arname.
+ (_bfd_write_archive_contents): Revert June 1 change.
+
+ * elfcode.h (NAME(bfd_elf,record_link_assignment)): Add provide
+ argument.
+ * bfd-in.h (bfd_elf32_record_link_assignment): Update prototype.
+ (bfd_elf64_record_link_assignment): Likewise.
+ * bfd-in2.h: Rebuild.
+
+ * libelf.h (struct elf_link_hash_table): Add needed field. Remove
+ saw_needed field.
+ * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
+ is an empty string, don't make a DT_NEEDED entry in the output
+ file. Record all DT_NEEDED entries found in input dynamic
+ objects.
+ (elf_link_output_extsym): Don't check saw_needed when issuing
+ warnings.
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize needed, not
+ saw_needed.
+ (bfd_elf_get_needed_list): New function.
+ * bfd-in.h (struct bfd_elf_link_needed_list): Define.
+ (bfd_elf_get_needed_list): Define.
+ * bfd-in2.h: Rebuild.
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): Also initialize
+ find_buffer and fdrtab_len fields of newly allocated
+ find_line_info structure.
+
+Mon Jul 3 17:03:52 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (hppa_som_gen_reloc_type): New argument "sym_diff",
+ nonzero when we're generating relocations for an expression
+ using the difference of two symbols. All callers changed.
+ Handle difference of symbols for both R_HPPA and R_COMPLEX
+ cases.
+ (som_write_fixups): Handle R_COMP1, R_COMP2 and R_CODE_EXPR
+ fixups.
+
+Mon Jul 3 13:55:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * config.bfd (win32): New configuration.
+ * configure.host (pe): Changed to i386win32.
+ * config/i386pe.mh: Deleted.
+ * config/i386win32.mh: New file.
+
+Mon Jul 3 11:30:45 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): If we allocate
+ find_line_info, clear the fdrtab field.
+
+ * targets.c (enum bfd_flavour): Add bfd_target_msdos_flavour here,
+ rather than in bfd-in2.h.
+
+ * bfd.c (enum bfd_error): Define bfd_error_no_armap.
+ (bfd_errmsgs): Add string for bfd_error_no_armap.
+ * bfd-in2.h: Rebuild.
+ * ecoff.c (ecoff_link_add_archive_symbols): If an archive has no
+ armap, set bfd_error_no_armap rather than bfd_error_no_symbols.
+ * elfcode.h (elf_link_add_archive_symbols): Likewise.
+ * linker.c (_bfd_generic_link_add_archive_symbols): Likewise.
+
+ * elfcode.h (elf_link_add_object_symbols): Permit common and
+ indirect symbols in weakdefs BFD_ASSERT.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Simplify
+ BFD_ASSERT to permit some legal, but odd, cases.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+ * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add versados.o.
+ (CFILES): Add pe-i386.c, pei-i386.c, and versados.c.
+
+Sun Jul 2 17:49:32 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Cast base_file
+ to FILE * before using it.
+ * stab-syms.c: Revert yesterday's patch.
+
+Sat Jul 1 12:10:42 1995 Fred Fish <fnf@cygnus.com>
+
+ * stab-syms.c (stdio.h): Include prior to libaout.h, which
+ includes bfdlink.h, which now uses FILE.
+
+Sat Jul 1 00:11:08 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * elfxx-target.h: New file.
+
+ * libelf.h (struct elf_backend_data): Remove elf_64_p field.
+ * elfxx-target.h (elfNN_bed): Don't set it.
+
+ * elf32-target.h, elf64-target.h: Deleted.
+ * Makefile.in (elf32-target.h, elf64-target.h): Build them from
+ elfxx-target.h.
+
+Fri Jun 30 16:07:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Compare
+ the full text of .reloc or .edata section names.
+
+Fri Jun 30 15:47:37 1995 Fred Fish <fnf@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section):
+ Remove extra '+'.
+
+Thu Jun 29 17:24:52 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * coff-h8300.c (COFF_LONG_FILENAMES): Define.
+
+Wed Jun 28 18:04:42 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in: versados.o is now conditionally built.
+ * coffcode.h (add_data_entry): New function.
+ (coff_write_object_contents): Clean up. Calculate
+ data entries.
+ * cofflink.c (_bfd_coff_generic_relocate_section):
+ .reloc and .edata sections are IMAGE_BASED too.
+ If there's a base_file then write out base information.
+ * configure.host (i386-*-pe): New.
+ * syms.c (coff_section_type): Only scan prefixes.
+ * targets.c (bfd_target_vector): Versados is now conditionally
+ built.
+ * config/m68k-coff.mt: Build versados.o
+ * hosts/i386pe.h: New file.
+
+Mon Jun 26 13:53:49 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hpa.c (elf32_hppa_relocate_section): Close comment before
+ R_PARISC_DPREL21L handling.
+
+Thu Jun 22 19:28:36 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu>
+
+ * config/i386-moss.mt: created.
+
+Thu Jun 22 08:56:10 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * reloc.c (bfd_perform_relocation): Add case for -ve words.
+
+Wed Jun 21 13:13:49 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Don't try to apply a
+ relocation against an undefined symbols.
+
+Wed Jun 21 10:16:10 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * versados.c: Second pass/rewrite.
+
+Mon Jun 19 08:40:45 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * syms.c (coff_section_type): Compare only the front part
+ of a section name.
+
+Sat Jun 17 09:40:44 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Set the size of the stub
+ section if we get an error.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Don't mess
+ with the operands of an R_PARISC_DPREL21L relocation if the insn
+ is not "addil <symbol>,%r27".
+
+Fri Jun 16 15:04:47 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * bfd-in.h (NT_subsystem, NT_stack_heap): Declare but don't
+ define.
+ * bfd-in2.h: Rebuilt.
+ * bfd.c (NT_subsystem, NT_stack_heap): Define.
+
+Fri Jun 16 00:07:25 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_bfd_link_link_relocate): Use the right
+ type field (there are two!) when checking to see if $global$ is
+ defined.
+
+Thu Jun 15 14:03:47 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * bfd-in.h, bfd-in2.h (bfd_boolean): Rename bfd_true, bfd_false
+ to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
+ * coffswap.h (coff_swap_scnhdr_out): Remove version that was
+ hacked for MPW C.
+ * mpw-config.in: Set shell vars instead of pasting to makefile
+ for each configuration, edit coffswap.h to make MPW C not choke.
+ (i386-unknown-coff, sh-hitachi-hms): Recognize.
+ * mpw-make.in (BFD_LIBS): Add versados.c.o.
+
+ * versados.c (versados_scan): Properly cast results from bfd_alloc.
+
+Wed Jun 14 15:27:32 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * cofflink.c (process_embedded_commands): New function
+ reads and handles .drectve sections for PE.
+ (coff_link_input_bfd): Call new function if PE.
+
+Mon Jun 12 12:09:39 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * bfd-in.h (bfd_set_section_vma): Case true to a boolean.
+ (bfd_set_cacheable): Likewise.
+ * bfd-in2.h: Rebuilt.
+
+Fri Jun 9 12:20:28 1995 Steve Chamberlain <sac@rtl.cygnus.com>
+
+ * elfcode.h (elf_sort_hdrs): Rewrite to be symmetrical.
+
+Fri Jun 9 12:49:00 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * targets.c: Add copy_private_symbol_data and link_split_section
+ to the target vector.
+ * libbfd-in.h (_bfd_generic_bfd_copy_private_symbol_data): Define.
+ (_bfd_nolink_bfd_link_split_section): Likewise.
+ (bfd_generic_link_split_section): Declare.
+ * syms.c (bfd_copy_private_symbol_data): Define.
+ * linker.c (bf_link_split_section): Likewise.
+ * som.c (som_bfd_copy_private_symbol_data): New function
+ (som_bfd_link_split_section): Likewise.
+ * All other targets updated with default versions of new routines.
+
+ * Take out my braindamaged bfd_true/bfd_false changes from earlier
+ today. Replace with just:
+ * bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
+ compiling with g++-2.6 or later.
+ * bfd-in2.h: Rebuilt.
+
+Fri Jun 9 07:54:29 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * versados.c (struct esd, get_4): Lint; use unsigned chars.
+
+ * coff-i960.c (coff_i960_relocate): Compare output section names
+ when converting for vxworks.
+
+Wed Jun 7 19:01:30 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * elfcode.h (elf_fake_sections): Permit .scommon or COMMON
+ sections as random SHT_NOBITS sections, in case a linker script is
+ strange.
+
+Tue Jun 6 17:29:32 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * bfd-in.h (NT_subsystem, NT_stack_heap): Moved from pe.h
+ * coff-i386.c (coff_i386_rtype_to_howto): Get PE relocs right.
+ * coffcode.h (coff_mkobject): Set pe tdata bit when using PE.
+ * cofflink.c (COFF_WITH_PE code): Test on obj_pe bit rather
+ than conditional compile.
+ * configure.in: Fix PE dependencies.
+ * libcoff-in.h (obj_pe): New.
+ (coff_tdata): Added pe entry.
+ * libcoff.h: Regenerated.
+
+Mon Jun 5 09:07:13 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * coff-a29k.c (coff_a29k_adjust_symndx): Completely parenthesize
+ macro.
+
+Mon Jun 5 02:15:20 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ Linker support for m68k-elf from Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>:
+ * elfcode.h (elf_link_add_object_symbols): Check for NULL when
+ looping through the symbol hashes.
+ (elf_bfd_final_link): When looking for _init and _fini don't use
+ the symbol if it is imported from another object.
+ * elf32-m68k.c: Relocation type changed from REL to RELA. Regular
+ and dynamic linking support functions added, similar to other elf
+ targets.
+
+ * config.bfd (i[345]86-*-gnu*): Use ELF configuration.
+
+Fri Jun 2 18:54:59 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * versados.c: New file.
+ * bfd-in2.h (struct _bfd): New field.
+ * bfd.c (struct _bfd): New field.
+ * configure.in (versados_vec): New field.
+ * targets.c (bfd_flavor): Added versados.
+
+Thu Jun 1 13:51:49 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * coffcode.h (sec_to_styp_flags, styp_to_sec_flags,
+ coff_new_section_hook): Any section that starts ".stab"
+ is now marked as debugging.
+
+Thu Jun 1 16:15:16 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * archive.c (_bfd_write_archive_contents): Disable extended name
+ table until it can be made optional, so that native AR has half a
+ chance on SunOS and HP/UX.
+
+ * linker.c (_bfd_generic_link_output_symbols, case
+ bfd_link_hash_indirect): Add cast to correct pointer types.
+
+Sat May 27 21:37:31 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config.bfd (m68k-bull-sysv*): Added strip_underscore=yes.
+ (m68k-est-coff): Removed. target does not effect object format.
+
+Wed May 24 10:52:01 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * linker.c (_bfd_generic_link_output_symbols): Cope with
+ indirect symbols.
+
+ * elf32-i386.c (elf_i386_relocate_section): Give error
+ message when linking to a shared reloc which isn't there.
+
+Wed May 24 10:40:00 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ Support for ARM-PE.
+
+ * Makefile.in, coffcode.h, config.bfd, configure.in, pe-arm.c,
+ pei-arm.c, coff-arm.c, reloc.c, targets.c, config/arm-pe.mt:
+ Support for ARM COFF/PE.
+
+Tue May 23 19:24:58 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * bfd.c (bfd_get_relocated_section_contents): Now a function,
+ tries calling routine from input bfd target vector for
+ bfd_indirect_link_order. Put a declaration into the header file.
+ * bfd-in2.h: Regenerated.
+ * elf32-mips.c (gprel16_with_gp): New function, split out from
+ mips_elf_gprel16_reloc.
+ (mips_elf_gprel16_reloc): Call it. If output bfd target vector
+ isn't elf flavoured, abort, since it's assumed to be elf in some
+ of this code, including the code that looks up the gp value.
+ (elf32_mips_get_relocated_section_contents): New function,
+ modified from bfd_generic_get_relocated_section_contents to deal
+ with passing gp to gprel16_with_gp.
+ (bfd_elf32_bfd_get_relocated_section_contents): New macro.
+ * elf32-target.h (bfd_elf32_bfd_get_relocated_section_contents):
+ Don't define if already defined.
+
+Tue May 23 15:58:15 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * Makefile.in: Install bfdlink.h too.
+
+Sun May 21 22:25:09 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Handle undefined and
+ notsupported return codes from final_link_relocate (used when
+ $global$ is undefined or nonexistant).
+ (elf32_hppa_bfd_link_link_relocate): If $global$ exists, but is
+ not defined,then return bfd_reloc_undefined.
+
+Fri May 19 10:00:14 1995 Steve Chamberlain <sac@rtl.cygnus.com>
+
+ * coffswap.h: (IMAGE_BASE): Define to 0 if not.
+
+Thu May 18 04:24:01 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * aoutx.h (aout_link_input_section_standard): If defined, call
+ MY_relocatable_reloc before doing a partial relocation.
+
+ * aout-arm.c: (WRITE_HEADERS): Delete.
+ (NAME): Define version to override default in aoutx.h
+ (MY(howto_table)): Reformat. Alter some entries slightly.
+ (RELOC_ARM_BITS_NEG_{BIG,LITTLE}): Define.
+ (MY(reloc_howto), MY(put_reloc), MY(relocatable_reloc)): New functions.
+ (MY_reloc_howto, MY_put_reloc, MY_relocatable_reloc): Define.
+ (MY(fix_pcrel_26)): Renamed from aoutarm_fix_pcrel_26, return
+ bfd_reloc_ok not bfd_reloc_continue.
+ (MY(fix_pcrel_26_done)): Likewise.
+ (MY(bfd_reloc_type_lookup)): Renamed from aoutarm_reloc_type_lookup.
+ (MY_bfd_link_hash_table_create, MY_bfd_link_add_symbols,
+ MY_bfd_final_link): Delete.
+ (MY_swap_std_reloc_in, MY_swap_std_reloc_out, MY_get_section_contents):
+ Define.
+ (aoutx.h): Include it.
+ (MY(swap_std_reloc_{in,out})): New functions.
+ Use RELOC_ARM_BITS_NEG_{BIG,LITTLE} to extract negative reloc bit.
+ (aoutarm_squirt_out_relocs): Delete.
+
+ From: David Taylor (dtaylor@armltd.co.uk)
+ * config/arm[lb]-aout.mt: New files.
+ * aout-arm.c: New file.
+ * config.bfd: Handle arm{,e[lb]}-*-aout
+ * configure.in: Add vetor for aout_arm_{big,little}_vec.
+ * reloc.c: New relocation types for the ARM.
+ * targets.c (aout_arm_{big,little}_vec): declare.
+
+Tue May 16 10:29:51 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
+
+ * libbfd.c (bfd_stat): If bfd_cache_lookup returns an error,
+ return an error to the caller. Call bfd_set_error on errors.
+
+Tue May 16 14:44:45 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * libcoff-in.h (coff_renumber_symbols): Modified prototypes in
+ accordance with 11 May libcoff.h change.
+
+Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ tekhex.c (first_phase): Understand type 0 symbols.
+ (tekhex_write_object_contents): Fix typo in final record.
+
+Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * coff-i960.c (optcall_callback): don't try and optimize
+ undefined refs.
+ (coff_write_relocs): Search for broken relocs on the way
+ out and fix them up.
+ (coff_renumber_symbols): Calculate and return index of
+ first undefined symbol.
+ (coff_write_object_contents): Call coff_renumber_symbols
+ and coff_write_relocs with the new args.
+ * libcoff.h: (coff_renumber_symbols, coff_renumber_symbols):
+ Modified prototypes.
+
+Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
+ Tom Griest <griest@cs.yale.edu>
+
+ Initial support for PE format.
+
+ * Makefile.in, targets.c, configure.in, config.bfd:
+ Add support for i386-*-winnt and i386-*-pe.
+ * archive.c (do_slurp_coff_armap): Understand NTPE format
+ archives.
+ (_bfd_slurp_extended_name_table): Turn \ in a filename
+ into /.
+ * bfd-in.h (bfd_link_subsystem, _bfd_link_stack_heap): New.
+ * coff-i386.c (howto_table): Conditionalize PCRELOFFSET.
+ * coffcode.h (IMAGE_BASE): New.
+ (coff_compute_section_file_positions): Throw away .junk
+ sections for PE, align symbols.
+ (coff_write_object_contents): Throw away .junk sections
+ for PE. Remember info on .idata and .rsrc sections.
+ Fill in the PE header.
+ (coff_slurp_symbol_table): PE uses C_SECTION class.
+ * cofflink.c (_bfd_coff_final_link): Keep PE info up to date.
+ (_bfd_coff_generic_relocate_section): Cope with PE relocs.
+ * coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}):
+ New code for PE headers.
+
+Tue May 9 17:01:38 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.bfd: Add little endian PowerPC support.
+ * configure.in: Ditto.
+ * targets.c: Ditto.
+ * config/ppcle-elf.mt: New file, for little endian PowerPC
+ support.
+ * config/ppc-elf.mt: Add little endian powerpc to the BFD
+ selection vectors.
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Complain if
+ linking a different endian object than we expect.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define, to provide little
+ endian support.
+
+Tue May 2 16:32:24 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config.bfd (hppa*-*-lites*): Treat just like hppa*-*-*elf*.
+
+Tue Apr 25 19:38:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * coffgen.c (make_a_section_from_file): Initialize lma same as
+ vma.
+
+Tue Apr 25 11:03:21 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * hosts/std-host.h: #include ansidecl.h 'cause PTR is used in
+ std-host.h.
+
+Mon Apr 24 23:56:44 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * hosts/i386linux.h (HAVE_PROCFS): Don't define it. Added lengthy
+ comment explaining why.
+
+Mon Apr 24 10:34:02 1995 Michael Meissner <meissner@cygnus.com>
+
+ * hosts/i386linux.h (HAVE_PROCFS): If NO_PROCFS is defined, don't
+ define HAVE_PROCFS.
+
+Mon Apr 24 08:33:12 1995 Michael Meissner <meissner@cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Do not continue
+ processing unknown symbols to prevent a cascade of errors.
+
+Fri Apr 21 12:48:48 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Patches from H.J. Lu for Linux ELF core file support.
+ * elfcode.h (elf_core_file_matches_executable_p) [HAVE_PROCFS]:
+ Use prpsinfo_t instead of struct prpsinfo, for consistency.
+ * hosts/i386linux.h (HAVE_PROCFS): Define.
+
+Thu Apr 20 09:07:39 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * linker.c (link_action): Do the right thing when a undefined
+ strong symbol appears after an undefined weak symbol.
+
+Fri Apr 14 16:51:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): New function to relocate
+ a whole section for the linker, bypassing bfd_perform_relocation.
+ (ppc_elf_reloc_type_lookup): New function to map the BFD
+ enumeration code into a howto structure.
+ (ppc_elf_howto_raw): Rename from ppc_elf_howto_table.
+ (ppc_elf_howto_table): New array that maps PowerPC relocation
+ numbers to howto structures without a linear search. Change from
+ using bfd_elf_generic_reloc to use ppc_elf_std_reloc.
+ (ppc_elf_howto_init): Initialize ppc_elf_howto_table from
+ ppc_elf_howto_raw.
+ (ppc_elf_reloc_type_lookup): Use a case statement instead of a
+ loop.
+ (ppc_elf_std_reloc): Replacement for bfd_elf_generic_reloc.
+ (ppc_elf_unsupported_reloc): Print a real error message, instead
+ of calling abort.
+ (ppc_elf_addr16_ha_inner): Abstract getting adjustment from
+ ppc_elf_addr16_ha_reloc, so ppc_elf_relocate_section can use it
+ too.
+ (ppc_elf_addr16_ha_reloc): Call it.
+ (ppc_elf_got16_inner): Abstract getting adjustment from
+ ppc_elf_got16_reloc, so ppc_elf_relocate_section can use it too.
+ (ppc_elf_got16_reloc): Call it.
+ (ppc_elf_info_to_howto): Rename from powerpc_info_to_howto.
+
+ * elfcode.h (elf_symbol_from_bfd_symbol): Omit space in debugging
+ output.
+ (elf_symbol_flags): Add debug function to decode flags so that
+ defining DEBUG to be 4 will compile again.
+ (elf_debug_section): Fix typo in debug output.
+
+Fri Apr 14 16:03:04 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config.bfd: Add m68*-*-elf*.
+ * elf32-m68k.c: Filled out implementation, except for dynamic
+ linking support.
+ * reloc.c (enum bfd_reloc_code_real): Added *_GOT_PCREL, *_GOTOFF,
+ *_PLT_PCREL, *_PLTOFF, *_68K_* relocations for ELF.
+ * libbfd.h, bfd-in2.h: Regenerated.
+
+Thu Apr 13 14:28:04 1995 Torbjorn Granlund <tege@adder.cygnus.com>
+
+ * coff-m68k.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
+ 1 to 2.
+ (bfd_target): Change minimum section alignment from 1 to 2.
+
+Wed Apr 12 12:40:04 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * aoutx.h (machine_type, case bfd_arch_mips): Treat R8000 like
+ R6000 and R4000 for now.
+
+Tue Apr 4 12:28:25 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: New file, MPW version of configure.in.
+ * mpw-make.in: New file, MPW version of Makefile.in.
+ * hosts/mpw.h: New file, MPW host definitions.
+ * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_in) [MPW_C]:
+ Alternate versions without ECOFF_64 that chokes MPW C.
+ * coffswap.h (coff_swap_scnhdr_out): Add alternative version with
+ partly-expanded macros.
+
+Thu Mar 30 14:56:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * reloc.c (bfd_perform_relocation): Don't bother to check for
+ overflow if the symbol is undefined.
+
+Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com)
+
+ * config.bfd: Change linux to default to elf. Using
+ i[345]86-*-linuxaout will build a library which defaults to a.out.
+ * config/i386-laout.mt: Rename from old config/i386-linux.mt.
+ * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
+ Comment out EXTRALIBS.
+ * config/i386-lelf.mt: Remove.
+
+Wed Mar 29 12:01:30 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i960.c (coff_i960_relocate): Cache the section symbol in
+ the used_by_bfd field of the section, to avoid looping for each
+ reloc.
+
+ * cpu-h8500.c (arch_info_struct): Change name from "H8/300" to
+ "h8300" for consistency with other cpu-* files.
+
+Tue Mar 28 15:14:11 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bout.c (b_out_canonicalize_reloc): Handle SEC_CONSTRUCTOR
+ sections.
+ (b_out_get_reloc_upper_bound): Likewise.
+
+ * linker.c (generic_link_add_symbol_list): Skip constructor
+ symbols which the main linker code did not do anything with.
+ (_bfd_generic_link_output_symbols): Use udata.p if it is set,
+ rather than looking the symbol up in the hash table. Just pass
+ through constructor symbols for which udata.p is not set. If the
+ linker defined the symbol, clear the constructor flag.
+
+Tue Mar 21 10:50:32 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_set_reloc_info): Sign extend constants from
+ R_DATA_OVERRIDE fixups.
+ * libhppa.h (sign_extend): Renamed from sign_ext. Fix.
+ (low_sign_extend): Likewise.
+
+Mon Mar 20 22:39:10 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_slurp_symbol_table): Tighten test to determine
+ what symbols are section symbols.
+
+Sat Mar 18 01:54:45 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_bfd_link_add_symbols): An empty archive is OK.
+
+Fri Mar 17 16:29:02 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_copy_private_section_data): Just return true when
+ either the input or output section isn't attached to a SOM BFD.
+ (som_bfd_copy_private_bfd_data): Similarly for BFD private data.
+
+Fri Mar 17 11:50:34 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_link_add_object_symbols): Check whether a dynamic
+ object has already been included, and ignore it the second time.
+
+Wed Mar 15 11:56:40 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT13 from
+ complain_overflow_bitfield to complain_overflow_signed.
+
+ * libelf.h (bfd_elf32__write_relocs): Don't declare.
+ (bfd_elf64__write_relocs): Don't declare.
+
+Tue Mar 14 05:54:33 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * stab-syms.c (aout_stab_name): Moved aout_stab_names to be local
+ to this function. Recoded function to stop using table, to
+ improve performance (on i486-netbsd host). Left old version
+ intact under "#if 0" for further performance testing.
+
+Mon Mar 13 13:48:49 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (write_relocs): Make static. Use PTR argument as a
+ pointer to a boolean variable set to true if something fails.
+ Cast to PTR rather than void *.
+ (sym_is_global): Rewrite for clarity.
+ (map_program_segments): If the program header size is too small,
+ call _bfd_error_handler and return failure rather than aborting.
+ (NAME(bfd_elf,write_object_contents)): Pass boolean variable when
+ calling write_relocs.
+ (elf_symbol_from_bfd_symbol): Use BFD_ASSERT rather than abort.
+ (struct elf_info_failed): Define.
+ (NAME(bfd_elf,size_dynamic_sections)): Declare variables in inner
+ blocks. Pass elf_info_failed structure when calling
+ elf_export_symbol and elf_adjust_dynamic_symbol.
+ (elf_export_symbol): Treat data argument as elf_info_failed rather
+ than bfd_link_info. Set failed field on error.
+ (elf_adjust_dynamic_symbol): Likewise.
+ (struct elf_finfo_failed): Define.
+ (elf_bfd_final_link): Pass elf_finfo_failed structure when calling
+ elf_link_output_extsym. Use BFD_ASSERT rather than abort.
+ (elf_link_output_extsym): Treat data argument as elf_finfo_failed
+ rather than elf_final_link_info. Set failed field on error.
+ (elf_link_input_bfd): Use BFD_ASSERT rather than abort.
+ (elf_reloc_link_order): Likewise.
+
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Only write
+ out PLTRELSZ, PLTREL and JMPREL relocs if there is a .rela.plt
+ section. Solaris 2.4 apparently does not handle empty reloc
+ information correctly.
+
+ * archive.c (bsd_write_armap): Cast getuid and getgid results to
+ long, and print with %ld.
+
+Fri Mar 10 16:41:05 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (translate_to_native_sym_flags): Always use the output
+ section if it is not NULL.
+
+Thu Mar 9 15:06:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffswap.h (coff_swap_scnhdr_out): If the line number count or
+ the reloc count does not fit, print an error and return 0.
+ * coffcode.h (coff_write_object_contents): Check return value of
+ coff_swap_scnhdr_out.
+ * ecoff.c (_bfd_ecoff_write_object_contents): Check return value
+ of bfd_coff_swap_scnhdr_out.
+
+ * bfd.c: Include <stdarg.h> or <varargs.h>, depending upon
+ ANSI_PROTOTYPES.
+ (bfd_error_handler_type): New global type.
+ (_bfd_error_program_name): New static variable.
+ (_bfd_default_error_handler): New static function.
+ (_bfd_error_handler): New BFD private global variable.
+ (bfd_set_error_handler): New globally visible function.
+ (bfd_set_error_program_name): New globally visible function.
+ * libbfd-in.h (_bfd_error_handler): Declare.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+ * aoutx.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter,
+ and use it instead of bfd_get_symcount. Check r_index after
+ setting r_extern based on whether this is a base relative reloc.
+ (NAME(aout,swap_std_reloc_IN)): Add symcount parameter, and use it
+ instead of bfd_get_symcount.
+ (NAME(aout,slurp_reloc_table)): Pass bfd_get_symcount to reloc
+ swap routines.
+ * libaout.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter
+ to declaration.
+ (NAME(aout,swap_std_reloc_in)): Likewise.
+ * sunos.c (sunos_canonicalize_dynamic_reloc): Pass
+ info->dynsym_count to reloc swap routines.
+ * aout-ns32k.c (MY_swap_std_reloc_in): Add symcount parameter.
+ * hp300hpux.c (MY(swap_std_reloc_in)): Likewise.
+ (MY(slurp_reloc_table)): Pass bfd_get_symcount to reloc swap
+ routine.
+ * i386lynx.c (NAME(lynx,swap_ext_reloc_in)): Add symcount
+ parameter.
+ (NAME(lynx,swap_std_reloc_in)): Likewise.
+ (NAME(lynx,slurp_reloc_table)): Pass bfd_get_symcount to reloc
+ swap routines.
+
+Thu Mar 9 12:04:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * bfd.c (bfd_merge_private_bfd_data): New function vector to be
+ called by the linker to merge any private bfd data of the input
+ files and the output file. Used by the PowerPC ELF support to
+ check whether -mrelocatable is used for all modules.
+ (bfd_set_private_flags): New function vector to be called by the
+ assembler to set private flags. Used by the PowerPC ELF support
+ to set that a particular object file was assembled with the
+ -mrelocatable option.
+
+ * targets.c (BFD_JUMP_TABLE_COPY): Add intiialization of the
+ bfd_merge_private_bfd_data and bfd_set_private_flags function
+ vectors.
+
+ * bfd-in2.h, libbfd-in.h: Rebuild with bfd.c and targets.c
+ changes.
+
+ * elf32-ppc.c (ppc_elf_set_private_flags): New function to set the
+ ELF e_flags field.
+ (ppc_elf_copy_private_bfd_data): Copy the e_flags field from the
+ input file to the output file.
+ (ppc_elf_merge_private_bfd_data): Check for a mismatch between the
+ e_flags field of all of the linker input files.
+
+ * libelf.h (elf_obj_tdata): Add ppc_flags_init field so that the
+ PowerPC support can check if compataible e_flags are present.
+
+ * aout-target.h: Add NOP for the bfd_merge_private_bfd_data
+ and bfd_set_private_flags function vectors.
+ * coffcode.h: Ditto.
+ * elf32-target.h: Ditto.
+ * elf64-target.h: Ditto.
+ * libbfd.h: Ditto.
+ * libecoff.h: Ditto.
+ * som.c: Ditto.
+
+Wed Mar 8 00:53:54 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * cpu-mips.c (arch_info_struct): Add mips:8000 entry.
+
+ * elfcode.h (swap_out_syms): Mark an undefined BSF_WEAK symbol as
+ STB_WEAK rather than STB_GLOBAL.
+
+Tue Mar 7 12:23:47 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (bfd_coff_backend_data): Add new field
+ _bfd_coff_adjust_symndx.
+ (bfd_coff_adjust_symndx): Define.
+ (coff_adjust_symndx): Define as NULL if not already defined.
+ (bfd_coff_std_swap_table): Initialize new field to
+ coff_adjust_symndx.
+ * cofflink.c (coff_link_input_bfd): Call coff_adjust_symndx if it
+ is defined.
+ * coff-a29k.c (coff_a29k_adjust_symndx): New static function.
+ (coff_adjust_symndx): Define before including coffcode.h.
+ * libcoff.h: Rebuild.
+
+ * format.c (bfd_check_format_matches): Skip binary_vec when
+ searching through bfd_target_vector.
+
+ * elfcode.h (elf_sort_hdrs): Check SHT_NOBITS before checking
+ sh_size.
+
+Mon Mar 6 23:31:36 1995 Doug Evans <dje@chestnut.cygnus.com>
+
+ * elfcode.h (elf_sort_hdrs): Keep SHT_NOBITS sections after
+ !SHT_NOBITS ones.
+
+Mon Mar 6 09:53:08 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * cpu-hppa.c (arch_info_struct): Support both PA1.0 and PA1.1
+ machine types.
+ (bfd_hppa_arch): Link in both PA1.0 and PA1.1 architecture info
+ structures.
+ * libhppa.h (enum pa_arch): New enumeration to describe the
+ different variants of the PA architecture.
+ * som.c (som_object_setup): Use new enumeration to set machine
+ type.
+ (som_finish_writing): If the machine type is PA1.1, then use the
+ PA1.1 machine identifier in the output file.
+
+Thu Mar 2 15:58:24 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,swap_ext_reloc_in)): Treat the index of a
+ base relative reloc as an index into the symbol table, regardless
+ of the setting of r_extern.
+ (NAME(aout,swap_std_reloc_in)): Likewise.
+
+ * aoutx.h (NAME(aout,set_section_contents)): Double check that the
+ caller is writing to a valid section.
+
+Thu Mar 2 14:37:57 1995 Bryan Ford <baford@cs.utah.edu>
+
+ * binary.c: Add support for reading binary files. Loads the raw
+ contents of the file into a data section and wraps some symbols
+ around it. The symbols `_binary_<filename>_start' and
+ `_binary_<filename>_end' indicate the start and end of the data,
+ while `_binary_<filename>_size' is an absolute symbol whose value
+ is the size of the data. <filename> is the name of the binary
+ input file, with all non-alphanumeric characters converted to
+ underscores.
+
+ * archures.c (bfd_arch_get_compatible): Assume users knows what
+ they're doing if one of the architectures is bfd_arch_unknown.
+
+Wed Mar 1 17:30:46 1995 Michael Meissner <meissner@cygnus.com>
+
+ * elf32-ppc.c (elf_powerpc_howto_table): For relocation
+ R_PPC_GOT16, change complain_on_overflow to be
+ complain_overflow_signed.
+
+Wed Mar 1 11:52:55 1995 Jason Molenda <crash@phydeaux.cygnus.com>
+
+ * configure.host: Recognize powerpc-*-aix*.
+
+Wed Mar 1 11:57:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i960.c (COFF_PAGE_SIZE): Define.
+
+ * configure.in: Rewrite output of TDEFAULTS to avoid relying on
+ semantics of single quotes in parameter substitution.
+
+Tue Feb 28 12:53:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_sort_hdrs): Sort empty sections before non-empty
+ sections, if they have the same VMA.
+
+ * config.bfd (i[345]86-*-linuxelf*): New target. Use i386-lelf.
+ (i[345]86-*-gnuelf*): New target. Use i386-gelf.
+ * config/i386-lelf.mt: New file.
+ * config/i386-gelf.mt: New file.
+
+Mon Feb 27 12:58:25 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * config.bfd: add a29k-*-vxworks configuration.
+
+Wed Feb 22 14:40:26 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * libaout.h (NAME(aout,slurp_reloc_table)): Change declaration to
+ use reloc_howto_type rather than const struct reloc_howto_struct.
+
+Tue Feb 21 18:19:22 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bout.c (b_out_slurp_reloc_table): Don't return an error if asked
+ for relocations for the .bss section.
+
+Tue Feb 21 15:13:05 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_ar_write_symbol_stuff): Handle objects with odd
+ lengths.
+
+Fri Feb 17 12:34:36 1995 Michael Meissner <meissner@cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_got16_reloc): Make GOT style relocs add
+ 32768, so the GOT pointer can point to 16384 pointers, instead of
+ 8192.
+
+Fri Feb 17 11:45:38 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * hosts/sysv4.h: Include <unistd.h>, <stdlib.h>, and <time.h>.
+ Only define SEEK_SET and SEEK_CUR if they are not already defined.
+ Remove all external function declarations.
+
+ * syms.c (bfd_decode_symclass): Return 'W' for a weak symbol.
+
+ * coffgen.c (coff_real_object_p): Set start address and flags
+ before calling coff_mkobject_hook. Restore them on failure.
+ * ecoff.c (_bfd_ecoff_mkobject_hook): If not ECOFF_AOUT_ZMAGIC,
+ clear D_PAGED.
+
+ * coffgen.c: Reindented.
+
+Thu Feb 16 14:37:23 1995 Doug Evans <dje@cygnus.com>
+
+ * reloc.c (bfd_perform_relocation): Don't use bitpos in overflow
+ calculations.
+ (bfd_install_relocation): Likewise.
+
+Thu Feb 16 13:22:29 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * hosts/std-host.h: Remove all function declarations which return
+ int or void, except the one for free.
+
+Wed Feb 15 14:54:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (elf_powerpc_howto_table): Use a destination mask of
+ 0xffffffff for R_PPC_REL32, not 0.
+ (powerpc_reloc_map): Add low 16 bit, high 16 bit, and high 16 bit
+ adjusted relocations.
+
+Tue Feb 14 17:47:17 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (struct mips_elf_find_line): Define.
+ (mips_elf_find_nearest_line): New static function.
+ (bfd_elf32_find_nearest_line): Define.
+ * libelf.h (struct elf_obj_tdata): Add find_line_info field.
+
+ * ecoff.c (_bfd_ecoff_swap_tir_in): Move to ecofflink.c.
+ (_bfd_ecoff_swap_tir_out): Likewise.
+ (_bfd_ecoff_swap_rndx_in): Likewise.
+ (_bfd_ecoff_swap_rndx_out): Likewise.
+ (cmp_fdrtab_entry): Likewise.
+ (mk_fdrtab): Likewise.
+ (lookup): Likewise.
+ (_bfd_ecoff_find_nearest_line): Just call _bfd_ecoff_locate_line
+ to do most of the work. Allocate find_line_info if necessary.
+ * ecofflink.c: Include "aout/stab_gnu.h".
+ (_bfd_ecoff_swap_tir_in): Move in from ecoff.c.
+ (_bfd_ecoff_swap_tir_out): Likewise.
+ (_bfd_ecoff_swap_rndx_in): Likewise.
+ (_bfd_ecoff_swap_rndx_out): Likewise.
+ (cmp_fdrtab_entry): Likewise. Use PTR instead of void *.
+ (mk_fdrtab): Move in from ecoff.c. Add debug_info, debug_swap,
+ and line_info arguments, and use them instead of ecoff_data.
+ (fdrtab_lookup): Move in from lookup in ecoff.c. Remove abfd
+ argument, add line_info argument. Use it instead of ecoff_data.
+ (_bfd_ecoff_locate_line): New function, mostly from the old
+ _bfd_ecoff_find_nearest_line in ecoff.c.
+ * libecoff.h (ecoff_data_type): Remove find_buffer, fdrtab_len and
+ fdrtab fields, replacing them find_line_info field.
+ (_bfd_ecoff_swap_tir_in): Declare.
+ (_bfd_ecoff_swap_tir_out): Declare.
+ (_bfd_ecoff_swap_rndx_in): Declare.
+ (_bfd_ecoff_swap_rndx_out): Declare.
+ * libbfd-in.h (_bfd_ecoff_locate_line): Declare.
+ * libbfd.h: Rebuild.
+ * configure.in: Don't use ecoff.o for bfd_elf32_bigmips_vec or
+ bfd_elf32_littlemips_vec.
+ * Makefile.in: Rebuild dependencies.
+
+Tue Feb 14 14:04:22 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libelf.h (elf_backend_data): Add fields elf_machine_alt1 and
+ elf_machine_alt2 which provide alternate versions of the machine
+ code.
+
+ * elf32-ppc.c (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Define to
+ recognize old versions of the PowerPC machine code.
+
+ * elf32-target.h (elf32_bed): Initialize alternate machine code
+ fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
+
+ * elf64-target.h (elf64_bed): Initialize alternate machine code
+ fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
+
+ * elfcode.h (elf_object_p, elf_core_file_p): In addition to the
+ main machine code field, check the two alternate machine code
+ fields.
+
+Tue Feb 14 12:46:48 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutf1.h (MACHTYPE_OK): Don't define if already defined. Don't
+ accept M_SPARC if bfd_arch_sparc is not in the list of supported
+ architectures, and don't accept a 680x0 machine type if
+ bfd_arch_m68k is not in the list of supported architectures.
+ * aout0.c (MACHTYPE_OK): Define.
+
+Mon Feb 13 23:25:38 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,swap_ext_reloc_in)): Don't return a pointer
+ to garbage if the symbol index is out of range.
+ (NAME(aout,swap_std_reloc_in)): Likewise.
+
+Thu Feb 9 18:36:52 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (BFD32_BACKENDS): Add i386msdos.o.
+
+Thu Feb 9 12:02:35 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * i386linux.c (NEEDS_SHRLIB): Define.
+ (linux_tally_symbols): Crash if a NEEDS_SHRLIB symbol is
+ undefined. From hjl@nynexst.com (H.J. Lu).
+
+Wed Feb 8 17:26:00 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (generic_link_check_archive_element): Allocate common
+ symbol information structure. Don't bother to check for common
+ symbol size overflow.
+ (_bfd_generic_link_add_one_symbol): Likewise.
+ * aoutx.h (aout_link_check_ar_symbols): Likewise.
+ * linker.c (generic_link_check_archive_element): Adjust references
+ to common symbol information for new structure.
+ (_bfd_generic_link_add_one_symbol): Likewise.
+ * aoutx.h (aout_link_check_ar_symbols): Likewise.
+ (aout_link_add_symbols): Likewise.
+ * ecoff.c (ecoff_link_add_externals): Likewise.
+ * elfcode.h (elf_link_add_object_symbols): Likewise.
+ (elf_link_output_extsym): Likewise.
+ * sunos.c (sunos_add_one_symbol): Likewise.
+
+Wed Feb 8 09:53:42 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
+
+Tue Feb 7 16:27:33 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_find_nearest_line): Just return false, don't
+ abort.
+
+Tue Feb 7 14:43:33 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * ecoff.c: Reformatted some comments and brace constructs in
+ recent changes to GNU style.
+ (cmp_fdrtab_entry, mk_fdrtab, lookup): Use old-style function
+ definitions.
+
+Tue Feb 7 14:21:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoffswap.h (ecoff_swap_pdr_in): Zero out intern before setting
+ any of the fields.
+
+Mon Feb 6 20:01:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Sat Feb 4 14:20:24 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
+
+ * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_out): added
+ internalizing/externalizing new "prof" field.
+
+ * libecoff.h (ecoff_tdata): added fdrtab.
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): Fixed.
+
+Mon Feb 6 14:25:24 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * libelf.h (struct elf_link_hash_table): Add saw_needed field.
+ * elfcode.h (elf_link_add_object_symbols): Set saw_needed if
+ DT_NEEDED seen in .dynamic section.
+ (elf_link_output_extsym): Warn if an undefined symbol is
+ only referenced from a dynamic object, and not making a shared
+ object, and saw_needed is false.
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize saw_needed.
+
+ * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define.
+ * elfcode.h (elf_link_add_object_symbols): Don't clear or set
+ ELF_LINK_HASH_DEFINED_WEAK.
+ (elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK.
+
+ Distinguish a weak defined symbol from a regular defined symbol.
+ * linker.c (enum link_action): Add DEFW.
+ (link_action): Add bfd_link_hash_defweak column.
+ (_bfd_generic_link_add_one_symbol): Add DEFW case. Handle
+ bfd_link_hash_defweak in a few other cases.
+ * Many files (bfd_link_hash_undefweak): Renamed from
+ bfd_link_hash_weak.
+ * aoutx.h (aout_link_write_symbols): Handle bfd_link_hash_defweak.
+ (aout_link_write_other_symbol): Likewise.
+ (aout_link_input_section_std): Likewise.
+ (aout_link_input_section_ext): Likewise.
+ * bout.c (get_value): Likewise.
+ * coff-a29k.c (coff_a29k_relocate_section): Likewise.
+ * coff-alpha.c (alpha_convert_external_reloc): Likewise.
+ (alpha_relocate_section): Likewise.
+ * coff-mips.c (mips_relocate_section): Likewise.
+ (mips_relax_section): Likewise.
+ (bfd_mips_ecoff_create_embedded_relocs): Likewise.
+ * cofflink.c (coff_write_global_sym): Likewise.
+ (_bfd_coff_generic_relocate_section): Likewise.
+ * ecoff.c (ecoff_link_add_externals): Likewise.
+ (ecoff_link_write_external): LIkewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_size_stubs): Likewise.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
+ (elf_i386_relocate_section): Likewise.
+ (elf_i386_finish_dynamic_symbol): Likewise.
+ * elf32-mips.c (mips_elf_output_extsym): Likewise.
+ (mips_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+ (elf32_sparc_relocate_section): Likewise.
+ * elfcode.h (elf_link_add_object_symbols): Likewise.
+ (elf_adjust_dynamic_symbol): Likewise.
+ (elf_bfd_final_link): Likewise.
+ (elf_link_output_extsym): Likewise.
+ * i386linux.c (linux_add_one_symbol): Likewise.
+ (linux_tally_symbols): Likewise.
+ (linux_finish_dynamic_link): Likewise.
+ * linker.c (_bfd_generic_link_output_symbols): Likewise.
+ (set_symbol_from_hash): Likewise.
+ * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
+ (bfd_perform_slip): Likewise.
+ * sunos.c (sunos_add_one_symbol): Likewise.
+ (sunos_scan_std_relocs): Likewise.
+ (sunos_scan_ext_relocs): Likewise.
+ (sunos_scan_dynamic_symbol): Likewise.
+ (sunos_write_dynamic_symbol): Likewise.
+
+Mon Feb 6 03:20:17 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Changes from Bryan Ford, baford@schirf.cs.utah.edu:
+ * config.bfd (i[345]86-*-msdos*): New target.
+ * configure.in (i386msdos_vec): Handle it.
+ * i386msdos.c: New file.
+ * config/i386-msdos.mt: New file.
+ * bfd.c (enum bfd_error): Added new value bfd_error_file_too_big.
+ (bfd_errmsgs): Added string to table.
+ * libaout.h (reloc_type-lookup): Declare it.
+ * targets.c (enum bfd_flavour): Added bfd_target_msdos_flavour.
+ (i386msdos_vec): Declare.
+ (bfd_target_vector): Add it to the list.
+ * bfd-in2.h: Regenerated.
+
+Wed Feb 1 01:32:14 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_set_reloc_info, case R_DATA_ONE_SYMBOL): If there's
+ nothing in R_DATA_OVERRIDE, then try to find the addend in the
+ section's contents.
+ (som_write_fixups): Ignore the addend in a R_DATA_ONE_SYMBOL fixup.
+
+ * som.c (som_object_setup): More heruistics to detect the
+ braindamaged HP OSF1 linker.
+ (setup_sections): Don't forget to free subspace_sections if we get
+ an error.
+ (som_slurp_string_table): Allocate strings on this bfd's obstack
+ rather than directly out of the heap.
+ (som_slurp_symbol_table): Likewise for the saved copy of the
+ canonical symbols.
+ (som_slurp_reloc_table): Likewise for the saved copy of the
+ canonical relocations. Free the native relocations when we're
+ done with them.
+
+Tue Jan 31 21:53:28 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libelf.h (struct elf_obj_tdata): New member program_header_size.
+ * elfcode.h (get_program_header_size): New parameters sorted_hdrs,
+ count, and maxpagesize. All callers updated.
+ If sorted_hdrs is non-NULL, use it to compute the number of segments.
+ Save result in case called again.
+ (assign_file_positions_except_relocs): Sort headers before calling
+ get_program_header_size.
+
+Tue Jan 31 15:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (map_program_segments): Add sorted_hdrs parameter.
+ Search through it rather than through unsorted section headers.
+ (assign_file_positions_except_relocs): Pass sorted_hdrs to
+ map_program_segments.
+
+Mon Jan 30 22:04:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): Fix problems in range
+ checking. Expect argument OFFSET to be section-relative. From
+ David Mosberger-Tang, davidm@piston.cs.arizona.edu.
+
+Mon Jan 30 11:22:11 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (NAME(bfd_elf,record_link_assignment)): Don't do
+ anything if we are not linking an ELF file.
+ (NAME(bfd_elf,size_dynamic_sections)): Likewise.
+
+Sat Jan 28 12:48:57 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (compare_subspaces): New function to sort subspaces by
+ their location in the object file.
+ (setup_sections): When computing the index for each subspace,
+ handle case where setup_sections reads the subspaces in a
+ different order that they appear in the object file.
+ (som_is_space): Also examine the output section for the containing
+ section.
+ (som_is_subspace, som_is_container): Likewise.
+ (som_begin_writing): Don't prepare or write fixups here. When
+ writing the symbol strings, use the unsorted symbol table.
+ (som_write_object_contents): Don't write the symbol table here.
+ (som_finish_writing): Prepare and write the fixups here. Likewise
+ for the symbol table.
+ (som_bfd_derive_misc_symbol_info): Undefined symbols always have
+ type SS_UNSAT regardless of BSF_EXPORT.
+ (som_set_reloc_info): Unpack and attach argument location
+ information for R_PCREL_CALL and R_ABS_CALL relocations.
+
+ * som.c (som_object_setup): New heuristic to determine if the
+ entry and flags fields are switched in the exec header.
+
+Sat Jan 28 00:16:01 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_link_add_object_symbols): Use *sym_hash instead
+ of h if we might not be doing an ELF link.
+
+Fri Jan 27 16:13:42 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_final_link): If the size of an input
+ .reginfo section is zero, force it to the correct size, since the
+ linker emulation code may have clobbered it.
+
+ * elfcode.h (elf_sort_hdrs): Correct SHF_ALLOC test.
+ (assign_file_positions_except_relocs): Free sorted_hdrs.
+
+Thu Jan 26 09:00:12 1995 Steve Chamberlain <sac@splat>
+
+ * srec.c (srec_set_section_contents): Fix off by
+ one end address calculation.
+
+ * config.bfd: (m68*-est-coff): New configuration.
+
+Thu Jan 26 11:39:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_link_add_object_symbols): Only examine weakdef if
+ we are using an ELF hash table.
+
+ * aoutx.h (NAME(aout,some_aout_object_p)): Always set EXEC_P if
+ the start address is in the .text section, even if STAT_FOR_EXEC
+ is set. Just use STAT_FOR_EXEC as an additional test.
+
+Thu Jan 26 11:12:54 1995 Michael Meissner <meissner@cygnus.com>
+
+ * elfcode.h (prep_headers): Use EM_PPC instead of
+ EM_CYGNUS_POWERPC.
+
+ * elf32-ppc.c (reloc_type): Add all System V.4 and eABI
+ relocations currently defined.
+ (powerpc_reloc_map): Adjust to new relocation names.
+ (elf_powerpc_howto_table): Add most of the new relocations.
+ (ELF_MACHINE_CODE): Use EM_PPC instead of EM_CYGNUS_POWERPC.
+
+ * config.bfd: Add support for powerpc-*-eabi.
+
+ * config/ppc-elf.mt: Add rs6000 architecture support to the
+ PowerPC. Also add XCOFF support.
+
+Wed Jan 25 23:26:13 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (CALC_ADDEND): Don't define.
+ (coff_sh_relocate_section): Remove.
+ (coff_relocate_section): Use _bfd_coff_generic_relocate_section.
+
+Tue Jan 24 14:22:47 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elf32-mips.c (mips_elf_output_extsym): Set the value of the
+ ECOFF symbol from the hash table entry.
+
+Mon Jan 23 14:53:35 1995 Steve Chamberlain <sac@splat>
+
+ * coff-sh.c (coff_sh_relocate_section): Don't subtract
+ vma twice.
+
+Mon Jan 23 13:33:18 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * coff-sh.c (sh_reloc): Don't ignore the previous contents of an
+ R_SH_IMM32 reloc.
+
+ * config.bfd (i[345]86-*-gnu*): Set bfd_name to i386-gnu.
+ * config/i386-gnu.mt: New file. Include ELF support.
+
+ * opncls.c (bfd_openstreamr): Call bfd_cache_init.
+
+Fri Jan 20 11:44:45 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * sunos.c (sunos_add_one_symbol): Only set the sunos specific
+ fields if we are doing a sunos link.
+
+Wed Jan 18 12:28:17 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * cpu-h8300.c (h8300_info_struct): Change name from "H8/300" to
+ "h8300" for consistency with other cpu-* files.
+ (h8300h_info_struct): Change name from "H8/300H" to "h8300h".
+ * coff-h8300.c (special): Remove unused variable diff.
+
+Tue Jan 17 10:52:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * bfd-in.h (bfd_byte, reloc_howto_type): Define here, not...
+ * reloc.c (bfd_byte, reloc_howto_type): here.
+ * Changed all occurrences of ``const struct reloc_howto_struct''
+ to be ``reloc_howto_type'' instead.
+ * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
+
+ * opncls.c (bfd_openstreamr): New function.
+ * bfd-in2.h: Rebuilt.
+
+ * elf32-mips.c (enum reloc_type): Define new relocs used on Irix.
+ (elf_mips_howto_table): Add entries for new relocs.
+ (mips_elf_section_from_shdr): Handle SHT_MIPS_MSYM,
+ SHT_MIPS_DWARF, and SHT_MIPS_EVENTS.
+ (mips_elf_fake_sections): Handle sections named .msym, .debug_*
+ and .MIPS.events.*.
+
+ * srec.c (srec_init): Remove unused local variable i.
+
+Sat Jan 14 19:09:48 1995 Steve Chamberlain <sac@jonny>
+
+ * archures.c, Makefile.in, targets.c, bfd-in2.h, coffcode.h,
+ config.bfd, configure.in, config/w65.mt: Initial support for the W65.
+
+Sun Jan 15 13:57:45 1995 Steve Chamberlain <sac@splat>
+
+ * opncls.c (bfd_fdopenr): Configure for WIN32.
+
+Thu Jan 12 16:30:47 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (diststuff): Include `headers'.
+
+ * sunos.c (m68k_plt_first_entry, sparc_plt_first_entry): Now
+ const.
+ * tekhex.c (digs): Ditto.
+ * elf32-i386.c (elf_i386_plt0_entry, elf_i386_plt_entry): Ditto.
+
+ * srec.c, tekhex.c: Include libiberty.h. Delete static array
+ hex_value and replace references to it with references to
+ hex_init, hex_p, and hex_value.
+ * Makefile.in: Updated dependencies.
+
+ * archures.c (archures_init_table): Now const.
+ (bfd_arch_init): Adjusted type of local var `ptable'.
+
+Thu Jan 12 09:33:24 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * hosts/symmetry.h: Redefine `shared' to enable compilation
+ with the native Dynix cc compiler.
+ * i386dynix.c: Include aoutx.h instead of using routines
+ from aout32.c.
+
+Wed Jan 11 21:31:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * reloc.c (reloc_howto_type): Make typedef include `const'.
+ * aout-ns32k.c, aoutx.h, bout.c, cf-m68klynx.c, coff-i386.c,
+ coff-i960.c, coff-m68k.c, cofflink.c, cpu-ns32k.c, ecoff.c,
+ elf32-hppa.c, elf32-i386.c, elf32-mips.c, elf32-sparc.c,
+ elfcode.h, libbfd-in.h, linker.c, mipsbsd.c, nlm32-ppc.c, oasys.c,
+ reloc.c, som.c: Don't use `const' in combination with
+ `reloc_howto_type'.
+ * bfd-in2.h, libbfd.h: Regenerated.
+
+ * ecoff.c (ecoff_type_to_string): Local variable `buffer1' doesn't
+ need to be static.
+
+Wed Jan 11 14:36:41 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * sunos.c (sunos_add_one_symbol): Don't core dump if a multiple
+ definition of an absolute symbol is encountered.
+
+ * linker.c (_bfd_generic_link_add_one_symbol): Ignore
+ redefinitions of an absolute symbol to the same value.
+
+Mon Jan 9 15:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_link_add_object_symbols): It's reasonable for no
+ flags to be set, so don't insist otherwise.
+
+Fri Jan 6 16:39:40 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_slurp_symbol_table): Don't set BSF_GLOBAL for an
+ undefined or common symbol.
+ (elf_link_add_object_symbols): Likewise.
+
+Wed Jan 4 14:14:05 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (bfd_section_from_som_symbol): Only return sections which
+ correspond to subspaces.
+
+ * som.c (som_begin_writing): Don't forget to bump the
+ total_subspaces when writing the unloadable subspaces.
+
+Wed Dec 28 20:54:47 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identify
+ bss-like sections.
+ (som_get_section_contents): Likewise.
+ (som_set_section_contents): Likewise.
+
+Tue Dec 27 14:03:47 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (setup_sections): Turn off SEC_HAS_CONTENTS for bss-like
+ sections.
+
+Tue Dec 20 15:30:12 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * coffgen.c (bfd_debug_section): Deleted.
+ (coff_section_from_bfd_index): Return absolute section for debug
+ symbol.
+ (coff_write_symbol): Set BSF_DEBUGGING for C_FILE symbols. If
+ BSF_DEBUGGING is set, set section to N_DEBUG.
+ (coff_bfd_make_debug_symbol): Use absolute section.
+
+ * elfcode.h (assign_file_positions_except_relocs): In assertion,
+ force all values to the same type.
+
+Tue Dec 20 11:11:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * coff-h8300.c (howto_table): All relocs get a special function.
+ (special): Never do anything when linking -r.
+
+Tue Dec 20 13:58:01 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * i386linux.c (linux_add_one_symbol): Don't do anything Linux
+ specific if this is not a Linux hash table. From Eric Youngdale
+ <eric@aib.com>.
+
+ Patches from kkojima@mix.or.jp (Kazumoto Kojima):
+ * mipsbsd.c (mips_howto_table_ext): Change sizes of memory relocs
+ apply to from two bytes to four bytes.
+ * MY(reloc_howto_type_lookup): Handle BFD_RELOC_CTOR.
+
+ * elf32-i386.c (elf_i386_relocate_section): Correct and expand the
+ list of cases for which relocation need not be computed.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+Mon Dec 19 23:09:16 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_read_symext_info): Delete do_locals and
+ do_globals arguments, always read symbol extension information for
+ globals and locals. All callers changed.
+ (elf32_hppa_size_stubs): Rework to only read symbol extension
+ information once for each input bfd. 10% improvement in linker
+ performance.
+
+Fri Dec 16 12:28:46 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_section_from_bfd_section): Check
+ bfd_is_abs_section, etc., only after checking for the section in
+ the BFD and after calling the backend routine.
+
+Wed Dec 14 20:21:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_map_symbols): Only use section symbols whose
+ value is the start of the section, checking output_offset when
+ using output_section. When creating a new symbol, set the value
+ to 0, since BFD symbol values are section relative.
+
+Tue Dec 13 13:31:06 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * cpu-z8k.c (arch_info_struct): Make z8002 the default
+ architecture.
+
+Fri Dec 9 12:43:05 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_bfd_link_add_symbols): If the first object in the
+ archive is not an ELF object, pass the archive to the add_symbols
+ entry point appropriate for the first object. From Eric Youngdale
+ <eric@aib.com>.
+ * aoutx.h (NAME(aout,link_add_symbols)): Similar change if the
+ first object is not an a.out object.
+
+ * elf32-i386.c (elf_i386_relocate_section): Don't compute
+ relocation in cases where we won't use it.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+Thu Dec 8 14:19:41 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * pc532-mach.c (NAME): Define to use ns32kaout prefix.
+ * ns32knetbsd.c (NAME): Ditto.
+ (ns32kaout_32_get_section_contents): Define to standard aout-32
+ version.
+
+Fri Dec 2 13:56:49 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
+
+ * coff-mips.c (mips_read_relocs): New static function, broken out
+ of mips_relax_section.
+ (mips_relax_section): Call mips_read_relocs.
+ (bfd_mips_ecoff_create_embedded_relocs): New function.
+ * bfd-in.h (bfd_mnips_ecoff_create_embedded_relocs): Declare.
+ * bfd-in2.h: Rebuild.
+
+Wed Nov 30 14:12:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-sh.c: Use _bfd_dummy_target instead of no_archive.
+
+Tue Nov 29 14:00:19 1994 J.T. Conklin <jtc@.rtl.cygnus.com>
+
+ * config.bfd (i[345]86-*-freebsd*): Use i386-bsd as bfd_name.
+ * configure.host (i[345]86-*-freebsd*): Use i386bsd as my_host.
+
+Mon Nov 28 15:36:04 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * config/m68k-nbsd.mt (DEFAULT_VECTOR): set to m68knetbsd_vec.
+ * Makefile.in: Rebuilt dependancies.
+ (CFILES): Added m68knetbsd.c.
+ (HFILES): Added netbsd.h.
+
+Wed Nov 23 19:21:41 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * coff-sh.c (shlcoff_vec): New target vector.
+ (no_archive): New function.
+ * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle
+ little endian SH.
+ * configure.in: Handle shl.
+ * targets.c (bfd_target_vector): Add shlcoff_vec.
+ * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
+
+Wed Nov 23 10:50:13 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (write_relocs): Do not subtract the section's vma from
+ the reloc's offset when writing .o's. Instead add the section's
+ vma to the reloc's offset when writing an executable or shared
+ library.
+
+Tue Nov 22 23:34:37 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Do not add
+ input_section->vma to the relocation's offset.
+
+Mon Nov 21 12:37:25 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * srec.c (srec_get_reloc_upper_bound): Define.
+ (srec_canonicalize_reloc): Define.
+ (srec_bfd_reloc_type_lookup): Define.
+ (srec_vec, symbolsrec_vec): Use BFD_JUMP_TABLE_RELOCS (srec).
+
+Sat Nov 19 03:10:51 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.host (i[345]86-*-solaris*): Use solaris2 to
+ enable extraction of procfs info from core file for GDB.
+
+Thu Nov 17 17:37:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+Thu Nov 17 13:12:08 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * bfd/elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the
+ vma from the output_section containing $global$ when computing
+ global_vlaue.
+
+Thu Nov 17 14:29:13 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * archive.c (_bfd_write_archive_contents): Round up the archive
+ header size of the extended name table to an even number.
+
+Wed Nov 16 16:08:06 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * coff-sh.c: Deleted some code that was commented out or inside
+ "#if 0".
+ (COFF_LONG_FILENAMES): Define.
+
+ * cpu-sh.c (arch_info_struct): Convert name to lowercase, for
+ consistency with other architectures.
+
+Sat Nov 12 23:50:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_export_symbol): Also export symbols which are
+ referenced by a regular file.
+
+Fri Nov 11 14:29:31 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add
+ export_dynamic argument, and handle it.
+ (elf_export_symbol): New function.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
+ (bfd_elf64_size_dynamic_sections): Update declaration.
+ * bfd-in2.h: Rebuild.
+
+Fri Nov 11 10:35:33 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hpux-core.c (hpux_core_struct): Delete handles for the
+ data, reg and stack sections. They're never used. Delete
+ accessor macros.
+ (make_bfd_asection): Use bfd_make_section_anyway since debugging
+ cores from dynamic executables may have several sections with the
+ same logical name.
+ (hpux_core_core_file_p): Don't save handles to data, reg and
+ stack sections. Handle CORE_TEXT, CORE_MMF and CORE_SHM.
+
+Tue Nov 8 13:03:30 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * bout.c (callj_callback): Add new argument shrinking. Change all
+ callers. Handle relocs against section symbols correctly. If not
+ shrinking, don't subtract out dstidx; the subtraction is already
+ in the object file.
+
+Sun Nov 6 12:52:00 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.h: Conditionally include <shl.h> and <dl.h>.
+
+Thu Nov 3 18:19:13 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (ALL_MACHINES): Include m68knetbsd.o.
+
+ * config/i386linux.mh (EXTRALIBS): Include -lm.
+
+ Patches from DJ Delorie:
+ * coff-go32.c: Replacement file, uses coff-i386.c with minor
+ changes.
+ * coff-i386.c (TARGET_UNDERSCORE): allow other files to override
+ underscore also
+ * makefile.dos: del ctor.o, add cofflink.o and elf32.o
+
+ * aoutx.h (adjust_o_magic): If user set data section vma, use it
+ to determine the default bss vma. Patch from Takada Hiroaki,
+ hiro@is.s.u-tokyo.ac.jp.
+ (machine_type, case bfd_arch_vax): Set *unknown to false. Patch
+ from John David Anglin <dave@hiauly1.hia.nrc.ca>.
+
+ * configure.in (tb): Rename ns32knetbsd_vec to pc532netbsd_vec,
+ since that's what it's called.
+
+Wed Nov 2 15:24:51 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * archive.c (normalize): Change to take a BFD as an argument.
+ Change VMS version to use bfd_alloc rather than malloc, so that we
+ don't lose the memory forever.
+ (_bfd_construct_extended_name_table): Check the name of an archive
+ entry which is not being extended, and correct it if it is wrong.
+ This is necessary in case the archive was constructed by another
+ program which put an entry in the extended name table which we
+ don't plan to put in ourselves. From jjc@jclark.com (James
+ Clark).
+ (bfd_dont_truncate_arname): Check return value of normalize.
+
+Mon Oct 31 14:19:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elf32-hppa.c (ELF32_PARISC_SX_SIZE): Define.
+ (ELF32_PARISC_SX_GET, ELF32_PARISC_SX_PUT): Define.
+ (symextn_entry): Don't define.
+ (symext_chain_size): Change type to bfd_size_type.
+ (symextn_contents): Change type to bfd_byte *.
+ (elf32_hppa_backend_begin_write_processing): Use
+ ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).
+ (elf32_hppa_size_symext): Likewise. Also, change type of sizep to
+ bfd_size_type *.
+ (elf_hppa_tc_make_sections): Cast symextn_contents assignment to
+ bfd_byte *. Use ELF32_PARISC_SX_PUT instead of direct assignment.
+ (elf32_hppa_backend_symbol_table_processing): Use
+ ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS). Use
+ ELF32_PARISC_SX_GET insetad of direct assignment.
+ (elf32_hppa_read_symext_info): Change type of contents, and its
+ assignment cast, to bfd_byte *. Use ELF32_PARISC_SX_SIZE instead
+ of sizeof (symextn_entry). Use symext_entryS instead of
+ symextn_entry. Use ELF32_PARISC_SX_GET instead of direct
+ assignment.
+
+ * archive.c (bfd_dont_truncate_arname): Add the ar padding
+ character, if there is room for it, even if the name is the
+ maximum length.
+
+ * elfcode.h (assign_file_positions_except_relocs): Sort the ELF
+ headers by section address when assigning file positions.
+ (elf_sort_hdrs): New static function.
+
+Sun Oct 30 18:56:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Create DT_INIT
+ and DT_FINI dynamic entries based on the existence of _init and
+ _fini symbols, not on the .init and .fini sections. This is
+ compatible with some SVR4 linkers.
+ (elf_bfd_final_link): Corresponding change.
+
+Sat Oct 29 12:18:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't move a
+ symbol with a PLT entry into the .plt section if it is defined in
+ a regular file.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+
+ * linker.c (_bfd_generic_link_add_archive_symbols): It's not an
+ error if an empty archive has no symbol table.
+ * ecoff.c (ecoff_link_add_archive_symbols): Likewise.
+ * elfcode.h (elf_link_add_archive_symbols): Likewise.
+
+Fri Oct 28 10:08:41 1994 J.T. Conklin (jtc@rtl.cygnus.com)
+
+ NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
+ * config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
+ * configure.in (m68knetbsd_vec): Added.
+ * targets.c (bfd_m68knetbsd_vec): Added.
+ * hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
+ * Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
+
+ miscellaneous cleanup required by all netbsd targets, based on work
+ by Andrew Cagney <cagney@highland.com.au>:
+ * netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
+ N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed. Generic a.out
+ definitions work.
+ * i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
+ (MY(write_object_contents)): Use NetBSD's magic numbers
+
+Thu Oct 27 16:59:52 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * libelf.h (struct bfd_elf_section_data): Add field dynindx.
+ * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Don't finalize
+ the .dynsym, .dynstr or .hash sections until after the backend
+ size_dynamic_sections routine, so that it can add dynamic symbols
+ if it wants to.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't define the
+ symbol to be in the .plt section when generating a shared library
+ if it is a defined symbol.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+ (elf32_sparc_size_dynamic_sections): When generating a shared
+ library, allocate space for a dynamic symbol for each output
+ section, storing the index in the dynindx field of the ELF section
+ data. Adjust the other dynindx fields to account for this.
+ (elf32_sparc_adjust_dynindx): New static function.
+ (elf32_sparc_relocate_section): When copying a reloc into a shared
+ library, use the original addend as appropriate. Convert an
+ R_SPARC_32 reloc into an R_SPARC_RELATIVE reloc. Use the dynamic
+ symbol index of the output section, not the normal symbol index.
+ (elf32_sparc_finish_dynamic_sections): Don't die if a section does
+ not exist when setting the value of the dynamic tags. Write out
+ a dynamic symbol for each output section.
+
+Wed Oct 26 01:15:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_link_input_section): Don't bother to read or write
+ the relocs if there aren't any.
+
+Tue Oct 25 11:44:38 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * Makefile.in (ALL_MACHINES): Add tekhex.o.
+ * targets.c (bfd_target_vector): If SELECT_VECS is not defined,
+ include tekhex_vec.
+ * tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
+ (getvalue, getsym, out): Likewise.
+ (find_chunk): Remove unused variable s.
+ (first_phase): Remove unused variable s.
+ (pass_over): Remove unused variable address.
+ (tekhex_object_p): Remove unused variable section.
+ (move_section_contents): Change return type from boolean to void.
+ (tekhex_write_object_contents): Remove unused variables tdata and
+ list.
+
+ * linker.c (enum link_action): Add CIND.
+ (link_action): Change COMMON_ROW\indr from MDEF to CREF. Change
+ INDR_ROW\common from MDEF to CIND.
+ (_bfd_generic_link_add_one_symbol): In CREF case, handle an
+ existing symbol which is indirect rather than defined. Add new
+ CIND case.
+
+Mon Oct 24 15:33:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ Change S-record backend to use multiple sections to handle gaps in
+ file.
+ * srec.c (srec_data_list_struct): Move field next from last place
+ to first. Change type of data to bfd_byte *.
+ (struct srec_symbol): Define.
+ (tdata_type): Remove done_symbol_read, count, strings, symbol_idx,
+ string_size, string_idx. Change type of symbols to struct
+ srec_symbol *. Add symtail and csymbols.
+ (low, high): Remove.
+ (size_symbols, fillup_symbols, size_srec, fillup): Remove.
+ (white, skipwhite, pass_over, object_p): Remove.
+ (srec_mkobject): Call srec_init. Adjust tdata initialization for
+ field changes.
+ (srec_get_byte, srec_bad_byte): New static functions.
+ (srec_new_symbol, srec_scan): New static functions.
+ (srec_object_p): Change type of b to bfd_byte. Explicitly set
+ wrong_format error. Call srec_mkobject and srec_scan instead of
+ object_p.
+ (symbolsrec_object_p): Likewise. Also, change b to be only two
+ bytes.
+ (srec_read_section): New static function.
+ (srec_get_section_contents): Call srec_read_section rather than
+ pass_over. Handle zero length section correctly.
+ (set_set_arch_mach): Change from function to macro.
+ (srec_set_section_contents): Change data to bfd_byte *.
+ (srec_write_record): Change data, end and src to bfd_byte *.
+ (srec_write_header): Change buffer and dst to bfd_byte *.
+ (srec_write_section): Change location to bfd_byte *.
+ (srec_write_terminator): Change buffer to bfd_byte *.
+ (srec_get_symtab_upper_bound): Don't call
+ srec_get_section_contents.
+ (srec_get_symtab): Rewrite.
+
+ * ecoff.c (ecoff_set_symbol_info): Set udata.i to 0, not NULL.
+
+Fri Oct 21 16:43:13 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * libaout.h (machine_type): added M_68K_NETBSD and M_SPARC_NETBSD.
+ * i386netbsd.c, ns32knetbsd.c, sparcnetbsd.c: removed RCS Id's.
+ changed how PAGE_SIZE and SEGMENT_SIZE are defined so they are
+ consistant with each other.
+ * netbsd.h (N_HEADER_IN_TEXT, TEXT_START_ADDR): NetBSD fits its
+ header into the start of its text segment.
+
+Fri Oct 21 17:13:07 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case for
+ _construct_extended_name_table.
+ (bfd_target): Add _bfd_construct_extended_name_table.
+ * archive.c (_bfd_archive_bsd_construct_extended_name_table): New
+ function.
+ (_bfd_archive_coff_construct_extended_name_table): New function.
+ (_bfd_construct_extended_name_table): Renamed by adding a leading
+ underscore, and made externally visible. Added trailing_slash
+ argument, and used it instead of elf_style. Changed type of
+ tablen to bfd_size_type *.
+ (_bfd_write_archive_contents): Use BFD_SEND to call
+ construct_extended_name_table. Use the returned name.
+ * libbfd-in.h (_bfd_construct_extended_name_table): Declare.
+ (_bfd_noarchive_construct_extended_name_table): Define.
+ (_bfd_archive_bsd_construct_extended_name_table): Declare.
+ (_bfd_archive_coff_construct_extended_name_table): Declare.
+ * bfd-in2.h: Rebuild.
+ * libbfd.h: Rebuild.
+ * som.c (som_construct_extended_name_table): New static function.
+ * aout-target.h (MY_construct_extended_name_table): Define.
+ * coff-rs6000.c (rs6000coff_construct_extended_name_table):
+ Define.
+ * ieee.c (ieee_construct_extended_name_table): Define.
+ * libecoff.h (_bfd_ecoff_construct_extended_name_table): Define.
+ * oasys.c (oasys_construct_extended_name_table): Define.
+
+ Fix the ELF linker to not require an interpreter if no dynamic
+ objects were seen, even when linking PIC code.
+ * libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
+ (struct elf_link_hash_table): Add field dynamic_sections_created.
+ * elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
+ doesn't already exist.
+ (elf_link_add_object_symbols): Create dynamic sections based on
+ dynamic_sections_created field, not dynobj field. Don't bother to
+ set dynobj.
+ (elf_link_create_dynamic_sections): If dynamic sections were
+ already created, don't do anything. If dynobj is already set, use
+ it; otherwise, set it to the bfd argument. Don't initialize
+ dynsymcount. Only create dynstr if it does not exist. Set
+ dynamic_sections_created to true.
+ (NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
+ if no dynamic objects were seen.
+ (elf_adjust_dynamic_symbol): If a symbol has the
+ ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
+ (elf_bfd_final_link): Change most decisions based on dynobj to
+ check dynamic_sections_created instead.
+ (elf_link_output_extsym): Only handle dynamic symbols if a dynamic
+ object was seen.
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize new field
+ dynamic_sections_created. Set dynsymcount to 1, not 0.
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Call
+ elf_i386_create_got_section rather than creating the .got and
+ .got.plt sections.
+ (elf_i386_create_got_section): New static function.
+ (elf_i386_check_relocs): Just call elf_i386_create_got_section if
+ a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
+ Only create the .rel.got section, and only make space for a reloc,
+ for a global symbol or when generating a shared object. For a
+ R_386_PLT32 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
+ (elf_i386_adjust_dynamic_symbol): Rework initial assertion to
+ permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols. Create a
+ procedure linkage table entry for such symbols. But, if no
+ dynamic objects were seen, never create a PLT entry.
+ (elf_i386_size_dynamic_sections): If no dynamic objects were seen,
+ skip most of this function, and force the size of the .rel.got
+ section to zero.
+ (elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
+ symbol when no dynamic object was seen, initialize the contents of
+ the .got section. For a R_386_GOT32 against a local symbol, only
+ create a R_386_RELATIVE reloc when generating a shared object.
+ Treat a R_386_PLT32 reloc against a symbol for which we did not
+ create a PLT entry as a R_386_PC32 reloc.
+ (elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
+ entries and the PLT if we saw a dynamic object.
+ * elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
+ setting rightshift to 10. Fix R_SPARC_WPLT20 by setting
+ rightshift to 2, size to 2, bitsize to 30, and dst_mask to
+ 0x3fffffff.
+ (elf32_sparc_create_dynamic_sections): Don't set the size of the
+ .plt section. Call elf32_sparc_create_got_section rather than
+ creating the .got section.
+ (elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
+ a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
+ Only create the .rela.got section, and only make space for a
+ reloc, for a global symbol or when generating a shared object.
+ Set the alignment of the .rela.got section to 2. For a
+ R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
+ (elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
+ permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols. Create a
+ procedure linkage table for such symbols. But, if no dynamic
+ objects were seen, never create a PLT entry. Initialize the size
+ of the .plt section.
+ (elf32_sparc_size_dynamic_sections): If no dynamic objects were
+ seen, skip most of this function, and force the size of the
+ .rela.got section to zero. Strip empty reloc sections, and strip
+ an empty .plt section.
+ (elf32_sparc_relocate_section): For a GOT reloc against a global
+ symbol when no dynamic object was seen, initialize the contents of
+ the .got section. For a GOT reloc against a local symbol, only
+ create a R_SPARC_RELATIVE reloc when generating a shared object.
+ Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
+ create a PLT entry as a R_SPARC_WDISP30 reloc.
+ (elf32_sparc_finish_dynamic_sections): Only fiddle with the
+ dynamic entries and the PLT if we saw a dynamic object.
+
+Thu Oct 20 13:28:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_map_symbols): Don't worry about section symbols
+ in a section not owned by any BFD.
+ (elf_section_from_bfd_section): Separate out loop which calls
+ backend routine. Check bfd_section and call the backend routine
+ even for a section not owned by any BFD.
+ * elf32-mips.c (mips_elf_section_from_bfd_section): Handle
+ .acommon section.
+
+Wed Oct 19 13:28:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * coffgen.c (coff_print_symbol): Make names for section number and
+ storage class slightly more verbose. It's not clear how many
+ characters I can justify using up, but before this change they
+ both were abbreviated "sc" which is (IMHO) clearly unacceptable.
+
+Wed Oct 19 01:26:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * binary.c (binary_set_section_contents): Set the base file
+ position from the lowest section VMA, not the start address.
+
+ * aoutx.h (NAME(aout,slurp_symbol_table)): Don't return an error
+ if there are no symbols.
+ * coffgen.c (coff_get_normalized_symtab): Likewise.
+ * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
+
+Tue Oct 18 12:56:43 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * aout-target.h (MY_bfd_copy_private_section_data): Only copy
+ subformat to another bfd_target_aout_flavour file.
+
+ * binary.c: New file for raw binary output format.
+ * Makefile.in (BFD_LIBS): Add binary.o.
+ (CFILES): Add binary.c.
+ * targets.c (binary_vec): Declare.
+ (bfd_target_vector): Include binary_vec.
+
+ * srec.c (tdata_type): Add field tail.
+ (srec_mkobject): Initialize tail.
+ (srec_set_section_contents): Sort S record list by address.
+
+Mon Oct 17 11:38:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_map_symbols): Sort the symbols into a new array,
+ rather than messing with Elf_Sym_Extra. Store the symbol index in
+ the udata.i field.
+ (swap_out_syms): Use outbound_syms as a pointer rather than as an
+ array. Don't worry about elf_sym_num.
+ * libelf.h (struct elf_sym_extra): Don't define.
+ (Elf_Sym_Extra): Don't define.
+ (struct elf_obj_tdata): Remove sym_extra field.
+ (elf_sym_extra): Don't define.
+ * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Use
+ udata.i rather than elf_sym_extra array.
+
+ * syms.c (asymbol): Change udata field into a union.
+ * bfd-in2.h: Rebuild.
+ * aoutx.h (NAME(aout,translate_symbol_table)): Use udata.p rather
+ than just udata.
+ * bout.c (perform_slip): Likewise.
+ * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
+ * ieee.c (ieee_slurp_external_symbols): Likewise.
+ * linker.c (generic_link_add_symbol_list): Likewise.
+ (default_indirect_link_order): Likewise.
+ * oasys.c (oasys_slurp_symbol_table): Likewise.
+ * reloc16.c (bfd_perform_slip): Likewise.
+ * srec.c (fillup_symbols): Likewise.
+ * coffcode.h (get_index): Use udata.i rather than just udata.
+ (coff_slurp_symbol_table): Likewise.
+ * coffgen.c (set_index): Likewise.
+ * ecoff.c (ecoff_set_symbol_info): Likewise.
+ * elfcode.h (elf_symbol_from_bfd_symbol): Likewise.
+ * libecoff.h (ecoff_get_sym_index, ecoff_set_sym_index): Likewise.
+ * som.c (compare_syms): Likewise.
+ (som_prep_for_fixups): Likewise.
+ (som_write_fixups): Likewise.
+
+ Use a hash table when writing out ELF symbol names.
+ * elfcode.h (elf_stringtab_init): New static function.
+ (bfd_new_strtab, bfd_add_to_strtab, bfd_add_2_to_strtab): Remove.
+ Change all callers to use elf_stringtab_init or
+ _bfd_stringtab_add, and get stringtab lengths using
+ _bfd_stringtab_size.
+ (elf_fake_sections): Change ignored argument to pointer to
+ boolean, and set the boolean to true if an error occurs. If an
+ error has already occurred, don't do anything.
+ (assign_section_numbers): Just set sh_size, not contents.
+ (elf_compute_section_file_positions): Pass the address of a
+ boolean to elf_fake_sections. Pass the address of a
+ bfd_strtab_hash to swap_out_syms. Write out the .strtab section.
+ (prep_headers): Change shstrtab to bfd_strtab_hash.
+ (swap_out_syms): Take a pointer to a bfd_strtab_hash as an
+ argument. Set it to the symbol names.
+ (NAME(bfd_elf,write_object_contents)): Write out the section
+ header names using _bfd_stringtab_emit.
+ (elf_debug_section): Remove first argument; get the section name
+ via the bfd_section pointer. Change caller.
+ (elf_bfd_final_link): Write out the symbol names using
+ _bfd_stringtab_emit. Likewise for the .dynstr section contents.
+ Free the symbol names at the end of the function.
+ (elf_link_input_bfd): Remove the last argument, output_names,
+ from relocate_section. Save the old symbol contents before
+ calling elf_link_output_sym, and restore them afterward.
+ * libelf.h (struct elf_link_hash_table): Change dynstr field to
+ struct bfd_strtab_hash.
+ (struct elf_backend_data): Remove last argument, output_names,
+ from elf_backend_relocate_section field.
+ (struct strtab): Don't define.
+ (struct elf_obj_tdata): Change strtab_ptr field to struct
+ bfd_strtab_hash.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Remove last
+ argument, output_names.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+ * libbfd-in.h (DEFAULT_STRING_SPACE_SIZE): Don't define.
+ (bfd_add_to_string_table): Don't declare.
+ * libbfd.h: Rebuild.
+ * libbfd.c (bfd_add_to_string_table): Remove.
+
+ * elfcode.h (elf_swap_shdr_in): Use bfd_section, not rawdata.
+ Clear contents field.
+ (bfd_section_from_shdr): In SHT_STRTAB case, check bfd_section,
+ not rawdata. Don't set rawdata if e_shstrndx. Use bfd_section
+ rather than rawdata in commented out code. In SHT_REL[A] case,
+ don't bother to check elf_section_data of section returned by
+ section_from_elf_index.
+ (elf_fake_sections): Set bfd_section, not rawdata. Don't set
+ size.
+ (elf_map_symbols): Don't set elf_num_section_syms. Don't create
+ section symbols that already exist.
+ (assign_file_position_for_section): Use bfd_section, not rawdata.
+ (section_from_elf_index): Just check bfd_section field.
+ (elf_section_from_bfd_section): Likewise.
+ (elf_debug_section): Don't print rawdata, contents, or size.
+ (elf_link_add_object_symbols): Don't error out if
+ section_from_elf_index returns NULL.
+ (elf_bfd_final_link): Check return value from
+ section_from_elf_index against NULL, not bfd_is_abs_section.
+ (elf_link_input_bfd): Don't check section_from_elf_index return
+ value.
+ * libelf.h (struct elf_obj_tdata): Remove num_section_syms field.
+ (elf_num_section_syms): Don't define.
+ * elf.c (elf_get_str_section): Store section contents in contents
+ field rather than rawdata field.
+ (elf_string_from_elf_section): Likewise.
+ (_bfd_elf_make_section_from_shdr): Store BFD section pointer in
+ bfd_section field rather than rawdata field.
+ * elf32-hppa.c (elf32_hppa_read_symext_info): Use bfd_section
+ rather than rawdata.
+ (elf32_hppa_size_stubs): Likewise.
+ (elf32_hppa_backend_symbol_table_processing): Don't set
+ symextn_hdr->size; just use sh_size.
+ * elf32-mips.c (mips_elf_final_write_processing): Use bfd_section
+ rathern than rawdata.
+ (mips_elf_section_from_shdr): Likewise.
+ (mips_elf_section_processing): Likewise.
+ (mips_elf_section_from_bfd_section): Remove rawdata check.
+
+ * srec.c (pass_over): Set the start address for S7, S8 or S9.
+
+Fri Oct 14 19:15:46 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * VERSION: Updated to 2.5.
+
+Fri Oct 14 11:07:50 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * bfd.c (bfd_scan_vma): Cast end to be non const before passing it
+ to strtoul.
+
+Thu Oct 13 14:40:41 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * bfd.c (bfd_scan_vma): Pass end argument on to strtoul.
+
+Wed Oct 12 16:46:43 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * opncls.c (bfd_realloc): Deleted, since it's broken and fixing it
+ would make it slow. Besides, it isn't used much.
+ * elfcode.h (elf_map_symbols): Always allocate new storage for the
+ symbol table.
+
+Wed Oct 12 11:54:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * ecoff.c (ecoff_set_symbol_info): Mark local stProc, stLabel or
+ stabs symbols as BSF_DEBUGGING.
+
+ * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Make
+ str1 and str2 const pointers.
+
+ * Makefile.in (INSTALL): Use top level install.sh script.
+ * config/README (INSTALL): Remove.
+ * config/delta88.mh (INSTALL): Remove.
+ * config/i386v4.mh (INSTALL): Remove.
+ * config/irix4.mh (INSTALL): Remove.
+ * config/irix5.mh (INSTALL): Remove.
+ * config/ncrt3000.mh (INSTALL): Remove.
+
+Tue Oct 11 13:57:56 1994 Eric Youngdale (eric@andante.aib.com)
+
+ * elf32-i386.c (elf_i386_check_relocs): Make sure that a symbol
+ with a global offset table entry or a procedure linkage table
+ entry is added to the dynamic symbol table.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): If a symbol has
+ already gotten a procedure linkage table entry, change the
+ definition to the PLT entry.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+
+Tue Oct 11 17:12:00 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * lynx-core.c (lynx_core_file_p): SPARC Lynx appears to start
+ dumping the .data section in a core file at a page boundary.
+
+Mon Oct 10 16:24:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * cofflink.c (_bfd_coff_final_link): Cast argument to bfd_h_put_32
+ to correct type.
+ (coff_read_string_table): Cast argument to bfd_h_get_32 to correct
+ type.
+ * elfcode.h (elf_link_output_extsym): Cast argument to
+ bfd_elf_hash to correct type.
+
+ * elf32-sparc.c (elf_sparc_howto_table): The PC10, PC22, and
+ WPLT30 relocations are PC-relative.
+
+Thu Oct 6 12:57:26 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+
+ * aoutx.h (adjust_o_magic): Correctly initialize vma if the vma of
+ the text section was user-defined.
+
+Wed Oct 5 14:42:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * archive.c (bfd_construct_extended_name_table): SVR4 uses slash
+ newline at the end of the file name, not just newline.
+
+Tue Oct 4 11:23:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_new_section_hook): Default section alignment
+ power to 4, rather than using align_power_min.
+
+ * coffcode.h (coff_new_section_hook): Don't use align_power_min;
+ use COFF_DEFAULT_SECTION_ALIGNMENT_POWER instead. Force the .stab
+ and .stabstr sections to be aligned to no more than 2. Remove
+ COFF_SPARC special cases.
+ * coff-a29k.c: Define COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
+ * coff-apollo.c, coff-go32.c, coff-h8300.c: Likewise.
+ * coff-h8500.c, coff-i386.c, coff-i960.c, coff-m68k.c: Likewise.
+ * coff-m88k.c, coff-rs6000.c, coff-sh.c, coff-sparc.c: Likewise.
+ * coff-we32k.c, coff-z8k.c: Likewise.
+
+ * configure.in: Use ${config_shell} when running config.bfd.
+
+ * cofflink.c (coff_link_input_bfd): Don't try to convert a long
+ filename if the offset field is zero.
+
+ * elfcode.h (swap_out_syms): If the alignment of a common symbol
+ was not set, use a sensible default rather than zero.
+
+Mon Oct 3 16:04:29 1994 H.J. Lu (hjl@nynexst.com)
+
+ * opncls.c (bfd_close): Honor umask when setting execution bits.
+ (bfd_close_all_done): Likewise.
+
+Mon Oct 3 04:41:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-core.c (rs6000coff_core_p): Set SEC_HAS_CONTENTS flag
+ for .stack and .ldinfo sections. Cast coredata.c_tab to a
+ file_ptr to avoid warnings from gcc.
+
+Fri Sep 30 13:11:38 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * elfcode.h (elf_bfd_final_link): Remove assertion when a non
+ SEC_IN_MEMORY section is found in dynobj. This can happen when
+ linking PIC compiled code.
+
+Thu Sep 29 15:21:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * reloc.c (bfd_install_relocation): Change type of "data" to
+ bfd_byte *, to go along with yesterday's change.
+
+ * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol
+ in elfcode.h. (case bfd_print_symbol_all): Print symbol's size
+ field, except for common symbols; print their alignment.
+ * elfcode.h (elf_print_symbol): Deleted.
+ * libelf.h (bfd_elf_print_symbol): Declare.
+ (bfd_elf{32,64}_print_symbol): Replace declarations with macros.
+
+ * syms.c (bfd_print_symbol_vandf): Show BSF_LOCAL and BSF_GLOBAL
+ in one column. Use the column freed up to show BSF_FUNCTION and
+ BSF_FILE.
+
+Thu Sep 29 12:29:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * syms.c (stt): Add .rdata and .rodata.
+
+Wed Sep 28 13:35:05 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * reloc.c (bfd_install_relocation): Cast data_start to bfd_byte *
+ before trying to add values to it.
+
+Tue Sep 27 16:47:58 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Cast
+ return value from elf_sym_extra.
+ (elf32_hppa_build_stubs): Cast return value from bfd_zalloc.
+ (elf32_hppa_size_stubs): Cast return value from malloc.
+
+ * gen-aout.c (main): Declare and initialize "arch".
+
+ * cofflink.c (coff_link_add_symbols): Cast return value of
+ bfd_hash_allocate.
+
+ * riscix.c (riscix_callback): Use PARAMS macro in prototype.
+
+ * reloc.c (bfd_install_relocation): New function, mostly copied
+ from bfd_perform_relocation, adjusted for the assembler's needs.
+ * bfd-in2.h: Regenerated.
+
+Mon Sep 26 11:00:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (assign_file_positions_except_relocs): Align the
+ section VMA and the file position even if D_PAGED is not set.
+
+ * bfd-in.h (bfd_seek): Change declaration to not mark fp const.
+ * bfd-in2.h: Rebuild.
+ * libbfd.c (bfd_seek): Don't mark parameters const, to avoid
+ conflicts with declaration.
+
+Fri Sep 23 15:15:31 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (map_program_segments): Don't abort if we allocated
+ too much space for the program header, only if we allocated too
+ little.
+ (assign_file_positions_except_relocs): Similar change.
+
+Tue Sep 20 13:17:07 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * libaout.h: Fix comment.
+ * ns32knbsd.h: Changed M_NS32K_NETBSD to M_532_NETBSD to match
+ libaout.h.
+
+Tue Sep 20 15:23:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * Makefile.in: Rebuilt dependencies.
+ (BFD32_BACKENDS): Add sparcnetbsd.o.
+ (CFILES): Add ns32knetbsd.c and sparcnetbsd.c.
+ * targets.c: ns32knetbsd_vec was renamed to pc532netbsd_vec.
+
+ * coff-sh.c (rtype2howto): Remove; unused.
+ (coff_sh_relocate_section): Remove unused local variable rstat.
+ (reloc_processing): Comment out; unused.
+
+Fri Sep 16 12:12:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * aoutx.h (aout_link_write_other_symbol): If h->indx is -2, then
+ always write it out even if it would normally be stripped.
+ (aout_link_input_section_std): If we find a reloc against a
+ stripped global symbol, force it to be written out rather than
+ merely calling unattached_reloc.
+ (aout_link_input_section_ext): Likewise.
+ (aout_link_reloc_link_order): Likewise.
+
+Wed Sep 14 15:37:19 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.h (struct somdata): New field sorted_syms.
+ (obj_som_sorted_syms): Accessor macro.
+ * som.c (som_object_setup): Initialize sorted_syms to NULL.
+ (som_prep_for_fixups): Sort a copy of the BFD's symbol table;
+ store the sorted symbol table in sorted_syms.
+ (som_write_fixups): Initalize tmp_reloc to NULL to make GCC happy.
+ (som_begin_writing): Similarly for exec_header. Pass the sorted
+ symbol table to som_write_symbol_strings.
+ (som_build_and_write_symbol_table): Use the sorted symbols rather
+ than the canonical symbol table.
+
+ * som.h (som_symbol_type): Add "stringtab_offset" field.
+ * som.c (som_write_symbol_strings): Use "stringtab_offset"
+ rather than destroying the "name" field in the BFD symbol.
+ (som_build_and_write_symbol_table): Likewise.
+
+Wed Sep 14 15:06:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * aoutx.h (aout_link_write_symbols): Rename skip_indirect to
+ skip_next. If we find an N_WARNING symbol which has already been
+ written out, set skip_next.
+
+ * libecoff.h (struct ecoff_tdata): Add field find_buffer.
+ * ecoff.c: Include aout/stab_gnu.h.
+ (ecoff_find_nearest_line): Handle stabs debugging information.
+
+ * elfcode.h (elf_link_output_extsym): Keep a symbol marked as weak
+ even if it is referenced by another object.
+
+Tue Sep 13 17:57:00 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both
+ 'T' and 'U' to grab all the unwind information.
+ (som_set_reloc_info): Make 'U' unwind bits persist across
+ multiple SOM relocations. Set the addend field of an R_ENTRY
+ relocation to the value in 'T'; set the addend field on an
+ R_EXIT relocation to the value in 'U'.
+
+ * som.h (som_symbol_type): Delete unwind field.
+
+ * som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
+ unwind information from the addend field of the R_ENTRY, get the
+ other 32bits from the addend field of the R_EXIT.
+ (bfd_som_attach_unwind_info): Delete function and all references.
+
+ * som.h (som_symbol_type): Delete unused a.out-related fields.
+
+ * som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
+ instead of &bfd_abs_section.
+
+ * som.c (som_object_setup): Handle exec_entry and exec_flags being
+ switched in executables created by the OSF1 linker.
+ (som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL
+ fixups. Support R_ALT_ENTRY (handle just like R_EXIT).
+
+Tue Sep 13 16:04:07 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * cofflink.c (coff_link_input_bfd): syment_base is unsigned
+ so can't compare -ve numbers with it.
+
+Mon Sep 12 20:31:17 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * configure.in (shcoff_vec): Use cofflink.o now.
+ * coff-sh.c: Rewritten to use new fast coff backend.
+
+Tue Sep 13 16:23:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * aoutx.h (NAME(aout,final_link)): Don't assume that all the input
+ files are a.out.
+
+Tue Sep 13 11:09:39 1994 J.T. Conklin (jtc@rtl.cygnus.com)
+
+ * configure.host (sparc-*-netbsd): use sparcnbsd.
+ (ns32k-*-netbsd): use ns32knbsd.
+
+ * hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
+ host support.
+
+ * sparcnetbsd.c: New file, adds support for NetBSD/sparc.
+ * config/sparc-nbsd.mt: Likewise.
+
+ * netbsd.h: New file, definitions common to all netbsd ports.
+ * i386netbsd.c: Use it.
+ * ns32knetbsd.c: Use it.
+
+ * Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
+ config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
+ file/variable naming conventions.
+ * i386netbsd.c: New file, renamed from netbsd386.c.
+ * ns32knetbsd.c: New file, renamed from netbsd532.c.
+
+Mon Sep 12 21:56:20 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_reloc_skip): Correct off-by-one error for 4-byte
+ R_NO_RELOCATION fixups.
+ (bfd_section_from_som_symbol): Return the absolute section if the
+ symbol isn't contained in any section in the output file.
+ (som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are
+ not function symbols (they are magic code labels which *can* be the
+ targets of cross space branches). $START$ is not a section symbol.
+
+Mon Sep 12 11:43:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coff-alpha.c (ecoffalpha_little_vec): Add SEC_CODE and SEC_DATA
+ to section_flags.
+ * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
+
+ * elfcode.h (swap_out_syms): Set the type of an undefined symbol
+ to STT_FUNC if the BSF_FUNCTION flag is set.
+
+ * cofflink.c (coff_link_input_bfd): If r_symndx is -1, don't
+ change it.
+ (_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an
+ absolute reloc. Don't dump core using r_symndx as an array index.
+ * cf-m68klynx.c (coff_bfd_link_add_symbols): Define.
+ (lynx_link_add_symbols): New static function (copy of function in
+ coff-i386.c).
+ (coff_m68k_lynxrtype_to_howto): sym argument may be NULL.
+ * coff-i386.c (coff_i386_rtype_to_howto): Likewise.
+ * coff-a29k.c (coff_a29k_relocate_section): Handle an r_symndx
+ value of -1, meaning an absolute reloc.
+
+ * ctor.c: Remove; obsolete.
+ * Makefile.in: Rebuild dependencies.
+ (BFD_LIBS): Remove ctor.o.
+ (CFILES): Remove ctor.c.
+ * libbfd.h: Rebuild.
+
+Mon Sep 12 01:58:47 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): If there was a link
+ error of some sort (for example, undefined symbols), then do not
+ apply any relocs, just notify the user of the errors.
+ (elf32_hppa_backend_begin_write_processing): Do not build a symbol
+ extension section for an executable (it's useless).
+ (elf32_hppa_link_output_symbol_hook): Do nothing if there was a
+ link error of some sort (for example, undefined symbols).
+ (elf32_hppa_read_symext_info): Kludge. Turn off SEC_HAS_CONTENTS
+ for all the input symbol extension sections to keep the generic
+ BFD code happy. Temporarily turn it on to read the contents of
+ the symbol extension section.
+
+Sun Sep 11 21:58:59 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/hppaosf.mh (RANLIB): Do not set.
+ * config/hppabsd.mh (RANLIB): Likewise.
+
+Sun Sep 11 22:50:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * cf-i386lynx.c: Remove #if 0 code.
+ (i386_lynxos_coff_object_p): Remove unused function.
+ (coff_bfd_link_add_symbols): Define.
+ (lynx_link_add_symbols): New static function.
+ * coffcode.h (coff_bfd_link_hash_table_create): If
+ coff_relocate_section is defined, only define this if not already
+ defined.
+ (coff_bfd_link_add_symbols, coff_bfd_final_link): Likewise.
+
+ * linker.c (_bfd_generic_final_link): Handle
+ bfd_indirect_link_order explicitly, rather than via
+ _bfd_default_link_order.
+ (set_symbol_from_hash): New static function, broken out of
+ _bfd_generic_link_write_global_symbol.
+ (_bfd_generic_link_write_global_symbol): Symbol setting code moved
+ to set_symbol_from_hash; call it.
+ (default_indirect_link_order): Add generic_linker argument.
+ Change all callers. If false, set the generic symbols based on
+ the hash table entries.
+
+Fri Sep 9 11:51:49 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coffgen.c (coff_get_symtab): Reindented. Removed commented out
+ call to bfd_constructor_entry.
+
+ Convert m68k COFF to use new COFF backend linker.
+ * coff-m68k.c (coff_relocate_section): Define.
+ * cf-m68klynx.c (coff_rtype_to_howto): Define.
+ (coff_m68k_lynx_rtype_to_howto): New static function.
+ * configure.in (m68kcoff_vec): Build cofflink.o.
+ (m68kcoffun_vec, m68klynx_coff_vec): Likewise.
+
+Thu Sep 8 16:20:38 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * coff-h8300.c (h8300_reloc16_extra_cases, case RELBYTE): Flag
+ overflows correctly.
+
+Wed Sep 7 19:01:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libelf.h (struct elf_backend_data): Change second argument of
+ elf_backend_final_write_processing hook to boolean.
+ (struct elf_obj_tdata): Add linker field.
+ * elfcode.h (NAME(bfd_elf,write_object_contents)): Pass value of
+ tdata linker field to final_write_processing, rather than NULL.
+ (elf_bfd_final_link): Don't call final_write_processing hook. Set
+ tdata linker field to true.
+ * elf32-mips.c (mips_elf_final_write_processing): Change type of
+ second argument to boolean.
+ * elf32-hppa.c (elf32_hppa_backend_final_write_processing):
+ Likewise.
+
+ * coff-go32.c (RTYPE2HOWTO): Fully parenthesize arguments.
+ * coff-i960.c (RTYPE2HOWTO): Likewise.
+ * coff-m88k.c (RTYPE2HOWTO): Likewise.
+ * coff-we32k.c (RTYPE2HOWTO): Likewise.
+
+ Make i386 COFF use new COFF backend linker.
+ * coff-i386.c (RTYPE2HOWTO): Fully parenthesize arguments.
+ (coff_relocate_section): Define.
+ (coff_i386_rtype_to_howto): New function.
+ * configure.in (i386coff_vec): Use cofflink.o.
+ (i386lynx_coff_vec): Likewise.
+
+ * coffcode.h (bfd_coff_backend_data): Add new field
+ _bfd_coff_rtype_to_howto.
+ (bfd_coff_rtype_to_howto): Define.
+ (coff_rtype_to_howto): Define to use RTYPE2HOWTO, if not already
+ defined.
+ (bfd_coff_std_swap_table): Initialize new field.
+ * cofflink.c (_bfd_coff_final_link): Allocate section_count + 1
+ section_info structures, since the target_index is 1 based.
+ (coff_link_input_bfd): Set *secpp to bfd_com_section_ptr for a
+ common symbol. Adjust rel_hash by the output reloc count.
+ (_bfd_coff_generic_relocate_section): New function.
+ * libcoff-in.h (_bfd_coff_generic_relocate_section): Declare.
+ * libcoff.h: Rebuild.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+
+Tue Sep 6 23:28:52 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_derive_misc_symbol_info): Treat undefined code
+ symbols and undefined symbols which no type in the same manner
+ if the associated BFD symbol has BSF_FUNCTION set. For a defined
+ symbol which no type, select a SOM type based on the flags of the
+ section containing the symbol.
+ (som_slurp_symbol_type): Set BSF_FUNCTION for undefined ST_STUB
+ or ST_CODE symbols (importing a non-function code symbol is
+ meaningless in SOM).
+ (som_set_reloc_info): Don't set "offset" to the section's vma; it
+ should always start at zero.
+
+Tue Sep 6 14:51:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ Add new style linker support to COFF backend. a29k only for now.
+ * cofflink.c: New file.
+ * libcoff-in.h: Include bfdlink.h.
+ (obj_coff_external_syms, obj_coff_strings): Define accessor macro.
+ (obj_coff_sym_hashes): Define accessor macro.
+ (struct coff_tdata): Add fields external_syms, strings, and
+ sym_hashes.
+ (struct coff_link_hash_entry): Define.
+ (struct coff_link_hash_table): Define.
+ (coff_link_hash_lookup, coff_link_hash_traverse): Define.
+ (coff_hash_table): Define.
+ (_bfd_coff_link_hash_table_create): Declare.
+ (_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare.
+ * coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz,
+ _bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global,
+ _bfd_coff_compute_section_file_positions,
+ _bfd_coff_relocate_section.
+ (bfd_coff_relsz, bfd_coff_swap_reloc_in): Define.
+ (bfd_coff_sym_is_global): Define.
+ (bfd_coff_compute_section_file_positions): Define.
+ (bfd_coff_relocate_section): Define.
+ (coff_mkobject_hook): Initialize obj_raw_syment_count and
+ obj_conv_table_size.
+ (coff_compute_section_file_positions): Set target_index of all
+ sections. Set output_has_begun field.
+ (coff_write_object_contents): Don't set target_index; now done by
+ coff_compute_section_file_positions. Remove obsolete handling of
+ scn_base and data_base. Don't bother to check that target_index
+ is positive, since it always is. Remove use of pad, which is
+ always zero. Check obj_raw_syment_count, not bfd_get_symcount,
+ for the number of symbols, but only write them out if
+ bfd_get_symcount is non-zero. Don't check obj_raw_syment_count
+ until after coff_write_symbols is called.
+ (coff_slurp_symbol_table): Use obj_raw_syment_count, not
+ bfd_get_symcount for the number of symbols. Don't set
+ obj_conv_table_size.
+ (coff_sym_is_global): New static function or macro.
+ (coff_slurp_reloc_table): Call coff_swap_reloc_in, not
+ bfd_swap_reloc_in.
+ (coff_bfd_link_hash_table_create): If coff_relocate_section is
+ defined, define as _bfd_coff_link_hash_table_create.
+ (coff_bfd_link_add_symbols): Similar change.
+ (coff_bfd_final_link): Similar change.
+ (coff_relocate_section): Define as NULL if not defined.
+ (bfd_coff_std_swap_table): Initialize new fields.
+ * coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count
+ and obj_conv_table_size here.
+ (coff_count_linenumbers): Reindent. If bfd_get_symcount is zero,
+ add up the line numbers from the sections.
+ (coff_write_symbols): Set obj_raw_syment_count, not
+ bfd_get_symcount.
+ (coff_pointerize_aux): Don't pointerize a nonpositive x_endndx
+ field.
+ (coff_get_normalized_symtab): Use obj_raw_syment_count, not
+ bfd_get_symcount.
+ (coff_print_symbol): If auxp->fix_end, print x_endndx value.
+ * coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in.
+ Reindent. Change argument type to PTR.
+ * coff-a29k.c (coff_a29k_relocate_section): New static function.
+ (coff_relocate_section): Define.
+ * configure.in (a29kcoff_big_vec): Compile cofflink.o.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+ * libcoff.h: Rebuilt.
+ * Makefile.in: Rebuilt dependencies.
+ (BFD32_BACKENDS): Add cofflink.o.
+ (CFILES): Add cofflink.c.
+
+Tue Sep 6 14:00:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * coffgen.c (coff_print_symbol, case bfd_symbol_print_all): Check
+ for section symbol, and print its aux fields with appropriate
+ labels.
+
+ * Makefile.in (ALL_MACHINES): Added cpu-arm.o.
+
+Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+
+ * aoutx.h (NAME(aout,machine_type)): Recognize the ARM processor.
+ * archures.c, config.bfd, configure.host, libaout.h, reloc.c,
+ targets.c: Add support for the ARM.
+ * cpu-arm.c, riscix.c, config/riscix.mh, config/riscix.mt: New files.
+
+ * aoutx.h (add_to_stringtable): Check that str isn't a NULL pointer.
+
+Fri Sep 2 14:10:30 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * reloc.c (enum bfd_reloc_code_real): Rewrote definition to use
+ new "chew" commands for simultaneous definition of enumerator and
+ enumerator name table.
+ (bfd_get_reloc_code_name): New function, for retrieving a symbolic
+ name associated with an enumerator.
+ * libbfd.h, bfd-in2.h: Regenerated.
+
+Tue Aug 30 21:24:54 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_write_fixups, case R_ENTRY): Handle case where no
+ unwind descriptor information is available.
+
+Tue Aug 30 11:43:30 1994 Eric Youngdale (ericy@cais.cais.com)
+
+ * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname
+ argument, and use it to set DT_SONAME dynamic entry.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
+ (bfd_elf64_size_dynamic_sections): Update prototype.
+ * bfd-in2.h: Rebuilt.
+
+Fri Aug 26 15:47:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coffgen.c (coff_real_object_p): Set obj_raw_syment_count.
+ (coff_get_normalized_symtab): Verify obj_raw_syment_count, rather
+ than setting it.
+
+Thu Aug 25 10:44:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * archive.c (bsd_write_armap): Remove host dependencies.
+
+ * aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
+ before adding BYTES_IN_WORD.
+
+ * coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
+ not merely the first.
+
+ * coffgen.c (coff_write_alien_symbol): If we are not using the
+ symbol, clear the name so that it is not put in the string table.
+ From Antti.Miettinen@ntc.nokia.com.
+
+Wed Aug 24 11:49:19 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coffgen.c (coff_print_symbol): Cast pointer different to long
+ and use %ld to print it.
+ * osf-core.c (osf_core_core_file_p): Remove unused variable
+ dseccnt.
+ * ecoffswap.h (ecoff_swap_ext_out): If ECOFF_64, clear remaining
+ bytes in bits2.
+
+ * configure.host, config.bfd: Change i[34]86 to i[345]86.
+ * coffgen.c (coff_real_object_p): Set obj_conv_table_size here,
+ rather than waiting until coff_slurp_symbol_table.
+ (coff_write_alien_symbol): Just ignore BSF_DEBUGGING symbols.
+ From Antti.Miettinen@ntc.nokia.com.
+
+ * section.c (bfd_make_section_anyway): Fix failure check of
+ bfd_make_empty_symbol. From Antti.Miettinen@ntc.nokia.com.
+
+ * aoutx.h (translate_to_native_sym_flags): Use the output_section
+ (and output_offset) if there is one.
+
+ * aoutx.h (aout_link_check_archive_element): Discard the symbols
+ if the archive element was not needed.
+
+ * aoutx.h (aout_get_external_symbols): Ensure that a zero string
+ index yields an empty string.
+ (aout_link_write_symbols): If info->keep_memory is false, use name
+ from original hash table entry, not from entry in *sym_hash.
+
+ * aoutx.h (struct aout_final_link_info): Add fields contents,
+ relocs, symbol_map and output_syms.
+ (NAME(aout,final_link)): Work out the largest section size, reloc
+ size, and number of symbols. Use them to preallocate buffers that
+ are large enough for all cases.
+ (aout_link_input_bfd): Use preallocated symbol_map.
+ (aout_link_write_symbols): Remove symbol_map argument; use
+ preallocated symbol_map instead. Change all callers. Use
+ preallocated output_syms.
+ (aout_link_input_section): Remove symbol_map argument. Change all
+ callers. Use preallocated contents and relocs.
+ (aout_link_input_section_std): Remove symbol_map argument; use
+ preallocated symbol_map instead. Change all callers.
+ (aout_link_input_section_ext): Likewise.
+
+Tue Aug 23 10:51:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * archive.c (_bfd_write_archive_contents): Don't update the
+ symbol map timestamp if there is no symbol map. From
+ schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
+
+Mon Aug 22 12:26:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add _update_armap_timestamp.
+ (bfd_target): Add field _bfd_update_armap_timestamp.
+ * bfd.c (bfd_update_armap_timestamp): Define.
+ * bfd-in2.h: Rebuilt.
+ * libbfd-in.h (_bfd_noarchive_update_armap_timestamp): Define.
+ (_bfd_archive_bsd_update_armap_timestamp): Declare.
+ (_bfd_archive_coff_update_armap_timestamp): Define.
+ * libbfd.h: Rebuilt.
+ * archive.c (_bfd_write_archive_contents): Call
+ bfd_update_armap_timestamp instead of checking for a BSD archive
+ and calling bsd_update_armap_timestamp.
+ (_bfd_archive_bsd_update_armap_timestamp): Rename from
+ _bsd_update_armap_timestamp. Don't assume that armap_datepos is
+ already set.
+ * aout-target.h (MY_update_armap_timestamp): Define if not already
+ defined.
+ * coff-rs6000.c (rs6000coff_update_armap_timestamp): Define.
+ * ieee.c (ieee_update_armap_timestamp): Define.
+ * libecoff.h (_bfd_ecoff_update_armap_timestamp): Define.
+ * oasys.c (oasys_update_armap_timestamp): Define.
+ * som.c (som_update_armap_timestamp): Define.
+
+ * hash.c: Copy string hash functions from aoutx.h.
+ * aoutx.h: String hash functions moved to hash.c. Retain
+ simplified versions of add_to_stringtab and emit_stringtab.
+ Change all callers to use new function and structure names.
+ * libbfd-in.h (_bfd_stringtab_init, _bfd_stringtab_free): Declare.
+ (_bfd_stringtab_size, _bfd_stringtab_add): Declare.
+ (_bfd_stringtab_emit): Declare.
+ * libbfd.h: Rebuilt.
+
+Mon Aug 22 10:49:37 1994 Eric Youngdale (ericy@cais.cais.com)
+
+ * i386linux.c (linux_add_one_symbol): Create a fixup for any
+ defined absolute symbol, not just GOT or PLT symbols.
+ (linux_tally_symbols): Correct handling of references to defined
+ symbols.
+
+Thu Aug 18 16:29:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ Get ld -x -r to handle a.out set symbols correctly.
+ * aoutx.h (adjust_o_magic): If the .bss VMA was set outside of
+ BFD, pad the .data section up to the VMA of the .bss section.
+ (aout_link_add_symbols): If a set symbol does not get modified,
+ treat it as a local symbol.
+ (aout_link_write_symbols): Set the value of set symbols
+ correctly. Don't discard set symbols even if discarding local
+ symbols.
+ (aout_link_write_other_symbol): Don't abort on bfd_link_hash_new,
+ since it can now happen for set symbols.
+
+ * elfcode.h (elf_fake_sections): Just check for ".rela" and
+ ".rel", not ".rela." and ".rel."; make this work by checking
+ use_rela_p.
+ * elf32-i386.c (elf_i386_check_relocs): Just check for ".rel", not
+ ".rel."
+ (elf_i386_size_dynamic_sections): Likewise.
+ (elf_i386_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Just check for
+ ".rela", not ".rela."
+ (elf32_sparc_size_dynamic_sections): Likewise.
+ (elf32_sparc_relocate_section): Likewise.
+
+Wed Aug 17 16:54:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
+ PASS to the old value + 1.
+
+ * coffgen.c (coff_get_normalized_symtab): If a C_FILE symbol has
+ no aux entries, use the symbol name as the file name.
+ (coff_find_nearest_line): Look for the right C_FILE symbol, rather
+ than always using the first one. If there is a debugging symbol
+ after a function symbol, skip it. Add the section VMA to the line
+ offset, since it was subtracted out in coff_slurp_line_table.
+
+Tue Aug 16 16:53:00 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_prep_headers): If writing some form of an executable,
+ allocate and attach an exec header to the BFD private data.
+ (som_begin_writing): Don't fill fields of the exec header based
+ on BFD private data here (like the exec flags). Do not write
+ the exec header here.
+ (som_write_headers): Instead do it here.
+ * som.h (struct somdata): New field "exec_hdr" for the executable
+ file header.
+ (obj_som_exec_hdr): New accessor macro.
+
+Tue Aug 16 00:12:31 1994 Eric Youngdale (ericy@cais.cais.com)
+
+ * i386linux.c (linux_link_create_dynamic_sections): Create section
+ named .linux-dynamic, not .dynamic.
+ (linux_add_one_symbol): Use .linux-dynamic, not .dynamic.
+ (bfd_linux_size_dynamic_sections): Likewise.
+ (linux_finish_dynamic_link): Likewise.
+
+Mon Aug 15 12:16:56 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coffgen.c (STRING_SIZE_SIZE): Define.
+ (coff_fix_symbol_name): Use STRING_SIZE_SIZE, not 4.
+ (coff_write_symbols, build_string_table): Likewise.
+ (coff_get_normalized_symtab): Likewise.
+
+ * libcoff-in.h (obj_symbol_slew): Don't define.
+ (struct coff_tdata): Remove unused fields index_slew, raw_linenos,
+ and flags.
+ * libcoff.h: Rebuilt.
+ * coffcode.h (coff_mkobject): Don't initialize raw_linenos.
+ (coff_mkobject_hook): Don't initialize flags.
+
+ * aout-target.h (MY_zmagic_contiguous): Define as 0 if not already
+ defined.
+ (MY(backend_data)): Use MY_zmagic_contiguous, not hardcoded 0.
+ * i386linux.c (MY_zmagic_contiguous): Define.
+
+ * elfcode.h (bfd_section_from_shdr): If a SHT_SYMTAB section in a
+ shared object has SHF_ALLOC set, create a BFD section for it.
+ (elf_section_from_bfd_section): There may be a BFD section for a
+ SHT_SYMTAB section.
+
+ * coffcode.h (styp_to_sec_flags): Add name argument. If no flags
+ are recognized, chose section flags based on the name.
+ (bfd_coff_backend_data): _bfd_styp_to_sec_flags_hook field: Add
+ name argument.
+ (bfd_coff_styp_to_sec_flags_hook): Add name argument.
+ (coff_compute_section_file_positions): Don't adjust the section
+ position by COFF_PAGE_SIZE unless SEC_ALLOC is set.
+ * libcoff.h: Rebuilt.
+ * coffgen.c (make_a_section_from_file): Pass section name to
+ bfd_coff_styp_to_sec_flags_hook.
+ * ecoff.c (_bfd_ecoff_styp_to_sec_flags): Add unused name
+ argument.
+ * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Add name argument to
+ prototype.
+
+Fri Aug 12 11:22:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (section_from_elf_index): Correct check for invalid
+ section index.
+
+ * elfcode.h (elf_link_add_object_symbols): If there is no symbol
+ table, try using the dynamic symbol table. From Eric Youngdale
+ <ericy@cais.cais.com>.
+
+ * configure.host (sparc-*-solaris2*): Use solaris2, not sysv4.
+ The linker depends upon configuring for solaris2.
+ * hosts/solaris2.h: New file; include hosts/sysv4.h.
+ * config/solaris2.mh: New file; copy of config/sysv4.mh.
+
+Wed Aug 10 13:09:38 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * aoutx.h (adjust_z_magic): Make sure data section is padded to
+ page boundary when the VMA is set by the calling program. From
+ Eric Youngdale <ericy@cais.cais.com>.
+
+Mon Aug 8 17:18:49 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ Update to ns32k support, from Ian Dall (dall@hfrd.dsto.gov.au).
+ * aout-ns32k.c: Add declarations that were in aout-ns32k.h, change
+ declarations to traditional form.
+ (MY_reloc_howto, MY_put_reloc): Change from macro to function.
+ (ns32k_relocate_contents): New function.
+ * aout-ns32k.h: Remove.
+ * cpu-ns32k.c: Add declarations that were in aout-ns32k.h, change
+ declarations to traditional form.
+ (ns32k_final_link_relocate): Call ns32k_relocate_contents.
+ * netbsd532.c: Reformat to standards, add copyright notice.
+ (ARCH): Don't define.
+ (aout-ns32k.h): Don't include.
+ * pc532-mach.c: Ditto.
+
+Mon Aug 8 17:55:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coff-i960.c (coff_i960_relocate): Don't try to convert relocs
+ against common symbols.
+
+Sat Aug 6 22:27:30 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * irix-core.c (irix_core_core_file_p): Ignore sections that
+ are not contained in the core file.
+
+Thu Aug 4 11:32:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coff-m68k.c (m68k_reloc_type_lookup): New function.
+ (coff_bfd_reloc_type_lookup): Define.
+ * cf-m68klynx.c (_bfd_m68kcoff_reloc_type_lookup): Define.
+
+ * elfcode.h (elf_bfd_final_link): Force the vma of sections which
+ do not have SEC_ALLOC set to be 0. This is needed to handle
+ relocs against debugging sections.
+
+Wed Aug 3 16:45:41 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coff-i960.c (coff_i960_relocate): Rewrote to change relocs
+ against locally defined symbols into relocs against section
+ symbols, for VxWorks 5.1.
+
+Wed Aug 3 10:34:37 1994 Eric Youngdale (ericy@cais.cais.com)
+
+ * i386linux.c (linux_add_one_symbol): Only handle
+ SHARABLE_CONFLICTS specially if BSF_CONSTRUCTOR is set. Set hashp
+ for a GOT or PLT symbol. Set jump field of fixup for a PLT symbol.
+ (linux_tally_symbols): Check section of real symbol. When looking
+ for a builtin fixup, check builtin and jump flags. Create no more
+ than one fixup, and always create one if the real symbol is in the
+ absolute section. Only strip absolute symbols.
+
+Wed Aug 3 05:08:24 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * coffcode.h (coff_write_object_contents): set internal_a.magic to
+ LYNXCOFFMAGIC whenever 68k, SPARC or i386 LynxOS
+ (yes, they have the same magic number!)
+
+Tue Aug 2 10:43:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * hp300hpux.c (BMAGIC): Define as HPUX_DOT_O_MAGIC, to make test
+ in aoutx.h work correctly.
+
+ * coff-i960.c (coff_i960_relocate): New function.
+ (howto_rellong, howto_iprmed): Use it as special_function.
+
+ * libbfd-in.h: Move declarations of bfd_read, bfd_write, bfd_seek,
+ bfd_tell, bfd_flush, and bfd_stat from here...
+ * bfd-in.h: ...to here, to make them visible to programs which
+ know more about the object file format than BFD does.
+ * libbfd.h, bfd-in2.h: Rebuilt.
+
+Mon Aug 1 17:55:53 1994 Fred Fish (fnf@cygnus.com)
+
+ * ptrace-core.c (ptrace_unix_core_file_p): Convert zalloc usage
+ to bfd_zalloc.
+
+Mon Aug 1 12:04:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elf64-sparc.c (ELF_MAXPAGESIZE): Define.
+
+ ELF linker patches from Eric Youngdale <ericy@cais.cais.com>.
+ * elfcode.h (elf_link_create_dynamic_sections): Set type of
+ _DYNAMIC to STT_OBJECT.
+ (NAME(bfd_elf,record_link_assignment)): Always create hash table
+ entry. Set type to STT_OBJECT.
+ (elf_link_output_extsym): Don't set type of weak defined symbol to
+ STB_WEAK if symbol was referenced.
+ (map_program_segments): Check DYNAMIC as well as EXEC_P.
+ (assign_file_positions_except_relocs): Likewise.
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Set type of
+ _GLOBAL_OFFSET_TABLE to STT_OBJECT.
+ (elf_i386_check_relocs): Ignore local PLT32 relocs.
+ (elf_i386_relocate_section): Treat local PLT32 relocs as PC32.
+
+ * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbol
+ handling again.
+
+ * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocs
+ if there aren't any.
+
+ * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
+ * hosts/solaris2.h: Remove.
+ * config/solaris2.mh: Remove.
+
+Sun Jul 31 14:27:04 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c, elf32-hppa.h: Update comment reflecting which
+ HPPA ELF spec the code implements.
+
+Tue Jul 26 17:38:01 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * cpu-i960.c (MAX_ARCH): New macro.
+ (compatible): Use it in computing array bounds. Put comma after
+ last entry in array, for regularity.
+ (arch_info_struct): Adjust spacing for easier reading.
+
+ * coff-i960.c (howto_rellong, howto_iprmed, howto_optcall): Use
+ HOWTO macro.
+
+ * cpu-i960.c (JX): Define as bfd_mach_i960_jx.
+ (scan_960_mach): Recognize jx machine.
+ (MAX_ARCH): Define to be JX.
+ (compatible): Add JX row to array.
+ (arch_info_struct): Add JX entry.
+
+ * archures.c (bfd_mach_i960_jx): New macro.
+ * bfd-in2.h: Regenerated.
+
+ * coffcode.h (coff_set_arch_mach_hook): For F_I960JX, set machine
+ to bfd_mach_i960_jx.
+ (coff_set_flags): For bfd_mach_i960_jx, set F_I960JX.
+
+Tue Jul 26 11:04:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (elf_adjust_dynamic_symbol): When handling a weak
+ symbol, correct check to see whether the equivalent normal symbol
+ was referenced.
+
+ Add support for creating shared libraries under i386 ELF and SPARC
+ ELF. Based on patches by Eric Youngdale <ericy@cais.cais.com>.
+ * libelf.h (struct elf_link_hash_entry): Remove copy_offset field.
+ Add got_offset and plt_offset fields.
+ (ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define.
+ (ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define.
+ (ELF_LINK_HASH_NEEDS_COPY): Define.
+ (struct elf_backend_data): Add check_relocs field.
+ (struct bfd_elf_section_data): Change relocs from PTR to
+ Elf_Internal_Rela *.
+ (struct elf_obj_tdata): Add local_got_offsets field.
+ (elf_local_got_offsets): Define accessor macro.
+ (bfd_elf32_link_create_dynamic_sections): Declare.
+ (bfd_elf32_link_record_dynamic_symbol): Declare.
+ (bfd_elf64_link_create_dynamic_sections): Declare.
+ (bfd_elf64_link_record_dynamic_symbol): Declare.
+ * elfcode.h (elf_slurp_reloc_table): Don't use the section data
+ relocs field.
+ (elf_link_record_dynamic_symbol): Make globally visible. Use
+ macro to rename to NAME(bfd_elf,link_record_dynamic_symbol).
+ (elf_link_add_object_symbols): If creating a shared library, put
+ make all local symbols dynamic. Don't bother with the
+ DYNAMIC_MULTIPLE flags. Call the check_relocs backend function if
+ it is defined.
+ (elf_link_create_dynamic_sections): Make globally visible. Use
+ macro to rename to NAME(bfd_elf,link_create_dynamic_sections). If
+ creating a shared library, make sure that _DYNAMIC is added as a
+ dynamic symbol.
+ (elf_link_read_relocs): New function.
+ (NAME(bfd_elf,record_link_assignment)): If creating a shared
+ library, always create symbols, and always make them dynamic.
+ (elf_bfd_final_link): Permit creation of shared libraries.
+ (elf_link_input_bfd): Use elf_link_read_relocs to get the relocs.
+ * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize
+ copy_offset. Initialize got_offset and plt_offset.
+ * elf32-target.h (elf_backend_check_relocs): Define as 0 if not
+ defined.
+ (elf32_bed): Initialize check_relocs field.
+ * elf64-target.h (elf_backend_check_relocs): Define as 0 if not
+ defined.
+ (elf64_bed): Initialize check_relocs field.
+ * elf32-i386.c (elf_howto_table): Change R_386_PLT32 and
+ R_386_GOTPC to be pc_relative and pcrel_offset.
+ (elf_i386_pic_plt0_entry): Define.
+ (elf_i386_pic_plt_entry): Define.
+ (elf_i386_create_dynamic_sections): Create a .got.plt section, and
+ define _GLOBAL_OFFSET_TABLE_ at the start of it. If creating a
+ shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
+ dynamic symbol. Don't create .rel.bss if creating a shared
+ library.
+ (elf_i386_check_relocs): New function.
+ (elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the
+ symbol already has one. When making a PLT entry, set plt_offset.
+ Don't create a copy reloc when creating a shared library. Don't
+ set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
+ (elf_i386_allocate_dynamic_section): Remove.
+ (elf_i386_size_dynamic_sections): Look through all the sections
+ rather than assuming we know their names. Remove any empty reloc
+ or plt sections. Only add a DT_DEBUG entry if not creating a
+ shared library. Only add a DT_PLTGOT entry if there is a PLT.
+ Add a DT_TEXTREL entry if required.
+ (elf_i386_relocate_section): Permit undefined symbols when
+ creating a shared library. Handle the special relocation types
+ specially.
+ (elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset
+ is set. If creating a shared library, produce a PIC PLT entry.
+ Only mark a PLT symbol as undefined if it was not defined by a
+ regular object file. Create a GOT entry if got_offset is set.
+ Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
+ (elf_i386_finish_dynamic_sections): Change the handling of
+ DT_RELSZ to simply subtract out the size of .rel.plt. If creating
+ a shared library, produce PIC PLT code.
+ (elf_backend_check_relocs): Define.
+ * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10,
+ R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow.
+ (elf32_sparc_create_dynamic_sections): If creating a shared
+ library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
+ dynamic symbol, and set the type to STT_OBJECT. Likewise for
+ _PROCEDURE_LINKAGE_TABLE_. Don't create .rel.bss if creating a
+ shared library.
+ (elf32_sparc_check_relocs): New function.
+ (elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the
+ symbol already has one. When making a PLT entry, set plt_offset.
+ Don't create a copy reloc when creating a shared library. Don't
+ set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
+ (elf32_sparc_allocate_dynamic_section): Remove.
+ (elf32_sparc_size_dynamic_sections): Look through all the sections
+ rather than assuming we know their names. Only add a DT_DEBUG
+ entry if not creating a shared library. Add a DT_TEXTREL entry if
+ required.
+ (elf32_sparc_relocate_section): Permit undefined symbols when
+ creating a shared library. Handle the special relocation types
+ specially.
+ (elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset
+ is set. Only mark a PLT symbol as undefined if it was not defined
+ by a regular object file. Create a GOT entry if got_offset is
+ set. Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
+ (elf32_sparc_finish_dynamic_sections): Store dynobj in a local
+ variable.
+ (elf_backend_check_relocs): Define.
+
+Mon Jul 25 12:21:07 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * configure.in (pc532mach_vec): Change to pc532machaout_vec.
+ * config.bfd (ns32k-*-netbsd*): Use ns32k-nbsd as bfd_name.
+ * Makefile.in (ALL_MACHINES): Add cpu-ns32k.o.
+ (BFD32_BACKENDS): Add aout-ns32k.o, netbsd532.o, m88kmach3.o,
+ pc532-mach.o.
+ * targets.c (pc532machaout_vec): Use instead of pc532mach_vec.
+ * config/pc532-mach.mt (DEFAULT_VECTOR): Ditto.
+ (SELECT_VECS): Remove.
+ * config/ns32k-nbsd.mt: New file, was ns32k-netbsd.mt.
+ * config/ns32k-netbsd.mt: Remove, name too long.
+
+Fri Jul 22 11:07:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * linker.c (generic_link_check_archive_element): When changing a
+ symbol to common, set the alignment.
+ (_bfd_generic_link_add_one_symbol): When creating a common symbol,
+ set the alignment.
+ * aoutx.h (aout_link_check_ar_symbols): When changing a symbol to
+ common, set the alignment.
+ (aout_link_add_symbols): Restrict the alignment of a common symbol
+ to the alignment power given by the architecture.
+ * libelf.h (struct elf_link_hash_entry): Remove align field. Add
+ copy_offset field.
+ * elfcode.h (elf_link_add_object_symbols): Store alignment in
+ new bfd_link_hash_entry field, not in elf_link_hash_entry field.
+ (elf_link_output_extsym): Similar change when getting alignment.
+ * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align. Do
+ initialize copy_offset.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset
+ field rather than align field. Get alignment using bfd_log2
+ rather than switch.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset,
+ not align.
+ * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
+
+ * aoutx.h (NAME(aout,some_aout_object_p)): Just check
+ STAT_FOR_EXEC, don't check MACH.
+ * m88kmach3.c (MACH): Don't define.
+ * config/i386-mach3.mt (TDEFINES): Define STAT_FOR_EXEC.
+ * config/m88k-mach3.mt (TDEFINES): Likewise.
+ * config/mips-mach3.mt (TDEFINES): Likewise.
+
+Thu Jul 21 17:24:31 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * i386mach3.c: Reverted to version from before Jul 5 1994 changes.
+
+Thu Jul 21 12:26:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * reloc.c (struct reloc_howto_struct): Remove special_function1.
+ It's the wrong way to do things.
+ (HOWTO): Change accordingly.
+ (HOWTO2): Remove.
+ (_bfd_final_link_relocate): Remove references to
+ special_function1.
+ * bfd-in2.h: Rebuilt.
+ * aoutx.h (aout_link_input_section_std): Remove references to
+ special_function1.
+ (aout_link_reloc_link_order): Likewise.
+
+Wed Jul 20 15:46:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add rpath
+ argument. If it is not NULL, use it to set DT_RPATH.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
+ (bfd_elf64_size_dynamic_sections): Likewise.
+ * bfd-in2.h: Rebuilt.
+
+Sat Jul 16 21:10:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (elf_get_dynamic_symtab_upper_bound): If there is no
+ dynamic symtab, return error.
+
+ * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.
+ * elfcode.h (elf_link_add_object_symbols): If symbol is defined as
+ weak, set ELF_LINK_HASH_DEFINED_WEAK.
+ (elf_link_output_extsym): If symbol is defined as weak, mark it
+ STB_WEAK.
+
+ * libelf.h (struct bfd_elf_section_data): Add relocs field.
+ (shdr_name): Remove; unused.
+ * elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
+ and RELA relocs. Free up the unswapped relocs. Permit the relocs
+ to be cached in the section_data. Correct the reloc address.
+ (elf_slurp_reloca_table): Remove.
+ (elf_canonicalize_reloc): Rewrote.
+ (elf_link_input_bfd): Permit the relocs to be cached in the
+ section data.
+
+Sat Jul 16 13:55:38 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config.bfd (m88*-harris-cxux*): Recognize.
+ * hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
+
+ * configure.host (m68*-atari-sysv4*): New host.
+ (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
+ * hosts/amix.h: Remove.
+ * hosts/m68kv4.h: New file, was amix.h.
+
+Thu Jul 14 15:12:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * reloc.c (enum bfd_reloc_code_real, bfd_type, struct
+ reloc_howto_struct, reloc_howto_type, HOWTO, HOWTO2): Copied
+ changes over from bfd-in2.h so they get generated properly next
+ time someone runs "make headers".
+ * bfd-in2.h: Rebuilt.
+
+ * targets.c (netbsd532_vec, pc532mach_vec): Declare const.
+ (m88kmach3_vec): Restore deleted declaration.
+
+ * configure.in: Alphabetize target vector names.
+
+ * config/pc532mach.mh: New file.
+ (HDEPFILES, HDEFINES): Define here.
+ * config/pc532-mach.mt (HDEPFILES, HDEFINES): Deleted.
+ * config/ns32k-netbsd.mt (HDEPFILES, HDEFINES): Deleted.
+
+ Sun Jul 10 00:04:20 1994 Ian Dall (dall@hfrd.dsto.gov.au)
+
+ * pc532-mach.c: New File. pc532-mach a.out format.
+
+ * netbsd532.c: New file. pc532-netbsd532 a.out format.
+
+ * hosts/pc532mach.h: New file. pc532-mach host support.
+
+ * cpu-ns32k.c: New file. ns32k support cpu specific code rather
+ than format specific code.
+
+ * config/pc532-mach.mt: New file. Support for pc532-mach target.
+
+ * config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
+
+ * aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
+ ns32k series.
+
+ * targets.c: Add netbsd532_vec and pc532machaout_vec into
+ bfd_target_vector array. Move netbsd386_vec to alphabetic order
+ location.
+
+ * reloc.c (_bfd_final_link_relocate) Add support for
+ special_function1 in howto.
+
+ * libaout.h: add M_NS32032, M_NS32532, M_532_NETBSD entries in
+ machine_type enum.
+
+ * configure.in: add pc532mach_vec and netbsd532_vec entries.
+
+ * config.bfd: add pc532mach host entries. Use for both
+ ns32k-pc532-mach and ns32k-pc532-netbsd.
+
+ * config.bfd: it doesn't work to use i386-mach3 for ns32k*-*-mach.
+ add ns32k-pc532-mach* and ns32k-*-netbsd* entries.
+
+ * bfd-in2.h: Add ns32k specific relocations to bfd_reloc_code_real
+ enum.
+
+ * bfd-in2.h: Add special_function1 to struct howto. Change HOWTO
+ and NEWHOWTO macros to make special_function1 NULL. Neww HOWTO2
+ macro.
+
+ * bfd-in2.h: Split definition of struct reloc_howto_struct
+ and corresponding typedef into two statements.
+
+ * bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
+
+ * archures.c: Add bfd_ns32k_arch prototype, and entry in
+ archures_init_table.
+
+ * aoutx.h (aout_link_reloc_link_order): Allow for target dependent
+ MY_put_reloc macro. Allow for target dependent special_function1
+ to apply the relocation.
+
+ * aoutx.h (aout_link_input_section_std): Allow for target
+ dependent determination of reloc howto. Allow for target dependent
+ special_function1 to apply the relocation.
+
+ * aoutx.h (get_reloc_upper_bound): Detect bss and return 0.
+
+ * aoutx.h (slurp_reloc_table): Detect bss and succesfully read
+ zero reloc entries.
+
+ * aoutx.h (machine_type): Add bfd_arch_ns32k case.
+
+ * aoutx.h: Stat to determine executable status if STAT_FOR_EXEC
+ is defined (not just MACH). Use fstat instead of stat and check
+ for fstat error.
+
+ * aoutx.h: Allow target dependent swap_std_reloc_{in,out}.
+
+ * aoutx.h: Allow CTORS reloc info to be in target dependent reloc
+ table.
+
+ * aout-target.h: Apply SWAP_MAGIC (if defined) after
+ swap_exec_header_in, otherwise we have magic in the wrong order.
+
+Thu Jul 14 11:47:27 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * coff-sparc.c (sparccoff_vec): Have leading underscores.
+
+Tue Jul 12 12:08:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
+ hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
+ rs6000-core.c, trad-core.c: Remove SEC_ALLOC flag from .reg
+ sections, .reg sections are not allocated and contain debug
+ information only.
+ * osf-core.c (make_bfd_asection, osf_core_core_file_p): Use
+ bfd_make_section_anyway instead of building unique section names.
+
+Tue Jul 12 11:41:22 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libelf.h (bfd_elf32_swap_symbol_in): Declare.
+ (bfd_elf32_swap_symbol_out): Declare.
+ (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
+ * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
+
+ * aout-encap.c (ARCH): Don't define. Obsolete.
+ * aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
+ * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
+ * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
+ * newsos3.c, sparclynx.c, sunos.c: Likewise.
+
+Mon Jul 11 20:08:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * section.c (STD_SECTION): Make the sixth argument boolean, not
+ the seventh. From gary@tuva.pacsemi.oz.au (gary kopff).
+
+Sun Jul 10 09:12:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
+ in order not to collide with LynxOS's definition of FREE in
+ /usr/include/sys/proc.h
+
+Thu Jul 7 14:18:06 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * reloc.c (bfd_perform_relocation): Don't clobber the relocation
+ value for coff-Intel-little or coff-Intel-big. Hack upon hack.
+
+Thu Jul 7 10:10:34 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * aoutx.h (howto_table_std): Add entry for GOT relocations
+ which are present in sun3 shared libraries, to avoid assertions
+ when reading the dynamic relocations.
+
+Thu Jul 7 10:19:20 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.h (R_HPPA_COMPLEX): Fix dumb typo.
+
+Wed Jul 6 19:21:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * hosts/sysv4.h (qsort, strtol): Don't declare.
+
+ * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
+ if it is NULL.
+
+ * elf32-mips.c (mips_elf_final_write_processing): Add ignored info
+ argument to correspond to recent libelf.h change.
+
+Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * coff-alpha.c (alpha_ecoff_mkobject_hook): New hook to
+ additionally copy object type information from the alpha file
+ header to the BFD flags.
+ (alpha_ecoff_backend_data): Use it.
+ (ecoffalpha_little_vec): Add DYNAMIC to object_flags.
+ * aout64.c: Fix typo in conditional QMAGIC definition.
+
+Wed Jul 6 00:13:17 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
+ value of clicksz to help weed out non HPPA BSD core files.
+
+Tue Jul 5 13:26:02 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ Mach 3 support.
+ * config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
+ New targets.
+ * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
+ "mach3" instead of "mach".
+ (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
+ * targets.c (m88kmach3_vec): New target vector.
+ (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
+ inside #if 0.
+ * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
+ checking for execute permission, instead of looking at entry
+ point.
+ * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
+ N_SHARED_LIB, don't include aout/*.h files, etc.
+ * m88kmach3.c: New file, m88k Mach 3 target.
+ * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target
+ makefile fragments.
+ * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
+ New files, host makefile fragments.
+ * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
+
+Tue Jul 5 13:56:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * elfcode.h (swap_out_syms): Get alignment of common symbol from
+ st_value field of saved ELF symbol information, if there is any.
+
+Mon Jul 4 19:13:32 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.h (R_HPPA_COMPLEX): Define.
+ * elf32-hppa.h (R_HPPA_COMPLEX): Define.
+ (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
+
+Fri Jul 1 12:07:41 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * Support code for enabling the new style linker for PA ELF.
+ * elfcode.h (swap_symbol_in, swap_symbol_out): Externalize.
+ (elf_compute_section_file_positions): Pass link_info to
+ the begin_write_processing hook.
+ (bfd_elf_write_object_contents): Pass NULL for new link_info
+ argument to final_write_processing hook.
+ (elf_link_output_sym): Accept new "input_section" argument for
+ the symbols's input section. All callers changed. Call the
+ link_output_symbol_hook if it's defined.
+ (elf_bfd_final_link): Call the final_write_processing hook if
+ it's defined.
+ * libelf.h (elf_backend_link_output_symbol_hook): Declare.
+ (elf_backend_begin_write_processing): Add new "info" argument.
+ (elf_backend_final_write_processing): Likewise.
+ * elf32-target.h (elf_backend_link_output_symbol_hook): Provide
+ a default definition.
+ (elf32_bed): Add elf_backend_link_output_symbol_hook.
+ * elf64-target.h: Likewise.
+
+ * Major rework of the PA ELF code. Uses the new style BFD
+ linker, major cleanups.
+ * hppa_stubs.h: Rewrite from scratch. Much smaller and simpler.
+ * elf32-hppa.h: Delete all symbol extension related code.
+ (hppa_look_for_stubs_in_section): Delete decl.
+ (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls.
+ * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h
+ into elf32-hppa.c. Do not include aout64.h.
+ (typdef hppa_stub_type): Delete.
+ (elf32_hppa_stub_name_list_struct): Delete.
+ (elf32_hppa_stub_description_struct): Delete.
+ (arg_reloc_type): Use simpler enumerations. All references changed.
+ (arg_location, arg_reloc_relocation): Likewise.
+ (elf32_hppa_symextn_map_struct): Delete.
+ (get_symbol_value): Delete.
+ (elf32_hppa_get_sym_extn): Delete.
+ (find_stubs, new_stubs, type_of_mismatch): Delete.
+ (find_stub_by_name, add_stub_by_name): Delete.
+ (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete.
+ (hppa_elf_arg_reloc_needed): Renamed. Simplify.
+ (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete.
+ (hppa_elf_long_branch_needed_p): Delete.
+ (hppa_look_for_stubs_in_section): Delete.
+ (hppa_elf_get_section_contents): Delete.
+ (elf32_hppa_backend_symbol_processing): Delete.
+ (elf32_hppa_backend_section_processing): Delete.
+ (elf32_hppa_backend_section_from_shdr): Delete.
+ (elf32_hppa_backend_fake_sections): Delete.
+ (elf32_hppa_backend_section_from_bfd_section): Delete.
+ (NEW_INSTRUCTION): Delete.
+ (CURRENT_STUB_OFFSET): Delete.
+ (elf32_hppa_relocate_section): New function.
+ (elf32_hppa_bfd_final_link_relocate): New function.
+ (elf32_hppa_size_symext): New function.
+ (elf32_hppa_link_output_symbol_hook): New function.
+ (elf32_hppa_read_symext_info): New function.
+ (elf32_hppa_add_symbol_hook): New function.
+ (elf32_hppa_name_of_stub): New function.
+ (elf32_hppa_size_of_stub): New function.
+ (elf32_hppa_build_one_sub): New function.
+ (elf32_hppa_build_stubs): New function.
+ (elf32_hppa_size_stubs): New function.
+ (linker, stub and argument hash tables): Add appropriate
+ structures, definitions and functions to implement all three
+ hash tables.
+ (hppa_elf_relocate_insn): Don't need argument location information
+ in this function.
+ (add_entry_to_symext_chain): Accept a symbol's argument location
+ information rather than the symbol itself. All callers changed.
+ (hppa_elf_gen_reloc_type): Simplify.
+ (hppa_elf_set_section_contents): Stub section is no longer special.
+ (hppa_elf_reloc): Greatly simplify.
+ (elf32_hppa_begin_write_processing): Accept link_info argument.
+ Handle being called from the BFD backend linker.
+ (elf32_hppa_final_write_processing): Likewise.
+ (elf_hppa_tc_make_sections): No longer call stub_finish.
+
+Mon Jun 27 18:07:06 1994 Steve Chamberlain (sac@cirdan.cygnus.com)
+
+ * section.c (bfd_get_section_contents): Put in parens to get
+ precedence right.
+
+Sun Jun 26 18:08:29 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * libelf.h (relocate_section): New argument "output_names" added
+ to prototype.
+ * elfcode.h (elf_link_input_bfd): New argument "output_names"
+ added to prototype of relocate_section. Pass the output symbol
+ names to relocate_section.
+ * elf32-i386.c (elf_i386_relocate_section): Use "output_names" to
+ determine the name of a local symbol.
+ * elf32-mips.c (mips_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+Fri Jun 24 08:15:42 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ Add Solaris BCP (the part of Solaris which allows it to run
+ SunOS4 a.out files) core file handling.
+ * aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
+ New structure and its swap in function.
+ (internal_sunos_core): New member c_data_addr, to receive the
+ start address of the data section in the core file.
+ (swapcore_sun3, swapcore_sparc, sunos4_core_file_p): Use it.
+ (sunos4_core_file_p): Recognize Solaris BCP core file.
+ (sunos4_core_file_matches_executable_p): Always indicate match
+ for Solaris BCP core files.
+
+Thu Jun 23 15:31:28 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ Preliminary support for generating shared libraries, from Eric
+ Youngdale <ericy@cais.cais.com>.
+ * elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
+ (elf_link_add_object_symbols): If generating a shared library,
+ create dynamic sections for first input BFD with the right format.
+ (elf_link_create_dynamic_sections): Don't create .interp section
+ if creating a shared library.
+ (elf_link_input_bfd): Skip dynamic sections in input file.
+ (elf_bfd_final_link): If creating a shared library, it's OK for
+ dynobj to have sections which are not SEC_IN_MEMORY.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
+ section if not creating a shared library.
+ * elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
+
+ * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
+ is an SHT_DYNAMIC section.
+
+ * cf-i386lynx.c (i386coff_vec): Don't include DYNAMIC in
+ object_flags.
+ * coff-sparc.c (sparccoff_vec): Likewise.
+ * hppabsd-core.c (hppabsd_core_vec): Likewise.
+
+ * aoutx.h (NAME(aout,some_aout_object_p)): Don't set SEC_RELOC
+ just because DYNAMIC is set.
+
+Thu Jun 23 12:53:41 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure.in: Change --with-targets to --enable-targets and
+ --with-64-bit-bfd to --enable-64-bit-bfd.
+ * Makefile.in, mpw-make.in, targets.c: Change comments.
+
+Wed Jun 22 17:59:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config.bfd (powerpc-*-elf*): New target, just like
+ powerpc-*-sysv4*.
+
+ * linker.c (FAIL): Undefine macro before defining as enum.
+
+Wed Jun 22 10:52:47 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
+ pass from abfd->archive_pass, and save it there as well.
+
+ * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
+ obstack_alloc returns NULL unless the size is non-zero.
+
+ * linker.c (archive_hash_allocate): Define.
+ (_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
+ rather than obstack_alloc, for clarity.
+
+ * elfcode.h (elf_get_reloc_upper_bound): Correct.
+
+ * aout64.c (BMAGIC, QMAGIC): Define if not already defined. From
+ Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
+
+ Linux ZMAGIC support from Eric Youngdale <ericy@cais.cais.com>.
+ * libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
+ * aout-target.h (MY(callback)): Only set alignment according to
+ architecture if the section sizes are aligned to that alignment,
+ for backward compatibility.
+ (MY(set_sizes)): Initialize zmagic_disk_block_size field.
+ * aoutx.h (adjust_z_magic): Set ztih if using q_magic_format. Set
+ text section filepos to zmagic_disk_block_size if not ztih. Use a
+ different padding algorithm if not ztih.
+ * i386linux.c (MY_text_includes_header): Don't define.
+
+ * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
+ symbols; don't look them up in the hash table. From
+ ralphc@pyramid.com (Ralph Campbell).
+
+Tue Jun 21 11:47:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * coff-go32.c (go32coff_archive_p): Remove unused function.
+
+ * section.c (bfd_abs_section): Make const.
+ (bfd_abs_section_ptr, bfd_is_abs_section): Define.
+ (bfd_und_section): Make const.
+ (bfd_und_section_ptr, bfd_is_und_section): Define.
+ (bfd_com_section): Make const.
+ (bfd_com_section_ptr): Define.
+ (bfd_ind_section): Make const.
+ (bfd_ind_section_ptr, bfd_is_ind_section): Define.
+ (bfd_abs_symbol, bfd_com_symbol): Make const.
+ (bfd_und_symbol, bfd_ind_symbol): Likewise.
+ (global_syms): Cast initialization of section field.
+ (STD_SECTION): Define as const, and cast initializations.
+ * bfd-in2.h: Rebuilt.
+ * Many files: Change uses of bfd_abs_section, etc., to use
+ bfd_abs_section_ptr or bfd_is_abs_section, etc.
+
+Mon Jun 20 11:06:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * Many files: change all bfd_target vectors to be const. Change
+ all uses of bfd_target * to be const bfd_target *. Change
+ bfd_target_vector and bfd_default_vector arrays to be const
+ bfd_target * const *.
+
+ * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
+ elf32-mips.c: Renamed all externally visible ECOFF routines which
+ are local to BFD to start with _bfd_ecoff instead of just ecoff.
+
+ * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
+ (ecoff_swap_tir_out): Likewise.
+ (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
+ (ecoff_slurp_symbolic_info): Add new arguments to correspond to
+ read_debug_info entry point in ecoff_debug_swap structure.
+ Change all calls.
+ * libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
+ * ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
+ (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize new
+ ecoff_debug_swap fields.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+ * elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
+ (mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
+ fields.
+ * configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
+ ecofflink.o.
+ (bfd_elf32_littlemips_vec): Likewise.
+ (ecoff_big_vec, ecoff_little_vec): Likewise.
+ (ecoffalpha_little_vec): Likewise.
+ * Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
+ (BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
+
+ * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
+ when computing reloc sizes. From Eric Youngdale
+ <ericy@cais.cais.com>.
+ * elfcode.h (elf_bfd_final_link): Don't try to compute maximum
+ reloc count or size for a non-ELF file.
+
+ * mipsbsd.c (MY_final_link_callback): Define to avoid warning.
+
+ * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
+ (BMAGIC, QMAGIC): Define; used by aoutx.h.
+ (MY(slurp_symbol_table)): Change translate_from_native_sym_flags
+ calls to use new parameters.
+
+Fri Jun 17 14:45:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aout-target.h (MY(callback)): Set the alignments of the text,
+ data and bss sections after determining the architecture.
+
+ * sunos.c (sunos_add_one_symbol): Treat a common symbol from a
+ dynamic object as being in the .bss section of the object, rather
+ than as being undefined.
+
+Fri Jun 17 11:16:50 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
+
+ * elf32-hppa.h (elf_hppa_final_processing): Delete decl.
+
+Thu Jun 16 23:36:23 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
+ if there aren't any in the input file.
+
+Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
+
+ * i386linux.c: Many new functions and definitions for linker
+ support for Linux shared libraries.
+ * bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
+ * bfd-in2.h: Rebuild.
+
+Thu Jun 16 14:23:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config.bfd: If second argument is ``_'', then, instead of
+ echoing config file name, echo whether target uses leading
+ underscores on symbol names. Add appropriate settings to
+ different cases. Used by binutils/configure.in to set default for
+ c++filt.
+
+ * elfcode.h (elf_bfd_final_link): If trying to generate a shared
+ object, warn and return false.
+
+ * aoutx.h (NAME(aout,some_aout_object_p)): Accept BMAGIC objects
+ and treat them as OMAGIC.
+
+Wed Jun 15 18:02:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ Enable sparc v9 support for release. Note that this is still a
+ work in progress, pending release of an ABI specification.
+ * config.bfd, configure.in: Include sparc v9 elf config.
+ * elfcode.h (prep_headers): Handle sparc v9 (64 bit).
+ * reloc.c (bfd_reloc_code_real): New reloc types.
+ * elf64-sparc.c: Implement elf64-sparc target.
+ * Makefile.in, targets.c: Updated.
+
+Wed Jun 15 01:34:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
+ (elf_dt_needed_name): New accessor macro.
+ * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
+ is set, use that instead of the filename for the DT_NEEDED dynamic
+ entry.
+ * elf.c (bfd_elf_set_dt_needed_name): New function.
+ * bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
+ * bfd-in2.h: Rebuilt.
+
+ * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add sinterpptr
+ argument, and set it to the .interp section.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
+ (bfd_elf64_size_dynamic_sections): Likewise.
+ * bfd-in2.h: Rebuilt.
+
+ * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
+ field of the reloc rather than letting it be garbage.
+
+ * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as
+ __.SYMDEF; the former was used in old Linux archives. From
+ jrs@world.std.com (Rick Sladkey).
+
+ * i386linux.c (i386linux_write_object_contents): Define; like
+ MY(write_object_contents) in aout-target.h, but set MACHTYPE to
+ M_386. From jrs@world.std.com (Rick Sladkey).
+ (MY_write_object_contents): Define.
+
+ * aoutx.h (translate_from_native_sym_flags): Treat N_SETV symbols
+ as N_DATA symbols.
+ (aout_link_add_symbols): Likewise.
+
+ * aoutx.h: Rewrite symbol duplicate elimination to use BFD hash
+ tables.
+ (struct stringtab_entry, struct stringtab_data): Remove.
+ (HASHMAXLEN, HASH_CHAR, hash, compare, log2, emit_strtab): Remove.
+ (struct strtab_hash_entry, struct strtab_hash): Define.
+ (strtab_hash_newfunc, strtab_hash_lookup): Define.
+ (stringtab_free, emit_stringtab): Define.
+ (stringtab_init, add_to_stringtab): Rewrite.
+ (NAME(aout,write_syms)): Use new stringtab code.
+ (struct aout_final_link_info, NAME(aout,final_link)): Likewise.
+ (aout_link_write_symbols, aout_link_write_other_symbol): Likewise.
+
+ * bfd-in.h (BFD_TRADITIONAL_FORMAT): Define new BFD flag to
+ request BFD to write object in the traditional format, whatever
+ that means for the particular backend.
+ * bfd-in2.h: Rebuilt.
+
+ * hash.c (bfd_hash_allocate): If obstack_alloc fails, set
+ bfd_error_no_memory.
+
+Tue Jun 14 13:00:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libaout.h (struct aoutdata): Add q_magic_format to subformat
+ enum.
+ * aout-target.h (MY_bfd_copy_private_bfd_data): Define as function
+ if not already defined. Copy subformat information.
+ (MY_text_includes_header): Define as 0 if not already defined.
+ (MY(backend_data)): Use MY_text_includes_header rather than 0.
+ (MY_final_link_callback): Rename from final_link_callback, and
+ define only if MY_final_link_callback is not already defined.
+ (MY_bfd_final_link): Rename use of final_link_callback to
+ MY_final_link_callback.
+ * aoutx.h (NAME(aout,some_aout_object_p)): Handle QMAGIC like
+ ZMAGIC, but set the subformat to q_magic_format. Abort if the
+ magic number if not recognized.
+ (adjust_z_magic): Use QMAGIC if q_magic_format.
+ * i386linux.c (MY_text_includes_header): Define as 1.
+ (i386linux_bfd_final_link): New static function.
+ (MY_bfd_final_link): Define as i386linux_bfd_final_link.
+
+ * aoutx.h (translate_to_native_sym_flags): Check both section and
+ output_section against sections of abfd.
+
+ * libecoff.h (struct ecoff_link_hash_entry): Change type of
+ written from boolean to char. Add new field small.
+ * ecoff.c (ecoff_link_hash_newfunc): Initialize written to 0
+ rather than false. Initialize small to 0.
+ (ecoff_link_add_externals): If ECOFF type is scSUndefined, set
+ small. If small is set, and hash table type is common, force the
+ symbol into a section named SCOMMON and change the ECOFF type from
+ scCommon to scSCommon.
+ (ecoff_link_write_external): Set written to 1 rather than true.
+ * coff-mips.c (mips_relocate_section): Correct JMPADDR reloc
+ overflow check to consider section VMA of input file.
+
+Mon Jun 13 14:20:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutf1.h (aout_32_sunos4_write_object_contents): Handle a
+ machine type of 68000.
+ * aoutx.h (NAME(aout,machine_type)): Add new argument unknown.
+ Set *unknown to true if machine type is really unknown, as opposed
+ to M_UNKNOWN for the 68000.
+ (NAME(aout,set_arch_mach)): Change NAME(aout,machine_type) call
+ accordingly.
+ * libaout.h (NAME(aout,machine_type)): Add new argument to
+ prototype.
+
+Sun Jun 12 20:21:03 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID
+ or HIUX_AUX_ID.
+ (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
+ (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note
+ som.c is careful to always define CPU_PA_RISC1_0.
+
+Sat Jun 11 16:32:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Add weak symbols as an extension to a.out.
+ * aoutx.h (sym_in_text_section): Don't define.
+ (sym_in_data_section, sym_in_bss_section): Likewise.
+ (sym_is_undefined, sym_is_global_defn): Likewise.
+ (sym_is_debugger_info, sym_is_fortrancommon): Likewise.
+ (sym_is_absolute, sym_is_indirect): Likewise.
+ (translate_from_native_sym_flags): Rewrite for clarity. Rearrange
+ arguments and change caller. Handle weak symbols.
+ (translate_to_native_sym_flags): Likewise.
+ (aout_link_check_ar_symbols): Don't ignore weak symbols. Pull
+ object in from archive if a weak defintion is found for an
+ existing undefined symbol.
+ (aout_link_add_symbols): Put all cases in switch. Set flags of an
+ undefined symbol to 0. Handle weak symbols.
+ (aout_link_write_symbols): Handle weak symbols.
+ (aout_link_write_other_symbol): Likewise.
+ (aout_link_input_section_std): Likewise.
+ (aout_link_input_section_ext): Likewise.
+ * sunos.c (sunos_write_dynamic_symbol): Likewise.
+
+Fri Jun 10 13:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
+ (NAME(aout,get_reloc_upper_bound)): Likewise.
+
+ * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
+ * linker.c (_bfd_generic_link_write_global_symbol): Don't assume
+ the section of a common symbol is not NULL.
+
+Wed Jun 8 23:15:53 1994 Stu Grossman (grossman@cygnus.com)
+
+ * nlmcode.h (nlm_object_p): Set EXEC_P and start address for GDB.
+
+Wed Jun 8 23:57:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_get_external_symbols): Don't try to read the
+ strings if there are no symbols.
+ (aout_link_write_other_symbol): Use the output section when
+ working out the type.
+
+Tue Jun 7 13:25:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (assign_section_numbers): Put shstrtab, symtab and
+ strtab sections at end of file. Avoids bug in some versions of
+ SVR4 strip. From Eric Youngdale <eric@tantalus.nrl.navy.mil>.
+
+ * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
+ set SEC_DEBUGGING for STYP_INFO sections.
+ (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
+ defined, and D_PAGED is set, set the file position equal to the
+ section VMA modulo COFF_PAGE_SIZE.
+ * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
+ * coff-i386.c: Set D_PAGED in BFD target.
+ (COFF_PAGE_SIZE): Define.
+ * coff-m68k.c, coff-sparc.c: Likewise.
+
+Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
+ into a BFD section just because SHF_ALLOC is set; require that it
+ not use the normal symbol table.
+ (elf_section_from_bfd_section): Corresponding change.
+
+ Better indirect and warning symbol handling inspired by Stuart
+ Quick <stuck@cs.man.ac.uk>.
+ * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
+ (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
+ to REF. Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
+ REFC. Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
+ Change DEFW_ROW/indr from CYCLE to NOACT. Change INDR_ROW/indr
+ from MDEF to MIND. Change INDR_ROW/warn from WARNC to CYCLE.
+ Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN. Change
+ WARN_ROW/com from MWARN to WARN. Change WARN_ROW/warn from NOACT
+ to CYCLE. Change SET_ROW/warn from WARNC to CYCLE>
+ (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
+ REFC. If a new indirect symbol has been referenced, push the
+ reference down to the symbol it points to. FIx handling of WARN.
+ * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
+ clobber e_type of next symbol.
+ (translate_to_native_sym_flags): Likewise.
+ (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
+ as bfd_link_hash_indirect.
+
+ * libaout.h (struct aout_link_hash_entry): New field written.
+ * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
+ (aout_link_write_symbols): Use written, not root.written.
+ (aout_link_write_other_symbol): Likewise.
+ * sunos.c (sunos_scan_dynamic_symbol): Likewise.
+ * libecoff.h (struct ecoff_link_hash_entry): New field written.
+ * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
+ (ecoff_link_write_external): use written, not root.written.
+ * genlink.h (struct generic_link_hash_entry): New field written.
+ * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
+ (generic_link_hash_newfunc): Initialize written.
+ (_bfd_generic_link_output_symbols): Use written, not root.written.
+ (_bfd_generic_link_write_global_symbol): Likewise.
+ (_bfd_generic_reloc_link_order): Likewise.
+
+ * libecoff.h (ecoff_data_type): Add linker field.
+ * ecoff.c (ecoff_write_object_contents): Check new tdata linker
+ field, rather than outsymbols being non-NULL, to decide whether to
+ output the symbols and relocs.
+ (ecoff_bfd_final_link): Set new tdata linker field to true.
+
+ * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
+ data to a non-ECOFF file.
+
+ * libbfd-in.h: Add warning that libbfd.h is a generated file.
+ * libbfd.h: Rebuilt.
+
+Sun Jun 5 15:02:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Changes to support ELF strip and objcopy on dynamically linked
+ files.
+ * elfcode.h (elf_fake_sections): Add prototype.
+ (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
+ section, and from an SHT_DYNSYM section, and from the dynamic
+ string table section.
+ (elf_object_p): Set D_PAGED if there is a program header.
+ (elf_make_sections): Remove.
+ (fix_up_strtabs): Remove.
+ (elf_fake_sections): Rewrite. Now sets sh_entsize.
+ (assign_section_numbers): Rewrite. Now sets sh_link and sh_info
+ for all sections.
+ (elf_compute_section_file_positions): Don't call obsolete
+ functions elf_make_sections or fix_up_strtabs.
+ (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
+ (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
+ objects.
+ (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
+ sections. If an SHT_REL or SHT_RELA section is allocated or uses
+ an unusual symbol table, permit a BFD section to map to it.
+ Permit most SHT_STRTAB sections to have a BFD section mapped to
+ them.
+ (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
+ fields of dynamic sections here; do it in assign_section_numbers.
+ * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
+ flags.
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
+ SEC_LOAD is set, rather than checking SEC_ALLOC.
+
+ * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
+
+Fri Jun 3 10:58:02 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_write_object_contents): Don't compute the file header's
+ checksum here.
+ (som_write_headers): Instead do it here.
+
+ * libbfd.h (bfd_realloc): Change last arg to "size_t size".
+
+Thu Jun 2 17:39:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * hosts/sun3.h: Include <stdlib.h>. Don't declare free, exit or
+ getenv.
+
+ Add linker support for SunOS shared libraries.
+ * sunos.c: Include bfdlink.h. Add many new functions and
+ definitions for SunOS shared library support.
+ * bfd-in.h (bfd_sunos_record_link_assignment): Declare.
+ (bfd_sunos_size_dynamic_sections): Declare.
+ * bfd-in2.h: Rebuilt.
+ * aoutx.h (struct aout_link_hash_entry): Move to libaout.h.
+ (struct aout_link_hash_table): Likewise.
+ (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
+ (aout_hash_table): Likewise.
+ (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc
+ and make externally visible.
+ (NAME(aout,link_hash_table_init)): New function.
+ (NAME(aout,link_hash_table_create)): Call
+ NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init.
+ (aout_link_add_symbols): Don't fail if no symbols. If it exists,
+ call add_dynamic_symbols backend entry point for dynamic objects.
+ Use add_one_symbol backend entry point if it exists.
+ (NAME(aout,final_link)): Call finish_dynamic_link backend entry
+ point, if it exists.
+ (aout_link_input_bfd): For a dynamic object, call
+ link_dynamic_object backend entry point, if it exists.
+ (aout_link_write_other_symbol): Call write_dynamic_symbol backend
+ entry point, if it exists.
+ (aout_link_input_section): Don't read the relocs if they have
+ already been read.
+ (aout_link_input_section_std): When doing a final link, for a
+ reloc against an external symbol, call check_dynamic_reloc backend
+ entry point, if it exists.
+ (aout_link_input_section_ext): Likewise.
+ * libaout.h: Protect against multiple inclusion. Include
+ bfdlink.h.
+ (struct aout_link_hash_entry): Move in from aoutx.h.
+ (struct aout_link_hash_table): Likewise.
+ (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
+ (aout_hash_table): Likewise.
+ (struct aout_backend_data): Add fields add_dynamic_symbols,
+ add_one_symbol, link_dynamic_object, write_dynamic_symbol,
+ check_dynamic_reloc, and finish_dynamic_link.
+ (struct aout_section_data_struct): Define new structure.
+ (aout_section_data): Define new accessor macro.
+ (NAME(aout,link_hash_newfunc)): Declare.
+ (NAME(aout,link_hash_table_init)): Declare.
+ * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data
+ fields.
+ * aout-target.h (MY(backend_data)): Likewise.
+ * i386aout.c (MY(backend_data)): Likewise.
+ * i386mach3.c (MY(backend_data)): Likewise.
+ * mipsbsd.c (MY(backend_data)): Likewise.
+ * sparclynx.c (sparclynx_aout_backend): Likewise.
+
+ * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
+ until we know it is non-NULL.
+ (aout_link_write_symbols): Don't skip a warning symbol even if it
+ has already been written out. If skipping an indirect symbol,
+ skip the next symbol as well.
+
+Wed Jun 1 14:37:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * hosts/sun3.h: Don't declare qsort, malloc or realloc.
+
+Thu May 26 13:56:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
+ to char pointer to avoid compiler warnings.
+
+ * dep-in.sed: Remove spaces before colons.
+
+ Merged changes back in from FSF gas release 2.3:
+
+ * Makefile.in (stmp-bfd.h): Wrap `if' block around grep
+ invocation, to avoid a bug in BSD 4.4 make.
+
+ From Ralph Campbell:
+ * mipsbsd.c (mips_fix_jmp_addr): If symbol is undefined, return an
+ error.
+ (mips_fix_hi16_s): Ditto.
+
+ Fri May 13 21:21:00 1994 DJ Delorie (dj@ctron.com)
+
+ * makefile.dos: define a default target, or archives won't work
+ due to multiple matches.
+
+ Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
+
+ * configure.bat: update for latest files
+ * makefile.dos: update for correct targets and sources
+ * coff-go32.c: [new] go32's COFF format (i386coff with underscores)
+ * targets.c: add go32coff target
+ * makefile.in: add coff-go32.c support
+
+Thu May 26 10:10:21 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_prep_headers): Do not set the system_id here, private
+ bfd data has not been copied yet.
+ (som_write_headers): Instead do it here.
+
+Tue May 24 16:17:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Make MIPS ELF use new ELF backend linker. No shared library
+ support yet.
+ * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
+ (bfd_mips_elf32_swap_gptab_out): New function.
+ (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
+ (mips_elf_final_write_processing): Set sh_info field for .gptab.*
+ sections.
+ (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
+ (mips_elf_read_ecoff_info): Read and free external symbols last,
+ not first, for clarity.
+ (struct mips_elf_link_hash_entry): Define new structure.
+ (struct mips_elf_link_hash_table): Define new structure.
+ (mips_elf_link_hash_lookup): Define new macro.
+ (mips_elf_link_hash_traverse): Define new macro.
+ (mips_elf_hash_table): Define new macro.
+ (mips_elf_link_hash_newfunc): New static function.
+ (mips_elf_link_hash_table_create): New static function.
+ (mips_elf_add_symbol_hook): New static function.
+ (struct extsym_info): Define new structure.
+ (mips_elf_get_extr, mips_elf_set_index): Remove.
+ (mips_elf_output_extsym): New static function.
+ (gptab_compare): New static function.
+ (mips_elf_final_link): Rewrite to use ELF backend linker, and to
+ merge gptab information in input files.
+ (mips_elf_relocate_hi16): New static function.
+ (mips_elf_relocate_section): New static function.
+ (bfd_elf32_bfd_link_hash_table_create): Define as macro before
+ including elf32-target.h.
+ (elf_backend_relocate_section): Likewise.
+ (elf_backend_add_symbol_hook): Likewise.
+ * elf.c (_bfd_elf_link_hash_newfunc): Rename from
+ elf_link_hash_newfunc and make globally visible. Change caller.
+ (_bfd_elf_link_hash_table_init): New function, broken out of
+ _bfd_elf_link_hash_table_create.
+ (_bfd_elf_link_hash_table_create): Use
+ _bfd_elf_link_hash_table_init.
+ * libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
+ (elf_bad_symtab): Define new accessor macro.
+ (_bfd_elf_link_hash_newfunc): Declare.
+ (_bew_elf_link_hash_table_init): Declare.
+ * elfcode.h (elf_object_p): Call backend object_p hook after
+ swapping in all the section headers.
+ (map_program_segments): Correct typo: Internal for External.
+ (elf_link_add_object_symbols): If elf_bad_symtab is set, read all
+ the symbols. Skip STB_LOCAL symbols rather than giving an error.
+ (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
+ all symbols, not just locals.
+ (elf_link_output_extsym): Only skip a symbol not mentioned by a
+ regular file if it is mentioned by a dynamic object.
+ (elf_link_input_bfd): If elf_bad_symtab is set, read all the
+ symbols.
+
+Fri May 20 13:38:23 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_set_reloc_info): Do not set any relocation info
+ for SOM fixups which are never passed to BFD.
+
+Fri May 20 11:57:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
+ checking.
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
+ the dynamic linking information for the benefit of the debugger.
+ From Peter Schauer.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+
+ * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
+ code repeated three times in bfd_section_from_shdr in elfcode.h.
+ * libelf.h (_bfd_elf_make_section_from_shdr): Declare.
+ * elfcode.h (bfd_section_from_shdr): Use new function
+ _bfd_elf_make_section_from_shdr to create BFD sections. If a
+ reloc section does not use the main symbol table, or it is part of
+ the process image, treat it as a normal section, not relocs.
+ * elf32-mips.c (mips_elf_section_from_shdr): Use new function
+ _bfd_elf_make_section_from_shdr.
+
+Thu May 19 11:37:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
+ 15 to 14 to match SVR4 ar.
+
+ Add support for ELF shared libraries. Loosely based on work by
+ Eric Youngdale <ericy@cais.com>.
+ * libelf.h (struct elf_backend_data): Add new fields for dynamic
+ linking: elf_backend_create_dynamic_sections,
+ elf_backend_adjust_dynamic_symbol,
+ elf_backend_size_dynamic_sections,
+ elf_backend_finish_dynamic_symbol,
+ elf_backend_finish_dynamic_sections.
+ (struct elf_link_hash_entry): Change type of align field to
+ bfd_size_type. Add fields dynindx, dynstr_index, weakdef,
+ elf_link_hash_flags.
+ (struct elf_link_hash_table): Add fields dynobj, dynsymcount,
+ dynstr, bucketcount.
+ (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
+ (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
+ (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
+ (bfd_elf32_add_dynamic_entry): Declare.
+ (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
+ (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
+ (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
+ (bfd_elf64_add_dynamic_entry): Declare.
+ * elfcode.h (Elf_External_Dyn): Define.
+ (elf_swap_reloc_in): Define as macro using NAME. Make externally
+ visible.
+ (elf_swap_reloc_out): Likewise.
+ (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
+ (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
+ and as new externally visible function.
+ (elf_fake_sections): Set section type of dynamic sections based on
+ section names.
+ (elf_write_phdrs): Remove.
+ (assign_file_position_for_section): Add new align argument.
+ Change all callers.
+ (get_program_header_size): New static function.
+ (struct seg_info): Remove.
+ (map_program_segments): Completely rewrite.
+ (assign_file_positions_except_relocs): Completely rewrite.
+ (assign_file_positions_for_relocs): Don't set a file position for
+ sections which already have one. Don't bother to align the file
+ position here.
+ (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
+ section types.
+ (elf_section_from_bfd_section): Likewise.
+ (elf_slurp_symbol_table): If section_from_elf_index fails, just
+ use bfd_abs_section rather than returning an error.
+ (elf_sizeof_headers): Make useful.
+ (elf_link_record_dynamic_symbol): New static function.
+ (elf_link_add_object_symbols): Handle dynamic objects.
+ (elf_link_create_dynamic_sections): New static function.
+ (elf_add_dynamic_entry): Define as macro using NAME and as new
+ externally visible function.
+ (NAME(bfd_elf,record_link_assignment)): New function.
+ (elf_buckets): New static variable.
+ (NAME(bfd_elf,size_dynamic_sections)): New function.
+ (struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
+ (elf_bfd_final_link): Handle dynamic linking. Create a section
+ symbol for all ELF sections, not all BFD sections. Store section
+ symbol index in target_index field, not index field. Traverse
+ over global symbols even if stripping.
+ (elf_link_output_extsym): Output dynamic symbols. Mark symbols
+ defined by dynamic objects as undefined.
+ (elf_link_input_bfd): Ignore dynamic objects. Use target_index
+ field for section relocs, and make sure it is set.
+ (elf_reloc_link_order): Use target_index field for section relocs,
+ and make sure it is set.
+ * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
+ weakdef and elf_link_hash_flags fields.
+ (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
+ dynstr and bucketcount fields.
+ * elf32-target.h: Initialize new dynamic linking fields.
+ * elf64-target.h: Likewise.
+ * elf32-i386.c: New functions for dynamic linking support.
+ * elf32-sparc.c: Likewise.
+ * bfd-in.h (bfd_elf32_record_link_assignment): Declare.
+ (bfd_elf64_record_link_assignment): Declare.
+ (bfd_elf32_size_dynamic_sections): Declare.
+ (bfd_elf64_size_dynamic_sections): Declare.
+ * bfd-in2.h: Rebuilt.
+
+Wed May 18 08:29:04 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * som.c: Don't include <sys/dir.h> or <sys/user.h>.
+ (som_reloc_queue_find): Call memcmp instead of bcmp.
+ (som_bfd_reloc_type_lookup): Change first argument to bfd *.
+ (compare_syms): Change types of arguments to const void *.
+ (bfd_section_from_som_symbol): Removed unused local found.
+ (som_write_armap): Add elength, map, orl_count and int arguments.
+ (som_write_armap): Use %ld and cast to long for getuid result.
+
+Wed May 18 09:09:32 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
+ * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
+
+ * som.h (R_HPPA_ABS_CALL): Define.
+ * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
+
+Tue May 17 19:33:12 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading
+ underscore, for compatibility with Intel tool chain (gnu960v2).
+
+Mon May 16 10:09:22 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * bfd-in2.h: Rebuilt.
+
+ * elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
+ likewise for other PA specific sections.
+ (hppa_elf_relocate_unwind_table): Delete unused
+ function.
+ (elf_hppa_howto_table): Completely new table based on 94-02-02
+ draft PA ELF spec. Change relocation tags appropriately
+ throughout elf32-hppa.c
+ (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
+ spec.
+ (hppa_elf_reloc): Likewise.
+ (hppa_look_for_stubs_in_section): Likewise
+ (ELF_MACHINE_CODE): Change to EM_PARISC.
+ * elf32-hppa.h: Include "elf/hppa.h". Change relocation tags
+ appropriately throughout elf32-hppa.h.
+ (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
+ spec.
+ (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
+ * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
+ * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
+ * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.
+
+ * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
+ the final value twice for LR and RR field selectors.
+
+Sat May 14 09:09:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert. This
+ avoids __eprintf troubles.
+
+Fri May 13 10:51:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.
+
+ * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
+ ecoff_little_vec since Irix 5 supports ECOFF executables.
+
+Wed May 11 00:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
+ correctly.
+
+ * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
+ make to invoke the shell.
+
+Tue May 10 14:23:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
+ SEC_SHARED_LIBRARY for clarity. Changed all uses.
+ * bfd-in2.h: Rebuilt.
+ * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
+ set, set STYP_NOLOAD.
+ * coffgen.c (coff_section_from_bfd_index): Don't get an assertion
+ failure because of a bad shared library.
+
+Mon May 9 18:53:40 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * linker.c: Add missing comment terminator.
+
+Mon May 9 11:53:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
+ are not NULL, assume the caller has already looked up the symbol
+ in the hash table and has stored the entry in *hashp.
+ (generic_link_add_symbol_list): Set h to NULL before calling
+ _bfd_generic_link_add_one_symbol.
+ * ecoff.c (ecoff_link_add_externals): Likewise.
+
+ * elfcode.h (assign_file_positions_except_relocs): Don't require
+ page shared between .data and .bss segments to contain zeroes.
+
+ * elfcode.h: Include bfdlink.h. Added several new functions to do
+ linking.
+ (ELF_R_TYPE): Define.
+ (bfd_add_to_strtab): Return unsigned long. Change check for
+ realloc failure.
+ (elf_fake_sections): Check return value of bfd_add_to_strtab.
+ (elf_compute_section_file_positions): Add link_info argument.
+ Call elf_backend_begin_write_processing hook and prep_headers
+ here. Only call swap_out_syms if link_info is NULL. Set up
+ .shstrtab section here. Pass dosyms argument to
+ assign_file_positions_except_relocs. Set output_has_begun flag.
+ (assign_file_positions_for_symtab_and_strtabs): Add dosyms
+ argument, and use it to control setting .symtab and .strtab file
+ positions.
+ (assign_file_positions_except_relocs): Add dosyms argument, and
+ pass it on.
+ (prep_headers): Check return value of bfd_add_to_strtab.
+ (swap_out_syms): Likewise. Also, don't set up .shstrtab here.
+ (NAME(bfd_elf,write_object_contents)): Some calls moved into
+ elf_compute_section_file_positions.
+ (elf_set_section_contents): Likewise.
+ (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
+ * libelf.h: Include bfdlink.h.
+ (struct elf_backend_data): Add fields collect,
+ elf_add_symbol_hook, elf_backend_relocate_section.
+ (struct bfd_elf_section_data): Add field rel_hashes.
+ (struct elf_obj_tdata): Remove fields internal_syms and symbols.
+ Add field sym_hashes.
+ (obj_symbols, obj_internal_syms): Remove definitions.
+ (elf_sym_hashes): Define.
+ (struct elf_link_hash_entry): Define.
+ (struct elf_link_hash_table): Define.
+ (elf_link_hash_lookup): Define.
+ (elf_link_hash_traverse): Define.
+ (elf_hash_table): Define.
+ (_bfd_elf_link_hash_table_create): Declare.
+ (bfd_elf32_bfd_link_add_symbols): Declare.
+ (bfd_elf32_bfd_final_link): Declare.
+ (bfd_elf64_bfd_link_add_symbols): Declare.
+ (bfd_elf64_bfd_final_link): Declare.
+ * elf.c: Include bfdlink.h.
+ (elf_link_hash_newfunc): New function.
+ (_bfd_elf_link_hash_table_create): New function.
+ * elf32-target.h (elf_backend_relocate_section): If not defined,
+ define as 0 and use generic linker. Otherwise, use ELF backend
+ linker.
+ (elf_backend_collect): If not defined, define as false.
+ (elf_backend_add_symbol_hook): If not defined, define as 0.
+ (elf32_bed): Initialize new fields.
+ * elf64-target.h: Same changes as elf32-target.h.
+ * elf32-i386.c: Include bfdlink.h.
+ (elf_i386_relocate_section): New function.
+ (elf_backend_relocate_section): Define.
+ * elf32-sparc.c: Include bfdlink.h.
+ (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
+ to Elf_Internal_Rela (they're the same type anyhow).
+ (elf_sparc_relocate_section): New function.
+ (elf_backend_relocate_section): Define.
+ * elf32-mips.c (elf_backend_collect): Define.
+
+ * Makefile.in (stmp-bfd.h): Avoid useless make error message in a
+ different way; touch takes a numeric argument on some systems.
+
+Fri May 6 13:34:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
+ handling for latest suggested format.
+ (nlm_swap_auxiliary_headers_out): Likewise.
+ (nlm_compute_section_file_positions): Likewise.
+
+Fri May 6 11:11:50 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
+
+ * config.bfd: handle erricsson config (for OSE).
+
+Thu May 5 15:40:47 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ Patches from Ralph Campbell:
+ * mipsbsd.c (mips_fix_jmp_addr): New function.
+ (mips_fix_hi16_s): Use bfd_is_com_section.
+ (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
+
+Fri May 6 11:48:55 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * config/go32.mh: XX support.
+
+ From bill
+ * Makefile.in: Build sysdep.h without causing worrying but
+ harmless error message.
+
+Wed May 4 11:09:53 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
+ * aout0.c: New file.
+ * targets.c (aout0_big_vec): Declare.
+ (bfd_target_vector): Add aout0_big_vec.
+ * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
+ * config/m68k-aout.mt (SELECT_VECS): Removed.
+ * config/m68k-0aout.mt: New file.
+ * configure.in (aout0_big_vec): New target vector: use aout0.o,
+ aout32.o and stab-syms.o.
+ * Makefile.in: Rebuilt dependencies.
+ (BFD32_BACKENDS): Add aout0.o.
+ (CFILES): Add aout0.c.
+
+ * libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
+ * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
+ MY(backend_data): Initialize exec_hdr_flags field.
+ * aoutf1.h (sunos_32_set_arch_mach): Make static.
+ (aout32_sunos4_write_object_contents): Set flags from backend
+ info.
+ (MY_exec_hdr_flags): If not defined, define as 1.
+ (sunos4_aout_backend): Initialize exec_hdr_flags field.
+ * aout-encap.c (encap_write_object_contents): Set flags from
+ backend info.
+ (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
+ * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
+ (MY(write_object_contents)): Set flags from backend info.
+ * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
+ * i386mach3.c (MY(backend_data)): Likewise.
+ * mipsbsd.c (MY(backend_data)): Likewise.
+ * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
+ flags from backend info.
+ (sparclynx_aout_backend): Initialize exec_hdr_flags field.
+
+Wed May 4 02:56:00 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
+ (m68*-apollo-*): Treat all Apollo configs the same, don't handle
+ BSD specially.
+
+Tue May 3 19:43:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * cache.c: Rewrote to work correctly.
+ * libbfd.h: Rebuilt.
+ * opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
+ (bfd_fdopenr): Check return value of bfd_cache_init.
+
+Fri Apr 29 15:08:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
+ enumerating them, since the reloc type can not serve as an index
+ into the m68k COFF howto_table.
+
+Fri Apr 29 09:42:39 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * config.bfd (*-go32): Changed to coff.
+ * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
+ * srec.c (srec_write_symbols): Write out the correct number of
+ symbols and don't stick in extra nulls.
+
+Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
+ * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
+ (COFF_SPARC): Define.
+ * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
+ power of data and bss sections to 3.
+ * hosts/lynx.h (__LYNXOS): Define.
+
+Tue Apr 26 15:04:26 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
+ against section symbols to avoid losing during ld -r.
+
+Tue Apr 26 12:16:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (shstrtab_length_fixed): Remove useless static
+ variable.
+ (struct elf_sect_data): Remove unused structure.
+ (elf_object_p): Free memory if error occurs. Check return value
+ of bfd_default_set_arch_mach. If elf_get_str_section fails,
+ preserve error code rather than setting wrong_format.
+ (null_shdr): Remove static variable.
+ (assign_section_numbers): Remove shstrtab_length_fixed assignment.
+ Allocate first section header on BFD obstack rather than using
+ null_shdr.
+ (bfd_prpsinfo): Remove unused local variable newsect.
+
+Mon Apr 25 15:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.
+
+ * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
+ to create sections. Check return value of recursive calls.
+ (bfd_section_from_phdr): Check return value of bfd_make_section.
+ (elf_symbol_from_bfd_symbol): Likewise.
+ (elf_object_p): Check return value of bfd_section_from_shdr.
+ (section_from_elf_index): Likewise.
+ (elf_slurp_symbol_table): Check return value of
+ section_from_elf_index.
+ (bfd_prstatus): Return boolean value. Check return value of
+ bfd_make_section.
+ (bfd_fpregset): Likewise.
+ (bfd_prpsinfo): Return boolean value.
+ (elf_corefile_note): Check return values of bfd_prstatus,
+ bfd_fpregset, and bfd_prpsinfo.
+ (elf_core_file_p): Check return value of elf_corefile_note.
+
+Fri Apr 22 11:08:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Get rid of the ECOFF .reginfo section hack.
+ * ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
+ (ecoff_new_section_hook): Don't handle the .reginfo section.
+ (ecoff_sizeof_headers): Likewise.
+ (ecoff_get_section_contents): Likewise.
+ (ecoff_compute_section_file_positions): Likewise.
+ (ecoff_compute_reloc_file_positions): Likewise.
+ (ecoff_set_section_contents): Likewise.
+ (ecoff_write_object_contents): Likewise.
+ (ecoff_bfd_final_link): Likewise.
+ (ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
+ register masks.
+ (bfd_ecoff_get_gp_value): New function.
+ (bfd_ecoff_set_gp_value): New function.
+ (bfd_ecoff_set_regmasks): New function.
+ * bfd-in.h (bfd_ecoff_get_gp_value): Declare.
+ (bfd_ecoff_set_gp_value): Declare.
+ (bfd_ecoff_set_regmasks): Declare.
+ * bfd-in2.h: Rebuilt.
+
+ Fix ECOFF objcopy to actually copy debugging information.
+ * ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
+ (ecoff_get_extr): Assume that any ECOFF symbol with local clear is
+ an external symbol, rather than checking the symbol flags. Only
+ check the flags for non-ECOFF symbols.
+ * ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
+ output_section field of the symbol section is NULL.
+ * libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
+ function rather than defining as macro.
+
+ * ieee.c (ieee_object_p): Set bfd_error_got_wrong_format if
+ appropriate.
+
+ * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec.
+
+ * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
+ bfd_default_set_arch_mach. Accept bfd_arch_m68k as well as
+ bfd_arch_unknown.
+ * coffcode.h (coff_set_arch_mach): Check return value of
+ bfd_default_set_arch_mach.
+ * elfcode.h (elf_set_arch_mach): Don't check a list of ELF
+ architectures, just see if the desired architecture matches what
+ the ELF backend permits.
+
+ * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to
+ SH_ARCH_MAGIC to match change in coff/sh.h.
+ (coff_set_flags): Likewise.
+
+ Follow convention in which each NLM header has an 8 byte stamp
+ followed by a four byte length.
+ * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
+ to nlm_cygnus_ext_header, and change type to
+ Nlm_Internal_Cygnus_Ext_Header.
+ (nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
+ * nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
+ of CyGnUsSeCs. Rename from cygnus_section to cygnus_ext. Require
+ length word to be 8.
+ (nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
+ cygnus_ext. Set length word to 8.
+ (nlm_compute_section_file_positions): Rename from cygnus_section
+ to cygnus_ext.
+
+Thu Apr 21 22:54:22 1994 Stu Grossman (grossman at cygnus.com)
+
+ * nlmcode.h (nlm_swap_auxiliary_headers_in): Keep section table
+ (from CyGnUsSeCs) in more permanent memory to keep section names
+ from getting trashed.
+
+Thu Apr 21 09:29:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * libelf.h (elf_obj_tdata): Add members for dynamic symbol table
+ handling.
+ * elfcode.h (bfd_section_from_shdr): Handle dynamic symbol table.
+ * elfcode.h (elf_slurp_symbol_table): Take additional parameter
+ to select static or dynamic symbol table and return number of
+ symbols slurped or -1 on error.
+ * elfcode.h (elf_get_symtab): Set bfd symcount from
+ elf_slurp_symbol_table result.
+ * elfcode.h (elf_get_dynamic_symtab_upper_bound,
+ elf_canonicalize_dynamic_symtab): New functions to handle dynamic
+ symbol table.
+ * elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
+ Change to handle dynamic symbol table, provide default definitions
+ for dynamic relocs.
+ * aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
+ NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
+ aout_link_reloc_link_order): Handle r_jmptable and r_relative
+ relocations.
+
+Thu Apr 21 11:58:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Clean up uses of _bfd_dummy_target (from Peter Schauer).
+ * libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
+ * nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
+ NULL.
+ * srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
+ _bfd_check_format.
+ (symbolsrec_vec): Likewise.
+ * tekhex.c (tekhex_vec): Likewise.
+
+ * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
+ field.
+ (nlm_cygnus_section_header): New accessor macro.
+ * nlmcode.h (nlm_object_p): Free new tdata structure if failure.
+ Add fixed sections before swapping in auxiliary headers. After
+ adding sections, treat errors as real, not as wrong format.
+ (nlm_swap_auxiliary_headers_in): Swap in the sections header; add
+ sections to the BFD for each section it describes.
+ (nlm_swap_auxiliary_headers_out): Swap out the sections header.
+ (nlm_compute_section_file_positions): Account for the size of the
+ sections header.
+
+Wed Apr 20 16:45:51 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * coff-sparc.c (sparccoff_vec): Change minimum alignment power to
+ 2, so that stab sections can be multiples of 4 bytes only.
+
+ * hosts/i386aix.h: Changes to avoid prototypes conflicts with the
+ ones defined in stdlib.h. (From Minh Tran-Le.)
+
+Wed Apr 20 14:15:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlm32-ppc.c: Complete rewrite for new version of PowerPC
+ NetWare. Old code still present, but ifdeffed out.
+
+ * nlmcode.h (nlm_swap_auxiliary_headers_in): Don't assume a
+ particular format for the customer header. Allocate a block of
+ memory and read it into that.
+ (nlm_swap_auxiliary_headers_out): Write out the block of memory.
+ (nlm_compute_section_file_positions): Include length of customer
+ header when computing its size.
+
+Mon Apr 18 14:27:17 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_prep_headers): Get the space's number from the
+ backend private section data rather than target_index.
+ (bfd_som_set_section_attributes): Store the space's number
+ in the backend private section data rather than target_index.
+
+ * som.h (som_copyable_section_data_struct): Add space_number.
+
+Fri Apr 15 12:22:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-a29k.c (reloc_processing): Always set the address of a
+ R_IHCONST reloc to that of the immediately preceding R_IHIHALF.
+ gas does this anyhow, but some other assemblers seem to leave
+ garbage in the R_IHCONST address field.
+
+ * bfd/archive.c: Consistently use ARFMAG; from
+ schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
+ (_bfd_write_archive_contents): Use ARFMAG rather than '`' and
+ '\012'.
+ (bsd_write_armap): Likewise.
+ (coff_write_armap): Likewise.
+
+ * coff-mips.c (mips_relocate_section): When relaxing, adjust local
+ relocs against the .text section as required.
+ * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust
+ PDR addresses as required.
+
+ * ecoff.c (ecoff_emit_aggregate): Take fdr argument. Map fdr
+ index through rfd map if it exists. Check for a couple of cases
+ which gdb handles specially. Change all callers.
+ (ecoff_type_to_string): Take fdr argument rather than aux_ptr and
+ bigendian argument. Change all callers.
+ (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
+
+Thu Apr 14 13:05:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-mips.c (mips_howto_table): Add dummy entries to account for
+ numbering changes in include/coff/mips.h. Add entries for
+ MIPS_R_RELHI and MIPS_R_RELLO.
+ (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type
+ when little endian. Treat internal MIPS_R_RELLO or MIPS_R_RELHI
+ relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32
+ bits.
+ (mips_ecoff_swap_reloc_out): Likewise.
+ (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or
+ MIPS_R_RELHI relocs like MIPS_R_SWITCH.
+ (mips_adjust_reloc_out): Likewise.
+ (mips_relhi_addr, mips_relhi_addend): New static variables.
+ (mips_relhi_reloc, mips_rello_reloc): New functions.
+ (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into
+ MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO.
+ (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel
+ argument. Changed all callers.
+ (mips_relocate_section): Rename got_reflo to got_lo and
+ reflo_int_rel to lo_int_rel. Handle MIPS_R_RELLO and MIPS_R_RELHI
+ relocs.
+ (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when
+ expanding a PC relative call.
+
+ * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_S
+ and BFD_RELOC_PCREL_LO16.
+ * bfd-in2.h: Rebuilt.
+
+Wed Apr 13 11:50:07 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
+
+Tue Apr 12 13:36:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_write_fixups): Always emit at least
+ one relocation for any non-bss section.
+
+Mon Apr 11 14:41:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (assign_file_positions_except_relocs): Don't require
+ the file alignment to correspond to the page size when linking
+ with -N.
+
+Sun Apr 10 01:02:24 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (write_relocs): For rela relocations, adjust the
+ addend for relocations involving section symbols to account
+ for the lossage of 1:1 mapping from input section symbols to
+ output section symbols.
+
+Fri Apr 8 12:22:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (NAME(aout,make_sections)): New function.
+ (NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
+ rather than making sections inline.
+ (NAME(aout,mkobject)): Don't make any sections.
+ (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
+ (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
+ obj_datasec (abfd) if they are NULL.
+ * libaout.h (NAME(aout,make_sections)): Declare.
+ * bout.c (b_out_mkobject): Don't make any sections.
+ (b_out_write_object_contents): Call aout_32_make_sections.
+ (b_out_set_section_contents): Likewise.
+ * i386os9k.c (os9k_mkobject): Don't make any sections.
+ (os9k_write_object_contents): Call aout_32_make_sections.
+ (os9k_set_section_contents): Likewise.
+
+ * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
+ index.
+
+Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * config.bfd, configure.host: Add mips-*-sysv4* support.
+
+Thu Apr 7 14:23:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
+ (mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
+ r_offset and set r_symndx to RELOC_SECTION_TEXT.
+ (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
+ value from the r_offset field.
+ (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
+ For MIPS_R_SWITCH, copy the r_offset field into the addend field.
+ (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
+ into the r_offset field.
+ (mips_switch_reloc): New function.
+ (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
+ MIPS_R_SWITCH.
+ (mips_relocate_section): Handle MIPS_R_SWITCH.
+ (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
+
+Thu Apr 7 11:10:51 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (elf_set_section_contents): Support calling the backend
+ function elf_backend_begin_write_processing when just beginning to
+ write an object file.
+
+ * libelf.h (elf_backend_begin_write_processing): Declare.
+
+ * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
+ a default definition.
+ (elf{32,64}_bed): Add elf_backend_begin_write_processing.
+
+ * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
+ (elf_hppa_tc_make_sections): Likewise.
+
+ * elf32-hppa.c (symext_chain_built): Delete.
+ (symext_chain_size): Renamed from symextn_contents_real_size.
+ (elf32_hppa_backend_{begin,final}_write_processing): New functions.
+ (add_entry_to_symext_chain): New function.
+ (hppa_elf_set_section_contents): Ignore writes to the symbol extension
+ section until it's been rebuilt internally.
+ (hppa_elf_get_section_contents): Symbol extension section is no
+ longer special.
+ (elf_backend_{begin,final}_write_processing): Define.
+ (elf_hppa_tc_make_sections): Simplify now that much code has
+ migrated into elf32_hppa_backend_{being,final}_write_processing.
+
+Wed Apr 6 17:24:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Add new target vectors to read the dynamic symbols and dynamic
+ relocs. Change a.out to use these rather than reading the dynamic
+ symbols and relocs along with the normal symbols and relocs.
+ * targets.c (bfd_target): Add fields
+ _bfd_get_dynamic_symtab_upper_bound,
+ _bfd_canonicalize_dynamic_symtab,
+ _bfd_get_dynamic_reloc_upper_bound,
+ _bfd_canonicalize_dynamic_reloc.
+ (BFD_JUMP_TABLE_DYNAMIC): Define.
+ * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
+ Define.
+ (_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
+ (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
+ (_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
+ * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
+ (bfd_canonicalize_dynamic_symtab): Define.
+ (bfd_get_dynamic_reloc_upper_bound): Define.
+ (bfd_canonicalize_dynamic_reloc): Define.
+ * sunos.c (MY_read_dynamic_symbols): Don't define.
+ (MY_read_dynamic_relocs): Don't define.
+ (MY_get_dynamic_symtab_upper_bound): Define.
+ (MY_canonicalize_dynamic_symtab): Define.
+ (MY_get_dynamic_reloc_upper_bound): Define.
+ (MY_canonicalize_dynamic_reloc): Define.
+ (struct sunos_dynamic_info): Change type of dynsym_count and
+ dynrel_count to long. Add fields canonical_dynsym and
+ canonical_dynrel.
+ (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
+ Clear info->canonical_dynsym and info->canonical_dynrel.
+ (MY(read_dynamic_symbols)): Removed.
+ (MY(read_dynamic_relocs)): Removed.
+ (sunos_get_dynamic_symtab_upper_bound): New function.
+ (sunos_canonicalize_dynamic_symtab): New function.
+ (sunos_get_dynamic_reloc_upper_bound): New function.
+ (sunos_canonicalize_dynamic_reloc): New function.
+ * libaout.h: Declare struct reloc_ext_external and
+ reloc_std_external to avoid prototype problems.
+ (struct aout_backend_data): Remove fields read_dynamic_symbols and
+ read_dynamic_relocs.
+ (NAME(aout,translate_symbol_table)): Declare.
+ (NAME(aout,swap_ext_reloc_in)): Declare.
+ (NAME(aout,swap_std_reloc_in)): Declare.
+ * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
+ translate_symbol_table and made non-static. Changed all callers.
+ (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
+ (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
+ (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
+ * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
+ remove dynamic symbols and relocs. They will no longer be
+ present.
+ (MY_read_dynamic_symbols): Don't define.
+ (MY_read_dynamic_relocs): Don't define.
+ (sunos4_aout_backend): Don't initialize dynamic entry points.
+ * aout-target.h (MY_read_dynamic_symbols): Don't define.
+ (MY_read_dynamic_relocs): Don't define.
+ (MY(backend_data)): Don't initialize dynamic entry points.
+ (MY_get_dynamic_symtab_upper_bound): If not defined, define to
+ _bfd_nodynamic version.
+ (MY_canonicalize_dynamic_symtab): Likewise.
+ (MY_get_dynamic_reloc_upper_bound): Likewise.
+ (MY_canonicalize_dynamic_reloc): Likewise.
+ * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
+ * bfd-in2.h: Rebuilt.
+ * libbfd.h: Rebuilt.
+
+ * cf-m68klynx.c: Include sysdep.h.
+
+ * hp300hpux.c: Removed some spaces in uses of NAME to avoid
+ problems with traditional C compilers.
+
+ * targets.c (bfd_target): Rearranged fields in target vector.
+ Removed _bfd_debug_info_start, _bfd_debug_info_end and
+ _bfd_debug_info_accumulate, which were never used.
+ (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
+ (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
+ (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
+ (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
+ * All backends: Changed to use the new BFD_JUMP_TABLE_* macros
+ rather than the single JUMP_TABLE macro. Removed many of the
+ weird macro definitions needed to support the monolithic
+ JUMP_TABLE.
+ * bfd-in.h (JUMP_TABLE): Removed.
+ * libbfd-in.h: Define a bunch of macros, and declare a few
+ functions, for use with the new BFD_JUMP_TABLE_* macros.
+ * libbfd.c (_bfd_dummy_new_section_hook): Removed.
+ (bfd_false): Set bfd_error_invalid_operation.
+ (bfd_nullvoidptr): Likewise.
+ (bfd_n1): New function.
+ (_bfd_nocore_core_file_matches_executable_p): Renamed from
+ _bfd_dummy_core_file_matches_executable_p.
+ (_bfd_nocore_core_file_failing_command): Similar rename. Set
+ bfd_error_invalid_operation.
+ (_bfd_nocore_core_file_failing_signal): Likewise.
+ (_bfd_generic_get_section_contents): Renamed from
+ bfd_generic_get_section_contents. Changed all callers.
+ (_bfd_generic_set_section_contents): Similar rename.
+ * ieee.c: #if 0 out ieee_bfd_debug_info_start,
+ ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
+ were never called.
+ * bfd-in2.h: Rebuilt.
+ * libbfd.h: Rebuilt.
+
+Tue Apr 5 22:10:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Crude support for examining dynamic libraries.
+ * som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
+ DL_MAGIC objects.
+ (som_prep_headers): Preserve the system_id for DYNAMIC objects.
+ Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
+ Write exec headers for DYNAMIC objects.
+ (som_begin_writing): DYNAMIC objects have the same alignment
+ restrictions as D_PAGED objects.
+ (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
+ objects.
+ (object_flags): Add DYNAMIC.
+
+Tue Apr 5 17:48:52 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
+ macro uses, confuses some non-ANSI compilers.
+
+Tue Apr 5 15:50:01 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
+ Don't free anything if we don't have a bfd_object.
+ (som_close_and_cleanup): Call som_bfd_free_cached_info.
+
+Tue Apr 5 11:22:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
+ It turns out not to be required on Irix 5, and it causes problems
+ if the sections happen to contain symbols.
+
+ * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.
+
+ * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
+ section->relocation is NULL; malloc might have returned NULL when
+ given a zero size if there were no relocations.
+ * bout.c (b_out_canonicalize_reloc): Likewise.
+ * coffcode.h (coff_canonicalize_reloc): Likewise.
+ * ecoff.c (ecoff_canonicalize_reloc): Likewise.
+ * elfcode.h (elf_canonicalize_reloc): Likewise.
+ * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
+ * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
+ * nlmcode.h (nlm_canonicalize_reloc): Likewise.
+ * som.c (som_canonicalize_reloc): Likewise.
+ * hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc
+ returns NULL, don't report an error if we asked for zero bytes.
+ * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
+ NULL, don't report an error if we asked for zero bytes.
+ * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
+
+Mon Apr 4 15:30:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
+ if we don't have a bfd_object.
+
+ Made sure that every call to bfd_read, bfd_write, and bfd_seek
+ checks the return value and handled bfd_error correctly. These
+ changes are not itemised. Also:
+ * aoutx.h (emit_strtab): Change return type to boolean, and return
+ errors.
+ (NAME(aout,write_syms)): Check emit_strtab return value.
+ (NAME(aout,final_link)): Likewise.
+ * coffcode.h (coff_write_relocs): Change return type to boolean,
+ and return errors.
+ (coff_write_object_contents): Check coff_write_relocs return
+ value.
+ * i386os9k.c (os9k_swap_exec_header_in): Change return type to
+ boolean.
+ (os9k_object_p): Check os9k_swap_exec_header_in return value.
+ * oasys.c (oasys_read_record): Change return type to boolean.
+ (oasys_slurp_symbol_table: Check oasys_read_record return value.
+ (oasys_object_p, oasys_slurp_section_data): Likewise.
+ (oasys_write_record): Change return type to boolean.
+ (oasys_write_syms): Likewise. Also, check oasys_write_record
+ return value.
+ (oasys_write_sections): Check oasys_write_record return value.
+ (oasys_write_header): Change return type to boolean. Check
+ oasys_write_record return value.
+ (oasys_write_end, oasys_write_data): Likewise.
+ (oasys_write_object_contents): Check return values of
+ oasys_write_header, oasys_write_syms, oasys_write_data, and
+ oasys_write_end.
+ * srec.c (srec_write_record): Change return type to boolean.
+ (srec_write_header): Likewise. Also, check srec_write_record
+ return value.
+ (srec_write_section, srec_write_terminator): Likewise.
+ (srec_write_symbols): Change return type to boolean.
+ (internal_srec_write_object_contents): Check return value of
+ srec_write_symbols, srec_write_header, srec_write_section, and
+ srec_write_terminator.
+
+ * Makefile.in: Rebuilt dependencies.
+
+Mon Apr 4 10:56:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * aix386-core.c (aix386_bfd_is_local_label): Correct cast from
+ asection to asymbol.
+ * ptrace-core.c (ptrace_unix_bfd_is_local_label): Correct cast from
+ bfd to asymbol.
+ * trad-core.c (trad_unix_bfd_is_local_label): Correct cast from
+ asection to asymbol.
+
+Sun Apr 3 18:27:29 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_slurp_string_table): Use malloc to allocate space
+ for the cached copy of the native string table.
+ (som_slurp_symbol_table): Likewise for the native symbol table.
+ (som_slurp_reloc_table): Likewise for the native and generic
+ relocation tables.
+ (som_bfd_free_cached_info): Free the cached native strings,
+ symbols, and relocations. Also free the canonical cached
+ relocations.
+
+Fri Apr 1 12:40:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
+ sure the symbol name is stored in permanent memory before adding
+ it to the string table.
+
+ * archive.c (_bfd_write_archive_contents): Once we've found an
+ object, don't bother to look for more when deciding whether to
+ build a map.
+ (compute_and_write_armap): After adding the symbols for a BFD,
+ call bfd_free_cached_info on it.
+
+ Add bfd_free_cached_info support to a.out backends.
+ * aoutx.h (aout_get_external_symbols): Renamed from
+ aout_link_get_symbols. Read strings even if symbols have been
+ read. Store string size in obj_aout_string_size.
+ (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
+ read the symbols. Allocate the cached symbols with malloc, not
+ bfd_alloc.
+ (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
+ malloc, not bfd_alloc.
+ (NAME(aout,bfd_free_cached_info)): New function; free cached
+ symbols and relocs.
+ * libaout.h (struct aoutdata): Add external_string_size field.
+ (obj_aout_external_string_size): New accessor macro.
+ (NAME(aout,close_and_cleanup)): Don't declare.
+ (NAME(aout,bfd_free_cached_info)): Declare.
+ (aout_32_close_and_cleanup): Don't define.
+ (aout_64_close_and_cleanup): Don't define.
+ * aout-target.h (MY_bfd_free_cached_info): If not already defined,
+ define as NAME(aout,free_cached_info).
+ (MY_close_and_cleanup): If not already defined, define as
+ MY_bfd_free_cached_info.
+ * aout-adobe.c (aout_32_close_and_cleanup): Define.
+ (aout_32_bfd_free_cached_info): Don't define.
+ * bout.c (aout_32_close_and_cleanup): Define.
+ (aout_32_bfd_free_cached_info): Don't define.
+ * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
+ (MY_close_and_cleanup): Don't define.
+ * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
+ relocs with malloc, not bfd_alloc.
+ * i386os9k.c (aout_32_close_and_cleanup): Define.
+ (aout_32_bfd_free_cached_info): Don't define.
+
+ Add a new entry point to free memory cached by a BFD.
+ * targets.c (bfd_target): Add _bfd_free_cached_info field.
+ * bfd.c (bfd_free_cached_info): Define.
+ * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
+ * bfd-in2.h: Rebuilt.
+ * All backends: Initialize bfd_free_cached_info entry point to
+ bfd_true.
+
+ * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
+ first, unused, argument.
+ (hppa_elf_is_local_label): Declare instead of
+ som_bfd_is_local_label.
+
+ * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
+ absolute R_IREL reloc.
+
+Thu Mar 31 11:52:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Added some support for Irix 4 shared libraries.
+ * ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
+ .lib section.
+ (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
+ STYP_ECOFF_LIB bit is set.
+ (ecoff_compute_section_file_positions): Round the contents of a
+ .lib section up to the next page boundary.
+ (ecoff_set_section_contents): If we see a .lib section, increment
+ the vma by one to count the number of shared libraries we have.
+ (ecoff_write_object_contents): Don't crash if we see a
+ STYP_ECOFF_LIB section, and don't adjust text_start or data_start
+ or bss_size either.
+
+ * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
+ from original BFD, rather than using value of current BFD symbol.
+ Needed for new linker.
+ * coff-sparc.c (CALC_ADDEND): Likewise.
+
+ * ecoff.c (ecoff_write_object_contents): Set the text_start and
+ data_start entries in the optional header correctly even if a text
+ or data section starts at location zero.
+
+ * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_26 (from sef
+ and raeburn).
+ * bfd-in2.h: Rebuilt.
+
+ * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
+ name.
+ * nlm32-alpha.c (nlm_alpha_read_import): Likewise.
+ * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
+
+ * coffgen.c (coff_write_symbol): Reindented. Changed to return
+ boolean, and changed written to unsigned int *. Check error
+ returns from called functions.
+ (coff_write_alien_symbol): Likewise.
+ (coff_write_native_symbol): Likewise.
+ (coff_write_symbols): Likewise. Reworked checks on whether to
+ write symbol name to string table for clarity and to avoid core
+ dumping when given a non COFF symbol.
+ * libcoff-in.h (coff_write_symbols): Declare as returning boolean.
+ * libcoff.h: Rebuilt.
+ * coffcode.h (coff_write_object_contents): Check return value of
+ coff_write_symbols.
+
+Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Changes to let BFD return an error indication from
+ get_symtab_upper_bound, bfd_canonicalize_symtab,
+ bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now
+ return long instead of unsigned int, and use -1 to indicate an
+ error. Along the way, rename get_symtab_upper_bound to
+ bfd_get_symtab_upper_bound.
+ * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
+ errors.
+ (bfd_canonicalize_reloc): Likewise.
+ * syms.c (bfd_get_symtab_upper_bound): Renamed from
+ get_symtab_upper_bound.
+ * targets.c (bfd_target): Renamed _get_symtab_upper_bound to
+ _bfd_get_symtab_upper_bound, and changed it and
+ _bfd_canonicalize_symtab and _get_reloc_upper_bound and
+ _bfd_canonicalize_reloc to all return long.
+ * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
+ (NAME(aout,canonicalize_reloc)): Likewise.
+ (NAME(aout,get_reloc_upper_bound)): Likewise.
+ (NAME(aout,get_symtab_upper_bound)): Likewise.
+ * bout.c (b_out_canonicalize_reloc): Likewise.
+ (b_out_get_reloc_upper_bound): Likewise.
+ * coffcode.h (coff_canonicalize_reloc): Likewise.
+ * coffgen.c (coff_get_symtab_upper_bound): Likewise.
+ (coff_get_symtab): Likewise.
+ (coff_get_reloc_upper_bound): Likewise.
+ * ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
+ (ecoff_get_symtab): Likewise.
+ (ecoff_canonicalize_reloc): Likewise.
+ * elfcode.h (elf_get_symtab_upper_bound): Likewise.
+ (elf_get_reloc_upper_bound): Likewise.
+ (elf_canonicalize_reloc): Likewise.
+ (elf_get_symtab): Likewise.
+ * hp300hpux.c (MY(get_symtab)): Likewise.
+ (MY(get_symtab_upper_bound)): Likewise.
+ (MY(canonicalize_reloc)): Likewise.
+ * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
+ * ieee.c (ieee_slurp_external_symbols): Change return type to
+ boolean. Check for errors from get_symbol.
+ (ieee_slurp_symbol_table): Change return type to boolean. Check
+ for errors from ieee_slurp_external_symbols.
+ (ieee_get_symtab_upper_bound): Return long, and -1 on errors.
+ (ieee_get_symtab): Likewise.
+ (ieee_get_reloc_upper_bound): Likewise.
+ (ieee_canonicalize_reloc): Likewise.
+ * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
+ * nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
+ (nlm_get_symtab): Likewise.
+ (nlm_get_reloc_upper_bound): Likewise.
+ (nlm_canonicalize_reloc): Likewise.
+ * oasys.c (oasys_get_symtab_upper_bound): Likewise.
+ (oasys_get_symtab): Likewise.
+ (oasys_get_reloc_upper_bound): Likewise.
+ (oasys_canonicalize_reloc): Likewise.
+ * som.c (som_get_symtab_upper_bound): Likewise.
+ (som_get_symtab): Likewise.
+ (som_get_reloc_upper_bound): Likewise.
+ (som_canonicalize_reloc): Likewise.
+ * srec.c (srec_get_symtab_upper_bound): Likewise.
+ (srec_get_symtab): Likewise.
+ (srec_get_reloc_upper_bound): Define as bfd_0l.
+ (srec_canonicalize_reloc): Likewise.
+ * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
+ (tekhex_get_symtab_upper_bound): Likewise.
+ (tekhex_get_reloc_upper_bound): Define as bfd_0l.
+ (tekhex_canonicalize_reloc): Likewise.
+ * libaout.h (NAME(aout,get_symtab_upper_bound)): Change
+ declaration to return long.
+ (NAME(aout,get_symtab)): Likewise.
+ (NAME(aout,canonicalize_reloc)): Likewise.
+ (NAME(aout,get_reloc_upper_bound)): Likewise.
+ * libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
+ (coff_get_symtab): Likewise.
+ (coff_get_reloc_upper_bound): Likewise.
+ * libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
+ (ecoff_get_symtab): Likewise.
+ (ecoff_canonicalize_reloc): Likewise.
+ * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
+ (bfd_elf32_get_symtab): Likewise.
+ (bfd_elf32_get_reloc_upper_bound): Likewise.
+ (bfd_elf32_canonicalize_reloc): Likewise.
+ (bfd_elf64_get_symtab_upper_bound): Likewise.
+ (bfd_elf64_get_symtab): Likewise.
+ (bfd_elf64_get_reloc_upper_bound): Likewise.
+ (bfd_elf64_canonicalize_reloc): Likewise.
+ * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
+ (nlmNAME(get_symtab)): Likewise.
+ (nlmNAME(get_reloc_upper_bound)): Likewise.
+ (nlmNAME(canonicalize_reloc)): Likewise.
+ * archive.c (compute_and_write_armap): Use error_return and
+ no_memory_return labels rather than freeing information in various
+ places. Change storage, symcount and src_count to long. Check
+ errors from bfd_get_symtab_upper_bound and
+ bfd_canonicalize_symtab.
+ * bout.c (b_out_relax_section): Change reloc_size to long. Check
+ for errors from bfd_get_reloc_upper_bound and
+ bfd_canonicalize_reloc.
+ (b_out_get_relocated_section_contents): Likewise.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
+ Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
+ (hppa_look_for_stubs_in_section): Check for errors from
+ bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
+ bfd_canonicalize_reloc.
+ * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
+ from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
+ * linker.c (generic_link_read_symbols): Likewise.
+ (_bfd_generic_final_link): Check for errors from
+ bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
+ * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
+ (bfd_coff_reloc16_get_relocated_section_contents): Likewise.
+ * libbfd.c (bfd_0l): New function.
+ * libbfd-in.h (bfd_0l): Declare.
+ * aix386-core.c: Change get_symtab_upper_bound, get_symtab,
+ get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
+ than bfd_0u.
+ * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
+ * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
+ * bfd-in2.h: Rebuilt.
+ * libbfd.h: Rebuilt.
+ * libcoff.h: Rebuilt.
+
+ * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
+ temp and name.
+
+Wed Mar 30 08:33:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/dpx2.h: Define POSIX_UTIME.
+
+Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
+ variant of a.out.
+ * configure.in, config.bfd: Use them for Dynix.
+ * Makefile.in: Add dependencies for i386dynix.o.
+ * targets.c: Add definition for i386dynix_vec.
+ * hosts/symmetry.h: Do not define TRAD_CORE_USER_OFFSET for Dynix.
+ Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
+ for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
+ i386dynix.c
+
+Mon Mar 28 12:53:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
+
+ * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
+ bfd_arch_rs6000.
+
+ * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.
+ * config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
+
+ * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flag
+ for generated constructor section.
+
+Sun Mar 27 16:25:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_begin_writing): New approach at dealing with holes
+ in executables left by the HP linker. Does not rely on subspace
+ alignments as subspaces are *NOT* guaranteed to be properly
+ aligned in an executable (can you believe that!).
+
+Sat Mar 26 10:25:43 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_get_section_contents): New function. Do not try
+ to actually read data from a section that doesn't have either
+ SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
+
+ * libbfd.c (bfd_read): Set bfd_error as appropriate for a short
+ read. (bfd_error_system_call or bfd_error_file_truncated).
+
+ * som.c: Do not blindly set bfd_error_system_call after a
+ failing bfd_read, bfd_write, or bfd_seek. In a few places
+ (like som_object_p) override the error status set by bfd_read.
+
+ * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
+ * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
+ * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
+ * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
+
+ * som.c: Check return values from several bfd_{seek,read,write}
+ calls that we just assumed were not failing.
+
+Fri Mar 25 11:44:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
+ * config/sysv4.mh: Add comment.
+ * config/symmetry.mh: Change comment.
+ * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
+
+Fri Mar 25 17:10:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Changes to support linker relaxing of embedded MIPS PIC code to
+ use a five instruction sequence for function calls which are out of
+ range of the bal instruction.
+ * libecoff.h (struct ecoff_section_tdata): Define.
+ (ecoff_section_data): Define.
+ (ecoff_bfd_relax_section): Don't define.
+ * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
+ the debugging information if it has already been read.
+ (ecoff_indirect_link_order): Handle _cooked_size being different
+ from _raw_size. Don't reread the contents or the relocs if they
+ have already been read in.
+ * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
+ 18 to 16.
+ (PCREL16_EXPANSION_ADJUSTMENT): Define.
+ (mips_relocate_refhi): Take adjust argument.
+ (mips_relocate_section): Handle reloc offsets stored in section
+ used_by_bfd field. Call mips_relax_pcrel16 to handle details of
+ expanding an out of range PCREL16. Keep trace of adjustments
+ required by expansions. Set s and unset h when converting a reloc
+ from undefined to section. Change handling of PC relative relocs:
+ if against a section, they are correct in the object file, if
+ against an external symbol they are pcrel_offset.
+ (mips_relax_section): New function.
+ (mips_relax_pcrel16): New function.
+ (ecoff_bfd_relax_section): Define.
+ * coff-alpha.c (ecoff_bfd_relax_section): Define.
+ * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
+ built by mips_relax_section when writing out addresses.
+ * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
+
+ * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
+ functionname_ptr to be set to a symbol name, so prepend
+ symbol_leading_char.
+
+Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
+ for 16bit relative branches.
+ * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
+ overflow.
+
+Thu Mar 24 09:21:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
+ (som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
+
+Wed Mar 23 14:29:31 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * netbsd386.c (N_SET_FLAGS): Delete the old definition.
+
+Wed Mar 23 14:58:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Clean up the relaxing code for the new linker.
+ * targets.c (_bfd_relax_section): Take boolean *again argument
+ rather than asymbol list.
+ * bfd.c (bfd_relax_section): Change name of fourth argument from
+ symbols to again.
+ * reloc.c (bfd_generic_relax_section): Take boolean *again
+ argument rather than asymbol list. Always return true.
+ * bout.c: Include genlink.h.
+ (aligncode, perform_slip): Declare.
+ (perform_slip): Take BFD argument rather than asymbol list.
+ Changed all callers. Get the symbols from the BFD. Change the
+ hash table entry value as well as the symbol value.
+ (abs32code): Take BFD argument rather than asymbol list. Changed
+ all callers.
+ (aligncode): Likewise.
+ (b_out_relax_section): Take boolean *again argument rather than
+ asymbol list. Only return false if an error occurred. Set *again
+ to false. Get symbols from BFD.
+ * reloc16.c: Include genlink.h.
+ (bfd_perform_slip): Take BFD argument rather than asymbol list.
+ Get the symbols from the BFD. Change the hash table entry value
+ as well as the symbol value.
+ (bfd_coff_reloc16_relax_section): Take boolean *again argument
+ rather than asymbol list. Only return false if an error occurred.
+ Set *again to false. Get symbols from BFD.
+ * coffcode.h (bfd_coff_backend_data): Change
+ _bfd_coff_reloc16_estimate to take BFD argument rather than
+ asymbol list.
+ (bfd_coff_reloc16_estimate): Corresponding change.
+ (dummy_reloc16_estimate): Corresponding change.
+ * libcoff-in.h (bfd_coff_reloc16_relax_section): Change
+ declaration to take boolean * rather than asymbol list.
+ (bfd_perform_slip): Change declaration to take BFD rather than
+ asymbol list.
+ * coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
+ than asymbol list. Changed calls to bfd_perform_slip.
+ * bfd-in2.h: Rebuilt.
+ * libbfd.h: Rebuilt.
+ * libcoff.h: Rebuilt.
+ * Makefile.in: Rebuilt dependencies.
+
+ * genlink.h (_bfd_generic_link_get_symbols): Define.
+ (_bfd_generic_link_get_symcount): Define.
+ * linker.c (generic_link_read_symbols): New function.
+ (generic_link_add_object_symbols): Use it. Use
+ _bfd_generic_link_get_symbols and _bfd_generic_link_get_symcount
+ to get the symbols from the BFD.
+ (generic_link_check_archive_element): Likewise.
+ (_bfd_generic_final_link): Likewise.
+ (_bfd_generic_link_output_symbols): Likewise.
+ (default_indirect_link_order): Likewise.
+ (generic_link_add_symbol_list): Store pointer to hash table entry
+ in asymbol udata field.
+
+Tue Mar 22 13:09:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
+ reloc, used in embedded PIC code.
+ (mips_adjust_reloc_in): Change sanity check to permit new reloc.
+ (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
+ MIPS_R_PCREL16.
+
+ * elf32-mips.c (mips_elf_final_link): Account for link_order
+ relocs when allocating space for relocations. Set SEC_RELOC flag
+ for any section which has relocs. Handle link_order relocs in
+ link_order loop. Use _bfd_generic_link_add_symbols_collect for
+ add_symbls entry point.
+
+ * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
+ counting relocs. Set SEC_RELOC flag for any section which has
+ relocs.
+
+ * linker.c (_bfd_default_link_order): Handle bfd_data_link_order.
+
+ * linker.c (_bfd_generic_link_add_symbols): Just call
+ generic_link_add_symbols.
+ (_bfd_generic_link_add_symbols_collect): New function, like
+ _bfd_generic_link_add_symbols but also collect constructors and
+ destructors by name as collect2 does.
+ (generic_link_add_symbols): New function, like old
+ _bfd_generic_link_add_symbols but with collect argument.
+ (generic_link_add_object_symbols): Take collect argument.
+ (generic_link_check_archive_element_no_collect): New function.
+ (generic_link_check_archive_element_collect): New function.
+ (generic_link_check_archive_element): Take collect argument.
+ (generic_link_add_symbol_list): Take collect argument.
+ (_bfd_generic_link_add_one_symbol): Rename constructor argument to
+ collect.
+ * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
+ * libbfd.h: Rebuilt.
+
+Tue Mar 22 10:04:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * archive.c (bfd_construct_extended_name_table): Use ar_padchar
+ for first character in an extended name.
+ (_bfd_write_archive_contents): If ar_padchar == '/', then use
+ "//" as the name of the special archive member holding the
+ extended name table.
+
+Mon Mar 21 12:28:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Support for link_order types which generate relocs in order to
+ support -Ur in the linker.
+ * linker.c (generic_link_add_symbol_list): Remove bitsize argument
+ from call to _bfd_generic_link_add_one_symbol.
+ (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
+ Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR
+ instead of bitsize to add_to_set call back.
+ (_bfd_generic_final_link): Account for link_order relocs when
+ allocating space for relocations. Handle them in link_order loop.
+ (_bfd_generic_reloc_link_order): New function.
+ (_bfd_default_link_order): If a reloc_link_order is seen here,
+ abort.
+ (_bfd_count_link_order_relocs): New function.
+ * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
+ argument from declaration.
+ (_bfd_generic_reloc_link_order): Declare.
+ (_bfd_count_link_order_relocs): Declare.
+ * libbfd.h: Rebuilt.
+ * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
+ call to _bfd_generic_link_add_one_symbol.
+ (NAME(aout,final_link)): Account for link_order relocs when
+ allocating space for relocations. Handle them after handling all
+ input BFDs.
+ (aout_link_reloc_link_order): New function.
+ * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
+ call to _bfd_generic_link_add_one_symbol.
+ (ecoff_bfd_final_link): Account for link_order relocs when
+ allocating space for relocations. Handle them in link_order loop.
+ (ecoff_link_write_external): Set the storage class of a defined
+ linker created symbol based on the section it is in. Correct
+ bfd_link_hash_weak case to use .sc rather than .st.
+ (ecoff_reloc_link_order): New function.
+ * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
+ BFD_RELOC_CTOR.
+ * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
+
+ * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
+ and buf.
+
+ * cisco-core.c (cisco_core_file_p): Only pass one argument to
+ bfd_zmalloc. Free a pointer, not a union.
+ (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
+
+Sun Mar 20 09:24:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * bfd/som.c (som_begin_writing): Fix thinko (off by one error).
+
+ * som.c (bfd_section_from_som_symbol): Only to do the value
+ comparison for function symbols within executables.
+
+ * som.c (bfd_section_from_som_symbol): Renamed from
+ som_section_from_subspace_index. Pass in a native SOM symbol.
+ For executables, iterate through the sections to find out
+ which contains the symbol's address rather than using the
+ symbol_info field. (symbol_info has a different meaning for
+ dynamicly linked executables.)
+
+ * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
+ bfd_zmalloc.
+
+ * som.c (som_begin_writing): Fix braino (one call to align
+ space/subspace data was done unconditionally rather than
+ just for executables.)
+
+ * som.c (som_begin_writing): Align text in all executables to
+ make HPUX kernel happy. Fixes strip/objcopy for shared
+ executables.
+
+Sat Mar 19 07:06:59 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_begin_writing): Account for alignment needs of
+ subspaces too when writing executables. Never request a negative
+ bss size. Fixes some problems with demand paged executables,
+ still having problems with pure executables and shared executables.
+
+Fri Mar 18 19:12:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
+ bfd_zalloc for rawptr, because later on we may call free, not
+ bfd_release, on it.
+
+ * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
+ * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
+ * cisco-core.c: New file.
+ * Makefile.in: Change accordingly.
+ * configure.in: Recognize cisco_core_vec.
+ * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
+ * targets.c: Add cisco_core_vec.
+ * bfd-in2.h: Rebuilt.
+
+Fri Mar 18 18:13:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.h (som_copyable_section_data_struct): New structure
+ containing all the private section information which needs
+ to be copied from input section to output section during
+ objcopy or strip.
+ (som_section_data_struct): Remove several fields now in
+ som_copyable_section_data_struct. Make the space and
+ subspace dictionaries be pointers (to save space when
+ only reading objects).
+
+ * som.c (bfd_som_set_section_attributes): Now returns a boolean;
+ some references changed. Allocate a copyable data stucture if
+ none exists. Store info into the copyable data structure.
+ (bfd_som_set_subsection_attributes): Likewise.
+ (som_is_space, som_is_subspace, som_is_container): New functions.
+ Use these instead of directly accessing private data.
+ (som_prep_headers): Allocate space and subspace headers here.
+ Fill in some fields in the space/subspace headers from the
+ copyable data.
+ (som_bfd_copy_private_section_data): Only copy the stuff
+ that we really need to make objcopy and strip work. Allocate
+ the copy_data structure for the output bfd before copying.
+
+ * som.h (struct som_exec_data): New structure to hold exec
+ info that must be preserved when running objcopy/strip.
+ (struct somdata): Add new "exec_data" field and accessor
+ macro. Add some comments on how the various fields are used.
+ (som_section_data_struct): Make is_space and is_subspace bitfields.
+ Delete unused subspace_index. All references now use the
+ target_index field within the section structure itself.
+
+ * som.c (make_unique_section): Delete unused declaration.
+ (som_bfd_copy_private_bfd_data): New function.
+ (som_object_setup): Allocate space for and save exec information
+ that needs to be copied during objcopy/strip.
+ (som_mkobject): Do not allocate space for a file header here.
+ It is not used when only reading SOM objects.
+ (som_prep_headers): Allocate space for and attach a file header
+ to the output bfd. For executables, use the saved system_id
+ value rather than trying to guess the right value. Do not abort
+ wwhen setting file_hdr->entry* for executables.
+ (som_begin_writing): For executables, set the exec_entry and
+ exec_flags fields.
+ (som_copy_private_backend_section_data): Always return a value.
+
+ * libhppa.h (PA_PAGESIZE): Define.
+
+ * som.c (SOM_ALIGN): Define.
+ (som_begin_writing): If writing an executable, initialize all
+ fields in the exec header to zero. Update fields in the exec
+ header as sizes of loadable subspaces are computed. Carefully
+ preserve alignments when building executables. Actually write the
+ exec after all the fields are filled in.
+
+ * Better long-filename handling. Reads SOM ABI compliant extended
+ names, but doesn't quite write compliant extended names yet.
+ * som.c (som_slurp_extended_name_table): Delete function. The
+ generic code will handle things correctly.
+ (som_slurp_armap): Seek to the beginning of the next member.
+ (normalize): New function.
+ (som_bfd_ar_write_symbol_stuff): Take the size of the extended
+ name table into account when computing the file offsets in the
+ SOM dictionary. Make sure to align to an even boundary.
+ (som_write_armap): Initialize the checksum to zero.
+ (ar_maxchars): Fix. Opps.
+
+Fri Mar 18 20:35:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
+ machine. Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
+
+Thu Mar 17 18:26:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * bfd-in.h (BFD_VERSION): Use @VERSION@.
+ * Makefile.in (bfd.h): Replace it with contents of VERSION file.
+ * bfd-in2.h: Regenerated.
+
+ * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
+ this was also named trad_unix_bfd_copy_private_bfd_data.
+
+Thu Mar 17 10:37:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
+ elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
+ returns NULL, it is not an error. It's possible that some of
+ these checks are not necessary (because the size can never be
+ zero), but putting in the checks is the conservative thing to do
+ in light of the fact that some of these malloc calls replaced
+ unchecked alloca calls, in which a zero argument would work fine.
+
+Thu Mar 17 11:44:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
+ duplicate definition.
+ (osf_core_bfd_is_local_label): Define.
+
+ * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
+ if malloc (0) fails. bfd_canonicalize_reloc returning 0 is not a
+ failure indication, it merely means there are no relocs.
+
+ * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
+ after NAME, since SunOS /bin/cc can't handle it.
+
+Wed Mar 16 16:43:33 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
+ From sukes@glue.umd.edu (Tasuki Hirata).
+
+Wed Mar 16 07:55:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
+ all that convoluted stuff with NAME, CAT3, etc. The convoluted
+ stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
+
+Wed Mar 16 00:02:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_prep_for_fixups): Detect section symbols based
+ on either the lack of private data or the symbol flags. Do not
+ munge section symbol names anymore -- they no longer confuse GDB.
+ (som_begin_writing): Leave space for an exec header if writing
+ an executable.
+ (som_slurp_symbol_table): Recognize both forms of section symbol
+ names "L$0\002" and "$<FOO>$". Change the name of "L$0\002"
+ section symbols to be the name of the section they represent.
+ Debugging symbols begin with "L$0\001", not just "L$".
+
+Tue Mar 15 22:58:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
+
+ * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
+ for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
+ and bfd_is_local_label.
+
+ * targets.c: Add new entries to the bfd_target structure.
+
+ * bfd.c (bfd_copy_private_bfd_data): New definition.
+
+ * section.c (bfd_copy_private_section_data): New definition.
+
+ * syms.c (bfd_is_local_label): New definition.
+
+ * libbfd-in.h (bfd_generic_is_local_label): Declare.
+
+ * libbfd.c (bfd_generic_is_local_label): New function.
+
+ * *-core.c: Provide default definitions for new functions in
+ the target vector which all point to bfd_false.
+
+ * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
+ libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
+ Default new vectors for copying private backend data to bfd_true.
+ Default new vector for determining if a symbol is a local label
+ to bfd_generic_is_local_label.
+
+ * som.c (som_bfd_copy_private_section_data): New function.
+ (som_bfd_is_local_label): New function.
+ (som_bfd_copy_private_bfd_data): For now default to bfd_true.
+
+ * elf32-hppa.c (hppa_elf_is_local_label): New function.
+
+Tue Mar 15 23:55:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
+
+Tue Mar 15 04:41:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * Most files:
+ Replace DEFUN and DEFUN_VOID with K&R-style function definition.
+ Indent some of them to GNU standards.
+
+ * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
+ cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
+ elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
+ libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
+ Update copyright years.
+
+Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_prep_for_fixups): A relocation involving the section
+ symbol for the *ABS* section is really a relocation involving
+ no symbol.
+ (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
+ undefined symbols. Correctly distinguish between debugger symbols
+ and section symbols.
+
+ * som (setup_sections): Set SEC_DEBUGGING and the section attributes
+ for spaces and subspaces.
+
+ * som.c (som_bfd_count_ar_symbols): Fix typo.
+
+ * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
+ HAS_RELOC based on the object's magic number.
+ (make_unique_section): Delete function. BFD and its users are
+ prepared to handle multiple sections with the same name.
+ (setup_sections): Allocate space on the BFD's obstack to hold
+ section names. Use bfd_make_setion_anyway rather than the
+ obsolete make_unique_section.
+ (som_prep_headers): Choose the correct SOM magic number based
+ on the BFD's flags.
+ (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
+
+Sat Mar 12 09:46:09 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * elf32-ppc.c: Renamed from elf32-powerpc.c.
+ * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
+ * Makefile.in, configure.in: Corresponding changes.
+
+Fri Mar 11 22:27:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
+
+Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * sunos.c (sunos_read_dynamic_info): Assume that dynamic info
+ is always located at the start of the data section to allow
+ recovery of the dynamic info from a stripped executable.
+ * ecoff.c (ecoff_styp_to_sec_flags): Handle STYP_PDATA, STYP_XDATA
+ and STYP_COMMENT.
+
+Wed Mar 9 17:17:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * libbfd-in.h: Remove alloca cruft. It was missing some necessary
+ cruft (like the #pragma alloca for AIX).
+ In addition to that problem, the C alloca calls xmalloc, which
+ means checking for being out of memory can't work right. The
+ following changes remove all uses of alloca from BFD.
+ * hosts/solaris2.h: Remove alloca cruft.
+ * som.c: Replace alloca with a fixed size auto array.
+ * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
+ ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
+ sunos.c: Replace alloca with malloc and appropriate error checking and
+ freeing.
+ * linker.c: Replace alloca with obstack_alloc.
+ * libbfd.h: Rebuilt.
+
+Tue Mar 8 12:10:38 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
+ MIPS_R_GPREL.
+
+Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * elf32-hppa.h, elfcode.h: Replace uses of Elf*_Half, Elf*_Word,
+ Elf*_Off typedefs by their expansion, the typedefs have been
+ removed from include/elf/internal.h.
+ * elfcode.h (bfd_section_from_shdr): Handle SHT_DYNAMIC section like
+ SHT_PROGBITS section.
+
+Thu Mar 3 20:03:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
+
+Wed Mar 2 13:28:06 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
+
+ * configure.host: Recognize i[34]86-sequent-*.
+
+ * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
+ return from bfd_seek indicates an error.
+ New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
+ TRAD_CORE_STACK_OFFSET.
+ * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
+ TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
+
+Wed Mar 2 11:57:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.[ch]: Do not include libhppa.h in som.c, instead include
+ it in som.h.
+
+ * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
+ include it in elf32-hppa.h.
+
+ * som.c (log2): Return -1 on error rather than aborting.
+ (setup_sections): Bubble up an error from log2.
+
+ * Changes to make HP C compiler happy in both traditional
+ and ANSI mode.
+ * som.c (hppa_som_gen_reloc_type): Use correct enum type for
+ field parameter.
+ (bfd_som_set_section_attributes): Use unsigned int rather than
+ unsigned char to avoid GNU-C extensions.
+ (bfd_som_attach_aux_hdr): Return a boolean to indicate success
+ or failure rather than aborting on failure.
+
+ * som.h (bfd_som_set_section_attributes): Fix prototype to match
+ som.c changes.
+ (bfd_som_attach_aux_hdr): Add prototype.
+ (hppa_som-gen_reloc_type): Likewise.
+
+ * elf32-hppa.c: Add a couple casts to make HP compiler happy.
+ (hppa_look_for_stubs_in_section): Do not return false on failure
+ until rest of code is ready to handle it. Abort for now.
+
+Tue Mar 1 18:33:59 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
+
+ * bfd-in2.h: Rebuilt.
+
+Tue Mar 1 13:06:53 1994 Kung Hsu (kung@mexican.cygnus.com)
+
+ * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
+ * Makefile.in: delete an extra blank.
+ * configure.in : Add i396os9k_vec.
+
+Mon Feb 28 15:41:01 1994 Kung Hsu (kung@mexican.cygnus.com)
+
+ * config.bfd : Add i386-os9k.
+ * config/i386-os9k.mt : Newly add os9k target makefile.
+
+ * i386os9k.c : new file to handle os9k format bfd.
+ * Makefile.in : Handle new file i386os9k.c
+ * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
+ * cache.c : Initialize cache_sentinel to 0.
+
+Sun Feb 27 16:30:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
+ action in case where caller specified no argument relocation.
+ (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
+ right in the original relocation and the stub's relocation.
+
+ * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo. Delete
+ unused symbols argument.
+
+ * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
+ than asymbol * for original target symbol. All callers changed.
+ Set reloc->sym_ptr_ptr appropriately.
+ (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
+ (hppa_elf_look_for_stubs_in_section): No longer need symbols
+ argument. Use the output symbols when canonicalizing the relocs,
+ creating them if necessary.
+
+ * linker.c (_bfd_generic_link_output_symbols): Do not
+ rebuild/clobber the output symbols if they already exist.
+
+Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
+ check all the pointer dereferences. Enabled via DEBUG_BFD_SEND.
+ * bfd-in2.h: Rebuilt.
+
+ * srec.c (hex_value): Always set to a size of 256 bytes.
+ (srec_init): Cosmetic changes.
+
+Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elf32-hppa.c: Second half of major cleanup. More comments,
+ PARAMize and staticize rest of functions. Delete unused
+ functions. Delete unused/unnecessary arguments to some functions.
+ Group static vars together. Abort for bad errors until we have
+ error code propogation working. Work on spacing and indention.
+ Add FIXMEs for unresolved problems. Use enums rather than
+ #defines for lots of things. Merge two functions which build
+ linker stubs into a single function (so they can easily share a
+ ton of common code).
+
+Sat Feb 26 10:00:45 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
+ avoid depending upon right shifts of signed numbers, and to
+ correct handling of src_mask with lower bits zero.
+
+ * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
+ * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
+ #if 0 code.
+ (elf_write_phdrs): Make i unsigned.
+ (map_program_segments): Make i and n_left unsigned.
+ (assign_file_positions_except_relocs): Make i unsigned.
+ (write_shdrs_and_ehdr): Make count unsigned.
+ (assign_file_positions_for_relocs): Make i unsigned.
+ (NAME(bfd,elf_write_object_contents)): Make count unsigned.
+ (section_from_elf_index): Make index argument unsigned.
+
+Fri Feb 25 21:34:58 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * elfcode.h: Don't include assert.h.
+ (swap_out_syms): Use BFD_ASSERT rather than assert.
+
+ * linker.c (_bfd_generic_link_write_global_symbol): Add missing
+ break in switch.
+
+ * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
+ declarations.
+
+Fri Feb 25 16:35:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
+
+ * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
+ (elf_hppa_tc_make_sections): Likewise.
+ (elf_hppa_final_processing): Add extern decl.
+
+ * elf32-hppa.c: First half of major cleanup. Add/cleanup lots of
+ comments. PARAMize some static functions. Delete unused functions.
+ Delete unused/unnecessary arguments to many functions. Group
+ static vars together. Collapse common case statements together
+ in many places. Use default case when possible instead of listing
+ each case separately. Abort for bad errors until we get error
+ code propogation working. Work on spacing and indention problems.
+ Add FIXMEs for some unresolved problems. Delete hopelessly broken
+ COMPLEX relocation support (it's never used anyway).
+ (hppa_elf_rebuild_insn): Delete. Moved into libhppa.h.
+ (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
+ (elf_hppa_tc_make_sections): Likewise.
+
+ * format.c (bfd_check_format_matches): Initialize matching_vector
+ to keep gcc -Wall quiet.
+
+ * elfcode.h (elf_slurp_reloca_table): Fix typo.
+
+ * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
+ not "sizeof (som_symbol_type *)".
+
+ * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
+ not "sizeof (asymbol"). Opps.
+
+Fri Feb 25 13:19:04 1994 Ted Lemon (mellon@pepper.ncd.com)
+
+ * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
+ (bfd_set_gp_size): Can't set gp value on an archive.
+
+Fri Feb 25 12:57:00 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * srec.c (pass_over): Don't skip too many characters when
+ end of line seen.
+
+Fri Feb 25 11:41:57 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
+ boundary.
+
+Thu Feb 24 07:13:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
+ field for absolute symbols in the same manner as undefined
+ and common symbols.
+
+Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * elfcode.h (elf_core_file_p): Check for core file e_machine match
+ like in elf_object_p.
+
+Wed Feb 23 18:28:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (alloca): Delete declaration.
+
+ * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
+ number rather than HP9000S800_ID. Note som.c is careful
+ to make sure CPU_PA_RISC1_0 is always defined.
+
+Mon Feb 21 10:12:02 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
+ flags to explicit compile actions.
+
+Mon Feb 21 09:50:06 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
+
+ * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
+ * ecoff.c (ecoff_write_object_contents): Make sure .bss section
+ ends on a page boundary if there is no symbol table.
+ (ecoff_bfd_final_link): Don't set symhdr->magic here.
+
+ * hosts/hp300.h: Include <stdlib.h>; don't declare free.
+
+ * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
+ rather than an array of variable size.
+ (som_bfd_fill_in_ar_symbols): Likewise.
+ (som_bfd_ar_write_symbol_stuff): Likewise.
+
+ * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
+ operation to avoid OSF 1.3 cc bug.
+ * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
+ and bss_size bfd_size_type instead of unsigned long. Make
+ text_start and data_start bfd_vma instead of unsigned long.
+ * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
+ value.
+
+Sun Feb 20 16:06:54 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
+
+ * linker.c (_bfd_generic_link_add_archive_symbols): Consider
+ symbols in the order they appear in the archive map.
+
+Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * coff-alpha.c (reloc_nil): Add forward declaration, add missing
+ error_message argument.
+ * coff-sparc.c (bfd_coff_generic_reloc): Add forward declaration,
+ add missing error_message argument.
+ * mipsbsd.c (mips_fix_hi16_s): Add forward declaration, add missing
+ error_message argument.
+
+Fri Feb 18 11:41:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Support for PowerPC NetWare.
+ * nlm32-powerpc.c: New file.
+ * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
+ * config/ppc-nlm.mt: New file.
+ * configure.in (nlm32_powerpc_vec): New target vector; use
+ nlm32-powerpc.o, nlm32.o, nlm.o.
+ * targets.c (nlm32_powerpc_vec): Declare.
+ * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
+ (CFILES): Add nlm32-powerpc.c.
+
+ Initial support for PowerPC ELF. Done without an ABI, and
+ probably to be changed when I get an ABI.
+ * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
+ * config/ppc-elf.mt: New file.
+ * configure.in (bfd_elf32_powerpc_vec): New target vector; use
+ elf32-powerpc.o, elf32.o, elf.o.
+ * elf32-powerpc.c: New file.
+ * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
+ (elf_set_arch_mach): Likewise.
+ * targets.c (bfd_elf32_powerpc_vec): Declare.
+ * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
+ (CFILES): Add elf32-powerpc.c.
+ Rebuilt dependencies.
+
+Thu Feb 17 15:29:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coffgen.c (coff_write_linenumbers): Always return a value.
+
+ * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
+ reasonably. Allocate x_symp using alloca.
+
+ * elfcode.h (map_program_segments): ELF program header entries
+ must be sorted by load address. This used to generate the entries
+ in reverse order.
+
+ * section.c (SEC_IN_MEMORY): Define.
+ (asection): Rename unused field otheruserdata to contents, and
+ make it char *.
+ (bfd_make_section_anyway): Initialize contents field to NULL.
+ (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
+ contents from contents field rather than from file.
+ * bfd-in2.h: Rebuilt.
+
+Thu Feb 17 08:30:53 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * bfd.c (bfd_get_error, bfd_set_error): New functions.
+ (bfd_error): Make static.
+ (bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
+ all values.
+ * bfd-in2.h: Regenerated.
+ * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
+ aoutf1.h, aoutx.h, archive.c, archures.c,
+ bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
+ coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
+ ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
+ elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
+ i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
+ lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
+ nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
+ ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
+ srec.c, sunos.c, syms.c, targets.c, tekhex.c,
+ trad-core.c: Change callers.
+
+Tue Feb 15 22:27:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c: Remove FIXMEs for things which have been dealt with.
+
+Tue Feb 15 19:39:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * section.c (bfd_get_section_contents): Since this function reads
+ unrelocated contents, the section's raw size is always the one to
+ use for bounds checking.
+
+ * linker.c (default_indirect_link_order): In assertion, compare
+ link_order size field against cooked size, not raw size, of input
+ section.
+
+ * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
+ return 0.
+ (aligncode): When shrinking, the addend should be set to the
+ current offset in the section plus the number of bytes of padding
+ that will actually be retained.
+ (b_out_relax_section): If a section contains no relocations, don't
+ bother processing them.
+ (b_out_get_relocated_section_contents): Set reloc_done. Assert
+ that bfd_get_section_contents returns true. Check that relocs are
+ properly ordered.
+ (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
+ that reloc->addend falls between the current source offset and the
+ raw size of the input section.
+
+ * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
+ bout. Default with no version number is still bout. Support
+ explicit i960-coff target too.
+
+ * bout.c: Changed some indentation, deleted trailing whitespace,
+ fixed some comments, removed some "#if 1" lines.
+ (output_addr): New macro.
+ (calljx_callback, callj_callback, get_value, abs32code, aligncode,
+ b_out_get_relocated_section_contents): Use it for readability.
+
+Tue Feb 15 09:00:16 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
+ symbols, not the BFD symbols.
+ (som_bfd_ar_write_symbol_stuff): Likewise.
+
+Mon Feb 14 22:55:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
+ have any symbols.
+
+ * Finish basic read-write support for SOM archive libraries. Bugs
+ surely remain as this hasn't been tested all that much.
+ * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
+ (struct som_misc_symbol_info): New structure to hold info necessary
+ to build both normal and library symbol tables.
+ (som_derive_misc_symbol_info): New function to derive info necessary
+ to build both normal and library symbol tables.
+ (som_build_and_write_symbol_table): Use new function to derive misc
+ symbol information.
+ (som_slurp_symbol_table): Update backend private data for symbols
+ appropriately.
+ (som_bfd_prep_for_ar_write): New function.
+ (som_bfd_ar_symbol_hash): New function.
+ (som_bfd_ar_write_symbol_stuff): New function.
+ (som_write_armap): Flesh out.
+ (som_vec): Fix ar padding character.
+
+ * som.c: Consistently use memset rather than bzero.
+
+Mon Feb 14 17:02:28 1994 Stu Grossman (grossman at cygnus.com)
+
+ * coff-rs6000.c: Add Lynx core file support, use HOST_AIX, where
+ appropriate.
+ * rs6000-core.c: Use HOST_AIX instead of COREFILES_PLEASE.
+ * config/rs6000.mh: Remove defs of ARCHIVES_PLEASE and
+ COREFILES_PLEASE.
+ * config/rs6000lynx.mh: Turn on Lynx core file support.
+ * hosts/rs6000.h: #define HOST_AIX.
+ * hosts/rs6000lynx.h: Create this to enable Lynx host support.
+
+Sun Feb 13 14:30:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.h (som_symbol_data): Safely access backend private data
+ for BFD symbols. All callers changed.
+
+ * Read-only SOM archive support.
+ * som.c (som_bfd_count_ar_symbols): New helper function.
+ (som_bfd_fill_in_ar_symbols): New helper function.
+ (som_slurp_armap): New function to read a SOM LST.
+
+ * som.h: Include <lst.h> and <ar.h>.
+
+Sat Feb 12 22:34:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (elf_map_symbols): Fix typo.
+ (write_object_contents): Check return values from prep_headers and
+ elf_compute_section_file_positions.
+ (set_section_contents): Likewise.
+
+Fri Feb 11 16:56:50 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
+ (bfd_construct_extended_name_table): Check result of normalize.
+
+Tue Feb 8 08:57:31 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ Make all callers of malloc or realloc (including via obstacks)
+ check the result for NULL. Most set bfd_error to no_memory and
+ return in that case; a few are harder to fix, and are marked
+ with "FIXME <return type>".
+
+ * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
+ hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return.
+ * linker.c (_bfd_generic_link_output_symbols
+ _bfd_generic_link_write_global_symbol): Ditto
+ * section.c (bfd_make_section_anyway): Ditto.
+
+ * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
+ (first_phase): Ditto. FIXME void
+ (tekhex_make_empty_symbol): Check bfd_zalloc.
+
+ * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
+ (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
+
+ * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
+
+ * srec.c: Indent.
+ (fillup_symbols): Check bfd_alloc. FIXME void
+ (srec_mkobject srec_get_section_contents
+ srec_set_section_contents): Check bfd_alloc.
+ (srec_make_empty_symbol): Check bfd_zalloc.
+
+ * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
+ (make_unique_section): Check bfd_alloc.
+ (som_new_section_hook): Check bfd_zalloc.
+ (bfd_som_attach_aux_hdr): Ditto. FIXME void
+
+ * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
+
+ * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
+ (osf_core_core_file_p): Check bfd_alloc.
+
+ * oasys.c (oasys_slurp_symbol_table oasys_archive_p
+ oasys_mkobject oasys_object_p oasys_new_section_hook
+ oasys_set_section_contents): Check bfd_alloc.
+ (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
+ (oasys_make_empty_symbol): Check bfd_zalloc.
+
+ * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
+ (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
+
+ * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
+
+ * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
+
+ * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
+
+ * linker.c (_bfd_link_hash_newfunc
+ (generic_link_hash_newfunc
+ (archive_hash_newfunc
+ (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
+ (_bfd_generic_final_link
+ (_bfd_generic_link_output_symbols
+ (default_indirect_link_order): Check bfd_alloc.
+ (bfd_new_link_order): Check bfd_alloc_by_size_t.
+
+ * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
+
+ * ieee.c: Indent.
+ (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
+ ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
+ (do_one): Check bfd_alloc. Return a boolean.
+ (ieee_slurp_section_data): Check it.
+ (init_for_output): Check bfd_alloc. Return a boolean.
+ (ieee_set_section_contents): Check it.
+ (do_with_relocs): Check bfd_alloc. Return a boolean.
+ (ieee_bfd_debug_info_accumulate): Ditto. FIXME void.
+ (ieee_mkobject): Check bfd_zalloc.
+ (ieee_make_empty_symbol): Check bfd_zmalloc.
+
+ * hpux-core.c (hpux_core_make_empty_symbol): Check
+ bfd_zalloc.
+
+ * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
+ bfd_zalloc.
+ (hppabsd_core_core_file_p): Check bfd_zalloc.
+
+ * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
+
+ * elfcode.h (elf_new_section_hook): Check bfd_alloc.
+ (bfd_section_from_phdr): Ditto.
+ (write_relocs): Ditto. FIXME void
+ (elf_map_symbols assign_section_numbers map_program_segments):
+ Ditto. Return a boolean.
+ (swap_out_syms): Ditto. Check elf_map_symbols.
+ (elf_slurp_symbol_table): Check bfd_zalloc.
+ (elf_slurp_reloca_table): Check bfd_alloc.
+ (elf_slurp_reloc_table): Ditto.
+ (elf_compute_section_file_positions): Check assign_section_numbers.
+ (assign_file_positions_except_relocs): Return a boolean.
+ Check map_program_segments.
+ (elf_compute_section_file_positions): Check it.
+
+ * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
+
+ * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
+ realloc.
+ (hppa_elf_stub_reloc): Ditto.
+ (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
+ (hppa_elf_build_long_branch_stub): Ditto.
+ (elf32_hppa_backend_symbol_table_processing): Ditto.
+
+ * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean.
+ (ecoff_slurp_symbol_table): Check it.
+ (ecoff_slurp_armap): Check bfd_alloc.
+ (ecoff_write_armap): Check bfd_zalloc.
+ (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
+ _bfd_link_hash_newfunc.
+ (ecoff_link_add_externals): Check bfd_alloc.
+
+ * ctor.c (bfd_constructor_entry): Check bfd_alloc.
+
+ * coffgen.c (coff_real_object_p): Check bfd_alloc.
+ (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean.
+ (coff_write_symbol): Check bfd_alloc. FIXME int
+ (coff_write_linenumbers): Check bfd_alloc. Return a boolean.
+ (coff_section_symbol): Check bfd_alloc_by_size_t.
+ (coff_get_normalized_symtab): Check bfd_alloc.
+ (coff_bfd_make_debug_symbol): Check bfd_zalloc.
+ * libcoff-in.h: Change decls of coff_renumber_symbols,
+ coff_write_linenumbers.
+ * libcoff.h: Rebuilt.
+ * coffcode.h (coff_write_object_contents): Check
+ coff_renumber_symbols, coff_write_linenumbers.
+
+ * coffcode.h: Indent.
+ (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a
+ boolean.
+ (coff_write_object_contents): Check it.
+
+ * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
+ * coff-mips.c (mips_relocate_section): Ditto.
+
+ * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
+ (do_slurp_bsd_armap): Ditto.
+ (compute_and_write_armap): Check bfd_realloc value.
+
+ * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
+ return value. Return boolean value.
+ (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
+ (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
+ return value.
+ (add_to_stringtab): Ditto. FIXME void
+ (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
+ (aout_link_add_symbols): Check bfd_alloc value.
+ (translate_symbol_table): Check translate_from_native_sym_flags.
+ * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
+ * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
+
+ * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
+
+ * opncls.c (obstack_chunk_alloc): Define as malloc, not
+ bfd_xmalloc_by_size_t.
+ (_bfd_new_bfd): Check obstack_begin for 0 return.
+
+ * ieee.c (obstack_chunk_alloc): Define as malloc, not
+ bfd_xmalloc_by_size_t.
+ (ieee_archive_p): Check obstack_begin for 0 return and
+ obstack_finish for NULL return.
+
+ * hash.c (obstack_chunk_alloc): Define as malloc, not
+ bfd_xmalloc_by_size_t.
+ (bfd_hash_table_init_n): Check obstack_begin for 0 return and
+ obstack_finish for NULL return.
+ (bfd_hash_lookup): Check obstack_alloc for NULL return.
+
+ * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
+ bfd_xmalloc_by_size_t.
+ bfd_ecoff_debug_accumulate
+ bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
+ (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
+ NULL return. Return boolean, not void.
+ (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
+ (bfd_ecoff_debug_accumulate): Check add_file_shuffle
+ and add_memory_shuffle return.
+ (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
+ (bfd_ecoff_debug_accumulate): Check bfd_alloc.
+ (ecoff_add_string): Check add_memory_shuffle return.
+
+ * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
+ Remove decls.
+ * libbfd.h: Rebuilt.
+
+Fri Feb 11 15:35:32 1994 Stu Grossman (grossman at cygnus.com)
+
+ * configure.host: Add Lynx/rs6000 support.
+ * config/i386-nlm.mt: Enable a.out file support.
+ * config/rs6000lynx.mh: Lynx/rs6000 host support.
+
+Fri Feb 11 17:25:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * archive.c (compute_and_write_armap): Rewrite somewhat to improve
+ memory usage.
+
+Fri Feb 11 13:10:42 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * archive.c: Change all references to '\n' in archive magic
+ to '\012', for greater portability.
+ * ecoff.c (ecoff_write_armap): Ditto.
+
+Thu Feb 10 12:58:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_link_write_other_symbol): Check strip settings to
+ see whether symbol should be output.
+ * genlink.h (struct generic_write_global_symbol_info): Added info
+ field.
+ * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
+ (_bfd_generic_link_write_global_symbol): Check strip settings to
+ see whether symbol should be output.
+ * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
+
+Wed Feb 9 21:34:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
+
+ * som.c: Cast return values from BFD memory allocation routines to
+ avoid warnings from the HP compiler.
+
+Wed Feb 9 12:55:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
+ reloc on an "ldl" instruction too.
+
+ * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
+ when passing them to sprintf. Use %ld instead of %d.
+
+ * coff-rs6000.c (rs6000coff_mkarchive): Return false.
+ (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
+ Also removed unused variable namelen.
+ (rs6000coff_write_armap): Declare orl_count and stridx parameters.
+
+Tue Feb 8 18:00:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
+ conflicts.
+ * libbfd.h: Rebuilt.
+
+Tue Feb 8 15:55:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * coff-alpha.c (reloc_nil): New function.
+ (alpha_howto_table): Use it as special_function to prevent certain
+ relocs from being adjusted by bfd_perform_relocation. IGNORE
+ reloc should be partial_inplace.
+ (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
+ reloc on an "ldl" instruction too.
+
+Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
+ hppa_elf_build_long_branch_stub): Cast to char * instead of int
+ before performing pointer arithmetic.
+
+Mon Feb 7 20:56:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
+ configuration.
+ (hppa*-*-*elf*): This configuration used hppa-elf now.
+
+ * som.c: This file is also used for HOST_HPPAOSF.
+
+ * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
+
+ * hosts/hppaosf.h: New host configuration file.
+
+ * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
+ BSD handles both SOM and ELF object files.
+
+ * config/hppaosf.mh (HDEFINES): Delete. No longer needed.
+ (RANLIB): Doesn't do anything, define it to be "echo".
+
+ * config/hppaosf.mt: New target makefile fragment for a PA running
+ OSF1.
+
+Mon Feb 7 15:02:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
+ (archures_init_table): If SELECT_ARCHITECTURES is not defined,
+ added bfd_powerpc_arch.
+ * bfd-in2.h: Rebuilt.
+ * cpu-powerpc.c: New file.
+ * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
+ Rebuilt dependencies.
+
+ * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
+ of an SHT_STRTAB section from sh_addr and sh_addralign, rather
+ than just setting them to zero.
+
+Sun Feb 6 20:04:10 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
+ from bfd_new_strtab.
+ (elf_compute_section_file_positions): Check for false return from
+ swap_out_syms.
+
+ * linker.c (default_indirect_link_order): Check for NULL return
+ from bfd_get_relocated_section_contents.
+
+ * syms.c: Make example application in doc call xmalloc, not
+ bfd_xmalloc.
+
+ * aoutx.h (NAME(aout,slurp_symbol_table),
+ aout_link_get_symbols, NAME(aout,link_hash_table_create)):
+ * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
+ * ecoff.c (ecoff_bfd_link_hash_table_create):
+ * ecofflink.c (bfd_ecoff_debug_init):
+ * format.c (bfd_check_format_matches):
+ * linker.c (_bfd_generic_link_hash_table_create):
+ (_bfd_generic_final_link):
+ * reloc16.c (bfd_coff_reloc16_relax_section):
+ (bfd_coff_reloc16_get_relocated_section_contents):
+ * elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
+ * elf32-mips.c (mips_elf_final_link):
+ * elfcode.h (bfd_new_strtab):
+ (bfd_add_2_to_strtab):
+ (elf_slurp_symbol_table):
+ (elf_corefile_note):
+ * libbfd.c (bfd_zmalloc):
+ Use malloc and check the result, instead of bfd_xmalloc.
+
+Sat Feb 5 12:39:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
+
+Sat Feb 5 05:32:44 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * srec.c (srec_write_record): Put CONST keyword for "src" before
+ "unsigned", some compilers don't like it after "unsigned".
+ * libcoff.h, libcoff-in.h (bfd_perform_slip): Rename "value" to
+ "val" in prototype declaration because some compilers don't like
+ arguments whose names are the same as types.
+
+Sat Feb 5 01:14:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
+ object file defines symbol. Also, if skipping a symbol, skip the
+ second symbol of a N_WARNING or N_INDR symbol as well.
+
+Fri Feb 4 23:55:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Add basic support for writing RS/6000 XCOFF files.
+ * coff-rs6000.c (dummy_reloc): Removed.
+ (rs6000coff_howto_table): Defined XCOFF relocs.
+ (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
+ (rs6000coff_rtype2howto): New function.
+ (coff_bfd_reloc_type_lookup): Defined to use
+ rs6000coff_reloc_type_lookup.
+ (rs6000coff_reloc_type_lookup): New function.
+ (SELECT_RELOC): Defined to set r_type and r_size fields.
+ (COFF_LONG_FILENAMES): Defined.
+ * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
+ fields to bitfields. Added fields fix_value and fix_scnlen.
+ (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
+ STYP_INFO for the type of a section named .debug.
+ (coff_add_missing_symbols): Don't define if RS6000COFF_C.
+ (coff_write_object_contents): If RS6000COFF_C, don't call
+ coff_add_missing_symbols.
+ (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
+ entry has type STY_LD change the x_scnlen into a pointer to a
+ symbol and set fix_scnlen. Also, for a C_BSTAT symbol, change the
+ value into a pointer to a symbol and set fix_value.
+ * libcoff.h: Rebuilt.
+ * coffgen.c (coff_mangle_symbols): Reindent. If fix_value is set,
+ get the symbol offset. Likewise for fix_scnlen.
+ (string_size): Change type to bfd_size_type.
+ (debug_string_size, debug_string_section): New static variables.
+ (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
+ write the symbol name into the .debug section; assume that the
+ section has already been created with the right size.
+ (coff_write_symbols): Initialize debug_string_size to 0. If
+ bfd_coff_symname_in_debug returns true, don't put symbol name in
+ usual string table. After writing out all symbols, if
+ debug_string_size is not 0, check that it matches the size of the
+ .debug section.
+ (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
+ fields. If the string offset is 0, always use an empty string as
+ the name.
+ (coff_make_empty_symbol): Zero out the symbol structure.
+ * reloc.c (bfd_perform_relocation): Work around one gross hack
+ with another: actually look at the target name to avoid the broken
+ COFF check.
+ (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
+ BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
+ * bfd-in2.h: Rebuilt.
+
+Fri Feb 4 17:28:32 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
+ (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
+ * libbfd-in.h: Define them as macros calling xmalloc and declare
+ xmalloc.
+ * libbfd.h: Rebuilt.
+
+Thu Feb 3 16:49:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
+ symbol has a value in the ECOFF symbol but not in the BFD symbol,
+ keep the value in the ECOFF symbol. This helps gas.
+
+ * linker.c (_bfd_generic_link_output_symbols,
+ _bfd_generic_link_write_global_symbol): Don't require that all
+ references to a common symbol be themselves common symbols.
+
+ * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
+
+Wed Feb 2 20:37:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
+ sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
+ * bfd-in2.h: Rebuilt.
+
+Wed Feb 2 12:30:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
+ and size correctly.
+ (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
+ x_csect.x_scnlen.l to match change in coff/internal.h.
+ (coff_swap_aux_out): Likewise.
+
+ * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
+ (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
+ fields to match yesterday's changes.
+
+ * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
+ in the internal_reloc itself, not the type.
+ * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
+ coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
+ definition of SELECT_RELOC accordingly.
+
+Tue Feb 1 12:05:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coffcode.h (bfd_coff_backend_data): Added new arguments to
+ _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
+ and number of aux entries.
+ (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
+ accordingly.
+ * libcoff.h: Rebuilt.
+ * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
+ arguments. If RS6000COFF_C, only treat C_EXT and C_HIDEXT
+ specially if this is the last aux entry.
+ * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
+ new arguments to swap_aux functions.
+
+Sun Jan 30 15:14:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
+ (only testing for m68k and vax at the moment); do verify that the
+ preprocessor didn't trash the arch name inside the string version.
+ Don't print out "pagesize =" line that prevents output from
+ compiling. Derive BYTES_IN_WORD and ARCH values from sizeof
+ results.
+ * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
+ (check, installcheck): Identify directory in "no testsuites"
+ message.
+
+Sun Jan 30 13:25:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_link_write_symbols): Write out correct value for
+ object file symbol.
+
+Fri Jan 28 18:34:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
+ KERNBASE, so hard-code 0x80000000 instead.
+
+Thu Jan 27 13:54:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * linker.c (generic_link_add_symbol_list): If symbol is common,
+ set the BSF_OLD_COMMON flag.
+
+Wed Jan 26 13:47:15 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * format.c (bfd_check_format_matches): Put the new entry in the
+ correct element of matching_vector.
+
+Tue Jan 25 11:43:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * som.c, som.h (bfd_som_set_section_attributes,
+ bfd_som_set_subsection_attributes): Change parameters from char
+ to int. Following a prototype with an old-style function definition
+ in the presence of widened parameters is a GCC-ism not supported
+ by the HP compiler in ANSI mode.
+
+Tue Jan 25 11:46:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
+
+ * hp300hpux.c (MY(write_object_contents)): Write out the symbols
+ before writing out the relocs, so that the right symbol indices
+ are used.
+
+ * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
+ try to overlay the internal carsyms on the external symdefs. That
+ can not work if the size of a host pointer is larger than 4 bytes.
+
+ * format.c (bfd_check_format_matches): Cast result of
+ bfd_xmalloc_by_size_t.
+ * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
+
+ * archive.c: Reindented to GNU standards.
+
+Mon Jan 24 14:41:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
+ "_bfd_" to function names.
+ * archive.c (_bfd_create_empty_archive_element_shell),
+ libbfd-in.h: Change callers.
+
+ * libbfd.c (bfd_zmalloc): Renamed from zalloc.
+ * libbfd.c (bfd_add_to_string_table),
+ trad-core.c (trad_unix_core_file_p),
+ targets.c (bfd_target_list),
+ ptrace-core.c (ptrace_unix_core_file_p),
+ opncls.c (new_bfd), libbfd-in.h,
+ ieee.c (ieee_make_empty_symbol),
+ elf32-hppa.c (hppa_elf_stub_branch_reloc),
+ (hppa_elf_stub_reloc): Change callers.
+ * libbfd.h: Regenerated.
+
+ * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
+ (_bfd_get_elt_at_filepos),
+ coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
+ Change callers.
+
+ * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
+ elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
+ and default_vector to bfd_default_vector.
+ * libbfd.h: Regenerated.
+
+ * format.c (bfd_check_format_matches): New function.
+ (bfd_check_format): Call it.
+ (bfd_matching_formats): Function removed.
+ * targets.c: Replace the vector added on Jan 21 with a count of
+ entries in default_vector.
+ * bfd-in2.h: Regenerated.
+
+Mon Jan 24 12:38:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * coff-alpha.c (alpha_ecoff_object_p): New function. Set size of
+ .pdata section based on lnnoptr field, not section header.
+ (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
+ since it is unsigned.
+ (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
+ coff_object_p.
+ * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
+ .pdata section to 3.
+ (ecoff_compute_section_file_positions): Save the size of the
+ .pdata section in the line_filepos field, and actually align the
+ .pdata section to an alignment power of 4.
+ (ecoff_compute_reloc_file_positions): Set output_has_begun after
+ calling ecoff_compute_section_file_positions.
+ (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
+ section from the line_filepos field. Set vstamp for the optional
+ header from the vstamp of the symbolic header.
+ (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
+ vstamp used by the first object file in the link.
+
+ * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
+
+ * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
+ for a created common section.
+ (_bfd_generic_link_add_one_symbol): Likewise.
+
+ * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
+ get the index of a common section, rather than always using
+ SHN_COMMON (MIPS has multiple common sections).
+
+ * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
+
+ * bfd/aoutx.h (aout_link_input_section_std,
+ aout_link_input_section_ext): Pass additional arguments to
+ reloc_overflow callback.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
+ alpha_relocat_section): Likewise.
+ * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
+ * coff-h8500.c (extra_case): Likewise.
+ * coff-mips.c (mips_relocate_section): Likewise.
+ * coff-z8k.c (extra_case): Likewise.
+ * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
+
+ * bout.c (calljx_callback, callj_callback): Use get_value to get
+ the symbol value and check for undefined symbols.
+ (get_value): If the symbol is undefined, look it up in the linker
+ hash table.
+ (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
+ use get_value to get the symbol value and check for undefined
+ symbols.
+ * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
+ undefined, look it up in the linker hash table.
+
+ * aoutx.h (translate_symbol_table): The string index 0 has a
+ special meaning for normal symbols, but not for dynamic symbols.
+
+Sat Jan 22 12:26:01 1994 Stu Grossman (grossman at cygnus.com)
+
+ * sparclynx.c: Setup appropriate macros to enable core file
+ support.
+
+Fri Jan 21 16:25:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * targets.c: Add a vector of matching format names.
+ * format.c (bfd_matching_formats): New function to return it.
+ (bfd_check_format): Set it.
+ * bfd-in2.h: Regenerated.
+
+ * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
+ Remove decl of type symclass; wasn't used.
+ * bfd.c: Document error handling, including code fragments
+ containing the error decls that were in bfd-in.h.
+ Remove DEFUNs.
+ * bfd-in2.h: Regenerated.
+
+Fri Jan 21 14:11:16 1994 Sean Fagan (sef@cygnus.com)
+
+ * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
+ The sparc (and possibly other?) NLM format requires a different
+ way to write exports, so add a write_export field to the backend
+ data (and set it to NULL for everything but the sparc).
+
+Fri Jan 21 14:11:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
+ not (struct external_nlist *) NULL. info->dynrel is a PTR, not
+ a struct external_nlist *.
+
+Fri Jan 21 09:29:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * bfd.c: Remove error strings for errors removed below.
+ * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
+ oasys.c (oasys_write_sections): Rename
+ bfd_error_nonrepresentable_section to nonrepresentable_section.
+ None of the other bfd error names start with "bfd_error".
+ Remove errors symbol_not_found and no_relocation_info, which seem
+ to be unused.
+ * bfd-in2.h: Regenerated.
+
+Fri Jan 21 01:11:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * bfd.c (bfd_get_gp_size): Added support for ELF.
+
+ * syms.c (BSF_DYNAMIC): New symbol flag.
+ (bfd_print_symbol_vandf): Print it.
+ * bfd-in2.h: Rebuilt.
+ * libaout.h (struct aout_backend_data): New read_dynamic_symbols
+ and read_dynamic_relocs fields.
+ (struct aoutdata): New dynamic_info field.
+ (obj_aout_dynamic_info): New accessor macro.
+ * sunos.c (struct sunos_dynamic_info): New structure.
+ (sunos_read_dynamic_info, MY(read_dynamic_symbols),
+ MY(read_dynamic_relocs)): New functions to read dynamic symbols
+ and relocs.
+ * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
+ dynamically linked, set SEC_RELOC for both the .text and .data
+ sections.
+ (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
+ undefined symbol.
+ (translate_symbol_table): New function, split out of
+ slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
+ (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
+ (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
+ (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
+ return value.
+ * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
+ out dynamic symbols or relocs against reloc symbols, since they
+ are already in the .text section and we wouldn't know where to
+ write them anyhow.
+ (sunos4_aout_backend): Initialize read_dynamic_symbols and
+ read_dynamic_relocs fields.
+ * aout-target.h (MY(backend_data)): Initialize
+ read_dynamic_symbols and read_dynamic_relocs fields.
+
+Thu Jan 20 20:57:27 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
+ typedefs, since HOST_64_BIT will take care of defining them in
+ bfd.h.
+
+Wed Jan 19 17:28:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
+ that's dealt with elsewhere.
+ * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
+ (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
+ they get copied to bfd.h.
+
+ * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
+ types. Reorganized some of the existing ones.
+ * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
+ values in case of compilation on a 32-bit machine. Fix pcrel
+ fields of some reloc types.
+ (alpha_bfd_reloc_type_lookup): Handle more relocation types.
+
+ * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
+ definitions when not defined, regardless of whether uint64_type is
+ a defined macro or not.
+ (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
+ already defined.
+
+Wed Jan 19 00:02:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (translate_to_native_sym_flags): Set the type of a
+ BSF_WARNING symbol to N_WARNING.
+
+Tue Jan 18 16:43:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
+ for an indirect or warning symbol.
+ (aout_link_write_symbols): Update sym_hash with the target of an
+ indirect or warning symbol. If an indirect symbol is defined,
+ output the calculated value and don't output the target symbol.
+
+Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (translate_from_native_sym_flags): Give warning symbols
+ an (unused) nonzero section value, needed for check below.
+
+Mon Jan 17 15:12:07 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (translate_from_native_sym_flags,
+ aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
+ N_SET[ABDT].
+
+Fri Jan 14 16:45:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
+ the DYNAMIC flag for the BFD.
+ (NAME(bfd_elf,write_object_contents)): Don't try to write out a
+ BFD with the DYNAMIC flag set, since we don't generate the program
+ header table correctly.
+
+Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * elfcode.h (elf_slurp_symbol_table): Free x_symp at the end
+ of the function to avoid storage leak.
+
+Thu Jan 13 23:07:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_link_write_external): An ifd can be -1.
+
+Thu Jan 13 12:33:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_set_reloc_info): Provide a default symbol for
+ relocations which don't actually have an associated symbol.
+
+ * som.c (hppa_som_reloc): Add new "error message" argument.
+
+Wed Jan 12 13:36:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ Enable gdb to write to core files on more core file readers.
+ * libbfd.c (bfd_generic_set_section_contents): Remove range check
+ for section size, it is already done in bfd_set_section_contents
+ with bfd_get_section_size_now.
+ * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
+ osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
+ Use bfd_generic_set_section_contents instead of bfd_false.
+
+Wed Jan 12 15:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * linker.c: Added initial documentation.
+
+ * linker.c (default_indirect_link_order): Don't expect space for
+ output relocations if there aren't any input relocations.
+
+Tue Jan 11 14:37:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
+ file offsets.
+
+ * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
+ STT_NOTYPE.
+
+Tue Jan 11 09:10:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
+ Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
+
+Tue Jan 11 00:07:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecofflink.c: Extensive changes to compress and merge debugging
+ information, and to write some of out directly rather than saving
+ it in memory. Several new functions and structures, and new
+ arguments to existing functions.
+ * ecoff.c (ecoff_compute_reloc_file_positions): Compute
+ sym_filepos as well.
+ (ecoff_get_extr): Use ifdmap instead of ifdbase.
+ (ecoff_write_object_contents): Don't compute sym_filepos here.
+ Only output symbols if outsymbols is not NULL.
+ (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
+ bfd_ecoff_debug functions. Write out debugging information here.
+ (ecoff_final_link_debug_accumulate): Adjust for changes in
+ bfd_ecoff_debug functions.
+ (ecoff_link_write_external): Use ifdmap rather than ifdbase.
+ * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
+ first, to put them in the first memory buffer. Clear fdr field.
+ (mips_elf_get_extr): Use pointer to unswapped external symbol.
+ (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
+ Preserve .text, .data and .bss even if they are empty. Save
+ pointer to unswapped external symbol rather than copying it.
+ Don't free up the external symbols.
+ * libelf.h (elf_symbol_type): Change mips_extr to PTR.
+ * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
+ (bfd_ecoff_debug_accumulate): Update declaration.
+ (bfd_ecoff_debug_accumulate_other): Rename declaration from
+ bfd_ecoff_debug_link_other and update.
+ (bfd_ecoff_write_accumulated_debug): Declare.
+ * bfd-in2.h: Rebuilt.
+ * Makefile.in: Rebuilt dependencies.
+
+Mon Jan 10 20:46:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * Makefile.in (install): Remove "@" which follows a backslash. In
+ this position it just causes errors, not suppresses echoes.
+
+Mon Jan 10 09:06:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
+ field selectors.
+
+Sun Jan 9 04:32:25 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
+
+Fri Jan 7 10:27:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
+ end of data if they are not contiguous.
+
+ * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
+
+Fri Jan 7 15:40:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
+ for .reginfo section here.
+ (ecoff_new_section_hook): Set it here instead.
+
+Fri Jan 7 10:29:27 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * bfd-in.h: (bfd_boolean): Add workaround for systems that also
+ define true and false as enums.
+ (ALMOST_STDC): Add as alternative to __STDC__.
+ * bfd-in2.h: Rebuilt.
+ * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
+
+Thu Jan 6 14:24:44 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aoutx.h (translate_to_native_sym_flags): Catch the case where
+ there is no output section.
+
+Thu Jan 6 14:37:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * nlmcode.h (nlm_object_p): If we can't read the fixed header,
+ count it as a wrong format error, not a system call error, since
+ the object file might simply be too small.
+
+ * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
+ BFD64.
+ * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
+ (BFD64_BACKENDS): Add nlm32-alpha.o. It depends on 64 bit
+ support, even though it is for an Alpha in 32 bit mode.
+ * configure.in (nlm32_alpha_vec): Set target64 to true.
+
+ * nlm32-gen.c, nlm64-gen.c: Removed. All nlm targets are
+ different, so there is no point to providing a generic one.
+ * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
+ in the backend accessor macros; that should no longer be possible.
+ * targets.c (target_vector): Removed nlm32_big_generic_vec,
+ nlm64_big_generic_vec, nlm64_little_generic_vec.
+ * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
+ nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
+ * Makefile.in: Rebuilt dependencies, and
+ (BFD32_BACKENDS): Removed nlm32-gen.o.
+ (BFD64_BACKENDS): Removed nlm64-gen.o.
+ (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
+
+ * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
+
+ * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
+ bitsize arguments. Changed all callers (aoutx.h).
+ * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
+ and bitsize arguments to declaration.
+ * libbfd.h: Rebuilt.
+
+ * ecoff.c: First cut at new style of linker backend for
+ ECOFF--added a bunch of functions. Also:
+ (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
+ (ecoff_slurp_symbolic_header): New function.
+ (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
+ (ecoff_compute_reloc_file_positions): New function.
+ (ecoff_set_section_contents): Get out quickly if count is zero.
+ Check errors better.
+ (ecoff_write_object_contents): Put .xdata section in data segment.
+ Call ecoff_compute_reloc_file_positions. Don't output relocs or
+ external symbols if outsymbols is NULL.
+ (ecoff_bfd_final_link): Completely rewritten.
+ * libecoff.h: Include bfdlink.h.
+ (struct ecoff_backend_data): Add relocate_section field.
+ (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
+ (struct ecoff_link_hash_entry): Define.
+ (struct ecoff_link_hash_table): Define.
+ (ecoff_bfd_link_add_symbols): Declare as function, not macro.
+ (ecoff_bfd_link_hash_table_create): Likewise.
+ * ecofflink.c (bfd_ecoff_debug_one_external): New function.
+ (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
+ * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
+ * bfd-in2.h: Rebuilt.
+ * coff-alpha.c (alpha_howto_table): Mark BRADDR as
+ partial_inplace, and set the src_mask to 0x1fffff.
+ (alpha_ecoff_get_relocated_section_contents): Remove unused
+ variable gp_warned.
+ (alpha_convert_external_reloc): New static function.
+ (alpha_relocate_section): New static function.
+ (alpha_ecoff_backend_data): Initialize relocate_section field.
+ * coff-mips.c (mips_relocate_refhi): New static function.
+ (mips_relocate_section): New static function.
+ (mips_ecoff_backend_data): Initialize relocate_section field.
+
+ * reloc.c (_bfd_relocate_contents): Corrected signed overflow
+ checking when there is an addend.
+
+ * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
+ a non a.out file, just pass it to _bfd_default_link_order.
+ (aout_link_input_section_std): When doing a final PC relative link
+ against a section symbol, subtract the VMA of the input section.
+ (aout_link_input_section_ext): Likewise.
+
+ * linker.c (default_indirect_link_order): Renamed from
+ _bfd_generic_indirect_link_order and made static.
+ (_bfd_generic_final_link): Don't switch on link_order type, just
+ call _bfd_default_link_order.
+ (_bfd_default_link_order): Handle bfd_indirect_link_order type.
+ * genlink.h: Removed declaration of
+ _bfd_generic_indirect_link_order.
+ * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
+ type, just call _bfd_default_link_order.
+
+Tue Jan 4 21:23:37 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * linker.c (generic_link_check_archive_element): Base the name of
+ the created common section on the name of the section the symbol
+ came from.
+ (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
+ must have a section, so don't bother to create one.
+
+Mon Jan 3 15:32:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
+ * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
+ If the DYNAMIC flag is set, set it in the exec header.
+ * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
+ dynamically linked, set the DYNAMIC flag in the BFD.
+ * libaout.h (N_SET_DYNAMIC): New macro.
+ (N_DYNAMIC): Add missing 0 in mask.
+
+Mon Jan 3 11:41:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_get_extr): Don't output section symbols as
+ external symbols.
+
+ * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
+ to unsigned int, because size_t may not be defined in bfd.h.
+ * bfd-in2.h: Rebuilt.
+
+ * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
+ be a const pointer.
+ * bfd-in2.h: Rebuilt.
+ * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
+ be a const pointer.
+ * targets.c (bfd_target): Change swap function pointers
+ accordingly.
+ * archive.c (do_slurp_coff_armap): Change swap accordingly.
+ * aix386-core.c: Change NO_GET and NO_GETS accordingly.
+ * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
+ ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
+ accordingly.
+
+ * libbfd-in.h (struct artdata): Added tdata field.
+ (_bfd_add_bfd_to_archive_cache): Declare.
+ (_bfd_get_elt_at_filepos): Declare.
+ (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
+ * libbfd.h: Rebuilt.
+ * archive.c: Cleaned up some more.
+ (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
+ pointer elements of artdata.
+ (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
+ (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
+ (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
+ (get_extended_arelt_filename, bfd_construct_extended_name_table,
+ bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
+ * ecoff.c: Some comment changes.
+ (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set
+ ardata->tdata to raw_armap.
+ (ecoff_archive_p): Initialize pointer elements of artdata.
+ * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
+ add_bfd_to_cache.
+
+ * hash.c: Added some documentation.
+
+Mon Jan 3 11:09:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
+ and do the swapping here rather than calling ntohl from the N_*
+ macros. This cleans up assumptions about the size of a host long,
+ the existence to ntohl, etc.
+
+Sat Jan 1 13:50:05 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * config.bfd: Add support for VSTa micro-kernel. It currently uses
+ i386-aout.
+
+Sat Jan 1 10:18:54 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
+ * i386mach3.c (SEGMENT_SIZE): Fix value.
+
+For older changes see ChangeLog-9193
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/bfd/ChangeLog-9697 b/contrib/binutils/bfd/ChangeLog-9697
new file mode 100644
index 0000000..dc22c8c
--- /dev/null
+++ b/contrib/binutils/bfd/ChangeLog-9697
@@ -0,0 +1,6711 @@
+Tue Dec 30 12:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_check_relocs): If -Bsymbolic, don't
+ allocate space for a PC relative reloc against a symbol which is
+ defined in a regular file.
+ (elf32_sparc_relocate_section): If -Bsymbolic, don't copy a PC
+ relative reloc against a symbol which is defined in a regular
+ file.
+
+Mon Dec 29 18:02:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Jonathan Stone <jonathan@DSG.Stanford.EDU>:
+ * config.bfd (mips-dec-netbsd*): Add ECOFF vectors to
+ targ_selvecs.
+ (mips*el-*-netbsd*): Like mips-dec-netbsd*.
+ (mips*-*-netbsd*): New target.
+
+Mon Dec 29 17:13:28 1997 H.J. Lu (hjl@gnu.org)
+
+ * elflink.h (elf_link_assign_sym_version): Change error message
+ from "undefined version name" to "undefined versioned symbol
+ name".
+
+Mon Dec 29 11:41:16 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Fix typo from previous
+ delta.
+
+Tue Dec 23 17:01:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.
+ * libbfd.h: Rebuild.
+
+ * peicode.h (coff_swap_scnhdr_out): Set .reloc section to be
+ shared. Set stab* sections to be shared and read. Set .rsrc
+ section to be read and shared.
+
+Mon Dec 22 13:20:57 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add dwarf2.lo.
+ (ALL_MACHINES_CFILES): Add dwarf2.c.
+ * Makefile.in: Rebuild.
+
+ * coff-arm.c: Don't include obstack.h.
+
+Mon Dec 22 13:04:33 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
+ i[3456]86-go32.
+
+Thu Dec 18 16:01:25 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * configure: Regenerate to get @SHELL@ substituted.
+
+Wed Dec 17 09:45:09 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Only look at section
+ owner if there is one.
+
+ * elf.c (assign_file_positions_for_segments): Fail if there is not
+ enough room for the program headers.
+
+Tue Dec 16 08:09:56 1997 Gavin Koch <gavin@cygnus.com>
+
+ * elf.c (_bfd_elf_find_nearest_line): Call
+ _bfd_dwarf2_find_nearest_line first.
+ * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Same.
+ * dwarf2.c: New file; implement _bfd_dwarf2_find_nearest_line.
+
+Mon Dec 15 16:08:52 1997 Nick Clifton <nickc@cygnus.com>
+
+ * archures.c: Add bfd_mach_m32r.
+
+Mon Dec 15 16:11:22 1997 Fred Fish <fnf@cygnus.com>
+
+ * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined.
+ (coff_compute_section_file_positions): Use ALIGN_SECTIONS_IN_FILE
+ to decide when to align the file sections for paging.
+ * coffcode.h (ALIGN_SECTIONS_IN_FILE): Undefine for TIC80COFF.
+
+Mon Dec 15 15:01:15 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-m32r.c (m32r_elf_object_p): New Function.
+ (m32r_elf_final_write_processing): New Function.
+ (m32r_elf_set_private_flags): New Function.
+ (m32r_elf_copy_private_bfd_data): New Function.
+ (m32r_elf_merge_private_bfd_data): New Function.
+ (m32r_elf_print_private_bfd_data): New Function.
+ (elf_backend_object_p): Point to m32r_object_p.
+ (elf_backend_final_write_processing): Point to
+ m32r_elf_final_write_processing.
+ (bfd_elf32_bfd_copy_private_bfd_data): Point to
+ m32r_elf_copy_private_bfd_data.
+ (bfd_elf32_bfd_merge_private_bfd_data): Point to
+ m32r_elf_merge_private_bfd_data.
+ (bfd_elf32_bfd_set_private_flags): Point to
+ m32r_elf_set_private_bfd_data.
+ (bfd_elf32_bfd_print_private_bfd_data): Point to
+ m32r_elf_print_private_bfd_data.
+
+
+ * bfd-in2.h (bfd_mach_m32r): Add identifier for M32R architecture
+ machines.
+
+Fri Dec 12 11:30:28 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
+
+ * configure: Only build libbfd shared if --enable-shared's value
+ was `yes', or was set to `*bfd*'.
+ * aclocal.m4: Likewise.
+ * NOTE: this really needs to be fixed in libtool/libtool.m4, the
+ original source of this bit of code. It's not clear what the best fix
+ would be, though.
+
+Thu Dec 11 17:48:11 1997 Richard Henderson <rth@cygnus.com>
+
+ * linker.c (generic_link_add_symbol_list): Always init udata.p so
+ that the generic relaxation code can function when input and output
+ file formats are mismatched.
+
+Thu Dec 11 01:02:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (bfd_coff_small_swap_table): Initialize new fields.
+
+ * elf.c (assign_file_positions_for_segments): For a loadable
+ section, make sure that the load address is correct relative to
+ the load address of the segment plus the size of the segment so
+ far.
+
+ * coffcode.h (_coff_link_output_has_begun): Make static.
+ (_coff_final_link_postscript): Likewise.
+
+Wed Dec 10 23:37:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_input_bfd): Handle a relocateable link in
+ which a relocation refers to an indirect or warning symbol.
+
+Wed Dec 10 11:15:55 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (bfd_arm_coff_final_link): Function deleted.
+ (coff_arm_final_link_postscript): New function.
+ (coff_arm_link_output_has_begun): New function.
+
+ * libcoff.h (struct bfd_coff_backend_data): Add new fields:
+ _bfd_coff_link_output_has_begun and
+ _bfd_coff_final_link_postscript. Add new macros:
+ bfd_coff_link_output_has_begun() and
+ bfd_coff_final_link_postscript().
+
+ * cofflink.c (_bfd_coff_final_link): Insert calls to
+ bfd_coff_link_output_has_begun() and
+ bfd_coff_final_link_postscript().
+
+ * coffcode.h: Add two new fields to bfd_coff_backend_data
+ structure: _bfd_coff_link_output_has_begun and
+ _bfd_coff_final_link_postscript. Add default initialisers for
+ these fields. Add overridable aliases for the coff swap functions
+ in the backend data structure.
+
+ * elf32-v850.c: Update with patches from the branch to fix
+ HI16_S/LO16 reloc pairs.
+
+Wed Dec 10 14:06:48 1997 Michael Meissner <meissner@cygnus.com>
+
+ * elf32-d30v.c (d30v_info_to_howto_rela): New function to support
+ RELA relocations.
+ (USE_REL): Don't define any more, switch to using RELA
+ relocations.
+ (elf_info_to_howto): Define as d30v_info_to_howto_rela.
+
+Tue Dec 9 11:37:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * archures.c (bfd_mach_mips*): Define.
+ (bfd_default_scan): For 3000 and 4000 replace magic constant with
+ macro.
+
+ * cpu-mips.c (N): Define.
+ (bfd_mips_arch, arch_info_struct): Re-write using macro N, replace
+ numbers with bfd_mach_mips* macros.
+
+Fri Dec 5 11:13:46 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_reloc, v850_elf_store_addend_in_insn,
+ v850_elf_relocate_section): Fix reloc addend handling.
+ (v850_elf_section_from_bfd_section, v850_elf_symbol_processing,
+ v850_elf_add_symbol_hook, v850_elf_link_output_symbol_hook,
+ v850_elf_section_from_shdr, v850_elf_fake_sections): New functions
+ to create and handle special common sections.
+ (v850_elf_final_link_relocate): Fix HI16 and HI16_S relocations
+ which have data stored in the instructions.
+
+Tue Dec 2 10:26:16 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (TARGET_UNDERSCORE): Revert back to '_'
+ (USER_LABEL_PREFIX): Revert back to '_'
+
+ * config.bfd (targ_cpu): Add support for Thumb target.
+
+Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * coff-sh.c (sh_coff_howtos): Add R_SH_SWITCH8 entry.
+ (get_symbol_value): Handle R_SH_SWITCH8.
+ (sh_relax_delete_bytes): Likewise.
+
+Wed Nov 26 14:13:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (TARGET_UNDERSCORE): Changed to match definition in
+ gcc/config/arm/semi.h
+
+ * coffcode.h (coff_slurp_symbol_table): Add ARM and Thumb symbol
+ classes.
+
+Sun Nov 23 16:02:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * freebsd.h (SWAP_MAGIC): Read magic number little and not big
+ endian.
+
+Wed Nov 26 09:30:37 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coffcode.h (coff_mkobject_hook): Only set private flags for non
+ PE ARM ports.
+
+Tue Nov 25 15:33:23 1997 Richard Henderson <rth@cygnus.com>
+
+ * binary.c (binary_set_section_contents): Also ignore NEVER_LOAD
+ sections.
+
+Tue Nov 25 10:55:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Do not
+ complain if inout and output formats differ.
+
+Tue Nov 25 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (BFD32_BACKENDS): Remove tekhex.lo.
+ (BFD32_BACKENDS_CFILES): Remove tekhex.c.
+ * Makefile.in: Rebuild.
+ * aclocal.m4, configure, src/Makefile.in: Rebuild with current
+ automake and autoconf.
+
+ * coff-arm.c (arm_allocate_interworking_sections): Fix typo
+ (COFF_WITH_PR to COFF_WITH_PE).
+
+Mon Nov 24 15:47:49 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: Make variables and some functions static, so that
+ this file can be included in multiple object files.
+ (coff_arm_bfd_final_link): Fix minor bug.
+
+Sat Nov 22 15:16:00 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: Add support for PIC and APCS-FLOAT type binaries.
+
+ * coffcode.h: Add support for PIC and APCS-FLOAT type binaries.
+
+Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
+
+Sat Nov 22 12:29:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_add_one_symbol): When overriding a defined
+ symbol, set it to undefined, not new.
+
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL
+ relocs.
+
+Fri Nov 21 14:14:22 1997 Richard Henderson <rth@cygnus.com>
+
+ * coff-sh.c (sh_relax_section): Force sign extention of USES r_offset.
+ (sh_relax_delete_bytes): Don't kill LABEL relocs.
+
+Mon Nov 17 15:08:38 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
+ (mn10300_elf_relax_section): Likewise.
+
+Sat Nov 15 15:36:07 1997 Fred Fish <fnf@cygnus.com>
+
+ * peicode.h (coff_swap_aouthdr_in): Cast second arg of
+ bfd_h_get_* calls to "bfd_byte *".
+
+Tue Nov 11 10:37:23 1997 Jeffrey A Law (law@cygnus.com)
+
+ * 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.
+
+Mon Nov 10 14:32:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
+ a version dependency could not be found.
+
+Tue Nov 4 12:05:56 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * configure.com: Get version info from configure.in
+
+Fri Oct 24 11:15:58 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
+
+ * elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
+ New function. Avoid mixing US1 and HAL R1 code.
+ Set resulting memory ordering to the strongest one used.
+ (sparc64_elf_object_p): Set bfd_mach correctly.
+
+Thu Oct 23 14:09:33 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-sparc.c (sparc64_elf_howto_table): Add UA64 & UA16.
+ (sparc64_elf_check_relocs): Handle them.
+ (sparc64_elf_relocate_section): Likewise. Before emitting a dyn reloc,
+ check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
+
+Thu Oct 23 00:53:14 1997 Richard Henderson <rth@dot.cygnus.com>
+
+ * configure.in (sparc*-*-linux*): Use trad-core and ...
+ * hosts/sparclinux.h: New file.
+
+Thu Oct 23 00:25:29 1997 Richard Henderson <rth@dot.cygnus.com>
+
+ * config.bfd (sparc64-*-linux*): New target.
+
+ * elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
+ * elflink.c (_bfd_elf_create_got_section): Set .got alignment based
+ on arch_size.
+ (_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
+ Set .plt alignment from new plt_alignment.
+ * elflink.h (elf_link_create_dynamic_sections): Set version section
+ alignment to LOG_FILE_ALIGN.
+ * elfxx-target.h (elf_backend_plt_alignment): Provide default.
+ (elfXX_bed): Init plt_alignment.
+
+ * elf64-sparc.c (sparc64_elf_check_relocs,
+ sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
+ sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
+ sparc64_elf_finish_dynamic_sections): New functions.
+ (sparc64_elf_howto_table): Fix a few name strings.
+ (ELF_DYNAMIC_INTERPRETER): New definition.
+ (sparc64_elf_relocate_section): Handle shared libraries.
+
+ * elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
+ sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
+ PLT definitions sparc64-linux originally choose. These will go
+ away soon in favour of the official abi definitions.
+
+Wed Oct 22 16:08:45 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (coff_small_object_p): New static function.
+ (coff_small_new_section_hook): New static function.
+ (bfd_coff_small_swap_table): New static const structure.
+ (coff_small_close_and_cleanup): Define.
+ (coff_small_bfd_free_cached_info): Define.
+ (coff_small_get_section_contents): Define.
+ (coff_small_get_section_contents_in_window): Define.
+ (shcoff_small_vec): New static structure.
+ (shlcoff_small_vec): New static structure.
+ * targets.c (bfd_target_vector): Add shcoff_small_vec and
+ shlcoff_small_vec.
+ * config.bfd (sh-*-elf*): Add shcoff_small_vec and
+ shlcoff_small_vec to targ_selvecs.
+ (sh-*-*): Likewise.
+ * configure.in: Add shcoff_small_vec and shlcoff_small_vec cases.
+ * configure: Rebuild.
+
+Mon Oct 20 15:01:27 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * evax-egsd.c: Weak symbols are global.
+
+ * evax-emh.c: Use proper casts.
+
+ * evax-egsd.c (_bfd_evax_write_egsd): Remove unneeded uname.
+
+ * evax-egsd.c: Section names and symbols have different
+ length restrictions. Add length parameter to
+ _bfd_evax_length_hash_symbol.
+ * evax-etir.c: Likewise.
+ * evax-misc.c (_bfd_evax_length_hash_symbol): Add length
+ parameter.
+ * evax.h (EOBJ_S_C_SECSIZ): Define.
+
+ * evax-alpha.c: Remove duplicate test.
+
+ * evax-emh.c: SYS$ functions are upper-case.
+
+ * evax-egsd.c: Create separate sections for common symbols.
+ * evax-etir.c: Don't output common section.
+ * evax.h: Bump up section count.
+
+ * configure.com: Use 64bit integers with DEC C.
+
+ * evax-egsd.c: Make section flags dec c compatible.
+
+Mon Oct 20 09:38:31 1997 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (normalize): Delete function.
+ (som_bfd_ar_write_symbol_stuff): New parameter elength. All callers
+ changed. Use passed in elength to determine size of the extended
+ name table instead of computing it again.
+
+Sun Oct 19 23:36:21 1997 Jim Wilson <wilson@cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out): Use |= not = to set
+ IMAGE_SCN_MEM_READ for an unrecognized section.
+
+Sun Oct 19 21:04:56 1997 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (som_bfd_ar_write_symbol_stuff): Account for trailing
+ '/' in the extended name table.
+
+Fri Oct 17 00:04:13 1997 Richard Henderson <rth@cygnus.com>
+
+ * elflink.h (elf_link_assign_sym_version): For explicitly versioned
+ symbols, check globals list before matching on locals.
+
+Thu Oct 16 08:17:06 1997 Michael Meissner <meissner@cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out,pe_print_idata): Fix mangled
+ patch.
+
+Wed Oct 15 13:45:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (pe_mkobject_hook): Set DLL flag.
+ (pe_bfd_copy_private_bfd_data): Copy DLL flag.
+
+ * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_DISCARDABLE
+ for .stab* sections. Replace strlen of constant strings with
+ number.
+
+Tue Oct 14 15:42:45 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-alpha.c (elf64_alpha_merge_ind_symbols): New function to
+ merge got and reloc entries from ind syms to their target.
+ (elf64_alpha_always_size_sections): Call it.
+ (elf64_alpha_check_relocs): Operate on the target of indirect symbols.
+ (elf64_alpha_can_merge_gots): Likewise.
+ (elf64_alpha_merge_gots): Likewise.
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Back out HJ's change,
+ as it is insufficient to handle the relocation changes as well.
+
+Mon Oct 13 23:10:08 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Allow for RELATIVE
+ relocs for symbols in shlibs that have been forced local.
+ (elf64_alpha_relocate_section): Output RELATIVEs in .got for same.
+
+Mon Oct 13 21:24:04 1997 Richard Henderson <rth@cygnus.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Use the
+ got_enties of the default symbol for the default versioned
+ symbol. Patch from hjl@gnu.ai.mit.edu, modified not to use
+ alloca in the loop.
+
+Mon Oct 13 17:37:37 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_final_link_relocate): Only use the bottom
+ 24 bits of the PC when computing a PC relative relocation.
+
+Fri Oct 10 16:01:30 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate):
+ Correct value for maximum positive 22 bit PC relative relocation.
+ (v850_elf_final_link_relocate): Prevent overflow from HI16_S and
+ HI_16 relocations. Correct bit adjustment in TDA offsets.
+
+Thu Oct 9 16:43:39 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
+ (sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
+
+Wed Oct 8 11:38:45 1997 Richard Henderson <rth@cygnus.com>
+
+ * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
+ be LOG_FILE_ALIGN.
+
+Wed Oct 8 11:36:00 1997 Richard Henderson <rth@cygnus.com>
+
+ * config.bfd: Missed one alpha* change.
+
+Tue Oct 7 13:00:17 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove BFD64 support.
+ * elf64-sparc.c (SPARC64_OLD_RELOCS): Undef.
+ (MINUS_ONE): New macro.
+ (sparc_elf_notsup_reloc): New function.
+ (sparc64_elf_howto_table): Add entries for DISP64,PLT64,HIX22,LOX10,
+ H44,M44,L44,REGISTER.
+ (sparc_reloc_map): Likewise. Map BFD_RELOC_CTOR to R_SPARC_64.
+ (init_insn_reloc): New function.
+ (sparc_elf_wdisp16_reloc): Use it.
+ (sparc64_elf_relocate_section): Add entries for OLO10,HIX22,LOX10.
+
+Tue Oct 7 11:40:37 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * som.c (som_construct_extended_name_table): Remove static
+ function, and define as macro instead.
+
+Fri Oct 3 14:02:17 1997 Richard Henderson <rth@cygnus.com>
+
+ * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
+ recognizes alphaev5 etc.
+ * configure.host: Likewise.
+
+Fri Oct 3 11:23:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Make ld -s work on AIX:
+ * xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
+ section if we are stripping.
+ (bfd_xcoff_size_dynamic_sections): Don't set the .debug section
+ size if we are stripping.
+ (_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
+ and don't write out relocs, if we are stripping.
+ (xcoff_link_input_bfd): Don't set up reloc if we are stripping.
+ (xcoff_write_global_symbol): Don't write out symbol or reloc if we
+ are stripping.
+
+ * configure.in: Don't include elf.lo again for ELF targets; it's
+ always in the library anyhow.
+ * configure: Rebuild.
+
+ * bfd-in2.h: Rebuild.
+
+ * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
+ char *, when calling bfd_get_32 and bfd_put_32.
+ * sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
+ when calling strcpy.
+
+Thu Oct 2 16:15:50 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * reloc.c (bfd_check_overflow): New function.
+ (bfd_perform_relocation, bfd_install_relocation): Use it.
+ (BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
+ (BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+Thu Oct 2 13:17:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
+ unrecognized section. From Jon Thackray <jont@harlequin.co.uk>.
+
+Wed Oct 1 14:03:44 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
+ (stmp-bfd-h): Rename from stmp-bfd.h.
+ (BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
+ ($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
+ (stmp-bin2-h): New target.
+ ($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
+ (stmp-lbfd-h): New target.
+ ($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
+ (stmp-lcoff-h): New target.
+ (CLEANFILES): Change stmp-bfd.h to stmp-bfd-h. Add stmp-bin2.h,
+ stmp-lbfd-h, and stmp-lcoff-h.
+ * Makefile.in: Rebuild.
+
+ * configure.in: Use a diversion to set enable_shared before the
+ arguments are parsed.
+ * configure: Rebuild.
+
+Tue Sep 30 14:18:32 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
+ renamed to R_SPARC_UNUSED_42.
+ (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
+ * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
+ renamed to R_SPARC_UNUSED_42.
+ (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
+ * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Regenerated.
+
+Thu Sep 25 12:15:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_merge_symbol): Don't check the hash creator until
+ after we have set *sym_hash.
+
+Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
+
+Wed Sep 24 11:27:23 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (libbfd_a_SOURCES): Define.
+ * Makefile.in: Rebuild.
+
+ * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
+ * aclocal.m4: Rebuild with new libtool.
+ * configure: Rebuild.
+
+Tue Sep 23 19:03:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (map_sections_to_segments): Even if we are not demand
+ paged, don't put a loadable section after a nonloadable section.
+ (assign_file_positions_for_segments): Increment the file offset
+ for a section with contents, even if it is not loadable.
+
+Sun Sep 21 11:03:24 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_final_link_relocate): Add return code
+ indicating that __ctbp could not be found.
+
+Thu Sep 18 15:04:57 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_check_relocs): Improve error message.
+
+Wed Sep 17 09:54:51 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_final_link_relocate, v850_elf_reloc,
+ v850_elf_check_relocs, v850_elf_reloc_map, v850_elf_howto_table):
+ Add support for the CALLT relocs.
+
+ * reloc.c (COMMENT): Add BFD_RELOC_V850_CALLT_6_7_OFFSET and
+ BFD_RELOC_V850_CALLT_16_16_OFFSET.
+
+ * elf32-v850.c (v850_elf_final_link_relocate): Add checks to catch
+ relocations against non-existant symbols.
+
+Tue Sep 16 14:20:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * reloc.c: Add BFR_RELOC_V850_TDA_16_16_OFFSET.
+
+ * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate,
+ v850_elf_howto_table, v850_elf_reloc_map): Add support for a 16
+ bit reloc in the tiny data area.
+
+Mon Sep 15 11:27:36 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ Merged changes from Martin Hunt:
+
+ * elf32-d30v.c (bfd_elf_d30v_reloc): Change pc-relative relocs
+ over 2^32 bytes to be absolute. Needed because D30V PC doesn't
+ necessarily wrap.
+
+ * reloc.c, elf32-d30v.c (BFD_RELOC_D30V_9_PCREL,
+ BFD_RELOC_D30V_9_PCREL_R): New relocs.
+
+ * elf32-d30v.c (bfd_elf_d30v_reloc_21): New function.
+ Do 15 and 21 bit pc-relative relocations.
+ * reloc.c (BFD_RELOC_D30V_15_PCREL_R, BFD_RELOC_D30V_21_PCREL_R):
+ New relocations.
+
+ * elf32-d30v.c (bfd_elf_d30v_reloc): Addend needs to be
+ added to the relocation, not or'd.
+
+Wed Sep 10 15:17:25 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_reloc): Remove spurious error message.
+
+Wed Sep 10 11:17:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * archures.c (bfd_default_scan): Use strcasecmp.
+ (bfd_default_scan): Test for match with arch_name + ":" +
+ printable_name.
+ (bfd_default_scan): Test for match with printable_name - ":".
+ (bfd_default_scan): Delete w65, h8300, h8500, z8k, i960 special
+ cases. Each implements their own scan function.
+ (bfd_default_scan): Delete 386, 2900, 860, mips 2000, mips 4400
+ special cases. Since info->mach == 0. The test mach == number
+ fails.
+ (bfd_arch_list): New function, return name of all the supported
+ architectures.
+
+Tue Sep 9 10:21:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_print_private_bfd_data): Break after
+ decoding architecture.
+ (v850_elf_reloc): Do not complain if a R_V850_LO16 reloc has bit
+ 15 set.
+
+Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
+
+ * bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
+
+Thu Sep 4 09:44:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add cpu-v850.c.
+ (ALL_MACHINES_CFILES): Add elf32-v850.c.
+ * Makefile.in: Rebuild.
+
+ * reloc.c: Remove extraneous commas from relocation entries.
+ Remove BFD_RELOC_V850_16_PCREL.
+ * bfd-in2.h: Rebuild.
+
+ * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
+ in sections named .tocbss rather than .bss.
+
+Wed Sep 3 11:23:23 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libbfd.h, bfd-in2.h, elf32-v850.c: Removed
+ BFD_RELOC_V850_16_PCREL.
+
+Tue Sep 2 20:44:10 1997 Fred Fish <fnf@cygnus.com>
+
+ * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
+ the same as C_EXT syms.
+ (coff_link_add_symbols): Ditto.
+ (_bfd_coff_link_input_bfd): Ditto.
+ (_bfd_coff_write_task_globals): Add save_global_to_static. Use
+ it to preserve and restore state of global_to_static flag.
+
+Tue Sep 2 17:45:22 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_object_p): Set machine number based on
+ bits in e_flags field rather than magic numbers.
+ (v850_elf_final_write_processing, v850_elf_set_private_flags,
+ v850_elf_copy_private_bfd_data, v850_elf_merge_private_bfd_data,
+ v850_elf_print_private_bfd_data): New functions.
+
+Tue Sep 2 17:43:49 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf.c (prep_headers): Remove V850E magic number.
+ * elf.c (prep_headers): Remove V850EA magic number.
+
+Tue Sep 2 17:35:05 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * cpu-arc.c (arc_get_mach): Properly scan defined mach entries.
+
+Tue Sep 2 18:29:37 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
+ instructions are relative to the next instruction, not the
+ current instruction.
+ (mn10200_elf_relax_section): Similarly.
+
+Tue Sep 2 15:45:45 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-v850.c: Use a macro to construct bfd_arch_info_type
+ entries.
+
+ * reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
+ BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
+ specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
+
+Thu Aug 28 17:01:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * cpu-v850.c: Remove "plain" from v850 printable name.
+ (scan): Use strcasecmp.
+
+ * archures.c (bfd_mach_v850): Define.
+
+ * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
+ just sh/SH, use strcasecmp.
+ (arch_info_struct): Add entries for sh3 et.al.
+
+ * archures.c (bfd_mach_sh, ...): Define.
+
+Wed Aug 27 17:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * archures.c (bfd_archures_list): Always NULL terminate the list.
+
+Tue Aug 26 17:26:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add cpu-arc.c.
+ (ALL_MACHINES_CFILES): Add elf32-arc.c.
+ (elf32-arc.lo): Remove explicit dependency.
+ * Makefile.in: Rebuild.
+
+ * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
+ * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
+ * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
+
+Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
+
+ * configure: Rebuild with latest devo autoconf for NT support
+
+Mon Aug 25 16:11:04 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-arm.c (compatible): If B is a default type, return A.
+
+Mon Aug 25 15:35:46 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-v850.c (scan): New function.
+ (arch_info_struct): New structure.
+ (bfd_v850_arch): Add link into arch_info_structure.
+
+ * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
+ architecture.
+
+ * elf32-v850.c (v850_elf_object_p): New function.
+
+ * archures.c (bfd_mach_v850e): Machine value for v850e.
+
+ * bfd-in2.h (bfd_mach_v850e): Machine value for v850e.
+
+ * elf32-v850.c (ELF_MACHINE_CODE): Default to v850e machine
+ number.
+
+ * elf.c (prep_headers): Add support for v850e machine number.
+
+ * archures.c (bfd_mach_v850ea): Machine value for v850ea.
+
+ * bfd-in2.h (bfd_mach_v850ea): Machine value for v850ea.
+
+ * elf32-v850.c (ELF_MACHINE_CODE): Default to v850ea machine
+ number.
+
+ * elf.c (prep_headers): Add support for v850ea machine number.
+
+Mon Aug 25 14:07:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Clear the
+ cached_stab field if the offset prevents us from using the cache.
+
+Mon Aug 25 12:08:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
+ flags.
+ * aout-arm.c (aout_arm_little_vec): Likewise.
+ (aout_arm_big_vec): Likewise.
+ * bout.c (b_out_vec_big_host): Likewise.
+ (b_out_vec_little_host): Likewise.
+ * mipsbsd.c (aout_mips_little_vec): Likewise.
+ (aout_mips_big_vec): Likewise.
+
+Tue Aug 19 10:09:10 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (COFF_ALIGN_IN_SFLAGS): Define to 1.
+ * coffcode.h (styp_to_sec_flags): Ignore incoming STYP_INFO
+ bit in s_flags if COFF_ALIGN_IN_S_FLAGS is defined.
+
+Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
+ (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
+ * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
+ * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
+ COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
+ of two for I960 only.
+ * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
+ PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
+ default definitions.
+ (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
+ GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
+ (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
+ * Makefile.in (coff-tic80.o): Depends upon coffswap.h.
+ * coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
+ (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
+ * coffcode.h (coff_write_object_contents): Set alignment field in
+ section header for TIC80COFF files.
+
+Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
+ v850_elf_check_relocs, v850_elf_reloc,
+ v850_elf_final_link_relocate): Add support for
+ BFD_RELOC_V850_16_PCREL relocation.
+
+ * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
+ relocation.
+
+ * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
+
+ * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
+
+Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-v850e: New file.
+
+ * elf.c (prep_headers): Add support for v850e target.
+
+ * bfd-in2.h (bfd_architecture): Add support for v850e target.
+
+ * config.bfd: Add support for v850e target.
+
+ * archures.c: Add support for v850e target.
+
+Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-v850ea: New file.
+
+ * elf.c (prep_headers): Add support for v850ea target.
+
+ * bfd-in2.h (bfd_architecture): Add support for v850ea target.
+
+ * config.bfd: Add support for v850ea target.
+
+ * archures.c: Add support for v850ea target.
+
+Fri Aug 15 12:01:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_find_nearest_line): Correctly handle the offset
+ argument as section relative, rather than an absolute address.
+ From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
+
+Fri Aug 15 04:58:02 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.bfd (arc-*-elf*): Add.
+ * configure.in (bfd_elf32_{little,big}arc_vec): Add.
+ * configure: Rebuild.
+ * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
+ (BFD32_BACKENDS): Add elf32-arc.lo.
+ (cpu-arc.lo,elf32-arc.lo): Add rules for.
+ * Makefile.in: Rebuild.
+ * archures.c (architecture list): Add bfd_arch_arc.
+ (bfd_archures_list): Add bfd_arc_arch.
+ (bfd_mach_arc_base): Define.
+ * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
+ * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
+ (bfd_target_vect): Add them.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * cpu-arc.c, elf32-arc.c: New files.
+ * elf.c (pre_headers): Recognize bfd_arch_arc.
+
+Tue Aug 12 11:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
+ data section is correctly rounded to a page in the file.
+
+Mon Aug 11 12:45:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
+ there are no symbols.
+
+Sun Aug 10 14:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
+ file system 14 character limit.
+ * Makefile.am, configure.in: Corresponding changes.
+ * Makefile.in, configure: Rebuild.
+
+Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
+ Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+Wed Aug 6 18:56:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (docdir): Define.
+ * Makefile.in: Rebuild.
+
+Tue Aug 5 23:05:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Rebuild with autoconf 2.12.1.
+
+Mon Aug 4 12:00:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4, configure: Rebuild with new automake patches.
+
+Sun Aug 3 08:15:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-core.c (make_bfd_asection): New function to add a section
+ to the core file bfd.
+ (rs6000coff_core_p): Use make_bfd_asection to add the core file
+ sections.
+ Use BFD routines to seek, read and stat the core file.
+ Handle .data sections from loaded objects and anonymously mmapped
+ regions, these are available in AIX 4 core files.
+
+Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
+ * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
+ copy; use a patches libtool instead.
+ * acmacros.m4: Remove.
+ * Makefile.in, aclocal.m4, configure: Rebuild.
+
+Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: New file, based on old Makefile.in.
+ * acmacros.m4: New file, copied from old aclocal.m4.
+ * acinclude.m4: New file.
+ * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
+ handling; now handled by libtool. Replace AC_CONFIG_HEADER with
+ AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
+ Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
+ .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
+ * acconfig.h: Mention PACKAGE and VERSION.
+ * stamp-h.in: New file.
+ * dep-in.sed: Change .o to .lo.
+ * Makefile.in: Now built with automake.
+ * aclocal.m4: Now built with aclocal.
+ * config.in, configure: Rebuild.
+ * VERSION: Remove.
+
+Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
+ if there is only a relocation to a read-only but not allocatable
+ section (like .stab).
+ * elf32-sparc.c (elf32_sparc_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 (mips_elf_size_dynamic_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+
+ * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
+ (ppc_elf_create_linker_section): These sections are not
+ created by the linker (that is, they are created by the user
+ putting data in them). In particular, they can be the source
+ and target of relocations.
+ (ppc_elf_adjust_dynamic_symbol): Check postcondition of
+ bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
+ objects (for instance, 'long double') to 16-byte boundaries.
+ (ppc_elf_size_dynamic_sections): Make the code that generates
+ section symbols exactly the same as for sparc, reducing the
+ number of section symbols output.
+ (ppc_elf_check_relocs): Check postcondition of
+ bfd_elf32_link_record_dynamic_symbol. Make default case the
+ same as corresponding code for sparc, fixing bug involving
+ .rela.stabs.
+ (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
+ forced to be local because of versioning (by replicating
+ corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
+ as usual in ELF, not as pseudo-REL relocs (as the sparc linker
+ does).
+ (ppc_elf_relocate_section): Add handy debugging code for when
+ assertion fails. Add some more 'symbol made local because of
+ versioning' cases.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
+ processing a GOT relocation as required by ABI.
+
+Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
+ version info if this symbol came from a dynamic object.
+ (elf_link_add_object_symbols): Set the version info of a symbol
+ only if the object actually contains version definitions and
+ defines this symbol.
+
+Mon Jul 28 18:07:43 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
+ * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
+ win32 dependencies.
+ * configure: Regenerated with autoconf 2.12.
+ * doc/Makefile.in: Add $(EXEEXT) to chew executable.
+
+Mon Jul 28 02:50:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
+ a warning rather than returning an error.
+
+Sun Jul 27 19:54:14 1997 Felix Lee <flee@cygnus.com>
+
+ * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
+
+Fri Jul 25 14:50:08 1997 Felix Lee <flee@cygnus.com>
+
+ * cisco-core.c: define signals for wingdb.
+
+Fri Jul 25 16:27:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
+ the same number of aux entries.
+
+Fri Jul 25 08:22:15 1997 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
+ difference of two symbols if the relocation size is 32 bits.
+ (som_write_fixups): Handle R_DATA_EXPR.
+
+Wed Jul 23 16:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
+ its value if COFF_WITH_PE is defined.
+
+Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * coff-stubgo32.c: New file.
+ * go32stub.h: New file.
+ * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
+ * coffswap.h (coff_swap_filehdr_in): Invoke
+ COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
+ are defined.
+ (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
+ COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
+ (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
+ COFF_ADJUST_AUX_IN_POST if they are defined.
+ (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
+ COFF_ADJUST_AUX_OUT_POST if they are defined.
+ (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
+ COFF_ADJUST_SCNHDR_IN_POST if they are defined.
+ (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
+ COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
+ * targets.c (go32stubbedcoff_vec): Declare.
+ (bfd_target_vector): Add go32stubbedcoff_vec.
+ * configure.in (go32coff_vec): New target vector.
+ (go32stubbedcoff_vec): Likewise.
+ * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
+ (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add coff-stubgo32.o.
+ (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
+ (HFILES): Add go32stub.h.
+
+Tue Jul 22 15:09:12 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Check for fdopen.
+ * configure, config.in: Rebuild.
+ * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
+ __GO32__. Reindent a bit.
+
+Sun Jul 20 20:05:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
+ flag for newly created sections.
+ (sunos_add_dynamic_symbols): Don't discard newly created sections
+ if shared library is dynobj.
+
+Mon Jul 14 15:33:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (map_sections_to_segments): When checking whether
+ including a section in a segment would force us to skip a page,
+ align the address of the next segment to avoid wraparound
+ problems.
+
+Tue Jul 8 12:11:29 1997 Fred Fish <fnf@cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): Initialize
+ target id field to TIC80_TARGET_ID.
+ * coffswap.h (coff_swap_filehdr_out): Swap out target id field
+ if used.
+ (coff_swap_filehdr_in): Swap in target id field if used.
+
+Mon Jul 7 16:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_is_local_label_name): New static function
+ if TARGET_UNDERSCORE.
+ (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
+ (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
+
+Mon Jun 30 14:29:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
+ complain_overflow_signed, for 32 bit PC relative relocations.
+
+Thu Jun 26 01:26:31 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): When a version
+ indirection symbol is overridden, make the original symbol point
+ at the real overriding symbol.
+
+ * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
+ string index.
+
+ * elflink.h (elf_link_output_extsym): Use the right section for a
+ common symbol.
+ * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
+ symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
+
+Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * elflink.h (elf_merge_symbols): Resolve indirect and warning
+ symbols before checking for new symbols.
+
+ * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
+
+Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
+ file, not aoutsz bytes (they are different in XCOFF .o files).
+
+ * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
+ redefined by objects included from archives.
+
+Mon Jun 23 18:03:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_merge_symbol): In the case of a new defined
+ symbol overriding an old defined symbol, return the hash table
+ entry which we modify, even if it is the target of an
+ indirection.
+ (elf_link_add_object_symbols): If the real name of the symbol gets
+ overridden, convert the versioned symbol into an indirect symbol
+ to the real symbol.
+
+ * elflink.h (elf_merge_symbol): New static function, broken out of
+ elf_link_add_object_symbols.
+ (elf_link_add_object_symbols): Call it.
+
+Sun Jun 22 19:40:57 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
+ handle case where COFF filehdr does not immediately follow PE
+ header.
+ * coffgen.c (coff_object_p): Remove useless seek to current
+ location.
+
+Wed Jun 18 19:03:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
+ REFC.
+
+Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
+ symbols, skip N_ABS symbols with debugging storage classes.
+
+Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
+ relocs in shared libraries which refer to local symbols. Cope
+ with addend when processing a GOT relocation.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
+ for sections that the linker didn't create.
+ (ppc_elf_finish_dynamic_sections): Only try to write out a section
+ symbol if it was created in ppc_elf_size_dynamic_sections.
+ (ppc_elf_relocate_section): Complain if we have to generate a reloc
+ relative to a section for which we didn't output a symbol.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
+ relocs are 'rela' relocs, like everything else. .rela.plt is not
+ a read-only section, so we don't have to special-case it.
+
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
+ .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
+ (ppc_elf_relocate_section): @got offsets are 4 from start of the
+ actual .got section.
+ * elflink.c (_bfd_elf_create_got_section): The three reserved
+ words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
+ characters, not 4.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Use
+ _bfd_elf_create_got_section to create the GOT rather than
+ ppc_elf_create_linker_section. Create the '.rela.got' section
+ ourselves.
+ (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
+ symbol has a GOT entry.
+ (ppc_elf_relocate_section): Record when a symbol is used through
+ the GOT, and allocate space in the GOT for each such symbol.
+ (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
+ (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
+ stuff.
+
+ * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
+ treated in a similar way to ADDR16_HA relocs.
+ (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
+ shared objects; the linker must deal with them.
+ (ppc_elf_create_linker_section): Stop setting
+ _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
+ LINKER_SECTION_PLT stuff.
+ (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
+ (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
+ section, not ELF-specific calls.
+ (elf_backend_plt_not_loaded): Set to 1.
+ (elf_backend_got_symbol_offset): Set to 4.
+ * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
+ for when ld.so fills in the PLT; and 'got_symbol_offset' member.
+ * elflink.c (_bfd_elf_create_dynamic_sections): Apply
+ plt_not_loaded member.
+ (_bfd_elf_create_got_section): Apply got_symbol_offset.
+ * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
+ 'loaded'.
+ (elf_backend_G_O_T_offset): Set default to 0.
+ (elfNN_bed): Set added fields.
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
+ DT_RELENT in shared objects; should be DT_RELAENT.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Propagate
+ R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
+ such a reloc (in a non-shared object) refers to a symbol that's
+ not defined.
+
+Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * elfcode.h (put_signed_word): Define.
+ (get_signed_word): Define.
+ (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
+ (elf_swap_reloca_out): Use put_signed_word for the r_addend
+ field.
+ * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
+ bfd_get_signed_32 to set the r_addend field.
+ * elf64-mips.c (mips_elf64_swap_reloca_in): Use
+ bfd_h_get_signed_64 to set the r_addend field.
+
+Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): When generating a
+ shared library, do the relocation if the input section is not
+ allocated in memory.
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
+ elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
+ (elf_fix_symbol_flags): New static function, broken out of
+ elf_adjust_dynamic_symbol.
+ (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
+ (elf_link_assign_sym_version): Likewise. Permit a symbol to be
+ forced local even if NEEDS_PLT is set. When forcing a symbol to
+ be local, clear NEEDS_PLT.
+ (elf_link_output_extsym): Remove unused local bed.
+
+Wed Jun 11 22:44:20 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
+ for derived elf linker hash table entries. References to
+ elf_link_hash_entry changed appropriately.
+ (elf32_mn10300_link_hash_table): New structure for derived elf
+ linker hash table.
+ (elf32_mn10300_hash_table): Define.
+ (elf32_mn10300_link_hash_traverse): Likewise.
+ (elf32_mn10300_link_hash_newfunc): New function.
+ (elf32_mn10300_link_hash_table_create): Likewise.
+ (elf32_mn10300_finish_hash_table_entry): Likewise.
+ (mn10300_elf_relax_section): Handle "call" -> "calls", removal
+ of prologue code, and call:32->call:16 relaxing.
+ (compute_function_info: New function.
+ (bfd_elf32_bfd_ilink_hash_table_create): Define.
+
+Wed Jun 11 00:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
+ for a symbol which is being forced to be local.
+ * elf32-i386.c (elf_i386_relocate_section): Write out the
+ relocation value for a GOT reloc for a symbol which is turning
+ into a local symbol.
+ (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
+ local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
+ reloc.
+ * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
+
+ * elf32-i386.c (elf_i386_relocate_section): Get the relocation
+ value if the symbol is turning into a local symbol.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+1997-06-10 22:58 Ulrich Drepper <drepper@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Also read verneed
+ information by calling `_bfd_elf_slurp_version_tables'.
+ (elf_link_add_object_symbols): For undefined symbols look for
+ version information in the verneed records.
+ (elf_link_add_object_symbols): Use soname of shared object
+ for verneed record if it is available.
+
+Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * cpu-arm.c: Add prototypes for compatible and scan.
+ * cofflink.c: Add prototype for mark_relocs.
+
+ * archive.c (bfd_special_undocumented_glue): Change filename to
+ const pointer. Add prototype.
+
+Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elflink.h (elf_link_add_object_symbols): Ignore relocations of
+ sections that will be discarded.
+
+1997-06-06 22:58 Ulrich Drepper <drepper@cygnus.com>
+
+ * elflink.h (elf_link_find_version_dependencies): When searching
+ for known version symbol skip non-matching verdef records, not
+ matching records.
+
+Thu Jun 5 15:52:45 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
+ not a bfd_vma, to the base file, to match how dlltool reads it.
+
+Tue Jun 3 16:57:45 1997 Nick Clifton <nickc@cygnus.com>
+
+ * reloc.c: Add thumb relocations.
+
+ * bfd-in2.h: Add Thumb relocations.
+
+ * libbfd.h: Add Thumb relocations.
+
+Mon Jun 2 10:41:52 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
+
+Fri May 30 12:46:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
+ for a section even if it is not loaded.
+
+ * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
+ section VMA.
+ (_bfd_coff_link_input_bfd): Separate section VMA handling for
+ input and output files.
+ (_bfd_coff_generic_relocate_section): Check whether input file,
+ not output file, is a PE file.
+
+Wed May 28 15:48:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
+
+Wed May 28 16:16:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
+ R_IMAGEBASE reloc.
+
+Wed May 28 09:48:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-arm.c (compatible): Add test for supersets of ARM
+ architectures.
+
+Tue May 27 19:42:03 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
+ member.
+
+Tue May 27 14:34:08 1997 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
+ called directly by gas/config/tc-arm.c.
+
+Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
+ (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
+
+Mon May 26 14:05:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
+ section VMA.
+
+Mon May 26 10:57:48 1997 Fred Fish <fnf@cygnus.com>
+
+ * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
+ (coff_bfd_copy_private_bfd_data): Ditto.
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
+ (coff_arm_bfd_print_private_bfd_data): Ditto.
+ (coff_arm_bfd_set_private_flags): Ditto.
+ (coff_arm_bfd_copy_private_bfd_data): Ditto.
+
+Fri May 23 15:14:58 1997 Fred Fish <fnf@cygnus.com>
+
+ * libcoff-in.h (struct coff_final_link_info): Add boolean
+ global_to_static member for support of task linking.
+ (_bfd_coff_write_task_globals): Add prototype.
+ * libcoff.h: Regenerate.
+ * coffcode.h (coff_write_object_contents): Use #ifdef to
+ check RS6000COFF_C, to be consistent with all other uses
+ in this file.
+ * cofflink.c (_bfd_coff_final_link): If doing task linking,
+ call _bfd_coff_write_task_globals.
+ (_bfd_coff_link_input_bfd): If doing task linking, convert
+ global functions to static.
+ (_bfd_coff_write_global_sym): If doing task linking, convert
+ global variables to static.
+ (_bfd_coff_write_task_globals): New function.
+ * coff-tic80.c (TIC80COFF): Define this instead of just TIC80.
+ (C_AUTOARG): #undef since it clashes with C_UEXT.
+ (C_LASTENT): #undef since it clashes with C_STATLAB.
+ * coffcode.h (coff_write_object_contents): Use TIC80COFF
+ rather than TIC80.
+ (coff_slurp_symbol_table): Use C_SYSTEM. Hide C_AUTOARG use
+ when TIC80COFF defined (clashes with C_UEXT). Explicitly
+ recognize C_UEXT, C_STATLAB, and C_EXTLAB as unsupported.
+
+Fri May 23 12:38:24 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-tic80.c (tic80_howto_table): Change overflow check for most
+ PP relocations to complain_overflow_dont.
+
+Thu May 22 20:22:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-tic80.c (tic80_howto_table): Add PP relocations. Change
+ name of R_RELLONG to "RELLONG". Set rightshift and complain for
+ M_PPCR.
+ (ppbase_reloc, glob15_reloc): New static functions.
+ (glob16_reloc, local16_reloc): New static functions.
+ (rtype2howto): Handle all relocation types.
+ (coff_tic80_relocate_section): New static function.
+ (coff_relocate_section): Define to coff_tic80_relocate_section.
+ * Makefile.in (coff-tic80.o): Depends upon include/coff/tic80.h.
+
+Wed May 21 17:15:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
+ COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
+ value.
+ * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
+ callers. If PE file, don't add section VMA.
+ (coff_write_alien_symbol): If PE file, don't add section VMA.
+ * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
+ (_bfd_coff_write_global_sym): Likewise.
+ (_bfd_coff_generic_relocate_section): Likewise.
+
+ * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
+ is 64 bits.
+
+Wed May 21 09:58:10 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cofflink.c (mark_relocs): Add new function to mark symbols which
+ are used by relocations.
+ (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
+ suppress the skipping of symbols that have thus been marked.
+
+Tue May 20 18:45:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (sh_merge_private_data): New static function.
+ (coff_bfd_merge_private_bfd_data): Define.
+
+Mon May 19 14:46:00 1997 Mark Alexander <marka@cygnus.com>
+
+ * coff-tic80.c: Remove unnecessary #ifdefs.
+ * config.bfd: Set targ_underscore to yes for tic80.
+
+Mon May 19 14:26:36 1997 Mark Alexander <marka@cygnus.com>
+
+ * coff-tic80.c (NAMES_HAVE_UNDERSCORE): Define (fixes problem
+ with unresolved external symbols in GDB).
+
+Fri May 16 10:23:03 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-m10300.c (elf32_mn10300_relax_section): Read in all
+ the symbols associated with each BFD.
+ (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
+ more than once.
+ * elf-m10200.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-sh.c: Likewise.
+
+Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Don't decrease the
+ alignment of a common symbol. If two symbols that look like
+ common symbols are found in two shared libraries, and the size is
+ different, use the larger size, and warn if --warn-common. If a
+ common symbol overrides a definition in a shared library, set the
+ size to the larger size, and warn if --warn-common.
+
+Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-arm.c (compatible): Allow default machine to be polymorphed
+ into any other machine type.
+
+ * coffcode.h (coff_set_flags): Initialise flags variable to 0.
+
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
+ data into an unitialised destination set its machine type as well.
+
+Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
+ to common symbol size. Consistently treat uninitialized symbols
+ in shared objects as common symbols.
+
+Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * archures.c (constants): Added new constants to identify the
+ type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
+ bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
+
+ * bfd-in2.h (constants): Added new constants to identify
+ the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
+ bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
+ bfd_mach_arm_4T. This file is auto-magically generated from the
+ archures.c file. This update is just to save work.
+
+ * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
+ coff_arm_bfd_print_private_bfd_data,
+ coff_arm_bfd_set_private_flags,
+ coff_arm_bfd_copy_private_bfd_data): Added these new functions.
+ (global): Macro redefinitions set up to use these new functions.
+
+ * coffcode.h (coff_mkobject_hook): Added call to
+ coff_arm_bfd_set_private_flags().
+ (coff_set_arch_mach_hook): Added code to set machine type based on
+ bits stored in internal flags.
+ (coff_set_flags): Added code to set the new bits in the flags
+ field based on the machine number.
+ (function definition macros): Made all function definition macros
+ conditional so that they can be overridden by target specific
+ files.
+
+ * cpu-arm.c (compatible): Added this function. (arch_info_struct):
+ Structure extended to include new types, one each for ARMv2,
+ ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
+
+ * libcoff-in.h (struct coff_tdata): Added flags field.
+
+Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
+
+ * config.bfd: Change #if 0 around uses of host_aout_vec to #if
+ HAVE_host_aout_vec.
+
+Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
+
+ * coffgen.c (coff_find_nearest_line): If there are no syments,
+ just return false.
+
+Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
+
+ * config.bfd: cope with '*-*-linux-gnuaout' targets.
+
+Thu May 1 11:31:12 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * targmatch.sed: Add explicit \n characters to work around bug in
+ HP/UX 10.20 sed program.
+
+Wed Apr 30 12:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
+ extension problems.
+
+Tue Apr 22 12:06:08 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
+
+Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf32-m68k.c: Follow the last changes in elf32-i386.c:
+ (struct elf_m68k_pcrel_relocs_copied, struct
+ elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
+ elf_m68k_link_hash_traverse, elf_m68k_hash_table,
+ elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
+ elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
+ New definitions.
+ (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
+ PC relative relocs for a global symbol defined in a regular
+ object, and count the number of PC relative relocs copied for any
+ global symbol.
+ (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
+ traverse with elf_m68k_discard_copies.
+
+Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
+ relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
+
+ * coffcode.h (coff_compute_section_file_positions): Force the
+ potential last byte in the file to be written out when
+ COFF_IMAGE_WITH_PE.
+
+Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
+
+ * configure.host (mips*-*-openbsd*): New host.
+
+Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Only subtract the
+ section VMA from the symbol value if this is a fully linked file.
+
+ * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
+ (struct elf_i386_link_hash_entry): Define.
+ (struct elf_i386_link_hash_table): Define.
+ (elf_i386_link_hash_traverse): Define.
+ (elf_i386_hash_table): Define.
+ (elf_i386_link_hash_newfunc): New static function.
+ (elf_i386_link_hash_table_create): New static function.
+ (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
+ PC relative relocs for a global symbol defined in a regular
+ object, and count the number of PC relative relocs copied for any
+ global symbol.
+ (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
+ traverse with elf_i386_discard_copies.
+ (elf_i386_discard_copies): New static function.
+ (bfd_elf32_bfd_link_hash_table_create): Define.
+
+ From Gordon W. Ross <gwr@mc.com>:
+ * aoutf1.h (MY_entry_is_text_address): Define if not defined.
+ (sunos4_aout_backend): Use MY_entry_is_text_address.
+
+Wed Apr 16 12:43:32 1997 Martin Hunt <hunt@cygnus.com>
+
+ * elf32-d30v.c (elf_d30v_howto_table): Changed size of
+ R_D30V_32_NORMAL to 2 (4 bytes).
+
+Wed Apr 16 14:02:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Gordon W. Ross <gwr@mc.com>:
+ * netbsd.h (N_SHARED_LIB): Define.
+ (SEGMENT_SIZE): Don't define.
+ * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
+ April 11).
+ * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
+ (SEGMENT_SIZE): Don't define.
+
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
+ to sizeof Rela structure, not sizeof Rel structure. From Gary
+ Thomas <g.thomas@opengroup.org>.
+
+Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aout-target.h (MY(callback)): If entry_is_text_address, adjust
+ whenever entry is larger than text address, but only by whole
+ pages. From Gordon W. Ross <gwr@mc.com>.
+
+ * Makefile.in (install): Depend upon installdirs. Use
+ mkinstalldirs to build $(oldincludedir).
+ (installdirs): New target.
+
+ * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
+ if this is a debugging section which we are stripping.
+
+Mon Apr 14 12:39:30 1997 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (elf64_alpha_object_p): Allocate the
+ alpha-specific target data struct.
+
+Mon Apr 14 11:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Thomas Graichen <graichen@rzpd.de>:
+ * Makefile.in: Always use $(SHELL) when running move-if-change.
+ * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
+ * configure: Rebuild.
+
+Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_slurp_symbol_table): Only subtract the section
+ VMA if this is an executable file or a shared object.
+
+ * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
+ <gwr@mc.com>.
+
+ * libaout.h (struct aout_backend_data): Add entry_is_text_address
+ field.
+ * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
+ start of the file. Remove uses later on which switch using
+ ifdef.
+ (MY(callback)): Handle entry_is_text_address.
+ (MY_entry_is_text_address): Define if not defined.
+ (MY(backend_data)): Initialize new field.
+ * aoutf1.h (sunos4_aout_backend): Likewise.
+ * i386aout.c (MY(backend_data)): Likewise.
+ * i386mach3.c (MY(backend_data)): Likewise.
+ * mipsbsd.c (MY(backend_data)): Likewise.
+ * sparclynx.c (sparclynx_aout_backend): Likewise.
+ * netbsd.h (SEGMENT_SIZE): Define if not defined.
+ (MY_entry_is_text_address): Define.
+ * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
+
+ * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
+ whose name starts with `.'.
+
+Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
+
+ * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
+ mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
+ powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
+ * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
+ m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
+ sparc-*-openbsd*): New targets.
+ * configure: Rebuild.
+
+Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
+
+ * stabs.c (struct stab_section_info): New field
+ `cumulative_skips'.
+ (_bfd_link_section_stabs): Fill the above array.
+ (_bfd_stab_section_offset): Use `cumulative_skips' to
+ speed up offset calculation.
+
+Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
+ addend for non pc-relative relocations.
+
+ * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
+ for non-existent function.
+
+ * elf-m10300.c (mn10300_elf_relax_section): New function.
+ (mn10300_elf_relax_delete_bytes): Likewise.
+ (mn10300_elf_symbol_address_p): Likewise.
+ (mn10300_elf_get_relocated_section_contents): Likewise.
+ (bfd_elf32_bfd_relax_section): Define.
+ (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
+
+Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Set SHLIB_LIBS.
+ * configure.in: Substitute SHLIB_LIBS.
+ * configure: Rebuild.
+ * Makefile.in (SHLIB_LIBS): New variable.
+ ($(SHLIB)): Use $(SHLIB_LIBS).
+
+Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
+ with bfd_section_vma.
+
+Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
+ Correct CPU file names for mn10[23]00.
+ * configure: Rebuild.
+
+ * bfd.c (bfd_record_phdr): Cast count to size_t before
+ subtraction.
+
+ * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
+ * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
+ (xcoff_write_archive_contents): LIkewise.
+ * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
+ (mips_elf_create_procedure_table): Likewise.
+ * peicode.h (pe_print_idata): Likewise.
+ (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
+ * xcofflink.c (xcoff_get_section_contents): Likewise.
+ (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
+ (xcoff_link_add_symbols): Likewise.
+ (xcoff_link_add_symbols): Likewise.
+
+ * ppcboot.c (ppcboot_set_arch_mach): Make static.
+ (ppcboot_bfd_print_private_bfd_data): Likewise.
+
+ * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
+ to complain_overflow_signed.
+
+Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * VERSION: Set to 2.8.1.
+
+ * Branched binutils 2.8.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
+ deciding whether to copy a reloc into a shared object.
+ (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
+ relocs in unallocated sections.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
+ R_SPARC_RELATIVE relocs in unallocated sections.
+
+Wed Apr 2 16:19:41 1997 Mike Meissner <meissner@cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
+ always create got section so that the _GLOBAL_OFFSET_TABLE_ label
+ is always created.
+
+Wed Apr 2 10:49:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Let a common symbol
+ override an uninitialized symbol from a shared library with a
+ smaller size.
+
+ * elf-m10200.c: Rename from elf32-mn10200.c.
+ * elf-m10300.c: Rename from elf32-mn10300.c.
+ * cpu-m10200.c: Rename from cpu-mn10200.c
+ * cpu-m10300.c: Rename from cpu-mn10300.c
+ * Makefile.in: Update accordingly.
+
+ * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
+ (elf_mips_isa): Move to earlier in file.
+ (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
+ (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
+ specially.
+
+ * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
+ calling abort.
+
+Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * configure.com: New file.
+ * config.h-vms: Remove file.
+ * makefile.vms: Update for new configure scheme.
+
+Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * libcoff-in.h (ppc_allocate_toc_section): Declare.
+ (ppc_process_before_allocation): Declare.
+ * libcoff.h: Rebuild.
+
+ * coffcode.h (coff_mkobject_hook): Declare if not a macro.
+
+Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
+
+Mon Mar 31 16:11:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
+ symbol index for a R_IHCONST reloc.
+
+Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * targmatch.sed: Do not use \(\) recursively.
+
+Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * m68klinux.c (MACHTYPE_OK): Define.
+ * i386linux.c (MACHTYPE_OK): Define.
+
+Fri Mar 28 11:56:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
+ <hjl@gnu.ai.mit.edu>:
+ * sparclinux.c: New file.
+ * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
+ * bfd-in2.h: Rebuild.
+ * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
+ * configure.in (sparclinux_vec): Add to list of vectors.
+ * configure: Rebuild.
+ * targets.c (sparclinux_vec): Declare.
+ (bfd_target_vector): Add sparclinux_vec.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add sparclinux.o.
+ (BFD32_BACKENDS_CFILES): Add sparclinux.c.
+
+ * coff-mips.c (mips_ecoff_backend_data): Initialize new
+ bfd_coff_backend_data field.
+ * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
+
+ * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
+ for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
+ <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
+
+ * bfd.c: Include "libiberty.h".
+ (strerror): Don't declare.
+ (bfd_errmsg): Call xstrerror rather than strerror.
+
+Thu Mar 27 12:55:42 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
+ reloc even if the symbol is in the .bss section.
+ * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
+
+ * coffcode.h (bfd_coff_backend_data): Add new field
+ _bfd_coff_default_section_alignment_power.
+ (bfd_coff_default_section_alignment_power): Define.
+ (bfd_coff_std_swap_table): Initialize new field.
+ * libcoff.h: Rebuild.
+ * cofflink.c (coff_link_add_symbols): Limit alignment of a common
+ symbol to the default section alignment.
+
+ * COPYING: Update FSF address.
+
+Thu Mar 27 00:45:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
+ 21-bit absolute that made it act as a relative.
+
+Wed Mar 26 14:50:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.c (_bfd_elf_create_linker_section): Don't set
+ bss_section and rel_section from existing sections.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
+ if it is needed.
+
+Tue Mar 25 22:26:56 1997 Stu Grossman (grossman@critters.cygnus.com)
+
+ * aoutx.h (some_aout_object_p): Change executable test to fix
+ problems with embedded a.out systems.
+
+Tue Mar 25 14:35:37 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * stabs.c (_bfd_stab_section_offset): New function.
+ * libbfd-in.h (_bfd_stab_section_offset): Declare.
+ * libbfd.h: Rebuild.
+ * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
+ stab reloc.
+ * 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.
+
+ * stabs.c (_bfd_link_section_stabs): Copy over the first header
+ symbol. Check for memory allocation failure of *psinfo.
+ (_bfd_write_section_stabs): Add psinfo parameter. Change all
+ callers. Set the value of the header symbol.
+ * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
+ * libbfd.h: Rebuild.
+
+Mon Mar 24 20:07:29 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
+ (rtype2howto): Handle R_ABS reloc type. Also abort on unhandled
+ reloc types, rather than silently failing to generate an output file.
+
+Mon Mar 24 13:41:00 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * targmatch.sed: Use the hold space to put the #ifdef around the
+ the string constant.
+ * targets.c (UNSUPPORTED_TARGET): Don't define.
+ (find_target): Don't check for UNSUPPORTED_TARGET.
+ (bfd_set_default_target): Don't try to optimize by checking for
+ default.
+
+ * Makefile.in: Rebuild dependencies.
+ (ALL_MACHINES_CFILES): Add cpu-m32r.c.
+ (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
+ (elf32-m32r.o): Remove explicit target.
+
+ * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
+ i[3456]86-*-linux*.
+
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
+ count section symbols for sections that were created by the
+ linker, or are not allocatable or not loadable.
+ (elf32_sparc_finish_dynamic_sections): Output output section
+ symbols for section for which we made space for them.
+
+Fri Mar 21 13:08:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
+ no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
+
+Fri Mar 21 12:36:46 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
+ (m32r_hi16_list): New static local.
+ (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
+ (m32r_elf_do_hi16_reloc): Delete.
+ (m32r_elf_relocate_hi16): New function.
+ (m32r_elf_lo16_reloc): New function.
+ (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
+ LO16 reloc.
+
+ Mon Mar 10 16:03:31 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
+ (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
+ (m32r_elf_final_sda_base): New function.
+ (m32r_elf_relocate_section): Rewrite sdata support.
+ (m32r_elf_finish_dynamic_sections): Delete.
+
+Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
+ * coff-svm68k.c: New file. Just defines some macros and includes
+ coff-m68k.c.
+ * coff-m68k.c: Add functions to handle common addends, moved in
+ from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
+ Control whether relocs are visible using STATIC_RELOCS.
+ * cf-m68klynx.c: Simplify greatly: just define macros to control
+ coff-m68k.c.
+ * coff-aux.c: Likewise. Just leave add_one_symbol routine.
+ * targets. (m68ksysvcoff_vec): Declare.
+ (bfd_target_vector): Add m68ksysvcoff_vec.
+ * config.bfd (m68*-motorola-sysv*): New target.
+ * configure.in (m68ksysvcoff_vec): New vector.
+ * configure: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add coff-svm68k.o.
+ (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
+
+ * binary.c (binary_set_section_contents): Don't get misled if the
+ first section is not loadable. From Matthew L. Martin
+ <mlm@xedia.com>.
+
+ * elflink.h (elf_bfd_final_link): Set the value of a section
+ symbol to the section address unless doing a relocateable link.
+
+Tue Mar 18 23:03:17 1997 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
+ .plt entry if we've taken the function's address.
+ (elf64_alpha_merge_gots): Merge collected flags info as well.
+
+Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
+
+ * Many files: Add function prototypes.
+ * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
+ * ecofflink.c: Include "libcoff.h" and "libecoff.h".
+ * elf32-ppc.c (ppc_elf_fake_sections): Make static.
+ * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
+ * peicode.h: Change several void * parameters to PTR.
+ * srec.c (srec_get_symbol_info): Make static.
+ * syms.c (bfd_symbol_is_absolute): Remove.
+ * Makefile.in: Rebuild dependencies.
+
+Tue Mar 18 12:58:08 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
+ (bfd_elf32_bfd_is_local_label): Don't define.
+
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
+ than malloc.
+
+Mon Mar 17 11:32:53 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd-in.h: Don't include obstack.h.
+ (struct bfd_hash_table): Change memory field to PTR.
+ * bfd.c (struct _bfd): Change memory field to PTR.
+ * bfd-in2.h: Rebuild.
+ * libbfd-in.h (bfd_release): Declare as function, don't define as
+ macro.
+ * libbfd.h: Rebuild.
+ * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
+ objalloc routines rather than obstack routines.
+ (obstack_chunk_alloc, obstack_chunk_free): Don't define.
+ (getpagesize): Don't define.
+ (_bfd_new_bfd): Don't set _bfd_chunksize.
+ (bfd_openr): Free new bfd and objalloc on failure.
+ (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
+ (bfd_alloc_size): Remove.
+ (bfd_release): New function.
+ * hash.c: Include "objalloc.h" rather than "obstack.h". Use
+ objalloc routines rather than obstack routines.
+ (obstack_chunk_alloc, obstack_chunk_free): Don't define.
+ * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
+ objalloc routines rather than obstack routines.
+ (obstack_chunk_alloc, obstack_chunk_free): Don't define.
+ (struct accumulate): Change memory to struct objalloc *.
+ * liboasys.h (oasys_data_type): Remove oasys_obstack field.
+ * dep-in.sed: Don't remove obstack.h from dependency list.
+ * Makefile.in: Rebuild dependencies.
+ (BFD_H_DEPS): Remove obstack.h.
+ (install): Don't install obstack.h.
+ * Many files: Don't include "obstack.h".
+ * VERSION: Bump.
+
+ * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
+ * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
+ * libbfd.h: Rebuild.
+ * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
+ * sunos.c (sunos_add_dynamic_symbols): Likewise.
+ * srec.c (srec_scan): Rewrite to not use obstack_1grow.
+
+ * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
+ old version of bfd_alloc.
+ * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
+ * libbfd.h: Rebuild.
+ * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
+
+Sat Mar 15 15:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
+ ELF local label syntax as well.
+
+Sat Mar 15 10:16:42 1997 Fred Fish <fnf@cygnus.com>
+
+ * config.bfd (powerpc-*-beos*): New target.
+ * configure.in (powerpc-*-beos*): Add case that explicitly
+ does not set COREFILE for now. A future BeOS version is
+ expected to support core files.
+ * configure: Regenerate with autoconf.
+
+Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
+ seen with a local symbol, rather than crashing.
+
+ * elfcode.h (elf_slurp_symbol_table): Don't try to read the
+ version symbols if there aren't any.
+
+Thu Mar 13 16:38:30 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (coff_rtype_to_howto): Define
+ (coff_tic80_rtype_to_howto): Clone generic coff version and
+ add code to handle the funky TI "internal relocations".
+
+Thu Mar 13 14:08:53 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Don't warn about type
+ or size changes because of a weak symbol.
+
+ * cisco-core.c (SIGEMT): Define if not defined.
+
+Wed Mar 12 21:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Use extsymoff when
+ setting ever. Sanity check the version number. Sort out copying
+ flags and other information when adding an indirect symbol.
+ (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
+ symbols added by the backend. Clear the entire contents of the
+ versym section.
+ (elf_export_symbol): Ignore indirect symbols.
+ (elf_link_output_extsym): Accept a section without an owner in an
+ assert.
+ * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
+ version count. Correct the allocation of x_versymp.
+
+ * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
+ the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
+ Don't return bfd_und_section_ptr when info->shared.
+ (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
+ (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
+ (mips_elf_check_relocs): Resolve an indirect symbol in
+ sym_hashes.
+ (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
+ SHN_MIPS_TEXT or SHN_MIPS_DATA.
+
+ * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
+
+Tue Mar 11 01:38:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Eric Youngdale <eric@andante.jic.com>:
+ * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
+ * elf.c (bfd_elf_print_symbol): Correct errors in last change.
+ * elflink.h (elf_link_add_object_symbols): Handle cases in which a
+ versioned symbol appears in both a regular and a shared object.
+ (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
+ appropriate. Improve error message.
+ (struct elf_outext_info): Rename from elf_finfo_failed. Change
+ all uses. Add localsyms field.
+ (elf_bfd_final_link): When generating a shared library, call
+ elf_link_output_extsym to output all local symbols.
+ (elf_link_output_extsym): Handle symbols which were forced to
+ become local.
+
+Sun Mar 9 23:08:49 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Eric Youngdale <eric@andante.jic.com>:
+ * elf-bfd.h (elf_symbol_type): Add version field.
+ * elfcode.h (elf_slurp_symbol_table): Set version field.
+ * elflink.h (elf_link_add_object_symbols): When creating an
+ indirect symbol for a default version symbol, set DEF_DYNAMIC if
+ appropriate. Set up an indirection from the nondefault version of
+ the symbol as well.
+ (NAME(bfd_elf,size_dynamic_sections)): Call
+ elf_link_assign_sym_version before checking whether there are any
+ versions. Always record the version name as a dynamic symbol.
+ Initialize counters.
+ (elf_link_assign_sym_version): After finding a version, see if a
+ symbol should be forced to local scope. Create a new version
+ definition if appropriate.
+ (elf_link_output_extsym): Correct indirect symbol handling.
+ * elf.c (bfd_elf_print_symbol): Print version information.
+ (bfd_section_from_shdr): Turn version sections into BFD sections.
+ (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
+ if sh_info is not already set.
+ (_bfd_elf_copy_private_section_data): Copy sh_info for version
+ sections.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
+ _bfd_stringtab_add to copy the name into permanent memory if
+ appropriate.
+
+Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
+
+Fri Mar 7 10:37:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (bfd_coff_backend_data): Change
+ _bfd_coff_compute_section_file_positions to return a boolean
+ value. Change all callers.
+ (coff_compute_section_file_positions): Change return type to
+ boolean. If the size of the last section changed, then output a
+ zero byte at the end of the file.
+ * libcoff.h: Rebuild.
+
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
+ for at least 6 output symbols.
+ (xcoff_write_global_symbol): When emitting TOC entry relocs, also
+ emit a TC csect to represent the space they take up. For an XO
+ symbol, just emit a reference, not a csect.
+
+ * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
+ Solaris doesn't like the combined options, and the -f is
+ unnecessary.
+ (stamp-tshlink, install): Likewise.
+
+ * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
+ handling when little endian.
+
+Thu Mar 6 13:51:51 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
+ (mn10300_elf_relocate_section): Likewise.
+ (elf_backend_relocate_section): Define.
+
+ * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
+ relocs. Replace them with generic PCREL_{8,16,32} relocs.
+ (elf32_mn10300_howto_table): Likewise.
+ (elf32_mn10300_reloc_map): Likewise.
+ (bfd_elf32_mn10300_reloc): Delete unused function.
+
+Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (rtype2howto): If passed a relocation type we don't
+ understand, just set the howto field to NULL, and the caller will
+ print an appropriate error message.
+ * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
+ code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
+ block. Use NULL for initializations of "ptr" rather than bare 0.
+ * coff-h8300.c: Fix typo in comment.
+ * coff-h8500.c: Ditto.
+ * coff-w65.c: Ditto
+ * coff-z8k.c: Ditto.
+
+Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
+ (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
+ m32r_elf_get_relocated_section_contents): First pass at relax support.
+
+Mon Mar 3 13:27:09 1997 Ulrich Drepper <drepper@rtl.cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Use correct sh_size
+ entry for reading verdef records.
+ Use correct braces for computing increments of extverdaux and
+ exteverdef record pointers.
+
+Sun Mar 2 22:47:54 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
+ instead of 4.
+
+Sun Mar 2 16:25:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_find_version_dependencies): Check that
+ DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
+ set.
+
+Fri Feb 28 16:52:40 1997 Fred Fish <fnf@cygnus.com>
+
+ * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
+
+Fri Feb 28 15:06:45 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * targets.c (bfd_default_vector): Make non-const.
+ (find_target): New static function, broken out of
+ bfd_find_target.
+ (bfd_set_default_target): New function.
+ (bfd_find_target): Call find_target. When defaulting, use
+ bfd_default_vector[0] if it is not NULL.
+ * libbfd-in.h (bfd_default_vector): Adjust declaration.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+ * syms.c (bfd_is_local_label): Return false if the symbol has no
+ name.
+ * coff-i960.c (coff_i960_is_local_label_name): New function.
+ (coff_bfd_is_local_label_name): Define.
+ * coff-m68k.c (m68k_coff_is_local_label_name): New function.
+ (coff_bfd_is_local_label_name): Define.
+ * coff-rs6000.c (xcoff_is_local_label_name): New function.
+ (coff_bfd_is_local_label_name): Define.
+ * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
+ with .. or _.L_ as local.
+ * elf32-i386.c (elf_i386_is_local_label_name): New function.
+ (bfd_elf32_bfd_is_local_label_name): Define.
+ * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
+ beginning with $ as local.
+
+Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
+ rather than comparing against info->lprefix.
+ * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
+ * elflink.h (elf_link_input_bfd): Likewise.
+ * linker.c (_bfd_generic_link_output_symbols): Likewise.
+ * xcofflink.c (xcoff_link_input_bfd): Likewise.
+
+ * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
+ _bfd_elf_is_local_label_name if not already defined.
+ * elf.c (_bfd_elf_is_local_label_name): New function.
+ * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
+
+ * coff-m88k.c (coff_bfd_is_local_label_name): Define.
+ (m88k_is_local_label_name): New static function.
+
+ * coffcode.h (coff_bfd_is_local_label_name): Define as
+ _bfd_coff_is_local_label_name if not already defined.
+ * coffgen.c (_bfd_coff_is_local_label_name): New function.
+ * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
+ * libcoff.h: Rebuild.
+
+ * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
+ to _bfd_is_local_label_name.
+ (bfd_target): Likewise.
+ * syms.c (bfd_is_local_label): Define as function, not macro.
+ (bfd_is_local_name): Define.
+ * libbfd.c (bfd_generic_is_local_label_name): Rename from
+ bfd_generic_is_local_label, and take a string rather than a
+ symbol.
+ * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
+ (_bfd_nosymbols_bfd_is_local_label_name): Define.
+ (bfd_generic_is_local_label): Don't declare.
+ (bfd_generic_is_local_label_name): Declare.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * All backends: Change local_label to local_label_name.
+
+ * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
+ (mips_elf_relocate_got_local): Change return type to boolean.
+ Don't assume that the first zero entry is unassigned; instead, use
+ assigned_gotno.
+ (mips_elf_relocate_section): Check return value of
+ mips_elf_relocate_got_local.
+ (mips_elf_create_got_section): Initialize assigned_gotno field.
+
+Wed Feb 26 15:19:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
+ relocations.
+
+Wed Feb 26 13:33:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
+ that have no contents merely because linker_mark is not set.
+
+Tue Feb 25 18:51:35 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config.bfd (mips*-*-lnews*): New target.
+ * coff-mips.c (mips_relocate_section): Make assert compare
+ content byteorder instead of header byteorder.
+ (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
+ data.
+ * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
+ * configure.in (ecoff_biglittle_vec): Add case.
+ * configure: Update.
+
+Tue Feb 25 00:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
+ name begins with ".note".
+ (map_sections_to_segments): Add a PT_NOTE segment for any loadable
+ section whose name begins with ".note".
+ (get_program_header_size): Corresponding change.
+
+ * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
+ jal and for jal overflow.
+
+Mon Feb 24 17:53:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Eric Youngdale <eric@andante.jic.com>:
+ * elflink.h (elf_link_add_archive_symbols): If a default symbol is
+ not found, try looking it up again without the version name.
+ (elf_link_add_object_symbols): Always link against the dynamic
+ symbol table of a dynamic object. When linking against a dynamic
+ object, include version strings in symbol names, and set up
+ version information. Add indirect symbols for default versions.
+ (elf_link_create_dynamic_sections): Add special version sections.
+ (struct elf_assign_sym_version_info): Define.
+ (struct elf_find_verdep_info): Define.
+ (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
+ up version sections.
+ (elf_adjust_dynamic_symbol): Ignore indirect symbols.
+ (elf_link_find_version_dependencies): New static function.
+ (elf_link_assign_sym_version): New static function.
+ (elf_link_renumber_dynsyms): New static function.
+ (struct elf_final_link_info): Add symver_sec field.
+ (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
+ local symbols of a dynamic object. Handle DT_VER* constants.
+ (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
+ dynamic object. Skip indirect symbols from ELF objects. Remove
+ the version name before choosing a hash bucket. Write out the
+ version information if appropriate.
+ (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
+ (bfd_elf64_size_dynamic_sections): Likewise.
+ * bfd-in2.h: Rebuild.
+ * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
+ Change elf_link_hash_flags to unsigned short.
+ (ELF_LINK_HIDDEN): Define.
+ (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
+ dynverdef_hdr, dynversym_section, dynverdef_section,
+ dynverref_section, cverdefs, cverrefs, verdef, verref.
+ (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
+ (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
+ (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
+ (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
+ (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
+ (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
+ (_bfd_elf_slurp_version_tables): Declare.
+ * elf.c (_bfd_elf_swap_verdef_in): New function.
+ (_bfd_elf_swap_verdef_out): Likewise.
+ (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
+ (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
+ (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
+ (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
+ (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
+ version information if there is any.
+ (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
+ (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
+ (elf_fake_sections): Handle .gnu.version* section names.
+ (assign_section_numbers): Handle SHT_GNU_ver* section types.
+ (_bfd_elf_slurp_version_tables): New function.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
+ version name in string entered in dynamic hash table.
+ * elfcode.h: Include fnmatch.h.
+ * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
+ symbol which was forced to become local.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
+
+Fri Feb 21 16:15:18 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
+ somewhat.
+ (mn10200_elf_relax_section): Correctly compute a symbol's value
+ when the symbol is local, but not in the same section as we are
+ relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
+ relaxing.
+
+Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * elf32-m32r.c: Rewrite to use ELF backend linker.
+ Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
+ Add small data area support (R_M32R_SDA16).
+ * reloc.c: Document BFD_RELOC_M32R_SDA16.
+ * bfd-in2.h,libbfd.h: Regenerated.
+
+Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10200.c (mn10200_elf_relax_section): New function.
+ (mn10200_elf_relax_delete_bytes): Likewise.
+ (mn10200_elf_symbol_address_p): Likewise.
+ (mn10200_elf_get_relocated_section_contents): Likewise.
+ (bfd_elf32_bfd_relax_section): Define.
+ (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
+
+ * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
+ (mn10200_elf_relocate_section): Likewise.
+ (elf_backend_relocate_section): Define.
+
+Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
+ reloc.c, targets.c: New target, elf-*-D30V.
+
+ * bfd-in2.h, configure, libbfd.h: Rebuilt.
+
+ * cpu-d30v.c, elf32-d30v.c: New files.
+
+Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
+
+ * reloc.c (struct reloc_howto_struct): Fix typo in comment.
+ * bfd-in2.h: Regenerated.
+ * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
+ (rtype2howto): Add function.
+ (tic80_howto_table): Add.
+
+Tue Feb 18 11:41:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * sysdep.h: Don't define errno in MSVC if error.h is included.
+
+Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
+ is initialized before it is used.
+
+Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * hp300hpux.c (convert_sym_type): Don't convert a secondary common
+ symbol into a weak undefined symbol; leave it as a common symbol.
+
+Fri Feb 14 19:08:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Don't issue a warning
+ about a symbol defined in a dynamic object if it has already been
+ defined in a regular object.
+
+Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
+
+ * makefile.vms: Add gcc flags to allow compiling with current gcc
+ snapshot
+ (targmatch.h): New dependency.
+
+ * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
+ openVMS/Alpha.
+ * evax.h (ALPHA_R_CODEADDR): New relocation.
+ * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
+ openVMS/Alpha.
+ * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
+ relocation.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+ Restrict symbol length to 64 bytes, case preserving:
+ * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
+ * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
+ (_bfd_evax_length_hash_symbol): Added.
+ * evax-etir.c (_bfd_evax_write_etir): Call
+ _bfd_evax_length_hash_symbol before output of symbol.
+ * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
+ * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
+
+ * evax-emh.c: Output filename to object file without path.
+
+ * evax-egsd.c: New sections for local and global commons.
+
+ * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
+ evax-misc.c, evax.h: Remove 8 bit characters from copyright
+ notices. Replace AXP with Alpha.
+
+Wed Feb 12 18:10:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_create_dynamic_sections): We need the dynamic
+ sections if we are creating a shared library.
+
+Tue Feb 11 15:45:43 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.host (i386-windows): Don't set host64=true.
+
+Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
+ (elf_mips16_gprel_howto): New static variable.
+ (mips16_gprel_reloc): New static function.
+ (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
+ (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
+ (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
+ * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
+ for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
+
+Fri Feb 7 12:39:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_input_bfd): If we've discarded a section,
+ the output section will be the absolute section; don't print an
+ assertion message for that case when doing a relocateable link.
+
+Thu Feb 6 16:55:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
+ (struct mips_elf_link_hash_entry): Add new fields fn_stub,
+ need_fn_sub, call_stub, and call_fp_stub.
+ (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
+ (mips_elf_link_hash_newfunc): Initialize new fields.
+ (mips_elf_link_hash_table_create): Likewise.
+ (mips_elf_relocate_section): Redirect relocations to use mips16
+ stubs when appropriate.
+ (mips_elf_check_relocs): Attach stub sections to the appropriate
+ symbol. Set need_fn_stub when appropriate.
+ (mips_elf_always_size_sections): New static function.
+ (mips_elf_check_mips16_stubs): New static function.
+ (elf_backend_always_size_sections): Define.
+ * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
+
+ * elflink.h (elf_link_input_bfd): Discard local symbols that are
+ attached to sections which are not being included in the link.
+
+Wed Feb 5 13:20:17 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
+ symbol value when computing the addend for a pc_relative
+ pcrel_offset reloc.
+
+Mon Feb 3 11:54:06 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
+ relocateable link, just skip pc_relative pcrel_offset relocs.
+ * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
+ structure for an ARM26 reloc which can be resolved.
+ (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
+ reloc can be resolved.
+
+ * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
+ error in overflow check for R_RELBYTE.
+
+Fri Jan 31 14:07:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_slurp_section_data): Pick up the start address.
+ From Mark Rasin <mark.rasin@telrad.co.il>.
+
+ * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
+ debugging symbols.
+
+Wed Jan 29 00:00:49 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
+ (elf_mn10200_howto_table): Likewise.
+ (mn10200_reloc_map): Likewise.
+
+Mon Jan 27 12:07:35 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
+ * bfd-in2.h, libbfd.h: Regenerated.
+ * elf32-m32r.c: Add support for them.
+
+Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
+ * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
+ * elf32-v850.c (v850_elf_final_link_relocate): Remove used
+ r_format and r_pcrel. Always return a value.
+ * riscix.c (MY_final_link_callback): Define to dummy value.
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
+ relocations against the text segment, look up the output name of
+ the reloc section.
+ * 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-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+
+Wed Jan 22 15:40:28 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (tic80coff_vec): Use correct data put/get
+ routines for little endian data.
+ * coffcode.h (coff_write_object_contents): Set magic to
+ TIC80_ARCH_MAGIC for TIc80.
+
+Tue Jan 21 12:32:43 1997 Fred Fish <fnf@cygnus.com>
+
+ * coff-tic80.c (tic80coff_vec): Change to little endian data
+ as the default.
+
+Thu Jan 16 17:45:57 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
+ auxiliary_filters parameter to be const char * const *. Accept a
+ NULL terminated array.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
+ (bfd_elf32_size_dynamic_sections): Update declaration.
+ * bfd-in2.h: Rebuild.
+
+Wed Jan 15 11:21:32 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
+ NOTYPE symbol in a text section as a FUNC symbol.
+
+ * coffcode.h (coff_compute_section_file_positions): Force
+ relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
+
+Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libaout.h (machine_type): Reserve several values for sparclet.
+
+Mon Jan 13 22:39:08 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config.bfd (tic80-*-*): Don't require 'coff'.
+
+Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-v850.c (v850_elf_howto_table): Set the special_function
+ table to v850_elf_reloc for all non-standard relocations.
+ (v850_elf_check_relocs): Add check for h being non-null.
+ (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
+ statement instead of multiple ifs.
+ (v850_elf_relocate_section): Fix up error message, don't just call
+ abort.
+
+Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
+ Use bfd_elf_generic_reloc as special function for all relocs.
+ (bfd_elf32_mn10200_reloc): Remove unnecessary function.
+
+ * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
+ 24bit pc-relative reloc.
+
+Fri Jan 3 16:33:00 1997 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
+ * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
+ header byte order is little endian. Use correct bfd_get and
+ bfd_put routines for little endian headers.
+ * coffcode.h (coff_set_arch_mach_hook): Set arch to
+ bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
+
+Fri Jan 3 16:54:08 1997 Jeffrey A Law (law@cygnus.com)
+
+ * reloc.c: Add BFD_RELOC_24.
+ * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
+ (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
+
+ elf64-alpha multiple .got rewrite:
+
+ * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
+ (bfd_elf*_mkobject): Don't define here ...
+ * elfxx-target.h: ... but rather here. Default always_size_sections
+ hook to NULL.
+ * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
+ what the #defines in elf-bfd.h transmuted it to anyway.
+
+ * section.c: Add SEC_LINKER_CREATED flag.
+ * bfd-in2.h: Rebuild.
+ * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
+ relocation section flags.
+ (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
+ SEC_IN_MEMORY to recognize generated bits.
+ * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
+ Likewise.
+ * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
+ mips_elf_create_compact_rel_section, mips_elf_create_got_section,
+ mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
+ * elf32-ppc.c (ppc_elf_create_linker_section,
+ ppc_elf_size_dynamic_sections): Likewise.
+ * elf32-sparc.c (elf32_sparc_check_relocs,
+ elf32_sparc_size_dynamic_sections): Likewise.
+ * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
+ section flags.
+ (_bfd_elf_create_dynamic_sections): Likewise.
+ (_bfd_elf_make_linker_section_rela): Likewise.
+ * elflink.h (elf_link_create_dynamic_sections): Likewise.
+ (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
+ (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
+ to identify generated bits.
+ (elf_link_input_bfd): Likewise.
+
+ * elf64-alpha.c: Rewrite everything touching relocations.
+
+Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-v850.c (all functions and static variables): Go through
+ and regularize names to be of the form v850_elf_<xxx>.
+ (toplevel): Include <elf/v850.h>.
+ (enum reloc_type): Move to include/elf/v850.h.
+ (v850_elf_check_relocs): For common variables, if the variable is
+ referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
+ into the appropriate section.
+ (elf_backend_check_relocs): Define.
+
+Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
+
+Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.bfd (mips*el-*-linux*): New target.
+ (mips*-*-linux*): New target.
+
+ * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
+ Return a useful value.
+
+ * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
+
+ * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
+ ac_cv_func_mmap.
+ * configure: Rebuild.
+ * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
+ ac_cv_func_mmap in bfd/configure.host.
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
+ filter_shlib and auxiliary_filter_shlib parameters.
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
+ DT_FILTER.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
+ (bfd_elf64_size_dynamic_sections): Likewise.
+ * bfd-in2.h: Rebuild.
+
+Mon Dec 30 18:48:52 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
+ symbols, don't export a symbol which is defined by an object in an
+ archive which contains shared objects.
+
+Mon Dec 30 16:12:58 1996 Fred Fish <fnf@cygnus.com>
+
+ * archures.c (enum bfd_architecture): Add bfd_arch_tic80
+ for TI TMS320c80 (MVP).
+ (bfd_archures_list): Add bfd_tic80_arch.
+ * bfd-in2.h: Regenerate by running "make headers".
+
+Sun Dec 29 16:18:52 1996 Fred Fish <fnf@cygnus.com>
+
+ * cpu-tic80.c (bfd_tic80_arch): Add struct.
+ * configure.in (case $vec): Correct typo, "tb" not "tp".
+ Also add cofflink.o for tic80coff_vec.
+ * configure: Regenerate with autoconf.
+
+Mon Dec 30 11:54:56 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd.c: Patch up the mmap code so that it is only built if BFD
+ is configured with --with-mmap.
+
+Sun Dec 29 10:48:57 1996 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
+ (ALL_MACHINES): Add cpu-tic80.o
+ (cpu-tic80.o, coff-tic80.o): Add dependencies.
+ * coff-tic80.c: Add skeleton, cloned from another coff config.
+ * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
+ for TIc80.
+
+Fri Dec 27 20:56:41 1996 Fred Fish <fnf@cygnus.com>
+
+ * TODO: Correct a misspelling.
+ * coff-tic80.c: New file for TI TMS320C80 (MVP).
+ * cpu-tic80.c: New file for TI TMS320C80 (MVP).
+ * configure.in (case $vec): Add tic80coff_vec entry.
+ * configure: Regenerate with autoconf.
+ * archures.c (bfd_tic80_arch): Declare.
+ * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
+ * config.bfd (case ${targ}): Add tic80*-*-coff* target.
+ * targets.c (tic80coff_vec): Add decl as extern bfd_target.
+ (bfd_target_vector): Add tic80coff_vec entry.
+
+Fri Dec 27 11:48:12 1996 H.J. Lu <hjl@lucon.org>
+
+ * elflink.h (elf_buckets): Add some more values for larger
+ binaries.
+
+Thu Dec 26 18:36:54 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (install): Move subdir_do out of conditional. From
+ Fred Fish <fnf@cygnus.com>.
+
+Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
+ 32 bit relocs.
+ (elf_mn10200_howto_table): Likewise.
+ (mn10200_reloc_map): Likewise.
+
+Tue Dec 17 11:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
+ mips16 symbol during the link.
+ (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
+ mips16 symbol.
+ (mips_elf_link_output_symbol_hook): New static function.
+ (elf_backend_link_output_symbol_hook): Define.
+
+ * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
+ not zero.
+
+Mon Dec 16 14:38:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (bfd_section_from_shdr): Don't check for reloc sections
+ against SEC_DEBUGGING sections here (revert patch of December 5).
+ * elfcode.h (elf_object_p): Check for them here, instead.
+
+Sun Dec 15 14:46:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
+ * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
+ slurp_reloc_table.
+ (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
+ (_bfd_elf_canonicalize_dynamic_reloc): New function.
+ * elf-bfd.h (struct elf_size_info): Update declaration of
+ slurp_reloc_table.
+ (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
+ (_bfd_elf_canonicalize_dynamic_reloc): Declare.
+ * elfxx-target.h: Use new dynamic reloc routines by default.
+ * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
+ parameter.
+
+Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
+
+ * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
+ if NAMES_HAVE_UNDERSCORE is defined.
+
+Fri Dec 13 11:13:23 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
+
+Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
+ supported relocs.
+
+Thu Dec 12 14:55:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Only add a weak
+ symbol if the real definition is in the dynamic symbol table.
+ After finding the real definition, then, if it is dynamic, add the
+ weak symbol to the dynamic symbol table.
+
+ * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
+
+ * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
+ function.
+ (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
+ array.
+
+Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
+ variants.
+ (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
+ (bfd_elf32_mn10300_reloc): Write data in little endian format.
+ * reloc.c: Remove mn10300 big endian relocs.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+ * elf32-mn10200.c: Update from elf32-mn10300.c.
+
+Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (elf_symbol_leading_char): Define.
+
+ * elf32-mn10300.c: Add some comments.
+
+Fri Dec 6 17:16:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ihex.c (ihex_scan): Always initialize buf before jumping to
+ error_return.
+ (ihex_read_section): Likewise.
+
+Thu Dec 5 22:29:18 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
+ inplace for most relocs.
+
+Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Calling check_relocs
+ even if SEC_ALLOC is not set.
+ * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
+ when deciding whether to copy a reloc into a shared object.
+ (elf_i386_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
+ (elf32_sparc_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
+ reloc section if it is not set in the source section.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
+ * elf.c (bfd_section_from_shdr): Mark a reloc section associated
+ with a SEC_DEBUGGING section as SEC_DEBUGGING.
+
+Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
+ expects a .got.plt until we actually create it.
+
+Mon Dec 2 12:13:51 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
+ message for bfd_reloc_outofrange, rather than aborting. From
+ Philippe De Muyter <phdm@info.ucl.ac.be>.
+
+ * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
+ a relocateable link, don't try to process them. From Heinz Wrobel
+ <wrobel@lpr.e-technik.tu-muenchen.de>.
+
+Mon Dec 2 00:39:24 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (mn10300_info_howto): Renamed from
+ mn10300_info_howto_rel. Tweak reloc argument to be an
+ Elf32_Internal_Rela.
+ (USE_RELA): Define instead of USE_REL.
+ (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
+
+Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * configure.in, configure: Handle mips*-sgi-irix6*.
+ * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
+ core files.
+
+Wed Nov 27 12:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Warn about a
+ relocation against a symbol defined in a section with no output
+ section.
+
+Tue Nov 26 11:07:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
+ * configure, config.in: Rebuild with autoconf 2.12.
+
+ * elf-bfd.h (struct elf_link_hash_entry): Add other field.
+ * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
+ (swap_out_syms): Set st_other from existing st_other field.
+ * elflink.h (elf_link_add_object_symbols): Store st_other in hash
+ table other field.
+ (elf_link_output_extsym): Set the other field from the global hash
+ table entry.
+ * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
+ (elf_mips16_jump_howto): New static variable.
+ (mips16_jump_reloc): New static function.
+ (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
+ (mips_info_to_howto_rel): Handle R_MIPS16_26.
+ (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
+ to a mips16 symbol.
+ * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * cpu-mips.c (arch_info_struct): Add mips:16 entry.
+
+Mon Nov 25 11:23:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Use long long for mips-sgi-irix6*.
+
+ * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
+ only a warning. From Philippe De Muyter <phdemuyt@ulb.ac.be>.
+
+Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
+ (enum reloc_type): Add more reloc types.
+ (elf32_mn10300_howto_table): Update for new reloc types.
+ (elf32_mn10300_reloc_map): Update for new reloc types.
+ * reloc.c: Add some new relocs for the mn10300 series.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (setup_sections): Don't lose for a space which has
+ no data, but some symbols.
+
+Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (struct sunos_link_hash_table): Add got_needed field.
+ (sunos_link_hash_table_create): Initialize got_needed.
+ (sunos_create_dynamic_sections): Only set .got section size if it
+ is not already set. Set got_needed.
+ (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
+ sdynptr, and only handle dynamic sections, if dynamic sections are
+ needed.
+ (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
+ Initialize .got section.
+ (sunos_scan_ext_relocs): Likewise.
+ (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
+ a dynamic symbol.
+ (sunos_finish_dynamic_link): Check got_needed. Only set up
+ dynamic linking information if needed.
+
+Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
+
+ * config.bfd: Added VersaDOS format to the Ericsson configuration.
+
+Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-mn10300.c: Rough cut at relocs for the mn10300.
+
+Wed Nov 13 08:12:38 1996 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
+ anymore.
+
+Tue Nov 12 13:30:00 1996 Dawn Perchik <dawn@cygnus.com>
+
+ * filemode.c: Include sysdep.h.
+ * ihex.c: Add casts to eliminate compiler warnings.
+ * sunos.c: Add casts to eliminate compiler warnings.
+
+Mon Nov 11 10:37:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
+ section.
+ (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
+ appropriate relocations in the .so file if shared.
+ (ppc_elf_relocate_section): Ditto.
+
+Tue Oct 29 15:03:02 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
+ complain_overflow_unsigned.
+
+Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
+ overflows for R_D10V_16 and R_D10V_18.
+
+Tue Oct 29 13:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
+ (do_with_relocs): Likewise.
+ (do_as_repeat): Likewise.
+ (copy_expression): Likewise.
+
+Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_write_external_part): Correctly record whether
+ there is an external part.
+
+Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
+ handle tda offsets for sld.w and sst.w instructions.
+ Fix alignment check in sld.w and sst.w tda reloc handling.
+
+Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
+
+Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c: Add comments about assumptions about
+ char, short & long sizes.
+ (elf32_v850_bfd_final_link_relocate): Fix sign extension
+ problems for several relocs.
+
+ * elf32-v850.c (elf32_v850_howto_table): Fix typo in
+ R_V850_SDA_OFFSET entry.
+
+Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
+ Store import file index in ldindx.
+ (xcoff_build_ldsyms): Assume that ldsym was not previously
+ allocated. For an imported symbol, copy ldindx into l_ifile.
+
+Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (elf_v850_howto_table): Fix ordering of
+ R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
+ fields in R_V850_TDA_OFFSET.
+ (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
+ relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
+ relocations.
+
+ * elf32-v850.c: Include bfdlink.h.
+ (bfd_elf32_v850_reloc): Return an error if we get a reloc
+ we can't handle.
+ (elf32_v850_bfd_final_link_relocate): New function.
+ (v850_elf_relocation_section): Likewise.
+ (elf_backend_relocate_section): Define.
+
+Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * binary.c (binary_set_section_contents): Ignore sections which
+ don't have SEC_LOAD and SEC_ALLOC set.
+
+Mon Oct 21 12:13:05 1996 Jeffrey A Law (law@cygnus.com)
+
+ * linker.c (_bfd_generic_final_link): Avoid losing static
+ symbols in the .bss section.
+
+Mon Oct 21 10:54:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
+ (mips32_64bit_reloc): New static function.
+ (mips_reloc_map): Add entry for BFD_RELOC_64.
+ (mips_elf_relocate_section): Handle R_MIPS_64.
+
+ * linker.c (default_indirect_link_order): Print an error message
+ when attempting to do a relocateable link with different object
+ file formats, rather than calling abort.
+
+Thu Oct 17 10:43:29 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * reloc.c (m32r relocs): Rename them.
+ * bfd-in2.h, libbfd.h: Regenerated.
+ * elf32-m32r.c: Update.
+ (m32r_elf_10_pcrel_reloc): New function.
+ (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
+ (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
+
+Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
+
+ * linker.c (_bfd_generic_final_link): Set "linker_mark" for
+ all sections that will be included in the output file.
+ (_bfd_generic_link_output_symbols): Discard symbols in sections
+ which are being discarded.
+ * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
+ R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
+ (elf_v850_howto_table): Corresponding changes.
+ (elf_v850_reloc_map): Corresponding changes.
+ * reloc.c: Add additional V850 relocations.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
+ no longer want in pc-relative relocs.
+
+Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
+ accept a reloc against an undefined sybmol!
+
+Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
+
+Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * VERSION: Bump for new relocation.
+
+ * hosts/i386bsd.h: If NBPG is not defined, define it as
+ PAGE_SIZE, for recent versions of FreeBSD.
+
+Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Use `long long' as the 64 bit type on a Solaris
+ host, since both gcc and the SunPRO compilers support it.
+
+Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
+
+ * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
+ mistake to have reused the ECOFF LITERAL for ELF since they have
+ different semantics.
+ * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
+ section overflow.
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
+ dynamic relocation for an undefweak symbol when we are building
+ a static executable.
+
+Thu Oct 10 11:15:06 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
+ point explicitly to srcdir.
+ (targmatch.h): Edit references to point explicitly to objdir.
+
+Thu Oct 10 14:14:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.bfd: When setting targ_cpu, don't get confused by
+ linux-gnu.
+
+Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * configure.host: Add support for windows host (a build done
+ under the Microsoft build environment).
+
+Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
+ definition in a dynamic object, add it to the dynamic symbol table
+ if any dynamic object mentions it. Reverts part of last patch.
+
+ * sunos.c (struct sunos_link_hash_table): Add got_base field.
+ (sunos_link_hash_table_create): Initialize got_base.
+ (bfd_sunos_size_dynamic_sections): If the .got section is more
+ than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
+ 0x1000.
+ (sunos_check_dynamic_reloc): Subtract got_base from a base
+ relative relocation.
+
+ * elf32-mips.c (elf_mips_isa): New static function.
+ (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
+ -mips1 and -mips2 code together, or -mips3 and -mips4 code.
+
+Mon Oct 7 11:44:17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * archive.c (do_slurp_coff_armap): Only treat archive as little
+ endian for i960 COFF.
+
+Fri Oct 4 13:49:01 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_compute_section_file_positions): Adjust sofar
+ by the change in size of the section when EXEC_P is not set.
+
+ * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
+ (m68kcoff_rtype_to_howto): New static function.
+ * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
+ VMA to the addend for a PC relative reloc.
+
+ * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
+ HP/UX 10.20.
+ * Makefile.in: Rebuild dependencies.
+
+ * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
+ som.h is included.
+
+Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in: Remove explicit dependencies for mn10200 and
+ mn10300 files.
+ (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
+ (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
+ (dependencies): Rebuilt.
+
+Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
+ during this function.
+
+ * elflink.c (_bfd_elf_create_linker_section): Only use an existing
+ section if the flags are compatible.
+
+ * configure.in: Add havevecs, and put it in tdefaults.
+ * mpw-config.in: Likewise.
+ * configure: Rebuild.
+ * targmatch.sed: New file; a sed script to build targmatch.h from
+ config.bfd.
+ * config.bfd: Add #if, #endif, and comments for targmatch.h.
+ * targets.c: Include "fnmatch.h".
+ (struct targmatch): Define.
+ (bfd_target_match): Define by including targmatch.h.
+ (bfd_find_target): If the target is not found by name, search for
+ it as a configuration triplet.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
+ i386dynix.o, m68k4knetbsd.o, and riscix.o.
+ (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
+ hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
+ (HFILES): Add targmatch.h. Also, alphabetize and reindent.
+ (CFILES): Remove i386dynix.c and hp300bsd.c.
+ (targmatch.h): New target.
+ (do_clean): Remove targmatch.h.
+
+ * configure.in: Add BFD_NEED_DECLARATION(getenv).
+ * acconfig.h: Add NEED_DECLARATION_GETENV.
+ * configure, config.in: Rebuild.
+ * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
+ * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
+
+Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
+
+ * cpu-mn10x00.c, elf32-mn10x00: Removed.
+ * cpu-mn10200.c, cpu-mn10300.c: New files.
+ * elf32-mn10200.c, elf32-mn10300.c: New files.
+ * Makefile.in: Break mn10x00 support into two separate
+ configurations, mn10200 and mn10300.
+ * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
+ * bfd-in2.h, configure: Rebuilt.
+
+Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (do_clean): Move config.log to do_distclean.
+
+Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
+
+ * cpu-mn10x00.c, elf32-mn10x00.c: New files.
+ * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
+ (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
+ (elf32-mn10x00.o): Add dependencies.
+ * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
+ (bfd_mn10x00_arch): Declare.
+ (bfd_archures_list): Add bfd_mn10x00_arch.
+ * config.bfd: Add mn10x00-*-*.
+ * configure.in: Add bfd_elf32_mn10x00_vec.
+ * elf.c (prep_headers): Handle bfd_arch_mn10x00.
+ * targets.c (bfd_elf32_mn10x00_vec): Declare.
+ (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
+ * bfd-in2.h, configure: Rebuilt.
+
+Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ openVMS/Alpha: Provide filename and case_hack flags via
+ symbol table from gas.
+ Add case_hack code for symbol output from vax/vms.
+ * evax-alpha.c (evax_initialize): Remove filename handling,
+ filename is provided via symbol table.
+ (evax_get_symtab): Use local symbol count when setting up table.
+ * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
+ debugging.
+ (_bfd_evax_write_egsd): Skip file name symbol.
+ * evax-emh.c (get_vms_time_string): Local function now.
+ (_bfd_evax_write_emh): Extract source filename and case_hack flags
+ from symbol table.
+ * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
+ through _bfd_evax_case_hack_symbol.
+ * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
+ functions.
+ (_bfd_evax_basename): Removed.
+ (_bfd_get_vms_time_string): Moved to evax-emh.c.
+ * evax.h (evax_private_data_struct): Remove filename.
+ (flag_hash_long_names, flag_show_after_trunc,
+ flag_no_hash_mixed_case, vms_name_mapping): New flags for
+ vms_case_hack.
+
+Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
+ (N_GETMID_NET, N_GETFLAG_NET): Likewise.
+ (NO_SWAP_MAGIC): Don't define.
+ (SWAP_MAGIC): Define.
+
+ * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
+ no hash table entry for a global symbol.
+
+Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
+
+ * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
+
+Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (coff_link_add_symbols): Don't override a meaningful
+ symbol type with T_NULL. Warn if symbol type changes. Based on
+ patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
+
+ * elflink.h (elf_link_add_object_symbols): Only put a symbol from
+ a dynamic object in the dynamic symbol table if it is referenced
+ or defined by a regular object.
+
+Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
+ remove dwarf local labels. Shrinks binaries by a factor of 3!
+
+Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
+ by hand, rather than by calling bfd_make_section.
+
+Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
+
+ * reloc.c: Rename m32r relocs.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+ * elf32-m32r.c: Update.
+
+Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (aout_link_input_section_ext): When doing a relocateable
+ link, adjust the symbol index of a base relative reloc. Don't
+ change the addend of a PC relative reloc if pcrel_offset is set.
+ * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
+ a relocateable link.
+
+ * reloc.c (bfd_perform_relocation): Apply the relocation even if
+ it is zero, in case src_mask matters.
+ (bfd_install_relocation): Likewise.
+
+Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Always initialize
+ keep_syms.
+ (_bfd_xcoff_bfd_final_link): Don't set target_index
+ to an uninitialized value.
+
+Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
+ indices, rather than crashing.
+ (coff_slurp_reloc_table): Likewise. Check whether the howto field
+ is NULL.
+ * coff-sh.c (sh_relocate_section): Check for an illegal symbol
+ index.
+
+Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
+ reloc to 0.
+ (coff_arm_adjust_symndx): New static function.
+ (coff_adjust_symndx): Define.
+
+ * srec.c (srec_scan): Accept multiple symbols on a single line.
+ From Pascal Martin <pmartin@alsys.com>.
+
+ * README: New file.
+
+Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
+ (sunos_merge_private_bfd_data): New function.
+
+Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
+ than input BFD.
+ (bfd_merge_private_bfd_data): Likewise.
+ * section.c (bfd_copy_private_section_data): Likewise.
+ * syms.c (bfd_copy_private_symbol_data): Likewise.
+ * bfd-in2.h: Rebuild.
+ * aout-target.h (MY_bfd_copy_private_section_data): Check that
+ both BFD's are the right flavour.
+ * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
+ * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
+ (_bfd_mips_elf_merge_private_bfd_data): Likewise.
+ * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
+ (ppc_elf_merge_private_bfd_data): Likewise.
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
+ * peicode.h (pe_bfd_copy_private_section_data): Likewise.
+
+ * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
+ R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
+ its sanity check.
+
+Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
+
+ * reloc.c: Add m32r relocs.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+ * cpu-m32r.c,elf32-m32r.c: New files.
+
+Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
+
+Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * tekhex.c (first_phase): Change type parameter from char to int.
+ (out): Likewise.
+ (pass_over): Change func to expect int, not char.
+
+ * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
+ rather than SEC_LOAD when aligning the file offset for the first
+ section in a segment.
+
+Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
+
+ * syms.c (coff_section_type): Make arg const.
+ * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
+ to make_bfd_asection().
+ * elf-bfd.h (bfd_section_from_phdr): Add prototype.
+ * elfcode.h (bfd_section_from_phdr): Remove prototype.
+ (_bfd_elf_stringtab_init): Remove prototype.
+
+ * netbsd-core.c (swap_abort): Add prototype.
+ * aix386-core.c (swap_abort): Ditto & make static
+ * hpux-core.c (swap_abort): Ditto & make static.
+ * irix-core.c (swap_abort): Ditto & make static.
+ * ptrace-core.c (swap_abort): Ditto & make static.
+ * trad-core.c (swap_abort): Ditto & make static.
+ * coffswap.h (coff_swap_reloc_in): Ditto.
+ (coff_swap_reloc_out): Ditto.
+ (coff_swap_filehdr_in): Ditto.
+ (coff_swap_filehdr_out): Ditto.
+ (coff_swap_sym_in): Ditto.
+ (coff_swap_sym_out): Ditto.
+ (coff_swap_aux_in): Ditto.
+ (coff_swap_aux_out): Ditto.
+ (coff_swap_lineno_in): Ditto.
+ (coff_swap_lineno_out): Ditto.
+ (coff_swap_aouthdr_in): Ditto.
+ (coff_swap_aouthdr_out): Ditto.
+ (coff_swap_scnhdr_in): Ditto.
+ (coff_swap_scnhdr_out): Ditto.
+ * ihex.c (ihex_sizeof_headers): Ditto.
+ * tekhex.c (getsym): Ditto.
+ (find_chunk): Ditto & make static.
+ (insert_byte): Ditto.
+ (first_phase): Ditto.
+ (pass_over): Ditto.
+ (tekhex_get_symtab): Ditto & make static.
+ (tekhex_get_symtab_upper_bound): Ditto & make static.
+ (tekhex_mkobject): Ditto.
+ (tekhex_object_p): Ditto.
+ (move_section_contents): Ditto.
+ (tekhex_get_section_contents): Ditto.
+ (tekhex_set_arch_mach): Ditto & make static.
+ (tekhex_set_section_contents): Ditto.
+ (writevalue): Ditto.
+ (writesym): Ditto.
+ (out): Ditto.
+ (tekhex_write_object_contents): Ditto.
+ (tekhex_sizeof_headers): Ditto.
+ (tekhex_make_empty_symbol): Ditto.
+ (tekhex_get_symbol_info): Ditto.
+ (tekhex_print_symbol): Ditto.
+ * irix-core.c (make_bfd_asection): Ditto.
+ (irix_core_core_file_p): Ditto.
+ (irix_core_core_file_failing_command): Ditto.
+ (irix_core_core_file_failing_signal): Ditto.
+ (irix_core_core_file_matches_executable_p): Ditto.
+ (irix_core_make_empty_symbol): Ditto.
+ * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
+ * srec.c (srec_new_symbol): Ditto.
+ (srec_get_section_contents): Ditto.
+ (srec_set_arch_mach): Ditto.
+ (srec_set_section_contents): Ditto.
+ (internal_srec_write_object_contents): Ditto.
+ (srec_write_object_contents): Ditto.
+ (symbolsrec_write_object_contents): Ditto.
+ (srec_sizeof_headers): Ditto.
+ (srec_make_empty_symbol): Ditto.
+ (srec_get_symtab_upper_bound): Ditto.
+ (srec_get_symtab): Ditto.
+ (srec_print_symbol): Ditto and make static.
+ * elf.c (elf_read): Ditto
+ (assign_section_numbers): Ditto.
+ (elf_fake_sections): Ditto.
+ (sym_is_global): Ditto.
+ (elf_map_symbols): Ditto.
+ (get_program_header_size): Ditto.
+ * coffgen.c (make_a_section_from_file): Ditto.
+ (coff_real_object_p): Ditto.
+ (fixup_symbol_value): Ditto.
+ (build_debug_section): Ditto.
+ (copy_name): Ditto.
+ * syms.c (coff_section_type): Ditto.
+
+Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
+
+ * bfd-in2.h: Rebuilt after m32r changes.
+
+Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.bfd,configure.in,configure: Add m32r support.
+ * Makefile.in,archures.c,elf.c,targets.c: Likewise.
+ * config.bfd: Keep target list alphabetically sorted.
+
+Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
+ to add in the constant part found in the instruction itself.
+ (case R_V850_HI16_S): Likewise.
+
+Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
+ and R_D10V_18 to be 1 (word).
+
+Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * stabs.c (_bfd_link_section_stabs): If the output_section field
+ of either section is bfd_abs_section, then the linker is
+ discarding the section and we should not optimize it.
+
+Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (aout-sparcle.o): New target.
+ * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
+ * config.bfd (sparclet-*-aout*): Add case.
+ * configure.in (sparcle_aout_vec): Add case.
+ * configure: Regenerated.
+ * targets.c (sparcle_aout_vec): Declare.
+ (bfd_target_vector): Add sparcle_aout_vec.
+ * aout-sparcle.c: New file.
+
+Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
+ low order sign bit propogation for R_V850_HI16_S.
+
+ * elf32-v850.c (bfd_elf32_v850_reloc): New function for
+ handling V850 specific relocs.
+ (elf_v850_howto_table): Use the new function for some
+ relocations. Twiddle masks & shifts for some relocs.
+ Set partial_inplace where needed.
+
+Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cpu-mips.c: Add an explicit mips:3000 entry, and change the
+ default architecture to a machine number of 0.
+ * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
+ for E_MIPS_ARCH_1.
+ (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
+ the output BFD is the default, set it from the first input BFD.
+
+Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
+ insert at bitpos zero. The HI16 relocs are shifted right
+ by 16 bits. Fix src_mask for all relocs.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
+ little endian!
+ (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
+ endian!
+
+Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
+ Rewrite to use BFD file read routines and to avoid using a fixed
+ length for the file name.
+
+Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
+ (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
+ (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
+ to R_V850_{32,16,8}.
+
+Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
+ (elf_v850_howto_table): Add info for HI16_S reloc.
+ (v850_reloc_map): Add HI_16_S reloc.
+ * reloc.c: Define BFD_RELOC_V850_* relocs.
+
+Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ Add SH ELF support.
+ * elf32-sh.c: New file.
+ * elf.c (prep_headers): Handle bfd_arch_sh.
+ * elfcode.h (write_relocs): Handle absolute symbol.
+ * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
+ (_bfd_elf64_link_read_relocs): Declare.
+ * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
+ elf_link_read_relocs. Make globally visible. Change all
+ callers.
+ (elf_link_input_bfd): Get external symbols from cache in
+ symtab_hdr->contents. Get contents from cache in
+ elf_section_data.
+ * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
+ already defined.
+ * reloc.c: Define BFD_RELOC_SH_* relocs.
+ * libbfd-in.h (_bfd_sh_align_load_span): Declare.
+ * coff-sh.c (sh_insns_conflict): Fix a return value.
+ (_bfd_sh_align_load_span): New globally visible function, broken
+ out of sh_align_load.
+ (sh_align_load): Call _bfd_sh_align_load_span.
+ (sh_swap_insns): Change relocs parameter to PTR.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * targets.c (bfd_elf32_sh_vec): Declare.
+ (bfd_elf32_shl_vec): Declare.
+ * config.bfd (sh-*-elf*): New target.
+ * configure.in (bfd_elf32_sh_vec): New target vector.
+ (bfd_elf32_shl_vec): New target vector.
+ * configure: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add elf32-sh.o.
+ (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
+
+ * elf.c (map_sections_to_segments): Check that LMA does not skip a
+ page before checking D_PAGED.
+
+ * ihex.c (ihex_scan): Removed unnecessary extbase variable.
+ (ihex_write_object_contents): Remove extbase; always use segbase
+ instead.
+
+Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
+ * configure.host (i[345]86-*-*): Ditto.
+ * config.bfd (i[345]86-*-*): Ditto.
+ * configure: Regenerate.
+
+ * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
+ elf.
+
+Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
+ * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
+ * som.c (hppa_som_gen_reloc_type): Add new argument. If
+ we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
+ will have an ST_CODE type, change the symbol's type to ST_DATA.
+ * som.c (hppa_som_gen_reloc_type): Update prototype.
+
+Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
+ R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
+ (mips_elf_size_dynamic_sections): Don't require .got to exist.
+ (mips_elf_finish_dynamic_sections): Likewise.
+
+Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host (HLDENV): New variable to set. Set it for
+ *-*-sysv4*, since those linkers may not support -R but they always
+ support LD_RUN_PATH.
+
+ * libieee.h (NSECTIONS): Don't define.
+ (ieee_data_struct): Change section_table to asection **. Add
+ section_table_size.
+ * ieee.c (get_section_entry): If the table isn't big enough, make
+ it bigger.
+ (ieee_slurp_sections): Remove assertion about number of sections.
+ (ieee_object_p): Adjust initialization of ieee to match changes to
+ the structure.
+
+ * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
+ symbols merely because we are generating a shared library.
+ (xcoff_build_ldsyms): Don't set up global linkage code for an
+ undefined symbol merely because we are generating a shared
+ library.
+
+Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
+ (BFD32_BACKENDS) Add elf32-v850.o.
+ * archures.c: Add bfd_v850_arch.
+ * bfd-in2.h: Add bfd_v850_arch.
+ * config.bfd (v850-*-*): New target.
+ * configure: (bfd_elf32_v850_vec) New vector.
+ * configure.in: (bfd_elf32_v850_vec) New vector.
+ * cpu-v850.c: New file.
+ * elf.c (prep_headers): Added case bfd_arch_v850.
+ * elf32-v850.c: New file.
+ * targets.c (bfd_elf32_v850_vec): New vector.
+
+Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
+ a function code symbol for an XMC_XO symbol.
+
+Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Update editing of autoconf vars to reflect
+ Jul 18 configure.in change.
+ * mpw-make.sed: Update editing of include pathnames to be
+ more general, add @DASH_C_FLAG@ to explicit compile rule edit.
+
+Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (elf64_alpha_output_extsym): The section from
+ which to offset to get the .plt entry address is ".plt".
+
+Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
+ BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
+ Added, for internal use by the ARM gas.
+ * libbfd.h: Rebuilt
+ * bfd-in2.h: Rebuilt
+
+Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
+ in section dynidx start.
+
+Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
+ name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
+ optimization for g++.
+
+Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
+ the -mrelocatable-lib bit set and the other doesn't, clear the
+ -mrelocatable-lib bit in the header.
+
+Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Do not resolve a common
+ symbol against a STT_FUNC symbol in a shared library.
+
+Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
+ symbol is found, automatically define the corresponding function
+ code.
+
+ * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
+ if sym.n_numaux is not zero.
+ (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
+ entry to disagree about the number of aux entries if the symbol
+ has zero.
+
+ * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
+ section if it might be needed, not just if info->shared.
+ (mips_elf_adjust_dynamic_symbol): Make room for a null element at
+ the start of .rel.dyn if we are going to use it.
+ (mips_elf_finish_dynamic_sections): Only clear the first element
+ of .rel.dyn if the size is greater than zero.
+
+Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_input_bfd): If we already called the
+ undefined_symbol callback for a symbol, then don't issue any more
+ warnings about loader relocs.
+ (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
+ after calling the undefined_symbol callback.
+
+ * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
+ (xcoff_link_add_symbols): Permit multiple definitions of a symbol
+ as the AIX linker seems to do.
+
+Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
+ (evax_initialize): Remove evax_reloc_table.
+ (evax_close_and_cleanup): Ditto.
+ (reloc_nil): Ditto.
+ (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
+ entries.
+ (evax_bfd_reloc_type_lookup): Ditto.
+ * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
+ cooked_size == raw_size.
+ * evax-emh.c (_bfd_evax_register_filename): Remove.
+ * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
+ * evax-misc.c (add_new_contents): Malloc section at full size.
+ (_bfd_save_evax_section): Memcpy section contents directly.
+ * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
+ (evax_reloc_table): Remove.
+
+ * hosts/alphavms.h (O_ACCMODE): Define if needed.
+
+ * makefile.vms: Add better support for DEC C compilation
+ Add evax.h dependencies
+
+ * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
+ (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
+ (BFD_RELOC_ALPHA_BASEREG): Remove.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * archive.c (bsd_write_armap): Ifdef around calls to getuid and
+ getgid if _WIN32 is defined.
+ * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
+
+Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
+ Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
+ include file.
+ * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
+ isn't defined.
+
+Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
+ realloc.
+ * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
+ (NEED_DECLARATION_REALLOC): New macro.
+ * configure, config.in: Rebuild.
+ * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
+ (realloc): Declare if NEED_DECLARATION_REALLOC.
+
+ * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
+ <strings.h> if they exist.
+
+ * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
+
+Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cpu-i386.c (i8086_arch): Architecture info for the i8086.
+
+ Based on patches from Eric Valette <valette@crf.canon.fr>:
+ * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
+ LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
+ (elf_howto_table): Add entries for new relocs.
+ (elf_i386_reloc_type_lookup): Handle new relocs.
+ (elf_i386_info_to_howto): Just call abort.
+ (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
+ (elf_i386_relocate_section): Likewise.
+
+Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
+
+Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
+ only get the LMA from the phdr if they are in the same part of the
+ file.
+
+ * elf.c (map_sections_to_segments): Rewrite tests for starting a
+ new segment to make them more comprehensible. If the relationship
+ between the LMA and the VMA changed, start a new segment. Don't
+ check dynsec when deciding whether to start a new segment for a
+ writeable section; -N will now handle this.
+
+Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libhppa.h: Remove "esel" changes. Not the right approach.
+ * som.c: Corresponding changes.
+ (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
+ which don't have a SOM symbol type associated with them.
+ Reverses a 1994 change.
+
+Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ Make ld -N more reasonable for ELF:
+ * elf.c (map_sections_to_segments): If D_PAGED is not set, set
+ phdr_in_section to false, and always use a single load segment.
+ (elf_sort_sections): Sort sections by LMA after VMA.
+ (assign_file_positions_for_segments): If D_PAGED is not set, don't
+ align to maxpagesize.
+ (assign_file_positions_except_relocs): Likewise.
+ * elfcode.h (elf_object_p): If a section is loaded but not page
+ aligned, clear D_PAGED.
+
+Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
+ Added, for internal use by the ARM gas.
+ * libbfd.h: Rebuilt
+ * bfd-in2.h: Rebuilt
+
+Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libhppa.h (R_HPPA_ESEL): New field selector.
+ (e_esel): Similarly.
+ * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
+ then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
+ (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
+
+Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
+ archive search before looking for stripped dynamic objects.
+
+Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
+ symbol a warning rather than an error.
+
+Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Track the virtual
+ memory position separately from the file position, and use it to
+ compute the alignment adjustment.
+
+Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
+ and fixed mask on R_D10V_10_PCREL_L.
+
+Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf64-mips.c: Include "aout/ar.h".
+ (mips_elf64_slurp_armap): New static function.
+ (mips_elf64_write_armap): New static function.
+ (bfd_elf64_archive_*): Define.
+ * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
+ Use instead of bfd_generic_archive_p.
+ (bfd_elfNN_write_archive_contents): Define if not defined. Use
+ instead of _bfd_write_archive_contents.
+ (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
+ _bfd_generic_mkarchive.
+ (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
+ bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
+ _bfd_archive_coff.
+ (TARGET_LITTLE_SYM): Likewise.
+ * archive.c (bfd_slurp_armap): Check for and reject an archive map
+ name of /SYM64/.
+ * Makefile.in: Rebuild dependencies.
+
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
+ SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
+ SHT_MIPS_EVENTS sections.
+ (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
+ SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
+ sections.
+ (_bfd_mips_elf_fake_sections): Likewise.
+
+ * libecoff.h (ecoff_data_type): Add rdata_in_text field.
+ * ecoff.c (ecoff_compute_section_file_positions): Copy
+ rdata_in_text from backend info to tdata. Clear it if any data
+ section comes before .rdata.
+ (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
+ tdata rather than backend info.
+
+Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Fix test for whether a compiler has a 64 bit
+ type. From Jim Wilson <wilson@cygnus.com>.
+
+Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host (mips-sgi-irix6*): New host.
+
+ * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
+ (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
+ BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
+ to AC_OUTPUT call.
+ * configure: Rebuild.
+ * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
+ (BFD_HOST_64_BIT): Define conditionally.
+ (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
+ (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
+ (symvalue, bfd_size_type): Likewise.
+ * bfd-in2.h: Rebuild.
+ * Makefile.in (do_clean): Remove bfd-tmp.h.
+ (do_distclean): Remove bfd-in3.h.
+ (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
+ (bfd-in3.h): New target.
+
+ * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
+ Andrew Gierth <ANDREWG@microlise.co.uk>.
+
+ * configure.host: Set INSTALL_SHLIB.
+ * configure.in: Call AC_SUBST (INSTALL_SHLIB).
+ * configure: Rebuild.
+ * Makefile.in (install): Use @INSTALL_SHLIB@.
+
+ * config.bfd (mips*-*-irix6*): New target.
+ * configure.host: Handle Irix 6 shared library like Irix 5.
+
+ * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
+ symbol for a magic name.
+ (xcoff_link_input_bfd): Don't change the reloc symbol for an
+ XMC_TD symbol.
+ (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
+ XMC_TD symbol.
+
+Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Add ELF support to mips config, create the
+ elf32-target.h file in the object dir.
+ * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
+
+Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
+ Also removed most abort calls, in favor of using bfd reporting.
+
+Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
+ (BFD32_BACKENDS) Add elf32-d10v.o.
+ * archures.c: Add bfd_d10v_arch.
+ * bfd-in2.h: Add bfd_d10v_arch.
+ * config.bfd (d10v-*-*): New target.
+ * configure: (bfd_elf32_d10v_vec) New vector.
+ * configure.in: (bfd_elf32_d10v_vec) New vector.
+ * cpu-d10v.c: New file.
+ * elf.c (prep_headers): Added case bfd_arch_d10v.
+ * elf32-d10v.c: New file.
+ * libbfd.h: Rebuild.
+ * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
+ BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
+ * targets.c (bfd_elf32_d10v_vec): New vector.
+
+Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
+
+Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
+ bfd_mach_i386_i8086 machine types.
+
+Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
+ and _FINI sections.
+
+Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
+
+ * coffcode.h (coff_set_section_contents): A/UX does not require
+ special handling of the _LIB section.
+
+Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
+ value for R_RELBYTE.
+
+ * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
+ array if one was allocated.
+
+Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
+ * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
+ use_rld_obj_head and rld_value.
+ (mips_elf_link_hash_table_create): Initialize new fields.
+ (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
+ dynamic.
+ (mips_elf_create_dynamic_sections): Create .rld_map section. If
+ __rld_obj_head symbol not seen, create an __rld_map symbol.
+ (mips_elf_size_dynamic_sections): Make space in .rld_map section.
+ Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
+ (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
+ __rld_obj_head symbol.
+ (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
+
+Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
+
+ * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
+ ppc_elf_addr16_ha_reloc.
+ (ppc_elf_addr16_ha_reloc): New static function.
+
+ * coff-mips.c (struct mips_hi): Define.
+ (mips_refhi_list): New static variable.
+ (mips_refhi_addr, mips_refhi_addend): Remove.
+ (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
+ (mips_reflo_reloc): Process mips_refhi_list.
+ (mips_relhi_list): New static variable.
+ (mips_relhi_addr, mips_relhi_addend): Remove.
+ (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
+ (mips_rello_reloc): Process mips_relhi_list.
+ (mips_relocate_section): Permit an arbitrary number of REFHI or
+ RELHI relocs before the associated REFLO or RELLO reloc.
+
+Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aout-target.h (MY(callback)): Set reloc_count fields.
+
+Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
+ sections unless this is a SunOS link.
+
+ * VERSION: Set to 2.7.1.
+
+ * Released binutils 2.7.
+
+Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * i386aout.c: Include "aout/aout64.h".
+ (i386aout_write_object_contents): New static function.
+ (MY_write_object_contents): Define.
+
+ * netbsd.h (MY(write_object_contents)): Make sure that
+ adjust_sizes_and_vmas is called before fiddling with the magic
+ number.
+
+Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
+
+Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libbfd-in.h (itos, stoi): Don't define.
+ * libbfd.h: Rebuild.
+ * i386lynx.c (KEEPIT): Define as udata.i.
+ (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
+ (NAME(lynx,swap_ext_reloc_out)): Likewise.
+ * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
+ flags. Don't use stoi.
+
+ * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
+
+ * elf.c (map_sections_to_segments): Don't start a new segment for
+ a writable section if it's on the same page as the previous
+ segment. Reset the writable variable for a readonly section.
+
+Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
+
+ * peicode.h (coff_swap_aouthdr_in): Missing initializations of
+ first_thunk_address, thunk_size, and import_table_size.
+ * peicode.h: Improved some diagnostics regarding edata sections.
+
+ * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
+ on IMGLUE relocs.
+ (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
+ (TARGET_LITTLE_SYM): Added missing D_PAGED.
+
+Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
+ with XCOFF_DEF_DYNAMIC set is really defined.
+ (xcoff_link_check_dynamic_ar_symbols): Likewise.
+ (xcoff_link_add_symbols): Only create special sections if using an
+ XCOFF hash table.
+
+ * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
+ aixcoff-rs6000.
+ (bfd_install_relocation): Likewise.
+
+Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
+ field.
+ (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
+ (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
+ (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
+ (elf64_alpha_link_hash_newfunc): Initialize flags field.
+ (elf64_alpha_check_relocs): Record types of LITUSE entries that
+ are found for LITERAL relocs.
+ (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
+ taken, we cannot generate a .plt entry for the symbol.
+
+Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add AC_ISC_POSIX, and check for setitimer and
+ sysconf functions (for gprof).
+ * configure, config.in: Rebuild.
+
+Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
+ an archive if it has a map. If the object file has the wrong
+ xvec, reject it.
+
+ * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
+ BRADDR, SREL16, SREL32, or SREL64 reloc against an external
+ symbol.
+ (alpha_relocate_section): Likewise.
+
+ * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
+ (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
+ (coff_swap_sym_out): Use SYMESZ, not sizeof.
+ (coff_swap_aux_out): Use AUXESZ, not sizeof.
+ (coff_swap_lineno_out): Use LINESZ, not sizeof.
+ (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
+ (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
+ * peicode.h: Corresponding changes.
+
+Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elflink.h (elf_create_pointer_linker_section): Comment out code
+ dealing with making GOT pointers negative of the GOT symbol for
+ now.
+
+Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
+ increment the .rela.plt size until after we're done creating the
+ .plt entry.
+ (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
+ .rela.plt offset directly rather than calculating it.
+
+Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
+ Use autoconf-set values.
+ * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
+ includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
+ values.
+ (docdir): Deleted.
+ * configure.in (AC_PREREQ): autoconf v2.5 or higher.
+ * configure: Rebuilt.
+
+Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
+
+ * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
+ handling code > 1k away.
+
+Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elflink.h (elf_create_pointer_linker_section): If DEBUG is
+ defined, output whenever the symbol is updated.
+
+Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
+
+ * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
+ section to 0 if user_set_vma is set.
+ * elflink.h (elf_bfd_final_link): Likewise.
+
+Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ Partially undo patch of Jun 20.
+ * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
+ (coff_compute_section_file_positions): Likewise.
+ (coff_write_object_contents): Likewise. Re-add deleted code, but
+ use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
+ * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
+
+Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
+
+ * config.bfd: Add support for *-*-rtems* configurations.
+
+Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (prep_headers): Add bfd_arch_alpha case.
+
+Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
+
+ * elf64-alpha.c: New file.
+ * config.bfd (alpha-*-linuxecoff*): New target.
+ (alpha-*-linux*, alpha-*-elf*): New targets.
+ * configure.in (bfd_elf64_alpha_vec): New vector.
+ * configure: Rebuild.
+ * targets.c (bfd_elf64_alpha_vec): Declare.
+ (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
+ * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD64_BACKENDS): Add elf64-alpha.o.
+ (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
+
+Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
+ than relying on a right shift of 32.
+
+Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
+ ifdef to COFF_WITH_PE.
+ (coff_compute_section_file_positions): Likewise.
+ (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
+ * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
+ * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
+ COFF_IMAGE_WITH_PE, always include.
+
+ * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
+
+Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
+ approximate the correct answer if SIZEOF_HEADERS was not used.
+
+ * binary.c (binary_set_section_contents): Set section file
+ position based on LMA rather than VMA.
+
+Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
+
+ * linker.c (_bfd_generic_link_output_symbols): Don't output any
+ symbols if info->strip == strip_all.
+
+Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * coff-h8300.c: Remove #if 0 code.
+ (compatable): Don't allow mixing/matching of different architectures.
+
+ * archures.c (bfd_mach_h8300s): Add.
+ * bfd-in2.h: Rebuilt.
+ * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
+ (BADMAG): Likewise.
+ (h8300_reloc16_estimate): Likewise.
+ (h8300_reloc16_extra_cases): Likewise.
+ (h8300_bfd_link_add_symbols): Likewise.
+ * coffcode.h (coff_set_arch_mach_hook): Likewise.
+ (coff_set_flags): Likewise.
+ * cpu-h8300.c (h8300_scan): Likewise.
+ Add H8/S to bfd_h8300_arch list.
+
+Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ Added support for Alpha OpenVMS:
+ * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
+ * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
+ * config.h-vms, makefile.vms: New files.
+ * config.bfd (alpha-*-*vms*): New target.
+ * configure.in (evax_alpha_vec): New target vector.
+ * configure: Rebuild.
+ * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
+ (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
+ * targets.c (bfd_target_evax_flavour): Define.
+ (evax_alpha_vec): Declare.
+ (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
+ if BFD64 is defined.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
+ evax-emh.o, and evax-misc.o.
+ (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
+ evax-etir.c, evax-emh.c, and evax-misc.c.
+ (HFILES): Add evax.h.
+
+Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
+ pointer.
+ (h8300_bfd_link_add_symbols): Likewise.
+
+Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
+ * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
+
+Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
+ for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
+ created.
+ (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
+ R_MIPS_32 relocs if creating a shared library.
+
+Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * peicode.h (add_data_entry): Use pei_section_data rather than
+ _cooked_size. Corresponds to May 13 change in coffcode.h.
+
+Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_final_link): Handle long section names.
+ * coffcode.h (coff_write_object_contents): If there are long
+ section names, always set the f_symptr field, even if there are no
+ symbols.
+ * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
+ if there are no symbols.
+
+ * coffgen.c (make_a_section_from_file): Check return value of
+ _bfd_coff_read_string_table.
+ (coff_real_object_p): Check return value of
+ make_a_section_from_file.
+ (_bfd_coff_read_string_table): Check that there are some symbols
+ before trying to read the string table size.
+
+Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): When considering whether
+ to replace a symbol in a dynamic object with a symbol from another
+ dynamic object, do the replacement if the existing symbol is
+ global linkage code.
+
+ * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
+ for _ptrgl, and treat it as global linkage code.
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
+ filename or N_SO symbol past the offset, and use it to indicate
+ that there is no line number or function when appropriate.
+
+Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
+ common symbol defined by the linker. Don't export function code
+ even if export_defineds is set.
+
+Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
+ and R_JMP_DEL.
+ (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
+ (h8300_symbol_address_p): New function.
+ (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
+ relaxing.
+
+Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
+ problems.
+ (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
+ correctly for the two variants. Allow relaxing if the target
+ is 128 bytes away since after relaxation it'll be 126 bytes away.
+ (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
+ "dot" and "value". Allow relaxing if the target is 128 bytes
+ away since after relaxation it'll be 126 bytes away.
+ * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
+ the given section until nothing changes.
+
+Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
+
+ * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
+ alignment hack--we can get the lnnoptr info another way without
+ suddenly increasing the alignment requirements. Set the flags for
+ the _PDATA section.
+ (ecoff_compute_section_file_positions): Do so.
+
+Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_write_object_contents): Put a timestamp in the file
+ to keep the HP emulator database happy.
+
+ * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
+ From Kevin Buettner <kev@primenet.com>.
+
+Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (translate_to_native_sym_flags): Don't try to print the
+ name of a NULL section.
+
+Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
+ set, always call the notice callback.
+
+ * VERSION: Increment for bfdlink.h change.
+
+Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
+ (sh_relax_delete_bytes): Correct handling of differently sized
+ trailing alignment reloc.
+
+ * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
+ * bfd-in2.h: Rebuild.
+ * configure.in: Warn if there is no known 64 bit type.
+ * configure: Rebuild.
+
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add ppcboot.o.
+ (BFD32_BACKENDS_CFILES): Add ppcboot.c.
+
+ * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
+ From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
+
+Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
+ (bfd_mips_elf64_swap_reginfo_out): Move from here...
+ * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
+ (bfd_mips_elf64_swap_reginfo_out): ...to here.
+
+Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf64-mips.c: Improve reloc special_functions and handling of
+ SHT_MIPS_OPTIONS section.
+ * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
+ mips_elf_hi16_reloc and make globally visible.
+ (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
+ make globally visible.
+ (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
+ make globally visible.
+ (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
+ and make globally visible.
+ (gprel16_with_gp): Check howto->src_mask before using value in
+ insn.
+ (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
+ and make globally visible.
+ (gprel32_with_gp): Check howto->src_mask before fetching value.
+ (bfd_mips_elf_swap_options_in): New function.
+ (bfd_mips_elf_swap_options_out): New function.
+ (_bfd_mips_elf_set_private_flags): Rename from
+ mips_elf_set_private_flags and make globally visible.
+ (_bfd_mips_elf_copy_private_bfd_data): Rename from
+ mips_elf_copy_private_bfd_data and make globally visible.
+ (_bfd_mips_elf_merge_private_bfd_data): Rename from
+ mips_elf_merge_private_bfd_data and make globally visible.
+ (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
+ for a SHT_MIPS_OPTIONS section.
+ (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
+ (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
+ name of a SHT_MIPS_OPTIONS section.
+ (_bfd_mips_elf_set_section_contents): New function.
+ (mips_elf32_section_processing): Set the GP value in a
+ SHT_MIPS_OPTIONS section.
+ (_bfd_mips_elf_find_nearest_line): Rename from
+ mips_elf_find_nearest_line and make globally visible.
+ (bfd_elf32_set_section_contents): Define.
+ * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
+ (_bfd_mips_elf_lo16_reloc): Declare.
+ (_bfd_mips_elf_gprel16_reloc): Declare.
+ (_bfd_mips_elf_got16_reloc): Declare.
+ (_bfd_mips_elf_gprel32_reloc): Declare.
+ (_bfd_mips_elf_set_private_flags): Declare.
+ (_bfd_mips_elf_copy_private_bfd_data): Declare.
+ (_bfd_mips_elf_merge_private_bfd_data): Declare.
+ (_bfd_mips_elf_find_nearest_line): Declare.
+ (_bfd_mips_elf_set_section_contents): Declare.
+
+ * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
+ elf_info_to_howto.
+ (elf_info_to_howto): Define.
+ * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
+ elf_info_to_howto.
+ (elf_info_to_howto): Define.
+ * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
+ elf_info_to_howto.
+ (elf_info_to_howto): Define.
+
+ * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
+ R_MOV16B[12], to match change in coff/internal.h.
+
+Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf64-mips.c: Extensive additions to provide better support for
+ writing files and for gas.
+ * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
+ of mips_elf_object_p.
+ (mips_elf32_object_p): Rename from mips_elf_object_p; call
+ _bfd_mips_elf_object_p.
+ (_bfd_mips_elf_final_write_processing): Rename from
+ mips_elf_final_write_processing and make globally visible.
+ (_bfd_mips_elf_fake_sections): Rename from
+ mips_elf_fake_sections and make globally visible.
+ (_bfd_mips_elf_section_from_bfd_section): Rename from
+ mips_elf_section_from_bfd_section and make globally visible.
+ (_bfd_mips_elf_section_processing): New function, broken out of
+ mips_elf_section_processing.
+ (mips_elf32_section_processing): Rename from
+ mips_elf_section_processing; call
+ _bfd_mips_elf_section_processing.
+ (_bfd_mips_elf_symbol_processing): Rename from
+ mips_elf_symbol_processing and make globally visible.
+ (_bfd_mips_elf_read_ecoff_info): Rename from
+ mips_elf_read_ecoff_info and make globally visible.
+ (mips_elf32_ecoff_debug_swap): Rename from
+ mips_elf_ecoff_debug_swap.
+ * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
+ struct symbol_cache_entry.
+ (_bfd_elf_validate_reloc): New function, moved in from
+ elfcode.h:validate_reloc.
+ * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
+ to _bfd_elf_validate_reloc. Change all callers.
+ * elf-bfd.h (bfd_section_from_shdr): Declare.
+ (_bfd_elf_symbol_from_bfd_symbol): Declare.
+ (_bfd_elf_validate_reloc): Declare.
+ (_bfd_mips_elf_object_p): Declare.
+ (_bfd_mips_elf_fake_sections): Declare.
+ (_bfd_mips_elf_section_from_bfd_section): Declare.
+ (_bfd_mips_elf_section_processing): Declare.
+ (_bfd_mips_elf_symbol_processing): Declare.
+ (_bfd_mips_elf_read_ecoff_info): Declare.
+ (_bfd_mips_elf_final_write_processing): Declare.
+ * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
+ if already defined.
+
+ * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
+ (mips_elf_final_write_processing): Likewise.
+
+Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ 64-bit MIPS ELF ABI objdump support:
+ * elf64-mips.c: New file.
+ * Makefile.in: Rebuild dependencies.
+ (BFD64_BACKENDS): Add elf64-mips.o.
+ (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
+ * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
+ bfd_elf64_littlemips_vec to targ_selvecs.
+ (mips*-*-elf*): Likewise.
+ * confingure.in: Add bfd_elf64_bigmips_vec and
+ bfd_elf64_littlemips_vec to vector switch.
+ * configure: Rebuild.
+ * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
+ broken out of mips_elf_section_from_shdr.
+ (mips_elf32_section_from_shdr): Rename from
+ mips_elf_section_from_shdr. Call new function.
+ (elf_backend_section_from_shdr): Update name of renamed function.
+ * elf-bfd.h (struct elf_size_info): Change second parameter of
+ write_out_phdrs to be const. Likewise for second parameter of
+ swap_symbol_out.
+ (struct bfd_elf_section_data): Add rel_hdr2 field.
+ (bfd_elf32_swap_symbol_in): Change second parameter to be const.
+ (bfd_elf32_swap_symbol_out): Likewise.
+ (bfd_elf32_swap_reloc_in): Likewise.
+ (bfd_elf32_swap_reloc_out): Likewise.
+ (bfd_elf32_swap_reloca_in): Likewise.
+ (bfd_elf32_swap_reloca_out): Likewise.
+ (bfd_elf32_swap_phdr_in): Likewise.
+ (bfd_elf32_swap_phdr_out): Likewise.
+ (bfd_elf32_swap_dyn_in): Likewise.
+ (bfd_elf32_swap_dyn_out): Likewise.
+ (bfd_elf32_slurp_symbol_table): Declare.
+ (bfd_elf32_write_shdrs_and_ehdr): Declare.
+ (bfd_elf32_write_out_phdrs): Declare.
+ (bfd_elf64_swap_symbol_in): Change second parameter to be const.
+ (bfd_elf64_swap_symbol_out): Likewise.
+ (bfd_elf64_swap_reloc_in): Likewise.
+ (bfd_elf64_swap_reloc_out): Likewise.
+ (bfd_elf64_swap_reloca_in): Likewise.
+ (bfd_elf64_swap_reloca_out): Likewise.
+ (bfd_elf64_swap_phdr_in): Likewise.
+ (bfd_elf64_swap_phdr_out): Likewise.
+ (bfd_elf64_swap_dyn_in): Likewise.
+ (bfd_elf64_swap_dyn_out): Likewise.
+ (bfd_elf64_slurp_symbol_table): Declare.
+ (bfd_elf64_write_shdrs_and_ehdr): Declare.
+ (bfd_elf64_write_out_phdrs): Declare.
+ (_bfd_mips_elf_section_from_shdr): Declare.
+ * elf.c (bfd_section_from_shdr): Remove assertion requiring
+ SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
+ section for the section, add the new one to rel_hdr2. Increment
+ reloc_count rather than setting it.
+ * elfcode.h (elf_slurp_symbol_table): Define name as macro.
+ Remove static declaration.
+ (elf_write_shdrs_and_ehdr): Define name as macro.
+ (elf_write_out_phdrs): Likewise.
+ (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
+ (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
+ (elf_swap_symbol_in): Change second parameter to be const.
+ (elf_swap_symbol_out): Likewise.
+ (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
+ (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
+ (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
+ (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
+ (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
+ (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
+ parameter to be const. Make non-static.
+ (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
+ Make non-static.
+ (elf_slurp_symbol_table): Make non-static.
+ (NAME(_bfd_elf,size_info)): Update names of renamed functions.
+ * elfxx-target.h (elf_info_to_howto): Define if not defined.
+ (elf_backend_size_info): Likewise.
+ (elfNN_bed): Use elf_backend_size_info.
+ * targets.c (bfd_elf64_bigmips_vec): Declare.
+ (bfd_elf64_littlemips_vec): Declare.
+ (bfd_target_vector): Add bfd_elf64_bigmips_vec and
+ bfd_elf64_littlemips_vec if BFD64 is defined.
+
+ * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
+
+Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
+ zeroes, in alignment holes.
+
+ * configure: Rebuild with autoconf 2.10.
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
+ potential leading underscore in the allocated buffer.
+
+Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
+ symbols into .sbss if this is a relocatable link.
+
+Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
+ undefined symbols when creating a shared library.
+
+Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c: Add a bunch of new code and static const arrays to
+ support aligning loads and stores on four byte memory boundaries.
+ Also:
+ (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
+ R_SH_LABEL.
+ (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
+ call sh_align_loads.
+ (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
+ as unused.
+
+Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cache.c (bfd_open_file): Unlink the file before opening it for
+ write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
+
+ * opncls.c (bfd_fdopenr): Set opened_once.
+
+Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * som.c (som_slurp_reloc_table): Clear external_relocs cache after
+ freeing it.
+
+ * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
+ the code unconditionally.
+
+Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libcoff-in.h (struct pei_section_tdata): Define structure.
+ (pei_section_data): Define macro.
+ * libcoff.h: Rebuild.
+ * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
+ store s_paddr field in pei_section_data.
+ (coff_compute_section_file_positions): Use pei_section_data rather
+ than _cooked_size, and don't overwrite an existing value.
+ (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
+ 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
+ * peicode.h (coff_bfd_copy_private_section_data): Define if
+ COFF_IMAGE_WITH_PE.
+ (pe_bfd_copy_private_section_data): New static function if
+ COFF_IMAGE_WITH_PE.
+
+Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * srec.c (srec_set_arch_mach): Write as a function rather than a
+ macro definition.
+
+ * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
+ no map, just check each member in turn to see whether it is
+ required.
+
+Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
+ table. Call BFD_ASSERT to validate header size, instead of
+ calling fatal.
+ (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
+ name.
+
+Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * ppcboot.c: New target for looking at PPCbug boot records.
+
+ * config{ure.in,.bfd}: Add support for ppcboot target.
+ * targets.c: Ditto.
+ * configure: Regenerate.
+
+Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coff-h8300.c (howto_table): Update names to match recent
+ changes to include/coff/internal.h. Fix minor errors in the
+ existing relocs. Add R_MOVL1 and R_MOVL2.
+ (rtype2howto): Similarly.
+ (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
+ existing relaxing code and peform more relaxing.
+ (h8300_reloc16_extra_cases): Likewise.
+
+Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
+
+ * reloc16.c (bfd_coff_reloc16_get_value): Handle common
+ symbols correctly.
+
+Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * elfcode.h (elf_object_p): Reject generic ELF target if
+ e_machine matches an alternate machine code in a specific backend.
+
+ * netbsd-core.c (netbsd_core_vec): Remove initializer for
+ obsolete align_power_min field.
+
+Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coff-h8300.c (reloc_howto_type): Add howto entry for
+ R_PCRWORD_B.
+ (rtype2howto): Handle R_PCRWORD_B.
+ (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
+ (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
+ pc-relative branch (R_PCRWORD) into an 8bit pc-relative
+ branch (R_PCWORD_B).
+
+Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (translate_from_native_sym_flags): Set the section for
+ BSF_CONSTRUCTOR symbols.
+
+ * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
+ last_bf_index.
+
+Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): In comdat section lookup,
+ stop looking when section is found.
+
+Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (STRING_SIZE_SIZE): Define.
+ (styp_to_sec_flags): Handle long symbol names when looking for the
+ section symbol.
+ (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
+ (bfd_coff_long_section_names): Define.
+ (coff_write_object_contents): Handle long section names.
+ (bfd_coff_std_swap_table): Initialize new field.
+ * libcoff.h: Rebuild.
+ * coffgen.c (make_a_section_from_file): Handle long section
+ names.
+ (coff_write_symbols): Handle long section names.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+ * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
+ * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
+ * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
+ * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
+ * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
+ * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
+
+ * bout.c (b_out_callback): Set lma of sections.
+ (b_out_bfd_get_relocated_section_contents): Rename in_abfd
+ parameter to output_bfd. Used input_bfd instead of output_bfd in
+ several places.
+
+Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (translate_from_native_sym_flags): Don't create
+ SEC_CONSTRUCTOR sections.
+ * ecoff.c (ecoff_set_symbol_info): Likewise.
+
+ * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
+ From Don Bowman <bowman@waterloo.hp.com>.
+
+Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
+ SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
+
+Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (struct mips_elf_link_hash_entry): Add
+ mips_32_relocs field.
+ (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
+ (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
+ relocs against a global symbol which is not defined in a regular
+ file.
+ (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
+ against a global symbol, increment mips_32_relocs.
+ (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
+ the symbol is not defined in a regular file, make room in the
+ .rel.dyn section.
+
+Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_compute_section_file_positions): Track the real
+ file position and the virtual file position separately. Set
+ filepos information bsaed on the real file position.
+ (_bfd_ecoff_set_section_contents): Handle .lib sections like the
+ Jan 23 change to coffcode.h.
+
+ * som.c (som_slurp_symbol_table): Set the symbol count to the
+ number of BFD symbols created.
+
+Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
+ output file if linking shared objects. Loop to check all relocs,
+ rather than returning false on first error.
+
+Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
+ (ppc_elf_additional_program_headers): If .interp section, bump #
+ of program headers by 1.
+ (ppc_elf_adjust_dynamic_symbol): Flesh out support.
+ (ppc_elf_size_dynamic_sections): Add support for .plt section.
+ (ppc_elf_check_relocs): Print out filename in debug code. Enable
+ PLT support.
+ (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
+ debug output.
+ (ppc_elf_relocate_section): If the output section isn't defined,
+ don't abort, just give an error message.
+
+ * elflink.c (_bfd_elf_create_dynamic_sections): If the section
+ being created is .sdata or .sdata2, don't make the symbol dynamic.
+
+Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
+ members of an archive for dynamic objects with no symbols, and
+ pass them directly to check_archive_element.
+ (xcoff_link_check_ar_symbols): Pass dynamic objects to
+ xcoff_link_check_dynamic_ar_symbols.
+ (xcoff_link_check_dynamic_ar_symbols): New static function.
+
+ * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
+ from _bfd_nodynamic to _bfd_xcoff.
+ * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
+ Declare.
+ (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
+ (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
+ (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
+ * libcoff.h: Rebuild.
+ * xcofflink.c (xcoff_swap_ldrel_in): New static function.
+ (xcoff_get_section_contents): New static function.
+ (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
+ (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
+ (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
+ (xcoff_dynamic_reloc): New static variable.
+ (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
+ (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
+
+Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
+ if reloc_entry->addend is not 0.
+ (CALC_ADDEND): Just set the addend to reloc.r_offset.
+
+Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
+ R_SPARC_GLOB_JMP.
+ * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
+ Add entries for R_SPARC_[56].
+ (sparc_reloc_map): Add entries for R_SPARC_[56].
+
+Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ Optimize linking of stabs in sections as used in ELF and COFF.
+ * stabs.c: New file.
+ * libbfd-in.h (_bfd_link_section_stabs): Declare.
+ (_bfd_write_section_stabs): Declare.
+ (_bfd_write_stab_strings): Declare.
+ * libbfd.h: Rebuild.
+ * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
+ (struct coff_link_hash_table): Add stab_info field.
+ * libcoff.h: Rebuild.
+ * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
+ stab_info field.
+ (coff_link_add_symbols): Call _bfd_link_section_stabs if
+ appropriate.
+ (_bfd_coff_final_link): Write out stab strings hash table.
+ (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
+ * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
+ hash table.
+ * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
+ (struct bfd_elf_section_data): Add stab_info field.
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
+ field.
+ * elflink.h (elf_link_add_object_symbols): If appropriate, call
+ _bfd_link_section_stabs.
+ (elf_bfd_final_link): Write out stab strings hash table.
+ (elf_link_input_bfd): Handle optimized stabs sections.
+ * reloc.c (_bfd_final_link_relocate): Check address against
+ _raw_size rather than _cooked_size.
+ * Makefile.in: Rebuild dependencies.
+ (BFD_LIBS): Add stabs.o
+ (BFD_LIBS_CFILES): Add stabs.c.
+
+ * VERSION: Increment for bfdlink.h change.
+
+ * coffgen.c (coff_renumber_symbols): Correct handling of
+ BSF_NOT_AT_END common symbols.
+
+Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-ppc.c (record_toc): Add cast to avoid warning.
+ (ppc_allocate_toc_section): Likewise.
+ (coff_ppc_relocate_section): Remove ANSI C string concatenation.
+ (ppc_coff_reloc_type_lookup): Remove unreached code.
+ * coffcode.h (coff_write_object_contents): Don't take the address
+ of an array.
+ * peicode.h (pe_print_idata): Add casts to avoid warning.
+ (pe_print_edata): Likewise.
+ (pe_print_reloc): Remove ANSI C string concatenation.
+
+Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
+ and last_bf fields.
+ * libcoff.h: Rebuild.
+ * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
+ symbols.
+ (coff_swap_aux_out): Likewise.
+ * peicode.h (coff_swap_aux_in): Likewise.
+ (coff_swap_aux_out): Likewise.
+ * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
+ symbols.
+ * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
+ field.
+ (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
+ Fix up .bf endndx link fields.
+ * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
+ field.
+ * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
+ symbols.
+
+Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
+ on Solaris PowerPC systems doesn't get confused.
+
+ * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
+ #ifdef PPC.
+
+ * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
+ (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
+ update did_reg and did_reg2.
+
+Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
+
+ * linker.c (_bfd_generic_link_add_one_symbol): When calling the
+ callback routines, pass h->root.string rather than name, in case
+ copy is true and name is transient.
+
+Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
+
+ * elfcore.h: Add support for core files with multiple threads.
+ (Primarily for Solaris.)
+
+Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
+ section->orelocation is NULL.
+
+ * coffgen.c (bfd_coff_get_syment): New function.
+ (bfd_coff_get_auxent): New function.
+ * bfd-in.h (bfd_coff_get_syment): Declare.
+ (bfd_coff_get_auxent): Declare.
+ * bfd-in2.h: Rebuild.
+
+Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (struct mips_hi16): Define.
+ (mips_hi16_addr, mips_hi16_addend): Remove.
+ (mips_hi16_list): New static variable.
+ (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
+ (mips_elf_lo16_reloc): Process mips_hi16_list.
+ (mips_elf_relocate_section): Permit an arbitrary number of HI16
+ relocs before the associated LO16 reloc.
+
+Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * versados.c (versados_scan): Check bfd_alloc return value.
+ (versados_object_p): Check all bfd_read return values. Require
+ that lang field be less than 10, to avoid confusion with Intel Hex
+ files.
+
+ * libaout.h (WRITE_HEADERS): Write out the relocs even if there
+ aren't any symbols.
+ * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
+ not 0, for an absolute symbol.
+ (NAME(aout,swap_ext_reloc_out)): Likewise.
+
+ * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
+ (ihex_write_object_contents): For a large start address, output
+ the full 32 bit address in record type 5.
+
+ * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
+ to int to avoid promotion problems in prototype.
+
+Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Use ${srcdir} when looking for picfrag.
+
+ * configure.host: Switch on ${libdir}, not $(libdir). From
+ alan@spri.levels.unisa.edu.au (Alan Modra).
+
+ * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
+ entry point, not just for DYNAMIC objects.
+ * sunos.c (sunos_add_dynamic_symbols): Always call
+ sunos_create_dynamic_sections. If called with a non DYNAMIC
+ object, don't do anything else.
+ (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
+
+Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Permit --enable-shared to specify a list of
+ directories.
+ * configure: Rebuild.
+
+ * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
+ host when configuring with --enable-shard.
+
+Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
+ <jdp@polstra.com>.
+
+ * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
+ to avoid crashing in bfd_hash_replace.
+
+ * sysdep.h: Use #ifdef, not #if.
+
+Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.in: Rebuild.
+
+Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
+
+ * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
+ (AC_CHECK_HEADERS): Check for sys/time.h
+ (AC_HEADER_TIME): Add macro.
+ * configure: Rebuild.
+ * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
+ to control what combination of <time> and <sys/time.h>
+ get included.
+
+Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
+ (aout_32_sunos4_write_object_contents): Likewise.
+ * aoutx.h (NAME(aout,machine_type)): Handle
+ bfd_mach_sparc_{sparclet,sparclite}.
+ * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
+ (bfd_mach_sparc_v9_p): Update.
+ * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
+ * libaout.h (enum machine_type): Add M_SPARCLET.
+ * sunos.c (MACHTYPE_OK): Define.
+ * bfd-in2.h: Regenerated.
+
+Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
+ * elflink.c (_bfd_elf_create_got_section): Store the
+ _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
+ * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
+ global offset table goes over 0x1000, set the value of
+ _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
+ (elf32_sparc_relocate_section): Subtract the offset of
+ _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
+
+ * elfcode.h: Don't include <string.h>.
+
+Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
+
+ * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
+ generic_link_hash_newfunc. All references changed.
+ * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
+ moved here from libbfd-in.h.
+ * libbfd-in.h: Corresponding changes.
+ * libbfd.h: Regenerated.
+
+Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (aout_link_input_section_std): When reporting an
+ overflow error, use the name of the symbol in the hash table if
+ available.
+ (aout_link_input_section_ext): Likewise.
+
+ * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
+ defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
+
+Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
+
+ * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
+ * coffcode.h (coff_compute_section_file_positions): Likewise.
+ (coff_write_object_contents): Likewise.
+
+Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * section.c (SEC_LINK_ONCE): Define.
+ (SEC_LINK_DUPLICATES): Define.
+ (SEC_LINK_DUPLICATES_DISCARD): Define.
+ (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
+ (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
+ (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
+ * bfd-in2.h: Rebuild.
+ * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
+ SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
+ (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
+ into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
+ SEC_LINK_ONCE, and look through the symbol table for the setting
+ for SEC_LINK_DUPLICATES.
+ (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
+ set for a section, find the section symbol in the symbol table,
+ and set the aux entry based on SEC_LINK_DUPLICATES.
+ * coffgen.c (coff_print_symbol): Add a space before "checksum".
+ * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
+ SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
+ * coff-i386.c (i386coff_vec): Likewise.
+ * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
+
+ * VERSION: Bump to 2.6.1.
+ * Makefile.in (stamp-h): Depend upon VERSION.
+
+Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
+ * libbfd.h: Rebuilt.
+ * linker.c (generic_link_hash_newfunc): No longer static.
+ * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
+ to override.
+ * coff-h8300.c: Add two derived hash tables and their associated
+ funtions and #defines for use by the h8300 linker.
+ (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
+ the function vector as needed. Place the address of the function
+ vector entry in the location specified by the R_MEM_INDIRECT reloc.
+ Rewrite the vectors section contents as necessary.
+ (h8300_bfd_link_add_symbols): New function for the h8300 linker.
+ (coff_bfd_link_add_symbols): Define to use h8300 specific version.
+ (coff_bfd_link_hash_table_create): Likewise.
+
+Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libhppa.h: If gcc 2.7 or higher, declare all the functions with
+ __attribute__ ((__unused__)) so that -Wall doesn't warn about
+ them.
+ (hppa_rebuild_insn): Pass pointer to correct type to
+ low_sign_unext and dis_assemble_21.
+
+Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
+ Stick with sparc-*-{sysv4*,solaris2*}.
+
+Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
+ (coff_swap_aux_out): Swap out extra PE x_scn fields.
+ * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
+ * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
+ fields is non-zero, print them.
+
+ * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
+ ifdef. Remove unused variables.
+ (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
+ variables.
+ (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
+ (get_symbol_value): Ifdef out.
+ (pe_ppc_reloc): Ifdef out. Remove unused variables.
+ (coff_ppc_relocate_section): Remove unused variables. Make
+ fprintf strings and argument types correspond. Put before_addr in
+ DEBUG_RELOC ifdef.
+ (dump_toc): Make fprintf strings and argument types correspond.
+ (ppc_process_before_allocation): Remove unused variables. Always
+ return a value.
+ (ppc_reflo_reloc): Ifdef out.
+ (ppc_addr32nb_reloc): Ifdef out.
+ (ppc_coff_rtype2howto): Make fprintf strings and argument types
+ correspond.
+ (coff_ppc_rtype_to_howto): Likewise.
+ (ppc_coff_swap_sym_in_hook): Remove unused variables.
+
+ * peicode.h (pe_print_idata): Move otherwise unused variables into
+ the #ifdef where they are used. Always return a value.
+ (pe_print_edata): Make fprintf strings and argument types
+ correspond. Always return a value.
+ (pe_print_pdata): Removed unused variable addr_value. Always
+ return a value.
+ (pe_print_reloc): Remove unused variable onaline. Make fprintf
+ strings and argument types correspond. Always return a value.
+
+ * elf32-ppc.c (ppc_elf_fake_sections): Return true.
+ (ppc_elf_finish_dynamic_symbol): Move definition of unused
+ variable rela inside #if 0 section where it is used.
+
+ * ns32k.h: New file.
+ * cpu-ns32k.h: Include ns32k.h. Rename externally visible
+ functions to start with _bfd_.
+ * aout-ns32k.c: Include ns32k.h. Change references to renamed
+ functions in cpu-ns32k.h.
+ * Makefile.in: Rebuild dependencies.
+ (HFILES): Add ns32k.h.
+
+ * section.c (struct sec): Add linker_mark field. Change
+ user_set_vma and reloc_done to be single bit fields.
+ (STD_SECTION): Update accordingly.
+ * bfd-in2.h: Rebuild.
+ * aoutx.h (NAME(aout,final_link)): Mark sections included in the
+ link.
+ (aout_link_input_bfd): Don't link unmarked sections.
+ * cofflink.c (_bfd_coff_final_link): Mark sections included in the
+ link.
+ (_bfd_coff_link_input_bfd): Don't link unmarked sections.
+ * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
+ the link.
+ * elflink.h (elf_bfd_final_link): Mark sections included in the
+ link.
+ (elf_link_input_bfd): Don't link unmarked sections.
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
+ in the link.
+ (xcoff_link_input_bfd): Don't link unmarked sections.
+
+ * coffswap.h (coff_swap_scnhdr_out): Include section name in
+ overflow error messages.
+
+Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
+ is not set, print "BFD: " before the error message.
+
+ * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
+ Miles Bader <miles@gnu.ai.mit.edu>.
+ * configure: Rebuild.
+
+Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
+ symbols.
+
+ * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
+ m68k-aout, m68k-coff, and m68k-elf targets.
+
+Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
+
+ * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
+ (ieee_generic_stat_arch_elt): Restructured to prevent
+ ieee_object_p from being called repeatedly.
+
+Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): Allocate
+ buffers large enough for any FILEHDR or AOUTHDR.
+
+Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * ecofflink.c (lookup_line): New static function, renamed and
+ slighly changed from old _bfd_ecoff_locate_line.
+ (_bfd_ecoff_locate_line): Cache line number information. Use
+ lookup_line for actual lookup.
+
+Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
+ multiple of 20 bytes.
+
+Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
+ allocate ecoff_find_line, and don't initialize by hand.
+ * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
+ mips_elf_find_line, and don't call memset.
+
+ * coffcode.h (coff_compute_section_file_positions): If not
+ producing a final executable, don't consider sofar when aligning
+ the section to the correct size.
+
+Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_add_missing_symbols): Ifdef out.
+ (coff_write_object_contents): Don't call coff_add_missing_symbols.
+ * coffgen.c (coff_section_symbol): Ifdef out.
+
+Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
+ output_bfd is not NULL.
+
+Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
+ of bfd_alloc (fixes fix_line not being initialized).
+ Delete zeroing of fix_{value,tag,end,scnlen} fields.
+
+Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coffcode.h: Allow specific backends to override the
+ bfd_link_add_symbols routine.
+
+ * coff-h8300.c: Include genlink.h.
+ (howto_table): Add R_MEM_INDIRECT.
+ (rtype2howto): Support R_MEM_INDIRECT.
+ (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
+ for now.
+
+Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
+
+ * coff-alpha.c (alpha_relocate_section): Use
+ info->callbacks_warning, rather than _bfd_error_handler, for
+ "multiple gp" warning.
+
+Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * linker.c (bfd_wrapped_link_hash_lookup): New function.
+ (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
+ table string. Use bfd_wrapped_link_hash_lookup.
+ (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
+ table string.
+ * aoutx.h (aout_link_write_symbols): Use the name from the hash
+ table, if any, when writing out symbols.
+ (aout_link_input_section_std): Use the name from the hash table,
+ if any, when reporting undefined symbols.
+ (aout_link_input_section_ext): Likewise.
+ (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
+ * bout.c (get_value): Likewise.
+ * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
+ * ecoff.c (ecoff_reloc_link_order): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Likewise.
+ (elf_reloc_link_order): Likewise.
+ * linker.c (_bfd_generic_link_output_symbols): Likewise.
+ (_bfd_generic_reloc_link_order): Likewise.
+ (default_indirect_link_order): Likewise.
+ * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
+ * sunos.c (sunos_add_one_symbol): Likewise.
+ * xcofflink.c (xcoff_link_add_symbols): Likewise.
+ (bfd_xcoff_link_count_reloc): Likewise.
+ (xcoff_reloc_link_order): Likewise.
+
+ * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
+ into -1 for intern->rss.
+
+ * configure: Rebuild with autoconf 2.8.
+
+Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * stab-syms.c (__define_stab_duplicate): Define.
+ (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
+ switch.
+ * bfd-in.h (bfd_get_stab_name): Declare.
+ * bfd-in2.h: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD_LIBS): Add stab-syms.o.
+ (BFD_LIBS_CFILES): Add stab-syms.c.
+ (BFD32_BACKENDS): Remove stab-syms.o.
+ (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
+ * configure.in: Don't list stab-syms.o in bfd_backends.
+ * configure: Rebuild.
+ * libaout.h (aout_stab_name): Don't declare.
+ * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
+ not aout_stab_name.
+
+Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Adjust file offset
+ for section alignment even if SEC_LOAD is not set.
+
+Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Don't set SHLIB or SHLINK to an empty string,
+ since they appear as targets in Makefile.in.
+ * configure: Rebuild.
+
+ * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
+ don't fiddle with a symbol which is not defined anywhere.
+
+Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
+ though they are defined in a shared library.
+ (xcoff_build_ldsyms): Likewise.
+
+ * coffgen.c (coff_find_nearest_line): Don't look at the line
+ numbers for the section if section->lineno is NULL.
+
+ * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
+ message rather than calling BFD_ASSERT.
+ * elfcode.h (write_relocs): Check return value of
+ _bfd_elf_symbol_from_bfd_symbol.
+
+Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
+ for .sbss section.
+
+Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
+ and R_HPPA_NLRSEL.
+ (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
+ hppa_reloc_field_selector_type_alt.
+ (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
+ * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
+ selectors.
+ (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
+
+Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Adjust the segment
+ memory size for the alignment of a SEC_ALLOC section, not just a
+ SEC_LOAD section.
+
+Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * m68klinux.c: New file.
+ * hosts/m68klinux.h: New file.
+ * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
+ * configure.in (m68*-*-linux*): New native host.
+ (m68klinux_vec): New vector.
+ * configure: Rebuild.
+ * targets.c (m68klinux_vec): Declare.
+ * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
+ bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
+ * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
+ declaration from bfd_linux_size_dynamic_sections.
+ (bfd_m68klinux_size_dynamic_sections): Declare.
+ * bfd-in2.h: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add m68klinux.o.
+ (BFD32_BACKENDS_CFILES): Add m68klinux.c.
+
+Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libhppa.h (pa_arch): Add pa20.
+ (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
+ (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
+ (hppa_field_adjust): Handle e_nsel.
+ * som.c: Provide default definitions for many new relocs found only
+ in hpux10 include files.
+ (som_fixup_formats): Add several new relocs from hpux10.
+ (som_hppa_howto_table): Add hpux10 relocs.
+ (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
+
+Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-make.sed: Edit out recent shared library support, and
+ rules to rebuild .h files using doc/chew.
+
+Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
+
+ * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
+ size even of sections with no contents.
+
+Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
+ starting with '$' the way we skip names starting with '.'. When
+ updating x_endndx, don't be fooled by an index which has been
+ merged.
+
+ * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
+ struct/union/enum type with no elements.
+
+Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
+
+ * archive.c (bfd_generic_archive_p): If the first file in the
+ archive can not be recognized as an object, don't assume that this
+ is the wrong format.
+
+ * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
+ format is not bfd_object.
+ (bfd_elf_get_dt_soname): Likewise.
+
+Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
+ reloc.
+
+Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * bfd.c (tdata): Add netbsd_core_data.
+ * bfd-in2.h: Regenerated.
+
+Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * sunos.c (SUNOS_CONSTRUCTOR): Define.
+ (sunos_add_one_symbol): Don't let a symbol from a dynamic object
+ override a constructor symbol. Set SUNOS_CONSTRUCTOR when
+ appropriate.
+
+ * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
+ to get the symbol index, matching 14 Jul 95 change.
+
+Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
+
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
+ Remove duplicate definition of gp.
+
+Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
+ assume that we can set the GP value and then get the same value,
+ since it won't be true if the output file is neither ELF nor
+ ECOFF.
+ * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
+ _bfd_get_gp_value here.
+ (mips_gprel_reloc): Don't assume we can set and get the GP value.
+ * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
+ mips_elf_final_gp.
+ (mips_elf_lo16_reloc): Likewise.
+ (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
+ Don't require that the BFD be ELF.
+ (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
+ (mips_elf_gprel32_reloc): Likewise.
+ (mips_elf_relocate_section): Don't assume we can set and get the
+ GP value.
+ (mips_elf_finish_dynamic_symbol): Don't bother to use
+ _bfd_get_gp_value here.
+
+ * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
+ Don't change epdr between malloc and free. Be careful not to free
+ NULL pointers. Zero out the first RPDR.
+
+ * configure.host: On Linux, only pass -rpath option if $(libdir)
+ is neither /lib nor /usr/lib. From Alan Modra
+ <alan@mullet.Levels.UniSA.Edu.Au>.
+
+ * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
+ dt_name.
+ (elf_dt_name): Rename from elf_dt_needed_name.
+ * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
+ elf_dt_needed_name.
+ (bfd_elf_get_dt_soname): New function.
+ * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
+ elf_dt_needed_name. Save the SONAME back in elf_dt_name.
+ * bfd-in.h (bfd_elf_get_dt_soname): Declare.
+ * bfd-in2.h: Rebuild.
+
+Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
+ _bfd_sparc_elf_reloc_type_lookup.
+ (bfd_elf32_bfd_reloc_type_lookup): Update.
+ * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
+ (sparc64_elf_howto_table): Define.
+ (sparc_reloc_map): Define.
+ (sparc64_elf_reloc_type_lookup): New function.
+ (sparc_elf_wdisp16_reloc): New function.
+ (elf_info_to_howto): Use sparc64_elf_howto_table.
+ (sparc64_elf_relocate_section): Likewise.
+ (bfd_elf64_bfd_reloc_type_lookup): Update.
+
+Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Check for 'do not mix' from native linker before
+ trying to use -rpath.
+
+Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd.c (_bfd_get_gp_value): New function.
+ (_bfd_set_gp_value): New function.
+ * libbfd-in.h (_bfd_get_gp_value): Declare.
+ (_bfd_set_gp_value): Declare.
+ * libbfd.h: Rebuild.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
+ _bfd_get_gp_value and _bfd_set_gp_value rather than referring
+ directly to the fields in the tdata information.
+ (alpha_relocate_section): Likewise.
+ * coff-mips.c (mips_adjust_reloc_in): Likewise.
+ (mips_gprel_reloc): Likewise.
+ (mips_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
+ (mips_elf_lo16_reloc): Likewise.
+ (mips_elf_final_gp): Likewise.
+ (mips_elf_gprel16_reloc): Likewise.
+ (mips_elf_gprel32_reloc): Likewise.
+ (mips_elf_relocate_section): Likewise.
+ (mips_elf_finish_dynamic_symbol): Likewise.
+
+ * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
+
+Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Call AC_PROG_CC before configure.host.
+ * configure: Rebuild.
+ * configure.host: Don't set information which autoconf should
+ figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
+
+ * configure.host: Remove go32 and win32 host information, since it
+ should no longer be needed.
+
+ * elf.c (map_sections_to_segments): If we have a .dynamic section,
+ then start a new segment rather than put a writable section in a
+ readonly segment.
+
+ * configure.host: Set RPATH_ENVVAR.
+
+ * Makefile.in: Rebuild dependencies.
+
+ * elflink.c (_bfd_elf_create_linker_section): Remove unused
+ zero_section variable.
+
+Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
+
+ * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
+ ($(srcdir)/libbfd.h): Rename from libbfd.h.
+ ($(srcdir)/libcoff.h): Rename from libcoff.h.
+
+Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
+
+ * ieee.c (ieee_write_expression): Only use an R variable for a
+ local symbol. Don't output a zero offset. Handle a zero address.
+ (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
+ (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
+ PCREL_OFFSET.
+ (parse_expression): Don't try to handle multiple occurrences of a
+ P variable. Handle I variables differently from X variables. Fix
+ the order of minus expressions.
+ (ieee_slurp_external_symbols): Generate an I variable for an NN
+ record. Fix handling of ATI and ATX records.
+ (ieee_slurp_sections): Only set minimal section attributes.
+ Adjust them later, based on the section contents.
+ (ieee_object_p): Read in the file until just after the ME record.
+ Call ieee_slurp_section_data to set the section flags.
+ (do_one): Add iterations parameter. Only repeat the first load
+ item. Set the section and file reloc flags.
+ (ieee_slurp_section_data): Set section flags. Pass iterations to
+ do_one.
+ (ieee_canonicalize_reloc): Handle I variables.
+ (do_with_relocs): Only emit relocation size when necessary.
+ Increase MAXRUN to 127. Change ov to be assigned, and take
+ src_mask and pcrel_offset into account.
+ (ieee_write_data_part): Skip sections that are not loaded.
+ (ieee_write_external_part): Don't output optional last entry of WX
+ records.
+ (ieee_write_me_part): Make setting of me_record neater.
+ (ieee_generic_stat_arch_elt): Get the size of an archive element.
+
+ * syms.c (stt): Add entries for zerovars, vars, and code.
+
+ * elfcode.h (validate_reloc): New static function.
+ (write_relocs): Call validate_reloc for non ELF relocs.
+
+ * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
+ (TARGET_BIG_SYM): Use elf_symbol_leading_char.
+ (TARGET_LITTLE_SYM): Likewise.
+
+ * config.bfd (m68*-*-psos*): New target.
+
+Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
+
+ * i386msdos.c: Remove some #if 0 code.
+ (msdos_write_object_contents): Don't include empty sections in the
+ size computation, regardless of their address.
+
+Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
+ is NULL, ie, the -r switch is used.
+
+Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
+ (BFD_RELOC_MIPS_GOT_LO16): Define.
+ (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * elf32-mips.c (mips_reloc_map): Map new relocs.
+
+ * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
+
+ * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
+ $(SHLINK).
+
+ * ieee.c (get_symbol): Set the section to bfd_abs_section.
+ (do_with_relocs): If EXEC_P is set and there are no relocs, use a
+ simple number for the section address, rather than an expression.
+ Limit the number of bytes between relocs to MAXRUN.
+ (ieee_write_me_part): Set me_record to the file offset after the
+ start address.
+ (ieee_write_processor): New static function.
+ (ieee_write_object_contents): Use ieee_write_processor.
+
+Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
+
+ * coff-aux.c: Change include of aux.h to aux-coff.h.
+
+Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
+ relocation put the addend both in the reloc entry and the data.
+ (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
+ GOT offset value.
+
+ * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
+ a R_68K_PCxx reloc against a defined global symbol directly.
+ (elf_m68k_check_relocs): Don't count such a reloc.
+
+ * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
+ a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
+ symbol for now, otherwise always record the symbol as dynamic.
+ (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
+ is not referenced by a dynamic object, and we are not making a
+ shared object, then don't make a PLT entry. If we do make a PLT
+ entry, make sure the symbol has been recorded as dynamic.
+
+Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: When making a shared library, set HLDFLAGS to
+ pass an appropriate -rpath option. Use the make variable SONAME
+ as the shared library soname, rather than computing it here. On
+ SunOS, build stamp-tshlink in place of $(SHLINK).
+ * Makefile.in (SONAME): New variable.
+ ($(SHLINK)): Make a link to the transformed name, as well.
+ (stamp-tshlink): New target.
+ (install): Skip stamp-tshlink during install.
+
+Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
+ linker sections have been set up yet.
+
+ * elf.c (make_mapping): Add an additional argument to suppress
+ making the first section include the program headers.
+ (map_sections_to_segments): If the user used -Ttext such that the
+ program headers are on a different page, do not set the flags
+ saying that this section includes the program headers.
+
+Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
+ don't define TRAD_HEADER.
+ * configure: Rebuild.
+
+ * netbsd-core.c: New file, support for NetBSD core files.
+ * hosts/*nbsd.h: Removed.
+
+Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
+ (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
+ * libbfd.h, bfd-in2.h: Regenerated.
+ * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
+ bfd_elf32_bfd_reloc_type_lookup.
+ (reloc_type{,_names}): Deleted.
+ (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
+ Add sparc64 relocs.
+ (sparc_reloc_map): Add sparc64 relocs.
+ (sparc_elf_notsupported_reloc): New static function.
+ (sparc_elf_wdisp16_reloc): New static function.
+ (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
+ (elf32_sparc_relocate_section): Likewise.
+ (bfd_elf32_bfd_reloc_type_lookup): Define.
+ * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
+ (reloc_type{,_names}): Deleted.
+ (elf_sparc_howto_table): Deleted.
+ (sparc_reloc_map): Deleted.
+ (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
+ (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
+
+Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
+ *-*-hpux* host.
+
+ * Makefile.in (program_transform_name): New variable.
+ (install): Transform library name before installing it.
+
+Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * archures.c (bfd_mach_i960_hx): Define.
+ * bfd-in2.h: Rebuild.
+ * cpu-i960.c (scan_960_mach): Accept machine "hx".
+ (MATRIX): Expand entries for HX.
+ (arch_info_struct): Add i960:hx entry.
+ * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
+ * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
+ (coff_set_flags): Handle bfd_mach_i960_hx.
+
+ Support for building as a shared library, based on patches from
+ Alan Modra <alan@spri.levels.unisa.edu.au>:
+ * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
+ New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
+ SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
+ * configure: Rebuild.
+ * configure.host: If --enable-shared, adjust shared library stuff
+ based on the host. If the host is SunOS, and the linker supports
+ -rpath, set HLDFLAGS to use it.
+ * Makefile.in (ALLLIBS): New variable.
+ (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
+ (COMMON_SHLIB, SHLINK): New variables.
+ (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
+ (STAGESTUFF): Remove variable.
+ (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
+ $(TARGETLIB).
+ (stamp-ofiles): New target, like old ofiles target, but build
+ using a temporary file and move-if-change, and touch stamp-ofiles
+ when done.
+ (ofiles): Just depend upon stamp-ofiles.
+ (stamp-piclist, piclist): New targets.
+ ($(SHLIB), $(SHLINK)): New targets.
+ (targets.o, archures.o): Build twice if PICFLAG is set.
+ (do_mostlyclean): Remove pic/*.o.
+ (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
+ stamp-piclist.
+ (do_distclean): Remove pic and stamp-picdir.
+ (install): Install shared libraries.
+ ($(OFILES)): Depend upon stamp-picdir.
+ (stamp-picdir): New target.
+
+ * libcoff-in.h: Add comment reminding people that libcoff.h is a
+ generated file.
+ * libcoff.h: Rebuild.
+
+ * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
+ flavour of a section with no owner.
+
+ * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
+ ELF_LINK_NON_ELF flag.
+ (mips_elf_create_got_section): Likewise.
+
+ * elf.c: Revert last change, since it breaks dynamic linking.
+ * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
+ field.
+ * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
+ * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
+ (elfNN_bed): Don't initialize want_hdr_in_seg field.
+
+Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): If the backend does
+ not want the elf header or the program headers in the address
+ space, do not include them in the calculations.
+
+ * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
+ function to determine if we need additional program headers.
+ (ppc_elf_modify_segment_map): Define as a NOP function for now.
+ (ppc_elf_create_linker_section): .sdata2 is a read-only section.
+
+Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h: Move today's libcoff.h change into coffcode.h.
+
+Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
+
+ * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
+ back into one line. Some compilers (sunos 4.1.3 for example)
+ won't accept args split across more than one line.
+
+Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
+ * configure: Regenerate.
+
+Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
+
+ * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
+ try to do arithmetic on a void *, cast it to a unsigned char * first.
+
+Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf-bfd.h (ELF_LINK_NON_ELF): Define.
+ * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
+ ELF_LINK_NON_ELF.
+ * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
+ flag for a newly defined symbol.
+ (NAME(bfd_elf,record_link_assignment)): Likewise.
+ (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
+ set the DEF or REF_REGULAR flags correctly.
+
+ * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
+ (libbfd.h, libcoff.h): Corresponding change.
+
+ * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
+ a PLT32 reloc as dynamic.
+ (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
+ is not referenced by a dynamic object, and we are not making a
+ shared object, then don't make a PLT entry. If we do make a PLT
+ entry, make sure the symbol has been recorded as dynamic.
+
+Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
+ * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
+ (powerpcle-*-cygwin32): New.
+ * peicode.h (add_data_entry): Get address from vma.
+
+Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elflink.c (_bfd_elf_create_linker_section): If the symbol
+ attached to the section has already been created as an undefined
+ symbol, treat it as if it hasn't been created yet.
+
+Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_bfd_final_link): Don't output initial dummy
+ symbol or section symbols if stripping all symbols and this is not
+ a relocateable link. Don't output the symbol string table if
+ there are no symbols.
+ (elf_link_flush_output_syms): Don't do anything if there are no
+ symbols to flush.
+
+Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
+
+ * coff-aux.c: New file.
+ * hosts/m68kaux.h: New file.
+ * config.bfd (m68*-apple-aux*): New target.
+ * configure.in (m68*-apple-aux*): New native host.
+ (m68kaux_coff_vec): New vector.
+ * configure: Rebuild.
+ * targets.c (m68kaux_coff_vec): Declare.
+ * coffcode.h (bfd_coff_backend_data): Add field
+ _bfd_coff_link_add_one_symbol.
+ (bfd_coff_link_add_one_symbol): Define.
+ (compare_arelent_ptr): New static function if TARG_AUX.
+ (coff_write_relocs): If TARG_AUX, sort the relocs.
+ (coff_write_object_contents): Set A/UX aouthdr magic number.
+ (coff_link_add_one_symbol): Define if not defined.
+ (bfd_coff_std_swap_table): Initialize new field.
+ * libcoff.h: Rebuild.
+ * cofflink.c (coff_link_add_symbols): Call
+ bfd_coff_link_add_one_symbol rather than
+ _bfd_generic_link_add_one_symbol.
+ * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
+ * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
+ * coff-mips.c (mips_ecoff_backend_data): Likewise.
+ * Makefile.in: Rebuild dependencies.
+ (BFD32_BACKENDS): Add coff-aux.o.
+ (BFD32_BACKENDS_CFILES): Add coff-aux.c.
+
+Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
+ relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
+
+Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
+ $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
+ (maintainer-clean): Warn about deleting special files.
+ (bfd-in2.h, libbfd.h, libcoff.h): New targets.
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
+ warning symbols correctly.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * 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-sparc.c (sparc64_elf_relocate_section): Likewise.
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
+ warnings.
+
+Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
+
+ * libcoff-in.h: aligned newly exported names with bfd naming
+ conventions. Removed an erroneous define of POWERPC_LE_PE.
+ * libcoff.h: Rebuild.
+ * cofflink.c, coff-ppc.c: the above function name changes
+
+Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
+ * ecoff.c (struct extsym_info): Define.
+ (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
+ to ecoff_link_write_external.
+ (ecoff_link_write_external): Accept a struct extsym_info pointer.
+ Strip symbols when appropriate.
+
+ Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
+ * syms.c (BSF_OBJECT): Define.
+ (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
+ * bfd-in2.h: Rebuild.
+ * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
+ STT_OBJECT symbol.
+ * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
+ is set.
+
+ * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
+ copying relocs into a shared object, treat a defined global symbol
+ as a local symbol.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
+ * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
+ real defined symbol, not to a weak defined symbol.
+
+Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
+
+ * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
+ and made a few static functions externs.
+
+ * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
+ POWERPC_LE_PE hack in cofflink.
+
+ * libcoff-in.h: promoted the following from cofflink.c to allow
+ _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
+ coff_debug_merge_element, struct coff_debug_merge_type,
+ coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
+ coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
+ coff_debug_merge_hash_lookup, coff_link_section_info,
+ coff_final_link_info, coff_debug_merge_hash_newfunc,
+ coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
+
+ * libcoff.h: re-gen'd
+
+Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * syms.c: Include "bfdlink.h".
+ (struct stab_find_info): Define.
+ (_bfd_stab_section_find_nearest_line): New function.
+ * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
+ * libbfd.h: Rebuild.
+ * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
+ * elf.c (_bfd_elf_find_nearest_line): Try calling
+ _bfd_stab_section_find_nearest_line before searching the ELF
+ symbol table. Find the closest STT_FUNC symbol, not the last one.
+ * libcoff-in.h (coff_data_type): Add line_info field.
+ * libcoff.h: Rebuild.
+ * coffgen.c (coff_find_nearest_line): Try calling
+ _bfd_stab_section_find_nearest_line before searching the COFF
+ symbol table.
+ * Makefile.in: Rebuild dependencies.
+
+Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
+ 4 bytes, so we get the correct value when updating the register
+ field in little endian mode.
+
+Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
+ entry_section fields. Add sntoc and snentry fields.
+ * libcoff.h: Rebuild.
+ * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
+ not toc_section and entry_section (the COFF file does not have any
+ sections at this point).
+ (coff_write_object_contents): Set o_snentry and o_sntoc from
+ snentry and sntoc rather than entry_section and toc_section.
+ * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
+ snentry, not toc_section and entry_section.
+ * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
+ entry_section from hentry.
+ (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
+ set snenty.
+ (xcoff_link_input_bfd): Set sntoc, not toc_section.
+ (xcoff_write_global_symbol): Get toc_section from sntoc, rather
+ than using toc_section directly.
+
+ * archures.c: Add missing `.' in enum bfd_architecture.
+ * bfd-in2.h: Rebuild.
+
+ * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
+ Robert Lipe <robertl@arnet.com>.
+
+Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
+ to sections we allocate. Use bfd_zalloc to allocate initialial
+ sections, not bfd_alloc.
+ (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
+ SDA{,2}I16 relocations.
+ (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
+ whether to put something in .sbss or not.
+ (ppc_elf_relocate_section): Add support for more relocations. Add
+ in sec->output_offset where appropriate. Make error messages
+ include the symbol name.
+
+ * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
+ trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
+ doesn't get redefined messages if -shared.
+
+ * elflink.h (elf_create_pointer_linker_section) Only bump RELA
+ section if the rel_section field has been set up.
+
+Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
+ relocations.
+
+Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
+ of flags, only flags used are controlled by mach number. Bump up
+ output file mach number to highest of input file mach numbers.
+ (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
+ (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
+
+ * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
+ bfd_elf64_sparc_vec support.
+
+Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
+ the embedded bit is set on some objects and not on others. Just
+ or it together.
+ (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
+ relocations.
+
+Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_new_section_hook): Don't try to align the
+ .stabstr section.
+
+ * coffcode.h (coff_set_section_contents): Fix the handling of the
+ .lib section to work even if the entire section contents are
+ written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
+ Robert Lipe <robertl@arnet.com>.
+
+Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elflink.h (elf_finish_pointer_linker_section): Don't allocate
+ memory here for contents.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
+ _SDA2_BASE_ by 32768.
+ (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
+ started using. Allocate contents for .sdata and .sdata2 sections
+ also.
+ (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
+ rather than _name.
+ (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
+ size _SDA{,2}_BASE_.
+ (ppc_elf_relocate_section): Change how sdata{,2} relocations are
+ done.
+
+Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * elflink.h (elf_finish_pointer_linker_section): Fix typo.
+
+ * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
+ (bfd_mach_sparc_{v8plus,v8plusa}): Define.
+ (bfd_mach_sparc_v9a): Define.
+ (bfd_mach_sparc_v9_p): Define.
+ * bfd-in2.h: Regenerated.
+ * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
+ bfd_mach_sparc_v9.
+ * elf64-sparc.c (sparc64_elf_object_p): Likewise.
+ * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
+ to bfd_elf32_sparc_vec.
+ * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
+ Add v8plus{,a} support.
+ Add v9a support.
+ (sparc_compatible): New function.
+ * elf32-sparc.h: #include "elf/sparc.h".
+ (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
+ elf32_sparc_final_write_processing): New functions.
+ (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
+ elf_backend_final_write_processing): Define.
+
+Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf-bfd.h (struct elf_link_hash_entry): Add
+ linker_section_pointer field.
+ (enum elf_linker_section_enum): Enumeration for new way of
+ creating linker dynamic sections and symbols.
+ (elf_linker_section{,_pointers}): New structures for creating
+ dynamic sections and symbols.
+ (elf_obj_tdata): Add linker_section_pointers and linker_section
+ fields.
+ (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
+ (_bfd_elf_create_linker_section): New declarations.
+ (_bfd_elf_find_pointer_linker_section): Ditto.
+ (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
+ (_bfd_elf_make_linker_section_rela): Ditto.
+
+ * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
+
+ * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
+ (ppc_elf_create_linker_section): New function to create the
+ sections .got, .sdata, and .sdata2.
+ (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
+ needed.
+ (ppc_elf_check_relocs): Support more of the eabi relocations.
+ (ppc_elf_relocate_section): Ditto.
+ (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
+ if the .sdata{,2} + .sbss{,2} section size is > 32k.
+
+ * elflink.h (elf_create_pointer_linker_section): New function to
+ create initialized pointers in dynamic linker sections.
+ (elf_finish_pointer_linker_section): Actually intialize the
+ pointers created above.
+
+ * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
+ macros to provide both 32 and 64 bit versions of
+ elf_create_pointer_linker_section.
+ (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
+ provide both 32 and 64 bit versions of
+ elf_finish_pointer_linker_section.
+
+ * elflink.c (_bfd_elf_create_linker_section): New function to
+ create a linker section.
+ (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
+ given address in the linker pointer offsets created for a given
+ symbol.
+ (_bfd_elf_make_linker_section_rela): Make a RELA section
+ corresponding to the generated linker section.
+
+Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
+
+Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
+
+ * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
+ (coff_ppc_relocate_section): Handle special values for gcc built dlls.
+ (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
+ Also begin the toc at 4 as an eye catcher ('31313131' marks the first
+ toc entry in an objdump) for now.
+ (ppc_do_last, ppc_get_last): New function - needed to save processing
+ the toc owner to the end.
+ (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
+ toc owner last.
+
+ * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
+ toc owner from being done till last. Must define POWERPC_LE_PC
+ to enable it.
+
+ * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
+
+ * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
+ to INFO.
+ (coff_swap_aouthdr_out): Removed a non-working hack for computing the
+ SizeOfImage for PowerPC. Ignore the size of the .junk section.
+
+Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elfcore.h: Include <signal.h> before <sys/procfs.h>.
+
+Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * cpu-powerpc.c (arch_info_struct): Change last entry to not point
+ back to first.
+ (bfd_powerpc_arch): Point at first entry in arch_info_struct.
+
+Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Don't increment file
+ offset for a segment which contains no loadable sections.
+
+Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * reloc.c: Add new PowerPC relocations.
+ * {bfd-in2,libbfd}.h: Regenerate.
+
+ * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
+ (ppc_elf_reloc_type_lookup): Lookup new relocations.
+
+Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
+ entries.
+
+ * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
+ info->shared.
+
+ * coffgen.c (coff_find_nearest_line): Don't try to cache
+ information in sections that are not owned by a BFD. From Richard
+ Henderson <richard@atheist.tamu.edu>.
+
+ * elf32-mips.c: Numerous changes to dynamic linking code, mostly
+ from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+ * elflink.h (elf_link_output_extsym): Remove special check for
+ _rld_new_interface.
+
+ * ecoffswap.h: Add prototypes for static functions.
+
+Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
+ (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
+ references.
+ (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
+ to satisfy a TOC16 relocation. Rewrite unsupported relocation
+ support. Begin support for R_PPC_SDA{2,}REL.
+
+Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
+ create the .got and .got.neg sections.
+ (ppc_elf_size_dynamic_sections): Call it.
+ (ppc_elf_check_relocs): Call it.
+ (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
+ (ppc_elf_check_relocs): Add error messages for relocations we
+ don't yet support. Do not include R_PPC_SDAREL16 like a GOT
+ relocation.
+
+Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
+ section flags for V.4 and eabi.
+
+Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): If a segment
+ contains no sections, don't mark it as readable.
+
+ * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
+ * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
+ dynamic section, if there is one.
+ * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
+ (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
+ (bfd_elf64_swap_dyn_in): Likewise.
+ * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
+ PTR.
+ (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
+ DT_TEXTREL entry because of .rel.plt. From Martin Pirker
+ <pirker@eiunix.tuwien.ac.at>.
+
+Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
+ PowerPC V.4 and eabi.
+ * bfd-in2.h: Regenerate.
+ * libfd.h: Regenerate.
+
+ * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
+
+ * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
+ section type and SHF_EXCLUDE section flag, turning them into the
+ appropriate bfd section flag.
+
+Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Create the special
+ sections if we see a DYNAMIC object, in case that is the only
+ XCOFF input object we see.
+
+ * elf32-mips.c: Extensive changes for a start at dynamic linking
+ support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+
+ * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
+ (struct elf_backend_data): Remove
+ elf_backend_create_program_headers field. Add
+ elf_backend_additional_program_headers and
+ elf_backend_modify_segment_map fields.
+ * elfxx-target.h (elf_backend_type_change_ok): Define if not
+ defined.
+ (elf_backend_additional_program_headers): Likewise.
+ (elf_backend_modify_segment_map): Likewise.
+ (elf_backend_create_program_headers): Don't define.
+ (elfNN_bed): Change to account for field changes.
+ * elf.c (assign_file_positions_for_segments): Call new
+ modify_segment_map backend function. Don't call old
+ create_program_headers backend function.
+ (get_program_header_size): Call additional_program_headers rather
+ than create_program_headers.
+ * elflink.h (elf_link_add_object_symbols): Initialize
+ type_change_ok from new backend field.
+ (elf_link_output_extsym): Don't warn if _rld_new_interface is
+ defined.
+ (elf_reloc_link_order): Treat a reloc against a defined symbol as
+ a reloc against the appropriate section.
+
+ * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
+ (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
+ (elf_flags_init): Rename from elf_ppc_flags_init.
+ * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
+ elf_ppc_flags_init.
+ (ppc_elf_copy_private_bfd_data): Likewise.
+ (ppc_elf_merge_private_bfd_data): Likewise.
+
+ * elf32-m68k.c (howto_table): Change src_mask to 0 for all
+ relocation entries.
+
+Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * coff-alpha.c (alpha_relocate_section): During final link, allow
+ output .lita section to be bigger than 64k by adjusting gp value
+ on a per-input section basis.
+ * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
+ field.
+ (struct ecoff_section_tdata): Add gp field.
+
+Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ Handle Alpha ECOFF changes in OSF/1 3.2.
+ * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
+ field.
+ * coff-alpha.c: Include "aout/ar.h".
+ (alpha_ecoff_get_relocated_section_contents): Don't require an
+ ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
+ 3.2 doesn't generate one.
+ (alpha_relocate_section): Likewise.
+ (alpha_ecoff_slurp_armap): Define.
+ (alpha_ecoff_slurp_extended_name_table): Define.
+ (alpha_ecoff_construct_extended_name_table): Define.
+ (alpha_ecoff_truncate_arname): Define.
+ (alpha_ecoff_write_armap): Define.
+ (alpha_ecoff_generic_stat_arch_elt): Define.
+ (alpha_ecoff_update_armap_timestamp): Define.
+ (ARFZMAG): Define.
+ (alpha_ecoff_read_ar_hdr): New static function.
+ (alpha_ecoff_get_elt_at_filepos): New static function.
+ (alpha_ecoff_openr_next_archived_file): New static function.
+ (alpha_ecoff_get_elt_at_index): New static function.
+ (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
+ (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
+ _bfd_ecoff to alpha_ecoff.
+ * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
+ field from backend structure, rather than always calling
+ _bfd_get_elt_at_filepos.
+ * coff-mips.c (mips_ecoff_backend_data): Initialize
+ get_elt_at_filepos field.
+ * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
+ from _bfd_generic_read_ar_hdr with minor changes.
+ (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
+ * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
+ * libbfd.h: Rebuild.
+
+ * bfd-in.h (BFD_IN_MEMORY): Define.
+ * libbfd-in.h (struct bfd_in_memory): Define.
+ * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
+ (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
+ (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
+ (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
+ * bfd.c (struct _bfd): Change iostream field from char * to PTR.
+ (bfd_get_size): Handle BFD_IN_MEMORY flag.
+ * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
+ (bfd_open_file): Cast to PTR, not char *, when setting iostream.
+ (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
+ * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
+ iostream.
+ (bfd_openstreamr): Likewise.
+ * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
+ BFD_IN_MEMORY is not set.
+ * riscix.c (riscix_some_aout_object_p): Likewise.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+ * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
+ (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
+ (bfd_get_elt_at_index): Define.
+ * archive.c (_bfd_generic_get_elt_at_index): Rename from
+ bfd_get_elt_at_index. Change index parameter from int to
+ symindex.
+ * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
+ (_bfd_noarchive_get_elt_at_index): Define.
+ (_bfd_archive_bsd_get_elt_at_index): Define.
+ (_bfd_archive_coff_get_elt_at_index): Define.
+ * bfd-in2.h, libbfd.h: Rebuild.
+ * aout-target.h (MY_get_elt_at_index): Define if not defined.
+ * coff-rs6000.c (xcoff_get_elt_at_index): Define.
+ * ieee.c (ieee_get_elt_at_index): Define.
+ * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
+ * oasys.c (oasys_get_elt_at_index): Define.
+ * som.c (som_get_elt_at_index): Define.
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
+ numbers to the .text section.
+
+Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_write_debug_part): Change return type to boolean.
+ If there is a SEC_DEBUGGING section, get the contents of the debug
+ information part from it.
+ (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
+ section in memory.
+ (ieee_write_object_contents): Check ieee_write_debug_part return.
+
+Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
+
+ * config.bfd (i[345]86-*-freebsd*): Add target.
+ * configure.in (i386freebsd_vec): Add vec.
+ * configure: Regenerate.
+ * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
+ (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
+ Rebuild dependencies..
+ * freebsd.h: New file.
+ * i386freebsd.c: New file.
+ * targets.c (i386freebsd_vec): Declare.
+ (bfd_target_vector): Add i386freebsd_vec.
+ * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
+ * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
+
+Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_slurp_debug): New static function.
+ (ieee_object_p): Call it.
+ (ieee_slurp_section_data): Skip debugging sections.
+ (ieee_get_reloc_upper_bound): Likewise.
+ (ieee_get_section_contents): Likewise.
+ (ieee_canonicalize_reloc): Likewise.
+ (ieee_write_section_part): Likewise.
+ (ieee_write_debug_part): Likewise.
+ (ieee_write_data_part): Likewise.
+ (init_for_output): Likewise.
+
+Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
+ work.
+ (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
+ relocs, since ppc_elf_relocate_section handles the linker case.
+ (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
+ used.
+ (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
+ ppc_elf_relocate_section since that is now the only caller.
+ (ppc_elf_relocate_section): Ditto.
+
+Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * coffcode.h (coff_write_object_contents): If we don't know the
+ section of the entry point for an XCOFF executable, always set the
+ entry address to -1.
+
+Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * elf.c (bfd_section_from_shdr): Add support for note sections.
+
+Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfd-in.h (struct _symbol_info): Add stab_type field.
+ * bfd-in2.h: Rebuild.
+ * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
+
+ * elf32-ppc.c: Remove trailing newline from calls to
+ _bfd_error_handler.
+ (ppc_elf_merge_private_bfd_data): Only warn about endianness
+ difference if target endianness is known.
+
+For older changes see ChangeLog-9495
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am
index b8e5544..2d38959 100644
--- a/contrib/binutils/bfd/Makefile.am
+++ b/contrib/binutils/bfd/Makefile.am
@@ -4,9 +4,9 @@ AUTOMAKE_OPTIONS = cygnus
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-DEP = mkdep
+MKDEP = gcc -MM
-SUBDIRS = doc
+SUBDIRS = doc po
docdir = doc
@@ -41,25 +41,32 @@ ALL_MACHINES = \
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-mips.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 \
@@ -71,24 +78,32 @@ ALL_MACHINES_CFILES = \
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-mips.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 \
@@ -105,6 +120,7 @@ BFD32_BACKENDS = \
aout-tic30.lo \
aout0.lo \
aout32.lo \
+ armnetbsd.lo \
bout.lo \
cf-i386lynx.lo \
cf-m68klynx.lo \
@@ -129,33 +145,45 @@ BFD32_BACKENDS = \
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-hppa.lo \
+ elf32-i370.lo \
elf32-i386.lo \
elf32-i860.lo \
+ elf32-i960.lo \
elf32-m32r.lo \
elf32-m68k.lo \
elf32-m88k.lo \
- elf32-mips.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 \
@@ -189,8 +217,15 @@ BFD32_BACKENDS = \
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 \
@@ -200,6 +235,11 @@ BFD32_BACKENDS = \
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 = \
@@ -210,6 +250,7 @@ BFD32_BACKENDS_CFILES = \
aout-tic30.c \
aout0.c \
aout32.c \
+ armnetbsd.c \
bout.c \
cf-i386lynx.c \
cf-m68klynx.c \
@@ -234,33 +275,45 @@ BFD32_BACKENDS_CFILES = \
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-hppa.c \
+ elf32-i370.c \
elf32-i386.c \
elf32-i860.c \
+ elf32-i960.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m88k.c \
- elf32-mips.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 \
@@ -294,8 +347,15 @@ BFD32_BACKENDS_CFILES = \
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 \
@@ -305,6 +365,11 @@ BFD32_BACKENDS_CFILES = \
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
@@ -319,11 +384,6 @@ BFD64_BACKENDS = \
elf64-mips.lo \
elf64-sparc.lo \
elf64.lo \
- evax-alpha.lo \
- evax-egsd.lo \
- evax-etir.lo \
- evax-emh.lo \
- evax-misc.lo \
nlm32-alpha.lo \
nlm64.lo
@@ -336,11 +396,6 @@ BFD64_BACKENDS_CFILES = \
elf64-mips.c \
elf64-sparc.c \
elf64.c \
- evax-alpha.c \
- evax-egsd.c \
- evax-etir.c \
- evax-emh.c \
- evax-misc.c \
nlm32-alpha.c \
nlm64.c
@@ -350,6 +405,7 @@ OPTIONAL_BACKENDS = \
irix-core.lo \
lynx-core.lo \
osf-core.lo \
+ sco5-core.lo \
trad-core.lo \
cisco-core.lo
@@ -359,6 +415,7 @@ OPTIONAL_BACKENDS_CFILES = \
irix-core.c \
lynx-core.c \
osf-core.c \
+ sco5-core.c \
trad-core.c \
cisco-core.c
@@ -369,7 +426,7 @@ BFD_BACKENDS = @bfd_backends@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES)
+INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
CFILES = \
@@ -379,13 +436,24 @@ CFILES = \
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
-HFILES = \
+## 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-hppa.h elf32-target.h elf64-target.h \
- elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.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 netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
- targmatch.h
+ libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h nlmcode.h \
+ nlmswap.h ns32k.h peicode.h som.h vms.h
+
+HFILES = \
+ elf32-target.h elf64-target.h targmatch.h \
+ $(SOURCE_HFILES)
+
+POTFILES = $(CFILES) $(SOURCE_HFILES)
+
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
diststuff: info
@@ -412,8 +480,8 @@ ofiles: stamp-ofiles ; @true
libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles`
-libbfd_la_LDFLAGS = -release $(VERSION)
+libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
+libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
# directory so that we don't have to convert all the programs that use
@@ -424,8 +492,9 @@ noinst_LIBRARIES = libbfd.a
libbfd_a_SOURCES =
stamp-lib: libbfd.la
- if [ -f .libs/libbfd.a ]; then \
- cp .libs/libbfd.a libbfd.tmp; \
+ libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+ if [ -f $$libtooldir/libbfd.a ]; then \
+ cp $$libtooldir/libbfd.a libbfd.tmp; \
$(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
else true; fi
touch stamp-lib
@@ -468,29 +537,24 @@ $(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
-# 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) DEP=$(DEP) .dep1
- sed -f dep.sed <.dep1 >.dep
-
-# This rule really wants a mkdep that runs "gcc -MM".
-# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
-# the "DO NOT DELETE" line.
-# Other mkdep versions require a file that already exists, and do insert it.
-# Hence the weirdness....
-.dep1: $(CFILES)
- rm -f .dep2 .dep2a
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- echo > .dep2a
- $(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
- sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
- rm -f .dep2a
- $(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
+# 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' >> $@
+
+DEP1: $(CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
@@ -498,19 +562,19 @@ dep.sed: dep-in.sed config.status
-e 's!@INCDIR@!$(INCDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
host-aout.lo: Makefile
@@ -573,11 +637,22 @@ 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 libbfd.a stamp-lib \
+CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP 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.
+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.
@@ -597,7 +672,7 @@ 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
+section.lo: section.c $(INCDIR)/bfdlink.h
syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h
@@ -614,24 +689,32 @@ 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-mips.lo: cpu-mips.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
@@ -658,6 +741,9 @@ aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.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
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 \
@@ -721,6 +807,8 @@ coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.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 \
+ $(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 \
coffcode.h coffswap.h
@@ -733,6 +821,9 @@ 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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
@@ -749,61 +840,96 @@ 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 elf32-target.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)/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)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.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-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-target.h
-elf32-hppa.lo: elf32-hppa.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-hppa.h libhppa.h $(INCDIR)/elf/hppa.h hppa_stubs.h \
- elf32-target.h
+ $(INCDIR)/elf/i370.h elf32-target.h
elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-target.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 \
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 elf32-target.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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-target.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 \
elf32-target.h
-elf32-mips.lo: elf32-mips.c $(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)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.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-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-target.h
+elf32-mcore.lo: elf32-mcore.c $(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)/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)/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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/ppc.h elf32-target.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)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-target.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)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/sparc.h elf32-target.h
+ $(INCDIR)/elf/sparc.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 elf32-target.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 \
- $(INCDIR)/fnmatch.h elfcore.h elflink.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
@@ -884,22 +1010,42 @@ pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.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
+ $(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
+ $(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
+ $(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
+ $(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
+ $(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
+ $(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 \
+ $(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 \
+ $(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
@@ -922,6 +1068,11 @@ 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 \
@@ -937,30 +1088,26 @@ demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.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)/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
+ $(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-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)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/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 \
- $(INCDIR)/elf/sparc.h elf64-target.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 \
- $(INCDIR)/fnmatch.h elfcore.h elflink.h
-evax-alpha.lo: evax-alpha.c $(INCDIR)/bfdlink.h evax.h
-evax-egsd.lo: evax-egsd.c $(INCDIR)/bfdlink.h evax.h
-evax-etir.lo: evax-etir.c $(INCDIR)/bfdlink.h evax.h
-evax-emh.lo: evax-emh.c $(INCDIR)/bfdlink.h evax.h
-evax-misc.lo: evax-misc.c $(INCDIR)/bfdlink.h evax.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
@@ -972,6 +1119,7 @@ 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
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in
index d8249a4..bb8e06c 100644
--- a/contrib/binutils/bfd/Makefile.in
+++ b/contrib/binutils/bfd/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -62,30 +64,52 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
+AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
-LD = @LD@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-NM = @NM@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
TDEFINES = @TDEFINES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WIN32LDFLAGS = @WIN32LDFLAGS@
+WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
bfd_machines = @bfd_machines@
+l = @l@
tdefaults = @tdefaults@
wordsize = @wordsize@
@@ -93,9 +117,9 @@ AUTOMAKE_OPTIONS = cygnus
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-DEP = mkdep
+MKDEP = gcc -MM
-SUBDIRS = doc
+SUBDIRS = doc po
docdir = doc
@@ -117,12 +141,14 @@ BFD_LIBS = \
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_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
+
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = \
@@ -130,60 +156,77 @@ ALL_MACHINES = \
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-mips.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-mips.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
+
# 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 = \
@@ -194,6 +237,7 @@ BFD32_BACKENDS = \
aout-tic30.lo \
aout0.lo \
aout32.lo \
+ armnetbsd.lo \
bout.lo \
cf-i386lynx.lo \
cf-m68klynx.lo \
@@ -218,33 +262,45 @@ BFD32_BACKENDS = \
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-hppa.lo \
+ elf32-i370.lo \
elf32-i386.lo \
elf32-i860.lo \
+ elf32-i960.lo \
elf32-m32r.lo \
elf32-m68k.lo \
elf32-m88k.lo \
- elf32-mips.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 \
@@ -278,8 +334,15 @@ BFD32_BACKENDS = \
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 \
@@ -289,8 +352,14 @@ BFD32_BACKENDS = \
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 \
@@ -299,6 +368,7 @@ BFD32_BACKENDS_CFILES = \
aout-tic30.c \
aout0.c \
aout32.c \
+ armnetbsd.c \
bout.c \
cf-i386lynx.c \
cf-m68klynx.c \
@@ -323,33 +393,45 @@ BFD32_BACKENDS_CFILES = \
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-hppa.c \
+ elf32-i370.c \
elf32-i386.c \
elf32-i860.c \
+ elf32-i960.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m88k.c \
- elf32-mips.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 \
@@ -383,8 +465,15 @@ BFD32_BACKENDS_CFILES = \
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 \
@@ -394,8 +483,14 @@ BFD32_BACKENDS_CFILES = \
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.
@@ -408,14 +503,10 @@ BFD64_BACKENDS = \
elf64-mips.lo \
elf64-sparc.lo \
elf64.lo \
- evax-alpha.lo \
- evax-egsd.lo \
- evax-etir.lo \
- evax-emh.lo \
- evax-misc.lo \
nlm32-alpha.lo \
nlm64.lo
+
BFD64_BACKENDS_CFILES = \
aout64.c \
coff-alpha.c \
@@ -425,32 +516,32 @@ BFD64_BACKENDS_CFILES = \
elf64-mips.c \
elf64-sparc.c \
elf64.c \
- evax-alpha.c \
- evax-egsd.c \
- evax-etir.c \
- evax-emh.c \
- evax-misc.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:
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
@@ -458,7 +549,7 @@ BFD_BACKENDS = @bfd_backends@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES)
+INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
CFILES = \
@@ -468,13 +559,22 @@ CFILES = \
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
-HFILES = \
+
+SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \
- ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
- elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.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 netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
- targmatch.h
+ libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h nlmcode.h \
+ nlmswap.h ns32k.h peicode.h som.h vms.h
+
+
+HFILES = \
+ elf32-target.h elf64-target.h targmatch.h \
+ $(SOURCE_HFILES)
+
+
+POTFILES = $(CFILES) $(SOURCE_HFILES)
# Various kinds of .o files to put in libbfd.a:
# BFD_BACKENDS Routines the configured targets need.
@@ -484,8 +584,8 @@ OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
-libbfd_la_LIBADD = `cat ofiles`
-libbfd_la_LDFLAGS = -release $(VERSION)
+libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
+libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
# directory so that we don't have to convert all the programs that use
@@ -493,21 +593,24 @@ libbfd_la_LDFLAGS = -release $(VERSION)
# everything else starts using libtool. FIXME.
noinst_LIBRARIES = libbfd.a
-libbfd_a_SOURCES =
+libbfd_a_SOURCES =
-BFD_H_DEPS= $(INCDIR)/ansidecl.h
-LOCAL_H_DEPS= libbfd.h sysdep.h config.h
+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
+
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
-CLEANFILES = bfd.h dep.sed stmp-bfd-h .dep .dep1 libbfd.a stamp-lib \
+
+CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP 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
CONFIG_HEADER = config.h
@@ -528,51 +631,55 @@ 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
CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in TODO \
-acconfig.h acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
-configure.in stamp-h.in
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = README ./stamp-h.in COPYING ChangeLog Makefile.am \
+Makefile.in TODO acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
+configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
+GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
-default: all
-
+all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
- @:
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
$(SHELL) ./config.status
- @echo timestamp > stamp-h
-$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
@@ -583,7 +690,7 @@ distclean-hdr:
maintainer-clean-hdr:
bfd-in3.h: $(top_builddir)/config.status bfd-in2.h
- cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= ./config.status
+ cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLIBRARIES:
@@ -643,18 +750,18 @@ maintainer-clean-libLTLIBRARIES:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(libdir)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
- $(NORMAL_UNINSTALL)
+ @$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$$p; \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
@@ -673,41 +780,65 @@ all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $$target) \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
- target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $$target) \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) tags); \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+ && mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
@@ -733,29 +864,31 @@ top_distdir = $(distdir)
# tarfile.
distcheck: dist
-rm -rf $(distdir)
- GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
- @echo "========================"; \
- echo "$(distdir).tar.gz is ready for distribution"; \
- echo "========================"
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
@@ -763,52 +896,55 @@ distdir: $(DISTFILES)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
done
for subdir in $(SUBDIRS); do \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
|| exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
done
+info-am:
info: info-recursive
+dvi-am:
dvi: dvi-recursive
-check:
- $(MAKE) check-recursive
+check-am:
+check: check-recursive
+installcheck-am:
installcheck: installcheck-recursive
+install-info-am:
install-info: install-info-recursive
all-recursive-am: config.h
- $(MAKE) all-recursive
-
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am: install-libLTLIBRARIES
+install-exec: install-exec-recursive
install-data-am: install-data-local
+install-data: install-data-recursive
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
uninstall-am: uninstall-libLTLIBRARIES
-
-install-exec: install-exec-recursive install-exec-am
- @$(NORMAL_INSTALL)
-
-install-data: install-data-recursive install-data-am
- @$(NORMAL_INSTALL)
-
-install: install-recursive install-exec-am install-data-am
- @:
-
-uninstall: uninstall-recursive uninstall-am
-
-all: all-recursive-am all-am
-
+uninstall: uninstall-recursive
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
+all-redirect: all-recursive-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
- $(mkinstalldirs) $(libdir)
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
mostlyclean-generic:
@@ -818,67 +954,69 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-libLTLIBRARIES mostlyclean-tags \
mostlyclean-generic
+mostlyclean: mostlyclean-recursive
+
clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
clean-libLTLIBRARIES clean-tags clean-generic \
mostlyclean-am
+clean: clean-recursive
+
distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
distclean-libtool distclean-libLTLIBRARIES \
distclean-tags distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-recursive
+ -rm -f config.status
maintainer-clean-am: maintainer-clean-hdr \
maintainer-clean-noinstLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-libLTLIBRARIES maintainer-clean-tags \
maintainer-clean-generic distclean-am
-
-mostlyclean: mostlyclean-recursive mostlyclean-am
-
-clean: clean-recursive clean-am
-
-distclean: distclean-recursive distclean-am
- -rm -f config.status
- -rm -f libtool
-
-maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstLIBRARIES \
-distclean-noinstLIBRARIES clean-noinstLIBRARIES \
-maintainer-clean-noinstLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \
+distclean-libLTLIBRARIES clean-libLTLIBRARIES \
+maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \
+install-libLTLIBRARIES install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
-installcheck install-info all-recursive-am all-am install-exec-am \
-install-data-am uninstall-am install-exec install-data install \
-uninstall all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info all-recursive-am install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
diststuff: info
stamp-ofiles: Makefile
@@ -897,8 +1035,9 @@ stamp-ofiles: Makefile
ofiles: stamp-ofiles ; @true
stamp-lib: libbfd.la
- if [ -f .libs/libbfd.a ]; then \
- cp .libs/libbfd.a libbfd.tmp; \
+ libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+ if [ -f $$libtooldir/libbfd.a ]; then \
+ cp $$libtooldir/libbfd.a libbfd.tmp; \
$(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
else true; fi
touch stamp-lib
@@ -938,29 +1077,24 @@ $(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
-# 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) DEP=$(DEP) .dep1
- sed -f dep.sed <.dep1 >.dep
-
-# This rule really wants a mkdep that runs "gcc -MM".
-# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
-# the "DO NOT DELETE" line.
-# Other mkdep versions require a file that already exists, and do insert it.
-# Hence the weirdness....
-.dep1: $(CFILES)
- rm -f .dep2 .dep2a
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- echo > .dep2a
- $(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
- sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
- rm -f .dep2a
- $(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
+# 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' >> $@
+
+DEP1: $(CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
@@ -968,19 +1102,19 @@ dep.sed: dep-in.sed config.status
-e 's!@INCDIR@!$(INCDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
host-aout.lo: Makefile
@@ -1035,6 +1169,18 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
+# We want to rerun configure if config.bfd or configure.host change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
+ $(SHELL) ./config.status --recheck
+
+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.
@@ -1054,7 +1200,7 @@ 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
+section.lo: section.c $(INCDIR)/bfdlink.h
syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h
@@ -1071,24 +1217,32 @@ 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-mips.lo: cpu-mips.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
@@ -1115,6 +1269,9 @@ aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.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
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 \
@@ -1178,6 +1335,8 @@ coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.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 \
+ $(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 \
coffcode.h coffswap.h
@@ -1190,6 +1349,9 @@ 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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
@@ -1206,61 +1368,96 @@ 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 elf32-target.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)/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)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.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-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-target.h
-elf32-hppa.lo: elf32-hppa.c $(INCDIR)/bfdlink.h elf-bfd.h \
+elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-hppa.h libhppa.h $(INCDIR)/elf/hppa.h hppa_stubs.h \
- elf32-target.h
+ $(INCDIR)/elf/i370.h elf32-target.h
elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-target.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 \
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 elf32-target.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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-target.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 \
elf32-target.h
-elf32-mips.lo: elf32-mips.c $(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)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.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-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-target.h
+elf32-mcore.lo: elf32-mcore.c $(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)/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)/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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/ppc.h elf32-target.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)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- elf32-target.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)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/sparc.h elf32-target.h
+ $(INCDIR)/elf/sparc.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 elf32-target.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 \
- $(INCDIR)/fnmatch.h elfcore.h elflink.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
@@ -1341,22 +1538,42 @@ pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.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
+ $(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
+ $(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
+ $(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
+ $(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
+ $(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
+ $(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 \
+ $(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 \
+ $(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
@@ -1379,6 +1596,11 @@ 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 \
@@ -1394,30 +1616,26 @@ demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.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)/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
+ $(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-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)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/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 \
- $(INCDIR)/elf/sparc.h elf64-target.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 \
- $(INCDIR)/fnmatch.h elfcore.h elflink.h
-evax-alpha.lo: evax-alpha.c $(INCDIR)/bfdlink.h evax.h
-evax-egsd.lo: evax-egsd.c $(INCDIR)/bfdlink.h evax.h
-evax-etir.lo: evax-etir.c $(INCDIR)/bfdlink.h evax.h
-evax-emh.lo: evax-emh.c $(INCDIR)/bfdlink.h evax.h
-evax-misc.lo: evax-misc.c $(INCDIR)/bfdlink.h evax.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
@@ -1429,6 +1647,7 @@ 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
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/bfd/README b/contrib/binutils/bfd/README
index a9232bc..51ce133 100644
--- a/contrib/binutils/bfd/README
+++ b/contrib/binutils/bfd/README
@@ -8,6 +8,9 @@ The documentation on using BFD is scanty and may be occasionally
incorrect. Pointers to documentation problems, or an entirely
rewritten manual, would be appreciated.
+There is some BFD internals documentation in doc/bfdint.texi which may
+help programmers who want to modify BFD.
+
BFD is normally built as part of another package. See the build
instructions for that package, probably in a README file in the
appropriate directory.
diff --git a/contrib/binutils/bfd/acinclude.m4 b/contrib/binutils/bfd/acinclude.m4
index 6bd25ab..cac26e8 100644
--- a/contrib/binutils/bfd/acinclude.m4
+++ b/contrib/binutils/bfd/acinclude.m4
@@ -3,9 +3,9 @@ AC_DEFUN(BFD_BINARY_FOPEN,
[AC_REQUIRE([AC_CANONICAL_SYSTEM])
case "${host}" in
changequote(,)dnl
-i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
changequote([,])dnl
- AC_DEFINE(USE_BINARY_FOPEN) ;;
+ AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
esac])dnl
dnl Get a default for CC_FOR_BUILD to put into Makefile.
@@ -24,15 +24,18 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
- [cat > ac_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
- ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
- bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
- rm -f ac_c_test*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ [rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
@@ -61,7 +64,44 @@ AC_CACHE_VAL(bfd_cv_decl_needed_$1,
bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
AC_MSG_RESULT($bfd_cv_decl_needed_$1)
if test $bfd_cv_decl_needed_$1 = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- AC_DEFINE_UNQUOTED($bfd_tr_decl)
+ AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
+ [Define if $1 is not declared in system header files.])
fi
])dnl
+
+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 <sys/procfs.h>],
+ [$1 avar],
+ bfd_cv_have_sys_procfs_type_$1=yes,
+ bfd_cv_have_sys_procfs_type_$1=no
+ )])
+ if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
+ AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
+ [Define if <sys/procfs.h> has $1.])
+ fi
+ AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
+])
+
+
+dnl Check for existence of member $2 in type $1 in sys/procfs.h
+
+AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
+[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 <sys/procfs.h>],
+ [$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
+ )])
+ if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
+ AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
+ [Define if <sys/procfs.h> has $1.$2.])
+ fi
+ AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
+])
+
+
diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4
index 9d84a59..ca9d432 100644
--- a/contrib/binutils/bfd/aclocal.m4
+++ b/contrib/binutils/bfd/aclocal.m4
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.2e
+dnl aclocal.m4 generated automatically by aclocal 1.4
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,9 +15,9 @@ AC_DEFUN(BFD_BINARY_FOPEN,
[AC_REQUIRE([AC_CANONICAL_SYSTEM])
case "${host}" in
changequote(,)dnl
-i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
changequote([,])dnl
- AC_DEFINE(USE_BINARY_FOPEN) ;;
+ AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
esac])dnl
dnl Get a default for CC_FOR_BUILD to put into Makefile.
@@ -36,15 +36,18 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
- [cat > ac_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
- ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
- bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
- rm -f ac_c_test*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ [rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
@@ -73,11 +76,48 @@ AC_CACHE_VAL(bfd_cv_decl_needed_$1,
bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
AC_MSG_RESULT($bfd_cv_decl_needed_$1)
if test $bfd_cv_decl_needed_$1 = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- AC_DEFINE_UNQUOTED($bfd_tr_decl)
+ AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
+ [Define if $1 is not declared in system header files.])
fi
])dnl
+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 <sys/procfs.h>],
+ [$1 avar],
+ bfd_cv_have_sys_procfs_type_$1=yes,
+ bfd_cv_have_sys_procfs_type_$1=no
+ )])
+ if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
+ AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
+ [Define if <sys/procfs.h> has $1.])
+ fi
+ AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
+])
+
+
+dnl Check for existence of member $2 in type $1 in sys/procfs.h
+
+AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
+[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 <sys/procfs.h>],
+ [$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
+ )])
+ if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
+ AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
+ [Define if <sys/procfs.h> has $1.$2.])
+ fi
+ AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
+])
+
+
+
# 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.
@@ -88,7 +128,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@@ -98,8 +138,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
@@ -111,15 +151,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
#
# Check to make sure that the build environment is sane.
#
@@ -180,32 +211,75 @@ fi
AC_SUBST($1)])
-# serial 24 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AM_ENABLE_SHARED])dnl
-AC_REQUIRE([AM_ENABLE_STATIC])dnl
+# 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([AM_PROG_LD])dnl
-AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -227,30 +301,42 @@ case "$host" in
*-*-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
;;
-esac
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
+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
])
-# AM_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# 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(AM_ENABLE_SHARED,
-[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@@ -267,29 +353,23 @@ no) enable_shared=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
-# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AM_DISABLE_SHARED,
-[AM_ENABLE_SHARED(no)])
+# 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)])
-# AM_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AM_DISABLE_STATIC,
-[AM_ENABLE_STATIC(no)])
-
-# AM_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# 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(AM_ENABLE_STATIC,
-[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@@ -306,28 +386,73 @@ no) enable_static=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+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)])
+
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
+# 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])
+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.
+ # Accept absolute paths.
changequote(,)dnl
- /* | [A-Za-z]:\\*)
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -344,10 +469,10 @@ else
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ 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"; then
+ 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.
@@ -355,7 +480,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -370,11 +495,10 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
+AC_PROG_LD_GNU
])
-AC_DEFUN(AM_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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -384,43 +508,117 @@ else
fi])
])
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
+# 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,
-[case "$NM" in
-changequote(,)dnl
-/* | [A-Za-z]:\\*)
-changequote([,])dnl
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+[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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
+fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
-AC_SUBST(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,
@@ -458,69 +656,367 @@ AC_DEFUN(AM_MAINTAINER_MODE,
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
-# Check to see if we're running under Cygwin32, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN32()
-AC_DEFUN(AM_CYGWIN32,
-[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin32=yes, am_cv_cygwin32=no)
-rm -f conftest*])
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
-
-# Check to see if we're running under Win32, without using
-# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
-# Otherwise set it to "".
-
-dnl AM_EXEEXT()
-dnl This knows we add .exe if we're building in the Cygwin32
-dnl environment. But if we're not, then it compiles a test program
-dnl to see if there is a suffix for executables.
-AC_DEFUN(AM_EXEEXT,
-[AC_REQUIRE([AM_CYGWIN32])
-AC_REQUIRE([AM_MINGW32])
-AC_MSG_CHECKING([for executable suffix])
-AC_CACHE_VAL(am_cv_exeext,
-[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $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 <drepper@cygnus.com>, 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 <libintl.h>], [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 <locale.h> in the installed <libintl.h> 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 <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. 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 <drepper@cygnus.com>, 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
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*])
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
+ AC_MSG_RESULT(no)
fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-AC_MSG_RESULT(${am_cv_exeext})
-AC_SUBST(EXEEXT)])
-
-# Check to see if we're running under Mingw, without using
-# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_MINGW32()
-AC_DEFUN(AM_MINGW32,
-[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
-[AC_TRY_COMPILE(,[return __MINGW32__;],
-am_cv_mingw32=yes, am_cv_mingw32=no)
-rm -f conftest*])
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes])
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 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 <locale.h>], [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
new file mode 100644
index 0000000..7365f9d
--- /dev/null
+++ b/contrib/binutils/bfd/aout-arm.c
@@ -0,0 +1,552 @@
+/* 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
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#define N_TXTADDR(x) \
+ ((N_MAGIC(x) == NMAGIC) ? 0x8000 : \
+ (N_MAGIC(x) != ZMAGIC) ? 0 : \
+ (N_SHARED_LIB(x)) ? ((x).a_entry & ~(TARGET_PAGE_SIZE - 1)) : \
+ TEXT_START_ADDR)
+
+#define TEXT_START_ADDR 0x8000
+#define TARGET_PAGE_SIZE 0x8000
+#define SEGMENT_SIZE TARGET_PAGE_SIZE
+#define DEFAULT_ARCH bfd_arch_arm
+
+#define MY(OP) CAT(aoutarm_,OP)
+#define N_BADMAG(x) ((((x).a_info & ~007200) != ZMAGIC) && \
+ (((x).a_info & ~006000) != OMAGIC) && \
+ ((x).a_info != NMAGIC))
+#define N_MAGIC(x) ((x).a_info & ~07200)
+
+#include "bfd.h"
+#include "sysdep.h"
+
+#define MYARM(OP) CAT(aoutarm_,OP)
+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
+ as well as our own. */
+#define NAME(x,y) CAT3(aoutarm,_32_,y)
+
+#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup
+
+#include "libaout.h"
+#include "aout/aout64.h"
+
+static bfd_reloc_status_type
+MY(fix_pcrel_26_done) PARAMS ((bfd *, arelent *, asymbol *, PTR,
+ asection *, bfd *, char **));
+
+static bfd_reloc_status_type
+MY(fix_pcrel_26) PARAMS ((bfd *, arelent *, asymbol *, PTR,
+ asection *, bfd *, char **));
+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 *,
+ struct reloc_std_external *));
+
+reloc_howto_type MY(howto_table)[] =
+{
+ /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask
+ pcdone */
+ HOWTO (0, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true,
+ 0x000000ff, 0x000000ff, false),
+ HOWTO (1, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true,
+ 0x0000ffff, 0x0000ffff, false),
+ HOWTO (2, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", true,
+ 0xffffffff, 0xffffffff, false),
+ HOWTO (3, 2, 2, 26, true, 0, complain_overflow_signed, MY(fix_pcrel_26),
+ "ARM26", true, 0x00ffffff, 0x00ffffff, true),
+ HOWTO (4, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", true,
+ 0x000000ff, 0x000000ff, true),
+ HOWTO (5, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", true,
+ 0x0000ffff, 0x0000ffff, true),
+ HOWTO (6, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", true,
+ 0xffffffff, 0xffffffff, true),
+ HOWTO (7, 2, 2, 26, false, 0, complain_overflow_signed,
+ MY(fix_pcrel_26_done), "ARM26D", true, 0x0, 0x0,
+ false),
+ EMPTY_HOWTO (-1),
+ HOWTO (9, 0, -1, 16, false, 0, complain_overflow_bitfield, 0, "NEG16", true,
+ 0x0000ffff, 0x0000ffff, false),
+ HOWTO (10, 0, -2, 32, false, 0, complain_overflow_bitfield, 0, "NEG32", true,
+ 0xffffffff, 0xffffffff, false)
+};
+
+#define RELOC_ARM_BITS_NEG_BIG ((unsigned int) 0x08)
+#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10)
+
+reloc_howto_type *
+MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
+ bfd *abfd;
+ struct reloc_std_external *rel;
+ int *r_index;
+ int *r_extern;
+ int *r_pcrel;
+{
+ unsigned int r_length;
+ unsigned int r_pcrel_done;
+ unsigned int r_neg;
+ int index;
+
+ *r_pcrel = 0;
+ if (bfd_header_big_endian (abfd))
+ {
+ *r_index = ((rel->r_index[0] << 16)
+ | (rel->r_index[1] << 8)
+ | rel->r_index[2]);
+ *r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
+ r_pcrel_done = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
+ r_neg = (0 != (rel->r_type[0] & RELOC_ARM_BITS_NEG_BIG));
+ r_length = ((rel->r_type[0] & RELOC_STD_BITS_LENGTH_BIG)
+ >> RELOC_STD_BITS_LENGTH_SH_BIG);
+ }
+ else
+ {
+ *r_index = ((rel->r_index[2] << 16)
+ | (rel->r_index[1] << 8)
+ | rel->r_index[0]);
+ *r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
+ r_pcrel_done = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
+ r_neg = (0 != (rel->r_type[0] & RELOC_ARM_BITS_NEG_LITTLE));
+ r_length = ((rel->r_type[0] & RELOC_STD_BITS_LENGTH_LITTLE)
+ >> RELOC_STD_BITS_LENGTH_SH_LITTLE);
+ }
+ index = r_length + 4 * r_pcrel_done + 8 * r_neg;
+ if (index == 3)
+ *r_pcrel = 1;
+
+ 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)
+ bfd *abfd;
+ int r_extern;
+ int r_index;
+ long value;
+ reloc_howto_type *howto;
+ struct reloc_std_external *reloc;
+{
+ unsigned int r_length;
+ int r_pcrel;
+ int r_neg;
+
+ PUT_WORD (abfd, value, reloc->r_address);
+ r_length = howto->size ; /* Size as a power of two */
+
+ /* Special case for branch relocations. */
+ if (howto->type == 3 || howto->type == 7)
+ r_length = 3;
+
+ r_pcrel = howto->type & 4; /* PC Relative done? */
+ r_neg = howto->type & 8; /* Negative relocation */
+ if (bfd_header_big_endian (abfd))
+ {
+ reloc->r_index[0] = r_index >> 16;
+ reloc->r_index[1] = r_index >> 8;
+ reloc->r_index[2] = r_index;
+ reloc->r_type[0] =
+ ((r_extern ? RELOC_STD_BITS_EXTERN_BIG : 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_BIG : 0)
+ | (r_neg ? RELOC_ARM_BITS_NEG_BIG : 0)
+ | (r_length << RELOC_STD_BITS_LENGTH_SH_BIG));
+ }
+ else
+ {
+ reloc->r_index[2] = r_index >> 16;
+ reloc->r_index[1] = r_index >> 8;
+ reloc->r_index[0] = r_index;
+ reloc->r_type[0] =
+ ((r_extern ? RELOC_STD_BITS_EXTERN_LITTLE : 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_LITTLE : 0)
+ | (r_neg ? RELOC_ARM_BITS_NEG_LITTLE : 0)
+ | (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)
+
+void
+MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr)
+ reloc_howto_type *howto;
+ bfd *abfd;
+ struct reloc_std_external *reloc;
+ bfd_vma *amount;
+ bfd_vma r_addr;
+{
+ if (howto->type == 3)
+ {
+ 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. */
+ *amount = 0;
+ }
+ else
+ {
+ *amount -= r_addr;
+ /* Change the r_pcrel value -- on the ARM, this bit is set once the
+ relocation is done. */
+ if (bfd_header_big_endian (abfd))
+ reloc->r_type[0] |= RELOC_STD_BITS_PCREL_BIG;
+ else
+ reloc->r_type[0] |= RELOC_STD_BITS_PCREL_LITTLE;
+ }
+ }
+ else if (howto->type == 7)
+ *amount = 0;
+}
+
+#define 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,
+ output_bfd, 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;
+{
+ /* This is dead simple at present. */
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ bfd_vma relocation;
+ 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)
+ return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
+
+ /* If the sections are different, and we are doing a partial relocation,
+ just ignore it for now. */
+ if (symbol->section->name != input_section->name
+ && output_bfd != (bfd *)NULL)
+ return bfd_reloc_ok;
+
+ relocation = (target & 0x00ffffff) << 2;
+ relocation = (relocation ^ 0x02000000) - 0x02000000; /* Sign extend */
+ relocation += symbol->value;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+ relocation -= input_section->output_section->vma;
+ relocation -= input_section->output_offset;
+ relocation -= addr;
+ if (relocation & 3)
+ return bfd_reloc_overflow;
+
+ /* Check for overflow */
+ if (relocation & 0x02000000)
+ {
+ if ((relocation & ~ (bfd_vma) 0x03ffffff) != ~ (bfd_vma) 0x03ffffff)
+ flag = bfd_reloc_overflow;
+ }
+ else if (relocation & ~0x03ffffff)
+ flag = bfd_reloc_overflow;
+
+ target &= ~0x00ffffff;
+ target |= (relocation >> 2) & 0x00ffffff;
+ bfd_put_32 (abfd, target, (bfd_byte *) data + addr);
+
+ /* 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)
+ bfd *abfd;
+ bfd_reloc_code_real_type code;
+{
+#define ASTD(i,j) case i: return &MY(howto_table)[j]
+ if (code == BFD_RELOC_CTOR)
+ switch (bfd_get_arch_info (abfd)->bits_per_address)
+ {
+ case 32:
+ code = BFD_RELOC_32;
+ break;
+ default: return (CONST struct reloc_howto_struct *) 0;
+ }
+
+ switch (code)
+ {
+ ASTD (BFD_RELOC_16, 1);
+ ASTD (BFD_RELOC_32, 2);
+ ASTD (BFD_RELOC_ARM_PCREL_BRANCH, 3);
+ ASTD (BFD_RELOC_8_PCREL, 4);
+ ASTD (BFD_RELOC_16_PCREL, 5);
+ ASTD (BFD_RELOC_32_PCREL, 6);
+ default: return (CONST struct reloc_howto_struct *) 0;
+ }
+}
+
+#define MY_swap_std_reloc_in MY(swap_std_reloc_in)
+#define MY_swap_std_reloc_out MY(swap_std_reloc_out)
+#define MY_get_section_contents _bfd_generic_get_section_contents
+/* #define MY_bfd_link_hash_table_create _bfd_generic_link_hash_table_create */
+/* #define MY_bfd_link_add_symbols _bfd_generic_link_add_symbols */
+/* #define MY_bfd_final_link _bfd_generic_final_link */
+
+#include "aoutx.h"
+
+static void
+MY_swap_std_reloc_in (abfd, bytes, cache_ptr, symbols, symcount)
+ bfd *abfd;
+ struct reloc_std_external *bytes;
+ arelent *cache_ptr;
+ asymbol **symbols;
+ bfd_size_type symcount ATTRIBUTE_UNUSED;
+{
+ int r_index;
+ int r_extern;
+ int r_pcrel;
+ struct aoutdata *su = &(abfd->tdata.aout_data->a);
+
+ cache_ptr->address = bfd_h_get_32 (abfd, bytes->r_address);
+
+ cache_ptr->howto = MY_reloc_howto (abfd, bytes, r_index, r_extern, r_pcrel);
+
+ MOVE_ADDRESS (0);
+}
+
+void
+MY_swap_std_reloc_out (abfd, g, natptr)
+ bfd *abfd;
+ arelent *g;
+ struct reloc_std_external *natptr;
+{
+ int r_index;
+ asymbol *sym = *(g->sym_ptr_ptr);
+ int r_extern;
+ int r_length;
+ int r_pcrel;
+ int r_neg = 0; /* Negative relocs use the BASEREL bit. */
+ asection *output_section = sym->section->output_section;
+
+ PUT_WORD(abfd, g->address, natptr->r_address);
+
+ r_length = g->howto->size ; /* Size as a power of two */
+ if (r_length < 0)
+ {
+ r_length = -r_length;
+ r_neg = 1;
+ }
+
+ r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
+
+ /* For RISC iX, in pc-relative relocs the r_pcrel bit means that the
+ relocation has been done already (Only for the 26-bit one I think)???!!!
+ */
+
+ if (g->howto->type == 3)
+ {
+ r_length = 3;
+ 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. */
+ r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
+#endif
+
+ /* name was clobbered by aout_write_syms to be symbol index */
+
+ /* If this relocation is relative to a symbol then set the
+ r_index to the symbols index, and the r_extern bit.
+
+ Absolute symbols can come in in two ways, either as an offset
+ from the abs section, or as a symbol which has an abs value.
+ check for that here
+ */
+
+ if (bfd_is_com_section (output_section)
+ || output_section == &bfd_abs_section
+ || output_section == &bfd_und_section)
+ {
+ if (bfd_abs_section.symbol == sym)
+ {
+ /* Whoops, looked like an abs symbol, but is really an offset
+ from the abs section */
+ r_index = 0;
+ r_extern = 0;
+ }
+ else
+ {
+ /* Fill in symbol */
+ r_extern = 1;
+ r_index = (*(g->sym_ptr_ptr))->KEEPIT;
+ }
+ }
+ else
+ {
+ /* Just an ordinary section */
+ r_extern = 0;
+ r_index = output_section->target_index;
+ }
+
+ /* now the fun stuff */
+ if (bfd_header_big_endian (abfd))
+ {
+ natptr->r_index[0] = r_index >> 16;
+ natptr->r_index[1] = r_index >> 8;
+ natptr->r_index[2] = r_index;
+ natptr->r_type[0] =
+ ( (r_extern ? RELOC_STD_BITS_EXTERN_BIG: 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_BIG: 0)
+ | (r_neg ? RELOC_ARM_BITS_NEG_BIG: 0)
+ | (r_length << RELOC_STD_BITS_LENGTH_SH_BIG));
+ }
+ else
+ {
+ natptr->r_index[2] = r_index >> 16;
+ natptr->r_index[1] = r_index >> 8;
+ natptr->r_index[0] = r_index;
+ natptr->r_type[0] =
+ ( (r_extern ? RELOC_STD_BITS_EXTERN_LITTLE: 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_LITTLE: 0)
+ | (r_neg ? RELOC_ARM_BITS_NEG_LITTLE: 0)
+ | (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE));
+ }
+}
+
+#define MY_BFD_TARGET
+
+#include "aout-target.h"
+
+extern const bfd_target aout_arm_big_vec;
+
+const bfd_target aout_arm_little_vec =
+{
+ "a.out-arm-little", /* name */
+ bfd_target_aout_flavour,
+ BFD_ENDIAN_LITTLE, /* target byte order (little) */
+ BFD_ENDIAN_LITTLE, /* target headers byte order (little) */
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
+ MY_symbol_leading_char,
+ AR_PAD_CHAR, /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+ {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, MY_core_file_p},
+ {bfd_false, MY_mkobject, /* bfd_set_format */
+ _bfd_generic_mkarchive, bfd_false},
+ {bfd_false, MY_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (MY),
+ BFD_JUMP_TABLE_COPY (MY),
+ BFD_JUMP_TABLE_CORE (MY),
+ BFD_JUMP_TABLE_ARCHIVE (MY),
+ BFD_JUMP_TABLE_SYMBOLS (MY),
+ BFD_JUMP_TABLE_RELOCS (MY),
+ BFD_JUMP_TABLE_WRITE (MY),
+ BFD_JUMP_TABLE_LINK (MY),
+ BFD_JUMP_TABLE_DYNAMIC (MY),
+
+ & aout_arm_big_vec,
+
+ (PTR) MY_backend_data,
+};
+
+const bfd_target aout_arm_big_vec =
+{
+ "a.out-arm-big", /* name */
+ bfd_target_aout_flavour,
+ BFD_ENDIAN_BIG, /* target byte order (big) */
+ BFD_ENDIAN_BIG, /* target headers byte order (big) */
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
+ MY_symbol_leading_char,
+ AR_PAD_CHAR, /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, MY_core_file_p},
+ {bfd_false, MY_mkobject, /* bfd_set_format */
+ _bfd_generic_mkarchive, bfd_false},
+ {bfd_false, MY_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (MY),
+ BFD_JUMP_TABLE_COPY (MY),
+ BFD_JUMP_TABLE_CORE (MY),
+ BFD_JUMP_TABLE_ARCHIVE (MY),
+ BFD_JUMP_TABLE_SYMBOLS (MY),
+ BFD_JUMP_TABLE_RELOCS (MY),
+ BFD_JUMP_TABLE_WRITE (MY),
+ BFD_JUMP_TABLE_LINK (MY),
+ BFD_JUMP_TABLE_DYNAMIC (MY),
+
+ & aout_arm_little_vec,
+
+ (PTR) MY_backend_data,
+};
diff --git a/contrib/binutils/bfd/aout-sparcle.c b/contrib/binutils/bfd/aout-sparcle.c
new file mode 100644
index 0000000..903b136
--- /dev/null
+++ b/contrib/binutils/bfd/aout-sparcle.c
@@ -0,0 +1,32 @@
+/* BFD backend for sparc little-endian aout binaries.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ Written by Cygnus Support.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define TARGETNAME "a.out-sparc-little"
+#define MY(OP) CAT(sparcle_aout_,OP)
+
+#include "bfd.h"
+#include "bfdlink.h"
+#include "libaout.h"
+
+#define MACHTYPE_OK(mtype) ((mtype) == M_SPARC || (mtype) == M_SPARCLET)
+
+/* Include the usual a.out support. */
+#define TARGET_IS_LITTLE_ENDIAN_P
+#include "aoutf1.h"
diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h
index 4e0fc9b..046417b 100644
--- a/contrib/binutils/bfd/aout-target.h
+++ b/contrib/binutils/bfd/aout-target.h
@@ -1,5 +1,5 @@
/* Define a target vector and some small routines for a variant of a.out.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -234,9 +234,9 @@ static boolean MY_bfd_copy_private_section_data
static boolean
MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
- asection *isec;
+ asection *isec ATTRIBUTE_UNUSED;
bfd *obfd;
- asection *osec;
+ asection *osec ATTRIBUTE_UNUSED;
{
if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
&& bfd_get_flavour (obfd) == bfd_target_aout_flavour)
@@ -258,11 +258,7 @@ MY(write_object_contents) (abfd)
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
-#if CHOOSE_RELOC_SIZE
- CHOOSE_RELOC_SIZE(abfd);
-#else
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
-#endif
WRITE_HEADERS(abfd, execp);
@@ -509,6 +505,9 @@ MY_bfd_final_link (abfd, info)
#ifndef MY_bfd_relax_section
#define MY_bfd_relax_section bfd_generic_relax_section
#endif
+#ifndef MY_bfd_gc_sections
+#define MY_bfd_gc_sections bfd_generic_gc_sections
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
#endif
@@ -642,6 +641,9 @@ const bfd_target MY(vec) =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (MY),
- (PTR) MY_backend_data,
+ /* 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 cb7314e..686c159 100644
--- a/contrib/binutils/bfd/aout-tic30.c
+++ b/contrib/binutils/bfd/aout-tic30.c
@@ -1,5 +1,5 @@
/* BFD back-end for TMS320C30 a.out binaries.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of BFD, the Binary File Descriptor library.
@@ -131,7 +131,7 @@ static CONST struct aout_backend_data tic30_aout_backend_data =
it. */
reloc_howto_type tic30_aout_howto_table[] =
{
- {-1},
+ EMPTY_HOWTO (-1),
HOWTO (1, 2, 1, 16, false, 0, 0, tic30_aout_fix_16,
"16", false, 0x0000FFFF, 0x0000FFFF, false),
HOWTO (2, 2, 2, 24, false, 0, complain_overflow_bitfield, NULL,
@@ -142,18 +142,18 @@ reloc_howto_type tic30_aout_howto_table[] =
"32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
HOWTO (5, 2, 1, 16, true, 0, complain_overflow_signed,
tic30_aout_fix_pcrel_16, "PCREL", true, 0x0000FFFF, 0x0000FFFF, true),
- {-1},
- {-1},
- {-1},
- {-1},
- {-1}
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1)
};
extern reloc_howto_type *NAME (aout, reloc_type_lookup) ();
reloc_howto_type *
tic30_aout_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
switch (code)
@@ -218,9 +218,9 @@ tic30_aout_fix_16 (abfd, reloc_entry, symbol, data, input_section, output_bfd, e
arelent *reloc_entry;
asymbol *symbol;
PTR data;
- asection *input_section;
+ asection *input_section ATTRIBUTE_UNUSED;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
@@ -245,9 +245,9 @@ tic30_aout_fix_32 (abfd, reloc_entry, symbol, data, input_section,
arelent *reloc_entry;
asymbol *symbol;
PTR data;
- asection *input_section;
+ asection *input_section ATTRIBUTE_UNUSED;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
@@ -274,11 +274,11 @@ tic30_aout_fix_pcrel_16 (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
- asymbol *symbol;
+ asymbol *symbol ATTRIBUTE_UNUSED;
PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ asection *input_section ATTRIBUTE_UNUSED;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation = 1;
bfd_byte offset_data = bfd_get_8 (abfd, (bfd_byte *) data + reloc_entry->address - 1);
@@ -590,9 +590,9 @@ tic30_aout_object_p (abfd)
static boolean
MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
- asection *isec;
+ asection *isec ATTRIBUTE_UNUSED;
bfd *obfd;
- asection *osec;
+ asection *osec ATTRIBUTE_UNUSED;
{
if (bfd_get_flavour (obfd) == bfd_target_aout_flavour)
obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
@@ -610,11 +610,8 @@ tic30_aout_write_object_contents (abfd)
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
-#if CHOOSE_RELOC_SIZE
- CHOOSE_RELOC_SIZE (abfd);
-#else
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
-#endif
+
{
bfd_size_type text_size; /* dummy vars */
file_ptr text_end;
@@ -779,7 +776,7 @@ MY_bfd_final_link (abfd, info)
enum machine_type
tic30_aout_machine_type (arch, machine, unknown)
enum bfd_architecture arch;
- unsigned long machine;
+ unsigned long machine ATTRIBUTE_UNUSED;
boolean *unknown;
{
enum machine_type arch_flags;
@@ -939,6 +936,9 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#ifndef MY_bfd_relax_section
#define MY_bfd_relax_section bfd_generic_relax_section
#endif
+#ifndef MY_bfd_gc_sections
+#define MY_bfd_gc_sections bfd_generic_gc_sections
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
#endif
@@ -1057,6 +1057,8 @@ const bfd_target tic30_aout_vec =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (MY),
- (PTR) MY_backend_data,
+ NULL,
+
+ (PTR) MY_backend_data
};
#endif /* MY_BFD_TARGET */
diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h
index 0446c5d..fdf95b5 100644
--- a/contrib/binutils/bfd/aoutf1.h
+++ b/contrib/binutils/bfd/aoutf1.h
@@ -150,6 +150,11 @@ sunos_set_arch_mach (abfd, machtype)
machine = bfd_mach_sparc_sparclet;
break;
+ case M_SPARCLITE_LE:
+ arch = bfd_arch_sparc;
+ machine = bfd_mach_sparc_sparclite_le;
+ break;
+
case M_386:
case M_386_DYNIX:
arch = bfd_arch_i386;
@@ -232,6 +237,9 @@ sunos_write_object_contents (abfd)
case bfd_mach_sparc_sparclet:
N_SET_MACHTYPE (*execp, M_SPARCLET);
break;
+ case bfd_mach_sparc_sparclite_le:
+ N_SET_MACHTYPE (*execp, M_SPARCLITE_LE);
+ break;
default:
N_SET_MACHTYPE (*execp, M_SPARC);
break;
diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h
index ff1cdd2..fa107a7 100644
--- a/contrib/binutils/bfd/aoutx.h
+++ b/contrib/binutils/bfd/aoutx.h
@@ -1,5 +1,5 @@
/* BFD semi-generic back-end for a.out binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -120,10 +120,9 @@ DESCRIPTION
#define KEEPIT udata.i
-#include <string.h> /* For strchr and friends */
#include <ctype.h>
#include "bfd.h"
-#include <sysdep.h>
+#include "sysdep.h"
#include "bfdlink.h"
#include "libaout.h"
@@ -199,7 +198,7 @@ reloc_howto_type howto_table_ext[] =
HOWTO(RELOC_SFA_BASE,0, 2, 32, false, 0, complain_overflow_bitfield,0,"SFA_BASE", false, 0,0xffffffff, false),
HOWTO(RELOC_SFA_OFF13,0,2, 32, false, 0, complain_overflow_bitfield,0,"SFA_OFF13",false, 0,0xffffffff, false),
HOWTO(RELOC_BASE10, 0, 2, 10, false, 0, complain_overflow_dont,0,"BASE10", false, 0,0x000003ff, false),
- HOWTO(RELOC_BASE13, 0, 2, 13, false, 0, complain_overflow_bitfield,0,"BASE13", false, 0,0x00001fff, false),
+ HOWTO(RELOC_BASE13, 0, 2, 13, false, 0, complain_overflow_signed,0,"BASE13", false, 0,0x00001fff, false),
HOWTO(RELOC_BASE22, 10, 2, 22, false, 0, complain_overflow_bitfield,0,"BASE22", false, 0,0x003fffff, false),
HOWTO(RELOC_PC10, 0, 2, 10, true, 0, complain_overflow_dont,0,"PC10", false, 0,0x000003ff, true),
HOWTO(RELOC_PC22, 10, 2, 22, true, 0, complain_overflow_signed,0,"PC22", false, 0,0x003fffff, true),
@@ -208,6 +207,10 @@ reloc_howto_type howto_table_ext[] =
HOWTO(RELOC_GLOB_DAT,0, 2, 0, false, 0, complain_overflow_bitfield,0,"GLOB_DAT", false, 0,0x00000000, false),
HOWTO(RELOC_JMP_SLOT,0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_SLOT", false, 0,0x00000000, false),
HOWTO(RELOC_RELATIVE,0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false),
+ HOWTO(0, 0, 0, 0, false, 0, complain_overflow_dont, 0, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(0, 0, 0, 0, false, 0, complain_overflow_dont, 0, "R_SPARC_NONE", false,0,0x00000000,true),
+#define RELOC_SPARC_REV32 RELOC_WDISP19
+ HOWTO(RELOC_SPARC_REV32, 0, 2, 32, false, 0, complain_overflow_dont,0,"R_SPARC_REV32", false, 0,0xffffffff, false),
};
/* Convert standard reloc records to "arelent" format (incl byte swap). */
@@ -225,28 +228,35 @@ HOWTO( 7, 0, 4, 64, true, 0, complain_overflow_signed, 0,"DISP64", tr
HOWTO( 8, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"GOT_REL", false, 0,0x00000000, false),
HOWTO( 9, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"BASE16", false,0xffffffff,0xffffffff, false),
HOWTO(10, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"BASE32", false,0xffffffff,0xffffffff, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
HOWTO(16, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false, 0,0x00000000, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 },
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
HOWTO(32, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false),
};
@@ -286,6 +296,7 @@ NAME(aout,reloc_type_lookup) (abfd,code)
EXT (BFD_RELOC_SPARC_PC10, 17);
EXT (BFD_RELOC_SPARC_PC22, 18);
EXT (BFD_RELOC_SPARC_WPLT30, 19);
+ EXT (BFD_RELOC_SPARC_REV32, 26);
default: return (reloc_howto_type *) NULL;
}
else
@@ -708,6 +719,7 @@ NAME(aout,machine_type) (arch, machine, unknown)
if (machine == 0
|| machine == bfd_mach_sparc
|| machine == bfd_mach_sparc_sparclite
+ || machine == bfd_mach_sparc_sparclite_le
|| machine == bfd_mach_sparc_v9)
arch_flags = M_SPARC;
else if (machine == bfd_mach_sparc_sparclet)
@@ -739,14 +751,29 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_arch_mips:
switch (machine) {
case 0:
- case 2000:
- case 3000: arch_flags = M_MIPS1; break;
- case 4000: /* mips3 */
- case 4400:
- case 8000: /* mips4 */
- /* real mips2: */
- case 6000: arch_flags = M_MIPS2; break;
- default: arch_flags = M_UNKNOWN; break;
+ case bfd_mach_mips3000:
+ case bfd_mach_mips3900:
+ arch_flags = M_MIPS1;
+ break;
+ case bfd_mach_mips6000:
+ arch_flags = M_MIPS2;
+ break;
+ case bfd_mach_mips4000:
+ case bfd_mach_mips4010:
+ case bfd_mach_mips4100:
+ case bfd_mach_mips4300:
+ case bfd_mach_mips4400:
+ case bfd_mach_mips4600:
+ case bfd_mach_mips4650:
+ case bfd_mach_mips8000:
+ case bfd_mach_mips10000:
+ case bfd_mach_mips16:
+ /* FIXME: These should be MIPS3 or MIPS4. */
+ arch_flags = M_MIPS2;
+ break;
+ default:
+ arch_flags = M_UNKNOWN;
+ break;
}
break;
@@ -1052,7 +1079,7 @@ boolean
NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
bfd *abfd;
bfd_size_type *text_size;
- file_ptr *text_end;
+ file_ptr *text_end ATTRIBUTE_UNUSED;
{
struct internal_exec *execp = exec_hdr (abfd);
@@ -1214,7 +1241,7 @@ NAME(aout,set_section_contents) (abfd, section, location, offset, count)
&& section != obj_datasec (abfd))
{
(*_bfd_error_handler)
- ("%s: can not represent section `%s' in a.out object file format",
+ (_("%s: can not represent section `%s' in a.out object file format"),
bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -1598,9 +1625,9 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
/* This case occurs, e.g., for the *DEBUG* section of a COFF
file. */
(*_bfd_error_handler)
- ("%s: can not represent section for symbol `%s' in a.out object file format",
+ (_("%s: can not represent section for symbol `%s' in a.out object file format"),
bfd_get_filename (abfd),
- cache_ptr->name != NULL ? cache_ptr->name : "*unknown*");
+ cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*"));
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
}
@@ -1628,7 +1655,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
else
{
(*_bfd_error_handler)
- ("%s: can not represent section `%s' in a.out object file format",
+ (_("%s: can not represent section `%s' in a.out object file format"),
bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -2511,16 +2538,16 @@ NAME(aout,get_symtab_upper_bound) (abfd)
/*ARGSUSED*/
alent *
NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
- bfd *ignore_abfd;
- asymbol *ignore_symbol;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
+ asymbol *ignore_symbol ATTRIBUTE_UNUSED;
{
-return (alent *)NULL;
+ return (alent *)NULL;
}
/*ARGSUSED*/
void
NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -2548,7 +2575,7 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
/*ARGSUSED*/
void
NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -2679,6 +2706,7 @@ NAME(aout,find_nearest_line)
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. */
bfd_vma low_line_vma = 0;
bfd_vma low_func_vma = 0;
asymbol *func = 0;
@@ -2767,6 +2795,7 @@ NAME(aout,find_nearest_line)
*line_ptr = q->desc;
low_line_vma = q->symbol.value;
line_file_name = current_file_name;
+ line_directory_name = directory_name;
}
break;
case N_FUN:
@@ -2787,7 +2816,10 @@ NAME(aout,find_nearest_line)
done:
if (*line_ptr != 0)
- main_file_name = line_file_name;
+ {
+ main_file_name = line_file_name;
+ directory_name = line_directory_name;
+ }
if (main_file_name == NULL
|| main_file_name[0] == '/'
@@ -2853,7 +2885,7 @@ NAME(aout,find_nearest_line)
int
NAME(aout,sizeof_headers) (abfd, execable)
bfd *abfd;
- boolean execable;
+ boolean execable ATTRIBUTE_UNUSED;
{
return adata(abfd).exec_bytes_size;
}
@@ -3639,7 +3671,7 @@ NAME(aout,final_link) (abfd, info, callback)
work out the number of relocs needed, and then multiply
by the reloc size. */
(*_bfd_error_handler)
- ("%s: relocateable link from %s to %s not supported",
+ (_("%s: relocateable link from %s to %s not supported"),
bfd_get_filename (abfd),
sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation);
@@ -4694,6 +4726,8 @@ aout_reloc_index_to_section (abfd, indx)
default:
abort ();
}
+ /*NOTREACHED*/
+ return NULL;
}
/* Relocate an a.out section using standard a.out relocs. */
@@ -4937,6 +4971,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
/* We are generating an executable, and must do a full
relocation. */
hundef = false;
+
if (r_extern)
{
h = sym_hashes[r_index];
@@ -4994,7 +5029,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, name, input_bfd, input_section, r_addr)))
+ (finfo->info, name, input_bfd, input_section,
+ r_addr, true)))
return false;
}
@@ -5279,6 +5315,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
/* We are generating an executable, and must do a full
relocation. */
hundef = false;
+
if (r_extern)
{
h = sym_hashes[r_index];
@@ -5395,14 +5432,26 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, name, input_bfd, input_section, r_addr)))
+ (finfo->info, name, input_bfd, input_section,
+ r_addr, true)))
return false;
}
- r = MY_final_link_relocate (howto_table_ext + r_type,
- input_bfd, input_section,
- contents, r_addr, relocation,
- r_addend);
+ if (r_type != RELOC_SPARC_REV32)
+ r = MY_final_link_relocate (howto_table_ext + r_type,
+ input_bfd, input_section,
+ contents, r_addr, relocation,
+ r_addend);
+ else
+ {
+ bfd_vma x;
+
+ x = bfd_get_32 (input_bfd, contents + r_addr);
+ x = x + relocation + r_addend;
+ bfd_putl32 (/*input_bfd,*/ x, contents + r_addr);
+ r = bfd_reloc_ok;
+ }
+
if (r != bfd_reloc_ok)
{
switch (r)
@@ -5455,7 +5504,7 @@ aout_link_reloc_link_order (finfo, o, p)
int r_index;
int r_extern;
reloc_howto_type *howto;
- file_ptr *reloff_ptr;
+ file_ptr *reloff_ptr = NULL;
struct reloc_std_external srel;
struct reloc_ext_external erel;
PTR rel_ptr;
diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c
index 6b9dbbc..19293af 100644
--- a/contrib/binutils/bfd/archive.c
+++ b/contrib/binutils/bfd/archive.c
@@ -1,5 +1,5 @@
/* BFD back-end for archive files (libraries).
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
@@ -131,8 +131,6 @@ DESCRIPTION
#include "libbfd.h"
#include "aout/ar.h"
#include "aout/ranlib.h"
-#include <errno.h>
-#include <string.h> /* For memchr, strrchr and friends */
#include <ctype.h>
#ifndef errno
@@ -175,7 +173,8 @@ static boolean do_slurp_bsd_armap PARAMS ((bfd *abfd));
static boolean do_slurp_coff_armap PARAMS ((bfd *abfd));
static const char *normalize PARAMS ((bfd *, const char *file));
static struct areltdata *bfd_ar_hdr_from_filesystem PARAMS ((bfd *abfd,
- const char *));
+ const char *,
+ bfd *member));
boolean
_bfd_generic_mkarchive (abfd)
@@ -397,7 +396,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
}
/* Extract the filename from the archive - there are two ways to
- specify an extendend name table, either the first char of the
+ specify an extended name table, either the first char of the
name is a space, or it's a slash. */
if ((hdr.ar_name[0] == '/'
|| (hdr.ar_name[0] == ' '
@@ -443,19 +442,22 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
Note: The SYSV format (terminated by '/') allows embedded
spaces, so only look for ' ' if we don't find '/'. */
- namelen = 0;
- while (hdr.ar_name[namelen] != '\0' &&
- hdr.ar_name[namelen] != '/')
+ char *e;
+ e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
+ if (e == NULL)
{
- namelen++;
- if (namelen == (unsigned) ar_maxnamelen (abfd))
- {
- namelen = 0;
- while (hdr.ar_name[namelen] != ' '
- && namelen < (unsigned) ar_maxnamelen (abfd))
- namelen++;
- break;
- }
+ e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
+ if (e == NULL)
+ e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
+ }
+
+ if (e != NULL)
+ namelen = e - hdr.ar_name;
+ else
+ {
+ /* If we didn't find a termination character, then the name
+ must be the entire field. */
+ namelen = ar_maxnamelen (abfd);
}
allocsize += namelen + 1;
@@ -1176,7 +1178,7 @@ normalize (abfd, file)
#else
static const char *
normalize (abfd, file)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *file;
{
const char *filename = strrchr (file, '/');
@@ -1338,21 +1340,41 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
/** A couple of functions for creating ar_hdrs */
+#ifndef HAVE_GETUID
+#define getuid() 0
+#endif
+
+#ifndef HAVE_GETGID
+#define getgid() 0
+#endif
+
/* 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 */
+ 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. */
static struct areltdata *
-bfd_ar_hdr_from_filesystem (abfd, filename)
+bfd_ar_hdr_from_filesystem (abfd, filename, member)
bfd *abfd;
const char *filename;
+ bfd *member;
{
struct stat status;
struct areltdata *ared;
struct ar_hdr *hdr;
char *temp, *temp1;
- if (stat (filename, &status) != 0)
+ if (member && (member->flags & BFD_IN_MEMORY) != 0)
+ {
+ /* 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();
+ status.st_mode = 0644;
+ status.st_size = bim->size;
+ }
+ else if (stat (filename, &status) != 0)
{
bfd_set_error (bfd_error_system_call);
return NULL;
@@ -1404,7 +1426,7 @@ bfd_special_undocumented_glue (abfd, filename)
bfd *abfd;
const char *filename;
{
- struct areltdata *ar_elt = bfd_ar_hdr_from_filesystem (abfd, filename);
+ struct areltdata *ar_elt = bfd_ar_hdr_from_filesystem (abfd, filename, 0);
if (ar_elt == NULL)
return NULL;
return (struct ar_hdr *) ar_elt->arch_header;
@@ -1586,7 +1608,7 @@ _bfd_write_archive_contents (arch)
if (!current->arelt_data)
{
current->arelt_data =
- (PTR) bfd_ar_hdr_from_filesystem (arch, current->filename);
+ (PTR) bfd_ar_hdr_from_filesystem (arch, current->filename, current);
if (!current->arelt_data)
return false;
@@ -1699,7 +1721,7 @@ _bfd_write_archive_contents (arch)
if (bfd_update_armap_timestamp (arch))
break;
(*_bfd_error_handler)
- ("Warning: writing archive was slow: rewriting timestamp\n");
+ (_("Warning: writing archive was slow: rewriting timestamp\n"));
}
while (++tries < 6);
}
@@ -1887,13 +1909,8 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
bfd_ardata (arch)->armap_datepos = (SARMAG
+ offsetof (struct ar_hdr, ar_date[0]));
sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
-#ifndef _WIN32
sprintf (hdr.ar_uid, "%ld", (long) getuid ());
sprintf (hdr.ar_gid, "%ld", (long) getgid ());
-#else
- sprintf (hdr.ar_uid, "%ld", (long) 666);
- sprintf (hdr.ar_gid, "%ld", (long) 42);
-#endif
sprintf (hdr.ar_size, "%-10d", (int) mapsize);
strncpy (hdr.ar_fmag, ARFMAG, 2);
for (i = 0; i < sizeof (struct ar_hdr); i++)
@@ -1970,7 +1987,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
bfd_flush (arch);
if (bfd_stat (arch, &archstat) == -1)
{
- perror ("Reading archive file mod timestamp");
+ perror (_("Reading archive file mod timestamp"));
return true; /* Can't read mod time for some reason */
}
if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp)
@@ -1994,7 +2011,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
!= sizeof (hdr.ar_date)))
{
/* FIXME: bfd can't call perror. */
- perror ("Writing updated armap timestamp");
+ perror (_("Writing updated armap timestamp"));
return true; /* Some error while writing */
}
diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c
index fa6c7cc..7462592 100644
--- a/contrib/binutils/bfd/archures.c
+++ b/contrib/binutils/bfd/archures.c
@@ -1,5 +1,6 @@
/* BFD library support routines for architectures.
- Copyright (C) 1990, 91-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000
+ Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -77,6 +78,7 @@ DESCRIPTION
.#define bfd_mach_m68030 5
.#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.
@@ -104,8 +106,9 @@ DESCRIPTION
.#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_v9 6
-.#define bfd_mach_sparc_v9a 7 {* 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_v9_p(mach) \
. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
@@ -115,6 +118,7 @@ DESCRIPTION
.#define bfd_mach_mips4000 4000
.#define bfd_mach_mips4010 4010
.#define bfd_mach_mips4100 4100
+.#define bfd_mach_mips4111 4111
.#define bfd_mach_mips4300 4300
.#define bfd_mach_mips4400 4400
.#define bfd_mach_mips4600 4600
@@ -127,9 +131,11 @@ DESCRIPTION
. 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 *}
@@ -143,34 +149,61 @@ DESCRIPTION
. bfd_arch_rs6000, {* IBM RS/6000 *}
. 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 *}
.#define bfd_mach_z8001 1
.#define bfd_mach_z8002 2
. 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
.#define bfd_mach_sh3 0x30
+.#define bfd_mach_sh3_dsp 0x3d
.#define bfd_mach_sh3e 0x3e
.#define bfd_mach_sh4 0x40
. 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 *}
.#define bfd_mach_arm_2 1
-.#define bfd_mach_arm_2a 2
+.#define bfd_mach_arm_2a 2
.#define bfd_mach_arm_3 3
.#define bfd_mach_arm_3M 4
-.#define bfd_mach_arm_4 5
+.#define bfd_mach_arm_4 5
.#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_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 *}
+.#define bfd_mach_m32rx 'x'
. 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_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
. bfd_arch_last
. };
@@ -214,9 +247,11 @@ 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_d10v_arch;
+extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
extern const bfd_arch_info_type bfd_h8500_arch;
extern const bfd_arch_info_type bfd_hppa_arch;
+extern const bfd_arch_info_type bfd_i370_arch;
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;
@@ -228,15 +263,20 @@ extern const bfd_arch_info_type bfd_mn10200_arch;
extern const bfd_arch_info_type bfd_mn10300_arch;
extern const bfd_arch_info_type bfd_powerpc_arch;
extern const bfd_arch_info_type bfd_rs6000_arch;
+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_tic80_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_w65_arch;
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;
static const bfd_arch_info_type * const bfd_archures_list[] =
{
@@ -248,9 +288,11 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_arc_arch,
&bfd_arm_arch,
&bfd_d10v_arch,
+ &bfd_d30v_arch,
&bfd_h8300_arch,
&bfd_h8500_arch,
&bfd_hppa_arch,
+ &bfd_i370_arch,
&bfd_i386_arch,
&bfd_i860_arch,
&bfd_i960_arch,
@@ -265,12 +307,16 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_sh_arch,
&bfd_sparc_arch,
&bfd_tic30_arch,
+ &bfd_tic80_arch,
&bfd_vax_arch,
&bfd_we32k_arch,
&bfd_z8k_arch,
&bfd_ns32k_arch,
&bfd_w65_arch,
&bfd_v850_arch,
+ &bfd_fr30_arch,
+ &bfd_mcore_arch,
+ &bfd_avr_arch,
#endif
0
};
@@ -747,10 +793,13 @@ bfd_default_scan (info, string)
arch = bfd_arch_m68k;
number = bfd_mach_m68040;
break;
+ case 68060:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_m68060;
+ break;
case 68332:
arch = bfd_arch_m68k;
- /* FIXME: This should be cpu32. */
- number = bfd_mach_m68020;
+ number = bfd_mach_cpu32;
break;
case 32000:
@@ -771,6 +820,26 @@ bfd_default_scan (info, string)
arch = bfd_arch_rs6000;
break;
+ case 7410:
+ arch = bfd_arch_sh;
+ number = bfd_mach_sh_dsp;
+ break;
+
+ case 7708:
+ arch = bfd_arch_sh;
+ number = bfd_mach_sh3;
+ break;
+
+ case 7729:
+ arch = bfd_arch_sh;
+ number = bfd_mach_sh3_dsp;
+ break;
+
+ case 7750:
+ arch = bfd_arch_sh;
+ number = bfd_mach_sh4;
+ break;
+
default:
return false;
}
@@ -863,9 +932,58 @@ 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!";
}
+
+/*
+FUNCTION
+ bfd_octets_per_byte
+
+SYNOPSIS
+ unsigned int bfd_octets_per_byte(bfd *abfd);
+
+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;
+{
+ return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd),
+ bfd_get_mach (abfd));
+}
+
+/*
+FUNCTION
+ bfd_arch_mach_octets_per_byte
+
+SYNOPSIS
+ unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
+ unsigned long machine);
+
+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;
+{
+ 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
new file mode 100644
index 0000000..3e6ee47
--- /dev/null
+++ b/contrib/binutils/bfd/armnetbsd.c
@@ -0,0 +1,49 @@
+/* BFD back-end for NetBSD/ARM a.out-ish binaries.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define BYTES_IN_WORD 4
+#undef TARGET_IS_BIG_ENDIAN_P
+
+#define TARGET_PAGE_SIZE 4096
+#define SEGMENT_SIZE TARGET_PAGE_SIZE
+
+#define DEFAULT_ARCH bfd_arch_arm
+#define DEFAULT_MID M_ARM6_NETBSD
+/*#define MACHTYPE_OK(mtype) ((mtype) == M_ARM6_NETBSD)*/
+
+#define MY(OP) CAT (armnetbsd_, OP)
+/* This needs to start with a.out so GDB knows it is an a.out variant. */
+#define TARGETNAME "a.out-arm-netbsd"
+
+#if 0
+#define NAME(x,y) CAT3(aoutarm,_32_,y)
+
+#define aoutarm_32_get_section_contents aout_32_get_section_contents
+
+#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup
+
+#include "bfd.h" /* To ensure following declaration is OK */
+
+CONST struct reloc_howto_struct *
+MY_bfd_reloc_type_lookup
+ PARAMS ((bfd * abfd AND
+ bfd_reloc_code_real_type code));
+#endif
+
+#include "netbsd.h"
diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h
index e2ed936..09753c2 100644
--- a/contrib/binutils/bfd/bfd-in.h
+++ b/contrib/binutils/bfd/bfd-in.h
@@ -1,5 +1,5 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -89,7 +89,7 @@ typedef struct _bfd bfd;
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
-#if defined (__GNUG__) && (__GNUC_MINOR__ > 5)
+#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#ifdef MPW
@@ -121,20 +121,24 @@ typedef long int file_ptr;
use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be
defined above. */
+#ifndef BFD_HOST_64_BIT
+# if BFD_HOST_64BIT_LONG
+# define BFD_HOST_64_BIT long
+# define BFD_HOST_U_64_BIT unsigned long
+# else
+# ifdef __GNUC__
+# if __GNUC__ >= 2
+# define BFD_HOST_64_BIT long long
+# define BFD_HOST_U_64_BIT unsigned long long
+# endif /* __GNUC__ >= 2 */
+# endif /* ! defined (__GNUC__) */
+# endif /* ! BFD_HOST_64BIT_LONG */
+#endif /* ! defined (BFD_HOST_64_BIT) */
+
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
-#if BFD_HOST_64BIT_LONG
-#define BFD_HOST_64_BIT long
-#define BFD_HOST_U_64_BIT unsigned long
-#else
-#ifdef __GNUC__
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long long
-#else /* ! defined (__GNUC__) */
#error No 64 bit integer type available
-#endif /* ! defined (__GNUC__) */
-#endif /* ! BFD_HOST_64BIT_LONG */
#endif /* ! defined (BFD_HOST_64_BIT) */
typedef BFD_HOST_U_64_BIT bfd_vma;
@@ -175,7 +179,9 @@ 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)
+
#endif /* not BFD64 */
+
#define printf_vma(x) fprintf_vma(stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
@@ -620,6 +626,20 @@ extern boolean bfd_elf64_size_dynamic_sections
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
+/* 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. */
+extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
+
+/* 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
+ buffer needs to be, call bfd_get_elf_phdr_upper_bound.
+
+ Return the number of program header table entries read, or -1 if an
+ error occurs; bfd_get_error will return an appropriate code. */
+extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
+
/* SunOS shared library support routines for the linker. */
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
@@ -691,7 +711,41 @@ union internal_auxent;
extern boolean bfd_coff_get_syment
PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
+
extern boolean bfd_coff_get_auxent
PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
+extern boolean bfd_coff_set_symbol_class
+ PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
+
+/* ARM Interworking support. Called from linker. */
+extern boolean bfd_arm_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean bfd_arm_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+
+extern boolean bfd_arm_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+/* PE ARM Interworking support. Called from linker. */
+extern boolean bfd_arm_pe_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean bfd_arm_pe_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+
+extern boolean bfd_arm_pe_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+/* ELF ARM Interworking support. Called from linker. */
+extern boolean bfd_elf32_arm_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean bfd_elf32_arm_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+
+extern boolean bfd_elf32_arm_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+
/* And more from the source. */
diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h
index 9137998..4c3eea0 100644
--- a/contrib/binutils/bfd/bfd-in2.h
+++ b/contrib/binutils/bfd/bfd-in2.h
@@ -1,5 +1,5 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -89,7 +89,7 @@ typedef struct _bfd bfd;
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
-#if defined (__GNUG__) && (__GNUC_MINOR__ > 5)
+#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#ifdef MPW
@@ -121,20 +121,24 @@ typedef long int file_ptr;
use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be
defined above. */
+#ifndef BFD_HOST_64_BIT
+# if BFD_HOST_64BIT_LONG
+# define BFD_HOST_64_BIT long
+# define BFD_HOST_U_64_BIT unsigned long
+# else
+# ifdef __GNUC__
+# if __GNUC__ >= 2
+# define BFD_HOST_64_BIT long long
+# define BFD_HOST_U_64_BIT unsigned long long
+# endif /* __GNUC__ >= 2 */
+# endif /* ! defined (__GNUC__) */
+# endif /* ! BFD_HOST_64BIT_LONG */
+#endif /* ! defined (BFD_HOST_64_BIT) */
+
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
-#if BFD_HOST_64BIT_LONG
-#define BFD_HOST_64_BIT long
-#define BFD_HOST_U_64_BIT unsigned long
-#else
-#ifdef __GNUC__
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long long
-#else /* ! defined (__GNUC__) */
#error No 64 bit integer type available
-#endif /* ! defined (__GNUC__) */
-#endif /* ! BFD_HOST_64BIT_LONG */
#endif /* ! defined (BFD_HOST_64_BIT) */
typedef BFD_HOST_U_64_BIT bfd_vma;
@@ -175,7 +179,9 @@ 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)
+
#endif /* not BFD64 */
+
#define printf_vma(x) fprintf_vma(stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
@@ -620,6 +626,20 @@ extern boolean bfd_elf64_size_dynamic_sections
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
+/* 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. */
+extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
+
+/* 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
+ buffer needs to be, call bfd_get_elf_phdr_upper_bound.
+
+ Return the number of program header table entries read, or -1 if an
+ error occurs; bfd_get_error will return an appropriate code. */
+extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
+
/* SunOS shared library support routines for the linker. */
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
@@ -691,9 +711,43 @@ union internal_auxent;
extern boolean bfd_coff_get_syment
PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
+
extern boolean bfd_coff_get_auxent
PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
+extern boolean bfd_coff_set_symbol_class
+ PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
+
+/* ARM Interworking support. Called from linker. */
+extern boolean bfd_arm_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean bfd_arm_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+
+extern boolean bfd_arm_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+/* PE ARM Interworking support. Called from linker. */
+extern boolean bfd_arm_pe_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean bfd_arm_pe_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+
+extern boolean bfd_arm_pe_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+/* ELF ARM Interworking support. Called from linker. */
+extern boolean bfd_elf32_arm_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean bfd_elf32_arm_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+
+extern boolean bfd_elf32_arm_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+
/* And more from the source. */
void
bfd_init PARAMS ((void));
@@ -719,11 +773,17 @@ bfd_close_all_done PARAMS ((bfd *));
bfd *
bfd_create PARAMS ((CONST char *filename, bfd *templ));
+boolean
+bfd_make_writable PARAMS ((bfd *abfd));
+
+boolean
+bfd_make_readable PARAMS ((bfd *abfd));
+
/* Byte swapping macros for user section data. */
#define bfd_put_8(abfd, val, ptr) \
- (*((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) \
@@ -758,6 +818,20 @@ bfd_create PARAMS ((CONST char *filename, bfd *templ));
#define bfd_get_signed_64(abfd, ptr) \
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
+#define bfd_get(bits, abfd, ptr) \
+ ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
+ : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
+ : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
+ : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
+ : (abort (), (bfd_vma) - 1))
+
+#define bfd_put(bits, abfd, val, ptr) \
+ ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
+ : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
+ : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
+ : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
+ : (abort (), (void) 0))
+
/* Byte swapping macros for file header data. */
@@ -797,6 +871,27 @@ bfd_create PARAMS ((CONST char *filename, bfd *templ));
#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. */
+
+struct bfd_comdat_info
+{
+ /* The name of the symbol associated with a comdat section. */
+ const char *name;
+
+ /* 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
@@ -862,7 +957,7 @@ typedef struct sec
standard data. */
#define SEC_CONSTRUCTOR 0x100
- /* The section is a constuctor, and should be placed at the
+ /* 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
@@ -951,6 +1046,17 @@ typedef struct sec
else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x800000
+ /* 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. */
+#define SEC_SMALL_DATA 0x2000000
+
+ /* This section contains data which may be shared with other
+ executables or shared objects. */
+#define SEC_SHARED 0x4000000
+
/* End of section flags. */
/* Some internal packed boolean fields. */
@@ -964,6 +1070,9 @@ typedef struct sec
/* 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;
+
/* End of internal packed boolean fields. */
/* The virtual memory address of the section - where it will be
@@ -981,22 +1090,25 @@ typedef struct sec
bfd_vma lma;
- /* The size of the section in bytes, 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 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 _cooked_size;
- /* The original size on disk of the section, in bytes. Normally this
+ /* 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;
/* If this section is going to be output, then this value is the
- offset into the output section of the first byte in the input
- section. E.g., if this was going to start at the 100th byte in
- the output section, this value would be 100. */
+ 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;
@@ -1054,6 +1166,10 @@ typedef struct sec
unsigned int lineno_count;
+ /* Optional information about a COMDAT entry; NULL if not COMDAT */
+
+ struct bfd_comdat_info *comdat;
+
/* When a section is being output, this value changes as more
linenumbers are written out */
@@ -1113,9 +1229,11 @@ extern const struct symbol_cache_entry * const bfd_com_symbol;
extern const struct symbol_cache_entry * const bfd_und_symbol;
extern const struct symbol_cache_entry * const bfd_ind_symbol;
#define bfd_get_section_size_before_reloc(section) \
- (section->reloc_done ? (abort(),1): (section)->_raw_size)
+ ((section)->reloc_done ? (abort (), (bfd_size_type) 1) \
+ : (section)->_raw_size)
#define bfd_get_section_size_after_reloc(section) \
- ((section->reloc_done) ? (section)->_cooked_size: (abort(),1))
+ ((section)->reloc_done ? (section)->_cooked_size \
+ : (abort (), (bfd_size_type) 1))
asection *
bfd_get_section_by_name PARAMS ((bfd *abfd, CONST char *name));
@@ -1160,6 +1278,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, ase
#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));
+
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known */
@@ -1172,6 +1294,7 @@ enum bfd_architecture
#define bfd_mach_m68030 5
#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.
@@ -1199,8 +1322,9 @@ enum bfd_architecture
#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_v9 6
-#define bfd_mach_sparc_v9a 7 /* 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_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
@@ -1210,6 +1334,7 @@ enum bfd_architecture
#define bfd_mach_mips4000 4000
#define bfd_mach_mips4010 4010
#define bfd_mach_mips4100 4100
+#define bfd_mach_mips4111 4111
#define bfd_mach_mips4300 4300
#define bfd_mach_mips4400 4400
#define bfd_mach_mips4600 4600
@@ -1222,9 +1347,11 @@ enum bfd_architecture
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 */
@@ -1238,34 +1365,61 @@ enum bfd_architecture
bfd_arch_rs6000, /* IBM RS/6000 */
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 */
#define bfd_mach_z8001 1
#define bfd_mach_z8002 2
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
#define bfd_mach_sh3 0x30
+#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
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 */
#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
+#define bfd_mach_arm_2a 2
#define bfd_mach_arm_3 3
#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
+#define bfd_mach_arm_4 5
#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_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 */
+#define bfd_mach_m32rx 'x'
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_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
bfd_arch_last
};
@@ -1331,6 +1485,13 @@ const char *
bfd_printable_arch_mach
PARAMS ((enum bfd_architecture arch, unsigned long machine));
+unsigned int
+bfd_octets_per_byte PARAMS ((bfd *abfd));
+
+unsigned int
+bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
+ unsigned long machine));
+
typedef enum bfd_reloc_status
{
/* No errors detected */
@@ -1449,13 +1610,26 @@ struct reloc_howto_struct
/* The textual name of the relocation type. */
char *name;
- /* When performing a partial link, some formats must modify the
- relocations rather than the data - this flag signals this.*/
+ /* 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
+ addend is recorded with the section contents; when performing a
+ partial link (ld -r) the section contents (the data) will be
+ modified. The value of this field is FALSE if addends are
+ recorded with the relocation (in arelent.addend); when performing
+ a partial link the relocation will be modified.
+ All relocations for all ELF USE_RELA targets should set this field
+ to FALSE (values of TRUE should be looked on with suspicion).
+ However, the converse is not true: not all relocations of all ELF
+ USE_REL targets set this field to TRUE. Why this is so is peculiar
+ to each particular target. For relocs that aren't used in partial
+ 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
are to be used in the relocation sum. E.g., if this was an 8 bit
- bit of data which we read and relocated, this would be
+ byte of data which we read and relocated, this would be
0x000000ff. When we have relocs which have an addend, such as
sun4 extended relocs, the value in the offset part of a
relocating field is garbage so we never use it. In this case
@@ -1481,6 +1655,9 @@ struct reloc_howto_struct
{(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
+#define EMPTY_HOWTO(C) \
+ HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
+
#define HOWTO_PREPARE(relocation, symbol) \
{ \
if (symbol != (asymbol *)NULL) { \
@@ -1505,6 +1682,7 @@ bfd_check_overflow
PARAMS ((enum complain_overflow how,
unsigned int bitsize,
unsigned int rightshift,
+ unsigned int addrsize,
bfd_vma relocation));
bfd_reloc_status_type
@@ -1661,6 +1839,9 @@ relocation types already defined. */
BFD_RELOC_SPARC_L44,
BFD_RELOC_SPARC_REGISTER,
+/* SPARC little endian relocation */
+ BFD_RELOC_SPARC_REV32,
+
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
"addend" in some special way.
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
@@ -1709,6 +1890,17 @@ The GNU linker currently doesn't do any of this optimizing. */
BFD_RELOC_ALPHA_ELF_LITERAL,
BFD_RELOC_ALPHA_LITUSE,
+/* The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
+process the explicit !<reloc>!sequence relocations, and are mapped
+into the normal relocations at the end of processing. */
+ BFD_RELOC_ALPHA_USER_LITERAL,
+ BFD_RELOC_ALPHA_USER_LITUSE_BASE,
+ BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF,
+ BFD_RELOC_ALPHA_USER_LITUSE_JSR,
+ BFD_RELOC_ALPHA_USER_GPDISP,
+ BFD_RELOC_ALPHA_USER_GPRELHIGH,
+ BFD_RELOC_ALPHA_USER_GPRELLOW,
+
/* The HINT relocation indicates a value that should be filled into the
"hint" field of a jmp/jsr/ret instruction, for possible branch-
prediction logic which may be provided on some processors. */
@@ -1764,6 +1956,10 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_GOT_LO16,
BFD_RELOC_MIPS_CALL_HI16,
BFD_RELOC_MIPS_CALL_LO16,
+ BFD_RELOC_MIPS_SUB,
+ BFD_RELOC_MIPS_GOT_PAGE,
+ BFD_RELOC_MIPS_GOT_OFST,
+ BFD_RELOC_MIPS_GOT_DISP,
/* i386/elf relocations */
@@ -1790,6 +1986,14 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_NS32K_DISP_16_PCREL,
BFD_RELOC_NS32K_DISP_32_PCREL,
+/* Picojava relocs. Not all of these appear in object files. */
+ BFD_RELOC_PJ_CODE_HI16,
+ BFD_RELOC_PJ_CODE_LO16,
+ BFD_RELOC_PJ_CODE_DIR16,
+ BFD_RELOC_PJ_CODE_DIR32,
+ BFD_RELOC_PJ_CODE_REL16,
+ BFD_RELOC_PJ_CODE_REL32,
+
/* Power(rs6000) and PowerPC relocations. */
BFD_RELOC_PPC_B26,
BFD_RELOC_PPC_BA26,
@@ -1822,6 +2026,9 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_PPC_EMB_BIT_FLD,
BFD_RELOC_PPC_EMB_RELSDA,
+/* IBM 370/390 relocations */
+ BFD_RELOC_I370_D12,
+
/* The type of reloc used to build a contructor table - at the moment
probably a 32 bit wide absolute relocation, but the target can choose.
It generally does map to one of the other relocation types. */
@@ -1834,6 +2041,7 @@ not stored in the instruction. */
/* These relocs are only used within the ARM assembler. They are not
(at present) written to any object files. */
BFD_RELOC_ARM_IMMEDIATE,
+ BFD_RELOC_ARM_ADRL_IMMEDIATE,
BFD_RELOC_ARM_OFFSET_IMM,
BFD_RELOC_ARM_SHIFT_IMM,
BFD_RELOC_ARM_SWI,
@@ -1849,6 +2057,15 @@ not stored in the instruction. */
BFD_RELOC_ARM_THUMB_IMM,
BFD_RELOC_ARM_THUMB_SHIFT,
BFD_RELOC_ARM_THUMB_OFFSET,
+ 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,
/* Hitachi SH relocs. Not all of these appear in object files. */
BFD_RELOC_SH_PCDISP8BY2,
@@ -1907,7 +2124,53 @@ assumed to be 0. */
assumed to be 0. */
BFD_RELOC_D10V_18_PCREL,
+/* Mitsubishi D30V relocs.
+This is a 6-bit absolute reloc. */
+ BFD_RELOC_D30V_6,
+
+/* This is a 6-bit pc-relative reloc with
+the right 3 bits assumed to be 0. */
+ BFD_RELOC_D30V_9_PCREL,
+
+/* This is a 6-bit pc-relative reloc with
+the right 3 bits assumed to be 0. Same
+as the previous reloc but on the right side
+of the container. */
+ BFD_RELOC_D30V_9_PCREL_R,
+
+/* This is a 12-bit absolute reloc with the
+right 3 bitsassumed to be 0. */
+ BFD_RELOC_D30V_15,
+
+/* This is a 12-bit pc-relative reloc with
+the right 3 bits assumed to be 0. */
+ BFD_RELOC_D30V_15_PCREL,
+/* This is a 12-bit pc-relative reloc with
+the right 3 bits assumed to be 0. Same
+as the previous reloc but on the right side
+of the container. */
+ BFD_RELOC_D30V_15_PCREL_R,
+
+/* This is an 18-bit absolute reloc with
+the right 3 bits assumed to be 0. */
+ BFD_RELOC_D30V_21,
+
+/* This is an 18-bit pc-relative reloc with
+the right 3 bits assumed to be 0. */
+ BFD_RELOC_D30V_21_PCREL,
+
+/* This is an 18-bit pc-relative reloc with
+the right 3 bits assumed to be 0. Same
+as the previous reloc but on the right side
+of the container. */
+ BFD_RELOC_D30V_21_PCREL_R,
+
+/* This is a 32-bit absolute reloc. */
+ BFD_RELOC_D30V_32,
+
+/* This is a 32-bit pc-relative reloc. */
+ BFD_RELOC_D30V_32_PCREL,
/* Mitsubishi M32R relocs.
This is a 24 bit absolute address. */
@@ -1971,6 +2234,27 @@ data area pointer. */
/* This is a 16 bit offset from the tiny data area pointer. */
BFD_RELOC_V850_TDA_16_16_OFFSET,
+/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
+data area pointer. */
+ BFD_RELOC_V850_TDA_4_5_OFFSET,
+
+/* This is a 4 bit offset from the tiny data area pointer. */
+ BFD_RELOC_V850_TDA_4_4_OFFSET,
+
+/* This is a 16 bit offset from the short data area pointer, with the
+bits placed non-contigously in the instruction. */
+ BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
+
+/* This is a 16 bit offset from the zero data area pointer, with the
+bits placed non-contigously in the instruction. */
+ BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
+
+/* This is a 6 bit offset from the call table base pointer. */
+ BFD_RELOC_V850_CALLT_6_7_OFFSET,
+
+/* This is a 16 bit offset from the call table base pointer. */
+ BFD_RELOC_V850_CALLT_16_16_OFFSET,
+
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
instruction. */
@@ -1984,6 +2268,133 @@ instruction. */
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 48 bit reloc for the FR30 that stores 32 bits. */
+ BFD_RELOC_FR30_48,
+
+/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
+two sections. */
+ BFD_RELOC_FR30_20,
+
+/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
+4 bits. */
+ BFD_RELOC_FR30_6_IN_4,
+
+/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
+into 8 bits. */
+ BFD_RELOC_FR30_8_IN_8,
+
+/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
+into 8 bits. */
+ BFD_RELOC_FR30_9_IN_8,
+
+/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
+into 8 bits. */
+ BFD_RELOC_FR30_10_IN_8,
+
+/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
+short offset into 8 bits. */
+ BFD_RELOC_FR30_9_PCREL,
+
+/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
+short offset into 11 bits. */
+ BFD_RELOC_FR30_12_PCREL,
+
+/* Motorola Mcore relocations. */
+ BFD_RELOC_MCORE_PCREL_IMM8BY4,
+ BFD_RELOC_MCORE_PCREL_IMM11BY2,
+ BFD_RELOC_MCORE_PCREL_IMM4BY2,
+ BFD_RELOC_MCORE_PCREL_32,
+ BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
+ BFD_RELOC_MCORE_RVA,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
+short offset into 7 bits. */
+ BFD_RELOC_AVR_7_PCREL,
+
+/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
+short offset into 12 bits. */
+ BFD_RELOC_AVR_13_PCREL,
+
+/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
+program memory address) into 16 bits. */
+ BFD_RELOC_AVR_16_PM,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
+data memory address) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_LO8_LDI,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+of data memory address) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_HI8_LDI,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
+of program memory address) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_HH8_LDI,
+
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
+(usually data memory address) into 8 bit immediate value of SUBI insn. */
+ BFD_RELOC_AVR_LO8_LDI_NEG,
+
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
+(high 8 bit of data memory address) into 8 bit immediate value of
+SUBI insn. */
+ BFD_RELOC_AVR_HI8_LDI_NEG,
+
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
+(most high 8 bit of program memory address) into 8 bit immediate value
+of LDI or SUBI insn. */
+ BFD_RELOC_AVR_HH8_LDI_NEG,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
+command address) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_LO8_LDI_PM,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+of command address) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_HI8_LDI_PM,
+
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
+of command address) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_HH8_LDI_PM,
+
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
+(usually command address) into 8 bit immediate value of SUBI insn. */
+ BFD_RELOC_AVR_LO8_LDI_PM_NEG,
+
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
+(high 8 bit of 16 bit command address) into 8 bit immediate value
+of SUBI insn. */
+ BFD_RELOC_AVR_HI8_LDI_PM_NEG,
+
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
+(high 6 bit of 22 bit command address) into 8 bit immediate
+value of SUBI insn. */
+ BFD_RELOC_AVR_HH8_LDI_PM_NEG,
+
+/* This is a 32 bit reloc for the AVR that stores 23 bit value
+into 22 bits. */
+ BFD_RELOC_AVR_CALL,
+
+/* These two relocations are used by the linker to determine which of
+the entries in a C++ virtual function table are actually used. When
+the --gc-sections option is given, the linker will zero out the entries
+that are not used, so that the code for those functions need not be
+included in the output.
+
+VTABLE_INHERIT is a zero-space relocation used to describe to the
+linker the inheritence tree of a C++ virtual function table. The
+relocation's symbol should be the parent class' vtable, and the
+relocation should be located at the child vtable.
+
+VTABLE_ENTRY is a zero-space relocation that describes the use of a
+virtual function table entry. The reloc's symbol should refer to the
+table of the class mentioned in the code. Off of that base, an offset
+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. */
+ BFD_RELOC_VTABLE_INHERIT,
+ BFD_RELOC_VTABLE_ENTRY,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@@ -2038,7 +2449,7 @@ typedef struct symbol_cache_entry
<<BSF_GLOBAL>> */
/* The symbol is a debugging record. The value has an arbitary
- meaning. */
+ meaning, unless BSF_DEBUGGING_RELOC is also set. */
#define BSF_DEBUGGING 0x08
/* The symbol denotes a function entry point. Used in ELF,
@@ -2096,6 +2507,11 @@ typedef struct symbol_cache_entry
others someday. */
#define BSF_OBJECT 0x10000
+ /* 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
@@ -2137,6 +2553,9 @@ bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol));
int
bfd_decode_symclass PARAMS ((asymbol *symbol));
+boolean
+bfd_is_undefined_symclass PARAMS ((int symclass));
+
void
bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
@@ -2280,6 +2699,7 @@ struct _bfd
struct nlm_obj_tdata *nlm_obj_data;
struct bout_data_struct *bout_data;
struct sun_core_struct *sun_core_data;
+ struct sco5_core_struct *sco5_core_data;
struct trad_core_struct *trad_core_data;
struct som_data_struct *som_data;
struct hpux_core_struct *hpux_core_data;
@@ -2432,6 +2852,9 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_relax_section(abfd, section, link_info, again) \
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
+#define bfd_gc_sections(abfd, link_info) \
+ BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
+
#define bfd_link_hash_table_create(abfd) \
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
@@ -2519,6 +2942,7 @@ enum bfd_flavour {
bfd_target_os9k_flavour,
bfd_target_versados_flavour,
bfd_target_msdos_flavour,
+ bfd_target_ovax_flavour,
bfd_target_evax_flavour
};
@@ -2726,7 +3150,8 @@ CAT(NAME,_bfd_relax_section),\
CAT(NAME,_bfd_link_hash_table_create),\
CAT(NAME,_bfd_link_add_symbols),\
CAT(NAME,_bfd_final_link),\
-CAT(NAME,_bfd_link_split_section)
+CAT(NAME,_bfd_link_split_section),\
+CAT(NAME,_bfd_gc_sections)
int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
struct bfd_link_info *, struct bfd_link_order *,
@@ -2750,7 +3175,10 @@ CAT(NAME,_bfd_link_split_section)
/* Should this section be split up into smaller pieces during linking. */
boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
- /* Routines to handle dynamic symbols and relocs. */
+ /* 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. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME)\
CAT(NAME,_get_dynamic_symtab_upper_bound),\
CAT(NAME,_canonicalize_dynamic_symtab),\
@@ -2767,7 +3195,11 @@ CAT(NAME,_canonicalize_dynamic_reloc)
long (*_bfd_canonicalize_dynamic_reloc)
PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
+ /* 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));
@@ -2778,6 +3210,9 @@ 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 *));
+
boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c
index 8293a72..e04172f 100644
--- a/contrib/binutils/bfd/bfd.c
+++ b/contrib/binutils/bfd/bfd.c
@@ -1,5 +1,5 @@
/* Generic BFD library interface and support routines.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -167,6 +167,7 @@ CODE_FRAGMENT
. struct nlm_obj_tdata *nlm_obj_data;
. struct bout_data_struct *bout_data;
. struct sun_core_struct *sun_core_data;
+. struct sco5_core_struct *sco5_core_data;
. struct trad_core_struct *trad_core_data;
. struct som_data_struct *som_data;
. struct hpux_core_struct *hpux_core_data;
@@ -270,25 +271,25 @@ CODE_FRAGMENT
static bfd_error_type bfd_error = bfd_error_no_error;
CONST char *CONST bfd_errmsgs[] = {
- "No error",
- "System call error",
- "Invalid bfd target",
- "File in wrong format",
- "Invalid operation",
- "Memory exhausted",
- "No symbols",
- "Archive has no index; run ranlib to add one",
- "No more archived files",
- "Malformed archive",
- "File format not recognized",
- "File format is ambiguous",
- "Section has no contents",
- "Nonrepresentable section on output",
- "Symbol needs debug section which does not exist",
- "Bad value",
- "File truncated",
- "File too big",
- "#<Invalid error code>"
+ N_("No error"),
+ N_("System call error"),
+ N_("Invalid bfd target"),
+ N_("File in wrong format"),
+ N_("Invalid operation"),
+ N_("Memory exhausted"),
+ N_("No symbols"),
+ N_("Archive has no index; run ranlib to add one"),
+ N_("No more archived files"),
+ N_("Malformed archive"),
+ N_("File format not recognized"),
+ N_("File format is ambiguous"),
+ N_("Section has no contents"),
+ N_("Nonrepresentable section on output"),
+ N_("Symbol needs debug section which does not exist"),
+ N_("Bad value"),
+ N_("File truncated"),
+ N_("File too big"),
+ N_("#<Invalid error code>")
};
/*
@@ -352,7 +353,7 @@ bfd_errmsg (error_tag)
((int)error_tag > (int)bfd_error_invalid_error_code)))
error_tag = bfd_error_invalid_error_code;/* sanity check */
- return bfd_errmsgs [(int)error_tag];
+ return _(bfd_errmsgs [(int)error_tag]);
}
/*
@@ -617,7 +618,7 @@ DESCRIPTION
/*ARGSUSED*/
void
bfd_set_reloc (ignore_abfd, asect, location, count)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
sec_ptr asect;
arelent **location;
unsigned int count;
@@ -675,9 +676,33 @@ bfd_assert (file, line)
const char *file;
int line;
{
- (*_bfd_error_handler) ("bfd assertion fail %s:%d", file, line);
+ (*_bfd_error_handler) (_("bfd assertion fail %s:%d"), file, line);
}
+/* A more or less friendly abort message. In libbfd.h abort is
+ defined to call this function. */
+
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+
+void
+_bfd_abort (file, line, fn)
+ const char *file;
+ int line;
+ const char *fn;
+{
+ if (fn != NULL)
+ (*_bfd_error_handler)
+ (_("BFD internal error, aborting at %s line %d in %s\n"),
+ file, line, fn);
+ else
+ (*_bfd_error_handler)
+ (_("BFD internal error, aborting at %s line %d\n"),
+ file, line);
+ (*_bfd_error_handler) (_("Please report this bug.\n"));
+ xexit (EXIT_FAILURE);
+}
/*
FUNCTION
@@ -1044,6 +1069,9 @@ DESCRIPTION
.#define bfd_relax_section(abfd, section, link_info, again) \
. BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
.
+.#define bfd_gc_sections(abfd, link_info) \
+. BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
+.
.#define bfd_link_hash_table_create(abfd) \
. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
.
diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c
index 8fcbadc..c2980b0 100644
--- a/contrib/binutils/bfd/binary.c
+++ b/contrib/binutils/bfd/binary.c
@@ -1,5 +1,5 @@
/* BFD back-end for binary objects.
- Copyright 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -58,7 +58,7 @@ static int binary_sizeof_headers PARAMS ((bfd *, boolean));
static boolean
binary_mkobject (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
return true;
}
@@ -112,7 +112,7 @@ binary_object_p (abfd)
static boolean
binary_get_section_contents (abfd, section, location, offset, count)
bfd *abfd;
- asection *section;
+ asection *section ATTRIBUTE_UNUSED;
PTR location;
file_ptr offset;
bfd_size_type count;
@@ -127,7 +127,7 @@ binary_get_section_contents (abfd, section, location, offset, count)
static long
binary_get_symtab_upper_bound (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
return (BIN_SYMS + 1) * sizeof (asymbol *);
}
@@ -222,7 +222,7 @@ binary_make_empty_symbol (abfd)
static void
binary_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -255,14 +255,6 @@ binary_set_section_contents (abfd, sec, data, offset, size)
file_ptr offset;
bfd_size_type size;
{
- /* We don't want to output anything for a section that is neither
- loaded nor allocated. The contents of such a section are not
- meaningful in the binary format. */
- if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- return true;
- if ((sec->flags & SEC_NEVER_LOAD) != 0)
- return true;
-
if (! abfd->output_has_begun)
{
boolean found_low;
@@ -275,7 +267,8 @@ binary_set_section_contents (abfd, sec, data, offset, size)
found_low = false;
low = 0;
for (s = abfd->sections; s != NULL; s = s->next)
- if (((s->flags & (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC))
+ if (((s->flags
+ & (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC | SEC_NEVER_LOAD))
== (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC))
&& (! found_low || s->lma < low))
{
@@ -284,11 +277,40 @@ binary_set_section_contents (abfd, sec, data, offset, size)
}
for (s = abfd->sections; s != NULL; s = s->next)
- s->filepos = s->lma - low;
+ {
+ s->filepos = s->lma - low;
+
+ /* Skip following warning check for sections that will not
+ occupy file space. */
+ if ((s->flags
+ & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_NEVER_LOAD))
+ != (SEC_HAS_CONTENTS | SEC_ALLOC))
+ 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. */
+
+ if (s->filepos < 0)
+ (*_bfd_error_handler)
+ (_("Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."),
+ bfd_get_section_name (abfd, s),
+ (unsigned long) s->filepos);
+ }
abfd->output_has_begun = true;
}
+ /* We don't want to output anything for a section that is neither
+ loaded nor allocated. The contents of such a section are not
+ meaningful in the binary format. */
+ if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
+ return true;
+ if ((sec->flags & SEC_NEVER_LOAD) != 0)
+ return true;
+
return _bfd_generic_set_section_contents (abfd, sec, data, offset, size);
}
@@ -296,8 +318,8 @@ binary_set_section_contents (abfd, sec, data, offset, size)
static int
binary_sizeof_headers (abfd, exec)
- bfd *abfd;
- boolean exec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean exec ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -305,6 +327,7 @@ binary_sizeof_headers (abfd, exec)
#define binary_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#define binary_bfd_relax_section bfd_generic_relax_section
+#define binary_bfd_gc_sections bfd_generic_gc_sections
#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define binary_bfd_final_link _bfd_generic_final_link
@@ -359,5 +382,7 @@ const bfd_target binary_vec =
BFD_JUMP_TABLE_LINK (binary),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
NULL
};
diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c
index b28de4b..ad3140e 100644
--- a/contrib/binutils/bfd/cache.c
+++ b/contrib/binutils/bfd/cache.c
@@ -285,10 +285,25 @@ bfd_open_file (abfd)
}
else
{
- /* Create the file. Unlink it first, for the convenience of
- operating systems which worry about overwriting running
- binaries. */
- unlink (abfd->filename);
+ /* Create the file.
+
+ Some operating systems won't let us overwrite a running
+ binary. For them, we want to unlink the file first.
+
+ However, gcc 2.95 will create temporary files using
+ O_EXCL and tight permissions to prevent other users from
+ substituting other .o files during the compilation. gcc
+ will then tell the assembler to use the newly created
+ file as an output file. If we unlink the file here, we
+ open a brief window when another user could still
+ substitute a file.
+
+ So we unlink the output file if and only if it has
+ non-zero size. */
+ struct stat s;
+
+ if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
+ unlink (abfd->filename);
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB);
abfd->opened_once = true;
}
diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c
index 0ec72b9..6bbc279 100644
--- a/contrib/binutils/bfd/coff-alpha.c
+++ b/contrib/binutils/bfd/coff-alpha.c
@@ -1,5 +1,5 @@
/* BFD back-end for ALPHA Extended-Coff files.
- Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@@ -877,7 +877,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
if (r == bfd_reloc_ok && gp_undefined)
{
r = bfd_reloc_dangerous;
- err = (char *) "GP relative relocation used when GP not defined";
+ err = (char *) _("GP relative relocation used when GP not defined");
}
break;
@@ -914,7 +914,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
{
r = bfd_reloc_dangerous;
err =
- (char *) "GP relative relocation used when GP not defined";
+ (char *) _("GP relative relocation used when GP not defined");
}
}
break;
@@ -1133,7 +1133,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
case bfd_reloc_undefined:
if (! ((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
- input_bfd, input_section, rel->address)))
+ input_bfd, input_section, rel->address, true)))
goto error_return;
break;
case bfd_reloc_dangerous:
@@ -1483,7 +1483,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (gp && !ecoff_data (output_bfd)->issued_multiple_gp_warning)
{
(*info->callbacks->warning) (info,
- "using multiple gp values",
+ _("using multiple gp values"),
(char *) NULL, output_bfd,
(asection *) NULL, (bfd_vma) 0);
ecoff_data (output_bfd)->issued_multiple_gp_warning = true;
@@ -1719,7 +1719,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
relocated. */
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
- input_section, (bfd_vma) 0)))
+ input_section, (bfd_vma) 0, true)))
return false;
addend = 0;
}
@@ -1921,7 +1921,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section,
- r_vaddr - input_section->vma)))
+ r_vaddr - input_section->vma, true)))
return false;
relocation = 0;
}
@@ -1989,7 +1989,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (gp_usedp && gp_undefined)
{
if (! ((*info->callbacks->reloc_dangerous)
- (info, "GP relative relocation when GP not defined",
+ (info, _("GP relative relocation when GP not defined"),
input_bfd, input_section, r_vaddr - input_section->vma)))
return false;
/* Only give the error once per link. */
@@ -2266,13 +2266,14 @@ 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, true, false, 4,
+ FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4,
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,
alpha_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
_bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL
},
/* Supported architecture. */
bfd_arch_alpha,
@@ -2357,6 +2358,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
/* Relaxing sections is generic. */
#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
+#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
const bfd_target ecoffalpha_little_vec =
{
@@ -2397,5 +2399,7 @@ const bfd_target ecoffalpha_little_vec =
BFD_JUMP_TABLE_LINK (_bfd_ecoff),
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
new file mode 100644
index 0000000..2b89b84
--- /dev/null
+++ b/contrib/binutils/bfd/coff-arm.c
@@ -0,0 +1,2552 @@
+/* BFD back-end for ARM COFF files.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
+ Written by Cygnus Support.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+#include "coff/arm.h"
+
+#include "coff/internal.h"
+
+#ifdef COFF_WITH_PE
+#include "coff/pe.h"
+#endif
+
+#include "libcoff.h"
+
+/* Macros for manipulation the bits in the flags field of the coff data
+ structure. */
+#define APCS_26_FLAG( abfd ) (coff_data (abfd)->flags & F_APCS_26)
+#define APCS_FLOAT_FLAG( abfd ) (coff_data (abfd)->flags & F_APCS_FLOAT)
+#define PIC_FLAG( abfd ) (coff_data (abfd)->flags & F_PIC)
+#define APCS_SET( abfd ) (coff_data (abfd)->flags & F_APCS_SET)
+#define SET_APCS_FLAGS( abfd, flgs) (coff_data (abfd)->flags = \
+ (coff_data (abfd)->flags & ~ (F_APCS_26 | F_APCS_FLOAT | F_PIC)) \
+ | (flgs | F_APCS_SET))
+#define INTERWORK_FLAG( abfd ) (coff_data (abfd)->flags & F_INTERWORK)
+#define INTERWORK_SET( abfd ) (coff_data (abfd)->flags & F_INTERWORK_SET)
+#define SET_INTERWORK_FLAG( abfd, flg ) (coff_data (abfd)->flags = \
+ (coff_data (abfd)->flags & ~ F_INTERWORK) \
+ | (flg | F_INTERWORK_SET))
+
+#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 *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+static bfd_reloc_status_type aoutarm_fix_pcrel_26_done
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type aoutarm_fix_pcrel_26
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type coff_thumb_pcrel_23
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type coff_thumb_pcrel_12
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type coff_thumb_pcrel_9
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type coff_arm_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+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
+ 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
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **,
+ thumb_pcrel_branchtype));
+static CONST struct reloc_howto_struct * coff_arm_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+static struct bfd_link_hash_table * coff_arm_link_hash_table_create
+ PARAMS ((bfd *));
+static insn32 insert_thumb_branch
+ PARAMS ((insn32, int));
+static struct coff_link_hash_entry * find_thumb_glue
+ PARAMS ((struct bfd_link_info *, CONST char *, bfd *));
+static struct coff_link_hash_entry * find_arm_glue
+ PARAMS ((struct bfd_link_info *, CONST char *, bfd *));
+#ifndef COFF_IMAGE_WITH_PE
+static void record_arm_to_thumb_glue
+ PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
+static void record_thumb_to_arm_glue
+ PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
+#endif
+static boolean coff_arm_merge_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean coff_arm_print_private_bfd_data
+ PARAMS ((bfd *, PTR));
+static boolean _bfd_coff_arm_set_private_flags
+ PARAMS ((bfd *, flagword));
+static boolean coff_arm_copy_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean coff_arm_is_local_label_name
+ PARAMS ((bfd *, const char *));
+static boolean coff_arm_link_output_has_begun
+ PARAMS ((bfd *, struct coff_final_link_info *));
+static boolean coff_arm_final_link_postscript
+ PARAMS ((bfd *, struct coff_final_link_info *));
+
+/* 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 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. */
+static bfd_reloc_status_type
+coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol ATTRIBUTE_UNUSED;
+ PTR data;
+ asection *input_section ATTRIBUTE_UNUSED;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ symvalue diff;
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ diff = reloc_entry->addend;
+
+#define DOIT(x) \
+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
+
+ if (diff != 0)
+ {
+ reloc_howto_type *howto = reloc_entry->howto;
+ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+
+ switch (howto->size)
+ {
+ case 0:
+ {
+ char x = bfd_get_8 (abfd, addr);
+ DOIT (x);
+ bfd_put_8 (abfd, x, addr);
+ }
+ break;
+
+ case 1:
+ {
+ short x = bfd_get_16 (abfd, addr);
+ DOIT (x);
+ bfd_put_16 (abfd, x, addr);
+ }
+ break;
+
+ case 2:
+ {
+ long x = bfd_get_32 (abfd, addr);
+ DOIT (x);
+ bfd_put_32 (abfd, x, addr);
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ /* Now let bfd_perform_relocation finish everything up. */
+ return bfd_reloc_continue;
+}
+
+/* If USER_LABEL_PREFIX is defined as "_" (see coff_arm_is_local_label_name()
+ in this file), then TARGET_UNDERSCORE should be defined, otherwise it
+ should not. */
+#ifndef TARGET_UNDERSCORE
+#define TARGET_UNDERSCORE '_'
+#endif
+
+#ifndef PCRELOFFSET
+#define PCRELOFFSET true
+#endif
+
+/* These most certainly belong somewhere else. Just had to get rid of
+ the manifest constants in the code. */
+#define ARM_8 0
+#define ARM_16 1
+#define ARM_32 2
+#define ARM_26 3
+#define ARM_DISP8 4
+#define ARM_DISP16 5
+#define ARM_DISP32 6
+#define ARM_26D 7
+/* 8 is unused */
+#define ARM_NEG16 9
+#define ARM_NEG32 10
+#define ARM_RVA32 11
+#define ARM_THUMB9 12
+#define ARM_THUMB12 13
+#define ARM_THUMB23 14
+
+#ifdef ARM_WINCE
+#undef ARM_32
+#undef ARM_RVA32
+#undef ARM_26
+#undef ARM_THUMB12
+#undef ARM_26D
+
+#define ARM_32 1
+#define ARM_RVA32 2
+#define ARM_26 3
+#define ARM_THUMB12 4
+#define ARM_26D 5
+#define ARM_SECTION 14
+#define ARM_SECREL 15
+#endif
+
+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,
+ 0,
+ 2,
+ 32,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ PCRELOFFSET),
+ HOWTO (ARM_RVA32,
+ 0,
+ 2,
+ 32,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_RVA32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ PCRELOFFSET),
+ HOWTO (ARM_26,
+ 2,
+ 2,
+ 24,
+ true,
+ 0,
+ complain_overflow_signed,
+ aoutarm_fix_pcrel_26 ,
+ "ARM_26",
+ false,
+ 0x00ffffff,
+ 0x00ffffff,
+ PCRELOFFSET),
+ HOWTO (ARM_THUMB12,
+ 1,
+ 1,
+ 11,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_thumb_pcrel_12 ,
+ "ARM_THUMB12",
+ false,
+ 0x000007ff,
+ 0x000007ff,
+ PCRELOFFSET),
+ HOWTO (ARM_26D,
+ 2,
+ 2,
+ 24,
+ false,
+ 0,
+ complain_overflow_dont,
+ aoutarm_fix_pcrel_26_done,
+ "ARM_26D",
+ true,
+ 0x00ffffff,
+ 0x0,
+ false),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ EMPTY_HOWTO (-1),
+ HOWTO (ARM_SECTION,
+ 0,
+ 1,
+ 16,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_16",
+ true,
+ 0x0000ffff,
+ 0x0000ffff,
+ PCRELOFFSET),
+ HOWTO (ARM_SECREL,
+ 0,
+ 2,
+ 32,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ PCRELOFFSET),
+#else /* not ARM_WINCE */
+ HOWTO(ARM_8, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_arm_reloc, /* special_function */
+ "ARM_8", /* name */
+ true, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ PCRELOFFSET /* pcrel_offset */),
+ HOWTO(ARM_16,
+ 0,
+ 1,
+ 16,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_16",
+ true,
+ 0x0000ffff,
+ 0x0000ffff,
+ PCRELOFFSET),
+ HOWTO(ARM_32,
+ 0,
+ 2,
+ 32,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ PCRELOFFSET),
+ HOWTO(ARM_26,
+ 2,
+ 2,
+ 24,
+ true,
+ 0,
+ complain_overflow_signed,
+ aoutarm_fix_pcrel_26 ,
+ "ARM_26",
+ false,
+ 0x00ffffff,
+ 0x00ffffff,
+ PCRELOFFSET),
+ HOWTO(ARM_DISP8,
+ 0,
+ 0,
+ 8,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_arm_reloc,
+ "ARM_DISP8",
+ true,
+ 0x000000ff,
+ 0x000000ff,
+ true),
+ HOWTO( ARM_DISP16,
+ 0,
+ 1,
+ 16,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_arm_reloc,
+ "ARM_DISP16",
+ true,
+ 0x0000ffff,
+ 0x0000ffff,
+ true),
+ HOWTO( ARM_DISP32,
+ 0,
+ 2,
+ 32,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_arm_reloc,
+ "ARM_DISP32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ true),
+ HOWTO( ARM_26D,
+ 2,
+ 2,
+ 24,
+ false,
+ 0,
+ complain_overflow_dont,
+ aoutarm_fix_pcrel_26_done,
+ "ARM_26D",
+ true,
+ 0x00ffffff,
+ 0x0,
+ false),
+ /* 8 is unused */
+ EMPTY_HOWTO (-1),
+ HOWTO( ARM_NEG16,
+ 0,
+ -1,
+ 16,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_NEG16",
+ true,
+ 0x0000ffff,
+ 0x0000ffff,
+ false),
+ HOWTO( ARM_NEG32,
+ 0,
+ -2,
+ 32,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_NEG32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ false),
+ HOWTO( ARM_RVA32,
+ 0,
+ 2,
+ 32,
+ false,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_RVA32",
+ true,
+ 0xffffffff,
+ 0xffffffff,
+ PCRELOFFSET),
+ HOWTO( ARM_THUMB9,
+ 1,
+ 1,
+ 8,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_thumb_pcrel_9 ,
+ "ARM_THUMB9",
+ false,
+ 0x000000ff,
+ 0x000000ff,
+ PCRELOFFSET),
+ HOWTO( ARM_THUMB12,
+ 1,
+ 1,
+ 11,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_thumb_pcrel_12 ,
+ "ARM_THUMB12",
+ false,
+ 0x000007ff,
+ 0x000007ff,
+ PCRELOFFSET),
+ HOWTO( ARM_THUMB23,
+ 1,
+ 2,
+ 22,
+ true,
+ 0,
+ complain_overflow_signed,
+ coff_thumb_pcrel_23 ,
+ "ARM_THUMB23",
+ false,
+ 0x07ff07ff,
+ 0x07ff07ff,
+ PCRELOFFSET)
+#endif /* not ARM_WINCE */
+};
+
+#define NUM_RELOCS NUM_ELEM (aoutarm_std_reloc_howto)
+
+#ifdef COFF_WITH_PE
+/* Return true if this relocation should
+ 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 && howto->type != ARM_RVA32;
+}
+#endif
+
+#define RTYPE2HOWTO(cache_ptr, dst) \
+ (cache_ptr)->howto = \
+ (dst)->r_type < NUM_RELOCS \
+ ? aoutarm_std_reloc_howto + (dst)->r_type \
+ : NULL
+
+#define coff_rtype_to_howto coff_arm_rtype_to_howto
+
+static reloc_howto_type *
+coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ struct internal_reloc *rel;
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
+ struct internal_syment *sym ATTRIBUTE_UNUSED;
+ bfd_vma *addendp;
+{
+ reloc_howto_type * howto;
+
+ if (rel->r_type >= NUM_RELOCS)
+ return NULL;
+
+ howto = aoutarm_std_reloc_howto + rel->r_type;
+
+ if (rel->r_type == ARM_RVA32)
+ *addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase;
+
+ return howto;
+}
+/* Used by the assembler. */
+
+static bfd_reloc_status_type
+aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, 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;
+{
+ /* This is dead simple at present. */
+ return bfd_reloc_ok;
+}
+
+/* Used by the assembler. */
+
+static bfd_reloc_status_type
+aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ bfd_vma relocation;
+ 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)
+ return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined;
+
+ /* If the sections are different, and we are doing a partial relocation,
+ just ignore it for now. */
+ if (symbol->section->name != input_section->name
+ && output_bfd != (bfd *)NULL)
+ return bfd_reloc_continue;
+
+ relocation = (target & 0x00ffffff) << 2;
+ relocation = (relocation ^ 0x02000000) - 0x02000000; /* Sign extend */
+ relocation += symbol->value;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+ relocation -= input_section->output_section->vma;
+ relocation -= input_section->output_offset;
+ relocation -= addr;
+
+ if (relocation & 3)
+ return bfd_reloc_overflow;
+
+ /* Check for overflow */
+ if (relocation & 0x02000000)
+ {
+ if ((relocation & ~ (bfd_vma) 0x03ffffff) != ~ (bfd_vma) 0x03ffffff)
+ flag = bfd_reloc_overflow;
+ }
+ else if (relocation & ~0x03ffffff)
+ flag = bfd_reloc_overflow;
+
+ target &= ~0x00ffffff;
+ target |= (relocation >> 2) & 0x00ffffff;
+ bfd_put_32 (abfd, target, (bfd_byte *) data + addr);
+
+ /* 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];
+
+ return flag;
+}
+
+static bfd_reloc_status_type
+coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message, btype)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+ thumb_pcrel_branchtype btype;
+{
+ bfd_vma relocation = 0;
+ 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;
+ bfd_vma dstmsk;
+ bfd_vma offmsk;
+ bfd_vma signbit;
+
+ /* NOTE: This routine is currently used by GAS, but not by the link
+ phase. */
+
+ switch (btype)
+ {
+ case b9:
+ dstmsk = 0x000000ff;
+ offmsk = 0x000001fe;
+ signbit = 0x00000100;
+ break;
+
+ case b12:
+ dstmsk = 0x000007ff;
+ offmsk = 0x00000ffe;
+ signbit = 0x00000800;
+ break;
+
+ case b23:
+ dstmsk = 0x07ff07ff;
+ offmsk = 0x007fffff;
+ signbit = 0x00400000;
+ break;
+
+ default:
+ abort ();
+ }
+
+ /* If this is an undefined symbol, return error */
+ if (symbol->section == &bfd_und_section
+ && (symbol->flags & BSF_WEAK) == 0)
+ return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined;
+
+ /* If the sections are different, and we are doing a partial relocation,
+ just ignore it for now. */
+ if (symbol->section->name != input_section->name
+ && output_bfd != (bfd *)NULL)
+ return bfd_reloc_continue;
+
+ switch (btype)
+ {
+ case b9:
+ case b12:
+ relocation = ((target & dstmsk) << 1);
+ break;
+
+ case b23:
+ if (bfd_big_endian (abfd))
+ relocation = ((target & 0x7ff) << 1) | ((target & 0x07ff0000) >> 4);
+ else
+ relocation = ((target & 0x7ff) << 12) | ((target & 0x07ff0000) >> 15);
+ break;
+
+ default:
+ abort ();
+ }
+
+ relocation = (relocation ^ signbit) - signbit; /* Sign extend */
+ relocation += symbol->value;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+ relocation -= input_section->output_section->vma;
+ relocation -= input_section->output_offset;
+ relocation -= addr;
+
+ if (relocation & 1)
+ return bfd_reloc_overflow;
+
+ /* Check for overflow */
+ if (relocation & signbit)
+ {
+ if ((relocation & ~offmsk) != ~offmsk)
+ flag = bfd_reloc_overflow;
+ }
+ else if (relocation & ~offmsk)
+ flag = bfd_reloc_overflow;
+
+ target &= ~dstmsk;
+ switch (btype)
+ {
+ case b9:
+ case b12:
+ target |= (relocation >> 1);
+ break;
+
+ case b23:
+ if (bfd_big_endian (abfd))
+ target |= ((relocation & 0xfff) >> 1) | ((relocation << 4) & 0x07ff0000);
+ else
+ target |= ((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff);
+ break;
+
+ default:
+ abort ();
+ }
+
+ bfd_put_32 (abfd, target, (bfd_byte *) data + addr);
+
+ /* 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;
+}
+
+static bfd_reloc_status_type
+coff_thumb_pcrel_23 (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message, b23);
+}
+
+static bfd_reloc_status_type
+coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message, b12);
+}
+
+static bfd_reloc_status_type
+coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
+ 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)
+ {
+ case 32:
+ code = BFD_RELOC_32;
+ break;
+ default: return (CONST struct reloc_howto_struct *) 0;
+ }
+
+ switch (code)
+ {
+#ifdef ARM_WINCE
+ ASTD (BFD_RELOC_32, ARM_32);
+ ASTD (BFD_RELOC_RVA, ARM_RVA32);
+ ASTD (BFD_RELOC_ARM_PCREL_BRANCH, ARM_26);
+ ASTD (BFD_RELOC_THUMB_PCREL_BRANCH12, ARM_THUMB12);
+#else
+ ASTD (BFD_RELOC_8, ARM_8);
+ ASTD (BFD_RELOC_16, ARM_16);
+ ASTD (BFD_RELOC_32, ARM_32);
+ ASTD (BFD_RELOC_ARM_PCREL_BRANCH, ARM_26);
+ ASTD (BFD_RELOC_8_PCREL, ARM_DISP8);
+ ASTD (BFD_RELOC_16_PCREL, ARM_DISP16);
+ ASTD (BFD_RELOC_32_PCREL, ARM_DISP32);
+ ASTD (BFD_RELOC_RVA, ARM_RVA32);
+ 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
+ default: return (CONST struct reloc_howto_struct *) 0;
+ }
+}
+
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
+#define COFF_PAGE_SIZE 0x1000
+/* Turn a howto into a reloc nunmber */
+
+#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
+#define BADMAG(x) ARMBADMAG(x)
+#define ARM 1 /* Customize coffcode.h */
+
+/* Extend the coff_link_hash_table structure with a few ARM specific fields.
+ This allows us to store global data here without actually creating any
+ global variables, which is a no-no in the BFD world. */
+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. */
+ int support_old_code;
+};
+
+/* Get the ARM coff linker hash table from a link_info structure. */
+#define coff_arm_hash_table(info) \
+ ((struct coff_arm_link_hash_table *) ((info)->hash))
+
+/* Create an ARM coff linker hash table. */
+
+static struct bfd_link_hash_table *
+coff_arm_link_hash_table_create (abfd)
+ bfd * abfd;
+{
+ struct coff_arm_link_hash_table * ret;
+
+ ret = ((struct coff_arm_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct coff_arm_link_hash_table)));
+ if (ret == (struct coff_arm_link_hash_table *) NULL)
+ return NULL;
+
+ if (! _bfd_coff_link_hash_table_init
+ (& ret->root, abfd, _bfd_coff_link_hash_newfunc))
+ {
+ bfd_release (abfd, ret);
+ return (struct bfd_link_hash_table *) NULL;
+ }
+
+ ret->thumb_glue_size = 0;
+ ret->arm_glue_size = 0;
+ ret->bfd_of_glue_owner = NULL;
+
+ return & ret->root.root;
+}
+
+static void
+arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
+ struct bfd_link_info *info;
+ bfd *output_bfd;
+ asection *input_section;
+ bfd_vma reloc_offset;
+{
+ bfd_vma addr = reloc_offset
+ - 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;
+ fwrite (&addr, 1, sizeof (addr), (FILE *) info->base_file);
+
+}
+
+/* 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
+ offset, insert the offset into the thumb branch and return finished
+ instruction.
+
+ 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).
+
+ Combine together and shifted left by 1 (it's a half word address) and
+ there you have it.
+
+ Op: 1111 = F,
+ H-0, upper address-0 = 000
+ Op: 1111 = F,
+ H-1, lower address-0 = 800
+
+ 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)
+ 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 */
+
+#define LOW_HI_ORDER 0xF800F000
+#define HI_LOW_ORDER 0xF000F800
+
+static insn32
+insert_thumb_branch (br_insn, rel_off)
+ insn32 br_insn;
+ int 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 */
+
+ 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 */
+
+ return br_insn;
+}
+
+
+static struct coff_link_hash_entry *
+find_thumb_glue (info, name, input_bfd)
+ struct bfd_link_info * info;
+ CONST char * name;
+ bfd * input_bfd;
+{
+ char * tmp_name;
+ struct coff_link_hash_entry * myh;
+
+ tmp_name = ((char *)
+ bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1));
+
+ 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;
+}
+
+static struct coff_link_hash_entry *
+find_arm_glue (info, name, input_bfd)
+ struct bfd_link_info * info;
+ CONST char * name;
+ bfd * input_bfd;
+{
+ char * tmp_name;
+ struct coff_link_hash_entry * myh;
+
+ tmp_name = ((char *)
+ bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+
+ 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)
+ /* 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;
+}
+
+/*
+ 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
+*/
+
+#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 .thumb
+ .align 2 .align 2
+ __func_from_thumb: __func_from_thumb:
+ bx pc push {r6, lr}
+ nop ldr r6, __func_addr
+ .arm mov lr, pc
+ __func_change_to_arm: bx r6
+ b func .arm
+ __func_back_to_thumb:
+ ldmia r13! {r6, lr}
+ bx lr
+ __func_addr:
+ .word func
+*/
+
+#define THUMB2ARM_GLUE_SIZE (globals->support_old_code ? 20 : 8)
+static const insn16 t2a1_bx_pc_insn = 0x4778;
+static const insn16 t2a2_noop_insn = 0x46c0;
+static const insn32 t2a3_b_insn = 0xea000000;
+
+static const insn16 t2a1_push_insn = 0xb540;
+static const insn16 t2a2_ldr_insn = 0x4e03;
+static const insn16 t2a3_mov_insn = 0x46fe;
+static const insn16 t2a4_bx_insn = 0x4730;
+static const insn32 t2a5_pop_insn = 0xe8bd4040;
+static const insn32 t2a6_bx_insn = 0xe12fff1e;
+
+/* TODO:
+ We should really create new local (static) symbols in destination
+ object for each stub we create. We should also create local
+ (static) symbols within the stubs when switching between ARM and
+ Thumb code. This will ensure that the debugger and disassembler
+ can present a better view of stubs.
+
+ We can treat stubs like literal sections, and for the THUMB9 ones
+ (short addressing range) we should be able to insert the stubs
+ between sections. i.e. the simplest approach (since relocations
+ are done on a section basis) is to dump the stubs at the end of
+ processing a section. That way we can always try and minimise the
+ offset to and from a stub. However, this does not map well onto
+ the way that the linker/BFD does its work: mapping all input
+ sections to output sections via the linker script before doing
+ all the processing.
+
+ Unfortunately it may be easier to just to disallow short range
+ Thumb->ARM stubs (i.e. no conditional inter-working branches,
+ only branch-and-link (BL) calls. This will simplify the processing
+ since we can then put all of the stubs into their own section.
+
+ TODO:
+ On a different subject, rather than complaining when a
+ branch cannot fit in the number of bits available for the
+ 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
+ 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. */
+
+/* The reloc processing routine for the ARM/Thumb COFF linker. NOTE:
+ This code is a very slightly modified copy of
+ _bfd_coff_generic_relocate_section. It would be a much more
+ maintainable solution to have a MACRO that could be expanded within
+ _bfd_coff_generic_relocate_section that would only be provided for
+ ARM/Thumb builds. It is only the code marked THUMBEXTENSION that
+ is different from the original. */
+
+static boolean
+coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, syms, sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ struct internal_reloc *relocs;
+ struct internal_syment *syms;
+ asection **sections;
+{
+ struct internal_reloc * rel;
+ struct internal_reloc * relend;
+
+ rel = relocs;
+ relend = rel + input_section->reloc_count;
+
+ for (; rel < relend; rel++)
+ {
+ int done = 0;
+ long symndx;
+ struct coff_link_hash_entry * h;
+ struct internal_syment * sym;
+ bfd_vma addend;
+ bfd_vma val;
+ reloc_howto_type * howto;
+ bfd_reloc_status_type rstat;
+ bfd_vma h_val;
+
+ symndx = rel->r_symndx;
+
+ if (symndx == -1)
+ {
+ h = NULL;
+ sym = NULL;
+ }
+ else
+ {
+ h = obj_coff_sym_hashes (input_bfd)[symndx];
+ sym = syms + symndx;
+ }
+
+ /* COFF treats common symbols in one of two ways. Either the
+ size of the symbol is included in the section contents, or it
+ is not. We assume that the size is not included, and force
+ the rtype_to_howto function to adjust the addend as needed. */
+
+ if (sym != NULL && sym->n_scnum != 0)
+ addend = - sym->n_value;
+ else
+ addend = 0;
+
+
+ howto = coff_rtype_to_howto (input_bfd, input_section, rel, h,
+ sym, &addend);
+ if (howto == NULL)
+ return false;
+
+ /* The relocation_section function will skip pcrel_offset relocs
+ when doing a relocateable link. However, we want to convert
+ ARM26 to ARM26D relocs if possible. We return a fake howto in
+ this case without pcrel_offset set, and adjust the addend to
+ compensate. */
+ if (rel->r_type == ARM_26
+ && h != NULL
+ && info->relocateable
+ && (h->root.type == bfd_link_hash_defined
+ || 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 =
+ HOWTO (ARM_26,
+ 2,
+ 2,
+ 24,
+ true,
+ 0,
+ complain_overflow_signed,
+ aoutarm_fix_pcrel_26 ,
+ "ARM_26",
+ false,
+ 0x00ffffff,
+ 0x00ffffff,
+ false);
+
+ addend -= rel->r_vaddr - input_section->vma;
+ howto = &fake_arm26_reloc;
+ }
+
+#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. */
+ 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,
+ then we should ignore the symbol value. */
+ if (howto->pc_relative && howto->pcrel_offset)
+ {
+ if (info->relocateable)
+ continue;
+ if (sym != NULL && sym->n_scnum != 0)
+ addend += sym->n_value;
+ }
+
+ val = 0;
+
+ if (h == NULL)
+ {
+ asection *sec;
+
+ if (symndx == -1)
+ {
+ sec = bfd_abs_section_ptr;
+ val = 0;
+ }
+ else
+ {
+ sec = sections[symndx];
+ val = (sec->output_section->vma
+ + sec->output_offset
+ + sym->n_value
+ - sec->vma);
+ }
+ }
+ else
+ {
+#if 1 /* THUMBEXTENSION */
+ /* We don't output the stubs if we are generating a
+ 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... */
+ 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
+ + h_sec->output_offset);
+
+ if (howto->type == ARM_26)
+ {
+ if ( h->class == C_THUMBSTATFUNC
+ || h->class == C_THUMBEXTFUNC)
+ {
+ /* Arm code calling a Thumb function */
+ unsigned long int tmp;
+ long int my_offset;
+ asection * s;
+ long int ret_offset;
+ 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;
+
+ 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,
+ ARM2THUMB_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
+ && INTERWORK_SET (h_sec->owner)
+ && ! INTERWORK_FLAG (h_sec->owner))
+ {
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%s(%s): warning: interworking not enabled."),
+ bfd_get_filename (h_sec->owner), name);
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_(" first occurrence: %s: arm call to thumb"),
+ bfd_get_filename (input_bfd));
+ }
+
+ --my_offset;
+ myh->root.u.def.value = my_offset;
+
+ 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,
+ my_offset + 8);
+
+ }
+
+ BFD_ASSERT (my_offset <= globals->arm_glue_size);
+
+ 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. */
+ ret_offset =
+ s->output_offset
+ + my_offset
+ + s->output_section->vma
+ - (input_section->output_offset
+ + 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
+ || h->class == C_STAT
+ || h->class == C_LABEL)
+ {
+ /* Thumb code calling an ARM function */
+ asection * s = 0;
+ long int my_offset;
+ unsigned long int tmp;
+ long int ret_offset;
+ struct coff_link_hash_entry * myh;
+ struct coff_arm_link_hash_table * globals;
+
+ myh = find_thumb_glue (info, name, input_bfd);
+ if (myh == NULL)
+ 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,
+ 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
+ && INTERWORK_SET (h_sec->owner)
+ && ! INTERWORK_FLAG (h_sec->owner)
+ && ! globals->support_old_code)
+ {
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%s(%s): warning: interworking not enabled."),
+ bfd_get_filename (h_sec->owner), name);
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_(" first occurrence: %s: thumb call to arm"),
+ bfd_get_filename (input_bfd));
+ _bfd_error_handler
+ (_(" consider relinking with --support-old-code enabled"));
+ }
+
+ -- my_offset;
+ myh->root.u.def.value = my_offset;
+
+ if (globals->support_old_code)
+ {
+ 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);
+
+ bfd_put_16 (output_bfd, t2a3_mov_insn,
+ s->contents + my_offset + 4);
+
+ 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);
+
+ if (info->base_file)
+ arm_emit_base_file_entry (info, output_bfd, s, my_offset + 16);
+ }
+ else
+ {
+ 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)
+ (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. */
+
+ bfd_put_32 (output_bfd,
+ t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
+ s->contents + my_offset + 4);
+
+ }
+ }
+
+ BFD_ASSERT (my_offset <= globals->thumb_glue_size);
+
+ /* Now go back and fix up the original BL insn to point
+ to here. */
+ ret_offset =
+ s->output_offset
+ + my_offset
+ - (input_section->output_offset
+ + rel->r_vaddr)
+ -4;
+
+ tmp = bfd_get_32 (input_bfd, contents + rel->r_vaddr
+ - input_section->vma);
+
+ bfd_put_32 (output_bfd,
+ 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. */
+
+ if (done)
+ rstat = bfd_reloc_ok;
+ else
+#endif /* THUMBEXTENSION */
+ if ( h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ asection *sec;
+
+ sec = h->root.u.def.section;
+ val = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+
+ else if (! info->relocateable)
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, true)))
+ return false;
+ }
+ }
+
+ if (info->base_file)
+ {
+ /* 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;
+#ifndef ARM_WINCE
+ /* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */
+ else if (! info->relocateable
+ && howto->type == ARM_THUMB23)
+ {
+ /* This is pretty much a copy of what the default
+ _bfd_final_link_relocate and _bfd_relocate_contents
+ routines do to perform a relocation, with special
+ processing for the split addressing of the Thumb BL
+ 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
+ {
+ bfd_vma relocation = val + addend;
+ int size = bfd_get_reloc_size (howto);
+ boolean overflow = false;
+ bfd_byte * location = contents + address;
+ bfd_vma x = bfd_get_32 (input_bfd, location);
+ bfd_vma src_mask = 0x007FFFFE;
+ bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
+ bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
+ bfd_vma check;
+ bfd_signed_vma signed_check;
+ bfd_vma add;
+ 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. */
+ /* 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)
+ signed_check = check;
+ else
+ signed_check = (check
+ | ((bfd_vma) - 1
+ & ~((bfd_vma) - 1 >> howto->rightshift)));
+
+ /* Get the value from the object file. */
+ if (bfd_big_endian (input_bfd))
+ {
+ add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1);
+ }
+ else
+ {
+ add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15));
+ }
+
+ /* Get the value from the object file with an appropriate sign.
+ The expression involving howto->src_mask isolates the upper
+ bit of src_mask. If that bit is set in the value we are
+ adding, it is negative, and we subtract out that number times
+ two. If src_mask includes the highest possible bit, then we
+ 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;
+
+ BFD_ASSERT (howto->complain_on_overflow == complain_overflow_signed);
+
+ /* Assumes two's complement. */
+ 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));
+ }
+ else
+ {
+ relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff));
+ }
+
+ /* Add RELOCATION to the correct bits of X: */
+ x = ((x & ~howto->dst_mask) | relocation);
+
+ /* Put the relocated value back in the object file: */
+ bfd_put_32 (input_bfd, x, location);
+
+ rstat = overflow ? bfd_reloc_overflow : bfd_reloc_ok;
+ }
+ }
+#endif
+ else
+#endif /* THUMBEXTENSION */
+ rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents,
+ rel->r_vaddr - input_section->vma,
+ val, addend);
+#if 1 /* THUMBEXTENSION */
+ /* 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 */
+ if (! info->relocateable
+ && (rel->r_type == ARM_32 || rel->r_type == ARM_RVA32))
+ {
+ /* 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))
+ {
+ patchit = true;
+ }
+ else if (sym != NULL
+ && sym->n_scnum > N_UNDEF)
+ {
+ /* No hash entry - use the symbol instead. */
+
+ if ( sym->n_sclass == C_THUMBSTATFUNC
+ || sym->n_sclass == C_THUMBEXTFUNC)
+ patchit = true;
+ }
+
+ if (patchit)
+ {
+ bfd_byte * location = contents + rel->r_vaddr - input_section->vma;
+ bfd_vma x = bfd_get_32 (input_bfd, location);
+
+ bfd_put_32 (input_bfd, x | 1, location);
+ }
+ }
+#endif /* THUMBEXTENSION */
+
+ switch (rstat)
+ {
+ default:
+ abort ();
+ case bfd_reloc_ok:
+ break;
+ case bfd_reloc_outofrange:
+ (*_bfd_error_handler)
+ (_("%s: bad reloc address 0x%lx in section `%s'"),
+ bfd_get_filename (input_bfd),
+ (unsigned long) rel->r_vaddr,
+ bfd_get_section_name (input_bfd, input_section));
+ return false;
+ case bfd_reloc_overflow:
+ {
+ const char *name;
+ char buf[SYMNMLEN + 1];
+
+ if (symndx == -1)
+ name = "*ABS*";
+ else if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
+ if (name == NULL)
+ return false;
+ }
+
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0, input_bfd,
+ input_section, rel->r_vaddr - input_section->vma)))
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+#ifndef COFF_IMAGE_WITH_PE
+
+boolean
+bfd_arm_allocate_interworking_sections (info)
+ struct bfd_link_info * info;
+{
+ asection * s;
+ bfd_byte * foo;
+ struct coff_arm_link_hash_table * globals;
+#if 0
+ static char test_char = '1';
+#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;
+ }
+
+ 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;
+ }
+
+ return true;
+}
+
+static void
+record_arm_to_thumb_glue (info, h)
+ struct bfd_link_info * info;
+ struct coff_link_hash_entry * h;
+{
+ const char * name = h->root.root.string;
+ register asection * s;
+ char * tmp_name;
+ 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);
+
+ s = bfd_get_section_by_name
+ (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ tmp_name = ((char *)
+ bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+
+ 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);
+ return; /* we've already seen this guy */
+ }
+
+ /* The only trick here is using globals->arm_glue_size as the value. Even
+ though the section isn't allocated yet, this is where we will be putting
+ it. */
+
+ bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
+ BSF_GLOBAL,
+ s, globals->arm_glue_size + 1,
+ NULL, true, false,
+ (struct bfd_link_hash_entry **) & myh);
+
+ free (tmp_name);
+
+ globals->arm_glue_size += ARM2THUMB_GLUE_SIZE;
+
+ return;
+}
+
+static void
+record_thumb_to_arm_glue (info, h)
+ struct bfd_link_info * info;
+ struct coff_link_hash_entry * h;
+{
+ const char * name = h->root.root.string;
+ register asection * s;
+ char * tmp_name;
+ 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);
+
+ s = bfd_get_section_by_name
+ (globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ tmp_name = (char *) bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+
+ 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)
+ {
+ free (tmp_name);
+ return; /* we've already seen this guy */
+ }
+
+ 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,
+ (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,
+ (struct bfd_link_hash_entry **) & myh);
+
+ free (tmp_name);
+
+ globals->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
+
+ return;
+}
+
+/* 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/
+ {armcoff/pe}.em */
+
+boolean
+bfd_arm_get_bfd_for_interworking (abfd, info)
+ bfd * abfd;
+ struct bfd_link_info * 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)
+ {
+ 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))
+ return false;
+ }
+
+ sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
+
+ 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;
+}
+
+boolean
+bfd_arm_process_before_allocation (abfd, info, support_old_code)
+ bfd * abfd;
+ struct bfd_link_info * info;
+ int support_old_code;
+{
+ asection * sec;
+ struct coff_arm_link_hash_table * globals;
+
+ /* If we are only performing a partial link do not bother
+ 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;
+
+ if (sec == NULL)
+ return true;
+
+ for (; sec != NULL; sec = sec->next)
+ {
+ struct internal_reloc * i;
+ struct internal_reloc * rel;
+
+ 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);
+
+ BFD_ASSERT (i != 0);
+
+ for (rel = i; rel < i + sec->reloc_count; ++rel)
+ {
+ unsigned short r_type = rel->r_type;
+ long symndx;
+ struct coff_link_hash_entry * h;
+
+ symndx = rel->r_symndx;
+
+ /* If the relocation is not against a symbol it cannot concern us. */
+ if (symndx == -1)
+ continue;
+
+ /* If the index is outside of the range of our table, something has gone wrong. */
+ if (symndx >= obj_conv_table_size (abfd))
+ {
+ _bfd_error_handler (_("%s: illegal symbol index in reloc: %d"),
+ 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
+ the current section and so cannot be a cross ARM/Thumb relocation. */
+ if (h == NULL)
+ continue;
+
+ switch (r_type)
+ {
+ case ARM_26:
+ /* 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
+ for ARM_THUMB9 and ARM_THUMB12 as well. We need to look
+ up the target of the call. If it is an arm target, we
+ insert glue. If the symbol does not exist it will be
+ given a class of C_EXT and so we will generate a stub
+ for it. This is not really a problem, since the link
+ is doomed anyway. */
+
+ switch (h->class)
+ {
+ case C_EXT:
+ case C_STAT:
+ case C_LABEL:
+ record_thumb_to_arm_glue (info, h);
+ break;
+ default:
+ ;
+ }
+ break;
+#endif
+
+ default:
+ break;
+ }
+ }
+ }
+
+ return true;
+}
+
+#endif /* ! defined (COFF_IMAGE_WITH_PE) */
+
+#define coff_bfd_reloc_type_lookup coff_arm_reloc_type_lookup
+#define coff_relocate_section coff_arm_relocate_section
+#define coff_bfd_is_local_label_name coff_arm_is_local_label_name
+#define coff_adjust_symndx coff_arm_adjust_symndx
+#define coff_link_output_has_begun coff_arm_link_output_has_begun
+#define coff_final_link_postscript coff_arm_final_link_postscript
+#define coff_bfd_merge_private_bfd_data coff_arm_merge_private_bfd_data
+#define coff_bfd_print_private_bfd_data coff_arm_print_private_bfd_data
+#define coff_bfd_set_private_flags _bfd_coff_arm_set_private_flags
+#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. */
+
+static boolean
+coff_arm_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
+ bfd *obfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ bfd *ibfd;
+ asection *sec;
+ struct internal_reloc *irel;
+ boolean *adjustedp;
+{
+ if (irel->r_type == 3)
+ {
+ struct coff_link_hash_entry *h;
+
+ h = obj_coff_sym_hashes (ibfd)[irel->r_symndx];
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->root.u.def.section->output_section == sec->output_section)
+ irel->r_type = 7;
+ }
+ *adjustedp = false;
+ return true;
+}
+
+/* Called when merging the private data areas of two BFDs.
+ This is important as it allows us to detect if we are
+ attempting to merge binaries compiled for different ARM
+ targets, eg different CPUs or differents APCS's. */
+
+static boolean
+coff_arm_merge_private_bfd_data (ibfd, obfd)
+ bfd * ibfd;
+ bfd * obfd;
+{
+ BFD_ASSERT (ibfd != NULL && obfd != NULL);
+
+ if (ibfd == obfd)
+ return true;
+
+ /* If the two formats are different we cannot merge anything.
+ This is not an error, since it is permissable to change the
+ input and output formats. */
+ if ( ibfd->xvec->flavour != bfd_target_coff_flavour
+ || obfd->xvec->flavour != bfd_target_coff_flavour)
+ return true;
+
+ /* Verify that the APCS is the same for the two BFDs */
+ if (APCS_SET (ibfd))
+ {
+ if (APCS_SET (obfd))
+ {
+ /* If the src and dest have different APCS flag bits set, fail. */
+ if (APCS_26_FLAG (obfd) != APCS_26_FLAG (ibfd))
+ {
+ _bfd_error_handler
+ /* xgettext: c-format */
+ (_("%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"),
+ bfd_get_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
+ bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
+ );
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+
+ if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd))
+ {
+ const char *msg;
+
+ if (APCS_FLOAT_FLAG (ibfd))
+ /* xgettext: c-format */
+ msg = _("%s: ERROR: passes floats in float registers whereas target %s uses integer registers");
+ 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;
+
+ if (PIC_FLAG (ibfd))
+ /* xgettext: c-format */
+ msg = _("%s: ERROR: compiled as position independent code, whereas target %s is absolute position");
+ else
+ /* xgettext: c-format */
+ msg = _("%s: ERROR: compiled as absolute position code, whereas target %s is position independent");
+ _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ bfd_get_filename (obfd));
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+ }
+ 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));
+ }
+ }
+
+ /* Check the interworking support. */
+ if (INTERWORK_SET (ibfd))
+ {
+ if (INTERWORK_SET (obfd))
+ {
+ /* If the src and dest differ in their interworking issue a warning. */
+ if (INTERWORK_FLAG (obfd) != INTERWORK_FLAG (ibfd))
+ {
+ const char * msg;
+
+ if (INTERWORK_FLAG (ibfd))
+ /* xgettext: c-format */
+ msg = _("Warning: input file %s supports interworking, whereas %s does not.");
+ 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));
+ }
+ }
+ else
+ {
+ SET_INTERWORK_FLAG (obfd, INTERWORK_FLAG (ibfd));
+ }
+ }
+
+ return true;
+}
+
+
+/* Display the flags field. */
+
+static boolean
+coff_arm_print_private_bfd_data (abfd, ptr)
+ bfd * abfd;
+ 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. */
+ fprintf (file, " [APCS-%d]", APCS_26_FLAG (abfd) ? 26 : 32);
+
+ if (APCS_FLOAT_FLAG (abfd))
+ fprintf (file, _(" [floats passed in float registers]"));
+ else
+ fprintf (file, _(" [floats passed in integer registers]"));
+
+ if (PIC_FLAG (abfd))
+ fprintf (file, _(" [position independent]"));
+ 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,
+ target specific information.
+ Note: Although this function is static, it is explicitly
+ called from both coffcode.h and peicode.h. */
+
+static boolean
+_bfd_coff_arm_set_private_flags (abfd, flags)
+ bfd * abfd;
+ flagword flags;
+{
+ flagword flag;
+
+ 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)
+ && ( (APCS_26_FLAG (abfd) != flag)
+ || (APCS_FLOAT_FLAG (abfd) != (flags & F_APCS_FLOAT))
+ || (PIC_FLAG (abfd) != (flags & F_PIC))
+ ))
+ 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
+ and set the flag accordingly. */
+ if (INTERWORK_SET (abfd) && (INTERWORK_FLAG (abfd) != flag))
+ {
+ if (flag)
+ /* xgettext: c-format */
+ _bfd_error_handler (_("Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"),
+ bfd_get_filename (abfd));
+ else
+ /* xgettext: c-format */
+ _bfd_error_handler (_("Warning: Clearing the interworking flag of %s due to outside request"),
+ bfd_get_filename (abfd));
+ flag = 0;
+ }
+
+ SET_INTERWORK_FLAG (abfd, flag);
+
+ return true;
+}
+
+
+/* Copy the important parts of the target specific data
+ from one instance of a BFD to another. */
+
+static boolean
+coff_arm_copy_private_bfd_data (src, dest)
+ bfd * src;
+ bfd * dest;
+{
+ BFD_ASSERT (src != NULL && dest != NULL);
+
+ if (src == dest)
+ return true;
+
+ /* If the destination is not in the same format as the source, do not do
+ the copy. */
+ if (src->xvec != dest->xvec)
+ return true;
+
+ /* copy the flags field */
+ if (APCS_SET (src))
+ {
+ if (APCS_SET (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;
+ }
+ else
+ SET_APCS_FLAGS (dest, APCS_26_FLAG (src) | APCS_FLOAT_FLAG (src)
+ | PIC_FLAG (src));
+ }
+
+ if (INTERWORK_SET (src))
+ {
+ if (INTERWORK_SET (dest))
+ {
+ /* If the src and dest have different interworking flags then turn
+ off the interworking bit. */
+ if (INTERWORK_FLAG (dest) != INTERWORK_FLAG (src))
+ {
+ if (INTERWORK_FLAG (dest))
+ {
+ /* xgettext:c-format */
+ _bfd_error_handler (("Warning: Clearing the interworking bit of %s, because the non-interworking code in %s has been copied into it"),
+ bfd_get_filename (dest),
+ bfd_get_filename (src));
+ }
+
+ SET_INTERWORK_FLAG (dest, 0);
+ }
+ }
+ else
+ {
+ SET_INTERWORK_FLAG (dest, INTERWORK_FLAG (src));
+ }
+ }
+
+ return true;
+}
+
+/* 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 "."
+#ifndef USER_LABEL_PREFIX
+#define USER_LABEL_PREFIX "_"
+#endif
+
+/* Like _bfd_coff_is_local_label_name, but
+ a) test against USER_LABEL_PREFIX, to avoid stripping labels known to be
+ non-local.
+ b) Allow other prefixes than ".", e.g. an empty prefix would cause all
+ labels of the form Lxxx to be stripped. */
+static boolean
+coff_arm_is_local_label_name (abfd, name)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ const char * name;
+{
+#ifdef USER_LABEL_PREFIX
+ if (USER_LABEL_PREFIX[0] != 0)
+ {
+ if (strncmp (name, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX)) == 0)
+ return false;
+ }
+#endif
+
+#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 (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.
+
+ This does depend on bfd_make_section attaching a new section to the
+ end of the section list for the bfd.
+
+ krk@cygnus.com */
+
+static boolean
+coff_arm_link_output_has_begun (sub, info)
+ bfd * sub;
+ struct coff_final_link_info * info;
+{
+ return (sub->output_has_begun
+ || sub == coff_arm_hash_table (info->info)->bfd_of_glue_owner);
+}
+
+static boolean
+coff_arm_final_link_postscript (abfd, pfinfo)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ struct coff_final_link_info * 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;
+}
+
+#include "coffcode.h"
+
+#ifndef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM armcoff_little_vec
+#endif
+#ifndef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "coff-arm-little"
+#endif
+#ifndef TARGET_BIG_SYM
+#define TARGET_BIG_SYM armcoff_big_vec
+#endif
+#ifndef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "coff-arm-big"
+#endif
+
+#ifndef TARGET_UNDERSCORE
+#define TARGET_UNDERSCORE 0
+#endif
+
+#ifdef COFF_WITH_PE
+#define EXTRA_S_FLAGS (SEC_LINK_ONCE | SEC_LINK_DUPLICATES)
+#else
+#define EXTRA_S_FLAGS 0
+#endif
+
+/* Forward declaration for use initialising alternative_target field. */
+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-i386.c b/contrib/binutils/bfd/coff-i386.c
index 7898cc1..84d4d14 100644
--- a/contrib/binutils/bfd/coff-i386.c
+++ b/contrib/binutils/bfd/coff-i386.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 COFF files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -37,13 +37,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libcoff.h"
-static bfd_reloc_status_type coff_i386_reloc
+static bfd_reloc_status_type coff_i386_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static reloc_howto_type *coff_i386_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
-
bfd_vma *));
+static reloc_howto_type *coff_i386_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
/* The page size is a guess based on ELF. */
@@ -66,9 +67,9 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
arelent *reloc_entry;
asymbol *symbol;
PTR data;
- asection *input_section;
+ asection *input_section ATTRIBUTE_UNUSED;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
symvalue diff;
@@ -106,8 +107,8 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#ifdef COFF_WITH_PE
/* FIXME: How should this case be handled? */
- if (reloc_entry->howto->type == R_IMAGEBASE && diff != 0)
- abort ();
+ if (reloc_entry->howto->type == R_IMAGEBASE)
+ diff -= pe_data (output_bfd)->pe_opthdr.ImageBase;
#endif
#define DOIT(x) \
@@ -154,140 +155,150 @@ 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(abfd, howto)
- bfd * abfd;
+/* 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;
reloc_howto_type *howto;
{
return ! howto->pc_relative && howto->type != R_IMAGEBASE;
-}
-#endif
+}
+
+#endif /* COFF_WITH_PE */
#ifndef PCRELOFFSET
#define PCRELOFFSET false
#endif
-static reloc_howto_type howto_table[] =
+static reloc_howto_type howto_table[] =
{
- {0},
- {1},
- {2},
- {3},
- {4},
- {5},
- HOWTO (R_DIR32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ EMPTY_HOWTO (0),
+ EMPTY_HOWTO (1),
+ EMPTY_HOWTO (2),
+ EMPTY_HOWTO (3),
+ EMPTY_HOWTO (4),
+ EMPTY_HOWTO (5),
+ HOWTO (R_DIR32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "dir32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- true), /* pcrel_offset */
- /* {7}, */
- HOWTO (R_IMAGEBASE, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ coff_i386_reloc, /* special_function */
+ "dir32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+ /* PE IMAGE_REL_I386_DIR32NB relocation (7). */
+ HOWTO (R_IMAGEBASE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "rva32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
- {010},
- {011},
- {012},
- {013},
- {014},
- {015},
- {016},
- HOWTO (R_RELBYTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ coff_i386_reloc, /* special_function */
+ "rva32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+ EMPTY_HOWTO (010),
+ EMPTY_HOWTO (011),
+ EMPTY_HOWTO (012),
+ EMPTY_HOWTO (013),
+ EMPTY_HOWTO (014),
+ EMPTY_HOWTO (015),
+ EMPTY_HOWTO (016),
+ /* Byte relocation (017). */
+ HOWTO (R_RELBYTE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "8", /* name */
- true, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
+ coff_i386_reloc, /* special_function */
+ "8", /* name */
+ true, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_RELWORD, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ /* 16-bit word relocation (020). */
+ HOWTO (R_RELWORD, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "16", /* name */
- true, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
+ coff_i386_reloc, /* special_function */
+ "16", /* name */
+ true, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_RELLONG, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ /* 32-bit longword relocation (021). */
+ HOWTO (R_RELLONG, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ coff_i386_reloc, /* special_function */
+ "32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_PCRBYTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ /* Byte PC relative relocation (022). */
+ HOWTO (R_PCRBYTE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "DISP8", /* name */
- true, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
+ coff_i386_reloc, /* special_function */
+ "DISP8", /* name */
+ true, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_PCRWORD, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ /* 16-bit word PC relative relocation (023). */
+ HOWTO (R_PCRWORD, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "DISP16", /* name */
- true, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
+ coff_i386_reloc, /* special_function */
+ "DISP16", /* name */
+ true, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_PCRLONG, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ /* 32-bit longword PC relative relocation (024). */
+ HOWTO (R_PCRLONG, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- coff_i386_reloc, /* special_function */
- "DISP32", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ coff_i386_reloc, /* special_function */
+ "DISP32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
PCRELOFFSET) /* pcrel_offset */
};
@@ -297,8 +308,11 @@ static reloc_howto_type howto_table[] =
#define BADMAG(x) I386BADMAG(x)
#define I386 1 /* Customize coffcode.h */
-#define RTYPE2HOWTO(cache_ptr, dst) \
- (cache_ptr)->howto = howto_table + (dst)->r_type;
+#define RTYPE2HOWTO(cache_ptr, dst) \
+ ((cache_ptr)->howto = \
+ ((dst)->r_type < sizeof (howto_table) / sizeof (howto_table[0]) \
+ ? howto_table + (dst)->r_type \
+ : NULL))
/* For 386 COFF a STYP_NOLOAD | STYP_BSS section is part of a shared
library. On some other COFF targets STYP_BSS is normally
@@ -385,19 +399,25 @@ coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
static reloc_howto_type *
coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
struct internal_reloc *rel;
struct coff_link_hash_entry *h;
struct internal_syment *sym;
bfd_vma *addendp;
{
-
reloc_howto_type *howto;
+ if (rel->r_type > sizeof (howto_table) / sizeof (howto_table[0]))
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+ }
+
howto = howto_table + rel->r_type;
#ifdef COFF_WITH_PE
+ /* Cancel out code in _bfd_coff_generic_relocate_section. */
*addendp = 0;
#endif
@@ -411,7 +431,7 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
function will be adding in the final value of the symbol. We
need to subtract out the current size in order to get the
correct result. */
-
+
BFD_ASSERT (h != NULL);
#ifndef COFF_WITH_PE
@@ -430,7 +450,7 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
/* If the output symbol is common (in which case this must be a
relocateable link), we need to add in the final size of the
common symbol. */
- if (h != NULL && h->root.type == bfd_link_hash_common)
+ if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
#endif
@@ -458,23 +478,29 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return howto;
}
-
#define coff_bfd_reloc_type_lookup coff_i386_reloc_type_lookup
-
static reloc_howto_type *
coff_i386_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
switch (code)
{
case BFD_RELOC_RVA:
- return howto_table +R_IMAGEBASE;
+ return howto_table + R_IMAGEBASE;
case BFD_RELOC_32:
return howto_table + R_DIR32;
case BFD_RELOC_32_PCREL:
return howto_table + R_PCRLONG;
+ case BFD_RELOC_16:
+ return howto_table + R_RELWORD;
+ case BFD_RELOC_16_PCREL:
+ return howto_table + R_PCRWORD;
+ case BFD_RELOC_8:
+ return howto_table + R_RELBYTE;
+ case BFD_RELOC_8_PCREL:
+ return howto_table + R_PCRBYTE;
default:
BFD_FAIL ();
return 0;
@@ -508,69 +534,6 @@ coff_i386_is_local_label_name (abfd, name)
#include "coffcode.h"
-static const bfd_target *
-i3coff_object_p (abfd)
- bfd *abfd;
-{
-#ifdef COFF_IMAGE_WITH_PE
- /* We need to hack badly to handle a PE image correctly. In PE
- images created by the GNU linker, the offset to the COFF header
- is always the size. However, this is not the case in images
- generated by other PE linkers. The PE format stores a four byte
- offset to the PE signature just before the COFF header at
- location 0x3c of the file. We pick up that offset, verify that
- the PE signature is there, and then set ourselves up to read in
- the COFF header. */
- {
- bfd_byte ext_offset[4];
- file_ptr offset;
- bfd_byte ext_signature[4];
- unsigned long signature;
-
- if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0
- || bfd_read (ext_offset, 1, 4, abfd) != 4)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
- offset = bfd_h_get_32 (abfd, ext_offset);
- if (bfd_seek (abfd, offset, SEEK_SET) != 0
- || bfd_read (ext_signature, 1, 4, abfd) != 4)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
- signature = bfd_h_get_32 (abfd, ext_signature);
-
- if (signature != 0x4550)
- {
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
-
- /* Here is the hack. coff_object_p wants to read filhsz bytes to
- pick up the COFF header. We adjust so that that will work. 20
- is the size of the i386 COFF filehdr. */
-
- if (bfd_seek (abfd,
- (bfd_tell (abfd)
- - bfd_coff_filhsz (abfd)
- + 20),
- SEEK_SET)
- != 0)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
- }
-#endif
-
- return coff_object_p (abfd);
-}
-
const bfd_target
#ifdef TARGET_SYM
TARGET_SYM =
@@ -591,14 +554,11 @@ const bfd_target
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 */
- | SEC_CODE | SEC_DATA),
-#else
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
- | SEC_CODE | SEC_DATA
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
+#ifdef COFF_WITH_PE
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES
#endif
+ | SEC_CODE | SEC_DATA),
#ifdef TARGET_UNDERSCORE
TARGET_UNDERSCORE, /* leading underscore */
@@ -616,8 +576,8 @@ const bfd_target
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. */
- {_bfd_dummy_target, i3coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, i3coff_object_p},
+ {_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 */
bfd_false},
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
@@ -633,5 +593,7 @@ const bfd_target
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- COFF_SWAP_TABLE,
+ NULL,
+
+ COFF_SWAP_TABLE
};
diff --git a/contrib/binutils/bfd/coff-mips.c b/contrib/binutils/bfd/coff-mips.c
index 23c38a1..bb4b15e 100644
--- a/contrib/binutils/bfd/coff-mips.c
+++ b/contrib/binutils/bfd/coff-mips.c
@@ -1,5 +1,5 @@
/* BFD back-end for MIPS Extended-Coff files.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -273,10 +273,10 @@ static reloc_howto_type mips_howto_table[] =
0xffff, /* dst_mask */
false), /* pcrel_offset */
- { 8 },
- { 9 },
- { 10 },
- { 11 },
+ EMPTY_HOWTO (8),
+ EMPTY_HOWTO (9),
+ EMPTY_HOWTO (10),
+ EMPTY_HOWTO (11),
/* This reloc is a Cygnus extension used when generating position
independent code for embedded systems. It represents a 16 bit PC
@@ -334,13 +334,13 @@ static reloc_howto_type mips_howto_table[] =
0xffff, /* dst_mask */
true), /* pcrel_offset */
- { 15 },
- { 16 },
- { 17 },
- { 18 },
- { 19 },
- { 20 },
- { 21 },
+ EMPTY_HOWTO (15),
+ EMPTY_HOWTO (16),
+ EMPTY_HOWTO (17),
+ EMPTY_HOWTO (18),
+ EMPTY_HOWTO (19),
+ EMPTY_HOWTO (20),
+ EMPTY_HOWTO (21),
/* This reloc is a Cygnus extension used when generating position
independent code for embedded systems. It represents an entry in
@@ -569,7 +569,7 @@ mips_adjust_reloc_in (abfd, intern, rptr)
static void
mips_adjust_reloc_out (abfd, rel, intern)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const arelent *rel;
struct internal_reloc *intern;
{
@@ -604,13 +604,13 @@ mips_generic_reloc (abfd,
input_section,
output_bfd,
error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -651,13 +651,13 @@ mips_refhi_reloc (abfd,
input_section,
output_bfd,
error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_reloc_status_type ret;
bfd_vma relocation;
@@ -872,7 +872,7 @@ mips_gprel_reloc (abfd,
gp = 4;
_bfd_set_gp_value (output_bfd, gp);
*error_message =
- (char *) "GP relative relocation when _gp not defined";
+ (char *) _("GP relative relocation when _gp not defined");
return bfd_reloc_dangerous;
}
}
@@ -933,13 +933,13 @@ mips_relhi_reloc (abfd,
input_section,
output_bfd,
error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_reloc_status_type ret;
bfd_vma relocation;
@@ -1109,13 +1109,13 @@ mips_switch_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_ok;
}
@@ -1124,7 +1124,7 @@ mips_switch_reloc (abfd,
static reloc_howto_type *
mips_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
int mips_type;
@@ -1193,11 +1193,18 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
unsigned long val;
unsigned long vallo;
+ if (refhi == NULL)
+ return;
+
insn = bfd_get_32 (input_bfd,
contents + adjust + refhi->r_vaddr - input_section->vma);
- vallo = (bfd_get_32 (input_bfd,
- contents + adjust + reflo->r_vaddr - input_section->vma)
- & 0xffff);
+ if (reflo == NULL)
+ vallo = 0;
+ else
+ vallo = (bfd_get_32 (input_bfd,
+ contents + adjust + reflo->r_vaddr - input_section->vma)
+ & 0xffff);
+
val = ((insn & 0xffff) << 16) + vallo;
val += relocation;
@@ -1425,7 +1432,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
if (gp_undefined)
{
if (! ((*info->callbacks->reloc_dangerous)
- (info, "GP relative relocation when GP not defined",
+ (info, _("GP relative relocation when GP not defined"),
input_bfd, input_section,
int_rel.r_vaddr - input_section->vma)))
return false;
@@ -1774,7 +1781,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section,
- int_rel.r_vaddr - input_section->vma)))
+ int_rel.r_vaddr - input_section->vma, true)))
return false;
relocation = 0;
}
@@ -2322,9 +2329,9 @@ mips_relax_section (abfd, sec, info, again)
static boolean
mips_relax_pcrel16 (info, input_bfd, input_section, h, location, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *input_bfd;
- asection *input_section;
+ asection *input_section ATTRIBUTE_UNUSED;
struct ecoff_link_hash_entry *h;
bfd_byte *location;
bfd_vma address;
@@ -2423,7 +2430,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
/* We can only relocate REFWORD relocs at run time. */
if (int_rel.r_type != MIPS_R_REFWORD)
{
- *errmsg = "unsupported reloc type";
+ *errmsg = _("unsupported reloc type");
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -2460,7 +2467,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
default:
/* No other sections should appear in -membedded-pic
code. */
- *errmsg = "reloc against unsupported section";
+ *errmsg = _("reloc against unsupported section");
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -2468,7 +2475,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
if ((int_rel.r_offset & 3) != 0)
{
- *errmsg = "reloc not properly aligned";
+ *errmsg = _("reloc not properly aligned");
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -2498,13 +2505,14 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
(unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
mips_ecoff_swap_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, true, false, 4,
+ FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4,
mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
mips_ecoff_swap_scnhdr_in, NULL,
mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
_bfd_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
_bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL
},
/* Supported architecture. */
bfd_arch_mips,
@@ -2590,6 +2598,11 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
/* Relaxing sections is MIPS specific. */
#define _bfd_ecoff_bfd_relax_section mips_relax_section
+/* GC of sections is not done. */
+#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
+
+extern const bfd_target ecoff_big_vec;
+
const bfd_target ecoff_little_vec =
{
"ecoff-littlemips", /* name */
@@ -2629,6 +2642,8 @@ const bfd_target ecoff_little_vec =
BFD_JUMP_TABLE_LINK (_bfd_ecoff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ & ecoff_big_vec,
+
(PTR) &mips_ecoff_backend_data
};
@@ -2670,6 +2685,8 @@ const bfd_target ecoff_big_vec =
BFD_JUMP_TABLE_LINK (_bfd_ecoff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ & ecoff_little_vec,
+
(PTR) &mips_ecoff_backend_data
};
@@ -2712,5 +2729,7 @@ const bfd_target ecoff_biglittle_vec =
BFD_JUMP_TABLE_LINK (_bfd_ecoff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) &mips_ecoff_backend_data
};
diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c
new file mode 100644
index 0000000..c5e695d
--- /dev/null
+++ b/contrib/binutils/bfd/coff-ppc.c
@@ -0,0 +1,2969 @@
+/* BFD back-end for PowerPC Microsoft Portable Executable files.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
+
+ 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
+ intel backends, and the PE work for the arm.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Current State:
+ - 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
+ not produce the right glue code for dll function calls.
+*/
+
+
+#include "bfd.h"
+#include "sysdep.h"
+
+#include "libbfd.h"
+
+#include "coff/powerpc.h"
+#include "coff/internal.h"
+
+#include "coff/pe.h"
+
+#ifdef BADMAG
+#undef BADMAG
+#endif
+
+#define BADMAG(x) PPCBADMAG(x)
+
+#include "libcoff.h"
+
+/* This file is compiled more than once, but we only compile the
+ final_link routine once. */
+extern boolean ppc_bfd_coff_final_link
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern void dump_toc PARAMS ((PTR));
+
+/* The toc is a set of bfd_vma fields. We use the fact that valid */
+/* addresses are even (i.e. the bit representing "1" is off) to allow */
+/* us to encode a little extra information in the field */
+/* - Unallocated addresses are intialized to 1. */
+/* - Allocated addresses are even numbers. */
+/* The first time we actually write a reference to the toc in the bfd, */
+/* we want to record that fact in a fixup file (if it is asked for), so */
+/* we keep track of whether or not an address has been written by marking */
+/* the low order bit with a "1" upon writing */
+
+#define SET_UNALLOCATED(x) ((x) = 1)
+#define IS_UNALLOCATED(x) ((x) == 1)
+
+#define IS_WRITTEN(x) ((x) & 1)
+#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
+
+/* Need a 7 char string for an eye catcher */
+#define EYE "krkjunk"
+
+#define HASH_CHECK_DCL char eye_catcher[8];
+#define HASH_CHECK_INIT(ret) strcpy(ret->eye_catcher, EYE)
+#define HASH_CHECK(addr) \
+ if (strcmp(addr->eye_catcher, EYE) != 0) \
+ { \
+ fprintf(stderr,\
+ _("File %s, line %d, Hash check failure, bad eye %8s\n"), \
+ __FILE__, __LINE__, addr->eye_catcher); \
+ abort(); \
+ }
+
+
+#else
+
+#define HASH_CHECK_DCL
+#define HASH_CHECK_INIT(ret)
+#define HASH_CHECK(addr)
+
+#endif
+
+/* 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. */
+
+struct ppc_coff_link_hash_entry
+{
+ struct coff_link_hash_entry root; /* First entry, as required */
+
+ /* As we wonder around the relocs, we'll keep the assigned toc_offset
+ here */
+ bfd_vma toc_offset; /* Our addition, as required */
+ int symbol_is_glue;
+ unsigned long int glue_insn;
+
+ HASH_CHECK_DCL
+};
+
+
+/* PE linker hash table. */
+
+struct ppc_coff_link_hash_table
+{
+ struct coff_link_hash_table root; /* First entry, as required */
+};
+
+static struct bfd_hash_entry *ppc_coff_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
+ const char *));
+static boolean ppc_coff_link_hash_table_init
+ PARAMS ((struct ppc_coff_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *)));
+static struct bfd_link_hash_table *ppc_coff_link_hash_table_create
+ PARAMS ((bfd *));
+static boolean coff_ppc_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+static reloc_howto_type *coff_ppc_rtype_to_howto
+ PARAMS ((bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *, struct internal_syment *,
+ bfd_vma *));
+
+/* Routine to create an entry in the link hash table. */
+
+static struct bfd_hash_entry *
+ppc_coff_link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ 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,
+ sizeof (struct ppc_coff_link_hash_entry));
+
+ if (ret == (struct ppc_coff_link_hash_entry *) NULL)
+ return NULL;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct ppc_coff_link_hash_entry *)
+ _bfd_coff_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ table, string));
+
+ if (ret)
+ {
+ /* Initialize the local fields. */
+ SET_UNALLOCATED(ret->toc_offset);
+ ret->symbol_is_glue = 0;
+ ret->glue_insn = 0;
+
+ HASH_CHECK_INIT(ret);
+ }
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+/* Initialize a PE linker hash table. */
+
+static boolean
+ppc_coff_link_hash_table_init (table, abfd, newfunc)
+ struct ppc_coff_link_hash_table *table;
+ bfd *abfd;
+ struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *));
+{
+ return _bfd_coff_link_hash_table_init (&table->root, abfd, newfunc);
+}
+
+/* Create a PE linker hash table. */
+
+static struct bfd_link_hash_table *
+ppc_coff_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct ppc_coff_link_hash_table *ret;
+
+ ret = ((struct ppc_coff_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct ppc_coff_link_hash_table)));
+ if (ret == NULL)
+ return NULL;
+ if (! ppc_coff_link_hash_table_init (ret, abfd,
+ ppc_coff_link_hash_newfunc))
+ {
+ bfd_release (abfd, ret);
+ return (struct bfd_link_hash_table *) NULL;
+ }
+ return &ret->root.root;
+}
+
+/* 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 */
+/* for this when we fix up loads displaced off the toc reg. */
+#define TOC_LOAD_ADJUSTMENT (-32768)
+#define TOC_SECTION_NAME ".private.toc"
+
+/* The main body of code is in coffcode.h. */
+
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
+
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
+ 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... */
+
+/* NOP */
+#define IMAGE_REL_PPC_ABSOLUTE 0x0000
+
+/* 64-bit address */
+#define IMAGE_REL_PPC_ADDR64 0x0001
+
+/* 32-bit address */
+#define IMAGE_REL_PPC_ADDR32 0x0002
+
+/* 26-bit address, shifted left 2 (branch absolute) */
+#define IMAGE_REL_PPC_ADDR24 0x0003
+
+/* 16-bit address */
+#define IMAGE_REL_PPC_ADDR16 0x0004
+
+/* 16-bit address, shifted left 2 (load doubleword) */
+#define IMAGE_REL_PPC_ADDR14 0x0005
+
+/* 26-bit PC-relative offset, shifted left 2 (branch relative) */
+#define IMAGE_REL_PPC_REL24 0x0006
+
+/* 16-bit PC-relative offset, shifted left 2 (br cond relative) */
+#define IMAGE_REL_PPC_REL14 0x0007
+
+/* 16-bit offset from TOC base */
+#define IMAGE_REL_PPC_TOCREL16 0x0008
+
+/* 16-bit offset from TOC base, shifted left 2 (load doubleword) */
+#define IMAGE_REL_PPC_TOCREL14 0x0009
+
+/* 32-bit addr w/o image base */
+#define IMAGE_REL_PPC_ADDR32NB 0x000A
+
+/* va of containing section (as in an image sectionhdr) */
+#define IMAGE_REL_PPC_SECREL 0x000B
+
+/* sectionheader number */
+#define IMAGE_REL_PPC_SECTION 0x000C
+
+/* substitute TOC restore instruction iff symbol is glue code */
+#define IMAGE_REL_PPC_IFGLUE 0x000D
+
+/* symbol is glue code; virtual address is TOC restore instruction */
+#define IMAGE_REL_PPC_IMGLUE 0x000E
+
+/* va of containing section (limited to 16 bits) */
+#define IMAGE_REL_PPC_SECREL16 0x000F
+
+/* stuff to handle immediate data when the number of bits in the */
+/* data is greater than the number of bits in the immediate field */
+/* We need to do (usually) 32 bit arithmetic on 16 bit chunks */
+#define IMAGE_REL_PPC_REFHI 0x0010
+#define IMAGE_REL_PPC_REFLO 0x0011
+#define IMAGE_REL_PPC_PAIR 0x0012
+
+/* This is essentially the same as tocrel16, with TOCDEFN assumed */
+#define IMAGE_REL_PPC_TOCREL16_DEFN 0x0013
+
+/* Flag bits in IMAGE_RELOCATION.TYPE */
+
+/* subtract reloc value rather than adding it */
+#define IMAGE_REL_PPC_NEG 0x0100
+
+/* fix branch prediction bit to predict branch taken */
+#define IMAGE_REL_PPC_BRTAKEN 0x0200
+
+/* fix branch prediction bit to predict branch not taken */
+#define IMAGE_REL_PPC_BRNTAKEN 0x0400
+
+/* toc slot defined in file (or, data in toc) */
+#define IMAGE_REL_PPC_TOCDEFN 0x0800
+
+/* masks to isolate above values in IMAGE_RELOCATION.Type */
+#define IMAGE_REL_PPC_TYPEMASK 0x00FF
+#define IMAGE_REL_PPC_FLAGMASK 0x0F00
+
+#define EXTRACT_TYPE(x) ((x) & IMAGE_REL_PPC_TYPEMASK)
+#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) */
+
+static bfd_reloc_status_type ppc_refhi_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+#if 0
+static bfd_reloc_status_type ppc_reflo_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+#endif
+static bfd_reloc_status_type ppc_pair_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+
+
+static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+
+#if 0
+static bfd_reloc_status_type ppc_addr32nb_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+#endif
+static bfd_reloc_status_type ppc_section_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+
+static bfd_reloc_status_type ppc_secrel_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ bfd *output_bfd,
+ char **error));
+
+static bfd_reloc_status_type ppc_imglue_reloc PARAMS ((bfd *abfd,
+ arelent *reloc,
+ asymbol *symbol,
+ PTR data,
+ asection *section,
+ 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
+ completely unverified or have a specific unknown marked in the comment */
+
+/*---------------------------------------------------------------------------*/
+/* */
+/* Relocation entries for Windows/NT on PowerPC. */
+/* */
+/* From the document "" we find the following listed as used relocs: */
+/* */
+/* ABSOLUTE : The noop */
+/* ADDR[64|32|16] : fields that hold addresses in data fields or the */
+/* 16 bit displacement field on a load/store. */
+/* ADDR[24|14] : fields that hold addresses in branch and cond */
+/* branches. These represent [26|16] bit addresses. */
+/* The low order 2 bits are preserved. */
+/* REL[24|14] : branches relative to the Instruction Address */
+/* register. These represent [26|16] bit addresses, */
+/* as before. The instruction field will be zero, and */
+/* 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. */
+/* 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) */
+/* SECREL : The value is relative to the start of the section */
+/* containing the symbol. */
+/* SECTION : access to the header containing the item. Supports the */
+/* codeview debugger. */
+/* */
+/* In particular, note that the document does not indicate that the */
+/* relocations listed in the header file are used. */
+/* */
+/* */
+/* */
+/*---------------------------------------------------------------------------*/
+
+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 */
+ complain_overflow_dont, /* dont complain_on_overflow */
+ 0, /* special_function */
+ "ABSOLUTE", /* name */
+ 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 */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR64", /* name */
+ true, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 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 */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR32", /* name */
+ 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 */
+ /* Used: */
+ HOWTO (IMAGE_REL_PPC_ADDR24, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR24", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR16", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR16", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "REL24", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR16", /* name */
+ 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 */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc_toc16_reloc, /* special_function */
+ "TOCREL16", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "TOCREL14", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "ADDR32NB", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc_secrel_reloc, /* special_function */
+ "SECREL", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc_section_reloc, /* special_function */
+ "SECTION", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "IFGLUE", /* name */
+ 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 */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc_imglue_reloc, /* special_function */
+ "IMGLUE", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "SECREL16", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc_refhi_reloc, /* special_function */
+ "REFHI", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc_refhi_reloc, /* special_function */
+ "REFLO", /* name */
+ 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 */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc_pair_reloc, /* special_function */
+ "PAIR", /* name */
+ 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 */
+ complain_overflow_dont, /* complain_on_overflow */
+ 0, /* special_function */
+ "TOCREL16, TOCDEFN", /* name */
+ 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
+#define UN_IMPL(x) \
+{ \
+ static int i; \
+ if (i == 0) \
+ { \
+ i = 1; \
+ fprintf(stderr,_("Unimplemented Relocation -- %s\n"),x); \
+ } \
+}
+
+#define DUMP_RELOC(n,r) \
+{ \
+ 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
+
+#define n_name _n._n_name
+#define n_zeroes _n._n_n._n_zeroes
+#define n_offset _n._n_n._n_offset
+
+*/
+
+#define DUMP_RELOC2(n,r) \
+{ \
+ 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" ); \
+}
+
+#else
+#define UN_IMPL(x)
+#define DUMP_RELOC(n,r)
+#define DUMP_RELOC2(n,r)
+#endif
+
+
+
+/* toc construction and management routines */
+
+/* This file is compiled twice, and these variables are defined in one
+ of the compilations. FIXME: This is confusing and weird. Also,
+ BFD should not use global variables. */
+extern bfd* bfd_of_toc_owner;
+extern long int global_toc_size;
+
+extern long int import_table_size;
+extern long int first_thunk_address;
+extern long int thunk_size;
+
+enum toc_type
+{
+ default_toc,
+ toc_32,
+ toc_64
+};
+
+enum ref_category
+{
+ priv,
+ pub,
+ data
+};
+
+struct list_ele
+{
+ struct list_ele *next;
+ bfd_vma addr;
+ enum ref_category cat;
+ int offset;
+ const char *name;
+};
+
+extern struct list_ele *head;
+extern struct list_ele *tail;
+
+static void record_toc
+ PARAMS ((asection *, int, enum ref_category, const char *));
+
+static void
+record_toc (toc_section, our_toc_offset, cat, name)
+ asection *toc_section;
+ int our_toc_offset;
+ enum ref_category cat;
+ const char *name;
+{
+ /* add this entry to our toc addr-offset-name list */
+ struct list_ele *t;
+ t = (struct list_ele *) bfd_malloc (sizeof (struct list_ele));
+ if (t == NULL)
+ abort ();
+ t->next = 0;
+ t->offset = our_toc_offset;
+ t->name = name;
+ t->cat = cat;
+ t->addr = toc_section->output_offset + our_toc_offset;
+
+ if (head == 0)
+ {
+ head = t;
+ tail = t;
+ }
+ else
+ {
+ tail->next = t;
+ tail = t;
+ }
+}
+
+#ifdef COFF_IMAGE_WITH_PE
+
+static boolean ppc_record_toc_entry
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, int, enum toc_type));
+static void ppc_mark_symbol_as_glue
+ PARAMS ((bfd *, int, struct internal_reloc *));
+
+/* record a toc offset against a symbol */
+static boolean
+ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ int sym;
+ enum toc_type toc_kind ATTRIBUTE_UNUSED;
+{
+ struct ppc_coff_link_hash_entry *h;
+ const char *name;
+
+ int *local_syms;
+
+ h = 0;
+
+ h = (struct ppc_coff_link_hash_entry *) (obj_coff_sym_hashes (abfd)[sym]);
+ if (h != 0)
+ {
+ HASH_CHECK(h);
+ }
+
+ 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));
+ if (local_syms == 0)
+ return false;
+ obj_coff_local_toc_table(abfd) = local_syms;
+ for (i = 0; i < obj_raw_syment_count(abfd); ++i)
+ {
+ SET_UNALLOCATED(local_syms[i]);
+ }
+ }
+
+ if (IS_UNALLOCATED(local_syms[sym]))
+ {
+ local_syms[sym] = global_toc_size;
+ global_toc_size += 4;
+
+ /* The size must fit in a 16bit displacment */
+ if (global_toc_size > 65535)
+ {
+ (*_bfd_error_handler) (_("TOC overflow"));
+ bfd_set_error (bfd_error_file_too_big);
+ return false;
+ }
+ }
+ }
+ else
+ {
+ name = h->root.root.root.string;
+
+ /* check to see if there's a toc slot allocated. If not, do it
+ here. It will be used in relocate_section */
+ if (IS_UNALLOCATED(h->toc_offset))
+ {
+ h->toc_offset = global_toc_size;
+ global_toc_size += 4;
+
+ /* The size must fit in a 16bit displacment */
+ if (global_toc_size >= 65535)
+ {
+ (*_bfd_error_handler) (_("TOC overflow"));
+ bfd_set_error (bfd_error_file_too_big);
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+/* record a toc offset against a symbol */
+static void
+ppc_mark_symbol_as_glue(abfd, sym, rel)
+ bfd *abfd;
+ int sym;
+ struct internal_reloc *rel;
+{
+ struct ppc_coff_link_hash_entry *h;
+
+ h = (struct ppc_coff_link_hash_entry *) (obj_coff_sym_hashes (abfd)[sym]);
+
+ HASH_CHECK(h);
+
+ h->symbol_is_glue = 1;
+ h->glue_insn = bfd_get_32 (abfd, (bfd_byte *) &rel->r_vaddr);
+
+ return;
+}
+
+#endif /* COFF_IMAGE_WITH_PE */
+
+
+/* Return true if this relocation should
+ 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)
+ && (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_SECREL)
+ && (howto->type != IMAGE_REL_PPC_SECTION)
+ && (howto->type != IMAGE_REL_PPC_SECREL16)
+ && (howto->type != IMAGE_REL_PPC_REFHI)
+ && (howto->type != IMAGE_REL_PPC_REFLO)
+ && (howto->type != IMAGE_REL_PPC_PAIR)
+ && (howto->type != IMAGE_REL_PPC_TOCREL16_DEFN) ;
+}
+
+#if 0
+
+/* this function is in charge of performing all the ppc PE relocations */
+/* Don't yet know if we want to do this this particular way ... (krk) */
+/* FIXME: (it is not yet enabled) */
+
+static bfd_reloc_status_type
+pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol_in;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ /* the consth relocation comes in two parts, we have to remember
+ the state between calls, in these variables */
+ static boolean part1_consth_active = false;
+ static unsigned long part1_consth_value;
+
+ 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)
+ {
+ /* Partial linking - do nothing */
+ reloc_entry->address += input_section->output_offset;
+ 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)
+ {
+ part1_consth_active = true;
+ part1_consth_value = 0;
+ }
+ return(bfd_reloc_undefined);
+ }
+
+ 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);
+}
+
+#endif /* 0 */
+
+/* The reloc processing routine for the optimized COFF linker. */
+
+static boolean
+coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, syms, sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ struct internal_reloc *relocs;
+ struct internal_syment *syms;
+ asection **sections;
+{
+ struct internal_reloc *rel;
+ struct internal_reloc *relend;
+ boolean hihalf;
+ bfd_vma hihalf_val;
+ 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;
+
+ rel = relocs;
+ relend = rel + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ long symndx;
+ struct ppc_coff_link_hash_entry *h;
+ struct internal_syment *sym;
+ bfd_vma val;
+
+ asection *sec;
+ bfd_reloc_status_type rstat;
+ bfd_byte *loc;
+
+ 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;
+
+ /* FIXME: check bounds on r_type */
+ howto = ppc_coff_howto_table + r_type;
+
+ if (symndx == -1)
+ {
+ h = NULL;
+ sym = NULL;
+ }
+ else
+ {
+ h = (struct ppc_coff_link_hash_entry *)
+ (obj_coff_sym_hashes (input_bfd)[symndx]);
+ if (h != 0)
+ {
+ HASH_CHECK(h);
+ }
+
+ sym = syms + symndx;
+ }
+
+ if (r_type == IMAGE_REL_PPC_IMGLUE && h == 0)
+ {
+ /* An IMGLUE reloc must have a name. Something is very wrong. */
+ abort();
+ }
+
+ sec = NULL;
+ val = 0;
+
+ /* FIXME: PAIR unsupported in the following code */
+ if (h == NULL)
+ {
+ if (symndx == -1)
+ sec = bfd_abs_section_ptr;
+ else
+ {
+ sec = sections[symndx];
+ val = (sec->output_section->vma
+ + sec->output_offset
+ + sym->n_value);
+ if (! obj_pe (output_bfd))
+ val -= sec->vma;
+ }
+ }
+ else
+ {
+ HASH_CHECK(h);
+
+ if (h->root.root.type == bfd_link_hash_defined
+ || h->root.root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.root.u.def.section;
+ val = (h->root.root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, true)))
+ return false;
+ }
+ }
+
+ rstat = bfd_reloc_ok;
+
+ /* Each case must do its own relocation, setting rstat appropriately */
+ switch (r_type)
+ {
+ default:
+ (*_bfd_error_handler)
+ (_("%s: unsupported relocation type 0x%02x"),
+ bfd_get_filename (input_bfd), r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ case IMAGE_REL_PPC_TOCREL16:
+ {
+ bfd_vma our_toc_offset;
+ int fixit;
+
+ DUMP_RELOC2(howto->name, rel);
+
+ if (toc_section == 0)
+ {
+ toc_section = bfd_get_section_by_name (bfd_of_toc_owner,
+ TOC_SECTION_NAME);
+
+ if ( toc_section == NULL )
+ {
+ /* 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
+ * the 1 bit to tell us if we've written this particular toc
+ * entry out.
+ */
+ fixit = false;
+ if (h == 0)
+ { /* it is a file local symbol */
+ int *local_toc_table;
+ const char *name;
+
+ sym = syms + symndx;
+ name = sym->_n._n_name;
+
+ local_toc_table = obj_coff_local_toc_table(input_bfd);
+ our_toc_offset = local_toc_table[symndx];
+
+ if (IS_WRITTEN(our_toc_offset))
+ {
+ /* if it has been written out, it is marked with the
+ 1 bit. Fix up our offset, but do not write it out
+ again.
+ */
+ MAKE_ADDR_AGAIN(our_toc_offset);
+ }
+ else
+ {
+ /* write out the toc entry */
+ record_toc(toc_section,
+ our_toc_offset,
+ priv,
+ strdup(name));
+
+ bfd_put_32(output_bfd,
+ val,
+ toc_section->contents + our_toc_offset);
+
+ MARK_AS_WRITTEN(local_toc_table[symndx]);
+ fixit = true;
+ }
+ }
+ else
+ {
+ const char *name = h->root.root.root.string;
+ our_toc_offset = h->toc_offset;
+
+ 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.
+
+ 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
+ the IAT to be part of the toc, thus saving a load.
+ */
+
+ 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"),
+ bfd_get_filename (input_bfd), name, our_toc_offset);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ record_toc(toc_section, our_toc_offset, pub, strdup(name));
+ }
+ else if (IS_WRITTEN(our_toc_offset))
+ {
+ /* if it has been written out, it is marked with the
+ 1 bit. Fix up our offset, but do not write it out
+ again.
+ */
+ MAKE_ADDR_AGAIN(our_toc_offset);
+ }
+ else
+ {
+ record_toc(toc_section, our_toc_offset, pub, strdup(name));
+
+ /* write out the toc entry */
+ bfd_put_32(output_bfd,
+ val,
+ toc_section->contents + our_toc_offset);
+
+ MARK_AS_WRITTEN(h->toc_offset);
+ /* The tricky part is that this is the address that */
+ /* needs a .reloc entry for it */
+ fixit = true;
+ }
+ }
+
+ 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
+ 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)"),
+ bfd_get_filename (input_bfd),
+ toc_section->_raw_size);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ /* Now we know the relocation for this toc reference */
+ relocation = our_toc_offset + TOC_LOAD_ADJUSTMENT;
+ rstat = _bfd_relocate_contents (howto,
+ 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. */
+ /* 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);
+
+ if (h != 0)
+ {
+ my_name = h->root.root.root.string;
+ if (h->symbol_is_glue == 1)
+ {
+ 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. */
+ break;
+ case IMAGE_REL_PPC_SECTION:
+ /* Unimplemented: codeview debugging information */
+ /* Is used to indicate that the value should be relative
+ to the beginning of the section that contains the
+ symbol */
+ break;
+ case IMAGE_REL_PPC_ABSOLUTE:
+ {
+ const char *my_name;
+ if (h == 0)
+ my_name = (syms+symndx)->_n._n_name;
+ else
+ {
+ my_name = h->root.root.root.string;
+ }
+
+ fprintf(stderr,
+ _("Warning: unsupported reloc %s <file %s, section %s>\n"),
+ howto->name,
+ bfd_get_filename(input_bfd),
+ input_section->name);
+
+ fprintf(stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
+ rel->r_symndx, my_name, (long) rel->r_vaddr,
+ (unsigned long) rel->r_vaddr);
+ }
+ break;
+ case IMAGE_REL_PPC_IMGLUE:
+ {
+ /* 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)
+ break;
+ my_name = h->root.root.root.string;
+
+ (*_bfd_error_handler)
+ (_("%s: Out of order IMGLUE reloc for %s"),
+ bfd_get_filename (input_bfd), my_name);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ case IMAGE_REL_PPC_ADDR32NB:
+ {
+ struct coff_link_hash_entry *myh = 0;
+ const char *name = 0;
+ DUMP_RELOC2(howto->name, rel);
+
+ if (strncmp(".idata$2",input_section->name,8) == 0 && first_thunk_address == 0)
+ {
+ /* set magic values */
+ int idata5offset;
+ struct coff_link_hash_entry *myh = 0;
+ 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 -
+ 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__",
+ false, false, true);
+ import_table_size = myh->root.u.def.value;
+ }
+
+ if (h == 0)
+ { /* it is a file local symbol */
+ sym = syms + symndx;
+ name = sym->_n._n_name;
+ }
+ else
+ {
+ char *target = 0;
+
+ name = h->root.root.root.string;
+ if (strcmp(".idata$2", name) == 0)
+ target = "__idata2_magic__";
+ else if (strcmp(".idata$4", name) == 0)
+ target = "__idata4_magic__";
+ else if (strcmp(".idata$5", name) == 0)
+ target = "__idata5_magic__";
+
+ if (target != 0)
+ {
+ myh = 0;
+
+ myh = coff_link_hash_lookup (coff_hash_table (info),
+ target,
+ false, false, true);
+ if (myh == 0)
+ {
+ /* Missing magic cookies. Something is very wrong. */
+ abort();
+ }
+
+ val = myh->root.u.def.value +
+ sec->output_section->vma + sec->output_offset;
+ if (first_thunk_address == 0)
+ {
+ int idata5offset;
+ 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 -
+ 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__",
+ false, false, true);
+ import_table_size = myh->root.u.def.value;
+ }
+ }
+ }
+
+ rstat = _bfd_relocate_contents (howto,
+ input_bfd,
+ val -
+ pe_data(output_bfd)->pe_opthdr.ImageBase,
+ loc);
+ }
+ break;
+
+ case IMAGE_REL_PPC_REL24:
+ DUMP_RELOC2(howto->name, rel);
+ val -= (input_section->output_section->vma
+ + input_section->output_offset);
+
+ rstat = _bfd_relocate_contents (howto,
+ input_bfd,
+ val,
+ loc);
+ break;
+ case IMAGE_REL_PPC_ADDR16:
+ case IMAGE_REL_PPC_ADDR24:
+ case IMAGE_REL_PPC_ADDR32:
+ DUMP_RELOC2(howto->name, rel);
+ rstat = _bfd_relocate_contents (howto,
+ input_bfd,
+ val,
+ loc);
+ break;
+ }
+
+ if ( info->base_file )
+ {
+ /* So if this is non pcrelative, and is referenced
+ to a section or a common symbol, then it needs a reloc */
+ 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
+ to a file */
+ bfd_vma 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;
+ }
+ fwrite (&addr, 1,4, (FILE *) info->base_file);
+ }
+ }
+
+ switch (rstat)
+ {
+ default:
+ abort ();
+ case bfd_reloc_ok:
+ break;
+ case bfd_reloc_overflow:
+ {
+ const char *name;
+ char buf[SYMNMLEN + 1];
+
+ if (symndx == -1)
+ name = "*ABS*";
+ else if (h != NULL)
+ name = h->root.root.root.string;
+ else if (sym == NULL)
+ name = "*unknown*";
+ else if (sym->_n._n_n._n_zeroes == 0
+ && sym->_n._n_n._n_offset != 0)
+ name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset;
+ else
+ {
+ strncpy (buf, sym->_n._n_name, SYMNMLEN);
+ buf[SYMNMLEN] = '\0';
+ name = buf;
+ }
+
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, name, howto->name,
+ (bfd_vma) 0, input_bfd,
+ input_section, rel->r_vaddr - input_section->vma)))
+ {
+ return false;
+ }
+ }
+ }
+
+ }
+
+ return true;
+}
+
+#ifdef COFF_IMAGE_WITH_PE
+
+/* FIXME: BFD should not use global variables. This file is compiled
+ twice, and these variables are shared. This is confusing and
+ weird. */
+
+long int global_toc_size = 4;
+
+bfd* bfd_of_toc_owner = 0;
+
+long int import_table_size;
+long int first_thunk_address;
+long int thunk_size;
+
+struct list_ele *head;
+struct list_ele *tail;
+
+static char *
+h1 = N_("\n\t\t\tTOC MAPPING\n\n");
+static char *
+h2 = N_(" TOC disassembly Comments Name\n");
+static char *
+h3 = N_(" Offset spelling (if present)\n");
+
+void
+dump_toc (vfile)
+ PTR vfile;
+{
+ FILE *file = (FILE *) vfile;
+ struct list_ele *t;
+
+ fprintf(file, _(h1));
+ fprintf(file, _(h2));
+ fprintf(file, _(h3));
+
+ for(t = head; t != 0; t=t->next)
+ {
+ const char *cat = "";
+
+ if (t->cat == priv)
+ cat = _("private ");
+ else if (t->cat == pub)
+ cat = _("public ");
+ else if (t->cat == data)
+ cat = _("data-in-toc ");
+
+ if (t->offset > global_toc_size)
+ {
+ if (t->offset <= global_toc_size + thunk_size)
+ cat = _("IAT reference ");
+ else
+ {
+ 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,
+ " %04lx (%d)", (unsigned long) t->offset, t->offset - 32768);
+ fprintf(file,
+ " %s %s\n",
+ cat, t->name);
+
+ }
+
+ fprintf(file, "\n");
+}
+
+boolean
+ppc_allocate_toc_section (info)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ asection *s;
+ bfd_byte *foo;
+ static char test_char = '1';
+
+ if ( global_toc_size == 0 ) /* FIXME: does this get me in trouble? */
+ return true;
+
+ if (bfd_of_toc_owner == 0)
+ {
+ /* No toc owner? Something is very wrong. */
+ abort();
+ }
+
+ s = bfd_get_section_by_name ( bfd_of_toc_owner , TOC_SECTION_NAME);
+ if (s == NULL)
+ {
+ /* No toc section? Something is very wrong. */
+ abort();
+ }
+
+ foo = (bfd_byte *) bfd_alloc(bfd_of_toc_owner, global_toc_size);
+ memset(foo, test_char, global_toc_size);
+
+ s->_raw_size = s->_cooked_size = global_toc_size;
+ s->contents = foo;
+
+ return true;
+}
+
+boolean
+ppc_process_before_allocation (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ asection *sec;
+ 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. */
+
+ _bfd_coff_get_external_symbols(abfd);
+
+ /* rummage around all the relocs and map the toc */
+ sec = abfd->sections;
+
+ if (sec == 0)
+ {
+ return true;
+ }
+
+ for (; sec != 0; sec = sec->next)
+ {
+ 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();
+
+ for (rel=i;rel<i+sec->reloc_count;++rel)
+ {
+ unsigned short r_type = EXTRACT_TYPE (rel->r_type);
+ unsigned short r_flags = EXTRACT_FLAGS(rel->r_type);
+ boolean ok = true;
+
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
+
+ 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,
+ rel->r_symndx, default_toc);
+ if (!ok)
+ return false;
+ break;
+ case IMAGE_REL_PPC_IMGLUE:
+ ppc_mark_symbol_as_glue(abfd, rel->r_symndx, rel);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ return true;
+}
+
+#endif
+
+
+static bfd_reloc_status_type
+ppc_refhi_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ 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;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ UN_IMPL("REFHI");
+ DUMP_RELOC("REFHI",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ return bfd_reloc_undefined;
+}
+
+#if 0
+
+static bfd_reloc_status_type
+ppc_reflo_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ UN_IMPL("REFLO");
+ DUMP_RELOC("REFLO",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ return bfd_reloc_undefined;
+}
+
+#endif
+
+static bfd_reloc_status_type
+ppc_pair_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ 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;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ UN_IMPL("PAIR");
+ DUMP_RELOC("PAIR",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ return bfd_reloc_undefined;
+}
+
+
+static bfd_reloc_status_type
+ppc_toc16_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ 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;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ UN_IMPL("TOCREL16");
+ DUMP_RELOC("TOCREL16",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ {
+ return bfd_reloc_continue;
+ }
+
+ return bfd_reloc_ok;
+}
+
+#if 0
+
+/* 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) */
+/* */
+/* */
+
+static bfd_reloc_status_type
+ppc_addr32nb_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ UN_IMPL("ADDR32NB");
+ DUMP_RELOC("ADDR32NB",reloc_entry);
+
+ return bfd_reloc_ok;
+}
+
+#endif
+
+static bfd_reloc_status_type
+ppc_secrel_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ 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;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ UN_IMPL("SECREL");
+ DUMP_RELOC("SECREL",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+ppc_section_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ 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;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ UN_IMPL("SECTION");
+ DUMP_RELOC("SECTION",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+ppc_imglue_reloc (abfd,
+ reloc_entry,
+ symbol,
+ data,
+ input_section,
+ output_bfd,
+ 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;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ UN_IMPL("IMGLUE");
+ DUMP_RELOC("IMGLUE",reloc_entry);
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ return bfd_reloc_ok;
+}
+
+
+
+#define MAX_RELOC_INDEX \
+ (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
+ type field. Not yet implemented.
+*/
+static void ppc_coff_rtype2howto PARAMS ((arelent *relent,
+ struct internal_reloc *internal));
+
+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:
+ 1. IMAGE_REL_PPC_NEG - indicates the value field is a subtraction
+ value, rather than an addition value
+ 2. IMAGE_REL_PPC_BRTAKEN, IMAGE_REL_PPC_BRNTAKEN - indicates that
+ the branch is expected to be taken or not.
+ 3. IMAGE_REL_PPC_TOCDEFN - toc slot definition in the file
+ For now, we just strip this stuff to find the type, and ignore it other
+ than that.
+ */
+ reloc_howto_type *howto;
+ unsigned short r_type = EXTRACT_TYPE (internal->r_type);
+ 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();
+
+ /* check for absolute crap */
+ if ( junk != 0 )
+ abort();
+
+ switch(r_type)
+ {
+ case IMAGE_REL_PPC_ADDR16:
+ case IMAGE_REL_PPC_REL24:
+ case IMAGE_REL_PPC_ADDR24:
+ case IMAGE_REL_PPC_ADDR32:
+ case IMAGE_REL_PPC_IFGLUE:
+ case IMAGE_REL_PPC_ADDR32NB:
+ case IMAGE_REL_PPC_SECTION:
+ case IMAGE_REL_PPC_SECREL:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, internal);
+ howto = ppc_coff_howto_table + r_type;
+ break;
+ case IMAGE_REL_PPC_IMGLUE:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, internal);
+ howto = ppc_coff_howto_table + r_type;
+ break;
+ case IMAGE_REL_PPC_TOCREL16:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, internal);
+ if (r_flags & IMAGE_REL_PPC_TOCDEFN)
+ howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16_DEFN;
+ else
+ howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16;
+ break;
+ default:
+ 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;
+ }
+
+ relent->howto = howto;
+
+}
+
+static reloc_howto_type *
+coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ struct internal_reloc *rel;
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
+ struct internal_syment *sym ATTRIBUTE_UNUSED;
+ bfd_vma *addendp;
+{
+ reloc_howto_type *howto;
+
+ /* We can encode one of three things in the type field, aside from the
+ type:
+ 1. IMAGE_REL_PPC_NEG - indicates the value field is a subtraction
+ value, rather than an addition value
+ 2. IMAGE_REL_PPC_BRTAKEN, IMAGE_REL_PPC_BRNTAKEN - indicates that
+ the branch is expected to be taken or not.
+ 3. IMAGE_REL_PPC_TOCDEFN - toc slot definition in the file
+ For now, we just strip this stuff to find the type, and ignore it other
+ than that.
+ */
+
+ unsigned short r_type = EXTRACT_TYPE (rel->r_type);
+ 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();
+
+ /* check for absolute crap */
+ if ( junk != 0 )
+ abort();
+
+ switch(r_type)
+ {
+ case IMAGE_REL_PPC_ADDR32NB:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
+ *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
+ howto = ppc_coff_howto_table + r_type;
+ break;
+ case IMAGE_REL_PPC_TOCREL16:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
+ if (r_flags & IMAGE_REL_PPC_TOCDEFN)
+ howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16_DEFN;
+ else
+ howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16;
+ break;
+ case IMAGE_REL_PPC_ADDR16:
+ case IMAGE_REL_PPC_REL24:
+ case IMAGE_REL_PPC_ADDR24:
+ case IMAGE_REL_PPC_ADDR32:
+ case IMAGE_REL_PPC_IFGLUE:
+ case IMAGE_REL_PPC_SECTION:
+ case IMAGE_REL_PPC_SECREL:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
+ howto = ppc_coff_howto_table + r_type;
+ break;
+ case IMAGE_REL_PPC_IMGLUE:
+ DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
+ howto = ppc_coff_howto_table + r_type;
+ break;
+ default:
+ 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]
+
+static reloc_howto_type *ppc_coff_reloc_type_lookup
+PARAMS ((bfd *, bfd_reloc_code_real_type));
+
+static reloc_howto_type *
+ppc_coff_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ switch (code)
+ {
+ HOW2MAP(BFD_RELOC_32_GOTOFF, IMAGE_REL_PPC_IMGLUE);
+ HOW2MAP(BFD_RELOC_16_GOT_PCREL, IMAGE_REL_PPC_IFGLUE);
+ HOW2MAP(BFD_RELOC_16, IMAGE_REL_PPC_ADDR16);
+ HOW2MAP(BFD_RELOC_PPC_B26, IMAGE_REL_PPC_REL24);
+ HOW2MAP(BFD_RELOC_PPC_BA26, IMAGE_REL_PPC_ADDR24);
+ HOW2MAP(BFD_RELOC_PPC_TOC16, IMAGE_REL_PPC_TOCREL16);
+ 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:
+ return NULL;
+ }
+ /*NOTREACHED*/
+}
+
+#undef HOW2MAP
+
+
+/* Tailor coffcode.h -- macro heaven. */
+
+#define RTYPE2HOWTO(cache_ptr, dst) ppc_coff_rtype2howto (cache_ptr, dst)
+
+#ifndef COFF_IMAGE_WITH_PE
+static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
+#endif
+
+/* We use the special COFF backend linker, with our own special touch. */
+
+#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
+
+#ifndef COFF_IMAGE_WITH_PE
+/* FIXME: This no longer works. */
+#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook
+#endif
+
+#define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
+
+#define COFF_PAGE_SIZE 0x1000
+
+/* FIXME: This controls some code that used to be in peicode.h and is
+ now in peigen.c. It will not control the code in peigen.c. If
+ anybody wants to get this working, you will need to fix that. */
+#define POWERPC_LE_PE
+
+#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".idata$2"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".idata$3"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".idata$4"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".idata$5"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".idata$6"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 1 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".reloc"), \
+ 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
+ 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
+ at least two problems with this approach:
+ 1. We allocate whole bunches of toc sections that are ignored, but at
+ at least we will not allocate a toc if no .toc is present.
+ 2. It's not clear to me that being the last bfd read necessarily means
+ that you are the last bfd closed.
+ 3. Doing it on a "swap in" hook depends on when the "swap in" is called,
+ and how often, etc. It's not clear to me that there isn't a hole here.
+*/
+
+static void
+ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
+ bfd *abfd;
+ PTR ext1 ATTRIBUTE_UNUSED;
+ PTR in1;
+{
+ struct internal_syment *in = (struct internal_syment *)in1;
+
+ if (bfd_of_toc_owner != 0) /* we already have a toc, so go home */
+ return;
+
+ if (strcmp(in->_n._n_name, ".toc") == 0)
+ {
+ flagword flags;
+ register asection *s;
+
+ s = bfd_get_section_by_name ( abfd , TOC_SECTION_NAME);
+ if (s != NULL)
+ {
+ return;
+ }
+
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY ;
+
+ s = bfd_make_section (abfd, TOC_SECTION_NAME);
+
+ if (s == NULL
+ || !bfd_set_section_flags (abfd, s, flags)
+ || !bfd_set_section_alignment (abfd, s, 2))
+ {
+ /* FIXME: set appropriate bfd error */
+ abort();
+ }
+
+ /* save the bfd for later allocation */
+ bfd_of_toc_owner = abfd;
+ }
+
+ return;
+}
+#endif
+
+#ifndef COFF_IMAGE_WITH_PE
+
+static boolean ppc_do_last PARAMS ((bfd *));
+static bfd *ppc_get_last PARAMS ((void));
+
+static boolean
+ppc_do_last (abfd)
+ bfd *abfd;
+{
+ if (abfd == bfd_of_toc_owner)
+ return true;
+ else
+ return false;
+}
+
+static bfd *
+ppc_get_last()
+{
+ return bfd_of_toc_owner;
+}
+
+/* this piece of machinery exists only to guarantee that the bfd that holds
+ 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.
+
+ 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
+ppc_bfd_coff_final_link (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ bfd_size_type symesz;
+ struct coff_final_link_info finfo;
+ boolean debug_merge_allocated;
+ asection *o;
+ struct bfd_link_order *p;
+ size_t max_sym_count;
+ size_t max_lineno_count;
+ size_t max_reloc_count;
+ size_t max_output_reloc_count;
+ size_t max_contents_size;
+ file_ptr rel_filepos;
+ unsigned int relsz;
+ file_ptr line_filepos;
+ unsigned int linesz;
+ bfd *sub;
+ bfd_byte *external_relocs = NULL;
+ char strbuf[STRING_SIZE_SIZE];
+
+ symesz = bfd_coff_symesz (abfd);
+
+ finfo.info = info;
+ finfo.output_bfd = abfd;
+ finfo.strtab = NULL;
+ finfo.section_info = NULL;
+ finfo.last_file_index = -1;
+ finfo.last_bf_index = -1;
+ finfo.internal_syms = NULL;
+ finfo.sec_ptrs = NULL;
+ finfo.sym_indices = NULL;
+ finfo.outsyms = NULL;
+ finfo.linenos = NULL;
+ finfo.contents = NULL;
+ finfo.external_relocs = NULL;
+ finfo.internal_relocs = NULL;
+ debug_merge_allocated = false;
+
+ coff_data (abfd)->link_info = info;
+
+ finfo.strtab = _bfd_stringtab_init ();
+ if (finfo.strtab == NULL)
+ goto error_return;
+
+ if (! coff_debug_merge_hash_table_init (&finfo.debug_merge))
+ goto error_return;
+ debug_merge_allocated = true;
+
+ /* Compute the file positions for all the sections. */
+ if (! abfd->output_has_begun)
+ {
+ if (! bfd_coff_compute_section_file_positions (abfd))
+ return false;
+ }
+
+ /* Count the line numbers and relocation entries required for the
+ output file. Set the file positions for the relocs. */
+ rel_filepos = obj_relocbase (abfd);
+ relsz = bfd_coff_relsz (abfd);
+ max_contents_size = 0;
+ max_lineno_count = 0;
+ max_reloc_count = 0;
+
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ o->reloc_count = 0;
+ o->lineno_count = 0;
+ for (p = o->link_order_head; p != NULL; p = p->next)
+ {
+
+ if (p->type == bfd_indirect_link_order)
+ {
+ asection *sec;
+
+ sec = p->u.indirect.section;
+
+ /* Mark all sections which are to be included in the
+ link. This will normally be every section. We need
+ to do this so that we can identify any sections which
+ the linker has decided to not include. */
+ sec->linker_mark = true;
+
+ if (info->strip == strip_none
+ || info->strip == strip_some)
+ o->lineno_count += sec->lineno_count;
+
+ if (info->relocateable)
+ o->reloc_count += sec->reloc_count;
+
+ if (sec->_raw_size > max_contents_size)
+ max_contents_size = sec->_raw_size;
+ if (sec->lineno_count > max_lineno_count)
+ max_lineno_count = sec->lineno_count;
+ if (sec->reloc_count > max_reloc_count)
+ max_reloc_count = sec->reloc_count;
+ }
+ else if (info->relocateable
+ && (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order))
+ ++o->reloc_count;
+ }
+ if (o->reloc_count == 0)
+ o->rel_filepos = 0;
+ else
+ {
+ o->flags |= SEC_RELOC;
+ o->rel_filepos = rel_filepos;
+ rel_filepos += o->reloc_count * relsz;
+ }
+ }
+
+ /* If doing a relocateable link, allocate space for the pointers we
+ need to keep. */
+ if (info->relocateable)
+ {
+ unsigned int i;
+
+ /* We use section_count + 1, rather than section_count, because
+ the target_index fields are 1 based. */
+ finfo.section_info =
+ ((struct coff_link_section_info *)
+ bfd_malloc ((abfd->section_count + 1)
+ * sizeof (struct coff_link_section_info)));
+ if (finfo.section_info == NULL)
+ goto error_return;
+ for (i = 0; i <= abfd->section_count; i++)
+ {
+ finfo.section_info[i].relocs = NULL;
+ finfo.section_info[i].rel_hashes = NULL;
+ }
+ }
+
+ /* We now know the size of the relocs, so we can determine the file
+ positions of the line numbers. */
+ line_filepos = rel_filepos;
+ linesz = bfd_coff_linesz (abfd);
+ max_output_reloc_count = 0;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (o->lineno_count == 0)
+ o->line_filepos = 0;
+ else
+ {
+ o->line_filepos = line_filepos;
+ line_filepos += o->lineno_count * linesz;
+ }
+
+ if (o->reloc_count != 0)
+ {
+ /* We don't know the indices of global symbols until we have
+ written out all the local symbols. For each section in
+ the output file, we keep an array of pointers to hash
+ table entries. Each entry in the array corresponds to a
+ reloc. When we find a reloc against a global symbol, we
+ set the corresponding entry in this array so that we can
+ fix up the symbol index after we have written out all the
+ local symbols.
+
+ Because of this problem, we also keep the relocs in
+ memory until the end of the link. This wastes memory,
+ but only when doing a relocateable link, which is not the
+ common case. */
+ BFD_ASSERT (info->relocateable);
+ finfo.section_info[o->target_index].relocs =
+ ((struct internal_reloc *)
+ bfd_malloc (o->reloc_count * sizeof (struct internal_reloc)));
+ finfo.section_info[o->target_index].rel_hashes =
+ ((struct coff_link_hash_entry **)
+ bfd_malloc (o->reloc_count
+ * sizeof (struct coff_link_hash_entry *)));
+ if (finfo.section_info[o->target_index].relocs == NULL
+ || finfo.section_info[o->target_index].rel_hashes == NULL)
+ goto error_return;
+
+ if (o->reloc_count > max_output_reloc_count)
+ max_output_reloc_count = o->reloc_count;
+ }
+
+ /* Reset the reloc and lineno counts, so that we can use them to
+ count the number of entries we have output so far. */
+ o->reloc_count = 0;
+ o->lineno_count = 0;
+ }
+
+ obj_sym_filepos (abfd) = line_filepos;
+
+ /* Figure out the largest number of symbols in an input BFD. Take
+ the opportunity to clear the output_has_begun fields of all the
+ input BFD's. */
+ max_sym_count = 0;
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ size_t sz;
+
+ sub->output_has_begun = false;
+ sz = obj_raw_syment_count (sub);
+ if (sz > max_sym_count)
+ max_sym_count = sz;
+ }
+
+ /* Allocate some buffers used while linking. */
+ finfo.internal_syms = ((struct internal_syment *)
+ bfd_malloc (max_sym_count
+ * sizeof (struct internal_syment)));
+ finfo.sec_ptrs = (asection **) bfd_malloc (max_sym_count
+ * sizeof (asection *));
+ finfo.sym_indices = (long *) bfd_malloc (max_sym_count * sizeof (long));
+ finfo.outsyms = ((bfd_byte *)
+ bfd_malloc ((size_t) ((max_sym_count + 1) * symesz)));
+ finfo.linenos = (bfd_byte *) bfd_malloc (max_lineno_count
+ * bfd_coff_linesz (abfd));
+ finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
+ finfo.external_relocs = (bfd_byte *) bfd_malloc (max_reloc_count * relsz);
+ if (! info->relocateable)
+ finfo.internal_relocs = ((struct internal_reloc *)
+ bfd_malloc (max_reloc_count
+ * sizeof (struct internal_reloc)));
+ if ((finfo.internal_syms == NULL && max_sym_count > 0)
+ || (finfo.sec_ptrs == NULL && max_sym_count > 0)
+ || (finfo.sym_indices == NULL && max_sym_count > 0)
+ || finfo.outsyms == NULL
+ || (finfo.linenos == NULL && max_lineno_count > 0)
+ || (finfo.contents == NULL && max_contents_size > 0)
+ || (finfo.external_relocs == NULL && max_reloc_count > 0)
+ || (! info->relocateable
+ && finfo.internal_relocs == NULL
+ && max_reloc_count > 0))
+ goto error_return;
+
+ /* We now know the position of everything in the file, except that
+ we don't know the size of the symbol table and therefore we don't
+ know where the string table starts. We just build the string
+ table in memory as we go along. We process all the relocations
+ for a single input file at once. */
+ obj_raw_syment_count (abfd) = 0;
+
+ if (coff_backend_info (abfd)->_bfd_coff_start_final_link)
+ {
+ if (! bfd_coff_start_final_link (abfd, info))
+ goto error_return;
+ }
+
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ 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))
+ {
+ sub = p->u.indirect.section->owner;
+#ifdef POWERPC_LE_PE
+ if (! sub->output_has_begun && !ppc_do_last(sub))
+#else
+ if (! sub->output_has_begun)
+#endif
+ {
+ if (! _bfd_coff_link_input_bfd (&finfo, sub))
+ goto error_return;
+ sub->output_has_begun = true;
+ }
+ }
+ else if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ {
+ if (! _bfd_coff_reloc_link_order (abfd, &finfo, o, p))
+ goto error_return;
+ }
+ else
+ {
+ if (! _bfd_default_link_order (abfd, info, o, p))
+ goto error_return;
+ }
+ }
+ }
+
+#ifdef POWERPC_LE_PE
+ {
+ bfd* last_one = ppc_get_last();
+ if (last_one)
+ {
+ if (! _bfd_coff_link_input_bfd (&finfo, last_one))
+ goto error_return;
+ }
+ last_one->output_has_begun = true;
+ }
+#endif
+
+ /* Free up the buffers used by _bfd_coff_link_input_bfd. */
+
+ coff_debug_merge_hash_table_free (&finfo.debug_merge);
+ debug_merge_allocated = false;
+
+ if (finfo.internal_syms != NULL)
+ {
+ free (finfo.internal_syms);
+ finfo.internal_syms = NULL;
+ }
+ if (finfo.sec_ptrs != NULL)
+ {
+ free (finfo.sec_ptrs);
+ finfo.sec_ptrs = NULL;
+ }
+ if (finfo.sym_indices != NULL)
+ {
+ free (finfo.sym_indices);
+ finfo.sym_indices = NULL;
+ }
+ if (finfo.linenos != NULL)
+ {
+ free (finfo.linenos);
+ finfo.linenos = NULL;
+ }
+ if (finfo.contents != NULL)
+ {
+ free (finfo.contents);
+ finfo.contents = NULL;
+ }
+ if (finfo.external_relocs != NULL)
+ {
+ free (finfo.external_relocs);
+ finfo.external_relocs = NULL;
+ }
+ if (finfo.internal_relocs != NULL)
+ {
+ free (finfo.internal_relocs);
+ finfo.internal_relocs = NULL;
+ }
+
+ /* The value of the last C_FILE symbol is supposed to be the symbol
+ index of the first external symbol. Write it out again if
+ necessary. */
+ if (finfo.last_file_index != -1
+ && (unsigned int) finfo.last_file.n_value != obj_raw_syment_count (abfd))
+ {
+ finfo.last_file.n_value = obj_raw_syment_count (abfd);
+ bfd_coff_swap_sym_out (abfd, (PTR) &finfo.last_file,
+ (PTR) finfo.outsyms);
+ if (bfd_seek (abfd,
+ (obj_sym_filepos (abfd)
+ + finfo.last_file_index * symesz),
+ SEEK_SET) != 0
+ || bfd_write (finfo.outsyms, symesz, 1, abfd) != symesz)
+ return false;
+ }
+
+ /* Write out the global symbols. */
+ finfo.failed = false;
+ coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
+ (PTR) &finfo);
+ if (finfo.failed)
+ goto error_return;
+
+ /* The outsyms buffer is used by _bfd_coff_write_global_sym. */
+ if (finfo.outsyms != NULL)
+ {
+ free (finfo.outsyms);
+ finfo.outsyms = NULL;
+ }
+
+ if (info->relocateable)
+ {
+ /* Now that we have written out all the global symbols, we know
+ the symbol indices to use for relocs against them, and we can
+ finally write out the relocs. */
+ external_relocs = ((bfd_byte *)
+ bfd_malloc (max_output_reloc_count * relsz));
+ if (external_relocs == NULL)
+ goto error_return;
+
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ struct internal_reloc *irel;
+ struct internal_reloc *irelend;
+ struct coff_link_hash_entry **rel_hash;
+ bfd_byte *erel;
+
+ if (o->reloc_count == 0)
+ continue;
+
+ irel = finfo.section_info[o->target_index].relocs;
+ irelend = irel + o->reloc_count;
+ rel_hash = finfo.section_info[o->target_index].rel_hashes;
+ erel = external_relocs;
+ for (; irel < irelend; irel++, rel_hash++, erel += relsz)
+ {
+ if (*rel_hash != NULL)
+ {
+ BFD_ASSERT ((*rel_hash)->indx >= 0);
+ irel->r_symndx = (*rel_hash)->indx;
+ }
+ bfd_coff_swap_reloc_out (abfd, (PTR) irel, (PTR) erel);
+ }
+
+ if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
+ || bfd_write ((PTR) external_relocs, relsz, o->reloc_count,
+ abfd) != relsz * o->reloc_count)
+ goto error_return;
+ }
+
+ free (external_relocs);
+ external_relocs = NULL;
+ }
+
+ /* Free up the section information. */
+ if (finfo.section_info != NULL)
+ {
+ unsigned int i;
+
+ for (i = 0; i < abfd->section_count; i++)
+ {
+ if (finfo.section_info[i].relocs != NULL)
+ free (finfo.section_info[i].relocs);
+ if (finfo.section_info[i].rel_hashes != NULL)
+ free (finfo.section_info[i].rel_hashes);
+ }
+ free (finfo.section_info);
+ finfo.section_info = NULL;
+ }
+
+ /* If we have optimized stabs strings, output them. */
+ if (coff_hash_table (info)->stab_info != NULL)
+ {
+ if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
+ return false;
+ }
+
+ /* Write out the string table. */
+ if (obj_raw_syment_count (abfd) != 0)
+ {
+ if (bfd_seek (abfd,
+ (obj_sym_filepos (abfd)
+ + obj_raw_syment_count (abfd) * symesz),
+ SEEK_SET) != 0)
+ return false;
+
+#if STRING_SIZE_SIZE == 4
+ bfd_h_put_32 (abfd,
+ _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
+ (bfd_byte *) strbuf);
+#else
+ #error Change bfd_h_put_32
+#endif
+
+ if (bfd_write (strbuf, 1, STRING_SIZE_SIZE, abfd) != STRING_SIZE_SIZE)
+ return false;
+
+ if (! _bfd_stringtab_emit (abfd, finfo.strtab))
+ return false;
+ }
+
+ _bfd_stringtab_free (finfo.strtab);
+
+ /* Setting bfd_get_symcount to 0 will cause write_object_contents to
+ not try to write out the symbols. */
+ bfd_get_symcount (abfd) = 0;
+
+ return true;
+
+ error_return:
+ if (debug_merge_allocated)
+ coff_debug_merge_hash_table_free (&finfo.debug_merge);
+ if (finfo.strtab != NULL)
+ _bfd_stringtab_free (finfo.strtab);
+ if (finfo.section_info != NULL)
+ {
+ unsigned int i;
+
+ for (i = 0; i < abfd->section_count; i++)
+ {
+ if (finfo.section_info[i].relocs != NULL)
+ free (finfo.section_info[i].relocs);
+ if (finfo.section_info[i].rel_hashes != NULL)
+ free (finfo.section_info[i].rel_hashes);
+ }
+ free (finfo.section_info);
+ }
+ if (finfo.internal_syms != NULL)
+ free (finfo.internal_syms);
+ if (finfo.sec_ptrs != NULL)
+ free (finfo.sec_ptrs);
+ if (finfo.sym_indices != NULL)
+ free (finfo.sym_indices);
+ if (finfo.outsyms != NULL)
+ free (finfo.outsyms);
+ if (finfo.linenos != NULL)
+ free (finfo.linenos);
+ if (finfo.contents != NULL)
+ free (finfo.contents);
+ if (finfo.external_relocs != NULL)
+ free (finfo.external_relocs);
+ if (finfo.internal_relocs != NULL)
+ free (finfo.internal_relocs);
+ if (external_relocs != NULL)
+ free (external_relocs);
+ return false;
+}
+#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. */
+
+#ifdef TARGET_LITTLE_SYM
+const bfd_target TARGET_LITTLE_SYM =
+{
+ TARGET_LITTLE_NAME, /* name or coff-arm-little */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* data byte order is little */
+ BFD_ENDIAN_LITTLE, /* header byte order is little */
+
+ (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
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
+#endif
+
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen??? FIXMEmgo */
+
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* 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),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ /* Alternative_target. */
+#ifdef TARGET_BIG_SYM
+ & TARGET_BIG_SYM,
+#else
+ NULL,
+#endif
+
+ COFF_SWAP_TABLE
+};
+#endif
+
+#ifdef TARGET_BIG_SYM
+const bfd_target TARGET_BIG_SYM =
+{
+ TARGET_BIG_NAME,
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_BIG, /* header byte order is big */
+
+ (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
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
+#endif
+
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen??? FIXMEmgo */
+
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* 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),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ 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
+};
+
+#endif
diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c
new file mode 100644
index 0000000..5e919da
--- /dev/null
+++ b/contrib/binutils/bfd/coff-sparc.c
@@ -0,0 +1,214 @@
+/* BFD back-end for Sparc COFF files.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
+ Written by Cygnus Support.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "coff/sparc.h"
+#include "coff/internal.h"
+#include "libcoff.h"
+
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
+
+#define BADMAG(x) ((x).f_magic != SPARCMAGIC && (x).f_magic != LYNXCOFFMAGIC)
+
+/* The page size is a guess based on ELF. */
+#define COFF_PAGE_SIZE 0x10000
+
+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_WDISP30, R_SPARC_WDISP22,
+ R_SPARC_HI22, R_SPARC_22,
+ R_SPARC_13, R_SPARC_LO10,
+ R_SPARC_GOT10, R_SPARC_GOT13, R_SPARC_GOT22,
+ R_SPARC_PC10, R_SPARC_PC22,
+ R_SPARC_WPLT30,
+ R_SPARC_COPY,
+ R_SPARC_GLOB_DAT, R_SPARC_JMP_SLOT,
+ R_SPARC_RELATIVE,
+ R_SPARC_UA32,
+ R_SPARC_max
+ };
+
+#if 0
+static CONST char *CONST reloc_type_names[] =
+{
+ "R_SPARC_NONE",
+ "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",
+ "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22",
+ "R_SPARC_PC10", "R_SPARC_PC22",
+ "R_SPARC_WPLT30",
+ "R_SPARC_COPY",
+ "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT",
+ "R_SPARC_RELATIVE",
+ "R_SPARC_UA32",
+};
+#endif
+
+/* This is stolen pretty directly from elf.c. */
+static bfd_reloc_status_type
+bfd_coff_generic_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR,
+ asection *, bfd *, char **));
+
+static bfd_reloc_status_type
+bfd_coff_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ return bfd_reloc_continue;
+}
+
+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),
+ HOWTO(R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_16", false,0,0x0000ffff,true),
+ HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_32", false,0,0xffffffff,true),
+ HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP8", false,0,0x000000ff,true),
+ HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP16", false,0,0x0000ffff,true),
+ HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP32", false,0,0x00ffffff,true),
+ HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP30", false,0,0x3fffffff,true),
+ HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP22", false,0,0x003fffff,true),
+ HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_HI22", false,0,0x003fffff,true),
+ HOWTO(R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_22", false,0,0x003fffff,true),
+ HOWTO(R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_13", false,0,0x00001fff,true),
+ HOWTO(R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_LO10", false,0,0x000003ff,true),
+ HOWTO(R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT10", false,0,0x000003ff,true),
+ HOWTO(R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT13", false,0,0x00001fff,true),
+ HOWTO(R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT22", false,0,0x003fffff,true),
+ HOWTO(R_SPARC_PC10, 0,2,10,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC10", false,0,0x000003ff,true),
+ HOWTO(R_SPARC_PC22, 0,2,22,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC22", false,0,0x003fffff,true),
+ HOWTO(R_SPARC_WPLT30, 0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_WPLT30", false,0,0x00000000,true),
+ HOWTO(R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_COPY", false,0,0x00000000,true),
+ HOWTO(R_SPARC_GLOB_DAT,0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_GLOB_DAT",false,0,0x00000000,true),
+ HOWTO(R_SPARC_JMP_SLOT,0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_JMP_SLOT",false,0,0x00000000,true),
+ HOWTO(R_SPARC_RELATIVE,0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_RELATIVE",false,0,0x00000000,true),
+ HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_UA32", false,0,0x00000000,true),
+};
+
+struct coff_reloc_map {
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned char coff_reloc_val;
+};
+
+static CONST struct coff_reloc_map sparc_reloc_map[] =
+{
+ { BFD_RELOC_NONE, R_SPARC_NONE, },
+ { BFD_RELOC_16, R_SPARC_16, },
+ { BFD_RELOC_8, R_SPARC_8 },
+ { BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
+ { BFD_RELOC_CTOR, R_SPARC_32 }, /* @@ Assumes 32 bits. */
+ { BFD_RELOC_32, R_SPARC_32 },
+ { BFD_RELOC_32_PCREL, R_SPARC_DISP32 },
+ { BFD_RELOC_HI22, R_SPARC_HI22 },
+ { BFD_RELOC_LO10, R_SPARC_LO10, },
+ { BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
+ { BFD_RELOC_SPARC22, R_SPARC_22 },
+ { BFD_RELOC_SPARC13, R_SPARC_13 },
+ { BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
+ { BFD_RELOC_SPARC_GOT13, R_SPARC_GOT13 },
+ { BFD_RELOC_SPARC_GOT22, R_SPARC_GOT22 },
+ { BFD_RELOC_SPARC_PC10, R_SPARC_PC10 },
+ { BFD_RELOC_SPARC_PC22, R_SPARC_PC22 },
+ { BFD_RELOC_SPARC_WPLT30, R_SPARC_WPLT30 },
+ { BFD_RELOC_SPARC_COPY, R_SPARC_COPY },
+ { BFD_RELOC_SPARC_GLOB_DAT, R_SPARC_GLOB_DAT },
+ { BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
+ { BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
+ { BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
+ /* { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */
+};
+
+static reloc_howto_type *
+coff_sparc_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int i;
+ for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct coff_reloc_map); i++)
+ {
+ if (sparc_reloc_map[i].bfd_reloc_val == code)
+ return &coff_sparc_howto_table[(int) sparc_reloc_map[i].coff_reloc_val];
+ }
+ return 0;
+}
+#define coff_bfd_reloc_type_lookup coff_sparc_reloc_type_lookup
+
+static void
+rtype2howto (cache_ptr, dst)
+ arelent *cache_ptr;
+ struct internal_reloc *dst;
+{
+ BFD_ASSERT (dst->r_type < (unsigned int) R_SPARC_max);
+ cache_ptr->howto = &coff_sparc_howto_table[dst->r_type];
+}
+
+#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
+
+#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
+#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
+#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
+ cache_ptr->addend = reloc.r_offset;
+
+/* Clear the r_spare field in relocs. */
+#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
+ do { \
+ dst->r_spare[0] = 0; \
+ dst->r_spare[1] = 0; \
+ } while (0)
+
+#define __A_MAGIC_SET__
+
+/* Enable Sparc-specific hacks in coffcode.h. */
+
+#define COFF_SPARC
+
+#include "coffcode.h"
+
+#ifndef TARGET_SYM
+#define TARGET_SYM sparccoff_vec
+#endif
+
+#ifndef TARGET_NAME
+#define TARGET_NAME "coff-sparc"
+#endif
+
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL)
diff --git a/contrib/binutils/bfd/coff-tic30.c b/contrib/binutils/bfd/coff-tic30.c
index 3ff8c59..a971f76 100644
--- a/contrib/binutils/bfd/coff-tic30.c
+++ b/contrib/binutils/bfd/coff-tic30.c
@@ -1,5 +1,5 @@
/* BFD back-end for TMS320C30 coff binaries.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of BFD, the Binary File Descriptor library.
@@ -41,7 +41,7 @@ reloc_howto_type tic30_coff_howto_table[] =
"32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
"PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
- {-1}
+ EMPTY_HOWTO (-1)
};
#ifndef coff_bfd_reloc_type_lookup
@@ -52,7 +52,7 @@ reloc_howto_type tic30_coff_howto_table[] =
and coff implementations. */
reloc_howto_type *
tic30_coff_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
switch (code)
@@ -202,5 +202,7 @@ const bfd_target tic30_coff_vec =
BFD_JUMP_TABLE_LINK (coff),
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 04049e8..21f29a8 100644
--- a/contrib/binutils/bfd/coff-z8k.c
+++ b/contrib/binutils/bfd/coff-z8k.c
@@ -237,44 +237,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-const bfd_target z8kcoff_vec =
-{
- "coff-z8k", /* name */
- bfd_target_coff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
-
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {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),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- COFF_SWAP_TABLE,
-};
+CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL)
diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h
index f0514c4..8193a21 100644
--- a/contrib/binutils/bfd/coffcode.h
+++ b/contrib/binutils/bfd/coffcode.h
@@ -1,5 +1,5 @@
/* Support for the generic parts of most COFF variants, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -131,7 +131,7 @@ SUBSUBSECTION
moment. To port BFD, that person will have to add more @code{#defines}.
Three of the bit twiddling routines are exported to
@code{gdb}; @code{coff_swap_aux_in}, @code{coff_swap_sym_in}
- and @code{coff_swap_linno_in}. @code{GDB} reads the symbol
+ and @code{coff_swap_lineno_in}. @code{GDB} reads the symbol
table on its own, but uses BFD to fix things up. More of the
bit twiddlers are exported for @code{gas};
@code{coff_swap_aux_out}, @code{coff_swap_sym_out},
@@ -313,8 +313,12 @@ CODE_FRAGMENT
#define STRING_SIZE_SIZE (4)
static long sec_to_styp_flags PARAMS ((const char *, flagword));
-static flagword styp_to_sec_flags PARAMS ((bfd *, PTR, const char *));
+static flagword styp_to_sec_flags
+ PARAMS ((bfd *, PTR, const char *, asection *));
static boolean coff_bad_format_hook PARAMS ((bfd *, PTR));
+static void coff_set_custom_section_alignment
+ PARAMS ((bfd *, asection *, const struct coff_section_alignment_entry *,
+ const unsigned int));
static boolean coff_new_section_hook PARAMS ((bfd *, asection *));
static boolean coff_set_arch_mach_hook PARAMS ((bfd *, PTR));
static boolean coff_write_relocs PARAMS ((bfd *, int));
@@ -329,6 +333,8 @@ static boolean coff_set_section_contents
static PTR buy_and_read PARAMS ((bfd *, file_ptr, int, size_t));
static boolean coff_slurp_line_table PARAMS ((bfd *, asection *));
static boolean coff_slurp_symbol_table PARAMS ((bfd *));
+static enum coff_symbol_classification coff_classify_symbol
+ PARAMS ((bfd *, struct internal_syment *));
static boolean coff_slurp_reloc_table PARAMS ((bfd *, asection *, asymbol **));
static long coff_canonicalize_reloc
PARAMS ((bfd *, asection *, arelent **, asymbol **));
@@ -338,12 +344,13 @@ static PTR coff_mkobject_hook PARAMS ((bfd *, PTR, PTR));
/* void warning(); */
-/*
- * Return a word with STYP_* (scnhdr.s_flags) flags set to represent the
- * incoming SEC_* flags. The inverse of this function is styp_to_sec_flags().
- * NOTE: If you add to/change this routine, you should mirror the changes
- * in styp_to_sec_flags().
- */
+/* Return a word with STYP_* (scnhdr.s_flags) flags set to represent
+ the incoming SEC_* flags. The inverse of this function is
+ styp_to_sec_flags(). NOTE: If you add to/change this routine, you
+ should probably mirror the changes in styp_to_sec_flags(). */
+
+#ifndef COFF_WITH_PE
+
static long
sec_to_styp_flags (sec_name, sec_flags)
CONST char *sec_name;
@@ -393,12 +400,6 @@ sec_to_styp_flags (sec_name, sec_flags)
{
styp_flags = STYP_INFO;
}
-#ifdef COFF_WITH_PE
- else if (!strcmp (sec_name, ".edata"))
- {
- styp_flags = STYP_DATA;
- }
-#endif
#ifdef RS6000COFF_C
else if (!strcmp (sec_name, _PAD))
{
@@ -440,25 +441,93 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags |= STYP_NOLOAD;
#endif
-#ifdef COFF_WITH_PE
- if (sec_flags & SEC_LINK_ONCE)
- styp_flags |= IMAGE_SCN_LNK_COMDAT;
-#endif
+ return styp_flags;
+}
+
+#else /* COFF_WITH_PE */
+
+/* The PE version; see above for the general comments. The non-PE
+ case seems to be more guessing, and breaks PE format; specifically,
+ .rdata is readonly, but it sure ain't text. Really, all this
+ should be set up properly in gas (or whatever assembler is in use),
+ and honor whatever objcopy/strip, etc. sent us as input. */
+
+static long
+sec_to_styp_flags (sec_name, sec_flags)
+ const char *sec_name ATTRIBUTE_UNUSED;
+ flagword sec_flags;
+{
+ long styp_flags = 0;
- return (styp_flags);
+ /* caution: there are at least three groups of symbols that have
+ very similar bits and meanings: IMAGE_SCN*, SEC_*, and STYP_*.
+ SEC_* are the BFD internal flags, used for generic BFD
+ information. STYP_* are the COFF section flags which appear in
+ COFF files. IMAGE_SCN_* are the PE section flags which appear in
+ PE files. The STYP_* flags and the IMAGE_SCN_* flags overlap,
+ but there are more IMAGE_SCN_* flags. */
+
+ /* skip LOAD */
+ /* READONLY later */
+ /* skip RELOC */
+ if ((sec_flags & SEC_CODE) != 0)
+ styp_flags |= IMAGE_SCN_CNT_CODE;
+ if ((sec_flags & SEC_DATA) != 0)
+ styp_flags |= IMAGE_SCN_CNT_INITIALIZED_DATA;
+ if ((sec_flags & SEC_ALLOC) != 0 && (sec_flags & SEC_LOAD) == 0)
+ styp_flags |= IMAGE_SCN_CNT_UNINITIALIZED_DATA; /* ==STYP_BSS */
+ /* skip ROM */
+ /* skip CONSTRUCTOR */
+ /* skip CONTENTS */
+#ifdef STYP_NOLOAD
+ if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
+ styp_flags |= STYP_NOLOAD;
+#endif
+ if ((sec_flags & SEC_IS_COMMON) != 0)
+ styp_flags |= IMAGE_SCN_LNK_COMDAT;
+ if ((sec_flags & SEC_DEBUGGING) != 0)
+ styp_flags |= IMAGE_SCN_MEM_DISCARDABLE;
+ if ((sec_flags & SEC_EXCLUDE) != 0)
+ styp_flags |= IMAGE_SCN_LNK_REMOVE;
+ if ((sec_flags & SEC_NEVER_LOAD) != 0)
+ styp_flags |= IMAGE_SCN_LNK_REMOVE;
+ /* skip IN_MEMORY */
+ /* skip SORT */
+ if (sec_flags & SEC_LINK_ONCE)
+ styp_flags |= IMAGE_SCN_LNK_COMDAT;
+ /* skip LINK_DUPLICATES */
+ /* skip LINKER_CREATED */
+
+ /* For now, the read/write bits are mapped onto SEC_READONLY, even
+ though the semantics don't quite match. The bits from the input
+ are retained in pei_section_data(abfd, section)->pe_flags */
+
+ styp_flags |= IMAGE_SCN_MEM_READ; /* always readable. */
+ if ((sec_flags & SEC_READONLY) == 0)
+ styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write */
+ if (sec_flags & SEC_CODE)
+ styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE */
+ if (sec_flags & SEC_SHARED)
+ styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful */
+
+ return styp_flags;
}
-/*
- * Return a word with SEC_* flags set to represent the incoming
- * STYP_* flags (from scnhdr.s_flags). The inverse of this
- * function is sec_to_styp_flags().
- * NOTE: If you add to/change this routine, you should mirror the changes
- * in sec_to_styp_flags().
- */
+
+#endif /* COFF_WITH_PE */
+
+/* Return a word with SEC_* flags set to represent the incoming STYP_*
+ flags (from scnhdr.s_flags). The inverse of this function is
+ sec_to_styp_flags(). NOTE: If you add to/change this routine, you
+ should probably mirror the changes in sec_to_styp_flags(). */
+
+#ifndef COFF_WITH_PE
+
static flagword
-styp_to_sec_flags (abfd, hdr, name)
- bfd *abfd;
+styp_to_sec_flags (abfd, hdr, name, section)
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR hdr;
const char *name;
+ asection *section ATTRIBUTE_UNUSED;
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
@@ -573,10 +642,99 @@ styp_to_sec_flags (abfd, hdr, name)
}
#endif /* STYP_SDATA */
-#ifdef COFF_WITH_PE
+#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
+ /* 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
+ g++. g++ will emit each template expansion in its own section.
+ The symbols will be defined as weak, so that multiple definitions
+ are permitted. The GNU linker extension is to actually discard
+ all but one of the sections. */
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+#endif
+
+ return sec_flags;
+}
+
+#else /* COFF_WITH_PE */
+
+/* The PE version; see above for the general comments.
+
+ Since to set the SEC_LINK_ONCE and associated flags, we have to
+ look at the symbol table anyway, we return the symbol table index
+ of the symbol being used as the COMDAT symbol. This is admittedly
+ ugly, but there's really nowhere else that we have access to the
+ required information. FIXME: Is the COMDAT symbol index used for
+ any purpose other than objdump? */
+
+static flagword
+styp_to_sec_flags (abfd, hdr, name, section)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR hdr;
+ const char *name;
+ asection *section;
+{
+ struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
+ long styp_flags = internal_s->s_flags;
+ flagword sec_flags = 0;
+
+ if (styp_flags & STYP_DSECT)
+ abort (); /* Don't know what to do */
+#ifdef SEC_NEVER_LOAD
+ if (styp_flags & STYP_NOLOAD)
+ sec_flags |= SEC_NEVER_LOAD;
+#endif
+ if (styp_flags & STYP_GROUP)
+ abort (); /* Don't know what to do */
+ /* skip IMAGE_SCN_TYPE_NO_PAD */
+ if (styp_flags & STYP_COPY)
+ abort (); /* Don't know what to do */
+ if (styp_flags & IMAGE_SCN_CNT_CODE)
+ sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD;
+ if (styp_flags & IMAGE_SCN_CNT_INITIALIZED_DATA)
+ sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD;
+ if (styp_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
+ sec_flags |= SEC_ALLOC;
+ if (styp_flags & IMAGE_SCN_LNK_OTHER)
+ abort (); /* Don't know what to do */
+ if (styp_flags & IMAGE_SCN_LNK_INFO)
+ {
+ /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is
+ defined. coff_compute_section_file_positions uses
+ COFF_PAGE_SIZE to ensure that the low order bits of the
+ section VMA and the file offset match. If we don't know
+ COFF_PAGE_SIZE, we can't ensure the correct correspondence,
+ and demand page loading of the file will fail. */
+#ifdef COFF_PAGE_SIZE
+ sec_flags |= SEC_DEBUGGING;
+#endif
+ }
+ if (styp_flags & STYP_OVER)
+ abort (); /* Don't know what to do */
if (styp_flags & IMAGE_SCN_LNK_REMOVE)
sec_flags |= SEC_EXCLUDE;
+ if (styp_flags & IMAGE_SCN_MEM_SHARED)
+ sec_flags |= SEC_SHARED;
+ /* COMDAT: see below */
+ if (styp_flags & IMAGE_SCN_MEM_DISCARDABLE)
+ sec_flags |= SEC_DEBUGGING;
+ if (styp_flags & IMAGE_SCN_MEM_NOT_CACHED)
+ abort ();/* Don't know what to do */
+ if (styp_flags & IMAGE_SCN_MEM_NOT_PAGED)
+ abort (); /* Don't know what to do */
+
+ /* We infer from the distinct read/write/execute bits the settings
+ of some of the bfd flags; the actual values, should we need them,
+ are also in pei_section_data (abfd, section)->pe_flags. */
+
+ if (styp_flags & IMAGE_SCN_MEM_EXECUTE)
+ sec_flags |= SEC_CODE; /* Probably redundant */
+ /* IMAGE_SCN_MEM_READ is simply ignored, assuming it always to be true. */
+ if ((styp_flags & IMAGE_SCN_MEM_WRITE) == 0)
+ sec_flags |= SEC_READONLY;
+
+ /* COMDAT gets very special treatment. */
if (styp_flags & IMAGE_SCN_LNK_COMDAT)
{
sec_flags |= SEC_LINK_ONCE;
@@ -588,16 +746,30 @@ styp_to_sec_flags (abfd, hdr, name)
can't call slurp_symtab, because the linker doesn't want the
swapped symbols. */
+ /* COMDAT sections are special. The first symbol is the section
+ symbol, which tells what kind of COMDAT section it is. The
+ second symbol is the "comdat symbol" - the one with the
+ unique name. GNU uses the section symbol for the unique
+ name; MS uses ".text" for every comdat section. Sigh. - DJ */
+
+ /* This is not mirrored in sec_to_styp_flags(), but there
+ doesn't seem to be a need to, either, and it would at best be
+ rather messy. */
+
if (_bfd_coff_get_external_symbols (abfd))
{
- bfd_byte *esym, *esymend;
+ bfd_byte *esymstart, *esym, *esymend;
+ int seen_state = 0;
+ char *target_name = NULL;
- esym = (bfd_byte *) obj_coff_external_syms (abfd);
- esymend = esym + obj_raw_syment_count (abfd) * SYMESZ;
+ esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd);
+ esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd);
while (esym < esymend)
{
struct internal_syment isym;
+ char buf[SYMNMLEN + 1];
+ const char *symname;
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym);
@@ -608,65 +780,223 @@ styp_to_sec_flags (abfd, hdr, name)
abort ();
}
- if (isym.n_sclass == C_STAT
- && isym.n_type == T_NULL
- && isym.n_numaux == 1)
+ if (isym.n_scnum == section->target_index)
{
- char buf[SYMNMLEN + 1];
- const char *symname;
-
+ /* According to the MSVC documentation, the first
+ TWO entries with the section # are both of
+ interest to us. The first one is the "section
+ symbol" (section name). The second is the comdat
+ symbol name. Here, we've found the first
+ qualifying entry; we distinguish it from the
+ second with a state flag.
+
+ In the case of gas-generated (at least until that
+ is fixed) .o files, it isn't necessarily the
+ second one. It may be some other later symbol.
+
+ Since gas also doesn't follow MS conventions and
+ emits the section similar to .text$<name>, where
+ <something> is the name we're looking for, we
+ distinguish the two as follows:
+
+ If the section name is simply a section name (no
+ $) we presume it's MS-generated, and look at
+ precisely the second symbol for the comdat name.
+ If the section name has a $, we assume it's
+ gas-generated, and look for <something> (whatever
+ follows the $) as the comdat symbol. */
+
+ /* All 3 branches use this */
symname = _bfd_coff_internal_syment_name (abfd, &isym, buf);
+
if (symname == NULL)
abort ();
- if (strcmp (name, symname) == 0)
+ switch (seen_state)
{
- union internal_auxent aux;
+ case 0:
+ {
+ /* The first time we've seen the symbol. */
+ union internal_auxent aux;
+
+ seen_state = 1;
+
+ /* If it isn't the stuff we're expecting, die;
+ The MS documentation is vague, but it
+ appears that the second entry serves BOTH
+ as the comdat symbol and the defining
+ symbol record (either C_STAT or C_EXT,
+ possibly with an aux entry with debug
+ information if it's a function.) It
+ appears the only way to find the second one
+ is to count. (On Intel, they appear to be
+ adjacent, but on Alpha, they have been
+ found separated.)
+
+ Here, we think we've found the first one,
+ but there's some checking we can do to be
+ sure. */
+
+ if (! (isym.n_sclass == C_STAT
+ && isym.n_type == T_NULL
+ && isym.n_value == 0))
+ abort ();
+
+ /* FIXME LATER: MSVC generates section names
+ like .text for comdats. Gas generates
+ names like .text$foo__Fv (in the case of a
+ function). See comment above for more. */
+
+ if (strcmp (name, symname) != 0)
+ abort ();
+
+ /* This is the section symbol. */
+
+ bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)),
+ isym.n_type, isym.n_sclass,
+ 0, isym.n_numaux, (PTR) &aux);
+
+ target_name = strchr (name, '$');
+ if (target_name != NULL)
+ {
+ /* Gas mode. */
+ seen_state = 2;
+ /* Skip the `$'. */
+ target_name += 1;
+ }
+
+ /* FIXME: Microsoft uses NODUPLICATES and
+ ASSOCIATIVE, but gnu uses ANY and
+ SAME_SIZE. Unfortunately, gnu doesn't do
+ the comdat symbols right. So, until we can
+ fix it to do the right thing, we are
+ temporarily disabling comdats for the MS
+ types (they're used in DLLs and C++, but we
+ don't support *their* C++ libraries anyway
+ - DJ. */
+
+ /* Cygwin does not follow the MS style, and
+ uses ANY and SAME_SIZE where NODUPLICATES
+ and ASSOCIATIVE should be used. For
+ Interix, we just do the right thing up
+ front. */
+
+ switch (aux.x_scn.x_comdat)
+ {
+ case IMAGE_COMDAT_SELECT_NODUPLICATES:
+#ifdef STRICT_PE_FORMAT
+ sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY;
+#else
+ sec_flags &= ~SEC_LINK_ONCE;
+#endif
+ break;
+
+ case IMAGE_COMDAT_SELECT_ANY:
+ sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
+ break;
+
+ case IMAGE_COMDAT_SELECT_SAME_SIZE:
+ sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE;
+ break;
+
+ case IMAGE_COMDAT_SELECT_EXACT_MATCH:
+ /* Not yet fully implemented ??? */
+ sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS;
+ break;
+
+ /* debug$S gets this case; other
+ implications ??? */
+
+ /* There may be no symbol... we'll search
+ the whole table... Is this the right
+ place to play this game? Or should we do
+ it when reading it in. */
+ case IMAGE_COMDAT_SELECT_ASSOCIATIVE:
+#ifdef STRICT_PE_FORMAT
+ /* FIXME: This is not currently implemented. */
+ sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
+#else
+ sec_flags &= ~SEC_LINK_ONCE;
+#endif
+ break;
- /* This is the section symbol. */
+ default: /* 0 means "no symbol" */
+ /* debug$F gets this case; other
+ implications ??? */
+ sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
+ break;
+ }
+ }
+ break;
- bfd_coff_swap_aux_in (abfd, (PTR) (esym + SYMESZ),
- isym.n_type, isym.n_sclass,
- 0, isym.n_numaux, (PTR) &aux);
+ case 2:
+ /* Gas mode: the first matching on partial name. */
- switch (aux.x_scn.x_comdat)
+#ifndef TARGET_UNDERSCORE
+#define TARGET_UNDERSCORE 0
+#endif
+ /* Is this the name we're looking for? */
+ if (strcmp (target_name,
+ symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0)
{
- case IMAGE_COMDAT_SELECT_NODUPLICATES:
- sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY;
- break;
-
- default:
- case IMAGE_COMDAT_SELECT_ANY:
- sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
- break;
-
- case IMAGE_COMDAT_SELECT_SAME_SIZE:
- sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE;
- break;
-
- case IMAGE_COMDAT_SELECT_EXACT_MATCH:
- sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS;
- break;
-
- case IMAGE_COMDAT_SELECT_ASSOCIATIVE:
- /* FIXME: This is not currently implemented. */
- sec_flags |= SEC_LINK_DUPLICATES_DISCARD;
- break;
+ /* Not the name we're looking for */
+ esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd);
+ continue;
}
-
- break;
+ /* Fall through. */
+ case 1:
+ /* MSVC mode: the lexically second symbol (or
+ drop through from the above). */
+ {
+ char *newname;
+
+ /* This must the the second symbol with the
+ section #. It is the actual symbol name.
+ Intel puts the two adjacent, but Alpha (at
+ least) spreads them out. */
+
+ section->comdat =
+ bfd_alloc (abfd, sizeof (struct bfd_comdat_info));
+ if (section->comdat == NULL)
+ abort ();
+ section->comdat->symbol =
+ (esym - esymstart) / bfd_coff_symesz (abfd);
+
+ newname = bfd_alloc (abfd, strlen (symname) + 1);
+ if (newname == NULL)
+ abort ();
+
+ strcpy (newname, symname);
+ section->comdat->name = newname;
+
+ }
+
+ goto breakloop;
}
}
- esym += (isym.n_numaux + 1) * SYMESZ;
+ esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd);
}
+ breakloop:
}
}
+
+#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
+ /* 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
+ g++. g++ will emit each template expansion in its own section.
+ The symbols will be defined as weak, so that multiple definitions
+ are permitted. The GNU linker extension is to actually discard
+ all but one of the sections. */
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
- return (sec_flags);
+ return sec_flags;
}
+#endif /* COFF_WITH_PE */
+
#define get_index(symbol) ((symbol)->udata.i)
/*
@@ -675,6 +1005,22 @@ INTERNAL_DEFINITION
CODE_FRAGMENT
+.{* COFF symbol classifications. *}
+.
+.enum coff_symbol_classification
+.{
+. {* Global symbol. *}
+. COFF_SYMBOL_GLOBAL,
+. {* Common symbol. *}
+. COFF_SYMBOL_COMMON,
+. {* Undefined symbol. *}
+. COFF_SYMBOL_UNDEFINED,
+. {* Local symbol. *}
+. COFF_SYMBOL_LOCAL,
+. {* PE section symbol. *}
+. COFF_SYMBOL_PE_SECTION
+.};
+.
Special entry points for gdb to swap in coff symbol table parts:
.typedef struct
.{
@@ -750,6 +1096,7 @@ dependent COFF routines:
. unsigned int _bfd_auxesz;
. unsigned int _bfd_relsz;
. unsigned int _bfd_linesz;
+. unsigned int _bfd_filnmlen;
. boolean _bfd_coff_long_filenames;
. boolean _bfd_coff_long_section_names;
. unsigned int _bfd_coff_default_section_alignment_power;
@@ -782,7 +1129,8 @@ dependent COFF routines:
. flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
. bfd *abfd,
. PTR internal_scnhdr,
-. const char *name));
+. const char *name,
+. asection *section));
. void (*_bfd_set_alignment_hook) PARAMS ((
. bfd *abfd,
. asection *sec,
@@ -819,7 +1167,7 @@ dependent COFF routines:
. arelent *r,
. unsigned int shrink,
. struct bfd_link_info *link_info));
-. boolean (*_bfd_coff_sym_is_global) PARAMS ((
+. enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
. bfd *abfd,
. struct internal_syment *));
. boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
@@ -863,7 +1211,8 @@ dependent COFF routines:
. struct bfd_link_hash_entry **hashp));
.
. boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
-. bfd * abfd ));
+. bfd * abfd,
+. struct coff_final_link_info * pfinfo));
. boolean (*_bfd_coff_final_link_postscript) PARAMS ((
. bfd * abfd,
. struct coff_final_link_info * pfinfo));
@@ -909,6 +1258,7 @@ dependent COFF routines:
.#define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
.#define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
.#define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
+.#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
.#define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
.#define bfd_coff_long_section_names(abfd) \
. (coff_backend_info (abfd)->_bfd_coff_long_section_names)
@@ -934,8 +1284,9 @@ dependent COFF routines:
.#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
. ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
.
-.#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name)\
-. ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook) (abfd, scnhdr, name))
+.#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\
+. ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
+. (abfd, scnhdr, name, section))
.
.#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
. ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
@@ -958,8 +1309,8 @@ dependent COFF routines:
. ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
. (abfd, section, reloc, shrink, link_info))
.
-.#define bfd_coff_sym_is_global(abfd, sym)\
-. ((coff_backend_info (abfd)->_bfd_coff_sym_is_global)\
+.#define bfd_coff_classify_symbol(abfd, sym)\
+. ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
. (abfd, sym))
.
.#define bfd_coff_compute_section_file_positions(abfd)\
@@ -982,8 +1333,8 @@ dependent COFF routines:
. ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
. (info, abfd, name, flags, section, value, string, cp, coll, hashp))
.
-.#define bfd_coff_link_output_has_begun(a) \
-. ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
+.#define bfd_coff_link_output_has_begun(a,p) \
+. ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
.#define bfd_coff_final_link_postscript(a,p) \
. ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
.
@@ -993,7 +1344,7 @@ dependent COFF routines:
static boolean
coff_bad_format_hook (abfd, filehdr)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
PTR filehdr;
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -1011,22 +1362,80 @@ coff_bad_format_hook (abfd, filehdr)
*/
#if defined(M88) || defined(I960)
- if (internal_f->f_opthdr != 0 && AOUTSZ != internal_f->f_opthdr)
+ if (internal_f->f_opthdr != 0 && bfd_coff_aoutsz (abfd) != internal_f->f_opthdr)
return false;
#endif
return true;
}
-/*
- initialize a section structure with information peculiar to this
- particular implementation of coff
-*/
+/* Check whether this section uses an alignment other than the
+ default. */
+
+static void
+coff_set_custom_section_alignment (abfd, section, alignment_table, table_size)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section;
+ const struct coff_section_alignment_entry *alignment_table;
+ const unsigned int table_size;
+{
+ const unsigned int default_alignment = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
+ unsigned int i;
+
+ for (i = 0; i < table_size; ++i)
+ {
+ const char *secname = bfd_get_section_name (abfd, section);
+ if (alignment_table[i].comparison_length == (unsigned int) -1
+ ? strcmp (alignment_table[i].name, secname) == 0
+ : strncmp (alignment_table[i].name, secname,
+ alignment_table[i].comparison_length) == 0)
+ break;
+ }
+ if (i >= table_size)
+ return;
+
+ if (alignment_table[i].default_alignment_min != COFF_ALIGNMENT_FIELD_EMPTY
+ && default_alignment < alignment_table[i].default_alignment_min)
+ return;
+
+ if (alignment_table[i].default_alignment_max != COFF_ALIGNMENT_FIELD_EMPTY
+ && default_alignment > alignment_table[i].default_alignment_max)
+ return;
+
+ section->alignment_power = alignment_table[i].alignment_power;
+}
+
+/* Custom section alignment records. */
+
+static const struct coff_section_alignment_entry
+coff_section_alignment_table[] =
+{
+#ifdef COFF_SECTION_ALIGNMENT_ENTRIES
+ COFF_SECTION_ALIGNMENT_ENTRIES,
+#endif
+ /* There must not be any gaps between .stabstr sections. */
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".stabstr"),
+ 1, COFF_ALIGNMENT_FIELD_EMPTY, 0 },
+ /* The .stab section must be aligned to 2**2 at most, to avoid gaps. */
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".stab"),
+ 3, COFF_ALIGNMENT_FIELD_EMPTY, 2 },
+ /* Similarly for the .ctors and .dtors sections. */
+ { COFF_SECTION_NAME_EXACT_MATCH (".ctors"),
+ 3, COFF_ALIGNMENT_FIELD_EMPTY, 2 },
+ { COFF_SECTION_NAME_EXACT_MATCH (".dtors"),
+ 3, COFF_ALIGNMENT_FIELD_EMPTY, 2 }
+};
+
+static const unsigned int coff_section_alignment_table_size =
+ sizeof coff_section_alignment_table / sizeof coff_section_alignment_table[0];
+
+/* Initialize a section structure with information peculiar to this
+ particular implementation of COFF. */
static boolean
coff_new_section_hook (abfd, section)
- bfd * abfd;
- asection * section;
+ bfd *abfd;
+ asection *section;
{
combined_entry_type *native;
@@ -1062,22 +1471,9 @@ coff_new_section_hook (abfd, section)
coffsymbol (section->symbol)->native = native;
- /* The .stab section must be aligned to 2**2 at most, because
- otherwise there may be gaps in the section which gdb will not
- know how to interpret. Examining the section name is a hack, but
- that is also how gdb locates the section.
- We need to handle the .ctors and .dtors sections similarly, to
- avoid introducing null words in the tables. */
- if (COFF_DEFAULT_SECTION_ALIGNMENT_POWER > 2
- && (strncmp (section->name, ".stab", 5) == 0
- || strcmp (section->name, ".ctors") == 0
- || strcmp (section->name, ".dtors") == 0))
- section->alignment_power = 2;
-
- /* Similarly, the .stabstr section must be aligned to 2**0 at most. */
- if (COFF_DEFAULT_SECTION_ALIGNMENT_POWER > 0
- && strncmp (section->name, ".stabstr", 8) == 0)
- section->alignment_power = 0;
+ coff_set_custom_section_alignment (abfd, section,
+ coff_section_alignment_table,
+ coff_section_alignment_table_size);
return true;
}
@@ -1090,7 +1486,7 @@ static void coff_set_alignment_hook PARAMS ((bfd *, asection *, PTR));
static void
coff_set_alignment_hook (abfd, section, scnhdr)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
asection * section;
PTR scnhdr;
{
@@ -1103,6 +1499,10 @@ coff_set_alignment_hook (abfd, section, scnhdr)
if ((1 << i) >= hdr->s_align)
break;
#endif
+#ifdef TIC80COFF
+ /* TI tools hijack bits 8-11 for the alignment */
+ i = (hdr->s_flags >> 8) & 0xF ;
+#endif
section->alignment_power = i;
}
@@ -1126,7 +1526,7 @@ static void coff_set_alignment_hook PARAMS ((bfd *, asection *, PTR));
static void
coff_set_alignment_hook (abfd, section, scnhdr)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
asection * section;
PTR scnhdr;
{
@@ -1140,66 +1540,34 @@ coff_set_alignment_hook (abfd, section, scnhdr)
ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_2BYTES, 1)
ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_1BYTES, 0)
-#ifdef POWERPC_LE_PE
- if (strcmp (section->name, ".idata$2") == 0)
- {
- section->alignment_power = 0;
- }
- else if (strcmp (section->name, ".idata$3") == 0)
- {
- section->alignment_power = 0;
- }
- else if (strcmp (section->name, ".idata$4") == 0)
- {
- section->alignment_power = 2;
- }
- else if (strcmp (section->name, ".idata$5") == 0)
- {
- section->alignment_power = 2;
- }
- else if (strcmp (section->name, ".idata$6") == 0)
- {
- section->alignment_power = 1;
- }
- else if (strcmp (section->name, ".reloc") == 0)
- {
- section->alignment_power = 1;
- }
- else if (strncmp (section->name, ".stab", 5) == 0)
- {
- section->alignment_power = 2;
- }
-#endif
-
-#ifdef COFF_IMAGE_WITH_PE
/* In a PE image file, the s_paddr field holds the virtual size of a
- section, while the s_size field holds the raw size. */
- if (hdr->s_paddr != 0)
+ section, while the s_size field holds the raw size. We also keep
+ the original section flag value, since not every bit can be
+ mapped onto a generic BFD section bit. */
+ if (coff_section_data (abfd, section) == NULL)
{
- if (coff_section_data (abfd, section) == NULL)
+ section->used_by_bfd =
+ (PTR) bfd_zalloc (abfd, sizeof (struct coff_section_tdata));
+ if (section->used_by_bfd == NULL)
{
- section->used_by_bfd =
- (PTR) bfd_zalloc (abfd, sizeof (struct coff_section_tdata));
- if (section->used_by_bfd == NULL)
- {
- /* FIXME: Return error. */
- abort ();
- }
+ /* FIXME: Return error. */
+ abort ();
}
- if (pei_section_data (abfd, section) == NULL)
+ }
+ if (pei_section_data (abfd, section) == NULL)
+ {
+ coff_section_data (abfd, section)->tdata =
+ (PTR) bfd_zalloc (abfd, sizeof (struct pei_section_tdata));
+ if (coff_section_data (abfd, section)->tdata == NULL)
{
- coff_section_data (abfd, section)->tdata =
- (PTR) bfd_zalloc (abfd, sizeof (struct pei_section_tdata));
- if (coff_section_data (abfd, section)->tdata == NULL)
- {
- /* FIXME: Return error. */
- abort ();
- }
+ /* FIXME: Return error. */
+ abort ();
}
- pei_section_data (abfd, section)->virt_size = hdr->s_paddr;
}
-#endif
+ pei_section_data (abfd, section)->virt_size = hdr->s_paddr;
+ pei_section_data (abfd, section)->pe_flags = hdr->s_flags;
+ section->lma = hdr->s_vaddr;
}
#undef ALIGN_SET
#undef ELIFALIGN_SET
@@ -1285,7 +1653,7 @@ static PTR
coff_mkobject_hook (abfd, filehdr, aouthdr)
bfd * abfd;
PTR filehdr;
- PTR aouthdr;
+ PTR aouthdr ATTRIBUTE_UNUSED;
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
coff_data_type *coff;
@@ -1304,9 +1672,11 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
coff->local_n_btshft = N_BTSHFT;
coff->local_n_tmask = N_TMASK;
coff->local_n_tshift = N_TSHIFT;
- coff->local_symesz = SYMESZ;
- coff->local_auxesz = AUXESZ;
- coff->local_linesz = LINESZ;
+ coff->local_symesz = bfd_coff_symesz (abfd);
+ coff->local_auxesz = bfd_coff_auxesz (abfd);
+ coff->local_linesz = bfd_coff_linesz (abfd);
+
+ coff->timestamp = internal_f->f_timdat;
obj_raw_syment_count (abfd) =
obj_conv_table_size (abfd) =
@@ -1315,7 +1685,7 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
#ifdef RS6000COFF_C
if ((internal_f->f_flags & F_SHROBJ) != 0)
abfd->flags |= DYNAMIC;
- if (aouthdr != NULL && internal_f->f_opthdr >= AOUTSZ)
+ if (aouthdr != NULL && internal_f->f_opthdr >= bfd_coff_aoutsz (abfd))
{
struct internal_aouthdr *internal_a =
(struct internal_aouthdr *) aouthdr;
@@ -1337,10 +1707,17 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
#ifdef ARM
/* Set the flags field from the COFF header read in */
- if (! coff_arm_bfd_set_private_flags (abfd, internal_f->f_flags))
+ 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. */
+ if ((internal_f->f_flags & IMAGE_FILE_DEBUG_STRIPPED) == 0)
+ abfd->flags |= HAS_DEBUG;
+#endif
+
return (PTR) coff;
}
#endif
@@ -1388,16 +1765,19 @@ coff_set_arch_mach_hook (abfd, filehdr)
#endif
#ifdef ARMMAGIC
case ARMMAGIC:
+ case ARMPEMAGIC:
+ case THUMBPEMAGIC:
arch = bfd_arch_arm;
switch (internal_f->f_flags & F_ARM_ARCHITECTURE_MASK)
{
- case F_ARM_2: machine = bfd_mach_arm_2; break;
- case F_ARM_2a: machine = bfd_mach_arm_2a; break;
- case F_ARM_3: machine = bfd_mach_arm_3; break;
- default:
- case F_ARM_3M: machine = bfd_mach_arm_3M; break;
- case F_ARM_4: machine = bfd_mach_arm_4; break;
- case F_ARM_4T: machine = bfd_mach_arm_4T; break;
+ case F_ARM_2: machine = bfd_mach_arm_2; break;
+ case F_ARM_2a: machine = bfd_mach_arm_2a; break;
+ case F_ARM_3: machine = bfd_mach_arm_3; break;
+ default:
+ case F_ARM_3M: machine = bfd_mach_arm_3M; break;
+ case F_ARM_4: machine = bfd_mach_arm_4; break;
+ case F_ARM_4T: machine = bfd_mach_arm_4T; break;
+ case F_ARM_5: machine = bfd_mach_arm_5; break;
}
break;
#endif
@@ -1502,17 +1882,23 @@ coff_set_arch_mach_hook (abfd, filehdr)
cputype = 0;
else
{
- bfd_byte buf[SYMESZ];
+ bfd_byte *buf;
struct internal_syment sym;
+ buf = (bfd_byte *) bfd_malloc (bfd_coff_symesz (abfd));
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
- || bfd_read (buf, 1, SYMESZ, abfd) != SYMESZ)
- return false;
+ || (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);
if (sym.n_sclass == C_FILE)
cputype = sym.n_type & 0xff;
else
cputype = 0;
+ free (buf);
}
}
@@ -1591,11 +1977,21 @@ coff_set_arch_mach_hook (abfd, filehdr)
#ifdef SH_ARCH_MAGIC_BIG
case SH_ARCH_MAGIC_BIG:
case SH_ARCH_MAGIC_LITTLE:
+#ifdef COFF_WITH_PE
+ case SH_ARCH_MAGIC_WINCE:
+#endif
arch = bfd_arch_sh;
machine = 0;
break;
#endif
+#ifdef MIPS_ARCH_MAGIC_WINCE
+ case MIPS_ARCH_MAGIC_WINCE:
+ arch = bfd_arch_mips;
+ machine = 0;
+ break;
+#endif
+
#ifdef H8500MAGIC
case H8500MAGIC:
arch = bfd_arch_h8500;
@@ -1619,7 +2015,17 @@ coff_set_arch_mach_hook (abfd, filehdr)
break;
#endif
+#ifdef TIC80_ARCH_MAGIC
+ case TIC80_ARCH_MAGIC:
+ arch = bfd_arch_tic80;
+ break;
+#endif
+#ifdef MCOREMAGIC
+ case MCOREMAGIC:
+ arch = bfd_arch_mcore;
+ break;
+#endif
default: /* Unreadable input file type */
arch = bfd_arch_obscure;
break;
@@ -1636,7 +2042,7 @@ static boolean symname_in_debug_hook
static boolean
symname_in_debug_hook (abfd, sym)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
struct internal_syment *sym;
{
return SYMNAME_IN_DEBUG (sym) ? true : false;
@@ -1660,7 +2066,7 @@ static boolean coff_pointerize_aux_hook
/*ARGSUSED*/
static boolean
coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
combined_entry_type *table_base;
combined_entry_type *symbol;
unsigned int indaux;
@@ -1700,11 +2106,11 @@ static boolean coff_pointerize_aux_hook
/*ARGSUSED*/
static boolean
coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
- bfd *abfd;
- combined_entry_type *table_base;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ combined_entry_type *table_base ATTRIBUTE_UNUSED;
combined_entry_type *symbol;
unsigned int indaux;
- combined_entry_type *aux;
+ combined_entry_type *aux ATTRIBUTE_UNUSED;
{
/* Return true if we don't want to pointerize this aux entry, which
is the case for the lastfirst aux entry for a C_LEAFPROC symbol. */
@@ -1729,12 +2135,12 @@ static boolean coff_print_aux
static boolean
coff_print_aux (abfd, file, table_base, symbol, aux, indaux)
- bfd *abfd;
- FILE *file;
- combined_entry_type *table_base;
- combined_entry_type *symbol;
- combined_entry_type *aux;
- unsigned int indaux;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ FILE *file ATTRIBUTE_UNUSED;
+ combined_entry_type *table_base ATTRIBUTE_UNUSED;
+ combined_entry_type *symbol ATTRIBUTE_UNUSED;
+ combined_entry_type *aux ATTRIBUTE_UNUSED;
+ unsigned int indaux ATTRIBUTE_UNUSED;
{
#ifdef RS6000COFF_C
if ((symbol->u.syment.n_sclass == C_EXT
@@ -1880,7 +2286,11 @@ coff_write_relocs (abfd, first_undef)
#endif
if (q->sym_ptr_ptr)
{
+#ifdef SECTION_RELATIVE_ABSOLUTE_SYMBOL_P
+ if (SECTION_RELATIVE_ABSOLUTE_SYMBOL_P (q,s))
+#else
if (q->sym_ptr_ptr == bfd_abs_section_ptr->symbol_ptr_ptr)
+#endif
/* This is a relocation relative to the absolute symbol. */
n.r_symndx = -1;
else
@@ -1905,7 +2315,8 @@ coff_write_relocs (abfd, first_undef)
n.r_type = q->howto->type;
#endif
coff_swap_reloc_out (abfd, &n, &dst);
- if (bfd_write ((PTR) & dst, 1, RELSZ, abfd) != RELSZ)
+ if (bfd_write ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd)
+ != bfd_coff_relsz (abfd))
return false;
}
@@ -1924,8 +2335,8 @@ coff_write_relocs (abfd, first_undef)
static boolean
coff_set_flags (abfd, magicp, flagsp)
bfd * abfd;
- unsigned int *magicp;
- unsigned short *flagsp;
+ unsigned int *magicp ATTRIBUTE_UNUSED;
+ unsigned short *flagsp ATTRIBUTE_UNUSED;
{
switch (bfd_get_arch (abfd))
{
@@ -1996,9 +2407,18 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = TIC30MAGIC;
return true;
#endif
+#ifdef TIC80_ARCH_MAGIC
+ case bfd_arch_tic80:
+ *magicp = TIC80_ARCH_MAGIC;
+ return true;
+#endif
#ifdef ARMMAGIC
case bfd_arch_arm:
+#ifdef ARM_WINCE
+ * magicp = ARMPEMAGIC;
+#else
* magicp = ARMMAGIC;
+#endif
* flagsp = 0;
if (APCS_SET (abfd))
{
@@ -2021,6 +2441,8 @@ coff_set_flags (abfd, magicp, flagsp)
case bfd_mach_arm_3M: * flagsp |= F_ARM_3M; break;
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 */
}
return true;
#endif
@@ -2091,10 +2513,21 @@ coff_set_flags (abfd, magicp, flagsp)
#ifdef SH_ARCH_MAGIC_BIG
case bfd_arch_sh:
+#ifdef COFF_IMAGE_WITH_PE
+ *magicp = SH_ARCH_MAGIC_WINCE;
+#else
if (bfd_big_endian (abfd))
*magicp = SH_ARCH_MAGIC_BIG;
else
*magicp = SH_ARCH_MAGIC_LITTLE;
+#endif
+ return true;
+ break;
+#endif
+
+#ifdef MIPS_ARCH_MAGIC_WINCE
+ case bfd_arch_mips:
+ *magicp = MIPS_ARCH_MAGIC_WINCE;
return true;
break;
#endif
@@ -2143,6 +2576,12 @@ coff_set_flags (abfd, magicp, flagsp)
break;
#endif
+#ifdef MCOREMAGIC
+ case bfd_arch_mcore:
+ * magicp = MCOREMAGIC;
+ return true;
+#endif
+
default: /* Unknown architecture */
/* return false; -- fall through to "return false" below, to avoid
"statement never reached" errors on the one below. */
@@ -2172,12 +2611,39 @@ coff_set_arch_mach (abfd, arch, machine)
return true; /* We're easy ... */
}
+#ifdef COFF_IMAGE_WITH_PE
+
+/* This is used to sort sections by VMA, as required by PE image
+ files. */
+
+static int sort_by_secaddr PARAMS ((const PTR, const PTR));
+
+static int
+sort_by_secaddr (arg1, arg2)
+ const PTR arg1;
+ const PTR arg2;
+{
+ const asection *a = *(const asection **) arg1;
+ const asection *b = *(const asection **) arg2;
+
+ if (a->vma < b->vma)
+ return -1;
+ else if (a->vma > b->vma)
+ return 1;
+ else
+ return 0;
+}
+
+#endif /* COFF_IMAGE_WITH_PE */
/* Calculate the file position for each section. */
#ifndef I960
#define ALIGN_SECTIONS_IN_FILE
#endif
+#ifdef TIC80COFF
+#undef ALIGN_SECTIONS_IN_FILE
+#endif
static boolean
coff_compute_section_file_positions (abfd)
@@ -2185,9 +2651,8 @@ coff_compute_section_file_positions (abfd)
{
asection *current;
asection *previous = (asection *) NULL;
- file_ptr sofar = FILHSZ;
+ file_ptr sofar = bfd_coff_filhsz (abfd);
boolean align_adjust;
- unsigned int count;
#ifdef ALIGN_SECTIONS_IN_FILE
file_ptr old_sofar;
#endif
@@ -2253,48 +2718,132 @@ coff_compute_section_file_positions (abfd)
}
if (abfd->flags & EXEC_P)
- sofar += AOUTSZ;
+ sofar += bfd_coff_aoutsz (abfd);
#ifdef RS6000COFF_C
else if (xcoff_data (abfd)->full_aouthdr)
- sofar += AOUTSZ;
+ sofar += bfd_coff_aoutsz (abfd);
else
sofar += SMALL_AOUTSZ;
#endif
- sofar += abfd->section_count * SCNHSZ;
+ sofar += abfd->section_count * bfd_coff_scnhsz (abfd);
#ifdef RS6000COFF_C
/* XCOFF handles overflows in the reloc and line number count fields
by allocating a new section header to hold the correct counts. */
for (current = abfd->sections; current != NULL; current = current->next)
if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff)
- sofar += SCNHSZ;
+ sofar += bfd_coff_scnhsz (abfd);
#endif
+#ifdef COFF_IMAGE_WITH_PE
+ {
+ /* PE requires the sections to be in memory order when listed in
+ the section headers. It also does not like empty loadable
+ sections. The sections apparently do not have to be in the
+ right order in the image file itself, but we do need to get the
+ target_index values right. */
+
+ int count;
+ asection **section_list;
+ int i;
+ int target_index;
+
+ count = 0;
+ for (current = abfd->sections; current != NULL; current = current->next)
+ ++count;
+
+ /* We allocate an extra cell to simplify the final loop. */
+ section_list = bfd_malloc (sizeof (struct asection *) * (count + 1));
+ if (section_list == NULL)
+ return false;
+
+ i = 0;
+ for (current = abfd->sections; current != NULL; current = current->next)
+ {
+ section_list[i] = current;
+ ++i;
+ }
+ section_list[i] = NULL;
+
+ qsort (section_list, count, sizeof (asection *), sort_by_secaddr);
+
+ /* Rethread the linked list into sorted order; at the same time,
+ assign target_index values. */
+ target_index = 1;
+ abfd->sections = section_list[0];
+ for (i = 0; i < count; i++)
+ {
+ current = section_list[i];
+ current->next = section_list[i + 1];
+
+ /* Later, if the section has zero size, we'll be throwing it
+ away, so we don't want to number it now. Note that having
+ a zero size and having real contents are different
+ concepts: .bss has no contents, but (usually) non-zero
+ size. */
+ if (current->_raw_size == 0)
+ {
+ /* Discard. However, it still might have (valid) symbols
+ in it, so arbitrarily set it to section 1 (indexing is
+ 1-based here; usually .text). __end__ and other
+ contents of .endsection really have this happen.
+ FIXME: This seems somewhat dubious. */
+ current->target_index = 1;
+ }
+ else
+ current->target_index = target_index++;
+ }
+
+ free (section_list);
+ }
+#else /* ! COFF_IMAGE_WITH_PE */
+ {
+ /* Set the target_index field. */
+ int target_index;
+
+ target_index = 1;
+ for (current = abfd->sections; current != NULL; current = current->next)
+ current->target_index = target_index++;
+ }
+#endif /* ! COFF_IMAGE_WITH_PE */
+
align_adjust = false;
- for (current = abfd->sections, count = 1;
+ for (current = abfd->sections;
current != (asection *) NULL;
- current = current->next, ++count)
+ current = current->next)
{
#ifdef COFF_IMAGE_WITH_PE
- /* The NT loader does not want empty section headers, so we omit
- them. We don't actually remove the section from the BFD,
- although we probably should. This matches code in
- coff_write_object_contents. */
- if (current->_raw_size == 0)
+ /* With PE we have to pad each section to be a multiple of its
+ page size too, and remember both sizes. */
+ if (coff_section_data (abfd, current) == NULL)
+ {
+ current->used_by_bfd =
+ (PTR) bfd_zalloc (abfd, sizeof (struct coff_section_tdata));
+ if (current->used_by_bfd == NULL)
+ return false;
+ }
+ if (pei_section_data (abfd, current) == NULL)
{
- current->target_index = -1;
- --count;
- continue;
+ coff_section_data (abfd, current)->tdata =
+ (PTR) bfd_zalloc (abfd, sizeof (struct pei_section_tdata));
+ if (coff_section_data (abfd, current)->tdata == NULL)
+ return false;
}
+ if (pei_section_data (abfd, current)->virt_size == 0)
+ pei_section_data (abfd, current)->virt_size = current->_raw_size;
#endif
- current->target_index = count;
-
- /* Only deal with sections which have contents */
+ /* Only deal with sections which have contents. */
if (!(current->flags & SEC_HAS_CONTENTS))
continue;
+#ifdef COFF_IMAGE_WITH_PE
+ /* Make sure we skip empty sections in a PE image. */
+ if (current->_raw_size == 0)
+ continue;
+#endif
+
/* 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
@@ -2325,26 +2874,7 @@ coff_compute_section_file_positions (abfd)
current->filepos = sofar;
#ifdef COFF_IMAGE_WITH_PE
- /* With PE we have to pad each section to be a multiple of its
- page size too, and remember both sizes. */
-
- if (coff_section_data (abfd, current) == NULL)
- {
- current->used_by_bfd =
- (PTR) bfd_zalloc (abfd, sizeof (struct coff_section_tdata));
- if (current->used_by_bfd == NULL)
- return false;
- }
- if (pei_section_data (abfd, current) == NULL)
- {
- coff_section_data (abfd, current)->tdata =
- (PTR) bfd_zalloc (abfd, sizeof (struct pei_section_tdata));
- if (coff_section_data (abfd, current)->tdata == NULL)
- return false;
- }
- if (pei_section_data (abfd, current)->virt_size == 0)
- pei_section_data (abfd, current)->virt_size = current->_raw_size;
-
+ /* Set the padded size. */
current->_raw_size = (current->_raw_size + page_size -1) & -page_size;
#endif
@@ -2501,6 +3031,7 @@ coff_write_object_contents (abfd)
asection *current;
boolean hasrelocs = false;
boolean haslinno = false;
+ boolean hasdebug = false;
file_ptr scn_base;
file_ptr reloc_base;
file_ptr lineno_base;
@@ -2522,7 +3053,7 @@ coff_write_object_contents (abfd)
/* Make a pass through the symbol table to count line number entries and
put them into the correct asections */
- lnno_size = coff_count_linenumbers (abfd) * LINESZ;
+ lnno_size = coff_count_linenumbers (abfd) * bfd_coff_linesz (abfd);
if (abfd->output_has_begun == false)
{
@@ -2536,7 +3067,7 @@ coff_write_object_contents (abfd)
for (current = abfd->sections; current != NULL; current =
current->next)
- reloc_size += current->reloc_count * RELSZ;
+ reloc_size += current->reloc_count * bfd_coff_relsz (abfd);
lineno_base = reloc_base + reloc_size;
sym_base = lineno_base + lnno_size;
@@ -2549,7 +3080,7 @@ coff_write_object_contents (abfd)
{
current->line_filepos = lineno_base;
current->moving_line_filepos = lineno_base;
- lineno_base += current->lineno_count * LINESZ;
+ lineno_base += current->lineno_count * bfd_coff_linesz (abfd);
}
else
{
@@ -2558,7 +3089,7 @@ coff_write_object_contents (abfd)
if (current->reloc_count)
{
current->rel_filepos = reloc_base;
- reloc_base += current->reloc_count * RELSZ;
+ reloc_base += current->reloc_count * bfd_coff_relsz (abfd);
}
else
{
@@ -2570,13 +3101,13 @@ coff_write_object_contents (abfd)
internal_f.f_nscns = 0;
if ((abfd->flags & EXEC_P) != 0)
- scn_base = FILHSZ + AOUTSZ;
+ scn_base = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
else
{
- scn_base = FILHSZ;
+ scn_base = bfd_coff_filhsz (abfd);
#ifdef RS6000COFF_C
if (xcoff_data (abfd)->full_aouthdr)
- scn_base += AOUTSZ;
+ scn_base += bfd_coff_aoutsz (abfd);
else
scn_base += SMALL_AOUTSZ;
#endif
@@ -2591,25 +3122,24 @@ coff_write_object_contents (abfd)
current = current->next)
{
struct internal_scnhdr section;
-
-#ifdef COFF_WITH_PE
- /* If we've got a .reloc section, remember. */
+ boolean is_reloc_section = false;
#ifdef COFF_IMAGE_WITH_PE
if (strcmp (current->name, ".reloc") == 0)
{
+ is_reloc_section = true;
+ hasrelocs = true;
pe_data (abfd)->has_reloc_section = 1;
}
#endif
-#endif
internal_f.f_nscns++;
strncpy (section.s_name, current->name, SCNNMLEN);
#ifdef COFF_LONG_SECTION_NAMES
/* Handle long section names as in PE. This must be compatible
- with the code in coff_write_symbols. */
+ with the code in coff_write_symbols and _bfd_coff_final_link. */
{
size_t len;
@@ -2664,10 +3194,16 @@ coff_write_object_contents (abfd)
section.s_lnnoptr = current->line_filepos;
section.s_nreloc = current->reloc_count;
section.s_nlnno = current->lineno_count;
+#ifndef COFF_IMAGE_WITH_PE
+ /* In PEI, relocs come in the .reloc section. */
if (current->reloc_count != 0)
hasrelocs = true;
+#endif
if (current->lineno_count != 0)
haslinno = true;
+ if ((current->flags & SEC_DEBUGGING) != 0
+ && ! is_reloc_section)
+ hasdebug = true;
#ifdef RS6000COFF_C
/* Indicate the use of an XCOFF overflow section header. */
@@ -2697,13 +3233,18 @@ coff_write_object_contents (abfd)
section.s_align = (current->alignment_power
? 1 << current->alignment_power
: 0);
+#else
+#ifdef TIC80COFF
+ section.s_flags |= (current->alignment_power & 0xF) << 8;
+#endif
#endif
#ifdef COFF_IMAGE_WITH_PE
- /* suppress output of the sections if they are null. ld includes
- the bss and data sections even if there is no size assigned
- to them. NT loader doesn't like it if these section headers are
- included if the sections themselves are not needed */
+ /* Suppress output of the sections if they are null. ld
+ includes the bss and data sections even if there is no size
+ assigned to them. NT loader doesn't like it if these section
+ headers are included if the sections themselves are not
+ needed. See also coff_compute_section_file_positions. */
if (section.s_size == 0)
internal_f.f_nscns--;
else
@@ -2711,7 +3252,8 @@ coff_write_object_contents (abfd)
{
SCNHDR buff;
if (coff_swap_scnhdr_out (abfd, &section, &buff) == 0
- || bfd_write ((PTR) (&buff), 1, SCNHSZ, abfd) != SCNHSZ)
+ || bfd_write ((PTR) (&buff), 1, bfd_coff_scnhsz (abfd), abfd)
+ != bfd_coff_scnhsz (abfd))
return false;
}
@@ -2832,7 +3374,8 @@ coff_write_object_contents (abfd)
scnhdr.s_nlnno = current->target_index;
scnhdr.s_flags = STYP_OVRFLO;
if (coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0
- || bfd_write ((PTR) &buff, 1, SCNHSZ, abfd) != SCNHSZ)
+ || bfd_write ((PTR) &buff, 1, bfd_coff_scnhsz (abfd), abfd)
+ != bfd_coff_scnhsz (abfd))
return false;
}
}
@@ -2853,13 +3396,13 @@ coff_write_object_contents (abfd)
internal_f.f_flags = 0;
if (abfd->flags & EXEC_P)
- internal_f.f_opthdr = AOUTSZ;
+ internal_f.f_opthdr = bfd_coff_aoutsz (abfd);
else
{
internal_f.f_opthdr = 0;
#ifdef RS6000COFF_C
if (xcoff_data (abfd)->full_aouthdr)
- internal_f.f_opthdr = AOUTSZ;
+ internal_f.f_opthdr = bfd_coff_aoutsz (abfd);
else
internal_f.f_opthdr = SMALL_AOUTSZ;
#endif
@@ -2871,13 +3414,21 @@ coff_write_object_contents (abfd)
internal_f.f_flags |= F_LNNO;
if (abfd->flags & EXEC_P)
internal_f.f_flags |= F_EXEC;
+#ifdef COFF_IMAGE_WITH_PE
+ if (! hasdebug)
+ internal_f.f_flags |= IMAGE_FILE_DEBUG_STRIPPED;
+#endif
- /* FIXME: this is wrong for PPC_PE! */
+#ifndef COFF_WITH_PE
if (bfd_little_endian (abfd))
internal_f.f_flags |= F_AR32WR;
else
internal_f.f_flags |= F_AR32W;
+#endif
+#ifdef TIC80_TARGET_ID
+ internal_f.f_target_id = TIC80_TARGET_ID;
+#endif
/*
FIXME, should do something about the other byte orders and
@@ -2916,6 +3467,10 @@ coff_write_object_contents (abfd)
internal_a.magic = NMAGIC; /* Assume separate i/d */
#define __A_MAGIC_SET__
#endif /* A29K */
+#ifdef TIC80COFF
+ internal_a.magic = TIC80_ARCH_MAGIC;
+#define __A_MAGIC_SET__
+#endif /* TIC80 */
#ifdef I860
/* FIXME: What are the a.out magic numbers for the i860? */
internal_a.magic = 0;
@@ -2962,6 +3517,11 @@ coff_write_object_contents (abfd)
internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
#endif
+#if defined MCORE_PE
+#define __A_MAGIC_SET__
+ internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
+#endif
+
#if defined(I386)
#define __A_MAGIC_SET__
#if defined(LYNXOS)
@@ -2985,6 +3545,16 @@ coff_write_object_contents (abfd)
RS6K_AOUTHDR_OMAGIC;
#endif
+#if defined(SH) && defined(COFF_WITH_PE)
+#define __A_MAGIC_SET__
+ internal_a.magic = SH_PE_MAGIC;
+#endif
+
+#if defined(MIPS) && defined(COFF_WITH_PE)
+#define __A_MAGIC_SET__
+ internal_a.magic = MIPS_PE_MAGIC;
+#endif
+
#ifndef __A_MAGIC_SET__
#include "Your aouthdr magic number is not being set!"
#else
@@ -3015,6 +3585,15 @@ coff_write_object_contents (abfd)
if (! coff_write_relocs (abfd, firstundef))
return false;
}
+#ifdef COFF_LONG_SECTION_NAMES
+ else if (long_section_names)
+ {
+ /* If we have long section names we have to write out the string
+ table even if there are no symbols. */
+ if (! coff_write_symbols (abfd))
+ return false;
+ }
+#endif
#ifdef COFF_IMAGE_WITH_PE
#ifdef PPC_PE
else if ((abfd->flags & EXEC_P) != 0)
@@ -3148,19 +3727,41 @@ coff_write_object_contents (abfd)
/* now write them */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return false;
+
{
- char buff[FILHSZ];
+ char * buff;
+ bfd_size_type amount;
+
+ buff = bfd_malloc (bfd_coff_filhsz (abfd));
+ if (buff == NULL)
+ return false;
+
coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff);
- if (bfd_write ((PTR) buff, 1, FILHSZ, abfd) != FILHSZ)
+ 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)) */
- char buff[AOUTSZ];
+ char * buff;
+ bfd_size_type amount;
+
+ buff = bfd_malloc (bfd_coff_aoutsz (abfd));
+ if (buff == NULL)
+ return false;
+
coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff);
- if (bfd_write ((PTR) buff, 1, AOUTSZ, abfd) != AOUTSZ)
+ amount = bfd_write ((PTR) buff, 1, bfd_coff_aoutsz (abfd), abfd);
+
+ free (buff);
+
+ if (amount != bfd_coff_aoutsz (abfd))
return false;
}
#ifdef RS6000COFF_C
@@ -3172,7 +3773,7 @@ coff_write_object_contents (abfd)
/* XCOFF seems to always write at least a small a.out header. */
coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) &buff);
if (xcoff_data (abfd)->full_aouthdr)
- size = AOUTSZ;
+ size = bfd_coff_aoutsz (abfd);
else
size = SMALL_AOUTSZ;
if (bfd_write ((PTR) &buff, 1, size, abfd) != size)
@@ -3307,6 +3908,9 @@ SUBSUBSECTION
base of the line number information for the table is stored in
the symbol associated with the function.
+ Note: The PE format uses line number 0 for a flag indicating a
+ new source file.
+
The information is copied from the external to the internal
table, and each symbol which marks a function is marked by
pointing its...
@@ -3328,7 +3932,7 @@ coff_slurp_line_table (abfd, asect)
native_lineno = (LINENO *) buy_and_read (abfd,
asect->line_filepos,
SEEK_SET,
- (size_t) (LINESZ *
+ (size_t) (bfd_coff_linesz (abfd) *
asect->lineno_count));
lineno_cache =
(alent *) bfd_alloc (abfd, (size_t) ((asect->lineno_count + 1) * sizeof (alent)));
@@ -3358,7 +3962,7 @@ coff_slurp_line_table (abfd, asect)
|| (unsigned long) symndx >= obj_raw_syment_count (abfd))
{
(*_bfd_error_handler)
- ("%s: warning: illegal symbol index %ld in line numbers",
+ (_("%s: warning: illegal symbol index %ld in line numbers"),
bfd_get_filename (abfd), dst.l_addr.l_symndx);
symndx = 0;
warned = true;
@@ -3372,7 +3976,7 @@ coff_slurp_line_table (abfd, asect)
if (sym->lineno != NULL && ! warned)
{
(*_bfd_error_handler)
- ("%s: warning: duplicate line number information for `%s'",
+ (_("%s: warning: duplicate line number information for `%s'"),
bfd_get_filename (abfd),
bfd_asymbol_name (&sym->symbol));
}
@@ -3396,6 +4000,10 @@ coff_slurp_line_table (abfd, asect)
return true;
}
+/* Slurp in the symbol table, converting it to generic form. Note
+ that if coff_relocate_section is defined, the linker will read
+ symbols via coff_link_add_symbols, rather than via this routine. */
+
static boolean
coff_slurp_symbol_table (abfd)
bfd * abfd;
@@ -3463,6 +4071,7 @@ coff_slurp_symbol_table (abfd)
#endif
case C_EXT:
+ case C_WEAKEXT:
#if defined ARM
case C_THUMBEXT:
case C_THUMBEXTFUNC:
@@ -3474,31 +4083,15 @@ coff_slurp_symbol_table (abfd)
case C_SYSTEM: /* System Wide variable */
#endif
#ifdef COFF_WITH_PE
- /* PE uses storage class 0x68 to denote a section symbol */
+ /* In PE, 0x68 (104) denotes a section symbol */
case C_SECTION:
- /* PE uses storage class 0x67 for a weak external symbol. */
+ /* In PE, 0x69 (105) denotes a weak external symbol. */
case C_NT_WEAK:
#endif
- if ((src->u.syment.n_scnum) == 0)
+ switch (coff_classify_symbol (abfd, &src->u.syment))
{
- if ((src->u.syment.n_value) == 0)
- {
- dst->symbol.section = bfd_und_section_ptr;
- dst->symbol.value = 0;
- }
- else
- {
- dst->symbol.section = bfd_com_section_ptr;
- dst->symbol.value = (src->u.syment.n_value);
- }
- }
- else
- {
- /* Base the value as an index from the base of the
- section */
-
+ case COFF_SYMBOL_GLOBAL:
dst->symbol.flags = BSF_EXPORT | BSF_GLOBAL;
-
#if defined COFF_WITH_PE
/* PE sets the symbol to a value relative to the
start of the section. */
@@ -3507,19 +4100,45 @@ coff_slurp_symbol_table (abfd)
dst->symbol.value = (src->u.syment.n_value
- dst->symbol.section->vma);
#endif
-
if (ISFCN ((src->u.syment.n_type)))
{
/* A function ext does not go at the end of a
file. */
dst->symbol.flags |= BSF_NOT_AT_END | BSF_FUNCTION;
}
+ break;
+
+ case COFF_SYMBOL_COMMON:
+ dst->symbol.section = bfd_com_section_ptr;
+ dst->symbol.value = src->u.syment.n_value;
+ break;
+
+ case COFF_SYMBOL_UNDEFINED:
+ dst->symbol.section = bfd_und_section_ptr;
+ dst->symbol.value = 0;
+ break;
+
+ case COFF_SYMBOL_PE_SECTION:
+ dst->symbol.flags |= BSF_EXPORT | BSF_SECTION_SYM;
+ dst->symbol.value = 0;
+ break;
+
+ case COFF_SYMBOL_LOCAL:
+ dst->symbol.flags = BSF_LOCAL;
+#if defined COFF_WITH_PE
+ /* PE sets the symbol to a value relative to the
+ start of the section. */
+ dst->symbol.value = src->u.syment.n_value;
+#else
+ dst->symbol.value = (src->u.syment.n_value
+ - dst->symbol.section->vma);
+#endif
+ if (ISFCN ((src->u.syment.n_type)))
+ dst->symbol.flags |= BSF_NOT_AT_END | BSF_FUNCTION;
+ break;
}
#ifdef RS6000COFF_C
- /* A C_HIDEXT symbol is not global. */
- if (src->u.syment.n_sclass == C_HIDEXT)
- dst->symbol.flags = BSF_LOCAL;
/* A symbol with a csect entry should not go at the end. */
if (src->u.syment.n_numaux > 0)
dst->symbol.flags |= BSF_NOT_AT_END;
@@ -3528,8 +4147,16 @@ coff_slurp_symbol_table (abfd)
#ifdef COFF_WITH_PE
if (src->u.syment.n_sclass == C_NT_WEAK)
dst->symbol.flags = BSF_WEAK;
+ if (src->u.syment.n_sclass == C_SECTION
+ && src->u.syment.n_scnum > 0)
+ {
+ dst->symbol.flags = BSF_LOCAL;
+ }
#endif
+ if (src->u.syment.n_sclass == C_WEAKEXT)
+ dst->symbol.flags = BSF_WEAK;
+
break;
case C_STAT: /* static */
@@ -3542,7 +4169,7 @@ coff_slurp_symbol_table (abfd)
case C_THUMBSTATFUNC:/* Thumb static function */
#endif
case C_LABEL: /* label */
- if (src->u.syment.n_scnum == -2)
+ if (src->u.syment.n_scnum == N_DEBUG)
dst->symbol.flags = BSF_DEBUGGING;
else
dst->symbol.flags = BSF_LOCAL;
@@ -3573,9 +4200,11 @@ coff_slurp_symbol_table (abfd)
#endif
case C_REGPARM: /* register parameter */
case C_REG: /* register variable */
+#ifndef TIC80COFF
#ifdef C_AUTOARG
case C_AUTOARG: /* 960-specific storage class */
#endif
+#endif
case C_TPDEF: /* type definition */
case C_ARG:
case C_AUTO: /* automatic variable */
@@ -3622,7 +4251,7 @@ coff_slurp_symbol_table (abfd)
for (sec = abfd->sections; sec != NULL; sec = sec->next)
if (sec->line_filepos <= (file_ptr) src->u.syment.n_value
&& ((file_ptr) (sec->line_filepos
- + sec->lineno_count * LINESZ)
+ + sec->lineno_count * bfd_coff_linesz (abfd))
> (file_ptr) src->u.syment.n_value))
break;
if (sec == NULL)
@@ -3632,7 +4261,7 @@ coff_slurp_symbol_table (abfd)
dst->symbol.section = sec;
dst->symbol.value = ((src->u.syment.n_value
- sec->line_filepos)
- / LINESZ);
+ / bfd_coff_linesz (abfd));
src->fix_line = 1;
}
}
@@ -3652,22 +4281,37 @@ coff_slurp_symbol_table (abfd)
#endif
case C_BLOCK: /* ".bb" or ".eb" */
- case C_FCN: /* ".bf" or ".ef" */
+ case C_FCN: /* ".bf" or ".ef" (or PE ".lf") */
case C_EFCN: /* physical end of function */
- dst->symbol.flags = BSF_LOCAL;
#if defined COFF_WITH_PE
/* PE sets the symbol to a value relative to the start
of the section. */
dst->symbol.value = src->u.syment.n_value;
+ if (strcmp (dst->symbol.name, ".bf") != 0)
+ {
+ /* PE uses funny values for .ef and .lf; don't
+ relocate them. */
+ dst->symbol.flags = BSF_DEBUGGING;
+ }
+ else
+ dst->symbol.flags = BSF_DEBUGGING | BSF_DEBUGGING_RELOC;
#else
/* Base the value as an index from the base of the
section. */
+ dst->symbol.flags = BSF_LOCAL;
dst->symbol.value = (src->u.syment.n_value
- dst->symbol.section->vma);
#endif
break;
case C_NULL:
+ /* PE DLLs sometimes have zeroed out symbols for some
+ reason. Just ignore them without a warning. */
+ if (src->u.syment.n_type == 0
+ && src->u.syment.n_value == 0
+ && src->u.syment.n_scnum == 0)
+ break;
+ /* Fall through. */
case C_EXTDEF: /* external definition */
case C_ULABEL: /* undefined label */
case C_USTATIC: /* undefined static */
@@ -3678,10 +4322,16 @@ 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
+ 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:
(*_bfd_error_handler)
- ("%s: Unrecognized storage class %d for %s symbol `%s'",
+ (_("%s: Unrecognized storage class %d for %s symbol `%s'"),
bfd_get_filename (abfd), src->u.syment.n_sclass,
dst->symbol.section->name, dst->symbol.name);
dst->symbol.flags = BSF_DEBUGGING;
@@ -3719,46 +4369,106 @@ coff_slurp_symbol_table (abfd)
return true;
} /* coff_slurp_symbol_table() */
-/* Check whether a symbol is globally visible. This is used by the
- COFF backend linker code in cofflink.c, since a couple of targets
- have globally visible symbols which are not class C_EXT. This
- function need not handle the case of n_class == C_EXT. */
-
-#undef OTHER_GLOBAL_CLASS
+/* Classify a COFF symbol. A couple of targets have globally visible
+ symbols which are not class C_EXT, and this handles those. It also
+ recognizes some special PE cases. */
+static enum coff_symbol_classification
+coff_classify_symbol (abfd, syment)
+ bfd *abfd;
+ struct internal_syment *syment;
+{
+ /* FIXME: This partially duplicates the switch in
+ coff_slurp_symbol_table. */
+ switch (syment->n_sclass)
+ {
+ case C_EXT:
+ case C_WEAKEXT:
#ifdef I960
-#define OTHER_GLOBAL_CLASS C_LEAFEXT
+ case C_LEAFEXT:
#endif
-
-#ifdef COFFARM
-#define OTHER_GLOBAL_CLASS C_THUMBEXT || syment->n_sclass == C_THUMBEXTFUNC
-#else
-#ifdef COFF_WITH_PE
-#define OTHER_GLOBAL_CLASS C_SECTION
+#ifdef ARM
+ case C_THUMBEXT:
+ case C_THUMBEXTFUNC:
+#endif
+#ifdef C_SYSTEM
+ case C_SYSTEM:
#endif
+#ifdef COFF_WITH_PE
+ case C_NT_WEAK:
#endif
+ if (syment->n_scnum == 0)
+ {
+ if (syment->n_value == 0)
+ return COFF_SYMBOL_UNDEFINED;
+ else
+ return COFF_SYMBOL_COMMON;
+ }
+ return COFF_SYMBOL_GLOBAL;
+
+ default:
+ break;
+ }
-#ifdef OTHER_GLOBAL_CLASS
+#ifdef COFF_WITH_PE
+ if (syment->n_sclass == C_STAT)
+ {
+ if (syment->n_scnum == 0)
+ {
+ /* The Microsoft compiler sometimes generates these if a
+ small static function is inlined every time it is used.
+ The function is discarded, but the symbol table entry
+ remains. */
+ return COFF_SYMBOL_LOCAL;
+ }
-static boolean coff_sym_is_global PARAMS ((bfd *, struct internal_syment *));
+#ifdef STRICT_PE_FORMAT
+ /* This is correct for Microsoft generated objects, but it
+ breaks gas generated objects. */
-static boolean
-coff_sym_is_global (abfd, syment)
- bfd * abfd;
- struct internal_syment * syment;
-{
- return (syment->n_sclass == OTHER_GLOBAL_CLASS);
-}
+ if (syment->n_value == 0)
+ {
+ asection *sec;
+ char buf[SYMNMLEN + 1];
+
+ sec = coff_section_from_bfd_index (abfd, syment->n_scnum);
+ if (sec != NULL
+ && (strcmp (bfd_get_section_name (abfd, sec),
+ _bfd_coff_internal_syment_name (abfd, syment, buf))
+ == 0))
+ return COFF_SYMBOL_PE_SECTION;
+ }
+#endif
+
+ return COFF_SYMBOL_LOCAL;
+ }
-#undef OTHER_GLOBAL_CLASS
+ if (syment->n_sclass == C_SECTION)
+ {
+ /* In some cases in a DLL generated by the Microsoft linker, the
+ n_value field will contain garbage. FIXME: This should
+ probably be handled by the swapping function instead. */
+ syment->n_value = 0;
+ if (syment->n_scnum == 0)
+ return COFF_SYMBOL_UNDEFINED;
+ return COFF_SYMBOL_PE_SECTION;
+ }
+#endif /* COFF_WITH_PE */
-#else /* ! defined (OTHER_GLOBAL_CLASS) */
+ /* If it is not a global symbol, we presume it is a local symbol. */
-/* sym_is_global should not be defined if it has nothing to do. */
+ if (syment->n_scnum == 0)
+ {
+ char buf[SYMNMLEN + 1];
-#define coff_sym_is_global 0
+ (*_bfd_error_handler)
+ (_("warning: %s: local symbol `%s' has no section"),
+ bfd_get_filename (abfd),
+ _bfd_coff_internal_syment_name (abfd, syment, buf));
+ }
-#endif /* ! defined (OTHER_GLOBAL_CLASS) */
+ return COFF_SYMBOL_LOCAL;
+}
/*
SUBSUBSECTION
@@ -3833,7 +4543,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
(RELOC *) buy_and_read (abfd,
asect->rel_filepos,
SEEK_SET,
- (size_t) (RELSZ *
+ (size_t) (bfd_coff_relsz (abfd) *
asect->reloc_count));
reloc_cache = (arelent *)
bfd_alloc (abfd, (size_t) (asect->reloc_count * sizeof (arelent)));
@@ -3865,7 +4575,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (dst.r_symndx < 0 || dst.r_symndx >= obj_conv_table_size (abfd))
{
(*_bfd_error_handler)
- ("%s: warning: illegal symbol index %ld in relocs",
+ (_("%s: warning: illegal symbol index %ld in relocs"),
bfd_get_filename (abfd), dst.r_symndx);
cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
@@ -3903,7 +4613,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (cache_ptr->howto == NULL)
{
(*_bfd_error_handler)
- ("%s: illegal relocation type %d at address 0x%lx",
+ (_("%s: illegal relocation type %d at address 0x%lx"),
bfd_get_filename (abfd), dst.r_type, (long) dst.r_vaddr);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -3931,12 +4641,12 @@ static reloc_howto_type *coff_rtype_to_howto
/*ARGSUSED*/
static reloc_howto_type *
coff_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd;
- asection *sec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
struct internal_reloc *rel;
- struct coff_link_hash_entry *h;
- struct internal_syment *sym;
- bfd_vma *addendp;
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
+ struct internal_syment *sym ATTRIBUTE_UNUSED;
+ bfd_vma *addendp ATTRIBUTE_UNUSED;
{
arelent genrel;
@@ -4010,13 +4720,14 @@ static int dummy_reloc16_estimate
static int
dummy_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
- bfd *abfd;
- asection *input_section;
- arelent *reloc;
- unsigned int shrink;
- struct bfd_link_info *link_info;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *input_section ATTRIBUTE_UNUSED;
+ arelent *reloc ATTRIBUTE_UNUSED;
+ unsigned int shrink ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
{
abort ();
+ return 0;
}
#endif
@@ -4034,13 +4745,13 @@ static void dummy_reloc16_extra_cases
static void
dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
dst_ptr)
- bfd *abfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- arelent *reloc;
- bfd_byte *data;
- unsigned int *src_ptr;
- unsigned int *dst_ptr;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ struct bfd_link_order *link_order ATTRIBUTE_UNUSED;
+ arelent *reloc ATTRIBUTE_UNUSED;
+ bfd_byte *data ATTRIBUTE_UNUSED;
+ unsigned int *src_ptr ATTRIBUTE_UNUSED;
+ unsigned int *dst_ptr ATTRIBUTE_UNUSED;
{
abort ();
}
@@ -4084,21 +4795,28 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#endif
#ifndef coff_link_output_has_begun
-#define coff_link_output_has_begun _coff_link_output_has_begun
+
+static boolean coff_link_output_has_begun
+ PARAMS ((bfd *, struct coff_final_link_info *));
+
static boolean
-_coff_link_output_has_begun (abfd)
+coff_link_output_has_begun (abfd, info)
bfd * abfd;
+ struct coff_final_link_info * info ATTRIBUTE_UNUSED;
{
return abfd->output_has_begun;
}
#endif
#ifndef coff_final_link_postscript
-#define coff_final_link_postscript _coff_final_link_postscript
+
+static boolean coff_final_link_postscript
+ PARAMS ((bfd *, struct coff_final_link_info *));
+
static boolean
-_coff_final_link_postscript (abfd, pfinfo)
- bfd * abfd;
- struct coff_final_link_info * pfinfo;
+coff_final_link_postscript (abfd, pfinfo)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ struct coff_final_link_info * pfinfo ATTRIBUTE_UNUSED;
{
return true;
}
@@ -4147,16 +4865,14 @@ _coff_final_link_postscript (abfd, pfinfo)
#define coff_SWAP_scnhdr_in coff_swap_scnhdr_in
#endif
-
-
-static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
+static const bfd_coff_backend_data bfd_coff_std_swap_table =
{
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
coff_SWAP_aux_out, coff_SWAP_sym_out,
coff_SWAP_lineno_out, coff_SWAP_reloc_out,
coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
coff_SWAP_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ,
+ FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
#ifdef COFF_LONG_FILENAMES
true,
#else
@@ -4173,7 +4889,7 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_sym_is_global, coff_compute_section_file_positions,
+ coff_classify_symbol, coff_compute_section_file_positions,
coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
coff_adjust_symndx, coff_link_add_one_symbol,
coff_link_output_has_begun, coff_final_link_postscript
@@ -4241,3 +4957,105 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
#ifndef coff_bfd_relax_section
#define coff_bfd_relax_section bfd_generic_relax_section
#endif
+
+#ifndef coff_bfd_gc_sections
+#define coff_bfd_gc_sections bfd_generic_gc_sections
+#endif
+
+#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
+const bfd_target VAR = \
+{ \
+ NAME , \
+ bfd_target_coff_flavour, \
+ BFD_ENDIAN_BIG, /* data byte order is big */ \
+ BFD_ENDIAN_BIG, /* header byte order is big */ \
+ /* object flags */ \
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
+ /* section flags */ \
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
+ UNDER, /* leading symbol underscore */ \
+ '/', /* ar_pad_char */ \
+ 15, /* ar_max_namelen */ \
+ \
+ /* Data conversion functions. */ \
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
+ \
+ /* Header conversion functions. */ \
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
+ \
+ /* bfd_check_format */ \
+ { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
+ _bfd_dummy_target }, \
+ /* bfd_set_format */ \
+ { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
+ /* bfd_write_contents */ \
+ { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
+ bfd_false }, \
+ \
+ BFD_JUMP_TABLE_GENERIC (coff), \
+ BFD_JUMP_TABLE_COPY (coff), \
+ BFD_JUMP_TABLE_CORE (_bfd_nocore), \
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), \
+ BFD_JUMP_TABLE_SYMBOLS (coff), \
+ BFD_JUMP_TABLE_RELOCS (coff), \
+ BFD_JUMP_TABLE_WRITE (coff), \
+ BFD_JUMP_TABLE_LINK (coff), \
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), \
+ \
+ ALTERNATIVE, \
+ \
+ COFF_SWAP_TABLE \
+};
+
+#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
+const bfd_target VAR = \
+{ \
+ NAME , \
+ bfd_target_coff_flavour, \
+ BFD_ENDIAN_LITTLE, /* data byte order is little */ \
+ BFD_ENDIAN_LITTLE, /* header byte order is little */ \
+ /* object flags */ \
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
+ /* section flags */ \
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
+ UNDER, /* leading symbol underscore */ \
+ '/', /* ar_pad_char */ \
+ 15, /* ar_max_namelen */ \
+ \
+ /* Data conversion functions. */ \
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64, \
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32, \
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, \
+ /* Header conversion functions. */ \
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64, \
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32, \
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, \
+ /* bfd_check_format */ \
+ { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
+ _bfd_dummy_target }, \
+ /* bfd_set_format */ \
+ { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
+ /* bfd_write_contents */ \
+ { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
+ bfd_false }, \
+ \
+ BFD_JUMP_TABLE_GENERIC (coff), \
+ BFD_JUMP_TABLE_COPY (coff), \
+ BFD_JUMP_TABLE_CORE (_bfd_nocore), \
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), \
+ BFD_JUMP_TABLE_SYMBOLS (coff), \
+ BFD_JUMP_TABLE_RELOCS (coff), \
+ BFD_JUMP_TABLE_WRITE (coff), \
+ BFD_JUMP_TABLE_LINK (coff), \
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), \
+ \
+ ALTERNATIVE, \
+ \
+ COFF_SWAP_TABLE \
+};
diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c
index b5ecbc9..f2410d9 100644
--- a/contrib/binutils/bfd/coffgen.c
+++ b/contrib/binutils/bfd/coffgen.c
@@ -1,5 +1,5 @@
/* Support for the generic parts of COFF, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -140,9 +140,9 @@ make_a_section_from_file (abfd, hdr, target_index)
return_section->lineno_count = hdr->s_nlnno;
return_section->userdata = NULL;
return_section->next = (asection *) NULL;
- return_section->flags = bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name);
-
return_section->target_index = target_index;
+ return_section->flags = bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name,
+ return_section);
/* At least on i386-coff, the line number count for a shared library
section must be ignored. */
@@ -211,6 +211,11 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
if (bfd_read ((PTR) external_sections, 1, readsize, abfd) != readsize)
goto fail;
+ /* Set the arch/mach *before* swapping in sections; section header swapping
+ may depend on arch/mach info. */
+ if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false)
+ goto fail;
+
/* Now copy data as required; construct all asections etc */
if (nscns != 0)
{
@@ -228,9 +233,6 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
/* make_abs_section (abfd); */
- if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false)
- goto fail;
-
return abfd->xvec;
fail:
@@ -559,7 +561,7 @@ coff_count_linenumbers (abfd)
/*ARGSUSED*/
coff_symbol_type *
coff_symbol_from (ignore_abfd, symbol)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
{
if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour)
@@ -585,7 +587,8 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
syment->n_scnum = N_UNDEF;
syment->n_value = coff_symbol_ptr->symbol.value;
}
- else if (coff_symbol_ptr->symbol.flags & BSF_DEBUGGING)
+ else if ((coff_symbol_ptr->symbol.flags & BSF_DEBUGGING) != 0
+ && (coff_symbol_ptr->symbol.flags & BSF_DEBUGGING_RELOC) == 0)
{
syment->n_value = coff_symbol_ptr->symbol.value;
}
@@ -594,6 +597,7 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
syment->n_scnum = N_UNDEF;
syment->n_value = 0;
}
+ /* FIXME: Do we need to handle the absolute section here? */
else
{
if (coff_symbol_ptr->symbol.section)
@@ -658,16 +662,18 @@ coff_renumber_symbols (bfd_ptr, first_undef)
if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0
|| (!bfd_is_und_section (symbol_ptr_ptr[i]->section)
&& !bfd_is_com_section (symbol_ptr_ptr[i]->section)
- && ((symbol_ptr_ptr[i]->flags & (BSF_GLOBAL | BSF_FUNCTION))
- != BSF_GLOBAL)))
+ && ((symbol_ptr_ptr[i]->flags & BSF_FUNCTION) != 0
+ || ((symbol_ptr_ptr[i]->flags & (BSF_GLOBAL | BSF_WEAK))
+ == 0))))
*newsyms++ = symbol_ptr_ptr[i];
for (i = 0; i < symbol_count; i++)
if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) == 0
&& !bfd_is_und_section (symbol_ptr_ptr[i]->section)
&& (bfd_is_com_section (symbol_ptr_ptr[i]->section)
- || ((symbol_ptr_ptr[i]->flags & (BSF_GLOBAL | BSF_FUNCTION))
- == BSF_GLOBAL)))
+ || ((symbol_ptr_ptr[i]->flags & BSF_FUNCTION) == 0
+ && ((symbol_ptr_ptr[i]->flags & (BSF_GLOBAL | BSF_WEAK))
+ != 0))))
*newsyms++ = symbol_ptr_ptr[i];
*first_undef = newsyms - bfd_ptr->outsymbols;
@@ -808,14 +814,18 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
if (native->u.syment.n_sclass == C_FILE
&& native->u.syment.n_numaux > 0)
{
+ unsigned int filnmlen;
+
strncpy (native->u.syment._n._n_name, ".file", SYMNMLEN);
auxent = &(native + 1)->u.auxent;
+ filnmlen = bfd_coff_filnmlen (abfd);
+
if (bfd_coff_long_filenames (abfd))
{
- if (name_length <= FILNMLEN)
+ if (name_length <= filnmlen)
{
- strncpy (auxent->x_file.x_fname, name, FILNMLEN);
+ strncpy (auxent->x_file.x_fname, name, filnmlen);
}
else
{
@@ -826,11 +836,9 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
}
else
{
- strncpy (auxent->x_file.x_fname, name, FILNMLEN);
- if (name_length > FILNMLEN)
- {
- name[FILNMLEN] = '\0';
- }
+ strncpy (auxent->x_file.x_fname, name, filnmlen);
+ if (name_length > filnmlen)
+ name[filnmlen] = '\0';
}
}
else
@@ -1032,6 +1040,8 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
native->u.syment.n_type = 0;
if (symbol->flags & BSF_LOCAL)
native->u.syment.n_sclass = C_STAT;
+ else if (symbol->flags & BSF_WEAK)
+ native->u.syment.n_sclass = obj_pe (abfd) ? C_NT_WEAK : C_WEAKEXT;
else
native->u.syment.n_sclass = C_EXT;
native->u.syment.n_numaux = 0;
@@ -1242,7 +1252,7 @@ coff_write_symbols (abfd)
}
else if (c_symbol->native->u.syment.n_sclass == C_FILE
&& c_symbol->native->u.syment.n_numaux > 0)
- maxlen = FILNMLEN;
+ maxlen = bfd_coff_filnmlen (abfd);
else
maxlen = SYMNMLEN;
@@ -1347,7 +1357,7 @@ coff_write_linenumbers (abfd)
/*ARGSUSED */
alent *
coff_get_lineno (ignore_abfd, symbol)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
{
return coffsymbol (symbol)->lineno;
@@ -1600,7 +1610,7 @@ _bfd_coff_read_string_table (abfd)
if (strsize < STRING_SIZE_SIZE)
{
(*_bfd_error_handler)
- ("%s: bad string table size %lu", bfd_get_filename (abfd),
+ (_("%s: bad string table size %lu"), bfd_get_filename (abfd),
(unsigned long) strsize);
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1742,10 +1752,26 @@ coff_get_normalized_symtab (abfd)
}
else
{
- /* ordinary short filename, put into memory anyway */
- internal_ptr->u.syment._n._n_n._n_offset = (long)
- copy_name (abfd, (internal_ptr + 1)->u.auxent.x_file.x_fname,
- FILNMLEN);
+ /* Ordinary short filename, put into memory anyway. The
+ Microsoft PE tools sometimes store a filename in
+ multiple AUX entries. */
+ if (internal_ptr->u.syment.n_numaux > 1
+ && coff_data (abfd)->pe)
+ {
+ internal_ptr->u.syment._n._n_n._n_offset =
+ ((long)
+ copy_name (abfd,
+ (internal_ptr + 1)->u.auxent.x_file.x_fname,
+ internal_ptr->u.syment.n_numaux * symesz));
+ }
+ else
+ {
+ internal_ptr->u.syment._n._n_n._n_offset =
+ ((long)
+ copy_name (abfd,
+ (internal_ptr + 1)->u.auxent.x_file.x_fname,
+ bfd_coff_filnmlen (abfd)));
+ }
}
}
else
@@ -1843,8 +1869,8 @@ coff_make_empty_symbol (abfd)
asymbol *
coff_bfd_make_debug_symbol (abfd, ptr, sz)
bfd *abfd;
- PTR ptr;
- unsigned long sz;
+ PTR ptr ATTRIBUTE_UNUSED;
+ unsigned long sz ATTRIBUTE_UNUSED;
{
coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type));
if (new == NULL)
@@ -2042,8 +2068,23 @@ coff_print_symbol (abfd, filep, symbol, how)
auxp->u.auxent.x_scn.x_comdat);
break;
}
+ /* else fall through */
+ case C_EXT:
+ if (ISFCN (combined->u.syment.n_type))
+ {
+ fprintf (file,
+ _("AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"),
+ tagndx,
+ auxp->u.auxent.x_sym.x_misc.x_fsize,
+ auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr,
+ (auxp->fix_end
+ ? ((long)
+ (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p
+ - root))
+ : auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l));
+ break;
+ }
/* else fall through */
-
default:
fprintf (file, "AUX lnno %d size 0x%x tagndx %ld",
auxp->u.auxent.x_sym.x_misc.x_lnsz.x_lnno,
@@ -2091,16 +2132,15 @@ coff_print_symbol (abfd, filep, symbol, how)
boolean
_bfd_coff_is_local_label_name (abfd, name)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
return name[0] == '.' && name[1] == 'L';
}
-/* Provided a BFD, a section and an offset into the section, calculate
- and return the name of the source file and the line nearest to the
- wanted location. */
-
+/* 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,
@@ -2186,9 +2226,11 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
}
}
+ /* We use <= MAXDIFF here so that if we get a zero length
+ file, we actually use the next file entry. */
if (p2 < pend
&& offset + sec_vma >= (bfd_vma) p2->u.syment.n_value
- && offset + sec_vma - (bfd_vma) p2->u.syment.n_value < maxdiff)
+ && offset + sec_vma - (bfd_vma) p2->u.syment.n_value <= maxdiff)
{
*filename_ptr = (char *) p->u.syment._n._n_n._n_offset;
maxdiff = offset + sec_vma - p2->u.syment.n_value;
@@ -2225,6 +2267,8 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
if (section->lineno != NULL)
{
+ bfd_vma last_value = 0;
+
l = &section->lineno[i];
for (; i < section->lineno_count; i++)
@@ -2236,6 +2280,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
if (coff->symbol.value > offset)
break;
*functionname_ptr = coff->symbol.name;
+ last_value = coff->symbol.value;
if (coff->native)
{
combined_entry_type *s = coff->native;
@@ -2264,6 +2309,20 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
}
l++;
}
+
+ /* If we fell off the end of the loop, then assume that this
+ symbol has no line number info. Otherwise, symbols with no
+ line number info get reported with the line number of the
+ last line of the last symbol which does have line number
+ info. We use 0x100 as a slop to account for cases where the
+ last line has executable code. */
+ if (i >= section->lineno_count
+ && last_value != 0
+ && offset - last_value > 0x100)
+ {
+ *functionname_ptr = NULL;
+ *line_ptr = 0;
+ }
}
/* Cache the results for the next call. */
@@ -2304,3 +2363,71 @@ coff_sizeof_headers (abfd, reloc)
size += abfd->section_count * bfd_coff_scnhsz (abfd);
return size;
}
+
+/* Change the class of a coff symbol held by BFD. */
+boolean
+bfd_coff_set_symbol_class (abfd, symbol, class)
+ bfd * abfd;
+ asymbol * symbol;
+ unsigned int class;
+{
+ coff_symbol_type * csym;
+
+ csym = coff_symbol_from (abfd, symbol);
+ if (csym == NULL)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
+ else if (csym->native == NULL)
+ {
+ /* This is an alien symbol which no native coff backend data.
+ 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));
+ if (native == NULL)
+ 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;
+ native->u.syment.n_value = symbol->value;
+ }
+ else if (bfd_is_com_section (symbol->section))
+ {
+ native->u.syment.n_scnum = N_UNDEF;
+ native->u.syment.n_value = symbol->value;
+ }
+ else
+ {
+ native->u.syment.n_scnum =
+ symbol->section->output_section->target_index;
+ native->u.syment.n_value = (symbol->value
+ + 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 7b2b830..609f665 100644
--- a/contrib/binutils/bfd/cofflink.c
+++ b/contrib/binutils/bfd/cofflink.c
@@ -1,5 +1,5 @@
/* COFF specific linker code.
- Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,6 +40,16 @@ static int process_embedded_commands
PARAMS ((bfd *, struct bfd_link_info *, bfd *));
static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *));
+/* 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
+ variables with the appropriate names, and with values from the
+ coff_data (abfd) structure. */
+
+#define N_TMASK n_tmask
+#define N_BTSHFT n_btshft
+#define N_BTMASK n_btmask
+
/* Create an entry in a COFF linker hash table. */
struct bfd_hash_entry *
@@ -225,30 +235,25 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
struct bfd_link_info *info;
boolean *pneeded;
{
- boolean (*sym_is_global) PARAMS ((bfd *, struct internal_syment *));
bfd_size_type symesz;
bfd_byte *esym;
bfd_byte *esym_end;
*pneeded = false;
- sym_is_global = coff_backend_info (abfd)->_bfd_coff_sym_is_global;
-
symesz = bfd_coff_symesz (abfd);
esym = (bfd_byte *) obj_coff_external_syms (abfd);
esym_end = esym + obj_raw_syment_count (abfd) * symesz;
while (esym < esym_end)
{
struct internal_syment sym;
+ enum coff_symbol_classification classification;
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
- if ((sym.n_sclass == C_EXT
-#ifdef C_SYSTEM
- || sym.n_sclass == C_SYSTEM
-#endif
- || (sym_is_global && (*sym_is_global) (abfd, &sym)))
- && (sym.n_scnum != 0 || sym.n_value != 0))
+ classification = bfd_coff_classify_symbol (abfd, &sym);
+ if (classification == COFF_SYMBOL_GLOBAL
+ || classification == COFF_SYMBOL_COMMON)
{
const char *name;
char buf[SYMNMLEN + 1];
@@ -290,7 +295,9 @@ coff_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
- boolean (*sym_is_global) PARAMS ((bfd *, struct internal_syment *));
+ unsigned int n_tmask = coff_data (abfd)->local_n_tmask;
+ unsigned int n_btshft = coff_data (abfd)->local_n_btshft;
+ unsigned int n_btmask = coff_data (abfd)->local_n_btmask;
boolean keep_syms;
boolean default_copy;
bfd_size_type symcount;
@@ -304,8 +311,6 @@ coff_link_add_symbols (abfd, info)
keep_syms = obj_coff_keep_syms (abfd);
obj_coff_keep_syms (abfd) = true;
- sym_is_global = coff_backend_info (abfd)->_bfd_coff_sym_is_global;
-
if (info->keep_memory)
default_copy = false;
else
@@ -332,21 +337,20 @@ coff_link_add_symbols (abfd, info)
while (esym < esym_end)
{
struct internal_syment sym;
+ enum coff_symbol_classification classification;
boolean copy;
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
- if (sym.n_sclass == C_EXT
-#ifdef C_SYSTEM
- || sym.n_sclass == C_SYSTEM
-#endif
- || (sym_is_global && (*sym_is_global) (abfd, &sym)))
+ classification = bfd_coff_classify_symbol (abfd, &sym);
+ if (classification != COFF_SYMBOL_LOCAL)
{
const char *name;
char buf[SYMNMLEN + 1];
flagword flags;
asection *section;
bfd_vma value;
+ boolean addit;
/* This symbol is externally visible. */
@@ -363,33 +367,119 @@ coff_link_add_symbols (abfd, info)
value = sym.n_value;
- if (sym.n_scnum == 0)
- {
- if (value == 0)
- {
- flags = 0;
- section = bfd_und_section_ptr;
- }
- else
- {
- flags = BSF_GLOBAL;
- section = bfd_com_section_ptr;
- }
- }
- else
+ switch (classification)
{
+ default:
+ abort ();
+
+ case COFF_SYMBOL_GLOBAL:
flags = BSF_EXPORT | BSF_GLOBAL;
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
if (! obj_pe (abfd))
value -= section->vma;
+ break;
+
+ case COFF_SYMBOL_UNDEFINED:
+ flags = 0;
+ section = bfd_und_section_ptr;
+ break;
+
+ case COFF_SYMBOL_COMMON:
+ flags = BSF_GLOBAL;
+ section = bfd_com_section_ptr;
+ break;
+
+ case COFF_SYMBOL_PE_SECTION:
+ flags = BSF_SECTION_SYM | BSF_GLOBAL;
+ section = coff_section_from_bfd_index (abfd, sym.n_scnum);
+ break;
}
- if (! (bfd_coff_link_add_one_symbol
- (info, abfd, name, flags, section, value,
- (const char *) NULL, copy, false,
- (struct bfd_link_hash_entry **) sym_hash)))
- goto error_return;
+ if (sym.n_sclass == C_WEAKEXT
+ || (obj_pe (abfd) && sym.n_sclass == C_NT_WEAK))
+ flags = BSF_WEAK;
+ addit = true;
+
+ /* In the PE format, section symbols actually refer to the
+ start of the output section. We handle them specially
+ here. */
+ if (obj_pe (abfd) && (flags & BSF_SECTION_SYM) != 0)
+ {
+ *sym_hash = coff_link_hash_lookup (coff_hash_table (info),
+ name, false, copy, false);
+ if (*sym_hash != NULL)
+ {
+ if (((*sym_hash)->coff_link_hash_flags
+ & COFF_LINK_HASH_PE_SECTION_SYMBOL) == 0
+ && (*sym_hash)->root.type != bfd_link_hash_undefined
+ && (*sym_hash)->root.type != bfd_link_hash_undefweak)
+ (*_bfd_error_handler)
+ ("Warning: symbol `%s' is both section and non-section",
+ name);
+
+ addit = false;
+ }
+ }
+
+ /* The Microsoft Visual C compiler does string pooling by
+ hashing the constants to an internal symbol name, and
+ relying on the the linker comdat support to discard
+ duplicate names. However, if one string is a literal and
+ one is a data initializer, one will end up in the .data
+ section and one will end up in the .rdata section. The
+ Microsoft linker will combine them into the .data
+ section, which seems to be wrong since it might cause the
+ literal to change.
+
+ As long as there are no external references to the
+ symbols, which there shouldn't be, we can treat the .data
+ and .rdata instances as separate symbols. The comdat
+ code in the linker will do the appropriate merging. Here
+ we avoid getting a multiple definition error for one of
+ these special symbols.
+
+ FIXME: I don't think this will work in the case where
+ there are two object files which use the constants as a
+ literal and two object files which use it as a data
+ initializer. One or the other of the second object files
+ is going to wind up with an inappropriate reference. */
+ if (obj_pe (abfd)
+ && (classification == COFF_SYMBOL_GLOBAL
+ || classification == COFF_SYMBOL_PE_SECTION)
+ && section->comdat != NULL
+ && strncmp (name, "??_", 3) == 0
+ && strcmp (name, section->comdat->name) == 0)
+ {
+ if (*sym_hash == NULL)
+ *sym_hash = coff_link_hash_lookup (coff_hash_table (info),
+ name, false, copy, false);
+ if (*sym_hash != NULL
+ && (*sym_hash)->root.type == bfd_link_hash_defined
+ && (*sym_hash)->root.u.def.section->comdat != NULL
+ && strcmp ((*sym_hash)->root.u.def.section->comdat->name,
+ section->comdat->name) == 0)
+ addit = false;
+ }
+
+ if (addit)
+ {
+ if (! (bfd_coff_link_add_one_symbol
+ (info, abfd, name, flags, section, value,
+ (const char *) NULL, copy, false,
+ (struct bfd_link_hash_entry **) sym_hash)))
+ goto error_return;
+ }
+
+ if (obj_pe (abfd) && (flags & BSF_SECTION_SYM) != 0)
+ (*sym_hash)->coff_link_hash_flags |=
+ COFF_LINK_HASH_PE_SECTION_SYMBOL;
+
+ /* Limit the alignment of a common symbol to the possible
+ alignment of a section. There is no point to permitting
+ a higher alignment for a common symbol: we can not
+ guarantee it, and it may cause us to allocate extra space
+ in the common section. */
if (section == bfd_com_section_ptr
&& (*sym_hash)->root.type == bfd_link_hash_common
&& ((*sym_hash)->root.u.c.p->alignment_power
@@ -399,24 +489,44 @@ coff_link_add_symbols (abfd, info)
if (info->hash->creator->flavour == bfd_get_flavour (abfd))
{
- if (((*sym_hash)->class == C_NULL
- && (*sym_hash)->type == T_NULL)
- || sym.n_scnum != 0
- || (sym.n_value != 0
- && (*sym_hash)->root.type != bfd_link_hash_defined))
- {
- (*sym_hash)->class = sym.n_sclass;
- if (sym.n_type != T_NULL)
- {
- if ((*sym_hash)->type != T_NULL
- && (*sym_hash)->type != sym.n_type)
- (*_bfd_error_handler)
- ("Warning: type of symbol `%s' changed from %d to %d in %s",
- name, (*sym_hash)->type, sym.n_type,
- bfd_get_filename (abfd));
- (*sym_hash)->type = sym.n_type;
- }
- (*sym_hash)->auxbfd = abfd;
+ /* If we don't have any symbol information currently in
+ the hash table, or if we are looking at a symbol
+ definition, then update the symbol class and type in
+ the hash table. */
+ if (((*sym_hash)->class == C_NULL
+ && (*sym_hash)->type == T_NULL)
+ || sym.n_scnum != 0
+ || (sym.n_value != 0
+ && (*sym_hash)->root.type != bfd_link_hash_defined
+ && (*sym_hash)->root.type != bfd_link_hash_defweak))
+ {
+ (*sym_hash)->class = sym.n_sclass;
+ if (sym.n_type != T_NULL)
+ {
+ /* We want to warn if the type changed, but not
+ if it changed from an unspecified type.
+ Testing the whole type byte may work, but the
+ change from (e.g.) a function of unspecified
+ type to function of known type also wants to
+ skip the warning. */
+ if ((*sym_hash)->type != T_NULL
+ && (*sym_hash)->type != sym.n_type
+ && !(DTYPE ((*sym_hash)->type) == DTYPE (sym.n_type)
+ && (BTYPE ((*sym_hash)->type) == T_NULL
+ || BTYPE (sym.n_type) == T_NULL)))
+ (*_bfd_error_handler)
+ (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
+ name, (*sym_hash)->type, sym.n_type,
+ bfd_get_filename (abfd));
+
+ /* We don't want to change from a meaningful
+ base type to a null one, but if we know
+ nothing, take what little we might now know. */
+ if (BTYPE (sym.n_type) != T_NULL
+ || (*sym_hash)->type == T_NULL)
+ (*sym_hash)->type = sym.n_type;
+ }
+ (*sym_hash)->auxbfd = abfd;
if (sym.n_numaux != 0)
{
union internal_auxent *alloc;
@@ -441,6 +551,26 @@ coff_link_add_symbols (abfd, info)
}
}
}
+
+ if (classification == COFF_SYMBOL_PE_SECTION
+ && (*sym_hash)->numaux != 0)
+ {
+ /* Some PE sections (such as .bss) have a zero size in
+ the section header, but a non-zero size in the AUX
+ record. Correct that here.
+
+ FIXME: This is not at all the right place to do this.
+ For example, it won't help objdump. This needs to be
+ done when we swap in the section header. */
+
+ BFD_ASSERT ((*sym_hash)->numaux == 1);
+ if (section->_raw_size == 0)
+ section->_raw_size = (*sym_hash)->aux[0].x_scn.x_scnlen;
+
+ /* FIXME: We could test whether the section sizes
+ matches the size in the aux entry, but apparently
+ that sometimes fails unexpectedly. */
+ }
}
esym += (sym.n_numaux + 1) * symesz;
@@ -768,7 +898,7 @@ _bfd_coff_final_link (abfd, info)
== bfd_target_coff_flavour))
{
sub = p->u.indirect.section->owner;
- if (! bfd_coff_link_output_has_begun (sub))
+ if (! bfd_coff_link_output_has_begun (sub, & finfo))
{
if (! _bfd_coff_link_input_bfd (&finfo, sub))
goto error_return;
@@ -1060,7 +1190,7 @@ char **dst;
static int
process_embedded_commands (output_bfd, info, abfd)
bfd *output_bfd;
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *abfd;
{
asection *sec = bfd_get_section_by_name (abfd, ".drectve");
@@ -1203,15 +1333,17 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
struct coff_final_link_info *finfo;
bfd *input_bfd;
{
- boolean (*sym_is_global) PARAMS ((bfd *, struct internal_syment *));
+ unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask;
+ unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft;
+#if 0
+ unsigned int n_btmask = coff_data (input_bfd)->local_n_btmask;
+#endif
boolean (*adjust_symndx) PARAMS ((bfd *, struct bfd_link_info *, bfd *,
asection *, struct internal_reloc *,
boolean *));
bfd *output_bfd;
const char *strings;
bfd_size_type syment_base;
- unsigned int n_tmask;
- unsigned int n_btshft;
boolean copy, hash;
bfd_size_type isymesz;
bfd_size_type osymesz;
@@ -1229,7 +1361,6 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Move all the symbols to the output file. */
output_bfd = finfo->output_bfd;
- sym_is_global = coff_backend_info (input_bfd)->_bfd_coff_sym_is_global;
strings = NULL;
syment_base = obj_raw_syment_count (output_bfd);
isymesz = bfd_coff_symesz (input_bfd);
@@ -1237,13 +1368,6 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
linesz = bfd_coff_linesz (input_bfd);
BFD_ASSERT (linesz == bfd_coff_linesz (output_bfd));
- n_tmask = coff_data (input_bfd)->local_n_tmask;
- n_btshft = coff_data (input_bfd)->local_n_btshft;
-
- /* Define macros so that ISFCN, et. al., macros work correctly. */
-#define N_TMASK n_tmask
-#define N_BTSHFT n_btshft
-
copy = false;
if (! finfo->info->keep_memory)
copy = true;
@@ -1284,6 +1408,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
while (esym < esym_end)
{
struct internal_syment isym;
+ enum coff_symbol_classification classification;
boolean skip;
boolean global;
boolean dont_skip_symbol;
@@ -1297,14 +1422,22 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
the symbol. */
isym = *isymp;
- if (isym.n_scnum != 0)
- *secpp = coff_section_from_bfd_index (input_bfd, isym.n_scnum);
- else
+ classification = bfd_coff_classify_symbol (input_bfd, &isym);
+ switch (classification)
{
- if (isym.n_value == 0)
- *secpp = bfd_und_section_ptr;
- else
- *secpp = bfd_com_section_ptr;
+ default:
+ abort ();
+ case COFF_SYMBOL_GLOBAL:
+ case COFF_SYMBOL_PE_SECTION:
+ case COFF_SYMBOL_LOCAL:
+ *secpp = coff_section_from_bfd_index (input_bfd, isym.n_scnum);
+ break;
+ case COFF_SYMBOL_COMMON:
+ *secpp = bfd_com_section_ptr;
+ break;
+ case COFF_SYMBOL_UNDEFINED:
+ *secpp = bfd_und_section_ptr;
+ break;
}
/* Extract the flag indicating if this symbol is used by a
@@ -1328,26 +1461,34 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (! skip)
{
- if (isym.n_sclass == C_EXT
-#ifdef C_SYSTEM
- || isym.n_sclass == C_SYSTEM
-#endif
- || (sym_is_global && (*sym_is_global) (input_bfd, &isym)))
+ switch (classification)
{
+ default:
+ abort ();
+ case COFF_SYMBOL_GLOBAL:
+ case COFF_SYMBOL_COMMON:
+ case COFF_SYMBOL_PE_SECTION:
/* This is a global symbol. Global symbols come at the
end of the symbol table, so skip them for now.
- Function symbols, however, are an exception, and are
- not moved to the end. */
+ Locally defined function symbols, however, are an
+ exception, and are not moved to the end. */
global = true;
if (! ISFCN (isym.n_type))
skip = true;
- }
- else
- {
+ break;
+
+ case COFF_SYMBOL_UNDEFINED:
+ /* Undefined symbols are left for the end. */
+ global = true;
+ skip = true;
+ break;
+
+ case COFF_SYMBOL_LOCAL:
/* This is a local symbol. Skip it if we are discarding
local symbols. */
if (finfo->info->discard == discard_all && ! dont_skip_symbol)
skip = true;
+ break;
}
}
@@ -1455,7 +1596,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
{
const char *elename;
char elebuf[SYMNMLEN + 1];
- char *copy;
+ char *name_copy;
bfd_coff_swap_sym_in (input_bfd, (PTR) esl, (PTR) islp);
@@ -1470,12 +1611,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (elename == NULL)
return false;
- copy = (char *) bfd_alloc (input_bfd, strlen (elename) + 1);
- if (copy == NULL)
+ name_copy = (char *) bfd_alloc (input_bfd,
+ strlen (elename) + 1);
+ if (name_copy == NULL)
return false;
- strcpy (copy, elename);
+ strcpy (name_copy, elename);
- (*epp)->name = copy;
+ (*epp)->name = name_copy;
(*epp)->type = islp->n_type;
(*epp)->tagndx = 0;
if (islp->n_numaux >= 1
@@ -1587,31 +1729,76 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
}
- if (isym.n_scnum > 0)
+ switch (isym.n_sclass)
{
- isym.n_scnum = (*secpp)->output_section->target_index;
- isym.n_value += (*secpp)->output_offset;
- if (! obj_pe (input_bfd))
- isym.n_value -= (*secpp)->vma;
- if (! obj_pe (finfo->output_bfd))
- isym.n_value += (*secpp)->output_section->vma;
- }
+ case C_AUTO:
+ case C_MOS:
+ case C_EOS:
+ case C_MOE:
+ case C_MOU:
+ case C_UNTAG:
+ case C_STRTAG:
+ case C_ENTAG:
+ case C_TPDEF:
+ case C_ARG:
+ case C_USTATIC:
+ case C_REG:
+ case C_REGPARM:
+ case C_FIELD:
+ /* The symbol value should not be modified. */
+ break;
+
+ case C_FCN:
+ if (obj_pe (input_bfd)
+ && strcmp (isym.n_name, ".bf") != 0
+ && isym.n_scnum > 0)
+ {
+ /* For PE, .lf and .ef get their value left alone,
+ while .bf gets relocated. However, they all have
+ "real" section numbers, and need to be moved into
+ the new section. */
+ isym.n_scnum = (*secpp)->output_section->target_index;
+ break;
+ }
+ /* Fall through. */
+ default:
+ case C_LABEL: /* Not completely sure about these 2 */
+ case C_EXTDEF:
+ case C_BLOCK:
+ case C_EFCN:
+ case C_NULL:
+ case C_EXT:
+ case C_STAT:
+ case C_SECTION:
+ case C_NT_WEAK:
+ /* Compute new symbol location. */
+ if (isym.n_scnum > 0)
+ {
+ isym.n_scnum = (*secpp)->output_section->target_index;
+ isym.n_value += (*secpp)->output_offset;
+ if (! obj_pe (input_bfd))
+ isym.n_value -= (*secpp)->vma;
+ if (! obj_pe (finfo->output_bfd))
+ isym.n_value += (*secpp)->output_section->vma;
+ }
+ break;
+
+ case C_FILE:
+ /* The value of a C_FILE symbol is the symbol index of
+ the next C_FILE symbol. The value of the last C_FILE
+ symbol is the symbol index to the first external
+ symbol (actually, coff_renumber_symbols does not get
+ this right--it just sets the value of the last C_FILE
+ symbol to zero--and nobody has ever complained about
+ it). We try to get this right, below, just before we
+ write the symbols out, but in the general case we may
+ have to write the symbol out twice. */
- /* The value of a C_FILE symbol is the symbol index of the
- next C_FILE symbol. The value of the last C_FILE symbol
- is the symbol index to the first external symbol
- (actually, coff_renumber_symbols does not get this
- right--it just sets the value of the last C_FILE symbol
- to zero--and nobody has ever complained about it). We
- try to get this right, below, just before we write the
- symbols out, but in the general case we may have to write
- the symbol out twice. */
- if (isym.n_sclass == C_FILE)
- {
if (finfo->last_file_index != -1
&& finfo->last_file.n_value != (long) output_index)
{
- /* We must correct the value of the last C_FILE entry. */
+ /* We must correct the value of the last C_FILE
+ entry. */
finfo->last_file.n_value = output_index;
if ((bfd_size_type) finfo->last_file_index >= syment_base)
{
@@ -1643,12 +1830,16 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
finfo->last_file_index = output_index;
finfo->last_file = isym;
+ break;
}
/* If doing task linking, convert normal global function symbols to
static functions. */
- if (finfo->info->task_link && isym.n_sclass == C_EXT)
+ 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)))
isym.n_sclass = C_STAT;
/* Output the symbol. */
@@ -1920,6 +2111,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
bfd_vma offset;
bfd_byte *eline;
bfd_byte *elineend;
+ bfd_byte *oeline;
+ boolean skipping;
/* FIXME: If SEC_HAS_CONTENTS is not for the section, then
build_link_order in ldwrite.c will not have created a
@@ -1941,7 +2134,9 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
offset = o->output_section->vma + o->output_offset - o->vma;
eline = finfo->linenos;
+ oeline = finfo->linenos;
elineend = eline + linesz * o->lineno_count;
+ skipping = false;
for (; eline < elineend; eline += linesz)
{
struct internal_lineno iline;
@@ -1961,11 +2156,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (indx < 0)
{
/* These line numbers are attached to a symbol
- which we are stripping. We should really
- just discard the line numbers, but that would
- be a pain because we have already counted
- them. */
- indx = 0;
+ which we are stripping. We must discard the
+ line numbers because reading them back with
+ no associated symbol (or associating them all
+ with symbol #0) will fail. We can't regain
+ the space in the output file, but at least
+ they're dense. */
+ skipping = true;
}
else
{
@@ -2004,23 +2201,32 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
is.n_type, is.n_sclass, 0,
is.n_numaux, auxptr);
}
+
+ skipping = false;
}
iline.l_addr.l_symndx = indx;
}
- bfd_coff_swap_lineno_out (output_bfd, (PTR) &iline, (PTR) eline);
+ if (!skipping)
+ {
+ bfd_coff_swap_lineno_out (output_bfd, (PTR) &iline,
+ (PTR) oeline);
+ oeline += linesz;
+ }
}
if (bfd_seek (output_bfd,
(o->output_section->line_filepos
+ o->output_section->lineno_count * linesz),
SEEK_SET) != 0
- || bfd_write (finfo->linenos, linesz, o->lineno_count,
- output_bfd) != linesz * o->lineno_count)
+ || (bfd_write (finfo->linenos, 1, oeline - finfo->linenos,
+ output_bfd)
+ != (bfd_size_type) (oeline - finfo->linenos)))
return false;
- o->output_section->lineno_count += o->lineno_count;
+ o->output_section->lineno_count +=
+ (oeline - finfo->linenos) / linesz;
}
}
@@ -2076,7 +2282,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
&& o->reloc_count != 0)
{
((*_bfd_error_handler)
- ("%s: relocs in section `%s', but it has no contents",
+ (_("%s: relocs in section `%s', but it has no contents"),
bfd_get_filename (input_bfd),
bfd_get_section_name (input_bfd, o)));
bfd_set_error (bfd_error_no_contents);
@@ -2219,7 +2425,10 @@ _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, o->output_offset,
+ contents,
+ (file_ptr)
+ (o->output_offset *
+ bfd_octets_per_byte (output_bfd)),
(o->_cooked_size != 0
? o->_cooked_size
: o->_raw_size)))
@@ -2337,12 +2546,15 @@ _bfd_coff_write_global_sym (h, data)
if (isym.n_sclass == C_NULL)
isym.n_sclass = C_EXT;
- /* 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. */
+ /* 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. */
if (finfo->global_to_static)
{
- if (isym.n_sclass != C_EXT)
+ if (isym.n_sclass != C_EXT
+ && isym.n_sclass != C_WEAKEXT
+ && (! obj_pe (output_bfd) || isym.n_sclass != C_NT_WEAK))
{
return true;
}
@@ -2369,11 +2581,64 @@ _bfd_coff_write_global_sym (h, data)
++obj_raw_syment_count (output_bfd);
- /* Write out any associated aux entries. There normally will be
- none. If there are any, I have no idea how to modify them. */
+ /* Write out any associated aux entries. Most of the aux entries
+ will have been modified in _bfd_coff_link_input_bfd. We have to
+ handle section aux entries here, now that we have the final
+ relocation and line number counts. */
for (i = 0; i < isym.n_numaux; i++)
{
- bfd_coff_swap_aux_out (output_bfd, (PTR) (h->aux + i), isym.n_type,
+ union internal_auxent *auxp;
+
+ auxp = h->aux + i;
+
+ /* Look for a section aux entry here using the same tests that
+ coff_swap_aux_out uses. */
+ if (i == 0
+ && (isym.n_sclass == C_STAT
+ || isym.n_sclass == C_HIDDEN)
+ && isym.n_type == T_NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak))
+ {
+ asection *sec;
+
+ sec = h->root.u.def.section->output_section;
+ if (sec != NULL)
+ {
+ auxp->x_scn.x_scnlen = (sec->_cooked_size != 0
+ ? sec->_cooked_size
+ : sec->_raw_size);
+
+ /* For PE, an overflow on the final link reportedly does
+ not matter. FIXME: Why not? */
+
+ if (sec->reloc_count > 0xffff
+ && (! obj_pe (output_bfd)
+ || finfo->info->relocateable))
+ (*_bfd_error_handler)
+ (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
+ bfd_get_filename (output_bfd),
+ bfd_get_section_name (output_bfd, sec),
+ sec->reloc_count);
+
+ if (sec->lineno_count > 0xffff
+ && (! obj_pe (output_bfd)
+ || finfo->info->relocateable))
+ (*_bfd_error_handler)
+ (_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
+ bfd_get_filename (output_bfd),
+ bfd_get_section_name (output_bfd, sec),
+ sec->lineno_count);
+
+ auxp->x_scn.x_nreloc = sec->reloc_count;
+ auxp->x_scn.x_nlinno = sec->lineno_count;
+ auxp->x_scn.x_checksum = 0;
+ auxp->x_scn.x_associated = 0;
+ auxp->x_scn.x_comdat = 0;
+ }
+ }
+
+ bfd_coff_swap_aux_out (output_bfd, (PTR) auxp, isym.n_type,
isym.n_sclass, i, isym.n_numaux,
(PTR) finfo->outsyms);
if (bfd_write (finfo->outsyms, symesz, 1, output_bfd) != symesz)
@@ -2475,7 +2740,9 @@ _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) link_order->offset, size);
+ (file_ptr)
+ (link_order->offset *
+ bfd_octets_per_byte (output_bfd)), size);
free (buf);
if (! ok)
return false;
@@ -2586,6 +2853,14 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
h = NULL;
sym = NULL;
}
+ else if (symndx < 0
+ || (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
+ {
+ (*_bfd_error_handler)
+ ("%s: illegal symbol index %ld in relocs",
+ bfd_get_filename (input_bfd), symndx);
+ return false;
+ }
else
{
h = obj_coff_sym_hashes (input_bfd)[symndx];
@@ -2658,7 +2933,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
+ rel->r_vaddr - input_section->vma, true)))
return false;
}
}
@@ -2702,7 +2977,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- ("%s: bad reloc address 0x%lx in section `%s'",
+ (_("%s: bad reloc address 0x%lx in section `%s'"),
bfd_get_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h
index ff76e9e..d7d090f 100644
--- a/contrib/binutils/bfd/coffswap.h
+++ b/contrib/binutils/bfd/coffswap.h
@@ -1,5 +1,6 @@
/* Generic COFF swapping routines, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,10 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Any file which uses this must first include "coff/internal.h" and
"coff/CPU.h". The functions will then be correct for that CPU. */
-#ifndef IMAGE_BASE
-#define IMAGE_BASE 0
-#endif
-
#define PUTWORD bfd_h_put_32
#define PUTHALF bfd_h_put_16
#define PUTBYTE bfd_h_put_8
@@ -264,7 +261,7 @@ coff_swap_reloc_out (abfd, src, dst)
SWAP_OUT_RELOC_EXTRA(abfd,reloc_src, reloc_dst);
#endif
- return RELSZ;
+ return bfd_coff_relsz (abfd);
}
#endif /* NO_COFF_RELOCS */
@@ -288,6 +285,9 @@ coff_swap_filehdr_in (abfd, src, dst)
filehdr_dst->f_nsyms = bfd_h_get_32(abfd, (bfd_byte *)filehdr_src-> f_nsyms);
filehdr_dst->f_opthdr = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_opthdr);
filehdr_dst->f_flags = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_flags);
+#ifdef TIC80_TARGET_ID
+ filehdr_dst->f_target_id = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_target_id);
+#endif
#ifdef COFF_ADJUST_FILEHDR_IN_POST
COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
@@ -314,11 +314,14 @@ coff_swap_filehdr_out (abfd, in, out)
bfd_h_put_32(abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms);
bfd_h_put_16(abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr);
bfd_h_put_16(abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags);
+#ifdef TIC80_TARGET_ID
+ bfd_h_put_16(abfd, filehdr_in->f_target_id, (bfd_byte *) filehdr_out->f_target_id);
+#endif
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
#endif
- return FILHSZ;
+ return bfd_coff_filhsz (abfd);
}
@@ -354,6 +357,9 @@ coff_swap_sym_in (abfd, ext1, in1)
}
in->n_sclass = bfd_h_get_8(abfd, ext->e_sclass);
in->n_numaux = bfd_h_get_8(abfd, ext->e_numaux);
+#ifdef COFF_ADJUST_SYM_IN_POST
+ COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
+#endif
}
static unsigned int
@@ -387,6 +393,9 @@ coff_swap_sym_out (abfd, inp, extp)
}
bfd_h_put_8(abfd, in->n_sclass , ext->e_sclass);
bfd_h_put_8(abfd, in->n_numaux , ext->e_numaux);
+#ifdef COFF_ADJUST_SYM_OUT_POST
+ COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
+#endif
return SYMESZ;
}
@@ -416,7 +425,16 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
#if FILNMLEN != E_FILNMLEN
-> Error, we need to cope with truncating or extending FILNMLEN!;
#else
- memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+ if (numaux > 1)
+ {
+ if (indx == 0)
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+ numaux * sizeof (AUXENT));
+ }
+ else
+ {
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+ }
#endif
}
goto end;
@@ -512,8 +530,8 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PTR inp;
int type;
int class;
- int indx;
- int numaux;
+ int indx ATTRIBUTE_UNUSED;
+ int numaux ATTRIBUTE_UNUSED;
PTR extp;
{
union internal_auxent *in = (union internal_auxent *)inp;
@@ -833,7 +851,7 @@ coff_swap_scnhdr_out (abfd, in, out)
{
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *)in;
SCNHDR *scnhdr_ext = (SCNHDR *)out;
- unsigned int ret = SCNHSZ;
+ unsigned int ret = bfd_coff_scnhsz (abfd);
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
@@ -870,7 +888,7 @@ coff_swap_scnhdr_out (abfd, in, out)
memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
buf[sizeof (scnhdr_int->s_name)] = '\0';
(*_bfd_error_handler)
- ("%s: warning: %s: line number overflow: 0x%lx > 0xffff",
+ (_("%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);
@@ -883,7 +901,7 @@ coff_swap_scnhdr_out (abfd, in, out)
memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
buf[sizeof (scnhdr_int->s_name)] = '\0';
- (*_bfd_error_handler) ("%s: %s: reloc overflow: 0x%lx > 0xffff",
+ (*_bfd_error_handler) (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
buf, scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd
index 589bb8f..d8f91d2 100755
--- a/contrib/binutils/bfd/config.bfd
+++ b/contrib/binutils/bfd/config.bfd
@@ -30,16 +30,19 @@ targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
case "${targ_cpu}" in
alpha*) targ_archs=bfd_alpha_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
-c30*) targ_archs=bfd_tic30_arch ;;
+strongarm*) targ_archs=bfd_arm_arch ;;
thumb*) targ_archs=bfd_arm_arch ;;
+c30*) targ_archs=bfd_tic30_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
i[3456]86) targ_archs=bfd_i386_arch ;;
+i370) targ_archs=bfd_i370_arch ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
+pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
-sparc*) targ_archs=bfd_sparc_arch ;;
+sparc*) targ_archs=bfd_sparc_arch ;;
v850*) targ_archs=bfd_v850_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
*) targ_archs=bfd_${targ_cpu}_arch ;;
@@ -54,7 +57,7 @@ esac
case "${targ}" in
# START OF targmatch.h
#ifdef BFD64
- alpha*-*-netbsd*)
+ alpha*-*-netbsd* | alpha*-*-freebsd*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
;;
@@ -71,7 +74,7 @@ case "${targ}" in
targ_selvecs=ecoffalpha_little_vec
;;
alpha*-*-*vms*)
- targ_defvec=evax_alpha_vec
+ targ_defvec=vms_alpha_vec
;;
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
@@ -83,9 +86,24 @@ case "${targ}" in
targ_selvecs=bfd_elf32_bigarc_vec
;;
+ arm-*-netbsd*)
+ targ_defvec=armnetbsd_vec
+ targ_underscore=yes
+ ;;
arm-*-riscix*)
targ_defvec=riscix_vec
;;
+ arm-epoc-pe*)
+ targ_defvec=arm_epoc_pe_little_vec
+ targ_selvecs="arm_epoc_pe_little_vec arm_epoc_pe_big_vec arm_epoc_pei_little_vec arm_epoc_pei_big_vec"
+ targ_underscore=no
+ ;;
+ arm-wince-pe | arm-*-wince)
+ targ_defvec=armpe_little_vec
+ targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
+ targ_underscore=no
+ targ_cflags=-DARM_WINCE
+ ;;
arm-*-pe*)
targ_defvec=armpe_little_vec
targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
@@ -104,16 +122,48 @@ case "${targ}" in
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
+ arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix*)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+ arm-*-oabi)
+ targ_defvec=bfd_elf32_littlearm_oabi_vec
+ targ_selvecs=bfd_elf32_bigarm_oabi_vec
+ ;;
+
thumb-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
+ thumb-*-oabi)
+ targ_defvec=bfd_elf32_littlearm_oabi_vec
+ targ_selvecs=bfd_elf32_bigarm_oabi_vec
+ ;;
+ thumb-*-elf)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+ thumb-epoc-pe*)
+ targ_defvec=arm_epoc_pe_little_vec
+ targ_selvecs="arm_epoc_pe_little_vec arm_epoc_pe_big_vec arm_epoc_pei_little_vec arm_epoc_pei_big_vec"
+ targ_underscore=no
+ ;;
thumb-*-pe*)
targ_defvec=armpe_little_vec
targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
targ_underscore=yes
;;
+ strongarm-*-elf)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+ strongarm-*-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*)
targ_defvec=a29kcoff_big_vec
@@ -125,6 +175,10 @@ case "${targ}" in
targ_underscore=yes
;;
+ avr-*-*)
+ targ_defvec=bfd_elf32_avr_vec
+ ;;
+
c30-*-*aout* | tic30-*-*aout*)
targ_defvec=tic30_aout_vec
;;
@@ -136,6 +190,13 @@ case "${targ}" in
targ_defvec=bfd_elf32_d10v_vec
;;
+ d30v-*-*)
+ targ_defvec=bfd_elf32_d30v_vec
+ ;;
+
+ fr30-*-elf)
+ targ_defvec=bfd_elf32_fr30_vec
+ ;;
h8300*-*-*)
@@ -148,41 +209,60 @@ case "${targ}" in
targ_underscore=yes
;;
- hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*)
+#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
;;
-#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF)
+#endif
+#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
;;
- hppa*-*-hpux* | hppa*-*-hiux*)
+#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-*-*)
+ targ_defvec=bfd_elf32_i370_vec
+ targ_selvecs="bfd_elf32_i370_vec"
+ ;;
i[3456]86-*-sco3.2v5*coff)
targ_defvec=i386coff_vec
+ targ_selvecs=bfd_elf32_i386_vec
;;
- i[3456]86-*-sysv4* | i[3456]86-*-unixware | i[3456]86-*-solaris2* | \
- i[3456]86-*-elf | i[3456]86-*-sco3.2v5* | i[3456]86-*-freebsdelf* | \
- i[3456]86-*-dgux*)
+ i[3456]86-*-sysv4* | i[3456]86-*-unixware* | i[3456]86-*-solaris2* | \
+ i[3456]86-*-elf | i[3456]86-*-sco3.2v5* | \
+ i[3456]86-*-dgux* | i[3456]86-*-sysv5*)
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-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* )
targ_defvec=go32coff_vec
targ_selvecs="go32stubbedcoff_vec i386aout_vec"
;;
i[3456]86-*-sysv* | i[3456]86-*-isc* | i[3456]86-*-sco* | i[3456]86-*-coff | \
- i[3456]86-*-aix* | i[3456]86*-*-rtems*)
+ i[3456]86-*-aix*)
targ_defvec=i386coff_vec
;;
- i[3456]86-sequent-bsd*)
+ i[3456]86*-*-rtems*)
+ targ_defvec=i386coff_vec
+ targ_selvecs="bfd_elf32_i386_vec i386aout_vec"
+ ;;
+ i[3456]86-sequent-bsd*)
targ_defvec=i386dynix_vec
targ_underscore=yes
;;
@@ -190,11 +270,16 @@ case "${targ}" in
targ_defvec=i386bsd_vec
targ_underscore=yes
;;
- i[3456]86-*-freebsd*)
+ i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | \
+ i[3456]86-*-freebsd[12])
targ_defvec=i386freebsd_vec
targ_selvecs=i386bsd_vec
targ_underscore=yes
;;
+ i[3456]86-*-freebsd*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386coff_vec
+ ;;
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
targ_defvec=i386netbsd_vec
targ_selvecs=i386bsd_vec
@@ -236,16 +321,34 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386msdos_vec i386aout_vec"
;;
- i[3456]86-*-mingw32* | i[3456]86-*-cygwin32* | i[3456]86-*-winnt | i[3456]86-*-pe)
+ i[3456]86-*-beospe*)
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec"
;;
+ i[3456]86-*-beoself* | i[3456]86-*-beos*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs="i386pe_vec i386pei_vec"
+ ;;
+ i[3456]86-*-interix*)
+ targ_defvec=i386pei_vec
+ targ_selvecs="i386pe_vec"
+ # FIXME: This should eventually be checked at runtime.
+ targ_cflags=-DSTRICT_PE_FORMAT
+ ;;
+ i[3456]86-*-mingw32* | i[3456]86-*-cygwin* | i[3456]86-*-winnt | i[3456]86-*-pe)
+ targ_defvec=i386pe_vec
+ targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"
+ ;;
i[3456]86-none-*)
targ_defvec=i386coff_vec
;;
i[3456]86-*-aout* | i[3456]86*-*-vsta*)
targ_defvec=i386aout_vec
;;
+ i[3456]86-*-vxworks*)
+ targ_defvec=i386aout_vec
+ targ_underscore=yes
+ ;;
i860-*-mach3* | i860-*-osf1* | i860-*-coff*)
targ_defvec=i860coff_vec
@@ -269,6 +372,10 @@ case "${targ}" in
targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec ieee_vec"
targ_underscore=yes
;;
+ i960-*-elf*)
+ targ_defvec=bfd_elf32_i960_vec
+ targ_selvecs="icoff_little_vec icoff_big_vec"
+ ;;
m32r-*-*)
targ_defvec=bfd_elf32_m32r_vec
@@ -290,17 +397,21 @@ case "${targ}" in
;;
m68*-*-aout*)
targ_defvec=aout0_big_vec
- # We include cisco_core_vec here, rather than making a separate cisco
+ # We include cisco_core_big_vec here, rather than making a separate cisco
# configuration, so that cisco-core.c gets routinely tested at
# least for compilation.
- targ_selvecs="cisco_core_vec ieee_vec"
+ targ_selvecs="cisco_core_big_vec ieee_vec"
targ_underscore=yes
;;
m68*-*-elf* | m68*-*-sysv4*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68kcoff_vec ieee_vec"
;;
- m68*-*-coff* | m68*-*-sysv* | m68*-*-rtems*)
+ m68*-*-rtems*)
+ targ_defvec=m68kcoff_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"
;;
@@ -317,6 +428,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68klinux_vec
;;
+ m68*-*-gnu*)
+ targ_defvec=bfd_elf32_m68k_vec
+ # targ_selvecs=m68kmach3_vec
+ # targ_cflags=-DSTAT_FOR_EXEC
+ ;;
m68*-*-lynxos*)
targ_defvec=m68klynx_coff_vec
targ_selvecs=m68klynx_aout_vec
@@ -367,6 +483,15 @@ case "${targ}" in
targ_underscore=yes
;;
+ mcore-*-elf)
+ targ_defvec=bfd_elf32_mcore_big_vec
+ targ_selvecs="bfd_elf32_mcore_big_vec bfd_elf32_mcore_little_vec"
+ ;;
+ mcore-*-pe)
+ targ_defvec=mcore_pe_big_vec
+ targ_selvecs="mcore_pe_big_vec mcore_pe_little_vec mcore_pei_big_vec mcore_pei_little_vec"
+ ;;
+
mips*-big-*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
@@ -415,6 +540,11 @@ case "${targ}" in
targ_defvec=aout_mips_little_vec
targ_cflags=-DSTAT_FOR_EXEC
;;
+ mips*-*-pe*)
+ targ_defvec=mipslpe_vec
+ targ_selvecs="mipslpei_vec mipslpei_vec ecoff_little_vec ecoff_big_vec"
+ targ_underscore=yes
+ ;;
mips*-*-sysv4*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
@@ -423,11 +553,11 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
- mips*el-*-elf*)
+ mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
- mips*-*-elf* | mips*-*-rtems*)
+ mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
@@ -461,13 +591,24 @@ case "${targ}" in
targ_underscore=yes
;;
+ pj-*-*)
+ targ_defvec=bfd_elf32_pj_vec
+ targ_selvecs="bfd_elf32_pj_vec bfd_elf32_pjl_vec"
+ ;;
+
+ pjl-*-*)
+ targ_defvec=bfd_elf32_pjl_vec
+ targ_selvecs="bfd_elf32_pjl_vec bfd_elf32_pj_vec bfd_elf32_i386_vec"
+ ;;
+
powerpc-*-aix* | powerpc-*-beos*)
targ_defvec=rs6000coff_vec
;;
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems*)
+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
+ powerpc-*-vxworks*)
targ_defvec=bfd_elf32_powerpc_vec
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec ppcboot_vec"
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
;;
powerpc-*-macos* | powerpc-*-mpw*)
targ_defvec=pmac_xcoff_vec
@@ -477,12 +618,13 @@ case "${targ}" in
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu*)
+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
+ powerpcle-*-rtems*)
targ_defvec=bfd_elf32_powerpcle_vec
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec ppcboot_vec"
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
;;
- powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin32*)
+ powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
targ_defvec=bfd_powerpcle_pe_vec
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
;;
@@ -491,11 +633,16 @@ case "${targ}" in
targ_defvec=rs6000coff_vec
;;
- sh-*-elf*)
+ 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"
targ_underscore=yes
;;
+ sh-*-pe)
+ targ_defvec=shlpe_vec
+ targ_selvecs="shlpe_vec shlpei_vec"
+ targ_underscore=yes
+ ;;
sh-*-* | sh-*-rtems*)
targ_defvec=shcoff_vec
targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
@@ -507,7 +654,11 @@ case "${targ}" in
targ_selvecs=sparcle_aout_vec
targ_underscore=yes
;;
- sparclite-*-elf*)
+ sparc86x-*-aout*)
+ targ_defvec=sunos_big_vec
+ targ_underscore=yes
+ ;;
+ sparclite-*-elf* | sparc86x-*-elf*)
targ_defvec=bfd_elf32_sparc_vec
;;
sparc-*-linux*aout*)
@@ -517,20 +668,35 @@ case "${targ}" in
;;
sparc-*-linux-gnu*)
targ_defvec=bfd_elf32_sparc_vec
- targ_selvecs="sparclinux_vec sunos_big_vec"
+ targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
;;
sparc-*-lynxos*)
targ_defvec=sparclynx_coff_vec
targ_selvecs=sparclynx_aout_vec
;;
- sparc-*-netbsd* | sparc-*-openbsd*)
+ sparc-*-netbsdelf*)
+ targ_defvec=bfd_elf32_sparc_vec
+ targ_selvecs=sparcnetbsd_vec
+ ;;
+ sparc-*-netbsdaout* | sparc-*-netbsd*)
+ targ_defvec=sparcnetbsd_vec
+ targ_selvecs=bfd_elf32_sparc_vec
+ targ_underscore=yes
+ ;;
+ sparc-*-openbsd*)
targ_defvec=sparcnetbsd_vec
targ_underscore=yes
;;
- sparc-*-elf* | sparc-*-solaris2*)
+ sparc-*-elf* | sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sunos_big_vec
;;
+#ifdef BFD64
+ sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
+ targ_defvec=bfd_elf32_sparc_vec
+ targ_selvecs="bfd_elf64_sparc_vec sunos_big_vec"
+ ;;
+#endif
sparc-*-sysv4*)
targ_defvec=bfd_elf32_sparc_vec
;;
@@ -567,9 +733,21 @@ case "${targ}" in
;;
#endif
+ tic80*-*-*)
+ targ_defvec=tic80coff_vec
+ targ_underscore=yes
+ ;;
+
+
v850-*-*)
targ_defvec=bfd_elf32_v850_vec
;;
+ v850e-*-*)
+ targ_defvec=bfd_elf32_v850_vec
+ ;;
+ v850ea-*-*)
+ targ_defvec=bfd_elf32_v850_vec
+ ;;
#if HAVE_host_aout_vec
vax-*-bsd* | vax-*-ultrix*)
targ_defvec=host_aout_vec
@@ -577,6 +755,10 @@ case "${targ}" in
;;
#endif
+ vax*-*-*vms*)
+ targ_defvec=vms_vax_vec
+ ;;
+
we32k-*-*)
targ_defvec=we32kcoff_vec
;;
@@ -615,3 +797,16 @@ case "${targ}" in
exit 1
;;
esac
+
+# If we support any ELF target, then automatically add support for the
+# generic ELF targets. This permits an objdump with some ELF support
+# to be used on an arbitrary ELF file for anything other than
+# relocation information.
+case "${targ_defvec} ${targ_selvecs}" in
+ *bfd_elf64*)
+ targ_selvecs="${targ_selvecs} bfd_elf64_little_generic_vec bfd_elf64_big_generic_vec bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec"
+ ;;
+ *bfd_elf32*)
+ targ_selvecs="${targ_selvecs} bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec"
+ ;;
+esac
diff --git a/contrib/binutils/bfd/config.in b/contrib/binutils/bfd/config.in
index 8df4887..7383656 100644
--- a/contrib/binutils/bfd/config.in
+++ b/contrib/binutils/bfd/config.in
@@ -1,46 +1,62 @@
/* config.in. Generated automatically from configure.in by autoheader. */
-/* Name of package. */
-#undef PACKAGE
-
-/* Version of package. */
-#undef VERSION
-
-/* Whether strstr must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRSTR
+/* Define if using alloca.c. */
+#undef C_ALLOCA
-/* Whether malloc must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_MALLOC
+/* Define to empty if the keyword does not work. */
+#undef const
-/* Whether realloc must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_REALLOC
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
-/* Whether free must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_FREE
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
-/* Whether getenv must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_GETENV
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> 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 <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
-/* Do we need to use the b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
-/* Name of host specific header file to include in trad-core.c. */
-#undef TRAD_HEADER
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
-/* Define only if <sys/procfs.h> is available *and* it defines prstatus_t. */
-#undef HAVE_SYS_PROCFS_H
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Do we really want to use mmap if it's available? */
-#undef USE_MMAP
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
/* Define if you have the fcntl function. */
#undef HAVE_FCNTL
@@ -48,24 +64,75 @@
/* Define if you have the fdopen function. */
#undef HAVE_FDOPEN
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getgid function. */
+#undef HAVE_GETGID
+
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
+/* Define if you have the getuid function. */
+#undef HAVE_GETUID
+
/* Define if you have the madvise function. */
#undef HAVE_MADVISE
/* Define if you have the mprotect function. */
#undef HAVE_MPROTECT
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
/* Define if you have the setitimer function. */
#undef HAVE_SETITIMER
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
/* Define if you have the sysconf function. */
#undef HAVE_SYSCONF
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <ndir.h> header file. */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
@@ -78,9 +145,21 @@
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
+/* Define if you have the <sys/dir.h> header file. */
+#undef HAVE_SYS_DIR_H
+
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
+/* Define if you have the <sys/ndir.h> header file. */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/procfs.h> header file. */
+#undef HAVE_SYS_PROCFS_H
+
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
@@ -89,3 +168,76 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
+
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
+
+/* Define if malloc is not declared in system header files. */
+#undef NEED_DECLARATION_MALLOC
+
+/* Define if realloc is not declared in system header files. */
+#undef NEED_DECLARATION_REALLOC
+
+/* Define if free is not declared in system header files. */
+#undef NEED_DECLARATION_FREE
+
+/* Define if getenv is not declared in system header files. */
+#undef NEED_DECLARATION_GETENV
+
+/* Define if <sys/procfs.h> has prstatus_t. */
+#undef HAVE_PRSTATUS_T
+
+/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
+#undef HAVE_PRSTATUS_T_PR_WHO
+
+/* Define if <sys/procfs.h> has pstatus_t. */
+#undef HAVE_PSTATUS_T
+
+/* Define if <sys/procfs.h> has prpsinfo_t. */
+#undef HAVE_PRPSINFO_T
+
+/* Define if <sys/procfs.h> has psinfo_t. */
+#undef HAVE_PSINFO_T
+
+/* Define if <sys/procfs.h> has lwpstatus_t. */
+#undef HAVE_LWPSTATUS_T
+
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
+#undef HAVE_LWPSTATUS_T_PR_CONTEXT
+
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
+#undef HAVE_LWPSTATUS_T_PR_REG
+
+/* Define if <sys/procfs.h> has win32_pstatus_t. */
+#undef HAVE_WIN32_PSTATUS_T
+
+/* Name of host specific header file to include in trad-core.c. */
+#undef TRAD_HEADER
+
+/* Use mmap if it's available? */
+#undef USE_MMAP
+
diff --git a/contrib/binutils/bfd/configure b/contrib/binutils/bfd/configure
index a0643a7..33ca150 100755
--- a/contrib/binutils/bfd/configure
+++ b/contrib/binutils/bfd/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,16 +12,16 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared build shared libraries [default=no]
- --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-shared[=PKGS] build shared libraries [default=no]"
ac_help="$ac_help
- --enable-static build static libraries [default=yes]
- --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-static[=PKGS] build static libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+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"
@@ -32,6 +32,10 @@ ac_help="$ac_help
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
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -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=*)
@@ -354,7 +365,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
+ echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@@ -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
@@ -524,9 +539,11 @@ 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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
+ac_exeext=
+ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -588,7 +605,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:592: checking host system type" >&5
+echo "configure:609: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -609,7 +626,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:613: checking target system type" >&5
+echo "configure:630: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -627,7 +644,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:631: checking build system type" >&5
+echo "configure:648: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -652,15 +669,16 @@ test "$host_alias" != "$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:656: checking for $ac_word" >&5
+echo "configure:673: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -681,16 +699,17 @@ 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:685: checking for $ac_word" >&5
+echo "configure:703: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -725,25 +744,61 @@ 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:754: 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:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:786: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 743 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 797 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:802: \"$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
@@ -757,18 +812,24 @@ else
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:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:828: 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:772: checking whether we are using GNU C" >&5
+echo "configure:833: 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
@@ -777,7 +838,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$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:842: \"$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
@@ -788,11 +849,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:796: checking whether ${CC-cc} accepts -g" >&5
+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:861: 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
@@ -807,20 +872,24 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:824: checking for POSIXized ISC" >&5
+echo "configure:893: 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
@@ -853,12 +922,12 @@ 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:857: checking for a BSD compatible install" >&5
+echo "configure:926: 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="${IFS}:"
+ 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
@@ -901,13 +970,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
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:911: checking whether build environment is sane" >&5
+echo "configure:979: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -964,7 +1032,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:968: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1036: 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
@@ -993,7 +1061,7 @@ fi
PACKAGE=bfd
-VERSION=2.9.1
+VERSION=2.9.5
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; }
@@ -1010,7 +1078,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1014: checking for working aclocal" >&5
+echo "configure:1082: 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.
@@ -1023,7 +1091,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1027: checking for working autoconf" >&5
+echo "configure:1095: 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.
@@ -1036,7 +1104,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1040: checking for working automake" >&5
+echo "configure:1108: 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.
@@ -1049,7 +1117,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1053: checking for working autoheader" >&5
+echo "configure:1121: 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.
@@ -1062,7 +1130,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1066: checking for working makeinfo" >&5
+echo "configure:1134: 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.
@@ -1085,15 +1153,16 @@ 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:1089: checking for $ac_word" >&5
+echo "configure:1157: 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
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
@@ -1116,15 +1185,16 @@ 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:1120: checking for $ac_word" >&5
+echo "configure:1189: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
@@ -1147,15 +1217,16 @@ 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:1151: checking for $ac_word" >&5
+echo "configure:1221: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -1226,18 +1297,42 @@ else
enable_static=yes
fi
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+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
+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:1233: checking for $ac_word" >&5
+echo "configure:1327: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -1263,18 +1358,23 @@ 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:1272: checking for ld used by GCC" >&5
+echo "configure:1366: 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]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -1286,19 +1386,19 @@ echo "configure:1272: 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:1290: checking for GNU ld" >&5
+echo "configure:1390: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1293: checking for non-GNU ld" >&5
+echo "configure:1393: 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}:"
+ 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"; then
+ 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.
@@ -1306,7 +1406,7 @@ else
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -1323,9 +1423,8 @@ 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:1329: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1428: 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
@@ -1341,44 +1440,43 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1345: checking for BSD-compatible nm" >&5
+echo "configure:1444: 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
- case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ 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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac
+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:1382: checking whether ln -s works" >&5
+echo "configure:1480: 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
@@ -1398,24 +1496,37 @@ else
echo "$ac_t""no" 1>&6
fi
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1418 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1529 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1433,17 +1544,122 @@ case "$host" in
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1551: 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 <<EOF
+#line 1556 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1563: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
;;
+
+
esac
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+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 \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# 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'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+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
@@ -1515,7 +1731,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1519: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:1735: 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"
@@ -1525,96 +1741,112 @@ else
fi
echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
-echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:1537: checking for Cygwin32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+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:1758: 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 <<EOF
-#line 1542 "configure"
+#line 1763 "configure"
#include "confdefs.h"
int main() {
-return __CYGWIN32__;
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_cygwin32=yes
+ ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_cygwin32=no
+ ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_cygwin32" 1>&6
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:1566: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+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:1791: 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 <<EOF
-#line 1571 "configure"
+#line 1796 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_mingw32=yes
+ ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_mingw32=no
+ ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_mingw32" 1>&6
+echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
+test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1597: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+echo "configure:1822: 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 "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:1832: \"$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
-
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
fi
+
EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
host64=false
@@ -1625,15 +1857,16 @@ 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:1629: checking for $ac_word" >&5
+echo "configure:1861: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -1654,16 +1887,17 @@ 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:1658: checking for $ac_word" >&5
+echo "configure:1891: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1698,25 +1932,61 @@ 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:1942: 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:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1974: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1716 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1985 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1990: \"$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
@@ -1730,18 +2000,24 @@ else
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:1740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2016: 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:1745: checking whether we are using GNU C" >&5
+echo "configure:2021: 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
@@ -1750,7 +2026,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1754: \"$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:2030: \"$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,11 +2037,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1769: checking whether ${CC-cc} accepts -g" >&5
+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:2049: 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
@@ -1780,155 +2060,1852 @@ 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 "$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
+
+
+ALL_LINGUAS=
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:2083: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 2098 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+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; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 2115 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2121: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 2132 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2138: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
fi
+echo "$ac_t""$CPP" 1>&6
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2163: 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 <<EOF
+#line 2168 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2176: \"$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*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
-# Permit host specific settings.
-. ${srcdir}/configure.host
+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
+#line 2193 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+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
+#line 2211 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+fi
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2232 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
-BFD_HOST_64BIT_LONG=0
-BFD_HOST_64_BIT_DEFINED=0
-BFD_HOST_64_BIT=
-BFD_HOST_U_64_BIT=
-if test "x${HOST_64BIT_TYPE}" = "xlong"; then
- BFD_HOST_64BIT_LONG=1
-elif test "x${HOST_64BIT_TYPE}" != "x"; then
- BFD_HOST_64_BIT_DEFINED=1
- BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
- BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
+EOF
+if { (eval echo configure:2243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
fi
+fi
+fi
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+fi
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2267: 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 <<EOF
+#line 2272 "configure"
+#include "confdefs.h"
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test -z "$CC_FOR_BUILD"; then
- if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
- else
- CC_FOR_BUILD=gcc
- fi
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
fi
-# Also set EXEEXT_FOR_BUILD.
-if test "x$cross_compiling" = "xno"; then
- EXEEXT_FOR_BUILD='$(EXEEXT)'
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2342: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:1835: checking for build system executable suffix" >&5
-if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 2349 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2382: 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 > ac_c_test.c << 'EOF'
+ cat > conftest.$ac_ext <<EOF
+#line 2387 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2415: 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 <<EOF
+#line 2420 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+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:2450: 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 <<EOF
+#line 2455 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2462: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2483: 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 <<EOF
+#line 2488 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2516: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2548: 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 <<EOF
+#line 2553 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&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:2578: 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 <<EOF
+#line 2583 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
int main() {
-/* Nothing needed here */
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2606: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2633: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2641 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
}
EOF
- ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
- bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
- rm -f ac_c_test*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+if { (eval echo configure:2660: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
fi
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
- EXEEXT_FOR_BUILD=""
- test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1857: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+
+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:2685: 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
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1872 "configure"
+#line 2690 "configure"
#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2695: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2724: 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 <<EOF
+#line 2729 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
-Syntax Error
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2752: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2777: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2785 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2925: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+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:2953: 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
+#line 2958 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2963: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2993: 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 <<EOF
-#line 1889 "configure"
+#line 2998 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
-Syntax Error
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3021: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3050: 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 <<EOF
+#line 3055 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3078: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3112: 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 <<EOF
+#line 3117 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3124: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3145: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3165: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3184: 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
+#line 3189 "configure"
+#include "confdefs.h"
+#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3194: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP=/lib/cpp
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
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:3211: 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 <<EOF
+#line 3216 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3223: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
rm -f conftest*
- ac_cv_prog_CPP="$CPP"
fi
- CPP="$ac_cv_prog_CPP"
+
+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:3239: 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
else
- ac_cv_prog_CPP="$CPP"
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3247 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3258: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
-echo "$ac_t""$CPP" 1>&6
+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
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:3274: 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 <<EOF
+#line 3279 "configure"
+#include "confdefs.h"
+
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3286: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:3314: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3348: 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 <<EOF
+#line 3353 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3376: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:3403: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3439: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3471 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:3511: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3545: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3581: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3671: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ 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:3699: 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
+#line 3704 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3709: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ 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
+
+
+# Permit host specific settings.
+. ${srcdir}/configure.host
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# 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:3787: 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'
+
+
+BFD_HOST_64BIT_LONG=0
+BFD_HOST_64_BIT_DEFINED=0
+BFD_HOST_64_BIT=
+BFD_HOST_U_64_BIT=
+if test "x${HOST_64BIT_TYPE}" = "xlong"; then
+ BFD_HOST_64BIT_LONG=1
+elif test "x${HOST_64BIT_TYPE}" != "x"; then
+ BFD_HOST_64_BIT_DEFINED=1
+ BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
+ BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
+fi
+
+
+
+
+
+# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ CC_FOR_BUILD=gcc
+ fi
+fi
+
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+else
+ echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
+echo "configure:3870: 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
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+
+echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+
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:1921: checking for $ac_hdr" >&5
+echo "configure:3898: 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
-#line 1926 "configure"
+#line 3903 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3908: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -1957,18 +3934,18 @@ 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:1961: checking for $ac_hdr" >&5
+echo "configure:3938: 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
-#line 1966 "configure"
+#line 3943 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3948: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -1994,12 +3971,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1998: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3975: 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 <<EOF
-#line 2003 "configure"
+#line 3980 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2008,7 +3985,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2028,15 +4005,140 @@ EOF
fi
-for ac_func in fcntl getpagesize setitimer sysconf fdopen
+ac_header_dirent=no
+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:4014: 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 <<EOF
+#line 4019 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:4052: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldir $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4060 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:4071: \"$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
+ 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 -ldir"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:4093: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lx $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4101 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:4112: \"$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
+ 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 -lx"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+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:2035: checking for $ac_func" >&5
+echo "configure:4137: 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 <<EOF
-#line 2040 "configure"
+#line 4142 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2059,7 +4161,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4165: \"$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
@@ -2086,7 +4188,7 @@ done
case "${host}" in
-i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
cat >> confdefs.h <<\EOF
#define USE_BINARY_FOPEN 1
EOF
@@ -2094,12 +4196,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:2098: checking whether strstr must be declared" >&5
+echo "configure:4200: 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 <<EOF
-#line 2103 "configure"
+#line 4205 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2120,7 +4222,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -2134,20 +4236,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
if test $bfd_cv_decl_needed_strstr = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRSTR 1
EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:2146: checking whether malloc must be declared" >&5
+echo "configure:4247: 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 <<EOF
-#line 2151 "configure"
+#line 4252 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2168,7 +4269,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -2182,20 +4283,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
if test $bfd_cv_decl_needed_malloc = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_MALLOC 1
EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:2194: checking whether realloc must be declared" >&5
+echo "configure:4294: 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 <<EOF
-#line 2199 "configure"
+#line 4299 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2216,7 +4316,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:2220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -2230,20 +4330,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
if test $bfd_cv_decl_needed_realloc = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_REALLOC 1
EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:2242: checking whether free must be declared" >&5
+echo "configure:4341: 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 <<EOF
-#line 2247 "configure"
+#line 4346 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2264,7 +4363,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:2268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -2278,20 +4377,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
if test $bfd_cv_decl_needed_free = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_FREE 1
EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:2290: checking whether getenv must be declared" >&5
+echo "configure:4388: 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 <<EOF
-#line 2295 "configure"
+#line 4393 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2312,7 +4410,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -2326,9 +4424,8 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
if test $bfd_cv_decl_needed_getenv = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_GETENV 1
EOF
fi
@@ -2337,194 +4434,135 @@ fi
# If we are configured native, pick a core file support file.
COREFILE=
COREFLAG=
+TRAD_HEADER=
if test "${target}" = "${host}"; then
case "${host}" in
alpha*-*-linux-gnu*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/alphalinux.h"
-EOF
-
+ TRAD_HEADER='"hosts/alphalinux.h"'
;;
alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
alpha*-*-*) COREFILE=osf-core.lo ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
+ hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
- i[3456]86-sequent-bsd*)
- COREFILE=trad-core.lo;
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/symmetry.h"
-EOF
+ i370-*-*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/i370linux.h"'
+ ;;
+ i[3456]86-sequent-bsd*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/symmetry.h"'
;;
i[3456]86-sequent-sysv4*) ;;
i[3456]86-sequent-sysv*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/symmetry.h"
-EOF
-
+ TRAD_HEADER='"hosts/symmetry.h"'
;;
i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/i386bsd.h"
-EOF
-
+ TRAD_HEADER='"hosts/i386bsd.h"'
;;
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
COREFILE=netbsd-core.lo
;;
i[3456]86-esix-sysv3*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/esix.h"
-EOF
-
+ TRAD_HEADER='"hosts/esix.h"'
+ ;;
+ i[3456]86-*-sco3.2v5*)
+ COREFILE=sco5-core.lo
;;
i[3456]86-*-sco* | i[3456]86-*-isc*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/i386sco.h"
-EOF
-
+ TRAD_HEADER='"hosts/i386sco.h"'
;;
i[3456]86-*-mach3*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/i386mach3.h"
-EOF
-
+ TRAD_HEADER='"hosts/i386mach3.h"'
;;
i[3456]86-*-linux-gnu*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/i386linux.h"
-EOF
-
+ TRAD_HEADER='"hosts/i386linux.h"'
;;
i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
i860-*-mach3* | i860-*-osf1*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/i860mach3.h"
-EOF
-
+ TRAD_HEADER='"hosts/i860mach3.h"'
;;
mips-dec-bsd*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/mipsbsd.h"
-EOF
-
+ TRAD_HEADER='"hosts/mipsbsd.h"'
;;
mips-dec-mach3*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/mipsmach3.h"
-EOF
-
+ TRAD_HEADER='"hosts/mipsmach3.h"'
;;
mips-*-netbsd* | mips*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
mips-dec-*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/decstation.h"
-EOF
-
+ TRAD_HEADER='"hosts/decstation.h"'
;;
mips-sgi-irix4*) COREFILE=irix-core.lo ;;
mips-sgi-irix5*) COREFILE=irix-core.lo ;;
mips-sgi-irix6*) COREFILE=irix-core.lo ;;
mips-*-mach3*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/mipsmach3.h"
-EOF
-
+ TRAD_HEADER='"hosts/mipsmach3.h"'
;;
mips-*-sysv4*) ;;
mips-*-sysv* | mips-*-riscos*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/riscos.h"
-EOF
-
+ TRAD_HEADER='"hosts/riscos.h"'
;;
mips-sony-bsd*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/news-mips.h"
-EOF
-
+ TRAD_HEADER='"hosts/news-mips.h"'
;;
m68*-bull*-sysv*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/dpx2.h"
-EOF
-
+ TRAD_HEADER='"hosts/dpx2.h"'
;;
m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
m68*-hp-bsd*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/hp300bsd.h"
-EOF
-
+ TRAD_HEADER='"hosts/hp300bsd.h"'
;;
m68*-*-linux-gnu*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/m68klinux.h"
-EOF
-
+ TRAD_HEADER='"hosts/m68klinux.h"'
;;
m68*-motorola-sysv*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/delta68.h"
-EOF
-
+ TRAD_HEADER='"hosts/delta68.h"'
;;
m68*-sony-*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/news.h"
-EOF
-
+ TRAD_HEADER='"hosts/news.h"'
;;
m68*-*-netbsd* | m68*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
m68*-apple-aux*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/m68kaux.h"
-EOF
-
+ TRAD_HEADER='"hosts/m68kaux.h"'
;;
m88*-*-sysv4*) ;;
m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
m88*-*-mach3*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/m88kmach3.h"
-EOF
-
+ TRAD_HEADER='"hosts/m88kmach3.h"'
;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/pc532mach.h"
-EOF
-
+ TRAD_HEADER='"hosts/pc532mach.h"'
;;
ns32k-*-netbsd* | ns32k-*-openbsd*)
COREFILE=netbsd-core.lo
@@ -2542,31 +4580,19 @@ EOF
;;
tahoe-*-*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/tahoe.h"
-EOF
-
+ TRAD_HEADER='"hosts/tahoe.h"'
;;
vax-*-ultrix2*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/vaxult2.h"
-EOF
-
+ TRAD_HEADER='"hosts/vaxult2.h"'
;;
vax-*-ultrix*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/vaxult2.h"
-EOF
-
+ TRAD_HEADER='"hosts/vaxult2.h"'
;;
vax-*-*)
COREFILE=trad-core.lo
- cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/vaxbsd.h"
-EOF
-
+ TRAD_HEADER='"hosts/vaxbsd.h"'
;;
esac
@@ -2580,47 +4606,380 @@ EOF
osf-core.lo) COREFLAG=-DOSF_CORE ;;
ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
+ sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
esac
- # The ELF code uses the native <sys/procfs.h> to handle core files.
- # Define HAVE_SYS_PROCFS_H if the file exists and defines
- # prstatus_t.
- echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
-echo "configure:2591: checking for sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
+ # ELF corefile support has several flavors, but all of
+ # them use something called <sys/procfs.h>
+ for ac_hdr in sys/procfs.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4620: 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
+#line 4625 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4630: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:4658: 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 <<EOF
-#line 2596 "configure"
+#line 4663 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
-prstatus_t t;
+prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:2603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_header_sys_procfs_h=yes
+ bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_header_sys_procfs_h=no
+ bfd_cv_have_sys_procfs_type_prstatus_t=no
+
fi
rm -f conftest*
fi
- echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
- if test $bfd_cv_header_sys_procfs_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SYS_PROCFS_H 1
+ if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRSTATUS_T 1
EOF
- fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
+
+ echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:4692: 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 <<EOF
+#line 4697 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+prstatus_t avar; void* aref = (void*) &avar.pr_who
+; return 0; }
+EOF
+if { (eval echo configure:4704: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRSTATUS_T_PR_WHO 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
+
+ echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:4726: 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 <<EOF
+#line 4731 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+pstatus_t avar
+; return 0; }
+EOF
+if { (eval echo configure:4738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pstatus_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pstatus_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PSTATUS_T 1
+EOF
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
+
+ echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:4760: 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 <<EOF
+#line 4765 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+prpsinfo_t avar
+; return 0; }
+EOF
+if { (eval echo configure:4772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prpsinfo_t=no
+
+fi
+rm -f conftest*
fi
+ if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRPSINFO_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
+
+ echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:4794: 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 <<EOF
+#line 4799 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+psinfo_t avar
+; return 0; }
+EOF
+if { (eval echo configure:4806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psinfo_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psinfo_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PSINFO_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
+
+ echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:4828: 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 <<EOF
+#line 4833 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+lwpstatus_t avar
+; return 0; }
+EOF
+if { (eval echo configure:4840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpstatus_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LWPSTATUS_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
+
+ echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:4862: 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 <<EOF
+#line 4867 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+lwpstatus_t avar; void* aref = (void*) &avar.pr_context
+; return 0; }
+EOF
+if { (eval echo configure:4874: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
+EOF
+
+ fi
+ 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:4896: 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 <<EOF
+#line 4901 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
+; return 0; }
+EOF
+if { (eval echo configure:4908: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LWPSTATUS_T_PR_REG 1
+EOF
+
+ fi
+ 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:4930: 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 <<EOF
+#line 4935 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+int main() {
+win32_pstatus_t avar
+; return 0; }
+EOF
+if { (eval echo configure:4942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_WIN32_PSTATUS_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
+
+ fi
+fi
+
+
+cat >> confdefs.h <<EOF
+#define TRAD_HEADER $TRAD_HEADER
+EOF
+
+
+# Horrible hacks to build DLLs on Windows.
+WIN32LDFLAGS=
+WIN32LIBADD=
+case "${host}" in
+*-*-cygwin*)
+ if test "$enable_shared" = "yes"; then
+ WIN32LDFLAGS="-no-undefined"
+ WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
+ fi
+ ;;
+esac
+
# target stuff:
@@ -2629,7 +4988,7 @@ fi
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
+ result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
else
@@ -2664,7 +5023,7 @@ done
# 64-bit support needs to be compiled in. Currently, it will be included if
# the default or any other explicitly requested target requires it; it
# will not be included on a 32-bit host if no 64-bit target is requested, and
-# no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
+# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
# used.
# uniq the default and selected vectors in all the configured targets.
@@ -2691,7 +5050,7 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo dwarf2.lo"
+elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
for vec in $selvecs
do
@@ -2702,10 +5061,15 @@ do
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
- armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
- armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
- armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
- armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
+ armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
+ armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
@@ -2716,16 +5080,25 @@ do
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
target64=true ;;
+ 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" ;;
+ bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
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_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_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
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"
@@ -2733,8 +5106,12 @@ do
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.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" ;;
+ bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
+ bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
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" ;;
@@ -2747,7 +5124,8 @@ do
target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
- cisco_core_vec) tb="$tb cisco-core.lo" ;;
+ cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
+ cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
demo_64_vec) tb="$tb demo64.lo aout64.lo"
target64=true ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
@@ -2757,8 +5135,6 @@ do
target64=true ;;
go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
- evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
- target64=true ;;
h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
@@ -2770,8 +5146,8 @@ do
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386msdos_vec) tb="$tb i386msdos.lo" ;;
- i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
- i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
+ i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
+ i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
@@ -2792,6 +5168,12 @@ 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" ;;
+ 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" ;;
nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
@@ -2803,15 +5185,17 @@ do
pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
- bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
- bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
- bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
- bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
+ bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
ppcboot_vec) tb="$tb ppcboot.lo" ;;
shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
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" ;;
som_vec) tb="$tb som.lo" ;;
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
@@ -2825,10 +5209,14 @@ do
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.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"
+ target64=true ;;
+ vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
+ w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
- w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
- versados_vec) tb="$tb versados.lo" ;;
"") ;;
*) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
@@ -2910,18 +5298,18 @@ 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:2914: checking for $ac_hdr" >&5
+echo "configure:5302: 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
-#line 2919 "configure"
+#line 5307 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5312: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -2949,12 +5337,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2953: checking for $ac_func" >&5
+echo "configure:5341: 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 <<EOF
-#line 2958 "configure"
+#line 5346 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2977,7 +5365,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5369: \"$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
@@ -3002,7 +5390,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3006: checking for working mmap" >&5
+echo "configure:5394: 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
@@ -3010,7 +5398,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3014 "configure"
+#line 5402 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3150,7 +5538,7 @@ main()
}
EOF
-if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5542: \"$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
@@ -3175,12 +5563,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3179: checking for $ac_func" >&5
+echo "configure:5567: 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 <<EOF
-#line 3184 "configure"
+#line 5572 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3203,7 +5591,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5595: \"$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
@@ -3258,7 +5646,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -3325,7 +5713,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -3336,7 +5724,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3349,6 +5737,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -3384,8 +5773,8 @@ s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
@@ -3396,12 +5785,34 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%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
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
s%@HDEFINES@%$HDEFINES%g
s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
@@ -3409,9 +5820,10 @@ s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@CPP@%$CPP%g
s%@COREFILE@%$COREFILE%g
s%@COREFLAG@%$COREFLAG%g
+s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
+s%@WIN32LIBADD@%$WIN32LIBADD%g
s%@TDEFINES@%$TDEFINES%g
s%@wordsize@%$wordsize%g
s%@all_backends@%$all_backends%g
@@ -3459,7 +5871,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3632,7 +6044,7 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-
+sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/binutils/bfd/configure.host b/contrib/binutils/bfd/configure.host
index 769c0a2..e24cd60 100644
--- a/contrib/binutils/bfd/configure.host
+++ b/contrib/binutils/bfd/configure.host
@@ -23,6 +23,7 @@ alpha*-*-*) host64=true; HOST_64BIT_TYPE=long ;;
hppa*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX ;;
hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
+hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
@@ -62,6 +63,8 @@ m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
ac_cv_func_getpagesize=no
ac_cv_func_madvise=no
ac_cv_func_mprotect=no
+ ac_cv_func_getuid=no
+ ac_cv_func_getgid=no
ac_cv_header_sys_file_h=no
ac_cv_header_sys_time_h=no
ac_cv_header_unistd_h=no
diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in
index f8951e6..df2b613 100644
--- a/contrib/binutils/bfd/configure.in
+++ b/contrib/binutils/bfd/configure.in
@@ -1,13 +1,13 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.5)
+AC_PREREQ(2.13)
AC_INIT(libbfd.c)
AC_CANONICAL_SYSTEM
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.9.1)
+AM_INIT_AUTOMAKE(bfd, 2.9.5)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@@ -58,8 +58,7 @@ fi
AC_ARG_PROGRAM
AM_MAINTAINER_MODE
-AM_CYGWIN32
-AM_EXEEXT
+AC_EXEEXT
host64=false
target64=false
@@ -68,11 +67,14 @@ target64=false
AC_PROG_CC
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
# Permit host specific settings.
. ${srcdir}/configure.host
AC_SUBST(HDEFINES)
-AM_PROG_INSTALL
+AC_PROG_INSTALL
BFD_HOST_64BIT_LONG=0
BFD_HOST_64_BIT_DEFINED=0
@@ -95,7 +97,8 @@ BFD_CC_FOR_BUILD
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
AC_HEADER_TIME
-AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen)
+AC_HEADER_DIRENT
+AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
BFD_BINARY_FOPEN
@@ -108,37 +111,44 @@ BFD_NEED_DECLARATION(getenv)
# If we are configured native, pick a core file support file.
COREFILE=
COREFLAG=
+TRAD_HEADER=
if test "${target}" = "${host}"; then
case "${host}" in
alpha*-*-linux-gnu*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/alphalinux.h")
+ TRAD_HEADER='"hosts/alphalinux.h"'
;;
alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
alpha*-*-*) COREFILE=osf-core.lo ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
+ hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+ i370-*-*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/i370linux.h"'
+ ;;
+
changequote(,)dnl
i[3456]86-sequent-bsd*)
changequote([,])dnl
- COREFILE=trad-core.lo;
- AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/symmetry.h"'
;;
changequote(,)dnl
i[3456]86-sequent-sysv4*) ;;
i[3456]86-sequent-sysv*)
changequote([,])dnl
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
+ TRAD_HEADER='"hosts/symmetry.h"'
;;
changequote(,)dnl
i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
changequote([,])dnl
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/i386bsd.h")
+ TRAD_HEADER='"hosts/i386bsd.h"'
;;
changequote(,)dnl
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
@@ -149,25 +159,30 @@ changequote(,)dnl
i[3456]86-esix-sysv3*)
changequote([,])dnl
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/esix.h")
+ TRAD_HEADER='"hosts/esix.h"'
+ ;;
+changequote(,)dnl
+ i[3456]86-*-sco3.2v5*)
+changequote([,])dnl
+ COREFILE=sco5-core.lo
;;
changequote(,)dnl
i[3456]86-*-sco* | i[3456]86-*-isc*)
changequote([,])dnl
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/i386sco.h")
+ TRAD_HEADER='"hosts/i386sco.h"'
;;
changequote(,)dnl
i[3456]86-*-mach3*)
changequote([,])dnl
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/i386mach3.h")
+ TRAD_HEADER='"hosts/i386mach3.h"'
;;
changequote(,)dnl
i[3456]86-*-linux-gnu*)
changequote([,])dnl
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/i386linux.h")
+ TRAD_HEADER='"hosts/i386linux.h"'
;;
changequote(,)dnl
i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
@@ -175,76 +190,76 @@ changequote(,)dnl
changequote([,])dnl
i860-*-mach3* | i860-*-osf1*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/i860mach3.h")
+ TRAD_HEADER='"hosts/i860mach3.h"'
;;
mips-dec-bsd*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/mipsbsd.h")
+ TRAD_HEADER='"hosts/mipsbsd.h"'
;;
mips-dec-mach3*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
+ TRAD_HEADER='"hosts/mipsmach3.h"'
;;
mips-*-netbsd* | mips*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
mips-dec-*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/decstation.h")
+ TRAD_HEADER='"hosts/decstation.h"'
;;
mips-sgi-irix4*) COREFILE=irix-core.lo ;;
mips-sgi-irix5*) COREFILE=irix-core.lo ;;
mips-sgi-irix6*) COREFILE=irix-core.lo ;;
mips-*-mach3*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
+ TRAD_HEADER='"hosts/mipsmach3.h"'
;;
mips-*-sysv4*) ;;
mips-*-sysv* | mips-*-riscos*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/riscos.h")
+ TRAD_HEADER='"hosts/riscos.h"'
;;
mips-sony-bsd*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/news-mips.h")
+ TRAD_HEADER='"hosts/news-mips.h"'
;;
m68*-bull*-sysv*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/dpx2.h")
+ TRAD_HEADER='"hosts/dpx2.h"'
;;
m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
m68*-hp-bsd*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/hp300bsd.h")
+ TRAD_HEADER='"hosts/hp300bsd.h"'
;;
m68*-*-linux-gnu*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/m68klinux.h")
+ TRAD_HEADER='"hosts/m68klinux.h"'
;;
m68*-motorola-sysv*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER, "hosts/delta68.h")
+ TRAD_HEADER='"hosts/delta68.h"'
;;
m68*-sony-*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/news.h")
+ TRAD_HEADER='"hosts/news.h"'
;;
m68*-*-netbsd* | m68*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
m68*-apple-aux*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/m68kaux.h")
+ TRAD_HEADER='"hosts/m68kaux.h"'
;;
m88*-*-sysv4*) ;;
m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
m88*-*-mach3*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/m88kmach3.h")
+ TRAD_HEADER='"hosts/m88kmach3.h"'
;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/pc532mach.h")
+ TRAD_HEADER='"hosts/pc532mach.h"'
;;
ns32k-*-netbsd* | ns32k-*-openbsd*)
COREFILE=netbsd-core.lo
@@ -262,19 +277,19 @@ changequote([,])dnl
;;
tahoe-*-*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/tahoe.h")
+ TRAD_HEADER='"hosts/tahoe.h"'
;;
vax-*-ultrix2*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
+ TRAD_HEADER='"hosts/vaxult2.h"'
;;
vax-*-ultrix*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
+ TRAD_HEADER='"hosts/vaxult2.h"'
;;
vax-*-*)
COREFILE=trad-core.lo
- AC_DEFINE(TRAD_HEADER,"hosts/vaxbsd.h")
+ TRAD_HEADER='"hosts/vaxbsd.h"'
;;
esac
@@ -288,25 +303,43 @@ changequote([,])dnl
osf-core.lo) COREFLAG=-DOSF_CORE ;;
ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
+ sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
esac
- # The ELF code uses the native <sys/procfs.h> to handle core files.
- # Define HAVE_SYS_PROCFS_H if the file exists and defines
- # prstatus_t.
- AC_MSG_CHECKING([for sys/procfs.h])
- AC_CACHE_VAL(bfd_cv_header_sys_procfs_h,
- [AC_TRY_COMPILE([#include <sys/procfs.h>],
- [prstatus_t t;],
- bfd_cv_header_sys_procfs_h=yes, bfd_cv_header_sys_procfs_h=no)])
- AC_MSG_RESULT($bfd_cv_header_sys_procfs_h)
- if test $bfd_cv_header_sys_procfs_h = yes; then
- AC_DEFINE(HAVE_SYS_PROCFS_H)
+ # ELF corefile support has several flavors, but all of
+ # them use something called <sys/procfs.h>
+ 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_MEMBER(prstatus_t, pr_who)
+ BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_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)
fi
-
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.])
+
+# Horrible hacks to build DLLs on Windows.
+WIN32LDFLAGS=
+WIN32LIBADD=
+case "${host}" in
+*-*-cygwin*)
+ if test "$enable_shared" = "yes"; then
+ WIN32LDFLAGS="-no-undefined"
+ WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
+ fi
+ ;;
+esac
+AC_SUBST(WIN32LDFLAGS)
+AC_SUBST(WIN32LIBADD)
# target stuff:
@@ -314,7 +347,7 @@ AC_SUBST(COREFLAG)
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
+ result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
else
@@ -349,7 +382,7 @@ AC_SUBST(TDEFINES)
# 64-bit support needs to be compiled in. Currently, it will be included if
# the default or any other explicitly requested target requires it; it
# will not be included on a 32-bit host if no 64-bit target is requested, and
-# no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
+# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
# used.
# uniq the default and selected vectors in all the configured targets.
@@ -376,7 +409,7 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo dwarf2.lo"
+elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
for vec in $selvecs
do
@@ -387,10 +420,15 @@ do
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
- armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
- armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
- armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
- armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
+ armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
+ armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
@@ -401,16 +439,25 @@ do
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
target64=true ;;
+ 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" ;;
+ bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
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_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_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
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"
@@ -418,8 +465,12 @@ do
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.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" ;;
+ bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
+ bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
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" ;;
@@ -432,7 +483,8 @@ do
target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
- cisco_core_vec) tb="$tb cisco-core.lo" ;;
+ cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
+ cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
demo_64_vec) tb="$tb demo64.lo aout64.lo"
target64=true ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
@@ -442,8 +494,6 @@ do
target64=true ;;
go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
- evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
- target64=true ;;
h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
@@ -455,8 +505,8 @@ do
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386msdos_vec) tb="$tb i386msdos.lo" ;;
- i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
- i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
+ i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
+ i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
@@ -477,6 +527,12 @@ 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" ;;
+ 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" ;;
nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
@@ -488,15 +544,17 @@ do
pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
- bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
- bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
- bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
- bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
+ bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
ppcboot_vec) tb="$tb ppcboot.lo" ;;
shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
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" ;;
som_vec) tb="$tb som.lo" ;;
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
@@ -510,10 +568,14 @@ do
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.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"
+ target64=true ;;
+ vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
+ w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
- w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
- versados_vec) tb="$tb versados.lo" ;;
"") ;;
*) AC_MSG_ERROR(*** unknown target vector $vec) ;;
@@ -595,8 +657,9 @@ dnl AC_CHECK_HEADERS(sys/mman.h)
AC_FUNC_MMAP
AC_CHECK_FUNCS(madvise mprotect)
case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
- true+yes ) AC_DEFINE(USE_MMAP) ;;
+ true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h)
+AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
+[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
diff --git a/contrib/binutils/bfd/cpu-alpha.c b/contrib/binutils/bfd/cpu-alpha.c
index 0d66a8b..b89900b 100644
--- a/contrib/binutils/bfd/cpu-alpha.c
+++ b/contrib/binutils/bfd/cpu-alpha.c
@@ -21,18 +21,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
+ { \
+ BITS_WORD, /* bits in a word */ \
+ BITS_ADDR, /* bits in an address */ \
+ 8, /* 8 bits in a byte */ \
+ bfd_arch_alpha, \
+ NUMBER, \
+ "alpha", \
+ PRINT, \
+ 3, \
+ DEFAULT, \
+ bfd_default_compatible, \
+ bfd_default_scan, \
+ NEXT, \
+ }
+
+#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[] =
+{
+ N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)),
+ N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)),
+ N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", false, 0),
+};
+
const bfd_arch_info_type bfd_alpha_arch =
- {
- 64, /* 32 bits in a word */
- 64, /* 32 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_alpha,
- 0, /* only 1 machine */
- "alpha",
- "alpha",
- 3,
- true, /* the one and only */
- bfd_default_compatible,
- bfd_default_scan ,
- 0,
- };
+ N (64, 64, 0, "alpha", true, NN(0));
diff --git a/contrib/binutils/bfd/cpu-arm.c b/contrib/binutils/bfd/cpu-arm.c
new file mode 100644
index 0000000..bda9c44
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-arm.c
@@ -0,0 +1,143 @@
+/* BFD support for the ARM processor
+ Copyright 1994, 95, 97, 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
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+static const bfd_arch_info_type *compatible
+ PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+static boolean scan PARAMS ((const struct bfd_arch_info *, const char *));
+
+/* This routine is provided two arch_infos and works out which ARM
+ machine which would be compatible with both and returns a pointer
+ to its info structure */
+
+static const bfd_arch_info_type *
+compatible (a,b)
+ const bfd_arch_info_type * a;
+ const bfd_arch_info_type * b;
+{
+ /* If a & b are for different architecture we can do nothing */
+ if (a->arch != b->arch)
+ return NULL;
+
+ /* If a & b are for the same machine then all is well */
+ if (a->mach == b->mach)
+ return a;
+
+ /* Otherwise if either a or b is the 'default' machine then
+ it can be polymorphed into the other */
+ if (a->the_default)
+ return b;
+
+ if (b->the_default)
+ return a;
+
+ /* So far all newer ARM architecture cores are supersets of previous cores */
+ if (a->mach < b->mach)
+ return b;
+ else if (a->mach > b->mach)
+ return a;
+
+ /* Never reached! */
+ return NULL;
+}
+
+static struct
+{
+ enum bfd_architecture arch;
+ char * name;
+}
+processors[] =
+{
+ { bfd_mach_arm_2, "arm2" },
+ { bfd_mach_arm_2a, "arm250" },
+ { bfd_mach_arm_2a, "arm3" },
+ { bfd_mach_arm_3, "arm6" },
+ { bfd_mach_arm_3, "arm60" },
+ { bfd_mach_arm_3, "arm600" },
+ { bfd_mach_arm_3, "arm610" },
+ { bfd_mach_arm_3, "arm7" },
+ { bfd_mach_arm_3, "arm710" },
+ { bfd_mach_arm_3, "arm7500" },
+ { bfd_mach_arm_3, "arm7d" },
+ { bfd_mach_arm_3, "arm7di" },
+ { bfd_mach_arm_3M, "arm7dm" },
+ { bfd_mach_arm_3M, "arm7dmi" },
+ { bfd_mach_arm_4T, "arm7tdmi" },
+ { bfd_mach_arm_4, "arm8" },
+ { bfd_mach_arm_4, "arm810" },
+ { bfd_mach_arm_4, "arm9" },
+ { bfd_mach_arm_4, "arm920" },
+ { bfd_mach_arm_4T, "arm920t" },
+ { bfd_mach_arm_4T, "arm9tdmi" },
+ { bfd_mach_arm_4, "sa1" },
+ { bfd_mach_arm_4, "strongarm"},
+ { bfd_mach_arm_4, "strongarm110" },
+ { bfd_mach_arm_4, "strongarm1100" },
+};
+
+static boolean
+scan (info, string)
+ const struct bfd_arch_info * info;
+ const char * string;
+{
+ int i;
+
+ /* First test for an exact match */
+ if (strcasecmp (string, info->printable_name) == 0)
+ return true;
+
+ /* Next check for a processor name instead of an Architecture name */
+ for (i = sizeof (processors) / sizeof (processors[0]); i--;)
+ {
+ if (strcasecmp (string, processors[ i ].name) == 0)
+ break;
+ }
+
+ if (i != -1 && info->arch == processors[ i ].arch)
+ return true;
+
+ /* 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] ),
+ N( bfd_mach_arm_3M, "armv3m", false, & arch_info_struct[4] ),
+ 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 )
+};
+
+const bfd_arch_info_type bfd_arm_arch =
+ N( 0, "arm", true, & arch_info_struct[0] );
diff --git a/contrib/binutils/bfd/cpu-i386.c b/contrib/binutils/bfd/cpu-i386.c
index 518176d..f5b9b18 100644
--- a/contrib/binutils/bfd/cpu-i386.c
+++ b/contrib/binutils/bfd/cpu-i386.c
@@ -21,6 +21,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
+const bfd_arch_info_type bfd_i386_arch_intel_syntax =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_i386_i386_intel_syntax,
+ "i386:intel",
+ "i386:intel",
+ 3,
+ true,
+ bfd_default_compatible,
+ bfd_default_scan ,
+ 0,
+};
static const bfd_arch_info_type i8086_arch =
{
32, /* 32 bits in a word */
@@ -34,7 +49,7 @@ static const bfd_arch_info_type i8086_arch =
false,
bfd_default_compatible,
bfd_default_scan ,
- 0,
+ &bfd_i386_arch_intel_syntax,
};
const bfd_arch_info_type bfd_i386_arch =
@@ -52,3 +67,4 @@ const bfd_arch_info_type bfd_i386_arch =
bfd_default_scan ,
&i8086_arch,
};
+
diff --git a/contrib/binutils/bfd/cpu-mips.c b/contrib/binutils/bfd/cpu-mips.c
index 20a4d28..a933b8c 100644
--- a/contrib/binutils/bfd/cpu-mips.c
+++ b/contrib/binutils/bfd/cpu-mips.c
@@ -44,6 +44,7 @@ I_mips3900,
I_mips4000,
I_mips4010,
I_mips4100,
+I_mips4111,
I_mips4300,
I_mips4400,
I_mips4600,
@@ -65,6 +66,7 @@ static const bfd_arch_info_type arch_info_struct[] =
N (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)),
N (64, 64, bfd_mach_mips4010, "mips:4010", false, NN(I_mips4010)),
N (64, 64, bfd_mach_mips4100, "mips:4100", false, NN(I_mips4100)),
+ N (64, 64, bfd_mach_mips4111, "mips:4111", false, NN(I_mips4111)),
N (64, 64, bfd_mach_mips4300, "mips:4300", false, NN(I_mips4300)),
N (64, 64, bfd_mach_mips4400, "mips:4400", false, NN(I_mips4400)),
N (64, 64, bfd_mach_mips4600, "mips:4600", false, NN(I_mips4600)),
diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c
new file mode 100644
index 0000000..11f0f80
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-powerpc.c
@@ -0,0 +1,124 @@
+/* BFD PowerPC CPU definition
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor, Cygnus Support.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+/* The common PowerPC architecture is compatible with the RS/6000. */
+
+static const bfd_arch_info_type *powerpc_compatible
+ PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+
+static const bfd_arch_info_type *
+powerpc_compatible (a,b)
+ const bfd_arch_info_type *a;
+ const bfd_arch_info_type *b;
+{
+ BFD_ASSERT (a->arch == bfd_arch_powerpc);
+ switch (b->arch)
+ {
+ default:
+ return NULL;
+ case bfd_arch_powerpc:
+ return bfd_default_compatible (a, b);
+ case bfd_arch_rs6000:
+ if (a->mach == 0)
+ return a;
+ return NULL;
+ }
+ /*NOTREACHED*/
+}
+
+static const bfd_arch_info_type arch_info_struct[] =
+{
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ 603, /* for the mpc603 */
+ "powerpc",
+ "powerpc:603",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[1]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ 604, /* for the mpc604 */
+ "powerpc",
+ "powerpc:604",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[2]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ 403, /* for the 403 */
+ "powerpc",
+ "powerpc:403",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[3]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ 601, /* for the mpc601 */
+ "powerpc",
+ "powerpc:601",
+ 3,
+ false, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
+ 0
+ }
+};
+
+const bfd_arch_info_type bfd_powerpc_arch =
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ 0, /* for the POWER/PowerPC common architecture */
+ "powerpc",
+ "powerpc:common",
+ 3,
+ true, /* the default */
+ 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 74df2db..234bd92 100644
--- a/contrib/binutils/bfd/cpu-sparc.c
+++ b/contrib/binutils/bfd/cpu-sparc.c
@@ -96,6 +96,20 @@ static const bfd_arch_info_type arch_info_struct[] =
&arch_info_struct[4],
},
{
+ 32, /* bits in a word */
+ 32, /* bits in an address */
+ 8, /* bits in a byte */
+ bfd_arch_sparc,
+ bfd_mach_sparc_sparclite_le,
+ "sparc",
+ "sparc:sparclite_le",
+ 3,
+ false,
+ sparc_compatible,
+ bfd_default_scan,
+ &arch_info_struct[5],
+ },
+ {
64, /* bits in a word */
64, /* bits in an address */
8, /* bits in a byte */
@@ -107,7 +121,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false,
sparc_compatible,
bfd_default_scan,
- &arch_info_struct[5],
+ &arch_info_struct[6],
},
{
64, /* bits in a word */
diff --git a/contrib/binutils/bfd/cpu-v850.c b/contrib/binutils/bfd/cpu-v850.c
index df97bc9..539413d 100644
--- a/contrib/binutils/bfd/cpu-v850.c
+++ b/contrib/binutils/bfd/cpu-v850.c
@@ -69,7 +69,8 @@ scan (info, string)
switch (number)
{
-
+ case bfd_mach_v850e: arch = bfd_arch_v850; break;
+ case bfd_mach_v850ea: arch = bfd_arch_v850; break;
default:
return false;
}
@@ -89,6 +90,14 @@ scan (info, string)
#define NEXT NULL
+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)
+};
+
+#undef NEXT
+#define NEXT &arch_info_struct[0]
const bfd_arch_info_type bfd_v850_arch =
N (bfd_mach_v850, "v850", true, NEXT);
diff --git a/contrib/binutils/bfd/dep-in.sed b/contrib/binutils/bfd/dep-in.sed
index 444dde0..9da181a 100644
--- a/contrib/binutils/bfd/dep-in.sed
+++ b/contrib/binutils/bfd/dep-in.sed
@@ -7,7 +7,7 @@ s!\.o:!.lo:!
s! @BFD_H@!!g
s!@INCDIR@!$(INCDIR)!g
s!@SRCDIR@/!!g
-s!hosts/[^ ]*\.h ! !g
+s! hosts/[^ ]*\.h! !g
s/ sysdep.h//g
s! \.\./bfd/sysdep.h!!g
s/ libbfd.h//g
diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog
index 871299c..def932c 100644
--- a/contrib/binutils/bfd/doc/ChangeLog
+++ b/contrib/binutils/bfd/doc/ChangeLog
@@ -1,3 +1,36 @@
+2000-04-30 Ben Elliston <bje@redhat.com>
+
+ * bfdint.texi (BFD generated files): Fix another typo.
+
+2000-04-17 Ben Elliston <bje@redhat.com>
+
+ * bfdint.texi (BFD_JUMP_TABLE macros): Fix typo.
+
+Thu Feb 4 23:21:36 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Rebuild with current autoconf/automake.
+
+Thu Jul 23 09:36:44 1998 Nick Clifton <nickc@cygnus.com>
+
+ * bfdint.texi (BFD ELF processor required): Add paragraph
+ describing the necessity to create "include/elf/CPU.h".
+
+Thu May 7 14:45:43 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (chew.o): Add -I options for intl srcdir and
+ objdir.
+ * Makefile.in: Rebuild.
+
+Mon Apr 27 20:19:24 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * bfdint.texi: New file.
+ * Makefile.am (noinst_TEXINFOS): New variable.
+ * Makefile.in: Rebuild.
+
+Mon Apr 13 16:48:56 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Rebuild.
+
Mon Apr 6 14:06:55 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (STAGESTUFF): Remove variable.
diff --git a/contrib/binutils/bfd/doc/Makefile.am b/contrib/binutils/bfd/doc/Makefile.am
index 7588273..0d5268e 100644
--- a/contrib/binutils/bfd/doc/Makefile.am
+++ b/contrib/binutils/bfd/doc/Makefile.am
@@ -51,7 +51,7 @@ $(MKDOC): chew.o
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
@@ -239,6 +239,8 @@ bfd.h: $(srcdir)/../bfd-in.h \
echo "#endif" >>bfd.h
echo "#endif" >>bfd.h
+noinst_TEXINFOS = bfdint.texi
+
MOSTLYCLEANFILES = $(MKDOC) *.o
CLEANFILES = s-* *.p *.ip
diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in
index cc1a092..acdc9bf 100644
--- a/contrib/binutils/bfd/doc/Makefile.in
+++ b/contrib/binutils/bfd/doc/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -62,30 +64,52 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
+AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
-LD = @LD@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-NM = @NM@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
TDEFINES = @TDEFINES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WIN32LDFLAGS = @WIN32LDFLAGS@
+WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
bfd_machines = @bfd_machines@
+l = @l@
tdefaults = @tdefaults@
wordsize = @wordsize@
@@ -97,12 +121,14 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
opncls.texi reloc.texi section.texi \
syms.texi targets.texi init.texi hash.texi linker.texi
+
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
libbfd.p opncls.p reloc.p \
section.p syms.p targets.p \
format.p core.p init.p
+
IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
@@ -118,6 +144,7 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
$(srcdir)/../syms.c $(srcdir)/../targets.c \
$(srcdir)/../hash.c $(srcdir)/../linker.c
+
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
$(srcdir)/../format.c $(srcdir)/../libbfd.c \
@@ -125,17 +152,21 @@ SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../section.c $(srcdir)/../syms.c \
$(srcdir)/../targets.c $(srcdir)/../init.c
+
SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
$(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
$(srcdir)/../init.c
+
TEXIDIR = $(srcdir)/../../texinfo/fsf
info_TEXINFOS = bfd.texinfo
MKDOC = chew$(EXEEXT_FOR_BUILD)
+noinst_TEXINFOS = bfdint.texi
+
MOSTLYCLEANFILES = $(MKDOC) *.o
CLEANFILES = s-* *.p *.ip
@@ -157,15 +188,14 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
-default: all
-
+GZIP_ENV = --best
+all: all-redirect
.SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -181,7 +211,7 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@@ -197,28 +227,42 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.txi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(infodir)
- @for file in $(INFO_DEPS); do \
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- for file in $(INFO_DEPS); do \
- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
@@ -227,17 +271,20 @@ uninstall-info:
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
- for file in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
test -z "$ii" \
- || install-info --info-dir=$(infodir) --remove $$file; \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
- $(NORMAL_UNINSTALL)
- for file in $(INFO_DEPS); do \
- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ @$(NORMAL_UNINSTALL)
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
- for base in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
@@ -274,32 +321,40 @@ subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
done
- $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-info: $(INFO_DEPS)
-dvi: $(DVIS)
-check:
- $(MAKE)
-installcheck:
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+info-am: $(INFO_DEPS)
+info: info-am
+dvi-am: $(DVIS)
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am:
install-info: install-info-am
-install-exec:
- @$(NORMAL_INSTALL)
-
-install-data:
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall:
-
-all: Makefile
-
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
@@ -310,39 +365,47 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean: mostlyclean-aminfo mostlyclean-generic
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+
+mostlyclean: mostlyclean-am
-clean: clean-aminfo clean-generic mostlyclean
+clean-am: clean-aminfo clean-generic mostlyclean-am
-distclean: distclean-aminfo distclean-generic clean
- -rm -f config.status
+clean: clean-am
+
+distclean-am: distclean-aminfo distclean-generic clean-am
-rm -f libtool
-maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
- distclean
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
+ distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
-distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \
-dvi installcheck install-info install-exec install-data install \
-uninstall all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
+maintainer-clean: maintainer-clean-am
+
+.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
+distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir \
+info-am info dvi-am dvi check check-am installcheck-am installcheck \
+install-info-am install-info install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
$(MKDOC): chew.o
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
diff --git a/contrib/binutils/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo
index dc0f96c..a302bcf 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.29 1997/07/22 18:47:29 ian Exp $
+@c $Id: bfd.texinfo,v 1.1.1.1 1999/05/03 07:28:58 rth Exp $
@tex
% NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE
\global\long\def\example{%
@@ -67,7 +67,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.29 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.1.1.1 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill sac\@cygnus.com\par
diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi
new file mode 100644
index 0000000..39eaacf
--- /dev/null
+++ b/contrib/binutils/bfd/doc/bfdint.texi
@@ -0,0 +1,1885 @@
+\input texinfo
+@setfilename bfdint.info
+
+@settitle BFD Internals
+@iftex
+@titlepage
+@title{BFD Internals}
+@author{Ian Lance Taylor}
+@author{Cygnus Solutions}
+@page
+@end iftex
+
+@node Top
+@top BFD Internals
+@raisesections
+@cindex bfd internals
+
+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 $.
+
+The initial version of this document was written by Ian Lance Taylor
+@email{ian@@cygnus.com}.
+
+@menu
+* BFD overview:: BFD overview
+* BFD guidelines:: BFD programming guidelines
+* BFD target vector:: BFD target vector
+* BFD generated files:: BFD generated files
+* BFD multiple compilations:: Files compiled multiple times in BFD
+* BFD relocation handling:: BFD relocation handling
+* BFD ELF support:: BFD ELF support
+* BFD glossary:: Glossary
+* Index:: Index
+@end menu
+
+@node BFD overview
+@section BFD overview
+
+BFD is a library which provides a single interface to read and write
+object files, executables, archive files, and core files in any format.
+
+@menu
+* BFD library interfaces:: BFD library interfaces
+* BFD library users:: BFD library users
+* BFD view:: The BFD view of a file
+* BFD blindness:: BFD loses information
+@end menu
+
+@node BFD library interfaces
+@subsection BFD library interfaces
+
+One way to look at the BFD library is to divide it into four parts by
+type of interface.
+
+The first interface is the set of generic functions which programs using
+the BFD library will call. These generic function normally translate
+directly or indirectly into calls to routines which are specific to a
+particular object file format. Many of these generic functions are
+actually defined as macros in @file{bfd.h}. These functions comprise
+the official BFD interface.
+
+The second interface is the set of functions which appear in the target
+vectors. This is the bulk of the code in BFD. A target vector is a set
+of function pointers specific to a particular object file format. The
+target vector is used to implement the generic BFD functions. These
+functions are always called through the target vector, and are never
+called directly. The target vector is described in detail in @ref{BFD
+target vector}. The set of functions which appear in a particular
+target vector is often referred to as a BFD backend.
+
+The third interface is a set of oddball functions which are typically
+specific to a particular object file format, are not generic functions,
+and are called from outside of the BFD library. These are used as hooks
+by the linker and the assembler when a particular object file format
+requires some action which the BFD generic interface does not provide.
+These functions are typically declared in @file{bfd.h}, but in many
+cases they are only provided when BFD is configured with support for a
+particular object file format. These functions live in a grey area, and
+are not really part of the official BFD interface.
+
+The fourth interface is the set of BFD support functions which are
+called by the other BFD functions. These manage issues like memory
+allocation, error handling, file access, hash tables, swapping, and the
+like. These functions are never called from outside of the BFD library.
+
+@node BFD library users
+@subsection BFD library users
+
+Another way to look at the BFD library is to divide it into three parts
+by the manner in which it is used.
+
+The first use is to read an object file. The object file readers are
+programs like @samp{gdb}, @samp{nm}, @samp{objdump}, and @samp{objcopy}.
+These programs use BFD to view an object file in a generic form. The
+official BFD interface is normally fully adequate for these programs.
+
+The second use is to write an object file. The object file writers are
+programs like @samp{gas} and @samp{objcopy}. These programs use BFD to
+create an object file. The official BFD interface is normally adequate
+for these programs, but for some object file formats the assembler needs
+some additional hooks in order to set particular flags or other
+information. The official BFD interface includes functions to copy
+private information from one object file to another, and these functions
+are used by @samp{objcopy} to avoid information loss.
+
+The third use is to link object files. There is only one object file
+linker, @samp{ld}. Originally, @samp{ld} was an object file reader and
+an object file writer, and it did the link operation using the generic
+BFD structures. However, this turned out to be too slow and too memory
+intensive.
+
+The official BFD linker functions were written to permit specific BFD
+backends to perform the link without translating through the generic
+structures, in the normal case where all the input files and output file
+have the same object file format. Not all of the backends currently
+implement the new interface, and there are default linking functions
+within BFD which use the generic structures and which work with all
+backends.
+
+For several object file formats the linker needs additional hooks which
+are not provided by the official BFD interface, particularly for dynamic
+linking support. These functions are typically called from the linker
+emulation template.
+
+@node BFD view
+@subsection The BFD view of a file
+
+BFD uses generic structures to manage information. It translates data
+into the generic form when reading files, and out of the generic form
+when writing files.
+
+BFD describes a file as a pointer to the @samp{bfd} type. A @samp{bfd}
+is composed of the following elements. The BFD information can be
+displayed using the @samp{objdump} program with various options.
+
+@table @asis
+@item general information
+The object file format, a few general flags, the start address.
+@item architecture
+The architecture, including both a general processor type (m68k, MIPS
+etc.) and a specific machine number (m68000, R4000, etc.).
+@item sections
+A list of sections.
+@item symbols
+A symbol table.
+@end table
+
+BFD represents a section as a pointer to the @samp{asection} type. Each
+section has a name and a size. Most sections also have an associated
+block of data, known as the section contents. Sections also have
+associated flags, a virtual memory address, a load memory address, a
+required alignment, a list of relocations, and other miscellaneous
+information.
+
+BFD represents a relocation as a pointer to the @samp{arelent} type. A
+relocation describes an action which the linker must take to modify the
+section contents. Relocations have a symbol, an address, an addend, and
+a pointer to a howto structure which describes how to perform the
+relocation. For more information, see @ref{BFD relocation handling}.
+
+BFD represents a symbol as a pointer to the @samp{asymbol} type. A
+symbol has a name, a pointer to a section, an offset within that
+section, and some flags.
+
+Archive files do not have any sections or symbols. Instead, BFD
+represents an archive file as a file which contains a list of
+@samp{bfd}s. BFD also provides access to the archive symbol map, as a
+list of symbol names. BFD provides a function to return the @samp{bfd}
+within the archive which corresponds to a particular entry in the
+archive symbol map.
+
+@node BFD blindness
+@subsection BFD loses information
+
+Most object file formats have information which BFD can not represent in
+its generic form, at least as currently defined.
+
+There is often explicit information which BFD can not represent. For
+example, the COFF version stamp, or the ELF program segments. BFD
+provides special hooks to handle this information when copying,
+printing, or linking an object file. The BFD support for a particular
+object file format will normally store this information in private data
+and handle it using the special hooks.
+
+In some cases there is also implicit information which BFD can not
+represent. For example, the MIPS processor distinguishes small and
+large symbols, and requires that all small symbls be within 32K of the
+GP register. This means that the MIPS assembler must be able to mark
+variables as either small or large, and the MIPS linker must know to put
+small symbols within range of the GP register. Since BFD can not
+represent this information, this means that the assembler and linker
+must have information that is specific to a particular object file
+format which is outside of the BFD library.
+
+This loss of information indicates areas where the BFD paradigm breaks
+down. It is not actually possible to represent the myriad differences
+among object file formats using a single generic interface, at least not
+in the manner which BFD does it today.
+
+Nevertheless, the BFD library does greatly simplify the task of dealing
+with object files, and particular problems caused by information loss
+can normally be solved using some sort of relatively constrained hook
+into the library.
+
+
+
+@node BFD guidelines
+@section BFD programming guidelines
+@cindex bfd programming guidelines
+@cindex programming guidelines for bfd
+@cindex guidelines, bfd programming
+
+There is a lot of poorly written and confusing code in BFD. New BFD
+code should be written to a higher standard. Merely because some BFD
+code is written in a particular manner does not mean that you should
+emulate it.
+
+Here are some general BFD programming guidelines:
+
+@itemize @bullet
+@item
+Follow the GNU coding standards.
+
+@item
+Avoid global variables. We ideally want BFD to be fully reentrant, so
+that it can be used in multiple threads. All uses of global or static
+variables interfere with that. Initialized constant variables are OK,
+and they should be explicitly marked with const. Instead of global
+variables, use data attached to a BFD or to a linker hash table.
+
+@item
+All externally visible functions should have names which start with
+@samp{bfd_}. All such functions should be declared in some header file,
+typically @file{bfd.h}. See, for example, the various declarations near
+the end of @file{bfd-in.h}, which mostly declare functions required by
+specific linker emulations.
+
+@item
+All functions which need to be visible from one file to another within
+BFD, but should not be visible outside of BFD, should start with
+@samp{_bfd_}. Although external names beginning with @samp{_} are
+prohibited by the ANSI standard, in practice this usage will always
+work, and it is required by the GNU coding standards.
+
+@item
+Always remember that people can compile using @samp{--enable-targets} to
+build several, or all, targets at once. It must be possible to link
+together the files for all targets.
+
+@item
+BFD code should compile with few or no warnings using @samp{gcc -Wall}.
+Some warnings are OK, like the absence of certain function declarations
+which may or may not be declared in system header files. Warnings about
+ambiguous expressions and the like should always be fixed.
+@end itemize
+
+@node BFD target vector
+@section BFD target vector
+@cindex bfd target vector
+@cindex target vector in bfd
+
+BFD supports multiple object file formats by using the @dfn{target
+vector}. This is simply a set of function pointers which implement
+behaviour that is specific to a particular object file format.
+
+In this section I list all of the entries in the target vector and
+describe what they do.
+
+@menu
+* BFD target vector miscellaneous:: Miscellaneous constants
+* BFD target vector swap:: Swapping functions
+* BFD target vector format:: Format type dependent functions
+* BFD_JUMP_TABLE macros:: BFD_JUMP_TABLE macros
+* BFD target vector generic:: Generic functions
+* BFD target vector copy:: Copy functions
+* BFD target vector core:: Core file support functions
+* BFD target vector archive:: Archive functions
+* BFD target vector symbols:: Symbol table functions
+* BFD target vector relocs:: Relocation support
+* BFD target vector write:: Output functions
+* BFD target vector link:: Linker functions
+* BFD target vector dynamic:: Dynamic linking information functions
+@end menu
+
+@node BFD target vector miscellaneous
+@subsection Miscellaneous constants
+
+The target vector starts with a set of constants.
+
+@table @samp
+@item name
+The name of the target vector. This is an arbitrary string. This is
+how the target vector is named in command line options for tools which
+use BFD, such as the @samp{-oformat} linker option.
+
+@item flavour
+A general description of the type of target. The following flavours are
+currently defined:
+
+@table @samp
+@item bfd_target_unknown_flavour
+Undefined or unknown.
+@item bfd_target_aout_flavour
+a.out.
+@item bfd_target_coff_flavour
+COFF.
+@item bfd_target_ecoff_flavour
+ECOFF.
+@item bfd_target_elf_flavour
+ELF.
+@item bfd_target_ieee_flavour
+IEEE-695.
+@item bfd_target_nlm_flavour
+NLM.
+@item bfd_target_oasys_flavour
+OASYS.
+@item bfd_target_tekhex_flavour
+Tektronix hex format.
+@item bfd_target_srec_flavour
+Motorola S-record format.
+@item bfd_target_ihex_flavour
+Intel hex format.
+@item bfd_target_som_flavour
+SOM (used on HP/UX).
+@item bfd_target_os9k_flavour
+os9000.
+@item bfd_target_versados_flavour
+VERSAdos.
+@item bfd_target_msdos_flavour
+MS-DOS.
+@item bfd_target_evax_flavour
+openVMS.
+@end table
+
+@item byteorder
+The byte order of data in the object file. One of
+@samp{BFD_ENDIAN_BIG}, @samp{BFD_ENDIAN_LITTLE}, or
+@samp{BFD_ENDIAN_UNKNOWN}. The latter would be used for a format such
+as S-records which do not record the architecture of the data.
+
+@item header_byteorder
+The byte order of header information in the object file. Normally the
+same as the @samp{byteorder} field, but there are certain cases where it
+may be different.
+
+@item object_flags
+Flags which may appear in the @samp{flags} field of a BFD with this
+format.
+
+@item section_flags
+Flags which may appear in the @samp{flags} field of a section within a
+BFD with this format.
+
+@item symbol_leading_char
+A character which the C compiler normally puts before a symbol. For
+example, an a.out compiler will typically generate the symbol
+@samp{_foo} for a function named @samp{foo} in the C source, in which
+case this field would be @samp{_}. If there is no such character, this
+field will be @samp{0}.
+
+@item ar_pad_char
+The padding character to use at the end of an archive name. Normally
+@samp{/}.
+
+@item ar_max_namelen
+The maximum length of a short name in an archive. Normally @samp{14}.
+
+@item backend_data
+A pointer to constant backend data. This is used by backends to store
+whatever additional information they need to distinguish similar target
+vectors which use the same sets of functions.
+@end table
+
+@node BFD target vector swap
+@subsection Swapping functions
+
+Every target vector has fuction pointers used for swapping information
+in and out of the target representation. There are two sets of
+functions: one for data information, and one for header information.
+Each set has three sizes: 64-bit, 32-bit, and 16-bit. Each size has
+three actual functions: put, get unsigned, and get signed.
+
+These 18 functions are used to convert data between the host and target
+representations.
+
+@node BFD target vector format
+@subsection Format type dependent functions
+
+Every target vector has three arrays of function pointers which are
+indexed by the BFD format type. The BFD format types are as follows:
+
+@table @samp
+@item bfd_unknown
+Unknown format. Not used for anything useful.
+@item bfd_object
+Object file.
+@item bfd_archive
+Archive file.
+@item bfd_core
+Core file.
+@end table
+
+The three arrays of function pointers are as follows:
+
+@table @samp
+@item bfd_check_format
+Check whether the BFD is of a particular format (object file, archive
+file, or core file) corresponding to this target vector. This is called
+by the @samp{bfd_check_format} function when examining an existing BFD.
+If the BFD matches the desired format, this function will initialize any
+format specific information such as the @samp{tdata} field of the BFD.
+This function must be called before any other BFD target vector function
+on a file opened for reading.
+
+@item bfd_set_format
+Set the format of a BFD which was created for output. This is called by
+the @samp{bfd_set_format} function after creating the BFD with a
+function such as @samp{bfd_openw}. This function will initialize format
+specific information required to write out an object file or whatever of
+the given format. This function must be called before any other BFD
+target vector function on a file opened for writing.
+
+@item bfd_write_contents
+Write out the contents of the BFD in the given format. This is called
+by @samp{bfd_close} function for a BFD opened for writing. This really
+should not be an array selected by format type, as the
+@samp{bfd_set_format} function provides all the required information.
+In fact, BFD will fail if a different format is used when calling
+through the @samp{bfd_set_format} and the @samp{bfd_write_contents}
+arrays; fortunately, since @samp{bfd_close} gets it right, this is a
+difficult error to make.
+@end table
+
+@node BFD_JUMP_TABLE macros
+@subsection @samp{BFD_JUMP_TABLE} macros
+@cindex @samp{BFD_JUMP_TABLE}
+
+Most target vectors are defined using @samp{BFD_JUMP_TABLE} macros.
+These macros take a single argument, which is a prefix applied to a set
+of functions. The macros are then used to initialize the fields in the
+target vector.
+
+For example, the @samp{BFD_JUMP_TABLE_RELOCS} macro defines three
+functions: @samp{_get_reloc_upper_bound}, @samp{_canonicalize_reloc},
+and @samp{_bfd_reloc_type_lookup}. A reference like
+@samp{BFD_JUMP_TABLE_RELOCS (foo)} will expand into three functions
+prefixed with @samp{foo}: @samp{foo_get_reloc_upper_bound}, etc. The
+@samp{BFD_JUMP_TABLE_RELOCS} macro will be placed such that those three
+functions initialize the appropriate fields in the BFD target vector.
+
+This is done because it turns out that many different target vectors can
+share certain classes of functions. For example, archives are similar
+on most platforms, so most target vectors can use the same archive
+functions. Those target vectors all use @samp{BFD_JUMP_TABLE_ARCHIVE}
+with the same argument, calling a set of functions which is defined in
+@file{archive.c}.
+
+Each of the @samp{BFD_JUMP_TABLE} macros is mentioned below along with
+the description of the function pointers which it defines. The function
+pointers will be described using the name without the prefix which the
+@samp{BFD_JUMP_TABLE} macro defines. This name is normally the same as
+the name of the field in the target vector structure. Any differences
+will be noted.
+
+@node BFD target vector generic
+@subsection Generic functions
+@cindex @samp{BFD_JUMP_TABLE_GENERIC}
+
+The @samp{BFD_JUMP_TABLE_GENERIC} macro is used for some catch all
+functions which don't easily fit into other categories.
+
+@table @samp
+@item _close_and_cleanup
+Free any target specific information associated with the BFD. This is
+called when any BFD is closed (the @samp{bfd_write_contents} function
+mentioned earlier is only called for a BFD opened for writing). Most
+targets use @samp{bfd_alloc} to allocate all target specific
+information, and therefore don't have to do anything in this function.
+This function pointer is typically set to
+@samp{_bfd_generic_close_and_cleanup}, which simply returns true.
+
+@item _bfd_free_cached_info
+Free any cached information associated with the BFD which can be
+recreated later if necessary. This is used to reduce the memory
+consumption required by programs using BFD. This is normally called via
+the @samp{bfd_free_cached_info} macro. It is used by the default
+archive routines when computing the archive map. Most targets do not
+do anything special for this entry point, and just set it to
+@samp{_bfd_generic_free_cached_info}, which simply returns true.
+
+@item _new_section_hook
+This is called from @samp{bfd_make_section_anyway} whenever a new
+section is created. Most targets use it to initialize section specific
+information. This function is called whether or not the section
+corresponds to an actual section in an actual BFD.
+
+@item _get_section_contents
+Get the contents of a section. This is called from
+@samp{bfd_get_section_contents}. Most targets set this to
+@samp{_bfd_generic_get_section_contents}, which does a @samp{bfd_seek}
+based on the section's @samp{filepos} field and a @samp{bfd_read}. The
+corresponding field in the target vector is named
+@samp{_bfd_get_section_contents}.
+
+@item _get_section_contents_in_window
+Set a @samp{bfd_window} to hold the contents of a section. This is
+called from @samp{bfd_get_section_contents_in_window}. The
+@samp{bfd_window} idea never really caught on, and I don't think this is
+ever called. Pretty much all targets implement this as
+@samp{bfd_generic_get_section_contents_in_window}, which uses
+@samp{bfd_get_section_contents} to do the right thing. The
+corresponding field in the target vector is named
+@samp{_bfd_get_section_contents_in_window}.
+@end table
+
+@node BFD target vector copy
+@subsection Copy functions
+@cindex @samp{BFD_JUMP_TABLE_COPY}
+
+The @samp{BFD_JUMP_TABLE_COPY} macro is used for functions which are
+called when copying BFDs, and for a couple of functions which deal with
+internal BFD information.
+
+@table @samp
+@item _bfd_copy_private_bfd_data
+This is called when copying a BFD, via @samp{bfd_copy_private_bfd_data}.
+If the input and output BFDs have the same format, this will copy any
+private information over. This is called after all the section contents
+have been written to the output file. Only a few targets do anything in
+this function.
+
+@item _bfd_merge_private_bfd_data
+This is called when linking, via @samp{bfd_merge_private_bfd_data}. It
+gives the backend linker code a chance to set any special flags in the
+output file based on the contents of the input file. Only a few targets
+do anything in this function.
+
+@item _bfd_copy_private_section_data
+This is similar to @samp{_bfd_copy_private_bfd_data}, but it is called
+for each section, via @samp{bfd_copy_private_section_data}. This
+function is called before any section contents have been written. Only
+a few targets do anything in this function.
+
+@item _bfd_copy_private_symbol_data
+This is called via @samp{bfd_copy_private_symbol_data}, but I don't
+think anything actually calls it. If it were defined, it could be used
+to copy private symbol data from one BFD to another. However, most BFDs
+store extra symbol information by allocating space which is larger than
+the @samp{asymbol} structure and storing private information in the
+extra space. Since @samp{objcopy} and other programs copy symbol
+information by copying pointers to @samp{asymbol} structures, the
+private symbol information is automatically copied as well. Most
+targets do not do anything in this function.
+
+@item _bfd_set_private_flags
+This is called via @samp{bfd_set_private_flags}. It is basically a hook
+for the assembler to set magic information. For example, the PowerPC
+ELF assembler uses it to set flags which appear in the e_flags field of
+the ELF header. Most targets do not do anything in this function.
+
+@item _bfd_print_private_bfd_data
+This is called by @samp{objdump} when the @samp{-p} option is used. It
+is called via @samp{bfd_print_private_data}. It prints any interesting
+information about the BFD which can not be otherwise represented by BFD
+and thus can not be printed by @samp{objdump}. Most targets do not do
+anything in this function.
+@end table
+
+@node BFD target vector core
+@subsection Core file support functions
+@cindex @samp{BFD_JUMP_TABLE_CORE}
+
+The @samp{BFD_JUMP_TABLE_CORE} macro is used for functions which deal
+with core files. Obviously, these functions only do something
+interesting for targets which have core file support.
+
+@table @samp
+@item _core_file_failing_command
+Given a core file, this returns the command which was run to produce the
+core file.
+
+@item _core_file_failing_signal
+Given a core file, this returns the signal number which produced the
+core file.
+
+@item _core_file_matches_executable_p
+Given a core file and a BFD for an executable, this returns whether the
+core file was generated by the executable.
+@end table
+
+@node BFD target vector archive
+@subsection Archive functions
+@cindex @samp{BFD_JUMP_TABLE_ARCHIVE}
+
+The @samp{BFD_JUMP_TABLE_ARCHIVE} macro is used for functions which deal
+with archive files. Most targets use COFF style archive files
+(including ELF targets), and these use @samp{_bfd_archive_coff} as the
+argument to @samp{BFD_JUMP_TABLE_ARCHIVE}. Some targets use BSD/a.out
+style archives, and these use @samp{_bfd_archive_bsd}. (The main
+difference between BSD and COFF archives is the format of the archive
+symbol table). Targets with no archive support use
+@samp{_bfd_noarchive}. Finally, a few targets have unusual archive
+handling.
+
+@table @samp
+@item _slurp_armap
+Read in the archive symbol table, storing it in private BFD data. This
+is normally called from the archive @samp{check_format} routine. The
+corresponding field in the target vector is named
+@samp{_bfd_slurp_armap}.
+
+@item _slurp_extended_name_table
+Read in the extended name table from the archive, if there is one,
+storing it in private BFD data. This is normally called from the
+archive @samp{check_format} routine. The corresponding field in the
+target vector is named @samp{_bfd_slurp_extended_name_table}.
+
+@item construct_extended_name_table
+Build and return an extended name table if one is needed to write out
+the archive. This also adjusts the archive headers to refer to the
+extended name table appropriately. This is normally called from the
+archive @samp{write_contents} routine. The corresponding field in the
+target vector is named @samp{_bfd_construct_extended_name_table}.
+
+@item _truncate_arname
+This copies a file name into an archive header, truncating it as
+required. It is normally called from the archive @samp{write_contents}
+routine. This function is more interesting in targets which do not
+support extended name tables, but I think the GNU @samp{ar} program
+always uses extended name tables anyhow. The corresponding field in the
+target vector is named @samp{_bfd_truncate_arname}.
+
+@item _write_armap
+Write out the archive symbol table using calls to @samp{bfd_write}.
+This is normally called from the archive @samp{write_contents} routine.
+The corresponding field in the target vector is named @samp{write_armap}
+(no leading underscore).
+
+@item _read_ar_hdr
+Read and parse an archive header. This handles expanding the archive
+header name into the real file name using the extended name table. This
+is called by routines which read the archive symbol table or the archive
+itself. The corresponding field in the target vector is named
+@samp{_bfd_read_ar_hdr_fn}.
+
+@item _openr_next_archived_file
+Given an archive and a BFD representing a file stored within the
+archive, return a BFD for the next file in the archive. This is called
+via @samp{bfd_openr_next_archived_file}. The corresponding field in the
+target vector is named @samp{openr_next_archived_file} (no leading
+underscore).
+
+@item _get_elt_at_index
+Given an archive and an index, return a BFD for the file in the archive
+corresponding to that entry in the archive symbol table. This is called
+via @samp{bfd_get_elt_at_index}. The corresponding field in the target
+vector is named @samp{_bfd_get_elt_at_index}.
+
+@item _generic_stat_arch_elt
+Do a stat on an element of an archive, returning information read from
+the archive header (modification time, uid, gid, file mode, size). This
+is called via @samp{bfd_stat_arch_elt}. The corresponding field in the
+target vector is named @samp{_bfd_stat_arch_elt}.
+
+@item _update_armap_timestamp
+After the entire contents of an archive have been written out, update
+the timestamp of the archive symbol table to be newer than that of the
+file. This is required for a.out style archives. This is normally
+called by the archive @samp{write_contents} routine. The corresponding
+field in the target vector is named @samp{_bfd_update_armap_timestamp}.
+@end table
+
+@node BFD target vector symbols
+@subsection Symbol table functions
+@cindex @samp{BFD_JUMP_TABLE_SYMBOLS}
+
+The @samp{BFD_JUMP_TABLE_SYMBOLS} macro is used for functions which deal
+with symbols.
+
+@table @samp
+@item _get_symtab_upper_bound
+Return a sensible upper bound on the amount of memory which will be
+required to read the symbol table. In practice most targets return the
+amount of memory required to hold @samp{asymbol} pointers for all the
+symbols plus a trailing @samp{NULL} entry, and store the actual symbol
+information in BFD private data. This is called via
+@samp{bfd_get_symtab_upper_bound}. The corresponding field in the
+target vector is named @samp{_bfd_get_symtab_upper_bound}.
+
+@item _get_symtab
+Read in the symbol table. This is called via
+@samp{bfd_canonicalize_symtab}. The corresponding field in the target
+vector is named @samp{_bfd_canonicalize_symtab}.
+
+@item _make_empty_symbol
+Create an empty symbol for the BFD. This is needed because most targets
+store extra information with each symbol by allocating a structure
+larger than an @samp{asymbol} and storing the extra information at the
+end. This function will allocate the right amount of memory, and return
+what looks like a pointer to an empty @samp{asymbol}. This is called
+via @samp{bfd_make_empty_symbol}. The corresponding field in the target
+vector is named @samp{_bfd_make_empty_symbol}.
+
+@item _print_symbol
+Print information about the symbol. This is called via
+@samp{bfd_print_symbol}. One of the arguments indicates what sort of
+information should be printed:
+
+@table @samp
+@item bfd_print_symbol_name
+Just print the symbol name.
+@item bfd_print_symbol_more
+Print the symbol name and some interesting flags. I don't think
+anything actually uses this.
+@item bfd_print_symbol_all
+Print all information about the symbol. This is used by @samp{objdump}
+when run with the @samp{-t} option.
+@end table
+The corresponding field in the target vector is named
+@samp{_bfd_print_symbol}.
+
+@item _get_symbol_info
+Return a standard set of information about the symbol. This is called
+via @samp{bfd_symbol_info}. The corresponding field in the target
+vector is named @samp{_bfd_get_symbol_info}.
+
+@item _bfd_is_local_label_name
+Return whether the given string would normally represent the name of a
+local label. This is called via @samp{bfd_is_local_label} and
+@samp{bfd_is_local_label_name}. Local labels are normally discarded by
+the assembler. In the linker, this defines the difference between the
+@samp{-x} and @samp{-X} options.
+
+@item _get_lineno
+Return line number information for a symbol. This is only meaningful
+for a COFF target. This is called when writing out COFF line numbers.
+
+@item _find_nearest_line
+Given an address within a section, use the debugging information to find
+the matching file name, function name, and line number, if any. This is
+called via @samp{bfd_find_nearest_line}. The corresponding field in the
+target vector is named @samp{_bfd_find_nearest_line}.
+
+@item _bfd_make_debug_symbol
+Make a debugging symbol. This is only meaningful for a COFF target,
+where it simply returns a symbol which will be placed in the
+@samp{N_DEBUG} section when it is written out. This is called via
+@samp{bfd_make_debug_symbol}.
+
+@item _read_minisymbols
+Minisymbols are used to reduce the memory requirements of programs like
+@samp{nm}. A minisymbol is a cookie pointing to internal symbol
+information which the caller can use to extract complete symbol
+information. This permits BFD to not convert all the symbols into
+generic form, but to instead convert them one at a time. This is called
+via @samp{bfd_read_minisymbols}. Most targets do not implement this,
+and just use generic support which is based on using standard
+@samp{asymbol} structures.
+
+@item _minisymbol_to_symbol
+Convert a minisymbol to a standard @samp{asymbol}. This is called via
+@samp{bfd_minisymbol_to_symbol}.
+@end table
+
+@node BFD target vector relocs
+@subsection Relocation support
+@cindex @samp{BFD_JUMP_TABLE_RELOCS}
+
+The @samp{BFD_JUMP_TABLE_RELOCS} macro is used for functions which deal
+with relocations.
+
+@table @samp
+@item _get_reloc_upper_bound
+Return a sensible upper bound on the amount of memory which will be
+required to read the relocations for a section. In practice most
+targets return the amount of memory required to hold @samp{arelent}
+pointers for all the relocations plus a trailing @samp{NULL} entry, and
+store the actual relocation information in BFD private data. This is
+called via @samp{bfd_get_reloc_upper_bound}.
+
+@item _canonicalize_reloc
+Return the relocation information for a section. This is called via
+@samp{bfd_canonicalize_reloc}. The corresponding field in the target
+vector is named @samp{_bfd_canonicalize_reloc}.
+
+@item _bfd_reloc_type_lookup
+Given a relocation code, return the corresponding howto structure
+(@pxref{BFD relocation codes}). This is called via
+@samp{bfd_reloc_type_lookup}. The corresponding field in the target
+vector is named @samp{reloc_type_lookup}.
+@end table
+
+@node BFD target vector write
+@subsection Output functions
+@cindex @samp{BFD_JUMP_TABLE_WRITE}
+
+The @samp{BFD_JUMP_TABLE_WRITE} macro is used for functions which deal
+with writing out a BFD.
+
+@table @samp
+@item _set_arch_mach
+Set the architecture and machine number for a BFD. This is called via
+@samp{bfd_set_arch_mach}. Most targets implement this by calling
+@samp{bfd_default_set_arch_mach}. The corresponding field in the target
+vector is named @samp{_bfd_set_arch_mach}.
+
+@item _set_section_contents
+Write out the contents of a section. This is called via
+@samp{bfd_set_section_contents}. The corresponding field in the target
+vector is named @samp{_bfd_set_section_contents}.
+@end table
+
+@node BFD target vector link
+@subsection Linker functions
+@cindex @samp{BFD_JUMP_TABLE_LINK}
+
+The @samp{BFD_JUMP_TABLE_LINK} macro is used for functions called by the
+linker.
+
+@table @samp
+@item _sizeof_headers
+Return the size of the header information required for a BFD. This is
+used to implement the @samp{SIZEOF_HEADERS} linker script function. It
+is normally used to align the first section at an efficient position on
+the page. This is called via @samp{bfd_sizeof_headers}. The
+corresponding field in the target vector is named
+@samp{_bfd_sizeof_headers}.
+
+@item _bfd_get_relocated_section_contents
+Read the contents of a section and apply the relocation information.
+This handles both a final link and a relocateable link; in the latter
+case, it adjust the relocation information as well. This is called via
+@samp{bfd_get_relocated_section_contents}. Most targets implement it by
+calling @samp{bfd_generic_get_relocated_section_contents}.
+
+@item _bfd_relax_section
+Try to use relaxation to shrink the size of a section. This is called
+by the linker when the @samp{-relax} option is used. This is called via
+@samp{bfd_relax_section}. Most targets do not support any sort of
+relaxation.
+
+@item _bfd_link_hash_table_create
+Create the symbol hash table to use for the linker. This linker hook
+permits the backend to control the size and information of the elements
+in the linker symbol hash table. This is called via
+@samp{bfd_link_hash_table_create}.
+
+@item _bfd_link_add_symbols
+Given an object file or an archive, add all symbols into the linker
+symbol hash table. Use callbacks to the linker to include archive
+elements in the link. This is called via @samp{bfd_link_add_symbols}.
+
+@item _bfd_final_link
+Finish the linking process. The linker calls this hook after all of the
+input files have been read, when it is ready to finish the link and
+generate the output file. This is called via @samp{bfd_final_link}.
+
+@item _bfd_link_split_section
+I don't know what this is for. Nothing seems to call it. The only
+non-trivial definition is in @file{som.c}.
+@end table
+
+@node BFD target vector dynamic
+@subsection Dynamic linking information functions
+@cindex @samp{BFD_JUMP_TABLE_DYNAMIC}
+
+The @samp{BFD_JUMP_TABLE_DYNAMIC} macro is used for functions which read
+dynamic linking information.
+
+@table @samp
+@item _get_dynamic_symtab_upper_bound
+Return a sensible upper bound on the amount of memory which will be
+required to read the dynamic symbol table. In practice most targets
+return the amount of memory required to hold @samp{asymbol} pointers for
+all the symbols plus a trailing @samp{NULL} entry, and store the actual
+symbol information in BFD private data. This is called via
+@samp{bfd_get_dynamic_symtab_upper_bound}. The corresponding field in
+the target vector is named @samp{_bfd_get_dynamic_symtab_upper_bound}.
+
+@item _canonicalize_dynamic_symtab
+Read the dynamic symbol table. This is called via
+@samp{bfd_canonicalize_dynamic_symtab}. The corresponding field in the
+target vector is named @samp{_bfd_canonicalize_dynamic_symtab}.
+
+@item _get_dynamic_reloc_upper_bound
+Return a sensible upper bound on the amount of memory which will be
+required to read the dynamic relocations. In practice most targets
+return the amount of memory required to hold @samp{arelent} pointers for
+all the relocations plus a trailing @samp{NULL} entry, and store the
+actual relocation information in BFD private data. This is called via
+@samp{bfd_get_dynamic_reloc_upper_bound}. The corresponding field in
+the target vector is named @samp{_bfd_get_dynamic_reloc_upper_bound}.
+
+@item _canonicalize_dynamic_reloc
+Read the dynamic relocations. This is called via
+@samp{bfd_canonicalize_dynamic_reloc}. The corresponding field in the
+target vector is named @samp{_bfd_canonicalize_dynamic_reloc}.
+@end table
+
+@node BFD generated files
+@section BFD generated files
+@cindex generated files in bfd
+@cindex bfd generated files
+
+BFD contains several automatically generated files. This section
+describes them. Some files are created at configure time, when you
+configure BFD. Some files are created at make time, when you build
+BFD. Some files are automatically rebuilt at make time, but only if
+you configure with the @samp{--enable-maintainer-mode} option. Some
+files live in the object directory---the directory from which you run
+configure---and some live in the source directory. All files that live
+in the source directory are checked into the CVS repository.
+
+@table @file
+@item bfd.h
+@cindex @file{bfd.h}
+@cindex @file{bfd-in3.h}
+Lives in the object directory. Created at make time from
+@file{bfd-in2.h} via @file{bfd-in3.h}. @file{bfd-in3.h} is created at
+configure time from @file{bfd-in2.h}. There are automatic dependencies
+to rebuild @file{bfd-in3.h} and hence @file{bfd.h} if @file{bfd-in2.h}
+changes, so you can normally ignore @file{bfd-in3.h}, and just think
+about @file{bfd-in2.h} and @file{bfd.h}.
+
+@file{bfd.h} is built by replacing a few strings in @file{bfd-in2.h}.
+To see them, search for @samp{@@} in @file{bfd-in2.h}. They mainly
+control whether BFD is built for a 32 bit target or a 64 bit target.
+
+@item bfd-in2.h
+@cindex @file{bfd-in2.h}
+Lives in the source directory. Created from @file{bfd-in.h} and several
+other BFD source files. If you configure with the
+@samp{--enable-maintainer-mode} option, @file{bfd-in2.h} is rebuilt
+automatically when a source file changes.
+
+@item elf32-target.h
+@itemx elf64-target.h
+@cindex @file{elf32-target.h}
+@cindex @file{elf64-target.h}
+Live in the object directory. Created from @file{elfxx-target.h}.
+These files are versions of @file{elfxx-target.h} customized for either
+a 32 bit ELF target or a 64 bit ELF target.
+
+@item libbfd.h
+@cindex @file{libbfd.h}
+Lives in the source directory. Created from @file{libbfd-in.h} and
+several other BFD source files. If you configure with the
+@samp{--enable-maintainer-mode} option, @file{libbfd.h} is rebuilt
+automatically when a source file changes.
+
+@item libcoff.h
+@cindex @file{libcoff.h}
+Lives in the source directory. Created from @file{libcoff-in.h} and
+@file{coffcode.h}. If you configure with the
+@samp{--enable-maintainer-mode} option, @file{libcoff.h} is rebuilt
+automatically when a source file changes.
+
+@item targmatch.h
+@cindex @file{targmatch.h}
+Lives in the object directory. Created at make time from
+@file{config.bfd}. This file is used to map configuration triplets into
+BFD target vector variable names at run time.
+@end table
+
+@node BFD multiple compilations
+@section Files compiled multiple times in BFD
+Several files in BFD are compiled multiple times. By this I mean that
+there are header files which contain function definitions. These header
+files are included by other files, and thus the functions are compiled
+once per file which includes them.
+
+Preprocessor macros are used to control the compilation, so that each
+time the files are compiled the resulting functions are slightly
+different. Naturally, if they weren't different, there would be no
+reason to compile them multiple times.
+
+This is a not a particularly good programming technique, and future BFD
+work should avoid it.
+
+@itemize @bullet
+@item
+Since this technique is rarely used, even experienced C programmers find
+it confusing.
+
+@item
+It is difficult to debug programs which use BFD, since there is no way
+to describe which version of a particular function you are looking at.
+
+@item
+Programs which use BFD wind up incorporating two or more slightly
+different versions of the same function, which wastes space in the
+executable.
+
+@item
+This technique is never required nor is it especially efficient. It is
+always possible to use statically initialized structures holding
+function pointers and magic constants instead.
+@end itemize
+
+The following is a list of the files which are compiled multiple times.
+
+@table @file
+@item aout-target.h
+@cindex @file{aout-target.h}
+Describes a few functions and the target vector for a.out targets. This
+is used by individual a.out targets with different definitions of
+@samp{N_TXTADDR} and similar a.out macros.
+
+@item aoutf1.h
+@cindex @file{aoutf1.h}
+Implements standard SunOS a.out files. In principle it supports 64 bit
+a.out targets based on the preprocessor macro @samp{ARCH_SIZE}, but
+since all known a.out targets are 32 bits, this code may or may not
+work. This file is only included by a few other files, and it is
+difficult to justify its existence.
+
+@item aoutx.h
+@cindex @file{aoutx.h}
+Implements basic a.out support routines. This file can be compiled for
+either 32 or 64 bit support. Since all known a.out targets are 32 bits,
+the 64 bit support may or may not work. I believe the original
+intention was that this file would only be included by @samp{aout32.c}
+and @samp{aout64.c}, and that other a.out targets would simply refer to
+the functions it defined. Unfortunately, some other a.out targets
+started including it directly, leading to a somewhat confused state of
+affairs.
+
+@item coffcode.h
+@cindex @file{coffcode.h}
+Implements basic COFF support routines. This file is included by every
+COFF target. It implements code which handles COFF magic numbers as
+well as various hook functions called by the generic COFF functions in
+@file{coffgen.c}. This file is controlled by a number of different
+macros, and more are added regularly.
+
+@item coffswap.h
+@cindex @file{coffswap.h}
+Implements COFF swapping routines. This file is included by
+@file{coffcode.h}, and thus by every COFF target. It implements the
+routines which swap COFF structures between internal and external
+format. The main control for this file is the external structure
+definitions in the files in the @file{include/coff} directory. A COFF
+target file will include one of those files before including
+@file{coffcode.h} and thus @file{coffswap.h}. There are a few other
+macros which affect @file{coffswap.h} as well, mostly describing whether
+certain fields are present in the external structures.
+
+@item ecoffswap.h
+@cindex @file{ecoffswap.h}
+Implements ECOFF swapping routines. This is like @file{coffswap.h}, but
+for ECOFF. It is included by the ECOFF target files (of which there are
+only two). The control is the preprocessor macro @samp{ECOFF_32} or
+@samp{ECOFF_64}.
+
+@item elfcode.h
+@cindex @file{elfcode.h}
+Implements ELF functions that use external structure definitions. This
+file is included by two other files: @file{elf32.c} and @file{elf64.c}.
+It is controlled by the @samp{ARCH_SIZE} macro which is defined to be
+@samp{32} or @samp{64} before including it. The @samp{NAME} macro is
+used internally to give the functions different names for the two target
+sizes.
+
+@item elfcore.h
+@cindex @file{elfcore.h}
+Like @file{elfcode.h}, but for functions that are specific to ELF core
+files. This is included only by @file{elfcode.h}.
+
+@item elflink.h
+@cindex @file{elflink.h}
+Like @file{elfcode.h}, but for functions used by the ELF linker. This
+is included only by @file{elfcode.h}.
+
+@item elfxx-target.h
+@cindex @file{elfxx-target.h}
+This file is the source for the generated files @file{elf32-target.h}
+and @file{elf64-target.h}, one of which is included by every ELF target.
+It defines the ELF target vector.
+
+@item freebsd.h
+@cindex @file{freebsd.h}
+Presumably intended to be included by all FreeBSD targets, but in fact
+there is only one such target, @samp{i386-freebsd}. This defines a
+function used to set the right magic number for FreeBSD, as well as
+various macros, and includes @file{aout-target.h}.
+
+@item netbsd.h
+@cindex @file{netbsd.h}
+Like @file{freebsd.h}, except that there are several files which include
+it.
+
+@item nlm-target.h
+@cindex @file{nlm-target.h}
+Defines the target vector for a standard NLM target.
+
+@item nlmcode.h
+@cindex @file{nlmcode.h}
+Like @file{elfcode.h}, but for NLM targets. This is only included by
+@file{nlm32.c} and @file{nlm64.c}, both of which define the macro
+@samp{ARCH_SIZE} to an appropriate value. There are no 64 bit NLM
+targets anyhow, so this is sort of useless.
+
+@item nlmswap.h
+@cindex @file{nlmswap.h}
+Like @file{coffswap.h}, but for NLM targets. This is included by each
+NLM target, but I think it winds up compiling to the exact same code for
+every target, and as such is fairly useless.
+
+@item peicode.h
+@cindex @file{peicode.h}
+Provides swapping routines and other hooks for PE targets.
+@file{coffcode.h} will include this rather than @file{coffswap.h} for a
+PE target. This defines PE specific versions of the COFF swapping
+routines, and also defines some macros which control @file{coffcode.h}
+itself.
+@end table
+
+@node BFD relocation handling
+@section BFD relocation handling
+@cindex bfd relocation handling
+@cindex relocations in bfd
+
+The handling of relocations is one of the more confusing aspects of BFD.
+Relocation handling has been implemented in various different ways, all
+somewhat incompatible, none perfect.
+
+@menu
+* BFD relocation concepts:: BFD relocation concepts
+* BFD relocation functions:: BFD relocation functions
+* BFD relocation codes:: BFD relocation codes
+* BFD relocation future:: BFD relocation future
+@end menu
+
+@node BFD relocation concepts
+@subsection BFD relocation concepts
+
+A relocation is an action which the linker must take when linking. It
+describes a change to the contents of a section. The change is normally
+based on the final value of one or more symbols. Relocations are
+created by the assembler when it creates an object file.
+
+Most relocations are simple. A typical simple relocation is to set 32
+bits at a given offset in a section to the value of a symbol. This type
+of relocation would be generated for code like @code{int *p = &i;} where
+@samp{p} and @samp{i} are global variables. A relocation for the symbol
+@samp{i} would be generated such that the linker would initialize the
+area of memory which holds the value of @samp{p} to the value of the
+symbol @samp{i}.
+
+Slightly more complex relocations may include an addend, which is a
+constant to add to the symbol value before using it. In some cases a
+relocation will require adding the symbol value to the existing contents
+of the section in the object file. In others the relocation will simply
+replace the contents of the section with the symbol value. Some
+relocations are PC relative, so that the value to be stored in the
+section is the difference between the value of a symbol and the final
+address of the section contents.
+
+In general, relocations can be arbitrarily complex. For example,
+relocations used in dynamic linking systems often require the linker to
+allocate space in a different section and use the offset within that
+section as the value to store. In the IEEE object file format,
+relocations may involve arbitrary expressions.
+
+When doing a relocateable link, the linker may or may not have to do
+anything with a relocation, depending upon the definition of the
+relocation. Simple relocations generally do not require any special
+action.
+
+@node BFD relocation functions
+@subsection BFD relocation functions
+
+In BFD, each section has an array of @samp{arelent} structures. Each
+structure has a pointer to a symbol, an address within the section, an
+addend, and a pointer to a @samp{reloc_howto_struct} structure. The
+howto structure has a bunch of fields describing the reloc, including a
+type field. The type field is specific to the object file format
+backend; none of the generic code in BFD examines it.
+
+Originally, the function @samp{bfd_perform_relocation} was supposed to
+handle all relocations. In theory, many relocations would be simple
+enough to be described by the fields in the howto structure. For those
+that weren't, the howto structure included a @samp{special_function}
+field to use as an escape.
+
+While this seems plausible, a look at @samp{bfd_perform_relocation}
+shows that it failed. The function has odd special cases. Some of the
+fields in the howto structure, such as @samp{pcrel_offset}, were not
+adequately documented.
+
+The linker uses @samp{bfd_perform_relocation} to do all relocations when
+the input and output file have different formats (e.g., when generating
+S-records). The generic linker code, which is used by all targets which
+do not define their own special purpose linker, uses
+@samp{bfd_get_relocated_section_contents}, which for most targets turns
+into a call to @samp{bfd_generic_get_relocated_section_contents}, which
+calls @samp{bfd_perform_relocation}. So @samp{bfd_perform_relocation}
+is still widely used, which makes it difficult to change, since it is
+difficult to test all possible cases.
+
+The assembler used @samp{bfd_perform_relocation} for a while. This
+turned out to be the wrong thing to do, since
+@samp{bfd_perform_relocation} was written to handle relocations on an
+existing object file, while the assembler needed to create relocations
+in a new object file. The assembler was changed to use the new function
+@samp{bfd_install_relocation} instead, and @samp{bfd_install_relocation}
+was created as a copy of @samp{bfd_perform_relocation}.
+
+Unfortunately, the work did not progress any farther, so
+@samp{bfd_install_relocation} remains a simple copy of
+@samp{bfd_perform_relocation}, with all the odd special cases and
+confusing code. This again is difficult to change, because again any
+change can affect any assembler target, and so is difficult to test.
+
+The new linker, when using the same object file format for all input
+files and the output file, does not convert relocations into
+@samp{arelent} structures, so it can not use
+@samp{bfd_perform_relocation} at all. Instead, users of the new linker
+are expected to write a @samp{relocate_section} function which will
+handle relocations in a target specific fashion.
+
+There are two helper functions for target specific relocation:
+@samp{_bfd_final_link_relocate} and @samp{_bfd_relocate_contents}.
+These functions use a howto structure, but they @emph{do not} use the
+@samp{special_function} field. Since the functions are normally called
+from target specific code, the @samp{special_function} field adds
+little; any relocations which require special handling can be handled
+without calling those functions.
+
+So, if you want to add a new target, or add a new relocation to an
+existing target, you need to do the following:
+
+@itemize @bullet
+@item
+Make sure you clearly understand what the contents of the section should
+look like after assembly, after a relocateable link, and after a final
+link. Make sure you clearly understand the operations the linker must
+perform during a relocateable link and during a final link.
+
+@item
+Write a howto structure for the relocation. The howto structure is
+flexible enough to represent any relocation which should be handled by
+setting a contiguous bitfield in the destination to the value of a
+symbol, possibly with an addend, possibly adding the symbol value to the
+value already present in the destination.
+
+@item
+Change the assembler to generate your relocation. The assembler will
+call @samp{bfd_install_relocation}, so your howto structure has to be
+able to handle that. You may need to set the @samp{special_function}
+field to handle assembly correctly. Be careful to ensure that any code
+you write to handle the assembler will also work correctly when doing a
+relocateable link. For example, see @samp{bfd_elf_generic_reloc}.
+
+@item
+Test the assembler. Consider the cases of relocation against an
+undefined symbol, a common symbol, a symbol defined in the object file
+in the same section, and a symbol defined in the object file in a
+different section. These cases may not all be applicable for your
+reloc.
+
+@item
+If your target uses the new linker, which is recommended, add any
+required handling to the target specific relocation function. In simple
+cases this will just involve a call to @samp{_bfd_final_link_relocate}
+or @samp{_bfd_relocate_contents}, depending upon the definition of the
+relocation and whether the link is relocateable or not.
+
+@item
+Test the linker. Test the case of a final link. If the relocation can
+overflow, use a linker script to force an overflow and make sure the
+error is reported correctly. Test a relocateable link, whether the
+symbol is defined or undefined in the relocateable output. For both the
+final and relocateable link, test the case when the symbol is a common
+symbol, when the symbol looked like a common symbol but became a defined
+symbol, when the symbol is defined in a different object file, and when
+the symbol is defined in the same object file.
+
+@item
+In order for linking to another object file format, such as S-records,
+to work correctly, @samp{bfd_perform_relocation} has to do the right
+thing for the relocation. You may need to set the
+@samp{special_function} field to handle this correctly. Test this by
+doing a link in which the output object file format is S-records.
+
+@item
+Using the linker to generate relocateable output in a different object
+file format is impossible in the general case, so you generally don't
+have to worry about that. Linking input files of different object file
+formats together is quite unusual, but if you're really dedicated you
+may want to consider testing this case, both when the output object file
+format is the same as your format, and when it is different.
+@end itemize
+
+@node BFD relocation codes
+@subsection BFD relocation codes
+
+BFD has another way of describing relocations besides the howto
+structures described above: the enum @samp{bfd_reloc_code_real_type}.
+
+Every known relocation type can be described as a value in this
+enumeration. The enumeration contains many target specific relocations,
+but where two or more targets have the same relocation, a single code is
+used. For example, the single value @samp{BFD_RELOC_32} is used for all
+simple 32 bit relocation types.
+
+The main purpose of this relocation code is to give the assembler some
+mechanism to create @samp{arelent} structures. In order for the
+assembler to create an @samp{arelent} structure, it has to be able to
+obtain a howto structure. The function @samp{bfd_reloc_type_lookup},
+which simply calls the target vector entry point
+@samp{reloc_type_lookup}, takes a relocation code and returns a howto
+structure.
+
+The function @samp{bfd_get_reloc_code_name} returns the name of a
+relocation code. This is mainly used in error messages.
+
+Using both howto structures and relocation codes can be somewhat
+confusing. There are many processor specific relocation codes.
+However, the relocation is only fully defined by the howto structure.
+The same relocation code will map to different howto structures in
+different object file formats. For example, the addend handling may be
+different.
+
+Most of the relocation codes are not really general. The assembler can
+not use them without already understanding what sorts of relocations can
+be used for a particular target. It might be possible to replace the
+relocation codes with something simpler.
+
+@node BFD relocation future
+@subsection BFD relocation future
+
+Clearly the current BFD relocation support is in bad shape. A
+wholescale rewrite would be very difficult, because it would require
+thorough testing of every BFD target. So some sort of incremental
+change is required.
+
+My vague thoughts on this would involve defining a new, clearly defined,
+howto structure. Some mechanism would be used to determine which type
+of howto structure was being used by a particular format.
+
+The new howto structure would clearly define the relocation behaviour in
+the case of an assembly, a relocateable link, and a final link. At
+least one special function would be defined as an escape, and it might
+make sense to define more.
+
+One or more generic functions similar to @samp{bfd_perform_relocation}
+would be written to handle the new howto structure.
+
+This should make it possible to write a generic version of the relocate
+section functions used by the new linker. The target specific code
+would provide some mechanism (a function pointer or an initial
+conversion) to convert target specific relocations into howto
+structures.
+
+Ideally it would be possible to use this generic relocate section
+function for the generic linker as well. That is, it would replace the
+@samp{bfd_generic_get_relocated_section_contents} function which is
+currently normally used.
+
+For the special case of ELF dynamic linking, more consideration needs to
+be given to writing ELF specific but ELF target generic code to handle
+special relocation types such as GOT and PLT.
+
+@node BFD ELF support
+@section BFD ELF support
+@cindex elf support in bfd
+@cindex bfd elf support
+
+The ELF object file format is defined in two parts: a generic ABI and a
+processor specific supplement. The ELF support in BFD is split in a
+similar fashion. The processor specific support is largely kept within
+a single file. The generic support is provided by several other files.
+The processor specific support provides a set of function pointers and
+constants used by the generic support.
+
+@menu
+* BFD ELF sections and segments:: ELF sections and segments
+* BFD ELF generic support:: BFD ELF generic support
+* BFD ELF processor specific support:: BFD ELF processor specific support
+* BFD ELF core files:: BFD ELF core files
+* BFD ELF future:: BFD ELF future
+@end menu
+
+@node BFD ELF sections and segments
+@subsection ELF sections and segments
+
+The ELF ABI permits a file to have either sections or segments or both.
+Relocateable object files conventionally have only sections.
+Executables conventionally have both. Core files conventionally have
+only program segments.
+
+ELF sections are similar to sections in other object file formats: they
+have a name, a VMA, file contents, flags, and other miscellaneous
+information. ELF relocations are stored in sections of a particular
+type; BFD automatically converts these sections into internal relocation
+information.
+
+ELF program segments are intended for fast interpretation by a system
+loader. They have a type, a VMA, an LMA, file contents, and a couple of
+other fields. When an ELF executable is run on a Unix system, the
+system loader will examine the program segments to decide how to load
+it. The loader will ignore the section information. Loadable program
+segments (type @samp{PT_LOAD}) are directly loaded into memory. Other
+program segments are interpreted by the loader, and generally provide
+dynamic linking information.
+
+When an ELF file has both program segments and sections, an ELF program
+segment may encompass one or more ELF sections, in the sense that the
+portion of the file which corresponds to the program segment may include
+the portions of the file corresponding to one or more sections. When
+there is more than one section in a loadable program segment, the
+relative positions of the section contents in the file must correspond
+to the relative positions they should hold when the program segment is
+loaded. This requirement should be obvious if you consider that the
+system loader will load an entire program segment at a time.
+
+On a system which supports dynamic paging, such as any native Unix
+system, the contents of a loadable program segment must be at the same
+offset in the file as in memory, modulo the memory page size used on the
+system. This is because the system loader will map the file into memory
+starting at the start of a page. The system loader can easily remap
+entire pages to the correct load address. However, if the contents of
+the file were not correctly aligned within the page, the system loader
+would have to shift the contents around within the page, which is too
+expensive. For example, if the LMA of a loadable program segment is
+@samp{0x40080} and the page size is @samp{0x1000}, then the position of
+the segment contents within the file must equal @samp{0x80} modulo
+@samp{0x1000}.
+
+BFD has only a single set of sections. It does not provide any generic
+way to examine both sections and segments. When BFD is used to open an
+object file or executable, the BFD sections will represent ELF sections.
+When BFD is used to open a core file, the BFD sections will represent
+ELF program segments.
+
+When BFD is used to examine an object file or executable, any program
+segments will be read to set the LMA of the sections. This is because
+ELF sections only have a VMA, while ELF program segments have both a VMA
+and an LMA. Any program segments will be copied by the
+@samp{copy_private} entry points. They will be printed by the
+@samp{print_private} entry point. Otherwise, the program segments are
+ignored. In particular, programs which use BFD currently have no direct
+access to the program segments.
+
+When BFD is used to create an executable, the program segments will be
+created automatically based on the section information. This is done in
+the function @samp{assign_file_positions_for_segments} in @file{elf.c}.
+This function has been tweaked many times, and probably still has
+problems that arise in particular cases.
+
+There is a hook which may be used to explicitly define the program
+segments when creating an executable: the @samp{bfd_record_phdr}
+function in @file{bfd.c}. If this function is called, BFD will not
+create program segments itself, but will only create the program
+segments specified by the caller. The linker uses this function to
+implement the @samp{PHDRS} linker script command.
+
+@node BFD ELF generic support
+@subsection BFD ELF generic support
+
+In general, functions which do not read external data from the ELF file
+are found in @file{elf.c}. They operate on the internal forms of the
+ELF structures, which are defined in @file{include/elf/internal.h}. The
+internal structures are defined in terms of @samp{bfd_vma}, and so may
+be used for both 32 bit and 64 bit ELF targets.
+
+The file @file{elfcode.h} contains functions which operate on the
+external data. @file{elfcode.h} is compiled twice, once via
+@file{elf32.c} with @samp{ARCH_SIZE} defined as @samp{32}, and once via
+@file{elf64.c} with @samp{ARCH_SIZE} defined as @samp{64}.
+@file{elfcode.h} includes functions to swap the ELF structures in and
+out of external form, as well as a few more complex functions.
+
+Linker support is found in @file{elflink.c} and @file{elflink.h}. The
+latter file is compiled twice, for both 32 and 64 bit support. The
+linker support is only used if the processor specific file defines
+@samp{elf_backend_relocate_section}, which is required to relocate the
+section contents. If that macro is not defined, the generic linker code
+is used, and relocations are handled via @samp{bfd_perform_relocation}.
+
+The core file support is in @file{elfcore.h}, which is compiled twice,
+for both 32 and 64 bit support. The more interesting cases of core file
+support only work on a native system which has the @file{sys/procfs.h}
+header file. Without that file, the core file support does little more
+than read the ELF program segments as BFD sections.
+
+The BFD internal header file @file{elf-bfd.h} is used for communication
+among these files and the processor specific files.
+
+The default entries for the BFD ELF target vector are found mainly in
+@file{elf.c}. Some functions are found in @file{elfcode.h}.
+
+The processor specific files may override particular entries in the
+target vector, but most do not, with one exception: the
+@samp{bfd_reloc_type_lookup} entry point is always processor specific.
+
+@node BFD ELF processor specific support
+@subsection BFD ELF processor specific support
+
+By convention, the processor specific support for a particular processor
+will be found in @file{elf@var{nn}-@var{cpu}.c}, where @var{nn} is
+either 32 or 64, and @var{cpu} is the name of the processor.
+
+@menu
+* BFD ELF processor required:: Required processor specific support
+* BFD ELF processor linker:: Processor specific linker support
+* BFD ELF processor other:: Other processor specific support options
+@end menu
+
+@node BFD ELF processor required
+@subsubsection Required processor specific support
+
+When writing a @file{elf@var{nn}-@var{cpu}.c} file, you must do the
+following:
+
+@itemize @bullet
+@item
+Define either @samp{TARGET_BIG_SYM} or @samp{TARGET_LITTLE_SYM}, or
+both, to a unique C name to use for the target vector. This name should
+appear in the list of target vectors in @file{targets.c}, and will also
+have to appear in @file{config.bfd} and @file{configure.in}. Define
+@samp{TARGET_BIG_SYM} for a big-endian processor,
+@samp{TARGET_LITTLE_SYM} for a little-endian processor, and define both
+for a bi-endian processor.
+@item
+Define either @samp{TARGET_BIG_NAME} or @samp{TARGET_LITTLE_NAME}, or
+both, to a string used as the name of the target vector. This is the
+name which a user of the BFD tool would use to specify the object file
+format. It would normally appear in a linker emulation parameters
+file.
+@item
+Define @samp{ELF_ARCH} to the BFD architecture (an element of the
+@samp{bfd_architecture} enum, typically @samp{bfd_arch_@var{cpu}}).
+@item
+Define @samp{ELF_MACHINE_CODE} to the magic number which should appear
+in the @samp{e_machine} field of the ELF header. As of this writing,
+these magic numbers are assigned by SCO; if you want to get a magic
+number for a particular processor, try sending a note to
+@email{registry@@sco.com}. In the BFD sources, the magic numbers are
+found in @file{include/elf/common.h}; they have names beginning with
+@samp{EM_}.
+@item
+Define @samp{ELF_MAXPAGESIZE} to the maximum size of a virtual page in
+memory. This can normally be found at the start of chapter 5 in the
+processor specific supplement. For a processor which will only be used
+in an embedded system, or which has no memory management hardware, this
+can simply be @samp{1}.
+@item
+If the format should use @samp{Rel} rather than @samp{Rela} relocations,
+define @samp{USE_REL}. This is normally defined in chapter 4 of the
+processor specific supplement.
+
+In the absence of a supplement, it's easier to work with @samp{Rela}
+relocations. @samp{Rela} relocations will require more space in object
+files (but not in executables, except when using dynamic linking).
+However, this is outweighed by the simplicity of addend handling when
+using @samp{Rela} relocations. With @samp{Rel} relocations, the addend
+must be stored in the section contents, which makes relocateable links
+more complex.
+
+For example, consider C code like @code{i = a[1000];} where @samp{a} is
+a global array. The instructions which load the value of @samp{a[1000]}
+will most likely use a relocation which refers to the symbol
+representing @samp{a}, with an addend that gives the offset from the
+start of @samp{a} to element @samp{1000}. When using @samp{Rel}
+relocations, that addend must be stored in the instructions themselves.
+If you are adding support for a RISC chip which uses two or more
+instructions to load an address, then the addend may not fit in a single
+instruction, and will have to be somehow split among the instructions.
+This makes linking awkward, particularly when doing a relocateable link
+in which the addend may have to be updated. It can be done---the MIPS
+ELF support does it---but it should be avoided when possible.
+
+It is possible, though somewhat awkward, to support both @samp{Rel} and
+@samp{Rela} relocations for a single target; @file{elf64-mips.c} does it
+by overriding the relocation reading and writing routines.
+@item
+Define howto structures for all the relocation types.
+@item
+Define a @samp{bfd_reloc_type_lookup} routine. This must be named
+@samp{bfd_elf@var{nn}_bfd_reloc_type_lookup}, and may be either a
+function or a macro. It must translate a BFD relocation code into a
+howto structure. This is normally a table lookup or a simple switch.
+@item
+If using @samp{Rel} relocations, define @samp{elf_info_to_howto_rel}.
+If using @samp{Rela} relocations, define @samp{elf_info_to_howto}.
+Either way, this is a macro defined as the name of a function which
+takes an @samp{arelent} and a @samp{Rel} or @samp{Rela} structure, and
+sets the @samp{howto} field of the @samp{arelent} based on the
+@samp{Rel} or @samp{Rela} structure. This is normally uses
+@samp{ELF@var{nn}_R_TYPE} to get the ELF relocation type and uses it as
+an index into a table of howto structures.
+@end itemize
+
+You must also add the magic number for this processor to the
+@samp{prep_headers} function in @file{elf.c}.
+
+You must also create a header file in the @file{include/elf} directory
+called @file{@var{cpu}.h}. This file should define any target specific
+information which may be needed outside of the BFD code. In particular
+it should use the @samp{START_RELOC_NUMBERS}, @samp{RELOC_NUMBER},
+@samp{FAKE_RELOC}, @samp{EMPTY_RELOC} and @samp{END_RELOC_NUMBERS}
+macros to create a table mapping the number used to indentify a
+relocation to a name describing that relocation.
+
+@node BFD ELF processor linker
+@subsubsection Processor specific linker support
+
+The linker will be much more efficient if you define a relocate section
+function. This will permit BFD to use the ELF specific linker support.
+
+If you do not define a relocate section function, BFD must use the
+generic linker support, which requires converting all symbols and
+relocations into BFD @samp{asymbol} and @samp{arelent} structures. In
+this case, relocations will be handled by calling
+@samp{bfd_perform_relocation}, which will use the howto structures you
+have defined. @xref{BFD relocation handling}.
+
+In order to support linking into a different object file format, such as
+S-records, @samp{bfd_perform_relocation} must work correctly with your
+howto structures, so you can't skip that step. However, if you define
+the relocate section function, then in the normal case of linking into
+an ELF file the linker will not need to convert symbols and relocations,
+and will be much more efficient.
+
+To use a relocation section function, define the macro
+@samp{elf_backend_relocate_section} as the name of a function which will
+take the contents of a section, as well as relocation, symbol, and other
+information, and modify the section contents according to the relocation
+information. In simple cases, this is little more than a loop over the
+relocations which computes the value of each relocation and calls
+@samp{_bfd_final_link_relocate}. The function must check for a
+relocateable link, and in that case normally needs to do nothing other
+than adjust the addend for relocations against a section symbol.
+
+The complex cases generally have to do with dynamic linker support. GOT
+and PLT relocations must be handled specially, and the linker normally
+arranges to set up the GOT and PLT sections while handling relocations.
+When generating a shared library, random relocations must normally be
+copied into the shared library, or converted to RELATIVE relocations
+when possible.
+
+@node BFD ELF processor other
+@subsubsection Other processor specific support options
+
+There are many other macros which may be defined in
+@file{elf@var{nn}-@var{cpu}.c}. These macros may be found in
+@file{elfxx-target.h}.
+
+Macros may be used to override some of the generic ELF target vector
+functions.
+
+Several processor specific hook functions which may be defined as
+macros. These functions are found as function pointers in the
+@samp{elf_backend_data} structure defined in @file{elf-bfd.h}. In
+general, a hook function is set by defining a macro
+@samp{elf_backend_@var{name}}.
+
+There are a few processor specific constants which may also be defined.
+These are again found in the @samp{elf_backend_data} structure.
+
+I will not define the various functions and constants here; see the
+comments in @file{elf-bfd.h}.
+
+Normally any odd characteristic of a particular ELF processor is handled
+via a hook function. For example, the special @samp{SHN_MIPS_SCOMMON}
+section number found in MIPS ELF is handled via the hooks
+@samp{section_from_bfd_section}, @samp{symbol_processing},
+@samp{add_symbol_hook}, and @samp{output_symbol_hook}.
+
+Dynamic linking support, which involves processor specific relocations
+requiring special handling, is also implemented via hook functions.
+
+@node BFD ELF core files
+@subsection BFD ELF core files
+@cindex elf core files
+
+On native ELF Unix systems, core files are generated without any
+sections. Instead, they only have program segments.
+
+When BFD is used to read an ELF core file, the BFD sections will
+actually represent program segments. Since ELF program segments do not
+have names, BFD will invent names like @samp{segment@var{n}} where
+@var{n} is a number.
+
+A single ELF program segment may include both an initialized part and an
+uninitialized part. The size of the initialized part is given by the
+@samp{p_filesz} field. The total size of the segment is given by the
+@samp{p_memsz} field. If @samp{p_memsz} is larger than @samp{p_filesz},
+then the extra space is uninitialized, or, more precisely, initialized
+to zero.
+
+BFD will represent such a program segment as two different sections.
+The first, named @samp{segment@var{n}a}, will represent the initialized
+part of the program segment. The second, named @samp{segment@var{n}b},
+will represent the uninitialized part.
+
+ELF core files store special information such as register values in
+program segments with the type @samp{PT_NOTE}. BFD will attempt to
+interpret the information in these segments, and will create additional
+sections holding the information. Some of this interpretation requires
+information found in the host header file @file{sys/procfs.h}, and so
+will only work when BFD is built on a native system.
+
+BFD does not currently provide any way to create an ELF core file. In
+general, BFD does not provide a way to create core files. The way to
+implement this would be to write @samp{bfd_set_format} and
+@samp{bfd_write_contents} routines for the @samp{bfd_core} type; see
+@ref{BFD target vector format}.
+
+@node BFD ELF future
+@subsection BFD ELF future
+
+The current dynamic linking support has too much code duplication.
+While each processor has particular differences, much of the dynamic
+linking support is quite similar for each processor. The GOT and PLT
+are handled in fairly similar ways, the details of -Bsymbolic linking
+are generally similar, etc. This code should be reworked to use more
+generic functions, eliminating the duplication.
+
+Similarly, the relocation handling has too much duplication. Many of
+the @samp{reloc_type_lookup} and @samp{info_to_howto} functions are
+quite similar. The relocate section functions are also often quite
+similar, both in the standard linker handling and the dynamic linker
+handling. Many of the COFF processor specific backends share a single
+relocate section function (@samp{_bfd_coff_generic_relocate_section}),
+and it should be possible to do something like this for the ELF targets
+as well.
+
+The appearance of the processor specific magic number in
+@samp{prep_headers} in @file{elf.c} is somewhat bogus. It should be
+possible to add support for a new processor without changing the generic
+support.
+
+The processor function hooks and constants are ad hoc and need better
+documentation.
+
+When a linker script uses @samp{SIZEOF_HEADERS}, the ELF backend must
+guess at the number of program segments which will be required, in
+@samp{get_program_header_size}. This is because the linker calls
+@samp{bfd_sizeof_headers} before it knows all the section addresses and
+sizes. The ELF backend may later discover, when creating program
+segments, that more program segments are required. This is currently
+reported as an error in @samp{assign_file_positions_for_segments}.
+
+In practice this makes it difficult to use @samp{SIZEOF_HEADERS} except
+with a carefully defined linker script. Unfortunately,
+@samp{SIZEOF_HEADERS} is required for fast program loading on a native
+system, since it permits the initial code section to appear on the same
+page as the program segments, saving a page read when the program starts
+running. Fortunately, native systems permit careful definition of the
+linker script. Still, ideally it would be possible to use relaxation to
+compute the number of program segments.
+
+@node BFD glossary
+@section BFD glossary
+@cindex glossary for bfd
+@cindex bfd glossary
+
+This is a short glossary of some BFD terms.
+
+@table @asis
+@item a.out
+The a.out object file format. The original Unix object file format.
+Still used on SunOS, though not Solaris. Supports only three sections.
+
+@item archive
+A collection of object files produced and manipulated by the @samp{ar}
+program.
+
+@item backend
+The implementation within BFD of a particular object file format. The
+set of functions which appear in a particular target vector.
+
+@item BFD
+The BFD library itself. Also, each object file, archive, or exectable
+opened by the BFD library has the type @samp{bfd *}, and is sometimes
+referred to as a bfd.
+
+@item COFF
+The Common Object File Format. Used on Unix SVR3. Used by some
+embedded targets, although ELF is normally better.
+
+@item DLL
+A shared library on Windows.
+
+@item dynamic linker
+When a program linked against a shared library is run, the dynamic
+linker will locate the appropriate shared library and arrange to somehow
+include it in the running image.
+
+@item dynamic object
+Another name for an ELF shared library.
+
+@item ECOFF
+The Extended Common Object File Format. Used on Alpha Digital Unix
+(formerly OSF/1), as well as Ultrix and Irix 4. A variant of COFF.
+
+@item ELF
+The Executable and Linking Format. The object file format used on most
+modern Unix systems, including GNU/Linux, Solaris, Irix, and SVR4. Also
+used on many embedded systems.
+
+@item executable
+A program, with instructions and symbols, and perhaps dynamic linking
+information. Normally produced by a linker.
+
+@item LMA
+Load Memory Address. This is the address at which a section will be
+loaded. Compare with VMA, below.
+
+@item NLM
+NetWare Loadable Module. Used to describe the format of an object which
+be loaded into NetWare, which is some kind of PC based network server
+program.
+
+@item object file
+A binary file including machine instructions, symbols, and relocation
+information. Normally produced by an assembler.
+
+@item object file format
+The format of an object file. Typically object files and executables
+for a particular system are in the same format, although executables
+will not contain any relocation information.
+
+@item PE
+The Portable Executable format. This is the object file format used for
+Windows (specifically, Win32) object files. It is based closely on
+COFF, but has a few significant differences.
+
+@item PEI
+The Portable Executable Image format. This is the object file format
+used for Windows (specifically, Win32) executables. It is very similar
+to PE, but includes some additional header information.
+
+@item relocations
+Information used by the linker to adjust section contents. Also called
+relocs.
+
+@item section
+Object files and executable are composed of sections. Sections have
+optional data and optional relocation information.
+
+@item shared library
+A library of functions which may be used by many executables without
+actually being linked into each executable. There are several different
+implementations of shared libraries, each having slightly different
+features.
+
+@item symbol
+Each object file and executable may have a list of symbols, often
+referred to as the symbol table. A symbol is basically a name and an
+address. There may also be some additional information like the type of
+symbol, although the type of a symbol is normally something simple like
+function or object, and should be confused with the more complex C
+notion of type. Typically every global function and variable in a C
+program will have an associated symbol.
+
+@item target vector
+A set of functions which implement support for a particular object file
+format. The @samp{bfd_target} structure.
+
+@item Win32
+The current Windows API, implemented by Windows 95 and later and Windows
+NT 3.51 and later, but not by Windows 3.1.
+
+@item XCOFF
+The eXtended Common Object File Format. Used on AIX. A variant of
+COFF, with a completely different symbol table implementation.
+
+@item VMA
+Virtual Memory Address. This is the address a section will have when
+an executable is run. Compare with LMA, above.
+@end table
+
+@node Index
+@unnumberedsec Index
+@printindex cp
+
+@contents
+@bye
diff --git a/contrib/binutils/bfd/dwarf1.c b/contrib/binutils/bfd/dwarf1.c
new file mode 100644
index 0000000..da184cc
--- /dev/null
+++ b/contrib/binutils/bfd/dwarf1.c
@@ -0,0 +1,578 @@
+/* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
+ Copyright 1998, 1999 Free Software Foundation, Inc.
+
+Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
+
+This file is part of BFD.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libiberty.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/dwarf.h"
+
+/* dwarf1_debug is the starting point for all dwarf1 info. */
+
+struct dwarf1_debug {
+
+ /* The bfd we are working with. */
+ bfd* abfd;
+
+ /* 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. */
+ char* debug_section;
+
+ /* Pointer to the end of the .debug_info section memory buffer. */
+ char* debug_section_end;
+
+ /* The buffer for the .line section. */
+ char* line_section;
+
+ /* End of that buffer. */
+ char* line_section_end;
+
+ /* The current or next unread die within the .debug section. */
+ char* currentDie;
+};
+
+/* One dwarf1_unit for each parsed compilation unit die. */
+
+struct dwarf1_unit {
+ /* Linked starting from stash->lastUnit. */
+ struct dwarf1_unit* prev;
+
+ /* Name of the compilation unit. */
+ char* name;
+
+ /* 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. */
+ unsigned long stmt_list_offset;
+
+ /* 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). */
+ struct linenumber* linenumber_table;
+
+ /* 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. */
+ struct dwarf1_func* prev;
+
+ /* Name of function. */
+ char* name;
+
+ /* 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. */
+struct die_info {
+ unsigned long length;
+ unsigned long sibling;
+ unsigned long low_pc;
+ unsigned long high_pc;
+ unsigned long stmt_list_offset;
+
+ char* name;
+
+ int has_stmt_list;
+
+ unsigned short tag;
+};
+
+
+/* Parsed line number information. */
+struct linenumber {
+ /* First address in the line. */
+ unsigned long addr;
+
+ /* The line number. */
+ unsigned long linenumber;
+};
+
+
+/* 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'. */
+
+static struct dwarf1_unit*
+alloc_dwarf1_unit (stash)
+ struct dwarf1_debug* stash;
+{
+ struct dwarf1_unit* x =
+ (struct dwarf1_unit*) bfd_zalloc (stash->abfd,
+ sizeof (struct dwarf1_unit));
+ x->prev = stash->lastUnit;
+ stash->lastUnit = x;
+
+ return x;
+}
+
+/* Return a newly allocated dwarf1_func. It must be cleared and
+ 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,
+ 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.
+
+ Return false if the die is invalidly formatted; true otherwise. */
+
+static boolean
+parse_die (abfd, aDieInfo, aDiePtr)
+ bfd* abfd;
+ struct die_info* aDieInfo;
+ char* aDiePtr;
+{
+ char* this_die = aDiePtr;
+ char* xptr = this_die;
+
+ memset (aDieInfo,0,sizeof(*aDieInfo));
+
+ /* First comes the length. */
+ aDieInfo->length = bfd_get_32 (abfd, xptr);
+ xptr += 4;
+ if (aDieInfo->length == 0)
+ return false;
+ if (aDieInfo->length < 6)
+ {
+ /* Just padding bytes. */
+ aDieInfo->tag = TAG_padding;
+ return true;
+ }
+
+ /* Then the tag. */
+ aDieInfo->tag = bfd_get_16 (abfd, xptr);
+ xptr += 2;
+
+ /* Then the attributes. */
+ while (xptr < (this_die + aDieInfo->length))
+ {
+ unsigned short attr;
+
+ /* 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. */
+
+ attr = bfd_get_16 (abfd, xptr);
+ xptr += 2;
+
+ switch (FORM_FROM_ATTR (attr))
+ {
+ case FORM_DATA2:
+ xptr += 2;
+ break;
+ case FORM_DATA4:
+ case FORM_REF:
+ if (attr == AT_sibling)
+ aDieInfo->sibling = bfd_get_32 (abfd, xptr);
+ else if (attr == AT_stmt_list)
+ {
+ aDieInfo->stmt_list_offset = bfd_get_32 (abfd, xptr);
+ aDieInfo->has_stmt_list = 1;
+ }
+ xptr += 4;
+ break;
+ case FORM_DATA8:
+ xptr += 8;
+ break;
+ case FORM_ADDR:
+ if (attr == AT_low_pc)
+ aDieInfo->low_pc = bfd_get_32 (abfd, xptr);
+ else if (attr == AT_high_pc)
+ aDieInfo->high_pc = bfd_get_32 (abfd, xptr);
+ xptr += 4;
+ break;
+ case FORM_BLOCK2:
+ xptr += 2 + bfd_get_16 (abfd, xptr);
+ break;
+ case FORM_BLOCK4:
+ xptr += 4 + bfd_get_32 (abfd, xptr);
+ break;
+ case FORM_STRING:
+ if (attr == AT_name)
+ aDieInfo->name = xptr;
+ xptr += strlen (xptr) + 1;
+ break;
+ }
+ }
+
+ return true;
+}
+
+/* Parse a dwarf1 line number table for 'aUnit->stmt_list_offset'
+ into 'aUnit->linenumber_table'. Return false if an error
+ occurs; true otherwise. */
+
+static boolean
+parse_line_table (stash, aUnit)
+ struct dwarf1_debug* stash;
+ struct dwarf1_unit* aUnit;
+{
+ char* xptr;
+
+ /* 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);
+
+ if (! stash->line_section)
+ return false;
+
+ if (! bfd_get_section_contents (stash->abfd, msec, stash->line_section, 0, size))
+ {
+ stash->line_section = 0;
+ return false;
+ }
+
+ stash->line_section_end = stash->line_section + size;
+ }
+
+ xptr = stash->line_section + aUnit->stmt_list_offset;
+ if (xptr < stash->line_section_end)
+ {
+ unsigned long eachLine;
+
+ char* tblend;
+ unsigned long base;
+
+ /* First comes the length. */
+ tblend = bfd_get_32 (stash->abfd, xptr) + xptr;
+ xptr += 4;
+
+ /* Then the base address for each address in the table. */
+ base = bfd_get_32 (stash->abfd, 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,
+ sizeof (struct linenumber) * aUnit->line_count);
+
+ for (eachLine = 0; eachLine < aUnit->line_count; eachLine++)
+ {
+ /* A line number. */
+ aUnit->linenumber_table[eachLine].linenumber
+ = bfd_get_32 (stash->abfd, xptr);
+ xptr += 4;
+
+ /* Skip the position within the line. */
+ xptr += 2;
+
+ /* And finally the address. */
+ aUnit->linenumber_table[eachLine].addr
+ = base + bfd_get_32 (stash->abfd, xptr);
+ xptr += 4;
+ }
+ }
+
+ return true;
+}
+
+/* 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. */
+
+static boolean
+parse_functions_in_unit (stash, aUnit)
+ struct dwarf1_debug* stash;
+ struct dwarf1_unit* aUnit;
+{
+ char* eachDie;
+
+ if (aUnit->first_child)
+ for (eachDie = aUnit->first_child;
+ eachDie < stash->debug_section_end;
+ )
+ {
+ 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. */
+
+static boolean
+dwarf1_unit_find_nearest_line (stash, aUnit, addr,
+ filename_ptr, functionname_ptr,
+ linenumber_ptr)
+ struct dwarf1_debug* stash;
+ struct dwarf1_unit* aUnit;
+ unsigned long addr;
+ const char **filename_ptr;
+ const char **functionname_ptr;
+ unsigned int *linenumber_ptr;
+{
+ int line_p = false;
+ int func_p = false;
+
+ if (aUnit->low_pc <= addr && addr < aUnit->high_pc)
+ {
+ if (aUnit->has_stmt_list)
+ {
+ unsigned long i;
+ struct dwarf1_func* eachFunc;
+
+ if (! aUnit->linenumber_table)
+ {
+ if (! parse_line_table (stash, aUnit))
+ return false;
+ }
+
+ if (! aUnit->func_list)
+ {
+ if (! parse_functions_in_unit (stash, aUnit))
+ return false;
+ }
+
+ for (i = 0; i < aUnit->line_count; i++)
+ {
+ if (aUnit->linenumber_table[i].addr <= addr
+ && addr < aUnit->linenumber_table[i+1].addr)
+ {
+ *filename_ptr = aUnit->name;
+ *linenumber_ptr = aUnit->linenumber_table[i].linenumber;
+ line_p = true;
+ break;
+ }
+ }
+
+ for (eachFunc = aUnit->func_list;
+ eachFunc;
+ eachFunc = eachFunc->prev)
+ {
+ if (eachFunc->low_pc <= addr
+ && addr < eachFunc->high_pc)
+ {
+ *functionname_ptr = eachFunc->name;
+ func_p = true;
+ break;
+ }
+ }
+ }
+ }
+
+ return line_p || func_p;
+}
+
+
+
+
+/* The DWARF 1 version of find_nearest line.
+ Return true if the line is found without error. */
+
+boolean
+_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr, linenumber_ptr)
+ bfd *abfd;
+ asection *section;
+ asymbol **symbols ATTRIBUTE_UNUSED;
+ bfd_vma offset;
+ const char **filename_ptr;
+ const char **functionname_ptr;
+ unsigned int *linenumber_ptr;
+{
+ struct dwarf1_debug *stash = elf_tdata (abfd)->dwarf1_find_line_info;
+
+ struct dwarf1_unit* eachUnit;
+
+ /* What address are we looking for? */
+ bfd_vma addr = offset + section->vma;
+
+ *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. */
+ return false;
+ }
+
+ size = bfd_get_section_size_before_reloc (msec);
+ stash->debug_section = (unsigned char*) bfd_alloc (abfd, size);
+
+ if (! stash->debug_section)
+ return false;
+
+ if (! bfd_get_section_contents (abfd, msec, stash->debug_section, 0, size))
+ {
+ stash->debug_section = 0;
+ return false;
+ }
+
+ stash->debug_section_end = stash->debug_section + size;
+ stash->currentDie = stash->debug_section;
+ stash->abfd = abfd;
+ }
+
+ /* A null debug_section indicates that there was no dwarf1 info
+ 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. */
+ 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,
+ linenumber_ptr);
+ }
+
+ while (stash->currentDie < stash->debug_section_end)
+ {
+ struct die_info aDieInfo;
+
+ 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
+ < stash->debug_section_end
+ && 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,
+ linenumber_ptr);
+ }
+
+ if (aDieInfo.sibling != 0)
+ stash->currentDie = stash->debug_section + aDieInfo.sibling;
+ else
+ stash->currentDie += aDieInfo.length;
+ }
+
+ return false;
+}
+
+
+/* EOF */
diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c
index ed2ba13..b6de261 100644
--- a/contrib/binutils/bfd/dwarf2.c
+++ b/contrib/binutils/bfd/dwarf2.c
@@ -1,5 +1,5 @@
/* DWARF 2 support.
- Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
(gavin@cygnus.com).
@@ -99,18 +99,78 @@ struct dwarf2_debug {
/* Length of the loaded .debug_abbrev section. */
unsigned long dwarf_abbrev_size;
+
+ /* Buffer for decode_line_info. */
+ char *dwarf_line_buffer;
+};
+
+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 {
+
+ /* Chain the previously read compilation units. */
+ struct comp_unit* next_unit;
+
+ /* 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. */
+ struct arange arange;
+
+ /* The DW_AT_name attribute (for error messages). */
+ char* name;
+
+ /* The abbrev hash table. */
+ struct abbrev_info** abbrevs;
+
+ /* Note that an error was found by comp_unit_find_nearest_line. */
+ int error;
+
+ /* The DW_AT_comp_dir attribute */
+ char* comp_dir;
+
+ /* 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. */
+ unsigned long line_offset;
+
+ /* Pointer to the first child die for the comp unit. */
+ char *first_child_die_ptr;
+
+ /* The end of the comp unit. */
+ char *end_ptr;
+
+ /* 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;
+
+ /* Address size for this unit - from unit header */
+ unsigned char addr_size;
};
-/* VERBATUM
- The following function up to the END VERBATUM mark are
+
+/* VERBATIM
+ The following function up to the END VERBATIM mark are
copied directly from dwarf2read.c. */
/* read dwarf information from a buffer */
static unsigned int
read_1_byte (abfd, buf)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
{
return bfd_get_8 (abfd, (bfd_byte *) buf);
@@ -118,7 +178,7 @@ read_1_byte (abfd, buf)
static int
read_1_signed_byte (abfd, buf)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
{
return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
@@ -178,9 +238,9 @@ read_8_bytes (abfd, buf)
static char *
read_n_bytes (abfd, buf, size)
- bfd * abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
- unsigned int size;
+ unsigned int size ATTRIBUTE_UNUSED;
{
/* If the size of a host char is 8 bits, we can return a pointer
to the buffer, otherwise we have to copy the data to a buffer
@@ -190,7 +250,7 @@ read_n_bytes (abfd, buf, size)
static char *
read_string (abfd, buf, bytes_read_ptr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
unsigned int *bytes_read_ptr;
{
@@ -208,86 +268,85 @@ read_string (abfd, buf, bytes_read_ptr)
static unsigned int
read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
unsigned int *bytes_read_ptr;
{
- unsigned int result, num_read;
- int i, shift;
+ unsigned int result;
+ unsigned int num_read;
+ int shift;
unsigned char byte;
- result = 0;
- shift = 0;
+ result = 0;
+ shift = 0;
num_read = 0;
- i = 0;
- while (1)
+
+ do
{
byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf++;
- num_read++;
- result |= ((byte & 127) << shift);
- if ((byte & 128) == 0)
- {
- break;
- }
+ buf ++;
+ num_read ++;
+ result |= ((byte & 0x7f) << shift);
shift += 7;
}
- *bytes_read_ptr = num_read;
+ while (byte & 0x80);
+
+ * bytes_read_ptr = num_read;
+
return result;
}
static int
read_signed_leb128 (abfd, buf, bytes_read_ptr)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
- unsigned int *bytes_read_ptr;
+ unsigned int * bytes_read_ptr;
{
- int result;
- int i, shift, size, num_read;
+ int result;
+ int shift;
+ int num_read;
unsigned char byte;
result = 0;
shift = 0;
- size = 32;
num_read = 0;
- i = 0;
- while (1)
+
+ do
{
byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf++;
- num_read++;
- result |= ((byte & 127) << shift);
+ buf ++;
+ num_read ++;
+ result |= ((byte & 0x7f) << shift);
shift += 7;
- if ((byte & 128) == 0)
- {
- break;
- }
- }
- if ((shift < size) && (byte & 0x40))
- {
- result |= -(1 << shift);
}
- *bytes_read_ptr = num_read;
+ while (byte & 0x80);
+
+ if ((shift < 32) && (byte & 0x40))
+ result |= -(1 << shift);
+
+ * bytes_read_ptr = num_read;
+
return result;
}
-/* END VERBATUM */
-
+/* END VERBATIM */
static bfd_vma
-read_address (abfd, buf)
- bfd *abfd;
+read_address (unit, buf)
+ struct comp_unit* unit;
char *buf;
{
- bfd_vma retval = 0;
-
- if (sizeof(retval) == 4)
+ switch (unit->addr_size)
{
- retval = bfd_get_32 (abfd, (bfd_byte *) buf);
- } else {
- retval = bfd_get_64 (abfd, (bfd_byte *) buf);
+ case 8:
+ return bfd_get_64 (unit->abfd, (bfd_byte *) buf);
+ case 4:
+ return bfd_get_32 (unit->abfd, (bfd_byte *) buf);
+ case 2:
+ return bfd_get_16 (unit->abfd, (bfd_byte *) buf);
+ default:
+ abort ();
}
- return retval;
}
@@ -367,13 +426,13 @@ read_abbrevs (abfd, offset)
msec = bfd_get_section_by_name (abfd, ".debug_abbrev");
if (! msec)
{
- (*_bfd_error_handler) ("Dwarf Error: Can't find .debug_abbrev section.");
+ (*_bfd_error_handler) (_("Dwarf Error: Can't find .debug_abbrev section."));
bfd_set_error (bfd_error_bad_value);
return 0;
}
- stash->dwarf_abbrev_size = bfd_get_section_size_before_reloc (msec);
- stash->dwarf_abbrev_buffer = (unsigned char*) bfd_alloc (abfd, stash->dwarf_abbrev_size);
+ 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;
@@ -385,7 +444,7 @@ 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;
@@ -459,12 +518,13 @@ read_abbrevs (abfd, offset)
/* Read an attribute described by an abbreviated attribute. */
static char *
-read_attribute (attr, abbrev, abfd, info_ptr)
- struct attribute *attr;
+read_attribute (attr, abbrev, unit, info_ptr)
+ struct attribute *attr;
struct attr_abbrev *abbrev;
- bfd *abfd;
- char *info_ptr;
+ struct comp_unit *unit;
+ char *info_ptr;
{
+ bfd *abfd = unit->abfd;
unsigned int bytes_read;
struct dwarf_block *blk;
@@ -474,8 +534,8 @@ read_attribute (attr, abbrev, abfd, info_ptr)
{
case DW_FORM_addr:
case DW_FORM_ref_addr:
- DW_ADDR (attr) = read_address (abfd, info_ptr);
- info_ptr += sizeof(bfd_vma);
+ DW_ADDR (attr) = read_address (unit, info_ptr);
+ info_ptr += unit->addr_size;
break;
case DW_FORM_block2:
blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
@@ -553,6 +613,10 @@ read_attribute (attr, abbrev, abfd, info_ptr)
DW_UNSND (attr) = read_4_bytes (abfd, info_ptr);
info_ptr += 4;
break;
+ case DW_FORM_ref8:
+ DW_UNSND (attr) = read_8_bytes (abfd, info_ptr);
+ info_ptr += 8;
+ break;
case DW_FORM_ref_udata:
DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
@@ -560,7 +624,7 @@ read_attribute (attr, abbrev, abfd, info_ptr)
case DW_FORM_strp:
case DW_FORM_indirect:
default:
- (*_bfd_error_handler) ("Dwarf Error: Invalid or unhandled FORM value: %d.",
+ (*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %d."),
abbrev->form);
bfd_set_error (bfd_error_bad_value);
}
@@ -580,6 +644,7 @@ struct line_info {
char* filename;
unsigned int line;
unsigned int column;
+ int end_sequence; /* end of (sequential) code sequence */
};
struct fileinfo {
@@ -602,12 +667,13 @@ struct line_info_table {
};
static void
-add_line_info (table, address, filename, line, column)
+add_line_info (table, address, filename, line, column, end_sequence)
struct line_info_table* table;
bfd_vma address;
char* filename;
unsigned int line;
unsigned int column;
+ int end_sequence;
{
struct line_info* info = (struct line_info*)
bfd_alloc (table->abfd, sizeof (struct line_info));
@@ -619,6 +685,7 @@ add_line_info (table, address, filename, line, column)
info->filename = filename;
info->line = line;
info->column = column;
+ info->end_sequence = end_sequence;
}
static char*
@@ -626,7 +693,16 @@ concat_filename (table, file)
struct line_info_table* table;
unsigned int file;
{
- char* filename = table->files[file - 1].name;
+ char* filename;
+
+ if (file - 1 >= table->num_files)
+ {
+ (*_bfd_error_handler)
+ (_("Dwarf Error: mangled line number section (bad file number)."));
+ return "<unknown>";
+ }
+
+ filename = table->files[file - 1].name;
if (*filename == '/')
return filename;
@@ -639,17 +715,59 @@ concat_filename (table, file)
}
}
-/* Decode the line number information for the compilation unit whose
- line number info is at OFFSET in the .debug_line section.
- The compilation directory of the file is passed in COMP_DIR. */
+static void
+arange_add (unit, low_pc, high_pc)
+ struct comp_unit *unit;
+ bfd_vma low_pc;
+ bfd_vma high_pc;
+{
+ struct arange *arange;
+
+ /* first see if we can cheaply extend an existing range: */
+ arange = &unit->arange;
+ do
+ {
+ if (low_pc == arange->high)
+ {
+ arange->high = high_pc;
+ return;
+ }
+ if (high_pc == arange->low)
+ {
+ arange->low = low_pc;
+ return;
+ }
+ arange = arange->next;
+ }
+ while (arange);
+
+ if (unit->arange.high == 0)
+ {
+ /* 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: */
+ arange = bfd_zalloc (unit->abfd, sizeof (*arange));
+ arange->low = low_pc;
+ arange->high = high_pc;
+
+ arange->next = unit->arange.next;
+ unit->arange.next = arange;
+}
+
+/* Decode the line number information for UNIT. */
static struct line_info_table*
-decode_line_info (abfd, offset, comp_dir)
- bfd *abfd;
- unsigned int offset;
- char *comp_dir;
+decode_line_info (unit)
+ struct comp_unit *unit;
{
- static char* dwarf_line_buffer = 0;
+ bfd *abfd = unit->abfd;
+
+ struct dwarf2_debug *stash;
struct line_info_table* table;
@@ -660,7 +778,9 @@ decode_line_info (abfd, offset, comp_dir)
char *cur_file, *cur_dir;
unsigned char op_code, extended_op, adj_opcode;
- if (! dwarf_line_buffer)
+ stash = elf_tdata (abfd)->dwarf2_find_line_info;
+
+ if (! stash->dwarf_line_buffer)
{
asection *msec;
unsigned long size;
@@ -668,26 +788,29 @@ decode_line_info (abfd, offset, comp_dir)
msec = bfd_get_section_by_name (abfd, ".debug_line");
if (! msec)
{
- (*_bfd_error_handler) ("Dwarf Error: Can't find .debug_line section.");
+ (*_bfd_error_handler) (_("Dwarf Error: Can't find .debug_line section."));
bfd_set_error (bfd_error_bad_value);
return 0;
}
- size = bfd_get_section_size_before_reloc (msec);
- dwarf_line_buffer = (unsigned char*) bfd_alloc (abfd, size);
- if (! dwarf_line_buffer)
+ size = msec->_raw_size;
+ stash->dwarf_line_buffer = (char *) bfd_alloc (abfd, size);
+ if (! stash->dwarf_line_buffer)
return 0;
if (! bfd_get_section_contents (abfd, msec,
- dwarf_line_buffer, 0,
+ stash->dwarf_line_buffer, 0,
size))
return 0;
+
+ /* FIXME: We ought to apply the relocs against this section before
+ we process it.... */
}
table = (struct line_info_table*) bfd_alloc (abfd,
sizeof (struct line_info_table));
table->abfd = abfd;
- table->comp_dir = comp_dir;
+ table->comp_dir = unit->comp_dir;
table->num_files = 0;
table->files = NULL;
@@ -695,7 +818,10 @@ decode_line_info (abfd, offset, comp_dir)
table->num_dirs = 0;
table->dirs = NULL;
- line_ptr = dwarf_line_buffer + offset;
+ table->files = NULL;
+ table->last_line = NULL;
+
+ line_ptr = stash->dwarf_line_buffer + unit->line_offset;
/* read in the prologue */
lh.total_length = read_4_bytes (abfd, line_ptr);
@@ -778,7 +904,8 @@ decode_line_info (abfd, offset, comp_dir)
unsigned int column = 0;
int is_stmt = lh.default_is_stmt;
int basic_block = 0;
- int end_sequence = 0;
+ int end_sequence = 0, need_low_pc = 1;
+ bfd_vma low_pc = 0;
/* Decode the table. */
while (! end_sequence)
@@ -795,12 +922,18 @@ decode_line_info (abfd, offset, comp_dir)
{
case DW_LNE_end_sequence:
end_sequence = 1;
- add_line_info (table, address, filename, line, column);
+ add_line_info (table, address, filename, line, column,
+ end_sequence);
+ if (need_low_pc)
+ {
+ need_low_pc = 0;
+ low_pc = address;
+ }
+ arange_add (unit, low_pc, address);
break;
case DW_LNE_set_address:
- address = read_address (abfd, line_ptr);
- address &= 0xffffffff;
- line_ptr += sizeof (bfd_vma);
+ address = read_address (unit, line_ptr);
+ line_ptr += unit->addr_size;
break;
case DW_LNE_define_file:
cur_file = read_string (abfd, line_ptr, &bytes_read);
@@ -827,14 +960,19 @@ decode_line_info (abfd, offset, comp_dir)
table->num_files++;
break;
default:
- (*_bfd_error_handler) ("Dwarf Error: mangled line number section.");
+ (*_bfd_error_handler) (_("Dwarf Error: mangled line number section."));
bfd_set_error (bfd_error_bad_value);
return 0;
}
break;
case DW_LNS_copy:
- add_line_info (table, address, filename, line, column);
+ add_line_info (table, address, filename, line, column, 0);
basic_block = 0;
+ if (need_low_pc)
+ {
+ need_low_pc = 0;
+ low_pc = address;
+ }
break;
case DW_LNS_advance_pc:
address += lh.minimum_instruction_length
@@ -867,7 +1005,8 @@ decode_line_info (abfd, offset, comp_dir)
basic_block = 1;
break;
case DW_LNS_const_add_pc:
- address += (255 - lh.opcode_base) / lh.line_range;
+ address += lh.minimum_instruction_length
+ * ((255 - lh.opcode_base) / lh.line_range);
break;
case DW_LNS_fixed_advance_pc:
address += read_2_bytes (abfd, line_ptr);
@@ -879,8 +1018,13 @@ decode_line_info (abfd, offset, comp_dir)
* lh.minimum_instruction_length;
line += lh.line_base + (adj_opcode % lh.line_range);
/* append row to matrix using current values */
- add_line_info (table, address, filename, line, column);
+ add_line_info (table, address, filename, line, column, 0);
basic_block = 1;
+ if (need_low_pc)
+ {
+ need_low_pc = 0;
+ low_pc = address;
+ }
}
}
}
@@ -903,21 +1047,25 @@ lookup_address_in_line_info_table (table,
const char **filename_ptr;
unsigned int *linenumber_ptr;
{
+ struct line_info* next_line = table->last_line;
struct line_info* each_line;
- struct line_info* next_line;
- for (next_line = 0, each_line = table->last_line;
- each_line;
- next_line = each_line, each_line = each_line->prev_line)
+ if (!next_line)
+ return false;
+
+ each_line = next_line->prev_line;
+
+ while (each_line && next_line)
{
- if (addr >= each_line->address
- && (next_line == 0
- || addr < next_line->address))
+ if (!each_line->end_sequence
+ && addr >= each_line->address && addr < next_line->address)
{
*filename_ptr = each_line->filename;
*linenumber_ptr = each_line->line;
return true;
}
+ next_line = each_line;
+ each_line = each_line->prev_line;
}
return false;
@@ -953,8 +1101,7 @@ lookup_address_in_function_table (table,
each_func;
each_func = each_func->prev_func)
{
- if (addr >= (each_func->low & 0xffffffff)
- && addr < (each_func->high & 0xffffffff))
+ if (addr >= each_func->low && addr < each_func->high)
{
*functionname_ptr = each_func->name;
return true;
@@ -970,56 +1117,6 @@ lookup_address_in_function_table (table,
/* DWARF2 Compilation unit functions. */
-/* A minimal decoding of DWARF2 compilation units. We only decode
- what's needed to get to the line number information. */
-
-struct comp_unit {
-
- /* Chain the previously read compilation units. */
- struct comp_unit* next_unit;
-
- /* 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. */
- bfd_vma low;
- bfd_vma high;
-
- /* The DW_AT_name attribute (for error messages). */
- char* name;
-
- /* The abbrev hash table. */
- struct abbrev_info** abbrevs;
-
- /* Note that an error was found by comp_unit_find_nearest_line. */
- int error;
-
- /* The DW_AT_comp_dir attribute */
- char* comp_dir;
-
- /* 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. */
- unsigned long line_offset;
-
- /* Pointer to the first child die for the comp unit. */
- char *first_child_die_ptr;
-
- /* The end of the comp unit. */
- char *end_ptr;
-
- /* 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;
-
-};
-
-
-
/* Scan over each die in a comp. unit looking for functions to add
to the function table. */
@@ -1051,7 +1148,7 @@ scan_unit_for_functions (unit)
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;
@@ -1068,7 +1165,7 @@ scan_unit_for_functions (unit)
for (i = 0; i < abbrev->num_attrs; ++i)
{
- info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr);
+ info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr);
if (func)
{
@@ -1125,25 +1222,27 @@ scan_unit_for_functions (unit)
-/* 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 unit header.
- END_PTR points one past the end of this comp unit.
+/* 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
+ unit header. END_PTR points one past the end of this comp unit.
+ If ABBREV_LENGTH is 0, then the length of the abbreviation offset
+ is assumed to be four bytes. Otherwise, it it is the size given.
This routine does not read the whole compilation unit; only enough
- to get to the line number information for the compilation unit.
- */
+ to get to the line number information for the compilation unit. */
-static struct comp_unit*
-parse_comp_unit (abfd, info_ptr, end_ptr)
+static struct comp_unit *
+parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length)
bfd* abfd;
char* info_ptr;
char* end_ptr;
+ unsigned int abbrev_length;
{
struct comp_unit* unit;
unsigned short version;
- unsigned int abbrev_offset;
+ unsigned int abbrev_offset = 0;
unsigned char addr_size;
struct abbrev_info** abbrevs;
@@ -1153,30 +1252,40 @@ parse_comp_unit (abfd, info_ptr, end_ptr)
version = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
- abbrev_offset = read_4_bytes (abfd, info_ptr);
- info_ptr += 4;
+ BFD_ASSERT (abbrev_length == 0
+ || abbrev_length == 4
+ || abbrev_length == 8);
+ if (abbrev_length == 0 || abbrev_length == 4)
+ abbrev_offset = read_4_bytes (abfd, info_ptr);
+ else if (abbrev_length == 8)
+ abbrev_offset = read_8_bytes (abfd, info_ptr);
+ info_ptr += abbrev_length;
addr_size = read_1_byte (abfd, info_ptr);
info_ptr += 1;
if (version != 2)
{
- (*_bfd_error_handler) ("Dwarf Error: found dwarf version '%hu' in compilation unit '%s', this reader only handles version 2 information.",
- version,
- unit->name);
+ (*_bfd_error_handler) (_("Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."), version );
bfd_set_error (bfd_error_bad_value);
return 0;
}
- if (addr_size != sizeof (bfd_vma))
+ if (addr_size > sizeof (bfd_vma))
{
- (*_bfd_error_handler) ("Dwarf Error: found address size '%u' in compilation unit '%s', this readers only handles address size '%u'.",
+ (*_bfd_error_handler) (_("Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."),
addr_size,
- unit->name,
sizeof (bfd_vma));
bfd_set_error (bfd_error_bad_value);
return 0;
}
+ if (addr_size != 2 && addr_size != 4 && addr_size != 8)
+ {
+ (*_bfd_error_handler) ("Dwarf Error: found address size '%u', this reader can only handle address sizes '2', '4' and '8'.", addr_size );
+ bfd_set_error (bfd_error_bad_value);
+ return 0;
+ }
+
/* Read the abbrevs for this compilation unit into a table */
abbrevs = read_abbrevs (abfd, abbrev_offset);
if (! abbrevs)
@@ -1186,7 +1295,7 @@ parse_comp_unit (abfd, info_ptr, end_ptr)
info_ptr += bytes_read;
if (! abbrev_number)
{
- (*_bfd_error_handler) ("Dwarf Error: Bad abbrev number: %d.",
+ (*_bfd_error_handler) (_("Dwarf Error: Bad abbrev number: %d."),
abbrev_number);
bfd_set_error (bfd_error_bad_value);
return 0;
@@ -1195,7 +1304,7 @@ parse_comp_unit (abfd, info_ptr, end_ptr)
abbrev = lookup_abbrev (abbrev_number, 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 0;
@@ -1203,12 +1312,13 @@ parse_comp_unit (abfd, info_ptr, end_ptr)
unit = (struct comp_unit*) bfd_zalloc (abfd, sizeof (struct comp_unit));
unit->abfd = abfd;
+ unit->addr_size = addr_size;
unit->abbrevs = abbrevs;
unit->end_ptr = end_ptr;
for (i = 0; i < abbrev->num_attrs; ++i)
{
- info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr);
+ info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr);
/* Store the data if it is of an attribute we want to keep in a
partial symbol table. */
@@ -1224,11 +1334,11 @@ parse_comp_unit (abfd, info_ptr, end_ptr)
break;
case DW_AT_low_pc:
- unit->low = DW_ADDR (&attr);
+ unit->arange.low = DW_ADDR (&attr);
break;
case DW_AT_high_pc:
- unit->high = DW_ADDR (&attr);
+ unit->arange.high = DW_ADDR (&attr);
break;
case DW_AT_comp_dir:
@@ -1267,9 +1377,20 @@ comp_unit_contains_address (unit, addr)
struct comp_unit* unit;
bfd_vma addr;
{
- return ! unit->error
- && ( addr >= (unit->low & 0xffffffff)
- && addr <= (unit->high & 0xffffffff));
+ struct arange *arange;
+
+ if (unit->error)
+ return 0;
+
+ arange = &unit->arange;
+ do
+ {
+ if (addr >= arange->low && addr < arange->high)
+ return 1;
+ arange = arange->next;
+ }
+ while (arange);
+ return 0;
}
@@ -1304,9 +1425,7 @@ comp_unit_find_nearest_line (unit, addr,
return false;
}
- unit->line_table = decode_line_info (unit->abfd,
- unit->line_offset,
- unit->comp_dir);
+ unit->line_table = decode_line_info (unit);
if (! unit->line_table)
{
@@ -1331,19 +1450,25 @@ comp_unit_find_nearest_line (unit, addr,
return line_p || func_p;
}
-/* The DWARF2 version of find_nearest line.
- Return true if the line is found without error. */
+/* 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.
+ You may use zero to indicate that the default value should be
+ used. */
boolean
_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr, linenumber_ptr)
+ filename_ptr, functionname_ptr,
+ linenumber_ptr,
+ addr_size)
bfd *abfd;
asection *section;
- asymbol **symbols;
+ asymbol **symbols ATTRIBUTE_UNUSED;
bfd_vma offset;
const char **filename_ptr;
const char **functionname_ptr;
unsigned int *linenumber_ptr;
+ unsigned int addr_size;
{
/* Read each compilation unit from the section .debug_info, and check
to see if it contains the address we are searching for. If yes,
@@ -1366,6 +1491,13 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
*functionname_ptr = NULL;
*linenumber_ptr = 0;
+ /* The DWARF2 spec says that the initial length field, and the
+ offset of the abbreviation table, should both be 4-byte values.
+ However, some compilers do things differently. */
+ if (addr_size == 0)
+ addr_size = 4;
+ BFD_ASSERT (addr_size == 4 || addr_size == 8);
+
if (! stash)
{
asection *msec;
@@ -1386,8 +1518,11 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
return false;
}
- size = bfd_get_section_size_before_reloc (msec);
- stash->info_ptr = (unsigned char*) bfd_alloc (abfd, size);
+ size = msec->_raw_size;
+ if (size == 0)
+ return false;
+
+ stash->info_ptr = (char *) bfd_alloc (abfd, size);
if (! stash->info_ptr)
return false;
@@ -1399,8 +1534,22 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
}
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. */
+ }
/* A null info_ptr indicates that there is no dwarf2 info
(or that an error occured while setting up the stash). */
@@ -1408,45 +1557,60 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
if (! stash->info_ptr)
return false;
-
-
/* 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);
- }
-
+ if (comp_unit_contains_address (each, addr))
+ return comp_unit_find_nearest_line (each, addr, filename_ptr,
+ functionname_ptr, linenumber_ptr);
/* Read each remaining comp. units checking each as they are read. */
while (stash->info_ptr < stash->info_ptr_end)
{
struct comp_unit* each;
- unsigned int length;
+ bfd_vma length;
+ boolean found;
- length = read_4_bytes (abfd, stash->info_ptr);
- stash->info_ptr += 4;
+ if (addr_size == 4)
+ length = read_4_bytes (abfd, stash->info_ptr);
+ else
+ length = read_8_bytes (abfd, stash->info_ptr);
+ stash->info_ptr += addr_size;
if (length > 0)
{
each = parse_comp_unit (abfd, stash->info_ptr,
- stash->info_ptr + length);
+ stash->info_ptr + length,
+ addr_size);
stash->info_ptr += length;
if (each)
{
each->next_unit = stash->all_comp_units;
stash->all_comp_units = each;
-
- if (comp_unit_contains_address (each, addr))
- return comp_unit_find_nearest_line (each, addr,
- filename_ptr,
- functionname_ptr,
- linenumber_ptr);
+
+ /* DW_AT_low_pc and DW_AT_high_pc are optional for
+ 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. */
+ 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);
+ }
+ else
+ {
+ found = comp_unit_find_nearest_line (each, addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr);
+ if (found)
+ return true;
+ }
}
}
}
diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c
index 274baef..4b136ee 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, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -72,7 +72,23 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s,
/* This stuff is somewhat copied from coffcode.h. */
-static asection bfd_debug_section = { "*DEBUG*" };
+static asection bfd_debug_section =
+{
+ /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */
+ "*DEBUG*", 0, 0, 0, 0, 0, 0, 0,
+ /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */
+ 0, 0, 0, 0, 0, NULL,
+ /* alig, reloc..., orel..., reloc_count, filepos, rel_..., line_... */
+ 0, 0, 0, 0, 0, 0, 0,
+ /* userdata, contents, lineno, lineno_count */
+ 0, 0, 0, 0,
+ /* comdat_info, moving_line_filepos, target_index, used_by_bfd, */
+ NULL, 0, 0, 0,
+ /* cons, owner, symbol */
+ 0, 0, (struct symbol_cache_entry *) NULL,
+ /* symbol_ptr_ptr, link_order_head, ..._tail */
+ (struct symbol_cache_entry **) NULL, NULL, NULL
+};
/* Create an ECOFF object. */
@@ -138,7 +154,7 @@ _bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr)
boolean
_bfd_ecoff_new_section_hook (abfd, section)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *section;
{
section->alignment_power = 4;
@@ -349,10 +365,11 @@ ecoff_sec_to_styp_flags (name, flags)
/*ARGSUSED*/
flagword
-_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name)
- bfd *abfd;
+_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section)
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR hdr;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
@@ -496,7 +513,7 @@ ecoff_slurp_symbolic_header (abfd)
boolean
_bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
bfd *abfd;
- asection *ignore;
+ asection *ignore ATTRIBUTE_UNUSED;
struct ecoff_debug_info *debug;
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
@@ -1305,7 +1322,7 @@ ecoff_type_to_string (abfd, fdr, indx)
break;
default:
- sprintf (p1, "Unknown basic type %d", (int) basic_type);
+ sprintf (p1, _("Unknown basic type %d"), (int) basic_type);
break;
}
@@ -1433,7 +1450,7 @@ ecoff_type_to_string (abfd, fdr, indx)
/*ARGSUSED*/
void
_bfd_ecoff_get_symbol_info (abfd, symbol, ret)
- bfd *abfd; /* Ignored. */
+ bfd *abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -1445,7 +1462,7 @@ _bfd_ecoff_get_symbol_info (abfd, symbol, ret)
/*ARGSUSED*/
boolean
_bfd_ecoff_bfd_is_local_label_name (abfd, name)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
return name[0] == '$';
@@ -1577,17 +1594,17 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
case stFile:
case stBlock:
- fprintf (file, "\n End+1 symbol: %ld",
+ fprintf (file, _("\n End+1 symbol: %ld"),
(long) (indx + sym_base));
break;
case stEnd:
if (ecoff_ext.asym.sc == scText
|| ecoff_ext.asym.sc == scInfo)
- fprintf (file, "\n First symbol: %ld",
+ 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])
@@ -1599,14 +1616,14 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
if (ECOFF_IS_STAB (&ecoff_ext.asym))
;
else if (ecoffsymbol (symbol)->local)
- fprintf (file, "\n End+1 symbol: %-7ld Type: %s",
+ fprintf (file, _("\n End+1 symbol: %-7ld Type: %s"),
((long)
(AUX_GET_ISYM (bigendian,
&aux_base[ecoff_ext.asym.index])
+ sym_base)),
ecoff_type_to_string (abfd, fdr, indx + 1));
else
- fprintf (file, "\n Local symbol: %ld",
+ fprintf (file, _("\n Local symbol: %ld"),
((long) indx
+ (long) sym_base
+ (ecoff_data (abfd)
@@ -1614,23 +1631,23 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
break;
case stStruct:
- fprintf (file, "\n struct; End+1 symbol: %ld",
+ fprintf (file, _("\n struct; End+1 symbol: %ld"),
(long) (indx + sym_base));
break;
case stUnion:
- fprintf (file, "\n union; End+1 symbol: %ld",
+ fprintf (file, _("\n union; End+1 symbol: %ld"),
(long) (indx + sym_base));
break;
case stEnum:
- fprintf (file, "\n enum; End+1 symbol: %ld",
+ fprintf (file, _("\n enum; End+1 symbol: %ld"),
(long) (indx + sym_base));
break;
default:
if (! ECOFF_IS_STAB (&ecoff_ext.asym))
- fprintf (file, "\n Type: %s",
+ fprintf (file, _("\n Type: %s"),
ecoff_type_to_string (abfd, fdr, indx));
break;
}
@@ -1801,7 +1818,7 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
filename_ptr, functionname_ptr, retline_ptr)
bfd *abfd;
asection *section;
- asymbol **ignore_symbols;
+ asymbol **ignore_symbols ATTRIBUTE_UNUSED;
bfd_vma offset;
CONST char **filename_ptr;
CONST char **functionname_ptr;
@@ -1971,7 +1988,7 @@ _bfd_ecoff_set_arch_mach (abfd, arch, machine)
int
_bfd_ecoff_sizeof_headers (abfd, reloc)
bfd *abfd;
- boolean reloc;
+ boolean reloc ATTRIBUTE_UNUSED;
{
asection *current;
int c;
@@ -3181,7 +3198,14 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
armap. */
hdr.ar_uid[0] = '0';
hdr.ar_gid[0] = '0';
+#if 0
hdr.ar_mode[0] = '0';
+#else
+ /* 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';
+#endif
sprintf (hdr.ar_size, "%-10d", (int) mapsize);
diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c
index a120a2b..25fc966 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, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -491,9 +491,9 @@ add_memory_shuffle (ainfo, head, tail, data, size)
/*ARGSUSED*/
PTR
bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct ecoff_debug_info *output_debug;
- const struct ecoff_debug_swap *output_swap;
+ const struct ecoff_debug_swap *output_swap ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
struct accumulate *ainfo;
@@ -551,9 +551,9 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
void
bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info)
PTR handle;
- bfd *output_bfd;
- struct ecoff_debug_info *output_debug;
- const struct ecoff_debug_swap *output_swap;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ struct ecoff_debug_info *output_debug ATTRIBUTE_UNUSED;
+ const struct ecoff_debug_swap *output_swap ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
struct accumulate *ainfo = (struct accumulate *) handle;
@@ -1412,7 +1412,7 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym)
/*ARGSUSED*/
static void
ecoff_align_debug (abfd, debug, swap)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
struct ecoff_debug_info *debug;
const struct ecoff_debug_swap *swap;
{
diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h
index 571998a..0dcecdf 100644
--- a/contrib/binutils/bfd/elf-bfd.h
+++ b/contrib/binutils/bfd/elf-bfd.h
@@ -1,5 +1,6 @@
/* BFD back-end data structures for ELF files.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software
+ Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -85,6 +86,16 @@ struct elf_link_hash_entry
/* Symbol index as a dynamic symbol. Initialized to -1, and remains
-1 if this is not a dynamic symbol. */
+ /* ??? Note that this is consistently used as a synonym for tests
+ against whether we can perform various simplifying transformations
+ to the code. (E.g. changing a pc-relative jump to a PLT entry
+ into a pc-relative jump to the target function.) That test, which
+ is often relatively complex, and someplaces wrong or incomplete,
+ should really be replaced by a predicate in elflink.c.
+
+ End result: this field -1 does not indicate that the symbol is
+ not in the dynamic symbol table, but rather that the symbol is
+ not visible outside this DSO. */
long dynindx;
/* String table index in .dynstr if this is a dynamic symbol. */
@@ -96,17 +107,24 @@ struct elf_link_hash_entry
struct elf_link_hash_entry *weakdef;
/* If this symbol requires an entry in the global offset table, the
- processor specific backend uses this field to hold the offset
- into the .got section. If this field is -1, then the symbol does
- not require a global offset table entry. */
- bfd_vma got_offset;
-
- /* If this symbol requires an entry in the procedure linkage table,
- the processor specific backend uses these two fields to hold the
- offset into the procedure linkage section and the offset into the
- .got section. If plt_offset is -1, then the symbol does not
- require an entry in the procedure linkage table. */
- bfd_vma plt_offset;
+ processor specific backend uses this field to track usage and
+ final offset. We use a union and two names primarily to 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 this field is -1,
+ then the symbol does not require a global offset table entry. */
+ union
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } got;
+
+ /* Same, but tracks a procedure linkage table entry. */
+ union
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } plt;
/* If this symbol is used in the linker created sections, the processor
specific backend uses this field to map the field into the offset
@@ -126,12 +144,25 @@ struct elf_link_hash_entry
struct bfd_elf_version_tree *vertree;
} verinfo;
+ /* Virtual table entry use information. This array is nominally of size
+ size/sizeof(target_void_pointer), though we have to be able to assume
+ and track a size while the symbol is still undefined. It is indexed
+ via offset/sizeof(target_void_pointer). */
+ size_t vtable_entries_size;
+ boolean *vtable_entries_used;
+
+ /* Virtual table derivation info. */
+ struct elf_link_hash_entry *vtable_parent;
+
/* Symbol type (STT_NOTYPE, STT_OBJECT, etc.). */
char type;
- /* Symbol st_other value. */
+ /* Symbol st_other value, symbol visibility. */
unsigned char other;
+ /* Hash value of the name computed using the ELF hash function. */
+ unsigned long elf_hash_value;
+
/* Some flags; legal values follow. */
unsigned short elf_link_hash_flags;
/* Symbol is referenced by a non-shared object. */
@@ -142,18 +173,44 @@ struct elf_link_hash_entry
#define ELF_LINK_HASH_REF_DYNAMIC 04
/* Symbol is defined by a shared object. */
#define ELF_LINK_HASH_DEF_DYNAMIC 010
+ /* Symbol has a non-weak reference from a non-shared object. */
+#define ELF_LINK_HASH_REF_REGULAR_NONWEAK 020
/* Dynamic symbol has been adjustd. */
-#define ELF_LINK_HASH_DYNAMIC_ADJUSTED 020
+#define ELF_LINK_HASH_DYNAMIC_ADJUSTED 040
/* Symbol needs a copy reloc. */
-#define ELF_LINK_HASH_NEEDS_COPY 040
+#define ELF_LINK_HASH_NEEDS_COPY 0100
/* Symbol needs a procedure linkage table entry. */
-#define ELF_LINK_HASH_NEEDS_PLT 0100
+#define ELF_LINK_HASH_NEEDS_PLT 0200
/* Symbol appears in a non-ELF input file. */
-#define ELF_LINK_NON_ELF 0200
+#define ELF_LINK_NON_ELF 0400
/* Symbol should be marked as hidden in the version information. */
-#define ELF_LINK_HIDDEN 0400
+#define ELF_LINK_HIDDEN 01000
/* Symbol was forced to local scope due to a version script file. */
-#define ELF_LINK_FORCED_LOCAL 01000
+#define ELF_LINK_FORCED_LOCAL 02000
+ /* Symbol was marked during garbage collection. */
+#define ELF_LINK_HASH_MARK 04000
+ /* Symbol is referenced by a non-GOT/non-PLT relocation. This is
+ not currently set by all the backends. */
+#define ELF_LINK_NON_GOT_REF 010000
+};
+
+/* Records local symbols to be emitted in the dynamic symbol table. */
+
+struct elf_link_local_dynamic_entry
+{
+ struct elf_link_local_dynamic_entry *next;
+
+ /* The input bfd this symbol came from. */
+ bfd *input_bfd;
+
+ /* The index of the local symbol being copied. */
+ long input_indx;
+
+ /* The index in the outgoing dynamic symbol table. */
+ long dynindx;
+
+ /* A copy of the input symbol. */
+ Elf_Internal_Sym isym;
};
/* ELF linker hash table. */
@@ -184,6 +241,8 @@ struct elf_link_hash_table
struct elf_link_hash_entry *hgot;
/* A pointer to information used to link stabs in sections. */
PTR stab_info;
+ /* A linked list of local symbols to be added to .dynsym. */
+ struct elf_link_local_dynamic_entry *dynlocal;
};
/* Look up an entry in an ELF linker hash table. */
@@ -211,6 +270,13 @@ struct elf_size_info {
unsigned char sizeof_ehdr, sizeof_phdr, sizeof_shdr;
unsigned char sizeof_rel, sizeof_rela, sizeof_sym, sizeof_dyn, sizeof_note;
+ /* The size of entries in the .hash section. */
+ unsigned char sizeof_hash_entry;
+
+ /* The number of internal relocations to allocate per external
+ relocation entry. */
+ unsigned char int_rels_per_ext_rel;
+
unsigned char arch_size, file_align;
unsigned char elfclass, ev_current;
int (*write_out_phdrs) PARAMS ((bfd *, const Elf_Internal_Phdr *, int));
@@ -221,6 +287,32 @@ struct elf_size_info {
PARAMS ((bfd *, asection *, asymbol **, boolean));
long (*slurp_symbol_table) PARAMS ((bfd *, asymbol **, boolean));
void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
+ void (*swap_dyn_out) PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR));
+
+ /* This function, if defined, is called to swap in a REL
+ relocation. If an external relocation corresponds to more than
+ one internal relocation, then all relocations are swapped in at
+ once. */
+ void (*swap_reloc_in)
+ PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rel *));
+
+ /* This function, if defined, is called to swap out a REL
+ relocation. */
+ void (*swap_reloc_out)
+ PARAMS ((bfd *, const Elf_Internal_Rel *, bfd_byte *));
+
+ /* This function, if defined, is called to swap in a RELA
+ relocation. If an external relocation corresponds to more than
+ one internal relocation, then all relocations are swapped in at
+ once. */
+ void (*swap_reloca_in)
+ PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+
+ /* This function, if defined, is called to swap out a RELA
+ relocation. */
+ void (*swap_reloca_out)
+ PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+
};
#define elf_symbol_from(ABFD,S) \
@@ -231,11 +323,6 @@ struct elf_size_info {
struct elf_backend_data
{
- /* Whether the backend uses REL or RELA relocations. FIXME: some
- ELF backends use both. When we need to support one, this whole
- approach will need to be changed. */
- int use_rela_p;
-
/* The architecture for this backend. */
enum bfd_architecture arch;
@@ -245,18 +332,6 @@ struct elf_backend_data
/* The maximum page size for this backend. */
bfd_vma maxpagesize;
- /* This is true if the linker should act like collect and gather
- global constructors and destructors by name. This is true for
- MIPS ELF because the Irix 5 tools can not handle the .init
- section. */
- boolean collect;
-
- /* This is true if the linker should ignore changes to the type of a
- symbol. This is true for MIPS ELF because some Irix 5 objects
- record undefined functions as STT_OBJECT although the definitions
- are STT_FUNC. */
- boolean type_change_ok;
-
/* A function to translate an ELF RELA relocation to a BFD arelent
structure. */
void (*elf_info_to_howto) PARAMS ((bfd *, arelent *,
@@ -296,6 +371,10 @@ struct elf_backend_data
elf_symbol_type *,
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));
+
/* 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
@@ -309,6 +388,12 @@ struct elf_backend_data
Elf32_Internal_Shdr *,
char *));
+ /* A function to handle unusual program segment types when creating BFD
+ sections from ELF program segments. */
+ boolean (*elf_backend_section_from_phdr) PARAMS ((bfd *,
+ Elf32_Internal_Phdr *,
+ int));
+
/* A function to set up the ELF section header for a BFD section in
preparation for writing it out. This is where the flags and type
fields are set for unusual sections. */
@@ -473,6 +558,51 @@ struct elf_backend_data
backend specific fashion. */
boolean (*elf_backend_modify_segment_map) PARAMS ((bfd *));
+ /* This function is called during section gc to discover the section a
+ particular relocation refers to. It need not be defined for hosts
+ that have no queer relocation types. */
+ asection * (*gc_mark_hook)
+ PARAMS ((bfd *abfd, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *h, Elf_Internal_Sym *));
+
+ /* This function, if defined, is called during the sweep phase of gc
+ in order that a backend might update any data structures it might
+ be maintaining. */
+ boolean (*gc_sweep_hook)
+ PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
+ const Elf_Internal_Rela *relocs));
+
+ /* This function, if defined, is called after the ELF headers have
+ been created. This allows for things like the OS and ABI versions
+ to be changed. */
+ void (*elf_backend_post_process_headers)
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+ /* This function, if defined, prints a symbol to file and returns the
+ name of the symbol to be printed. It should return NULL to fall
+ back to default symbol printing. */
+ const char *(*elf_backend_print_symbol_all)
+ PARAMS ((bfd *, PTR, asymbol *));
+
+ /* This function, if defined, is called after all local symbols and
+ global symbols converted to locals are emited into the symtab
+ section. It allows the backend to emit special global symbols
+ not handled in the hash table. */
+ boolean (*elf_backend_output_arch_syms)
+ PARAMS ((bfd *, struct bfd_link_info *, PTR,
+ boolean (*) PARAMS ((PTR, const char *,
+ Elf_Internal_Sym *, asection *))));
+
+ /* Copy any information related to dynamic linking from a pre-existing
+ symbol IND to a newly created symbol DIR. */
+ void (*elf_backend_copy_indirect_symbol)
+ PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+
+ /* 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 *));
+
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap;
@@ -487,11 +617,51 @@ struct elf_backend_data
.got section */
bfd_vma got_symbol_offset;
+ /* The size in bytes of the headers for the GOT and PLT. This includes
+ the so-called reserved entries on some systems. */
+ bfd_vma got_header_size;
+ bfd_vma plt_header_size;
+
+ /* This is true if the linker should act like collect and gather
+ global constructors and destructors by name. This is true for
+ MIPS ELF because the Irix 5 tools can not handle the .init
+ section. */
+ unsigned collect : 1;
+
+ /* This is true if the linker should ignore changes to the type of a
+ symbol. This is true for MIPS ELF because some Irix 5 objects
+ record undefined functions as STT_OBJECT although the definitions
+ are STT_FUNC. */
+ unsigned type_change_ok : 1;
+
+ /* Whether the backend may use REL relocations. (Some backends use
+ 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.) */
+ unsigned may_use_rela_p : 1;
+
+ /* 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. */
+ unsigned default_use_rela_p : 1;
+
+ /* True if addresses "naturally" sign extend. This is used when
+ swapping in from Elf32 when BFD64. */
+ unsigned sign_extend_vma : 1;
+
unsigned want_got_plt : 1;
unsigned plt_readonly : 1;
unsigned want_plt_sym : 1;
unsigned plt_not_loaded : 1;
unsigned plt_alignment : 4;
+ unsigned can_gc_sections : 1;
+ unsigned want_dynbss : 1;
};
/* Information stored for each BFD section in an ELF file. This
@@ -507,12 +677,19 @@ struct bfd_elf_section_data
/* If there is a second reloc section associated with this section,
as can happen on Irix 6, this field points to the header. */
Elf_Internal_Shdr *rel_hdr2;
+ /* The number of relocations currently assigned to REL_HDR. */
+ unsigned int rel_count;
+ /* The number of relocations currently assigned to REL_HDR2. */
+ unsigned int rel_count2;
/* The ELF section number of this section. Only used for an output
file. */
int this_idx;
- /* The ELF section number of the reloc section associated with this
- section, if any. Only used for an output file. */
+ /* The ELF section number of the reloc section indicated by
+ REL_HDR if any. Only used for an output file. */
int rel_idx;
+ /* The ELF section number of the reloc section indicated by
+ REL_HDR2 if any. Only used for an output file. */
+ int rel_idx2;
/* Used by the backend linker to store the symbol hash table entries
associated with relocs against global symbols. */
struct elf_link_hash_entry **rel_hashes;
@@ -522,12 +699,15 @@ struct bfd_elf_section_data
Elf_Internal_Rela *relocs;
/* Used by the backend linker when generating a shared library to
record the dynamic symbol index for a section symbol
- corresponding to this section. */
+ corresponding to this section. A value of 0 means that there is
+ no dynamic symbol for this section. */
long dynindx;
/* A pointer used for .stab linking optimizations. */
PTR stab_info;
/* A pointer available for the processor specific ELF backend. */
PTR tdata;
+ /* Nonzero if this section uses RELA relocations, rather than REL. */
+ unsigned int use_rela_p:1;
};
#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
@@ -606,11 +786,22 @@ struct elf_obj_tdata
unsigned int strtab_section, dynsymtab_section;
unsigned int dynversym_section, dynverdef_section, dynverref_section;
file_ptr next_file_pos;
+#if 0
+ /* we don't need these inside bfd anymore, and I think
+ 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. */
+ int core_signal;
+ int core_pid;
+ int core_lwpid;
+ char* core_program;
+ char* core_command;
+
/* This is set to true if the object was created by the backend
linker. */
boolean linker;
@@ -621,8 +812,17 @@ struct elf_obj_tdata
struct elf_link_hash_entry **sym_hashes;
/* A mapping from local symbols to offsets into the global offset
- table, used when linking. This is indexed by the symbol index. */
- bfd_vma *local_got_offsets;
+ table, used when linking. This is indexed by the symbol index.
+ Like for the globals, we use a union and two names primarily to
+ 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. */
+ union
+ {
+ bfd_signed_vma *refcounts;
+ bfd_vma *offsets;
+ } local_got;
/* A mapping from local symbols to offsets into the various linker
sections added. This is index by the symbol index. */
@@ -657,6 +857,9 @@ struct elf_obj_tdata
find_nearest_line. */
struct mips_elf_find_line *find_line_info;
+ /* 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;
@@ -701,7 +904,8 @@ struct elf_obj_tdata
#define elf_gp(bfd) (elf_tdata(bfd) -> gp)
#define elf_gp_size(bfd) (elf_tdata(bfd) -> gp_size)
#define elf_sym_hashes(bfd) (elf_tdata(bfd) -> sym_hashes)
-#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got_offsets)
+#define elf_local_got_refcounts(bfd) (elf_tdata(bfd) -> local_got.refcounts)
+#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_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab)
@@ -743,7 +947,7 @@ extern void bfd_elf_print_symbol PARAMS ((bfd *, PTR, asymbol *,
#define bfd_elf32_print_symbol bfd_elf_print_symbol
#define bfd_elf64_print_symbol bfd_elf_print_symbol
-extern unsigned long bfd_elf_hash PARAMS ((CONST unsigned char *));
+extern unsigned long bfd_elf_hash PARAMS ((const char *));
extern bfd_reloc_status_type bfd_elf_generic_reloc PARAMS ((bfd *,
arelent *,
@@ -753,13 +957,20 @@ extern bfd_reloc_status_type bfd_elf_generic_reloc PARAMS ((bfd *,
bfd *,
char **));
extern boolean bfd_elf_mkobject PARAMS ((bfd *));
+extern boolean bfd_elf_mkcorefile PARAMS ((bfd *));
extern Elf_Internal_Shdr *bfd_elf_find_section PARAMS ((bfd *, char *));
extern boolean _bfd_elf_make_section_from_shdr
PARAMS ((bfd *abfd, Elf_Internal_Shdr *hdr, const char *name));
+extern boolean _bfd_elf_make_section_from_phdr
+ PARAMS ((bfd *abfd, Elf_Internal_Phdr *hdr, int index, const char *typename));
extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
PARAMS ((bfd *));
+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 *));
extern boolean _bfd_elf_link_hash_table_init
PARAMS ((struct elf_link_hash_table *, bfd *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
@@ -772,6 +983,7 @@ extern boolean _bfd_elf_copy_private_symbol_data
extern boolean _bfd_elf_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
extern boolean _bfd_elf_write_object_contents PARAMS ((bfd *));
+extern boolean _bfd_elf_write_corefile_contents PARAMS ((bfd *));
extern boolean _bfd_elf_set_section_contents PARAMS ((bfd *, sec_ptr, PTR,
file_ptr,
bfd_size_type));
@@ -801,6 +1013,8 @@ extern boolean _bfd_elf_find_nearest_line PARAMS ((bfd *, asection *,
#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
+ PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, boolean));
/* If the target doesn't have reloc handling written yet: */
extern void _bfd_elf_no_info_to_howto PARAMS ((bfd *, arelent *,
@@ -818,6 +1032,9 @@ struct bfd_strtab_hash *_bfd_elf_stringtab_init PARAMS ((void));
boolean
_bfd_elf_link_record_dynamic_symbol PARAMS ((struct bfd_link_info *,
struct elf_link_hash_entry *));
+long
+_bfd_elf_link_lookup_local_dynindx PARAMS ((struct bfd_link_info *,
+ bfd *, long));
boolean
_bfd_elf_compute_section_file_positions PARAMS ((bfd *,
struct bfd_link_info *));
@@ -832,6 +1049,8 @@ boolean _bfd_elf_create_dynamic_sections PARAMS ((bfd *,
struct bfd_link_info *));
boolean _bfd_elf_create_got_section PARAMS ((bfd *,
struct bfd_link_info *));
+unsigned long _bfd_elf_link_renumber_dynsyms PARAMS ((bfd *,
+ struct bfd_link_info *));
elf_linker_section_t *_bfd_elf_create_linker_section
PARAMS ((bfd *abfd,
@@ -883,6 +1102,9 @@ boolean _bfd_elf_make_linker_section_rela
elf_linker_section_t *lsect,
int alignment));
+boolean _bfd_elfcore_section_from_phdr
+ PARAMS ((bfd *, Elf_Internal_Phdr *, int));
+
extern const bfd_target *bfd_elf32_object_p PARAMS ((bfd *));
extern const bfd_target *bfd_elf32_core_file_p PARAMS ((bfd *));
extern char *bfd_elf32_core_file_failing_command PARAMS ((bfd *));
@@ -914,7 +1136,7 @@ extern void bfd_elf32_swap_phdr_out
extern void bfd_elf32_swap_dyn_in
PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
extern void bfd_elf32_swap_dyn_out
- PARAMS ((bfd *, const Elf_Internal_Dyn *, Elf32_External_Dyn *));
+ PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR));
extern long bfd_elf32_slurp_symbol_table
PARAMS ((bfd *, asymbol **, boolean));
extern boolean bfd_elf32_write_shdrs_and_ehdr PARAMS ((bfd *));
@@ -957,7 +1179,7 @@ extern void bfd_elf64_swap_phdr_out
extern void bfd_elf64_swap_dyn_in
PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
extern void bfd_elf64_swap_dyn_out
- PARAMS ((bfd *, const Elf_Internal_Dyn *, Elf64_External_Dyn *));
+ PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR));
extern long bfd_elf64_slurp_symbol_table
PARAMS ((bfd *, asymbol **, boolean));
extern boolean bfd_elf64_write_shdrs_and_ehdr PARAMS ((bfd *));
@@ -970,16 +1192,48 @@ extern boolean bfd_elf64_link_create_dynamic_sections
extern Elf_Internal_Rela *_bfd_elf64_link_read_relocs
PARAMS ((bfd *, asection *, PTR, Elf_Internal_Rela *, boolean));
-#define bfd_elf32_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
-#define bfd_elf64_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
+#define bfd_elf32_link_record_dynamic_symbol \
+ _bfd_elf_link_record_dynamic_symbol
+#define bfd_elf64_link_record_dynamic_symbol \
+ _bfd_elf_link_record_dynamic_symbol
+
+boolean _bfd_elf32_link_record_local_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, bfd *, long));
+boolean _bfd_elf64_link_record_local_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, bfd *, long));
extern boolean _bfd_elf_close_and_cleanup PARAMS ((bfd *));
+extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn
+ PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR,
+ asection *, bfd *, char **));
+
+boolean _bfd_elf32_gc_sections
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
+boolean _bfd_elf32_gc_common_finalize_got_offsets
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
+boolean _bfd_elf32_gc_common_final_link
+ PARAMS ((bfd *, struct bfd_link_info *));
+boolean _bfd_elf32_gc_record_vtinherit
+ PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+boolean _bfd_elf32_gc_record_vtentry
+ PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+
+boolean _bfd_elf64_gc_sections
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
+boolean _bfd_elf64_gc_common_finalize_got_offsets
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
+boolean _bfd_elf64_gc_common_final_link
+ PARAMS ((bfd *, struct bfd_link_info *));
+boolean _bfd_elf64_gc_record_vtinherit
+ PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+boolean _bfd_elf64_gc_record_vtentry
+ PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
/* MIPS ELF specific routines. */
extern boolean _bfd_mips_elf_object_p PARAMS ((bfd *));
extern boolean _bfd_mips_elf_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
extern boolean _bfd_mips_elf_fake_sections
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
extern boolean _bfd_mips_elf_section_from_bfd_section
@@ -1008,5 +1262,48 @@ extern boolean _bfd_mips_elf_find_nearest_line
const char **, unsigned int *));
extern boolean _bfd_mips_elf_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+extern boolean _bfd_mips_elf_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_mips_elf_add_symbol_hook
+ PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+ const char **, flagword *, asection **, bfd_vma *));
+extern boolean _bfd_mips_elf_adjust_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+extern boolean _bfd_mips_elf_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ 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
+ 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 *,
+ const Elf_Internal_Rela *));
+extern boolean _bfd_mips_elf_always_size_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_mips_elf_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_mips_elf_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ 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
+ PARAMS ((bfd *, PTR));
+extern boolean _bfd_mips_elf_link_output_symbol_hook
+ PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+ asection *));
+extern boolean _bfd_mips_elf_final_link
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern int _bfd_mips_elf_additional_program_headers PARAMS ((bfd *));
+extern boolean _bfd_mips_elf_modify_segment_map PARAMS ((bfd *));
+extern boolean _bfd_mips_elf_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+
+/* SH ELF specific routine. */
+
+extern boolean _sh_elf_set_mach_from_flags PARAMS ((bfd *));
#endif /* _LIBELF_H_ */
diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c
index 2d8e160..c210638 100644
--- a/contrib/binutils/bfd/elf.c
+++ b/contrib/binutils/bfd/elf.c
@@ -1,5 +1,5 @@
/* ELF executable support for BFD.
- Copyright 1993, 94, 95, 96, 97, 1998 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.
@@ -45,7 +45,7 @@ static int elf_sort_sections PARAMS ((const PTR, const PTR));
static boolean assign_file_positions_for_segments PARAMS ((bfd *));
static boolean assign_file_positions_except_relocs PARAMS ((bfd *));
static boolean prep_headers PARAMS ((bfd *));
-static boolean swap_out_syms PARAMS ((bfd *, struct bfd_strtab_hash **));
+static boolean swap_out_syms PARAMS ((bfd *, struct bfd_strtab_hash **, int));
static boolean copy_private_bfd_data PARAMS ((bfd *, bfd *));
static char *elf_read PARAMS ((bfd *, long, unsigned int));
static void elf_fake_sections PARAMS ((bfd *, asection *, PTR));
@@ -53,6 +53,7 @@ static boolean assign_section_numbers PARAMS ((bfd *));
static INLINE int sym_is_global PARAMS ((bfd *, asymbol *));
static boolean elf_map_symbols PARAMS ((bfd *));
static bfd_size_type get_program_header_size PARAMS ((bfd *));
+static boolean elfcore_read_notes PARAMS ((bfd *, bfd_vma, bfd_vma));
/* Swap version information in and out. The version information is
currently size independent. If that ever changes, this code will
@@ -199,12 +200,13 @@ _bfd_elf_swap_versym_out (abfd, src, dst)
}
/* Standard ELF hash function. Do not change this function; you will
- cause invalid hash tables to be generated. (Well, you would if this
- were being used yet.) */
+ cause invalid hash tables to be generated. */
+
unsigned long
-bfd_elf_hash (name)
- CONST unsigned char *name;
+bfd_elf_hash (namearg)
+ const char *namearg;
{
+ const unsigned char *name = (const unsigned char *) namearg;
unsigned long h = 0;
unsigned long g;
int ch;
@@ -215,7 +217,9 @@ bfd_elf_hash (name)
if ((g = (h & 0xf0000000)) != 0)
{
h ^= g >> 24;
- h &= ~g;
+ /* The ELF ABI says `h &= ~g', but this is equivalent in
+ this case and on some machines one insn instead of two. */
+ h ^= g;
}
}
return h;
@@ -262,6 +266,14 @@ bfd_elf_mkobject (abfd)
return true;
}
+boolean
+bfd_elf_mkcorefile (abfd)
+ bfd * abfd;
+{
+ /* 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;
@@ -308,7 +320,7 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex)
if (strindex >= hdr->sh_size)
{
(*_bfd_error_handler)
- ("%s: invalid string offset %u >= %lu for section `%s'",
+ (_("%s: invalid string offset %u >= %lu for section `%s'"),
bfd_get_filename (abfd), strindex, (unsigned long) hdr->sh_size,
((shindex == elf_elfheader(abfd)->e_shstrndx
&& strindex == hdr->sh_name)
@@ -391,22 +403,33 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
Elf_Internal_Phdr *phdr;
unsigned int i;
- /* Look through the phdrs to see if we need to adjust the lma. */
+ /* Look through the phdrs to see if we need to adjust the lma.
+ If all the p_paddr fields are zero, we ignore them, since
+ some ELF linkers produce such output. */
phdr = elf_tdata (abfd)->phdr;
for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++)
{
- if (phdr->p_type == PT_LOAD
- && phdr->p_paddr != 0
- && phdr->p_vaddr != phdr->p_paddr
- && phdr->p_vaddr <= hdr->sh_addr
- && phdr->p_vaddr + phdr->p_memsz >= hdr->sh_addr + hdr->sh_size
- && ((flags & SEC_LOAD) == 0
- || (phdr->p_offset <= (bfd_vma) hdr->sh_offset
- && (phdr->p_offset + phdr->p_filesz
- >= hdr->sh_offset + hdr->sh_size))))
+ if (phdr->p_paddr != 0)
+ break;
+ }
+ if (i < elf_elfheader (abfd)->e_phnum)
+ {
+ phdr = elf_tdata (abfd)->phdr;
+ for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++)
{
- newsect->lma += phdr->p_paddr - phdr->p_vaddr;
- break;
+ if (phdr->p_type == PT_LOAD
+ && phdr->p_vaddr != phdr->p_paddr
+ && phdr->p_vaddr <= hdr->sh_addr
+ && (phdr->p_vaddr + phdr->p_memsz
+ >= hdr->sh_addr + hdr->sh_size)
+ && ((flags & SEC_LOAD) == 0
+ || (phdr->p_offset <= (bfd_vma) hdr->sh_offset
+ && (phdr->p_offset + phdr->p_filesz
+ >= hdr->sh_offset + hdr->sh_size))))
+ {
+ newsect->lma += phdr->p_paddr - phdr->p_vaddr;
+ break;
+ }
}
}
}
@@ -445,7 +468,8 @@ bfd_elf_find_section (abfd, name)
i_shdrp = elf_elfsections (abfd);
if (i_shdrp != NULL)
{
- shstrtab = bfd_elf_get_str_section (abfd, elf_elfheader (abfd)->e_shstrndx);
+ shstrtab = bfd_elf_get_str_section
+ (abfd, elf_elfheader (abfd)->e_shstrndx);
if (shstrtab != NULL)
{
max = elf_elfheader (abfd)->e_shnum;
@@ -482,13 +506,13 @@ bfd_elf_generic_reloc (abfd,
input_section,
output_bfd,
error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -519,7 +543,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
{
unsigned int i, c;
- fprintf (f, "\nProgram Header:\n");
+ fprintf (f, _("\nProgram Header:\n"));
c = elf_elfheader (abfd)->e_phnum;
for (i = 0; i < c; i++, p++)
{
@@ -567,7 +591,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
size_t extdynsize;
void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
- fprintf (f, "\nDynamic Section:\n");
+ fprintf (f, _("\nDynamic Section:\n"));
dynbuf = (bfd_byte *) bfd_malloc (s->_raw_size);
if (dynbuf == NULL)
@@ -669,7 +693,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
{
Elf_Internal_Verdef *t;
- fprintf (f, "\nVersion definitions:\n");
+ fprintf (f, _("\nVersion definitions:\n"));
for (t = elf_tdata (abfd)->verdef; t != NULL; t = t->vd_nextdef)
{
fprintf (f, "%d 0x%2.2x 0x%8.8lx %s\n", t->vd_ndx,
@@ -692,12 +716,12 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
{
Elf_Internal_Verneed *t;
- fprintf (f, "\nVersion References:\n");
+ fprintf (f, _("\nVersion References:\n"));
for (t = elf_tdata (abfd)->verref; t != NULL; t = t->vn_nextref)
{
Elf_Internal_Vernaux *a;
- fprintf (f, " required from %s:\n", t->vn_filename);
+ fprintf (f, _(" required from %s:\n"), t->vn_filename);
for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
fprintf (f, " 0x%8.8lx 0x%2.2x %2.2d %s\n", a->vna_hash,
a->vna_flags, a->vna_other, a->vna_nodename);
@@ -735,8 +759,22 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
case bfd_print_symbol_all:
{
CONST char *section_name;
+ CONST char *name = NULL;
+ struct elf_backend_data *bed;
+ unsigned char st_other;
+
section_name = symbol->section ? symbol->section->name : "(*none*)";
- bfd_print_symbol_vandf ((PTR) file, symbol);
+
+ bed = get_elf_backend_data (abfd);
+ if (bed->elf_backend_print_symbol_all)
+ name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol);
+
+ if (name == NULL)
+ {
+ name = symbol->name;
+ bfd_print_symbol_vandf ((PTR) file, symbol);
+ }
+
fprintf (file, " %s\t", section_name);
/* Print the "other" value for a symbol. For common symbols,
we've already printed the size; now print the alignment.
@@ -799,12 +837,21 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
}
/* If the st_other field is not zero, print it. */
- if (((elf_symbol_type *) symbol)->internal_elf_sym.st_other != 0)
- fprintf (file, " 0x%02x",
- ((unsigned int)
- ((elf_symbol_type *) symbol)->internal_elf_sym.st_other));
+ st_other = ((elf_symbol_type *) symbol)->internal_elf_sym.st_other;
+
+ switch (st_other)
+ {
+ case 0: break;
+ case STV_INTERNAL: fprintf (file, " .internal"); break;
+ case STV_HIDDEN: fprintf (file, " .hidden"); break;
+ case STV_PROTECTED: fprintf (file, " .protected"); break;
+ default:
+ /* Some other non-defined flags are also present, so print
+ everything hex. */
+ fprintf (file, " 0x%02x", (unsigned int) st_other);
+ }
- fprintf (file, " %s", symbol->name);
+ fprintf (file, " %s", name);
}
break;
}
@@ -840,10 +887,13 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
ret->dynindx = -1;
ret->dynstr_index = 0;
ret->weakdef = NULL;
- ret->got_offset = (bfd_vma) -1;
- ret->plt_offset = (bfd_vma) -1;
+ ret->got.offset = (bfd_vma) -1;
+ ret->plt.offset = (bfd_vma) -1;
ret->linker_section_pointer = (elf_linker_section_pointers_t *)0;
ret->verinfo.verdef = NULL;
+ ret->vtable_entries_used = NULL;
+ ret->vtable_entries_size = 0;
+ ret->vtable_parent = NULL;
ret->type = STT_NOTYPE;
ret->other = 0;
/* Assume that we have been called by a non-ELF symbol reader.
@@ -856,6 +906,58 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
return (struct bfd_hash_entry *) ret;
}
+/* Copy data from an indirect symbol to its direct symbol, hiding the
+ old indirect symbol. */
+
+void
+_bfd_elf_link_hash_copy_indirect (dir, ind)
+ struct elf_link_hash_entry *dir, *ind;
+{
+ /* Copy down any references that we may have already seen to the
+ symbol which just became indirect. */
+
+ dir->elf_link_hash_flags |=
+ (ind->elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_NON_GOT_REF));
+
+ /* Copy over the global and procedure linkage table offset entries.
+ These may have been already set up by a check_relocs routine. */
+ if (dir->got.offset == (bfd_vma) -1)
+ {
+ dir->got.offset = ind->got.offset;
+ ind->got.offset = (bfd_vma) -1;
+ }
+ BFD_ASSERT (ind->got.offset == (bfd_vma) -1);
+
+ if (dir->plt.offset == (bfd_vma) -1)
+ {
+ dir->plt.offset = ind->plt.offset;
+ ind->plt.offset = (bfd_vma) -1;
+ }
+ BFD_ASSERT (ind->plt.offset == (bfd_vma) -1);
+
+ if (dir->dynindx == -1)
+ {
+ dir->dynindx = ind->dynindx;
+ dir->dynstr_index = ind->dynstr_index;
+ ind->dynindx = -1;
+ ind->dynstr_index = 0;
+ }
+ BFD_ASSERT (ind->dynindx == -1);
+}
+
+void
+_bfd_elf_link_hash_hide_symbol(h)
+ struct elf_link_hash_entry *h;
+{
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->dynindx = -1;
+ h->plt.offset = (bfd_vma) -1;
+}
+
/* Initialize an ELF linker hash table. */
boolean
@@ -916,11 +1018,11 @@ bfd_elf_set_dt_needed_name (abfd, name)
}
/* Get the list of DT_NEEDED entries for a link. This is a hook for
- the ELF emulation code. */
+ the linker ELF emulation code. */
struct bfd_link_needed_list *
bfd_elf_get_needed_list (abfd, info)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
if (info->hash->creator->flavour != bfd_target_elf_flavour)
@@ -1177,6 +1279,15 @@ bfd_section_from_shdr (abfd, shindex)
asection *target_sect;
Elf_Internal_Shdr *hdr2;
+ /* Check for a bogus link to avoid crashing. */
+ if (hdr->sh_link >= ehdr->e_shnum)
+ {
+ ((*_bfd_error_handler)
+ (_("%s: invalid link %lu for reloc section %s (index %u)"),
+ bfd_get_filename (abfd), hdr->sh_link, name, shindex));
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ }
+
/* For some incomprehensible reason Oracle distributes
libraries for Solaris in which some of the objects have
bogus sh_link fields. It would be nice if we could just
@@ -1241,6 +1352,11 @@ bfd_section_from_shdr (abfd, shindex)
target_sect->flags |= SEC_RELOC;
target_sect->relocation = NULL;
target_sect->rel_filepos = hdr->sh_offset;
+ /* In the section to which the relocations apply, mark whether
+ its relocations are of the REL or RELA variety. */
+ if (hdr->sh_size != 0)
+ elf_section_data (target_sect)->use_rela_p
+ = (hdr->sh_type == SHT_RELA);
abfd->flags |= HAS_RELOC;
return true;
}
@@ -1300,11 +1416,15 @@ _bfd_elf_new_section_hook (abfd, sec)
{
struct bfd_elf_section_data *sdata;
- sdata = (struct bfd_elf_section_data *) bfd_alloc (abfd, sizeof (*sdata));
+ sdata = (struct bfd_elf_section_data *) bfd_zalloc (abfd, sizeof (*sdata));
if (!sdata)
return false;
sec->used_by_bfd = (PTR) sdata;
- memset (sdata, 0, sizeof (*sdata));
+
+ /* Indicate whether or not this section should use RELA relocations. */
+ sdata->use_rela_p
+ = get_elf_backend_data (abfd)->default_use_rela_p;
+
return true;
}
@@ -1331,20 +1451,21 @@ _bfd_elf_new_section_hook (abfd, sec)
*/
boolean
-bfd_section_from_phdr (abfd, hdr, index)
+_bfd_elf_make_section_from_phdr (abfd, hdr, index, typename)
bfd *abfd;
Elf_Internal_Phdr *hdr;
int index;
+ const char *typename;
{
asection *newsect;
char *name;
char namebuf[64];
int split;
- split = ((hdr->p_memsz > 0) &&
- (hdr->p_filesz > 0) &&
- (hdr->p_memsz > hdr->p_filesz));
- sprintf (namebuf, split ? "segment%da" : "segment%d", index);
+ split = ((hdr->p_memsz > 0)
+ && (hdr->p_filesz > 0)
+ && (hdr->p_memsz > hdr->p_filesz));
+ sprintf (namebuf, "%s%d%s", typename, index, split ? "a" : "");
name = bfd_alloc (abfd, strlen (namebuf) + 1);
if (!name)
return false;
@@ -1375,7 +1496,7 @@ bfd_section_from_phdr (abfd, hdr, index)
if (split)
{
- sprintf (namebuf, "segment%db", index);
+ sprintf (namebuf, "%s%db", typename, index);
name = bfd_alloc (abfd, strlen (namebuf) + 1);
if (!name)
return false;
@@ -1399,6 +1520,89 @@ bfd_section_from_phdr (abfd, hdr, index)
return true;
}
+boolean
+bfd_section_from_phdr (abfd, hdr, index)
+ bfd *abfd;
+ Elf_Internal_Phdr *hdr;
+ int index;
+{
+ struct elf_backend_data *bed;
+
+ switch (hdr->p_type)
+ {
+ case PT_NULL:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "null");
+
+ case PT_LOAD:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "load");
+
+ case PT_DYNAMIC:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "dynamic");
+
+ case PT_INTERP:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "interp");
+
+ case PT_NOTE:
+ if (! _bfd_elf_make_section_from_phdr (abfd, hdr, index, "note"))
+ return false;
+ if (! elfcore_read_notes (abfd, hdr->p_offset, hdr->p_filesz))
+ return false;
+ return true;
+
+ case PT_SHLIB:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "shlib");
+
+ case PT_PHDR:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "phdr");
+
+ default:
+ /* Check for any processor-specific program segment types.
+ 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);
+ else
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "segment");
+ }
+}
+
+/* Initialize REL_HDR, the section-header for new section, containing
+ relocations against ASECT. If USE_RELA_P is true, we use RELA
+ relocations; otherwise, we use REL relocations. */
+
+boolean
+_bfd_elf_init_reloc_shdr (abfd, rel_hdr, asect, use_rela_p)
+ bfd *abfd;
+ Elf_Internal_Shdr *rel_hdr;
+ asection *asect;
+ boolean use_rela_p;
+{
+ char *name;
+ struct elf_backend_data *bed;
+
+ bed = get_elf_backend_data (abfd);
+ name = bfd_alloc (abfd, sizeof ".rela" + strlen (asect->name));
+ if (name == NULL)
+ return false;
+ sprintf (name, "%s%s", use_rela_p ? ".rela" : ".rel", asect->name);
+ rel_hdr->sh_name =
+ (unsigned int) _bfd_stringtab_add (elf_shstrtab (abfd), name,
+ true, false);
+ if (rel_hdr->sh_name == (unsigned int) -1)
+ return false;
+ rel_hdr->sh_type = use_rela_p ? SHT_RELA : SHT_REL;
+ rel_hdr->sh_entsize = (use_rela_p
+ ? bed->s->sizeof_rela
+ : bed->s->sizeof_rel);
+ rel_hdr->sh_addralign = bed->s->file_align;
+ rel_hdr->sh_flags = 0;
+ rel_hdr->sh_addr = 0;
+ rel_hdr->sh_size = 0;
+ rel_hdr->sh_offset = 0;
+
+ return true;
+}
+
/* Set up an ELF internal section header for a section. */
/*ARGSUSED*/
@@ -1454,7 +1658,7 @@ elf_fake_sections (abfd, asect, failedptrarg)
else if (strcmp (asect->name, ".hash") == 0)
{
this_hdr->sh_type = SHT_HASH;
- this_hdr->sh_entsize = bed->s->arch_size / 8;
+ this_hdr->sh_entsize = bed->s->sizeof_hash_entry;
}
else if (strcmp (asect->name, ".dynsym") == 0)
{
@@ -1467,13 +1671,13 @@ elf_fake_sections (abfd, asect, failedptrarg)
this_hdr->sh_entsize = bed->s->sizeof_dyn;
}
else if (strncmp (asect->name, ".rela", 5) == 0
- && get_elf_backend_data (abfd)->use_rela_p)
+ && get_elf_backend_data (abfd)->may_use_rela_p)
{
this_hdr->sh_type = SHT_RELA;
this_hdr->sh_entsize = bed->s->sizeof_rela;
}
else if (strncmp (asect->name, ".rel", 4) == 0
- && ! get_elf_backend_data (abfd)->use_rela_p)
+ && get_elf_backend_data (abfd)->may_use_rel_p)
{
this_hdr->sh_type = SHT_REL;
this_hdr->sh_entsize = bed->s->sizeof_rel;
@@ -1534,47 +1738,19 @@ elf_fake_sections (abfd, asect, failedptrarg)
this_hdr->sh_flags |= SHF_EXECINSTR;
/* Check for processor-specific section types. */
- {
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
-
- if (bed->elf_backend_fake_sections)
- (*bed->elf_backend_fake_sections) (abfd, this_hdr, asect);
- }
+ if (bed->elf_backend_fake_sections)
+ (*bed->elf_backend_fake_sections) (abfd, this_hdr, asect);
/* If the section has relocs, set up a section header for the
- SHT_REL[A] section. */
- if ((asect->flags & SEC_RELOC) != 0)
- {
- Elf_Internal_Shdr *rela_hdr;
- int use_rela_p = get_elf_backend_data (abfd)->use_rela_p;
- char *name;
-
- rela_hdr = &elf_section_data (asect)->rel_hdr;
- name = bfd_alloc (abfd, sizeof ".rela" + strlen (asect->name));
- if (name == NULL)
- {
- *failedptr = true;
- return;
- }
- sprintf (name, "%s%s", use_rela_p ? ".rela" : ".rel", asect->name);
- rela_hdr->sh_name =
- (unsigned int) _bfd_stringtab_add (elf_shstrtab (abfd), name,
- true, false);
- if (rela_hdr->sh_name == (unsigned int) -1)
- {
- *failedptr = true;
- return;
- }
- rela_hdr->sh_type = use_rela_p ? SHT_RELA : SHT_REL;
- rela_hdr->sh_entsize = (use_rela_p
- ? bed->s->sizeof_rela
- : bed->s->sizeof_rel);
- rela_hdr->sh_addralign = bed->s->file_align;
- rela_hdr->sh_flags = 0;
- rela_hdr->sh_addr = 0;
- rela_hdr->sh_size = 0;
- rela_hdr->sh_offset = 0;
- }
+ 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. */
+ if ((asect->flags & SEC_RELOC) != 0
+ && !_bfd_elf_init_reloc_shdr (abfd,
+ &elf_section_data (asect)->rel_hdr,
+ asect,
+ elf_section_data (asect)->use_rela_p))
+ *failedptr = true;
}
/* Assign all ELF section numbers. The dummy first section is handled here
@@ -1602,13 +1778,18 @@ assign_section_numbers (abfd)
d->rel_idx = 0;
else
d->rel_idx = section_number++;
+
+ if (d->rel_hdr2)
+ d->rel_idx2 = section_number++;
+ else
+ d->rel_idx2 = 0;
}
t->shstrtab_section = section_number++;
elf_elfheader (abfd)->e_shstrndx = t->shstrtab_section;
t->shstrtab_hdr.sh_size = _bfd_stringtab_size (elf_shstrtab (abfd));
- if (abfd->symcount > 0)
+ if (bfd_get_symcount (abfd) > 0)
{
t->symtab_section = section_number++;
t->strtab_section = section_number++;
@@ -1635,7 +1816,7 @@ assign_section_numbers (abfd)
elf_elfsections (abfd) = i_shdrp;
i_shdrp[t->shstrtab_section] = &t->shstrtab_hdr;
- if (abfd->symcount > 0)
+ if (bfd_get_symcount (abfd) > 0)
{
i_shdrp[t->symtab_section] = &t->symtab_hdr;
i_shdrp[t->strtab_section] = &t->strtab_hdr;
@@ -1650,6 +1831,8 @@ assign_section_numbers (abfd)
i_shdrp[d->this_idx] = &d->this_hdr;
if (d->rel_idx != 0)
i_shdrp[d->rel_idx] = &d->rel_hdr;
+ if (d->rel_idx2 != 0)
+ i_shdrp[d->rel_idx2] = d->rel_hdr2;
/* Fill in the sh_link and sh_info fields while we're at it. */
@@ -1661,6 +1844,11 @@ assign_section_numbers (abfd)
d->rel_hdr.sh_link = t->symtab_section;
d->rel_hdr.sh_info = d->this_idx;
}
+ if (d->rel_idx2 != 0)
+ {
+ d->rel_hdr2->sh_link = t->symtab_section;
+ d->rel_hdr2->sh_info = d->this_idx;
+ }
switch (d->this_hdr.sh_type)
{
@@ -1777,6 +1965,7 @@ elf_map_symbols (abfd)
int idx;
asection *asect;
asymbol **new_syms;
+ asymbol *sym;
#ifdef DEBUG
fprintf (stderr, "elf_map_symbols\n");
@@ -1799,19 +1988,36 @@ elf_map_symbols (abfd)
for (idx = 0; idx < symcount; idx++)
{
- if ((syms[idx]->flags & BSF_SECTION_SYM) != 0
- && (syms[idx]->value + syms[idx]->section->vma) == 0)
+ sym = syms[idx];
+
+ if ((sym->flags & BSF_SECTION_SYM) != 0
+ && sym->value == 0)
{
asection *sec;
- sec = syms[idx]->section;
+ sec = sym->section;
+
if (sec->owner != NULL)
{
if (sec->owner != abfd)
{
if (sec->output_offset != 0)
continue;
+
sec = sec->output_section;
+
+ /* Empty sections in the input files may have had a section
+ symbol created for them. (See the comment near the end of
+ _bfd_generic_link_output_symbols in linker.c). If the linker
+ script discards such sections then we will reach this point.
+ Since we know that we cannot avoid this case, we detect it
+ and skip the abort and the assignment to the sect_syms array.
+ To reproduce this particular case try running the linker
+ testsuite test ld-scripts/weak.exp for an ELF port that uses
+ the generic linker. */
+ if (sec->owner == NULL)
+ continue;
+
BFD_ASSERT (sec->owner == abfd);
}
sect_syms[sec->index] = syms[idx];
@@ -1821,8 +2027,6 @@ elf_map_symbols (abfd)
for (asect = abfd->sections; asect; asect = asect->next)
{
- asymbol *sym;
-
if (sect_syms[asect->index] != NULL)
continue;
@@ -1839,7 +2043,7 @@ elf_map_symbols (abfd)
num_sections++;
#ifdef DEBUG
fprintf (stderr,
- "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n",
+ _("creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"),
asect->name, (long) asect->vma, asect->index, (long) asect);
#endif
}
@@ -1971,6 +2175,10 @@ _bfd_elf_compute_section_file_positions (abfd, link_info)
if (! prep_headers (abfd))
return false;
+ /* Post process the headers if necessary. */
+ if (bed->elf_backend_post_process_headers)
+ (*bed->elf_backend_post_process_headers) (abfd, link_info);
+
failed = false;
bfd_map_over_sections (abfd, elf_fake_sections, &failed);
if (failed)
@@ -1980,9 +2188,12 @@ _bfd_elf_compute_section_file_positions (abfd, link_info)
return false;
/* The backend linker builds symbol table information itself. */
- if (link_info == NULL && abfd->symcount > 0)
+ if (link_info == NULL && bfd_get_symcount (abfd) > 0)
{
- if (! swap_out_syms (abfd, &strtab))
+ /* Non-zero if doing a relocatable link. */
+ int relocatable_p = ! (abfd->flags & (EXEC_P | DYNAMIC));
+
+ if (! swap_out_syms (abfd, &strtab, relocatable_p))
return false;
}
@@ -2001,7 +2212,7 @@ _bfd_elf_compute_section_file_positions (abfd, link_info)
if (!assign_file_positions_except_relocs (abfd))
return false;
- if (link_info == NULL && abfd->symcount > 0)
+ if (link_info == NULL && bfd_get_symcount (abfd) > 0)
{
file_ptr off;
Elf_Internal_Shdr *hdr;
@@ -2082,7 +2293,7 @@ map_sections_to_segments (abfd)
unsigned int phdr_index;
bfd_vma maxpagesize;
asection **hdrpp;
- boolean phdr_in_section = true;
+ boolean phdr_in_segment = true;
boolean writable;
asection *dynsec;
@@ -2175,8 +2386,9 @@ map_sections_to_segments (abfd)
if (phdr_size == 0)
phdr_size = get_elf_backend_data (abfd)->s->sizeof_phdr;
if ((abfd->flags & D_PAGED) == 0
+ || sections[0]->lma < phdr_size
|| sections[0]->lma % maxpagesize < phdr_size % maxpagesize)
- phdr_in_section = false;
+ phdr_in_segment = false;
}
for (i = 0, hdrpp = sections; i < count; i++, hdrpp++)
@@ -2254,7 +2466,7 @@ map_sections_to_segments (abfd)
/* We need a new program segment. We must create a new program
header holding all the sections from phdr_index until hdr. */
- m = make_mapping (abfd, sections, phdr_index, i, phdr_in_section);
+ m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
if (m == NULL)
goto error_return;
@@ -2268,13 +2480,13 @@ map_sections_to_segments (abfd)
last_hdr = hdr;
phdr_index = i;
- phdr_in_section = false;
+ phdr_in_segment = false;
}
/* Create a final PT_LOAD program segment. */
if (last_hdr != NULL)
{
- m = make_mapping (abfd, sections, phdr_index, i, phdr_in_section);
+ m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
if (m == NULL)
goto error_return;
@@ -2334,7 +2546,7 @@ map_sections_to_segments (abfd)
return false;
}
-/* Sort sections by VMA. */
+/* Sort sections by address. */
static int
elf_sort_sections (arg1, arg2)
@@ -2344,16 +2556,18 @@ elf_sort_sections (arg1, arg2)
const asection *sec1 = *(const asection **) arg1;
const asection *sec2 = *(const asection **) arg2;
- if (sec1->vma < sec2->vma)
+ /* Sort by LMA first, since this is the address used to
+ place the section into a segment. */
+ if (sec1->lma < sec2->lma)
return -1;
- else if (sec1->vma > sec2->vma)
+ else if (sec1->lma > sec2->lma)
return 1;
- /* Sort by LMA. Normally the LMA and the VMA will be the same, and
- this will do nothing. */
- if (sec1->lma < sec2->lma)
+ /* Then sort by VMA. Normally the LMA and the VMA will be
+ the same, and this will do nothing. */
+ if (sec1->vma < sec2->vma)
return -1;
- else if (sec1->lma > sec2->lma)
+ else if (sec1->vma > sec2->vma)
return 1;
/* Put !SEC_LOAD sections after SEC_LOAD ones. */
@@ -2364,7 +2578,7 @@ elf_sort_sections (arg1, arg2)
{
if (TOEND (sec2))
return sec1->target_index - sec2->target_index;
- else
+ else
return 1;
}
@@ -2432,7 +2646,7 @@ assign_file_positions_for_segments (abfd)
if (alloc != 0 && count > alloc)
{
((*_bfd_error_handler)
- ("%s: Not enough room for program headers (allocated %u, need %u)",
+ (_("%s: Not enough room for program headers (allocated %u, need %u)"),
bfd_get_filename (abfd), alloc, count));
bfd_set_error (bfd_error_bad_value);
return false;
@@ -2453,6 +2667,7 @@ assign_file_positions_for_segments (abfd)
filehdr_paddr = 0;
phdrs_vaddr = 0;
phdrs_paddr = 0;
+
for (m = elf_tdata (abfd)->segment_map, p = phdrs;
m != NULL;
m = m->next, p++)
@@ -2467,11 +2682,7 @@ assign_file_positions_for_segments (abfd)
elf_sort_sections);
p->p_type = m->p_type;
-
- if (m->p_flags_valid)
- p->p_flags = m->p_flags;
- else
- p->p_flags = 0;
+ p->p_flags = m->p_flags;
if (p->p_type == PT_LOAD
&& m->count > 0
@@ -2480,8 +2691,21 @@ assign_file_positions_for_segments (abfd)
if ((abfd->flags & D_PAGED) != 0)
off += (m->sections[0]->vma - off) % bed->maxpagesize;
else
- off += ((m->sections[0]->vma - off)
- % (1 << bfd_get_section_alignment (abfd, m->sections[0])));
+ {
+ bfd_size_type align;
+
+ align = 0;
+ for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
+ {
+ bfd_size_type secalign;
+
+ secalign = bfd_get_section_alignment (abfd, *secpp);
+ if (secalign > align)
+ align = secalign;
+ }
+
+ off += (m->sections[0]->vma - off) % (1 << align);
+ }
}
if (m->count == 0)
@@ -2521,12 +2745,12 @@ assign_file_positions_for_segments (abfd)
if (p->p_vaddr < (bfd_vma) off)
{
- _bfd_error_handler ("%s: Not enough room for program headers, try linking with -N",
+ _bfd_error_handler (_("%s: Not enough room for program headers, try linking with -N"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
-
+
p->p_vaddr -= off;
if (! m->p_paddr_valid)
p->p_paddr -= off;
@@ -2542,6 +2766,7 @@ assign_file_positions_for_segments (abfd)
{
if (! m->p_flags_valid)
p->p_flags |= PF_R;
+
if (m->includes_filehdr)
{
if (p->p_type == PT_LOAD)
@@ -2553,6 +2778,7 @@ assign_file_positions_for_segments (abfd)
else
{
p->p_offset = bed->s->sizeof_ehdr;
+
if (m->count > 0)
{
BFD_ASSERT (p->p_type == PT_LOAD);
@@ -2560,17 +2786,22 @@ assign_file_positions_for_segments (abfd)
if (! m->p_paddr_valid)
p->p_paddr -= off - p->p_offset;
}
+
if (p->p_type == PT_LOAD)
{
phdrs_vaddr = p->p_vaddr;
phdrs_paddr = p->p_paddr;
}
+ else
+ phdrs_vaddr = bed->maxpagesize + bed->s->sizeof_ehdr;
}
+
p->p_filesz += alloc * bed->s->sizeof_phdr;
p->p_memsz += alloc * bed->s->sizeof_phdr;
}
- if (p->p_type == PT_LOAD)
+ if (p->p_type == PT_LOAD
+ || (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core))
{
if (! m->includes_filehdr && ! m->includes_phdrs)
p->p_offset = off;
@@ -2585,6 +2816,7 @@ assign_file_positions_for_segments (abfd)
}
voff = off;
+
for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
{
asection *sec;
@@ -2595,12 +2827,30 @@ assign_file_positions_for_segments (abfd)
flags = sec->flags;
align = 1 << bfd_get_section_alignment (abfd, sec);
+ /* The section may have artificial alignment forced by a
+ link script. Notice this case by the gap between the
+ cumulative phdr vma and the section's vma. */
+ if (p->p_vaddr + p->p_memsz < sec->vma)
+ {
+ bfd_vma adjust = sec->vma - (p->p_vaddr + p->p_memsz);
+
+ p->p_memsz += adjust;
+ off += adjust;
+ voff += adjust;
+ if ((flags & SEC_LOAD) != 0)
+ p->p_filesz += adjust;
+ }
+
if (p->p_type == PT_LOAD)
{
- bfd_vma adjust;
+ bfd_signed_vma adjust;
if ((flags & SEC_LOAD) != 0)
- adjust = sec->lma - (p->p_paddr + p->p_memsz);
+ {
+ adjust = sec->lma - (p->p_paddr + p->p_memsz);
+ if (adjust < 0)
+ adjust = 0;
+ }
else if ((flags & SEC_ALLOC) != 0)
{
/* The section VMA must equal the file position
@@ -2619,7 +2869,16 @@ assign_file_positions_for_segments (abfd)
if (adjust != 0)
{
if (i == 0)
- abort ();
+ {
+ (* _bfd_error_handler)
+ (_("Error: First section in segment (%s) starts at 0x%x"),
+ bfd_section_name (abfd, sec), sec->lma);
+ (* _bfd_error_handler)
+ (_(" whereas segment starts at 0x%x"),
+ p->p_paddr);
+
+ return false;
+ }
p->p_memsz += adjust;
off += adjust;
voff += adjust;
@@ -2636,17 +2895,40 @@ assign_file_positions_for_segments (abfd)
if ((flags & SEC_LOAD) != 0
|| (flags & SEC_HAS_CONTENTS) != 0)
off += sec->_raw_size;
+
if ((flags & SEC_ALLOC) != 0)
voff += sec->_raw_size;
}
- p->p_memsz += sec->_raw_size;
+ if (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core)
+ {
+ if (i == 0) /* the actual "note" segment */
+ { /* this one actually contains everything. */
+ sec->filepos = off;
+ p->p_filesz = sec->_raw_size;
+ off += sec->_raw_size;
+ voff = off;
+ }
+ else /* fake sections -- don't need to be written */
+ {
+ sec->filepos = 0;
+ sec->_raw_size = 0;
+ flags = sec->flags = 0; /* no contents */
+ }
+ p->p_memsz = 0;
+ p->p_align = 1;
+ }
+ else
+ {
+ p->p_memsz += sec->_raw_size;
- if ((flags & SEC_LOAD) != 0)
- p->p_filesz += sec->_raw_size;
+ if ((flags & SEC_LOAD) != 0)
+ p->p_filesz += sec->_raw_size;
- if (align > p->p_align)
- p->p_align = align;
+ if (align > p->p_align
+ && (p->p_type != PT_LOAD || (abfd->flags & D_PAGED) == 0))
+ p->p_align = align;
+ }
if (! m->p_flags_valid)
{
@@ -2806,7 +3088,8 @@ assign_file_positions_except_relocs (abfd)
file_ptr off;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
- if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
+ if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0
+ && bfd_get_format (abfd) != bfd_core)
{
Elf_Internal_Shdr **hdrpp;
unsigned int i;
@@ -2833,7 +3116,7 @@ assign_file_positions_except_relocs (abfd)
hdr->sh_offset = -1;
continue;
}
-
+
off = _bfd_elf_assign_file_position_for_section (hdr, off, true);
}
}
@@ -2861,7 +3144,7 @@ assign_file_positions_except_relocs (abfd)
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
{
((*_bfd_error_handler)
- ("%s: warning: allocated section `%s' not in segment",
+ (_("%s: warning: allocated section `%s' not in segment"),
bfd_get_filename (abfd),
(hdr->bfd_section == NULL
? "*unknown*"
@@ -2880,7 +3163,7 @@ assign_file_positions_except_relocs (abfd)
hdr->sh_offset = -1;
else
off = _bfd_elf_assign_file_position_for_section (hdr, off, true);
- }
+ }
}
/* Place the section headers. */
@@ -2898,7 +3181,7 @@ prep_headers (abfd)
bfd *abfd;
{
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
- Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
+ Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */
int count;
struct bfd_strtab_hash *shstrtab;
@@ -2923,6 +3206,9 @@ prep_headers (abfd)
bfd_big_endian (abfd) ? ELFDATA2MSB : ELFDATA2LSB;
i_ehdrp->e_ident[EI_VERSION] = bed->s->ev_current;
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_SYSV;
+ i_ehdrp->e_ident[EI_ABIVERSION] = 0;
+
for (count = EI_PAD; count < EI_NIDENT; count++)
i_ehdrp->e_ident[count] = 0;
@@ -2930,6 +3216,8 @@ prep_headers (abfd)
i_ehdrp->e_type = ET_DYN;
else if ((abfd->flags & EXEC_P) != 0)
i_ehdrp->e_type = ET_EXEC;
+ else if (bfd_get_format (abfd) == bfd_core)
+ i_ehdrp->e_type = ET_CORE;
else
i_ehdrp->e_type = ET_REL;
@@ -2940,10 +3228,13 @@ prep_headers (abfd)
break;
case bfd_arch_sparc:
if (bed->s->arch_size == 64)
- i_ehdrp->e_machine = EM_SPARC64;
+ i_ehdrp->e_machine = EM_SPARCV9;
else
i_ehdrp->e_machine = EM_SPARC;
break;
+ case bfd_arch_i370:
+ i_ehdrp->e_machine = EM_S370;
+ break;
case bfd_arch_i386:
i_ehdrp->e_machine = EM_386;
break;
@@ -2956,6 +3247,9 @@ prep_headers (abfd)
case bfd_arch_i860:
i_ehdrp->e_machine = EM_860;
break;
+ case bfd_arch_i960:
+ i_ehdrp->e_machine = EM_960;
+ break;
case bfd_arch_mips: /* MIPS Rxxxx */
i_ehdrp->e_machine = EM_MIPS; /* only MIPS R3000 */
break;
@@ -2974,6 +3268,18 @@ prep_headers (abfd)
case bfd_arch_d10v:
i_ehdrp->e_machine = EM_CYGNUS_D10V;
break;
+ case bfd_arch_d30v:
+ i_ehdrp->e_machine = EM_CYGNUS_D30V;
+ break;
+ case bfd_arch_fr30:
+ i_ehdrp->e_machine = EM_CYGNUS_FR30;
+ break;
+ case bfd_arch_mcore:
+ i_ehdrp->e_machine = EM_MCORE;
+ break;
+ case bfd_arch_avr:
+ i_ehdrp->e_machine = EM_AVR;
+ break;
case bfd_arch_v850:
switch (bfd_get_mach (abfd))
{
@@ -2984,6 +3290,9 @@ prep_headers (abfd)
case bfd_arch_arc:
i_ehdrp->e_machine = EM_CYGNUS_ARC;
break;
+ case bfd_arch_arm:
+ i_ehdrp->e_machine = EM_ARM;
+ break;
case bfd_arch_m32r:
i_ehdrp->e_machine = EM_CYGNUS_M32R;
break;
@@ -2993,6 +3302,9 @@ prep_headers (abfd)
case bfd_arch_mn10300:
i_ehdrp->e_machine = EM_CYGNUS_MN10300;
break;
+ case bfd_arch_pj:
+ i_ehdrp->e_machine = EM_PJ;
+ break;
/* also note that EM_M32, AT&T WE32100 is unknown to bfd */
default:
i_ehdrp->e_machine = EM_NONE;
@@ -3083,8 +3395,8 @@ _bfd_elf_write_object_contents (abfd)
unsigned int count;
if (! abfd->output_has_begun
- && ! _bfd_elf_compute_section_file_positions (abfd,
- (struct bfd_link_info *) NULL))
+ && ! _bfd_elf_compute_section_file_positions
+ (abfd, (struct bfd_link_info *) NULL))
return false;
i_shdrp = elf_elfsections (abfd);
@@ -3094,6 +3406,7 @@ _bfd_elf_write_object_contents (abfd)
bfd_map_over_sections (abfd, bed->s->write_relocs, &failed);
if (failed)
return false;
+
_bfd_elf_assign_file_positions_for_relocs (abfd);
/* After writing the headers, we need to write the sections too... */
@@ -3123,6 +3436,13 @@ _bfd_elf_write_object_contents (abfd)
return bed->s->write_shdrs_and_ehdr (abfd);
}
+boolean
+_bfd_elf_write_corefile_contents (abfd)
+ bfd *abfd;
+{
+ /* 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... */
int
_bfd_elf_section_from_bfd_section (abfd, asect)
@@ -3163,6 +3483,8 @@ _bfd_elf_section_from_bfd_section (abfd, asect)
if (bfd_is_und_section (asect))
return SHN_UNDEF;
+ bfd_set_error (bfd_error_nonrepresentable_section);
+
return -1;
}
@@ -3204,7 +3526,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
/* This case can occur when using --strip-symbol on a symbol
which is used in a relocation entry. */
(*_bfd_error_handler)
- ("%s: symbol `%s' required but not present",
+ (_("%s: symbol `%s' required but not present"),
bfd_get_filename (abfd), bfd_asymbol_name (asym_ptr));
bfd_set_error (bfd_error_no_symbols);
return -1;
@@ -3213,7 +3535,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
#if DEBUG & 4
{
fprintf (stderr,
- "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n",
+ _("elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"),
(long) asym_ptr, asym_ptr->name, idx, flags,
elf_symbol_flags (flags));
fflush (stderr);
@@ -3235,7 +3557,9 @@ copy_private_bfd_data (ibfd, obfd)
struct elf_segment_map **pm;
struct elf_segment_map *m;
Elf_Internal_Phdr *p;
- unsigned int i, c;
+ unsigned int i;
+ unsigned int num_segments;
+ boolean phdr_included = false;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -3249,32 +3573,68 @@ copy_private_bfd_data (ibfd, obfd)
mfirst = NULL;
pm = &mfirst;
- c = elf_elfheader (ibfd)->e_phnum;
- for (i = 0, p = elf_tdata (ibfd)->phdr; i < c; i++, p++)
+ 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 \
+ <= 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 \
+ <= p->p_offset + p->p_filesz))
+
+ /* 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++)
{
unsigned int csecs;
asection *s;
+ asection **sections;
+ asection *os;
unsigned int isec;
-
+ bfd_vma matching_lma;
+ bfd_vma suggested_lma;
+ unsigned int j;
+
+ /* 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;
-
- /* 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. */
for (s = ibfd->sections; s != NULL; s = s->next)
- if (((s->vma >= p->p_vaddr
- && (s->vma + s->_raw_size <= p->p_vaddr + p->p_memsz
- || s->vma + s->_raw_size <= p->p_vaddr + p->p_filesz))
- || (p->p_vaddr == 0
- && p->p_filesz > 0
- && (s->flags & SEC_HAS_CONTENTS) != 0
- && (bfd_vma) s->filepos >= p->p_offset
- && ((bfd_vma) s->filepos + s->_raw_size
- <= p->p_offset + p->p_filesz)))
- && (s->flags & SEC_ALLOC) != 0
- && s->output_section != NULL)
- ++csecs;
+ 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;
+ }
+ /* Allocate a segment map big enough to contain all of the
+ sections we have selected. */
m = ((struct elf_segment_map *)
bfd_alloc (obfd,
(sizeof (struct elf_segment_map)
@@ -3282,45 +3642,288 @@ copy_private_bfd_data (ibfd, obfd)
if (m == NULL)
return false;
- m->next = NULL;
- m->p_type = p->p_type;
- m->p_flags = p->p_flags;
+ /* 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 = p->p_paddr;
m->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);
- m->includes_phdrs = (p->p_offset <= (bfd_vma) iehdr->e_phoff
- && (p->p_offset + p->p_filesz
- >= ((bfd_vma) iehdr->e_phoff
- + iehdr->e_phnum * iehdr->e_phentsize)));
+ m->includes_phdrs = 0;
+
+ if (! phdr_included || p->p_type != PT_LOAD)
+ {
+ m->includes_phdrs =
+ (p->p_offset <= (bfd_vma) iehdr->e_phoff
+ && (p->p_offset + p->p_filesz
+ >= ((bfd_vma) iehdr->e_phoff
+ + iehdr->e_phnum * iehdr->e_phentsize)));
+ if (p->p_type == PT_LOAD && m->includes_phdrs)
+ phdr_included = true;
+ }
+
+ if (csecs == 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)
+ _bfd_error_handler
+ (_("%s: warning: Empty loadable segment detected\n"),
+ bfd_get_filename (ibfd));
+
+ m->count = 0;
+ *pm = m;
+ pm = &m->next;
+
+ continue;
+ }
+
+ /* Now scan the sections in the input BFD again and attempt
+ to add their corresponding output sections to the segment map.
+ The problem here is how to handle an output section which has
+ been moved (ie had its LMA changed). There are four possibilities:
+
+ 1. None of the sections have been moved.
+ In this case we can continue to use the segment LMA from the
+ input BFD.
+
+ 2. All of the sections have been moved by the same amount.
+ In this case we can change the segment's LMA to match the LMA
+ of the first section.
+
+ 3. Some of the sections have been moved, others have not.
+ In this case those sections which have not been moved can be
+ placed in the current segment which will have to have its size,
+ and possibly its LMA changed, and a new segment or segments will
+ have to be created to contain the other sections.
+
+ 4. The sections have been moved, but not be the same amount.
+ In this case we can change the segment's LMA to match the LMA
+ of the first section and we will have to create a new segment
+ or segments to contain the other sections.
+
+ In order to save time, we allocate an array to hold the section
+ 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);
+ if (sections == NULL)
+ return false;
+
+ /* Step One: Scan for segment vs section LMA conflicts.
+ Also add the sections to the section array allocated above.
+ Also add the sections to the current segment. In the common
+ 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;
- for (s = ibfd->sections; s != NULL; s = s->next)
+ matching_lma = 0;
+ suggested_lma = 0;
+
+ for (j = 0, s = ibfd->sections; s != NULL; s = s->next)
{
- if (((s->vma >= p->p_vaddr
- && (s->vma + s->_raw_size <= p->p_vaddr + p->p_memsz
- || s->vma + s->_raw_size <= p->p_vaddr + p->p_filesz))
- || (p->p_vaddr == 0
- && p->p_filesz > 0
- && (s->flags & SEC_HAS_CONTENTS) != 0
- && (bfd_vma) s->filepos >= p->p_offset
- && ((bfd_vma) s->filepos + s->_raw_size
- <= p->p_offset + p->p_filesz)))
- && (s->flags & SEC_ALLOC) != 0
- && s->output_section != NULL)
+ 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)
{
- m->sections[isec] = s->output_section;
- ++isec;
+ sections[j++] = s;
+
+ /* 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
+ && 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;
+
+ /* 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 (matching_lma == 0)
+ matching_lma = os->lma;
+
+ /* We assume that if the section fits within the segment
+ that it does not overlap any other section within that
+ segment. */
+ m->sections[isec++] = os;
+ }
+ else if (suggested_lma == 0)
+ suggested_lma = os->lma;
}
}
- BFD_ASSERT (isec == csecs);
- m->count = csecs;
- *pm = m;
- pm = &m->next;
+ BFD_ASSERT (j == csecs);
+
+ /* Step Two: Adjust the physical address of the current segment,
+ if necessary. */
+ if (isec == csecs)
+ {
+ /* 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;
+
+ free (sections);
+ continue;
+ }
+ else
+ {
+ if (matching_lma != 0)
+ {
+ /* 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;
+ }
+ 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;
+ }
+
+ /* 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;
+
+ if (m->includes_phdrs)
+ m->p_paddr -= iehdr->e_phnum * iehdr->e_phentsize;
+ }
+
+ /* Step Three: Loop over the sections again, this time assigning
+ those that fit to the current segment and remvoing them from the
+ sections array; but making sure not to leave large gaps. Once all
+ possible sections have been assigned to the current segment it is
+ added to the list of built segments and if sections still remain
+ to be assigned, a new segment is constructed before repeating
+ the loop. */
+ isec = 0;
+ do
+ {
+ m->count = 0;
+ suggested_lma = 0;
+
+ /* Fill the current segment with sections that fit. */
+ for (j = 0; j < csecs; j++)
+ {
+ s = sections[j];
+
+ if (s == NULL)
+ continue;
+
+ os = s->output_section;
+
+ if (IS_CONTAINED_BY (os->lma, os->_raw_size, m->p_paddr, p)
+ || IS_COREFILE_NOTE (p, s))
+ {
+ if (m->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)))
+ abort ();
+ }
+ else
+ {
+ asection * prev_sec;
+ bfd_vma maxpagesize;
+
+ prev_sec = m->sections[m->count - 1];
+ maxpagesize = get_elf_backend_data (obfd)->maxpagesize;
+
+ /* 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))
+ {
+ if (suggested_lma == 0)
+ suggested_lma = os->lma;
+
+ continue;
+ }
+ }
+
+ m->sections[m->count++] = os;
+ ++isec;
+ sections[j] = NULL;
+ }
+ else if (suggested_lma == 0)
+ suggested_lma = os->lma;
+ }
+
+ BFD_ASSERT (m->count > 0);
+
+ /* Add the current segment to the list of built segments. */
+ *pm = m;
+ pm = &m->next;
+
+ if (isec < csecs)
+ {
+ /* 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)
+ 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;
+ }
+ }
+ while (isec < csecs);
+
+ free (sections);
}
/* The Solaris linker creates program headers in which all the
@@ -3338,6 +3941,33 @@ copy_private_bfd_data (ibfd, obfd)
elf_tdata (obfd)->segment_map = mfirst;
+#if 0
+ /* Final Step: Sort the segments into ascending order of physical address. */
+ if (mfirst != NULL)
+ {
+ struct elf_segment_map* prev;
+
+ prev = mfirst;
+ for (m = mfirst->next; m != NULL; prev = m, m = m->next)
+ {
+ /* Yes I know - its a bubble sort....*/
+ if (m->next != NULL && (m->next->p_paddr < m->p_paddr))
+ {
+ /* swap m and m->next */
+ prev->next = m->next;
+ m->next = m->next->next;
+ prev->next->next = m;
+
+ /* restart loop. */
+ m = mfirst;
+ }
+ }
+ }
+#endif
+
+#undef IS_CONTAINED_BY
+#undef IS_SOLARIS_PT_INTERP
+#undef IS_COREFILE_NOTE
return true;
}
@@ -3392,6 +4022,9 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
|| ihdr->sh_type == SHT_GNU_verdef)
ohdr->sh_info = ihdr->sh_info;
+ elf_section_data (osec)->use_rela_p
+ = elf_section_data (isec)->use_rela_p;
+
return true;
}
@@ -3446,9 +4079,10 @@ _bfd_elf_copy_private_symbol_data (ibfd, isymarg, obfd, osymarg)
/* Swap out the symbols. */
static boolean
-swap_out_syms (abfd, sttp)
+swap_out_syms (abfd, sttp, relocatable_p)
bfd *abfd;
struct bfd_strtab_hash **sttp;
+ int relocatable_p;
{
struct elf_backend_data *bed = get_elf_backend_data (abfd);
@@ -3520,7 +4154,8 @@ swap_out_syms (abfd, sttp)
type_ptr = elf_symbol_from (abfd, syms[idx]);
- if (bfd_is_com_section (syms[idx]->section))
+ if ((flags & BSF_SECTION_SYM) == 0
+ && bfd_is_com_section (syms[idx]->section))
{
/* ELF common symbols put the alignment into the `value' field,
and the size into the `size' field. This is backwards from
@@ -3531,8 +4166,8 @@ swap_out_syms (abfd, sttp)
sym.st_value = value >= 16 ? 16 : (1 << bfd_log2 (value));
else
sym.st_value = type_ptr->internal_elf_sym.st_value;
- sym.st_shndx = _bfd_elf_section_from_bfd_section (abfd,
- syms[idx]->section);
+ sym.st_shndx = _bfd_elf_section_from_bfd_section
+ (abfd, syms[idx]->section);
}
else
{
@@ -3544,7 +4179,9 @@ swap_out_syms (abfd, sttp)
value += sec->output_offset;
sec = sec->output_section;
}
- value += sec->vma;
+ /* Don't add in the section vma for relocatable output. */
+ if (! relocatable_p)
+ value += sec->vma;
sym.st_value = value;
sym.st_size = type_ptr ? type_ptr->internal_elf_sym.st_size : 0;
@@ -3606,15 +4243,20 @@ swap_out_syms (abfd, sttp)
else
type = STT_NOTYPE;
- if (bfd_is_com_section (syms[idx]->section))
+ /* Processor-specific types */
+ if (type_ptr != NULL
+ && bed->elf_backend_get_symbol_type)
+ type = (*bed->elf_backend_get_symbol_type) (&type_ptr->internal_elf_sym, type);
+
+ if (flags & BSF_SECTION_SYM)
+ sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
+ else if (bfd_is_com_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
else if (bfd_is_und_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (((flags & BSF_WEAK)
? STB_WEAK
: STB_GLOBAL),
type);
- else if (flags & BSF_SECTION_SYM)
- sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
else if (flags & BSF_FILE)
sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FILE);
else
@@ -3697,7 +4339,7 @@ _bfd_elf_get_dynamic_symtab_upper_bound (abfd)
long
_bfd_elf_get_reloc_upper_bound (abfd, asect)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr asect;
{
return (asect->reloc_count + 1) * sizeof (arelent *);
@@ -3735,7 +4377,8 @@ _bfd_elf_get_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
- long symcount = get_elf_backend_data (abfd)->s->slurp_symbol_table (abfd, alocation, false);
+ long symcount = get_elf_backend_data (abfd)->s->slurp_symbol_table
+ (abfd, alocation, false);
if (symcount >= 0)
bfd_get_symcount (abfd) = symcount;
@@ -3747,7 +4390,8 @@ _bfd_elf_canonicalize_dynamic_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
- return get_elf_backend_data (abfd)->s->slurp_symbol_table (abfd, alocation, true);
+ return get_elf_backend_data (abfd)->s->slurp_symbol_table
+ (abfd, alocation, true);
}
/* Return the size required for the dynamic reloc entries. Any
@@ -4026,7 +4670,7 @@ _bfd_elf_make_empty_symbol (abfd)
void
_bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -4039,7 +4683,7 @@ _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
boolean
_bfd_elf_is_local_label_name (abfd, name)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
/* Normal local symbols start with ``.L''. */
@@ -4065,8 +4709,8 @@ _bfd_elf_is_local_label_name (abfd, name)
alent *
_bfd_elf_get_lineno (ignore_abfd, symbol)
- bfd *ignore_abfd;
- asymbol *symbol;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
+ asymbol *symbol ATTRIBUTE_UNUSED;
{
abort ();
return NULL;
@@ -4113,11 +4757,16 @@ _bfd_elf_find_nearest_line (abfd,
bfd_vma low_func;
asymbol **p;
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
filename_ptr, functionname_ptr,
line_ptr))
return true;
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr, 0))
+ return true;
+
if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
&found, filename_ptr,
functionname_ptr, line_ptr,
@@ -4149,6 +4798,7 @@ _bfd_elf_find_nearest_line (abfd,
case STT_FILE:
filename = bfd_asymbol_name (&q->symbol);
break;
+ case STT_NOTYPE:
case STT_FUNC:
if (q->symbol.section == section
&& q->symbol.value >= low_func
@@ -4194,8 +4844,8 @@ _bfd_elf_set_section_contents (abfd, section, location, offset, count)
Elf_Internal_Shdr *hdr;
if (! abfd->output_has_begun
- && ! _bfd_elf_compute_section_file_positions (abfd,
- (struct bfd_link_info *) NULL))
+ && ! _bfd_elf_compute_section_file_positions
+ (abfd, (struct bfd_link_info *) NULL))
return false;
hdr = &elf_section_data (section)->this_hdr;
@@ -4210,9 +4860,9 @@ _bfd_elf_set_section_contents (abfd, section, location, offset, count)
void
_bfd_elf_no_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *dst ATTRIBUTE_UNUSED;
{
abort ();
}
@@ -4237,11 +4887,11 @@ _bfd_elf_validate_reloc (abfd, areloc)
{
/* Check whether we really have an ELF howto. */
- if ((*areloc->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec)
+ if ((*areloc->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec)
{
bfd_reloc_code_real_type code;
reloc_howto_type *howto;
-
+
/* Alien reloc: Try to determine its type to replace it with an
equivalent ELF reloc. */
@@ -4250,22 +4900,22 @@ _bfd_elf_validate_reloc (abfd, areloc)
switch (areloc->howto->bitsize)
{
case 8:
- code = BFD_RELOC_8_PCREL;
+ code = BFD_RELOC_8_PCREL;
break;
case 12:
- code = BFD_RELOC_12_PCREL;
+ code = BFD_RELOC_12_PCREL;
break;
case 16:
- code = BFD_RELOC_16_PCREL;
+ code = BFD_RELOC_16_PCREL;
break;
case 24:
- code = BFD_RELOC_24_PCREL;
+ code = BFD_RELOC_24_PCREL;
break;
case 32:
- code = BFD_RELOC_32_PCREL;
+ code = BFD_RELOC_32_PCREL;
break;
case 64:
- code = BFD_RELOC_64_PCREL;
+ code = BFD_RELOC_64_PCREL;
break;
default:
goto fail;
@@ -4286,22 +4936,22 @@ _bfd_elf_validate_reloc (abfd, areloc)
switch (areloc->howto->bitsize)
{
case 8:
- code = BFD_RELOC_8;
+ code = BFD_RELOC_8;
break;
case 14:
- code = BFD_RELOC_14;
+ code = BFD_RELOC_14;
break;
case 16:
- code = BFD_RELOC_16;
+ code = BFD_RELOC_16;
break;
case 26:
- code = BFD_RELOC_26;
+ code = BFD_RELOC_26;
break;
case 32:
- code = BFD_RELOC_32;
+ code = BFD_RELOC_32;
break;
case 64:
- code = BFD_RELOC_64;
+ code = BFD_RELOC_64;
break;
default:
goto fail;
@@ -4320,7 +4970,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
fail:
(*_bfd_error_handler)
- ("%s: unsupported relocation type %s",
+ (_("%s: unsupported relocation type %s"),
bfd_get_filename (abfd), areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -4338,3 +4988,626 @@ _bfd_elf_close_and_cleanup (abfd)
return _bfd_generic_close_and_cleanup (abfd);
}
+
+/* For Rel targets, we encode meaningful data for BFD_RELOC_VTABLE_ENTRY
+ in the relocation's offset. Thus we cannot allow any sort of sanity
+ range-checking to interfere. There is nothing else to do in processing
+ this reloc. */
+
+bfd_reloc_status_type
+_bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *re ATTRIBUTE_UNUSED;
+ struct symbol_cache_entry *symbol ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *is ATTRIBUTE_UNUSED;
+ bfd *obfd ATTRIBUTE_UNUSED;
+ char **errmsg ATTRIBUTE_UNUSED;
+{
+ 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. */
+
+#ifdef HAVE_SYS_PROCFS_H
+# include <sys/procfs.h>
+#endif
+
+
+/* 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. */
+
+static int
+elfcore_make_pid (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. */
+
+static boolean
+elfcore_maybe_make_sect (abfd, name, sect)
+ bfd* abfd;
+ char* name;
+ asection* sect;
+{
+ asection* sect2;
+
+ if (bfd_get_section_by_name (abfd, name) != NULL)
+ return true;
+
+ sect2 = bfd_make_section (abfd, name);
+ if (sect2 == NULL)
+ return false;
+
+ sect2->_raw_size = sect->_raw_size;
+ sect2->filepos = sect->filepos;
+ sect2->flags = sect->flags;
+ sect2->alignment_power = sect->alignment_power;
+ return true;
+}
+
+
+/* prstatus_t exists on:
+ solaris 2.[567]
+ linux 2.[01] + glibc
+ unixware 4.2
+*/
+
+#if defined (HAVE_PRSTATUS_T)
+static boolean
+elfcore_grok_prstatus (abfd, note)
+ bfd* abfd;
+ Elf_Internal_Note* note;
+{
+ prstatus_t prstat;
+ char buf[100];
+ char* name;
+ asection* sect;
+
+ if (note->descsz != sizeof (prstat))
+ return true;
+
+ 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.[567]
+ 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;
+#endif
+
+ /* Make a ".reg/999" section. */
+
+ sprintf (buf, ".reg/%d", elfcore_make_pid (abfd));
+ 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 = sizeof (prstat.pr_reg);
+ sect->filepos = note->descpos + offsetof (prstatus_t, pr_reg);
+ sect->flags = SEC_HAS_CONTENTS;
+ sect->alignment_power = 2;
+
+ if (! elfcore_maybe_make_sect (abfd, ".reg", sect))
+ return false;
+
+ return true;
+}
+#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
+ such a section already exists.
+ - For the multi-threaded case, a section named "NAME/PID", where
+ PID is elfcore_make_pid (abfd).
+ Both pseudosections have identical contents: the contents of NOTE. */
+
+static boolean
+elfcore_make_note_pseudosection (abfd, name, note)
+ bfd* abfd;
+ char *name;
+ Elf_Internal_Note* note;
+{
+ char buf[100];
+ char *threaded_name;
+ asection* sect;
+
+ /* Build the section name. */
+
+ sprintf (buf, "%s/%d", name, elfcore_make_pid (abfd));
+ threaded_name = bfd_alloc (abfd, strlen (buf) + 1);
+ if (threaded_name == NULL)
+ return false;
+ strcpy (threaded_name, buf);
+
+ sect = bfd_make_section (abfd, threaded_name);
+ if (sect == NULL)
+ return false;
+ sect->_raw_size = note->descsz;
+ sect->filepos = note->descpos;
+ sect->flags = SEC_HAS_CONTENTS;
+ sect->alignment_power = 2;
+
+ if (! elfcore_maybe_make_sect (abfd, name, sect))
+ return false;
+
+ 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. */
+static boolean
+elfcore_grok_prfpreg (abfd, 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;
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note);
+}
+
+
+#if defined (HAVE_PRPSINFO_T)
+# define elfcore_psinfo_t prpsinfo_t
+#endif
+
+#if defined (HAVE_PSINFO_T)
+# define elfcore_psinfo_t psinfo_t
+#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'. */
+
+static char*
+elfcore_strndup (abfd, start, max)
+ bfd* abfd;
+ char* start;
+ int max;
+{
+ char* dup;
+ char* end = memchr (start, '\0', max);
+ int len;
+
+ if (end == NULL)
+ len = max;
+ else
+ len = end - start;
+
+ dup = bfd_alloc (abfd, len + 1);
+ if (dup == NULL)
+ return NULL;
+
+ memcpy (dup, start, len);
+ dup[len] = '\0';
+
+ return dup;
+}
+
+static boolean
+elfcore_grok_psinfo (abfd, note)
+ bfd* abfd;
+ Elf_Internal_Note* note;
+{
+ elfcore_psinfo_t psinfo;
+
+ if (note->descsz != sizeof (elfcore_psinfo_t))
+ return true;
+
+ memcpy (&psinfo, note->descdata, note->descsz);
+
+ 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));
+
+ /* 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. */
+
+ {
+ char* command = elf_tdata (abfd)->core_command;
+ int n = strlen (command);
+
+ if (0 < n && command[n - 1] == ' ')
+ command[n - 1] = '\0';
+ }
+
+ return true;
+}
+#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;
+{
+ pstatus_t pstat;
+
+ if (note->descsz != sizeof (pstat))
+ return true;
+
+ memcpy (&pstat, note->descdata, sizeof (pstat));
+
+ elf_tdata (abfd)->core_pid = pstat.pr_pid;
+
+ /* 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. */
+
+ 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;
+{
+ lwpstatus_t lwpstat;
+ char buf[100];
+ char* name;
+ asection* sect;
+
+ if (note->descsz != sizeof (lwpstat))
+ return true;
+
+ memcpy (&lwpstat, note->descdata, sizeof (lwpstat));
+
+ elf_tdata (abfd)->core_lwpid = lwpstat.pr_lwpid;
+ elf_tdata (abfd)->core_signal = lwpstat.pr_cursig;
+
+ /* Make a ".reg/999" section. */
+
+ sprintf (buf, ".reg/%d", elfcore_make_pid (abfd));
+ 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;
+
+#if defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
+ sect->_raw_size = sizeof (lwpstat.pr_context.uc_mcontext.gregs);
+ sect->filepos = note->descpos
+ + offsetof (lwpstatus_t, pr_context.uc_mcontext.gregs);
+#endif
+
+#if defined (HAVE_LWPSTATUS_T_PR_REG)
+ sect->_raw_size = sizeof (lwpstat.pr_reg);
+ sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_reg);
+#endif
+
+ sect->flags = SEC_HAS_CONTENTS;
+ sect->alignment_power = 2;
+
+ if (!elfcore_maybe_make_sect (abfd, ".reg", sect))
+ return false;
+
+ /* Make a ".reg2/999" section */
+
+ sprintf (buf, ".reg2/%d", elfcore_make_pid (abfd));
+ 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;
+
+#if defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
+ sect->_raw_size = sizeof (lwpstat.pr_context.uc_mcontext.fpregs);
+ sect->filepos = note->descpos
+ + offsetof (lwpstatus_t, pr_context.uc_mcontext.fpregs);
+#endif
+
+#if defined (HAVE_LWPSTATUS_T_PR_FPREG)
+ sect->_raw_size = sizeof (lwpstat.pr_fpreg);
+ sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_fpreg);
+#endif
+
+ sect->flags = SEC_HAS_CONTENTS;
+ sect->alignment_power = 2;
+
+ if (!elfcore_maybe_make_sect (abfd, ".reg2", sect))
+ return false;
+
+ return true;
+}
+#endif /* defined (HAVE_LWPSTATUS_T) */
+
+#if defined (HAVE_WIN32_PSTATUS_T)
+static boolean
+elfcore_grok_win32pstatus (abfd, note)
+ bfd * abfd;
+ Elf_Internal_Note * note;
+{
+ char buf[30];
+ 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)
+ {
+ 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 ;
+
+ 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;
+
+ strcpy (name, buf);
+
+ sect = bfd_make_section (abfd, name);
+ if (sect == NULL)
+ 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);
+ sect->flags = SEC_HAS_CONTENTS;
+ sect->alignment_power = 2;
+
+ if (pstatus.data.thread_info.is_active_thread)
+ if (! elfcore_maybe_make_sect (abfd, ".reg", sect))
+ return false;
+ break;
+
+ case NOTE_INFO_MODULE:
+ /* Make a ".module/xxxxxxxx" section. */
+ 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;
+ sect->alignment_power = 2;
+ break;
+
+ default:
+ return true;
+ }
+
+ return true;
+}
+#endif /* HAVE_WIN32_PSTATUS_T */
+
+static boolean
+elfcore_grok_note (abfd, note)
+ bfd* abfd;
+ Elf_Internal_Note* note;
+{
+ switch (note->type)
+ {
+ default:
+ return true;
+
+#if defined (HAVE_PRSTATUS_T)
+ case NT_PRSTATUS:
+ return elfcore_grok_prstatus (abfd, note);
+#endif
+
+#if defined (HAVE_PSTATUS_T)
+ case NT_PSTATUS:
+ return elfcore_grok_pstatus (abfd, note);
+#endif
+
+#if defined (HAVE_LWPSTATUS_T)
+ case NT_LWPSTATUS:
+ return elfcore_grok_lwpstatus (abfd, note);
+#endif
+
+ case NT_FPREGSET: /* FIXME: rename to NT_PRFPREG */
+ return elfcore_grok_prfpreg (abfd, note);
+
+#if defined (HAVE_WIN32_PSTATUS_T)
+ case NT_WIN32PSTATUS:
+ return elfcore_grok_win32pstatus (abfd, note);
+#endif
+
+ case NT_PRXFPREG: /* Linux SSE extension */
+ if (note->namesz == 5
+ && ! strcmp (note->namedata, "LINUX"))
+ return elfcore_grok_prxfpreg (abfd, note);
+ else
+ return true;
+
+#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
+ case NT_PRPSINFO:
+ case NT_PSINFO:
+ return elfcore_grok_psinfo (abfd, note);
+#endif
+ }
+}
+
+
+static boolean
+elfcore_read_notes (abfd, offset, size)
+ bfd* abfd;
+ bfd_vma offset;
+ bfd_vma size;
+{
+ char* buf;
+ char* p;
+
+ if (size <= 0)
+ return true;
+
+ if (bfd_seek (abfd, offset, SEEK_SET) == -1)
+ return false;
+
+ buf = bfd_malloc ((size_t) size);
+ if (buf == NULL)
+ return false;
+
+ if (bfd_read (buf, size, 1, abfd) != size)
+ {
+ error:
+ free (buf);
+ return false;
+ }
+
+ p = buf;
+ while (p < buf + size)
+ {
+ /* 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);
+
+ in.namesz = bfd_h_get_32 (abfd, (bfd_byte *) xnp->namesz);
+ in.namedata = xnp->name;
+
+ in.descsz = bfd_h_get_32 (abfd, (bfd_byte *) xnp->descsz);
+ in.descdata = in.namedata + BFD_ALIGN (in.namesz, 4);
+ in.descpos = offset + (in.descdata - buf);
+
+ if (! elfcore_grok_note (abfd, &in))
+ goto error;
+
+ p = in.descdata + BFD_ALIGN (in.descsz, 4);
+ }
+
+ free (buf);
+ 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;
+ Elf_Internal_Phdr* phdr;
+ int sec_num;
+{
+ if (! bfd_section_from_phdr (abfd, phdr, sec_num))
+ return false;
+
+ 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;
+{
+ if (abfd->xvec->flavour != bfd_target_elf_flavour)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return -1;
+ }
+
+ return (elf_elfheader (abfd)->e_phnum
+ * 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
+ buffer needs to be, call bfd_get_elf_phdr_upper_bound.
+
+ 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;
+ void *phdrs;
+{
+ int num_phdrs;
+
+ if (abfd->xvec->flavour != bfd_target_elf_flavour)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return -1;
+ }
+
+ num_phdrs = elf_elfheader (abfd)->e_phnum;
+ memcpy (phdrs, elf_tdata (abfd)->phdr,
+ num_phdrs * sizeof (Elf_Internal_Phdr));
+
+ return num_phdrs;
+}
diff --git a/contrib/binutils/bfd/elf32-arc.c b/contrib/binutils/bfd/elf32-arc.c
index 81fafd5..318dc70 100644
--- a/contrib/binutils/bfd/elf32-arc.c
+++ b/contrib/binutils/bfd/elf32-arc.c
@@ -1,5 +1,5 @@
/* ARC-specific support for 32-bit ELF
- Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf/arc.h"
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+ PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
static void arc_info_to_howto_rel
PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
static boolean arc_elf_object_p PARAMS ((bfd *));
@@ -103,7 +103,7 @@ static reloc_howto_type elf_arc_howto_table[] =
struct arc_reloc_map
{
- unsigned char bfd_reloc_val;
+ bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
@@ -118,7 +118,7 @@ static const struct arc_reloc_map arc_reloc_map[] =
static reloc_howto_type *
bfd_elf32_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
@@ -138,7 +138,7 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
static void
arc_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr;
Elf32_Internal_Rel *dst;
{
@@ -178,7 +178,7 @@ arc_elf_object_p (abfd)
static void
arc_elf_final_write_processing (abfd, linker)
bfd *abfd;
- boolean linker;
+ boolean linker ATTRIBUTE_UNUSED;
{
int mach;
unsigned long val;
diff --git a/contrib/binutils/bfd/elf32-arm.h b/contrib/binutils/bfd/elf32-arm.h
new file mode 100644
index 0000000..eaaf976
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-arm.h
@@ -0,0 +1,3239 @@
+/* 32-bit ELF support for ARM
+ Copyright 1998, 1999 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+typedef unsigned long int insn32;
+typedef unsigned short int insn16;
+
+static boolean elf32_arm_set_private_flags
+ PARAMS ((bfd *, flagword));
+static boolean elf32_arm_copy_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean elf32_arm_merge_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean elf32_arm_print_private_bfd_data
+ PARAMS ((bfd *, PTR));
+static int elf32_arm_get_symbol_type
+ PARAMS (( Elf_Internal_Sym *, int));
+static struct bfd_link_hash_table *elf32_arm_link_hash_table_create
+ PARAMS ((bfd *));
+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
+ PARAMS ((struct bfd_link_info *, CONST char *, bfd *));
+static struct elf_link_hash_entry *find_arm_glue
+ PARAMS ((struct bfd_link_info *, CONST char *, bfd *));
+static void record_arm_to_thumb_glue
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static void record_thumb_to_arm_glue
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static void elf32_arm_post_process_headers
+ PARAMS ((bfd *, struct bfd_link_info *));
+static int elf32_arm_to_thumb_stub
+ PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *,
+ bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma));
+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));
+
+/* 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)
+
+#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"
+
+/* The name of the dynamic interpreter. This is put in the .interp
+ section. */
+#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 */
+
+static const bfd_byte elf32_arm_plt0_entry [PLT_ENTRY_SIZE] =
+{
+ 0x04, 0xe0, 0x2d, 0xe5, /* str lr, [sp, #-4]! */
+ 0x10, 0xe0, 0x9f, 0xe5, /* ldr lr, [pc, #16] */
+ 0x0e, 0xe0, 0x8f, 0xe0, /* adr lr, pc, lr */
+ 0x08, 0xf0, 0xbe, 0xe5 /* ldr pc, [lr, #8]! */
+};
+
+/* 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] */
+ 0x0c, 0xc0, 0x8f, 0xe0, /* add ip, pc, ip */
+ 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */
+ 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
+ linking with -Bsymbolic. We store the information in a field
+ extending the regular ELF linker hash table. */
+
+/* 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. */
+ struct elf32_arm_pcrel_relocs_copied * next;
+ /* A section in dynobj. */
+ asection * section;
+ /* Number of relocs copied in this section. */
+ bfd_size_type count;
+};
+
+/* Arm ELF linker hash entry. */
+
+struct elf32_arm_link_hash_entry
+{
+ struct elf_link_hash_entry root;
+
+ /* Number of PC relative relocs copied for this symbol. */
+ struct elf32_arm_pcrel_relocs_copied * pcrel_relocs_copied;
+};
+
+/* 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, \
+ (boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (info)))
+
+/* Get the ARM elf linker hash table from a link_info structure. */
+#define elf32_arm_hash_table(info) \
+ ((struct elf32_arm_link_hash_table *) ((info)->hash))
+
+/* 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 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;
+
+ /* 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. */
+
+static struct bfd_hash_entry *
+elf32_arm_link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry * entry;
+ struct bfd_hash_table * table;
+ const char * string;
+{
+ struct elf32_arm_link_hash_entry * ret =
+ (struct elf32_arm_link_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct elf32_arm_link_hash_entry *) NULL)
+ ret = ((struct elf32_arm_link_hash_entry *)
+ bfd_hash_allocate (table,
+ sizeof (struct elf32_arm_link_hash_entry)));
+ if (ret == (struct elf32_arm_link_hash_entry *) NULL)
+ return (struct bfd_hash_entry *) ret;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct elf32_arm_link_hash_entry *)
+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ table, string));
+ if (ret != (struct elf32_arm_link_hash_entry *) NULL)
+ ret->pcrel_relocs_copied = NULL;
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+/* Create an ARM elf linker hash table */
+
+static struct bfd_link_hash_table *
+elf32_arm_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct elf32_arm_link_hash_table *ret;
+
+ ret = ((struct elf32_arm_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct elf32_arm_link_hash_table)));
+ if (ret == (struct elf32_arm_link_hash_table *) NULL)
+ return NULL;
+
+ if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
+ elf32_arm_link_hash_newfunc))
+ {
+ bfd_release (abfd, ret);
+ return NULL;
+ }
+
+ ret->thumb_glue_size = 0;
+ ret->arm_glue_size = 0;
+ ret->bfd_of_glue_owner = NULL;
+ ret->no_pipeline_knowledge = 0;
+
+ return &ret->root.root;
+}
+
+static struct elf_link_hash_entry *
+find_thumb_glue (link_info, name, input_bfd)
+ struct bfd_link_info *link_info;
+ CONST char *name;
+ bfd *input_bfd;
+{
+ char *tmp_name;
+ struct elf_link_hash_entry *hash;
+ struct elf32_arm_link_hash_table *hash_table;
+
+ /* 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));
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
+
+ hash = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, false, false, true);
+
+ if (hash == 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 hash;
+}
+
+static struct elf_link_hash_entry *
+find_arm_glue (link_info, name, input_bfd)
+ struct bfd_link_info *link_info;
+ CONST char *name;
+ bfd *input_bfd;
+{
+ char *tmp_name;
+ struct elf_link_hash_entry *myh;
+ struct elf32_arm_link_hash_table *hash_table;
+
+ /* We need a pointer to the elfarm specific hash table. */
+ hash_table = elf32_arm_hash_table (link_info);
+
+ tmp_name = ((char *)
+ bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
+
+ myh = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, false, false, true);
+
+ if (myh == NULL)
+ /* 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;
+}
+
+/*
+ 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
+ */
+
+#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 .thumb
+ .align 2 .align 2
+ __func_from_thumb: __func_from_thumb:
+ bx pc push {r6, lr}
+ nop ldr r6, __func_addr
+ .arm mov lr, pc
+ __func_change_to_arm: bx r6
+ b func .arm
+ __func_back_to_thumb:
+ ldmia r13! {r6, lr}
+ bx lr
+ __func_addr:
+ .word func
+ */
+
+#define THUMB2ARM_GLUE_SIZE 8
+static const insn16 t2a1_bx_pc_insn = 0x4778;
+static const insn16 t2a2_noop_insn = 0x46c0;
+static const insn32 t2a3_b_insn = 0xea000000;
+
+static const insn16 t2a1_push_insn = 0xb540;
+static const insn16 t2a2_ldr_insn = 0x4e03;
+static const insn16 t2a3_mov_insn = 0x46fe;
+static const insn16 t2a4_bx_insn = 0x4730;
+static const insn32 t2a5_pop_insn = 0xe8bd4040;
+static const insn32 t2a6_bx_insn = 0xe12fff1e;
+
+boolean
+bfd_elf32_arm_allocate_interworking_sections (info)
+ struct bfd_link_info * info;
+{
+ asection * s;
+ bfd_byte * foo;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_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);
+
+ s->_raw_size = s->_cooked_size = globals->arm_glue_size;
+ s->contents = foo;
+ }
+
+ 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);
+
+ s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
+ s->contents = foo;
+ }
+
+ return true;
+}
+
+static void
+record_arm_to_thumb_glue (link_info, h)
+ struct bfd_link_info * link_info;
+ struct elf_link_hash_entry * h;
+{
+ const char * name = h->root.root.string;
+ register asection * s;
+ char * tmp_name;
+ struct elf_link_hash_entry * myh;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_arm_hash_table (link_info);
+
+ BFD_ASSERT (globals != NULL);
+ 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);
+
+ tmp_name = ((char *)
+ bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
+
+ myh = elf_link_hash_lookup
+ (&(globals)->root, tmp_name, false, false, true);
+
+ if (myh != NULL)
+ {
+ free (tmp_name);
+ return; /* we've already seen this guy */
+ }
+
+ /* 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,
+ NULL, true, false,
+ (struct bfd_link_hash_entry **) &myh);
+
+ free (tmp_name);
+
+ globals->arm_glue_size += ARM2THUMB_GLUE_SIZE;
+
+ return;
+}
+
+static void
+record_thumb_to_arm_glue (link_info, h)
+ struct bfd_link_info *link_info;
+ struct elf_link_hash_entry *h;
+{
+ const char *name = h->root.root.string;
+ register asection *s;
+ char *tmp_name;
+ struct elf_link_hash_entry *myh;
+ struct elf32_arm_link_hash_table *hash_table;
+ char bind;
+
+ hash_table = elf32_arm_hash_table (link_info);
+
+ BFD_ASSERT (hash_table != NULL);
+ BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name
+ (hash_table->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ tmp_name = (char *) bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
+
+ myh = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, false, false, true);
+
+ if (myh != NULL)
+ {
+ free (tmp_name);
+ return; /* we've already seen this guy */
+ }
+
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name,
+ BSF_GLOBAL, s, hash_table->thumb_glue_size + 1,
+ NULL, true, false,
+ (struct bfd_link_hash_entry **) &myh);
+
+ /* 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"
+
+ tmp_name = (char *) bfd_malloc (strlen (name) + strlen (CHANGE_TO_ARM) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, CHANGE_TO_ARM, name);
+
+ myh = NULL;
+
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name,
+ BSF_LOCAL, s, hash_table->thumb_glue_size + 4,
+ NULL, true, false,
+ (struct bfd_link_hash_entry **) &myh);
+
+ free (tmp_name);
+
+ hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
+
+ return;
+}
+
+/* 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;
+ struct bfd_link_info *info;
+{
+ struct elf32_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 = elf32_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)
+ {
+ /* Note: we do not include the flag SEC_LINKER_CREATED, as this
+ will prevent elf_link_input_bfd() from processing the contents
+ of this section. */
+ 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))
+ 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;
+ }
+
+ sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
+
+ 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;
+
+ sec->gc_mark = 1;
+ }
+
+ /* Save the bfd for later use. */
+ globals->bfd_of_glue_owner = abfd;
+
+ return true;
+}
+
+boolean
+bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge)
+ bfd *abfd;
+ struct bfd_link_info *link_info;
+ int no_pipeline_knowledge;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *free_relocs = NULL;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *contents = NULL;
+ bfd_byte *free_contents = NULL;
+ Elf32_External_Sym *extsyms = NULL;
+ Elf32_External_Sym *free_extsyms = NULL;
+
+ asection *sec;
+ struct elf32_arm_link_hash_table *globals;
+
+ /* If we are only performing a partial link do not bother
+ to construct any glue. */
+ if (link_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. */
+
+ globals = elf32_arm_hash_table (link_info);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ globals->no_pipeline_knowledge = no_pipeline_knowledge;
+
+ /* Rummage around all the relocs and map the glue vectors. */
+ sec = abfd->sections;
+
+ if (sec == NULL)
+ return true;
+
+ for (; sec != NULL; sec = sec->next)
+ {
+ if (sec->reloc_count == 0)
+ continue;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ /* Load the relocs. */
+
+ irel = (_bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL, false));
+
+ BFD_ASSERT (irel != 0);
+
+ irelend = irel + sec->reloc_count;
+ for (; irel < irelend; irel++)
+ {
+ long r_type;
+ unsigned long r_index;
+
+ struct elf_link_hash_entry *h;
+
+ 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 */
+ if ( r_type != R_ARM_PC24
+ && r_type != R_ARM_THM_PC22)
+ continue;
+
+ /* Get the section contents if we haven't done so already. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ else
+ {
+ /* Go get them off disk. */
+ 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,
+ (file_ptr) 0, sec->_raw_size))
+ goto error_return;
+ }
+ }
+
+ /* Read this BFD's symbols if we haven't done so already. */
+ if (extsyms == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (symtab_hdr->contents != NULL)
+ extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+ else
+ {
+ /* Go get them off disk. */
+ extsyms = ((Elf32_External_Sym *)
+ 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))
+ goto error_return;
+ }
+ }
+
+ /* If the relocation is not against a symbol it cannot concern us. */
+
+ h = NULL;
+
+ /* We don't care about local symbols */
+ if (r_index < symtab_hdr->sh_info)
+ continue;
+
+ /* This is an external symbol */
+ r_index -= symtab_hdr->sh_info;
+ h = (struct elf_link_hash_entry *)
+ elf_sym_hashes (abfd)[r_index];
+
+ /* If the relocation is against a static symbol it must be within
+ the current section and so cannot be a cross ARM/Thumb relocation. */
+ if (h == NULL)
+ continue;
+
+ switch (r_type)
+ {
+ case R_ARM_PC24:
+ /* 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;
+
+ case R_ARM_THM_PC22:
+ /* 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;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ return true;
+
+error_return:
+ if (free_relocs != NULL)
+ free (free_relocs);
+ if (free_contents != NULL)
+ free (free_contents);
+ if (free_extsyms != NULL)
+ free (free_extsyms);
+
+ return false;
+}
+
+/* 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
+ offset, insert the offset into the thumb branch and return finished
+ instruction.
+
+ 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).
+
+ Combine together and shifted left by 1 (it's a half word address) and
+ there you have it.
+
+ Op: 1111 = F,
+ H-0, upper address-0 = 000
+ Op: 1111 = F,
+ H-1, lower address-0 = 800
+
+ 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)
+ 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 */
+
+#define LOW_HI_ORDER 0xF800F000
+#define HI_LOW_ORDER 0xF000F800
+
+static insn32
+insert_thumb_branch (br_insn, rel_off)
+ insn32 br_insn;
+ int 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 */
+
+ 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 */
+
+ return br_insn;
+}
+
+/* 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)
+ struct bfd_link_info * info;
+ const char * name;
+ bfd * input_bfd;
+ bfd * output_bfd;
+ asection * input_section;
+ bfd_byte * hit_data;
+ asection * sym_sec;
+ bfd_vma offset;
+ bfd_signed_vma addend;
+ bfd_vma val;
+{
+ asection * s = 0;
+ long int my_offset;
+ unsigned long int tmp;
+ long int ret_offset;
+ struct elf_link_hash_entry * myh;
+ struct elf32_arm_link_hash_table * globals;
+
+ myh = find_thumb_glue (info, name, input_bfd);
+ if (myh == NULL)
+ return false;
+
+ globals = elf32_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,
+ 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 (sym_sec != NULL
+ && sym_sec->owner != NULL
+ && !INTERWORK_FLAG (sym_sec->owner))
+ {
+ _bfd_error_handler
+ (_ ("%s(%s): warning: interworking not enabled."),
+ bfd_get_filename (sym_sec->owner), name);
+ _bfd_error_handler
+ (_ (" first occurrence: %s: thumb call to arm"),
+ bfd_get_filename (input_bfd));
+
+ return false;
+ }
+
+ --my_offset;
+ myh->root.u.def.value = my_offset;
+
+ 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) val) /* Address of destination of the stub */
+ - ((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. */
+
+ bfd_put_32 (output_bfd,
+ t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
+ s->contents + my_offset + 4);
+ }
+
+ BFD_ASSERT (my_offset <= globals->thumb_glue_size);
+
+ /* Now go back and fix up the original BL insn to point
+ to here. */
+ ret_offset =
+ s->output_offset
+ + my_offset
+ - (input_section->output_offset
+ + offset + addend)
+ - 8;
+
+ tmp = bfd_get_32 (input_bfd, hit_data
+ - input_section->vma);
+
+ bfd_put_32 (output_bfd,
+ insert_thumb_branch (tmp, ret_offset),
+ hit_data - input_section->vma);
+
+ return true;
+}
+
+/* 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)
+ struct bfd_link_info * info;
+ const char * name;
+ bfd * input_bfd;
+ bfd * output_bfd;
+ asection * input_section;
+ bfd_byte * hit_data;
+ asection * sym_sec;
+ bfd_vma offset;
+ bfd_signed_vma addend;
+ bfd_vma val;
+{
+ unsigned long int tmp;
+ long int my_offset;
+ asection * s;
+ long int ret_offset;
+ struct elf_link_hash_entry * myh;
+ struct elf32_arm_link_hash_table * globals;
+
+ myh = find_arm_glue (info, name, input_bfd);
+ if (myh == NULL)
+ return false;
+
+ globals = elf32_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,
+ ARM2THUMB_GLUE_SECTION_NAME);
+ BFD_ASSERT (s != NULL);
+ BFD_ASSERT (s->contents != NULL);
+ BFD_ASSERT (s->output_section != NULL);
+
+ if ((my_offset & 0x01) == 0x01)
+ {
+ if (sym_sec != NULL
+ && sym_sec->owner != NULL
+ && !INTERWORK_FLAG (sym_sec->owner))
+ {
+ _bfd_error_handler
+ (_ ("%s(%s): warning: interworking not enabled."),
+ bfd_get_filename (sym_sec->owner), name);
+ _bfd_error_handler
+ (_ (" first occurrence: %s: arm call to thumb"),
+ bfd_get_filename (input_bfd));
+ }
+ --my_offset;
+ myh->root.u.def.value = my_offset;
+
+ 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, val | a2t3_func_addr_insn,
+ s->contents + my_offset + 8);
+ }
+
+ BFD_ASSERT (my_offset <= globals->arm_glue_size);
+
+ tmp = bfd_get_32 (input_bfd, hit_data);
+ tmp = tmp & 0xFF000000;
+
+ /* Somehow these are both 4 too far, so subtract 8. */
+ ret_offset = s->output_offset
+ + my_offset
+ + s->output_section->vma
+ - (input_section->output_offset
+ + input_section->output_section->vma
+ + offset + addend)
+ - 8;
+
+ tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF);
+
+ bfd_put_32 (output_bfd, tmp, hit_data
+ - input_section->vma);
+
+ return true;
+}
+
+/* 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,
+ info, sym_sec, sym_name, sym_flags, h)
+ reloc_howto_type * howto;
+ bfd * input_bfd;
+ bfd * output_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ Elf_Internal_Rela * rel;
+ bfd_vma value;
+ struct bfd_link_info * info;
+ asection * sym_sec;
+ const char * sym_name;
+ unsigned char sym_flags;
+ struct elf_link_hash_entry * h;
+{
+ unsigned long r_type = howto->type;
+ unsigned long r_symndx;
+ bfd_byte * hit_data = contents + rel->r_offset;
+ bfd * dynobj = NULL;
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ bfd_vma * local_got_offsets;
+ asection * sgot = NULL;
+ asection * splt = NULL;
+ asection * sreloc = NULL;
+ bfd_vma addend;
+ bfd_signed_vma signed_addend;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_arm_hash_table (info);
+
+ dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ }
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+#ifdef USE_REL
+ addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
+
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ signed_addend = -1;
+ signed_addend &= ~ howto->src_mask;
+ signed_addend |= addend;
+ }
+ else
+ signed_addend = addend;
+#else
+ addend = signed_addend = rel->r_addend;
+#endif
+
+ switch (r_type)
+ {
+ case R_ARM_NONE:
+ return bfd_reloc_ok;
+
+ case R_ARM_PC24:
+ case R_ARM_ABS32:
+ case R_ARM_REL32:
+ /* When generating a shared object, these relocations are copied
+ into the output file to be resolved at run time. */
+
+ if (info->shared
+ && (r_type != R_ARM_PC24
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ {
+ Elf_Internal_Rel outrel;
+ boolean skip, relocate;
+
+ if (sreloc == NULL)
+ {
+ const char * name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return bfd_reloc_notsupported;
+
+ BFD_ASSERT (strncmp (name, ".rel", 4) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 4) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ skip = false;
+
+ if (elf_section_data (input_section)->stab_info == NULL)
+ outrel.r_offset = rel->r_offset;
+ else
+ {
+ bfd_vma off;
+
+ off = (_bfd_stab_section_offset
+ (output_bfd, &elf_hash_table (info)->stab_info,
+ input_section,
+ & elf_section_data (input_section)->stab_info,
+ rel->r_offset));
+ if (off == (bfd_vma) -1)
+ skip = true;
+ outrel.r_offset = off;
+ }
+
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ if (skip)
+ {
+ memset (&outrel, 0, sizeof outrel);
+ relocate = false;
+ }
+ else if (r_type == R_ARM_PC24)
+ {
+ BFD_ASSERT (h != NULL && h->dynindx != -1);
+ if ((input_section->flags & SEC_ALLOC) != 0)
+ relocate = false;
+ else
+ relocate = true;
+ outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_PC24);
+ }
+ else
+ {
+ if (h == NULL
+ || ((info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) != 0))
+ {
+ relocate = true;
+ outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ }
+ else
+ {
+ BFD_ASSERT (h->dynindx != -1);
+ if ((input_section->flags & SEC_ALLOC) != 0)
+ relocate = false;
+ else
+ relocate = true;
+ outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_ABS32);
+ }
+ }
+
+ bfd_elf32_swap_reloc_out (output_bfd, &outrel,
+ (((Elf32_External_Rel *)
+ 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. */
+ 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)
+ {
+ 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
+ || strcmp (bfd_get_target (input_bfd), "elf32-bigarm-oabi") == 0)
+ {
+ /* 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;
+ value += addend;
+
+ if (! globals->no_pipeline_knowledge)
+ value -= 8;
+ }
+ else
+ {
+ /* The ARM ELF ABI says that this reloc is computed as: S - P + A
+ where:
+ S is the address of the symbol in the relocation.
+ P is address of the instruction being relocated.
+ A is the addend (extracted from the instruction) in bytes.
+
+ S is held in 'value'.
+ P is the base address of the section containing the instruction
+ plus the offset of the reloc into that section, ie:
+ (input_section->output_section->vma +
+ input_section->output_offset +
+ rel->r_offset).
+ A is the addend, converted into bytes, ie:
+ (signed_addend * 4)
+
+ 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;
+ value += (signed_addend << howto->size);
+
+ /* Previous versions of this code also used to add in the pipeline
+ offset here. This is wrong because the linker is not supposed
+ to know about such things, and one day it might change. In order
+ to support old binaries that need the old behaviour however, so
+ we attempt to detect which ABI was used to create the reloc. */
+ if (! globals->no_pipeline_knowledge)
+ {
+ Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */
+
+ i_ehdrp = elf_elfheader (input_bfd);
+
+ if (i_ehdrp->e_ident[EI_OSABI] == 0)
+ value -= 8;
+ }
+ }
+
+ /* 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. */
+ 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))
+ || 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));
+ break;
+
+ case R_ARM_ABS32:
+ value += addend;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+ break;
+
+ case R_ARM_REL32:
+ value -= (input_section->output_section->vma
+ + input_section->output_offset);
+ value += addend;
+ break;
+ }
+
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_ABS8:
+ value += addend;
+ if ((long) value > 0x7f || (long) value < -0x80)
+ return bfd_reloc_overflow;
+
+ bfd_put_8 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_ABS16:
+ value += addend;
+
+ if ((long) value > 0x7fff || (long) value < -0x8000)
+ return bfd_reloc_overflow;
+
+ bfd_put_16 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_ABS12:
+ /* Support ldr and str instruction for the arm */
+ /* Also thumb b (unconditional branch). ??? Really? */
+ value += addend;
+
+ if ((long) value > 0x7ff || (long) value < -0x800)
+ return bfd_reloc_overflow;
+
+ value |= (bfd_get_32 (input_bfd, hit_data) & 0xfffff000);
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_THM_ABS5:
+ /* 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;
+ /* ??? Need to determine shift amount from operand size. */
+ addend >>= howto->rightshift;
+#endif
+ value += addend;
+
+ /* ??? Isn't value unsigned? */
+ if ((long) value > 0x1f || (long) value < -0x10)
+ return bfd_reloc_overflow;
+
+ /* ??? Value needs to be properly shifted into place first. */
+ value |= bfd_get_16 (input_bfd, hit_data) & 0xf83f;
+ bfd_put_16 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_THM_PC22:
+ /* Thumb BL (branch long instruction). */
+ {
+ bfd_vma relocation;
+ boolean overflow = false;
+ bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data);
+ bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
+ bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
+ bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
+ bfd_vma check;
+ bfd_signed_vma signed_check;
+
+#ifdef USE_REL
+ /* Need to refetch the addend and squish the two 11 bit pieces
+ together. */
+ {
+ bfd_vma upper = upper_insn & 0x7ff;
+ bfd_vma lower = lower_insn & 0x7ff;
+ 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)
+ {
+ 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;
+
+ 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 */
+
+ i_ehdrp = elf_elfheader (input_bfd);
+
+ /* Previous versions of this code also used to add in the pipline
+ offset here. This is wrong because the linker is not supposed
+ to know about such things, and one day it might change. In order
+ to support old binaries that need the old behaviour however, so
+ we attempt to detect which ABI was used to create the reloc. */
+ if ( strcmp (bfd_get_target (input_bfd), "elf32-littlearm-oabi") == 0
+ || strcmp (bfd_get_target (input_bfd), "elf32-bigarm-oabi") == 0
+ || i_ehdrp->e_ident[EI_OSABI] == 0)
+ relocation += 4;
+ }
+
+ 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)
+ signed_check = check;
+ else
+ signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
+
+ /* Assumes two's complement. */
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ overflow = true;
+
+ /* Put RELOCATION back into the insn. */
+ upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff);
+ lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff);
+
+ /* Put the relocated value back in the object file: */
+ bfd_put_16 (input_bfd, upper_insn, hit_data);
+ bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
+
+ return (overflow ? bfd_reloc_overflow : bfd_reloc_ok);
+ }
+ break;
+
+ case R_ARM_GNU_VTINHERIT:
+ case R_ARM_GNU_VTENTRY:
+ return bfd_reloc_ok;
+
+ case R_ARM_COPY:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_GLOB_DAT:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_JUMP_SLOT:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_RELATIVE:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_GOTOFF:
+ /* Relocation is relative to the start of the
+ global offset table. */
+
+ 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. */
+
+ 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. */
+
+ BFD_ASSERT (sgot != NULL);
+
+ if (sgot == NULL)
+ return bfd_reloc_notsupported;
+
+ 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_GOT32:
+ /* Relocation is to the entry for this symbol in the
+ global offset table. */
+ if (sgot == NULL)
+ return bfd_reloc_notsupported;
+
+ if (h != NULL)
+ {
+ bfd_vma off;
+
+ off = h->got.offset;
+ BFD_ASSERT (off != (bfd_vma) -1);
+
+ 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)))
+ {
+ /* This is actually a static link, or it is a -Bsymbolic link
+ and the symbol is defined locally. We must initialize this
+ entry in the global offset table. Since the offset must
+ always be a multiple of 4, we use the least significant bit
+ to record whether we have initialized it already.
+
+ 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. */
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd, value, sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+
+ value = sgot->output_offset + off;
+ }
+ else
+ {
+ bfd_vma off;
+
+ BFD_ASSERT (local_got_offsets != NULL &&
+ local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+ off = local_got_offsets[r_symndx];
+
+ /* 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. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd, value, sgot->contents + off);
+
+ if (info->shared)
+ {
+ asection * srelgot;
+ Elf_Internal_Rel outrel;
+
+ srelgot = bfd_get_section_by_name (dynobj, ".rel.got");
+ BFD_ASSERT (srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + off);
+ outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ bfd_elf32_swap_reloc_out (output_bfd, &outrel,
+ (((Elf32_External_Rel *)
+ srelgot->contents)
+ + srelgot->reloc_count));
+ ++srelgot->reloc_count;
+ }
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ value = sgot->output_offset + off;
+ }
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
+
+ case R_ARM_PLT32:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table. */
+
+ /* Resolve a PLT32 reloc against a local symbol directly,
+ without using the procedure linkage table. */
+ if (h == NULL)
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
+
+ if (h->plt.offset == (bfd_vma) -1)
+ /* We didn't make a PLT entry for this symbol. This
+ happens when statically linking PIC code, or when
+ using -Bsymbolic. */
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
+
+ BFD_ASSERT(splt != NULL);
+ if (splt == NULL)
+ return bfd_reloc_notsupported;
+
+ value = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
+
+ case R_ARM_SBREL32:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_AMP_VCALL9:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_RSBREL32:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_THM_RPC22:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_RREL32:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_RABS32:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_RPC24:
+ return bfd_reloc_notsupported;
+
+ case R_ARM_RBASE:
+ return bfd_reloc_notsupported;
+
+ default:
+ return bfd_reloc_notsupported;
+ }
+}
+
+#ifdef USE_REL
+/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. */
+static void
+arm_add_to_rel (abfd, address, howto, increment)
+ bfd * abfd;
+ bfd_byte * address;
+ 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))
+ {
+ bfd_signed_vma mask;
+
+ mask = -1;
+ mask &= ~ howto->src_mask;
+ addend |= mask;
+ }
+
+ /* Add in the increment, (which is a byte value). */
+ switch (howto->type)
+ {
+ case R_ARM_THM_PC22:
+ 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);
+}
+#endif /* USE_REL */
+
+/* Relocate an ARM ELF section. */
+static boolean
+elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd * output_bfd;
+ struct bfd_link_info * info;
+ bfd * input_bfd;
+ asection * input_section;
+ bfd_byte * contents;
+ Elf_Internal_Rela * relocs;
+ Elf_Internal_Sym * local_syms;
+ asection ** local_sections;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ Elf_Internal_Rela * rel;
+ Elf_Internal_Rela * relend;
+ const char * name;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type * howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym * sym;
+ asection * sec;
+ struct elf_link_hash_entry * h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ arelent bfd_reloc;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ if ( r_type == R_ARM_GNU_VTENTRY
+ || r_type == R_ARM_GNU_VTINHERIT)
+ continue;
+
+ elf32_arm_info_to_howto (input_bfd, & bfd_reloc, rel);
+ howto = bfd_reloc.howto;
+
+ if (info->relocateable)
+ {
+ /* This is a relocateable link. We don't have to change
+ anything, unless the reloc is against a section symbol,
+ in which case we have to adjust according to where the
+ section symbol winds up in the output section. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ sec = local_sections[r_symndx];
+#ifdef USE_REL
+ arm_add_to_rel (input_bfd, contents + rel->r_offset,
+ howto, sec->output_offset + sym->st_value);
+#else
+ rel->r_addend += (sec->output_offset + sym->st_value)
+ >> howto->rightshift;
+#endif
+ }
+ }
+
+ continue;
+ }
+
+ /* This is a final link. */
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ }
+ 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)
+ {
+ int relocation_needed = 1;
+
+ sec = h->root.u.def.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. */
+ switch (r_type)
+ {
+ case R_ARM_PC24:
+ case R_ARM_ABS32:
+ if (info->shared
+ && (
+ (!info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+ )
+ && ((input_section->flags & SEC_ALLOC) != 0)
+ )
+ relocation_needed = 0;
+ break;
+
+ case R_ARM_GOTPC:
+ relocation_needed = 0;
+ break;
+
+ case R_ARM_GOT32:
+ 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
+ )
+ )
+ relocation_needed = 0;
+ break;
+
+ case R_ARM_PLT32:
+ if (h->plt.offset != (bfd_vma)-1)
+ relocation_needed = 0;
+ break;
+
+ default:
+ 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_needed = 0;
+ }
+ }
+
+ if (relocation_needed)
+ relocation = h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset;
+ else
+ relocation = 0;
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ relocation = 0;
+ else if (info->shared && !info->symbolic && !info->no_undefined)
+ relocation = 0;
+ else
+ {
+ if (!((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined))))
+ return false;
+ relocation = 0;
+ }
+ }
+
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name));
+ if (name == NULL || *name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+
+ r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section, contents, rel,
+ relocation, info, sec, name,
+ (h ? ELF_ST_TYPE (h->type) :
+ ELF_ST_TYPE (sym->st_info)), h);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char * msg = (const char *) 0;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ if (!((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return false;
+ break;
+
+ case bfd_reloc_undefined:
+ if (!((*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section,
+ rel->r_offset, true)))
+ return false;
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _ ("internal error: out of range error");
+ goto common_error;
+
+ case bfd_reloc_notsupported:
+ msg = _ ("internal error: unsupported relocation error");
+ goto common_error;
+
+ case bfd_reloc_dangerous:
+ msg = _ ("internal error: dangerous error");
+ goto common_error;
+
+ default:
+ msg = _ ("internal error: unknown error");
+ /* fall through */
+
+ common_error:
+ if (!((*info->callbacks->warning)
+ (info, msg, name, input_bfd, input_section,
+ rel->r_offset)))
+ return false;
+ break;
+ }
+ }
+ }
+
+ return true;
+}
+
+/* Function to keep ARM specific flags in the ELF header. */
+static boolean
+elf32_arm_set_private_flags (abfd, flags)
+ bfd *abfd;
+ flagword flags;
+{
+ if (elf_flags_init (abfd)
+ && elf_elfheader (abfd)->e_flags != flags)
+ {
+ 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 (_ ("\
+Warning: Clearing the interwork flag of %s due to outside request"),
+ bfd_get_filename (abfd));
+ }
+ else
+ {
+ elf_elfheader (abfd)->e_flags = flags;
+ elf_flags_init (abfd) = true;
+ }
+
+ return true;
+}
+
+/* Copy backend specific data from one object module to another */
+static boolean
+elf32_arm_copy_private_bfd_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ flagword in_flags;
+ flagword out_flags;
+
+ 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;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (elf_flags_init (obfd) && in_flags != out_flags)
+ {
+ /* Cannot mix PIC and non-PIC code. */
+ if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
+ return false;
+
+ /* Cannot mix APCS26 and APCS32 code. */
+ if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
+ return false;
+
+ /* Cannot mix float APCS and non-float APCS code. */
+ if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT))
+ return false;
+
+ /* If the src and dest have different interworking flags
+ then turn off the interworking bit. */
+ if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK))
+ {
+ if (out_flags & EF_INTERWORK)
+ _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));
+
+ in_flags &= ~EF_INTERWORK;
+ }
+ }
+
+ elf_elfheader (obfd)->e_flags = in_flags;
+ elf_flags_init (obfd) = true;
+
+ return true;
+}
+
+/* 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;
+{
+ flagword out_flags;
+ flagword in_flags;
+
+ 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 */
+ /* BFD_ASSERT (elf_flags_init (ibfd)); */
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (!elf_flags_init (obfd))
+ {
+ /* If the input is the default architecture then do not
+ bother setting the flags for the output architecture,
+ instead allow future merges to do this. If no future
+ merges ever set these flags then they will retain their
+ unitialised values, which surprise surprise, correspond
+ 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;
+
+ if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
+ && bfd_get_arch_info (obfd)->the_default)
+ return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
+
+ return true;
+ }
+
+ /* Check flag compatibility. */
+ if (in_flags == out_flags)
+ return true;
+
+ /* Complain about various flag mismatches. */
+
+ 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);
+
+ 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"),
+ bfd_get_filename (obfd),
+ out_flags & EF_APCS_26 ? _ ("float") : _ ("integer"));
+
+ if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
+ _bfd_error_handler (_ ("\
+Error: %s is compiled as position %s code, whereas %s is not"),
+ bfd_get_filename (ibfd),
+ in_flags & EF_PIC ? _ ("independent") : _ ("dependent"),
+ bfd_get_filename (obfd));
+
+ /* 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"),
+ bfd_get_filename (obfd),
+ out_flags & EF_INTERWORK ? _ ("does not") : _ ("does"));
+ return true;
+ }
+
+ return false;
+}
+
+/* Display the flags field */
+static boolean
+elf32_arm_print_private_bfd_data (abfd, ptr)
+ bfd *abfd;
+ PTR ptr;
+{
+ FILE *file = (FILE *) ptr;
+
+ 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. */
+
+ /* xgettext:c-format */
+ 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]"));
+
+ if (elf_elfheader (abfd)->e_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 (elf_elfheader (abfd)->e_flags & EF_PIC)
+ fprintf (file, _ (" [position independent]"));
+ else
+ fprintf (file, _ (" [absolute position]"));
+
+ fputc ('\n', file);
+
+ return true;
+}
+
+static int
+elf32_arm_get_symbol_type (elf_sym, type)
+ Elf_Internal_Sym * elf_sym;
+ int type;
+{
+ switch (ELF_ST_TYPE (elf_sym->st_info))
+ {
+ 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
+ and non-data (which is probably code) inside Thumb regions of an
+ executable. */
+ if (type != STT_OBJECT)
+ return ELF_ST_TYPE (elf_sym->st_info);
+ break;
+ }
+
+ return type;
+}
+
+static asection *
+elf32_arm_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_ARM_GNU_VTINHERIT:
+ case R_ARM_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static boolean
+elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ /* We don't support garbage collection of GOT and PLT relocs yet. */
+ return true;
+}
+
+/* Look through the relocs for a section during the first phase. */
+
+static boolean
+elf32_arm_check_relocs (abfd, info, sec, relocs)
+ bfd * abfd;
+ struct bfd_link_info * info;
+ asection * sec;
+ const Elf_Internal_Rela * relocs;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ struct elf_link_hash_entry ** sym_hashes_end;
+ const Elf_Internal_Rela * rel;
+ const Elf_Internal_Rela * rel_end;
+ 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);
+ 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)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_ARM_GOT32:
+ case R_ARM_GOTOFF:
+ case R_ARM_GOTPC:
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return false;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_ARM_GOT32:
+ /* This symbol requires a global offset table entry. */
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+ /* Get the got relocation section if necessary. */
+ if (srelgot == NULL
+ && (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)
+ {
+ srelgot = bfd_make_section (dynobj, ".rel.got");
+ if (srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+ return false;
+ }
+ }
+
+ if (h != NULL)
+ {
+ if (h->got.offset != (bfd_vma) -1)
+ /* We have already allocated space in the .got. */
+ break;
+
+ h->got.offset = sgot->_raw_size;
+
+ /* 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);
+ }
+ else
+ {
+ /* This is a global offset table entry for a local
+ symbol. */
+ if (local_got_offsets == 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)
+ 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;
+ }
+
+ if (local_got_offsets[r_symndx] != (bfd_vma) -1)
+ /* We have already allocated space in the .got. */
+ break;
+
+ local_got_offsets[r_symndx] = sgot->_raw_size;
+
+ if (info->shared)
+ /* If we are generating a shared object, we need to
+ output a R_ARM_RELATIVE reloc so that the dynamic
+ linker can adjust this GOT entry. */
+ srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ }
+
+ sgot->_raw_size += 4;
+ break;
+
+ case R_ARM_PLT32:
+ /* This symbol requires a procedure linkage table entry. We
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code which is
+ never referenced by a dynamic object, in which case we
+ don't need to generate a procedure linkage table entry
+ after all. */
+
+ /* If this is a local symbol, we resolve it directly without
+ creating a procedure linkage table entry. */
+ if (h == NULL)
+ continue;
+
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ break;
+
+ case R_ARM_ABS32:
+ case R_ARM_REL32:
+ case R_ARM_PC24:
+ /* 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. */
+ if (info->shared
+ && (ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
+ || (h != NULL
+ && (! info->symbolic
+ || (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. */
+ if (sreloc == NULL)
+ {
+ const char * name;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rel", 4) == 0
+ && strcmp (bfd_get_section_name (abfd, sec),
+ name + 4) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ sreloc = bfd_make_section (dynobj, name);
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (sreloc == NULL
+ || ! bfd_set_section_flags (dynobj, sreloc, flags)
+ || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+ return false;
+ }
+ }
+
+ 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
+ && ELF32_R_TYPE (rel->r_info) == R_ARM_PC24)
+ {
+ struct elf32_arm_link_hash_entry * eh;
+ struct elf32_arm_pcrel_relocs_copied * p;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
+ if (p->section == sreloc)
+ break;
+
+ if (p == NULL)
+ {
+ p = ((struct elf32_arm_pcrel_relocs_copied *)
+ bfd_alloc (dynobj, sizeof * p));
+
+ if (p == NULL)
+ return false;
+ p->next = eh->pcrel_relocs_copied;
+ eh->pcrel_relocs_copied = p;
+ p->section = sreloc;
+ p->count = 0;
+ }
+
+ ++p->count;
+ }
+ }
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_ARM_GNU_VTINHERIT:
+ 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:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ return false;
+ break;
+ }
+ }
+
+ 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. */
+
+static boolean
+elf32_arm_find_nearest_line
+ (abfd, section, symbols, offset, filename_ptr, functionname_ptr, line_ptr)
+ bfd * abfd;
+ asection * section;
+ asymbol ** symbols;
+ bfd_vma offset;
+ CONST char ** filename_ptr;
+ CONST char ** functionname_ptr;
+ unsigned int * line_ptr;
+{
+ boolean found;
+ const char * filename;
+ asymbol * func;
+ bfd_vma low_func;
+ asymbol ** p;
+
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr, 0))
+ return true;
+
+ if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
+ &found, filename_ptr,
+ functionname_ptr, line_ptr,
+ &elf_tdata (abfd)->line_info))
+ return false;
+
+ if (found)
+ return true;
+
+ if (symbols == NULL)
+ return false;
+
+ filename = NULL;
+ func = NULL;
+ low_func = 0;
+
+ for (p = symbols; *p != NULL; p++)
+ {
+ elf_symbol_type *q;
+
+ q = (elf_symbol_type *) *p;
+
+ if (bfd_get_section (&q->symbol) != section)
+ continue;
+
+ switch (ELF_ST_TYPE (q->internal_elf_sym.st_info))
+ {
+ default:
+ break;
+ case STT_FILE:
+ filename = bfd_asymbol_name (&q->symbol);
+ break;
+ case STT_NOTYPE:
+ case STT_FUNC:
+ case STT_ARM_TFUNC:
+ if (q->symbol.section == section
+ && q->symbol.value >= low_func
+ && q->symbol.value <= offset)
+ {
+ func = (asymbol *) q;
+ low_func = q->symbol.value;
+ }
+ break;
+ }
+ }
+
+ if (func == NULL)
+ return false;
+
+ *filename_ptr = filename;
+ *functionname_ptr = bfd_asymbol_name (func);
+ *line_ptr = 0;
+
+ return true;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+ regular object. The current definition is in some section of the
+ dynamic object, but we're not including those sections. We have to
+ change the definition to something the rest of the link can
+ understand. */
+
+static boolean
+elf32_arm_adjust_dynamic_symbol (info, h)
+ struct bfd_link_info * info;
+ struct elf_link_hash_entry * h;
+{
+ bfd * dynobj;
+ asection * s;
+ unsigned int power_of_two;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (dynobj != NULL
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+ || h->weakdef != NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0
+ && (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. */
+ 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)
+ {
+ /* 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);
+ return true;
+ }
+
+ /* 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;
+ }
+
+ s = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (s != NULL);
+
+ /* If this is the first .plt entry, make room for the special
+ first entry. */
+ if (s->_raw_size == 0)
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* If this symbol is not defined in a regular file, and we are
+ not generating a shared library, then set the symbol to this
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+ }
+
+ h->plt.offset = s->_raw_size;
+
+ /* Make room for this entry. */
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* 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);
+
+ return true;
+ }
+
+ /* If this is a weak symbol, and there is a real definition, the
+ processor independent code will have arranged for us to see the
+ real definition first, and we can just use the same value. */
+ if (h->weakdef != NULL)
+ {
+ BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
+ || h->weakdef->root.type == bfd_link_hash_defweak);
+ h->root.u.def.section = h->weakdef->root.u.def.section;
+ h->root.u.def.value = h->weakdef->root.u.def.value;
+ return true;
+ }
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. */
+ if (info->shared)
+ return true;
+
+ /* We must allocate the symbol in our .dynbss section, which will
+ become part of the .bss section of the executable. There will be
+ an entry for this symbol in the .dynsym section. The dynamic
+ object will contain position independent code, so all references
+ from the dynamic object to this symbol will go through the global
+ offset table. The dynamic linker will use the .dynsym entry to
+ 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);
+
+ /* We must generate a R_ARM_COPY reloc to tell the dynamic linker to
+ copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rel.bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ asection *srel;
+
+ srel = bfd_get_section_by_name (dynobj, ".rel.bss");
+ BFD_ASSERT (srel != NULL);
+ srel->_raw_size += sizeof (Elf32_External_Rel);
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ }
+
+ /* We need to figure out the alignment required for this symbol. I
+ have no idea how ELF linkers handle this. */
+ power_of_two = bfd_log2 (h->size);
+ if (power_of_two > 3)
+ power_of_two = 3;
+
+ /* Apply the required alignment. */
+ s->_raw_size = BFD_ALIGN (s->_raw_size,
+ (bfd_size_type) (1 << power_of_two));
+ if (power_of_two > bfd_get_section_alignment (dynobj, s))
+ {
+ if (! bfd_set_section_alignment (dynobj, s, power_of_two))
+ return false;
+ }
+
+ /* Define the symbol as being at this point in the section. */
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+
+ /* Increment the section size to make room for the symbol. */
+ s->_raw_size += h->size;
+
+ return true;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static boolean
+elf32_arm_size_dynamic_sections (output_bfd, info)
+ bfd * output_bfd;
+ struct bfd_link_info * info;
+{
+ bfd * dynobj;
+ asection * s;
+ boolean plt;
+ boolean relocs;
+ boolean reltext;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (! info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+ else
+ {
+ /* We may have created entries in the .rel.got section.
+ However, if we are not creating the dynamic sections, we will
+ not actually use these entries. Reset the size of .rel.got,
+ which will cause it to get stripped from the output file
+ below. */
+ s = bfd_get_section_by_name (dynobj, ".rel.got");
+ if (s != NULL)
+ s->_raw_size = 0;
+ }
+
+ /* If this is a -Bsymbolic shared link, then we need to discard all
+ 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)
+ elf32_arm_link_hash_traverse (elf32_arm_hash_table (info),
+ elf32_arm_discard_copies,
+ (PTR) NULL);
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ plt = false;
+ relocs = false;
+ reltext = false;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ const char * name;
+ boolean strip;
+
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ /* It's OK to base decisions on the section name, because none
+ of the dynobj section names depend upon the input files. */
+ name = bfd_get_section_name (dynobj, s);
+
+ strip = false;
+
+ if (strcmp (name, ".plt") == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ strip = true;
+ }
+ else
+ {
+ /* Remember whether there is a PLT. */
+ plt = true;
+ }
+ }
+ else if (strncmp (name, ".rel", 4) == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rel.bss and
+ .rel.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ strip = true;
+ }
+ else
+ {
+ asection * target;
+
+ /* Remember whether there are any reloc sections other
+ than .rel.plt. */
+ if (strcmp (name, ".rel.plt") != 0)
+ {
+ const char *outname;
+
+ relocs = true;
+
+ /* If this relocation section applies to a read only
+ section, then we probably need a DT_TEXTREL
+ entry. The entries in the .rel.plt section
+ really apply to the .got section, which we
+ created ourselves and so know is not readonly. */
+ outname = bfd_get_section_name (output_bfd,
+ s->output_section);
+ target = bfd_get_section_by_name (output_bfd, outname + 4);
+
+ if (target != NULL
+ && (target->flags & SEC_READONLY) != 0
+ && (target->flags & SEC_ALLOC) != 0)
+ reltext = true;
+ }
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
+ else if (strncmp (name, ".got", 4) != 0)
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ if (strip)
+ {
+ asection ** spp;
+
+ for (spp = &s->output_section->owner->sections;
+ *spp != s->output_section;
+ spp = &(*spp)->next)
+ ;
+ *spp = s->output_section->next;
+ --s->output_section->owner->section_count;
+
+ continue;
+ }
+
+ /* Allocate memory for the section contents. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ if (s->contents == NULL && s->_raw_size != 0)
+ return false;
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in elf32_arm_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+ if (! info->shared)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ return false;
+ }
+
+ if (plt)
+ {
+ 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))
+ return false;
+ }
+
+ if (relocs)
+ {
+ 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)))
+ return false;
+ }
+
+ if (reltext)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/* This function is called via elf32_arm_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
+ check_relocs routine, but we won't fill them in in the
+ relocate_section routine. */
+
+static boolean
+elf32_arm_discard_copies (h, ignore)
+ struct elf32_arm_link_hash_entry * h;
+ PTR ignore ATTRIBUTE_UNUSED;
+{
+ struct elf32_arm_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);
+
+ return true;
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static boolean
+elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
+ bfd * output_bfd;
+ struct bfd_link_info * info;
+ struct elf_link_hash_entry * h;
+ Elf_Internal_Sym * sym;
+{
+ bfd * dynobj;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ asection * splt;
+ asection * sgot;
+ asection * srel;
+ bfd_vma plt_index;
+ bfd_vma got_offset;
+ Elf_Internal_Rel rel;
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up. */
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ srel = bfd_get_section_by_name (dynobj, ".rel.plt");
+ BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
+
+ /* Get the index in the procedure linkage table which
+ corresponds to this symbol. This is the index of this symbol
+ in all the symbols for which we are making plt entries. The
+ first entry in the procedure linkage table is reserved. */
+ plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
+
+ /* Get the offset into the .got table of the entry that
+ corresponds to this function. Each .got entry is 4 bytes.
+ The first three are reserved. */
+ got_offset = (plt_index + 3) * 4;
+
+ /* Fill in the entry in the procedure linkage table. */
+ memcpy (splt->contents + h->plt.offset,
+ elf32_arm_plt_entry,
+ PLT_ENTRY_SIZE);
+ bfd_put_32 (output_bfd,
+ (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset
+ - splt->output_section->vma
+ - splt->output_offset
+ - h->plt.offset - 12),
+ splt->contents + h->plt.offset + 12);
+
+ /* Fill in the entry in the global offset table. */
+ bfd_put_32 (output_bfd,
+ (splt->output_section->vma
+ + splt->output_offset),
+ sgot->contents + got_offset);
+
+ /* Fill in the entry in the .rel.plt section. */
+ rel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_JUMP_SLOT);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel,
+ ((Elf32_External_Rel *) srel->contents
+ + plt_index));
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ }
+ }
+
+ if (h->got.offset != (bfd_vma) -1)
+ {
+ asection * sgot;
+ asection * srel;
+ Elf_Internal_Rel rel;
+
+ /* 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);
+
+ rel.r_offset = (sgot->output_section->vma
+ + 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. 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_ARM_RELATIVE);
+ else
+ {
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
+ }
+
+ bfd_elf32_swap_reloc_out (output_bfd, &rel,
+ ((Elf32_External_Rel *) srel->contents
+ + srel->reloc_count));
+ ++srel->reloc_count;
+ }
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ {
+ asection * s;
+ 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));
+
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ ".rel.bss");
+ BFD_ASSERT (s != NULL);
+
+ rel.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_COPY);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel,
+ ((Elf32_External_Rel *) s->contents
+ + s->reloc_count));
+ ++s->reloc_count;
+ }
+
+ /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ sym->st_shndx = SHN_ABS;
+
+ return true;
+}
+
+/* Finish up the dynamic sections. */
+
+static boolean
+elf32_arm_finish_dynamic_sections (output_bfd, info)
+ bfd * output_bfd;
+ struct bfd_link_info * info;
+{
+ bfd * dynobj;
+ asection * sgot;
+ asection * sdyn;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (sgot != NULL);
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ asection *splt;
+ Elf32_External_Dyn *dyncon, *dynconend;
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (splt != NULL && sdyn != NULL);
+
+ dyncon = (Elf32_External_Dyn *) sdyn->contents;
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+ const char * name;
+ asection * s;
+
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ default:
+ break;
+
+ case DT_PLTGOT:
+ name = ".got";
+ goto get_vma;
+ case DT_JMPREL:
+ name = ".rel.plt";
+ get_vma:
+ s = bfd_get_section_by_name (output_bfd, name);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->vma;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_PLTRELSZ:
+ s = bfd_get_section_by_name (output_bfd, ".rel.plt");
+ BFD_ASSERT (s != NULL);
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val = s->_cooked_size;
+ else
+ dyn.d_un.d_val = s->_raw_size;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_RELSZ:
+ /* My reading of the SVR4 ABI indicates that the
+ procedure linkage table relocs (DT_JMPREL) should be
+ included in the overall relocs (DT_REL). This is
+ what Solaris does. However, UnixWare can not handle
+ that case. Therefore, we override the DT_RELSZ entry
+ here to make it not include the JMPREL relocs. Since
+ the linker script arranges for .rel.plt to follow all
+ other relocation sections, we don't have to worry
+ about changing the DT_REL entry. */
+ s = bfd_get_section_by_name (output_bfd, ".rel.plt");
+ if (s != NULL)
+ {
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val -= s->_cooked_size;
+ else
+ dyn.d_un.d_val -= s->_raw_size;
+ }
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+ }
+ }
+
+ /* Fill in the first entry in the procedure linkage table. */
+ if (splt->_raw_size > 0)
+ memcpy (splt->contents, elf32_arm_plt0_entry, PLT_ENTRY_SIZE);
+
+ /* UnixWare sets the entsize of .plt to 4, although that doesn't
+ really seem like the right value. */
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ }
+
+ /* Fill in the first three entries in the global offset table. */
+ if (sgot->_raw_size > 0)
+ {
+ if (sdyn == NULL)
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
+ else
+ bfd_put_32 (output_bfd,
+ sdyn->output_section->vma + sdyn->output_offset,
+ sgot->contents);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
+ }
+
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+
+ return true;
+}
+
+static void
+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 */
+
+ i_ehdrp = elf_elfheader (abfd);
+
+ i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION;
+ 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
+#define bfd_elf32_bfd_print_private_bfd_data elf32_arm_print_private_bfd_data
+#define bfd_elf32_bfd_link_hash_table_create elf32_arm_link_hash_table_create
+#define bfd_elf32_bfd_reloc_type_lookup elf32_arm_reloc_type_lookup
+#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
+
+#define elf_backend_get_symbol_type elf32_arm_get_symbol_type
+#define elf_backend_gc_mark_hook elf32_arm_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_arm_gc_sweep_hook
+#define elf_backend_check_relocs elf32_arm_check_relocs
+#define elf_backend_relocate_section elf32_arm_relocate_section
+#define elf_backend_adjust_dynamic_symbol elf32_arm_adjust_dynamic_symbol
+#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections
+#define elf_backend_finish_dynamic_symbol elf32_arm_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections elf32_arm_finish_dynamic_sections
+#define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections
+#define elf_backend_post_process_headers elf32_arm_post_process_headers
+
+#define elf_backend_can_gc_sections 1
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_got_plt 1
+#define elf_backend_want_plt_sym 0
+
+#define elf_backend_got_header_size 12
+#define elf_backend_plt_header_size PLT_ENTRY_SIZE
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-gen.c b/contrib/binutils/bfd/elf32-gen.c
index 385fda2..47da53b 100644
--- a/contrib/binutils/bfd/elf32-gen.c
+++ b/contrib/binutils/bfd/elf32-gen.c
@@ -1,5 +1,5 @@
/* Generic support for 32-bit ELF
- Copyright 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1998, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,8 +22,41 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include "elf-bfd.h"
-/* This does not include any relocations, but should be good enough
- for GDB to read the file. */
+/* This does not include any relocation information, but should be
+ good enough for GDB or objdump to read the file. */
+
+static reloc_howto_type dummy =
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "UNKNOWN", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
+
+static void
+elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *bfd_reloc;
+ Elf32_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+{
+ bfd_reloc->howto = &dummy;
+}
+
+static void
+elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *bfd_reloc;
+ Elf32_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED;
+{
+ bfd_reloc->howto = &dummy;
+}
#define TARGET_LITTLE_SYM bfd_elf32_little_generic_vec
#define TARGET_LITTLE_NAME "elf32-little"
@@ -31,7 +64,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_BIG_NAME "elf32-big"
#define ELF_ARCH bfd_arch_unknown
#define ELF_MACHINE_CODE EM_NONE
+#define ELF_MAXPAGESIZE 0x1
#define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
-#define elf_info_to_howto _bfd_elf_no_info_to_howto
+#define elf_info_to_howto elf_generic_info_to_howto
+#define elf_info_to_howto_rel elf_generic_info_to_howto_rel
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c
index a2d53ea..90efba8 100644
--- a/contrib/binutils/bfd/elf32-i386.c
+++ b/contrib/binutils/bfd/elf32-i386.c
@@ -1,5 +1,5 @@
/* Intel 80386/80486-specific support for 32-bit ELF
- Copyright 1993-1997, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 94-98, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -52,45 +52,7 @@ static boolean elf_i386_finish_dynamic_sections
#define USE_REL 1 /* 386 uses REL relocations instead of RELA */
-enum reloc_type
- {
- R_386_NONE = 0,
- R_386_32,
- R_386_PC32,
- R_386_GOT32,
- R_386_PLT32,
- R_386_COPY,
- R_386_GLOB_DAT,
- R_386_JUMP_SLOT,
- R_386_RELATIVE,
- R_386_GOTOFF,
- R_386_GOTPC,
- FIRST_INVALID_RELOC,
- LAST_INVALID_RELOC = 19,
- /* The remaining relocs are a GNU extension. */
- R_386_16 = 20,
- R_386_PC16,
- R_386_8,
- R_386_PC8,
- R_386_max
- };
-
-#if 0
-static CONST char *CONST reloc_type_names[] =
-{
- "R_386_NONE",
- "R_386_32",
- "R_386_PC32",
- "R_386_GOT32",
- "R_386_PLT32",
- "R_386_COPY",
- "R_386_GLOB_DAT",
- "R_386_JUMP_SLOT",
- "R_386_RELATIVE",
- "R_386_GOTOFF",
- "R_386_GOTPC",
-};
-#endif
+#include "elf/i386.h"
static reloc_howto_type elf_howto_table[]=
{
@@ -105,22 +67,54 @@ static reloc_howto_type elf_howto_table[]=
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),
- { 11 },
- { 12 },
- { 13 },
- { 14 },
- { 15 },
- { 16 },
- { 17 },
- { 18 },
- { 19 },
+ 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),
/* 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_bitfield, bfd_elf_generic_reloc,"R_386_PC8", true,0xff,0xff,true),
+ HOWTO(R_386_PC8, 0,0,8,true, 0,complain_overflow_signed, bfd_elf_generic_reloc,"R_386_PC8", true,0xff,0xff,true),
};
+/* 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) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_386_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ 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) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_386_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false);
+
#ifdef DEBUG_GEN_RELOC
#define TRACE(str) fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str)
#else
@@ -129,7 +123,7 @@ static reloc_howto_type elf_howto_table[]=
static reloc_howto_type *
elf_i386_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
switch (code)
@@ -142,6 +136,10 @@ elf_i386_reloc_type_lookup (abfd, code)
TRACE ("BFD_RELOC_32");
return &elf_howto_table[ (int)R_386_32 ];
+ case BFD_RELOC_CTOR:
+ TRACE ("BFD_RELOC_CTOR");
+ return &elf_howto_table[ (int)R_386_32 ];
+
case BFD_RELOC_32_PCREL:
TRACE ("BFD_RELOC_PC32");
return &elf_howto_table[ (int)R_386_PC32 ];
@@ -195,6 +193,14 @@ elf_i386_reloc_type_lookup (abfd, code)
TRACE ("BFD_RELOC_8_PCREL");
return &elf_howto_table[(int) R_386_PC8];
+ case BFD_RELOC_VTABLE_INHERIT:
+ TRACE ("BFD_RELOC_VTABLE_INHERIT");
+ return &elf32_i386_vtinherit_howto;
+
+ case BFD_RELOC_VTABLE_ENTRY:
+ TRACE ("BFD_RELOC_VTABLE_ENTRY");
+ return &elf32_i386_vtentry_howto;
+
default:
break;
}
@@ -205,26 +211,35 @@ elf_i386_reloc_type_lookup (abfd, code)
static void
elf_i386_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd;
- arelent *cache_ptr;
- Elf32_Internal_Rela *dst;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr ATTRIBUTE_UNUSED;
+ Elf32_Internal_Rela *dst ATTRIBUTE_UNUSED;
{
abort ();
}
static void
elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr;
Elf32_Internal_Rel *dst;
{
- enum reloc_type type;
-
- type = (enum reloc_type) ELF32_R_TYPE (dst->r_info);
- BFD_ASSERT (type < R_386_max);
- BFD_ASSERT (type < FIRST_INVALID_RELOC || type > LAST_INVALID_RELOC);
-
- cache_ptr->howto = &elf_howto_table[(int) type];
+ 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
+ {
+ (*_bfd_error_handler) (_("%s: invalid relocation type %d"),
+ bfd_get_filename (abfd), (int) type);
+ cache_ptr->howto = &elf_howto_table[(int) R_386_NONE];
+ }
}
/* Return whether a symbol name implies a local label. The UnixWare
@@ -507,12 +522,12 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- if (h->got_offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1)
{
/* We have already allocated space in the .got. */
break;
}
- h->got_offset = sgot->_raw_size;
+ h->got.offset = sgot->_raw_size;
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@@ -579,6 +594,9 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
case R_386_32:
case R_386_PC32:
+ if (h != NULL)
+ 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
@@ -592,6 +610,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
possibility below by storing information in the
pcrel_relocs_copied field of the hash table entry. */
if (info->shared
+ && (sec->flags & SEC_ALLOC) != 0
&& (ELF32_R_TYPE (rel->r_info) != R_386_PC32
|| (h != NULL
&& (! info->symbolic
@@ -673,6 +692,20 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
break;
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_386_GNU_VTINHERIT:
+ 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_386_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ return false;
+ break;
+
default:
break;
}
@@ -681,6 +714,70 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
return true;
}
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_386_GNU_VTINHERIT:
+ case R_386_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static boolean
+elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ /* ??? 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. */
+
+ return true;
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -755,7 +852,7 @@ elf_i386_adjust_dynamic_symbol (info, h)
h->root.u.def.value = s->_raw_size;
}
- h->plt_offset = s->_raw_size;
+ h->plt.offset = s->_raw_size;
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
@@ -798,6 +895,11 @@ elf_i386_adjust_dynamic_symbol (info, h)
if (info->shared)
return true;
+ /* If there are no references to this symbol that do not use the
+ GOT, we don't need to generate a copy reloc. */
+ if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ return true;
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -986,15 +1088,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
if (strip)
{
- asection **spp;
-
- for (spp = &s->output_section->owner->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --s->output_section->owner->section_count;
-
+ _bfd_strip_section_from_output (info, s);
continue;
}
@@ -1056,7 +1150,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
static boolean
elf_i386_discard_copies (h, ignore)
struct elf_i386_link_hash_entry *h;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
struct elf_i386_pcrel_relocs_copied *s;
@@ -1117,6 +1211,9 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_reloc_status_type r;
r_type = ELF32_R_TYPE (rel->r_info);
+ if (r_type == R_386_GNU_VTINHERIT
+ || r_type == R_386_GNU_VTENTRY)
+ continue;
if (r_type < 0
|| r_type >= (int) R_386_max
|| (r_type >= (int) FIRST_INVALID_RELOC
@@ -1176,7 +1273,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
- && h->plt_offset != (bfd_vma) -1)
+ && h->plt.offset != (bfd_vma) -1)
|| (r_type == R_386_GOT32
&& elf_hash_table (info)->dynamic_sections_created
&& (! info->shared
@@ -1189,7 +1286,12 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
& ELF_LINK_HASH_DEF_REGULAR) == 0)
&& (r_type == R_386_32
|| r_type == R_386_PC32)
- && (input_section->flags & SEC_ALLOC) != 0))
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_386_32 relocations in its
+ sections against symbols defined externally
+ in shared libraries. We can't do anything
+ with them here. */
+ || (input_section->flags & SEC_DEBUGGING) != 0)))
{
/* In these cases, we don't need the relocation
value. We check specially because in some
@@ -1199,7 +1301,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
else if (sec->output_section == NULL)
{
(*_bfd_error_handler)
- ("%s: warning: unresolvable relocation against symbol `%s' from %s section",
+ (_("%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;
@@ -1211,13 +1313,14 @@ elf_i386_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)
+ else if (info->shared && !info->symbolic && !info->no_undefined)
relocation = 0;
else
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
- input_section, rel->r_offset)))
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined))))
return false;
relocation = 0;
}
@@ -1238,7 +1341,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_vma off;
- off = h->got_offset;
+ off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
if (! elf_hash_table (info)->dynamic_sections_created
@@ -1264,7 +1367,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_put_32 (output_bfd, relocation,
sgot->contents + off);
- h->got_offset |= 1;
+ h->got.offset |= 1;
}
}
@@ -1356,7 +1459,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
if (h == NULL)
break;
- if (h->plt_offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -1372,13 +1475,14 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (splt->output_section->vma
+ splt->output_offset
- + h->plt_offset);
+ + h->plt.offset);
break;
case R_386_32:
case R_386_PC32:
if (info->shared
+ && (input_section->flags & SEC_ALLOC) != 0
&& (r_type != R_386_PC32
|| (h != NULL
&& h->dynindx != -1
@@ -1442,10 +1546,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
else if (r_type == R_386_PC32)
{
BFD_ASSERT (h != NULL && h->dynindx != -1);
- if ((input_section->flags & SEC_ALLOC) != 0)
- relocate = false;
- else
- relocate = true;
+ relocate = false;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_PC32);
}
else
@@ -1463,10 +1564,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
BFD_ASSERT (h->dynindx != -1);
- if ((input_section->flags & SEC_ALLOC) != 0)
- relocate = false;
- else
- relocate = true;
+ relocate = false;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_32);
}
}
@@ -1545,7 +1643,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
dynobj = elf_hash_table (info)->dynobj;
- if (h->plt_offset != (bfd_vma) -1)
+ if (h->plt.offset != (bfd_vma) -1)
{
asection *splt;
asection *sgot;
@@ -1568,7 +1666,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
corresponds to this symbol. This is the index of this symbol
in all the symbols for which we are making plt entries. The
first entry in the procedure linkage table is reserved. */
- plt_index = h->plt_offset / PLT_ENTRY_SIZE - 1;
+ plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
/* Get the offset into the .got table of the entry that
corresponds to this function. Each .got entry is 4 bytes.
@@ -1578,32 +1676,32 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Fill in the entry in the procedure linkage table. */
if (! info->shared)
{
- memcpy (splt->contents + h->plt_offset, elf_i386_plt_entry,
+ memcpy (splt->contents + h->plt.offset, elf_i386_plt_entry,
PLT_ENTRY_SIZE);
bfd_put_32 (output_bfd,
(sgot->output_section->vma
+ sgot->output_offset
+ got_offset),
- splt->contents + h->plt_offset + 2);
+ splt->contents + h->plt.offset + 2);
}
else
{
- memcpy (splt->contents + h->plt_offset, elf_i386_pic_plt_entry,
+ memcpy (splt->contents + h->plt.offset, elf_i386_pic_plt_entry,
PLT_ENTRY_SIZE);
bfd_put_32 (output_bfd, got_offset,
- splt->contents + h->plt_offset + 2);
+ splt->contents + h->plt.offset + 2);
}
bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rel),
- splt->contents + h->plt_offset + 7);
- bfd_put_32 (output_bfd, - (h->plt_offset + PLT_ENTRY_SIZE),
- splt->contents + h->plt_offset + 12);
+ splt->contents + h->plt.offset + 7);
+ bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE),
+ splt->contents + h->plt.offset + 12);
/* Fill in the entry in the global offset table. */
bfd_put_32 (output_bfd,
(splt->output_section->vma
+ splt->output_offset
- + h->plt_offset
+ + h->plt.offset
+ 6),
sgot->contents + got_offset);
@@ -1624,7 +1722,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got_offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1)
{
asection *sgot;
asection *srel;
@@ -1639,7 +1737,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
rel.r_offset = (sgot->output_section->vma
+ sgot->output_offset
- + (h->got_offset &~ 1));
+ + (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
@@ -1652,7 +1750,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
else
{
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got_offset);
+ 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);
}
@@ -1717,8 +1815,7 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
asection *splt;
Elf32_External_Dyn *dyncon, *dynconend;
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL && sdyn != NULL);
+ BFD_ASSERT (sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
@@ -1781,7 +1878,8 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first entry in the procedure linkage table. */
- if (splt->_raw_size > 0)
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ if (splt && splt->_raw_size > 0)
{
if (info->shared)
memcpy (splt->contents, elf_i386_pic_plt0_entry, PLT_ENTRY_SIZE);
@@ -1795,11 +1893,11 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
sgot->output_section->vma + sgot->output_offset + 8,
splt->contents + 8);
}
- }
- /* UnixWare sets the entsize of .plt to 4, although that doesn't
- really seem like the right value. */
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ /* UnixWare sets the entsize of .plt to 4, although that doesn't
+ really seem like the right value. */
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ }
}
/* Fill in the first three entries in the global offset table. */
@@ -1844,8 +1942,14 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
elf_i386_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
elf_i386_finish_dynamic_sections
-#define elf_backend_want_got_plt 1
-#define elf_backend_plt_readonly 1
-#define elf_backend_want_plt_sym 0
+#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
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_got_header_size 12
+#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-mips.c b/contrib/binutils/bfd/elf32-mips.c
index fa6ec06..d91bab9 100644
--- a/contrib/binutils/bfd/elf32-mips.c
+++ b/contrib/binutils/bfd/elf32-mips.c
@@ -1,8 +1,10 @@
/* MIPS-specific support for 32-bit ELF
- Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
+ N32/64 ABI support added by Mark Mitchell, CodeSourcery, LLC.
+ <mark@codesourcery.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -41,104 +43,248 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ECOFF_32
#include "ecoffswap.h"
+/* This structure is used to hold .got information when linking. It
+ is stored in the tdata field of the bfd_elf_section_data structure. */
+
+struct mips_got_info
+{
+ /* The global symbol in the GOT with the lowest index in the dynamic
+ symbol table. */
+ struct elf_link_hash_entry *global_gotsym;
+ /* The number of global .got entries. */
+ unsigned int global_gotno;
+ /* The number of local .got entries. */
+ unsigned int local_gotno;
+ /* The number of local .got entries we have used. */
+ unsigned int assigned_gotno;
+};
+
+/* The MIPS ELF linker needs additional information for each symbol in
+ the global hash table. */
+
+struct mips_elf_link_hash_entry
+{
+ struct elf_link_hash_entry root;
+
+ /* External symbol information. */
+ EXTR esym;
+
+ /* Number of R_MIPS_32, R_MIPS_REL32, or R_MIPS_64 relocs against
+ this symbol. */
+ unsigned int possibly_dynamic_relocs;
+
+ /* The index of the first dynamic relocation (in the .rel.dyn
+ section) against this symbol. */
+ unsigned int min_dyn_reloc_index;
+
+ /* If there is a stub that 32 bit functions should use to call this
+ 16 bit function, this points to the section containing the stub. */
+ asection *fn_stub;
+
+ /* Whether we need the fn_stub; this is set if this symbol appears
+ in any relocs other than a 16 bit call. */
+ boolean need_fn_stub;
+
+ /* If there is a stub that 16 bit functions should use to call this
+ 32 bit function, this points to the section containing the stub. */
+ asection *call_stub;
+
+ /* This is like the call_stub field, but it is used if the function
+ being called returns a floating point value. */
+ asection *call_fp_stub;
+};
+
static bfd_reloc_status_type mips32_64bit_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
+static reloc_howto_type *mips_rtype_to_howto
+ PARAMS ((unsigned int));
static void mips_info_to_howto_rel
PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+static void mips_info_to_howto_rela
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
static void bfd_mips_elf32_swap_gptab_in
PARAMS ((bfd *, const Elf32_External_gptab *, Elf32_gptab *));
static void bfd_mips_elf32_swap_gptab_out
PARAMS ((bfd *, const Elf32_gptab *, Elf32_External_gptab *));
+#if 0
+static void bfd_mips_elf_swap_msym_in
+ PARAMS ((bfd *, const Elf32_External_Msym *, Elf32_Internal_Msym *));
+#endif
+static void bfd_mips_elf_swap_msym_out
+ PARAMS ((bfd *, const Elf32_Internal_Msym *, Elf32_External_Msym *));
static boolean mips_elf_sym_is_global PARAMS ((bfd *, asymbol *));
-static boolean mips_elf32_object_p PARAMS ((bfd *));
static boolean mips_elf_create_procedure_table
PARAMS ((PTR, bfd *, struct bfd_link_info *, asection *,
struct ecoff_debug_info *));
-static int mips_elf_additional_program_headers PARAMS ((bfd *));
-static boolean mips_elf_modify_segment_map PARAMS ((bfd *));
static INLINE int elf_mips_isa PARAMS ((flagword));
-static boolean mips_elf32_section_from_shdr
- PARAMS ((bfd *, Elf32_Internal_Shdr *, char *));
-static boolean mips_elf32_section_processing
- PARAMS ((bfd *, Elf32_Internal_Shdr *));
+static INLINE int elf_mips_mach PARAMS ((flagword));
+static INLINE char* elf_mips_abi_name PARAMS ((bfd *));
static boolean mips_elf_is_local_label_name
PARAMS ((bfd *, const char *));
static struct bfd_hash_entry *mips_elf_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *mips_elf_link_hash_table_create
- PARAMS ((bfd *));
static int gptab_compare PARAMS ((const void *, const void *));
-static boolean mips_elf_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-static void mips_elf_relocate_hi16
- PARAMS ((bfd *, Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_byte *,
- bfd_vma));
-static boolean mips_elf_relocate_got_local
- PARAMS ((bfd *, bfd *, asection *, Elf_Internal_Rela *,
- Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-static void mips_elf_relocate_global_got
- PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
static bfd_reloc_status_type mips16_jump_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips16_gprel_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static boolean mips_elf_adjust_dynindx
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static boolean mips_elf_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static boolean mips_elf_link_output_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
- asection *));
-static boolean mips_elf_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
static boolean mips_elf_create_compact_rel_section
PARAMS ((bfd *, struct bfd_link_info *));
static boolean mips_elf_create_got_section
PARAMS ((bfd *, struct bfd_link_info *));
-static boolean mips_elf_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static boolean mips_elf_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static boolean mips_elf_always_size_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static boolean mips_elf_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static boolean mips_elf_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static boolean mips_elf_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static boolean mips_elf_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
static bfd_reloc_status_type mips_elf_final_gp
PARAMS ((bfd *, asymbol *, boolean, char **, bfd_vma *));
static bfd_byte *elf32_mips_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, boolean, asymbol **));
-
-/* This is true for Irix 5 executables, false for normal MIPS ELF ABI
- executables. FIXME: At the moment, we default to always generating
- Irix 5 executables. */
-
-#define SGI_COMPAT(abfd) (1)
-
-/* This structure is used to hold .got information when linking. It
- is stored in the tdata field of the bfd_elf_section_data structure. */
-
-struct mips_got_info
-{
- /* The symbol index of the first global .got symbol. */
- unsigned long global_gotsym;
- /* The number of local .got entries. */
- unsigned int local_gotno;
- /* The number of local .got entries we have used. */
- unsigned int assigned_gotno;
-};
+static asection *mips_elf_create_msym_section
+ PARAMS ((bfd *));
+static void mips_elf_irix6_finish_dynamic_symbol
+ PARAMS ((bfd *, const char *, Elf_Internal_Sym *));
+static bfd_vma mips_elf_sign_extend PARAMS ((bfd_vma, int));
+static boolean mips_elf_overflow_p PARAMS ((bfd_vma, int));
+static bfd_vma mips_elf_high PARAMS ((bfd_vma));
+static bfd_vma mips_elf_higher PARAMS ((bfd_vma));
+static bfd_vma mips_elf_highest PARAMS ((bfd_vma));
+static bfd_vma mips_elf_global_got_index
+ PARAMS ((bfd *, struct elf_link_hash_entry *));
+static bfd_vma mips_elf_local_got_index
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_vma));
+static bfd_vma mips_elf_got_offset_from_index
+ PARAMS ((bfd *, bfd *, bfd_vma));
+static boolean mips_elf_record_global_got_symbol
+ PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *,
+ struct mips_got_info *));
+static bfd_vma mips_elf_got_page
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_vma, bfd_vma *));
+static const Elf_Internal_Rela *mips_elf_next_relocation
+ PARAMS ((unsigned int, const Elf_Internal_Rela *,
+ const Elf_Internal_Rela *));
+static bfd_reloc_status_type mips_elf_calculate_relocation
+ PARAMS ((bfd *, bfd *, asection *, struct bfd_link_info *,
+ const Elf_Internal_Rela *, bfd_vma, reloc_howto_type *,
+ Elf_Internal_Sym *, asection **, bfd_vma *, const char **,
+ boolean *));
+static bfd_vma mips_elf_obtain_contents
+ PARAMS ((reloc_howto_type *, const Elf_Internal_Rela *, bfd *, bfd_byte *));
+static boolean mips_elf_perform_relocation
+ PARAMS ((struct bfd_link_info *, reloc_howto_type *,
+ const Elf_Internal_Rela *, bfd_vma,
+ bfd *, asection *, bfd_byte *, boolean));
+static boolean mips_elf_assign_gp PARAMS ((bfd *, bfd_vma *));
+static boolean mips_elf_sort_hash_table_f
+ PARAMS ((struct mips_elf_link_hash_entry *, PTR));
+static boolean mips_elf_sort_hash_table
+ PARAMS ((struct bfd_link_info *, unsigned long));
+static asection * mips_elf_got_section PARAMS ((bfd *));
+static struct mips_got_info *mips_elf_got_info
+ PARAMS ((bfd *, asection **));
+static boolean mips_elf_local_relocation_p
+ PARAMS ((bfd *, const Elf_Internal_Rela *, asection **));
+static bfd_vma mips_elf_create_local_got_entry
+ PARAMS ((bfd *, struct mips_got_info *, asection *, bfd_vma));
+static bfd_vma mips_elf_got16_entry
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_vma));
+static boolean mips_elf_create_dynamic_relocation
+ PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
+ struct mips_elf_link_hash_entry *, asection *,
+ bfd_vma, bfd_vma *, asection *));
+static void mips_elf_allocate_dynamic_relocations
+ PARAMS ((bfd *, unsigned int));
+static boolean mips_elf_stub_section_p
+ PARAMS ((bfd *, asection *));
+
+/* The level of IRIX compatibility we're striving for. */
+
+typedef enum {
+ ict_none,
+ ict_irix5,
+ ict_irix6
+} irix_compat_t;
+
+/* Nonzero if ABFD is using the N32 ABI. */
+
+#define ABI_N32_P(abfd) \
+ ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0)
+
+/* Nonzero if ABFD is using the 64-bit ABI. FIXME: This is never
+ true, yet. */
+#define ABI_64_P(abfd) \
+ ((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0)
+
+/* What version of Irix we are trying to be compatible with. FIXME:
+ At the moment, we never generate "normal" MIPS ELF ABI executables;
+ we always use some version of Irix. */
+
+#define IRIX_COMPAT(abfd) \
+ ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5)
+
+/* Whether we are trying to be compatible with IRIX at all. */
+
+#define SGI_COMPAT(abfd) \
+ (IRIX_COMPAT (abfd) != ict_none)
+
+/* The name of the msym section. */
+#define MIPS_ELF_MSYM_SECTION_NAME(abfd) ".msym"
+
+/* The name of the srdata section. */
+#define MIPS_ELF_SRDATA_SECTION_NAME(abfd) ".srdata"
+
+/* The name of the options section. */
+#define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
+ (IRIX_COMPAT (abfd) == ict_irix6 ? ".MIPS.options" : ".options")
+
+/* The name of the stub section. */
+#define MIPS_ELF_STUB_SECTION_NAME(abfd) \
+ (IRIX_COMPAT (abfd) == ict_irix6 ? ".MIPS.stubs" : ".stub")
+
+/* The name of the dynamic relocation section. */
+#define MIPS_ELF_REL_DYN_SECTION_NAME(abfd) ".rel.dyn"
+
+/* The size of an external REL relocation. */
+#define MIPS_ELF_REL_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_rel)
+
+/* The size of an external dynamic table entry. */
+#define MIPS_ELF_DYN_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_dyn)
+
+/* The size of a GOT entry. */
+#define MIPS_ELF_GOT_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->arch_size / 8)
+
+/* The size of a symbol-table entry. */
+#define MIPS_ELF_SYM_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_sym)
+
+/* The default alignment for sections, as a power of two. */
+#define MIPS_ELF_LOG_FILE_ALIGN(abfd) \
+ (get_elf_backend_data (abfd)->s->file_align == 8 ? 3 : 2)
+
+/* Get word-sized data. */
+#define MIPS_ELF_GET_WORD(abfd, ptr) \
+ (ABI_64_P (abfd) ? bfd_get_64 (abfd, ptr) : bfd_get_32 (abfd, ptr))
+
+/* Put out word-sized data. */
+#define MIPS_ELF_PUT_WORD(abfd, val, ptr) \
+ (ABI_64_P (abfd) \
+ ? bfd_put_64 (abfd, val, ptr) \
+ : bfd_put_32 (abfd, val, ptr))
+
+/* Add a dynamic symbol table-entry. */
+#ifdef BFD64
+#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
+ (ABI_64_P (elf_hash_table (info)->dynobj) \
+ ? bfd_elf64_add_dynamic_entry (info, tag, val) \
+ : bfd_elf32_add_dynamic_entry (info, tag, val))
+#else
+#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
+ (ABI_64_P (elf_hash_table (info)->dynobj) \
+ ? (abort (), false) \
+ : bfd_elf32_add_dynamic_entry (info, tag, val))
+#endif
/* The number of local .got entries we reserve. */
#define MIPS_RESERVED_GOTNO (2)
@@ -146,15 +292,22 @@ struct mips_got_info
/* Instructions which appear in a stub. For some reason the stub is
slightly different on an SGI system. */
#define ELF_MIPS_GP_OFFSET(abfd) (SGI_COMPAT (abfd) ? 0x7ff0 : 0x8000)
-#define STUB_LW(abfd) \
- (SGI_COMPAT (abfd) \
- ? 0x8f998010 /* lw t9,0x8010(gp) */ \
+#define STUB_LW(abfd) \
+ (SGI_COMPAT (abfd) \
+ ? (ABI_64_P (abfd) \
+ ? 0xdf998010 /* ld t9,0x8010(gp) */ \
+ : 0x8f998010) /* lw t9,0x8010(gp) */ \
: 0x8f998000) /* lw t9,0x8000(gp) */
#define STUB_MOVE 0x03e07825 /* move t7,ra */
#define STUB_JALR 0x0320f809 /* jal t9 */
#define STUB_LI16 0x34180000 /* ori t8,zero,0 */
#define MIPS_FUNCTION_STUB_SIZE (16)
+#if 0
+/* We no longer try to identify particular sections for the .dynsym
+ section. When we do, we wind up crashing if there are other random
+ sections with relocations. */
+
/* Names of sections which appear in the .dynsym section in an Irix 5
executable. */
@@ -179,6 +332,8 @@ static const char * const mips_elf_dynsym_sec_names[] =
#define MIPS_TEXT_DYNSYM_SECNO (3)
+#endif /* 0 */
+
/* The names of the runtime procedure table symbols used on Irix 5. */
static const char * const mips_elf_dynsym_rtproc_names[] =
@@ -288,32 +443,9 @@ static void bfd_elf32_swap_crinfo_out
#define USE_REL 1 /* MIPS uses REL relocations instead of RELA */
-enum reloc_type
-{
- R_MIPS_NONE = 0,
- R_MIPS_16, R_MIPS_32,
- R_MIPS_REL32, R_MIPS_26,
- R_MIPS_HI16, R_MIPS_LO16,
- R_MIPS_GPREL16, R_MIPS_LITERAL,
- R_MIPS_GOT16, R_MIPS_PC16,
- R_MIPS_CALL16, R_MIPS_GPREL32,
- /* The remaining relocs are defined on Irix, although they are not
- in the MIPS ELF ABI. */
- R_MIPS_UNUSED1, R_MIPS_UNUSED2,
- R_MIPS_UNUSED3,
- R_MIPS_SHIFT5, R_MIPS_SHIFT6,
- R_MIPS_64, R_MIPS_GOT_DISP,
- R_MIPS_GOT_PAGE, R_MIPS_GOT_OFST,
- R_MIPS_GOT_HI16, R_MIPS_GOT_LO16,
- R_MIPS_SUB, R_MIPS_INSERT_A,
- R_MIPS_INSERT_B, R_MIPS_DELETE,
- R_MIPS_HIGHER, R_MIPS_HIGHEST,
- R_MIPS_CALL_HI16, R_MIPS_CALL_LO16,
- R_MIPS_max,
- /* These relocs are used for the mips16. */
- R_MIPS16_26 = 100,
- R_MIPS16_GPREL = 101
-};
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
+ from smaller values. Start with zero, widen, *then* decrement. */
+#define MINUS_ONE (((bfd_vma)0) - 1)
static reloc_howto_type elf_mips_howto_table[] =
{
@@ -466,7 +598,7 @@ static reloc_howto_type elf_mips_howto_table[] =
_bfd_mips_elf_got16_reloc, /* special_function */
"R_MIPS_GOT16", /* name */
false, /* partial_inplace */
- 0, /* src_mask */
+ 0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
@@ -483,10 +615,9 @@ static reloc_howto_type elf_mips_howto_table[] =
true, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ true), /* pcrel_offset */
/* 16 bit call through global offset table. */
- /* FIXME: This is not handled correctly. */
HOWTO (R_MIPS_CALL16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -497,7 +628,7 @@ static reloc_howto_type elf_mips_howto_table[] =
bfd_elf_generic_reloc, /* special_function */
"R_MIPS_CALL16", /* name */
false, /* partial_inplace */
- 0, /* src_mask */
+ 0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
@@ -518,9 +649,9 @@ static reloc_howto_type elf_mips_howto_table[] =
/* The remaining relocs are defined on Irix 5, although they are
not defined by the ABI. */
- { 13 },
- { 14 },
- { 15 },
+ EMPTY_HOWTO (13),
+ EMPTY_HOWTO (14),
+ EMPTY_HOWTO (15),
/* A 5 bit shift field. */
HOWTO (R_MIPS_SHIFT5, /* type */
@@ -554,26 +685,22 @@ static reloc_howto_type elf_mips_howto_table[] =
0x000007c4, /* dst_mask */
false), /* pcrel_offset */
- /* A 64 bit relocation. This is used in 32 bit ELF when addresses
- are 64 bits long; the upper 32 bits are simply a sign extension.
- The fields of the howto should be the same as for R_MIPS_32,
- other than the type, name, and special_function. */
+ /* A 64 bit relocation. */
HOWTO (R_MIPS_64, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mips32_64bit_reloc, /* special_function */
"R_MIPS_64", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
/* Displacement in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_DISP, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -589,7 +716,6 @@ static reloc_howto_type elf_mips_howto_table[] =
false), /* pcrel_offset */
/* Displacement to page pointer in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_PAGE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -605,7 +731,6 @@ static reloc_howto_type elf_mips_howto_table[] =
false), /* pcrel_offset */
/* Offset from page pointer in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_OFST, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -621,7 +746,6 @@ static reloc_howto_type elf_mips_howto_table[] =
false), /* pcrel_offset */
/* High 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_HI16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -637,7 +761,6 @@ static reloc_howto_type elf_mips_howto_table[] =
false), /* pcrel_offset */
/* Low 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -652,21 +775,57 @@ static reloc_howto_type elf_mips_howto_table[] =
0x0000ffff, /* dst_mask */
false), /* pcrel_offset */
- /* 64 bit subtraction. Presumably not used in 32 bit ELF. */
- { R_MIPS_SUB },
+ /* 64 bit subtraction. Used in the N32 ABI. */
+ HOWTO (R_MIPS_SUB, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_SUB", /* name */
+ true, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ false), /* pcrel_offset */
/* Used to cause the linker to insert and delete instructions? */
- { R_MIPS_INSERT_A },
- { R_MIPS_INSERT_B },
- { R_MIPS_DELETE },
+ EMPTY_HOWTO (R_MIPS_INSERT_A),
+ EMPTY_HOWTO (R_MIPS_INSERT_B),
+ EMPTY_HOWTO (R_MIPS_DELETE),
+
+ /* Get the higher value of a 64 bit addend. */
+ HOWTO (R_MIPS_HIGHER, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_HIGHER", /* name */
+ true, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
- /* Get the higher values of a 64 bit addend. Presumably not used in
- 32 bit ELF. */
- { R_MIPS_HIGHER },
- { R_MIPS_HIGHEST },
+ /* Get the highest value of a 64 bit addend. */
+ HOWTO (R_MIPS_HIGHEST, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_HIGHEST", /* name */
+ true, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* High 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_CALL_HI16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -682,7 +841,6 @@ static reloc_howto_type elf_mips_howto_table[] =
false), /* pcrel_offset */
/* Low 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_CALL_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -697,7 +855,41 @@ static reloc_howto_type elf_mips_howto_table[] =
0x0000ffff, /* dst_mask */
false), /* pcrel_offset */
+ /* Section displacement. */
+ HOWTO (R_MIPS_SCN_DISP, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_SCN_DISP", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+ EMPTY_HOWTO (R_MIPS_REL16),
+ EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE),
+ EMPTY_HOWTO (R_MIPS_PJUMP),
+ EMPTY_HOWTO (R_MIPS_RELGOT),
+
+ /* Protected jump conversion. This is an optimization hint. No
+ relocation is required for correctness. */
+ HOWTO (R_MIPS_JALR, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_JALR", /* name */
+ false, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ false), /* pcrel_offset */
};
/* The reloc used for BFD_RELOC_CTOR when doing a 64 bit link. This
@@ -736,10 +928,7 @@ static reloc_howto_type elf_mips16_jump_howto =
0x3ffffff, /* dst_mask */
false); /* pcrel_offset */
-/* The reloc used for the mips16 gprel instruction. The src_mask and
- dsk_mask for this howto do not reflect the actual instruction, in
- which the value is not contiguous; the masks are for the
- convenience of the relocate_section routine. */
+/* The reloc used for the mips16 gprel instruction. */
static reloc_howto_type elf_mips16_gprel_howto =
HOWTO (R_MIPS16_GPREL, /* type */
0, /* rightshift */
@@ -751,10 +940,123 @@ static reloc_howto_type elf_mips16_gprel_howto =
mips16_gprel_reloc, /* special_function */
"R_MIPS16_GPREL", /* name */
true, /* partial_inplace */
+ 0x07ff001f, /* src_mask */
+ 0x07ff001f, /* dst_mask */
+ false); /* pcrel_offset */
+
+
+/* GNU extensions for embedded-pic. */
+/* High 16 bits of symbol value, pc-relative. */
+static reloc_howto_type elf_mips_gnu_rel_hi16 =
+ HOWTO (R_MIPS_GNU_REL_HI16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_hi16_reloc, /* special_function */
+ "R_MIPS_GNU_REL_HI16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ true); /* pcrel_offset */
+
+/* Low 16 bits of symbol value, pc-relative. */
+static reloc_howto_type elf_mips_gnu_rel_lo16 =
+ HOWTO (R_MIPS_GNU_REL_LO16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_lo16_reloc, /* special_function */
+ "R_MIPS_GNU_REL_LO16", /* name */
+ true, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
+ true); /* pcrel_offset */
+
+/* 16 bit offset for pc-relative branches. */
+static reloc_howto_type elf_mips_gnu_rel16_s2 =
+ HOWTO (R_MIPS_GNU_REL16_S2, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_GNU_REL16_S2", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ true); /* pcrel_offset */
+
+/* 64 bit pc-relative. */
+static reloc_howto_type elf_mips_gnu_pcrel64 =
+ HOWTO (R_MIPS_PC64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_PC64", /* name */
+ true, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ true); /* pcrel_offset */
+
+/* 32 bit pc-relative. */
+static reloc_howto_type elf_mips_gnu_pcrel32 =
+ HOWTO (R_MIPS_PC32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_PC32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true); /* pcrel_offset */
+
+/* GNU extension to record C++ vtable hierarchy */
+static reloc_howto_type elf_mips_gnu_vtinherit_howto =
+ HOWTO (R_MIPS_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_MIPS_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
false); /* pcrel_offset */
+/* GNU extension to record C++ vtable member usage */
+static reloc_howto_type elf_mips_gnu_vtentry_howto =
+ HOWTO (R_MIPS_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_MIPS_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
/* Do a R_MIPS_HI16 relocation. This has to be done in combination
with a R_MIPS_LO16 reloc, because there is a carry from the LO16 to
@@ -784,7 +1086,7 @@ _bfd_mips_elf_hi16_reloc (abfd,
input_section,
output_bfd,
error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
PTR data;
@@ -1015,6 +1317,57 @@ _bfd_mips_elf_got16_reloc (abfd,
abort ();
}
+/* Set the GP value for OUTPUT_BFD. Returns false if this is a
+ dangerous relocation. */
+
+static boolean
+mips_elf_assign_gp (output_bfd, pgp)
+ bfd *output_bfd;
+ bfd_vma *pgp;
+{
+ unsigned int count;
+ asymbol **sym;
+ unsigned int i;
+
+ /* If we've already figured out what GP will be, just return it. */
+ *pgp = _bfd_get_gp_value (output_bfd);
+ if (*pgp)
+ return true;
+
+ count = bfd_get_symcount (output_bfd);
+ sym = bfd_get_outsymbols (output_bfd);
+
+ /* The linker script will have created a symbol named `_gp' with the
+ appropriate value. */
+ if (sym == (asymbol **) NULL)
+ i = count;
+ else
+ {
+ for (i = 0; i < count; i++, sym++)
+ {
+ register CONST char *name;
+
+ name = bfd_asymbol_name (*sym);
+ if (*name == '_' && strcmp (name, "_gp") == 0)
+ {
+ *pgp = bfd_asymbol_value (*sym);
+ _bfd_set_gp_value (output_bfd, *pgp);
+ break;
+ }
+ }
+ }
+
+ if (i >= count)
+ {
+ /* Only get the error once. */
+ *pgp = 4;
+ _bfd_set_gp_value (output_bfd, *pgp);
+ return false;
+ }
+
+ return true;
+}
+
/* We have to figure out the gp value, so that we can adjust the
symbol value correctly. We look up the symbol _gp in the output
BFD. If we can't find it, we're stuck. We cache it in the ELF
@@ -1047,42 +1400,11 @@ mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
*pgp = symbol->section->output_section->vma + 0x4000;
_bfd_set_gp_value (output_bfd, *pgp);
}
- else
+ else if (!mips_elf_assign_gp (output_bfd, pgp))
{
- unsigned int count;
- asymbol **sym;
- unsigned int i;
-
- count = bfd_get_symcount (output_bfd);
- sym = bfd_get_outsymbols (output_bfd);
-
- if (sym == (asymbol **) NULL)
- i = count;
- else
- {
- for (i = 0; i < count; i++, sym++)
- {
- register CONST char *name;
-
- name = bfd_asymbol_name (*sym);
- if (*name == '_' && strcmp (name, "_gp") == 0)
- {
- *pgp = bfd_asymbol_value (*sym);
- _bfd_set_gp_value (output_bfd, *pgp);
- break;
- }
- }
- }
-
- if (i >= count)
- {
- /* Only get the error once. */
- *pgp = 4;
- _bfd_set_gp_value (output_bfd, *pgp);
- *error_message =
- (char *) "GP relative relocation when _gp not defined";
- return bfd_reloc_dangerous;
- }
+ *error_message =
+ (char *) _("GP relative relocation when _gp not defined");
+ return bfd_reloc_dangerous;
}
}
@@ -1240,7 +1562,7 @@ _bfd_mips_elf_gprel32_reloc (abfd,
&& reloc_entry->addend == 0)
{
*error_message = (char *)
- "32bits gp relative relocation occurs for an external symbol";
+ _("32bits gp relative relocation occurs for an external symbol");
return bfd_reloc_outofrange;
}
@@ -1367,13 +1689,13 @@ mips32_64bit_reloc (abfd, reloc_entry, symbol, data, input_section,
static bfd_reloc_status_type
mips16_jump_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -1389,7 +1711,7 @@ mips16_jump_reloc (abfd, reloc_entry, symbol, data, input_section,
if (! warned)
(*_bfd_error_handler)
- ("Linking mips16 objects into %s format is not supported",
+ (_("Linking mips16 objects into %s format is not supported"),
bfd_get_target (input_section->output_section->owner));
warned = true;
}
@@ -1493,11 +1815,90 @@ elf_mips_isa (flags)
return 4;
}
+/* Return the MACH for a MIPS e_flags value. */
+
+static INLINE int
+elf_mips_mach (flags)
+ flagword flags;
+{
+ switch (flags & EF_MIPS_MACH)
+ {
+ case E_MIPS_MACH_3900:
+ return bfd_mach_mips3900;
+
+ case E_MIPS_MACH_4010:
+ return bfd_mach_mips4010;
+
+ case E_MIPS_MACH_4100:
+ return bfd_mach_mips4100;
+
+ case E_MIPS_MACH_4111:
+ return bfd_mach_mips4111;
+
+ case E_MIPS_MACH_4650:
+ return bfd_mach_mips4650;
+
+ default:
+ switch (flags & EF_MIPS_ARCH)
+ {
+ default:
+ case E_MIPS_ARCH_1:
+ return bfd_mach_mips3000;
+ break;
+
+ case E_MIPS_ARCH_2:
+ return bfd_mach_mips6000;
+ break;
+
+ case E_MIPS_ARCH_3:
+ return bfd_mach_mips4000;
+ break;
+
+ case E_MIPS_ARCH_4:
+ return bfd_mach_mips8000;
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/* Return printable name for ABI. */
+
+static INLINE char*
+elf_mips_abi_name (abfd)
+ bfd *abfd;
+{
+ flagword flags;
+
+ if (ABI_N32_P (abfd))
+ return "N32";
+ else if (ABI_64_P (abfd))
+ return "64";
+
+ flags = elf_elfheader (abfd)->e_flags;
+ switch (flags & EF_MIPS_ABI)
+ {
+ case 0:
+ return "none";
+ case E_MIPS_ABI_O32:
+ return "O32";
+ case E_MIPS_ABI_O64:
+ return "O64";
+ case E_MIPS_ABI_EABI32:
+ return "EABI32";
+ case E_MIPS_ABI_EABI64:
+ return "EABI64";
+ default:
+ return "unknown abi";
+ }
+}
+
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
struct elf_reloc_map {
bfd_reloc_code_real_type bfd_reloc_val;
- enum reloc_type elf_reloc_val;
+ enum elf_mips_reloc_type elf_reloc_val;
};
static CONST struct elf_reloc_map mips_reloc_map[] =
@@ -1519,6 +1920,10 @@ static CONST struct elf_reloc_map mips_reloc_map[] =
{ BFD_RELOC_MIPS_GOT_LO16, R_MIPS_GOT_LO16 },
{ BFD_RELOC_MIPS_CALL_HI16, R_MIPS_CALL_HI16 },
{ BFD_RELOC_MIPS_CALL_LO16, R_MIPS_CALL_LO16 },
+ { BFD_RELOC_MIPS_SUB, R_MIPS_SUB },
+ { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE },
+ { BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST },
+ { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP }
};
/* Given a BFD reloc type, return a howto structure. */
@@ -1536,29 +1941,86 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
return &elf_mips_howto_table[(int) mips_reloc_map[i].elf_reloc_val];
}
- /* We need to handle BFD_RELOC_CTOR specially.
-
- Select the right relocation (R_MIPS_32 or R_MIPS_64) based on the
- size of addresses on this architecture. */
- if (code == BFD_RELOC_CTOR)
+ switch (code)
{
+ default:
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+
+ case BFD_RELOC_CTOR:
+ /* We need to handle BFD_RELOC_CTOR specially.
+ Select the right relocation (R_MIPS_32 or R_MIPS_64) based on the
+ size of addresses on this architecture. */
if (bfd_arch_bits_per_address (abfd) == 32)
return &elf_mips_howto_table[(int) R_MIPS_32];
else
return &elf_mips_ctor64_howto;
+
+ case BFD_RELOC_MIPS16_JMP:
+ return &elf_mips16_jump_howto;
+ case BFD_RELOC_MIPS16_GPREL:
+ return &elf_mips16_gprel_howto;
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &elf_mips_gnu_vtinherit_howto;
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &elf_mips_gnu_vtentry_howto;
+ case BFD_RELOC_PCREL_HI16_S:
+ return &elf_mips_gnu_rel_hi16;
+ case BFD_RELOC_PCREL_LO16:
+ return &elf_mips_gnu_rel_lo16;
+ case BFD_RELOC_16_PCREL_S2:
+ return &elf_mips_gnu_rel16_s2;
+ case BFD_RELOC_64_PCREL:
+ return &elf_mips_gnu_pcrel64;
+ case BFD_RELOC_32_PCREL:
+ return &elf_mips_gnu_pcrel32;
}
+}
- /* Special handling for the MIPS16 relocs, since they are made up
- reloc types with a large value. */
- if (code == BFD_RELOC_MIPS16_JMP)
- return &elf_mips16_jump_howto;
- else if (code == BFD_RELOC_MIPS16_GPREL)
- return &elf_mips16_gprel_howto;
+/* Given a MIPS Elf32_Internal_Rel, fill in an arelent structure. */
- return NULL;
+static reloc_howto_type *
+mips_rtype_to_howto (r_type)
+ unsigned int r_type;
+{
+ switch (r_type)
+ {
+ case R_MIPS16_26:
+ return &elf_mips16_jump_howto;
+ break;
+ case R_MIPS16_GPREL:
+ return &elf_mips16_gprel_howto;
+ break;
+ case R_MIPS_GNU_VTINHERIT:
+ return &elf_mips_gnu_vtinherit_howto;
+ break;
+ case R_MIPS_GNU_VTENTRY:
+ return &elf_mips_gnu_vtentry_howto;
+ break;
+ case R_MIPS_GNU_REL_HI16:
+ return &elf_mips_gnu_rel_hi16;
+ break;
+ case R_MIPS_GNU_REL_LO16:
+ return &elf_mips_gnu_rel_lo16;
+ break;
+ case R_MIPS_GNU_REL16_S2:
+ return &elf_mips_gnu_rel16_s2;
+ break;
+ case R_MIPS_PC64:
+ return &elf_mips_gnu_pcrel64;
+ break;
+ case R_MIPS_PC32:
+ return &elf_mips_gnu_pcrel32;
+ break;
+
+ default:
+ BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
+ return &elf_mips_howto_table[r_type];
+ break;
+ }
}
-/* Given a MIPS reloc type, fill in an arelent structure. */
+/* Given a MIPS Elf32_Internal_Rel, fill in an arelent structure. */
static void
mips_info_to_howto_rel (abfd, cache_ptr, dst)
@@ -1569,15 +2031,7 @@ mips_info_to_howto_rel (abfd, cache_ptr, dst)
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
- if (r_type == R_MIPS16_26)
- cache_ptr->howto = &elf_mips16_jump_howto;
- else if (r_type == R_MIPS16_GPREL)
- cache_ptr->howto = &elf_mips16_gprel_howto;
- else
- {
- BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
- cache_ptr->howto = &elf_mips_howto_table[r_type];
- }
+ cache_ptr->howto = mips_rtype_to_howto (r_type);
/* The addend for a GPREL16 or LITERAL relocation comes from the GP
value for the object file. We get the addend now, rather than
@@ -1588,6 +2042,23 @@ mips_info_to_howto_rel (abfd, cache_ptr, dst)
|| r_type == (unsigned int) R_MIPS_LITERAL))
cache_ptr->addend = elf_gp (abfd);
}
+
+/* Given a MIPS Elf32_Internal_Rela, fill in an arelent structure. */
+
+static void
+mips_info_to_howto_rela (abfd, cache_ptr, dst)
+ bfd *abfd;
+ arelent *cache_ptr;
+ Elf32_Internal_Rela *dst;
+{
+ /* Since an Elf32_Internal_Rel is an initial prefix of an
+ Elf32_Internal_Rela, we can just use mips_info_to_howto_rel
+ above. */
+ mips_info_to_howto_rel (abfd, cache_ptr, (Elf32_Internal_Rel *) dst);
+
+ /* If we ever need to do any extra processing with dst->r_addend
+ (the field omitted in an Elf32_Internal_Rel) we can do it here. */
+}
/* A .reginfo section holds a single Elf32_RegInfo structure. These
routines swap this structure in and out. They are used outside of
@@ -1753,6 +2224,31 @@ bfd_mips_elf_swap_options_out (abfd, in, ex)
bfd_h_put_16 (abfd, in->section, ex->section);
bfd_h_put_32 (abfd, in->info, ex->info);
}
+#if 0
+/* Swap in an MSYM entry. */
+
+static void
+bfd_mips_elf_swap_msym_in (abfd, ex, in)
+ bfd *abfd;
+ const Elf32_External_Msym *ex;
+ Elf32_Internal_Msym *in;
+{
+ in->ms_hash_value = bfd_h_get_32 (abfd, ex->ms_hash_value);
+ in->ms_info = bfd_h_get_32 (abfd, ex->ms_info);
+}
+#endif
+/* Swap out an MSYM entry. */
+
+static void
+bfd_mips_elf_swap_msym_out (abfd, in, ex)
+ bfd *abfd;
+ const Elf32_Internal_Msym *in;
+ Elf32_External_Msym *ex;
+{
+ bfd_h_put_32 (abfd, in->ms_hash_value, ex->ms_hash_value);
+ bfd_h_put_32 (abfd, in->ms_info, ex->ms_info);
+}
+
/* Determine whether a symbol is global for the purposes of splitting
the symbol table into global symbols and local symbols. At least
@@ -1763,7 +2259,7 @@ bfd_mips_elf_swap_options_out (abfd, in, ex)
/*ARGSUSED*/
static boolean
mips_elf_sym_is_global (abfd, sym)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asymbol *sym;
{
return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
@@ -1776,41 +2272,14 @@ boolean
_bfd_mips_elf_object_p (abfd)
bfd *abfd;
{
- switch (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH)
- {
- default:
- case E_MIPS_ARCH_1:
- (void) bfd_default_set_arch_mach (abfd, bfd_arch_mips, 3000);
- break;
-
- case E_MIPS_ARCH_2:
- (void) bfd_default_set_arch_mach (abfd, bfd_arch_mips, 6000);
- break;
-
- case E_MIPS_ARCH_3:
- (void) bfd_default_set_arch_mach (abfd, bfd_arch_mips, 4000);
- break;
-
- case E_MIPS_ARCH_4:
- (void) bfd_default_set_arch_mach (abfd, bfd_arch_mips, 8000);
- break;
- }
-
- return true;
-}
-
-/* Set the right machine number for a 32-bit MIPS ELF file. */
-
-static boolean
-mips_elf32_object_p (abfd)
- bfd *abfd;
-{
- /* Irix 5 is broken. Object file symbol tables are not always
+ /* Irix 5 and 6 is broken. Object file symbol tables are not always
sorted correctly such that local symbols precede global symbols,
and the sh_info field in the symbol table is not always right. */
elf_bad_symtab (abfd) = true;
- return _bfd_mips_elf_object_p (abfd);
+ bfd_default_set_arch_mach (abfd, bfd_arch_mips,
+ elf_mips_mach (elf_elfheader (abfd)->e_flags));
+ return true;
}
/* The final processing done just before writing out a MIPS ELF object
@@ -1821,7 +2290,7 @@ mips_elf32_object_p (abfd)
void
_bfd_mips_elf_final_write_processing (abfd, linker)
bfd *abfd;
- boolean linker;
+ boolean linker ATTRIBUTE_UNUSED;
{
unsigned long val;
unsigned int i;
@@ -1831,37 +2300,57 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
switch (bfd_get_mach (abfd))
{
- case 3000:
+ default:
+ case bfd_mach_mips3000:
val = E_MIPS_ARCH_1;
break;
- case 6000:
+ case bfd_mach_mips3900:
+ val = E_MIPS_ARCH_1 | E_MIPS_MACH_3900;
+ break;
+
+ case bfd_mach_mips6000:
val = E_MIPS_ARCH_2;
break;
- case 4000:
+ case bfd_mach_mips4000:
+ case bfd_mach_mips4300:
val = E_MIPS_ARCH_3;
break;
- case 8000:
- val = E_MIPS_ARCH_4;
+ case bfd_mach_mips4010:
+ val = E_MIPS_ARCH_3 | E_MIPS_MACH_4010;
break;
- default:
- val = 0;
+ case bfd_mach_mips4100:
+ val = E_MIPS_ARCH_3 | E_MIPS_MACH_4100;
+ break;
+
+ case bfd_mach_mips4111:
+ val = E_MIPS_ARCH_3 | E_MIPS_MACH_4111;
+ break;
+
+ case bfd_mach_mips4650:
+ val = E_MIPS_ARCH_3 | E_MIPS_MACH_4650;
+ break;
+
+ case bfd_mach_mips8000:
+ val = E_MIPS_ARCH_4;
break;
}
- elf_elfheader (abfd)->e_flags &=~ EF_MIPS_ARCH;
+ elf_elfheader (abfd)->e_flags &= ~ (EF_MIPS_ARCH | EF_MIPS_MACH);
elf_elfheader (abfd)->e_flags |= val;
- /* Set the sh_info field for .gptab sections. */
+ /* Set the sh_info field for .gptab sections and other appropriate
+ info for each special section. */
for (i = 1, hdrpp = elf_elfsections (abfd) + 1;
i < elf_elfheader (abfd)->e_shnum;
i++, hdrpp++)
{
switch ((*hdrpp)->sh_type)
{
+ case SHT_MIPS_MSYM:
case SHT_MIPS_LIBLIST:
sec = bfd_get_section_by_name (abfd, ".dynstr");
if (sec != NULL)
@@ -1887,7 +2376,7 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
sec = bfd_get_section_by_name (abfd,
name + sizeof ".MIPS.content" - 1);
BFD_ASSERT (sec != NULL);
- (*hdrpp)->sh_info = elf_section_data (sec)->this_idx;
+ (*hdrpp)->sh_link = elf_section_data (sec)->this_idx;
break;
case SHT_MIPS_SYMBOL_LIB:
@@ -1917,6 +2406,7 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
BFD_ASSERT (sec != NULL);
(*hdrpp)->sh_link = elf_section_data (sec)->this_idx;
break;
+
}
}
}
@@ -1973,11 +2463,14 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
&& 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;
@@ -1995,6 +2488,8 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
{
elf_flags_init (obfd) = true;
elf_elfheader (obfd)->e_flags = new_flags;
+ elf_elfheader (obfd)->e_ident[EI_CLASS]
+ = elf_elfheader (ibfd)->e_ident[EI_CLASS];
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
&& bfd_get_arch_info (obfd)->the_default)
@@ -2022,7 +2517,7 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
new_flags &= ~EF_MIPS_PIC;
old_flags &= ~EF_MIPS_PIC;
(*_bfd_error_handler)
- ("%s: linking PIC files with non-PIC files",
+ (_("%s: linking PIC files with non-PIC files"),
bfd_get_filename (ibfd));
ok = false;
}
@@ -2032,39 +2527,83 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
new_flags &= ~EF_MIPS_CPIC;
old_flags &= ~EF_MIPS_CPIC;
(*_bfd_error_handler)
- ("%s: linking abicalls files with non-abicalls files",
+ (_("%s: linking abicalls files with non-abicalls files"),
bfd_get_filename (ibfd));
ok = false;
}
- /* Don't warn about mixing -mips1 and -mips2 code, or mixing -mips3
- and -mips4 code. They will normally use the same data sizes and
- calling conventions. */
- if ((new_flags & EF_MIPS_ARCH) != (old_flags & EF_MIPS_ARCH))
+ /* Compare the ISA's. */
+ if ((new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH))
+ != (old_flags & (EF_MIPS_ARCH | EF_MIPS_MACH)))
{
- int new_isa, old_isa;
+ int new_mach = new_flags & EF_MIPS_MACH;
+ int old_mach = old_flags & EF_MIPS_MACH;
+ int new_isa = elf_mips_isa (new_flags);
+ int old_isa = elf_mips_isa (old_flags);
+
+ /* If either has no machine specified, just compare the general isa's.
+ Some combinations of machines are ok, if the isa's match. */
+ if (! new_mach
+ || ! old_mach
+ || new_mach == old_mach
+ )
+ {
+ /* Don't warn about mixing -mips1 and -mips2 code, or mixing -mips3
+ and -mips4 code. They will normally use the same data sizes and
+ calling conventions. */
+
+ if ((new_isa == 1 || new_isa == 2)
+ ? (old_isa != 1 && old_isa != 2)
+ : (old_isa == 1 || old_isa == 2))
+ {
+ (*_bfd_error_handler)
+ (_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
+ bfd_get_filename (ibfd), new_isa, old_isa);
+ ok = false;
+ }
+ }
- new_isa = elf_mips_isa (new_flags);
- old_isa = elf_mips_isa (old_flags);
- if ((new_isa == 1 || new_isa == 2)
- ? (old_isa != 1 && old_isa != 2)
- : (old_isa == 1 || old_isa == 2))
+ else
{
(*_bfd_error_handler)
- ("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)",
- bfd_get_filename (ibfd), new_isa, old_isa);
+ (_("%s: ISA mismatch (%d) with previous modules (%d)"),
+ bfd_get_filename (ibfd),
+ elf_mips_mach (new_flags),
+ elf_mips_mach (old_flags));
ok = false;
}
- new_flags &= ~ EF_MIPS_ARCH;
- old_flags &= ~ EF_MIPS_ARCH;
+ new_flags &= ~ (EF_MIPS_ARCH | EF_MIPS_MACH);
+ old_flags &= ~ (EF_MIPS_ARCH | EF_MIPS_MACH);
+ }
+
+ /* Compare ABI's. The 64-bit ABI does not use EF_MIPS_ABI. But, it
+ does set EI_CLASS differently from any 32-bit ABI. */
+ if ((new_flags & EF_MIPS_ABI) != (old_flags & EF_MIPS_ABI)
+ || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+ != elf_elfheader (obfd)->e_ident[EI_CLASS]))
+ {
+ /* Only error if both are set (to different values). */
+ if (((new_flags & EF_MIPS_ABI) && (old_flags & EF_MIPS_ABI))
+ || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
+ != elf_elfheader (obfd)->e_ident[EI_CLASS]))
+ {
+ (*_bfd_error_handler)
+ (_("%s: ABI mismatch: linking %s module with previous %s modules"),
+ bfd_get_filename (ibfd),
+ elf_mips_abi_name (ibfd),
+ elf_mips_abi_name (obfd));
+ ok = false;
+ }
+ new_flags &= ~EF_MIPS_ABI;
+ old_flags &= ~EF_MIPS_ABI;
}
/* Warn about any other mismatches */
if (new_flags != old_flags)
{
(*_bfd_error_handler)
- ("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
+ (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
bfd_get_filename (ibfd), (unsigned long) new_flags,
(unsigned long) old_flags);
ok = false;
@@ -2079,6 +2618,59 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
return true;
}
+boolean
+_bfd_mips_elf_print_private_bfd_data (abfd, ptr)
+ bfd *abfd;
+ PTR ptr;
+{
+ FILE *file = (FILE *) ptr;
+
+ BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+ /* Print normal ELF private data. */
+ _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+ /* xgettext:c-format */
+ fprintf (file, _ ("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+
+ if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_O32)
+ fprintf (file, _ (" [abi=O32]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_O64)
+ fprintf (file, _ (" [abi=O64]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32)
+ fprintf (file, _ (" [abi=EABI32]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64)
+ fprintf (file, _ (" [abi=EABI64]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI))
+ fprintf (file, _ (" [abi unknown]"));
+ else if (ABI_N32_P (abfd))
+ fprintf (file, _ (" [abi=N32]"));
+ else if (ABI_64_P (abfd))
+ fprintf (file, _ (" [abi=64]"));
+ else
+ fprintf (file, _ (" [no abi set]"));
+
+ if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_1)
+ fprintf (file, _ (" [mips1]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2)
+ fprintf (file, _ (" [mips2]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_3)
+ fprintf (file, _ (" [mips3]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4)
+ fprintf (file, _ (" [mips4]"));
+ else
+ fprintf (file, _ (" [unknown ISA]"));
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_32BITMODE)
+ fprintf (file, _ (" [32bitmode]"));
+ else
+ fprintf (file, _ (" [not 32bitmode]"));
+
+ fputc ('\n', file);
+
+ return true;
+}
+
/* Handle a MIPS specific section when reading an object file. This
is called when elfcode.h finds a section with an unknown type.
This routine supports both the 32-bit and 64-bit ELF ABI.
@@ -2090,8 +2682,10 @@ boolean
_bfd_mips_elf_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf_Internal_Shdr *hdr;
- const char *name;
+ char *name;
{
+ flagword flags = 0;
+
/* There ought to be a place to keep ELF backend specific flags, but
at the moment there isn't one. We just keep track of the
sections by their name, instead. Fortunately, the ABI gives
@@ -2104,7 +2698,7 @@ _bfd_mips_elf_section_from_shdr (abfd, hdr, name)
return false;
break;
case SHT_MIPS_MSYM:
- if (strcmp (name, ".msym") != 0)
+ if (strcmp (name, MIPS_ELF_MSYM_SECTION_NAME (abfd)) != 0)
return false;
break;
case SHT_MIPS_CONFLICT:
@@ -2122,11 +2716,13 @@ _bfd_mips_elf_section_from_shdr (abfd, hdr, name)
case SHT_MIPS_DEBUG:
if (strcmp (name, ".mdebug") != 0)
return false;
+ flags = SEC_DEBUGGING;
break;
case SHT_MIPS_REGINFO:
if (strcmp (name, ".reginfo") != 0
|| hdr->sh_size != sizeof (Elf32_External_RegInfo))
return false;
+ flags = (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_SIZE);
break;
case SHT_MIPS_IFACE:
if (strcmp (name, ".MIPS.interfaces") != 0)
@@ -2137,8 +2733,7 @@ _bfd_mips_elf_section_from_shdr (abfd, hdr, name)
return false;
break;
case SHT_MIPS_OPTIONS:
- if (strcmp (name, ".options") != 0
- && strcmp (name, ".MIPS.options") != 0)
+ if (strcmp (name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) != 0)
return false;
break;
case SHT_MIPS_DWARF:
@@ -2162,29 +2757,15 @@ _bfd_mips_elf_section_from_shdr (abfd, hdr, name)
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
return false;
- if (hdr->sh_type == SHT_MIPS_DEBUG)
+ if (flags)
{
if (! bfd_set_section_flags (abfd, hdr->bfd_section,
(bfd_get_section_flags (abfd,
hdr->bfd_section)
- | SEC_DEBUGGING)))
+ | flags)))
return false;
}
- return true;
-}
-
-/* Handle a 32-bit MIPS ELF specific section. */
-
-static boolean
-mips_elf32_section_from_shdr (abfd, hdr, name)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- char *name;
-{
- if (! _bfd_mips_elf_section_from_shdr (abfd, hdr, name))
- return false;
-
/* FIXME: We should record sh_info for a .gptab section. */
/* For a .reginfo section, set the gp value in the tdata information
@@ -2228,7 +2809,18 @@ mips_elf32_section_from_shdr (abfd, hdr, name)
bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l,
&intopt);
- if (intopt.kind == ODK_REGINFO)
+ if (ABI_64_P (abfd) && intopt.kind == ODK_REGINFO)
+ {
+ Elf64_Internal_RegInfo intreg;
+
+ bfd_mips_elf64_swap_reginfo_in
+ (abfd,
+ ((Elf64_External_RegInfo *)
+ (l + sizeof (Elf_External_Options))),
+ &intreg);
+ elf_gp (abfd) = intreg.ri_gp_value;
+ }
+ else if (intopt.kind == ODK_REGINFO)
{
Elf32_RegInfo intreg;
@@ -2267,12 +2859,6 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_info = sec->_raw_size / sizeof (Elf32_Lib);
/* The sh_link field is set in final_write_processing. */
}
- else if (strcmp (name, ".msym") == 0)
- {
- hdr->sh_type = SHT_MIPS_MSYM;
- hdr->sh_entsize = 8;
- /* FIXME: Set the sh_info field. */
- }
else if (strcmp (name, ".conflict") == 0)
hdr->sh_type = SHT_MIPS_CONFLICT;
else if (strncmp (name, ".gptab.", sizeof ".gptab." - 1) == 0)
@@ -2302,11 +2888,6 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_entsize = sizeof (Elf32_External_RegInfo);
else
hdr->sh_entsize = 1;
-
- /* Force the section size to the correct value, even if the
- linker thinks it is larger. The link routine below will only
- write out this much data for .reginfo. */
- hdr->sh_size = sec->_raw_size = sizeof (Elf32_External_RegInfo);
}
else if (SGI_COMPAT (abfd)
&& (strcmp (name, ".hash") == 0
@@ -2314,9 +2895,13 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
|| strcmp (name, ".dynstr") == 0))
{
hdr->sh_entsize = 0;
+#if 0
+ /* This isn't how the Irix 6 linker behaves. */
hdr->sh_info = SIZEOF_MIPS_DYNSYM_SECNAMES;
+#endif
}
else if (strcmp (name, ".got") == 0
+ || strcmp (name, MIPS_ELF_SRDATA_SECTION_NAME (abfd)) == 0
|| strcmp (name, ".sdata") == 0
|| strcmp (name, ".sbss") == 0
|| strcmp (name, ".lit4") == 0
@@ -2327,13 +2912,13 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_type = SHT_MIPS_IFACE;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
}
- else if (strcmp (name, ".MIPS.content") == 0)
+ else if (strncmp (name, ".MIPS.content", strlen (".MIPS.content")) == 0)
{
hdr->sh_type = SHT_MIPS_CONTENT;
+ hdr->sh_flags |= SHF_MIPS_NOSTRIP;
/* The sh_info field is set in final_write_processing. */
}
- else if (strcmp (name, ".options") == 0
- || strcmp (name, ".MIPS.options") == 0)
+ else if (strcmp (name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
{
hdr->sh_type = SHT_MIPS_OPTIONS;
hdr->sh_entsize = 1;
@@ -2355,6 +2940,29 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
/* The sh_link field is set in final_write_processing. */
}
+ else if (strcmp (name, MIPS_ELF_MSYM_SECTION_NAME (abfd)) == 0)
+ {
+ hdr->sh_type = SHT_MIPS_MSYM;
+ hdr->sh_flags |= SHF_ALLOC;
+ hdr->sh_entsize = 8;
+ }
+
+ /* The generic elf_fake_sections will set up REL_HDR using the
+ default kind of relocations. But, we may actually need both
+ kinds of relocations, so we set up the second header here. */
+ if ((sec->flags & SEC_RELOC) != 0)
+ {
+ struct bfd_elf_section_data *esd;
+
+ esd = elf_section_data (sec);
+ BFD_ASSERT (esd->rel_hdr2 == NULL);
+ esd->rel_hdr2
+ = (Elf_Internal_Shdr *) bfd_zalloc (abfd, sizeof (Elf_Internal_Shdr));
+ if (!esd->rel_hdr2)
+ return false;
+ _bfd_elf_init_reloc_shdr (abfd, esd->rel_hdr2, sec,
+ !elf_section_data (sec)->use_rela_p);
+ }
return true;
}
@@ -2367,8 +2975,8 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
boolean
_bfd_mips_elf_section_from_bfd_section (abfd, hdr, sec, retval)
- bfd *abfd;
- Elf32_Internal_Shdr *hdr;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
asection *sec;
int *retval;
{
@@ -2397,8 +3005,7 @@ _bfd_mips_elf_set_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
- if (strcmp (section->name, ".options") == 0
- || strcmp (section->name, ".MIPS.options") == 0)
+ if (strcmp (section->name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
{
bfd_byte *c;
@@ -2441,57 +3048,8 @@ _bfd_mips_elf_section_processing (abfd, hdr)
bfd *abfd;
Elf_Internal_Shdr *hdr;
{
- if (hdr->bfd_section != NULL)
- {
- const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
-
- if (strcmp (name, ".sdata") == 0)
- {
- hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
- hdr->sh_type = SHT_PROGBITS;
- }
- else if (strcmp (name, ".sbss") == 0)
- {
- hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
- hdr->sh_type = SHT_NOBITS;
- }
- else if (strcmp (name, ".lit8") == 0
- || strcmp (name, ".lit4") == 0)
- {
- hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
- hdr->sh_type = SHT_PROGBITS;
- }
- else if (strcmp (name, ".compact_rel") == 0)
- {
- hdr->sh_flags = 0;
- hdr->sh_type = SHT_PROGBITS;
- }
- else if (strcmp (name, ".rtproc") == 0)
- {
- if (hdr->sh_addralign != 0 && hdr->sh_entsize == 0)
- {
- unsigned int adjust;
-
- adjust = hdr->sh_size % hdr->sh_addralign;
- if (adjust != 0)
- hdr->sh_size += hdr->sh_addralign - adjust;
- }
- }
- }
-
- return true;
-}
-
-/* Work over a section just before writing it out. We update the GP
- value in the SHT_MIPS_REGINFO and SHT_MIPS_OPTIONS sections based
- on the value we are using. */
-
-static boolean
-mips_elf32_section_processing (abfd, hdr)
- bfd *abfd;
- Elf32_Internal_Shdr *hdr;
-{
- if (hdr->sh_type == SHT_MIPS_REGINFO)
+ if (hdr->sh_type == SHT_MIPS_REGINFO
+ && hdr->sh_size > 0)
{
bfd_byte buf[4];
@@ -2530,7 +3088,22 @@ mips_elf32_section_processing (abfd, hdr)
bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l,
&intopt);
- if (intopt.kind == ODK_REGINFO)
+ if (ABI_64_P (abfd) && intopt.kind == ODK_REGINFO)
+ {
+ bfd_byte buf[8];
+
+ if (bfd_seek (abfd,
+ (hdr->sh_offset
+ + (l - contents)
+ + sizeof (Elf_External_Options)
+ + (sizeof (Elf64_External_RegInfo) - 8)),
+ SEEK_SET) == -1)
+ return false;
+ bfd_h_put_64 (abfd, elf_gp (abfd), buf);
+ if (bfd_write (buf, 1, 8, abfd) != 8)
+ return false;
+ }
+ else if (intopt.kind == ODK_REGINFO)
{
bfd_byte buf[4];
@@ -2549,8 +3122,48 @@ mips_elf32_section_processing (abfd, hdr)
}
}
- return _bfd_mips_elf_section_processing (abfd, hdr);
+ if (hdr->bfd_section != NULL)
+ {
+ const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
+
+ if (strcmp (name, ".sdata") == 0
+ || strcmp (name, ".lit8") == 0
+ || strcmp (name, ".lit4") == 0)
+ {
+ hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
+ hdr->sh_type = SHT_PROGBITS;
+ }
+ else if (strcmp (name, ".sbss") == 0)
+ {
+ hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
+ hdr->sh_type = SHT_NOBITS;
+ }
+ else if (strcmp (name, MIPS_ELF_SRDATA_SECTION_NAME (abfd)) == 0)
+ {
+ hdr->sh_flags |= SHF_ALLOC | SHF_MIPS_GPREL;
+ hdr->sh_type = SHT_PROGBITS;
+ }
+ else if (strcmp (name, ".compact_rel") == 0)
+ {
+ hdr->sh_flags = 0;
+ hdr->sh_type = SHT_PROGBITS;
+ }
+ else if (strcmp (name, ".rtproc") == 0)
+ {
+ if (hdr->sh_addralign != 0 && hdr->sh_entsize == 0)
+ {
+ unsigned int adjust;
+
+ adjust = hdr->sh_size % hdr->sh_addralign;
+ if (adjust != 0)
+ hdr->sh_size += hdr->sh_addralign - adjust;
+ }
+ }
+ }
+
+ return true;
}
+
/* MIPS ELF uses two common sections. One is the usual one, and the
other is for small objects. All the small objects are kept
@@ -2617,8 +3230,9 @@ _bfd_mips_elf_symbol_processing (abfd, asym)
case SHN_COMMON:
/* Common symbols less than the GP size are automatically
- treated as SHN_MIPS_SCOMMON symbols. */
- if (asym->value > elf_gp_size (abfd))
+ treated as SHN_MIPS_SCOMMON symbols on IRIX5. */
+ if (asym->value > elf_gp_size (abfd)
+ || IRIX_COMPAT (abfd) == ict_irix6)
break;
/* Fall through. */
case SHN_MIPS_SCOMMON:
@@ -2658,39 +3272,40 @@ _bfd_mips_elf_symbol_processing (abfd, asym)
/* When creating an Irix 5 executable, we need REGINFO and RTPROC
segments. */
-static int
-mips_elf_additional_program_headers (abfd)
+int
+_bfd_mips_elf_additional_program_headers (abfd)
bfd *abfd;
{
asection *s;
- int ret;
-
- ret = 0;
+ int ret = 0;
- if (! SGI_COMPAT (abfd))
- return ret;
+ if (!SGI_COMPAT (abfd))
+ return 0;
+ /* See if we need a PT_MIPS_REGINFO segment. */
s = bfd_get_section_by_name (abfd, ".reginfo");
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
- {
- /* We need a PT_MIPS_REGINFO segment. */
- ++ret;
- }
+ if (s && (s->flags & SEC_LOAD))
+ ++ret;
- if (bfd_get_section_by_name (abfd, ".dynamic") != NULL
- && bfd_get_section_by_name (abfd, ".mdebug") != NULL)
- {
- /* We need a PT_MIPS_RTPROC segment. */
- ++ret;
- }
+ /* See if we need a PT_MIPS_OPTIONS segment. */
+ if (IRIX_COMPAT (abfd) == ict_irix6
+ && bfd_get_section_by_name (abfd,
+ MIPS_ELF_OPTIONS_SECTION_NAME (abfd)))
+ ++ret;
+
+ /* See if we need a PT_MIPS_RTPROC segment. */
+ if (IRIX_COMPAT (abfd) == ict_irix5
+ && bfd_get_section_by_name (abfd, ".dynamic")
+ && bfd_get_section_by_name (abfd, ".mdebug"))
+ ++ret;
return ret;
}
/* Modify the segment map for an Irix 5 executable. */
-static boolean
-mips_elf_modify_segment_map (abfd)
+boolean
+_bfd_mips_elf_modify_segment_map (abfd)
bfd *abfd;
{
asection *s;
@@ -2729,114 +3344,156 @@ mips_elf_modify_segment_map (abfd)
}
}
- /* If there are .dynamic and .mdebug sections, we make a room for
- the RTPROC header. FIXME: Rewrite without section names. */
- if (bfd_get_section_by_name (abfd, ".interp") == NULL
- && bfd_get_section_by_name (abfd, ".dynamic") != NULL
- && bfd_get_section_by_name (abfd, ".mdebug") != NULL)
+ /* For IRIX 6, we don't have .mdebug sections, nor does anything but
+ .dynamic end up in PT_DYNAMIC. However, we do have to insert a
+ PT_OPTIONS segement immediately following the program header
+ table. */
+ if (IRIX_COMPAT (abfd) == ict_irix6)
{
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_MIPS_RTPROC)
+ asection *s;
+
+ for (s = abfd->sections; s; s = s->next)
+ if (elf_section_data (s)->this_hdr.sh_type == SHT_MIPS_OPTIONS)
break;
- if (m == NULL)
+
+ if (s)
{
- m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof *m);
+ struct elf_segment_map *options_segment;
+
+ /* Usually, there's a program header table. But, sometimes
+ there's not (like when running the `ld' testsuite). So,
+ if there's no program header table, we just put the
+ options segement at the end. */
+ for (pm = &elf_tdata (abfd)->segment_map;
+ *pm != NULL;
+ pm = &(*pm)->next)
+ if ((*pm)->p_type == PT_PHDR)
+ break;
+
+ options_segment = bfd_zalloc (abfd,
+ sizeof (struct elf_segment_map));
+ options_segment->next = *pm;
+ options_segment->p_type = PT_MIPS_OPTIONS;
+ options_segment->p_flags = PF_R;
+ options_segment->p_flags_valid = true;
+ options_segment->count = 1;
+ options_segment->sections[0] = s;
+ *pm = options_segment;
+ }
+ }
+ else
+ {
+ /* If there are .dynamic and .mdebug sections, we make a room
+ for the RTPROC header. FIXME: Rewrite without section names. */
+ if (bfd_get_section_by_name (abfd, ".interp") == NULL
+ && bfd_get_section_by_name (abfd, ".dynamic") != NULL
+ && bfd_get_section_by_name (abfd, ".mdebug") != NULL)
+ {
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_MIPS_RTPROC)
+ break;
if (m == NULL)
- return false;
+ {
+ m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof *m);
+ if (m == NULL)
+ return false;
- m->p_type = PT_MIPS_RTPROC;
+ m->p_type = PT_MIPS_RTPROC;
- s = bfd_get_section_by_name (abfd, ".rtproc");
- if (s == NULL)
- {
- m->count = 0;
- m->p_flags = 0;
- m->p_flags_valid = 1;
- }
- else
- {
- m->count = 1;
- m->sections[0] = s;
- }
+ s = bfd_get_section_by_name (abfd, ".rtproc");
+ if (s == NULL)
+ {
+ m->count = 0;
+ m->p_flags = 0;
+ m->p_flags_valid = 1;
+ }
+ else
+ {
+ m->count = 1;
+ m->sections[0] = s;
+ }
- /* We want to put it after the DYNAMIC segment. */
- pm = &elf_tdata (abfd)->segment_map;
- while (*pm != NULL && (*pm)->p_type != PT_DYNAMIC)
- pm = &(*pm)->next;
- if (*pm != NULL)
- pm = &(*pm)->next;
+ /* We want to put it after the DYNAMIC segment. */
+ pm = &elf_tdata (abfd)->segment_map;
+ while (*pm != NULL && (*pm)->p_type != PT_DYNAMIC)
+ pm = &(*pm)->next;
+ if (*pm != NULL)
+ pm = &(*pm)->next;
- m->next = *pm;
- *pm = m;
+ m->next = *pm;
+ *pm = m;
+ }
}
- }
- /* On Irix 5, the PT_DYNAMIC segment includes the .dynamic, .dynstr,
- .dynsym, and .hash sections, and everything in between. */
- for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL; pm = &(*pm)->next)
- if ((*pm)->p_type == PT_DYNAMIC)
- break;
- m = *pm;
- if (m != NULL
- && m->count == 1
- && strcmp (m->sections[0]->name, ".dynamic") == 0)
- {
- static const char *sec_names[] =
- { ".dynamic", ".dynstr", ".dynsym", ".hash" };
- bfd_vma low, high;
- unsigned int i, c;
- struct elf_segment_map *n;
-
- low = 0xffffffff;
- high = 0;
- for (i = 0; i < sizeof sec_names / sizeof sec_names[0]; i++)
+ /* On Irix 5, the PT_DYNAMIC segment includes the .dynamic,
+ .dynstr, .dynsym, and .hash sections, and everything in
+ between. */
+ for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL; pm = &(*pm)->next)
+ if ((*pm)->p_type == PT_DYNAMIC)
+ break;
+ m = *pm;
+ if (m != NULL
+ && m->count == 1
+ && strcmp (m->sections[0]->name, ".dynamic") == 0)
{
- s = bfd_get_section_by_name (abfd, sec_names[i]);
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
+ static const char *sec_names[] =
+ { ".dynamic", ".dynstr", ".dynsym", ".hash" };
+ bfd_vma low, high;
+ unsigned int i, c;
+ struct elf_segment_map *n;
+
+ low = 0xffffffff;
+ high = 0;
+ for (i = 0; i < sizeof sec_names / sizeof sec_names[0]; i++)
{
- bfd_size_type sz;
-
- if (low > s->vma)
- low = s->vma;
- sz = s->_cooked_size;
- if (sz == 0)
- sz = s->_raw_size;
- if (high < s->vma + sz)
- high = s->vma + sz;
+ s = bfd_get_section_by_name (abfd, sec_names[i]);
+ if (s != NULL && (s->flags & SEC_LOAD) != 0)
+ {
+ bfd_size_type sz;
+
+ if (low > s->vma)
+ low = s->vma;
+ sz = s->_cooked_size;
+ if (sz == 0)
+ sz = s->_raw_size;
+ if (high < s->vma + sz)
+ high = s->vma + sz;
+ }
}
- }
- c = 0;
- for (s = abfd->sections; s != NULL; s = s->next)
- if ((s->flags & SEC_LOAD) != 0
- && s->vma >= low
- && ((s->vma
- + (s->_cooked_size != 0 ? s->_cooked_size : s->_raw_size))
- <= high))
- ++c;
-
- n = ((struct elf_segment_map *)
- bfd_zalloc (abfd, sizeof *n + (c - 1) * sizeof (asection *)));
- if (n == NULL)
- return false;
- *n = *m;
- n->count = c;
+ c = 0;
+ for (s = abfd->sections; s != NULL; s = s->next)
+ if ((s->flags & SEC_LOAD) != 0
+ && s->vma >= low
+ && ((s->vma
+ + (s->_cooked_size != 0 ? s->_cooked_size : s->_raw_size))
+ <= high))
+ ++c;
+
+ n = ((struct elf_segment_map *)
+ bfd_zalloc (abfd, sizeof *n + (c - 1) * sizeof (asection *)));
+ if (n == NULL)
+ return false;
+ *n = *m;
+ n->count = c;
- i = 0;
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LOAD) != 0
- && s->vma >= low
- && ((s->vma
- + (s->_cooked_size != 0 ? s->_cooked_size : s->_raw_size))
- <= high))
+ i = 0;
+ for (s = abfd->sections; s != NULL; s = s->next)
{
- n->sections[i] = s;
- ++i;
+ if ((s->flags & SEC_LOAD) != 0
+ && s->vma >= low
+ && ((s->vma
+ + (s->_cooked_size != 0 ?
+ s->_cooked_size : s->_raw_size))
+ <= high))
+ {
+ n->sections[i] = s;
+ ++i;
+ }
}
- }
- *pm = n;
+ *pm = n;
+ }
}
return true;
@@ -2903,6 +3560,7 @@ _bfd_mips_elf_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));
ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size);
if (ext_hdr == NULL && swap->external_hdr_size != 0)
@@ -3017,11 +3675,17 @@ _bfd_mips_elf_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,
+ if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
line_ptr))
return true;
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr,
+ ABI_64_P (abfd) ? 8 : 0))
+ return true;
+
msec = bfd_get_section_by_name (abfd, ".mdebug");
if (msec != NULL)
{
@@ -3143,43 +3807,16 @@ _bfd_mips_elf_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
#define CALL_STUB ".mips16.call."
#define CALL_FP_STUB ".mips16.call.fp."
-/* The MIPS ELF linker needs additional information for each symbol in
- the global hash table. */
-
-struct mips_elf_link_hash_entry
-{
- struct elf_link_hash_entry root;
-
- /* External symbol information. */
- EXTR esym;
-
- /* Number of MIPS_32 or MIPS_REL32 relocs against this symbol. */
- unsigned int mips_32_relocs;
-
- /* If there is a stub that 32 bit functions should use to call this
- 16 bit function, this points to the section containing the stub. */
- asection *fn_stub;
-
- /* Whether we need the fn_stub; this is set if this symbol appears
- in any relocs other than a 16 bit call. */
- boolean need_fn_stub;
-
- /* If there is a stub that 16 bit functions should use to call this
- 32 bit function, this points to the section containing the stub. */
- asection *call_stub;
-
- /* This is like the call_stub field, but it is used if the function
- being called returns a floating point value. */
- asection *call_fp_stub;
-};
-
/* MIPS ELF linker hash table. */
struct mips_elf_link_hash_table
{
struct elf_link_hash_table root;
+#if 0
+ /* We no longer use this. */
/* String section indices for the dynamic section symbols. */
bfd_size_type dynsym_sec_strindex[SIZEOF_MIPS_DYNSYM_SECNAMES];
+#endif
/* The number of .rtproc entries. */
bfd_size_type procedure_count;
/* The size of the .compact_rel section (if SGI_COMPAT). */
@@ -3247,7 +3884,8 @@ mips_elf_link_hash_newfunc (entry, table, string)
/* We use -2 as a marker to indicate that the information has
not been set. -1 means there is no associated ifd. */
ret->esym.ifd = -2;
- ret->mips_32_relocs = 0;
+ ret->possibly_dynamic_relocs = 0;
+ ret->min_dyn_reloc_index = 0;
ret->fn_stub = NULL;
ret->need_fn_stub = false;
ret->call_stub = NULL;
@@ -3259,12 +3897,11 @@ mips_elf_link_hash_newfunc (entry, table, string)
/* Create a MIPS ELF linker hash table. */
-static struct bfd_link_hash_table *
-mips_elf_link_hash_table_create (abfd)
+struct bfd_link_hash_table *
+_bfd_mips_elf_link_hash_table_create (abfd)
bfd *abfd;
{
struct mips_elf_link_hash_table *ret;
- unsigned int i;
ret = ((struct mips_elf_link_hash_table *)
bfd_alloc (abfd, sizeof (struct mips_elf_link_hash_table)));
@@ -3278,8 +3915,11 @@ mips_elf_link_hash_table_create (abfd)
return NULL;
}
+#if 0
+ /* We no longer use this. */
for (i = 0; i < SIZEOF_MIPS_DYNSYM_SECNAMES; i++)
ret->dynsym_sec_strindex[i] = (bfd_size_type) -1;
+#endif
ret->procedure_count = 0;
ret->compact_rel_size = 0;
ret->use_rld_obj_head = false;
@@ -3293,13 +3933,13 @@ mips_elf_link_hash_table_create (abfd)
file. We must handle the special MIPS section numbers here. */
/*ARGSUSED*/
-static boolean
-mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
+boolean
+_bfd_mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd *abfd;
struct bfd_link_info *info;
const Elf_Internal_Sym *sym;
const char **namep;
- flagword *flagsp;
+ flagword *flagsp ATTRIBUTE_UNUSED;
asection **secp;
bfd_vma *valp;
{
@@ -3317,7 +3957,8 @@ mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
case SHN_COMMON:
/* Common symbols less than the GP size are automatically
treated as SHN_MIPS_SCOMMON symbols. */
- if (sym->st_size > elf_gp_size (abfd))
+ if (sym->st_size > elf_gp_size (abfd)
+ || IRIX_COMPAT (abfd) == ict_irix6)
break;
/* Fall through. */
case SHN_MIPS_SCOMMON:
@@ -3337,7 +3978,7 @@ mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
mips_elf_text_section.symbol = &mips_elf_text_symbol;
mips_elf_text_section.symbol_ptr_ptr = &mips_elf_text_symbol_ptr;
mips_elf_text_symbol.name = ".text";
- mips_elf_text_symbol.flags = BSF_SECTION_SYM;
+ mips_elf_text_symbol.flags = BSF_SECTION_SYM | BSF_DYNAMIC;
mips_elf_text_symbol.section = &mips_elf_text_section;
mips_elf_text_symbol_ptr = &mips_elf_text_symbol;
mips_elf_text_section_ptr = &mips_elf_text_section;
@@ -3361,7 +4002,7 @@ mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
mips_elf_data_section.symbol = &mips_elf_data_symbol;
mips_elf_data_section.symbol_ptr_ptr = &mips_elf_data_symbol_ptr;
mips_elf_data_symbol.name = ".data";
- mips_elf_data_symbol.flags = BSF_SECTION_SYM;
+ mips_elf_data_symbol.flags = BSF_SECTION_SYM | BSF_DYNAMIC;
mips_elf_data_symbol.section = &mips_elf_data_section;
mips_elf_data_symbol_ptr = &mips_elf_data_symbol;
mips_elf_data_section_ptr = &mips_elf_data_section;
@@ -3580,7 +4221,7 @@ mips_elf_output_extsym (h, data)
{
output_section = sec->output_section;
if (output_section != NULL)
- h->esym.asym.value = (h->root.plt_offset
+ h->esym.asym.value = (h->root.plt.offset
+ sec->output_offset
+ output_section->vma);
else
@@ -3626,7 +4267,7 @@ mips_elf_create_procedure_table (handle, abfd, info, s, debug)
unsigned long i;
PDR pdr;
SYMR sym;
- const char *no_name_func = "static procedure (no name)";
+ const char *no_name_func = _("static procedure (no name)");
epdr = NULL;
rpdr = NULL;
@@ -3770,8 +4411,8 @@ gptab_compare (p1, p2)
the .mdebug sections. We need to merge all instances of these
sections together, not write them all out sequentially. */
-static boolean
-mips_elf_final_link (abfd, info)
+boolean
+_bfd_mips_elf_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
@@ -3787,22 +4428,69 @@ mips_elf_final_link (abfd, info)
HDRR *symhdr = &debug.symbolic_header;
PTR mdebug_handle = NULL;
- /* Drop the .options section, since it has special semantics which I
- haven't bothered to figure out. */
- for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
+ /* If all the things we linked together were PIC, but we're
+ producing an executable (rather than a shared object), then the
+ resulting file is CPIC (i.e., it calls PIC code.) */
+ if (!info->shared
+ && !info->relocateable
+ && elf_elfheader (abfd)->e_flags & EF_MIPS_PIC)
{
- if (strcmp ((*secpp)->name, ".options") == 0)
- {
- for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
- if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->flags &=~ SEC_HAS_CONTENTS;
- (*secpp)->link_order_head = NULL;
- *secpp = (*secpp)->next;
- --abfd->section_count;
- break;
- }
+ elf_elfheader (abfd)->e_flags &= ~EF_MIPS_PIC;
+ elf_elfheader (abfd)->e_flags |= EF_MIPS_CPIC;
}
+ /* We'd carefully arranged the dynamic symbol indices, and then the
+ generic size_dynamic_sections renumbered them out from under us.
+ Rather than trying somehow to prevent the renumbering, just do
+ the sort again. */
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ bfd *dynobj;
+ asection *got;
+ struct mips_got_info *g;
+
+ /* When we resort, we must tell mips_elf_sort_hash_table what
+ the lowest index it may use is. That's the number of section
+ symbols we're going to add. The generic ELF linker only
+ adds these symbols when building a shared object. Note that
+ we count the sections after (possibly) removing the .options
+ section above. */
+ if (!mips_elf_sort_hash_table (info, (info->shared
+ ? bfd_count_sections (abfd) + 1
+ : 1)))
+ return false;
+
+ /* Make sure we didn't grow the global .got region. */
+ dynobj = elf_hash_table (info)->dynobj;
+ got = bfd_get_section_by_name (dynobj, ".got");
+ g = (struct mips_got_info *) elf_section_data (got)->tdata;
+
+ if (g->global_gotsym != NULL)
+ BFD_ASSERT ((elf_hash_table (info)->dynsymcount
+ - g->global_gotsym->dynindx)
+ <= g->global_gotno);
+ }
+
+ /* On IRIX5, we omit the .options section. On IRIX6, however, we
+ include it, even though we don't process it quite right. (Some
+ entries are supposed to be merged.) Empirically, we seem to be
+ better off including it then not. */
+ if (IRIX_COMPAT (abfd) == ict_irix5)
+ for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
+ {
+ if (strcmp ((*secpp)->name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
+ {
+ for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
+ if (p->type == bfd_indirect_link_order)
+ p->u.indirect.section->flags &=~ SEC_HAS_CONTENTS;
+ (*secpp)->link_order_head = NULL;
+ *secpp = (*secpp)->next;
+ --abfd->section_count;
+
+ break;
+ }
+ }
+
/* Get a value for the GP register. */
if (elf_gp (abfd) == 0)
{
@@ -3818,17 +4506,14 @@ mips_elf_final_link (abfd, info)
{
bfd_vma lo;
- /* Make up a value. */
+ /* Find the GP-relative section with the lowest offset. */
lo = (bfd_vma) -1;
for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- {
- if (o->vma < lo
- && (strcmp (o->name, ".sbss") == 0
- || strcmp (o->name, ".sdata") == 0
- || strcmp (o->name, ".lit4") == 0
- || strcmp (o->name, ".lit8") == 0))
- lo = o->vma;
- }
+ if (o->vma < lo
+ && (elf_section_data (o)->this_hdr.sh_flags & SHF_MIPS_GPREL))
+ lo = o->vma;
+
+ /* And calculate GP relative to that. */
elf_gp (abfd) = lo + ELF_MIPS_GP_OFFSET (abfd);
}
else
@@ -3901,8 +4586,8 @@ mips_elf_final_link (abfd, info)
input_section->flags &=~ SEC_HAS_CONTENTS;
}
- /* Force the section size to the value we want. */
- o->_raw_size = sizeof (Elf32_External_RegInfo);
+ /* Size has been set in mips_elf_always_size_sections */
+ BFD_ASSERT(o->_raw_size == sizeof (Elf32_External_RegInfo));
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
@@ -4199,7 +4884,7 @@ mips_elf_final_link (abfd, info)
else
{
(*_bfd_error_handler)
- ("%s: illegal section name `%s'",
+ (_("%s: illegal section name `%s'"),
bfd_get_filename (abfd), o->name);
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -4361,7 +5046,17 @@ mips_elf_final_link (abfd, info)
}
/* Invoke the regular ELF backend linker to do all the work. */
- if (! bfd_elf32_bfd_final_link (abfd, info))
+ if (ABI_64_P (abfd))
+ {
+#ifdef BFD64
+ if (!bfd_elf64_bfd_final_link (abfd, info))
+ return false;
+#else
+ abort ();
+ return false;
+#endif /* BFD64 */
+ }
+ else if (!bfd_elf32_bfd_final_link (abfd, info))
return false;
/* Now write out the computed sections. */
@@ -4421,1001 +5116,1782 @@ mips_elf_final_link (abfd, info)
return true;
}
-/* Handle a MIPS ELF HI16 reloc. */
+/* Returns the GOT section for ABFD. */
-static void
-mips_elf_relocate_hi16 (input_bfd, relhi, rello, contents, addend)
- bfd *input_bfd;
- Elf_Internal_Rela *relhi;
- Elf_Internal_Rela *rello;
- bfd_byte *contents;
- bfd_vma addend;
+static asection *
+mips_elf_got_section (abfd)
+ bfd *abfd;
{
- bfd_vma insn;
- bfd_vma addlo;
+ return bfd_get_section_by_name (abfd, ".got");
+}
- insn = bfd_get_32 (input_bfd, contents + relhi->r_offset);
+/* Returns the GOT information associated with the link indicated by
+ INFO. If SGOTP is non-NULL, it is filled in with the GOT
+ section. */
+
+static struct mips_got_info *
+mips_elf_got_info (abfd, sgotp)
+ bfd *abfd;
+ asection **sgotp;
+{
+ asection *sgot;
+ struct mips_got_info *g;
- addlo = bfd_get_32 (input_bfd, contents + rello->r_offset);
- addlo &= 0xffff;
+ sgot = mips_elf_got_section (abfd);
+ BFD_ASSERT (sgot != NULL);
+ BFD_ASSERT (elf_section_data (sgot) != NULL);
+ g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
+ BFD_ASSERT (g != NULL);
- addend += ((insn & 0xffff) << 16) + addlo;
+ if (sgotp)
+ *sgotp = sgot;
+ return g;
+}
- if ((addlo & 0x8000) != 0)
- addend -= 0x10000;
- if ((addend & 0x8000) != 0)
- addend += 0x10000;
+/* Return whether a relocation is against a local symbol. */
- bfd_put_32 (input_bfd,
- (insn & 0xffff0000) | ((addend >> 16) & 0xffff),
- contents + relhi->r_offset);
+static boolean
+mips_elf_local_relocation_p (input_bfd, relocation, local_sections)
+ bfd *input_bfd;
+ const Elf_Internal_Rela *relocation;
+ asection **local_sections;
+{
+ unsigned long r_symndx;
+ Elf_Internal_Shdr *symtab_hdr;
+
+ r_symndx = ELF32_R_SYM (relocation->r_info);
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ if (! elf_bad_symtab (input_bfd))
+ return r_symndx < symtab_hdr->sh_info;
+ else
+ {
+ /* The symbol table does not follow the rule that local symbols
+ must come before globals. */
+ return local_sections[r_symndx] != NULL;
+ }
}
-/* Handle a MIPS ELF local GOT16 reloc. */
+/* Sign-extend VALUE, which has the indicated number of BITS. */
+
+static bfd_vma
+mips_elf_sign_extend (value, bits)
+ bfd_vma value;
+ int bits;
+{
+ if (value & ((bfd_vma)1 << (bits - 1)))
+ /* VALUE is negative. */
+ value |= ((bfd_vma) - 1) << bits;
+
+ return value;
+}
+
+/* Return non-zero if the indicated VALUE has overflowed the maximum
+ range expressable by a signed number with the indicated number of
+ BITS. */
static boolean
-mips_elf_relocate_got_local (output_bfd, input_bfd, sgot, relhi, rello,
- contents, addend)
+mips_elf_overflow_p (value, bits)
+ bfd_vma value;
+ int bits;
+{
+ bfd_signed_vma svalue = (bfd_signed_vma) value;
+
+ if (svalue > (1 << (bits - 1)) - 1)
+ /* The value is too big. */
+ return true;
+ else if (svalue < -(1 << (bits - 1)))
+ /* The value is too small. */
+ return true;
+
+ /* All is well. */
+ return false;
+}
+
+/* Calculate the %high function. */
+
+static bfd_vma
+mips_elf_high (value)
+ bfd_vma value;
+{
+ return ((value + (bfd_vma) 0x8000) >> 16) & 0xffff;
+}
+
+/* Calculate the %higher function. */
+
+static bfd_vma
+mips_elf_higher (value)
+ bfd_vma value ATTRIBUTE_UNUSED;
+{
+#ifdef BFD64
+ return ((value + (bfd_vma) 0x80008000) >> 32) & 0xffff;
+#else
+ abort ();
+ return (bfd_vma) -1;
+#endif
+}
+
+/* Calculate the %highest function. */
+
+static bfd_vma
+mips_elf_highest (value)
+ bfd_vma value ATTRIBUTE_UNUSED;
+{
+#ifdef BFD64
+ return ((value + (bfd_vma) 0x800080008000) >> 48) & 0xffff;
+#else
+ abort ();
+ return (bfd_vma) -1;
+#endif
+}
+
+/* Returns the GOT index for the global symbol indicated by H. */
+
+static bfd_vma
+mips_elf_global_got_index (abfd, h)
+ bfd *abfd;
+ struct elf_link_hash_entry *h;
+{
+ bfd_vma index;
+ asection *sgot;
+ struct mips_got_info *g;
+
+ g = mips_elf_got_info (abfd, &sgot);
+
+ /* Once we determine the global GOT entry with the lowest dynamic
+ symbol table index, we must put all dynamic symbols with greater
+ indices into the GOT. That makes it easy to calculate the GOT
+ offset. */
+ BFD_ASSERT (h->dynindx >= g->global_gotsym->dynindx);
+ index = ((h->dynindx - g->global_gotsym->dynindx + g->local_gotno)
+ * MIPS_ELF_GOT_SIZE (abfd));
+ BFD_ASSERT (index < sgot->_raw_size);
+
+ return index;
+}
+
+/* Returns the offset for the entry at the INDEXth position
+ in the GOT. */
+
+static bfd_vma
+mips_elf_got_offset_from_index (dynobj, output_bfd, index)
+ bfd *dynobj;
bfd *output_bfd;
- bfd *input_bfd;
- asection *sgot;
- Elf_Internal_Rela *relhi;
- Elf_Internal_Rela *rello;
- bfd_byte *contents;
- bfd_vma addend;
+ bfd_vma index;
{
- unsigned int assigned_gotno;
- unsigned int i;
- bfd_vma insn;
- bfd_vma addlo;
- bfd_vma address;
- bfd_vma hipage;
- bfd_byte *got_contents;
+ asection *sgot;
+ bfd_vma gp;
+
+ sgot = mips_elf_got_section (dynobj);
+ gp = _bfd_get_gp_value (output_bfd);
+ return (sgot->output_section->vma + sgot->output_offset + index -
+ gp);
+}
+
+/* If H is a symbol that needs a global GOT entry, but has a dynamic
+ symbol table index lower than any we've seen to date, record it for
+ posterity. */
+
+static boolean
+mips_elf_record_global_got_symbol (h, info, g)
+ struct elf_link_hash_entry *h;
+ struct bfd_link_info *info;
+ struct mips_got_info *g ATTRIBUTE_UNUSED;
+{
+ /* A global symbol in the GOT must also be in the dynamic symbol
+ table. */
+ if (h->dynindx == -1
+ && !bfd_elf32_link_record_dynamic_symbol (info, h))
+ return false;
+
+ /* If we've already marked this entry as need GOT space, we don't
+ need to do it again. */
+ if (h->got.offset != (bfd_vma) - 1)
+ return true;
+
+ /* By setting this to a value other than -1, we are indicating that
+ there needs to be a GOT entry for H. */
+ h->got.offset = 0;
+
+ return true;
+}
+
+/* This structure is passed to mips_elf_sort_hash_table_f when sorting
+ the dynamic symbols. */
+
+struct mips_elf_hash_sort_data
+{
+ /* The symbol in the global GOT with the lowest dynamic symbol table
+ index. */
+ struct elf_link_hash_entry *low;
+ /* The least dynamic symbol table index corresponding to a symbol
+ with a GOT entry. */
+ long min_got_dynindx;
+ /* The greatest dynamic symbol table index not corresponding to a
+ symbol without a GOT entry. */
+ long max_non_got_dynindx;
+};
+
+/* If H needs a GOT entry, assign it the highest available dynamic
+ index. Otherwise, assign it the lowest available dynamic
+ index. */
+
+static boolean
+mips_elf_sort_hash_table_f (h, data)
+ struct mips_elf_link_hash_entry *h;
+ PTR data;
+{
+ struct mips_elf_hash_sort_data *hsd
+ = (struct mips_elf_hash_sort_data *) data;
+
+ /* Symbols without dynamic symbol table entries aren't interesting
+ at all. */
+ if (h->root.dynindx == -1)
+ return true;
+
+ if (h->root.got.offset != 0)
+ h->root.dynindx = hsd->max_non_got_dynindx++;
+ else
+ {
+ h->root.dynindx = --hsd->min_got_dynindx;
+ hsd->low = (struct elf_link_hash_entry *) h;
+ }
+
+ return true;
+}
+
+/* Sort the dynamic symbol table so that symbols that need GOT entries
+ appear towards the end. This reduces the amount of GOT space
+ required. MAX_LOCAL is used to set the number of local symbols
+ known to be in the dynamic symbol table. During
+ mips_elf_size_dynamic_sections, this value is 1. Afterward, the
+ section symbols are added and the count is higher. */
+
+static boolean
+mips_elf_sort_hash_table (info, max_local)
+ struct bfd_link_info *info;
+ unsigned long max_local;
+{
+ struct mips_elf_hash_sort_data hsd;
struct mips_got_info *g;
+ bfd *dynobj;
- insn = bfd_get_32 (input_bfd, contents + relhi->r_offset);
+ dynobj = elf_hash_table (info)->dynobj;
- addlo = bfd_get_32 (input_bfd, contents + rello->r_offset);
- addlo &= 0xffff;
+ hsd.low = NULL;
+ hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount;
+ hsd.max_non_got_dynindx = max_local;
+ mips_elf_link_hash_traverse (((struct mips_elf_link_hash_table *)
+ elf_hash_table (info)),
+ mips_elf_sort_hash_table_f,
+ &hsd);
- addend += ((insn & 0xffff) << 16) + addlo;
+ /* There shoud have been enough room in the symbol table to
+ accomodate both the GOT and non-GOT symbols. */
+ BFD_ASSERT (hsd.min_got_dynindx == hsd.max_non_got_dynindx);
- if ((addlo & 0x8000) != 0)
- addend -= 0x10000;
- if ((addend & 0x8000) != 0)
- addend += 0x10000;
+ /* Now we know which dynamic symbol has the lowest dynamic symbol
+ table index in the GOT. */
+ g = mips_elf_got_info (dynobj, NULL);
+ g->global_gotsym = hsd.low;
- /* Get a got entry representing requested hipage. */
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
- BFD_ASSERT (g != NULL);
+ return true;
+}
- assigned_gotno = g->assigned_gotno;
- got_contents = sgot->contents;
- hipage = addend & 0xffff0000;
+/* Create a local GOT entry for VALUE. Return the index of the entry,
+ or -1 if it could not be created. */
- for (i = MIPS_RESERVED_GOTNO; i < assigned_gotno; i++)
+static bfd_vma
+mips_elf_create_local_got_entry (abfd, g, sgot, value)
+ bfd *abfd;
+ struct mips_got_info *g;
+ asection *sgot;
+ bfd_vma value;
+{
+ if (g->assigned_gotno >= g->local_gotno)
{
- address = bfd_get_32 (input_bfd, got_contents + i * 4);
- if (hipage == (address & 0xffff0000))
- break;
+ /* We didn't allocate enough space in the GOT. */
+ (*_bfd_error_handler)
+ (_("not enough GOT space for local GOT entries"));
+ bfd_set_error (bfd_error_bad_value);
+ return (bfd_vma) -1;
}
- if (i == assigned_gotno)
+ MIPS_ELF_PUT_WORD (abfd, value,
+ (sgot->contents
+ + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno));
+ return MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
+}
+
+/* Returns the GOT offset at which the indicated address can be found.
+ If there is not yet a GOT entry for this value, create one. Returns
+ -1 if no satisfactory GOT offset can be found. */
+
+static bfd_vma
+mips_elf_local_got_index (abfd, info, value)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ bfd_vma value;
+{
+ asection *sgot;
+ struct mips_got_info *g;
+ bfd_byte *entry;
+
+ g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
+
+ /* Look to see if we already have an appropriate entry. */
+ for (entry = (sgot->contents
+ + MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
+ entry != sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
+ entry += MIPS_ELF_GOT_SIZE (abfd))
{
- if (assigned_gotno >= g->local_gotno)
+ bfd_vma address = MIPS_ELF_GET_WORD (abfd, entry);
+ if (address == value)
+ return entry - sgot->contents;
+ }
+
+ return mips_elf_create_local_got_entry (abfd, g, sgot, value);
+}
+
+/* Find a GOT entry that is within 32KB of the VALUE. These entries
+ are supposed to be placed at small offsets in the GOT, i.e.,
+ within 32KB of GP. Return the index into the GOT for this page,
+ and store the offset from this entry to the desired address in
+ OFFSETP, if it is non-NULL. */
+
+static bfd_vma
+mips_elf_got_page (abfd, info, value, offsetp)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ bfd_vma value;
+ bfd_vma *offsetp;
+{
+ asection *sgot;
+ struct mips_got_info *g;
+ bfd_byte *entry;
+ bfd_byte *last_entry;
+ bfd_vma index = 0;
+ bfd_vma address;
+
+ g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
+
+ /* Look to see if we aleady have an appropriate entry. */
+ last_entry = sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
+ for (entry = (sgot->contents
+ + MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
+ entry != last_entry;
+ entry += MIPS_ELF_GOT_SIZE (abfd))
+ {
+ address = MIPS_ELF_GET_WORD (abfd, entry);
+
+ if (!mips_elf_overflow_p (value - address, 16))
{
- (*_bfd_error_handler)
- ("more got entries are needed for hipage relocations");
- bfd_set_error (bfd_error_bad_value);
- return false;
+ /* This entry will serve as the page pointer. We can add a
+ 16-bit number to it to get the actual address. */
+ index = entry - sgot->contents;
+ break;
}
+ }
+
+ /* If we didn't have an appropriate entry, we create one now. */
+ if (entry == last_entry)
+ index = mips_elf_create_local_got_entry (abfd, g, sgot, value);
- bfd_put_32 (input_bfd, hipage, got_contents + assigned_gotno * 4);
- ++g->assigned_gotno;
+ if (offsetp)
+ {
+ address = MIPS_ELF_GET_WORD (abfd, entry);
+ *offsetp = value - address;
}
- i = - ELF_MIPS_GP_OFFSET (output_bfd) + i * 4;
- bfd_put_32 (input_bfd, (insn & 0xffff0000) | (i & 0xffff),
- contents + relhi->r_offset);
+ return index;
+}
- return true;
+/* Find a GOT entry whose higher-order 16 bits are the same as those
+ for value. Return the index into the GOT for this entry. */
+
+static bfd_vma
+mips_elf_got16_entry (abfd, info, value)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ bfd_vma value;
+{
+ asection *sgot;
+ struct mips_got_info *g;
+ bfd_byte *entry;
+ bfd_byte *last_entry;
+ bfd_vma index = 0;
+ bfd_vma address;
+
+ /* Although the ABI says that it is "the high-order 16 bits" that we
+ want, it is really the %high value. The complete value is
+ calculated with a `addiu' of a LO16 relocation, just as with a
+ HI16/LO16 pair. */
+ value = mips_elf_high (value) << 16;
+ g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
+
+ /* Look to see if we already have an appropriate entry. */
+ last_entry = sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
+ for (entry = (sgot->contents
+ + MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
+ entry != last_entry;
+ entry += MIPS_ELF_GOT_SIZE (abfd))
+ {
+ address = MIPS_ELF_GET_WORD (abfd, entry);
+ if ((address & 0xffff0000) == value)
+ {
+ /* This entry has the right high-order 16 bits. */
+ index = entry - sgot->contents;
+ break;
+ }
+ }
+
+ /* If we didn't have an appropriate entry, we create one now. */
+ if (entry == last_entry)
+ index = mips_elf_create_local_got_entry (abfd, g, sgot, value);
+
+ return index;
}
-/* Handle MIPS ELF CALL16 reloc and global GOT16 reloc. */
+/* Returns the first relocation of type r_type found, beginning with
+ RELOCATION. RELEND is one-past-the-end of the relocation table. */
-static void
-mips_elf_relocate_global_got (input_bfd, rel, contents, offset)
- bfd *input_bfd;
- Elf_Internal_Rela *rel;
- bfd_byte *contents;
- bfd_vma offset;
+static const Elf_Internal_Rela *
+mips_elf_next_relocation (r_type, relocation, relend)
+ unsigned int r_type;
+ const Elf_Internal_Rela *relocation;
+ const Elf_Internal_Rela *relend;
{
- bfd_vma insn;
+ /* According to the MIPS ELF ABI, the R_MIPS_LO16 relocation must be
+ immediately following. However, for the IRIX6 ABI, the next
+ relocation may be a composed relocation consisting of several
+ relocations for the same address. In that case, the R_MIPS_LO16
+ relocation may occur as one of these. We permit a similar
+ extension in general, as that is useful for GCC. */
+ while (relocation < relend)
+ {
+ if (ELF32_R_TYPE (relocation->r_info) == r_type)
+ return relocation;
+
+ ++relocation;
+ }
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- bfd_put_32 (input_bfd,
- (insn & 0xffff0000) | (offset & 0xffff),
- contents + rel->r_offset);
+ /* We didn't find it. */
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
}
-/* Relocate a MIPS ELF section. */
+/* Create a rel.dyn relocation for the dynamic linker to resolve. REL
+ is the original relocation, which is now being transformed into a
+ dyanmic relocation. The ADDENDP is adjusted if necessary; the
+ caller should store the result in place of the original addend. */
static boolean
-mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
+mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
+ symbol, addendp, input_section)
bfd *output_bfd;
struct bfd_link_info *info;
- bfd *input_bfd;
+ const Elf_Internal_Rela *rel;
+ struct mips_elf_link_hash_entry *h;
+ asection *sec;
+ bfd_vma symbol;
+ bfd_vma *addendp;
asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
{
- Elf_Internal_Shdr *symtab_hdr;
- size_t locsymcount;
- size_t extsymoff;
- asection *sgot, *sreloc, *scpt;
+ Elf_Internal_Rel outrel;
+ boolean skip;
+ asection *sreloc;
bfd *dynobj;
- bfd_vma gp;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
- struct mips_got_info *g;
+ int r_type;
+ r_type = ELF32_R_TYPE (rel->r_info);
dynobj = elf_hash_table (info)->dynobj;
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sreloc
+ = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_REL_DYN_SECTION_NAME (output_bfd));
+ BFD_ASSERT (sreloc != NULL);
+
+ skip = false;
+
+ /* We begin by assuming that the offset for the dynamic relocation
+ is the same as for the original relocation. We'll adjust this
+ later to reflect the correct output offsets. */
+ if (elf_section_data (input_section)->stab_info == NULL)
+ outrel.r_offset = rel->r_offset;
+ else
+ {
+ /* Except that in a stab section things are more complex.
+ Because we compress stab information, the offset given in the
+ relocation may not be the one we want; we must let the stabs
+ machinery tell us the offset. */
+ outrel.r_offset
+ = (_bfd_stab_section_offset
+ (output_bfd, &elf_hash_table (info)->stab_info,
+ input_section,
+ &elf_section_data (input_section)->stab_info,
+ rel->r_offset));
+ /* If we didn't need the relocation at all, this value will be
+ -1. */
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
+ }
- sgot = NULL;
- sreloc = NULL;
- if (dynobj == NULL || ! SGI_COMPAT (output_bfd))
- scpt = NULL;
+ /* If we've decided to skip this relocation, just output an emtpy
+ record. Note that R_MIPS_NONE == 0, so that this call to memset
+ is a way of setting R_TYPE to R_MIPS_NONE. */
+ if (skip)
+ memset (&outrel, 0, sizeof (outrel));
else
- scpt = bfd_get_section_by_name (dynobj, ".compact_rel");
- g = NULL;
+ {
+ long indx;
+ bfd_vma section_offset;
+
+ /* We must now calculate the dynamic symbol table index to use
+ in the relocation. */
+ if (h != NULL
+ && (! info->symbolic || (h->root.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ {
+ indx = h->root.dynindx;
+ BFD_ASSERT (indx != -1);
+ }
+ else
+ {
+ if (sec != NULL && bfd_is_abs_section (sec))
+ indx = 0;
+ else if (sec == NULL || sec->owner == NULL)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ else
+ {
+ indx = elf_section_data (sec->output_section)->dynindx;
+ if (indx == 0)
+ abort ();
+ }
- if (elf_bad_symtab (input_bfd))
+ /* Figure out how far the target of the relocation is from
+ the beginning of its section. */
+ section_offset = symbol - sec->output_section->vma;
+ /* The relocation we're building is section-relative.
+ Therefore, the original addend must be adjusted by the
+ section offset. */
+ *addendp += symbol - sec->output_section->vma;
+ /* Now, the relocation is just against the section. */
+ symbol = sec->output_section->vma;
+ }
+
+ /* If the relocation was previously an absolute relocation, we
+ must adjust it by the value we give it in the dynamic symbol
+ table. */
+ if (r_type != R_MIPS_REL32)
+ *addendp += symbol;
+
+ /* The relocation is always an REL32 relocation because we don't
+ know where the shared library will wind up at load-time. */
+ outrel.r_info = ELF32_R_INFO (indx, R_MIPS_REL32);
+
+ /* Adjust the output offset of the relocation to reference the
+ correct location in the output file. */
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+ }
+
+ /* Put the relocation back out. We have to use the special
+ relocation outputter in the 64-bit case since the 64-bit
+ relocation format is non-standard. */
+ if (ABI_64_P (output_bfd))
{
- locsymcount = symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
- extsymoff = 0;
+ (*get_elf_backend_data (output_bfd)->s->swap_reloc_out)
+ (output_bfd, &outrel,
+ (sreloc->contents
+ + sreloc->reloc_count * sizeof (Elf64_Mips_External_Rel)));
}
else
+ bfd_elf32_swap_reloc_out (output_bfd, &outrel,
+ (((Elf32_External_Rel *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+
+ /* Record the index of the first relocation referencing H. This
+ information is later emitted in the .msym section. */
+ if (h != NULL
+ && (h->min_dyn_reloc_index == 0
+ || sreloc->reloc_count < h->min_dyn_reloc_index))
+ h->min_dyn_reloc_index = sreloc->reloc_count;
+
+ /* We've now added another relocation. */
+ ++sreloc->reloc_count;
+
+ /* Make sure the output section is writable. The dynamic linker
+ will be writing to it. */
+ elf_section_data (input_section->output_section)->this_hdr.sh_flags
+ |= SHF_WRITE;
+
+ /* On IRIX5, make an entry of compact relocation info. */
+ if (! skip && IRIX_COMPAT (output_bfd) == ict_irix5)
{
- locsymcount = symtab_hdr->sh_info;
- extsymoff = symtab_hdr->sh_info;
+ asection* scpt = bfd_get_section_by_name (dynobj, ".compact_rel");
+ bfd_byte *cr;
+
+ if (scpt)
+ {
+ Elf32_crinfo cptrel;
+
+ mips_elf_set_cr_format (cptrel, CRF_MIPS_LONG);
+ cptrel.vaddr = (rel->r_offset
+ + input_section->output_section->vma
+ + input_section->output_offset);
+ if (r_type == R_MIPS_REL32)
+ mips_elf_set_cr_type (cptrel, CRT_MIPS_REL32);
+ else
+ mips_elf_set_cr_type (cptrel, CRT_MIPS_WORD);
+ mips_elf_set_cr_dist2to (cptrel, 0);
+ cptrel.konst = *addendp;
+
+ cr = (scpt->contents
+ + sizeof (Elf32_External_compact_rel));
+ bfd_elf32_swap_crinfo_out (output_bfd, &cptrel,
+ ((Elf32_External_crinfo *) cr
+ + scpt->reloc_count));
+ ++scpt->reloc_count;
+ }
}
- gp = _bfd_get_gp_value (output_bfd);
+ return true;
+}
+
+/* Calculate the value produced by the RELOCATION (which comes from
+ the INPUT_BFD). The ADDEND is the addend to use for this
+ RELOCATION; RELOCATION->R_ADDEND is ignored.
+
+ The result of the relocation calculation is stored in VALUEP.
+ REQUIRE_JALXP indicates whether or not the opcode used with this
+ relocation must be JALX.
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
+ This function returns bfd_reloc_continue if the caller need take no
+ further action regarding this relocation, bfd_reloc_notsupported if
+ something goes dramatically wrong, bfd_reloc_overflow if an
+ overflow occurs, and bfd_reloc_ok to indicate success. */
+
+static bfd_reloc_status_type
+mips_elf_calculate_relocation (abfd,
+ input_bfd,
+ input_section,
+ info,
+ relocation,
+ addend,
+ howto,
+ local_syms,
+ local_sections,
+ valuep,
+ namep,
+ require_jalxp)
+ bfd *abfd;
+ bfd *input_bfd;
+ asection *input_section;
+ struct bfd_link_info *info;
+ const Elf_Internal_Rela *relocation;
+ bfd_vma addend;
+ reloc_howto_type *howto;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+ bfd_vma *valuep;
+ const char **namep;
+ boolean *require_jalxp;
+{
+ /* The eventual value we will return. */
+ bfd_vma value;
+ /* The address of the symbol against which the relocation is
+ occurring. */
+ bfd_vma symbol = 0;
+ /* The final GP value to be used for the relocatable, executable, or
+ shared object file being produced. */
+ bfd_vma gp = (bfd_vma) - 1;
+ /* The place (section offset or address) of the storage unit being
+ relocated. */
+ bfd_vma p;
+ /* The value of GP used to create the relocatable object. */
+ bfd_vma gp0 = (bfd_vma) - 1;
+ /* The offset into the global offset table at which the address of
+ the relocation entry symbol, adjusted by the addend, resides
+ during execution. */
+ bfd_vma g = (bfd_vma) - 1;
+ /* The section in which the symbol referenced by the relocation is
+ located. */
+ asection *sec = NULL;
+ struct mips_elf_link_hash_entry* h = NULL;
+ /* True if the symbol referred to by this relocation is a local
+ symbol. */
+ boolean local_p;
+ /* True if the symbol referred to by this relocation is "_gp_disp". */
+ boolean gp_disp_p = false;
+ Elf_Internal_Shdr *symtab_hdr;
+ size_t extsymoff;
+ unsigned long r_symndx;
+ int r_type;
+ /* True if overflow occurred during the calculation of the
+ relocation value. */
+ boolean overflowed_p;
+ /* True if this relocation refers to a MIPS16 function. */
+ boolean target_is_16_bit_code_p = false;
+
+ /* Parse the relocation. */
+ r_symndx = ELF32_R_SYM (relocation->r_info);
+ r_type = ELF32_R_TYPE (relocation->r_info);
+ p = (input_section->output_section->vma
+ + input_section->output_offset
+ + relocation->r_offset);
+
+ /* Assume that there will be no overflow. */
+ overflowed_p = false;
+
+ /* Figure out whether or not the symbol is local, and get the offset
+ used in the array of hash table entries. */
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ local_p = mips_elf_local_relocation_p (input_bfd, relocation,
+ local_sections);
+ if (! elf_bad_symtab (input_bfd))
+ extsymoff = symtab_hdr->sh_info;
+ else
+ {
+ /* The symbol table does not follow the rule that local symbols
+ must come before globals. */
+ extsymoff = 0;
+ }
+
+ /* Figure out the value of the symbol. */
+ if (local_p)
{
- int r_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- bfd_vma addend;
- struct elf_link_hash_entry *h;
- asection *sec;
Elf_Internal_Sym *sym;
- struct mips_elf_link_hash_entry *mh;
- int other;
- bfd_reloc_status_type r;
- r_type = ELF32_R_TYPE (rel->r_info);
- if ((r_type < 0 || r_type >= (int) R_MIPS_max)
- && r_type != R_MIPS16_26
- && r_type != R_MIPS16_GPREL)
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+
+ symbol = sec->output_section->vma + sec->output_offset;
+ if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
+ symbol += sym->st_value;
+
+ /* MIPS16 text labels should be treated as odd. */
+ if (sym->st_other == STO_MIPS16)
+ ++symbol;
+
+ /* Record the name of this symbol, for our caller. */
+ *namep = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (*namep == '\0')
+ *namep = bfd_section_name (input_bfd, sec);
+
+ target_is_16_bit_code_p = (sym->st_other == STO_MIPS16);
+ }
+ else
+ {
+ /* For global symbols we look up the symbol in the hash-table. */
+ h = ((struct mips_elf_link_hash_entry *)
+ elf_sym_hashes (input_bfd) [r_symndx - extsymoff]);
+ /* Find the real hash-table entry for this symbol. */
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ /* Record the name of this symbol, for our caller. */
+ *namep = h->root.root.root.string;
+
+ /* See if this is the special _gp_disp symbol. Note that such a
+ symbol must always be a global symbol. */
+ if (strcmp (h->root.root.root.string, "_gp_disp") == 0)
{
- bfd_set_error (bfd_error_bad_value);
- return false;
+ /* Relocations against _gp_disp are permitted only with
+ R_MIPS_HI16 and R_MIPS_LO16 relocations. */
+ if (r_type != R_MIPS_HI16 && r_type != R_MIPS_LO16)
+ return bfd_reloc_notsupported;
+
+ gp_disp_p = true;
+ }
+ /* If this symbol is defined, calculate its address. Note that
+ _gp_disp is a magic symbol, always implicitly defined by the
+ linker, so it's inappropriate to check to see whether or not
+ its defined. */
+ else if ((h->root.root.type == bfd_link_hash_defined
+ || h->root.root.type == bfd_link_hash_defweak)
+ && h->root.root.u.def.section)
+ {
+ sec = h->root.root.u.def.section;
+ if (sec->output_section)
+ symbol = (h->root.root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ else
+ symbol = h->root.root.u.def.value;
+ }
+ else if (h->root.root.type == bfd_link_hash_undefweak)
+ /* We allow relocations against undefined weak symbols, giving
+ it the value zero, so that you can undefined weak functions
+ and check to see if they exist by looking at their
+ addresses. */
+ symbol = 0;
+ else if (info->shared && !info->symbolic && !info->no_undefined)
+ symbol = 0;
+ else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
+ {
+ /* If this is a dynamic link, we should have created a
+ _DYNAMIC_LINK symbol in mips_elf_create_dynamic_sections.
+ Otherwise, we should define the symbol with a value of 0.
+ FIXME: It should probably get into the symbol table
+ somehow as well. */
+ BFD_ASSERT (! info->shared);
+ BFD_ASSERT (bfd_get_section_by_name (abfd, ".dynamic") == NULL);
+ symbol = 0;
}
- if (r_type == R_MIPS16_26)
- howto = &elf_mips16_jump_howto;
- else if (r_type == R_MIPS16_GPREL)
- howto = &elf_mips16_gprel_howto;
else
- howto = elf_mips_howto_table + r_type;
-
- if (dynobj != NULL
- && (r_type == R_MIPS_CALL16
- || r_type == R_MIPS_GOT16
- || r_type == R_MIPS_CALL_HI16
- || r_type == R_MIPS_CALL_LO16
- || r_type == R_MIPS_GOT_HI16
- || r_type == R_MIPS_GOT_LO16))
{
- /* We need the .got section. */
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
- BFD_ASSERT (g != NULL);
- }
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.root.string, input_bfd,
+ input_section, relocation->r_offset,
+ (!info->shared || info->no_undefined))))
+ return bfd_reloc_undefined;
+ symbol = 0;
}
- r_symndx = ELF32_R_SYM (rel->r_info);
-
- /* Mix in the change in GP address for a GP relative reloc. */
- if (r_type != R_MIPS_GPREL16
- && r_type != R_MIPS_LITERAL
- && r_type != R_MIPS_GPREL32
- && r_type != R_MIPS16_GPREL)
- addend = 0;
+ target_is_16_bit_code_p = (h->root.other == STO_MIPS16);
+ }
+
+ /* If this is a 32-bit call to a 16-bit function with a stub, we
+ need to redirect the call to the stub, unless we're already *in*
+ a stub. */
+ if (r_type != R_MIPS16_26 && !info->relocateable
+ && ((h != NULL && h->fn_stub != NULL)
+ || (local_p && elf_tdata (input_bfd)->local_stubs != NULL
+ && elf_tdata (input_bfd)->local_stubs[r_symndx] != NULL))
+ && !mips_elf_stub_section_p (input_bfd, input_section))
+ {
+ /* This is a 32-bit call to a 16-bit function. We should
+ have already noticed that we were going to need the
+ stub. */
+ if (local_p)
+ sec = elf_tdata (input_bfd)->local_stubs[r_symndx];
else
{
- if (gp == 0)
- {
- if (! ((*info->callbacks->reloc_dangerous)
- (info,
- "GP relative relocation when GP not defined",
- input_bfd, input_section,
- rel->r_offset)))
- return false;
- /* Only give the error once per link. */
- gp = 4;
- _bfd_set_gp_value (output_bfd, gp);
- }
-
- if (r_symndx < extsymoff
- || (elf_bad_symtab (input_bfd)
- && local_sections[r_symndx] != NULL))
- {
- /* This is a relocation against a section. The current
- addend in the instruction is the difference between
- INPUT_SECTION->vma and the GP value of INPUT_BFD. We
- must change this to be the difference between the
- final definition (which will end up in RELOCATION)
- and the GP value of OUTPUT_BFD (which is in GP). */
- addend = elf_gp (input_bfd) - gp;
- }
- else if (! info->relocateable)
- {
- /* We are doing a final link. The current addend in the
- instruction is simply the desired offset into the
- symbol (normally zero). We want the instruction to
- hold the difference between the final definition of
- the symbol (which will end up in RELOCATION) and the
- GP value of OUTPUT_BFD (which is in GP). */
- addend = - gp;
- }
- else
- {
- /* We are generating relocateable output, and we aren't
- going to define this symbol, so we just leave the
- instruction alone. */
- addend = 0;
- }
+ BFD_ASSERT (h->need_fn_stub);
+ sec = h->fn_stub;
}
- h = NULL;
- sym = NULL;
- sec = NULL;
- if (info->relocateable)
+ symbol = sec->output_section->vma + sec->output_offset;
+ }
+ /* If this is a 16-bit call to a 32-bit function with a stub, we
+ need to redirect the call to the stub. */
+ else if (r_type == R_MIPS16_26 && !info->relocateable
+ && h != NULL
+ && (h->call_stub != NULL || h->call_fp_stub != NULL)
+ && !target_is_16_bit_code_p)
+ {
+ /* If both call_stub and call_fp_stub are defined, we can figure
+ out which one to use by seeing which one appears in the input
+ file. */
+ if (h->call_stub != NULL && h->call_fp_stub != NULL)
{
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx >= locsymcount
- || (elf_bad_symtab (input_bfd)
- && local_sections[r_symndx] == NULL))
- r = bfd_reloc_ok;
- else
+ asection *o;
+
+ sec = NULL;
+ for (o = input_bfd->sections; o != NULL; o = o->next)
{
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
- r = bfd_reloc_ok;
- else
+ if (strncmp (bfd_get_section_name (input_bfd, o),
+ CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
{
- sec = local_sections[r_symndx];
-
- /* It would be logical to add sym->st_value here,
- but Irix 5 sometimes generates a garbage symbol
- value. */
- addend += sec->output_offset;
-
- /* If this is HI16 or GOT16 with an associated LO16,
- adjust the addend accordingly. Otherwise, just
- relocate. */
- if (r_type == R_MIPS_64 && bfd_big_endian (input_bfd))
- r = _bfd_relocate_contents (howto, input_bfd,
- addend,
- contents + rel->r_offset + 4);
- else if (r_type != R_MIPS_HI16 && r_type != R_MIPS_GOT16)
- r = _bfd_relocate_contents (howto, input_bfd,
- addend,
- contents + rel->r_offset);
- else
- {
- Elf_Internal_Rela *lorel;
-
- /* As a GNU extension, permit an arbitrary
- number of R_MIPS_HI16 relocs before the
- R_MIPS_LO16 reloc. This permits gcc to emit
- the HI and LO relocs itself. */
- if (r_type == R_MIPS_GOT16)
- lorel = rel + 1;
- else
- {
- for (lorel = rel + 1;
- (lorel < relend
- && (ELF32_R_TYPE (lorel->r_info)
- == R_MIPS_HI16));
- lorel++)
- ;
- }
- if (lorel < relend
- && ELF32_R_TYPE (lorel->r_info) == R_MIPS_LO16)
- {
- mips_elf_relocate_hi16 (input_bfd, rel, lorel,
- contents, addend);
- r = bfd_reloc_ok;
- }
- else
- r = _bfd_relocate_contents (howto, input_bfd,
- addend,
- contents + rel->r_offset);
- }
+ sec = h->call_fp_stub;
+ break;
}
}
+ if (sec == NULL)
+ sec = h->call_stub;
}
+ else if (h->call_stub != NULL)
+ sec = h->call_stub;
else
+ sec = h->call_fp_stub;
+
+ BFD_ASSERT (sec->_raw_size > 0);
+ symbol = sec->output_section->vma + sec->output_offset;
+ }
+
+ /* Calls from 16-bit code to 32-bit code and vice versa require the
+ special jalx instruction. */
+ *require_jalxp = (!info->relocateable
+ && ((r_type == R_MIPS16_26) != target_is_16_bit_code_p));
+
+ /* If we haven't already determined the GOT offset, or the GP value,
+ and we're going to need it, get it now. */
+ switch (r_type)
+ {
+ case R_MIPS_CALL16:
+ case R_MIPS_GOT16:
+ case R_MIPS_GOT_DISP:
+ case R_MIPS_GOT_HI16:
+ case R_MIPS_CALL_HI16:
+ case R_MIPS_GOT_LO16:
+ case R_MIPS_CALL_LO16:
+ /* Find the index into the GOT where this value is located. */
+ if (!local_p)
{
- bfd_vma relocation;
- boolean local;
-
- /* This is a final link. */
- sym = NULL;
- if (r_symndx < extsymoff
- || (elf_bad_symtab (input_bfd)
- && local_sections[r_symndx] != NULL))
- {
- local = true;
- sym = local_syms + r_symndx;
- sec = local_sections[r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset);
-
- /* It would be logical to always add sym->st_value here,
- but Irix 5 sometimes generates a garbage symbol
- value. */
- if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
- relocation += sym->st_value;
-
- /* mips16 text labels should be treated as odd. */
- if (sym->st_other == STO_MIPS16)
- ++relocation;
- }
- else
- {
- long indx;
+ BFD_ASSERT (addend == 0);
+ g = mips_elf_global_got_index
+ (elf_hash_table (info)->dynobj,
+ (struct elf_link_hash_entry*) h);
+ }
+ else if (r_type == R_MIPS_GOT16)
+ /* There's no need to create a local GOT entry here; the
+ calculation for a local GOT16 entry does not involve G. */
+ break;
+ else
+ {
+ g = mips_elf_local_got_index (abfd, info, symbol + addend);
+ if (g == (bfd_vma) -1)
+ return false;
+ }
- local = false;
- indx = r_symndx - extsymoff;
- h = elf_sym_hashes (input_bfd)[indx];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (strcmp (h->root.root.string, "_gp_disp") == 0)
- {
- if (gp == 0)
- {
- if (! ((*info->callbacks->reloc_dangerous)
- (info,
- "_gp_disp used when GP not defined",
- input_bfd, input_section,
- rel->r_offset)))
- return false;
- /* Only give the error once per link. */
- gp = 4;
- _bfd_set_gp_value (output_bfd, gp);
- relocation = 0;
- }
- else
- {
- sec = input_section;
- if (sec->output_section != NULL)
- relocation = (gp
- - (rel->r_offset
- + sec->output_section->vma
- + sec->output_offset));
- else
- relocation = gp - rel->r_offset;
- if (r_type == R_MIPS_LO16)
- relocation += 4;
- }
- }
- else if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- relocation = 0;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (info->shared && ! info->symbolic)
- relocation = 0;
- else if (strcmp (h->root.root.string, "_DYNAMIC_LINK") == 0)
- {
- /* If this is a dynamic link, we should have created
- a _DYNAMIC_LINK symbol in
- mips_elf_create_dynamic_sections. Otherwise, we
- should define the symbol with a value of 0.
- FIXME: It should probably get into the symbol
- table somehow as well. */
- BFD_ASSERT (! info->shared);
- BFD_ASSERT (bfd_get_section_by_name (output_bfd,
- ".dynamic") == NULL);
- relocation = 0;
- }
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset)))
- return false;
- relocation = 0;
- }
- }
+ /* Convert GOT indices to actual offsets. */
+ g = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
+ abfd, g);
+ break;
+
+ case R_MIPS_HI16:
+ case R_MIPS_LO16:
+ case R_MIPS_GPREL16:
+ case R_MIPS_GPREL32:
+ case R_MIPS_LITERAL:
+ gp0 = _bfd_get_gp_value (input_bfd);
+ gp = _bfd_get_gp_value (abfd);
+ break;
- mh = (struct mips_elf_link_hash_entry *) h;
- if (h != NULL)
- other = h->other;
- else if (sym != NULL)
- other = sym->st_other;
+ default:
+ break;
+ }
+
+ /* Figure out what kind of relocation is being performed. */
+ switch (r_type)
+ {
+ case R_MIPS_NONE:
+ return bfd_reloc_continue;
+
+ case R_MIPS_16:
+ value = symbol + mips_elf_sign_extend (addend, 16);
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
+
+ case R_MIPS_32:
+ case R_MIPS_REL32:
+ case R_MIPS_64:
+ if ((info->shared
+ || (elf_hash_table (info)->dynamic_sections_created
+ && h != NULL
+ && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ == 0)))
+ && (input_section->flags & SEC_ALLOC) != 0)
+ {
+ /* If we're creating a shared library, or this relocation is
+ against a symbol in a shared library, then we can't know
+ where the symbol will end up. So, we create a relocation
+ record in the output, and leave the job up to the dynamic
+ linker. */
+ value = addend;
+ if (!mips_elf_create_dynamic_relocation (abfd,
+ info,
+ relocation,
+ h,
+ sec,
+ symbol,
+ &value,
+ input_section))
+ return false;
+ }
+ else
+ {
+ if (r_type != R_MIPS_REL32)
+ value = symbol + addend;
else
- other = 0;
-
- /* If this function has an fn_stub, then it is a mips16
- function which needs a stub if it is called by a 32 bit
- function. If this reloc is anything other than a 16 bit
- call, redirect the reloc to the stub. We don't redirect
- relocs from other stub functions. */
- if (r_type != R_MIPS16_26
- && ((mh != NULL
- && mh->fn_stub != NULL)
- || (mh == NULL
- && elf_tdata (input_bfd)->local_stubs != NULL
- && elf_tdata (input_bfd)->local_stubs[r_symndx] != NULL))
- && strncmp (bfd_get_section_name (input_bfd, input_section),
- FN_STUB, sizeof FN_STUB - 1) != 0
- && strncmp (bfd_get_section_name (input_bfd, input_section),
- CALL_STUB, sizeof CALL_STUB - 1) != 0
- && strncmp (bfd_get_section_name (input_bfd, input_section),
- CALL_FP_STUB, sizeof CALL_FP_STUB - 1) != 0)
- {
- if (mh != NULL)
- {
- BFD_ASSERT (mh->need_fn_stub);
- relocation = (mh->fn_stub->output_section->vma
- + mh->fn_stub->output_offset);
- }
- else
- {
- asection *fn_stub;
+ value = addend;
+ }
+ value &= howto->dst_mask;
+ break;
- fn_stub = elf_tdata (input_bfd)->local_stubs[r_symndx];
- relocation = (fn_stub->output_section->vma
- + fn_stub->output_offset);
- }
+ case R_MIPS_PC32:
+ case R_MIPS_PC64:
+ case R_MIPS_GNU_REL_LO16:
+ value = symbol + addend - p;
+ value &= howto->dst_mask;
+ break;
- /* RELOCATION now points to 32 bit code. */
- other = 0;
- }
+ case R_MIPS_GNU_REL16_S2:
+ value = symbol + mips_elf_sign_extend (addend << 2, 18) - p;
+ overflowed_p = mips_elf_overflow_p (value, 18);
+ value = (value >> 2) & howto->dst_mask;
+ break;
- /* If this function has a call_stub, then it is called by a
- mips16 function; the call needs to go through a stub if
- this function is a 32 bit function. If this reloc is a
- 16 bit call, and the symbol is not a 16 bit function,
- then redirect the reloc to the stub. Note that we don't
- need to worry about calling the function through a
- function pointer; such calls are handled by routing
- through a special mips16 routine. We don't have to check
- whether this call is from a stub; it can't be, because a
- stub contains 32 bit code, and hence can not have a 16
- bit reloc. */
- if (r_type == R_MIPS16_26
- && mh != NULL
- && (mh->call_stub != NULL || mh->call_fp_stub != NULL)
- && other != STO_MIPS16)
- {
- asection *stub;
+ case R_MIPS_GNU_REL_HI16:
+ value = mips_elf_high (addend + symbol - p);
+ value &= howto->dst_mask;
+ break;
- /* If both call_stub and call_fp_stub are defined, we
- can figure out which one to use by seeing which one
- appears in the input file. */
- if (mh->call_stub != NULL && mh->call_fp_stub != NULL)
- {
- asection *o;
+ case R_MIPS16_26:
+ /* The calculation for R_MIPS_26 is just the same as for an
+ R_MIPS_26. It's only the storage of the relocated field into
+ the output file that's different. That's handled in
+ mips_elf_perform_relocation. So, we just fall through to the
+ R_MIPS_26 case here. */
+ case R_MIPS_26:
+ if (local_p)
+ value = (((addend << 2) | (p & 0xf0000000)) + symbol) >> 2;
+ else
+ value = (mips_elf_sign_extend (addend << 2, 28) + symbol) >> 2;
+ value &= howto->dst_mask;
+ break;
- stub = NULL;
- for (o = input_bfd->sections; o != NULL; o = o->next)
- {
- if (strncmp (bfd_get_section_name (input_bfd, o),
- CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
- {
- stub = mh->call_fp_stub;
- break;
- }
- }
- if (stub == NULL)
- stub = mh->call_stub;
- }
- else if (mh->call_stub != NULL)
- stub = mh->call_stub;
- else
- stub = mh->call_fp_stub;
+ case R_MIPS_HI16:
+ if (!gp_disp_p)
+ {
+ value = mips_elf_high (addend + symbol);
+ value &= howto->dst_mask;
+ }
+ else
+ {
+ value = mips_elf_high (addend + gp - p);
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ }
+ break;
- BFD_ASSERT (stub->_raw_size > 0);
- relocation = stub->output_section->vma + stub->output_offset;
- }
+ case R_MIPS_LO16:
+ if (!gp_disp_p)
+ value = (symbol + addend) & howto->dst_mask;
+ else
+ {
+ value = addend + gp - p + 4;
+ /* The MIPS ABI requires checking the R_MIPS_LO16 relocation
+ for overflow. But, on, say, Irix 5, relocations against
+ _gp_disp are normally generated from the .cpload
+ pseudo-op. It generates code that normally looks like
+ this:
+
+ lui $gp,%hi(_gp_disp)
+ addiu $gp,$gp,%lo(_gp_disp)
+ addu $gp,$gp,$t9
+
+ Here $t9 holds the address of the function being called,
+ as required by the MIPS ELF ABI. The R_MIPS_LO16
+ relocation can easily overflow in this situation, but the
+ R_MIPS_HI16 relocation will handle the overflow.
+ Therefore, we consider this a bug in the MIPS ABI, and do
+ not check for overflow here. */
+ }
+ break;
- if (r_type == R_MIPS_HI16)
- {
- Elf_Internal_Rela *lorel;
-
- /* As a GNU extension, permit an arbitrary number of
- R_MIPS_HI16 relocs before the R_MIPS_LO16 reloc.
- This permits gcc to emit the HI and LO relocs itself. */
- for (lorel = rel + 1;
- (lorel < relend
- && ELF32_R_TYPE (lorel->r_info) == R_MIPS_HI16);
- lorel++)
- ;
- if (lorel < relend
- && ELF32_R_TYPE (lorel->r_info) == R_MIPS_LO16)
- {
- mips_elf_relocate_hi16 (input_bfd, rel, lorel,
- contents, relocation + addend);
- r = bfd_reloc_ok;
- }
- else
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, addend);
- }
- else if (r_type == R_MIPS_GOT16 && local)
- {
- /* GOT16 must also have an associated LO16 in the local
- case. In this case, the addend is extracted and the
- section in which the referenced object is determined.
- Then the final address of the object is computed and
- the GOT entry for the hipage (an aligned 64kb chunk)
- is added to .got section if needed. The offset field
- of the GOT16-relocated instruction is replaced by the
- index of this GOT entry for the hipage. */
- if ((rel + 1) < relend
- && ELF32_R_TYPE ((rel + 1)->r_info) == R_MIPS_LO16)
- {
- if (! mips_elf_relocate_got_local (output_bfd, input_bfd,
- sgot, rel, rel + 1,
- contents,
- relocation + addend))
- return false;
- r = bfd_reloc_ok;
- }
- else
- r = bfd_reloc_outofrange;
- }
- else if (r_type == R_MIPS_CALL16
- || r_type == R_MIPS_GOT16
- || r_type == R_MIPS_CALL_LO16
- || r_type == R_MIPS_GOT_LO16)
- {
- bfd_vma offset;
-
- /* This symbol must be registered as a global symbol
- having the corresponding got entry. */
- BFD_ASSERT (h->got_offset != (bfd_vma) -1);
-
- offset = (h->dynindx - g->global_gotsym + g->local_gotno) * 4;
- BFD_ASSERT (g->local_gotno <= offset
- && offset < sgot->_raw_size);
- bfd_put_32 (output_bfd, relocation + addend,
- sgot->contents + offset);
- offset = (sgot->output_section->vma + sgot->output_offset
- + offset - gp);
- mips_elf_relocate_global_got (input_bfd, rel, contents,
- offset);
- r = bfd_reloc_ok;
- }
- else if (r_type == R_MIPS_CALL_HI16
- || r_type == R_MIPS_GOT_HI16)
- {
- bfd_vma offset;
-
- /* This must be a global symbol with a got entry. The
- next reloc must be the corresponding LO16 reloc. */
- BFD_ASSERT (h != NULL && h->got_offset != (bfd_vma) -1);
- BFD_ASSERT ((rel + 1) < relend);
- BFD_ASSERT ((int) ELF32_R_TYPE ((rel + 1)->r_info)
- == (r_type == R_MIPS_CALL_HI16
- ? (int) R_MIPS_CALL_LO16
- : (int) R_MIPS_GOT_LO16));
-
- offset = (h->dynindx - g->global_gotsym + g->local_gotno) * 4;
- BFD_ASSERT (g->local_gotno <= offset
- && offset < sgot->_raw_size);
- bfd_put_32 (output_bfd, relocation + addend,
- sgot->contents + offset);
- offset = (sgot->output_section->vma + sgot->output_offset
- + offset - gp);
- mips_elf_relocate_hi16 (input_bfd, rel, rel + 1, contents,
- offset);
- r = bfd_reloc_ok;
- }
- else if (r_type == R_MIPS_REL32
- || r_type == R_MIPS_32)
- {
- Elf_Internal_Rel outrel;
- Elf32_crinfo cptrel;
- bfd_byte *cr;
-
- if ((info->shared
- || (elf_hash_table (info)->dynamic_sections_created
- && h != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
- == 0)))
- && (input_section->flags & SEC_ALLOC) != 0)
- {
- boolean skip;
+ case R_MIPS_LITERAL:
+ /* Because we don't merge literal sections, we can handle this
+ just like R_MIPS_GPREL16. In the long run, we should merge
+ shared literals, and then we will need to additional work
+ here. */
- /* When generating a shared object, these
- relocations are copied into the output file to be
- resolved at run time. */
- if (sreloc == NULL)
- {
- sreloc = bfd_get_section_by_name (dynobj, ".rel.dyn");
- BFD_ASSERT (sreloc != NULL);
- }
+ /* Fall through. */
- skip = false;
+ case R_MIPS16_GPREL:
+ /* The R_MIPS16_GPREL performs the same calculation as
+ R_MIPS_GPREL16, but stores the relocated bits in a different
+ order. We don't need to do anything special here; the
+ differences are handled in mips_elf_perform_relocation. */
+ case R_MIPS_GPREL16:
+ if (local_p)
+ value = mips_elf_sign_extend (addend, 16) + symbol + gp0 - gp;
+ else
+ value = mips_elf_sign_extend (addend, 16) + symbol - gp;
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
+
+ case R_MIPS_GOT16:
+ if (local_p)
+ {
+ value = mips_elf_got16_entry (abfd, info, symbol + addend);
+ if (value == (bfd_vma) -1)
+ return false;
+ value
+ = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
+ abfd,
+ value);
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
+ }
- if (elf_section_data (input_section)->stab_info == NULL)
- outrel.r_offset = rel->r_offset;
- else
- {
- bfd_vma off;
-
- off = (_bfd_stab_section_offset
- (output_bfd, &elf_hash_table (info)->stab_info,
- input_section,
- &elf_section_data (input_section)->stab_info,
- rel->r_offset));
- if (off == (bfd_vma) -1)
- skip = true;
- outrel.r_offset = off;
- }
+ /* Fall through. */
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
+ case R_MIPS_CALL16:
+ case R_MIPS_GOT_DISP:
+ value = g;
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
- addend = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ case R_MIPS_GPREL32:
+ value = (addend + symbol + gp0 - gp) & howto->dst_mask;
+ break;
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- else if (h != NULL
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- {
- BFD_ASSERT (h->dynindx != -1);
- outrel.r_info = ELF32_R_INFO (h->dynindx, R_MIPS_REL32);
- sec = input_section;
- }
- else
- {
- long indx;
+ case R_MIPS_PC16:
+ value = mips_elf_sign_extend (addend, 16) + symbol - p;
+ value = (bfd_vma) ((bfd_signed_vma) value / 4);
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
- if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
- indx = 0;
- else if (sec == NULL || sec->owner == NULL)
- {
- bfd_set_error (bfd_error_bad_value);
- return false;
- }
- else
- {
- asection *osec;
+ case R_MIPS_GOT_HI16:
+ case R_MIPS_CALL_HI16:
+ /* We're allowed to handle these two relocations identically.
+ The dynamic linker is allowed to handle the CALL relocations
+ differently by creating a lazy evaluation stub. */
+ value = g;
+ value = mips_elf_high (value);
+ value &= howto->dst_mask;
+ break;
- osec = sec->output_section;
- indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- abort ();
- }
+ case R_MIPS_GOT_LO16:
+ case R_MIPS_CALL_LO16:
+ value = g & howto->dst_mask;
+ break;
- outrel.r_info = ELF32_R_INFO (indx, R_MIPS_REL32);
- addend += relocation;
- }
+ case R_MIPS_GOT_PAGE:
+ value = mips_elf_got_page (abfd, info, symbol + addend, NULL);
+ if (value == (bfd_vma) -1)
+ return false;
+ value = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
+ abfd,
+ value);
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
+
+ case R_MIPS_GOT_OFST:
+ mips_elf_got_page (abfd, info, symbol + addend, &value);
+ overflowed_p = mips_elf_overflow_p (value, 16);
+ break;
- if (! skip)
- bfd_put_32 (output_bfd, addend, contents + rel->r_offset);
+ case R_MIPS_SUB:
+ value = symbol - addend;
+ value &= howto->dst_mask;
+ break;
- bfd_elf32_swap_reloc_out (output_bfd, &outrel,
- (((Elf32_External_Rel *)
- sreloc->contents)
- + sreloc->reloc_count));
- ++sreloc->reloc_count;
+ case R_MIPS_HIGHER:
+ value = mips_elf_higher (addend + symbol);
+ value &= howto->dst_mask;
+ break;
- if (! skip && SGI_COMPAT (output_bfd))
- {
- if (scpt == NULL)
- continue;
+ case R_MIPS_HIGHEST:
+ value = mips_elf_highest (addend + symbol);
+ value &= howto->dst_mask;
+ break;
+
+ case R_MIPS_SCN_DISP:
+ value = symbol + addend - sec->output_offset;
+ value &= howto->dst_mask;
+ break;
- /* Make an entry of compact relocation info. */
- mips_elf_set_cr_format (cptrel, CRF_MIPS_LONG);
- cptrel.vaddr = (rel->r_offset
- + input_section->output_section->vma
- + input_section->output_offset);
- if (r_type == R_MIPS_REL32)
- mips_elf_set_cr_type (cptrel, CRT_MIPS_REL32);
- else
- mips_elf_set_cr_type (cptrel, CRT_MIPS_WORD);
- mips_elf_set_cr_dist2to (cptrel, 0);
- cptrel.konst = addend;
-
- cr = (scpt->contents
- + sizeof (Elf32_External_compact_rel));
- bfd_elf32_swap_crinfo_out (output_bfd, &cptrel,
- ((Elf32_External_crinfo *) cr
- + scpt->reloc_count));
- ++scpt->reloc_count;
- }
+ case R_MIPS_PJUMP:
+ case R_MIPS_JALR:
+ /* Both of these may be ignored. R_MIPS_JALR is an optimization
+ hint; we could improve performance by honoring that hint. */
+ return bfd_reloc_continue;
- /* This reloc will be computed at runtime, so
- there's no need to do anything now. */
- continue;
- }
- else
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, addend);
- }
- else if (r_type == R_MIPS_64)
- {
- bfd_size_type addr;
- unsigned long val;
-
- /* Do a 32 bit relocation, and sign extend to 64 bits. */
- addr = rel->r_offset;
- if (bfd_big_endian (input_bfd))
- addr += 4;
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, addr, relocation,
- addend);
- val = bfd_get_32 (input_bfd, contents + addr);
- if ((val & 0x80000000) != 0)
- val = 0xffffffff;
- else
- val = 0;
- addr = rel->r_offset;
- if (bfd_little_endian (input_bfd))
- addr += 4;
- bfd_put_32 (input_bfd, val, contents + addr);
- }
- else if (r_type == R_MIPS_26 && other == STO_MIPS16)
- {
- unsigned long insn;
+ case R_MIPS_GNU_VTINHERIT:
+ case R_MIPS_GNU_VTENTRY:
+ /* We don't do anything with these at present. */
+ return bfd_reloc_continue;
- /* This is a jump to a mips16 routine from a mips32
- routine. We need to change jal into jalx. */
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if (((insn >> 26) & 0x3f) != 0x3
- && ((insn >> 26) & 0x3f) != 0x1d)
- {
- (*_bfd_error_handler)
- ("%s: %s+0x%lx: jump to mips16 routine which is not jal",
- bfd_get_filename (input_bfd),
- input_section->name,
- (unsigned long) rel->r_offset);
- bfd_set_error (bfd_error_bad_value);
- return false;
- }
- insn = (insn & 0x3ffffff) | (0x1d << 26);
- bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, addend);
- }
- else if (r_type == R_MIPS16_26)
- {
- /* It's easiest to do the normal relocation, and then
- dig out the instruction and swap the first word the
- way the mips16 expects it. If this is little endian,
- though, we need to swap the two words first, and then
- swap them back again later, so that the address looks
- right. */
-
- if (bfd_little_endian (input_bfd))
- {
- unsigned long insn;
+ default:
+ /* An unrecognized relocation type. */
+ return bfd_reloc_notsupported;
+ }
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- insn = ((insn >> 16) & 0xffff) | ((insn & 0xffff) << 16);
- bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
- }
+ /* Store the VALUE for our caller. */
+ *valuep = value;
+ return overflowed_p ? bfd_reloc_overflow : bfd_reloc_ok;
+}
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, addend);
- if (r == bfd_reloc_ok)
- {
- unsigned long insn;
+/* Obtain the field relocated by RELOCATION. */
- if (bfd_little_endian (input_bfd))
- {
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- insn = ((insn >> 16) & 0xffff) | ((insn & 0xffff) << 16);
- bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
- }
+static bfd_vma
+mips_elf_obtain_contents (howto, relocation, input_bfd, contents)
+ reloc_howto_type *howto;
+ const Elf_Internal_Rela *relocation;
+ bfd *input_bfd;
+ bfd_byte *contents;
+{
+ bfd_vma x;
+ bfd_byte *location = contents + relocation->r_offset;
- insn = bfd_get_16 (input_bfd, contents + rel->r_offset);
- insn = ((insn & 0xfc00)
- | ((insn & 0x1f) << 5)
- | ((insn & 0x3e0) >> 5));
- /* If this is a jump to a 32 bit routine, then make
- it jalx. */
- if (other != STO_MIPS16)
- insn |= 0x400;
- bfd_put_16 (input_bfd, insn, contents + rel->r_offset);
- }
- }
- else if (r_type == R_MIPS16_GPREL)
+ /* Obtain the bytes. */
+ x = bfd_get (8 * bfd_get_reloc_size (howto), input_bfd, location);
+
+ if ((ELF32_R_TYPE (relocation->r_info) == R_MIPS16_26
+ || ELF32_R_TYPE (relocation->r_info) == R_MIPS16_GPREL)
+ && bfd_little_endian (input_bfd))
+ /* The two 16-bit words will be reversed on a little-endian
+ system. See mips_elf_perform_relocation for more details. */
+ x = (((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16));
+
+ return x;
+}
+
+/* It has been determined that the result of the RELOCATION is the
+ VALUE. Use HOWTO to place VALUE into the output file at the
+ appropriate position. The SECTION is the section to which the
+ relocation applies. If REQUIRE_JALX is true, then the opcode used
+ for the relocation must be either JAL or JALX, and it is
+ unconditionally converted to JALX.
+
+ Returns false if anything goes wrong. */
+
+static boolean
+mips_elf_perform_relocation (info, howto, relocation, value,
+ input_bfd, input_section,
+ contents, require_jalx)
+ struct bfd_link_info *info;
+ reloc_howto_type *howto;
+ const Elf_Internal_Rela *relocation;
+ bfd_vma value;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ boolean require_jalx;
+{
+ bfd_vma x;
+ bfd_byte *location;
+ int r_type = ELF32_R_TYPE (relocation->r_info);
+
+ /* Figure out where the relocation is occurring. */
+ location = contents + relocation->r_offset;
+
+ /* Obtain the current value. */
+ x = mips_elf_obtain_contents (howto, relocation, input_bfd, contents);
+
+ /* Clear the field we are setting. */
+ x &= ~howto->dst_mask;
+
+ /* If this is the R_MIPS16_26 relocation, we must store the
+ value in a funny way. */
+ if (r_type == R_MIPS16_26)
+ {
+ /* R_MIPS16_26 is used for the mips16 jal and jalx instructions.
+ Most mips16 instructions are 16 bits, but these instructions
+ are 32 bits.
+
+ The format of these instructions is:
+
+ +--------------+--------------------------------+
+ ! JALX ! X! Imm 20:16 ! Imm 25:21 !
+ +--------------+--------------------------------+
+ ! Immediate 15:0 !
+ +-----------------------------------------------+
+
+ JALX is the 5-bit value 00011. X is 0 for jal, 1 for jalx.
+ Note that the immediate value in the first word is swapped.
+
+ When producing a relocateable object file, R_MIPS16_26 is
+ handled mostly like R_MIPS_26. In particular, the addend is
+ stored as a straight 26-bit value in a 32-bit instruction.
+ (gas makes life simpler for itself by never adjusting a
+ R_MIPS16_26 reloc to be against a section, so the addend is
+ always zero). However, the 32 bit instruction is stored as 2
+ 16-bit values, rather than a single 32-bit value. In a
+ big-endian file, the result is the same; in a little-endian
+ file, the two 16-bit halves of the 32 bit value are swapped.
+ This is so that a disassembler can recognize the jal
+ instruction.
+
+ When doing a final link, R_MIPS16_26 is treated as a 32 bit
+ instruction stored as two 16-bit values. The addend A is the
+ contents of the targ26 field. The calculation is the same as
+ R_MIPS_26. When storing the calculated value, reorder the
+ immediate value as shown above, and don't forget to store the
+ value as two 16-bit values.
+
+ To put it in MIPS ABI terms, the relocation field is T-targ26-16,
+ defined as
+
+ big-endian:
+ +--------+----------------------+
+ | | |
+ | | targ26-16 |
+ |31 26|25 0|
+ +--------+----------------------+
+
+ little-endian:
+ +----------+------+-------------+
+ | | | |
+ | sub1 | | sub2 |
+ |0 9|10 15|16 31|
+ +----------+--------------------+
+ where targ26-16 is sub1 followed by sub2 (i.e., the addend field A is
+ ((sub1 << 16) | sub2)).
+
+ When producing a relocateable object file, the calculation is
+ (((A < 2) | (P & 0xf0000000) + S) >> 2)
+ When producing a fully linked file, the calculation is
+ let R = (((A < 2) | (P & 0xf0000000) + S) >> 2)
+ ((R & 0x1f0000) << 5) | ((R & 0x3e00000) >> 5) | (R & 0xffff) */
+
+ if (!info->relocateable)
+ /* Shuffle the bits according to the formula above. */
+ value = (((value & 0x1f0000) << 5)
+ | ((value & 0x3e00000) >> 5)
+ | (value & 0xffff));
+
+ }
+ else if (r_type == R_MIPS16_GPREL)
+ {
+ /* R_MIPS16_GPREL is used for GP-relative addressing in mips16
+ mode. A typical instruction will have a format like this:
+
+ +--------------+--------------------------------+
+ ! EXTEND ! Imm 10:5 ! Imm 15:11 !
+ +--------------+--------------------------------+
+ ! Major ! rx ! ry ! Imm 4:0 !
+ +--------------+--------------------------------+
+
+ EXTEND is the five bit value 11110. Major is the instruction
+ opcode.
+
+ This is handled exactly like R_MIPS_GPREL16, except that the
+ addend is retrieved and stored as shown in this diagram; that
+ is, the Imm fields above replace the V-rel16 field.
+
+ All we need to do here is shuffle the bits appropriately. As
+ above, the two 16-bit halves must be swapped on a
+ little-endian system. */
+ value = (((value & 0x7e0) << 16)
+ | ((value & 0xf800) << 5)
+ | (value & 0x1f));
+ }
+
+ /* Set the field. */
+ x |= (value & howto->dst_mask);
+
+ /* If required, turn JAL into JALX. */
+ if (require_jalx)
+ {
+ boolean ok;
+ bfd_vma opcode = x >> 26;
+ bfd_vma jalx_opcode;
+
+ /* Check to see if the opcode is already JAL or JALX. */
+ if (r_type == R_MIPS16_26)
+ {
+ ok = ((opcode == 0x6) || (opcode == 0x7));
+ jalx_opcode = 0x7;
+ }
+ else
+ {
+ ok = ((opcode == 0x3) || (opcode == 0x1d));
+ jalx_opcode = 0x1d;
+ }
+
+ /* If the opcode is not JAL or JALX, there's a problem. */
+ if (!ok)
+ {
+ (*_bfd_error_handler)
+ (_("%s: %s+0x%lx: jump to stub routine which is not jal"),
+ bfd_get_filename (input_bfd),
+ input_section->name,
+ (unsigned long) relocation->r_offset);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ /* Make this the JALX opcode. */
+ x = (x & ~(0x3f << 26)) | (jalx_opcode << 26);
+ }
+
+ /* Swap the high- and low-order 16 bits on little-endian systems
+ when doing a MIPS16 relocation. */
+ if ((r_type == R_MIPS16_GPREL || r_type == R_MIPS16_26)
+ && bfd_little_endian (input_bfd))
+ x = (((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16));
+
+ /* Put the value into the output. */
+ bfd_put (8 * bfd_get_reloc_size (howto), input_bfd, x, location);
+ return true;
+}
+
+/* Returns true if SECTION is a MIPS16 stub section. */
+
+static boolean
+mips_elf_stub_section_p (abfd, section)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section;
+{
+ const char *name = bfd_get_section_name (abfd, section);
+
+ return (strncmp (name, FN_STUB, sizeof FN_STUB - 1) == 0
+ || strncmp (name, CALL_STUB, sizeof CALL_STUB - 1) == 0
+ || strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0);
+}
+
+/* Relocate a MIPS ELF section. */
+
+boolean
+_bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+{
+ Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *relend;
+ bfd_vma addend = 0;
+ boolean use_saved_addend_p = false;
+ struct elf_backend_data *bed;
+
+ bed = get_elf_backend_data (output_bfd);
+ relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
+ for (rel = relocs; rel < relend; ++rel)
+ {
+ const char *name;
+ bfd_vma value;
+ reloc_howto_type *howto;
+ boolean require_jalx;
+ /* True if the relocation is a RELA relocation, rather than a
+ REL relocation. */
+ boolean rela_relocation_p = true;
+ int r_type = ELF32_R_TYPE (rel->r_info);
+
+ /* Find the relocation howto for this relocation. */
+ if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+ {
+ /* Some 32-bit code uses R_MIPS_64. In particular, people use
+ 64-bit code, but make sure all their addresses are in the
+ lowermost or uppermost 32-bit section of the 64-bit address
+ space. Thus, when they use an R_MIPS_64 they mean what is
+ usually meant by R_MIPS_32, with the exception that the
+ stored value is sign-extended to 64 bits. */
+ howto = elf_mips_howto_table + R_MIPS_32;
+
+ /* On big-endian systems, we need to lie about the position
+ of the reloc. */
+ if (bfd_big_endian (input_bfd))
+ rel->r_offset += 4;
+ }
+ else
+ howto = mips_rtype_to_howto (r_type);
+
+ if (!use_saved_addend_p)
+ {
+ Elf_Internal_Shdr *rel_hdr;
+
+ /* If these relocations were originally of the REL variety,
+ we must pull the addend out of the field that will be
+ relocated. Otherwise, we simply use the contents of the
+ RELA relocation. To determine which flavor or relocation
+ this is, we depend on the fact that the INPUT_SECTION's
+ REL_HDR is read before its REL_HDR2. */
+ rel_hdr = &elf_section_data (input_section)->rel_hdr;
+ if ((size_t) (rel - relocs)
+ >= (rel_hdr->sh_size / rel_hdr->sh_entsize
+ * bed->s->int_rels_per_ext_rel))
+ rel_hdr = elf_section_data (input_section)->rel_hdr2;
+ if (rel_hdr->sh_entsize == MIPS_ELF_REL_SIZE (input_bfd))
{
- unsigned short extend, insn;
- bfd_byte buf[4];
- unsigned long final;
+ /* Note that this is a REL relocation. */
+ rela_relocation_p = false;
+
+ /* Get the addend, which is stored in the input file. */
+ addend = mips_elf_obtain_contents (howto,
+ rel,
+ input_bfd,
+ contents);
+ addend &= howto->src_mask;
+
+ /* For some kinds of relocations, the ADDEND is a
+ combination of the addend stored in two different
+ relocations. */
+ if (r_type == R_MIPS_HI16
+ || r_type == R_MIPS_GNU_REL_HI16
+ || (r_type == R_MIPS_GOT16
+ && mips_elf_local_relocation_p (input_bfd, rel,
+ local_sections)))
+ {
+ bfd_vma l;
+ const Elf_Internal_Rela *lo16_relocation;
+ reloc_howto_type *lo16_howto;
+ int lo;
+
+ /* The combined value is the sum of the HI16 addend,
+ left-shifted by sixteen bits, and the LO16
+ addend, sign extended. (Usually, the code does
+ a `lui' of the HI16 value, and then an `addiu' of
+ the LO16 value.)
+
+ Scan ahead to find a matching LO16 relocation. */
+ if (r_type == R_MIPS_GNU_REL_HI16)
+ lo = R_MIPS_GNU_REL_LO16;
+ else
+ lo = R_MIPS_LO16;
+ lo16_relocation
+ = mips_elf_next_relocation (lo, rel, relend);
+ if (lo16_relocation == NULL)
+ return false;
- /* Extract the addend into buf, run the regular reloc,
- and stuff the resulting value back into the
- instructions. */
- if (rel->r_offset > input_section->_raw_size)
- r = bfd_reloc_outofrange;
- else
+ /* Obtain the addend kept there. */
+ lo16_howto = mips_rtype_to_howto (lo);
+ l = mips_elf_obtain_contents (lo16_howto,
+ lo16_relocation,
+ input_bfd, contents);
+ l &= lo16_howto->src_mask;
+ l = mips_elf_sign_extend (l, 16);
+
+ addend <<= 16;
+
+ /* Compute the combined addend. */
+ addend += l;
+ }
+ else if (r_type == R_MIPS16_GPREL)
{
- extend = bfd_get_16 (input_bfd, contents + rel->r_offset);
- insn = bfd_get_16 (input_bfd, contents + rel->r_offset + 2);
- bfd_put_32 (input_bfd,
- (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- buf);
- r = _bfd_final_link_relocate (howto, input_bfd,
- input_section, buf,
- (bfd_vma) 0, relocation,
- addend);
- final = bfd_get_32 (input_bfd, buf);
- bfd_put_16 (input_bfd,
- ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- contents + rel->r_offset);
- bfd_put_16 (input_bfd,
- ((insn & 0xffe0)
- | (final & 0x1f)),
- contents + rel->r_offset + 2);
+ /* The addend is scrambled in the object file. See
+ mips_elf_perform_relocation for details on the
+ format. */
+ addend = (((addend & 0x1f0000) >> 5)
+ | ((addend & 0x7e00000) >> 16)
+ | (addend & 0x1f));
}
}
else
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, addend);
-
- /* The jal instruction can only jump to an address which is
- divisible by 4, and it can only jump to an address with
- the same upper 4 bits as the PC. */
- if (r == bfd_reloc_ok
- && (r_type == R_MIPS16_26 || r_type == R_MIPS_26))
+ addend = rel->r_addend;
+ }
+
+ if (info->relocateable)
+ {
+ Elf_Internal_Sym *sym;
+ unsigned long r_symndx;
+
+ if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd)
+ && bfd_big_endian (input_bfd))
+ rel->r_offset -= 4;
+
+ /* Since we're just relocating, all we need to do is copy
+ the relocations back out to the object file, unless
+ they're against a section symbol, in which case we need
+ to adjust by the section offset, or unless they're GP
+ relative in which case we need to adjust by the amount
+ that we're adjusting GP in this relocateable object. */
+
+ if (!mips_elf_local_relocation_p (input_bfd, rel, local_sections))
+ /* There's nothing to do for non-local relocations. */
+ continue;
+
+ if (r_type == R_MIPS16_GPREL
+ || r_type == R_MIPS_GPREL16
+ || r_type == R_MIPS_GPREL32
+ || r_type == R_MIPS_LITERAL)
+ addend -= (_bfd_get_gp_value (output_bfd)
+ - _bfd_get_gp_value (input_bfd));
+ else if (r_type == R_MIPS_26 || r_type == R_MIPS16_26
+ || r_type == R_MIPS_GNU_REL16_S2)
+ /* The addend is stored without its two least
+ significant bits (which are always zero.) In a
+ non-relocateable link, calculate_relocation will do
+ this shift; here, we must do it ourselves. */
+ addend <<= 2;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ sym = local_syms + r_symndx;
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ /* Adjust the addend appropriately. */
+ addend += local_sections[r_symndx]->output_offset;
+
+ /* If the relocation is for a R_MIPS_HI16 or R_MIPS_GOT16,
+ then we only want to write out the high-order 16 bits.
+ The subsequent R_MIPS_LO16 will handle the low-order bits. */
+ if (r_type == R_MIPS_HI16 || r_type == R_MIPS_GOT16
+ || r_type == R_MIPS_GNU_REL_HI16)
+ addend = mips_elf_high (addend);
+ /* If the relocation is for an R_MIPS_26 relocation, then
+ the two low-order bits are not stored in the object file;
+ they are implicitly zero. */
+ else if (r_type == R_MIPS_26 || r_type == R_MIPS16_26
+ || r_type == R_MIPS_GNU_REL16_S2)
+ addend >>= 2;
+
+ if (rela_relocation_p)
+ /* If this is a RELA relocation, just update the addend.
+ We have to cast away constness for REL. */
+ rel->r_addend = addend;
+ else
{
- bfd_vma addr;
-
- addr = relocation;
- if (other == STO_MIPS16)
- addr &= ~ (bfd_vma) 1;
- addr += addend;
- if ((addr & 3) != 0
- || ((addr & 0xf0000000)
- != ((input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset)
- & 0xf0000000)))
- r = bfd_reloc_overflow;
+ /* Otherwise, we have to write the value back out. Note
+ that we use the source mask, rather than the
+ destination mask because the place to which we are
+ writing will be source of the addend in the final
+ link. */
+ addend &= howto->src_mask;
+
+ if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+ /* See the comment above about using R_MIPS_64 in the 32-bit
+ ABI. Here, we need to update the addend. It would be
+ possible to get away with just using the R_MIPS_32 reloc
+ but for endianness. */
+ {
+ bfd_vma sign_bits;
+ bfd_vma low_bits;
+ bfd_vma high_bits;
+
+ if (addend & 0x80000000u)
+ sign_bits = 0xffffffffu;
+ else
+ sign_bits = 0;
+
+ /* If we don't know that we have a 64-bit type,
+ do two separate stores. */
+ if (bfd_big_endian (input_bfd))
+ {
+ /* Store the sign-bits (which are most significant)
+ first. */
+ low_bits = sign_bits;
+ high_bits = addend;
+ }
+ else
+ {
+ low_bits = addend;
+ high_bits = sign_bits;
+ }
+ bfd_put_32 (input_bfd, low_bits,
+ contents + rel->r_offset);
+ bfd_put_32 (input_bfd, high_bits,
+ contents + rel->r_offset + 4);
+ continue;
+ }
+
+ if (!mips_elf_perform_relocation (info, howto, rel, addend,
+ input_bfd, input_section,
+ contents, false))
+ return false;
}
- if (SGI_COMPAT (abfd)
- && scpt != NULL
- && (input_section->flags & SEC_ALLOC) != 0)
- {
- Elf32_crinfo cptrel;
- bfd_byte *cr;
+ /* Go on to the next relocation. */
+ continue;
+ }
- /* Make an entry of compact relocation info. */
- mips_elf_set_cr_format (cptrel, CRF_MIPS_LONG);
- cptrel.vaddr = (rel->r_offset
- + input_section->output_section->vma
- + input_section->output_offset);
+ /* In the N32 and 64-bit ABIs there may be multiple consecutive
+ relocations for the same offset. In that case we are
+ supposed to treat the output of each relocation as the addend
+ for the next. */
+ if (rel + 1 < relend
+ && rel->r_offset == rel[1].r_offset
+ && ELF32_R_TYPE (rel[1].r_info) != R_MIPS_NONE)
+ use_saved_addend_p = true;
+ else
+ use_saved_addend_p = false;
+
+ /* Figure out what value we are supposed to relocate. */
+ switch (mips_elf_calculate_relocation (output_bfd,
+ input_bfd,
+ input_section,
+ info,
+ rel,
+ addend,
+ howto,
+ local_syms,
+ local_sections,
+ &value,
+ &name,
+ &require_jalx))
+ {
+ case bfd_reloc_continue:
+ /* There's nothing to do. */
+ continue;
- switch (r_type)
- {
- case R_MIPS_26:
- mips_elf_set_cr_type (cptrel, CRT_MIPS_JMPAD);
- /* XXX How should we set dist2to in this case. */
- mips_elf_set_cr_dist2to (cptrel, 8);
- cptrel.konst = addend + relocation;
- cr = scpt->contents + sizeof (Elf32_External_compact_rel);
- bfd_elf32_swap_crinfo_out (output_bfd, &cptrel,
- ((Elf32_External_crinfo *) cr
- + scpt->reloc_count));
- ++scpt->reloc_count;
- break;
+ case bfd_reloc_undefined:
+ /* mips_elf_calculate_relocation already called the
+ undefined_symbol callback. There's no real point in
+ trying to perform the relocation at this point, so we
+ just skip ahead to the next relocation. */
+ continue;
- case R_MIPS_GPREL16:
- case R_MIPS_LITERAL:
- case R_MIPS_GPREL32:
- mips_elf_set_cr_type (cptrel, CRT_MIPS_GPHI_LO);
- cptrel.konst = gp - cptrel.vaddr;
- mips_elf_set_cr_dist2to (cptrel, 4);
- cr = scpt->contents + sizeof (Elf32_External_compact_rel);
- bfd_elf32_swap_crinfo_out (output_bfd, &cptrel,
- ((Elf32_External_crinfo *) cr
- + scpt->reloc_count));
- ++scpt->reloc_count;
- break;
+ case bfd_reloc_notsupported:
+ abort ();
+ break;
- default:
- break;
- }
+ case bfd_reloc_overflow:
+ if (use_saved_addend_p)
+ /* Ignore overflow until we reach the last relocation for
+ a given location. */
+ ;
+ else
+ {
+ BFD_ASSERT (name != NULL);
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return false;
}
+ break;
+
+ case bfd_reloc_ok:
+ break;
+
+ default:
+ abort ();
+ break;
+ }
+
+ /* If we've got another relocation for the address, keep going
+ until we reach the last one. */
+ if (use_saved_addend_p)
+ {
+ addend = value;
+ continue;
}
- if (r != bfd_reloc_ok)
+ if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+ /* See the comment above about using R_MIPS_64 in the 32-bit
+ ABI. Until now, we've been using the HOWTO for R_MIPS_32;
+ that calculated the right value. Now, however, we
+ sign-extend the 32-bit result to 64-bits, and store it as a
+ 64-bit value. We are especially generous here in that we
+ go to extreme lengths to support this usage on systems with
+ only a 32-bit VMA. */
{
- switch (r)
+ bfd_vma sign_bits;
+ bfd_vma low_bits;
+ bfd_vma high_bits;
+
+ if (value & 0x80000000u)
+ sign_bits = 0xffffffffu;
+ else
+ sign_bits = 0;
+
+ /* If we don't know that we have a 64-bit type,
+ do two separate stores. */
+ if (bfd_big_endian (input_bfd))
{
- default:
- case bfd_reloc_outofrange:
- abort ();
- case bfd_reloc_overflow:
- {
- const char *name;
-
- if (h != NULL)
- name = h->root.root.string;
- else
- {
- name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (name == NULL)
- return false;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
- }
- if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
- return false;
- }
- break;
+ /* Undo what we did above. */
+ rel->r_offset -= 4;
+ /* Store the sign-bits (which are most significant)
+ first. */
+ low_bits = sign_bits;
+ high_bits = value;
}
+ else
+ {
+ low_bits = value;
+ high_bits = sign_bits;
+ }
+ bfd_put_32 (input_bfd, low_bits,
+ contents + rel->r_offset);
+ bfd_put_32 (input_bfd, high_bits,
+ contents + rel->r_offset + 4);
+ continue;
}
+
+ /* Actually perform the relocation. */
+ if (!mips_elf_perform_relocation (info, howto, rel, value, input_bfd,
+ input_section, contents,
+ require_jalx))
+ return false;
}
return true;
@@ -5426,11 +6902,11 @@ mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
also where we undo the increment of the value for a mips16 symbol. */
/*ARGSIGNORED*/
-static boolean
-mips_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec)
- bfd *abfd;
- struct bfd_link_info *info;
- const char *name;
+boolean
+_bfd_mips_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
Elf_Internal_Sym *sym;
asection *input_sec;
{
@@ -5453,12 +6929,15 @@ mips_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec)
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#define ELF_DYNAMIC_INTERPRETER(abfd) \
+ (ABI_N32_P (abfd) ? "/usr/lib32/libc.so.1" \
+ : ABI_64_P (abfd) ? "/usr/lib64/libc.so.1" \
+ : "/usr/lib/libc.so.1")
/* Create dynamic sections when linking against a dynamic object. */
-static boolean
-mips_elf_create_dynamic_sections (abfd, info)
+boolean
+_bfd_mips_elf_create_dynamic_sections (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
@@ -5482,28 +6961,42 @@ mips_elf_create_dynamic_sections (abfd, info)
if (! mips_elf_create_got_section (abfd, info))
return false;
+ /* Create the .msym section on IRIX6. It is used by the dynamic
+ linker to speed up dynamic relocations, and to avoid computing
+ the ELF hash for symbols. */
+ if (IRIX_COMPAT (abfd) == ict_irix6
+ && !mips_elf_create_msym_section (abfd))
+ return false;
+
/* Create .stub section. */
- if (bfd_get_section_by_name (abfd, ".stub") == NULL)
+ if (bfd_get_section_by_name (abfd,
+ MIPS_ELF_STUB_SECTION_NAME (abfd)) == NULL)
{
- s = bfd_make_section (abfd, ".stub");
+ s = bfd_make_section (abfd, MIPS_ELF_STUB_SECTION_NAME (abfd));
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_flags (abfd, s, flags | SEC_CODE)
+ || ! bfd_set_section_alignment (abfd, s,
+ MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return false;
}
- if (SGI_COMPAT (abfd)
+ if (IRIX_COMPAT (abfd) == ict_irix5
&& !info->shared
&& bfd_get_section_by_name (abfd, ".rld_map") == NULL)
{
s = bfd_make_section (abfd, ".rld_map");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags & ~SEC_READONLY)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_alignment (abfd, s,
+ MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return false;
}
- if (SGI_COMPAT (abfd))
+ /* On IRIX5, we adjust add some additional symbols and change the
+ alignments of several sections. There is no ABI documentation
+ indicating that this is necessary on IRIX6, nor any evidence that
+ the linker takes such action. */
+ if (IRIX_COMPAT (abfd) == ict_irix5)
{
for (namep = mips_elf_dynsym_rtproc_names; *namep != NULL; namep++)
{
@@ -5593,7 +7086,7 @@ mips_elf_create_dynamic_sections (abfd, info)
static boolean
mips_elf_create_compact_rel_section (abfd, info)
bfd *abfd;
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
flagword flags;
register asection *s;
@@ -5606,7 +7099,8 @@ mips_elf_create_compact_rel_section (abfd, info)
s = bfd_make_section (abfd, ".compact_rel");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags)
- || ! bfd_set_section_alignment (abfd, s, 2))
+ || ! bfd_set_section_alignment (abfd, s,
+ MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return false;
s->_raw_size = sizeof (Elf32_External_compact_rel);
@@ -5628,7 +7122,7 @@ mips_elf_create_got_section (abfd, info)
struct mips_got_info *g;
/* This function may be called more than once. */
- if (bfd_get_section_by_name (abfd, ".got") != NULL)
+ if (mips_elf_got_section (abfd))
return true;
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
@@ -5659,13 +7153,13 @@ mips_elf_create_got_section (abfd, info)
return false;
/* The first several global offset table entries are reserved. */
- s->_raw_size = MIPS_RESERVED_GOTNO * 4;
+ s->_raw_size = MIPS_RESERVED_GOTNO * MIPS_ELF_GOT_SIZE (abfd);
g = (struct mips_got_info *) bfd_alloc (abfd,
sizeof (struct mips_got_info));
if (g == NULL)
return false;
- g->global_gotsym = 0;
+ g->global_gotsym = NULL;
g->local_gotno = MIPS_RESERVED_GOTNO;
g->assigned_gotno = MIPS_RESERVED_GOTNO;
if (elf_section_data (s) == NULL)
@@ -5676,15 +7170,66 @@ mips_elf_create_got_section (abfd, info)
return false;
}
elf_section_data (s)->tdata = (PTR) g;
+ elf_section_data (s)->this_hdr.sh_flags
+ |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
return true;
}
+/* Returns the .msym section for ABFD, creating it if it does not
+ already exist. Returns NULL to indicate error. */
+
+static asection *
+mips_elf_create_msym_section (abfd)
+ bfd *abfd;
+{
+ asection *s;
+
+ s = bfd_get_section_by_name (abfd, MIPS_ELF_MSYM_SECTION_NAME (abfd));
+ if (!s)
+ {
+ s = bfd_make_section (abfd, MIPS_ELF_MSYM_SECTION_NAME (abfd));
+ if (!s
+ || !bfd_set_section_flags (abfd, s,
+ SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_LINKER_CREATED
+ | SEC_READONLY)
+ || !bfd_set_section_alignment (abfd, s,
+ MIPS_ELF_LOG_FILE_ALIGN (abfd)))
+ return NULL;
+ }
+
+ return s;
+}
+
+/* Add room for N relocations to the .rel.dyn section in ABFD. */
+
+static void
+mips_elf_allocate_dynamic_relocations (abfd, n)
+ bfd *abfd;
+ unsigned int n;
+{
+ asection *s;
+
+ s = bfd_get_section_by_name (abfd, MIPS_ELF_REL_DYN_SECTION_NAME (abfd));
+ BFD_ASSERT (s != NULL);
+
+ if (s->_raw_size == 0)
+ {
+ /* Make room for a null element. */
+ s->_raw_size += MIPS_ELF_REL_SIZE (abfd);
+ ++s->reloc_count;
+ }
+ s->_raw_size += n * MIPS_ELF_REL_SIZE (abfd);
+}
+
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table. */
-static boolean
-mips_elf_check_relocs (abfd, info, sec, relocs)
+boolean
+_bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
bfd *abfd;
struct bfd_link_info *info;
asection *sec;
@@ -5700,6 +7245,7 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel_end;
asection *sgot;
asection *sreloc;
+ struct elf_backend_data *bed;
if (info->relocateable)
return true;
@@ -5784,7 +7330,7 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
asection **n;
if (elf_bad_symtab (abfd))
- symcount = symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
+ symcount = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
else
symcount = symtab_hdr->sh_info;
n = (asection **) bfd_zalloc (abfd,
@@ -5874,7 +7420,7 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
}
else
{
- sgot = bfd_get_section_by_name (dynobj, ".got");
+ sgot = mips_elf_got_section (dynobj);
if (sgot == NULL)
g = NULL;
else
@@ -5886,14 +7432,16 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
}
sreloc = NULL;
-
- rel_end = relocs + sec->reloc_count;
- for (rel = relocs; rel < rel_end; rel++)
+ bed = get_elf_backend_data (abfd);
+ rel_end = relocs + sec->reloc_count * bed->s->int_rels_per_ext_rel;
+ for (rel = relocs; rel < rel_end; ++rel)
{
unsigned long r_symndx;
+ int r_type;
struct elf_link_hash_entry *h;
r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
if (r_symndx < extsymoff)
h = NULL;
@@ -5912,7 +7460,7 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
/* Some relocs require a global offset table. */
if (dynobj == NULL || sgot == NULL)
{
- switch (ELF32_R_TYPE (rel->r_info))
+ switch (r_type)
{
case R_MIPS_GOT16:
case R_MIPS_CALL16:
@@ -5920,19 +7468,19 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
case R_MIPS_CALL_LO16:
case R_MIPS_GOT_HI16:
case R_MIPS_GOT_LO16:
+ case R_MIPS_GOT_PAGE:
+ case R_MIPS_GOT_OFST:
+ case R_MIPS_GOT_DISP:
if (dynobj == NULL)
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! mips_elf_create_got_section (dynobj, info))
return false;
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
- BFD_ASSERT (g != NULL);
+ g = mips_elf_got_info (dynobj, &sgot);
break;
case R_MIPS_32:
case R_MIPS_REL32:
+ case R_MIPS_64:
if (dynobj == NULL
&& (info->shared || h != NULL)
&& (sec->flags & SEC_ALLOC) != 0)
@@ -5944,90 +7492,73 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
}
}
- switch (ELF32_R_TYPE (rel->r_info))
+ if (!h && (r_type == R_MIPS_CALL_LO16
+ || r_type == R_MIPS_GOT_LO16
+ || r_type == R_MIPS_GOT_DISP))
{
- case R_MIPS_CALL16:
- case R_MIPS_CALL_HI16:
- case R_MIPS_CALL_LO16:
- /* This symbol requires a global offset table entry. */
+ /* We may need a local GOT entry for this relocation. We
+ don't count R_MIPS_GOT_PAGE because we can estimate the
+ maximum number of pages needed by looking at the size of
+ the segment. Similar comments apply to R_MIPS_GOT16. We
+ don't count R_MIPS_GOT_HI16, or R_MIPS_CALL_HI16 because
+ these are always followed by an R_MIPS_GOT_LO16 or
+ R_MIPS_CALL_LO16.
+
+ This estimation is very conservative since we can merge
+ duplicate entries in the GOT. In order to be less
+ conservative, we could actually build the GOT here,
+ rather than in relocate_section. */
+ g->local_gotno++;
+ sgot->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
+ }
+ switch (r_type)
+ {
+ case R_MIPS_CALL16:
if (h == NULL)
{
(*_bfd_error_handler)
- ("%s: CALL16 reloc at 0x%lx not against global symbol",
+ (_("%s: CALL16 reloc at 0x%lx not against global symbol"),
bfd_get_filename (abfd), (unsigned long) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return false;
}
+ /* Fall through. */
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
+ case R_MIPS_CALL_HI16:
+ case R_MIPS_CALL_LO16:
+ if (h != NULL)
{
- if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ /* This symbol requires a global offset table entry. */
+ if (!mips_elf_record_global_got_symbol (h, info, g))
return false;
- }
- if (h->got_offset != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
+ /* We need a stub, not a plt entry for the undefined
+ function. But we record it as if it needs plt. See
+ elf_adjust_dynamic_symbol in elflink.h. */
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->type = STT_FUNC;
}
-
- /* Note the index of the first global got symbol in .dynsym. */
- if (g->global_gotsym == 0
- || g->global_gotsym > (unsigned long) h->dynindx)
- g->global_gotsym = h->dynindx;
-
- /* Make this symbol to have the corresponding got entry. */
- h->got_offset = 0;
-
- /* We need a stub, not a plt entry for the undefined
- function. But we record it as if it needs plt. See
- elf_adjust_dynamic_symbol in elflink.h. */
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- h->type = STT_FUNC;
-
break;
case R_MIPS_GOT16:
case R_MIPS_GOT_HI16:
case R_MIPS_GOT_LO16:
+ case R_MIPS_GOT_DISP:
/* This symbol requires a global offset table entry. */
-
- if (h != NULL)
- {
- /* 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;
- }
-
- if (h->got_offset != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
- }
- /* Note the index of the first global got symbol in
- .dynsym. */
- if (g->global_gotsym == 0
- || g->global_gotsym > (unsigned long) h->dynindx)
- g->global_gotsym = h->dynindx;
-
- /* Make this symbol to be the global got symbol. */
- h->got_offset = 0;
- }
-
+ if (h && !mips_elf_record_global_got_symbol (h, info, g))
+ return false;
break;
case R_MIPS_32:
case R_MIPS_REL32:
+ case R_MIPS_64:
if ((info->shared || h != NULL)
&& (sec->flags & SEC_ALLOC) != 0)
{
if (sreloc == NULL)
{
- const char *name = ".rel.dyn";
+ const char *name = MIPS_ELF_REL_DYN_SECTION_NAME (dynobj);
sreloc = bfd_get_section_by_name (dynobj, name);
if (sreloc == NULL)
@@ -6047,19 +7578,11 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
}
}
if (info->shared)
- {
- /* When creating a shared object, we must copy these
- reloc types into the output file as R_MIPS_REL32
- relocs. We make room for this reloc in the
- .rel.dyn reloc section */
- if (sreloc->_raw_size == 0)
- {
- /* Add a null element. */
- sreloc->_raw_size += sizeof (Elf32_External_Rel);
- ++sreloc->reloc_count;
- }
- sreloc->_raw_size += sizeof (Elf32_External_Rel);
- }
+ /* When creating a shared object, we must copy these
+ reloc types into the output file as R_MIPS_REL32
+ relocs. We make room for this reloc in the
+ .rel.dyn reloc section. */
+ mips_elf_allocate_dynamic_relocations (dynobj, 1);
else
{
struct mips_elf_link_hash_entry *hmips;
@@ -6067,25 +7590,46 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
/* We only need to copy this reloc if the symbol is
defined in a dynamic object. */
hmips = (struct mips_elf_link_hash_entry *) h;
- ++hmips->mips_32_relocs;
+ ++hmips->possibly_dynamic_relocs;
}
+
+ /* Even though we don't directly need a GOT entry for
+ this symbol, a symbol must have a dynamic symbol
+ table index greater that DT_MIPS_GOTSYM if there are
+ dynamic relocations against it. */
+ if (h != NULL
+ && !mips_elf_record_global_got_symbol (h, info, g))
+ return false;
}
- if (SGI_COMPAT (abfd))
+ if (SGI_COMPAT (dynobj))
mips_elf_hash_table (info)->compact_rel_size +=
sizeof (Elf32_External_crinfo);
-
break;
case R_MIPS_26:
case R_MIPS_GPREL16:
case R_MIPS_LITERAL:
case R_MIPS_GPREL32:
- if (SGI_COMPAT (abfd))
+ if (SGI_COMPAT (dynobj))
mips_elf_hash_table (info)->compact_rel_size +=
sizeof (Elf32_External_crinfo);
break;
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_MIPS_GNU_VTINHERIT:
+ 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_MIPS_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ return false;
+ break;
+
default:
break;
}
@@ -6094,7 +7638,7 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
symbol, then we will need the fn_stub if there is one.
References from a stub section do not count. */
if (h != NULL
- && ELF32_R_TYPE (rel->r_info) != R_MIPS16_26
+ && r_type != R_MIPS16_26
&& strncmp (bfd_get_section_name (abfd, sec), FN_STUB,
sizeof FN_STUB - 1) != 0
&& strncmp (bfd_get_section_name (abfd, sec), CALL_STUB,
@@ -6112,14 +7656,109 @@ mips_elf_check_relocs (abfd, info, sec, relocs)
return true;
}
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+asection *
+_bfd_mips_elf_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ /* ??? Do mips16 stub sections need to be handled special? */
+
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_MIPS_GNU_VTINHERIT:
+ case R_MIPS_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+boolean
+_bfd_mips_elf_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+#if 0
+ 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;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_MIPS_GOT16:
+ case R_MIPS_CALL16:
+ case R_MIPS_CALL_HI16:
+ case R_MIPS_CALL_LO16:
+ case R_MIPS_GOT_HI16:
+ case R_MIPS_GOT_LO16:
+ /* ??? It would seem that the existing MIPS 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. */
+ break;
+
+ default:
+ break;
+ }
+#endif
+
+ return true;
+}
+
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
change the definition to something the rest of the link can
understand. */
-static boolean
-mips_elf_adjust_dynamic_symbol (info, h)
+boolean
+_bfd_mips_elf_adjust_dynamic_symbol (info, h)
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
{
@@ -6145,20 +7784,10 @@ mips_elf_adjust_dynamic_symbol (info, h)
file. */
hmips = (struct mips_elf_link_hash_entry *) h;
if (! info->relocateable
- && hmips->mips_32_relocs != 0
+ && hmips->possibly_dynamic_relocs != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- s = bfd_get_section_by_name (dynobj, ".rel.dyn");
- BFD_ASSERT (s != NULL);
-
- if (s->_raw_size == 0)
- {
- /* Make room for a null element. */
- s->_raw_size += sizeof (Elf32_External_Rel);
- ++s->reloc_count;
- }
- s->_raw_size += hmips->mips_32_relocs * sizeof (Elf32_External_Rel);
- }
+ mips_elf_allocate_dynamic_relocations (dynobj,
+ hmips->possibly_dynamic_relocs);
/* For a function, create a stub, if needed. */
if (h->type == STT_FUNC
@@ -6174,14 +7803,15 @@ mips_elf_adjust_dynamic_symbol (info, h)
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
/* We need .stub section. */
- s = bfd_get_section_by_name (dynobj, ".stub");
+ s = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_STUB_SECTION_NAME (dynobj));
BFD_ASSERT (s != NULL);
h->root.u.def.section = s;
h->root.u.def.value = s->_raw_size;
/* XXX Write this stub address somewhere. */
- h->plt_offset = s->_raw_size;
+ h->plt.offset = s->_raw_size;
/* Make room for this stub code. */
s->_raw_size += MIPS_FUNCTION_STUB_SIZE;
@@ -6217,11 +7847,18 @@ mips_elf_adjust_dynamic_symbol (info, h)
static boolean mips_elf_check_mips16_stubs
PARAMS ((struct mips_elf_link_hash_entry *, PTR));
-static boolean
-mips_elf_always_size_sections (output_bfd, info)
+boolean
+_bfd_mips_elf_always_size_sections (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
{
+ asection *ri;
+
+ /* The .reginfo section has a fixed size. */
+ ri = bfd_get_section_by_name (output_bfd, ".reginfo");
+ if (ri != NULL)
+ bfd_set_section_size (output_bfd, ri, sizeof (Elf32_External_RegInfo));
+
if (info->relocateable
|| ! mips_elf_hash_table (info)->mips16_stubs_seen)
return true;
@@ -6240,7 +7877,7 @@ mips_elf_always_size_sections (output_bfd, info)
static boolean
mips_elf_check_mips16_stubs (h, data)
struct mips_elf_link_hash_entry *h;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
{
if (h->fn_stub != NULL
&& ! h->need_fn_stub)
@@ -6286,16 +7923,15 @@ mips_elf_check_mips16_stubs (h, data)
/* Set the sizes of the dynamic sections. */
-static boolean
-mips_elf_size_dynamic_sections (output_bfd, info)
+boolean
+_bfd_mips_elf_size_dynamic_sections (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
{
bfd *dynobj;
asection *s;
boolean reltext;
- asection *sgot;
- struct mips_got_info *g;
+ struct mips_got_info *g = NULL;
dynobj = elf_hash_table (info)->dynobj;
BFD_ASSERT (dynobj != NULL);
@@ -6307,43 +7943,13 @@ mips_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ s->_raw_size
+ = strlen (ELF_DYNAMIC_INTERPRETER (output_bfd)) + 1;
+ s->contents
+ = (bfd_byte *) ELF_DYNAMIC_INTERPRETER (output_bfd);
}
}
- /* Recompute the size of .got for local entires (reserved and
- hipages) if needed. To estimate it, get the upper bound of total
- size of loadable sections. */
- sgot = bfd_get_section_by_name (dynobj, ".got");
-
- if (sgot != NULL)
- {
- bfd_size_type loadable_size = 0;
- bfd_size_type local_gotno;
- struct _bfd *sub;
-
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
- BFD_ASSERT (g != NULL);
-
- for (sub = info->input_bfds; sub; sub = sub->link_next)
- for (s = sub->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_ALLOC) == 0)
- continue;
- loadable_size += (s->_raw_size + 0xf) & ~0xf;
- }
-
- loadable_size += MIPS_FUNCTION_STUB_SIZE;
-
- /* Assume there are two loadable segments consisting of
- contiguous sections. Is 5 enough? */
- local_gotno = (loadable_size >> 16) + 5 + MIPS_RESERVED_GOTNO;
- g->local_gotno = local_gotno;
- sgot->_raw_size += local_gotno * 4;
- }
-
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
@@ -6365,7 +7971,18 @@ mips_elf_size_dynamic_sections (output_bfd, info)
if (strncmp (name, ".rel", 4) == 0)
{
if (s->_raw_size == 0)
- strip = true;
+ {
+ /* We only strip the section if the output section name
+ has the same name. Otherwise, there might be several
+ input sections for this output section. FIXME: This
+ code is probably not needed these days anyhow, since
+ the linker now does not create empty output sections. */
+ if (s->output_section != NULL
+ && strcmp (name,
+ bfd_get_section_name (s->output_section->owner,
+ s->output_section)) == 0)
+ strip = true;
+ }
else
{
const char *outname;
@@ -6383,30 +8000,76 @@ mips_elf_size_dynamic_sections (output_bfd, info)
if ((target != NULL
&& (target->flags & SEC_READONLY) != 0
&& (target->flags & SEC_ALLOC) != 0)
- || strcmp (outname, ".rel.dyn") == 0)
+ || strcmp (outname,
+ MIPS_ELF_REL_DYN_SECTION_NAME (output_bfd)) == 0)
reltext = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
- if (strcmp (name, ".rel.dyn") != 0)
+ if (strcmp (name,
+ MIPS_ELF_REL_DYN_SECTION_NAME (output_bfd)) != 0)
s->reloc_count = 0;
}
}
else if (strncmp (name, ".got", 4) == 0)
{
int i;
+ bfd_size_type loadable_size = 0;
+ bfd_size_type local_gotno;
+ struct _bfd *sub;
- BFD_ASSERT (elf_section_data (s) != NULL);
+ BFD_ASSERT (elf_section_data (s) != NULL);
g = (struct mips_got_info *) elf_section_data (s)->tdata;
- BFD_ASSERT (g != NULL);
-
- /* Fix the size of .got section for the correspondence of
- global symbols and got entries. This adds some useless
- got entries. Is this required by ABI really? */
- i = elf_hash_table (info)->dynsymcount - g->global_gotsym;
- s->_raw_size += i * 4;
+ BFD_ASSERT (g != NULL);
+
+ /* Calculate the total loadable size of the output. That
+ will give us the maximum number of GOT_PAGE entries
+ required. */
+ for (sub = info->input_bfds; sub; sub = sub->link_next)
+ {
+ asection *subsection;
+
+ for (subsection = sub->sections;
+ subsection;
+ subsection = subsection->next)
+ {
+ if ((subsection->flags & SEC_ALLOC) == 0)
+ continue;
+ loadable_size += (subsection->_raw_size + 0xf) & ~0xf;
+ }
+ }
+ loadable_size += MIPS_FUNCTION_STUB_SIZE;
+
+ /* Assume there are two loadable segments consisting of
+ contiguous sections. Is 5 enough? */
+ local_gotno = (loadable_size >> 16) + 5;
+ if (IRIX_COMPAT (output_bfd) == ict_irix6)
+ /* It's possible we will need GOT_PAGE entries as well as
+ GOT16 entries. Often, these will be able to share GOT
+ entries, but not always. */
+ local_gotno *= 2;
+
+ g->local_gotno += local_gotno;
+ s->_raw_size += local_gotno * MIPS_ELF_GOT_SIZE (dynobj);
+
+ /* There has to be a global GOT entry for every symbol with
+ a dynamic symbol table index of DT_MIPS_GOTSYM or
+ higher. Therefore, it make sense to put those symbols
+ that need GOT entries at the end of the symbol table. We
+ do that here. */
+ if (!mips_elf_sort_hash_table (info, 1))
+ return false;
+
+ if (g->global_gotsym != NULL)
+ i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx;
+ else
+ /* If there are no global symbols, or none requiring
+ relocations, then GLOBAL_GOTSYM will be NULL. */
+ i = 0;
+ g->global_gotno = i;
+ s->_raw_size += i * MIPS_ELF_GOT_SIZE (dynobj);
}
- else if (strncmp (name, ".stub", 5) == 0)
+ else if (strcmp (name, MIPS_ELF_STUB_SECTION_NAME (output_bfd)) == 0)
{
/* Irix rld assumes that the function stub isn't at the end
of .text section. So put a dummy. XXX */
@@ -6423,6 +8086,11 @@ mips_elf_size_dynamic_sections (output_bfd, info)
else if (SGI_COMPAT (output_bfd)
&& strncmp (name, ".compact_rel", 12) == 0)
s->_raw_size += mips_elf_hash_table (info)->compact_rel_size;
+ else if (strcmp (name, MIPS_ELF_MSYM_SECTION_NAME (output_bfd))
+ == 0)
+ s->_raw_size = (sizeof (Elf32_External_Msym)
+ * (elf_hash_table (info)->dynsymcount
+ + bfd_count_sections (output_bfd)));
else if (strncmp (name, ".init", 5) != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -6431,26 +8099,17 @@ mips_elf_size_dynamic_sections (output_bfd, info)
if (strip)
{
- asection **spp;
-
- for (spp = &s->output_section->owner->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --s->output_section->owner->section_count;
-
+ _bfd_strip_section_from_output (info, s);
continue;
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
{
bfd_set_error (bfd_error_no_memory);
return false;
}
- memset (s->contents, 0, s->_raw_size);
}
if (elf_hash_table (info)->dynamic_sections_created)
@@ -6466,200 +8125,166 @@ mips_elf_size_dynamic_sections (output_bfd, info)
{
/* SGI object has the equivalence of DT_DEBUG in the
DT_MIPS_RLD_MAP entry. */
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_RLD_MAP, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
return false;
}
else
- if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
return false;
}
if (reltext)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0))
return false;
}
- if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
return false;
- if (bfd_get_section_by_name (dynobj, ".rel.dyn"))
+ if (bfd_get_section_by_name (dynobj,
+ MIPS_ELF_REL_DYN_SECTION_NAME (dynobj)))
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_REL, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_RELSZ, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_RELENT, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0))
return false;
}
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_CONFLICTNO, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_CONFLICTNO, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_LIBLISTNO, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LIBLISTNO, 0))
return false;
if (bfd_get_section_by_name (dynobj, ".conflict") != NULL)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_CONFLICT, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_CONFLICT, 0))
return false;
s = bfd_get_section_by_name (dynobj, ".liblist");
BFD_ASSERT (s != NULL);
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_LIBLIST, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LIBLIST, 0))
return false;
}
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_RLD_VERSION, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_VERSION, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_FLAGS, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_FLAGS, 0))
return false;
#if 0
/* Time stamps in executable files are a bad idea. */
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_TIME_STAMP, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_TIME_STAMP, 0))
return false;
#endif
#if 0 /* FIXME */
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_ICHECKSUM, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_ICHECKSUM, 0))
return false;
#endif
#if 0 /* FIXME */
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_IVERSION, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_IVERSION, 0))
return false;
#endif
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_BASE_ADDRESS, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_BASE_ADDRESS, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_LOCAL_GOTNO, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LOCAL_GOTNO, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_SYMTABNO, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_SYMTABNO, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_UNREFEXTNO, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_UNREFEXTNO, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_GOTSYM, 0))
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_GOTSYM, 0))
return false;
- if (! bfd_elf32_add_dynamic_entry (info, DT_MIPS_HIPAGENO, 0))
+ if (IRIX_COMPAT (dynobj) == ict_irix5
+ && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_HIPAGENO, 0))
return false;
-#if 0 /* (SGI_COMPAT) */
- if (! bfd_get_section_by_name (dynobj, ".init"))
- if (! bfd_elf32_add_dynamic_entry (info, DT_INIT, 0))
- return false;
+ if (IRIX_COMPAT (dynobj) == ict_irix6
+ && (bfd_get_section_by_name
+ (dynobj, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj)))
+ && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0))
+ return false;
- if (! bfd_get_section_by_name (dynobj, ".fini"))
- if (! bfd_elf32_add_dynamic_entry (info, DT_FINI, 0))
- return false;
-#endif
+ if (bfd_get_section_by_name (dynobj,
+ MIPS_ELF_MSYM_SECTION_NAME (dynobj))
+ && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_MSYM, 0))
+ return false;
}
- /* If we use dynamic linking, we generate a section symbol for each
- output section. These are local symbols, which means that they
- must come first in the dynamic symbol table.
- That means we must increment the dynamic symbol index of every
- other dynamic symbol. */
- {
- const char * const *namep;
- unsigned int c, i;
- bfd_size_type strindex;
- struct bfd_strtab_hash *dynstr;
- struct mips_got_info *g;
-
- c = 0;
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- if (SGI_COMPAT (output_bfd))
- {
- c = SIZEOF_MIPS_DYNSYM_SECNAMES - 1;
- elf_link_hash_traverse (elf_hash_table (info),
- mips_elf_adjust_dynindx,
- (PTR) &c);
- elf_hash_table (info)->dynsymcount += c;
-
- dynstr = elf_hash_table (info)->dynstr;
- BFD_ASSERT (dynstr != NULL);
-
- for (i = 1, namep = mips_elf_dynsym_sec_names;
- *namep != NULL;
- i++, namep++)
- {
- s = bfd_get_section_by_name (output_bfd, *namep);
- if (s != NULL)
- elf_section_data (s)->dynindx = i;
-
- strindex = _bfd_stringtab_add (dynstr, *namep, true, false);
- if (strindex == (bfd_size_type) -1)
- return false;
-
- mips_elf_hash_table (info)->dynsym_sec_strindex[i] = strindex;
- }
- }
- else
- {
- c = bfd_count_sections (output_bfd);
- elf_link_hash_traverse (elf_hash_table (info),
- mips_elf_adjust_dynindx,
- (PTR) &c);
- elf_hash_table (info)->dynsymcount += c;
-
- for (i = 1, s = output_bfd->sections; s != NULL; s = s->next, i++)
- {
- elf_section_data (s)->dynindx = i;
- /* These symbols will have no names, so we don't need to
- fiddle with dynstr_index. */
- }
- }
- }
-
- if (sgot != NULL)
- {
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
- BFD_ASSERT (g != NULL);
-
- /* If there are no global got symbols, fake the last symbol so
- for safety. */
- if (g->global_gotsym)
- g->global_gotsym += c;
- else
- g->global_gotsym = elf_hash_table (info)->dynsymcount - 1;
- }
- }
-
return true;
}
-/* Increment the index of a dynamic symbol by a given amount. Called
- via elf_link_hash_traverse. */
+/* If NAME is one of the special IRIX6 symbols defined by the linker,
+ adjust it appropriately now. */
-static boolean
-mips_elf_adjust_dynindx (h, cparg)
- struct elf_link_hash_entry *h;
- PTR cparg;
+static void
+mips_elf_irix6_finish_dynamic_symbol (abfd, name, sym)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ const char *name;
+ Elf_Internal_Sym *sym;
{
- unsigned int *cp = (unsigned int *) cparg;
-
- if (h->dynindx != -1)
- h->dynindx += *cp;
- return true;
+ /* The linker script takes care of providing names and values for
+ these, but we must place them into the right sections. */
+ static const char* const text_section_symbols[] = {
+ "_ftext",
+ "_etext",
+ "__dso_displacement",
+ "__elf_header",
+ "__program_header_table",
+ NULL
+ };
+
+ static const char* const data_section_symbols[] = {
+ "_fdata",
+ "_edata",
+ "_end",
+ "_fbss",
+ NULL
+ };
+
+ const char* const *p;
+ int i;
+
+ for (i = 0; i < 2; ++i)
+ for (p = (i == 0) ? text_section_symbols : data_section_symbols;
+ *p;
+ ++p)
+ if (strcmp (*p, name) == 0)
+ {
+ /* All of these symbols are given type STT_SECTION by the
+ IRIX6 linker. */
+ sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
+
+ /* The IRIX linker puts these symbols in special sections. */
+ if (i == 0)
+ sym->st_shndx = SHN_MIPS_TEXT;
+ else
+ sym->st_shndx = SHN_MIPS_DATA;
+
+ break;
+ }
}
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
-static boolean
-mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
+boolean
+_bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd *output_bfd;
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
@@ -6668,13 +8293,16 @@ mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd *dynobj;
bfd_vma gval;
asection *sgot;
+ asection *smsym;
struct mips_got_info *g;
const char *name;
+ struct mips_elf_link_hash_entry *mh;
dynobj = elf_hash_table (info)->dynobj;
gval = sym->st_value;
+ mh = (struct mips_elf_link_hash_entry *) h;
- if (h->plt_offset != (bfd_vma) -1)
+ if (h->plt.offset != (bfd_vma) -1)
{
asection *s;
bfd_byte *p;
@@ -6684,7 +8312,8 @@ mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
BFD_ASSERT (h->dynindx != -1);
- s = bfd_get_section_by_name (dynobj, ".stub");
+ s = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_STUB_SECTION_NAME (dynobj));
BFD_ASSERT (s != NULL);
/* Fill the stub. */
@@ -6702,41 +8331,64 @@ mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
p += 4;
bfd_put_32 (output_bfd, STUB_LI16 + h->dynindx, p);
- BFD_ASSERT (h->plt_offset <= s->_raw_size);
- memcpy (s->contents + h->plt_offset, stub, MIPS_FUNCTION_STUB_SIZE);
+ BFD_ASSERT (h->plt.offset <= s->_raw_size);
+ memcpy (s->contents + h->plt.offset, stub, MIPS_FUNCTION_STUB_SIZE);
- /* Mark the symbol as undefined. plt_offset != -1 occurs
+ /* Mark the symbol as undefined. plt.offset != -1 occurs
only for the referenced symbol. */
sym->st_shndx = SHN_UNDEF;
/* The run-time linker uses the st_value field of the symbol
to reset the global offset table entry for this external
to its stub address when unlinking a shared object. */
- gval = s->output_section->vma + s->output_offset + h->plt_offset;
+ gval = s->output_section->vma + s->output_offset + h->plt.offset;
sym->st_value = gval;
}
BFD_ASSERT (h->dynindx != -1);
- sgot = bfd_get_section_by_name (dynobj, ".got");
+ sgot = mips_elf_got_section (dynobj);
BFD_ASSERT (sgot != NULL);
BFD_ASSERT (elf_section_data (sgot) != NULL);
g = (struct mips_got_info *) elf_section_data (sgot)->tdata;
BFD_ASSERT (g != NULL);
- if ((unsigned long) h->dynindx >= g->global_gotsym)
+ /* Run through the global symbol table, creating GOT entries for all
+ the symbols that need them. */
+ if (g->global_gotsym != NULL
+ && h->dynindx >= g->global_gotsym->dynindx)
{
- bfd_size_type offset;
+ bfd_vma offset;
+ bfd_vma value;
- /* This symbol has an entry in the global offset table. Set its
- value to the corresponding got entry, if needed. */
- if (h->got_offset == (bfd_vma) -1)
- {
- offset = (h->dynindx - g->global_gotsym + g->local_gotno) * 4;
- BFD_ASSERT (g->local_gotno * 4 <= offset
- && offset < sgot->_raw_size);
- bfd_put_32 (output_bfd, gval, sgot->contents + offset);
- }
+ if (sym->st_value)
+ value = sym->st_value;
+ else
+ /* For an entity defined in a shared object, this will be
+ NULL. (For functions in shared objects for
+ which we have created stubs, ST_VALUE will be non-NULL.
+ That's because such the functions are now no longer defined
+ in a shared object.) */
+ value = h->root.u.def.value;
+
+ offset = mips_elf_global_got_index (dynobj, h);
+ MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
+ }
+
+ /* Create a .msym entry, if appropriate. */
+ smsym = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_MSYM_SECTION_NAME (dynobj));
+ if (smsym)
+ {
+ Elf32_Internal_Msym msym;
+
+ msym.ms_hash_value = bfd_elf_hash (h->root.root.string);
+ /* It is undocumented what the `1' indicates, but IRIX6 uses
+ this value. */
+ msym.ms_info = ELF32_MS_INFO (mh->min_dyn_reloc_index, 1);
+ bfd_mips_elf_swap_msym_out
+ (dynobj, &msym,
+ ((Elf32_External_Msym *) smsym->contents) + h->dynindx);
}
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
@@ -6782,6 +8434,10 @@ mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
+ /* Handle the IRIX6-specific symbols. */
+ if (IRIX_COMPAT (output_bfd) == ict_irix6)
+ mips_elf_irix6_finish_dynamic_symbol (output_bfd, name, sym);
+
if (SGI_COMPAT (output_bfd)
&& ! info->shared)
{
@@ -6798,8 +8454,10 @@ mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
else if (mips_elf_hash_table (info)->use_rld_obj_head
&& strcmp (name, "__rld_obj_head") == 0)
{
- asection *s = bfd_get_section_by_name (dynobj, ".rld_map");
- BFD_ASSERT (s != NULL);
+ /* IRIX6 does not use a .rld_map section. */
+ if (IRIX_COMPAT (output_bfd) == ict_irix5)
+ BFD_ASSERT (bfd_get_section_by_name (dynobj, ".rld_map")
+ != NULL);
mips_elf_hash_table (info)->rld_value = sym->st_value;
}
}
@@ -6814,8 +8472,8 @@ mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Finish up the dynamic sections. */
-static boolean
-mips_elf_finish_dynamic_sections (output_bfd, info)
+boolean
+_bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
{
@@ -6828,7 +8486,7 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
- sgot = bfd_get_section_by_name (dynobj, ".got");
+ sgot = mips_elf_got_section (dynobj);
if (sgot == NULL)
g = NULL;
else
@@ -6840,39 +8498,41 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
- Elf32_External_Dyn *dyncon, *dynconend;
+ bfd_byte *b;
BFD_ASSERT (sdyn != NULL);
BFD_ASSERT (g != NULL);
- dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
- for (; dyncon < dynconend; dyncon++)
+ for (b = sdyn->contents;
+ b < sdyn->contents + sdyn->_raw_size;
+ b += MIPS_ELF_DYN_SIZE (dynobj))
{
Elf_Internal_Dyn dyn;
const char *name;
size_t elemsize;
asection *s;
+ boolean swap_out_p;
- bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+ /* Read in the current dynamic entry. */
+ (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn);
+
+ /* Assume that we're going to modify it and write it out. */
+ swap_out_p = true;
switch (dyn.d_tag)
{
- default:
- break;
-
case DT_RELENT:
- s = bfd_get_section_by_name (dynobj, ".rel.dyn");
+ s = (bfd_get_section_by_name
+ (dynobj,
+ MIPS_ELF_REL_DYN_SECTION_NAME (dynobj)));
BFD_ASSERT (s != NULL);
- dyn.d_un.d_val = sizeof (Elf32_External_Rel);
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ dyn.d_un.d_val = MIPS_ELF_REL_SIZE (dynobj);
break;
case DT_STRSZ:
/* Rewrite DT_STRSZ. */
dyn.d_un.d_val =
_bfd_stringtab_size (elf_hash_table (info)->dynstr);
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_PLTGOT:
@@ -6887,17 +8547,14 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (output_bfd, name);
BFD_ASSERT (s != NULL);
dyn.d_un.d_ptr = s->vma;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_RLD_VERSION:
dyn.d_un.d_val = 1; /* XXX */
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_FLAGS:
dyn.d_un.d_val = RHF_NOTPOT; /* XXX */
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_CONFLICTNO:
@@ -6919,38 +8576,52 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
}
else
dyn.d_un.d_val = 0;
-
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_TIME_STAMP:
time ((time_t *) &dyn.d_un.d_val);
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_ICHECKSUM:
/* XXX FIXME: */
+ swap_out_p = false;
break;
case DT_MIPS_IVERSION:
/* XXX FIXME: */
+ swap_out_p = false;
break;
case DT_MIPS_BASE_ADDRESS:
s = output_bfd->sections;
BFD_ASSERT (s != NULL);
dyn.d_un.d_ptr = s->vma & ~(0xffff);
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_LOCAL_GOTNO:
dyn.d_un.d_val = g->local_gotno;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
+ case DT_MIPS_UNREFEXTNO:
+ /* The index into the dynamic symbol table which is the
+ entry of the first external symbol that is not
+ referenced within the same object. */
+ dyn.d_un.d_val = bfd_count_sections (output_bfd) + 1;
+ break;
+
+ case DT_MIPS_GOTSYM:
+ if (g->global_gotsym)
+ {
+ dyn.d_un.d_val = g->global_gotsym->dynindx;
+ break;
+ }
+ /* In case if we don't have global got symbols we default
+ to setting DT_MIPS_GOTSYM to the same value as
+ DT_MIPS_SYMTABNO, so we just fall through. */
+
case DT_MIPS_SYMTABNO:
name = ".dynsym";
- elemsize = sizeof (Elf32_External_Sym);
+ elemsize = MIPS_ELF_SYM_SIZE (output_bfd);
s = bfd_get_section_by_name (output_bfd, name);
BFD_ASSERT (s != NULL);
@@ -6958,31 +8629,36 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
dyn.d_un.d_val = s->_cooked_size / elemsize;
else
dyn.d_un.d_val = s->_raw_size / elemsize;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
-
- case DT_MIPS_UNREFEXTNO:
- /* XXX FIXME: */
- dyn.d_un.d_val = SIZEOF_MIPS_DYNSYM_SECNAMES;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
-
- case DT_MIPS_GOTSYM:
- dyn.d_un.d_val = g->global_gotsym;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_HIPAGENO:
dyn.d_un.d_val = g->local_gotno - MIPS_RESERVED_GOTNO;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case DT_MIPS_RLD_MAP:
dyn.d_un.d_ptr = mips_elf_hash_table (info)->rld_value;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
+ case DT_MIPS_OPTIONS:
+ s = (bfd_get_section_by_name
+ (output_bfd, MIPS_ELF_OPTIONS_SECTION_NAME (output_bfd)));
+ dyn.d_un.d_ptr = s->vma;
+ break;
+
+ case DT_MIPS_MSYM:
+ s = (bfd_get_section_by_name
+ (output_bfd, MIPS_ELF_MSYM_SECTION_NAME (output_bfd)));
+ dyn.d_un.d_ptr = s->vma;
+ break;
+
+ default:
+ swap_out_p = false;
+ break;
}
+
+ if (swap_out_p)
+ (*get_elf_backend_data (dynobj)->s->swap_dyn_out)
+ (dynobj, &dyn, b);
}
}
@@ -6991,100 +8667,41 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
This isn't the case of Irix rld. */
if (sgot != NULL && sgot->_raw_size > 0)
{
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
- bfd_put_32 (output_bfd, (bfd_vma) 0x80000000, sgot->contents + 4);
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0, sgot->contents);
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0x80000000,
+ sgot->contents + MIPS_ELF_GOT_SIZE (output_bfd));
}
if (sgot != NULL)
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize
+ = MIPS_ELF_GOT_SIZE (output_bfd);
{
- asection *sdynsym;
+ asection *smsym;
asection *s;
- unsigned int i;
- bfd_vma last;
- Elf_Internal_Sym sym;
- long dindx;
- const char *name;
- const char * const * namep = mips_elf_dynsym_sec_names;
Elf32_compact_rel cpt;
- /* Set up the section symbols for the output sections. SGI sets
- the STT_NOTYPE attribute for these symbols. Should we do so? */
+ /* ??? The section symbols for the output sections were set up in
+ _bfd_elf_final_link. SGI sets the STT_NOTYPE attribute for these
+ symbols. Should we do so? */
- sdynsym = bfd_get_section_by_name (dynobj, ".dynsym");
- if (sdynsym != NULL)
+ smsym = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_MSYM_SECTION_NAME (dynobj));
+ if (smsym != NULL)
{
- if (SGI_COMPAT (output_bfd))
- {
- sym.st_size = 0;
- sym.st_name = 0;
- sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE);
- sym.st_other = 0;
+ Elf32_Internal_Msym msym;
- i = 0;
- last = 0;
- dindx = 0;
- while ((name = *namep++) != NULL)
- {
- s = bfd_get_section_by_name (output_bfd, name);
- if (s != NULL)
- {
- sym.st_value = s->vma;
- dindx = elf_section_data (s)->dynindx;
- last = s->vma + s->_raw_size;
- }
- else
- {
- sym.st_value = last;
- dindx++;
- }
-
- sym.st_shndx = (i < MIPS_TEXT_DYNSYM_SECNO
- ? SHN_MIPS_TEXT
- : SHN_MIPS_DATA);
- ++i;
- sym.st_name =
- mips_elf_hash_table (info)->dynsym_sec_strindex[dindx];
-
- bfd_elf32_swap_symbol_out (output_bfd, &sym,
- (((Elf32_External_Sym *)
- sdynsym->contents)
- + dindx));
- }
+ msym.ms_hash_value = 0;
+ msym.ms_info = ELF32_MS_INFO (0, 1);
- /* Set the sh_info field of the output .dynsym section to
- the index of the first global symbol. */
- elf_section_data (sdynsym->output_section)->this_hdr.sh_info =
- SIZEOF_MIPS_DYNSYM_SECNAMES;
- }
- else
+ for (s = output_bfd->sections; s != NULL; s = s->next)
{
- sym.st_size = 0;
- sym.st_name = 0;
- sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
- sym.st_other = 0;
-
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- int indx;
-
- sym.st_value = s->vma;
-
- indx = elf_section_data (s)->this_idx;
- BFD_ASSERT (indx > 0);
- sym.st_shndx = indx;
-
- bfd_elf32_swap_symbol_out (output_bfd, &sym,
- (((Elf32_External_Sym *)
- sdynsym->contents)
- + elf_section_data (s)->dynindx));
- }
+ long dynindx = elf_section_data (s)->dynindx;
- /* Set the sh_info field of the output .dynsym section to
- the index of the first global symbol. */
- elf_section_data (sdynsym->output_section)->this_hdr.sh_info =
- bfd_count_sections (output_bfd) + 1;
+ bfd_mips_elf_swap_msym_out
+ (output_bfd, &msym,
+ (((Elf32_External_Msym *) smsym->contents)
+ + dynindx));
}
}
@@ -7106,7 +8723,8 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
s->contents));
/* Clean up a dummy stub function entry in .text. */
- s = bfd_get_section_by_name (dynobj, ".stub");
+ s = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_STUB_SECTION_NAME (dynobj));
if (s != NULL)
{
file_ptr dummy_offset;
@@ -7120,9 +8738,10 @@ mips_elf_finish_dynamic_sections (output_bfd, info)
}
/* Clean up a first relocation in .rel.dyn. */
- s = bfd_get_section_by_name (dynobj, ".rel.dyn");
+ s = bfd_get_section_by_name (dynobj,
+ MIPS_ELF_REL_DYN_SECTION_NAME (dynobj));
if (s != NULL && s->_raw_size > 0)
- memset (s->contents, 0, sizeof (Elf32_External_Rel));
+ memset (s->contents, 0, MIPS_ELF_REL_SIZE (dynobj));
}
return true;
@@ -7275,7 +8894,8 @@ elf32_mips_get_relocated_section_contents (abfd, link_info, link_order, data,
case bfd_reloc_undefined:
if (!((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- input_bfd, input_section, (*parent)->address)))
+ input_bfd, input_section, (*parent)->address,
+ true)))
goto error_return;
break;
case bfd_reloc_dangerous:
@@ -7369,51 +8989,59 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap =
#define elf_backend_collect true
#define elf_backend_type_change_ok true
-#define elf_info_to_howto 0
+#define elf_backend_can_gc_sections true
+#define elf_backend_sign_extend_vma true
+#define elf_info_to_howto mips_info_to_howto_rela
#define elf_info_to_howto_rel mips_info_to_howto_rel
#define elf_backend_sym_is_global mips_elf_sym_is_global
-#define elf_backend_object_p mips_elf32_object_p
-#define elf_backend_section_from_shdr mips_elf32_section_from_shdr
+#define elf_backend_object_p _bfd_mips_elf_object_p
+#define elf_backend_section_from_shdr _bfd_mips_elf_section_from_shdr
#define elf_backend_fake_sections _bfd_mips_elf_fake_sections
#define elf_backend_section_from_bfd_section \
_bfd_mips_elf_section_from_bfd_section
-#define elf_backend_section_processing mips_elf32_section_processing
+#define elf_backend_section_processing _bfd_mips_elf_section_processing
#define elf_backend_symbol_processing _bfd_mips_elf_symbol_processing
#define elf_backend_additional_program_headers \
- mips_elf_additional_program_headers
-#define elf_backend_modify_segment_map mips_elf_modify_segment_map
+ _bfd_mips_elf_additional_program_headers
+#define elf_backend_modify_segment_map _bfd_mips_elf_modify_segment_map
#define elf_backend_final_write_processing \
_bfd_mips_elf_final_write_processing
#define elf_backend_ecoff_debug_swap &mips_elf32_ecoff_debug_swap
+#define elf_backend_add_symbol_hook _bfd_mips_elf_add_symbol_hook
+#define elf_backend_create_dynamic_sections \
+ _bfd_mips_elf_create_dynamic_sections
+#define elf_backend_check_relocs _bfd_mips_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol \
+ _bfd_mips_elf_adjust_dynamic_symbol
+#define elf_backend_always_size_sections \
+ _bfd_mips_elf_always_size_sections
+#define elf_backend_size_dynamic_sections \
+ _bfd_mips_elf_size_dynamic_sections
+#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
+#define elf_backend_link_output_symbol_hook \
+ _bfd_mips_elf_link_output_symbol_hook
+#define elf_backend_finish_dynamic_symbol \
+ _bfd_mips_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections \
+ _bfd_mips_elf_finish_dynamic_sections
+#define elf_backend_gc_mark_hook _bfd_mips_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook _bfd_mips_elf_gc_sweep_hook
+
+#define elf_backend_got_header_size (4*MIPS_RESERVED_GOTNO)
+#define elf_backend_plt_header_size 0
#define bfd_elf32_bfd_is_local_label_name \
mips_elf_is_local_label_name
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf32_bfd_link_hash_table_create \
- mips_elf_link_hash_table_create
-#define bfd_elf32_bfd_final_link mips_elf_final_link
+ _bfd_mips_elf_link_hash_table_create
+#define bfd_elf32_bfd_final_link _bfd_mips_elf_final_link
#define bfd_elf32_bfd_copy_private_bfd_data \
_bfd_mips_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data \
_bfd_mips_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags _bfd_mips_elf_set_private_flags
-#define elf_backend_add_symbol_hook mips_elf_add_symbol_hook
-#define elf_backend_create_dynamic_sections \
- mips_elf_create_dynamic_sections
-#define elf_backend_check_relocs mips_elf_check_relocs
-#define elf_backend_adjust_dynamic_symbol \
- mips_elf_adjust_dynamic_symbol
-#define elf_backend_always_size_sections \
- mips_elf_always_size_sections
-#define elf_backend_size_dynamic_sections \
- mips_elf_size_dynamic_sections
-#define elf_backend_relocate_section mips_elf_relocate_section
-#define elf_backend_link_output_symbol_hook \
- mips_elf_link_output_symbol_hook
-#define elf_backend_finish_dynamic_symbol \
- mips_elf_finish_dynamic_symbol
-#define elf_backend_finish_dynamic_sections \
- mips_elf_finish_dynamic_sections
-
+#define bfd_elf32_bfd_print_private_bfd_data \
+ _bfd_mips_elf_print_private_bfd_data
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c
new file mode 100644
index 0000000..242cfb7
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-ppc.c
@@ -0,0 +1,3761 @@
+/* PowerPC-specific support for 32-bit ELF
+ Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This file is based on a preliminary PowerPC ELF ABI. The
+ information may not match the final PowerPC ELF ABI. It includes
+ suggestions from the in-progress Embedded PowerPC ABI, and that
+ information may also not match. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/ppc.h"
+
+#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
+ PARAMS ((bfd *abfd, arelent *cache_ptr, Elf32_Internal_Rela *dst));
+static void ppc_elf_howto_init PARAMS ((void));
+static bfd_reloc_status_type ppc_elf_addr16_ha_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static boolean ppc_elf_set_private_flags PARAMS ((bfd *, flagword));
+static boolean ppc_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *));
+static boolean ppc_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+
+static int ppc_elf_additional_program_headers PARAMS ((bfd *));
+static boolean ppc_elf_modify_segment_map PARAMS ((bfd *));
+
+static boolean ppc_elf_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+static boolean ppc_elf_section_from_shdr PARAMS ((bfd *,
+ Elf32_Internal_Shdr *,
+ char *));
+static boolean ppc_elf_fake_sections
+ PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
+
+static elf_linker_section_t *ppc_elf_create_linker_section
+ PARAMS ((bfd *abfd,
+ struct bfd_link_info *info,
+ enum elf_linker_section_enum));
+
+static boolean ppc_elf_check_relocs PARAMS ((bfd *,
+ struct bfd_link_info *,
+ asection *,
+ const Elf_Internal_Rela *));
+
+static asection * ppc_elf_gc_mark_hook PARAMS ((bfd *abfd,
+ struct bfd_link_info *info,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym));
+
+static boolean ppc_elf_gc_sweep_hook PARAMS ((bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs));
+
+static boolean ppc_elf_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *,
+ struct elf_link_hash_entry *));
+
+static boolean ppc_elf_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
+
+static boolean ppc_elf_relocate_section PARAMS ((bfd *,
+ struct bfd_link_info *info,
+ bfd *,
+ asection *,
+ bfd_byte *,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **));
+
+static boolean ppc_elf_add_symbol_hook PARAMS ((bfd *,
+ struct bfd_link_info *,
+ const Elf_Internal_Sym *,
+ const char **,
+ flagword *,
+ asection **,
+ bfd_vma *));
+
+static boolean ppc_elf_finish_dynamic_symbol PARAMS ((bfd *,
+ struct bfd_link_info *,
+ struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
+
+static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
+
+#define BRANCH_PREDICT_BIT 0x200000 /* branch prediction bit for branch taken relocs */
+#define RA_REGISTER_MASK 0x001f0000 /* mask to set RA in memory instructions */
+#define RA_REGISTER_SHIFT 16 /* value to shift register by to insert RA */
+
+/* The name of the dynamic interpreter. This is put in the .interp
+ section. */
+
+#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 12
+/* The initial size of the plt reserved for the dynamic linker. */
+#define PLT_INITIAL_ENTRY_SIZE 72
+/* The size of the gap between entries in the PLT. */
+#define PLT_SLOT_SIZE 8
+/* The number of single-slot PLT entries (the rest use two slots). */
+#define PLT_NUM_SINGLE_ENTRIES 8192
+
+
+static reloc_howto_type *ppc_elf_howto_table[ (int)R_PPC_max ];
+
+static reloc_howto_type ppc_elf_howto_raw[] =
+{
+ /* This reloc does nothing. */
+ HOWTO (R_PPC_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A standard 32 bit relocation. */
+ HOWTO (R_PPC_ADDR32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* An absolute 26 bit branch; the lower two bits must be zero.
+ FIXME: we don't check that, we just clear them. */
+ HOWTO (R_PPC_ADDR24, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR24", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A standard 16 bit relocation. */
+ HOWTO (R_PPC_ADDR16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 16 bit relocation without overflow. */
+ HOWTO (R_PPC_ADDR16_LO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high order 16 bits of an address. */
+ HOWTO (R_PPC_ADDR16_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ 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. */
+ HOWTO (R_PPC_ADDR16_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC_ADDR16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* An absolute 16 bit branch; the lower two bits must be zero.
+ FIXME: we don't check that, we just clear them. */
+ HOWTO (R_PPC_ADDR14, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR14", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 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. */
+ HOWTO (R_PPC_ADDR14_BRTAKEN, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR14_BRTAKEN",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* An absolute 16 bit branch, for which 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_ADDR14_BRNTAKEN, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_ADDR14_BRNTAKEN",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 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) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_REL24", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 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) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_REL14", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 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 */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_REL14_BRTAKEN", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 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 */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_REL14_BRNTAKEN",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16, but referring to the GOT table entry for the
+ symbol. */
+ HOWTO (R_PPC_GOT16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_GOT16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16_LO, but referring to the GOT table entry for
+ the symbol. */
+ HOWTO (R_PPC_GOT16_LO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_GOT16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16_HI, but referring to the GOT table entry for
+ the symbol. */
+ HOWTO (R_PPC_GOT16_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_GOT16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16_HA, but referring to the GOT table entry for
+ the symbol. */
+ HOWTO (R_PPC_GOT16_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ ppc_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC_GOT16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_REL24, but referring to the procedure linkage table
+ entry for the symbol. */
+ HOWTO (R_PPC_PLTREL24, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_PLTREL24", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* This is used only by the dynamic linker. The symbol should exist
+ both in the object being run and in some shared library. The
+ dynamic linker copies the data addressed by the symbol from the
+ shared library into the object, because the object being
+ run has to have the data at some particular address. */
+ HOWTO (R_PPC_COPY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_COPY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR32, but used when setting global offset table
+ entries. */
+ HOWTO (R_PPC_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_GLOB_DAT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Marks a procedure linkage table entry for a symbol. */
+ HOWTO (R_PPC_JMP_SLOT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_JMP_SLOT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Used only by the dynamic linker. When the object is run, this
+ longword is set to the load address of the object, plus the
+ addend. */
+ HOWTO (R_PPC_RELATIVE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_RELATIVE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_REL24, but uses the value of the symbol within the
+ object rather than the final value. Normally used for
+ _GLOBAL_OFFSET_TABLE_. */
+ HOWTO (R_PPC_LOCAL24PC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_LOCAL24PC", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR32, but may be unaligned. */
+ HOWTO (R_PPC_UADDR32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_UADDR32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16, but may be unaligned. */
+ HOWTO (R_PPC_UADDR16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_UADDR16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 32-bit PC relative */
+ HOWTO (R_PPC_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_REL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 32-bit relocation to the symbol's procedure linkage table.
+ FIXME: not supported. */
+ HOWTO (R_PPC_PLT32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_PLT32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 32-bit PC relative relocation to the symbol's procedure linkage table.
+ FIXME: not supported. */
+ HOWTO (R_PPC_PLTREL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_PLTREL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16_LO, but referring to the PLT table entry for
+ the symbol. */
+ HOWTO (R_PPC_PLT16_LO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_PLT16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16_HI, but referring to the PLT table entry for
+ the symbol. */
+ HOWTO (R_PPC_PLT16_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_PLT16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC_ADDR16_HA, but referring to the PLT table entry for
+ the symbol. */
+ HOWTO (R_PPC_PLT16_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ ppc_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC_PLT16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A sign-extended 16 bit value relative to _SDA_BASE_, for use with
+ small data items. */
+ HOWTO (R_PPC_SDAREL16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_SDAREL16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 32-bit section relative relocation. */
+ HOWTO (R_PPC_SECTOFF, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_SECTOFF", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 16-bit lower half section relative relocation. */
+ HOWTO (R_PPC_SECTOFF_LO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_SECTOFF_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16-bit upper half section relative relocation. */
+ HOWTO (R_PPC_SECTOFF_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_SECTOFF_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16-bit upper half adjusted section relative relocation. */
+ HOWTO (R_PPC_SECTOFF_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ ppc_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC_SECTOFF_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The remaining relocs are from the Embedded ELF ABI, and are not
+ in the SVR4 ELF ABI. */
+
+ /* 32 bit value resulting from the addend minus the symbol */
+ HOWTO (R_PPC_EMB_NADDR32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_NADDR32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit value resulting from the addend minus the symbol */
+ HOWTO (R_PPC_EMB_NADDR16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_NADDR16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit value resulting from the addend minus the symbol */
+ HOWTO (R_PPC_EMB_NADDR16_LO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_ADDR16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high order 16 bits of the addend minus the symbol */
+ HOWTO (R_PPC_EMB_NADDR16_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_NADDR16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high order 16 bits of the result of the addend minus the address,
+ plus 1 if the contents of the low 16 bits, treated as a signed number,
+ is negative. */
+ HOWTO (R_PPC_EMB_NADDR16_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC_EMB_NADDR16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit value resulting from allocating a 4 byte word to hold an
+ address in the .sdata section, and returning the offset from
+ _SDA_BASE_ for that relocation */
+ HOWTO (R_PPC_EMB_SDAI16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_SDAI16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit value resulting from allocating a 4 byte word to hold an
+ address in the .sdata2 section, and returning the offset from
+ _SDA2_BASE_ for that relocation */
+ HOWTO (R_PPC_EMB_SDA2I16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_SDA2I16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A sign-extended 16 bit value relative to _SDA2_BASE_, for use with
+ small data items. */
+ HOWTO (R_PPC_EMB_SDA2REL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_SDA2REL", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Relocate against either _SDA_BASE_ or _SDA2_BASE_, filling in the 16 bit
+ signed offset from the appropriate base, and filling in the register
+ field with the appropriate register (0, 2, or 13). */
+ HOWTO (R_PPC_EMB_SDA21, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_SDA21", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Relocation not handled: R_PPC_EMB_MRKREF */
+ /* Relocation not handled: R_PPC_EMB_RELSEC16 */
+ /* Relocation not handled: R_PPC_EMB_RELST_LO */
+ /* Relocation not handled: R_PPC_EMB_RELST_HI */
+ /* Relocation not handled: R_PPC_EMB_RELST_HA */
+ /* Relocation not handled: R_PPC_EMB_BIT_FLD */
+
+ /* PC relative relocation against either _SDA_BASE_ or _SDA2_BASE_, filling
+ in the 16 bit signed offset from the appropriate base, and filling in the
+ register field with the appropriate register (0, 2, or 13). */
+ HOWTO (R_PPC_EMB_RELSDA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_EMB_RELSDA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable hierarchy */
+ HOWTO (R_PPC_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_PPC_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable member usage */
+ HOWTO (R_PPC_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_PPC_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Phony reloc to handle AIX style TOC entries */
+ HOWTO (R_PPC_TOC16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_TOC16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+};
+
+
+/* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */
+
+static void
+ppc_elf_howto_init ()
+{
+ unsigned int i, type;
+
+ 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]));
+ ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i];
+ }
+}
+
+
+/* This function handles relaxing for the PPC with option --mpc860c0[=<n>].
+
+ The MPC860, revision C0 or earlier contains a bug in the die.
+ If all of the following conditions are true, the next instruction
+ to be executed *may* be treated as a no-op.
+ 1/ A forward branch is executed.
+ 2/ The branch is predicted as not taken.
+ 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,
+ there is no problem and no action is required.
+ 2/ Conditional backward branches - No problem, no action required.
+ 3/ Conditional forward branches - Ensure that the "inverse prediction
+ bit" is set (ensure it is predicted taken).
+ 4/ Conditional register branches - Ensure that the "y bit" is set
+ (ensure it is predicted taken).
+*/
+
+/* Sort sections by address. */
+
+static int
+ppc_elf_sort_rela (arg1, 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. */
+ 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;
+{
+#define PAGESIZE 0x1000
+
+ bfd_byte *contents = NULL;
+ bfd_byte *free_contents = NULL;
+ Elf_Internal_Rela *internal_relocs = NULL;
+ Elf_Internal_Rela *free_relocs = NULL;
+ Elf_Internal_Rela **rela_comb = NULL;
+ int comb_curr, comb_count;
+
+ /* We never have to do this more than once per input section. */
+ *again = false;
+
+ /* If needed, initialize this section's cooked size. */
+ if (isec->_cooked_size == 0)
+ isec->_cooked_size = isec->_raw_size;
+
+ /* We're only interested in text sections which overlap the
+ 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 cached copy if it exists. */
+ if (elf_section_data (isec)->this_hdr.contents != NULL)
+ contents = elf_section_data (isec)->this_hdr.contents;
+ else
+ {
+ /* Go get them off disk. */
+ contents = (bfd_byte *) bfd_malloc (isec->_raw_size);
+ if (contents == NULL)
+ goto error_return;
+ free_contents = contents;
+
+ if (! bfd_get_section_contents (abfd, isec, contents,
+ (file_ptr) 0, isec->_raw_size))
+ 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,
+ 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. */
+ rela_comb = (Elf_Internal_Rela**)
+ bfd_malloc (isec->reloc_count*sizeof(Elf_Internal_Rela*));
+ if (rela_comb == NULL)
+ goto error_return;
+ 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)
+ 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
+ can also be identified by their relocations. However, not all
+ 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. */
+ switch (r_type)
+ {
+ case R_PPC_ADDR14_BRNTAKEN: /* absolute, predicted not taken */
+ case R_PPC_REL14: /* relative cond. br. */
+ case R_PPC_REL14_BRNTAKEN: /* rel. cond. br., predicted not taken */
+ /* We should check the instruction. */
+ break;
+ default:
+ /* 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);
+ }
+
+ /* 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. */
+ for (;
+ dot < end_section;
+ dot += PAGESIZE, end_page += PAGESIZE)
+ {
+
+ /* Check each word in this EOP region. */
+ for (; dot < end_page; dot += 4)
+ {
+ bfd_vma isec_offset;
+ unsigned long insn;
+ 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. */
+ skip = false;
+ isec_offset = dot - isec->vma;
+ for (; comb_curr<comb_count; ++comb_curr)
+ {
+ bfd_vma r_offset;
+
+ r_offset = rela_comb[comb_curr]->r_offset;
+ if (r_offset >= isec_offset)
+ {
+ if (r_offset == isec_offset) skip = true;
+ break;
+ }
+ }
+ if (skip) continue;
+
+ /* Check the current word for a problematic conditional branch. */
+#define BO0(insn) ((insn) & 0x02000000)
+#define BO2(insn) ((insn) & 0x00800000)
+#define BO4(insn) ((insn) & 0x00200000)
+ insn = (unsigned long) bfd_get_32 (abfd, contents + isec_offset);
+ modified = false;
+ if ((insn & 0xFc000000) == 0x40000000)
+ {
+ /* Instruction is BCx */
+ if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
+ {
+ bfd_vma target;
+ /* This branch is predicted as "normal".
+ If this is a forward branch, it is problematic. */
+
+ target = insn & 0x0000Fffc; /*extract*/
+ target = (target ^ 0x8000) - 0x8000; /*sign extend*/
+ if ((insn & 0x00000002) == 0)
+ target += dot; /*convert to abs*/
+ if (target > dot)
+ {
+ insn |= 0x00200000; /* set the prediction bit */
+ modified = true;
+ }
+ }
+ }
+ else if ((insn & 0xFc00Fffe) == 0x4c000420)
+ {
+ /* Instruction is BCCTRx */
+ if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
+ {
+ /* This branch is predicted as not-taken.
+ If this is a forward branch, it is problematic.
+ Since we can't tell statically if it will branch forward,
+ always set the prediction bit. */
+ insn |= 0x00200000; /* set the prediction bit */
+ modified = true;
+ }
+ }
+ else if ((insn & 0xFc00Fffe) == 0x4c000020)
+ {
+ /* Instruction is BCLRx */
+ if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
+ {
+ /* This branch is predicted as not-taken.
+ If this is a forward branch, it is problematic.
+ Since we can't tell statically if it will branch forward,
+ always set the prediction bit. */
+ insn |= 0x00200000; /* set the prediction bit */
+ modified = true;
+ }
+ }
+#undef BO0
+#undef BO2
+#undef BO4
+ if (modified)
+ {
+ bfd_put_32 (abfd, insn, contents + isec_offset);
+ section_modified = true;
+ }
+ }
+ }
+ if (section_modified)
+ {
+ elf_section_data (isec)->this_hdr.contents = contents;
+ free_contents = NULL;
+ }
+ }
+
+ if (rela_comb != NULL)
+ {
+ free (rela_comb);
+ rela_comb = NULL;
+ }
+
+ if (free_relocs != NULL)
+ {
+ free (free_relocs);
+ free_relocs = NULL;
+ }
+
+ if (free_contents != NULL)
+ {
+ if (! link_info->keep_memory)
+ free (free_contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (isec)->this_hdr.contents = contents;
+ }
+ free_contents = NULL;
+ }
+
+ return true;
+
+error_return:
+ if (rela_comb != NULL)
+ free (rela_comb);
+ if (free_relocs != NULL)
+ free (free_relocs);
+ if (free_contents != NULL)
+ free (free_contents);
+ return false;
+}
+
+
+static reloc_howto_type *
+ppc_elf_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ enum elf_ppc_reloc_type ppc_reloc = R_PPC_NONE;
+
+ if (!ppc_elf_howto_table[R_PPC_ADDR32])
+ /* Initialize howto table if needed */
+ ppc_elf_howto_init ();
+
+ switch ((int)code)
+ {
+ default:
+ return (reloc_howto_type *)NULL;
+
+ case BFD_RELOC_NONE: ppc_reloc = R_PPC_NONE; break;
+ case BFD_RELOC_32: ppc_reloc = R_PPC_ADDR32; break;
+ case BFD_RELOC_PPC_BA26: ppc_reloc = R_PPC_ADDR24; break;
+ case BFD_RELOC_16: ppc_reloc = R_PPC_ADDR16; break;
+ case BFD_RELOC_LO16: ppc_reloc = R_PPC_ADDR16_LO; break;
+ case BFD_RELOC_HI16: ppc_reloc = R_PPC_ADDR16_HI; break;
+ case BFD_RELOC_HI16_S: ppc_reloc = R_PPC_ADDR16_HA; break;
+ case BFD_RELOC_PPC_BA16: ppc_reloc = R_PPC_ADDR14; break;
+ case BFD_RELOC_PPC_BA16_BRTAKEN: ppc_reloc = R_PPC_ADDR14_BRTAKEN; break;
+ case BFD_RELOC_PPC_BA16_BRNTAKEN: ppc_reloc = R_PPC_ADDR14_BRNTAKEN; break;
+ case BFD_RELOC_PPC_B26: ppc_reloc = R_PPC_REL24; break;
+ case BFD_RELOC_PPC_B16: ppc_reloc = R_PPC_REL14; break;
+ case BFD_RELOC_PPC_B16_BRTAKEN: ppc_reloc = R_PPC_REL14_BRTAKEN; break;
+ case BFD_RELOC_PPC_B16_BRNTAKEN: ppc_reloc = R_PPC_REL14_BRNTAKEN; break;
+ case BFD_RELOC_16_GOTOFF: ppc_reloc = R_PPC_GOT16; break;
+ case BFD_RELOC_LO16_GOTOFF: ppc_reloc = R_PPC_GOT16_LO; break;
+ case BFD_RELOC_HI16_GOTOFF: ppc_reloc = R_PPC_GOT16_HI; break;
+ case BFD_RELOC_HI16_S_GOTOFF: ppc_reloc = R_PPC_GOT16_HA; break;
+ case BFD_RELOC_24_PLT_PCREL: ppc_reloc = R_PPC_PLTREL24; break;
+ case BFD_RELOC_PPC_COPY: ppc_reloc = R_PPC_COPY; break;
+ case BFD_RELOC_PPC_GLOB_DAT: ppc_reloc = R_PPC_GLOB_DAT; break;
+ case BFD_RELOC_PPC_LOCAL24PC: ppc_reloc = R_PPC_LOCAL24PC; break;
+ case BFD_RELOC_32_PCREL: ppc_reloc = R_PPC_REL32; break;
+ case BFD_RELOC_32_PLTOFF: ppc_reloc = R_PPC_PLT32; break;
+ case BFD_RELOC_32_PLT_PCREL: ppc_reloc = R_PPC_PLTREL32; break;
+ case BFD_RELOC_LO16_PLTOFF: ppc_reloc = R_PPC_PLT16_LO; break;
+ case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC_PLT16_HI; break;
+ case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC_PLT16_HA; break;
+ case BFD_RELOC_GPREL16: ppc_reloc = R_PPC_SDAREL16; break;
+ case BFD_RELOC_32_BASEREL: ppc_reloc = R_PPC_SECTOFF; break;
+ case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC_SECTOFF_LO; break;
+ case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC_SECTOFF_HI; break;
+ case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC_SECTOFF_HA; break;
+ case BFD_RELOC_CTOR: ppc_reloc = R_PPC_ADDR32; break;
+ case BFD_RELOC_PPC_TOC16: ppc_reloc = R_PPC_TOC16; break;
+ case BFD_RELOC_PPC_EMB_NADDR32: ppc_reloc = R_PPC_EMB_NADDR32; break;
+ case BFD_RELOC_PPC_EMB_NADDR16: ppc_reloc = R_PPC_EMB_NADDR16; break;
+ case BFD_RELOC_PPC_EMB_NADDR16_LO: ppc_reloc = R_PPC_EMB_NADDR16_LO; break;
+ case BFD_RELOC_PPC_EMB_NADDR16_HI: ppc_reloc = R_PPC_EMB_NADDR16_HI; break;
+ case BFD_RELOC_PPC_EMB_NADDR16_HA: ppc_reloc = R_PPC_EMB_NADDR16_HA; break;
+ case BFD_RELOC_PPC_EMB_SDAI16: ppc_reloc = R_PPC_EMB_SDAI16; break;
+ case BFD_RELOC_PPC_EMB_SDA2I16: ppc_reloc = R_PPC_EMB_SDA2I16; break;
+ case BFD_RELOC_PPC_EMB_SDA2REL: ppc_reloc = R_PPC_EMB_SDA2REL; break;
+ case BFD_RELOC_PPC_EMB_SDA21: ppc_reloc = R_PPC_EMB_SDA21; break;
+ case BFD_RELOC_PPC_EMB_MRKREF: ppc_reloc = R_PPC_EMB_MRKREF; break;
+ case BFD_RELOC_PPC_EMB_RELSEC16: ppc_reloc = R_PPC_EMB_RELSEC16; break;
+ case BFD_RELOC_PPC_EMB_RELST_LO: ppc_reloc = R_PPC_EMB_RELST_LO; break;
+ case BFD_RELOC_PPC_EMB_RELST_HI: ppc_reloc = R_PPC_EMB_RELST_HI; break;
+ case BFD_RELOC_PPC_EMB_RELST_HA: ppc_reloc = R_PPC_EMB_RELST_HA; break;
+ case BFD_RELOC_PPC_EMB_BIT_FLD: ppc_reloc = R_PPC_EMB_BIT_FLD; break;
+ case BFD_RELOC_PPC_EMB_RELSDA: ppc_reloc = R_PPC_EMB_RELSDA; break;
+ case BFD_RELOC_VTABLE_INHERIT: ppc_reloc = R_PPC_GNU_VTINHERIT; break;
+ case BFD_RELOC_VTABLE_ENTRY: ppc_reloc = R_PPC_GNU_VTENTRY; break;
+ }
+
+ return ppc_elf_howto_table[ (int)ppc_reloc ];
+};
+
+/* Set the howto pointer for a PowerPC ELF reloc. */
+
+static void
+ppc_elf_info_to_howto (abfd, cache_ptr, dst)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr;
+ Elf32_Internal_Rela *dst;
+{
+ if (!ppc_elf_howto_table[ R_PPC_ADDR32 ]) /* Initialize howto table if needed */
+ ppc_elf_howto_init ();
+
+ BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
+ cache_ptr->howto = ppc_elf_howto_table[ELF32_R_TYPE (dst->r_info)];
+}
+
+/* Handle the R_PPC_ADDR16_HA reloc. */
+
+static bfd_reloc_status_type
+ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ bfd_vma relocation;
+
+ if (output_bfd != NULL)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+
+ reloc_entry->addend += (relocation & 0x8000) << 1;
+
+ return bfd_reloc_continue;
+}
+
+/* Function to set whether a module needs the -mrelocatable bit set. */
+
+static boolean
+ppc_elf_set_private_flags (abfd, flags)
+ bfd *abfd;
+ flagword flags;
+{
+ BFD_ASSERT (!elf_flags_init (abfd)
+ || elf_elfheader (abfd)->e_flags == flags);
+
+ elf_elfheader (abfd)->e_flags = flags;
+ elf_flags_init (abfd) = true;
+ return true;
+}
+
+/* Copy backend specific data from one object module to another */
+static boolean
+ppc_elf_copy_private_bfd_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return true;
+
+ BFD_ASSERT (!elf_flags_init (obfd)
+ || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
+
+ elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+ elf_flags_init (obfd) = true;
+ return true;
+}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking */
+static boolean
+ppc_elf_merge_private_bfd_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ flagword old_flags;
+ flagword new_flags;
+ 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_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return true;
+
+ new_flags = elf_elfheader (ibfd)->e_flags;
+ old_flags = elf_elfheader (obfd)->e_flags;
+ if (!elf_flags_init (obfd)) /* First call, no flags set */
+ {
+ 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 */
+ {
+ /* Warn about -mrelocatable mismatch. Allow -mrelocatable-lib to be linked
+ with either. */
+ error = false;
+ if ((new_flags & EF_PPC_RELOCATABLE) != 0
+ && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
+ {
+ error = true;
+ (*_bfd_error_handler)
+ (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
+ bfd_get_filename (ibfd));
+ }
+ else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
+ && (old_flags & EF_PPC_RELOCATABLE) != 0)
+ {
+ error = true;
+ (*_bfd_error_handler)
+ (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
+ bfd_get_filename (ibfd));
+ }
+
+ /* The output is -mrelocatable-lib iff both the input files are. */
+ if (! (new_flags & EF_PPC_RELOCATABLE_LIB))
+ elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
+
+ /* The output is -mrelocatable iff it can't be -mrelocatable-lib,
+ but each input file is either -mrelocatable or -mrelocatable-lib. */
+ if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
+ && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
+ && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
+ elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE;
+
+ /* Do not warn about eabi vs. V.4 mismatch, just or in the bit if any module uses it */
+ elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB);
+
+ new_flags &= ~ (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
+ old_flags &= ~ (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
+
+ /* Warn about any other mismatches */
+ if (new_flags != old_flags)
+ {
+ 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);
+ }
+
+ if (error)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ }
+
+ 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. */
+
+static boolean
+ppc_elf_section_from_shdr (abfd, hdr, name)
+ bfd *abfd;
+ Elf32_Internal_Shdr *hdr;
+ char *name;
+{
+ asection *newsect;
+ flagword flags;
+
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ return false;
+
+ newsect = hdr->bfd_section;
+ flags = bfd_get_section_flags (abfd, newsect);
+ if (hdr->sh_flags & SHF_EXCLUDE)
+ flags |= SEC_EXCLUDE;
+
+ if (hdr->sh_type == SHT_ORDERED)
+ flags |= SEC_SORT_ENTRIES;
+
+ bfd_set_section_flags (abfd, newsect, flags);
+ return true;
+}
+
+
+/* Set up any other section flags and such that may be necessary. */
+
+static boolean
+ppc_elf_fake_sections (abfd, shdr, asect)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ Elf32_Internal_Shdr *shdr;
+ asection *asect;
+{
+ if ((asect->flags & SEC_EXCLUDE) != 0)
+ shdr->sh_flags |= SHF_EXCLUDE;
+
+ if ((asect->flags & SEC_SORT_ENTRIES) != 0)
+ shdr->sh_type = SHT_ORDERED;
+
+ return true;
+}
+
+
+/* Create a special linker section */
+static elf_linker_section_t *
+ppc_elf_create_linker_section (abfd, info, which)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ enum elf_linker_section_enum which;
+{
+ bfd *dynobj = elf_hash_table (info)->dynobj;
+ elf_linker_section_t *lsect;
+
+ /* Record the first bfd section that needs the special section */
+ if (!dynobj)
+ dynobj = elf_hash_table (info)->dynobj = abfd;
+
+ /* If this is the first time, create the section */
+ lsect = elf_linker_section (dynobj, which);
+ if (!lsect)
+ {
+ elf_linker_section_t defaults;
+ static elf_linker_section_t zero_section;
+
+ defaults = zero_section;
+ defaults.which = which;
+ defaults.hole_written_p = false;
+ defaults.alignment = 2;
+
+ /* Both of these sections are (technically) created by the user
+ putting data in them, so they shouldn't be marked
+ SEC_LINKER_CREATED.
+
+ The linker creates them so it has somewhere to attach their
+ respective symbols. In fact, if they were empty it would
+ be OK to leave the symbol set to 0 (or any random number), because
+ the appropriate register should never be used. */
+ defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY);
+
+ switch (which)
+ {
+ default:
+ (*_bfd_error_handler) (_("%s: Unknown special linker type %d"),
+ bfd_get_filename (abfd),
+ (int)which);
+
+ bfd_set_error (bfd_error_bad_value);
+ return (elf_linker_section_t *)0;
+
+ case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
+ defaults.name = ".sdata";
+ defaults.rel_name = ".rela.sdata";
+ defaults.bss_name = ".sbss";
+ defaults.sym_name = "_SDA_BASE_";
+ defaults.sym_offset = 32768;
+ break;
+
+ case LINKER_SECTION_SDATA2: /* .sdata2/.sbss2 section */
+ defaults.name = ".sdata2";
+ defaults.rel_name = ".rela.sdata2";
+ defaults.bss_name = ".sbss2";
+ defaults.sym_name = "_SDA2_BASE_";
+ defaults.sym_offset = 32768;
+ defaults.flags |= SEC_READONLY;
+ break;
+ }
+
+ lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults);
+ }
+
+ 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. */
+
+static int
+ppc_elf_additional_program_headers (abfd)
+ bfd *abfd;
+{
+ asection *s;
+ int ret;
+
+ ret = 0;
+
+ s = bfd_get_section_by_name (abfd, ".interp");
+ if (s != NULL)
+ ++ret;
+
+ s = bfd_get_section_by_name (abfd, ".sbss2");
+ if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
+ ++ret;
+
+ s = bfd_get_section_by_name (abfd, ".PPC.EMB.sbss0");
+ if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
+ ++ret;
+
+ return ret;
+}
+
+/* Modify the segment map if needed */
+
+static boolean
+ppc_elf_modify_segment_map (abfd)
+ bfd *abfd ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+/* We have to create .dynsbss and .rela.sbss here so that they get mapped
+ to output sections (just like _bfd_elf_create_dynamic_sections has
+ to create .dynbss and .rela.bss). */
+
+static boolean
+ppc_elf_create_dynamic_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ register asection *s;
+ flagword flags;
+
+ if (!_bfd_elf_create_dynamic_sections(abfd, info))
+ return false;
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED);
+
+ s = bfd_make_section (abfd, ".dynsbss");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
+ return false;
+
+ if (! info->shared)
+ {
+ s = bfd_make_section (abfd, ".rela.sbss");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
+ || ! bfd_set_section_alignment (abfd, s, 2))
+ return false;
+ }
+ return true;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+ regular object. The current definition is in some section of the
+ dynamic object, but we're not including those sections. We have to
+ change the definition to something the rest of the link can
+ understand. */
+
+static boolean
+ppc_elf_adjust_dynamic_symbol (info, h)
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+{
+ bfd *dynobj = elf_hash_table (info)->dynobj;
+ asection *s;
+ unsigned int power_of_two;
+ bfd_vma plt_offset;
+
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_adjust_dynamic_symbol called for %s\n", h->root.root.string);
+#endif
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (dynobj != NULL
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+ || h->weakdef != NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0
+ && (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. */
+ if (h->type == STT_FUNC
+ || (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)
+ || (info->shared && h->plt.refcount <= 0))
+ {
+ /* A PLT entry is not required/allowed when:
+
+ 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.
+
+ 3. GC has rendered the entry unused.
+ Note, however, that in an executable all references to the
+ symbol go to the PLT, so we can't turn it off in that case.
+ ??? The correct thing to do here is to reference count
+ all uses of the symbol, not just those to the GOT or PLT. */
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ return true;
+ }
+
+ /* 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;
+ }
+ BFD_ASSERT (h->dynindx != -1);
+
+ s = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (s != NULL);
+
+ /* If this is the first .plt entry, make room for the special
+ first entry. */
+ if (s->_raw_size == 0)
+ s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
+
+ /* The PowerPC PLT is actually composed of two parts, the first part
+ is 2 words (for a load and a jump), and then there is a remaining
+ word available at the end. */
+ plt_offset = (PLT_INITIAL_ENTRY_SIZE
+ + (PLT_SLOT_SIZE
+ * ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE)
+ / PLT_ENTRY_SIZE)));
+
+ /* If this symbol is not defined in a regular file, and we are
+ not generating a shared library, then set the symbol to this
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = plt_offset;
+ }
+
+ h->plt.offset = plt_offset;
+
+ /* Make room for this entry. After the 8192nd entry, room
+ for two entries is allocated. */
+ if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
+ >= PLT_NUM_SINGLE_ENTRIES)
+ s->_raw_size += 2 * PLT_ENTRY_SIZE;
+ else
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* We also need to make an entry in the .rela.plt section. */
+ s = bfd_get_section_by_name (dynobj, ".rela.plt");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size += sizeof (Elf32_External_Rela);
+
+ return true;
+ }
+
+ /* If this is a weak symbol, and there is a real definition, the
+ processor independent code will have arranged for us to see the
+ real definition first, and we can just use the same value. */
+ if (h->weakdef != NULL)
+ {
+ BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
+ || h->weakdef->root.type == bfd_link_hash_defweak);
+ h->root.u.def.section = h->weakdef->root.u.def.section;
+ h->root.u.def.value = h->weakdef->root.u.def.value;
+ return true;
+ }
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. */
+ if (info->shared)
+ return true;
+
+ /* We must allocate the symbol in our .dynbss section, which will
+ become part of the .bss section of the executable. There will be
+ an entry for this symbol in the .dynsym section. The dynamic
+ object will contain position independent code, so all references
+ from the dynamic object to this symbol will go through the global
+ offset table. The dynamic linker will use the .dynsym entry to
+ 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.
+
+ Of course, if the symbol is sufficiently small, we must instead
+ allocate it in .sbss. FIXME: It would be better to do this if and
+ only if there were actually SDAREL relocs for that symbol. */
+
+ if (h->size <= elf_gp_size (dynobj))
+ s = bfd_get_section_by_name (dynobj, ".dynsbss");
+ else
+ s = bfd_get_section_by_name (dynobj, ".dynbss");
+ BFD_ASSERT (s != NULL);
+
+ /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
+ copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rela.bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ asection *srel;
+
+ if (h->size <= elf_gp_size (dynobj))
+ srel = bfd_get_section_by_name (dynobj, ".rela.sbss");
+ else
+ srel = bfd_get_section_by_name (dynobj, ".rela.bss");
+ BFD_ASSERT (srel != NULL);
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ }
+
+ /* We need to figure out the alignment required for this symbol. I
+ have no idea how ELF linkers handle this. */
+ power_of_two = bfd_log2 (h->size);
+ if (power_of_two > 4)
+ power_of_two = 4;
+
+ /* Apply the required alignment. */
+ s->_raw_size = BFD_ALIGN (s->_raw_size,
+ (bfd_size_type) (1 << power_of_two));
+ if (power_of_two > bfd_get_section_alignment (dynobj, s))
+ {
+ if (! bfd_set_section_alignment (dynobj, s, power_of_two))
+ return false;
+ }
+
+ /* Define the symbol as being at this point in the section. */
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+
+ /* Increment the section size to make room for the symbol. */
+ s->_raw_size += h->size;
+
+ return true;
+}
+
+
+/* Set the sizes of the dynamic sections. */
+
+static boolean
+ppc_elf_size_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *dynobj;
+ asection *s;
+ boolean plt;
+ boolean relocs;
+ boolean reltext;
+
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
+#endif
+
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (! info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+ else
+ {
+ /* We may have created entries in the .rela.got, .rela.sdata, and
+ .rela.sdata2 sections. However, if we are not creating the
+ dynamic sections, we will not actually use these entries. Reset
+ the size of .rela.got, et al, which will cause it to get
+ stripped from the output file below. */
+ static char *rela_sections[] = { ".rela.got", ".rela.sdata",
+ ".rela.sdata2", ".rela.sbss",
+ (char *)0 };
+ char **p;
+
+ for (p = rela_sections; *p != (char *)0; p++)
+ {
+ s = bfd_get_section_by_name (dynobj, *p);
+ if (s != NULL)
+ s->_raw_size = 0;
+ }
+ }
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ plt = false;
+ relocs = false;
+ reltext = false;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ const char *name;
+ boolean strip;
+
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ /* It's OK to base decisions on the section name, because none
+ of the dynobj section names depend upon the input files. */
+ name = bfd_get_section_name (dynobj, s);
+
+ strip = false;
+
+ if (strcmp (name, ".plt") == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ strip = true;
+ }
+ else
+ {
+ /* Remember whether there is a PLT. */
+ plt = true;
+ }
+ }
+ else if (strncmp (name, ".rela", 5) == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ strip = true;
+ }
+ else
+ {
+ asection *target;
+ const char *outname;
+
+ /* Remember whether there are any relocation sections. */
+ relocs = true;
+
+ /* If this relocation section applies to a read only
+ section, then we probably need a DT_TEXTREL entry. */
+ outname = bfd_get_section_name (output_bfd,
+ s->output_section);
+ target = bfd_get_section_by_name (output_bfd, outname + 5);
+ if (target != NULL
+ && (target->flags & SEC_READONLY) != 0
+ && (target->flags & SEC_ALLOC) != 0)
+ reltext = true;
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
+ else if (strcmp (name, ".got") != 0
+ && strcmp (name, ".sdata") != 0
+ && strcmp (name, ".sdata2") != 0)
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ if (strip)
+ {
+ _bfd_strip_section_from_output (info, s);
+ continue;
+ }
+
+ /* Allocate memory for the section contents. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ if (s->contents == NULL && s->_raw_size != 0)
+ return false;
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in ppc_elf_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+ if (! info->shared)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ return false;
+ }
+
+ if (plt)
+ {
+ 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_RELA)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0))
+ return false;
+ }
+
+ if (relocs)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_RELA, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_RELASZ, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_RELAENT,
+ sizeof (Elf32_External_Rela)))
+ return false;
+ }
+
+ if (reltext)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table or procedure linkage
+ table. */
+
+static boolean
+ppc_elf_check_relocs (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+ bfd *dynobj;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+ bfd_signed_vma *local_got_refcounts;
+ elf_linker_section_t *sdata;
+ elf_linker_section_t *sdata2;
+ asection *sreloc;
+ asection *sgot = NULL;
+ asection *srelgot = NULL;
+
+ if (info->relocateable)
+ return true;
+
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
+ bfd_get_section_name (abfd, sec),
+ bfd_get_filename (abfd));
+#endif
+
+ /* Create the linker generated sections all the time so that the
+ special symbols are created. */
+
+ if ((sdata = elf_linker_section (abfd, LINKER_SECTION_SDATA)) == NULL)
+ {
+ sdata = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
+ if (!sdata)
+ return false;
+ }
+
+
+ if ((sdata2 = elf_linker_section (abfd, LINKER_SECTION_SDATA2)) == NULL)
+ {
+ sdata2 = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA2);
+ if (!sdata2)
+ return false;
+ }
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ 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);
+ if (!elf_bad_symtab (abfd))
+ sym_hashes_end -= symtab_hdr->sh_info;
+
+ sreloc = NULL;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
+ 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];
+
+ /* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
+ This shows up in particular in an R_PPC_ADDR32 in the eabi
+ startup code. */
+ if (h && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ {
+ if (sgot == NULL)
+ {
+ if (dynobj == NULL)
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return false;
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+ }
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ /* GOT16 relocations */
+ case R_PPC_GOT16:
+ case R_PPC_GOT16_LO:
+ case R_PPC_GOT16_HI:
+ case R_PPC_GOT16_HA:
+ /* This symbol requires a global offset table entry. */
+
+ if (sgot == NULL)
+ {
+ if (dynobj == NULL)
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return false;
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+ if (srelgot == NULL
+ && (h != NULL || info->shared))
+ {
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+ return false;
+ }
+ }
+
+ if (h != NULL)
+ {
+ if (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;
+
+ /* Allocate space in the .got. */
+ sgot->_raw_size += 4;
+ /* Allocate relocation space. */
+ srelgot->_raw_size += sizeof (Elf32_External_Rela);
+
+ h->got.refcount = 1;
+ }
+ else
+ h->got.refcount++;
+ }
+ else
+ {
+ /* This is a global offset table entry for a local symbol. */
+ if (local_got_refcounts == NULL)
+ {
+ size_t size;
+
+ 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_refcounts (abfd) = local_got_refcounts;
+ memset (local_got_refcounts, -1, size);
+ }
+ if (local_got_refcounts[r_symndx] == -1)
+ {
+ sgot->_raw_size += 4;
+
+ /* If we are generating a shared object, we need to
+ output a R_PPC_RELATIVE reloc so that the
+ dynamic linker can adjust this GOT entry. */
+ if (info->shared)
+ srelgot->_raw_size += sizeof (Elf32_External_Rela);
+
+ local_got_refcounts[r_symndx] = 1;
+ }
+ else
+ local_got_refcounts[r_symndx]++;
+ }
+ break;
+
+ /* Indirect .sdata relocation */
+ case R_PPC_EMB_SDAI16:
+ if (info->shared)
+ {
+ ((*_bfd_error_handler)
+ (_("%s: relocation %s cannot be used when making a shared object"),
+ bfd_get_filename (abfd), "R_PPC_EMB_SDAI16"));
+ return false;
+ }
+
+ if (srelgot == NULL && (h != NULL || info->shared))
+ {
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+ return false;
+ }
+ }
+
+ if (!bfd_elf32_create_pointer_linker_section (abfd, info, sdata, h, rel))
+ return false;
+
+ break;
+
+ /* Indirect .sdata2 relocation */
+ case R_PPC_EMB_SDA2I16:
+ if (info->shared)
+ {
+ ((*_bfd_error_handler)
+ (_("%s: relocation %s cannot be used when making a shared object"),
+ bfd_get_filename (abfd), "R_PPC_EMB_SDA2I16"));
+ return false;
+ }
+
+ if (srelgot == NULL && (h != NULL || info->shared))
+ {
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+ return false;
+ }
+ }
+
+ if (!bfd_elf32_create_pointer_linker_section (abfd, info, sdata2, h, rel))
+ return false;
+
+ break;
+
+ case R_PPC_SDAREL16:
+ case R_PPC_EMB_SDA2REL:
+ case R_PPC_EMB_SDA21:
+ if (info->shared)
+ {
+ ((*_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));
+ return false;
+ }
+ break;
+
+ case R_PPC_PLT32:
+ case R_PPC_PLTREL24:
+ case R_PPC_PLT16_LO:
+ case R_PPC_PLT16_HI:
+ case R_PPC_PLT16_HA:
+#ifdef DEBUG
+ fprintf (stderr, "Reloc requires a PLT entry\n");
+#endif
+ /* This symbol requires a procedure linkage table entry. We
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code without
+ linking in any dynamic objects, in which case we don't
+ need to generate a procedure linkage table after all. */
+
+ if (h == NULL)
+ {
+ /* It does not make sense to have a procedure linkage
+ table entry for a local symbol. */
+ bfd_set_error (bfd_error_bad_value);
+ 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;
+ }
+ if (h->plt.refcount == -1)
+ {
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount = 1;
+ }
+ else
+ h->plt.refcount++;
+ break;
+
+ /* The following relocations don't need to propagate the
+ relocation if linking a shared object since they are
+ section relative. */
+ case R_PPC_SECTOFF:
+ case R_PPC_SECTOFF_LO:
+ case R_PPC_SECTOFF_HI:
+ case R_PPC_SECTOFF_HA:
+ break;
+
+ /* This refers only to functions defined in the shared library */
+ case R_PPC_LOCAL24PC:
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_PPC_GNU_VTINHERIT:
+ 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_PPC_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
+
+ /* 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. */
+ case R_PPC_REL24:
+ case R_PPC_REL14:
+ case R_PPC_REL14_BRTAKEN:
+ case R_PPC_REL14_BRNTAKEN:
+ case R_PPC_REL32:
+ if (h == NULL
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ break;
+ /* fall through */
+
+ default:
+ if (info->shared)
+ {
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_check_relocs need to create relocation for %s\n",
+ (h && h->root.root.string) ? h->root.root.string : "<unknown>");
+#endif
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (abfd, sec),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ sreloc = bfd_make_section (dynobj, name);
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (sreloc == NULL
+ || ! bfd_set_section_flags (dynobj, sreloc, flags)
+ || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+ return false;
+ }
+ }
+
+ sreloc->_raw_size += sizeof (Elf32_External_Rela);
+
+ /* FIXME: We should here do what the m68k and i386
+ backends do: if the reloc is pc-relative, record it
+ in case it turns out that the reloc is unnecessary
+ because the symbol is forced local by versioning or
+ we are linking with -Bdynamic. Fortunately this
+ case is not frequent. */
+ }
+
+ break;
+ }
+ }
+
+ return true;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+ppc_elf_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_PPC_GNU_VTINHERIT:
+ case R_PPC_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static boolean
+ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+ 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;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_PPC_GOT16:
+ case R_PPC_GOT16_LO:
+ case R_PPC_GOT16_HI:
+ case R_PPC_GOT16_HA:
+ 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--;
+ }
+ else
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx]--;
+ }
+ break;
+
+ case R_PPC_PLT32:
+ case R_PPC_PLTREL24:
+ case R_PPC_PLT16_LO:
+ case R_PPC_PLT16_HI:
+ case R_PPC_PLT16_HA:
+ 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--;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
+}
+
+/* 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;
+ struct bfd_link_info *info;
+ const Elf_Internal_Sym *sym;
+ const char **namep ATTRIBUTE_UNUSED;
+ flagword *flagsp ATTRIBUTE_UNUSED;
+ asection **secp;
+ bfd_vma *valp;
+{
+ if (sym->st_shndx == SHN_COMMON
+ && !info->relocateable
+ && sym->st_size <= (bfd_vma) bfd_get_gp_size (abfd))
+ {
+ /* Common symbols less than or equal to -G nn bytes are automatically
+ put into .sdata. */
+ elf_linker_section_t *sdata
+ = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
+
+ if (!sdata->bss_section)
+ {
+ /* We don't go through bfd_make_section, because we don't
+ want to attach this common section to DYNOBJ. The linker
+ will move the symbols to the appropriate output section
+ when it defines common symbols. */
+ sdata->bss_section = ((asection *)
+ bfd_zalloc (abfd, sizeof (asection)));
+ if (sdata->bss_section == NULL)
+ return false;
+ sdata->bss_section->name = sdata->bss_name;
+ sdata->bss_section->flags = SEC_IS_COMMON;
+ sdata->bss_section->output_section = sdata->bss_section;
+ sdata->bss_section->symbol =
+ (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
+ sdata->bss_section->symbol_ptr_ptr =
+ (asymbol **) bfd_zalloc (abfd, sizeof (asymbol *));
+ if (sdata->bss_section->symbol == NULL
+ || sdata->bss_section->symbol_ptr_ptr == NULL)
+ return false;
+ sdata->bss_section->symbol->name = sdata->bss_name;
+ sdata->bss_section->symbol->flags = BSF_SECTION_SYM;
+ sdata->bss_section->symbol->section = sdata->bss_section;
+ *sdata->bss_section->symbol_ptr_ptr = sdata->bss_section->symbol;
+ }
+
+ *secp = sdata->bss_section;
+ *valp = sym->st_size;
+ }
+
+ return true;
+}
+
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static boolean
+ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ bfd *dynobj;
+
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_finish_dynamic_symbol called for %s",
+ h->root.root.string);
+#endif
+
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ asection *splt;
+ asection *srela;
+ Elf_Internal_Rela rela;
+ bfd_vma reloc_index;
+
+#ifdef DEBUG
+ fprintf (stderr, ", plt_offset = %d", h->plt.offset);
+#endif
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up. */
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ srela = bfd_get_section_by_name (dynobj, ".rela.plt");
+ BFD_ASSERT (splt != NULL && srela != NULL);
+
+ /* We don't need to fill in the .plt. The ppc dynamic linker
+ will fill it in. */
+
+ /* Fill in the entry in the .rela.plt section. */
+ rela.r_offset = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT);
+ rela.r_addend = 0;
+
+ reloc_index = (h->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_SLOT_SIZE;
+ if (reloc_index > PLT_NUM_SINGLE_ENTRIES)
+ reloc_index -= (reloc_index - PLT_NUM_SINGLE_ENTRIES) / 2;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela,
+ ((Elf32_External_Rela *) srela->contents
+ + reloc_index));
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ }
+ }
+
+ if (h->got.offset != (bfd_vma) -1)
+ {
+ asection *sgot;
+ asection *srela;
+ Elf_Internal_Rela rela;
+
+ /* This symbol has an entry in the global offset table. Set it
+ up. */
+
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ srela = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (sgot != NULL && srela != NULL);
+
+ rela.r_offset = (sgot->output_section->vma
+ + 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. 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))
+ {
+ rela.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
+ rela.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+ else
+ {
+ 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;
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &rela,
+ ((Elf32_External_Rela *) srela->contents
+ + srela->reloc_count));
+ ++srela->reloc_count;
+ }
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ {
+ asection *s;
+ Elf_Internal_Rela rela;
+
+ /* This symbols needs a copy reloc. Set it up. */
+
+#ifdef DEBUG
+ fprintf (stderr, ", copy");
+#endif
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ if (h->size <= elf_gp_size (dynobj))
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ ".rela.sbss");
+ else
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ ".rela.bss");
+ BFD_ASSERT (s != NULL);
+
+ rela.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_COPY);
+ rela.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela,
+ ((Elf32_External_Rela *) s->contents
+ + s->reloc_count));
+ ++s->reloc_count;
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, "\n");
+#endif
+
+ /* Mark some specially defined symbols as absolute. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
+ || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ sym->st_shndx = SHN_ABS;
+
+ return true;
+}
+
+
+/* Finish up the dynamic sections. */
+
+static boolean
+ppc_elf_finish_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ asection *sdyn;
+ bfd *dynobj = elf_hash_table (info)->dynobj;
+ asection *sgot = bfd_get_section_by_name (dynobj, ".got");
+
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n");
+#endif
+
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ asection *splt;
+ Elf32_External_Dyn *dyncon, *dynconend;
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (splt != NULL && sdyn != NULL);
+
+ dyncon = (Elf32_External_Dyn *) sdyn->contents;
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+ const char *name;
+ boolean size;
+
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ case DT_PLTGOT: name = ".plt"; size = false; break;
+ case DT_PLTRELSZ: name = ".rela.plt"; size = true; break;
+ case DT_JMPREL: name = ".rela.plt"; size = false; break;
+ default: name = NULL; size = false; break;
+ }
+
+ if (name != NULL)
+ {
+ asection *s;
+
+ s = bfd_get_section_by_name (output_bfd, name);
+ if (s == NULL)
+ dyn.d_un.d_val = 0;
+ else
+ {
+ if (! size)
+ dyn.d_un.d_ptr = s->vma;
+ else
+ {
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val = s->_cooked_size;
+ else
+ dyn.d_un.d_val = s->_raw_size;
+ }
+ }
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+ }
+
+ /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can
+ easily find the address of the _GLOBAL_OFFSET_TABLE_. */
+ if (sgot)
+ {
+ unsigned char *contents = sgot->contents;
+ bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, contents);
+
+ if (sdyn == NULL)
+ bfd_put_32 (output_bfd, (bfd_vma) 0, contents+4);
+ else
+ bfd_put_32 (output_bfd,
+ sdyn->output_section->vma + sdyn->output_offset,
+ contents+4);
+
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+ }
+
+ return true;
+}
+
+
+/* The RELOCATE_SECTION function is called by the ELF backend linker
+ to handle the relocations for a section.
+
+ The relocs are always passed as Rela structures; if the section
+ actually uses Rel structures, the r_addend field will always be
+ zero.
+
+ This function is responsible for adjust the section contents as
+ necessary, and (if using Rela relocs and generating a
+ relocateable output file) adjusting the reloc addend as
+ necessary.
+
+ This function does not have to worry about setting the reloc
+ address or the reloc symbol index.
+
+ LOCAL_SYMS is a pointer to the swapped in local symbols.
+
+ LOCAL_SECTIONS is an array giving the section in the input file
+ corresponding to the st_shndx field of each local symbol.
+
+ The global hash table entry for the global symbols can be found
+ via elf_sym_hashes (input_bfd).
+
+ When generating relocateable output, this function must handle
+ STB_LOCAL/STT_SECTION symbols specially. The output symbol is
+ going to be the section symbol corresponding to the output
+ section, which means that the addend must be adjusted
+ accordingly. */
+
+static boolean
+ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+{
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
+ bfd *dynobj = elf_hash_table (info)->dynobj;
+ elf_linker_section_t *sdata = (dynobj) ? elf_linker_section (dynobj, LINKER_SECTION_SDATA) : NULL;
+ elf_linker_section_t *sdata2 = (dynobj) ? elf_linker_section (dynobj, LINKER_SECTION_SDATA2) : NULL;
+ Elf_Internal_Rela *rel = relocs;
+ Elf_Internal_Rela *relend = relocs + input_section->reloc_count;
+ asection *sreloc = NULL;
+ asection *splt;
+ asection *sgot;
+ bfd_vma *local_got_offsets;
+ boolean ret = true;
+ long insn;
+
+#ifdef DEBUG
+ 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,
+ (info->relocateable) ? " (relocatable)" : "");
+#endif
+
+ 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);
+
+ splt = sgot = NULL;
+ if (dynobj != NULL)
+ {
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ }
+
+ for (; rel < relend; rel++)
+ {
+ enum elf_ppc_reloc_type r_type = (enum elf_ppc_reloc_type)ELF32_R_TYPE (rel->r_info);
+ 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;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ bfd_vma relocation;
+
+ /* Unknown relocation handling */
+ 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);
+
+ bfd_set_error (bfd_error_bad_value);
+ ret = false;
+ continue;
+ }
+
+ howto = ppc_elf_howto_table[(int)r_type];
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ if (info->relocateable)
+ {
+ /* This is a relocateable link. We don't have to change
+ anything, unless the reloc is against a section symbol,
+ in which case we have to adjust according to where the
+ section symbol winds up in the output section. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ 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;
+ }
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n",
+ howto->name,
+ (int)r_type,
+ r_symndx,
+ (long)offset,
+ (long)addend);
+#endif
+ continue;
+ }
+
+ /* This is a final link. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ sym_name = "<local symbol>";
+
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ }
+ 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;
+ sym_name = h->root.root.string;
+ 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
+ && h->plt.offset != (bfd_vma) -1)
+ || (r_type == R_PPC_LOCAL24PC
+ && sec->output_section == NULL)
+ || ((r_type == R_PPC_GOT16
+ || r_type == R_PPC_GOT16_LO
+ || 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
+ && ((! info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && ((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)
+ && (r_type == R_PPC_ADDR32
+ || r_type == R_PPC_ADDR24
+ || r_type == R_PPC_ADDR16
+ || r_type == R_PPC_ADDR16_LO
+ || r_type == R_PPC_ADDR16_HI
+ || r_type == R_PPC_ADDR16_HA
+ || 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
+ || r_type == R_PPC_UADDR32
+ || r_type == R_PPC_UADDR16
+ || r_type == R_PPC_SDAREL16
+ || r_type == R_PPC_EMB_NADDR32
+ || r_type == R_PPC_EMB_NADDR16
+ || r_type == R_PPC_EMB_NADDR16_LO
+ || r_type == R_PPC_EMB_NADDR16_HI
+ || r_type == R_PPC_EMB_NADDR16_HA
+ || r_type == R_PPC_EMB_SDAI16
+ || r_type == R_PPC_EMB_SDA2I16
+ || r_type == R_PPC_EMB_SDA2REL
+ || r_type == R_PPC_EMB_SDA21
+ || r_type == R_PPC_EMB_MRKREF
+ || r_type == R_PPC_EMB_BIT_FLD
+ || r_type == R_PPC_EMB_RELSDA
+ || ((r_type == R_PPC_REL24
+ || r_type == R_PPC_REL32
+ || r_type == R_PPC_REL14
+ || r_type == R_PPC_REL14_BRTAKEN
+ || r_type == R_PPC_REL14_BRNTAKEN
+ || r_type == R_PPC_RELATIVE)
+ && strcmp (h->root.root.string,
+ "_GLOBAL_OFFSET_TABLE_") != 0))))
+ {
+ /* In these cases, we don't need the relocation
+ value. We check specially because in some
+ obscure cases sec->output_section will be NULL. */
+ 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
+ + sec->output_offset);
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ relocation = 0;
+ else if (info->shared && !info->symbolic && !info->no_undefined)
+ relocation = 0;
+ else
+ {
+ if (! (*info->callbacks->undefined_symbol)(info,
+ h->root.root.string,
+ input_bfd,
+ input_section,
+ rel->r_offset,
+ (!info->shared
+ || info->no_undefined)))
+ return false;
+ relocation = 0;
+ }
+ }
+
+ 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);
+
+ bfd_set_error (bfd_error_bad_value);
+ ret = false;
+ continue;
+
+ /* Relocations that need no special processing. */
+ case (int)R_PPC_LOCAL24PC:
+ /* It makes no sense to point a local relocation
+ at a symbol not in this object. */
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && sec->output_section == NULL)
+ {
+ if (! (*info->callbacks->undefined_symbol) (info,
+ h->root.root.string,
+ input_bfd,
+ input_section,
+ rel->r_offset,
+ true))
+ return false;
+ continue;
+ }
+ break;
+
+ /* 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:
+ /* 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)
+ 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:
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ boolean skip;
+
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_relocate_section need to create relocation for %s\n",
+ (h && h->root.root.string) ? h->root.root.string : "<unknown>");
+#endif
+
+ /* When generating a shared object, these relocations
+ are copied into the output file to be resolved at run
+ time. */
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ skip = false;
+
+ if (elf_section_data (input_section)->stab_info == NULL)
+ outrel.r_offset = rel->r_offset;
+ else
+ {
+ bfd_vma off;
+
+ off = (_bfd_stab_section_offset
+ (output_bfd, &elf_hash_table (info)->stab_info,
+ input_section,
+ &elf_section_data (input_section)->stab_info,
+ rel->r_offset));
+ if (off == (bfd_vma) -1)
+ skip = true;
+ outrel.r_offset = off;
+ }
+
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ if (skip)
+ 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))
+ {
+ BFD_ASSERT (h->dynindx != -1);
+ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+ outrel.r_addend = rel->r_addend;
+ }
+ else
+ {
+ if (r_type == R_PPC_ADDR32)
+ {
+ outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ else
+ {
+ long indx;
+
+ if (h == NULL)
+ sec = local_sections[r_symndx];
+ else
+ {
+ BFD_ASSERT (h->root.type == bfd_link_hash_defined
+ || (h->root.type
+ == bfd_link_hash_defweak));
+ sec = h->root.u.def.section;
+ }
+ if (sec != NULL && bfd_is_abs_section (sec))
+ indx = 0;
+ else if (sec == NULL || sec->owner == NULL)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ else
+ {
+ asection *osec;
+
+ osec = sec->output_section;
+ indx = elf_section_data (osec)->dynindx;
+ BFD_ASSERT(indx > 0);
+#ifdef DEBUG
+ if (indx <= 0)
+ {
+ printf("indx=%d section=%s flags=%08x name=%s\n",
+ indx, osec->name, osec->flags,
+ h->root.root.string);
+ }
+#endif
+ }
+
+ outrel.r_info = ELF32_R_INFO (indx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+
+ /* This reloc will be computed at runtime, so there's no
+ need to do anything now, unless this is a RELATIVE
+ reloc in an unallocated section. */
+ if (skip
+ || (input_section->flags & SEC_ALLOC) != 0
+ || ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE)
+ continue;
+ }
+
+ /* Arithmetic adjust relocations that aren't going into a
+ shared object. */
+ if (r_type == R_PPC_ADDR16_HA
+ /* It's just possible that this symbol is a weak symbol
+ that's not actually defined anywhere. In that case,
+ 'sec' would be NULL, and we should leave the symbol
+ alone (it will be set to zero elsewhere in the link). */
+ && sec != NULL)
+ {
+ addend += ((relocation + addend) & 0x8000) << 1;
+ }
+ break;
+
+ /* branch taken prediction relocations */
+ 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;
+ else
+ insn |= BRANCH_PREDICT_BIT;
+ bfd_put_32 (output_bfd, insn, contents + offset);
+ break;
+
+ /* branch not taken predicition relocations */
+ 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;
+ else
+ insn &= ~BRANCH_PREDICT_BIT;
+ bfd_put_32 (output_bfd, insn, contents + offset);
+ 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:
+ /* Relocation is to the entry for this symbol in the global
+ offset table. */
+ BFD_ASSERT (sgot != NULL);
+
+ if (h != NULL)
+ {
+ bfd_vma off;
+
+ off = h->got.offset;
+ BFD_ASSERT (off != (bfd_vma) -1);
+
+ 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)))
+ {
+ /* This is actually a static link, or it is a
+ -Bsymbolic link and the symbol is defined
+ locally. We must initialize this entry in the
+ global offset table. Since the offset must
+ always be a multiple of 4, we use the least
+ significant bit to record whether we have
+ initialized it already.
+
+ When doing a dynamic link, we create a .rela.got
+ relocation entry to initialize the value. This
+ is done in the finish_dynamic_symbol routine. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd, relocation,
+ sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+
+ relocation = sgot->output_offset + off - 4;
+ }
+ else
+ {
+ bfd_vma off;
+
+ BFD_ASSERT (local_got_offsets != NULL
+ && local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+ off = local_got_offsets[r_symndx];
+
+ /* The offset must always be a multiple of 4. We use
+ the least significant bit to record whether we have
+ already processed this entry. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd, relocation, sgot->contents + off);
+
+ if (info->shared)
+ {
+ asection *srelgot;
+ Elf_Internal_Rela outrel;
+
+ /* We need to generate a R_PPC_RELATIVE reloc
+ for the dynamic linker. */
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + off);
+ outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
+ outrel.r_addend = relocation;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count));
+ ++srelgot->reloc_count;
+ }
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ relocation = sgot->output_offset + off - 4;
+ }
+ break;
+
+ /* Indirect .sdata relocation */
+ 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,
+ R_PPC_RELATIVE);
+ break;
+
+ /* Indirect .sdata2 relocation */
+ 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,
+ R_PPC_RELATIVE);
+ break;
+
+ /* Handle the TOC16 reloc. We want to use the offset within the .got
+ 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);
+ 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)
+
+ addend -= sec->output_section->vma + sec->output_offset + 0x8000;
+ break;
+
+ case (int)R_PPC_PLTREL24:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table. */
+ BFD_ASSERT (h != NULL);
+
+ 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
+ using -Bsymbolic. */
+ break;
+ }
+
+ relocation = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+ break;
+
+ /* relocate against _SDA_BASE_ */
+ case (int)R_PPC_SDAREL16:
+ {
+ const char *name;
+
+ BFD_ASSERT (sec != (asection *)0);
+ name = bfd_get_section_name (abfd, sec->output_section);
+ if (strcmp (name, ".sdata") != 0
+ && strcmp (name, ".sbss") != 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,
+ name);
+ }
+ addend -= (sdata->sym_hash->root.u.def.value
+ + sdata->sym_hash->root.u.def.section->output_section->vma
+ + sdata->sym_hash->root.u.def.section->output_offset);
+ }
+ break;
+
+
+ /* relocate against _SDA2_BASE_ */
+ case (int)R_PPC_EMB_SDA2REL:
+ {
+ const char *name;
+
+ 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,
+ name);
+
+ bfd_set_error (bfd_error_bad_value);
+ ret = false;
+ continue;
+ }
+ addend -= (sdata2->sym_hash->root.u.def.value
+ + sdata2->sym_hash->root.u.def.section->output_section->vma
+ + sdata2->sym_hash->root.u.def.section->output_offset);
+ }
+ break;
+
+
+ /* relocate against either _SDA_BASE_, _SDA2_BASE_, or 0 */
+ case (int)R_PPC_EMB_SDA21:
+ case (int)R_PPC_EMB_RELSDA:
+ {
+ const char *name;
+ int reg;
+
+ BFD_ASSERT (sec != (asection *)0);
+ name = bfd_get_section_name (abfd, sec->output_section);
+ if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
+ {
+ reg = 13;
+ addend -= (sdata->sym_hash->root.u.def.value
+ + sdata->sym_hash->root.u.def.section->output_section->vma
+ + sdata->sym_hash->root.u.def.section->output_offset);
+ }
+
+ else if (strcmp (name, ".sdata2") == 0 || strcmp (name, ".sbss2") == 0)
+ {
+ reg = 2;
+ addend -= (sdata2->sym_hash->root.u.def.value
+ + sdata2->sym_hash->root.u.def.section->output_section->vma
+ + sdata2->sym_hash->root.u.def.section->output_offset);
+ }
+
+ else if (strcmp (name, ".PPC.EMB.sdata0") == 0 || strcmp (name, ".PPC.EMB.sbss0") == 0)
+ {
+ reg = 0;
+ }
+
+ else
+ {
+ (*_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,
+ name);
+
+ bfd_set_error (bfd_error_bad_value);
+ ret = false;
+ continue;
+ }
+
+ if (r_type == R_PPC_EMB_SDA21)
+ { /* fill in register field */
+ insn = bfd_get_32 (output_bfd, contents + offset);
+ insn = (insn & ~RA_REGISTER_MASK) | (reg << RA_REGISTER_SHIFT);
+ bfd_put_32 (output_bfd, insn, contents + offset);
+ }
+ }
+ 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);
+ addend -= sec->output_section->vma;
+ break;
+
+ 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;
+ break;
+
+ 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:
+ 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:
+ (*_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,
+ sym_name);
+
+ bfd_set_error (bfd_error_invalid_operation);
+ ret = false;
+ continue;
+
+ 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,
+ sym_name,
+ r_symndx,
+ (long)offset,
+ (long)addend);
+#endif
+
+ r = _bfd_final_link_relocate (howto,
+ input_bfd,
+ input_section,
+ contents,
+ offset,
+ relocation,
+ addend);
+
+ if (r == bfd_reloc_ok)
+ ;
+ else if (r == bfd_reloc_overflow)
+ {
+ const char *name;
+
+ if (h != NULL)
+ {
+ if (h->root.type == bfd_link_hash_undefweak
+ && howto->pc_relative)
+ {
+ /* 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
+ program is hosed anyway, and a little warning isn't
+ going to help. */
+
+ continue;
+ }
+
+ name = h->root.root.string;
+ }
+ else
+ {
+ name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (name == NULL)
+ continue;
+ if (*name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+
+ if (! (*info->callbacks->reloc_overflow)(info,
+ name,
+ howto->name,
+ (bfd_vma) 0,
+ input_bfd,
+ input_section,
+ offset))
+ return false;
+ }
+ else
+ ret = false;
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, "\n");
+#endif
+
+ return ret;
+}
+
+
+#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
+#define TARGET_LITTLE_NAME "elf32-powerpcle"
+#define TARGET_BIG_SYM bfd_elf32_powerpc_vec
+#define TARGET_BIG_NAME "elf32-powerpc"
+#define ELF_ARCH bfd_arch_powerpc
+#define ELF_MACHINE_CODE EM_PPC
+#define ELF_MAXPAGESIZE 0x10000
+#define elf_info_to_howto ppc_elf_info_to_howto
+
+#ifdef EM_CYGNUS_POWERPC
+#define ELF_MACHINE_ALT1 EM_CYGNUS_POWERPC
+#endif
+
+#ifdef EM_PPC_OLD
+#define ELF_MACHINE_ALT2 EM_PPC_OLD
+#endif
+
+#define elf_backend_plt_not_loaded 1
+#define elf_backend_got_symbol_offset 4
+#define elf_backend_can_gc_sections 1
+#define elf_backend_got_header_size 12
+#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
+
+#define bfd_elf32_bfd_copy_private_bfd_data ppc_elf_copy_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data ppc_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_relax_section ppc_elf_relax_section
+#define bfd_elf32_bfd_reloc_type_lookup ppc_elf_reloc_type_lookup
+#define bfd_elf32_bfd_set_private_flags ppc_elf_set_private_flags
+#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link
+
+#define elf_backend_gc_mark_hook ppc_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook ppc_elf_gc_sweep_hook
+#define elf_backend_section_from_shdr ppc_elf_section_from_shdr
+#define elf_backend_relocate_section ppc_elf_relocate_section
+#define elf_backend_create_dynamic_sections ppc_elf_create_dynamic_sections
+#define elf_backend_check_relocs ppc_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol ppc_elf_adjust_dynamic_symbol
+#define elf_backend_add_symbol_hook ppc_elf_add_symbol_hook
+#define elf_backend_size_dynamic_sections ppc_elf_size_dynamic_sections
+#define elf_backend_finish_dynamic_symbol ppc_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections ppc_elf_finish_dynamic_sections
+#define elf_backend_fake_sections ppc_elf_fake_sections
+#define elf_backend_additional_program_headers ppc_elf_additional_program_headers
+#define elf_backend_modify_segment_map ppc_elf_modify_segment_map
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c
index 736438b..e61a82f 100644
--- a/contrib/binutils/bfd/elf32-sparc.c
+++ b/contrib/binutils/bfd/elf32-sparc.c
@@ -1,5 +1,6 @@
/* SPARC-specific support for 32-bit ELF
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,8 +34,6 @@ static boolean elf32_sparc_check_relocs
const Elf_Internal_Rela *));
static boolean elf32_sparc_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static boolean elf32_sparc_adjust_dynindx
- PARAMS ((struct elf_link_hash_entry *, PTR));
static boolean elf32_sparc_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static boolean elf32_sparc_relocate_section
@@ -109,11 +108,27 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_UNUSED_42, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UNUSED_42",false,0,0x00000000,true),
HOWTO(R_SPARC_7, 0,2, 7,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_7", false,0,0x0000007f,true),
HOWTO(R_SPARC_5, 0,2, 5,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_5", false,0,0x0000001f,true),
- HOWTO(R_SPARC_6, 0,2, 6,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", false,0,0x0000003f,true)
+ HOWTO(R_SPARC_6, 0,2, 6,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", false,0,0x0000003f,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
+ HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true),
};
+static reloc_howto_type elf32_sparc_vtinherit_howto =
+ HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", false,0, 0, false);
+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 {
- unsigned char bfd_reloc_val;
+ bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
@@ -158,21 +173,36 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19},
{BFD_RELOC_SPARC_7, R_SPARC_7},
{BFD_RELOC_SPARC_5, R_SPARC_5},
- {BFD_RELOC_SPARC_6, R_SPARC_6}
+ {BFD_RELOC_SPARC_6, R_SPARC_6},
+ {BFD_RELOC_SPARC_REV32, R_SPARC_REV32 },
+ {BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT},
+ {BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY},
};
static reloc_howto_type *
elf32_sparc_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
- for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct elf_reloc_map); i++)
+
+ switch (code)
{
- if (sparc_reloc_map[i].bfd_reloc_val == code)
- return &_bfd_sparc_elf_howto_table[(int) sparc_reloc_map[i].elf_reloc_val];
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &elf32_sparc_vtinherit_howto;
+
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &elf32_sparc_vtentry_howto;
+
+ default:
+ for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct elf_reloc_map); i++)
+ {
+ if (sparc_reloc_map[i].bfd_reloc_val == code)
+ return &_bfd_sparc_elf_howto_table[(int) sparc_reloc_map[i].elf_reloc_val];
+ }
}
- return 0;
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
}
/* We need to use ELF32_R_TYPE so we have our own copy of this function,
@@ -180,12 +210,24 @@ elf32_sparc_reloc_type_lookup (abfd, code)
static void
elf32_sparc_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr;
Elf_Internal_Rela *dst;
{
- BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_SPARC_max);
- cache_ptr->howto = &_bfd_sparc_elf_howto_table[ELF32_R_TYPE(dst->r_info)];
+ switch (ELF32_R_TYPE(dst->r_info))
+ {
+ case R_SPARC_GNU_VTINHERIT:
+ cache_ptr->howto = &elf32_sparc_vtinherit_howto;
+ break;
+
+ case R_SPARC_GNU_VTENTRY:
+ cache_ptr->howto = &elf32_sparc_vtentry_howto;
+ break;
+
+ default:
+ BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_SPARC_max_std);
+ cache_ptr->howto = &_bfd_sparc_elf_howto_table[ELF32_R_TYPE(dst->r_info)];
+ }
}
/* For unsupported relocs. */
@@ -198,13 +240,13 @@ sparc_elf_notsupported_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;
}
@@ -225,7 +267,7 @@ sparc_elf_wdisp16_reloc (abfd,
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
bfd_vma x;
@@ -380,12 +422,12 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- if (h->got_offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1)
{
/* We have already allocated space in the .got. */
break;
}
- h->got_offset = sgot->_raw_size;
+ h->got.offset = sgot->_raw_size;
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@@ -449,10 +491,11 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
if (h == NULL)
{
- /* It does not make sense to have a procedure linkage
- table entry for a local symbol. */
- bfd_set_error (bfd_error_bad_value);
- return false;
+ /* The Solaris native assembler will generate a WPLT30
+ reloc for a local symbol if you assemble a call from
+ one section to another when using -K pic. We treat
+ it as WDISP30. */
+ break;
}
/* Make sure this symbol is output as a dynamic symbol. */
@@ -468,6 +511,9 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_PC10:
case R_SPARC_PC22:
+ if (h != NULL)
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
if (h != NULL
&& strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
break;
@@ -479,6 +525,9 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_WDISP22:
case R_SPARC_WDISP19:
case R_SPARC_WDISP16:
+ if (h != NULL)
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
/* If we are linking with -Bsymbolic, we do not need to copy
a PC relative reloc against a global symbol which is
defined in an object we are including in the link (i.e.,
@@ -501,6 +550,9 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_13:
case R_SPARC_LO10:
case R_SPARC_UA32:
+ if (h != NULL)
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
if (info->shared)
{
/* When creating a shared object, we must copy these
@@ -543,6 +595,16 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
break;
+ case R_SPARC_GNU_VTINHERIT:
+ if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ return false;
+ break;
+
+ case R_SPARC_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
+
default:
break;
}
@@ -551,6 +613,114 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
return true;
}
+static asection *
+elf32_sparc_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_SPARC_GNU_VTINHERIT:
+ case R_SPARC_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+static boolean
+elf32_sparc_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+
+ 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;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_SPARC_GOT10:
+ case R_SPARC_GOT13:
+ case R_SPARC_GOT22:
+ 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--;
+ }
+ else
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx]--;
+ }
+ break;
+
+ case R_SPARC_PLT32:
+ case R_SPARC_HIPLT22:
+ case R_SPARC_LOPLT10:
+ case R_SPARC_PCPLT32:
+ case R_SPARC_PCPLT10:
+ 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--;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -638,7 +808,7 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
h->root.u.def.value = s->_raw_size;
}
- h->plt_offset = s->_raw_size;
+ h->plt.offset = s->_raw_size;
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
@@ -674,6 +844,11 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
if (info->shared)
return true;
+ /* If there are no references to this symbol that do not use the
+ GOT, we don't need to generate a copy reloc. */
+ if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ return true;
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -836,15 +1011,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
if (strip)
{
- asection **spp;
-
- for (spp = &s->output_section->owner->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --s->output_section->owner->section_count;
-
+ _bfd_strip_section_from_output (info, s);
continue;
}
@@ -889,51 +1056,6 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
}
}
- /* If we are generating a shared library, we generate a section
- symbol for each output section for which we might need to copy
- relocs. These are local symbols, which means that they must come
- first in the dynamic symbol table. That means we must increment
- the dynamic symbol index of every other dynamic symbol. */
- if (info->shared)
- {
- int c;
-
- c = 0;
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LINKER_CREATED) != 0
- || (s->flags & SEC_ALLOC) == 0)
- continue;
-
- elf_section_data (s)->dynindx = c + 1;
-
- /* These symbols will have no names, so we don't need to
- fiddle with dynstr_index. */
-
- ++c;
- }
-
- elf_link_hash_traverse (elf_hash_table (info),
- elf32_sparc_adjust_dynindx,
- (PTR) &c);
- elf_hash_table (info)->dynsymcount += c;
- }
-
- return true;
-}
-
-/* Increment the index of a dynamic symbol by a given amount. Called
- via elf_link_hash_traverse. */
-
-static boolean
-elf32_sparc_adjust_dynindx (h, cparg)
- struct elf_link_hash_entry *h;
- PTR cparg;
-{
- int *cp = (int *) cparg;
-
- if (h->dynindx != -1)
- h->dynindx += *cp;
return true;
}
@@ -990,7 +1112,12 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_reloc_status_type r;
r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type < 0 || r_type >= (int) R_SPARC_max)
+
+ if (r_type == R_SPARC_GNU_VTINHERIT
+ || r_type == R_SPARC_GNU_VTENTRY)
+ continue;
+
+ if (r_type < 0 || r_type >= (int) R_SPARC_max_std)
{
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1041,7 +1168,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
sec = h->root.u.def.section;
if ((r_type == R_SPARC_WPLT30
- && h->plt_offset != (bfd_vma) -1)
+ && h->plt.offset != (bfd_vma) -1)
|| ((r_type == R_SPARC_GOT10
|| r_type == R_SPARC_GOT13
|| r_type == R_SPARC_GOT22)
@@ -1086,13 +1213,14 @@ elf32_sparc_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)
+ else if (info->shared && !info->symbolic && !info->no_undefined)
relocation = 0;
else
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
- input_section, rel->r_offset)))
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined))))
return false;
relocation = 0;
}
@@ -1115,7 +1243,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_vma off;
- off = h->got_offset;
+ off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
if (! elf_hash_table (info)->dynamic_sections_created
@@ -1141,7 +1269,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_put_32 (output_bfd, relocation,
sgot->contents + off);
- h->got_offset |= 1;
+ h->got.offset |= 1;
}
}
@@ -1198,9 +1326,15 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_WPLT30:
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
- BFD_ASSERT (h != NULL);
- if (h->plt_offset == (bfd_vma) -1)
+ /* The Solaris native assembler will generate a WPLT30 reloc
+ for a local symbol if you assemble a call from one
+ section to another when using -K pic. We treat it as
+ WDISP30. */
+ if (h == NULL)
+ break;
+
+ if (h->plt.offset == (bfd_vma) -1)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -1216,7 +1350,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (splt->output_section->vma
+ splt->output_offset
- + h->plt_offset);
+ + h->plt.offset);
break;
case R_SPARC_PC10:
@@ -1349,7 +1483,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
BFD_FAIL ();
(*_bfd_error_handler)
- ("%s: probably compiled without -fPIC?",
+ (_("%s: probably compiled without -fPIC?"),
bfd_get_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1381,11 +1515,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
- if (r_type != R_SPARC_WDISP16)
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, rel->r_addend);
- else
+ if (r_type == R_SPARC_WDISP16)
{
bfd_vma x;
@@ -1405,6 +1535,22 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
else
r = bfd_reloc_ok;
}
+ else if (r_type == R_SPARC_REV32)
+ {
+ bfd_vma x;
+
+ relocation = relocation + rel->r_addend;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = x + relocation;
+ bfd_putl32 (/*input_bfd,*/ x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ }
+ else
+ r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend);
+
if (r != bfd_reloc_ok)
{
@@ -1456,7 +1602,7 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
dynobj = elf_hash_table (info)->dynobj;
- if (h->plt_offset != (bfd_vma) -1)
+ if (h->plt.offset != (bfd_vma) -1)
{
asection *splt;
asection *srela;
@@ -1473,24 +1619,24 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Fill in the entry in the procedure linkage table. */
bfd_put_32 (output_bfd,
- PLT_ENTRY_WORD0 + h->plt_offset,
- splt->contents + h->plt_offset);
+ PLT_ENTRY_WORD0 + h->plt.offset,
+ splt->contents + h->plt.offset);
bfd_put_32 (output_bfd,
(PLT_ENTRY_WORD1
- + (((- (h->plt_offset + 4)) >> 2) & 0x3fffff)),
- splt->contents + h->plt_offset + 4);
+ + (((- (h->plt.offset + 4)) >> 2) & 0x3fffff)),
+ splt->contents + h->plt.offset + 4);
bfd_put_32 (output_bfd, PLT_ENTRY_WORD2,
- splt->contents + h->plt_offset + 8);
+ splt->contents + h->plt.offset + 8);
/* Fill in the entry in the .rela.plt section. */
rela.r_offset = (splt->output_section->vma
+ splt->output_offset
- + h->plt_offset);
+ + h->plt.offset);
rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_JMP_SLOT);
rela.r_addend = 0;
bfd_elf32_swap_reloca_out (output_bfd, &rela,
((Elf32_External_Rela *) srela->contents
- + h->plt_offset / PLT_ENTRY_SIZE - 4));
+ + h->plt.offset / PLT_ENTRY_SIZE - 4));
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
@@ -1500,7 +1646,7 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got_offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1)
{
asection *sgot;
asection *srela;
@@ -1515,7 +1661,7 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
rela.r_offset = (sgot->output_section->vma
+ sgot->output_offset
- + (h->got_offset &~ 1));
+ + (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
@@ -1528,7 +1674,7 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
else
{
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got_offset);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
}
@@ -1665,50 +1811,6 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
- if (info->shared)
- {
- asection *sdynsym;
- asection *s;
- Elf_Internal_Sym sym;
- int c;
-
- /* Set up the section symbols for the output sections. */
-
- sdynsym = bfd_get_section_by_name (dynobj, ".dynsym");
- BFD_ASSERT (sdynsym != NULL);
-
- sym.st_size = 0;
- sym.st_name = 0;
- sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
- sym.st_other = 0;
-
- c = 0;
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- int indx;
-
- if (elf_section_data (s)->dynindx == 0)
- continue;
-
- sym.st_value = s->vma;
-
- indx = elf_section_data (s)->this_idx;
- BFD_ASSERT (indx > 0);
- sym.st_shndx = indx;
-
- bfd_elf32_swap_symbol_out (output_bfd, &sym,
- (PTR) (((Elf32_External_Sym *)
- sdynsym->contents)
- + elf_section_data (s)->dynindx));
-
- ++c;
- }
-
- /* Set the sh_info field of the output .dynsym section to the
- index of the first global symbol. */
- elf_section_data (sdynsym->output_section)->this_hdr.sh_info = c + 1;
- }
-
return true;
}
@@ -1728,6 +1830,8 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
bfd *obfd;
{
boolean error;
+ /* FIXME: This should not be static. */
+ static unsigned long previous_ibfd_e_flags = (unsigned long) -1;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -1749,7 +1853,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
{
error = true;
(*_bfd_error_handler)
- ("%s: compiled for a v8plus system and target is v8",
+ (_("%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. */
@@ -1758,7 +1862,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
{
error = true;
(*_bfd_error_handler)
- ("%s: compiled for a v8plusa system and target is v8plus",
+ (_("%s: compiled for a v8plusa system and target is v8plus"),
bfd_get_filename (ibfd));
}
#else
@@ -1766,13 +1870,27 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
{
error = true;
(*_bfd_error_handler)
- ("%s: compiled for a 64 bit system and target is 32 bit",
+ (_("%s: compiled for a 64 bit system and target is 32 bit"),
bfd_get_filename (ibfd));
}
- else if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
- bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
+ else if ((ibfd->flags & DYNAMIC) == 0)
+ {
+ 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)
+ && previous_ibfd_e_flags != (unsigned long) -1)
+ {
+ (*_bfd_error_handler)
+ (_("%s: linking little endian files with big endian files"),
+ bfd_get_filename (ibfd));
+ error = true;
+ }
+ previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA;
+
if (error)
{
bfd_set_error (bfd_error_bad_value);
@@ -1799,6 +1917,9 @@ elf32_sparc_object_p (abfd)
else
return false;
}
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_LEDATA)
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+ bfd_mach_sparc_sparclite_le);
else
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
}
@@ -1809,7 +1930,7 @@ elf32_sparc_object_p (abfd)
static void
elf32_sparc_final_write_processing (abfd, linker)
bfd *abfd;
- boolean linker;
+ boolean linker ATTRIBUTE_UNUSED;
{
switch (bfd_get_mach (abfd))
{
@@ -1825,8 +1946,13 @@ 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_sparclite_le :
+ elf_elfheader (abfd)->e_machine = EM_SPARC;
+ elf_elfheader (abfd)->e_flags |= EF_SPARC_LEDATA;
+ break;
default :
abort ();
+ break;
}
}
@@ -1856,8 +1982,14 @@ elf32_sparc_final_write_processing (abfd, linker)
#define elf_backend_object_p elf32_sparc_object_p
#define elf_backend_final_write_processing \
elf32_sparc_final_write_processing
+#define elf_backend_gc_mark_hook elf32_sparc_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_sparc_gc_sweep_hook
+
+#define elf_backend_can_gc_sections 1
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
+#define elf_backend_got_header_size 4
+#define elf_backend_plt_header_size (4*PLT_ENTRY_SIZE)
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-v850.c b/contrib/binutils/bfd/elf32-v850.c
index c66513a..4fe28fc 100644
--- a/contrib/binutils/bfd/elf32-v850.c
+++ b/contrib/binutils/bfd/elf32-v850.c
@@ -1,5 +1,5 @@
/* V850-specific support for 32-bit ELF
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -37,20 +37,52 @@ 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
PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+static void v850_elf_info_to_howto_rela
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
static bfd_reloc_status_type v850_elf_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static boolean v850_elf_is_local_label_name PARAMS ((bfd *, const char *));
-static boolean v850_elf_relocate_section PARAMS((bfd *,
- struct bfd_link_info *,
- bfd *,
- asection *,
- bfd_byte *,
- Elf_Internal_Rela *,
- Elf_Internal_Sym *,
- asection **));
-/* Try to minimize the amount of space occupied by relocation tables
- on the ROM (not that the ROM won't be swamped by other ELF overhead). */
-#define USE_REL
+static boolean v850_elf_is_local_label_name
+ PARAMS ((bfd *, const char *));
+static boolean v850_elf_relocate_section
+ PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static bfd_reloc_status_type v850_elf_perform_relocation
+ PARAMS ((bfd *, int, bfd_vma, bfd_byte *));
+static boolean v850_elf_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
+static void remember_hi16s_reloc
+ PARAMS ((bfd *, bfd_vma, bfd_byte *));
+static bfd_byte * find_remembered_hi16s_reloc
+ PARAMS ((bfd_vma, boolean *));
+static bfd_reloc_status_type v850_elf_final_link_relocate
+ PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *, bfd_vma,
+ bfd_vma, bfd_vma, struct bfd_link_info *, asection *, int));
+static boolean v850_elf_object_p
+ PARAMS ((bfd *));
+static boolean v850_elf_fake_sections
+ PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
+static void v850_elf_final_write_processing
+ PARAMS ((bfd *, boolean));
+static boolean v850_elf_set_private_flags
+ PARAMS ((bfd *, flagword));
+static boolean v850_elf_copy_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean v850_elf_merge_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean v850_elf_print_private_bfd_data
+ PARAMS ((bfd *, PTR));
+static boolean v850_elf_section_from_bfd_section
+ PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *, int *));
+static void v850_elf_symbol_processing
+ PARAMS ((bfd *, asymbol *));
+static boolean v850_elf_add_symbol_hook
+ PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+ const char **, flagword *, asection **, bfd_vma *));
+static boolean v850_elf_link_output_symbol_hook
+ PARAMS ((bfd *, struct bfd_link_info *, const char *,
+ Elf_Internal_Sym *, asection *));
+static boolean v850_elf_section_from_shdr
+ PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
/* Note: It is REQUIRED that the 'type' value of each entry in this array
match the index of the entry in the array. */
@@ -111,7 +143,7 @@ static reloc_howto_type v850_elf_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
v850_elf_reloc, /* special_function */
"R_V850_HI16_S", /* name */
- true, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
@@ -126,7 +158,7 @@ static reloc_howto_type v850_elf_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
v850_elf_reloc, /* special_function */
"R_V850_HI16", /* name */
- true, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
@@ -141,7 +173,7 @@ static reloc_howto_type v850_elf_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
v850_elf_reloc, /* special_function */
"R_V850_LO16", /* name */
- true, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
@@ -156,7 +188,7 @@ static reloc_howto_type v850_elf_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
v850_elf_reloc, /* special_function */
"R_V850_32", /* name */
- true, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
@@ -171,7 +203,7 @@ static reloc_howto_type v850_elf_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_V850_16", /* name */
- true, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
@@ -186,7 +218,7 @@ static reloc_howto_type v850_elf_howto_table[] =
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_V850_8", /* name */
- true, /* partial_inplace */
+ false, /* partial_inplace */
0xff, /* src_mask */
0xff, /* dst_mask */
false), /* pcrel_offset */
@@ -311,13 +343,135 @@ static reloc_howto_type v850_elf_howto_table[] =
0xfff, /* dst_mask */
false), /* pcrel_offset */
+ /* 5 bit offset from the tiny data area pointer. */
+ HOWTO (R_V850_TDA_4_5_OFFSET, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 5, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_TDA_4_5_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0x0f, /* src_mask */
+ 0x0f, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 4 bit offset from the tiny data area pointer. */
+ HOWTO (R_V850_TDA_4_4_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_TDA_4_4_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0x0f, /* src_mask */
+ 0x0f, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit offset from the short data area pointer. */
+ HOWTO (R_V850_SDA_16_16_SPLIT_OFFSET, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_SDA_16_16_SPLIT_OFFSET",/* name */
+ false, /* partial_inplace */
+ 0xfffe0020, /* src_mask */
+ 0xfffe0020, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit offset from the zero data area pointer. */
+ HOWTO (R_V850_ZDA_16_16_SPLIT_OFFSET, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_ZDA_16_16_SPLIT_OFFSET",/* name */
+ false, /* partial_inplace */
+ 0xfffe0020, /* src_mask */
+ 0xfffe0020, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 6 bit offset from the call table base pointer. */
+ HOWTO (R_V850_CALLT_6_7_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 7, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_CALLT_6_7_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0x3f, /* src_mask */
+ 0x3f, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit offset from the call table base pointer. */
+ HOWTO (R_V850_CALLT_16_16_OFFSET, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_CALLT_16_16_OFFSET", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable hierarchy */
+ HOWTO (R_V850_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_V850_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable member usage */
+ HOWTO (R_V850_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_V850_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
};
/* Map BFD reloc types to V850 ELF reloc types. */
struct v850_elf_reloc_map
{
- unsigned char bfd_reloc_val;
+ /* BFD_RELOC_V850_CALLT_16_16_OFFSET is 258, which will not fix in an
+ unsigned char. */
+ bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
@@ -340,13 +494,22 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] =
{ BFD_RELOC_V850_TDA_7_8_OFFSET, R_V850_TDA_7_8_OFFSET },
{ BFD_RELOC_V850_TDA_7_7_OFFSET, R_V850_TDA_7_7_OFFSET },
{ BFD_RELOC_V850_TDA_16_16_OFFSET, R_V850_TDA_16_16_OFFSET },
+ { BFD_RELOC_V850_TDA_4_5_OFFSET, R_V850_TDA_4_5_OFFSET },
+ { BFD_RELOC_V850_TDA_4_4_OFFSET, R_V850_TDA_4_4_OFFSET },
+ { BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, R_V850_SDA_16_16_SPLIT_OFFSET },
+ { BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, R_V850_ZDA_16_16_SPLIT_OFFSET },
+ { BFD_RELOC_V850_CALLT_6_7_OFFSET, R_V850_CALLT_6_7_OFFSET },
+ { BFD_RELOC_V850_CALLT_16_16_OFFSET, R_V850_CALLT_16_16_OFFSET },
+ { BFD_RELOC_VTABLE_INHERIT, R_V850_GNU_VTINHERIT },
+ { BFD_RELOC_VTABLE_ENTRY, R_V850_GNU_VTENTRY },
+
};
/* Map a bfd relocation into the appropriate howto structure */
static reloc_howto_type *
v850_elf_reloc_type_lookup (abfd, code)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
@@ -370,7 +533,7 @@ v850_elf_reloc_type_lookup (abfd, code)
/* Set the howto pointer for an V850 ELF reloc. */
static void
v850_elf_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
arelent * cache_ptr;
Elf32_Internal_Rel * dst;
{
@@ -381,6 +544,20 @@ 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). */
+static void
+v850_elf_info_to_howto_rela (abfd, cache_ptr, dst)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ arelent * cache_ptr;
+ Elf32_Internal_Rela *dst;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (dst->r_info);
+ 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
@@ -443,20 +620,40 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
case R_V850_32:
case R_V850_16:
case R_V850_8:
+ case R_V850_CALLT_6_7_OFFSET:
+ case R_V850_CALLT_16_16_OFFSET:
break;
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_V850_GNU_VTINHERIT:
+ 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_V850_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
+
+ case R_V850_SDA_16_16_SPLIT_OFFSET:
case R_V850_SDA_16_16_OFFSET:
case R_V850_SDA_15_16_OFFSET:
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:
case R_V850_TDA_7_8_OFFSET:
case R_V850_TDA_7_7_OFFSET:
@@ -475,28 +672,28 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
&& (h->other & V850_OTHER_ERROR) == 0)
{
const char * msg;
- static char buff[100]; /* XXX */
-
+ static char buff[200]; /* XXX */
+
switch (h->other & V850_OTHER_MASK)
{
default:
- msg = "cannot occupy in multiple small data regions";
+ msg = _("Variable `%s' cannot occupy in multiple small data regions");
break;
case V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA:
- msg = "can only be in one of the small, zero, and tiny data regions";
+ msg = _("Variable `%s' can only be in one of the small, zero, and tiny data regions");
break;
case V850_OTHER_SDA | V850_OTHER_ZDA:
- msg = "cannot be in both small and zero data regions simultaneously";
+ msg = _("Variable `%s' cannot be in both small and zero data regions simultaneously");
break;
case V850_OTHER_SDA | V850_OTHER_TDA:
- msg = "cannot be in both small and tiny data regions simultaneously";
+ msg = _("Variable `%s' cannot be in both small and tiny data regions simultaneously");
break;
case V850_OTHER_ZDA | V850_OTHER_TDA:
- msg = "cannot be in both zero and tiny data regions simultaneously";
+ msg = _("Variable `%s' cannot be in both zero and tiny data regions simultaneously");
break;
}
- sprintf (buff, "Variable '%s' %s", h->root.root.string, msg );
+ sprintf (buff, msg, h->root.root.string);
info->callbacks->warning (info, buff, h->root.root.string,
abfd, h->root.u.def.section, 0);
@@ -527,56 +724,63 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
return ret;
}
-typedef struct
+/*
+ * In the old version, when an entry was checked out from the table,
+ * it was deleted. This produced an error if the entry was needed
+ * more than once, as the second attempted retry failed.
+ *
+ * In the current version, the entry is not deleted, instead we set
+ * the field 'found' to true. If a second lookup matches the same
+ * entry, then we know that the hi16s reloc has already been updated
+ * and does not need to be updated a second time.
+ *
+ * TODO - TOFIX: If it is possible that we need to restore 2 different
+ * addresses from the same table entry, where the first generates an
+ * overflow, whilst the second do not, then this code will fail.
+ */
+
+typedef struct hi16s_location
{
- long addend;
+ bfd_vma addend;
bfd_byte * address;
unsigned long counter;
+ boolean found;
+ struct hi16s_location * next;
}
hi16s_location;
-static hi16s_location previous_hi16s[ 10 ]; /* XXX is this enough ? */
-static unsigned long hi16s_counter;
+static hi16s_location * previous_hi16s;
+static hi16s_location * free_hi16s;
+static unsigned long hi16s_counter;
static void
-remember_hi16s_reloc (addend, address)
- long addend;
+remember_hi16s_reloc (abfd, addend, address)
+ bfd * abfd;
+ bfd_vma addend;
bfd_byte * address;
{
- hi16s_location * oldest = NULL;
- int i;
+ hi16s_location * entry = NULL;
- /* Find a free slot. */
- for (i = sizeof (previous_hi16s) / sizeof (previous_hi16s[0]); i--;)
- {
- hi16s_location * entry = previous_hi16s + i;
-
- if (entry->addend == 0 && entry->address == 0)
- {
- /* Use this entry. */
- oldest = entry;
- break;
- }
-
- /* Remember the least recently added entry. */
- if (oldest == NULL || oldest->counter > entry->counter)
- oldest = entry;
- }
-
- oldest->addend = addend;
- oldest->address = address;
- oldest->counter = hi16s_counter ++;
+ /* 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)
{
/* XXX - Assume that all counter entries differ only in their low 16 bits. */
- for (i = sizeof (previous_hi16s) / sizeof (previous_hi16s[0]); i--;)
- {
- hi16s_location * entry = previous_hi16s + i;
-
- entry->counter &= 0xffff;
- }
+ for (entry = previous_hi16s; entry != NULL; entry = entry->next)
+ entry->counter &= 0xffff;
hi16s_counter = 0x10000;
}
@@ -585,49 +789,56 @@ remember_hi16s_reloc (addend, address)
}
static bfd_byte *
-find_remembered_hi16s_reloc (addend)
- long addend;
+find_remembered_hi16s_reloc (addend, already_found)
+ bfd_vma addend;
+ boolean * already_found;
{
hi16s_location * match = NULL;
- int i;
+ hi16s_location * entry;
+ hi16s_location * previous = NULL;
+ hi16s_location * prev;
+ bfd_byte * addr;
/* Search the table. Record the most recent entry that matches. */
- for (i = sizeof (previous_hi16s) / sizeof (previous_hi16s[0]); i--;)
+ for (entry = previous_hi16s; entry; entry = entry->next)
{
- hi16s_location * entry = previous_hi16s + i;
-
- if (entry->addend == addend)
+ if (entry->addend == addend
+ && (match == NULL || match->counter < entry->counter))
{
- if (match == NULL || match->counter < entry->counter)
- match = entry;
+ previous = prev;
+ match = entry;
}
+
+ prev = entry;
}
- if (match != NULL)
- {
- bfd_byte * addr;
+ if (match == NULL)
+ return NULL;
- /* Empty the table entry. */
- match->addend = 0;
-
- addr = match->address;
- match->address = NULL;
-
- return addr;
- }
+ /* Extract the address. */
+ addr = match->address;
+
+ /* Remeber if this entry has already been used before. */
+ if (already_found)
+ * already_found = match->found;
+
+ /* Note that this entry has now been used. */
+ match->found = true;
- return NULL;
+ 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. */
static bfd_reloc_status_type
-v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
+v850_elf_perform_relocation (abfd, r_type, addend, address)
bfd * abfd;
int r_type;
- long addend;
+ bfd_vma addend;
bfd_byte * address;
- boolean replace;
{
unsigned long insn;
+ bfd_signed_vma saddend = (bfd_signed_vma) addend;
switch (r_type)
{
@@ -636,14 +847,11 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
return bfd_reloc_notsupported;
case R_V850_32:
- if (! replace)
- addend += bfd_get_32 (abfd, address);
-
bfd_put_32 (abfd, addend, address);
return bfd_reloc_ok;
case R_V850_22_PCREL:
- if (addend > 0x1fffff || addend < -0x200000)
+ if (saddend > 0x1fffff || saddend < -0x200000)
return bfd_reloc_overflow;
if ((addend % 2) != 0)
@@ -656,7 +864,7 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
return bfd_reloc_ok;
case R_V850_9_PCREL:
- if (addend > 0xff || addend < -0x100)
+ if (saddend > 0xff || saddend < -0x100)
return bfd_reloc_overflow;
if ((addend % 2) != 0)
@@ -675,13 +883,13 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
case R_V850_HI16_S:
/* Remember where this relocation took place. */
- remember_hi16s_reloc (addend, address);
+ remember_hi16s_reloc (abfd, addend, address);
addend += (bfd_get_16 (abfd, address) << 16);
addend = (addend >> 16) + ((addend & 0x8000) != 0);
/* This relocation cannot overflow. */
- if (addend > 0x7fff || addend < -0x8000)
+ if (addend > 0x7fff)
addend = 0;
insn = addend;
@@ -843,18 +1051,23 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
|| (OVERFLOWS (addend, insn)
&& ((! BIT15_SET (insn)) || (BIT15_SET (addend)))))
{
- bfd_byte * hi16s_address = find_remembered_hi16s_reloc (addend);
+ boolean already_updated;
+ bfd_byte * hi16s_address = find_remembered_hi16s_reloc
+ (addend, & already_updated);
/* Amend the matching HI16_S relocation. */
if (hi16s_address != NULL)
{
- insn = bfd_get_16 (abfd, hi16s_address);
- insn += 1;
- bfd_put_16 (abfd, insn, hi16s_address);
+ if (! already_updated)
+ {
+ insn = bfd_get_16 (abfd, hi16s_address);
+ insn += 1;
+ bfd_put_16 (abfd, insn, hi16s_address);
+ }
}
else
{
- fprintf (stderr, "FAILED to find previous HI16 reloc\n");
+ fprintf (stderr, _("FAILED to find previous HI16 reloc\n"));
return bfd_reloc_overflow;
}
}
@@ -865,26 +1078,38 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
}
case R_V850_8:
- if (! replace)
- addend += (char) bfd_get_8 (abfd, address);
+ addend += (char) bfd_get_8 (abfd, address);
- if (addend > 0x7f || addend < -0x80)
+ saddend = (bfd_signed_vma) addend;
+
+ if (saddend > 0x7f || saddend < -0x80)
return bfd_reloc_overflow;
bfd_put_8 (abfd, addend, address);
return bfd_reloc_ok;
+ 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:
- replace = false;
+
/* drop through */
case R_V850_SDA_16_16_OFFSET:
case R_V850_ZDA_16_16_OFFSET:
case R_V850_TDA_16_16_OFFSET:
- if (! replace)
- addend += bfd_get_16 (abfd, address);
+ addend += bfd_get_16 (abfd, address);
+
+ saddend = (bfd_signed_vma) addend;
- if (addend > 0x7fff || addend < -0x8000)
+ if (saddend > 0x7fff || saddend < -0x8000)
return bfd_reloc_overflow;
insn = addend;
@@ -893,26 +1118,26 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
case R_V850_SDA_15_16_OFFSET:
case R_V850_ZDA_15_16_OFFSET:
insn = bfd_get_16 (abfd, address);
-
- if (! replace)
- addend += (insn & 0xfffe);
+ addend += (insn & 0xfffe);
+
+ saddend = (bfd_signed_vma) addend;
- if (addend > 0x7ffe || addend < -0x8000)
+ if (saddend > 0x7ffe || saddend < -0x8000)
return bfd_reloc_overflow;
if (addend & 1)
- return bfd_reloc_dangerous;
+ return bfd_reloc_dangerous;
insn = (addend & ~1) | (insn & 1);
break;
case R_V850_TDA_6_8_OFFSET:
insn = bfd_get_16 (abfd, address);
-
- if (! replace)
- addend += ((insn & 0x7e) << 1);
+ addend += ((insn & 0x7e) << 1);
- if (addend > 0xfc || addend < 0)
+ saddend = (bfd_signed_vma) addend;
+
+ if (saddend > 0xfc || saddend < 0)
return bfd_reloc_overflow;
if (addend & 3)
@@ -924,11 +1149,11 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
case R_V850_TDA_7_8_OFFSET:
insn = bfd_get_16 (abfd, address);
-
- if (! replace)
- addend += ((insn & 0x7f) << 1);
+ addend += ((insn & 0x7f) << 1);
- if (addend > 0xfe || addend < 0)
+ saddend = (bfd_signed_vma) addend;
+
+ if (saddend > 0xfe || saddend < 0)
return bfd_reloc_overflow;
if (addend & 1)
@@ -940,17 +1165,83 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
case R_V850_TDA_7_7_OFFSET:
insn = bfd_get_16 (abfd, address);
-
- if (! replace)
- addend += insn & 0x7f;
+ addend += insn & 0x7f;
- if (addend > 0x7f || addend < 0)
+ 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;
+
+ case R_V850_GNU_VTINHERIT:
+ case R_V850_GNU_VTENTRY:
+ return bfd_reloc_ok;
+
}
bfd_put_16 (abfd, insn, address);
@@ -961,13 +1252,13 @@ v850_elf_store_addend_in_insn (abfd, r_type, addend, address, replace)
/* Insert the addend into the instruction. */
static bfd_reloc_status_type
v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
arelent * reloc;
asymbol * symbol;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
asection * isection;
bfd * obfd;
- char ** err;
+ char ** err ATTRIBUTE_UNUSED;
{
long relocation;
@@ -1027,18 +1318,15 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
relocation -= reloc->address;
}
- /* I've got no clue... */
- reloc->addend = 0;
-
- return v850_elf_store_addend_in_insn (abfd, reloc->howto->type, relocation,
- (bfd_byte *) data + reloc->address, true);
+ reloc->addend = relocation;
+ return bfd_reloc_ok;
}
/*ARGSUSED*/
static boolean
v850_elf_is_local_label_name (abfd, name)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
const char * name;
{
return ( (name[0] == '.' && (name[1] == 'L' || name[1] == '.'))
@@ -1053,7 +1341,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
addend, info, sym_sec, is_local)
reloc_howto_type * howto;
bfd * input_bfd;
- bfd * output_bfd;
+ bfd * output_bfd ATTRIBUTE_UNUSED;
asection * input_section;
bfd_byte * contents;
bfd_vma offset;
@@ -1061,7 +1349,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
bfd_vma addend;
struct bfd_link_info * info;
asection * sym_sec;
- int is_local;
+ int is_local ATTRIBUTE_UNUSED;
{
unsigned long r_type = howto->type;
bfd_byte * hit_data = contents + offset;
@@ -1080,6 +1368,10 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section->output_offset
+ offset);
+ /* 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;
@@ -1093,6 +1385,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
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;
@@ -1101,6 +1394,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
case R_V850_SDA_15_16_OFFSET:
case R_V850_SDA_16_16_OFFSET:
+ case R_V850_SDA_16_16_SPLIT_OFFSET:
{
unsigned long gp;
struct bfd_link_hash_entry * h;
@@ -1123,6 +1417,8 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
}
break;
+ case R_V850_TDA_4_4_OFFSET:
+ case R_V850_TDA_4_5_OFFSET:
case R_V850_TDA_16_16_OFFSET:
case R_V850_TDA_7_7_OFFSET:
case R_V850_TDA_7_8_OFFSET:
@@ -1145,8 +1441,50 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
}
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. */
+
+ ctbp = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+ value -= ctbp;
+ }
+ break;
+
+ case R_V850_CALLT_16_16_OFFSET:
+ {
+ unsigned long ctbp;
+ struct bfd_link_hash_entry * h;
+
+ 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
+ || h->type != bfd_link_hash_defined)
+ return (bfd_reloc_dangerous + 1);
+
+ ctbp = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+
+ value -= sym_sec->output_section->vma;
+ value -= (ctbp - sym_sec->output_section->vma);
+ }
+ break;
case R_V850_NONE:
+ case R_V850_GNU_VTINHERIT:
+ case R_V850_GNU_VTENTRY:
return bfd_reloc_ok;
default:
@@ -1154,7 +1492,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
}
/* Perform the relocation. */
- return v850_elf_store_addend_in_insn (input_bfd, r_type, value, hit_data, false);
+ return v850_elf_perform_relocation (input_bfd, r_type, value + addend, hit_data);
}
@@ -1179,6 +1517,19 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
+ if (sym_hashes == NULL)
+ {
+ info->callbacks->warning
+ (info, "no hash table available", NULL, input_bfd, input_section, 0);
+
+ 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++)
@@ -1194,7 +1545,12 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
- howto = v850_elf_howto_table + r_type;
+
+ if (r_type == R_V850_GNU_VTENTRY
+ || r_type == R_V850_GNU_VTINHERIT)
+ continue;
+
+ howto = v850_elf_howto_table + r_type;
if (info->relocateable)
{
@@ -1208,29 +1564,7 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
sec = local_sections[r_symndx];
-#ifdef USE_REL
- /* The Elf_Internal_Rel structure does not have space for the
- modified addend value, so we store it in the instruction
- instead. */
-
- if (sec->output_offset + sym->st_value != 0)
- {
- if (v850_elf_store_addend_in_insn (input_bfd, r_type,
- sec->output_offset +
- sym->st_value,
- contents + rel->r_offset,
- false)
- != bfd_reloc_ok)
- {
- info->callbacks->warning
- (info,
- "Unable to handle relocation during incremental link",
- NULL, input_bfd, input_section, rel->r_offset);
- }
- }
-#else
rel->r_addend += sec->output_offset + sym->st_value;
-#endif
}
}
@@ -1291,7 +1625,7 @@ fprintf (stderr, "undefined: sec: %s, name: %s\n",
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
- input_section, rel->r_offset)))
+ input_section, rel->r_offset, true)))
return false;
#if 0
fprintf (stderr, "unknown: name: %s\n", h->root.root.string);
@@ -1335,36 +1669,36 @@ fprintf (stderr, "unknown: name: %s\n", h->root.root.string);
case bfd_reloc_undefined:
if (! ((*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section,
- rel->r_offset)))
+ rel->r_offset, true)))
return false;
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 relocation";
+ msg = _("internal error: dangerous relocation");
goto common_error;
case bfd_reloc_other:
- msg = "could not locate special linker symbol __gp";
+ msg = _("could not locate special linker symbol __gp");
goto common_error;
case bfd_reloc_continue:
- msg = "could not locate special linker symbol __ep";
+ msg = _("could not locate special linker symbol __ep");
goto common_error;
case (bfd_reloc_dangerous + 1):
- msg = "could not locate special linker symbol __ctbp";
+ msg = _("could not locate special linker symbol __ctbp");
goto common_error;
default:
- msg = "internal error: unknown error";
+ msg = _("internal error: unknown error");
/* fall through */
common_error:
@@ -1380,6 +1714,60 @@ fprintf (stderr, "unknown: name: %s\n", h->root.root.string);
return true;
}
+static boolean
+v850_elf_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ /* No got and plt entries for v850-elf */
+ return true;
+}
+
+static asection *
+v850_elf_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_V850_GNU_VTINHERIT:
+ case R_V850_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+ return NULL;
+}
/* Set the right machine number. */
static boolean
v850_elf_object_p (abfd)
@@ -1389,15 +1777,17 @@ v850_elf_object_p (abfd)
{
default:
case E_V850_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, 0); break;
+ case E_V850E_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e); break;
+ case E_V850EA_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850ea); break;
}
return true;
}
/* Store the machine number in the flags field. */
-void
+static void
v850_elf_final_write_processing (abfd, linker)
bfd * abfd;
- boolean linker;
+ boolean linker ATTRIBUTE_UNUSED;
{
unsigned long val;
@@ -1405,6 +1795,8 @@ v850_elf_final_write_processing (abfd, linker)
{
default:
case 0: val = E_V850_ARCH; break;
+ case bfd_mach_v850e: val = E_V850E_ARCH; break;
+ case bfd_mach_v850ea: val = E_V850EA_ARCH; break;
}
elf_elfheader (abfd)->e_flags &=~ EF_V850_ARCH;
@@ -1412,7 +1804,7 @@ v850_elf_final_write_processing (abfd, linker)
}
/* Function to keep V850 specific file flags. */
-boolean
+static boolean
v850_elf_set_private_flags (abfd, flags)
bfd * abfd;
flagword flags;
@@ -1426,7 +1818,7 @@ v850_elf_set_private_flags (abfd, flags)
}
/* Copy backend specific data from one object module to another */
-boolean
+static boolean
v850_elf_copy_private_bfd_data (ibfd, obfd)
bfd * ibfd;
bfd * obfd;
@@ -1447,7 +1839,7 @@ v850_elf_copy_private_bfd_data (ibfd, obfd)
/* Merge backend specific data from an object file to the output
object file when linking. */
-boolean
+static boolean
v850_elf_merge_private_bfd_data (ibfd, obfd)
bfd * ibfd;
bfd * obfd;
@@ -1491,7 +1883,7 @@ v850_elf_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
&& (in_flags & EF_V850_ARCH) != E_V850_ARCH)
- _bfd_error_handler ("%s: Architecture mismatch with previous modules",
+ _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
bfd_get_filename (ibfd));
return true;
@@ -1505,14 +1897,19 @@ v850_elf_print_private_bfd_data (abfd, ptr)
{
FILE * file = (FILE *) ptr;
- BFD_ASSERT (abfd != NULL && ptr != NULL)
+ BFD_ASSERT (abfd != NULL && ptr != NULL);
- fprintf (file, "private flags = %lx", elf_elfheader (abfd)->e_flags);
+ _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:
- case E_V850_ARCH: fprintf (file, ": v850 architecture"); break;
+ case E_V850_ARCH: fprintf (file, _("v850 architecture")); break;
+ case E_V850E_ARCH: fprintf (file, _("v850e architecture")); break;
+ case E_V850EA_ARCH: fprintf (file, _("v850ea architecture")); break;
}
fputc ('\n', file);
@@ -1543,27 +1940,21 @@ static asymbol * v850_elf_zcom_symbol_ptr;
static boolean
v850_elf_section_from_bfd_section (abfd, hdr, sec, retval)
- bfd * abfd;
- Elf32_Internal_Shdr * hdr;
+ bfd * abfd ATTRIBUTE_UNUSED;
+ Elf32_Internal_Shdr * hdr ATTRIBUTE_UNUSED;
asection * sec;
int * retval;
{
if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0)
- {
- *retval = SHN_V850_SCOMMON;
- return true;
- }
- if (strcmp (bfd_get_section_name (abfd, sec), ".tcommon") == 0)
- {
- *retval = SHN_V850_TCOMMON;
- return true;
- }
- if (strcmp (bfd_get_section_name (abfd, sec), ".zcommon") == 0)
- {
- *retval = SHN_V850_ZCOMMON;
- return true;
- }
- return false;
+ *retval = SHN_V850_SCOMMON;
+ else if (strcmp (bfd_get_section_name (abfd, sec), ".tcommon") == 0)
+ *retval = SHN_V850_TCOMMON;
+ else if (strcmp (bfd_get_section_name (abfd, sec), ".zcommon") == 0)
+ *retval = SHN_V850_ZCOMMON;
+ else
+ return false;
+
+ return true;
}
/* Handle the special V850 section numbers that a symbol may use. */
@@ -1574,8 +1965,36 @@ v850_elf_symbol_processing (abfd, asym)
asymbol * asym;
{
elf_symbol_type * elfsym = (elf_symbol_type *) asym;
+ unsigned short index;
+
+ index = elfsym->internal_elf_sym.st_shndx;
- switch (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:
if (v850_elf_scom_section.name == NULL)
@@ -1634,20 +2053,47 @@ v850_elf_symbol_processing (abfd, asym)
}
/* Hook called by the linker routine which adds symbols from an object
- file. We must handle the special MIPS section numbers here. */
+ 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;
- struct bfd_link_info * info;
+ struct bfd_link_info * info ATTRIBUTE_UNUSED;
const Elf_Internal_Sym * sym;
- const char ** namep;
- flagword * flagsp;
+ const char ** namep ATTRIBUTE_UNUSED;
+ flagword * flagsp ATTRIBUTE_UNUSED;
asection ** secp;
bfd_vma * valp;
{
- switch (sym->st_shndx)
+ 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:
*secp = bfd_make_section_old_way (abfd, ".scommon");
@@ -1674,9 +2120,9 @@ v850_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
/*ARGSIGNORED*/
static boolean
v850_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec)
- bfd * abfd;
- struct bfd_link_info * info;
- const char * name;
+ bfd * abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info * info ATTRIBUTE_UNUSED;
+ const char * name ATTRIBUTE_UNUSED;
Elf_Internal_Sym * sym;
asection * input_sec;
{
@@ -1729,7 +2175,7 @@ v850_elf_section_from_shdr (abfd, hdr, name)
section name, which is a hack, but ought to work. */
static boolean
v850_elf_fake_sections (abfd, hdr, sec)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
Elf32_Internal_Shdr * hdr;
asection * sec;
{
@@ -1759,7 +2205,7 @@ v850_elf_fake_sections (abfd, hdr, sec)
#define ELF_MACHINE_CODE EM_CYGNUS_V850
#define ELF_MAXPAGESIZE 0x1000
-#define elf_info_to_howto 0
+#define elf_info_to_howto v850_elf_info_to_howto_rela
#define elf_info_to_howto_rel v850_elf_info_to_howto_rel
#define elf_backend_check_relocs v850_elf_check_relocs
@@ -1772,6 +2218,11 @@ v850_elf_fake_sections (abfd, hdr, sec)
#define elf_backend_link_output_symbol_hook v850_elf_link_output_symbol_hook
#define elf_backend_section_from_shdr v850_elf_section_from_shdr
#define elf_backend_fake_sections v850_elf_fake_sections
+#define elf_backend_gc_mark_hook v850_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook v850_elf_gc_sweep_hook
+
+#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
diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c
index 6d9c539..4da9e92 100644
--- a/contrib/binutils/bfd/elf64-alpha.c
+++ b/contrib/binutils/bfd/elf64-alpha.c
@@ -1,5 +1,5 @@
/* Alpha specific support for 64-bit ELF
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 97, 98, 1999 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -72,8 +72,6 @@ static boolean elf64_alpha_section_from_shdr
PARAMS((bfd *, Elf64_Internal_Shdr *, char *));
static boolean elf64_alpha_fake_sections
PARAMS((bfd *, Elf64_Internal_Shdr *, asection *));
-static int elf64_alpha_additional_program_headers
- PARAMS((bfd *));
static boolean elf64_alpha_create_got_section
PARAMS((bfd *, struct bfd_link_info *));
static boolean elf64_alpha_create_dynamic_sections
@@ -101,11 +99,15 @@ static void elf64_alpha_merge_gots
static boolean elf64_alpha_calc_got_offsets_for_symbol
PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
static void elf64_alpha_calc_got_offsets PARAMS ((struct bfd_link_info *));
-static void elf64_alpha_strip_section_from_output PARAMS ((asection *));
+static boolean elf64_alpha_size_got_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
static boolean elf64_alpha_always_size_sections
PARAMS ((bfd *, struct bfd_link_info *));
static boolean elf64_alpha_calc_dynrel_sizes
PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
+static boolean elf64_alpha_add_symbol_hook
+ PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+ const char **, flagword *, asection **, bfd_vma *));
static boolean elf64_alpha_check_relocs
PARAMS((bfd *, struct bfd_link_info *, asection *sec,
const Elf_Internal_Rela *));
@@ -113,8 +115,6 @@ static boolean elf64_alpha_adjust_dynamic_symbol
PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *));
static boolean elf64_alpha_size_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
-static boolean elf64_alpha_adjust_dynindx
- PARAMS((struct elf_link_hash_entry *, PTR));
static boolean elf64_alpha_relocate_section
PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -125,6 +125,10 @@ static boolean elf64_alpha_finish_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static boolean elf64_alpha_final_link
PARAMS((bfd *, struct bfd_link_info *));
+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
@@ -161,6 +165,8 @@ struct alpha_elf_link_hash_entry
/* An additional flag. */
#define ALPHA_ELF_GOT_ENTRY_RELOCS_DONE 0x10
+
+ int use_count;
} *got_entries;
/* used to count non-got, non-plt relocations for delayed sizing
@@ -219,10 +225,13 @@ 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)->dynindx != -1) \
- || (((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)))
+ ((((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)
/* Create an entry in a Alpha ELF linker hash table. */
@@ -639,51 +648,49 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false), /* pcrel_offset */
/* The high 16 bits of the displacement from GP to the target. */
- /* XXX: Not implemented. */
HOWTO (R_ALPHA_GPRELHIGH,
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
+ complain_overflow_signed, /* complain_on_overflow */
elf64_alpha_reloc_bad, /* special_function */
"GPRELHIGH", /* name */
false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
/* The low 16 bits of the displacement from GP to the target. */
- /* XXX: Not implemented. */
HOWTO (R_ALPHA_GPRELLOW,
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
elf64_alpha_reloc_bad, /* special_function */
"GPRELLOW", /* name */
false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
/* A 16-bit displacement from the GP to the target. */
/* XXX: Not implemented. */
HOWTO (R_ALPHA_IMMED_GP_16,
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- elf64_alpha_reloc_bad, /* special_function */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
"IMMED_GP_16", /* name */
false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
/* The high bits of a 32-bit displacement from the GP to the target; the
@@ -883,8 +890,8 @@ elf64_alpha_do_reloc_gpdisp (abfd, gpdisp, p_ldah, p_lda)
gpdisp += addend;
- if ((bfd_signed_vma) gpdisp < -(bfd_signed_vma)0x80000000
- || gpdisp >= 0x7fff8000)
+ if ((bfd_signed_vma) gpdisp < -(bfd_signed_vma) 0x80000000
+ || (bfd_signed_vma) gpdisp >= (bfd_signed_vma) 0x7fff8000)
ret = bfd_reloc_overflow;
/* compensate for the sign extension again. */
@@ -941,7 +948,7 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
/* Complain if the instructions are not correct. */
if (ret == bfd_reloc_dangerous)
- *err_msg = "GPDISP relocation did not find ldah and lda instructions";
+ *err_msg = _("GPDISP relocation did not find ldah and lda instructions");
return ret;
}
@@ -969,6 +976,17 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] =
{BFD_RELOC_16_PCREL, R_ALPHA_SREL16},
{BFD_RELOC_32_PCREL, R_ALPHA_SREL32},
{BFD_RELOC_64_PCREL, R_ALPHA_SREL64},
+
+/* The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to process
+ the explicit !<reloc>!sequence relocations, and are mapped into the normal
+ 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},
+ {BFD_RELOC_ALPHA_USER_LITUSE_JSR, R_ALPHA_LITUSE},
+ {BFD_RELOC_ALPHA_USER_GPDISP, R_ALPHA_GPDISP},
+ {BFD_RELOC_ALPHA_USER_GPRELHIGH, R_ALPHA_GPRELHIGH},
+ {BFD_RELOC_ALPHA_USER_GPRELLOW, R_ALPHA_GPRELLOW},
};
/* Given a BFD reloc type, return a HOWTO structure. */
@@ -1004,6 +1022,641 @@ 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.
+
+ Currently I'm only handling what I can do with existing compiler
+ and assembler support, which means no instructions are removed,
+ though some may be nopped. At this time GCC does not emit enough
+ information to do all of the relaxing that is possible. It will
+ take some not small amount of work for that to happen.
+
+ There are a couple of interesting papers that I once read on this
+ subject, that I cannot find references to at the moment, that
+ related to Alpha in particular. They are by David Wall, then of
+ DEC WRL. */
+
+#define OP_LDA 0x08
+#define OP_LDAH 0x09
+#define INSN_JSR 0x68004000
+#define INSN_JSR_MASK 0xfc00c000
+#define OP_LDQ 0x29
+#define OP_BR 0x30
+#define OP_BSR 0x34
+#define INSN_UNOP 0x2fe00000
+
+struct alpha_relax_info
+{
+ bfd *abfd;
+ asection *sec;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs, *relend;
+ struct bfd_link_info *link_info;
+ boolean changed_contents;
+ boolean changed_relocs;
+ bfd_vma gp;
+ bfd *gotobj;
+ asection *tsec;
+ struct alpha_elf_link_hash_entry *h;
+ struct alpha_elf_got_entry *gotent;
+ unsigned char other;
+};
+
+static Elf_Internal_Rela * elf64_alpha_relax_with_lituse
+ 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,
+ Elf_Internal_Rela *irel));
+
+static bfd_vma elf64_alpha_relax_opt_call
+ PARAMS((struct alpha_relax_info *info, bfd_vma symval));
+
+static boolean elf64_alpha_relax_section
+ PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
+ boolean *again));
+
+static Elf_Internal_Rela *
+elf64_alpha_find_reloc_at_ofs (rel, relend, offset, type)
+ Elf_Internal_Rela *rel, *relend;
+ bfd_vma offset;
+ int type;
+{
+ while (rel < relend)
+ {
+ if (rel->r_offset == offset && ELF64_R_TYPE (rel->r_info) == type)
+ return rel;
+ ++rel;
+ }
+ return NULL;
+}
+
+static Elf_Internal_Rela *
+elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
+ struct alpha_relax_info *info;
+ bfd_vma symval;
+ Elf_Internal_Rela *irel, *irelend;
+{
+ Elf_Internal_Rela *urel;
+ int flags, count, i;
+ bfd_signed_vma disp;
+ boolean fits16;
+ boolean fits32;
+ boolean lit_reused = false;
+ boolean all_optimized = true;
+ unsigned int lit_insn;
+
+ lit_insn = bfd_get_32 (info->abfd, info->contents + irel->r_offset);
+ if (lit_insn >> 26 != OP_LDQ)
+ {
+ ((*_bfd_error_handler)
+ ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
+ bfd_get_filename (info->abfd), info->sec->name,
+ (unsigned long)irel->r_offset));
+ return irel;
+ }
+
+ /* Summarize how this particular LITERAL is used. */
+ for (urel = irel+1, flags = count = 0; urel < irelend; ++urel, ++count)
+ {
+ if (ELF64_R_TYPE (urel->r_info) != R_ALPHA_LITUSE)
+ break;
+ if (urel->r_addend >= 0 && urel->r_addend <= 3)
+ flags |= 1 << urel->r_addend;
+ }
+
+ /* 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;
+ insn = bfd_get_32 (info->abfd, info->contents + urel->r_offset);
+
+ switch (urel->r_addend)
+ {
+ default: /* 0 = ADDRESS FORMAT */
+ /* This type is really just a placeholder to note that all
+ uses cannot be optimized, but to still allow some. */
+ all_optimized = false;
+ break;
+
+ case 1: /* MEM FORMAT */
+ /* We can always optimize 16-bit displacements. */
+ 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
+ register from the literal insn. Leave the offset alone. */
+ insn = (insn & 0xffe00000) | (lit_insn & 0x001f0000);
+ urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPRELLOW);
+ urel->r_addend = irel->r_addend;
+ info->changed_relocs = true;
+
+ bfd_put_32 (info->abfd, insn, info->contents + urel->r_offset);
+ info->changed_contents = true;
+ }
+
+ /* 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. */
+
+ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPRELHIGH);
+ lit_insn = (OP_LDAH << 26) | (lit_insn & 0x03ff0000);
+ bfd_put_32 (info->abfd, lit_insn,
+ info->contents + irel->r_offset);
+ lit_reused = true;
+ info->changed_contents = true;
+
+ urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPRELLOW);
+ urel->r_addend = irel->r_addend;
+ info->changed_relocs = true;
+ }
+ else
+ all_optimized = false;
+ break;
+
+ case 2: /* BYTE OFFSET FORMAT */
+ /* We can always optimize byte instructions. */
+
+ /* FIXME: sanity check the insn for byte op. Check that the
+ literal dest reg is indeed Rb in the byte insn. */
+
+ insn = (insn & ~0x001ff000) | ((symval & 7) << 13) | 0x1000;
+
+ urel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ urel->r_addend = 0;
+ info->changed_relocs = true;
+
+ bfd_put_32 (info->abfd, insn, info->contents + urel->r_offset);
+ info->changed_contents = true;
+ break;
+
+ case 3: /* CALL FORMAT */
+ {
+ /* If not zero, place to jump without needing pv. */
+ bfd_vma optdest = elf64_alpha_relax_opt_call (info, symval);
+ bfd_vma org = (info->sec->output_section->vma
+ + info->sec->output_offset
+ + urel->r_offset + 4);
+ bfd_signed_vma odisp;
+
+ odisp = (optdest ? optdest : symval) - org;
+ if (odisp >= -0x400000 && odisp < 0x400000)
+ {
+ Elf_Internal_Rela *xrel;
+
+ /* 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;
+
+ if (optdest)
+ urel->r_addend += optdest - symval;
+ else
+ all_optimized = false;
+
+ bfd_put_32 (info->abfd, insn, info->contents + urel->r_offset);
+
+ /* Kill any HINT reloc that might exist for this insn. */
+ xrel = (elf64_alpha_find_reloc_at_ofs
+ (info->relocs, info->relend, urel->r_offset,
+ R_ALPHA_HINT));
+ if (xrel)
+ xrel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+ info->changed_contents = true;
+ info->changed_relocs = true;
+ }
+ else
+ all_optimized = false;
+
+ /* ??? If target gp == current gp we can eliminate the gp reload.
+ 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.
+
+ Perhaps conditionalize this on a flag being set in the target
+ object file's header, and have gcc set it? */
+ }
+ break;
+ }
+ }
+
+ /* If all cases were optimized, we can reduce the use count on this
+ got entry by one, possibly eliminating it. */
+ if (all_optimized)
+ {
+ info->gotent->use_count -= 1;
+ alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1;
+ if (!info->h)
+ alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1;
+
+ /* If the literal instruction is no longer needed (it may have been
+ reused. We can eliminate it.
+ ??? For now, I don't want to deal with compacting the section,
+ so just nop it out. */
+ if (!lit_reused)
+ {
+ irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ info->changed_relocs = true;
+
+ bfd_put_32 (info->abfd, INSN_UNOP, info->contents + irel->r_offset);
+ info->changed_contents = true;
+ }
+ }
+
+ return irel + count;
+}
+
+static bfd_vma
+elf64_alpha_relax_opt_call (info, symval)
+ struct alpha_relax_info *info;
+ bfd_vma symval;
+{
+ /* If the function has the same gp, and we can identify that the
+ function does not use its function pointer, we can eliminate the
+ address load. */
+
+ /* If the symbol is marked NOPV, we are being told the function never
+ needs its procedure value. */
+ if (info->other == 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)
+ ;
+
+ /* Otherwise, we may be able to identify a GP load in the first two
+ words, which we can then skip. */
+ 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. */
+ if (info->sec == info->tsec)
+ {
+ tsec_relocs = info->relocs;
+ tsec_relend = info->relend;
+ tsec_free = NULL;
+ }
+ else
+ {
+ tsec_relocs = (_bfd_elf64_link_read_relocs
+ (info->abfd, info->tsec, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL,
+ info->link_info->keep_memory));
+ if (tsec_relocs == NULL)
+ return 0;
+ tsec_relend = tsec_relocs + info->tsec->reloc_count;
+ tsec_free = (info->link_info->keep_memory ? NULL : tsec_relocs);
+ }
+
+ /* 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));
+
+ if (!gpdisp || gpdisp->r_addend != 4)
+ {
+ if (tsec_free)
+ free (tsec_free);
+ return 0;
+ }
+ if (tsec_free)
+ free (tsec_free);
+ }
+
+ /* 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)
+ return 0;
+
+ return symval + 8;
+}
+
+static boolean
+elf64_alpha_relax_without_lituse (info, symval, irel)
+ struct alpha_relax_info *info;
+ bfd_vma symval;
+ Elf_Internal_Rela *irel;
+{
+ unsigned int insn;
+ bfd_signed_vma disp;
+
+ /* Get the instruction. */
+ insn = bfd_get_32 (info->abfd, info->contents + irel->r_offset);
+
+ if (insn >> 26 != OP_LDQ)
+ {
+ ((*_bfd_error_handler)
+ ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
+ bfd_get_filename (info->abfd), info->sec->name,
+ (unsigned long) irel->r_offset));
+ return true;
+ }
+
+ /* So we aren't told much. Do what we can with the address load and
+ fake the rest. All of the optimizations here require that the
+ offset from the GP fit in 16 bits. */
+
+ disp = symval - info->gp;
+ if (disp < -0x8000 || disp >= 0x8000)
+ return true;
+
+ /* On the LITERAL instruction itself, consider exchanging
+ `ldq R,X(gp)' for `lda R,Y(gp)'. */
+
+ insn = (OP_LDA << 26) | (insn & 0x03ff0000);
+ bfd_put_32 (info->abfd, insn, info->contents + irel->r_offset);
+ info->changed_contents = true;
+
+ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPRELLOW);
+ info->changed_relocs = true;
+
+ /* Reduce the use count on this got entry by one, possibly
+ eliminating it. */
+ info->gotent->use_count -= 1;
+ alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1;
+ if (!info->h)
+ alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1;
+
+ /* ??? Search forward through this basic block looking for insns
+ that use the target register. Stop after an insn modifying the
+ register is seen, or after a branch or call.
+
+ 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.
+
+ Any such jsr insn can be replaced by a bsr if it is in range.
+
+ This would mean that we'd have to _add_ relocations, the pain of
+ which gives one pause. */
+
+ return true;
+}
+
+static boolean
+elf64_alpha_relax_section (abfd, sec, link_info, again)
+ bfd *abfd;
+ asection *sec;
+ struct bfd_link_info *link_info;
+ boolean *again;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *internal_relocs;
+ Elf_Internal_Rela *free_relocs = NULL;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *free_contents = NULL;
+ Elf64_External_Sym *extsyms = NULL;
+ Elf64_External_Sym *free_extsyms = NULL;
+ struct alpha_elf_got_entry **local_got_entries;
+ struct alpha_relax_info info;
+
+ /* We are not currently changing any sizes, so only one pass. */
+ *again = false;
+
+ if (link_info->relocateable
+ || (sec->flags & SEC_RELOC) == 0
+ || sec->reloc_count == 0)
+ return true;
+
+ /* If this is the first time we have been called for this section,
+ initialize the cooked size. */
+ if (sec->_cooked_size == 0)
+ sec->_cooked_size = sec->_raw_size;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
+
+ /* Load the relocations for this section. */
+ internal_relocs = (_bfd_elf64_link_read_relocs
+ (abfd, sec, (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;
+
+ memset(&info, 0, sizeof(info));
+ info.abfd = abfd;
+ info.sec = sec;
+ info.link_info = link_info;
+ info.relocs = internal_relocs;
+ info.relend = irelend = internal_relocs + sec->reloc_count;
+
+ /* Find the GP for this object. */
+ info.gotobj = alpha_elf_tdata (abfd)->gotobj;
+ if (info.gotobj)
+ {
+ asection *sgot = alpha_elf_tdata (info.gotobj)->got;
+ info.gp = _bfd_get_gp_value (info.gotobj);
+ if (info.gp == 0)
+ {
+ info.gp = (sgot->output_section->vma
+ + sgot->output_offset
+ + 0x8000);
+ _bfd_set_gp_value (info.gotobj, info.gp);
+ }
+ }
+
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma symval;
+ Elf_Internal_Sym isym;
+ struct alpha_elf_got_entry *gotent;
+
+ if (ELF64_R_TYPE (irel->r_info) != (int) R_ALPHA_LITERAL)
+ continue;
+
+ /* Get the section contents. */
+ if (info.contents == NULL)
+ {
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ info.contents = elf_section_data (sec)->this_hdr.contents;
+ else
+ {
+ info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
+ if (info.contents == NULL)
+ goto error_return;
+ free_contents = info.contents;
+
+ if (! bfd_get_section_contents (abfd, sec, info.contents,
+ (file_ptr) 0, sec->_raw_size))
+ goto error_return;
+ }
+ }
+
+ /* Read this BFD's symbols if we haven't done so already. */
+ if (extsyms == NULL)
+ {
+ if (symtab_hdr->contents != NULL)
+ extsyms = (Elf64_External_Sym *) symtab_hdr->contents;
+ else
+ {
+ extsyms = ((Elf64_External_Sym *)
+ 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))
+ goto error_return;
+ }
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ {
+ /* A local symbol. */
+ bfd_elf64_swap_symbol_in (abfd,
+ extsyms + ELF64_R_SYM (irel->r_info),
+ &isym);
+ if (isym.st_shndx == SHN_UNDEF)
+ info.tsec = bfd_und_section_ptr;
+ else if (isym.st_shndx > 0 && isym.st_shndx < SHN_LORESERVE)
+ info.tsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+ else if (isym.st_shndx == SHN_ABS)
+ info.tsec = bfd_abs_section_ptr;
+ else if (isym.st_shndx == SHN_COMMON)
+ info.tsec = bfd_com_section_ptr;
+ else
+ continue; /* who knows. */
+
+ info.h = NULL;
+ info.other = isym.st_other;
+ gotent = local_got_entries[ELF64_R_SYM(irel->r_info)];
+ symval = isym.st_value;
+ }
+ else
+ {
+ unsigned long indx;
+ struct alpha_elf_link_hash_entry *h;
+
+ indx = ELF64_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ h = alpha_elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+
+ /* We can't do anthing with undefined or dynamic symbols. */
+ if (h->root.root.type == bfd_link_hash_undefined
+ || h->root.root.type == bfd_link_hash_undefweak
+ || alpha_elf_dynamic_symbol_p (&h->root, link_info))
+ continue;
+
+ info.h = h;
+ info.gotent = gotent;
+ info.tsec = h->root.root.u.def.section;
+ info.other = h->root.other;
+ gotent = h->got_entries;
+ symval = h->root.root.u.def.value;
+ }
+
+ /* Search for the got entry to be used by this relocation. */
+ while (gotent->gotobj != info.gotobj || gotent->addend != irel->r_addend)
+ gotent = gotent->next;
+ info.gotent = gotent;
+
+ symval += info.tsec->output_section->vma + info.tsec->output_offset;
+ symval += irel->r_addend;
+
+ BFD_ASSERT(info.gotent != NULL);
+
+ /* If there exist LITUSE relocations immediately following, this
+ opens up all sorts of interesting optimizations, because we
+ now know every location that this address load is used. */
+
+ if (irel+1 < irelend && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
+ {
+ irel = elf64_alpha_relax_with_lituse (&info, symval, irel, irelend);
+ if (irel == NULL)
+ goto error_return;
+ }
+ else
+ {
+ if (!elf64_alpha_relax_without_lituse (&info, symval, irel))
+ goto error_return;
+ }
+ }
+
+ if (!elf64_alpha_size_got_sections (abfd, link_info))
+ return false;
+
+ if (info.changed_relocs)
+ {
+ elf_section_data (sec)->relocs = internal_relocs;
+ }
+ else if (free_relocs != NULL)
+ {
+ free (free_relocs);
+ }
+
+ if (info.changed_contents)
+ {
+ elf_section_data (sec)->this_hdr.contents = info.contents;
+ }
+ else if (free_contents != NULL)
+ {
+ if (! link_info->keep_memory)
+ free (free_contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (sec)->this_hdr.contents = info.contents;
+ }
+ }
+
+ if (free_extsyms != NULL)
+ {
+ if (! link_info->keep_memory)
+ free (free_extsyms);
+ else
+ {
+ /* Cache the symbols for elf_link_input_bfd. */
+ symtab_hdr->contents = extsyms;
+ }
+ }
+
+ *again = info.changed_contents || info.changed_relocs;
+
+ return true;
+
+ error_return:
+ if (free_relocs != NULL)
+ free (free_relocs);
+ if (free_contents != NULL)
+ free (free_contents);
+ if (free_extsyms != NULL)
+ free (free_extsyms);
+ return false;
+}
+
/* PLT/GOT Stuff */
#define PLT_HEADER_SIZE 32
#define PLT_HEADER_WORD1 0xc3600000 /* br $27,.+4 */
@@ -1022,7 +1675,7 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
/* Handle an Alpha specific section when reading an object file. This
is called when elfcode.h finds a section with an unknown type.
- FIXME: We need to handle the SHF_MIPS_GPREL flag, but I'm not sure
+ FIXME: We need to handle the SHF_ALPHA_GPREL flag, but I'm not sure
how to. */
static boolean
@@ -1143,32 +1796,43 @@ elf64_alpha_fake_sections (abfd, hdr, sec)
return true;
}
-/* Return the number of additional phdrs we will need. */
+/* 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. */
-static int
-elf64_alpha_additional_program_headers (abfd)
+static boolean
+elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd *abfd;
+ struct bfd_link_info *info;
+ const Elf_Internal_Sym *sym;
+ const char **namep;
+ flagword *flagsp;
+ asection **secp;
+ bfd_vma *valp;
{
- asection *s;
- int ret;
+ if (sym->st_shndx == SHN_COMMON
+ && !info->relocateable
+ && sym->st_size <= bfd_get_gp_size (abfd))
+ {
+ /* Common symbols less than or equal to -G nn bytes are
+ automatically put into .sbss. */
- ret = 0;
+ asection *scomm = bfd_get_section_by_name (abfd, ".scommon");
- s = bfd_get_section_by_name (abfd, ".reginfo");
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
- {
- /* We need a PT_ALPHA_REGINFO segment. */
- ++ret;
- }
+ if (scomm == NULL)
+ {
+ scomm = bfd_make_section (abfd, ".scommon");
+ if (scomm == NULL
+ || !bfd_set_section_flags (abfd, scomm, (SEC_ALLOC
+ | SEC_IS_COMMON
+ | SEC_LINKER_CREATED)))
+ return false;
+ }
- if (bfd_get_section_by_name (abfd, ".dynamic") != NULL
- && bfd_get_section_by_name (abfd, ".mdebug") != NULL)
- {
- /* We need a PT_ALPHA_RTPROC segment. */
- ++ret;
+ *secp = scomm;
+ *valp = sym->st_size;
}
- return ret;
+ return true;
}
/* Create the .got section. */
@@ -1298,6 +1962,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));
ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size);
if (ext_hdr == NULL && swap->external_hdr_size != 0)
@@ -1614,7 +2279,7 @@ elf64_alpha_output_extsym (h, data)
{
output_section = sec->output_section;
if (output_section != NULL)
- h->esym.asym.value = (h->root.plt_offset
+ h->esym.asym.value = (h->root.plt.offset
+ sec->output_offset
+ output_section->vma);
else
@@ -1727,12 +2392,15 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
gotent->addend = rel->r_addend;
gotent->got_offset = -1;
gotent->flags = 0;
+ gotent->use_count = 1;
gotent->next = h->got_entries;
h->got_entries = gotent;
alpha_elf_tdata (abfd)->total_got_entries++;
}
+ else
+ gotent->use_count += 1;
}
else
{
@@ -1769,6 +2437,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
gotent->addend = rel->r_addend;
gotent->got_offset = -1;
gotent->flags = 0;
+ gotent->use_count = 1;
gotent->next = local_got_entries[ELF64_R_SYM(rel->r_info)];
local_got_entries[ELF64_R_SYM(rel->r_info)] = gotent;
@@ -1776,6 +2445,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
alpha_elf_tdata(abfd)->total_got_entries++;
alpha_elf_tdata(abfd)->n_local_got_entries++;
}
+ else
+ gotent->use_count += 1;
}
/* Remember how this literal is used from its LITUSEs.
@@ -1814,6 +2485,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
case R_ALPHA_GPDISP:
case R_ALPHA_GPREL32:
+ case R_ALPHA_GPRELHIGH:
+ case R_ALPHA_GPRELLOW:
/* We don't actually use the .got here, but the sections must
be created before the linker maps input sections to output
sections. */
@@ -1908,9 +2581,10 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
else
rent->count++;
}
- else if (info->shared)
+ else if (info->shared && (sec->flags & SEC_ALLOC))
{
- /* If this is a shared library, we need a RELATIVE reloc. */
+ /* If this is a shared library, and the section is to be
+ loaded into memory, we need a RELATIVE reloc. */
sreloc->_raw_size += sizeof (Elf64_External_Rela);
}
break;
@@ -1963,17 +2637,18 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
if (s->_raw_size == 0)
s->_raw_size = PLT_HEADER_SIZE;
- h->plt_offset = s->_raw_size;
+ h->plt.offset = s->_raw_size;
s->_raw_size += PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are not
generating a shared library, then set the symbol to the location
in the .plt. This is required to make function pointers compare
equal between the normal executable and the shared library. */
- if (!info->shared)
+ if (! info->shared
+ && h->root.type != bfd_link_hash_defweak)
{
h->root.u.def.section = s;
- h->root.u.def.value = h->plt_offset;
+ h->root.u.def.value = h->plt.offset;
}
/* We also need a JMP_SLOT entry in the .rela.plt section. */
@@ -2042,7 +2717,7 @@ elf64_alpha_merge_ind_symbols (hi, dummy)
{
gin = gi->next;
for (gs = gsh; gs ; gs = gs->next)
- if (gi->gotobj == gs->gotobj && gi->addend == gs->addend )
+ if (gi->gotobj == gs->gotobj && gi->addend == gs->addend)
goto got_found;
gi->next = hs->got_entries;
hs->got_entries = gi;
@@ -2086,6 +2761,7 @@ elf64_alpha_can_merge_gots (a, b)
bfd *a, *b;
{
int total = alpha_elf_tdata (a)->total_got_entries;
+ bfd *bsub;
/* Trivial quick fallout test. */
if (total + alpha_elf_tdata (b)->total_got_entries <= MAX_GOT_ENTRIES)
@@ -2098,37 +2774,40 @@ elf64_alpha_can_merge_gots (a, b)
/* Failing the common trivial comparison, we must effectively
perform the merge. Not actually performing the merge means that
we don't have to store undo information in case we fail. */
- {
- struct alpha_elf_link_hash_entry **hashes = alpha_elf_sym_hashes(b);
- Elf_Internal_Shdr *symtab_hdr = &elf_tdata(b)->symtab_hdr;
- int i, n;
+ for (bsub = b; bsub ; bsub = alpha_elf_tdata (bsub)->in_got_link_next)
+ {
+ struct alpha_elf_link_hash_entry **hashes = alpha_elf_sym_hashes (bsub);
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (bsub)->symtab_hdr;
+ int i, n;
- n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info;
- for (i = 0; i < n; ++i)
- {
- struct alpha_elf_got_entry *ae, *be;
- struct alpha_elf_link_hash_entry *h;
+ n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info;
+ for (i = 0; i < n; ++i)
+ {
+ struct alpha_elf_got_entry *ae, *be;
+ struct alpha_elf_link_hash_entry *h;
- h = hashes[i];
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+ h = hashes[i];
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
- for (be = h->got_entries; be ; be = be->next)
- {
- if (be->gotobj != b)
- continue;
+ for (be = h->got_entries; be ; be = be->next)
+ {
+ if (be->use_count == 0)
+ continue;
+ if (be->gotobj != b)
+ continue;
- for (ae = h->got_entries; ae ; ae = ae->next)
- if (ae->gotobj == a && ae->addend == be->addend)
- goto global_found;
+ for (ae = h->got_entries; ae ; ae = ae->next)
+ if (ae->gotobj == a && ae->addend == be->addend)
+ goto global_found;
- if (++total > MAX_GOT_ENTRIES)
- return false;
- global_found:;
- }
- }
- }
+ if (++total > MAX_GOT_ENTRIES)
+ return false;
+ global_found:;
+ }
+ }
+ }
return true;
}
@@ -2139,73 +2818,91 @@ static void
elf64_alpha_merge_gots (a, b)
bfd *a, *b;
{
- int total = alpha_elf_tdata(a)->total_got_entries;
+ int total = alpha_elf_tdata (a)->total_got_entries;
+ bfd *bsub;
/* Remember local expansion. */
{
- int e = alpha_elf_tdata(b)->n_local_got_entries;
+ int e = alpha_elf_tdata (b)->n_local_got_entries;
total += e;
- alpha_elf_tdata(a)->n_local_got_entries += e;
+ alpha_elf_tdata (a)->n_local_got_entries += e;
}
- /* Let the local .got entries know they are part of a new subsegment. */
- {
- struct alpha_elf_got_entry **local_got_entries;
- local_got_entries = alpha_elf_tdata(b)->local_got_entries;
- if (local_got_entries)
- {
- int i, n;
+ for (bsub = b; bsub ; bsub = alpha_elf_tdata (bsub)->in_got_link_next)
+ {
+ struct alpha_elf_got_entry **local_got_entries;
+ struct alpha_elf_link_hash_entry **hashes;
+ Elf_Internal_Shdr *symtab_hdr;
+ int i, n;
+
+ /* Let the local .got entries know they are part of a new subsegment. */
+ local_got_entries = alpha_elf_tdata (bsub)->local_got_entries;
+ if (local_got_entries)
+ {
+ n = elf_tdata (bsub)->symtab_hdr.sh_info;
+ for (i = 0; i < n; ++i)
+ {
+ struct alpha_elf_got_entry *ent;
+ for (ent = local_got_entries[i]; ent; ent = ent->next)
+ ent->gotobj = a;
+ }
+ }
- n = elf_tdata(b)->symtab_hdr.sh_info;
- for (i = 0; i < n; ++i)
- {
- struct alpha_elf_got_entry *gotent;
- for (gotent = local_got_entries[i]; gotent; gotent = gotent->next)
- gotent->gotobj = a;
- }
- }
- }
+ /* Merge the global .got entries. */
+ hashes = alpha_elf_sym_hashes (bsub);
+ symtab_hdr = &elf_tdata (bsub)->symtab_hdr;
- /* Merge the global .got entries. */
- {
- struct alpha_elf_link_hash_entry **hashes = alpha_elf_sym_hashes(b);
- Elf_Internal_Shdr *symtab_hdr = &elf_tdata(b)->symtab_hdr;
- int i, n;
+ n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info;
+ for (i = 0; i < n; ++i)
+ {
+ struct alpha_elf_got_entry *ae, *be, **pbe, **start;
+ struct alpha_elf_link_hash_entry *h;
- n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info;
- for (i = 0; i < n; ++i)
- {
- struct alpha_elf_got_entry *ae, *be, **pbe, **start;
- struct alpha_elf_link_hash_entry *h;
+ h = hashes[i];
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
- h = hashes[i];
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+ start = &h->got_entries;
+ for (pbe = start, be = *start; be ; pbe = &be->next, be = be->next)
+ {
+ if (be->use_count == 0)
+ {
+ *pbe = be->next;
+ continue;
+ }
+ if (be->gotobj != b)
+ continue;
- start = &h->got_entries;
- for (pbe = start, be = *start; be ; pbe = &be->next, be = be->next)
- {
- if (be->gotobj != b)
- continue;
+ for (ae = *start; ae ; ae = ae->next)
+ if (ae->gotobj == a && ae->addend == be->addend)
+ {
+ ae->flags |= be->flags;
+ ae->use_count += be->use_count;
+ *pbe = be->next;
+ goto global_found;
+ }
+ be->gotobj = a;
+ total += 1;
- for (ae = *start; ae ; ae = ae->next)
- if (ae->gotobj == a && ae->addend == be->addend)
- {
- ae->flags |= be->flags;
- *pbe = be->next;
- goto global_found;
- }
- be->gotobj = a;
- total += 1;
+ global_found:;
+ }
+ }
- global_found:;
- }
- }
- }
+ alpha_elf_tdata (bsub)->gotobj = a;
+ }
+ alpha_elf_tdata (a)->total_got_entries = total;
+
+ /* Merge the two in_got chains. */
+ {
+ bfd *next;
+
+ bsub = a;
+ while ((next = alpha_elf_tdata (bsub)->in_got_link_next) != NULL)
+ bsub = next;
- alpha_elf_tdata(a)->total_got_entries = total;
- alpha_elf_tdata(b)->gotobj = a;
+ alpha_elf_tdata (bsub)->in_got_link_next = b;
+ }
}
/* Calculate the offsets for the got entries. */
@@ -2218,11 +2915,14 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg)
struct alpha_elf_got_entry *gotent;
for (gotent = h->got_entries; gotent; gotent = gotent->next)
- {
- bfd_size_type *plge = &alpha_elf_tdata (gotent->gotobj)->got->_raw_size;
- gotent->got_offset = *plge;
- *plge += 8;
- }
+ if (gotent->use_count > 0)
+ {
+ bfd_size_type *plge
+ = &alpha_elf_tdata (gotent->gotobj)->got->_raw_size;
+
+ gotent->got_offset = *plge;
+ *plge += 8;
+ }
return true;
}
@@ -2260,111 +2960,117 @@ elf64_alpha_calc_got_offsets (info)
for (k = 0, n = elf_tdata(j)->symtab_hdr.sh_info; k < n; ++k)
for (gotent = local_got_entries[k]; gotent; gotent = gotent->next)
- {
- gotent->got_offset = got_offset;
- got_offset += 8;
- }
+ if (gotent->use_count > 0)
+ {
+ gotent->got_offset = got_offset;
+ got_offset += 8;
+ }
}
alpha_elf_tdata(i)->got->_raw_size = got_offset;
+ alpha_elf_tdata(i)->got->_cooked_size = got_offset;
}
}
-/* Remove a section from the output BFD. */
-
-static void
-elf64_alpha_strip_section_from_output (s)
- asection *s;
-{
- asection **spp;
-
- for (spp = &s->output_section->owner->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- continue;
- *spp = s->output_section->next;
- --s->output_section->owner->section_count;
-}
-
/* Constructs the gots. */
static boolean
-elf64_alpha_always_size_sections (output_bfd, info)
+elf64_alpha_size_got_sections (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
{
- bfd *i, *got_list, *cur_got_obj, **cur_got_tail;
- int ngots;
+ bfd *i, *got_list, *cur_got_obj;
+ int something_changed = 0;
- if (info->relocateable)
- return true;
-
- /* First, take care of the indirect symbols created by versioning. */
- alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
- elf64_alpha_merge_ind_symbols,
- NULL);
+ got_list = alpha_elf_hash_table (info)->got_list;
- ngots = 0;
- got_list = NULL;
- cur_got_obj = NULL;
- cur_got_tail = NULL;
- for (i = info->input_bfds; i ; i = i->link_next)
+ /* On the first time through, pretend we have an existing got list
+ consisting of all of the input files. */
+ if (got_list == NULL)
{
- bfd *this_got = alpha_elf_tdata (i)->gotobj;
-
- /* Don't play if there is no .got for this input file. */
- if (this_got == NULL)
- continue;
-
- if (alpha_elf_tdata (this_got)->total_got_entries > MAX_GOT_ENTRIES)
+ for (i = info->input_bfds; i ; i = i->link_next)
{
- /* Yikes! A single object file has too many entries. */
- (*_bfd_error_handler)
- ("%s: .got subsegment exceeds 64K (size %d)",
- bfd_get_filename(i),
- alpha_elf_tdata(this_got)->total_got_entries * 8);
- return false;
- }
+ bfd *this_got = alpha_elf_tdata (i)->gotobj;
+ if (this_got == NULL)
+ continue;
- if (cur_got_obj)
- {
- if (elf64_alpha_can_merge_gots (cur_got_obj, i))
+ /* We are assuming no merging has yet ocurred. */
+ BFD_ASSERT (this_got == i);
+
+ if (alpha_elf_tdata (this_got)->total_got_entries > MAX_GOT_ENTRIES)
{
- elf64_alpha_merge_gots (cur_got_obj, i);
- *cur_got_tail = i;
+ /* Yikes! A single object file has too many entries. */
+ (*_bfd_error_handler)
+ (_("%s: .got subsegment exceeds 64K (size %d)"),
+ bfd_get_filename (i),
+ alpha_elf_tdata (this_got)->total_got_entries * 8);
+ return false;
}
+
+ if (got_list == NULL)
+ got_list = this_got;
else
- {
- if (++ngots == 2)
- {
- (*info->callbacks->warning)
- (info, "using multiple gp values", (char *) NULL,
- output_bfd, (asection *) NULL, (bfd_vma) 0);
- }
- *cur_got_tail = NULL;
- alpha_elf_tdata(cur_got_obj)->got_link_next = got_list;
- got_list = cur_got_obj;
- cur_got_obj = i;
- }
+ alpha_elf_tdata(cur_got_obj)->got_link_next = this_got;
+ cur_got_obj = this_got;
+ }
+
+ /* Strange degenerate case of no got references. */
+ if (got_list == NULL)
+ return true;
+
+ alpha_elf_hash_table (info)->got_list = got_list;
+
+ /* Force got offsets to be recalculated. */
+ something_changed = 1;
+ }
+
+ cur_got_obj = got_list;
+ i = alpha_elf_tdata(cur_got_obj)->got_link_next;
+ while (i != NULL)
+ {
+ if (elf64_alpha_can_merge_gots (cur_got_obj, i))
+ {
+ elf64_alpha_merge_gots (cur_got_obj, i);
+ i = alpha_elf_tdata(i)->got_link_next;
+ alpha_elf_tdata(cur_got_obj)->got_link_next = i;
+ something_changed = 1;
}
else
{
- ++ngots;
cur_got_obj = i;
+ i = alpha_elf_tdata(i)->got_link_next;
}
- cur_got_tail = &alpha_elf_tdata(i)->in_got_link_next;
}
- if (cur_got_obj)
- alpha_elf_tdata (cur_got_obj)->got_link_next = got_list;
- alpha_elf_hash_table (info)->got_list = got_list = cur_got_obj;
+ /* Once the gots have been merged, fill in the got offsets for
+ everything therein. */
+ if (1 || something_changed)
+ elf64_alpha_calc_got_offsets (info);
- /* Once the gots have been merged, fill in the got offsets for everything
- therein. */
- elf64_alpha_calc_got_offsets (info);
+ return true;
+}
+
+static boolean
+elf64_alpha_always_size_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *i;
+
+ if (info->relocateable)
+ return true;
+
+ /* First, take care of the indirect symbols created by versioning. */
+ alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
+ elf64_alpha_merge_ind_symbols,
+ NULL);
+
+ if (!elf64_alpha_size_got_sections (output_bfd, info))
+ return false;
/* Allocate space for all of the .got subsections. */
- for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
+ i = alpha_elf_hash_table (info)->got_list;
+ for ( ; i ; i = alpha_elf_tdata(i)->got_link_next)
{
asection *s = alpha_elf_tdata(i)->got;
if (s->_raw_size > 0)
@@ -2405,42 +3111,16 @@ elf64_alpha_calc_dynrel_sizes (h, info)
}
/* If the symbol is dynamic, we'll need all the relocations in their
- natural form. If it has been forced local, we'll need the same
- number of RELATIVE relocations. */
- if (alpha_elf_dynamic_symbol_p (&h->root, info)
- || (info->shared && h->root.dynindx == -1))
- {
- struct alpha_elf_reloc_entry *relent;
+ natural form. If this is a shared object, and it has been forced
+ local, we'll need the same number of RELATIVE relocations. */
- for (relent = h->reloc_entries; relent; relent = relent->next)
- {
- relent->srel->_raw_size +=
- sizeof (Elf64_External_Rela) * relent->count;
- }
-
- /* Only add a .rela.got entry if we're not using a .plt entry. */
- if (h->root.plt_offset == MINUS_ONE)
- {
- bfd *dynobj = elf_hash_table(info)->dynobj;
- struct alpha_elf_got_entry *gotent;
- bfd_size_type count = 0;
- asection *srel;
-
- for (gotent = h->got_entries; gotent ; gotent = gotent->next)
- count++;
- if (count > 0)
- {
- srel = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela) * count;
- }
- }
- }
- /* Otherwise, shared objects require RELATIVE relocs for all REFQUAD
- and REFLONG relocations. */
- else if (info->shared)
+ if (alpha_elf_dynamic_symbol_p (&h->root, info) || info->shared)
{
struct alpha_elf_reloc_entry *relent;
+ bfd *dynobj;
+ struct alpha_elf_got_entry *gotent;
+ bfd_size_type count;
+ asection *srel;
for (relent = h->reloc_entries; relent; relent = relent->next)
if (relent->rtype == R_ALPHA_REFLONG
@@ -2449,6 +3129,24 @@ elf64_alpha_calc_dynrel_sizes (h, info)
relent->srel->_raw_size +=
sizeof(Elf64_External_Rela) * relent->count;
}
+
+ dynobj = elf_hash_table(info)->dynobj;
+ count = 0;
+
+ for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+ count++;
+
+ /* If we are using a .plt entry, subtract one, as the first
+ reference uses a .rela.plt entry instead. */
+ if (h->root.plt.offset != MINUS_ONE)
+ count--;
+
+ if (count > 0)
+ {
+ srel = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srel != NULL);
+ srel->_raw_size += sizeof (Elf64_External_Rela) * count;
+ }
}
return true;
@@ -2570,7 +3268,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
}
if (strip)
- elf64_alpha_strip_section_from_output (s);
+ _bfd_strip_section_from_output (info, s);
else
{
/* Allocate memory for the section contents. */
@@ -2580,34 +3278,6 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
}
}
- /* If we are generating a shared library, we generate a section
- symbol for each output section. These are local symbols, which
- means that they must come first in the dynamic symbol table.
- That means we must increment the dynamic symbol index of every
- other dynamic symbol. */
- if (info->shared)
- {
- long c[2], i;
- asection *p;
-
- c[0] = 0;
- c[1] = bfd_count_sections (output_bfd);
-
- elf_hash_table (info)->dynsymcount += c[1];
- elf_link_hash_traverse (elf_hash_table(info),
- elf64_alpha_adjust_dynindx,
- (PTR) c);
-
- for (i = 1, p = output_bfd->sections;
- p != NULL;
- p = p->next, i++)
- {
- elf_section_data (p)->dynindx = i;
- /* These symbols will have no names, so we don't need to
- fiddle with dynstr_index. */
- }
- }
-
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Add some entries to the .dynamic section. We fill in the
@@ -2648,22 +3318,6 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
return true;
}
-/* Increment the index of a dynamic symbol by a given amount. Called
- via elf_link_hash_traverse. */
-
-static boolean
-elf64_alpha_adjust_dynindx (h, cparg)
- struct elf_link_hash_entry *h;
- PTR cparg;
-{
- long *cp = (long *)cparg;
-
- if (h->dynindx >= cp[0])
- h->dynindx += cp[1];
-
- return true;
-}
-
/* Relocate an Alpha ELF section. */
static boolean
@@ -2739,6 +3393,12 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
+
+ /* 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;
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
@@ -2815,13 +3475,14 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic)
+ else if (info->shared && !info->symbolic && !info->no_undefined)
relocation = 0;
else
{
if (!((*info->callbacks->undefined_symbol)
(info, h->root.root.root.string, input_bfd,
- input_section, rel->r_offset)))
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined))))
return false;
relocation = 0;
}
@@ -2858,6 +3519,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case R_ALPHA_LITERAL:
{
struct alpha_elf_got_entry *gotent;
+ boolean dynamic_symbol;
BFD_ASSERT(sgot != NULL);
BFD_ASSERT(gp != 0);
@@ -2865,75 +3527,53 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (h != NULL)
{
gotent = h->got_entries;
- BFD_ASSERT(gotent != NULL);
-
- while (gotent->gotobj != gotobj || gotent->addend != addend)
- gotent = gotent->next;
-
- /* Initialize the .got entry's value. */
- if (!(gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_DONE))
- {
- bfd_put_64 (output_bfd, relocation+addend,
- sgot->contents + gotent->got_offset);
-
- /* If the symbol has been forced local, output a
- RELATIVE reloc, otherwise it will be handled in
- finish_dynamic_symbol. */
- if (info->shared && h->root.dynindx == -1)
- {
- Elf_Internal_Rela outrel;
-
- BFD_ASSERT(srelgot != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
- outrel.r_addend = 0;
-
- bfd_elf64_swap_reloca_out (output_bfd, &outrel,
- ((Elf64_External_Rela *)
- srelgot->contents)
- + srelgot->reloc_count++);
- }
-
- gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
- }
+ dynamic_symbol = alpha_elf_dynamic_symbol_p (&h->root, info);
}
else
{
gotent = (alpha_elf_tdata(input_bfd)->
local_got_entries[r_symndx]);
- while (gotent->addend != addend)
- gotent = gotent->next;
+ dynamic_symbol = false;
+ }
+
+ BFD_ASSERT(gotent != NULL);
+
+ while (gotent->gotobj != gotobj || gotent->addend != addend)
+ gotent = gotent->next;
+
+ BFD_ASSERT(gotent->use_count >= 1);
- if (!(gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_DONE))
+ /* Initialize the .got entry's value. */
+ if (!(gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_DONE))
+ {
+ bfd_put_64 (output_bfd, relocation+addend,
+ sgot->contents + gotent->got_offset);
+
+ /* If the symbol has been forced local, output a
+ RELATIVE reloc, otherwise it will be handled in
+ finish_dynamic_symbol. */
+ if (info->shared && !dynamic_symbol)
{
- bfd_put_64 (output_bfd, relocation+addend,
- sgot->contents + gotent->got_offset);
-
- /* Local got entries need RELATIVE relocs in shared
- libraries. */
- if (info->shared)
- {
- Elf_Internal_Rela outrel;
-
- BFD_ASSERT(srelgot != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
- outrel.r_addend = 0;
-
- bfd_elf64_swap_reloca_out (output_bfd, &outrel,
- ((Elf64_External_Rela *)
- srelgot->contents)
- + srelgot->reloc_count++);
- }
-
- gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
+ Elf_Internal_Rela outrel;
+
+ BFD_ASSERT(srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
+ outrel.r_addend = 0;
+
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ ((Elf64_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count++);
+ BFD_ASSERT (sizeof(Elf64_External_Rela)
+ * srelgot->reloc_count
+ <= srelgot->_cooked_size);
}
+
+ gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
}
/* Figure the gprel relocation. */
@@ -2947,8 +3587,18 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
goto default_reloc;
case R_ALPHA_GPREL32:
+ case R_ALPHA_GPRELLOW:
+ BFD_ASSERT(gp != 0);
+ relocation -= gp;
+ goto default_reloc;
+
+ case R_ALPHA_GPRELHIGH:
BFD_ASSERT(gp != 0);
relocation -= gp;
+ relocation += addend;
+ addend = 0;
+ relocation = (((bfd_signed_vma) relocation >> 16)
+ + ((relocation >> 15) & 1));
goto default_reloc;
case R_ALPHA_BRADDR:
@@ -2974,7 +3624,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
outrel.r_addend = addend;
addend = 0, relocation = 0;
}
- else if (info->shared)
+ else if (info->shared && (input_section->flags & SEC_ALLOC))
{
outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
outrel.r_addend = 0;
@@ -3023,6 +3673,8 @@ 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
+ <= srel->_cooked_size);
}
goto default_reloc;
@@ -3082,7 +3734,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
{
bfd *dynobj = elf_hash_table(info)->dynobj;
- if (h->plt_offset != MINUS_ONE)
+ if (h->plt.offset != MINUS_ONE)
{
/* Fill in the .plt entry for this symbol. */
asection *splt, *sgot, *srel;
@@ -3110,21 +3762,21 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
+ gotent->got_offset);
plt_addr = (splt->output_section->vma
+ splt->output_offset
- + h->plt_offset);
+ + h->plt.offset);
- plt_index = (h->plt_offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+ plt_index = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
/* Fill in the entry in the procedure linkage table. */
{
unsigned insn1, insn2, insn3;
- insn1 = PLT_ENTRY_WORD1 | ((-(h->plt_offset + 4) >> 2) & 0x1fffff);
+ insn1 = PLT_ENTRY_WORD1 | ((-(h->plt.offset + 4) >> 2) & 0x1fffff);
insn2 = PLT_ENTRY_WORD2;
insn3 = PLT_ENTRY_WORD3;
- bfd_put_32 (output_bfd, insn1, splt->contents + h->plt_offset);
- bfd_put_32 (output_bfd, insn2, splt->contents + h->plt_offset + 4);
- bfd_put_32 (output_bfd, insn3, splt->contents + h->plt_offset + 8);
+ bfd_put_32 (output_bfd, insn1, splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd, insn2, splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, insn3, splt->contents + h->plt.offset + 8);
}
/* Fill in the entry in the .rela.plt section. */
@@ -3147,14 +3799,40 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_put_64 (output_bfd, plt_addr, sgot->contents + gotent->got_offset);
/* Subsequent .got entries will continue to bounce through the .plt. */
- while ((gotent = gotent->next) != NULL)
+ if (gotent->next)
{
- sgot = alpha_elf_tdata(gotent->gotobj)->got;
- BFD_ASSERT(sgot != NULL);
- BFD_ASSERT(gotent->addend == 0);
+ srel = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (! info->shared || srel != NULL);
+
+ gotent = gotent->next;
+ do
+ {
+ sgot = alpha_elf_tdata(gotent->gotobj)->got;
+ BFD_ASSERT(sgot != NULL);
+ BFD_ASSERT(gotent->addend == 0);
+
+ bfd_put_64 (output_bfd, plt_addr,
+ sgot->contents + gotent->got_offset);
+
+ if (info->shared)
+ {
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
+ outrel.r_addend = 0;
+
+ 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
+ <= srel->_cooked_size);
+ }
- bfd_put_64 (output_bfd, plt_addr,
- sgot->contents + gotent->got_offset);
+ gotent = gotent->next;
+ }
+ while (gotent != NULL);
}
}
else if (alpha_elf_dynamic_symbol_p (h, info))
@@ -3181,6 +3859,8 @@ 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
+ <= srel->_cooked_size);
}
}
@@ -3282,44 +3962,6 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
}
}
- if (info->shared)
- {
- asection *sdynsym;
- asection *s;
- Elf_Internal_Sym sym;
-
- /* Set up the section symbols for the output sections. */
-
- sdynsym = bfd_get_section_by_name (dynobj, ".dynsym");
- BFD_ASSERT (sdynsym != NULL);
-
- sym.st_size = 0;
- sym.st_name = 0;
- sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
- sym.st_other = 0;
-
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- int indx;
-
- sym.st_value = s->vma;
-
- indx = elf_section_data (s)->this_idx;
- BFD_ASSERT (indx > 0);
- sym.st_shndx = indx;
-
- bfd_elf64_swap_symbol_out (output_bfd, &sym,
- (PTR) (((Elf64_External_Sym *)
- sdynsym->contents)
- + elf_section_data (s)->dynindx));
- }
-
- /* Set the sh_info field of the output .dynsym section to the
- index of the first global symbol. */
- elf_section_data (sdynsym->output_section)->this_hdr.sh_info =
- bfd_count_sections (output_bfd) + 1;
- }
-
return true;
}
@@ -3341,6 +3983,15 @@ elf64_alpha_final_link (abfd, info)
HDRR *symhdr = &debug.symbolic_header;
PTR mdebug_handle = NULL;
+#if 0
+ if (++ngots == 2)
+ {
+ (*info->callbacks->warning)
+ (info, _("using multiple gp values"), (char *) NULL,
+ output_bfd, (asection *) NULL, (bfd_vma) 0);
+ }
+#endif
+
/* Go through the sections and collect the .reginfo and .mdebug
information. */
reginfo_sec = NULL;
@@ -3710,7 +4361,7 @@ elf64_alpha_final_link (abfd, info)
else
{
(*_bfd_error_handler)
- ("%s: illegal section name `%s'",
+ (_("%s: illegal section name `%s'"),
bfd_get_filename (abfd), o->name);
bfd_set_error (bfd_error_nonrepresentable_section);
return false;
@@ -4012,14 +4663,16 @@ elf64_alpha_ecoff_debug_swap =
elf64_alpha_section_from_shdr
#define elf_backend_fake_sections \
elf64_alpha_fake_sections
-#define elf_backend_additional_program_headers \
- elf64_alpha_additional_program_headers
#define bfd_elf64_bfd_is_local_label_name \
elf64_alpha_is_local_label_name
#define bfd_elf64_find_nearest_line \
elf64_alpha_find_nearest_line
+#define bfd_elf64_bfd_relax_section \
+ elf64_alpha_relax_section
+#define elf_backend_add_symbol_hook \
+ elf64_alpha_add_symbol_hook
#define elf_backend_check_relocs \
elf64_alpha_check_relocs
#define elf_backend_create_dynamic_sections \
@@ -4048,5 +4701,7 @@ elf64_alpha_ecoff_debug_swap =
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
+#define elf_backend_got_header_size 0
+#define elf_backend_plt_header_size PLT_HEADER_SIZE
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c
index 5daf4ee..78dc09d 100644
--- a/contrib/binutils/bfd/elf64-gen.c
+++ b/contrib/binutils/bfd/elf64-gen.c
@@ -1,5 +1,5 @@
/* Generic support for 64-bit ELF
- Copyright 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1998 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,8 +22,41 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include "elf-bfd.h"
-/* This does not include any relocations, but should be good enough
- for GDB to read the file. */
+/* This does not include any relocation information, but should be
+ good enough for GDB or objdump to read the file. */
+
+static reloc_howto_type dummy =
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "UNKNOWN", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
+
+static void
+elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
+ bfd *abfd;
+ arelent *bfd_reloc;
+ Elf64_Internal_Rela *elf_reloc;
+{
+ bfd_reloc->howto = &dummy;
+}
+
+static void
+elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
+ bfd *abfd;
+ arelent *bfd_reloc;
+ Elf64_Internal_Rel *elf_reloc;
+{
+ bfd_reloc->howto = &dummy;
+}
#define TARGET_LITTLE_SYM bfd_elf64_little_generic_vec
#define TARGET_LITTLE_NAME "elf64-little"
@@ -31,7 +64,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_BIG_NAME "elf64-big"
#define ELF_ARCH bfd_arch_unknown
#define ELF_MACHINE_CODE EM_NONE
+#define ELF_MAXPAGESIZE 0x1
#define bfd_elf64_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
-#define elf_info_to_howto _bfd_elf_no_info_to_howto
+#define elf_info_to_howto elf_generic_info_to_howto
+#define elf_info_to_howto_rel elf_generic_info_to_howto_rel
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elf64-mips.c b/contrib/binutils/bfd/elf64-mips.c
index c513dea..6fc0dcd 100644
--- a/contrib/binutils/bfd/elf64-mips.c
+++ b/contrib/binutils/bfd/elf64-mips.c
@@ -1,6 +1,8 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
+ Linker support added by Mark Mitchell, CodeSourcery, LLC.
+ <mark@codesourcery.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -52,14 +54,20 @@ static void mips_elf64_swap_reloc_in
static void mips_elf64_swap_reloca_in
PARAMS ((bfd *, const Elf64_Mips_External_Rela *,
Elf64_Mips_Internal_Rela *));
-#if 0
static void mips_elf64_swap_reloc_out
PARAMS ((bfd *, const Elf64_Mips_Internal_Rel *,
Elf64_Mips_External_Rel *));
-#endif
static void mips_elf64_swap_reloca_out
PARAMS ((bfd *, const Elf64_Mips_Internal_Rela *,
Elf64_Mips_External_Rela *));
+static void mips_elf64_be_swap_reloc_in
+ PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rel *));
+static void mips_elf64_be_swap_reloc_out
+ PARAMS ((bfd *, const Elf_Internal_Rel *, bfd_byte *));
+static void mips_elf64_be_swap_reloca_in
+ PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+static void mips_elf64_be_swap_reloca_out
+ PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
static reloc_howto_type *mips_elf64_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static long mips_elf64_get_reloc_upper_bound PARAMS ((bfd *, asection *));
@@ -68,63 +76,17 @@ static boolean mips_elf64_slurp_one_reloc_table
static boolean mips_elf64_slurp_reloc_table
PARAMS ((bfd *, asection *, asymbol **, boolean));
static void mips_elf64_write_relocs PARAMS ((bfd *, asection *, PTR));
-static boolean mips_elf64_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
-static boolean mips_elf64_section_processing
- PARAMS ((bfd *, Elf_Internal_Shdr *));
static boolean mips_elf64_slurp_armap PARAMS ((bfd *));
static boolean mips_elf64_write_armap
PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-/* The relocation types. */
-
-enum mips_elf64_reloc_type
-{
- R_MIPS_NONE = 0,
- R_MIPS_16 = 1,
- R_MIPS_32 = 2,
- R_MIPS_ADD = 2,
- R_MIPS_REL32 = 3,
- R_MIPS_REL = 3,
- R_MIPS_26 = 4,
- R_MIPS_HI16 = 5,
- R_MIPS_LO16 = 6,
- R_MIPS_GPREL16 = 7,
- R_MIPS_GPREL = 7,
- R_MIPS_LITERAL = 8,
- R_MIPS_GOT16 = 9,
- R_MIPS_GOT = 9,
- R_MIPS_PC16 = 10,
- R_MIPS_CALL16 = 11,
- R_MIPS_CALL = 11,
- R_MIPS_GPREL32 = 12,
- R_MIPS_SHIFT5 = 16,
- R_MIPS_SHIFT6 = 17,
- R_MIPS_64 = 18,
- R_MIPS_GOT_DISP = 19,
- R_MIPS_GOT_PAGE = 20,
- R_MIPS_GOT_OFST = 21,
- R_MIPS_GOT_HI16 = 22,
- R_MIPS_GOT_LO16 = 23,
- R_MIPS_SUB = 24,
- R_MIPS_INSERT_A = 25,
- R_MIPS_INSERT_B = 26,
- R_MIPS_DELETE = 27,
- R_MIPS_HIGHER = 28,
- R_MIPS_HIGHEST = 29,
- R_MIPS_CALL_HI16 = 30,
- R_MIPS_CALL_LO16 = 31,
- R_MIPS_SCN_DISP = 32,
- R_MIPS_REL16 = 33,
- R_MIPS_ADD_IMMEDIATE = 34,
- R_MIPS_PJUMP = 35,
- R_MIPS_RELGOT = 36
-};
-
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
from smaller values. Start with zero, widen, *then* decrement. */
#define MINUS_ONE (((bfd_vma)0) - 1)
+/* The number of local .got entries we reserve. */
+#define MIPS_RESERVED_GOTNO (2)
+
/* The relocation table used for SHT_REL sections. */
static reloc_howto_type mips_elf64_howto_table_rel[] =
@@ -659,7 +621,23 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false) /* pcrel_offset */
+ false), /* pcrel_offset */
+
+ /* Protected jump conversion. This is an optimization hint. No
+ relocation is required for correctness. */
+ HOWTO (R_MIPS_JALR, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_JALR", /* name */
+ false, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ false), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -1197,7 +1175,23 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false) /* pcrel_offset */
+ false), /* pcrel_offset */
+
+ /* Protected jump conversion. This is an optimization hint. No
+ relocation is required for correctness. */
+ HOWTO (R_MIPS_JALR, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_JALR", /* name */
+ false, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ false), /* pcrel_offset */
};
/* Swap in a MIPS 64-bit Rel reloc. */
@@ -1233,10 +1227,6 @@ mips_elf64_swap_reloca_in (abfd, src, dst)
dst->r_addend = bfd_h_get_signed_64 (abfd, (bfd_byte *) src->r_addend);
}
-#if 0
-
-/* This is not currently used. */
-
/* Swap out a MIPS 64-bit Rel reloc. */
static void
@@ -1253,8 +1243,6 @@ mips_elf64_swap_reloc_out (abfd, src, dst)
bfd_h_put_8 (abfd, src->r_type, (bfd_byte *) dst->r_type);
}
-#endif /* 0 */
-
/* Swap out a MIPS 64-bit Rela reloc. */
static void
@@ -1272,12 +1260,102 @@ mips_elf64_swap_reloca_out (abfd, src, dst)
bfd_h_put_64 (abfd, src->r_addend, (bfd_byte *) dst->r_addend);
}
+/* Swap in a MIPS 64-bit Rel reloc. */
+
+static void
+mips_elf64_be_swap_reloc_in (abfd, src, dst)
+ bfd *abfd;
+ const bfd_byte *src;
+ Elf_Internal_Rel *dst;
+{
+ Elf64_Mips_Internal_Rel mirel;
+
+ mips_elf64_swap_reloc_in (abfd,
+ (const Elf64_Mips_External_Rel *) src,
+ &mirel);
+
+ dst[0].r_offset = mirel.r_offset;
+ dst[0].r_info = ELF32_R_INFO (mirel.r_sym, mirel.r_type);
+ dst[1].r_offset = mirel.r_offset;
+ dst[1].r_info = ELF32_R_INFO (mirel.r_ssym, mirel.r_type2);
+ dst[2].r_offset = mirel.r_offset;
+ dst[2].r_info = ELF32_R_INFO (STN_UNDEF, mirel.r_type3);
+}
+
+/* Swap in a MIPS 64-bit Rela reloc. */
+
+static void
+mips_elf64_be_swap_reloca_in (abfd, src, dst)
+ bfd *abfd;
+ const bfd_byte *src;
+ Elf_Internal_Rela *dst;
+{
+ Elf64_Mips_Internal_Rela mirela;
+
+ mips_elf64_swap_reloca_in (abfd,
+ (const Elf64_Mips_External_Rela *) src,
+ &mirela);
+
+ dst[0].r_offset = mirela.r_offset;
+ dst[0].r_info = ELF32_R_INFO (mirela.r_sym, mirela.r_type);
+ dst[0].r_addend = mirela.r_addend;
+ dst[1].r_offset = mirela.r_offset;
+ dst[1].r_info = ELF32_R_INFO (mirela.r_ssym, mirela.r_type2);
+ dst[1].r_addend = 0;
+ dst[2].r_offset = mirela.r_offset;
+ dst[2].r_info = ELF32_R_INFO (STN_UNDEF, mirela.r_type3);
+ dst[2].r_addend = 0;
+}
+
+/* Swap out a MIPS 64-bit Rel reloc. */
+
+static void
+mips_elf64_be_swap_reloc_out (abfd, src, dst)
+ bfd *abfd;
+ const Elf_Internal_Rel *src;
+ bfd_byte *dst;
+{
+ Elf64_Mips_Internal_Rel mirel;
+
+ mirel.r_offset = src->r_offset;
+ mirel.r_type = ELF32_R_TYPE (src->r_info);
+ mirel.r_sym = ELF32_R_SYM (src->r_info);
+ mirel.r_type2 = R_MIPS_NONE;
+ mirel.r_ssym = STN_UNDEF;
+ mirel.r_type3 = R_MIPS_NONE;
+
+ mips_elf64_swap_reloc_out (abfd, &mirel,
+ (Elf64_Mips_External_Rel *) dst);
+}
+
+/* Swap out a MIPS 64-bit Rela reloc. */
+
+static void
+mips_elf64_be_swap_reloca_out (abfd, src, dst)
+ bfd *abfd;
+ const Elf_Internal_Rela *src;
+ bfd_byte *dst;
+{
+ Elf64_Mips_Internal_Rela mirela;
+
+ mirela.r_offset = src->r_offset;
+ mirela.r_type = ELF32_R_TYPE (src->r_info);
+ mirela.r_addend = src->r_addend;
+ mirela.r_sym = ELF32_R_SYM (src->r_info);
+ mirela.r_type2 = R_MIPS_NONE;
+ mirela.r_ssym = STN_UNDEF;
+ mirela.r_type3 = R_MIPS_NONE;
+
+ mips_elf64_swap_reloca_out (abfd, &mirela,
+ (Elf64_Mips_External_Rela *) dst);
+}
+
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
struct elf_reloc_map
{
bfd_reloc_code_real_type bfd_reloc_val;
- enum mips_elf64_reloc_type elf_reloc_val;
+ enum elf_mips_reloc_type elf_reloc_val;
};
static CONST struct elf_reloc_map mips_reloc_map[] =
@@ -1300,7 +1378,11 @@ static CONST struct elf_reloc_map mips_reloc_map[] =
{ BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 },
{ BFD_RELOC_MIPS_GOT_LO16, R_MIPS_GOT_LO16 },
{ BFD_RELOC_MIPS_CALL_HI16, R_MIPS_CALL_HI16 },
- { BFD_RELOC_MIPS_CALL_LO16, R_MIPS_CALL_LO16 }
+ { BFD_RELOC_MIPS_CALL_LO16, R_MIPS_CALL_LO16 },
+ { BFD_RELOC_MIPS_SUB, R_MIPS_SUB },
+ { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE },
+ { BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST },
+ { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP }
};
/* Given a BFD reloc type, return a howto structure. */
@@ -1411,20 +1493,20 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
used_ssym = false;
for (ir = 0; ir < 3; ir++)
{
- enum mips_elf64_reloc_type type;
+ enum elf_mips_reloc_type type;
switch (ir)
{
default:
abort ();
case 0:
- type = (enum mips_elf64_reloc_type) rela.r_type;
+ type = (enum elf_mips_reloc_type) rela.r_type;
break;
case 1:
- type = (enum mips_elf64_reloc_type) rela.r_type2;
+ type = (enum elf_mips_reloc_type) rela.r_type2;
break;
case 2:
- type = (enum mips_elf64_reloc_type) rela.r_type3;
+ type = (enum elf_mips_reloc_type) rela.r_type3;
break;
}
@@ -1733,115 +1815,6 @@ mips_elf64_write_relocs (abfd, sec, data)
== count);
}
-/* Handle a 64-bit MIPS ELF specific section. */
-
-static boolean
-mips_elf64_section_from_shdr (abfd, hdr, name)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- char *name;
-{
- if (! _bfd_mips_elf_section_from_shdr (abfd, hdr, name))
- return false;
-
- /* For a SHT_MIPS_OPTIONS section, look for a ODK_REGINFO entry, and
- set the gp value based on what we find. We may see both
- SHT_MIPS_REGINFO and SHT_MIPS_OPTIONS/ODK_REGINFO; in that case,
- they should agree. */
- if (hdr->sh_type == SHT_MIPS_OPTIONS)
- {
- bfd_byte *contents, *l, *lend;
-
- contents = (bfd_byte *) bfd_malloc (hdr->sh_size);
- if (contents == NULL)
- return false;
- if (! bfd_get_section_contents (abfd, hdr->bfd_section, contents,
- (file_ptr) 0, hdr->sh_size))
- {
- free (contents);
- return false;
- }
- l = contents;
- lend = contents + hdr->sh_size;
- while (l + sizeof (Elf_External_Options) <= lend)
- {
- Elf_Internal_Options intopt;
-
- bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l,
- &intopt);
- if (intopt.kind == ODK_REGINFO)
- {
- Elf64_Internal_RegInfo intreg;
-
- bfd_mips_elf64_swap_reginfo_in
- (abfd,
- ((Elf64_External_RegInfo *)
- (l + sizeof (Elf_External_Options))),
- &intreg);
- elf_gp (abfd) = intreg.ri_gp_value;
- }
- l += intopt.size;
- }
- free (contents);
- }
-
- return true;
-}
-
-/* Work over a section just before writing it out. We update the GP
- value in the SHT_MIPS_OPTIONS section based on the value we are
- using. */
-
-static boolean
-mips_elf64_section_processing (abfd, hdr)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
-{
- if (hdr->sh_type == SHT_MIPS_OPTIONS
- && hdr->bfd_section != NULL
- && elf_section_data (hdr->bfd_section) != NULL
- && elf_section_data (hdr->bfd_section)->tdata != NULL)
- {
- bfd_byte *contents, *l, *lend;
-
- /* We stored the section contents in the elf_section_data tdata
- field in the set_section_contents routine. We save the
- section contents so that we don't have to read them again.
- At this point we know that elf_gp is set, so we can look
- through the section contents to see if there is an
- ODK_REGINFO structure. */
-
- contents = (bfd_byte *) elf_section_data (hdr->bfd_section)->tdata;
- l = contents;
- lend = contents + hdr->sh_size;
- while (l + sizeof (Elf_External_Options) <= lend)
- {
- Elf_Internal_Options intopt;
-
- bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l,
- &intopt);
- if (intopt.kind == ODK_REGINFO)
- {
- bfd_byte buf[8];
-
- if (bfd_seek (abfd,
- (hdr->sh_offset
- + (l - contents)
- + sizeof (Elf_External_Options)
- + (sizeof (Elf64_External_RegInfo) - 8)),
- SEEK_SET) == -1)
- return false;
- bfd_h_put_64 (abfd, elf_gp (abfd), buf);
- if (bfd_write (buf, 1, 8, abfd) != 8)
- return false;
- }
- l += intopt.size;
- }
- }
-
- return _bfd_mips_elf_section_processing (abfd, hdr);
-}
-
/* Irix 6 defines a brand new archive map format, so that they can
have archives more than 4 GB in size. */
@@ -2108,6 +2081,8 @@ const struct elf_size_info mips_elf64_size_info =
sizeof (Elf64_External_Sym),
sizeof (Elf64_External_Dyn),
sizeof (Elf_External_Note),
+ 4, /* hash-table entry size */
+ 3, /* internal relocations per external relocations */
64, /* arch_size */
8, /* file_align */
ELFCLASS64,
@@ -2118,7 +2093,12 @@ const struct elf_size_info mips_elf64_size_info =
bfd_elf64_swap_symbol_out,
mips_elf64_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
- bfd_elf64_swap_dyn_in
+ bfd_elf64_swap_dyn_in,
+ bfd_elf64_swap_dyn_out,
+ mips_elf64_be_swap_reloc_in,
+ mips_elf64_be_swap_reloc_out,
+ mips_elf64_be_swap_reloca_in,
+ mips_elf64_be_swap_reloca_out
};
#define TARGET_LITTLE_SYM bfd_elf64_littlemips_vec
@@ -2127,29 +2107,67 @@ const struct elf_size_info mips_elf64_size_info =
#define TARGET_BIG_NAME "elf64-bigmips"
#define ELF_ARCH bfd_arch_mips
#define ELF_MACHINE_CODE EM_MIPS
+
#define ELF_MAXPAGESIZE 0x1000
+
+#define elf_backend_collect true
+#define elf_backend_type_change_ok true
+#define elf_backend_can_gc_sections true
#define elf_backend_size_info mips_elf64_size_info
#define elf_backend_object_p _bfd_mips_elf_object_p
-#define elf_backend_section_from_shdr mips_elf64_section_from_shdr
+#define elf_backend_section_from_shdr _bfd_mips_elf_section_from_shdr
#define elf_backend_fake_sections _bfd_mips_elf_fake_sections
#define elf_backend_section_from_bfd_section \
_bfd_mips_elf_section_from_bfd_section
-#define elf_backend_section_processing mips_elf64_section_processing
+#define elf_backend_section_processing _bfd_mips_elf_section_processing
#define elf_backend_symbol_processing _bfd_mips_elf_symbol_processing
+#define elf_backend_additional_program_headers \
+ _bfd_mips_elf_additional_program_headers
+#define elf_backend_modify_segment_map _bfd_mips_elf_modify_segment_map
#define elf_backend_final_write_processing \
_bfd_mips_elf_final_write_processing
#define elf_backend_ecoff_debug_swap &mips_elf64_ecoff_debug_swap
-
+#define elf_backend_add_symbol_hook _bfd_mips_elf_add_symbol_hook
+#define elf_backend_create_dynamic_sections \
+ _bfd_mips_elf_create_dynamic_sections
+#define elf_backend_check_relocs _bfd_mips_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol \
+ _bfd_mips_elf_adjust_dynamic_symbol
+#define elf_backend_always_size_sections \
+ _bfd_mips_elf_always_size_sections
+#define elf_backend_size_dynamic_sections \
+ _bfd_mips_elf_size_dynamic_sections
+#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
+#define elf_backend_link_output_symbol_hook \
+ _bfd_mips_elf_link_output_symbol_hook
+#define elf_backend_finish_dynamic_symbol \
+ _bfd_mips_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections \
+ _bfd_mips_elf_finish_dynamic_sections
+#define elf_backend_gc_mark_hook _bfd_mips_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook _bfd_mips_elf_gc_sweep_hook
+#define elf_backend_got_header_size (4*MIPS_RESERVED_GOTNO)
+#define elf_backend_plt_header_size 0
+#define elf_backend_may_use_rel_p 1
+
+/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
+ MIPS-specific function only applies to IRIX5, which had no 64-bit
+ ABI. */
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
-#define bfd_elf64_get_reloc_upper_bound mips_elf64_get_reloc_upper_bound
-#define bfd_elf64_bfd_reloc_type_lookup mips_elf64_reloc_type_lookup
#define bfd_elf64_set_section_contents _bfd_mips_elf_set_section_contents
+#define bfd_elf64_bfd_link_hash_table_create \
+ _bfd_mips_elf_link_hash_table_create
+#define bfd_elf64_bfd_final_link _bfd_mips_elf_final_link
#define bfd_elf64_bfd_copy_private_bfd_data \
_bfd_mips_elf_copy_private_bfd_data
#define bfd_elf64_bfd_merge_private_bfd_data \
_bfd_mips_elf_merge_private_bfd_data
#define bfd_elf64_bfd_set_private_flags _bfd_mips_elf_set_private_flags
+#define bfd_elf64_bfd_print_private_bfd_data \
+ _bfd_mips_elf_print_private_bfd_data
+#define bfd_elf64_get_reloc_upper_bound mips_elf64_get_reloc_upper_bound
+#define bfd_elf64_bfd_reloc_type_lookup mips_elf64_reloc_type_lookup
#define bfd_elf64_archive_functions
#define bfd_elf64_archive_slurp_armap mips_elf64_slurp_armap
#define bfd_elf64_archive_slurp_extended_name_table \
diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c
index 85dabaa..46e7775 100644
--- a/contrib/binutils/bfd/elf64-sparc.c
+++ b/contrib/binutils/bfd/elf64-sparc.c
@@ -1,5 +1,6 @@
/* SPARC-specific support for 64-bit ELF
- Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1993, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -32,6 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */
#define MINUS_ONE (~ (bfd_vma) 0)
+static struct bfd_link_hash_table * sparc64_elf_bfd_link_hash_table_create
+ PARAMS((bfd *));
static reloc_howto_type *sparc64_elf_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void sparc64_elf_info_to_howto
@@ -51,8 +54,13 @@ static boolean sparc64_elf_adjust_dynamic_symbol
PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *));
static boolean sparc64_elf_size_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
-static boolean sparc64_elf_adjust_dynindx
- PARAMS((struct elf_link_hash_entry *, PTR));
+static int sparc64_elf_get_symbol_type
+ PARAMS (( Elf_Internal_Sym *, int));
+static boolean sparc64_elf_add_symbol_hook
+ PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+ const char **, flagword *, asection **, bfd_vma *));
+static void sparc64_elf_symbol_processing
+ PARAMS ((bfd *, asymbol *));
static boolean sparc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
@@ -61,6 +69,15 @@ static boolean sparc64_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static boolean sparc64_elf_object_p PARAMS ((bfd *));
+static long sparc64_elf_get_reloc_upper_bound PARAMS ((bfd *, asection *));
+static long sparc64_elf_get_dynamic_reloc_upper_bound PARAMS ((bfd *));
+static boolean sparc64_elf_slurp_one_reloc_table
+ PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, asymbol **, boolean));
+static boolean sparc64_elf_slurp_reloc_table
+ PARAMS ((bfd *, asection *, asymbol **, boolean));
+static long sparc64_elf_canonicalize_dynamic_reloc
+ PARAMS ((bfd *, arelent **, asymbol **));
+static void sparc64_elf_write_relocs PARAMS ((bfd *, asection *, PTR));
/* The relocation "howto" table. */
@@ -137,7 +154,7 @@ static reloc_howto_type sparc64_elf_howto_table[] =
};
struct elf_reloc_map {
- unsigned char bfd_reloc_val;
+ bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
@@ -213,10 +230,428 @@ sparc64_elf_info_to_howto (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf64_Internal_Rela *dst;
{
- BFD_ASSERT (ELF64_R_TYPE (dst->r_info) < (unsigned int) R_SPARC_max);
- cache_ptr->howto = &sparc64_elf_howto_table[ELF64_R_TYPE (dst->r_info)];
+ BFD_ASSERT (ELF64_R_TYPE_ID (dst->r_info) < (unsigned int) R_SPARC_max_std);
+ cache_ptr->howto = &sparc64_elf_howto_table[ELF64_R_TYPE_ID (dst->r_info)];
}
+/* 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;
+ asection *sec;
+{
+ return (sec->reloc_count * 2 + 1) * sizeof (arelent *);
+}
+
+static long
+sparc64_elf_get_dynamic_reloc_upper_bound (abfd)
+ bfd *abfd;
+{
+ return _bfd_elf_get_dynamic_reloc_upper_bound (abfd) * 2;
+}
+
+/* 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. */
+
+static boolean
+sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
+ bfd *abfd;
+ asection *asect;
+ Elf_Internal_Shdr *rel_hdr;
+ asymbol **symbols;
+ boolean dynamic;
+{
+ struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
+ PTR allocated = NULL;
+ bfd_byte *native_relocs;
+ arelent *relent;
+ unsigned int i;
+ int entsize;
+ bfd_size_type count;
+ arelent *relents;
+
+ allocated = (PTR) bfd_malloc ((size_t) rel_hdr->sh_size);
+ if (allocated == NULL)
+ goto error_return;
+
+ if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0
+ || (bfd_read (allocated, 1, rel_hdr->sh_size, abfd)
+ != rel_hdr->sh_size))
+ goto error_return;
+
+ native_relocs = (bfd_byte *) allocated;
+
+ relents = asect->relocation + asect->reloc_count;
+
+ 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;
+ i++, relent++, native_relocs += entsize)
+ {
+ Elf_Internal_Rela rela;
+
+ bfd_elf64_swap_reloca_in (abfd, (Elf64_External_Rela *) native_relocs, &rela);
+
+ /* The address of an ELF reloc is section relative for an object
+ file, and absolute for an executable file or shared library.
+ The address of a normal BFD reloc is always section relative,
+ and the address of a dynamic reloc is absolute.. */
+ if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0 || dynamic)
+ relent->address = rela.r_offset;
+ else
+ relent->address = rela.r_offset - asect->vma;
+
+ if (ELF64_R_SYM (rela.r_info) == 0)
+ relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+ else
+ {
+ asymbol **ps, *s;
+
+ ps = symbols + ELF64_R_SYM (rela.r_info) - 1;
+ s = *ps;
+
+ /* Canonicalize ELF section symbols. FIXME: Why? */
+ if ((s->flags & BSF_SECTION_SYM) == 0)
+ relent->sym_ptr_ptr = ps;
+ else
+ relent->sym_ptr_ptr = s->section->symbol_ptr_ptr;
+ }
+
+ relent->addend = rela.r_addend;
+
+ BFD_ASSERT (ELF64_R_TYPE_ID (rela.r_info) < (unsigned int) R_SPARC_max_std);
+ if (ELF64_R_TYPE_ID (rela.r_info) == R_SPARC_OLO10)
+ {
+ relent->howto = &sparc64_elf_howto_table[R_SPARC_LO10];
+ relent[1].address = relent->address;
+ relent++;
+ relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+ relent->addend = ELF64_R_TYPE_DATA (rela.r_info);
+ relent->howto = &sparc64_elf_howto_table[R_SPARC_13];
+ }
+ else
+ relent->howto = &sparc64_elf_howto_table[ELF64_R_TYPE_ID (rela.r_info)];
+ }
+
+ asect->reloc_count += relent - relents;
+
+ if (allocated != NULL)
+ free (allocated);
+
+ return true;
+
+ error_return:
+ if (allocated != NULL)
+ free (allocated);
+ return false;
+}
+
+/* Read in and swap the external relocs. */
+
+static boolean
+sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
+ bfd *abfd;
+ asection *asect;
+ asymbol **symbols;
+ boolean dynamic;
+{
+ struct bfd_elf_section_data * const d = elf_section_data (asect);
+ Elf_Internal_Shdr *rel_hdr;
+ Elf_Internal_Shdr *rel_hdr2;
+
+ if (asect->relocation != NULL)
+ return true;
+
+ if (! dynamic)
+ {
+ if ((asect->flags & SEC_RELOC) == 0
+ || asect->reloc_count == 0)
+ return true;
+
+ rel_hdr = &d->rel_hdr;
+ rel_hdr2 = d->rel_hdr2;
+
+ BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset
+ || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset));
+ }
+ else
+ {
+ /* Note that ASECT->RELOC_COUNT tends not to be accurate in this
+ case because relocations against this section may use the
+ dynamic symbol table, and in that case bfd_section_from_shdr
+ in elf.c does not update the RELOC_COUNT. */
+ if (asect->_raw_size == 0)
+ return true;
+
+ rel_hdr = &d->this_hdr;
+ asect->reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ rel_hdr2 = NULL;
+ }
+
+ 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
+ && !sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr2, symbols,
+ dynamic))
+ return false;
+
+ return true;
+}
+
+/* Canonicalize the dynamic relocation entries. Note that we return
+ the dynamic relocations as a single block, although they are
+ actually associated with particular sections; the interface, which
+ was designed for SunOS style shared libraries, expects that there
+ is only one set of dynamic relocs. Any section that was actually
+ installed in the BFD, and has type SHT_REL or SHT_RELA, and uses
+ the dynamic symbol table, is considered to be a dynamic reloc
+ section. */
+
+static long
+sparc64_elf_canonicalize_dynamic_reloc (abfd, storage, syms)
+ bfd *abfd;
+ arelent **storage;
+ asymbol **syms;
+{
+ asection *s;
+ long ret;
+
+ if (elf_dynsymtab (abfd) == 0)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return -1;
+ }
+
+ ret = 0;
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
+ && (elf_section_data (s)->this_hdr.sh_type == SHT_RELA))
+ {
+ arelent *p;
+ long count, i;
+
+ if (! sparc64_elf_slurp_reloc_table (abfd, s, syms, true))
+ return -1;
+ count = s->reloc_count;
+ p = s->relocation;
+ for (i = 0; i < count; i++)
+ *storage++ = p++;
+ ret += count;
+ }
+ }
+
+ *storage = NULL;
+
+ return ret;
+}
+
+/* Write out the relocs. */
+
+static void
+sparc64_elf_write_relocs (abfd, sec, data)
+ bfd *abfd;
+ asection *sec;
+ PTR data;
+{
+ boolean *failedp = (boolean *) data;
+ Elf_Internal_Shdr *rela_hdr;
+ Elf64_External_Rela *outbound_relocas, *src_rela;
+ unsigned int idx, count;
+ asymbol *last_sym = 0;
+ int last_sym_idx = 0;
+
+ /* If we have already failed, don't do anything. */
+ if (*failedp)
+ return;
+
+ if ((sec->flags & SEC_RELOC) == 0)
+ return;
+
+ /* The linker backend writes the relocs out itself, and sets the
+ reloc_count field to zero to inhibit writing them here. Also,
+ sometimes the SEC_RELOC flag gets set even when there aren't any
+ relocs. */
+ if (sec->reloc_count == 0)
+ return;
+
+ /* We can combine two relocs that refer to the same address
+ into R_SPARC_OLO10 if first one is R_SPARC_LO10 and the
+ latter is R_SPARC_13 with no associated symbol. */
+ count = 0;
+ for (idx = 0; idx < sec->reloc_count; idx++)
+ {
+ bfd_vma addr;
+ unsigned int i;
+
+ ++count;
+
+ addr = sec->orelocation[idx]->address;
+ if (sec->orelocation[idx]->howto->type == R_SPARC_LO10
+ && idx < sec->reloc_count - 1)
+ {
+ arelent *r = sec->orelocation[idx + 1];
+
+ if (r->howto->type == R_SPARC_13
+ && r->address == addr
+ && bfd_is_abs_section ((*r->sym_ptr_ptr)->section)
+ && (*r->sym_ptr_ptr)->value == 0)
+ ++idx;
+ }
+ }
+
+ rela_hdr = &elf_section_data (sec)->rel_hdr;
+
+ rela_hdr->sh_size = rela_hdr->sh_entsize * count;
+ rela_hdr->contents = (PTR) bfd_alloc (abfd, rela_hdr->sh_size);
+ if (rela_hdr->contents == NULL)
+ {
+ *failedp = true;
+ return;
+ }
+
+ /* Figure out whether the relocations are RELA or REL relocations. */
+ if (rela_hdr->sh_type != SHT_RELA)
+ abort ();
+
+ /* orelocation has the data, reloc_count has the count... */
+ outbound_relocas = (Elf64_External_Rela *) rela_hdr->contents;
+ src_rela = outbound_relocas;
+
+ for (idx = 0; idx < sec->reloc_count; idx++)
+ {
+ Elf_Internal_Rela dst_rela;
+ arelent *ptr;
+ asymbol *sym;
+ int n;
+
+ ptr = sec->orelocation[idx];
+
+ /* The address of an ELF reloc is section relative for an object
+ file, and absolute for an executable file or shared library.
+ The address of a BFD reloc is always section relative. */
+ if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
+ dst_rela.r_offset = ptr->address;
+ else
+ dst_rela.r_offset = ptr->address + sec->vma;
+
+ sym = *ptr->sym_ptr_ptr;
+ if (sym == last_sym)
+ n = last_sym_idx;
+ else if (bfd_is_abs_section (sym->section) && sym->value == 0)
+ n = STN_UNDEF;
+ else
+ {
+ last_sym = sym;
+ n = _bfd_elf_symbol_from_bfd_symbol (abfd, &sym);
+ if (n < 0)
+ {
+ *failedp = true;
+ return;
+ }
+ last_sym_idx = n;
+ }
+
+ if ((*ptr->sym_ptr_ptr)->the_bfd != NULL
+ && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec
+ && ! _bfd_elf_validate_reloc (abfd, ptr))
+ {
+ *failedp = true;
+ return;
+ }
+
+ if (ptr->howto->type == R_SPARC_LO10
+ && idx < sec->reloc_count - 1)
+ {
+ arelent *r = sec->orelocation[idx + 1];
+
+ if (r->howto->type == R_SPARC_13
+ && r->address == ptr->address
+ && bfd_is_abs_section ((*r->sym_ptr_ptr)->section)
+ && (*r->sym_ptr_ptr)->value == 0)
+ {
+ idx++;
+ dst_rela.r_info
+ = ELF64_R_INFO (n, ELF64_R_TYPE_INFO (r->addend,
+ R_SPARC_OLO10));
+ }
+ else
+ dst_rela.r_info = ELF64_R_INFO (n, R_SPARC_LO10);
+ }
+ else
+ dst_rela.r_info = ELF64_R_INFO (n, ptr->howto->type);
+
+ dst_rela.r_addend = ptr->addend;
+ bfd_elf64_swap_reloca_out (abfd, &dst_rela, src_rela);
+ ++src_rela;
+ }
+}
+
+/* Sparc64 ELF linker hash table. */
+
+struct sparc64_elf_app_reg
+{
+ unsigned char bind;
+ unsigned short shndx;
+ bfd *abfd;
+ char *name;
+};
+
+struct sparc64_elf_link_hash_table
+{
+ struct elf_link_hash_table root;
+
+ struct sparc64_elf_app_reg app_regs [4];
+};
+
+/* Get the Sparc64 ELF linker hash table from a link_info structure. */
+
+#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 *
+sparc64_elf_bfd_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct sparc64_elf_link_hash_table *ret;
+
+ ret = ((struct sparc64_elf_link_hash_table *)
+ bfd_zalloc (abfd, sizeof (struct sparc64_elf_link_hash_table)));
+ if (ret == (struct sparc64_elf_link_hash_table *) NULL)
+ return NULL;
+
+ if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
+ _bfd_elf_link_hash_newfunc))
+ {
+ bfd_release (abfd, ret);
+ return NULL;
+ }
+
+ return &ret->root.root;
+}
+
+
/* Utility for performing the standard initial work of an instruction
relocation.
*PRELOCATION will contain the relocated item.
@@ -441,8 +876,8 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
/* sethi (. - plt0), %g1 */
sethi = 0x03000000 | (i * PLT_ENTRY_SIZE);
- /* ba,a,pt %icc, plt1 */
- ba = 0x30480000 | (((contents+PLT_ENTRY_SIZE) - (entry+4)) / 4 & 0x7ffff);
+ /* ba,a,pt %xcc, plt1 */
+ ba = 0x30680000 | (((contents+PLT_ENTRY_SIZE) - (entry+4)) / 4 & 0x7ffff);
bfd_put_32 (output_bfd, sethi, entry);
bfd_put_32 (output_bfd, ba, entry+4);
@@ -479,7 +914,7 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
bfd_put_32 (output_bfd, 0x83c3c001, entry+16); /* jmpl %o7+%g1,%g1 */
bfd_put_32 (output_bfd, 0x9e100005, entry+20); /* mov %g5,%o7 */
- bfd_put_64 (output_bfd, contents - entry+4, ptr);
+ bfd_put_64 (output_bfd, contents - (entry+4), ptr);
}
}
}
@@ -514,11 +949,15 @@ sparc64_elf_plt_ptr_offset (index, max)
/* See above for details. */
- block = (index - LARGE_PLT_THRESHOLD) / 160;
- ofs = (index - LARGE_PLT_THRESHOLD) % 160;
- last = (max - LARGE_PLT_THRESHOLD) % 160;
+ block = (((index - LARGE_PLT_THRESHOLD) / 160) * 160)
+ + LARGE_PLT_THRESHOLD;
+ ofs = index - block;
+ if (block + 160 > max)
+ last = (max - LARGE_PLT_THRESHOLD) % 160;
+ else
+ last = 160;
- return ((LARGE_PLT_THRESHOLD + block*160) * PLT_ENTRY_SIZE
+ return (block * PLT_ENTRY_SIZE
+ last * 6*4
+ ofs * 8);
}
@@ -570,7 +1009,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- switch (ELF64_R_TYPE (rel->r_info))
+ switch (ELF64_R_TYPE_ID (rel->r_info))
{
case R_SPARC_GOT10:
case R_SPARC_GOT13:
@@ -612,12 +1051,12 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- if (h->got_offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1)
{
/* We have already allocated space in the .got. */
break;
}
- h->got_offset = sgot->_raw_size;
+ h->got.offset = sgot->_raw_size;
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@@ -807,16 +1246,233 @@ 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 (rel->r_info));
+ ELF64_R_TYPE_ID (rel->r_info));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/* Hook called by the linker routine which adds symbols from an object
+ file. We use it for STT_REGISTER symbols. */
+
+static boolean
+sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ const Elf_Internal_Sym *sym;
+ const char **namep;
+ flagword *flagsp;
+ asection **secp;
+ bfd_vma *valp;
+{
+ static char *stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
+
+ if (ELF_ST_TYPE (sym->st_info) == STT_REGISTER)
+ {
+ int reg;
+ struct sparc64_elf_app_reg *p;
+
+ reg = (int)sym->st_value;
+ switch (reg & ~1)
+ {
+ case 2: reg -= 2; break;
+ case 6: reg -= 4; break;
+ default:
+ (*_bfd_error_handler)
+ (_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
+ bfd_get_filename (abfd));
+ return false;
+ }
+
+ if (info->hash->creator != abfd->xvec
+ || (abfd->flags & DYNAMIC) != 0)
+ {
+ /* STT_REGISTER only works when linking an elf64_sparc object.
+ If STT_REGISTER comes from a dynamic object, don't put it into
+ the output bfd. The dynamic linker will recheck it. */
+ *namep = NULL;
+ return true;
+ }
+
+ p = sparc64_elf_hash_table(info)->app_regs + reg;
+
+ if (p->name != NULL && strcmp (p->name, *namep))
+ {
+ (*_bfd_error_handler)
+ (_("Register %%g%d used incompatibly: "
+ "previously declared in %s to %s, in %s redefined to %s"),
+ (int)sym->st_value,
+ bfd_get_filename (p->abfd), *p->name ? p->name : "#scratch",
+ bfd_get_filename (abfd), **namep ? *namep : "#scratch");
return false;
}
+
+ if (p->name == NULL)
+ {
+ if (**namep)
+ {
+ struct elf_link_hash_entry *h;
+
+ h = (struct elf_link_hash_entry *)
+ bfd_link_hash_lookup (info->hash, *namep, false, false, false);
+
+ if (h != NULL)
+ {
+ unsigned char type = h->type;
+
+ if (type > STT_FUNC) type = 0;
+ (*_bfd_error_handler)
+ (_("Symbol `%s' has differing types: "
+ "previously %s, REGISTER in %s"),
+ *namep, stt_types [type], bfd_get_filename (abfd));
+ return false;
+ }
+
+ p->name = bfd_hash_allocate (&info->hash->table,
+ strlen (*namep) + 1);
+ if (!p->name)
+ return false;
+
+ strcpy (p->name, *namep);
+ }
+ else
+ p->name = "";
+ p->bind = ELF_ST_BIND (sym->st_info);
+ p->abfd = abfd;
+ p->shndx = sym->st_shndx;
+ }
+ else
+ {
+ if (p->bind == STB_WEAK
+ && ELF_ST_BIND (sym->st_info) == STB_GLOBAL)
+ {
+ p->bind = STB_GLOBAL;
+ p->abfd = abfd;
+ }
+ }
+ *namep = NULL;
+ return true;
}
+ else if (! *namep || ! **namep)
+ return true;
+ else
+ {
+ int i;
+ struct sparc64_elf_app_reg *p;
+ p = sparc64_elf_hash_table(info)->app_regs;
+ for (i = 0; i < 4; i++, p++)
+ if (p->name != NULL && ! strcmp (p->name, *namep))
+ {
+ unsigned char type = ELF_ST_TYPE (sym->st_info);
+
+ if (type > STT_FUNC) type = 0;
+ (*_bfd_error_handler)
+ (_("Symbol `%s' has differing types: "
+ "REGISTER in %s, %s in %s"),
+ *namep, bfd_get_filename (p->abfd), stt_types [type],
+ bfd_get_filename (abfd));
+ return false;
+ }
+ }
return true;
}
+/* This function takes care of emiting STT_REGISTER symbols
+ which we cannot easily keep in the symbol hash table. */
+
+static boolean
+sparc64_elf_output_arch_syms (output_bfd, info, finfo, func)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ PTR finfo;
+ boolean (*func) PARAMS ((PTR, const char *,
+ Elf_Internal_Sym *, asection *));
+{
+ int reg;
+ struct sparc64_elf_app_reg *app_regs =
+ sparc64_elf_hash_table(info)->app_regs;
+ Elf_Internal_Sym sym;
+
+ /* We arranged in size_dynamic_sections to put the STT_REGISTER entries
+ at the end of the dynlocal list, so they came at the end of the local
+ symbols in the symtab. Except that they aren't STB_LOCAL, so we need
+ to back up symtab->sh_info. */
+ if (elf_hash_table (info)->dynlocal)
+ {
+ bfd * dynobj = elf_hash_table (info)->dynobj;
+ asection *dynsymsec = bfd_get_section_by_name (dynobj, ".dynsym");
+ struct elf_link_local_dynamic_entry *e;
+
+ for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
+ if (e->input_indx == -1)
+ break;
+ if (e)
+ {
+ elf_section_data (dynsymsec->output_section)->this_hdr.sh_info
+ = e->dynindx;
+ }
+ }
+
+ if (info->strip == strip_all)
+ return true;
+
+ for (reg = 0; reg < 4; reg++)
+ if (app_regs [reg].name != NULL)
+ {
+ if (info->strip == strip_some
+ && bfd_hash_lookup (info->keep_hash,
+ app_regs [reg].name,
+ false, false) == NULL)
+ continue;
+
+ sym.st_value = reg < 2 ? reg + 2 : reg + 4;
+ sym.st_size = 0;
+ sym.st_other = 0;
+ sym.st_info = ELF_ST_INFO (app_regs [reg].bind, STT_REGISTER);
+ sym.st_shndx = app_regs [reg].shndx;
+ if (! (*func) (finfo, app_regs [reg].name, &sym,
+ sym.st_shndx == SHN_ABS
+ ? bfd_abs_section_ptr : bfd_und_section_ptr))
+ return false;
+ }
+
+ return true;
+}
+
+static int
+sparc64_elf_get_symbol_type (elf_sym, type)
+ Elf_Internal_Sym * elf_sym;
+ int type;
+{
+ if (ELF_ST_TYPE (elf_sym->st_info) == STT_REGISTER)
+ return STT_REGISTER;
+ else
+ return type;
+}
+
+/* A STB_GLOBAL,STT_REGISTER symbol should be BSF_GLOBAL
+ even in SHN_UNDEF section. */
+
+static void
+sparc64_elf_symbol_processing (abfd, asym)
+ bfd *abfd;
+ asymbol *asym;
+{
+ elf_symbol_type *elfsym;
+
+ elfsym = (elf_symbol_type *) asym;
+ if (elfsym->internal_elf_sym.st_info
+ == ELF_ST_INFO (STB_GLOBAL, STT_REGISTER))
+ {
+ asym->flags |= BSF_GLOBAL;
+ }
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -890,7 +1546,7 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
}
/* To simplify matters later, just store the plt index here. */
- h->plt_offset = s->_raw_size / PLT_ENTRY_SIZE;
+ h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
@@ -1097,15 +1753,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (strip)
{
- asection **spp;
-
- for (spp = &s->output_section->owner->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --s->output_section->owner->section_count;
-
+ _bfd_strip_section_from_output (info, s);
continue;
}
@@ -1124,6 +1772,11 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
must add the entries now so that we get the correct size for
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
+ int reg;
+ struct sparc64_elf_app_reg * app_regs;
+ struct bfd_strtab_hash *dynstr;
+ struct elf_link_hash_table *eht = elf_hash_table (info);
+
if (! info->shared)
{
if (! bfd_elf64_add_dynamic_entry (info, DT_DEBUG, 0))
@@ -1135,9 +1788,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (! bfd_elf64_add_dynamic_entry (info, DT_PLTGOT, 0)
|| ! bfd_elf64_add_dynamic_entry (info, DT_PLTRELSZ, 0)
|| ! bfd_elf64_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
- || ! bfd_elf64_add_dynamic_entry (info, DT_JMPREL, 0)
- || ! bfd_elf64_add_dynamic_entry (info, DT_SPARC_PLTFMT,
- (info->shared != 0) + 1))
+ || ! bfd_elf64_add_dynamic_entry (info, DT_JMPREL, 0))
return false;
}
@@ -1152,56 +1803,57 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
}
- }
-
- /* If we are generating a shared library, we generate a section
- symbol for each output section for which we might need to copy
- relocs. These are local symbols, which means that they must come
- first in the dynamic symbol table. That means we must increment
- the dynamic symbol index of every other dynamic symbol. */
- if (info->shared)
- {
- int c;
- c = 0;
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LINKER_CREATED) != 0
- || (s->flags & SEC_ALLOC) == 0)
- continue;
-
- elf_section_data (s)->dynindx = c + 1;
+ /* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER
+ entries if needed. */
+ app_regs = sparc64_elf_hash_table (info)->app_regs;
+ dynstr = eht->dynstr;
- /* These symbols will have no names, so we don't need to
- fiddle with dynstr_index. */
+ for (reg = 0; reg < 4; reg++)
+ 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;
- ++c;
- }
+ entry = (struct elf_link_local_dynamic_entry *)
+ bfd_hash_allocate (&info->hash->table, sizeof (*entry));
+ if (entry == NULL)
+ return false;
- elf_link_hash_traverse (elf_hash_table (info),
- sparc64_elf_adjust_dynindx,
- (PTR) &c);
- elf_hash_table (info)->dynsymcount += c;
+ /* We cheat here a little bit: the symbol will not be local, so we
+ put it at the end of the dynlocal linked list. We will fix it
+ later on, as we have to fix other fields anyway. */
+ entry->isym.st_value = reg < 2 ? reg + 2 : reg + 4;
+ entry->isym.st_size = 0;
+ if (*app_regs [reg].name != '\0')
+ entry->isym.st_name
+ = _bfd_stringtab_add (dynstr, app_regs[reg].name, true, false);
+ else
+ entry->isym.st_name = 0;
+ entry->isym.st_other = 0;
+ entry->isym.st_info = ELF_ST_INFO (app_regs [reg].bind,
+ STT_REGISTER);
+ entry->isym.st_shndx = app_regs [reg].shndx;
+ entry->next = NULL;
+ entry->input_bfd = output_bfd;
+ entry->input_indx = -1;
+
+ if (eht->dynlocal == NULL)
+ eht->dynlocal = entry;
+ else
+ {
+ for (e = eht->dynlocal; e->next; e = e->next)
+ ;
+ e->next = entry;
+ }
+ eht->dynsymcount++;
+ }
}
return true;
}
-
-/* Increment the index of a dynamic symbol by a given amount. Called
- via elf_link_hash_traverse. */
-
-static boolean
-sparc64_elf_adjust_dynindx (h, cparg)
- struct elf_link_hash_entry *h;
- PTR cparg;
-{
- int *cp = (int *) cparg;
-
- if (h->dynindx != -1)
- h->dynindx += *cp;
- return true;
-}
-
/* Relocate a SPARC64 ELF section. */
@@ -1253,8 +1905,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
bfd_reloc_status_type r;
- r_type = ELF64_R_TYPE (rel->r_info);
- if (r_type < 0 || r_type >= (int) R_SPARC_max)
+ r_type = ELF64_R_TYPE_ID (rel->r_info);
+ if (r_type < 0 || r_type >= (int) R_SPARC_max_std)
{
bfd_set_error (bfd_error_bad_value);
return false;
@@ -1316,7 +1968,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_PCPLT22:
case R_SPARC_PCPLT10:
case R_SPARC_PLT64:
- if (h->plt_offset != (bfd_vma) -1)
+ if (h->plt.offset != (bfd_vma) -1)
skip_it = true;
break;
@@ -1397,13 +2049,14 @@ sparc64_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)
+ else if (info->shared && !info->symbolic && !info->no_undefined)
relocation = 0;
else
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
- input_section, rel->r_offset)))
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined))))
return false;
relocation = 0;
}
@@ -1539,7 +2192,11 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
& ELF_LINK_HASH_DEF_REGULAR) == 0))
{
BFD_ASSERT (h->dynindx != -1);
- outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
+ outrel.r_info
+ = ELF64_R_INFO (h->dynindx,
+ ELF64_R_TYPE_INFO (
+ ELF64_R_TYPE_DATA (rel->r_info),
+ r_type));
outrel.r_addend = rel->r_addend;
}
else
@@ -1582,14 +2239,18 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
BFD_FAIL ();
(*_bfd_error_handler)
- ("%s: probably compiled without -fPIC?",
+ (_("%s: probably compiled without -fPIC?"),
bfd_get_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
}
- outrel.r_info = ELF64_R_INFO (indx, r_type);
+ outrel.r_info
+ = ELF64_R_INFO (indx,
+ ELF64_R_TYPE_INFO (
+ ELF64_R_TYPE_DATA (rel->r_info),
+ r_type));
outrel.r_addend = relocation + rel->r_addend;
}
}
@@ -1605,7 +2266,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
reloc in an unallocated section. */
if (skip
|| (input_section->flags & SEC_ALLOC) != 0
- || ELF64_R_TYPE (outrel.r_info) != R_SPARC_RELATIVE)
+ || ELF64_R_TYPE_ID (outrel.r_info) != R_SPARC_RELATIVE)
continue;
}
break;
@@ -1627,7 +2288,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (h != NULL)
{
- bfd_vma off = h->got_offset;
+ bfd_vma off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
if (! elf_hash_table (info)->dynamic_sections_created
@@ -1654,7 +2315,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_put_64 (output_bfd, relocation,
sgot->contents + off);
- h->got_offset |= 1;
+ h->got.offset |= 1;
}
}
relocation = sgot->output_offset + off - got_base;
@@ -1715,7 +2376,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
procedure linkage table. */
BFD_ASSERT (h != NULL);
- if (h->plt_offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1)
{
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
@@ -1731,7 +2392,7 @@ 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));
+ + sparc64_elf_plt_entry_offset (h->plt.offset));
goto do_default;
case R_SPARC_OLO10:
@@ -1747,6 +2408,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r = bfd_check_overflow (howto->complain_on_overflow,
howto->bitsize, howto->rightshift,
+ bfd_arch_bits_per_address (input_bfd),
relocation);
}
break;
@@ -1768,6 +2430,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r = bfd_check_overflow (howto->complain_on_overflow,
howto->bitsize, howto->rightshift,
+ bfd_arch_bits_per_address (input_bfd),
relocation);
}
break;
@@ -1785,6 +2448,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r = bfd_check_overflow (howto->complain_on_overflow,
howto->bitsize, howto->rightshift,
+ bfd_arch_bits_per_address (input_bfd),
relocation);
}
break;
@@ -1877,7 +2541,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
dynobj = elf_hash_table (info)->dynobj;
- if (h->plt_offset != (bfd_vma) -1)
+ if (h->plt.offset != (bfd_vma) -1)
{
asection *splt;
asection *srela;
@@ -1893,22 +2557,24 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Fill in the entry in the .rela.plt section. */
- if (h->plt_offset < LARGE_PLT_THRESHOLD)
+ if (h->plt.offset < LARGE_PLT_THRESHOLD)
{
- rela.r_offset = sparc64_elf_plt_entry_offset (h->plt_offset);
+ rela.r_offset = sparc64_elf_plt_entry_offset (h->plt.offset);
rela.r_addend = 0;
}
else
{
int max = splt->_raw_size / PLT_ENTRY_SIZE;
- rela.r_offset = sparc64_elf_plt_ptr_offset (h->plt_offset, max);
- rela.r_addend = -(sparc64_elf_plt_entry_offset (h->plt_offset) + 4);
+ rela.r_offset = sparc64_elf_plt_ptr_offset (h->plt.offset, max);
+ rela.r_addend = -(sparc64_elf_plt_entry_offset (h->plt.offset) + 4)
+ -(splt->output_section->vma + splt->output_offset);
}
+ rela.r_offset += (splt->output_section->vma + splt->output_offset);
rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_JMP_SLOT);
bfd_elf64_swap_reloca_out (output_bfd, &rela,
((Elf64_External_Rela *) srela->contents
- + h->plt_offset));
+ + h->plt.offset));
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
@@ -1918,7 +2584,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got_offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1)
{
asection *sgot;
asection *srela;
@@ -1932,7 +2598,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
rela.r_offset = (sgot->output_section->vma
+ sgot->output_offset
- + (h->got_offset &~ 1));
+ + (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
@@ -1951,7 +2617,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
else
{
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got_offset);
+ bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
rela.r_addend = 0;
}
@@ -2003,6 +2669,7 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
struct bfd_link_info *info;
{
bfd *dynobj;
+ int stt_regidx = -1;
asection *sdyn;
asection *sgot;
@@ -2033,6 +2700,17 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
case DT_PLTGOT: name = ".plt"; size = false; break;
case DT_PLTRELSZ: name = ".rela.plt"; size = true; break;
case DT_JMPREL: name = ".rela.plt"; size = false; break;
+ case DT_SPARC_REGISTER:
+ if (stt_regidx == -1)
+ {
+ stt_regidx =
+ _bfd_elf_link_lookup_local_dynindx (info, output_bfd, -1);
+ if (stt_regidx == -1)
+ return false;
+ }
+ dyn.d_un.d_val = stt_regidx++;
+ bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
+ /* fallthrough */
default: name = NULL; size = false; break;
}
@@ -2086,50 +2764,6 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 8;
- if (info->shared)
- {
- asection *sdynsym;
- asection *s;
- Elf_Internal_Sym sym;
- int c;
-
- /* Set up the section symbols for the output sections. */
-
- sdynsym = bfd_get_section_by_name (dynobj, ".dynsym");
- BFD_ASSERT (sdynsym != NULL);
-
- sym.st_size = 0;
- sym.st_name = 0;
- sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
- sym.st_other = 0;
-
- c = 0;
- for (s = output_bfd->sections; s != NULL; s = s->next)
- {
- int indx;
-
- if (elf_section_data (s)->dynindx == 0)
- continue;
-
- sym.st_value = s->vma;
-
- indx = elf_section_data (s)->this_idx;
- BFD_ASSERT (indx > 0);
- sym.st_shndx = indx;
-
- bfd_elf64_swap_symbol_out (output_bfd, &sym,
- (PTR) (((Elf64_External_Sym *)
- sdynsym->contents)
- + elf_section_data (s)->dynindx));
-
- ++c;
- }
-
- /* Set the sh_info field of the output .dynsym section to the
- index of the first global symbol. */
- elf_section_data (sdynsym->output_section)->this_hdr.sh_info = c + 1;
- }
-
return true;
}
@@ -2167,32 +2801,47 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = false;
- 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))
- {
- error = true;
- (*_bfd_error_handler)
- ("%s: linking UltraSPARC specific with HAL specific code",
- bfd_get_filename (ibfd));
- }
-
- /* Choose the most restrictive memory ordering */
- old_mm = (old_flags & EF_SPARCV9_MM);
- new_mm = (new_flags & EF_SPARCV9_MM);
- old_flags &= ~EF_SPARCV9_MM;
- new_flags &= ~EF_SPARCV9_MM;
- if (new_mm < old_mm) old_mm = new_mm;
- old_flags |= old_mm;
- new_flags |= old_mm;
+ 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));
+ }
+ 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))
+ {
+ error = true;
+ (*_bfd_error_handler)
+ (_("%s: linking UltraSPARC specific with HAL specific code"),
+ bfd_get_filename (ibfd));
+ }
+ /* Choose the most restrictive memory ordering. */
+ old_mm = (old_flags & EF_SPARCV9_MM);
+ new_mm = (new_flags & EF_SPARCV9_MM);
+ old_flags &= ~EF_SPARCV9_MM;
+ new_flags &= ~EF_SPARCV9_MM;
+ if (new_mm < old_mm)
+ old_mm = new_mm;
+ old_flags |= old_mm;
+ new_flags |= old_mm;
+ }
/* Warn about any other mismatches */
if (new_flags != old_flags)
{
error = true;
(*_bfd_error_handler)
- ("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
+ (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
}
@@ -2206,7 +2855,34 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
}
return true;
}
+
+/* Print a STT_REGISTER symbol to file FILE. */
+static const char *
+sparc64_elf_print_symbol_all (abfd, filep, symbol)
+ bfd *abfd;
+ 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;
+
+ reg = ((elf_symbol_type *) symbol)->internal_elf_sym.st_value;
+ type = symbol->flags;
+ fprintf (file, "REG_%c%c%11s%c%c R", "GOLI" [reg / 8], '0' + (reg & 7), "",
+ ((type & BSF_LOCAL)
+ ? (type & BSF_GLOBAL) ? '!' : 'l'
+ : (type & BSF_GLOBAL) ? 'g' : ' '),
+ (type & BSF_WEAK) ? 'w' : ' ');
+ if (symbol->name == NULL || symbol->name [0] == '\0')
+ return "#scratch";
+ else
+ return symbol->name;
+}
/* Set the right machine number for a SPARC64 ELF file. */
@@ -2221,19 +2897,78 @@ sparc64_elf_object_p (abfd)
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach);
}
+/* Relocations in the 64 bit SPARC ELF ABI are more complex than in
+ standard ELF, because R_SPARC_OLO10 has secondary addend in
+ ELF64_R_TYPE_DATA field. This structure is used to redirect the
+ relocation handling routines. */
+
+const struct elf_size_info sparc64_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),
+ 4, /* hash-table entry size */
+ /* 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. */
+ 1,
+ 64, /* arch_size */
+ 8, /* file_align */
+ ELFCLASS64,
+ EV_CURRENT,
+ bfd_elf64_write_out_phdrs,
+ bfd_elf64_write_shdrs_and_ehdr,
+ sparc64_elf_write_relocs,
+ bfd_elf64_swap_symbol_out,
+ sparc64_elf_slurp_reloc_table,
+ bfd_elf64_slurp_symbol_table,
+ bfd_elf64_swap_dyn_in,
+ bfd_elf64_swap_dyn_out,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
#define TARGET_BIG_SYM bfd_elf64_sparc_vec
#define TARGET_BIG_NAME "elf64-sparc"
#define ELF_ARCH bfd_arch_sparc
-#define ELF_MACHINE_CODE EM_SPARC64
#define ELF_MAXPAGESIZE 0x100000
+/* This is the official ABI value. */
+#define ELF_MACHINE_CODE EM_SPARCV9
+
+/* This is the value that we used before the ABI was released. */
+#define ELF_MACHINE_ALT1 EM_OLD_SPARCV9
+
+#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 \
+ sparc64_elf_get_reloc_upper_bound
+#define bfd_elf64_get_dynamic_reloc_upper_bound \
+ sparc64_elf_get_dynamic_reloc_upper_bound
+#define bfd_elf64_canonicalize_dynamic_reloc \
+ sparc64_elf_canonicalize_dynamic_reloc
#define bfd_elf64_bfd_reloc_type_lookup \
sparc64_elf_reloc_type_lookup
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections
+#define elf_backend_add_symbol_hook \
+ sparc64_elf_add_symbol_hook
+#define elf_backend_get_symbol_type \
+ sparc64_elf_get_symbol_type
+#define elf_backend_symbol_processing \
+ sparc64_elf_symbol_processing
#define elf_backend_check_relocs \
sparc64_elf_check_relocs
#define elf_backend_adjust_dynamic_symbol \
@@ -2246,10 +2981,16 @@ sparc64_elf_object_p (abfd)
sparc64_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
sparc64_elf_finish_dynamic_sections
+#define elf_backend_print_symbol_all \
+ sparc64_elf_print_symbol_all
+#define elf_backend_output_arch_syms \
+ sparc64_elf_output_arch_syms
#define bfd_elf64_bfd_merge_private_bfd_data \
sparc64_elf_merge_private_bfd_data
+#define elf_backend_size_info \
+ sparc64_elf_size_info
#define elf_backend_object_p \
sparc64_elf_object_p
@@ -2260,4 +3001,7 @@ sparc64_elf_object_p (abfd)
/* Section 5.2.4 of the ABI specifies a 256-byte boundary for the table. */
#define elf_backend_plt_alignment 8
+#define elf_backend_got_header_size 8
+#define elf_backend_plt_header_size PLT_HEADER_SIZE
+
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elfarm-nabi.c b/contrib/binutils/bfd/elfarm-nabi.c
new file mode 100644
index 0000000..38778b7
--- /dev/null
+++ b/contrib/binutils/bfd/elfarm-nabi.c
@@ -0,0 +1,672 @@
+/* 32-bit ELF support for ARM new abi option.
+ Copyright 1999 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "elf/arm.h"
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+
+#ifndef NUM_ELEM
+#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
+#endif
+
+#define USE_REL
+
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
+#define TARGET_LITTLE_NAME "elf32-littlearm"
+#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
+#define TARGET_BIG_NAME "elf32-bigarm"
+
+#define elf_info_to_howto 0
+#define elf_info_to_howto_rel elf32_arm_info_to_howto
+
+#define ARM_ELF_ABI_VERSION 0
+#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
+
+static reloc_howto_type * elf32_arm_reloc_type_lookup
+ PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
+
+static reloc_howto_type elf32_arm_howto_table[] =
+{
+ /* No relocation */
+ HOWTO (R_ARM_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_PC24, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PC24", /* name */
+ false, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 32 bit absolute */
+ HOWTO (R_ARM_ABS32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS32", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* standard 32bit pc-relative reloc */
+ HOWTO (R_ARM_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_REL32", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 8 bit absolute */
+ HOWTO (R_ARM_PC13, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PC13", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit absolute */
+ HOWTO (R_ARM_ABS16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 12 bit absolute */
+ HOWTO (R_ARM_ABS12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS12", /* name */
+ false, /* partial_inplace */
+ 0x000008ff, /* src_mask */
+ 0x000008ff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_ABS5, /* type */
+ 6, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 5, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_ABS5", /* name */
+ false, /* partial_inplace */
+ 0x000007e0, /* src_mask */
+ 0x000007e0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 8 bit absolute */
+ HOWTO (R_ARM_ABS8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS8", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_SBREL32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_SBREL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_PC22, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 23, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC22", /* name */
+ false, /* partial_inplace */
+ 0x07ff07ff, /* src_mask */
+ 0x07ff07ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_PC8, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC8", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_ARM_AMP_VCALL9, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_AMP_VCALL9", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_ARM_SWI24, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_SWI24", /* name */
+ false, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_SWI8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_SWI8", /* name */
+ false, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* These next two relocs are defined, but I do not know what they do. */
+
+ HOWTO (R_ARM_XPC25, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* 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 */
+
+ HOWTO (R_ARM_THM_XPC22, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* 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 */
+
+ /* These next three relocs are not defined, but we need to fill the space. */
+
+ HOWTO (R_ARM_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_unknown_17", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_unknown_18", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_unknown_19", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Relocs used in ARM Linux */
+
+ HOWTO (R_ARM_COPY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_COPY", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GLOB_DAT", /* name */
+ true, /* partial_inplace */
+ 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) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_JUMP_SLOT", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RELATIVE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RELATIVE", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOTOFF, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOTOFF", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOTPC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOTPC", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOT32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOT32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_PLT32, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PLT32", /* name */
+ true, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* End of relocs used in ARM Linux */
+
+ HOWTO (R_ARM_RREL32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RREL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RABS32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RABS32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RPC24, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RPC24", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RBASE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RBASE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+};
+
+ /* GNU extension to record C++ vtable hierarchy */
+static reloc_howto_type elf32_arm_vtinherit_howto =
+ HOWTO (R_ARM_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_ARM_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable member usage */
+static reloc_howto_type elf32_arm_vtentry_howto =
+ HOWTO (R_ARM_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_ARM_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
+
+ /* 12 bit pc relative */
+static reloc_howto_type elf32_arm_thm_pc11_howto =
+ HOWTO (R_ARM_THM_PC11, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 11, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC11", /* name */
+ false, /* partial_inplace */
+ 0x000007ff, /* src_mask */
+ 0x000007ff, /* dst_mask */
+ true); /* pcrel_offset */
+
+ /* 12 bit pc relative */
+static reloc_howto_type elf32_arm_thm_pc9_howto =
+ HOWTO (R_ARM_THM_PC9, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC9", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ true); /* pcrel_offset */
+
+
+static void
+elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ arelent * bfd_reloc;
+ Elf32_Internal_Rel * elf_reloc;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (elf_reloc->r_info);
+
+ switch (r_type)
+ {
+ 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;
+ else
+ bfd_reloc->howto = & elf32_arm_howto_table[r_type];
+ break;
+ }
+}
+
+struct elf32_arm_reloc_map
+ {
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned char elf_reloc_val;
+ };
+
+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_32, R_ARM_ABS32},
+ {BFD_RELOC_32_PCREL, R_ARM_REL32},
+ {BFD_RELOC_8, R_ARM_ABS8},
+ {BFD_RELOC_16, R_ARM_ABS16},
+ {BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12},
+ {BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5},
+ {BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22},
+ {BFD_RELOC_ARM_COPY, R_ARM_COPY},
+ {BFD_RELOC_ARM_GLOB_DAT, R_ARM_GLOB_DAT},
+ {BFD_RELOC_ARM_JUMP_SLOT, R_ARM_JUMP_SLOT},
+ {BFD_RELOC_ARM_RELATIVE, R_ARM_RELATIVE},
+ {BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF},
+ {BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC},
+ {BFD_RELOC_ARM_GOT32, R_ARM_GOT32},
+ {BFD_RELOC_ARM_PLT32, R_ARM_PLT32}
+};
+
+static reloc_howto_type *
+elf32_arm_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int i;
+
+ switch (code)
+ {
+ case BFD_RELOC_VTABLE_INHERIT:
+ return & elf32_arm_vtinherit_howto;
+
+ case BFD_RELOC_VTABLE_ENTRY:
+ return & elf32_arm_vtentry_howto;
+
+ case BFD_RELOC_THUMB_PCREL_BRANCH12:
+ return & elf32_arm_thm_pc11_howto;
+
+ case BFD_RELOC_THUMB_PCREL_BRANCH9:
+ return & elf32_arm_thm_pc9_howto;
+
+ default:
+ 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;
+ }
+}
+
+#include "elf32-arm.h"
diff --git a/contrib/binutils/bfd/elfarm-oabi.c b/contrib/binutils/bfd/elfarm-oabi.c
new file mode 100644
index 0000000..72f62f2
--- /dev/null
+++ b/contrib/binutils/bfd/elfarm-oabi.c
@@ -0,0 +1,420 @@
+/* 32-bit ELF support for ARM old abi option.
+ Copyright 1999 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "elf/arm-oabi.h"
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+
+#ifndef NUM_ELEM
+#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
+#endif
+
+#define USE_RELA
+
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_oabi_vec
+#define TARGET_LITTLE_NAME "elf32-littlearm-oabi"
+#define TARGET_BIG_SYM bfd_elf32_bigarm_oabi_vec
+#define TARGET_BIG_NAME "elf32-bigarm-oabi"
+
+#define elf_info_to_howto elf32_arm_info_to_howto
+#define elf_info_to_howto_rel 0
+
+#define ARM_ELF_ABI_VERSION 0
+#define ARM_ELF_OS_ABI_VERSION 0
+
+static reloc_howto_type elf32_arm_howto_table[] =
+{
+ /* No relocation */
+ HOWTO (R_ARM_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_PC24, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PC24", /* name */
+ false, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 32 bit absolute */
+ HOWTO (R_ARM_ABS32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS32", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* standard 32bit pc-relative reloc */
+ HOWTO (R_ARM_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_REL32", /* name */
+ false, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 8 bit absolute */
+ HOWTO (R_ARM_ABS8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS8", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit absolute */
+ HOWTO (R_ARM_ABS16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 12 bit absolute */
+ HOWTO (R_ARM_ABS12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS12", /* name */
+ false, /* partial_inplace */
+ 0x000008ff, /* src_mask */
+ 0x000008ff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_ABS5, /* type */
+ 6, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 5, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_ABS5", /* name */
+ false, /* partial_inplace */
+ 0x000007e0, /* src_mask */
+ 0x000007e0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_PC22, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 23, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC22", /* name */
+ false, /* partial_inplace */
+ 0x07ff07ff, /* src_mask */
+ 0x07ff07ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_ARM_SBREL32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_SBREL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_AMP_VCALL9, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_AMP_VCALL9", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 12 bit pc relative */
+ HOWTO (R_ARM_THM_PC11, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 11, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC11", /* name */
+ false, /* partial_inplace */
+ 0x000007ff, /* src_mask */
+ 0x000007ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 12 bit pc relative */
+ HOWTO (R_ARM_THM_PC9, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC9", /* name */
+ false, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable hierarchy */
+ HOWTO (R_ARM_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_ARM_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable member usage */
+ HOWTO (R_ARM_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_ARM_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* XXX - gap in index numbering here. */
+
+ HOWTO (R_ARM_PLT32, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PLT32", /* name */
+ true, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* XXX - gap in index numbering here. */
+
+ HOWTO (R_ARM_RREL32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RREL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RABS32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RABS32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RPC24, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RPC24", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_ARM_RBASE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RBASE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false) /* pcrel_offset */
+};
+
+/* Locate a reloc in the howto table. This function must be used
+ when the entry number is is > R_ARM_GNU_VTINHERIT. */
+static reloc_howto_type *
+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;
+
+ return NULL;
+}
+
+static void
+elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *bfd_reloc;
+ Elf32_Internal_Rela *elf_reloc;
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (elf_reloc->r_info);
+
+ if (r_type <= R_ARM_GNU_VTINHERIT)
+ bfd_reloc->howto = & elf32_arm_howto_table[r_type];
+ else
+ bfd_reloc->howto = find_howto (r_type);
+}
+
+struct elf32_arm_reloc_map
+ {
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned char elf_reloc_val;
+ };
+
+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_32, R_ARM_ABS32 },
+ {BFD_RELOC_32_PCREL, R_ARM_REL32 },
+ {BFD_RELOC_8, R_ARM_ABS8 },
+ {BFD_RELOC_16, R_ARM_ABS16 },
+ {BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12 },
+ {BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5 },
+ {BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22 },
+ {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_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT },
+ {BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY }
+};
+
+static reloc_howto_type *
+elf32_arm_reloc_type_lookup (abfd, code)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int i;
+
+ for (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];
+
+ if (code == BFD_RELOC_ARM_PLT32)
+ return find_howto (R_ARM_PLT32);
+
+ return NULL;
+}
+
+#define bfd_elf32_arm_allocate_interworking_sections \
+ bfd_elf32_arm_oabi_allocate_interworking_sections
+#define bfd_elf32_arm_get_bfd_for_interworking \
+ bfd_elf32_arm_oabi_get_bfd_for_interworking
+#define bfd_elf32_arm_process_before_allocation \
+ bfd_elf32_arm_oabi_process_before_allocation
+
+#include "elf32-arm.h"
diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h
index 4591e5f..c5edf9b 100644
--- a/contrib/binutils/bfd/elfcode.h
+++ b/contrib/binutils/bfd/elfcode.h
@@ -1,5 +1,6 @@
/* ELF executable support for BFD.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software
+ Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -68,7 +69,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
-#include "fnmatch.h"
/* Renaming structures, typedefs, macros and functions to be size-specific. */
#define Elf_External_Ehdr NAME(Elf,External_Ehdr)
@@ -124,6 +124,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_bfd_final_link NAME(bfd_elf,bfd_final_link)
#define elf_create_pointer_linker_section NAME(bfd_elf,create_pointer_linker_section)
#define elf_finish_pointer_linker_section NAME(bfd_elf,finish_pointer_linker_section)
+#define elf_gc_sections NAME(_bfd_elf,gc_sections)
+#define elf_gc_common_finalize_got_offsets \
+ NAME(_bfd_elf,gc_common_finalize_got_offsets)
+#define elf_gc_common_final_link NAME(_bfd_elf,gc_common_final_link)
+#define elf_gc_record_vtinherit NAME(_bfd_elf,gc_record_vtinherit)
+#define elf_gc_record_vtentry NAME(_bfd_elf,gc_record_vtentry)
+#define elf_link_record_local_dynamic_symbol \
+ NAME(_bfd_elf,link_record_local_dynamic_symbol)
#if ARCH_SIZE == 64
#define ELF_R_INFO(X,Y) ELF64_R_INFO(X,Y)
@@ -157,6 +165,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
+ PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type,
+ arelent *, asymbol **, boolean));
static boolean elf_slurp_reloc_table
PARAMS ((bfd *, asection *, asymbol **, boolean));
@@ -196,8 +207,13 @@ elf_swap_symbol_in (abfd, src, dst)
const Elf_External_Sym *src;
Elf_Internal_Sym *dst;
{
+ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
+
dst->st_name = bfd_h_get_32 (abfd, (bfd_byte *) src->st_name);
- dst->st_value = get_word (abfd, (bfd_byte *) src->st_value);
+ if (signed_vma)
+ dst->st_value = get_signed_word (abfd, (bfd_byte *) src->st_value);
+ else
+ dst->st_value = get_word (abfd, (bfd_byte *) src->st_value);
dst->st_size = get_word (abfd, (bfd_byte *) src->st_size);
dst->st_info = bfd_h_get_8 (abfd, (bfd_byte *) src->st_info);
dst->st_other = bfd_h_get_8 (abfd, (bfd_byte *) src->st_other);
@@ -284,10 +300,15 @@ elf_swap_shdr_in (abfd, src, dst)
const Elf_External_Shdr *src;
Elf_Internal_Shdr *dst;
{
+ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
+
dst->sh_name = bfd_h_get_32 (abfd, (bfd_byte *) src->sh_name);
dst->sh_type = bfd_h_get_32 (abfd, (bfd_byte *) src->sh_type);
dst->sh_flags = get_word (abfd, (bfd_byte *) src->sh_flags);
- dst->sh_addr = get_word (abfd, (bfd_byte *) src->sh_addr);
+ if (signed_vma)
+ dst->sh_addr = get_signed_word (abfd, (bfd_byte *) src->sh_addr);
+ else
+ dst->sh_addr = get_word (abfd, (bfd_byte *) src->sh_addr);
dst->sh_offset = get_word (abfd, (bfd_byte *) src->sh_offset);
dst->sh_size = get_word (abfd, (bfd_byte *) src->sh_size);
dst->sh_link = bfd_h_get_32 (abfd, (bfd_byte *) src->sh_link);
@@ -330,11 +351,21 @@ elf_swap_phdr_in (abfd, src, dst)
const Elf_External_Phdr *src;
Elf_Internal_Phdr *dst;
{
+ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
+
dst->p_type = bfd_h_get_32 (abfd, (bfd_byte *) src->p_type);
dst->p_flags = bfd_h_get_32 (abfd, (bfd_byte *) src->p_flags);
dst->p_offset = get_word (abfd, (bfd_byte *) src->p_offset);
- dst->p_vaddr = get_word (abfd, (bfd_byte *) src->p_vaddr);
- dst->p_paddr = get_word (abfd, (bfd_byte *) src->p_paddr);
+ if (signed_vma)
+ {
+ dst->p_vaddr = get_signed_word (abfd, (bfd_byte *) src->p_vaddr);
+ dst->p_paddr = get_signed_word (abfd, (bfd_byte *) src->p_paddr);
+ }
+ else
+ {
+ dst->p_vaddr = get_word (abfd, (bfd_byte *) src->p_vaddr);
+ dst->p_paddr = get_word (abfd, (bfd_byte *) src->p_paddr);
+ }
dst->p_filesz = get_word (abfd, (bfd_byte *) src->p_filesz);
dst->p_memsz = get_word (abfd, (bfd_byte *) src->p_memsz);
dst->p_align = get_word (abfd, (bfd_byte *) src->p_align);
@@ -414,11 +445,13 @@ elf_swap_dyn_in (abfd, p, dst)
}
INLINE void
-elf_swap_dyn_out (abfd, src, dst)
+elf_swap_dyn_out (abfd, src, p)
bfd *abfd;
const Elf_Internal_Dyn *src;
- Elf_External_Dyn *dst;
+ PTR p;
{
+ Elf_External_Dyn *dst = (Elf_External_Dyn *) p;
+
put_word (abfd, src->d_tag, dst->d_tag);
put_word (abfd, src->d_un.d_val, dst->d_un.d_val);
}
@@ -517,6 +550,10 @@ elf_object_p (abfd)
elf_debug_file (i_ehdrp);
#endif
+ /* Reject ET_CORE (header indicates core file, not object file) */
+ if (i_ehdrp->e_type == ET_CORE)
+ goto got_wrong_format_error;
+
/* If there is no section header table, we're hosed. */
if (i_ehdrp->e_shoff == 0)
goto got_wrong_format_error;
@@ -571,7 +608,11 @@ elf_object_p (abfd)
abfd->flags |= D_PAGED;
if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
- goto got_no_match;
+ {
+ /* It's OK if this fails for the generic target. */
+ if (ebd->elf_machine_code != EM_NONE)
+ goto got_no_match;
+ }
/* Remember the entry point specified in the ELF file header. */
bfd_get_start_address (abfd) = i_ehdrp->e_entry;
@@ -687,10 +728,9 @@ elf_object_p (abfd)
return (abfd->xvec);
-got_wrong_format_error:
+ got_wrong_format_error:
bfd_set_error (bfd_error_wrong_format);
- goto got_no_match;
-got_no_match:
+ got_no_match:
if (new_tdata != NULL
&& new_tdata->elf_sect_ptr != NULL)
bfd_release (abfd, new_tdata->elf_sect_ptr);
@@ -717,7 +757,7 @@ write_relocs (abfd, sec, data)
Elf_External_Rela *outbound_relocas;
Elf_External_Rel *outbound_relocs;
unsigned int idx;
- int use_rela_p = get_elf_backend_data (abfd)->use_rela_p;
+ int use_rela_p;
asymbol *last_sym = 0;
int last_sym_idx = 0;
@@ -745,6 +785,16 @@ write_relocs (abfd, sec, data)
return;
}
+ /* Figure out whether the relocations are RELA or REL relocations. */
+ if (rela_hdr->sh_type == SHT_RELA)
+ use_rela_p = true;
+ else if (rela_hdr->sh_type == SHT_REL)
+ use_rela_p = false;
+ else
+ /* Every relocation section should be either an SHT_RELA or an
+ SHT_REL section. */
+ abort ();
+
/* orelocation has the data, reloc_count has the count... */
if (use_rela_p)
{
@@ -827,6 +877,8 @@ write_relocs (abfd, sec, data)
if (sym == last_sym)
n = last_sym_idx;
+ else if (bfd_is_abs_section (sym->section) && sym->value == 0)
+ n = STN_UNDEF;
else
{
last_sym = sym;
@@ -839,7 +891,8 @@ write_relocs (abfd, sec, data)
last_sym_idx = n;
}
- if ((*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec
+ if ((*ptr->sym_ptr_ptr)->the_bfd != NULL
+ && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec
&& ! _bfd_elf_validate_reloc (abfd, ptr))
{
*failedp = true;
@@ -1005,7 +1058,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
&& verhdr->sh_size / sizeof (Elf_External_Versym) != symcount)
{
(*_bfd_error_handler)
- ("%s: version count (%ld) does not match symbol count (%ld)",
+ (_("%s: version count (%ld) does not match symbol count (%ld)"),
abfd->filename,
(long) (verhdr->sh_size / sizeof (Elf_External_Versym)),
symcount);
@@ -1173,50 +1226,27 @@ error_return:
return -1;
}
-/* Read in and swap the external relocs. */
+/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
+ them. */
static boolean
-elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
+elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
+ relents, symbols, dynamic)
bfd *abfd;
asection *asect;
+ Elf_Internal_Shdr *rel_hdr;
+ bfd_size_type reloc_count;
+ arelent *relents;
asymbol **symbols;
boolean dynamic;
{
struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
- struct bfd_elf_section_data * const d = elf_section_data (asect);
- Elf_Internal_Shdr *rel_hdr;
- bfd_size_type reloc_count;
PTR allocated = NULL;
bfd_byte *native_relocs;
- arelent *relents;
arelent *relent;
unsigned int i;
int entsize;
- if (asect->relocation != NULL)
- return true;
-
- if (! dynamic)
- {
- if ((asect->flags & SEC_RELOC) == 0
- || asect->reloc_count == 0)
- return true;
-
- rel_hdr = &d->rel_hdr;
- reloc_count = asect->reloc_count;
-
- BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset
- && reloc_count == rel_hdr->sh_size / rel_hdr->sh_entsize);
- }
- else
- {
- if (asect->_raw_size == 0)
- return true;
-
- rel_hdr = &d->this_hdr;
- reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
- }
-
allocated = (PTR) bfd_malloc ((size_t) rel_hdr->sh_size);
if (allocated == NULL)
goto error_return;
@@ -1228,10 +1258,6 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
native_relocs = (bfd_byte *) allocated;
- relents = (arelent *) bfd_alloc (abfd, reloc_count * sizeof (arelent));
- if (relents == NULL)
- goto error_return;
-
entsize = rel_hdr->sh_entsize;
BFD_ASSERT (entsize == sizeof (Elf_External_Rel)
|| entsize == sizeof (Elf_External_Rela));
@@ -1286,8 +1312,6 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
(*ebd->elf_info_to_howto_rel) (abfd, relent, &rel);
}
- asect->relocation = relents;
-
if (allocated != NULL)
free (allocated);
@@ -1299,6 +1323,82 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
return false;
}
+/* Read in and swap the external relocs. */
+
+static boolean
+elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
+ bfd *abfd;
+ asection *asect;
+ asymbol **symbols;
+ boolean dynamic;
+{
+ struct bfd_elf_section_data * const d = elf_section_data (asect);
+ Elf_Internal_Shdr *rel_hdr;
+ Elf_Internal_Shdr *rel_hdr2;
+ bfd_size_type reloc_count;
+ bfd_size_type reloc_count2;
+ arelent *relents;
+
+ if (asect->relocation != NULL)
+ return true;
+
+ if (! dynamic)
+ {
+ if ((asect->flags & SEC_RELOC) == 0
+ || asect->reloc_count == 0)
+ return true;
+
+ rel_hdr = &d->rel_hdr;
+ reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ rel_hdr2 = d->rel_hdr2;
+ reloc_count2 = (rel_hdr2
+ ? (rel_hdr2->sh_size / rel_hdr2->sh_entsize)
+ : 0);
+
+ BFD_ASSERT (asect->reloc_count == reloc_count + reloc_count2);
+ BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset
+ || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset));
+
+ }
+ else
+ {
+ /* Note that ASECT->RELOC_COUNT tends not to be accurate in this
+ case because relocations against this section may use the
+ dynamic symbol table, and in that case bfd_section_from_shdr
+ in elf.c does not update the RELOC_COUNT. */
+ if (asect->_raw_size == 0)
+ return true;
+
+ rel_hdr = &d->this_hdr;
+ reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ rel_hdr2 = NULL;
+ reloc_count2 = 0;
+ }
+
+ relents = ((arelent *)
+ bfd_alloc (abfd,
+ (reloc_count + reloc_count2) * sizeof (arelent)));
+ if (relents == NULL)
+ return false;
+
+ if (!elf_slurp_reloc_table_from_section (abfd, asect,
+ rel_hdr, reloc_count,
+ relents,
+ symbols, dynamic))
+ return false;
+
+ 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;
+}
+
#ifdef DEBUG
static void
elf_debug_section (num, hdr)
@@ -1427,7 +1527,8 @@ 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,
+ 1,
ARCH_SIZE, FILE_ALIGN,
ELFCLASS, EV_CURRENT,
elf_write_out_phdrs,
@@ -1436,5 +1537,10 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = {
elf_swap_symbol_out,
elf_slurp_reloc_table,
elf_slurp_symbol_table,
- elf_swap_dyn_in
+ elf_swap_dyn_in,
+ elf_swap_dyn_out,
+ NULL,
+ NULL,
+ NULL,
+ NULL
};
diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h
index 5bea812..e4454aa 100644
--- a/contrib/binutils/bfd/elfcore.h
+++ b/contrib/binutils/bfd/elfcore.h
@@ -1,5 +1,5 @@
/* ELF core file support for BFD.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,216 +16,31 @@ 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. */
-/* Core file support */
-#ifdef HAVE_SYS_PROCFS_H /* Some core file support requires host /proc files */
-#include <signal.h>
-#include <sys/procfs.h>
-/* Solaris includes the field pr_who that indicates the thread number within
- the process. */
-
-#ifdef PIOCOPENLWP
-#define get_thread(STATUS) ((((prstatus_t *)(STATUS))->pr_who << 16) \
- | ((prstatus_t *)(STATUS))->pr_pid)
-#else
-#define get_thread(STATUS) (((prstatus_t *)(STATUS))->pr_pid)
-#endif
-
-static boolean bfd_prstatus PARAMS ((bfd *, char *, int, long, int));
-static boolean bfd_prpsinfo PARAMS ((bfd *, char *, int, long));
-static boolean bfd_fpregset PARAMS ((bfd *, char *, int, long, int));
-
-#else
-#define bfd_prstatus(abfd, descdata, descsz, filepos, thread) true
-#define bfd_fpregset(abfd, descdata, descsz, filepos, thread) true
-#define bfd_prpsinfo(abfd, descdata, descsz, filepos) true
-#define get_thread(STATUS) (1)
-#endif
-
-static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
-
-#ifdef HAVE_SYS_PROCFS_H
-
-static int did_reg;
-static int did_reg2;
-
-static boolean
-bfd_prstatus (abfd, descdata, descsz, filepos, thread)
- bfd *abfd;
- char *descdata;
- int descsz;
- long filepos;
- int thread;
-{
- asection *newsect;
- prstatus_t *status = (prstatus_t *) 0;
-
- if (descsz == sizeof (prstatus_t))
- {
- char secname[100];
- char *p;
-
- sprintf (secname, ".reg/%d", thread);
- p = bfd_alloc (abfd, strlen (secname) + 1);
- if (!p)
- return false;
- strcpy (p, secname);
-
- newsect = bfd_make_section (abfd, p);
- if (newsect == NULL)
- return false;
- newsect->_raw_size = sizeof (status->pr_reg);
- newsect->filepos = filepos + (long) &status->pr_reg;
- newsect->flags = SEC_HAS_CONTENTS;
- newsect->alignment_power = LOG_FILE_ALIGN;
- if ((core_prstatus (abfd) = bfd_alloc (abfd, descsz)) != NULL)
- {
- memcpy (core_prstatus (abfd), descdata, descsz);
- }
-
- if (!did_reg++)
- {
- asection *regsect;
-
- regsect = bfd_make_section (abfd, ".reg");
- if (regsect == NULL)
- return false;
- regsect->_raw_size = newsect->_raw_size;
- regsect->filepos = newsect->filepos;
- regsect->flags = newsect->flags;
- regsect->alignment_power = newsect->alignment_power;
- }
- }
- return true;
-}
-
-/* Stash a copy of the prpsinfo structure away for future use. */
-
-static boolean
-bfd_prpsinfo (abfd, descdata, descsz, filepos)
- bfd *abfd;
- char *descdata;
- int descsz;
- long filepos;
-{
- if (descsz == sizeof (prpsinfo_t))
- {
- if ((core_prpsinfo (abfd) = bfd_alloc (abfd, descsz)) == NULL)
- return false;
- memcpy (core_prpsinfo (abfd), descdata, descsz);
- }
- return true;
-}
-
-static boolean
-bfd_fpregset (abfd, descdata, descsz, filepos, thread)
- bfd *abfd;
- char *descdata;
- int descsz;
- long filepos;
- int thread;
-{
- asection *newsect;
- char secname[100];
- char *p;
-
- sprintf (secname, ".reg2/%d", thread);
- p = bfd_alloc (abfd, strlen (secname) + 1);
- if (!p)
- return false;
- strcpy (p, secname);
-
- newsect = bfd_make_section (abfd, p);
- if (newsect == NULL)
- return false;
- newsect->_raw_size = descsz;
- newsect->filepos = filepos;
- newsect->flags = SEC_HAS_CONTENTS;
- newsect->alignment_power = 2;
-
- if (!did_reg2++)
- {
- asection *regsect;
-
- regsect = bfd_make_section (abfd, ".reg2");
- if (regsect == NULL)
- return false;
- regsect->_raw_size = newsect->_raw_size;
- regsect->filepos = newsect->filepos;
- regsect->flags = newsect->flags;
- regsect->alignment_power = newsect->alignment_power;
- }
-
- return true;
-}
-
-#endif /* HAVE_SYS_PROCFS_H */
-
-/* Return a pointer to the args (including the command name) that were
- seen by the program that generated the core dump. 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. */
-
-char *
+char*
elf_core_file_failing_command (abfd)
bfd *abfd;
{
-#ifdef HAVE_SYS_PROCFS_H
- if (core_prpsinfo (abfd))
- {
- prpsinfo_t *p = core_prpsinfo (abfd);
- char *scan = p->pr_psargs;
- while (*scan++)
- {;
- }
- scan -= 2;
- if ((scan > p->pr_psargs) && (*scan == ' '))
- {
- *scan = '\000';
- }
- return p->pr_psargs;
- }
-#endif
- return NULL;
+ return elf_tdata (abfd)->core_command;
}
-/* Return the number of the signal that caused the core dump. Presumably,
- since we have a core file, we got a signal of some kind, so don't bother
- checking the other process status fields, just return the signal number.
- */
-
int
elf_core_file_failing_signal (abfd)
bfd *abfd;
{
-#ifdef HAVE_SYS_PROCFS_H
- if (core_prstatus (abfd))
- {
- return ((prstatus_t *) (core_prstatus (abfd)))->pr_cursig;
- }
-#endif
- return -1;
+ return elf_tdata (abfd)->core_signal;
}
-/* Check to see if the core file could reasonably be expected to have
- come for the current executable file. Note that by default we return
- true unless we find something that indicates that there might be a
- problem.
- */
boolean
elf_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
{
-#ifdef HAVE_SYS_PROCFS_H
- char *corename;
- char *execname;
-#endif
+ char* corename;
- /* First, xvecs must match since 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)
{
@@ -233,151 +48,21 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd)
return false;
}
-#ifdef HAVE_SYS_PROCFS_H
-
- /* If no prpsinfo, just return true. Otherwise, grab the last component
- of the exec'd pathname from the prpsinfo. */
+ /* See if the name in the corefile matches the executable name. */
- if (core_prpsinfo (core_bfd))
+ corename = elf_tdata (core_bfd)->core_program;
+ if (corename != NULL)
{
- corename = (((prpsinfo_t *) core_prpsinfo (core_bfd))->pr_fname);
- }
- else
- {
- return true;
- }
-
- /* Find the last component of the executable pathname. */
+ const char* execname = strrchr (exec_bfd->filename, '/');
+ execname = execname ? execname + 1 : exec_bfd->filename;
- if ((execname = strrchr (exec_bfd->filename, '/')) != NULL)
- {
- execname++;
- }
- else
- {
- execname = (char *) exec_bfd->filename;
+ if (strcmp(execname, corename) != 0)
+ return false;
}
- /* See if they match */
-
- return strcmp (execname, corename) ? false : true;
-
-#else
-
return true;
-
-#endif /* HAVE_SYS_PROCFS_H */
}
-/* ELF core files contain a segment of type PT_NOTE, that holds much of
- the information that would normally be available from the /proc interface
- for the process, at the time the process dumped core. Currently this
- includes copies of the prstatus, prpsinfo, and fpregset structures.
-
- Since these structures are potentially machine dependent in size and
- ordering, bfd provides two levels of support for them. The first level,
- available on all machines since it does not require that the host
- have /proc support or the relevant include files, is to create a bfd
- section for each of the prstatus, prpsinfo, and fpregset structures,
- without any interpretation of their contents. With just this support,
- the bfd client will have to interpret the structures itself. Even with
- /proc support, it might want these full structures for it's own reasons.
-
- In the second level of support, where HAVE_SYS_PROCFS_H is defined,
- bfd will pick apart the structures to gather some additional
- information that clients may want, such as the general register
- set, the name of the exec'ed file and its arguments, the signal (if
- any) that caused the core dump, etc.
-
- */
-
-static boolean
-elf_corefile_note (abfd, hdr)
- bfd *abfd;
- Elf_Internal_Phdr *hdr;
-{
- Elf_External_Note *x_note_p; /* Elf note, external form */
- Elf_Internal_Note i_note; /* Elf note, internal form */
- char *buf = NULL; /* Entire note segment contents */
- char *namedata; /* Name portion of the note */
- char *descdata; /* Descriptor portion of the note */
- char *sectname; /* Name to use for new section */
- long filepos; /* File offset to descriptor data */
- asection *newsect;
- int thread = 1; /* Current thread number */
-
-#ifdef HAVE_SYS_PROCFS_H
- did_reg = 0; /* Non-zero if we made .reg section */
- did_reg2 = 0; /* Ditto for .reg2 */
-#endif
-
- if (hdr->p_filesz > 0
- && (buf = (char *) bfd_malloc ((size_t) hdr->p_filesz)) != NULL
- && bfd_seek (abfd, hdr->p_offset, SEEK_SET) != -1
- && bfd_read ((PTR) buf, hdr->p_filesz, 1, abfd) == hdr->p_filesz)
- {
- x_note_p = (Elf_External_Note *) buf;
- while ((char *) x_note_p < (buf + hdr->p_filesz))
- {
- i_note.namesz = bfd_h_get_32 (abfd, (bfd_byte *) x_note_p->namesz);
- i_note.descsz = bfd_h_get_32 (abfd, (bfd_byte *) x_note_p->descsz);
- i_note.type = bfd_h_get_32 (abfd, (bfd_byte *) x_note_p->type);
- namedata = x_note_p->name;
- descdata = namedata + BFD_ALIGN (i_note.namesz, 4);
- filepos = hdr->p_offset + (descdata - buf);
- switch (i_note.type)
- {
- case NT_PRSTATUS:
- /* process descdata as prstatus info */
- thread = get_thread (descdata);
- if (! bfd_prstatus (abfd, descdata, i_note.descsz, filepos,
- thread))
- return false;
- sectname = NULL;
- break;
- case NT_FPREGSET:
- /* process descdata as fpregset info */
- if (! bfd_fpregset (abfd, descdata, i_note.descsz, filepos,
- thread))
- return false;
- sectname = NULL;
- break;
- case NT_PRPSINFO:
- /* process descdata as prpsinfo */
- if (! bfd_prpsinfo (abfd, descdata, i_note.descsz, filepos))
- return false;
- sectname = ".prpsinfo";
- break;
- default:
- /* Unknown descriptor, just ignore it. */
- sectname = NULL;
- break;
- }
- if (sectname != NULL)
- {
- newsect = bfd_make_section (abfd, sectname);
- if (newsect == NULL)
- return false;
- newsect->_raw_size = i_note.descsz;
- newsect->filepos = filepos;
- newsect->flags = SEC_ALLOC | SEC_HAS_CONTENTS;
- newsect->alignment_power = 2;
- }
- x_note_p = (Elf_External_Note *)
- (descdata + BFD_ALIGN (i_note.descsz, 4));
- }
- }
- if (buf != NULL)
- {
- free (buf);
- }
- else if (hdr->p_filesz > 0)
- {
- return false;
- }
- return true;
-
-}
/* Core files are simply standard ELF formatted files that partition
the file using the execution view of the file (program header table)
@@ -398,13 +83,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_External_Phdr x_phdr; /* Program header table entry, external form */
- Elf_Internal_Phdr *i_phdrp; /* Program header table, internal form */
+ Elf_Internal_Phdr *i_phdrp; /* Elf program header, internal form */
unsigned int phindex;
struct elf_backend_data *ebd;
/* Read in the ELF header in external format. */
-
if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr))
{
if (bfd_get_error () != bfd_error_system_call)
@@ -412,12 +95,7 @@ elf_core_file_p (abfd)
return NULL;
}
- /* Now check to see if we have a valid ELF file, and one that BFD can
- 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
- program header table (FIXME: See comments re segments at top of this
- file). */
-
+ /* Check the magic number. */
if (elf_file_p (&x_ehdr) == false)
{
wrong:
@@ -425,21 +103,13 @@ elf_core_file_p (abfd)
return NULL;
}
- /* FIXME, Check EI_VERSION here ! */
-
- {
-#if ARCH_SIZE == 32
- int desired_address_size = ELFCLASS32;
-#endif
-#if ARCH_SIZE == 64
- int desired_address_size = ELFCLASS64;
-#endif
+ /* FIXME: Check EI_VERSION here ! */
- if (x_ehdr.e_ident[EI_CLASS] != desired_address_size)
- goto wrong;
- }
+ /* Check the address size ("class"). */
+ if (x_ehdr.e_ident[EI_CLASS] != ELFCLASS)
+ goto wrong;
- /* Switch xvec to match the specified byte order. */
+ /* Check the byteorder. */
switch (x_ehdr.e_ident[EI_DATA])
{
case ELFDATA2MSB: /* Big-endian */
@@ -450,24 +120,22 @@ elf_core_file_p (abfd)
if (! bfd_little_endian (abfd))
goto wrong;
break;
- case ELFDATANONE: /* No data encoding specified */
- default: /* Unknown data encoding specified */
+ default:
goto wrong;
}
- /* Allocate an instance of the elf_obj_tdata structure and hook it up to
- the tdata pointer in the bfd. */
-
+ /* Give abfd an elf_obj_tdata. */
elf_tdata (abfd) =
(struct elf_obj_tdata *) bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
if (elf_tdata (abfd) == NULL)
return NULL;
- /* FIXME, `wrong' returns from this point onward, leak memory. */
+ /* FIXME: from here on down, "goto wrong" will leak memory. */
- /* Now that we know the byte order, swap in the rest of the header */
+ /* 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);
+
#if DEBUG & 1
elf_debug_file (i_ehdrp);
#endif
@@ -476,9 +144,12 @@ elf_core_file_p (abfd)
/* Check that the ELF e_machine field matches what this particular
BFD format expects. */
+
if (ebd->elf_machine_code != i_ehdrp->e_machine
- && (ebd->elf_machine_alt1 == 0 || i_ehdrp->e_machine != ebd->elf_machine_alt1)
- && (ebd->elf_machine_alt2 == 0 || i_ehdrp->e_machine != ebd->elf_machine_alt2))
+ && (ebd->elf_machine_alt1 == 0
+ || i_ehdrp->e_machine != ebd->elf_machine_alt1)
+ && (ebd->elf_machine_alt2 == 0
+ || i_ehdrp->e_machine != ebd->elf_machine_alt2))
{
const bfd_target * const *target_ptr;
@@ -487,6 +158,7 @@ elf_core_file_p (abfd)
/* This is the generic ELF target. Let it match any ELF target
for which we do not have a specific backend. */
+
for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
{
struct elf_backend_data *back;
@@ -508,43 +180,46 @@ elf_core_file_p (abfd)
if (i_ehdrp->e_phoff == 0 || i_ehdrp->e_type != ET_CORE)
goto wrong;
- /* Allocate space for a copy of the program header table in
- internal form, seek to the program header table in the file,
- read it in, and convert it to internal form. As a simple sanity
- check, verify that the what BFD thinks is the size of each program
- header table entry actually matches the size recorded in the file. */
-
- if (i_ehdrp->e_phentsize != sizeof (x_phdr))
+ /* Does BFD's idea of the phdr size match the size
+ recorded in the file? */
+ if (i_ehdrp->e_phentsize != sizeof (Elf_External_Phdr))
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;
- if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) == -1)
- return NULL;
- for (phindex = 0; phindex < i_ehdrp->e_phnum; phindex++)
+
+ elf_tdata (abfd)->phdr = i_phdrp;
+
+ /* Read and convert to internal form. */
+ for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
- if (bfd_read ((PTR) & x_phdr, sizeof (x_phdr), 1, abfd)
+ Elf_External_Phdr x_phdr;
+ if (bfd_read ((PTR) &x_phdr, sizeof (x_phdr), 1, abfd)
!= sizeof (x_phdr))
return NULL;
+
elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
}
- /* Once all of the program headers have been read and converted, we
- can start processing them. */
-
- for (phindex = 0; phindex < i_ehdrp->e_phnum; phindex++)
+ /* Process each program header. */
+ for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
- bfd_section_from_phdr (abfd, i_phdrp + phindex, phindex);
- if ((i_phdrp + phindex)->p_type == PT_NOTE)
- {
- if (! elf_corefile_note (abfd, i_phdrp + phindex))
- return NULL;
- }
+ if (!_bfd_elfcore_section_from_phdr (abfd, i_phdrp + phindex, phindex))
+ return NULL;
}
- /* Remember the entry point specified in the ELF file header. */
+ /* 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;
+ }
+ /* Save the entry point from the ELF header. */
bfd_get_start_address (abfd) = i_ehdrp->e_entry;
return abfd->xvec;
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c
index 92e8d17..6534d84 100644
--- a/contrib/binutils/bfd/elflink.c
+++ b/contrib/binutils/bfd/elflink.c
@@ -1,5 +1,5 @@
/* ELF linking support for BFD.
- Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -83,9 +83,8 @@ _bfd_elf_create_got_section (abfd, info)
elf_hash_table (info)->hgot = h;
- /* The first three global offset table entries after
- '_GLOBAL_OFFSET_TABLE_' are reserved. */
- s->_raw_size += (3 << ptralign) + bed->got_symbol_offset;
+ /* The first bit of the global offset table is the header. */
+ s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
return true;
}
@@ -101,7 +100,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
flagword flags, pltflags;
register asection *s;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
- int ptralign;
+ int ptralign = 0;
switch (bed->s->arch_size)
{
@@ -148,7 +147,8 @@ _bfd_elf_create_dynamic_sections (abfd, info)
return false;
}
- s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.plt" : ".rel.plt");
+ 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)
|| ! bfd_set_section_alignment (abfd, s, ptralign))
@@ -157,18 +157,20 @@ _bfd_elf_create_dynamic_sections (abfd, info)
if (! _bfd_elf_create_got_section (abfd, info))
return false;
- /* The .dynbss section is a place to put symbols which are defined
- by dynamic objects, are referenced by regular objects, and are
- not functions. We must allocate space for them in the process
- image and use a R_*_COPY reloc to tell the dynamic linker to
- initialize them at run time. The linker script puts the .dynbss
- section into the .bss section of the final image. */
- s = bfd_make_section (abfd, ".dynbss");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
- return false;
+ if (bed->want_dynbss)
+ {
+ /* The .dynbss section is a place to put symbols which are defined
+ by dynamic objects, are referenced by regular objects, and are
+ not functions. We must allocate space for them in the process
+ image and use a R_*_COPY reloc to tell the dynamic linker to
+ initialize them at run time. The linker script puts the .dynbss
+ section into the .bss section of the final image. */
+ s = bfd_make_section (abfd, ".dynbss");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
+ return false;
- /* The .rel[a].bss section holds copy relocs. This section is not
+ /* The .rel[a].bss section holds copy relocs. This section is not
normally needed. We need to create it here, though, so that the
linker will map it to an output section. We can't just create it
only if we need it, because we will not know whether we need it
@@ -179,13 +181,16 @@ _bfd_elf_create_dynamic_sections (abfd, info)
be needed, we can discard it later. We will never need this
section when generating a shared object, since they do not use
copy relocs. */
- if (! info->shared)
- {
- s = bfd_make_section (abfd, bed->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))
- return false;
+ if (! info->shared)
+ {
+ 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))
+ return false;
+ }
}
return true;
@@ -213,6 +218,32 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
boolean copy;
bfd_size_type indx;
+ /* XXX: The ABI draft says the linker must turn hidden and
+ internal symbols into STB_LOCAL symbols when producing the
+ DSO. However, if ld.so honors st_other in the dynamic table,
+ this would not be necessary. */
+ switch (ELF_ST_VISIBILITY (h->other))
+ {
+ case STV_INTERNAL:
+ case STV_HIDDEN:
+ /* This symbol must be defined in the shared object or
+ executable. */
+ if (h->root.type == bfd_link_hash_undefined)
+ {
+ bfd * abfd = h->root.u.undef.abfd;
+ const char * name = h->root.root.string;
+
+ (*info->callbacks->undefined_symbol)
+ (info, name, abfd, bfd_und_section_ptr, 0, true);
+ }
+
+ h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ break;
+
+ default:
+ break;
+ }
+
h->dynindx = elf_hash_table (info)->dynsymcount;
++elf_hash_table (info)->dynsymcount;
@@ -257,8 +288,84 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
return true;
}
+
+/* Return the dynindex of a local dynamic symbol. */
+
+long
+_bfd_elf_link_lookup_local_dynindx (info, input_bfd, input_indx)
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ long input_indx;
+{
+ struct elf_link_local_dynamic_entry *e;
+
+ for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
+ if (e->input_bfd == input_bfd && e->input_indx == input_indx)
+ return e->dynindx;
+ return -1;
+}
+
+/* This function is used to renumber the dynamic symbols, if some of
+ them are removed because they are marked as local. This is called
+ via elf_link_hash_traverse. */
+
+static boolean elf_link_renumber_hash_table_dynsyms
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+
+static boolean
+elf_link_renumber_hash_table_dynsyms (h, data)
+ struct elf_link_hash_entry *h;
+ PTR data;
+{
+ size_t *count = (size_t *) data;
+
+ if (h->dynindx != -1)
+ h->dynindx = ++(*count);
+
+ return true;
+}
+
+/* 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. */
+
+unsigned long
+_bfd_elf_link_renumber_dynsyms (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ unsigned long dynsymcount = 0;
+
+ if (info->shared)
+ {
+ asection *p;
+ for (p = output_bfd->sections; p ; p = p->next)
+ elf_section_data (p)->dynindx = ++dynsymcount;
+ }
+
+ if (elf_hash_table (info)->dynlocal)
+ {
+ struct elf_link_local_dynamic_entry *p;
+ for (p = elf_hash_table (info)->dynlocal; p ; p = p->next)
+ p->dynindx = ++dynsymcount;
+ }
+
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_link_renumber_hash_table_dynsyms,
+ &dynsymcount);
+
+ /* There is an unused NULL entry at the head of the table which
+ we must account for in our count. Unless there weren't any
+ symbols, which means we'll have no table at all. */
+ if (dynsymcount != 0)
+ ++dynsymcount;
+
+ return elf_hash_table (info)->dynsymcount = dynsymcount;
+}
-/* Create a special linker section, or return a pointer to a linker section already created */
+/* Create a special linker section, or return a pointer to a linker
+ section already created */
elf_linker_section_t *
_bfd_elf_create_linker_section (abfd, info, which, defaults)
@@ -313,7 +420,7 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
s->_raw_size += lsect->hole_size;
if (lsect->hole_offset > lsect->max_hole_offset)
{
- (*_bfd_error_handler) ("%s: Section %s is already to large to put hole of %ld bytes in",
+ (*_bfd_error_handler) (_("%s: Section %s is already to large to put hole of %ld bytes in"),
bfd_get_filename (abfd),
lsect->name,
(long)lsect->hole_size);
diff --git a/contrib/binutils/bfd/elflink.h b/contrib/binutils/bfd/elflink.h
index 21bd270..bddf290 100644
--- a/contrib/binutils/bfd/elflink.h
+++ b/contrib/binutils/bfd/elflink.h
@@ -1,5 +1,5 @@
/* ELF linker support.
- Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -48,8 +48,17 @@ static boolean elf_link_find_version_dependencies
PARAMS ((struct elf_link_hash_entry *, PTR));
static boolean elf_link_assign_sym_version
PARAMS ((struct elf_link_hash_entry *, PTR));
-static boolean elf_link_renumber_dynsyms
+static boolean elf_collect_hash_codes
PARAMS ((struct elf_link_hash_entry *, PTR));
+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,
+ struct elf_link_hash_entry **));
/* Given an ELF BFD, add symbols to the global hash table as
appropriate. */
@@ -71,6 +80,138 @@ elf_bfd_link_add_symbols (abfd, info)
}
}
+/* Return true iff this is a non-common definition of a symbol. */
+static boolean
+is_global_symbol_definition (abfd, sym)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ Elf_Internal_Sym * sym;
+{
+ /* Local symbols do not count, but target specific ones might. */
+ if (ELF_ST_BIND (sym->st_info) != STB_GLOBAL
+ && ELF_ST_BIND (sym->st_info) < STB_LOOS)
+ return false;
+
+ /* 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)
+ return false;
+
+ /* If the symbol is in a target specific section then we
+ 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. */
+static boolean
+elf_link_is_defined_archive_symbol (abfd, symdef)
+ bfd * abfd;
+ carsym * symdef;
+{
+ Elf_Internal_Shdr * hdr;
+ Elf_External_Sym * esym;
+ Elf_External_Sym * esymend;
+ Elf_External_Sym * buf = NULL;
+ size_t symcount;
+ 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;
+
+ if (! bfd_check_format (abfd, bfd_object))
+ return false;
+
+ /* If we have already included the element containing this symbol in the
+ link then we do not need to include it again. Just claim that any symbol
+ it contains is not a definition, so that our caller will not decide to
+ (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;
+ else
+ hdr = &elf_tdata (abfd)->dynsymtab_hdr;
+
+ symcount = hdr->sh_size / sizeof (Elf_External_Sym);
+
+ /* The sh_info field of the symtab header tells us where the
+ external symbols start. We don't care about the local symbols. */
+ if (elf_bad_symtab (abfd))
+ {
+ extsymcount = symcount;
+ extsymoff = 0;
+ }
+ else
+ {
+ extsymcount = symcount - hdr->sh_info;
+ extsymoff = hdr->sh_info;
+ }
+
+ buf = ((Elf_External_Sym *)
+ bfd_malloc (extsymcount * sizeof (Elf_External_Sym)));
+ if (buf == NULL && extsymcount != 0)
+ return false;
+
+ /* Read in the symbol table.
+ FIXME: This ought to be cached somewhere. */
+ if (bfd_seek (abfd,
+ hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym),
+ SEEK_SET) != 0
+ || (bfd_read ((PTR) buf, sizeof (Elf_External_Sym), extsymcount, abfd)
+ != extsymcount * sizeof (Elf_External_Sym)))
+ {
+ free (buf);
+ return false;
+ }
+
+ /* Scan the symbol table looking for SYMDEF. */
+ esymend = buf + extsymcount;
+ for (esym = buf;
+ esym < esymend;
+ esym++)
+ {
+ Elf_Internal_Sym sym;
+ const char * name;
+
+ elf_swap_symbol_in (abfd, esym, & sym);
+
+ name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name);
+ if (name == (const char *) NULL)
+ break;
+
+ if (strcmp (name, symdef->name) == 0)
+ {
+ result = is_global_symbol_definition (abfd, & sym);
+ break;
+ }
+ }
+
+ 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
@@ -191,7 +332,24 @@ elf_link_add_archive_symbols (abfd, info)
if (h == NULL)
continue;
- if (h->root.type != bfd_link_hash_undefined)
+ if (h->root.type == bfd_link_hash_common)
+ {
+ /* We currently have a common symbol. The archive map contains
+ a reference to this symbol, so we may want to include it. We
+ only want to include it however, if this archive element
+ contains a definition of the symbol, not just another common
+ declaration of it.
+
+ Unfortunately some archivers (including GNU ar) will put
+ declarations of common symbols into their archive maps, as
+ well as real definitions, so we cannot just go by the archive
+ map alone. Instead we must read in the element's symbol
+ table and check that to see what kind of symbol definition
+ this is. */
+ if (! elf_link_is_defined_archive_symbol (abfd, symdef))
+ continue;
+ }
+ else if (h->root.type != bfd_link_hash_undefined)
{
if (h->root.type != bfd_link_hash_undefweak)
defined[i] = true;
@@ -299,8 +457,6 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
boolean newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon;
*override = false;
- *type_change_ok = false;
- *size_change_ok = false;
sec = *psec;
bind = ELF_ST_BIND (sym->st_info);
@@ -358,6 +514,17 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
break;
}
+ /* In cases involving weak versioned symbols, we may wind up trying
+ to merge a symbol with itself. Catch that here, to avoid the
+ confusion that results if we try to override a symbol with
+ itself. The additional tests catch cases like
+ _GLOBAL_OFFSET_TABLE_, which are regular symbols defined in a
+ dynamic object, which we do want to handle here. */
+ if (abfd == oldbfd
+ && ((abfd->flags & DYNAMIC) == 0
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ return true;
+
/* NEWDYN and OLDDYN indicate whether the new or old symbol,
respectively, is from a dynamic object. */
@@ -366,10 +533,35 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
else
newdyn = false;
- if (oldbfd == NULL || (oldbfd->flags & DYNAMIC) == 0)
- olddyn = false;
+ if (oldbfd != NULL)
+ olddyn = (oldbfd->flags & DYNAMIC) != 0;
else
- olddyn = true;
+ {
+ asection *hsec;
+
+ /* This code handles the special SHN_MIPS_{TEXT,DATA} section
+ indices used by MIPS ELF. */
+ switch (h->root.type)
+ {
+ default:
+ hsec = NULL;
+ break;
+
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ hsec = h->root.u.def.section;
+ break;
+
+ case bfd_link_hash_common:
+ hsec = h->root.u.c.p->section;
+ break;
+ }
+
+ if (hsec == NULL)
+ olddyn = false;
+ else
+ olddyn = (hsec->symbol->flags & BSF_DYNAMIC) != 0;
+ }
/* NEWDEF and OLDDEF indicate whether the new or old symbol,
respectively, appear to be a definition rather than reference. */
@@ -484,14 +676,19 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
represent variables; this can cause confusion in principle, but
any such confusion would seem to indicate an erroneous program or
shared library. We also permit a common symbol in a regular
- object to override a weak symbol in a shared object. */
+ 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. */
if (newdyn
&& newdef
&& (olddef
|| (h->root.type == bfd_link_hash_common
&& (bind == STB_WEAK
- || ELF_ST_TYPE (sym->st_info) == STT_FUNC))))
+ || ELF_ST_TYPE (sym->st_info) == STT_FUNC)))
+ && (h->root.type != bfd_link_hash_defweak
+ || bind == STB_WEAK))
{
*override = true;
newdef = false;
@@ -535,7 +732,10 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
As above, we again permit a common symbol in a regular object to
override a definition in a shared object if the shared object
- symbol is a function or is weak. */
+ symbol is a function or is weak.
+
+ As above, we permit a non-weak definition in a shared object to
+ override a weak definition in a regular object. */
if (! newdyn
&& (newdef
@@ -544,7 +744,9 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
|| h->type == STT_FUNC)))
&& olddyn
&& olddef
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (bind != STB_WEAK
+ || h->root.type == bfd_link_hash_defweak))
{
/* Change the hash table entry to undefined, and let
_bfd_generic_link_add_one_symbol do the right thing with the
@@ -618,6 +820,45 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash,
h->verinfo.vertree = NULL;
}
+ /* 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. */
+ if (olddef
+ && h->root.type == bfd_link_hash_defweak
+ && newdef
+ && newdyn
+ && bind != STB_WEAK)
+ {
+ /* To make this work we have to frob the flags so that the rest
+ of the code does not think we are using the regular
+ definition. */
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+ h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
+ else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ h->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
+ h->elf_link_hash_flags &= ~ (ELF_LINK_HASH_DEF_REGULAR
+ | ELF_LINK_HASH_DEF_DYNAMIC);
+
+ /* If H is the target of an indirection, we want the caller to
+ use H rather than the indirect symbol. Otherwise if we are
+ defining a new indirect symbol we will wind up attaching it
+ to the entry we are overriding. */
+ *sym_hash = h;
+ }
+
+ /* Handle the special case of a non-weak definition in a shared
+ object followed by a weak definition in a regular object. In
+ this case we prefer to definition in the shared object. To make
+ this work we have to tell the caller to not treat the new symbol
+ as a definition. */
+ if (olddef
+ && olddyn
+ && h->root.type != bfd_link_hash_defweak
+ && newdef
+ && ! newdyn
+ && bind == STB_WEAK)
+ *override = true;
+
return true;
}
@@ -649,9 +890,11 @@ elf_link_add_object_symbols (abfd, info)
struct elf_link_hash_entry *weaks;
Elf_External_Sym *esym;
Elf_External_Sym *esymend;
+ struct elf_backend_data *bed;
- add_symbol_hook = get_elf_backend_data (abfd)->elf_add_symbol_hook;
- collect = get_elf_backend_data (abfd)->collect;
+ bed = get_elf_backend_data (abfd);
+ add_symbol_hook = bed->elf_add_symbol_hook;
+ collect = bed->collect;
if ((abfd->flags & DYNAMIC) == 0)
dynamic = false;
@@ -719,13 +962,15 @@ elf_link_add_object_symbols (abfd, info)
}
sz = bfd_section_size (abfd, s);
- msg = (char *) bfd_alloc (abfd, sz);
+ msg = (char *) bfd_alloc (abfd, sz + 1);
if (msg == NULL)
goto error_return;
if (! bfd_get_section_contents (abfd, s, msg, (file_ptr) 0, sz))
goto error_return;
+ msg[sz] = '\0';
+
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, BSF_WARNING, s, (bfd_vma) 0, msg,
false, collect, (struct bfd_link_hash_entry **) NULL)))
@@ -864,6 +1109,23 @@ elf_link_add_object_symbols (abfd, info)
goto error_return;
link = elf_elfsections (abfd)[elfsec]->sh_link;
+ {
+ /* The shared libraries distributed with hpux11 have a bogus
+ sh_link field for the ".dynamic" section. This code detects
+ when LINK refers to a section that is not a string table and
+ tries to find the string table for the ".dynsym" section
+ instead. */
+ Elf_Internal_Shdr *hdr = elf_elfsections (abfd)[link];
+ if (hdr->sh_type != SHT_STRTAB)
+ {
+ asection *s = bfd_get_section_by_name (abfd, ".dynsym");
+ int elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
+ if (elfsec == -1)
+ goto error_return;
+ link = elf_elfsections (abfd)[elfsec]->sh_link;
+ }
+ }
+
extdyn = dynbuf;
extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn);
for (; extdyn < extdynend; extdyn++)
@@ -1123,8 +1385,8 @@ elf_link_add_object_symbols (abfd, info)
if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
{
(*_bfd_error_handler)
- ("%s: %s: invalid version %u (max %d)",
- abfd->filename, name, vernum,
+ (_("%s: %s: invalid version %u (max %d)"),
+ bfd_get_filename (abfd), name, vernum,
elf_tdata (abfd)->dynverdef_hdr.sh_info);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1164,8 +1426,8 @@ elf_link_add_object_symbols (abfd, info)
if (verstr == NULL)
{
(*_bfd_error_handler)
- ("%s: %s: invalid needed version %d",
- abfd->filename, name, vernum);
+ (_("%s: %s: invalid needed version %d"),
+ bfd_get_filename (abfd), name, vernum);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1182,7 +1444,11 @@ elf_link_add_object_symbols (abfd, info)
strcpy (newname, name);
p = newname + namelen;
*p++ = ELF_VER_CHR;
- if ((iver.vs_vers & VERSYM_HIDDEN) == 0)
+ /* If this is a defined non-hidden version symbol,
+ we add another @ to the name. This indicates the
+ default version of the symbol. */
+ if ((iver.vs_vers & VERSYM_HIDDEN) == 0
+ && sym.st_shndx != SHN_UNDEF)
*p++ = ELF_VER_CHR;
strcpy (p, verstr);
@@ -1277,7 +1543,7 @@ elf_link_add_object_symbols (abfd, info)
{
if (h->size != 0 && h->size != sym.st_size && ! size_change_ok)
(*_bfd_error_handler)
- ("Warning: size of symbol `%s' changed from %lu to %lu in %s",
+ (_("Warning: size of symbol `%s' changed from %lu to %lu in %s"),
name, (unsigned long) h->size, (unsigned long) sym.st_size,
bfd_get_filename (abfd));
@@ -1299,16 +1565,31 @@ elf_link_add_object_symbols (abfd, info)
&& h->type != ELF_ST_TYPE (sym.st_info)
&& ! type_change_ok)
(*_bfd_error_handler)
- ("Warning: type of symbol `%s' changed from %d to %d in %s",
+ (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
name, h->type, ELF_ST_TYPE (sym.st_info),
bfd_get_filename (abfd));
h->type = ELF_ST_TYPE (sym.st_info);
}
- if (sym.st_other != 0
- && (definition || h->other == 0))
- h->other = sym.st_other;
+ /* If st_other has a processor-specific meaning, specific code
+ might be needed here. */
+ if (sym.st_other != 0)
+ {
+ /* 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. */
+ if (!symvis && !hvis
+ && (definition || h->other == 0))
+ h->other = sym.st_other;
+ }
/* Set a flag in the hash table entry indicating the type of
reference or definition we just found. Keep a count of
@@ -1320,7 +1601,11 @@ elf_link_add_object_symbols (abfd, info)
if (! dynamic)
{
if (! definition)
- new_flag = ELF_LINK_HASH_REF_REGULAR;
+ {
+ new_flag = ELF_LINK_HASH_REF_REGULAR;
+ if (bind != STB_WEAK)
+ new_flag |= ELF_LINK_HASH_REF_REGULAR_NONWEAK;
+ }
else
new_flag = ELF_LINK_HASH_DEF_REGULAR;
if (info->shared
@@ -1372,6 +1657,8 @@ elf_link_add_object_symbols (abfd, info)
purposes of the merge, act as though we were
defining the symbol we just defined, although we
actually going to define an indirect symbol. */
+ type_change_ok = false;
+ size_change_ok = false;
if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec,
&value, &hi, &override,
&type_change_ok, &size_change_ok))
@@ -1421,8 +1708,14 @@ elf_link_add_object_symbols (abfd, info)
{
h->elf_link_hash_flags &=~ ELF_LINK_HASH_DEF_DYNAMIC;
hi->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
- if (! _bfd_elf_link_record_dynamic_symbol (info, hi))
- goto error_return;
+ if (hi->elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_DEF_REGULAR))
+ {
+ if (! _bfd_elf_link_record_dynamic_symbol (info,
+ hi))
+ goto error_return;
+ }
}
/* Now set HI to H, so that the following code
@@ -1447,36 +1740,7 @@ elf_link_add_object_symbols (abfd, info)
== 0);
ht = (struct elf_link_hash_entry *) hi->root.u.i.link;
-
- /* Copy down any references that we may have
- already seen to the symbol which just became
- indirect. */
- ht->elf_link_hash_flags |=
- (hi->elf_link_hash_flags
- & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR));
-
- /* Copy over the global table offset entry.
- This may have been already set up by a
- check_relocs routine. */
- if (ht->got_offset == (bfd_vma) -1)
- {
- ht->got_offset = hi->got_offset;
- hi->got_offset = (bfd_vma) -1;
- }
- BFD_ASSERT (hi->got_offset == (bfd_vma) -1);
-
- if (ht->dynindx == -1)
- {
- ht->dynindx = hi->dynindx;
- ht->dynstr_index = hi->dynstr_index;
- hi->dynindx = -1;
- hi->dynstr_index = 0;
- }
- BFD_ASSERT (hi->dynindx == -1);
-
- /* FIXME: There may be other information to copy
- over for particular targets. */
+ (*bed->elf_backend_copy_indirect_symbol) (ht, hi);
/* See if the new flags lead us to realize that
the symbol must be dynamic. */
@@ -1510,6 +1774,8 @@ elf_link_add_object_symbols (abfd, info)
strcpy (shortname + (p - name), p + 1);
/* Once again, merge with any existing symbol. */
+ type_change_ok = false;
+ size_change_ok = false;
if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec,
&value, &hi, &override,
&type_change_ok, &size_change_ok))
@@ -1521,7 +1787,7 @@ elf_link_add_object_symbols (abfd, info)
don't expect to see the type of override we
do in the case above. */
(*_bfd_error_handler)
- ("%s: warning: unexpected redefinition of `%s'",
+ (_("%s: warning: unexpected redefinition of `%s'"),
bfd_get_filename (abfd), shortname);
}
else
@@ -1547,35 +1813,7 @@ elf_link_add_object_symbols (abfd, info)
| ELF_LINK_HASH_DEF_REGULAR))
== 0);
- /* Copy down any references that we may have
- already seen to the symbol which just
- became indirect. */
- h->elf_link_hash_flags |=
- (hi->elf_link_hash_flags
- & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR));
-
- /* Copy over the global table offset entry.
- This may have been already set up by a
- check_relocs routine. */
- if (h->got_offset == (bfd_vma) -1)
- {
- h->got_offset = hi->got_offset;
- hi->got_offset = (bfd_vma) -1;
- }
- BFD_ASSERT (hi->got_offset == (bfd_vma) -1);
-
- if (h->dynindx == -1)
- {
- h->dynindx = hi->dynindx;
- h->dynstr_index = hi->dynstr_index;
- hi->dynindx = -1;
- hi->dynstr_index = 0;
- }
- BFD_ASSERT (hi->dynindx == -1);
-
- /* FIXME: There may be other information to
- copy over for particular targets. */
+ (*bed->elf_backend_copy_indirect_symbol) (h, hi);
/* See if the new flags lead us to realize
that the symbol must be dynamic. */
@@ -1905,16 +2143,18 @@ elf_link_create_dynamic_sections (abfd, info)
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return false;
+ bed = get_elf_backend_data (abfd);
+
s = bfd_make_section (abfd, ".hash");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, LOG_FILE_ALIGN))
return false;
+ elf_section_data (s)->this_hdr.sh_entsize = bed->s->sizeof_hash_entry;
/* Let the backend create the rest of the sections. This lets the
backend set the right flags. The backend will normally create
the .got and .plt sections. */
- bed = get_elf_backend_data (abfd);
if (! (*bed->elf_backend_create_dynamic_sections) (abfd, info))
return false;
@@ -1957,14 +2197,174 @@ elf_add_dynamic_entry (info, tag, val)
return true;
}
+
+/* Record a new local dynamic symbol. */
+
+boolean
+elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ long input_indx;
+{
+ struct elf_link_local_dynamic_entry *entry;
+ struct elf_link_hash_table *eht;
+ struct bfd_strtab_hash *dynstr;
+ Elf_External_Sym esym;
+ unsigned long dynstr_index;
+ char *name;
+
+ /* See if the entry exists already. */
+ for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
+ if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
+ return true;
+
+ entry = (struct elf_link_local_dynamic_entry *)
+ bfd_alloc (input_bfd, sizeof (*entry));
+ if (entry == NULL)
+ return false;
+
+ /* Go find the symbol, so that we can find it's name. */
+ if (bfd_seek (input_bfd,
+ (elf_tdata (input_bfd)->symtab_hdr.sh_offset
+ + input_indx * sizeof (Elf_External_Sym)),
+ SEEK_SET) != 0
+ || (bfd_read (&esym, sizeof (Elf_External_Sym), 1, input_bfd)
+ != sizeof (Elf_External_Sym)))
+ return false;
+ elf_swap_symbol_in (input_bfd, &esym, &entry->isym);
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
+ entry->isym.st_name));
+
+ dynstr = elf_hash_table (info)->dynstr;
+ if (dynstr == NULL)
+ {
+ /* Create a strtab to hold the dynamic symbol names. */
+ elf_hash_table (info)->dynstr = dynstr = _bfd_elf_stringtab_init ();
+ if (dynstr == NULL)
+ return false;
+ }
+
+ dynstr_index = _bfd_stringtab_add (dynstr, name, true, false);
+ if (dynstr_index == (unsigned long) -1)
+ return false;
+ entry->isym.st_name = dynstr_index;
+
+ eht = elf_hash_table (info);
+
+ entry->next = eht->dynlocal;
+ eht->dynlocal = entry;
+ entry->input_bfd = input_bfd;
+ entry->input_indx = input_indx;
+ eht->dynsymcount++;
+
+ /* Whatever binding the symbol had before, it's now local. */
+ entry->isym.st_info
+ = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
+
+ /* The dynindx will be set at the end of size_dynamic_sections. */
+
+ return true;
+}
-/* Read and swap the relocs for a section. They may have been cached.
- If the EXTERNAL_RELOCS and INTERNAL_RELOCS arguments are not NULL,
- they are used as buffers to read into. They are known to be large
- enough. If the INTERNAL_RELOCS relocs argument is NULL, the return
- value is allocated using either malloc or bfd_alloc, according to
- the KEEP_MEMORY argument. */
+/* 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,
+ which should have already been allocated to contain enough space.
+ The EXTERNAL_RELOCS are a buffer where the external form of the
+ relocations should be stored.
+
+ Returns false if something goes wrong. */
+
+static boolean
+elf_link_read_relocs_from_section (abfd, shdr, external_relocs,
+ internal_relocs)
+ bfd *abfd;
+ Elf_Internal_Shdr *shdr;
+ PTR external_relocs;
+ Elf_Internal_Rela *internal_relocs;
+{
+ struct elf_backend_data *bed;
+
+ /* If there aren't any relocations, that's OK. */
+ if (!shdr)
+ return true;
+
+ /* Position ourselves at the start of the section. */
+ if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0)
+ return false;
+
+ /* Read the relocations. */
+ if (bfd_read (external_relocs, 1, shdr->sh_size, abfd)
+ != shdr->sh_size)
+ return false;
+
+ bed = get_elf_backend_data (abfd);
+
+ /* Convert the external relocations to the internal format. */
+ if (shdr->sh_entsize == sizeof (Elf_External_Rel))
+ {
+ Elf_External_Rel *erel;
+ Elf_External_Rel *erelend;
+ Elf_Internal_Rela *irela;
+ Elf_Internal_Rel *irel;
+
+ erel = (Elf_External_Rel *) external_relocs;
+ erelend = erel + shdr->sh_size / shdr->sh_entsize;
+ irela = internal_relocs;
+ irel = bfd_alloc (abfd, (bed->s->int_rels_per_ext_rel
+ * sizeof (Elf_Internal_Rel)));
+ for (; erel < erelend; erel++, irela += bed->s->int_rels_per_ext_rel)
+ {
+ unsigned char i;
+
+ if (bed->s->swap_reloc_in)
+ (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel);
+ else
+ elf_swap_reloc_in (abfd, erel, irel);
+
+ for (i = 0; i < bed->s->int_rels_per_ext_rel; ++i)
+ {
+ irela[i].r_offset = irel[i].r_offset;
+ irela[i].r_info = irel[i].r_info;
+ irela[i].r_addend = 0;
+ }
+ }
+ }
+ else
+ {
+ Elf_External_Rela *erela;
+ Elf_External_Rela *erelaend;
+ Elf_Internal_Rela *irela;
+
+ BFD_ASSERT (shdr->sh_entsize == sizeof (Elf_External_Rela));
+
+ erela = (Elf_External_Rela *) external_relocs;
+ erelaend = erela + shdr->sh_size / shdr->sh_entsize;
+ irela = internal_relocs;
+ for (; erela < erelaend; erela++, irela += bed->s->int_rels_per_ext_rel)
+ {
+ if (bed->s->swap_reloca_in)
+ (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, irela);
+ else
+ elf_swap_reloca_in (abfd, erela, irela);
+ }
+ }
+
+ return true;
+}
+
+/* Read and swap the relocs for a section O. They may have been
+ cached. If the EXTERNAL_RELOCS and INTERNAL_RELOCS arguments are
+ not NULL, they are used as buffers to read into. They are known to
+ be large enough. If the INTERNAL_RELOCS relocs argument is NULL,
+ the return value is allocated using either malloc or bfd_alloc,
+ according to the KEEP_MEMORY argument. If O has two relocation
+ sections (both REL and RELA relocations), then the REL_HDR
+ relocations will appear first in INTERNAL_RELOCS, followed by the
+ REL_HDR2 relocations. */
Elf_Internal_Rela *
NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
@@ -1978,6 +2378,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
Elf_Internal_Shdr *rel_hdr;
PTR alloc1 = NULL;
Elf_Internal_Rela *alloc2 = NULL;
+ struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (elf_section_data (o)->relocs != NULL)
return elf_section_data (o)->relocs;
@@ -1991,7 +2392,8 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
{
size_t size;
- size = o->reloc_count * sizeof (Elf_Internal_Rela);
+ 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);
else
@@ -2002,53 +2404,27 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
if (external_relocs == NULL)
{
- alloc1 = (PTR) bfd_malloc ((size_t) rel_hdr->sh_size);
+ size_t size = (size_t) rel_hdr->sh_size;
+
+ if (elf_section_data (o)->rel_hdr2)
+ size += (size_t) elf_section_data (o)->rel_hdr2->sh_size;
+ alloc1 = (PTR) bfd_malloc (size);
if (alloc1 == NULL)
goto error_return;
external_relocs = alloc1;
}
- if ((bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0)
- || (bfd_read (external_relocs, 1, rel_hdr->sh_size, abfd)
- != rel_hdr->sh_size))
+ if (!elf_link_read_relocs_from_section (abfd, rel_hdr,
+ external_relocs,
+ internal_relocs))
+ goto error_return;
+ 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
+ * bed->s->int_rels_per_ext_rel)))
goto error_return;
-
- /* Swap in the relocs. For convenience, we always produce an
- Elf_Internal_Rela array; if the relocs are Rel, we set the addend
- to 0. */
- if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
- {
- Elf_External_Rel *erel;
- Elf_External_Rel *erelend;
- Elf_Internal_Rela *irela;
-
- erel = (Elf_External_Rel *) external_relocs;
- erelend = erel + o->reloc_count;
- irela = internal_relocs;
- for (; erel < erelend; erel++, irela++)
- {
- Elf_Internal_Rel irel;
-
- elf_swap_reloc_in (abfd, erel, &irel);
- irela->r_offset = irel.r_offset;
- irela->r_info = irel.r_info;
- irela->r_addend = 0;
- }
- }
- else
- {
- Elf_External_Rela *erela;
- Elf_External_Rela *erelaend;
- Elf_Internal_Rela *irela;
-
- BFD_ASSERT (rel_hdr->sh_entsize == sizeof (Elf_External_Rela));
-
- erela = (Elf_External_Rela *) external_relocs;
- erelaend = erela + o->reloc_count;
- irela = internal_relocs;
- for (; erela < erelaend; erela++, irela++)
- elf_swap_reloca_in (abfd, erela, irela);
- }
/* Cache the results for next time, if we can. */
if (keep_memory)
@@ -2077,7 +2453,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
/*ARGSUSED*/
boolean
NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
const char *name;
boolean provide;
@@ -2113,7 +2489,10 @@ NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide)
h->verinfo.verdef = NULL;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
+
+ /* When possible, keep the original type of the symbol */
+ if (h->type == STT_NOTYPE)
+ h->type = STT_OBJECT;
if (((h->elf_link_hash_flags & (ELF_LINK_HASH_DEF_DYNAMIC
| ELF_LINK_HASH_REF_DYNAMIC)) != 0
@@ -2150,8 +2529,6 @@ struct elf_assign_sym_version_info
struct bfd_elf_version_tree *verdefs;
/* Whether we are exporting all dynamic symbols. */
boolean export_dynamic;
- /* Whether we removed any symbols from the dynamic symbol table. */
- boolean removed_dynamic;
/* Whether we had a failure. */
boolean failed;
};
@@ -2183,6 +2560,149 @@ static const size_t elf_buckets[] =
16411, 32771, 0
};
+/* Compute bucket count for hashing table. We do not use a static set
+ of possible tables sizes anymore. Instead we determine for all
+ possible reasonable sizes of the table the outcome (i.e., the
+ number of collisions etc) and choose the best solution. The
+ weighting functions are not too simple to allow the table to grow
+ without bounds. Instead one of the weighting factors is the size.
+ Therefore the result is always a good payoff between few collisions
+ (= short chain lengths) and table size. */
+static size_t
+compute_bucket_count (info)
+ struct bfd_link_info *info;
+{
+ size_t dynsymcount = elf_hash_table (info)->dynsymcount;
+ size_t best_size = 0;
+ unsigned long int *hashcodes;
+ unsigned long int *hashcodesp;
+ unsigned long int i;
+
+ /* Compute the hash values for all exported symbols. At the same
+ time store the values in an array so that we could use them for
+ optimizations. */
+ hashcodes = (unsigned long int *) bfd_malloc (dynsymcount
+ * sizeof (unsigned long int));
+ if (hashcodes == NULL)
+ return 0;
+ hashcodesp = hashcodes;
+
+ /* Put all hash values in HASHCODES. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_collect_hash_codes, &hashcodesp);
+
+/* We have a problem here. The following code to optimize the table
+ size requires an integer type with more the 32 bits. If
+ BFD_HOST_U_64_BIT is set we know about such a type. */
+#ifdef BFD_HOST_U_64_BIT
+ if (info->optimize == true)
+ {
+ unsigned long int nsyms = hashcodesp - hashcodes;
+ size_t minsize;
+ size_t maxsize;
+ BFD_HOST_U_64_BIT best_chlen = ~((BFD_HOST_U_64_BIT) 0);
+ unsigned long int *counts ;
+
+ /* Possible optimization parameters: if we have NSYMS symbols we say
+ that the hashing table must at least have NSYMS/4 and at most
+ 2*NSYMS buckets. */
+ minsize = nsyms / 4;
+ if (minsize == 0)
+ minsize = 1;
+ best_size = maxsize = nsyms * 2;
+
+ /* Create array where we count the collisions in. We must use bfd_malloc
+ since the size could be large. */
+ counts = (unsigned long int *) bfd_malloc (maxsize
+ * sizeof (unsigned long int));
+ if (counts == NULL)
+ {
+ free (hashcodes);
+ return 0;
+ }
+
+ /* Compute the "optimal" size for the hash table. The criteria is a
+ minimal chain length. The minor criteria is (of course) the size
+ of the table. */
+ for (i = minsize; i < maxsize; ++i)
+ {
+ /* Walk through the array of hashcodes and count the collisions. */
+ BFD_HOST_U_64_BIT max;
+ unsigned long int j;
+ unsigned long int fact;
+
+ memset (counts, '\0', i * sizeof (unsigned long int));
+
+ /* Determine how often each hash bucket is used. */
+ for (j = 0; j < nsyms; ++j)
+ ++counts[hashcodes[j] % i];
+
+ /* For the weight function we need some information about the
+ pagesize on the target. This is information need not be 100%
+ accurate. Since this information is not available (so far) we
+ define it here to a reasonable default value. If it is crucial
+ to have a better value some day simply define this value. */
+# ifndef BFD_TARGET_PAGESIZE
+# define BFD_TARGET_PAGESIZE (4096)
+# endif
+
+ /* We in any case need 2 + NSYMS entries for the size values and
+ the chains. */
+ max = (2 + nsyms) * (ARCH_SIZE / 8);
+
+# if 1
+ /* Variant 1: optimize for short chains. We add the squares
+ of all the chain lengths (which favous many small chain
+ over a few long chains). */
+ for (j = 0; j < i; ++j)
+ max += counts[j] * counts[j];
+
+ /* This adds penalties for the overall size of the table. */
+ fact = i / (BFD_TARGET_PAGESIZE / (ARCH_SIZE / 8)) + 1;
+ max *= fact * fact;
+# else
+ /* Variant 2: Optimize a lot more for small table. Here we
+ also add squares of the size but we also add penalties for
+ empty slots (the +1 term). */
+ for (j = 0; j < i; ++j)
+ max += (1 + counts[j]) * (1 + counts[j]);
+
+ /* The overall size of the table is considered, but not as
+ strong as in variant 1, where it is squared. */
+ fact = i / (BFD_TARGET_PAGESIZE / (ARCH_SIZE / 8)) + 1;
+ max *= fact;
+# endif
+
+ /* Compare with current best results. */
+ if (max < best_chlen)
+ {
+ best_chlen = max;
+ best_size = i;
+ }
+ }
+
+ free (counts);
+ }
+ else
+#endif /* defined (BFD_HOST_U_64_BIT) */
+ {
+ /* This is the fallback solution if no 64bit type is available or if we
+ are not supposed to spend much time on optimizations. We select the
+ bucket count using a fixed set of numbers. */
+ for (i = 0; elf_buckets[i] != 0; i++)
+ {
+ best_size = elf_buckets[i];
+ if (dynsymcount < elf_buckets[i + 1])
+ break;
+ }
+ }
+
+ /* Free the arrays we needed. */
+ free (hashcodes);
+
+ return best_size;
+}
+
/* Set up the sizes and contents of the ELF dynamic sections. This is
called by the ELF linker emulation before_allocation routine. We
must set the sizes of the sections before the linker sets the
@@ -2206,7 +2726,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
bfd_size_type soname_indx;
bfd *dynobj;
struct elf_backend_data *bed;
- bfd_size_type old_dynsymcount;
struct elf_assign_sym_version_info asvinfo;
*sinterpptr = NULL;
@@ -2230,20 +2749,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (dynobj == NULL)
return true;
- /* If we are supposed to export all symbols into the dynamic symbol
- table (this is not the normal case), then do so. */
- if (export_dynamic)
- {
- struct elf_info_failed eif;
-
- eif.failed = false;
- eif.info = info;
- elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol,
- (PTR) &eif);
- if (eif.failed)
- return false;
- }
-
if (elf_hash_table (info)->dynamic_sections_created)
{
struct elf_info_failed eif;
@@ -2306,12 +2811,25 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
}
}
+ /* If we are supposed to export all symbols into the dynamic symbol
+ table (this is not the normal case), then do so. */
+ if (export_dynamic)
+ {
+ struct elf_info_failed eif;
+
+ eif.failed = false;
+ eif.info = info;
+ elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol,
+ (PTR) &eif);
+ if (eif.failed)
+ return false;
+ }
+
/* Attach all the symbols to their version information. */
asvinfo.output_bfd = output_bfd;
asvinfo.info = info;
asvinfo.verdefs = verdefs;
asvinfo.export_dynamic = export_dynamic;
- asvinfo.removed_dynamic = false;
asvinfo.failed = false;
elf_link_hash_traverse (elf_hash_table (info),
@@ -2333,8 +2851,14 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
/* Add some entries to the .dynamic section. We fill in some of the
values later, in elf_bfd_final_link, but we must add the entries
now so that we know the final size of the .dynamic section. */
- h = elf_link_hash_lookup (elf_hash_table (info), "_init", false,
- false, false);
+
+ /* 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),
+ info->init_function, false,
+ false, false)
+ : NULL);
if (h != NULL
&& (h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_DEF_REGULAR)) != 0)
@@ -2342,8 +2866,11 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (! elf_add_dynamic_entry (info, DT_INIT, 0))
return false;
}
- h = elf_link_hash_lookup (elf_hash_table (info), "_fini", false,
- false, false);
+ h = (info->fini_function
+ ? elf_link_hash_lookup (elf_hash_table (info),
+ info->fini_function, false,
+ false, false)
+ : NULL);
if (h != NULL
&& (h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_DEF_REGULAR)) != 0)
@@ -2351,6 +2878,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (! elf_add_dynamic_entry (info, DT_FINI, 0))
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)
@@ -2363,17 +2891,17 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
/* The backend must work out the sizes of all the other dynamic
sections. */
- old_dynsymcount = elf_hash_table (info)->dynsymcount;
- if (! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info))
+ if (bed->elf_backend_size_dynamic_sections
+ && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info))
return false;
if (elf_hash_table (info)->dynamic_sections_created)
{
size_t dynsymcount;
asection *s;
- size_t i;
size_t bucketcount = 0;
Elf_Internal_Sym isym;
+ size_t hash_entry_size;
/* Set up the version definition section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version_d");
@@ -2384,17 +2912,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
verdefs = asvinfo.verdefs;
if (verdefs == NULL)
- {
- asection **spp;
-
- /* Don't include this section in the output file. */
- for (spp = &output_bfd->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --output_bfd->section_count;
- }
+ _bfd_strip_section_from_output (info, s);
else
{
unsigned int cdefs;
@@ -2404,23 +2922,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
Elf_Internal_Verdef def;
Elf_Internal_Verdaux defaux;
- if (asvinfo.removed_dynamic)
- {
- /* Some dynamic symbols were changed to be local
- symbols. In this case, we renumber all of the
- dynamic symbols, so that we don't have a hole. If
- the backend changed dynsymcount, then assume that the
- new symbols are at the start. This is the case on
- the MIPS. FIXME: The names of the removed symbols
- will still be in the dynamic string table, wasting
- space. */
- elf_hash_table (info)->dynsymcount =
- 1 + (elf_hash_table (info)->dynsymcount - old_dynsymcount);
- elf_link_hash_traverse (elf_hash_table (info),
- elf_link_renumber_dynsyms,
- (PTR) info);
- }
-
cdefs = 0;
size = 0;
@@ -2460,7 +2961,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (soname_indx != (bfd_size_type) -1)
{
- def.vd_hash = bfd_elf_hash ((const unsigned char *) soname);
+ def.vd_hash = bfd_elf_hash (soname);
defaux.vda_name = soname_indx;
}
else
@@ -2469,7 +2970,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
bfd_size_type indx;
name = output_bfd->filename;
- def.vd_hash = bfd_elf_hash ((const unsigned char *) name);
+ def.vd_hash = bfd_elf_hash (name);
indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
name, true, false);
if (indx == (bfd_size_type) -1)
@@ -2517,7 +3018,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
def.vd_flags |= VER_FLG_WEAK;
def.vd_ndx = t->vernum + 1;
def.vd_cnt = cdeps + 1;
- def.vd_hash = bfd_elf_hash ((const unsigned char *) t->name);
+ def.vd_hash = bfd_elf_hash (t->name);
def.vd_aux = sizeof (Elf_External_Verdef);
if (t->next != NULL)
def.vd_next = (sizeof (Elf_External_Verdef)
@@ -2587,19 +3088,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
(PTR) &sinfo);
if (elf_tdata (output_bfd)->verref == NULL)
- {
- asection **spp;
-
- /* We don't have any version definitions, so we can just
- remove the section. */
-
- for (spp = &output_bfd->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --output_bfd->section_count;
- }
+ _bfd_strip_section_from_output (info, s);
else
{
Elf_Internal_Verneed *t;
@@ -2665,8 +3154,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
{
- a->vna_hash = bfd_elf_hash ((const unsigned char *)
- a->vna_nodename);
+ a->vna_hash = bfd_elf_hash (a->vna_nodename);
indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
a->vna_nodename, true, false);
if (indx == (bfd_size_type) -1)
@@ -2691,7 +3179,12 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
}
}
- dynsymcount = elf_hash_table (info)->dynsymcount;
+ /* 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. */
+
+ dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info);
/* Work out the size of the symbol version section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version");
@@ -2699,16 +3192,10 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (dynsymcount == 0
|| (verdefs == NULL && elf_tdata (output_bfd)->verref == NULL))
{
- asection **spp;
-
- /* We don't need any symbol versions; just discard the
- section. */
- for (spp = &output_bfd->sections;
- *spp != s->output_section;
- spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --output_bfd->section_count;
+ _bfd_strip_section_from_output (info, s);
+ /* The DYNSYMCOUNT might have changed if we were going to
+ output a dynamic symbol table entry for S. */
+ dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info);
}
else
{
@@ -2744,23 +3231,22 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
elf_swap_symbol_out (output_bfd, &isym,
(PTR) (Elf_External_Sym *) s->contents);
- for (i = 0; elf_buckets[i] != 0; i++)
- {
- bucketcount = elf_buckets[i];
- if (dynsymcount < elf_buckets[i + 1])
- break;
- }
+ /* Compute the size of the hashing table. As a side effect this
+ computes the hash values for all the names we export. */
+ bucketcount = compute_bucket_count (info);
s = bfd_get_section_by_name (dynobj, ".hash");
BFD_ASSERT (s != NULL);
- s->_raw_size = (2 + bucketcount + dynsymcount) * (ARCH_SIZE / 8);
+ hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
+ s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
return false;
memset (s->contents, 0, (size_t) s->_raw_size);
- put_word (output_bfd, bucketcount, s->contents);
- put_word (output_bfd, dynsymcount, s->contents + (ARCH_SIZE / 8));
+ bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents);
+ bfd_put (8 * hash_entry_size, output_bfd, dynsymcount,
+ s->contents + hash_entry_size);
elf_hash_table (info)->bucketcount = bucketcount;
@@ -2794,13 +3280,15 @@ elf_fix_symbol_flags (h, eif)
{
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;
+ h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK);
else
{
if (h->root.u.def.section->owner != NULL
&& (bfd_get_flavour (h->root.u.def.section->owner)
== bfd_target_elf_flavour))
- h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
+ h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK);
else
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
}
@@ -2816,6 +3304,25 @@ elf_fix_symbol_flags (h, eif)
}
}
}
+ else
+ {
+ /* Unfortunately, ELF_LINK_NON_ELF is only correct if the symbol
+ was first seen in a non-ELF file. Fortunately, if the symbol
+ was first seen in an ELF file, we're probably OK unless the
+ symbol was defined in a non-ELF file. Catch that case here.
+ FIXME: We're still in trouble if the symbol was first seen in
+ a dynamic object, and then later in a non-ELF regular object. */
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+ && (h->root.u.def.section->owner != NULL
+ ? (bfd_get_flavour (h->root.u.def.section->owner)
+ != bfd_target_elf_flavour)
+ : (bfd_is_abs_section (h->root.u.def.section)
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) == 0)))
+ h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ }
/* If this is a final link, and the symbol was defined as a common
symbol in a regular object file, and there was no definition in
@@ -2837,7 +3344,37 @@ elf_fix_symbol_flags (h, eif)
&& eif->info->shared
&& eif->info->symbolic
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
+ {
+ h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.offset = (bfd_vma) -1;
+ }
+
+ /* If this is a weak defined symbol in a dynamic object, and we know
+ the real definition in the dynamic object, copy interesting flags
+ over to the real definition. */
+ if (h->weakdef != NULL)
+ {
+ struct elf_link_hash_entry *weakdef;
+
+ BFD_ASSERT (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak);
+ weakdef = h->weakdef;
+ BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
+ || weakdef->root.type == bfd_link_hash_defweak);
+ BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);
+
+ /* If the real definition is defined by a regular object file,
+ don't do anything special. See the longer description in
+ elf_adjust_dynamic_symbol, below. */
+ if ((weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+ h->weakdef = NULL;
+ else
+ weakdef->elf_link_hash_flags |=
+ (h->elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_NON_GOT_REF));
+ }
return true;
}
@@ -2875,7 +3412,10 @@ elf_adjust_dynamic_symbol (h, data)
|| (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
&& (h->weakdef == NULL || h->weakdef->dynindx == -1))))
- return true;
+ {
+ h->plt.offset = (bfd_vma) -1;
+ return true;
+ }
/* If we've already adjusted this symbol, don't do it again. This
can happen via a recursive call. */
@@ -2918,31 +3458,28 @@ elf_adjust_dynamic_symbol (h, data)
if (h->weakdef != NULL)
{
- struct elf_link_hash_entry *weakdef;
+ /* If we get to this point, we know there is an implicit
+ reference by a regular object file via the weak symbol H.
+ FIXME: Is this really true? What if the traversal finds
+ H->WEAKDEF before it finds H? */
+ h->weakdef->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak);
- weakdef = h->weakdef;
- BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
- || weakdef->root.type == bfd_link_hash_defweak);
- BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);
- if ((weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- {
- /* This symbol is defined by a regular object file, so we
- will not do anything special. Clear weakdef for the
- convenience of the processor backend. */
- h->weakdef = NULL;
- }
- else
- {
- /* There is an implicit reference by a regular object file
- via the weak symbol. */
- weakdef->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
- if (! elf_adjust_dynamic_symbol (weakdef, (PTR) eif))
- return false;
- }
+ if (! elf_adjust_dynamic_symbol (h->weakdef, (PTR) eif))
+ return false;
}
+ /* If a symbol has no type and no size and does not require a PLT
+ entry, then we are probably about to do the wrong thing here: we
+ are probably going to create a COPY reloc for an empty object.
+ This case can arise when a shared object is built with assembly
+ code, and the assembly code fails to set the symbol type. */
+ if (h->size == 0
+ && h->type == STT_NOTYPE
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ (*_bfd_error_handler)
+ (_("warning: type and size of dynamic symbol `%s' are not defined"),
+ h->root.root.string);
+
dynobj = elf_hash_table (eif->info)->dynobj;
bed = get_elf_backend_data (dynobj);
if (! (*bed->elf_backend_adjust_dynamic_symbol) (eif->info, h))
@@ -3067,6 +3604,7 @@ elf_link_assign_sym_version (h, data)
struct elf_assign_sym_version_info *sinfo =
(struct elf_assign_sym_version_info *) data;
struct bfd_link_info *info = sinfo->info;
+ struct elf_backend_data *bed;
struct elf_info_failed eif;
char *p;
@@ -3085,6 +3623,7 @@ elf_link_assign_sym_version (h, data)
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
return true;
+ bed = get_elf_backend_data (sinfo->output_bfd);
p = strchr (h->root.root.string, ELF_VER_CHR);
if (p != NULL && h->verinfo.vertree == NULL)
{
@@ -3135,11 +3674,8 @@ elf_link_assign_sym_version (h, data)
if (t->globals != NULL)
{
for (d = t->globals; d != NULL; d = d->next)
- {
- if ((d->match[0] == '*' && d->match[1] == '\0')
- || fnmatch (d->match, alc, 0) == 0)
- break;
- }
+ if ((*d->match) (d, alc))
+ break;
}
/* See if there is anything to force this symbol to
@@ -3148,18 +3684,14 @@ elf_link_assign_sym_version (h, data)
{
for (d = t->locals; d != NULL; d = d->next)
{
- if ((d->match[0] == '*' && d->match[1] == '\0')
- || fnmatch (d->match, alc, 0) == 0)
+ if ((*d->match) (d, alc))
{
if (h->dynindx != -1
&& info->shared
&& ! sinfo->export_dynamic)
{
- sinfo->removed_dynamic = true;
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- h->elf_link_hash_flags &=~
- ELF_LINK_HASH_NEEDS_PLT;
- h->dynindx = -1;
+ (*bed->elf_backend_hide_symbol) (h);
/* FIXME: The name of the symbol has
already been recorded in the dynamic
string table section. */
@@ -3217,7 +3749,7 @@ elf_link_assign_sym_version (h, data)
/* We could not find the version for a symbol when
generating a shared archive. Return an error. */
(*_bfd_error_handler)
- ("%s: undefined versioned symbol name %s",
+ (_("%s: undefined versioned symbol name %s"),
bfd_get_filename (sinfo->output_bfd), h->root.root.string);
bfd_set_error (bfd_error_bad_value);
sinfo->failed = true;
@@ -3246,7 +3778,7 @@ elf_link_assign_sym_version (h, data)
{
for (d = t->globals; d != NULL; d = d->next)
{
- if (fnmatch (d->match, h->root.root.string, 0) == 0)
+ if ((*d->match) (d, h->root.root.string))
{
h->verinfo.vertree = t;
break;
@@ -3261,19 +3793,17 @@ elf_link_assign_sym_version (h, data)
{
for (d = t->locals; d != NULL; d = d->next)
{
- if (d->match[0] == '*' && d->match[1] == '\0')
+ if (d->pattern[0] == '*' && d->pattern[1] == '\0')
deflt = t;
- else if (fnmatch (d->match, h->root.root.string, 0) == 0)
+ else if ((*d->match) (d, h->root.root.string))
{
h->verinfo.vertree = t;
if (h->dynindx != -1
&& info->shared
&& ! sinfo->export_dynamic)
{
- sinfo->removed_dynamic = true;
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
- h->dynindx = -1;
+ (*bed->elf_backend_hide_symbol) (h);
/* FIXME: The name of the symbol has already
been recorded in the dynamic string table
section. */
@@ -3294,10 +3824,8 @@ elf_link_assign_sym_version (h, data)
&& info->shared
&& ! sinfo->export_dynamic)
{
- sinfo->removed_dynamic = true;
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
- h->dynindx = -1;
+ (*bed->elf_backend_hide_symbol) (h);
/* FIXME: The name of the symbol has already been
recorded in the dynamic string table section. */
}
@@ -3306,26 +3834,6 @@ elf_link_assign_sym_version (h, data)
return true;
}
-
-/* This function is used to renumber the dynamic symbols, if some of
- them are removed because they are marked as local. This is called
- via elf_link_hash_traverse. */
-
-static boolean
-elf_link_renumber_dynsyms (h, data)
- struct elf_link_hash_entry *h;
- PTR data;
-{
- struct bfd_link_info *info = (struct bfd_link_info *) data;
-
- if (h->dynindx != -1)
- {
- h->dynindx = elf_hash_table (info)->dynsymcount;
- ++elf_hash_table (info)->dynsymcount;
- }
-
- return true;
-}
/* Final phase of ELF linker. */
@@ -3393,6 +3901,101 @@ struct elf_outext_info
struct elf_final_link_info *finfo;
};
+/* Compute the size of, and allocate space for, REL_HDR which is the
+ section header for a section containing relocations for O. */
+
+static boolean
+elf_link_size_reloc_section (abfd, rel_hdr, o)
+ bfd *abfd;
+ Elf_Internal_Shdr *rel_hdr;
+ asection *o;
+{
+ register struct elf_link_hash_entry **p, **pend;
+ unsigned reloc_count;
+
+ /* Figure out how many relocations there will be. */
+ if (rel_hdr == &elf_section_data (o)->rel_hdr)
+ reloc_count = elf_section_data (o)->rel_count;
+ else
+ reloc_count = elf_section_data (o)->rel_count2;
+
+ /* That allows us to calculate the size of the section. */
+ 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);
+ 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)
+ {
+ p = ((struct elf_link_hash_entry **)
+ bfd_malloc (o->reloc_count
+ * sizeof (struct elf_link_hash_entry *)));
+ if (p == NULL && o->reloc_count != 0)
+ return false;
+
+ elf_section_data (o)->rel_hashes = p;
+ pend = p + o->reloc_count;
+ for (; p < pend; p++)
+ *p = NULL;
+ }
+
+ return true;
+}
+
+/* When performing a relocateable link, the input relocations are
+ preserved. But, if they reference global symbols, the indices
+ referenced must be updated. Update all the relocations in
+ REL_HDR (there are COUNT of them), using the data in REL_HASH. */
+
+static void
+elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash)
+ bfd *abfd;
+ Elf_Internal_Shdr *rel_hdr;
+ unsigned int count;
+ struct elf_link_hash_entry **rel_hash;
+{
+ unsigned int i;
+
+ for (i = 0; i < count; i++, rel_hash++)
+ {
+ if (*rel_hash == NULL)
+ continue;
+
+ BFD_ASSERT ((*rel_hash)->indx >= 0);
+
+ if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
+ {
+ Elf_External_Rel *erel;
+ Elf_Internal_Rel irel;
+
+ erel = (Elf_External_Rel *) rel_hdr->contents + i;
+ 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);
+ }
+ 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);
+ irela.r_info = ELF_R_INFO ((*rel_hash)->indx,
+ ELF_R_TYPE (irela.r_info));
+ elf_swap_reloca_out (abfd, &irela, erela);
+ }
+ }
+}
+
/* Do the final step of an ELF link. */
boolean
@@ -3543,44 +4146,81 @@ elf_bfd_final_link (abfd, info)
/* Figure out the file positions for everything but the symbol table
and the relocs. We set symcount to force assign_section_numbers
to create a symbol table. */
- abfd->symcount = info->strip == strip_all ? 0 : 1;
+ bfd_get_symcount (abfd) = info->strip == strip_all ? 0 : 1;
BFD_ASSERT (! abfd->output_has_begun);
if (! _bfd_elf_compute_section_file_positions (abfd, info))
goto error_return;
+ /* 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)
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ for (o = sub->sections; o != NULL; o = o->next)
+ {
+ asection *output_section;
+
+ if (! o->linker_mark)
+ {
+ /* This section was omitted from the link. */
+ continue;
+ }
+
+ output_section = o->output_section;
+
+ if (output_section != NULL
+ && (o->flags & SEC_RELOC) != 0)
+ {
+ struct bfd_elf_section_data *esdi
+ = elf_section_data (o);
+ struct bfd_elf_section_data *esdo
+ = elf_section_data (output_section);
+ unsigned int *rel_count;
+ unsigned int *rel_count2;
+
+ /* We must be careful to add the relocation froms the
+ input section to the right output count. */
+ if (esdi->rel_hdr.sh_entsize == esdo->rel_hdr.sh_entsize)
+ {
+ rel_count = &esdo->rel_count;
+ rel_count2 = &esdo->rel_count2;
+ }
+ else
+ {
+ rel_count = &esdo->rel_count2;
+ rel_count2 = &esdo->rel_count;
+ }
+
+ *rel_count += (esdi->rel_hdr.sh_size
+ / esdi->rel_hdr.sh_entsize);
+ if (esdi->rel_hdr2)
+ *rel_count2 += (esdi->rel_hdr2->sh_size
+ / esdi->rel_hdr2->sh_entsize);
+ }
+ }
+
/* That created the reloc sections. Set their sizes, and assign
them file positions, and allocate some buffers. */
for (o = abfd->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_RELOC) != 0)
{
- Elf_Internal_Shdr *rel_hdr;
- register struct elf_link_hash_entry **p, **pend;
-
- rel_hdr = &elf_section_data (o)->rel_hdr;
-
- rel_hdr->sh_size = rel_hdr->sh_entsize * o->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);
- if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0)
+ if (!elf_link_size_reloc_section (abfd,
+ &elf_section_data (o)->rel_hdr,
+ o))
goto error_return;
- p = ((struct elf_link_hash_entry **)
- bfd_malloc (o->reloc_count
- * sizeof (struct elf_link_hash_entry *)));
- if (p == NULL && o->reloc_count != 0)
+ if (elf_section_data (o)->rel_hdr2
+ && !elf_link_size_reloc_section (abfd,
+ elf_section_data (o)->rel_hdr2,
+ o))
goto error_return;
- elf_section_data (o)->rel_hashes = p;
- pend = p + o->reloc_count;
- for (; p < pend; p++)
- *p = NULL;
-
- /* Use the reloc_count field as an index when outputting the
- relocs. */
- o->reloc_count = 0;
}
+
+ /* Now, reset REL_COUNT and REL_COUNT2 so that we can use them
+ to count upwards while actually outputting the relocations. */
+ elf_section_data (o)->rel_count = 0;
+ elf_section_data (o)->rel_count2 = 0;
}
_bfd_elf_assign_file_positions_for_relocs (abfd);
@@ -3589,7 +4229,7 @@ elf_bfd_final_link (abfd, info)
.symtab and .strtab. We start the .symtab section at the current
file position, and write directly to it. We build the .strtab
section in memory. */
- abfd->symcount = 0;
+ bfd_get_symcount (abfd) = 0;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* sh_name is set in prep_headers. */
symtab_hdr->sh_type = SHT_SYMTAB;
@@ -3664,7 +4304,7 @@ elf_bfd_final_link (abfd, info)
{
o = section_from_elf_index (abfd, i);
if (o != NULL)
- o->target_index = abfd->symcount;
+ o->target_index = bfd_get_symcount (abfd);
elfsym.st_shndx = i;
if (info->relocateable || o == NULL)
elfsym.st_value = 0;
@@ -3682,7 +4322,8 @@ elf_bfd_final_link (abfd, info)
finfo.external_relocs = (PTR) bfd_malloc (max_external_reloc_size);
finfo.internal_relocs = ((Elf_Internal_Rela *)
bfd_malloc (max_internal_reloc_count
- * sizeof (Elf_Internal_Rela)));
+ * sizeof (Elf_Internal_Rela)
+ * bed->s->int_rels_per_ext_rel));
finfo.external_syms = ((Elf_External_Sym *)
bfd_malloc (max_sym_count
* sizeof (Elf_External_Sym)));
@@ -3721,7 +4362,7 @@ elf_bfd_final_link (abfd, info)
we could write the relocs out and then read them again; I don't
know how bad the memory loss will be. */
- for (sub = info->input_bfds; sub != NULL; sub = sub->next)
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
sub->output_has_begun = false;
for (o = abfd->sections; o != NULL; o = o->next)
{
@@ -3754,9 +4395,11 @@ elf_bfd_final_link (abfd, info)
}
/* That wrote out all the local symbols. Finish up the symbol table
- with the global symbols. */
+ 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. */
- if (info->strip != strip_all && info->shared)
+ if (info->shared)
{
/* Output any global symbols that got converted to local in a
version script. We do this in a separate step since ELF
@@ -3773,11 +4416,79 @@ elf_bfd_final_link (abfd, info)
return false;
}
- /* The sh_info field records the index of the first non local
- symbol. */
- symtab_hdr->sh_info = abfd->symcount;
+ /* The sh_info field records the index of the first non local symbol. */
+ symtab_hdr->sh_info = bfd_get_symcount (abfd);
+
if (dynamic)
- elf_section_data (finfo.dynsym_sec->output_section)->this_hdr.sh_info = 1;
+ {
+ Elf_Internal_Sym sym;
+ Elf_External_Sym *dynsym =
+ (Elf_External_Sym *)finfo.dynsym_sec->contents;
+ long last_local = 0;
+
+ /* Write out the section symbols for the output sections. */
+ if (info->shared)
+ {
+ asection *s;
+
+ sym.st_size = 0;
+ sym.st_name = 0;
+ sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
+ sym.st_other = 0;
+
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ int indx;
+ indx = elf_section_data (s)->this_idx;
+ BFD_ASSERT (indx > 0);
+ sym.st_shndx = indx;
+ sym.st_value = s->vma;
+
+ elf_swap_symbol_out (abfd, &sym,
+ dynsym + elf_section_data (s)->dynindx);
+ }
+
+ last_local = bfd_count_sections (abfd);
+ }
+
+ /* Write out the local dynsyms. */
+ if (elf_hash_table (info)->dynlocal)
+ {
+ struct elf_link_local_dynamic_entry *e;
+ for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
+ {
+ asection *s;
+
+ sym.st_size = e->isym.st_size;
+ sym.st_other = e->isym.st_other;
+
+ /* Copy the internal symbol as is.
+ Note that we saved a word of storage and overwrote
+ the original st_name with the dynstr_index. */
+ sym = e->isym;
+
+ if (e->isym.st_shndx > 0 && e->isym.st_shndx < SHN_LORESERVE)
+ {
+ s = bfd_section_from_elf_index (e->input_bfd,
+ e->isym.st_shndx);
+
+ sym.st_shndx =
+ elf_section_data (s->output_section)->this_idx;
+ sym.st_value = (s->output_section->vma
+ + s->output_offset
+ + e->isym.st_value);
+ }
+
+ if (last_local < e->dynindx)
+ last_local = e->dynindx;
+
+ elf_swap_symbol_out (abfd, &sym, dynsym + e->dynindx);
+ }
+ }
+
+ elf_section_data (finfo.dynsym_sec->output_section)->this_hdr.sh_info =
+ last_local + 1;
+ }
/* We get the global symbols from the hash table. */
eoinfo.failed = false;
@@ -3788,6 +4499,18 @@ elf_bfd_final_link (abfd, info)
if (eoinfo.failed)
return false;
+ /* If backend needs to output some symbols not present in the hash
+ table, do it now. */
+ if (bed->elf_backend_output_arch_syms)
+ {
+ if (! (*bed->elf_backend_output_arch_syms)
+ (abfd, info, (PTR) &finfo,
+ (boolean (*) PARAMS ((PTR, const char *,
+ Elf_Internal_Sym *, asection *)))
+ elf_link_output_sym))
+ return false;
+ }
+
/* Flush all symbols to the file. */
if (! elf_link_flush_output_syms (&finfo))
return false;
@@ -3812,7 +4535,7 @@ elf_bfd_final_link (abfd, info)
off = _bfd_elf_assign_file_position_for_section (symstrtab_hdr, off, true);
elf_tdata (abfd)->next_file_pos = off;
- if (abfd->symcount > 0)
+ if (bfd_get_symcount (abfd) > 0)
{
if (bfd_seek (abfd, symstrtab_hdr->sh_offset, SEEK_SET) != 0
|| ! _bfd_stringtab_emit (abfd, finfo.symstrtab))
@@ -3822,47 +4545,17 @@ elf_bfd_final_link (abfd, info)
/* Adjust the relocs to have the correct symbol indices. */
for (o = abfd->sections; o != NULL; o = o->next)
{
- struct elf_link_hash_entry **rel_hash;
- Elf_Internal_Shdr *rel_hdr;
-
if ((o->flags & SEC_RELOC) == 0)
continue;
- rel_hash = elf_section_data (o)->rel_hashes;
- rel_hdr = &elf_section_data (o)->rel_hdr;
- for (i = 0; i < o->reloc_count; i++, rel_hash++)
- {
- if (*rel_hash == NULL)
- continue;
-
- BFD_ASSERT ((*rel_hash)->indx >= 0);
-
- if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
- {
- Elf_External_Rel *erel;
- Elf_Internal_Rel irel;
-
- erel = (Elf_External_Rel *) rel_hdr->contents + i;
- 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);
- }
- 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);
- irela.r_info = ELF_R_INFO ((*rel_hash)->indx,
- ELF_R_TYPE (irela.r_info));
- elf_swap_reloca_out (abfd, &irela, erela);
- }
- }
+ 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_count));
/* Set the reloc_count field to 0 to prevent write_relocs from
trying to swap the relocs out itself. */
@@ -3893,15 +4586,11 @@ elf_bfd_final_link (abfd, info)
{
default:
break;
-
- /* SVR4 linkers seem to set DT_INIT and DT_FINI based on
- magic _init and _fini symbols. This is pretty ugly,
- but we are compatible. */
case DT_INIT:
- name = "_init";
+ name = info->init_function;
goto get_sym;
case DT_FINI:
- name = "_fini";
+ name = info->fini_function;
get_sym:
{
struct elf_link_hash_entry *h;
@@ -4118,6 +4807,8 @@ elf_link_output_sym (finfo, name, elfsym, input_sec)
if (name == (const char *) NULL || *name == '\0')
elfsym->st_name = 0;
+ else if (input_sec->flags & SEC_EXCLUDE)
+ elfsym->st_name = 0;
else
{
elfsym->st_name = (unsigned long) _bfd_stringtab_add (finfo->symstrtab,
@@ -4137,7 +4828,7 @@ elf_link_output_sym (finfo, name, elfsym, input_sec)
(PTR) (finfo->symbuf + finfo->symbuf_count));
++finfo->symbuf_count;
- ++finfo->output_bfd->symcount;
+ ++ bfd_get_symcount (finfo->output_bfd);
return true;
}
@@ -4207,14 +4898,15 @@ 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->shared
+ && ! (finfo->info->shared
+ && !finfo->info->no_undefined)
&& h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
{
if (! ((*finfo->info->callbacks->undefined_symbol)
(finfo->info, h->root.root.string, h->root.u.undef.abfd,
- (asection *) NULL, 0)))
+ (asection *) NULL, 0, true)))
{
eoinfo->failed = true;
return false;
@@ -4242,8 +4934,10 @@ elf_link_output_extsym (h, data)
strip = false;
/* If we're stripping it, and it's not a dynamic symbol, there's
- nothing else to do. */
- if (strip && h->dynindx == -1)
+ nothing else to do unless it is a forced local symbol. */
+ if (strip
+ && h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
return true;
sym.st_value = 0;
@@ -4285,6 +4979,11 @@ elf_link_output_extsym (h, data)
input_sec->output_section);
if (sym.st_shndx == (unsigned short) -1)
{
+ (*_bfd_error_handler)
+ (_("%s: could not find output section %s for input section %s"),
+ bfd_get_filename (finfo->output_bfd),
+ input_sec->output_section->name,
+ input_sec->name);
eoinfo->failed = true;
return false;
}
@@ -4353,16 +5052,35 @@ elf_link_output_extsym (h, data)
}
}
+ /* If we are marking the symbol as undefined, and there are no
+ non-weak references to this symbol from a regular object, then
+ mark the symbol as weak undefined; if there are non-weak
+ references, mark the symbol as strong. We can't do this earlier,
+ because it might not be marked as undefined until the
+ finish_dynamic_symbol routine gets through with it. */
+ if (sym.st_shndx == SHN_UNDEF
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) != 0
+ && (ELF_ST_BIND(sym.st_info) == STB_GLOBAL
+ || ELF_ST_BIND(sym.st_info) == STB_WEAK))
+ {
+ int bindtype;
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) != 0)
+ bindtype = STB_GLOBAL;
+ else
+ bindtype = STB_WEAK;
+ sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
+ }
+
/* If this symbol should be put in the .dynsym section, then put it
there now. We have already know the symbol index. We also fill
in the entry in the .hash section. */
if (h->dynindx != -1
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
- char *p, *copy;
- const char *name;
size_t bucketcount;
size_t bucket;
+ size_t hash_entry_size;
bfd_byte *bucketpos;
bfd_vma chain;
@@ -4373,32 +5091,17 @@ elf_link_output_extsym (h, data)
finfo->dynsym_sec->contents)
+ h->dynindx));
- /* We didn't include the version string in the dynamic string
- table, so we must not consider it in the hash table. */
- name = h->root.root.string;
- p = strchr (name, ELF_VER_CHR);
- if (p == NULL)
- copy = NULL;
- else
- {
- copy = bfd_alloc (finfo->output_bfd, p - name + 1);
- strncpy (copy, name, p - name);
- copy[p - name] = '\0';
- name = copy;
- }
-
bucketcount = elf_hash_table (finfo->info)->bucketcount;
- bucket = bfd_elf_hash ((const unsigned char *) name) % bucketcount;
+ bucket = h->elf_hash_value % bucketcount;
+ hash_entry_size
+ = elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
bucketpos = ((bfd_byte *) finfo->hash_sec->contents
- + (bucket + 2) * (ARCH_SIZE / 8));
- chain = get_word (finfo->output_bfd, bucketpos);
- put_word (finfo->output_bfd, h->dynindx, bucketpos);
- put_word (finfo->output_bfd, chain,
- ((bfd_byte *) finfo->hash_sec->contents
- + (bucketcount + 2 + h->dynindx) * (ARCH_SIZE / 8)));
-
- if (copy != NULL)
- bfd_release (finfo->output_bfd, copy);
+ + (bucket + 2) * hash_entry_size);
+ chain = bfd_get (8 * hash_entry_size, finfo->output_bfd, bucketpos);
+ bfd_put (8 * hash_entry_size, finfo->output_bfd, h->dynindx, bucketpos);
+ bfd_put (8 * hash_entry_size, finfo->output_bfd, chain,
+ ((bfd_byte *) finfo->hash_sec->contents
+ + (bucketcount + 2 + h->dynindx) * hash_entry_size));
if (finfo->symver_sec != NULL && finfo->symver_sec->contents != NULL)
{
@@ -4434,7 +5137,7 @@ elf_link_output_extsym (h, data)
if (strip)
return true;
- h->indx = finfo->output_bfd->symcount;
+ h->indx = bfd_get_symcount (finfo->output_bfd);
if (! elf_link_output_sym (finfo, h->root.root.string, &sym, input_sec))
{
@@ -4445,6 +5148,76 @@ elf_link_output_extsym (h, data)
return true;
}
+/* Copy the relocations indicated by the INTERNAL_RELOCS (which
+ originated from the section given by INPUT_REL_HDR) to the
+ OUTPUT_BFD. */
+
+static void
+elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
+ internal_relocs)
+ bfd *output_bfd;
+ asection *input_section;
+ Elf_Internal_Shdr *input_rel_hdr;
+ Elf_Internal_Rela *internal_relocs;
+{
+ Elf_Internal_Rela *irela;
+ Elf_Internal_Rela *irelaend;
+ Elf_Internal_Shdr *output_rel_hdr;
+ asection *output_section;
+ unsigned int *rel_countp = NULL;
+
+ output_section = input_section->output_section;
+ output_rel_hdr = NULL;
+
+ 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;
+ rel_countp = &elf_section_data (output_section)->rel_count;
+ }
+ else if (elf_section_data (output_section)->rel_hdr2
+ && (elf_section_data (output_section)->rel_hdr2->sh_entsize
+ == input_rel_hdr->sh_entsize))
+ {
+ output_rel_hdr = elf_section_data (output_section)->rel_hdr2;
+ rel_countp = &elf_section_data (output_section)->rel_count2;
+ }
+
+ BFD_ASSERT (output_rel_hdr != NULL);
+
+ 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))
+ {
+ Elf_External_Rel *erel;
+
+ erel = ((Elf_External_Rel *) output_rel_hdr->contents + *rel_countp);
+ for (; irela < irelaend; irela++, erel++)
+ {
+ Elf_Internal_Rel irel;
+
+ 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);
+ }
+ }
+ else
+ {
+ Elf_External_Rela *erela;
+
+ BFD_ASSERT (input_rel_hdr->sh_entsize
+ == sizeof (Elf_External_Rela));
+ erela = ((Elf_External_Rela *) output_rel_hdr->contents + *rel_countp);
+ for (; irela < irelaend; irela++, erela++)
+ elf_swap_reloca_out (output_bfd, irela, erela);
+ }
+
+ /* Bump the counter, so that we know where to add the next set of
+ relocations. */
+ *rel_countp += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize;
+}
+
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once.
This is so that we only have to read the local symbols once, and
@@ -4470,10 +5243,11 @@ elf_link_input_bfd (finfo, input_bfd)
long *pindex;
asection **ppsection;
asection *o;
+ struct elf_backend_data *bed;
output_bfd = finfo->output_bfd;
- relocate_section =
- get_elf_backend_data (output_bfd)->elf_backend_relocate_section;
+ bed = get_elf_backend_data (output_bfd);
+ relocate_section = bed->elf_backend_relocate_section;
/* If this is a dynamic object, we don't want to do anything here:
we don't want the local symbols, and we don't want the section
@@ -4608,7 +5382,7 @@ elf_link_input_bfd (finfo, input_bfd)
if (osym.st_shndx == (unsigned short) -1)
return false;
- *pindex = output_bfd->symcount;
+ *pindex = bfd_get_symcount (output_bfd);
/* ELF symbols in relocateable files are section relative, but
in executable files they are virtual addresses. Note that
@@ -4706,14 +5480,15 @@ elf_link_input_bfd (finfo, input_bfd)
Elf_Internal_Rela *irelaend;
struct elf_link_hash_entry **rel_hash;
Elf_Internal_Shdr *input_rel_hdr;
- Elf_Internal_Shdr *output_rel_hdr;
/* Adjust the reloc addresses and symbol indices. */
irela = internal_relocs;
- irelaend = irela + o->reloc_count;
+ irelaend =
+ irela + o->reloc_count * bed->s->int_rels_per_ext_rel;
rel_hash = (elf_section_data (o->output_section)->rel_hashes
- + o->output_section->reloc_count);
+ + elf_section_data (o->output_section)->rel_count
+ + elf_section_data (o->output_section)->rel_count2);
for (; irela < irelaend; irela++, rel_hash++)
{
unsigned long r_symndx;
@@ -4822,7 +5597,7 @@ elf_link_input_bfd (finfo, input_bfd)
if (! finfo->info->relocateable)
isym->st_value += osec->vma;
- finfo->indices[r_symndx] = output_bfd->symcount;
+ finfo->indices[r_symndx] = bfd_get_symcount (output_bfd);
if (! elf_link_output_sym (finfo, name, isym, sec))
return false;
@@ -4837,47 +5612,24 @@ elf_link_input_bfd (finfo, input_bfd)
/* Swap out the relocs. */
input_rel_hdr = &elf_section_data (o)->rel_hdr;
- output_rel_hdr = &elf_section_data (o->output_section)->rel_hdr;
- BFD_ASSERT (output_rel_hdr->sh_entsize
- == input_rel_hdr->sh_entsize);
- irela = internal_relocs;
- irelaend = irela + o->reloc_count;
- if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
- {
- Elf_External_Rel *erel;
-
- erel = ((Elf_External_Rel *) output_rel_hdr->contents
- + o->output_section->reloc_count);
- for (; irela < irelaend; irela++, erel++)
- {
- Elf_Internal_Rel irel;
-
- 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);
- }
- }
- else
- {
- Elf_External_Rela *erela;
-
- BFD_ASSERT (input_rel_hdr->sh_entsize
- == sizeof (Elf_External_Rela));
- erela = ((Elf_External_Rela *) output_rel_hdr->contents
- + o->output_section->reloc_count);
- for (; irela < irelaend; irela++, erela++)
- elf_swap_reloca_out (output_bfd, irela, erela);
- }
-
- o->output_section->reloc_count += o->reloc_count;
+ elf_link_output_relocs (output_bfd, o,
+ input_rel_hdr,
+ 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,
+ input_rel_hdr,
+ internal_relocs);
}
}
/* Write out the modified section contents. */
if (elf_section_data (o)->stab_info == NULL)
{
- if (! bfd_set_section_contents (output_bfd, o->output_section,
+ if (! (o->flags & SEC_EXCLUDE) &&
+ ! bfd_set_section_contents (output_bfd, o->output_section,
contents, o->output_offset,
(o->_cooked_size != 0
? o->_cooked_size
@@ -4926,7 +5678,8 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
/* Figure out the symbol index. */
rel_hash_ptr = (elf_section_data (output_section)->rel_hashes
- + output_section->reloc_count);
+ + elf_section_data (output_section)->rel_count
+ + elf_section_data (output_section)->rel_count2);
if (link_order->type == bfd_section_reloc_link_order)
{
indx = link_order->u.reloc.p->u.section->target_index;
@@ -5035,7 +5788,7 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
irel.r_offset = offset;
irel.r_info = ELF_R_INFO (indx, howto->type);
erel = ((Elf_External_Rel *) rel_hdr->contents
- + output_section->reloc_count);
+ + elf_section_data (output_section)->rel_count);
elf_swap_reloc_out (output_bfd, &irel, erel);
}
else
@@ -5047,11 +5800,11 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
irela.r_info = ELF_R_INFO (indx, howto->type);
irela.r_addend = addend;
erela = ((Elf_External_Rela *) rel_hdr->contents
- + output_section->reloc_count);
+ + elf_section_data (output_section)->rel_count);
elf_swap_reloca_out (output_bfd, &irela, erela);
}
- ++output_section->reloc_count;
+ ++elf_section_data (output_section)->rel_count;
return true;
}
@@ -5271,8 +6024,8 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, reloca
elf_swap_reloca_out (output_bfd, &outrel,
(((Elf_External_Rela *)
lsect->section->contents)
- + lsect->section->reloc_count));
- ++lsect->section->reloc_count;
+ + elf_section_data (lsect->section)->rel_count));
+ ++elf_section_data (lsect->section)->rel_count;
}
}
}
@@ -5291,3 +6044,660 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, reloca
processing. */
return relocation - linker_section_ptr->addend;
}
+
+/* Garbage collect unused sections. */
+
+static boolean elf_gc_mark
+ PARAMS ((struct bfd_link_info *info, asection *sec,
+ asection * (*gc_mark_hook)
+ PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *))));
+
+static boolean elf_gc_sweep
+ PARAMS ((struct bfd_link_info *info,
+ boolean (*gc_sweep_hook)
+ PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
+ const Elf_Internal_Rela *relocs))));
+
+static boolean elf_gc_sweep_symbol
+ PARAMS ((struct elf_link_hash_entry *h, PTR idxptr));
+
+static boolean elf_gc_allocate_got_offsets
+ PARAMS ((struct elf_link_hash_entry *h, PTR offarg));
+
+static boolean elf_gc_propagate_vtable_entries_used
+ PARAMS ((struct elf_link_hash_entry *h, PTR dummy));
+
+static boolean elf_gc_smash_unused_vtentry_relocs
+ PARAMS ((struct elf_link_hash_entry *h, PTR dummy));
+
+/* The mark phase of garbage collection. For a given section, mark
+ it, and all the sections which define symbols to which it refers. */
+
+static boolean
+elf_gc_mark (info, sec, gc_mark_hook)
+ struct bfd_link_info *info;
+ asection *sec;
+ asection * (*gc_mark_hook)
+ PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+{
+ boolean ret = true;
+
+ sec->gc_mark = 1;
+
+ /* Look through the section relocs. */
+
+ if ((sec->flags & SEC_RELOC) != 0 && sec->reloc_count > 0)
+ {
+ Elf_Internal_Rela *relstart, *rel, *relend;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ size_t nlocsyms;
+ size_t extsymoff;
+ Elf_External_Sym *locsyms, *freesyms = NULL;
+ bfd *input_bfd = sec->owner;
+ struct elf_backend_data *bed = get_elf_backend_data (input_bfd);
+
+ /* GCFIXME: how to arrange so that relocs and symbols are not
+ reread continually? */
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+
+ /* Read the local symbols. */
+ if (elf_bad_symtab (input_bfd))
+ {
+ nlocsyms = symtab_hdr->sh_size / sizeof (Elf_External_Sym);
+ extsymoff = 0;
+ }
+ else
+ extsymoff = nlocsyms = symtab_hdr->sh_info;
+ if (symtab_hdr->contents)
+ locsyms = (Elf_External_Sym *) symtab_hdr->contents;
+ else if (nlocsyms == 0)
+ locsyms = NULL;
+ else
+ {
+ locsyms = freesyms =
+ bfd_malloc (nlocsyms * sizeof (Elf_External_Sym));
+ if (freesyms == NULL
+ || bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
+ || (bfd_read (locsyms, sizeof (Elf_External_Sym),
+ nlocsyms, input_bfd)
+ != nlocsyms * sizeof (Elf_External_Sym)))
+ {
+ ret = false;
+ goto out1;
+ }
+ }
+
+ /* Read the relocations. */
+ relstart = (NAME(_bfd_elf,link_read_relocs)
+ (sec->owner, sec, NULL, (Elf_Internal_Rela *) NULL,
+ info->keep_memory));
+ if (relstart == NULL)
+ {
+ ret = false;
+ goto out1;
+ }
+ relend = relstart + sec->reloc_count * bed->s->int_rels_per_ext_rel;
+
+ for (rel = relstart; rel < relend; rel++)
+ {
+ unsigned long r_symndx;
+ asection *rsec;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym s;
+
+ r_symndx = ELF_R_SYM (rel->r_info);
+ if (r_symndx == 0)
+ continue;
+
+ if (elf_bad_symtab (sec->owner))
+ {
+ 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);
+ else
+ {
+ h = sym_hashes[r_symndx - extsymoff];
+ 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);
+ }
+ else
+ {
+ elf_swap_symbol_in (input_bfd, &locsyms[r_symndx], &s);
+ rsec = (*gc_mark_hook)(sec->owner, info, rel, NULL, &s);
+ }
+
+ if (rsec && !rsec->gc_mark)
+ if (!elf_gc_mark (info, rsec, gc_mark_hook))
+ {
+ ret = false;
+ goto out2;
+ }
+ }
+
+ out2:
+ if (!info->keep_memory)
+ free (relstart);
+ out1:
+ if (freesyms)
+ free (freesyms);
+ }
+
+ return ret;
+}
+
+/* The sweep phase of garbage collection. Remove all garbage sections. */
+
+static boolean
+elf_gc_sweep (info, gc_sweep_hook)
+ struct bfd_link_info *info;
+ boolean (*gc_sweep_hook)
+ PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
+ const Elf_Internal_Rela *relocs));
+{
+ bfd *sub;
+
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ asection *o;
+
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
+ for (o = sub->sections; o != NULL; o = o->next)
+ {
+ /* Keep special sections. Keep .debug sections. */
+ if ((o->flags & SEC_LINKER_CREATED)
+ || (o->flags & SEC_DEBUGGING))
+ o->gc_mark = 1;
+
+ if (o->gc_mark)
+ continue;
+
+ /* Skip sweeping sections already excluded. */
+ if (o->flags & SEC_EXCLUDE)
+ continue;
+
+ /* Since this is early in the link process, it is simple
+ to remove a section from the output. */
+ o->flags |= SEC_EXCLUDE;
+
+ /* But we also have to update some of the relocation
+ info we collected before. */
+ if (gc_sweep_hook
+ && (o->flags & SEC_RELOC) && o->reloc_count > 0)
+ {
+ Elf_Internal_Rela *internal_relocs;
+ boolean r;
+
+ internal_relocs = (NAME(_bfd_elf,link_read_relocs)
+ (o->owner, o, NULL, NULL, info->keep_memory));
+ if (internal_relocs == NULL)
+ return false;
+
+ r = (*gc_sweep_hook)(o->owner, info, o, internal_relocs);
+
+ if (!info->keep_memory)
+ free (internal_relocs);
+
+ if (!r)
+ return false;
+ }
+ }
+ }
+
+ /* Remove the symbols that were in the swept sections from the dynamic
+ symbol table. GCFIXME: Anyone know how to get them out of the
+ static symbol table as well? */
+ {
+ int i = 0;
+
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_gc_sweep_symbol,
+ (PTR) &i);
+
+ elf_hash_table (info)->dynsymcount = i;
+ }
+
+ return true;
+}
+
+/* Sweep symbols in swept sections. Called via elf_link_hash_traverse. */
+
+static boolean
+elf_gc_sweep_symbol (h, idxptr)
+ struct elf_link_hash_entry *h;
+ PTR idxptr;
+{
+ int *idx = (int *) idxptr;
+
+ if (h->dynindx != -1
+ && ((h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ || h->root.u.def.section->gc_mark))
+ h->dynindx = (*idx)++;
+
+ return true;
+}
+
+/* Propogate collected vtable information. This is called through
+ elf_link_hash_traverse. */
+
+static boolean
+elf_gc_propagate_vtable_entries_used (h, okp)
+ struct elf_link_hash_entry *h;
+ PTR okp;
+{
+ /* Those that are not vtables. */
+ if (h->vtable_parent == NULL)
+ return true;
+
+ /* Those vtables that do not have parents, we cannot merge. */
+ if (h->vtable_parent == (struct elf_link_hash_entry *) -1)
+ return true;
+
+ /* If we've already been done, exit. */
+ if (h->vtable_entries_used && h->vtable_entries_used[-1])
+ return true;
+
+ /* Make sure the parent's table is up to date. */
+ elf_gc_propagate_vtable_entries_used (h->vtable_parent, okp);
+
+ if (h->vtable_entries_used == NULL)
+ {
+ /* None of this table's entries were referenced. Re-use the
+ parent's table. */
+ h->vtable_entries_used = h->vtable_parent->vtable_entries_used;
+ h->vtable_entries_size = h->vtable_parent->vtable_entries_size;
+ }
+ else
+ {
+ size_t n;
+ boolean *cu, *pu;
+
+ /* Or the parent's entries into ours. */
+ cu = h->vtable_entries_used;
+ cu[-1] = true;
+ pu = h->vtable_parent->vtable_entries_used;
+ if (pu != NULL)
+ {
+ n = h->vtable_parent->vtable_entries_size / FILE_ALIGN;
+ while (--n != 0)
+ {
+ if (*pu) *cu = true;
+ pu++, cu++;
+ }
+ }
+ }
+
+ return true;
+}
+
+static boolean
+elf_gc_smash_unused_vtentry_relocs (h, okp)
+ struct elf_link_hash_entry *h;
+ PTR okp;
+{
+ asection *sec;
+ bfd_vma hstart, hend;
+ Elf_Internal_Rela *relstart, *relend, *rel;
+ struct elf_backend_data *bed;
+
+ /* Take care of both those symbols that do not describe vtables as
+ well as those that are not loaded. */
+ if (h->vtable_parent == NULL)
+ return true;
+
+ BFD_ASSERT (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak);
+
+ sec = h->root.u.def.section;
+ hstart = h->root.u.def.value;
+ hend = hstart + h->size;
+
+ relstart = (NAME(_bfd_elf,link_read_relocs)
+ (sec->owner, sec, NULL, (Elf_Internal_Rela *) NULL, true));
+ if (!relstart)
+ return *(boolean *)okp = false;
+ bed = get_elf_backend_data (sec->owner);
+ relend = relstart + sec->reloc_count * bed->s->int_rels_per_ext_rel;
+
+ for (rel = relstart; rel < relend; ++rel)
+ if (rel->r_offset >= hstart && rel->r_offset < hend)
+ {
+ /* If the entry is in use, do nothing. */
+ if (h->vtable_entries_used
+ && (rel->r_offset - hstart) < h->vtable_entries_size)
+ {
+ bfd_vma entry = (rel->r_offset - hstart) / FILE_ALIGN;
+ if (h->vtable_entries_used[entry])
+ continue;
+ }
+ /* Otherwise, kill it. */
+ rel->r_offset = rel->r_info = rel->r_addend = 0;
+ }
+
+ return true;
+}
+
+/* Do mark and sweep of unused sections. */
+
+boolean
+elf_gc_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ boolean ok = true;
+ bfd *sub;
+ asection * (*gc_mark_hook)
+ PARAMS ((bfd *abfd, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *h, Elf_Internal_Sym *));
+
+ if (!get_elf_backend_data (abfd)->can_gc_sections
+ || info->relocateable
+ || elf_hash_table (info)->dynamic_sections_created)
+ return true;
+
+ /* Apply transitive closure to the vtable entry usage info. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_gc_propagate_vtable_entries_used,
+ (PTR) &ok);
+ if (!ok)
+ return false;
+
+ /* Kill the vtable relocations that were not used. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_gc_smash_unused_vtentry_relocs,
+ (PTR) &ok);
+ if (!ok)
+ return false;
+
+ /* Grovel through relocs to find out who stays ... */
+
+ gc_mark_hook = get_elf_backend_data (abfd)->gc_mark_hook;
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ asection *o;
+
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
+ for (o = sub->sections; o != NULL; o = o->next)
+ {
+ if (o->flags & SEC_KEEP)
+ if (!elf_gc_mark (info, o, gc_mark_hook))
+ return false;
+ }
+ }
+
+ /* ... and mark SEC_EXCLUDE for those that go. */
+ if (!elf_gc_sweep(info, get_elf_backend_data (abfd)->gc_sweep_hook))
+ return false;
+
+ return true;
+}
+
+/* Called from check_relocs to record the existance of a VTINHERIT reloc. */
+
+boolean
+elf_gc_record_vtinherit (abfd, sec, h, offset)
+ bfd *abfd;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ bfd_vma offset;
+{
+ struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+ struct elf_link_hash_entry **search, *child;
+ bfd_size_type extsymcount;
+
+ /* The sh_info field of the symtab header tells us where the
+ external symbols start. We don't care about the local symbols at
+ this point. */
+ extsymcount = elf_tdata (abfd)->symtab_hdr.sh_size/sizeof (Elf_External_Sym);
+ if (!elf_bad_symtab (abfd))
+ extsymcount -= elf_tdata (abfd)->symtab_hdr.sh_info;
+
+ sym_hashes = elf_sym_hashes (abfd);
+ sym_hashes_end = sym_hashes + extsymcount;
+
+ /* Hunt down the child symbol, which is in this section at the same
+ offset as the relocation. */
+ for (search = sym_hashes; search != sym_hashes_end; ++search)
+ {
+ if ((child = *search) != NULL
+ && (child->root.type == bfd_link_hash_defined
+ || child->root.type == bfd_link_hash_defweak)
+ && child->root.u.def.section == sec
+ && child->root.u.def.value == offset)
+ goto win;
+ }
+
+ (*_bfd_error_handler) ("%s: %s+%lu: No symbol found for INHERIT",
+ bfd_get_filename (abfd), sec->name,
+ (unsigned long)offset);
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+
+win:
+ if (!h)
+ {
+ /* This *should* only be the absolute section. It could potentially
+ be that someone has defined a non-global vtable though, which
+ would be bad. It isn't worth paging in the local symbols to be
+ sure though; that case should simply be handled by the assembler. */
+
+ child->vtable_parent = (struct elf_link_hash_entry *) -1;
+ }
+ else
+ child->vtable_parent = h;
+
+ return true;
+}
+
+/* Called from check_relocs to record the existance of a VTENTRY reloc. */
+
+boolean
+elf_gc_record_vtentry (abfd, sec, h, addend)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ struct elf_link_hash_entry *h;
+ bfd_vma addend;
+{
+ if (addend >= h->vtable_entries_size)
+ {
+ size_t size, bytes;
+ boolean *ptr = h->vtable_entries_used;
+
+ /* While the symbol is undefined, we have to be prepared to handle
+ a zero size. */
+ if (h->root.type == bfd_link_hash_undefined)
+ size = addend;
+ else
+ {
+ size = h->size;
+ if (size < addend)
+ {
+ /* Oops! We've got a reference past the defined end of
+ the table. This is probably a bug -- shall we warn? */
+ size = addend;
+ }
+ }
+
+ /* Allocate one extra entry for use as a "done" flag for the
+ consolidation pass. */
+ bytes = (size / FILE_ALIGN + 1) * sizeof (boolean);
+
+ if (ptr)
+ {
+ ptr = bfd_realloc (ptr - 1, bytes);
+
+ if (ptr != NULL)
+ {
+ size_t oldbytes;
+
+ oldbytes = (h->vtable_entries_size/FILE_ALIGN + 1) * sizeof (boolean);
+ memset (((char *)ptr) + oldbytes, 0, bytes - oldbytes);
+ }
+ }
+ else
+ ptr = bfd_zmalloc (bytes);
+
+ 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;
+}
+
+/* And an accompanying bit to work out final got entry offsets once
+ we're done. Should be called from final_link. */
+
+boolean
+elf_gc_common_finalize_got_offsets (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ bfd *i;
+ struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ bfd_vma gotoff;
+
+ /* The GOT offset is relative to the .got section, but the GOT header is
+ put into the .got.plt section, if the backend uses it. */
+ if (bed->want_got_plt)
+ gotoff = 0;
+ else
+ gotoff = bed->got_header_size;
+
+ /* Do the local .got entries first. */
+ for (i = info->input_bfds; i; i = i->link_next)
+ {
+ bfd_signed_vma *local_got;
+ bfd_size_type j, locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
+
+ if (bfd_get_flavour (i) != bfd_target_elf_flavour)
+ continue;
+
+ local_got = elf_local_got_refcounts (i);
+ if (!local_got)
+ continue;
+
+ symtab_hdr = &elf_tdata (i)->symtab_hdr;
+ if (elf_bad_symtab (i))
+ locsymcount = symtab_hdr->sh_size / sizeof (Elf_External_Sym);
+ else
+ locsymcount = symtab_hdr->sh_info;
+
+ for (j = 0; j < locsymcount; ++j)
+ {
+ if (local_got[j] > 0)
+ {
+ local_got[j] = gotoff;
+ gotoff += ARCH_SIZE / 8;
+ }
+ else
+ local_got[j] = (bfd_vma) -1;
+ }
+ }
+
+ /* Then the global .got and .plt entries. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_gc_allocate_got_offsets,
+ (PTR) &gotoff);
+ return true;
+}
+
+/* We need a special top-level link routine to convert got reference counts
+ to real got offsets. */
+
+static boolean
+elf_gc_allocate_got_offsets (h, offarg)
+ struct elf_link_hash_entry *h;
+ PTR offarg;
+{
+ bfd_vma *off = (bfd_vma *) offarg;
+
+ if (h->got.refcount > 0)
+ {
+ h->got.offset = off[0];
+ off[0] += ARCH_SIZE / 8;
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
+ return true;
+}
+
+/* Many folk need no more in the way of final link than this, once
+ got entry reference counting is enabled. */
+
+boolean
+elf_gc_common_final_link (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ if (!elf_gc_common_finalize_got_offsets (abfd, info))
+ return false;
+
+ /* Invoke the regular ELF backend linker to do all the work. */
+ return elf_bfd_final_link (abfd, info);
+}
+
+/* This function will be called though elf_link_hash_traverse to store
+ all hash value of the exported symbols in an array. */
+
+static boolean
+elf_collect_hash_codes (h, data)
+ struct elf_link_hash_entry *h;
+ PTR data;
+{
+ unsigned long **valuep = (unsigned long **) data;
+ const char *name;
+ char *p;
+ unsigned long ha;
+ char *alc = NULL;
+
+ /* Ignore indirect symbols. These are added by the versioning code. */
+ if (h->dynindx == -1)
+ return true;
+
+ name = h->root.root.string;
+ p = strchr (name, ELF_VER_CHR);
+ if (p != NULL)
+ {
+ alc = bfd_malloc (p - name + 1);
+ memcpy (alc, name, p - name);
+ alc[p - name] = '\0';
+ name = alc;
+ }
+
+ /* Compute the hash value. */
+ ha = bfd_elf_hash (name);
+
+ /* Store the found hash value in the array given as the argument. */
+ *(*valuep)++ = ha;
+
+ /* And store it in the struct so that we can put it in the hash table
+ later. */
+ h->elf_hash_value = ha;
+
+ if (alc != NULL)
+ free (alc);
+
+ return true;
+}
diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h
index e4d2b3d..b1f4867 100644
--- a/contrib/binutils/bfd/elfxx-target.h
+++ b/contrib/binutils/bfd/elfxx-target.h
@@ -57,6 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers
#define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents
+#define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents
#define bfd_elfNN_get_section_contents_in_window \
_bfd_generic_get_section_contents_in_window
@@ -79,6 +80,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_plt_alignment
#define elf_backend_plt_alignment 2
#endif
+#ifndef elf_backend_want_dynbss
+#define elf_backend_want_dynbss 1
+#endif
#define bfd_elfNN_bfd_debug_info_start bfd_void
#define bfd_elfNN_bfd_debug_info_end bfd_void
@@ -93,6 +97,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_bfd_relax_section bfd_generic_relax_section
#endif
+#ifndef elf_backend_can_gc_sections
+#define elf_backend_can_gc_sections 0
+#endif
+#ifndef elf_backend_gc_mark_hook
+#define elf_backend_gc_mark_hook NULL
+#endif
+#ifndef elf_backend_gc_sweep_hook
+#define elf_backend_gc_sweep_hook NULL
+#endif
+#ifndef bfd_elfNN_bfd_gc_sections
+#define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections
+#endif
+
#define bfd_elfNN_bfd_make_debug_symbol \
((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
@@ -167,6 +184,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_mkobject bfd_elf_mkobject
#endif
+#ifndef bfd_elfNN_mkcorefile
+#define bfd_elfNN_mkcorefile bfd_elf_mkcorefile
+#endif
+
#ifndef bfd_elfNN_mkarchive
#define bfd_elfNN_mkarchive _bfd_generic_mkarchive
#endif
@@ -184,6 +205,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#ifndef ELF_MAXPAGESIZE
+ #error ELF_MAXPAGESIZE is not defined
#define ELF_MAXPAGESIZE 1
#endif
@@ -206,12 +228,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_symbol_table_processing
#define elf_backend_symbol_table_processing 0
#endif
+#ifndef elf_backend_get_symbol_type
+#define elf_backend_get_symbol_type 0
+#endif
#ifndef elf_backend_section_processing
#define elf_backend_section_processing 0
#endif
#ifndef elf_backend_section_from_shdr
#define elf_backend_section_from_shdr 0
#endif
+#ifndef elf_backend_section_from_phdr
+#define elf_backend_section_from_phdr 0
+#endif
#ifndef elf_backend_fake_sections
#define elf_backend_fake_sections 0
#endif
@@ -263,6 +291,50 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_ecoff_debug_swap
#define elf_backend_ecoff_debug_swap 0
#endif
+#ifndef elf_backend_got_header_size
+#define elf_backend_got_header_size 0
+#endif
+#ifndef elf_backend_plt_header_size
+#define elf_backend_plt_header_size 0
+#endif
+#ifndef elf_backend_post_process_headers
+#define elf_backend_post_process_headers NULL
+#endif
+#ifndef elf_backend_print_symbol_all
+#define elf_backend_print_symbol_all NULL
+#endif
+#ifndef elf_backend_output_arch_syms
+#define elf_backend_output_arch_syms NULL
+#endif
+#ifndef elf_backend_copy_indirect_symbol
+#define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect
+#endif
+#ifndef elf_backend_hide_symbol
+#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.
+ For backwards compatibility, we still support this usage. */
+#ifndef USE_REL
+#define USE_REL 0
+#else
+#undef USE_REL
+#define USE_REL 1
+#endif
+
+/* Use these in new code. */
+#ifndef elf_backend_may_use_rel_p
+#define elf_backend_may_use_rel_p USE_REL
+#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
+#define elf_backend_default_use_rela_p !USE_REL
+#endif
#ifndef ELF_MACHINE_ALT1
#define ELF_MACHINE_ALT1 0
@@ -276,28 +348,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_backend_size_info _bfd_elfNN_size_info
#endif
+#ifndef elf_backend_sign_extend_vma
+#define elf_backend_sign_extend_vma 0
+#endif
+
extern const struct elf_size_info _bfd_elfNN_size_info;
static CONST struct elf_backend_data elfNN_bed =
{
-#ifdef USE_REL
- 0, /* use_rela_p */
-#else
- 1, /* use_rela_p */
-#endif
ELF_ARCH, /* arch */
ELF_MACHINE_CODE, /* elf_machine_code */
ELF_MAXPAGESIZE, /* maxpagesize */
- elf_backend_collect,
- elf_backend_type_change_ok,
elf_info_to_howto,
elf_info_to_howto_rel,
elf_backend_sym_is_global,
elf_backend_object_p,
elf_backend_symbol_processing,
elf_backend_symbol_table_processing,
+ elf_backend_get_symbol_type,
elf_backend_section_processing,
elf_backend_section_from_shdr,
+ elf_backend_section_from_phdr,
elf_backend_fake_sections,
elf_backend_section_from_bfd_section,
elf_backend_add_symbol_hook,
@@ -314,18 +385,40 @@ static CONST struct elf_backend_data elfNN_bed =
elf_backend_final_write_processing,
elf_backend_additional_program_headers,
elf_backend_modify_segment_map,
+ elf_backend_gc_mark_hook,
+ elf_backend_gc_sweep_hook,
+ elf_backend_post_process_headers,
+ elf_backend_print_symbol_all,
+ elf_backend_output_arch_syms,
+ elf_backend_copy_indirect_symbol,
+ elf_backend_hide_symbol,
elf_backend_ecoff_debug_swap,
ELF_MACHINE_ALT1,
ELF_MACHINE_ALT2,
&elf_backend_size_info,
elf_backend_got_symbol_offset,
+ elf_backend_got_header_size,
+ elf_backend_plt_header_size,
+ elf_backend_collect,
+ elf_backend_type_change_ok,
+ elf_backend_may_use_rel_p,
+ elf_backend_may_use_rela_p,
+ elf_backend_default_use_rela_p,
+ elf_backend_sign_extend_vma,
elf_backend_want_got_plt,
elf_backend_plt_readonly,
elf_backend_want_plt_sym,
elf_backend_plt_not_loaded,
- elf_backend_plt_alignment
+ elf_backend_plt_alignment,
+ elf_backend_can_gc_sections,
+ elf_backend_want_dynbss
};
+/* Forward declaration for use when initialising alternative_target field. */
+#ifdef TARGET_LITTLE_SYM
+extern const bfd_target TARGET_LITTLE_SYM;
+#endif
+
#ifdef TARGET_BIG_SYM
const bfd_target TARGET_BIG_SYM =
{
@@ -385,14 +478,14 @@ const bfd_target TARGET_BIG_SYM =
{ bfd_false,
bfd_elfNN_mkobject,
bfd_elfNN_mkarchive,
- bfd_false
+ bfd_elfNN_mkcorefile
},
/* bfd_write_contents: write cached information into a file being written */
{ bfd_false,
bfd_elfNN_write_object_contents,
bfd_elfNN_write_archive_contents,
- bfd_false
+ bfd_elfNN_write_corefile_contents,
},
BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
@@ -409,8 +502,15 @@ const bfd_target TARGET_BIG_SYM =
BFD_JUMP_TABLE_LINK (bfd_elfNN),
BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
+ /* Alternative endian target. */
+#ifdef TARGET_LITTLE_SYM
+ & TARGET_LITTLE_SYM,
+#else
+ NULL,
+#endif
+
/* backend_data: */
- (PTR) &elfNN_bed,
+ (PTR) &elfNN_bed
};
#endif
@@ -473,14 +573,14 @@ const bfd_target TARGET_LITTLE_SYM =
{ bfd_false,
bfd_elfNN_mkobject,
bfd_elfNN_mkarchive,
- bfd_false
+ bfd_elfNN_mkcorefile
},
/* bfd_write_contents: write cached information into a file being written */
{ bfd_false,
bfd_elfNN_write_object_contents,
bfd_elfNN_write_archive_contents,
- bfd_false
+ bfd_elfNN_write_corefile_contents,
},
BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
@@ -497,7 +597,14 @@ const bfd_target TARGET_LITTLE_SYM =
BFD_JUMP_TABLE_LINK (bfd_elfNN),
BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
+ /* Alternative endian target. */
+#ifdef TARGET_BIG_SYM
+ & TARGET_BIG_SYM,
+#else
+ NULL,
+#endif
+
/* backend_data: */
- (PTR) &elfNN_bed,
+ (PTR) &elfNN_bed
};
#endif
diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c
index 7a303424..c9f1f9c 100644
--- a/contrib/binutils/bfd/format.c
+++ b/contrib/binutils/bfd/format.c
@@ -1,5 +1,5 @@
/* Generic BFD support for file formats.
- Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 1999 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -118,6 +118,7 @@ bfd_check_format_matches (abfd, format, matching)
bfd_format format;
char ***matching;
{
+ extern const bfd_target binary_vec;
const bfd_target * const *target, *save_targ, *right_targ;
char **matching_vector = NULL;
int match_count;
@@ -166,10 +167,32 @@ bfd_check_format_matches (abfd, format, matching)
free (matching_vector);
return true; /* File position has moved, BTW */
}
+
+ /* 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;
+ }
}
for (target = bfd_target_vector; *target != NULL; target++) {
- extern const bfd_target binary_vec;
const bfd_target *temp;
if (*target == &binary_vec)
diff --git a/contrib/binutils/bfd/freebsd.h b/contrib/binutils/bfd/freebsd.h
index 8bb19ac..e80c213 100644
--- a/contrib/binutils/bfd/freebsd.h
+++ b/contrib/binutils/bfd/freebsd.h
@@ -1,5 +1,5 @@
/* BFD back-end definitions used by all FreeBSD targets.
- Copyright (C) 1990, 1991, 1992, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1991, 1992, 1996, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -76,11 +76,7 @@ MY(write_object_contents) (abfd)
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
-#if CHOOSE_RELOC_SIZE
- CHOOSE_RELOC_SIZE(abfd);
-#else
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
-#endif
/* Magic number, maestro, please! */
switch (bfd_get_arch(abfd)) {
diff --git a/contrib/binutils/bfd/gen-aout.c b/contrib/binutils/bfd/gen-aout.c
index d2224f7..b5ed91a 100644
--- a/contrib/binutils/bfd/gen-aout.c
+++ b/contrib/binutils/bfd/gen-aout.c
@@ -1,5 +1,5 @@
/* Generate parameters for an a.out system.
- Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94, 98 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -82,8 +82,8 @@ main (argc, argv)
#endif
if (arch[0] == '1')
{
- fprintf (stderr, "warning: preprocessor substituted architecture name inside string;");
- fprintf (stderr, " fix DEFAULT_ARCH in the output file yourself\n");
+ fprintf (stderr, _("warning: preprocessor substituted architecture name inside string;"));
+ fprintf (stderr, _(" fix DEFAULT_ARCH in the output file yourself\n"));
arch = "unknown";
}
printf("#define DEFAULT_ARCH bfd_arch_%s\n", arch);
diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c
index 4c6e987..173eaf76 100644
--- a/contrib/binutils/bfd/hash.c
+++ b/contrib/binutils/bfd/hash.c
@@ -1,5 +1,5 @@
/* hash.c -- hash table routines for BFD
- Copyright (C) 1993, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 97, 1999 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -73,7 +73,7 @@ SUBSECTION
The function <<bfd_hash_table_init>> take as an argument a
function to use to create new entries. For a basic hash
table, use the function <<bfd_hash_newfunc>>. @xref{Deriving
- a New Hash Table Type} for why you would want to use a
+ a New Hash Table Type}, for why you would want to use a
different value for this argument.
@findex bfd_hash_allocate
@@ -450,7 +450,7 @@ struct bfd_hash_entry *
bfd_hash_newfunc (entry, table, string)
struct bfd_hash_entry *entry;
struct bfd_hash_table *table;
- const char *string;
+ const char *string ATTRIBUTE_UNUSED;
{
if (entry == (struct bfd_hash_entry *) NULL)
entry = ((struct bfd_hash_entry *)
diff --git a/contrib/binutils/bfd/hosts/alphalinux.h b/contrib/binutils/bfd/hosts/alphalinux.h
index d9ba1b7..09b8d69 100644
--- a/contrib/binutils/bfd/hosts/alphalinux.h
+++ b/contrib/binutils/bfd/hosts/alphalinux.h
@@ -1,6 +1,6 @@
/* Linux dumps "struct task_struct" at the end of the core-file. This
- structure is currently 920 bytes long, but we allow up to 1024
+ structure is currently 1080 bytes long, but we allow up to 4096
bytes to allow for some future growth. */
-#define TRAD_CORE_EXTRA_SIZE_ALLOWED 1024
+#define TRAD_CORE_EXTRA_SIZE_ALLOWED 4096
#define TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(abfd) \
((abfd)->tdata.trad_core_data->u.signal)
diff --git a/contrib/binutils/bfd/i386linux.c b/contrib/binutils/bfd/i386linux.c
index 0f4514d..5df2a11 100644
--- a/contrib/binutils/bfd/i386linux.c
+++ b/contrib/binutils/bfd/i386linux.c
@@ -1,5 +1,6 @@
/* BFD back-end for linux flavored i386 a.out binaries.
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -297,7 +298,7 @@ new_fixup (info, h, value, builtin)
static boolean
linux_link_create_dynamic_sections (abfd, info)
bfd *abfd;
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
flagword flags;
register asection *s;
@@ -446,7 +447,7 @@ linux_tally_symbols (h, data)
alloc = (char *) bfd_malloc (strlen (name) + 1);
if (p == NULL || alloc == NULL)
- (*_bfd_error_handler) ("Output file requires shared library `%s'\n",
+ (*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
name);
else
{
@@ -454,7 +455,7 @@ linux_tally_symbols (h, data)
p = strrchr (alloc, '_');
*p++ = '\0';
(*_bfd_error_handler)
- ("Output file requires shared library `%s.so.%s'\n",
+ (_("Output file requires shared library `%s.so.%s'\n"),
alloc, p);
free (alloc);
}
@@ -642,7 +643,7 @@ linux_finish_dynamic_link (output_bfd, info)
&& f->h->root.root.type != bfd_link_hash_defweak)
{
(*_bfd_error_handler)
- ("Symbol %s not defined for fixups\n",
+ (_("Symbol %s not defined for fixups\n"),
f->h->root.root.root.string);
continue;
}
@@ -692,7 +693,7 @@ linux_finish_dynamic_link (output_bfd, info)
&& f->h->root.root.type != bfd_link_hash_defweak)
{
(*_bfd_error_handler)
- ("Symbol %s not defined for fixups\n",
+ (_("Symbol %s not defined for fixups\n"),
f->h->root.root.root.string);
continue;
}
@@ -716,7 +717,7 @@ linux_finish_dynamic_link (output_bfd, info)
if (linux_hash_table (info)->fixup_count != fixups_written)
{
- (*_bfd_error_handler) ("Warning: fixup count mismatch\n");
+ (*_bfd_error_handler) (_("Warning: fixup count mismatch\n"));
while (linux_hash_table (info)->fixup_count > fixups_written)
{
bfd_put_32 (output_bfd, 0, fixup_table);
diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c
index ab09140..71b967a 100644
--- a/contrib/binutils/bfd/ieee.c
+++ b/contrib/binutils/bfd/ieee.c
@@ -1,5 +1,5 @@
/* BFD back-end for ieee-695 objects.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -32,6 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ieee.h"
#include "libieee.h"
+#include <ctype.h>
+
static boolean ieee_write_byte PARAMS ((bfd *, int));
static boolean ieee_write_2bytes PARAMS ((bfd *, int));
static boolean ieee_write_int PARAMS ((bfd *, bfd_vma));
@@ -162,7 +164,7 @@ ieee_write_id (abfd, id)
else
{
(*_bfd_error_handler)
- ("%s: string too long (%d chars, max 65535)",
+ (_("%s: string too long (%d chars, max 65535)"),
bfd_get_filename (abfd), length);
bfd_set_error (bfd_error_invalid_operation);
return false;
@@ -292,7 +294,7 @@ ieee_write_expression (abfd, value, symbol, pcrel, index)
else
{
(*_bfd_error_handler)
- ("%s: unrecognized symbol `%s' flags 0x%x",
+ (_("%s: unrecognized symbol `%s' flags 0x%x"),
bfd_get_filename (abfd), bfd_asymbol_name (symbol),
symbol->flags);
bfd_set_error (bfd_error_invalid_operation);
@@ -683,7 +685,7 @@ get_symbol (abfd,
max_index,
this_type
)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
ieee_data_type *ieee;
ieee_symbol_type *last_symbol;
unsigned int *symbol_count;
@@ -788,7 +790,7 @@ ieee_slurp_external_symbols (abfd)
break;
default:
(*_bfd_error_handler)
- ("%s: unimplemented ATI record %u for symbol %u",
+ (_("%s: unimplemented ATI record %u for symbol %u"),
bfd_get_filename (abfd), symbol_attribute_def,
symbol_name_index);
bfd_set_error (bfd_error_bad_value);
@@ -803,6 +805,44 @@ ieee_slurp_external_symbols (abfd)
parse_int (&(ieee->h), &value);
parse_int (&(ieee->h), &value);
break;
+ case ieee_atn_record_enum:
+ /* We may get call optimization information here,
+ which we just ignore. The format is
+ {$F1}${CE}{index}{$00}{$3F}{$3F}{#_of_ASNs} */
+ parse_int (&ieee->h, &value);
+ parse_int (&ieee->h, &value);
+ parse_int (&ieee->h, &value);
+ if (value != 0x3f)
+ {
+ (*_bfd_error_handler)
+ (_("%s: unexpected ATN type %d in external part"),
+ bfd_get_filename (abfd), (int) value);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ parse_int (&ieee->h, &value);
+ parse_int (&ieee->h, &value);
+ while (value > 0)
+ {
+ bfd_vma val1;
+
+ --value;
+
+ switch (read_2bytes (ieee))
+ {
+ case ieee_asn_record_enum:
+ parse_int (&ieee->h, &val1);
+ parse_int (&ieee->h, &val1);
+ break;
+
+ default:
+ (*_bfd_error_handler)
+ (_("%s: unexpected type after ATN"),
+ bfd_get_filename (abfd));
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ }
}
}
break;
@@ -823,6 +863,28 @@ ieee_slurp_external_symbols (abfd)
&extra,
&symbol->symbol.section);
+ /* Fully linked IEEE-695 files tend to give every symbol
+ an absolute value. Try to convert that back into a
+ section relative value. FIXME: This won't always to
+ the right thing. */
+ if (bfd_is_abs_section (symbol->symbol.section)
+ && (abfd->flags & HAS_RELOC) == 0)
+ {
+ bfd_vma val;
+ asection *s;
+
+ val = symbol->symbol.value;
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if (val >= s->vma && val < s->vma + s->_raw_size)
+ {
+ symbol->symbol.section = s;
+ symbol->symbol.value -= s->vma;
+ break;
+ }
+ }
+ }
+
symbol->symbol.flags = BSF_GLOBAL | BSF_EXPORT;
}
@@ -947,8 +1009,17 @@ ieee_get_symtab (abfd, location)
ieee_symbol_type *symp;
static bfd dummy_bfd;
static asymbol empty_symbol =
- /* the_bfd, name, value, attr, section */
- {&dummy_bfd, " ieee empty", (symvalue) 0, BSF_DEBUGGING, bfd_abs_section_ptr};
+ {
+ &dummy_bfd,
+ " ieee empty",
+ (symvalue) 0,
+ BSF_DEBUGGING,
+ bfd_abs_section_ptr
+#ifdef __STDC__
+ /* K&R compilers can't initialise unions. */
+ , { 0 }
+#endif
+ };
if (abfd->symcount)
{
@@ -1218,6 +1289,7 @@ ieee_slurp_debug (abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
asection *sec;
+ file_ptr debug_end;
if (ieee->w.r.debug_information_part == 0)
return true;
@@ -1227,7 +1299,13 @@ ieee_slurp_debug (abfd)
return false;
sec->flags |= SEC_DEBUGGING | SEC_HAS_CONTENTS;
sec->filepos = ieee->w.r.debug_information_part;
- sec->_raw_size = ieee->w.r.data_part - ieee->w.r.debug_information_part;
+
+ debug_end = ieee->w.r.data_part;
+ if (debug_end == 0)
+ debug_end = ieee->w.r.trailer_part;
+ if (debug_end == 0)
+ debug_end = ieee->w.r.me_record;
+ sec->_raw_size = debug_end - ieee->w.r.debug_information_part;
return true;
}
@@ -1267,7 +1345,7 @@ ieee_archive_p (abfd)
if (this_byte (&(ieee->h)) != Module_Beginning)
{
abfd->tdata.ieee_ar_data = save;
- goto error_return;
+ goto got_wrong_format_error;
}
next_byte (&(ieee->h));
@@ -1276,7 +1354,7 @@ ieee_archive_p (abfd)
{
bfd_release (abfd, ieee);
abfd->tdata.ieee_ar_data = save;
- goto error_return;
+ goto got_wrong_format_error;
}
/* Throw away the filename */
read_id (&(ieee->h));
@@ -1379,6 +1457,8 @@ ieee_archive_p (abfd)
return abfd->xvec;
+ got_wrong_format_error:
+ bfd_set_error (bfd_error_wrong_format);
error_return:
if (elts != NULL)
free (elts);
@@ -1440,7 +1520,70 @@ ieee_object_p (abfd)
/* Determine the architecture and machine type of the object file.
*/
{
- const bfd_arch_info_type *arch = bfd_scan_arch (processor);
+ const bfd_arch_info_type *arch;
+ char family[10];
+
+ /* IEEE does not specify the format of the processor identificaton
+ string, so the compiler is free to put in it whatever it wants.
+ We try here to recognize different processors belonging to the
+ m68k family. Code for other processors can be added here. */
+ if ((processor[0] == '6') && (processor[1] == '8'))
+ {
+ if (processor[2] == '3') /* 683xx integrated processors */
+ {
+ switch (processor[3])
+ {
+ case '0': /* 68302, 68306, 68307 */
+ case '2': /* 68322, 68328 */
+ case '5': /* 68356 */
+ strcpy (family, "68000"); /* MC68000-based controllers */
+ break;
+
+ case '3': /* 68330, 68331, 68332, 68333,
+ 68334, 68335, 68336, 68338 */
+ case '6': /* 68360 */
+ case '7': /* 68376 */
+ strcpy (family, "68332"); /* CPU32 and CPU32+ */
+ break;
+
+ case '4':
+ if (processor[4] == '9') /* 68349 */
+ strcpy (family, "68030"); /* CPU030 */
+ else /* 68340, 68341 */
+ strcpy (family, "68332"); /* CPU32 and CPU32+ */
+ break;
+
+ default: /* Does not exist yet */
+ strcpy (family, "68332"); /* Guess it will be CPU32 */
+ }
+ }
+ else if (toupper (processor[3]) == 'F') /* 68F333 */
+ strcpy (family, "68332"); /* CPU32 */
+ else if ((toupper (processor[3]) == 'C') /* Embedded controllers */
+ && ((toupper (processor[2]) == 'E')
+ || (toupper (processor[2]) == 'H')
+ || (toupper (processor[2]) == 'L')))
+ {
+ strcpy (family, "68");
+ strncat (family, processor + 4, 7);
+ family[9] = '\0';
+ }
+ else /* "Regular" processors */
+ {
+ strncpy (family, processor, 9);
+ family[9] = '\0';
+ }
+ }
+ else if ((strncmp (processor, "cpu32", 5) == 0) /* CPU32 and CPU32+ */
+ || (strncmp (processor, "CPU32", 5) == 0))
+ strcpy (family, "68332");
+ else
+ {
+ strncpy (family, processor, 9);
+ family[9] = '\0';
+ }
+
+ arch = bfd_scan_arch (family);
if (arch == 0)
goto got_wrong_format;
abfd->arch_info = arch;
@@ -1527,7 +1670,7 @@ fail:
void
ieee_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -1540,7 +1683,7 @@ ieee_get_symbol_info (ignore_abfd, symbol, ret)
void
ieee_print_symbol (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -3038,7 +3181,7 @@ block ()
static void
relocate_debug (output, input)
- bfd *output;
+ bfd *output ATTRIBUTE_UNUSED;
bfd *input;
{
#define IBS 400
@@ -3433,10 +3576,22 @@ ieee_write_processor (abfd)
case bfd_arch_m68k:
{
- char ab[20];
+ const char *id;
- sprintf (ab, "%lu", arch->mach);
- if (! ieee_write_id (abfd, ab))
+ switch (arch->mach)
+ {
+ default: id = "68020"; break;
+ case bfd_mach_m68000: id = "68000"; break;
+ case bfd_mach_m68008: id = "68008"; break;
+ case bfd_mach_m68010: id = "68010"; break;
+ case bfd_mach_m68020: id = "68020"; break;
+ case bfd_mach_m68030: id = "68030"; break;
+ case bfd_mach_m68040: id = "68040"; break;
+ case bfd_mach_m68060: id = "68060"; break;
+ case bfd_mach_cpu32: id = "cpu32"; break;
+ }
+
+ if (! ieee_write_id (abfd, id))
return false;
}
break;
@@ -3625,13 +3780,13 @@ ieee_find_nearest_line (abfd,
filename_ptr,
functionname_ptr,
line_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- char **filename_ptr;
- char **functionname_ptr;
- int *line_ptr;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ asymbol **symbols ATTRIBUTE_UNUSED;
+ bfd_vma offset ATTRIBUTE_UNUSED;
+ const char **filename_ptr ATTRIBUTE_UNUSED;
+ const char **functionname_ptr ATTRIBUTE_UNUSED;
+ unsigned int *line_ptr ATTRIBUTE_UNUSED;
{
return false;
}
@@ -3670,8 +3825,8 @@ ieee_generic_stat_arch_elt (abfd, buf)
static int
ieee_sizeof_headers (abfd, x)
- bfd *abfd;
- boolean x;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean x ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -3773,6 +3928,7 @@ ieee_bfd_debug_info_accumulate (abfd, section)
#define ieee_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#define ieee_bfd_relax_section bfd_generic_relax_section
+#define ieee_bfd_gc_sections bfd_generic_gc_sections
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ieee_bfd_final_link _bfd_generic_final_link
@@ -3828,5 +3984,7 @@ const bfd_target ieee_vec =
BFD_JUMP_TABLE_LINK (ieee),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0
};
diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c
index e4b098e..d00c59b 100644
--- a/contrib/binutils/bfd/ihex.c
+++ b/contrib/binutils/bfd/ihex.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -146,7 +146,7 @@ static int ihex_sizeof_headers PARAMS ((bfd *, boolean));
/* The number of bytes we put on one line during output. */
-#define CHUNK (21)
+#define CHUNK 16
/* Macros for converting between hex and binary. */
@@ -256,7 +256,7 @@ ihex_bad_byte (abfd, lineno, c, error)
buf[1] = '\0';
}
(*_bfd_error_handler)
- ("%s:%d: unexpected character `%s' in Intel Hex file\n",
+ (_("%s:%d: unexpected character `%s' in Intel Hex file\n"),
bfd_get_filename (abfd), lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
@@ -366,7 +366,7 @@ ihex_scan (abfd)
if (((- chksum) & 0xff) != (unsigned int) HEX2 (buf + 2 * i))
{
(*_bfd_error_handler)
- ("%s:%d: bad checksum in Intel Hex file (expected %u, found %u)",
+ (_("%s:%d: bad checksum in Intel Hex file (expected %u, found %u)"),
bfd_get_filename (abfd), lineno,
(- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
bfd_set_error (bfd_error_bad_value);
@@ -418,7 +418,7 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- ("%s:%d: bad extended address record length in Intel Hex file",
+ (_("%s:%d: bad extended address record length in Intel Hex file"),
bfd_get_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -435,7 +435,7 @@ ihex_scan (abfd)
if (len != 4)
{
(*_bfd_error_handler)
- ("%s:%d: bad extended start address length in Intel Hex file",
+ (_("%s:%d: bad extended start address length in Intel Hex file"),
bfd_get_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -452,7 +452,7 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- ("%s:%d: bad extended linear address record length in Intel Hex file",
+ (_("%s:%d: bad extended linear address record length in Intel Hex file"),
bfd_get_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -469,7 +469,7 @@ ihex_scan (abfd)
if (len != 2 && len != 4)
{
(*_bfd_error_handler)
- ("%s:%d: bad extended linear start address length in Intel Hex file",
+ (_("%s:%d: bad extended linear start address length in Intel Hex file"),
bfd_get_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -486,7 +486,7 @@ ihex_scan (abfd)
default:
(*_bfd_error_handler)
- ("%s:%d: unrecognized ihex type %u in Intel Hex file\n",
+ (_("%s:%d: unrecognized ihex type %u in Intel Hex file\n"),
bfd_get_filename (abfd), lineno, type);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -606,7 +606,7 @@ ihex_read_section (abfd, section, contents)
if (type != 0)
{
(*_bfd_error_handler)
- ("%s: internal error in ihex_read_section",
+ (_("%s: internal error in ihex_read_section"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -641,7 +641,7 @@ ihex_read_section (abfd, section, contents)
if ((bfd_size_type) (p - contents) < section->_raw_size)
{
(*_bfd_error_handler)
- ("%s: bad section length in ihex_read_section",
+ (_("%s: bad section length in ihex_read_section"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -855,7 +855,7 @@ ihex_write_object_contents (abfd)
sprintf_vma (buf, where);
(*_bfd_error_handler)
- ("%s: address 0x%s out of range for Intex Hex file",
+ (_("%s: address 0x%s out of range for Intex Hex file"),
bfd_get_filename (abfd), buf);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -947,8 +947,8 @@ ihex_set_arch_mach (abfd, arch, mach)
/*ARGSUSED*/
static int
ihex_sizeof_headers (abfd, exec)
- bfd *abfd;
- boolean exec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean exec ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -982,6 +982,7 @@ ihex_sizeof_headers (abfd, exec)
#define ihex_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#define ihex_bfd_relax_section bfd_generic_relax_section
+#define ihex_bfd_gc_sections bfd_generic_gc_sections
#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ihex_bfd_final_link _bfd_generic_final_link
@@ -1036,5 +1037,7 @@ const bfd_target ihex_vec =
BFD_JUMP_TABLE_LINK (ihex),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0
};
diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h
index 3e6a56a..7001d3d 100644
--- a/contrib/binutils/bfd/libaout.h
+++ b/contrib/binutils/bfd/libaout.h
@@ -232,6 +232,7 @@ enum machine_type {
M_PMAX_NETBSD = 139, /* NetBSD/pmax (MIPS little-endian) binary */
M_VAX_NETBSD = 140, /* NetBSD/vax binary */
M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary */
+ M_ARM6_NETBSD = 143, /* NetBSD/arm32 binary */
M_SPARCLET_1 = 147, /* 0x93, reserved */
M_MIPS1 = 151, /* MIPS R2000/R3000 binary */
M_MIPS2 = 152, /* MIPS R4000/R6000 binary */
@@ -243,7 +244,8 @@ enum machine_type {
M_HPUX = (0x20c % 256), /* HP 200/300 HPUX binary */
M_SPARCLET_5 = 211, /* 0xd3, reserved */
M_SPARCLET_6 = 227, /* 0xe3, reserved */
- M_SPARCLET_7 = 243 /* 0xf3, reserved */
+ /* M_SPARCLET_7 = 243 / * 0xf3, reserved */
+ M_SPARCLITE_LE = 243
};
#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 30911b2..aece1e1 100644
--- a/contrib/binutils/bfd/libbfd-in.h
+++ b/contrib/binutils/bfd/libbfd-in.h
@@ -1,6 +1,7 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@@ -317,6 +318,10 @@ extern boolean _bfd_generic_set_section_contents
((boolean (*) \
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *))) \
bfd_false)
+#define _bfd_nolink_bfd_gc_sections \
+ ((boolean (*) \
+ PARAMS ((bfd *, struct bfd_link_info *))) \
+ bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
#define _bfd_nolink_bfd_link_add_symbols \
@@ -352,10 +357,15 @@ extern boolean _bfd_stab_section_find_nearest_line
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
const char **, unsigned int *, PTR *));
+/* Find the neaderst line using DWARF 1 debugging information. */
+extern boolean _bfd_dwarf1_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+
/* 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 *));
+ const char **, unsigned int *, unsigned int));
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
@@ -469,6 +479,9 @@ extern bfd_size_type _bfd_stringtab_add
/* Write out a string table. */
extern boolean _bfd_stringtab_emit PARAMS ((bfd *, struct bfd_strtab_hash *));
+
+/* Check that endianness of input and output file match. */
+extern boolean _bfd_generic_verify_endian_match PARAMS ((bfd *, bfd *));
/* Macros to tell if bfds are read or write enabled.
@@ -490,6 +503,17 @@ void bfd_assert PARAMS ((const char*,int));
#define BFD_FAIL() \
{ bfd_assert(__FILE__,__LINE__); }
+extern void _bfd_abort PARAMS ((const char *, int, const char *))
+ ATTRIBUTE_NORETURN;
+
+/* if gcc >= 2.6, we can give a function name, too */
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
+#define __PRETTY_FUNCTION__ ((char *) NULL)
+#endif
+
+#undef abort
+#define abort() _bfd_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
+
FILE * bfd_cache_lookup_worker PARAMS ((bfd *));
extern bfd *bfd_last_cache;
diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c
index 042bdee..881af73 100644
--- a/contrib/binutils/bfd/libbfd.c
+++ b/contrib/binutils/bfd/libbfd.c
@@ -1,5 +1,5 @@
/* Assorted BFD support routines, only used internally.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -45,7 +45,7 @@ DESCRIPTION
/*ARGSUSED*/
boolean
bfd_false (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_invalid_operation);
return false;
@@ -57,7 +57,7 @@ bfd_false (ignore)
/*ARGSUSED*/
boolean
bfd_true (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
return true;
}
@@ -68,7 +68,7 @@ bfd_true (ignore)
/*ARGSUSED*/
PTR
bfd_nullvoidptr (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_invalid_operation);
return NULL;
@@ -77,7 +77,7 @@ bfd_nullvoidptr (ignore)
/*ARGSUSED*/
int
bfd_0 (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -85,7 +85,7 @@ bfd_0 (ignore)
/*ARGSUSED*/
unsigned int
bfd_0u (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -93,7 +93,7 @@ bfd_0u (ignore)
/*ARGUSED*/
long
bfd_0l (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -104,7 +104,7 @@ bfd_0l (ignore)
/*ARGSUSED*/
long
_bfd_n1 (ignore_abfd)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_invalid_operation);
return -1;
@@ -113,15 +113,15 @@ _bfd_n1 (ignore_abfd)
/*ARGSUSED*/
void
bfd_void (ignore)
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
}
/*ARGSUSED*/
boolean
_bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
- bfd *ignore_core_bfd;
- bfd *ignore_exec_bfd;
+ bfd *ignore_core_bfd ATTRIBUTE_UNUSED;
+ bfd *ignore_exec_bfd ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_invalid_operation);
return false;
@@ -133,7 +133,7 @@ _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
/*ARGSUSED*/
char *
_bfd_nocore_core_file_failing_command (ignore_abfd)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_invalid_operation);
return (char *)NULL;
@@ -145,7 +145,7 @@ _bfd_nocore_core_file_failing_command (ignore_abfd)
/*ARGSUSED*/
int
_bfd_nocore_core_file_failing_signal (ignore_abfd)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_invalid_operation);
return 0;
@@ -154,7 +154,7 @@ _bfd_nocore_core_file_failing_signal (ignore_abfd)
/*ARGSUSED*/
const bfd_target *
_bfd_dummy_target (ignore_abfd)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
{
bfd_set_error (bfd_error_wrong_format);
return 0;
@@ -232,7 +232,25 @@ real_read (where, a,b, file)
size_t b;
FILE *file;
{
+ /* FIXME - this looks like an optimization, but it's really to cover
+ up for a feature of some OSs (not solaris - sigh) that
+ ld/pe-dll.c takes advantage of (apparently) when it creates BFDs
+ internally and tries to link against them. BFD seems to be smart
+ enough to realize there are no symbol records in the "file" that
+ doesn't exist but attempts to read them anyway. On Solaris,
+ attempting to read zero bytes from a NULL file results in a core
+ dump, but on other platforms it just returns zero bytes read.
+ This makes it to something reasonable. - DJ */
+ if (a == 0 || b == 0)
+ return 0;
+
+#if defined (__VAX) && defined (VMS)
+ /* Apparently fread on Vax VMS does not keep the record length
+ information. */
+ return read (fileno (file), where, a * b);
+#else
return fread (where, a, b, file);
+#endif
}
/* Return value is amount read (FIXME: how are errors and end of file dealt
@@ -256,7 +274,10 @@ bfd_read (ptr, size, nitems, abfd)
get = size * nitems;
if (abfd->where + get > bim->size)
{
- get = bim->size - abfd->where;
+ if (bim->size < (bfd_size_type) abfd->where)
+ get = 0;
+ else
+ get = bim->size - abfd->where;
bfd_set_error (bfd_error_file_truncated);
}
memcpy (ptr, bim->buffer + abfd->where, get);
@@ -275,7 +296,7 @@ bfd_read (ptr, size, nitems, abfd)
A BFD backend may wish to override bfd_error_file_truncated to
provide something more useful (eg. no_symbols or wrong_format). */
- if (nread < (int)(size * nitems))
+ if (nread != (int) (size * nitems))
{
if (ferror (bfd_cache_lookup (abfd)))
bfd_set_error (bfd_error_system_call);
@@ -318,7 +339,6 @@ bfd_init_window (windowp)
#undef HAVE_MPROTECT /* code's not tested yet */
#if HAVE_MMAP || HAVE_MPROTECT || HAVE_MADVISE
-#include <sys/types.h>
#include <sys/mman.h>
#endif
@@ -461,10 +481,10 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
else if (debug_windows)
{
if (ok_to_map)
- fprintf (stderr, "not mapping: data=%lx mapped=%d\n",
+ fprintf (stderr, _("not mapping: data=%lx mapped=%d\n"),
(unsigned long) i->data, (int) i->mapped);
else
- fprintf (stderr, "not mapping: env var not set\n");
+ fprintf (stderr, _("not mapping: env var not set\n"));
}
#else
ok_to_map = 0;
@@ -523,7 +543,29 @@ bfd_write (ptr, size, nitems, abfd)
long nwrote;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
- abort ();
+ {
+ struct bfd_in_memory *bim = (struct bfd_in_memory *) (abfd->iostream);
+ size *= nitems;
+ if (abfd->where + size > bim->size)
+ {
+ long newsize, oldsize = (bim->size + 127) & ~127;
+ bim->size = abfd->where + size;
+ /* 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;
+ return 0;
+ }
+ }
+ }
+ memcpy (bim->buffer + abfd->where, ptr, size);
+ abfd->where += size;
+ return size;
+ }
nwrote = fwrite (ptr, 1, (size_t) (size * nitems),
bfd_cache_lookup (abfd));
@@ -638,10 +680,22 @@ bfd_seek (abfd, position, direction)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
+ 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;
+ }
+
return 0;
}
@@ -753,7 +807,7 @@ DESCRIPTION
.{* Byte swapping macros for user section data. *}
.
.#define bfd_put_8(abfd, val, ptr) \
-. (*((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) \
@@ -788,6 +842,20 @@ DESCRIPTION
.#define bfd_get_signed_64(abfd, ptr) \
. BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
.
+.#define bfd_get(bits, abfd, ptr) \
+. ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
+. : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
+. : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
+. : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
+. : (abort (), (bfd_vma) - 1))
+.
+.#define bfd_put(bits, abfd, val, ptr) \
+. ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
+. : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
+. : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
+. : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
+. : (abort (), (void) 0))
+.
*/
/*
@@ -844,7 +912,8 @@ DESCRIPTION
/* Sign extension to bfd_signed_vma. */
#define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)
-#define COERCE32(x) (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000)
+#define COERCE32(x) \
+ ((bfd_signed_vma) (long) (((unsigned long) (x) ^ 0x80000000) - 0x80000000))
#define EIGHT_GAZILLION (((BFD_HOST_64_BIT)0x80000000) << 32)
#define COERCE64(x) \
(((bfd_signed_vma) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION)
@@ -899,37 +968,57 @@ bfd_vma
bfd_getb32 (addr)
register const bfd_byte *addr;
{
- return (((((bfd_vma)addr[0] << 8) | addr[1]) << 8)
- | addr[2]) << 8 | addr[3];
+ unsigned long v;
+
+ v = (unsigned long) addr[0] << 24;
+ v |= (unsigned long) addr[1] << 16;
+ v |= (unsigned long) addr[2] << 8;
+ v |= (unsigned long) addr[3];
+ return (bfd_vma) v;
}
bfd_vma
bfd_getl32 (addr)
register const bfd_byte *addr;
{
- return (((((bfd_vma)addr[3] << 8) | addr[2]) << 8)
- | addr[1]) << 8 | addr[0];
+ unsigned long v;
+
+ v = (unsigned long) addr[0];
+ v |= (unsigned long) addr[1] << 8;
+ v |= (unsigned long) addr[2] << 16;
+ v |= (unsigned long) addr[3] << 24;
+ return (bfd_vma) v;
}
bfd_signed_vma
bfd_getb_signed_32 (addr)
register const bfd_byte *addr;
{
- return COERCE32((((((bfd_vma)addr[0] << 8) | addr[1]) << 8)
- | addr[2]) << 8 | addr[3]);
+ unsigned long v;
+
+ v = (unsigned long) addr[0] << 24;
+ v |= (unsigned long) addr[1] << 16;
+ v |= (unsigned long) addr[2] << 8;
+ v |= (unsigned long) addr[3];
+ return COERCE32 (v);
}
bfd_signed_vma
bfd_getl_signed_32 (addr)
register const bfd_byte *addr;
{
- return COERCE32((((((bfd_vma)addr[3] << 8) | addr[2]) << 8)
- | addr[1]) << 8 | addr[0]);
+ unsigned long v;
+
+ v = (unsigned long) addr[0];
+ v |= (unsigned long) addr[1] << 8;
+ v |= (unsigned long) addr[2] << 16;
+ v |= (unsigned long) addr[3] << 24;
+ return COERCE32 (v);
}
bfd_vma
bfd_getb64 (addr)
- register const bfd_byte *addr;
+ register const bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
bfd_vma low, high;
@@ -953,7 +1042,7 @@ bfd_getb64 (addr)
bfd_vma
bfd_getl64 (addr)
- register const bfd_byte *addr;
+ register const bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
bfd_vma low, high;
@@ -977,7 +1066,7 @@ bfd_getl64 (addr)
bfd_signed_vma
bfd_getb_signed_64 (addr)
- register const bfd_byte *addr;
+ register const bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
bfd_vma low, high;
@@ -1001,7 +1090,7 @@ bfd_getb_signed_64 (addr)
bfd_signed_vma
bfd_getl_signed_64 (addr)
- register const bfd_byte *addr;
+ register const bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
bfd_vma low, high;
@@ -1046,8 +1135,8 @@ bfd_putl32 (data, addr)
void
bfd_putb64 (data, addr)
- bfd_vma data;
- register bfd_byte *addr;
+ bfd_vma data ATTRIBUTE_UNUSED;
+ register bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
addr[0] = (bfd_byte)(data >> (7*8));
@@ -1065,8 +1154,8 @@ bfd_putb64 (data, addr)
void
bfd_putl64 (data, addr)
- bfd_vma data;
- register bfd_byte *addr;
+ bfd_vma data ATTRIBUTE_UNUSED;
+ register bfd_byte *addr ATTRIBUTE_UNUSED;
{
#ifdef BFD64
addr[7] = (bfd_byte)(data >> (7*8));
@@ -1092,22 +1181,29 @@ _bfd_generic_get_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
- if (count == 0)
- return true;
- if ((bfd_size_type)(offset+count) > section->_raw_size
- || bfd_seek(abfd, (file_ptr)(section->filepos + offset), SEEK_SET) == -1
- || bfd_read(location, (bfd_size_type)1, count, abfd) != count)
- return (false); /* on error */
- return (true);
+ if (count == 0)
+ return true;
+
+ if ((bfd_size_type) (offset + count) > section->_raw_size)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
+
+ if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
+ || bfd_read (location, (bfd_size_type) 1, count, abfd) != count)
+ return false;
+
+ return true;
}
boolean
_bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
- bfd *abfd;
- sec_ptr section;
- bfd_window *w;
- file_ptr offset;
- bfd_size_type count;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ sec_ptr section ATTRIBUTE_UNUSED;
+ bfd_window *w ATTRIBUTE_UNUSED;
+ file_ptr offset ATTRIBUTE_UNUSED;
+ bfd_size_type count ATTRIBUTE_UNUSED;
{
#ifdef USE_MMAP
if (count == 0)
@@ -1180,13 +1276,14 @@ DESCRIPTION
@var{x} of 1025 returns 11.
*/
-unsigned
-bfd_log2(x)
+unsigned int
+bfd_log2 (x)
bfd_vma x;
{
- unsigned result = 0;
- while ( (bfd_vma)(1<< result) < x)
- result++;
+ unsigned int result = 0;
+
+ while ((x = (x >> 1)) != 0)
+ ++result;
return result;
}
@@ -1200,3 +1297,26 @@ bfd_generic_is_local_label_name (abfd, name)
return (name[0] == locals_prefix);
}
+/* Can be used from / for bfd_merge_private_bfd_data to check that
+ endianness matches between input and output file. Returns
+ true for a match, otherwise returns false and emits an error. */
+boolean
+_bfd_generic_verify_endian_match (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ if (ibfd->xvec->byteorder != obfd->xvec->byteorder
+ && 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");
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+
+ return true;
+}
diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h
index 296bf41..d8b5c24 100644
--- a/contrib/binutils/bfd/libbfd.h
+++ b/contrib/binutils/bfd/libbfd.h
@@ -1,6 +1,7 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
Written by Cygnus Support.
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
@@ -317,6 +318,10 @@ extern boolean _bfd_generic_set_section_contents
((boolean (*) \
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *))) \
bfd_false)
+#define _bfd_nolink_bfd_gc_sections \
+ ((boolean (*) \
+ PARAMS ((bfd *, struct bfd_link_info *))) \
+ bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
#define _bfd_nolink_bfd_link_add_symbols \
@@ -352,10 +357,15 @@ extern boolean _bfd_stab_section_find_nearest_line
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
const char **, unsigned int *, PTR *));
+/* Find the neaderst line using DWARF 1 debugging information. */
+extern boolean _bfd_dwarf1_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+
/* 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 *));
+ const char **, unsigned int *, unsigned int));
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
@@ -469,6 +479,9 @@ extern bfd_size_type _bfd_stringtab_add
/* Write out a string table. */
extern boolean _bfd_stringtab_emit PARAMS ((bfd *, struct bfd_strtab_hash *));
+
+/* Check that endianness of input and output file match. */
+extern boolean _bfd_generic_verify_endian_match PARAMS ((bfd *, bfd *));
/* Macros to tell if bfds are read or write enabled.
@@ -490,6 +503,17 @@ void bfd_assert PARAMS ((const char*,int));
#define BFD_FAIL() \
{ bfd_assert(__FILE__,__LINE__); }
+extern void _bfd_abort PARAMS ((const char *, int, const char *))
+ ATTRIBUTE_NORETURN;
+
+/* if gcc >= 2.6, we can give a function name, too */
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
+#define __PRETTY_FUNCTION__ ((char *) NULL)
+#endif
+
+#undef abort
+#define abort() _bfd_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
+
FILE * bfd_cache_lookup_worker PARAMS ((bfd *));
extern bfd *bfd_last_cache;
@@ -645,12 +669,20 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_M44",
"BFD_RELOC_SPARC_L44",
"BFD_RELOC_SPARC_REGISTER",
+ "BFD_RELOC_SPARC_REV32",
"BFD_RELOC_ALPHA_GPDISP_HI16",
"BFD_RELOC_ALPHA_GPDISP_LO16",
"BFD_RELOC_ALPHA_GPDISP",
"BFD_RELOC_ALPHA_LITERAL",
"BFD_RELOC_ALPHA_ELF_LITERAL",
"BFD_RELOC_ALPHA_LITUSE",
+ "BFD_RELOC_ALPHA_USER_LITERAL",
+ "BFD_RELOC_ALPHA_USER_LITUSE_BASE",
+ "BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF",
+ "BFD_RELOC_ALPHA_USER_LITUSE_JSR",
+ "BFD_RELOC_ALPHA_USER_GPDISP",
+ "BFD_RELOC_ALPHA_USER_GPRELHIGH",
+ "BFD_RELOC_ALPHA_USER_GPRELLOW",
"BFD_RELOC_ALPHA_HINT",
"BFD_RELOC_ALPHA_LINKAGE",
"BFD_RELOC_ALPHA_CODEADDR",
@@ -669,6 +701,10 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_GOT_LO16",
"BFD_RELOC_MIPS_CALL_HI16",
"BFD_RELOC_MIPS_CALL_LO16",
+ "BFD_RELOC_MIPS_SUB",
+ "BFD_RELOC_MIPS_GOT_PAGE",
+ "BFD_RELOC_MIPS_GOT_OFST",
+ "BFD_RELOC_MIPS_GOT_DISP",
"BFD_RELOC_386_GOT32",
"BFD_RELOC_386_PLT32",
@@ -690,6 +726,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_NS32K_DISP_8_PCREL",
"BFD_RELOC_NS32K_DISP_16_PCREL",
"BFD_RELOC_NS32K_DISP_32_PCREL",
+ "BFD_RELOC_PJ_CODE_HI16",
+ "BFD_RELOC_PJ_CODE_LO16",
+ "BFD_RELOC_PJ_CODE_DIR16",
+ "BFD_RELOC_PJ_CODE_DIR32",
+ "BFD_RELOC_PJ_CODE_REL16",
+ "BFD_RELOC_PJ_CODE_REL32",
"BFD_RELOC_PPC_B26",
"BFD_RELOC_PPC_BA26",
"BFD_RELOC_PPC_TOC16",
@@ -720,9 +762,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_PPC_EMB_RELST_HA",
"BFD_RELOC_PPC_EMB_BIT_FLD",
"BFD_RELOC_PPC_EMB_RELSDA",
+ "BFD_RELOC_I370_D12",
"BFD_RELOC_CTOR",
"BFD_RELOC_ARM_PCREL_BRANCH",
"BFD_RELOC_ARM_IMMEDIATE",
+ "BFD_RELOC_ARM_ADRL_IMMEDIATE",
"BFD_RELOC_ARM_OFFSET_IMM",
"BFD_RELOC_ARM_SHIFT_IMM",
"BFD_RELOC_ARM_SWI",
@@ -738,6 +782,15 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_THUMB_IMM",
"BFD_RELOC_ARM_THUMB_SHIFT",
"BFD_RELOC_ARM_THUMB_OFFSET",
+ "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_RELOC_SH_PCDISP8BY2",
"BFD_RELOC_SH_PCDISP12BY2",
"BFD_RELOC_SH_IMM4",
@@ -765,8 +818,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_D10V_10_PCREL_L",
"BFD_RELOC_D10V_18",
"BFD_RELOC_D10V_18_PCREL",
-
-
+ "BFD_RELOC_D30V_6",
+ "BFD_RELOC_D30V_9_PCREL",
+ "BFD_RELOC_D30V_9_PCREL_R",
+ "BFD_RELOC_D30V_15",
+ "BFD_RELOC_D30V_15_PCREL",
+ "BFD_RELOC_D30V_15_PCREL_R",
+ "BFD_RELOC_D30V_21",
+ "BFD_RELOC_D30V_21_PCREL",
+ "BFD_RELOC_D30V_21_PCREL_R",
+ "BFD_RELOC_D30V_32",
+ "BFD_RELOC_D30V_32_PCREL",
"BFD_RELOC_M32R_24",
"BFD_RELOC_M32R_10_PCREL",
"BFD_RELOC_M32R_18_PCREL",
@@ -785,10 +847,48 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_V850_TDA_7_8_OFFSET",
"BFD_RELOC_V850_TDA_7_7_OFFSET",
"BFD_RELOC_V850_TDA_16_16_OFFSET",
+ "BFD_RELOC_V850_TDA_4_5_OFFSET",
+ "BFD_RELOC_V850_TDA_4_4_OFFSET",
+ "BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET",
+ "BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET",
+ "BFD_RELOC_V850_CALLT_6_7_OFFSET",
+ "BFD_RELOC_V850_CALLT_16_16_OFFSET",
"BFD_RELOC_MN10300_32_PCREL",
"BFD_RELOC_MN10300_16_PCREL",
"BFD_RELOC_TIC30_LDP",
+ "BFD_RELOC_FR30_48",
+ "BFD_RELOC_FR30_20",
+ "BFD_RELOC_FR30_6_IN_4",
+ "BFD_RELOC_FR30_8_IN_8",
+ "BFD_RELOC_FR30_9_IN_8",
+ "BFD_RELOC_FR30_10_IN_8",
+ "BFD_RELOC_FR30_9_PCREL",
+ "BFD_RELOC_FR30_12_PCREL",
+ "BFD_RELOC_MCORE_PCREL_IMM8BY4",
+ "BFD_RELOC_MCORE_PCREL_IMM11BY2",
+ "BFD_RELOC_MCORE_PCREL_IMM4BY2",
+ "BFD_RELOC_MCORE_PCREL_32",
+ "BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2",
+ "BFD_RELOC_MCORE_RVA",
+ "BFD_RELOC_AVR_7_PCREL",
+ "BFD_RELOC_AVR_13_PCREL",
+ "BFD_RELOC_AVR_16_PM",
+ "BFD_RELOC_AVR_LO8_LDI",
+ "BFD_RELOC_AVR_HI8_LDI",
+ "BFD_RELOC_AVR_HH8_LDI",
+ "BFD_RELOC_AVR_LO8_LDI_NEG",
+ "BFD_RELOC_AVR_HI8_LDI_NEG",
+ "BFD_RELOC_AVR_HH8_LDI_NEG",
+ "BFD_RELOC_AVR_LO8_LDI_PM",
+ "BFD_RELOC_AVR_HI8_LDI_PM",
+ "BFD_RELOC_AVR_HH8_LDI_PM",
+ "BFD_RELOC_AVR_LO8_LDI_PM_NEG",
+ "BFD_RELOC_AVR_HI8_LDI_PM_NEG",
+ "BFD_RELOC_AVR_HH8_LDI_PM_NEG",
+ "BFD_RELOC_AVR_CALL",
+ "BFD_RELOC_VTABLE_INHERIT",
+ "BFD_RELOC_VTABLE_ENTRY",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
@@ -804,6 +904,10 @@ bfd_generic_relax_section
struct bfd_link_info *,
boolean *));
+boolean
+bfd_generic_gc_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
bfd_byte *
bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h
index 0dc2121..9b1a026 100644
--- a/contrib/binutils/bfd/libcoff-in.h
+++ b/contrib/binutils/bfd/libcoff-in.h
@@ -1,5 +1,5 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -56,7 +56,7 @@ typedef struct coff_tdata
file_ptr sym_filepos;
struct coff_ptr_struct *raw_syments;
- unsigned int raw_syment_count;
+ unsigned long raw_syment_count;
/* These are only valid once writing has begun */
long int relocbase;
@@ -97,6 +97,9 @@ typedef struct coff_tdata
/* Used by coff_find_nearest_line. */
PTR line_info;
+ /* The timestamp from the COFF file header. */
+ long timestamp;
+
/* Copy of some of the f_flags bits in the COFF filehdr structure,
used by ARM code. */
flagword flags;
@@ -213,12 +216,14 @@ struct xcoff_section_tdata
#define xcoff_section_data(abfd, sec) \
((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata)
-/* Tdata for sections in PEI image files. */
+/* Tdata for sections in PE files. */
struct pei_section_tdata
{
/* The virtual size of the section. */
bfd_size_type virt_size;
+ /* The PE section flags. */
+ long pe_flags;
};
/* An accessor macro for the pei_section_tdata structure. */
@@ -249,6 +254,11 @@ struct coff_link_hash_entry
/* Pointer to array of auxiliary entries, if any. */
union internal_auxent *aux;
+
+ /* Flag word; legal values follow. */
+ unsigned short coff_link_hash_flags;
+ /* Symbol is a PE section symbol. */
+#define COFF_LINK_HASH_PE_SECTION_SYMBOL (01)
};
/* COFF linker hash table. */
@@ -462,6 +472,41 @@ struct coff_final_link_info
struct internal_reloc *internal_relocs;
};
+/* Most COFF variants have no way to record the alignment of a
+ section. This struct is used to set a specific alignment based on
+ the name of the section. */
+
+struct coff_section_alignment_entry
+{
+ /* The section name. */
+ const char *name;
+
+ /* This is either (unsigned int) -1, indicating that the section
+ name must match exactly, or it is the number of letters which
+ must match at the start of the name. */
+ unsigned int comparison_length;
+
+ /* These macros may be used to fill in the first two fields in a
+ structure initialization. */
+#define COFF_SECTION_NAME_EXACT_MATCH(name) (name), ((unsigned int) -1)
+#define COFF_SECTION_NAME_PARTIAL_MATCH(name) (name), (sizeof (name) - 1)
+
+ /* Only use this entry if the default section alignment for this
+ target is at least that much (as a power of two). If this field
+ is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */
+ unsigned int default_alignment_min;
+
+ /* Only use this entry if the default section alignment for this
+ target is no greater than this (as a power of two). If this
+ field is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */
+ unsigned int default_alignment_max;
+
+#define COFF_ALIGNMENT_FIELD_EMPTY ((unsigned int) -1)
+
+ /* The desired alignment for this section (as a power of two). */
+ unsigned int alignment_power;
+};
+
extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern boolean _bfd_coff_link_hash_table_init
diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h
index 4d83bd4..bee4ce9 100644
--- a/contrib/binutils/bfd/libcoff.h
+++ b/contrib/binutils/bfd/libcoff.h
@@ -1,5 +1,5 @@
/* BFD COFF object file private structure.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -56,7 +56,7 @@ typedef struct coff_tdata
file_ptr sym_filepos;
struct coff_ptr_struct *raw_syments;
- unsigned int raw_syment_count;
+ unsigned long raw_syment_count;
/* These are only valid once writing has begun */
long int relocbase;
@@ -97,6 +97,9 @@ typedef struct coff_tdata
/* Used by coff_find_nearest_line. */
PTR line_info;
+ /* The timestamp from the COFF file header. */
+ long timestamp;
+
/* Copy of some of the f_flags bits in the COFF filehdr structure,
used by ARM code. */
flagword flags;
@@ -213,12 +216,14 @@ struct xcoff_section_tdata
#define xcoff_section_data(abfd, sec) \
((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata)
-/* Tdata for sections in PEI image files. */
+/* Tdata for sections in PE files. */
struct pei_section_tdata
{
/* The virtual size of the section. */
bfd_size_type virt_size;
+ /* The PE section flags. */
+ long pe_flags;
};
/* An accessor macro for the pei_section_tdata structure. */
@@ -249,6 +254,11 @@ struct coff_link_hash_entry
/* Pointer to array of auxiliary entries, if any. */
union internal_auxent *aux;
+
+ /* Flag word; legal values follow. */
+ unsigned short coff_link_hash_flags;
+ /* Symbol is a PE section symbol. */
+#define COFF_LINK_HASH_PE_SECTION_SYMBOL (01)
};
/* COFF linker hash table. */
@@ -462,6 +472,41 @@ struct coff_final_link_info
struct internal_reloc *internal_relocs;
};
+/* Most COFF variants have no way to record the alignment of a
+ section. This struct is used to set a specific alignment based on
+ the name of the section. */
+
+struct coff_section_alignment_entry
+{
+ /* The section name. */
+ const char *name;
+
+ /* This is either (unsigned int) -1, indicating that the section
+ name must match exactly, or it is the number of letters which
+ must match at the start of the name. */
+ unsigned int comparison_length;
+
+ /* These macros may be used to fill in the first two fields in a
+ structure initialization. */
+#define COFF_SECTION_NAME_EXACT_MATCH(name) (name), ((unsigned int) -1)
+#define COFF_SECTION_NAME_PARTIAL_MATCH(name) (name), (sizeof (name) - 1)
+
+ /* Only use this entry if the default section alignment for this
+ target is at least that much (as a power of two). If this field
+ is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */
+ unsigned int default_alignment_min;
+
+ /* Only use this entry if the default section alignment for this
+ target is no greater than this (as a power of two). If this
+ field is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */
+ unsigned int default_alignment_max;
+
+#define COFF_ALIGNMENT_FIELD_EMPTY ((unsigned int) -1)
+
+ /* The desired alignment for this section (as a power of two). */
+ unsigned int alignment_power;
+};
+
extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern boolean _bfd_coff_link_hash_table_init
@@ -581,6 +626,22 @@ struct lineno_cache_entry *lineno;
/* Have the line numbers been relocated yet ? */
boolean done_lineno;
} coff_symbol_type;
+ /* COFF symbol classifications. */
+
+enum coff_symbol_classification
+{
+ /* Global symbol. */
+ COFF_SYMBOL_GLOBAL,
+ /* Common symbol. */
+ COFF_SYMBOL_COMMON,
+ /* Undefined symbol. */
+ COFF_SYMBOL_UNDEFINED,
+ /* Local symbol. */
+ COFF_SYMBOL_LOCAL,
+ /* PE section symbol. */
+ COFF_SYMBOL_PE_SECTION
+};
+
typedef struct
{
void (*_bfd_coff_swap_aux_in) PARAMS ((
@@ -648,6 +709,7 @@ typedef struct
unsigned int _bfd_auxesz;
unsigned int _bfd_relsz;
unsigned int _bfd_linesz;
+ unsigned int _bfd_filnmlen;
boolean _bfd_coff_long_filenames;
boolean _bfd_coff_long_section_names;
unsigned int _bfd_coff_default_section_alignment_power;
@@ -680,7 +742,8 @@ typedef struct
flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
bfd *abfd,
PTR internal_scnhdr,
- const char *name));
+ const char *name,
+ asection *section));
void (*_bfd_set_alignment_hook) PARAMS ((
bfd *abfd,
asection *sec,
@@ -717,7 +780,7 @@ typedef struct
arelent *r,
unsigned int shrink,
struct bfd_link_info *link_info));
- boolean (*_bfd_coff_sym_is_global) PARAMS ((
+ enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
bfd *abfd,
struct internal_syment *));
boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
@@ -761,7 +824,8 @@ typedef struct
struct bfd_link_hash_entry **hashp));
boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
- bfd * abfd ));
+ bfd * abfd,
+ struct coff_final_link_info * pfinfo));
boolean (*_bfd_coff_final_link_postscript) PARAMS ((
bfd * abfd,
struct coff_final_link_info * pfinfo));
@@ -807,6 +871,7 @@ typedef struct
#define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
#define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
#define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
+#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
#define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
#define bfd_coff_long_section_names(abfd) \
(coff_backend_info (abfd)->_bfd_coff_long_section_names)
@@ -832,8 +897,9 @@ typedef struct
#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
-#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name)\
- ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook) (abfd, scnhdr, name))
+#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\
+ ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
+ (abfd, scnhdr, name, section))
#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
@@ -856,8 +922,8 @@ typedef struct
((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
(abfd, section, reloc, shrink, link_info))
-#define bfd_coff_sym_is_global(abfd, sym)\
- ((coff_backend_info (abfd)->_bfd_coff_sym_is_global)\
+#define bfd_coff_classify_symbol(abfd, sym)\
+ ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
(abfd, sym))
#define bfd_coff_compute_section_file_positions(abfd)\
@@ -880,8 +946,8 @@ typedef struct
((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
-#define bfd_coff_link_output_has_begun(a) \
- ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
+#define bfd_coff_link_output_has_begun(a,p) \
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
#define bfd_coff_final_link_postscript(a,p) \
((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
diff --git a/contrib/binutils/bfd/libecoff.h b/contrib/binutils/bfd/libecoff.h
index ad269a5..4561805 100644
--- a/contrib/binutils/bfd/libecoff.h
+++ b/contrib/binutils/bfd/libecoff.h
@@ -1,5 +1,5 @@
/* BFD ECOFF object file private structure.
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -341,7 +341,7 @@ extern PTR _bfd_ecoff_mkobject_hook PARAMS ((bfd *, PTR filehdr, PTR aouthdr));
((void (*) PARAMS ((bfd *, asection *, PTR))) bfd_void)
extern boolean _bfd_ecoff_set_arch_mach_hook PARAMS ((bfd *abfd, PTR filehdr));
extern flagword _bfd_ecoff_styp_to_sec_flags
- PARAMS ((bfd *abfd, PTR hdr, const char *name));
+ PARAMS ((bfd *abfd, PTR hdr, const char *name, asection *section));
extern boolean _bfd_ecoff_slurp_symbol_table PARAMS ((bfd *abfd));
/* ECOFF auxiliary information swapping routines. These are the same
diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c
index 1c3c9a2..6e9ee65 100644
--- a/contrib/binutils/bfd/linker.c
+++ b/contrib/binutils/bfd/linker.c
@@ -1,5 +1,6 @@
/* linker.c -- BFD linker routines
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
This file is part of BFD, the Binary File Descriptor library.
@@ -74,7 +75,7 @@ SUBSECTION
@cindex target vector (_bfd_link_hash_table_create)
The linker routines must create a hash table, which must be
derived from <<struct bfd_link_hash_table>> described in
- <<bfdlink.c>>. @xref{Hash Tables} for information on how to
+ <<bfdlink.c>>. @xref{Hash Tables}, for information on how to
create a derived hash table. This entry point is called using
the target vector of the linker output file.
@@ -693,7 +694,7 @@ static boolean
generic_link_read_symbols (abfd)
bfd *abfd;
{
- if (abfd->outsymbols == (asymbol **) NULL)
+ if (bfd_get_outsymbols (abfd) == (asymbol **) NULL)
{
long symsize;
long symcount;
@@ -701,13 +702,13 @@ generic_link_read_symbols (abfd)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
return false;
- abfd->outsymbols = (asymbol **) bfd_alloc (abfd, symsize);
- if (abfd->outsymbols == NULL && symsize != 0)
+ bfd_get_outsymbols (abfd) = (asymbol **) bfd_alloc (abfd, symsize);
+ if (bfd_get_outsymbols (abfd) == NULL && symsize != 0)
return false;
- symcount = bfd_canonicalize_symtab (abfd, abfd->outsymbols);
+ symcount = bfd_canonicalize_symtab (abfd, bfd_get_outsymbols (abfd));
if (symcount < 0)
return false;
- abfd->symcount = symcount;
+ bfd_get_symcount (abfd) = symcount;
}
return true;
@@ -1748,8 +1749,8 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
case MDEF:
/* Handle a multiple definition. */
{
- asection *msec;
- bfd_vma mval;
+ asection *msec = NULL;
+ bfd_vma mval = 0;
switch (h->type)
{
@@ -1935,8 +1936,8 @@ _bfd_generic_final_link (abfd, info)
size_t outsymalloc;
struct generic_write_global_symbol_info wginfo;
- abfd->outsymbols = (asymbol **) NULL;
- abfd->symcount = 0;
+ bfd_get_outsymbols (abfd) = (asymbol **) NULL;
+ bfd_get_symcount (abfd) = 0;
outsymalloc = 0;
/* Mark all sections which will be included in the output file. */
@@ -1958,6 +1959,12 @@ _bfd_generic_final_link (abfd, info)
_bfd_generic_link_write_global_symbol,
(PTR) &wginfo);
+ /* Make sure we have a trailing NULL pointer on OUTSYMBOLS. We
+ shouldn't really need one, since we have SYMCOUNT, but some old
+ code still expects one. */
+ if (! generic_add_output_symbol (abfd, &outsymalloc, NULL))
+ return false;
+
if (info->relocateable)
{
/* Allocate space for the output relocs for each section. */
@@ -2047,7 +2054,7 @@ _bfd_generic_final_link (abfd, info)
}
}
}
-
+
return true;
}
@@ -2059,7 +2066,7 @@ generic_add_output_symbol (output_bfd, psymalloc, sym)
size_t *psymalloc;
asymbol *sym;
{
- if (output_bfd->symcount >= *psymalloc)
+ if (bfd_get_symcount (output_bfd) >= *psymalloc)
{
asymbol **newsyms;
@@ -2067,15 +2074,16 @@ generic_add_output_symbol (output_bfd, psymalloc, sym)
*psymalloc = 124;
else
*psymalloc *= 2;
- newsyms = (asymbol **) bfd_realloc (output_bfd->outsymbols,
+ newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd),
*psymalloc * sizeof (asymbol *));
if (newsyms == (asymbol **) NULL)
return false;
- output_bfd->outsymbols = newsyms;
+ bfd_get_outsymbols (output_bfd) = newsyms;
}
- output_bfd->outsymbols[output_bfd->symcount] = sym;
- ++output_bfd->symcount;
+ bfd_get_outsymbols (output_bfd) [bfd_get_symcount (output_bfd)] = sym;
+ if (sym != NULL)
+ ++ bfd_get_symcount (output_bfd);
return true;
}
@@ -2516,7 +2524,9 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
break;
}
ok = bfd_set_section_contents (abfd, sec, (PTR) buf,
- (file_ptr) link_order->offset, size);
+ (file_ptr)
+ (link_order->offset *
+ bfd_octets_per_byte (abfd)), size);
free (buf);
if (! ok)
return false;
@@ -2584,7 +2594,9 @@ _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) link_order->offset,
+ (file_ptr)
+ (link_order->offset *
+ bfd_octets_per_byte (abfd)),
link_order->size);
}
}
@@ -2595,7 +2607,7 @@ _bfd_default_link_order (abfd, info, sec, link_order)
static boolean
default_fill_link_order (abfd, info, sec, link_order)
bfd *abfd;
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
asection *sec;
struct bfd_link_order *link_order;
{
@@ -2618,7 +2630,9 @@ 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);
return result;
@@ -2662,7 +2676,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
types of object files. Handling this case correctly is
difficult, and sometimes impossible. */
(*_bfd_error_handler)
- ("Attempt to do relocateable link with %s input and %s output",
+ (_("Attempt to do relocateable link with %s input and %s output"),
bfd_get_target (input_bfd), bfd_get_target (output_bfd));
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -2735,7 +2749,10 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
/* Output the section contents. */
if (! bfd_set_section_contents (output_bfd, output_section,
(PTR) new_contents,
- link_order->offset, link_order->size))
+ (file_ptr)
+ (link_order->offset *
+ bfd_octets_per_byte (output_bfd)),
+ link_order->size))
goto error_return;
if (contents != NULL)
@@ -2790,8 +2807,8 @@ DESCRIPTION
boolean
_bfd_generic_link_split_section (abfd, sec)
- bfd *abfd;
- asection *sec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
{
return false;
}
diff --git a/contrib/binutils/bfd/mipsbsd.c b/contrib/binutils/bfd/mipsbsd.c
index c5ec9e1..7a680fb 100644
--- a/contrib/binutils/bfd/mipsbsd.c
+++ b/contrib/binutils/bfd/mipsbsd.c
@@ -1,5 +1,5 @@
/* BFD backend for MIPS BSD (a.out) binaries.
- Copyright (C) 1993, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 97, 98, 1999 Free Software Foundation, Inc.
Written by Ralph Campbell.
This file is part of BFD, the Binary File Descriptor library.
@@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SET_ARCH_MACH(ABFD, EXEC) \
MY(set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
MY(choose_reloc_size)(ABFD);
-void MY(set_arch_mach) PARAMS ((bfd *abfd, int machtype));
+static void MY(set_arch_mach) PARAMS ((bfd *abfd, int machtype));
static void MY(choose_reloc_size) PARAMS ((bfd *abfd));
#define MY_write_object_contents MY(write_object_contents)
@@ -66,7 +66,7 @@ static boolean MY(write_object_contents) PARAMS ((bfd *abfd));
#include "aout-target.h"
-void
+static void
MY(set_arch_mach) (abfd, machtype)
bfd *abfd;
int machtype;
@@ -187,10 +187,10 @@ MY(write_object_contents) (abfd)
*/
static bfd_reloc_status_type
mips_fix_jmp_addr (abfd,reloc_entry,symbol,data,input_section,output_bfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
struct symbol_cache_entry *symbol;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
{
@@ -240,13 +240,13 @@ mips_fix_hi16_s PARAMS ((bfd *, arelent *, asymbol *, PTR,
static bfd_reloc_status_type
mips_fix_hi16_s (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
- PTR data;
- asection *input_section;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section ATTRIBUTE_UNUSED;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
@@ -389,6 +389,8 @@ static CONST struct aout_backend_data MY(backend_data) = {
0 /* finish_dynamic_link */
};
+extern const bfd_target aout_mips_big_vec;
+
const bfd_target aout_mips_little_vec =
{
"a.out-mips-little", /* name */
@@ -425,7 +427,9 @@ const bfd_target aout_mips_little_vec =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- (PTR) MY_backend_data,
+ & aout_mips_big_vec,
+
+ (PTR) MY_backend_data
};
const bfd_target aout_mips_big_vec =
@@ -464,5 +468,7 @@ const bfd_target aout_mips_big_vec =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- (PTR) MY_backend_data,
+ & aout_mips_little_vec,
+
+ (PTR) MY_backend_data
};
diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c
index 41fab99..828c2a1 100644
--- a/contrib/binutils/bfd/netbsd-core.c
+++ b/contrib/binutils/bfd/netbsd-core.c
@@ -23,13 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include "libaout.h" /* BFD a.out internal data structures */
-#include <stdio.h>
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
#include <sys/core.h>
-#include <errno.h>
/*
* FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof(struct trapframe))
@@ -250,5 +247,7 @@ const bfd_target netbsd_core_vec =
BFD_JUMP_TABLE_LINK (_bfd_nolink),
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 ba0ce5a..760ed95 100644
--- a/contrib/binutils/bfd/netbsd.h
+++ b/contrib/binutils/bfd/netbsd.h
@@ -1,5 +1,5 @@
/* BFD back-end definitions used by all NetBSD targets.
- Copyright (C) 1990, 91, 92, 94, 95, 96, 97 1998
+ Copyright (C) 1990, 91, 92, 94, 95, 96, 97, 98, 2000
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -91,11 +91,7 @@ MY(write_object_contents) (abfd)
NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
}
-#if CHOOSE_RELOC_SIZE
- CHOOSE_RELOC_SIZE(abfd);
-#else
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
-#endif
/* Magic number, maestro, please! */
switch (bfd_get_arch(abfd)) {
diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c
index c58173c..8f10135 100644
--- a/contrib/binutils/bfd/opncls.c
+++ b/contrib/binutils/bfd/opncls.c
@@ -531,6 +531,109 @@ bfd_create (filename, templ)
}
/*
+FUNCTION
+ bfd_make_writable
+
+SYNOPSIS
+ boolean bfd_make_writable(bfd *abfd);
+
+DESCRIPTION
+ Takes a BFD as created by <<bfd_create>> and converts it
+ into one like as returned by <<bfd_openw>>. It does this
+ by converting the BFD to BFD_IN_MEMORY. It's assumed that
+ you will call <<bfd_make_readable>> on this bfd later.
+
+RETURNS
+ <<true>> is returned if all is ok, otherwise <<false>>.
+*/
+
+boolean
+bfd_make_writable(abfd)
+ bfd *abfd;
+{
+ struct bfd_in_memory *bim;
+
+ if (abfd->direction != no_direction)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
+
+ bim = (struct bfd_in_memory *) bfd_malloc (sizeof (struct bfd_in_memory));
+ abfd->iostream = (PTR) bim;
+ /* bfd_write will grow these as needed */
+ bim->size = 0;
+ bim->buffer = 0;
+
+ abfd->flags |= BFD_IN_MEMORY;
+ abfd->direction = write_direction;
+ abfd->where = 0;
+
+ return true;
+}
+
+/*
+FUNCTION
+ bfd_make_readable
+
+SYNOPSIS
+ boolean bfd_make_readable(bfd *abfd);
+
+DESCRIPTION
+ Takes a BFD as created by <<bfd_create>> and
+ <<bfd_make_writable>> and converts it into one like as
+ returned by <<bfd_openr>>. It does this by writing the
+ contents out to the memory buffer, then reversing the
+ direction.
+
+RETURNS
+ <<true>> is returned if all is ok, otherwise <<false>>. */
+
+boolean
+bfd_make_readable(abfd)
+ bfd *abfd;
+{
+ if (abfd->direction != write_direction || !(abfd->flags & BFD_IN_MEMORY))
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
+
+ if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd)))
+ return false;
+
+ if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
+ return false;
+
+
+ abfd->arch_info = &bfd_default_arch_struct;
+
+ abfd->where = 0;
+ abfd->sections = (asection *) NULL;
+ abfd->format = bfd_unknown;
+ abfd->my_archive = (bfd *) NULL;
+ abfd->origin = 0;
+ abfd->opened_once = false;
+ abfd->output_has_begun = false;
+ abfd->section_count = 0;
+ abfd->usrdata = (PTR) NULL;
+ abfd->cacheable = false;
+ abfd->flags = BFD_IN_MEMORY;
+ abfd->mtime_set = false;
+
+ abfd->target_defaulted = true;
+ abfd->direction = read_direction;
+ abfd->sections = 0;
+ abfd->symcount = 0;
+ abfd->outsymbols = 0;
+ abfd->tdata.any = 0;
+
+ bfd_check_format(abfd, bfd_object);
+
+ return true;
+}
+
+/*
INTERNAL_FUNCTION
bfd_alloc
diff --git a/contrib/binutils/bfd/osf-core.c b/contrib/binutils/bfd/osf-core.c
index ea158d2..4f4fc12 100644
--- a/contrib/binutils/bfd/osf-core.c
+++ b/contrib/binutils/bfd/osf-core.c
@@ -1,5 +1,5 @@
/* BFD back-end for OSF/1 core files.
- Copyright 1993, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 97, 1998 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-#include <stdio.h>
-#include <string.h>
#include <sys/user.h>
#include <sys/core.h>
@@ -145,7 +143,7 @@ osf_core_core_file_p (abfd)
flags = SEC_HAS_CONTENTS;
break;
default:
- (*_bfd_error_handler) ("Unhandled OSF/1 core file section type %d\n",
+ (*_bfd_error_handler) (_("Unhandled OSF/1 core file section type %d\n"),
core_scnhdr.scntype);
continue;
}
@@ -252,5 +250,7 @@ const bfd_target osf_core_vec =
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0 /* backend_data */
};
diff --git a/contrib/binutils/bfd/pe-arm.c b/contrib/binutils/bfd/pe-arm.c
new file mode 100644
index 0000000..6c6b659
--- /dev/null
+++ b/contrib/binutils/bfd/pe-arm.c
@@ -0,0 +1,47 @@
+/* BFD back-end for ARM PECOFF files.
+ Copyright 1995, 1999 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+
+#ifndef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM armpe_little_vec
+#define TARGET_LITTLE_NAME "pe-arm-little"
+#define TARGET_BIG_SYM armpe_big_vec
+#define TARGET_BIG_NAME "pe-arm-big"
+#endif
+
+#define COFF_WITH_PE
+#define PCRELOFFSET true
+#define COFF_LONG_SECTION_NAMES
+
+#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 \
+ bfd_arm_pe_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+ bfd_arm_pe_process_before_allocation
+#endif
+
+#ifdef ARM_WINCE
+#define TARGET_UNDERSCORE 0
+#endif
+
+#include "coff-arm.c"
diff --git a/contrib/binutils/bfd/pe-i386.c b/contrib/binutils/bfd/pe-i386.c
index bcdbe44..a2eb784 100644
--- a/contrib/binutils/bfd/pe-i386.c
+++ b/contrib/binutils/bfd/pe-i386.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 PECOFF files.
- Copyright 1995 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,5 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PCRELOFFSET true
#define TARGET_UNDERSCORE '_'
#define COFF_LONG_SECTION_NAMES
+#define COFF_LONG_FILENAMES
+
+#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }
#include "coff-i386.c"
diff --git a/contrib/binutils/bfd/pe-mips.c b/contrib/binutils/bfd/pe-mips.c
new file mode 100644
index 0000000..9b89369
--- /dev/null
+++ b/contrib/binutils/bfd/pe-mips.c
@@ -0,0 +1,998 @@
+/* BFD back-end for MIPS PE COFF files.
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define COFF_WITH_PE
+#define COFF_LONG_SECTION_NAMES
+#define PCRELOFFSET true
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+#include "coff/mipspe.h"
+
+#include "coff/internal.h"
+
+#include "coff/pe.h"
+
+#include "libcoff.h"
+
+static bfd_reloc_status_type coff_mips_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static reloc_howto_type *coff_mips_rtype_to_howto
+ PARAMS ((bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *, struct internal_syment *,
+
+ bfd_vma *));
+#if 0
+static void mips_ecoff_swap_reloc_in PARAMS ((bfd *, PTR,
+ struct internal_reloc *));
+static void mips_ecoff_swap_reloc_out PARAMS ((bfd *,
+ const struct internal_reloc *,
+ PTR));
+static void mips_adjust_reloc_in PARAMS ((bfd *,
+ const struct internal_reloc *,
+ arelent *));
+static void mips_adjust_reloc_out PARAMS ((bfd *, const arelent *,
+ struct internal_reloc *));
+#endif
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
+/* The page size is a guess based on ELF. */
+
+#define COFF_PAGE_SIZE 0x1000
+
+/* For some reason when using mips COFF the value stored in the .text
+ section for a reference to a common symbol is the value itself plus
+ any desired offset. Ian Taylor, Cygnus Support. */
+
+/* If we are producing relocateable output, we need to do some
+ adjustments to the object file that are not done by the
+ bfd_perform_relocation function. This function is called by every
+ reloc type to make any required adjustments. */
+
+static bfd_reloc_status_type
+coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
+ error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section ATTRIBUTE_UNUSED;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ symvalue diff;
+
+ if (output_bfd == (bfd *) NULL)
+ return bfd_reloc_continue;
+
+ if (bfd_is_com_section (symbol->section))
+ {
+#ifndef COFF_WITH_PE
+ /* We are relocating a common symbol. The current value in the
+ object file is ORIG + OFFSET, where ORIG is the value of the
+ common symbol as seen by the object file when it was compiled
+ (this may be zero if the symbol was undefined) and OFFSET is
+ the offset into the common symbol (normally zero, but may be
+ non-zero when referring to a field in a common structure).
+ ORIG is the negative of reloc_entry->addend, which is set by
+ the CALC_ADDEND macro below. We want to replace the value in
+ the object file with NEW + OFFSET, where NEW is the value of
+ the common symbol which we are going to put in the final
+ object file. NEW is symbol->value. */
+ diff = symbol->value + reloc_entry->addend;
+#else
+ /* In PE mode, we do not offset the common symbol. */
+ diff = reloc_entry->addend;
+#endif
+ }
+ else
+ {
+ /* For some reason bfd_perform_relocation always effectively
+ 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 0
+ /* dj - handle it like any other reloc? */
+ /* FIXME: How should this case be handled? */
+ if (reloc_entry->howto->type == MIPS_R_RVA && diff != 0)
+ abort ();
+#endif
+#endif
+
+#define DOIT(x) \
+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + (diff >> howto->rightshift)) & howto->dst_mask))
+
+ if (diff != 0)
+ {
+ reloc_howto_type *howto = reloc_entry->howto;
+ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+
+ switch (howto->size)
+ {
+ case 0:
+ {
+ char x = bfd_get_8 (abfd, addr);
+ DOIT (x);
+ bfd_put_8 (abfd, x, addr);
+ }
+ break;
+
+ case 1:
+ {
+ short x = bfd_get_16 (abfd, addr);
+ DOIT (x);
+ bfd_put_16 (abfd, x, addr);
+ }
+ break;
+
+ case 2:
+ {
+ long x = bfd_get_32 (abfd, addr);
+ DOIT (x);
+ bfd_put_32 (abfd, x, addr);
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ /* Now let bfd_perform_relocation finish everything up. */
+ return bfd_reloc_continue;
+}
+
+#ifdef COFF_WITH_PE
+/* Return true if this relocation should
+ 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 && howto->type != MIPS_R_RVA;
+}
+#endif
+
+#ifndef PCRELOFFSET
+#define PCRELOFFSET false
+#endif
+
+static reloc_howto_type howto_table[] =
+{
+ /* Reloc type 0 is ignored. The reloc reading code ensures that
+ this is a reference to the .abs section, which will cause
+ bfd_perform_relocation to do nothing. */
+ HOWTO (MIPS_R_ABSOLUTE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ 0, /* special_function */
+ "IGNORE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 16 bit reference to a symbol, normally from a data section. */
+ HOWTO (MIPS_R_REFHALF, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "REFHALF", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 32 bit reference to a symbol, normally from a data section. */
+ HOWTO (MIPS_R_REFWORD, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "REFWORD", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 26 bit absolute jump address. */
+ HOWTO (MIPS_R_JMPADDR, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ /* This needs complex overflow
+ detection, because the upper four
+ bits must match the PC. */
+ coff_mips_reloc, /* special_function */
+ "JMPADDR", /* name */
+ true, /* partial_inplace */
+ 0x3ffffff, /* src_mask */
+ 0x3ffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high 16 bits of a symbol value. Handled by the function
+ mips_refhi_reloc. */
+ HOWTO (MIPS_R_REFHI, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "REFHI", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The low 16 bits of a symbol value. */
+ HOWTO (MIPS_R_REFLO, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "REFLO", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A reference to an offset from the gp register. Handled by the
+ function mips_gprel_reloc. */
+ HOWTO (MIPS_R_GPREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "GPREL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A reference to a literal using an offset from the gp register.
+ Handled by the function mips_gprel_reloc. */
+ HOWTO (MIPS_R_LITERAL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "LITERAL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ EMPTY_HOWTO (8),
+ EMPTY_HOWTO (9),
+ EMPTY_HOWTO (10),
+ 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),
+ EMPTY_HOWTO (20),
+ EMPTY_HOWTO (21),
+ EMPTY_HOWTO (22),
+ EMPTY_HOWTO (23),
+ EMPTY_HOWTO (24),
+ EMPTY_HOWTO (25),
+ EMPTY_HOWTO (26),
+ EMPTY_HOWTO (27),
+ EMPTY_HOWTO (28),
+ EMPTY_HOWTO (29),
+ EMPTY_HOWTO (30),
+ EMPTY_HOWTO (31),
+ EMPTY_HOWTO (32),
+ EMPTY_HOWTO (33),
+ HOWTO (MIPS_R_RVA, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "rva32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+ EMPTY_HOWTO (35),
+ EMPTY_HOWTO (36),
+ HOWTO (MIPS_R_PAIR, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_mips_reloc, /* special_function */
+ "PAIR", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+};
+
+/* Turn a howto into a reloc nunmber */
+
+#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
+#define BADMAG(x) MIPSBADMAG(x)
+#define MIPS 1 /* Customize coffcode.h */
+
+#define RTYPE2HOWTO(cache_ptr, dst) \
+ (cache_ptr)->howto = howto_table + (dst)->r_type;
+
+/* Compute the addend of a reloc. If the reloc is to a common symbol,
+ the object file contains the value of the common symbol. By the
+ time this is called, the linker may be using a different symbol
+ from a different object file with a different value. Therefore, we
+ hack wildly to locate the original symbol from this file so that we
+ can make the correct adjustment. This macro sets coffsym to the
+ symbol from the original file, and uses it to set the addend value
+ correctly. If this is not a common symbol, the usual addend
+ calculation is done, except that an additional tweak is needed for
+ PC relative relocs.
+ FIXME: This macro refers to symbols and asect; these are from the
+ calling function, not the macro arguments. */
+
+#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
+ { \
+ coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \
+ if (ptr && bfd_asymbol_bfd (ptr) != abfd) \
+ coffsym = (obj_symbols (abfd) \
+ + (cache_ptr->sym_ptr_ptr - symbols)); \
+ else if (ptr) \
+ coffsym = coff_symbol_from (abfd, ptr); \
+ if (coffsym != (coff_symbol_type *) NULL \
+ && coffsym->native->u.syment.n_scnum == 0) \
+ cache_ptr->addend = - coffsym->native->u.syment.n_value; \
+ else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
+ && ptr->section != (asection *) NULL) \
+ cache_ptr->addend = - (ptr->section->vma + ptr->value); \
+ else \
+ cache_ptr->addend = 0; \
+ if (ptr && howto_table[reloc.r_type].pc_relative) \
+ cache_ptr->addend += asect->vma; \
+ }
+
+
+/* Convert an rtype to howto for the COFF backend linker. */
+
+static reloc_howto_type *
+coff_mips_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ struct internal_reloc *rel;
+ struct coff_link_hash_entry *h;
+ struct internal_syment *sym;
+ bfd_vma *addendp;
+{
+
+ reloc_howto_type *howto;
+
+ howto = howto_table + rel->r_type;
+
+#ifdef COFF_WITH_PE
+ *addendp = 0;
+#endif
+
+ if (howto->pc_relative)
+ *addendp += sec->vma;
+
+ if (sym != NULL && sym->n_scnum == 0 && sym->n_value != 0)
+ {
+ /* This is a common symbol. The section contents include the
+ size (sym->n_value) as an addend. The relocate_section
+ function will be adding in the final value of the symbol. We
+ need to subtract out the current size in order to get the
+ correct result. */
+
+ BFD_ASSERT (h != NULL);
+
+#ifndef COFF_WITH_PE
+ /* I think we *do* want to bypass this. If we don't, I have
+ seen some data parameters get the wrong relocation address.
+ If I link two versions with and without this section bypassed
+ and then do a binary comparison, the addresses which are
+ different can be looked up in the map. The case in which
+ this section has been bypassed has addresses which correspond
+ to values I can find in the map. */
+ *addendp -= sym->n_value;
+#endif
+ }
+
+#ifndef COFF_WITH_PE
+ /* If the output symbol is common (in which case this must be a
+ relocateable link), we need to add in the final size of the
+ common symbol. */
+ if (h != NULL && h->root.type == bfd_link_hash_common)
+ *addendp += h->root.u.c.size;
+#endif
+
+#ifdef COFF_WITH_PE
+ if (howto->pc_relative)
+ {
+ *addendp -= 4;
+
+ /* If the symbol is defined, then the generic code is going to
+ add back the symbol value in order to cancel out an
+ adjustment it made to the addend. However, we set the addend
+ to 0 at the start of this function. We need to adjust here,
+ to avoid the adjustment the generic code will make. FIXME:
+ This is getting a bit hackish. */
+ if (sym != NULL && sym->n_scnum != 0)
+ *addendp -= sym->n_value;
+ }
+
+ if (rel->r_type == MIPS_R_RVA)
+ {
+ *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
+ }
+#endif
+
+ return howto;
+}
+
+#define coff_rtype_to_howto coff_mips_rtype_to_howto
+
+
+#define coff_bfd_reloc_type_lookup coff_mips_reloc_type_lookup
+
+
+
+/* Get the howto structure for a generic reloc type. */
+
+static reloc_howto_type *
+coff_mips_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ int mips_type;
+
+ switch (code)
+ {
+ case BFD_RELOC_16:
+ mips_type = MIPS_R_REFHALF;
+ break;
+ case BFD_RELOC_32:
+ case BFD_RELOC_CTOR:
+ mips_type = MIPS_R_REFWORD;
+ break;
+ case BFD_RELOC_MIPS_JMP:
+ mips_type = MIPS_R_JMPADDR;
+ break;
+ case BFD_RELOC_HI16_S:
+ mips_type = MIPS_R_REFHI;
+ break;
+ case BFD_RELOC_LO16:
+ mips_type = MIPS_R_REFLO;
+ break;
+ case BFD_RELOC_MIPS_GPREL:
+ mips_type = MIPS_R_GPREL;
+ break;
+ case BFD_RELOC_MIPS_LITERAL:
+ mips_type = MIPS_R_LITERAL;
+ break;
+/* FIXME?
+ case BFD_RELOC_16_PCREL_S2:
+ mips_type = MIPS_R_PCREL16;
+ break;
+ case BFD_RELOC_PCREL_HI16_S:
+ mips_type = MIPS_R_RELHI;
+ break;
+ case BFD_RELOC_PCREL_LO16:
+ mips_type = MIPS_R_RELLO;
+ break;
+ case BFD_RELOC_GPREL32:
+ mips_type = MIPS_R_SWITCH;
+ break;
+*/
+ case BFD_RELOC_RVA:
+ mips_type = MIPS_R_RVA;
+ break;
+ default:
+ return (reloc_howto_type *) NULL;
+ }
+
+ return &howto_table[mips_type];
+}
+
+static void
+mips_swap_reloc_in (abfd, src, dst)
+ bfd *abfd;
+ PTR src;
+ PTR dst;
+{
+ static struct internal_reloc pair_prev;
+ 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_symndx =
+ bfd_h_get_signed_32(abfd, (bfd_byte *) reloc_src->r_symndx);
+ reloc_dst->r_type = bfd_h_get_16(abfd, (bfd_byte *) reloc_src->r_type);
+ reloc_dst->r_size = 0;
+ reloc_dst->r_extern = 0;
+ reloc_dst->r_offset = 0;
+
+ switch (reloc_dst->r_type)
+ {
+ case MIPS_R_REFHI:
+ pair_prev = *reloc_dst;
+ break;
+ case MIPS_R_PAIR:
+ reloc_dst->r_offset = reloc_dst->r_symndx;
+ if (reloc_dst->r_offset & 0x8000)
+ reloc_dst->r_offset -= 0x10000;
+ /*printf("dj: pair offset is %08x\n", reloc_dst->r_offset);*/
+ reloc_dst->r_symndx = pair_prev.r_symndx;
+ break;
+ }
+}
+
+static unsigned int
+mips_swap_reloc_out (abfd, src, dst)
+ bfd *abfd;
+ PTR src;
+ PTR dst;
+{
+ static int prev_offset = 1;
+ static bfd_vma prev_addr = 0;
+ struct internal_reloc *reloc_src = (struct internal_reloc *)src;
+ struct external_reloc *reloc_dst = (struct external_reloc *)dst;
+
+ switch (reloc_src->r_type)
+ {
+ case MIPS_R_REFHI:
+ prev_addr = reloc_src->r_vaddr;
+ prev_offset = reloc_src->r_offset;
+ break;
+ case MIPS_R_REFLO:
+ if (reloc_src->r_vaddr == prev_addr)
+ {
+ /* FIXME: only slightly hackish. If we see a REFLO pointing to
+ the same address as a REFHI, we assume this is the matching
+ PAIR reloc and output it accordingly. The symndx is really
+ the low 16 bits of the addend */
+ bfd_h_put_32 (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);
+
+ bfd_h_put_16(abfd, MIPS_R_PAIR, (bfd_byte *)
+ reloc_dst->r_type);
+ return RELSZ;
+ }
+ break;
+ }
+
+ bfd_h_put_32(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);
+
+ bfd_h_put_16(abfd, reloc_src->r_type, (bfd_byte *)
+ reloc_dst->r_type);
+ return RELSZ;
+}
+
+#define coff_swap_reloc_in mips_swap_reloc_in
+#define coff_swap_reloc_out mips_swap_reloc_out
+#define NO_COFF_RELOCS
+
+static boolean
+coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
+ input_section, contents, relocs, syms,
+ sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ struct internal_reloc *relocs;
+ struct internal_syment *syms;
+ asection **sections;
+{
+ bfd_vma gp;
+ boolean gp_undefined;
+ size_t adjust;
+ struct internal_reloc *rel;
+ struct internal_reloc *rel_end;
+ unsigned int i;
+ boolean got_lo;
+
+ if (info->relocateable)
+ {
+ (*_bfd_error_handler)(_("\
+%s: `ld -r' not supported with PE MIPS objects\n"),
+ bfd_get_filename (input_bfd));
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ BFD_ASSERT (input_bfd->xvec->byteorder
+ == output_bfd->xvec->byteorder);
+
+#if 0
+ printf("dj: relocate %s(%s) %08x\n",
+ input_bfd->filename, input_section->name,
+ input_section->output_section->vma + input_section->output_offset);
+#endif
+
+ gp = _bfd_get_gp_value (output_bfd);
+ if (gp == 0)
+ gp_undefined = true;
+ else
+ gp_undefined = false;
+
+ got_lo = false;
+
+ adjust = 0;
+
+ rel = relocs;
+ rel_end = rel + input_section->reloc_count;
+ for (i = 0; rel < rel_end; rel++, i++)
+ {
+ long symndx;
+ struct coff_link_hash_entry *h;
+ struct internal_syment *sym;
+ bfd_vma addend = 0;
+ bfd_vma val, tmp, targ, src, low;
+ reloc_howto_type *howto;
+ unsigned char *mem = contents + rel->r_vaddr;
+
+ symndx = rel->r_symndx;
+
+ if (symndx == -1)
+ {
+ h = NULL;
+ sym = NULL;
+ }
+ else
+ {
+ h = obj_coff_sym_hashes (input_bfd)[symndx];
+ sym = syms + symndx;
+ }
+
+ /* COFF treats common symbols in one of two ways. Either the
+ size of the symbol is included in the section contents, or it
+ is not. We assume that the size is not included, and force
+ the rtype_to_howto function to adjust the addend as needed. */
+
+ if (sym != NULL && sym->n_scnum != 0)
+ addend = - sym->n_value;
+ else
+ addend = 0;
+
+
+ howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
+ sym, &addend);
+ if (howto == NULL)
+ return false;
+
+ /* 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,
+ then we should ignore the symbol value. */
+ if (howto->pc_relative && howto->pcrel_offset)
+ {
+ if (info->relocateable)
+ continue;
+ if (sym != NULL && sym->n_scnum != 0)
+ addend += sym->n_value;
+ }
+
+ val = 0;
+
+ if (h == NULL)
+ {
+ asection *sec;
+
+ if (symndx == -1)
+ {
+ sec = bfd_abs_section_ptr;
+ val = 0;
+ }
+ else
+ {
+ sec = sections[symndx];
+ val = (sec->output_section->vma
+ + sec->output_offset
+ + sym->n_value);
+ if (! obj_pe (input_bfd))
+ val -= sec->vma;
+ }
+ }
+ else
+ {
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ asection *sec;
+
+ sec = h->root.u.def.section;
+ val = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+
+ else if (! info->relocateable)
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, true)))
+ return false;
+ }
+ }
+
+ src = rel->r_vaddr + input_section->output_section->vma
+ + input_section->output_offset;
+#if 0
+ printf("dj: reloc %02x %-8s a=%08x/%08x(%08x) v=%08x+%08x %s\n",
+ rel->r_type, howto_table[rel->r_type].name,
+ src, rel->r_vaddr, *(unsigned long *)mem, val, rel->r_offset,
+ h?h->root.root.string:"(none)");
+#endif
+
+ /* 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
+ */
+
+#define UI(x) (*_bfd_error_handler)(_("%s: unimplemented %s\n"), \
+ bfd_get_filename (input_bfd), x); \
+ bfd_set_error (bfd_error_bad_value);
+
+ switch (rel->r_type)
+ {
+ case MIPS_R_ABSOLUTE:
+ /* ignore these */
+ break;
+
+ case MIPS_R_REFHALF:
+ UI("refhalf");
+ break;
+
+ case MIPS_R_REFWORD:
+ tmp = bfd_get_32(input_bfd, mem);
+ /* printf("refword: src=%08x targ=%08x+%08x\n", src, tmp, val); */
+ tmp += val;
+ bfd_put_32(input_bfd, tmp, mem);
+ break;
+
+ case MIPS_R_JMPADDR:
+ tmp = bfd_get_32(input_bfd, mem);
+ targ = val + (tmp&0x03ffffff)*4;
+ if ((src & 0xf0000000) != (targ & 0xf0000000))
+ {
+ (*_bfd_error_handler)(_("%s: jump too far away\n"),
+ bfd_get_filename (input_bfd));
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ tmp &= 0xfc000000;
+ tmp |= (targ/4) & 0x3ffffff;
+ bfd_put_32(input_bfd, tmp, mem);
+ break;
+
+ case MIPS_R_REFHI:
+ tmp = bfd_get_32(input_bfd, mem);
+ switch (rel[1].r_type)
+ {
+ case MIPS_R_PAIR:
+ /* MS PE object */
+ targ = val + rel[1].r_offset + ((tmp & 0xffff) << 16);
+ break;
+ case MIPS_R_REFLO:
+ /* GNU COFF object */
+ low = bfd_get_32(input_bfd, contents + rel[1].r_vaddr);
+ low &= 0xffff;
+ if (low & 0x8000)
+ low -= 0x10000;
+ targ = val + low + ((tmp & 0xffff) << 16);
+ break;
+ default:
+ (*_bfd_error_handler)(_("%s: bad pair/reflo after refhi\n"),
+ bfd_get_filename (input_bfd));
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ tmp &= 0xffff0000;
+ tmp |= (targ >> 16) & 0xffff;
+ bfd_put_32(input_bfd, tmp, mem);
+ break;
+
+ case MIPS_R_REFLO:
+ tmp = bfd_get_32(input_bfd, mem);
+ targ = val + (tmp & 0xffff);
+ /* printf("refword: src=%08x targ=%08x\n", src, targ); */
+ tmp &= 0xffff0000;
+ tmp |= targ & 0xffff;
+ bfd_put_32(input_bfd, tmp, mem);
+ break;
+
+ case MIPS_R_GPREL:
+ case MIPS_R_LITERAL:
+ UI("gprel");
+ break;
+
+ case MIPS_R_SECTION:
+ UI("section");
+ break;
+
+ case MIPS_R_SECREL:
+ UI("secrel");
+ break;
+
+ case MIPS_R_SECRELLO:
+ UI("secrello");
+ break;
+
+ case MIPS_R_SECRELHI:
+ UI("secrelhi");
+ break;
+
+ case MIPS_R_RVA:
+ tmp = bfd_get_32 (input_bfd, mem);
+ /* printf("rva: src=%08x targ=%08x+%08x\n", src, tmp, val); */
+ tmp += val
+ - pe_data (input_section->output_section->owner)->pe_opthdr.ImageBase;
+ bfd_put_32 (input_bfd, tmp, mem);
+ break;
+
+ case MIPS_R_PAIR:
+ /* ignore these */
+ break;
+ }
+ }
+
+ return true;
+}
+
+#define coff_relocate_section coff_pe_mips_relocate_section
+
+#ifdef TARGET_UNDERSCORE
+
+/* If mips gcc uses underscores for symbol names, then it does not use
+ a leading dot for local labels, so if TARGET_UNDERSCORE is defined
+ we treat all symbols starting with L as local. */
+
+static boolean coff_mips_is_local_label_name PARAMS ((bfd *, const char *));
+
+static boolean
+coff_mips_is_local_label_name (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (name[0] == 'L')
+ return true;
+
+ return _bfd_coff_is_local_label_name (abfd, name);
+}
+
+#define coff_bfd_is_local_label_name coff_mips_is_local_label_name
+
+#endif /* TARGET_UNDERSCORE */
+
+#define COFF_NO_HACK_SCNHDR_SIZE
+
+#include "coffcode.h"
+
+const bfd_target
+#ifdef TARGET_SYM
+ TARGET_SYM =
+#else
+ mipslpe_vec =
+#endif
+{
+#ifdef TARGET_NAME
+ TARGET_NAME,
+#else
+ "pe-mips", /* name */
+#endif
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* data byte order is little */
+ BFD_ENDIAN_LITTLE, /* header byte order is little */
+
+ (HAS_RELOC | EXEC_P | /* 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 */
+ | SEC_CODE | SEC_DATA),
+#else
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ | SEC_CODE | SEC_DATA
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
+#endif
+
+#ifdef TARGET_UNDERSCORE
+ TARGET_UNDERSCORE, /* leading underscore */
+#else
+ 0, /* leading underscore */
+#endif
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+/* 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 */
+ 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),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ NULL,
+
+ COFF_SWAP_TABLE
+};
diff --git a/contrib/binutils/bfd/pe-ppc.c b/contrib/binutils/bfd/pe-ppc.c
new file mode 100644
index 0000000..7d4a547
--- /dev/null
+++ b/contrib/binutils/bfd/pe-ppc.c
@@ -0,0 +1,44 @@
+/* BFD back-end for PowerPC PECOFF files.
+ Copyright 1995 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+
+
+#define E_FILENMLEN 18
+
+#define PPC_PE
+
+#define TARGET_LITTLE_SYM bfd_powerpcle_pe_vec
+#define TARGET_LITTLE_NAME "pe-powerpcle"
+
+#define TARGET_BIG_SYM bfd_powerpc_pe_vec
+#define TARGET_BIG_NAME "pe-powerpc"
+
+#define COFF_WITH_PE
+
+#define COFF_LONG_SECTION_NAMES
+
+/* FIXME: verify PCRELOFFSET is always false */
+
+/* FIXME: This target no longer works. Search for POWERPC_LE_PE in
+ coff-ppc.c and peigen.c. */
+
+#include "coff-ppc.c"
diff --git a/contrib/binutils/bfd/po/Make-in b/contrib/binutils/bfd/po/Make-in
new file mode 100644
index 0000000..0552db1
--- /dev/null
+++ b/contrib/binutils/bfd/po/Make-in
@@ -0,0 +1,251 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-info:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/bfd/po/POTFILES.in b/contrib/binutils/bfd/po/POTFILES.in
new file mode 100644
index 0000000..409bf1d
--- /dev/null
+++ b/contrib/binutils/bfd/po/POTFILES.in
@@ -0,0 +1,234 @@
+aix386-core.c
+aout0.c
+aout32.c
+aout64.c
+aout-adobe.c
+aout-arm.c
+aoutf1.h
+aout-ns32k.c
+aout-sparcle.c
+aout-target.h
+aout-tic30.c
+aoutx.h
+archive.c
+archures.c
+armnetbsd.c
+bfd.c
+binary.c
+bout.c
+cache.c
+cf-i386lynx.c
+cf-m68klynx.c
+cf-sparclynx.c
+cisco-core.c
+coff-a29k.c
+coff-alpha.c
+coff-apollo.c
+coff-arm.c
+coff-aux.c
+coffcode.h
+coffgen.c
+coff-go32.c
+coff-h8300.c
+coff-h8500.c
+coff-i386.c
+coff-i860.c
+coff-i960.c
+cofflink.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
+coffswap.h
+coff-tic30.c
+coff-tic80.c
+coff-u68k.c
+coff-w65.c
+coff-we32k.c
+coff-z8k.c
+corefile.c
+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-m10200.c
+cpu-m10300.c
+cpu-m32r.c
+cpu-m68k.c
+cpu-m88k.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-w65.c
+cpu-we32k.c
+cpu-z8k.c
+demo64.c
+dwarf1.c
+dwarf2.c
+ecoff.c
+ecofflink.c
+ecoffswap.h
+elf32-arc.c
+elf32-arm.h
+elf32-avr.c
+elf32.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
+elf32-mcore.c
+elf32-mips.c
+elf32-pj.c
+elf32-ppc.c
+elf32-sh.c
+elf32-sparc.c
+elf32-v850.c
+elf64-alpha.c
+elf64.c
+elf64-gen.c
+elf64-mips.c
+elf64-sparc.c
+elfarm-nabi.c
+elfarm-oabi.c
+elf-bfd.h
+elf.c
+elfcode.h
+elfcore.h
+elflink.c
+elflink.h
+elf-m10200.c
+elf-m10300.c
+epoc-pe-arm.c
+epoc-pei-arm.c
+format.c
+freebsd.h
+genlink.h
+go32stub.h
+hash.c
+hp300bsd.c
+hp300hpux.c
+hpux-core.c
+i386aout.c
+i386bsd.c
+i386dynix.c
+i386freebsd.c
+i386linux.c
+i386lynx.c
+i386mach3.c
+i386msdos.c
+i386netbsd.c
+i386os9k.c
+ieee.c
+ihex.c
+init.c
+irix-core.c
+libaout.h
+libbfd.c
+libbfd.h
+libcoff.h
+libecoff.h
+libhppa.h
+libieee.h
+libnlm.h
+liboasys.h
+libpei.h
+linker.c
+lynx-core.c
+m68k4knetbsd.c
+m68klinux.c
+m68klynx.c
+m68knetbsd.c
+m88kmach3.c
+mipsbsd.c
+netbsd.h
+newsos3.c
+nlm32-alpha.c
+nlm32.c
+nlm32-i386.c
+nlm32-ppc.c
+nlm32-sparc.c
+nlm64.c
+nlm.c
+nlmcode.h
+nlmswap.h
+nlm-target.h
+ns32k.h
+ns32knetbsd.c
+oasys.c
+opncls.c
+osf-core.c
+pc532-mach.c
+pe-arm.c
+pe-i386.c
+pei-arm.c
+peicode.h
+peigen.c
+pei-i386.c
+pei-mcore.c
+pei-mips.c
+pei-ppc.c
+pei-sh.c
+pe-mcore.c
+pe-mips.c
+pe-ppc.c
+pe-sh.c
+ppcboot.c
+reloc16.c
+reloc.c
+riscix.c
+sco5-core.c
+section.c
+som.c
+som.h
+sparclinux.c
+sparclynx.c
+sparcnetbsd.c
+srec.c
+stabs.c
+stab-syms.c
+sunos.c
+syms.c
+targets.c
+tekhex.c
+trad-core.c
+vaxnetbsd.c
+versados.c
+vms.c
+vms-gsd.c
+vms.h
+vms-hdr.c
+vms-misc.c
+vms-tir.c
+xcofflink.c
diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot
new file mode 100644
index 0000000..b08ec36
--- /dev/null
+++ b/contrib/binutils/bfd/po/bfd.pot
@@ -0,0 +1,2051 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2000-04-04 22:10+0930\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: aout-adobe.c:183
+#, c-format
+msgid "%s: Unknown section type in a.out.adobe file: %x\n"
+msgstr ""
+
+#: aoutx.h:1244 aoutx.h:1658
+#, c-format
+msgid "%s: can not represent section `%s' in a.out object file format"
+msgstr ""
+
+#: aoutx.h:1628
+#, c-format
+msgid ""
+"%s: can not represent section for symbol `%s' in a.out object file format"
+msgstr ""
+
+#: aoutx.h:1630
+msgid "*unknown*"
+msgstr ""
+
+#: aoutx.h:3674
+#, c-format
+msgid "%s: relocateable link from %s to %s not supported"
+msgstr ""
+
+#: archive.c:1724
+msgid "Warning: writing archive was slow: rewriting timestamp\n"
+msgstr ""
+
+#: archive.c:1990
+msgid "Reading archive file mod timestamp"
+msgstr ""
+
+#. FIXME: bfd can't call perror.
+#: archive.c:2014
+msgid "Writing updated armap timestamp"
+msgstr ""
+
+#: bfd.c:274
+msgid "No error"
+msgstr ""
+
+#: bfd.c:275
+msgid "System call error"
+msgstr ""
+
+#: bfd.c:276
+msgid "Invalid bfd target"
+msgstr ""
+
+#: bfd.c:277
+msgid "File in wrong format"
+msgstr ""
+
+#: bfd.c:278
+msgid "Invalid operation"
+msgstr ""
+
+#: bfd.c:279
+msgid "Memory exhausted"
+msgstr ""
+
+#: bfd.c:280
+msgid "No symbols"
+msgstr ""
+
+#: bfd.c:281
+msgid "Archive has no index; run ranlib to add one"
+msgstr ""
+
+#: bfd.c:282
+msgid "No more archived files"
+msgstr ""
+
+#: bfd.c:283
+msgid "Malformed archive"
+msgstr ""
+
+#: bfd.c:284
+msgid "File format not recognized"
+msgstr ""
+
+#: bfd.c:285
+msgid "File format is ambiguous"
+msgstr ""
+
+#: bfd.c:286
+msgid "Section has no contents"
+msgstr ""
+
+#: bfd.c:287
+msgid "Nonrepresentable section on output"
+msgstr ""
+
+#: bfd.c:288
+msgid "Symbol needs debug section which does not exist"
+msgstr ""
+
+#: bfd.c:289
+msgid "Bad value"
+msgstr ""
+
+#: bfd.c:290
+msgid "File truncated"
+msgstr ""
+
+#: bfd.c:291
+msgid "File too big"
+msgstr ""
+
+#: bfd.c:292
+msgid "#<Invalid error code>"
+msgstr ""
+
+#: bfd.c:679
+#, c-format
+msgid "bfd assertion fail %s:%d"
+msgstr ""
+
+#: bfd.c:697
+#, c-format
+msgid "BFD internal error, aborting at %s line %d in %s\n"
+msgstr ""
+
+#: bfd.c:701
+#, c-format
+msgid "BFD internal error, aborting at %s line %d\n"
+msgstr ""
+
+#: bfd.c:703
+msgid "Please report this bug.\n"
+msgstr ""
+
+#: binary.c:298
+#, c-format
+msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
+msgstr ""
+
+#: coff-a29k.c:122
+msgid "Missing IHCONST"
+msgstr ""
+
+#: coff-a29k.c:182
+msgid "Missing IHIHALF"
+msgstr ""
+
+#: coff-a29k.c:214
+msgid "Unrecognized reloc"
+msgstr ""
+
+#: coff-a29k.c:427
+msgid "missing IHCONST reloc"
+msgstr ""
+
+#: coff-a29k.c:518
+msgid "missing IHIHALF reloc"
+msgstr ""
+
+#: coff-alpha.c:880 coff-alpha.c:917
+msgid "GP relative relocation used when GP not defined"
+msgstr ""
+
+#: coff-alpha.c:1486 elf64-alpha.c:3990
+msgid "using multiple gp values"
+msgstr ""
+
+#: coff-alpha.c:1992 coff-mips.c:1435
+msgid "GP relative relocation when GP not defined"
+msgstr ""
+
+#: coff-arm.c:1020 elf32-arm.h:258
+#, c-format
+msgid "%s: unable to find THUMB glue '%s' for `%s'"
+msgstr ""
+
+#: coff-arm.c:1049 elf32-arm.h:291
+#, 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
+#, c-format
+msgid "%s(%s): warning: interworking not enabled."
+msgstr ""
+
+#: coff-arm.c:1335 elf32-arm.h:958
+#, c-format
+msgid " first occurrence: %s: arm call to thumb"
+msgstr ""
+
+#: coff-arm.c:1430 elf32-arm.h:860
+#, c-format
+msgid " first occurrence: %s: thumb call to arm"
+msgstr ""
+
+#: coff-arm.c:1433
+msgid " consider relinking with --support-old-code enabled"
+msgstr ""
+
+#: coff-arm.c:1722 coff-tic80.c:682 cofflink.c:2980
+#, c-format
+msgid "%s: bad reloc address 0x%lx in section `%s'"
+msgstr ""
+
+#: coff-arm.c:2060
+#, c-format
+msgid "%s: illegal symbol index in reloc: %d"
+msgstr ""
+
+#: coff-arm.c:2189
+#, c-format
+msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
+msgstr ""
+
+#: coff-arm.c:2204
+#, c-format
+msgid ""
+"%s: ERROR: passes floats in float registers whereas target %s uses integer "
+"registers"
+msgstr ""
+
+#: coff-arm.c:2207
+#, c-format
+msgid ""
+"%s: ERROR: passes floats in integer registers whereas target %s uses float "
+"registers"
+msgstr ""
+
+#: coff-arm.c:2222
+#, c-format
+msgid ""
+"%s: ERROR: compiled as position independent code, whereas target %s is "
+"absolute position"
+msgstr ""
+
+#: coff-arm.c:2225
+#, c-format
+msgid ""
+"%s: ERROR: compiled as absolute position code, whereas target %s is position "
+"independent"
+msgstr ""
+
+#: coff-arm.c:2254
+#, c-format
+msgid "Warning: input file %s supports interworking, whereas %s does not."
+msgstr ""
+
+#: coff-arm.c:2257
+#, c-format
+msgid "Warning: input file %s does not support interworking, whereas %s does."
+msgstr ""
+
+#: coff-arm.c:2285
+#, c-format
+msgid "private flags = %x:"
+msgstr ""
+
+#: coff-arm.c:2293 elf32-arm.h:2089
+msgid " [floats passed in float registers]"
+msgstr ""
+
+#: coff-arm.c:2295 elf32-arm.h:2091
+msgid " [floats passed in integer registers]"
+msgstr ""
+
+#: coff-arm.c:2298 elf32-arm.h:2094
+msgid " [position independent]"
+msgstr ""
+
+#: coff-arm.c:2300 elf32-arm.h:2096
+msgid " [absolute position]"
+msgstr ""
+
+#: coff-arm.c:2304
+msgid " [interworking flag not initialised]"
+msgstr ""
+
+#: coff-arm.c:2306
+msgid " [interworking supported]"
+msgstr ""
+
+#: coff-arm.c:2308
+msgid " [interworking not supported]"
+msgstr ""
+
+#: coff-arm.c:2357
+#, c-format
+msgid ""
+"Warning: Not setting interworking flag of %s, since it has already been "
+"specified as non-interworking"
+msgstr ""
+
+#: coff-arm.c:2361
+#, c-format
+msgid "Warning: Clearing the interworking flag of %s due to outside request"
+msgstr ""
+
+#: coffcode.h:3965
+#, c-format
+msgid "%s: warning: illegal symbol index %ld in line numbers"
+msgstr ""
+
+#: coffcode.h:3979
+#, c-format
+msgid "%s: warning: duplicate line number information for `%s'"
+msgstr ""
+
+#: coffcode.h:4334
+#, c-format
+msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
+msgstr ""
+
+#: coffcode.h:4465
+#, c-format
+msgid "warning: %s: local symbol `%s' has no section"
+msgstr ""
+
+#: coffcode.h:4578
+#, c-format
+msgid "%s: warning: illegal symbol index %ld in relocs"
+msgstr ""
+
+#: coffcode.h:4616
+#, c-format
+msgid "%s: illegal relocation type %d at address 0x%lx"
+msgstr ""
+
+#: coffgen.c:1613
+#, c-format
+msgid "%s: bad string table size %lu"
+msgstr ""
+
+#: coffgen.c:2076
+#, c-format
+msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
+msgstr ""
+
+#: coff-i960.c:136 coff-i960.c:485
+msgid "uncertain calling convention for non-COFF symbol"
+msgstr ""
+
+#: cofflink.c:518 elflink.h:1568
+#, c-format
+msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
+msgstr ""
+
+#: cofflink.c:2285
+#, c-format
+msgid "%s: relocs in section `%s', but it has no contents"
+msgstr ""
+
+#: cofflink.c:2619 coffswap.h:904
+#, c-format
+msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
+msgstr ""
+
+#: cofflink.c:2628 coffswap.h:891
+#, 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"
+msgstr ""
+
+#: coff-mips.c:2433
+msgid "unsupported reloc type"
+msgstr ""
+
+#. No other sections should appear in -membedded-pic
+#. code.
+#: coff-mips.c:2470
+msgid "reloc against unsupported section"
+msgstr ""
+
+#: coff-mips.c:2478
+msgid "reloc not properly aligned"
+msgstr ""
+
+#: coff-tic80.c:445
+#, c-format
+msgid "Unrecognized reloc type 0x%x"
+msgstr ""
+
+#: coff-w65.c:383
+#, c-format
+msgid "ignoring reloc %s\n"
+msgstr ""
+
+#: dwarf2.c:429
+msgid "Dwarf Error: Can't find .debug_abbrev section."
+msgstr ""
+
+#: dwarf2.c:447
+#, c-format
+msgid "Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)."
+msgstr ""
+
+#: dwarf2.c:627
+#, c-format
+msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
+msgstr ""
+
+#: dwarf2.c:700
+msgid "Dwarf Error: mangled line number section (bad file number)."
+msgstr ""
+
+#: dwarf2.c:791
+msgid "Dwarf Error: Can't find .debug_line section."
+msgstr ""
+
+#: dwarf2.c:963
+msgid "Dwarf Error: mangled line number section."
+msgstr ""
+
+#: dwarf2.c:1151 dwarf2.c:1307
+#, c-format
+msgid "Dwarf Error: Could not find abbrev number %d."
+msgstr ""
+
+#: dwarf2.c:1268
+#, c-format
+msgid ""
+"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
+"information."
+msgstr ""
+
+#: dwarf2.c:1275
+#, c-format
+msgid ""
+"Dwarf Error: found address size '%u', this reader can not handle sizes "
+"greater than '%u'."
+msgstr ""
+
+#: dwarf2.c:1298
+#, c-format
+msgid "Dwarf Error: Bad abbrev number: %d."
+msgstr ""
+
+#: ecoff.c:1325
+#, c-format
+msgid "Unknown basic type %d"
+msgstr ""
+
+#: ecoff.c:1597
+#, c-format
+msgid ""
+"\n"
+" End+1 symbol: %ld"
+msgstr ""
+
+#: ecoff.c:1604 ecoff.c:1607
+#, c-format
+msgid ""
+"\n"
+" First symbol: %ld"
+msgstr ""
+
+#: ecoff.c:1619
+#, c-format
+msgid ""
+"\n"
+" End+1 symbol: %-7ld Type: %s"
+msgstr ""
+
+#: ecoff.c:1626
+#, c-format
+msgid ""
+"\n"
+" Local symbol: %ld"
+msgstr ""
+
+#: ecoff.c:1634
+#, c-format
+msgid ""
+"\n"
+" struct; End+1 symbol: %ld"
+msgstr ""
+
+#: ecoff.c:1639
+#, c-format
+msgid ""
+"\n"
+" union; End+1 symbol: %ld"
+msgstr ""
+
+#: ecoff.c:1644
+#, c-format
+msgid ""
+"\n"
+" enum; End+1 symbol: %ld"
+msgstr ""
+
+#: ecoff.c:1650
+#, c-format
+msgid ""
+"\n"
+" Type: %s"
+msgstr ""
+
+#: elf32-arm.h:1787 elf32-i386.c:1304 elf32-ppc.c:3092
+#, 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
+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
+msgid "internal error: unsupported relocation error"
+msgstr ""
+
+#: elf-m10200.c:463 elf-m10300.c:678 elf32-arm.h:1861 elf32-d10v.c:501
+#: 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
+msgid "internal error: unknown error"
+msgstr ""
+
+#: elf32-arm.h:1891
+#, c-format
+msgid ""
+"Warning: Not setting interwork flag of %s since it has already been "
+"specified as non-interworking"
+msgstr ""
+
+#: elf32-arm.h:1895
+#, c-format
+msgid "Warning: Clearing the interwork flag of %s due to outside request"
+msgstr ""
+
+#: elf32-arm.h:1943
+#, 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
+#, c-format
+msgid "%s: compiled for a %s endian system and target is %s endian"
+msgstr ""
+
+#: elf32-arm.h:2023
+#, c-format
+msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr ""
+
+#: elf32-arm.h:2031
+#, 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
+msgid "float"
+msgstr ""
+
+#: elf32-arm.h:2034 elf32-arm.h:2036
+msgid "integer"
+msgstr ""
+
+#: elf32-arm.h:2039
+#, c-format
+msgid "Error: %s is compiled as position %s code, whereas %s is not"
+msgstr ""
+
+#: elf32-arm.h:2042
+msgid "independent"
+msgstr ""
+
+#: elf32-arm.h:2042
+msgid "dependent"
+msgstr ""
+
+#: elf32-arm.h:2048
+#, c-format
+msgid "Warning: %s %s interworking, whereas %s %s"
+msgstr ""
+
+#: elf32-arm.h:2051
+msgid "supports"
+msgstr ""
+
+#: elf32-arm.h:2051
+msgid "does not support"
+msgstr ""
+
+#: elf32-arm.h:2053
+msgid "does not"
+msgstr ""
+
+#: elf32-arm.h:2053
+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
+#, c-format
+msgid "private flags = %lx:"
+msgstr ""
+
+#: elf32-arm.h:2079
+msgid " [interworking enabled]"
+msgstr ""
+
+#: elf32-arm.h:2081
+msgid " [interworking not enabled]"
+msgstr ""
+
+#: elf32-arm.h:2084
+msgid " [APCS-26]"
+msgstr ""
+
+#: elf32-arm.h:2086
+msgid " [APCS-32]"
+msgstr ""
+
+#: elf32-avr.c:852 elf32-fr30.c:659 elf32-v850.c:1685
+msgid "internal error: dangerous relocation"
+msgstr ""
+
+#: elf32-i386.c:239
+#, c-format
+msgid "%s: invalid relocation type %d"
+msgstr ""
+
+#: elf32-m32r.c:916
+msgid "SDA relocation when _SDA_BASE_ not defined"
+msgstr ""
+
+#: elf32-m32r.c:1000 elf32-ppc.c:2963
+#, c-format
+msgid "%s: unknown relocation type %d"
+msgstr ""
+
+#: elf32-m32r.c:1208
+#, c-format
+msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+msgstr ""
+
+#: elf32-m32r.c:2010
+#, c-format
+msgid "%s: Instruction set mismatch with previous modules"
+msgstr ""
+
+#: elf32-m32r.c:2033
+#, c-format
+msgid "private flags = %lx"
+msgstr ""
+
+#: elf32-m32r.c:2038
+msgid ": m32r instructions"
+msgstr ""
+
+#: elf32-m32r.c:2039
+msgid ": m32rx instructions"
+msgstr ""
+
+#: elf32-m68k.c:433
+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
+#, c-format
+msgid "%s: Relocation %s (%d) is not currently supported.\n"
+msgstr ""
+
+#: elf32-mcore.c:463
+#, c-format
+msgid "%s: Unknown relocation type %d\n"
+msgstr ""
+
+#: elf32-mips.c:1565
+msgid "32bits gp relative relocation occurs for an external symbol"
+msgstr ""
+
+#: elf32-mips.c:1714
+#, 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
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr ""
+
+#: elf32-mips.c:2530
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr ""
+
+#: elf32-mips.c:2560
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr ""
+
+#: elf32-mips.c:2569
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr ""
+
+#: elf32-mips.c:2592
+#, 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
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr ""
+
+#: elf32-mips.c:2637
+msgid " [abi=O32]"
+msgstr ""
+
+#: elf32-mips.c:2639
+msgid " [abi=O64]"
+msgstr ""
+
+#: elf32-mips.c:2641
+msgid " [abi=EABI32]"
+msgstr ""
+
+#: elf32-mips.c:2643
+msgid " [abi=EABI64]"
+msgstr ""
+
+#: elf32-mips.c:2645
+msgid " [abi unknown]"
+msgstr ""
+
+#: elf32-mips.c:2647
+msgid " [abi=N32]"
+msgstr ""
+
+#: elf32-mips.c:2649
+msgid " [abi=64]"
+msgstr ""
+
+#: elf32-mips.c:2651
+msgid " [no abi set]"
+msgstr ""
+
+#: elf32-mips.c:2654
+msgid " [mips1]"
+msgstr ""
+
+#: elf32-mips.c:2656
+msgid " [mips2]"
+msgstr ""
+
+#: elf32-mips.c:2658
+msgid " [mips3]"
+msgstr ""
+
+#: elf32-mips.c:2660
+msgid " [mips4]"
+msgstr ""
+
+#: elf32-mips.c:2662
+msgid " [unknown ISA]"
+msgstr ""
+
+#: elf32-mips.c:2665
+msgid " [32bitmode]"
+msgstr ""
+
+#: elf32-mips.c:2667
+msgid " [not 32bitmode]"
+msgstr ""
+
+#: elf32-mips.c:4270
+msgid "static procedure (no name)"
+msgstr ""
+
+#: elf32-mips.c:4887 elf64-alpha.c:4364
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr ""
+
+#: elf32-mips.c:5414
+msgid "not enough GOT space for local GOT entries"
+msgstr ""
+
+#: elf32-mips.c:6493
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr ""
+
+#: elf32-mips.c:7521
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elf32-ppc.c:1443
+#, c-format
+msgid ""
+"%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr ""
+
+#: elf32-ppc.c:1451
+#, c-format
+msgid ""
+"%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr ""
+
+#: elf32-ppc.c:1578
+#, c-format
+msgid "%s: Unknown special linker type %d"
+msgstr ""
+
+#: elf32-ppc.c:2251 elf32-ppc.c:2285 elf32-ppc.c:2320
+#, c-format
+msgid "%s: relocation %s cannot be used when making a shared object"
+msgstr ""
+
+#: elf32-ppc.c:3123
+#, c-format
+msgid "%s: unknown relocation type %d for symbol %s"
+msgstr ""
+
+#: elf32-ppc.c:3491 elf32-ppc.c:3513 elf32-ppc.c:3562
+#, c-format
+msgid ""
+"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr ""
+
+#: elf32-ppc.c:3628
+#, c-format
+msgid "%s: Relocation %s is not yet supported for symbol %s."
+msgstr ""
+
+#: elf32-sh.c:681
+#, c-format
+msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
+msgstr ""
+
+#: elf32-sh.c:693
+#, c-format
+msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgstr ""
+
+#: elf32-sh.c:710
+#, c-format
+msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
+msgstr ""
+
+#: elf32-sh.c:725
+#, c-format
+msgid "%s: 0x%lx: warning: could not find expected reloc"
+msgstr ""
+
+#: elf32-sh.c:762
+#, c-format
+msgid "%s: 0x%lx: warning: symbol in unexpected section"
+msgstr ""
+
+#: elf32-sh.c:884
+#, c-format
+msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
+msgstr ""
+
+#: elf32-sh.c:893
+#, c-format
+msgid "%s: 0x%lx: warning: bad count"
+msgstr ""
+
+#: elf32-sh.c:1279 elf32-sh.c:1666
+#, c-format
+msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr ""
+
+#: elf32-sparc.c:1486 elf64-sparc.c:2242
+#, 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
+#, c-format
+msgid "%s: compiled for a 64 bit system and target is 32 bit"
+msgstr ""
+
+#: elf32-sparc.c:1888
+#, c-format
+msgid "%s: linking little endian files with big endian files"
+msgstr ""
+
+#: elf32-v850.c:680
+#, c-format
+msgid "Variable `%s' cannot occupy in multiple small data regions"
+msgstr ""
+
+#: elf32-v850.c:683
+#, c-format
+msgid ""
+"Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr ""
+
+#: elf32-v850.c:686
+#, c-format
+msgid ""
+"Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr ""
+
+#: elf32-v850.c:689
+#, c-format
+msgid ""
+"Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr ""
+
+#: elf32-v850.c:692
+#, c-format
+msgid ""
+"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr ""
+
+#: elf32-v850.c:1070
+msgid "FAILED to find previous HI16 reloc\n"
+msgstr ""
+
+#: elf32-v850.c:1689
+msgid "could not locate special linker symbol __gp"
+msgstr ""
+
+#: elf32-v850.c:1693
+msgid "could not locate special linker symbol __ep"
+msgstr ""
+
+#: elf32-v850.c:1697
+msgid "could not locate special linker symbol __ctbp"
+msgstr ""
+
+#: elf32-v850.c:1886
+#, c-format
+msgid "%s: Architecture mismatch with previous modules"
+msgstr ""
+
+#: elf32-v850.c:1905
+#, c-format
+msgid "private flags = %lx: "
+msgstr ""
+
+#: elf32-v850.c:1910
+msgid "v850 architecture"
+msgstr ""
+
+#: elf32-v850.c:1911
+msgid "v850e architecture"
+msgstr ""
+
+#: elf32-v850.c:1912
+msgid "v850ea architecture"
+msgstr ""
+
+#: elf64-alpha.c:951
+msgid "GPDISP relocation did not find ldah and lda instructions"
+msgstr ""
+
+#: elf64-alpha.c:3004
+#, c-format
+msgid "%s: .got subsegment exceeds 64K (size %d)"
+msgstr ""
+
+#: elf64-sparc.c:1249
+#, c-format
+msgid "%s: check_relocs: unhandled reloc type %d"
+msgstr ""
+
+#: elf64-sparc.c:1286
+msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
+msgstr ""
+
+#: elf64-sparc.c:1306
+msgid ""
+"Register %%g%d used incompatibly: previously declared in %s to %s, in %s "
+"redefined to %s"
+msgstr ""
+
+#: elf64-sparc.c:1329
+#, c-format
+msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s"
+msgstr ""
+
+#: elf64-sparc.c:1375
+#, c-format
+msgid "Symbol `%s' has differing types: REGISTER in %s, %s in %s"
+msgstr ""
+
+#: elf64-sparc.c:2825
+#, c-format
+msgid "%s: linking UltraSPARC specific with HAL specific code"
+msgstr ""
+
+#: elf.c:323
+#, c-format
+msgid "%s: invalid string offset %u >= %lu for section `%s'"
+msgstr ""
+
+#: elf.c:546
+msgid ""
+"\n"
+"Program Header:\n"
+msgstr ""
+
+#: elf.c:594
+msgid ""
+"\n"
+"Dynamic Section:\n"
+msgstr ""
+
+#: elf.c:696
+msgid ""
+"\n"
+"Version definitions:\n"
+msgstr ""
+
+#: elf.c:719
+msgid ""
+"\n"
+"Version References:\n"
+msgstr ""
+
+#: elf.c:724
+#, c-format
+msgid " required from %s:\n"
+msgstr ""
+
+#: elf.c:1286
+#, c-format
+msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgstr ""
+
+#: elf.c:2045
+#, c-format
+msgid ""
+"creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = "
+"0x%.8lx\n"
+msgstr ""
+
+#: elf.c:2648
+#, c-format
+msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+msgstr ""
+
+#: elf.c:2747
+#, c-format
+msgid "%s: Not enough room for program headers, try linking with -N"
+msgstr ""
+
+#: elf.c:2873
+#, c-format
+msgid "Error: First section in segment (%s) starts at 0x%x"
+msgstr ""
+
+#: elf.c:2876
+#, c-format
+msgid " whereas segment starts at 0x%x"
+msgstr ""
+
+#: elf.c:3146
+#, c-format
+msgid "%s: warning: allocated section `%s' not in segment"
+msgstr ""
+
+#: elf.c:3528
+#, c-format
+msgid "%s: symbol `%s' required but not present"
+msgstr ""
+
+#: elf.c:3537
+#, c-format
+msgid ""
+"elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = "
+"0x%.8lx%s\n"
+msgstr ""
+
+#: elf.c:3679
+#, c-format
+msgid "%s: warning: Empty loadable segment detected\n"
+msgstr ""
+
+#: elf.c:4956
+#, c-format
+msgid "%s: unsupported relocation type %s"
+msgstr ""
+
+#: elfcode.h:1061
+#, c-format
+msgid "%s: version count (%ld) does not match symbol count (%ld)"
+msgstr ""
+
+#: elflink.c:423
+#, c-format
+msgid "%s: Section %s is already to large to put hole of %ld bytes in"
+msgstr ""
+
+#: elflink.h:1388
+#, c-format
+msgid "%s: %s: invalid version %u (max %d)"
+msgstr ""
+
+#: elflink.h:1429
+#, c-format
+msgid "%s: %s: invalid needed version %d"
+msgstr ""
+
+#: elflink.h:1546
+#, c-format
+msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
+msgstr ""
+
+#: elflink.h:1790
+#, c-format
+msgid "%s: warning: unexpected redefinition of `%s'"
+msgstr ""
+
+#: elflink.h:3480
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr ""
+
+#: elflink.h:3752
+#, c-format
+msgid "%s: undefined versioned symbol name %s"
+msgstr ""
+
+#: elflink.h:4983
+#, c-format
+msgid "%s: could not find output section %s for input section %s"
+msgstr ""
+
+#: i386linux.c:450 m68klinux.c:454 sparclinux.c:452
+#, c-format
+msgid "Output file requires shared library `%s'\n"
+msgstr ""
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:460
+#, c-format
+msgid "Output file requires shared library `%s.so.%s'\n"
+msgstr ""
+
+#: i386linux.c:646 i386linux.c:696 m68klinux.c:653 m68klinux.c:701
+#: sparclinux.c:649 sparclinux.c:699
+#, c-format
+msgid "Symbol %s not defined for fixups\n"
+msgstr ""
+
+#: i386linux.c:720 m68klinux.c:725 sparclinux.c:723
+msgid "Warning: fixup count mismatch\n"
+msgstr ""
+
+#: ieee.c:167
+#, c-format
+msgid "%s: string too long (%d chars, max 65535)"
+msgstr ""
+
+#: ieee.c:297
+#, c-format
+msgid "%s: unrecognized symbol `%s' flags 0x%x"
+msgstr ""
+
+#: ieee.c:793
+#, c-format
+msgid "%s: unimplemented ATI record %u for symbol %u"
+msgstr ""
+
+#: ieee.c:818
+#, c-format
+msgid "%s: unexpected ATN type %d in external part"
+msgstr ""
+
+#: ieee.c:840
+#, c-format
+msgid "%s: unexpected type after ATN"
+msgstr ""
+
+#: ihex.c:259
+#, c-format
+msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
+msgstr ""
+
+#: ihex.c:369
+#, c-format
+msgid "%s:%d: bad checksum in Intel Hex file (expected %u, found %u)"
+msgstr ""
+
+#: ihex.c:421
+#, c-format
+msgid "%s:%d: bad extended address record length in Intel Hex file"
+msgstr ""
+
+#: ihex.c:438
+#, c-format
+msgid "%s:%d: bad extended start address length in Intel Hex file"
+msgstr ""
+
+#: ihex.c:455
+#, c-format
+msgid "%s:%d: bad extended linear address record length in Intel Hex file"
+msgstr ""
+
+#: ihex.c:472
+#, c-format
+msgid "%s:%d: bad extended linear start address length in Intel Hex file"
+msgstr ""
+
+#: ihex.c:489
+#, c-format
+msgid "%s:%d: unrecognized ihex type %u in Intel Hex file\n"
+msgstr ""
+
+#: ihex.c:609
+#, c-format
+msgid "%s: internal error in ihex_read_section"
+msgstr ""
+
+#: ihex.c:644
+#, c-format
+msgid "%s: bad section length in ihex_read_section"
+msgstr ""
+
+#: ihex.c:858
+#, c-format
+msgid "%s: address 0x%s out of range for Intex Hex file"
+msgstr ""
+
+#: libbfd.c:484
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr ""
+
+#: libbfd.c:487
+msgid "not mapping: env var not set\n"
+msgstr ""
+
+#: linker.c:2679
+#, c-format
+msgid "Attempt to do relocateable link with %s input and %s output"
+msgstr ""
+
+#: oasys.c:1016
+#, c-format
+msgid "%s: can not represent section `%s' in oasys"
+msgstr ""
+
+#: osf-core.c:146
+#, c-format
+msgid "Unhandled OSF/1 core file section type %d\n"
+msgstr ""
+
+#. XXX code yet to be written.
+#: peicode.h:806
+#, c-format
+msgid "%s: Unhandled import type; %x"
+msgstr ""
+
+#: peicode.h:811
+#, c-format
+msgid "%s: Unrecognised import type; %x"
+msgstr ""
+
+#: peicode.h:825
+#, c-format
+msgid "%s: Unrecognised import name type; %x"
+msgstr ""
+
+#: peicode.h:1182
+#, c-format
+msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgstr ""
+
+#: peicode.h:1194
+#, c-format
+msgid ""
+"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
+"archive"
+msgstr ""
+
+#: peicode.h:1211
+#, c-format
+msgid "%s: size field is zero in Import Library Format header"
+msgstr ""
+
+#: peicode.h:1239
+#, c-format
+msgid "%s: string not null terminated in ILF object file."
+msgstr ""
+
+#: peigen.c:938
+#, c-format
+msgid "%s: line number overflow: 0x%lx > 0xffff"
+msgstr ""
+
+#: peigen.c:950
+#, c-format
+msgid "%s: reloc overflow: 0x%lx > 0xffff"
+msgstr ""
+
+#: peigen.c:963
+msgid "Export Directory [.edata (or where ever we found it)]"
+msgstr ""
+
+#: peigen.c:964
+msgid "Import Directory [parts of .idata]"
+msgstr ""
+
+#: peigen.c:965
+msgid "Resource Directory [.rsrc]"
+msgstr ""
+
+#: peigen.c:966
+msgid "Exception Directory [.pdata]"
+msgstr ""
+
+#: peigen.c:967
+msgid "Security Directory"
+msgstr ""
+
+#: peigen.c:968
+msgid "Base Relocation Directory [.reloc]"
+msgstr ""
+
+#: peigen.c:969
+msgid "Debug Directory"
+msgstr ""
+
+#: peigen.c:970
+msgid "Description Directory"
+msgstr ""
+
+#: peigen.c:971
+msgid "Special Directory"
+msgstr ""
+
+#: peigen.c:972
+msgid "Thread Storage Directory [.tls]"
+msgstr ""
+
+#: peigen.c:973
+msgid "Load Configuration Directory"
+msgstr ""
+
+#: peigen.c:974
+msgid "Bound Import Directory"
+msgstr ""
+
+#: peigen.c:975
+msgid "Import Address Table Directory"
+msgstr ""
+
+#: peigen.c:976 peigen.c:977 peigen.c:978
+msgid "Reserved"
+msgstr ""
+
+#: peigen.c:1022
+msgid ""
+"\n"
+"The import table is the .idata section\n"
+msgstr ""
+
+#: peigen.c:1044
+msgid ""
+"\n"
+"There is an import table, but the section containing it could not be found\n"
+msgstr ""
+
+#: peigen.c:1048
+#, c-format
+msgid ""
+"\n"
+"There is an import table in %s at 0x%lx\n"
+msgstr ""
+
+#: peigen.c:1089
+#, c-format
+msgid ""
+"\n"
+"Function descriptor located at the start address: %04lx\n"
+msgstr ""
+
+#: peigen.c:1092
+#, c-format
+msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
+msgstr ""
+
+#: peigen.c:1098
+msgid ""
+"\n"
+"No reldata section! Function descriptor not decoded.\n"
+msgstr ""
+
+#: peigen.c:1103
+msgid ""
+"\n"
+"The Import Tables (interpreted .idata section contents)\n"
+msgstr ""
+
+#: peigen.c:1105
+msgid " vma: Hint Time Forward DLL First\n"
+msgstr ""
+
+#: peigen.c:1107
+msgid " Table Stamp Chain Name Thunk\n"
+msgstr ""
+
+#: peigen.c:1157
+#, c-format
+msgid ""
+"\n"
+"\tDLL Name: %s\n"
+msgstr ""
+
+#: peigen.c:1161 peigen.c:1224
+msgid "\tvma: Hint/Ord Member-Name\n"
+msgstr ""
+
+#: peigen.c:1223
+msgid "\tThe Import Address Table (difference found)\n"
+msgstr ""
+
+#: peigen.c:1230
+msgid "\t>>> Ran out of IAT members!\n"
+msgstr ""
+
+#: peigen.c:1248
+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
+msgid ""
+"\n"
+"There is an export table, but the section containing it could not be found\n"
+msgstr ""
+
+#: peigen.c:1323
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s at 0x%lx\n"
+msgstr ""
+
+#: peigen.c:1355
+msgid ""
+"\n"
+"The Export Tables (interpreted .edata section contents)\n"
+"\n"
+msgstr ""
+
+#: peigen.c:1358
+#, c-format
+msgid "Export Flags \t\t\t%lx\n"
+msgstr ""
+
+#: peigen.c:1361
+#, c-format
+msgid "Time/Date stamp \t\t%lx\n"
+msgstr ""
+
+#: peigen.c:1364
+#, c-format
+msgid "Major/Minor \t\t\t%d/%d\n"
+msgstr ""
+
+#: peigen.c:1367
+msgid "Name \t\t\t\t"
+msgstr ""
+
+#: peigen.c:1373
+#, c-format
+msgid "Ordinal Base \t\t\t%ld\n"
+msgstr ""
+
+#: peigen.c:1376
+msgid "Number in:\n"
+msgstr ""
+
+#: peigen.c:1379
+#, c-format
+msgid "\tExport Address Table \t\t%lx\n"
+msgstr ""
+
+#: peigen.c:1383
+#, c-format
+msgid "\t[Name Pointer/Ordinal] Table\t%lu\n"
+msgstr ""
+
+#: peigen.c:1386
+msgid "Table Addresses\n"
+msgstr ""
+
+#: peigen.c:1389
+msgid "\tExport Address Table \t\t"
+msgstr ""
+
+#: peigen.c:1394
+msgid "\tName Pointer Table \t\t"
+msgstr ""
+
+#: peigen.c:1399
+msgid "\tOrdinal Table \t\t\t"
+msgstr ""
+
+#: peigen.c:1415
+#, c-format
+msgid ""
+"\n"
+"Export Address Table -- Ordinal Base %ld\n"
+msgstr ""
+
+#: peigen.c:1436
+msgid "Forwarder RVA"
+msgstr ""
+
+#: peigen.c:1444
+msgid "Export RVA"
+msgstr ""
+
+#: peigen.c:1451
+msgid ""
+"\n"
+"[Ordinal/Name Pointer] Table\n"
+msgstr ""
+
+#: peigen.c:1496
+#, c-format
+msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
+msgstr ""
+
+#: peigen.c:1500
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+
+#: peigen.c:1502
+msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n"
+msgstr ""
+
+#: peigen.c:1504
+msgid " \t\tAddress Address Handler Data Address Mask\n"
+msgstr ""
+
+#: peigen.c:1576
+msgid " Register save millicode"
+msgstr ""
+
+#: peigen.c:1579
+msgid " Register restore millicode"
+msgstr ""
+
+#: peigen.c:1582
+msgid " Glue code sequence"
+msgstr ""
+
+#: peigen.c:1628
+msgid ""
+"\n"
+"\n"
+"PE File Base Relocations (interpreted .reloc section contents)\n"
+msgstr ""
+
+#: peigen.c:1663
+#, c-format
+msgid ""
+"\n"
+"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
+msgstr ""
+
+#: peigen.c:1676
+#, c-format
+msgid "\treloc %4d offset %4x [%4lx] %s"
+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
+#, c-format
+msgid ""
+"\n"
+"Characteristics 0x%x\n"
+msgstr ""
+
+#: pe-mips.c:657
+#, c-format
+msgid "%s: `ld -r' not supported with PE MIPS objects\n"
+msgstr ""
+
+#: pe-mips.c:820
+#, c-format
+msgid "%s: jump too far away\n"
+msgstr ""
+
+#: pe-mips.c:847
+#, c-format
+msgid "%s: bad pair/reflo after refhi\n"
+msgstr ""
+
+#: ppcboot.c:418
+msgid ""
+"\n"
+"ppcboot header:\n"
+msgstr ""
+
+#: ppcboot.c:419
+#, c-format
+msgid "Entry offset = 0x%.8lx (%ld)\n"
+msgstr ""
+
+#: ppcboot.c:420
+#, c-format
+msgid "Length = 0x%.8lx (%ld)\n"
+msgstr ""
+
+#: ppcboot.c:423
+#, c-format
+msgid "Flag field = 0x%.2x\n"
+msgstr ""
+
+#: ppcboot.c:429
+#, c-format
+msgid "Partition name = \"%s\"\n"
+msgstr ""
+
+#: ppcboot.c:448
+#, c-format
+msgid ""
+"\n"
+"Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr ""
+
+#: ppcboot.c:454
+#, c-format
+msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr ""
+
+#: ppcboot.c:460
+#, c-format
+msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
+msgstr ""
+
+#: ppcboot.c:461
+#, c-format
+msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
+msgstr ""
+
+#: som.c:5335
+msgid "som_sizeof_headers unimplemented"
+msgstr ""
+
+#: srec.c:290
+#, c-format
+msgid "%s:%d: Unexpected character `%s' in S-record file\n"
+msgstr ""
+
+#: syms.c:974
+msgid "Unsupported .stab relocation"
+msgstr ""
+
+#: vms-gsd.c:357
+#, c-format
+msgid "bfd_make_section (%s) failed"
+msgstr ""
+
+#: vms-gsd.c:371
+#, c-format
+msgid "bfd_set_section_flags (%s, %x) failed"
+msgstr ""
+
+#: vms-gsd.c:407
+#, c-format
+msgid "Size mismatch section %s=%lx, %s=%lx"
+msgstr ""
+
+#: vms-gsd.c:702
+#, c-format
+msgid "unknown gsd/egsd subtype %d"
+msgstr ""
+
+#: vms-hdr.c:405
+msgid "Object module NOT error-free !\n"
+msgstr ""
+
+#: vms-misc.c:541
+#, c-format
+msgid "Stack overflow (%d) in _bfd_vms_push"
+msgstr ""
+
+#: vms-misc.c:560
+msgid "Stack underflow in _bfd_vms_pop"
+msgstr ""
+
+#: vms-misc.c:931
+msgid "_bfd_vms_output_counted called with zero bytes"
+msgstr ""
+
+#: vms-misc.c:936
+msgid "_bfd_vms_output_counted called with too many bytes"
+msgstr ""
+
+#: vms-misc.c:1069
+#, c-format
+msgid "Symbol %s replaced by %s\n"
+msgstr ""
+
+#: vms-misc.c:1133
+#, c-format
+msgid "failed to enter %s"
+msgstr ""
+
+#: vms-tir.c:69
+msgid "No Mem !"
+msgstr ""
+
+#: vms-tir.c:309
+msgid "Bad section index in ETIR_S_C_STA_PQ"
+msgstr ""
+
+#: vms-tir.c:324
+#, c-format
+msgid "Unsupported STA cmd %d"
+msgstr ""
+
+#: vms-tir.c:329 vms-tir.c:1287
+#, c-format
+msgid "Reserved STA cmd %d"
+msgstr ""
+
+#: vms-tir.c:436
+#, c-format
+msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
+msgstr ""
+
+#: vms-tir.c:457
+#, c-format
+msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
+msgstr ""
+
+#: vms-tir.c:470
+msgid "ETIR_S_C_STO_RB/AB: Not supported"
+msgstr ""
+
+#: vms-tir.c:528
+msgid "ETIR_S_C_STO_LP_PSB: Not supported"
+msgstr ""
+
+#: vms-tir.c:534
+msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
+msgstr ""
+
+#: vms-tir.c:540
+msgid "ETIR_S_C_STO_HINT_PS: not implemented"
+msgstr ""
+
+#: vms-tir.c:544 vms-tir.c:1460
+#, c-format
+msgid "Reserved STO cmd %d"
+msgstr ""
+
+#: vms-tir.c:657
+msgid "ETIR_S_C_OPR_INSV: Not supported"
+msgstr ""
+
+#: vms-tir.c:675
+msgid "ETIR_S_C_OPR_USH: Not supported"
+msgstr ""
+
+#: vms-tir.c:681
+msgid "ETIR_S_C_OPR_ROT: Not supported"
+msgstr ""
+
+#: vms-tir.c:700
+msgid "ETIR_S_C_OPR_REDEF: Not supported"
+msgstr ""
+
+#: vms-tir.c:706
+msgid "ETIR_S_C_OPR_DFLIT: Not supported"
+msgstr ""
+
+#: vms-tir.c:710 vms-tir.c:1656
+#, c-format
+msgid "Reserved OPR cmd %d"
+msgstr ""
+
+#: vms-tir.c:779 vms-tir.c:1726
+#, c-format
+msgid "Reserved CTL cmd %d"
+msgstr ""
+
+#: vms-tir.c:808
+msgid "ETIR_S_C_STC_LP: not supported"
+msgstr ""
+
+#: vms-tir.c:826
+msgid "ETIR_S_C_STC_GBL: not supported"
+msgstr ""
+
+#: vms-tir.c:834
+msgid "ETIR_S_C_STC_GCA: not supported"
+msgstr ""
+
+#: vms-tir.c:843
+msgid "ETIR_S_C_STC_PS: not supported"
+msgstr ""
+
+#.
+#. * stack byte from image
+#. * arg: -
+#. *
+#.
+#: vms-tir.c:1187
+msgid "Stack-from-image not implemented"
+msgstr ""
+
+#: vms-tir.c:1207
+msgid "Stack-entry-mask not fully implemented"
+msgstr ""
+
+#.
+#. * compare procedure argument
+#. * arg: cs symbol name
+#. * by argument index
+#. * da argument descriptor
+#. *
+#. * compare argument descriptor with symbol argument (ARG$V_PASSMECH)
+#. * and stack TRUE (args match) or FALSE (args dont match) value
+#.
+#: vms-tir.c:1223
+msgid "PASSMECH not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1243
+msgid "Stack-local-symbol not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1258
+msgid "Stack-literal not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1280
+msgid "Stack-local-symbol-entry-point-mask not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1456
+#, c-format
+msgid "Unimplemented STO cmd %d"
+msgstr ""
+
+#: vms-tir.c:1596
+msgid "TIR_S_C_OPR_ASH incomplete"
+msgstr ""
+
+#: vms-tir.c:1610
+msgid "TIR_S_C_OPR_USH incomplete"
+msgstr ""
+
+#: vms-tir.c:1624
+msgid "TIR_S_C_OPR_ROT incomplete"
+msgstr ""
+
+#.
+#. * redefine symbol to current location
+#.
+#: vms-tir.c:1645
+msgid "TIR_S_C_OPR_REDEF not supported"
+msgstr ""
+
+#.
+#. * define a literal
+#.
+#: vms-tir.c:1652
+msgid "TIR_S_C_OPR_DFLIT not supported"
+msgstr ""
+
+#: vms-tir.c:1707
+msgid "TIR_S_C_CTL_DFLOC not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1715
+msgid "TIR_S_C_CTL_STLOC not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1723
+msgid "TIR_S_C_CTL_STKDL not fully implemented"
+msgstr ""
+
+#: vms-tir.c:1778
+#, c-format
+msgid "Obj code %d not found"
+msgstr ""
+
+#: vms-tir.c:2127
+#, c-format
+msgid "SEC_RELOC with no relocs in section %s"
+msgstr ""
+
+#: vms-tir.c:2401
+#, c-format
+msgid "Unhandled relocation %s"
+msgstr ""
+
+#: xcofflink.c:1661
+#, c-format
+msgid "%s: `%s' has line numbers but no enclosing section"
+msgstr ""
+
+#: xcofflink.c:1713
+#, c-format
+msgid "%s: class %d symbol `%s' has no aux entries"
+msgstr ""
+
+#: xcofflink.c:1736
+#, c-format
+msgid "%s: symbol `%s' has unrecognized csect type %d"
+msgstr ""
+
+#: xcofflink.c:1748
+#, c-format
+msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
+msgstr ""
+
+#: xcofflink.c:1787
+#, c-format
+msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
+msgstr ""
+
+#: xcofflink.c:1911
+#, c-format
+msgid "%s: symbol `%s' has unrecognized smclas %d"
+msgstr ""
+
+#: xcofflink.c:1930
+#, c-format
+msgid "%s: csect `%s' not in enclosing section"
+msgstr ""
+
+#: xcofflink.c:2034
+#, c-format
+msgid "%s: misplaced XTY_LD `%s'"
+msgstr ""
+
+#: xcofflink.c:2345
+#, c-format
+msgid "%s: reloc %s:%d not in csect"
+msgstr ""
+
+#: xcofflink.c:2480
+#, c-format
+msgid "%s: XCOFF shared object when not producing XCOFF output"
+msgstr ""
+
+#: xcofflink.c:2501
+#, c-format
+msgid "%s: dynamic object with no .loader section"
+msgstr ""
+
+#: xcofflink.c:3141
+#, c-format
+msgid "%s: no such symbol"
+msgstr ""
+
+#: xcofflink.c:3733
+#, c-format
+msgid "warning: attempt to export undefined symbol `%s'"
+msgstr ""
+
+#: xcofflink.c:4709
+#, 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
+#, c-format
+msgid "%s: loader reloc in unrecognized section `%s'"
+msgstr ""
+
+#: xcofflink.c:5556 xcofflink.c:6255
+#, c-format
+msgid "%s: `%s' in loader reloc but not loader sym"
+msgstr ""
+
+#: xcofflink.c:5571
+#, c-format
+msgid "%s: loader reloc in read-only section %s"
+msgstr ""
+
+#: xcofflink.c:6451
+#, c-format
+msgid "%s: unsupported relocation type 0x%02x"
+msgstr ""
+
+#: xcofflink.c:6497
+#, 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
new file mode 100644
index 0000000..d9db826
--- /dev/null
+++ b/contrib/binutils/bfd/ppcboot.c
@@ -0,0 +1,537 @@
+/* BFD back-end for PPCbug boot records.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This is a BFD backend which may be used to write PowerPCBug boot objects.
+ It may only be used for output, not input. The intention is that this may
+ be used as an output format for objcopy in order to generate raw binary
+ data.
+
+ This is very simple. The only complication is that the real data
+ will start at some address X, and in some cases we will not want to
+ include X zeroes just to get to that point. Since the start
+ address is not meaningful for this object file format, we use it
+ instead to indicate the number of zeroes to skip at the start of
+ the file. objcopy cooperates by specially setting the start
+ address to zero by default. */
+
+#include <ctype.h>
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+/* PPCbug location structure */
+typedef struct ppcboot_location {
+ bfd_byte ind;
+ bfd_byte head;
+ bfd_byte sector;
+ bfd_byte cylinder;
+} ppcboot_location_t;
+
+/* PPCbug partition table layout */
+typedef struct ppcboot_partition {
+ ppcboot_location_t partition_begin; /* partition begin */
+ ppcboot_location_t partition_end; /* partition end */
+ bfd_byte sector_begin[4]; /* 32-bit start RBA (zero-based), little endian */
+ bfd_byte sector_length[4]; /* 32-bit RBA count (one-based), little endian */
+} ppcboot_partition_t;
+
+/* PPCbug boot layout. */
+typedef struct ppcboot_hdr {
+ bfd_byte pc_compatibility[446]; /* x86 instruction field */
+ ppcboot_partition_t partition[4]; /* partition information */
+ bfd_byte signature[2]; /* 0x55 and 0xaa */
+ bfd_byte entry_offset[4]; /* entry point offset, little endian */
+ bfd_byte length[4]; /* load image length, little endian */
+ bfd_byte flags; /* flag field */
+ bfd_byte os_id; /* OS_ID */
+ char partition_name[32]; /* partition name */
+ bfd_byte reserved1[470]; /* reserved */
+} ppcboot_hdr_t;
+
+/* Signature bytes for last 2 bytes of the 512 byte record */
+#define SIGNATURE0 0x55
+#define SIGNATURE1 0xaa
+
+/* PowerPC boot type */
+#define PPC_IND 0x41
+
+/* Information needed for ppcboot header */
+typedef struct ppcboot_data {
+ ppcboot_hdr_t header; /* raw header */
+ asection *sec; /* single section */
+} ppcboot_data_t;
+
+/* Any bfd we create by reading a ppcboot file has three symbols:
+ a start symbol, an end symbol, and an absolute length symbol. */
+#define PPCBOOT_SYMS 3
+
+static boolean ppcboot_mkobject PARAMS ((bfd *));
+static const bfd_target *ppcboot_object_p PARAMS ((bfd *));
+static boolean ppcboot_set_arch_mach
+ PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+static boolean ppcboot_get_section_contents
+ PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+static long ppcboot_get_symtab_upper_bound PARAMS ((bfd *));
+static char *mangle_name PARAMS ((bfd *, char *));
+static long ppcboot_get_symtab PARAMS ((bfd *, asymbol **));
+static asymbol *ppcboot_make_empty_symbol PARAMS ((bfd *));
+static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
+static boolean ppcboot_set_section_contents
+ PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+static int ppcboot_sizeof_headers PARAMS ((bfd *, boolean));
+static boolean ppcboot_bfd_print_private_bfd_data PARAMS ((bfd *, PTR));
+
+#define ppcboot_set_tdata(abfd, ptr) ((abfd)->tdata.any = (PTR) (ptr))
+#define ppcboot_get_tdata(abfd) ((ppcboot_data_t *) ((abfd)->tdata.any))
+
+/* Create a ppcboot object. Invoked via bfd_set_format. */
+
+static boolean
+ppcboot_mkobject (abfd)
+ bfd *abfd;
+{
+ if (!ppcboot_get_tdata (abfd))
+ ppcboot_set_tdata (abfd, bfd_zalloc (abfd, sizeof (ppcboot_data_t)));
+
+ return true;
+}
+
+
+/* Set the architecture to PowerPC */
+static boolean
+ppcboot_set_arch_mach (abfd, arch, machine)
+ bfd *abfd;
+ enum bfd_architecture arch;
+ unsigned long machine;
+{
+ if (arch == bfd_arch_unknown)
+ arch = bfd_arch_powerpc;
+
+ else if (arch != bfd_arch_powerpc)
+ return false;
+
+ return bfd_default_set_arch_mach (abfd, arch, machine);
+}
+
+
+/* Any file may be considered to be a ppcboot file, provided the target
+ was not defaulted. That is, it must be explicitly specified as
+ being ppcboot. */
+
+static const bfd_target *
+ppcboot_object_p (abfd)
+ bfd *abfd;
+{
+ struct stat statbuf;
+ asection *sec;
+ ppcboot_hdr_t hdr;
+ size_t i;
+ ppcboot_data_t *tdata;
+
+ BFD_ASSERT (sizeof (ppcboot_hdr_t) == 1024);
+
+ if (abfd->target_defaulted)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ /* Find the file size. */
+ if (bfd_stat (abfd, &statbuf) < 0)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return NULL;
+ }
+
+ if ((size_t) statbuf.st_size < sizeof (ppcboot_hdr_t))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ if (bfd_read ((PTR) &hdr, sizeof (hdr), 1, abfd) != sizeof (hdr))
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+
+ return NULL;
+ }
+
+ /* Now do some basic checks. */
+ for (i = 0; i < sizeof (hdr.pc_compatibility); i++)
+ if (hdr.pc_compatibility[i])
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ if (hdr.signature[0] != SIGNATURE0 || hdr.signature[1] != SIGNATURE1)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ if (hdr.partition[0].partition_end.ind != PPC_IND)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ abfd->symcount = PPCBOOT_SYMS;
+
+ /* One data section. */
+ sec = bfd_make_section (abfd, ".data");
+ if (sec == NULL)
+ return NULL;
+ sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_CODE | SEC_HAS_CONTENTS;
+ sec->vma = 0;
+ sec->_raw_size = statbuf.st_size - sizeof (ppcboot_hdr_t);
+ sec->filepos = sizeof (ppcboot_hdr_t);
+
+ ppcboot_mkobject (abfd);
+ tdata = ppcboot_get_tdata (abfd);
+ tdata->sec = sec;
+ memcpy ((PTR) &tdata->header, (PTR) &hdr, sizeof (ppcboot_hdr_t));
+
+ ppcboot_set_arch_mach (abfd, bfd_arch_powerpc, 0);
+ return abfd->xvec;
+}
+
+#define ppcboot_close_and_cleanup _bfd_generic_close_and_cleanup
+#define ppcboot_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define ppcboot_new_section_hook _bfd_generic_new_section_hook
+
+
+/* Get contents of the only section. */
+
+static boolean
+ppcboot_get_section_contents (abfd, section, location, offset, count)
+ bfd *abfd;
+ asection *section ATTRIBUTE_UNUSED;
+ PTR location;
+ file_ptr offset;
+ bfd_size_type count;
+{
+ if (bfd_seek (abfd, offset + sizeof(ppcboot_hdr_t), SEEK_SET) != 0
+ || bfd_read (location, 1, count, abfd) != count)
+ return false;
+ return true;
+}
+
+
+/* Return the amount of memory needed to read the symbol table. */
+
+static long
+ppcboot_get_symtab_upper_bound (abfd)
+ bfd *abfd ATTRIBUTE_UNUSED;
+{
+ return (PPCBOOT_SYMS + 1) * sizeof (asymbol *);
+}
+
+
+/* Create a symbol name based on the bfd's filename. */
+
+static char *
+mangle_name (abfd, suffix)
+ bfd *abfd;
+ char *suffix;
+{
+ int size;
+ char *buf;
+ char *p;
+
+ size = (strlen (bfd_get_filename (abfd))
+ + strlen (suffix)
+ + sizeof "_ppcboot__");
+
+ buf = (char *) bfd_alloc (abfd, size);
+ if (buf == NULL)
+ return "";
+
+ sprintf (buf, "_ppcboot_%s_%s", bfd_get_filename (abfd), suffix);
+
+ /* Change any non-alphanumeric characters to underscores. */
+ for (p = buf; *p; p++)
+ if (! isalnum ((unsigned char) *p))
+ *p = '_';
+
+ return buf;
+}
+
+
+/* Return the symbol table. */
+
+static long
+ppcboot_get_symtab (abfd, alocation)
+ bfd *abfd;
+ asymbol **alocation;
+{
+ asection *sec = ppcboot_get_tdata (abfd)->sec;
+ asymbol *syms;
+ unsigned int i;
+
+ syms = (asymbol *) bfd_alloc (abfd, PPCBOOT_SYMS * sizeof (asymbol));
+ if (syms == NULL)
+ return false;
+
+ /* Start symbol. */
+ syms[0].the_bfd = abfd;
+ syms[0].name = mangle_name (abfd, "start");
+ syms[0].value = 0;
+ syms[0].flags = BSF_GLOBAL;
+ syms[0].section = sec;
+ syms[0].udata.p = NULL;
+
+ /* End symbol. */
+ syms[1].the_bfd = abfd;
+ syms[1].name = mangle_name (abfd, "end");
+ syms[1].value = sec->_raw_size;
+ syms[1].flags = BSF_GLOBAL;
+ syms[1].section = sec;
+ syms[1].udata.p = NULL;
+
+ /* Size symbol. */
+ syms[2].the_bfd = abfd;
+ syms[2].name = mangle_name (abfd, "size");
+ syms[2].value = sec->_raw_size;
+ syms[2].flags = BSF_GLOBAL;
+ syms[2].section = bfd_abs_section_ptr;
+ syms[2].udata.p = NULL;
+
+ for (i = 0; i < PPCBOOT_SYMS; i++)
+ *alocation++ = syms++;
+ *alocation = NULL;
+
+ return PPCBOOT_SYMS;
+}
+
+
+/* Make an empty symbol. */
+
+static asymbol *
+ppcboot_make_empty_symbol (abfd)
+ bfd *abfd;
+{
+ return (asymbol *) bfd_alloc (abfd, sizeof (asymbol));
+}
+
+
+#define ppcboot_print_symbol _bfd_nosymbols_print_symbol
+
+/* Get information about a symbol. */
+
+static void
+ppcboot_get_symbol_info (ignore_abfd, symbol, ret)
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
+ asymbol *symbol;
+ symbol_info *ret;
+{
+ bfd_symbol_info (symbol, ret);
+}
+
+#define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name
+#define ppcboot_get_lineno _bfd_nosymbols_get_lineno
+#define ppcboot_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define ppcboot_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define ppcboot_read_minisymbols _bfd_generic_read_minisymbols
+#define ppcboot_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+
+#define ppcboot_get_reloc_upper_bound \
+ ((long (*) PARAMS ((bfd *, asection *))) bfd_0l)
+#define ppcboot_canonicalize_reloc \
+ ((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) bfd_0l)
+#define ppcboot_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
+
+/* Write section contents of a ppcboot file. */
+
+static boolean
+ppcboot_set_section_contents (abfd, sec, data, offset, size)
+ bfd *abfd;
+ asection *sec;
+ PTR data;
+ file_ptr offset;
+ bfd_size_type size;
+{
+ if (! abfd->output_has_begun)
+ {
+ bfd_vma low;
+ asection *s;
+
+ /* The lowest section VMA sets the virtual address of the start
+ of the file. We use the set the file position of all the
+ sections. */
+ low = abfd->sections->vma;
+ for (s = abfd->sections->next; s != NULL; s = s->next)
+ if (s->vma < low)
+ low = s->vma;
+
+ for (s = abfd->sections; s != NULL; s = s->next)
+ s->filepos = s->vma - low;
+
+ abfd->output_has_begun = true;
+ }
+
+ return _bfd_generic_set_section_contents (abfd, sec, data, offset, size);
+}
+
+
+static int
+ppcboot_sizeof_headers (abfd, exec)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean exec ATTRIBUTE_UNUSED;
+{
+ return sizeof (ppcboot_hdr_t);
+}
+
+
+/* Print out the program headers. */
+
+static boolean
+ppcboot_bfd_print_private_bfd_data (abfd, farg)
+ bfd *abfd;
+ PTR farg;
+{
+ FILE *f = (FILE *)farg;
+ ppcboot_data_t *tdata = ppcboot_get_tdata (abfd);
+ long entry_offset = bfd_getl_signed_32 ((PTR) tdata->header.entry_offset);
+ long length = bfd_getl_signed_32 ((PTR) tdata->header.length);
+ int i;
+
+ fprintf (f, _("\nppcboot header:\n"));
+ fprintf (f, _("Entry offset = 0x%.8lx (%ld)\n"), entry_offset, entry_offset);
+ fprintf (f, _("Length = 0x%.8lx (%ld)\n"), length, length);
+
+ if (tdata->header.flags)
+ fprintf (f, _("Flag field = 0x%.2x\n"), tdata->header.flags);
+
+ if (tdata->header.os_id)
+ fprintf (f, "OS_ID = 0x%.2x\n", tdata->header.os_id);
+
+ if (tdata->header.partition_name)
+ fprintf (f, _("Partition name = \"%s\"\n"), tdata->header.partition_name);
+
+ for (i = 0; i < 4; i++)
+ {
+ long sector_begin = bfd_getl_signed_32 ((PTR) tdata->header.partition[i].sector_begin);
+ long sector_length = bfd_getl_signed_32 ((PTR) tdata->header.partition[i].sector_length);
+
+ /* Skip all 0 entries */
+ if (!tdata->header.partition[i].partition_begin.ind
+ && !tdata->header.partition[i].partition_begin.head
+ && !tdata->header.partition[i].partition_begin.sector
+ && !tdata->header.partition[i].partition_begin.cylinder
+ && !tdata->header.partition[i].partition_end.ind
+ && !tdata->header.partition[i].partition_end.head
+ && !tdata->header.partition[i].partition_end.sector
+ && !tdata->header.partition[i].partition_end.cylinder
+ && !sector_begin && !sector_length)
+ continue;
+
+ fprintf (f, _("\nPartition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"), i,
+ tdata->header.partition[i].partition_begin.ind,
+ tdata->header.partition[i].partition_begin.head,
+ tdata->header.partition[i].partition_begin.sector,
+ tdata->header.partition[i].partition_begin.cylinder);
+
+ fprintf (f, _("Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"), i,
+ tdata->header.partition[i].partition_end.ind,
+ tdata->header.partition[i].partition_end.head,
+ tdata->header.partition[i].partition_end.sector,
+ tdata->header.partition[i].partition_end.cylinder);
+
+ fprintf (f, _("Partition[%d] sector = 0x%.8lx (%ld)\n"), i, sector_begin, sector_begin);
+ fprintf (f, _("Partition[%d] length = 0x%.8lx (%ld)\n"), i, sector_length, sector_length);
+ }
+
+ fprintf (f, "\n");
+ return true;
+}
+
+
+#define ppcboot_bfd_get_relocated_section_contents \
+ bfd_generic_get_relocated_section_contents
+#define ppcboot_bfd_relax_section bfd_generic_relax_section
+#define ppcboot_bfd_gc_sections bfd_generic_gc_sections
+#define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define ppcboot_bfd_final_link _bfd_generic_final_link
+#define ppcboot_bfd_link_split_section _bfd_generic_link_split_section
+#define ppcboot_get_section_contents_in_window \
+ _bfd_generic_get_section_contents_in_window
+
+#define ppcboot_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
+#define ppcboot_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
+#define ppcboot_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
+#define ppcboot_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
+#define ppcboot_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
+#define ppcboot_bfd_print_private_bfd_dat ppcboot_bfd_print_private_bfd_data
+
+const bfd_target ppcboot_vec =
+{
+ "ppcboot", /* name */
+ bfd_target_unknown_flavour, /* flavour */
+ BFD_ENDIAN_BIG, /* byteorder is big endian for code */
+ BFD_ENDIAN_LITTLE, /* header_byteorder */
+ EXEC_P, /* object_flags */
+ (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE | SEC_DATA
+ | SEC_ROM | SEC_HAS_CONTENTS), /* section_flags */
+ 0, /* symbol_leading_char */
+ ' ', /* ar_pad_char */
+ 16, /* ar_max_namelen */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ ppcboot_object_p, /* bfd_check_format */
+ _bfd_dummy_target,
+ _bfd_dummy_target,
+ },
+ { /* bfd_set_format */
+ bfd_false,
+ ppcboot_mkobject,
+ bfd_false,
+ bfd_false,
+ },
+ { /* bfd_write_contents */
+ bfd_false,
+ bfd_true,
+ bfd_false,
+ bfd_false,
+ },
+
+ BFD_JUMP_TABLE_GENERIC (ppcboot),
+ BFD_JUMP_TABLE_COPY (ppcboot),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (ppcboot),
+ BFD_JUMP_TABLE_RELOCS (ppcboot),
+ BFD_JUMP_TABLE_WRITE (ppcboot),
+ BFD_JUMP_TABLE_LINK (ppcboot),
+ 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 9700735..0969dce 100644
--- a/contrib/binutils/bfd/ptrace-core.c
+++ b/contrib/binutils/bfd/ptrace-core.c
@@ -1,5 +1,5 @@
/* BFD backend for core files which use the ptrace_user structure
- Copyright 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 96, 1998 Free Software Foundation, Inc.
The structure of this file is based on trad-core.c written by John Gilmore
of Cygnus Support.
Modified to work with the ptrace_user structure by Kevin A. Buettner.
@@ -27,13 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-#include <stdio.h>
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
-#include <errno.h>
-#include <unistd.h>
#include <sys/ptrace.h>
@@ -228,6 +224,8 @@ const bfd_target ptrace_core_vec =
BFD_JUMP_TABLE_LINK (_bfd_nolink),
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 dda7624..ef2375a 100644
--- a/contrib/binutils/bfd/reloc.c
+++ b/contrib/binutils/bfd/reloc.c
@@ -1,5 +1,5 @@
/* BFD support for handling relocation entries.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -25,7 +25,7 @@ SECTION
BFD maintains relocations in much the same way it maintains
symbols: they are left alone until required, then read in
- en-mass and translated into an internal form. A common
+ en-masse and translated into an internal form. A common
routine <<bfd_perform_relocation>> acts upon the
canonical form to do the fixup.
@@ -340,13 +340,26 @@ CODE_FRAGMENT
. {* The textual name of the relocation type. *}
. char *name;
.
-. {* When performing a partial link, some formats must modify the
-. relocations rather than the data - this flag signals this.*}
+. {* 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
+. addend is recorded with the section contents; when performing a
+. partial link (ld -r) the section contents (the data) will be
+. modified. The value of this field is FALSE if addends are
+. recorded with the relocation (in arelent.addend); when performing
+. a partial link the relocation will be modified.
+. All relocations for all ELF USE_RELA targets should set this field
+. to FALSE (values of TRUE should be looked on with suspicion).
+. However, the converse is not true: not all relocations of all ELF
+. USE_REL targets set this field to TRUE. Why this is so is peculiar
+. to each particular target. For relocs that aren't used in partial
+. 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
. are to be used in the relocation sum. E.g., if this was an 8 bit
-. bit of data which we read and relocated, this would be
+. byte of data which we read and relocated, this would be
. 0x000000ff. When we have relocs which have an addend, such as
. sun4 extended relocs, the value in the offset part of a
. relocating field is garbage so we never use it. In this case
@@ -389,6 +402,14 @@ DESCRIPTION
.#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
.
+
+DESCRIPTION
+ This is used to fill in an empty howto entry in an array.
+
+.#define EMPTY_HOWTO(C) \
+. HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
+.
+
DESCRIPTION
Helper routine to turn a symbol into a relocation value.
@@ -450,6 +471,8 @@ DESCRIPTION
*/
+/* N_ONES produces N one bits, without overflowing machine arithmetic. */
+#define N_ONES(n) (((((bfd_vma) 1 << ((n) - 1)) - 1) << 1) | 1)
/*
FUNCTION
@@ -461,28 +484,37 @@ SYNOPSIS
(enum complain_overflow how,
unsigned int bitsize,
unsigned int rightshift,
+ unsigned int addrsize,
bfd_vma relocation);
DESCRIPTION
- Perform overflow checking on @var{relocation} which has @var{bitsize}
- significant bits and will be shifted right by @var{rightshift} bits.
- The result is either of @code{bfd_reloc_ok} or
- @code{bfd_reloc_overflow}.
+ Perform overflow checking on @var{relocation} which has
+ @var{bitsize} significant bits and will be shifted right by
+ @var{rightshift} bits, on a machine with addresses containing
+ @var{addrsize} significant bits. The result is either of
+ @code{bfd_reloc_ok} or @code{bfd_reloc_overflow}.
*/
bfd_reloc_status_type
-bfd_check_overflow (how, bitsize, rightshift, relocation)
+bfd_check_overflow (how, bitsize, rightshift, addrsize, relocation)
enum complain_overflow how;
- unsigned int bitsize, rightshift;
+ unsigned int bitsize;
+ unsigned int rightshift;
+ unsigned int addrsize;
bfd_vma relocation;
{
- bfd_vma check;
+ bfd_vma fieldmask, addrmask, signmask, ss, a;
bfd_reloc_status_type flag = bfd_reloc_ok;
- /* Get the value that will be used for the relocation, but
- starting at bit position zero. */
- check = relocation >> rightshift;
+ a = relocation;
+
+ /* Note: BITSIZE should always be <= ADDRSIZE, but in case it's not,
+ we'll be permissive: extra bits in the field mask will
+ automatically extend the address mask for purposes of the
+ overflow check. */
+ fieldmask = N_ONES (bitsize);
+ addrmask = N_ONES (addrsize) | fieldmask;
switch (how)
{
@@ -490,62 +522,32 @@ bfd_check_overflow (how, bitsize, rightshift, relocation)
break;
case complain_overflow_signed:
- {
- /* Assumes two's complement. */
- bfd_signed_vma reloc_signed_max = (1 << (bitsize - 1)) - 1;
- bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
-
- /* The above right shift is incorrect for a signed value.
- Fix it up by forcing on the upper bits. */
- if (rightshift > 0
- && (bfd_signed_vma) relocation < 0)
- check |= ((bfd_vma) - 1
- & ~((bfd_vma) - 1
- >> rightshift));
- if ((bfd_signed_vma) check > reloc_signed_max
- || (bfd_signed_vma) check < reloc_signed_min)
- flag = bfd_reloc_overflow;
- }
+ /* If any sign bits are set, all sign bits must be set. That
+ is, A must be a valid negative address after shifting. */
+ a = (a & addrmask) >> rightshift;
+ signmask = ~ (fieldmask >> 1);
+ ss = a & signmask;
+ if (ss != 0 && ss != ((addrmask >> rightshift) & signmask))
+ flag = bfd_reloc_overflow;
break;
case complain_overflow_unsigned:
- {
- /* Assumes two's complement. This expression avoids
- overflow if `bitsize' is the number of bits in
- bfd_vma. */
- bfd_vma reloc_unsigned_max = (((1 << (bitsize - 1)) - 1) << 1) | 1;
-
- if ((bfd_vma) check > reloc_unsigned_max)
- flag = bfd_reloc_overflow;
- }
+ /* We have an overflow if the address does not fit in the field. */
+ a = (a & addrmask) >> rightshift;
+ if ((a & ~ fieldmask) != 0)
+ flag = bfd_reloc_overflow;
break;
case complain_overflow_bitfield:
- {
- /* Assumes two's complement. This expression avoids
- overflow if `bitsize' is the number of bits in
- bfd_vma. */
- bfd_vma reloc_bits = (((1 << (bitsize - 1)) - 1) << 1) | 1;
-
- if (((bfd_vma) check & ~reloc_bits) != 0
- && ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
- {
- /* The above right shift is incorrect for a signed
- value. See if turning on the upper bits fixes the
- overflow. */
- if (rightshift > 0
- && (bfd_signed_vma) relocation < 0)
- {
- check |= ((bfd_vma) - 1
- & ~((bfd_vma) - 1
- >> rightshift));
- if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
- flag = bfd_reloc_overflow;
- }
- else
- flag = bfd_reloc_overflow;
- }
- }
+ /* Bitfields are sometimes signed, sometimes unsigned. We
+ explicitly allow an address wrap too, which means a bitfield
+ of n bits is allowed to store -2**n to 2**n-1. Thus overflow
+ if the value has some, but not all, bits set outside the
+ field. */
+ a >>= rightshift;
+ ss = a & ~ fieldmask;
+ if (ss != 0 && ss != (((bfd_vma) -1 >> rightshift) & ~ fieldmask))
+ flag = bfd_reloc_overflow;
break;
default:
@@ -555,7 +557,6 @@ bfd_check_overflow (how, bitsize, rightshift, relocation)
return flag;
}
-
/*
FUNCTION
bfd_perform_relocation
@@ -601,7 +602,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
{
bfd_vma relocation;
bfd_reloc_status_type flag = bfd_reloc_ok;
- bfd_size_type addr = reloc_entry->address;
+ bfd_size_type octets = reloc_entry->address * bfd_octets_per_byte (abfd);
bfd_vma output_base = 0;
reloc_howto_type *howto = reloc_entry->howto;
asection *reloc_target_output_section;
@@ -637,7 +638,8 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
}
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > input_section->_cooked_size /
+ bfd_octets_per_byte (abfd))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targetted at and the
@@ -825,8 +827,11 @@ space consuming. For each target:
adding in the value contained in the object file. */
if (howto->complain_on_overflow != complain_overflow_dont
&& flag == bfd_reloc_ok)
- flag = bfd_check_overflow (howto->complain_on_overflow, howto->bitsize,
- howto->rightshift, relocation);
+ flag = bfd_check_overflow (howto->complain_on_overflow,
+ howto->bitsize,
+ howto->rightshift,
+ bfd_arch_bits_per_address (abfd),
+ relocation);
/*
Either we are relocating all the way, or we don't want to apply
@@ -877,23 +882,23 @@ space consuming. For each target:
R result
Do this:
- i i i i i o o o o o from bfd_get<size>
- and S S S S S to get the size offset we want
- + r r r r r r r r r r to get the final value to place
+ (( i i i i i o o o o o from bfd_get<size>
+ and S S S S S) to get the size offset we want
+ + r r r r r r r r r r) to get the final value to place
and D D D D D to chop to right size
-----------------------
- A A A A A
+ = A A A A A
And this:
- ... i i i i i o o o o o from bfd_get<size>
- and N N N N N get instruction
+ ( i i i i i o o o o o from bfd_get<size>
+ and N N N N N ) get instruction
-----------------------
- ... B B B B B
+ = B B B B B
And then:
- B B B B B
- or A A A A A
+ ( B B B B B
+ or A A A A A)
-----------------------
- R R R R R R R R R R put into bfd_put<size>
+ = R R R R R R R R R R put into bfd_put<size>
*/
#define DOIT(x) \
@@ -903,41 +908,41 @@ space consuming. For each target:
{
case 0:
{
- char x = bfd_get_8 (abfd, (char *) data + addr);
+ char x = bfd_get_8 (abfd, (char *) data + octets);
DOIT (x);
- bfd_put_8 (abfd, x, (unsigned char *) data + addr);
+ bfd_put_8 (abfd, x, (unsigned char *) data + octets);
}
break;
case 1:
{
- short x = bfd_get_16 (abfd, (bfd_byte *) data + addr);
+ short x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
DOIT (x);
- bfd_put_16 (abfd, x, (unsigned char *) data + addr);
+ bfd_put_16 (abfd, x, (unsigned char *) data + octets);
}
break;
case 2:
{
- long x = bfd_get_32 (abfd, (bfd_byte *) data + addr);
+ long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
DOIT (x);
- bfd_put_32 (abfd, x, (bfd_byte *) data + addr);
+ bfd_put_32 (abfd, x, (bfd_byte *) data + octets);
}
break;
case -2:
{
- long x = bfd_get_32 (abfd, (bfd_byte *) data + addr);
+ long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
relocation = -relocation;
DOIT (x);
- bfd_put_32 (abfd, x, (bfd_byte *) data + addr);
+ bfd_put_32 (abfd, x, (bfd_byte *) data + octets);
}
break;
case -1:
{
- long x = bfd_get_16 (abfd, (bfd_byte *) data + addr);
+ long x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
relocation = -relocation;
DOIT (x);
- bfd_put_16 (abfd, x, (bfd_byte *) data + addr);
+ bfd_put_16 (abfd, x, (bfd_byte *) data + octets);
}
break;
@@ -948,9 +953,9 @@ space consuming. For each target:
case 4:
#ifdef BFD64
{
- bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + addr);
+ bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + octets);
DOIT (x);
- bfd_put_64 (abfd, x, (bfd_byte *) data + addr);
+ bfd_put_64 (abfd, x, (bfd_byte *) data + octets);
}
#else
abort ();
@@ -1000,7 +1005,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
{
bfd_vma relocation;
bfd_reloc_status_type flag = bfd_reloc_ok;
- bfd_size_type addr = reloc_entry->address;
+ bfd_size_type octets = reloc_entry->address * bfd_octets_per_byte (abfd);
bfd_vma output_base = 0;
reloc_howto_type *howto = reloc_entry->howto;
asection *reloc_target_output_section;
@@ -1020,7 +1025,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
if (howto->special_function)
{
bfd_reloc_status_type cont;
-
+
/* XXX - The special_function calls haven't been fixed up to deal
with creating new relocations and section contents. */
cont = howto->special_function (abfd, reloc_entry, symbol,
@@ -1212,8 +1217,11 @@ space consuming. For each target:
FIXME: We should also do overflow checking on the result after
adding in the value contained in the object file. */
if (howto->complain_on_overflow != complain_overflow_dont)
- flag = bfd_check_overflow (howto->complain_on_overflow, howto->bitsize,
- howto->rightshift, relocation);
+ flag = bfd_check_overflow (howto->complain_on_overflow,
+ howto->bitsize,
+ howto->rightshift,
+ bfd_arch_bits_per_address (abfd),
+ relocation);
/*
Either we are relocating all the way, or we don't want to apply
@@ -1264,29 +1272,29 @@ space consuming. For each target:
R result
Do this:
- i i i i i o o o o o from bfd_get<size>
- and S S S S S to get the size offset we want
- + r r r r r r r r r r to get the final value to place
+ (( i i i i i o o o o o from bfd_get<size>
+ and S S S S S) to get the size offset we want
+ + r r r r r r r r r r) to get the final value to place
and D D D D D to chop to right size
-----------------------
- A A A A A
+ = A A A A A
And this:
- ... i i i i i o o o o o from bfd_get<size>
- and N N N N N get instruction
+ ( i i i i i o o o o o from bfd_get<size>
+ and N N N N N ) get instruction
-----------------------
- ... B B B B B
+ = B B B B B
And then:
- B B B B B
- or A A A A A
+ ( B B B B B
+ or A A A A A)
-----------------------
- R R R R R R R R R R put into bfd_put<size>
+ = R R R R R R R R R R put into bfd_put<size>
*/
#define DOIT(x) \
x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) + relocation) & howto->dst_mask))
- data = (bfd_byte *) data_start + (addr - data_start_offset);
+ data = (bfd_byte *) data_start + (octets - data_start_offset);
switch (howto->size)
{
@@ -1416,8 +1424,10 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
bfd_byte *location;
{
int size;
- bfd_vma x;
- boolean overflow;
+ bfd_vma x = 0;
+ bfd_reloc_status_type flag;
+ unsigned int rightshift = howto->rightshift;
+ unsigned int bitpos = howto->bitpos;
/* If the size is negative, negate RELOCATION. This isn't very
general. */
@@ -1453,117 +1463,124 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
which we don't check for. We must either check at every single
operation, which would be tedious, or we must do the computations
in a type larger than bfd_vma, which would be inefficient. */
- overflow = false;
+ flag = bfd_reloc_ok;
if (howto->complain_on_overflow != complain_overflow_dont)
{
- bfd_vma check;
- bfd_signed_vma signed_check;
- bfd_vma add;
- bfd_signed_vma signed_add;
-
- if (howto->rightshift == 0)
- {
- check = relocation;
- signed_check = (bfd_signed_vma) relocation;
- }
- else
- {
- /* 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)
- signed_check = check;
- else
- signed_check = (check
- | ((bfd_vma) - 1
- & ~((bfd_vma) - 1 >> howto->rightshift)));
- }
-
- /* Get the value from the object file. */
- add = x & howto->src_mask;
-
- /* Get the value from the object file with an appropriate sign.
- The expression involving howto->src_mask isolates the upper
- bit of src_mask. If that bit is set in the value we are
- adding, it is negative, and we subtract out that number times
- two. If src_mask includes the highest possible bit, then we
- 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 & (((~howto->src_mask) >> 1) & howto->src_mask)) != 0)
- signed_add -= (((~howto->src_mask) >> 1) & howto->src_mask) << 1;
-
- /* Add the value from the object file, shifted so that it is a
- straight number. */
- if (howto->bitpos == 0)
- {
- check += add;
- signed_check += signed_add;
- }
- else
- {
- check += add >> howto->bitpos;
-
- /* For the signed case we use ADD, rather than SIGNED_ADD,
- to avoid warnings from SVR4 cc. This is OK since we
- explictly handle the sign bits. */
- if (signed_add >= 0)
- signed_check += add >> howto->bitpos;
- else
- signed_check += ((add >> howto->bitpos)
- | ((bfd_vma) - 1
- & ~((bfd_vma) - 1 >> howto->bitpos)));
- }
+ bfd_vma addrmask, fieldmask, signmask, ss;
+ bfd_vma a, b, sum;
+
+ /* Get the values to be added together. For signed and unsigned
+ relocations, we assume that all values should be truncated to
+ the size of an address. For bitfields, all the bits matter.
+ See also bfd_check_overflow. */
+ fieldmask = N_ONES (howto->bitsize);
+ addrmask = N_ONES (bfd_arch_bits_per_address (input_bfd)) | fieldmask;
+ a = relocation;
+ b = x & howto->src_mask;
switch (howto->complain_on_overflow)
{
case complain_overflow_signed:
- {
- /* Assumes two's complement. */
- bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
- bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
-
- if (signed_check > reloc_signed_max
- || signed_check < reloc_signed_min)
- overflow = true;
- }
+ a = (a & addrmask) >> rightshift;
+
+ /* If any sign bits are set, all sign bits must be set.
+ That is, A must be a valid negative address after
+ shifting. */
+ signmask = ~ (fieldmask >> 1);
+ ss = a & signmask;
+ if (ss != 0 && ss != ((addrmask >> rightshift) & signmask))
+ flag = bfd_reloc_overflow;
+
+ /* We only need this next bit of code if the sign bit of B
+ is below the sign bit of A. This would only happen if
+ SRC_MASK had fewer bits than BITSIZE. Note that if
+ SRC_MASK has more bits than BITSIZE, we can get into
+ trouble; we would need to verify that B is in range, as
+ we do for A above. */
+ signmask = ((~ howto->src_mask) >> 1) & howto->src_mask;
+
+ /* Set all the bits above the sign bit. */
+ b = (b ^ signmask) - signmask;
+
+ b = (b & addrmask) >> bitpos;
+
+ /* Now we can do the addition. */
+ sum = a + b;
+
+ /* See if the result has the correct sign. Bits above the
+ sign bit are junk now; ignore them. If the sum is
+ positive, make sure we did not have all negative inputs;
+ if the sum is negative, make sure we did not have all
+ positive inputs. The test below looks only at the sign
+ bits, and it really just
+ SIGN (A) == SIGN (B) && SIGN (A) != SIGN (SUM)
+ */
+ signmask = (fieldmask >> 1) + 1;
+ if (((~ (a ^ b)) & (a ^ sum)) & signmask)
+ flag = bfd_reloc_overflow;
+
break;
+
case complain_overflow_unsigned:
- {
- /* Assumes two's complement. This expression avoids
- overflow if howto->bitsize is the number of bits in
- bfd_vma. */
- bfd_vma reloc_unsigned_max =
- (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
-
- if (check > reloc_unsigned_max)
- overflow = true;
- }
+ /* Checking for an unsigned overflow is relatively easy:
+ trim the addresses and add, and trim the result as well.
+ Overflow is normally indicated when the result does not
+ fit in the field. However, we also need to consider the
+ case when, e.g., fieldmask is 0x7fffffff or smaller, an
+ input is 0x80000000, and bfd_vma is only 32 bits; then we
+ will get sum == 0, but there is an overflow, since the
+ inputs did not fit in the field. Instead of doing a
+ separate test, we can check for this by or-ing in the
+ operands when testing for the sum overflowing its final
+ field. */
+ a = (a & addrmask) >> rightshift;
+ b = (b & addrmask) >> bitpos;
+ sum = (a + b) & addrmask;
+ if ((a | b | sum) & ~ fieldmask)
+ flag = bfd_reloc_overflow;
+
break;
+
case complain_overflow_bitfield:
- {
- /* Assumes two's complement. This expression avoids
- overflow if howto->bitsize is the number of bits in
- bfd_vma. */
- bfd_vma reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
-
- if ((check & ~reloc_bits) != 0
- && (((bfd_vma) signed_check & ~reloc_bits)
- != (-1 & ~reloc_bits)))
- overflow = true;
- }
+ /* Much like the signed check, but for a field one bit
+ wider, and no trimming inputs with addrmask. We allow a
+ bitfield to represent numbers in the range -2**n to
+ 2**n-1, where n is the number of bits in the field.
+ Note that when bfd_vma is 32 bits, a 32-bit reloc can't
+ overflow, which is exactly what we want. */
+ a >>= rightshift;
+
+ signmask = ~ fieldmask;
+ ss = a & signmask;
+ if (ss != 0 && ss != (((bfd_vma) -1 >> rightshift) & signmask))
+ flag = bfd_reloc_overflow;
+
+ signmask = ((~ howto->src_mask) >> 1) & howto->src_mask;
+ b = (b ^ signmask) - signmask;
+
+ b >>= bitpos;
+
+ sum = a + b;
+
+ /* We mask with addrmask here to explicitly allow an address
+ wrap-around. The Linux kernel relies on it, and it is
+ the only way to write assembler code which can run when
+ loaded at a location 0x80000000 away from the location at
+ which it is linked. */
+ signmask = fieldmask + 1;
+ if (((~ (a ^ b)) & (a ^ sum)) & signmask & addrmask)
+ flag = bfd_reloc_overflow;
+
break;
+
default:
abort ();
}
}
/* Put RELOCATION in the right bits. */
- relocation >>= (bfd_vma) howto->rightshift;
- relocation <<= (bfd_vma) howto->bitpos;
+ relocation >>= (bfd_vma) rightshift;
+ relocation <<= (bfd_vma) bitpos;
/* Add RELOCATION to the right bits of X. */
x = ((x & ~howto->dst_mask)
@@ -1593,7 +1610,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
break;
}
- return overflow ? bfd_reloc_overflow : bfd_reloc_ok;
+ return flag;
}
/*
@@ -1866,6 +1883,11 @@ ENUMDOC
SPARC64 relocations
ENUM
+ BFD_RELOC_SPARC_REV32
+ENUMDOC
+ SPARC little endian relocation
+
+ENUM
BFD_RELOC_ALPHA_GPDISP_HI16
ENUMDOC
Alpha ECOFF and ELF relocations. Some of these treat the symbol or
@@ -1923,6 +1945,25 @@ ENUMDOC
The GNU linker currently doesn't do any of this optimizing.
ENUM
+ BFD_RELOC_ALPHA_USER_LITERAL
+ENUMX
+ BFD_RELOC_ALPHA_USER_LITUSE_BASE
+ENUMX
+ BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF
+ENUMX
+ BFD_RELOC_ALPHA_USER_LITUSE_JSR
+ENUMX
+ BFD_RELOC_ALPHA_USER_GPDISP
+ENUMX
+ BFD_RELOC_ALPHA_USER_GPRELHIGH
+ENUMX
+ BFD_RELOC_ALPHA_USER_GPRELLOW
+ENUMDOC
+ The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
+ process the explicit !<reloc>!sequence relocations, and are mapped
+ into the normal relocations at the end of processing.
+
+ENUM
BFD_RELOC_ALPHA_HINT
ENUMDOC
The HINT relocation indicates a value that should be filled into the
@@ -2007,6 +2048,14 @@ ENUMX
BFD_RELOC_MIPS_CALL_HI16
ENUMX
BFD_RELOC_MIPS_CALL_LO16
+ENUMX
+ BFD_RELOC_MIPS_SUB
+ENUMX
+ BFD_RELOC_MIPS_GOT_PAGE
+ENUMX
+ BFD_RELOC_MIPS_GOT_OFST
+ENUMX
+ BFD_RELOC_MIPS_GOT_DISP
COMMENT
ENUMDOC
MIPS ELF relocations.
@@ -2060,6 +2109,21 @@ ENUMDOC
ns32k relocations
ENUM
+ BFD_RELOC_PJ_CODE_HI16
+ENUMX
+ BFD_RELOC_PJ_CODE_LO16
+ENUMX
+ BFD_RELOC_PJ_CODE_DIR16
+ENUMX
+ BFD_RELOC_PJ_CODE_DIR32
+ENUMX
+ BFD_RELOC_PJ_CODE_REL16
+ENUMX
+ BFD_RELOC_PJ_CODE_REL32
+ENUMDOC
+ Picojava relocs. Not all of these appear in object files.
+
+ENUM
BFD_RELOC_PPC_B26
ENUMX
BFD_RELOC_PPC_BA26
@@ -2123,6 +2187,11 @@ ENUMDOC
Power(rs6000) and PowerPC relocations.
ENUM
+ BFD_RELOC_I370_D12
+ENUMDOC
+ IBM 370/390 relocations
+
+ENUM
BFD_RELOC_CTOR
ENUMDOC
The type of reloc used to build a contructor table - at the moment
@@ -2137,6 +2206,8 @@ ENUMDOC
ENUM
BFD_RELOC_ARM_IMMEDIATE
ENUMX
+ BFD_RELOC_ARM_ADRL_IMMEDIATE
+ENUMX
BFD_RELOC_ARM_OFFSET_IMM
ENUMX
BFD_RELOC_ARM_SHIFT_IMM
@@ -2166,6 +2237,24 @@ ENUMX
BFD_RELOC_ARM_THUMB_SHIFT
ENUMX
BFD_RELOC_ARM_THUMB_OFFSET
+ENUMX
+ BFD_RELOC_ARM_GOT12
+ENUMX
+ BFD_RELOC_ARM_GOT32
+ENUMX
+ BFD_RELOC_ARM_JUMP_SLOT
+ENUMX
+ BFD_RELOC_ARM_COPY
+ENUMX
+ BFD_RELOC_ARM_GLOB_DAT
+ENUMX
+ BFD_RELOC_ARM_PLT32
+ENUMX
+ BFD_RELOC_ARM_RELATIVE
+ENUMX
+ BFD_RELOC_ARM_GOTOFF
+ENUMX
+ BFD_RELOC_ARM_GOTPC
ENUMDOC
These relocs are only used within the ARM assembler. They are not
(at present) written to any object files.
@@ -2233,7 +2322,6 @@ ENUMDOC
stored in the instruction. The high 24 bits are installed in bits 23
through 0.
-COMMENT
ENUM
BFD_RELOC_D10V_10_PCREL_R
ENUMDOC
@@ -2258,9 +2346,66 @@ ENUM
ENUMDOC
This is an 18-bit reloc with the right 2 bits
assumed to be 0.
-COMMENT
-COMMENT
+ENUM
+ BFD_RELOC_D30V_6
+ENUMDOC
+ Mitsubishi D30V relocs.
+ This is a 6-bit absolute reloc.
+ENUM
+ BFD_RELOC_D30V_9_PCREL
+ENUMDOC
+ This is a 6-bit pc-relative reloc with
+ the right 3 bits assumed to be 0.
+ENUM
+ BFD_RELOC_D30V_9_PCREL_R
+ENUMDOC
+ This is a 6-bit pc-relative reloc with
+ the right 3 bits assumed to be 0. Same
+ as the previous reloc but on the right side
+ of the container.
+ENUM
+ BFD_RELOC_D30V_15
+ENUMDOC
+ This is a 12-bit absolute reloc with the
+ right 3 bitsassumed to be 0.
+ENUM
+ BFD_RELOC_D30V_15_PCREL
+ENUMDOC
+ This is a 12-bit pc-relative reloc with
+ the right 3 bits assumed to be 0.
+ENUM
+ BFD_RELOC_D30V_15_PCREL_R
+ENUMDOC
+ This is a 12-bit pc-relative reloc with
+ the right 3 bits assumed to be 0. Same
+ as the previous reloc but on the right side
+ of the container.
+ENUM
+ BFD_RELOC_D30V_21
+ENUMDOC
+ This is an 18-bit absolute reloc with
+ the right 3 bits assumed to be 0.
+ENUM
+ BFD_RELOC_D30V_21_PCREL
+ENUMDOC
+ This is an 18-bit pc-relative reloc with
+ the right 3 bits assumed to be 0.
+ENUM
+ BFD_RELOC_D30V_21_PCREL_R
+ENUMDOC
+ This is an 18-bit pc-relative reloc with
+ the right 3 bits assumed to be 0. Same
+ as the previous reloc but on the right side
+ of the container.
+ENUM
+ BFD_RELOC_D30V_32
+ENUMDOC
+ This is a 32-bit absolute reloc.
+ENUM
+ BFD_RELOC_D30V_32_PCREL
+ENUMDOC
+ This is a 32-bit pc-relative reloc.
ENUM
BFD_RELOC_M32R_24
@@ -2345,6 +2490,34 @@ ENUM
ENUMDOC
This is a 16 bit offset from the tiny data area pointer.
COMMENT
+ENUM
+ BFD_RELOC_V850_TDA_4_5_OFFSET
+ENUMDOC
+ This is a 5 bit offset (of which only 4 bits are used) from the tiny
+ data area pointer.
+ENUM
+ BFD_RELOC_V850_TDA_4_4_OFFSET
+ENUMDOC
+ This is a 4 bit offset from the tiny data area pointer.
+ENUM
+ BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
+ENUMDOC
+ This is a 16 bit offset from the short data area pointer, with the
+ bits placed non-contigously in the instruction.
+ENUM
+ BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
+ENUMDOC
+ This is a 16 bit offset from the zero data area pointer, with the
+ bits placed non-contigously in the instruction.
+ENUM
+ BFD_RELOC_V850_CALLT_6_7_OFFSET
+ENUMDOC
+ This is a 6 bit offset from the call table base pointer.
+ENUM
+ BFD_RELOC_V850_CALLT_16_16_OFFSET
+ENUMDOC
+ This is a 16 bit offset from the call table base pointer.
+COMMENT
ENUM
BFD_RELOC_MN10300_32_PCREL
@@ -2364,6 +2537,169 @@ ENUMDOC
significant 8 bits of a 24 bit word are placed into the least
significant 8 bits of the opcode.
+ENUM
+ BFD_RELOC_FR30_48
+ENUMDOC
+ This is a 48 bit reloc for the FR30 that stores 32 bits.
+ENUM
+ BFD_RELOC_FR30_20
+ENUMDOC
+ This is a 32 bit reloc for the FR30 that stores 20 bits split up into
+ two sections.
+ENUM
+ BFD_RELOC_FR30_6_IN_4
+ENUMDOC
+ This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
+ 4 bits.
+ENUM
+ BFD_RELOC_FR30_8_IN_8
+ENUMDOC
+ This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
+ into 8 bits.
+ENUM
+ BFD_RELOC_FR30_9_IN_8
+ENUMDOC
+ This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
+ into 8 bits.
+ENUM
+ BFD_RELOC_FR30_10_IN_8
+ENUMDOC
+ This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
+ into 8 bits.
+ENUM
+ BFD_RELOC_FR30_9_PCREL
+ENUMDOC
+ This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
+ short offset into 8 bits.
+ENUM
+ BFD_RELOC_FR30_12_PCREL
+ENUMDOC
+ This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
+ short offset into 11 bits.
+
+ENUM
+ BFD_RELOC_MCORE_PCREL_IMM8BY4
+ENUMX
+ BFD_RELOC_MCORE_PCREL_IMM11BY2
+ENUMX
+ BFD_RELOC_MCORE_PCREL_IMM4BY2
+ENUMX
+ BFD_RELOC_MCORE_PCREL_32
+ENUMX
+ BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
+ENUMX
+ BFD_RELOC_MCORE_RVA
+ENUMDOC
+ Motorola Mcore relocations.
+
+ENUM
+ BFD_RELOC_AVR_7_PCREL
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit pc relative
+ short offset into 7 bits.
+ENUM
+ BFD_RELOC_AVR_13_PCREL
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 13 bit pc relative
+ short offset into 12 bits.
+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.
+ENUM
+ BFD_RELOC_AVR_LO8_LDI
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (usually
+ data memory address) into 8 bit immediate value of LDI insn.
+ENUM
+ BFD_RELOC_AVR_HI8_LDI
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+ of data memory address) into 8 bit immediate value of LDI insn.
+ENUM
+ BFD_RELOC_AVR_HH8_LDI
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
+ of program memory address) into 8 bit immediate value of LDI insn.
+ENUM
+ BFD_RELOC_AVR_LO8_LDI_NEG
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
+ (usually data memory address) into 8 bit immediate value of SUBI insn.
+ENUM
+ BFD_RELOC_AVR_HI8_LDI_NEG
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
+ (high 8 bit of data memory address) into 8 bit immediate value of
+ SUBI insn.
+ENUM
+ BFD_RELOC_AVR_HH8_LDI_NEG
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
+ (most high 8 bit of program memory address) into 8 bit immediate value
+ of LDI or SUBI insn.
+ENUM
+ BFD_RELOC_AVR_LO8_LDI_PM
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (usually
+ command address) into 8 bit immediate value of LDI insn.
+ENUM
+ BFD_RELOC_AVR_HI8_LDI_PM
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+ of command address) into 8 bit immediate value of LDI insn.
+ENUM
+ BFD_RELOC_AVR_HH8_LDI_PM
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
+ of command address) into 8 bit immediate value of LDI insn.
+ENUM
+ BFD_RELOC_AVR_LO8_LDI_PM_NEG
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
+ (usually command address) into 8 bit immediate value of SUBI insn.
+ENUM
+ BFD_RELOC_AVR_HI8_LDI_PM_NEG
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
+ (high 8 bit of 16 bit command address) into 8 bit immediate value
+ of SUBI insn.
+ENUM
+ BFD_RELOC_AVR_HH8_LDI_PM_NEG
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
+ (high 6 bit of 22 bit command address) into 8 bit immediate
+ value of SUBI insn.
+ENUM
+ BFD_RELOC_AVR_CALL
+ENUMDOC
+ This is a 32 bit reloc for the AVR that stores 23 bit value
+ into 22 bits.
+
+ENUM
+ BFD_RELOC_VTABLE_INHERIT
+ENUMX
+ BFD_RELOC_VTABLE_ENTRY
+ENUMDOC
+ These two relocations are used by the linker to determine which of
+ the entries in a C++ virtual function table are actually used. When
+ the --gc-sections option is given, the linker will zero out the entries
+ that are not used, so that the code for those functions need not be
+ included in the output.
+
+ VTABLE_INHERIT is a zero-space relocation used to describe to the
+ linker the inheritence tree of a C++ virtual function table. The
+ relocation's symbol should be the parent class' vtable, and the
+ relocation should be located at the child vtable.
+
+ VTABLE_ENTRY is a zero-space relocation that describes the use of a
+ virtual function table entry. The reloc's symbol should refer to the
+ table of the class mentioned in the code. Off of that base, an offset
+ 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.
+
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT
@@ -2481,9 +2817,9 @@ DESCRIPTION
/*ARGSUSED*/
boolean
bfd_generic_relax_section (abfd, section, link_info, again)
- bfd *abfd;
- asection *section;
- struct bfd_link_info *link_info;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
boolean *again;
{
*again = false;
@@ -2492,6 +2828,28 @@ bfd_generic_relax_section (abfd, section, link_info, again)
/*
INTERNAL_FUNCTION
+ bfd_generic_gc_sections
+
+SYNOPSIS
+ boolean bfd_generic_gc_sections
+ (bfd *, struct bfd_link_info *);
+
+DESCRIPTION
+ Provides default handling for relaxing for back ends which
+ don't do section gc -- i.e., does nothing.
+*/
+
+/*ARGSUSED*/
+boolean
+bfd_generic_gc_sections (abfd, link_info)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+/*
+INTERNAL_FUNCTION
bfd_generic_get_relocated_section_contents
SYNOPSIS
@@ -2584,7 +2942,8 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
case bfd_reloc_undefined:
if (!((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- input_bfd, input_section, (*parent)->address)))
+ input_bfd, input_section, (*parent)->address,
+ true)))
goto error_return;
break;
case bfd_reloc_dangerous:
diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c
index 7e7952e..0e7c18a 100644
--- a/contrib/binutils/bfd/reloc16.c
+++ b/contrib/binutils/bfd/reloc16.c
@@ -81,7 +81,8 @@ bfd_coff_reloc16_get_value (reloc, link_info, input_section)
{
if (! ((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (symbol),
- input_section->owner, input_section, reloc->address)))
+ input_section->owner, input_section, reloc->address,
+ true)))
abort ();
value = 0;
}
@@ -194,9 +195,10 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
{
int another_pass = 0;
- /* Allocate and initialize the shrinks array for this section. */
- shrinks = (int *) bfd_malloc (reloc_count * sizeof (int));
- memset (shrinks, 0, reloc_count * sizeof (int));
+ /* Allocate and initialize the shrinks array for this section.
+ The last element is used as an accumlator of shrinks. */
+ shrinks = (int *) bfd_malloc ((reloc_count + 1) * sizeof (int));
+ memset (shrinks, 0, (reloc_count + 1) * sizeof (int));
/* Loop until nothing changes in this section. */
do {
@@ -218,13 +220,14 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
if (shrink != shrinks[i])
{
another_pass = 1;
- for (j = i + 1; j < reloc_count; j++)
+ for (j = i + 1; j <= reloc_count; j++)
shrinks[j] += shrink - shrinks[i];
}
}
} while (another_pass);
+ shrink = shrinks[reloc_count];
free((char *)shrinks);
}
diff --git a/contrib/binutils/bfd/sco5-core.c b/contrib/binutils/bfd/sco5-core.c
new file mode 100644
index 0000000..46c97d2
--- /dev/null
+++ b/contrib/binutils/bfd/sco5-core.c
@@ -0,0 +1,431 @@
+/* BFD back end for SCO5 core files (U-area and raw sections)
+ Copyright 1998 Free Software Foundation, Inc.
+ Written by Jouke Numan <jnuman@hiscom.nl>
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "libaout.h" /* BFD a.out internal data structures */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/dir.h>
+#include <signal.h>
+
+#include <sys/user.h> /* After a.out.h */
+#include <sys/paccess.h>
+#include <sys/region.h>
+
+struct sco5_core_struct
+{
+ struct user u;
+};
+
+/* forward declarations */
+
+static asection *
+make_bfd_asection PARAMS ((bfd *, const char *, flagword, bfd_size_type,
+ bfd_vma, file_ptr));
+static asymbol *sco5_core_make_empty_symbol PARAMS ((bfd *));
+static struct user *read_uarea PARAMS ((bfd *, int));
+const bfd_target *sco5_core_file_p PARAMS ((bfd *abfd));
+char *sco5_core_file_failing_command PARAMS ((bfd *abfd));
+int sco5_core_file_failing_signal PARAMS ((bfd *abfd));
+boolean sco5_core_file_matches_executable_p PARAMS ((bfd *core_bfd,
+ bfd *exec_bfd));
+static void swap_abort PARAMS ((void));
+
+static asection *
+make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+ bfd *abfd;
+ const char *name;
+ flagword flags;
+ bfd_size_type _raw_size;
+ bfd_vma vma;
+ file_ptr filepos;
+{
+ asection *asect;
+
+ asect = bfd_make_section_anyway (abfd, name);
+ if (!asect)
+ return NULL;
+ asect->flags = flags;
+ asect->_raw_size = _raw_size;
+ asect->vma = vma;
+ asect->filepos = filepos;
+ asect->alignment_power = 2;
+
+ return asect;
+}
+
+static asymbol *
+sco5_core_make_empty_symbol (abfd)
+ bfd *abfd;
+{
+ asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
+ if (new)
+ new->the_bfd = abfd;
+ return new;
+}
+
+static struct user *
+read_uarea(abfd, filepos)
+ bfd *abfd;
+ int filepos;
+
+{
+ struct sco5_core_struct *rawptr;
+
+ rawptr = ((struct sco5_core_struct *)
+ bfd_zmalloc (sizeof (struct sco5_core_struct)));
+ if (rawptr == NULL)
+ return NULL;
+
+ abfd->tdata.sco5_core_data = rawptr;
+
+ if ((bfd_seek (abfd, filepos, SEEK_SET) != 0)
+ || (bfd_read ((void *)&rawptr->u, 1, sizeof rawptr->u, abfd)
+ != sizeof rawptr->u))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ /* Sanity check perhaps??? */
+ if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ if (rawptr->u.u_ssize > 0x1000000)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ return &rawptr->u;
+}
+
+/* ARGSUSED */
+const bfd_target *
+sco5_core_file_p (abfd)
+ bfd *abfd;
+{
+ int coffset_siz, val, nsecs, cheadoffs;
+ int coresize;
+ struct user *u;
+ struct coreoffsets coffsets;
+ struct coresecthead chead;
+ char *secname;
+ flagword flags;
+
+ /* Read coreoffsets region at end of core (see core(FP)) */
+
+ {
+ FILE *stream = bfd_cache_lookup (abfd);
+ struct stat statbuf;
+ if (stream == NULL)
+ return NULL;
+ if (fstat (fileno (stream), &statbuf) < 0)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return NULL;
+ }
+ coresize = statbuf.st_size;
+ }
+ /* Last long in core is sizeof struct coreoffsets, read it */
+ if ((bfd_seek (abfd, coresize-sizeof coffset_siz, SEEK_SET) != 0)
+ || (bfd_read ((void *)&coffset_siz, 1, sizeof coffset_siz, abfd)
+ != sizeof coffset_siz) )
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ /* Use it to seek start of coreoffsets region, read it and determine
+ validity */
+ if ((bfd_seek (abfd, coresize-coffset_siz, SEEK_SET) != 0)
+ || (bfd_read ((void *)&coffsets, 1, sizeof coffsets, abfd)
+ != sizeof coffsets)
+ || ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION)))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+
+ 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,
+ (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",
+ 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,
+ (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,
+ SEEK_SET) != 0)
+ || (bfd_read ((void *)&nsecs, 1, sizeof nsecs, abfd) != sizeof nsecs)
+ || (bfd_read ((void *)&cheadoffs, 1, sizeof cheadoffs, abfd)
+ != sizeof cheadoffs)
+ || (bfd_seek (abfd, cheadoffs, SEEK_SET) != 0)
+ || (bfd_read ((void *)&chead, 1, sizeof chead, abfd) != sizeof chead)
+ || (chead.cs_stype != CORES_OFFSETS)
+ || (chead.cs_x.csx_magic != COREMAGIC_NUMBER))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
+ /* OK, we believe you. You're a core file (sure, sure). */
+
+ /* Now loop over all regions and map them */
+ nsecs--; /* We've seen CORES_OFFSETS already */
+ 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);
+ return NULL;
+ }
+
+ switch (chead.cs_stype)
+ {
+ case CORES_MAGIC: /* Core header, check magic */
+ if (chead.cs_x.csx_magic != COREMAGIC_NUMBER)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ secname = NULL;
+ nsecs++; /* MAGIC not in section cnt!*/
+ break;
+ case CORES_UAREA: /* U-area, read in tdata */
+ u = read_uarea(abfd, chead.cs_sseek);
+ if (! u)
+ return NULL;
+
+ /* This is tricky. As the "register section", we give them
+ the entire upage and stack. u.u_ar0 points to where
+ "register 0" is stored. There are two tricks with this,
+ though. One is that the rest of the registers might be
+ at positive or negative (or both) displacements 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. */
+
+ chead.cs_vaddr = 0 - (bfd_vma) u->u_ar0;
+
+
+ secname = ".reg";
+ flags = SEC_HAS_CONTENTS;
+
+ break;
+ case CORES_PREGION: /* A program region, map it */
+ switch (chead.cs_x.csx_preg.csxp_rtyp)
+ {
+ case PT_DATA:
+ secname = ".data"; /* Data region. */
+ break;
+ case PT_STACK:
+ secname = ".stack"; /* Stack region. */
+ break;
+ case PT_SHMEM:
+ secname = ".shmem"; /* Shared memory */
+ break;
+ case PT_LIBDAT:
+ secname = ".libdat"; /* Shared library data */
+ break;
+ case PT_V86:
+ secname = ".virt86"; /* Virtual 8086 mode */
+ break;
+ case PT_SHFIL:
+ secname = ".mmfile"; /* Memory mapped file */
+ break;
+ case PT_XDATA0:
+ secname = ".Xdat0"; /* XENIX data region, virtual 0 */
+ break;
+ default:
+ secname = "";
+ }
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ break;
+ case CORES_PROC: /* struct proc */
+ case CORES_ITIMER: /* interval timers */
+ case CORES_SCOUTSNAME: /* struct scoutsname */
+ secname = NULL; /* Ignore these */
+ break;
+ default:
+ (*_bfd_error_handler) ("Unhandled SCO core file section type %d\n",
+ chead.cs_stype);
+ continue;
+ }
+
+ if (secname
+ && !make_bfd_asection (abfd, secname, flags,
+ (bfd_size_type) chead.cs_vsize,
+ (bfd_vma) chead.cs_vaddr,
+ (file_ptr) chead.cs_sseek))
+ return NULL;
+
+ }
+
+ return abfd->xvec;
+
+}
+
+char *
+sco5_core_file_failing_command (abfd)
+ bfd *abfd;
+{
+ char *com = abfd->tdata.sco5_core_data->u.u_comm;
+ if (*com)
+ return com;
+ else
+ return NULL;
+}
+
+/* ARGSUSED */
+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
+ : -1);
+}
+
+/* ARGSUSED */
+boolean
+sco5_core_file_matches_executable_p (core_bfd, exec_bfd)
+ bfd *core_bfd, *exec_bfd;
+{
+ return true; /* FIXME, We have no way of telling at this point */
+}
+
+#define sco5_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
+#define sco5_core_get_symtab _bfd_nosymbols_get_symtab
+#define sco5_core_print_symbol _bfd_nosymbols_print_symbol
+#define sco5_core_get_symbol_info _bfd_nosymbols_get_symbol_info
+#define sco5_core_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
+#define sco5_core_get_lineno _bfd_nosymbols_get_lineno
+#define sco5_core_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define sco5_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define sco5_core_read_minisymbols _bfd_nosymbols_read_minisymbols
+#define sco5_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
+
+/* If somebody calls any byte-swapping routines, shoot them. */
+static void
+swap_abort()
+{
+ 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 )
+#define NO_SIGNED_GET \
+ ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort )
+
+const bfd_target sco5_core_vec =
+ {
+ "sco5-core",
+ bfd_target_unknown_flavour,
+ BFD_ENDIAN_LITTLE, /* target byte order */
+ BFD_ENDIAN_LITTLE, /* target headers byte order */
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ 0, /* symbol prefix */
+ ' ', /* ar_pad_char */
+ 16, /* ar_max_namelen */
+ NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */
+ NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */
+ NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */
+ NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */
+ NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */
+ NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */
+
+ { /* bfd_check_format */
+ _bfd_dummy_target, /* unknown format */
+ _bfd_dummy_target, /* object file */
+ _bfd_dummy_target, /* archive */
+ sco5_core_file_p /* a core file */
+ },
+ { /* bfd_set_format */
+ bfd_false, bfd_false,
+ bfd_false, bfd_false
+ },
+ { /* bfd_write_contents */
+ bfd_false, bfd_false,
+ bfd_false, bfd_false
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (sco5),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (sco5_core),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ 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 787855c..b3b7608 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, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -137,7 +137,7 @@ SUBSECTION
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-
+#include "bfdlink.h"
/*
DOCDD
@@ -150,6 +150,27 @@ 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. *}
+.
+.struct bfd_comdat_info
+.{
+. {* The name of the symbol associated with a comdat section. *}
+. const char *name;
+.
+. {* 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
@@ -215,7 +236,7 @@ CODE_FRAGMENT
. standard data. *}
.#define SEC_CONSTRUCTOR 0x100
.
-. {* The section is a constuctor, and should be placed at the
+. {* 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
@@ -304,6 +325,17 @@ CODE_FRAGMENT
. else up the line will take care of it later. *}
.#define SEC_LINKER_CREATED 0x800000
.
+. {* 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. *}
+.#define SEC_SMALL_DATA 0x2000000
+.
+. {* This section contains data which may be shared with other
+. executables or shared objects. *}
+.#define SEC_SHARED 0x4000000
+.
. {* End of section flags. *}
.
. {* Some internal packed boolean fields. *}
@@ -317,6 +349,9 @@ CODE_FRAGMENT
. {* 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;
+.
. {* End of internal packed boolean fields. *}
.
. {* The virtual memory address of the section - where it will be
@@ -334,22 +369,25 @@ CODE_FRAGMENT
.
. bfd_vma lma;
.
-. {* The size of the section in bytes, 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 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 _cooked_size;
.
-. {* The original size on disk of the section, in bytes. Normally this
+. {* 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;
.
. {* If this section is going to be output, then this value is the
-. offset into the output section of the first byte in the input
-. section. E.g., if this was going to start at the 100th byte in
-. the output section, this value would be 100. *}
+. 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;
.
@@ -407,6 +445,10 @@ CODE_FRAGMENT
.
. unsigned int lineno_count;
.
+. {* Optional information about a COMDAT entry; NULL if not COMDAT *}
+.
+. struct bfd_comdat_info *comdat;
+.
. {* When a section is being output, this value changes as more
. linenumbers are written out *}
.
@@ -466,28 +508,60 @@ CODE_FRAGMENT
.extern const struct symbol_cache_entry * const bfd_und_symbol;
.extern const struct symbol_cache_entry * const bfd_ind_symbol;
.#define bfd_get_section_size_before_reloc(section) \
-. (section->reloc_done ? (abort(),1): (section)->_raw_size)
+. ((section)->reloc_done ? (abort (), (bfd_size_type) 1) \
+. : (section)->_raw_size)
.#define bfd_get_section_size_after_reloc(section) \
-. ((section->reloc_done) ? (section)->_cooked_size: (abort(),1))
+. ((section)->reloc_done ? (section)->_cooked_size \
+. : (abort (), (bfd_size_type) 1))
*/
+/* We use a macro to initialize the static asymbol structures because
+ traditional C does not permit us to initialize a union member while
+ gcc warns if we don't initialize it. */
+ /* the_bfd, name, value, attr, section [, udata] */
+#ifdef __STDC__
+#define GLOBAL_SYM_INIT(NAME, SECTION) \
+ { 0, NAME, 0, BSF_SECTION_SYM, (asection *) SECTION, { 0 }}
+#else
+#define GLOBAL_SYM_INIT(NAME, SECTION) \
+ { 0, NAME, 0, BSF_SECTION_SYM, (asection *) SECTION }
+#endif
+
/* These symbols are global, not specific to any BFD. Therefore, anything
that tries to change them is broken, and should be repaired. */
+
static const asymbol global_syms[] =
{
- /* the_bfd, name, value, attr, section [, udata] */
- {0, BFD_COM_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_com_section},
- {0, BFD_UND_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_und_section},
- {0, BFD_ABS_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_abs_section},
- {0, BFD_IND_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_ind_section},
+ GLOBAL_SYM_INIT (BFD_COM_SECTION_NAME, &bfd_com_section),
+ GLOBAL_SYM_INIT (BFD_UND_SECTION_NAME, &bfd_und_section),
+ GLOBAL_SYM_INIT (BFD_ABS_SECTION_NAME, &bfd_abs_section),
+ 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, 0, 0, FLAGS, 0, 0, 0, 0, 0, 0, 0, 0, (asection *) &SEC, \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
- (asymbol *) &global_syms[IDX], (asymbol **) &SYM, 0, 0 }
+ /* 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 \
+ }
STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol,
BFD_COM_SECTION_NAME, 0);
@@ -630,6 +704,7 @@ bfd_make_section_anyway (abfd, name)
newsect->reloc_count = 0;
newsect->line_filepos = 0;
newsect->owner = abfd;
+ newsect->comdat = 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
@@ -727,7 +802,7 @@ DESCRIPTION
/*ARGSUSED*/
boolean
bfd_set_section_flags (abfd, section, flags)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr section;
flagword flags;
{
@@ -850,7 +925,7 @@ 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} bytes.
+ @var{offset} for @var{count} octets.
@@ -1020,3 +1095,80 @@ DESCRIPTION
. BFD_SEND (obfd, _bfd_copy_private_section_data, \
. (ibfd, isection, obfd, osection))
*/
+
+/*
+FUNCTION
+ _bfd_strip_section_from_output
+
+SYNOPSIS
+ void _bfd_strip_section_from_output
+ (struct bfd_link_info *info, asection *section);
+
+DESCRIPTION
+ Remove @var{section} from the output. If the output section
+ becomes empty, remove it from the output bfd. @var{info} may
+ be NULL; if it is not, it is used to decide whether the output
+ section is empty.
+*/
+void
+_bfd_strip_section_from_output (info, s)
+ struct bfd_link_info *info;
+ asection *s;
+{
+ asection **spp, *os;
+ struct bfd_link_order *p, *pp;
+ boolean keep_os;
+
+ /* Excise the input section from the link order.
+
+ FIXME: For all calls that I can see to this function, the link
+ orders have not yet been set up. So why are we checking them? --
+ Ian */
+ os = s->output_section;
+ for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next)
+ if (p->type == bfd_indirect_link_order
+ && p->u.indirect.section == s)
+ {
+ if (pp)
+ pp->next = p->next;
+ else
+ os->link_order_head = p->next;
+ if (!p->next)
+ os->link_order_tail = pp;
+ break;
+ }
+
+ keep_os = os->link_order_head != NULL;
+
+ if (! keep_os && info != NULL)
+ {
+ bfd *abfd;
+ for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+ {
+ asection *is;
+ for (is = abfd->sections; is != NULL; is = is->next)
+ {
+ if (is != s && is->output_section == os)
+ break;
+ }
+ if (is != NULL)
+ break;
+ }
+ if (abfd != NULL)
+ keep_os = true;
+ }
+
+ /* If the output section is empty, remove it too. Careful about sections
+ 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)
+ {
+ for (spp = &os->owner->sections; *spp; spp = &(*spp)->next)
+ if (*spp == os)
+ {
+ *spp = os->next;
+ os->owner->section_count--;
+ break;
+ }
+ }
+}
diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c
new file mode 100644
index 0000000..73a29b3
--- /dev/null
+++ b/contrib/binutils/bfd/sparclinux.c
@@ -0,0 +1,771 @@
+/* BFD back-end for linux flavored sparc a.out binaries.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA. */
+
+#define TARGET_PAGE_SIZE 4096
+#define ZMAGIC_DISK_BLOCK_SIZE 1024
+#define SEGMENT_SIZE TARGET_PAGE_SIZE
+#define TEXT_START_ADDR 0x0
+#define N_SHARED_LIB(x) 0
+#define BYTES_IN_WORD 4
+
+#define MACHTYPE_OK(mtype) ((mtype) == M_SPARC || (mtype) == M_UNKNOWN)
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "aout/aout64.h"
+#include "aout/stab_gnu.h"
+#include "aout/ar.h"
+#include "libaout.h" /* BFD a.out internal data structures */
+
+#define DEFAULT_ARCH bfd_arch_sparc
+#define MY(OP) CAT(sparclinux_,OP)
+#define TARGETNAME "a.out-sparc-linux"
+
+extern const bfd_target MY(vec);
+
+/* We always generate QMAGIC files in preference to ZMAGIC files. It
+ would be possible to make this a linker option, if that ever
+ becomes important. */
+
+static void MY_final_link_callback
+ PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
+
+static boolean sparclinux_bfd_final_link
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
+
+static boolean
+sparclinux_bfd_final_link (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ obj_aout_subformat (abfd) = q_magic_format;
+ return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
+}
+
+#define MY_bfd_final_link sparclinux_bfd_final_link
+
+/* Set the machine type correctly. */
+
+static boolean sparclinux_write_object_contents PARAMS ((bfd *abfd));
+
+static boolean
+sparclinux_write_object_contents (abfd)
+ bfd *abfd;
+{
+ struct external_exec exec_bytes;
+ struct internal_exec *execp = exec_hdr (abfd);
+
+ N_SET_MACHTYPE (*execp, M_SPARC);
+
+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
+
+ WRITE_HEADERS(abfd, execp);
+
+ return true;
+}
+
+#define MY_write_object_contents sparclinux_write_object_contents
+/* Code to link against Linux a.out shared libraries. */
+
+/* See if a symbol name is a reference to the global offset table. */
+
+#ifndef GOT_REF_PREFIX
+#define GOT_REF_PREFIX "__GOT_"
+#endif
+
+#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. */
+
+#ifndef PLT_REF_PREFIX
+#define PLT_REF_PREFIX "__PLT_"
+#endif
+
+#define IS_PLT_SYM(name) \
+ (strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
+
+/* This string is used to generate specialized error messages. */
+
+#ifndef NEEDS_SHRLIB
+#define NEEDS_SHRLIB "__NEEDS_SHRLIB_"
+#endif
+
+/* This special symbol is a set vector that contains a list of
+ pointers to fixup tables. It will be present in any dynamicly
+ linked file. The linker generated fixup table should also be added
+ to the list, and it should always appear in the second slot (the
+ first one is a dummy with a magic number that is defined in
+ crt0.o). */
+
+#ifndef SHARABLE_CONFLICTS
+#define SHARABLE_CONFLICTS "__SHARABLE_CONFLICTS__"
+#endif
+
+/* We keep a list of fixups. The terminology is a bit strange, but
+ each fixup contains two 32 bit numbers. A regular fixup contains
+ an address and a pointer, and at runtime we should store the
+ address at the location pointed to by the pointer. A builtin fixup
+ contains two pointers, and we should read the address using one
+ pointer and store it at the location pointed to by the other
+ pointer. Builtin fixups come into play when we have duplicate
+ __GOT__ symbols for the same variable. The builtin fixup will copy
+ the GOT pointer from one over into the other. */
+
+struct fixup
+{
+ struct fixup *next;
+ struct linux_link_hash_entry *h;
+ bfd_vma value;
+
+ /* Nonzero if this is a jump instruction that needs to be fixed,
+ zero if this is just a pointer */
+ char jump;
+
+ char builtin;
+};
+
+/* We don't need a special hash table entry structure, but we do need
+ to keep some information between linker passes, so we use a special
+ hash table. */
+
+struct linux_link_hash_entry
+{
+ struct aout_link_hash_entry root;
+};
+
+struct linux_link_hash_table
+{
+ struct aout_link_hash_table root;
+
+ /* First dynamic object found in link. */
+ bfd *dynobj;
+
+ /* Number of fixups. */
+ size_t fixup_count;
+
+ /* Number of builtin fixups. */
+ size_t local_builtins;
+
+ /* List of fixups. */
+ struct fixup *fixup_list;
+};
+
+static struct bfd_hash_entry *linux_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct bfd_link_hash_table *linux_link_hash_table_create
+ PARAMS ((bfd *));
+static struct fixup *new_fixup
+ PARAMS ((struct bfd_link_info *, struct linux_link_hash_entry *,
+ bfd_vma, int));
+static boolean linux_link_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static boolean linux_add_one_symbol
+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, asection *,
+ bfd_vma, const char *, boolean, boolean,
+ struct bfd_link_hash_entry **));
+static boolean linux_tally_symbols
+ PARAMS ((struct linux_link_hash_entry *, PTR));
+static boolean linux_finish_dynamic_link
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+/* Routine to create an entry in an Linux link hash table. */
+
+static struct bfd_hash_entry *
+linux_link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ struct linux_link_hash_entry *ret = (struct linux_link_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct linux_link_hash_entry *) NULL)
+ ret = ((struct linux_link_hash_entry *)
+ bfd_hash_allocate (table, sizeof (struct linux_link_hash_entry)));
+ if (ret == NULL)
+ return (struct bfd_hash_entry *) ret;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct linux_link_hash_entry *)
+ NAME(aout,link_hash_newfunc) ((struct bfd_hash_entry *) ret,
+ table, string));
+ if (ret != NULL)
+ {
+ /* Set local fields; there aren't any. */
+ }
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+/* Create a Linux link hash table. */
+
+static struct bfd_link_hash_table *
+linux_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct linux_link_hash_table *ret;
+
+ ret = ((struct linux_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct linux_link_hash_table)));
+ if (ret == (struct linux_link_hash_table *) NULL)
+ return (struct bfd_link_hash_table *) NULL;
+ if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
+ linux_link_hash_newfunc))
+ {
+ free (ret);
+ return (struct bfd_link_hash_table *) NULL;
+ }
+
+ ret->dynobj = NULL;
+ ret->fixup_count = 0;
+ ret->local_builtins = 0;
+ ret->fixup_list = NULL;
+
+ return &ret->root.root;
+}
+
+/* Look up an entry in a Linux link hash table. */
+
+#define linux_link_hash_lookup(table, string, create, copy, follow) \
+ ((struct linux_link_hash_entry *) \
+ aout_link_hash_lookup (&(table)->root, (string), (create), (copy),\
+ (follow)))
+
+/* Traverse a Linux link hash table. */
+
+#define linux_link_hash_traverse(table, func, info) \
+ (aout_link_hash_traverse \
+ (&(table)->root, \
+ (boolean (*) PARAMS ((struct aout_link_hash_entry *, PTR))) (func), \
+ (info)))
+
+/* Get the Linux link hash table from the info structure. This is
+ just a cast. */
+
+#define linux_hash_table(p) ((struct linux_link_hash_table *) ((p)->hash))
+
+/* Store the information for a new fixup. */
+
+static struct fixup *
+new_fixup (info, h, value, builtin)
+ struct bfd_link_info *info;
+ struct linux_link_hash_entry *h;
+ bfd_vma value;
+ int builtin;
+{
+ struct fixup *f;
+
+ f = (struct fixup *) bfd_hash_allocate (&info->hash->table,
+ sizeof (struct fixup));
+ if (f == NULL)
+ return f;
+ f->next = linux_hash_table (info)->fixup_list;
+ linux_hash_table (info)->fixup_list = f;
+ f->h = h;
+ f->value = value;
+ f->builtin = builtin;
+ f->jump = 0;
+ ++linux_hash_table (info)->fixup_count;
+ return f;
+}
+
+/* We come here once we realize that we are going to link to a shared
+ library. We need to create a special section that contains the
+ fixup table, and we ultimately need to add a pointer to this into
+ the set vector for SHARABLE_CONFLICTS. At this point we do not
+ know the size of the section, but that's OK - we just need to
+ create it for now. */
+
+static boolean
+linux_link_create_dynamic_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ flagword flags;
+ register asection *s;
+
+ /* Note that we set the SEC_IN_MEMORY flag. */
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
+
+ /* We choose to use the name ".linux-dynamic" for the fixup table.
+ Why not? */
+ s = bfd_make_section (abfd, ".linux-dynamic");
+ if (s == NULL
+ || ! bfd_set_section_flags (abfd, s, flags)
+ || ! bfd_set_section_alignment (abfd, s, 2))
+ return false;
+ s->_raw_size = 0;
+ s->contents = 0;
+
+ return true;
+}
+
+/* Function to add a single symbol to the linker hash table. This is
+ a wrapper around _bfd_generic_link_add_one_symbol which handles the
+ tweaking needed for dynamic linking support. */
+
+static boolean
+linux_add_one_symbol (info, abfd, name, flags, section, value, string,
+ copy, collect, hashp)
+ struct bfd_link_info *info;
+ bfd *abfd;
+ const char *name;
+ flagword flags;
+ asection *section;
+ bfd_vma value;
+ const char *string;
+ boolean copy;
+ boolean collect;
+ struct bfd_link_hash_entry **hashp;
+{
+ struct linux_link_hash_entry *h;
+ boolean insert;
+
+ /* Look up and see if we already have this symbol in the hash table.
+ If we do, and the defining entry is from a shared library, we
+ need to create the dynamic sections.
+
+ FIXME: What if abfd->xvec != info->hash->creator? We may want to
+ be able to link Linux a.out and ELF objects together, but serious
+ confusion is possible. */
+
+ insert = false;
+
+ if (! info->relocateable
+ && linux_hash_table (info)->dynobj == NULL
+ && strcmp (name, SHARABLE_CONFLICTS) == 0
+ && (flags & BSF_CONSTRUCTOR) != 0
+ && abfd->xvec == info->hash->creator)
+ {
+ if (! linux_link_create_dynamic_sections (abfd, info))
+ return false;
+ linux_hash_table (info)->dynobj = abfd;
+ insert = true;
+ }
+
+ if (bfd_is_abs_section (section)
+ && abfd->xvec == info->hash->creator)
+ {
+ h = linux_link_hash_lookup (linux_hash_table (info), name, false,
+ false, false);
+ if (h != NULL
+ && (h->root.root.type == bfd_link_hash_defined
+ || h->root.root.type == bfd_link_hash_defweak))
+ {
+ struct fixup *f;
+
+ if (hashp != NULL)
+ *hashp = (struct bfd_link_hash_entry *) h;
+
+ f = new_fixup (info, h, value, ! IS_PLT_SYM (name));
+ if (f == NULL)
+ return false;
+ f->jump = IS_PLT_SYM (name);
+
+ return true;
+ }
+ }
+
+ /* Do the usual procedure for adding a symbol. */
+ if (! _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section,
+ value, string, copy, collect,
+ hashp))
+ return false;
+
+ /* Insert a pointer to our table in the set vector. The dynamic
+ linker requires this information */
+ if (insert)
+ {
+ asection *s;
+
+ /* Here we do our special thing to add the pointer to the
+ dynamic section in the SHARABLE_CONFLICTS set vector. */
+ s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
+ ".linux-dynamic");
+ BFD_ASSERT (s != NULL);
+
+ if (! (_bfd_generic_link_add_one_symbol
+ (info, linux_hash_table (info)->dynobj, SHARABLE_CONFLICTS,
+ BSF_GLOBAL | BSF_CONSTRUCTOR, s, 0, NULL, false, false, NULL)))
+ return false;
+ }
+
+ return true;
+}
+
+/* We will crawl the hash table and come here for every global symbol.
+ We will examine each entry and see if there are indications that we
+ need to add a fixup. There are two possible cases - one is where
+ you have duplicate definitions of PLT or GOT symbols - these will
+ have already been caught and added as "builtin" fixups. If we find
+ that the corresponding non PLT/GOT symbol is also present, we
+ convert it to a regular fixup instead.
+
+ This function is called via linux_link_hash_traverse. */
+
+static boolean
+linux_tally_symbols (h, data)
+ struct linux_link_hash_entry *h;
+ PTR data;
+{
+ struct bfd_link_info *info = (struct bfd_link_info *) data;
+ struct fixup *f, *f1;
+ int is_plt;
+ struct linux_link_hash_entry *h1, *h2;
+ boolean exists;
+
+ if (h->root.root.type == bfd_link_hash_undefined
+ && strncmp (h->root.root.root.string, NEEDS_SHRLIB,
+ sizeof NEEDS_SHRLIB - 1) == 0)
+ {
+ const char *name;
+ char *p;
+ char *alloc = NULL;
+
+ name = h->root.root.root.string + sizeof NEEDS_SHRLIB - 1;
+ p = strrchr (name, '_');
+ if (p != NULL)
+ alloc = (char *) bfd_malloc (strlen (name) + 1);
+
+ if (p == NULL || alloc == NULL)
+ (*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
+ name);
+ else
+ {
+ strcpy (alloc, name);
+ p = strrchr (alloc, '_');
+ *p++ = '\0';
+ (*_bfd_error_handler)
+ (_("Output file requires shared library `%s.so.%s'\n"),
+ alloc, p);
+ free (alloc);
+ }
+
+ abort ();
+ }
+
+ /* If this symbol is not a PLT/GOT, we do not even need to look at
+ it. */
+ is_plt = IS_PLT_SYM (h->root.root.root.string);
+
+ if (is_plt || IS_GOT_SYM (h->root.root.root.string))
+ {
+ /* Look up this symbol twice. Once just as a regular lookup,
+ and then again following all of the indirect links until we
+ reach a real symbol. */
+ h1 = linux_link_hash_lookup (linux_hash_table (info),
+ (h->root.root.root.string
+ + sizeof PLT_REF_PREFIX - 1),
+ false, false, true);
+ /* 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),
+ false, false, false);
+
+ /* The real symbol must exist but if it is also an ABS symbol,
+ there is no need to have a fixup. This is because they both
+ came from the same library. If on the other hand, we had to
+ use an indirect symbol to get to the real symbol, we add the
+ fixup anyway, since there are cases where these symbols come
+ from different shared libraries */
+ if (h1 != NULL
+ && (((h1->root.root.type == bfd_link_hash_defined
+ || h1->root.root.type == bfd_link_hash_defweak)
+ && ! bfd_is_abs_section (h1->root.root.u.def.section))
+ || h2->root.root.type == bfd_link_hash_indirect))
+ {
+ /* See if there is a "builtin" fixup already present
+ involving this symbol. If so, convert it to a regular
+ fixup. In the end, this relaxes some of the requirements
+ about the order of performing fixups. */
+ exists = false;
+ for (f1 = linux_hash_table (info)->fixup_list;
+ f1 != NULL;
+ f1 = f1->next)
+ {
+ if ((f1->h != h && f1->h != h1)
+ || (! f1->builtin && ! f1->jump))
+ continue;
+ if (f1->h == h1)
+ exists = true;
+ if (! exists
+ && bfd_is_abs_section (h->root.root.u.def.section))
+ {
+ f = new_fixup (info, h1, f1->h->root.root.u.def.value, 0);
+ f->jump = is_plt;
+ }
+ f1->h = h1;
+ f1->jump = is_plt;
+ f1->builtin = 0;
+ exists = true;
+ }
+ if (! exists
+ && bfd_is_abs_section (h->root.root.u.def.section))
+ {
+ f = new_fixup (info, h1, h->root.root.u.def.value, 0);
+ if (f == NULL)
+ {
+ /* FIXME: No way to return error. */
+ abort ();
+ }
+ f->jump = is_plt;
+ }
+ }
+
+ /* Quick and dirty way of stripping these symbols from the
+ symtab. */
+ if (bfd_is_abs_section (h->root.root.u.def.section))
+ h->root.written = true;
+ }
+
+ return true;
+}
+
+/* This is called to set the size of the .linux-dynamic section is.
+ It is called by the Linux linker emulation before_allocation
+ routine. We have finished reading all of the input files, and now
+ we just scan the hash tables to find out how many additional fixups
+ are required. */
+
+boolean
+bfd_sparclinux_size_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ struct fixup *f;
+ asection *s;
+
+ if (output_bfd->xvec != &MY(vec))
+ return true;
+
+ /* First find the fixups... */
+ linux_link_hash_traverse (linux_hash_table (info),
+ linux_tally_symbols,
+ (PTR) info);
+
+ /* If there are builtin fixups, leave room for a marker. This is
+ used by the dynamic linker so that it knows that all that follow
+ are builtin fixups instead of regular fixups. */
+ for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
+ {
+ if (f->builtin)
+ {
+ ++linux_hash_table (info)->fixup_count;
+ ++linux_hash_table (info)->local_builtins;
+ break;
+ }
+ }
+
+ if (linux_hash_table (info)->dynobj == NULL)
+ {
+ if (linux_hash_table (info)->fixup_count > 0)
+ abort ();
+ return true;
+ }
+
+ /* Allocate memory for our fixup table. We will fill it in later. */
+ s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
+ ".linux-dynamic");
+ if (s != NULL)
+ {
+ s->_raw_size = 8 + linux_hash_table (info)->fixup_count * 8;
+ s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+ if (s->contents == NULL)
+ return false;
+ memset (s->contents, 0, (size_t) s->_raw_size);
+ }
+
+ return true;
+}
+
+/* We come here once we are ready to actually write the fixup table to
+ the output file. Scan the fixup tables and so forth and generate
+ the stuff we need. */
+
+static boolean
+linux_finish_dynamic_link (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ asection *s, *os, *is;
+ bfd_byte *fixup_table;
+ struct linux_link_hash_entry *h;
+ struct fixup *f;
+ unsigned int new_addr;
+ int section_offset;
+ unsigned int fixups_written;
+
+ if (linux_hash_table (info)->dynobj == NULL)
+ return true;
+
+ s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
+ ".linux-dynamic");
+ BFD_ASSERT (s != NULL);
+ os = s->output_section;
+ fixups_written = 0;
+
+#ifdef LINUX_LINK_DEBUG
+ printf ("Fixup table file offset: %x VMA: %x\n",
+ os->filepos + s->output_offset,
+ os->vma + s->output_offset);
+#endif
+
+ fixup_table = s->contents;
+ bfd_put_32 (output_bfd, linux_hash_table (info)->fixup_count, fixup_table);
+ fixup_table += 4;
+
+ /* Fill in fixup table. */
+ for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
+ {
+ if (f->builtin)
+ continue;
+
+ if (f->h->root.root.type != bfd_link_hash_defined
+ && f->h->root.root.type != bfd_link_hash_defweak)
+ {
+ (*_bfd_error_handler)
+ (_("Symbol %s not defined for fixups\n"),
+ f->h->root.root.root.string);
+ continue;
+ }
+
+ is = f->h->root.root.u.def.section;
+ section_offset = is->output_section->vma + is->output_offset;
+ new_addr = f->h->root.root.u.def.value + section_offset;
+
+#ifdef LINUX_LINK_DEBUG
+ printf ("Fixup(%d) %s: %x %x\n",f->jump, f->h->root.root.string,
+ new_addr, f->value);
+#endif
+
+ if (f->jump)
+ {
+ /* Relative address */
+ new_addr = new_addr - (f->value + 5);
+ bfd_put_32 (output_bfd, new_addr, fixup_table);
+ fixup_table += 4;
+ bfd_put_32 (output_bfd, f->value + 1, fixup_table);
+ fixup_table += 4;
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, new_addr, fixup_table);
+ fixup_table += 4;
+ bfd_put_32 (output_bfd, f->value, fixup_table);
+ fixup_table += 4;
+ }
+ ++fixups_written;
+ }
+
+ if (linux_hash_table (info)->local_builtins != 0)
+ {
+ /* Special marker so we know to switch to the other type of fixup */
+ bfd_put_32 (output_bfd, 0, fixup_table);
+ fixup_table += 4;
+ bfd_put_32 (output_bfd, 0, fixup_table);
+ fixup_table += 4;
+ ++fixups_written;
+ for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
+ {
+ if (! f->builtin)
+ continue;
+
+ if (f->h->root.root.type != bfd_link_hash_defined
+ && f->h->root.root.type != bfd_link_hash_defweak)
+ {
+ (*_bfd_error_handler)
+ (_("Symbol %s not defined for fixups\n"),
+ f->h->root.root.root.string);
+ continue;
+ }
+
+ is = f->h->root.root.u.def.section;
+ section_offset = is->output_section->vma + is->output_offset;
+ new_addr = f->h->root.root.u.def.value + section_offset;
+
+#ifdef LINUX_LINK_DEBUG
+ printf ("Fixup(B) %s: %x %x\n", f->h->root.root.string,
+ new_addr, f->value);
+#endif
+
+ bfd_put_32 (output_bfd, new_addr, fixup_table);
+ fixup_table += 4;
+ bfd_put_32 (output_bfd, f->value, fixup_table);
+ fixup_table += 4;
+ ++fixups_written;
+ }
+ }
+
+ if (linux_hash_table (info)->fixup_count != fixups_written)
+ {
+ (*_bfd_error_handler) (_("Warning: fixup count mismatch\n"));
+ while (linux_hash_table (info)->fixup_count > fixups_written)
+ {
+ bfd_put_32 (output_bfd, 0, fixup_table);
+ fixup_table += 4;
+ bfd_put_32 (output_bfd, 0, fixup_table);
+ fixup_table += 4;
+ ++fixups_written;
+ }
+ }
+
+ h = linux_link_hash_lookup (linux_hash_table (info),
+ "__BUILTIN_FIXUPS__",
+ false, false, false);
+
+ if (h != NULL
+ && (h->root.root.type == bfd_link_hash_defined
+ || h->root.root.type == bfd_link_hash_defweak))
+ {
+ is = h->root.root.u.def.section;
+ section_offset = is->output_section->vma + is->output_offset;
+ new_addr = h->root.root.u.def.value + section_offset;
+
+#ifdef LINUX_LINK_DEBUG
+ printf ("Builtin fixup table at %x\n", new_addr);
+#endif
+
+ bfd_put_32 (output_bfd, new_addr, fixup_table);
+ }
+ else
+ bfd_put_32 (output_bfd, 0, fixup_table);
+
+ if (bfd_seek (output_bfd, os->filepos + s->output_offset, SEEK_SET) != 0)
+ return false;
+
+ if (bfd_write ((PTR) s->contents, 1, s->_raw_size, output_bfd)
+ != s->_raw_size)
+ return false;
+
+ return true;
+}
+
+#define MY_bfd_link_hash_table_create linux_link_hash_table_create
+#define MY_add_one_symbol linux_add_one_symbol
+#define MY_finish_dynamic_link linux_finish_dynamic_link
+
+#define MY_zmagic_contiguous 1
+
+#include "aout-target.h"
diff --git a/contrib/binutils/bfd/sparcnetbsd.c b/contrib/binutils/bfd/sparcnetbsd.c
new file mode 100644
index 0000000..4277bb8
--- /dev/null
+++ b/contrib/binutils/bfd/sparcnetbsd.c
@@ -0,0 +1,34 @@
+/* BFD back-end for NetBSD/sparc a.out-ish binaries.
+ Copyright (C) 1990, 91, 92, 94, 95, 97, 1998 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define BYTES_IN_WORD 4
+#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. */
+#define TARGET_PAGE_SIZE 0x2000
+
+#define DEFAULT_ARCH bfd_arch_sparc
+#define DEFAULT_MID M_SPARC_NETBSD
+
+#define MY(OP) CAT(sparcnetbsd_,OP)
+/* This needs to start with a.out so GDB knows it is an a.out variant. */
+#define TARGETNAME "a.out-sparc-netbsd"
+
+#include "netbsd.h"
diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c
index 1386ebd..31f69b0 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, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -171,7 +171,7 @@ srec_init ()
/* 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 21
+#define CHUNK 16
/* 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. */
@@ -287,7 +287,7 @@ srec_bad_byte (abfd, lineno, c, error)
buf[1] = '\0';
}
(*_bfd_error_handler)
- ("%s:%d: Unexpected character `%s' in S-record file\n",
+ (_("%s:%d: Unexpected character `%s' in S-record file\n"),
bfd_get_filename (abfd), lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
@@ -387,7 +387,7 @@ srec_scan (abfd)
&& (c == ' ' || c == '\t'))
;
- if (c == '\n')
+ if (c == '\n' || c == '\r')
break;
if (c == EOF)
@@ -469,14 +469,14 @@ srec_scan (abfd)
}
while (c == ' ' || c == '\t');
- if (c != '\n')
+ if (c == '\n')
+ ++lineno;
+ else if (c != '\r')
{
srec_bad_byte (abfd, lineno, c, error);
goto error_return;
}
- ++lineno;
-
break;
case 'S':
@@ -643,6 +643,9 @@ srec_object_p (abfd)
|| ! srec_scan (abfd))
return NULL;
+ if (abfd->symcount > 0)
+ abfd->flags |= HAS_SYMS;
+
return abfd->xvec;
}
@@ -670,6 +673,9 @@ symbolsrec_object_p (abfd)
|| ! srec_scan (abfd))
return NULL;
+ if (abfd->symcount > 0)
+ abfd->flags |= HAS_SYMS;
+
return abfd->xvec;
}
@@ -865,7 +871,7 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
}
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff
- && tdata->type < 2)
+ && tdata->type <= 2)
{
tdata->type = 2;
}
@@ -994,31 +1000,28 @@ srec_write_section (abfd, tdata, list)
tdata_type *tdata;
srec_data_list_type *list;
{
- unsigned int bytes_written = 0;
+ unsigned int octets_written = 0;
bfd_byte *location = list->data;
- while (bytes_written < list->size)
+ while (octets_written < list->size)
{
bfd_vma address;
+ unsigned int octets_this_chunk = list->size - octets_written;
- unsigned int bytes_this_chunk = list->size - bytes_written;
+ if (octets_this_chunk > CHUNK)
+ octets_this_chunk = CHUNK;
- if (bytes_this_chunk > CHUNK)
- {
- bytes_this_chunk = CHUNK;
- }
-
- address = list->where + bytes_written;
+ address = list->where + octets_written / bfd_octets_per_byte (abfd);
if (! srec_write_record (abfd,
tdata->type,
address,
location,
- location + bytes_this_chunk))
+ location + octets_this_chunk))
return false;
- bytes_written += bytes_this_chunk;
- location += bytes_this_chunk;
+ octets_written += octets_this_chunk;
+ location += octets_this_chunk;
}
return true;
@@ -1059,26 +1062,8 @@ srec_write_symbols (abfd)
for (i = 0; i < count; i++)
{
asymbol *s = table[i];
-#if 0
- int len = strlen (s->name);
-
- /* If this symbol has a .[ocs] in it, it's probably a file name
- and we'll output that as the module name */
-
- if (len > 3 && s->name[len - 2] == '.')
- {
- int l;
- sprintf (buffer, "$$ %s\r\n", s->name);
- l = strlen (buffer);
- if (bfd_write (buffer, l, 1, abfd) != l)
- return false;
- }
- else
-#endif
- if (s->flags & (BSF_GLOBAL | BSF_LOCAL)
- && (s->flags & BSF_DEBUGGING) == 0
- && s->name[0] != '.'
- && s->name[0] != 't')
+ if (! bfd_is_local_label (abfd, s)
+ && (s->flags & BSF_DEBUGGING) == 0)
{
/* Just dump out non debug symbols */
bfd_size_type l;
@@ -1151,8 +1136,8 @@ symbolsrec_write_object_contents (abfd)
/*ARGSUSED*/
static int
srec_sizeof_headers (abfd, exec)
- bfd *abfd;
- boolean exec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean exec ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -1221,7 +1206,7 @@ srec_get_symtab (abfd, alocation)
/*ARGSUSED*/
static void
srec_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -1231,7 +1216,7 @@ srec_get_symbol_info (ignore_abfd, symbol, ret)
/*ARGSUSED*/
static void
srec_print_symbol (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -1274,6 +1259,7 @@ srec_print_symbol (ignore_abfd, afile, symbol, how)
#define srec_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#define srec_bfd_relax_section bfd_generic_relax_section
+#define srec_bfd_gc_sections bfd_generic_gc_sections
#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define srec_bfd_final_link _bfd_generic_final_link
@@ -1329,6 +1315,8 @@ const bfd_target srec_vec =
BFD_JUMP_TABLE_LINK (srec),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0
};
@@ -1384,5 +1372,7 @@ const bfd_target symbolsrec_vec =
BFD_JUMP_TABLE_LINK (srec),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0
};
diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c
index 77c7352..e9ac167 100644
--- a/contrib/binutils/bfd/stabs.c
+++ b/contrib/binutils/bfd/stabs.c
@@ -1,5 +1,5 @@
/* Stabs in sections linking support.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -230,6 +230,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
sinfo->strings = _bfd_stringtab_init ();
if (sinfo->strings == NULL)
goto error_return;
+ /* Make sure the first byte is zero. */
+ (void) _bfd_stringtab_add (sinfo->strings, "", true, true);
if (! bfd_hash_table_init_n (&sinfo->includes.root,
stab_link_includes_newfunc,
251))
@@ -587,6 +589,12 @@ _bfd_write_stab_strings (output_bfd, psinfo)
if (sinfo == NULL)
return true;
+ if (bfd_is_abs_section (sinfo->stabstr->output_section))
+ {
+ /* The section was discarded from the link. */
+ return true;
+ }
+
BFD_ASSERT ((sinfo->stabstr->output_offset
+ _bfd_stringtab_size (sinfo->strings))
<= sinfo->stabstr->output_section->_raw_size);
@@ -613,8 +621,8 @@ _bfd_write_stab_strings (output_bfd, psinfo)
bfd_vma
_bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset)
- bfd *output_bfd;
- PTR *psinfo;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ PTR *psinfo ATTRIBUTE_UNUSED;
asection *stabsec;
PTR *psecinfo;
bfd_vma offset;
diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c
index d39e7d87..6546f585 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, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -227,7 +227,7 @@ CODE_FRAGMENT
. <<BSF_GLOBAL>> *}
.
. {* The symbol is a debugging record. The value has an arbitary
-. meaning. *}
+. meaning, unless BSF_DEBUGGING_RELOC is also set. *}
.#define BSF_DEBUGGING 0x08
.
. {* The symbol denotes a function entry point. Used in ELF,
@@ -285,6 +285,11 @@ CODE_FRAGMENT
. others someday. *}
.#define BSF_OBJECT 0x10000
.
+. {* 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
@@ -523,6 +528,11 @@ static CONST struct section_to_type stt[] =
{".sdata", 'g'}, /* Small initialized data. */
{".text", 't'},
{"code", 't'}, /* MRI .text */
+ {".drectve", 'i'}, /* MSVC's .drective section */
+ {".idata", 'i'}, /* MSVC's .idata (import) section */
+ {".edata", 'e'}, /* MSVC's .edata (export) section */
+ {".pdata", 'p'}, /* MSVC's .pdata (stack unwind) section */
+ {".debug", 'N'}, /* MSVC's .debug (non-standard debug syms) */
{0, 0}
};
@@ -572,11 +582,30 @@ bfd_decode_symclass (symbol)
if (bfd_is_com_section (symbol->section))
return 'C';
if (bfd_is_und_section (symbol->section))
- return 'U';
+ {
+ if (symbol->flags & BSF_WEAK)
+ {
+ /* If weak, determine if it's specifically an object
+ or non-object weak. */
+ if (symbol->flags & BSF_OBJECT)
+ return 'v';
+ else
+ return 'w';
+ }
+ else
+ return 'U';
+ }
if (bfd_is_ind_section (symbol->section))
return 'I';
if (symbol->flags & BSF_WEAK)
- return 'W';
+ {
+ /* If weak, determine if it's specifically an object
+ or non-object weak. */
+ if (symbol->flags & BSF_OBJECT)
+ return 'V';
+ else
+ return 'W';
+ }
if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL)))
return '?';
@@ -602,6 +631,26 @@ bfd_decode_symclass (symbol)
/*
FUNCTION
+ bfd_is_undefined_symclass
+
+DESCRIPTION
+ Returns non-zero if the class symbol returned by
+ bfd_decode_symclass represents an undefined symbol.
+ Returns zero otherwise.
+
+SYNOPSIS
+ boolean bfd_is_undefined_symclass (int symclass);
+*/
+
+boolean
+bfd_is_undefined_symclass (symclass)
+ int symclass;
+{
+ return symclass == 'U' || symclass == 'w' || symclass == 'v';
+}
+
+/*
+FUNCTION
bfd_symbol_info
DESCRIPTION
@@ -619,10 +668,12 @@ bfd_symbol_info (symbol, ret)
symbol_info *ret;
{
ret->type = bfd_decode_symclass (symbol);
- if (ret->type != 'U')
- ret->value = symbol->value + symbol->section->vma;
- else
+
+ if (bfd_is_undefined_symclass (ret->type))
ret->value = 0;
+ else
+ ret->value = symbol->value + symbol->section->vma;
+
ret->name = symbol->name;
}
@@ -698,10 +749,10 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
/*ARGSUSED*/
asymbol *
_bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
- bfd *abfd;
- boolean dynamic;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean dynamic ATTRIBUTE_UNUSED;
const PTR minisym;
- asymbol *sym;
+ asymbol *sym ATTRIBUTE_UNUSED;
{
return *(asymbol **) minisym;
}
@@ -797,9 +848,11 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
struct stab_find_info *info;
bfd_size_type stabsize, strsize;
bfd_byte *stab, *str;
+ bfd_byte *last_stab = NULL;
bfd_size_type stroff;
struct indexentry *indexentry;
char *directory_name, *file_name;
+ int saw_fun;
*pfound = false;
*pfilename = bfd_get_filename (abfd);
@@ -842,7 +895,6 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
long reloc_size, reloc_count;
arelent **reloc_vector;
- bfd_vma val;
int i;
char *name;
char *file_name;
@@ -919,7 +971,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|| r->howto->dst_mask != 0xffffffff)
{
(*_bfd_error_handler)
- ("Unsupported .stab relocation");
+ (_("Unsupported .stab relocation"));
bfd_set_error (bfd_error_invalid_operation);
if (reloc_vector != NULL)
free (reloc_vector);
@@ -944,12 +996,38 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
table. */
info->indextablesize = 0;
+ saw_fun = 1;
for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
{
- if (stab[TYPEOFF] == N_FUN)
- ++info->indextablesize;
+ if (stab[TYPEOFF] == N_SO)
+ {
+ /* N_SO with null name indicates EOF */
+ if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
+ continue;
+
+ /* if we did not see a function def, leave space for one. */
+ if (saw_fun == 0)
+ ++info->indextablesize;
+
+ saw_fun = 0;
+
+ /* two N_SO's in a row is a filename and directory. Skip */
+ if (stab + STABSIZE < info->stabs + stabsize
+ && *(stab + STABSIZE + TYPEOFF) == N_SO)
+ {
+ stab += STABSIZE;
+ }
+ }
+ else if (stab[TYPEOFF] == N_FUN)
+ {
+ saw_fun = 1;
+ ++info->indextablesize;
+ }
}
+ if (saw_fun == 0)
+ ++info->indextablesize;
+
if (info->indextablesize == 0)
return true;
++info->indextablesize;
@@ -963,6 +1041,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
file_name = NULL;
directory_name = NULL;
+ saw_fun = 1;
for (i = 0, stroff = 0, stab = info->stabs, str = info->strs;
i < info->indextablesize && stab < info->stabs + stabsize;
@@ -981,26 +1060,47 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
case N_SO:
/* The main file name. */
+ /* 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. */
+ if (saw_fun == 0)
+ {
+ info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
+ info->indextable[i].stab = last_stab;
+ info->indextable[i].str = str;
+ info->indextable[i].directory_name = directory_name;
+ info->indextable[i].file_name = file_name;
+ info->indextable[i].function_name = NULL;
+ ++i;
+ }
+ saw_fun = 0;
+
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
-
if (*file_name == '\0')
{
directory_name = NULL;
file_name = NULL;
- }
- else if (stab + STABSIZE >= info->stabs + stabsize
- || *(stab + STABSIZE + TYPEOFF) != N_SO)
- {
- directory_name = NULL;
+ saw_fun = 1;
}
else
{
- /* Two consecutive N_SOs are a directory and a file
- name. */
- stab += STABSIZE;
- directory_name = file_name;
- file_name = ((char *) str
- + bfd_get_32 (abfd, stab + STRDXOFF));
+ last_stab = stab;
+ if (stab + STABSIZE >= info->stabs + stabsize
+ || *(stab + STABSIZE + TYPEOFF) != N_SO)
+ {
+ directory_name = NULL;
+ }
+ else
+ {
+ /* Two consecutive N_SOs are a directory and a
+ file name. */
+ stab += STABSIZE;
+ directory_name = file_name;
+ file_name = ((char *) str
+ + bfd_get_32 (abfd, stab + STRDXOFF));
+ }
}
break;
@@ -1011,7 +1111,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
case N_FUN:
/* A function name. */
-
+ saw_fun = 1;
name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
if (*name == '\0')
@@ -1022,20 +1122,28 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (name == NULL)
continue;
- val = bfd_get_32 (abfd, stab + VALOFF);
-
- info->indextable[i].val = val;
+ info->indextable[i].val = bfd_get_32 (abfd, stab + VALOFF);
info->indextable[i].stab = stab;
info->indextable[i].str = str;
info->indextable[i].directory_name = directory_name;
info->indextable[i].file_name = file_name;
info->indextable[i].function_name = function_name;
-
++i;
break;
}
}
+ if (saw_fun == 0)
+ {
+ info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
+ info->indextable[i].stab = last_stab;
+ info->indextable[i].str = str;
+ info->indextable[i].directory_name = directory_name;
+ info->indextable[i].file_name = file_name;
+ info->indextable[i].function_name = NULL;
+ ++i;
+ }
+
info->indextable[i].val = (bfd_vma) -1;
info->indextable[i].stab = info->stabs + stabsize;
info->indextable[i].str = str;
@@ -1045,7 +1153,6 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
++i;
info->indextablesize = i;
-
qsort (info->indextable, i, sizeof (struct indexentry), cmpindexentry);
*pinfo = (PTR) info;
diff --git a/contrib/binutils/bfd/sysdep.h b/contrib/binutils/bfd/sysdep.h
index e559aa6..0a58983 100644
--- a/contrib/binutils/bfd/sysdep.h
+++ b/contrib/binutils/bfd/sysdep.h
@@ -1,5 +1,5 @@
/* sysdep.h -- handle host dependencies for the BFD library
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -122,4 +122,23 @@ extern void free ();
extern char *getenv ();
#endif
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#define _(String) dgettext (PACKAGE, String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop (String)
+#else
+#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 _(String) (String)
+#define N_(String) (String)
+#endif
+
#endif /* ! defined (BFD_SYSDEP_H) */
diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c
index a6c61bb..1f2217b 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, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -152,6 +152,7 @@ DESCRIPTION
. bfd_target_os9k_flavour,
. bfd_target_versados_flavour,
. bfd_target_msdos_flavour,
+. bfd_target_ovax_flavour,
. bfd_target_evax_flavour
.};
.
@@ -244,7 +245,8 @@ Write cached information into a file being written, at <<bfd_close>>.
. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
-The general target vector.
+The general target vector. These vectors are initialized using the
+BFD_JUMP_TABLE macros.
.
. {* Generic entry points. *}
@@ -413,7 +415,8 @@ The general target vector.
.CAT(NAME,_bfd_link_hash_table_create),\
.CAT(NAME,_bfd_link_add_symbols),\
.CAT(NAME,_bfd_final_link),\
-.CAT(NAME,_bfd_link_split_section)
+.CAT(NAME,_bfd_link_split_section),\
+.CAT(NAME,_bfd_gc_sections)
. int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
. bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
. struct bfd_link_info *, struct bfd_link_order *,
@@ -437,7 +440,10 @@ The general target vector.
. {* Should this section be split up into smaller pieces during linking. *}
. boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
.
-. {* Routines to handle dynamic symbols and relocs. *}
+. {* 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. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME)\
.CAT(NAME,_get_dynamic_symtab_upper_bound),\
.CAT(NAME,_canonicalize_dynamic_symtab),\
@@ -455,10 +461,21 @@ The general target vector.
. PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
.
+A pointer to an alternative bfd_target in case the current one is not
+satisfactory. This can happen when the target cpu supports both big
+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. *}
+. 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;
*/
@@ -477,22 +494,35 @@ extern const bfd_target aout0_big_vec;
extern const bfd_target apollocoff_vec;
extern const bfd_target armcoff_little_vec;
extern const bfd_target armcoff_big_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 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 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_elf32_avr_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_bigmips_vec;
extern const bfd_target bfd_elf64_bigmips_vec;
extern const bfd_target bfd_elf32_d10v_vec;
+extern const bfd_target bfd_elf32_d30v_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_vec;
+extern const bfd_target bfd_elf32_i960_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf64_littlemips_vec;
@@ -501,12 +531,17 @@ extern const bfd_target bfd_elf32_m68k_vec;
extern const bfd_target bfd_elf32_m88k_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;
+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_shl_vec;
extern const bfd_target bfd_elf32_sparc_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_big_generic_vec;
extern const bfd_target bfd_elf64_little_generic_vec;
extern const bfd_target bfd_elf64_sparc_vec;
@@ -515,7 +550,6 @@ 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 ecoffalpha_little_vec;
-extern const bfd_target evax_alpha_vec;
extern const bfd_target h8300coff_vec;
extern const bfd_target h8500coff_vec;
extern const bfd_target host_aout_vec;
@@ -557,6 +591,12 @@ 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 newsos3_vec;
extern const bfd_target nlm32_i386_vec;
extern const bfd_target nlm32_sparc_vec;
@@ -573,6 +613,8 @@ extern const bfd_target shcoff_vec;
extern const bfd_target shlcoff_vec;
extern const bfd_target shcoff_small_vec;
extern const bfd_target shlcoff_small_vec;
+extern const bfd_target shlpe_vec;
+extern const bfd_target shlpei_vec;
extern const bfd_target sparcle_aout_vec;
extern const bfd_target sparclinux_vec;
extern const bfd_target sparclynx_aout_vec;
@@ -583,8 +625,11 @@ 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 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 z8kcoff_vec;
@@ -601,13 +646,14 @@ extern const bfd_target ihex_vec;
/* All of the xvecs for core files. */
extern const bfd_target aix386_core_vec;
-extern const bfd_target cisco_core_vec;
+extern const bfd_target cisco_core_big_vec;
+extern const bfd_target cisco_core_little_vec;
extern const bfd_target hpux_core_vec;
extern const bfd_target hppabsd_core_vec;
extern const bfd_target irix_core_vec;
extern const bfd_target netbsd_core_vec;
extern const bfd_target osf_core_vec;
-extern const bfd_target sco_core_vec;
+extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
extern const bfd_target ptrace_core_vec;
@@ -645,17 +691,27 @@ const bfd_target * const bfd_target_vector[] = {
#ifdef BFD64
&bfd_elf64_alpha_vec,
#endif
+ &bfd_elf32_avr_vec,
&bfd_elf32_bigarc_vec,
+ &bfd_elf32_bigarm_vec,
+ &bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigmips_vec,
#ifdef BFD64
&bfd_elf64_bigmips_vec,
#endif
&bfd_elf32_d10v_vec,
+ &bfd_elf32_d30v_vec,
+#if 0
&bfd_elf32_hppa_vec,
+#endif
+ &bfd_elf32_i370_vec,
&bfd_elf32_i386_vec,
&bfd_elf32_i860_vec,
+ &bfd_elf32_i960_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
+ &bfd_elf32_littlearm_vec,
+ &bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlemips_vec,
#ifdef BFD64
&bfd_elf64_littlemips_vec,
@@ -666,9 +722,14 @@ const bfd_target * const bfd_target_vector[] = {
&bfd_elf32_m68k_vec,
&bfd_elf32_m88k_vec,
&bfd_elf32_sparc_vec,
+ &bfd_elf32_pj_vec,
+ &bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
&bfd_elf32_v850_vec,
+ &bfd_elf32_fr30_vec,
+ &bfd_elf32_mcore_big_vec,
+ &bfd_elf32_mcore_little_vec,
#ifdef BFD64 /* No one seems to use this. */
&bfd_elf64_big_generic_vec,
&bfd_elf64_little_generic_vec,
@@ -676,7 +737,7 @@ const bfd_target * const bfd_target_vector[] = {
#if 0
&bfd_elf64_sparc_vec,
#endif
- /* We don't include cisco_core_vec. Although it has a magic number,
+ /* 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. */
#ifdef BFD64
@@ -687,7 +748,6 @@ const bfd_target * const bfd_target_vector[] = {
&ecoff_biglittle_vec,
#ifdef BFD64
&ecoffalpha_little_vec,
- &evax_alpha_vec,
#endif
&h8300coff_vec,
&h8500coff_vec,
@@ -732,10 +792,15 @@ const bfd_target * const bfd_target_vector[] = {
&i386pei_vec,
&armcoff_little_vec,
&armcoff_big_vec,
+ &armnetbsd_vec,
&armpe_little_vec,
&armpe_big_vec,
&armpei_little_vec,
&armpei_big_vec,
+ &arm_epoc_pe_little_vec,
+ &arm_epoc_pe_big_vec,
+ &arm_epoc_pei_little_vec,
+ &arm_epoc_pei_big_vec,
&icoff_big_vec,
&icoff_little_vec,
&ieee_vec,
@@ -752,6 +817,10 @@ const bfd_target * const bfd_target_vector[] = {
&m68ksysvcoff_vec,
&m88kbcs_vec,
&m88kmach3_vec,
+ &mcore_pe_big_vec,
+ &mcore_pe_little_vec,
+ &mcore_pei_big_vec,
+ &mcore_pei_little_vec,
&newsos3_vec,
&nlm32_i386_vec,
&nlm32_sparc_vec,
@@ -791,11 +860,15 @@ const bfd_target * const bfd_target_vector[] = {
&sparcnetbsd_vec,
&sunos_big_vec,
&aout0_big_vec,
- &tekhex_vec,
&tic30_aout_vec,
&tic30_coff_vec,
+ &tic80coff_vec,
&vaxnetbsd_vec,
&versados_vec,
+#ifdef BFD64
+ &vms_alpha_vec,
+#endif
+ &vms_vax_vec,
&we32kcoff_vec,
&z8kcoff_vec,
@@ -831,6 +904,9 @@ const bfd_target * const bfd_target_vector[] = {
#ifdef OSF_CORE
&osf_core_vec,
#endif
+#ifdef SCO5_CORE
+ &sco5_core_vec,
+#endif
#ifdef TRAD_CORE
&trad_core_vec,
#endif
@@ -1032,3 +1108,32 @@ bfd_target_list ()
return name_list;
}
+
+/*
+FUNCTION
+ bfd_seach_for_target
+
+SYNOPSIS
+ 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
+ transfer vectors maintained by BFD that produces a non-zero
+ result when passed to the function @var{search_func}. The
+ parameter @var{data} is passed, unexamined, to the search
+ function.
+*/
+
+const bfd_target *
+bfd_search_for_target (search_func, data)
+ int (* search_func) PARAMS ((const bfd_target * target, void * data));
+ void * data;
+{
+ const bfd_target * const * target;
+
+ for (target = bfd_target_vector; * target != NULL; target ++)
+ if (search_func (* target, data))
+ return * target;
+
+ return NULL;
+}
diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c
index 76f49d9..b1ffe75 100644
--- a/contrib/binutils/bfd/tekhex.c
+++ b/contrib/binutils/bfd/tekhex.c
@@ -1,5 +1,6 @@
/* BFD backend for Extended Tektronix Hex Format objects.
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -599,7 +600,7 @@ move_section_contents (abfd, section, locationp, offset, count, get)
bfd *abfd;
asection *section;
PTR locationp;
- file_ptr offset;
+ file_ptr offset ATTRIBUTE_UNUSED;
bfd_size_type count;
boolean get;
{
@@ -928,8 +929,8 @@ tekhex_write_object_contents (abfd)
static int
tekhex_sizeof_headers (abfd, exec)
- bfd *abfd;
- boolean exec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean exec ATTRIBUTE_UNUSED;
{
return 0;
@@ -951,7 +952,7 @@ tekhex_make_empty_symbol (abfd)
static void
tekhex_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
@@ -960,7 +961,7 @@ tekhex_get_symbol_info (ignore_abfd, symbol, ret)
static void
tekhex_print_symbol (ignore_abfd, filep, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR filep;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -1002,6 +1003,7 @@ tekhex_print_symbol (ignore_abfd, filep, symbol, how)
#define tekhex_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#define tekhex_bfd_relax_section bfd_generic_relax_section
+#define tekhex_bfd_gc_sections bfd_generic_gc_sections
#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define tekhex_bfd_final_link _bfd_generic_final_link
@@ -1060,5 +1062,7 @@ const bfd_target tekhex_vec =
BFD_JUMP_TABLE_LINK (tekhex),
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 02d6a25..aea6366 100644
--- a/contrib/binutils/bfd/trad-core.c
+++ b/contrib/binutils/bfd/trad-core.c
@@ -1,5 +1,6 @@
/* BFD back end for traditional Unix core files (U-area and raw sections)
- Copyright 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000
+ Free Software Foundation, Inc.
Written by John Gilmore of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include "libaout.h" /* BFD a.out internal data structures */
-#include <stdio.h>
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
@@ -106,22 +105,24 @@ trad_unix_core_file_p (abfd)
bfd_set_error (bfd_error_system_call);
return 0;
}
- if (NBPG * (UPAGES + u.u_dsize
+ if ((unsigned long) (NBPG * (UPAGES + u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- - u.u_tsize
+ - u.u_tsize
#endif
- + u.u_ssize) > statbuf.st_size)
+ + u.u_ssize))
+ > (unsigned long) statbuf.st_size)
{
- bfd_set_error (bfd_error_file_truncated);
+ bfd_set_error (bfd_error_wrong_format);
return 0;
}
#ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE
- if (NBPG * (UPAGES + u.u_dsize + u.u_ssize)
+ if ((unsigned long) (NBPG * (UPAGES + u.u_dsize + u.u_ssize)
#ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED
/* Some systems write the file too big. */
- + TRAD_CORE_EXTRA_SIZE_ALLOWED
+ + TRAD_CORE_EXTRA_SIZE_ALLOWED
#endif
- < statbuf.st_size)
+ )
+ < (unsigned long) statbuf.st_size)
{
/* The file is too big. Maybe it's not a core file
or we otherwise have bad values for u_dsize and u_ssize). */
@@ -201,7 +202,7 @@ trad_unix_core_file_p (abfd)
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. */
- core_regsec (abfd)->vma = 0 - (bfd_vma) u.u_ar0;
+ core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0;
core_datasec (abfd)->filepos = NBPG * UPAGES;
core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize
@@ -240,7 +241,7 @@ trad_unix_core_file_failing_command (abfd)
/* ARGSUSED */
int
trad_unix_core_file_failing_signal (ignore_abfd)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
{
#ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd);
@@ -252,7 +253,8 @@ trad_unix_core_file_failing_signal (ignore_abfd)
/* ARGSUSED */
boolean
trad_unix_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd, *exec_bfd;
+ bfd *core_bfd ATTRIBUTE_UNUSED;
+ bfd *exec_bfd ATTRIBUTE_UNUSED;
{
return true; /* FIXME, We have no way of telling at this point */
}
@@ -313,5 +315,7 @@ const bfd_target trad_core_vec =
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0 /* backend_data */
};
diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog
index 8c27a77..f2e5ee4 100644
--- a/contrib/binutils/binutils/ChangeLog
+++ b/contrib/binutils/binutils/ChangeLog
@@ -1,7 +1,2055 @@
-Mon Apr 27 13:45:26 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-10 Philippe De Muyter <phdm@macqel.be>
+
+ * readelf (dynamic_segment_mips_val): Call `sprintf', not
+ `strftime' since strftime is not available on all systems.
+ (process_mips_specific): Ditto.
+
+2000-04-06 Alan Modra <alan@linuxcare.com.au>
+
+ * addr2line.c: Update copyright.
+ * objcopy.1: Likewise, and title.
+ * strings.1: Likewise.
+
+ * version.c (print_version): Add 2000.
+
+ * rddbg.c (read_section_stabs_debugging_info): Don't use
+ bfd_size_type for strx to avoid printf problems if BFD64.
+
+ * bucomm.c: (report): Remove `static'.
+ Move inclusion of stdarg.h/vararg.h from here.
+ * bucomm.h: To here.
+ (CONST): Change all occurences to const.
+ (report): Declare it.
+ (bfd_fatal): Add ATTRIBUTE_NORETURN.
+ (fatal): Add ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN.
+ (non_fatal): Add ATTRIBUTE_PRINTF_1.
+
+ * ar.c (main): Use fatal or non_fatal instead of fprintf.
+ Correct a typo in an error message.
+ (do_quick_append): Use non_fatal instead of fprintf.
+ (move_members): Use fatal instead of fprintf, exit.
+ * coffdump.c (main): Same here.
+
+ * dlltool.c (display): Delete.
+ (warn): Delete.
+ (inform): Use `report' instead of `display'.
+ (rvaafter): Remove trailing \n from fatal error msg.
+ (rvabefore): Ditto.
+ (asm_prefix): Ditto.
+ (yyerror): Replace `warn' with `non_fatal', and remove \n.
+ (def_name): Likewise.
+ (run): Likewise.
+ (scan_all_symbols): Likewise.
+ (gen_lib_file): Likewise.
+ (def_library): Likewise. Remove extra program_name too.
+ (run): Remove \n from inform strings.
+ (scan_drectve_symbols): Likewise.
+ (add_excludes): Likewise.
+ (scan_open_obj_file): Likewise.
+ (gen_exp_file): Likewise.
+ (gen_lib_file): Likewise.
+ (process_duplicates): Likewise.
+
+ * Makefile.am (dllwrap_SOURCES): Add version.c.
+ * dllwrap.c (program_version): Delete.
+ (print_version): Delete.
+ (display): Always print trailing \n.
+ (warn): New.
+ (delete_temp_files): Use warn instead of fprintf. Use gettext.
+ (run): Here too.
+ (main): And here.
+ (usage): gettext'ify.
+ (long_options): Add missing initialisers.
+
+ * nlmconv.c (main): Use fatal/non_fatal instead of fprintf.
+ (select_output_format): Likewise.
+ (powerpc_mangle_relocs): Likewise.
+ (link_inputs): Likewise.
+
+ * nm.c (set_print_radix): Use fatal instead of fprintf, exit.
+ (set_output_format): Likewise.
+ (main): Use non_fatal instead of fprintf.
+ (display_rel_file): Likewise.
+
+ * objdump.c (slurp_symtab): Use non_fatal instead of fprintf.
+ (slurp_dynamic_symtab): Same here.
+ (disassemble_data): And here.
+ (read_section_stabs): And here.
+ (read_section_stabs): And here.
+ (dump_bfd): And here.
+ (main): And here.
+ (objdump_sprintf): Use fatal instead of fprintf, exit.
+ (disassemble_data): Same here.
+
+ * rdcoff.c (parse_coff_type): Use non_fatal instead of fprintf.
+ (parse_coff_struct_type): Same here.
+ (parse_coff_enum_type): And here.
+ (parse_coff): And here.
+ * rddbg.c (read_debugging_info): And here.
+ * size.c (main): And here.
+ * windres.c (format_from_name): And here.
+ * wrstabs.c (stab_write_symbol): Here too.
+ (write_stabs_in_sections_debugging_info): And here.
+ (stab_int_type): And here.
+ (stab_struct_field): And here.
+ (stab_typdef): And here.
+
+ * rescoff.c (read_coff_rsrc): Use fatal instead of fprintf, exit.
+ * srconv.c (main): Same here.
+ * strings.c (main): And here.
+ (integer_arg): And here.
+ * sysdump.c (main): And here.
+
+2000-04-05 Alan Modra <alan@linuxcare.com.au>
+
+ * binutils.texi: Remove optional `=' from long options that have
+ an `=' in the argument.
+ * objcopy.1: Here too. Remove extra space on discard-all.
+
+ * binutils.texi (objcopy): Mention --redefine-sym.
+ * objcopy.1: Here too.
+ * NEWS: And here.
+
+ * objcopy.c (parse_flags): Split off flag names from error message
+ gettext as they are not translated.
+ (copy_main): Similarly split off option name for --add-section,
+ --set-section-flags, --change-section-vma, --change-section-lma
+ error messages.
+ Some white space changes.
+
+ from Matthew Benjamin <matt@linuxbox.nu>
+ * objcopy.c (struct redefine_node): New.
+ (redefine_sym_list): New.
+ (redefine_list_append): New.
+ (lookup_sym_redefinition): New.
+ (OPTION_REDEFINE_SYM): New.
+ (copy_options): Add --redefine-sym option.
+ (copy_usage): Mention it.
+ (filter_symbols): Rename symbols on redefine_sym_list.
+ (copy_object): Call filter_symbols if redefine_sym_list != NULL.
+ (copy_main): Handle OPTION_REDEFINE_SYM.
+
+2000-04-04 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_symbol_table): Correctly read in symbol
+ versioning information.
+
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * po/binutils.pot: Regenerate.
+
+ * addr2line.c (usage): Restore translated part of bug string.
+ * 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.
+ * readelf.c (usage): Likewise.
+ * size.c (usage): Likewise.
+ * strings.c (usage): Likewise.
+ * windres.c (usage): Likewise.
+
+ * Makefile.am (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.
+
+2000-04-04 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (GENERATED_HFILES): Add rcparse.h
+ (arparse.h): Depend on arparse.c
+ (defparse.h, nlmheader.h, rcparse.h, sysinfo.h): Similarly.
+
+2000-04-03 H.J. Lu (hjl@gnu.org)
+
+ * size.c (usage): Use REPORT_BUGS_TO.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * bucomm.h: #include "bin-bugs.h"
+ * addr2line.c (usage): Use REPORT_BUGS_TO.
+ * ar.c (usage): Likewise.
+ * nlmconv.c (show_usage): Likewise.
+ * nm.c (usage): Likewise.
+ (OPTION_TARGET): Define.
+ (long_options): Use OPTION_TARGET rather than 200.
+ (main): Likewise.
+
+ * objcopy.c (copy_usage): Use REPORT_BUGS_TO.
+ (strip_usage): Likewise.
+ * objdump.c (usage): Likewise.
+ * readelf.c (usage): Likewise.
+ * strings.c (usage): Likewise.
+ * windres.c (usage): Likewise.
+
+2000-03-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * readelf.c: Include sys/types.h before sys/stat.h for ultrix.
+
+2000-03-27 Nick Clifton <nickc@cygnus.com>
+
+ * rddbg.c (read_section_stabs_debugging_info): Catch out of range
+ string offsets in corrupt stabs entries.
+
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
+
+ * readelf.c: Include elf/avr.h
+ (dump_relocations): Add EM_AVR case.
+
+2000-03-09 Tim Waugh <twaugh@redhat.com>
+
+ * strings.1: Correct '-bytes' to '--bytes'.
+
+2000-03-08 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (install-exec-local): Depend on
+ install-binPROGRAMS for parallel make.
+ * Makefile.in: Regenerated.
+
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
+
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * readelf.c (process_dynamic_segment): Add cast to make sure
+ argument to %* is int.
+
+2000-02-25 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (AC_SEARCH_LIBS): Pass m, not -lm.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add arm-wince, mips-pe and sh-pe targets.
+ * configure: Regenerate.
+
+ * dlltoolc.: Add support for sh-pe and mips-pe targets.
+ * rescoff.c: Add support for sh-pe and mips-pe targets.
+
+2000-02-23 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (get_osabi_name): Handle ELFOSABI_LINUX.
+
+2000-02-22 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (process_symbol_table): Remove use of ELF_ST_OTHER.
+
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
+
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * readelf.c (process_version_sections): Add casts to make sure
+ argument to %* is an int.
+ (process_mips_specific): Add casts to make printf arguments match
+ format.
+
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * objdump.c (dump_section_header): Change `opb' to unsigned.
+ (find_symbol_for_address): Same here.
+ (disassemble_data): And here. Change `addr_offset',
+ `stop_offset', `nextstop_offset' to unsigned long.
+ (dump_data): Change opb to unsigned.
+
+2000-02-18 Frank Ch. Eigler <fche@redhat.com>
+
+ * resrc.c: Remove unmatched #if for cygwin.
+
+2000-02-14 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * binutils.texi: Document the change of flavor name from atpcs-special
+ to special-atpcs to prevent name conflict in gdb.
+
+2000-02-08 Timothy Wall <twall@redhat.com>
+
+ * objdump.c (show_line): Fix bug preventing printing of the very
+ first line (line zero) of a file when interlisting source and
+ assembly. Added option to print entire context from start of file
+ when the first line from that file is encountered.
+
+2000-02-03 Timothy Wall <twall@redhat.com>
+
+ * 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 <tdel@windriver.com>
+
+ * 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.
+
+ * binutils.texi: Document new 'V' symclass flag for nm.
+
+2000-01-27 Nick Clifton <nickc@redhat.com>
+
+ * binutils.texi (objdump): Document new ARM specific
+ disassembler options.
+
+ * objdump.c (usage): Call disassembler_usage().
+
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * readelf.c (get_dynamic_flags): Return buff.
+ (process_dynamic_segment): Don't pass error strings to printf
+ as format arg.
+ (read_and_display_attr): Use lx and ld to print longs.
+ (process_corefile_note_segment): Cast bfd_vma to unsigned long
+ before printing.
+ Update copyright.
+
+2000-01-17 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_osabi_name): Recognise ELFOSABI_ARM.
+
+2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * debug.c (debug_name_type): Return DEBUG_TYPE_NULL rather than
+ false.
+ (debug_tag_type): Here too.
+ * ieee.c (ieee_builtin_type): And here.
+ * stabs.c (parse_stab_type, parse_stab_array_type): And here.
+
+2000-01-13 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_machine_name): Change EM_S370 to return "IBM
+ System/370".
+
+2000-01-11 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_dynamic_type): Remove DT_ENCODING.
+
+2000-01-10 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_note_type): Display NT_WIN32PSTATUS notes.
+
+2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * 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
+ open_input_stream instead of popen.
+ (read_rc_file): Likewise.
+
+ * binutils.texi: Document --use-temp-file, --no-use-temp-file
+ options.
+
+2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * dlltool.c (create_compat_implib): New variable.
+ (gen_exp_file): Use.
+ (make_one_lib_file): Use.
+ (long_options): Add --compat-implib option.
+ (usage): Handle.
+ (main): Handle.
+
+ * dllwrap.c (enum target_type): Rename MINGW32_TARGET to MINGW_TARGET.
+ (main): Use. Don't look for "32" in cygwin and mingw target names.
+
+2000-01-03 Nick Clifton <nickc@cygnus.com>
+
+ * binutils.texi: Document new, ARM specific disassembler
+ command line switch "-M force-thumb".
+
+1999-12-28 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * strings.c (main): Correct handling of numeric argument.
+
+1999-12-23 Andrew Haley <aph@cygnus.com>
+
+ * dlltool.c (mtable): mcore how_jtab_roff is 4 bytes into the
+ jtab; was 8.
+
+1999-12-17 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c (print_vma): Support native 64bit ELF systems.
+
+1999-12-09 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <fnf@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * objcopy.c (copy_usage): Reformat.
+ (strip_usage): Reformat.
+
+1999-11-21 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <fnf@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * dlltool.c (assemble_file): Remove spurious test of exp_name.
+
+1999-10-22 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * ar.c (normalize): Fix full_pathname code.
+
+1999-10-08 Ben Elliston <bje@cygnus.com>
+
+ * binutils.texi: Some rewording and clarifications.
+
+1999-09-15 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <drepper@cygnus.com>
+
+ * readelf.c (get_parisc_dynamic_type): Handle DT_HP_GST_* values.
+
+1999-09-02 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * dlltool.c (scan_drectve_symbols): Handle type tags in exported
+ symbols.
+ (scan_filtered_symbols): Likewise.
+
+1999-09-19 Ian Lance Taylor <ian@zembu.com>
+
+ * 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 <meissner@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * ar.c (main): Clear output_file if we don't change the archive.
+ (delete_members, replace_members): Likewise.
+
+1999-09-12 Donn Terry <donn@interix.com>
+
+ * 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 <ian@zembu.com>
+
+ * 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 <schwab@suse.de>
+
+ * binutils.texi: Add info dir entries for all programs described
+ here. Fix arguments of @var to not contain punctuation.
+
+1999-09-06 Donn Terry <donn@interix.com>
+
+ * 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 <sac@pobox.com>
+
+ * readelf.c: Include "elf/pj.h".
+ (dump_relocations): Handle EM_PJ.
+ (get_machine_name): Likewise.
+ (get_machine_flags): Likewise.
+
+1999-08-31 Scott Bambrough <scottb@netwinder.org>
+
+ * 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 <ian@zembu.com>
+
+ * binutils.texi (Bug Reporting): Clarify that large files should
+ not be sent to bug-gnu-utils.
+
+1999-08-28 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * 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 <wilson@cygnus.com>
+
+ * 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 <wilson@cygnus.com>
+
+ * readelf.c (display_debug_lines, case DW_LNS_const_add_pc): Multiply
+ adv by info.li_min_insn_length.
+
+1999-08-26 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * readelf.c (get_sparc64_dynamic_type): New function.
+ (get_dynamic_type): Use it.
+
+1999-08-26 Jim Wilson <wilson@cygnus.com>
+
+ * readelf.c (display_debug_lines, case default): Change second line
+ setting adv to use = not +=.
+
+1999-08-19 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c: Added more examples to the comment at the start.
+
+1999-08-18 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c (make_head): Only emit interworking directive if
+ necessary.
+
+Thu Jul 15 22:44:21 1999 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * readelf.c (process_abbrev_section): Handle standard-conforming
+ single zero at the end of the section.
+
+1999-08-09 Ian Lance Taylor <ian@zembu.com>
+
+ * 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 <ian@zembu.com>
+
+ * objdump.c (dump_section_header): Update for renaming of
+ SEC_SHORT to SEC_SMALL_DATA. Print SEC_SHARED flag.
+
+ From Eli Zaretskii <eliz@gnu.org>:
+ * 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 <donn@interix.com>
+
+ * 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 <ian@zembu.com>
+
+ From Mark Elbrecht:
+ * configure.bat: Remove; obsolete.
+
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * readelf.c (get_machine_flags): Print EF_SPARC_SUN_US3.
+
+1999-07-15 Ian Lance Taylor <ian@zembu.com>
+
+ * configure.in: Bump version number to 2.9.5.
+ * configure: Rebuild.
+
+1999-07-14 Richard Henderson <rth@cygnus.com>
+
+ * objdump.c (dump_section_header): Print SEC_SHORT.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <jj@ultra.linux.cz>
+
+ * 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 <ian@zembu.com>
+
+ * 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 <ian@zembu.com>
+
+ * Makefile.am (dlltool_SOURCES): Add dyn-string.c.
+ * Makefile.in: Rebuild.
+
+1999-06-23 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * 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 <ian@zembu.com>
+
+ Based on patches from Mumit Khan <khan@xraylith.wisc.EDU>:
+ * configure.in: Define EXECUTABLE_SUFFIX.
+ * dlltool.c: Include "dyn-string.h". Include <stdarg.h> 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 <stdio.h>, <errno.h>, <string.h>,
+ <stdlib.h>, or <unistd.h>. Include <sys/stat.h> and either
+ <stdarg.h> or <varargs.h>.
+ (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 <nickc@cygnus.com>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * deflex.l: Accept single-character symbol names.
+
+1999-06-16 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (get_symbol_type): Detect ARM symbols typed as Thumb
+ functions.
+
+1999-06-14 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <schwab@issan.cs.uni-dortmund.de>
+
+ * binutils.texi: Fix typos.
+
+1999-06-13 Ian Lance Taylor <ian@zembu.com>
+
+ * objdump.c (disassemble_bytes): If the disassembler returns an
+ error, print out anything it may have printed to the buffer. From
+ H.J. Lu <hjl@gnu.org>.
+
+ * defparse.y (explist): Remove separate expline to eliminate
+ shift/reduce conflict.
+
+ From Kai-Uwe Rommel <rommel@ars.de>:
+ * 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 <ian@zembu.com>
+
+ * 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 <hpa@transmeta.com>:
+ * 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 <schwab@issan.cs.uni-dortmund.de>
+
+ * 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 <schwab@issan.cs.uni-dortmund.de>
+
+ * windres.c (usage): Fix typo.
+
+1999-06-04 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c: Add support for 64bit ELF files.
+
+1999-06-03 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c (mcore_elf_gen_out_file): Use constants for temporary
+ file names.
+
+Wed Jun 2 12:34:36 1999 Richard Henderson <rth@cygnus.com>
+
+ * dlltool.c (gen_exp_file): Revert 19990411 change.
+
+Mon May 31 09:56:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * readelf.c (process_relocs): Determine type of reloc from
+ DT_PLTREL and from section type.
+
+1999-05-29 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c (dump_relocations): Fix typo.
+
+1999-05-28 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * readelf.c: Include "elf/i960.h".
+ (dump_relocations): Handle EM_960.
+
+Thu May 27 11:58:33 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * 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 <dj@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <dj@cygnus.com>
+
+ * 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 <dj@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * rename.c (smart_rename): Fix test of whether file exists.
+
+1999-05-06 Nick Clifton <nickc@cygnus.com>
+
+ * objdump.c (disassemble_data): Set display_endian based on target
+ endianism.
+
+1999-05-05 Catherine Moore <clm@cygnus.com>
+
+ * 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 <clm@cygnus.com>
+
+ * readelf.c (get_machine_flags): Check for EF_CPU32.
+ (get_data_encoding): Fix typo.
+
+1999-04-26 Tom Tromey <tromey@cygnus.com>
+
+ * aclocal.m4, configure: Updated for new version of libtool.
+
+1999-04-18 Ian Lance Taylor <ian@zembu.com>
+
+ * 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 <clm@cygnus.com>
+
+ * dlltool.c (make_one_lib_file): Mark thumb functions as
+ C_THUMBEXTFUNC.
+
+1999-04-11 Richard Henderson <rth@cygnus.com>
+
+ * bucomm.h (environ): Declare it, if needed.
+ (alloca) [C_ALLOCA]: Don't use gcc's builtin or <alloca.h>.
+ * 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 <manson@charmed.cygnus.com>.
+
+1999-04-08 Tom Tromey <tromey@cygnus.com>
+
+ * binutils.texi (c++filt): Updated for -j/--java, and hp/edg
+ formats.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * 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.
- * configure.in: Set version number to 2.9.1.
+1999-04-05 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (decode_location_expression): Fix DW_OP_const8{s|u}
+ decodes.
+
+1999-04-04 Ian Lance Taylor <ian@zembu.com>
+
+ * 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 <utime.h>.
+ (extract_file): Call set_times rather than utime.
+ (write_archive): Call smart_rename rather than unlink and rename.
+ * objcopy.c: Don't include <utime.h>.
+ (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
+ <time.h>. Don't include <stdio.h> and <errno.h>.
+ (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 <ian@zembu.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <jason@yorick.cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * 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 <drepper@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <scox@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c: Fix compile time warings.
+
+1999-02-17 DJ Delorie <dj@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <clm@cygnus.com>
+
+ * readelf.c (dump_relocations): Handle EM_ARM as REL.
+
+1999-01-29 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c (process_symbol_table): Do not produce a histogram of
+ bucket chains if none were found.
+
+1999-01-27 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c (process_section_headers): Omit trailing space at end
+ of section header contents line.
+
+Wed Dec 16 17:20:05 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * aclocal.m4: Regenerate.
+
+Mon Dec 14 12:55:36 1998 Jim Wilson <wilson@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * objdump.1: Fix typo (-d to -D). From Nokubi Hirotaka
+ <hnokubi@yyy.or.jp>.
+
+Sun Dec 6 13:28:09 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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
+ <iss@mail.wbs.or.jp>.
+
+1998-12-03 Ulrich Drepper <drepper@cygnus.com>
+
+ * readelf.c (process_dynamic_segment): Improve output format for
+ various DT_* values.
+
+1998-12-02 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * ar.c (extract_file): Add some paranoia checks for negatively
+ sized files.
+
+Tue Nov 24 09:39:24 1998 Nick Clifton <nickc@cygnus.com>
+
+ * stabs.c (DIR_SEPARATOR): Define as '\\' if WIN32 is defined.
+
+Tue Nov 17 10:25:26 1998 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.in: Regenerate.
+
+Mon Nov 16 19:17:23 1998 Dave Brolley <brolley@cygnus.com>
+
+ * po/binutils.pot: Regenerate.
+
+Mon Nov 16 10:18:53 1998 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Regernated dependencies.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+Sat Nov 14 14:50:56 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * debug.c (debug_name_type): Correct return type from false to
+ DEBUG_TYPE_NULL.
+
+Sat Nov 14 14:48:21 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * objdump.c (disassemble_data): Skip over relocs below start
+ address.
+
+Tue Nov 10 15:31:52 1998 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Add dependency of readelf.c on elf/fr30.h
+ * Makefile.in: Regenerate.
+
+Wed Nov 4 16:25:55 1998 Nick Clifton <nickc@cygnus.com>
+
+ * readelf.c: Add support for the FR30.
+
+Mon Nov 2 14:59:33 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: detect cygwin* instead of cygwin32*
+ * configure: regenerate
+
+Fri Oct 30 15:14:49 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * dllwrap.c: change all references to cygwin32_ to cygwin_,
+ change Cygwin target def to CYGWIN.
+
+Wed Oct 28 10:31:19 1998 Nick Clifton <nickc@cygnus.com>
+
+ * objdump.c (disassemble_data): Replace 'unsigned long' with
+ 'bfd_vma'.
+
+Tue Oct 27 14:39:00 1998 Nick Clifton <nickc@cygnus.com>
+
+ * objdump.c (disassemble_bytes): Applied this patch from Philip
+ Blundell <pb@nexus.co.uk>: Make address variables unsigned to
+ avoid problems when disassembling code at high-bit-set addresses.
+
+Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * dlltool.c (scan_all_symbols): Fix patch error.
+
+Fri Oct 16 22:56:20 1998 Felix Lee <flee@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <noer@cygnus.com>
+
+ * 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 <noer@cygnus.com>
+
+ From Mumit Khan <khan@xraylith.wisc.edu>:
+ * dlltool.c (scan_all_symbols): Don't re-export symbols exported
+ by other DLLs.
+
+Thu Oct 8 15:33:08 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * Makefile.am (BUILD_DLLWRAP): Add.
+ (BUILD_DLLWRAP, DLLWRAP_PROG): Add.
+ (bin_PROGRAMS): Add dllwrap.
+ * Makefile.in: regenerate with automake
+
+ From Mumit Khan <khan@xraylith.wisc.edu>:
+ * 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 <noer@cygnus.com>
+
+ * Makefile.am (windres_SOURCES): Add resres.c.
+ (windres_OBJECTS): Add resres.o.
+ * Makefile.in: regenerate with automake
+
+ From Anders Norlander <anorland@hem2.passagen.se>.
+ * 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 <ian@cygnus.com>
+
+ From Nokubi Hirotaka <hnokubi@yyy.or.jp>:
+ * 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 <ian@cygnus.com>
+
+ * rcparse.y (memflags_move): Correct recursion.
+
+1998-09-10 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c (process_section_contents): Do not try to dump empty
+ sections.
+
+Sat Sep 5 19:17:10 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * dlltool.c (scan_all_symbols): Don't re-export symbols exported
+ by other DLLs.
+
+1998-09-02 14:50 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <drepper@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <khan@xraylith.wisc.edu>
+
+ * 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 <drepper@cygnus.com>
+
+ * 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 <clm@cygnus.com>
+
+ * readelf.c (dump_relocations): EM_ARM uses rela relocs.
+
+1998-07-30 16:25 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <jeffh@cygnus.com>
+
+ * readelf.c (get_dynamic_type): Remove empty default from switch
+ statement.
+
+Fri Jul 24 16:28:12 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (install-exec-local): Don't remove the file before
+ checking whether $(bindir) == $(tooldir)/bin. From Maciej
+ W. Rozycki <macro@ds2.pg.gda.pl>.
+ * Makefile.in: Rebuild.
+
+Fri Jul 24 09:38:59 1998 Nick Clifton <nickc@cygnus.com>
+
+ * objcopy.c: Removed spurious inclusion of elf/internal.h and
+ elf-bfd.h.
+
+1998-07-22 Ulrich Drepper <drepper@cygnus.com>
+
+ * readelf.c: Consistantly use elf_ prefix for *_reloc_type
+ functions.
+
+Wed Jul 22 16:29:12 1998 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <drepper@cygnus.com>
+
+ * 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 <drepper@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c (dump_relocations): Display number of unrecognised
+ relocations.
+
+1998-07-21 13:13 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <vmakarov@cygnus.com>
+
+ * 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 <schwab@issan.informatik.uni-dortmund.de>
+
+ * 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 <drepper@cygnus.com>
+
+ * readelf.c (process_symbol_table): Fix little alignment problem
+ in printed table header.
+
+1998-07-20 07:14 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <drepper@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c: Switch prototypes from unsigned short to unsigned
+ int.
+
+Fri Jul 10 16:17:50 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ From Christian Holland <CHolland@de.lucent.com>:
+ * 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <Brion.Stone@attws.com>.
+
+Thu Jul 2 14:01:34 1998 Klaus Kaempf <kkaempf@rmi.de>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * objcopy.c: Minor formatting improvements.
+ * readelf.c: Minor output formatting improvement.
+
+Wed Jul 1 14:23:48 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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
+ <Andrew.Kozin@p14.f960.n5020.z2.fidonet.org>:
+ * 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 <nickc@cygnus.com>
+
+ * 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 <vmakarov@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <mrs@wrs.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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
+ <schwab@issan.informatik.uni-dortmund.de> 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 <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * readelf.c (usage): Write to stdout, not stderr.
+
+Fri Jun 12 13:33:51 1998 Tom Tromey <tromey@cygnus.com>
+
+ * 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 <meissner@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * objcopy.c (copy_usage): Add missing \n\ from help description.
+
+Wed Jun 3 19:31:33 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ From Yuli Barcohen <yuli.barcohen@telrad.co.il>:
+ * debug.c (debug_type_samep): Avoid endless loops comparing
+ function and method parameter types.
+
+Fri May 22 14:02:42 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * dlltool.c (dump_iat): Comment out; not used.
+ (display): Rename from tell. Change all callers.
+
+Thu May 14 14:00:56 1998 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * ar.c (usage): Extend information provided about command line
+ options.
+
+Wed May 6 15:28:51 1998 Klaus Kaempf <kkaempf@progis.de>
+
+ * makefile.vms: Run dec c with /nodebug. Pass CC value when
+ calling make.
+
+Tue May 5 15:19:00 1998 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <noer@cygnus.com>
+
+ * 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 <tromey@cygnus.com>
+
+ * 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 <locale.h> if HAVE_LOCALE_H.
+ (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
+
+Tue Apr 28 10:33:07 1998 Bill Moyer <ttk@cygnus.com>
+
+ 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 <ian@cygnus.com>
+
+ * configure.in: Change version number to 2.9.4
+ * configure: Rebuild.
+
+Wed Apr 22 16:00:35 1998 Tom Tromey <tromey@cygnus.com>
+
+ * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
+
+Wed Apr 22 00:33:56 1998 Tom Tromey <tromey@scribbles.cygnus.com>
+
+ * 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 <tromey@scribbles.cygnus.com>
+
+ * 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 <utx@k332.feld.cvut.cz>
+
+ * 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 <ian@cygnus.com>
@@ -16,11 +2064,11 @@ Mon Apr 6 16:24:35 1998 Ian Lance Taylor <ian@cygnus.com>
(bin_PROGRAMS): Likewise.
* Makefile.in: Rebuild.
-Fri Apr 3 13:41:05 1998 Ian Lance Taylor <ian@cygnus.com>
+Fri Apr 3 14:48:42 1998 Ian Lance Taylor <ian@cygnus.com>
- * Makefile.am (mostlyclean-local): New target.
- (MOSTLYCLEANFILES): Add binutils.log, binutils.sum, and abcdefg*.
- (DISTCLEANFILES): Add site.exp and site.bak
+ * 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 <ian@cygnus.com>
@@ -41,15 +2089,17 @@ Tue Mar 31 18:44:13 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (dep.sed): Substitute for @OBJDIR@.
* Makefile.in: Rebuild.
-Mon Mar 30 16:13:07 1998 Ian Lance Taylor <ian@cygnus.com>
+Mon Mar 30 12:47:18 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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.
- * configure.in: Set version number to 2.9.
- * configure: Rebuild.
-
Sat Mar 28 17:39:27 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (MOSTLYCLEANFILES): Define.
@@ -123,6 +2173,10 @@ Tue Feb 17 18:40:55 1998 Richard Henderson <rth@cygnus.com>
Tue Feb 17 20:34:11 1998 Ian Lance Taylor <ian@cygnus.com>
+ * 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 <ian@cygnus.com>
@@ -1180,7 +3234,7 @@ 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.
+ * configure.in (AC_PREREQ): Autoconf 2.5 or higher.
Mon Jun 24 11:59:13 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -2061,7 +4115,7 @@ Thu Nov 30 20:26:02 1995 Kim Knuttila <krk@cygnus.com>
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
+ (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 <dje@canuck.cygnus.com>
@@ -2429,7 +4483,7 @@ Tue Sep 5 20:22:42 1995 Ian Lance Taylor <ian@cygnus.com>
* sysdump.c: Include "bfd.h" and "bucomm.h". Don't include
"sysdep.h" or <stdlib.h>.
(dump_symbol_info): Rename from symbol_info. Change all callers.
-
+
Mon Sep 4 14:30:00 1995 Ian Lance Taylor <ian@cygnus.com>
* configure.in (host_makefile_frag): Don't set. Substitute for
@@ -2553,7 +4607,7 @@ Tue Jul 25 11:21:53 1995 Ian Lance Taylor <ian@cygnus.com>
Mon Jul 24 13:52:28 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* 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
+ (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
@@ -2641,7 +4695,7 @@ Wed Jul 12 10:40:23 1995 H.J. Lu <hjl@nynexst.com>
Tue Jul 11 13:10:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
- * sysdump.c: re-indented file.
+ * 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.
@@ -2705,7 +4759,7 @@ Tue Jul 4 14:48:42 1995 Ian Lance Taylor <ian@cygnus.com>
Mon Jul 3 14:16:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
* configure.in (i386-*-win32): New configuration.
- * dlltool.c (killat, xlate, usage, long_options, main):
+ * dlltool.c (killat, xlate, usage, long_options, main):
Understand and cope with -k option.
Sat Jul 1 12:25:15 1995 Fred Fish <fnf@cygnus.com>
@@ -3346,8 +5400,8 @@ Fri Jul 22 16:48:34 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
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.
+ * 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.
@@ -3832,7 +5886,7 @@ Sun Feb 20 18:47:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
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,
+ * 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)
@@ -3863,7 +5917,7 @@ 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
+ (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.
@@ -3877,7 +5931,7 @@ Wed Feb 2 13:42:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
bfd_nonfatal instead of hardcoded error message if nothing matches.
* arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of
- abfd->filename.
+ abfd->filename.
* nm.c (display_archive): New function, from code in display_file.
(display_rel_file): Renamed from do_one_rel_file.
@@ -3899,7 +5953,7 @@ Wed Feb 2 13:42:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
* objdump.c (disassemble_data): Move some variable decls closer to
their use. Add some comments. Replace a nested block with a
- return.
+ return.
Mon Jan 31 18:50:41 1994 Stan Shebs (shebs@andros.cygnus.com)
@@ -3924,7 +5978,7 @@ Wed Jan 26 13:13:18 1994 David J. Mackenzie (djm@thepub.cygnus.com)
(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.
+ parameter.
(objdump_print_address): Fix backward test.
Tue Jan 25 19:40:54 1994 Stan Shebs (shebs@andros.cygnus.com)
@@ -3941,7 +5995,7 @@ Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com)
(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.
+ bfd_target_vector.
* binutils.texi (objdump): Note some limitations of -h section
address printing.
@@ -3969,7 +6023,7 @@ 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): 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.
@@ -4132,7 +6186,7 @@ Thu Dec 2 16:00:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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.
+ (alpha_mangle_relocs): New function.
Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
@@ -4274,7 +6328,7 @@ Mon Sep 20 19:28:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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.
+ casts to avoid warnings.
Fri Sep 10 11:00:40 1993 Stan Shebs (shebs@rtl.cygnus.com)
@@ -4499,7 +6553,7 @@ Fri Jun 18 14:29:12 1993 Per Bothner (bothner@deneb.cygnus.com)
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)
@@ -4641,19 +6695,19 @@ Wed Apr 28 23:41:32 1993 David J. Mackenzie (djm@rtl.cygnus.com)
* objdump.c (usage): Add missing options.
(display_file): Print program name before calling
- bdf_perror.
+ bdf_perror.
* nm.c (usage): Add missing options.
(main): Clean up option parser.
(display_file): Print program name before calling
- bdf_perror.
+ 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.
+ bdf_perror.
Thu Apr 22 15:01:35 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -5207,7 +7261,7 @@ Sat Dec 7 17:09:37 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* objdump.c: lint
* sparc-pinsn.c: include objdump.h
-
+
Fri Dec 6 23:02:14 1991 K. Richard Pixley (rich at rtl.cygnus.com)
@@ -5314,7 +7368,7 @@ 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'.
+ * TODO: Add note on 'nm -a'.
* version.c: Update version number to 1.90.
* Makefile.in: Fix making of documentation for dist.
@@ -5404,7 +7458,8 @@ Mon Sep 30 12:30:39 1991 Per Bothner (bothner at cygnus.com)
Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com)
- *objdump.c *nm.c *copy.c :hanged some types to work with 64 bit object files
+ *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
diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am
index 169146d..4c509bf 100644
--- a/contrib/binutils/binutils/Makefile.am
+++ b/contrib/binutils/binutils/Makefile.am
@@ -1,7 +1,12 @@
## Process this file with automake to generate Makefile.in
+## FIXME: Work around apparent bug in automake.
+INTLLIBS = @INTLLIBS@
+
AUTOMAKE_OPTIONS = cygnus dejagnu
+SUBDIRS = po
+
tooldir = $(exec_prefix)/$(target_alias)
## These aren't set by automake, because they appear in
@@ -10,9 +15,9 @@ tooldir = $(exec_prefix)/$(target_alias)
CC_FOR_BUILD = @CC_FOR_BUILD@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
# these two are almost the same program
AR_PROG=ar
@@ -24,6 +29,8 @@ STRIP_PROG=strip-new
STRINGS_PROG=strings
+READELF_PROG=readelf
+
# These should all be the same program too.
SIZE_PROG=size
NM_PROG=nm-new
@@ -31,27 +38,29 @@ OBJDUMP_PROG=objdump
# This is the demangler, as a standalone program.
# Note: This one is used as the installed name too, unlike the above.
-DEMANGLER_PROG=c++filt
+DEMANGLER_PROG=cxxfilt
ADDR2LINE_PROG=addr2line
NLMCONV_PROG=nlmconv
DLLTOOL_PROG=dlltool
WINDRES_PROG=windres
+DLLWRAP_PROG=dllwrap
-SRCONV_PROG=srconv sysdump coffdump
+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_PROG).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)
+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@
-bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG)
+bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
-## We need a special rule to install the programs which are built with -new
-noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG)
+## We need a special rule to install the programs which are built with
+## -new, and to rename cxxfilt to c++filt.
+noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
-EXTRA_PROGRAMS = $(NLMCONV_PROG) $(SRCONV_PROG) $(DLLTOOL_PROG) $(WINDRES_PROG)
+EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
# Stuff that goes in tooldir/ if appropriate
TOOL_PROGS = nm-new strip-new ar ranlib dlltool
@@ -60,21 +69,22 @@ BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
-DEP = mkdep
+MKDEP = gcc -MM
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@
+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
+ windres.h winduni.h dyn-string.h
-GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.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
+ windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
+ resres.c dyn-string.c dllwrap.c rename.c
GENERATED_CFILES = \
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
@@ -92,6 +102,11 @@ OPCODES = ../opcodes/libopcodes.la
LIBIBERTY = ../libiberty/libiberty.a
+POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
EXPECT = `if [ -f $$r/../expect/expect ] ; then \
echo $$r/../expect/expect ; \
else echo expect ; fi`
@@ -135,20 +150,23 @@ installcheck:
info_TEXINFOS = binutils.texi
-LDADD = $(BFDLIB) $(LIBIBERTY)
+LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
size_SOURCES = size.c $(BULIBS)
-objcopy_SOURCES = objcopy.c not-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS)
+objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
strings_SOURCES = strings.c $(BULIBS)
-strip_new_SOURCES = objcopy.c is-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS)
+readelf_SOURCES = readelf.c version.c
+readelf_LDADD = $(INTLLIBS) $(LIBIBERTY)
+
+strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
nm_new_SOURCES = nm.c $(BULIBS)
objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
-objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY)
+objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
underscore.c: stamp-under ; @true
@@ -161,18 +179,18 @@ stamp-under: Makefile
cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
$(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
-c__filt_SOURCES =
-c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY)
+cxxfilt_SOURCES =
+cxxfilt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS)
-ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c $(BULIBS)
-ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c $(BULIBS)
+ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
-ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c $(BULIBS)
-ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c $(BULIBS)
+ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
addr2line_SOURCES = addr2line.c $(BULIBS)
-# The following is commented out for the convertion to automake.
+# The following is commented out for the conversion to automake.
# This rule creates a single binary that switches between ar and ranlib
# by looking at argv[0]. Use this kludge to save some disk space.
# However, you have to install things by hand.
@@ -215,14 +233,24 @@ sysinfo.o: sysinfo.c
$(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
fi
+# We need these for parallel make.
+arparse.h: arparse.c
+defparse.h: defparse.c
+nlmheader.h: nlmheader.c
+rcparse.h: rcparse.c
+sysinfo.h: sysinfo.c
+
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
-dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
-dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
+dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
dlltool.o:dlltool.c
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
+rescoff.o:rescoff.c
+ $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
+
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
sysdump_SOURCES = sysdump.c $(BULIBS)
@@ -236,8 +264,12 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
- $(BULIBS)
-windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+ winduni.c resres.c $(BULIBS)
+windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+
+dllwrap_SOURCES = dllwrap.c dyn-string.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
@@ -248,18 +280,18 @@ DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
site.exp site.bak
# Targets to rebuild dependencies in this Makefile.
-# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
-.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- sed -f dep.sed <.dep1 >.dep
-
-# This rule really wants a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(GENERATED_CFILES)
- rm -f .dep2
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- $(DEP) -f .dep2 $(INCLUDES) $?
- $(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
+# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
+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' >> $@
+
+DEP1: $(CFILES) $(GENERATED_CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
objdir=`pwd`; \
@@ -269,19 +301,19 @@ dep.sed: dep-in.sed config.status
-e 's!@SRCDIR@!$(srcdir)!' \
-e "s!@OBJDIR@!$${objdir}!"
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
@@ -296,33 +328,35 @@ binutils.dvi: $(srcdir)/binutils.texi config.texi
binutils.info: $(srcdir)/binutils.texi config.texi
-$(DEMANGLER_PROG).1: cxxfilt.man Makefile
- sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
- > $(DEMANGLER_PROG).1
+MAINTAINERCLEANFILES = config.texi
-MOSTLYCLEANFILES = sysinfo $(DEMANGLER_PROG).1 binutils.log binutils.sum \
+$(DEMANGLER_NAME).1: cxxfilt.man Makefile
+ sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' < $(srcdir)/cxxfilt.man \
+ > $(DEMANGLER_NAME).1
+
+MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \
abcdefgh*
mostlyclean-local:
-rm -rf tmpdir
-CLEANFILES = dep.sed .dep .dep1
+CLEANFILES = dep.sed DEP DEP1 DEP2
.PHONY: install-exec-local
-install-exec-local: $(bin_PROGRAMS) $(noinst_PROGRAMS)
+install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
$(mkinstalldirs) $(tooldir)/bin
for i in $(TOOL_PROGS); do \
if [ -f $$i$(EXEEXT) ]; then \
j=`echo $$i | sed -e 's/-new//'`; \
- rm -f $(tooldir)/bin/$$j$(EXEEXT); \
k=`echo $$j | sed '$(transform)'`; \
if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
+ rm -f $(tooldir)/bin/$$j$(EXEEXT); \
ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \
fi; \
@@ -334,116 +368,149 @@ install-exec-local: $(bin_PROGRAMS) $(noinst_PROGRAMS)
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.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.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h
+ arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h
-coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
+ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h
-coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- coffgrok.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 \
+ $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h coffgrok.h
debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/demangle.h dlltool.h
+ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \
+ dlltool.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.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)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h
is-ranlib.o: is-ranlib.c
is-strip.o: is-strip.c
maybe-ranlib.o: maybe-ranlib.c
maybe-strip.o: maybe-strip.c
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmconv.h
+ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.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)/fopen-same.h $(INCDIR)/getopt.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
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)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/libiberty.h budbg.h
+ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h budbg.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h
rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/coff/internal.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
- budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/internal.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
+ debug.h budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
-srconv.o: srconv.c bucomm.h config.h $(INCDIR)/fopen-same.h \
- sysroff.h coffgrok.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h sysroff.c
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h
+srconv.o: srconv.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sysroff.c
stabs.o: stabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def
strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h
sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h sysroff.h \
- sysroff.c
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ sysroff.h sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h
+ $(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/obstack.h \
+ windres.h winduni.h
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h
+winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ winduni.h
+readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/v850.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/mips.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/m68k.h \
+ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/d10v.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
+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
+dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \
+ dyn-string.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 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
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ arsup.h
arlex.o: arlex.c $(INCDIR)/libiberty.h arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
syslex.o: syslex.c sysinfo.h
defparse.o: defparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h dlltool.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ dlltool.h
deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
defparse.h dlltool.h
nlmheader.o: nlmheader.c ../bfd/bfd.h bucomm.h config.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- nlmconv.h
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h nlmconv.h
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h rcparse.h
-
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h rcparse.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/binutils/Makefile.in b/contrib/binutils/binutils/Makefile.in
index 34475def..8172759 100644
--- a/contrib/binutils/binutils/Makefile.in
+++ b/contrib/binutils/binutils/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -62,102 +64,136 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
+AS = @AS@
BUILD_DLLTOOL = @BUILD_DLLTOOL@
+BUILD_DLLWRAP = @BUILD_DLLWRAP@
+BUILD_MISC = @BUILD_MISC@
BUILD_NLMCONV = @BUILD_NLMCONV@
BUILD_SRCONV = @BUILD_SRCONV@
BUILD_WINDRES = @BUILD_WINDRES@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DEMANGLER_NAME = @DEMANGLER_NAME@
+DLLTOOL = @DLLTOOL@
DLLTOOL_DEFS = @DLLTOOL_DEFS@
EXEEXT = @EXEEXT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
-LD = @LD@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
NLMCONV_DEFS = @NLMCONV_DEFS@
-NM = @NM@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
UNDERSCORE = @UNDERSCORE@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+l = @l@
+
+INTLLIBS = @INTLLIBS@
AUTOMAKE_OPTIONS = cygnus dejagnu
+SUBDIRS = po
+
tooldir = $(exec_prefix)/$(target_alias)
CC_FOR_BUILD = @CC_FOR_BUILD@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
# these two are almost the same program
-AR_PROG=ar
-RANLIB_PROG=ranlib
+AR_PROG = ar
+RANLIB_PROG = ranlib
# objcopy and strip should be the same program
-OBJCOPY_PROG=objcopy
-STRIP_PROG=strip-new
+OBJCOPY_PROG = objcopy
+STRIP_PROG = strip-new
-STRINGS_PROG=strings
+STRINGS_PROG = strings
+
+READELF_PROG = readelf
# These should all be the same program too.
-SIZE_PROG=size
-NM_PROG=nm-new
-OBJDUMP_PROG=objdump
+SIZE_PROG = size
+NM_PROG = nm-new
+OBJDUMP_PROG = objdump
# This is the demangler, as a standalone program.
# Note: This one is used as the installed name too, unlike the above.
-DEMANGLER_PROG=c++filt
+DEMANGLER_PROG = cxxfilt
-ADDR2LINE_PROG=addr2line
+ADDR2LINE_PROG = addr2line
-NLMCONV_PROG=nlmconv
-DLLTOOL_PROG=dlltool
-WINDRES_PROG=windres
+NLMCONV_PROG = nlmconv
+DLLTOOL_PROG = dlltool
+WINDRES_PROG = windres
+DLLWRAP_PROG = dllwrap
-SRCONV_PROG=srconv sysdump coffdump
+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_PROG).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)
+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@
-bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG)
+bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
-noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG)
+noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
-EXTRA_PROGRAMS = $(NLMCONV_PROG) $(SRCONV_PROG) $(DLLTOOL_PROG) $(WINDRES_PROG)
+EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
# Stuff that goes in tooldir/ if appropriate
TOOL_PROGS = nm-new strip-new ar ranlib dlltool
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
-INCDIR = $(BASEDIR)/include
+INCDIR = $(BASEDIR)/include
-DEP = mkdep
+MKDEP = gcc -MM
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@
+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
+ windres.h winduni.h dyn-string.h
+
-GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.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
+ windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
+ resres.c dyn-string.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
+
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
@@ -170,13 +206,17 @@ OPCODES = ../opcodes/libopcodes.la
LIBIBERTY = ../libiberty/libiberty.a
+POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
+
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`
+
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
@@ -192,38 +232,42 @@ CC_FOR_TARGET = ` \
fi; \
fi`
+
info_TEXINFOS = binutils.texi
-LDADD = $(BFDLIB) $(LIBIBERTY)
+LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
size_SOURCES = size.c $(BULIBS)
-objcopy_SOURCES = objcopy.c not-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS)
+objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
strings_SOURCES = strings.c $(BULIBS)
-strip_new_SOURCES = objcopy.c is-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS)
+readelf_SOURCES = readelf.c version.c
+readelf_LDADD = $(INTLLIBS) $(LIBIBERTY)
+
+strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
nm_new_SOURCES = nm.c $(BULIBS)
objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
-objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY)
+objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-c__filt_SOURCES =
-c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY)
+cxxfilt_SOURCES =
+cxxfilt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY) $(INTLLIBS)
-ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c $(BULIBS)
-ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c $(BULIBS)
+ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
-ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c $(BULIBS)
-ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c $(BULIBS)
+ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
addr2line_SOURCES = addr2line.c $(BULIBS)
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
-dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
-dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
+dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
@@ -232,28 +276,37 @@ 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 \
- $(BULIBS)
-windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
+ winduni.c resres.c $(BULIBS)
+
+windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+
+dllwrap_SOURCES = dllwrap.c dyn-string.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
+
DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
site.exp site.bak
-MOSTLYCLEANFILES = sysinfo $(DEMANGLER_PROG).1 binutils.log binutils.sum \
+
+MAINTAINERCLEANFILES = config.texi
+
+MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \
abcdefgh*
-CLEANFILES = dep.sed .dep .dep1
+
+CLEANFILES = dep.sed DEP DEP1 DEP2
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = size$(EXEEXT) objdump$(EXEEXT) ar$(EXEEXT) \
-strings$(EXEEXT) ranlib$(EXEEXT) c++filt$(EXEEXT) objcopy$(EXEEXT) \
-@BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ \
-addr2line$(EXEEXT)
-noinst_PROGRAMS = nm-new$(EXEEXT) strip-new$(EXEEXT)
+strings$(EXEEXT) ranlib$(EXEEXT) objcopy$(EXEEXT) @BUILD_NLMCONV@ \
+@BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ addr2line$(EXEEXT) \
+readelf$(EXEEXT) @BUILD_DLLWRAP@ @BUILD_MISC@
+noinst_PROGRAMS = nm-new$(EXEEXT) strip-new$(EXEEXT) cxxfilt$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
@@ -277,14 +330,17 @@ coffdump_OBJECTS = coffdump.o coffgrok.o bucomm.o version.o filemode.o
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.o defparse.o deflex.o dyn-string.o bucomm.o \
+version.o filemode.o
dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
dlltool_LDFLAGS =
windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \
-rclex.o bucomm.o version.o filemode.o
+rclex.o winduni.o resres.o bucomm.o version.o filemode.o
windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
windres_LDFLAGS =
+dllwrap_OBJECTS = dllwrap.o dyn-string.o version.o
+dllwrap_DEPENDENCIES = ../libiberty/libiberty.a
+dllwrap_LDFLAGS =
size_OBJECTS = size.o bucomm.o version.o filemode.o
size_LDADD = $(LDADD)
size_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
@@ -294,24 +350,20 @@ rdcoff.o bucomm.o version.o filemode.o
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 bucomm.o \
-version.o filemode.o
+ar_OBJECTS = arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o \
+bucomm.o version.o filemode.o
ar_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
ar_LDFLAGS =
strings_OBJECTS = strings.o bucomm.o version.o filemode.o
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 bucomm.o \
-version.o filemode.o
+ranlib_OBJECTS = ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o \
+bucomm.o version.o filemode.o
ranlib_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
ranlib_LDFLAGS =
-c__filt_OBJECTS =
-c__filt_DEPENDENCIES = cplus-dem.o underscore.o \
-../libiberty/libiberty.a
-c__filt_LDFLAGS =
-objcopy_OBJECTS = objcopy.o not-strip.o rddbg.o debug.o stabs.o ieee.o \
-rdcoff.o wrstabs.o bucomm.o version.o filemode.o
+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_LDADD = $(LDADD)
objcopy_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
objcopy_LDFLAGS =
@@ -319,74 +371,87 @@ addr2line_OBJECTS = addr2line.o bucomm.o version.o filemode.o
addr2line_LDADD = $(LDADD)
addr2line_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
addr2line_LDFLAGS =
+readelf_OBJECTS = readelf.o version.o
+readelf_DEPENDENCIES = ../libiberty/libiberty.a
+readelf_LDFLAGS =
nm_new_OBJECTS = nm.o bucomm.o version.o filemode.o
nm_new_LDADD = $(LDADD)
nm_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
nm_new_LDFLAGS =
-strip_new_OBJECTS = objcopy.o is-strip.o rddbg.o debug.o stabs.o ieee.o \
-rdcoff.o wrstabs.o bucomm.o version.o filemode.o
+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_LDADD = $(LDADD)
strip_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
strip_new_LDFLAGS =
+cxxfilt_OBJECTS =
+cxxfilt_DEPENDENCIES = cplus-dem.o underscore.o \
+../libiberty/libiberty.a
+cxxfilt_LDFLAGS =
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LEXLIB = @LEXLIB@
YLWRAP = $(top_srcdir)/../ylwrap
CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
INFO_DEPS = binutils.info
DVIS = binutils.dvi
TEXINFOS = binutils.texi
-MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_PROG).1
-
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
NROFF = nroff
-DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS acconfig.h \
-acinclude.m4 aclocal.m4 arlex.c arparse.c config.in configure \
-configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c \
-stamp-h.in
+DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
+NEWS acinclude.m4 aclocal.m4 arlex.c arparse.c config.in configure \
+configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
-SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(c__filt_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES)
-OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(c__filt_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS)
-
-default: all
+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 .y
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .S .c .dvi .info .l .lo .o .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
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-config.status: $(srcdir)/configure
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
- @:
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
$(SHELL) ./config.status
- @echo timestamp > stamp-h
-$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
@@ -408,18 +473,18 @@ maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(bindir)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
- $(NORMAL_UNINSTALL)
+ @$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
mostlyclean-noinstPROGRAMS:
@@ -493,6 +558,10 @@ windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES)
@rm -f windres$(EXEEXT)
$(LINK) $(windres_LDFLAGS) $(windres_OBJECTS) $(windres_LDADD) $(LIBS)
+dllwrap$(EXEEXT): $(dllwrap_OBJECTS) $(dllwrap_DEPENDENCIES)
+ @rm -f dllwrap$(EXEEXT)
+ $(LINK) $(dllwrap_LDFLAGS) $(dllwrap_OBJECTS) $(dllwrap_LDADD) $(LIBS)
+
size$(EXEEXT): $(size_OBJECTS) $(size_DEPENDENCIES)
@rm -f size$(EXEEXT)
$(LINK) $(size_LDFLAGS) $(size_OBJECTS) $(size_LDADD) $(LIBS)
@@ -513,10 +582,6 @@ ranlib$(EXEEXT): $(ranlib_OBJECTS) $(ranlib_DEPENDENCIES)
@rm -f ranlib$(EXEEXT)
$(LINK) $(ranlib_LDFLAGS) $(ranlib_OBJECTS) $(ranlib_LDADD) $(LIBS)
-c++filt$(EXEEXT): $(c__filt_OBJECTS) $(c__filt_DEPENDENCIES)
- @rm -f c++filt$(EXEEXT)
- $(LINK) $(c__filt_LDFLAGS) $(c__filt_OBJECTS) $(c__filt_LDADD) $(LIBS)
-
objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES)
@rm -f objcopy$(EXEEXT)
$(LINK) $(objcopy_LDFLAGS) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS)
@@ -525,6 +590,10 @@ addr2line$(EXEEXT): $(addr2line_OBJECTS) $(addr2line_DEPENDENCIES)
@rm -f addr2line$(EXEEXT)
$(LINK) $(addr2line_LDFLAGS) $(addr2line_OBJECTS) $(addr2line_LDADD) $(LIBS)
+readelf$(EXEEXT): $(readelf_OBJECTS) $(readelf_DEPENDENCIES)
+ @rm -f readelf$(EXEEXT)
+ $(LINK) $(readelf_LDFLAGS) $(readelf_OBJECTS) $(readelf_LDADD) $(LIBS)
+
nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES)
@rm -f nm-new$(EXEEXT)
$(LINK) $(nm_new_LDFLAGS) $(nm_new_OBJECTS) $(nm_new_LDADD) $(LIBS)
@@ -532,15 +601,19 @@ nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES)
strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES)
@rm -f strip-new$(EXEEXT)
$(LINK) $(strip_new_LDFLAGS) $(strip_new_OBJECTS) $(strip_new_LDADD) $(LIBS)
+
+cxxfilt$(EXEEXT): $(cxxfilt_OBJECTS) $(cxxfilt_DEPENDENCIES)
+ @rm -f cxxfilt$(EXEEXT)
+ $(LINK) $(cxxfilt_LDFLAGS) $(cxxfilt_OBJECTS) $(cxxfilt_LDADD) $(LIBS)
+.l.c:
+ $(SHELL) $(YLWRAP) "$(LEX)" $< $(LEX_OUTPUT_ROOT).c $@ -- $(AM_LFLAGS) $(LFLAGS)
.y.c:
- $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS)
-defparse.h: defparse.c
+ $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
arparse.h: arparse.c
-rcparse.h: rcparse.c
+defparse.h: defparse.c
nlmheader.h: nlmheader.c
+rcparse.h: rcparse.c
-.l.c:
- $(SHELL) $(YLWRAP) "$(LEX)" $< $(LEX_OUTPUT_ROOT).c $@ -- $(LFLAGS)
binutils.info: binutils.texi
binutils.dvi: binutils.texi
@@ -553,7 +626,7 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@@ -569,28 +642,42 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.txi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(infodir)
- @for file in $(INFO_DEPS); do \
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- for file in $(INFO_DEPS); do \
- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
@@ -599,17 +686,20 @@ uninstall-info:
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
- for file in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
test -z "$ii" \
- || install-info --info-dir=$(infodir) --remove $$file; \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
- $(NORMAL_UNINSTALL)
- for file in $(INFO_DEPS); do \
- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ @$(NORMAL_UNINSTALL)
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
- for base in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
@@ -637,111 +727,119 @@ maintainer-clean-aminfo:
fi; \
done
clean-info: mostlyclean-aminfo
-install-man: $(MANS)
- $(NORMAL_INSTALL)
- $(mkinstalldirs) $(mandir)/man1
- @sect=1; \
- inst=`echo "ar" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/ar.1; then file=$(srcdir)/ar.1; \
- else file=ar.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "nlmconv" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/nlmconv.1; then file=$(srcdir)/nlmconv.1; \
- else file=nlmconv.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "$(DEMANGLER_PROG)" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/$(DEMANGLER_PROG).1; then file=$(srcdir)/$(DEMANGLER_PROG).1; \
- else file=$(DEMANGLER_PROG).1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "nm" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/nm.1; then file=$(srcdir)/nm.1; \
- else file=nm.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "objdump" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/objdump.1; then file=$(srcdir)/objdump.1; \
- else file=objdump.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "ranlib" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/ranlib.1; then file=$(srcdir)/ranlib.1; \
- else file=ranlib.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "size" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/size.1; then file=$(srcdir)/size.1; \
- else file=size.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "strings" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/strings.1; then file=$(srcdir)/strings.1; \
- else file=strings.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "strip" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/strip.1; then file=$(srcdir)/strip.1; \
- else file=strip.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "objcopy" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/objcopy.1; then file=$(srcdir)/objcopy.1; \
- else file=objcopy.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
- @sect=1; \
- inst=`echo "addr2line" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/addr2line.1; then file=$(srcdir)/addr2line.1; \
- else file=addr2line.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
-uninstall-man:
- $(NORMAL_UNINSTALL)
- -inst=`echo "ar" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "nlmconv" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "$(DEMANGLER_PROG)" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "nm" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "objdump" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "ranlib" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "size" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "strings" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "strip" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "objcopy" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
- -inst=`echo "addr2line" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
+install-man1:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+uninstall-man1:
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+install-man: $(MANS)
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+ @$(NORMAL_UNINSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+ && mkid -f$$here/ID $$unique $(LISP)
-TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
@@ -766,29 +864,31 @@ top_distdir = $(distdir)
# tarfile.
distcheck: dist
-rm -rf $(distdir)
- GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
- @echo "========================"; \
- echo "$(distdir).tar.gz is ready for distribution"; \
- echo "========================"
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
@@ -796,11 +896,25 @@ distdir: $(DISTFILES)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
done
- $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
RUNTESTFLAGS =
@@ -809,7 +923,7 @@ DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
site.exp: Makefile
@echo 'Making a new site.exp file...'
- -@rm -f site.bak
+ @test ! -f site.bak || rm -f site.bak
@echo '## these variables are automatically generated by make ##' > $@-t
@echo '# Do not edit here. If you wish to override these values' >> $@-t
@echo '# edit the last section' >> $@-t
@@ -823,32 +937,41 @@ site.exp: Makefile
@echo 'set build_alias $(build_alias)' >> $@-t
@echo 'set build_triplet $(build_triplet)' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
- -@mv site.exp site.bak
+ @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp
-info: $(INFO_DEPS)
-dvi: $(DVIS)
-check:
- $(MAKE) check-DEJAGNU
-installcheck:
-install-info: install-info-am
-install-exec: install-binPROGRAMS install-exec-local
- @$(NORMAL_INSTALL)
-
-install-data: install-man
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall: uninstall-binPROGRAMS uninstall-man
-
-all: Makefile $(PROGRAMS) $(MANS) config.h
-
+info-am: $(INFO_DEPS)
+info: info-recursive
+dvi-am: $(DVIS)
+dvi: dvi-recursive
+check-am:
+ $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-info-am:
+install-info: install-info-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am: install-binPROGRAMS install-exec-local
+install-exec: install-exec-recursive
+
+install-data-am: install-man
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+uninstall: uninstall-recursive
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
+all-redirect: all-recursive-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
- $(mkinstalldirs) $(bindir) $(mandir)/man1
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
@@ -858,53 +981,72 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \
+ -test -z "arlexldeflexlrclexlarparseharparsecdefparsehdefparsecnlmheaderhnlmheadercrcparsehrcparsec$(MAINTAINERCLEANFILES)" || rm -f arlexl deflexl rclexl arparseh arparsec defparseh defparsec nlmheaderh nlmheaderc rcparseh rcparsec $(MAINTAINERCLEANFILES)
+mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-aminfo mostlyclean-tags \
mostlyclean-generic mostlyclean-local
-clean: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \
- clean-libtool clean-aminfo clean-tags clean-generic \
- mostlyclean
+mostlyclean: mostlyclean-recursive
-distclean: distclean-hdr distclean-binPROGRAMS distclean-noinstPROGRAMS \
- distclean-compile distclean-libtool distclean-aminfo \
- distclean-tags distclean-generic clean
- -rm -f config.status
+clean-am: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS \
+ clean-compile clean-libtool clean-aminfo clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-hdr distclean-binPROGRAMS \
+ distclean-noinstPROGRAMS distclean-compile \
+ distclean-libtool distclean-aminfo distclean-tags \
+ distclean-generic clean-am
-rm -f libtool
-maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-aminfo maintainer-clean-tags \
- maintainer-clean-generic distclean
+ maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
-clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
-install-binPROGRAMS mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool install-info-am uninstall-info \
mostlyclean-aminfo distclean-aminfo clean-aminfo \
-maintainer-clean-aminfo install-man uninstall-man tags mostlyclean-tags \
+maintainer-clean-aminfo install-man1 uninstall-man1 install-man \
+uninstall-man install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info dvi installcheck install-info install-exec install-data install \
-uninstall all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
+info-am info dvi-am dvi check check-am installcheck-am installcheck \
+install-info-am install-info all-recursive-am install-exec-local \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
check-DEJAGNU: site.exp
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
@@ -936,7 +1078,7 @@ stamp-under: Makefile
cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
$(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
-# The following is commented out for the convertion to automake.
+# The following is commented out for the conversion to automake.
# This rule creates a single binary that switches between ar and ranlib
# by looking at argv[0]. Use this kludge to save some disk space.
# However, you have to install things by hand.
@@ -979,9 +1121,19 @@ sysinfo.o: sysinfo.c
$(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
fi
+# We need these for parallel make.
+arparse.h: arparse.c
+defparse.h: defparse.c
+nlmheader.h: nlmheader.c
+rcparse.h: rcparse.c
+sysinfo.h: sysinfo.c
+
dlltool.o:dlltool.c
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
+rescoff.o:rescoff.c
+ $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
+
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
# scripts, since they are only included conditionally.
nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
@@ -991,18 +1143,18 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
diststuff: $(DISTSTUFF) info
# Targets to rebuild dependencies in this Makefile.
-# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
-.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- sed -f dep.sed <.dep1 >.dep
-
-# This rule really wants a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(GENERATED_CFILES)
- rm -f .dep2
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- $(DEP) -f .dep2 $(INCLUDES) $?
- $(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
+# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
+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' >> $@
+
+DEP1: $(CFILES) $(GENERATED_CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
objdir=`pwd`; \
@@ -1012,19 +1164,19 @@ dep.sed: dep-in.sed config.status
-e 's!@SRCDIR@!$(srcdir)!' \
-e "s!@OBJDIR@!$${objdir}!"
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
@@ -1039,28 +1191,28 @@ binutils.dvi: $(srcdir)/binutils.texi config.texi
binutils.info: $(srcdir)/binutils.texi config.texi
-$(DEMANGLER_PROG).1: cxxfilt.man Makefile
- sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
- > $(DEMANGLER_PROG).1
+$(DEMANGLER_NAME).1: cxxfilt.man Makefile
+ sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' < $(srcdir)/cxxfilt.man \
+ > $(DEMANGLER_NAME).1
mostlyclean-local:
-rm -rf tmpdir
.PHONY: install-exec-local
-install-exec-local: $(bin_PROGRAMS) $(noinst_PROGRAMS)
+install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
$(mkinstalldirs) $(tooldir)/bin
for i in $(TOOL_PROGS); do \
if [ -f $$i$(EXEEXT) ]; then \
j=`echo $$i | sed -e 's/-new//'`; \
- rm -f $(tooldir)/bin/$$j$(EXEEXT); \
k=`echo $$j | sed '$(transform)'`; \
if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
+ rm -f $(tooldir)/bin/$$j$(EXEEXT); \
ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \
fi; \
@@ -1072,118 +1224,151 @@ install-exec-local: $(bin_PROGRAMS) $(noinst_PROGRAMS)
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.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.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h
+ arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h
-coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
+ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h
-coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- coffgrok.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 \
+ $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h coffgrok.h
debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/demangle.h dlltool.h
+ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \
+ dlltool.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.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)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h
is-ranlib.o: is-ranlib.c
is-strip.o: is-strip.c
maybe-ranlib.o: maybe-ranlib.c
maybe-strip.o: maybe-strip.c
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmconv.h
+ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.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)/fopen-same.h $(INCDIR)/getopt.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
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)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/libiberty.h budbg.h
+ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h budbg.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h
rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/coff/internal.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
- budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/internal.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
+ debug.h budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
-srconv.o: srconv.c bucomm.h config.h $(INCDIR)/fopen-same.h \
- sysroff.h coffgrok.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h sysroff.c
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h
+srconv.o: srconv.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sysroff.c
stabs.o: stabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def
strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h
sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h sysroff.h \
- sysroff.c
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ sysroff.h sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h
+ $(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/obstack.h \
+ windres.h winduni.h
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h
+winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ winduni.h
+readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/v850.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/mips.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/m68k.h \
+ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/d10v.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
+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
+dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \
+ dyn-string.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 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
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ arsup.h
arlex.o: arlex.c $(INCDIR)/libiberty.h arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
syslex.o: syslex.c sysinfo.h
defparse.o: defparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h dlltool.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ dlltool.h
deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
defparse.h dlltool.h
nlmheader.o: nlmheader.c ../bfd/bfd.h bucomm.h config.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- nlmconv.h
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h nlmconv.h
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- windres.h rcparse.h
-
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h windres.h winduni.h rcparse.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/binutils/NEWS b/contrib/binutils/binutils/NEWS
index de6f0bd..746c2cc 100644
--- a/contrib/binutils/binutils/NEWS
+++ b/contrib/binutils/binutils/NEWS
@@ -1,5 +1,37 @@
-*- text -*-
+Changes in binutils 2.10:
+
+* New command line switch to objdump --file-start-context which shows the
+ entire file contents up to the source line first encountered for a given
+ file.
+
+* New command line switch to objdump -M (or --disassembler-options) which takes
+ a parameter which can then be interpreted on a per-target basis by the
+ disassembler. Used by ARM targets to select register name sets, ISA, APCS or
+ raw verions.
+
+* objdump support for -mi386:intel which causes disassembly to be displayed
+ with intel syntax.
+
+* New program: readelf. This displays the contents of ELF format files,
+ regardless of target machine.
+
+* objcopy now takes --change-section-lma, --change-section-vma, and
+ --change-section-address options. The old --adjust-section-vma option is
+ equivalent to --change-section-address. The other --adjust-* options are now
+ renamed to --change-*, although --adjust-* continues to work.
+
+* objcopy has a --redefine-sym option that lets you rename symbols.
+
+* objcopy now takes a -j/--only-section option to copy only the specified
+ sections.
+
+* dlltool now supports the IMPORTS command.
+
+* dlltool now takes --export-all-symbols, --no-export-all-symbols,
+ --exclude-symbols, and --no-default-excludes options.
+
Changes in binutils 2.9:
* Added windres program, which can be used to manipulate resources in WIN32
diff --git a/contrib/binutils/binutils/README b/contrib/binutils/binutils/README
index 91d7750..4b2d277 100644
--- a/contrib/binutils/binutils/README
+++ b/contrib/binutils/binutils/README
@@ -79,11 +79,16 @@ binutils build process will not work. In this case, run configure as
usual. Before running make, run this script:
#!/bin/sh
-MAKE=${MAKE-make}
-${MAKE} $* AR=true all-libiberty
-${MAKE} $* AR=true all-bfd
+MAKE_PROG="${MAKE-make}"
+MAKE="${MAKE_PROG} AR=true LINK=true"
+export MAKE
+${MAKE} $* all-libiberty
+${MAKE} $* all-intl
+${MAKE} $* all-bfd
cd binutils
-${MAKE} $* ADDL_DEPS='$(BULIBS)' ADDL_LIBS='$(BULIBS) ../bfd/*.o `cat ../libiberty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty/\1,g"`' ar
+MAKE="${MAKE_PROG}"
+export MAKE
+${MAKE} $* ar_DEPENDENCIES= ar_LDADD='../bfd/*.o `cat ../libiberty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty/\1,g"` `if test -f ../intl/gettext.o; then echo '../intl/*.o'; fi`' ar
This script will build an ar program in binutils/ar. Move binutils/ar
into a directory on your PATH. After doing this, you can run make as
@@ -111,24 +116,74 @@ 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.
-Testing
-=======
+VMS
+===
+
+This section was written by Klaus K"ampf <kkaempf@rmi.de>. It
+describes how to build and install the binutils on openVMS (Alpha and
+Vax). (The BFD library only supports reading Vax object files.)
+
+Compiling the release:
+
+To compile the gnu binary utilities and the gnu assembler, you'll
+need DEC C or GNU C for openVMS/Alpha. You'll need *both* compilers
+on openVMS/Vax.
+
+Compiling with either DEC C or GNU C works on openVMS/Alpha only. Some
+of the opcodes and binutils files trap a bug in the DEC C optimizer,
+so these files must be compiled with /noopt.
+
+Compiling on openVMS/Vax is a bit complicated, as the bfd library traps
+a bug in GNU C and the gnu assembler a bug in (my version of) DEC C.
+
+I never tried compiling with VAX C.
+
+
+You further need GNU Make Version 3.76 or later. This is available
+at ftp.progis.de or any GNU archive site. The makefiles assume that
+gmake starts gnu make as a foreign command.
+
+If you're compiling with DEC C or VAX C, you must run
+
+ $ @setup
+
+before starting gnu-make. This isn't needed with GNU C.
+
+On the Alpha you can choose the compiler by editing the toplevel
+makefile.vms. Either select CC=cc (for DEC C) or CC=gcc (for GNU C)
+
+
+Installing the release
+
+Provided that your directory setup conforms to the GNU on openVMS
+standard, you already have a concealed deviced named 'GNU_ROOT'.
+In this case, a simple
+
+ $ gmake install
+
+suffices to copy all programs and libraries to the proper directories.
+
+Define the programs as foreign commands by adding these lines to your
+login.com:
+
+ $ gas :== $GNU_ROOT:[bin]as.exe
+ $ size :== $GNU_ROOT:[bin]size.exe
+ $ nm :== $GNU_ROOT:[bin]nm.exe
+ $ objdump :== $GNU_ROOT:[bin]objdump.exe
+ $ strings :== $GNU_ROOT:[bin]strings.exe
+
+If you have a different directory setup, copy the binary utilities
+([.binutils]size.exe, [.binutils]nm.exe, [.binutils]objdump.exe,
+and [.binutils]strings.exe) and the gnu assembler and preprocessor
+([.gas]as.exe and [.gas]gasp.exe]) to a directory of your choice
+and define all programs as foreign commands.
+
+
+If you're satiesfied with the compilation, you may want to remove
+unneeded objects and libraries:
+
+ $ gmake clean
+
-Testing this release of the binutils requires an unreleased version of
-dejagnu. There is a dejagnu snapshot available at
- ftp://ftp.cygnus.com/pub/binutils
-which may be used for testing.
-
-Maintenance
-===========
-
-The configure and Makefile.in files in the subdirectories are
-generated by autoconf and automake, respectively. The libtool package
-is also required. In order to make the generation rules fire
-automatically, you must configure with the --enable-maintainer-mode
-option. This option is not the default in order to avoid problems on
-systems which have out of date versions of autoconf or automake
-installed. The generated files in this release were built with
-unreleased versions of autoconf, automake, and libtool. You can find
-snapshots of the appropriate sources at
- ftp://ftp.cygnus.com/pub/binutils
+If you have any problems or questions about the binutils on VMS, feel
+free to mail me at kkaempf@rmi.de.
diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4
index ea7ce9b..2d62d71 100644
--- a/contrib/binutils/binutils/aclocal.m4
+++ b/contrib/binutils/binutils/aclocal.m4
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.2e
+dnl aclocal.m4 generated automatically by aclocal 1.4
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,7 +22,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@@ -32,8 +32,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
@@ -45,15 +45,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
#
# Check to make sure that the build environment is sane.
#
@@ -114,32 +105,75 @@ fi
AC_SUBST($1)])
-# serial 24 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AM_ENABLE_SHARED])dnl
-AC_REQUIRE([AM_ENABLE_STATIC])dnl
+# 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([AM_PROG_LD])dnl
-AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -161,30 +195,42 @@ case "$host" in
*-*-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
;;
-esac
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
+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])])
-# AM_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# 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(AM_ENABLE_SHARED,
-[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@@ -201,29 +247,23 @@ no) enable_shared=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
-# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AM_DISABLE_SHARED,
-[AM_ENABLE_SHARED(no)])
+# 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)])
-# AM_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AM_DISABLE_STATIC,
-[AM_ENABLE_STATIC(no)])
-
-# AM_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# 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(AM_ENABLE_STATIC,
-[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@@ -240,28 +280,73 @@ no) enable_static=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+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)])
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
+# 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])
+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.
+ # Accept absolute paths.
changequote(,)dnl
- /* | [A-Za-z]:\\*)
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -278,10 +363,10 @@ else
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ 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"; then
+ 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.
@@ -289,7 +374,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -304,11 +389,10 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
+AC_PROG_LD_GNU
])
-AC_DEFUN(AM_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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -318,43 +402,117 @@ else
fi])
])
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
+# 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,
-[case "$NM" in
-changequote(,)dnl
-/* | [A-Za-z]:\\*)
-changequote([,])dnl
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+[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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
+fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
-AC_SUBST(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,
@@ -378,6 +536,360 @@ 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 <drepper@cygnus.com>, 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 <libintl.h>], [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 <locale.h> in the installed <libintl.h> 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 <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. 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 <drepper@cygnus.com>, 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 <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 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 <locale.h>], [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
@@ -392,69 +904,22 @@ AC_DEFUN(AM_MAINTAINER_MODE,
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
-# Check to see if we're running under Cygwin32, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN32()
-AC_DEFUN(AM_CYGWIN32,
-[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin32=yes, am_cv_cygwin32=no)
-rm -f conftest*])
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
-
-# Check to see if we're running under Win32, without using
-# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
-# Otherwise set it to "".
-
-dnl AM_EXEEXT()
-dnl This knows we add .exe if we're building in the Cygwin32
-dnl environment. But if we're not, then it compiles a test program
-dnl to see if there is a suffix for executables.
-AC_DEFUN(AM_EXEEXT,
-[AC_REQUIRE([AM_CYGWIN32])
-AC_REQUIRE([AM_MINGW32])
-AC_MSG_CHECKING([for executable suffix])
-AC_CACHE_VAL(am_cv_exeext,
-[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*])
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
-fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-AC_MSG_RESULT(${am_cv_exeext})
-AC_SUBST(EXEEXT)])
-
-# Check to see if we're running under Mingw, without using
-# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_MINGW32()
-AC_DEFUN(AM_MINGW32,
-[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
-[AC_TRY_COMPILE(,[return __MINGW32__;],
-am_cv_mingw32=yes, am_cv_mingw32=no)
-rm -f conftest*])
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes])
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c
index b887043..20c7eef 100644
--- a/contrib/binutils/binutils/addr2line.c
+++ b/contrib/binutils/binutils/addr2line.c
@@ -1,5 +1,5 @@
/* addr2line.c -- convert addresses to line number and function name
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@zfe.siemens.de>
This file is part of GNU Binutils.
@@ -73,14 +73,14 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, "\
+ fprintf (stream, _("\
Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n\
[-e executable] [--exe=executable] [--demangle]\n\
- [--basenames] [--functions] [addr addr ...]\n",
+ [--basenames] [--functions] [addr addr ...]\n"),
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -123,9 +123,10 @@ static void
find_address_in_section (abfd, section, data)
bfd *abfd;
asection *section;
- PTR data;
+ PTR data ATTRIBUTE_UNUSED;
{
bfd_vma vma;
+ bfd_size_type size;
if (found)
return;
@@ -137,6 +138,10 @@ find_address_in_section (abfd, section, data)
if (pc < vma)
return;
+ size = bfd_get_section_size_before_reloc (section);
+ if (pc >= vma + size)
+ return;
+
found = bfd_find_nearest_line (abfd, section, syms, pc - vma,
&filename, &functionname, &line);
}
@@ -181,7 +186,7 @@ translate_addresses (abfd)
{
if (with_functions)
{
- if (*functionname == '\0')
+ if (functionname == NULL || *functionname == '\0')
printf ("??\n");
else if (! do_demangle)
printf ("%s\n", functionname);
@@ -200,7 +205,7 @@ translate_addresses (abfd)
}
}
- if (base_names)
+ if (base_names && filename != NULL)
{
char *h;
@@ -209,7 +214,7 @@ translate_addresses (abfd)
filename = h + 1;
}
- printf ("%s:%u\n", filename, line);
+ printf ("%s:%u\n", filename ? filename : "??", line);
}
/* fflush() is essential for using this command as a server
@@ -235,7 +240,7 @@ process_file (filename, target)
bfd_fatal (filename);
if (bfd_check_format (abfd, bfd_archive))
- fatal ("%s: can not get addresses from archive", filename);
+ fatal (_("%s: can not get addresses from archive"), filename);
if (! bfd_check_format_matches (abfd, bfd_object, &matching))
{
@@ -270,6 +275,12 @@ main (argc, argv)
char *target;
int c;
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = *argv;
xmalloc_set_program_name (program_name);
diff --git a/contrib/binutils/binutils/ar.1 b/contrib/binutils/binutils/ar.1
index e4e8cff..cd71a40 100644
--- a/contrib/binutils/binutils/ar.1
+++ b/contrib/binutils/binutils/ar.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991 Free Software Foundation
+.\" Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH ar 1 "5 November 1991" "cygnus support" "GNU Development Tools"
+.TH ar 1 "1999" "Cygnus Solutions" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -14,10 +14,13 @@ ar \- create, modify, and extract from archives.
.hy 0
.na
.BR ar " [\|" "-" "\|]"\c
-.I {dmpqrtx}[abcilosSuvV] \c
+.I {dmpqrtx}[abcfilNoPsSuvV] \c
[\|\c
.I membername\c
\&\|] \c
+[\|\c
+.I count\c
+\&\|] \c
.I archive\c
\& \c
.I files\c
@@ -406,6 +409,15 @@ member must be present as the \c
This modifier is accepted but not used.
.TP
+.B N
+Uses the
+.I count
+parameter. This is used if there are multiple entries in the archive
+with the same name. Extract or delete instance
+.I count
+of the given name from the archive.
+
+.TP
.B o
Preserve the \c
.I original\c
@@ -414,6 +426,18 @@ you do not specify this modifier, files extracted from the archive
will be stamped with the time of extraction.
.TP
+.B P
+Use the full path name when matching names in the archive.
+.B ar
+can not create an archive with a full path name (such archives are not
+POSIX complaint), but other archive creators can. This option will
+cause
+.B ar
+to match file names using a complete path name, which can be
+convenient when extracting a single file from an archive created by
+another tool.
+
+.TP
.B s
Write an object-file index into the archive, or update an existing one,
even if no other change is made to the archive. You may use this modifier
@@ -491,7 +515,7 @@ The GNU Binary Utilities\c
\&.
.SH COPYING
-Copyright (c) 1991 Free Software Foundation, Inc.
+Copyright (c) 1991, 1992, 1993, 1995, 1998, 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
diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c
index b52a4ce..17388a4 100644
--- a/contrib/binutils/binutils/ar.c
+++ b/contrib/binutils/binutils/ar.c
@@ -1,5 +1,6 @@
/* ar.c - Archive modify and extract.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -33,20 +34,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "arsup.h"
#include <sys/stat.h>
-#ifdef HAVE_GOOD_UTIME_H
-#include <utime.h>
-#else /* ! HAVE_GOOD_UTIME_H */
-#ifdef HAVE_UTIMES
-#include <sys/time.h>
-#endif /* HAVE_UTIMES */
-#endif /* ! HAVE_GOOD_UTIME_H */
-
#ifdef __GO32___
#define EXT_NAME_LEN 3 /* bufflen of addition to name if it's MS-DOS */
#else
#define EXT_NAME_LEN 6 /* ditto for *NIX */
#endif
+/* We need to open files in binary modes on system where that makes a
+ difference. */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
#define BUFSIZE 8192
/* Kludge declaration from BFD! This is ugly! FIXME! XXX */
@@ -148,9 +147,19 @@ enum pos
static bfd **
get_pos_bfd PARAMS ((bfd **, enum pos, const char *));
+/* For extract/delete only. If COUNTED_NAME_MODE is true, we only
+ extract the COUNTED_NAME_COUNTER instance of that name. */
+static boolean counted_name_mode = 0;
+static int counted_name_counter = 0;
+
/* Whether to truncate names of files stored in the archive. */
static boolean ar_truncate = false;
+/* Whether to use a full file name match when searching an archive.
+ This is convenient for archives created by the Microsoft lib
+ program. */
+static boolean full_pathname = false;
+
int interactive = 0;
static void
@@ -172,6 +181,7 @@ map_over_members (arch, function, files, count)
int count;
{
bfd *head;
+ int match_count;
if (count == 0)
{
@@ -182,6 +192,7 @@ map_over_members (arch, function, files, count)
}
return;
}
+
/* This may appear to be a baroque way of accomplishing what we want.
However we have to iterate over the filenames in order to notice where
a filename is requested but does not exist in the archive. Ditto
@@ -192,6 +203,7 @@ map_over_members (arch, function, files, count)
{
boolean found = false;
+ match_count = 0;
for (head = arch->next; head; head = head->next)
{
PROGRESS (1);
@@ -203,14 +215,24 @@ map_over_members (arch, function, files, count)
bfd_stat_arch_elt (head, &buf);
}
if ((head->filename != NULL) &&
- (!strcmp (*files, head->filename)))
+ (!strcmp (normalize (*files, arch), head->filename)))
{
+ ++match_count;
+ if (counted_name_mode
+ && match_count != counted_name_counter)
+ {
+ /* Counting, and didn't match on count; go on to the
+ next one. */
+ continue;
+ }
+
found = true;
function (head);
}
}
if (!found)
- fprintf (stderr, "no entry %s in archive\n", *files);
+ /* xgettext:c-format */
+ fprintf (stderr, _("no entry %s in archive\n"), *files);
}
}
@@ -223,19 +245,45 @@ usage (help)
FILE *s;
s = help ? stdout : stderr;
+
if (! is_ranlib)
- fprintf (s, "\
-Usage: %s [-]{dmpqrtx}[abcilosSuvV] [member-name] archive-file file...\n\
- %s -M [<mri-script]\n",
- program_name, program_name);
+ {
+ /* xgettext:c-format */
+ fprintf (s, _("Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
+ program_name);
+ /* xgettext:c-format */
+ fprintf (s, _(" %s -M [<mri-script]\n"), program_name);
+ fprintf (s, _(" commands:\n"));
+ fprintf (s, _(" d - delete file(s) from the archive\n"));
+ fprintf (s, _(" m[ab] - move file(s) in the archive\n"));
+ fprintf (s, _(" p - print file(s) found in the archive\n"));
+ fprintf (s, _(" q[f] - quick append file(s) to the archive\n"));
+ fprintf (s, _(" r[ab][f][u] - replace existing or insert new file(s) into the archive\n"));
+ fprintf (s, _(" t - display contents of archive\n"));
+ fprintf (s, _(" x[o] - extract file(s) from the archive\n"));
+ fprintf (s, _(" command specific modifiers:\n"));
+ fprintf (s, _(" [a] - put file(s) after [member-name]\n"));
+ fprintf (s, _(" [b] - put file(s) before [member-name] (same as [i])\n"));
+ fprintf (s, _(" [N] - use instance [count] of name\n"));
+ fprintf (s, _(" [f] - truncate inserted file names\n"));
+ fprintf (s, _(" [P] - use full path names when matching\n"));
+ fprintf (s, _(" [o] - preserve original dates\n"));
+ fprintf (s, _(" [u] - only replace files that are newer than current archive contents\n"));
+ fprintf (s, _(" generic modifiers:\n"));
+ fprintf (s, _(" [c] - do not warn if the library had to be created\n"));
+ fprintf (s, _(" [s] - create an archive index (cf. ranlib)\n"));
+ fprintf (s, _(" [S] - do not build a symbol table\n"));
+ fprintf (s, _(" [v] - be verbose\n"));
+ fprintf (s, _(" [V] - display the version number\n"));
+ }
else
- fprintf (s, "\
-Usage: %s [-vV] archive\n", program_name);
+ /* xgettext:c-format */
+ fprintf (s, _("Usage: %s [-vV] archive\n"), program_name);
list_supported_targets (program_name, stderr);
if (help)
- fprintf (s, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (s, _("Report bugs to %s\n"), REPORT_BUGS_TO);
xexit (help ? 0 : 1);
}
@@ -250,6 +298,9 @@ normalize (file, abfd)
{
const char *filename;
+ if (full_pathname)
+ return file;
+
filename = strrchr (file, '/');
if (filename != (char *) NULL)
filename++;
@@ -274,7 +325,7 @@ normalize (file, abfd)
/* Remove any output file. This is only called via xatexit. */
-static char *output_filename = NULL;
+static const char *output_filename = NULL;
static FILE *output_file = NULL;
static bfd *output_bfd = NULL;
@@ -308,9 +359,16 @@ main (argc, argv)
} operation = none;
int arg_index;
char **files;
+ int file_count;
char *inarch_filename;
int show_version;
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = argv[0];
xmalloc_set_program_name (program_name);
@@ -405,7 +463,7 @@ main (argc, argv)
case 't':
case 'x':
if (operation != none)
- fatal ("two different operation options specified");
+ fatal (_("two different operation options specified"));
switch (c)
{
case 'd':
@@ -469,11 +527,18 @@ main (argc, argv)
case 'M':
mri_mode = 1;
break;
+ case 'N':
+ counted_name_mode = true;
+ break;
case 'f':
ar_truncate = true;
break;
+ case 'P':
+ full_pathname = true;
+ break;
default:
- fprintf (stderr, "%s: illegal option -- %c\n", program_name, c);
+ /* xgettext:c-format */
+ non_fatal (_("illegal option -- %c"), c);
usage (0);
}
}
@@ -505,19 +570,29 @@ main (argc, argv)
}
if (operation == none)
- fatal ("no operation specified");
+ fatal (_("no operation specified"));
if (newer_only && operation != replace)
- fatal ("`u' is only meaningful with the `r' option.");
+ fatal (_("`u' is only meaningful with the `r' option."));
arg_index = 2;
if (postype != pos_default)
posname = argv[arg_index++];
+ if (counted_name_mode)
+ {
+ if (operation != extract && operation != delete)
+ fatal (_("`N' is only meaningful with the `x' and `d' options."));
+ counted_name_counter = atoi (argv[arg_index++]);
+ if (counted_name_counter <= 0)
+ fatal (_("Value for `N' must be positive."));
+ }
+
inarch_filename = argv[arg_index++];
files = arg_index < argc ? argv + arg_index : NULL;
+ file_count = argc - arg_index;
#if 0
/* We don't use do_quick_append any more. Too many systems
@@ -558,38 +633,43 @@ main (argc, argv)
switch (operation)
{
case print_table:
- map_over_members (arch, print_descr, files, argc - 3);
+ map_over_members (arch, print_descr, files, file_count);
break;
case print_files:
- map_over_members (arch, print_contents, files, argc - 3);
+ map_over_members (arch, print_contents, files, file_count);
break;
case extract:
- map_over_members (arch, extract_file, files, argc - 3);
+ map_over_members (arch, extract_file, files, file_count);
break;
case delete:
if (files != NULL)
delete_members (arch, files);
+ else
+ output_filename = NULL;
break;
case move:
if (files != NULL)
move_members (arch, files);
+ else
+ output_filename = NULL;
break;
case replace:
case quick_append:
if (files != NULL || write_armap > 0)
replace_members (arch, files, operation == quick_append);
+ else
+ output_filename = NULL;
break;
/* Shouldn't happen! */
default:
- fprintf (stderr, "%s: internal error -- this option not implemented\n",
- program_name);
- xexit (1);
+ /* xgettext:c-format */
+ fatal (_("internal error -- this option not implemented"));
}
}
@@ -656,6 +736,9 @@ open_inarch (archive_filename, file)
|| ! bfd_set_format (arch, bfd_archive)
|| ! bfd_close (arch))
bfd_fatal (archive_filename);
+
+ /* If we die creating a new archive, don't leave it around. */
+ output_filename = archive_filename;
}
arch = bfd_openr (archive_filename, target);
@@ -701,10 +784,11 @@ print_contents (abfd)
struct stat buf;
long size;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
- fatal ("internal stat error on %s", bfd_get_filename (abfd));
+ /* xgettext:c-format */
+ fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
if (verbose)
- printf ("\n<member %s>\n\n", bfd_get_filename (abfd));
+ printf ("\n<%s>\n\n", bfd_get_filename (abfd));
bfd_seek (abfd, 0, SEEK_SET);
@@ -720,7 +804,8 @@ print_contents (abfd)
nread = bfd_read (cbuf, 1, tocopy, abfd); /* oops -- broke
abstraction! */
if (nread != tocopy)
- fatal ("%s is not a valid archive",
+ /* xgettext:c-format */
+ fatal (_("%s is not a valid archive"),
bfd_get_filename (bfd_my_archive (abfd)));
fwrite (cbuf, 1, nread, stdout);
ncopied += tocopy;
@@ -745,26 +830,32 @@ extract_file (abfd)
FILE *ostream;
char *cbuf = xmalloc (BUFSIZE);
int nread, tocopy;
- int ncopied = 0;
+ long ncopied = 0;
long size;
struct stat buf;
+
if (bfd_stat_arch_elt (abfd, &buf) != 0)
- fatal ("internal stat error on %s", bfd_get_filename (abfd));
+ /* xgettext:c-format */
+ fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
size = buf.st_size;
+ if (size < 0)
+ /* xgettext:c-format */
+ fatal (_("stat returns negative size for %s"), bfd_get_filename (abfd));
+
if (verbose)
printf ("x - %s\n", bfd_get_filename (abfd));
bfd_seek (abfd, 0, SEEK_SET);
- ostream = 0;
+ ostream = NULL;
if (size == 0)
{
/* Seems like an abstraction violation, eh? Well it's OK! */
output_filename = bfd_get_filename (abfd);
ostream = fopen (bfd_get_filename (abfd), FOPEN_WB);
- if (!ostream)
+ if (ostream == NULL)
{
perror (bfd_get_filename (abfd));
xexit (1);
@@ -781,17 +872,18 @@ extract_file (abfd)
nread = bfd_read (cbuf, 1, tocopy, abfd);
if (nread != tocopy)
- fatal ("%s is not a valid archive",
+ /* xgettext:c-format */
+ fatal (_("%s is not a valid archive"),
bfd_get_filename (bfd_my_archive (abfd)));
/* See comment above; this saves disk arm motion */
- if (!ostream)
+ if (ostream == NULL)
{
/* Seems like an abstraction violation, eh? Well it's OK! */
output_filename = bfd_get_filename (abfd);
ostream = fopen (bfd_get_filename (abfd), FOPEN_WB);
- if (!ostream)
+ if (ostream == NULL)
{
perror (bfd_get_filename (abfd));
xexit (1);
@@ -803,7 +895,8 @@ extract_file (abfd)
ncopied += tocopy;
}
- fclose (ostream);
+ if (ostream != NULL)
+ fclose (ostream);
output_file = NULL;
output_filename = NULL;
@@ -811,29 +904,9 @@ extract_file (abfd)
chmod (bfd_get_filename (abfd), buf.st_mode);
if (preserve_dates)
- {
-#ifdef HAVE_GOOD_UTIME_H
- struct utimbuf tb;
- tb.actime = buf.st_mtime;
- tb.modtime = buf.st_mtime;
- utime (bfd_get_filename (abfd), &tb); /* FIXME check result */
-#else /* ! HAVE_GOOD_UTIME_H */
-#ifndef HAVE_UTIMES
- long tb[2];
- tb[0] = buf.st_mtime;
- tb[1] = buf.st_mtime;
- utime (bfd_get_filename (abfd), tb); /* FIXME check result */
-#else /* HAVE_UTIMES */
- struct timeval tv[2];
- tv[0].tv_sec = buf.st_mtime;
- tv[0].tv_usec = 0;
- tv[1].tv_sec = buf.st_mtime;
- tv[1].tv_usec = 0;
- utimes (bfd_get_filename (abfd), tv); /* FIXME check result */
-#endif /* HAVE_UTIMES */
-#endif /* ! HAVE_GOOD_UTIME_H */
- }
-free (cbuf);
+ set_times (bfd_get_filename (abfd), &buf);
+
+ free (cbuf);
}
#if 0
@@ -888,14 +961,15 @@ do_quick_append (archive_filename, files_to_append)
if (newfile == false)
{
if (bfd_check_format (temp, bfd_archive) != true)
- fatal ("%s is not an archive", archive_filename);
+ /* xgettext:c-format */
+ fatal (_("%s is not an archive"), archive_filename);
}
else
{
fwrite (ARMAG, 1, SARMAG, ofile);
if (!silent_create)
- fprintf (stderr, "%s: creating %s\n",
- program_name, archive_filename);
+ /* xgettext:c-format */
+ non_fatal (_("creating %s"), archive_filename);
}
if (ar_truncate)
@@ -995,10 +1069,9 @@ write_archive (iarch)
/* We don't care if this fails; we might be creating the archive. */
bfd_close (iarch);
- unlink (old_name);
- if (rename (new_name, old_name) != 0)
- bfd_fatal (old_name);
+ if (smart_rename (new_name, old_name, 0) != 0)
+ xexit (1);
}
/* Return a pointer to the pointer to the entry which should be rplacd'd
@@ -1052,6 +1125,8 @@ delete_members (arch, files_to_delete)
bfd **current_ptr_ptr;
boolean found;
boolean something_changed = false;
+ int match_count;
+
for (; *files_to_delete != NULL; ++files_to_delete)
{
/* In a.out systems, the armap is optional. It's also called
@@ -1068,37 +1143,48 @@ delete_members (arch, files_to_delete)
}
found = false;
+ match_count = 0;
current_ptr_ptr = &(arch->next);
while (*current_ptr_ptr)
{
- if (strcmp (*files_to_delete, (*current_ptr_ptr)->filename) == 0)
+ if (strcmp (normalize (*files_to_delete, arch),
+ (*current_ptr_ptr)->filename) == 0)
{
- found = true;
- something_changed = true;
- if (verbose)
- printf ("d - %s\n",
- *files_to_delete);
- *current_ptr_ptr = ((*current_ptr_ptr)->next);
- goto next_file;
- }
- else
- {
- current_ptr_ptr = &((*current_ptr_ptr)->next);
+ ++match_count;
+ if (counted_name_mode
+ && match_count != counted_name_counter)
+ {
+ /* Counting, and didn't match on count; go on to the
+ next one. */
+ }
+ else
+ {
+ found = true;
+ something_changed = true;
+ if (verbose)
+ printf ("d - %s\n",
+ *files_to_delete);
+ *current_ptr_ptr = ((*current_ptr_ptr)->next);
+ goto next_file;
+ }
}
+
+ current_ptr_ptr = &((*current_ptr_ptr)->next);
}
if (verbose && found == false)
{
- printf ("No member named `%s'\n", *files_to_delete);
+ /* xgettext:c-format */
+ printf (_("No member named `%s'\n"), *files_to_delete);
}
next_file:
;
}
if (something_changed == true)
- {
- write_archive (arch);
- }
+ write_archive (arch);
+ else
+ output_filename = NULL;
}
@@ -1140,9 +1226,9 @@ move_members (arch, files_to_move)
current_ptr_ptr = &((*current_ptr_ptr)->next);
}
- fprintf (stderr, "%s: no entry %s in archive %s!\n",
- program_name, *files_to_move, arch->filename);
- xexit (1);
+ /* xgettext:c-format */
+ fatal (_("no entry %s in archive %s!"), *files_to_move, arch->filename);
+
next_file:;
}
@@ -1189,7 +1275,8 @@ replace_members (arch, files_to_move, quick)
goto next_file;
}
if (bfd_stat_arch_elt (current, &asbuf) != 0)
- fatal ("internal stat error on %s", current->filename);
+ /* xgettext:c-format */
+ fatal (_("internal stat error on %s"), current->filename);
if (fsbuf.st_mtime <= asbuf.st_mtime)
goto next_file;
@@ -1247,6 +1334,8 @@ replace_members (arch, files_to_move, quick)
if (changed)
write_archive (arch);
+ else
+ output_filename = NULL;
}
static void
@@ -1276,7 +1365,7 @@ ranlib_touch (archname)
bfd *arch;
char **matching;
- f = open (archname, O_RDWR, 0);
+ f = open (archname, O_RDWR | O_BINARY, 0);
if (f < 0)
{
bfd_set_error (bfd_error_system_call);
@@ -1298,7 +1387,8 @@ ranlib_touch (archname)
}
if (! bfd_has_map (arch))
- fatal ("%s: no archive map to update", archname);
+ /* xgettext:c-format */
+ fatal (_("%s: no archive map to update"), archname);
bfd_update_armap_timestamp (arch);
diff --git a/contrib/binutils/binutils/arparse.y b/contrib/binutils/binutils/arparse.y
index e8457f6..a5e90fa 100644
--- a/contrib/binutils/binutils/arparse.y
+++ b/contrib/binutils/binutils/arparse.y
@@ -1,7 +1,7 @@
%{
/* arparse.y - Stange script language parser */
-/* Copyright (C) 1992, 93, 95, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 95, 97, 98, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bucomm.h"
#include "arsup.h"
extern int verbose;
+extern int yylex PARAMS ((void));
static int yyerror PARAMS ((const char *));
%}
@@ -192,10 +193,10 @@ verbose_command:
static int
yyerror (x)
- const char *x;
+ const char *x ATTRIBUTE_UNUSED;
{
extern int linenumber;
- printf ("Syntax error in archive script, line %d\n", linenumber + 1);
+ printf (_("Syntax error in archive script, line %d\n"), linenumber + 1);
return 0;
}
diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c
index 6e02283..d6809fc 100644
--- a/contrib/binutils/binutils/arsup.c
+++ b/contrib/binutils/binutils/arsup.c
@@ -1,5 +1,6 @@
/* arsup.c - Archive support for MRI compatibility
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -83,7 +84,7 @@ map_over_list (arch, function, list)
prev = head;
}
if (! found)
- fprintf (stderr, "No entry %s in archive.\n", ptr->name);
+ fprintf (stderr, _("No entry %s in archive.\n"), ptr->name);
}
}
}
@@ -95,7 +96,7 @@ FILE *outfile;
static void
ar_directory_doer (abfd, ignore)
bfd *abfd;
- bfd *ignore;
+ bfd *ignore ATTRIBUTE_UNUSED;
{
print_arelt_descr(outfile, abfd, verbose);
}
@@ -115,7 +116,7 @@ ar_directory (ar_name, list, output)
if (outfile == 0)
{
outfile = stdout;
- fprintf (stderr,"Can't open file %s\n", output);
+ fprintf (stderr,_("Can't open file %s\n"), output);
output = 0;
}
}
@@ -163,7 +164,7 @@ DEFUN(ar_open,(name, t),
obfd = bfd_openw(tname, NULL);
if (!obfd) {
- fprintf(stderr,"%s: Can't open output archive %s\n", program_name,
+ fprintf(stderr,_("%s: Can't open output archive %s\n"), program_name,
tname);
maybequit();
@@ -175,13 +176,13 @@ DEFUN(ar_open,(name, t),
bfd *ibfd;
ibfd = bfd_openr(name, NULL);
if (!ibfd) {
- fprintf(stderr,"%s: Can't open input archive %s\n",
+ fprintf(stderr,_("%s: Can't open input archive %s\n"),
program_name, name);
maybequit();
return;
}
if (bfd_check_format(ibfd, bfd_archive) != true) {
- fprintf(stderr,"%s: file %s is not an archive\n", program_name,
+ fprintf(stderr,_("%s: file %s is not an archive\n"), program_name,
name);
maybequit();
return;
@@ -222,7 +223,7 @@ ar_addlib (name, list)
{
if (obfd == NULL)
{
- fprintf (stderr, "%s: no output archive specified yet\n", program_name);
+ fprintf (stderr, _("%s: no output archive specified yet\n"), program_name);
maybequit ();
}
else
@@ -242,7 +243,7 @@ DEFUN(ar_addmod, (list),
struct list *list)
{
if (!obfd) {
- fprintf(stderr, "%s: no open output archive\n", program_name);
+ fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
@@ -250,7 +251,7 @@ DEFUN(ar_addmod, (list),
while (list) {
bfd *abfd = bfd_openr(list->name, NULL);
if (!abfd) {
- fprintf(stderr,"%s: can't open file %s\n", program_name,
+ fprintf(stderr,_("%s: can't open file %s\n"), program_name,
list->name);
maybequit();
}
@@ -277,7 +278,7 @@ DEFUN(ar_delete, (list),
struct list *list)
{
if (!obfd) {
- fprintf(stderr, "%s: no open output archive\n", program_name);
+ fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
@@ -298,7 +299,7 @@ DEFUN(ar_delete, (list),
member = member->next;
}
if (!found) {
- fprintf(stderr,"%s: can't find module file %s\n", program_name,
+ fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
list->name);
maybequit();
}
@@ -313,7 +314,7 @@ DEFUN_VOID(ar_save)
{
if (!obfd) {
- fprintf(stderr, "%s: no open output archive\n", program_name);
+ fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else {
@@ -333,7 +334,7 @@ DEFUN(ar_replace, (list),
struct list *list)
{
if (!obfd) {
- fprintf(stderr, "%s: no open output archive\n", program_name);
+ fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
@@ -351,7 +352,7 @@ DEFUN(ar_replace, (list),
bfd *abfd = bfd_openr(list->name, 0);
if (!abfd)
{
- fprintf(stderr, "%s: can't open file %s\n", program_name, list->name);
+ fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name);
maybequit();
}
else {
@@ -367,11 +368,11 @@ DEFUN(ar_replace, (list),
}
if (!found) {
bfd *abfd = bfd_openr(list->name, 0);
- fprintf(stderr,"%s: can't find module file %s\n", program_name,
+ fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
list->name);
if (!abfd)
{
- fprintf(stderr, "%s: can't open file %s\n", program_name, list->name);
+ fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name);
maybequit();
}
else
@@ -391,14 +392,14 @@ DEFUN_VOID(ar_list)
{
if (!obfd)
{
- fprintf(stderr, "%s: no open output archive\n", program_name);
+ fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else {
bfd *abfd;
outfile = stdout;
verbose =1 ;
- printf("Current open archive is %s\n", bfd_get_filename (obfd));
+ printf(_("Current open archive is %s\n"), bfd_get_filename (obfd));
for (abfd = obfd->archive_head;
abfd != (bfd *)NULL;
abfd = abfd->next)
@@ -425,7 +426,7 @@ DEFUN(ar_extract,(list),
if (!obfd)
{
- fprintf(stderr, "%s: no open archive\n", program_name);
+ fprintf(stderr, _("%s: no open archive\n"), program_name);
maybequit();
}
else
@@ -446,7 +447,7 @@ DEFUN(ar_extract,(list),
}
if (!found) {
bfd_openr(list->name, 0);
- fprintf(stderr,"%s: can't find module file %s\n", program_name,
+ fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
list->name);
}
diff --git a/contrib/binutils/binutils/binutils.texi b/contrib/binutils/binutils/binutils.texi
index ff6ecd3..1820d66 100644
--- a/contrib/binutils/binutils/binutils.texi
+++ b/contrib/binutils/binutils/binutils.texi
@@ -5,15 +5,28 @@
@ifinfo
@format
START-INFO-DIR-ENTRY
-* Binutils: (binutils). The GNU binary utilities "ar", "objcopy",
- "objdump", "nm", "nlmconv", "size",
- "strings", "strip", and "ranlib".
+* Binutils: (binutils). The GNU binary utilities.
+* ar: (binutils)ar. Create, modify, and extract from archives
+* nm: (binutils)nm. List symbols from object files
+* objcopy: (binutils)objcopy. Copy and translate object files
+* objdump: (binutils)objdump. Display information from object files
+* ranlib: (binutils)ranlib. Generate index to archive contents
+* readelf: (binutils)readelf. Display the contents of ELF format files.
+* size: (binutils)size. List section sizes and total size
+* strings: (binutils)strings. List printable strings from files
+* strip: (binutils)strip. Discard symbols
+* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols
+* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt
+* addr2line: (binutils)addr2line. Convert addresses to file and line
+* nlmconv: (binutils)nlmconv. Converts object code into an NLM
+* windres: (binutils)windres. Manipulate Windows resources
+* dlltool: (binutils)dlltool. Create files needed to build and use DLLs
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@ifinfo
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+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
@@ -39,9 +52,9 @@ into another language, under the above conditions for modified versions.
@synindex ky cp
@c
@c This file documents the GNU binary utilities "ar", "ld", "objcopy",
-@c "objdump", "nm", "size", "strings", "strip", and "ranlib".
+@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
@c
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
@c
@c This text may be freely distributed under the terms of the GNU
@c General Public License.
@@ -105,6 +118,9 @@ Display information from object files
@item ranlib
Generate index to archive contents
+@item readelf
+Display the contents of ELF format files.
+
@item size
List file section sizes and total size
@@ -115,7 +131,8 @@ List printable strings from files
Discard symbols
@item c++filt
-Demangle encoded C++ symbols
+Demangle encoded C++ symbols (on MS-DOS, this program is named
+@code{cxxfilt})
@item addr2line
Convert addresses into file names and line numbers
@@ -125,6 +142,9 @@ Convert object code into a Netware Loadable Module
@item windres
Manipulate Windows resources
+
+@item dlltool
+Create the files needed to build and use Dynamic Link Libraries
@end table
@end iftex
@@ -134,13 +154,16 @@ Manipulate Windows resources
* objcopy:: Copy and translate object files
* objdump:: Display information from object files
* ranlib:: Generate index to archive contents
+* readelf:: Display the contents of ELF format files.
* size:: List section sizes and total size
* strings:: List printable strings from files
* strip:: Discard symbols
* c++filt:: Filter to demangle encoded C++ symbols
+* cxxfilt: c++filt. MS-DOS name for c++filt
* addr2line:: Convert addresses to file and line
* nlmconv:: Converts object code into an NLM
* windres:: Manipulate Windows resources
+* dlltool:: Create files needed to build and use DLLs
* Selecting The Target System:: How these utilities determine the target.
* Reporting Bugs:: Reporting Bugs
* Index:: Index
@@ -153,7 +176,7 @@ Manipulate Windows resources
@cindex archives
@cindex collections of files
@smallexample
-ar [-]@var{p}[@var{mod} [@var{relpos}]] @var{archive} [@var{member}@dots{}]
+ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
ar -M [ <mri-script ]
@end smallexample
@@ -211,7 +234,7 @@ program.
@section Controlling @code{ar} on the command line
@smallexample
-ar [-]@var{p}[@var{mod} [@var{relpos}]] @var{archive} [@var{member}@dots{}]
+ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
@end smallexample
@cindex Unix compatibility, @code{ar}
@@ -375,12 +398,25 @@ This modifier is accepted but not used.
@c whaffor ar l modifier??? presumably compat; with
@c what???---doc@@cygnus.com, 25jan91
+@item N
+Uses the @var{count} parameter. This is used if there are multiple
+entries in the archive with the same name. Extract or delete instance
+@var{count} of the given name from the archive.
+
@item o
@cindex dates in archive
Preserve the @emph{original} dates of members when extracting them. If
you do not specify this modifier, files extracted from the archive
are stamped with the time of extraction.
+@item P
+Use the full path name when matching names in the archive. @sc{gnu}
+@code{ar} can not create an archive with a full path name (such archives
+are not POSIX complaint), but other archive creators can. This option
+will cause @sc{gnu} @code{ar} to match file names using a complete path
+name, which can be convenient when extracting a single file from an
+archive created by another tool.
+
@item s
@cindex writing archive index
Write an object-file index into the archive, or update an existing one,
@@ -494,7 +530,7 @@ Add each named @var{member} as a module in the current archive.
Requires prior use of @code{OPEN} or @code{CREATE}.
@item CLEAR
-Discard the contents of the current archive, cancelling the effect of
+Discard the contents of the current archive, canceling the effect of
any operations since the last @code{SAVE}. May be executed (with no
effect) even if no current archive is specified.
@@ -546,7 +582,7 @@ Requires prior use of @code{OPEN} or @code{CREATE}.
@item LIST
Display full contents of the current archive, in ``verbose'' style
regardless of the state of @code{VERBOSE}. The effect is like @samp{ar
-tv @var{archive}}). (This single command is a @sc{gnu} @code{ld}
+tv @var{archive}}. (This single command is a @sc{gnu} @code{ar}
enhancement, rather than present for MRI compatibility.)
Requires prior use of @code{OPEN} or @code{CREATE}.
@@ -605,7 +641,7 @@ nm [ -a | --debug-syms ] [ -g | --extern-only ]
@end smallexample
@sc{gnu} @code{nm} lists the symbols from object files @var{objfile}@dots{}.
-If no object files are listed as arguments, @code{nm} assumes
+If no object files are listed as arguments, @code{nm} assumes the file
@file{a.out}.
For each symbol, @code{nm} shows:
@@ -664,11 +700,18 @@ The symbol is in the text (code) section.
@item U
The symbol is undefined.
+@item V
+The symbol is a weak object. When a weak defined symbol is linked with
+a normal defined symbol, the normal defined symbol is used with no error.
+When a weak undefined symbol is linked and the symbol is not defined,
+the value of the weak symbol becomes zero with no error.
+
@item W
-The symbol is weak. When a weak defined symbol is linked with a normal
-defined symbol, the normal defined symbol is used with no error. When a
-weak undefined symbol is linked and the symbol is not defined, the value
-of the weak symbol becomes zero with no error.
+The symbol is a weak symbol that has not been specifically tagged as a
+weak object symbol. When a weak defined symbol is linked with a normal
+defined symbol, the normal defined symbol is used with no error.
+When a weak undefined symbol is linked and the symbol is not defined,
+the value of the weak symbol becomes zero with no error.
@item -
The symbol is a stabs symbol in an a.out object file. In this case, the
@@ -695,7 +738,7 @@ equivalent.
@cindex input file name
@cindex file name
@cindex source file name
-Precede each symbol by the name of the input file (or archive element)
+Precede each symbol by the name of the input file (or archive member)
in which it was found, rather than identifying the input file once only,
before all of its symbols.
@@ -829,17 +872,20 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
[ -x | --discard-all ] [ -X | --discard-locals ]
[ -b @var{byte} | --byte=@var{byte} ]
[ -i @var{interleave} | --interleave=@var{interleave} ]
+ [ -j @var{sectionname} | --only-section=@var{sectionname} ]
[ -R @var{sectionname} | --remove-section=@var{sectionname} ]
[ -p | --preserve-dates ] [ --debugging ]
[ --gap-fill=@var{val} ] [ --pad-to=@var{address} ]
[ --set-start=@var{val} ] [ --adjust-start=@var{incr} ]
- [ --adjust-vma=@var{incr} ]
- [ --adjust-section-vma=@var{section}@{=,+,-@}@var{val} ]
- [ --adjust-warnings ] [ --no-adjust-warnings ]
- [ --set-section-flags=@var{section}=@var{flags} ]
- [ --add-section=@var{sectionname}=@var{filename} ]
+ [ --change-addresses=@var{incr} ]
+ [ --change-section-address @var{section}@{=,+,-@}@var{val} ]
+ [ --change-section-lma @var{section}@{=,+,-@}@var{val} ]
+ [ --change-section-vma @var{section}@{=,+,-@}@var{val} ]
+ [ --change-warnings ] [ --no-change-warnings ]
+ [ --set-section-flags @var{section}=@var{flags} ]
+ [ --add-section @var{sectionname}=@var{filename} ]
[ --change-leading-char ] [ --remove-leading-char ]
- [ --weaken ]
+ [ --redefine-sym @var{old}=@var{new} ] [ --weaken ]
[ -v | --verbose ] [ -V | --version ] [ --help ]
@var{infile} [@var{outfile}]
@end smallexample
@@ -869,12 +915,12 @@ the load address of the lowest section copied into the output file.
When generating an S-record or a raw binary file, it may be helpful to
use @samp{-S} to remove sections containing debugging information. In
some cases @samp{-R} will be useful to remove sections which contain
-information which is not needed by the binary file.
+information that is not needed by the binary file.
@table @code
@item @var{infile}
@itemx @var{outfile}
-The source and output files, respectively.
+The input and output files, respectively.
If you do not specify @var{outfile}, @code{objcopy} creates a
temporary file and destructively renames the result with
the name of @var{infile}.
@@ -895,6 +941,12 @@ Use @var{bfdname} as the object format for both the input and the output
file; i.e., simply transfer data from source to destination with no
translation. @xref{Target Selection}, for more information.
+@item -j @var{sectionname}
+@itemx --only-section=@var{sectionname}
+Copy only the named section from the input file to the output file.
+This option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+
@item -R @var{sectionname}
@itemx --remove-section=@var{sectionname}
Remove any section named @var{sectionname} from the output file. This
@@ -979,46 +1031,84 @@ done by increasing the size of the last section. The extra space is
filled in with the value specified by @samp{--gap-fill} (default zero).
@item --set-start @var{val}
-Set the address of the new file to @var{val}. Not all object file
+Set the start address of the new file to @var{val}. Not all object file
formats support setting the start address.
-@item --adjust-start @var{incr}
-Adjust the start address by adding @var{incr}. Not all object file
+@item --change-start @var{incr}
+@itemx --adjust-start @var{incr}
+@cindex changing start address
+Change the start address by adding @var{incr}. Not all object file
formats support setting the start address.
-@item --adjust-vma @var{incr}
-Adjust the address of all sections, as well as the start address, by
-adding @var{incr}. Some object file formats do not permit section
-addresses to be changed arbitrarily. Note that this does not relocate
-the sections; if the program expects sections to be loaded at a certain
-address, and this option is used to change the sections such that they
-are loaded at a different address, the program may fail.
-
-@item --adjust-section-vma @var{section}@{=,+,-@}@var{val}
-Set or adjust the address of the named @var{section}. If @samp{=} is
-used, the section address is set to @var{val}. Otherwise, @var{val} is
-added to or subtracted from the section address. See the comments under
-@samp{--adjust-vma}, above. If @var{section} does not exist in the
-input file, a warning will be issued, unless @samp{--no-adjust-warnings}
-is used.
-
-@item --adjust-warnings
-If @samp{--adjust-section-vma} is used, and the named section does not
-exist, issue a warning. This is the default.
-
-@item --no-adjust-warnings
-Do not issue a warning if @samp{--adjust-section-vma} is used, even if
-the named section does not exist.
+@item --change-addresses @var{incr}
+@itemx --adjust-vma @var{incr}
+@cindex changing object addresses
+Change the VMA and LMA addresses of all sections, as well as the start
+address, by adding @var{incr}. Some object file formats do not permit
+section addresses to be changed arbitrarily. Note that this does not
+relocate the sections; if the program expects sections to be loaded at a
+certain address, and this option is used to change the sections such
+that they are loaded at a different address, the program may fail.
+
+@item --change-section-address @var{section}@{=,+,-@}@var{val}
+@itemx --adjust-section-vma @var{section}@{=,+,-@}@var{val}
+@cindex changing section address
+Set or change both the VMA address and the LMA address of the named
+@var{section}. If @samp{=} is used, the section address is set to
+@var{val}. Otherwise, @var{val} is added to or subtracted from the
+section address. See the comments under @samp{--change-addresses},
+above. If @var{section} does not exist in the input file, a warning will
+be issued, unless @samp{--no-change-warnings} is used.
+
+@item --change-section-lma @var{section}@{=,+,-@}@var{val}
+@cindex changing section LMA
+Set or change the LMA address of the named @var{section}. The LMA
+address is the address where the section will be loaded into memory at
+program load time. Normally this is the same as the VMA address, which
+is the address of the section at program run time, but on some systems,
+especially those where a program is held in ROM, the two can be
+different. If @samp{=} is used, the section address is set to
+@var{val}. Otherwise, @var{val} is added to or subtracted from the
+section address. See the comments under @samp{--change-addresses},
+above. If @var{section} does not exist in the input file, a warning
+will be issued, unless @samp{--no-change-warnings} is used.
+
+@item --change-section-vma @var{section}@{=,+,-@}@var{val}
+@cindex changing section VMA
+Set or change the VMA address of the named @var{section}. The VMA
+address is the address where the section will be located once the
+program has started executing. Normally this is the same as the LMA
+address, which is the address where the section will be loaded into
+memory, but on some systems, especially those where a program is held in
+ROM, the two can be different. If @samp{=} is used, the section address
+is set to @var{val}. Otherwise, @var{val} is added to or subtracted
+from the section address. See the comments under
+@samp{--change-addresses}, above. If @var{section} does not exist in
+the input file, a warning will be issued, unless
+@samp{--no-change-warnings} is used.
+
+@item --change-warnings
+@itemx --adjust-warnings
+If @samp{--change-section-address} or @samp{--change-section-lma} or
+@samp{--change-section-vma} is used, and the named section does not
+exist, issue a warning. This is the default.
+
+@item --no-change-warnings
+@itemx --no-adjust-warnings
+Do not issue a warning if @samp{--change-section-address} or
+@samp{--adjust-section-lma} or @samp{--adjust-section-vma} is used, even
+if the named section does not exist.
@item --set-section-flags @var{section}=@var{flags}
Set the flags for the named section. The @var{flags} argument is a
comma separated string of flag names. The recognized names are
-@samp{alloc}, @samp{contents}, @samp{load}, @samp{readonly},
-@samp{code}, @samp{data}, and @samp{rom}. You can set the
-@samp{contents} flag for a section which does not have contents, but it
-is not meaningful to clear the @samp{contents} flag of a section which
-does have contents--just remove the section instead. Not all flags are
-meaningful for all object file formats.
+@samp{alloc}, @samp{contents}, @samp{load}, @samp{noload},
+@samp{readonly}, @samp{code}, @samp{data}, @samp{rom}, @samp{share}, and
+@samp{debug}. You can set the @samp{contents} flag for a section which
+does not have contents, but it is not meaningful to clear the
+@samp{contents} flag of a section which does have contents--just remove
+the section instead. Not all flags are meaningful for all object file
+formats.
@item --add-section @var{sectionname}=@var{filename}
Add a new section named @var{sectionname} while copying the file. The
@@ -1047,6 +1137,11 @@ different conventions for symbol names. This is different from
when appropriate, regardless of the object file format of the output
file.
+@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
+source, and there are name collisions.
+
@item --weaken
Change all global symbols in the file to be weak. This can be useful
when building an object which will be linked against other objects using
@@ -1074,23 +1169,38 @@ Show a summary of the options to @code{objcopy}.
@smallexample
objdump [ -a | --archive-headers ]
- [ -b @var{bfdname} | --target=@var{bfdname} ] [ --debugging ]
- [ -C | --demangle ] [ -d | --disassemble ]
- [ -D | --disassemble-all ] [ --disassemble-zeroes ]
+ [ -b @var{bfdname} | --target=@var{bfdname} ]
+ [ -C | --demangle ]
+ [ -d | --disassemble ]
+ [ -D | --disassemble-all ]
+ [ -z | --disassemble-zeroes ]
[ -EB | -EL | --endian=@{big | little @} ]
[ -f | --file-headers ]
- [ -h | --section-headers | --headers ] [ -i | --info ]
+ [ --file-start-context ]
+ [ -g | --debugging ]
+ [ -h | --section-headers | --headers ]
+ [ -i | --info ]
[ -j @var{section} | --section=@var{section} ]
- [ -l | --line-numbers ] [ -S | --source ]
+ [ -l | --line-numbers ]
+ [ -S | --source ]
[ -m @var{machine} | --architecture=@var{machine} ]
- [ -r | --reloc ] [ -R | --dynamic-reloc ]
- [ -s | --full-contents ] [ --stabs ]
- [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
- [ -w | --wide ] [ --start-address=@var{address} ]
+ [ -M @var{options} | --disassembler-options=@var{options}]
+ [ -p | --private-headers ]
+ [ -r | --reloc ]
+ [ -R | --dynamic-reloc ]
+ [ -s | --full-contents ]
+ [ -G | --stabs ]
+ [ -t | --syms ]
+ [ -T | --dynamic-syms ]
+ [ -x | --all-headers ]
+ [ -w | --wide ]
+ [ --start-address=@var{address} ]
[ --stop-address=@var{address} ]
- [ --prefix-addresses] [ --[no-]show-raw-insn ]
+ [ --prefix-addresses]
+ [ --[no-]show-raw-insn ]
[ --adjust-vma=@var{offset} ]
- [ --version ] [ --help ]
+ [ -V | --version ]
+ [ -H | --help ]
@var{objfile}@dots{}
@end smallexample
@@ -1105,7 +1215,8 @@ specify archives, @code{objdump} shows information on each of the member
object files.
The long and short forms of options, shown here as alternatives, are
-equivalent. At least one option besides @samp{-l} must be given.
+equivalent. At least one option from the list
+@samp{-a,-d,-D,-f,-g,-G,-h,-H,-p,-r,-R,-S,-t,-T,-V,-x} must be given.
@table @code
@item -a
@@ -1151,6 +1262,7 @@ Besides removing any initial underscore prepended by the system, this
makes C++ function names readable. @xref{c++filt}, for more information
on demangling.
+@item -G
@item --debugging
Display debugging information. This attempts to parse debugging
information stored in the file and print it out using a C like syntax.
@@ -1193,6 +1305,12 @@ does not describe endianness information, such as S-records.
Display summary information from the overall header of
each of the @var{objfile} files.
+@item --file-start-context
+@cindex source code context
+Specify that when displaying interlisted source code/disassembly
+(assumes '-S') from a file that has not yet been displayed, extend the
+context to the start of the file.
+
@item -h
@itemx --section-header
@itemx --header
@@ -1236,10 +1354,41 @@ Only useful with @samp{-d}, @samp{-D}, or @samp{-r}.
@cindex architecture
@cindex disassembly architecture
Specify the architecture to use when disassembling object files. This
-can be useful when disasembling object files which do not describe
+can be useful when disassembling object files which do not describe
architecture information, such as S-records. You can list the available
architectures with the @samp{-i} option.
+@item -M @var{options}
+@itemx --disassembler-options=@var{options}
+Pass target specific information to the disassembler. Only supported on
+some targets.
+
+If the target is an ARM architecture then this switch can be used to
+select which register name set is used during disassembler. Specifying
+@samp{-M reg-name-std} (the default) will select the register names as
+used in ARM's instruction set documentation, but with register 13 called
+'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying
+@samp{-M reg-names-apcs} will select the name set used by the ARM
+Procedure Call Standard, whilst specifying @samp{-M reg-names-raw} will
+just use @samp{r} followed by the register number.
+
+There are also two variants on the APCS register naming scheme enabled
+by @samp{-M reg-names-atpcs} and @samp{-M reg-names-special-atpcs} which
+use the ARM/Thumb Procedure Call Standard naming conventions. (Eiuther
+with the normal register name sor the special register names).
+
+This option can also be used for ARM architectures to force the
+disassembler to interpret all instructions as THUMB instructions by
+using the switch @samp{--disassembler-options=force-thumb}. This can be
+useful when attempting to disassemble thumb code produced by other
+compilers.
+
+@item -p
+@itemx --private-headers
+Print information that is specific to the object file format. The exact
+information printed depends upon the object file format. For some
+object file formats, no additional information is printed.
+
@item -r
@itemx --reloc
@cindex relocation entries, in object file
@@ -1276,6 +1425,7 @@ in symbolic form. This is the default except when
When disassembling instructions, do not print the instruction bytes.
This is the default when @code{--prefix-addresses} is used.
+@item -G
@item --stabs
@cindex stab
@cindex .stab
@@ -1359,6 +1509,7 @@ The @sc{gnu} @code{ranlib} program is another form of @sc{gnu} @code{ar}; runnin
@table @code
@item -v
@itemx -V
+@itemx --version
Show the version number of @code{ranlib}.
@end table
@@ -1402,7 +1553,7 @@ Berkeley's.
Here is an example of the Berkeley (default) format of output from
@code{size}:
@smallexample
-size --format=Berkeley ranlib size
+$ size --format=Berkeley ranlib size
text data bss dec hex filename
294880 81920 11592 388392 5ed28 ranlib
294880 81920 11888 388688 5ee50 size
@@ -1412,7 +1563,7 @@ text data bss dec hex filename
This is the same data, but displayed closer to System V conventions:
@smallexample
-size --format=SysV ranlib size
+$ size --format=SysV ranlib size
ranlib :
section size addr
.text 294880 8192
@@ -1630,7 +1781,7 @@ Verbose output: list all object files modified. In the case of
archives, @samp{strip -v} lists all members of the archive.
@end table
-@node c++filt
+@node c++filt, addr2line, strip, Top
@chapter c++filt
@kindex c++filt
@@ -1638,18 +1789,23 @@ archives, @samp{strip -v} lists all members of the archive.
@smallexample
c++filt [ -_ | --strip-underscores ]
+ [ -j | --java ]
[ -n | --no-strip-underscores ]
[ -s @var{format} | --format=@var{format} ]
[ --help ] [ --version ] [ @var{symbol}@dots{} ]
@end smallexample
-The C++ language provides function overloading, which means that you can
-write many functions with the same name (providing each takes parameters
-of different types). All C++ function names are encoded into a
-low-level assembly label (this process is known as
-@dfn{mangling}). The @code{c++filt} program does the inverse mapping: it
-decodes (@dfn{demangles}) low-level names into user-level names so that
-the linker can keep these overloaded functions from clashing.
+@kindex cxxfilt
+The C++ and Java languages provides function overloading, which means
+that you can write many functions with the same name (providing each
+takes parameters of different types). All C++ and Java function names
+are encoded into a low-level assembly label (this process is known as
+@dfn{mangling}). The @code{c++filt}
+@footnote{MS-DOS does not allow @kbd{+} characters in file names, so on
+MS-DOS this program is named @code{cxxfilt}.}
+program does the inverse mapping: it decodes (@dfn{demangles}) low-level
+names into user-level names so that the linker can keep these overloaded
+functions from clashing.
Every alphanumeric word (consisting of letters, digits, underscores,
dollars, or periods) seen in the input is a potential label. If the
@@ -1674,6 +1830,11 @@ of every name. For example, the C name @code{foo} gets the low-level
name @code{_foo}. This option removes the initial underscore. Whether
@code{c++filt} removes the underscore by default is target dependent.
+@item -j
+@itemx --java
+Prints demangled names using Java syntax. The default is to use C++
+syntax.
+
@item -n
@itemx --no-strip-underscores
Do not remove the initial underscore.
@@ -1691,6 +1852,10 @@ the one used by the @sc{gnu} compiler (the default method)
the one used by the Lucid compiler
@item arm
the one specified by the C++ Annotated Reference Manual
+@item hp
+the one used by the HP compiler
+@item edg
+the one used by the EDG compiler
@end table
@item --help
@@ -1739,7 +1904,7 @@ information in the executable to figure out which file name and line
number are associated with a given address.
The executable to use is specified with the @code{-e} option. The
-default is @file{a.out}.
+default is the file @file{a.out}.
@code{addr2line} has two modes of operation.
@@ -1867,7 +2032,7 @@ Displays (on standard error) the linker command line used by @code{nlmconv}.
@item -l @var{linker}
@itemx --linker=@var{linker}
-Use @var{linker} for any linking. @var{linker} can be an abosolute or a
+Use @var{linker} for any linking. @var{linker} can be an absolute or a
relative pathname.
@item -h
@@ -1984,15 +2149,31 @@ Specify an include directory to use when reading an @code{rc} file.
option. @code{windres} will also search this directory when looking for
files named in the @code{rc} file.
-@item --define @var{sym[=val]}
+@item -D @var{target}
+@itemx --define @var{sym}[=@var{val}]
Specify a @code{-D} option to pass to the preprocessor when reading an
@code{rc} file.
+@item -v
+Enable verbose mode. This tells you what the preprocessor is if you
+didn't specify one.
+
@item --language @var{val}
Specify the default language to use when reading an @code{rc} file.
@var{val} should be a hexadecimal language code. The low eight bits are
the language, and the high eight bits are the sublanguage.
+@item --use-temp-file
+Use a temporary file to instead of using popen to read the output of
+the preprocessor. Use this option if the popen implementation is buggy
+on the host (eg., certain non-English language versions of Windows 95 and
+Windows 98 are known to have buggy popen where the output will instead
+go the console).
+
+@item --no-use-temp-file
+Use popen, not a temporary file, to read the output of the preprocessor.
+This is the default behaviour.
+
@item --help
Prints a usage summary.
@@ -2004,6 +2185,379 @@ If @code{windres} is compiled with @code{YYDEBUG} defined as @code{1},
this will turn on parser debugging.
@end table
+
+@node dlltool
+@chapter Create files needed to build and use DLLs
+@cindex DLL
+@kindex dlltool
+
+@code{dlltool} may be used to create the files needed to build and use
+dynamic link libraries (DLLs).
+
+@quotation
+@emph{Warning:} @code{dlltool} is not always built as part of the binary
+utilities, since it is only useful for those targets which support DLLs.
+@end quotation
+
+@smallexample
+dlltool [-d|--input-def @var{def-file-name}]
+ [-b|--base-file @var{base-file-name}]
+ [-e|--output-exp @var{exports-file-name}]
+ [-z|--output-def @var{def-file-name}]
+ [-l|--output-lib @var{library-file-name}]
+ [--export-all-symbols] [--no-export-all-symbols]
+ [--exclude-symbols @var{list}]
+ [--no-default-excludes]
+ [-S|--as @var{path-to-assembler}] [-f|--as-flags @var{options}]
+ [-D|--dllname @var{name}] [-m|--machine @var{machine}]
+ [-a|--add-indirect] [-U|--add-underscore] [-k|--kill-at]
+ [-A|--add-stdcall-alias]
+ [-x|--no-idata4] [-c|--no-idata5] [-i|--interwork]
+ [-n|--nodelete] [-v|--verbose] [-h|--help] [-V|--version]
+ [object-file @dots{}]
+@end smallexample
+
+@code{dlltool} reads its inputs, which can come from the @samp{-d} and
+@samp{-b} options as well as object files specified on the command
+line. It then processes these inputs and if the @samp{-e} option has
+been specified it creates a exports file. If the @samp{-l} option
+has been specified it creates a library file and if the @samp{-z} option
+has been specified it creates a def file. Any or all of the -e, -l
+and -z options can be present in one invocation of dlltool.
+
+When creating a DLL, along with the source for the DLL, it is necessary
+to have three other files. @code{dlltool} can help with the creation of
+these files.
+
+The first file is a @samp{.def} file which specifies which functions are
+exported from the DLL, which functions the DLL imports, and so on. This
+is a text file and can be created by hand, or @code{dlltool} can be used
+to create it using the @samp{-z} option. In this case @code{dlltool}
+will scan the object files specified on its command line looking for
+those functions which have been specially marked as being exported and
+put entries for them in the .def file it creates.
+
+In order to mark a function as being exported from a DLL, it needs to
+have an @samp{-export:<name_of_function>} entry in the @samp{.drectve}
+section of the object file. This can be done in C by using the
+asm() operator:
+
+@smallexample
+ asm (".section .drectve");
+ asm (".ascii \"-export:my_func\"");
+
+ int my_func (void) @{ @dots{} @}
+@end smallexample
+
+The second file needed for DLL creation is an exports file. This file
+is linked with the object files that make up the body of the DLL and it
+handles the interface between the DLL and the outside world. This is a
+binary file and it can be created by giving the @samp{-e} option to
+@code{dlltool} when it is creating or reading in a .def file.
+
+The third file needed for DLL creation is the library file that programs
+will link with in order to access the functions in the DLL. This file
+can be created by giving the @samp{-l} option to dlltool when it
+is creating or reading in a .def file.
+
+@code{dlltool} builds the library file by hand, but it builds the
+exports file by creating temporary files containing assembler statements
+and then assembling these. The @samp{-S} command line option can be
+used to specify the path to the assembler that dlltool will use,
+and the @samp{-f} option can be used to pass specific flags to that
+assembler. The @samp{-n} can be used to prevent dlltool from deleting
+these temporary assembler files when it is done, and if @samp{-n} is
+specified twice then this will prevent dlltool from deleting the
+temporary object files it used to build the library.
+
+Here is an example of creating a DLL from a source file @samp{dll.c} and
+also creating a program (from an object file called @samp{program.o})
+that uses that DLL:
+
+@smallexample
+ gcc -c dll.c
+ dlltool -e exports.o -l dll.lib dll.o
+ gcc dll.o exports.o -o dll.dll
+ gcc program.o dll.lib -o program
+@end smallexample
+
+The command line options have the following meanings:
+
+@table @code
+
+@item -d @var{filename}
+@itemx --input-def @var{filename}
+@cindex input .def file
+Specifies the name of a .def file to be read in and processed.
+
+@item -b @var{filename}
+@itemx --base-file @var{filename}
+@cindex base files
+Specifies the name of a base file to be read in and processed. The
+contents of this file will be added to the relocation section in the
+exports file generated by dlltool.
+
+@item -e @var{filename}
+@itemx --output-exp @var{filename}
+Specifies the name of the export file to be created by dlltool.
+
+@item -z @var{filename}
+@itemx --output-def @var{filename}
+Specifies the name of the .def file to be created by dlltool.
+
+@item -l @var{filename}
+@itemx --output-lib @var{filename}
+Specifies the name of the library file to be created by dlltool.
+
+@item --export-all-symbols
+Treat all global and weak defined symbols found in the input object
+files as symbols to be exported. There is a small list of symbols which
+are not exported by default; see the @code{--no-default-excludes}
+option. You may add to the list of symbols to not export by using the
+@code{--exclude-symbols} option.
+
+@item --no-export-all-symbols
+Only export symbols explicitly listed in an input .def file or in
+@samp{.drectve} sections in the input object files. This is the default
+behaviour. The @samp{.drectve} sections are created by @samp{dllexport}
+attributes in the source code.
+
+@item --exclude-symbols @var{list}
+Do not export the symbols in @var{list}. This is a list of symbol names
+separated by comma or colon characters. The symbol names should not
+contain a leading underscore. This is only meaningful when
+@code{--export-all-symbols} is used.
+
+@item --no-default-excludes
+When @code{--export-all-symbols} is used, it will by default avoid
+exporting certain special symbols. The current list of symbols to avoid
+exporting is @samp{DllMain@@12}, @samp{DllEntryPoint@@0},
+@samp{impure_ptr}. You may use the @code{--no-default-excludes} option
+to go ahead and export these special symbols. This is only meaningful
+when @code{--export-all-symbols} is used.
+
+@item -S @var{path}
+@itemx --as @var{path}
+Specifies the path, including the filename, of the assembler to be used
+to create the exports file.
+
+@item -f @var{switches}
+@itemx --as-flags @var{switches}
+Specifies any specific command line switches to be passed to the
+assembler when building the exports file. This option will work even if
+the @samp{-S} option is not used. This option only takes one argument,
+and if it occurs more than once on the command line, then later
+occurrences will override earlier occurrences. So if it is necessary to
+pass multiple switches to the assembler they should be enclosed in
+double quotes.
+
+@item -D @var{name}
+@itemx --dll-name @var{name}
+Specifies the name to be stored in the .def file as the name of the DLL
+when the @samp{-e} option is used. If this option is not present, then
+the filename given to the @samp{-e} option will be used as the name of
+the DLL.
+
+@item -m @var{machine}
+@itemx -machine @var{machine}
+Specifies the type of machine for which the library file should be
+built. @code{dlltool} has a built in default type, depending upon how
+it was created, but this option can be used to override that. This is
+normally only useful when creating DLLs for an ARM processor, when the
+contents of the DLL are actually encode using THUMB instructions.
+
+@item -a
+@itemx --add-indirect
+Specifies that when @code{dlltool} is creating the exports file it
+should add a section which allows the exported functions to be
+referenced without using the import library. Whatever the hell that
+means!
+
+@item -U
+@itemx --add-underscore
+Specifies that when @code{dlltool} is creating the exports file it
+should prepend an underscore to the names of the exported functions.
+
+@item -k
+@itemx --kill-at
+Specifies that when @code{dlltool} is creating the exports file it
+should not append the string @samp{@@ <number>}. These numbers are
+called ordinal numbers and they represent another way of accessing the
+function in a DLL, other than by name.
+
+@item -A
+@itemx --add-stdcall-alias
+Specifies that when @code{dlltool} is creating the exports file it
+should add aliases for stdcall symbols without @samp{@@ <number>}
+in addition to the symbols with @samp{@@ <number>}.
+
+@item -x
+@itemx --no-idata4
+Specifies that when @code{dlltool} is creating the exports and library
+files it should omit the .idata4 section. This is for compatibility
+with certain operating systems.
+
+@item -c
+@itemx --no-idata5
+Specifies that when @code{dlltool} is creating the exports and library
+files it should omit the .idata5 section. This is for compatibility
+with certain operating systems.
+
+@item -i
+@itemx --interwork
+Specifies that @code{dlltool} should mark the objects in the library
+file and exports file that it produces as supporting interworking
+between ARM and THUMB code.
+
+@item -n
+@itemx --nodelete
+Makes @code{dlltool} preserve the temporary assembler files it used to
+create the exports file. If this option is repeated then dlltool will
+also preserve the temporary object files it uses to create the library
+file.
+
+@item -v
+@itemx --verbose
+Make dlltool describe what it is doing.
+
+@item -h
+@itemx --help
+Displays a list of command line options and then exits.
+
+@item -V
+@itemx --version
+Displays dlltool's version number and then exits.
+
+@end table
+
+@node readelf
+@chapter readelf
+
+@cindex ELF file information
+@kindex readelf
+
+@smallexample
+readelf [ -a | --all ]
+ [ -h | --file-header]
+ [ -l | --program-headers | --segments]
+ [ -S | --section-headers | --sections]
+ [ -e | --headers]
+ [ -s | --syms | --symbols]
+ [ -n | --notes]
+ [ -r | --relocs]
+ [ -d | --dynamic]
+ [ -V | --version-info]
+ [ -D | --use-dynamic]
+ [ -x <number> | --hex-dump=<number>]
+ [ -w[liapr] | --debug-dump[=info,=line,=abbrev,=pubnames,=ranges]]
+ [ --histogram]
+ [ -v | --version]
+ [ -H | --help]
+ @var{elffile}@dots{}
+@end smallexample
+
+@code{readelf} displays information about one or more ELF format object
+files. The options control what particular information to display.
+
+@var{elffile}@dots{} are the object files to be examined. At the
+moment, @code{readelf} does not support examining archives, nor does it
+support examing 64 bit ELF files.
+
+The long and short forms of options, shown here as alternatives, are
+equivalent. At least one option besides @samp{-v} or @samp{-H} must be
+given.
+
+@table @code
+@item -a
+@itemx --all
+Equivalent to specifiying @samp{--file-header},
+@samp{--program-headers}, @samp{--sections}, @samp{--symbols},
+@samp{--relocs}, @samp{--dynamic}, @samp{--notes} and
+@samp{--version-info}.
+
+@item -h
+@itemx --file-header
+@cindex ELF file header information
+Displays the information contained in the ELF header at the start of the
+file.
+
+@item -l
+@itemx --program-headers
+@itemx --segments
+@cindex ELF program header information
+@cindex ELF segment information
+Displays the information contained in the file's segment headers, if it
+has any.
+
+@item -S
+@itemx --sections
+@itemx --section-headers
+@cindex ELF section information
+Displays the information contained in the file's section headers, if it
+has any.
+
+@item -s
+@itemx --symbols
+@itemx --syms
+@cindex ELF symbol table information
+Displays the entries in symbol table section of the file, if it has one.
+
+@item -e
+@itemx --headers
+Display all the headers in the file. Equivalent to @samp{-h -l -S}.
+
+@item -n
+@itemx --notes
+@cindex ELF core notes
+Displays the contents of the NOTE segment, if it exists.
+
+@item -r
+@itemx --relocs
+@cindex ELF reloc information
+Displays the contents of the file's relocation section, if it ha one.
+
+@item -d
+@itemx --dynamic
+@cindex ELF dynamic section information
+Displays the contents of the file's dynamic section, if it has one.
+
+@item -V
+@itemx --version-info
+@cindex ELF version sections informations
+Displays the contents of the version sections in the file, it they
+exist.
+
+@item -D
+@itemx --use-dynamic
+When displaying symbols, this option makes @code{readelf} use the
+symblol table in the file's dynamic section, rather than the one in the
+symbols section.
+
+@item -x <number>
+@itemx --hex-dump=<number>
+Displays the contents of the indicated section as a hexadecimal dump.
+
+@item -w[liapr]
+@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]
+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.
+
+@item --histogram
+Display a histogram of bucket list lengths when displaying the contents
+of the symbol tables.
+
+@item -v
+@itemx --version
+Display the version number of readelf.
+
+@item -H
+@itemx --help
+Display the command line options understood by @code{readelf}.
+
+@end table
+
+
@node Selecting The Target System
@chapter Selecting the target system
@@ -2053,9 +2607,9 @@ Some sample values are: @samp{a.out-hp300bsd}, @samp{ecoff-littlemips},
@samp{a.out-sunos-big}.
You can also specify a target using a configuration triplet. This is
-the same sort of name that is passed to configure to specify a target.
-When you use a configuration triplet as an argument, it must be fully
-canonicalized. You can see the canonical version of a triplet by
+the same sort of name that is passed to @file{configure} to specify a
+target. When you use a configuration triplet as an argument, it must be
+fully canonicalized. You can see the canonical version of a triplet by
running the shell script @file{config.sub} which is included with the
sources.
@@ -2377,9 +2931,10 @@ and then we might not encounter the bug.
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. Making them available
-for anonymous FTP is not as good, but may be the only reasonable choice
-for large object files.
+necessary to get them through the mail system. Note that
+@samp{bug-gnu-utils@@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.
If the source files were produced exclusively using @sc{gnu} programs
(e.g., @code{gcc}, @code{gas}, and/or the @sc{gnu} @code{ld}), then it
@@ -2398,7 +2953,7 @@ not notice unless it is glaringly wrong. You might as well not give us
a chance to make a mistake.
Even if the problem you experience is a fatal signal, you should still
-say so explicitly. Suppose something strange is going on, such as, your
+say so explicitly. Suppose something strange is going on, such as your
copy of the utility is out of synch, or you have encountered a bug in
the C library on your system. (This has happened!) Your copy might
crash and ours would not. If you told us to expect a crash, then when
@@ -2410,8 +2965,8 @@ to draw any conclusion from our observations.
If you wish to suggest changes to the source, send us context diffs, as
generated by @code{diff} with the @samp{-u}, @samp{-c}, or @samp{-p}
option. Always send diffs from the old file to the new file. If you
-even discuss something in the @code{ld} source, refer to it by context,
-not by line number.
+wish to discuss something in the @code{ld} source, refer to it by
+context, not by line number.
The line numbers in our development sources will not match those in your
sources. Your line numbers would convey no useful information to us.
diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c
index d5f2834..3406e1d 100644
--- a/contrib/binutils/binutils/bucomm.c
+++ b/contrib/binutils/binutils/bucomm.c
@@ -1,5 +1,6 @@
/* bucomm.c -- Bin Utils COMmon code.
- Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -33,12 +34,6 @@
typedef long time_t;
#endif
#endif
-
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/* Error reporting */
@@ -64,19 +59,37 @@ bfd_fatal (string)
xexit (1);
}
+void
+report (format, args)
+ const char * format;
+ va_list args;
+{
+ fprintf (stderr, "%s: ", program_name);
+ vfprintf (stderr, format, args);
+ putc ('\n', stderr);
+}
+
#ifdef ANSI_PROTOTYPES
void
fatal (const char *format, ...)
{
va_list args;
- fprintf (stderr, "%s: ", program_name);
va_start (args, format);
- vfprintf (stderr, format, args);
+ report (format, args);
va_end (args);
- putc ('\n', stderr);
xexit (1);
}
+
+void
+non_fatal (const char *format, ...)
+{
+ va_list args;
+
+ va_start (args, format);
+ report (format, args);
+ va_end (args);
+}
#else
void
fatal (va_alist)
@@ -85,14 +98,25 @@ fatal (va_alist)
char *Format;
va_list args;
- fprintf (stderr, "%s: ", program_name);
va_start (args);
Format = va_arg (args, char *);
- vfprintf (stderr, Format, args);
+ report (Format, args);
va_end (args);
- putc ('\n', stderr);
xexit (1);
}
+
+void
+non_fatal (va_alist)
+ va_dcl
+{
+ char *Format;
+ va_list args;
+
+ va_start (args);
+ Format = va_arg (args, char *);
+ report (Format, args);
+ va_end (args);
+}
#endif
/* Set the default BFD target based on the configured target. Doing
@@ -107,13 +131,8 @@ set_default_bfd_target ()
const char *target = TARGET;
if (! bfd_set_default_target (target))
- {
- char *errmsg;
-
- errmsg = (char *) xmalloc (100 + strlen (target));
- sprintf (errmsg, "can't set BFD default target to `%s'", target);
- bfd_fatal (errmsg);
- }
+ fatal (_("can't set BFD default target to `%s': %s"),
+ target, bfd_errmsg (bfd_get_error ()));
}
/* After a false return from bfd_check_format_matches with
@@ -124,10 +143,10 @@ void
list_matching_formats (p)
char **p;
{
- fprintf(stderr, "%s: Matching formats:", program_name);
+ fprintf (stderr, _("%s: Matching formats:"), program_name);
while (*p)
- fprintf(stderr, " %s", *p++);
- fprintf(stderr, "\n");
+ fprintf (stderr, " %s", *p++);
+ fputc ('\n', stderr);
}
/* List the supported targets. */
@@ -141,9 +160,9 @@ list_supported_targets (name, f)
int t;
if (name == NULL)
- fprintf (f, "Supported targets:");
+ fprintf (f, _("Supported targets:"));
else
- fprintf (f, "%s: supported targets:", name);
+ fprintf (f, _("%s: supported targets:"), name);
for (t = 0; bfd_target_vector[t] != NULL; t++)
fprintf (f, " %s", bfd_target_vector[t]->name);
fprintf (f, "\n");
@@ -234,10 +253,9 @@ parse_vma (s, arg)
const char *end;
ret = bfd_scan_vma (s, &end, 0);
+
if (*end != '\0')
- {
- fprintf (stderr, "%s: %s: bad number: %s\n", program_name, arg, s);
- exit (1);
- }
+ fatal (_("%s: bad number: %s"), arg, s);
+
return ret;
}
diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h
index 6279a8d..c6dc26a 100644
--- a/contrib/binutils/binutils/bucomm.h
+++ b/contrib/binutils/binutils/bucomm.h
@@ -1,5 +1,6 @@
/* bucomm.h -- binutils common include file.
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -25,6 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include "config.h"
+#include "bin-bugs.h"
+
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
#ifdef USE_BINARY_FOPEN
#include "fopen-bin.h"
@@ -78,6 +86,10 @@ extern char *sbrk ();
extern char *getenv ();
#endif
+#ifdef NEED_DECLARATION_ENVIRON
+extern char **environ;
+#endif
+
#ifndef O_RDONLY
#define O_RDONLY 0
#endif
@@ -96,11 +108,11 @@ extern char *getenv ();
#define SEEK_END 2
#endif
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(C_ALLOCA)
# undef alloca
# define alloca __builtin_alloca
#else
-# if HAVE_ALLOCA_H
+# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
# include <alloca.h>
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
@@ -113,12 +125,39 @@ void *alloca ();
# endif /* HAVE_ALLOCA_H */
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) gettext (String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# 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 _(String) (String)
+# define N_(String) (String)
+#endif
+
/* bucomm.c */
-void bfd_nonfatal PARAMS ((CONST char *));
+void bfd_nonfatal PARAMS ((const char *));
+
+void bfd_fatal PARAMS ((const char *)) ATTRIBUTE_NORETURN;
-void bfd_fatal PARAMS ((CONST char *));
+void report PARAMS ((const char *, va_list));
-void fatal PARAMS ((CONST char *, ...));
+void fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+
+void non_fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
void set_default_bfd_target PARAMS ((void));
@@ -140,6 +179,11 @@ void mode_string PARAMS ((unsigned long mode, char *buf));
/* version.c */
extern void print_version PARAMS ((const char *));
+/* rename.c */
+extern void set_times PARAMS ((const char *, const struct stat *));
+
+extern int smart_rename PARAMS ((const char *, const char *, int));
+
/* libiberty */
PTR xmalloc PARAMS ((size_t));
diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c
index bae1e13..77dbd33 100644
--- a/contrib/binutils/binutils/coffdump.c
+++ b/contrib/binutils/binutils/coffdump.c
@@ -1,5 +1,5 @@
/* Coff file dumper.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -32,15 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PROGRAM_VERSION "1.0"
-char *xcalloc(a,b)
-int a;
-int b;
-{
- char *r = xmalloc(a*b);
- memset (r, 0, a * b);
- return r;
-}
-
static int atnl;
static void dump_coff_scope ();
@@ -100,7 +91,7 @@ dump_coff_lines (p)
int i;
int online = 0;
tab(1);
- printf("#lines %d ",p->nlines);
+ printf(_("#lines %d "),p->nlines);
for (i = 0; i < p->nlines; i++)
{
printf("(%d 0x%x)", p->lines[i], p->addresses[i]);
@@ -462,7 +453,7 @@ show_usage (file, status)
static void
show_help ()
{
- printf ("%s: Print a human readable interpretation of a SYSROFF object file\n",
+ printf (_("%s: Print a human readable interpretation of a SYSROFF object file\n"),
program_name);
show_usage (stdout, 0);
}
@@ -485,6 +476,12 @@ main (ac, av)
{ NULL, no_argument, 0, 0 }
};
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = av[0];
xmalloc_set_program_name (program_name);
@@ -498,7 +495,7 @@ main (ac, av)
show_help ();
/*NOTREACHED*/
case 'V':
- printf ("GNU %s version %s\n", program_name, PROGRAM_VERSION);
+ printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION);
exit (0);
/*NOTREACHED*/
case 0:
@@ -516,9 +513,7 @@ main (ac, av)
if (!input_file)
{
- fprintf (stderr,"%s: no input file specified\n",
- program_name);
- exit(1);
+ fatal (_("no input file specified"));
}
abfd = bfd_openr (input_file, 0);
diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in
index a9f38eb..3c26c5c 100644
--- a/contrib/binutils/binutils/config.in
+++ b/contrib/binutils/binutils/config.in
@@ -1,29 +1,11 @@
/* config.in. Generated automatically from configure.in by autoheader. */
-/* Name of package. */
-#undef PACKAGE
-
-/* Version of package. */
-#undef VERSION
-
-/* Configured target name. */
-#undef TARGET
-
-/* Whether strstr must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRSTR
-
-/* Whether fprintf must be declared even if <stdio.h> is included. */
-#undef NEED_DECLARATION_FPRINTF
-
-/* Whether sbrk must be declared even if <unistd.h> is included. */
-#undef NEED_DECLARATION_SBRK
-
-/* Whether getenv must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_GETENV
-
/* Define if using alloca.c. */
#undef C_ALLOCA
+/* Define to empty if the keyword does not work. */
+#undef const
+
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
@@ -34,9 +16,24 @@
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> 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 <sys/types.h> doesn't define. */
+#undef size_t
+
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
@@ -46,30 +43,75 @@
*/
#undef STACK_DIRECTION
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
-/* Is the type time_t defined in <time.h>? */
-#undef HAVE_TIME_T_IN_TIME_H
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
-/* Is the type time_t defined in <sys/types.h>? */
-#undef HAVE_TIME_T_IN_TYPES_H
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
-/* Does <utime.h> define struct utimbuf? */
-#undef HAVE_GOOD_UTIME_H
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Do we need to use the b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
/* Define if you have the sbrk function. */
#undef HAVE_SBRK
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
/* Define if you have the utimes function. */
#undef HAVE_UTIMES
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -82,5 +124,66 @@
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Does the platform use an executable suffix? */
+#undef HAVE_EXECUTABLE_SUFFIX
+
+/* Suffix used for executables, if any. */
+#undef EXECUTABLE_SUFFIX
+
+/* Is the type time_t defined in <time.h>? */
+#undef HAVE_TIME_T_IN_TIME_H
+
+/* Is the type time_t defined in <sys/types.h>? */
+#undef HAVE_TIME_T_IN_TYPES_H
+
+/* Does <utime.h> define struct utimbuf? */
+#undef HAVE_GOOD_UTIME_H
+
+/* Define if fprintf is not declared in system header files. */
+#undef NEED_DECLARATION_FPRINTF
+
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
+
+/* Define if sbrk is not declared in system header files. */
+#undef NEED_DECLARATION_SBRK
+
+/* Define if getenv is not declared in system header files. */
+#undef NEED_DECLARATION_GETENV
+
+/* Define if environ is not declared in system header files. */
+#undef NEED_DECLARATION_ENVIRON
+
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
+
+/* Configured target name. */
+#undef TARGET
+
diff --git a/contrib/binutils/binutils/configure b/contrib/binutils/binutils/configure
index 740ec6f..65f6612 100755
--- a/contrib/binutils/binutils/configure
+++ b/contrib/binutils/binutils/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,20 +12,24 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared build shared libraries [default=yes]
- --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-shared[=PKGS] build shared libraries [default=yes]"
ac_help="$ac_help
- --enable-static build static libraries [default=yes]
- --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-static[=PKGS] build static libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+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
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
@@ -45,6 +49,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -159,6 +164,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
@@ -329,6 +335,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=*)
@@ -350,7 +361,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
+ echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@@ -494,12 +505,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
@@ -520,9 +535,11 @@ 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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
+ac_exeext=
+ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -584,7 +601,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:588: checking host system type" >&5
+echo "configure:605: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -605,7 +622,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:609: checking target system type" >&5
+echo "configure:626: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -623,7 +640,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:627: checking build system type" >&5
+echo "configure:644: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -658,12 +675,12 @@ 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:662: checking for a BSD compatible install" >&5
+echo "configure:679: 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="${IFS}:"
+ 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
@@ -706,13 +723,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
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:716: checking whether build environment is sane" >&5
+echo "configure:732: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -769,7 +785,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:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:789: 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
@@ -798,7 +814,7 @@ fi
PACKAGE=binutils
-VERSION=2.9.1
+VERSION=2.9.5
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; }
@@ -815,7 +831,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:819: checking for working aclocal" >&5
+echo "configure:835: 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.
@@ -828,7 +844,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:832: checking for working autoconf" >&5
+echo "configure:848: 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.
@@ -841,7 +857,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:845: checking for working automake" >&5
+echo "configure:861: 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.
@@ -854,7 +870,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:858: checking for working autoheader" >&5
+echo "configure:874: 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.
@@ -867,7 +883,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:871: checking for working makeinfo" >&5
+echo "configure:887: 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.
@@ -927,18 +943,42 @@ else
enable_static=yes
fi
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+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
+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:934: checking for $ac_word" >&5
+echo "configure:973: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -959,15 +999,16 @@ 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:963: checking for $ac_word" >&5
+echo "configure:1003: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -988,16 +1029,17 @@ 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:992: checking for $ac_word" >&5
+echo "configure:1033: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1032,25 +1074,61 @@ 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:1084: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="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:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1116: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1050 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1127 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1132: \"$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
@@ -1064,18 +1142,24 @@ else
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:1074: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1158: 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:1079: checking whether we are using GNU C" >&5
+echo "configure:1163: 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
@@ -1084,7 +1168,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$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:1172: \"$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
@@ -1095,11 +1179,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1103: checking whether ${CC-cc} accepts -g" >&5
+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:1191: 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
@@ -1114,16 +1202,20 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
# Check whether --with-gnu-ld or --without-gnu-ld was given.
@@ -1134,18 +1226,23 @@ 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:1143: checking for ld used by GCC" >&5
+echo "configure:1234: 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]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -1157,19 +1254,19 @@ echo "configure:1143: 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:1161: checking for GNU ld" >&5
+echo "configure:1258: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1164: checking for non-GNU ld" >&5
+echo "configure:1261: 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}:"
+ 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"; then
+ 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.
@@ -1177,7 +1274,7 @@ else
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -1194,9 +1291,8 @@ 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:1200: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1296: 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
@@ -1212,44 +1308,43 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1216: checking for BSD-compatible nm" >&5
+echo "configure:1312: 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
- case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ 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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac
+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:1253: checking whether ln -s works" >&5
+echo "configure:1348: 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
@@ -1269,24 +1364,37 @@ else
echo "$ac_t""no" 1>&6
fi
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1289 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1397 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1304,17 +1412,122 @@ case "$host" in
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1419: 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 <<EOF
+#line 1424 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1431: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
;;
+
+
esac
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+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 \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# 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'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
@@ -1350,15 +1563,16 @@ 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:1354: checking for $ac_word" >&5
+echo "configure:1567: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -1379,16 +1593,17 @@ 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:1383: checking for $ac_word" >&5
+echo "configure:1597: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1423,25 +1638,61 @@ 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:1648: 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:1431: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1680: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1441 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1691 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1696: \"$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
@@ -1455,18 +1706,24 @@ else
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:1465: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1722: 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:1470: checking whether we are using GNU C" >&5
+echo "configure:1727: 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
@@ -1475,7 +1732,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1479: \"$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:1736: \"$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
@@ -1486,11 +1743,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1494: checking whether ${CC-cc} accepts -g" >&5
+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:1755: 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
@@ -1505,16 +1766,20 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
@@ -1523,15 +1788,16 @@ 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:1527: checking for $ac_word" >&5
+echo "configure:1792: 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
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_YACC="$ac_prog"
@@ -1552,18 +1818,135 @@ test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1823: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1838 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1844: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1855 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1861: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1872 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1878: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+missing_dir=`cd $ac_aux_dir && pwd`
+for ac_prog in flex lex
+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:1908: 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
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LEX" && break
+done
+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:1559: checking for $ac_word" >&5
+echo "configure:1941: 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
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_LEX="flex"
@@ -1588,7 +1971,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:1592: checking for yywrap in -l$ac_lib" >&5
+echo "configure:1975: 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
@@ -1596,7 +1979,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1600 "configure"
+#line 1983 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1607,7 +1990,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1994: \"$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
@@ -1629,132 +2012,1702 @@ fi
fi
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1634: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
+echo $ac_n "checking lex output file root""... $ac_c" 1>&6
+echo "configure:2017: 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
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+echo '%%
+%%' | $LEX
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+fi
+
+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:2038: 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
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LEXLIB"
+cat > conftest.$ac_ext <<EOF
+#line 2050 "configure"
+#include "confdefs.h"
+`cat $LEX_OUTPUT_ROOT.c`
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2057: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ cat >> confdefs.h <<\EOF
+#define YYTEXT_POINTER 1
+EOF
+
+fi
+
+
+ALL_LINGUAS=
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:2081: 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
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2102: 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
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1649 "configure"
+#line 2107 "configure"
#include "confdefs.h"
-#include <assert.h>
-Syntax Error
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2115: \"$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*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+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
+#line 2132 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+#line 2150 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
:
else
+ cat > conftest.$ac_ext <<EOF
+#line 2171 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2206: 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 <<EOF
+#line 2211 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2281: 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 <<EOF
+#line 2288 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2321: 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 <<EOF
+#line 2326 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2354: 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 <<EOF
+#line 2359 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+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:2389: 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 <<EOF
+#line 2394 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2401: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2422: 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 <<EOF
+#line 2427 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2455: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2487: 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 <<EOF
+#line 2492 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&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:2517: 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 <<EOF
+#line 2522 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2545: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2572: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2580 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2599: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+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:2624: 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
+#line 2629 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2634: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2663: 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 <<EOF
-#line 1666 "configure"
+#line 2668 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
-Syntax Error
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2691: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2716: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2724 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2864: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+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:2892: 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
+#line 2897 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2902: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP=/lib/cpp
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2932: 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 <<EOF
+#line 2937 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2960: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
rm -f conftest*
- ac_cv_prog_CPP="$CPP"
fi
- CPP="$ac_cv_prog_CPP"
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
else
- ac_cv_prog_CPP="$CPP"
+ echo "$ac_t""no" 1>&6
fi
-echo "$ac_t""$CPP" 1>&6
+done
-echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:1695: checking lex output file root" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2989: 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
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-echo '%%
-%%' | $LEX
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
+ cat > conftest.$ac_ext <<EOF
+#line 2994 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3017: \"$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
- { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
fi
+rm -f conftest*
fi
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:1716: checking whether yytext is a pointer" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3051: 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
- # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS="$LIBS"
-LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 1728 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 3056 "configure"
#include "confdefs.h"
-`cat $LEX_OUTPUT_ROOT.c`
+#include <locale.h>
int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3063: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3084: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3104: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3123: 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
+#line 3128 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3133: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+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:3150: 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 <<EOF
+#line 3155 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3162: \"$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
+ gt_cv_func_gettext_libc=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+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:3178: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3186 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3197: \"$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
+ 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"
-rm -f "${LEX_OUTPUT_ROOT}.c"
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:3213: 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 <<EOF
+#line 3218 "configure"
+#include "confdefs.h"
-echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
- cat >> confdefs.h <<\EOF
-#define YYTEXT_POINTER 1
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3225: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:3253: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3287: 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 <<EOF
+#line 3292 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3315: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:3342: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3378: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3410 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
EOF
+if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:3450: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3484: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3520: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3610: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ 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:3638: 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
+#line 3643 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3648: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ 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
+
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1758: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:3711: 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"
@@ -1764,96 +3717,122 @@ else
fi
echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
-echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:1776: checking for Cygwin32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+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:3734: 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 <<EOF
-#line 1781 "configure"
+#line 3739 "configure"
#include "confdefs.h"
int main() {
-return __CYGWIN32__;
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_cygwin32=yes
+ ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_cygwin32=no
+ ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_cygwin32" 1>&6
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:1805: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+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:3767: 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 <<EOF
-#line 1810 "configure"
+#line 3772 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_mingw32=yes
+ ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_mingw32=no
+ ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_mingw32" 1>&6
+echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
+test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1836: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+echo "configure:3798: 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 "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:3808: \"$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
-
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
fi
+
EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+if test -n "$EXEEXT"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_EXECUTABLE_SUFFIX 1
+EOF
+
+fi
+cat >> confdefs.h <<EOF
+#define EXECUTABLE_SUFFIX "${EXEEXT}"
+EOF
# host-specific stuff:
@@ -1868,15 +3847,16 @@ 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:1872: checking for $ac_word" >&5
+echo "configure:3851: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -1894,9 +3874,70 @@ 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:
+# 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:3890: 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'
+
# Put a plausible default for CC_FOR_BUILD in Makefile.
if test -z "$CC_FOR_BUILD"; then
@@ -1912,19 +3953,22 @@ 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:1916: checking for build system executable suffix" >&5
+echo "configure:3957: 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
- cat > ac_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
- ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
- bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
- rm -f ac_c_test*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
echo "$ac_t""$bfd_cv_build_exeext" 1>&6
@@ -1933,22 +3977,29 @@ echo "$ac_t""$bfd_cv_build_exeext" 1>&6
fi
+DEMANGLER_NAME=c++filt
+case "${host}" in
+ *-*-go32* | *-*-msdos*)
+ DEMANGLER_NAME=cxxfilt
+esac
+
+
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:1941: checking for $ac_hdr" >&5
+echo "configure:3992: 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
-#line 1946 "configure"
+#line 3997 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4002: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -1974,12 +4025,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1978: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4029: 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 <<EOF
-#line 1983 "configure"
+#line 4034 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1995,7 +4046,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -2018,19 +4069,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:2022: checking for working alloca.h" >&5
+echo "configure:4073: 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 <<EOF
-#line 2027 "configure"
+#line 4078 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4085: \"$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
@@ -2051,25 +4102,30 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2055: checking for alloca" >&5
+echo "configure:4106: 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 <<EOF
-#line 2060 "configure"
+#line 4111 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
# else
-# ifdef _AIX
- #pragma alloca
+# if HAVE_ALLOCA_H
+# include <alloca.h>
# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
+# endif
# endif
# endif
# endif
@@ -2079,7 +4135,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4139: \"$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
@@ -2104,19 +4160,19 @@ if test $ac_cv_func_alloca_works = no; then
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.o
+ ALLOCA=alloca.${ac_objext}
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2115: checking whether alloca needs Cray hooks" >&5
+echo "configure:4171: 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 <<EOF
-#line 2120 "configure"
+#line 4176 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2141,12 +4197,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:2145: checking for $ac_func" >&5
+echo "configure:4201: 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 <<EOF
-#line 2150 "configure"
+#line 4206 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2169,7 +4225,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4229: \"$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
@@ -2196,7 +4252,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2200: checking stack direction for C alloca" >&5
+echo "configure:4256: 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
@@ -2204,7 +4260,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2208 "configure"
+#line 4264 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2223,7 +4279,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4283: \"$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
@@ -2247,12 +4303,12 @@ fi
for ac_func in sbrk utimes
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2251: checking for $ac_func" >&5
+echo "configure:4307: 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 <<EOF
-#line 2256 "configure"
+#line 4312 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2275,7 +4331,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4335: \"$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
@@ -2300,20 +4356,84 @@ fi
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:4363: 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 <<EOF
+#line 4370 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char frexp();
+
+int main() {
+frexp()
+; return 0; }
+EOF
+if { (eval echo configure:4381: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+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 <<EOF
+#line 4392 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char frexp();
+
+int main() {
+frexp()
+; return 0; }
+EOF
+if { (eval echo configure:4403: \"$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
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_frexp" 1>&6
+if test "$ac_cv_search_frexp" != "no"; then
+ test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
+
+else :
+
+fi
+
echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:2305: checking for time_t in time.h" >&5
+echo "configure:4425: 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 <<EOF
-#line 2310 "configure"
+#line 4430 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_time_h=yes
else
@@ -2334,19 +4454,19 @@ EOF
fi
echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2338: checking for time_t in sys/types.h" >&5
+echo "configure:4458: 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 <<EOF
-#line 2343 "configure"
+#line 4463 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:2350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_types_h=yes
else
@@ -2369,12 +4489,12 @@ fi
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
echo $ac_n "checking for utime.h""... $ac_c" 1>&6
-echo "configure:2373: checking for utime.h" >&5
+echo "configure:4493: 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 <<EOF
-#line 2378 "configure"
+#line 4498 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TIME_H
@@ -2385,7 +4505,7 @@ int main() {
struct utimbuf s;
; return 0; }
EOF
-if { (eval echo configure:2389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_header_utime_h=yes
else
@@ -2406,12 +4526,12 @@ EOF
fi
echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:2410: checking whether fprintf must be declared" >&5
+echo "configure:4530: 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 <<EOF
-#line 2415 "configure"
+#line 4535 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2432,7 +4552,7 @@ int main() {
char *(*pfn) = (char *(*)) fprintf
; return 0; }
EOF
-if { (eval echo configure:2436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_fprintf=no
else
@@ -2446,20 +4566,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
if test $bfd_cv_decl_needed_fprintf = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo fprintf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_FPRINTF 1
EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:2458: checking whether strstr must be declared" >&5
+echo "configure:4577: 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 <<EOF
-#line 2463 "configure"
+#line 4582 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2480,7 +4599,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -2494,20 +4613,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
if test $bfd_cv_decl_needed_strstr = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRSTR 1
EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:2506: checking whether sbrk must be declared" >&5
+echo "configure:4624: 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 <<EOF
-#line 2511 "configure"
+#line 4629 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2528,7 +4646,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:2532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -2542,20 +4660,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
if test $bfd_cv_decl_needed_sbrk = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_SBRK 1
EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:2554: checking whether getenv must be declared" >&5
+echo "configure:4671: 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 <<EOF
-#line 2559 "configure"
+#line 4676 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2576,7 +4693,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:2580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -2590,9 +4707,55 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
if test $bfd_cv_decl_needed_getenv = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_GETENV 1
+EOF
+
+fi
+
+echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
+echo "configure:4718: 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 <<EOF
+#line 4723 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *(*pfn) = (char *(*)) environ
+; return 0; }
+EOF
+if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_decl_needed_environ=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_decl_needed_environ=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
+if test $bfd_cv_decl_needed_environ = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_ENVIRON 1
EOF
fi
@@ -2600,7 +4763,7 @@ fi
case "${host}" in
-i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
cat >> confdefs.h <<\EOF
#define USE_BINARY_FOPEN 1
EOF
@@ -2613,7 +4776,7 @@ esac
if test -n "$enable_targets"; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
+ result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result"; then
canon_targets="$canon_targets $result"
else
@@ -2630,13 +4793,15 @@ BUILD_SRCONV=
BUILD_DLLTOOL=
DLLTOOL_DEFS=
BUILD_WINDRES=
+BUILD_DLLWRAP=
+BUILD_MISC=
for targ in $target $canon_targets
do
if test "x$targ" = "xall"; then
all_targets=true
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
- BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)'
+ BUILD_SRCONV='$(SRCONV_PROG)'
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
else
case $targ in
@@ -2658,24 +4823,53 @@ do
;;
esac
case $targ in
- *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)' ;;
+ *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
esac
case $targ in
- arm-*pe*)
+ arm-*pe* | arm-*-wince)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- ;;
- i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32*)
+ ;;
+ thumb-*pe*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ 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"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- ;;
- powerpc*-*-*pe* | powerpc*-*-cygwin32)
+ BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
+ ;;
+ i3-686-*-interix)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
+ ;;
+ powerpc*-*-*pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- ;;
+ ;;
+ sh*-*-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mips*-*-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mcore-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mcore-*elf)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
+ ;;
esac
fi
done
@@ -2687,6 +4881,8 @@ done
+
+
cat >> confdefs.h <<EOF
#define TARGET "${target}"
EOF
@@ -2724,7 +4920,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -2791,7 +4987,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -2802,7 +4998,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2815,6 +5011,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -2849,8 +5046,8 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
@@ -2861,8 +5058,6 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@RANLIB@%$RANLIB%g
s%@CC@%$CC%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
s%@YACC@%$YACC%g
@@ -2870,19 +5065,44 @@ s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@CPP@%$CPP%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+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%@HDEFINES@%$HDEFINES%g
s%@AR@%$AR%g
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@ALLOCA@%$ALLOCA%g
+s%@DEMANGLER_NAME@%$DEMANGLER_NAME%g
s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
s%@BUILD_SRCONV@%$BUILD_SRCONV%g
s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
s%@BUILD_WINDRES@%$BUILD_WINDRES%g
+s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
+s%@BUILD_MISC@%$BUILD_MISC%g
s%@UNDERSCORE@%$UNDERSCORE%g
CEOF
@@ -2925,7 +5145,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3099,6 +5319,10 @@ EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+case "x$CONFIG_FILES" in
+*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+esac
+
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/binutils/binutils/configure.in b/contrib/binutils/binutils/configure.in
index 8b6dbfb..aa10ce9 100644
--- a/contrib/binutils/binutils/configure.in
+++ b/contrib/binutils/binutils/configure.in
@@ -1,11 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.5)
+AC_PREREQ(2.13)
AC_INIT(ar.c)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(binutils, 2.9.1)
+AM_INIT_AUTOMAKE(binutils, 2.9.5)
AM_PROG_LIBTOOL
@@ -37,12 +37,19 @@ fi
AC_PROG_CC
AC_PROG_YACC
-AC_PROG_LEX
-AC_DECL_YYTEXT
+AM_PROG_LEX
+
+ALL_LINGUAS=
+CY_GNU_GETTEXT
AM_MAINTAINER_MODE
-AM_CYGWIN32
-AM_EXEEXT
+AC_EXEEXT
+if test -n "$EXEEXT"; then
+ AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1,
+ [Does the platform use an executable suffix?])
+fi
+AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}",
+ [Suffix used for executables, if any.])
# host-specific stuff:
@@ -54,22 +61,33 @@ AC_SUBST(HDEFINES)
AR=${AR-ar}
AC_SUBST(AR)
AC_PROG_RANLIB
-AM_PROG_INSTALL
+AC_PROG_INSTALL
BFD_CC_FOR_BUILD
+DEMANGLER_NAME=c++filt
+case "${host}" in
+ *-*-go32* | *-*-msdos*)
+ DEMANGLER_NAME=cxxfilt
+esac
+AC_SUBST(DEMANGLER_NAME)
+
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
AC_HEADER_SYS_WAIT
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(sbrk utimes)
+# Some systems have frexp only in -lm, not in -lc.
+AC_SEARCH_LIBS(frexp, m)
+
AC_MSG_CHECKING(for time_t in time.h)
AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
[AC_TRY_COMPILE([#include <time.h>], [time_t i;],
bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)])
AC_MSG_RESULT($bu_cv_decl_time_t_time_h)
if test $bu_cv_decl_time_t_time_h = yes; then
- AC_DEFINE([HAVE_TIME_T_IN_TIME_H])
+ AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1,
+ [Is the type time_t defined in <time.h>?])
fi
AC_MSG_CHECKING(for time_t in sys/types.h)
@@ -78,7 +96,8 @@ AC_CACHE_VAL(bu_cv_decl_time_t_types_h,
bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)])
AC_MSG_RESULT($bu_cv_decl_time_t_types_h)
if test $bu_cv_decl_time_t_types_h = yes; then
- AC_DEFINE([HAVE_TIME_T_IN_TYPES_H])
+ AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1,
+ [Is the type time_t defined in <sys/types.h>?])
fi
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
@@ -94,13 +113,14 @@ AC_CACHE_VAL(bu_cv_header_utime_h,
bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)])
AC_MSG_RESULT($bu_cv_header_utime_h)
if test $bu_cv_header_utime_h = yes; then
- AC_DEFINE(HAVE_GOOD_UTIME_H)
+ AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
fi
BFD_NEED_DECLARATION(fprintf)
BFD_NEED_DECLARATION(strstr)
BFD_NEED_DECLARATION(sbrk)
BFD_NEED_DECLARATION(getenv)
+BFD_NEED_DECLARATION(environ)
BFD_BINARY_FOPEN
@@ -110,7 +130,7 @@ BFD_BINARY_FOPEN
if test -n "$enable_targets"; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
+ result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result"; then
canon_targets="$canon_targets $result"
else
@@ -127,13 +147,15 @@ BUILD_SRCONV=
BUILD_DLLTOOL=
DLLTOOL_DEFS=
BUILD_WINDRES=
+BUILD_DLLWRAP=
+BUILD_MISC=
for targ in $target $canon_targets
do
if test "x$targ" = "xall"; then
all_targets=true
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
- BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)'
+ BUILD_SRCONV='$(SRCONV_PROG)'
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
else
case $targ in
@@ -157,26 +179,55 @@ changequote([,])dnl
;;
esac
case $targ in
- *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)' ;;
+ *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
esac
case $targ in
- arm-*pe*)
+ arm-*pe* | arm-*-wince)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ thumb-*pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- ;;
+ ;;
changequote(,)dnl
- i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32*)
+ i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- ;;
- powerpc*-*-*pe* | powerpc*-*-cygwin32)
+ BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
+ ;;
+ i[3-6]86-*-interix)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
+ ;;
+ powerpc*-*-*pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
- ;;
+ ;;
+ sh*-*-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mips*-*-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mcore-*pe)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ ;;
+ mcore-*elf)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
+ ;;
esac
fi
done
@@ -187,8 +238,10 @@ AC_SUBST(BUILD_SRCONV)
AC_SUBST(BUILD_DLLTOOL)
AC_SUBST(DLLTOOL_DEFS)
AC_SUBST(BUILD_WINDRES)
+AC_SUBST(BUILD_DLLWRAP)
+AC_SUBST(BUILD_MISC)
-AC_DEFINE_UNQUOTED(TARGET, "${target}")
+AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
targ=$target
. $srcdir/../bfd/config.bfd
@@ -199,4 +252,9 @@ else
fi
AC_SUBST(UNDERSCORE)
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
+[
+case "x$CONFIG_FILES" in
+*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+esac
+])
diff --git a/contrib/binutils/binutils/debug.c b/contrib/binutils/binutils/debug.c
index 3b9b2b6..82a9094 100644
--- a/contrib/binutils/binutils/debug.c
+++ b/contrib/binutils/binutils/debug.c
@@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -541,6 +541,17 @@ struct debug_type_compare_list
struct debug_type *t2;
};
+/* During debug_get_real_type, a linked list of these structures is
+ kept on the stack to avoid infinite recursion. */
+
+struct debug_type_real_list
+{
+ /* Next type on list. */
+ struct debug_type_real_list *next;
+ /* The type we are checking. */
+ struct debug_type *t;
+};
+
/* Local functions. */
static void debug_error PARAMS ((const char *));
@@ -552,7 +563,8 @@ static struct debug_name *debug_add_to_current_namespace
enum debug_object_linkage));
static struct debug_type *debug_make_type
PARAMS ((struct debug_handle *, enum debug_type_kind, unsigned int));
-static struct debug_type *debug_get_real_type PARAMS ((PTR, debug_type));
+static struct debug_type *debug_get_real_type
+ PARAMS ((PTR, debug_type, struct debug_type_real_list *));
static boolean debug_write_name
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
struct debug_name *));
@@ -591,7 +603,7 @@ debug_error (message)
static struct debug_name *
debug_add_to_namespace (info, nsp, name, kind, linkage)
- struct debug_handle *info;
+ struct debug_handle *info ATTRIBUTE_UNUSED;
struct debug_namespace **nsp;
const char *name;
enum debug_object_kind kind;
@@ -638,7 +650,7 @@ debug_add_to_current_namespace (info, name, kind, linkage)
if (info->current_unit == NULL
|| info->current_file == NULL)
{
- debug_error ("debug_add_to_current_namespace: no current file");
+ debug_error (_("debug_add_to_current_namespace: no current file"));
return NULL;
}
@@ -721,7 +733,7 @@ debug_start_source (handle, name)
if (info->current_unit == NULL)
{
- debug_error ("debug_start_source: no debug_set_filename call");
+ debug_error (_("debug_start_source: no debug_set_filename call"));
return false;
}
@@ -780,7 +792,7 @@ debug_record_function (handle, name, return_type, global, addr)
if (info->current_unit == NULL)
{
- debug_error ("debug_record_function: no debug_set_filename call");
+ debug_error (_("debug_record_function: no debug_set_filename call"));
return false;
}
@@ -836,7 +848,7 @@ debug_record_parameter (handle, name, type, kind, val)
if (info->current_unit == NULL
|| info->current_function == NULL)
{
- debug_error ("debug_record_parameter: no current function");
+ debug_error (_("debug_record_parameter: no current function"));
return false;
}
@@ -870,13 +882,13 @@ debug_end_function (handle, addr)
|| info->current_block == NULL
|| info->current_function == NULL)
{
- debug_error ("debug_end_function: no current function");
+ debug_error (_("debug_end_function: no current function"));
return false;
}
if (info->current_block->parent != NULL)
{
- debug_error ("debug_end_function: some blocks were not closed");
+ debug_error (_("debug_end_function: some blocks were not closed"));
return false;
}
@@ -906,7 +918,7 @@ debug_start_block (handle, addr)
if (info->current_unit == NULL
|| info->current_block == NULL)
{
- debug_error ("debug_start_block: no current block");
+ debug_error (_("debug_start_block: no current block"));
return false;
}
@@ -944,14 +956,14 @@ debug_end_block (handle, addr)
if (info->current_unit == NULL
|| info->current_block == NULL)
{
- debug_error ("debug_end_block: no current block");
+ debug_error (_("debug_end_block: no current block"));
return false;
}
parent = info->current_block->parent;
if (parent == NULL)
{
- debug_error ("debug_end_block: attempt to close top level block");
+ debug_error (_("debug_end_block: attempt to close top level block"));
return false;
}
@@ -977,7 +989,7 @@ debug_record_line (handle, lineno, addr)
if (info->current_unit == NULL)
{
- debug_error ("debug_record_line: no current unit");
+ debug_error (_("debug_record_line: no current unit"));
return false;
}
@@ -1027,11 +1039,11 @@ debug_record_line (handle, lineno, addr)
boolean
debug_start_common_block (handle, name)
- PTR handle;
- const char *name;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
- debug_error ("debug_start_common_block: not implemented");
+ debug_error (_("debug_start_common_block: not implemented"));
return false;
}
@@ -1039,11 +1051,11 @@ debug_start_common_block (handle, name)
boolean
debug_end_common_block (handle, name)
- PTR handle;
- const char *name;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
- debug_error ("debug_end_common_block: not implemented");
+ debug_error (_("debug_end_common_block: not implemented"));
return false;
}
@@ -1131,13 +1143,13 @@ debug_record_typed_const (handle, name, type, val)
boolean
debug_record_label (handle, name, type, addr)
- PTR handle;
- const char *name;
- debug_type type;
- bfd_vma addr;
+ PTR handle ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ debug_type type ATTRIBUTE_UNUSED;
+ bfd_vma addr ATTRIBUTE_UNUSED;
{
/* FIXME. */
- debug_error ("debug_record_label not implemented");
+ debug_error (_("debug_record_label not implemented"));
return false;
}
@@ -1163,7 +1175,7 @@ debug_record_variable (handle, name, type, kind, val)
if (info->current_unit == NULL
|| info->current_file == NULL)
{
- debug_error ("debug_record_variable: no current file");
+ debug_error (_("debug_record_variable: no current file"));
return false;
}
@@ -1179,7 +1191,7 @@ debug_record_variable (handle, name, type, kind, val)
{
if (info->current_block == NULL)
{
- debug_error ("debug_record_variable: no current block");
+ debug_error (_("debug_record_variable: no current block"));
return false;
}
nsp = &info->current_block->locals;
@@ -1207,7 +1219,7 @@ debug_record_variable (handle, name, type, kind, val)
/*ARGSUSED*/
static struct debug_type *
debug_make_type (info, kind, size)
- struct debug_handle *info;
+ struct debug_handle *info ATTRIBUTE_UNUSED;
enum debug_type_kind kind;
unsigned int size;
{
@@ -1749,7 +1761,7 @@ debug_make_undefined_tagged_type (handle, name, kind)
break;
default:
- debug_error ("debug_make_undefined_type: unsupported kind");
+ debug_error (_("debug_make_undefined_type: unsupported kind"));
return DEBUG_TYPE_NULL;
}
@@ -1769,7 +1781,7 @@ debug_make_undefined_tagged_type (handle, name, kind)
/*ARGSUSED*/
debug_baseclass
debug_make_baseclass (handle, type, bitpos, virtual, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_type type;
bfd_vma bitpos;
boolean virtual;
@@ -1797,7 +1809,7 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
/*ARGSUSED*/
debug_field
debug_make_field (handle, name, type, bitpos, bitsize, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_type type;
bfd_vma bitpos;
@@ -1828,7 +1840,7 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
/*ARGSUSED*/
debug_field
debug_make_static_member (handle, name, type, physname, visibility)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_type type;
const char *physname;
@@ -1854,7 +1866,7 @@ debug_make_static_member (handle, name, type, physname, visibility)
/*ARGSUSED*/
debug_method
debug_make_method (handle, name, variants)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *name;
debug_method_variant *variants;
{
@@ -1882,7 +1894,7 @@ debug_make_method (handle, name, variants)
debug_method_variant
debug_make_method_variant (handle, physname, type, visibility, constp,
volatilep, voffset, context)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *physname;
debug_type type;
enum debug_visibility visibility;
@@ -1914,7 +1926,7 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
debug_method_variant
debug_make_static_method_variant (handle, physname, type, visibility,
constp, volatilep)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
const char *physname;
debug_type type;
enum debug_visibility visibility;
@@ -1955,8 +1967,8 @@ debug_name_type (handle, name, type)
if (info->current_unit == NULL
|| info->current_file == NULL)
{
- debug_error ("debug_name_type: no current file");
- return false;
+ debug_error (_("debug_name_type: no current file"));
+ return DEBUG_TYPE_NULL;
}
t = debug_make_type (info, DEBUG_KIND_NAMED, 0);
@@ -1976,7 +1988,7 @@ debug_name_type (handle, name, type)
nm = debug_add_to_namespace (info, &info->current_file->globals, name,
DEBUG_OBJECT_TYPE, DEBUG_LINKAGE_NONE);
if (nm == NULL)
- return false;
+ return DEBUG_TYPE_NULL;
nm->u.type = t;
@@ -2003,7 +2015,7 @@ debug_tag_type (handle, name, type)
if (info->current_file == NULL)
{
- debug_error ("debug_tag_type: no current file");
+ debug_error (_("debug_tag_type: no current file"));
return DEBUG_TYPE_NULL;
}
@@ -2011,7 +2023,7 @@ debug_tag_type (handle, name, type)
{
if (strcmp (type->u.knamed->name->name, name) == 0)
return type;
- debug_error ("debug_tag_type: extra tag attempted");
+ debug_error (_("debug_tag_type: extra tag attempted"));
return DEBUG_TYPE_NULL;
}
@@ -2032,7 +2044,7 @@ debug_tag_type (handle, name, type)
nm = debug_add_to_namespace (info, &info->current_file->globals, name,
DEBUG_OBJECT_TAG, DEBUG_LINKAGE_NONE);
if (nm == NULL)
- return false;
+ return DEBUG_TYPE_NULL;
nm->u.tag = t;
@@ -2046,12 +2058,12 @@ debug_tag_type (handle, name, type)
/*ARGSUSED*/
boolean
debug_record_type_size (handle, type, size)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_type type;
unsigned int size;
{
if (type->size != 0 && type->size != size)
- fprintf (stderr, "Warning: changing type size from %d to %d\n",
+ fprintf (stderr, _("Warning: changing type size from %d to %d\n"),
type->size, size);
type->size = size;
@@ -2075,7 +2087,7 @@ debug_find_named_type (handle, name)
if (info->current_unit == NULL)
{
- debug_error ("debug_find_named_type: no current compilation unit");
+ debug_error (_("debug_find_named_type: no current compilation unit"));
return DEBUG_TYPE_NULL;
}
@@ -2154,24 +2166,54 @@ debug_find_tagged_type (handle, name, kind)
return DEBUG_TYPE_NULL;
}
-/* Get a base type. */
+/* Get a base type. We build a linked list on the stack to avoid
+ crashing if the type is defined circularly. */
static struct debug_type *
-debug_get_real_type (handle, type)
+debug_get_real_type (handle, type, list)
PTR handle;
debug_type type;
+ struct debug_type_real_list *list;
{
+ struct debug_type_real_list *l;
+ struct debug_type_real_list rl;
+
switch (type->kind)
{
default:
return type;
+
+ case DEBUG_KIND_INDIRECT:
+ case DEBUG_KIND_NAMED:
+ case DEBUG_KIND_TAGGED:
+ break;
+ }
+
+ for (l = list; l != NULL; l = l->next)
+ {
+ if (l->t == type)
+ {
+ fprintf (stderr,
+ _("debug_get_real_type: circular debug information for %s\n"),
+ debug_get_type_name (handle, type));
+ return NULL;
+ }
+ }
+
+ rl.next = list;
+ rl.t = type;
+
+ switch (type->kind)
+ {
+ /* The default case is just here to avoid warnings. */
+ default:
case DEBUG_KIND_INDIRECT:
if (*type->u.kindirect->slot != NULL)
- return debug_get_real_type (handle, *type->u.kindirect->slot);
+ return debug_get_real_type (handle, *type->u.kindirect->slot, &rl);
return type;
case DEBUG_KIND_NAMED:
case DEBUG_KIND_TAGGED:
- return debug_get_real_type (handle, type->u.knamed->type);
+ return debug_get_real_type (handle, type->u.knamed->type, &rl);
}
/*NOTREACHED*/
}
@@ -2185,7 +2227,9 @@ debug_get_type_kind (handle, type)
{
if (type == NULL)
return DEBUG_KIND_ILLEGAL;
- type = debug_get_real_type (handle, type);
+ type = debug_get_real_type (handle, type, NULL);
+ if (type == NULL)
+ return DEBUG_KIND_ILLEGAL;
return type->kind;
}
@@ -2248,7 +2292,9 @@ debug_get_return_type (handle, type)
{
if (type == NULL)
return DEBUG_TYPE_NULL;
- type = debug_get_real_type (handle, type);
+ type = debug_get_real_type (handle, type, NULL);
+ if (type == NULL)
+ return DEBUG_TYPE_NULL;
switch (type->kind)
{
default:
@@ -2272,7 +2318,9 @@ debug_get_parameter_types (handle, type, pvarargs)
{
if (type == NULL)
return NULL;
- type = debug_get_real_type (handle, type);
+ type = debug_get_real_type (handle, type, NULL);
+ if (type == NULL)
+ return NULL;
switch (type->kind)
{
default:
@@ -2296,7 +2344,9 @@ debug_get_target_type (handle, type)
{
if (type == NULL)
return NULL;
- type = debug_get_real_type (handle, type);
+ type = debug_get_real_type (handle, type, NULL);
+ if (type == NULL)
+ return NULL;
switch (type->kind)
{
default:
@@ -2323,7 +2373,9 @@ debug_get_fields (handle, type)
{
if (type == NULL)
return NULL;
- type = debug_get_real_type (handle, type);
+ type = debug_get_real_type (handle, type, NULL);
+ if (type == NULL)
+ return NULL;
switch (type->kind)
{
default:
@@ -2342,7 +2394,7 @@ debug_get_fields (handle, type)
/*ARGSUSED*/
debug_type
debug_get_field_type (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2355,7 +2407,7 @@ debug_get_field_type (handle, field)
/*ARGSUSED*/
const char *
debug_get_field_name (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2368,7 +2420,7 @@ debug_get_field_name (handle, field)
/*ARGSUSED*/
bfd_vma
debug_get_field_bitpos (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || field->static_member)
@@ -2381,7 +2433,7 @@ debug_get_field_bitpos (handle, field)
/*ARGSUSED*/
bfd_vma
debug_get_field_bitsize (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || field->static_member)
@@ -2394,7 +2446,7 @@ debug_get_field_bitsize (handle, field)
/*ARGSUSED*/
enum debug_visibility
debug_get_field_visibility (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL)
@@ -2406,7 +2458,7 @@ debug_get_field_visibility (handle, field)
const char *
debug_get_field_physname (handle, field)
- PTR handle;
+ PTR handle ATTRIBUTE_UNUSED;
debug_field field;
{
if (field == NULL || ! field->static_member)
@@ -2546,7 +2598,7 @@ debug_write_type (info, fns, fhandle, type, name)
{
unsigned int i;
int is;
- const char *tag;
+ const char *tag = NULL;
/* If we have a name for this type, just output it. We only output
typedef names after they have been defined. We output type tags
@@ -2564,7 +2616,9 @@ debug_write_type (info, fns, fhandle, type, name)
struct debug_type *real;
unsigned int id;
- real = debug_get_real_type ((PTR) info, type);
+ real = debug_get_real_type ((PTR) info, type, NULL);
+ if (real == NULL)
+ return (*fns->empty_type) (fhandle);
id = 0;
if ((real->kind == DEBUG_KIND_STRUCT
|| real->kind == DEBUG_KIND_UNION
@@ -2594,7 +2648,6 @@ debug_write_type (info, fns, fhandle, type, name)
if (name != NULL)
name->mark = info->mark;
- tag = NULL;
if (name != NULL
&& type->kind != DEBUG_KIND_NAMED
&& type->kind != DEBUG_KIND_TAGGED)
@@ -2606,7 +2659,7 @@ debug_write_type (info, fns, fhandle, type, name)
switch (type->kind)
{
case DEBUG_KIND_ILLEGAL:
- debug_error ("debug_write_type: illegal type encountered");
+ debug_error (_("debug_write_type: illegal type encountered"));
return false;
case DEBUG_KIND_INDIRECT:
if (*type->u.kindirect->slot == DEBUG_TYPE_NULL)
@@ -3278,8 +3331,12 @@ debug_type_samep (info, t1, t2)
a1 = t1->u.kfunction->arg_types;
a2 = t2->u.kfunction->arg_types;
while (*a1 != NULL && *a2 != NULL)
- if (! debug_type_samep (info, *a1, *a2))
- break;
+ {
+ if (! debug_type_samep (info, *a1, *a2))
+ break;
+ ++a1;
+ ++a2;
+ }
ret = *a1 == NULL && *a2 == NULL;
}
break;
@@ -3332,8 +3389,12 @@ debug_type_samep (info, t1, t2)
a1 = t1->u.kmethod->arg_types;
a2 = t2->u.kmethod->arg_types;
while (*a1 != NULL && *a2 != NULL)
- if (! debug_type_samep (info, *a1, *a2))
- break;
+ {
+ if (! debug_type_samep (info, *a1, *a2))
+ break;
+ ++a1;
+ ++a2;
+ }
ret = *a1 == NULL && *a2 == NULL;
}
break;
@@ -3413,9 +3474,9 @@ debug_class_type_samep (info, t1, t2)
if (strcmp (f1->name, f2->name) != 0
|| ! debug_type_samep (info,
debug_get_real_type ((PTR) info,
- f1->type),
+ f1->type, NULL),
debug_get_real_type ((PTR) info,
- f2->type)))
+ f2->type, NULL)))
return false;
}
if (*pf1 != NULL || *pf2 != NULL)
diff --git a/contrib/binutils/binutils/deflex.l b/contrib/binutils/binutils/deflex.l
index e7fa362..15a43c0 100644
--- a/contrib/binutils/binutils/deflex.l
+++ b/contrib/binutils/binutils/deflex.l
@@ -1,6 +1,6 @@
%{/* deflex.l - Lexer for .def files */
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -50,11 +50,18 @@ int linenumber;
"WRITE" { return WRITE;}
"EXECUTE" { return EXECUTE;}
"SHARED" { return SHARED;}
+"NONSHARED" { return NONSHARED;}
+"SINGLE" { return SINGLE;}
+"MULTIPLE" { return MULTIPLE;}
+"INITINSTANCE" { return INITINSTANCE;}
+"INITGLOBAL" { return INITGLOBAL;}
+"TERMINSTANCE" { return TERMINSTANCE;}
+"TERMGLOBAL" { return TERMGLOBAL;}
[0-9][x0-9A-Fa-f]* { yylval.number = strtol (yytext,0,0);
return NUMBER; }
-[A-Za-z$:\-\_?][A-Za-z0-9/$:\-\_@?]+ {
+[A-Za-z$:\-\_?][A-Za-z0-9/$:\-\_@?]* {
yylval.id = xstrdup (yytext);
return ID;
}
diff --git a/contrib/binutils/binutils/defparse.y b/contrib/binutils/binutils/defparse.y
index 713b5d7..5718d46 100644
--- a/contrib/binutils/binutils/defparse.y
+++ b/contrib/binutils/binutils/defparse.y
@@ -1,6 +1,6 @@
%{ /* defparse.y - parser for .def files */
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -30,7 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATA
%token SECTIONS, EXPORTS, IMPORTS, VERSIONK, BASE, CONSTANT
-%token READ WRITE EXECUTE SHARED NONAME
+%token READ WRITE EXECUTE SHARED NONSHARED NONAME
+%token SINGLE MULTIPLE INITINSTANCE INITGLOBAL TERMINSTANCE TERMGLOBAL
%token <id> ID
%token <number> NUMBER
%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT opt_DATA
@@ -45,7 +46,7 @@ start: start command
command:
NAME opt_name opt_base { def_name ($2, $3); }
- | LIBRARY opt_name opt_base { def_library ($2, $3); }
+ | LIBRARY opt_name opt_base option_list { def_library ($2, $3); }
| EXPORTS explist
| DESCRIPTION ID { def_description ($2);}
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
@@ -61,7 +62,6 @@ command:
explist:
/* EMPTY */
- | expline
| explist expline
;
@@ -75,9 +75,16 @@ implist:
;
impline:
- ID '=' ID '.' ID { def_import ($1,$3,$5);}
- | ID '.' ID { def_import (0, $1,$3);}
- ;
+ ID '=' ID '.' ID '.' ID { def_import ($1,$3,$5,$7, 0); }
+ | ID '=' ID '.' ID '.' NUMBER { def_import ($1,$3,$5, 0,$7); }
+ | ID '=' ID '.' ID { def_import ($1,$3, 0,$5, 0); }
+ | ID '=' ID '.' NUMBER { def_import ($1,$3, 0, 0,$5); }
+ | ID '.' ID '.' ID { def_import ( 0,$1,$3,$5, 0); }
+ | ID '.' ID '.' NUMBER { def_import ( 0,$1,$3, 0,$5); }
+ | ID '.' ID { def_import ( 0,$1, 0,$3, 0); }
+ | ID '.' NUMBER { def_import ( 0,$1, 0, 0,$3); }
+;
+
seclist:
seclist secline
| secline
@@ -101,10 +108,13 @@ opt_number: ',' NUMBER { $$=$2;}
;
attr:
- READ { $$ = 1;}
- | WRITE { $$ = 2;}
- | EXECUTE { $$=4;}
- | SHARED { $$=8;}
+ READ { $$ = 1; }
+ | WRITE { $$ = 2; }
+ | EXECUTE { $$ = 4; }
+ | SHARED { $$ = 8; }
+ | NONSHARED { $$ = 0; }
+ | SINGLE { $$ = 0; }
+ | MULTIPLE { $$ = 0; }
;
opt_CONSTANT:
@@ -123,6 +133,12 @@ opt_DATA:
;
opt_name: ID { $$ =$1; }
+ | ID '.' ID
+ {
+ char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
+ sprintf (name, "%s.%s", $1, $3);
+ $$ = name;
+ }
| { $$=""; }
;
@@ -140,5 +156,14 @@ opt_base: BASE '=' NUMBER { $$= $3;}
| { $$=-1;}
;
-
+option_list:
+ /* empty */
+ | option_list opt_comma option
+ ;
+option:
+ INITINSTANCE
+ | INITGLOBAL
+ | TERMINSTANCE
+ | TERMGLOBAL
+ ;
diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c
index 1253f9f..b618b96 100644
--- a/contrib/binutils/binutils/dlltool.c
+++ b/contrib/binutils/binutils/dlltool.c
@@ -1,5 +1,5 @@
-/* dlltool.c -- tool to generate stuff for PE style DLLs
- Copyright (C) 1995, 96, 97, 1998 Free Software Foundation, Inc.
+/* dlltool.c -- tool to generate stuff for PE style DLLs
+ Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -31,28 +31,32 @@
A DLL contains an export table which contains the information
which the runtime loader needs to tie up references from a
- referencing program.
+ referencing program.
The export table is generated by this program by reading
in a .DEF file or scanning the .a and .o files which will be in the
DLL. A .o file can contain information in special ".drectve" sections
- with export information.
+ with export information.
A DEF file contains any number of the following commands:
- NAME <name> [ , <base> ]
+ NAME <name> [ , <base> ]
The result is going to be <name>.EXE
- LIBRARY <name> [ , <base> ]
+ LIBRARY <name> [ , <base> ]
The result is going to be <name>.DLL
EXPORTS ( <name1> [ = <name2> ] [ @ <integer> ] [ NONAME ] [CONSTANT] [DATA] ) *
Declares name1 as an exported symbol from the
DLL, with optional ordinal number <integer>
- IMPORTS ( [ <name> = ] <name> . <name> ) *
- Ignored for compatibility
+ IMPORTS ( ( <internal-name> = <module-name> . <integer> )
+ | ( [ <internal-name> = ] <module-name> . <external-name> )) *
+ Declares that <external-name> or the exported function whoes ordinal number
+ is <integer> is to be imported from the file <module-name>. If
+ <internal-name> is specified then this is the name that the imported
+ function will be refered to in the body of the DLL.
DESCRIPTION <string>
Puts <string> into output .exp file in the .rdata section
@@ -77,7 +81,7 @@
The program generates output files with the prefix supplied
- on the command line, or in the def file, or taken from the first
+ on the command line, or in the def file, or taken from the first
supplied argument.
The .exp.s file contains the information necessary to export
@@ -88,80 +92,105 @@
Example:
- file1.c:
- asm (".section .drectve");
+ file1.c:
+ asm (".section .drectve");
asm (".ascii \"-export:adef\"");
- adef(char *s)
+ void adef (char * s)
{
- printf("hello from the dll %s\n",s);
+ printf ("hello from the dll %s\n", s);
}
- bdef(char *s)
+ void bdef (char * s)
{
- printf("hello from the dll and the other entry point %s\n",s);
+ printf ("hello from the dll and the other entry point %s\n", s);
}
- file2.c:
+ file2.c:
asm (".section .drectve");
asm (".ascii \"-export:cdef\"");
asm (".ascii \"-export:ddef\"");
- cdef(char *s)
+
+ void cdef (char * s)
{
- printf("hello from the dll %s\n",s);
+ printf ("hello from the dll %s\n", s);
}
- ddef(char *s)
+ void ddef (char * s)
{
- printf("hello from the dll and the other entry point %s\n",s);
+ printf ("hello from the dll and the other entry point %s\n", s);
}
- printf()
+ int printf (void)
{
- return 9;
+ return 9;
}
- main.c
-
- main()
+ themain.c:
+ int main (void)
{
- cdef();
+ cdef ();
+ return 0;
}
- thedll.def
+ thedll.def
LIBRARY thedll
HEAPSIZE 0x40000, 0x2000
EXPORTS bdef @ 20
- cdef @ 30 NONAME
+ cdef @ 30 NONAME
SECTIONS donkey READ WRITE
aardvark EXECUTE
+ # Compile up the parts of the dll and the program
- # compile up the parts of the dll
-
- gcc -c file1.c
- gcc -c file2.c
+ gcc -c file1.c file2.c themain.c
- # put them in a library (you don't have to, you
- # could name all the .os on the dlltool line)
+ # Optional: put the dll objects into a library
+ # (you don't have to, you could name all the object
+ # files on the dlltool line)
ar qcv thedll.in file1.o file2.o
ranlib thedll.in
- # run this tool over the library and the def file
- ./dlltool --def thedll.def --output-exp thedll.o --output-lib thedll.a
+ # Run this tool over the DLL's .def file and generate an exports
+ # file (thedll.o) and an imports file (thedll.a).
+ # (You may have to use -S to tell dlltool where to find the assembler).
+
+ dlltool --def thedll.def --output-exp thedll.o --output-lib thedll.a
- # build the dll with the library with file1.o, file2.o and the export table
+ # Build the dll with the library and the export table
+
ld -o thedll.dll thedll.o thedll.in
- # build the mainline
- gcc -c themain.c
+ # Link the executable with the import library
+
+ gcc -o themain.exe themain.o thedll.a
+
+ This example can be extended if relocations are needed in the DLL:
+
+ # Compile up the parts of the dll and the program
- # link the executable with the import library
- ld -e main -Tthemain.ld -o themain.exe themain.o thedll.a
+ gcc -c file1.c file2.c themain.c
+ # Run this tool over the DLL's .def file and generate an imports file.
+
+ dlltool --def thedll.def --output-lib thedll.lib
+
+ # Link the executable with the import library and generate a base file
+ # at the same time
+
+ gcc -o themain.exe themain.o thedll.lib -Wl,--base-file -Wl,themain.base
+
+ # Run this tool over the DLL's .def file and generate an exports file
+ # which includes the relocations from the base file.
+
+ dlltool --def thedll.def --base-file themain.base --output-exp thedll.exp
+
+ # Build the dll with file1.o, file2.o and the export table
+
+ ld -o thedll.dll thedll.exp file1.o file2.o
*/
/* .idata section description
@@ -173,7 +202,7 @@
.idata$2 = Import Directory Table
= array of IMAGE_IMPORT_DESCRIPTOR's.
- DWORD Characteristics; - pointer to .idata$4
+ DWORD Import Lookup Table; - pointer to .idata$4
DWORD TimeDateStamp; - currently always 0
DWORD ForwarderChain; - currently always 0
DWORD Name; - pointer to dll's name
@@ -217,11 +246,33 @@
#include "bucomm.h"
#include "getopt.h"
#include "demangle.h"
+#include "dyn-string.h"
#include "dlltool.h"
#include <ctype.h>
#include <time.h>
+#include <sys/stat.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+#ifdef DLLTOOL_ARM
+#include "coff/arm.h"
+#include "coff/internal.h"
+#endif
+
+/* Forward references. */
+static char *look_for_prog PARAMS ((const char *, const char *, int));
+static char *deduce_name PARAMS ((const char *));
+
+#ifdef DLLTOOL_MCORE_ELF
+static void mcore_elf_cache_filename (char *);
+static void mcore_elf_gen_out_file (void);
+#endif
+
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#else /* ! HAVE_SYS_WAIT_H */
@@ -254,7 +305,44 @@
#endif /* defined (_WIN32) && ! defined (__CYGWIN32__) */
#endif /* ! HAVE_SYS_WAIT_H */
-static char *as_name = "as";
+/* ifunc and ihead data structures: ttk@cygnus.com 1997
+
+ When IMPORT declarations are encountered in a .def file the
+ function import information is stored in a structure referenced by
+ the global variable IMPORT_LIST. The structure is a linked list
+ containing the names of the dll files each function is imported
+ from and a linked list of functions being imported from that dll
+ file. This roughly parallels the structure of the .idata section
+ in the PE object file.
+
+ The contents of .def file are interpreted from within the
+ process_def_file function. Every time an IMPORT declaration is
+ encountered, it is broken up into its component parts and passed to
+ def_import. IMPORT_LIST is initialized to NULL in function main. */
+
+typedef struct ifunct
+{
+ char *name; /* name of function being imported */
+ int ord; /* two-byte ordinal value associated with function */
+ struct ifunct *next;
+} ifunctype;
+
+typedef struct iheadt
+{
+ char *dllname; /* name of dll file imported from */
+ long nfuncs; /* number of functions in list */
+ struct ifunct *funchead; /* first function in list */
+ struct ifunct *functail; /* last function in list */
+ struct iheadt *next; /* next dll file in list */
+} iheadtype;
+
+/* Structure containing all import information as defined in .def file
+ (qv "ihead structure"). */
+
+static iheadtype *import_list = NULL;
+
+static char *as_name = NULL;
+static char * as_flags = "";
static int no_idata4;
static int no_idata5;
@@ -268,12 +356,28 @@ static int add_indirect = 0;
static int add_underscore = 0;
static int dontdeltemps = 0;
+/* True if we should export all symbols. Otherwise, we only export
+ symbols listed in .drectve sections or in the def file. */
+static boolean export_all_symbols;
+
+/* True if we should exclude the symbols in DEFAULT_EXCLUDES when
+ exporting all symbols. */
+static boolean do_default_excludes;
+
+/* Default symbols to exclude when exporting all the symbols. */
+static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr";
+
+/* True if we should add __imp_<SYMBOL> to import libraries for backward
+ compatibility to old Cygwin releases. */
+static boolean create_compat_implib;
+
static char *def_file;
-static char *program_name;
+extern char * program_name;
static int machine;
static int killat;
+static int add_stdcall_alias;
static int verbose;
static FILE *output_def;
static FILE *base_file;
@@ -290,10 +394,41 @@ static const char *mname = "i386";
static const char *mname = "ppc";
#endif
+#ifdef DLLTOOL_SH
+static const char *mname = "sh";
+#endif
+
+#ifdef DLLTOOL_MIPS
+static const char *mname = "mips";
+#endif
+
+#ifdef DLLTOOL_MCORE
+static const char * mname = "mcore-le";
+#endif
+
+#ifdef DLLTOOL_MCORE_ELF
+static const char * mname = "mcore-elf";
+static char * mcore_elf_out_file = NULL;
+static char * mcore_elf_linker = NULL;
+static char * mcore_elf_linker_flags = NULL;
+
+#define DRECTVE_SECTION_NAME ((machine == MMCORE_ELF || machine == MMCORE_ELF_LE) ? ".exports" : ".drectve")
+#endif
+
+#ifndef DRECTVE_SECTION_NAME
+#define DRECTVE_SECTION_NAME ".drectve"
+#endif
+
#define PATHMAX 250 /* What's the right name for this ? */
-/* This bit of assemly does jmp * ....
-s set how_jtab_roff to mark where the 32bit abs branch should go */
+#define TMP_ASM "dc.s"
+#define TMP_HEAD_S "dh.s"
+#define TMP_HEAD_O "dh.o"
+#define TMP_TAIL_S "dt.s"
+#define TMP_TAIL_O "dt.o"
+#define TMP_STUB "ds"
+
+/* This bit of assemly does jmp * .... */
static const unsigned char i386_jtab[] =
{
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
@@ -301,18 +436,55 @@ static const unsigned char i386_jtab[] =
static const unsigned char arm_jtab[] =
{
- 0x00, 0xc0, 0x9f, 0xe5,
- 0x00, 0xf0, 0x9c, 0xe5,
+ 0x00, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
+ 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */
+ 0, 0, 0, 0
+};
+
+static const unsigned char arm_interwork_jtab[] =
+{
+ 0x04, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
+ 0x00, 0xc0, 0x9c, 0xe5, /* ldr ip, [ip] */
+ 0x1c, 0xff, 0x2f, 0xe1, /* bx ip */
+ 0, 0, 0, 0
+};
+
+static const unsigned char thumb_jtab[] =
+{
+ 0x40, 0xb4, /* push {r6} */
+ 0x02, 0x4e, /* ldr r6, [pc, #8] */
+ 0x36, 0x68, /* ldr r6, [r6] */
+ 0xb4, 0x46, /* mov ip, r6 */
+ 0x40, 0xbc, /* pop {r6} */
+ 0x60, 0x47, /* bx ip */
0, 0, 0, 0
};
+static const unsigned char mcore_be_jtab[] =
+{
+ 0x71, 0x02, /* lrw r1,2 */
+ 0x81, 0x01, /* ld.w r1,(r1,0) */
+ 0x00, 0xC1, /* jmp r1 */
+ 0x12, 0x00, /* nop */
+ 0x00, 0x00, 0x00, 0x00 /* <address> */
+};
+
+static const unsigned char mcore_le_jtab[] =
+{
+ 0x02, 0x71, /* lrw r1,2 */
+ 0x01, 0x81, /* ld.w r1,(r1,0) */
+ 0xC1, 0x00, /* jmp r1 */
+ 0x00, 0x12, /* nop */
+ 0x00, 0x00, 0x00, 0x00 /* <address> */
+};
+
/* This is the glue sequence for PowerPC PE. There is a */
/* tocrel16-tocdefn reloc against the first instruction. */
/* We also need a IMGLUE reloc against the glue function */
/* to restore the toc saved by the third instruction in */
/* the glue. */
-static const unsigned char ppc_jtab[] =
-{
+static const unsigned char ppc_jtab[] =
+{
0x00, 0x00, 0x62, 0x81, /* lwz r11,0(r2) */
/* Reloc TOCREL16 __imp_xxx */
0x00, 0x00, 0x8B, 0x81, /* lwz r12,0(r11) */
@@ -328,8 +500,6 @@ static const unsigned char ppc_jtab[] =
static bfd_vma ppc_glue_insn = 0x80410004;
#endif
-static char outfile[PATHMAX];
-
struct mac
{
const char *type;
@@ -343,6 +513,7 @@ struct mac
const char *how_space;
const char *how_align_short;
const char *how_align_long;
+ const char *how_default_as_switches;
const char *how_bfd_target;
enum bfd_architecture how_bfd_arch;
const unsigned char *how_jtab;
@@ -350,29 +521,98 @@ struct mac
int how_jtab_roff; /* offset into it for the ind 32 reloc into idata 5 */
};
-static const struct mac mtable[] =
+static const struct mac
+mtable[] =
{
{
#define MARM 0
- "arm", ".byte", ".short", ".long", ".asciz", "@",
+ "arm", ".byte", ".short", ".long", ".asciz", "@",
"ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long",
- ".global", ".space", ".align\t2",".align\t4","pe-arm-little", bfd_arch_arm,
- arm_jtab, sizeof(arm_jtab),8
+ ".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
+ "pe-arm-little", bfd_arch_arm,
+ arm_jtab, sizeof (arm_jtab), 8
}
,
{
#define M386 1
- "i386", ".byte", ".short", ".long", ".asciz", "#", "jmp *", ".global", ".space", ".align\t2",".align\t4","pe-i386",bfd_arch_i386,
- i386_jtab,sizeof(i386_jtab),2,
+ "i386", ".byte", ".short", ".long", ".asciz", "#",
+ "jmp *", ".global", ".space", ".align\t2",".align\t4", "",
+ "pe-i386",bfd_arch_i386,
+ i386_jtab, sizeof (i386_jtab), 2
}
,
{
#define MPPC 2
- "ppc", ".byte", ".short", ".long", ".asciz", "#", "jmp *", ".global", ".space", ".align\t2",".align\t4","pe-powerpcle",bfd_arch_powerpc,
- ppc_jtab,sizeof(ppc_jtab),0,
+ "ppc", ".byte", ".short", ".long", ".asciz", "#",
+ "jmp *", ".global", ".space", ".align\t2",".align\t4", "",
+ "pe-powerpcle",bfd_arch_powerpc,
+ ppc_jtab, sizeof (ppc_jtab), 0
}
,
-{ 0}
+ {
+#define MTHUMB 3
+ "thumb", ".byte", ".short", ".long", ".asciz", "@",
+ "push\t{r6}\n\tldr\tr6, [pc, #8]\n\tldr\tr6, [r6]\n\tmov\tip, r6\n\tpop\t{r6}\n\tbx\tip",
+ ".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
+ "pe-arm-little", bfd_arch_arm,
+ thumb_jtab, sizeof (thumb_jtab), 12
+ }
+ ,
+#define MARM_INTERWORK 4
+ {
+ "arm_interwork", ".byte", ".short", ".long", ".asciz", "@",
+ "ldr\tip,[pc]\n\tldr\tip,[ip]\n\tbx\tip\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
+ "pe-arm-little", bfd_arch_arm,
+ arm_interwork_jtab, sizeof (arm_interwork_jtab), 12
+ }
+ ,
+ {
+#define MMCORE_BE 5
+ "mcore-be", ".byte", ".short", ".long", ".asciz", "//",
+ "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long",
+ ".global", ".space", ".align\t2",".align\t4", "",
+ "pe-mcore-big", bfd_arch_mcore,
+ mcore_be_jtab, sizeof (mcore_be_jtab), 8
+ }
+ ,
+ {
+#define MMCORE_LE 6
+ "mcore-le", ".byte", ".short", ".long", ".asciz", "//",
+ "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long",
+ ".global", ".space", ".align\t2",".align\t4", "-EL",
+ "pe-mcore-little", bfd_arch_mcore,
+ mcore_le_jtab, sizeof (mcore_le_jtab), 8
+ }
+ ,
+ {
+#define MMCORE_ELF 7
+ "mcore-elf-be", ".byte", ".short", ".long", ".asciz", "//",
+ "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long",
+ ".global", ".space", ".align\t2",".align\t4", "",
+ "elf32-mcore-big", bfd_arch_mcore,
+ mcore_be_jtab, sizeof (mcore_be_jtab), 8
+ }
+ ,
+ {
+#define MMCORE_ELF_LE 8
+ "mcore-elf-le", ".byte", ".short", ".long", ".asciz", "//",
+ "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long",
+ ".global", ".space", ".align\t2",".align\t4", "-EL",
+ "elf32-mcore-little", bfd_arch_mcore,
+ mcore_le_jtab, sizeof (mcore_le_jtab), 8
+ }
+ ,
+ {
+#define MARM_EPOC 9
+ "arm", ".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,
+ arm_jtab, sizeof (arm_jtab), 8
+ }
+ ,
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
typedef struct dlist
@@ -395,20 +635,40 @@ typedef struct export
}
export_type;
+/* A list of symbols which we should not export. */
+
+struct string_list
+{
+ struct string_list *next;
+ char *string;
+};
+
+static struct string_list *excludes;
+
static const char *rvaafter PARAMS ((int));
static const char *rvabefore PARAMS ((int));
static const char *asm_prefix PARAMS ((int));
+static void append_import PARAMS ((const char *, const char *, int));
static void run PARAMS ((const char *, char *));
-static void basenames PARAMS ((bfd *));
+static void scan_drectve_symbols PARAMS ((bfd *));
+static void scan_filtered_symbols PARAMS ((bfd *, PTR, long, unsigned int));
+static void add_excludes PARAMS ((const char *));
+static boolean match_exclude PARAMS ((const char *));
+static void set_default_excludes PARAMS ((void));
+static long filter_symbols PARAMS ((bfd *, PTR, long, unsigned int));
+static void scan_all_symbols PARAMS ((bfd *));
static void scan_open_obj_file PARAMS ((bfd *));
static void scan_obj_file PARAMS ((const char *));
static void dump_def_info PARAMS ((FILE *));
static int sfunc PARAMS ((const void *, const void *));
static void flush_page PARAMS ((FILE *, long *, int, int));
static void gen_def_file PARAMS ((void));
+static void generate_idata_ofile PARAMS ((FILE *));
static void gen_exp_file PARAMS ((void));
static const char *xlate PARAMS ((const char *));
+#if 0
static void dump_iat PARAMS ((FILE *, export_type *));
+#endif
static char *make_label PARAMS ((const char *, const char *));
static bfd *make_one_lib_file PARAMS ((export_type *, int));
static bfd *make_head PARAMS ((void));
@@ -423,6 +683,33 @@ static void fill_ordinals PARAMS ((export_type **));
static int alphafunc PARAMS ((const void *, const void *));
static void mangle_defs PARAMS ((void));
static void usage PARAMS ((FILE *, int));
+static void inform PARAMS ((const char *, ...));
+
+
+static void
+#ifdef __STDC__
+inform (const char * message, ...)
+#else
+inform (message, va_alist)
+ const char * message;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ if (!verbose)
+ return;
+
+#ifdef __STDC__
+ va_start (args, message);
+#else
+ va_start (args);
+#endif
+
+ report (message, args);
+
+ va_end (args);
+}
static const char *
rvaafter (machine)
@@ -431,11 +718,19 @@ rvaafter (machine)
switch (machine)
{
case MARM:
- return "";
case M386:
- return "";
case MPPC:
- return "";
+ case MTHUMB:
+ case MARM_INTERWORK:
+ case MMCORE_BE:
+ case MMCORE_LE:
+ case MMCORE_ELF:
+ case MMCORE_ELF_LE:
+ break;
+ default:
+ /* xgettext:c-format */
+ fatal (_("Internal error: Unknown machine type: %d"), machine);
+ break;
}
return "";
}
@@ -447,11 +742,19 @@ rvabefore (machine)
switch (machine)
{
case MARM:
- return ".rva\t";
case M386:
- return ".rva\t";
case MPPC:
+ case MTHUMB:
+ case MARM_INTERWORK:
+ case MMCORE_BE:
+ case MMCORE_LE:
+ case MMCORE_ELF:
+ case MMCORE_ELF_LE:
return ".rva\t";
+ default:
+ /* xgettext:c-format */
+ fatal (_("Internal error: Unknown machine type: %d"), machine);
+ break;
}
return "";
}
@@ -463,11 +766,20 @@ asm_prefix (machine)
switch (machine)
{
case MARM:
- return "";
+ case MPPC:
+ case MTHUMB:
+ case MARM_INTERWORK:
+ case MMCORE_BE:
+ case MMCORE_LE:
+ case MMCORE_ELF:
+ case MMCORE_ELF_LE:
+ break;
case M386:
return "_";
- case MPPC:
- return "";
+ default:
+ /* xgettext:c-format */
+ fatal (_("Internal error: Unknown machine type: %d"), machine);
+ break;
}
return "";
}
@@ -484,12 +796,15 @@ asm_prefix (machine)
#define ASM_RVA_BEFORE rvabefore(machine)
#define ASM_RVA_AFTER rvaafter(machine)
#define ASM_PREFIX asm_prefix(machine)
-#define ASM_ALIGN_LONG mtable[machine].how_align_long
-#define HOW_BFD_TARGET 0 /* always default*/
-#define HOW_BFD_ARCH mtable[machine].how_bfd_arch
-#define HOW_JTAB mtable[machine].how_jtab
-#define HOW_JTAB_SIZE mtable[machine].how_jtab_size
-#define HOW_JTAB_ROFF mtable[machine].how_jtab_roff
+#define ASM_ALIGN_LONG mtable[machine].how_align_long
+#define HOW_BFD_READ_TARGET 0 /* always default*/
+#define HOW_BFD_WRITE_TARGET mtable[machine].how_bfd_target
+#define HOW_BFD_ARCH mtable[machine].how_bfd_arch
+#define HOW_JTAB mtable[machine].how_jtab
+#define HOW_JTAB_SIZE mtable[machine].how_jtab_size
+#define HOW_JTAB_ROFF mtable[machine].how_jtab_roff
+#define ASM_SWITCHES mtable[machine].how_default_as_switches
+
static char **oav;
void
@@ -497,15 +812,19 @@ process_def_file (name)
const char *name;
{
FILE *f = fopen (name, FOPEN_RT);
+
if (!f)
- {
- fprintf (stderr, "%s: Can't open def file %s\n", program_name, name);
- exit (1);
- }
+ /* xgettext:c-format */
+ fatal (_("Can't open def file: %s"), name);
yyin = f;
+ /* xgettext:c-format */
+ inform (_("Processing def file: %s"), name);
+
yyparse ();
+
+ inform (_("Processed def file"));
}
/**********************************************************************/
@@ -525,12 +844,13 @@ static dlist_type *a_list; /* Stuff to go in directives */
static int d_is_dll;
static int d_is_exe;
-int
+int
yyerror (err)
- const char *err;
+ const char * err ATTRIBUTE_UNUSED;
{
- fprintf (stderr, "%s: Syntax error in def file %s:%d\n",
- program_name, def_file, linenumber);
+ /* xgettext:c-format */
+ non_fatal (_("Syntax error in def file %s:%d"), def_file, linenumber);
+
return 0;
}
@@ -561,13 +881,17 @@ def_name (name, base)
const char *name;
int base;
{
- if (verbose)
- fprintf (stderr, "%s NAME %s base %x\n", program_name, name, base);
+ /* xgettext:c-format */
+ inform (_("NAME: %s base: %x"), name, base);
+
if (d_is_dll)
- {
- fprintf (stderr, "Can't have LIBRARY and NAME\n");
- }
+ non_fatal (_("Can't have LIBRARY and NAME"));
+
d_name = name;
+ /* if --dllname not provided, use the one in the DEF file.
+ FIXME: Is this appropriate for executables? */
+ if (! dll_name)
+ dll_name = xstrdup (name);
d_is_exe = 1;
}
@@ -576,13 +900,16 @@ def_library (name, base)
const char *name;
int base;
{
- if (verbose)
- printf ("%s: LIBRARY %s base %x\n", program_name, name, base);
+ /* xgettext:c-format */
+ inform (_("LIBRARY: %s base: %x"), name, base);
+
if (d_is_exe)
- {
- fprintf (stderr, "%s: Can't have LIBRARY and NAME\n", program_name);
- }
+ non_fatal (_("Can't have LIBRARY and NAME"));
+
d_name = name;
+ /* if --dllname not provided, use the one in the DEF file. */
+ if (! dll_name)
+ dll_name = xstrdup (name);
d_is_dll = 1;
}
@@ -607,39 +934,130 @@ new_directive (dir)
}
void
-def_stacksize (reserve, commit)
+def_heapsize (reserve, commit)
int reserve;
int commit;
{
char b[200];
if (commit > 0)
- sprintf (b, "-stack 0x%x,0x%x ", reserve, commit);
+ sprintf (b, "-heap 0x%x,0x%x ", reserve, commit);
else
- sprintf (b, "-stack 0x%x ", reserve);
+ sprintf (b, "-heap 0x%x ", reserve);
new_directive (xstrdup (b));
}
void
-def_heapsize (reserve, commit)
+def_stacksize (reserve, commit)
int reserve;
int commit;
{
char b[200];
if (commit > 0)
- sprintf (b, "-heap 0x%x,0x%x ", reserve, commit);
+ sprintf (b, "-stack 0x%x,0x%x ", reserve, commit);
else
- sprintf (b, "-heap 0x%x ", reserve);
+ sprintf (b, "-stack 0x%x ", reserve);
new_directive (xstrdup (b));
}
+/* append_import simply adds the given import definition to the global
+ import_list. It is used by def_import. */
+
+static void
+append_import (symbol_name, dll_name, func_ordinal)
+ const char *symbol_name;
+ const char *dll_name;
+ int func_ordinal;
+{
+ iheadtype **pq;
+ iheadtype *q;
+
+ for (pq = &import_list; *pq != NULL; pq = &(*pq)->next)
+ {
+ if (strcmp ((*pq)->dllname, dll_name) == 0)
+ {
+ q = *pq;
+ q->functail->next = xmalloc (sizeof (ifunctype));
+ q->functail = q->functail->next;
+ q->functail->ord = func_ordinal;
+ q->functail->name = xstrdup (symbol_name);
+ q->functail->next = NULL;
+ q->nfuncs++;
+ return;
+ }
+ }
+
+ q = xmalloc (sizeof (iheadtype));
+ q->dllname = xstrdup (dll_name);
+ q->nfuncs = 1;
+ q->funchead = xmalloc (sizeof (ifunctype));
+ q->functail = q->funchead;
+ q->next = NULL;
+ q->functail->name = xstrdup (symbol_name);
+ q->functail->ord = func_ordinal;
+ q->functail->next = NULL;
+
+ *pq = q;
+}
+
+/* def_import is called from within defparse.y when an IMPORT
+ declaration is encountered. Depending on the form of the
+ declaration, the module name may or may not need ".dll" to be
+ appended to it, the name of the function may be stored in internal
+ or entry, and there may or may not be an ordinal value associated
+ with it. */
+
+/* A note regarding the parse modes:
+ In defparse.y we have to accept import declarations which follow
+ any one of the following forms:
+ <func_name_in_app> = <dll_name>.<func_name_in_dll>
+ <func_name_in_app> = <dll_name>.<number>
+ <dll_name>.<func_name_in_dll>
+ <dll_name>.<number>
+ Furthermore, the dll's name may or may not end with ".dll", which
+ complicates the parsing a little. Normally the dll's name is
+ passed to def_import() in the "module" parameter, but when it ends
+ with ".dll" it gets passed in "module" sans ".dll" and that needs
+ to be reappended.
+
+ def_import gets five parameters:
+ APP_NAME - the name of the function in the application, if
+ present, or NULL if not present.
+ MODULE - the name of the dll, possibly sans extension (ie, '.dll').
+ DLLEXT - the extension of the dll, if present, NULL if not present.
+ ENTRY - the name of the function in the dll, if present, or NULL.
+ ORD_VAL - the numerical tag of the function in the dll, if present,
+ or NULL. Exactly one of <entry> or <ord_val> must be
+ present (i.e., not NULL). */
+
void
-def_import (internal, module, entry)
- const char *internal;
+def_import (app_name, module, dllext, entry, ord_val)
+ const char *app_name;
const char *module;
+ const char *dllext;
const char *entry;
+ int ord_val;
{
- if (verbose)
- fprintf (stderr, "%s: IMPORTS are ignored", program_name);
+ const char *application_name;
+ char *buf;
+
+ if (entry != NULL)
+ application_name = entry;
+ else
+ {
+ if (app_name != NULL)
+ application_name = app_name;
+ else
+ application_name = "";
+ }
+
+ if (dllext != NULL)
+ {
+ buf = (char *) alloca (strlen (module) + strlen (dllext) + 2);
+ sprintf (buf, "%s.%s", module, dllext);
+ module = buf;
+ }
+
+ append_import (application_name, module, ord_val);
}
void
@@ -701,8 +1119,7 @@ run (what, args)
char *errmsg_fmt, *errmsg_arg;
char *temp_base = choose_temp_base ();
- if (verbose)
- fprintf (stderr, "%s %s\n", what, args);
+ inform ("run: %s %s", what, args);
/* Count the args */
i = 0;
@@ -716,6 +1133,8 @@ run (what, args)
s = args;
while (1)
{
+ while (*s == ' ')
+ ++s;
argv[i++] = s;
while (*s != ' ' && *s != 0)
s++;
@@ -730,109 +1149,332 @@ run (what, args)
if (pid == -1)
{
- int errno_val = errno;
-
- fprintf (stderr, "%s: ", program_name);
- fprintf (stderr, errmsg_fmt, errmsg_arg);
- fprintf (stderr, ": %s\n", strerror (errno_val));
- exit (1);
+ inform (strerror (errno));
+
+ fatal (errmsg_fmt, errmsg_arg);
}
- pid = pwait (pid, &wait_status, 0);
+ pid = pwait (pid, & wait_status, 0);
+
if (pid == -1)
{
- fprintf (stderr, "%s: wait: %s\n", program_name, strerror (errno));
- exit (1);
+ /* xgettext:c-format */
+ fatal (_("wait: %s"), strerror (errno));
}
else if (WIFSIGNALED (wait_status))
{
- fprintf (stderr, "%s: subprocess got fatal signal %d\n",
- program_name, WTERMSIG (wait_status));
- exit (1);
+ /* xgettext:c-format */
+ fatal (_("subprocess got fatal signal %d"), WTERMSIG (wait_status));
}
else if (WIFEXITED (wait_status))
{
if (WEXITSTATUS (wait_status) != 0)
- fprintf (stderr, "%s: %s exited with status %d\n",
- program_name, what, WEXITSTATUS (wait_status));
+ /* xgettext:c-format */
+ non_fatal (_("%s exited with status %d"),
+ what, WEXITSTATUS (wait_status));
}
else
abort ();
}
-/* read in and block out the base relocations */
-static void
-basenames (abfd)
- bfd *abfd;
-{
-}
+/* Look for a list of symbols to export in the .drectve section of
+ ABFD. Pass each one to def_exports. */
static void
-scan_open_obj_file (abfd)
+scan_drectve_symbols (abfd)
bfd *abfd;
{
+ asection * s;
+ int size;
+ char * buf;
+ char * p;
+ char * e;
+
/* Look for .drectve's */
- asection *s = bfd_get_section_by_name (abfd, ".drectve");
- if (s)
+ s = bfd_get_section_by_name (abfd, DRECTVE_SECTION_NAME);
+
+ if (s == NULL)
+ return;
+
+ size = bfd_get_section_size_before_reloc (s);
+ buf = xmalloc (size);
+
+ bfd_get_section_contents (abfd, s, buf, 0, size);
+
+ /* xgettext:c-format */
+ inform (_("Sucking in info from %s section in %s"),
+ DRECTVE_SECTION_NAME, bfd_get_filename (abfd));
+
+ /* Search for -export: strings. The exported symbols can optionally
+ have type tags (eg., -export:foo,data), so handle those as well.
+ Currently only data tag is supported. */
+ p = buf;
+ e = buf + size;
+ while (p < e)
{
- int size = bfd_get_section_size_before_reloc (s);
- char *buf = xmalloc (size);
- char *p;
- char *e;
- bfd_get_section_contents (abfd, s, buf, 0, size);
- if (verbose)
- fprintf (stderr, "%s: Sucking in info from %s\n",
- program_name,
- bfd_get_filename (abfd));
-
- /* Search for -export: strings */
- p = buf;
- e = buf + size;
- while (p < e)
+ if (p[0] == '-'
+ && strncmp (p, "-export:", 8) == 0)
{
- if (p[0] == '-'
- && strncmp (p, "-export:", 8) == 0)
+ char * name;
+ char * c;
+ flagword flags = BSF_FUNCTION;
+
+ p += 8;
+ name = p;
+ while (p < e && *p != ',' && *p != ' ' && *p != '-')
+ p++;
+ c = xmalloc (p - name + 1);
+ memcpy (c, name, p - name);
+ c[p - name] = 0;
+ if (p < e && *p == ',') /* found type tag. */
{
- char *name;
- char *c;
- p += 8;
- name = p;
+ char *tag_start = ++p;
while (p < e && *p != ' ' && *p != '-')
p++;
- c = xmalloc (p - name + 1);
- memcpy (c, name, p - name);
- c[p - name] = 0;
- /* FIXME: The 5th arg is for the `constant' field.
- What should it be? Not that it matters since it's not
- currently useful. */
- def_exports (c, 0, -1, 0, 0, 0);
+ if (strncmp (tag_start, "data", 4) == 0)
+ flags &= ~BSF_FUNCTION;
+ }
+
+ /* FIXME: The 5th arg is for the `constant' field.
+ What should it be? Not that it matters since it's not
+ currently useful. */
+ def_exports (c, 0, -1, 0, 0, ! (flags & BSF_FUNCTION));
+
+ if (add_stdcall_alias && strchr (c, '@'))
+ {
+ char *exported_name = xstrdup (c);
+ char *atsym = strchr (exported_name, '@');
+ *atsym = '\0';
+ /* Note: stdcall alias symbols can never be data. */
+ def_exports (exported_name, xstrdup (c), -1, 0, 0, 0);
}
- else
- p++;
}
- free (buf);
+ else
+ p++;
}
+ free (buf);
+}
- basenames (abfd);
+/* Look through the symbols in MINISYMS, and add each one to list of
+ symbols to export. */
- if (verbose)
- fprintf (stderr, "%s: Done readin\n",
- program_name);
+static void
+scan_filtered_symbols (abfd, minisyms, symcount, size)
+ bfd *abfd;
+ PTR minisyms;
+ long symcount;
+ unsigned int size;
+{
+ asymbol *store;
+ bfd_byte *from, *fromend;
+
+ store = bfd_make_empty_symbol (abfd);
+ if (store == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ from = (bfd_byte *) minisyms;
+ fromend = from + symcount * size;
+ for (; from < fromend; from += size)
+ {
+ asymbol *sym;
+ const char *symbol_name;
+
+ sym = bfd_minisymbol_to_symbol (abfd, false, from, store);
+ if (sym == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ symbol_name = bfd_asymbol_name (sym);
+ if (bfd_get_symbol_leading_char (abfd) == symbol_name[0])
+ ++symbol_name;
+
+ def_exports (xstrdup (symbol_name) , 0, -1, 0, 0,
+ ! (sym->flags & BSF_FUNCTION));
+
+ if (add_stdcall_alias && strchr (symbol_name, '@'))
+ {
+ char *exported_name = xstrdup (symbol_name);
+ char *atsym = strchr (exported_name, '@');
+ *atsym = '\0';
+ /* Note: stdcall alias symbols can never be data. */
+ def_exports (exported_name, xstrdup (symbol_name), -1, 0, 0, 0);
+ }
+ }
+}
+
+/* Add a list of symbols to exclude. */
+
+static void
+add_excludes (new_excludes)
+ const char *new_excludes;
+{
+ char *local_copy;
+ char *exclude_string;
+
+ local_copy = xstrdup (new_excludes);
+
+ exclude_string = strtok (local_copy, ",:");
+ for (; exclude_string; exclude_string = strtok (NULL, ",:"))
+ {
+ struct string_list *new_exclude;
+
+ new_exclude = ((struct string_list *)
+ xmalloc (sizeof (struct string_list)));
+ new_exclude->string = (char *) xmalloc (strlen (exclude_string) + 2);
+ /* FIXME: Is it always right to add a leading underscore? */
+ sprintf (new_exclude->string, "_%s", exclude_string);
+ new_exclude->next = excludes;
+ excludes = new_exclude;
+
+ /* xgettext:c-format */
+ inform (_("Excluding symbol: %s"), exclude_string);
+ }
+
+ free (local_copy);
+}
+
+/* See if STRING is on the list of symbols to exclude. */
+
+static boolean
+match_exclude (string)
+ const char *string;
+{
+ struct string_list *excl_item;
+
+ for (excl_item = excludes; excl_item; excl_item = excl_item->next)
+ if (strcmp (string, excl_item->string) == 0)
+ return true;
+ return false;
+}
+
+/* Add the default list of symbols to exclude. */
+
+static void
+set_default_excludes (void)
+{
+ add_excludes (default_excludes);
+}
+
+/* Choose which symbols to export. */
+
+static long
+filter_symbols (abfd, minisyms, symcount, size)
+ bfd *abfd;
+ PTR minisyms;
+ long symcount;
+ unsigned int size;
+{
+ bfd_byte *from, *fromend, *to;
+ asymbol *store;
+
+ store = bfd_make_empty_symbol (abfd);
+ if (store == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ from = (bfd_byte *) minisyms;
+ fromend = from + symcount * size;
+ to = (bfd_byte *) minisyms;
+
+ for (; from < fromend; from += size)
+ {
+ int keep = 0;
+ asymbol *sym;
+
+ sym = bfd_minisymbol_to_symbol (abfd, false, (const PTR) from, store);
+ if (sym == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ /* Check for external and defined only symbols. */
+ keep = (((sym->flags & BSF_GLOBAL) != 0
+ || (sym->flags & BSF_WEAK) != 0
+ || bfd_is_com_section (sym->section))
+ && ! bfd_is_und_section (sym->section));
+
+ keep = keep && ! match_exclude (sym->name);
+
+ if (keep)
+ {
+ memcpy (to, from, size);
+ to += size;
+ }
+ }
+
+ return (to - (bfd_byte *) minisyms) / size;
+}
+
+/* Export all symbols in ABFD, except for ones we were told not to
+ export. */
+
+static void
+scan_all_symbols (abfd)
+ bfd *abfd;
+{
+ long symcount;
+ PTR minisyms;
+ unsigned int size;
+
+ /* Ignore bfds with an import descriptor table. We assume that any
+ such BFD contains symbols which are exported from another DLL,
+ and we don't want to reexport them from here. */
+ if (bfd_get_section_by_name (abfd, ".idata$4"))
+ return;
+
+ if (! (bfd_get_file_flags (abfd) & HAS_SYMS))
+ {
+ /* xgettext:c-format */
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
+ return;
+ }
+
+ symcount = bfd_read_minisymbols (abfd, false, &minisyms, &size);
+ if (symcount < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ if (symcount == 0)
+ {
+ /* xgettext:c-format */
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
+ return;
+ }
+
+ /* Discard the symbols we don't want to export. It's OK to do this
+ in place; we'll free the storage anyway. */
+
+ symcount = filter_symbols (abfd, minisyms, symcount, size);
+ scan_filtered_symbols (abfd, minisyms, symcount, size);
+
+ free (minisyms);
+}
+
+/* Look at the object file to decide which symbols to export. */
+
+static void
+scan_open_obj_file (abfd)
+ bfd *abfd;
+{
+ if (export_all_symbols)
+ scan_all_symbols (abfd);
+ else
+ scan_drectve_symbols (abfd);
+
+ /* FIXME: we ought to read in and block out the base relocations */
+
+ /* xgettext:c-format */
+ inform (_("Done reading %s"), bfd_get_filename (abfd));
}
static void
scan_obj_file (filename)
const char *filename;
{
- bfd *f = bfd_openr (filename, 0);
+ bfd * f = bfd_openr (filename, 0);
if (!f)
- {
- fprintf (stderr, "%s: Unable to open object file %s\n",
- program_name,
- filename);
- exit (1);
- }
+ /* xgettext:c-format */
+ fatal (_("Unable to open object file: %s"), filename);
+
+ /* xgettext:c-format */
+ inform (_("Scanning object file %s"), filename);
+
if (bfd_check_format (f, bfd_archive))
{
bfd *arfile = bfd_openr_next_archived_file (f, 0);
@@ -843,10 +1485,20 @@ scan_obj_file (filename)
bfd_close (arfile);
arfile = bfd_openr_next_archived_file (f, arfile);
}
+
+#ifdef DLLTOOL_MCORE_ELF
+ if (mcore_elf_out_file)
+ inform (_("Cannot produce mcore-elf dll from archive file: %s"), filename);
+#endif
}
else if (bfd_check_format (f, bfd_object))
{
scan_open_obj_file (f);
+
+#ifdef DLLTOOL_MCORE_ELF
+ if (mcore_elf_out_file)
+ mcore_elf_cache_filename ((char *) filename);
+#endif
}
bfd_close (f);
@@ -906,10 +1558,17 @@ flush_page (f, need, page_addr, on_page)
ASM_LONG,
(on_page * 2) + (on_page & 1) * 2 + 8,
ASM_C);
+
for (i = 0; i < on_page; i++)
{
- fprintf (f, "\t%s\t0x%lx\n", ASM_SHORT, (need[i] - page_addr) | 0x3000);
+ long needed = need[i];
+
+ if (needed)
+ needed = ((needed - page_addr) | 0x3000) & 0xffff;
+
+ fprintf (f, "\t%s\t0x%lx\n", ASM_SHORT, needed);
}
+
/* And padding */
if (on_page & 1)
fprintf (f, "\t%s\t0x%x\n", ASM_SHORT, 0 | 0x0000);
@@ -921,6 +1580,8 @@ gen_def_file ()
int i;
export_type *exp;
+ inform (_("Adding exports to output file"));
+
fprintf (output_def, ";");
for (i = 0; oav[i]; i++)
fprintf (output_def, " %s", oav[i]);
@@ -930,45 +1591,176 @@ gen_def_file ()
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
{
char *quote = strchr (exp->name, '.') ? "\"" : "";
- fprintf (output_def, "\t%s%s%s @ %d%s%s ; %s\n",
- quote,
- exp->name,
- quote,
- exp->ordinal,
- exp->noname ? " NONAME" : "",
- exp->data ? " DATA" : "",
- cplus_demangle (exp->internal_name, DMGL_ANSI | DMGL_PARAMS));
+ char *res = cplus_demangle (exp->internal_name, DMGL_ANSI | DMGL_PARAMS);
+
+ if (strcmp (exp->name, exp->internal_name) == 0)
+ {
+
+ fprintf (output_def, "\t%s%s%s @ %d%s%s ; %s\n",
+ quote,
+ exp->name,
+ quote,
+ exp->ordinal,
+ exp->noname ? " NONAME" : "",
+ exp->data ? " DATA" : "",
+ res ? res : "");
+ }
+ else
+ {
+ char *quote1 = strchr (exp->internal_name, '.') ? "\"" : "";
+ /* char *alias = */
+ fprintf (output_def, "\t%s%s%s = %s%s%s @ %d%s%s ; %s\n",
+ quote,
+ exp->name,
+ quote,
+ quote1,
+ exp->internal_name,
+ quote1,
+ exp->ordinal,
+ exp->noname ? " NONAME" : "",
+ exp->data ? " DATA" : "",
+ res ? res : "");
+ }
+ if (res)
+ free (res);
}
+
+ inform (_("Added exports to output file"));
}
+/* generate_idata_ofile generates the portable assembly source code
+ for the idata sections. It appends the source code to the end of
+ the file. */
+
static void
-gen_exp_file ()
+generate_idata_ofile (filvar)
+ FILE *filvar;
{
- FILE *f;
- int i;
- export_type *exp;
- dlist_type *dl;
+ iheadtype *headptr;
+ ifunctype *funcptr;
+ int headindex;
+ int funcindex;
+ int nheads;
+
+ if (import_list == NULL)
+ return;
+
+ fprintf (filvar, "%s Import data sections\n", ASM_C);
+ fprintf (filvar, "\n\t.section\t.idata$2\n");
+ fprintf (filvar, "\t%s\tdoi_idata\n", ASM_GLOBAL);
+ fprintf (filvar, "doi_idata:\n");
+
+ nheads = 0;
+ for (headptr = import_list; headptr != NULL; headptr = headptr->next)
+ {
+ fprintf (filvar, "\t%slistone%d%s\t%s %s\n",
+ ASM_RVA_BEFORE, nheads, ASM_RVA_AFTER,
+ ASM_C, headptr->dllname);
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG);
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG);
+ fprintf (filvar, "\t%sdllname%d%s\n",
+ ASM_RVA_BEFORE, nheads, ASM_RVA_AFTER);
+ fprintf (filvar, "\t%slisttwo%d%s\n\n",
+ ASM_RVA_BEFORE, nheads, ASM_RVA_AFTER);
+ nheads++;
+ }
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* NULL record at */
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* end of idata$2 */
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* section */
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG);
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG);
- sprintf (outfile, "t%s", exp_name);
+ fprintf (filvar, "\n\t.section\t.idata$4\n");
+ headindex = 0;
+ for (headptr = import_list; headptr != NULL; headptr = headptr->next)
+ {
+ fprintf (filvar, "listone%d:\n", headindex);
+ for ( funcindex = 0; funcindex < headptr->nfuncs; funcindex++ )
+ fprintf (filvar, "\t%sfuncptr%d_%d%s\n",
+ ASM_RVA_BEFORE, headindex, funcindex, ASM_RVA_AFTER);
+ fprintf (filvar,"\t%s\t0\n", ASM_LONG); /* NULL terminating list */
+ headindex++;
+ }
- if (verbose)
- fprintf (stderr, "%s: Generate exp file %s\n",
- program_name, exp_name);
+ fprintf (filvar, "\n\t.section\t.idata$5\n");
+ headindex = 0;
+ for (headptr = import_list; headptr != NULL; headptr = headptr->next)
+ {
+ fprintf (filvar, "listtwo%d:\n", headindex);
+ for ( funcindex = 0; funcindex < headptr->nfuncs; funcindex++ )
+ fprintf (filvar, "\t%sfuncptr%d_%d%s\n",
+ ASM_RVA_BEFORE, headindex, funcindex, ASM_RVA_AFTER);
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* NULL terminating list */
+ headindex++;
+ }
- f = fopen (outfile, FOPEN_WT);
- if (!f)
+ fprintf (filvar, "\n\t.section\t.idata$6\n");
+ headindex = 0;
+ for (headptr = import_list; headptr != NULL; headptr = headptr->next)
{
- fprintf (stderr, "%s: Unable to open output file %s\n", program_name, outfile);
- exit (1);
+ funcindex = 0;
+ for (funcptr = headptr->funchead; funcptr != NULL;
+ funcptr = funcptr->next)
+ {
+ fprintf (filvar,"funcptr%d_%d:\n", headindex, funcindex);
+ fprintf (filvar,"\t%s\t%d\n", ASM_SHORT,
+ ((funcptr->ord) & 0xFFFF));
+ fprintf (filvar,"\t%s\t\"%s\"\n", ASM_TEXT, funcptr->name);
+ fprintf (filvar,"\t%s\t0\n", ASM_BYTE);
+ funcindex++;
+ }
+ headindex++;
}
- if (verbose)
+
+ fprintf (filvar, "\n\t.section\t.idata$7\n");
+ headindex = 0;
+ for (headptr = import_list; headptr != NULL; headptr = headptr->next)
{
- fprintf (stderr, "%s: Opened file %s\n",
- program_name, outfile);
+ fprintf (filvar,"dllname%d:\n", headindex);
+ fprintf (filvar,"\t%s\t\"%s\"\n", ASM_TEXT, headptr->dllname);
+ fprintf (filvar,"\t%s\t0\n", ASM_BYTE);
+ headindex++;
}
+}
+
+/* Assemble the specified file. */
+static void
+assemble_file (source, dest)
+ const char * source;
+ const char * dest;
+{
+ char * cmd;
+
+ cmd = (char *) alloca (strlen (ASM_SWITCHES) + strlen (as_flags)
+ + strlen (source) + strlen (dest) + 50);
+
+ sprintf (cmd, "%s %s -o %s %s", ASM_SWITCHES, as_flags, dest, source);
+
+ run (as_name, cmd);
+}
+
+static void
+gen_exp_file ()
+{
+ FILE *f;
+ int i;
+ export_type *exp;
+ dlist_type *dl;
+
+ /* xgettext:c-format */
+ inform (_("Generating export file: %s"), exp_name);
+
+ f = fopen (TMP_ASM, FOPEN_WT);
+ if (!f)
+ /* xgettext:c-format */
+ fatal (_("Unable to open temporary assembler file: %s"), TMP_ASM);
+
+ /* xgettext:c-format */
+ inform (_("Opened temporary file: %s"), TMP_ASM);
dump_def_info (f);
+
if (d_exports)
{
fprintf (f, "\t.section .edata\n\n");
@@ -988,7 +1780,7 @@ gen_exp_file ()
show_allnames ? d_high_ord - d_low_ord + 1 : d_named_nfuncs, ASM_C);
fprintf (f, "\t%safuncs%s %s Address of functions\n", ASM_RVA_BEFORE, ASM_RVA_AFTER, ASM_C);
- fprintf (f, "\t%sanames%s %s Address of Name Pointer Table\n",
+ fprintf (f, "\t%sanames%s %s Address of Name Pointer Table\n",
ASM_RVA_BEFORE, ASM_RVA_AFTER, ASM_C);
fprintf (f, "\t%sanords%s %s Address of ordinals\n", ASM_RVA_BEFORE, ASM_RVA_AFTER, ASM_C);
@@ -1005,7 +1797,7 @@ gen_exp_file ()
{
if (exp->ordinal != i)
{
-#if 0
+#if 0
fprintf (f, "\t%s\t%d\t%s %d..%d missing\n",
ASM_SPACE,
(exp->ordinal - i) * 4,
@@ -1020,8 +1812,8 @@ gen_exp_file ()
}
}
fprintf (f, "\t%s%s%s%s\t%s %d\n", ASM_RVA_BEFORE,
- ASM_PREFIX,
- exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
+ ASM_PREFIX,
+ exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
i++;
}
@@ -1031,7 +1823,8 @@ gen_exp_file ()
for (i = 0; (exp = d_exports_lexically[i]); i++)
{
if (!exp->noname || show_allnames)
- fprintf (f, "\t%sn%d%s\n", ASM_RVA_BEFORE, exp->ordinal, ASM_RVA_AFTER);
+ fprintf (f, "\t%sn%d%s\n",
+ ASM_RVA_BEFORE, exp->ordinal, ASM_RVA_AFTER);
}
fprintf (f,"%s Export Oridinal Table\n", ASM_C);
@@ -1045,16 +1838,18 @@ gen_exp_file ()
fprintf(f,"%s Export Name Table\n", ASM_C);
for (i = 0; (exp = d_exports_lexically[i]); i++)
if (!exp->noname || show_allnames)
- fprintf (f, "n%d: %s \"%s\"\n", exp->ordinal, ASM_TEXT, exp->name);
+ fprintf (f, "n%d: %s \"%s\"\n",
+ exp->ordinal, ASM_TEXT, exp->name);
if (a_list)
{
- fprintf (f, "\t.section .drectve\n");
+ fprintf (f, "\t.section %s\n", DRECTVE_SECTION_NAME);
for (dl = a_list; dl; dl = dl->next)
{
fprintf (f, "\t%s\t\"%s\"\n", ASM_TEXT, dl->text);
}
}
+
if (d_list)
{
fprintf (f, "\t.section .rdata\n");
@@ -1062,9 +1857,9 @@ gen_exp_file ()
{
char *p;
int l;
- /* We dont output as ascii 'cause there can
- be quote characters in the string */
-
+
+ /* We don't output as ascii because there can
+ be quote characters in the string. */
l = 0;
for (p = dl->text; *p; p++)
{
@@ -1090,7 +1885,7 @@ gen_exp_file ()
/* Add to the output file a way of getting to the exported names
- without using the import library. */
+ without using the import library. */
if (add_indirect)
{
fprintf (f, "\t.section\t.rdata\n");
@@ -1100,9 +1895,11 @@ gen_exp_file ()
/* We use a single underscore for MS compatibility, and a
double underscore for backward compatibility with old
cygwin releases. */
- fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
+ if (create_compat_implib)
+ fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name);
- fprintf (f, "__imp_%s:\n", exp->name);
+ if (create_compat_implib)
+ fprintf (f, "__imp_%s:\n", exp->name);
fprintf (f, "_imp__%s:\n", exp->name);
fprintf (f, "\t%s\t%s\n", ASM_LONG, exp->name);
}
@@ -1140,7 +1937,7 @@ gen_exp_file ()
/* Delete duplcates */
for (src = 0; src < num_entries; src++)
{
- if (last != copy[src])
+ if (last != copy[src])
last = copy[dst++] = copy[src];
}
num_entries = dst;
@@ -1164,16 +1961,17 @@ gen_exp_file ()
}
}
+ generate_idata_ofile (f);
+
fclose (f);
/* assemble the file */
- sprintf (outfile, "-o %s t%s", exp_name, exp_name);
- run (as_name, outfile);
+ assemble_file (TMP_ASM, exp_name);
+
if (dontdeltemps == 0)
- {
- sprintf (outfile, "t%s", exp_name);
- unlink (outfile);
- }
+ unlink (TMP_ASM);
+
+ inform (_("Generated exports file"));
}
static const char *
@@ -1200,12 +1998,14 @@ xlate (name)
/**********************************************************************/
+#if 0
+
static void
dump_iat (f, exp)
FILE *f;
export_type *exp;
{
- if (exp->noname && !show_allnames )
+ if (exp->noname && !show_allnames )
{
fprintf (f, "\t%s\t0x%08x\n",
ASM_LONG,
@@ -1219,7 +2019,9 @@ dump_iat (f, exp)
}
}
-typedef struct
+#endif
+
+typedef struct
{
int id;
const char *name;
@@ -1244,18 +2046,19 @@ typedef struct
#define NSECS 7
-static sinfo secdata[NSECS] =
+#define INIT_SEC_DATA(id, name, flags, align) { id, name, flags, align, NULL, NULL, NULL, 0, NULL }
+static sinfo secdata[NSECS] =
{
- { TEXT, ".text", SEC_CODE | SEC_HAS_CONTENTS, 2},
- { DATA, ".data", SEC_DATA, 2},
- { BSS, ".bss", 0, 2},
- { IDATA7, ".idata$7", SEC_HAS_CONTENTS, 2},
- { IDATA5, ".idata$5", SEC_HAS_CONTENTS, 2},
- { IDATA4, ".idata$4", SEC_HAS_CONTENTS, 2},
- { IDATA6, ".idata$6", SEC_HAS_CONTENTS, 1}
+ INIT_SEC_DATA (TEXT, ".text", SEC_CODE | SEC_HAS_CONTENTS, 2),
+ INIT_SEC_DATA (DATA, ".data", SEC_DATA, 2),
+ INIT_SEC_DATA (BSS, ".bss", 0, 2),
+ INIT_SEC_DATA (IDATA7, ".idata$7", SEC_HAS_CONTENTS, 2),
+ INIT_SEC_DATA (IDATA5, ".idata$5", SEC_HAS_CONTENTS, 2),
+ INIT_SEC_DATA (IDATA4, ".idata$4", SEC_HAS_CONTENTS, 2),
+ INIT_SEC_DATA (IDATA6, ".idata$6", SEC_HAS_CONTENTS, 1)
};
-#else
+#else
/* Sections numbered to make the order the same as other PowerPC NT */
/* compilers. This also keeps funny alignment thingies from happening. */
@@ -1271,7 +2074,7 @@ static sinfo secdata[NSECS] =
#define NSECS 9
-static sinfo secdata[NSECS] =
+static sinfo secdata[NSECS] =
{
{ TEXT, ".text", SEC_CODE | SEC_HAS_CONTENTS, 3},
{ PDATA, ".pdata", SEC_HAS_CONTENTS, 2},
@@ -1313,7 +2116,7 @@ ID2: .short 2
For the PowerPC, here's the variation on the above scheme:
-# Rather than a simple "jmp *", the code to get to the dll function
+# Rather than a simple "jmp *", the code to get to the dll function
# looks like:
.text
lwz r11,[tocv]__imp_function_name(r2)
@@ -1343,18 +2146,24 @@ make_one_lib_file (exp, i)
export_type *exp;
int i;
{
- if (0)
+#if 0
{
+ char *name;
FILE *f;
- char *prefix="d";
- sprintf (outfile, "%ss%d.s", prefix, i);
- f = fopen (outfile, FOPEN_WT);
+ const char *prefix = "d";
+ char *dest;
+
+ name = (char *) alloca (strlen (prefix) + 10);
+ sprintf (name, "%ss%05d.s", prefix, i);
+ f = fopen (name, FOPEN_WT);
fprintf (f, "\t.text\n");
fprintf (f, "\t%s\t%s%s\n", ASM_GLOBAL, ASM_PREFIX, exp->name);
- fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
+ if (create_compat_implib)
+ fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name);
- fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX,
- exp->name, ASM_JUMP, exp->name);
+ if (create_compat_implib)
+ fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX,
+ exp->name, ASM_JUMP, exp->name);
fprintf (f, "\t.section\t.idata$7\t%s To force loading of head\n", ASM_C);
fprintf (f, "\t%s\t%s\n", ASM_LONG, head_label);
@@ -1363,7 +2172,8 @@ make_one_lib_file (exp, i)
fprintf (f,"%s Import Address Table\n", ASM_C);
fprintf (f, "\t.section .idata$5\n");
- fprintf (f, "__imp_%s:\n", exp->name);
+ if (create_compat_implib)
+ fprintf (f, "__imp_%s:\n", exp->name);
fprintf (f, "_imp__%s:\n", exp->name);
dump_iat (f, exp);
@@ -1373,62 +2183,62 @@ make_one_lib_file (exp, i)
dump_iat (f, exp);
- if(!exp->noname || show_allnames)
+ if(!exp->noname || show_allnames)
{
fprintf (f, "%s Hint/Name table\n", ASM_C);
fprintf (f, "\t.section .idata$6\n");
- fprintf (f, "ID%d:\t%s\t%d\n", exp->ordinal, ASM_SHORT, exp->hint);
+ fprintf (f, "ID%d:\t%s\t%d\n", exp->ordinal, ASM_SHORT, exp->hint);
fprintf (f, "\t%s\t\"%s\"\n", ASM_TEXT, xlate (exp->name));
}
fclose (f);
-
- sprintf (outfile, "-o %ss%d.o %ss%d.s", prefix, i, prefix, i);
-
- run (as_name, outfile);
-
+ dest = (char *) alloca (strlen (prefix) + 10);
+ sprintf (dest, "%ss%05d.o", prefix, i);
+ assemble_file (name, dest);
}
- else
+#else /* if 0 */
{
-
- bfd *abfd;
-
- asymbol *exp_label;
- asymbol *iname, *iname2;
- asymbol *iname_lab;
- asymbol **iname_lab_pp;
- asymbol **iname_pp;
-
- /* Extra Symbols for PPC */
+ bfd * abfd;
+ asymbol * exp_label;
+ asymbol * iname;
+ asymbol * iname2;
+ asymbol * iname_lab;
+ asymbol ** iname_lab_pp;
+ asymbol ** iname_pp;
#ifdef DLLTOOL_PPC
-#define EXTRA 2
-#else
-#define EXTRA 0
+ asymbol ** fn_pp;
+ asymbol ** toc_pp;
+#define EXTRA 2
#endif
-
-#ifdef DLLTOOL_PPC
- asymbol **fn_pp;
- asymbol **toc_pp;
+#ifndef EXTRA
+#define EXTRA 0
#endif
+ asymbol * ptrs[NSECS + 4 + EXTRA + 1];
- asymbol *ptrs[NSECS + 4 + EXTRA + 1];
+ char * outname = xmalloc (10);
+ int oidx = 0;
- char *outname = xmalloc (10);
- int oidx = 0;
- sprintf (outname, "ds%d.o", i);
- abfd = bfd_openw (outname, HOW_BFD_TARGET);
+
+ sprintf (outname, "%s%05d.o", TMP_STUB, i);
+
+ abfd = bfd_openw (outname, HOW_BFD_WRITE_TARGET);
+
if (!abfd)
- {
- fprintf (stderr, "%s: bfd_open failed open output file %s\n",
- program_name, outname);
- exit (1);
- }
+ /* xgettext:c-format */
+ fatal (_("bfd_open failed open stub file: %s"), outname);
+ /* xgettext:c-format */
+ inform (_("Creating stub file: %s"), outname);
+
bfd_set_format (abfd, bfd_object);
bfd_set_arch_mach (abfd, HOW_BFD_ARCH, 0);
-
+#ifdef DLLTOOL_ARM
+ if (machine == MARM_INTERWORK || machine == MTHUMB)
+ bfd_set_private_flags (abfd, F_INTERWORK);
+#endif
+
/* First make symbols for the sections */
for (i = 0; i < NSECS; i++)
{
@@ -1436,10 +2246,10 @@ make_one_lib_file (exp, i)
if (si->id != i)
abort();
si->sec = bfd_make_section_old_way (abfd, si->name);
- bfd_set_section_flags (abfd,
+ bfd_set_section_flags (abfd,
si->sec,
si->flags);
-
+
bfd_set_section_alignment(abfd, si->sec, si->align);
si->sec->output_section = si->sec;
si->sym = bfd_make_empty_symbol(abfd);
@@ -1474,19 +2284,26 @@ make_one_lib_file (exp, i)
exp_label->flags = BSF_GLOBAL;
exp_label->value = 0;
+#ifdef DLLTOOL_ARM
+ if (machine == MTHUMB)
+ bfd_coff_set_symbol_class (abfd, exp_label, C_THUMBEXTFUNC);
+#endif
ptrs[oidx++] = exp_label;
}
/* Generate imp symbols with one underscore for Microsoft
compatibility, and with two underscores for backward
compatibility with old versions of cygwin. */
- iname = bfd_make_empty_symbol(abfd);
- iname->name = make_label ("__imp_", exp->name);
- iname->section = secdata[IDATA5].sec;
- iname->flags = BSF_GLOBAL;
- iname->value = 0;
+ if (create_compat_implib)
+ {
+ iname = bfd_make_empty_symbol (abfd);
+ iname->name = make_label ("__imp_", exp->name);
+ iname->section = secdata[IDATA5].sec;
+ iname->flags = BSF_GLOBAL;
+ iname->value = 0;
+ }
- iname2 = bfd_make_empty_symbol(abfd);
+ iname2 = bfd_make_empty_symbol (abfd);
iname2->name = make_label ("_imp__", exp->name);
iname2->section = secdata[IDATA5].sec;
iname2->flags = BSF_GLOBAL;
@@ -1501,7 +2318,8 @@ make_one_lib_file (exp, i)
iname_pp = ptrs + oidx;
- ptrs[oidx++] = iname;
+ if (create_compat_implib)
+ ptrs[oidx++] = iname;
ptrs[oidx++] = iname2;
iname_lab_pp = ptrs + oidx;
@@ -1526,7 +2344,7 @@ make_one_lib_file (exp, i)
{
asymbol *toc_symbol; /* The .toc symbol */
- toc_symbol = bfd_make_empty_symbol(abfd);
+ toc_symbol = bfd_make_empty_symbol (abfd);
toc_symbol->name = make_label (".", "toc");
toc_symbol->section = (asection *)&bfd_und_section;
toc_symbol->flags = BSF_GLOBAL;
@@ -1536,7 +2354,7 @@ make_one_lib_file (exp, i)
ptrs[oidx++] = toc_symbol;
}
#endif
-
+
ptrs[oidx] = 0;
for (i = 0; i < NSECS; i++)
@@ -1546,7 +2364,7 @@ make_one_lib_file (exp, i)
arelent *rel;
arelent **rpp;
- switch (i)
+ switch (i)
{
case TEXT:
if (! exp->data)
@@ -1554,18 +2372,20 @@ make_one_lib_file (exp, i)
si->size = HOW_JTAB_SIZE;
si->data = xmalloc (HOW_JTAB_SIZE);
memcpy (si->data, HOW_JTAB, HOW_JTAB_SIZE);
-
- /* add the reloqc into idata$5 */
+
+ /* add the reloc into idata$5 */
rel = xmalloc (sizeof (arelent));
+
rpp = xmalloc (sizeof (arelent *) * 2);
rpp[0] = rel;
rpp[1] = 0;
+
rel->address = HOW_JTAB_ROFF;
rel->addend = 0;
if (machine == MPPC)
{
- rel->howto = bfd_reloc_type_lookup (abfd,
+ rel->howto = bfd_reloc_type_lookup (abfd,
BFD_RELOC_16_GOTOFF);
rel->sym_ptr_ptr = iname_pp;
}
@@ -1582,7 +2402,7 @@ make_one_lib_file (exp, i)
case IDATA5:
/* An idata$4 or idata$5 is one word long, and has an
rva to idata$6 */
-
+
si->data = xmalloc (4);
si->size = 4;
@@ -1593,7 +2413,7 @@ make_one_lib_file (exp, i)
si->data[2] = exp->ordinal >> 16;
si->data[3] = 0x80;
}
- else
+ else
{
sec->reloc_count = 1;
memset (si->data, 0, si->size);
@@ -1611,7 +2431,7 @@ make_one_lib_file (exp, i)
break;
case IDATA6:
- if (!exp->noname)
+ if (!exp->noname)
{
/* This used to add 1 to exp->hint. I don't know
why it did that, and it does not match what I see
@@ -1657,11 +2477,11 @@ make_one_lib_file (exp, i)
a dll routine. There are a number of house keeping things
we need to do:
- 1. In the name of glue trickery, the ADDR32 relocs for 0,
- 4, and 0x10 are set to point to the same place:
- "..function_name".
- 2. There is one more reloc needed in the pdata section.
- The actual glue instruction to restore the toc on
+ 1. In the name of glue trickery, the ADDR32 relocs for 0,
+ 4, and 0x10 are set to point to the same place:
+ "..function_name".
+ 2. There is one more reloc needed in the pdata section.
+ The actual glue instruction to restore the toc on
return is saved as the offset in an IMGLUE reloc.
So we need a total of four relocs for this section.
@@ -1687,7 +2507,7 @@ make_one_lib_file (exp, i)
bfd_put_32(abfd, ppc_glue_insn, (char *) &imglue->address);
imglue->addend = 0;
- imglue->howto = bfd_reloc_type_lookup (abfd,
+ imglue->howto = bfd_reloc_type_lookup (abfd,
BFD_RELOC_32_GOTOFF);
imglue->sym_ptr_ptr = fn_pp;
@@ -1776,24 +2596,30 @@ make_one_lib_file (exp, i)
if (i == IDATA4 && no_idata4)
continue;
- bfd_set_section_contents (abfd, si->sec,
+ bfd_set_section_contents (abfd, si->sec,
si->data, 0,
si->size);
}
bfd_set_symtab (abfd, ptrs, oidx);
bfd_close (abfd);
- abfd = bfd_openr (outname, HOW_BFD_TARGET);
+ abfd = bfd_openr (outname, HOW_BFD_READ_TARGET);
return abfd;
}
-
+#endif
}
static bfd *
make_head ()
{
- FILE * f = fopen ("dh.s", FOPEN_WT);
+ FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
+ if (f == NULL)
+ {
+ fatal (_("failed to open temporary head file: %s"), TMP_HEAD_S);
+ return NULL;
+ }
+
fprintf (f, "%s IMAGE_IMPORT_DESCRIPTOR\n", ASM_C);
fprintf (f, "\t.section .idata$2\n");
@@ -1819,13 +2645,14 @@ make_head ()
fprintf (f, "%sStuff for compatibility\n", ASM_C);
- if (!no_idata5)
+ if (!no_idata5)
{
fprintf (f, "\t.section\t.idata$5\n");
fprintf (f, "\t%s\t0\n", ASM_LONG);
fprintf (f, "fthunk:\n");
}
- if (!no_idata4)
+
+ if (!no_idata4)
{
fprintf (f, "\t.section\t.idata$4\n");
@@ -1833,25 +2660,32 @@ make_head ()
fprintf (f, "\t.section .idata$4\n");
fprintf (f, "hname:\n");
}
+
fclose (f);
- sprintf (outfile, "-o dh.o dh.s");
- run (as_name, outfile);
+ assemble_file (TMP_HEAD_S, TMP_HEAD_O);
- return bfd_openr ("dh.o", HOW_BFD_TARGET);
+ return bfd_openr (TMP_HEAD_O, HOW_BFD_READ_TARGET);
}
-static bfd *
+static bfd *
make_tail ()
{
- FILE * f = fopen ("dt.s", FOPEN_WT);
+ FILE *f = fopen (TMP_TAIL_S, FOPEN_WT);
- if (!no_idata4)
+ if (f == NULL)
+ {
+ fatal (_("failed to open temporary tail file: %s"), TMP_TAIL_S);
+ return NULL;
+ }
+
+ if (!no_idata4)
{
fprintf (f, "\t.section .idata$4\n");
fprintf (f, "\t%s\t0\n", ASM_LONG);
}
- if (!no_idata5)
+
+ if (!no_idata5)
{
fprintf (f, "\t.section .idata$5\n");
fprintf (f, "\t%s\t0\n", ASM_LONG);
@@ -1888,9 +2722,9 @@ make_tail ()
fclose (f);
- sprintf (outfile, "-o dt.o dt.s");
- run (as_name, outfile);
- return bfd_openr ("dt.o", HOW_BFD_TARGET);
+ assemble_file (TMP_TAIL_S, TMP_TAIL_O);
+
+ return bfd_openr (TMP_TAIL_O, HOW_BFD_READ_TARGET);
}
static void
@@ -1905,23 +2739,26 @@ gen_lib_file ()
unlink (imp_name);
- outarch = bfd_openw (imp_name, HOW_BFD_TARGET);
+ outarch = bfd_openw (imp_name, HOW_BFD_WRITE_TARGET);
if (!outarch)
- {
- fprintf (stderr, "%s: Can't open .lib file %s\n", program_name, imp_name);
- exit (1);
- }
+ /* xgettext:c-format */
+ fatal (_("Can't open .lib file: %s"), imp_name);
+
+ /* xgettext:c-format */
+ inform (_("Creating library file: %s"), imp_name);
+
bfd_set_format (outarch, bfd_archive);
outarch->has_armap = 1;
/* Work out a reasonable size of things to put onto one line. */
-
-
ar_head = make_head ();
ar_tail = make_tail();
+ if (ar_head == NULL || ar_tail == NULL)
+ return;
+
for (i = 0; (exp = d_exports_lexically[i]); i++)
{
bfd *n = make_one_lib_file (exp, i);
@@ -1929,7 +2766,6 @@ gen_lib_file ()
head = n;
}
-
/* Now stick them all into the archive */
ar_head->next = head;
@@ -1938,6 +2774,7 @@ gen_lib_file ()
if (! bfd_set_archive_head (outarch, head))
bfd_fatal ("bfd_set_archive_head");
+
if (! bfd_close (outarch))
bfd_fatal (imp_name);
@@ -1952,26 +2789,27 @@ gen_lib_file ()
if (dontdeltemps == 0)
{
- sprintf (outfile, "dh.o");
- unlink (outfile);
- sprintf (outfile, "dh.s");
- unlink (outfile);
- sprintf (outfile, "dt.o");
- unlink (outfile);
- sprintf (outfile, "dt.s");
- unlink (outfile);
+ unlink (TMP_HEAD_O);
+ unlink (TMP_HEAD_S);
+ unlink (TMP_TAIL_O);
+ unlink (TMP_TAIL_S);
}
if (dontdeltemps < 2)
{
+ char *name;
+
+ name = (char *) alloca (sizeof TMP_STUB + 10);
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
{
- sprintf (outfile, "ds%d.o",i);
- if (unlink (outfile) < 0)
- fprintf (stderr, "%s: cannot delete %s: %s\n", program_name,
- outfile, strerror (errno));
+ sprintf (name, "%s%05d.o", TMP_STUB, i);
+ if (unlink (name) < 0)
+ /* xgettext:c-format */
+ non_fatal (_("cannot delete %s: %s"), name, strerror (errno));
}
}
+
+ inform (_("Created lib file"));
}
/**********************************************************************/
@@ -2026,7 +2864,11 @@ remove_null_names (ptr)
static void
dtab (ptr)
- export_type **ptr;
+ export_type ** ptr
+#ifndef SACDEBUG
+ATTRIBUTE_UNUSED
+#endif
+ ;
{
#ifdef SACDEBUG
int i;
@@ -2051,7 +2893,7 @@ process_duplicates (d_export_vec)
export_type **d_export_vec;
{
int more = 1;
- int i;
+ int i;
while (more)
{
@@ -2070,19 +2912,17 @@ process_duplicates (d_export_vec)
export_type *b = d_export_vec[i + 1];
more = 1;
- if (verbose)
- fprintf (stderr, "Warning, ignoring duplicate EXPORT %s %d,%d\n",
- a->name,
- a->ordinal,
- b->ordinal);
+
+ /* xgettext:c-format */
+ inform (_("Warning, ignoring duplicate EXPORT %s %d,%d"),
+ a->name, a->ordinal, b->ordinal);
+
if (a->ordinal != -1
&& b->ordinal != -1)
- {
+ /* xgettext:c-format */
+ fatal (_("Error, duplicate EXPORT with oridinals: %s"),
+ a->name);
- fprintf (stderr, "Error, duplicate EXPORT with oridinals %s\n",
- a->name);
- exit (1);
- }
/* Merge attributes */
b->ordinal = a->ordinal > 0 ? a->ordinal : b->ordinal;
b->constant |= a->constant;
@@ -2175,7 +3015,7 @@ fill_ordinals (d_export_vec)
qsort (d_export_vec, d_nfuncs, sizeof (export_type *), pfunc);
/* Work out the lowest and highest ordinal numbers. */
- if (d_nfuncs)
+ if (d_nfuncs)
{
if (d_export_vec[0])
d_low_ord = d_export_vec[0]->ordinal;
@@ -2207,6 +3047,8 @@ mangle_defs ()
export_type **d_export_vec
= (export_type **) xmalloc (sizeof (export_type *) * d_nfuncs);
+ inform (_("Processing definitions"));
+
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
{
d_export_vec[i] = exp;
@@ -2224,7 +3066,8 @@ mangle_defs ()
}
/* Build list in alpha order */
- d_exports_lexically = (export_type **)xmalloc (sizeof(export_type *)*(d_nfuncs+1));
+ d_exports_lexically = (export_type **)
+ xmalloc (sizeof (export_type *) * (d_nfuncs + 1));
for (i = 0, exp = d_exports; exp; i++, exp = exp->next)
{
@@ -2235,13 +3078,14 @@ mangle_defs ()
qsort (d_exports_lexically, i, sizeof (export_type *), alphafunc);
/* Fill exp entries with their hint values */
-
+
for (i = 0; i < d_nfuncs; i++)
{
if (!d_exports_lexically[i]->noname || show_allnames)
d_exports_lexically[i]->hint = hint++;
}
-
+
+ inform (_("Processed definitions"));
}
/**********************************************************************/
@@ -2251,45 +3095,76 @@ usage (file, status)
FILE *file;
int status;
{
- fprintf (file, "Usage %s <options> <object-files>\n", program_name);
- fprintf (file, " --machine <machine>\n");
- fprintf (file, " --output-exp <outname> Generate export file.\n");
- fprintf (file, " --output-lib <outname> Generate input library.\n");
- fprintf (file, " --add-indirect Add dll indirects to export file.\n");
- fprintf (file, " --dllname <name> Name of input dll to put into output lib.\n");
- fprintf (file, " --def <deffile> Name input .def file\n");
- fprintf (file, " --output-def <deffile> Name output .def file\n");
- fprintf (file, " --base-file <basefile> Read linker generated base file\n");
- fprintf (file, " --no-idata4 Don't generate idata$4 section\n");
- fprintf (file, " --no-idata5 Don't generate idata$5 section\n");
- fprintf (file, " -v Verbose\n");
- fprintf (file, " -U Add underscores to .lib\n");
- fprintf (file, " -k Kill @<n> from exported names\n");
- fprintf (file, " --as <name> Use <name> for assembler\n");
- fprintf (file, " --nodelete Keep temp files.\n");
+ /* xgetext:c-format */
+ fprintf (file, _("Usage %s <options> <object-files>\n"), program_name);
+ /* xgetext:c-format */
+ fprintf (file, _(" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"), mname);
+ fprintf (file, _(" possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, ppc, thumb\n"));
+ fprintf (file, _(" -e --output-exp <outname> Generate an export file.\n"));
+ fprintf (file, _(" -l --output-lib <outname> Generate an interface library.\n"));
+ fprintf (file, _(" -a --add-indirect Add dll indirects to export file.\n"));
+ fprintf (file, _(" -D --dllname <name> Name of input dll to put into interface lib.\n"));
+ fprintf (file, _(" -d --input-def <deffile> Name of .def file to be read in.\n"));
+ fprintf (file, _(" -z --output-def <deffile> Name of .def file to be created.\n"));
+ fprintf (file, _(" --export-all-symbols Export all symbols to .def\n"));
+ fprintf (file, _(" --no-export-all-symbols Only export listed symbols\n"));
+ fprintf (file, _(" --exclude-symbols <list> Don't export <list>\n"));
+ fprintf (file, _(" --no-default-excludes Clear default exclude symbols\n"));
+ fprintf (file, _(" -b --base-file <basefile> Read linker generated base file.\n"));
+ fprintf (file, _(" -x --no-idata4 Don't generate idata$4 section.\n"));
+ fprintf (file, _(" -c --no-idata5 Don't generate idata$5 section.\n"));
+ fprintf (file, _(" -U --add-underscore Add underscores to symbols in interface library.\n"));
+ fprintf (file, _(" -k --kill-at Kill @<n> from exported names.\n"));
+ fprintf (file, _(" -A --add-stdcall-alias Add aliases without @<n>.\n"));
+ fprintf (file, _(" -S --as <name> Use <name> for assembler.\n"));
+ fprintf (file, _(" -f --as-flags <flags> Pass <flags> to the assembler.\n"));
+ fprintf (file, _(" -C --compat-implib Create backward compatible import library.\n"));
+ fprintf (file, _(" -n --no-delete Keep temp files (repeat for extra preservation).\n"));
+ fprintf (file, _(" -v --verbose Be verbose.\n"));
+ fprintf (file, _(" -V --version Display the program version.\n"));
+ fprintf (file, _(" -h --help Display this information.\n"));
+#ifdef DLLTOOL_MCORE_ELF
+ fprintf (file, _(" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"));
+ fprintf (file, _(" -L --linker <name> Use <name> as the linker.\n"));
+ fprintf (file, _(" -F --linker-flags <flags> Pass <flags> to the linker.\n"));
+#endif
exit (status);
}
-#define OPTION_NO_IDATA4 'x'
-#define OPTION_NO_IDATA5 'c'
+#define OPTION_EXPORT_ALL_SYMS 150
+#define OPTION_NO_EXPORT_ALL_SYMS (OPTION_EXPORT_ALL_SYMS + 1)
+#define OPTION_EXCLUDE_SYMS (OPTION_NO_EXPORT_ALL_SYMS + 1)
+#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_EXCLUDE_SYMS + 1)
+
static const struct option long_options[] =
{
- {"nodelete", no_argument, NULL, 'n'},
+ {"no-delete", no_argument, NULL, 'n'},
{"dllname", required_argument, NULL, 'D'},
- {"no-idata4", no_argument, NULL, OPTION_NO_IDATA4},
- {"no-idata5", no_argument, NULL, OPTION_NO_IDATA5},
+ {"no-idata4", no_argument, NULL, 'x'},
+ {"no-idata5", no_argument, NULL, 'c'},
{"output-exp", required_argument, NULL, 'e'},
{"output-def", required_argument, NULL, 'z'},
+ {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL_SYMS},
+ {"no-export-all-symbols", no_argument, NULL, OPTION_NO_EXPORT_ALL_SYMS},
+ {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMS},
+ {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
{"output-lib", required_argument, NULL, 'l'},
- {"def", required_argument, NULL, 'd'},
+ {"def", required_argument, NULL, 'd'}, /* for compatiblity with older versions */
+ {"input-def", required_argument, NULL, 'd'},
{"add-underscore", no_argument, NULL, 'U'},
- {"killat", no_argument, NULL, 'k'},
+ {"kill-at", no_argument, NULL, 'k'},
+ {"add-stdcall-alias", no_argument, NULL, 'A'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
{"help", no_argument, NULL, 'h'},
{"machine", required_argument, NULL, 'm'},
{"add-indirect", no_argument, NULL, 'a'},
{"base-file", required_argument, NULL, 'b'},
{"as", required_argument, NULL, 'S'},
- {0}
+ {"as-flags", required_argument, NULL, 'f'},
+ {"mcore-elf", required_argument, NULL, 'M'},
+ {"compat-implib", no_argument, NULL, 'C'},
+ {NULL,0,NULL,0}
};
int
@@ -2303,20 +3178,47 @@ main (ac, av)
program_name = av[0];
oav = av;
- while ((c = getopt_long (ac, av, "xcz:S:R:A:puaD:l:e:nkvbUh?m:yd:", long_options, 0))
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ while ((c = getopt_long (ac, av,
+#ifdef DLLTOOL_MCORE_ELF
+ "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVhM:L:F:",
+#else
+ "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVh",
+#endif
+ long_options, 0))
!= EOF)
{
switch (c)
{
- case OPTION_NO_IDATA4:
+ case OPTION_EXPORT_ALL_SYMS:
+ export_all_symbols = true;
+ break;
+ case OPTION_NO_EXPORT_ALL_SYMS:
+ export_all_symbols = false;
+ break;
+ case OPTION_EXCLUDE_SYMS:
+ add_excludes (optarg);
+ break;
+ case OPTION_NO_DEFAULT_EXCLUDES:
+ do_default_excludes = false;
+ break;
+ case 'x':
no_idata4 = 1;
break;
- case OPTION_NO_IDATA5:
+ case 'c':
no_idata5 = 1;
break;
case 'S':
as_name = optarg;
break;
+ case 'f':
+ as_flags = optarg;
+ break;
/* ignored for compatibility */
case 'u':
@@ -2337,8 +3239,7 @@ main (ac, av)
exp_name = optarg;
break;
case 'h':
- case '?':
- usage (stderr, 0);
+ usage (stdout, 0);
break;
case 'm':
mname = optarg;
@@ -2346,12 +3247,8 @@ main (ac, av)
case 'v':
verbose = 1;
break;
- case 'y':
-#if 0
- /* We don't currently define YYDEBUG when building
- defparse.y. */
- yydebug = 1;
-#endif
+ case 'V':
+ print_version (program_name);
break;
case 'U':
add_underscore = 1;
@@ -2359,6 +3256,9 @@ main (ac, av)
case 'k':
killat = 1;
break;
+ case 'A':
+ add_stdcall_alias = 1;
+ break;
case 'd':
def_file = optarg;
break;
@@ -2367,46 +3267,65 @@ main (ac, av)
break;
case 'b':
base_file = fopen (optarg, FOPEN_RB);
+
if (!base_file)
- {
- fprintf (stderr, "%s: Unable to open base-file %s\n",
- av[0],
- optarg);
- exit (1);
- }
+ /* xgettext:c-format */
+ fatal (_("Unable to open base-file: %s"), optarg);
+
+ break;
+#ifdef DLLTOOL_MCORE_ELF
+ case 'M':
+ mcore_elf_out_file = optarg;
+ break;
+ case 'L':
+ mcore_elf_linker = optarg;
+ break;
+ case 'F':
+ mcore_elf_linker_flags = optarg;
+ break;
+#endif
+ case 'C':
+ create_compat_implib = 1;
break;
default:
usage (stderr, 1);
+ break;
}
}
-
for (i = 0; mtable[i].type; i++)
- {
- if (strcmp (mtable[i].type, mname) == 0)
- break;
- }
+ if (strcmp (mtable[i].type, mname) == 0)
+ break;
if (!mtable[i].type)
- {
- fprintf (stderr, "Machine not supported\n");
- exit (1);
- }
- machine = i;
+ /* xgettext:c-format */
+ fatal (_("Machine '%s' not supported"), mname);
+ machine = i;
if (!dll_name && exp_name)
{
- char len = strlen (exp_name) + 5;
+ int len = strlen (exp_name) + 5;
dll_name = xmalloc (len);
strcpy (dll_name, exp_name);
strcat (dll_name, ".dll");
}
+ if (as_name == NULL)
+ as_name = deduce_name ("as");
+
+ /* Don't use the default exclude list if we're reading only the
+ symbols in the .drectve section. The default excludes are meant
+ to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
+ if (! export_all_symbols)
+ do_default_excludes = false;
+
+ if (do_default_excludes)
+ set_default_excludes ();
+
if (def_file)
- {
- process_def_file (def_file);
- }
+ process_def_file (def_file);
+
while (optind < ac)
{
if (!firstarg)
@@ -2419,6 +3338,7 @@ main (ac, av)
if (exp_name)
gen_exp_file ();
+
if (imp_name)
{
/* Make imp_name safe for use as a label. */
@@ -2427,14 +3347,265 @@ main (ac, av)
imp_name_lab = xstrdup (imp_name);
for (p = imp_name_lab; *p; p++)
{
- if (!isalpha (*p) && !isdigit (*p))
+ if (!isalpha ((unsigned char) *p) && !isdigit ((unsigned char) *p))
*p = '_';
}
head_label = make_label("_head_", imp_name_lab);
gen_lib_file ();
}
+
if (output_def)
gen_def_file ();
-
+
+#ifdef DLLTOOL_MCORE_ELF
+ if (mcore_elf_out_file)
+ mcore_elf_gen_out_file ();
+#endif
+
return 0;
}
+
+/* Look for the program formed by concatenating PROG_NAME and the
+ string running from PREFIX to END_PREFIX. If the concatenated
+ string contains a '/', try appending EXECUTABLE_SUFFIX if it is
+ appropriate. */
+
+static char *
+look_for_prog (prog_name, prefix, end_prefix)
+ const char *prog_name;
+ const char *prefix;
+ int end_prefix;
+{
+ struct stat s;
+ char *cmd;
+
+ cmd = xmalloc (strlen (prefix)
+ + strlen (prog_name)
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ + strlen (EXECUTABLE_SUFFIX)
+#endif
+ + 10);
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s", prog_name);
+
+ if (strchr (cmd, '/') != NULL)
+ {
+ int found;
+
+ found = (stat (cmd, &s) == 0
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0
+#endif
+ );
+
+ if (! found)
+ {
+ /* xgettext:c-format */
+ inform (_("Tried file: %s"), cmd);
+ free (cmd);
+ return NULL;
+ }
+ }
+
+ /* xgettext:c-format */
+ inform (_("Using file: %s"), cmd);
+
+ return cmd;
+}
+
+/* Deduce the name of the program we are want to invoke.
+ PROG_NAME is the basic name of the program we want to run,
+ eg "as" or "ld". The catch is that we might want actually
+ run "i386-pe-as" or "ppc-pe-ld".
+
+ If argv[0] contains the full path, then try to find the program
+ in the same place, with and then without a target-like prefix.
+
+ Given, argv[0] = /usr/local/bin/i586-cygwin32-dlltool,
+ deduce_name("as") uses the following search order:
+
+ /usr/local/bin/i586-cygwin32-as
+ /usr/local/bin/as
+ as
+
+ If there's an EXECUTABLE_SUFFIX, it'll use that as well; for each
+ name, it'll try without and then with EXECUTABLE_SUFFIX.
+
+ Given, argv[0] = i586-cygwin32-dlltool, it will not even try "as"
+ as the fallback, but rather return i586-cygwin32-as.
+
+ Oh, and given, argv[0] = dlltool, it'll return "as".
+
+ Returns a dynamically allocated string. */
+
+static char *
+deduce_name (prog_name)
+ const char *prog_name;
+{
+ char *cmd;
+ char *dash, *slash, *cp;
+
+ dash = NULL;
+ slash = NULL;
+ for (cp = program_name; *cp != '\0'; ++cp)
+ {
+ if (*cp == '-')
+ dash = cp;
+ if (
+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
+ *cp == ':' || *cp == '\\' ||
+#endif
+ *cp == '/')
+ {
+ slash = cp;
+ dash = NULL;
+ }
+ }
+
+ cmd = NULL;
+
+ if (dash != NULL)
+ {
+ /* First, try looking for a prefixed PROG_NAME in the
+ PROGRAM_NAME directory, with the same prefix as PROGRAM_NAME. */
+ cmd = look_for_prog (prog_name, program_name, dash - program_name + 1);
+ }
+
+ if (slash != NULL && cmd == NULL)
+ {
+ /* Next, try looking for a PROG_NAME in the same directory as
+ that of this program. */
+ cmd = look_for_prog (prog_name, program_name, slash - program_name + 1);
+ }
+
+ if (cmd == NULL)
+ {
+ /* Just return PROG_NAME as is. */
+ cmd = xstrdup (prog_name);
+ }
+
+ return cmd;
+}
+
+#ifdef DLLTOOL_MCORE_ELF
+typedef struct fname_cache
+{
+ char * filename;
+ struct fname_cache * next;
+}
+fname_cache;
+
+static fname_cache fnames;
+
+static void
+mcore_elf_cache_filename (char * filename)
+{
+ fname_cache * ptr;
+
+ ptr = & fnames;
+
+ while (ptr->next != NULL)
+ ptr = ptr->next;
+
+ ptr->filename = filename;
+ ptr->next = (fname_cache *) malloc (sizeof (fname_cache));
+ if (ptr->next != NULL)
+ ptr->next->next = NULL;
+}
+
+#define MCORE_ELF_TMP_OBJ "mcoreelf.o"
+#define MCORE_ELF_TMP_EXP "mcoreelf.exp"
+#define MCORE_ELF_TMP_LIB "mcoreelf.lib"
+
+static void
+mcore_elf_gen_out_file (void)
+{
+ fname_cache * ptr;
+ dyn_string_t ds;
+
+ /* Step one. Run 'ld -r' on the input object files in order to resolve
+ any internal references and to generate a single .exports section. */
+ ptr = & fnames;
+
+ ds = dyn_string_new (100);
+ dyn_string_append (ds, "-r ");
+
+ if (mcore_elf_linker_flags != NULL)
+ dyn_string_append (ds, mcore_elf_linker_flags);
+
+ while (ptr->next != NULL)
+ {
+ dyn_string_append (ds, ptr->filename);
+ dyn_string_append (ds, " ");
+
+ ptr = ptr->next;
+ }
+
+ dyn_string_append (ds, "-o ");
+ dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
+
+ if (mcore_elf_linker == NULL)
+ mcore_elf_linker = deduce_name ("ld");
+
+ run (mcore_elf_linker, ds->s);
+
+ dyn_string_delete (ds);
+
+ /* Step two. Create a .exp file and a .lib file from the temporary file.
+ Do this by recursively invoking dlltool....*/
+ ds = dyn_string_new (100);
+
+ dyn_string_append (ds, "-S ");
+ dyn_string_append (ds, as_name);
+
+ dyn_string_append (ds, " -e ");
+ dyn_string_append (ds, MCORE_ELF_TMP_EXP);
+ dyn_string_append (ds, " -l ");
+ dyn_string_append (ds, MCORE_ELF_TMP_LIB);
+ dyn_string_append (ds, " " );
+ dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
+
+ if (verbose)
+ dyn_string_append (ds, " -v");
+
+ if (dontdeltemps)
+ {
+ dyn_string_append (ds, " -n");
+
+ if (dontdeltemps > 1)
+ dyn_string_append (ds, " -n");
+ }
+
+ /* XXX - FIME: ought to check/copy other command line options as well. */
+
+ run (program_name, ds->s);
+
+ dyn_string_delete (ds);
+
+ /* Step four. Feed the .exp and object files to ld -shared to create the dll. */
+ ds = dyn_string_new (100);
+
+ dyn_string_append (ds, "-shared ");
+
+ if (mcore_elf_linker_flags)
+ dyn_string_append (ds, mcore_elf_linker_flags);
+
+ dyn_string_append (ds, " ");
+ dyn_string_append (ds, MCORE_ELF_TMP_EXP);
+ dyn_string_append (ds, " ");
+ dyn_string_append (ds, MCORE_ELF_TMP_OBJ);
+ dyn_string_append (ds, " -o ");
+ dyn_string_append (ds, mcore_elf_out_file);
+
+ run (mcore_elf_linker, ds->s);
+
+ dyn_string_delete (ds);
+
+ if (dontdeltemps == 0)
+ unlink (MCORE_ELF_TMP_EXP);
+
+ if (dontdeltemps < 2)
+ unlink (MCORE_ELF_TMP_OBJ);
+}
+#endif /* DLLTOOL_MCORE_ELF */
diff --git a/contrib/binutils/binutils/dlltool.h b/contrib/binutils/binutils/dlltool.h
index d9c7abe..b4167c8 100644
--- a/contrib/binutils/binutils/dlltool.h
+++ b/contrib/binutils/binutils/dlltool.h
@@ -1,5 +1,5 @@
/* dlltool.h -- header file for dlltool
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -27,7 +27,8 @@ extern void def_description PARAMS ((const char *));
extern void def_exports
PARAMS ((const char *, const char *, int, int, int, int));
extern void def_heapsize PARAMS ((int, int));
-extern void def_import PARAMS ((const char *, const char *, const char *));
+extern void def_import
+ PARAMS ((const char *, const char *, const char *, const char *, int));
extern void def_library PARAMS ((const char *, int));
extern void def_name PARAMS ((const char *, int));
extern void def_section PARAMS ((const char *, int));
diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c
new file mode 100644
index 0000000..637fa52
--- /dev/null
+++ b/contrib/binutils/binutils/dllwrap.c
@@ -0,0 +1,1249 @@
+/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Contributed by Mumit Khan (khan@xraylith.wisc.edu).
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+/* AIX requires this to be the first thing in the file. */
+#ifndef __GNUC__
+# ifdef _AIX
+ #pragma alloca
+#endif
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "bfd.h"
+#include "libiberty.h"
+#include "bucomm.h"
+#include "getopt.h"
+#include "dyn-string.h"
+
+#include <ctype.h>
+#include <time.h>
+#include <sys/stat.h>
+
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#else /* ! HAVE_SYS_WAIT_H */
+#if ! defined (_WIN32) || defined (__CYGWIN32__)
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w)&0377) == 0)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0177)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) >> 8) & 0377)
+#endif
+#else /* defined (_WIN32) && ! defined (__CYGWIN32__) */
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w) & 0xff) == 0)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w) & 0xff) != 0 && ((w) & 0xff) != 0x7f)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0x7f)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) & 0xff00) >> 8)
+#endif
+#endif /* defined (_WIN32) && ! defined (__CYGWIN32__) */
+#endif /* ! HAVE_SYS_WAIT_H */
+
+static char *driver_name = NULL;
+static char *cygwin_driver_flags =
+ "-Wl,--dll -nostartfiles";
+static char *mingw32_driver_flags = "-mdll";
+static char *generic_driver_flags = "-Wl,--dll";
+
+static char *entry_point;
+
+static char *dlltool_name = NULL;
+
+static char *target = TARGET;
+
+typedef enum {
+ UNKNOWN_TARGET,
+ CYGWIN_TARGET,
+ MINGW_TARGET
+}
+target_type;
+
+static target_type which_target = UNKNOWN_TARGET;
+
+static int dontdeltemps = 0;
+static int dry_run = 0;
+
+static char *program_name;
+
+static int verbose = 0;
+
+static char *dll_file_name;
+static char *dll_name;
+static char *base_file_name;
+static char *exp_file_name;
+static char *def_file_name;
+static int delete_base_file = 1;
+static int delete_exp_file = 1;
+static int delete_def_file = 1;
+
+static int run PARAMS ((const char *, char *));
+static void usage PARAMS ((FILE *, int));
+static void display PARAMS ((const char *, va_list));
+static void inform PARAMS ((const char *, ...));
+static void warn PARAMS ((const char *format, ...));
+static char *look_for_prog PARAMS ((const char *, const char *, int));
+static char *deduce_name PARAMS ((const char *));
+static void delete_temp_files PARAMS ((void));
+static void cleanup_and_exit PARAMS ((int status));
+
+/**********************************************************************/
+
+/* Please keep the following 4 routines in sync with dlltool.c:
+ display ()
+ inform ()
+ look_for_prog ()
+ deduce_name ()
+ It's not worth the hassle to break these out since dllwrap will
+ (hopefully) soon be retired in favor of `ld --shared. */
+
+static void
+display (message, args)
+ const char * message;
+ va_list args;
+{
+ if (program_name != NULL)
+ fprintf (stderr, "%s: ", program_name);
+
+ vfprintf (stderr, message, args);
+ fputc ('\n', stderr);
+}
+
+
+#ifdef __STDC__
+static void
+inform (const char * message, ...)
+{
+ va_list args;
+
+ if (!verbose)
+ return;
+
+ va_start (args, message);
+ display (message, args);
+ va_end (args);
+}
+
+static void
+warn (const char *format, ...)
+{
+ va_list args;
+
+ va_start (args, format);
+ display (format, args);
+ va_end (args);
+}
+#else
+
+static void
+inform (message, va_alist)
+ const char * message;
+ va_dcl
+{
+ va_list args;
+
+ if (!verbose)
+ return;
+
+ va_start (args);
+ display (message, args);
+ va_end (args);
+}
+
+static void
+warn (format, va_alist)
+ const char *format;
+ va_dcl
+{
+ va_list args;
+
+ va_start (args);
+ display (format, args);
+ va_end (args);
+}
+#endif
+
+/* Look for the program formed by concatenating PROG_NAME and the
+ string running from PREFIX to END_PREFIX. If the concatenated
+ string contains a '/', try appending EXECUTABLE_SUFFIX if it is
+ appropriate. */
+
+static char *
+look_for_prog (prog_name, prefix, end_prefix)
+ const char *prog_name;
+ const char *prefix;
+ int end_prefix;
+{
+ struct stat s;
+ char *cmd;
+
+ cmd = xmalloc (strlen (prefix)
+ + strlen (prog_name)
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ + strlen (EXECUTABLE_SUFFIX)
+#endif
+ + 10);
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s", prog_name);
+
+ if (strchr (cmd, '/') != NULL)
+ {
+ int found;
+
+ found = (stat (cmd, &s) == 0
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0
+#endif
+ );
+
+ if (! found)
+ {
+ /* xgettext:c-format */
+ inform (_("Tried file: %s"), cmd);
+ free (cmd);
+ return NULL;
+ }
+ }
+
+ /* xgettext:c-format */
+ inform (_("Using file: %s"), cmd);
+
+ return cmd;
+}
+
+/* Deduce the name of the program we are want to invoke.
+ PROG_NAME is the basic name of the program we want to run,
+ eg "as" or "ld". The catch is that we might want actually
+ run "i386-pe-as" or "ppc-pe-ld".
+
+ If argv[0] contains the full path, then try to find the program
+ in the same place, with and then without a target-like prefix.
+
+ Given, argv[0] = /usr/local/bin/i586-cygwin32-dlltool,
+ deduce_name("as") uses the following search order:
+
+ /usr/local/bin/i586-cygwin32-as
+ /usr/local/bin/as
+ as
+
+ If there's an EXECUTABLE_SUFFIX, it'll use that as well; for each
+ name, it'll try without and then with EXECUTABLE_SUFFIX.
+
+ Given, argv[0] = i586-cygwin32-dlltool, it will not even try "as"
+ as the fallback, but rather return i586-cygwin32-as.
+
+ Oh, and given, argv[0] = dlltool, it'll return "as".
+
+ Returns a dynamically allocated string. */
+
+static char *
+deduce_name (prog_name)
+ const char *prog_name;
+{
+ char *cmd;
+ char *dash, *slash, *cp;
+
+ dash = NULL;
+ slash = NULL;
+ for (cp = program_name; *cp != '\0'; ++cp)
+ {
+ if (*cp == '-')
+ dash = cp;
+ if (
+#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
+ *cp == ':' || *cp == '\\' ||
+#endif
+ *cp == '/')
+ {
+ slash = cp;
+ dash = NULL;
+ }
+ }
+
+ cmd = NULL;
+
+ if (dash != NULL)
+ {
+ /* First, try looking for a prefixed PROG_NAME in the
+ PROGRAM_NAME directory, with the same prefix as PROGRAM_NAME. */
+ cmd = look_for_prog (prog_name, program_name, dash - program_name + 1);
+ }
+
+ if (slash != NULL && cmd == NULL)
+ {
+ /* Next, try looking for a PROG_NAME in the same directory as
+ that of this program. */
+ cmd = look_for_prog (prog_name, program_name, slash - program_name + 1);
+ }
+
+ if (cmd == NULL)
+ {
+ /* Just return PROG_NAME as is. */
+ cmd = xstrdup (prog_name);
+ }
+
+ return cmd;
+}
+
+static void
+delete_temp_files ()
+{
+ if (delete_base_file && base_file_name)
+ {
+ if (verbose)
+ {
+ if (dontdeltemps)
+ warn (_("Keeping temporary base file %s"), base_file_name);
+ else
+ warn (_("Deleting temporary base file %s"), base_file_name);
+ }
+ if (! dontdeltemps)
+ {
+ unlink (base_file_name);
+ free (base_file_name);
+ }
+ }
+
+ if (delete_exp_file && exp_file_name)
+ {
+ if (verbose)
+ {
+ if (dontdeltemps)
+ warn (_("Keeping temporary exp file %s"), exp_file_name);
+ else
+ warn (_("Deleting temporary exp file %s"), exp_file_name);
+ }
+ if (! dontdeltemps)
+ {
+ unlink (exp_file_name);
+ free (exp_file_name);
+ }
+ }
+ if (delete_def_file && def_file_name)
+ {
+ if (verbose)
+ {
+ if (dontdeltemps)
+ warn (_("Keeping temporary def file %s"), def_file_name);
+ else
+ warn (_("Deleting temporary def file %s"), def_file_name);
+ }
+ if (! dontdeltemps)
+ {
+ unlink (def_file_name);
+ free (def_file_name);
+ }
+ }
+}
+
+static void
+cleanup_and_exit (int status)
+{
+ delete_temp_files ();
+ exit (status);
+}
+
+static int
+run (what, args)
+ const char *what;
+ char *args;
+{
+ char *s;
+ int pid, wait_status, retcode;
+ int i;
+ const char **argv;
+ char *errmsg_fmt, *errmsg_arg;
+ char *temp_base = choose_temp_base ();
+ int in_quote;
+ char sep;
+
+ if (verbose || dry_run)
+ fprintf (stderr, "%s %s\n", what, args);
+
+ /* Count the args */
+ i = 0;
+ for (s = args; *s; s++)
+ if (*s == ' ')
+ i++;
+ i++;
+ argv = alloca (sizeof (char *) * (i + 3));
+ i = 0;
+ argv[i++] = what;
+ s = args;
+ while (1)
+ {
+ while (*s == ' ' && *s != 0)
+ s++;
+ if (*s == 0)
+ break;
+ in_quote = (*s == '\'' || *s == '"');
+ sep = (in_quote) ? *s++ : ' ';
+ argv[i++] = s;
+ while (*s != sep && *s != 0)
+ s++;
+ if (*s == 0)
+ break;
+ *s++ = 0;
+ if (in_quote)
+ s++;
+ }
+ argv[i++] = NULL;
+
+ if (dry_run)
+ return 0;
+
+ pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base,
+ &errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH);
+
+ if (pid == -1)
+ {
+ int errno_val = errno;
+
+ fprintf (stderr, "%s: ", program_name);
+ fprintf (stderr, errmsg_fmt, errmsg_arg);
+ fprintf (stderr, ": %s\n", strerror (errno_val));
+ return 1;
+ }
+
+ retcode = 0;
+ pid = pwait (pid, &wait_status, 0);
+ if (pid == -1)
+ {
+ warn ("wait: %s", strerror (errno));
+ retcode = 1;
+ }
+ else if (WIFSIGNALED (wait_status))
+ {
+ warn (_("subprocess got fatal signal %d"), WTERMSIG (wait_status));
+ retcode = 1;
+ }
+ else if (WIFEXITED (wait_status))
+ {
+ if (WEXITSTATUS (wait_status) != 0)
+ {
+ warn (_("%s exited with status %d"), what, WEXITSTATUS (wait_status));
+ retcode = 1;
+ }
+ }
+ else
+ retcode = 1;
+
+ return retcode;
+}
+
+static char *
+mybasename (name)
+ const char *name;
+{
+ const char *base = name;
+
+ while (*name)
+ {
+ if (*name == '/' || *name == '\\')
+ {
+ base = name + 1;
+ }
+ ++name;
+ }
+ return (char *) base;
+}
+
+static int
+strhash (const char *str)
+{
+ const unsigned char *s;
+ unsigned long hash;
+ unsigned int c;
+ unsigned int len;
+
+ hash = 0;
+ len = 0;
+ s = (const unsigned char *) str;
+ while ((c = *s++) != '\0')
+ {
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ ++len;
+ }
+ hash += len + (len << 17);
+ hash ^= hash >> 2;
+
+ return hash;
+}
+
+/**********************************************************************/
+
+static void
+usage (file, status)
+ FILE *file;
+ int status;
+{
+ fprintf (file, _("Usage %s <options> <object-files>\n"), program_name);
+ fprintf (file, _(" Generic options:\n"));
+ fprintf (file, _(" --quiet, -q Work quietly\n"));
+ fprintf (file, _(" --verbose, -v Verbose\n"));
+ fprintf (file, _(" --version Print dllwrap version\n"));
+ fprintf (file, _(" --implib <outname> Synonym for --output-lib\n"));
+ fprintf (file, _(" Options for %s:\n"), program_name);
+ fprintf (file, _(" --driver-name <driver> Defaults to \"gcc\"\n"));
+ fprintf (file, _(" --driver-flags <flags> Override default ld flags\n"));
+ fprintf (file, _(" --dlltool-name <dlltool> Defaults to \"dlltool\"\n"));
+ fprintf (file, _(" --entry <entry> Specify alternate DLL entry point\n"));
+ fprintf (file, _(" --image-base <base> Specify image base address\n"));
+ fprintf (file, _(" --target <machine> i386-cygwin32 or i386-mingw32\n"));
+ fprintf (file, _(" --dry-run Show what needs to be run\n"));
+ fprintf (file, _(" --mno-cygwin Create Mingw DLL\n"));
+ fprintf (file, _(" Options passed to DLLTOOL:\n"));
+ fprintf (file, _(" --machine <machine>\n"));
+ fprintf (file, _(" --output-exp <outname> Generate export file.\n"));
+ fprintf (file, _(" --output-lib <outname> Generate input library.\n"));
+ fprintf (file, _(" --add-indirect Add dll indirects to export file.\n"));
+ fprintf (file, _(" --dllname <name> Name of input dll to put into output lib.\n"));
+ fprintf (file, _(" --def <deffile> Name input .def file\n"));
+ fprintf (file, _(" --output-def <deffile> Name output .def file\n"));
+ fprintf (file, _(" --export-all-symbols Export all symbols to .def\n"));
+ fprintf (file, _(" --no-export-all-symbols Only export .drectve symbols\n"));
+ fprintf (file, _(" --exclude-symbols <list> Exclude <list> from .def\n"));
+ fprintf (file, _(" --no-default-excludes Zap default exclude symbols\n"));
+ fprintf (file, _(" --base-file <basefile> Read linker generated base file\n"));
+ fprintf (file, _(" --no-idata4 Don't generate idata$4 section\n"));
+ fprintf (file, _(" --no-idata5 Don't generate idata$5 section\n"));
+ fprintf (file, _(" -U Add underscores to .lib\n"));
+ fprintf (file, _(" -k Kill @<n> from exported names\n"));
+ fprintf (file, _(" --add-stdcall-alias Add aliases without @<n>\n"));
+ fprintf (file, _(" --as <name> Use <name> for assembler\n"));
+ fprintf (file, _(" --nodelete Keep temp files.\n"));
+ fprintf (file, _(" Rest are passed unmodified to the language driver\n"));
+ fprintf (file, "\n\n");
+ exit (status);
+}
+
+#define OPTION_START 149
+
+/* GENERIC options. */
+#define OPTION_QUIET (OPTION_START + 1)
+#define OPTION_VERBOSE (OPTION_QUIET + 1)
+#define OPTION_VERSION (OPTION_VERBOSE + 1)
+
+/* DLLWRAP options. */
+#define OPTION_DRY_RUN (OPTION_VERSION + 1)
+#define OPTION_DRIVER_NAME (OPTION_DRY_RUN + 1)
+#define OPTION_DRIVER_FLAGS (OPTION_DRIVER_NAME + 1)
+#define OPTION_DLLTOOL_NAME (OPTION_DRIVER_FLAGS + 1)
+#define OPTION_ENTRY (OPTION_DLLTOOL_NAME + 1)
+#define OPTION_IMAGE_BASE (OPTION_ENTRY + 1)
+#define OPTION_TARGET (OPTION_IMAGE_BASE + 1)
+#define OPTION_MNO_CYGWIN (OPTION_TARGET + 1)
+
+/* DLLTOOL options. */
+#define OPTION_NODELETE (OPTION_MNO_CYGWIN + 1)
+#define OPTION_DLLNAME (OPTION_NODELETE + 1)
+#define OPTION_NO_IDATA4 (OPTION_DLLNAME + 1)
+#define OPTION_NO_IDATA5 (OPTION_NO_IDATA4 + 1)
+#define OPTION_OUTPUT_EXP (OPTION_NO_IDATA5 + 1)
+#define OPTION_OUTPUT_DEF (OPTION_OUTPUT_EXP + 1)
+#define OPTION_EXPORT_ALL_SYMS (OPTION_OUTPUT_DEF + 1)
+#define OPTION_NO_EXPORT_ALL_SYMS (OPTION_EXPORT_ALL_SYMS + 1)
+#define OPTION_EXCLUDE_SYMS (OPTION_NO_EXPORT_ALL_SYMS + 1)
+#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_EXCLUDE_SYMS + 1)
+#define OPTION_OUTPUT_LIB (OPTION_NO_DEFAULT_EXCLUDES + 1)
+#define OPTION_DEF (OPTION_OUTPUT_LIB + 1)
+#define OPTION_ADD_UNDERSCORE (OPTION_DEF + 1)
+#define OPTION_KILLAT (OPTION_ADD_UNDERSCORE + 1)
+#define OPTION_HELP (OPTION_KILLAT + 1)
+#define OPTION_MACHINE (OPTION_HELP + 1)
+#define OPTION_ADD_INDIRECT (OPTION_MACHINE + 1)
+#define OPTION_BASE_FILE (OPTION_ADD_INDIRECT + 1)
+#define OPTION_AS (OPTION_BASE_FILE + 1)
+
+static const struct option long_options[] =
+{
+ /* generic options. */
+ {"quiet", no_argument, NULL, 'q'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, OPTION_VERSION},
+ {"implib", required_argument, NULL, OPTION_OUTPUT_LIB},
+
+ /* dllwrap options. */
+ {"dry-run", no_argument, NULL, OPTION_DRY_RUN},
+ {"driver-name", required_argument, NULL, OPTION_DRIVER_NAME},
+ {"driver-flags", required_argument, NULL, OPTION_DRIVER_FLAGS},
+ {"dlltool-name", required_argument, NULL, OPTION_DLLTOOL_NAME},
+ {"entry", required_argument, NULL, 'e'},
+ {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
+ {"target", required_argument, NULL, OPTION_TARGET},
+
+ /* dlltool options. */
+ {"no-delete", no_argument, NULL, 'n'},
+ {"dllname", required_argument, NULL, OPTION_DLLNAME},
+ {"no-idata4", no_argument, NULL, OPTION_NO_IDATA4},
+ {"no-idata5", no_argument, NULL, OPTION_NO_IDATA5},
+ {"output-exp", required_argument, NULL, OPTION_OUTPUT_EXP},
+ {"output-def", required_argument, NULL, OPTION_OUTPUT_DEF},
+ {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL_SYMS},
+ {"no-export-all-symbols", no_argument, NULL, OPTION_NO_EXPORT_ALL_SYMS},
+ {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMS},
+ {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
+ {"output-lib", required_argument, NULL, OPTION_OUTPUT_LIB},
+ {"def", required_argument, NULL, OPTION_DEF},
+ {"add-underscore", no_argument, NULL, 'U'},
+ {"killat", no_argument, NULL, 'k'},
+ {"add-stdcall-alias", no_argument, NULL, 'A'},
+ {"help", no_argument, NULL, 'h'},
+ {"machine", required_argument, NULL, OPTION_MACHINE},
+ {"add-indirect", no_argument, NULL, OPTION_ADD_INDIRECT},
+ {"base-file", required_argument, NULL, OPTION_BASE_FILE},
+ {"as", required_argument, NULL, OPTION_AS},
+ {0, 0, 0, 0}
+};
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int i;
+
+ char **saved_argv = 0;
+ int cmdline_len = 0;
+
+ int export_all = 0;
+
+ int *dlltool_arg_indices;
+ int *driver_arg_indices;
+
+ char *driver_flags = 0;
+ char *output_lib_file_name = 0;
+
+ dyn_string_t dlltool_cmdline;
+ dyn_string_t driver_cmdline;
+
+ int def_file_seen = 0;
+
+ char *image_base_str = 0;
+
+ program_name = argv[0];
+
+ saved_argv = (char **) xmalloc (argc * sizeof (char*));
+ dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int));
+ driver_arg_indices = (int *) xmalloc (argc * sizeof (int));
+ for (i = 0; i < argc; ++i)
+ {
+ size_t len = strlen (argv[i]);
+ char *arg = (char *) xmalloc (len + 1);
+ strcpy (arg, argv[i]);
+ cmdline_len += len;
+ saved_argv[i] = arg;
+ dlltool_arg_indices[i] = 0;
+ driver_arg_indices[i] = 1;
+ }
+ cmdline_len++;
+
+ /* We recognize dllwrap and dlltool options, and everything else is
+ passed onto the language driver (eg., to GCC). We collect options
+ to dlltool and driver in dlltool_args and driver_args. */
+
+ opterr = 0;
+ while ((c = getopt_long_only (argc, argv, "nkAqve:Uho:l:L:I:",
+ long_options, (int *) 0)) != EOF)
+ {
+ int dlltool_arg;
+ int driver_arg;
+ int single_word_option_value_pair;
+
+ dlltool_arg = 0;
+ driver_arg = 1;
+ single_word_option_value_pair = 0;
+
+ if (c != '?')
+ {
+ /* We recognize this option, so it has to be either dllwrap or
+ dlltool option. Do not pass to driver unless it's one of the
+ generic options that are passed to all the tools (such as -v)
+ which are dealt with later. */
+ driver_arg = 0;
+ }
+
+ /* deal with generic and dllwrap options first. */
+ switch (c)
+ {
+ case 'h':
+ usage (stdout, 0);
+ break;
+ case 'q':
+ verbose = 0;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case OPTION_VERSION:
+ print_version (program_name);
+ break;
+ case 'e':
+ entry_point = optarg;
+ break;
+ case OPTION_IMAGE_BASE:
+ image_base_str = optarg;
+ break;
+ case OPTION_DEF:
+ def_file_name = optarg;
+ def_file_seen = 1;
+ delete_def_file = 0;
+ break;
+ case 'n':
+ dontdeltemps = 1;
+ dlltool_arg = 1;
+ break;
+ case 'o':
+ dll_file_name = optarg;
+ break;
+ case 'I':
+ case 'l':
+ case 'L':
+ driver_arg = 1;
+ break;
+ case OPTION_DLLNAME:
+ dll_name = optarg;
+ break;
+ case OPTION_DRY_RUN:
+ dry_run = 1;
+ break;
+ case OPTION_DRIVER_NAME:
+ driver_name = optarg;
+ break;
+ case OPTION_DRIVER_FLAGS:
+ driver_flags = optarg;
+ break;
+ case OPTION_DLLTOOL_NAME:
+ dlltool_name = optarg;
+ break;
+ case OPTION_TARGET:
+ target = optarg;
+ break;
+ case OPTION_MNO_CYGWIN:
+ target = "i386-mingw32";
+ break;
+ case OPTION_BASE_FILE:
+ base_file_name = optarg;
+ delete_base_file = 0;
+ break;
+ case OPTION_OUTPUT_EXP:
+ exp_file_name = optarg;
+ delete_exp_file = 0;
+ break;
+ case OPTION_EXPORT_ALL_SYMS:
+ export_all = 1;
+ break;
+ case OPTION_OUTPUT_LIB:
+ output_lib_file_name = optarg;
+ break;
+ case '?':
+ break;
+ default:
+ dlltool_arg = 1;
+ break;
+ }
+
+ /* Handle passing through --option=value case. */
+ if (optarg
+ && saved_argv[optind-1][0] == '-'
+ && saved_argv[optind-1][1] == '-'
+ && strchr (saved_argv[optind-1], '='))
+ single_word_option_value_pair = 1;
+
+ if (dlltool_arg)
+ {
+ dlltool_arg_indices[optind-1] = 1;
+ if (optarg && ! single_word_option_value_pair)
+ {
+ dlltool_arg_indices[optind-2] = 1;
+ }
+ }
+
+ if (! driver_arg)
+ {
+ driver_arg_indices[optind-1] = 0;
+ if (optarg && ! single_word_option_value_pair)
+ {
+ driver_arg_indices[optind-2] = 0;
+ }
+ }
+ }
+
+ /* sanity checks. */
+ if (! dll_name && ! dll_file_name)
+ {
+ warn (_("Must provide at least one of -o or --dllname options"));
+ exit (1);
+ }
+ else if (! dll_name)
+ {
+ dll_name = xstrdup (mybasename (dll_file_name));
+ }
+ else if (! dll_file_name)
+ {
+ dll_file_name = xstrdup (dll_name);
+ }
+
+ /* Deduce driver-name and dlltool-name from our own. */
+ if (driver_name == NULL)
+ driver_name = deduce_name ("gcc");
+
+ if (dlltool_name == NULL)
+ dlltool_name = deduce_name ("dlltool");
+
+ if (! def_file_seen)
+ {
+ char *fileprefix = choose_temp_base ();
+ def_file_name = (char *) xmalloc (strlen (fileprefix) + 5);
+ sprintf (def_file_name, "%s.def",
+ (dontdeltemps) ? mybasename (fileprefix) : fileprefix);
+ delete_def_file = 1;
+ free (fileprefix);
+ delete_def_file = 1;
+ warn (_("no export definition file provided"));
+ warn (_("creating one, but that may not be what you want"));
+ }
+
+ /* set the target platform. */
+ if (strstr (target, "cygwin"))
+ which_target = CYGWIN_TARGET;
+ else if (strstr (target, "mingw"))
+ which_target = MINGW_TARGET;
+ else
+ which_target = UNKNOWN_TARGET;
+
+ /* re-create the command lines as a string, taking care to quote stuff. */
+ dlltool_cmdline = dyn_string_new (cmdline_len);
+ if (verbose)
+ {
+ dyn_string_append (dlltool_cmdline, " -v");
+ }
+ dyn_string_append (dlltool_cmdline, " --dllname ");
+ dyn_string_append (dlltool_cmdline, dll_name);
+
+ for (i = 1; i < argc; ++i)
+ {
+ if (dlltool_arg_indices[i])
+ {
+ char *arg = saved_argv[i];
+ int quote = (strchr (arg, ' ') || strchr (arg, '\t'));
+ dyn_string_append (dlltool_cmdline,
+ (quote) ? " \"" : " ");
+ dyn_string_append (dlltool_cmdline, arg);
+ dyn_string_append (dlltool_cmdline,
+ (quote) ? "\"" : "");
+ }
+ }
+
+ driver_cmdline = dyn_string_new (cmdline_len);
+ if (! driver_flags || strlen (driver_flags) == 0)
+ {
+ switch (which_target)
+ {
+ case CYGWIN_TARGET:
+ driver_flags = cygwin_driver_flags;
+ break;
+
+ case MINGW_TARGET:
+ driver_flags = mingw32_driver_flags;
+ break;
+
+ default:
+ driver_flags = generic_driver_flags;
+ break;
+ }
+ }
+ dyn_string_append (driver_cmdline, driver_flags);
+ dyn_string_append (driver_cmdline, " -o ");
+ dyn_string_append (driver_cmdline, dll_file_name);
+
+ if (! entry_point || strlen (entry_point) == 0)
+ {
+ switch (which_target)
+ {
+ case CYGWIN_TARGET:
+ entry_point = "__cygwin_dll_entry@12";
+ break;
+
+ case MINGW_TARGET:
+ entry_point = "_DllMainCRTStartup@12";
+ break;
+
+ default:
+ entry_point = "_DllMain@12";
+ 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,
+ (entry_point[0] == '_') ? entry_point+1 : entry_point);
+
+ if (! image_base_str || strlen (image_base_str) == 0)
+ {
+ char *tmpbuf = (char *) xmalloc (sizeof ("0x12345678") + 1);
+ unsigned long hash = strhash (dll_file_name);
+ sprintf (tmpbuf, "0x%.8lX", 0x60000000|((hash<<16)&0xFFC0000));
+ image_base_str = tmpbuf;
+ }
+
+ dyn_string_append (driver_cmdline, " -Wl,--image-base,");
+ dyn_string_append (driver_cmdline, image_base_str);
+
+ if (verbose)
+ {
+ dyn_string_append (driver_cmdline, " -v");
+ }
+
+ for (i = 1; i < argc; ++i)
+ {
+ if (driver_arg_indices[i])
+ {
+ char *arg = saved_argv[i];
+ int quote = (strchr (arg, ' ') || strchr (arg, '\t'));
+ dyn_string_append (driver_cmdline,
+ (quote) ? " \"" : " ");
+ dyn_string_append (driver_cmdline, arg);
+ dyn_string_append (driver_cmdline,
+ (quote) ? "\"" : "");
+ }
+ }
+
+ /*
+ * Step pre-1. If no --def <EXPORT_DEF> is specified, then create it
+ * and then pass it on.
+ */
+
+ if (! def_file_seen)
+ {
+ int i;
+ dyn_string_t step_pre1;
+
+ step_pre1 = dyn_string_new (1024);
+
+ dyn_string_append (step_pre1, dlltool_cmdline->s);
+ if (export_all)
+ {
+ dyn_string_append (step_pre1, " --export-all --exclude-symbol=");
+ dyn_string_append (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);
+
+ for (i = 1; i < argc; ++i)
+ {
+ if (driver_arg_indices[i])
+ {
+ char *arg = saved_argv[i];
+ size_t len = strlen (arg);
+ if (len >= 2 && arg[len-2] == '.'
+ && (arg[len-1] == 'o' || arg[len-1] == 'a'))
+ {
+ int quote = (strchr (arg, ' ') || strchr (arg, '\t'));
+ dyn_string_append (step_pre1,
+ (quote) ? " \"" : " ");
+ dyn_string_append (step_pre1, arg);
+ dyn_string_append (step_pre1,
+ (quote) ? "\"" : "");
+ }
+ }
+ }
+
+ if (run (dlltool_name, step_pre1->s))
+ cleanup_and_exit (1);
+
+ dyn_string_delete (step_pre1);
+ }
+
+ dyn_string_append (dlltool_cmdline, " --def ");
+ dyn_string_append (dlltool_cmdline, def_file_name);
+
+ if (verbose)
+ {
+ fprintf (stderr, _("DLLTOOL name : %s\n"), dlltool_name);
+ fprintf (stderr, _("DLLTOOL options : %s\n"), dlltool_cmdline->s);
+ fprintf (stderr, _("DRIVER name : %s\n"), driver_name);
+ fprintf (stderr, _("DRIVER options : %s\n"), driver_cmdline->s);
+ }
+
+ /*
+ * Step 1. Call GCC/LD to create base relocation file. If using GCC, the
+ * driver command line will look like the following:
+ *
+ * % gcc -Wl,--dll --Wl,--base-file,foo.base [rest of command line]
+ *
+ * If the user does not specify a base name, create temporary one that
+ * is deleted at exit.
+ *
+ */
+
+ if (! base_file_name)
+ {
+ char *fileprefix = choose_temp_base ();
+ base_file_name = (char *) xmalloc (strlen (fileprefix) + 6);
+ sprintf (base_file_name, "%s.base",
+ (dontdeltemps) ? mybasename (fileprefix) : fileprefix);
+ delete_base_file = 1;
+ free (fileprefix);
+ }
+
+ {
+ int quote;
+
+ dyn_string_t step1 = dyn_string_new (driver_cmdline->length
+ + strlen (base_file_name)
+ + 20);
+ dyn_string_append (step1, "-Wl,--base-file,");
+ quote = (strchr (base_file_name, ' ')
+ || strchr (base_file_name, '\t'));
+ dyn_string_append (step1,
+ (quote) ? "\"" : "");
+ dyn_string_append (step1, base_file_name);
+ dyn_string_append (step1,
+ (quote) ? "\"" : "");
+ if (driver_cmdline->length)
+ {
+ dyn_string_append (step1, " ");
+ dyn_string_append (step1, driver_cmdline->s);
+ }
+
+ if (run (driver_name, step1->s))
+ cleanup_and_exit (1);
+
+ dyn_string_delete (step1);
+ }
+
+
+
+ /*
+ * Step 2. generate the exp file by running dlltool.
+ * dlltool command line will look like the following:
+ *
+ * % dlltool -Wl,--dll --Wl,--base-file,foo.base [rest of command line]
+ *
+ * If the user does not specify a base name, create temporary one that
+ * is deleted at exit.
+ *
+ */
+
+ if (! exp_file_name)
+ {
+ char *p = strrchr (dll_name, '.');
+ size_t prefix_len = (p) ? p - dll_name : strlen (dll_name);
+ exp_file_name = (char *) xmalloc (prefix_len + 4 + 1);
+ strncpy (exp_file_name, dll_name, prefix_len);
+ exp_file_name[prefix_len] = '\0';
+ strcat (exp_file_name, ".exp");
+ delete_exp_file = 1;
+ }
+
+ {
+ int quote;
+ dyn_string_t step2 = dyn_string_new (dlltool_cmdline->length
+ + strlen (base_file_name)
+ + strlen (exp_file_name)
+ + 20);
+
+ dyn_string_append (step2, "--base-file ");
+ quote = (strchr (base_file_name, ' ')
+ || strchr (base_file_name, '\t'));
+ dyn_string_append (step2,
+ (quote) ? "\"" : "");
+ dyn_string_append (step2, base_file_name);
+ dyn_string_append (step2,
+ (quote) ? "\" " : " ");
+
+ dyn_string_append (step2, "--output-exp ");
+ quote = (strchr (exp_file_name, ' ')
+ || strchr (exp_file_name, '\t'));
+ dyn_string_append (step2,
+ (quote) ? "\"" : "");
+ dyn_string_append (step2, exp_file_name);
+ dyn_string_append (step2,
+ (quote) ? "\"" : "");
+
+ if (dlltool_cmdline->length)
+ {
+ dyn_string_append (step2, " ");
+ dyn_string_append (step2, dlltool_cmdline->s);
+ }
+
+ if (run (dlltool_name, step2->s))
+ cleanup_and_exit (1);
+
+ dyn_string_delete (step2);
+ }
+
+ /*
+ * Step 3. Call GCC/LD to again, adding the exp file this time.
+ * driver command line will look like the following:
+ *
+ * % gcc -Wl,--dll --Wl,--base-file,foo.base foo.exp [rest ...]
+ */
+
+ {
+ int quote;
+
+ dyn_string_t step3 = dyn_string_new (driver_cmdline->length
+ + strlen (exp_file_name)
+ + strlen (base_file_name)
+ + 20);
+ dyn_string_append (step3, "-Wl,--base-file,");
+ quote = (strchr (base_file_name, ' ')
+ || strchr (base_file_name, '\t'));
+ dyn_string_append (step3,
+ (quote) ? "\"" : "");
+ dyn_string_append (step3, base_file_name);
+ dyn_string_append (step3,
+ (quote) ? "\" " : " ");
+
+ quote = (strchr (exp_file_name, ' ')
+ || strchr (exp_file_name, '\t'));
+ dyn_string_append (step3,
+ (quote) ? "\"" : "");
+ dyn_string_append (step3, exp_file_name);
+ dyn_string_append (step3,
+ (quote) ? "\"" : "");
+
+ if (driver_cmdline->length)
+ {
+ dyn_string_append (step3, " ");
+ dyn_string_append (step3, driver_cmdline->s);
+ }
+
+ if (run (driver_name, step3->s))
+ cleanup_and_exit (1);
+
+ dyn_string_delete (step3);
+ }
+
+
+ /*
+ * Step 4. Run DLLTOOL again using the same command line.
+ */
+
+ {
+ int quote;
+ dyn_string_t step4 = dyn_string_new (dlltool_cmdline->length
+ + strlen (base_file_name)
+ + strlen (exp_file_name)
+ + 20);
+
+ dyn_string_append (step4, "--base-file ");
+ quote = (strchr (base_file_name, ' ')
+ || strchr (base_file_name, '\t'));
+ dyn_string_append (step4,
+ (quote) ? "\"" : "");
+ dyn_string_append (step4, base_file_name);
+ dyn_string_append (step4,
+ (quote) ? "\" " : " ");
+
+ dyn_string_append (step4, "--output-exp ");
+ quote = (strchr (exp_file_name, ' ')
+ || strchr (exp_file_name, '\t'));
+ dyn_string_append (step4,
+ (quote) ? "\"" : "");
+ dyn_string_append (step4, exp_file_name);
+ dyn_string_append (step4,
+ (quote) ? "\"" : "");
+
+ if (dlltool_cmdline->length)
+ {
+ dyn_string_append (step4, " ");
+ dyn_string_append (step4, dlltool_cmdline->s);
+ }
+
+ if (output_lib_file_name)
+ {
+ dyn_string_append (step4, " --output-lib ");
+ dyn_string_append (step4, output_lib_file_name);
+ }
+
+ if (run (dlltool_name, step4->s))
+ cleanup_and_exit (1);
+
+ dyn_string_delete (step4);
+ }
+
+
+ /*
+ * Step 5. Link it all together and be done with it.
+ * driver command line will look like the following:
+ *
+ * % gcc -Wl,--dll foo.exp [rest ...]
+ *
+ */
+
+ {
+ int quote;
+
+ dyn_string_t step5 = dyn_string_new (driver_cmdline->length
+ + strlen (exp_file_name)
+ + 20);
+ quote = (strchr (exp_file_name, ' ')
+ || strchr (exp_file_name, '\t'));
+ dyn_string_append (step5,
+ (quote) ? "\"" : "");
+ dyn_string_append (step5, exp_file_name);
+ dyn_string_append (step5,
+ (quote) ? "\"" : "");
+
+ if (driver_cmdline->length)
+ {
+ dyn_string_append (step5, " ");
+ dyn_string_append (step5, driver_cmdline->s);
+ }
+
+ if (run (driver_name, step5->s))
+ cleanup_and_exit (1);
+
+ dyn_string_delete (step5);
+ }
+
+ cleanup_and_exit (0);
+
+ return 0;
+}
diff --git a/contrib/binutils/binutils/dyn-string.c b/contrib/binutils/binutils/dyn-string.c
new file mode 100644
index 0000000..a164018
--- /dev/null
+++ b/contrib/binutils/binutils/dyn-string.c
@@ -0,0 +1,107 @@
+/* An abstract string datatype.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ Contributed by Mark Mitchell (mark@markmitchell.com).
+
+ This file is part of GNU CC.
+
+ GNU CC 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.
+
+ GNU CC is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This file lives in at least two places: binutils and gcc.
+ Don't change one without the other. */
+
+#include "config.h"
+#ifdef IN_GCC
+#include "system.h"
+#include "gansidecl.h"
+#else
+#include "ansidecl.h"
+#endif
+#include "dyn-string.h"
+
+extern char *xmalloc ();
+extern char *xrealloc ();
+
+/* Create a new dynamic string capable of holding at least SPACE
+ characters, including the terminating NUL. If SPACE is 0, it
+ will be silently increased to 1. */
+
+dyn_string_t
+dyn_string_new (space)
+ int space;
+{
+ dyn_string_t result = (dyn_string_t) xmalloc (sizeof (struct dyn_string));
+
+ if (space == 0)
+ /* We need at least one byte in which to store the terminating
+ NUL. */
+ space = 1;
+
+ result->allocated = space;
+ result->s = (char*) xmalloc (space);
+ result->length = 0;
+ result->s[0] = '\0';
+
+ return result;
+}
+
+/* Free the memory used by DS. */
+
+void
+dyn_string_delete (ds)
+ dyn_string_t ds;
+{
+ free (ds->s);
+ free (ds);
+}
+
+/* Append the NUL-terminated string S to DS, resizing DS if
+ necessary. */
+
+dyn_string_t
+dyn_string_append (ds, s)
+ dyn_string_t ds;
+ char *s;
+{
+ int len = strlen (s);
+ dyn_string_resize (ds, ds->length + len + 1 /* '\0' */);
+ strcpy (ds->s + ds->length, s);
+ ds->length += len;
+
+ return ds;
+}
+
+/* Increase the capacity of DS so that it can hold at least SPACE
+ characters, including the terminating NUL. This function will not
+ (at present) reduce the capacity of DS. */
+
+dyn_string_t
+dyn_string_resize (ds, space)
+ dyn_string_t ds;
+ int space;
+{
+ int new_allocated = ds->allocated;
+
+ while (space > new_allocated)
+ new_allocated *= 2;
+
+ if (new_allocated != ds->allocated)
+ {
+ /* We actually need more space. */
+ ds->allocated = new_allocated;
+ ds->s = (char*) xrealloc (ds->s, ds->allocated);
+ }
+
+ return ds;
+}
diff --git a/contrib/binutils/binutils/dyn-string.h b/contrib/binutils/binutils/dyn-string.h
new file mode 100644
index 0000000..cbd25c3
--- /dev/null
+++ b/contrib/binutils/binutils/dyn-string.h
@@ -0,0 +1,34 @@
+/* An abstract string datatype.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ Contributed by Mark Mitchell (mark@markmitchell.com).
+
+ This file is part of GNU CC.
+
+ GNU CC 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.
+
+ GNU CC is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This file lives in at least two places: binutils and gcc.
+ Don't change one without the other. */
+
+typedef struct dyn_string
+{
+ int allocated; /* The amount of space allocated for the string. */
+ int length; /* The actual length of the string. */
+ char *s; /* The string itself, NUL-terminated. */
+}* dyn_string_t;
+
+extern dyn_string_t dyn_string_new PARAMS((int));
+extern void dyn_string_delete PARAMS((dyn_string_t));
+extern dyn_string_t dyn_string_append PARAMS((dyn_string_t, char*));
+extern dyn_string_t dyn_string_resize PARAMS((dyn_string_t, int));
diff --git a/contrib/binutils/binutils/filemode.c b/contrib/binutils/binutils/filemode.c
index 58b52ba..f9811bc 100644
--- a/contrib/binutils/binutils/filemode.c
+++ b/contrib/binutils/binutils/filemode.c
@@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 90, 91, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1985, 90, 91, 94, 95, 97, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -230,8 +230,8 @@ ftypelet (bits)
static void
setst (bits, chars)
- unsigned long bits;
- char *chars;
+ unsigned long bits ATTRIBUTE_UNUSED;
+ char *chars ATTRIBUTE_UNUSED;
{
#ifdef S_ISUID
if (bits & S_ISUID)
diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c
index 180b97aa..a3bb93b 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 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -313,7 +313,7 @@ ieee_eof (info)
struct ieee_info *info;
{
ieee_error (info, (const bfd_byte *) NULL,
- "unexpected end of debugging information");
+ _("unexpected end of debugging information"));
}
/* Save a string in memory. */
@@ -408,7 +408,7 @@ ieee_read_optional_number (info, pp, pv, ppresent)
return true;
}
- ieee_error (info, *pp - 1, "invalid number");
+ ieee_error (info, *pp - 1, _("invalid number"));
return false;
}
@@ -467,7 +467,7 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
*ppresent = false;
return true;
}
- ieee_error (info, *pp - 1, "invalid string length");
+ ieee_error (info, *pp - 1, _("invalid string length"));
return false;
}
@@ -524,7 +524,7 @@ ieee_read_expression (info, pp, pv)
{
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
- ieee_error (info, start, "expression stack overflow");
+ ieee_error (info, start, _("expression stack overflow"));
return false;
}
*esp++ = val;
@@ -544,7 +544,7 @@ ieee_read_expression (info, pp, pv)
switch (c)
{
default:
- ieee_error (info, start, "unsupported IEEE expression operator");
+ ieee_error (info, start, _("unsupported IEEE expression operator"));
break;
case ieee_variable_R_enum:
@@ -559,13 +559,13 @@ ieee_read_expression (info, pp, pv)
break;
if (s == NULL)
{
- ieee_error (info, start, "unknown section");
+ ieee_error (info, start, _("unknown section"));
return false;
}
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
- ieee_error (info, start, "expression stack overflow");
+ ieee_error (info, start, _("expression stack overflow"));
return false;
}
@@ -580,7 +580,7 @@ ieee_read_expression (info, pp, pv)
if (esp - expr_stack < 2)
{
- ieee_error (info, start, "expression stack underflow");
+ ieee_error (info, start, _("expression stack underflow"));
return false;
}
@@ -594,7 +594,7 @@ ieee_read_expression (info, pp, pv)
if (esp - 1 != expr_stack)
{
- ieee_error (info, expr_start, "expression stack mismatch");
+ ieee_error (info, expr_start, _("expression stack mismatch"));
return false;
}
@@ -633,7 +633,7 @@ ieee_builtin_type (info, p, indx)
switch ((enum builtin_types) indx)
{
default:
- ieee_error (info, p, "unknown builtin type");
+ ieee_error (info, p, _("unknown builtin type"));
return NULL;
case builtin_unknown:
@@ -778,8 +778,8 @@ ieee_builtin_type (info, p, indx)
break;
case builtin_bcd_float:
- ieee_error (info, p, "BCD float type not supported");
- return false;
+ ieee_error (info, p, _("BCD float type not supported"));
+ return DEBUG_TYPE_NULL;
}
if (name != NULL)
@@ -900,8 +900,10 @@ parse_ieee (dhandle, abfd, bytes, len)
info.saw_filename = false;
info.vars.alloc = 0;
info.vars.vars = NULL;
+ info.global_vars = NULL;
info.types.alloc = 0;
info.types.types = NULL;
+ info.global_types = NULL;
info.tags = NULL;
for (i = 0; i < BUILTIN_TYPE_COUNT; i++)
info.types.builtins[i] = DEBUG_TYPE_NULL;
@@ -922,14 +924,14 @@ parse_ieee (dhandle, abfd, bytes, len)
if (c <= ieee_number_repeat_end_enum)
{
- ieee_error (&info, record_start, "unexpected number");
+ ieee_error (&info, record_start, _("unexpected number"));
return false;
}
switch (c)
{
default:
- ieee_error (&info, record_start, "unexpected record type");
+ ieee_error (&info, record_start, _("unexpected record type"));
return false;
case ieee_bb_record_enum:
@@ -962,7 +964,7 @@ parse_ieee (dhandle, abfd, bytes, len)
if (info.blockstack.bsp != info.blockstack.stack)
{
ieee_error (&info, (const bfd_byte *) NULL,
- "blocks left on stack at end");
+ _("blocks left on stack at end"));
return false;
}
@@ -1227,7 +1229,7 @@ parse_ieee_bb (info, pp)
break;
default:
- ieee_error (info, block_start, "unknown BB type");
+ ieee_error (info, block_start, _("unknown BB type"));
return false;
}
@@ -1236,7 +1238,7 @@ parse_ieee_bb (info, pp)
if (info->blockstack.bsp >= info->blockstack.stack + BLOCKSTACK_SIZE)
{
- ieee_error (info, (const bfd_byte *) NULL, "stack overflow");
+ ieee_error (info, (const bfd_byte *) NULL, _("stack overflow"));
return false;
}
@@ -1261,7 +1263,7 @@ parse_ieee_be (info, pp)
if (info->blockstack.bsp <= info->blockstack.stack)
{
- ieee_error (info, *pp, "stack underflow");
+ ieee_error (info, *pp, _("stack underflow"));
return false;
}
--info->blockstack.bsp;
@@ -1375,7 +1377,7 @@ parse_ieee_nn (info, pp)
if (varindx < 32)
{
- ieee_error (info, nn_start, "illegal variable index");
+ ieee_error (info, nn_start, _("illegal variable index"));
return false;
}
varindx -= 32;
@@ -1425,7 +1427,7 @@ parse_ieee_ty (info, pp)
if (typeindx < 256)
{
- ieee_error (info, ty_start, "illegal type index");
+ ieee_error (info, ty_start, _("illegal type index"));
return false;
}
@@ -1435,7 +1437,7 @@ parse_ieee_ty (info, pp)
if (**pp != 0xce)
{
- ieee_error (info, *pp, "unknown TY code");
+ ieee_error (info, *pp, _("unknown TY code"));
return false;
}
++*pp;
@@ -1447,14 +1449,14 @@ parse_ieee_ty (info, pp)
if (varindx < 32)
{
- ieee_error (info, ty_var_start, "illegal variable index");
+ ieee_error (info, ty_var_start, _("illegal variable index"));
return false;
}
varindx -= 32;
if (varindx >= info->vars.alloc || info->vars.vars[varindx].name == NULL)
{
- ieee_error (info, ty_var_start, "undefined variable in TY");
+ ieee_error (info, ty_var_start, _("undefined variable in TY"));
return false;
}
@@ -1472,7 +1474,7 @@ parse_ieee_ty (info, pp)
switch (tc)
{
default:
- ieee_error (info, ty_code_start, "unknown TY code");
+ ieee_error (info, ty_code_start, _("unknown TY code"));
return false;
case '!':
@@ -1865,7 +1867,7 @@ parse_ieee_ty (info, pp)
case 'f':
/* Pascal file name. FIXME. */
- ieee_error (info, ty_code_start, "Pascal file name not supported");
+ ieee_error (info, ty_code_start, _("Pascal file name not supported"));
return false;
case 'g':
@@ -1913,7 +1915,7 @@ parse_ieee_ty (info, pp)
switch (kind)
{
default:
- ieee_error (info, ty_start, "unsupported qualifer");
+ ieee_error (info, ty_start, _("unsupported qualifer"));
return false;
case 1:
@@ -2141,7 +2143,12 @@ parse_ieee_atn (info, pp)
}
else if (varindx < 32)
{
- ieee_error (info, atn_start, "illegal variable index");
+ /* The MRI compiler reportedly sometimes emits variable lifetime
+ information for a register. We just ignore it. */
+ if (atn_code == 9)
+ return ieee_read_number (info, pp, &v);
+
+ ieee_error (info, atn_start, _("illegal variable index"));
return false;
}
else
@@ -2179,7 +2186,7 @@ parse_ieee_atn (info, pp)
}
else
{
- ieee_error (info, atn_start, "undefined variable in ATN");
+ ieee_error (info, atn_start, _("undefined variable in ATN"));
return false;
}
}
@@ -2222,7 +2229,7 @@ parse_ieee_atn (info, pp)
switch (atn_code)
{
default:
- ieee_error (info, atn_code_start, "unknown ATN type");
+ ieee_error (info, atn_code_start, _("unknown ATN type"));
return false;
case 1:
@@ -2344,7 +2351,7 @@ parse_ieee_atn (info, pp)
case 11:
/* Reserved for FORTRAN common. */
- ieee_error (info, atn_code_start, "unsupported ATN11");
+ ieee_error (info, atn_code_start, _("unsupported ATN11"));
/* Return true to keep going. */
return true;
@@ -2371,7 +2378,7 @@ parse_ieee_atn (info, pp)
/* We have no way to record this information. FIXME. */
- ieee_error (info, atn_code_start, "unsupported ATN12");
+ ieee_error (info, atn_code_start, _("unsupported ATN12"));
/* Return true to keep going. */
return true;
@@ -2431,7 +2438,7 @@ parse_ieee_atn (info, pp)
if (present)
{
ieee_error (info, atn_code_start,
- "unexpected string in C++ misc");
+ _("unexpected string in C++ misc"));
return false;
}
return ieee_read_cxx_misc (info, pp, v2);
@@ -2444,7 +2451,7 @@ parse_ieee_atn (info, pp)
switch ((ieee_record_enum_type) **pp)
{
default:
- ieee_error (info, *pp, "bad misc record");
+ ieee_error (info, *pp, _("bad misc record"));
return false;
case ieee_at_record_enum:
@@ -2487,7 +2494,7 @@ ieee_read_cxx_misc (info, pp, count)
switch (category)
{
default:
- ieee_error (info, start, "unrecognized C++ misc record");
+ ieee_error (info, start, _("unrecognized C++ misc record"));
return false;
case 'T':
@@ -2604,7 +2611,7 @@ ieee_read_cxx_class (info, pp, count)
break;
if (it == NULL)
{
- ieee_error (info, start, "undefined C++ object");
+ ieee_error (info, start, _("undefined C++ object"));
return false;
}
@@ -2638,7 +2645,7 @@ ieee_read_cxx_class (info, pp, count)
switch (id)
{
default:
- ieee_error (info, spec_start, "unrecognized C++ object spec");
+ ieee_error (info, spec_start, _("unrecognized C++ object spec"));
return false;
case 'b':
@@ -2674,7 +2681,7 @@ ieee_read_cxx_class (info, pp, count)
if ((fieldlen == 0) == (cinline == 0))
{
- ieee_error (info, start, "unsupported C++ object type");
+ ieee_error (info, start, _("unsupported C++ object type"));
return false;
}
@@ -2684,7 +2691,7 @@ ieee_read_cxx_class (info, pp, count)
free (basecopy);
if (basetype == DEBUG_TYPE_NULL)
{
- ieee_error (info, start, "C++ base class not defined");
+ ieee_error (info, start, _("C++ base class not defined"));
return false;
}
@@ -2696,7 +2703,7 @@ ieee_read_cxx_class (info, pp, count)
if (structfields == NULL)
{
- ieee_error (info, start, "C++ object has no fields");
+ ieee_error (info, start, _("C++ object has no fields"));
return false;
}
@@ -2715,7 +2722,7 @@ ieee_read_cxx_class (info, pp, count)
if (*pf == DEBUG_FIELD_NULL)
{
ieee_error (info, start,
- "C++ base class not found in container");
+ _("C++ base class not found in container"));
return false;
}
@@ -2801,7 +2808,7 @@ ieee_read_cxx_class (info, pp, count)
if (structfields == NULL)
{
- ieee_error (info, start, "C++ object has no fields");
+ ieee_error (info, start, _("C++ object has no fields"));
return false;
}
@@ -2822,7 +2829,7 @@ ieee_read_cxx_class (info, pp, count)
if (*pf == DEBUG_FIELD_NULL)
{
ieee_error (info, start,
- "C++ data member not found in container");
+ _("C++ data member not found in container"));
return false;
}
@@ -2863,7 +2870,7 @@ ieee_read_cxx_class (info, pp, count)
switch (flags & CXXFLAGS_VISIBILITY)
{
default:
- ieee_error (info, start, "unknown C++ visibility");
+ ieee_error (info, start, _("unknown C++ visibility"));
return false;
case CXXFLAGS_VISIBILITY_PUBLIC:
@@ -2897,7 +2904,7 @@ ieee_read_cxx_class (info, pp, count)
bitsize = debug_get_field_bitsize (dhandle, *pf);
if (bitpos == (bfd_vma) -1 || bitsize == (bfd_vma) -1)
{
- ieee_error (info, start, "bad C++ field bit pos or size");
+ ieee_error (info, start, _("bad C++ field bit pos or size"));
return false;
}
field = debug_make_field (dhandle, fieldcopy, ftype, bitpos,
@@ -2989,7 +2996,7 @@ ieee_read_cxx_class (info, pp, count)
!= DEBUG_KIND_FUNCTION)
{
ieee_error (info, start,
- "bad type for C++ method function");
+ _("bad type for C++ method function"));
return false;
}
@@ -2999,7 +3006,7 @@ ieee_read_cxx_class (info, pp, count)
if (return_type == DEBUG_TYPE_NULL || arg_types == NULL)
{
ieee_error (info, start,
- "no type information for C++ method function");
+ _("no type information for C++ method function"));
return false;
}
@@ -3013,7 +3020,7 @@ ieee_read_cxx_class (info, pp, count)
switch (flags & CXXFLAGS_VISIBILITY)
{
default:
- ieee_error (info, start, "unknown C++ visibility");
+ ieee_error (info, start, _("unknown C++ visibility"));
return false;
case CXXFLAGS_VISIBILITY_PUBLIC:
@@ -3038,7 +3045,7 @@ ieee_read_cxx_class (info, pp, count)
{
if (id == 'v')
{
- ieee_error (info, start, "C++ static virtual method");
+ ieee_error (info, start, _("C++ static virtual method"));
return false;
}
mv = debug_make_static_method_variant (dhandle, mangledcopy,
@@ -3133,7 +3140,7 @@ ieee_read_cxx_class (info, pp, count)
else
{
ieee_error (info, start,
- "unrecognized C++ object overhead spec");
+ _("unrecognized C++ object overhead spec"));
return false;
}
}
@@ -3172,7 +3179,7 @@ ieee_read_cxx_class (info, pp, count)
free (basecopy);
if (vptrbase == DEBUG_TYPE_NULL)
{
- ieee_error (info, start, "undefined C++ vtable");
+ ieee_error (info, start, _("undefined C++ vtable"));
return false;
}
}
@@ -3243,7 +3250,7 @@ ieee_read_cxx_defaults (info, pp, count)
if (info->blockstack.bsp <= info->blockstack.stack
|| info->blockstack.bsp[-1].fnindx == (unsigned int) -1)
{
- ieee_error (info, start, "C++ default values not in a function");
+ ieee_error (info, start, _("C++ default values not in a function"));
return false;
}
@@ -3283,7 +3290,7 @@ ieee_read_cxx_defaults (info, pp, count)
break;
default:
- ieee_error (info, start, "unrecognized C++ default type");
+ ieee_error (info, start, _("unrecognized C++ default type"));
return false;
}
@@ -3314,7 +3321,7 @@ ieee_read_cxx_defaults (info, pp, count)
|| (debug_get_type_kind (dhandle, arg_slots[indx])
!= DEBUG_KIND_POINTER))
{
- ieee_error (info, start, "reference parameter is not a pointer");
+ ieee_error (info, start, _("reference parameter is not a pointer"));
return false;
}
@@ -3399,7 +3406,7 @@ ieee_read_reference (info, pp)
{
default:
ieee_error (info, start,
- "unrecognized C++ reference type");
+ _("unrecognized C++ reference type"));
return false;
case 0:
@@ -3481,7 +3488,7 @@ ieee_read_reference (info, pp)
if (pslot == NULL)
{
- ieee_error (info, start, "C++ reference not found");
+ ieee_error (info, start, _("C++ reference not found"));
return false;
}
@@ -3489,7 +3496,7 @@ ieee_read_reference (info, pp)
to *pslot, which we can now update to be a reference type. */
if (debug_get_type_kind (info->dhandle, *pslot) != DEBUG_KIND_POINTER)
{
- ieee_error (info, start, "C++ reference is not pointer");
+ ieee_error (info, start, _("C++ reference is not pointer"));
return false;
}
@@ -3518,7 +3525,7 @@ ieee_require_asn (info, pp, pv)
c = (ieee_record_enum_type) **pp;
if (c != ieee_e2_first_byte_enum)
{
- ieee_error (info, start, "missing required ASN");
+ ieee_error (info, start, _("missing required ASN"));
return false;
}
++*pp;
@@ -3526,7 +3533,7 @@ ieee_require_asn (info, pp, pv)
c = (ieee_record_enum_type) (((unsigned int) c << 8) | **pp);
if (c != ieee_asn_record_enum)
{
- ieee_error (info, start, "missing required ASN");
+ ieee_error (info, start, _("missing required ASN"));
return false;
}
++*pp;
@@ -3556,7 +3563,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
c = (ieee_record_enum_type) **pp;
if (c != ieee_at_record_enum)
{
- ieee_error (info, start, "missing required ATN65");
+ ieee_error (info, start, _("missing required ATN65"));
return false;
}
++*pp;
@@ -3564,7 +3571,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
c = (ieee_record_enum_type) (((unsigned int) c << 8) | **pp);
if (c != ieee_atn_record_enum)
{
- ieee_error (info, start, "missing required ATN65");
+ ieee_error (info, start, _("missing required ATN65"));
return false;
}
++*pp;
@@ -3578,7 +3585,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
if (type_indx != 0 || atn_code != 65)
{
- ieee_error (info, start, "bad ATN65 record");
+ ieee_error (info, start, _("bad ATN65 record"));
return false;
}
@@ -4097,7 +4104,7 @@ static const struct debug_write_fns ieee_fns =
/*ARGSUSED*/
static boolean
ieee_init_buffer (info, buflist)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *buflist;
{
buflist->head = NULL;
@@ -4138,7 +4145,7 @@ ieee_change_buffer (info, buflist)
/*ARGSUSED*/
static boolean
ieee_append_buffer (info, mainbuf, newbuf)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *mainbuf;
struct ieee_buflist *newbuf;
{
@@ -4225,7 +4232,7 @@ ieee_write_number (info, v)
if (c > (unsigned int) (ieee_number_repeat_end_enum
- ieee_number_repeat_start_enum))
{
- fprintf (stderr, "IEEE numeric overflow: 0x");
+ fprintf (stderr, _("IEEE numeric overflow: 0x"));
fprintf_vma (stderr, v);
fprintf (stderr, "\n");
return false;
@@ -4271,7 +4278,7 @@ ieee_write_id (info, s)
}
else
{
- fprintf (stderr, "IEEE string length overflow: %u\n", len);
+ fprintf (stderr, _("IEEE string length overflow: %u\n"), len);
return false;
}
@@ -5128,7 +5135,7 @@ ieee_finish_compilation_unit (info)
static void
ieee_add_bb11_blocks (abfd, sec, data)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
PTR data;
{
@@ -5251,8 +5258,8 @@ ieee_add_bb11 (info, sec, low, high)
/*ARGSUSED*/
static boolean
ieee_start_source (p, filename)
- PTR p;
- const char *filename;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *filename ATTRIBUTE_UNUSED;
{
return true;
}
@@ -5305,7 +5312,7 @@ ieee_int_type (p, size, unsignedp)
indx = (int) builtin_signed_long_long;
break;
default:
- fprintf (stderr, "IEEE unsupported integer type size %u\n", size);
+ fprintf (stderr, _("IEEE unsupported integer type size %u\n"), size);
return false;
}
@@ -5341,7 +5348,7 @@ ieee_float_type (p, size)
indx = (int) builtin_long_long_double;
break;
default:
- fprintf (stderr, "IEEE unsupported float type size %u\n", size);
+ fprintf (stderr, _("IEEE unsupported float type size %u\n"), size);
return false;
}
@@ -5377,7 +5384,7 @@ ieee_complex_type (p, size)
code = 'd';
break;
default:
- fprintf (stderr, "IEEE unsupported complex type size %u\n", size);
+ fprintf (stderr, _("IEEE unsupported complex type size %u\n"), size);
return false;
}
@@ -5718,7 +5725,7 @@ ieee_array_type (p, low, high, stringp)
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
- boolean stringp;
+ boolean stringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
@@ -5785,7 +5792,7 @@ ieee_array_type (p, low, high, stringp)
static boolean
ieee_set_type (p, bitstringp)
PTR p;
- boolean bitstringp;
+ boolean bitstringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
boolean localp;
@@ -7005,7 +7012,7 @@ ieee_typdef (p, name)
static boolean
ieee_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -7019,9 +7026,9 @@ ieee_tag (p, name)
static boolean
ieee_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
@@ -7031,9 +7038,9 @@ ieee_int_constant (p, name, val)
static boolean
ieee_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ double val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
@@ -7044,8 +7051,8 @@ ieee_float_constant (p, name, val)
static boolean
ieee_typed_constant (p, name, val)
PTR p;
- const char *name;
- bfd_vma val;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c
index 27ae400..2ee4873 100644
--- a/contrib/binutils/binutils/nm.c
+++ b/contrib/binutils/binutils/nm.c
@@ -1,5 +1,6 @@
/* nm.c -- Describe symbol table of a rel file.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -15,7 +16,8 @@
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 "progress.h"
@@ -253,6 +255,8 @@ static char *target = NULL;
static bfd *lineno_cache_bfd;
static bfd *lineno_cache_rel_bfd;
+#define OPTION_TARGET 200
+
static struct option long_options[] =
{
{"debug-syms", no_argument, &print_debug_syms, 1},
@@ -273,7 +277,7 @@ static struct option long_options[] =
{"reverse-sort", no_argument, &reverse_sort, 1},
{"size-sort", no_argument, &sort_by_size, 1},
{"stats", no_argument, &show_stats, 1},
- {"target", required_argument, 0, 200},
+ {"target", required_argument, 0, OPTION_TARGET},
{"defined-only", no_argument, &defined_only, 1},
{"undefined-only", no_argument, &undefined_only, 1},
{"version", no_argument, &show_version, 1},
@@ -287,7 +291,7 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, "\
+ fprintf (stream, _("\
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\
@@ -295,11 +299,11 @@ Usage: %s [-aABCDglnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n\
[--format={bsd,sysv,posix}] [--demangle] [--no-demangle] [--dynamic]\n\
[--defined-only] [--line-numbers]\n\
[--version] [--help]\n\
- [file...]\n",
+ [file...]\n"),
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -332,8 +336,7 @@ set_print_radix (radix)
other_format[3] = desc_format[3] = *radix;
break;
default:
- fprintf (stderr, "%s: %s: invalid radix\n", program_name, radix);
- exit (1);
+ fatal (_("%s: invalid radix"), radix);
}
}
@@ -358,8 +361,7 @@ set_output_format (f)
i = FORMAT_SYSV;
break;
default:
- fprintf (stderr, "%s: %s: invalid output format\n", program_name, f);
- exit (1);
+ fatal (_("%s: invalid output format"), f);
}
format = &formats[i];
}
@@ -372,6 +374,12 @@ main (argc, argv)
int c;
int retval;
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = *argv;
xmalloc_set_program_name (program_name);
@@ -440,7 +448,7 @@ main (argc, argv)
show_version = 1;
break;
- case 200: /* --target */
+ case OPTION_TARGET: /* --target */
target = optarg;
break;
@@ -477,11 +485,9 @@ main (argc, argv)
#ifdef HAVE_SBRK
if (show_stats)
{
- extern char **environ;
char *lim = (char *) sbrk (0);
- fprintf (stderr, "%s: data size %ld\n", program_name,
- (long) (lim - (char *) &environ));
+ non_fatal (_("data size %ld"), (long) (lim - (char *) &environ));
}
#endif
@@ -892,7 +898,7 @@ display_rel_file (abfd, archive_bfd)
{
if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
{
- printf ("No symbols in \"%s\".\n", bfd_get_filename (abfd));
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
return;
}
}
@@ -903,7 +909,7 @@ display_rel_file (abfd, archive_bfd)
if (symcount == 0)
{
- fprintf (stderr, "%s: no symbols\n", bfd_get_filename (abfd));
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
return;
}
@@ -1271,11 +1277,11 @@ print_object_filename_sysv (filename)
char *filename;
{
if (undefined_only)
- printf ("\n\nUndefined symbols from %s:\n\n", filename);
+ printf (_("\n\nUndefined symbols from %s:\n\n"), filename);
else
- printf ("\n\nSymbols from %s:\n\n", filename);
- printf ("\
-Name Value Class Type Size Line Section\n\n");
+ printf (_("\n\nSymbols from %s:\n\n"), filename);
+ printf (_("\
+Name Value Class Type Size Line Section\n\n"));
}
static void
@@ -1298,13 +1304,13 @@ print_archive_filename_bsd (filename)
static void
print_archive_filename_sysv (filename)
- char *filename;
+ char *filename ATTRIBUTE_UNUSED;
{
}
static void
print_archive_filename_posix (filename)
- char *filename;
+ char *filename ATTRIBUTE_UNUSED;
{
}
@@ -1312,7 +1318,7 @@ print_archive_filename_posix (filename)
static void
print_archive_member_bsd (archive, filename)
- char *archive;
+ char *archive ATTRIBUTE_UNUSED;
CONST char *filename;
{
if (!filename_per_symbol)
@@ -1325,11 +1331,11 @@ print_archive_member_sysv (archive, filename)
CONST char *filename;
{
if (undefined_only)
- printf ("\n\nUndefined symbols from %s[%s]:\n\n", archive, filename);
+ printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename);
else
- printf ("\n\nSymbols from %s[%s]:\n\n", archive, filename);
- printf ("\
-Name Value Class Type Size Line Section\n\n");
+ printf (_("\n\nSymbols from %s[%s]:\n\n"), archive, filename);
+ printf (_("\
+Name Value Class Type Size Line Section\n\n"));
}
static void
@@ -1420,7 +1426,7 @@ print_symbol_info_bsd (info, abfd)
symbol_info *info;
bfd *abfd;
{
- if (info->type == 'U')
+ if (bfd_is_undefined_symclass (info->type))
{
printf ("%*s",
#ifdef BFD64
@@ -1451,7 +1457,7 @@ print_symbol_info_sysv (info, abfd)
bfd *abfd;
{
print_symname ("%-20s|", info->name, abfd); /* Name */
- if (info->type == 'U')
+ if (bfd_is_undefined_symclass (info->type))
printf (" "); /* Value */
else
print_value (info->value);
@@ -1474,7 +1480,7 @@ print_symbol_info_posix (info, abfd)
{
print_symname ("%s ", info->name, abfd);
printf ("%c ", info->type);
- if (info->type == 'U')
+ if (bfd_is_undefined_symclass (info->type))
printf (" ");
else
print_value (info->value);
@@ -1498,7 +1504,7 @@ print_symdef_entry (abfd)
bfd *elt;
if (!everprinted)
{
- printf ("\nArchive index:\n");
+ printf (_("\nArchive index:\n"));
everprinted = true;
}
elt = bfd_get_elt_at_index (abfd, idx);
diff --git a/contrib/binutils/binutils/objcopy.1 b/contrib/binutils/binutils/objcopy.1
index 6c98df8..80ca216 100644
--- a/contrib/binutils/binutils/objcopy.1
+++ b/contrib/binutils/binutils/objcopy.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1991, 93, 94, 95, 96, 1997 Free Software Foundation
+.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH objcopy 1 "October 1994" "cygnus support" "GNU Development Tools"
+.TH objcopy 1 "05 April 2000" "Cygnus Solutions" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -18,6 +18,7 @@ objcopy \- copy and translate object files
.RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]"
.RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]"
.RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]"
+.RB "[\|" \-j\ \fIsectionname\fR\ |\ \fB\-\-only\-section=\fIsectionname\fR "\|]"
.RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]"
.RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]"
.RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]"
@@ -35,15 +36,18 @@ objcopy \- copy and translate object files
.RB "[\|" \-\-gap\-fill=\fIval\fR "\|]"
.RB "[\|" \-\-pad\-to=\fIaddress\fR "\|]"
.RB "[\|" \-\-set\-start=\fIval\fR "\|]"
-.RB "[\|" \-\-adjust\-start=\fIincr\fR "\|]"
-.RB "[\|" \-\-adjust\-vma=\fIincr\fR "\|]"
-.RB "[\|" \-\-adjust\-section\-vma=\fIsection{=,+,-}val\fR "\|]"
-.RB "[\|" \-\-adjust\-warnings\fR "\|]"
-.RB "[\|" \-\-no\-adjust\-warnings\fR "\|]"
-.RB "[\|" \-\-set\-section\-flags=\fIsection=flags\fR "\|]"
-.RB "[\|" \-\-add\-section=\fIsectionname=filename\fR "\|]"
+.RB "[\|" \-\-change\-start=\fIincr\fR "\|]"
+.RB "[\|" \-\-change\-addresses=\fIincr\fR "\|]"
+.RB "[\|" \-\-change\-section\-address\ \fIsection{=,+,-}val\fR "\|]"
+.RB "[\|" \-\-change\-section\-lma\ \fIsection{=,+,-}val\fR "\|]"
+.RB "[\|" \-\-change\-section\-vma\ \fIsection{=,+,-}val\fR "\|]"
+.RB "[\|" \-\-change\-warnings\fR "\|]"
+.RB "[\|" \-\-no\-change\-warnings\fR "\|]"
+.RB "[\|" \-\-set\-section\-flags\ \fIsection=flags\fR "\|]"
+.RB "[\|" \-\-add\-section\ \fIsectionname=filename\fR "\|]"
.RB "[\|" \-\-change\-leading\-char\fR "\|]"
.RB "[\|" \-\-remove\-leading\-char\fR "\|]"
+.RB "[\|" \-\-redefine\-sym\ \fIold=new\fR "\|]"
.RB "[\|" \-\-weaken\fR "\|]"
.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
@@ -121,6 +125,12 @@ Use
as the object format for both the input and the output file; i.e.
simply transfer data from source to destination with no translation.
.TP
+.B \-j \fIsectionname\fR, \fB\-\-only\-section=\fIsectionname
+Copy only the named section from the input file to the output file,
+discarding all other sections. This option may be given more than
+once. Note that using this option inappropriately may make the output
+file unusable.
+.TP
.B \-R \fIsectionname\fR, \fB\-\-remove-section=\fIsectionname
Remove the named section from the file. This option may be given more
than once. Note that using this option inappropriately may make the
@@ -150,7 +160,7 @@ visible externally. This option may be given more than once.
.B \-W \fIsymbolname\fR, \fB\-\-weaken\-symbol=\fIsymbolname
Make symbol \fIsymbolname\fP weak. This option may be given more than once.
.TP
-.B \-x\fR, \fB \-\-discard\-all
+.B \-x\fR, \fB\-\-discard\-all
Do not copy non-global symbols from the source file.
.TP
.B \-X\fR, \fB\-\-discard\-locals
@@ -193,42 +203,58 @@ zero).
Set the start address of the new file to \fIval\fP. Not all object
file formats support setting the start address.
.TP
-.B \fB\-\-adjust\-start=\fIincr
-Adjust the start address by adding \fIincr\fP. Not all object file
+.B \fB\-\-change\-start=\fIincr\fR, \fB\-\-adjust\-start=\fIincr
+Changes the start address by adding \fIincr\fP. Not all object file
formats support setting the start address.
.TP
-.B \fB\-\-adjust\-vma=\fIincr
-Adjust the address of all sections, as well as the start address, by
+.B \fB\-\-change\-addresses=\fIincr\fR, \fB\-\-adjust\-vma=\fIincr
+Changes the address of all sections, as well as the start address, by
adding \fIincr\fP. Some object file formats do not permit section
addresses to be changed arbitrarily. Note that this does not relocate
the sections; if the program expects sections to be loaded at a
certain address, and this option is used to change the sections such
that they are loaded at a different address, the program may fail.
.TP
-.B \fB\-\-adjust\-section\-vma=\fIsection{=,+,-}val
-Set or adjust the address of the named \fIsection\fP. If \fI=\fP is
+.B \fB\-\-change\-section\-address\ \fIsection{=,+,-}val\fR, \fB\-\-adjust\-section\-vma\ \fIsection{=,+,-}val
+Set or changes the VMA and LMA addresses of the named \fIsection\fP.
+If \fI=\fP is used, the section address is set to \fIval\fP.
+Otherwise, \fIval\fP is added to or subtracted from the section
+address. See the comments under \fB\-\-change\-addresses\fP, above. If
+\fIsection\fP does not exist in the input file, a warning will be
+issued, unless \fB\-\-no\-change\-warnings\fP is used.
+.TP
+.B \fB\-\-change\-section\-lma\ \fIsection{=,+,-}val
+Set or change the LMA address of the named \fIsection\fP. If \fI=\fP is
used, the section address is set to \fIval\fP. Otherwise, \fIval\fP
is added to or subtracted from the section address. See the comments
-under \fB\-\-adjust\-vma\fP, above. If \fIsection\fP does not exist
+under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist
in the input file, a warning will be issued, unless
-\fB\-\-no\-adjust\-warnings\fP is used.
+\fB\-\-no\-change\-warnings\fP is used.
.TP
-.B \fB\-\-adjust\-warnings
-If \fB\-\-adjust\-section\-vma\fP is used, and the named section does
+.B \fB\-\-change\-section\-vma\ \fIsection{=,+,-}val
+Set or change the VMA address of the named \fIsection\fP. If \fI=\fP is
+used, the section address is set to \fIval\fP. Otherwise, \fIval\fP
+is added to or subtracted from the section address. See the comments
+under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist
+in the input file, a warning will be issued, unless
+\fB\-\-no\-change\-warnings\fP is used.
+.TP
+.B \fB\-\-change\-warnings\fR, \fB\-\-adjust\-warnings
+If \fB\-\-change\-section\-XXX\fP is used, and the named section does
not exist, issue a warning. This is the default.
.TP
-.B \fB\-\-no\-adjust\-warnings
-Do not issue a warning if \fB\-\-adjust\-section\-vma\fP is used, even
+.B \fB\-\-no\-change\-warnings\fR, \fB\-\-no\-adjust\-warnings
+Do not issue a warning if \fB\-\-change\-section\-XXX\fP is used, even
if the named section does not exist.
.TP
-.B \fB\-\-set\-section\-flags=\fIsection=flags
+.B \fB\-\-set\-section\-flags\ \fIsection=flags
Set the flags for the named section. The \fIflags\fP argument is a
comma separated string of flag names. The recognized names are
-\fIalloc\fP, \fIload\fP, \fIreadonly\fP, \fIcode\fP, \fIdata\fP, and
-\fIrom\fP. Not all flags are meaningful for all object file
-formats.
+\fIalloc\fP, \fIcontents\fP, \fIload\fP, \fInoload\fP, \fIreadonly\fP,
+\fIcode\fP, \fIdata\fP, \fIrom\fP, \fIshare\fP, and \fIdebug\fP. Not
+all flags are meaningful for all object file formats.
.TP
-.B \fB\-\-add\-section=\fIsectionname=filename
+.B \fB\-\-add\-section\ \fIsectionname=filename
Add a new section named \fIsectionname\fR while copying the file. The
contents of the new section are taken from the file \fIfilename\fR.
The size of the section will be the size of the file. This option
@@ -253,9 +279,14 @@ most common symbol leading character is underscore. This option will
remove a leading underscore from all global symbols. This can be
useful if you want to link together objects of different file formats
with different conventions for symbol names. This is different from
-@code{--change-leading-char} because it always changes the symbol name
+\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 \-\-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
+source, and there are name collisions.
+.TP
.B \-\-weaken
Change all global symbols in the file to be weak.
.TP
@@ -283,7 +314,7 @@ The GNU Binary Utilities\c
\&, Roland H. Pesch (June 1993).
.SH COPYING
-Copyright (c) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+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
diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c
index f054bb9..e8b710f 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, 1998
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -27,14 +27,6 @@
#include "budbg.h"
#include <sys/stat.h>
-#ifdef HAVE_GOOD_UTIME_H
-#include <utime.h>
-#else /* ! HAVE_GOOD_UTIME_H */
-#ifdef HAVE_UTIMES
-#include <sys/time.h>
-#endif /* HAVE_UTIMES */
-#endif /* ! HAVE_GOOD_UTIME_H */
-
/* A list of symbols to explicitly strip out, or to keep. A linked
list is good enough for a small number from the command line, but
this will slow things down a lot if many symbols are being
@@ -46,6 +38,14 @@ struct symlist
struct symlist *next;
};
+/* A list to support redefine_sym. */
+struct redefine_node
+{
+ char *source;
+ char *target;
+ struct redefine_node *next;
+};
+
static void copy_usage PARAMS ((FILE *, int));
static void strip_usage PARAMS ((FILE *, int));
static flagword parse_flags PARAMS ((const char *));
@@ -66,13 +66,12 @@ static void copy_object PARAMS ((bfd *, bfd *));
static void copy_archive PARAMS ((bfd *, bfd *, const char *));
static void copy_file
PARAMS ((const char *, const char *, const char *, const char *));
-static int simple_copy PARAMS ((const char *, const char *));
-static int smart_rename PARAMS ((const char *, const char *));
-static void set_times PARAMS ((const char *, const struct stat *));
static int strip_main PARAMS ((int, char **));
static int copy_main PARAMS ((int, char **));
+static const char *lookup_sym_redefinition PARAMS((const char *));
+static void redefine_list_append PARAMS ((const char *, const char *));
-#define nonfatal(s) {bfd_nonfatal(s); status = 1; return;}
+#define RETURN_NONFATAL(s) {bfd_nonfatal (s); status = 1; return;}
static asymbol **isympp = NULL; /* Input symbols */
static asymbol **osympp = NULL; /* Output symbols that survive stripping */
@@ -82,15 +81,16 @@ static int copy_byte = -1;
static int interleave = 4;
static boolean verbose; /* Print file and target names. */
+static boolean preserve_dates; /* Preserve input file timestamp. */
static int status = 0; /* Exit status. */
enum strip_action
{
- strip_undef,
- strip_none, /* don't strip */
- strip_debug, /* strip all debugger symbols */
- strip_unneeded, /* strip unnecessary symbols */
- strip_all /* strip all symbols */
+ STRIP_UNDEF,
+ STRIP_NONE, /* don't strip */
+ STRIP_DEBUG, /* strip all debugger symbols */
+ STRIP_UNNEEDED, /* strip unnecessary symbols */
+ STRIP_ALL /* strip all symbols */
};
/* Which symbols to remove. */
@@ -98,46 +98,49 @@ static enum strip_action strip_symbols;
enum locals_action
{
- locals_undef,
- locals_start_L, /* discard locals starting with L */
- locals_all /* discard all locals */
+ LOCALS_UNDEF,
+ LOCALS_START_L, /* discard locals starting with L */
+ LOCALS_ALL /* discard all locals */
};
-/* Which local symbols to remove. Overrides strip_all. */
+/* Which local symbols to remove. Overrides STRIP_ALL. */
static enum locals_action discard_locals;
-/* Structure used to hold lists of sections and actions to take. */
+/* What kind of change to perform. */
+enum change_action
+{
+ CHANGE_IGNORE,
+ CHANGE_MODIFY,
+ CHANGE_SET
+};
+/* Structure used to hold lists of sections and actions to take. */
struct section_list
{
- /* Next section to adjust. */
- struct section_list *next;
- /* Section name. */
- const char *name;
- /* Whether this entry was used. */
- boolean used;
- /* Whether to remove this section. */
- boolean remove;
- /* Whether to adjust or set VMA. */
- enum { ignore_vma, adjust_vma, set_vma } adjust;
- /* Amount to adjust by or set to. */
- bfd_vma val;
- /* Whether to set the section flags. */
- boolean set_flags;
- /* What to set the section flags to. */
- flagword flags;
+ struct section_list * next; /* Next section to change. */
+ const char * name; /* Section name. */
+ boolean used; /* Whether this entry was used. */
+ boolean remove; /* Whether to remove this section. */
+ boolean copy; /* Whether to copy this section. */
+ enum change_action change_vma;/* Whether to change or set VMA. */
+ bfd_vma vma_val; /* Amount to change by or set to. */
+ enum change_action change_lma;/* Whether to change or set LMA. */
+ bfd_vma lma_val; /* Amount to change by or set to. */
+ boolean set_flags; /* Whether to set the section flags. */
+ flagword flags; /* What to set the section flags to. */
};
-static struct section_list *adjust_sections;
+static struct section_list *change_sections;
static boolean sections_removed;
+static boolean sections_copied;
-/* Adjustments to the start address. */
-static bfd_vma adjust_start = 0;
+/* Changes to the start address. */
+static bfd_vma change_start = 0;
static boolean set_start_set = false;
static bfd_vma set_start;
-/* Adjustments to section VMA's. */
-static bfd_vma adjust_section_vma = 0;
+/* Changes to section addresses. */
+static bfd_vma change_section_address = 0;
/* Filling gaps between sections. */
static boolean gap_fill_set = false;
@@ -179,12 +182,13 @@ static boolean change_leading_char = false;
static boolean remove_leading_char = false;
-/* List of symbols to strip, keep, localize, and weaken. */
+/* List of symbols to strip, keep, localize, weaken, or redefine. */
static struct symlist *strip_specific_list = NULL;
static struct symlist *keep_specific_list = NULL;
static struct symlist *localize_specific_list = NULL;
static struct symlist *weaken_specific_list = NULL;
+static struct redefine_node *redefine_sym_list = NULL;
/* If this is true, we weaken global symbols (set BSF_WEAK). */
@@ -193,20 +197,23 @@ static boolean weaken = false;
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
#define OPTION_ADD_SECTION 150
-#define OPTION_ADJUST_START (OPTION_ADD_SECTION + 1)
-#define OPTION_ADJUST_VMA (OPTION_ADJUST_START + 1)
-#define OPTION_ADJUST_SECTION_VMA (OPTION_ADJUST_VMA + 1)
-#define OPTION_ADJUST_WARNINGS (OPTION_ADJUST_SECTION_VMA + 1)
-#define OPTION_CHANGE_LEADING_CHAR (OPTION_ADJUST_WARNINGS + 1)
-#define OPTION_DEBUGGING (OPTION_CHANGE_LEADING_CHAR + 1)
+#define OPTION_CHANGE_ADDRESSES (OPTION_ADD_SECTION + 1)
+#define OPTION_CHANGE_LEADING_CHAR (OPTION_CHANGE_ADDRESSES + 1)
+#define OPTION_CHANGE_START (OPTION_CHANGE_LEADING_CHAR + 1)
+#define OPTION_CHANGE_SECTION_ADDRESS (OPTION_CHANGE_START + 1)
+#define OPTION_CHANGE_SECTION_LMA (OPTION_CHANGE_SECTION_ADDRESS + 1)
+#define OPTION_CHANGE_SECTION_VMA (OPTION_CHANGE_SECTION_LMA + 1)
+#define OPTION_CHANGE_WARNINGS (OPTION_CHANGE_SECTION_VMA + 1)
+#define OPTION_DEBUGGING (OPTION_CHANGE_WARNINGS + 1)
#define OPTION_GAP_FILL (OPTION_DEBUGGING + 1)
-#define OPTION_NO_ADJUST_WARNINGS (OPTION_GAP_FILL + 1)
-#define OPTION_PAD_TO (OPTION_NO_ADJUST_WARNINGS + 1)
+#define OPTION_NO_CHANGE_WARNINGS (OPTION_GAP_FILL + 1)
+#define OPTION_PAD_TO (OPTION_NO_CHANGE_WARNINGS + 1)
#define OPTION_REMOVE_LEADING_CHAR (OPTION_PAD_TO + 1)
#define OPTION_SET_SECTION_FLAGS (OPTION_REMOVE_LEADING_CHAR + 1)
#define OPTION_SET_START (OPTION_SET_SECTION_FLAGS + 1)
#define OPTION_STRIP_UNNEEDED (OPTION_SET_START + 1)
#define OPTION_WEAKEN (OPTION_STRIP_UNNEEDED + 1)
+#define OPTION_REDEFINE_SYM (OPTION_WEAKEN + 1)
/* Options to handle if running as "strip". */
@@ -238,15 +245,22 @@ static struct option strip_options[] =
static struct option copy_options[] =
{
{"add-section", required_argument, 0, OPTION_ADD_SECTION},
- {"adjust-start", required_argument, 0, OPTION_ADJUST_START},
- {"adjust-vma", required_argument, 0, OPTION_ADJUST_VMA},
- {"adjust-section-vma", required_argument, 0, OPTION_ADJUST_SECTION_VMA},
- {"adjust-warnings", no_argument, 0, OPTION_ADJUST_WARNINGS},
+ {"adjust-start", required_argument, 0, OPTION_CHANGE_START},
+ {"adjust-vma", required_argument, 0, OPTION_CHANGE_ADDRESSES},
+ {"adjust-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
+ {"adjust-warnings", no_argument, 0, OPTION_CHANGE_WARNINGS},
{"byte", required_argument, 0, 'b'},
+ {"change-addresses", required_argument, 0, OPTION_CHANGE_ADDRESSES},
{"change-leading-char", no_argument, 0, OPTION_CHANGE_LEADING_CHAR},
+ {"change-section-address", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
+ {"change-section-lma", required_argument, 0, OPTION_CHANGE_SECTION_LMA},
+ {"change-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_VMA},
+ {"change-start", required_argument, 0, OPTION_CHANGE_START},
+ {"change-warnings", no_argument, 0, OPTION_CHANGE_WARNINGS},
{"debugging", no_argument, 0, OPTION_DEBUGGING},
{"discard-all", no_argument, 0, 'x'},
{"discard-locals", no_argument, 0, 'X'},
+ {"only-section", required_argument, 0, 'j'},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"gap-fill", required_argument, 0, OPTION_GAP_FILL},
{"help", no_argument, 0, 'h'},
@@ -254,7 +268,8 @@ static struct option copy_options[] =
{"input-target", required_argument, 0, 'I'},
{"interleave", required_argument, 0, 'i'},
{"keep-symbol", required_argument, 0, 'K'},
- {"no-adjust-warnings", no_argument, 0, OPTION_NO_ADJUST_WARNINGS},
+ {"no-adjust-warnings", no_argument, 0, OPTION_NO_CHANGE_WARNINGS},
+ {"no-change-warnings", no_argument, 0, OPTION_NO_CHANGE_WARNINGS},
{"output-format", required_argument, 0, 'O'}, /* Obsolete */
{"output-target", required_argument, 0, 'O'},
{"pad-to", required_argument, 0, OPTION_PAD_TO},
@@ -273,6 +288,7 @@ static struct option copy_options[] =
{"version", no_argument, 0, 'V'},
{"weaken", no_argument, 0, OPTION_WEAKEN},
{"weaken-symbol", required_argument, 0, 'W'},
+ {"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM},
{0, no_argument, 0, 0}
};
@@ -290,26 +306,56 @@ copy_usage (stream, exit_status)
FILE *stream;
int exit_status;
{
- fprintf (stream, "\
-Usage: %s [-vVSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-b byte]\n\
- [-R section] [-i interleave] [--interleave=interleave] [--byte=byte]\n\
- [--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\
- [--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\
- [--discard-locals] [--debugging] [--remove-section=section]\n",
- program_name);
- fprintf (stream, "\
- [--gap-fill=val] [--pad-to=address] [--preserve-dates]\n\
- [--set-start=val] [--adjust-start=incr]\n\
- [--adjust-vma=incr] [--adjust-section-vma=section{=,+,-}val]\n\
- [--adjust-warnings] [--no-adjust-warnings]\n\
- [--set-section-flags=section=flags] [--add-section=sectionname=filename]\n\
- [--keep-symbol symbol] [-K symbol] [--strip-symbol symbol] [-N symbol]\n\
- [--localize-symbol symbol] [-L symbol] [--weaken-symbol symbol]\n\
- [-W symbol] [--change-leading-char] [--remove-leading-char] [--weaken]\n\
- [--verbose] [--version] [--help] in-file [out-file]\n");
+ fprintf (stream, _("Usage: %s <switches> in-file [out-file]\n"), program_name);
+ fprintf (stream, _(" The switches are:\n"));
+ fprintf (stream, _("\
+ -I --input-target <bfdname> Assume input file is in format <bfdname>\n\
+ -O --output-target <bfdname> Create an output file in format <bfdname>\n\
+ -F --target <bfdname> Set both input and output format to <bfdname>\n\
+ --debugging Convert debugging information, if possible\n\
+ -p --preserve-dates Copy modified/access timestamps to the output\n\
+ -j --only-section <name> Only copy section <name> into the output\n\
+ -R --remove-section <name> Remove section <name> from the output\n\
+ -S --strip-all Remove all symbol and relocation information\n\
+ -g --strip-debug Remove all debugging symbols\n\
+ --strip-unneeded Remove all symbols not needed by relocations\n\
+ -N --strip-symbol <name> Do not copy symbol <name>\n\
+ -K --keep-symbol <name> Only copy symbol <name>\n\
+ -L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
+ -W --weaken-symbol <name> Force symbol <name> to be marked as a weak\n\
+ --weaken Force all global symbols to be marked as weak\n\
+ -x --discard-all Remove all non-global symbols\n\
+ -X --discard-locals Remove any compiler-generated symbols\n\
+ -i --interleave <number> Only copy one out of every <number> bytes\n\
+ -b --byte <num> Select byte <num> in every interleaved block\n\
+ --gap-fill <val> Fill gaps between sections with <val>\n\
+ --pad-to <addr> Pad the last section up to address <addr>\n\
+ --set-start <addr> Set the start address to <addr>\n\
+ {--change-start|--adjust-start} <incr>\n\
+ Add <incr> to the start address\n\
+ {--change-addresses|--adjust-vma} <incr>\n\
+ Add <incr> to LMA, VMA and start addresses\n\
+ {--change-section-address|--adjust-section-vma} <name>{=|+|-}<val>\n\
+ Change LMA and VMA of section <name> by <val>\n\
+ --change-section-lma <name>{=|+|-}<val>\n\
+ Change the LMA of section <name> by <val>\n\
+ --change-section-vma <name>{=|+|-}<val>\n\
+ Change the VMA of section <name> by <val>\n\
+ {--[no-]change-warnings|--[no-]adjust-warnings}\n\
+ Warn if a named section does not exist\n\
+ --set-section-flags <name>=<flags>\n\
+ Set section <name>'s properties to <flags>\n\
+ --add-section <name>=<file> Add section <name> found in <file> to output\n\
+ --change-leading-char Force output format's leading character style\n\
+ --remove-leading-char Remove leading character from global symbols\n\
+ --redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n\
+ -v --verbose List all object files modified\n\
+ -V --version Display this program's version number\n\
+ -h --help Display this output\n\
+"));
list_supported_targets (program_name, stream);
if (exit_status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (exit_status);
}
@@ -318,17 +364,30 @@ strip_usage (stream, exit_status)
FILE *stream;
int exit_status;
{
- fprintf (stream, "\
-Usage: %s [-vVsSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-R section]\n\
- [--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\
- [--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\
- [--discard-locals] [--keep-symbol symbol] [-K symbol]\n\
- [--strip-symbol symbol] [-N symbol] [--remove-section=section]\n\
- [-o file] [--preserve-dates] [--verbose] [--version] [--help] file...\n",
- program_name);
+ fprintf (stream, _("Usage: %s <switches> in-file(s)\n"), program_name);
+ fprintf (stream, _(" The switches are:\n"));
+ fprintf (stream, _("\
+ -I --input-target <bfdname> Assume input file is in format <bfdname>\n\
+ -O --output-target <bfdname> Create an output file in format <bfdname>\n\
+ -F --target <bfdname> Set both input and output format to <bfdname>\n\
+ -p --preserve-dates Copy modified/access timestamps to the output\n\
+ -R --remove-section <name> Remove section <name> from the output\n\
+ -s --strip-all Remove all symbol and relocation information\n\
+ -g -S --strip-debug Remove all debugging symbols\n\
+ --strip-unneeded Remove all symbols not needed by relocations\n\
+ -N --strip-symbol <name> Do not copy symbol <name>\n\
+ -K --keep-symbol <name> Only copy symbol <name>\n\
+ -x --discard-all Remove all non-global symbols\n\
+ -X --discard-locals Remove any compiler-generated symbols\n\
+ -v --verbose List all object files modified\n\
+ -V --version Display this program's version number\n\
+ -h --help Display this output\n\
+ -o <file> Place stripped output into <file>\n\
+"));
+
list_supported_targets (program_name, stream);
if (exit_status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (exit_status);
}
@@ -361,10 +420,13 @@ parse_flags (s)
else if (strncasecmp (fname, s, len) == 0) ret |= fval
PARSE_FLAG ("alloc", SEC_ALLOC);
PARSE_FLAG ("load", SEC_LOAD);
+ PARSE_FLAG ("noload", SEC_NEVER_LOAD);
PARSE_FLAG ("readonly", SEC_READONLY);
+ PARSE_FLAG ("debug", SEC_DEBUGGING);
PARSE_FLAG ("code", SEC_CODE);
PARSE_FLAG ("data", SEC_DATA);
PARSE_FLAG ("rom", SEC_ROM);
+ PARSE_FLAG ("share", SEC_SHARED);
PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
#undef PARSE_FLAG
else
@@ -374,12 +436,9 @@ parse_flags (s)
copy = xmalloc (len + 1);
strncpy (copy, s, len);
copy[len] = '\0';
- fprintf (stderr, "%s: unrecognized section flag `%s'\n",
- program_name, copy);
- fprintf (stderr,
- "%s: supported flags: alloc, load, readonly, code, data, rom, contents\n",
- program_name);
- exit (1);
+ non_fatal (_("unrecognized section flag `%s'"), copy);
+ fatal (_("supported flags: %s"),
+ "alloc, load, noload, readonly, debug, code, data, rom, share, contents");
}
s = snext;
@@ -389,7 +448,7 @@ parse_flags (s)
return ret;
}
-/* Find and optionally add an entry in the adjust_sections list. */
+/* Find and optionally add an entry in the change_sections list. */
static struct section_list *
find_section_list (name, add)
@@ -398,7 +457,7 @@ find_section_list (name, add)
{
register struct section_list *p;
- for (p = adjust_sections; p != NULL; p = p->next)
+ for (p = change_sections; p != NULL; p = p->next)
if (strcmp (p->name, name) == 0)
return p;
@@ -409,20 +468,23 @@ find_section_list (name, add)
p->name = name;
p->used = false;
p->remove = false;
- p->adjust = ignore_vma;
- p->val = 0;
+ p->copy = false;
+ p->change_vma = CHANGE_IGNORE;
+ p->change_lma = CHANGE_IGNORE;
+ p->vma_val = 0;
+ p->lma_val = 0;
p->set_flags = false;
p->flags = 0;
- p->next = adjust_sections;
- adjust_sections = p;
+ p->next = change_sections;
+ change_sections = p;
return p;
}
/* Add a symbol to strip_specific_list. */
-static void
+static void
add_specific_symbol (name, list)
const char *name;
struct symlist **list;
@@ -457,23 +519,28 @@ is_specified_symbol (name, list)
static boolean
is_strip_section (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
struct section_list *p;
if ((bfd_get_section_flags (abfd, sec) & SEC_DEBUGGING) != 0
- && (strip_symbols == strip_debug
- || strip_symbols == strip_unneeded
- || strip_symbols == strip_all
- || discard_locals == locals_all
+ && (strip_symbols == STRIP_DEBUG
+ || strip_symbols == STRIP_UNNEEDED
+ || strip_symbols == STRIP_ALL
+ || discard_locals == LOCALS_ALL
|| convert_debugging))
return true;
- if (! sections_removed)
+ if (! sections_removed && ! sections_copied)
return false;
+
p = find_section_list (bfd_get_section_name (abfd, sec), false);
- return p != NULL && p->remove ? true : false;
+ if (sections_removed && p != NULL && p->remove)
+ return true;
+ if (sections_copied && (p == NULL || ! p->copy))
+ return true;
+ return false;
}
/* Choose which symbol entries to copy; put the result in OSYMS.
@@ -497,6 +564,15 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
const char *name = bfd_asymbol_name (sym);
int keep;
+ if (redefine_sym_list)
+ {
+ const char *old_name, *new_name;
+
+ old_name = bfd_asymbol_name (sym);
+ new_name = lookup_sym_redefinition (old_name);
+ name = bfd_asymbol_name (sym) = new_name;
+ }
+
if (change_leading_char
&& (bfd_get_symbol_leading_char (abfd)
!= bfd_get_symbol_leading_char (obfd))
@@ -527,21 +603,26 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
&& name[0] == bfd_get_symbol_leading_char (abfd))
name = bfd_asymbol_name (sym) = name + 1;
- if ((flags & BSF_KEEP) != 0) /* Used in relocation. */
+ if (strip_symbols == STRIP_ALL)
+ keep = 0;
+ else if ((flags & BSF_KEEP) != 0 /* Used in relocation. */
+ || ((flags & BSF_SECTION_SYM) != 0
+ && ((*bfd_get_section (sym)->symbol_ptr_ptr)->flags
+ & BSF_KEEP) != 0))
keep = 1;
else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */
|| (flags & BSF_WEAK) != 0
|| bfd_is_und_section (bfd_get_section (sym))
|| bfd_is_com_section (bfd_get_section (sym)))
- keep = strip_symbols != strip_unneeded;
+ keep = strip_symbols != STRIP_UNNEEDED;
else if ((flags & BSF_DEBUGGING) != 0) /* Debugging symbol. */
- keep = (strip_symbols != strip_debug
- && strip_symbols != strip_unneeded
+ keep = (strip_symbols != STRIP_DEBUG
+ && strip_symbols != STRIP_UNNEEDED
&& ! convert_debugging);
else /* Local symbol. */
- keep = (strip_symbols != strip_unneeded
- && (discard_locals != locals_all
- && (discard_locals != locals_start_L
+ keep = (strip_symbols != STRIP_UNNEEDED
+ && (discard_locals != LOCALS_ALL
+ && (discard_locals != LOCALS_START_L
|| ! bfd_is_local_label (abfd, sym))));
if (keep && is_specified_symbol (name, strip_specific_list))
@@ -573,6 +654,64 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
return dst_count;
}
+static const char *
+lookup_sym_redefinition (source)
+ const char *source;
+{
+ const char *result;
+ struct redefine_node *list;
+
+ result = source;
+
+ for (list = redefine_sym_list; list != NULL; list = list->next)
+ {
+ if (strcmp (source, list->source) == 0)
+ {
+ result = list->target;
+ break;
+ }
+ }
+ return result;
+}
+
+/* Add a node to a symbol redefine list */
+
+static void
+redefine_list_append (source, target)
+ const char *source;
+ const char *target;
+{
+ struct redefine_node **p;
+ struct redefine_node *list;
+ struct redefine_node *new_node;
+
+ for (p = &redefine_sym_list; (list = *p) != NULL; p = &list->next)
+ {
+ if (strcmp (source, list->source) == 0)
+ {
+ fatal (_("%s: Multiple redefinition of symbol \"%s\""),
+ "--redefine-sym",
+ source);
+ }
+
+ if (strcmp (target, list->target) == 0)
+ {
+ fatal (_("%s: Symbol \"%s\" is target of more than one redefinition"),
+ "--redefine-sym",
+ target);
+ }
+ }
+
+ new_node = (struct redefine_node *) xmalloc (sizeof (struct redefine_node));
+
+ new_node->source = strdup (source);
+ new_node->target = strdup (target);
+ new_node->next = NULL;
+
+ *p = new_node;
+}
+
+
/* Keep only every `copy_byte'th byte in MEMHUNK, which is *SIZE bytes long.
Adjust *SIZE. */
@@ -585,7 +724,10 @@ filter_bytes (memhunk, size)
for (; from < end; from += interleave)
*to++ = *from;
- *size /= interleave;
+ if (*size % interleave > (bfd_size_type) copy_byte)
+ *size = (*size / interleave) + 1;
+ else
+ *size /= interleave;
}
/* Copy object file IBFD onto OBFD. */
@@ -600,51 +742,47 @@ copy_object (ibfd, obfd)
asection **osections = NULL;
bfd_size_type *gaps = NULL;
bfd_size_type max_gap = 0;
+ long symsize;
+ PTR dhandle;
+
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- {
- nonfatal (bfd_get_filename (obfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (obfd));
if (verbose)
- printf ("copy from %s(%s) to %s(%s)\n",
- bfd_get_filename(ibfd), bfd_get_target(ibfd),
- bfd_get_filename(obfd), bfd_get_target(obfd));
+ printf (_("copy from %s(%s) to %s(%s)\n"),
+ bfd_get_filename (ibfd), bfd_get_target (ibfd),
+ bfd_get_filename (obfd), bfd_get_target (obfd));
if (set_start_set)
start = set_start;
else
start = bfd_get_start_address (ibfd);
- start += adjust_start;
+ start += change_start;
if (!bfd_set_start_address (obfd, start)
|| !bfd_set_file_flags (obfd,
(bfd_get_file_flags (ibfd)
& bfd_applicable_file_flags (obfd))))
- {
- nonfatal (bfd_get_filename (ibfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
/* Copy architecture of input file to output file */
if (!bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
bfd_get_mach (ibfd)))
- {
- fprintf (stderr,
- "Warning: Output file cannot represent architecture %s\n",
+ non_fatal (_("Warning: Output file cannot represent architecture %s"),
bfd_printable_arch_mach (bfd_get_arch (ibfd),
bfd_get_mach (ibfd)));
- }
+
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- {
- nonfatal (bfd_get_filename(ibfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
if (isympp)
free (isympp);
+
if (osympp != isympp)
free (osympp);
- /* bfd mandates that all output sections be created and sizes set before
+ /* BFD mandates that all output sections be created and sizes set before
any output is done. Thus, we traverse all sections multiple times. */
bfd_map_over_sections (ibfd, setup_section, (void *) obfd);
@@ -658,18 +796,17 @@ copy_object (ibfd, obfd)
padd->section = bfd_make_section (obfd, padd->name);
if (padd->section == NULL)
{
- fprintf (stderr, "%s: can't create section `%s': %s\n",
- program_name, padd->name,
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("can't create section `%s': %s"),
+ padd->name, bfd_errmsg (bfd_get_error ()));
status = 1;
return;
}
else
{
flagword flags;
-
+
if (! bfd_set_section_size (obfd, padd->section, padd->size))
- nonfatal (bfd_get_filename (obfd));
+ RETURN_NONFATAL (bfd_get_filename (obfd));
pset = find_section_list (padd->name, false);
if (pset != NULL)
@@ -679,15 +816,25 @@ copy_object (ibfd, obfd)
flags = pset->flags | SEC_HAS_CONTENTS;
else
flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DATA;
+
if (! bfd_set_section_flags (obfd, padd->section, flags))
- nonfatal (bfd_get_filename (obfd));
+ RETURN_NONFATAL (bfd_get_filename (obfd));
- if (pset != NULL
- && (pset->adjust == adjust_vma
- || pset->adjust == set_vma))
+ if (pset != NULL)
{
- if (! bfd_set_section_vma (obfd, padd->section, pset->val))
- nonfatal (bfd_get_filename (obfd));
+ if (pset->change_vma != CHANGE_IGNORE)
+ if (! bfd_set_section_vma (obfd, padd->section, pset->vma_val))
+ RETURN_NONFATAL (bfd_get_filename (obfd));
+
+ if (pset->change_lma != CHANGE_IGNORE)
+ {
+ padd->section->lma = pset->lma_val;
+
+ if (! bfd_set_section_alignment
+ (obfd, padd->section,
+ bfd_section_alignment (obfd, padd->section)))
+ RETURN_NONFATAL (bfd_get_filename (obfd));
+ }
}
}
}
@@ -735,10 +882,9 @@ copy_object (ibfd, obfd)
if (! bfd_set_section_size (obfd, osections[i],
size + (gap_stop - gap_start)))
{
- fprintf (stderr, "%s: Can't fill gap after %s: %s\n",
- program_name,
+ non_fatal (_("Can't fill gap after %s: %s"),
bfd_get_section_name (obfd, osections[i]),
- bfd_errmsg (bfd_get_error()));
+ bfd_errmsg (bfd_get_error ()));
status = 1;
break;
}
@@ -761,8 +907,7 @@ copy_object (ibfd, obfd)
if (! bfd_set_section_size (obfd, osections[c - 1],
pad_to - lma))
{
- fprintf (stderr, "%s: Can't add padding to %s: %s\n",
- program_name,
+ non_fatal (_("Can't add padding to %s: %s"),
bfd_get_section_name (obfd, osections[c - 1]),
bfd_errmsg (bfd_get_error ()));
status = 1;
@@ -779,67 +924,57 @@ copy_object (ibfd, obfd)
/* Symbol filtering must happen after the output sections have
been created, but before their contents are set. */
- if (strip_symbols == strip_all)
+ dhandle = NULL;
+ symsize = bfd_get_symtab_upper_bound (ibfd);
+ if (symsize < 0)
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
+
+ osympp = isympp = (asymbol **) xmalloc (symsize);
+ symcount = bfd_canonicalize_symtab (ibfd, isympp);
+ if (symcount < 0)
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
+
+ if (convert_debugging)
+ dhandle = read_debugging_info (ibfd, isympp, symcount);
+
+ if (strip_symbols == STRIP_DEBUG
+ || strip_symbols == STRIP_ALL
+ || strip_symbols == STRIP_UNNEEDED
+ || discard_locals != LOCALS_UNDEF
+ || strip_specific_list != NULL
+ || keep_specific_list != NULL
+ || localize_specific_list != NULL
+ || weaken_specific_list != NULL
+ || sections_removed
+ || sections_copied
+ || convert_debugging
+ || change_leading_char
+ || remove_leading_char
+ || redefine_sym_list
+ || weaken)
{
- osympp = isympp = NULL;
- symcount = 0;
+ /* Mark symbols used in output relocations so that they
+ are kept, even if they are local labels or static symbols.
+
+ Note we iterate over the input sections examining their
+ relocations since the relocations for the output sections
+ haven't been set yet. mark_symbols_used_in_relocations will
+ ignore input sections which have no corresponding output
+ section. */
+ if (strip_symbols != STRIP_ALL)
+ bfd_map_over_sections (ibfd,
+ mark_symbols_used_in_relocations,
+ (PTR)isympp);
+ osympp = (asymbol **) xmalloc ((symcount + 1) * sizeof (asymbol *));
+ symcount = filter_symbols (ibfd, obfd, osympp, isympp, symcount);
}
- else
- {
- long symsize;
- PTR dhandle = NULL;
- symsize = bfd_get_symtab_upper_bound (ibfd);
- if (symsize < 0)
- {
- nonfatal (bfd_get_filename (ibfd));
- }
-
- osympp = isympp = (asymbol **) xmalloc (symsize);
- symcount = bfd_canonicalize_symtab (ibfd, isympp);
- if (symcount < 0)
- {
- nonfatal (bfd_get_filename (ibfd));
- }
-
- if (convert_debugging)
- dhandle = read_debugging_info (ibfd, isympp, symcount);
-
- if (strip_symbols == strip_debug
- || strip_symbols == strip_unneeded
- || discard_locals != locals_undef
- || strip_specific_list != NULL
- || keep_specific_list != NULL
- || localize_specific_list != NULL
- || weaken_specific_list != NULL
- || sections_removed
- || convert_debugging
- || change_leading_char
- || remove_leading_char
- || weaken)
- {
- /* Mark symbols used in output relocations so that they
- are kept, even if they are local labels or static symbols.
-
- Note we iterate over the input sections examining their
- relocations since the relocations for the output sections
- haven't been set yet. mark_symbols_used_in_relocations will
- ignore input sections which have no corresponding output
- section. */
- bfd_map_over_sections (ibfd,
- mark_symbols_used_in_relocations,
- (PTR)isympp);
- osympp = (asymbol **) xmalloc ((symcount + 1) * sizeof (asymbol *));
- symcount = filter_symbols (ibfd, obfd, osympp, isympp, symcount);
- }
-
- if (convert_debugging && dhandle != NULL)
+ if (convert_debugging && dhandle != NULL)
+ {
+ if (! write_debugging_info (obfd, dhandle, &symcount, &osympp))
{
- if (! write_debugging_info (obfd, dhandle, &symcount, &osympp))
- {
- status = 1;
- return;
- }
+ status = 1;
+ return;
}
}
@@ -858,7 +993,7 @@ copy_object (ibfd, obfd)
(PTR) padd->contents,
(file_ptr) 0,
(bfd_size_type) padd->size))
- nonfatal (bfd_get_filename (obfd));
+ RETURN_NONFATAL (bfd_get_filename (obfd));
}
}
@@ -892,11 +1027,11 @@ copy_object (ibfd, obfd)
now = 8192;
else
now = left;
+
if (! bfd_set_section_contents (obfd, osections[i], buf,
off, now))
- {
- nonfatal (bfd_get_filename (obfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (obfd));
+
left -= now;
off += now;
}
@@ -910,9 +1045,9 @@ copy_object (ibfd, obfd)
important for the ECOFF code at least. */
if (!bfd_copy_private_bfd_data (ibfd, obfd))
{
- fprintf (stderr, "%s: %s: error copying private BFD data: %s\n",
- program_name, bfd_get_filename (obfd),
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("%s: error copying private BFD data: %s"),
+ bfd_get_filename (obfd),
+ bfd_errmsg (bfd_get_error ()));
status = 1;
return;
}
@@ -944,7 +1079,7 @@ copy_archive (ibfd, obfd, output_target)
if (mkdir (dir, 0700) != 0)
#endif
{
- fatal ("cannot mkdir %s for archive copying (error: %s)",
+ fatal (_("cannot mkdir %s for archive copying (error: %s)"),
dir, strerror (errno));
}
obfd->has_armap = ibfd->has_armap;
@@ -952,13 +1087,23 @@ copy_archive (ibfd, obfd, output_target)
list = NULL;
this_element = bfd_openr_next_archived_file (ibfd, NULL);
- while (this_element != (bfd *) NULL)
+ while (!status && this_element != (bfd *) NULL)
{
/* Create an output file for this member. */
- char *output_name = concat (dir, "/", bfd_get_filename(this_element),
+ char *output_name = concat (dir, "/", bfd_get_filename (this_element),
(char *) NULL);
bfd *output_bfd = bfd_openw (output_name, output_target);
bfd *last_element;
+ struct stat buf;
+ int stat_status = 0;
+
+ if (preserve_dates)
+ {
+ stat_status = bfd_stat_arch_elt (this_element, &buf);
+ if (stat_status != 0)
+ non_fatal (_("internal stat error on %s"),
+ bfd_get_filename (this_element));
+ }
l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
@@ -966,20 +1111,23 @@ copy_archive (ibfd, obfd, output_target)
list = l;
if (output_bfd == (bfd *) NULL)
- {
- nonfatal (output_name);
- }
+ RETURN_NONFATAL (output_name);
+
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- {
- nonfatal (bfd_get_filename (obfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (obfd));
if (bfd_check_format (this_element, bfd_object) == true)
+ copy_object (this_element, output_bfd);
+
+ if (!bfd_close (output_bfd))
{
- copy_object (this_element, output_bfd);
+ bfd_nonfatal (bfd_get_filename (output_bfd));
+ /* Error in new object file. Don't change archive. */
+ status = 1;
}
- bfd_close (output_bfd);
+ if (preserve_dates && stat_status == 0)
+ set_times (output_name, &buf);
/* Open the newly output file and attach to our list. */
output_bfd = bfd_openr (output_name, output_target);
@@ -998,14 +1146,10 @@ copy_archive (ibfd, obfd, output_target)
*ptr = (bfd *) NULL;
if (!bfd_close (obfd))
- {
- nonfatal (bfd_get_filename (obfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (obfd));
if (!bfd_close (ibfd))
- {
- nonfatal (bfd_get_filename (ibfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
/* Delete all the files that we opened. */
for (l = list; l != NULL; l = l->next)
@@ -1033,9 +1177,7 @@ copy_file (input_filename, output_filename, input_target, output_target)
ibfd = bfd_openr (input_filename, input_target);
if (ibfd == NULL)
- {
- nonfatal (input_filename);
- }
+ RETURN_NONFATAL (input_filename);
if (bfd_check_format (ibfd, bfd_archive))
{
@@ -1048,9 +1190,8 @@ copy_file (input_filename, output_filename, input_target, output_target)
obfd = bfd_openw (output_filename, output_target);
if (obfd == NULL)
- {
- nonfatal (output_filename);
- }
+ RETURN_NONFATAL (output_filename);
+
copy_archive (ibfd, obfd, output_target);
}
else if (bfd_check_format_matches (ibfd, bfd_object, &matching))
@@ -1064,30 +1205,26 @@ copy_file (input_filename, output_filename, input_target, output_target)
obfd = bfd_openw (output_filename, output_target);
if (obfd == NULL)
- {
- nonfatal (output_filename);
- }
+ RETURN_NONFATAL (output_filename);
copy_object (ibfd, obfd);
if (!bfd_close (obfd))
- {
- nonfatal (output_filename);
- }
+ RETURN_NONFATAL (output_filename);
if (!bfd_close (ibfd))
- {
- nonfatal (input_filename);
- }
+ RETURN_NONFATAL (input_filename);
}
else
{
bfd_nonfatal (input_filename);
+
if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
{
list_matching_formats (matching);
free (matching);
}
+
status = 1;
}
}
@@ -1104,16 +1241,17 @@ setup_section (ibfd, isection, obfdarg)
bfd *obfd = (bfd *) obfdarg;
struct section_list *p;
sec_ptr osection;
+ bfd_size_type size;
bfd_vma vma;
bfd_vma lma;
flagword flags;
char *err;
if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0
- && (strip_symbols == strip_debug
- || strip_symbols == strip_unneeded
- || strip_symbols == strip_all
- || discard_locals == locals_all
+ && (strip_symbols == STRIP_DEBUG
+ || strip_symbols == STRIP_UNNEEDED
+ || strip_symbols == STRIP_ALL
+ || discard_locals == LOCALS_ALL
|| convert_debugging))
return;
@@ -1121,31 +1259,36 @@ setup_section (ibfd, isection, obfdarg)
if (p != NULL)
p->used = true;
- if (p != NULL && p->remove)
+ if (sections_removed && p != NULL && p->remove)
+ return;
+ if (sections_copied && (p == NULL || ! p->copy))
return;
osection = bfd_make_section_anyway (obfd, bfd_section_name (ibfd, isection));
+
if (osection == NULL)
{
err = "making";
goto loser;
}
- if (!bfd_set_section_size (obfd,
- osection,
- bfd_section_size (ibfd, isection)))
+ size = bfd_section_size (ibfd, isection);
+ if (copy_byte >= 0)
+ size = (size + interleave - 1) / interleave;
+ if (! bfd_set_section_size (obfd, osection, size))
{
err = "size";
goto loser;
}
vma = bfd_section_vma (ibfd, isection);
- if (p != NULL && p->adjust == adjust_vma)
- vma += p->val;
- else if (p != NULL && p->adjust == set_vma)
- vma = p->val;
+ if (p != NULL && p->change_vma == CHANGE_MODIFY)
+ vma += p->vma_val;
+ else if (p != NULL && p->change_vma == CHANGE_SET)
+ vma = p->vma_val;
else
- vma += adjust_section_vma;
+ vma += change_section_address;
+
if (! bfd_set_section_vma (obfd, osection, vma))
{
err = "vma";
@@ -1153,14 +1296,22 @@ setup_section (ibfd, isection, obfdarg)
}
lma = isection->lma;
- if (p != NULL && p->adjust == adjust_vma)
- lma += p->val;
- else if (p != NULL && p->adjust == set_vma)
- lma = p->val;
+ if ((p != NULL) && p->change_lma != CHANGE_IGNORE)
+ {
+ if (p->change_lma == CHANGE_MODIFY)
+ lma += p->lma_val;
+ else if (p->change_lma == CHANGE_SET)
+ lma = p->lma_val;
+ else
+ abort ();
+ }
else
- lma += adjust_section_vma;
+ lma += change_section_address;
+
osection->lma = lma;
+ /* FIXME: This is probably not enough. If we change the LMA we
+ may have to recompute the header for the file as well. */
if (bfd_set_section_alignment (obfd,
osection,
bfd_section_alignment (ibfd, isection))
@@ -1197,10 +1348,10 @@ setup_section (ibfd, isection, obfdarg)
return;
loser:
- fprintf (stderr, "%s: %s: section `%s': error in %s: %s\n",
- program_name,
- bfd_get_filename (ibfd), bfd_section_name (ibfd, isection),
- err, bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("%s: section `%s': error in %s: %s"),
+ bfd_get_filename (ibfd),
+ bfd_section_name (ibfd, isection),
+ err, bfd_errmsg (bfd_get_error ()));
status = 1;
}
@@ -1220,12 +1371,18 @@ copy_section (ibfd, isection, obfdarg)
long relcount;
sec_ptr osection;
bfd_size_type size;
+ long relsize;
+
+ /* If we have already failed earlier on, do not keep on generating
+ complaints now. */
+ if (status != 0)
+ return;
if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0
- && (strip_symbols == strip_debug
- || strip_symbols == strip_unneeded
- || strip_symbols == strip_all
- || discard_locals == locals_all
+ && (strip_symbols == STRIP_DEBUG
+ || strip_symbols == STRIP_UNNEEDED
+ || strip_symbols == STRIP_ALL
+ || discard_locals == LOCALS_ALL
|| convert_debugging))
{
return;
@@ -1233,7 +1390,9 @@ copy_section (ibfd, isection, obfdarg)
p = find_section_list (bfd_section_name (ibfd, isection), false);
- if (p != NULL && p->remove)
+ if (sections_removed && p != NULL && p->remove)
+ return;
+ if (sections_copied && (p == NULL || ! p->copy))
return;
osection = isection->output_section;
@@ -1242,29 +1401,40 @@ copy_section (ibfd, isection, obfdarg)
if (size == 0 || osection == 0)
return;
- if (strip_symbols == strip_all)
+
+ relsize = bfd_get_reloc_upper_bound (ibfd, isection);
+ if (relsize < 0)
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
+
+ if (relsize == 0)
bfd_set_reloc (obfd, osection, (arelent **) NULL, 0);
else
{
- long relsize;
+ relpp = (arelent **) xmalloc (relsize);
+ relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, isympp);
+ if (relcount < 0)
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
- relsize = bfd_get_reloc_upper_bound (ibfd, isection);
- if (relsize < 0)
+ if (strip_symbols == STRIP_ALL)
{
- nonfatal (bfd_get_filename (ibfd));
- }
- if (relsize == 0)
- bfd_set_reloc (obfd, osection, (arelent **) NULL, 0);
- else
- {
- relpp = (arelent **) xmalloc (relsize);
- relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, isympp);
- if (relcount < 0)
- {
- nonfatal (bfd_get_filename (ibfd));
- }
- bfd_set_reloc (obfd, osection, relpp, relcount);
+ /* Remove relocations which are not in
+ keep_strip_specific_list. */
+ arelent **temp_relpp;
+ long temp_relcount = 0;
+ long i;
+
+ temp_relpp = (arelent **) xmalloc (relsize);
+ for (i = 0; i < relcount; i++)
+ if (is_specified_symbol
+ (bfd_asymbol_name (*relpp [i]->sym_ptr_ptr),
+ keep_specific_list))
+ temp_relpp [temp_relcount++] = relpp [i];
+ relcount = temp_relcount;
+ free (relpp);
+ relpp = temp_relpp;
}
+ bfd_set_reloc (obfd, osection,
+ (relcount == 0 ? (arelent **) NULL : relpp), relcount);
}
isection->_cooked_size = isection->_raw_size;
@@ -1276,23 +1446,15 @@ copy_section (ibfd, isection, obfdarg)
if (!bfd_get_section_contents (ibfd, isection, memhunk, (file_ptr) 0,
size))
- {
- nonfatal (bfd_get_filename (ibfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
- if (copy_byte >= 0)
- {
- filter_bytes (memhunk, &size);
- /* The section has gotten smaller. */
- if (!bfd_set_section_size (obfd, osection, size))
- nonfatal (bfd_get_filename (obfd));
- }
+ if (copy_byte >= 0)
+ filter_bytes (memhunk, &size);
if (!bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0,
size))
- {
- nonfatal (bfd_get_filename (obfd));
- }
+ RETURN_NONFATAL (bfd_get_filename (obfd));
+
free (memhunk);
}
else if (p != NULL && p->set_flags && (p->flags & SEC_HAS_CONTENTS) != 0)
@@ -1308,7 +1470,7 @@ copy_section (ibfd, isection, obfdarg)
memset (memhunk, 0, size);
if (! bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0,
size))
- nonfatal (bfd_get_filename (obfd));
+ RETURN_NONFATAL (bfd_get_filename (obfd));
free (memhunk);
}
}
@@ -1318,7 +1480,7 @@ copy_section (ibfd, isection, obfdarg)
static void
get_sections (obfd, osection, secppparg)
- bfd *obfd;
+ bfd *obfd ATTRIBUTE_UNUSED;
asection *osection;
PTR secppparg;
{
@@ -1425,8 +1587,8 @@ static boolean
write_debugging_info (obfd, dhandle, symcountp, symppp)
bfd *obfd;
PTR dhandle;
- long *symcountp;
- asymbol ***symppp;
+ long *symcountp ATTRIBUTE_UNUSED;
+ asymbol ***symppp ATTRIBUTE_UNUSED;
{
if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour)
return write_ieee_debugging_info (obfd, dhandle);
@@ -1460,8 +1622,9 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
| SEC_READONLY
| SEC_DEBUGGING)))
{
- fprintf (stderr, "%s: can't create debugging section: %s\n",
- bfd_get_filename (obfd), bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("%s: can't create debugging section: %s"),
+ bfd_get_filename (obfd),
+ bfd_errmsg (bfd_get_error ()));
return false;
}
@@ -1474,202 +1637,20 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
|| ! bfd_set_section_contents (obfd, stabstrsec, strings,
(file_ptr) 0, stringsize))
{
- fprintf (stderr, "%s: can't set debugging section contents: %s\n",
- bfd_get_filename (obfd), bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("%s: can't set debugging section contents: %s"),
+ bfd_get_filename (obfd),
+ bfd_errmsg (bfd_get_error ()));
return false;
}
return true;
}
- fprintf (stderr,
- "%s: don't know how to write debugging information for %s\n",
- bfd_get_filename (obfd), bfd_get_target (obfd));
+ non_fatal (_("%s: don't know how to write debugging information for %s"),
+ bfd_get_filename (obfd), bfd_get_target (obfd));
return false;
}
-/* The number of bytes to copy at once. */
-#define COPY_BUF 8192
-
-/* Copy file FROM to file TO, performing no translations.
- Return 0 if ok, -1 if error. */
-
-static int
-simple_copy (from, to)
- const char *from;
- const char *to;
-{
- int fromfd, tofd, nread;
- int saved;
- char buf[COPY_BUF];
-
- fromfd = open (from, O_RDONLY);
- if (fromfd < 0)
- return -1;
- tofd = creat (to, 0777);
- if (tofd < 0)
- {
- saved = errno;
- close (fromfd);
- errno = saved;
- return -1;
- }
- while ((nread = read (fromfd, buf, sizeof buf)) > 0)
- {
- if (write (tofd, buf, nread) != nread)
- {
- saved = errno;
- close (fromfd);
- close (tofd);
- errno = saved;
- return -1;
- }
- }
- saved = errno;
- close (fromfd);
- close (tofd);
- if (nread < 0)
- {
- errno = saved;
- return -1;
- }
- return 0;
-}
-
-#ifndef S_ISLNK
-#ifdef S_IFLNK
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#else
-#define S_ISLNK(m) 0
-#define lstat stat
-#endif
-#endif
-
-/* Rename FROM to TO, copying if TO is a link.
- Assumes that TO already exists, because FROM is a temp file.
- Return 0 if ok, -1 if error. */
-
-static int
-smart_rename (from, to)
- const char *from;
- const char *to;
-{
- struct stat s;
- int ret = 0;
-
- if (lstat (to, &s))
- return -1;
-
-#if defined (_WIN32) && !defined (__CYGWIN32__)
- /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but
- fail instead. Also, chown is not present. */
-
- if (stat (to, &s) == 0)
- remove (to);
-
- ret = rename (from, to);
- if (ret != 0)
- {
- /* We have to clean up here. */
- int saved = errno;
- fprintf (stderr, "%s: %s: ", program_name, to);
- errno = saved;
- perror ("rename");
- unlink (from);
- }
-#else
- /* Use rename only if TO is not a symbolic link and has
- only one hard link. */
- if (!S_ISLNK (s.st_mode) && s.st_nlink == 1)
- {
- ret = rename (from, to);
- if (ret == 0)
- {
- /* Try to preserve the permission bits and ownership of TO.
- First get the mode right except for the setuid bit. Then
- change the ownership. Then fix the setuid bit. We do
- the chmod before the chown because if the chown succeeds,
- and we are a normal user, we won't be able to do the
- chmod afterward. We don't bother to fix the setuid bit
- first because that might introduce a fleeting security
- problem, and because the chown will clear the setuid bit
- anyhow. We only fix the setuid bit if the chown
- succeeds, because we don't want to introduce an
- unexpected setuid file owned by the user running objcopy. */
- chmod (to, s.st_mode & 0777);
- if (chown (to, s.st_uid, s.st_gid) >= 0)
- chmod (to, s.st_mode & 07777);
- }
- else
- {
- /* We have to clean up here. */
- int saved = errno;
- fprintf (stderr, "%s: %s: ", program_name, to);
- errno = saved;
- perror ("rename");
- unlink (from);
- }
- }
- else
- {
- ret = simple_copy (from, to);
- if (ret != 0)
- {
- int saved = errno;
- fprintf (stderr, "%s: %s: ", program_name, to);
- errno = saved;
- perror ("simple_copy");
- }
- unlink (from);
- }
-#endif /* _WIN32 && !__CYGWIN32__ */
-
- return ret;
-}
-
-/* Set the times of the file DESTINATION to be the same as those in
- STATBUF. */
-
-static void
-set_times (destination, statbuf)
- const char *destination;
- const struct stat *statbuf;
-{
- int result;
-
- {
-#ifdef HAVE_GOOD_UTIME_H
- struct utimbuf tb;
-
- tb.actime = statbuf->st_atime;
- tb.modtime = statbuf->st_mtime;
- result = utime (destination, &tb);
-#else /* ! HAVE_GOOD_UTIME_H */
-#ifndef HAVE_UTIMES
- long tb[2];
-
- tb[0] = statbuf->st_atime;
- tb[1] = statbuf->st_mtime;
- result = utime (destination, tb);
-#else /* HAVE_UTIMES */
- struct timeval tv[2];
-
- tv[0].tv_sec = statbuf->st_atime;
- tv[0].tv_usec = 0;
- tv[1].tv_sec = statbuf->st_mtime;
- tv[1].tv_usec = 0;
- result = utimes (destination, tv);
-#endif /* HAVE_UTIMES */
-#endif /* ! HAVE_GOOD_UTIME_H */
- }
-
- if (result != 0)
- {
- fprintf (stderr, "%s: ", destination);
- perror ("can not set time");
- }
-}
-
static int
strip_main (argc, argv)
int argc;
@@ -1677,7 +1658,6 @@ strip_main (argc, argv)
{
char *input_target = NULL, *output_target = NULL;
boolean show_version = false;
- boolean preserve_dates = false;
int c, i;
struct section_list *p;
char *output_file = NULL;
@@ -1702,14 +1682,14 @@ strip_main (argc, argv)
sections_removed = true;
break;
case 's':
- strip_symbols = strip_all;
+ strip_symbols = STRIP_ALL;
break;
case 'S':
case 'g':
- strip_symbols = strip_debug;
+ strip_symbols = STRIP_DEBUG;
break;
case OPTION_STRIP_UNNEEDED:
- strip_symbols = strip_unneeded;
+ strip_symbols = STRIP_UNNEEDED;
break;
case 'K':
add_specific_symbol (optarg, &keep_specific_list);
@@ -1724,10 +1704,10 @@ strip_main (argc, argv)
preserve_dates = true;
break;
case 'x':
- discard_locals = locals_all;
+ discard_locals = LOCALS_ALL;
break;
case 'X':
- discard_locals = locals_start_L;
+ discard_locals = LOCALS_START_L;
break;
case 'v':
verbose = true;
@@ -1748,10 +1728,10 @@ strip_main (argc, argv)
print_version ("strip");
/* Default is to strip all symbols. */
- if (strip_symbols == strip_undef
- && discard_locals == locals_undef
+ if (strip_symbols == STRIP_UNDEF
+ && discard_locals == LOCALS_UNDEF
&& strip_specific_list == NULL)
- strip_symbols = strip_all;
+ strip_symbols = STRIP_ALL;
if (output_target == (char *) NULL)
output_target = input_target;
@@ -1771,8 +1751,7 @@ strip_main (argc, argv)
{
if (stat (argv[i], &statbuf) < 0)
{
- fprintf (stderr, "%s: ", argv[i]);
- perror ("cannot stat");
+ non_fatal (_("%s: cannot stat: %s"), argv[i], strerror (errno));
continue;
}
}
@@ -1789,7 +1768,7 @@ strip_main (argc, argv)
if (preserve_dates)
set_times (tmpname, &statbuf);
if (output_file == NULL)
- smart_rename (tmpname, argv[i]);
+ smart_rename (tmpname, argv[i], preserve_dates);
status = hold_status;
}
else
@@ -1809,90 +1788,110 @@ copy_main (argc, argv)
char *input_filename = NULL, *output_filename = NULL;
char *input_target = NULL, *output_target = NULL;
boolean show_version = false;
- boolean adjust_warn = true;
- boolean preserve_dates = false;
+ boolean change_warn = true;
int c;
struct section_list *p;
struct stat statbuf;
- while ((c = getopt_long (argc, argv, "b:i:I:K:N:s:O:d:F:L:R:SpgxXVvW:",
+ while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:R:SpgxXVvW:",
copy_options, (int *) 0)) != EOF)
{
switch (c)
{
case 'b':
- copy_byte = atoi(optarg);
+ copy_byte = atoi (optarg);
if (copy_byte < 0)
- {
- fprintf (stderr, "%s: byte number must be non-negative\n",
- program_name);
- exit (1);
- }
+ fatal (_("byte number must be non-negative"));
break;
+
case 'i':
- interleave = atoi(optarg);
+ interleave = atoi (optarg);
if (interleave < 1)
- {
- fprintf(stderr, "%s: interleave must be positive\n",
- program_name);
- exit (1);
- }
+ fatal (_("interleave must be positive"));
break;
+
case 'I':
case 's': /* "source" - 'I' is preferred */
input_target = optarg;
break;
+
case 'O':
case 'd': /* "destination" - 'O' is preferred */
output_target = optarg;
break;
+
case 'F':
input_target = output_target = optarg;
break;
+
+ case 'j':
+ p = find_section_list (optarg, true);
+ if (p->remove)
+ fatal (_("%s both copied and removed"), optarg);
+ p->copy = true;
+ sections_copied = true;
+ break;
+
case 'R':
p = find_section_list (optarg, true);
+ if (p->copy)
+ fatal (_("%s both copied and removed"), optarg);
p->remove = true;
sections_removed = true;
break;
+
case 'S':
- strip_symbols = strip_all;
+ strip_symbols = STRIP_ALL;
break;
+
case 'g':
- strip_symbols = strip_debug;
+ strip_symbols = STRIP_DEBUG;
break;
+
case OPTION_STRIP_UNNEEDED:
- strip_symbols = strip_unneeded;
+ strip_symbols = STRIP_UNNEEDED;
break;
+
case 'K':
add_specific_symbol (optarg, &keep_specific_list);
break;
+
case 'N':
add_specific_symbol (optarg, &strip_specific_list);
break;
+
case 'L':
add_specific_symbol (optarg, &localize_specific_list);
break;
+
case 'W':
add_specific_symbol (optarg, &weaken_specific_list);
break;
+
case 'p':
preserve_dates = true;
break;
+
case 'x':
- discard_locals = locals_all;
+ discard_locals = LOCALS_ALL;
break;
+
case 'X':
- discard_locals = locals_start_L;
+ discard_locals = LOCALS_START_L;
break;
+
case 'v':
verbose = true;
break;
+
case 'V':
show_version = true;
break;
+
case OPTION_WEAKEN:
weaken = true;
break;
+
case OPTION_ADD_SECTION:
{
const char *s;
@@ -1903,20 +1902,12 @@ copy_main (argc, argv)
FILE *f;
s = strchr (optarg, '=');
+
if (s == NULL)
- {
- fprintf (stderr,
- "%s: bad format for --add-section NAME=FILENAME\n",
- program_name);
- exit (1);
- }
+ fatal (_("bad format for %s"), "--add-section");
- if (stat (s + 1, &st) < 0)
- {
- fprintf (stderr, "%s: ", program_name);
- perror (s + 1);
- exit (1);
- }
+ if (stat (s + 1, & st) < 0)
+ fatal (_("cannot stat: %s: %s"), s + 1, strerror (errno));
pa = (struct section_add *) xmalloc (sizeof (struct section_add));
@@ -1932,33 +1923,48 @@ copy_main (argc, argv)
pa->contents = (bfd_byte *) xmalloc (pa->size);
f = fopen (pa->filename, FOPEN_RB);
+
if (f == NULL)
- {
- fprintf (stderr, "%s: ", program_name);
- perror (pa->filename);
- exit (1);
- }
+ fatal (_("cannot open: %s: %s"), pa->filename, strerror (errno));
+
if (fread (pa->contents, 1, pa->size, f) == 0
|| ferror (f))
- {
- fprintf (stderr, "%s: %s: fread failed\n",
- program_name, pa->filename);
- exit (1);
- }
+ fatal (_("%s: fread failed"), pa->filename);
+
fclose (f);
pa->next = add_sections;
add_sections = pa;
}
break;
- case OPTION_ADJUST_START:
- adjust_start = parse_vma (optarg, "--adjust-start");
+
+ case OPTION_CHANGE_START:
+ change_start = parse_vma (optarg, "--change-start");
break;
- case OPTION_ADJUST_SECTION_VMA:
+
+ case OPTION_CHANGE_SECTION_ADDRESS:
+ case OPTION_CHANGE_SECTION_LMA:
+ case OPTION_CHANGE_SECTION_VMA:
{
const char *s;
int len;
char *name;
+ char *option = NULL;
+ bfd_vma val;
+ enum change_action what = CHANGE_IGNORE;
+
+ switch (c)
+ {
+ case OPTION_CHANGE_SECTION_ADDRESS:
+ option = "--change-section-address";
+ break;
+ case OPTION_CHANGE_SECTION_LMA:
+ option = "--change-section-lma";
+ break;
+ case OPTION_CHANGE_SECTION_VMA:
+ option = "--change-section-vma";
+ break;
+ }
s = strchr (optarg, '=');
if (s == NULL)
@@ -1968,12 +1974,7 @@ copy_main (argc, argv)
{
s = strchr (optarg, '-');
if (s == NULL)
- {
- fprintf (stderr,
- "%s: bad format for --adjust-section-vma\n",
- program_name);
- exit (1);
- }
+ fatal (_("bad format for %s"), option);
}
}
@@ -1984,31 +1985,52 @@ copy_main (argc, argv)
p = find_section_list (name, true);
- p->val = parse_vma (s + 1, "--adjust-section-vma");
+ val = parse_vma (s + 1, option);
+
+ switch (*s)
+ {
+ case '=': what = CHANGE_SET; break;
+ case '-': val = - val; /* Drop through. */
+ case '+': what = CHANGE_MODIFY; break;
+ }
- if (*s == '=')
- p->adjust = set_vma;
- else
+ switch (c)
{
- p->adjust = adjust_vma;
- if (*s == '-')
- p->val = - p->val;
+ case OPTION_CHANGE_SECTION_ADDRESS:
+ p->change_vma = what;
+ p->vma_val = val;
+ /* Drop through. */
+
+ case OPTION_CHANGE_SECTION_LMA:
+ p->change_lma = what;
+ p->lma_val = val;
+ break;
+
+ case OPTION_CHANGE_SECTION_VMA:
+ p->change_vma = what;
+ p->vma_val = val;
+ break;
}
}
break;
- case OPTION_ADJUST_VMA:
- adjust_section_vma = parse_vma (optarg, "--adjust-vma");
- adjust_start = adjust_section_vma;
+
+ case OPTION_CHANGE_ADDRESSES:
+ change_section_address = parse_vma (optarg, "--change-addresses");
+ change_start = change_section_address;
break;
- case OPTION_ADJUST_WARNINGS:
- adjust_warn = true;
+
+ case OPTION_CHANGE_WARNINGS:
+ change_warn = true;
break;
+
case OPTION_CHANGE_LEADING_CHAR:
change_leading_char = true;
break;
+
case OPTION_DEBUGGING:
convert_debugging = true;
break;
+
case OPTION_GAP_FILL:
{
bfd_vma gap_fill_vma;
@@ -2017,24 +2039,62 @@ copy_main (argc, argv)
gap_fill = (bfd_byte) gap_fill_vma;
if ((bfd_vma) gap_fill != gap_fill_vma)
{
- fprintf (stderr, "%s: warning: truncating gap-fill from 0x",
- program_name);
- fprintf_vma (stderr, gap_fill_vma);
- fprintf (stderr, "to 0x%x\n", (unsigned int) gap_fill);
+ char buff[20];
+
+ sprintf_vma (buff, gap_fill_vma);
+
+ non_fatal (_("Warning: truncating gap-fill from 0x%s to 0x%x"),
+ buff, gap_fill);
}
gap_fill_set = true;
}
break;
- case OPTION_NO_ADJUST_WARNINGS:
- adjust_warn = false;
+
+ case OPTION_NO_CHANGE_WARNINGS:
+ change_warn = false;
break;
+
case OPTION_PAD_TO:
pad_to = parse_vma (optarg, "--pad-to");
pad_to_set = true;
break;
+
case OPTION_REMOVE_LEADING_CHAR:
remove_leading_char = true;
break;
+
+ case OPTION_REDEFINE_SYM:
+ {
+ /* Push this redefinition onto redefine_symbol_list. */
+
+ int len;
+ const char *s;
+ const char *nextarg;
+ char *source, *target;
+
+ s = strchr (optarg, '=');
+ if (s == NULL)
+ {
+ fatal (_("bad format for %s"), "--redefine-sym");
+ }
+
+ len = s - optarg;
+ source = (char *) xmalloc (len + 1);
+ strncpy (source, optarg, len);
+ source[len] = '\0';
+
+ nextarg = s + 1;
+ len = strlen (nextarg);
+ target = (char *) xmalloc (len + 1);
+ strcpy (target, nextarg);
+
+ redefine_list_append (source, target);
+
+ free (source);
+ free (target);
+ }
+ break;
+
case OPTION_SET_SECTION_FLAGS:
{
const char *s;
@@ -2043,11 +2103,7 @@ copy_main (argc, argv)
s = strchr (optarg, '=');
if (s == NULL)
- {
- fprintf (stderr, "%s: bad format for --set-section-flags\n",
- program_name);
- exit (1);
- }
+ fatal (_("bad format for %s"), "--set-section-flags");
len = s - optarg;
name = (char *) xmalloc (len + 1);
@@ -2060,14 +2116,18 @@ copy_main (argc, argv)
p->flags = parse_flags (s + 1);
}
break;
+
case OPTION_SET_START:
set_start = parse_vma (optarg, "--set-start");
set_start_set = true;
break;
+
case 0:
break; /* we've been given a long option */
+
case 'h':
copy_usage (stdout, 0);
+
default:
copy_usage (stderr, 1);
}
@@ -2077,11 +2137,7 @@ copy_main (argc, argv)
print_version ("objcopy");
if (copy_byte >= interleave)
- {
- fprintf (stderr, "%s: byte number must be less than interleave\n",
- program_name);
- exit (1);
- }
+ fatal (_("byte number must be less than interleave"));
if (optind == argc || optind + 2 < argc)
copy_usage (stderr, 1);
@@ -2091,8 +2147,8 @@ copy_main (argc, argv)
output_filename = argv[optind + 1];
/* Default is to strip no symbols. */
- if (strip_symbols == strip_undef && discard_locals == locals_undef)
- strip_symbols = strip_none;
+ if (strip_symbols == STRIP_UNDEF && discard_locals == LOCALS_UNDEF)
+ strip_symbols = STRIP_NONE;
if (output_target == (char *) NULL)
output_target = input_target;
@@ -2100,11 +2156,7 @@ copy_main (argc, argv)
if (preserve_dates)
{
if (stat (input_filename, &statbuf) < 0)
- {
- fprintf (stderr, "%s: ", input_filename);
- perror ("cannot stat");
- exit (1);
- }
+ fatal (_("Cannot stat: %s: %s"), input_filename, strerror (errno));
}
/* If there is no destination file then create a temp and rename
@@ -2116,10 +2168,10 @@ copy_main (argc, argv)
copy_file (input_filename, tmpname, input_target, output_target);
if (status == 0)
- {
+ {
if (preserve_dates)
set_times (tmpname, &statbuf);
- smart_rename (tmpname, input_filename);
+ smart_rename (tmpname, input_filename, preserve_dates);
}
else
unlink (tmpname);
@@ -2131,17 +2183,39 @@ copy_main (argc, argv)
set_times (output_filename, &statbuf);
}
- if (adjust_warn)
+ if (change_warn)
{
- for (p = adjust_sections; p != NULL; p = p->next)
+ for (p = change_sections; p != NULL; p = p->next)
{
- if (! p->used && p->adjust != ignore_vma)
+ if (! p->used)
{
- fprintf (stderr, "%s: warning: --adjust-section-vma %s%c0x",
- program_name, p->name,
- p->adjust == set_vma ? '=' : '+');
- fprintf_vma (stderr, p->val);
- fprintf (stderr, " never used\n");
+ if (p->change_vma != CHANGE_IGNORE)
+ {
+ char buff [20];
+
+ sprintf_vma (buff, p->vma_val);
+
+ /* xgettext:c-format */
+ non_fatal (_("%s %s%c0x%s never used"),
+ "--change-section-vma",
+ p->name,
+ p->change_vma == CHANGE_SET ? '=' : '+',
+ buff);
+ }
+
+ if (p->change_lma != CHANGE_IGNORE)
+ {
+ char buff [20];
+
+ sprintf_vma (buff, p->lma_val);
+
+ /* xgettext:c-format */
+ non_fatal (_("%s %s%c0x%s never used"),
+ "--change-section-lma",
+ p->name,
+ p->change_lma == CHANGE_SET ? '=' : '+',
+ buff);
+ }
}
}
}
@@ -2154,13 +2228,19 @@ main (argc, argv)
int argc;
char *argv[];
{
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = argv[0];
xmalloc_set_program_name (program_name);
START_PROGRESS (program_name, 0);
- strip_symbols = strip_undef;
- discard_locals = locals_undef;
+ strip_symbols = STRIP_UNDEF;
+ discard_locals = LOCALS_UNDEF;
bfd_init ();
set_default_bfd_target ();
diff --git a/contrib/binutils/binutils/objdump.1 b/contrib/binutils/binutils/objdump.1
index 69217b9..ddc153e 100644
--- a/contrib/binutils/binutils/objdump.1
+++ b/contrib/binutils/binutils/objdump.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 1996, 1997 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH objdump 1 "5 November 1991" "cygnus support" "GNU Development Tools"
.de BP
@@ -44,6 +44,7 @@ objdump \- display information from object files.
.RB " | " "\-\-architecture="\c
.I machine\c
\&\|]
+.RB "[\|" \-p | \-\-private\-headers "\|]"
.RB "[\|" \-\-prefix\-addresses "\|]"
.RB "[\|" \-r | \-\-reloc "\|]"
.RB "[\|" \-R | \-\-dynamic\-reloc "\|]"
@@ -259,11 +260,19 @@ architecture information, such as S-records. You can list the available
architectures with the \fB\-i\fP option.
.TP
+.B \-p
+.TP
+.B \-\-private\-headers
+Print information that is specific to the object file format. The
+exact information printed depends upon the object file format. For
+some object file formats, no additional information is printed.
+
+.TP
.B \-r
.TP
.B \-\-reloc
Print the relocation entries of the file. If used with \fB\-d\fP or
-\fB\-d\fP, the relocations are printed interspersed with the
+\fB\-D\fP, the relocations are printed interspersed with the
disassembly.
.TP
@@ -308,7 +317,8 @@ sections from an ELF file. This is only useful on systems (such as
Solaris 2.0) in which .stab debugging symbol-table entries are carried
in an ELF section. In most other file formats, debugging symbol-table
entries are interleaved with linkage symbols, and are visible in the
-\-\-syms output.
+.B \-\-syms
+output.
.TP
.BI "\-\-start\-address=" "address"
diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c
index 65ac410..6f0a63e 100644
--- a/contrib/binutils/binutils/objdump.c
+++ b/contrib/binutils/binutils/objdump.c
@@ -1,5 +1,5 @@
/* objdump.c -- dump information about an object file.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -44,6 +44,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern int fprintf PARAMS ((FILE *, const char *, ...));
#endif
+/* Exit status. */
+static int exit_status = 0;
+
static char *default_target = NULL; /* default at runtime */
static int show_version = 0; /* show the version number */
@@ -72,6 +75,7 @@ static bfd_vma start_address = (bfd_vma) -1; /* --start-address */
static bfd_vma stop_address = (bfd_vma) -1; /* --stop-address */
static int dump_debugging; /* --debugging */
static bfd_vma adjust_section_vma = 0; /* --adjust-vma */
+static int file_start_context = 0; /* --file-start-context */
/* Extra info to pass to the disassembler address printing function. */
struct objdump_disasm_info {
@@ -83,6 +87,9 @@ struct objdump_disasm_info {
/* Architecture to disassemble for, or default if NULL. */
static char *machine = (char *) NULL;
+/* Target specific options to the disassembler. */
+static char *disassembler_options = (char *) NULL;
+
/* Endianness to disassemble for, or default if BFD_ENDIAN_UNKNOWN. */
static enum bfd_endian endian = BFD_ENDIAN_UNKNOWN;
@@ -110,6 +117,9 @@ static void
usage PARAMS ((FILE *, int));
static void
+nonfatal PARAMS ((const char *));
+
+static void
display_file PARAMS ((char *filename, char *target));
static void
@@ -178,8 +188,8 @@ show_line PARAMS ((bfd *, asection *, bfd_vma));
static void
disassemble_bytes PARAMS ((struct disassemble_info *, disassembler_ftype,
- boolean, bfd_byte *, long, long, arelent ***,
- arelent **));
+ boolean, bfd_byte *, bfd_vma, bfd_vma,
+ arelent ***, arelent **));
static void
disassemble_data PARAMS ((bfd *));
@@ -216,24 +226,55 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, "\
-Usage: %s [-ahifCdDprRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\
- [--archive-headers] [--target=bfdname] [--debugging] [--disassemble]\n\
- [--disassemble-all] [--disassemble-zeroes] [--file-headers]\n\
- [--section-headers] [--headers]\n\
- [--info] [--section=section-name] [--line-numbers] [--source]\n",
- program_name);
- fprintf (stream, "\
- [--architecture=machine] [--reloc] [--full-contents] [--stabs]\n\
- [--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\
- [--wide] [--version] [--help] [--private-headers]\n\
- [--start-address=addr] [--stop-address=addr]\n\
- [--prefix-addresses] [--[no-]show-raw-insn] [--demangle]\n\
- [--adjust-vma=offset] [-EB|-EL] [--endian={big|little}] objfile...\n\
-at least one option besides -l (--line-numbers) must be given\n");
- list_supported_targets (program_name, stream);
+ fprintf (stream, _("Usage: %s <switches> file(s)\n"), program_name);
+ fprintf (stream, _(" At least one of the following switches must be given:\n"));
+ fprintf (stream, _("\
+ -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 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 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 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\
+"));
+ if (status != 2)
+ {
+ fprintf (stream, _("\n The following switches are optional:\n"));
+ fprintf (stream, _("\
+ -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 <o> Pass text <o> 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 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 disassembling\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 <offset> Add <offset> to all displayed section addresses\n\
+\n"));
+ list_supported_targets (program_name, stream);
+
+ disassembler_usage (stream);
+ }
if (status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -251,15 +292,17 @@ static struct option long_options[]=
{"private-headers", no_argument, NULL, 'p'},
{"architecture", required_argument, NULL, 'm'},
{"archive-headers", no_argument, NULL, 'a'},
- {"debugging", no_argument, &dump_debugging, 1},
- {"demangle", no_argument, &do_demangle, 1},
+ {"debugging", no_argument, NULL, 'g'},
+ {"demangle", no_argument, NULL, 'C'},
{"disassemble", no_argument, NULL, 'd'},
{"disassemble-all", no_argument, NULL, 'D'},
- {"disassemble-zeroes", no_argument, &disassemble_zeroes, 1},
+ {"disassembler-options", required_argument, NULL, 'M'},
+ {"disassemble-zeroes", no_argument, NULL, 'z'},
{"dynamic-reloc", no_argument, NULL, 'R'},
{"dynamic-syms", no_argument, NULL, 'T'},
{"endian", required_argument, NULL, OPTION_ENDIAN},
{"file-headers", no_argument, NULL, 'f'},
+ {"file-start-context", no_argument, &file_start_context, 1},
{"full-contents", no_argument, NULL, 's'},
{"headers", no_argument, NULL, 'h'},
{"help", no_argument, NULL, 'H'},
@@ -272,27 +315,36 @@ static struct option long_options[]=
{"section-headers", no_argument, NULL, 'h'},
{"show-raw-insn", no_argument, &show_raw_insn, 1},
{"source", no_argument, NULL, 'S'},
- {"stabs", no_argument, &dump_stab_section_info, 1},
+ {"stabs", no_argument, NULL, 'G'},
{"start-address", required_argument, NULL, OPTION_START_ADDRESS},
{"stop-address", required_argument, NULL, OPTION_STOP_ADDRESS},
{"syms", no_argument, NULL, 't'},
{"target", required_argument, NULL, 'b'},
- {"version", no_argument, &show_version, 1},
- {"wide", no_argument, &wide_output, 'w'},
+ {"version", no_argument, NULL, 'V'},
+ {"wide", no_argument, NULL, 'w'},
{0, no_argument, 0, 0}
};
static void
+nonfatal (msg)
+ const char *msg;
+{
+ bfd_nonfatal (msg);
+ exit_status = 1;
+}
+
+static void
dump_section_header (abfd, section, ignored)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *section;
- PTR ignored;
+ PTR ignored ATTRIBUTE_UNUSED;
{
char *comma = "";
+ unsigned int opb = bfd_octets_per_byte (abfd);
printf ("%3d %-13s %08lx ", section->index,
bfd_get_section_name (abfd, section),
- (unsigned long) bfd_section_size (abfd, section));
+ (unsigned long) bfd_section_size (abfd, section) / opb);
printf_vma (bfd_get_section_vma (abfd, section));
printf (" ");
printf_vma (section->lma);
@@ -324,6 +376,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_SMALL_DATA, "SMALL_DATA");
+ PF (SEC_SHARED, "SHARED");
if ((section->flags & SEC_LINK_ONCE) != 0)
{
@@ -347,6 +401,11 @@ dump_section_header (abfd, section, ignored)
break;
}
printf ("%s%s", comma, ls);
+
+ if (section->comdat != NULL)
+ printf (" (COMDAT %s %ld)", section->comdat->name,
+ section->comdat->symbol);
+
comma = ", ";
}
@@ -358,12 +417,18 @@ static void
dump_headers (abfd)
bfd *abfd;
{
- printf ("Sections:\n");
+ printf (_("Sections:\n"));
+
#ifndef BFD64
- printf ("Idx Name Size VMA LMA File off Algn\n");
+ printf (_("Idx Name Size VMA LMA File off Algn"));
#else
- printf ("Idx Name Size VMA LMA File off Algn\n");
+ printf (_("Idx Name Size VMA LMA File off Algn"));
#endif
+
+ if (wide_output)
+ printf (_(" Flags"));
+ printf ("\n");
+
bfd_map_over_sections (abfd, dump_section_header, (PTR) NULL);
}
@@ -376,7 +441,7 @@ slurp_symtab (abfd)
if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
{
- printf ("No symbols in \"%s\".\n", bfd_get_filename (abfd));
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
symcount = 0;
return NULL;
}
@@ -393,8 +458,7 @@ slurp_symtab (abfd)
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
if (symcount == 0)
- fprintf (stderr, "%s: %s: No symbols\n",
- program_name, bfd_get_filename (abfd));
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
return sy;
}
@@ -412,8 +476,7 @@ slurp_dynamic_symtab (abfd)
{
if (!(bfd_get_file_flags (abfd) & DYNAMIC))
{
- fprintf (stderr, "%s: %s: not a dynamic object\n",
- program_name, bfd_get_filename (abfd));
+ non_fatal (_("%s: not a dynamic object"), bfd_get_filename (abfd));
dynsymcount = 0;
return NULL;
}
@@ -429,8 +492,7 @@ slurp_dynamic_symtab (abfd)
if (dynsymcount < 0)
bfd_fatal (bfd_get_filename (abfd));
if (dynsymcount == 0)
- fprintf (stderr, "%s: %s: No dynamic symbols\n",
- program_name, bfd_get_filename (abfd));
+ non_fatal (_("%s: No dynamic symbols"), bfd_get_filename (abfd));
return sy;
}
@@ -679,6 +741,7 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
long min = 0;
long max = sorted_symcount;
long thisplace;
+ unsigned int opb = bfd_octets_per_byte (abfd);
if (sorted_symcount < 1)
return NULL;
@@ -726,7 +789,7 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
|| ((abfd->flags & HAS_RELOC) != 0
&& vma >= bfd_get_section_vma (abfd, sec)
&& vma < (bfd_get_section_vma (abfd, sec)
- + bfd_section_size (abfd, sec)))))
+ + bfd_section_size (abfd, sec) / opb))))
{
long i;
@@ -950,10 +1013,10 @@ skip_to_line (p, line, show)
listing. */
static void
-show_line (abfd, section, off)
+show_line (abfd, section, addr_offset)
bfd *abfd;
asection *section;
- bfd_vma off;
+ bfd_vma addr_offset;
{
CONST char *filename;
CONST char *functionname;
@@ -962,7 +1025,7 @@ show_line (abfd, section, off)
if (! with_line_numbers && ! with_source_code)
return;
- if (! bfd_find_nearest_line (abfd, section, syms, off, &filename,
+ if (! bfd_find_nearest_line (abfd, section, syms, addr_offset, &filename,
&functionname, &line))
return;
@@ -1014,8 +1077,8 @@ show_line (abfd, section, off)
else
{
l = line - SHOW_PRECEDING_CONTEXT_LINES;
- if (l <= 0)
- l = 1;
+ if (l < 0)
+ l = 0;
}
if (p->f == NULL)
@@ -1065,9 +1128,12 @@ show_line (abfd, section, off)
p->next = print_files;
print_files = p;
- l = line - SHOW_PRECEDING_CONTEXT_LINES;
- if (l <= 0)
- l = 1;
+ if (file_start_context)
+ l = 0;
+ else
+ l = line - SHOW_PRECEDING_CONTEXT_LINES;
+ if (l < 0)
+ l = 0;
skip_to_line (p, l, false);
if (p->f != NULL)
skip_to_line (p, line, true);
@@ -1090,45 +1156,68 @@ show_line (abfd, section, off)
}
/* Pseudo FILE object for strings. */
-typedef struct {
+typedef struct
+{
char *buffer;
+ size_t size;
char *current;
} SFILE;
/* sprintf to a "stream" */
-#ifdef ANSI_PROTOTYPES
static int
+#ifdef ANSI_PROTOTYPES
objdump_sprintf (SFILE *f, const char *format, ...)
-{
- int n;
- va_list args;
-
- va_start (args, format);
- vsprintf (f->current, format, args);
- f->current += n = strlen (f->current);
- va_end (args);
- return n;
-}
#else
-static int
objdump_sprintf (va_alist)
va_dcl
+#endif
{
- int n;
+#ifndef ANSI_PROTOTYPES
SFILE *f;
const char *format;
+#endif
+ char *buf;
va_list args;
+ size_t n;
+#ifdef ANSI_PROTOTYPES
+ va_start (args, format);
+#else
va_start (args);
f = va_arg (args, SFILE *);
format = va_arg (args, const char *);
- vsprintf (f->current, format, args);
- f->current += n = strlen (f->current);
+#endif
+
+ vasprintf (&buf, format, args);
+
va_end (args);
+
+ if (buf == NULL)
+ {
+ fatal (_("Out of virtual memory"));
+ }
+
+ n = strlen (buf);
+
+ while ((size_t) ((f->buffer + f->size) - f->current) < n + 1)
+ {
+ size_t curroff;
+
+ curroff = f->current - f->buffer;
+ f->size *= 2;
+ f->buffer = xrealloc (f->buffer, f->size);
+ f->current = f->buffer + curroff;
+ }
+
+ memcpy (f->current, buf, n);
+ f->current += n;
+ f->current[0] = '\0';
+
+ free (buf);
+
return n;
}
-#endif
/* The number of zeroes we want to see before we start skipping them.
The number is arbitrarily chosen. */
@@ -1147,31 +1236,33 @@ objdump_sprintf (va_alist)
/* Disassemble some data in memory between given values. */
static void
-disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
+disassemble_bytes (info, disassemble_fn, insns, data,
+ start_offset, stop_offset, relppp,
relppend)
struct disassemble_info *info;
disassembler_ftype disassemble_fn;
boolean insns;
bfd_byte *data;
- long start;
- long stop;
+ bfd_vma start_offset;
+ bfd_vma stop_offset;
arelent ***relppp;
arelent **relppend;
{
struct objdump_disasm_info *aux;
asection *section;
- int bytes_per_line;
+ int octets_per_line;
boolean done_dot;
int skip_addr_chars;
- long i;
+ bfd_vma addr_offset;
+ int opb = info->octets_per_byte;
aux = (struct objdump_disasm_info *) info->application_data;
section = aux->sec;
if (insns)
- bytes_per_line = 4;
+ octets_per_line = 4;
else
- bytes_per_line = 16;
+ octets_per_line = 16;
/* Figure out how many characters to skip at the start of an
address, to make the disassembly look nicer. We discard leading
@@ -1183,8 +1274,8 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
char buf[30];
char *s;
- sprintf_vma (buf,
- section->vma + bfd_section_size (section->owner, section));
+ sprintf_vma (buf, section->vma +
+ bfd_section_size (section->owner, section) / opb);
s = buf;
while (s[0] == '0' && s[1] == '0' && s[2] == '0' && s[3] == '0'
&& s[4] == '0')
@@ -1197,38 +1288,39 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
info->insn_info_valid = 0;
done_dot = false;
- i = start;
- while (i < stop)
+ addr_offset = start_offset;
+ while (addr_offset < stop_offset)
{
- long z;
- int bytes;
+ bfd_vma z;
+ int octets = 0;
boolean need_nl = false;
- /* If we see more than SKIP_ZEROES bytes of zeroes, we just
+ /* If we see more than SKIP_ZEROES octets of zeroes, we just
print `...'. */
- for (z = i; z < stop; z++)
+ for (z = addr_offset * opb; z < stop_offset * opb; z++)
if (data[z] != 0)
break;
if (! disassemble_zeroes
&& (info->insn_info_valid == 0
|| info->branch_delay_insns == 0)
- && (z - i >= SKIP_ZEROES
- || (z == stop && z - i < SKIP_ZEROES_AT_END)))
+ && (z - addr_offset * opb >= SKIP_ZEROES
+ || (z == stop_offset * opb &&
+ z - addr_offset * opb < SKIP_ZEROES_AT_END)))
{
printf ("\t...\n");
- /* If there are more nonzero bytes to follow, we only skip
+ /* If there are more nonzero octets to follow, we only skip
zeroes in multiples of 4, to try to avoid running over
the start of an instruction which happens to start with
zero. */
- if (z != stop)
- z = i + ((z - i) &~ 3);
+ if (z != stop_offset * opb)
+ z = addr_offset * opb + ((z - addr_offset * opb) &~ 3);
- bytes = z - i;
+ octets = z - addr_offset * opb;
}
else
{
- char buf[1000];
+ char buf[50];
SFILE sfile;
int bpc = 0;
int pb = 0;
@@ -1236,13 +1328,13 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
done_dot = false;
if (with_line_numbers || with_source_code)
- show_line (aux->abfd, section, i);
+ show_line (aux->abfd, section, addr_offset);
if (! prefix_addresses)
{
char *s;
- sprintf_vma (buf, section->vma + i);
+ sprintf_vma (buf, section->vma + addr_offset);
for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' ';
if (*s == '\0')
@@ -1252,67 +1344,79 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
else
{
aux->require_sec = true;
- objdump_print_address (section->vma + i, info);
+ objdump_print_address (section->vma + addr_offset, info);
aux->require_sec = false;
putchar (' ');
}
if (insns)
{
- sfile.buffer = sfile.current = buf;
+ sfile.size = 120;
+ sfile.buffer = xmalloc (sfile.size);
+ sfile.current = sfile.buffer;
info->fprintf_func = (fprintf_ftype) objdump_sprintf;
info->stream = (FILE *) &sfile;
info->bytes_per_line = 0;
info->bytes_per_chunk = 0;
- if ((*relppp < relppend) && ((**relppp)->address >= (bfd_vma) i &&
- (**relppp)->address < (bfd_vma) i + bytes))
+
+ /* 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)
info->flags = INSN_HAS_RELOC;
else
info->flags = 0;
- bytes = (*disassemble_fn) (section->vma + i, info);
+
+ octets = (*disassemble_fn) (section->vma + addr_offset, info);
info->fprintf_func = (fprintf_ftype) fprintf;
info->stream = stdout;
if (info->bytes_per_line != 0)
- bytes_per_line = info->bytes_per_line;
- if (bytes < 0)
- break;
+ octets_per_line = info->bytes_per_line;
+ if (octets < 0)
+ {
+ if (sfile.current != sfile.buffer)
+ printf ("%s\n", sfile.buffer);
+ free (sfile.buffer);
+ break;
+ }
}
else
{
- long j;
+ bfd_vma j;
- bytes = bytes_per_line;
- if (i + bytes > stop)
- bytes = stop - i;
+ octets = octets_per_line;
+ if (addr_offset + octets / opb > stop_offset)
+ octets = (stop_offset - addr_offset) * opb;
- for (j = i; j < i + bytes; ++j)
+ for (j = addr_offset * opb; j < addr_offset * opb + octets; ++j)
{
if (isprint (data[j]))
- buf[j - i] = data[j];
+ buf[j - addr_offset * opb] = data[j];
else
- buf[j - i] = '.';
+ buf[j - addr_offset * opb] = '.';
}
- buf[j - i] = '\0';
+ buf[j - addr_offset * opb] = '\0';
}
if (prefix_addresses
? show_raw_insn > 0
: show_raw_insn >= 0)
{
- long j;
+ bfd_vma j;
/* If ! prefix_addresses and ! wide_output, we print
- bytes_per_line bytes per line. */
- pb = bytes;
- if (pb > bytes_per_line && ! prefix_addresses && ! wide_output)
- pb = bytes_per_line;
+ octets_per_line octets per line. */
+ pb = octets;
+ if (pb > octets_per_line && ! prefix_addresses && ! wide_output)
+ pb = octets_per_line;
if (info->bytes_per_chunk)
bpc = info->bytes_per_chunk;
else
bpc = 1;
- for (j = i; j < i + pb; j += bpc)
+ for (j = addr_offset * opb; j < addr_offset * opb + pb; j += bpc)
{
int k;
if (bpc > 1 && info->display_endian == BFD_ENDIAN_LITTLE)
@@ -1329,7 +1433,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
}
}
- for (; pb < bytes_per_line; pb += bpc)
+ for (; pb < octets_per_line; pb += bpc)
{
int k;
@@ -1345,31 +1449,37 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
printf (" ");
}
- printf ("%s", buf);
+ if (! insns)
+ printf ("%s", buf);
+ else
+ {
+ printf ("%s", sfile.buffer);
+ free (sfile.buffer);
+ }
if (prefix_addresses
? show_raw_insn > 0
: show_raw_insn >= 0)
{
- while (pb < bytes)
+ while (pb < octets)
{
- long j;
+ bfd_vma j;
char *s;
putchar ('\n');
- j = i + pb;
+ j = addr_offset * opb + pb;
- sprintf_vma (buf, section->vma + j);
+ sprintf_vma (buf, section->vma + j / opb);
for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' ';
if (*s == '\0')
*--s = '0';
printf ("%s:\t", buf + skip_addr_chars);
- pb += bytes_per_line;
- if (pb > bytes)
- pb = bytes;
- for (; j < i + pb; j += bpc)
+ pb += octets_per_line;
+ if (pb > octets)
+ pb = octets;
+ for (; j < addr_offset * opb + pb; j += bpc)
{
int k;
@@ -1399,8 +1509,8 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
&& (section->flags & SEC_RELOC) != 0)
{
while ((*relppp) < relppend
- && ((**relppp)->address >= (bfd_vma) i
- && (**relppp)->address < (bfd_vma) i + bytes))
+ && ((**relppp)->address >= (bfd_vma) addr_offset
+ && (**relppp)->address < (bfd_vma) addr_offset + octets / opb))
{
arelent *q;
@@ -1451,7 +1561,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
if (need_nl)
printf ("\n");
- i += bytes;
+ addr_offset += octets / opb;
}
}
@@ -1461,11 +1571,12 @@ static void
disassemble_data (abfd)
bfd *abfd;
{
- long i;
+ unsigned long addr_offset;
disassembler_ftype disassemble_fn;
struct disassemble_info disasm_info;
struct objdump_disasm_info aux;
asection *section;
+ unsigned int opb;
print_files = NULL;
prev_functionname = NULL;
@@ -1493,10 +1604,7 @@ disassemble_data (abfd)
const bfd_arch_info_type *info = bfd_scan_arch (machine);
if (info == NULL)
{
- fprintf (stderr, "%s: Can't use supplied machine %s\n",
- program_name,
- machine);
- exit (1);
+ fatal (_("Can't use supplied machine %s"), machine);
}
abfd->arch_info = info;
}
@@ -1514,19 +1622,24 @@ disassemble_data (abfd)
disassemble_fn = disassembler (abfd);
if (!disassemble_fn)
{
- fprintf (stderr, "%s: Can't disassemble for architecture %s\n",
- program_name,
- bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
+ non_fatal (_("Can't disassemble for architecture %s\n"),
+ bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
+ exit_status = 1;
return;
}
+ opb = bfd_octets_per_byte (abfd);
+
disasm_info.flavour = bfd_get_flavour (abfd);
disasm_info.arch = bfd_get_arch (abfd);
disasm_info.mach = bfd_get_mach (abfd);
+ disasm_info.disassembler_options = disassembler_options;
+ disasm_info.octets_per_byte = opb;
+
if (bfd_big_endian (abfd))
- disasm_info.endian = BFD_ENDIAN_BIG;
+ disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG;
else if (bfd_little_endian (abfd))
- disasm_info.endian = BFD_ENDIAN_LITTLE;
+ disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_LITTLE;
else
/* ??? Aborting here seems too drastic. We could default to big or little
instead. */
@@ -1541,7 +1654,7 @@ disassemble_data (abfd)
arelent **relbuf = NULL;
arelent **relpp = NULL;
arelent **relppend = NULL;
- long stop;
+ unsigned long stop_offset;
asymbol *sym = NULL;
long place = 0;
@@ -1576,10 +1689,19 @@ disassemble_data (abfd)
relpp = relbuf;
relppend = relpp + relcount;
+
+ /* Skip over the relocs belonging to addresses below the
+ start address. */
+ if (start_address != (bfd_vma) -1)
+ {
+ while (relpp < relppend
+ && (*relpp)->address < start_address)
+ ++relpp;
+ }
}
}
- printf ("Disassembly of section %s:\n", section->name);
+ printf (_("Disassembly of section %s:\n"), section->name);
datasize = bfd_get_section_size_before_reloc (section);
if (datasize == 0)
@@ -1595,37 +1717,37 @@ disassemble_data (abfd)
disasm_info.buffer_length = datasize;
if (start_address == (bfd_vma) -1
|| start_address < disasm_info.buffer_vma)
- i = 0;
+ addr_offset = 0;
else
- i = start_address - disasm_info.buffer_vma;
+ addr_offset = start_address - disasm_info.buffer_vma;
if (stop_address == (bfd_vma) -1)
- stop = datasize;
+ stop_offset = datasize / opb;
else
{
if (stop_address < disasm_info.buffer_vma)
- stop = 0;
+ stop_offset = 0;
else
- stop = stop_address - disasm_info.buffer_vma;
- if (stop > disasm_info.buffer_length)
- stop = disasm_info.buffer_length;
+ stop_offset = stop_address - disasm_info.buffer_vma;
+ if (stop_offset > disasm_info.buffer_length / opb)
+ stop_offset = disasm_info.buffer_length / opb;
}
- sym = find_symbol_for_address (abfd, section, section->vma + i,
+ sym = find_symbol_for_address (abfd, section, section->vma + addr_offset,
true, &place);
- while (i < stop)
+ while (addr_offset < stop_offset)
{
asymbol *nextsym;
- long nextstop;
+ unsigned long nextstop_offset;
boolean insns;
- if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + i)
+ if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + addr_offset)
{
int x;
for (x = place;
(x < sorted_symcount
- && bfd_asymbol_value (sorted_syms[x]) <= section->vma + i);
+ && bfd_asymbol_value (sorted_syms[x]) <= section->vma + addr_offset);
++x)
continue;
disasm_info.symbols = & sorted_syms[place];
@@ -1638,20 +1760,23 @@ disassemble_data (abfd)
{
printf ("\n");
objdump_print_addr_with_sym (abfd, section, sym,
- section->vma + i,
+ section->vma + addr_offset,
&disasm_info,
false);
printf (":\n");
}
- if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i)
+ if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset)
nextsym = sym;
else if (sym == NULL)
nextsym = NULL;
else
{
+ /* Search forward for the next appropriate symbol in
+ SECTION. Note that all the symbols are sorted
+ together into one big array, and that some sections
+ may have overlapping addresses. */
while (place < sorted_symcount
- /* ??? Why the test for != section? */
&& (sorted_syms[place]->section != section
|| (bfd_asymbol_value (sorted_syms[place])
<= bfd_asymbol_value (sym))))
@@ -1662,19 +1787,19 @@ disassemble_data (abfd)
nextsym = sorted_syms[place];
}
- if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i)
+ if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset)
{
- nextstop = bfd_asymbol_value (sym) - section->vma;
- if (nextstop > stop)
- nextstop = stop;
+ nextstop_offset = bfd_asymbol_value (sym) - section->vma;
+ if (nextstop_offset > stop_offset)
+ nextstop_offset = stop_offset;
}
else if (nextsym == NULL)
- nextstop = stop;
+ nextstop_offset = stop_offset;
else
{
- nextstop = bfd_asymbol_value (nextsym) - section->vma;
- if (nextstop > stop)
- nextstop = stop;
+ nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
+ if (nextstop_offset > stop_offset)
+ nextstop_offset = stop_offset;
}
/* If a symbol is explicitly marked as being an object
@@ -1682,7 +1807,7 @@ disassemble_data (abfd)
disassembling them. */
if (disassemble_all
|| sym == NULL
- || bfd_asymbol_value (sym) > section->vma + i
+ || bfd_asymbol_value (sym) > section->vma + addr_offset
|| ((sym->flags & BSF_OBJECT) == 0
&& (strstr (bfd_asymbol_name (sym), "gnu_compiled")
== NULL)
@@ -1693,10 +1818,10 @@ disassemble_data (abfd)
else
insns = false;
- disassemble_bytes (&disasm_info, disassemble_fn, insns, data, i,
- nextstop, &relpp, relppend);
+ disassemble_bytes (&disasm_info, disassemble_fn, insns, data,
+ addr_offset, nextstop_offset, &relpp, relppend);
- i = nextstop;
+ addr_offset = nextstop_offset;
sym = nextsym;
}
@@ -1750,15 +1875,16 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
stabsect = bfd_get_section_by_name (abfd, stabsect_name);
if (0 == stabsect)
{
- printf ("No %s section present\n\n", stabsect_name);
+ printf (_("No %s section present\n\n"), stabsect_name);
return false;
}
stabstrsect = bfd_get_section_by_name (abfd, strsect_name);
if (0 == stabstrsect)
{
- fprintf (stderr, "%s: %s has no %s section\n", program_name,
- bfd_get_filename (abfd), strsect_name);
+ non_fatal (_("%s has no %s section"),
+ bfd_get_filename (abfd), strsect_name);
+ exit_status = 1;
return false;
}
@@ -1770,22 +1896,24 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
if (! bfd_get_section_contents (abfd, stabsect, (PTR) stabs, 0, stab_size))
{
- fprintf (stderr, "%s: Reading %s section of %s failed: %s\n",
- program_name, stabsect_name, bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("Reading %s section of %s failed: %s"),
+ stabsect_name, bfd_get_filename (abfd),
+ bfd_errmsg (bfd_get_error ()));
free (stabs);
free (strtab);
+ exit_status = 1;
return false;
}
if (! bfd_get_section_contents (abfd, stabstrsect, (PTR) strtab, 0,
stabstr_size))
{
- fprintf (stderr, "%s: Reading %s section of %s failed: %s\n",
- program_name, strsect_name, bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("Reading %s section of %s failed: %s\n"),
+ strsect_name, bfd_get_filename (abfd),
+ bfd_errmsg (bfd_get_error ()));
free (stabs);
free (strtab);
+ exit_status = 1;
return false;
}
@@ -1814,7 +1942,7 @@ static void
print_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd;
const char *stabsect_name;
- const char *strsect_name;
+ const char *strsect_name ATTRIBUTE_UNUSED;
{
int i;
unsigned file_string_table_offset = 0, next_file_string_table_offset = 0;
@@ -1823,7 +1951,7 @@ print_section_stabs (abfd, stabsect_name, strsect_name)
stabp = stabs;
stabs_end = stabp + stab_size;
- printf ("Contents of %s section:\n\n", stabsect_name);
+ printf (_("Contents of %s section:\n\n"), stabsect_name);
printf ("Symnum n_type n_othr n_desc n_value n_strx String\n");
/* Loop through all symbols and print them.
@@ -1923,10 +2051,10 @@ dump_bfd_header (abfd)
{
char *comma = "";
- printf ("architecture: %s, ",
+ printf (_("architecture: %s, "),
bfd_printable_arch_mach (bfd_get_arch (abfd),
bfd_get_mach (abfd)));
- printf ("flags 0x%08x:\n", abfd->flags);
+ printf (_("flags 0x%08x:\n"), abfd->flags);
#define PF(x, y) if (abfd->flags & x) {printf("%s%s", comma, y); comma=", ";}
PF (HAS_RELOC, "HAS_RELOC");
@@ -1939,7 +2067,7 @@ dump_bfd_header (abfd)
PF (WP_TEXT, "WP_TEXT");
PF (D_PAGED, "D_PAGED");
PF (BFD_IS_RELAXABLE, "BFD_IS_RELAXABLE");
- printf ("\nstart address 0x");
+ printf (_("\nstart address 0x"));
printf_vma (abfd->start_address);
printf ("\n");
}
@@ -1951,23 +2079,12 @@ bfd *abfd;
bfd_print_private_bfd_data (abfd, stdout);
}
+/* Dump selected contents of ABFD */
+
static void
-display_bfd (abfd)
+dump_bfd (abfd)
bfd *abfd;
{
- char **matching;
-
- if (!bfd_check_format_matches (abfd, bfd_object, &matching))
- {
- bfd_nonfatal (bfd_get_filename (abfd));
- if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
- {
- list_matching_formats (matching);
- free (matching);
- }
- return;
- }
-
/* If we are adjusting section VMA's, change them all now. Changing
the BFD information is a hack. However, we must do it, or
bfd_find_nearest_line will not do the right thing. */
@@ -1982,7 +2099,7 @@ display_bfd (abfd)
}
}
- printf ("\n%s: file format %s\n", bfd_get_filename (abfd),
+ printf (_("\n%s: file format %s\n"), bfd_get_filename (abfd),
abfd->xvec->name);
if (dump_ar_hdrs)
print_arelt_descr (stdout, abfd, true);
@@ -2023,8 +2140,11 @@ display_bfd (abfd)
if (dhandle != NULL)
{
if (! print_debugging_info (stdout, dhandle))
- fprintf (stderr, "%s: printing debugging information failed\n",
- bfd_get_filename (abfd));
+ {
+ non_fatal (_("%s: printing debugging information failed"),
+ bfd_get_filename (abfd));
+ exit_status = 1;
+ }
}
}
if (syms)
@@ -2040,6 +2160,47 @@ display_bfd (abfd)
}
static void
+display_bfd (abfd)
+ bfd *abfd;
+{
+ char **matching;
+
+ if (bfd_check_format_matches (abfd, bfd_object, &matching))
+ {
+ dump_bfd (abfd);
+ return;
+ }
+
+ if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ {
+ nonfatal (bfd_get_filename (abfd));
+ list_matching_formats (matching);
+ free (matching);
+ return;
+ }
+
+ if (bfd_get_error () != bfd_error_file_not_recognized)
+ {
+ nonfatal (bfd_get_filename (abfd));
+ return;
+ }
+
+ if (bfd_check_format_matches (abfd, bfd_core, &matching))
+ {
+ dump_bfd (abfd);
+ return;
+ }
+
+ nonfatal (bfd_get_filename (abfd));
+
+ if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ {
+ list_matching_formats (matching);
+ free (matching);
+ }
+}
+
+static void
display_file (filename, target)
char *filename;
char *target;
@@ -2049,7 +2210,7 @@ display_file (filename, target)
file = bfd_openr (filename, target);
if (file == NULL)
{
- bfd_nonfatal (filename);
+ nonfatal (filename);
return;
}
@@ -2057,7 +2218,7 @@ display_file (filename, target)
{
bfd *last_arfile = NULL;
- printf ("In archive %s:\n", bfd_get_filename (file));
+ printf (_("In archive %s:\n"), bfd_get_filename (file));
for (;;)
{
bfd_set_error (bfd_error_no_error);
@@ -2066,9 +2227,7 @@ display_file (filename, target)
if (arfile == NULL)
{
if (bfd_get_error () != bfd_error_no_more_archived_files)
- {
- bfd_nonfatal (bfd_get_filename (file));
- }
+ nonfatal (bfd_get_filename (file));
break;
}
@@ -2097,8 +2256,9 @@ dump_data (abfd)
asection *section;
bfd_byte *data = 0;
bfd_size_type datasize = 0;
- bfd_size_type i;
- bfd_size_type start, stop;
+ bfd_size_type addr_offset;
+ bfd_size_type start_offset, stop_offset;
+ unsigned int opb = bfd_octets_per_byte (abfd);
for (section = abfd->sections; section != NULL; section =
section->next)
@@ -2110,7 +2270,7 @@ dump_data (abfd)
{
if (section->flags & SEC_HAS_CONTENTS)
{
- printf ("Contents of section %s:\n", section->name);
+ printf (_("Contents of section %s:\n"), section->name);
if (bfd_section_size (abfd, section) == 0)
continue;
@@ -2122,28 +2282,31 @@ dump_data (abfd)
if (start_address == (bfd_vma) -1
|| start_address < section->vma)
- start = 0;
+ start_offset = 0;
else
- start = start_address - section->vma;
+ start_offset = start_address - section->vma;
if (stop_address == (bfd_vma) -1)
- stop = bfd_section_size (abfd, section);
+ stop_offset = bfd_section_size (abfd, section) / opb;
else
{
if (stop_address < section->vma)
- stop = 0;
+ stop_offset = 0;
else
- stop = stop_address - section->vma;
- if (stop > bfd_section_size (abfd, section))
- stop = bfd_section_size (abfd, section);
+ stop_offset = stop_address - section->vma;
+ if (stop_offset > bfd_section_size (abfd, section) / opb)
+ stop_offset = bfd_section_size (abfd, section) / opb;
}
- for (i = start; i < stop; i += onaline)
+ for (addr_offset = start_offset;
+ addr_offset < stop_offset; addr_offset += onaline)
{
bfd_size_type j;
- printf (" %04lx ", (unsigned long int) (i + section->vma));
- for (j = i; j < i + onaline; j++)
+ printf (" %04lx ", (unsigned long int)
+ (addr_offset + section->vma));
+ for (j = addr_offset * opb;
+ j < addr_offset * opb + onaline; j++)
{
- if (j < stop)
+ if (j < stop_offset * opb)
printf ("%02x", (unsigned) (data[j]));
else
printf (" ");
@@ -2152,9 +2315,9 @@ dump_data (abfd)
}
printf (" ");
- for (j = i; j < i + onaline; j++)
+ for (j = addr_offset; j < addr_offset * opb + onaline; j++)
{
- if (j >= stop)
+ if (j >= stop_offset * opb)
printf (" ");
else
printf ("%c", isprint (data[j]) ? data[j] : '.');
@@ -2170,7 +2333,7 @@ dump_data (abfd)
/* Should perhaps share code and display with nm? */
static void
dump_symbols (abfd, dynamic)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
boolean dynamic;
{
asymbol **current;
@@ -2423,7 +2586,10 @@ dump_reloc_set (abfd, sec, relpp, relcount)
if (sym_name)
{
printf_vma (q->address);
- printf (" %-16s ", q->howto->name);
+ if (q->howto->name)
+ printf (" %-16s ", q->howto->name);
+ else
+ printf (" %-16d ", q->howto->type);
objdump_print_symname (abfd, (struct disassemble_info *) NULL,
*q->sym_ptr_ptr);
}
@@ -2483,14 +2649,14 @@ display_target_list ()
if (abfd == NULL)
{
- bfd_nonfatal (dummy_name);
+ nonfatal (dummy_name);
continue;
}
if (! bfd_set_format (abfd, bfd_object))
{
if (bfd_get_error () != bfd_error_invalid_operation)
- bfd_nonfatal (p->name);
+ nonfatal (p->name);
continue;
}
@@ -2536,7 +2702,7 @@ display_info_table (first, last)
if (abfd == NULL)
{
- bfd_nonfatal (p->name);
+ nonfatal (p->name);
ok = false;
}
@@ -2545,7 +2711,7 @@ display_info_table (first, last)
if (! bfd_set_format (abfd, bfd_object))
{
if (bfd_get_error () != bfd_error_invalid_operation)
- bfd_nonfatal (p->name);
+ nonfatal (p->name);
ok = false;
}
}
@@ -2613,7 +2779,7 @@ display_target_tables ()
static void
display_info ()
{
- printf ("BFD header file version %s\n", BFD_VERSION);
+ printf (_("BFD header file version %s\n"), BFD_VERSION);
display_target_list ();
display_target_tables ();
}
@@ -2627,6 +2793,12 @@ main (argc, argv)
char *target = default_target;
boolean seenflag = false;
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = *argv;
xmalloc_set_program_name (program_name);
@@ -2635,12 +2807,10 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "pib:m:VCdDlfahrRtTxsSj:wE:",
+ while ((c = getopt_long (argc, argv, "pib:m:M:VCdDlfahHrRtTxsSj:wE:zgG",
long_options, (int *) 0))
!= EOF)
{
- if (c != 'l' && c != OPTION_START_ADDRESS && c != OPTION_STOP_ADDRESS)
- seenflag = true;
switch (c)
{
case 0:
@@ -2648,106 +2818,138 @@ main (argc, argv)
case 'm':
machine = optarg;
break;
+ case 'M':
+ disassembler_options = optarg;
+ break;
case 'j':
only = optarg;
break;
case 'l':
- with_line_numbers = 1;
+ with_line_numbers = true;
break;
case 'b':
target = optarg;
break;
+ case 'C':
+ do_demangle = true;
+ break;
+ case 'w':
+ wide_output = true;
+ break;
+ case OPTION_ADJUST_VMA:
+ adjust_section_vma = parse_vma (optarg, "--adjust-vma");
+ break;
+ case OPTION_START_ADDRESS:
+ start_address = parse_vma (optarg, "--start-address");
+ break;
+ case OPTION_STOP_ADDRESS:
+ stop_address = parse_vma (optarg, "--stop-address");
+ break;
+ case 'E':
+ if (strcmp (optarg, "B") == 0)
+ endian = BFD_ENDIAN_BIG;
+ else if (strcmp (optarg, "L") == 0)
+ endian = BFD_ENDIAN_LITTLE;
+ else
+ {
+ non_fatal (_("unrecognized -E option"));
+ usage (stderr, 1);
+ }
+ break;
+ case OPTION_ENDIAN:
+ if (strncmp (optarg, "big", strlen (optarg)) == 0)
+ endian = BFD_ENDIAN_BIG;
+ else if (strncmp (optarg, "little", strlen (optarg)) == 0)
+ endian = BFD_ENDIAN_LITTLE;
+ else
+ {
+ non_fatal (_("unrecognized --endian type `%s'"), optarg);
+ usage (stderr, 1);
+ }
+ break;
+
case 'f':
dump_file_header = true;
+ seenflag = true;
break;
case 'i':
formats_info = true;
+ seenflag = true;
break;
case 'p':
- dump_private_headers = 1;
+ dump_private_headers = true;
+ seenflag = true;
break;
case 'x':
- dump_private_headers = 1;
- dump_symtab = 1;
- dump_reloc_info = 1;
+ dump_private_headers = true;
+ dump_symtab = true;
+ dump_reloc_info = true;
dump_file_header = true;
- dump_ar_hdrs = 1;
- dump_section_headers = 1;
+ dump_ar_hdrs = true;
+ dump_section_headers = true;
+ seenflag = true;
break;
case 't':
- dump_symtab = 1;
+ dump_symtab = true;
+ seenflag = true;
break;
case 'T':
- dump_dynamic_symtab = 1;
- break;
- case 'C':
- do_demangle = 1;
+ dump_dynamic_symtab = true;
+ seenflag = true;
break;
case 'd':
disassemble = true;
+ seenflag = true;
+ break;
+ case 'z':
+ disassemble_zeroes = true;
break;
case 'D':
- disassemble = disassemble_all = true;
+ disassemble = true;
+ disassemble_all = true;
+ seenflag = true;
break;
case 'S':
disassemble = true;
with_source_code = true;
+ seenflag = true;
+ break;
+ case 'g':
+ dump_debugging = 1;
+ seenflag = true;
+ break;
+ case 'G':
+ dump_stab_section_info = true;
+ seenflag = true;
break;
case 's':
- dump_section_contents = 1;
+ dump_section_contents = true;
+ seenflag = true;
break;
case 'r':
- dump_reloc_info = 1;
+ dump_reloc_info = true;
+ seenflag = true;
break;
case 'R':
- dump_dynamic_reloc_info = 1;
+ dump_dynamic_reloc_info = true;
+ seenflag = true;
break;
case 'a':
- dump_ar_hdrs = 1;
+ dump_ar_hdrs = true;
+ seenflag = true;
break;
case 'h':
- dump_section_headers = 1;
+ dump_section_headers = true;
+ seenflag = true;
break;
case 'H':
usage (stdout, 0);
+ seenflag = true;
case 'V':
- show_version = 1;
- break;
- case 'w':
- wide_output = 1;
- break;
- case OPTION_ADJUST_VMA:
- adjust_section_vma = parse_vma (optarg, "--adjust-vma");
- break;
- case OPTION_START_ADDRESS:
- start_address = parse_vma (optarg, "--start-address");
- break;
- case OPTION_STOP_ADDRESS:
- stop_address = parse_vma (optarg, "--stop-address");
- break;
- case 'E':
- if (strcmp (optarg, "B") == 0)
- endian = BFD_ENDIAN_BIG;
- else if (strcmp (optarg, "L") == 0)
- endian = BFD_ENDIAN_LITTLE;
- else
- {
- fprintf (stderr, "%s: unrecognized -E option\n", program_name);
- usage (stderr, 1);
- }
- break;
- case OPTION_ENDIAN:
- if (strncmp (optarg, "big", strlen (optarg)) == 0)
- endian = BFD_ENDIAN_BIG;
- else if (strncmp (optarg, "little", strlen (optarg)) == 0)
- endian = BFD_ENDIAN_LITTLE;
- else
- {
- fprintf (stderr, "%s: unrecognized --endian type `%s'\n",
- program_name, optarg);
- usage (stderr, 1);
- }
+ show_version = true;
+ seenflag = true;
break;
+
default:
usage (stderr, 1);
}
@@ -2757,12 +2959,10 @@ main (argc, argv)
print_version ("objdump");
if (seenflag == false)
- usage (stderr, 1);
+ usage (stderr, 2);
if (formats_info)
- {
- display_info ();
- }
+ display_info ();
else
{
if (optind == argc)
@@ -2774,5 +2974,5 @@ main (argc, argv)
END_PROGRESS (program_name);
- return 0;
+ return exit_status;
}
diff --git a/contrib/binutils/binutils/po/Make-in b/contrib/binutils/binutils/po/Make-in
new file mode 100644
index 0000000..0552db1
--- /dev/null
+++ b/contrib/binutils/binutils/po/Make-in
@@ -0,0 +1,251 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-info:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/binutils/po/POTFILES.in b/contrib/binutils/binutils/po/POTFILES.in
new file mode 100644
index 0000000..a3a0586
--- /dev/null
+++ b/contrib/binutils/binutils/po/POTFILES.in
@@ -0,0 +1,55 @@
+addr2line.c
+ar.c
+arsup.c
+arsup.h
+bucomm.c
+bucomm.h
+budbg.h
+coffdump.c
+coffgrok.c
+coffgrok.h
+debug.c
+debug.c
+debug.h
+dlltool.c
+dlltool.h
+dllwrap.c
+dyn-string.c
+dyn-string.h
+filemode.c
+ieee.c
+ieee.c
+is-ranlib.c
+is-strip.c
+maybe-ranlib.c
+maybe-strip.c
+nlmconv.c
+nlmconv.h
+nm.c
+not-ranlib.c
+not-strip.c
+objcopy.c
+objdump.c
+prdbg.c
+rdcoff.c
+rdcoff.c
+rddbg.c
+rddbg.c
+readelf.c
+rename.c
+resbin.c
+rescoff.c
+resrc.c
+resres.c
+size.c
+srconv.c
+stabs.c
+stabs.c
+strings.c
+sysdump.c
+version.c
+windres.c
+windres.h
+winduni.c
+winduni.h
+wrstabs.c
diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot
new file mode 100644
index 0000000..ed7ba0c
--- /dev/null
+++ b/contrib/binutils/binutils/po/binutils.pot
@@ -0,0 +1,3756 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2000-04-05 14:09+0930\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: addr2line.c:76
+#, c-format
+msgid ""
+"Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n"
+" [-e executable] [--exe=executable] [--demangle]\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
+#, c-format
+msgid "Report bugs to %s\n"
+msgstr ""
+
+#: addr2line.c:243
+#, c-format
+msgid "%s: can not get addresses from archive"
+msgstr ""
+
+#: ar.c:235
+#, c-format
+msgid "no entry %s in archive\n"
+msgstr ""
+
+#: ar.c:252
+#, c-format
+msgid ""
+"Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file "
+"file...\n"
+msgstr ""
+
+#: ar.c:255
+#, c-format
+msgid " %s -M [<mri-script]\n"
+msgstr ""
+
+#: ar.c:256
+msgid " commands:\n"
+msgstr ""
+
+#: ar.c:257
+msgid " d - delete file(s) from the archive\n"
+msgstr ""
+
+#: ar.c:258
+msgid " m[ab] - move file(s) in the archive\n"
+msgstr ""
+
+#: ar.c:259
+msgid " p - print file(s) found in the archive\n"
+msgstr ""
+
+#: ar.c:260
+msgid " q[f] - quick append file(s) to the archive\n"
+msgstr ""
+
+#: ar.c:261
+msgid ""
+" r[ab][f][u] - replace existing or insert new file(s) into the archive\n"
+msgstr ""
+
+#: ar.c:262
+msgid " t - display contents of archive\n"
+msgstr ""
+
+#: ar.c:263
+msgid " x[o] - extract file(s) from the archive\n"
+msgstr ""
+
+#: ar.c:264
+msgid " command specific modifiers:\n"
+msgstr ""
+
+#: ar.c:265
+msgid " [a] - put file(s) after [member-name]\n"
+msgstr ""
+
+#: ar.c:266
+msgid " [b] - put file(s) before [member-name] (same as [i])\n"
+msgstr ""
+
+#: ar.c:267
+msgid " [N] - use instance [count] of name\n"
+msgstr ""
+
+#: ar.c:268
+msgid " [f] - truncate inserted file names\n"
+msgstr ""
+
+#: ar.c:269
+msgid " [P] - use full path names when matching\n"
+msgstr ""
+
+#: ar.c:270
+msgid " [o] - preserve original dates\n"
+msgstr ""
+
+#: ar.c:271
+msgid ""
+" [u] - only replace files that are newer than current archive "
+"contents\n"
+msgstr ""
+
+#: ar.c:272
+msgid " generic modifiers:\n"
+msgstr ""
+
+#: ar.c:273
+msgid " [c] - do not warn if the library had to be created\n"
+msgstr ""
+
+#: ar.c:274
+msgid " [s] - create an archive index (cf. ranlib)\n"
+msgstr ""
+
+#: ar.c:275
+msgid " [S] - do not build a symbol table\n"
+msgstr ""
+
+#: ar.c:276
+msgid " [v] - be verbose\n"
+msgstr ""
+
+#: ar.c:277
+msgid " [V] - display the version number\n"
+msgstr ""
+
+#: ar.c:281
+#, c-format
+msgid "Usage: %s [-vV] archive\n"
+msgstr ""
+
+#: ar.c:466
+msgid "two different operation options specified"
+msgstr ""
+
+#: ar.c:541
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr ""
+
+#: ar.c:573
+msgid "no operation specified"
+msgstr ""
+
+#: ar.c:576
+msgid "`u' is only meaningful with the `r' option."
+msgstr ""
+
+#: ar.c:586
+msgid "`N' is only meaningful with the `x' and 'd' options."
+msgstr ""
+
+#: ar.c:589
+msgid "Value for `N' must be positive."
+msgstr ""
+
+#: ar.c:672
+#, c-format
+msgid "%s: internal error -- this option not implemented\n"
+msgstr ""
+
+#: ar.c:790 ar.c:841 ar.c:1283 objcopy.c:1104
+#, c-format
+msgid "internal stat error on %s"
+msgstr ""
+
+#: ar.c:810 ar.c:878
+#, c-format
+msgid "%s is not a valid archive"
+msgstr ""
+
+#: ar.c:846
+#, c-format
+msgid "stat returns negative size for %s"
+msgstr ""
+
+#: ar.c:967
+#, c-format
+msgid "%s is not an archive"
+msgstr ""
+
+#: ar.c:974
+#, c-format
+msgid "%s: creating %s\n"
+msgstr ""
+
+#: ar.c:1181
+#, c-format
+msgid "No member named `%s'\n"
+msgstr ""
+
+#: ar.c:1233
+#, c-format
+msgid "%s: no entry %s in archive %s!\n"
+msgstr ""
+
+#: ar.c:1395
+#, c-format
+msgid "%s: no archive map to update"
+msgstr ""
+
+#: arsup.c:87
+#, c-format
+msgid "No entry %s in archive.\n"
+msgstr ""
+
+#: arsup.c:119
+#, c-format
+msgid "Can't open file %s\n"
+msgstr ""
+
+#: arsup.c:167
+#, c-format
+msgid "%s: Can't open output archive %s\n"
+msgstr ""
+
+#: arsup.c:179
+#, c-format
+msgid "%s: Can't open input archive %s\n"
+msgstr ""
+
+#: arsup.c:185
+#, c-format
+msgid "%s: file %s is not an archive\n"
+msgstr ""
+
+#: arsup.c:226
+#, 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
+#, c-format
+msgid "%s: no open output archive\n"
+msgstr ""
+
+#: arsup.c:254 arsup.c:355 arsup.c:375
+#, c-format
+msgid "%s: can't open file %s\n"
+msgstr ""
+
+#: arsup.c:302 arsup.c:371 arsup.c:450
+#, c-format
+msgid "%s: can't find module file %s\n"
+msgstr ""
+
+#: arsup.c:402
+#, c-format
+msgid "Current open archive is %s\n"
+msgstr ""
+
+#: arsup.c:429
+#, c-format
+msgid "%s: no open archive\n"
+msgstr ""
+
+#: bucomm.c:139
+#, c-format
+msgid "can't set BFD default target to `%s': %s"
+msgstr ""
+
+#: bucomm.c:151
+#, c-format
+msgid "%s: Matching formats:"
+msgstr ""
+
+#: bucomm.c:168
+msgid "Supported targets:"
+msgstr ""
+
+#: bucomm.c:170
+#, c-format
+msgid "%s: supported targets:"
+msgstr ""
+
+#: bucomm.c:263
+#, c-format
+msgid "%s: bad number: %s"
+msgstr ""
+
+#: coffdump.c:94
+#, c-format
+msgid "#lines %d "
+msgstr ""
+
+#: coffdump.c:456 sysdump.c:719
+#, c-format
+msgid "%s: Print a human readable interpretation of a SYSROFF object file\n"
+msgstr ""
+
+#: coffdump.c:498 srconv.c:1940 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"
+msgstr ""
+
+#: debug.c:653
+msgid "debug_add_to_current_namespace: no current file"
+msgstr ""
+
+#: debug.c:736
+msgid "debug_start_source: no debug_set_filename call"
+msgstr ""
+
+#: debug.c:795
+msgid "debug_record_function: no debug_set_filename call"
+msgstr ""
+
+#: debug.c:851
+msgid "debug_record_parameter: no current function"
+msgstr ""
+
+#: debug.c:885
+msgid "debug_end_function: no current function"
+msgstr ""
+
+#: debug.c:891
+msgid "debug_end_function: some blocks were not closed"
+msgstr ""
+
+#: debug.c:921
+msgid "debug_start_block: no current block"
+msgstr ""
+
+#: debug.c:959
+msgid "debug_end_block: no current block"
+msgstr ""
+
+#: debug.c:966
+msgid "debug_end_block: attempt to close top level block"
+msgstr ""
+
+#: debug.c:992
+msgid "debug_record_line: no current unit"
+msgstr ""
+
+#. FIXME
+#: debug.c:1046
+msgid "debug_start_common_block: not implemented"
+msgstr ""
+
+#. FIXME
+#: debug.c:1058
+msgid "debug_end_common_block: not implemented"
+msgstr ""
+
+#. FIXME.
+#: debug.c:1152
+msgid "debug_record_label not implemented"
+msgstr ""
+
+#: debug.c:1178
+msgid "debug_record_variable: no current file"
+msgstr ""
+
+#: debug.c:1194
+msgid "debug_record_variable: no current block"
+msgstr ""
+
+#: debug.c:1764
+msgid "debug_make_undefined_type: unsupported kind"
+msgstr ""
+
+#: debug.c:1970
+msgid "debug_name_type: no current file"
+msgstr ""
+
+#: debug.c:2018
+msgid "debug_tag_type: no current file"
+msgstr ""
+
+#: debug.c:2026
+msgid "debug_tag_type: extra tag attempted"
+msgstr ""
+
+#: debug.c:2066
+#, c-format
+msgid "Warning: changing type size from %d to %d\n"
+msgstr ""
+
+#: debug.c:2090
+msgid "debug_find_named_type: no current compilation unit"
+msgstr ""
+
+#: debug.c:2197
+#, c-format
+msgid "debug_get_real_type: circular debug information for %s\n"
+msgstr ""
+
+#: debug.c:2662
+msgid "debug_write_type: illegal type encountered"
+msgstr ""
+
+#: dlltool.c:770 dlltool.c:794 dlltool.c:819
+#, c-format
+msgid "Internal error: Unknown machine type: %d\n"
+msgstr ""
+
+#: dlltool.c:856
+#, c-format
+msgid "Can't open def file: %s"
+msgstr ""
+
+#: dlltool.c:861
+#, c-format
+msgid "Processing def file: %s"
+msgstr ""
+
+#: dlltool.c:865
+msgid "Processed def file"
+msgstr ""
+
+#: dlltool.c:890
+#, c-format
+msgid "Syntax error in def file %s:%d\n"
+msgstr ""
+
+#: dlltool.c:923
+#, c-format
+msgid "NAME: %s base: %x"
+msgstr ""
+
+#: dlltool.c:926
+msgid "Can't have LIBRARY and NAME\n"
+msgstr ""
+
+#: dlltool.c:942
+#, 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
+#, c-format
+msgid "wait: %s"
+msgstr ""
+
+#: dlltool.c:1205 resrc.c:276
+#, c-format
+msgid "subprocess got fatal signal %d"
+msgstr ""
+
+#: dlltool.c:1211
+#, c-format
+msgid "%s exited with status %d\n"
+msgstr ""
+
+#: dlltool.c:1243
+#, c-format
+msgid "Sucking in info from %s section in %s\n"
+msgstr ""
+
+#: dlltool.c:1367
+#, c-format
+msgid "Excluding symbol: %s\n"
+msgstr ""
+
+#: dlltool.c:1462 dlltool.c:1473 nm.c:904 nm.c:915 objdump.c:444 objdump.c:461
+#, c-format
+msgid "%s: no symbols\n"
+msgstr ""
+
+#. FIXME: we ought to read in and block out the base relocations
+#: dlltool.c:1500
+#, c-format
+msgid "Done reading %s\n"
+msgstr ""
+
+#: dlltool.c:1511
+#, c-format
+msgid "Unable to open object file: %s"
+msgstr ""
+
+#: dlltool.c:1514
+#, c-format
+msgid "Scanning object file %s"
+msgstr ""
+
+#: dlltool.c:1529
+#, c-format
+msgid "Cannot produce mcore-elf dll from archive file: %s"
+msgstr ""
+
+#: dlltool.c:1621
+msgid "Adding exports to output file"
+msgstr ""
+
+#: dlltool.c:1666
+msgid "Added exports to output file"
+msgstr ""
+
+#: dlltool.c:1790
+#, c-format
+msgid "Generating export file: %s\n"
+msgstr ""
+
+#: dlltool.c:1795
+#, c-format
+msgid "Unable to open temporary assembler file: %s"
+msgstr ""
+
+#: dlltool.c:1798
+#, c-format
+msgid "Opened temporary file: %s"
+msgstr ""
+
+#: dlltool.c:2012
+msgid "Generated exports file"
+msgstr ""
+
+#: dlltool.c:2267
+#, c-format
+msgid "bfd_open failed open stub file: %s"
+msgstr ""
+
+#: dlltool.c:2270
+#, c-format
+msgid "Creating stub file: %s"
+msgstr ""
+
+#: dlltool.c:2657
+#, c-format
+msgid "failed to open temporary head file: %s"
+msgstr ""
+
+#: dlltool.c:2716
+#, c-format
+msgid "failed to open temporary tail file: %s"
+msgstr ""
+
+#: dlltool.c:2784
+#, c-format
+msgid "Can't open .lib file: %s"
+msgstr ""
+
+#: dlltool.c:2787
+#, c-format
+msgid "Creating library file: %s\n"
+msgstr ""
+
+#: dlltool.c:2846
+#, c-format
+msgid "cannot delete %s: %s\n"
+msgstr ""
+
+#: dlltool.c:2850
+msgid "Created lib file"
+msgstr ""
+
+#: dlltool.c:2955
+#, c-format
+msgid "Warning, ignoring duplicate EXPORT %s %d,%d\n"
+msgstr ""
+
+#: dlltool.c:2961
+#, c-format
+msgid "Error, duplicate EXPORT with oridinals: %s"
+msgstr ""
+
+#: dlltool.c:3088
+msgid "Processing definitions"
+msgstr ""
+
+#: dlltool.c:3126
+msgid "Processed definitions"
+msgstr ""
+
+#. xgetext:c-format
+#: dlltool.c:3137
+#, c-format
+msgid "Usage %s <options> <object-files>\n"
+msgstr ""
+
+#. xgetext:c-format
+#: dlltool.c:3139
+#, c-format
+msgid ""
+" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"
+msgstr ""
+
+#: dlltool.c:3140
+msgid ""
+" possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, "
+"ppc, thumb\n"
+msgstr ""
+
+#: dlltool.c:3141
+msgid " -e --output-exp <outname> Generate an export file.\n"
+msgstr ""
+
+#: dlltool.c:3142
+msgid " -l --output-lib <outname> Generate an interface library.\n"
+msgstr ""
+
+#: dlltool.c:3143
+msgid " -a --add-indirect Add dll indirects to export file.\n"
+msgstr ""
+
+#: dlltool.c:3144
+msgid ""
+" -D --dllname <name> Name of input dll to put into interface lib.\n"
+msgstr ""
+
+#: dlltool.c:3145
+msgid " -d --input-def <deffile> Name of .def file to be read in.\n"
+msgstr ""
+
+#: dlltool.c:3146
+msgid " -z --output-def <deffile> Name of .def file to be created.\n"
+msgstr ""
+
+#: dlltool.c:3147
+msgid " --export-all-symbols Export all symbols to .def\n"
+msgstr ""
+
+#: dlltool.c:3148
+msgid " --no-export-all-symbols Only export listed symbols\n"
+msgstr ""
+
+#: dlltool.c:3149
+msgid " --exclude-symbols <list> Don't export <list>\n"
+msgstr ""
+
+#: dlltool.c:3150
+msgid " --no-default-excludes Clear default exclude symbols\n"
+msgstr ""
+
+#: dlltool.c:3151
+msgid " -b --base-file <basefile> Read linker generated base file.\n"
+msgstr ""
+
+#: dlltool.c:3152
+msgid " -x --no-idata4 Don't generate idata$4 section.\n"
+msgstr ""
+
+#: dlltool.c:3153
+msgid " -c --no-idata5 Don't generate idata$5 section.\n"
+msgstr ""
+
+#: dlltool.c:3154
+msgid ""
+" -U --add-underscore Add underscores to symbols in interface "
+"library.\n"
+msgstr ""
+
+#: dlltool.c:3155
+msgid " -k --kill-at Kill @<n> from exported names.\n"
+msgstr ""
+
+#: dlltool.c:3156
+msgid " -A --add-stdcall-alias Add aliases without @<n>.\n"
+msgstr ""
+
+#: dlltool.c:3157
+msgid " -S --as <name> Use <name> for assembler.\n"
+msgstr ""
+
+#: dlltool.c:3158
+msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n"
+msgstr ""
+
+#: dlltool.c:3159
+msgid ""
+" -C --compat-implib Create backward compatible import library.\n"
+msgstr ""
+
+#: dlltool.c:3160
+msgid ""
+" -n --no-delete Keep temp files (repeat for extra "
+"preservation).\n"
+msgstr ""
+
+#: dlltool.c:3161
+msgid " -v --verbose Be verbose.\n"
+msgstr ""
+
+#: dlltool.c:3162
+msgid " -V --version Display the program version.\n"
+msgstr ""
+
+#: dlltool.c:3163
+msgid " -h --help Display this information.\n"
+msgstr ""
+
+#: dlltool.c:3165
+msgid ""
+" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"
+msgstr ""
+
+#: dlltool.c:3166
+msgid " -L --linker <name> Use <name> as the linker.\n"
+msgstr ""
+
+#: dlltool.c:3167
+msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n"
+msgstr ""
+
+#: dlltool.c:3311
+#, c-format
+msgid "Unable to open base-file: %s"
+msgstr ""
+
+#: dlltool.c:3340
+#, c-format
+msgid "Machine '%s' not supported"
+msgstr ""
+
+#: dlltool.c:3443 dllwrap.c:215
+#, c-format
+msgid "Tried file: %s"
+msgstr ""
+
+#: dlltool.c:3450 dllwrap.c:222
+#, c-format
+msgid "Using file: %s"
+msgstr ""
+
+#: ieee.c:316
+msgid "unexpected end of debugging information"
+msgstr ""
+
+#: ieee.c:411
+msgid "invalid number"
+msgstr ""
+
+#: ieee.c:470
+msgid "invalid string length"
+msgstr ""
+
+#: ieee.c:527 ieee.c:568
+msgid "expression stack overflow"
+msgstr ""
+
+#: ieee.c:547
+msgid "unsupported IEEE expression operator"
+msgstr ""
+
+#: ieee.c:562
+msgid "unknown section"
+msgstr ""
+
+#: ieee.c:583
+msgid "expression stack underflow"
+msgstr ""
+
+#: ieee.c:597
+msgid "expression stack mismatch"
+msgstr ""
+
+#: ieee.c:636
+msgid "unknown builtin type"
+msgstr ""
+
+#: ieee.c:781
+msgid "BCD float type not supported"
+msgstr ""
+
+#: ieee.c:927
+msgid "unexpected number"
+msgstr ""
+
+#: ieee.c:934
+msgid "unexpected record type"
+msgstr ""
+
+#: ieee.c:967
+msgid "blocks left on stack at end"
+msgstr ""
+
+#: ieee.c:1232
+msgid "unknown BB type"
+msgstr ""
+
+#: ieee.c:1241
+msgid "stack overflow"
+msgstr ""
+
+#: ieee.c:1266
+msgid "stack underflow"
+msgstr ""
+
+#: ieee.c:1380 ieee.c:1452 ieee.c:2151
+msgid "illegal variable index"
+msgstr ""
+
+#: ieee.c:1430
+msgid "illegal type index"
+msgstr ""
+
+#: ieee.c:1440 ieee.c:1477
+msgid "unknown TY code"
+msgstr ""
+
+#: ieee.c:1459
+msgid "undefined variable in TY"
+msgstr ""
+
+#. Pascal file name. FIXME.
+#: ieee.c:1870
+msgid "Pascal file name not supported"
+msgstr ""
+
+#: ieee.c:1918
+msgid "unsupported qualifer"
+msgstr ""
+
+#: ieee.c:2189
+msgid "undefined variable in ATN"
+msgstr ""
+
+#: ieee.c:2232
+msgid "unknown ATN type"
+msgstr ""
+
+#. Reserved for FORTRAN common.
+#: ieee.c:2354
+msgid "unsupported ATN11"
+msgstr ""
+
+#. We have no way to record this information. FIXME.
+#: ieee.c:2381
+msgid "unsupported ATN12"
+msgstr ""
+
+#: ieee.c:2441
+msgid "unexpected string in C++ misc"
+msgstr ""
+
+#: ieee.c:2454
+msgid "bad misc record"
+msgstr ""
+
+#: ieee.c:2497
+msgid "unrecognized C++ misc record"
+msgstr ""
+
+#: ieee.c:2614
+msgid "undefined C++ object"
+msgstr ""
+
+#: ieee.c:2648
+msgid "unrecognized C++ object spec"
+msgstr ""
+
+#: ieee.c:2684
+msgid "unsupported C++ object type"
+msgstr ""
+
+#: ieee.c:2694
+msgid "C++ base class not defined"
+msgstr ""
+
+#: ieee.c:2706 ieee.c:2811
+msgid "C++ object has no fields"
+msgstr ""
+
+#: ieee.c:2725
+msgid "C++ base class not found in container"
+msgstr ""
+
+#: ieee.c:2832
+msgid "C++ data member not found in container"
+msgstr ""
+
+#: ieee.c:2873 ieee.c:3023
+msgid "unknown C++ visibility"
+msgstr ""
+
+#: ieee.c:2907
+msgid "bad C++ field bit pos or size"
+msgstr ""
+
+#: ieee.c:2999
+msgid "bad type for C++ method function"
+msgstr ""
+
+#: ieee.c:3009
+msgid "no type information for C++ method function"
+msgstr ""
+
+#: ieee.c:3048
+msgid "C++ static virtual method"
+msgstr ""
+
+#: ieee.c:3143
+msgid "unrecognized C++ object overhead spec"
+msgstr ""
+
+#: ieee.c:3182
+msgid "undefined C++ vtable"
+msgstr ""
+
+#: ieee.c:3253
+msgid "C++ default values not in a function"
+msgstr ""
+
+#: ieee.c:3293
+msgid "unrecognized C++ default type"
+msgstr ""
+
+#: ieee.c:3324
+msgid "reference parameter is not a pointer"
+msgstr ""
+
+#: ieee.c:3409
+msgid "unrecognized C++ reference type"
+msgstr ""
+
+#: ieee.c:3491
+msgid "C++ reference not found"
+msgstr ""
+
+#: ieee.c:3499
+msgid "C++ reference is not pointer"
+msgstr ""
+
+#: ieee.c:3528 ieee.c:3536
+msgid "missing required ASN"
+msgstr ""
+
+#: ieee.c:3566 ieee.c:3574
+msgid "missing required ATN65"
+msgstr ""
+
+#: ieee.c:3588
+msgid "bad ATN65 record"
+msgstr ""
+
+#: ieee.c:4235
+msgid "IEEE numeric overflow: 0x"
+msgstr ""
+
+#: ieee.c:4281
+#, c-format
+msgid "IEEE string length overflow: %u\n"
+msgstr ""
+
+#: ieee.c:5315
+#, c-format
+msgid "IEEE unsupported integer type size %u\n"
+msgstr ""
+
+#: ieee.c:5351
+#, c-format
+msgid "IEEE unsupported float type size %u\n"
+msgstr ""
+
+#: ieee.c:5387
+#, 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"
+msgstr ""
+
+#: nlmconv.c:325
+#, c-format
+msgid "%s: input file named both on command line and with INPUT\n"
+msgstr ""
+
+#: nlmconv.c:336
+#, c-format
+msgid "%s: no input file\n"
+msgstr ""
+
+#: nlmconv.c:366
+#, c-format
+msgid "%s: no name for output file\n"
+msgstr ""
+
+#: nlmconv.c:381
+#, c-format
+msgid "%s: warning:input and output formats are not compatible\n"
+msgstr ""
+
+#: nlmconv.c:411
+msgid "make .bss section"
+msgstr ""
+
+#: nlmconv.c:420
+msgid "make .nlmsections section"
+msgstr ""
+
+#: nlmconv.c:422
+msgid "set .nlmsections flags"
+msgstr ""
+
+#: nlmconv.c:450
+msgid "set .bss vma"
+msgstr ""
+
+#: nlmconv.c:457
+msgid "set .data size"
+msgstr ""
+
+#: nlmconv.c:638
+#, c-format
+msgid "%s: warning: symbol %s imported but not in import list\n"
+msgstr ""
+
+#: nlmconv.c:658
+msgid "set start address"
+msgstr ""
+
+#: nlmconv.c:707
+#, c-format
+msgid "%s: warning: START procedure %s not defined\n"
+msgstr ""
+
+#: nlmconv.c:710
+#, c-format
+msgid "%s: warning: EXIT procedure %s not defined\n"
+msgstr ""
+
+#: nlmconv.c:714
+#, c-format
+msgid "%s: warning: CHECK procedure %s not defined\n"
+msgstr ""
+
+#: nlmconv.c:736 nlmconv.c:928
+msgid "custom section"
+msgstr ""
+
+#: nlmconv.c:757 nlmconv.c:960
+msgid "help section"
+msgstr ""
+
+#: nlmconv.c:779 nlmconv.c:979
+msgid "message section"
+msgstr ""
+
+#: nlmconv.c:795 nlmconv.c:1012
+msgid "module section"
+msgstr ""
+
+#: nlmconv.c:815 nlmconv.c:1029
+msgid "rpc section"
+msgstr ""
+
+#: nlmconv.c:852
+#, c-format
+msgid "%s:%s: warning: shared libraries can not have uninitialized data\n"
+msgstr ""
+
+#: nlmconv.c:873 nlmconv.c:1049
+msgid "shared section"
+msgstr ""
+
+#: nlmconv.c:881
+#, c-format
+msgid "%s: warning: No version number given\n"
+msgstr ""
+
+#: nlmconv.c:922 nlmconv.c:954 nlmconv.c:973 nlmconv.c:1023 nlmconv.c:1043
+#, c-format
+msgid "%s:%s: read: %s\n"
+msgstr ""
+
+#: nlmconv.c:946
+#, c-format
+msgid "%s: warning: MAP and FULLMAP are not supported; try ld -M\n"
+msgstr ""
+
+#: nlmconv.c:1121
+#, c-format
+msgid "%s: Convert an object file into a NetWare Loadable Module\n"
+msgstr ""
+
+#: nlmconv.c:1133
+#, c-format
+msgid ""
+"Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n"
+" [--input-target=bfdname] [--output-target=bfdname]\n"
+" [--header-file=file] [--linker=linker] [--debug]\n"
+" [--help] [--version]\n"
+" [in-file [out-file]]\n"
+msgstr ""
+
+#: nlmconv.c:1173
+#, c-format
+msgid "%s: support not compiled in for %s\n"
+msgstr ""
+
+#: nlmconv.c:1216
+msgid "make section"
+msgstr ""
+
+#: nlmconv.c:1230
+msgid "set section size"
+msgstr ""
+
+#: nlmconv.c:1236
+msgid "set section alignment"
+msgstr ""
+
+#: nlmconv.c:1240
+msgid "set section flags"
+msgstr ""
+
+#: nlmconv.c:1251
+msgid "set .nlmsections size"
+msgstr ""
+
+#: nlmconv.c:1339 nlmconv.c:1347 nlmconv.c:1356 nlmconv.c:1361
+msgid "set .nlmsection contents"
+msgstr ""
+
+#: nlmconv.c:1864
+msgid "stub section sizes"
+msgstr ""
+
+#: nlmconv.c:1913
+msgid "writing stub"
+msgstr ""
+
+#: nlmconv.c:2003
+#, c-format
+msgid "%s: unresolved PC relative reloc against %s\n"
+msgstr ""
+
+#: nlmconv.c:2068
+#, c-format
+msgid "%s: overflow when adjusting relocation against %s\n"
+msgstr ""
+
+#: nlmconv.c:2191
+#, c-format
+msgid "%s: execution of %s failed: "
+msgstr ""
+
+#: nlmconv.c:2206
+#, c-format
+msgid "%s: Execution of %s failed\n"
+msgstr ""
+
+#: nm.c:294
+#, c-format
+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"
+msgstr ""
+
+#: nm.c:339
+#, c-format
+msgid "%s: %s: invalid radix\n"
+msgstr ""
+
+#: nm.c:365
+#, c-format
+msgid "%s: %s: invalid output format\n"
+msgstr ""
+
+#: nm.c:492
+#, c-format
+msgid "%s: data size %ld\n"
+msgstr ""
+
+#: nm.c:1283
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Undefined symbols from %s:\n"
+"\n"
+msgstr ""
+
+#: nm.c:1285
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Symbols from %s:\n"
+"\n"
+msgstr ""
+
+#: nm.c:1286 nm.c:1340
+msgid ""
+"Name Value Class Type Size Line "
+"Section\n"
+"\n"
+msgstr ""
+
+#: nm.c:1337
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Undefined symbols from %s[%s]:\n"
+"\n"
+msgstr ""
+
+#: nm.c:1339
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Symbols from %s[%s]:\n"
+"\n"
+msgstr ""
+
+#: nm.c:1510
+msgid ""
+"\n"
+"Archive index:\n"
+msgstr ""
+
+#: objcopy.c:309
+#, c-format
+msgid "Usage: %s <switches> in-file [out-file]\n"
+msgstr ""
+
+#: objcopy.c:310 objcopy.c:368
+msgid " The switches are:\n"
+msgstr ""
+
+#: objcopy.c:311
+msgid ""
+" -I --input-target <bfdname> Assume input file is in format <bfdname>\n"
+" -O --output-target <bfdname> Create an output file in format "
+"<bfdname>\n"
+" -F --target <bfdname> Set both input and output format to "
+"<bfdname>\n"
+" --debugging Convert debugging information, if "
+"possible\n"
+" -p --preserve-dates Copy modified/access timestamps to the "
+"output\n"
+" -j --only-section <name> Only copy section <name> into the output\n"
+" -R --remove-section <name> Remove section <name> from the output\n"
+" -S --strip-all Remove all symbol and relocation "
+"information\n"
+" -g --strip-debug Remove all debugging symbols\n"
+" --strip-unneeded Remove all symbols not needed by "
+"relocations\n"
+" -N --strip-symbol <name> Do not copy symbol <name>\n"
+" -K --keep-symbol <name> Only copy symbol <name>\n"
+" -L --localize-symbol <name> Force symbol <name> to be marked as a "
+"local\n"
+" -W --weaken-symbol <name> Force symbol <name> to be marked as a "
+"weak\n"
+" --weaken Force all global symbols to be marked as "
+"weak\n"
+" -x --discard-all Remove all non-global symbols\n"
+" -X --discard-locals Remove any compiler-generated symbols\n"
+" -i --interleave <number> Only copy one out of every <number> "
+"bytes\n"
+" -b --byte <num> Select byte <num> in every interleaved "
+"block\n"
+" --gap-fill <val> Fill gaps between sections with <val>\n"
+" --pad-to <addr> Pad the last section up to address "
+"<addr>\n"
+" --set-start <addr> Set the start address to <addr>\n"
+" {--change-start|--adjust-start} <incr>\n"
+" Add <incr> to the start address\n"
+" {--change-addresses|--adjust-vma} <incr>\n"
+" Add <incr> to LMA, VMA and start "
+"addresses\n"
+" {--change-section-address|--adjust-section-vma} <name>{=|+|-}<val>\n"
+" Change LMA and VMA of section <name> by "
+"<val>\n"
+" --change-section-lma <name>{=|+|-}<val>\n"
+" Change the LMA of section <name> by "
+"<val>\n"
+" --change-section-vma <name>{=|+|-}<val>\n"
+" Change the VMA of section <name> by "
+"<val>\n"
+" {--[no-]change-warnings|--[no-]adjust-warnings}\n"
+" Warn if a named section does not exist\n"
+" --set-section-flags <name>=<flags>\n"
+" Set section <name>'s properties to "
+"<flags>\n"
+" --add-section <name>=<file> Add section <name> found in <file> to "
+"output\n"
+" --change-leading-char Force output format's leading character "
+"style\n"
+" --remove-leading-char Remove leading character from global "
+"symbols\n"
+" --redefine-sym <old>=<new> Redefine symbol name <old> to <new>\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
+#, c-format
+msgid "Usage: %s <switches> in-file(s)\n"
+msgstr ""
+
+#: objcopy.c:369
+msgid ""
+" -I --input-target <bfdname> Assume input file is in format <bfdname>\n"
+" -O --output-target <bfdname> Create an output file in format "
+"<bfdname>\n"
+" -F --target <bfdname> Set both input and output format to "
+"<bfdname>\n"
+" -p --preserve-dates Copy modified/access timestamps to the "
+"output\n"
+" -R --remove-section <name> Remove section <name> from the output\n"
+" -s --strip-all Remove all symbol and relocation "
+"information\n"
+" -g -S --strip-debug Remove all debugging symbols\n"
+" --strip-unneeded Remove all symbols not needed by "
+"relocations\n"
+" -N --strip-symbol <name> Do not copy symbol <name>\n"
+" -K --keep-symbol <name> Only copy symbol <name>\n"
+" -x --discard-all Remove all non-global symbols\n"
+" -X --discard-locals Remove any compiler-generated symbols\n"
+" -v --verbose List all object files modified\n"
+" -V --version Display this program's version number\n"
+" -h --help Display this output\n"
+" -o <file> Place stripped output into <file>\n"
+msgstr ""
+
+#: objcopy.c:439
+#, c-format
+msgid "unrecognized section flag `%s'"
+msgstr ""
+
+#: objcopy.c:440
+#, c-format
+msgid "supported flags: %s"
+msgstr ""
+
+#: objcopy.c:692
+#, c-format
+msgid "%s: Multiple redefinition of symbol \"%s\""
+msgstr ""
+
+#: objcopy.c:699
+#, c-format
+msgid "%s: Symbol \"%s\" is target of more than one redefinition"
+msgstr ""
+
+#: objcopy.c:753
+#, c-format
+msgid "copy from %s(%s) to %s(%s)\n"
+msgstr ""
+
+#: objcopy.c:772
+#, c-format
+msgid "Warning: Output file cannot represent architecture %s"
+msgstr ""
+
+#: objcopy.c:799
+#, c-format
+msgid "can't create section `%s': %s"
+msgstr ""
+
+#: objcopy.c:885
+#, c-format
+msgid "Can't fill gap after %s: %s"
+msgstr ""
+
+#: objcopy.c:910
+#, c-format
+msgid "Can't add padding to %s: %s"
+msgstr ""
+
+#: objcopy.c:1048
+#, c-format
+msgid "%s: error copying private BFD data: %s"
+msgstr ""
+
+#: objcopy.c:1082
+#, c-format
+msgid "cannot mkdir %s for archive copying (error: %s)"
+msgstr ""
+
+#: objcopy.c:1351
+#, c-format
+msgid "%s: section `%s': error in %s: %s"
+msgstr ""
+
+#: objcopy.c:1625
+#, c-format
+msgid "%s: can't create debugging section: %s"
+msgstr ""
+
+#: objcopy.c:1640
+#, c-format
+msgid "%s: can't set debugging section contents: %s"
+msgstr ""
+
+#: objcopy.c:1649
+#, c-format
+msgid "%s: don't know how to write debugging information for %s"
+msgstr ""
+
+#: objcopy.c:1754
+#, c-format
+msgid "%s: cannot stat: %s"
+msgstr ""
+
+#: objcopy.c:1804
+msgid "byte number must be non-negative"
+msgstr ""
+
+#: objcopy.c:1810
+msgid "interleave must be positive"
+msgstr ""
+
+#: objcopy.c:1830 objcopy.c:1838
+#, c-format
+msgid "%s both copied and removed"
+msgstr ""
+
+#: objcopy.c:1907 objcopy.c:1977 objcopy.c:2078 objcopy.c:2106
+#, c-format
+msgid "bad format for %s"
+msgstr ""
+
+#: objcopy.c:1910
+#, c-format
+msgid "cannot stat: %s: %s"
+msgstr ""
+
+#: objcopy.c:1928
+#, c-format
+msgid "cannot open: %s: %s"
+msgstr ""
+
+#: objcopy.c:1932
+#, c-format
+msgid "%s: fread failed"
+msgstr ""
+
+#: objcopy.c:2046
+#, c-format
+msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
+msgstr ""
+
+#: objcopy.c:2140
+msgid "byte number must be less than interleave"
+msgstr ""
+
+#: objcopy.c:2159
+#, c-format
+msgid "Cannot stat: %s: %s"
+msgstr ""
+
+#: objcopy.c:2199 objcopy.c:2213
+#, c-format
+msgid "%s %s%c0x%s never used"
+msgstr ""
+
+#: objdump.c:229
+#, c-format
+msgid "Usage: %s <switches> file(s)\n"
+msgstr ""
+
+#: objdump.c:230
+msgid " At least one of the following switches must be given:\n"
+msgstr ""
+
+#: objdump.c:231
+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 "
+"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 "
+"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 "
+"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"
+msgstr ""
+
+#: objdump.c:253
+msgid ""
+"\n"
+" The following switches are optional:\n"
+msgstr ""
+
+#: objdump.c:254
+msgid ""
+" -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 <o> Pass text <o> 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 "
+"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 "
+"disassembling\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 <offset> Add <offset> to all displayed section "
+"addresses\n"
+"\n"
+msgstr ""
+
+#: objdump.c:420
+msgid "Sections:\n"
+msgstr ""
+
+#: objdump.c:423
+msgid "Idx Name Size VMA LMA File off Algn"
+msgstr ""
+
+#: objdump.c:425
+msgid ""
+"Idx Name Size VMA LMA File off "
+"Algn"
+msgstr ""
+
+#: objdump.c:429
+msgid " Flags"
+msgstr ""
+
+#: objdump.c:479
+#, c-format
+msgid "%s: %s: not a dynamic object\n"
+msgstr ""
+
+#: objdump.c:496
+#, c-format
+msgid "%s: %s: No dynamic symbols\n"
+msgstr ""
+
+#: objdump.c:1200
+msgid "Out of virtual memory\n"
+msgstr ""
+
+#: objdump.c:1611
+#, c-format
+msgid "%s: Can't use supplied machine %s\n"
+msgstr ""
+
+#: objdump.c:1632
+#, c-format
+msgid "%s: Can't disassemble for architecture %s\n"
+msgstr ""
+
+#: objdump.c:1709
+#, c-format
+msgid "Disassembly of section %s:\n"
+msgstr ""
+
+#: objdump.c:1883
+#, c-format
+msgid ""
+"No %s section present\n"
+"\n"
+msgstr ""
+
+#: objdump.c:1890
+#, c-format
+msgid "%s: %s has no %s section\n"
+msgstr ""
+
+#: objdump.c:1904 objdump.c:1916
+#, c-format
+msgid "%s: Reading %s section of %s failed: %s\n"
+msgstr ""
+
+#: objdump.c:1959
+#, c-format
+msgid ""
+"Contents of %s section:\n"
+"\n"
+msgstr ""
+
+#: objdump.c:2059
+#, c-format
+msgid "architecture: %s, "
+msgstr ""
+
+#: objdump.c:2062
+#, c-format
+msgid "flags 0x%08x:\n"
+msgstr ""
+
+#: objdump.c:2075
+msgid ""
+"\n"
+"start address 0x"
+msgstr ""
+
+#: objdump.c:2107
+#, c-format
+msgid ""
+"\n"
+"%s: file format %s\n"
+msgstr ""
+
+#: objdump.c:2150
+#, c-format
+msgid "%s: printing debugging information failed\n"
+msgstr ""
+
+#: objdump.c:2227
+#, c-format
+msgid "In archive %s:\n"
+msgstr ""
+
+#: objdump.c:2279
+#, c-format
+msgid "Contents of section %s:\n"
+msgstr ""
+
+#: objdump.c:2788
+#, c-format
+msgid "BFD header file version %s\n"
+msgstr ""
+
+#: objdump.c:2861
+#, c-format
+msgid "%s: unrecognized -E option\n"
+msgstr ""
+
+#: objdump.c:2873
+#, c-format
+msgid "%s: unrecognized --endian type `%s'\n"
+msgstr ""
+
+#: rdcoff.c:204
+#, c-format
+msgid "%s: parse_coff_type: Bad type code 0x%x\n"
+msgstr ""
+
+#: rdcoff.c:423 rdcoff.c:531 rdcoff.c:712
+#, c-format
+msgid "%s: bfd_coff_get_syment failed: %s\n"
+msgstr ""
+
+#: rdcoff.c:439 rdcoff.c:732
+#, c-format
+msgid "%s: bfd_coff_get_auxent failed: %s\n"
+msgstr ""
+
+#: rdcoff.c:798
+#, c-format
+msgid "%s: %ld: .bf without preceding function\n"
+msgstr ""
+
+#: rdcoff.c:848
+#, c-format
+msgid "%s: %ld: unexpected .ef\n"
+msgstr ""
+
+#: rddbg.c:87
+#, c-format
+msgid "%s: no recognized debugging information\n"
+msgstr ""
+
+#: rddbg.c:410
+msgid "Last stabs entries before error:\n"
+msgstr ""
+
+#: readelf.c:303 readelf.c:329
+#, c-format
+msgid "%s: Error: "
+msgstr ""
+
+#: readelf.c:315 readelf.c:344
+#, c-format
+msgid "%s: Warning: "
+msgstr ""
+
+#: readelf.c:394 readelf.c:532
+#, c-format
+msgid "Unhandled data length: %d\n"
+msgstr ""
+
+#: readelf.c:591
+msgid "Don't know about relocations on this machine architecture\n"
+msgstr ""
+
+#: readelf.c:631 readelf.c:660 readelf.c:692 readelf.c:720
+msgid "out of memory parsing relocs"
+msgstr ""
+
+#: readelf.c:738
+msgid ""
+" Offset Info Type Symbol's Value Symbol's Name "
+"Addend\n"
+msgstr ""
+
+#: readelf.c:741
+msgid " Offset Info Type Symbol's Value Symbol's Name\n"
+msgstr ""
+
+#: readelf.c:885 readelf.c:887
+#, c-format
+msgid "unrecognised: %-7lx"
+msgstr ""
+
+#: readelf.c:912
+#, c-format
+msgid "<string table index %3ld>"
+msgstr ""
+
+#: readelf.c:1119
+#, c-format
+msgid "Processor Specific: %lx"
+msgstr ""
+
+#: readelf.c:1138
+#, c-format
+msgid "Operating System specific: %lx"
+msgstr ""
+
+#: readelf.c:1141 readelf.c:1506
+#, c-format
+msgid "<unknown>: %lx"
+msgstr ""
+
+#: readelf.c:1155
+msgid "NONE (None)"
+msgstr ""
+
+#: readelf.c:1156
+msgid "REL (Relocatable file)"
+msgstr ""
+
+#: readelf.c:1157
+msgid "EXEC (Executable file)"
+msgstr ""
+
+#: readelf.c:1158
+msgid "DYN (Shared object file)"
+msgstr ""
+
+#: readelf.c:1159
+msgid "CORE (Core file)"
+msgstr ""
+
+#: readelf.c:1163
+#, c-format
+msgid "Processor Specific: (%x)"
+msgstr ""
+
+#: readelf.c:1165
+#, c-format
+msgid "OS Specific: (%x)"
+msgstr ""
+
+#: readelf.c:1167 readelf.c:1244 readelf.c:1638
+#, c-format
+msgid "<unknown>: %x"
+msgstr ""
+
+#: readelf.c:1180
+msgid "None"
+msgstr ""
+
+#: readelf.c:1676
+msgid "Usage: readelf {options} elf-file(s)\n"
+msgstr ""
+
+#: readelf.c:1677
+msgid " Options are:\n"
+msgstr ""
+
+#: readelf.c:1678
+msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"
+msgstr ""
+
+#: readelf.c:1679
+msgid " -h or --file-header Display the ELF file header\n"
+msgstr ""
+
+#: readelf.c:1680
+msgid " -l or --program-headers or --segments\n"
+msgstr ""
+
+#: readelf.c:1681
+msgid " Display the program headers\n"
+msgstr ""
+
+#: readelf.c:1682
+msgid " -S or --section-headers or --sections\n"
+msgstr ""
+
+#: readelf.c:1683
+msgid " Display the sections' header\n"
+msgstr ""
+
+#: readelf.c:1684
+msgid " -e or --headers Equivalent to: -h -l -S\n"
+msgstr ""
+
+#: readelf.c:1685
+msgid " -s or --syms or --symbols Display the symbol table\n"
+msgstr ""
+
+#: readelf.c:1686
+msgid " -n or --notes Display the core notes (if present)\n"
+msgstr ""
+
+#: readelf.c:1687
+msgid " -r or --relocs Display the relocations (if present)\n"
+msgstr ""
+
+#: readelf.c:1688
+msgid " -d or --dynamic Display the dynamic segment (if present)\n"
+msgstr ""
+
+#: readelf.c:1689
+msgid " -V or --version-info Display the version sections (if present)\n"
+msgstr ""
+
+#: readelf.c:1690
+msgid ""
+" -A or --arch-specific Display architecture specific information (if "
+"any).\n"
+msgstr ""
+
+#: readelf.c:1691
+msgid ""
+" -D or --use-dynamic Use the dynamic section info when displaying "
+"symbols\n"
+msgstr ""
+
+#: readelf.c:1692
+msgid " -x <number> or --hex-dump=<number>\n"
+msgstr ""
+
+#: readelf.c:1693
+msgid " Dump the contents of section <number>\n"
+msgstr ""
+
+#: readelf.c:1694
+msgid " -w[liapr] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]\n"
+msgstr ""
+
+#: readelf.c:1695
+msgid ""
+" Display the contents of DWARF2 debug sections\n"
+msgstr ""
+
+#: readelf.c:1697
+msgid " -i <number> or --instruction-dump=<number>\n"
+msgstr ""
+
+#: readelf.c:1698
+msgid ""
+" Disassemble the contents of section <number>\n"
+msgstr ""
+
+#: readelf.c:1700
+msgid " -I or --histogram Display histogram of bucket list lengths\n"
+msgstr ""
+
+#: readelf.c:1701
+msgid " -v or --version Display the version number of readelf\n"
+msgstr ""
+
+#: readelf.c:1702
+msgid " -H or --help Display this information\n"
+msgstr ""
+
+#: readelf.c:1720
+msgid "Out of memory allocating dump request table."
+msgstr ""
+
+#: readelf.c:1855
+#, c-format
+msgid "Unrecognised debug option '%s'\n"
+msgstr ""
+
+#: readelf.c:1880
+#, c-format
+msgid "Invalid option '-%c'\n"
+msgstr ""
+
+#: readelf.c:1893
+msgid "Nothing to do.\n"
+msgstr ""
+
+#: readelf.c:1906 readelf.c:1923 readelf.c:3493
+msgid "none"
+msgstr ""
+
+#: readelf.c:1907
+msgid "ELF32"
+msgstr ""
+
+#: readelf.c:1908
+msgid "ELF64"
+msgstr ""
+
+#: readelf.c:1910 readelf.c:1927 readelf.c:1946
+#, c-format
+msgid "<unknown: %x>"
+msgstr ""
+
+#: readelf.c:1924
+msgid "2's complement, little endian"
+msgstr ""
+
+#: readelf.c:1925
+msgid "2's complement, big endian"
+msgstr ""
+
+#: readelf.c:1940
+msgid "UNIX - System V"
+msgstr ""
+
+#: readelf.c:1941
+msgid "UNIX - HP-UX"
+msgstr ""
+
+#: readelf.c:1942
+msgid "UNIX - Linux"
+msgstr ""
+
+#: readelf.c:1943
+msgid "Standalone App"
+msgstr ""
+
+#: readelf.c:1944
+msgid "ARM"
+msgstr ""
+
+#: readelf.c:1961
+msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
+msgstr ""
+
+#: readelf.c:1969
+msgid "ELF Header:\n"
+msgstr ""
+
+#: readelf.c:1970
+msgid " Magic: "
+msgstr ""
+
+#: readelf.c:1974
+#, c-format
+msgid " Class: %s\n"
+msgstr ""
+
+#: readelf.c:1976
+#, c-format
+msgid " Data: %s\n"
+msgstr ""
+
+#: readelf.c:1978
+#, c-format
+msgid " Version: %d %s\n"
+msgstr ""
+
+#: readelf.c:1985
+#, c-format
+msgid " OS/ABI: %s\n"
+msgstr ""
+
+#: readelf.c:1987
+#, c-format
+msgid " ABI Version: %d\n"
+msgstr ""
+
+#: readelf.c:1989
+#, c-format
+msgid " Type: %s\n"
+msgstr ""
+
+#: readelf.c:1991
+#, c-format
+msgid " Machine: %s\n"
+msgstr ""
+
+#: readelf.c:1993
+#, c-format
+msgid " Version: 0x%lx\n"
+msgstr ""
+
+#: readelf.c:1996
+msgid " Entry point address: "
+msgstr ""
+
+#: readelf.c:1998
+msgid ""
+"\n"
+" Start of program headers: "
+msgstr ""
+
+#: readelf.c:2000
+msgid ""
+" (bytes into file)\n"
+" Start of section headers: "
+msgstr ""
+
+#: readelf.c:2002
+msgid " (bytes into file)\n"
+msgstr ""
+
+#: readelf.c:2004
+#, c-format
+msgid " Flags: 0x%lx%s\n"
+msgstr ""
+
+#: readelf.c:2007
+#, c-format
+msgid " Size of this header: %ld (bytes)\n"
+msgstr ""
+
+#: readelf.c:2009
+#, c-format
+msgid " Size of program headers: %ld (bytes)\n"
+msgstr ""
+
+#: readelf.c:2011
+#, c-format
+msgid " Number of program headers: %ld\n"
+msgstr ""
+
+#: readelf.c:2013
+#, c-format
+msgid " Size of section headers: %ld (bytes)\n"
+msgstr ""
+
+#: readelf.c:2015
+#, c-format
+msgid " Number of section headers: %ld\n"
+msgstr ""
+
+#: readelf.c:2017
+#, c-format
+msgid " Section header string table index: %ld\n"
+msgstr ""
+
+#: readelf.c:2102
+msgid ""
+"\n"
+"There are no program headers in this file.\n"
+msgstr ""
+
+#: readelf.c:2108
+#, c-format
+msgid ""
+"\n"
+"Elf file type is %s\n"
+msgstr ""
+
+#: readelf.c:2109
+msgid "Entry point "
+msgstr ""
+
+#: readelf.c:2111
+#, 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
+msgid "Out of memory\n"
+msgstr ""
+
+#: readelf.c:2140
+#, c-format
+msgid ""
+"\n"
+"Program Header%s:\n"
+msgstr ""
+
+#: readelf.c:2144
+msgid ""
+" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
+msgstr ""
+
+#: readelf.c:2148
+msgid " Type Offset VirtAddr PhysAddr\n"
+msgstr ""
+
+#: readelf.c:2150
+msgid " FileSiz MemSiz Flags Align\n"
+msgstr ""
+
+#: readelf.c:2208
+msgid "more than one dynamic segment\n"
+msgstr ""
+
+#: readelf.c:2216
+msgid "Unable to find program interpreter name\n"
+msgstr ""
+
+#: readelf.c:2223
+#, c-format
+msgid ""
+"\n"
+" [Requesting program interpreter: %s]"
+msgstr ""
+
+#: readelf.c:2241
+msgid ""
+"\n"
+" Section to Segment mapping:\n"
+msgstr ""
+
+#: readelf.c:2242
+msgid " Segment Sections...\n"
+msgstr ""
+
+#: readelf.c:2505
+msgid ""
+"\n"
+"There are no sections in this file.\n"
+msgstr ""
+
+#: readelf.c:2511
+#, c-format
+msgid "There are %d section headers, starting at offset 0x%lx:\n"
+msgstr ""
+
+#: readelf.c:2551
+msgid "File contains multiple dynamic symbol tables\n"
+msgstr ""
+
+#: readelf.c:2564
+msgid "File contains multiple dynamic string tables\n"
+msgstr ""
+
+#: readelf.c:2591
+#, c-format
+msgid ""
+"\n"
+"Section Header%s:\n"
+msgstr ""
+
+#: readelf.c:2595
+msgid ""
+" [Nr] Name Type Addr Off Size ES Flg Lk "
+"Inf Al\n"
+msgstr ""
+
+#: readelf.c:2598
+msgid " [Nr] Name Type Address Offset\n"
+msgstr ""
+
+#: readelf.c:2599
+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"
+msgstr ""
+
+#: readelf.c:2647
+msgid ""
+" I (info), L (link order), O (extra OS processing required)\n"
+msgstr ""
+
+#: readelf.c:2648
+msgid " o (os specific), p (processor specific) x (unknown)\n"
+msgstr ""
+
+#: readelf.c:2706
+#, c-format
+msgid ""
+"\n"
+"Relocation section at offset 0x%lx contains %ld bytes:\n"
+msgstr ""
+
+#: readelf.c:2713
+msgid ""
+"\n"
+"There are no dynamic relocations in this file.\n"
+msgstr ""
+
+#: readelf.c:2741
+msgid ""
+"\n"
+"Relocation section "
+msgstr ""
+
+#: readelf.c:2748
+#, c-format
+msgid " at offset 0x%lx contains %lu entries:\n"
+msgstr ""
+
+#: readelf.c:2776
+msgid ""
+"\n"
+"There are no relocations in this file.\n"
+msgstr ""
+
+#: readelf.c:3026
+msgid ""
+"\n"
+"There is no dynamic segment in this file.\n"
+msgstr ""
+
+#: readelf.c:3060
+msgid "Unable to seek to end of file!"
+msgstr ""
+
+#: readelf.c:3069
+msgid "Unable to determine the number of symbols to load\n"
+msgstr ""
+
+#: readelf.c:3099
+msgid "Unable to seek to end of file\n"
+msgstr ""
+
+#: readelf.c:3105
+msgid "Unable to determine the length of the dynamic string table\n"
+msgstr ""
+
+#: readelf.c:3166
+#, c-format
+msgid ""
+"\n"
+"Dynamic segment at offset 0x%x contains %ld entries:\n"
+msgstr ""
+
+#: readelf.c:3169
+msgid " Tag Type Name/Value\n"
+msgstr ""
+
+#: readelf.c:3200
+msgid "Auxiliary library"
+msgstr ""
+
+#: readelf.c:3202
+msgid "Filter library"
+msgstr ""
+
+#: readelf.c:3218 readelf.c:3239 readelf.c:3265
+msgid "Flags:"
+msgstr ""
+
+#: readelf.c:3220 readelf.c:3241 readelf.c:3267
+msgid " None\n"
+msgstr ""
+
+#: readelf.c:3370
+#, c-format
+msgid "Shared library: [%s]"
+msgstr ""
+
+#: readelf.c:3373
+msgid " program interpreter"
+msgstr ""
+
+#: readelf.c:3377
+#, c-format
+msgid "Library soname: [%s]"
+msgstr ""
+
+#: readelf.c:3381
+#, c-format
+msgid "Library rpath: [%s]"
+msgstr ""
+
+#: readelf.c:3442
+#, c-format
+msgid "Not needed object: [%s]\n"
+msgstr ""
+
+#: readelf.c:3539
+#, c-format
+msgid ""
+"\n"
+"Version definition section '%s' contains %ld entries:\n"
+msgstr ""
+
+#: readelf.c:3542
+msgid " Addr: 0x"
+msgstr ""
+
+#: readelf.c:3544 readelf.c:3732
+#, c-format
+msgid " Offset: %#08lx Link: %lx (%s)\n"
+msgstr ""
+
+#: readelf.c:3574
+#, c-format
+msgid " %#06x: Rev: %d Flags: %s"
+msgstr ""
+
+#: readelf.c:3577
+#, c-format
+msgid " Index: %d Cnt: %d "
+msgstr ""
+
+#: readelf.c:3588
+#, c-format
+msgid "Name: %s\n"
+msgstr ""
+
+#: readelf.c:3590
+#, c-format
+msgid "Name index: %ld\n"
+msgstr ""
+
+#: readelf.c:3605
+#, c-format
+msgid " %#06x: Parent %d: %s\n"
+msgstr ""
+
+#: readelf.c:3608
+#, c-format
+msgid " %#06x: Parent %d, name index: %ld\n"
+msgstr ""
+
+#: readelf.c:3627
+#, c-format
+msgid ""
+"\n"
+"Version needs section '%s' contains %ld entries:\n"
+msgstr ""
+
+#: readelf.c:3630
+msgid " Addr: 0x"
+msgstr ""
+
+#: readelf.c:3632
+#, c-format
+msgid " Offset: %#08lx Link to section: %ld (%s)\n"
+msgstr ""
+
+#: readelf.c:3658
+#, c-format
+msgid " %#06x: Version: %d"
+msgstr ""
+
+#: readelf.c:3661
+#, c-format
+msgid " File: %s"
+msgstr ""
+
+#: readelf.c:3663
+#, c-format
+msgid " File: %lx"
+msgstr ""
+
+#: readelf.c:3665
+#, c-format
+msgid " Cnt: %d\n"
+msgstr ""
+
+#: readelf.c:3683
+#, c-format
+msgid " %#06x: Name: %s"
+msgstr ""
+
+#: readelf.c:3686
+#, c-format
+msgid " %#06x: Name index: %lx"
+msgstr ""
+
+#: readelf.c:3689
+#, c-format
+msgid " Flags: %s Version: %d\n"
+msgstr ""
+
+#: readelf.c:3727
+#, c-format
+msgid ""
+"\n"
+"Version symbols section '%s' contains %d entries:\n"
+msgstr ""
+
+#: readelf.c:3730
+msgid " Addr: "
+msgstr ""
+
+#: readelf.c:3760
+msgid " 0 (*local*) "
+msgstr ""
+
+#: readelf.c:3764
+msgid " 1 (*global*) "
+msgstr ""
+
+#: readelf.c:3986
+msgid ""
+"\n"
+"No version information found in this file.\n"
+msgstr ""
+
+#: readelf.c:4004 readelf.c:4039
+#, c-format
+msgid "<processor specific>: %d"
+msgstr ""
+
+#: readelf.c:4006 readelf.c:4051
+#, c-format
+msgid "<OS specific>: %d"
+msgstr ""
+
+#: readelf.c:4008 readelf.c:4054
+#, c-format
+msgid "<unknown>: %d"
+msgstr ""
+
+#: readelf.c:4117
+msgid "Unable to read in dynamic data\n"
+msgstr ""
+
+#: readelf.c:4159
+msgid "Unable to seek to start of dynamic information"
+msgstr ""
+
+#: readelf.c:4165
+msgid "Failed to read in number of buckets\n"
+msgstr ""
+
+#: readelf.c:4171
+msgid "Failed to read in number of chains\n"
+msgstr ""
+
+#: readelf.c:4191
+msgid ""
+"\n"
+"Symbol table for image:\n"
+msgstr ""
+
+#: readelf.c:4193
+msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
+msgstr ""
+
+#: readelf.c:4195
+msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
+msgstr ""
+
+#: readelf.c:4239
+#, c-format
+msgid ""
+"\n"
+"Symbol table '%s' contains %lu entries:\n"
+msgstr ""
+
+#: readelf.c:4243
+msgid " Num: Value Size Type Bind Vis Ndx Name\n"
+msgstr ""
+
+#: readelf.c:4245
+msgid " Num: Value Size Type Bind Vis Ndx Name\n"
+msgstr ""
+
+#: readelf.c:4354
+msgid "bad dynamic symbol"
+msgstr ""
+
+#: readelf.c:4413
+msgid ""
+"\n"
+"Dynamic symbol information is not available for displaying symbols.\n"
+msgstr ""
+
+#: readelf.c:4425
+#, c-format
+msgid ""
+"\n"
+"Histogram for bucket list length (total of %d buckets):\n"
+msgstr ""
+
+#: readelf.c:4427
+msgid " Length Number %% of total Coverage\n"
+msgstr ""
+
+#: readelf.c:4432 readelf.c:4451 readelf.c:6704 readelf.c:6897
+msgid "Out of memory"
+msgstr ""
+
+#: readelf.c:4500
+#, c-format
+msgid ""
+"\n"
+"Dynamic info segment at offset 0x%lx contains %d entries:\n"
+msgstr ""
+
+#: readelf.c:4503
+msgid " Num: Name BoundTo Flags\n"
+msgstr ""
+
+#: readelf.c:4551
+#, c-format
+msgid ""
+"\n"
+"Assembly dump of section %s\n"
+msgstr ""
+
+#: readelf.c:4574
+#, c-format
+msgid ""
+"\n"
+"Section '%s' has no data to dump.\n"
+msgstr ""
+
+#: readelf.c:4579
+#, c-format
+msgid ""
+"\n"
+"Hex dump of section '%s':\n"
+msgstr ""
+
+#: readelf.c:4731
+msgid "badly formed extended line op encountered!"
+msgstr ""
+
+#: readelf.c:4738
+#, c-format
+msgid " Extended opcode %d: "
+msgstr ""
+
+#: readelf.c:4743
+msgid ""
+"End of Sequence\n"
+"\n"
+msgstr ""
+
+#: readelf.c:4749
+#, c-format
+msgid "set Address to 0x%lx\n"
+msgstr ""
+
+#: readelf.c:4754
+msgid " define new File Table entry\n"
+msgstr ""
+
+#: readelf.c:4755 readelf.c:4877
+msgid " Entry\tDir\tTime\tSize\tName\n"
+msgstr ""
+
+#: readelf.c:4757
+#, c-format
+msgid " %d\t"
+msgstr ""
+
+#: readelf.c:4760 readelf.c:4762 readelf.c:4764 readelf.c:4889 readelf.c:4891
+#: readelf.c:4893
+#, c-format
+msgid "%lu\t"
+msgstr ""
+
+#: readelf.c:4765
+#, c-format
+msgid ""
+"%s\n"
+"\n"
+msgstr ""
+
+#: readelf.c:4769
+#, c-format
+msgid "UNKNOWN: length %d\n"
+msgstr ""
+
+#: readelf.c:4795
+#, c-format
+msgid ""
+"\n"
+"Dump of debug contents of section %s:\n"
+"\n"
+msgstr ""
+
+#: readelf.c:4807
+msgid "The line info appears to be corrupt - the section is too small\n"
+msgstr ""
+
+#: readelf.c:4815
+msgid "Only DWARF version 2 line info is currently supported.\n"
+msgstr ""
+
+#: readelf.c:4830
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: readelf.c:4831
+#, c-format
+msgid " DWARF Version: %d\n"
+msgstr ""
+
+#: readelf.c:4832
+#, c-format
+msgid " Prolgue Length: %d\n"
+msgstr ""
+
+#: readelf.c:4833
+#, c-format
+msgid " Minimum Instruction Length: %d\n"
+msgstr ""
+
+#: readelf.c:4834
+#, c-format
+msgid " Initial value of 'is_stmt': %d\n"
+msgstr ""
+
+#: readelf.c:4835
+#, c-format
+msgid " Line Base: %d\n"
+msgstr ""
+
+#: readelf.c:4836
+#, c-format
+msgid " Line Range: %d\n"
+msgstr ""
+
+#: readelf.c:4837
+#, c-format
+msgid " Opcode Base: %d\n"
+msgstr ""
+
+#: readelf.c:4846
+msgid ""
+"\n"
+" Opcodes:\n"
+msgstr ""
+
+#: readelf.c:4849
+#, c-format
+msgid " Opcode %d has %d args\n"
+msgstr ""
+
+#: readelf.c:4855
+msgid ""
+"\n"
+" The Directory Table is empty.\n"
+msgstr ""
+
+#: readelf.c:4858
+msgid ""
+"\n"
+" The Directory Table:\n"
+msgstr ""
+
+#: readelf.c:4862
+#, c-format
+msgid " %s\n"
+msgstr ""
+
+#: readelf.c:4873
+msgid ""
+"\n"
+" The File Name Table is empty.\n"
+msgstr ""
+
+#: readelf.c:4876
+msgid ""
+"\n"
+" The File Name Table:\n"
+msgstr ""
+
+#: readelf.c:4884
+#, c-format
+msgid " %d\t"
+msgstr ""
+
+#: readelf.c:4895
+#, c-format
+msgid "%s\n"
+msgstr ""
+
+#. Now display the statements.
+#: readelf.c:4903
+msgid ""
+"\n"
+" Line Number Statements:\n"
+msgstr ""
+
+#: readelf.c:4922
+msgid " Copy\n"
+msgstr ""
+
+#: readelf.c:4929
+#, c-format
+msgid " Advance PC by %d to %lx\n"
+msgstr ""
+
+#: readelf.c:4937
+#, c-format
+msgid " Advance Line by %d to %d\n"
+msgstr ""
+
+#: readelf.c:4944
+#, c-format
+msgid " Set File Name to entry %d in the File Name Table\n"
+msgstr ""
+
+#: readelf.c:4952
+#, c-format
+msgid " Set column to %d\n"
+msgstr ""
+
+#: readelf.c:4959
+#, c-format
+msgid " Set is_stmt to %d\n"
+msgstr ""
+
+#: readelf.c:4964
+msgid " Set basic block\n"
+msgstr ""
+
+#: readelf.c:4972
+#, c-format
+msgid " Advance PC by constant %d to 0x%lx\n"
+msgstr ""
+
+#: readelf.c:4980
+#, c-format
+msgid " Advance PC by fixed size amount %d to 0x%lx\n"
+msgstr ""
+
+#: readelf.c:4988
+#, c-format
+msgid " Special opcode %d: advance Address by %d to 0x%lx"
+msgstr ""
+
+#: readelf.c:4992
+#, c-format
+msgid " and Line by %d to %d\n"
+msgstr ""
+
+#: readelf.c:5015 readelf.c:5437
+#, c-format
+msgid ""
+"Contents of the %s section:\n"
+"\n"
+msgstr ""
+
+#: readelf.c:5034
+msgid "Only DWARF 2 pubnames are currently supported"
+msgstr ""
+
+#: readelf.c:5038
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: readelf.c:5040
+#, c-format
+msgid " Version: %d\n"
+msgstr ""
+
+#: readelf.c:5042
+#, c-format
+msgid " Offset into .debug_info section: %ld\n"
+msgstr ""
+
+#: readelf.c:5044
+#, c-format
+msgid " Size of area in .debug_info section: %ld\n"
+msgstr ""
+
+#: readelf.c:5047
+msgid ""
+"\n"
+" Offset\tName\n"
+msgstr ""
+
+#: readelf.c:5129
+#, c-format
+msgid "Unknown TAG value: %lx"
+msgstr ""
+
+#: readelf.c:5224
+#, c-format
+msgid "Unknown AT value: %lx"
+msgstr ""
+
+#: readelf.c:5261
+#, c-format
+msgid "Unknown FORM value: %lx"
+msgstr ""
+
+#: readelf.c:5443
+msgid " Number TAG\n"
+msgstr ""
+
+#: readelf.c:5449
+#, c-format
+msgid " %ld %s [%s]\n"
+msgstr ""
+
+#: readelf.c:5452
+msgid "has children"
+msgstr ""
+
+#: readelf.c:5452
+msgid "no children"
+msgstr ""
+
+#: readelf.c:5456
+#, c-format
+msgid " %-18s %s\n"
+msgstr ""
+
+#: readelf.c:5475
+#, c-format
+msgid " %lu byte block: "
+msgstr ""
+
+#: readelf.c:5939
+msgid "(User defined location op)"
+msgstr ""
+
+#: readelf.c:5941
+msgid "(Unknown location op)"
+msgstr ""
+
+#: readelf.c:6058
+#, c-format
+msgid "Unable to handle FORM: %d"
+msgstr ""
+
+#: readelf.c:6062
+#, c-format
+msgid "Unrecognised form: %d"
+msgstr ""
+
+#: readelf.c:6075
+msgid "(not inlined)"
+msgstr ""
+
+#: readelf.c:6076
+msgid "(inlined)"
+msgstr ""
+
+#: readelf.c:6077
+msgid "(declared as inline but ignored)"
+msgstr ""
+
+#: readelf.c:6078
+msgid "(declared as inline and inlined)"
+msgstr ""
+
+#: readelf.c:6079
+#, c-format
+msgid " (Unknown inline attribute value: %lx)"
+msgstr ""
+
+#: readelf.c:6209 readelf.c:6333
+#, 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"
+msgstr ""
+
+#: readelf.c:6236
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: readelf.c:6237
+#, c-format
+msgid " Version: %d\n"
+msgstr ""
+
+#: readelf.c:6238
+#, c-format
+msgid " Abbrev Offset: %ld\n"
+msgstr ""
+
+#: readelf.c:6239
+#, c-format
+msgid " Pointer Size: %d\n"
+msgstr ""
+
+#: readelf.c:6259
+msgid "Unable to locate .debug_abbrev section!\n"
+msgstr ""
+
+#: readelf.c:6299
+#, c-format
+msgid "Unable to locate entry %lu in the abbreviation table\n"
+msgstr ""
+
+#: readelf.c:6304
+#, c-format
+msgid " <%d><%x>: Abbrev Number: %lu (%s)\n"
+msgstr ""
+
+#: readelf.c:6352
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: readelf.c:6353
+#, c-format
+msgid " Version: %d\n"
+msgstr ""
+
+#: readelf.c:6354
+#, c-format
+msgid " Offset into .debug_info: %lx\n"
+msgstr ""
+
+#: readelf.c:6355
+#, c-format
+msgid " Pointer Size: %d\n"
+msgstr ""
+
+#: readelf.c:6356
+#, c-format
+msgid " Segment Size: %d\n"
+msgstr ""
+
+#: readelf.c:6358
+msgid ""
+"\n"
+" Address Length\n"
+msgstr ""
+
+#: readelf.c:6399
+#, c-format
+msgid "Displaying the debug contents of section %s is not yet supported.\n"
+msgstr ""
+
+#: readelf.c:6461
+#, c-format
+msgid ""
+"\n"
+"Section '%s' has no debugging data.\n"
+msgstr ""
+
+#: readelf.c:6477
+#, c-format
+msgid "Unrecognised debug section: %s\n"
+msgstr ""
+
+#: readelf.c:6549
+msgid "Some sections were not dumped because they do not exist!\n"
+msgstr ""
+
+#: readelf.c:6728
+#, c-format
+msgid ""
+"\n"
+"Section '%s' contains %d entries:\n"
+msgstr ""
+
+#: readelf.c:6890
+msgid "conflict list with without table"
+msgstr ""
+
+#: readelf.c:6918
+#, c-format
+msgid ""
+"\n"
+"Section '.conflict' contains %d entries:\n"
+msgstr ""
+
+#: readelf.c:6919
+msgid " Num: Index Value Name"
+msgstr ""
+
+#: readelf.c:6944
+msgid "NT_PRSTATUS (prstatus structure)"
+msgstr ""
+
+#: readelf.c:6945
+msgid "NT_FPREGSET (floating point registers)"
+msgstr ""
+
+#: readelf.c:6946
+msgid "NT_PRPSINFO (prpsinfo structure)"
+msgstr ""
+
+#: readelf.c:6947
+msgid "NT_TASKSTRUCT (task structure)"
+msgstr ""
+
+#: readelf.c:6948
+msgid "NT_PRXFPREG (user_xfpregs structure)"
+msgstr ""
+
+#: readelf.c:6949
+msgid "NT_PSTATUS (pstatus structure)"
+msgstr ""
+
+#: readelf.c:6950
+msgid "NT_FPREGS (floating point registers)"
+msgstr ""
+
+#: readelf.c:6951
+msgid "NT_PSINFO (psinfo structure)"
+msgstr ""
+
+#: readelf.c:6952
+msgid "NT_LWPSTATUS (lwpstatus_t structure)"
+msgstr ""
+
+#: readelf.c:6953
+msgid "NT_LWPSINFO (lwpsinfo_t structure)"
+msgstr ""
+
+#: readelf.c:6954
+msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)"
+msgstr ""
+
+#: readelf.c:6956
+#, c-format
+msgid "Unknown note type: (0x%08x)"
+msgstr ""
+
+#: readelf.c:6994
+#, c-format
+msgid ""
+"\n"
+"Notes at offset 0x%08lx with length 0x%08lx:\n"
+msgstr ""
+
+#: readelf.c:6997
+msgid " Owner\t\tData size\tDescription\n"
+msgstr ""
+
+#: readelf.c:7108
+msgid "No note segments present in the core file.\n"
+msgstr ""
+
+#: readelf.c:7186
+msgid "This instance of readelf has been built without support for a\n"
+msgstr ""
+
+#: readelf.c:7187
+msgid "64 bit data type and so it cannot read 64 bit ELF files.\n"
+msgstr ""
+
+#: readelf.c:7222
+#, c-format
+msgid "Cannot stat input file %s.\n"
+msgstr ""
+
+#: readelf.c:7229
+#, c-format
+msgid "Input file %s not found.\n"
+msgstr ""
+
+#: readelf.c:7235
+#, c-format
+msgid "%s: Failed to read file header\n"
+msgstr ""
+
+#: readelf.c:7249
+#, c-format
+msgid ""
+"\n"
+"File: %s\n"
+msgstr ""
+
+#: rename.c:131
+#, c-format
+msgid "%s: cannot set time: %s"
+msgstr ""
+
+#. We have to clean up here.
+#: rename.c:170 rename.c:203
+#, c-format
+msgid "%s: rename: %s"
+msgstr ""
+
+#: rename.c:211
+#, c-format
+msgid "%s: simple_copy: %s"
+msgstr ""
+
+#: resbin.c:130
+#, c-format
+msgid "%s: not enough binary data"
+msgstr ""
+
+#: resbin.c:149
+msgid "null terminated unicode string"
+msgstr ""
+
+#: resbin.c:179 resbin.c:185
+msgid "resource ID"
+msgstr ""
+
+#: resbin.c:229
+msgid "cursor"
+msgstr ""
+
+#: resbin.c:263 resbin.c:270
+msgid "menu header"
+msgstr ""
+
+#: resbin.c:280
+msgid "menuex header"
+msgstr ""
+
+#: resbin.c:284
+msgid "menuex offset"
+msgstr ""
+
+#: resbin.c:291
+#, c-format
+msgid "unsupported menu version %d"
+msgstr ""
+
+#: resbin.c:319 resbin.c:334 resbin.c:400
+msgid "menuitem header"
+msgstr ""
+
+#: resbin.c:430
+msgid "menuitem"
+msgstr ""
+
+#: resbin.c:471 resbin.c:499
+msgid "dialog header"
+msgstr ""
+
+#: resbin.c:489
+#, c-format
+msgid "unexpected dialog signature %d"
+msgstr ""
+
+#: resbin.c:531
+msgid "dialog font point size"
+msgstr ""
+
+#: resbin.c:539
+msgid "dialogex font information"
+msgstr ""
+
+#: resbin.c:564 resbin.c:582
+msgid "dialog control"
+msgstr ""
+
+#: resbin.c:574
+msgid "dialogex control"
+msgstr ""
+
+#: resbin.c:603
+msgid "dialog control end"
+msgstr ""
+
+#: resbin.c:615
+msgid "dialog control data"
+msgstr ""
+
+#: resbin.c:658
+msgid "stringtable string length"
+msgstr ""
+
+#: resbin.c:668
+msgid "stringtable string"
+msgstr ""
+
+#: resbin.c:701
+msgid "fontdir header"
+msgstr ""
+
+#: resbin.c:714
+msgid "fontdir"
+msgstr ""
+
+#: resbin.c:730
+msgid "fontdir device name"
+msgstr ""
+
+#: resbin.c:736
+msgid "fontdir face name"
+msgstr ""
+
+#: resbin.c:779
+msgid "accelerator"
+msgstr ""
+
+#: resbin.c:843
+msgid "group cursor header"
+msgstr ""
+
+#: resbin.c:847
+#, c-format
+msgid "unexpected group cursor type %d"
+msgstr ""
+
+#: resbin.c:862
+msgid "group cursor"
+msgstr ""
+
+#: resbin.c:901
+msgid "group icon header"
+msgstr ""
+
+#: resbin.c:905
+#, c-format
+msgid "unexpected group icon type %d"
+msgstr ""
+
+#: resbin.c:920
+msgid "group icon"
+msgstr ""
+
+#: resbin.c:991 resbin.c:1210
+msgid "unexpected version string"
+msgstr ""
+
+#: resbin.c:1025
+#, c-format
+msgid "version length %d does not match resource length %lu"
+msgstr ""
+
+#: resbin.c:1029
+#, c-format
+msgid "unexpected version type %d"
+msgstr ""
+
+#: resbin.c:1041
+#, c-format
+msgid "unexpected fixed version information length %d"
+msgstr ""
+
+#: resbin.c:1044
+msgid "fixed version info"
+msgstr ""
+
+#: resbin.c:1048
+#, c-format
+msgid "unexpected fixed version signature %lu"
+msgstr ""
+
+#: resbin.c:1052
+#, c-format
+msgid "unexpected fixed version info version %lu"
+msgstr ""
+
+#: resbin.c:1081
+msgid "version var info"
+msgstr ""
+
+#: resbin.c:1098
+#, c-format
+msgid "unexpected stringfileinfo value length %d"
+msgstr ""
+
+#: resbin.c:1108
+#, c-format
+msgid "unexpected version stringtable value length %d"
+msgstr ""
+
+#: resbin.c:1142
+#, c-format
+msgid "unexpected version string length %d != %d + %d"
+msgstr ""
+
+#: resbin.c:1153
+#, c-format
+msgid "unexpected version string length %d < %d"
+msgstr ""
+
+#: resbin.c:1170
+#, c-format
+msgid "unexpected varfileinfo value length %d"
+msgstr ""
+
+#: resbin.c:1189
+msgid "version varfileinfo"
+msgstr ""
+
+#: resbin.c:1204
+#, c-format
+msgid "unexpected version value length %d"
+msgstr ""
+
+#: rescoff.c:128
+msgid "filename required for COFF input"
+msgstr ""
+
+#: rescoff.c:145
+#, c-format
+msgid "%s: %s: no resource section\n"
+msgstr ""
+
+#: rescoff.c:154
+msgid "can't read resource section"
+msgstr ""
+
+#: rescoff.c:180
+#, c-format
+msgid "%s: %s: address out of bounds"
+msgstr ""
+
+#: rescoff.c:199
+msgid "directory"
+msgstr ""
+
+#: rescoff.c:227
+msgid "named directory entry"
+msgstr ""
+
+#: rescoff.c:236
+msgid "directory entry name"
+msgstr ""
+
+#: rescoff.c:256
+msgid "named subdirectory"
+msgstr ""
+
+#: rescoff.c:264
+msgid "named resource"
+msgstr ""
+
+#: rescoff.c:279
+msgid "ID directory entry"
+msgstr ""
+
+#: rescoff.c:296
+msgid "ID subdirectory"
+msgstr ""
+
+#: rescoff.c:304
+msgid "ID resource"
+msgstr ""
+
+#: rescoff.c:330
+msgid "resource type unknown"
+msgstr ""
+
+#: rescoff.c:333
+msgid "data entry"
+msgstr ""
+
+#: rescoff.c:341
+msgid "resource data"
+msgstr ""
+
+#: rescoff.c:346
+msgid "resource data size"
+msgstr ""
+
+#: rescoff.c:441
+msgid "filename required for COFF output"
+msgstr ""
+
+#: rescoff.c:740
+msgid "can't get BFD_RELOC_RVA relocation type"
+msgstr ""
+
+#: resrc.c:240 resrc.c:312
+#, c-format
+msgid "can't open temporary file `%s': %s"
+msgstr ""
+
+#: resrc.c:246
+#, c-format
+msgid "can't redirect stdout: `%s': %s"
+msgstr ""
+
+#: resrc.c:262
+#, c-format
+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"
+msgstr ""
+
+#: resrc.c:317
+#, c-format
+msgid "Using temporary file `%s' to read preprocessor output\n"
+msgstr ""
+
+#: resrc.c:324
+#, c-format
+msgid "can't popen `%s': %s"
+msgstr ""
+
+#: resrc.c:326
+msgid "Using popen to read preprocessor output\n"
+msgstr ""
+
+#: resrc.c:369
+#, c-format
+msgid "Tried `%s'\n"
+msgstr ""
+
+#: resrc.c:380
+#, c-format
+msgid "Using `%s'\n"
+msgstr ""
+
+#: resrc.c:544
+#, c-format
+msgid "%s:%d: %s\n"
+msgstr ""
+
+#: resrc.c:553
+#, c-format
+msgid "%s: unexpected EOF"
+msgstr ""
+
+#: resrc.c:610
+#, c-format
+msgid "%s: read of %lu returned %lu"
+msgstr ""
+
+#: resrc.c:652 resrc.c:883 resrc.c:1156 resrc.c:1310
+#, c-format
+msgid "stat failed on bitmap file `%s': %s"
+msgstr ""
+
+#: resrc.c:705
+#, c-format
+msgid "cursor file `%s' does not contain cursor data"
+msgstr ""
+
+#: resrc.c:737 resrc.c:1027
+#, c-format
+msgid "%s: fseek to %lu failed: %s"
+msgstr ""
+
+#: resrc.c:996
+#, c-format
+msgid "icon file `%s' does not contain icon data"
+msgstr ""
+
+#: resrc.c:1515
+#, c-format
+msgid "can't open `%s' for output: %s"
+msgstr ""
+
+#: size.c:79
+#, c-format
+msgid ""
+"Usage: %s [-ABdoxV] [--format=berkeley|sysv] [--radix=8|10|16]\n"
+" [--target=bfdname] [--version] [--help] [file...]\n"
+msgstr ""
+
+#: size.c:83
+msgid "default is --format=berkeley\n"
+msgstr ""
+
+#: size.c:85
+msgid "default is --format=sysv\n"
+msgstr ""
+
+#: size.c:139
+#, c-format
+msgid "invalid argument to --format: %s\n"
+msgstr ""
+
+#: size.c:166
+#, c-format
+msgid "Invalid radix: %s\n"
+msgstr ""
+
+#: srconv.c:1879
+#, c-format
+msgid "Usage: %s [-dhVq] in-file [out-file]\n"
+msgstr ""
+
+#: srconv.c:1886
+#, c-format
+msgid "%s: Convert a COFF object file into a SYSROFF object file\n"
+msgstr ""
+
+#: srconv.c:2024
+#, c-format
+msgid "%s: unable to open output file %s\n"
+msgstr ""
+
+#: stabs.c:349 stabs.c:1769
+msgid "numeric overflow"
+msgstr ""
+
+#: stabs.c:360
+#, c-format
+msgid "Bad stab: %s\n"
+msgstr ""
+
+#: stabs.c:370
+#, c-format
+msgid "Warning: %s: %s\n"
+msgstr ""
+
+#: stabs.c:492
+msgid "N_LBRAC not within function\n"
+msgstr ""
+
+#: stabs.c:531
+msgid "Too many N_RBRACs\n"
+msgstr ""
+
+#: stabs.c:780
+msgid "unknown C++ encoded name"
+msgstr ""
+
+#. Complain and keep going, so compilers can invent new
+#. cross-reference types.
+#: stabs.c:1306
+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
+msgid "missing index type"
+msgstr ""
+
+#: stabs.c:2188
+msgid "unknown virtual character for baseclass"
+msgstr ""
+
+#: stabs.c:2206
+msgid "unknown visibility character for baseclass"
+msgstr ""
+
+#: stabs.c:2398
+msgid "unnamed $vb type"
+msgstr ""
+
+#: stabs.c:2404
+msgid "unrecognized C++ abbreviation"
+msgstr ""
+
+#: stabs.c:2484
+msgid "unknown visibility character for field"
+msgstr ""
+
+#: stabs.c:2740
+msgid "const/volatile indicator missing"
+msgstr ""
+
+#: stabs.c:2980
+#, c-format
+msgid "No mangling for \"%s\"\n"
+msgstr ""
+
+#: stabs.c:3293
+msgid "Undefined N_EXCL"
+msgstr ""
+
+#: stabs.c:3381
+#, c-format
+msgid "Type file number %d out of range\n"
+msgstr ""
+
+#: stabs.c:3386
+#, c-format
+msgid "Type index number %d out of range\n"
+msgstr ""
+
+#: stabs.c:3473
+#, c-format
+msgid "Unrecognized XCOFF type %d\n"
+msgstr ""
+
+#: stabs.c:3772
+#, c-format
+msgid "bad mangled name `%s'\n"
+msgstr ""
+
+#: stabs.c:3868
+msgid "no argument types in mangled string\n"
+msgstr ""
+
+#: strings.c:159
+#, c-format
+msgid "%s: invalid number %s\n"
+msgstr ""
+
+#: strings.c:494
+#, c-format
+msgid "%s: invalid integer argument %s\n"
+msgstr ""
+
+#: strings.c:505
+#, c-format
+msgid ""
+"Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n"
+" [--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n"
+" [--target=bfdname] [--help] [--version] file...\n"
+msgstr ""
+
+#: sysdump.c:712
+#, c-format
+msgid "Usage: %s [-hV] in-file\n"
+msgstr ""
+
+#: sysdump.c:783
+#, c-format
+msgid "%s: cannot open input file %s\n"
+msgstr ""
+
+#: version.c:39
+msgid "Copyright 1997, 1998, 1999 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version.c:40
+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 ""
+
+#: windres.c:237
+#, c-format
+msgid "can't open %s `%s': %s"
+msgstr ""
+
+#: windres.c:416
+msgid ": expected to be a directory\n"
+msgstr ""
+
+#: windres.c:428
+msgid ": expected to be a leaf\n"
+msgstr ""
+
+#: windres.c:437
+#, c-format
+msgid "%s: warning: "
+msgstr ""
+
+#: windres.c:439
+msgid ": duplicate value\n"
+msgstr ""
+
+#: windres.c:602
+#, c-format
+msgid "%s: unknown format type `%s'\n"
+msgstr ""
+
+#: windres.c:603
+#, c-format
+msgid "%s: supported formats:"
+msgstr ""
+
+#. Otherwise, we give up.
+#: windres.c:690
+#, c-format
+msgid "can not determine type of file `%s'; use the -I option"
+msgstr ""
+
+#: windres.c:704
+#, c-format
+msgid "Usage: %s [options] [input-file] [output-file]\n"
+msgstr ""
+
+#: windres.c:706
+msgid ""
+"Options:\n"
+" -i FILE, --input FILE Name input file\n"
+" -o FILE, --output FILE Name output file\n"
+" -I FORMAT, --input-format FORMAT\n"
+" Specify input format\n"
+" -O FORMAT, --output-format FORMAT\n"
+" Specify output format\n"
+" -F TARGET, --target TARGET Specify COFF target\n"
+" --preprocessor PROGRAM Program to use to preprocess rc file\n"
+" --include-dir DIR Include directory when preprocessing rc file\n"
+" -DSYM[=VAL], --define SYM[=VAL]\n"
+" Define SYM when preprocessing rc file\n"
+" -v Verbose - tells you what it's doing\n"
+" --language VAL Set language when reading rc file\n"
+" --use-temp-file Use a temporary file instead of popen to read\n"
+" the preprocessor output\n"
+" --no-use-temp-file Use popen (default)\n"
+msgstr ""
+
+#: windres.c:725
+msgid " --yydebug Turn on parser debugging\n"
+msgstr ""
+
+#: windres.c:728
+msgid ""
+" --help Print this help message\n"
+" --version Print version information\n"
+msgstr ""
+
+#: windres.c:731
+msgid ""
+"FORMAT is one of rc, res, or coff, and is deduced from the file name\n"
+"extension if not specified. A single file name is an input file.\n"
+"No input-file is stdin, default rc. No output-file is stdout, default rc.\n"
+msgstr ""
+
+#: windres.c:980
+msgid "no resources"
+msgstr ""
+
+#: wrstabs.c:366 wrstabs.c:2028
+#, c-format
+msgid "string_hash_lookup failed: %s\n"
+msgstr ""
+
+#: wrstabs.c:666
+#, c-format
+msgid "stab_int_type: bad size %u\n"
+msgstr ""
+
+#: wrstabs.c:1468
+#, c-format
+msgid "%s: warning: unknown size for field `%s' in struct\n"
+msgstr ""
diff --git a/contrib/binutils/binutils/prdbg.c b/contrib/binutils/binutils/prdbg.c
index 958cbd2..abd684d 100644
--- a/contrib/binutils/binutils/prdbg.c
+++ b/contrib/binutils/binutils/prdbg.c
@@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -985,7 +985,7 @@ pr_fix_visibility (info, visibility)
struct pr_handle *info;
enum debug_visibility visibility;
{
- const char *s;
+ const char *s = NULL;
char *t;
unsigned int len;
@@ -1602,7 +1602,7 @@ pr_typdef (p, name)
static boolean
pr_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
@@ -1856,7 +1856,7 @@ pr_end_block (p, addr)
/*ARGSUSED*/
static boolean
pr_end_function (p)
- PTR p;
+ PTR p ATTRIBUTE_UNUSED;
{
return true;
}
diff --git a/contrib/binutils/binutils/rclex.l b/contrib/binutils/binutils/rclex.l
index 50ef185..47b479b 100644
--- a/contrib/binutils/binutils/rclex.l
+++ b/contrib/binutils/binutils/rclex.l
@@ -37,6 +37,23 @@
static int rcdata_mode;
+/* Whether we are supressing lines from cpp (including windows.h or
+ headers from your C sources may bring in externs and typedefs).
+ When active, we return IGNORED_TOKEN, which lets us ignore these
+ outside of resource constructs. Thus, it isn't required to protect
+ all the non-preprocessor lines in your header files with #ifdef
+ RC_INVOKED. It also means your RC file can't include other RC
+ files if they're named "*.h". Sorry. Name them *.rch or whatever. */
+
+static int suppress_cpp_data;
+
+#define MAYBE_RETURN(x) return suppress_cpp_data ? IGNORED_TOKEN : (x)
+
+/* The first filename we detect in the cpp output. We use this to
+ tell included files from the original file. */
+
+static char *initial_fn;
+
/* List of allocated strings. */
struct alloc_string
@@ -57,82 +74,82 @@ static char *get_string PARAMS ((int));
%%
-"BEGIN" { return BEG; }
-"{" { return BEG; }
-"END" { return END; }
-"}" { return END; }
-"ACCELERATORS" { return ACCELERATORS; }
-"VIRTKEY" { return VIRTKEY; }
-"ASCII" { return ASCII; }
-"NOINVERT" { return NOINVERT; }
-"SHIFT" { return SHIFT; }
-"CONTROL" { return CONTROL; }
-"ALT" { return ALT; }
-"BITMAP" { return BITMAP; }
-"CURSOR" { return CURSOR; }
-"DIALOG" { return DIALOG; }
-"DIALOGEX" { return DIALOGEX; }
-"EXSTYLE" { return EXSTYLE; }
-"CAPTION" { return CAPTION; }
-"CLASS" { return CLASS; }
-"STYLE" { return STYLE; }
-"AUTO3STATE" { return AUTO3STATE; }
-"AUTOCHECKBOX" { return AUTOCHECKBOX; }
-"AUTORADIOBUTTON" { return AUTORADIOBUTTON; }
-"CHECKBOX" { return CHECKBOX; }
-"COMBOBOX" { return COMBOBOX; }
-"CTEXT" { return CTEXT; }
-"DEFPUSHBUTTON" { return DEFPUSHBUTTON; }
-"EDITTEXT" { return EDITTEXT; }
-"GROUPBOX" { return GROUPBOX; }
-"LISTBOX" { return LISTBOX; }
-"LTEXT" { return LTEXT; }
-"PUSHBOX" { return PUSHBOX; }
-"PUSHBUTTON" { return PUSHBUTTON; }
-"RADIOBUTTON" { return RADIOBUTTON; }
-"RTEXT" { return RTEXT; }
-"SCROLLBAR" { return SCROLLBAR; }
-"STATE3" { return STATE3; }
-"USERBUTTON" { return USERBUTTON; }
-"BEDIT" { return BEDIT; }
-"HEDIT" { return HEDIT; }
-"IEDIT" { return IEDIT; }
-"FONT" { return FONT; }
-"ICON" { return ICON; }
-"LANGUAGE" { return LANGUAGE; }
-"CHARACTERISTICS" { return CHARACTERISTICS; }
-"VERSION" { return VERSIONK; }
-"MENU" { return MENU; }
-"MENUEX" { return MENUEX; }
-"MENUITEM" { return MENUITEM; }
-"SEPARATOR" { return SEPARATOR; }
-"POPUP" { return POPUP; }
-"CHECKED" { return CHECKED; }
-"GRAYED" { return GRAYED; }
-"HELP" { return HELP; }
-"INACTIVE" { return INACTIVE; }
-"MENUBARBREAK" { return MENUBARBREAK; }
-"MENUBREAK" { return MENUBREAK; }
-"MESSAGETABLE" { return MESSAGETABLE; }
-"RCDATA" { return RCDATA; }
-"STRINGTABLE" { return STRINGTABLE; }
-"VERSIONINFO" { return VERSIONINFO; }
-"FILEVERSION" { return FILEVERSION; }
-"PRODUCTVERSION" { return PRODUCTVERSION; }
-"FILEFLAGSMASK" { return FILEFLAGSMASK; }
-"FILEFLAGS" { return FILEFLAGS; }
-"FILEOS" { return FILEOS; }
-"FILETYPE" { return FILETYPE; }
-"FILESUBTYPE" { return FILESUBTYPE; }
-"VALUE" { return VALUE; }
-"MOVEABLE" { return MOVEABLE; }
-"FIXED" { return FIXED; }
-"PURE" { return PURE; }
-"IMPURE" { return IMPURE; }
-"PRELOAD" { return PRELOAD; }
-"LOADONCALL" { return LOADONCALL; }
-"DISCARDABLE" { return DISCARDABLE; }
-"NOT" { return NOT; }
+"BEGIN" { MAYBE_RETURN (BEG); }
+"{" { MAYBE_RETURN (BEG); }
+"END" { MAYBE_RETURN (END); }
+"}" { MAYBE_RETURN (END); }
+"ACCELERATORS" { MAYBE_RETURN (ACCELERATORS); }
+"VIRTKEY" { MAYBE_RETURN (VIRTKEY); }
+"ASCII" { MAYBE_RETURN (ASCII); }
+"NOINVERT" { MAYBE_RETURN (NOINVERT); }
+"SHIFT" { MAYBE_RETURN (SHIFT); }
+"CONTROL" { MAYBE_RETURN (CONTROL); }
+"ALT" { MAYBE_RETURN (ALT); }
+"BITMAP" { MAYBE_RETURN (BITMAP); }
+"CURSOR" { MAYBE_RETURN (CURSOR); }
+"DIALOG" { MAYBE_RETURN (DIALOG); }
+"DIALOGEX" { MAYBE_RETURN (DIALOGEX); }
+"EXSTYLE" { MAYBE_RETURN (EXSTYLE); }
+"CAPTION" { MAYBE_RETURN (CAPTION); }
+"CLASS" { MAYBE_RETURN (CLASS); }
+"STYLE" { MAYBE_RETURN (STYLE); }
+"AUTO3STATE" { MAYBE_RETURN (AUTO3STATE); }
+"AUTOCHECKBOX" { MAYBE_RETURN (AUTOCHECKBOX); }
+"AUTORADIOBUTTON" { MAYBE_RETURN (AUTORADIOBUTTON); }
+"CHECKBOX" { MAYBE_RETURN (CHECKBOX); }
+"COMBOBOX" { MAYBE_RETURN (COMBOBOX); }
+"CTEXT" { MAYBE_RETURN (CTEXT); }
+"DEFPUSHBUTTON" { MAYBE_RETURN (DEFPUSHBUTTON); }
+"EDITTEXT" { MAYBE_RETURN (EDITTEXT); }
+"GROUPBOX" { MAYBE_RETURN (GROUPBOX); }
+"LISTBOX" { MAYBE_RETURN (LISTBOX); }
+"LTEXT" { MAYBE_RETURN (LTEXT); }
+"PUSHBOX" { MAYBE_RETURN (PUSHBOX); }
+"PUSHBUTTON" { MAYBE_RETURN (PUSHBUTTON); }
+"RADIOBUTTON" { MAYBE_RETURN (RADIOBUTTON); }
+"RTEXT" { MAYBE_RETURN (RTEXT); }
+"SCROLLBAR" { MAYBE_RETURN (SCROLLBAR); }
+"STATE3" { MAYBE_RETURN (STATE3); }
+"USERBUTTON" { MAYBE_RETURN (USERBUTTON); }
+"BEDIT" { MAYBE_RETURN (BEDIT); }
+"HEDIT" { MAYBE_RETURN (HEDIT); }
+"IEDIT" { MAYBE_RETURN (IEDIT); }
+"FONT" { MAYBE_RETURN (FONT); }
+"ICON" { MAYBE_RETURN (ICON); }
+"LANGUAGE" { MAYBE_RETURN (LANGUAGE); }
+"CHARACTERISTICS" { MAYBE_RETURN (CHARACTERISTICS); }
+"VERSION" { MAYBE_RETURN (VERSIONK); }
+"MENU" { MAYBE_RETURN (MENU); }
+"MENUEX" { MAYBE_RETURN (MENUEX); }
+"MENUITEM" { MAYBE_RETURN (MENUITEM); }
+"SEPARATOR" { MAYBE_RETURN (SEPARATOR); }
+"POPUP" { MAYBE_RETURN (POPUP); }
+"CHECKED" { MAYBE_RETURN (CHECKED); }
+"GRAYED" { MAYBE_RETURN (GRAYED); }
+"HELP" { MAYBE_RETURN (HELP); }
+"INACTIVE" { MAYBE_RETURN (INACTIVE); }
+"MENUBARBREAK" { MAYBE_RETURN (MENUBARBREAK); }
+"MENUBREAK" { MAYBE_RETURN (MENUBREAK); }
+"MESSAGETABLE" { MAYBE_RETURN (MESSAGETABLE); }
+"RCDATA" { MAYBE_RETURN (RCDATA); }
+"STRINGTABLE" { MAYBE_RETURN (STRINGTABLE); }
+"VERSIONINFO" { MAYBE_RETURN (VERSIONINFO); }
+"FILEVERSION" { MAYBE_RETURN (FILEVERSION); }
+"PRODUCTVERSION" { MAYBE_RETURN (PRODUCTVERSION); }
+"FILEFLAGSMASK" { MAYBE_RETURN (FILEFLAGSMASK); }
+"FILEFLAGS" { MAYBE_RETURN (FILEFLAGS); }
+"FILEOS" { MAYBE_RETURN (FILEOS); }
+"FILETYPE" { MAYBE_RETURN (FILETYPE); }
+"FILESUBTYPE" { MAYBE_RETURN (FILESUBTYPE); }
+"VALUE" { MAYBE_RETURN (VALUE); }
+"MOVEABLE" { MAYBE_RETURN (MOVEABLE); }
+"FIXED" { MAYBE_RETURN (FIXED); }
+"PURE" { MAYBE_RETURN (PURE); }
+"IMPURE" { MAYBE_RETURN (IMPURE); }
+"PRELOAD" { MAYBE_RETURN (PRELOAD); }
+"LOADONCALL" { MAYBE_RETURN (LOADONCALL); }
+"DISCARDABLE" { MAYBE_RETURN (DISCARDABLE); }
+"NOT" { MAYBE_RETURN (NOT); }
"BLOCK"[ \t\n]*"\""[^\#\n]*"\"" {
char *s, *send;
@@ -146,11 +163,11 @@ static char *get_string PARAMS ((int));
if (strncmp (s, "StringFileInfo",
sizeof "StringFileInfo" - 1) == 0
&& s + sizeof "StringFileInfo" - 1 == send)
- return BLOCKSTRINGFILEINFO;
+ MAYBE_RETURN (BLOCKSTRINGFILEINFO);
else if (strncmp (s, "VarFileInfo",
sizeof "VarFileInfo" - 1) == 0
&& s + sizeof "VarFileInfo" - 1 == send)
- return BLOCKVARFILEINFO;
+ MAYBE_RETURN (BLOCKVARFILEINFO);
else
{
char *r;
@@ -159,7 +176,7 @@ static char *get_string PARAMS ((int));
strncpy (r, s, send - s);
r[send - s] = '\0';
yylval.s = r;
- return BLOCK;
+ MAYBE_RETURN (BLOCK);
}
}
@@ -170,13 +187,13 @@ static char *get_string PARAMS ((int));
[0-9][x0-9A-Fa-f]*L {
yylval.i.val = strtoul (yytext, 0, 0);
yylval.i.dword = 1;
- return NUMBER;
+ MAYBE_RETURN (NUMBER);
}
[0-9][x0-9A-Fa-f]* {
yylval.i.val = strtoul (yytext, 0, 0);
yylval.i.dword = 0;
- return NUMBER;
+ MAYBE_RETURN (NUMBER);
}
("\""[^\"\n]*"\""[ \t]*)+ {
@@ -187,13 +204,13 @@ static char *get_string PARAMS ((int));
if (! rcdata_mode)
{
yylval.s = s;
- return QUOTEDSTRING;
+ MAYBE_RETURN (QUOTEDSTRING);
}
else
{
yylval.ss.length = length;
yylval.ss.s = s;
- return SIZEDSTRING;
+ MAYBE_RETURN (SIZEDSTRING);
}
}
@@ -209,12 +226,12 @@ static char *get_string PARAMS ((int));
s = get_string (strlen (yytext) + 1);
strcpy (s, yytext);
yylval.s = s;
- return STRING;
+ MAYBE_RETURN (STRING);
}
[\n] { ++rc_lineno; }
[ \t\r]+ { /* ignore whitespace */ }
-. { return *yytext; }
+. { MAYBE_RETURN (*yytext); }
%%
#ifndef yywrap
@@ -235,18 +252,18 @@ cpp_line (s)
char *send, *fn;
++s;
- while (isspace (*s))
+ while (isspace ((unsigned char) *s))
++s;
line = strtol (s, &send, 0);
- if (*send != '\0' && ! isspace (*send))
+ if (*send != '\0' && ! isspace ((unsigned char) *send))
return;
/* Subtract 1 because we are about to count the newline. */
rc_lineno = line - 1;
s = send;
- while (isspace (*s))
+ while (isspace ((unsigned char) *s))
++s;
if (*s != '"')
@@ -263,6 +280,20 @@ cpp_line (s)
free (rc_filename);
rc_filename = fn;
+
+ if (!initial_fn)
+ {
+ initial_fn = xmalloc (strlen (fn) + 1);
+ strcpy(initial_fn, fn);
+ }
+
+ /* Allow the initial file, regardless of name. Suppress all other
+ files if they end in ".h" (this allows included "*.rc") */
+ if (strcmp (initial_fn, fn) == 0
+ || strcmp (fn + strlen (fn) - 2, ".h") != 0)
+ suppress_cpp_data = 0;
+ else
+ suppress_cpp_data = 1;
}
/* Handle a quoted string. The quotes are stripped. A pair of quotes
@@ -392,8 +423,8 @@ handle_quotes (input, len)
else
{
++t;
- assert (isspace (*t));
- while (isspace (*t))
+ assert (isspace ((unsigned char) *t));
+ while (isspace ((unsigned char) *t))
++t;
if (*t == '\0')
break;
diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y
index 7b2b06e..03cbbdc 100644
--- a/contrib/binutils/binutils/rcparse.y
+++ b/contrib/binutils/binutils/rcparse.y
@@ -1,5 +1,5 @@
%{ /* rcparse.y -- parser for Windows rc files
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997, 1998 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -122,6 +122,7 @@ static unsigned long class;
%token <s> QUOTEDSTRING STRING
%token <i> NUMBER
%token <ss> SIZEDSTRING
+%token IGNORED_TOKEN
%type <pacc> acc_entries
%type <acc> acc_entry acc_event
@@ -167,6 +168,7 @@ input:
| input newcmd stringtable
| input newcmd user
| input newcmd versioninfo
+ | input newcmd IGNORED_TOKEN
;
newcmd:
@@ -223,7 +225,7 @@ acc_entry:
$$.flags |= $4;
if (($$.flags & ACC_VIRTKEY) == 0
&& ($$.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0)
- rcparse_warning ("inappropriate modifiers for non-VIRTKEY");
+ rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
}
;
@@ -247,7 +249,7 @@ acc_event:
}
$$.key = ch;
if (s[1] != '\0')
- rcparse_warning ("accelerator should only be one character");
+ rcparse_warning (_("accelerator should only be one character"));
}
| posnumexpr
{
@@ -436,7 +438,7 @@ styles:
dialog.pointsize = $3;
unicode_from_ascii ((int *) NULL, &dialog.font, $5);
if (dialog.ex == NULL)
- rcparse_warning ("extended FONT requires DIALOGEX");
+ rcparse_warning (_("extended FONT requires DIALOGEX"));
else
{
dialog.ex->weight = $6;
@@ -514,7 +516,7 @@ control:
{
$$ = $3;
if (dialog.ex == NULL)
- rcparse_warning ("IEDIT requires DIALOGEX");
+ rcparse_warning (_("IEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "BEDIT");
}
| CHECKBOX
@@ -544,7 +546,7 @@ control:
if ($11 != NULL)
{
if (dialog.ex == NULL)
- rcparse_warning ("control data requires DIALOGEX");
+ rcparse_warning (_("control data requires DIALOGEX"));
$$->data = $11;
}
}
@@ -553,10 +555,34 @@ control:
{
$$ = define_control ($2, $3, $6, $7, $8, $9, $4, style, $10);
if (dialog.ex == NULL)
- rcparse_warning ("help ID requires DIALOGEX");
+ rcparse_warning (_("help ID requires DIALOGEX"));
$$->help = $11;
$$->data = $12;
}
+ | CONTROL optstringc numexpr ',' QUOTEDSTRING control_styleexpr
+ cnumexpr cnumexpr cnumexpr cnumexpr optcnumexpr opt_control_data
+ {
+ $$ = define_control ($2, $3, $7, $8, $9, $10, 0, style, $11);
+ if ($12 != NULL)
+ {
+ if (dialog.ex == NULL)
+ rcparse_warning ("control data requires DIALOGEX");
+ $$->data = $12;
+ }
+ $$->class.named = 1;
+ unicode_from_ascii(&$$->class.u.n.length, &$$->class.u.n.name, $5);
+ }
+ | CONTROL optstringc numexpr ',' QUOTEDSTRING control_styleexpr
+ cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr opt_control_data
+ {
+ $$ = define_control ($2, $3, $7, $8, $9, $10, 0, style, $11);
+ if (dialog.ex == NULL)
+ rcparse_warning ("help ID requires DIALOGEX");
+ $$->help = $12;
+ $$->data = $13;
+ $$->class.named = 1;
+ unicode_from_ascii(&$$->class.u.n.length, &$$->class.u.n.name, $5);
+ }
| CTEXT
{
default_style = SS_CENTER | WS_GROUP;
@@ -607,7 +633,7 @@ control:
{
$$ = $3;
if (dialog.ex == NULL)
- rcparse_warning ("IEDIT requires DIALOGEX");
+ rcparse_warning (_("IEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "HEDIT");
}
| ICON optstringc numexpr cnumexpr cnumexpr opt_control_data
@@ -617,7 +643,7 @@ control:
if ($6 != NULL)
{
if (dialog.ex == NULL)
- rcparse_warning ("control data requires DIALOGEX");
+ rcparse_warning (_("control data requires DIALOGEX"));
$$->data = $6;
}
}
@@ -629,7 +655,7 @@ control:
if ($10 != NULL)
{
if (dialog.ex == NULL)
- rcparse_warning ("control data requires DIALOGEX");
+ rcparse_warning (_("control data requires DIALOGEX"));
$$->data = $10;
}
}
@@ -639,7 +665,7 @@ control:
$$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC,
style, $9);
if (dialog.ex == NULL)
- rcparse_warning ("help ID requires DIALOGEX");
+ rcparse_warning (_("help ID requires DIALOGEX"));
$$->help = $10;
$$->data = $11;
}
@@ -653,7 +679,7 @@ control:
{
$$ = $3;
if (dialog.ex == NULL)
- rcparse_warning ("IEDIT requires DIALOGEX");
+ rcparse_warning (_("IEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "IEDIT");
}
| LISTBOX
@@ -762,7 +788,7 @@ control_params:
if ($7 != NULL)
{
if (dialog.ex == NULL)
- rcparse_warning ("control data requires DIALOGEX");
+ rcparse_warning (_("control data requires DIALOGEX"));
$$->data = $7;
}
}
@@ -773,7 +799,7 @@ control_params:
if ($9 != NULL)
{
if (dialog.ex == NULL)
- rcparse_warning ("control data requires DIALOGEX");
+ rcparse_warning (_("control data requires DIALOGEX"));
$$->data = $9;
}
}
@@ -782,7 +808,7 @@ control_params:
{
$$ = define_control ($1, $2, $3, $4, $5, $6, class, style, $8);
if (dialog.ex == NULL)
- rcparse_warning ("help ID requires DIALOGEX");
+ rcparse_warning (_("help ID requires DIALOGEX"));
$$->help = $9;
$$->data = $10;
}
@@ -988,6 +1014,10 @@ menuexitem:
{
$$ = define_menuitem ($2, $3, $4, $5, 0, NULL);
}
+ | MENUITEM SEPARATOR
+ {
+ $$ = define_menuitem (NULL, 0, 0, 0, 0, NULL);
+ }
| POPUP QUOTEDSTRING BEG menuexitems END
{
$$ = define_menuitem ($2, 0, 0, 0, 0, $4);
@@ -1235,8 +1265,8 @@ id:
/* It seems that resource ID's are forced to upper case. */
copy = xstrdup ($1);
for (s = copy; *s != '\0'; s++)
- if (islower (*s))
- *s = toupper (*s);
+ if (islower ((unsigned char) *s))
+ *s = toupper ((unsigned char) *s);
res_string_to_id (&$$, copy);
free (copy);
}
@@ -1302,7 +1332,7 @@ memflags_move:
$$.language = language;
$$.memflags = MEMFLAG_MOVEABLE;
}
- | memflags_move_discard memflag
+ | memflags_move memflag
{
$$ = $1;
$$.memflags |= $2.on;
diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c
index 287b3cc..e1385c7 100644
--- a/contrib/binutils/binutils/rdcoff.c
+++ b/contrib/binutils/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 98, 99, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -201,8 +201,7 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
}
else
{
- fprintf (stderr, "%s: parse_coff_type: Bad type code 0x%x\n",
- program_name, ntype);
+ non_fatal (_("parse_coff_type: Bad type code 0x%x"), ntype);
return DEBUG_TYPE_NULL;
}
@@ -420,8 +419,8 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
if (! bfd_coff_get_syment (abfd, sym, &syment))
{
- fprintf (stderr, "%s: bfd_coff_get_syment failed: %s\n",
- program_name, bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("bfd_coff_get_syment failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return DEBUG_TYPE_NULL;
}
@@ -436,8 +435,8 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
{
if (! bfd_coff_get_auxent (abfd, sym, 0, &auxent))
{
- fprintf (stderr, "%s: bfd_coff_get_auxent failed: %s\n",
- program_name, bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("bfd_coff_get_auxent failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return DEBUG_TYPE_NULL;
}
psubaux = &auxent;
@@ -498,7 +497,7 @@ static debug_type
parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
bfd *abfd;
struct coff_symbols *symbols;
- struct coff_types *types;
+ struct coff_types *types ATTRIBUTE_UNUSED;
union internal_auxent *pauxent;
PTR dhandle;
{
@@ -528,8 +527,8 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
if (! bfd_coff_get_syment (abfd, sym, &syment))
{
- fprintf (stderr, "%s: bfd_coff_get_syment failed: %s\n",
- program_name, bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("bfd_coff_get_syment failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return DEBUG_TYPE_NULL;
}
@@ -569,7 +568,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
static boolean
parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
within_function)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
struct coff_types *types;
asymbol *sym;
long coff_symno;
@@ -709,8 +708,8 @@ parse_coff (abfd, syms, symcount, dhandle)
if (! bfd_coff_get_syment (abfd, sym, &syment))
{
- fprintf (stderr, "%s: bfd_coff_get_syment failed: %s\n",
- program_name, bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("bfd_coff_get_syment failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return false;
}
@@ -729,8 +728,8 @@ parse_coff (abfd, syms, symcount, dhandle)
{
if (! bfd_coff_get_auxent (abfd, sym, 0, &auxent))
{
- fprintf (stderr, "%s: bfd_coff_get_auxent failed: %s\n",
- program_name, bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("bfd_coff_get_auxent failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return false;
}
paux = &auxent;
@@ -795,8 +794,8 @@ parse_coff (abfd, syms, symcount, dhandle)
{
if (fnname == NULL)
{
- fprintf (stderr, "%s: %ld: .bf without preceding function\n",
- program_name, this_coff_symno);
+ non_fatal (_("%ld: .bf without preceding function"),
+ this_coff_symno);
return false;
}
@@ -845,8 +844,7 @@ parse_coff (abfd, syms, symcount, dhandle)
{
if (! within_function)
{
- fprintf (stderr, "%s: %ld: unexpected .ef\n",
- program_name, this_coff_symno);
+ non_fatal (_("%ld: unexpected .ef\n"), this_coff_symno);
return false;
}
diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c
index c9ee3a8..f9fae05 100644
--- a/contrib/binutils/binutils/rddbg.c
+++ b/contrib/binutils/binutils/rddbg.c
@@ -1,5 +1,5 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright (C) 1995, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -84,8 +84,8 @@ read_debugging_info (abfd, syms, symcount)
if (! found)
{
- fprintf (stderr, "%s: no recognized debugging information\n",
- bfd_get_filename (abfd));
+ non_fatal (_("%s: no recognized debugging information"),
+ bfd_get_filename (abfd));
return NULL;
}
@@ -159,7 +159,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
next_stroff = 0;
for (stab = stabs; stab < stabs + stabsize; stab += 12)
{
- bfd_size_type strx;
+ unsigned int strx;
int type;
int other;
int desc;
@@ -185,7 +185,17 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
char *f, *s;
f = NULL;
+
+ if (stroff + strx > strsize)
+ {
+ fprintf (stderr, "%s: %s: stab entry %d is corrupt, strx = 0x%x, type = %d\n",
+ bfd_get_filename (abfd), names[i].secname,
+ (stab - stabs) / 12, strx, type);
+ continue;
+ }
+
s = (char *) strings + stroff + strx;
+
while (s[strlen (s) - 1] == '\\'
&& stab + 12 < stabs + stabsize)
{
@@ -397,7 +407,7 @@ stab_context ()
{
int i;
- fprintf (stderr, "Last stabs entries before error:\n");
+ fprintf (stderr, _("Last stabs entries before error:\n"));
fprintf (stderr, "n_type n_desc n_value string\n");
i = saved_stabs_index;
diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c
new file mode 100644
index 0000000..81d768e
--- /dev/null
+++ b/contrib/binutils/binutils/readelf.c
@@ -0,0 +1,7362 @@
+/* readelf.c -- display contents of an ELF format file
+ Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc.
+
+ Originally developed by Eric Youngdale <eric@andante.jic.com>
+ Modifications by Nick Clifton <nickc@cygnus.com>
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <time.h>
+
+#if __GNUC__ >= 2
+/* Define BFD64 here, even if our default architecture is 32 bit ELF
+ as this will allow us to read in and parse 64bit and 32bit ELF files.
+ Only do this if we belive that the compiler can support a 64 bit
+ data type. For now we only rely on GCC being able to do this. */
+#define BFD64
+#endif
+
+#include "bfd.h"
+
+#include "elf/common.h"
+#include "elf/external.h"
+#include "elf/internal.h"
+#include "elf/dwarf2.h"
+
+/* The following headers use the elf/reloc-macros.h file to
+ automatically generate relocation recognition functions
+ such as elf_mips_reloc_type() */
+
+#define RELOC_MACROS_GEN_FUNC
+
+#include "elf/i386.h"
+#include "elf/v850.h"
+#include "elf/ppc.h"
+#include "elf/mips.h"
+#include "elf/alpha.h"
+#include "elf/arm.h"
+#include "elf/m68k.h"
+#include "elf/sparc.h"
+#include "elf/m32r.h"
+#include "elf/d10v.h"
+#include "elf/d30v.h"
+#include "elf/sh.h"
+#include "elf/mn10200.h"
+#include "elf/mn10300.h"
+#include "elf/hppa.h"
+#include "elf/arc.h"
+#include "elf/fr30.h"
+#include "elf/mcore.h"
+#include "elf/i960.h"
+#include "elf/pj.h"
+#include "elf/avr.h"
+
+#include "bucomm.h"
+#include "getopt.h"
+
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+char * program_name = "readelf";
+unsigned int dynamic_addr;
+bfd_size_type dynamic_size;
+unsigned int rela_addr;
+unsigned int rela_size;
+char * dynamic_strings;
+char * string_table;
+unsigned long num_dynamic_syms;
+Elf_Internal_Sym * dynamic_symbols;
+Elf_Internal_Syminfo * dynamic_syminfo;
+unsigned long dynamic_syminfo_offset;
+unsigned int dynamic_syminfo_nent;
+char program_interpreter [64];
+int dynamic_info[DT_JMPREL + 1];
+int version_info[16];
+int loadaddr = 0;
+Elf_Internal_Ehdr elf_header;
+Elf_Internal_Shdr * section_headers;
+Elf_Internal_Dyn * dynamic_segment;
+int show_name;
+int do_dynamic;
+int do_syms;
+int do_reloc;
+int do_sections;
+int do_segments;
+int do_using_dynamic;
+int do_header;
+int do_dump;
+int do_version;
+int do_histogram;
+int do_debugging;
+int do_debug_info;
+int do_debug_abbrevs;
+int do_debug_lines;
+int do_debug_pubnames;
+int do_debug_aranges;
+int do_arch;
+int do_notes;
+int is_32bit_elf;
+
+/* A dynamic array of flags indicating which sections require dumping. */
+char * dump_sects = NULL;
+unsigned int num_dump_sects = 0;
+
+#define HEX_DUMP (1 << 0)
+#define DISASS_DUMP (1 << 1)
+#define DEBUG_DUMP (1 << 2)
+
+/* How to rpint a vma value. */
+typedef enum print_mode
+{
+ HEX,
+ DEC,
+ DEC_5,
+ UNSIGNED,
+ PREFIX_HEX,
+ FULL_HEX,
+ LONG_HEX
+}
+print_mode;
+
+/* Forward declarations for dumb compilers. */
+static void print_vma PARAMS ((bfd_vma, print_mode));
+static bfd_vma (* byte_get) PARAMS ((unsigned char *, int));
+static bfd_vma byte_get_little_endian PARAMS ((unsigned char *, int));
+static bfd_vma byte_get_big_endian PARAMS ((unsigned char *, int));
+static const char * get_mips_dynamic_type PARAMS ((unsigned long));
+static const char * get_sparc64_dynamic_type PARAMS ((unsigned long));
+static const char * get_parisc_dynamic_type PARAMS ((unsigned long));
+static const char * get_dynamic_type PARAMS ((unsigned long));
+static int 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 char * get_machine_flags PARAMS ((unsigned, unsigned));
+static const char * get_mips_segment_type PARAMS ((unsigned long));
+static const char * get_parisc_segment_type PARAMS ((unsigned long));
+static const char * get_segment_type PARAMS ((unsigned long));
+static const char * get_mips_section_type_name PARAMS ((unsigned int));
+static const char * get_parisc_section_type_name PARAMS ((unsigned int));
+static const char * get_section_type_name PARAMS ((unsigned int));
+static const char * get_symbol_binding PARAMS ((unsigned int));
+static const char * get_symbol_type PARAMS ((unsigned int));
+static const char * get_symbol_visibility PARAMS ((unsigned int));
+static const char * get_symbol_index_type PARAMS ((unsigned int));
+static const char * get_dynamic_flags PARAMS ((bfd_vma));
+static void usage PARAMS ((void));
+static void parse_args PARAMS ((int, char **));
+static int process_file_header PARAMS ((void));
+static int process_program_headers PARAMS ((FILE *));
+static int process_section_headers PARAMS ((FILE *));
+static void dynamic_segment_mips_val PARAMS ((Elf_Internal_Dyn *));
+static void dynamic_segment_parisc_val PARAMS ((Elf_Internal_Dyn *));
+static int process_dynamic_segment PARAMS ((FILE *));
+static int process_symbol_table PARAMS ((FILE *));
+static int process_section_contents PARAMS ((FILE *));
+static void process_file PARAMS ((char *));
+static int process_relocs PARAMS ((FILE *));
+static int process_version_sections PARAMS ((FILE *));
+static char * get_ver_flags PARAMS ((unsigned int));
+static int get_32bit_section_headers PARAMS ((FILE *));
+static int get_64bit_section_headers PARAMS ((FILE *));
+static int get_32bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *));
+static int get_64bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *));
+static int get_file_header PARAMS ((FILE *));
+static Elf_Internal_Sym * get_32bit_elf_symbols PARAMS ((FILE *, unsigned long, unsigned long));
+static Elf_Internal_Sym * get_64bit_elf_symbols PARAMS ((FILE *, unsigned long, unsigned long));
+static int * get_dynamic_data PARAMS ((FILE *, unsigned int));
+static int get_32bit_dynamic_segment PARAMS ((FILE *));
+static int get_64bit_dynamic_segment PARAMS ((FILE *));
+#ifdef SUPPORT_DISASSEMBLY
+static int disassemble_section PARAMS ((Elf32_Internal_Shdr *, FILE *));
+#endif
+static int dump_section PARAMS ((Elf32_Internal_Shdr *, FILE *));
+static int display_debug_section PARAMS ((Elf32_Internal_Shdr *, FILE *));
+static int display_debug_info PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_not_supported PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_lines PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+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 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));
+static void reset_state_machine PARAMS ((int));
+static char * get_TAG_name PARAMS ((unsigned long));
+static char * get_AT_name PARAMS ((unsigned long));
+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 * display_block PARAMS ((unsigned char *, unsigned long));
+static void decode_location_expression PARAMS ((unsigned char *, unsigned int));
+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));
+static const char * get_osabi_name PARAMS ((unsigned char));
+static int guess_is_rela PARAMS ((unsigned long));
+static char * get_note_type PARAMS ((unsigned int));
+static int process_note PARAMS ((Elf32_Internal_Note *));
+static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma));
+static int process_corefile_note_segments PARAMS ((FILE *));
+static int process_corefile_contents PARAMS ((FILE *));
+
+typedef int Elf32_Word;
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#define UNKNOWN -1
+
+#define SECTION_NAME(X) (string_table + (X)->sh_name)
+
+#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
+
+#define BYTE_GET(field) byte_get (field, sizeof (field))
+
+/* If we can support a 64 bit data type then BFD64 should be defined
+ and sizeof (bfd_vma) == 8. In this case when translating from an
+ external 8 byte field to an internal field, we can assume that the
+ internal field is also 8 bytes wide and so we can extact all the data.
+ If, however, BFD64 is not defined, then we must assume that the
+ internal data structure only has 4 byte wide fields that are the
+ equivalent of the 8 byte wide external counterparts, and so we must
+ truncate the data. */
+#ifdef BFD64
+#define BYTE_GET8(field) byte_get (field, -8)
+#else
+#define BYTE_GET8(field) byte_get (field, 8)
+#endif
+
+#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0]))
+
+#define GET_DATA_ALLOC(offset, size, var, type, reason) \
+ if (fseek (file, offset, SEEK_SET)) \
+ { \
+ error (_("Unable to seek to start of %s at %x\n"), reason, offset); \
+ return 0; \
+ } \
+ \
+ var = (type) malloc (size); \
+ \
+ if (var == NULL) \
+ { \
+ error (_("Out of memory allocating %d bytes for %s\n"), size, reason); \
+ return 0; \
+ } \
+ \
+ if (fread (var, size, 1, file) != 1) \
+ { \
+ error (_("Unable to read in %d bytes of %s\n"), size, reason); \
+ free (var); \
+ var = NULL; \
+ return 0; \
+ }
+
+
+#define GET_DATA(offset, var, reason) \
+ if (fseek (file, offset, SEEK_SET)) \
+ { \
+ error (_("Unable to seek to %x for %s\n"), offset, reason); \
+ return 0; \
+ } \
+ else if (fread (& var, sizeof (var), 1, file) != 1) \
+ { \
+ error (_("Unable to read data at %x for %s\n"), offset, reason); \
+ return 0; \
+ }
+
+#define GET_ELF_SYMBOLS(file, offset, size) \
+ (is_32bit_elf ? get_32bit_elf_symbols (file, offset, size) \
+ : get_64bit_elf_symbols (file, offset, size))
+
+
+#ifdef ANSI_PROTOTYPES
+static void
+error (const char * message, ...)
+{
+ va_list args;
+
+ fprintf (stderr, _("%s: Error: "), program_name);
+ va_start (args, message);
+ vfprintf (stderr, message, args);
+ va_end (args);
+ return;
+}
+
+static void
+warn (const char * message, ...)
+{
+ va_list args;
+
+ fprintf (stderr, _("%s: Warning: "), program_name);
+ va_start (args, message);
+ vfprintf (stderr, message, args);
+ va_end (args);
+ return;
+}
+#else
+static void
+error (va_alist)
+ va_dcl
+{
+ char * message;
+ va_list args;
+
+ fprintf (stderr, _("%s: Error: "), program_name);
+ va_start (args);
+ message = va_arg (args, char *);
+ vfprintf (stderr, message, args);
+ va_end (args);
+ return;
+}
+
+static void
+warn (va_alist)
+ va_dcl
+{
+ char * message;
+ va_list args;
+
+ fprintf (stderr, _("%s: Warning: "), program_name);
+ va_start (args);
+ message = va_arg (args, char *);
+ vfprintf (stderr, message, args);
+ va_end (args);
+ return;
+}
+#endif
+
+static bfd_vma
+byte_get_little_endian (field, size)
+ unsigned char * field;
+ int size;
+{
+ switch (size)
+ {
+ case 1:
+ return * field;
+
+ case 2:
+ return ((unsigned int) (field [0]))
+ | (((unsigned int) (field [1])) << 8);
+
+ case 8:
+ /* We want to extract data from an 8 byte wide field and
+ place it into a 4 byte wide field. Since this is a little
+ endian source we can juts use the 4 byte extraction code. */
+ /* Fall through. */
+ case 4:
+ return ((unsigned long) (field [0]))
+ | (((unsigned long) (field [1])) << 8)
+ | (((unsigned long) (field [2])) << 16)
+ | (((unsigned long) (field [3])) << 24);
+
+#ifdef BFD64
+ case -8:
+ /* This is a special case, generated by the BYTE_GET8 macro.
+ It means that we are loading an 8 byte value from a field
+ in an external structure into an 8 byte value in a field
+ in an internal strcuture. */
+ return ((bfd_vma) (field [0]))
+ | (((bfd_vma) (field [1])) << 8)
+ | (((bfd_vma) (field [2])) << 16)
+ | (((bfd_vma) (field [3])) << 24)
+ | (((bfd_vma) (field [4])) << 32)
+ | (((bfd_vma) (field [5])) << 40)
+ | (((bfd_vma) (field [6])) << 48)
+ | (((bfd_vma) (field [7])) << 56);
+#endif
+ default:
+ error (_("Unhandled data length: %d\n"), size);
+ abort ();
+ }
+}
+
+/* Print a VMA value. */
+static void
+print_vma (vma, mode)
+ bfd_vma vma;
+ print_mode mode;
+{
+#ifdef BFD64
+ if (is_32bit_elf)
+#endif
+ {
+ switch (mode)
+ {
+ case FULL_HEX: printf ("0x"); /* drop through */
+ case LONG_HEX: printf ("%8.8lx", (unsigned long) vma); break;
+ case PREFIX_HEX: printf ("0x"); /* drop through */
+ case HEX: printf ("%lx", (unsigned long) vma); break;
+ case DEC: printf ("%ld", (unsigned long) vma); break;
+ case DEC_5: printf ("%5ld", (long) vma); break;
+ case UNSIGNED: printf ("%lu", (unsigned long) vma); break;
+ }
+ }
+#ifdef BFD64
+ else
+ {
+ switch (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);
+#else
+ if (_bfd_int64_high (vma))
+ printf ("%lx%lx", _bfd_int64_high (vma), _bfd_int64_low (vma));
+ else
+ printf ("%lx", _bfd_int64_low (vma));
+#endif
+ break;
+
+ case DEC:
+#if BFD_HOST_64BIT_LONG
+ printf ("%ld", vma);
+#else
+ if (_bfd_int64_high (vma))
+ /* ugg */
+ printf ("++%ld", _bfd_int64_low (vma));
+ else
+ printf ("%ld", _bfd_int64_low (vma));
+#endif
+ break;
+
+ case DEC_5:
+#if BFD_HOST_64BIT_LONG
+ printf ("%5ld", vma);
+#else
+ if (_bfd_int64_high (vma))
+ /* ugg */
+ printf ("++%ld", _bfd_int64_low (vma));
+ else
+ printf ("%5ld", _bfd_int64_low (vma));
+#endif
+ break;
+
+ case UNSIGNED:
+#if BFD_HOST_64BIT_LONG
+ printf ("%lu", vma);
+#else
+ if (_bfd_int64_high (vma))
+ /* ugg */
+ printf ("++%lu", _bfd_int64_low (vma));
+ else
+ printf ("%lu", _bfd_int64_low (vma));
+#endif
+ break;
+ }
+ }
+#endif
+}
+
+static bfd_vma
+byte_get_big_endian (field, size)
+ unsigned char * field;
+ int size;
+{
+ switch (size)
+ {
+ case 1:
+ return * field;
+
+ case 2:
+ return ((unsigned int) (field [1])) | (((int) (field [0])) << 8);
+
+ case 4:
+ return ((unsigned long) (field [3]))
+ | (((unsigned long) (field [2])) << 8)
+ | (((unsigned long) (field [1])) << 16)
+ | (((unsigned long) (field [0])) << 24);
+
+ case 8:
+ /* Although we are extracing data from an 8 byte wide field, we
+ are returning only 4 bytes of data. */
+ return ((unsigned long) (field [7]))
+ | (((unsigned long) (field [6])) << 8)
+ | (((unsigned long) (field [5])) << 16)
+ | (((unsigned long) (field [4])) << 24);
+
+#ifdef BFD64
+ case -8:
+ /* This is a special case, generated by the BYTE_GET8 macro.
+ It means that we are loading an 8 byte value from a field
+ in an external structure into an 8 byte value in a field
+ in an internal strcuture. */
+ return ((bfd_vma) (field [7]))
+ | (((bfd_vma) (field [6])) << 8)
+ | (((bfd_vma) (field [5])) << 16)
+ | (((bfd_vma) (field [4])) << 24)
+ | (((bfd_vma) (field [3])) << 32)
+ | (((bfd_vma) (field [2])) << 40)
+ | (((bfd_vma) (field [1])) << 48)
+ | (((bfd_vma) (field [0])) << 56);
+#endif
+
+ default:
+ error (_("Unhandled data length: %d\n"), size);
+ abort ();
+ }
+}
+
+
+/* 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;
+{
+ switch (e_machine)
+ {
+ /* Targets that use REL relocations. */
+ case EM_ARM:
+ case EM_386:
+ case EM_486:
+ case EM_960:
+ case EM_CYGNUS_M32R:
+ case EM_CYGNUS_D10V:
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ return FALSE;
+
+ /* Targets that use RELA relocations. */
+ case EM_68K:
+ case EM_SPARC32PLUS:
+ case EM_SPARCV9:
+ case EM_SPARC:
+ case EM_PPC:
+ case EM_CYGNUS_V850:
+ case EM_CYGNUS_D30V:
+ case EM_CYGNUS_MN10200:
+ case EM_CYGNUS_MN10300:
+ case EM_CYGNUS_FR30:
+ case EM_SH:
+ case EM_ALPHA:
+ case EM_MCORE:
+ return TRUE;
+
+ case EM_MMA:
+ case EM_PCP:
+ case EM_NCPU:
+ case EM_NDR1:
+ case EM_STARCORE:
+ case EM_ME16:
+ case EM_ST100:
+ case EM_TINYJ:
+ case EM_FX66:
+ case EM_ST9PLUS:
+ case EM_ST7:
+ case EM_68HC16:
+ case EM_68HC11:
+ case EM_68HC08:
+ case EM_68HC05:
+ case EM_SVX:
+ case EM_ST19:
+ case EM_VAX:
+ default:
+ warn (_("Don't know about relocations on this machine architecture\n"));
+ return FALSE;
+ }
+}
+
+/* Display the contents of the relocation data found at the specified offset. */
+static int
+dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
+ FILE * file;
+ unsigned long rel_offset;
+ unsigned long rel_size;
+ Elf_Internal_Sym * symtab;
+ unsigned long nsyms;
+ char * strtab;
+ int is_rela;
+{
+ unsigned int i;
+ Elf_Internal_Rel * rels;
+ Elf_Internal_Rela * relas;
+
+
+ if (is_rela == UNKNOWN)
+ is_rela = guess_is_rela (elf_header.e_machine);
+
+ if (is_rela)
+ {
+ if (is_32bit_elf)
+ {
+ Elf32_External_Rela * erelas;
+
+ GET_DATA_ALLOC (rel_offset, rel_size, erelas,
+ Elf32_External_Rela *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf32_External_Rela);
+
+ relas = (Elf_Internal_Rela *)
+ malloc (rel_size * sizeof (Elf_Internal_Rela));
+
+ if (relas == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ relas[i].r_offset = BYTE_GET (erelas[i].r_offset);
+ relas[i].r_info = BYTE_GET (erelas[i].r_info);
+ relas[i].r_addend = BYTE_GET (erelas[i].r_addend);
+ }
+
+ free (erelas);
+
+ rels = (Elf_Internal_Rel *) relas;
+ }
+ else
+ {
+ Elf64_External_Rela * erelas;
+
+ GET_DATA_ALLOC (rel_offset, rel_size, erelas,
+ Elf64_External_Rela *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf64_External_Rela);
+
+ relas = (Elf_Internal_Rela *)
+ malloc (rel_size * sizeof (Elf_Internal_Rela));
+
+ if (relas == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset);
+ relas[i].r_info = BYTE_GET8 (erelas[i].r_info);
+ relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend);
+ }
+
+ free (erelas);
+
+ rels = (Elf_Internal_Rel *) relas;
+ }
+ }
+ else
+ {
+ if (is_32bit_elf)
+ {
+ Elf32_External_Rel * erels;
+
+ GET_DATA_ALLOC (rel_offset, rel_size, erels,
+ Elf32_External_Rel *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf32_External_Rel);
+
+ rels = (Elf_Internal_Rel *)
+ malloc (rel_size * sizeof (Elf_Internal_Rel));
+
+ if (rels == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ rels[i].r_offset = BYTE_GET (erels[i].r_offset);
+ rels[i].r_info = BYTE_GET (erels[i].r_info);
+ }
+
+ free (erels);
+
+ relas = (Elf_Internal_Rela *) rels;
+ }
+ else
+ {
+ Elf64_External_Rel * erels;
+
+ GET_DATA_ALLOC (rel_offset, rel_size, erels,
+ Elf64_External_Rel *, "relocs");
+
+ rel_size = rel_size / sizeof (Elf64_External_Rel);
+
+ rels = (Elf_Internal_Rel *)
+ malloc (rel_size * sizeof (Elf_Internal_Rel));
+
+ if (rels == NULL)
+ {
+ error(_("out of memory parsing relocs"));
+ return 0;
+ }
+
+ for (i = 0; i < rel_size; i++)
+ {
+ rels[i].r_offset = BYTE_GET8 (erels[i].r_offset);
+ rels[i].r_info = BYTE_GET8 (erels[i].r_info);
+ }
+
+ free (erels);
+
+ relas = (Elf_Internal_Rela *) rels;
+ }
+ }
+
+ if (is_rela)
+ printf
+ (_(" Offset Info Type Symbol's Value Symbol's Name Addend\n"));
+ else
+ printf
+ (_(" Offset Info Type Symbol's Value Symbol's Name\n"));
+
+ for (i = 0; i < rel_size; i++)
+ {
+ const char * rtype;
+ bfd_vma offset;
+ bfd_vma info;
+ bfd_vma symtab_index;
+ bfd_vma type;
+
+ if (is_rela)
+ {
+ offset = relas [i].r_offset;
+ info = relas [i].r_info;
+ }
+ else
+ {
+ offset = rels [i].r_offset;
+ info = rels [i].r_info;
+ }
+
+ if (is_32bit_elf)
+ {
+ type = ELF32_R_TYPE (info);
+ symtab_index = ELF32_R_SYM (info);
+ }
+ else
+ {
+ if (elf_header.e_machine == EM_SPARCV9)
+ type = ELF64_R_TYPE_ID (info);
+ else
+ type = ELF64_R_TYPE (info);
+ /* The #ifdef BFD64 below is to prevent a compile time warning.
+ We know that if we do not have a 64 bit data type that we
+ will never execute this code anyway. */
+#ifdef BFD64
+ symtab_index = ELF64_R_SYM (info);
+#endif
+ }
+
+#ifdef _bfd_int64_low
+ printf (" %8.8lx %5.5lx ", _bfd_int64_low (offset), _bfd_int64_low (info));
+#else
+ printf (" %8.8lx %5.5lx ", offset, info);
+#endif
+
+ switch (elf_header.e_machine)
+ {
+ default:
+ rtype = NULL;
+ break;
+
+ case EM_CYGNUS_M32R:
+ rtype = elf_m32r_reloc_type (type);
+ break;
+
+ case EM_386:
+ case EM_486:
+ rtype = elf_i386_reloc_type (type);
+ break;
+
+ case EM_68K:
+ rtype = elf_m68k_reloc_type (type);
+ break;
+
+ case EM_960:
+ rtype = elf_i960_reloc_type (type);
+ break;
+
+ case EM_AVR:
+ rtype = elf_avr_reloc_type (type);
+ break;
+
+ case EM_OLD_SPARCV9:
+ case EM_SPARC32PLUS:
+ case EM_SPARCV9:
+ case EM_SPARC:
+ rtype = elf_sparc_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_V850:
+ rtype = v850_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_D10V:
+ rtype = elf_d10v_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_D30V:
+ rtype = elf_d30v_reloc_type (type);
+ break;
+
+ case EM_SH:
+ rtype = elf_sh_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_MN10300:
+ rtype = elf_mn10300_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_MN10200:
+ rtype = elf_mn10200_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_FR30:
+ rtype = elf_fr30_reloc_type (type);
+ break;
+
+ case EM_MCORE:
+ rtype = elf_mcore_reloc_type (type);
+ break;
+
+ case EM_PPC:
+ rtype = elf_ppc_reloc_type (type);
+ break;
+
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ rtype = elf_mips_reloc_type (type);
+ break;
+
+ case EM_ALPHA:
+ rtype = elf_alpha_reloc_type (type);
+ break;
+
+ case EM_ARM:
+ rtype = elf_arm_reloc_type (type);
+ break;
+
+ case EM_CYGNUS_ARC:
+ rtype = elf_arc_reloc_type (type);
+ break;
+
+ case EM_PARISC:
+ rtype = elf_hppa_reloc_type (type);
+ break;
+
+ case EM_PJ:
+ rtype = elf_pj_reloc_type (type);
+ break;
+ }
+
+ if (rtype == NULL)
+#ifdef _bfd_int64_low
+ printf (_("unrecognised: %-7lx"), _bfd_int64_low (type));
+#else
+ printf (_("unrecognised: %-7lx"), type);
+#endif
+ else
+ printf ("%-21.21s", rtype);
+
+ if (symtab_index)
+ {
+ if (symtab != NULL)
+ {
+ if (symtab_index >= nsyms)
+ printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
+ else
+ {
+ Elf_Internal_Sym * psym;
+
+ psym = symtab + symtab_index;
+
+ printf (" ");
+ print_vma (psym->st_value, LONG_HEX);
+ printf (" ");
+
+ if (psym->st_name == 0)
+ printf ("%-25.25s",
+ SECTION_NAME (section_headers + psym->st_shndx));
+ else if (strtab == NULL)
+ printf (_("<string table index %3ld>"), psym->st_name);
+ else
+ printf ("%-25.25s", strtab + psym->st_name);
+
+ if (is_rela)
+ printf (" + %lx", (unsigned long) relas [i].r_addend);
+ }
+ }
+ }
+ else if (is_rela)
+ {
+ printf ("%*c", is_32bit_elf ? 34 : 26, ' ');
+ print_vma (relas[i].r_addend, LONG_HEX);
+ }
+
+ if (elf_header.e_machine == EM_SPARCV9
+ && !strcmp (rtype, "R_SPARC_OLO10"))
+ printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info));
+
+ putchar ('\n');
+ }
+
+ free (relas);
+
+ return 1;
+}
+
+static const char *
+get_mips_dynamic_type (type)
+ unsigned long type;
+{
+ switch (type)
+ {
+ case DT_MIPS_RLD_VERSION: return "MIPS_RLD_VERSION";
+ case DT_MIPS_TIME_STAMP: return "MIPS_TIME_STAMP";
+ case DT_MIPS_ICHECKSUM: return "MIPS_ICHECKSUM";
+ case DT_MIPS_IVERSION: return "MIPS_IVERSION";
+ case DT_MIPS_FLAGS: return "MIPS_FLAGS";
+ case DT_MIPS_BASE_ADDRESS: return "MIPS_BASE_ADDRESS";
+ case DT_MIPS_MSYM: return "MIPS_MSYM";
+ case DT_MIPS_CONFLICT: return "MIPS_CONFLICT";
+ case DT_MIPS_LIBLIST: return "MIPS_LIBLIST";
+ case DT_MIPS_LOCAL_GOTNO: return "MIPS_LOCAL_GOTNO";
+ case DT_MIPS_CONFLICTNO: return "MIPS_CONFLICTNO";
+ case DT_MIPS_LIBLISTNO: return "MIPS_LIBLISTNO";
+ case DT_MIPS_SYMTABNO: return "MIPS_SYMTABNO";
+ case DT_MIPS_UNREFEXTNO: return "MIPS_UNREFEXTNO";
+ case DT_MIPS_GOTSYM: return "MIPS_GOTSYM";
+ case DT_MIPS_HIPAGENO: return "MIPS_HIPAGENO";
+ case DT_MIPS_RLD_MAP: return "MIPS_RLD_MAP";
+ case DT_MIPS_DELTA_CLASS: return "MIPS_DELTA_CLASS";
+ case DT_MIPS_DELTA_CLASS_NO: return "MIPS_DELTA_CLASS_NO";
+ case DT_MIPS_DELTA_INSTANCE: return "MIPS_DELTA_INSTANCE";
+ case DT_MIPS_DELTA_INSTANCE_NO: return "MIPS_DELTA_INSTANCE_NO";
+ case DT_MIPS_DELTA_RELOC: return "MIPS_DELTA_RELOC";
+ case DT_MIPS_DELTA_RELOC_NO: return "MIPS_DELTA_RELOC_NO";
+ case DT_MIPS_DELTA_SYM: return "MIPS_DELTA_SYM";
+ case DT_MIPS_DELTA_SYM_NO: return "MIPS_DELTA_SYM_NO";
+ case DT_MIPS_DELTA_CLASSSYM: return "MIPS_DELTA_CLASSSYM";
+ case DT_MIPS_DELTA_CLASSSYM_NO: return "MIPS_DELTA_CLASSSYM_NO";
+ case DT_MIPS_CXX_FLAGS: return "MIPS_CXX_FLAGS";
+ case DT_MIPS_PIXIE_INIT: return "MIPS_PIXIE_INIT";
+ case DT_MIPS_SYMBOL_LIB: return "MIPS_SYMBOL_LIB";
+ case DT_MIPS_LOCALPAGE_GOTIDX: return "MIPS_LOCALPAGE_GOTIDX";
+ case DT_MIPS_LOCAL_GOTIDX: return "MIPS_LOCAL_GOTIDX";
+ case DT_MIPS_HIDDEN_GOTIDX: return "MIPS_HIDDEN_GOTIDX";
+ case DT_MIPS_PROTECTED_GOTIDX: return "MIPS_PROTECTED_GOTIDX";
+ case DT_MIPS_OPTIONS: return "MIPS_OPTIONS";
+ case DT_MIPS_INTERFACE: return "MIPS_INTERFACE";
+ case DT_MIPS_DYNSTR_ALIGN: return "MIPS_DYNSTR_ALIGN";
+ case DT_MIPS_INTERFACE_SIZE: return "MIPS_INTERFACE_SIZE";
+ case DT_MIPS_RLD_TEXT_RESOLVE_ADDR: return "MIPS_RLD_TEXT_RESOLVE_ADDR";
+ case DT_MIPS_PERF_SUFFIX: return "MIPS_PERF_SUFFIX";
+ case DT_MIPS_COMPACT_SIZE: return "MIPS_COMPACT_SIZE";
+ case DT_MIPS_GP_VALUE: return "MIPS_GP_VALUE";
+ case DT_MIPS_AUX_DYNAMIC: return "MIPS_AUX_DYNAMIC";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
+get_sparc64_dynamic_type (type)
+ unsigned long type;
+{
+ switch (type)
+ {
+ case DT_SPARC_REGISTER: return "SPARC_REGISTER";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
+get_parisc_dynamic_type (type)
+ unsigned long type;
+{
+ switch (type)
+ {
+ case DT_HP_LOAD_MAP: return "HP_LOAD_MAP";
+ case DT_HP_DLD_FLAGS: return "HP_DLD_FLAGS";
+ case DT_HP_DLD_HOOK: return "HP_DLD_HOOK";
+ case DT_HP_UX10_INIT: return "HP_UX10_INIT";
+ case DT_HP_UX10_INITSZ: return "HP_UX10_INITSZ";
+ case DT_HP_PREINIT: return "HP_PREINIT";
+ case DT_HP_PREINITSZ: return "HP_PREINITSZ";
+ case DT_HP_NEEDED: return "HP_NEEDED";
+ case DT_HP_TIME_STAMP: return "HP_TIME_STAMP";
+ case DT_HP_CHECKSUM: return "HP_CHECKSUM";
+ case DT_HP_GST_SIZE: return "HP_GST_SIZE";
+ case DT_HP_GST_VERSION: return "HP_GST_VERSION";
+ case DT_HP_GST_HASHVAL: return "HP_GST_HASHVAL";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
+get_dynamic_type (type)
+ unsigned long type;
+{
+ static char buff [32];
+
+ switch (type)
+ {
+ case DT_NULL: return "NULL";
+ case DT_NEEDED: return "NEEDED";
+ case DT_PLTRELSZ: return "PLTRELSZ";
+ case DT_PLTGOT: return "PLTGOT";
+ case DT_HASH: return "HASH";
+ case DT_STRTAB: return "STRTAB";
+ case DT_SYMTAB: return "SYMTAB";
+ case DT_RELA: return "RELA";
+ case DT_RELASZ: return "RELASZ";
+ case DT_RELAENT: return "RELAENT";
+ case DT_STRSZ: return "STRSZ";
+ case DT_SYMENT: return "SYMENT";
+ case DT_INIT: return "INIT";
+ case DT_FINI: return "FINI";
+ case DT_SONAME: return "SONAME";
+ case DT_RPATH: return "RPATH";
+ case DT_SYMBOLIC: return "SYMBOLIC";
+ case DT_REL: return "REL";
+ case DT_RELSZ: return "RELSZ";
+ case DT_RELENT: return "RELENT";
+ case DT_PLTREL: return "PLTREL";
+ case DT_DEBUG: return "DEBUG";
+ case DT_TEXTREL: return "TEXTREL";
+ case DT_JMPREL: return "JMPREL";
+ case DT_BIND_NOW: return "BIND_NOW";
+ case DT_INIT_ARRAY: return "INIT_ARRAY";
+ case DT_FINI_ARRAY: return "FINI_ARRAY";
+ case DT_INIT_ARRAYSZ: return "INIT_ARRAYSZ";
+ case DT_FINI_ARRAYSZ: return "FINI_ARRAYSZ";
+ case DT_RUNPATH: return "RUNPATH";
+ case DT_FLAGS: return "FLAGS";
+
+ case DT_PREINIT_ARRAY: return "PREINIT_ARRAY";
+ case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ";
+
+ case DT_PLTPADSZ: return "PLTPADSZ";
+ case DT_MOVEENT: return "MOVEENT";
+ case DT_MOVESZ: return "MOVESZ";
+ case DT_FEATURE_1: return "FEATURE_1";
+ case DT_POSFLAG_1: return "POSFLAG_1";
+ case DT_SYMINSZ: return "SYMINSZ";
+ case DT_SYMINENT: return "SYMINENT"; /* aka VALRNGHI */
+
+ case DT_ADDRRNGLO: return "ADDRRNGLO";
+ case DT_SYMINFO: return "SYMINFO"; /* aka ADDRRNGHI */
+
+ case DT_VERSYM: return "VERSYM";
+
+ case DT_RELACOUNT: return "RELACOUNT";
+ case DT_RELCOUNT: return "RELCOUNT";
+ case DT_FLAGS_1: return "FLAGS_1";
+ case DT_VERDEF: return "VERDEF";
+ case DT_VERDEFNUM: return "VERDEFNUM";
+ case DT_VERNEED: return "VERNEED";
+ case DT_VERNEEDNUM: return "VERNEEDNUM";
+
+ case DT_AUXILIARY: return "AUXILARY";
+ case DT_USED: return "USED";
+ case DT_FILTER: return "FILTER";
+
+ default:
+ if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
+ {
+ const char * result;
+
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ result = get_mips_dynamic_type (type);
+ break;
+ case EM_SPARCV9:
+ result = get_sparc64_dynamic_type (type);
+ break;
+ default:
+ result = NULL;
+ break;
+ }
+
+ if (result != NULL)
+ return result;
+
+ sprintf (buff, _("Processor Specific: %lx"), type);
+ }
+ else if ((type >= DT_LOOS) && (type <= DT_HIOS))
+ {
+ const char * result;
+
+ switch (elf_header.e_machine)
+ {
+ case EM_PARISC:
+ result = get_parisc_dynamic_type (type);
+ break;
+ default:
+ result = NULL;
+ break;
+ }
+
+ if (result != NULL)
+ return result;
+
+ sprintf (buff, _("Operating System specific: %lx"), type);
+ }
+ else
+ sprintf (buff, _("<unknown>: %lx"), type);
+
+ return buff;
+ }
+}
+
+static char *
+get_file_type (e_type)
+ unsigned e_type;
+{
+ static char buff [32];
+
+ switch (e_type)
+ {
+ case ET_NONE: return _("NONE (None)");
+ case ET_REL: return _("REL (Relocatable file)");
+ case ET_EXEC: return _("EXEC (Executable file)");
+ case ET_DYN: return _("DYN (Shared object file)");
+ case ET_CORE: return _("CORE (Core file)");
+
+ default:
+ if ((e_type >= ET_LOPROC) && (e_type <= ET_HIPROC))
+ sprintf (buff, _("Processor Specific: (%x)"), e_type);
+ else if ((e_type >= ET_LOOS) && (e_type <= ET_HIOS))
+ sprintf (buff, _("OS Specific: (%x)"), e_type);
+ else
+ sprintf (buff, _("<unknown>: %x"), e_type);
+ return buff;
+ }
+}
+
+static char *
+get_machine_name (e_machine)
+ unsigned e_machine;
+{
+ static char buff [64]; /* XXX */
+
+ switch (e_machine)
+ {
+ case EM_NONE: return _("None");
+ case EM_M32: return "WE32100";
+ case EM_SPARC: return "Sparc";
+ case EM_386: return "Intel 80386";
+ case EM_68K: return "MC68000";
+ case EM_88K: return "MC88000";
+ case EM_486: return "Intel 80486";
+ case EM_860: return "Intel 80860";
+ case EM_MIPS: return "MIPS R3000";
+ case EM_S370: return "IBM System/370";
+ case EM_MIPS_RS4_BE: return "MIPS R4000 big-endian";
+ case EM_OLD_SPARCV9: return "Sparc v9 (old)";
+ case EM_PARISC: return "HPPA";
+ case EM_PPC_OLD: return "Power PC (old)";
+ case EM_SPARC32PLUS: return "Sparc v8+" ;
+ case EM_960: return "Intel 90860";
+ case EM_PPC: return "PowerPC";
+ case EM_V800: return "NEC V800";
+ case EM_FR20: return "Fujitsu FR20";
+ case EM_RH32: return "TRW RH32";
+ case EM_MCORE: return "MCORE";
+ case EM_ARM: return "ARM";
+ case EM_OLD_ALPHA: return "Digital Alpha (old)";
+ case EM_SH: return "Hitachi SH";
+ case EM_SPARCV9: return "Sparc v9";
+ case EM_TRICORE: return "Siemens Tricore";
+ case EM_ARC: return "Argonaut RISC Core";
+ case EM_H8_300: return "Hitachi H8/300";
+ case EM_H8_300H: return "Hitachi H8/300H";
+ case EM_H8S: return "Hitachi H8S";
+ case EM_H8_500: return "Hitachi H8/500";
+ case EM_IA_64: return "Intel IA-64";
+ case EM_MIPS_X: return "Stanford MIPS-X";
+ case EM_COLDFIRE: return "Motorola Coldfire";
+ case EM_68HC12: return "Motorola M68HC12";
+ case EM_ALPHA: return "Alpha";
+ case EM_CYGNUS_D10V: return "d10v";
+ case EM_CYGNUS_D30V: return "d30v";
+ 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";
+ case EM_CYGNUS_MN10200: return "mn10200";
+ case EM_CYGNUS_FR30: return "Fujitsu FR30";
+ case EM_PJ: return "picoJava";
+ case EM_MMA: return "Fujitsu Multimedia Accelerator";
+ case EM_PCP: return "Siemens PCP";
+ case EM_NCPU: return "Sony nCPU embedded RISC processor";
+ case EM_NDR1: return "Denso NDR1 microprocesspr";
+ case EM_STARCORE: return "Motorola Star*Core processor";
+ case EM_ME16: return "Toyota ME16 processor";
+ case EM_ST100: return "STMicroelectronics ST100 processor";
+ case EM_TINYJ: return "Advanced Logic Corp. TinyJ embedded processor";
+ case EM_FX66: return "Siemens FX66 microcontroller";
+ case EM_ST9PLUS: return "STMicroelectronics ST9+ 8/16 bit microcontroller";
+ case EM_ST7: return "STMicroelectronics ST7 8-bit microcontroller";
+ case EM_68HC16: return "Motorola MC68HC16 Microcontroller";
+ case EM_68HC11: return "Motorola MC68HC11 Microcontroller";
+ case EM_68HC08: return "Motorola MC68HC08 Microcontroller";
+ case EM_68HC05: return "Motorola MC68HC05 Microcontroller";
+ case EM_SVX: return "Silicon Graphics SVx";
+ case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller";
+ case EM_VAX: return "Digital VAX";
+ default:
+ sprintf (buff, _("<unknown>: %x"), e_machine);
+ return buff;
+ }
+}
+
+static char *
+get_machine_flags (e_flags, e_machine)
+ unsigned e_flags;
+ unsigned e_machine;
+{
+ static char buf [1024];
+
+ buf[0] = '\0';
+
+ if (e_flags)
+ {
+ switch (e_machine)
+ {
+ default:
+ break;
+
+ case EM_68K:
+ if (e_flags & EF_CPU32)
+ strcat (buf, ", cpu32");
+ break;
+
+ case EM_PPC:
+ if (e_flags & EF_PPC_EMB)
+ strcat (buf, ", emb");
+
+ if (e_flags & EF_PPC_RELOCATABLE)
+ strcat (buf, ", relocatable");
+
+ if (e_flags & EF_PPC_RELOCATABLE_LIB)
+ strcat (buf, ", relocatable-lib");
+ break;
+
+ case EM_CYGNUS_V850:
+ switch (e_flags & EF_V850_ARCH)
+ {
+ case E_V850E_ARCH:
+ strcat (buf, ", v850e");
+ break;
+ case E_V850EA_ARCH:
+ strcat (buf, ", v850ea");
+ break;
+ case E_V850_ARCH:
+ strcat (buf, ", v850");
+ break;
+ default:
+ strcat (buf, ", unknown v850 architecture variant");
+ break;
+ }
+ break;
+
+ case EM_CYGNUS_M32R:
+ if ((e_flags & EF_M32R_ARCH) == E_M32R_ARCH)
+ strcat (buf, ", m32r");
+
+ break;
+
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ if (e_flags & EF_MIPS_NOREORDER)
+ strcat (buf, ", noreorder");
+
+ if (e_flags & EF_MIPS_PIC)
+ strcat (buf, ", pic");
+
+ if (e_flags & EF_MIPS_CPIC)
+ strcat (buf, ", cpic");
+
+ if (e_flags & EF_MIPS_ABI2)
+ strcat (buf, ", abi2");
+
+ if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_1)
+ strcat (buf, ", mips1");
+
+ if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2)
+ strcat (buf, ", mips2");
+
+ if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_3)
+ strcat (buf, ", mips3");
+
+ if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4)
+ strcat (buf, ", mips4");
+ break;
+
+ case EM_SPARCV9:
+ if (e_flags & EF_SPARC_32PLUS)
+ strcat (buf, ", v8+");
+
+ if (e_flags & EF_SPARC_SUN_US1)
+ strcat (buf, ", ultrasparcI");
+
+ if (e_flags & EF_SPARC_SUN_US3)
+ strcat (buf, ", ultrasparcIII");
+
+ if (e_flags & EF_SPARC_HAL_R1)
+ strcat (buf, ", halr1");
+
+ if (e_flags & EF_SPARC_LEDATA)
+ strcat (buf, ", ledata");
+
+ if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_TSO)
+ strcat (buf, ", tso");
+
+ if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_PSO)
+ strcat (buf, ", pso");
+
+ if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_RMO)
+ strcat (buf, ", rmo");
+ break;
+
+ case EM_PARISC:
+ switch (e_flags & EF_PARISC_ARCH)
+ {
+ case EFA_PARISC_1_0:
+ strcpy (buf, ", PA-RISC 1.0");
+ break;
+ case EFA_PARISC_1_1:
+ strcpy (buf, ", PA-RISC 1.1");
+ break;
+ case EFA_PARISC_2_0:
+ strcpy (buf, ", PA-RISC 2.0");
+ break;
+ default:
+ break;
+ }
+ if (e_flags & EF_PARISC_TRAPNIL)
+ strcat (buf, ", trapnil");
+ if (e_flags & EF_PARISC_EXT)
+ strcat (buf, ", ext");
+ if (e_flags & EF_PARISC_LSB)
+ strcat (buf, ", lsb");
+ if (e_flags & EF_PARISC_WIDE)
+ strcat (buf, ", wide");
+ if (e_flags & EF_PARISC_NO_KABP)
+ strcat (buf, ", no kabp");
+ 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");
+
+ if ((e_flags & EF_PICOJAVA_GNUCALLS) == EF_PICOJAVA_GNUCALLS)
+ strcat (buf, ", gnu calling convention");
+ break;
+ }
+ }
+
+ return buf;
+}
+
+static const char *
+get_mips_segment_type (type)
+ unsigned long type;
+{
+ switch (type)
+ {
+ case PT_MIPS_REGINFO:
+ return "REGINFO";
+ case PT_MIPS_RTPROC:
+ return "RTPROC";
+ case PT_MIPS_OPTIONS:
+ return "OPTIONS";
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+static const char *
+get_parisc_segment_type (type)
+ unsigned long type;
+{
+ switch (type)
+ {
+ case PT_HP_TLS: return "HP_TLS";
+ case PT_HP_CORE_NONE: return "HP_CORE_NONE";
+ case PT_HP_CORE_VERSION: return "HP_CORE_VERSION";
+ case PT_HP_CORE_KERNEL: return "HP_CORE_KERNEL";
+ case PT_HP_CORE_COMM: return "HP_CORE_COMM";
+ case PT_HP_CORE_PROC: return "HP_CORE_PROC";
+ case PT_HP_CORE_LOADABLE: return "HP_CORE_LOADABLE";
+ case PT_HP_CORE_STACK: return "HP_CORE_STACK";
+ case PT_HP_CORE_SHM: return "HP_CORE_SHM";
+ case PT_HP_CORE_MMF: return "HP_CORE_MMF";
+ case PT_HP_PARALLEL: return "HP_PARALLEL";
+ case PT_HP_FASTBIND: return "HP_FASTBIND";
+ case PT_PARISC_ARCHEXT: return "PARISC_ARCHEXT";
+ case PT_PARISC_UNWIND: return "PARISC_UNWIND";
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+static const char *
+get_segment_type (p_type)
+ unsigned long p_type;
+{
+ static char buff [32];
+
+ switch (p_type)
+ {
+ case PT_NULL: return "NULL";
+ case PT_LOAD: return "LOAD";
+ case PT_DYNAMIC: return "DYNAMIC";
+ case PT_INTERP: return "INTERP";
+ case PT_NOTE: return "NOTE";
+ case PT_SHLIB: return "SHLIB";
+ case PT_PHDR: return "PHDR";
+
+ default:
+ if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
+ {
+ const char * result;
+
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ result = get_mips_segment_type (p_type);
+ break;
+ case EM_PARISC:
+ result = get_parisc_segment_type (p_type);
+ break;
+ default:
+ result = NULL;
+ break;
+ }
+
+ if (result != NULL)
+ return result;
+
+ sprintf (buff, "LOPROC+%lx", p_type - PT_LOPROC);
+ }
+ else if ((p_type >= PT_LOOS) && (p_type <= PT_HIOS))
+ {
+ const char * result;
+
+ switch (elf_header.e_machine)
+ {
+ case EM_PARISC:
+ result = get_parisc_segment_type (p_type);
+ break;
+ default:
+ result = NULL;
+ break;
+ }
+
+ if (result != NULL)
+ return result;
+
+ sprintf (buff, "LOOS+%lx", p_type - PT_LOOS);
+ }
+ else
+ sprintf (buff, _("<unknown>: %lx"), p_type);
+
+ return buff;
+ }
+}
+
+static const char *
+get_mips_section_type_name (sh_type)
+ unsigned int sh_type;
+{
+ switch (sh_type)
+ {
+ case SHT_MIPS_LIBLIST: return "MIPS_LIBLIST";
+ case SHT_MIPS_MSYM: return "MIPS_MSYM";
+ case SHT_MIPS_CONFLICT: return "MIPS_CONFLICT";
+ case SHT_MIPS_GPTAB: return "MIPS_GPTAB";
+ case SHT_MIPS_UCODE: return "MIPS_UCODE";
+ case SHT_MIPS_DEBUG: return "MIPS_DEBUG";
+ case SHT_MIPS_REGINFO: return "MIPS_REGINFO";
+ case SHT_MIPS_PACKAGE: return "MIPS_PACKAGE";
+ case SHT_MIPS_PACKSYM: return "MIPS_PACKSYM";
+ case SHT_MIPS_RELD: return "MIPS_RELD";
+ case SHT_MIPS_IFACE: return "MIPS_IFACE";
+ case SHT_MIPS_CONTENT: return "MIPS_CONTENT";
+ case SHT_MIPS_OPTIONS: return "MIPS_OPTIONS";
+ case SHT_MIPS_SHDR: return "MIPS_SHDR";
+ case SHT_MIPS_FDESC: return "MIPS_FDESC";
+ case SHT_MIPS_EXTSYM: return "MIPS_EXTSYM";
+ case SHT_MIPS_DENSE: return "MIPS_DENSE";
+ case SHT_MIPS_PDESC: return "MIPS_PDESC";
+ case SHT_MIPS_LOCSYM: return "MIPS_LOCSYM";
+ case SHT_MIPS_AUXSYM: return "MIPS_AUXSYM";
+ case SHT_MIPS_OPTSYM: return "MIPS_OPTSYM";
+ case SHT_MIPS_LOCSTR: return "MIPS_LOCSTR";
+ case SHT_MIPS_LINE: return "MIPS_LINE";
+ case SHT_MIPS_RFDESC: return "MIPS_RFDESC";
+ case SHT_MIPS_DELTASYM: return "MIPS_DELTASYM";
+ case SHT_MIPS_DELTAINST: return "MIPS_DELTAINST";
+ case SHT_MIPS_DELTACLASS: return "MIPS_DELTACLASS";
+ case SHT_MIPS_DWARF: return "MIPS_DWARF";
+ case SHT_MIPS_DELTADECL: return "MIPS_DELTADECL";
+ case SHT_MIPS_SYMBOL_LIB: return "MIPS_SYMBOL_LIB";
+ case SHT_MIPS_EVENTS: return "MIPS_EVENTS";
+ case SHT_MIPS_TRANSLATE: return "MIPS_TRANSLATE";
+ case SHT_MIPS_PIXIE: return "MIPS_PIXIE";
+ case SHT_MIPS_XLATE: return "MIPS_XLATE";
+ case SHT_MIPS_XLATE_DEBUG: return "MIPS_XLATE_DEBUG";
+ case SHT_MIPS_WHIRL: return "MIPS_WHIRL";
+ case SHT_MIPS_EH_REGION: return "MIPS_EH_REGION";
+ case SHT_MIPS_XLATE_OLD: return "MIPS_XLATE_OLD";
+ case SHT_MIPS_PDR_EXCEPTION: return "MIPS_PDR_EXCEPTION";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+static const char *
+get_parisc_section_type_name (sh_type)
+ unsigned int sh_type;
+{
+ switch (sh_type)
+ {
+ case SHT_PARISC_EXT: return "PARISC_EXT";
+ case SHT_PARISC_UNWIND: return "PARISC_UNWIND";
+ case SHT_PARISC_DOC: return "PARISC_DOC";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+static const char *
+get_section_type_name (sh_type)
+ unsigned int sh_type;
+{
+ static char buff [32];
+
+ switch (sh_type)
+ {
+ case SHT_NULL: return "NULL";
+ case SHT_PROGBITS: return "PROGBITS";
+ case SHT_SYMTAB: return "SYMTAB";
+ case SHT_STRTAB: return "STRTAB";
+ case SHT_RELA: return "RELA";
+ case SHT_HASH: return "HASH";
+ case SHT_DYNAMIC: return "DYNAMIC";
+ case SHT_NOTE: return "NOTE";
+ case SHT_NOBITS: return "NOBITS";
+ case SHT_REL: return "REL";
+ case SHT_SHLIB: return "SHLIB";
+ case SHT_DYNSYM: return "DYNSYM";
+ case SHT_INIT_ARRAY: return "INIT_ARRAY";
+ case SHT_FINI_ARRAY: return "FINI_ARRAY";
+ case SHT_PREINIT_ARRAY: return "PREINIT_ARRAY";
+ case SHT_GNU_verdef: return "VERDEF";
+ case SHT_GNU_verneed: return "VERNEED";
+ case SHT_GNU_versym: return "VERSYM";
+ case 0x6ffffff0: return "VERSYM";
+ case 0x6ffffffc: return "VERDEF";
+ case 0x7ffffffd: return "AUXILIARY";
+ case 0x7fffffff: return "FILTER";
+
+ default:
+ if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC))
+ {
+ const char * result;
+
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ result = get_mips_section_type_name (sh_type);
+ break;
+ case EM_PARISC:
+ result = get_parisc_section_type_name (sh_type);
+ break;
+ default:
+ result = NULL;
+ break;
+ }
+
+ if (result != NULL)
+ return result;
+
+ sprintf (buff, "SHT_LOPROC+%x", sh_type - SHT_LOPROC);
+ }
+ else if ((sh_type >= SHT_LOOS) && (sh_type <= SHT_HIOS))
+ sprintf (buff, "SHT_LOOS+%x", sh_type - SHT_LOOS);
+ else if ((sh_type >= SHT_LOUSER) && (sh_type <= SHT_HIUSER))
+ sprintf (buff, "SHT_LOUSER+%x", sh_type - SHT_LOUSER);
+ else
+ sprintf (buff, _("<unknown>: %x"), sh_type);
+
+ return buff;
+ }
+}
+
+struct option options [] =
+{
+ {"all", no_argument, 0, 'a'},
+ {"file-header", no_argument, 0, 'h'},
+ {"program-headers", no_argument, 0, 'l'},
+ {"headers", no_argument, 0, 'e'},
+ {"histogram", no_argument, 0, 'I'},
+ {"segments", no_argument, 0, 'l'},
+ {"sections", no_argument, 0, 'S'},
+ {"section-headers", no_argument, 0, 'S'},
+ {"symbols", no_argument, 0, 's'},
+ {"syms", no_argument, 0, 's'},
+ {"relocs", no_argument, 0, 'r'},
+ {"notes", no_argument, 0, 'n'},
+ {"dynamic", no_argument, 0, 'd'},
+ {"arch-specific", no_argument, 0, 'A'},
+ {"version-info", no_argument, 0, 'V'},
+ {"use-dynamic", no_argument, 0, 'D'},
+ {"hex-dump", required_argument, 0, 'x'},
+ {"debug-dump", optional_argument, 0, 'w'},
+#ifdef SUPPORT_DISASSEMBLY
+ {"instruction-dump", required_argument, 0, 'i'},
+#endif
+
+ {"version", no_argument, 0, 'v'},
+ {"help", no_argument, 0, 'H'},
+ {0, no_argument, 0, 0}
+};
+
+static void
+usage ()
+{
+ fprintf (stdout, _("Usage: readelf {options} elf-file(s)\n"));
+ fprintf (stdout, _(" Options are:\n"));
+ fprintf (stdout, _(" -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"));
+ fprintf (stdout, _(" -h or --file-header Display the ELF file header\n"));
+ fprintf (stdout, _(" -l or --program-headers or --segments\n"));
+ fprintf (stdout, _(" Display the program headers\n"));
+ fprintf (stdout, _(" -S or --section-headers or --sections\n"));
+ fprintf (stdout, _(" Display the sections' header\n"));
+ fprintf (stdout, _(" -e or --headers Equivalent to: -h -l -S\n"));
+ fprintf (stdout, _(" -s or --syms or --symbols Display the symbol table\n"));
+ fprintf (stdout, _(" -n or --notes Display the core notes (if present)\n"));
+ fprintf (stdout, _(" -r or --relocs Display the relocations (if present)\n"));
+ fprintf (stdout, _(" -d or --dynamic Display the dynamic segment (if present)\n"));
+ fprintf (stdout, _(" -V or --version-info Display the version sections (if present)\n"));
+ fprintf (stdout, _(" -A or --arch-specific Display architecture specific information (if any).\n"));
+ fprintf (stdout, _(" -D or --use-dynamic Use the dynamic section info when displaying symbols\n"));
+ fprintf (stdout, _(" -x <number> or --hex-dump=<number>\n"));
+ fprintf (stdout, _(" Dump the contents of section <number>\n"));
+ fprintf (stdout, _(" -w[liapr] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]\n"));
+ fprintf (stdout, _(" Display the contents of DWARF2 debug sections\n"));
+#ifdef SUPPORT_DISASSEMBLY
+ fprintf (stdout, _(" -i <number> or --instruction-dump=<number>\n"));
+ fprintf (stdout, _(" Disassemble the contents of section <number>\n"));
+#endif
+ fprintf (stdout, _(" -I or --histogram Display histogram of bucket list lengths\n"));
+ fprintf (stdout, _(" -v or --version Display the version number of readelf\n"));
+ fprintf (stdout, _(" -H or --help Display this information\n"));
+ fprintf (stdout, _("Report bugs to %s\n"), REPORT_BUGS_TO);
+
+ exit (0);
+}
+
+static void
+request_dump (section, type)
+ unsigned int section;
+ char type;
+{
+ if (section >= num_dump_sects)
+ {
+ char * new_dump_sects;
+
+ new_dump_sects = (char *) calloc (section + 1, 1);
+
+ if (new_dump_sects == NULL)
+ error (_("Out of memory allocating dump request table."));
+ else
+ {
+ /* Copy current flag settings. */
+ memcpy (new_dump_sects, dump_sects, num_dump_sects);
+
+ free (dump_sects);
+
+ dump_sects = new_dump_sects;
+ num_dump_sects = section + 1;
+ }
+ }
+
+ if (dump_sects)
+ dump_sects [section] |= type;
+
+ return;
+}
+
+static void
+parse_args (argc, argv)
+ int argc;
+ char ** argv;
+{
+ int c;
+
+ if (argc < 2)
+ usage ();
+
+ while ((c = getopt_long
+ (argc, argv, "ersahnldSDAIw::x:i:vV", options, NULL)) != EOF)
+ {
+ char * cp;
+ int section;
+
+ switch (c)
+ {
+ case 0:
+ /* Long options. */
+ break;
+ case 'H':
+ usage ();
+ break;
+
+ case 'a':
+ do_syms ++;
+ do_reloc ++;
+ do_dynamic ++;
+ do_header ++;
+ do_sections ++;
+ do_segments ++;
+ do_version ++;
+ do_histogram ++;
+ do_arch ++;
+ do_notes ++;
+ break;
+ case 'e':
+ do_header ++;
+ do_sections ++;
+ do_segments ++;
+ break;
+ case 'A':
+ do_arch ++;
+ break;
+ case 'D':
+ do_using_dynamic ++;
+ break;
+ case 'r':
+ do_reloc ++;
+ break;
+ case 'h':
+ do_header ++;
+ break;
+ case 'l':
+ do_segments ++;
+ break;
+ case 's':
+ do_syms ++;
+ break;
+ case 'S':
+ do_sections ++;
+ break;
+ case 'd':
+ do_dynamic ++;
+ break;
+ case 'I':
+ do_histogram ++;
+ break;
+ case 'n':
+ do_notes ++;
+ break;
+ case 'x':
+ do_dump ++;
+ section = strtoul (optarg, & cp, 0);
+ if (! * cp && section >= 0)
+ {
+ request_dump (section, HEX_DUMP);
+ break;
+ }
+ goto oops;
+ case 'w':
+ do_dump ++;
+ if (optarg == 0)
+ do_debugging = 1;
+ else
+ {
+ do_debugging = 0;
+ switch (optarg[0])
+ {
+ case 'i':
+ case 'I':
+ do_debug_info = 1;
+ break;
+
+ case 'a':
+ case 'A':
+ do_debug_abbrevs = 1;
+ break;
+
+ case 'l':
+ case 'L':
+ do_debug_lines = 1;
+ break;
+
+ case 'p':
+ case 'P':
+ do_debug_pubnames = 1;
+ break;
+
+ case 'r':
+ case 'R':
+ do_debug_aranges = 1;
+ break;
+
+ default:
+ warn (_("Unrecognised debug option '%s'\n"), optarg);
+ break;
+ }
+ }
+ break;
+#ifdef SUPPORT_DISASSEMBLY
+ case 'i':
+ do_dump ++;
+ section = strtoul (optarg, & cp, 0);
+ if (! * cp && section >= 0)
+ {
+ request_dump (section, DISASS_DUMP);
+ break;
+ }
+ goto oops;
+#endif
+ case 'v':
+ print_version (program_name);
+ break;
+ case 'V':
+ do_version ++;
+ break;
+ default:
+ oops:
+ /* xgettext:c-format */
+ error (_("Invalid option '-%c'\n"), c);
+ /* Drop through. */
+ case '?':
+ usage ();
+ }
+ }
+
+ if (!do_dynamic && !do_syms && !do_reloc && !do_sections
+ && !do_segments && !do_header && !do_dump && !do_version
+ && !do_histogram && !do_debugging && !do_arch && !do_notes)
+ usage ();
+ else if (argc < 3)
+ {
+ warn (_("Nothing to do.\n"));
+ usage();
+ }
+}
+
+static const char *
+get_elf_class (elf_class)
+ unsigned char elf_class;
+{
+ static char buff [32];
+
+ switch (elf_class)
+ {
+ case ELFCLASSNONE: return _("none");
+ case ELFCLASS32: return _("ELF32");
+ case ELFCLASS64: return _("ELF64");
+ default:
+ sprintf (buff, _("<unknown: %x>"), elf_class);
+ return buff;
+ }
+}
+
+static const char *
+get_data_encoding (encoding)
+ unsigned char encoding;
+{
+ static char buff [32];
+
+ switch (encoding)
+ {
+ case ELFDATANONE: return _("none");
+ case ELFDATA2LSB: return _("2's complement, little endian");
+ case ELFDATA2MSB: return _("2's complement, big endian");
+ default:
+ sprintf (buff, _("<unknown: %x>"), encoding);
+ return buff;
+ }
+}
+
+static const char *
+get_osabi_name (osabi)
+ unsigned char osabi;
+{
+ static char buff [32];
+
+ switch (osabi)
+ {
+ case ELFOSABI_SYSV: return _("UNIX - System V");
+ case ELFOSABI_HPUX: return _("UNIX - HP-UX");
+ case ELFOSABI_LINUX: return _("UNIX - Linux");
+ case ELFOSABI_STANDALONE: return _("Standalone App");
+ case ELFOSABI_ARM: return _("ARM");
+ default:
+ sprintf (buff, _("<unknown: %x>"), osabi);
+ return buff;
+ }
+}
+
+/* Decode the data held in 'elf_header'. */
+static int
+process_file_header ()
+{
+ if ( elf_header.e_ident [EI_MAG0] != ELFMAG0
+ || elf_header.e_ident [EI_MAG1] != ELFMAG1
+ || elf_header.e_ident [EI_MAG2] != ELFMAG2
+ || elf_header.e_ident [EI_MAG3] != ELFMAG3)
+ {
+ error
+ (_("Not an ELF file - it has the wrong magic bytes at the start\n"));
+ return 0;
+ }
+
+ if (do_header)
+ {
+ int i;
+
+ printf (_("ELF Header:\n"));
+ printf (_(" Magic: "));
+ for (i = 0; i < EI_NIDENT; i ++)
+ printf ("%2.2x ", elf_header.e_ident [i]);
+ printf ("\n");
+ printf (_(" Class: %s\n"),
+ get_elf_class (elf_header.e_ident [EI_CLASS]));
+ printf (_(" Data: %s\n"),
+ get_data_encoding (elf_header.e_ident [EI_DATA]));
+ printf (_(" Version: %d %s\n"),
+ elf_header.e_ident [EI_VERSION],
+ (elf_header.e_ident [EI_VERSION] == EV_CURRENT
+ ? "(current)"
+ : (elf_header.e_ident [EI_VERSION] != EV_NONE
+ ? "<unknown: %lx>"
+ : "")));
+ printf (_(" OS/ABI: %s\n"),
+ get_osabi_name (elf_header.e_ident [EI_OSABI]));
+ printf (_(" ABI Version: %d\n"),
+ elf_header.e_ident [EI_ABIVERSION]);
+ printf (_(" Type: %s\n"),
+ get_file_type (elf_header.e_type));
+ printf (_(" Machine: %s\n"),
+ 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: "));
+ print_vma ((bfd_vma) elf_header.e_phoff, DEC);
+ 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));
+ printf (_(" Size of this header: %ld (bytes)\n"),
+ (long) elf_header.e_ehsize);
+ printf (_(" Size of program headers: %ld (bytes)\n"),
+ (long) elf_header.e_phentsize);
+ printf (_(" Number of program headers: %ld\n"),
+ (long) elf_header.e_phnum);
+ printf (_(" Size of section headers: %ld (bytes)\n"),
+ (long) elf_header.e_shentsize);
+ printf (_(" Number of section headers: %ld\n"),
+ (long) elf_header.e_shnum);
+ printf (_(" Section header string table index: %ld\n"),
+ (long) elf_header.e_shstrndx);
+ }
+
+ return 1;
+}
+
+
+static int
+get_32bit_program_headers (file, program_headers)
+ FILE * file;
+ Elf_Internal_Phdr * program_headers;
+{
+ Elf32_External_Phdr * phdrs;
+ Elf32_External_Phdr * external;
+ Elf32_Internal_Phdr * internal;
+ unsigned int i;
+
+ GET_DATA_ALLOC (elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ phdrs, Elf32_External_Phdr *, "program headers");
+
+ for (i = 0, internal = program_headers, external = phdrs;
+ i < elf_header.e_phnum;
+ i ++, internal ++, external ++)
+ {
+ internal->p_type = BYTE_GET (external->p_type);
+ internal->p_offset = BYTE_GET (external->p_offset);
+ internal->p_vaddr = BYTE_GET (external->p_vaddr);
+ internal->p_paddr = BYTE_GET (external->p_paddr);
+ internal->p_filesz = BYTE_GET (external->p_filesz);
+ internal->p_memsz = BYTE_GET (external->p_memsz);
+ internal->p_flags = BYTE_GET (external->p_flags);
+ internal->p_align = BYTE_GET (external->p_align);
+ }
+
+ free (phdrs);
+
+ return 1;
+}
+
+static int
+get_64bit_program_headers (file, program_headers)
+ FILE * file;
+ Elf_Internal_Phdr * program_headers;
+{
+ Elf64_External_Phdr * phdrs;
+ Elf64_External_Phdr * external;
+ Elf64_Internal_Phdr * internal;
+ unsigned int i;
+
+ GET_DATA_ALLOC (elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ phdrs, Elf64_External_Phdr *, "program headers");
+
+ for (i = 0, internal = program_headers, external = phdrs;
+ i < elf_header.e_phnum;
+ i ++, internal ++, external ++)
+ {
+ internal->p_type = BYTE_GET (external->p_type);
+ internal->p_flags = BYTE_GET (external->p_flags);
+ internal->p_offset = BYTE_GET8 (external->p_offset);
+ internal->p_vaddr = BYTE_GET8 (external->p_vaddr);
+ internal->p_paddr = BYTE_GET8 (external->p_paddr);
+ internal->p_filesz = BYTE_GET8 (external->p_filesz);
+ internal->p_memsz = BYTE_GET8 (external->p_memsz);
+ internal->p_align = BYTE_GET8 (external->p_align);
+ }
+
+ free (phdrs);
+
+ return 1;
+}
+
+static int
+process_program_headers (file)
+ FILE * file;
+{
+ Elf_Internal_Phdr * program_headers;
+ Elf_Internal_Phdr * segment;
+ unsigned int i;
+
+ if (elf_header.e_phnum == 0)
+ {
+ if (do_segments)
+ printf (_("\nThere are no program headers in this file.\n"));
+ return 1;
+ }
+
+ if (do_segments && !do_header)
+ {
+ printf (_("\nElf file type is %s\n"), get_file_type (elf_header.e_type));
+ printf (_("Entry point "));
+ print_vma ((bfd_vma) elf_header.e_entry, PREFIX_HEX);
+ printf (_("\nThere are %d program headers, starting at offset "),
+ elf_header.e_phnum);
+ print_vma ((bfd_vma) elf_header.e_phoff, DEC);
+ printf ("\n");
+ }
+
+ program_headers = (Elf_Internal_Phdr *) malloc
+ (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
+
+ if (program_headers == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ if (is_32bit_elf)
+ i = get_32bit_program_headers (file, program_headers);
+ else
+ i = get_64bit_program_headers (file, program_headers);
+
+ if (i == 0)
+ {
+ free (program_headers);
+ return 0;
+ }
+
+ if (do_segments)
+ {
+ 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"));
+ else
+ {
+ printf
+ (_(" Type Offset VirtAddr PhysAddr\n"));
+ printf
+ (_(" FileSiz MemSiz Flags Align\n"));
+ }
+ }
+
+ loadaddr = -1;
+ dynamic_addr = 0;
+ dynamic_size = 0;
+
+ for (i = 0, segment = program_headers;
+ i < elf_header.e_phnum;
+ i ++, segment ++)
+ {
+ if (do_segments)
+ {
+ printf (" %-14.14s ", get_segment_type (segment->p_type));
+
+ if (is_32bit_elf)
+ {
+ printf ("0x%6.6lx ", (unsigned long) segment->p_offset);
+ printf ("0x%8.8lx ", (unsigned long) segment->p_vaddr);
+ printf ("0x%8.8lx ", (unsigned long) segment->p_paddr);
+ printf ("0x%5.5lx ", (unsigned long) segment->p_filesz);
+ printf ("0x%5.5lx ", (unsigned long) segment->p_memsz);
+ printf ("%c%c%c ",
+ (segment->p_flags & PF_R ? 'R' : ' '),
+ (segment->p_flags & PF_W ? 'W' : ' '),
+ (segment->p_flags & PF_X ? 'E' : ' '));
+ printf ("%#lx", (unsigned long) segment->p_align);
+ }
+ else
+ {
+ print_vma (segment->p_offset, FULL_HEX);
+ putchar (' ');
+ print_vma (segment->p_vaddr, FULL_HEX);
+ putchar (' ');
+ print_vma (segment->p_paddr, FULL_HEX);
+ printf ("\n ");
+ print_vma (segment->p_filesz, FULL_HEX);
+ putchar (' ');
+ print_vma (segment->p_memsz, FULL_HEX);
+ printf (" %c%c%c ",
+ (segment->p_flags & PF_R ? 'R' : ' '),
+ (segment->p_flags & PF_W ? 'W' : ' '),
+ (segment->p_flags & PF_X ? 'E' : ' '));
+ print_vma (segment->p_align, HEX);
+ }
+ }
+
+ switch (segment->p_type)
+ {
+ case PT_LOAD:
+ if (loadaddr == -1)
+ loadaddr = (segment->p_vaddr & 0xfffff000)
+ - (segment->p_offset & 0xfffff000);
+ break;
+
+ case PT_DYNAMIC:
+ if (dynamic_addr)
+ error (_("more than one dynamic segment\n"));
+
+ dynamic_addr = segment->p_offset;
+ dynamic_size = segment->p_filesz;
+ break;
+
+ case PT_INTERP:
+ if (fseek (file, (long) segment->p_offset, SEEK_SET))
+ error (_("Unable to find program interpreter name\n"));
+ else
+ {
+ program_interpreter[0] = 0;
+ fscanf (file, "%63s", program_interpreter);
+
+ if (do_segments)
+ printf (_("\n [Requesting program interpreter: %s]"),
+ program_interpreter);
+ }
+ break;
+ }
+
+ if (do_segments)
+ putc ('\n', stdout);
+ }
+
+ if (loadaddr == -1)
+ {
+ /* Very strange. */
+ loadaddr = 0;
+ }
+
+ if (do_segments && section_headers != NULL)
+ {
+ printf (_("\n Section to Segment mapping:\n"));
+ printf (_(" Segment Sections...\n"));
+
+ assert (string_table != NULL);
+
+ for (i = 0; i < elf_header.e_phnum; i++)
+ {
+ int j;
+ Elf_Internal_Shdr * section;
+
+ segment = program_headers + i;
+ section = section_headers;
+
+ printf (" %2.2d ", i);
+
+ for (j = 0; j < elf_header.e_shnum; j++, section ++)
+ {
+ if (section->sh_size > 0
+ /* Compare allocated sections by VMA, unallocated
+ sections by file offset. */
+ && (section->sh_flags & SHF_ALLOC
+ ? (section->sh_addr >= segment->p_vaddr
+ && section->sh_addr + section->sh_size
+ <= segment->p_vaddr + segment->p_memsz)
+ : ((bfd_vma) section->sh_offset >= segment->p_offset
+ && (section->sh_offset + section->sh_size
+ <= segment->p_offset + segment->p_filesz))))
+ printf ("%s ", SECTION_NAME (section));
+ }
+
+ putc ('\n',stdout);
+ }
+ }
+
+ free (program_headers);
+
+ return 1;
+}
+
+
+static int
+get_32bit_section_headers (file)
+ FILE * file;
+{
+ Elf32_External_Shdr * shdrs;
+ Elf32_Internal_Shdr * internal;
+ unsigned int i;
+
+ GET_DATA_ALLOC (elf_header.e_shoff,
+ elf_header.e_shentsize * elf_header.e_shnum,
+ shdrs, Elf32_External_Shdr *, "section headers");
+
+ section_headers = (Elf_Internal_Shdr *) malloc
+ (elf_header.e_shnum * sizeof (Elf_Internal_Shdr));
+
+ if (section_headers == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ for (i = 0, internal = section_headers;
+ i < elf_header.e_shnum;
+ i ++, internal ++)
+ {
+ internal->sh_name = BYTE_GET (shdrs[i].sh_name);
+ internal->sh_type = BYTE_GET (shdrs[i].sh_type);
+ internal->sh_flags = BYTE_GET (shdrs[i].sh_flags);
+ internal->sh_addr = BYTE_GET (shdrs[i].sh_addr);
+ internal->sh_offset = BYTE_GET (shdrs[i].sh_offset);
+ internal->sh_size = BYTE_GET (shdrs[i].sh_size);
+ internal->sh_link = BYTE_GET (shdrs[i].sh_link);
+ internal->sh_info = BYTE_GET (shdrs[i].sh_info);
+ internal->sh_addralign = BYTE_GET (shdrs[i].sh_addralign);
+ internal->sh_entsize = BYTE_GET (shdrs[i].sh_entsize);
+ }
+
+ free (shdrs);
+
+ return 1;
+}
+
+static int
+get_64bit_section_headers (file)
+ FILE * file;
+{
+ Elf64_External_Shdr * shdrs;
+ Elf64_Internal_Shdr * internal;
+ unsigned int i;
+
+ GET_DATA_ALLOC (elf_header.e_shoff,
+ elf_header.e_shentsize * elf_header.e_shnum,
+ shdrs, Elf64_External_Shdr *, "section headers");
+
+ section_headers = (Elf_Internal_Shdr *) malloc
+ (elf_header.e_shnum * sizeof (Elf_Internal_Shdr));
+
+ if (section_headers == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ for (i = 0, internal = section_headers;
+ i < elf_header.e_shnum;
+ i ++, internal ++)
+ {
+ internal->sh_name = BYTE_GET (shdrs[i].sh_name);
+ internal->sh_type = BYTE_GET (shdrs[i].sh_type);
+ internal->sh_flags = BYTE_GET8 (shdrs[i].sh_flags);
+ internal->sh_addr = BYTE_GET8 (shdrs[i].sh_addr);
+ internal->sh_size = BYTE_GET8 (shdrs[i].sh_size);
+ internal->sh_entsize = BYTE_GET8 (shdrs[i].sh_entsize);
+ internal->sh_link = BYTE_GET (shdrs[i].sh_link);
+ internal->sh_info = BYTE_GET (shdrs[i].sh_info);
+ internal->sh_offset = BYTE_GET (shdrs[i].sh_offset);
+ internal->sh_addralign = BYTE_GET (shdrs[i].sh_addralign);
+ }
+
+ free (shdrs);
+
+ return 1;
+}
+
+static Elf_Internal_Sym *
+get_32bit_elf_symbols (file, offset, number)
+ FILE * file;
+ unsigned long offset;
+ unsigned long number;
+{
+ Elf32_External_Sym * esyms;
+ Elf_Internal_Sym * isyms;
+ Elf_Internal_Sym * psym;
+ unsigned int j;
+
+ GET_DATA_ALLOC (offset, number * sizeof (Elf32_External_Sym),
+ esyms, Elf32_External_Sym *, "symbols");
+
+ isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
+
+ if (isyms == NULL)
+ {
+ error (_("Out of memory\n"));
+ free (esyms);
+
+ return NULL;
+ }
+
+ for (j = 0, psym = isyms;
+ j < number;
+ j ++, psym ++)
+ {
+ psym->st_name = BYTE_GET (esyms[j].st_name);
+ psym->st_value = BYTE_GET (esyms[j].st_value);
+ psym->st_size = BYTE_GET (esyms[j].st_size);
+ psym->st_shndx = BYTE_GET (esyms[j].st_shndx);
+ psym->st_info = BYTE_GET (esyms[j].st_info);
+ psym->st_other = BYTE_GET (esyms[j].st_other);
+ }
+
+ free (esyms);
+
+ return isyms;
+}
+
+static Elf_Internal_Sym *
+get_64bit_elf_symbols (file, offset, number)
+ FILE * file;
+ unsigned long offset;
+ unsigned long number;
+{
+ Elf64_External_Sym * esyms;
+ Elf_Internal_Sym * isyms;
+ Elf_Internal_Sym * psym;
+ unsigned int j;
+
+ GET_DATA_ALLOC (offset, number * sizeof (Elf64_External_Sym),
+ esyms, Elf64_External_Sym *, "symbols");
+
+ isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
+
+ if (isyms == NULL)
+ {
+ error (_("Out of memory\n"));
+ free (esyms);
+
+ return NULL;
+ }
+
+ for (j = 0, psym = isyms;
+ j < number;
+ j ++, psym ++)
+ {
+ psym->st_name = BYTE_GET (esyms[j].st_name);
+ psym->st_info = BYTE_GET (esyms[j].st_info);
+ psym->st_other = BYTE_GET (esyms[j].st_other);
+ psym->st_shndx = BYTE_GET (esyms[j].st_shndx);
+ psym->st_value = BYTE_GET8 (esyms[j].st_value);
+ psym->st_size = BYTE_GET8 (esyms[j].st_size);
+ }
+
+ free (esyms);
+
+ return isyms;
+}
+
+static const char *
+get_elf_section_flags (sh_flags)
+ bfd_vma 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;
+ case SHF_ALLOC: strcat (buff, "A"); break;
+ case SHF_EXECINSTR: strcat (buff, "X"); break;
+ case SHF_MERGE: strcat (buff, "M"); break;
+ case SHF_STRINGS: strcat (buff, "S"); break;
+ case SHF_INFO_LINK: strcat (buff, "I"); break;
+ case SHF_LINK_ORDER: strcat (buff, "L"); break;
+ case SHF_OS_NONCONFORMING: strcat (buff, "O"); break;
+
+ default:
+ if (flag & SHF_MASKOS)
+ {
+ strcat (buff, "o");
+ sh_flags &= ~ SHF_MASKOS;
+ }
+ else if (flag & SHF_MASKPROC)
+ {
+ strcat (buff, "p");
+ sh_flags &= ~ SHF_MASKPROC;
+ }
+ else
+ strcat (buff, "x");
+ break;
+ }
+ }
+
+ return buff;
+}
+
+static int
+process_section_headers (file)
+ FILE * file;
+{
+ Elf_Internal_Shdr * section;
+ int i;
+
+ section_headers = NULL;
+
+ if (elf_header.e_shnum == 0)
+ {
+ if (do_sections)
+ printf (_("\nThere are no sections in this file.\n"));
+
+ return 1;
+ }
+
+ if (do_sections && !do_header)
+ printf (_("There are %d section headers, starting at offset 0x%lx:\n"),
+ elf_header.e_shnum, (unsigned long) elf_header.e_shoff);
+
+ if (is_32bit_elf)
+ {
+ if (! get_32bit_section_headers (file))
+ return 0;
+ }
+ else if (! get_64bit_section_headers (file))
+ return 0;
+
+ /* Read in the string table, so that we have names to display. */
+ section = section_headers + elf_header.e_shstrndx;
+
+ 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");
+ }
+
+ /* Scan the sections for the dynamic symbol table
+ and dynamic string table and debug sections. */
+ dynamic_symbols = NULL;
+ dynamic_strings = NULL;
+ dynamic_syminfo = NULL;
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i ++, section ++)
+ {
+ char * name = SECTION_NAME (section);
+
+ if (section->sh_type == SHT_DYNSYM)
+ {
+ if (dynamic_symbols != NULL)
+ {
+ error (_("File contains multiple dynamic symbol tables\n"));
+ continue;
+ }
+
+ num_dynamic_syms = section->sh_size / section->sh_entsize;
+ dynamic_symbols =
+ GET_ELF_SYMBOLS (file, section->sh_offset, num_dynamic_syms);
+ }
+ else if (section->sh_type == SHT_STRTAB
+ && strcmp (name, ".dynstr") == 0)
+ {
+ if (dynamic_strings != NULL)
+ {
+ error (_("File contains multiple dynamic string tables\n"));
+ continue;
+ }
+
+ GET_DATA_ALLOC (section->sh_offset, section->sh_size,
+ dynamic_strings, char *, "dynamic strings");
+ }
+ else if ((do_debugging || do_debug_info || do_debug_abbrevs
+ || do_debug_lines || do_debug_pubnames || do_debug_aranges)
+ && strncmp (name, ".debug_", 7) == 0)
+ {
+ name += 7;
+
+ if (do_debugging
+ || (do_debug_info && (strcmp (name, "info") == 0))
+ || (do_debug_abbrevs && (strcmp (name, "abbrev") == 0))
+ || (do_debug_lines && (strcmp (name, "line") == 0))
+ || (do_debug_pubnames && (strcmp (name, "pubnames") == 0))
+ || (do_debug_aranges && (strcmp (name, "aranges") == 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"));
+ else
+ {
+ printf (_(" [Nr] Name Type Address Offset\n"));
+ printf (_(" Size EntSize Flags Link Info Align\n"));
+ }
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i ++, section ++)
+ {
+ printf (" [%2d] %-17.17s %-15.15s ",
+ i,
+ SECTION_NAME (section),
+ get_section_type_name (section->sh_type));
+
+ 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",
+ (unsigned long) section->sh_link,
+ (unsigned long) section->sh_info,
+ (unsigned long) section->sh_addralign);
+ }
+ else
+ {
+ putchar (' ');
+ print_vma (section->sh_addr, LONG_HEX);
+ printf (" %8.8lx", section->sh_offset);
+ printf ("\n ");
+ 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,
+ (unsigned long) section->sh_addralign);
+ }
+ }
+
+ 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"));
+
+ return 1;
+}
+
+/* Process the reloc section. */
+static int
+process_relocs (file)
+ FILE * file;
+{
+ unsigned long rel_size;
+ unsigned long rel_offset;
+
+
+ if (!do_reloc)
+ return 1;
+
+ if (do_using_dynamic)
+ {
+ int is_rela = FALSE;
+
+ rel_size = 0;
+ rel_offset = 0;
+
+ if (dynamic_info[DT_REL])
+ {
+ rel_offset = dynamic_info[DT_REL];
+ rel_size = dynamic_info[DT_RELSZ];
+ is_rela = FALSE;
+ }
+ else if (dynamic_info [DT_RELA])
+ {
+ rel_offset = dynamic_info[DT_RELA];
+ rel_size = dynamic_info[DT_RELASZ];
+ is_rela = TRUE;
+ }
+ else if (dynamic_info[DT_JMPREL])
+ {
+ rel_offset = dynamic_info[DT_JMPREL];
+ rel_size = dynamic_info[DT_PLTRELSZ];
+
+ switch (dynamic_info[DT_PLTREL])
+ {
+ case DT_REL:
+ is_rela = FALSE;
+ break;
+ case DT_RELA:
+ is_rela = TRUE;
+ break;
+ default:
+ is_rela = UNKNOWN;
+ break;
+ }
+ }
+
+ if (rel_size)
+ {
+ printf
+ (_("\nRelocation section at offset 0x%lx contains %ld bytes:\n"),
+ rel_offset, rel_size);
+
+ dump_relocations (file, rel_offset - loadaddr, rel_size,
+ dynamic_symbols, num_dynamic_syms, dynamic_strings, is_rela);
+ }
+ else
+ printf (_("\nThere are no dynamic relocations in this file.\n"));
+ }
+ else
+ {
+ Elf32_Internal_Shdr * section;
+ unsigned long i;
+ int found = 0;
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i++, section ++)
+ {
+ if ( section->sh_type != SHT_RELA
+ && section->sh_type != SHT_REL)
+ continue;
+
+ rel_offset = section->sh_offset;
+ rel_size = section->sh_size;
+
+ if (rel_size)
+ {
+ Elf32_Internal_Shdr * strsec;
+ Elf32_Internal_Shdr * symsec;
+ Elf_Internal_Sym * symtab;
+ char * strtab;
+ int is_rela;
+ unsigned long nsyms;
+
+ printf (_("\nRelocation section "));
+
+ if (string_table == NULL)
+ printf ("%d", section->sh_name);
+ else
+ printf ("'%s'", SECTION_NAME (section));
+
+ printf (_(" at offset 0x%lx contains %lu entries:\n"),
+ rel_offset, (unsigned long) (rel_size / section->sh_entsize));
+
+ symsec = section_headers + section->sh_link;
+
+ nsyms = symsec->sh_size / symsec->sh_entsize;
+ symtab = GET_ELF_SYMBOLS (file, symsec->sh_offset, nsyms);
+
+ if (symtab == NULL)
+ continue;
+
+ strsec = section_headers + symsec->sh_link;
+
+ GET_DATA_ALLOC (strsec->sh_offset, strsec->sh_size, strtab,
+ char *, "string table");
+
+ is_rela = section->sh_type == SHT_RELA;
+
+ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela);
+
+ free (strtab);
+ free (symtab);
+
+ found = 1;
+ }
+ }
+
+ if (! found)
+ printf (_("\nThere are no relocations in this file.\n"));
+ }
+
+ return 1;
+}
+
+
+static void
+dynamic_segment_mips_val (entry)
+ Elf_Internal_Dyn * entry;
+{
+ switch (entry->d_tag)
+ {
+ case DT_MIPS_FLAGS:
+ if (entry->d_un.d_val == 0)
+ printf ("NONE\n");
+ else
+ {
+ static const char * opts[] =
+ {
+ "QUICKSTART", "NOTPOT", "NO_LIBRARY_REPLACEMENT",
+ "NO_MOVE", "SGI_ONLY", "GUARANTEE_INIT", "DELTA_C_PLUS_PLUS",
+ "GUARANTEE_START_INIT", "PIXIE", "DEFAULT_DELAY_LOAD",
+ "REQUICKSTART", "REQUICKSTARTED", "CORD", "NO_UNRES_UNDEF",
+ "RLD_ORDER_SAFE"
+ };
+ unsigned int cnt;
+ int first = 1;
+ for (cnt = 0; cnt < NUM_ELEM (opts); ++ cnt)
+ if (entry->d_un.d_val & (1 << cnt))
+ {
+ printf ("%s%s", first ? "" : " ", opts[cnt]);
+ first = 0;
+ }
+ puts ("");
+ }
+ break;
+
+ case DT_MIPS_IVERSION:
+ if (dynamic_strings != NULL)
+ printf ("Interface Version: %s\n",
+ dynamic_strings + entry->d_un.d_val);
+ else
+ printf ("%ld\n", (long) entry->d_un.d_ptr);
+ break;
+
+ case DT_MIPS_TIME_STAMP:
+ {
+ char timebuf[20];
+ struct tm * tmp;
+
+ time_t time = entry->d_un.d_val;
+ tmp = gmtime (&time);
+ sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u",
+ tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
+ tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+ printf ("Time Stamp: %s\n", timebuf);
+ }
+ break;
+
+ case DT_MIPS_RLD_VERSION:
+ case DT_MIPS_LOCAL_GOTNO:
+ case DT_MIPS_CONFLICTNO:
+ case DT_MIPS_LIBLISTNO:
+ case DT_MIPS_SYMTABNO:
+ case DT_MIPS_UNREFEXTNO:
+ case DT_MIPS_HIPAGENO:
+ case DT_MIPS_DELTA_CLASS_NO:
+ case DT_MIPS_DELTA_INSTANCE_NO:
+ case DT_MIPS_DELTA_RELOC_NO:
+ case DT_MIPS_DELTA_SYM_NO:
+ case DT_MIPS_DELTA_CLASSSYM_NO:
+ case DT_MIPS_COMPACT_SIZE:
+ printf ("%ld\n", (long) entry->d_un.d_ptr);
+ break;
+
+ default:
+ printf ("%#lx\n", (long) entry->d_un.d_ptr);
+ }
+}
+
+
+static void
+dynamic_segment_parisc_val (entry)
+ Elf_Internal_Dyn * entry;
+{
+ switch (entry->d_tag)
+ {
+ case DT_HP_DLD_FLAGS:
+ {
+ static struct
+ {
+ long int bit;
+ const char * str;
+ }
+ flags[] =
+ {
+ { DT_HP_DEBUG_PRIVATE, "HP_DEBUG_PRIVATE" },
+ { DT_HP_DEBUG_CALLBACK, "HP_DEBUG_CALLBACK" },
+ { DT_HP_DEBUG_CALLBACK_BOR, "HP_DEBUG_CALLBACK_BOR" },
+ { DT_HP_NO_ENVVAR, "HP_NO_ENVVAR" },
+ { DT_HP_BIND_NOW, "HP_BIND_NOW" },
+ { DT_HP_BIND_NONFATAL, "HP_BIND_NONFATAL" },
+ { DT_HP_BIND_VERBOSE, "HP_BIND_VERBOSE" },
+ { DT_HP_BIND_RESTRICTED, "HP_BIND_RESTRICTED" },
+ { DT_HP_BIND_SYMBOLIC, "HP_BIND_SYMBOLIC" },
+ { DT_HP_RPATH_FIRST, "HP_RPATH_FIRST" },
+ { DT_HP_BIND_DEPTH_FIRST, "HP_BIND_DEPTH_FIRST" }
+ };
+ int first = 1;
+ size_t cnt;
+ bfd_vma val = entry->d_un.d_val;
+
+ for (cnt = 0; cnt < sizeof (flags) / sizeof (flags[0]); ++cnt)
+ if (val & flags[cnt].bit)
+ {
+ if (! first)
+ putchar (' ');
+ fputs (flags[cnt].str, stdout);
+ first = 0;
+ val ^= flags[cnt].bit;
+ }
+
+ if (val != 0 || first)
+ {
+ if (! first)
+ putchar (' ');
+ print_vma (val, HEX);
+ }
+ }
+ break;
+
+ default:
+ print_vma (entry->d_un.d_ptr, PREFIX_HEX);
+ break;
+ }
+}
+
+static int
+get_32bit_dynamic_segment (file)
+ FILE * file;
+{
+ Elf32_External_Dyn * edyn;
+ Elf_Internal_Dyn * entry;
+ bfd_size_type i;
+
+ GET_DATA_ALLOC (dynamic_addr, dynamic_size,
+ edyn, Elf32_External_Dyn *, "dynamic segment");
+
+ /* SGI's ELF has more than one section in the DYNAMIC segment. Determine
+ how large this .dynamic is now. We can do this even before the byte
+ swapping since the DT_NULL tag is recognizable. */
+ dynamic_size = 0;
+ while (*(Elf32_Word *) edyn [dynamic_size++].d_tag != DT_NULL)
+ ;
+
+ dynamic_segment = (Elf_Internal_Dyn *)
+ malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+
+ if (dynamic_segment == NULL)
+ {
+ error (_("Out of memory\n"));
+ free (edyn);
+ return 0;
+ }
+
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ i ++, entry ++)
+ {
+ entry->d_tag = BYTE_GET (edyn [i].d_tag);
+ entry->d_un.d_val = BYTE_GET (edyn [i].d_un.d_val);
+ }
+
+ free (edyn);
+
+ return 1;
+}
+
+static int
+get_64bit_dynamic_segment (file)
+ FILE * file;
+{
+ Elf64_External_Dyn * edyn;
+ Elf_Internal_Dyn * entry;
+ bfd_size_type i;
+
+ GET_DATA_ALLOC (dynamic_addr, dynamic_size,
+ edyn, Elf64_External_Dyn *, "dynamic segment");
+
+ /* SGI's ELF has more than one section in the DYNAMIC segment. Determine
+ how large this .dynamic is now. We can do this even before the byte
+ swapping since the DT_NULL tag is recognizable. */
+ dynamic_size = 0;
+ while (*(bfd_vma *) edyn [dynamic_size ++].d_tag != DT_NULL)
+ ;
+
+ dynamic_segment = (Elf_Internal_Dyn *)
+ malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+
+ if (dynamic_segment == NULL)
+ {
+ error (_("Out of memory\n"));
+ free (edyn);
+ return 0;
+ }
+
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ i ++, entry ++)
+ {
+ entry->d_tag = BYTE_GET8 (edyn [i].d_tag);
+ entry->d_un.d_val = BYTE_GET8 (edyn [i].d_un.d_val);
+ }
+
+ free (edyn);
+
+ return 1;
+}
+
+static const char *
+get_dynamic_flags (flags)
+ bfd_vma flags;
+{
+ static char buff [64];
+ while (flags)
+ {
+ bfd_vma flag;
+
+ flag = flags & - flags;
+ flags &= ~ flag;
+
+ switch (flag)
+ {
+ case DF_ORIGIN: strcat (buff, "ORIGIN "); break;
+ case DF_SYMBOLIC: strcat (buff, "SYMBOLIC "); break;
+ case DF_TEXTREL: strcat (buff, "TEXTREL "); break;
+ case DF_BIND_NOW: strcat (buff, "BIND_NOW "); break;
+ default: strcat (buff, "unknown "); break;
+ }
+ }
+ return buff;
+}
+
+/* Parse and display the contents of the dynamic segment. */
+static int
+process_dynamic_segment (file)
+ FILE * file;
+{
+ Elf_Internal_Dyn * entry;
+ bfd_size_type i;
+
+ if (dynamic_size == 0)
+ {
+ if (do_dynamic)
+ printf (_("\nThere is no dynamic segment in this file.\n"));
+
+ return 1;
+ }
+
+ if (is_32bit_elf)
+ {
+ if (! get_32bit_dynamic_segment (file))
+ return 0;
+ }
+ else if (! get_64bit_dynamic_segment (file))
+ return 0;
+
+ /* Find the appropriate symbol table. */
+ if (dynamic_symbols == NULL)
+ {
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ ++i, ++ entry)
+ {
+ unsigned long offset;
+
+ if (entry->d_tag != DT_SYMTAB)
+ continue;
+
+ dynamic_info[DT_SYMTAB] = entry->d_un.d_val;
+
+ /* Since we do not know how big the symbol table is,
+ we default to reading in the entire file (!) and
+ processing that. This is overkill, I know, but it
+ should work. */
+ offset = entry->d_un.d_val - loadaddr;
+
+ if (fseek (file, 0, SEEK_END))
+ error (_("Unable to seek to end of file!"));
+
+ if (is_32bit_elf)
+ num_dynamic_syms = (ftell (file) - offset) / sizeof (Elf32_External_Sym);
+ else
+ num_dynamic_syms = (ftell (file) - offset) / sizeof (Elf64_External_Sym);
+
+ if (num_dynamic_syms < 1)
+ {
+ error (_("Unable to determine the number of symbols to load\n"));
+ continue;
+ }
+
+ dynamic_symbols = GET_ELF_SYMBOLS (file, offset, num_dynamic_syms);
+ }
+ }
+
+ /* Similarly find a string table. */
+ if (dynamic_strings == NULL)
+ {
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ ++i, ++ entry)
+ {
+ unsigned long offset;
+ long str_tab_len;
+
+ if (entry->d_tag != DT_STRTAB)
+ continue;
+
+ dynamic_info[DT_STRTAB] = entry->d_un.d_val;
+
+ /* Since we do not know how big the string table is,
+ we default to reading in the entire file (!) and
+ processing that. This is overkill, I know, but it
+ should work. */
+
+ offset = entry->d_un.d_val - loadaddr;
+ if (fseek (file, 0, SEEK_END))
+ error (_("Unable to seek to end of file\n"));
+ str_tab_len = ftell (file) - offset;
+
+ if (str_tab_len < 1)
+ {
+ error
+ (_("Unable to determine the length of the dynamic string table\n"));
+ continue;
+ }
+
+ GET_DATA_ALLOC (offset, str_tab_len, dynamic_strings, char *,
+ "dynamic string table");
+
+ break;
+ }
+ }
+
+ /* And find the syminfo section if available. */
+ if (dynamic_syminfo == NULL)
+ {
+ unsigned int syminsz = 0;
+
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ ++i, ++ entry)
+ {
+ if (entry->d_tag == DT_SYMINENT)
+ {
+ /* Note: these braces are necessary to avoid a syntax
+ error from the SunOS4 C compiler. */
+ assert (sizeof (Elf_External_Syminfo) == entry->d_un.d_val);
+ }
+ else if (entry->d_tag == DT_SYMINSZ)
+ syminsz = entry->d_un.d_val;
+ else if (entry->d_tag == DT_SYMINFO)
+ dynamic_syminfo_offset = entry->d_un.d_val - loadaddr;
+ }
+
+ if (dynamic_syminfo_offset != 0 && syminsz != 0)
+ {
+ Elf_External_Syminfo * extsyminfo;
+ Elf_Internal_Syminfo * syminfo;
+
+ /* There is a syminfo section. Read the data. */
+ GET_DATA_ALLOC (dynamic_syminfo_offset, syminsz, extsyminfo,
+ Elf_External_Syminfo *, "symbol information");
+
+ dynamic_syminfo = (Elf_Internal_Syminfo *) malloc (syminsz);
+ if (dynamic_syminfo == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ dynamic_syminfo_nent = syminsz / sizeof (Elf_External_Syminfo);
+ for (i = 0, syminfo = dynamic_syminfo; i < dynamic_syminfo_nent;
+ ++i, ++syminfo)
+ {
+ syminfo->si_boundto = BYTE_GET (extsyminfo[i].si_boundto);
+ syminfo->si_flags = BYTE_GET (extsyminfo[i].si_flags);
+ }
+
+ free (extsyminfo);
+ }
+ }
+
+ if (do_dynamic && dynamic_addr)
+ printf (_("\nDynamic segment at offset 0x%x contains %ld entries:\n"),
+ dynamic_addr, (long) dynamic_size);
+ if (do_dynamic)
+ printf (_(" Tag Type Name/Value\n"));
+
+ for (i = 0, entry = dynamic_segment;
+ i < dynamic_size;
+ i++, entry ++)
+ {
+ if (do_dynamic)
+ {
+ const char *dtype;
+
+ putchar (' ');
+ print_vma (entry->d_tag, FULL_HEX);
+ dtype = get_dynamic_type (entry->d_tag);
+ printf (" (%s)%*s", dtype,
+ ((is_32bit_elf ? 27 : 19)
+ - (int) strlen (dtype)),
+ " ");
+ }
+
+ switch (entry->d_tag)
+ {
+ case DT_FLAGS:
+ if (do_dynamic)
+ printf ("%s", get_dynamic_flags (entry->d_un.d_val));
+ break;
+
+ case DT_AUXILIARY:
+ case DT_FILTER:
+ if (do_dynamic)
+ {
+ if (entry->d_tag == DT_AUXILIARY)
+ printf (_("Auxiliary library"));
+ else
+ printf (_("Filter library"));
+
+ if (dynamic_strings)
+ printf (": [%s]\n", dynamic_strings + entry->d_un.d_val);
+ else
+ {
+ printf (": ");
+ print_vma (entry->d_un.d_val, PREFIX_HEX);
+ putchar ('\n');
+ }
+ }
+ break;
+
+ case DT_FEATURE_1:
+ if (do_dynamic)
+ {
+ printf (_("Flags:"));
+ if (entry->d_un.d_val == 0)
+ printf (_(" None\n"));
+ else
+ {
+ unsigned long int val = entry->d_un.d_val;
+ if (val & DTF_1_PARINIT)
+ {
+ printf (" PARINIT");
+ val ^= DTF_1_PARINIT;
+ }
+ if (val != 0)
+ printf (" %lx", val);
+ puts ("");
+ }
+ }
+ break;
+
+ case DT_POSFLAG_1:
+ if (do_dynamic)
+ {
+ printf (_("Flags:"));
+ if (entry->d_un.d_val == 0)
+ printf (_(" None\n"));
+ else
+ {
+ unsigned long int val = entry->d_un.d_val;
+ if (val & DF_P1_LAZYLOAD)
+ {
+ printf (" LAZYLOAD");
+ val ^= DF_P1_LAZYLOAD;
+ }
+ if (val & DF_P1_GROUPPERM)
+ {
+ printf (" GROUPPERM");
+ val ^= DF_P1_GROUPPERM;
+ }
+ if (val != 0)
+ printf (" %lx", val);
+ puts ("");
+ }
+ }
+ break;
+
+ case DT_FLAGS_1:
+ if (do_dynamic)
+ {
+ printf (_("Flags:"));
+ if (entry->d_un.d_val == 0)
+ printf (_(" None\n"));
+ else
+ {
+ unsigned long int val = entry->d_un.d_val;
+ if (val & DF_1_NOW)
+ {
+ printf (" NOW");
+ val ^= DF_1_NOW;
+ }
+ if (val & DF_1_GLOBAL)
+ {
+ printf (" GLOBAL");
+ val ^= DF_1_GLOBAL;
+ }
+ if (val & DF_1_GROUP)
+ {
+ printf (" GROUP");
+ val ^= DF_1_GROUP;
+ }
+ if (val & DF_1_NODELETE)
+ {
+ printf (" NODELETE");
+ val ^= DF_1_NODELETE;
+ }
+ if (val & DF_1_LOADFLTR)
+ {
+ printf (" LOADFLTR");
+ val ^= DF_1_LOADFLTR;
+ }
+ if (val & DF_1_INITFIRST)
+ {
+ printf (" INITFIRST");
+ val ^= DF_1_INITFIRST;
+ }
+ if (val & DF_1_NOOPEN)
+ {
+ printf (" NOOPEN");
+ val ^= DF_1_NOOPEN;
+ }
+ if (val & DF_1_ORIGIN)
+ {
+ printf (" ORIGIN");
+ val ^= DF_1_ORIGIN;
+ }
+ if (val & DF_1_DIRECT)
+ {
+ printf (" DIRECT");
+ val ^= DF_1_DIRECT;
+ }
+ if (val & DF_1_TRANS)
+ {
+ printf (" TRANS");
+ val ^= DF_1_TRANS;
+ }
+ if (val & DF_1_INTERPOSE)
+ {
+ printf (" INTERPOSE");
+ val ^= DF_1_INTERPOSE;
+ }
+ if (val != 0)
+ printf (" %lx", val);
+ puts ("");
+ }
+ }
+ break;
+
+ case DT_PLTREL:
+ if (do_dynamic)
+ puts (get_dynamic_type (entry->d_un.d_val));
+ break;
+
+ case DT_NULL :
+ case DT_NEEDED :
+ case DT_PLTGOT :
+ case DT_HASH :
+ case DT_STRTAB :
+ case DT_SYMTAB :
+ case DT_RELA :
+ case DT_INIT :
+ case DT_FINI :
+ case DT_SONAME :
+ case DT_RPATH :
+ case DT_SYMBOLIC:
+ case DT_REL :
+ case DT_DEBUG :
+ case DT_TEXTREL :
+ case DT_JMPREL :
+ dynamic_info[entry->d_tag] = entry->d_un.d_val;
+
+ if (do_dynamic)
+ {
+ char * name;
+
+ if (dynamic_strings == NULL)
+ name = NULL;
+ else
+ name = dynamic_strings + entry->d_un.d_val;
+
+ if (name)
+ {
+ switch (entry->d_tag)
+ {
+ case DT_NEEDED:
+ printf (_("Shared library: [%s]"), name);
+
+ if (strcmp (name, program_interpreter) == 0)
+ printf (_(" program interpreter"));
+ break;
+
+ case DT_SONAME:
+ printf (_("Library soname: [%s]"), name);
+ break;
+
+ case DT_RPATH:
+ printf (_("Library rpath: [%s]"), name);
+ break;
+
+ default:
+ print_vma (entry->d_un.d_val, PREFIX_HEX);
+ break;
+ }
+ }
+ else
+ print_vma (entry->d_un.d_val, PREFIX_HEX);
+
+ putchar ('\n');
+ }
+ break;
+
+ case DT_PLTRELSZ:
+ case DT_RELASZ :
+ case DT_STRSZ :
+ case DT_RELSZ :
+ case DT_RELAENT :
+ case DT_SYMENT :
+ case DT_RELENT :
+ case DT_PLTPADSZ:
+ case DT_MOVEENT :
+ case DT_MOVESZ :
+ case DT_INIT_ARRAYSZ:
+ case DT_FINI_ARRAYSZ:
+ if (do_dynamic)
+ {
+ print_vma (entry->d_un.d_val, UNSIGNED);
+ printf (" (bytes)\n");
+ }
+ break;
+
+ case DT_VERDEFNUM:
+ case DT_VERNEEDNUM:
+ case DT_RELACOUNT:
+ case DT_RELCOUNT:
+ if (do_dynamic)
+ {
+ print_vma (entry->d_un.d_val, UNSIGNED);
+ putchar ('\n');
+ }
+ break;
+
+ case DT_SYMINSZ:
+ case DT_SYMINENT:
+ case DT_SYMINFO:
+ case DT_USED:
+ case DT_INIT_ARRAY:
+ case DT_FINI_ARRAY:
+ if (do_dynamic)
+ {
+ if (dynamic_strings != NULL && entry->d_tag == DT_USED)
+ {
+ char * name;
+
+ name = dynamic_strings + entry->d_un.d_val;
+
+ if (* name)
+ {
+ printf (_("Not needed object: [%s]\n"), name);
+ break;
+ }
+ }
+
+ print_vma (entry->d_un.d_val, PREFIX_HEX);
+ putchar ('\n');
+ }
+ break;
+
+ case DT_BIND_NOW:
+ /* The value of this entry is ignored. */
+ break;
+
+ default:
+ if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
+ version_info [DT_VERSIONTAGIDX (entry->d_tag)] =
+ entry->d_un.d_val;
+
+ if (do_dynamic)
+ {
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ dynamic_segment_mips_val (entry);
+ break;
+ case EM_PARISC:
+ dynamic_segment_parisc_val (entry);
+ break;
+ default:
+ print_vma (entry->d_un.d_val, PREFIX_HEX);
+ putchar ('\n');
+ }
+ }
+ break;
+ }
+ }
+
+ return 1;
+}
+
+static char *
+get_ver_flags (flags)
+ unsigned int flags;
+{
+ static char buff [32];
+
+ buff[0] = 0;
+
+ if (flags == 0)
+ return _("none");
+
+ if (flags & VER_FLG_BASE)
+ strcat (buff, "BASE ");
+
+ if (flags & VER_FLG_WEAK)
+ {
+ if (flags & VER_FLG_BASE)
+ strcat (buff, "| ");
+
+ strcat (buff, "WEAK ");
+ }
+
+ if (flags & ~(VER_FLG_BASE | VER_FLG_WEAK))
+ strcat (buff, "| <unknown>");
+
+ return buff;
+}
+
+/* Display the contents of the version sections. */
+static int
+process_version_sections (file)
+ FILE * file;
+{
+ Elf32_Internal_Shdr * section;
+ unsigned i;
+ int found = 0;
+
+ if (! do_version)
+ return 1;
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i++, section ++)
+ {
+ switch (section->sh_type)
+ {
+ case SHT_GNU_verdef:
+ {
+ Elf_External_Verdef * edefs;
+ unsigned int idx;
+ unsigned int cnt;
+
+ found = 1;
+
+ printf
+ (_("\nVersion definition section '%s' contains %ld entries:\n"),
+ SECTION_NAME (section), section->sh_info);
+
+ printf (_(" Addr: 0x"));
+ printf_vma (section->sh_addr);
+ printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
+ (unsigned long) section->sh_offset, section->sh_link,
+ SECTION_NAME (section_headers + section->sh_link));
+
+ GET_DATA_ALLOC (section->sh_offset, section->sh_size,
+ edefs, Elf_External_Verdef *,
+ "version definition section");
+
+ for (idx = cnt = 0; cnt < section->sh_info; ++ cnt)
+ {
+ char * vstart;
+ Elf_External_Verdef * edef;
+ Elf_Internal_Verdef ent;
+ Elf_External_Verdaux * eaux;
+ Elf_Internal_Verdaux aux;
+ int j;
+ int isum;
+
+ vstart = ((char *) edefs) + idx;
+
+ edef = (Elf_External_Verdef *) vstart;
+
+ ent.vd_version = BYTE_GET (edef->vd_version);
+ ent.vd_flags = BYTE_GET (edef->vd_flags);
+ ent.vd_ndx = BYTE_GET (edef->vd_ndx);
+ ent.vd_cnt = BYTE_GET (edef->vd_cnt);
+ ent.vd_hash = BYTE_GET (edef->vd_hash);
+ ent.vd_aux = BYTE_GET (edef->vd_aux);
+ ent.vd_next = BYTE_GET (edef->vd_next);
+
+ printf (_(" %#06x: Rev: %d Flags: %s"),
+ idx, ent.vd_version, get_ver_flags (ent.vd_flags));
+
+ printf (_(" Index: %d Cnt: %d "),
+ ent.vd_ndx, ent.vd_cnt);
+
+ vstart += ent.vd_aux;
+
+ eaux = (Elf_External_Verdaux *) vstart;
+
+ aux.vda_name = BYTE_GET (eaux->vda_name);
+ aux.vda_next = BYTE_GET (eaux->vda_next);
+
+ if (dynamic_strings)
+ printf (_("Name: %s\n"), dynamic_strings + aux.vda_name);
+ else
+ printf (_("Name index: %ld\n"), aux.vda_name);
+
+ isum = idx + ent.vd_aux;
+
+ for (j = 1; j < ent.vd_cnt; j ++)
+ {
+ isum += aux.vda_next;
+ vstart += aux.vda_next;
+
+ eaux = (Elf_External_Verdaux *) vstart;
+
+ aux.vda_name = BYTE_GET (eaux->vda_name);
+ aux.vda_next = BYTE_GET (eaux->vda_next);
+
+ if (dynamic_strings)
+ printf (_(" %#06x: Parent %d: %s\n"),
+ isum, j, dynamic_strings + aux.vda_name);
+ else
+ printf (_(" %#06x: Parent %d, name index: %ld\n"),
+ isum, j, aux.vda_name);
+ }
+
+ idx += ent.vd_next;
+ }
+
+ free (edefs);
+ }
+ break;
+
+ case SHT_GNU_verneed:
+ {
+ Elf_External_Verneed * eneed;
+ unsigned int idx;
+ unsigned int cnt;
+
+ found = 1;
+
+ printf (_("\nVersion needs section '%s' contains %ld entries:\n"),
+ SECTION_NAME (section), section->sh_info);
+
+ printf (_(" Addr: 0x"));
+ printf_vma (section->sh_addr);
+ printf (_(" Offset: %#08lx Link to section: %ld (%s)\n"),
+ (unsigned long) section->sh_offset, section->sh_link,
+ SECTION_NAME (section_headers + section->sh_link));
+
+ GET_DATA_ALLOC (section->sh_offset, section->sh_size,
+ eneed, Elf_External_Verneed *,
+ "version need section");
+
+ for (idx = cnt = 0; cnt < section->sh_info; ++cnt)
+ {
+ Elf_External_Verneed * entry;
+ Elf_Internal_Verneed ent;
+ int j;
+ int isum;
+ char * vstart;
+
+ vstart = ((char *) eneed) + idx;
+
+ entry = (Elf_External_Verneed *) vstart;
+
+ ent.vn_version = BYTE_GET (entry->vn_version);
+ ent.vn_cnt = BYTE_GET (entry->vn_cnt);
+ ent.vn_file = BYTE_GET (entry->vn_file);
+ ent.vn_aux = BYTE_GET (entry->vn_aux);
+ ent.vn_next = BYTE_GET (entry->vn_next);
+
+ printf (_(" %#06x: Version: %d"), idx, ent.vn_version);
+
+ if (dynamic_strings)
+ printf (_(" File: %s"), dynamic_strings + ent.vn_file);
+ else
+ printf (_(" File: %lx"), ent.vn_file);
+
+ printf (_(" Cnt: %d\n"), ent.vn_cnt);
+
+ vstart += ent.vn_aux;
+
+ for (j = 0, isum = idx + ent.vn_aux; j < ent.vn_cnt; ++j)
+ {
+ Elf_External_Vernaux * eaux;
+ Elf_Internal_Vernaux aux;
+
+ eaux = (Elf_External_Vernaux *) vstart;
+
+ aux.vna_hash = BYTE_GET (eaux->vna_hash);
+ aux.vna_flags = BYTE_GET (eaux->vna_flags);
+ aux.vna_other = BYTE_GET (eaux->vna_other);
+ aux.vna_name = BYTE_GET (eaux->vna_name);
+ aux.vna_next = BYTE_GET (eaux->vna_next);
+
+ if (dynamic_strings)
+ printf (_(" %#06x: Name: %s"),
+ isum, dynamic_strings + aux.vna_name);
+ else
+ printf (_(" %#06x: Name index: %lx"),
+ isum, aux.vna_name);
+
+ printf (_(" Flags: %s Version: %d\n"),
+ get_ver_flags (aux.vna_flags), aux.vna_other);
+
+ isum += aux.vna_next;
+ vstart += aux.vna_next;
+ }
+
+ idx += ent.vn_next;
+ }
+
+ free (eneed);
+ }
+ break;
+
+ case SHT_GNU_versym:
+ {
+ Elf32_Internal_Shdr * link_section;
+ int total;
+ int cnt;
+ unsigned char * edata;
+ unsigned short * data;
+ char * strtab;
+ Elf_Internal_Sym * symbols;
+ Elf32_Internal_Shdr * string_sec;
+
+ link_section = section_headers + section->sh_link;
+ total = section->sh_size / section->sh_entsize;
+
+ found = 1;
+
+ symbols = GET_ELF_SYMBOLS (file, link_section->sh_offset,
+ link_section->sh_size / link_section->sh_entsize);
+
+ string_sec = section_headers + link_section->sh_link;
+
+ GET_DATA_ALLOC (string_sec->sh_offset, string_sec->sh_size,
+ strtab, char *, "version string table");
+
+ printf (_("\nVersion symbols section '%s' contains %d entries:\n"),
+ SECTION_NAME (section), total);
+
+ printf (_(" Addr: "));
+ printf_vma (section->sh_addr);
+ printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
+ (unsigned long) section->sh_offset, section->sh_link,
+ SECTION_NAME (link_section));
+
+ GET_DATA_ALLOC (version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
+ - loadaddr,
+ total * sizeof (short), edata,
+ unsigned char *, "version symbol data");
+
+ data = (unsigned short *) malloc (total * sizeof (short));
+
+ for (cnt = total; cnt --;)
+ data [cnt] = byte_get (edata + cnt * sizeof (short),
+ sizeof (short));
+
+ free (edata);
+
+ for (cnt = 0; cnt < total; cnt += 4)
+ {
+ int j, nn;
+ char *name;
+
+ printf (" %03x:", cnt);
+
+ for (j = 0; (j < 4) && (cnt + j) < total; ++j)
+ switch (data [cnt + j])
+ {
+ case 0:
+ fputs (_(" 0 (*local*) "), stdout);
+ break;
+
+ case 1:
+ fputs (_(" 1 (*global*) "), stdout);
+ break;
+
+ default:
+ 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)
+ {
+ /* 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);
+ }
+ else if (symbols [cnt + j].st_shndx == SHN_UNDEF)
+ {
+ Elf_Internal_Verneed ivn;
+ unsigned long offset;
+
+ offset = version_info [DT_VERSIONTAGIDX (DT_VERNEED)]
+ - loadaddr;
+
+ do
+ {
+ Elf_Internal_Vernaux ivna;
+ Elf_External_Verneed evn;
+ Elf_External_Vernaux evna;
+ unsigned long a_off;
+
+ GET_DATA (offset, evn, "version need");
+
+ ivn.vn_aux = BYTE_GET (evn.vn_aux);
+ ivn.vn_next = BYTE_GET (evn.vn_next);
+
+ a_off = offset + ivn.vn_aux;
+
+ do
+ {
+ GET_DATA (a_off, evna,
+ "version need aux (2)");
+
+ ivna.vna_next = BYTE_GET (evna.vna_next);
+ ivna.vna_other = BYTE_GET (evna.vna_other);
+
+ a_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;
+ }
+
+ offset += ivn.vn_next;
+ }
+ while (ivn.vn_next);
+ }
+ else if (data [cnt + j] != 0x8001)
+ {
+ Elf_Internal_Verdef ivd;
+ Elf_External_Verdef evd;
+ unsigned long offset;
+
+ offset = version_info
+ [DT_VERSIONTAGIDX (DT_VERDEF)] - loadaddr;
+
+ do
+ {
+ GET_DATA (offset, evd, "version def");
+
+ 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_next + ivd.vd_aux,
+ evda, "version def aux");
+
+ ivda.vda_name = BYTE_GET (evda.vda_name);
+
+ name = strtab + ivda.vda_name;
+ nn += printf ("(%s%-*s",
+ name,
+ 12 - (int) strlen (name),
+ ")");
+ }
+ }
+
+ if (nn < 18)
+ printf ("%*c", 18 - nn, ' ');
+ }
+
+ putchar ('\n');
+ }
+
+ free (data);
+ free (strtab);
+ free (symbols);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (! found)
+ printf (_("\nNo version information found in this file.\n"));
+
+ return 1;
+}
+
+static const char *
+get_symbol_binding (binding)
+ unsigned int binding;
+{
+ static char buff [32];
+
+ switch (binding)
+ {
+ case STB_LOCAL: return "LOCAL";
+ case STB_GLOBAL: return "GLOBAL";
+ case STB_WEAK: return "WEAK";
+ default:
+ if (binding >= STB_LOPROC && binding <= STB_HIPROC)
+ sprintf (buff, _("<processor specific>: %d"), binding);
+ else if (binding >= STB_LOOS && binding <= STB_HIOS)
+ sprintf (buff, _("<OS specific>: %d"), binding);
+ else
+ sprintf (buff, _("<unknown>: %d"), binding);
+ return buff;
+ }
+}
+
+static const char *
+get_symbol_type (type)
+ unsigned int type;
+{
+ static char buff [32];
+
+ switch (type)
+ {
+ case STT_NOTYPE: return "NOTYPE";
+ case STT_OBJECT: return "OBJECT";
+ case STT_FUNC: return "FUNC";
+ case STT_SECTION: return "SECTION";
+ case STT_FILE: return "FILE";
+ case STT_COMMON: return "COMMON";
+ default:
+ if (type >= STT_LOPROC && type <= STT_HIPROC)
+ {
+ if (elf_header.e_machine == EM_ARM && type == STT_ARM_TFUNC)
+ return "THUMB_FUNC";
+
+ if (elf_header.e_machine == EM_SPARCV9 && type == STT_REGISTER)
+ return "REGISTER";
+
+ if (elf_header.e_machine == EM_PARISC && type == STT_PARISC_MILLI)
+ return "PARISC_MILLI";
+
+ sprintf (buff, _("<processor specific>: %d"), type);
+ }
+ else if (type >= STT_LOOS && type <= STT_HIOS)
+ {
+ if (elf_header.e_machine == EM_PARISC)
+ {
+ if (type == STT_HP_OPAQUE)
+ return "HP_OPAQUE";
+ if (type == STT_HP_STUB)
+ return "HP_STUB";
+ }
+
+ sprintf (buff, _("<OS specific>: %d"), type);
+ }
+ else
+ sprintf (buff, _("<unknown>: %d"), type);
+ return buff;
+ }
+}
+
+static const char *
+get_symbol_visibility (visibility)
+ unsigned int visibility;
+{
+ switch (visibility)
+ {
+ case STV_DEFAULT: return "DEFAULT";
+ case STV_INTERNAL: return "INTERNAL";
+ case STV_HIDDEN: return "HIDDEN";
+ case STV_PROTECTED: return "PROTECTED";
+ default: abort ();
+ }
+}
+
+static const char *
+get_symbol_index_type (type)
+ unsigned int type;
+{
+ switch (type)
+ {
+ case SHN_UNDEF: return "UND";
+ case SHN_ABS: return "ABS";
+ case SHN_COMMON: return "COM";
+ default:
+ if (type >= SHN_LOPROC && type <= SHN_HIPROC)
+ return "PRC";
+ else if (type >= SHN_LORESERVE && type <= SHN_HIRESERVE)
+ return "RSV";
+ else if (type >= SHN_LOOS && type <= SHN_HIOS)
+ return "OS ";
+ else
+ {
+ static char buff [32];
+
+ sprintf (buff, "%3d", type);
+ return buff;
+ }
+ }
+}
+
+static int *
+get_dynamic_data (file, number)
+ FILE * file;
+ unsigned int number;
+{
+ char * e_data;
+ int * i_data;
+
+ e_data = (char *) malloc (number * 4);
+
+ if (e_data == NULL)
+ {
+ error (_("Out of memory\n"));
+ return NULL;
+ }
+
+ if (fread (e_data, 4, number, file) != number)
+ {
+ error (_("Unable to read in dynamic data\n"));
+ return NULL;
+ }
+
+ i_data = (int *) malloc (number * sizeof (* i_data));
+
+ if (i_data == NULL)
+ {
+ error (_("Out of memory\n"));
+ free (e_data);
+ return NULL;
+ }
+
+ while (number--)
+ i_data [number] = byte_get (e_data + number * 4, 4);
+
+ free (e_data);
+
+ return i_data;
+}
+
+/* Dump the symbol table */
+static int
+process_symbol_table (file)
+ FILE * file;
+{
+ Elf32_Internal_Shdr * section;
+ char nb [4];
+ char nc [4];
+ int nbuckets = 0;
+ int nchains = 0;
+ int * buckets = NULL;
+ int * chains = NULL;
+
+ if (! do_syms && !do_histogram)
+ return 1;
+
+ if (dynamic_info[DT_HASH] && ((do_using_dynamic && dynamic_strings != NULL)
+ || do_histogram))
+ {
+ if (fseek (file, dynamic_info[DT_HASH] - loadaddr, SEEK_SET))
+ {
+ error (_("Unable to seek to start of dynamic information"));
+ return 0;
+ }
+
+ if (fread (nb, sizeof (nb), 1, file) != 1)
+ {
+ error (_("Failed to read in number of buckets\n"));
+ return 0;
+ }
+
+ if (fread (nc, sizeof (nc), 1, file) != 1)
+ {
+ error (_("Failed to read in number of chains\n"));
+ return 0;
+ }
+
+ nbuckets = byte_get (nb, 4);
+ nchains = byte_get (nc, 4);
+
+ buckets = get_dynamic_data (file, nbuckets);
+ chains = get_dynamic_data (file, nchains);
+
+ if (buckets == NULL || chains == NULL)
+ return 0;
+ }
+
+ if (do_syms
+ && dynamic_info[DT_HASH] && do_using_dynamic && dynamic_strings != NULL)
+ {
+ int hn;
+ int si;
+
+ printf (_("\nSymbol table for image:\n"));
+ if (is_32bit_elf)
+ printf (_(" Num Buc: Value Size Type Bind Vis Ndx Name\n"));
+ else
+ printf (_(" Num Buc: Value Size Type Bind Vis Ndx Name\n"));
+
+ for (hn = 0; hn < nbuckets; hn++)
+ {
+ if (! buckets [hn])
+ continue;
+
+ for (si = buckets [hn]; si < nchains && si > 0; si = chains [si])
+ {
+ Elf_Internal_Sym * psym;
+
+ psym = dynamic_symbols + si;
+
+ printf (" %3d %3d: ", si, hn);
+ 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)));
+ printf (" %3.3s", get_symbol_index_type (psym->st_shndx));
+ printf (" %s\n", dynamic_strings + psym->st_name);
+ }
+ }
+ }
+ else if (do_syms && !do_using_dynamic)
+ {
+ unsigned int i;
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i++, section++)
+ {
+ unsigned int si;
+ char * strtab;
+ Elf_Internal_Sym * symtab;
+ Elf_Internal_Sym * psym;
+
+
+ if ( section->sh_type != SHT_SYMTAB
+ && section->sh_type != SHT_DYNSYM)
+ continue;
+
+ printf (_("\nSymbol table '%s' contains %lu entries:\n"),
+ SECTION_NAME (section),
+ (unsigned long) (section->sh_size / section->sh_entsize));
+ if (is_32bit_elf)
+ printf (_(" Num: Value Size Type Bind Vis Ndx Name\n"));
+ else
+ printf (_(" Num: Value Size Type Bind Vis Ndx Name\n"));
+
+ symtab = GET_ELF_SYMBOLS (file, section->sh_offset,
+ section->sh_size / section->sh_entsize);
+ if (symtab == NULL)
+ continue;
+
+ if (section->sh_link == elf_header.e_shstrndx)
+ strtab = string_table;
+ else
+ {
+ Elf32_Internal_Shdr * string_sec;
+
+ string_sec = section_headers + section->sh_link;
+
+ GET_DATA_ALLOC (string_sec->sh_offset, string_sec->sh_size,
+ strtab, char *, "string table");
+ }
+
+ for (si = 0, psym = symtab;
+ si < section->sh_size / section->sh_entsize;
+ si ++, psym ++)
+ {
+ printf ("%6d: ", si);
+ print_vma (psym->st_value, LONG_HEX);
+ putchar (' ');
+ print_vma (psym->st_size, DEC_5);
+ printf (" %-7s", 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)));
+ printf (" %4s", get_symbol_index_type (psym->st_shndx));
+ printf (" %s", strtab + psym->st_name);
+
+ if (section->sh_type == SHT_DYNSYM &&
+ version_info [DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
+ {
+ unsigned char data[2];
+ unsigned short vers_data;
+ unsigned long offset;
+ int is_nobits;
+ int check_def;
+
+ offset = version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
+ - loadaddr;
+
+ GET_DATA (offset + si * sizeof (vers_data), data,
+ "version data");
+
+ vers_data = byte_get (data, 2);
+
+ is_nobits = psym->st_shndx < SHN_LORESERVE ?
+ (section_headers [psym->st_shndx].sh_type == SHT_NOBITS)
+ : 0;
+
+ check_def = (psym->st_shndx != SHN_UNDEF);
+
+ if ((vers_data & 0x8000) || vers_data > 1)
+ {
+ if (is_nobits || ! check_def)
+ {
+ Elf_External_Verneed evn;
+ Elf_Internal_Verneed ivn;
+ Elf_Internal_Vernaux ivna;
+
+ /* We must test both. */
+ offset = version_info
+ [DT_VERSIONTAGIDX (DT_VERNEED)] - loadaddr;
+
+ do
+ {
+ 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
+ {
+ Elf_External_Vernaux evna;
+
+ GET_DATA (vna_off, evna,
+ "version need aux (3)");
+
+ ivna.vna_other = BYTE_GET (evna.vna_other);
+ ivna.vna_next = BYTE_GET (evna.vna_next);
+ ivna.vna_name = BYTE_GET (evna.vna_name);
+
+ vna_off += ivna.vna_next;
+ }
+ while (ivna.vna_other != vers_data
+ && ivna.vna_next != 0);
+
+ if (ivna.vna_other == vers_data)
+ break;
+
+ offset += ivn.vn_next;
+ }
+ while (ivn.vn_next != 0);
+
+ if (ivna.vna_other == vers_data)
+ {
+ printf ("@%s (%d)",
+ strtab + ivna.vna_name, ivna.vna_other);
+ check_def = 0;
+ }
+ else if (! is_nobits)
+ error (_("bad dynamic symbol"));
+ else
+ check_def = 1;
+ }
+
+ if (check_def)
+ {
+ if (vers_data != 0x8001)
+ {
+ Elf_Internal_Verdef ivd;
+ Elf_Internal_Verdaux ivda;
+ Elf_External_Verdaux evda;
+ unsigned long offset;
+
+ offset =
+ version_info [DT_VERSIONTAGIDX (DT_VERDEF)]
+ - loadaddr;
+
+ do
+ {
+ Elf_External_Verdef evd;
+
+ GET_DATA (offset, evd, "version def");
+
+ ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
+ ivd.vd_aux = BYTE_GET (evd.vd_aux);
+ ivd.vd_next = BYTE_GET (evd.vd_next);
+
+ offset += ivd.vd_next;
+ }
+ while (ivd.vd_ndx != (vers_data & 0x7fff)
+ && ivd.vd_next != 0);
+
+ offset -= ivd.vd_next;
+ offset += ivd.vd_aux;
+
+ GET_DATA (offset, evda, "version def aux");
+
+ ivda.vda_name = BYTE_GET (evda.vda_name);
+
+ if (psym->st_name != ivda.vda_name)
+ printf ((vers_data & 0x8000)
+ ? "@%s" : "@@%s",
+ strtab + ivda.vda_name);
+ }
+ }
+ }
+ }
+
+ putchar ('\n');
+ }
+
+ free (symtab);
+ if (strtab != string_table)
+ free (strtab);
+ }
+ }
+ else if (do_syms)
+ printf
+ (_("\nDynamic symbol information is not available for displaying symbols.\n"));
+
+ if (do_histogram && buckets != NULL)
+ {
+ 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);
+ printf (_(" Length Number %% of total Coverage\n"));
+
+ lengths = (int *) calloc (nbuckets, sizeof (int));
+ if (lengths == NULL)
+ {
+ error (_("Out of memory"));
+ return 0;
+ }
+ for (hn = 0; hn < nbuckets; ++hn)
+ {
+ if (! buckets [hn])
+ continue;
+
+ for (si = buckets[hn]; si > 0 && si < nchains; si = chains[si])
+ {
+ ++ nsyms;
+ if (maxlength < ++lengths[hn])
+ ++ maxlength;
+ }
+ }
+
+ counts = (int *) calloc (maxlength + 1, sizeof (int));
+ if (counts == NULL)
+ {
+ error (_("Out of memory"));
+ return 0;
+ }
+
+ for (hn = 0; hn < nbuckets; ++hn)
+ ++ counts [lengths [hn]];
+
+ if (nbuckets > 0)
+ {
+ printf (" 0 %-10d (%5.1f%%)\n",
+ counts[0], (counts[0] * 100.0) / nbuckets);
+ for (si = 1; si <= maxlength; ++si)
+ {
+ nzero_counts += counts[si] * si;
+ printf ("%7d %-10d (%5.1f%%) %5.1f%%\n",
+ si, counts[si], (counts[si] * 100.0) / nbuckets,
+ (nzero_counts * 100.0) / nsyms);
+ }
+ }
+
+ free (counts);
+ free (lengths);
+ }
+
+ if (buckets != NULL)
+ {
+ free (buckets);
+ free (chains);
+ }
+
+ return 1;
+}
+
+static int
+process_syminfo (file)
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ unsigned int i;
+
+ if (dynamic_syminfo == NULL
+ || !do_dynamic)
+ /* No syminfo, this is ok. */
+ return 1;
+
+ /* There better should be a dynamic symbol section. */
+ if (dynamic_symbols == NULL || dynamic_strings == NULL)
+ return 0;
+
+ if (dynamic_addr)
+ printf (_("\nDynamic info segment at offset 0x%lx contains %d entries:\n"),
+ dynamic_syminfo_offset, dynamic_syminfo_nent);
+
+ printf (_(" Num: Name BoundTo Flags\n"));
+ for (i = 0; i < dynamic_syminfo_nent; ++i)
+ {
+ unsigned short int flags = dynamic_syminfo[i].si_flags;
+
+ printf ("%4d: %-30s ", i,
+ dynamic_strings + dynamic_symbols[i].st_name);
+
+ switch (dynamic_syminfo[i].si_boundto)
+ {
+ case SYMINFO_BT_SELF:
+ fputs ("SELF ", stdout);
+ break;
+ case SYMINFO_BT_PARENT:
+ fputs ("PARENT ", stdout);
+ break;
+ default:
+ if (dynamic_syminfo[i].si_boundto > 0
+ && dynamic_syminfo[i].si_boundto < dynamic_size)
+ printf ("%-10s ",
+ dynamic_strings
+ + dynamic_segment[dynamic_syminfo[i].si_boundto].d_un.d_val);
+ else
+ printf ("%-10d ", dynamic_syminfo[i].si_boundto);
+ break;
+ }
+
+ if (flags & SYMINFO_FLG_DIRECT)
+ printf (" DIRECT");
+ if (flags & SYMINFO_FLG_PASSTHRU)
+ printf (" PASSTHRU");
+ if (flags & SYMINFO_FLG_COPY)
+ printf (" COPY");
+ if (flags & SYMINFO_FLG_LAZYLOAD)
+ printf (" LAZYLOAD");
+
+ puts ("");
+ }
+
+ return 1;
+}
+
+#ifdef SUPPORT_DISASSEMBLY
+static void
+disassemble_section (section, file)
+ Elf32_Internal_Shdr * section;
+ FILE * file;
+{
+ printf (_("\nAssembly dump of section %s\n"),
+ SECTION_NAME (section));
+
+ /* XXX -- to be done --- XXX */
+
+ return 1;
+}
+#endif
+
+static int
+dump_section (section, file)
+ Elf32_Internal_Shdr * section;
+ FILE * file;
+{
+ bfd_size_type bytes;
+ bfd_vma addr;
+ unsigned char * data;
+ unsigned char * start;
+
+ bytes = section->sh_size;
+
+ if (bytes == 0)
+ {
+ printf (_("\nSection '%s' has no data to dump.\n"),
+ SECTION_NAME (section));
+ return 0;
+ }
+ else
+ printf (_("\nHex dump of section '%s':\n"), SECTION_NAME (section));
+
+ addr = section->sh_addr;
+
+ GET_DATA_ALLOC (section->sh_offset, bytes, start, unsigned char *,
+ "section data");
+
+ data = start;
+
+ while (bytes)
+ {
+ int j;
+ int k;
+ int lbytes;
+
+ lbytes = (bytes > 16 ? 16 : bytes);
+
+ printf (" 0x%8.8lx ", (unsigned long) addr);
+
+ switch (elf_header.e_ident [EI_DATA])
+ {
+ default:
+ case ELFDATA2LSB:
+ for (j = 15; j >= 0; j --)
+ {
+ if (j < lbytes)
+ printf ("%2.2x", data [j]);
+ else
+ printf (" ");
+
+ if (!(j & 0x3))
+ printf (" ");
+ }
+ break;
+
+ case ELFDATA2MSB:
+ for (j = 0; j < 16; j++)
+ {
+ if (j < lbytes)
+ printf ("%2.2x", data [j]);
+ else
+ printf (" ");
+
+ if ((j & 3) == 3)
+ printf (" ");
+ }
+ break;
+ }
+
+ for (j = 0; j < lbytes; j++)
+ {
+ k = data [j];
+ if (k >= ' ' && k < 0x80)
+ printf ("%c", k);
+ else
+ printf (".");
+ }
+
+ putchar ('\n');
+
+ data += lbytes;
+ addr += lbytes;
+ bytes -= lbytes;
+ }
+
+ free (start);
+
+ return 1;
+}
+
+
+static unsigned long int
+read_leb128 (data, length_return, sign)
+ unsigned char * data;
+ int * length_return;
+ int sign;
+{
+ unsigned long int result = 0;
+ unsigned int num_read = 0;
+ int shift = 0;
+ unsigned char byte;
+
+ do
+ {
+ byte = * data ++;
+ num_read ++;
+
+ result |= (byte & 0x7f) << shift;
+
+ shift += 7;
+
+ }
+ while (byte & 0x80);
+
+ if (length_return != NULL)
+ * length_return = num_read;
+
+ if (sign && (shift < 32) && (byte & 0x40))
+ result |= -1 << shift;
+
+ return result;
+}
+
+typedef struct State_Machine_Registers
+{
+ unsigned long address;
+ unsigned int file;
+ unsigned int line;
+ unsigned int column;
+ int is_stmt;
+ int basic_block;
+ int end_sequence;
+/* This variable hold the number of the last entry seen
+ in the File Table. */
+ unsigned int last_file_entry;
+} SMR;
+
+static SMR state_machine_regs;
+
+static void
+reset_state_machine (is_stmt)
+ int is_stmt;
+{
+ state_machine_regs.address = 0;
+ state_machine_regs.file = 1;
+ state_machine_regs.line = 1;
+ state_machine_regs.column = 0;
+ state_machine_regs.is_stmt = is_stmt;
+ state_machine_regs.basic_block = 0;
+ state_machine_regs.end_sequence = 0;
+ state_machine_regs.last_file_entry = 0;
+}
+
+/* Handled an extend line op. Returns true if this is the end
+ of sequence. */
+static int
+process_extended_line_op (data, is_stmt, pointer_size)
+ unsigned char * data;
+ int is_stmt;
+ int pointer_size;
+{
+ unsigned char op_code;
+ int bytes_read;
+ unsigned int len;
+ unsigned char * name;
+ unsigned long adr;
+
+ len = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+
+ if (len == 0)
+ {
+ warn (_("badly formed extended line op encountered!"));
+ return bytes_read;
+ }
+
+ len += bytes_read;
+ op_code = * data ++;
+
+ printf (_(" Extended opcode %d: "), op_code);
+
+ switch (op_code)
+ {
+ case DW_LNE_end_sequence:
+ printf (_("End of Sequence\n\n"));
+ reset_state_machine (is_stmt);
+ break;
+
+ case DW_LNE_set_address:
+ adr = byte_get (data, pointer_size);
+ printf (_("set Address to 0x%lx\n"), adr);
+ state_machine_regs.address = adr;
+ break;
+
+ case DW_LNE_define_file:
+ printf (_(" define new File Table entry\n"));
+ printf (_(" Entry\tDir\tTime\tSize\tName\n"));
+
+ printf (_(" %d\t"), ++ state_machine_regs.last_file_entry);
+ name = data;
+ data += strlen (data) + 1;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ printf (_("%s\n\n"), name);
+ break;
+
+ default:
+ printf (_("UNKNOWN: length %d\n"), len - bytes_read);
+ break;
+ }
+
+ return len;
+}
+
+/* Size of pointers in the .debug_line section. This information is not
+ really present in that section. It's obtained before dumping the debug
+ sections by doing some pre-scan of the .debug_info section. */
+static int debug_line_pointer_size = 4;
+
+static int
+display_debug_lines (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ DWARF2_External_LineInfo * external;
+ DWARF2_Internal_LineInfo info;
+ unsigned char * standard_opcodes;
+ unsigned char * data = start;
+ unsigned char * end = start + section->sh_size;
+ unsigned char * end_of_sequence;
+ int i;
+
+ printf (_("\nDump of debug contents of section %s:\n\n"),
+ SECTION_NAME (section));
+
+ while (data < end)
+ {
+ external = (DWARF2_External_LineInfo *) data;
+
+ /* Check the length of the block. */
+ info.li_length = BYTE_GET (external->li_length);
+ if (info.li_length > section->sh_size)
+ {
+ warn
+ (_("The line info appears to be corrupt - the section is too small\n"));
+ return 0;
+ }
+
+ /* Check its version number. */
+ info.li_version = BYTE_GET (external->li_version);
+ if (info.li_version != 2)
+ {
+ warn (_("Only DWARF version 2 line info is currently supported.\n"));
+ return 0;
+ }
+
+ info.li_prologue_length = BYTE_GET (external->li_prologue_length);
+ info.li_min_insn_length = BYTE_GET (external->li_min_insn_length);
+ info.li_default_is_stmt = BYTE_GET (external->li_default_is_stmt);
+ info.li_line_base = BYTE_GET (external->li_line_base);
+ info.li_line_range = BYTE_GET (external->li_line_range);
+ info.li_opcode_base = BYTE_GET (external->li_opcode_base);
+
+ /* Sign extend the line base field. */
+ info.li_line_base <<= 24;
+ info.li_line_base >>= 24;
+
+ printf (_(" Length: %ld\n"), info.li_length);
+ printf (_(" DWARF Version: %d\n"), info.li_version);
+ printf (_(" Prolgue Length: %d\n"), info.li_prologue_length);
+ printf (_(" Minimum Instruction Length: %d\n"), info.li_min_insn_length);
+ printf (_(" Initial value of 'is_stmt': %d\n"), info.li_default_is_stmt);
+ printf (_(" Line Base: %d\n"), info.li_line_base);
+ 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);
+
+ reset_state_machine (info.li_default_is_stmt);
+
+ /* Display the contents of the Opcodes table. */
+ standard_opcodes = data + sizeof (* external);
+
+ printf (_("\n Opcodes:\n"));
+
+ for (i = 1; i < info.li_opcode_base; i++)
+ printf (_(" Opcode %d has %d args\n"), i, standard_opcodes[i - 1]);
+
+ /* Display the contents of the Directory table. */
+ data = standard_opcodes + info.li_opcode_base - 1;
+
+ if (* data == 0)
+ printf (_("\n The Directory Table is empty.\n"));
+ else
+ {
+ printf (_("\n The Directory Table:\n"));
+
+ while (* data != 0)
+ {
+ printf (_(" %s\n"), data);
+
+ data += strlen (data) + 1;
+ }
+ }
+
+ /* Skip the NUL at the end of the table. */
+ data ++;
+
+ /* Display the contents of the File Name table. */
+ if (* data == 0)
+ printf (_("\n The File Name Table is empty.\n"));
+ else
+ {
+ printf (_("\n The File Name Table:\n"));
+ printf (_(" Entry\tDir\tTime\tSize\tName\n"));
+
+ while (* data != 0)
+ {
+ char * name;
+ int bytes_read;
+
+ printf (_(" %d\t"), ++ state_machine_regs.last_file_entry);
+ name = data;
+
+ data += strlen (data) + 1;
+
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%s\n"), name);
+ }
+ }
+
+ /* Skip the NUL at the end of the table. */
+ data ++;
+
+ /* Now display the statements. */
+ printf (_("\n Line Number Statements:\n"));
+
+
+ while (data < end_of_sequence)
+ {
+ unsigned char op_code;
+ int adv;
+ int bytes_read;
+
+ op_code = * data ++;
+
+ switch (op_code)
+ {
+ case DW_LNS_extended_op:
+ data += process_extended_line_op (data, info.li_default_is_stmt,
+ debug_line_pointer_size);
+ break;
+
+ case DW_LNS_copy:
+ printf (_(" Copy\n"));
+ break;
+
+ case DW_LNS_advance_pc:
+ adv = info.li_min_insn_length * read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ state_machine_regs.address += adv;
+ printf (_(" Advance PC by %d to %lx\n"), adv,
+ state_machine_regs.address);
+ break;
+
+ case DW_LNS_advance_line:
+ adv = read_leb128 (data, & bytes_read, 1);
+ data += bytes_read;
+ state_machine_regs.line += adv;
+ printf (_(" Advance Line by %d to %d\n"), adv,
+ state_machine_regs.line);
+ break;
+
+ case DW_LNS_set_file:
+ adv = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (_(" Set File Name to entry %d in the File Name Table\n"),
+ adv);
+ state_machine_regs.file = adv;
+ break;
+
+ case DW_LNS_set_column:
+ adv = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (_(" Set column to %d\n"), adv);
+ state_machine_regs.column = adv;
+ break;
+
+ case DW_LNS_negate_stmt:
+ adv = state_machine_regs.is_stmt;
+ adv = ! adv;
+ printf (_(" Set is_stmt to %d\n"), adv);
+ state_machine_regs.is_stmt = adv;
+ break;
+
+ case DW_LNS_set_basic_block:
+ printf (_(" Set basic block\n"));
+ state_machine_regs.basic_block = 1;
+ break;
+
+ case DW_LNS_const_add_pc:
+ adv = (((255 - info.li_opcode_base) / info.li_line_range)
+ * info.li_min_insn_length);
+ state_machine_regs.address += adv;
+ printf (_(" Advance PC by constant %d to 0x%lx\n"), adv,
+ state_machine_regs.address);
+ break;
+
+ case DW_LNS_fixed_advance_pc:
+ adv = byte_get (data, 2);
+ data += 2;
+ state_machine_regs.address += adv;
+ printf (_(" Advance PC by fixed size amount %d to 0x%lx\n"),
+ adv, state_machine_regs.address);
+ break;
+
+ default:
+ op_code -= info.li_opcode_base;
+ adv = (op_code / info.li_line_range) * info.li_min_insn_length;
+ state_machine_regs.address += adv;
+ printf (_(" Special opcode %d: advance Address by %d to 0x%lx"),
+ op_code, adv, state_machine_regs.address);
+ adv = (op_code % info.li_line_range) + info.li_line_base;
+ state_machine_regs.line += adv;
+ printf (_(" and Line by %d to %d\n"),
+ adv, state_machine_regs.line);
+ break;
+ }
+ }
+ printf ("\n");
+ }
+
+ return 1;
+}
+
+static int
+display_debug_pubnames (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ DWARF2_External_PubNames * external;
+ DWARF2_Internal_PubNames pubnames;
+ unsigned char * end;
+
+ end = start + section->sh_size;
+
+ printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
+
+ while (start < end)
+ {
+ unsigned char * data;
+ unsigned long offset;
+
+ external = (DWARF2_External_PubNames *) start;
+
+ pubnames.pn_length = BYTE_GET (external->pn_length);
+ pubnames.pn_version = BYTE_GET (external->pn_version);
+ pubnames.pn_offset = BYTE_GET (external->pn_offset);
+ pubnames.pn_size = BYTE_GET (external->pn_size);
+
+ data = start + sizeof (* external);
+ start += pubnames.pn_length + sizeof (external->pn_length);
+
+ if (pubnames.pn_version != 2)
+ {
+ warn (_("Only DWARF 2 pubnames are currently supported"));
+ continue;
+ }
+
+ printf (_(" Length: %ld\n"),
+ pubnames.pn_length);
+ printf (_(" Version: %d\n"),
+ pubnames.pn_version);
+ printf (_(" Offset into .debug_info section: %ld\n"),
+ pubnames.pn_offset);
+ printf (_(" Size of area in .debug_info section: %ld\n"),
+ pubnames.pn_size);
+
+ printf (_("\n Offset\tName\n"));
+
+ do
+ {
+ offset = byte_get (data, 4);
+
+ if (offset != 0)
+ {
+ data += 4;
+ printf (" %ld\t\t%s\n", offset, data);
+ data += strlen (data) + 1;
+ }
+ }
+ while (offset != 0);
+ }
+
+ printf ("\n");
+ return 1;
+}
+
+static char *
+get_TAG_name (tag)
+ unsigned long tag;
+{
+ switch (tag)
+ {
+ case DW_TAG_padding: return "DW_TAG_padding";
+ case DW_TAG_array_type: return "DW_TAG_array_type";
+ case DW_TAG_class_type: return "DW_TAG_class_type";
+ case DW_TAG_entry_point: return "DW_TAG_entry_point";
+ case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
+ case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
+ case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
+ case DW_TAG_label: return "DW_TAG_label";
+ case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
+ case DW_TAG_member: return "DW_TAG_member";
+ case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
+ case DW_TAG_reference_type: return "DW_TAG_reference_type";
+ case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
+ case DW_TAG_string_type: return "DW_TAG_string_type";
+ case DW_TAG_structure_type: return "DW_TAG_structure_type";
+ case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
+ case DW_TAG_typedef: return "DW_TAG_typedef";
+ case DW_TAG_union_type: return "DW_TAG_union_type";
+ case DW_TAG_unspecified_parameters: return "DW_TAG_unspecified_parameters";
+ case DW_TAG_variant: return "DW_TAG_variant";
+ case DW_TAG_common_block: return "DW_TAG_common_block";
+ case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
+ case DW_TAG_inheritance: return "DW_TAG_inheritance";
+ case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
+ case DW_TAG_module: return "DW_TAG_module";
+ case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
+ case DW_TAG_set_type: return "DW_TAG_set_type";
+ case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
+ case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
+ case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
+ case DW_TAG_base_type: return "DW_TAG_base_type";
+ case DW_TAG_catch_block: return "DW_TAG_catch_block";
+ case DW_TAG_const_type: return "DW_TAG_const_type";
+ case DW_TAG_constant: return "DW_TAG_constant";
+ case DW_TAG_enumerator: return "DW_TAG_enumerator";
+ case DW_TAG_file_type: return "DW_TAG_file_type";
+ case DW_TAG_friend: return "DW_TAG_friend";
+ case DW_TAG_namelist: return "DW_TAG_namelist";
+ case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
+ case DW_TAG_packed_type: return "DW_TAG_packed_type";
+ case DW_TAG_subprogram: return "DW_TAG_subprogram";
+ case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
+ case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
+ case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
+ case DW_TAG_try_block: return "DW_TAG_try_block";
+ case DW_TAG_variant_part: return "DW_TAG_variant_part";
+ case DW_TAG_variable: return "DW_TAG_variable";
+ case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
+ case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
+ case DW_TAG_format_label: return "DW_TAG_format_label";
+ case DW_TAG_function_template: return "DW_TAG_function_template";
+ case DW_TAG_class_template: return "DW_TAG_class_template";
+ default:
+ {
+ static char buffer [100];
+
+ sprintf (buffer, _("Unknown TAG value: %lx"), tag);
+ return buffer;
+ }
+ }
+}
+
+static char *
+get_AT_name (attribute)
+ unsigned long attribute;
+{
+ switch (attribute)
+ {
+ case DW_AT_sibling: return "DW_AT_sibling";
+ case DW_AT_location: return "DW_AT_location";
+ case DW_AT_name: return "DW_AT_name";
+ case DW_AT_ordering: return "DW_AT_ordering";
+ case DW_AT_subscr_data: return "DW_AT_subscr_data";
+ case DW_AT_byte_size: return "DW_AT_byte_size";
+ case DW_AT_bit_offset: return "DW_AT_bit_offset";
+ case DW_AT_bit_size: return "DW_AT_bit_size";
+ case DW_AT_element_list: return "DW_AT_element_list";
+ case DW_AT_stmt_list: return "DW_AT_stmt_list";
+ case DW_AT_low_pc: return "DW_AT_low_pc";
+ case DW_AT_high_pc: return "DW_AT_high_pc";
+ case DW_AT_language: return "DW_AT_language";
+ case DW_AT_member: return "DW_AT_member";
+ case DW_AT_discr: return "DW_AT_discr";
+ case DW_AT_discr_value: return "DW_AT_discr_value";
+ case DW_AT_visibility: return "DW_AT_visibility";
+ case DW_AT_import: return "DW_AT_import";
+ case DW_AT_string_length: return "DW_AT_string_length";
+ case DW_AT_common_reference: return "DW_AT_common_reference";
+ case DW_AT_comp_dir: return "DW_AT_comp_dir";
+ case DW_AT_const_value: return "DW_AT_const_value";
+ case DW_AT_containing_type: return "DW_AT_containing_type";
+ case DW_AT_default_value: return "DW_AT_default_value";
+ case DW_AT_inline: return "DW_AT_inline";
+ case DW_AT_is_optional: return "DW_AT_is_optional";
+ case DW_AT_lower_bound: return "DW_AT_lower_bound";
+ case DW_AT_producer: return "DW_AT_producer";
+ case DW_AT_prototyped: return "DW_AT_prototyped";
+ case DW_AT_return_addr: return "DW_AT_return_addr";
+ case DW_AT_start_scope: return "DW_AT_start_scope";
+ case DW_AT_stride_size: return "DW_AT_stride_size";
+ case DW_AT_upper_bound: return "DW_AT_upper_bound";
+ case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
+ case DW_AT_accessibility: return "DW_AT_accessibility";
+ case DW_AT_address_class: return "DW_AT_address_class";
+ case DW_AT_artificial: return "DW_AT_artificial";
+ case DW_AT_base_types: return "DW_AT_base_types";
+ case DW_AT_calling_convention: return "DW_AT_calling_convention";
+ case DW_AT_count: return "DW_AT_count";
+ case DW_AT_data_member_location: return "DW_AT_data_member_location";
+ case DW_AT_decl_column: return "DW_AT_decl_column";
+ case DW_AT_decl_file: return "DW_AT_decl_file";
+ case DW_AT_decl_line: return "DW_AT_decl_line";
+ case DW_AT_declaration: return "DW_AT_declaration";
+ case DW_AT_discr_list: return "DW_AT_discr_list";
+ case DW_AT_encoding: return "DW_AT_encoding";
+ case DW_AT_external: return "DW_AT_external";
+ case DW_AT_frame_base: return "DW_AT_frame_base";
+ case DW_AT_friend: return "DW_AT_friend";
+ case DW_AT_identifier_case: return "DW_AT_identifier_case";
+ case DW_AT_macro_info: return "DW_AT_macro_info";
+ case DW_AT_namelist_items: return "DW_AT_namelist_items";
+ case DW_AT_priority: return "DW_AT_priority";
+ case DW_AT_segment: return "DW_AT_segment";
+ case DW_AT_specification: return "DW_AT_specification";
+ case DW_AT_static_link: return "DW_AT_static_link";
+ case DW_AT_type: return "DW_AT_type";
+ case DW_AT_use_location: return "DW_AT_use_location";
+ case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
+ case DW_AT_virtuality: return "DW_AT_virtuality";
+ case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
+ case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
+ case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
+ case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
+ case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
+ case DW_AT_MIPS_loop_unroll_factor: return "DW_AT_MIPS_loop_unroll_factor";
+ case DW_AT_MIPS_software_pipeline_depth: return "DW_AT_MIPS_software_pipeline_depth";
+ case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
+ case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
+ case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
+ case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
+ case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
+ case DW_AT_sf_names: return "DW_AT_sf_names";
+ case DW_AT_src_info: return "DW_AT_src_info";
+ case DW_AT_mac_info: return "DW_AT_mac_info";
+ case DW_AT_src_coords: return "DW_AT_src_coords";
+ case DW_AT_body_begin: return "DW_AT_body_begin";
+ case DW_AT_body_end: return "DW_AT_body_end";
+ default:
+ {
+ static char buffer [100];
+
+ sprintf (buffer, _("Unknown AT value: %lx"), attribute);
+ return buffer;
+ }
+ }
+}
+
+static char *
+get_FORM_name (form)
+ unsigned long form;
+{
+ switch (form)
+ {
+ case DW_FORM_addr: return "DW_FORM_addr";
+ case DW_FORM_block2: return "DW_FORM_block2";
+ case DW_FORM_block4: return "DW_FORM_block4";
+ case DW_FORM_data2: return "DW_FORM_data2";
+ case DW_FORM_data4: return "DW_FORM_data4";
+ case DW_FORM_data8: return "DW_FORM_data8";
+ case DW_FORM_string: return "DW_FORM_string";
+ case DW_FORM_block: return "DW_FORM_block";
+ case DW_FORM_block1: return "DW_FORM_block1";
+ case DW_FORM_data1: return "DW_FORM_data1";
+ case DW_FORM_flag: return "DW_FORM_flag";
+ case DW_FORM_sdata: return "DW_FORM_sdata";
+ case DW_FORM_strp: return "DW_FORM_strp";
+ case DW_FORM_udata: return "DW_FORM_udata";
+ case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
+ case DW_FORM_ref1: return "DW_FORM_ref1";
+ case DW_FORM_ref2: return "DW_FORM_ref2";
+ case DW_FORM_ref4: return "DW_FORM_ref4";
+ case DW_FORM_ref8: return "DW_FORM_ref8";
+ case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
+ case DW_FORM_indirect: return "DW_FORM_indirect";
+ default:
+ {
+ static char buffer [100];
+
+ sprintf (buffer, _("Unknown FORM value: %lx"), form);
+ return buffer;
+ }
+ }
+}
+
+/* FIXME: There are better and more effiecint ways to handle
+ these structures. For now though, I just want something that
+ is simple to implement. */
+typedef struct abbrev_attr
+{
+ unsigned long attribute;
+ unsigned long form;
+ struct abbrev_attr * next;
+}
+abbrev_attr;
+
+typedef struct abbrev_entry
+{
+ unsigned long entry;
+ unsigned long tag;
+ int children;
+ struct abbrev_attr * first_attr;
+ struct abbrev_attr * last_attr;
+ struct abbrev_entry * next;
+}
+abbrev_entry;
+
+static abbrev_entry * first_abbrev = NULL;
+static abbrev_entry * last_abbrev = NULL;
+
+static void
+free_abbrevs PARAMS ((void))
+{
+ abbrev_entry * abbrev;
+
+ for (abbrev = first_abbrev; abbrev;)
+ {
+ abbrev_entry * next = abbrev->next;
+ abbrev_attr * attr;
+
+ for (attr = abbrev->first_attr; attr;)
+ {
+ abbrev_attr * next = attr->next;
+
+ free (attr);
+ attr = next;
+ }
+
+ free (abbrev);
+ abbrev = next;
+ }
+
+ last_abbrev = first_abbrev = NULL;
+}
+
+static void
+add_abbrev (number, tag, children)
+ unsigned long number;
+ unsigned long tag;
+ int children;
+{
+ abbrev_entry * entry;
+
+ entry = (abbrev_entry *) malloc (sizeof (* entry));
+
+ if (entry == NULL)
+ /* ugg */
+ return;
+
+ entry->entry = number;
+ entry->tag = tag;
+ entry->children = children;
+ entry->first_attr = NULL;
+ entry->last_attr = NULL;
+ entry->next = NULL;
+
+ if (first_abbrev == NULL)
+ first_abbrev = entry;
+ else
+ last_abbrev->next = entry;
+
+ last_abbrev = entry;
+}
+
+static void
+add_abbrev_attr (attribute, form)
+ unsigned long attribute;
+ unsigned long form;
+{
+ abbrev_attr * attr;
+
+ attr = (abbrev_attr *) malloc (sizeof (* attr));
+
+ if (attr == NULL)
+ /* ugg */
+ return;
+
+ attr->attribute = attribute;
+ attr->form = form;
+ attr->next = NULL;
+
+ if (last_abbrev->first_attr == NULL)
+ last_abbrev->first_attr = attr;
+ else
+ last_abbrev->last_attr->next = attr;
+
+ last_abbrev->last_attr = attr;
+}
+
+/* Processes the (partial) contents of a .debug_abbrev section.
+ Returns NULL if the end of the section was encountered.
+ Returns the address after the last byte read if the end of
+ an abbreviation set was found. */
+
+static unsigned char *
+process_abbrev_section (start, end)
+ unsigned char * start;
+ unsigned char * end;
+{
+ if (first_abbrev != NULL)
+ return NULL;
+
+ while (start < end)
+ {
+ int bytes_read;
+ unsigned long entry;
+ unsigned long tag;
+ unsigned long attribute;
+ int children;
+
+ entry = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ /* A single zero is supposed to end the section according
+ to the standard. If there's more, then signal that to
+ the caller. */
+ if (entry == 0)
+ return start == end ? NULL : start;
+
+ tag = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ children = * start ++;
+
+ add_abbrev (entry, tag, children);
+
+ do
+ {
+ unsigned long form;
+
+ attribute = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ form = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ if (attribute != 0)
+ add_abbrev_attr (attribute, form);
+ }
+ while (attribute != 0);
+ }
+
+ return NULL;
+}
+
+
+static int
+display_debug_abbrev (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ abbrev_entry * entry;
+ unsigned char * end = start + section->sh_size;
+
+ printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
+
+ do
+ {
+ start = process_abbrev_section (start, end);
+
+ printf (_(" Number TAG\n"));
+
+ for (entry = first_abbrev; entry; entry = entry->next)
+ {
+ abbrev_attr * attr;
+
+ printf (_(" %ld %s [%s]\n"),
+ entry->entry,
+ get_TAG_name (entry->tag),
+ entry->children ? _("has children") : _("no children"));
+
+ for (attr = entry->first_attr; attr; attr = attr->next)
+ {
+ printf (_(" %-18s %s\n"),
+ get_AT_name (attr->attribute),
+ get_FORM_name (attr->form));
+ }
+ }
+ }
+ while (start);
+
+ printf ("\n");
+
+ return 1;
+}
+
+
+static unsigned char *
+display_block (data, length)
+ unsigned char * data;
+ unsigned long length;
+{
+ printf (_(" %lu byte block: "), length);
+
+ while (length --)
+ printf ("%lx ", (unsigned long) byte_get (data ++, 1));
+
+ return data;
+}
+
+static void
+decode_location_expression (data, pointer_size)
+ unsigned char * data;
+ unsigned int pointer_size;
+{
+ unsigned char op;
+ int bytes_read;
+ unsigned long uvalue;
+
+ op = * data ++;
+
+ switch (op)
+ {
+ 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));
+ 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));
+ break;
+ case DW_OP_const2s:
+ printf ("DW_OP_const2s: %ld", (long) byte_get (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));
+ 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)"));
+ 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:
+ case DW_FORM_ref1:
+ case DW_FORM_ref2:
+ case DW_FORM_ref4:
+ case DW_FORM_ref8:
+ case DW_FORM_ref_udata:
+ is_ref = 1;
+ }
+
+ 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;
+
+ 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);
+ break;
+
+ case DW_FORM_ref8:
+ case DW_FORM_data8:
+ uvalue = byte_get (data, 4);
+ printf (" %lx", uvalue);
+ printf (" %lx", (unsigned long) byte_get (data + 4, 4));
+ data += 8;
+ break;
+
+ 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);
+ 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:
+ case DW_FORM_indirect:
+ warn (_("Unable to handle FORM: %d"), form);
+ break;
+
+ default:
+ warn (_("Unrecognised form: %d"), form);
+ break;
+ }
+
+ /* For some attributes we can display futher information. */
+
+ printf ("\t");
+
+ switch (attribute)
+ {
+ case DW_AT_inline:
+ switch (uvalue)
+ {
+ case DW_INL_not_inlined: printf (_("(not inlined)")); break;
+ case DW_INL_inlined: printf (_("(inlined)")); break;
+ case DW_INL_declared_not_inlined: printf (_("(declared as inline but ignored)")); break;
+ case DW_INL_declared_inlined: printf (_("(declared as inline and inlined)")); break;
+ default: printf (_(" (Unknown inline attribute value: %lx)"), uvalue); break;
+ }
+ 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)
+ {
+ case DW_LANG_C: printf ("(non-ANSI C)"); break;
+ case DW_LANG_C89: printf ("(ANSI C)"); break;
+ case DW_LANG_C_plus_plus: printf ("(C++)"); break;
+ case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
+ case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
+ case DW_LANG_Modula2: printf ("(Modula 2)"); break;
+ case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
+ case DW_LANG_Ada83: printf ("(Ada)"); break;
+ case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
+ case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
+ case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
+ default: printf ("(Unknown: %lx)", uvalue); break;
+ }
+ break;
+
+ case DW_AT_encoding:
+ switch (uvalue)
+ {
+ case DW_ATE_void: printf ("(void)"); break;
+ case DW_ATE_address: printf ("(machine address)"); break;
+ case DW_ATE_boolean: printf ("(boolean)"); break;
+ case DW_ATE_complex_float: printf ("(complex float)"); break;
+ case DW_ATE_float: printf ("(float)"); break;
+ case DW_ATE_signed: printf ("(signed)"); break;
+ case DW_ATE_signed_char: printf ("(signed char)"); break;
+ case DW_ATE_unsigned: printf ("(unsigned)"); break;
+ case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
+ default:
+ if (uvalue >= DW_ATE_lo_user
+ && uvalue <= DW_ATE_hi_user)
+ printf ("(user defined type)");
+ else
+ printf ("(unknown type)");
+ break;
+ }
+ break;
+
+ case DW_AT_accessibility:
+ switch (uvalue)
+ {
+ case DW_ACCESS_public: printf ("(public)"); break;
+ case DW_ACCESS_protected: printf ("(protected)"); break;
+ case DW_ACCESS_private: printf ("(private)"); break;
+ default: printf ("(unknown accessibility)"); break;
+ }
+ break;
+
+ case DW_AT_visibility:
+ switch (uvalue)
+ {
+ case DW_VIS_local: printf ("(local)"); break;
+ case DW_VIS_exported: printf ("(exported)"); break;
+ case DW_VIS_qualified: printf ("(qualified)"); break;
+ default: printf ("(unknown visibility)"); break;
+ }
+ break;
+
+ case DW_AT_virtuality:
+ switch (uvalue)
+ {
+ case DW_VIRTUALITY_none: printf ("(none)"); break;
+ case DW_VIRTUALITY_virtual: printf ("(virtual)"); break;
+ case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
+ default: printf ("(unknown virtuality)"); break;
+ }
+ break;
+
+ case DW_AT_identifier_case:
+ switch (uvalue)
+ {
+ case DW_ID_case_sensitive: printf ("(case_sensitive)"); break;
+ case DW_ID_up_case: printf ("(up_case)"); break;
+ case DW_ID_down_case: printf ("(down_case)"); break;
+ case DW_ID_case_insensitive: printf ("(case_insensitive)"); break;
+ default: printf ("(unknown case)"); break;
+ }
+ break;
+
+ case DW_AT_calling_convention:
+ switch (uvalue)
+ {
+ case DW_CC_normal: printf ("(normal)"); break;
+ case DW_CC_program: printf ("(program)"); break;
+ case DW_CC_nocall: printf ("(nocall)"); break;
+ default:
+ if (uvalue >= DW_CC_lo_user
+ && uvalue <= DW_CC_hi_user)
+ printf ("(user defined)");
+ else
+ printf ("(unknown convention)");
+ }
+ break;
+
+ 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 (")");
+ break;
+
+ default:
+ break;
+ }
+
+ printf ("\n");
+ return data;
+}
+
+static int
+display_debug_info (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file;
+{
+ unsigned char * end = start + section->sh_size;
+ unsigned char * section_begin = start;
+
+ printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
+
+ while (start < end)
+ {
+ DWARF2_External_CompUnit * external;
+ DWARF2_Internal_CompUnit compunit;
+ unsigned char * tags;
+ int i;
+ int level;
+
+ external = (DWARF2_External_CompUnit *) start;
+
+ compunit.cu_length = BYTE_GET (external->cu_length);
+ compunit.cu_version = BYTE_GET (external->cu_version);
+ compunit.cu_abbrev_offset = BYTE_GET (external->cu_abbrev_offset);
+ compunit.cu_pointer_size = BYTE_GET (external->cu_pointer_size);
+
+ tags = start + sizeof (* external);
+ start += compunit.cu_length + sizeof (external->cu_length);
+
+ 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 ();
+
+ /* Read in the abbrevs used by this compilation unit. */
+
+ {
+ Elf32_Internal_Shdr * sec;
+ unsigned char * begin;
+
+ /* Locate the .debug_abbrev section and process it. */
+ for (i = 0, sec = section_headers;
+ i < elf_header.e_shnum;
+ i ++, sec ++)
+ if (strcmp (SECTION_NAME (sec), ".debug_abbrev") == 0)
+ break;
+
+ if (i == -1 || sec->sh_size == 0)
+ {
+ warn (_("Unable to locate .debug_abbrev section!\n"));
+ return 0;
+ }
+
+ GET_DATA_ALLOC (sec->sh_offset, sec->sh_size, begin, unsigned char *,
+ "debug_abbrev section data");
+
+ process_abbrev_section (begin + compunit.cu_abbrev_offset,
+ begin + sec->sh_size);
+
+ free (begin);
+ }
+
+ level = 0;
+ while (tags < start)
+ {
+ int bytes_read;
+ unsigned long abbrev_number;
+ abbrev_entry * entry;
+ abbrev_attr * attr;
+
+ abbrev_number = read_leb128 (tags, & bytes_read, 0);
+ tags += bytes_read;
+
+ /* A null DIE marks the end of a list of children. */
+ if (abbrev_number == 0)
+ {
+ --level;
+ continue;
+ }
+
+ /* Scan through the abbreviation list until we reach the
+ correct entry. */
+ for (entry = first_abbrev;
+ entry && entry->entry != abbrev_number;
+ entry = entry->next)
+ continue;
+
+ if (entry == NULL)
+ {
+ warn (_("Unable to locate entry %lu in the abbreviation table\n"),
+ abbrev_number);
+ return 0;
+ }
+
+ printf (_(" <%d><%x>: Abbrev Number: %lu (%s)\n"),
+ level, tags - section_begin - bytes_read,
+ abbrev_number,
+ get_TAG_name (entry->tag));
+
+ for (attr = entry->first_attr; attr; attr = attr->next)
+ tags = read_and_display_attr (attr->attribute,
+ attr->form,
+ tags,
+ compunit.cu_pointer_size);
+
+ if (entry->children)
+ ++level;
+ }
+ }
+
+ printf ("\n");
+
+ return 1;
+}
+
+static int
+display_debug_aranges (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ unsigned char * end = start + section->sh_size;
+
+ printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
+
+ while (start < end)
+ {
+ DWARF2_External_ARange * external;
+ DWARF2_Internal_ARange arange;
+ unsigned char * ranges;
+ unsigned long length;
+ unsigned long address;
+ int excess;
+
+ external = (DWARF2_External_ARange *) start;
+
+ arange.ar_length = BYTE_GET (external->ar_length);
+ arange.ar_version = BYTE_GET (external->ar_version);
+ arange.ar_info_offset = BYTE_GET (external->ar_info_offset);
+ arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
+ arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
+
+ printf (_(" Length: %ld\n"), arange.ar_length);
+ printf (_(" Version: %d\n"), arange.ar_version);
+ printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);
+ printf (_(" Pointer Size: %d\n"), arange.ar_pointer_size);
+ printf (_(" Segment Size: %d\n"), arange.ar_segment_size);
+
+ printf (_("\n Address Length\n"));
+
+ ranges = start + sizeof (* external);
+
+ /* Must pad to an alignment boundary that is twice the pointer size. */
+ excess = sizeof (*external) % (2 * arange.ar_pointer_size);
+ if (excess)
+ ranges += (2 * arange.ar_pointer_size) - excess;
+
+ for (;;)
+ {
+ address = byte_get (ranges, arange.ar_pointer_size);
+
+ ranges += arange.ar_pointer_size;
+
+ length = byte_get (ranges, arange.ar_pointer_size);
+
+ ranges += arange.ar_pointer_size;
+
+ /* A pair of zeros marks the end of the list. */
+ if (address == 0 && length == 0)
+ break;
+
+ printf (" %8.8lx %lu\n", address, length);
+ }
+
+ start += arange.ar_length + sizeof (external->ar_length);
+ }
+
+ printf ("\n");
+
+ return 1;
+}
+
+
+static int
+display_debug_not_supported (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start ATTRIBUTE_UNUSED;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
+ SECTION_NAME (section));
+
+ return 1;
+}
+
+/* Pre-scan the .debug_info section to record the size of address.
+ When dumping the .debug_line, we use that size information, assuming
+ that all compilation units have the same address size. */
+static int
+prescan_debug_info (section, start, file)
+ Elf32_Internal_Shdr * section ATTRIBUTE_UNUSED;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ DWARF2_External_CompUnit * external;
+
+ external = (DWARF2_External_CompUnit *) start;
+
+ debug_line_pointer_size = BYTE_GET (external->cu_pointer_size);
+ return 0;
+}
+
+ /* A structure containing the name of a debug section and a pointer
+ to a function that can decode it. The third field is a prescan
+ function to be run over the section before displaying any of the
+ sections. */
+struct
+{
+ char * name;
+ int (* display) PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+ int (* prescan) PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+}
+debug_displays[] =
+{
+ { ".debug_info", display_debug_info, prescan_debug_info },
+ { ".debug_abbrev", display_debug_abbrev, NULL },
+ { ".debug_line", display_debug_lines, NULL },
+ { ".debug_aranges", display_debug_aranges, NULL },
+ { ".debug_pubnames", display_debug_pubnames, NULL },
+ { ".debug_macinfo", display_debug_not_supported, NULL },
+ { ".debug_frame", display_debug_not_supported, NULL },
+ { ".debug_str", display_debug_not_supported, NULL },
+ { ".debug_static_func", display_debug_not_supported, NULL },
+ { ".debug_static_vars", display_debug_not_supported, NULL },
+ { ".debug_types", display_debug_not_supported, NULL },
+ { ".debug_weaknames", display_debug_not_supported, NULL }
+};
+
+static int
+display_debug_section (section, file)
+ Elf32_Internal_Shdr * section;
+ FILE * file;
+{
+ char * name = SECTION_NAME (section);
+ bfd_size_type length;
+ unsigned char * start;
+ int i;
+
+ length = section->sh_size;
+ if (length == 0)
+ {
+ printf (_("\nSection '%s' has no debugging data.\n"), name);
+ return 0;
+ }
+
+ GET_DATA_ALLOC (section->sh_offset, length, start, unsigned char *,
+ "debug section data");
+
+ /* See if we know how to display the contents of this section. */
+ for (i = NUM_ELEM (debug_displays); i--;)
+ if (strcmp (debug_displays[i].name, name) == 0)
+ {
+ debug_displays[i].display (section, start, file);
+ break;
+ }
+
+ if (i == -1)
+ printf (_("Unrecognised debug section: %s\n"), name);
+
+ free (start);
+
+ /* If we loaded in the abbrev section at some point,
+ we must release it here. */
+ if (first_abbrev != NULL)
+ free_abbrevs ();
+
+ return 1;
+}
+
+static int
+process_section_contents (file)
+ FILE * file;
+{
+ Elf32_Internal_Shdr * section;
+ unsigned int i;
+
+ if (! do_dump)
+ return 1;
+
+ /* Pre-scan the debug sections to find some debug information not
+ present in some of them. For the .debug_line, we must find out the
+ size of address (specified in .debug_info and .debug_aranges). */
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum && i < num_dump_sects;
+ i ++, section ++)
+ {
+ char * name = SECTION_NAME (section);
+ int j;
+
+ if (section->sh_size == 0)
+ continue;
+
+ /* See if there is some pre-scan operation for this section. */
+ for (j = NUM_ELEM (debug_displays); j--;)
+ if (strcmp (debug_displays[j].name, name) == 0)
+ {
+ if (debug_displays[j].prescan != NULL)
+ {
+ bfd_size_type length;
+ unsigned char * start;
+
+ length = section->sh_size;
+ GET_DATA_ALLOC (section->sh_offset, length, start, unsigned char *,
+ "debug section data");
+
+ debug_displays[j].prescan (section, start, file);
+ free (start);
+ }
+
+ break;
+ }
+ }
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum && i < num_dump_sects;
+ i ++, section ++)
+ {
+#ifdef SUPPORT_DISASSEMBLY
+ if (dump_sects[i] & DISASS_DUMP)
+ disassemble_section (section, file);
+#endif
+ if (dump_sects[i] & HEX_DUMP)
+ dump_section (section, file);
+
+ if (dump_sects[i] & DEBUG_DUMP)
+ display_debug_section (section, file);
+ }
+
+ if (i < num_dump_sects)
+ warn (_("Some sections were not dumped because they do not exist!\n"));
+
+ return 1;
+}
+
+static void
+process_mips_fpe_exception (mask)
+ int mask;
+{
+ if (mask)
+ {
+ int first = 1;
+ if (mask & OEX_FPU_INEX)
+ fputs ("INEX", stdout), first = 0;
+ if (mask & OEX_FPU_UFLO)
+ printf ("%sUFLO", first ? "" : "|"), first = 0;
+ if (mask & OEX_FPU_OFLO)
+ printf ("%sOFLO", first ? "" : "|"), first = 0;
+ if (mask & OEX_FPU_DIV0)
+ printf ("%sDIV0", first ? "" : "|"), first = 0;
+ if (mask & OEX_FPU_INVAL)
+ printf ("%sINVAL", first ? "" : "|");
+ }
+ else
+ fputs ("0", stdout);
+}
+
+static int
+process_mips_specific (file)
+ FILE * file;
+{
+ Elf_Internal_Dyn * entry;
+ size_t liblist_offset = 0;
+ size_t liblistno = 0;
+ size_t conflictsno = 0;
+ size_t options_offset = 0;
+ size_t conflicts_offset = 0;
+
+ /* We have a lot of special sections. Thanks SGI! */
+ if (dynamic_segment == NULL)
+ /* No information available. */
+ return 0;
+
+ for (entry = dynamic_segment; entry->d_tag != DT_NULL; ++entry)
+ switch (entry->d_tag)
+ {
+ case DT_MIPS_LIBLIST:
+ liblist_offset = entry->d_un.d_val - loadaddr;
+ break;
+ case DT_MIPS_LIBLISTNO:
+ liblistno = entry->d_un.d_val;
+ break;
+ case DT_MIPS_OPTIONS:
+ options_offset = entry->d_un.d_val - loadaddr;
+ break;
+ case DT_MIPS_CONFLICT:
+ conflicts_offset = entry->d_un.d_val - loadaddr;
+ break;
+ case DT_MIPS_CONFLICTNO:
+ conflictsno = entry->d_un.d_val;
+ break;
+ default:
+ break;
+ }
+
+ if (liblist_offset != 0 && liblistno != 0 && do_dynamic)
+ {
+ Elf32_External_Lib * elib;
+ size_t cnt;
+
+ GET_DATA_ALLOC (liblist_offset, liblistno * sizeof (Elf32_External_Lib),
+ elib, Elf32_External_Lib *, "liblist");
+
+ printf ("\nSection '.liblist' contains %lu entries:\n",
+ (unsigned long) liblistno);
+ fputs (" Library Time Stamp Checksum Version Flags\n",
+ stdout);
+
+ for (cnt = 0; cnt < liblistno; ++cnt)
+ {
+ Elf32_Lib liblist;
+ time_t time;
+ char timebuf[20];
+ struct tm * tmp;
+
+ liblist.l_name = BYTE_GET (elib[cnt].l_name);
+ time = BYTE_GET (elib[cnt].l_time_stamp);
+ liblist.l_checksum = BYTE_GET (elib[cnt].l_checksum);
+ liblist.l_version = BYTE_GET (elib[cnt].l_version);
+ liblist.l_flags = BYTE_GET (elib[cnt].l_flags);
+
+ tmp = gmtime (&time);
+ sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u",
+ tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
+ tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+
+ printf ("%3lu: %-20s %s %#10lx %-7ld", (unsigned long) cnt,
+ dynamic_strings + liblist.l_name, timebuf,
+ liblist.l_checksum, liblist.l_version);
+
+ if (liblist.l_flags == 0)
+ puts (" NONE");
+ else
+ {
+ static const struct
+ {
+ const char * name;
+ int bit;
+ }
+ l_flags_vals[] =
+ {
+ { " EXACT_MATCH", LL_EXACT_MATCH },
+ { " IGNORE_INT_VER", LL_IGNORE_INT_VER },
+ { " REQUIRE_MINOR", LL_REQUIRE_MINOR },
+ { " EXPORTS", LL_EXPORTS },
+ { " DELAY_LOAD", LL_DELAY_LOAD },
+ { " DELTA", LL_DELTA }
+ };
+ int flags = liblist.l_flags;
+ size_t fcnt;
+
+ for (fcnt = 0;
+ fcnt < sizeof (l_flags_vals) / sizeof (l_flags_vals[0]);
+ ++fcnt)
+ if ((flags & l_flags_vals[fcnt].bit) != 0)
+ {
+ fputs (l_flags_vals[fcnt].name, stdout);
+ flags ^= l_flags_vals[fcnt].bit;
+ }
+ if (flags != 0)
+ printf (" %#x", (unsigned int) flags);
+
+ puts ("");
+ }
+ }
+
+ free (elib);
+ }
+
+ if (options_offset != 0)
+ {
+ Elf_External_Options * eopt;
+ Elf_Internal_Shdr * sect = section_headers;
+ Elf_Internal_Options * iopt;
+ Elf_Internal_Options * option;
+ size_t offset;
+ int cnt;
+
+ /* Find the section header so that we get the size. */
+ while (sect->sh_type != SHT_MIPS_OPTIONS)
+ ++ sect;
+
+ GET_DATA_ALLOC (options_offset, sect->sh_size, eopt,
+ Elf_External_Options *, "options");
+
+ iopt = (Elf_Internal_Options *) malloc ((sect->sh_size / sizeof (eopt))
+ * sizeof (*iopt));
+ if (iopt == NULL)
+ {
+ error (_("Out of memory"));
+ return 0;
+ }
+
+ offset = cnt = 0;
+ option = iopt;
+
+ while (offset < sect->sh_size)
+ {
+ Elf_External_Options * eoption;
+
+ eoption = (Elf_External_Options *) ((char *) eopt + offset);
+
+ option->kind = BYTE_GET (eoption->kind);
+ option->size = BYTE_GET (eoption->size);
+ option->section = BYTE_GET (eoption->section);
+ option->info = BYTE_GET (eoption->info);
+
+ offset += option->size;
+
+ ++option;
+ ++cnt;
+ }
+
+ printf (_("\nSection '%s' contains %d entries:\n"),
+ string_table + sect->sh_name, cnt);
+
+ option = iopt;
+
+ while (cnt-- > 0)
+ {
+ size_t len;
+
+ switch (option->kind)
+ {
+ case ODK_NULL:
+ /* This shouldn't happen. */
+ printf (" NULL %d %lx", option->section, option->info);
+ break;
+ case ODK_REGINFO:
+ printf (" REGINFO ");
+ if (elf_header.e_machine == EM_MIPS)
+ {
+ /* 32bit form. */
+ Elf32_External_RegInfo *ereg;
+ Elf32_RegInfo reginfo;
+
+ ereg = (Elf32_External_RegInfo *) (option + 1);
+ reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);
+ reginfo.ri_cprmask[0] = BYTE_GET (ereg->ri_cprmask[0]);
+ reginfo.ri_cprmask[1] = BYTE_GET (ereg->ri_cprmask[1]);
+ reginfo.ri_cprmask[2] = BYTE_GET (ereg->ri_cprmask[2]);
+ reginfo.ri_cprmask[3] = BYTE_GET (ereg->ri_cprmask[3]);
+ reginfo.ri_gp_value = BYTE_GET (ereg->ri_gp_value);
+
+ printf ("GPR %08lx GP 0x%lx\n",
+ reginfo.ri_gprmask,
+ (unsigned long) reginfo.ri_gp_value);
+ printf (" CPR0 %08lx CPR1 %08lx CPR2 %08lx CPR3 %08lx\n",
+ reginfo.ri_cprmask[0], reginfo.ri_cprmask[1],
+ reginfo.ri_cprmask[2], reginfo.ri_cprmask[3]);
+ }
+ else
+ {
+ /* 64 bit form. */
+ Elf64_External_RegInfo * ereg;
+ Elf64_Internal_RegInfo reginfo;
+
+ ereg = (Elf64_External_RegInfo *) (option + 1);
+ reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);
+ reginfo.ri_cprmask[0] = BYTE_GET (ereg->ri_cprmask[0]);
+ reginfo.ri_cprmask[1] = BYTE_GET (ereg->ri_cprmask[1]);
+ reginfo.ri_cprmask[2] = BYTE_GET (ereg->ri_cprmask[2]);
+ reginfo.ri_cprmask[3] = BYTE_GET (ereg->ri_cprmask[3]);
+ reginfo.ri_gp_value = BYTE_GET8 (ereg->ri_gp_value);
+
+ printf ("GPR %08lx GP 0x",
+ reginfo.ri_gprmask);
+ printf_vma (reginfo.ri_gp_value);
+ printf ("\n");
+
+ printf (" CPR0 %08lx CPR1 %08lx CPR2 %08lx CPR3 %08lx\n",
+ reginfo.ri_cprmask[0], reginfo.ri_cprmask[1],
+ reginfo.ri_cprmask[2], reginfo.ri_cprmask[3]);
+ }
+ ++option;
+ continue;
+ case ODK_EXCEPTIONS:
+ fputs (" EXCEPTIONS fpe_min(", stdout);
+ process_mips_fpe_exception (option->info & OEX_FPU_MIN);
+ fputs (") fpe_max(", stdout);
+ process_mips_fpe_exception ((option->info & OEX_FPU_MAX) >> 8);
+ fputs (")", stdout);
+
+ if (option->info & OEX_PAGE0)
+ fputs (" PAGE0", stdout);
+ if (option->info & OEX_SMM)
+ fputs (" SMM", stdout);
+ if (option->info & OEX_FPDBUG)
+ fputs (" FPDBUG", stdout);
+ if (option->info & OEX_DISMISS)
+ fputs (" DISMISS", stdout);
+ break;
+ case ODK_PAD:
+ fputs (" PAD ", stdout);
+ if (option->info & OPAD_PREFIX)
+ fputs (" PREFIX", stdout);
+ if (option->info & OPAD_POSTFIX)
+ fputs (" POSTFIX", stdout);
+ if (option->info & OPAD_SYMBOL)
+ fputs (" SYMBOL", stdout);
+ break;
+ case ODK_HWPATCH:
+ fputs (" HWPATCH ", stdout);
+ if (option->info & OHW_R4KEOP)
+ fputs (" R4KEOP", stdout);
+ if (option->info & OHW_R8KPFETCH)
+ fputs (" R8KPFETCH", stdout);
+ if (option->info & OHW_R5KEOP)
+ fputs (" R5KEOP", stdout);
+ if (option->info & OHW_R5KCVTL)
+ fputs (" R5KCVTL", stdout);
+ break;
+ case ODK_FILL:
+ fputs (" FILL ", stdout);
+ /* XXX Print content of info word? */
+ break;
+ case ODK_TAGS:
+ fputs (" TAGS ", stdout);
+ /* XXX Print content of info word? */
+ break;
+ case ODK_HWAND:
+ fputs (" HWAND ", stdout);
+ if (option->info & OHWA0_R4KEOP_CHECKED)
+ fputs (" R4KEOP_CHECKED", stdout);
+ if (option->info & OHWA0_R4KEOP_CLEAN)
+ fputs (" R4KEOP_CLEAN", stdout);
+ break;
+ case ODK_HWOR:
+ fputs (" HWOR ", stdout);
+ if (option->info & OHWA0_R4KEOP_CHECKED)
+ fputs (" R4KEOP_CHECKED", stdout);
+ if (option->info & OHWA0_R4KEOP_CLEAN)
+ fputs (" R4KEOP_CLEAN", stdout);
+ break;
+ case ODK_GP_GROUP:
+ printf (" GP_GROUP %#06lx self-contained %#06lx",
+ option->info & OGP_GROUP,
+ (option->info & OGP_SELF) >> 16);
+ break;
+ case ODK_IDENT:
+ printf (" IDENT %#06lx self-contained %#06lx",
+ option->info & OGP_GROUP,
+ (option->info & OGP_SELF) >> 16);
+ break;
+ default:
+ /* This shouldn't happen. */
+ printf (" %3d ??? %d %lx",
+ option->kind, option->section, option->info);
+ break;
+ }
+
+ len = sizeof (*eopt);
+ while (len < option->size)
+ if (((char *) option)[len] >= ' '
+ && ((char *) option)[len] < 0x7f)
+ printf ("%c", ((char *) option)[len++]);
+ else
+ printf ("\\%03o", ((char *) option)[len++]);
+
+ fputs ("\n", stdout);
+ ++option;
+ }
+
+ free (eopt);
+ }
+
+ if (conflicts_offset != 0 && conflictsno != 0)
+ {
+ Elf32_External_Conflict * econf32;
+ Elf64_External_Conflict * econf64;
+ Elf32_Conflict * iconf;
+ size_t cnt;
+
+ if (dynamic_symbols == NULL)
+ {
+ error (_("conflict list with without table"));
+ return 0;
+ }
+
+ iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (*iconf));
+ if (iconf == NULL)
+ {
+ error (_("Out of memory"));
+ return 0;
+ }
+
+ if (is_32bit_elf)
+ {
+ GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf32),
+ econf32, Elf32_External_Conflict *, "conflict");
+
+ for (cnt = 0; cnt < conflictsno; ++cnt)
+ iconf[cnt] = BYTE_GET (econf32[cnt]);
+ }
+ else
+ {
+ GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf64),
+ econf64, Elf64_External_Conflict *, "conflict");
+
+ for (cnt = 0; cnt < conflictsno; ++cnt)
+ iconf[cnt] = BYTE_GET (econf64[cnt]);
+ }
+
+ printf (_("\nSection '.conflict' contains %d entries:\n"), conflictsno);
+ puts (_(" Num: Index Value Name"));
+
+ for (cnt = 0; cnt < conflictsno; ++cnt)
+ {
+ Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];
+
+ printf ("%5lu: %8lu ", (unsigned long) cnt, iconf[cnt]);
+ print_vma (psym->st_value, FULL_HEX);
+ printf (" %s\n", dynamic_strings + psym->st_name);
+ }
+
+ free (iconf);
+ }
+
+ return 1;
+}
+
+static char *
+get_note_type (e_type)
+ unsigned e_type;
+{
+ static char buff[64];
+
+ switch (e_type)
+ {
+ case NT_PRSTATUS: return _("NT_PRSTATUS (prstatus structure)");
+ case NT_FPREGSET: return _("NT_FPREGSET (floating point registers)");
+ case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)");
+ case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)");
+ case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)");
+ case NT_PSTATUS: return _("NT_PSTATUS (pstatus structure)");
+ case NT_FPREGS: return _("NT_FPREGS (floating point registers)");
+ case NT_PSINFO: return _("NT_PSINFO (psinfo structure)");
+ case NT_LWPSTATUS: return _("NT_LWPSTATUS (lwpstatus_t structure)");
+ case NT_LWPSINFO: return _("NT_LWPSINFO (lwpsinfo_t structure)");
+ case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus strcuture)");
+ default:
+ sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
+ return buff;
+ }
+}
+
+/* Note that by the ELF standard, the name field is already null byte
+ terminated, and namesz includes the terminating null byte.
+ I.E. the value of namesz for the name "FSF" is 4.
+
+ If the value of namesz is zero, there is no name present. */
+static int
+process_note (pnote)
+ Elf32_Internal_Note * pnote;
+{
+ printf (" %s\t\t0x%08lx\t%s\n",
+ pnote->namesz ? pnote->namedata : "(NONE)",
+ pnote->descsz, get_note_type (pnote->type));
+ return 1;
+}
+
+
+static int
+process_corefile_note_segment (file, offset, length)
+ FILE * file;
+ bfd_vma offset;
+ bfd_vma length;
+{
+ Elf_External_Note * pnotes;
+ Elf_External_Note * external;
+ int res = 1;
+
+ if (length <= 0)
+ return 0;
+
+ GET_DATA_ALLOC (offset, length, pnotes, Elf_External_Note *, "notes");
+
+ external = pnotes;
+
+ printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"),
+ (unsigned long) offset,
+ (unsigned long) length);
+ printf (_(" Owner\t\tData size\tDescription\n"));
+
+ while (external < (Elf_External_Note *)((char *) pnotes + length))
+ {
+ Elf32_Internal_Note inote;
+ char * temp = NULL;
+
+ inote.type = BYTE_GET (external->type);
+ inote.namesz = BYTE_GET (external->namesz);
+ inote.namedata = external->name;
+ 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
+ one version of Linux (RedHat 6.0) generates corefiles that don't
+ comply with the ELF spec by failing to include the null byte in
+ namesz. */
+ 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;
+ }
+
+ res &= process_note (& inote);
+
+ if (temp != NULL)
+ {
+ free (temp);
+ temp = NULL;
+ }
+ }
+
+ free (pnotes);
+
+ return res;
+}
+
+static int
+process_corefile_note_segments (file)
+ FILE * file;
+{
+ Elf_Internal_Phdr * program_headers;
+ Elf_Internal_Phdr * segment;
+ unsigned int i;
+ int res = 1;
+
+ program_headers = (Elf_Internal_Phdr *) malloc
+ (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
+
+ if (program_headers == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ if (is_32bit_elf)
+ i = get_32bit_program_headers (file, program_headers);
+ else
+ i = get_64bit_program_headers (file, program_headers);
+
+ if (i == 0)
+ {
+ free (program_headers);
+ return 0;
+ }
+
+ for (i = 0, segment = program_headers;
+ i < elf_header.e_phnum;
+ i ++, segment ++)
+ {
+ if (segment->p_type == PT_NOTE)
+ res &= process_corefile_note_segment (file,
+ (bfd_vma) segment->p_offset,
+ (bfd_vma) segment->p_filesz);
+ }
+
+ free (program_headers);
+
+ return res;
+}
+
+static int
+process_corefile_contents (file)
+ FILE * file;
+{
+ /* If we have not been asked to display the notes then do nothing. */
+ if (! do_notes)
+ return 1;
+
+ /* If file is not a core file then exit. */
+ if (elf_header.e_type != ET_CORE)
+ return 1;
+
+ /* No program headers means no NOTE segment. */
+ if (elf_header.e_phnum == 0)
+ {
+ printf (_("No note segments present in the core file.\n"));
+ return 1;
+ }
+
+ return process_corefile_note_segments (file);
+}
+
+static int
+process_arch_specific (file)
+ FILE * file;
+{
+ if (! do_arch)
+ return 1;
+
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ return process_mips_specific (file);
+ break;
+ default:
+ break;
+ }
+ return 1;
+}
+
+static int
+get_file_header (file)
+ FILE * file;
+{
+ /* Read in the identity array. */
+ if (fread (elf_header.e_ident, EI_NIDENT, 1, file) != 1)
+ return 0;
+
+ /* Determine how to read the rest of the header. */
+ switch (elf_header.e_ident [EI_DATA])
+ {
+ default: /* fall through */
+ case ELFDATANONE: /* fall through */
+ case ELFDATA2LSB: byte_get = byte_get_little_endian; break;
+ case ELFDATA2MSB: byte_get = byte_get_big_endian; break;
+ }
+
+ /* For now we only support 32 bit and 64 bit ELF files. */
+ is_32bit_elf = (elf_header.e_ident [EI_CLASS] != ELFCLASS64);
+
+ /* Read in the rest of the header. */
+ if (is_32bit_elf)
+ {
+ Elf32_External_Ehdr ehdr32;
+
+ if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT, 1, file) != 1)
+ return 0;
+
+ elf_header.e_type = BYTE_GET (ehdr32.e_type);
+ elf_header.e_machine = BYTE_GET (ehdr32.e_machine);
+ elf_header.e_version = BYTE_GET (ehdr32.e_version);
+ elf_header.e_entry = BYTE_GET (ehdr32.e_entry);
+ elf_header.e_phoff = BYTE_GET (ehdr32.e_phoff);
+ elf_header.e_shoff = BYTE_GET (ehdr32.e_shoff);
+ elf_header.e_flags = BYTE_GET (ehdr32.e_flags);
+ elf_header.e_ehsize = BYTE_GET (ehdr32.e_ehsize);
+ elf_header.e_phentsize = BYTE_GET (ehdr32.e_phentsize);
+ elf_header.e_phnum = BYTE_GET (ehdr32.e_phnum);
+ elf_header.e_shentsize = BYTE_GET (ehdr32.e_shentsize);
+ elf_header.e_shnum = BYTE_GET (ehdr32.e_shnum);
+ elf_header.e_shstrndx = BYTE_GET (ehdr32.e_shstrndx);
+ }
+ else
+ {
+ Elf64_External_Ehdr ehdr64;
+
+ /* If we have been compiled with sizeof (bfd_vma) == 4, then
+ we will not be able to cope with the 64bit data found in
+ 64 ELF files. Detect this now and abort before we start
+ overwritting things. */
+ if (sizeof (bfd_vma) < 8)
+ {
+ error (_("This instance of readelf has been built without support for a\n"));
+ error (_("64 bit data type and so it cannot read 64 bit ELF files.\n"));
+ return 0;
+ }
+
+ if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT, 1, file) != 1)
+ return 0;
+
+ elf_header.e_type = BYTE_GET (ehdr64.e_type);
+ elf_header.e_machine = BYTE_GET (ehdr64.e_machine);
+ elf_header.e_version = BYTE_GET (ehdr64.e_version);
+ elf_header.e_entry = BYTE_GET8 (ehdr64.e_entry);
+ elf_header.e_phoff = BYTE_GET8 (ehdr64.e_phoff);
+ elf_header.e_shoff = BYTE_GET8 (ehdr64.e_shoff);
+ elf_header.e_flags = BYTE_GET (ehdr64.e_flags);
+ elf_header.e_ehsize = BYTE_GET (ehdr64.e_ehsize);
+ elf_header.e_phentsize = BYTE_GET (ehdr64.e_phentsize);
+ elf_header.e_phnum = BYTE_GET (ehdr64.e_phnum);
+ elf_header.e_shentsize = BYTE_GET (ehdr64.e_shentsize);
+ elf_header.e_shnum = BYTE_GET (ehdr64.e_shnum);
+ elf_header.e_shstrndx = BYTE_GET (ehdr64.e_shstrndx);
+ }
+
+ return 1;
+}
+
+static void
+process_file (file_name)
+ char * file_name;
+{
+ FILE * file;
+ struct stat statbuf;
+ unsigned int i;
+
+ if (stat (file_name, & statbuf) < 0)
+ {
+ error (_("Cannot stat input file %s.\n"), file_name);
+ return;
+ }
+
+ file = fopen (file_name, "rb");
+ if (file == NULL)
+ {
+ error (_("Input file %s not found.\n"), file_name);
+ return;
+ }
+
+ if (! get_file_header (file))
+ {
+ error (_("%s: Failed to read file header\n"), file_name);
+ fclose (file);
+ return;
+ }
+
+ /* Initialise per file variables. */
+ for (i = NUM_ELEM (version_info); i--;)
+ version_info[i] = 0;
+
+ for (i = NUM_ELEM (dynamic_info); i--;)
+ dynamic_info[i] = 0;
+
+ /* Process the file. */
+ if (show_name)
+ printf (_("\nFile: %s\n"), file_name);
+
+ if (! process_file_header ())
+ {
+ fclose (file);
+ return;
+ }
+
+ process_section_headers (file);
+
+ process_program_headers (file);
+
+ process_dynamic_segment (file);
+
+ process_relocs (file);
+
+ process_symbol_table (file);
+
+ process_syminfo (file);
+
+ process_version_sections (file);
+
+ process_section_contents (file);
+
+ process_corefile_contents (file);
+
+ process_arch_specific (file);
+
+ fclose (file);
+
+ if (section_headers)
+ {
+ free (section_headers);
+ section_headers = NULL;
+ }
+
+ if (string_table)
+ {
+ free (string_table);
+ string_table = NULL;
+ }
+
+ if (dynamic_strings)
+ {
+ free (dynamic_strings);
+ dynamic_strings = NULL;
+ }
+
+ if (dynamic_symbols)
+ {
+ free (dynamic_symbols);
+ dynamic_symbols = NULL;
+ num_dynamic_syms = 0;
+ }
+
+ if (dynamic_syminfo)
+ {
+ free (dynamic_syminfo);
+ dynamic_syminfo = NULL;
+ }
+}
+
+#ifdef SUPPORT_DISASSEMBLY
+/* Needed by the i386 disassembler. For extra credit, someone could
+ fix this so that we insert symbolic addresses here, esp for GOT/PLT
+ symbols */
+
+void
+print_address (unsigned int addr, FILE * outfile)
+{
+ fprintf (outfile,"0x%8.8x", addr);
+}
+
+/* Needed by the i386 disassembler. */
+void
+db_task_printsym (unsigned int addr)
+{
+ print_address (addr, stderr);
+}
+#endif
+
+int
+main (argc, argv)
+ int argc;
+ char ** argv;
+{
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ parse_args (argc, argv);
+
+ if (optind < (argc - 1))
+ show_name = 1;
+
+ while (optind < argc)
+ process_file (argv [optind ++]);
+
+ if (dump_sects != NULL)
+ free (dump_sects);
+
+ return 0;
+}
diff --git a/contrib/binutils/binutils/rename.c b/contrib/binutils/binutils/rename.c
new file mode 100644
index 0000000..78ea9fd
--- /dev/null
+++ b/contrib/binutils/binutils/rename.c
@@ -0,0 +1,220 @@
+/* rename.c -- rename a file, preserving symlinks.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "bucomm.h"
+
+#include <sys/stat.h>
+
+#ifdef HAVE_GOOD_UTIME_H
+#include <utime.h>
+#else /* ! HAVE_GOOD_UTIME_H */
+#ifdef HAVE_UTIMES
+#include <sys/time.h>
+#endif /* HAVE_UTIMES */
+#endif /* ! HAVE_GOOD_UTIME_H */
+
+/* We need to open the file in binary modes on system where that makes
+ a difference. */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+static int simple_copy PARAMS ((const char *, const char *));
+
+/* The number of bytes to copy at once. */
+#define COPY_BUF 8192
+
+/* Copy file FROM to file TO, performing no translations.
+ Return 0 if ok, -1 if error. */
+
+static int
+simple_copy (from, to)
+ const char *from;
+ const char *to;
+{
+ int fromfd, tofd, nread;
+ int saved;
+ char buf[COPY_BUF];
+
+ fromfd = open (from, O_RDONLY | O_BINARY);
+ if (fromfd < 0)
+ return -1;
+#ifdef O_CREAT
+ tofd = open (to, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0777);
+#else
+ tofd = creat (to, 0777);
+#endif
+ if (tofd < 0)
+ {
+ saved = errno;
+ close (fromfd);
+ errno = saved;
+ return -1;
+ }
+ while ((nread = read (fromfd, buf, sizeof buf)) > 0)
+ {
+ if (write (tofd, buf, nread) != nread)
+ {
+ saved = errno;
+ close (fromfd);
+ close (tofd);
+ errno = saved;
+ return -1;
+ }
+ }
+ saved = errno;
+ close (fromfd);
+ close (tofd);
+ if (nread < 0)
+ {
+ errno = saved;
+ return -1;
+ }
+ return 0;
+}
+
+/* Set the times of the file DESTINATION to be the same as those in
+ STATBUF. */
+
+void
+set_times (destination, statbuf)
+ const char *destination;
+ const struct stat *statbuf;
+{
+ int result;
+
+ {
+#ifdef HAVE_GOOD_UTIME_H
+ struct utimbuf tb;
+
+ tb.actime = statbuf->st_atime;
+ tb.modtime = statbuf->st_mtime;
+ result = utime (destination, &tb);
+#else /* ! HAVE_GOOD_UTIME_H */
+#ifndef HAVE_UTIMES
+ long tb[2];
+
+ tb[0] = statbuf->st_atime;
+ tb[1] = statbuf->st_mtime;
+ result = utime (destination, tb);
+#else /* HAVE_UTIMES */
+ struct timeval tv[2];
+
+ tv[0].tv_sec = statbuf->st_atime;
+ tv[0].tv_usec = 0;
+ tv[1].tv_sec = statbuf->st_mtime;
+ tv[1].tv_usec = 0;
+ result = utimes (destination, tv);
+#endif /* HAVE_UTIMES */
+#endif /* ! HAVE_GOOD_UTIME_H */
+ }
+
+ if (result != 0)
+ non_fatal (_("%s: cannot set time: %s"), destination, strerror (errno));
+}
+
+#ifndef S_ISLNK
+#ifdef S_IFLNK
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#else
+#define S_ISLNK(m) 0
+#define lstat stat
+#endif
+#endif
+
+/* Rename FROM to TO, copying if TO is a link.
+ Return 0 if ok, -1 if error. */
+
+int
+smart_rename (from, to, preserve_dates)
+ const char *from;
+ const char *to;
+ int preserve_dates;
+{
+ boolean exists;
+ struct stat s;
+ int ret = 0;
+
+ exists = lstat (to, &s) == 0;
+
+#if defined (_WIN32) && !defined (__CYGWIN32__)
+ /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but
+ fail instead. Also, chown is not present. */
+
+ if (exists)
+ remove (to);
+
+ ret = rename (from, to);
+ if (ret != 0)
+ {
+ /* We have to clean up here. */
+
+ non_fatal (_("%s: rename: %s"), to, strerror (errno));
+ unlink (from);
+ }
+#else
+ /* Use rename only if TO is not a symbolic link and has
+ only one hard link. */
+ if (! exists || (!S_ISLNK (s.st_mode) && s.st_nlink == 1))
+ {
+ ret = rename (from, to);
+ if (ret == 0)
+ {
+ if (exists)
+ {
+ /* Try to preserve the permission bits and ownership of
+ TO. First get the mode right except for the setuid
+ bit. Then change the ownership. Then fix the setuid
+ bit. We do the chmod before the chown because if the
+ chown succeeds, and we are a normal user, we won't be
+ able to do the chmod afterward. We don't bother to
+ fix the setuid bit first because that might introduce
+ a fleeting security problem, and because the chown
+ will clear the setuid bit anyhow. We only fix the
+ setuid bit if the chown succeeds, because we don't
+ want to introduce an unexpected setuid file owned by
+ the user running objcopy. */
+ chmod (to, s.st_mode & 0777);
+ if (chown (to, s.st_uid, s.st_gid) >= 0)
+ chmod (to, s.st_mode & 07777);
+ }
+ }
+ else
+ {
+ /* We have to clean up here. */
+ non_fatal (_("%s: rename: %s"), to, strerror (errno));
+ unlink (from);
+ }
+ }
+ else
+ {
+ ret = simple_copy (from, to);
+ if (ret != 0)
+ non_fatal (_("%s: simple_copy: %s"), to, strerror (errno));
+
+ if (preserve_dates)
+ set_times (to, &s);
+ unlink (from);
+ }
+#endif /* _WIN32 && !__CYGWIN32__ */
+
+ return ret;
+}
diff --git a/contrib/binutils/binutils/resbin.c b/contrib/binutils/binutils/resbin.c
index 6f87a77..8fc07fb 100644
--- a/contrib/binutils/binutils/resbin.c
+++ b/contrib/binutils/binutils/resbin.c
@@ -1,5 +1,5 @@
/* resbin.c -- manipulate the Windows binary resource format.
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997, 1998 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -105,7 +105,7 @@ bin_to_res (type, data, length, big_endian)
return bin_to_res_fontdir (data, length, big_endian);
case RT_FONT:
return bin_to_res_generic (RES_TYPE_FONT, data, length);
- case RT_ACCELERATORS:
+ case RT_ACCELERATOR:
return bin_to_res_accelerators (data, length, big_endian);
case RT_RCDATA:
return bin_to_res_rcdata (data, length, big_endian);
@@ -127,7 +127,7 @@ static void
toosmall (msg)
const char *msg;
{
- fatal ("%s: not enough binary data", msg);
+ fatal (_("%s: not enough binary data"), msg);
}
/* Swap in a NULL terminated unicode string. */
@@ -145,8 +145,8 @@ get_unicode (data, length, big_endian, retlen)
c = 0;
while (1)
{
- if (length < c * 2 + 2)
- toosmall ("null terminated unicode string");
+ if (length < (unsigned long) c * 2 + 2)
+ toosmall (_("null terminated unicode string"));
if (get_16 (big_endian, data + c * 2) == 0)
break;
++c;
@@ -176,13 +176,13 @@ get_resid (id, data, length, big_endian)
int first;
if (length < 2)
- toosmall ("resource ID");
+ toosmall (_("resource ID"));
first = get_16 (big_endian, data);
if (first == 0xffff)
{
if (length < 4)
- toosmall ("resource ID");
+ toosmall (_("resource ID"));
id->named = 0;
id->u.id = get_16 (big_endian, data + 2);
return 4;
@@ -226,7 +226,7 @@ bin_to_res_cursor (data, length, big_endian)
struct res_resource *r;
if (length < 4)
- toosmall ("cursor");
+ toosmall (_("cursor"));
c = (struct cursor *) res_alloc (sizeof *c);
c->xhotspot = get_16 (big_endian, data);
@@ -260,35 +260,35 @@ bin_to_res_menu (data, length, big_endian)
r->u.menu = m;
if (length < 2)
- toosmall ("menu header");
+ toosmall (_("menu header"));
version = get_16 (big_endian, data);
if (version == 0)
{
if (length < 4)
- toosmall ("menu header");
+ toosmall (_("menu header"));
m->help = 0;
m->items = bin_to_res_menuitems (data + 4, length - 4, big_endian,
&read);
}
else if (version == 1)
{
- int offset;
+ unsigned int offset;
if (length < 8)
- toosmall ("menuex header");
+ toosmall (_("menuex header"));
m->help = get_32 (big_endian, data + 4);
offset = get_16 (big_endian, data + 2);
if (offset + 4 >= length)
- toosmall ("menuex offset");
+ toosmall (_("menuex offset"));
m->items = bin_to_res_menuexitems (data + 4 + offset,
length - (4 + offset),
big_endian,
&read);
}
else
- fatal ("unsupported menu version %d", version);
+ fatal (_("unsupported menu version %d"), version);
return r;
}
@@ -311,11 +311,12 @@ bin_to_res_menuitems (data, length, big_endian, read)
while (length > 0)
{
- int flags, stroff, slen, itemlen;
+ int flags, slen, itemlen;
+ unsigned int stroff;
struct menuitem *mi;
if (length < 4)
- toosmall ("menuitem header");
+ toosmall (_("menuitem header"));
mi = (struct menuitem *) res_alloc (sizeof *mi);
mi->state = 0;
@@ -330,7 +331,7 @@ bin_to_res_menuitems (data, length, big_endian, read)
stroff = 2;
if (length < stroff + 2)
- toosmall ("menuitem header");
+ toosmall (_("menuitem header"));
if (get_16 (big_endian, data + stroff) == 0)
{
@@ -391,11 +392,12 @@ bin_to_res_menuexitems (data, length, big_endian, read)
while (length > 0)
{
- int flags, slen, itemlen;
+ int flags, slen;
+ unsigned int itemlen;
struct menuitem *mi;
if (length < 14)
- toosmall ("menuitem header");
+ toosmall (_("menuitem header"));
mi = (struct menuitem *) res_alloc (sizeof *mi);
mi->type = get_32 (big_endian, data);
@@ -425,7 +427,7 @@ bin_to_res_menuexitems (data, length, big_endian, read)
int subread;
if (length < itemlen + 4)
- toosmall ("menuitem");
+ toosmall (_("menuitem"));
mi->help = get_32 (big_endian, data + itemlen);
itemlen += 4;
@@ -460,17 +462,18 @@ bin_to_res_dialog (data, length, big_endian)
{
int version;
struct dialog *d;
- int c, sublen, off, i;
+ int c, sublen, i;
+ unsigned int off;
struct dialog_control **pp;
struct res_resource *r;
if (length < 18)
- toosmall ("dialog header");
+ toosmall (_("dialog header"));
d = (struct dialog *) res_alloc (sizeof *d);
version = get_16 (big_endian, data);
- if (version != 0xffff)
+ if (version != 1)
{
d->ex = NULL;
d->style = get_32 (big_endian, data);
@@ -482,8 +485,8 @@ bin_to_res_dialog (data, length, big_endian)
int signature;
signature = get_16 (big_endian, data + 2);
- if (signature != 1)
- fatal ("unexpected dialog signature %d", signature);
+ if (signature != 0xffff)
+ fatal (_("unexpected dialog signature %d"), signature);
d->ex = (struct dialog_ex *) res_alloc (sizeof (struct dialog_ex));
d->ex->help = get_32 (big_endian, data + 4);
@@ -493,7 +496,7 @@ bin_to_res_dialog (data, length, big_endian)
}
if (length < off + 10)
- toosmall ("dialog header");
+ toosmall (_("dialog header"));
c = get_16 (big_endian, data + off);
d->x = get_16 (big_endian, data + off + 2);
@@ -525,7 +528,7 @@ bin_to_res_dialog (data, length, big_endian)
else
{
if (length < off + 2)
- toosmall ("dialog font point size");
+ toosmall (_("dialog font point size"));
d->pointsize = get_16 (big_endian, data + off);
off += 2;
@@ -533,7 +536,7 @@ bin_to_res_dialog (data, length, big_endian)
if (d->ex != NULL)
{
if (length < off + 4)
- toosmall ("dialogex font information");
+ toosmall (_("dialogex font information"));
d->ex->weight = get_16 (big_endian, data + off);
d->ex->italic = get_16 (big_endian, data + off + 2);
off += 4;
@@ -558,7 +561,7 @@ bin_to_res_dialog (data, length, big_endian)
if (d->ex == NULL)
{
if (length < off + 8)
- toosmall ("dialog control");
+ toosmall (_("dialog control"));
dc->style = get_32 (big_endian, data + off);
dc->exstyle = get_32 (big_endian, data + off + 4);
@@ -568,23 +571,27 @@ bin_to_res_dialog (data, length, big_endian)
else
{
if (length < off + 12)
- toosmall ("dialogex control");
+ toosmall (_("dialogex control"));
dc->help = get_32 (big_endian, data + off);
dc->exstyle = get_32 (big_endian, data + off + 4);
- dc->style = get_32 (big_endian, data + off + 18);
+ dc->style = get_32 (big_endian, data + off + 8);
off += 12;
}
if (length < off + 10)
- toosmall ("dialog control");
+ toosmall (_("dialog control"));
dc->x = get_16 (big_endian, data + off);
dc->y = get_16 (big_endian, data + off + 2);
dc->width = get_16 (big_endian, data + off + 4);
dc->height = get_16 (big_endian, data + off + 6);
- dc->id = get_16 (big_endian, data + off + 8);
- off += 10;
+ if (d->ex != NULL)
+ dc->id = get_32 (big_endian, data + off + 8);
+ else
+ dc->id = get_16 (big_endian, data + off + 8);
+
+ off += 10 + (d->ex != NULL ? 2 : 0);
sublen = get_resid (&dc->class, data + off, length - off, big_endian);
off += sublen;
@@ -593,7 +600,7 @@ bin_to_res_dialog (data, length, big_endian)
off += sublen;
if (length < off + 2)
- toosmall ("dialog control end");
+ toosmall (_("dialog control end"));
datalen = get_16 (big_endian, data + off);
off += 2;
@@ -605,7 +612,7 @@ bin_to_res_dialog (data, length, big_endian)
off = (off + 3) &~ 3;
if (length < off + datalen)
- toosmall ("dialog control data");
+ toosmall (_("dialog control data"));
dc->data = ((struct rcdata_item *)
res_alloc (sizeof (struct rcdata_item)));
@@ -645,20 +652,20 @@ bin_to_res_string (data, length, big_endian)
for (i = 0; i < 16; i++)
{
- int slen;
+ unsigned int slen;
if (length < 2)
- toosmall ("stringtable string length");
+ toosmall (_("stringtable string length"));
slen = get_16 (big_endian, data);
st->strings[i].length = slen;
if (slen > 0)
{
unichar *s;
- int j;
+ unsigned int j;
if (length < 2 + 2 * slen)
- toosmall ("stringtable string");
+ toosmall (_("stringtable string"));
s = (unichar *) res_alloc (slen * sizeof (unichar));
st->strings[i].string = s;
@@ -691,7 +698,7 @@ bin_to_res_fontdir (data, length, big_endian)
struct res_resource *r;
if (length < 2)
- toosmall ("fontdir header");
+ toosmall (_("fontdir header"));
c = get_16 (big_endian, data);
@@ -701,10 +708,10 @@ bin_to_res_fontdir (data, length, big_endian)
for (i = 0; i < c; i++)
{
struct fontdir *fd;
- int off;
+ unsigned int off;
if (length < 56)
- toosmall ("fontdir");
+ toosmall (_("fontdir"));
fd = (struct fontdir *) res_alloc (sizeof *fd);
fd->index = get_16 (big_endian, data);
@@ -720,13 +727,13 @@ bin_to_res_fontdir (data, length, big_endian)
while (off < length && data[off] != '\0')
++off;
if (off >= length)
- toosmall ("fontdir device name");
+ toosmall (_("fontdir device name"));
++off;
while (off < length && data[off] != '\0')
++off;
if (off >= length)
- toosmall ("fontdir face name");
+ toosmall (_("fontdir face name"));
++off;
fd->length = off;
@@ -769,7 +776,7 @@ bin_to_res_accelerators (data, length, big_endian)
struct accelerator *a;
if (length < 8)
- toosmall ("accelerator");
+ toosmall (_("accelerator"));
a = (struct accelerator *) res_alloc (sizeof *a);
@@ -833,11 +840,11 @@ bin_to_res_group_cursor (data, length, big_endian)
struct res_resource *r;
if (length < 6)
- toosmall ("group cursor header");
+ toosmall (_("group cursor header"));
type = get_16 (big_endian, data + 2);
if (type != 2)
- fatal ("unexpected group cursor type %d", type);
+ fatal (_("unexpected group cursor type %d"), type);
c = get_16 (big_endian, data + 4);
@@ -852,7 +859,7 @@ bin_to_res_group_cursor (data, length, big_endian)
struct group_cursor *gc;
if (length < 14)
- toosmall ("group cursor");
+ toosmall (_("group cursor"));
gc = (struct group_cursor *) res_alloc (sizeof *gc);
@@ -891,11 +898,11 @@ bin_to_res_group_icon (data, length, big_endian)
struct res_resource *r;
if (length < 6)
- toosmall ("group icon header");
+ toosmall (_("group icon header"));
type = get_16 (big_endian, data + 2);
if (type != 1)
- fatal ("unexpected group icon type %d", type);
+ fatal (_("unexpected group icon type %d"), type);
c = get_16 (big_endian, data + 4);
@@ -910,7 +917,7 @@ bin_to_res_group_icon (data, length, big_endian)
struct group_icon *gi;
if (length < 14)
- toosmall ("group icon");
+ toosmall (_("group icon"));
gi = (struct group_icon *) res_alloc (sizeof *gi);
@@ -980,8 +987,8 @@ get_version_header (data, length, big_endian, key, pkey, len, vallen, type,
{
if (length < 2)
toosmall (key);
- if (get_16 (big_endian, data) != *key)
- fatal ("unexpected version string");
+ if (get_16 (big_endian, data) != (unsigned char) *key)
+ fatal (_("unexpected version string"));
*off += 2;
length -= 2;
@@ -1014,12 +1021,12 @@ bin_to_res_version (data, length, big_endian)
get_version_header (data, length, big_endian, "VS_VERSION_INFO",
(unichar *) NULL, &verlen, &vallen, &type, &off);
- if (verlen != length)
- fatal ("version length %d does not match resource length %lu",
+ if ((unsigned int) verlen != length)
+ fatal (_("version length %d does not match resource length %lu"),
verlen, length);
if (type != 0)
- fatal ("unexpected version type %d", type);
+ fatal (_("unexpected version type %d"), type);
data += off;
length -= off;
@@ -1031,18 +1038,18 @@ bin_to_res_version (data, length, big_endian)
unsigned long signature, fiv;
if (vallen != 52)
- fatal ("unexpected fixed version information length %d", vallen);
+ fatal (_("unexpected fixed version information length %d"), vallen);
if (length < 52)
- toosmall ("fixed version info");
+ toosmall (_("fixed version info"));
signature = get_32 (big_endian, data);
if (signature != 0xfeef04bd)
- fatal ("unexpected fixed version signature %lu", signature);
+ fatal (_("unexpected fixed version signature %lu"), signature);
fiv = get_32 (big_endian, data + 4);
if (fiv != 0 && fiv != 0x10000)
- fatal ("unexpected fixed version info version %lu", fiv);
+ fatal (_("unexpected fixed version info version %lu"), fiv);
fi = (struct fixed_versioninfo *) res_alloc (sizeof *fi);
@@ -1071,7 +1078,7 @@ bin_to_res_version (data, length, big_endian)
int ch;
if (length < 8)
- toosmall ("version var info");
+ toosmall (_("version var info"));
vi = (struct ver_info *) res_alloc (sizeof *vi);
@@ -1088,7 +1095,7 @@ bin_to_res_version (data, length, big_endian)
&off);
if (vallen != 0)
- fatal ("unexpected stringfileinfo value length %d", vallen);
+ fatal (_("unexpected stringfileinfo value length %d"), vallen);
data += off;
length -= off;
@@ -1098,7 +1105,7 @@ bin_to_res_version (data, length, big_endian)
&type, &off);
if (vallen != 0)
- fatal ("unexpected version stringtable value length %d", vallen);
+ fatal (_("unexpected version stringtable value length %d"), vallen);
data += off;
length -= off;
@@ -1132,7 +1139,7 @@ bin_to_res_version (data, length, big_endian)
valoff = (valoff + 3) &~ 3;
if (off + valoff != subverlen)
- fatal ("unexpected version string length %d != %d + %d",
+ fatal (_("unexpected version string length %d != %d + %d"),
subverlen, off, valoff);
vs->next = NULL;
@@ -1143,7 +1150,7 @@ bin_to_res_version (data, length, big_endian)
length -= valoff;
if (verlen < subverlen)
- fatal ("unexpected version string length %d < %d",
+ fatal (_("unexpected version string length %d < %d"),
verlen, subverlen);
verlen -= subverlen;
@@ -1160,7 +1167,7 @@ bin_to_res_version (data, length, big_endian)
&off);
if (vallen != 0)
- fatal ("unexpected varfileinfo value length %d", vallen);
+ fatal (_("unexpected varfileinfo value length %d"), vallen);
data += off;
length -= off;
@@ -1179,7 +1186,7 @@ bin_to_res_version (data, length, big_endian)
struct ver_varinfo *vv;
if (length < 4)
- toosmall ("version varfileinfo");
+ toosmall (_("version varfileinfo"));
vv = (struct ver_varinfo *) res_alloc (sizeof *vv);
@@ -1194,13 +1201,13 @@ bin_to_res_version (data, length, big_endian)
length -= 4;
if (vallen < 4)
- fatal ("unexpected version value length %d", vallen);
+ fatal (_("unexpected version value length %d"), vallen);
vallen -= 4;
}
}
else
- fatal ("unexpected version string");
+ fatal (_("unexpected version string"));
vi->next = NULL;
*pp = vi;
@@ -1566,8 +1573,9 @@ res_to_bin_dialog (dialog, big_endian)
}
else
{
- put_16 (big_endian, 0xffff, first->data);
- put_16 (big_endian, 1, first->data + 2);
+ put_16 (big_endian, 1, first->data);
+ put_16 (big_endian, 0xffff, first->data + 2);
+
if (dialog->ex == NULL)
put_32 (big_endian, 0, first->data + 4);
else
@@ -1641,7 +1649,7 @@ res_to_bin_dialog (dialog, big_endian)
dword_align_bin (&pp, &length);
d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = dialogex ? 22 : 18;
+ d->length = dialogex ? 24 : 18;
d->data = (unsigned char *) reswr_alloc (d->length);
length += d->length;
@@ -1664,7 +1672,11 @@ res_to_bin_dialog (dialog, big_endian)
put_16 (big_endian, dc->y, d->data + dcoff + 2);
put_16 (big_endian, dc->width, d->data + dcoff + 4);
put_16 (big_endian, dc->height, d->data + dcoff + 6);
- put_16 (big_endian, dc->id, d->data + dcoff + 8);
+
+ if (dialogex)
+ put_32 (big_endian, dc->id, d->data + dcoff + 8);
+ else
+ put_16 (big_endian, dc->id, d->data + dcoff + 8);
*pp = d;
pp = &d->next;
@@ -1708,7 +1720,6 @@ res_to_bin_dialog (dialog, big_endian)
length += sublen;
}
}
-
put_16 (big_endian, c, first->data + off);
return first;
@@ -2246,7 +2257,6 @@ res_to_bin_versioninfo (versioninfo, big_endian)
vslen += 6;
vsslen = 6;
- put_16 (big_endian, 0, vssd->data + 2);
put_16 (big_endian, 1, vssd->data + 4);
*pp = vssd;
@@ -2266,6 +2276,7 @@ res_to_bin_versioninfo (versioninfo, big_endian)
vsslen += length - hold;
*pp = unicode_to_bin (vs->value, big_endian);
+ put_16 (big_endian, (*pp)->length / 2, vssd->data + 2);
length += (*pp)->length;
vilen += (*pp)->length;
vslen += (*pp)->length;
diff --git a/contrib/binutils/binutils/rescoff.c b/contrib/binutils/binutils/rescoff.c
index b7fd9c3..45161c3 100644
--- a/contrib/binutils/binutils/rescoff.c
+++ b/contrib/binutils/binutils/rescoff.c
@@ -1,5 +1,5 @@
/* rescoff.c -- read and write resources in Windows COFF files.
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -125,7 +125,7 @@ read_coff_rsrc (filename, target)
struct coff_file_info finfo;
if (filename == NULL)
- fatal ("filename required for COFF input");
+ fatal (_("filename required for COFF input"));
abfd = bfd_openr (filename, target);
if (abfd == NULL)
@@ -142,16 +142,14 @@ read_coff_rsrc (filename, target)
sec = bfd_get_section_by_name (abfd, ".rsrc");
if (sec == NULL)
{
- fprintf (stderr, "%s: %s: no resource section\n", program_name,
- filename);
- xexit (1);
+ fatal (_("%s: no resource section"), filename);
}
size = bfd_section_size (abfd, sec);
data = (bfd_byte *) res_alloc (size);
if (! bfd_get_section_contents (abfd, sec, data, 0, size))
- bfd_fatal ("can't read resource section");
+ bfd_fatal (_("can't read resource section"));
finfo.filename = filename;
finfo.data = data;
@@ -177,7 +175,7 @@ overrun (finfo, msg)
const struct coff_file_info *finfo;
const char *msg;
{
- fatal ("%s: %s: address out of bounds", finfo->filename, msg);
+ fatal (_("%s: %s: address out of bounds"), finfo->filename, msg);
}
/* Read a resource directory. */
@@ -195,8 +193,8 @@ read_coff_res_dir (data, finfo, type, level)
struct res_entry **pp;
const struct extern_res_entry *ere;
- if (finfo->data_end - data < sizeof (struct extern_res_directory))
- overrun (finfo, "directory");
+ if ((size_t) (finfo->data_end - data) < sizeof (struct extern_res_directory))
+ overrun (finfo, _("directory"));
erd = (const struct extern_res_directory *) data;
@@ -224,7 +222,7 @@ read_coff_res_dir (data, finfo, type, level)
int length, j;
if ((const bfd_byte *) ere >= finfo->data_end)
- overrun (finfo, "named directory entry");
+ overrun (finfo, _("named directory entry"));
name = getfi_32 (finfo, ere->name);
rva = getfi_32 (finfo, ere->rva);
@@ -232,8 +230,8 @@ read_coff_res_dir (data, finfo, type, level)
/* For some reason the high bit in NAME is set. */
name &=~ 0x80000000;
- if (name > finfo->data_end - finfo->data)
- overrun (finfo, "directory entry name");
+ if (name > (size_t) (finfo->data_end - finfo->data))
+ overrun (finfo, _("directory entry name"));
ers = finfo->data + name;
@@ -252,16 +250,16 @@ read_coff_res_dir (data, finfo, type, level)
if ((rva & 0x80000000) != 0)
{
rva &=~ 0x80000000;
- if (rva >= finfo->data_end - finfo->data)
- overrun (finfo, "named subdirectory");
+ if (rva >= (size_t) (finfo->data_end - finfo->data))
+ overrun (finfo, _("named subdirectory"));
re->subdir = 1;
re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
level + 1);
}
else
{
- if (rva >= finfo->data_end - finfo->data)
- overrun (finfo, "named resource");
+ if (rva >= (size_t) (finfo->data_end - finfo->data))
+ overrun (finfo, _("named resource"));
re->subdir = 0;
re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
}
@@ -276,7 +274,7 @@ read_coff_res_dir (data, finfo, type, level)
struct res_entry *re;
if ((const bfd_byte *) ere >= finfo->data_end)
- overrun (finfo, "ID directory entry");
+ overrun (finfo, _("ID directory entry"));
name = getfi_32 (finfo, ere->name);
rva = getfi_32 (finfo, ere->rva);
@@ -292,16 +290,16 @@ read_coff_res_dir (data, finfo, type, level)
if ((rva & 0x80000000) != 0)
{
rva &=~ 0x80000000;
- if (rva >= finfo->data_end - finfo->data)
- overrun (finfo, "ID subdirectory");
+ if (rva >= (size_t) (finfo->data_end - finfo->data))
+ overrun (finfo, _("ID subdirectory"));
re->subdir = 1;
re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
level + 1);
}
else
{
- if (rva >= finfo->data_end - finfo->data)
- overrun (finfo, "ID resource");
+ if (rva >= (size_t) (finfo->data_end - finfo->data))
+ overrun (finfo, _("ID resource"));
re->subdir = 0;
re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
}
@@ -327,23 +325,23 @@ read_coff_data_entry (data, finfo, type)
const bfd_byte *resdata;
if (type == NULL)
- fatal ("resource type unknown");
+ fatal (_("resource type unknown"));
- if (finfo->data_end - data < sizeof (struct extern_res_data))
- overrun (finfo, "data entry");
+ if ((size_t) (finfo->data_end - data) < sizeof (struct extern_res_data))
+ overrun (finfo, _("data entry"));
erd = (const struct extern_res_data *) data;
size = getfi_32 (finfo, erd->size);
rva = getfi_32 (finfo, erd->rva);
if (rva < finfo->secaddr
- || rva - finfo->secaddr >= finfo->data_end - finfo->data)
- overrun (finfo, "resource data");
+ || rva - finfo->secaddr >= (size_t) (finfo->data_end - finfo->data))
+ overrun (finfo, _("resource data"));
resdata = finfo->data + (rva - finfo->secaddr);
- if (size > finfo->data_end - resdata)
- overrun (finfo, "resource data size");
+ if (size > (size_t) (finfo->data_end - resdata))
+ overrun (finfo, _("resource data size"));
r = bin_to_res (*type, resdata, size, finfo->big_endian);
@@ -438,7 +436,7 @@ write_coff_file (filename, target, resources)
unsigned long length, offset;
if (filename == NULL)
- fatal ("filename required for COFF output");
+ fatal (_("filename required for COFF output"));
abfd = bfd_openw (filename, target);
if (abfd == NULL)
@@ -447,9 +445,20 @@ write_coff_file (filename, target, resources)
if (! bfd_set_format (abfd, bfd_object))
bfd_fatal ("bfd_set_format");
+#if defined DLLTOOL_SH
+ if (! bfd_set_arch_mach (abfd, bfd_arch_sh, 0))
+ bfd_fatal ("bfd_set_arch_mach(sh)");
+#elif defined DLLTOOL_MIPS
+ if (! bfd_set_arch_mach (abfd, bfd_arch_mips, 0))
+ bfd_fatal ("bfd_set_arch_mach(mips)");
+#elif defined DLLTOOL_ARM
+ if (! bfd_set_arch_mach (abfd, bfd_arch_arm, 0))
+ bfd_fatal ("bfd_set_arch_mach(arm)");
+#else
/* FIXME: This is obviously i386 specific. */
if (! bfd_set_arch_mach (abfd, bfd_arch_i386, 0))
- bfd_fatal ("bfd_set_arch_mach");
+ bfd_fatal ("bfd_set_arch_mach(i386)");
+#endif
if (! bfd_set_file_flags (abfd, HAS_SYMS | HAS_RELOC))
bfd_fatal ("bfd_set_file_flags");
@@ -726,7 +735,7 @@ coff_res_to_bin (res, cwi)
r->addend = 0;
r->howto = bfd_reloc_type_lookup (cwi->abfd, BFD_RELOC_RVA);
if (r->howto == NULL)
- bfd_fatal ("can't get BFD_RELOC_RVA relocation type");
+ bfd_fatal (_("can't get BFD_RELOC_RVA relocation type"));
cwi->relocs = xrealloc (cwi->relocs,
(cwi->reloc_count + 2) * sizeof (arelent *));
diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c
index a836780..8c3c9a7 100644
--- a/contrib/binutils/binutils/resrc.c
+++ b/contrib/binutils/binutils/resrc.c
@@ -1,5 +1,5 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -29,9 +29,49 @@
#include <assert.h>
#include <ctype.h>
+#include <errno.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#else /* ! HAVE_SYS_WAIT_H */
+#if ! defined (_WIN32) || defined (__CYGWIN__)
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w)&0377) == 0)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0177)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) >> 8) & 0377)
+#endif
+#else /* defined (_WIN32) && ! defined (__CYGWIN__) */
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w) & 0xff) == 0)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w) & 0xff) != 0 && ((w) & 0xff) != 0x7f)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0x7f)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) & 0xff00) >> 8)
+#endif
+#endif /* defined (_WIN32) && ! defined (__CYGWIN__) */
+#endif /* ! HAVE_SYS_WAIT_H */
-#if defined (_WIN32) && ! defined (__CYGWIN32__)
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+
+#if defined (_WIN32) && ! defined (__CYGWIN__)
#define popen _popen
#define pclose _pclose
#endif
@@ -86,6 +126,15 @@ int rc_lineno;
static FILE *cpp_pipe;
+/* The temporary file used if we're not using popen, so we can delete it
+ if we exit. */
+
+static char *cpp_temp_file;
+
+/* Input stream is either a file or a pipe. */
+
+static enum {ISTREAM_PIPE, ISTREAM_FILE} istream_type;
+
/* As we read the rc file, we attach information to this structure. */
static struct res_directory *resources;
@@ -112,7 +161,11 @@ static int icons;
/* Local functions. */
-static void close_pipe PARAMS ((void));
+static int run_cmd PARAMS ((char *, const char *));
+static FILE *open_input_stream PARAMS ((char *));
+static FILE *look_for_default PARAMS ((char *, const char *, int,
+ const char *, const char *));
+static void close_input_stream PARAMS ((void));
static void unexpected_eof PARAMS ((const char *));
static int get_word PARAMS ((FILE *, const char *));
static unsigned long get_long PARAMS ((FILE *, const char *));
@@ -120,37 +173,307 @@ static void get_data
PARAMS ((FILE *, unsigned char *, unsigned long, const char *));
static void define_fontdirs PARAMS ((void));
+/* Run `cmd' and redirect the output to `redir'. */
+
+static int
+run_cmd (cmd, redir)
+ char *cmd;
+ const char *redir;
+{
+ char *s;
+ int pid, wait_status, retcode;
+ int i;
+ const char **argv;
+ char *errmsg_fmt, *errmsg_arg;
+ char *temp_base = choose_temp_base ();
+ int in_quote;
+ char sep;
+ int redir_handle = -1;
+ int stdout_save = -1;
+
+ /* Count the args. */
+ i = 0;
+
+ for (s = cmd; *s; s++)
+ if (*s == ' ')
+ i++;
+
+ i++;
+ argv = alloca (sizeof (char *) * (i + 3));
+ i = 0;
+ s = cmd;
+
+ while (1)
+ {
+ while (*s == ' ' && *s != 0)
+ s++;
+
+ if (*s == 0)
+ break;
+
+ in_quote = (*s == '\'' || *s == '"');
+ sep = (in_quote) ? *s++ : ' ';
+ argv[i++] = s;
+
+ while (*s != sep && *s != 0)
+ s++;
+
+ if (*s == 0)
+ break;
+
+ *s++ = 0;
+
+ if (in_quote)
+ s++;
+ }
+ argv[i++] = NULL;
+
+ /* Setup the redirection. We can't use the usual fork/exec and redirect
+ since we may be running on non-POSIX Windows host. */
+
+ fflush (stdout);
+ fflush (stderr);
+
+ /* Open temporary output file. */
+ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0666);
+ if (redir_handle == -1)
+ fatal (_("can't open temporary file `%s': %s"), redir,
+ strerror (errno));
+
+ /* Duplicate the stdout file handle so it can be restored later. */
+ stdout_save = dup (STDOUT_FILENO);
+ if (stdout_save == -1)
+ fatal (_("can't redirect stdout: `%s': %s"), redir, strerror (errno));
+
+ /* Redirect stdout to our output file. */
+ dup2 (redir_handle, STDOUT_FILENO);
+
+ pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base,
+ &errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH);
+
+ /* Restore stdout to its previous setting. */
+ dup2 (stdout_save, STDOUT_FILENO);
+
+ /* Close reponse file. */
+ close (redir_handle);
+
+ if (pid == -1)
+ {
+ fatal (_("%s %s: %s"), errmsg_fmt, errmsg_arg, strerror (errno));
+ return 1;
+ }
+
+ retcode = 0;
+ pid = pwait (pid, &wait_status, 0);
+
+ if (pid == -1)
+ {
+ fatal (_("wait: %s"), strerror (errno));
+ retcode = 1;
+ }
+ else if (WIFSIGNALED (wait_status))
+ {
+ fatal (_("subprocess got fatal signal %d"), WTERMSIG (wait_status));
+ retcode = 1;
+ }
+ else if (WIFEXITED (wait_status))
+ {
+ if (WEXITSTATUS (wait_status) != 0)
+ {
+ fatal (_("%s exited with status %d"), cmd,
+ WEXITSTATUS (wait_status));
+ retcode = 1;
+ }
+ }
+ else
+ retcode = 1;
+
+ return retcode;
+}
+
+static FILE *
+open_input_stream (cmd)
+ char *cmd;
+{
+ if (istream_type == ISTREAM_FILE)
+ {
+ char *fileprefix;
+
+ fileprefix = choose_temp_base ();
+ cpp_temp_file = (char *) xmalloc (strlen (fileprefix) + 5);
+ sprintf (cpp_temp_file, "%s.irc", fileprefix);
+ free (fileprefix);
+
+ if (run_cmd (cmd, cpp_temp_file))
+ fatal (_("can't execute `%s': %s"), cmd, strerror (errno));
+
+ cpp_pipe = fopen (cpp_temp_file, FOPEN_RT);;
+ if (cpp_pipe == NULL)
+ fatal (_("can't open temporary file `%s': %s"),
+ cpp_temp_file, strerror (errno));
+
+ if (verbose)
+ fprintf (stderr,
+ _("Using temporary file `%s' to read preprocessor output\n"),
+ cpp_temp_file);
+ }
+ else
+ {
+ cpp_pipe = popen (cmd, FOPEN_RT);
+ if (cpp_pipe == NULL)
+ fatal (_("can't popen `%s': %s"), cmd, strerror (errno));
+ if (verbose)
+ fprintf (stderr, _("Using popen to read preprocessor output\n"));
+ }
+
+ xatexit (close_input_stream);
+ return cpp_pipe;
+}
+
+/* look for the preprocessor program */
+
+static FILE *
+look_for_default (cmd, prefix, end_prefix, preprocargs, filename)
+ char *cmd;
+ const char *prefix;
+ int end_prefix;
+ const char *preprocargs;
+ const char *filename;
+{
+ char *space;
+ int found;
+ struct stat s;
+
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s", DEFAULT_PREPROCESSOR);
+ space = strchr (cmd + end_prefix, ' ');
+ if (space)
+ *space = 0;
+
+ if (
+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32)
+ strchr (cmd, '\\') ||
+#endif
+ strchr (cmd, '/'))
+ {
+ found = (stat (cmd, &s) == 0
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ || stat (strcat (cmd, EXECUTABLE_SUFFIX), &s) == 0
+#endif
+ );
+
+ if (! found)
+ {
+ if (verbose)
+ fprintf (stderr, _("Tried `%s'\n"), cmd);
+ return NULL;
+ }
+ }
+
+ strcpy (cmd, prefix);
+
+ sprintf (cmd + end_prefix, "%s %s %s",
+ DEFAULT_PREPROCESSOR, preprocargs, filename);
+
+ if (verbose)
+ fprintf (stderr, _("Using `%s'\n"), cmd);
+
+ cpp_pipe = open_input_stream (cmd);
+ return cpp_pipe;
+}
+
/* Read an rc file. */
struct res_directory *
-read_rc_file (filename, preprocessor, preprocargs, language)
+read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file)
const char *filename;
const char *preprocessor;
const char *preprocargs;
int language;
+ int use_temp_file;
{
char *cmd;
- if (preprocessor == NULL)
- preprocessor = DEFAULT_PREPROCESSOR;
+ istream_type = (use_temp_file) ? ISTREAM_FILE : ISTREAM_PIPE;
if (preprocargs == NULL)
preprocargs = "";
if (filename == NULL)
filename = "-";
- cmd = xmalloc (strlen (preprocessor)
- + strlen (preprocargs)
- + strlen (filename)
- + 10);
- sprintf (cmd, "%s %s %s", preprocessor, preprocargs, filename);
+ if (preprocessor)
+ {
+ cmd = xmalloc (strlen (preprocessor)
+ + strlen (preprocargs)
+ + strlen (filename)
+ + 10);
+ sprintf (cmd, "%s %s %s", preprocessor, preprocargs, filename);
- cpp_pipe = popen (cmd, FOPEN_RT);
- if (cpp_pipe == NULL)
- fatal ("can't popen `%s': %s", cmd, strerror (errno));
- free (cmd);
+ cpp_pipe = open_input_stream (cmd);
+ }
+ else
+ {
+ char *dash, *slash, *cp;
+
+ preprocessor = DEFAULT_PREPROCESSOR;
+
+ cmd = xmalloc (strlen (program_name)
+ + strlen (preprocessor)
+ + strlen (preprocargs)
+ + strlen (filename)
+#ifdef HAVE_EXECUTABLE_SUFFIX
+ + strlen (EXECUTABLE_SUFFIX)
+#endif
+ + 10);
+
+
+ dash = slash = 0;
+ for (cp = program_name; *cp; cp++)
+ {
+ if (*cp == '-')
+ dash = cp;
+ if (
+#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32)
+ *cp == ':' || *cp == '\\' ||
+#endif
+ *cp == '/')
+ {
+ slash = cp;
+ dash = 0;
+ }
+ }
+
+ cpp_pipe = 0;
+
+ if (dash)
+ {
+ /* First, try looking for a prefixed gcc in the windres
+ directory, with the same prefix as windres */
+
+ cpp_pipe = look_for_default (cmd, program_name, dash-program_name+1,
+ preprocargs, filename);
+ }
+
+ if (slash && !cpp_pipe)
+ {
+ /* Next, try looking for a gcc in the same directory as
+ that windres */
+
+ cpp_pipe = look_for_default (cmd, program_name, slash-program_name+1,
+ preprocargs, filename);
+ }
+
+ if (!cpp_pipe)
+ {
+ /* Sigh, try the default */
- xatexit (close_pipe);
+ cpp_pipe = look_for_default (cmd, "", 0, preprocargs, filename);
+ }
+
+ }
+
+ free (cmd);
rc_filename = xstrdup (filename);
rc_lineno = 1;
@@ -159,10 +482,8 @@ read_rc_file (filename, preprocessor, preprocargs, language)
yyin = cpp_pipe;
yyparse ();
- if (pclose (cpp_pipe) != 0)
- fprintf (stderr, "%s: warning: preprocessor failed\n", program_name);
- cpp_pipe = NULL;
-
+ close_input_stream ();
+
if (fontdirs != NULL)
define_fontdirs ();
@@ -172,13 +493,37 @@ read_rc_file (filename, preprocessor, preprocargs, language)
return resources;
}
-/* Close the pipe if it is open. This is called via xatexit. */
+/* Close the input stream if it is open. */
-void
-close_pipe ()
+static void
+close_input_stream ()
{
if (cpp_pipe != NULL)
pclose (cpp_pipe);
+
+ if (istream_type == ISTREAM_FILE)
+ {
+ if (cpp_pipe != NULL)
+ fclose (cpp_pipe);
+
+ if (cpp_temp_file != NULL)
+ {
+ int errno_save = errno;
+
+ unlink (cpp_temp_file);
+ errno = errno_save;
+ free (cpp_temp_file);
+ }
+ }
+ else
+ {
+ if (cpp_pipe != NULL)
+ pclose (cpp_pipe);
+ }
+
+ /* Since this is also run via xatexit, safeguard. */
+ cpp_pipe = NULL;
+ cpp_temp_file = NULL;
}
/* Report an error while reading an rc file. */
@@ -196,7 +541,7 @@ void
rcparse_warning (msg)
const char *msg;
{
- fprintf (stderr, "%s:%d: %s\n", rc_filename, rc_lineno, msg);
+ fprintf (stderr, _("%s:%d: %s\n"), rc_filename, rc_lineno, msg);
}
/* Die if we get an unexpected end of file. */
@@ -205,7 +550,7 @@ static void
unexpected_eof (msg)
const char *msg;
{
- fatal ("%s: unexpected EOF", msg);
+ fatal (_("%s: unexpected EOF"), msg);
}
/* Read a 16 bit word from a file. The data is assumed to be little
@@ -262,7 +607,7 @@ get_data (e, p, c, msg)
if (got == c)
return;
- fatal ("%s: read of %lu returned %lu", msg, c, got);
+ fatal (_("%s: read of %lu returned %lu"), msg, c, got);
}
/* Define an accelerator resource. */
@@ -275,7 +620,7 @@ define_accelerator (id, resinfo, data)
{
struct res_resource *r;
- r = define_standard_resource (&resources, RT_ACCELERATORS, id,
+ r = define_standard_resource (&resources, RT_ACCELERATOR, id,
resinfo->language, 0);
r->type = RES_TYPE_ACCELERATOR;
r->u.acc = data;
@@ -304,7 +649,7 @@ define_bitmap (id, resinfo, filename)
e = open_file_search (filename, FOPEN_RB, "bitmap file", &real_filename);
if (stat (real_filename, &s) < 0)
- fatal ("stat failed on bitmap file `%s': %s", real_filename,
+ fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
strerror (errno));
data = (unsigned char *) res_alloc (s.st_size - BITMAP_SKIP);
@@ -357,7 +702,7 @@ define_cursor (id, resinfo, filename)
type = get_word (e, real_filename);
count = get_word (e, real_filename);
if (type != 2)
- fatal ("cursor file `%s' does not contain cursor data", real_filename);
+ fatal (_("cursor file `%s' does not contain cursor data"), real_filename);
/* Read in the icon directory entries. */
@@ -389,7 +734,7 @@ define_cursor (id, resinfo, filename)
struct cursor *c;
if (fseek (e, icondirs[i].offset, SEEK_SET) != 0)
- fatal ("%s: fseek to %lu failed: %s", real_filename,
+ fatal (_("%s: fseek to %lu failed: %s"), real_filename,
icondirs[i].offset, strerror (errno));
data = (unsigned char *) res_alloc (icondirs[i].bytes);
@@ -535,7 +880,7 @@ define_font (id, resinfo, filename)
e = open_file_search (filename, FOPEN_RB, "font file", &real_filename);
if (stat (real_filename, &s) < 0)
- fatal ("stat failed on bitmap file `%s': %s", real_filename,
+ fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
strerror (errno));
data = (unsigned char *) res_alloc (s.st_size);
@@ -648,7 +993,7 @@ define_icon (id, resinfo, filename)
type = get_word (e, real_filename);
count = get_word (e, real_filename);
if (type != 1)
- fatal ("icon file `%s' does not contain icon data", real_filename);
+ fatal (_("icon file `%s' does not contain icon data"), real_filename);
/* Read in the icon directory entries. */
@@ -679,7 +1024,7 @@ define_icon (id, resinfo, filename)
struct res_id name;
if (fseek (e, icondirs[i].offset, SEEK_SET) != 0)
- fatal ("%s: fseek to %lu failed: %s", real_filename,
+ fatal (_("%s: fseek to %lu failed: %s"), real_filename,
icondirs[i].offset, strerror (errno));
data = (unsigned char *) res_alloc (icondirs[i].bytes);
@@ -808,7 +1153,7 @@ define_messagetable (id, resinfo, filename)
&real_filename);
if (stat (real_filename, &s) < 0)
- fatal ("stat failed on bitmap file `%s': %s", real_filename,
+ fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
strerror (errno));
data = (unsigned char *) res_alloc (s.st_size);
@@ -962,7 +1307,7 @@ define_user_file (id, type, resinfo, filename)
e = open_file_search (filename, FOPEN_RB, "font file", &real_filename);
if (stat (real_filename, &s) < 0)
- fatal ("stat failed on bitmap file `%s': %s", real_filename,
+ fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
strerror (errno));
data = (unsigned char *) res_alloc (s.st_size);
@@ -1167,7 +1512,7 @@ write_rc_file (filename, resources)
{
e = fopen (filename, FOPEN_WT);
if (e == NULL)
- fatal ("can't open `%s' for output: %s", filename, strerror (errno));
+ fatal (_("can't open `%s' for output: %s"), filename, strerror (errno));
}
language = -1;
@@ -1223,7 +1568,7 @@ write_rc_directory (e, rd, type, name, language, level)
/* If we're at level 3, then this key represents a language.
Use it to update the current language. */
if (! re->id.named
- && re->id.u.id != *language
+ && re->id.u.id != (unsigned long) (unsigned int) *language
&& (re->id.u.id & 0xffff) == re->id.u.id)
{
fprintf (e, "LANGUAGE %lu, %lu\n",
@@ -1294,7 +1639,7 @@ write_rc_subdir (e, re, type, name, language, level)
case RT_STRING: s = "stringtable"; break;
case RT_FONTDIR: s = "fontdir"; break;
case RT_FONT: s = "font"; break;
- case RT_ACCELERATORS: s = "accelerators"; break;
+ case RT_ACCELERATOR: s = "accelerators"; break;
case RT_RCDATA: s = "rcdata"; break;
case RT_MESSAGETABLE: s = "messagetable"; break;
case RT_GROUP_CURSOR: s = "group cursor"; break;
@@ -1364,7 +1709,7 @@ write_rc_resource (e, type, name, res, language)
case RES_TYPE_ACCELERATOR:
s = "ACCELERATOR";
- rt = RT_ACCELERATORS;
+ rt = RT_ACCELERATOR;
break;
case RES_TYPE_BITMAP:
@@ -1452,7 +1797,7 @@ write_rc_resource (e, type, name, res, language)
if (rt != 0
&& type != NULL
- && (type->named || type->u.id != rt))
+ && (type->named || type->u.id != (unsigned long) rt))
{
fprintf (e, "// Unexpected resource type mismatch: ");
res_id_print (e, *type, 1);
@@ -1787,8 +2132,9 @@ write_rc_dialog_control (e, control)
|| ci->style == (control->style & 0xff)))
break;
}
-
- if (ci->name != NULL)
+ if (ci == NULL)
+ fprintf (e, "CONTROL");
+ else if (ci->name != NULL)
fprintf (e, "%s", ci->name);
else
fprintf (e, "CONTROL");
@@ -1802,9 +2148,13 @@ write_rc_dialog_control (e, control)
fprintf (e, " %d, ", control->id);
- if (ci->name == NULL)
+ if (ci == NULL)
{
+ if (control->class.named)
+ fprintf (e, "\"");
res_id_print (e, control->class, 0);
+ if (control->class.named)
+ fprintf (e, "\"");
fprintf (e, ", 0x%lx, ", control->style);
}
@@ -2013,7 +2363,7 @@ write_rc_rcdata (e, rcdata, ind)
s = ri->u.string.s;
for (i = 0; i < ri->u.string.length; i++)
{
- if (isprint (*s))
+ if (isprint ((unsigned char) *s))
putc (*s, e);
else
fprintf (e, "\\%03o", *s);
@@ -2039,60 +2389,100 @@ write_rc_rcdata (e, rcdata, ind)
for (i = 0; i + 3 < ri->u.buffer.length; i += 4)
{
unsigned long l;
+ int j;
+ if (! first)
+ indent (e, ind + 2);
l = ((((((ri->u.buffer.data[i + 3] << 8)
| ri->u.buffer.data[i + 2]) << 8)
| ri->u.buffer.data[i + 1]) << 8)
| ri->u.buffer.data[i]);
- if (first)
- first = 0;
- else
+ fprintf (e, "%luL", l);
+ if (i + 4 < ri->u.buffer.length || ri->next != NULL)
+ fprintf (e, ",");
+ for (j = 0; j < 4; ++j)
+ if (! isprint (ri->u.buffer.data[i + j])
+ && ri->u.buffer.data[i + j] != 0)
+ break;
+ if (j >= 4)
{
- fprintf (e, ",\n");
- indent (e, ind + 2);
+ fprintf (e, "\t// ");
+ for (j = 0; j < 4; ++j)
+ {
+ if (! isprint (ri->u.buffer.data[i + j]))
+ fprintf (e, "\\%03o", ri->u.buffer.data[i + j]);
+ else
+ {
+ if (ri->u.buffer.data[i + j] == '\\')
+ fprintf (e, "\\");
+ fprintf (e, "%c", ri->u.buffer.data[i + j]);
+ }
+ }
}
- fprintf (e, "%luL", l);
+ fprintf (e, "\n");
+ first = 0;
}
if (i + 1 < ri->u.buffer.length)
{
- int i;
-
- i = (ri->u.buffer.data[i + 1] << 8) | ri->u.buffer.data[i];
- if (first)
- first = 0;
- else
+ int s;
+ int j;
+
+ if (! first)
+ indent (e, ind + 2);
+ s = (ri->u.buffer.data[i + 1] << 8) | ri->u.buffer.data[i];
+ fprintf (e, "%d", s);
+ if (i + 2 < ri->u.buffer.length || ri->next != NULL)
+ fprintf (e, ",");
+ for (j = 0; j < 2; ++j)
+ if (! isprint (ri->u.buffer.data[i + j])
+ && ri->u.buffer.data[i + j] != 0)
+ break;
+ if (j >= 2)
{
- fprintf (e, ",\n");
- indent (e, ind + 2);
+ fprintf (e, "\t// ");
+ for (j = 0; j < 2; ++j)
+ {
+ if (! isprint (ri->u.buffer.data[i + j]))
+ fprintf (e, "\\%03o", ri->u.buffer.data[i + j]);
+ else
+ {
+ if (ri->u.buffer.data[i + j] == '\\')
+ fprintf (e, "\\");
+ fprintf (e, "%c", ri->u.buffer.data[i + j]);
+ }
+ }
}
- fprintf (e, "%d", i);
+ fprintf (e, "\n");
i += 2;
+ first = 0;
}
if (i < ri->u.buffer.length)
{
- if (first)
- first = 0;
- else
- {
- fprintf (e, ",\n");
- indent (e, ind + 2);
- }
+ if (! first)
+ indent (e, ind + 2);
if ((ri->u.buffer.data[i] & 0x7f) == ri->u.buffer.data[i]
&& isprint (ri->u.buffer.data[i]))
fprintf (e, "\"%c\"", ri->u.buffer.data[i]);
else
- fprintf (e, "\"\%03o\"", ri->u.buffer.data[i]);
+ fprintf (e, "\"\\%03o\"", ri->u.buffer.data[i]);
+ if (ri->next != NULL)
+ fprintf (e, ",");
+ fprintf (e, "\n");
+ first = 0;
}
break;
}
}
- if (ri->next != NULL)
- fprintf (e, ",");
- fprintf (e, "\n");
+ if (ri->type != RCDATA_BUFFER)
+ {
+ if (ri->next != NULL)
+ fprintf (e, ",");
+ fprintf (e, "\n");
+ }
}
indent (e, ind);
diff --git a/contrib/binutils/binutils/resres.c b/contrib/binutils/binutils/resres.c
new file mode 100644
index 0000000..6a860eb
--- /dev/null
+++ b/contrib/binutils/binutils/resres.c
@@ -0,0 +1,659 @@
+/* resres.c: read_res_file and write_res_file implementation for windres.
+ Copyright 1998, 1999 Free Software Foundation, Inc.
+ Written by Anders Norlander <anorland@hem2.passagen.se>.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+/* FIXME: This file does not work correctly in a cross configuration.
+ It assumes that it can use fread and fwrite to read and write
+ integers. It does no swapping. */
+
+#include "bfd.h"
+#include "bucomm.h"
+#include "libiberty.h"
+#include "windres.h"
+
+#include <assert.h>
+#include <time.h>
+
+struct res_hdr
+ {
+ unsigned long data_size;
+ unsigned long header_size;
+ };
+
+static void write_res_directory
+ PARAMS ((const struct res_directory *,
+ const struct res_id *, const struct res_id *,
+ int *, int));
+static void write_res_resource
+ PARAMS ((const struct res_id *, const struct res_id *,
+ const struct res_resource *, int *));
+static void write_res_bin
+ PARAMS ((const struct res_resource *, const struct res_id *,
+ const struct res_id *, const struct res_res_info *));
+
+static void write_res_id PARAMS ((const struct res_id *));
+static void write_res_info PARAMS ((const struct res_res_info *));
+static void write_res_data PARAMS ((const void *, size_t, int));
+static void write_res_header
+ PARAMS ((unsigned long, const struct res_id *, const struct res_id *,
+ const struct res_res_info *));
+
+static int read_resource_entry PARAMS ((void));
+static void read_res_data PARAMS ((void *, size_t, int));
+static void read_res_id PARAMS ((struct res_id *));
+static unichar *read_unistring PARAMS ((int *));
+static void skip_null_resource PARAMS ((void));
+
+static unsigned long get_id_size PARAMS ((const struct res_id *));
+static void res_align_file PARAMS ((void));
+
+static void
+ res_add_resource
+ PARAMS ((struct res_resource *, const struct res_id *,
+ const struct res_id *, int, int));
+
+void
+ res_append_resource
+ PARAMS ((struct res_directory **, struct res_resource *,
+ int, const struct res_id *, int));
+
+static struct res_directory *resources = NULL;
+
+static FILE *fres;
+static const char *filename;
+
+extern char *program_name;
+
+/* Read resource file */
+struct res_directory *
+read_res_file (fn)
+ const char *fn;
+{
+ filename = fn;
+ fres = fopen (filename, "rb");
+ if (fres == NULL)
+ fatal ("can't open `%s' for output: %s", filename, strerror (errno));
+
+ skip_null_resource ();
+
+ while (read_resource_entry ())
+ ;
+
+ fclose (fres);
+
+ return resources;
+}
+
+/* Write resource file */
+void
+write_res_file (fn, resdir)
+ const char *fn;
+ const struct res_directory *resdir;
+{
+ int language;
+ static const unsigned char sign[] =
+ {0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ long fpos;
+
+ filename = fn;
+
+ fres = fopen (filename, "wb");
+ if (fres == NULL)
+ fatal ("can't open `%s' for output: %s", filename, strerror (errno));
+
+ /* Write 32 bit resource signature */
+ write_res_data (sign, sizeof (sign), 1);
+
+ /* write resources */
+
+ language = -1;
+ write_res_directory (resdir, (const struct res_id *) NULL,
+ (const struct res_id *) NULL, &language, 1);
+
+ /* end file on DWORD boundary */
+ fpos = ftell (fres);
+ if (fpos % 4)
+ write_res_data (sign, fpos % 4, 1);
+
+ fclose (fres);
+}
+
+/* Read a resource entry, returns 0 when all resources are read */
+static int
+read_resource_entry (void)
+{
+ struct res_id type;
+ struct res_id name;
+ struct res_res_info resinfo;
+ struct res_hdr reshdr;
+ long version;
+ void *buff;
+
+ struct res_resource *r;
+
+ res_align_file ();
+
+ /* Read header */
+ if (fread (&reshdr, sizeof (reshdr), 1, fres) != 1)
+ return 0;
+
+ /* read resource type */
+ read_res_id (&type);
+ /* read resource id */
+ read_res_id (&name);
+
+ res_align_file ();
+
+ /* Read additional resource header */
+ read_res_data (&resinfo.version, sizeof (resinfo.version), 1);
+ read_res_data (&resinfo.memflags, sizeof (resinfo.memflags), 1);
+ read_res_data (&resinfo.language, sizeof (resinfo.language), 1);
+ read_res_data (&version, sizeof (version), 1);
+ read_res_data (&resinfo.characteristics, sizeof (resinfo.characteristics), 1);
+
+ res_align_file ();
+
+ /* Allocate buffer for data */
+ buff = res_alloc (reshdr.data_size);
+ /* Read data */
+ read_res_data (buff, reshdr.data_size, 1);
+ /* Convert binary data to resource */
+ r = bin_to_res (type, buff, reshdr.data_size, 0);
+ r->res_info = resinfo;
+ /* Add resource to resource directory */
+ res_add_resource (r, &type, &name, resinfo.language, 0);
+
+ return 1;
+}
+
+/* write resource directory to binary resource file */
+static void
+write_res_directory (rd, type, name, language, level)
+ const struct res_directory *rd;
+ const struct res_id *type;
+ const struct res_id *name;
+ int *language;
+ int level;
+{
+ const struct res_entry *re;
+
+ for (re = rd->entries; re != NULL; re = re->next)
+ {
+ switch (level)
+ {
+ case 1:
+ /* If we're at level 1, the key of this resource is the
+ type. This normally duplicates the information we have
+ stored with the resource itself, but we need to remember
+ the type if this is a user define resource type. */
+ type = &re->id;
+ break;
+
+ case 2:
+ /* If we're at level 2, the key of this resource is the name
+ we are going to use in the rc printout. */
+ name = &re->id;
+ break;
+
+ case 3:
+ /* If we're at level 3, then this key represents a language.
+ Use it to update the current language. */
+ if (!re->id.named
+ && re->id.u.id != (unsigned long) *language
+ && (re->id.u.id & 0xffff) == re->id.u.id)
+ {
+ *language = re->id.u.id;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (re->subdir)
+ write_res_directory (re->u.dir, type, name, language, level + 1);
+ else
+ {
+ if (level == 3)
+ {
+ /* This is the normal case: the three levels are
+ TYPE/NAME/LANGUAGE. NAME will have been set at level
+ 2, and represents the name to use. We probably just
+ set LANGUAGE, and it will probably match what the
+ resource itself records if anything. */
+ write_res_resource (type, name, re->u.res, language);
+ }
+ else
+ {
+ fprintf (stderr, "// Resource at unexpected level %d\n", level);
+ write_res_resource (type, (struct res_id *) NULL, re->u.res,
+ language);
+ }
+ }
+ }
+
+}
+
+static void
+write_res_resource (type, name, res, language)
+ const struct res_id *type;
+ const struct res_id *name;
+ const struct res_resource *res;
+ int *language ATTRIBUTE_UNUSED;
+{
+ int rt;
+
+ switch (res->type)
+ {
+ default:
+ abort ();
+
+ case RES_TYPE_ACCELERATOR:
+ rt = RT_ACCELERATOR;
+ break;
+
+ case RES_TYPE_BITMAP:
+ rt = RT_BITMAP;
+ break;
+
+ case RES_TYPE_CURSOR:
+ rt = RT_CURSOR;
+ break;
+
+ case RES_TYPE_GROUP_CURSOR:
+ rt = RT_GROUP_CURSOR;
+ break;
+
+ case RES_TYPE_DIALOG:
+ rt = RT_DIALOG;
+ break;
+
+ case RES_TYPE_FONT:
+ rt = RT_FONT;
+ break;
+
+ case RES_TYPE_FONTDIR:
+ rt = RT_FONTDIR;
+ break;
+
+ case RES_TYPE_ICON:
+ rt = RT_ICON;
+ break;
+
+ case RES_TYPE_GROUP_ICON:
+ rt = RT_GROUP_ICON;
+ break;
+
+ case RES_TYPE_MENU:
+ rt = RT_MENU;
+ break;
+
+ case RES_TYPE_MESSAGETABLE:
+ rt = RT_MESSAGETABLE;
+ break;
+
+ case RES_TYPE_RCDATA:
+ rt = RT_RCDATA;
+ break;
+
+ case RES_TYPE_STRINGTABLE:
+ rt = RT_STRING;
+ break;
+
+ case RES_TYPE_USERDATA:
+ rt = 0;
+ break;
+
+ case RES_TYPE_VERSIONINFO:
+ rt = RT_VERSION;
+ break;
+ }
+
+ if (rt != 0
+ && type != NULL
+ && (type->named || type->u.id != (unsigned long) rt))
+ {
+ fprintf (stderr, "// Unexpected resource type mismatch: ");
+ res_id_print (stderr, *type, 1);
+ fprintf (stderr, " != %d", rt);
+ abort ();
+ }
+
+ write_res_bin (res, type, name, &res->res_info);
+ return;
+}
+
+/* Write a resource in binary resource format */
+static void
+write_res_bin (res, type, name, resinfo)
+ const struct res_resource *res;
+ const struct res_id *type;
+ const struct res_id *name;
+ const struct res_res_info *resinfo;
+{
+ unsigned long datasize = 0;
+ const struct bindata *bin_rep, *data;
+
+ bin_rep = res_to_bin (res, 0);
+ for (data = bin_rep; data != NULL; data = data->next)
+ datasize += data->length;
+
+ write_res_header (datasize, type, name, resinfo);
+
+ for (data = bin_rep; data != NULL; data = data->next)
+ write_res_data (data->data, data->length, 1);
+}
+
+/* Get number of bytes needed to store an id in binary format */
+static unsigned long
+get_id_size (id)
+ const struct res_id *id;
+{
+ if (id->named)
+ return sizeof (unichar) * (id->u.n.length + 1);
+ else
+ return sizeof (unichar) * 2;
+}
+
+/* Write a resource header */
+static void
+write_res_header (datasize, type, name, resinfo)
+ unsigned long datasize;
+ const struct res_id *type;
+ const struct res_id *name;
+ const struct res_res_info *resinfo;
+{
+ struct res_hdr reshdr;
+ reshdr.data_size = datasize;
+ reshdr.header_size = 24 + get_id_size (type) + get_id_size (name);
+
+ res_align_file ();
+ write_res_data (&reshdr, sizeof (reshdr), 1);
+ write_res_id (type);
+ write_res_id (name);
+
+ res_align_file ();
+
+ write_res_info (resinfo);
+ res_align_file ();
+}
+
+
+/* Write data to file, abort on failure */
+static void
+write_res_data (data, size, count)
+ const void *data;
+ size_t size;
+ int count;
+{
+ if (fwrite (data, size, count, fres) != (size_t) count)
+ fatal ("%s: could not write to file", filename);
+}
+
+/* Read data from file, abort on failure */
+static void
+read_res_data (data, size, count)
+ void *data;
+ size_t size;
+ int count;
+{
+ if (fread (data, size, count, fres) != (size_t) count)
+ fatal ("%s: unexpected end of file", filename);
+}
+
+/* Write a resource id */
+static void
+write_res_id (id)
+ const struct res_id *id;
+{
+ if (id->named)
+ {
+ unsigned long len = id->u.n.length;
+ unichar null_term = 0;
+ write_res_data (id->u.n.name, len * sizeof (unichar), 1);
+ write_res_data (&null_term, sizeof (null_term), 1);
+ }
+ else
+ {
+ unsigned short i = 0xFFFF;
+ write_res_data (&i, sizeof (i), 1);
+ i = id->u.id;
+ write_res_data (&i, sizeof (i), 1);
+ }
+}
+
+/* Write resource info */
+static void
+write_res_info (info)
+ const struct res_res_info *info;
+{
+ write_res_data (&info->version, sizeof (info->version), 1);
+ write_res_data (&info->memflags, sizeof (info->memflags), 1);
+ write_res_data (&info->language, sizeof (info->language), 1);
+ write_res_data (&info->version, sizeof (info->version), 1);
+ write_res_data (&info->characteristics, sizeof (info->characteristics), 1);
+}
+
+/* read a resource identifier */
+void
+read_res_id (id)
+ struct res_id *id;
+{
+ unsigned short ord;
+ unichar *id_s = NULL;
+ int len;
+
+ read_res_data (&ord, sizeof (ord), 1);
+ if (ord == 0xFFFF) /* an ordinal id */
+ {
+ read_res_data (&ord, sizeof (ord), 1);
+ id->named = 0;
+ id->u.id = ord;
+ }
+ else
+ /* named id */
+ {
+ if (fseek (fres, -sizeof (ord), SEEK_CUR) != 0)
+ fatal ("%s: %s: could not seek in file", program_name, filename);
+ id_s = read_unistring (&len);
+ id->named = 1;
+ id->u.n.length = len;
+ id->u.n.name = id_s;
+ }
+}
+
+/* Read a null terminated UNICODE string */
+static unichar *
+read_unistring (len)
+ int *len;
+{
+ unichar *s;
+ unichar c;
+ unichar *p;
+ int l;
+
+ *len = 0;
+ l = 0;
+
+ /* there are hardly any names longer than 256 characters */
+ p = s = (unichar *) xmalloc (sizeof (unichar) * 256);
+ do
+ {
+ read_res_data (&c, sizeof (c), 1);
+ *p++ = c;
+ if (c != 0)
+ l++;
+ }
+ while (c != 0);
+ *len = l;
+ return s;
+}
+
+/* align file on DWORD boundary */
+static void
+res_align_file (void)
+{
+ if (fseek (fres, ftell (fres) % 4, SEEK_CUR) != 0)
+ fatal ("%s: %s: unable to align file", program_name, filename);
+}
+
+/* Check if file is a win32 binary resource file, if so
+ skip past the null resource. Returns 0 if successful, -1 on
+ error.
+ */
+static void
+skip_null_resource (void)
+{
+ struct res_hdr reshdr =
+ {0, 0};
+ read_res_data (&reshdr, sizeof (reshdr), 1);
+ if ((reshdr.data_size != 0) || (reshdr.header_size != 0x20))
+ goto skip_err;
+
+ /* Subtract size of HeaderSize and DataSize */
+ if (fseek (fres, reshdr.header_size - 8, SEEK_CUR) != 0)
+ goto skip_err;
+
+ return;
+
+skip_err:
+ fprintf (stderr, "%s: %s: Not a valid WIN32 resource file\n", program_name,
+ filename);
+ xexit (1);
+}
+
+/* Add a resource to resource directory */
+void
+res_add_resource (r, type, id, language, dupok)
+ struct res_resource *r;
+ const struct res_id *type;
+ const struct res_id *id;
+ int language;
+ int dupok;
+{
+ struct res_id a[3];
+
+ a[0] = *type;
+ a[1] = *id;
+ a[2].named = 0;
+ a[2].u.id = language;
+ res_append_resource (&resources, r, 3, a, dupok);
+}
+
+/* Append a resource to resource directory.
+ This is just copied from define_resource
+ and modified to add an existing resource.
+ */
+void
+res_append_resource (resources, resource, cids, ids, dupok)
+ struct res_directory **resources;
+ struct res_resource *resource;
+ int cids;
+ const struct res_id *ids;
+ int dupok;
+{
+ struct res_entry *re = NULL;
+ int i;
+
+ assert (cids > 0);
+ for (i = 0; i < cids; i++)
+ {
+ struct res_entry **pp;
+
+ if (*resources == NULL)
+ {
+ static unsigned long timeval;
+
+ /* Use the same timestamp for every resource created in a
+ single run. */
+ if (timeval == 0)
+ timeval = time (NULL);
+
+ *resources = ((struct res_directory *)
+ res_alloc (sizeof **resources));
+ (*resources)->characteristics = 0;
+ (*resources)->time = timeval;
+ (*resources)->major = 0;
+ (*resources)->minor = 0;
+ (*resources)->entries = NULL;
+ }
+
+ for (pp = &(*resources)->entries; *pp != NULL; pp = &(*pp)->next)
+ if (res_id_cmp ((*pp)->id, ids[i]) == 0)
+ break;
+
+ if (*pp != NULL)
+ re = *pp;
+ else
+ {
+ re = (struct res_entry *) res_alloc (sizeof *re);
+ re->next = NULL;
+ re->id = ids[i];
+ if ((i + 1) < cids)
+ {
+ re->subdir = 1;
+ re->u.dir = NULL;
+ }
+ else
+ {
+ re->subdir = 0;
+ re->u.res = NULL;
+ }
+
+ *pp = re;
+ }
+
+ if ((i + 1) < cids)
+ {
+ if (!re->subdir)
+ {
+ fprintf (stderr, "%s: ", program_name);
+ res_ids_print (stderr, i, ids);
+ fprintf (stderr, ": expected to be a directory\n");
+ xexit (1);
+ }
+
+ resources = &re->u.dir;
+ }
+ }
+
+ if (re->subdir)
+ {
+ fprintf (stderr, "%s: ", program_name);
+ res_ids_print (stderr, cids, ids);
+ fprintf (stderr, ": expected to be a leaf\n");
+ xexit (1);
+ }
+
+ if (re->u.res != NULL)
+ {
+ if (dupok)
+ return;
+
+ fprintf (stderr, "%s: warning: ", program_name);
+ res_ids_print (stderr, cids, ids);
+ fprintf (stderr, ": duplicate value\n");
+ }
+
+ re->u.res = resource;
+}
diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c
index 60d67ee..070834b 100644
--- a/contrib/binutils/binutils/size.c
+++ b/contrib/binutils/binutils/size.c
@@ -1,5 +1,6 @@
/* size.c -- report size of various sections of an executable file.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -75,17 +76,17 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, "\
+ fprintf (stream, _("\
Usage: %s [-ABdoxV] [--format=berkeley|sysv] [--radix=8|10|16]\n\
- [--target=bfdname] [--version] [--help] [file...]\n", program_name);
+ [--target=bfdname] [--version] [--help] [file...]\n"), program_name);
#if BSD_DEFAULT
- fputs ("default is --format=berkeley\n", stream);
+ fputs (_("default is --format=berkeley\n"), stream);
#else
- fputs ("default is --format=sysv\n", stream);
+ fputs (_("default is --format=sysv\n"), stream);
#endif
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -107,6 +108,12 @@ main (argc, argv)
int temp;
int c;
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = *argv;
xmalloc_set_program_name (program_name);
@@ -129,7 +136,7 @@ main (argc, argv)
berkeley_format = 0;
break;
default:
- fprintf (stderr, "invalid argument to --format: %s\n", optarg);
+ non_fatal (_("invalid argument to --format: %s"), optarg);
usage (stderr, 1);
}
break;
@@ -156,7 +163,7 @@ main (argc, argv)
radix = hex;
break;
default:
- printf ("Invalid radix: %s\n", optarg);
+ non_fatal (_("Invalid radix: %s\n"), optarg);
usage (stderr, 1);
}
break;
@@ -359,9 +366,9 @@ static bfd_size_type textsize;
static void
berkeley_sum (abfd, sec, ignore)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
flagword flags;
bfd_size_type size;
@@ -426,9 +433,9 @@ int svi_sizelen = 0;
static void
sysv_internal_sizer (file, sec, ignore)
- bfd *file;
+ bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec)
@@ -447,9 +454,9 @@ sysv_internal_sizer (file, sec, ignore)
static void
sysv_internal_printer (file, sec, ignore)
- bfd *file;
+ bfd *file ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
if (!bfd_is_abs_section (sec)
diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c
index 930005f..c317d98 100644
--- a/contrib/binutils/binutils/srconv.c
+++ b/contrib/binutils/binutils/srconv.c
@@ -1,5 +1,5 @@
/* srconv.c -- Sysroff conversion program
- Copyright (C) 1994, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -66,16 +66,6 @@ static int ids2[20000];
static int base1 = 0x18;
static int base2 = 0x2018;
-char *
-xcalloc (a, b)
- int a;
- int b;
-{
- char *r = xmalloc (a * b);
- memset (r, 0, a * b);
- return r;
-}
-
static int
get_member_id (x)
int x;
@@ -1886,14 +1876,14 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, "Usage: %s [-dhVq] in-file [out-file]\n", program_name);
+ fprintf (file, _("Usage: %s [-dhVq] in-file [out-file]\n"), program_name);
exit (status);
}
static void
show_help ()
{
- printf ("%s: Convert a COFF object file into a SYSROFF object file\n",
+ printf (_("%s: Convert a COFF object file into a SYSROFF object file\n"),
program_name);
show_usage (stdout, 0);
}
@@ -1917,8 +1907,14 @@ main (ac, av)
};
char **matching;
char *input_file;
-
char *output_file;
+
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = av[0];
xmalloc_set_program_name (program_name);
@@ -1941,7 +1937,7 @@ main (ac, av)
show_help ();
/*NOTREACHED */
case 'V':
- printf ("GNU %s version %s\n", program_name, PROGRAM_VERSION);
+ printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION);
exit (0);
/*NOTREACHED */
case 0:
@@ -1966,10 +1962,7 @@ main (ac, av)
show_usage (stderr, 1);
if (strcmp (input_file, output_file) == 0)
{
- fprintf (stderr,
- "%s: input and output files must be different\n",
- program_name);
- exit (1);
+ fatal (_("input and output files must be different"));
}
}
}
@@ -1978,9 +1971,7 @@ main (ac, av)
if (!input_file)
{
- fprintf (stderr, "%s: no input file specified\n",
- program_name);
- exit (1);
+ fatal (_("no input file specified"));
}
if (!output_file)
@@ -2025,9 +2016,7 @@ main (ac, av)
if (!file)
{
- fprintf (stderr, "%s: unable to open output file %s\n",
- program_name, output_file);
- exit (1);
+ fatal (_("unable to open output file %s"), output_file);
}
if (debug)
diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c
index ce85bfe..8c20ed3 100644
--- a/contrib/binutils/binutils/stabs.c
+++ b/contrib/binutils/binutils/stabs.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse stabs debugging information
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -40,6 +40,14 @@
#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
@@ -97,6 +105,9 @@ struct stab_handle
debug_type xcoff_types[XCOFF_TYPE_COUNT];
/* Undefined tags. */
struct stab_tag *tags;
+ /* Set by parse_stab_type if it sees a structure defined as a cross
+ reference to itself. Reset by parse_stab_type otherwise. */
+ boolean self_crossref;
};
/* A list of these structures is used to hold pending variable
@@ -243,7 +254,14 @@ parse_number (pp, poverflow)
errno = 0;
ul = strtoul (*pp, (char **) pp, 0);
if (ul + 1 != 0 || errno == 0)
- return (bfd_vma) ul;
+ {
+ /* If bfd_vma is larger than unsigned long, and the number is
+ meant to be negative, we have to make sure that we sign
+ extend properly. */
+ if (*orig == '-')
+ return (bfd_vma) (bfd_signed_vma) (long) ul;
+ return (bfd_vma) ul;
+ }
/* Note that even though strtoul overflowed, it should have set *pp
to the end of the number, which is where we want it. */
@@ -328,7 +346,7 @@ parse_number (pp, poverflow)
if (poverflow != NULL)
*poverflow = true;
else
- warn_stab (orig, "numeric overflow");
+ warn_stab (orig, _("numeric overflow"));
return 0;
}
@@ -339,7 +357,7 @@ static void
bad_stab (p)
const char *p;
{
- fprintf (stderr, "Bad stab: %s\n", p);
+ fprintf (stderr, _("Bad stab: %s\n"), p);
}
/* Warn about something in a stab string. */
@@ -349,7 +367,7 @@ warn_stab (p, err)
const char *p;
const char *err;
{
- fprintf (stderr, "Warning: %s: %s\n", err, p);
+ fprintf (stderr, _("Warning: %s: %s\n"), err, p);
}
/* Create a handle to parse stabs symbols with. */
@@ -357,7 +375,7 @@ warn_stab (p, err)
/*ARGSUSED*/
PTR
start_stab (dhandle, abfd, sections, syms, symcount)
- PTR dhandle;
+ PTR dhandle ATTRIBUTE_UNUSED;
bfd *abfd;
boolean sections;
asymbol **syms;
@@ -471,7 +489,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
if (! info->within_function)
{
- fprintf (stderr, "N_LBRAC not within function\n");
+ fprintf (stderr, _("N_LBRAC not within function\n"));
return false;
}
@@ -510,7 +528,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
--info->block_depth;
if (info->block_depth < 0)
{
- fprintf (stderr, "Too many N_RBRACs\n");
+ fprintf (stderr, _("Too many N_RBRACs\n"));
return false;
}
break;
@@ -539,7 +557,8 @@ parse_stab (dhandle, handle, type, desc, value, string)
return true;
/* Just accumulate strings until we see a non N_SO symbol. If
- the string starts with '/', we discard the previously
+ the string starts with a directory separator or some other
+ form of absolute path specification, we discard the previously
accumulated strings. */
if (info->so_string == NULL)
info->so_string = xstrdup (string);
@@ -548,7 +567,13 @@ parse_stab (dhandle, handle, type, desc, value, string)
char *f;
f = info->so_string;
- if (*string == '/')
+
+ if ( (string[0] == '/')
+ || (string[0] == DIR_SEPARATOR)
+ || ( (DIR_SEPARATOR == '\\')
+ && (string[1] == ':')
+ && ( (string[2] == DIR_SEPARATOR)
+ || (string[2] == '/'))))
info->so_string = xstrdup (string);
else
info->so_string = concat (info->so_string, string,
@@ -703,6 +728,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
int type;
debug_type dtype;
boolean synonym;
+ boolean self_crossref;
unsigned int lineno;
debug_type *slot;
@@ -751,7 +777,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
/* SunPRO (3.0 at least) static variable encoding. */
break;
default:
- warn_stab (string, "unknown C++ encoded name");
+ warn_stab (string, _("unknown C++ encoded name"));
break;
}
}
@@ -1035,6 +1061,11 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (name == NULL)
return true;
+ /* INFO->SELF_CROSSREF is set by parse_stab_type if this type is
+ a cross reference to itself. These are generated by some
+ versions of g++. */
+ self_crossref = info->self_crossref;
+
dtype = debug_tag_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
return false;
@@ -1042,21 +1073,23 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
*slot = dtype;
/* See if we have a cross reference to this tag which we can now
- fill in. */
- {
- register struct stab_tag **pst;
+ fill in. Avoid filling in a cross reference to ourselves,
+ because that would lead to circular debugging information. */
+ if (! self_crossref)
+ {
+ register struct stab_tag **pst;
- for (pst = &info->tags; *pst != NULL; pst = &(*pst)->next)
- {
- if ((*pst)->name[0] == name[0]
- && strcmp ((*pst)->name, name) == 0)
- {
- (*pst)->slot = dtype;
- *pst = (*pst)->next;
- break;
- }
- }
- }
+ for (pst = &info->tags; *pst != NULL; pst = &(*pst)->next)
+ {
+ if ((*pst)->name[0] == name[0]
+ && strcmp ((*pst)->name, name) == 0)
+ {
+ (*pst)->slot = dtype;
+ *pst = (*pst)->next;
+ break;
+ }
+ }
+ }
if (synonym)
{
@@ -1157,6 +1190,8 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
size = -1;
stringp = false;
+ info->self_crossref = false;
+
/* Read type number if present. The type number may be omitted.
for instance in a two-dimensional array declared with type
"ar1;1;10;ar1;1;10;4". */
@@ -1268,7 +1303,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
default:
/* Complain and keep going, so compilers can invent new
cross-reference types. */
- warn_stab (orig, "unrecognized cross reference type");
+ warn_stab (orig, _("unrecognized cross reference type"));
code = DEBUG_KIND_STRUCT;
break;
}
@@ -1281,20 +1316,36 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
bad_stab (orig);
return DEBUG_TYPE_NULL;
}
- while (q1 != NULL && p > q1 && p[1] == ':')
+ if (q1 != NULL && p > q1 && p[1] == ':')
{
- q2 = strchr (q1, '>');
- if (q2 == NULL || q2 < p)
- break;
- p += 2;
- p = strchr (p, ':');
- if (p == NULL)
+ int nest = 0;
+
+ for (q2 = q1; *q2 != '\0'; ++q2)
+ {
+ if (*q2 == '<')
+ ++nest;
+ else if (*q2 == '>')
+ --nest;
+ else if (*q2 == ':' && nest == 0)
+ break;
+ }
+ p = q2;
+ if (*p != ':')
{
bad_stab (orig);
return DEBUG_TYPE_NULL;
}
}
+ /* Some versions of g++ can emit stabs like
+ fleep:T20=xsfleep:
+ which define structures in terms of themselves. We need to
+ tell the caller to avoid building a circular structure. */
+ if (typename != NULL
+ && strncmp (typename, *pp, p - *pp) == 0
+ && typename[p - *pp] == '\0')
+ info->self_crossref = true;
+
dtype = stab_find_tagged_type (dhandle, info, *pp, p - *pp, code);
*pp = p + 1;
@@ -1588,7 +1639,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
if (size != -1)
{
if (! debug_record_type_size (dhandle, dtype, (unsigned int) size))
- return false;
+ return DEBUG_TYPE_NULL;
}
return dtype;
@@ -1715,7 +1766,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
return debug_make_int_type (dhandle, 8, true);
}
- warn_stab (orig, "numeric overflow");
+ warn_stab (orig, _("numeric overflow"));
}
if (index_type == DEBUG_TYPE_NULL)
@@ -1767,15 +1818,18 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
return debug_make_int_type (dhandle, 1, true);
else if (n3 == 0xffff)
return debug_make_int_type (dhandle, 2, true);
- /* -1 is used for the upper bound of (4 byte) "unsigned int"
- and "unsigned long", and we already checked for that, so
- don't need to test for it here. */
+ 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))
+ return debug_make_int_type (dhandle, 8, true);
+#endif
}
else if (n3 == 0
&& n2 < 0
&& (self_subrange || n2 == -8))
return debug_make_int_type (dhandle, - n2, true);
- else if (n2 == - n3 - 1)
+ else if (n2 == - n3 - 1 || n2 == n3 + 1)
{
if (n3 == 0x7f)
return debug_make_int_type (dhandle, 1, false);
@@ -1783,6 +1837,10 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
return debug_make_int_type (dhandle, 2, false);
else if (n3 == 0x7fffffff)
return debug_make_int_type (dhandle, 4, false);
+#ifdef BFD64
+ else if (n3 == ((((bfd_vma) 0x7fffffff) << 32) | 0xffffffff))
+ return debug_make_int_type (dhandle, 8, false);
+#endif
}
}
@@ -1800,7 +1858,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
{
/* Does this actually ever happen? Is that why we are worrying
about dealing with it rather than just calling error_type? */
- warn_stab (orig, "missing index type");
+ warn_stab (orig, _("missing index type"));
index_type = debug_make_int_type (dhandle, 4, false);
}
@@ -2127,7 +2185,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
virtual = true;
break;
default:
- warn_stab (orig, "unknown virtual character for baseclass");
+ warn_stab (orig, _("unknown virtual character for baseclass"));
virtual = false;
break;
}
@@ -2145,7 +2203,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
visibility = DEBUG_VISIBILITY_PUBLIC;
break;
default:
- warn_stab (orig, "unknown visibility character for baseclass");
+ warn_stab (orig, _("unknown visibility character for baseclass"));
visibility = DEBUG_VISIBILITY_PUBLIC;
break;
}
@@ -2337,13 +2395,13 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
typename = debug_get_type_name (dhandle, context);
if (typename == NULL)
{
- warn_stab (orig, "unnamed $vb type");
+ warn_stab (orig, _("unnamed $vb type"));
typename = "FOO";
}
name = concat ("_vb$", typename, (const char *) NULL);
break;
default:
- warn_stab (orig, "unrecognized C++ abbreviation");
+ warn_stab (orig, _("unrecognized C++ abbreviation"));
name = "INVALID_CPLUSPLUS_ABBREV";
break;
}
@@ -2423,7 +2481,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
visibility = DEBUG_VISIBILITY_PUBLIC;
break;
default:
- warn_stab (orig, "unknown visibility character for field");
+ warn_stab (orig, _("unknown visibility character for field"));
visibility = DEBUG_VISIBILITY_PUBLIC;
break;
}
@@ -2679,7 +2737,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
/* File compiled with g++ version 1; no information. */
break;
default:
- warn_stab (orig, "const/volatile indicator missing");
+ warn_stab (orig, _("const/volatile indicator missing"));
break;
}
@@ -2919,7 +2977,7 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
opname = cplus_mangle_opname (fieldname + 3, 0);
if (opname == NULL)
{
- fprintf (stderr, "No mangling for \"%s\"\n", fieldname);
+ fprintf (stderr, _("No mangling for \"%s\"\n"), fieldname);
return DEBUG_TYPE_NULL;
}
mangled_name_len += strlen (opname);
@@ -3073,7 +3131,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
/* If the index type is type 0, we take it as int. */
p = *pp;
if (! parse_stab_type_number (&p, typenums))
- return false;
+ return DEBUG_TYPE_NULL;
if (typenums[0] == 0 && typenums[1] == 0 && **pp != '=')
{
index_type = debug_find_named_type (dhandle, "int");
@@ -3081,7 +3139,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
{
index_type = debug_make_int_type (dhandle, 4, false);
if (index_type == DEBUG_TYPE_NULL)
- return false;
+ return DEBUG_TYPE_NULL;
}
*pp = p;
}
@@ -3110,7 +3168,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return DEBUG_TYPE_NULL;
}
++*pp;
@@ -3124,14 +3182,14 @@ parse_stab_array_type (dhandle, info, pp, stringp)
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return DEBUG_TYPE_NULL;
}
++*pp;
element_type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (element_type == DEBUG_TYPE_NULL)
- return false;
+ return DEBUG_TYPE_NULL;
if (adjustable)
{
@@ -3232,7 +3290,7 @@ find_excl (info, name, hash)
break;
if (l == NULL)
{
- warn_stab (name, "Undefined N_EXCL");
+ warn_stab (name, _("Undefined N_EXCL"));
info->file_types[info->files - 1] = NULL;
return true;
}
@@ -3320,12 +3378,12 @@ stab_find_slot (info, typenums)
if (filenum < 0 || (unsigned int) filenum >= info->files)
{
- fprintf (stderr, "Type file number %d out of range\n", filenum);
+ fprintf (stderr, _("Type file number %d out of range\n"), filenum);
return NULL;
}
if (index < 0)
{
- fprintf (stderr, "Type index number %d out of range\n", index);
+ fprintf (stderr, _("Type index number %d out of range\n"), index);
return NULL;
}
@@ -3381,7 +3439,7 @@ stab_find_type (dhandle, info, typenums)
static boolean
stab_record_type (dhandle, info, typenums, type)
- PTR dhandle;
+ PTR dhandle ATTRIBUTE_UNUSED;
struct stab_handle *info;
const int *typenums;
debug_type type;
@@ -3412,7 +3470,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT)
{
- fprintf (stderr, "Unrecognized XCOFF type %d\n", typenum);
+ fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum);
return DEBUG_TYPE_NULL;
}
if (info->xcoff_types[-typenum] != NULL)
@@ -3689,7 +3747,7 @@ static boolean stab_demangle_signature
static boolean stab_demangle_qualified
PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
static boolean stab_demangle_template
- PARAMS ((struct stab_demangle_info *, const char **));
+ PARAMS ((struct stab_demangle_info *, const char **, char **));
static boolean stab_demangle_class
PARAMS ((struct stab_demangle_info *, const char **, const char **));
static boolean stab_demangle_args
@@ -3711,7 +3769,7 @@ static void
stab_bad_demangle (s)
const char *s;
{
- fprintf (stderr, "bad mangled name `%s'\n", s);
+ fprintf (stderr, _("bad mangled name `%s'\n"), s);
}
/* Get a count from a stab string. */
@@ -3807,7 +3865,7 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs)
minfo.typestrings = NULL;
if (minfo.args == NULL)
- fprintf (stderr, "no argument types in mangled string\n");
+ fprintf (stderr, _("no argument types in mangled string\n"));
*pvarargs = minfo.varargs;
return minfo.args;
@@ -4008,7 +4066,7 @@ stab_demangle_signature (minfo, pp)
/* Template. */
if (hold == NULL)
hold = *pp;
- if (! stab_demangle_template (minfo, pp)
+ if (! stab_demangle_template (minfo, pp, (char **) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
return false;
hold = NULL;
@@ -4117,10 +4175,21 @@ stab_demangle_qualified (minfo, pp, ptype)
++*pp;
if (**pp == 't')
{
- /* FIXME: I don't know how to handle the ptype != NULL case
- here. */
- if (! stab_demangle_template (minfo, pp))
+ char *name;
+
+ if (! stab_demangle_template (minfo, pp,
+ ptype != NULL ? &name : NULL))
return false;
+
+ if (ptype != NULL)
+ {
+ context = stab_find_tagged_type (minfo->dhandle, minfo->info,
+ name, strlen (name),
+ DEBUG_KIND_CLASS);
+ free (name);
+ if (context == DEBUG_TYPE_NULL)
+ return false;
+ }
}
else
{
@@ -4178,7 +4247,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (context == DEBUG_TYPE_NULL)
{
- /* We have to fall back on finding the type by name.
+ /* We have to fall back on finding the type by name.
If there are more types to come, then this must
be a class. Otherwise, it could be anything. */
@@ -4216,12 +4285,14 @@ stab_demangle_qualified (minfo, pp, ptype)
return true;
}
-/* Demangle a template. */
+/* Demangle a template. If PNAME is not NULL, this sets *PNAME to a
+ string representation of the template. */
static boolean
-stab_demangle_template (minfo, pp)
+stab_demangle_template (minfo, pp, pname)
struct stab_demangle_info *minfo;
const char **pp;
+ char **pname;
{
const char *orig;
unsigned int r, i;
@@ -4395,6 +4466,46 @@ stab_demangle_template (minfo, pp)
}
}
+ /* We can translate this to a string fairly easily by invoking the
+ regular demangling routine. */
+ if (pname != NULL)
+ {
+ char *s1, *s2, *s3, *s4;
+ char *from, *to;
+
+ s1 = savestring (orig, *pp - orig);
+
+ s2 = concat ("NoSuchStrinG__", s1, (const char *) NULL);
+
+ free (s1);
+
+ s3 = cplus_demangle (s2, DMGL_ANSI);
+
+ free (s2);
+
+ if (s3 != NULL)
+ s4 = strstr (s3, "::NoSuchStrinG");
+ if (s3 == NULL || s4 == NULL)
+ {
+ stab_bad_demangle (orig);
+ if (s3 != NULL)
+ free (s3);
+ return false;
+ }
+
+ /* Eliminating all spaces, except those between > characters,
+ makes it more likely that the demangled name will match the
+ name which g++ used as the structure name. */
+ for (from = to = s3; from != s4; ++from)
+ if (*from != ' '
+ || (from[1] == '>' && from > s3 && from[-1] == '>'))
+ *to++ = *from;
+
+ *pname = savestring (s3, to - s3);
+
+ free (s3);
+ }
+
return true;
}
@@ -4402,7 +4513,7 @@ stab_demangle_template (minfo, pp)
static boolean
stab_demangle_class (minfo, pp, pstart)
- struct stab_demangle_info *minfo;
+ struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
const char **pp;
const char **pstart;
{
@@ -4681,6 +4792,7 @@ stab_demangle_type (minfo, pp, ptype)
case 'O':
{
boolean memberp, constp, volatilep;
+ debug_type class_type = DEBUG_TYPE_NULL;
debug_type *args;
boolean varargs;
unsigned int n;
@@ -4693,19 +4805,40 @@ stab_demangle_type (minfo, pp, ptype)
varargs = false;
++*pp;
- if (! isdigit ((unsigned char) **pp))
+ if (isdigit ((unsigned char) **pp))
{
- stab_bad_demangle (orig);
- return false;
+ n = stab_demangle_count (pp);
+ if (strlen (*pp) < n)
+ {
+ stab_bad_demangle (orig);
+ return false;
+ }
+ name = *pp;
+ *pp += n;
+
+ if (ptype != NULL)
+ {
+ class_type = stab_find_tagged_type (minfo->dhandle,
+ minfo->info,
+ name, (int) n,
+ DEBUG_KIND_CLASS);
+ if (class_type == DEBUG_TYPE_NULL)
+ return false;
+ }
}
- n = stab_demangle_count (pp);
- if (strlen (*pp) < n)
+ else if (**pp == 'Q')
+ {
+ if (! stab_demangle_qualified (minfo, pp,
+ (ptype == NULL
+ ? (debug_type *) NULL
+ : &class_type)))
+ return false;
+ }
+ else
{
stab_bad_demangle (orig);
return false;
}
- name = *pp;
- *pp += n;
if (memberp)
{
@@ -4747,14 +4880,6 @@ stab_demangle_type (minfo, pp, ptype)
if (ptype != NULL)
{
- debug_type class_type;
-
- class_type = stab_find_tagged_type (minfo->dhandle, minfo->info,
- name, (int) n,
- DEBUG_KIND_CLASS);
- if (class_type == DEBUG_TYPE_NULL)
- return false;
-
if (! memberp)
*ptype = debug_make_offset_type (minfo->dhandle, class_type,
*ptype);
@@ -5009,6 +5134,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
name = savestring (hold, *pp - hold);
*ptype = debug_find_named_type (minfo->dhandle, name);
+ free (name);
if (*ptype == DEBUG_TYPE_NULL)
{
/* FIXME: It is probably incorrect to assume that
@@ -5016,29 +5142,30 @@ stab_demangle_fund_type (minfo, pp, ptype)
*ptype = stab_find_tagged_type (minfo->dhandle, minfo->info,
hold, *pp - hold,
DEBUG_KIND_ILLEGAL);
+ if (*ptype == DEBUG_TYPE_NULL)
+ return false;
}
- free (name);
}
}
break;
case 't':
- if (! stab_demangle_template (minfo, pp))
- return false;
- if (ptype != NULL)
- {
- debug_type t;
-
- /* FIXME: I really don't know how a template should be
- represented in the current type system. Perhaps the
- template should be demangled into a string, and the type
- should be represented as a named type. However, I don't
- know what the base type of the named type should be. */
- t = debug_make_void_type (minfo->dhandle);
- t = debug_make_pointer_type (minfo->dhandle, t);
- t = debug_name_type (minfo->dhandle, "TEMPLATE", t);
- *ptype = t;
- }
+ {
+ char *name;
+
+ if (! stab_demangle_template (minfo, pp,
+ ptype != NULL ? &name : NULL))
+ return false;
+ if (ptype != NULL)
+ {
+ *ptype = stab_find_tagged_type (minfo->dhandle, minfo->info,
+ name, strlen (name),
+ DEBUG_KIND_CLASS);
+ free (name);
+ if (*ptype == DEBUG_TYPE_NULL)
+ return false;
+ }
+ }
break;
default:
diff --git a/contrib/binutils/binutils/strings.1 b/contrib/binutils/binutils/strings.1
index 408de29..4d33b79 100644
--- a/contrib/binutils/binutils/strings.1
+++ b/contrib/binutils/binutils/strings.1
@@ -1,6 +1,6 @@
-.\" Copyright (c) 1993 Free Software Foundation
+.\" Copyright (c) 1993, 94, 95, 2000 Free Software Foundation
.\" See section COPYING for conditions for redistribution
-.TH strings 1 "25 June 1993" "cygnus support" "GNU Development Tools"
+.TH strings 1 "09 March 2000" "cygnus support" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
@@ -90,7 +90,7 @@ on the standard output and exit.
.TP
.B "\-\fImin\-len\fP"
.TP
-.B "\-bytes=\fImin\-len\fP"
+.B "\-\-bytes=\fImin\-len\fP"
Print sequences of characters that are at least
.I min\-len
characters long, instead of the default 4.
diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c
index d6a011b..ab845b0 100644
--- a/contrib/binutils/binutils/strings.c
+++ b/contrib/binutils/binutils/strings.c
@@ -1,5 +1,6 @@
/* strings -- print the strings of printable characters in files
- Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -122,6 +123,12 @@ main (argc, argv)
int exit_status = 0;
boolean files_given = false;
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = argv[0];
xmalloc_set_program_name (program_name);
string_min = -1;
@@ -150,9 +157,7 @@ main (argc, argv)
string_min = integer_arg (optarg);
if (string_min < 1)
{
- fprintf (stderr, "%s: invalid number %s\n",
- program_name, optarg);
- exit (1);
+ fatal (_("invalid number %s"), optarg);
}
break;
@@ -197,7 +202,7 @@ main (argc, argv)
default:
if (string_min < 0)
- string_min = optc;
+ string_min = optc - '0';
else
string_min = string_min * 10 + optc - '0';
break;
@@ -485,8 +490,7 @@ integer_arg (s)
if (*p)
{
- fprintf (stderr, "%s: invalid integer argument %s\n", program_name, s);
- exit (1);
+ fatal (_("invalid integer argument %s"), s);
}
return value;
}
@@ -496,13 +500,13 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, "\
+ fprintf (stream, _("\
Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n\
[--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n\
- [--target=bfdname] [--help] [--version] file...\n",
+ [--target=bfdname] [--help] [--version] file...\n"),
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/strip.1 b/contrib/binutils/binutils/strip.1
index 7974612..708817d 100644
--- a/contrib/binutils/binutils/strip.1
+++ b/contrib/binutils/binutils/strip.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH strip 1 "5 November 1991" "cygnus support" "GNU Development Tools"
.de BP
@@ -150,7 +150,7 @@ other than \fB\-K\fR.
.B \-\-verbose
Verbose output: list all object files modified. In the case of
archives,
-.B "strip \-V"
+.B "strip \-v"
lists all members of the archive.
.TP
diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c
index 870857c..fd2a0ea 100644
--- a/contrib/binutils/binutils/sysdump.c
+++ b/contrib/binutils/binutils/sysdump.c
@@ -1,5 +1,5 @@
/* Sysroff object format dumper.
- Copyright (C) 1994, 95, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -41,16 +41,6 @@ static int code;
static int addrsize = 4;
static FILE *file;
-static char *
-xcalloc (a, b)
- int a;
- int b;
-{
- char *r = xmalloc (a * b);
- memset (r, 0, a * b);
- return r;
-}
-
char *
getCHARS (ptr, idx, size, max)
unsigned char *ptr;
@@ -719,14 +709,14 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, "Usage: %s [-hV] in-file\n", program_name);
+ fprintf (file, _("Usage: %s [-hV] in-file\n"), program_name);
exit (status);
}
static void
show_help ()
{
- printf ("%s: Print a human readable interpretation of a SYSROFF object file\n",
+ printf (_("%s: Print a human readable interpretation of a SYSROFF object file\n"),
program_name);
show_usage (stdout, 0);
}
@@ -745,6 +735,12 @@ main (ac, av)
{NULL, no_argument, 0, 0}
};
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = av[0];
xmalloc_set_program_name (program_name);
@@ -756,7 +752,7 @@ main (ac, av)
show_help ();
/*NOTREACHED*/
case 'V':
- printf ("GNU %s version %s\n", program_name, PROGRAM_VERSION);
+ printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION);
exit (0);
/*NOTREACHED*/
case 0:
@@ -776,17 +772,13 @@ main (ac, av)
if (!input_file)
{
- fprintf (stderr, "%s: no input file specified\n",
- program_name);
- exit (1);
+ fatal (_("no input file specified"));
}
file = fopen (input_file, FOPEN_RB);
if (!file)
{
- fprintf (stderr, "%s: cannot open input file %s\n",
- program_name, input_file);
- exit (1);
+ fatal (_("cannot open input file %s"), input_file);
}
module ();
diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c
index ab6b819..cb893cf 100644
--- a/contrib/binutils/binutils/version.c
+++ b/contrib/binutils/binutils/version.c
@@ -1,5 +1,5 @@
/* version.c -- binutils version information
- Copyright 1991, 1996 Free Software Foundation, Inc.
+ Copyright 1991, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -34,10 +34,11 @@ print_version (name)
const char *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 Free Software Foundation, Inc.\n");
- printf ("\
+ printf (_("Copyright 1997, 98, 99, 2000 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");
+the GNU General Public License. This program has absolutely no warranty.\n"));
exit (0);
}
diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c
index 9c1f91d..c74af2e 100644
--- a/contrib/binutils/binutils/wrstabs.c
+++ b/contrib/binutils/binutils/wrstabs.c
@@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -363,8 +363,8 @@ stab_write_symbol (info, type, desc, value, string)
h = string_hash_lookup (&info->strhash, string, true, true);
if (h == NULL)
{
- fprintf (stderr, "string_hash_lookup failed: %s\n",
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("string_hash_lookup failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return false;
}
if (h->index != -1)
@@ -505,8 +505,8 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
if (! bfd_hash_table_init (&info.strhash.table, string_hash_newfunc)
|| ! bfd_hash_table_init (&info.typedef_hash.table, string_hash_newfunc))
{
- fprintf (stderr, "bfd_hash_table_init_failed: %s\n",
- bfd_errmsg (bfd_get_error ()));
+ non_fatal ("bfd_hash_table_init_failed: %s",
+ bfd_errmsg (bfd_get_error ()));
return false;
}
@@ -663,7 +663,7 @@ stab_int_type (p, size, unsignedp)
if (size <= 0 || (size > sizeof (long) && size != 8))
{
- fprintf (stderr, "stab_int_type: bad size %u\n", size);
+ non_fatal (_("stab_int_type: bad size %u"), size);
return false;
}
@@ -984,7 +984,7 @@ static boolean
stab_function_type (p, argcount, varargs)
PTR p;
int argcount;
- boolean varargs;
+ boolean varargs ATTRIBUTE_UNUSED;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
int i;
@@ -1464,9 +1464,8 @@ stab_struct_field (p, name, bitpos, bitsize, visibility)
{
bitsize = size * 8;
if (bitsize == 0)
- fprintf (stderr,
- "%s: warning: unknown size for field `%s' in struct\n",
- bfd_get_filename (info->abfd), name);
+ non_fatal (_("%s: warning: unknown size for field `%s' in struct"),
+ bfd_get_filename (info->abfd), name);
}
sprintf (n, "%s%s:%s%s,%ld,%ld;", info->type_stack->fields, name, vis, s,
@@ -2025,8 +2024,8 @@ stab_typdef (p, name)
h = string_hash_lookup (&info->typedef_hash, name, true, false);
if (h == NULL)
{
- fprintf (stderr, "string_hash_lookup failed: %s\n",
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("string_hash_lookup failed: %s"),
+ bfd_errmsg (bfd_get_error ()));
return false;
}
@@ -2383,7 +2382,7 @@ stab_end_block (p, addr)
/*ARGSUSED*/
static boolean
stab_end_function (p)
- PTR p;
+ PTR p ATTRIBUTE_UNUSED;
{
return true;
}
diff --git a/contrib/binutils/config-ml.in b/contrib/binutils/config-ml.in
index 527e781..503f7cf 100644
--- a/contrib/binutils/config-ml.in
+++ b/contrib/binutils/config-ml.in
@@ -72,14 +72,16 @@
# We have to handle being invoked by both Cygnus configure and Autoconf.
#
# Cygnus configure incoming variables:
-# srcdir, subdir, target, arguments
+# srcdir, subdir, host, arguments
#
# Autoconf incoming variables:
-# srcdir, target, ac_configure_args
+# srcdir, host, ac_configure_args
#
-# We *could* figure srcdir and target out, but we'd have to do work that
+# We *could* figure srcdir and host out, but we'd have to do work that
# our caller has already done to figure them out and requiring these two
# seems reasonable.
+# Note that `host' in this case is GCC's `target'. Target libraries are
+# configured for a particular host.
if [ -n "${ac_configure_args}" ]; then
Makefile=${ac_file-Makefile}
@@ -99,6 +101,7 @@ fi
# Scan all the arguments and set all the ones we need.
+ml_verbose=--verbose
for option in ${ml_arguments}
do
case $option in
@@ -128,6 +131,9 @@ do
--norecursion | --no*)
ml_norecursion=yes
;;
+ --silent | --sil* | --quiet | --q*)
+ ml_verbose=--silent
+ ;;
--verbose | --v | --verb*)
ml_verbose=--verbose
;;
@@ -200,7 +206,10 @@ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
fi
done
-case "${target}" in
+# Target libraries are configured for the host they run on, so we check
+# $host here, not $target.
+
+case "${host}" in
arc-*-elf*)
if [ x$enable_biendian != xyes ]
then
@@ -214,6 +223,64 @@ arc-*-elf*)
done
fi
;;
+arm-*-*)
+ if [ x"$enable_fpu" = xno ]
+ then
+ old_multidirs=${multidirs}
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "${x}" in
+ *fpu*) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ if [ x"$enable_26bit" = xno ]
+ then
+ old_multidirs=${multidirs}
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "${x}" in
+ *26bit*) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ if [ x"$enable_underscore" = xno ]
+ then
+ old_multidirs=${multidirs}
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "${x}" in
+ *under*) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ if [ x"$enable_interwork" = xno ]
+ then
+ old_multidirs=${multidirs}
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "${x}" in
+ *interwork*) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ if [ x$enable_biendian = xno ]
+ then
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *le* ) : ;;
+ *be* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ ;;
m68*-*-*)
if [ x$enable_softfloat = xno ]
then
@@ -564,6 +631,13 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
fi
(cd ${ml_dir}/${ml_libdir};
../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
+ if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then
+ if [ x"${MAKE}" = x ]; then
+ (cd ${ml_dir}/${ml_libdir}; make distclean)
+ else
+ (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)
+ fi
+ fi
ml_newsrcdir="."
ml_srcdiroption=
multisrctop=${dotdot}
diff --git a/contrib/binutils/config.guess b/contrib/binutils/config.guess
index 583439e..20c971a 100755
--- a/contrib/binutils/config.guess
+++ b/contrib/binutils/config.guess
@@ -1,6 +1,7 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
#
# 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
@@ -22,7 +23,7 @@
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <config-patches@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -35,6 +36,20 @@
# (but try to keep the structure clean).
#
+# 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
+
+
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
@@ -46,11 +61,49 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+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
+ *:NetBSD:*:*)
+ # Netbsd (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ # Determine the machine/vendor (is the vendor relevant).
+ case "${UNAME_MACHINE}" in
+ amiga) machine=m68k-cbm ;;
+ arm32) machine=arm-unknown ;;
+ atari*) machine=m68k-atari ;;
+ sun3*) machine=m68k-sun ;;
+ mac68k) machine=m68k-apple ;;
+ macppc) machine=powerpc-apple ;;
+ hp3[0-9][05]) machine=m68k-hp ;;
+ 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 OS release
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -59,46 +112,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- cat <<EOF >dummy.s
+ cat <<EOF >$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,0,\$26,0
- .prologue 0
- .long 0x47e03d80 # implver $0
- lda \$2,259
- .long 0x47e20c21 # amask $2,$1
- srl \$1,8,\$2
- sll \$2,2,\$2
- sll \$0,3,\$0
- addl \$1,\$0,\$0
- addl \$2,\$0,\$0
- ret \$31,(\$26),1
+ .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
- ${CC-cc} dummy.s -o dummy 2>/dev/null
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
- ./dummy
- case "$?" in
- 7)
+ case `./$dummy` in
+ 0-0)
UNAME_MACHINE="alpha"
;;
- 15)
+ 1-0)
UNAME_MACHINE="alphaev5"
;;
- 14)
+ 1-1)
UNAME_MACHINE="alphaev56"
;;
- 10)
+ 1-101)
UNAME_MACHINE="alphapca56"
;;
- 16)
+ 2-303)
UNAME_MACHINE="alphaev6"
;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
esac
fi
- rm -f dummy.s dummy
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
@@ -106,12 +175,12 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
- amiga:NetBSD:*:*)
- echo m68k-cbm-netbsd${UNAME_RELEASE}
- exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -130,16 +199,16 @@ EOF
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
- arm32:NetBSD:*:*)
- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
- Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
@@ -147,9 +216,12 @@ EOF
echo pyramid-pyramid-bsd
fi
exit 0 ;;
- NILE:*:*:dcosx)
+ NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -189,21 +261,38 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
- atari*:NetBSD:*:*)
- echo m68k-atari-netbsd${UNAME_RELEASE}
- exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- sun3*:NetBSD:*:*)
- echo m68k-sun-netbsd${UNAME_RELEASE}
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- mac68k:NetBSD:*:*)
- echo m68k-apple-netbsd${UNAME_RELEASE}
- exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -225,12 +314,17 @@ EOF
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
- 2020:CLIX:*:*)
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- sed 's/^ //' << EOF >dummy.c
- int main (argc, argv) int argc; char **argv; {
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -245,10 +339,10 @@ EOF
exit (-1);
}
EOF
- ${CC-cc} 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
+ $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
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -266,15 +360,18 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
echo m88k-dg-dgux${UNAME_RELEASE}
- else
+ else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
fi
- else echo i586-dg-dgux${UNAME_RELEASE}
- fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
@@ -300,7 +397,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- sed 's/^ //' << EOF >dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
main()
@@ -311,8 +408,8 @@ EOF
exit(0);
}
EOF
- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $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
echo rs6000-ibm-aix3.2.4
@@ -321,7 +418,8 @@ EOF
fi
exit 0 ;;
*:AIX:*:4)
- if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+ 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
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -339,7 +437,7 @@ EOF
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
@@ -354,23 +452,50 @@ EOF
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
- 9000/[3478]??:HP-UX:*:*)
+ 9000/[34678]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/6?? ) HP_ARCH=hppa1.0 ;;
- 9000/78? ) HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
- 9000/7?? ) HP_ARCH=hppa1.1 ;;
- 9000/8[67]1 | 9000/80[24] | 9000/8[78]9 | 9000/893 )
- HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
- 9000/8?[13679] ) HP_ARCH=hppa1.1 ;;
- 9000/8?? ) HP_ARCH=hppa1.0 ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
- sed 's/^ //' << EOF >dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
main ()
@@ -395,8 +520,8 @@ EOF
exit (0);
}
EOF
- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -405,6 +530,9 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
@@ -421,6 +549,9 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -451,45 +582,66 @@ EOF
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE}
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alpha-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:*:*)
- FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
+ 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}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
- hp3[0-9][05]:NetBSD:*:*)
- echo m68k-hp-netbsd${UNAME_RELEASE}
- exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- i?86:BSD/386:*:* | *:BSD/OS:*:*)
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
*:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
- *:NetBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin32
+ echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin32
+ echo powerpcle-unknown-cygwin
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -498,15 +650,11 @@ EOF
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
- # uname on the ARM produces all sorts of strangeness, and we need to
- # filter it out.
- case "$UNAME_MACHINE" in
- arm* | sa110*) UNAME_MACHINE="arm" ;;
- esac
# The BFD linker knows what the default object file format is, so
- # first see if it will tell us.
- ld_help_string=`ld --help 2>&1`
+ # 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
@@ -514,14 +662,41 @@ EOF
s/ .*//
p'`
case "$ld_supported_emulations" in
- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
- 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 ;;
- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
- elf32ppc)
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
+ ;;
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ 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 <<EOF
+ cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
@@ -540,71 +715,85 @@ main(argc, argv)
}
EOF
LIBC=""
- ${CC-cc} dummy.c -o dummy 2>/dev/null
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then
- ./dummy | grep 1\.99 > /dev/null
+ ./$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 ;;
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
- sed 's/^ //' <<EOF >dummy.s
- .globl main
- .ent main
- main:
- .frame \$30,0,\$26,0
- .prologue 0
- .long 0x47e03d80 # implver $0
- lda \$2,259
- .long 0x47e20c21 # amask $2,$1
- srl \$1,8,\$2
- sll \$2,2,\$2
- sll \$0,3,\$0
- addl \$1,\$0,\$0
- addl \$2,\$0,\$0
- ret \$31,(\$26),1
- .end main
+ cat <<EOF >$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-cc} dummy.s -o dummy 2>/dev/null
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
- ./dummy
- case "$?" in
- 7)
+ case `./$dummy` in
+ 0-0)
UNAME_MACHINE="alpha"
;;
- 15)
+ 1-0)
UNAME_MACHINE="alphaev5"
;;
- 14)
+ 1-1)
UNAME_MACHINE="alphaev56"
;;
- 10)
+ 1-101)
UNAME_MACHINE="alphapca56"
;;
- 16)
+ 2-303)
UNAME_MACHINE="alphaev6"
;;
- esac
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ esac
- objdump --private-headers dummy | \
+ objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
- fi
- rm -f dummy.s dummy
+ fi
+ rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
- cat >dummy.c <<EOF
-main(argc, argv)
- int argc;
- char *argv[];
-{
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h> /* 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
@@ -614,8 +803,10 @@ main(argc, argv)
return 0;
}
EOF
- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $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
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
@@ -634,12 +825,14 @@ EOF
;;
esac
# Determine whether the default compiler is a.out or elf
- cat >dummy.c <<EOF
+ cat >$dummy.c <<EOF
#include <features.h>
-main(argc, argv)
- int argc;
- char *argv[];
-{
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
@@ -656,8 +849,8 @@ main(argc, argv)
return 0;
}
EOF
- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
- rm -f dummy.c dummy
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
fi ;;
# 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.
@@ -673,19 +866,22 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
- i?86:*:5:7)
- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
- exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -695,12 +891,20 @@ EOF
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
+ i?86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
pc:*:*:*)
+ # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
@@ -741,7 +945,7 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i?86:LynxOS:2.*:*)
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
@@ -753,6 +957,9 @@ EOF
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
@@ -783,7 +990,7 @@ EOF
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
- R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
@@ -796,12 +1003,36 @@ EOF
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Mac*OS:*:*)
+ echo powerpc-apple-macos${UNAME_RELEASE}
+ exit 0 ;;
+ *:Mac*OS:*:*)
+ echo ${UNAME_MACHINE}-apple-macos${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-qnx-qnx${UNAME_VERSION}
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-cat >dummy.c <<EOF
+cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
@@ -839,7 +1070,10 @@ main ()
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
@@ -899,8 +1133,8 @@ main ()
}
EOF
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
diff --git a/contrib/binutils/config.sub b/contrib/binutils/config.sub
index 5d135ab..5d75624 100755
--- a/contrib/binutils/config.sub
+++ b/contrib/binutils/config.sub
@@ -1,6 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
+#
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -25,6 +27,9 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+# Written by Per Bothner <bothner@cygnus.com>.
+# Please send patches to <config-patches@gnu.org>.
+#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
@@ -64,18 +69,6 @@ case $1 in
;;
esac
-# CYGNUS LOCAL marketing-names
-# Here we handle any "marketing" names - translating them to
-# standard triplets
-case $1 in
- mips-tx39-elf)
- set mipstx39-unknown-elf
- ;;
- *)
- ;;
-esac
-# END CYGNUS LOCAL marketing-names
-
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
@@ -110,21 +103,21 @@ case $os in
os=
basic_machine=$1
;;
- -sim | -cisco | -oki | -wec | -winbond ) # CYGNUS LOCAL
+ -sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
- -scout) # CYGNUS LOCAL
+ -scout)
;;
- -wrs) # CYGNUS LOCAL
- os=vxworks
+ -wrs)
+ os=-vxworks
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
- os=sco3.2v5
+ os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
@@ -143,6 +136,9 @@ case $os in
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -165,54 +161,38 @@ case $os in
-psos*)
os=-psos
;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | pyramid | mn10200 | mn10300 \
- | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
- | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
+ | alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
- | 1750a | dsp16xx | pdp11 \
- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
- | mipstx39 | mipstx39el \
- | sparc | sparclet | sparclite | sparc64 | v850)
+ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el | mcore \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | thumb | d10v | fr30 | avr)
basic_machine=$basic_machine-unknown
;;
- m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
- basic_machine=$basic_machine-unknown
- ;;
- thumb)
- basic_machine=$basic_machine-unknown
- ;;
- mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
- basic_machine=$basic_machine-unknown
- ;;
- mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
- basic_machine=$basic_machine-unknown
- ;;
- mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
- basic_machine=$basic_machine-unknown
- ;;
- mips16) # CYGNUS LOCAL krk/mips16
- basic_machine=$basic_machine-unknown
- ;;
- tic30) # CYGNUS LOCAL ian/tic30
- basic_machine=$basic_machine-unknown
- ;;
- c30) # CYGNUS LOCAL ian/tic30
- basic_machine=tic30-unknown
- ;;
- d10v) # CYGNUS LOCAL meissner/d10v
- basic_machine=$basic_machine-unknown
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
;;
+
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
- i[3456]86)
+ i[34567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -221,40 +201,29 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
- vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ # FIXME: clean up the formatting here.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
- | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
- | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
- | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
- | xps100-* | clipper-* | orion-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
+ | alphaev6[78]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
- | sparc64-* | mips64-* | mipsel-* \
+ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
- | mipstx39-* | mipstx39el-* \
- | f301-*)
- ;;
- m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
- ;;
- thumb-*) # CYGNUS LOCAL angela/thumb
- ;;
- v850-*) # CYGNUS LOCAL
- ;;
- mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
- ;;
- mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
- ;;
- mips16-*) # CYGNUS LOCAL krk/mips16
- ;;
- tic30-*) # CYGNUS LOCAL ian/tic30
- ;;
- c30-*) # CYGNUS LOCAL ian/tic30
- basic_machine=tic30-unknown
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* | mcore-* \
+ | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd) # CYGNUS LOCAL
+ 386bsd)
basic_machine=i386-unknown
os=-bsd
;;
@@ -264,11 +233,11 @@ case $basic_machine in
3b*)
basic_machine=we32k-att
;;
- a29khif) # CYGNUS LOCAL
+ a29khif)
basic_machine=a29k-amd
os=-udi
;;
- adobe68k) # CYGNUS LOCAL
+ adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
@@ -289,9 +258,9 @@ case $basic_machine in
amiga | amiga-*)
basic_machine=m68k-cbm
;;
- amigados)
+ amigaos | amigados)
basic_machine=m68k-cbm
- os=-amigados
+ os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
@@ -301,7 +270,7 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-sysv
;;
- apollo68bsd) # CYGNUS LOCAL
+ apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
@@ -381,7 +350,7 @@ case $basic_machine in
encore | umax | mmax)
basic_machine=ns32k-encore
;;
- es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
+ es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
@@ -403,11 +372,11 @@ case $basic_machine in
basic_machine=h8300-hitachi
os=-hms
;;
- h8300xray) # CYGNUS LOCAL
+ h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
- h8500hms) # CYGNUS LOCAL
+ h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
@@ -426,44 +395,30 @@ case $basic_machine in
basic_machine=m68k-hp
os=-hpux
;;
- w89k-*) # CYGNUS LOCAL
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- op50n-*) # CYGNUS LOCAL
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- op60c-*) # CYGNUS LOCAL
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- hppro) # CYGNUS LOCAL
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9] )
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9] )
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
- hp9k78[0-9] | hp78[0-9] )
+ hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
- hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
- hp9k8[0-9][13679] | hp8[0-9][13679] )
+ hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -472,40 +427,43 @@ case $basic_machine in
hppa-next)
os=-nextstep3
;;
- hppaosf) # CYGNUS LOCAL
+ hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
- os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i[3456]86v32)
+ i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
- i[3456]86v4*)
+ i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
- i[3456]86v)
+ i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
- i[3456]86sol2)
+ i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
- i386mach) # CYGNUS LOCAL
+ i386mach)
basic_machine=i386-mach
os=-mach
;;
- i386-vsta | vsta) # CYGNUS LOCAL
+ i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
- i386-go32 | go32) # CYGNUS LOCAL
+ i386-go32 | go32)
basic_machine=i386-unknown
os=-go32
;;
@@ -513,6 +471,9 @@ case $basic_machine in
basic_machine=i386-unknown
os=-mingw32
;;
+ i386-qnx | qnx)
+ basic_machine=i386-qnx
+ ;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -541,6 +502,10 @@ case $basic_machine in
miniframe)
basic_machine=m68000-convergent
;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
@@ -555,22 +520,34 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
- monitor) # CYGNUS LOCAL
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
basic_machine=m68k-rom68k
os=-coff
;;
- msdos) # CYGNUS LOCAL
- basic_machine=i386-unknown
+ msdos)
+ basic_machine=i386-unknown
os=-msdos
;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
- basic_machine=i386-unknown # CYGNUS LOCAL
+ basic_machine=i386-unknown
os=-netbsd
;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
@@ -583,7 +560,7 @@ case $basic_machine in
basic_machine=mips-sony
os=-newsos
;;
- necv70) # CYGNUS LOCAL
+ necv70)
basic_machine=v70-nec
os=-sysv
;;
@@ -612,18 +589,22 @@ case $basic_machine in
basic_machine=i960-intel
os=-nindy
;;
- mon960) # CYGNUS LOCAL
+ mon960)
basic_machine=i960-intel
os=-mon960
;;
np1)
basic_machine=np1-gould
;;
- OSE68000 | ose68000) # CYGNUS LOCAL
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
- os68k) # CYGNUS LOCAL
+ os68k)
basic_machine=m68k-none
os=-os68k
;;
@@ -644,25 +625,23 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5)
- basic_machine=i586-intel
+ pentium | p5 | k5 | k6 | nexen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86)
+ basic_machine=i686-pc
;;
- pentiumpro | p6)
- basic_machine=i686-intel
+ pentiumii | pentium2)
+ basic_machine=i786-pc
;;
- pentium-* | p5-*)
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumpro-* | p6-*)
+ pentiumpro-* | p6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- k5)
- # We don't have specific support for AMD's K5 yet, so just call it a Pentium
- basic_machine=i586-amd
- ;;
- nexen)
- # We don't have specific support for Nexgen yet, so just call it a Pentium
- basic_machine=i586-nexgen
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -682,7 +661,7 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
- rom68k) # CYGNUS LOCAL
+ rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
@@ -692,7 +671,7 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
- sa29200) # CYGNUS LOCAL
+ sa29200)
basic_machine=a29k-amd
os=-udi
;;
@@ -703,7 +682,7 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
- sparclite-wrs) # CYGNUS LOCAL
+ sparclite-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -714,10 +693,10 @@ case $basic_machine in
spur)
basic_machine=spur-unknown
;;
- st2000) # CYGNUS LOCAL
+ st2000)
basic_machine=m68k-tandem
;;
- stratus) # CYGNUS LOCAL
+ stratus)
basic_machine=i860-stratus
os=-sysv4
;;
@@ -761,10 +740,18 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -782,7 +769,7 @@ case $basic_machine in
basic_machine=a29k-nyu
os=-sym1
;;
- v810 | necv810) # CYGNUS LOCAL
+ v810 | necv810)
basic_machine=v810-nec
os=-none
;;
@@ -809,9 +796,13 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
- w65*) # CYGNUS LOCAL
- basic_machine=w65-wdc
- os=-none
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
;;
xmp)
basic_machine=xmp-cray
@@ -820,7 +811,7 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
- z8k-*-coff) # CYGNUS LOCAL
+ z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
@@ -831,13 +822,13 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
- w89k) # CYGNUS LOCAL
+ w89k)
basic_machine=hppa1.1-winbond
;;
- op50n) # CYGNUS LOCAL
+ op50n)
basic_machine=hppa1.1-oki
;;
- op60c) # CYGNUS LOCAL
+ op60c)
basic_machine=hppa1.1-oki
;;
mips)
@@ -862,7 +853,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sparc)
+ sparc | sparcv9)
basic_machine=sparc-sun
;;
cydra)
@@ -874,12 +865,16 @@ case $basic_machine in
orion105)
basic_machine=clipper-highlevel
;;
- mac | mpw | mac-mpw) # CYGNUS LOCAL
+ mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
- pmac | pmac-mpw) # CYGNUS LOCAL
+ pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@@ -912,9 +907,12 @@ case $os in
-solaris)
os=-solaris2
;;
- -unixware* | svr4*)
+ -svr4*)
os=-sysv4
;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
@@ -925,26 +923,26 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv*)
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- # CYGNUS LOCAL
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
- | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
- # END CYGNUS LOCAL
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -954,6 +952,12 @@ case $os in
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
-osfrose*)
os=-osfrose
;;
@@ -969,7 +973,7 @@ case $os in
-acis*)
os=-aos
;;
- -386bsd) # CYGNUS LOCAL
+ -386bsd)
os=-bsd
;;
-ctix* | -uts*)
@@ -991,6 +995,9 @@ case $os in
-oss*)
os=-sysv3
;;
+ -qnx)
+ os=-qnx4
+ ;;
-svr4)
os=-sysv4
;;
@@ -1003,15 +1010,18 @@ case $os in
# This must come after -sysvr4.
-sysv*)
;;
- -ose*) # CYGNUS LOCAL
+ -ose*)
os=-ose
;;
- -es1800*) # CYGNUS LOCAL
+ -es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
+ -*mint | -*MiNT)
+ os=-mint
+ ;;
-none)
;;
*)
@@ -1037,6 +1047,9 @@ case $basic_machine in
*-acorn)
os=-riscix1.2
;;
+ arm*-rebel)
+ os=-linux
+ ;;
arm*-semi)
os=-aout
;;
@@ -1058,34 +1071,34 @@ case $basic_machine in
# default.
# os=-sunos4
;;
- m68*-cisco) # CYGNUS LOCAL
+ m68*-cisco)
os=-aout
;;
- mips*-cisco) # CYGNUS LOCAL
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
os=-elf
;;
- mips*-*) # CYGNUS LOCAL
- os=-elf
- ;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
- *-be) # CYGNUS LOCAL
+ *-be)
os=-beos
;;
*-ibm)
os=-aix
;;
- *-wec) # CYGNUS LOCAL
+ *-wec)
os=-proelf
;;
- *-winbond) # CYGNUS LOCAL
+ *-winbond)
os=-proelf
;;
- *-oki) # CYGNUS LOCAL
+ *-oki)
os=-proelf
;;
*-hp)
@@ -1098,7 +1111,7 @@ case $basic_machine in
os=-sysv
;;
*-cbm)
- os=-amigados
+ os=-amigaos
;;
*-dg)
os=-dgux
@@ -1151,15 +1164,18 @@ case $basic_machine in
f301-fujitsu)
os=-uxpv
;;
- *-rom68k) # CYGNUS LOCAL
+ *-rom68k)
os=-coff
;;
- *-*bug) # CYGNUS LOCAL
+ *-*bug)
os=-coff
;;
- *-apple) # CYGNUS LOCAL
+ *-apple)
os=-macos
;;
+ *-atari*)
+ os=-mint
+ ;;
*)
os=-none
;;
@@ -1181,12 +1197,15 @@ case $basic_machine in
-aix*)
vendor=ibm
;;
- -beos*) # CYGNUS LOCAL
+ -beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
+ -mpeix*)
+ vendor=hp
+ ;;
-hiux*)
vendor=hitachi
;;
@@ -1202,7 +1221,7 @@ case $basic_machine in
-genix*)
vendor=ns
;;
- -mvs*)
+ -mvs* | -opened*)
vendor=ibm
;;
-ptx*)
@@ -1214,12 +1233,15 @@ case $basic_machine in
-aux*)
vendor=apple
;;
- -hms*) # CYGNUS LOCAL
+ -hms*)
vendor=hitachi
;;
- -mpw* | -macos*) # CYGNUS LOCAL
+ -mpw* | -macos*)
vendor=apple
;;
+ -*mint | -*MiNT)
+ vendor=atari
+ ;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
diff --git a/contrib/binutils/config/ChangeLog b/contrib/binutils/config/ChangeLog
index 6d8a429..b5746b1 100644
--- a/contrib/binutils/config/ChangeLog
+++ b/contrib/binutils/config/ChangeLog
@@ -1,3 +1,89 @@
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * mh-i370pic: New file.
+ * mt-i370pic: New file.
+
+2000-02-22 Nick Clifton <nickc@cygnus.com>
+
+ * config/mt-wince: new file: Makefile fragment for WinCE targets.
+
+2000-01-06 Geoff Keating <geoffk@cygnus.com>
+
+ * mh-aix43: Delete, move to mt-aix43.
+ * mt-aix43: New file.
+
+1999-04-07 Michael Meissner <meissner@cygnus.com>
+
+ * mt-d30v: New file, pass -g -Os -Wa,-C as default options.
+
+1999-02-08 Syd Polk <spolk@cygnus.com>
+
+ * acinclude.m4: Added macros to find itcl files.
+ Export TCL_CFLAGS from tclConfig.sh.
+ Export TCL_LIB_FULL_PATH, TK_LIB_FULL_PATH, ITCL_LIB_FULL_PATH,
+ ITK_LIB_FULL_PATH, and TIX_LIB_FULL_PATH
+ Replace TIX macros with better ones from snavigator.
+
+Tue Feb 2 22:51:21 1999 Philip Blundell <philb@gnu.org>
+
+ * mh-armpic: New file. Patch from Jim Pick <jim@jimpick.com>.
+ * mt-armpic: Likewise.
+
+Mon Jan 18 19:41:08 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * cygwin.mh: Activate commented out dependencies for
+ gdb: libtermcap.
+
+Wed Nov 18 20:29:46 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * cygwin.mh: Add extra libtermcap target information.
+ Add commented out dependency for gdb to libtermcap for
+ future readline requirement.
+
+Mon Nov 2 15:15:33 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * mh-cygwin32: delete
+ * mh-cygwin: was mh-cygwin32
+
+1998-10-26 Syd Polk <spolk@cygnus.com>
+
+ * acinclude.m4: TCLHDIR and TKHDIR need to be run through
+ cygpath for Microsoft builds.
+
+1998-10-20 Syd Polk <spolk@cygnus.com>
+
+ * acinclude.m4: Re-exported TCL_LIBS and TCL_LD_SEARCH_FLAGS
+ because itcl needs them.
+
+Mon Aug 31 17:50:53 1998 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * mh-aix43 (NM_FOR_TARGET): Add -X32_64 as well.
+
+Sat Aug 29 14:32:55 1998 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * mh-aix43: New file.
+
+Mon Aug 10 00:15:47 1998 HJ Lu (hjl@gnu.org)
+
+ * mt-linux (CXXFLAGS_FOR_TARGET): Add -D_GNU_SOURCE.
+
+1998-05-29 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * acinclude.m4: New collection of generic autoconf macros.
+
+Wed Apr 22 12:24:28 1998 Michael Meissner <meissner@cygnus.com>
+
+ * mt-ospace: New file, support using -Os instead of -O2 to compile
+ the libraries.
+
+Wed Apr 22 10:53:14 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * mt-linux (CXXFLAGS_FOR_TARGET): Set this instead of CXXFLAGS.
+
+Sat Apr 11 22:43:17 1998 J. Kean Johnston <jkj@sco.com>
+
+ * mh-svsv5: New file - support for SCO UnixWare 7 / SVR5.
+
Thu Mar 26 01:54:25 1998 Geoffrey Noer <noer@cygnus.com>
* mh-cygwin32: stop configuring and building dosrel.
diff --git a/contrib/binutils/config/acinclude.m4 b/contrib/binutils/config/acinclude.m4
new file mode 100755
index 0000000..f799ced
--- /dev/null
+++ b/contrib/binutils/config/acinclude.m4
@@ -0,0 +1,1994 @@
+dnl This file is included into all any other acinclude file that needs
+dnl to use these macros.
+
+dnl This is copied from autoconf 2.12, but does calls our own AC_PROG_CC_WORKS,
+dnl and doesn't call AC_PROG_CXX_GNU, cause we test for that in AC_PROG_CC_WORKS.
+dnl We are probably using a cross compiler, which will not be able to fully
+dnl link an executable. This should really be fixed in autoconf itself.
+dnl Find a working G++ cross compiler. This only works for the GNU C++ compiler.
+AC_DEFUN(CYG_AC_PROG_CXX_CROSS,
+[AC_BEFORE([$0], [AC_PROG_CXXCPP])
+AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
+
+CYG_AC_PROG_GXX_WORKS
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+dnl Check whether -g works, even if CXXFLAGS is set, in case the package
+dnl plays around with CXXFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS=
+ AC_PROG_CXX_G
+ if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ elif test $ac_cv_prog_cxx_g = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-O2"
+ fi
+else
+ GXX=
+ test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+fi
+])
+
+dnl See if the G++ compiler we found works.
+AC_DEFUN(CYG_AC_PROG_GXX_WORKS,
+[AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually works])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+dnl Try a test case. We only compile, because it's close to impossible
+dnl to get a correct fully linked executable with a cross compiler. For
+dnl most cross compilers, this test is bogus. For G++, we can use various
+dnl other compile line options to get a decent idea that the cross compiler
+dnl actually does work, even though we can't produce an executable without
+dnl more info about the target it's being compiled for. This only works
+dnl for the GNU C++ compiler.
+
+dnl Transform the name of the compiler to it's cross variant, unless
+dnl CXX is set. This is also what CXX gets set to in the generated
+dnl Makefile.
+if test x"${CXX}" = xc++ ; then
+ CXX=`echo gcc | sed -e "${program_transform_name}"`
+fi
+
+dnl Get G++'s full path to libgcc.a
+libgccpath=`${CXX} --print-libgcc`
+
+dnl If we don't have a path with libgcc.a on the end, this isn't G++.
+if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+
+dnl If we are using G++, look for the files that need to exist if this
+dnl compiler works.
+if test x"${ac_cv_prog_gxx}" = xyes ; then
+ gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'`
+ if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then
+ gccfiles=yes
+ else
+ gccfiles=no
+ fi
+ gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib
+ if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then
+ gcclibs=yes
+ else
+ gcclibs=no
+ fi
+fi
+
+dnl If everything is OK, then we can safely assume the compiler works.
+if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then
+ ac_cv_prog_cxx_works=no
+ AC_MSG_ERROR(${CXX} is a non-working cross compiler)
+else
+ ac_cv_prog_cxx_works=yes
+fi
+
+AC_LANG_RESTORE
+AC_MSG_RESULT($ac_cv_prog_cxx_works)
+if test x"$ac_cv_prog_cxx_works" = xno; then
+ AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
+fi
+AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler])
+AC_MSG_RESULT($ac_cv_prog_cxx_cross)
+cross_compiling=$ac_cv_prog_cxx_cross
+AC_SUBST(CXX)
+])
+
+dnl ====================================================================
+dnl Find a working GCC cross compiler. This only works for the GNU gcc compiler.
+dnl This is based on the macros above for G++.
+AC_DEFUN(CYG_AC_PROG_CC_CROSS,
+[AC_BEFORE([$0], [AC_PROG_CCPP])
+AC_CHECK_PROGS(CC, cc, gcc)
+
+CYG_AC_PROG_GCC_WORKS
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+dnl Check whether -g works, even if CFLAGS is set, in case the package
+dnl plays around with CFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ AC_PROG_CC_G
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GXX=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+])
+
+dnl See if the GCC compiler we found works.
+AC_DEFUN(CYG_AC_PROG_GCC_WORKS,
+[AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) actually works])
+AC_LANG_SAVE
+AC_LANG_C
+dnl Try a test case. We only compile, because it's close to impossible
+dnl to get a correct fully linked executable with a cross
+dnl compiler. For most cross compilers, this test is bogus. For G++,
+dnl we can use various other compile line options to get a decent idea
+dnl that the cross compiler actually does work, even though we can't
+dnl produce an executable without more info about the target it's
+dnl being compiled for. This only works for the GNU C++ compiler.
+
+dnl Transform the name of the compiler to it's cross variant, unless
+dnl CXX is set. This is also what CC gets set to in the generated Makefile.
+if test x"${CC}" = xcc ; then
+ CC=`echo gcc | sed -e "${program_transform_name}"`
+fi
+
+dnl Get Gcc's full path to libgcc.a
+libgccpath=`${CC} --print-libgcc`
+
+dnl If we don't have a path with libgcc.a on the end, this isn't G++.
+if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+
+dnl If we are using Gcc, look for the files that need to exist if this
+dnl compiler works.
+if test x"${ac_cv_prog_gcc}" = xyes ; then
+ gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'`
+ if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then
+ gccfiles=yes
+ else
+ gccfiles=no
+ fi
+ gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib
+ if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then
+ gcclibs=yes
+ else
+ gcclibs=no
+ fi
+fi
+
+dnl If everything is OK, then we can safely assume the compiler works.
+if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then
+ ac_cv_prog_cc_works=no
+ AC_MSG_ERROR(${CC} is a non-working cross compiler)
+else
+ ac_cv_prog_cc_works=yes
+fi
+
+AC_LANG_RESTORE
+AC_MSG_RESULT($ac_cv_prog_cc_works)
+if test x"$ac_cv_prog_cc_works" = xno; then
+ AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
+fi
+AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
+AC_MSG_RESULT($ac_cv_prog_cc_cross)
+cross_compiling=$ac_cv_prog_cc_cross
+AC_SUBST(CC)
+])
+
+dnl ====================================================================
+dnl Find the BFD library in the build tree. This is used to access and
+dnl manipulate object or executable files.
+AC_DEFUN(CYG_AC_PATH_BFD, [
+AC_MSG_CHECKING(for the bfd header in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+dnl Look for the header file
+AC_CACHE_VAL(ac_cv_c_bfdh,[
+for i in $dirlist; do
+ if test -f "$i/bfd/bfd.h" ; then
+ ac_cv_c_bfdh=`(cd $i/bfd; pwd)`
+ break
+ fi
+done
+])
+if test x"${ac_cv_c_bfdh}" != x; then
+ BFDHDIR="-I${ac_cv_c_bfdh}"
+ AC_MSG_RESULT(${ac_cv_c_bfdh})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(BFDHDIR)
+
+dnl Look for the library
+AC_MSG_CHECKING(for the bfd library in the build tree)
+AC_CACHE_VAL(ac_cv_c_bfdlib,[
+for i in $dirlist; do
+ if test -f "$i/bfd/Makefile" ; then
+ ac_cv_c_bfdlib=`(cd $i/bfd; pwd)`
+ fi
+done
+])
+dnl We list two directories cause bfd now uses libtool
+if test x"${ac_cv_c_bfdlib}" != x; then
+ BFDLIB="-L${ac_cv_c_bfdlib} -L${ac_cv_c_bfdlib}/.libs"
+ AC_MSG_RESULT(${ac_cv_c_bfdlib})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(BFDLIB)
+])
+
+dnl ====================================================================
+dnl Find the libiberty library. This defines many commonly used C
+dnl functions that exists in various states based on the underlying OS.
+AC_DEFUN(CYG_AC_PATH_LIBERTY, [
+AC_MSG_CHECKING(for the liberty library in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_liberty,[
+for i in $dirlist; do
+ if test -f "$i/libiberty/Makefile" ; then
+ ac_cv_c_liberty=`(cd $i/libiberty; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_liberty}" != x; then
+ LIBERTY="-L${ac_cv_c_liberty}"
+ AC_MSG_RESULT(${ac_cv_c_liberty})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(LIBERTY)
+])
+
+dnl ====================================================================
+dnl Find the opcodes library. This is used to do dissasemblies.
+AC_DEFUN(CYG_AC_PATH_OPCODES, [
+AC_MSG_CHECKING(for the opcodes library in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_opc,[
+for i in $dirlist; do
+ if test -f "$i/opcodes/Makefile" ; then
+ ac_cv_c_opc=`(cd $i/opcodes; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_opc}" != x; then
+ OPCODESLIB="-L${ac_cv_c_opc}"
+ AC_MSG_RESULT(${ac_cv_c_opc})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(OPCODESLIB)
+])
+
+dnl ====================================================================
+dnl Look for the DejaGnu header file in the source tree. This file
+dnl defines the functions used to testing support.
+AC_DEFUN(CYG_AC_PATH_DEJAGNU, [
+AC_MSG_CHECKING(for the testing support files in the source tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_dejagnu,[
+for i in $dirlist; do
+ if test -f "$srcdir/$i/ecc/ecc/infra/testlib/current/include/dejagnu.h" ; then
+ ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_dejagnu}" != x; then
+ DEJAGNUHDIR="-I${ac_cv_c_dejagnu}"
+ AC_MSG_RESULT(${ac_cv_c_dejagnu})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_CACHE_VAL(ac_cv_c_dejagnulib,[
+for i in $dirlist; do
+ if test -f "$srcdir/$i/infra/testlib/current/lib/hostutil.exp" ; then
+ ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_dejagnulib}" != x; then
+ DEJAGNULIB="${ac_cv_c_dejagnulib}"
+else
+ DEJAGNULIB=""
+fi
+AC_MSG_CHECKING(for runtest in the source tree)
+AC_CACHE_VAL(ac_cv_c_runtest,[
+for i in $dirlist; do
+ if test -f "$srcdir/$i/dejagnu/runtest" ; then
+ ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_runtest}" != x; then
+ RUNTESTDIR="${ac_cv_c_runtest}"
+ AC_MSG_RESULT(${ac_cv_c_runtest})
+else
+ RUNTESTDIR=""
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(RUNTESTDIR)
+AC_SUBST(DEJAGNULIB)
+AC_SUBST(DEJAGNUHDIR)
+])
+
+dnl ====================================================================
+dnl Find the libintl library in the build tree. This is for
+dnl internationalization support.
+AC_DEFUN(CYG_AC_PATH_INTL, [
+AC_MSG_CHECKING(for the intl header in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+dnl Look for the header file
+AC_CACHE_VAL(ac_cv_c_intlh,[
+for i in $dirlist; do
+ if test -f "$i/intl/libintl.h" ; then
+ ac_cv_c_intlh=`(cd $i/intl; pwd)`
+ break
+ fi
+done
+])
+if test x"${ac_cv_c_intlh}" != x; then
+ INTLHDIR="-I${ac_cv_c_intlh}"
+ AC_MSG_RESULT(${ac_cv_c_intlh})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(INTLHDIR)
+
+dnl Look for the library
+AC_MSG_CHECKING(for the libintl library in the build tree)
+AC_CACHE_VAL(ac_cv_c_intllib,[
+for i in $dirlist; do
+ if test -f "$i/intl/Makefile" ; then
+ ac_cv_c_intllib=`(cd $i/intl; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_intllib}" != x; then
+ INTLLIB="-L${ac_cv_c_intllib} -lintl"
+ AC_MSG_RESULT(${ac_cv_c_intllib})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(INTLLIB)
+])
+
+dnl ====================================================================
+dnl Find the simulator library.
+AC_DEFUN(CYG_AC_PATH_SIM, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.. ../../../../../../../../../.."
+case "$target_cpu" in
+ powerpc) target_dir=ppc ;;
+ sparc*) target_dir=erc32 ;;
+ mips*) target_dir=mips ;;
+ *) target_dir=$target_cpu ;;
+esac
+dnl First look for the header file
+AC_MSG_CHECKING(for the simulator header file)
+AC_CACHE_VAL(ac_cv_c_simh,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/include/remote-sim.h" ; then
+ ac_cv_c_simh=`(cd ${srcdir}/$i/include; pwd)`
+ break
+ fi
+done
+])
+if test x"${ac_cv_c_simh}" != x; then
+ SIMHDIR="-I${ac_cv_c_simh}"
+ AC_MSG_RESULT(${ac_cv_c_simh})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(SIMHDIR)
+
+dnl See whether it's a devo or Foundry branch simulator
+AC_MSG_CHECKING(Whether this is a devo simulator )
+AC_CACHE_VAL(ac_cv_c_simdevo,[
+ CPPFLAGS="$CPPFLAGS $SIMHDIR"
+ AC_EGREP_HEADER([SIM_DESC sim_open.*struct _bfd], remote-sim.h,
+ ac_cv_c_simdevo=yes,
+ ac_cv_c_simdevo=no)
+])
+if test x"$ac_cv_c_simdevo" = x"yes" ; then
+ AC_DEFINE(HAVE_DEVO_SIM)
+fi
+AC_MSG_RESULT(${ac_cv_c_simdevo})
+AC_SUBST(HAVE_DEVO_SIM)
+
+dnl Next look for the library
+AC_MSG_CHECKING(for the simulator library)
+AC_CACHE_VAL(ac_cv_c_simlib,[
+for i in $dirlist; do
+ if test -f "$i/sim/$target_dir/Makefile" ; then
+ ac_cv_c_simlib=`(cd $i/sim/$target_dir; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_simlib}" != x; then
+ SIMLIB="-L${ac_cv_c_simlib}"
+else
+ AC_MSG_RESULT(none)
+ dnl FIXME: this is kinda bogus, cause umtimately the TM will build
+ dnl all the libraries for several architectures. But for now, this
+ dnl will work till then.
+dnl AC_MSG_CHECKING(for the simulator installed with the compiler libraries)
+ dnl Transform the name of the compiler to it's cross variant, unless
+ dnl CXX is set. This is also what CXX gets set to in the generated
+ dnl Makefile.
+ CROSS_GCC=`echo gcc | sed -e "s/^/$target/"`
+
+ dnl Get G++'s full path to libgcc.a
+changequote(,)
+ gccpath=`${CROSS_GCC} --print-libgcc | sed -e 's:[a-z0-9A-Z\.\-]*/libgcc.a::' -e 's:lib/gcc-lib/::'`lib
+changequote([,])
+ if test -f $gccpath/libsim.a -o -f $gccpath/libsim.so ; then
+ ac_cv_c_simlib="$gccpath/"
+ SIMLIB="-L${ac_cv_c_simlib}"
+ AC_MSG_RESULT(${ac_cv_c_simlib})
+ else
+ AM_CONDITIONAL(PSIM, test x$psim = xno)
+ SIMLIB=""
+ AC_MSG_RESULT(none)
+dnl ac_cv_c_simlib=none
+ fi
+fi
+AC_SUBST(SIMLIB)
+])
+
+dnl ====================================================================
+dnl Find the libiberty library.
+AC_DEFUN(CYG_AC_PATH_LIBIBERTY, [
+AC_MSG_CHECKING(for the libiberty library in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_libib,[
+for i in $dirlist; do
+ if test -f "$i/libiberty/Makefile" ; then
+ ac_cv_c_libib=`(cd $i/libiberty/; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_libib}" != x; then
+ LIBIBERTY="-L${ac_cv_c_libib}"
+ AC_MSG_RESULT(${ac_cv_c_libib})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(LIBIBERTY)
+])
+
+dnl ====================================================================
+AC_DEFUN(CYG_AC_PATH_DEVO, [
+AC_MSG_CHECKING(for devo headers in the source tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_devoh,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/include/remote-sim.h" ; then
+ ac_cv_c_devoh=`(cd ${srcdir}/$i/include; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_devoh}" != x; then
+ DEVOHDIR="-I${ac_cv_c_devoh}"
+ AC_MSG_RESULT(${ac_cv_c_devoh})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(DEVOHDIR)
+])
+
+dnl ====================================================================
+dnl find the IDE library and headers.
+AC_DEFUN(CYG_AC_PATH_IDE, [
+AC_MSG_CHECKING(for IDE headers in the source tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+IDEHDIR=
+IDELIB=
+AC_CACHE_VAL(ac_cv_c_ideh,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/libide/src/event.h" ; then
+ ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; pwd)`;
+ fi
+done
+])
+if test x"${ac_cv_c_ideh}" != x; then
+ IDEHDIR="-I${ac_cv_c_ideh}"
+ AC_MSG_RESULT(${ac_cv_c_ideh})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_MSG_CHECKING(for LIBIDE TCL headers in the source tree)
+AC_CACHE_VAL(ac_cv_c_idetclh,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/libidetcl/src/idetcl.h" ; then
+ ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; pwd)`;
+ fi
+done
+])
+if test x"${ac_cv_c_idetclh}" != x; then
+ IDEHDIR="${IDEHDIR} -I${ac_cv_c_idetclh}"
+ AC_MSG_RESULT(${ac_cv_c_idetclh})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_MSG_CHECKING(for IDE headers in the build tree)
+AC_CACHE_VAL(ac_cv_c_ideh2,[
+for i in $dirlist; do
+ if test -f "$i/libide/src/Makefile" ; then
+ ac_cv_c_ideh2=`(cd $i/libide/src; pwd)`;
+ fi
+done
+])
+if test x"${ac_cv_c_ideh2}" != x; then
+ IDEHDIR="${IDEHDIR} -I${ac_cv_c_ideh2}"
+ AC_MSG_RESULT(${ac_cv_c_ideh2})
+else
+ AC_MSG_RESULT(none)
+fi
+
+dnl look for the library
+AC_MSG_CHECKING(for IDE library)
+AC_CACHE_VAL(ac_cv_c_idelib,[
+if test x"${ac_cv_c_idelib}" = x ; then
+ for i in $dirlist; do
+ if test -f "$i/libide/src/Makefile" ; then
+ ac_cv_c_idelib=`(cd $i/libide/src; pwd)`
+ break
+ fi
+ done
+fi])
+if test x"${ac_cv_c_idelib}" != x ; then
+ IDELIB="-L${ac_cv_c_idelib}"
+ AC_MSG_RESULT(${ac_cv_c_idelib})
+else
+ AC_MSG_RESULT(none)
+fi
+
+dnl find libiddetcl.a if it exists
+AC_MSG_CHECKING(for IDE TCL library)
+AC_CACHE_VAL(ac_cv_c_idetcllib,[
+if test x"${ac_cv_c_idetcllib}" = x ; then
+ for i in $dirlist; do
+ if test -f "$i/libidetcl/src/Makefile" ; then
+ ac_cv_c_idetcllib=`(cd $i/libidetcl/src; pwd)`
+ break
+ fi
+ done
+fi
+])
+if test x"${ac_cv_c_idetcllib}" != x ; then
+ IDELIB="${IDELIB} -L${ac_cv_c_idetcllib}"
+ IDETCLLIB="-lidetcl"
+ AC_MSG_RESULT(${ac_cv_c_idetcllib})
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(IDEHDIR)
+AC_SUBST(IDELIB)
+AC_SUBST(IDETCLLIB)
+])
+
+dnl ====================================================================
+dnl Find all the ILU headers and libraries
+AC_DEFUN(CYG_AC_PATH_ILU, [
+AC_MSG_CHECKING(for ILU kernel headers in the source tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_iluh,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then
+ ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_iluh}" != x; then
+ ILUHDIR="-I${ac_cv_c_iluh}"
+ AC_MSG_RESULT(${ac_cv_c_iluh})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_MSG_CHECKING(for ILU kernel headers in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+AC_CACHE_VAL(ac_cv_c_iluh5,[
+for i in $dirlist; do
+ if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then
+ ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_iluh5}" != x; then
+ ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh5}"
+ AC_MSG_RESULT(${ac_cv_c_iluh5})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_MSG_CHECKING(for ILU C++ headers in the source tree)
+AC_CACHE_VAL(ac_cv_c_iluh2,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then
+ ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_iluh2}" != x; then
+ ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh2}"
+ AC_MSG_RESULT(${ac_cv_c_iluh2})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_MSG_CHECKING(for ILU C headers)
+AC_CACHE_VAL(ac_cv_c_iluh3,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then
+ ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_iluh3}" != x; then
+ ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh3}"
+ AC_MSG_RESULT(${ac_cv_c_iluh3})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_MSG_CHECKING(for ILU C runtime headers)
+AC_CACHE_VAL(ac_cv_c_iluh4,[
+for i in $dirlist; do
+ if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then
+ ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; pwd)`
+ fi
+done
+])
+if test x"${ac_cv_c_iluh4}" != x; then
+ ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh4}"
+ AC_MSG_RESULT(${ac_cv_c_iluh4})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_CACHE_VAL(ac_cv_c_ilupath,[
+for i in $dirlist; do
+ if test -f "$i/ilu/Makefile" ; then
+ ac_cv_c_ilupath=`(cd $i/ilu; pwd)`
+ break
+ fi
+done
+])
+ILUTOP=${ac_cv_c_ilupath}
+
+AC_MSG_CHECKING(for the ILU library in the build tree)
+AC_CACHE_VAL(ac_cv_c_ilulib,[
+if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then
+ ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; pwd)`
+ AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a)
+else
+ AC_MSG_RESULT(no)
+fi])
+
+AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree)
+AC_CACHE_VAL(ac_cv_c_ilulib2,[
+if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then
+ ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; pwd)`
+ AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a)
+else
+ AC_MSG_RESULT(no)
+fi])
+
+AC_MSG_CHECKING(for the ILU C bindings library in the build tree)
+AC_CACHE_VAL(ac_cv_c_ilulib3,[
+if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then
+ ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; pwd)`
+ AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a)
+else
+ AC_MSG_RESULT(no)
+fi])
+
+AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree)
+AC_CACHE_VAL(ac_cv_c_ilulib4,[
+if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then
+ ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; pwd)`
+ AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a)
+else
+ AC_MSG_RESULT(no)
+fi])
+
+if test x"${ac_cv_c_ilulib}" = x -a x"${ac_cv_c_ilulib2}" = x; then
+ ILUHDIR=""
+fi
+
+if test x"${ac_cv_c_ilulib}" != x -a x"${ac_cv_c_ilulib2}" != x; then
+ ILULIB="-L${ac_cv_c_ilulib} -L${ac_cv_c_ilulib2} -L${ac_cv_c_ilulib3} -L${ac_cv_c_ilulib4}"
+else
+ ILULIB=""
+fi
+
+if test x"${ILULIB}" = x; then
+ AC_MSG_CHECKING(for ILU libraries installed with the compiler)
+ AC_CACHE_VAL(ac_cv_c_ilulib5,[
+ NATIVE_GCC=`echo gcc | sed -e "${program_transform_name}"`
+
+ dnl Get G++'s full path to it's libraries
+ ac_cv_c_ilulib5=`${NATIVE_GCC} --print-libgcc | sed -e 's:lib/gcc-lib/.*::'`lib
+ if test -f $ac_cv_c_ilulib5/libilu-c.a -o -f $ac_cv_c_ilulib5/libilu-c.so ; then
+ if test x"${ILUHDIR}" = x; then
+ ILUHDIR="-I${ac_cv_c_ilulib5}/../include"
+ fi
+ ILULIB="-L${ac_cv_c_ilulib5}"
+ AC_MSG_RESULT(${ac_cv_c_ilulib5})
+ else
+ ac_cv_c_ilulib=none
+ AC_MSG_RESULT(none)
+ fi
+fi])
+AC_SUBST(ILUHDIR)
+AC_SUBST(ILULIB)
+AC_SUBST(ILUTOP)
+])
+
+dnl ====================================================================
+dnl This defines the byte order for the host. We can't use
+dnl AC_C_BIGENDIAN, cause we want to create a config file and
+dnl substitue the real value, so the header files work right
+AC_DEFUN(CYG_AC_C_ENDIAN, [
+AC_MSG_CHECKING(to see if this is a little endian host)
+AC_CACHE_VAL(ac_cv_c_little_endian, [
+ac_cv_c_little_endian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if !BYTE_ORDER || !_BIG_ENDIAN || !_LITTLE_ENDIAN
+ bogus endian macros
+#endif], [# It does; now see whether it defined to _LITTLE_ENDIAN or not.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if BYTE_ORDER != _LITTLE_ENDIAN
+ not big endian
+#endif], ac_cv_c_little_endian=yes, ac_cv_c_little_endian=no)
+])
+if test ${ac_cv_c_little_endian} = unknown; then
+old_cflags=$CFLAGS
+CFLAGS=-g
+AC_TRY_RUN([
+main () {
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[0] == 1);
+}],
+ac_cv_c_little_endian=no,
+ac_cv_c_little_endian=yes,[
+dnl Yes, this is ugly, and only used for a canadian cross anyway. This
+dnl is just to keep configure from stopping here.
+case "${host}" in
+changequote(,)
+ i[3456]86-*-*) ac_cv_c_little_endian=yes ;;
+ sparc*-*-*) ac_cv_c_little_endian=no ;;
+changequote([,])
+ *) AC_MSG_WARN(Can't cross compile this test) ;;
+esac])
+CFLAGS=$old_cflags
+fi])
+
+if test x"${ac_cv_c_little_endian}" = xyes; then
+ AC_DEFINE(LITTLE_ENDIAN_HOST)
+ ENDIAN="CYG_LSBFIRST";
+else
+ ENDIAN="CYG_MSBFIRST";
+fi
+AC_MSG_RESULT(${ac_cv_c_little_endian})
+AC_SUBST(ENDIAN)
+])
+
+dnl ====================================================================
+dnl Look for the path to libgcc, so we can use it to directly link
+dnl in libgcc.a with LD.
+AC_DEFUN(CYG_AC_PATH_LIBGCC,
+[AC_MSG_CHECKING([Looking for the path to libgcc.a])
+AC_LANG_SAVE
+AC_LANG_C
+
+dnl Get Gcc's full path to libgcc.a
+libgccpath=`${CC} --print-libgcc`
+
+dnl If we don't have a path with libgcc.a on the end, this isn't G++.
+if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+
+dnl
+if test x"${ac_cv_prog_gcc}" = xyes ; then
+ gccpath=`echo $libgccpath | sed -e 's:/libgcc.a::'`
+ LIBGCC="-L${gccpath}"
+ AC_MSG_RESULT(${gccpath})
+else
+ LIBGCC=""
+ AC_MSG_ERROR(Not using gcc)
+fi
+
+AC_LANG_RESTORE
+AC_SUBST(LIBGCC)
+])
+
+dnl ====================================================================
+dnl Ok, lets find the tcl source trees so we can use the headers
+dnl Warning: transition of version 9 to 10 will break this algorithm
+dnl because 10 sorts before 9. We also look for just tcl. We have to
+dnl be careful that we don't match stuff like tclX by accident.
+dnl the alternative search directory is involked by --with-tclinclude
+AC_DEFUN(CYG_AC_PATH_TCL, [
+ CYG_AC_PATH_TCLH
+ CYG_AC_PATH_TCLCONFIG
+ CYG_AC_LOAD_TCLCONFIG
+])
+AC_DEFUN(CYG_AC_PATH_TCLH, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+no_tcl=true
+AC_MSG_CHECKING(for Tcl headers in the source tree)
+AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl headers are], with_tclinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_tclh,[
+dnl first check to see if --with-tclinclude was specified
+if test x"${with_tclinclude}" != x ; then
+ if test -f ${with_tclinclude}/tcl.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
+ elif test -f ${with_tclinclude}/generic/tcl.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclinclude} directory doesn't contain headers])
+ fi
+fi
+
+dnl next check if it came with Tcl configuration file
+if test x"${ac_cv_c_tclconfig}" != x ; then
+ for i in $dirlist; do
+ if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then
+ ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ dnl find the top level Tcl source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then
+ tclpath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Tcl source dir. We do it this way, cause there
+ dnl might be multiple version of Tcl, and we want the most recent one.
+ for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do
+ if test -f $i/generic/tcl.h ; then
+ ac_cv_c_tclh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl check if its installed with the compiler
+if test x"${ac_cv_c_tclh}" = x ; then
+ dnl Get the path to the compiler
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
+ if test -f $ccpath/tcl.h; then
+ ac_cv_c_tclh=$ccpath
+ fi
+fi
+
+dnl see if one is installed
+if test x"${ac_cv_c_tclh}" = x ; then
+ AC_MSG_RESULT(none)
+ AC_CHECK_HEADER(tcl.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
+else
+ AC_MSG_RESULT(${ac_cv_c_tclh})
+fi
+])
+ TCLHDIR=""
+if test x"${ac_cv_c_tclh}" = x ; then
+ AC_MSG_ERROR([Can't find any Tcl headers])
+fi
+if test x"${ac_cv_c_tclh}" != x ; then
+ no_tcl=""
+ if test x"${ac_cv_c_tclh}" != x"installed" ; then
+ if test x"${CC}" = xcl ; then
+ tmp="`cygpath --windows ${ac_cv_c_tclh}`"
+ ac_cv_c_tclh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
+ fi
+ AC_MSG_RESULT(${ac_cv_c_tclh})
+ TCLHDIR="-I${ac_cv_c_tclh}"
+ fi
+fi
+
+AC_SUBST(TCLHDIR)
+])
+
+dnl ====================================================================
+dnl Ok, lets find the tcl configuration
+AC_DEFUN(CYG_AC_PATH_TCLCONFIG, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+dnl First, look for one uninstalled.
+dnl the alternative search directory is invoked by --with-tclconfig
+if test x"${no_tcl}" = x ; then
+ dnl we reset no_tcl in case something fails here
+ no_tcl=true
+ AC_ARG_WITH(tclconfig, [ --with-tclconfig directory containing tcl configuration (tclConfig.sh)],
+ with_tclconfig=${withval})
+ AC_MSG_CHECKING([for Tcl configuration script])
+ AC_CACHE_VAL(ac_cv_c_tclconfig,[
+
+ dnl First check to see if --with-tclconfig was specified.
+ if test x"${with_tclconfig}" != x ; then
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
+ fi
+ fi
+
+ dnl next check if it came with Tcl configuration file in the source tree
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in $dirlist; do
+ if test -f $srcdir/$i/unix/tclConfig.sh ; then
+ ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ dnl check in a few other locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ dnl find the top level Tcl source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $i/tcl* 2>/dev/null`" ; then
+ tclconfpath=$i
+ break
+ fi
+ done
+
+ dnl find the exact Tcl dir. We do it this way, cause there
+ dnl might be multiple version of Tcl, and we want the most recent one.
+ for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do
+ if test -f $i/unix/tclConfig.sh ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ dnl Check to see if it's installed. We have to look in the $CC path
+ dnl to find it, cause our $prefix may not match the compilers.
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ dnl Get the path to the compiler
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
+ if test -f $ccpath/tclConfig.sh; then
+ ac_cv_c_tclconfig=$ccpath
+ fi
+ fi
+ ]) dnl end of cache_val
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCLCONFIG=""
+ AC_MSG_WARN(Can't find Tcl configuration definitions)
+ else
+ no_tcl=""
+ TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
+ AC_MSG_RESULT(${TCLCONFIG})
+ fi
+fi
+AC_SUBST(TCLCONFIG)
+])
+
+dnl Defined as a separate macro so we don't have to cache the values
+dnl from PATH_TCLCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_TCLCONFIG, [
+ . $TCLCONFIG
+
+dnl AC_SUBST(TCL_VERSION)
+dnl AC_SUBST(TCL_MAJOR_VERSION)
+dnl AC_SUBST(TCL_MINOR_VERSION)
+dnl AC_SUBST(TCL_CC)
+ AC_SUBST(TCL_DEFS)
+
+dnl not used, don't export to save symbols
+ AC_SUBST(TCL_LIB_FILE)
+ AC_SUBST(TCL_LIB_FULL_PATH)
+ AC_SUBST(TCL_LIBS)
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_PREFIX)
+
+ AC_SUBST(TCL_CFLAGS)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_EXEC_PREFIX)
+
+ AC_SUBST(TCL_SHLIB_CFLAGS)
+ AC_SUBST(TCL_SHLIB_LD)
+dnl don't export, not used outside of configure
+dnl AC_SUBST(TCL_SHLIB_LD_LIBS)
+dnl AC_SUBST(TCL_SHLIB_SUFFIX)
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_DL_LIBS)
+ AC_SUBST(TCL_LD_FLAGS)
+ AC_SUBST(TCL_LD_SEARCH_FLAGS)
+dnl don't export, not used outside of configure
+dnl AC_SUBST(TCL_COMPAT_OBJS)
+ AC_SUBST(TCL_RANLIB)
+ AC_SUBST(TCL_BUILD_LIB_SPEC)
+ AC_SUBST(TCL_LIB_SPEC)
+dnl AC_SUBST(TCL_LIB_VERSIONS_OK)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_SHARED_LIB_SUFFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
+])
+
+dnl ====================================================================
+AC_DEFUN(CYG_AC_PATH_TK, [
+ CYG_AC_PATH_TKH
+ CYG_AC_PATH_TKCONFIG
+ CYG_AC_LOAD_TKCONFIG
+])
+AC_DEFUN(CYG_AC_PATH_TKH, [
+#
+# Ok, lets find the tk source trees so we can use the headers
+# If the directory (presumably symlink) named "tk" exists, use that one
+# in preference to any others. Same logic is used when choosing library
+# and again with Tcl. The search order is the best place to look first, then in
+# decreasing significance. The loop breaks if the trigger file is found.
+# Note the gross little conversion here of srcdir by cd'ing to the found
+# directory. This converts the path from a relative to an absolute, so
+# recursive cache variables for the path will work right. We check all
+# the possible paths in one loop rather than many seperate loops to speed
+# things up.
+# the alternative search directory is involked by --with-tkinclude
+#
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+no_tk=true
+AC_MSG_CHECKING(for Tk headers in the source tree)
+AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk headers are], with_tkinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_tkh,[
+dnl first check to see if --with-tkinclude was specified
+if test x"${with_tkinclude}" != x ; then
+ if test -f ${with_tkinclude}/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
+ elif test -f ${with_tkinclude}/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkinclude} directory doesn't contain headers])
+ fi
+fi
+
+dnl next check if it came with Tk configuration file
+if test x"${ac_cv_c_tkconfig}" != x ; then
+ for i in $dirlist; do
+ if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tkh}" = x ; then
+ dnl find the top level Tk source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/tk* 2>/dev/null`" ; then
+ tkpath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Tk source dir. We do it this way, cause there
+ dnl might be multiple version of Tk, and we want the most recent one.
+ for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do
+ if test -f $i/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl see if one is installed
+if test x"${ac_cv_c_tkh}" = x ; then
+ AC_MSG_RESULT(none)
+ dnl Get the path to the compiler. We do it this way instead of using
+ dnl AC_CHECK_HEADER, cause this doesn't depend in having X configured.
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
+ if test -f $ccpath/tk.h; then
+ ac_cv_c_tkh=$ccpath
+ fi
+else
+ AC_MSG_RESULT(${ac_cv_c_tkh})
+fi
+])
+ TKHDIR=""
+if test x"${ac_cv_c_tkh}" = x ; then
+ AC_MSG_ERROR([Can't find any Tk headers])
+fi
+if test x"${ac_cv_c_tkh}" != x ; then
+ no_tk=""
+ if test x"${ac_cv_c_tkh}" != x"installed" ; then
+ if test x"${CC}" = xcl ; then
+ tmp="`cygpath --windows ${ac_cv_c_tkh}`"
+ ac_cv_c_tkh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
+ fi
+ AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
+ TKHDIR="-I${ac_cv_c_tkh}"
+ fi
+fi
+
+AC_SUBST(TKHDIR)
+])
+
+AC_DEFUN(CYG_AC_PATH_TKCONFIG, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+dnl First, look for one uninstalled.
+dnl the alternative search directory is invoked by --with-tkconfig
+if test x"${no_tk}" = x ; then
+ dnl we reset no_tk in case something fails here
+ no_tk=true
+ AC_ARG_WITH(tkconfig, [ --with-tkconfig directory containing tk configuration (tkConfig.sh)],
+ with_tkconfig=${withval})
+ AC_MSG_CHECKING([for Tk configuration script])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+ dnl First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
+ fi
+ fi
+
+ dnl next check if it came with Tk configuration file in the source tree
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in $dirlist; do
+ if test -f $srcdir/$i/unix/tkConfig.sh ; then
+ ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ dnl check in a few other locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ dnl find the top level Tk source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $i/tk* 2>/dev/null`" ; then
+ tkconfpath=$i
+ break
+ fi
+ done
+
+ dnl find the exact Tk dir. We do it this way, cause there
+ dnl might be multiple version of Tk, and we want the most recent one.
+ for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do
+ if test -f $i/unix/tkConfig.sh ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ dnl Check to see if it's installed. We have to look in the $CC path
+ dnl to find it, cause our $prefix may not match the compilers.
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ dnl Get the path to the compiler
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
+ if test -f $ccpath/tkConfig.sh; then
+ ac_cv_c_tkconfig=$ccpath
+ fi
+ fi
+ ]) dnl end of cache_val
+
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TKCONFIG=""
+ AC_MSG_WARN(Can't find Tk configuration definitions)
+ else
+ no_tk=""
+ TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
+ AC_MSG_RESULT(${TKCONFIG})
+ fi
+fi
+AC_SUBST(TKCONFIG)
+])
+
+dnl Defined as a separate macro so we don't have to cache the values
+dnl from PATH_TKCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_TKCONFIG, [
+ if test -f "$TKCONFIG" ; then
+ . $TKCONFIG
+ fi
+
+ AC_SUBST(TK_VERSION)
+dnl not actually used, don't export to save symbols
+dnl AC_SUBST(TK_MAJOR_VERSION)
+dnl AC_SUBST(TK_MINOR_VERSION)
+ AC_SUBST(TK_DEFS)
+
+dnl not used, don't export to save symbols
+ AC_SUBST(TK_LIB_FILE)
+ AC_SUBST(TK_LIB_FULL_PATH)
+ AC_SUBST(TK_LIBS)
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TK_PREFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TK_EXEC_PREFIX)
+ AC_SUBST(TK_BUILD_INCLUDES)
+ AC_SUBST(TK_XINCLUDES)
+ AC_SUBST(TK_XLIBSW)
+ AC_SUBST(TK_BUILD_LIB_SPEC)
+ AC_SUBST(TK_LIB_SPEC)
+])
+
+dnl ====================================================================
+dnl Ok, lets find the itcl source trees so we can use the headers
+dnl the alternative search directory is involked by --with-itclinclude
+AC_DEFUN(CYG_AC_PATH_ITCL, [
+ CYG_AC_PATH_ITCLH
+ CYG_AC_PATH_ITCLLIB
+ CYG_AC_PATH_ITCLSH
+ CYG_AC_PATH_ITCLMKIDX
+])
+AC_DEFUN(CYG_AC_PATH_ITCLH, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+no_itcl=true
+AC_MSG_CHECKING(for Itcl headers in the source tree)
+AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_itclh,[
+dnl first check to see if --with-itclinclude was specified
+if test x"${with_itclinclude}" != x ; then
+ if test -f ${with_itclinclude}/itcl.h ; then
+ ac_cv_c_itclh=`(cd ${with_itclinclude}; pwd)`
+ elif test -f ${with_itclinclude}/src/itcl.h ; then
+ ac_cv_c_itclh=`(cd ${with_itclinclude}/src; pwd)`
+ else
+ AC_MSG_ERROR([${with_itclinclude} directory doesn't contain headers])
+ fi
+fi
+
+dnl next check if it came with Itcl configuration file
+if test x"${ac_cv_c_itclconfig}" != x ; then
+ for i in $dirlist; do
+ if test -f $ac_cv_c_itclconfig/$i/src/itcl.h ; then
+ ac_cv_c_itclh=`(cd $ac_cv_c_itclconfig/$i/src; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_itclh}" = x ; then
+ dnl find the top level Itcl source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then
+ itclpath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Itcl source dir. We do it this way, cause there
+ dnl might be multiple version of Itcl, and we want the most recent one.
+ for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do
+ if test -f $i/src/itcl.h ; then
+ ac_cv_c_itclh=`(cd $i/src; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl see if one is installed
+if test x"${ac_cv_c_itclh}" = x ; then
+ AC_MSG_RESULT(none)
+ AC_CHECK_HEADER(itcl.h, ac_cv_c_itclh=installed, ac_cv_c_itclh="")
+else
+ AC_MSG_RESULT(${ac_cv_c_itclh})
+fi
+])
+ ITCLHDIR=""
+if test x"${ac_cv_c_itclh}" = x ; then
+ AC_MSG_ERROR([Can't find any Itcl headers])
+fi
+if test x"${ac_cv_c_itclh}" != x ; then
+ no_itcl=""
+ if test x"${ac_cv_c_itclh}" != x"installed" ; then
+ AC_MSG_RESULT(${ac_cv_c_itclh})
+ ITCLHDIR="-I${ac_cv_c_itclh}"
+ fi
+fi
+
+AC_SUBST(ITCLHDIR)
+])
+
+dnl Ok, lets find the itcl library
+dnl First, look for one uninstalled.
+dnl the alternative search directory is invoked by --with-itcllib
+AC_DEFUN(CYG_AC_PATH_ITCLLIB, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+if test x"${no_itcl}" = x ; then
+ dnl we reset no_itcl incase something fails here
+ no_itcl=true
+ AC_ARG_WITH(itcllib,
+ [ --with-itcllib directory where the itcl library is],
+ with_itcllib=${withval})
+ AC_MSG_CHECKING([for Itcl library])
+ AC_CACHE_VAL(ac_cv_c_itcllib,[
+ dnl First check to see if --with-itcllib was specified.
+ if test x"${with_itcllib}" != x ; then
+ if test -f "${with_itcllib}/libitcl$TCL_SHARED_LIB_SUFFIX" ; then
+ ac_cv_c_itcllib=`(cd ${with_itcllib}; pwd)`/libitcl$TCL_SHARED_LIB_SUFFIX
+ else
+ if test -f "${with_itcllib}/libitcl$TCL_UNSHARED_LIB_SUFFIX"; then
+ ac_cv_c_itcllib=`(cd ${with_itcllib}; pwd)`/libitcl$TCL_UNSHARED_LIB_SUFFIX
+ fi
+ fi
+ fi
+ dnl then check for a Itcl library. Since these are uninstalled,
+ dnl use the simple lib name root.
+ if test x"${ac_cv_c_itcllib}" = x ; then
+ dnl find the top level Itcl build directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $i/itcl* 2>/dev/null`" ; then
+ itclpath=$i/itcl
+ break
+ fi
+ done
+ dnl Itcl 7.5 and greater puts library in subdir. Look there first.
+ if test -f "$itclpath/src/libitcl.$TCL_SHLIB_SUFFIX" ; then
+ ac_cv_c_itcllib=`(cd $itclpath/src; pwd)`
+ elif test -f "$itclpath/src/libitcl.a"; then
+ ac_cv_c_itcllib=`(cd $itclpath/src; pwd)`
+ fi
+ fi
+ dnl check in a few other private locations
+ if test x"${ac_cv_c_itcllib}" = x ; then
+ for i in ${dirlist}; do
+ if test -n "`ls -dr ${srcdir}/$i/itcl* 2>/dev/null`" ; then
+ itclpath=${srcdir}/$i
+ break
+ fi
+ done
+ for i in `ls -dr ${itclpath}/itcl* 2>/dev/null` ; do
+ dnl Itcl 7.5 and greater puts library in subdir. Look there first.
+ if test -f "$i/src/libitcl$TCL_SHLIB_SUFFIX" ; then
+ ac_cv_c_itcllib=`(cd $i/src; pwd)`
+ break
+ elif test -f "$i/src/libitcl.a"; then
+ ac_cv_c_itcllib=`(cd $i/src; pwd)`
+ break
+ fi
+ done
+ fi
+
+ dnl see if one is conveniently installed with the compiler
+ if test x"${ac_cv_c_itcllib}" = x ; then
+ dnl Get the path to the compiler
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
+ dnl Itcl 7.5 and greater puts library in subdir. Look there first.
+ if test -f "${ccpath}/libitcl$TCL_SHLIB_SUFFIX" ; then
+ ac_cv_c_itcllib=`(cd ${ccpath}; pwd)`
+ elif test -f "${ccpath}/libitcl.a"; then
+ ac_cv_c_itcllib=`(cd ${ccpath}; pwd)`
+ fi
+ fi
+ ])
+ if test x"${ac_cv_c_itcllib}" = x ; then
+ ITCLLIB=""
+ AC_MSG_WARN(Can't find Itcl library)
+ else
+ ITCLLIB="-L${ac_cv_c_itcllib}"
+ AC_MSG_RESULT(${ac_cv_c_itcllib})
+ no_itcl=""
+ fi
+fi
+
+AC_PROVIDE([$0])
+AC_SUBST(ITCLLIB)
+])
+
+
+dnl ====================================================================
+dnl Ok, lets find the itcl source trees so we can use the itcl_sh script
+dnl the alternative search directory is involked by --with-itclinclude
+AC_DEFUN(CYG_AC_PATH_ITCLSH, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+no_itcl=true
+AC_MSG_CHECKING(for the itcl_sh script)
+AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_itclsh,[
+dnl first check to see if --with-itclinclude was specified
+if test x"${with_itclinclude}" != x ; then
+ if test -f ${with_itclinclude}/itcl_sh ; then
+ ac_cv_c_itclsh=`(cd ${with_itclinclude}; pwd)`
+ elif test -f ${with_itclinclude}/src/itcl_sh ; then
+ ac_cv_c_itclsh=`(cd ${with_itclinclude}/src; pwd)`
+ else
+ AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh])
+ fi
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_itclsh}" = x ; then
+ dnl find the top level Itcl source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then
+ itclpath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Itcl source dir. We do it this way, cause there
+ dnl might be multiple version of Itcl, and we want the most recent one.
+ for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do
+ if test -f $i/src/itcl_sh ; then
+ ac_cv_c_itclsh=`(cd $i/src; pwd)`/itcl_sh
+ break
+ fi
+ done
+fi
+
+dnl see if one is installed
+if test x"${ac_cv_c_itclsh}" = x ; then
+ AC_MSG_RESULT(none)
+ AC_PATH_PROG(ac_cv_c_itclsh, itcl_sh)
+else
+ AC_MSG_RESULT(${ac_cv_c_itclsh})
+fi
+])
+
+if test x"${ac_cv_c_itclsh}" = x ; then
+ AC_MSG_ERROR([Can't find the itcl_sh script])
+fi
+if test x"${ac_cv_c_itclsh}" != x ; then
+ no_itcl=""
+ AC_MSG_RESULT(${ac_cv_c_itclsh})
+ ITCLSH="${ac_cv_c_itclsh}"
+fi
+AC_SUBST(ITCLSH)
+])
+
+
+dnl ====================================================================
+dnl Ok, lets find the itcl source trees so we can use the itcl_sh script
+dnl the alternative search directory is involked by --with-itclinclude
+AC_DEFUN(CYG_AC_PATH_ITCLMKIDX, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+no_itcl=true
+AC_MSG_CHECKING(for itcl_mkindex.tcl script)
+AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_itclmkidx,[
+dnl first check to see if --with-itclinclude was specified
+if test x"${with_itclinclude}" != x ; then
+ if test -f ${with_itclinclude}/itcl_sh ; then
+ ac_cv_c_itclmkidx=`(cd ${with_itclinclude}; pwd)`
+ elif test -f ${with_itclinclude}/src/itcl_sh ; then
+ ac_cv_c_itclmkidx=`(cd ${with_itclinclude}/src; pwd)`
+ else
+ AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh])
+ fi
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_itclmkidx}" = x ; then
+ dnl find the top level Itcl source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then
+ itclpath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Itcl source dir. We do it this way, cause there
+ dnl might be multiple version of Itcl, and we want the most recent one.
+ for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do
+ if test -f $i/library/itcl_mkindex.tcl ; then
+ ac_cv_c_itclmkidx=`(cd $i/library; pwd)`/itcl_mkindex.tcl
+ break
+ fi
+ done
+fi
+if test x"${ac_cv_c_itclmkidx}" = x ; then
+ dnl Get the path to the compiler
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/share
+ dnl Itcl 7.5 and greater puts library in subdir. Look there first.
+ for i in `ls -dr $ccpath/itcl* 2>/dev/null ` ; do
+ if test -f $i/itcl_mkindex.tcl ; then
+ ac_cv_c_itclmkidx=`(cd $i; pwd)`/itcl_mkindex.tcl
+ break
+ fi
+ done
+fi
+])
+
+if test x"${ac_cv_c_itclmkidx}" = x ; then
+ AC_MSG_ERROR([Can't find the itcl_mkindex.tcl script])
+fi
+if test x"${ac_cv_c_itclmkidx}" != x ; then
+ no_itcl=""
+ AC_MSG_RESULT(${ac_cv_c_itclmkidx})
+ ITCLMKIDX="${ac_cv_c_itclmkidx}"
+else
+ AC_MSG_RESULT(none)
+fi
+AC_SUBST(ITCLMKIDX)
+])
+
+dnl ====================================================================
+dnl Ok, lets find the tix source trees so we can use the headers
+dnl the alternative search directory is involked by --with-tixinclude
+AC_DEFUN(CYG_AC_PATH_TIX, [
+ CYG_AC_PATH_TIXH
+ CYG_AC_PATH_TIXLIB
+])
+AC_DEFUN(CYG_AC_PATH_TIXH, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+no_tix=true
+AC_MSG_CHECKING(for Tix headers in the source tree)
+AC_ARG_WITH(tixinclude, [ --with-tixinclude directory where tix headers are], with_tixinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_tixh,[
+dnl first check to see if --with-tixinclude was specified
+if test x"${with_tixinclude}" != x ; then
+ if test -f ${with_tixinclude}/tix.h ; then
+ ac_cv_c_tixh=`(cd ${with_tixinclude}; pwd)`
+ elif test -f ${with_tixinclude}/generic/tix.h ; then
+ ac_cv_c_tixh=`(cd ${with_tixinclude}/generic; pwd)`
+ else
+ AC_MSG_ERROR([${with_tixinclude} directory doesn't contain headers])
+ fi
+fi
+
+dnl next check if it came with Tix configuration file
+if test x"${ac_cv_c_tixconfig}" != x ; then
+ for i in $dirlist; do
+ if test -f $ac_cv_c_tixconfig/$i/generic/tix.h ; then
+ ac_cv_c_tixh=`(cd $ac_cv_c_tixconfig/$i/generic; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tixh}" = x ; then
+ dnl find the top level Tix source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/tix* 2>/dev/null`" ; then
+ tixpath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Tix source dir. We do it this way, cause there
+ dnl might be multiple version of Tix, and we want the most recent one.
+ for i in `ls -dr $tixpath/tix* 2>/dev/null ` ; do
+ if test -f $i/generic/tix.h ; then
+ ac_cv_c_tixh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl see if one is installed
+if test x"${ac_cv_c_tixh}" = x ; then
+ AC_MSG_RESULT(none)
+ dnl Get the path to the compiler
+
+ dnl Get the path to the compiler. We do it this way instead of using
+ dnl AC_CHECK_HEADER, cause this doesn't depend in having X configured.
+ ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
+ if test -f $ccpath/tix.h; then
+ ac_cv_c_tixh=installed
+ fi
+else
+ AC_MSG_RESULT(${ac_cv_c_tixh})
+fi
+])
+if test x"${ac_cv_c_tixh}" = x ; then
+ AC_MSG_ERROR([Can't find any Tix headers])
+fi
+if test x"${ac_cv_c_tixh}" != x ; then
+ no_tix=""
+ AC_MSG_RESULT(${ac_cv_c_tixh})
+ if test x"${ac_cv_c_tixh}" != x"installed" ; then
+ TIXHDIR="-I${ac_cv_c_tixh}"
+ fi
+fi
+
+AC_SUBST(TIXHDIR)
+])
+
+AC_DEFUN(CYG_AC_PATH_TIXCONFIG, [
+#
+# Ok, lets find the tix configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tixconfig
+#
+
+if test x"${no_tix}" = x ; then
+ # we reset no_tix in case something fails here
+ no_tix=true
+ AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
+ with_tixconfig=${withval})
+ AC_MSG_CHECKING([for Tix configuration])
+ AC_CACHE_VAL(ac_cv_c_tixconfig,[
+
+ # First check to see if --with-tixconfig was specified.
+ if test x"${with_tixconfig}" != x ; then
+ if test -f "${with_tixconfig}/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tix library
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ../tix \
+ `ls -dr ../tix[[4]]* 2>/dev/null` \
+ ../../tix \
+ `ls -dr ../../tix[[4]]* 2>/dev/null` \
+ ../../../tix \
+ `ls -dr ../../../tix[[4]]* 2>/dev/null` ; do
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tix \
+ `ls -dr ${srcdir}/../tix[[4-9]]* 2>/dev/null` ; do
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ TIXCONFIG="# no Tix configs found"
+ AC_MSG_WARN(Can't find Tix configuration definitions)
+ else
+ no_tix=
+ TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
+ AC_MSG_RESULT(found $TIXCONFIG)
+ fi
+fi
+
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_TIXCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_TIXCONFIG, [
+ if test -f "$TIXCONFIG" ; then
+ . $TIXCONFIG
+ fi
+
+ AC_SUBST(TIX_BUILD_LIB_SPEC)
+ AC_SUBST(TIX_LIB_FULL_PATH)
+])
+
+AC_DEFUN(CYG_AC_PATH_ITCLCONFIG, [
+#
+# Ok, lets find the itcl configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itclconfig
+#
+
+if test x"${no_itcl}" = x ; then
+ # we reset no_itcl in case something fails here
+ no_itcl=true
+ AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)],
+ with_itclconfig=${withval})
+ AC_MSG_CHECKING([for Itcl configuration])
+ AC_CACHE_VAL(ac_cv_c_itclconfig,[
+
+ # First check to see if --with-itclconfig was specified.
+ if test x"${with_itclconfig}" != x ; then
+ if test -f "${with_itclconfig}/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh])
+ fi
+ fi
+
+ # then check for a private itcl library
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ../itcl/itcl \
+ `ls -dr ../itcl/itcl[[3]]* 2>/dev/null` \
+ ../../itcl/itcl \
+ `ls -dr ../../itcl/itcl[[3]]* 2>/dev/null` \
+ ../../../itcl/itcl \
+ `ls -dr ../../../itcl/itcl[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../itcl/itcl \
+ `ls -dr ${srcdir}/../itcl/itcl[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itcl/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ ITCLCONFIG="# no itcl configs found"
+ AC_MSG_WARN(Can't find itcl configuration definitions)
+ else
+ no_itcl=
+ ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
+ AC_MSG_RESULT(found $ITCLCONFIG)
+ fi
+fi
+
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_ITCLCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_ITCLCONFIG, [
+ if test -f "$ITCLCONFIG" ; then
+ . $ITCLCONFIG
+ fi
+
+ AC_SUBST(ITCL_BUILD_LIB_SPEC)
+ AC_SUBST(ITCL_SH)
+ AC_SUBST(ITCL_LIB_FILE)
+ AC_SUBST(ITCL_LIB_FULL_PATH)
+
+])
+
+
+AC_DEFUN(CYG_AC_PATH_ITKCONFIG, [
+#
+# Ok, lets find the itk configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itkconfig
+#
+
+if test x"${no_itk}" = x ; then
+ # we reset no_itk in case something fails here
+ no_itk=true
+ AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)],
+ with_itkconfig=${withval})
+ AC_MSG_CHECKING([for Itk configuration])
+ AC_CACHE_VAL(ac_cv_c_itkconfig,[
+
+ # First check to see if --with-itkconfig was specified.
+ if test x"${with_itkconfig}" != x ; then
+ if test -f "${with_itkconfig}/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh])
+ fi
+ fi
+
+ # then check for a private itk library
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in \
+ ../itcl/itk \
+ `ls -dr ../itcl/itk[[3]]* 2>/dev/null` \
+ ../../itcl/itk \
+ `ls -dr ../../itcl/itk[[3]]* 2>/dev/null` \
+ ../../../itcl/itk \
+ `ls -dr ../../../itcl/itk[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/itcl/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../itcl/itk \
+ `ls -dr ${srcdir}/../itcl/itk[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ ITCLCONFIG="# no itk configs found"
+ AC_MSG_WARN(Can't find itk configuration definitions)
+ else
+ no_itk=
+ ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
+ AC_MSG_RESULT(found $ITKCONFIG)
+ fi
+fi
+
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_ITKCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_ITKCONFIG, [
+ if test -f "$ITKCONFIG" ; then
+ . $ITKCONFIG
+ fi
+
+ AC_SUBST(ITK_BUILD_LIB_SPEC)
+ AC_SUBST(ITK_LIB_FILE)
+ AC_SUBST(ITK_LIB_FULL_PATH)
+])
+
+
+dnl ====================================================================
+dnl Ok, lets find the libgui source trees so we can use the headers
+dnl the alternative search directory is involked by --with-libguiinclude
+AC_DEFUN(CYG_AC_PATH_LIBGUI, [
+ CYG_AC_PATH_LIBGUIH
+ CYG_AC_PATH_LIBGUILIB
+])
+AC_DEFUN(CYG_AC_PATH_LIBGUIH, [
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../..../../../../../../../../../../.."
+no_libgui=true
+AC_MSG_CHECKING(for Libgui headers in the source tree)
+AC_ARG_WITH(libguiinclude, [ --with-libguiinclude directory where libgui headers are], with_libguiinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_libguih,[
+dnl first check to see if --with-libguiinclude was specified
+if test x"${with_libguiinclude}" != x ; then
+ if test -f ${with_libguiinclude}/guitcl.h ; then
+ ac_cv_c_libguih=`(cd ${with_libguiinclude}; pwd)`
+ elif test -f ${with_libguiinclude}/src/guitcl.h ; then
+ ac_cv_c_libguih=`(cd ${with_libguiinclude}/src; pwd)`
+ else
+ AC_MSG_ERROR([${with_libguiinclude} directory doesn't contain headers])
+ fi
+fi
+
+dnl next check if it came with Libgui configuration file
+if test x"${ac_cv_c_libguiconfig}" != x ; then
+ for i in $dirlist; do
+ if test -f $ac_cv_c_libguiconfig/$i/src/guitcl.h ; then
+ ac_cv_c_libguih=`(cd $ac_cv_c_libguiconfig/$i/src; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl next check in private source directory
+dnl since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_libguih}" = x ; then
+ dnl find the top level Libgui source directory
+ for i in $dirlist; do
+ if test -n "`ls -dr $srcdir/$i/libgui* 2>/dev/null`" ; then
+ libguipath=$srcdir/$i
+ break
+ fi
+ done
+
+ dnl find the exact Libgui source dir. We do it this way, cause there
+ dnl might be multiple version of Libgui, and we want the most recent one.
+ for i in `ls -dr $libguipath/libgui* 2>/dev/null ` ; do
+ if test -f $i/src/guitcl.h ; then
+ ac_cv_c_libguih=`(cd $i/src; pwd)`
+ break
+ fi
+ done
+fi
+
+dnl see if one is installed
+if test x"${ac_cv_c_libguih}" = x ; then
+ AC_MSG_RESULT(none)
+ AC_CHECK_HEADER(guitcl.h, ac_cv_c_libguih=installed, ac_cv_c_libguih="")
+fi
+])
+LIBGUIHDIR=""
+if test x"${ac_cv_c_libguih}" = x ; then
+ AC_MSG_WARN([Can't find any Libgui headers])
+fi
+if test x"${ac_cv_c_libguih}" != x ; then
+ no_libgui=""
+ if test x"${ac_cv_c_libguih}" != x"installed" ; then
+ LIBGUIHDIR="-I${ac_cv_c_libguih}"
+ fi
+fi
+AC_MSG_RESULT(${ac_cv_c_libguih})
+AC_SUBST(LIBGUIHDIR)
+])
+
+dnl ====================================================================
+dnl find the GUI library
+AC_DEFUN(CYG_AC_PATH_LIBGUILIB, [
+AC_MSG_CHECKING(for GUI library in the build tree)
+dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
+dnl look for the library
+AC_MSG_CHECKING(for GUI library)
+AC_CACHE_VAL(ac_cv_c_libguilib,[
+if test x"${ac_cv_c_libguilib}" = x ; then
+ for i in $dirlist; do
+ if test -f "$i/libgui/src/Makefile" ; then
+ ac_cv_c_libguilib=`(cd $i/libgui/src; pwd)`
+ break
+ fi
+ done
+fi
+])
+if test x"${ac_cv_c_libguilib}" != x ; then
+ GUILIB="${GUILIB} -L${ac_cv_c_libguilib}"
+ LIBGUILIB="-lgui"
+ AC_MSG_RESULT(${ac_cv_c_libguilib})
+else
+ AC_MSG_RESULT(none)
+fi
+
+AC_SUBST(GUILIB)
+AC_SUBST(LIBGUILIB)
+])
diff --git a/contrib/binutils/config/mh-armpic b/contrib/binutils/config/mh-armpic
new file mode 100644
index 0000000..35cf2c8
--- /dev/null
+++ b/contrib/binutils/config/mh-armpic
@@ -0,0 +1 @@
+PICFLAG=-fPIC
diff --git a/contrib/binutils/config/mh-ppcpic b/contrib/binutils/config/mh-ppcpic
new file mode 100644
index 0000000..35cf2c8
--- /dev/null
+++ b/contrib/binutils/config/mh-ppcpic
@@ -0,0 +1 @@
+PICFLAG=-fPIC
diff --git a/contrib/binutils/config/mh-sparcpic b/contrib/binutils/config/mh-sparcpic
new file mode 100644
index 0000000..f6dbc22
--- /dev/null
+++ b/contrib/binutils/config/mh-sparcpic
@@ -0,0 +1 @@
+PICFLAG=`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac`
diff --git a/contrib/binutils/config/mh-sysv5 b/contrib/binutils/config/mh-sysv5
new file mode 100644
index 0000000..1fa38e5
--- /dev/null
+++ b/contrib/binutils/config/mh-sysv5
@@ -0,0 +1,8 @@
+# Define SYSV as -DSYSV if you are using a System V operating system.
+SYSV = -DSYSV -DSVR4 -DSVR5
+RANLIB = true
+
+# The l flag generates a warning from the SVR4 archiver, remove it.
+AR_FLAGS = cr
+
+X11_EXTRA_LIBS = -lnsl
diff --git a/contrib/binutils/config/mt-armpic b/contrib/binutils/config/mt-armpic
new file mode 100644
index 0000000..35b8c9e
--- /dev/null
+++ b/contrib/binutils/config/mt-armpic
@@ -0,0 +1 @@
+PICFLAG_FOR_TARGET=-fPIC
diff --git a/contrib/binutils/config/mt-linux b/contrib/binutils/config/mt-linux
index bbd9792..a09e6f1 100644
--- a/contrib/binutils/config/mt-linux
+++ b/contrib/binutils/config/mt-linux
@@ -1,2 +1,2 @@
# When using glibc 2 on Linux we must always use vtable thunks.
- CXXFLAGS=-O2 -g -fvtable-thunks
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -fvtable-thunks -D_GNU_SOURCE
diff --git a/contrib/binutils/config/mt-ospace b/contrib/binutils/config/mt-ospace
new file mode 100644
index 0000000..7f09104
--- /dev/null
+++ b/contrib/binutils/config/mt-ospace
@@ -0,0 +1,3 @@
+# Build libraries optimizing for space, not speed.
+ CFLAGS_FOR_TARGET = -g -Os
+ CXXFLAGS_FOR_TARGET = -g -Os
diff --git a/contrib/binutils/config/mt-ppcpic b/contrib/binutils/config/mt-ppcpic
new file mode 100644
index 0000000..35b8c9e
--- /dev/null
+++ b/contrib/binutils/config/mt-ppcpic
@@ -0,0 +1 @@
+PICFLAG_FOR_TARGET=-fPIC
diff --git a/contrib/binutils/config/mt-sparcpic b/contrib/binutils/config/mt-sparcpic
new file mode 100644
index 0000000..fd0ec27
--- /dev/null
+++ b/contrib/binutils/config/mt-sparcpic
@@ -0,0 +1 @@
+PICFLAG_FOR_TARGET=`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac`
diff --git a/contrib/binutils/configure b/contrib/binutils/configure
index b2aa5b2..3e7d865 100755
--- a/contrib/binutils/configure
+++ b/contrib/binutils/configure
@@ -3,7 +3,7 @@
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
# Configuration script
-# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 1997
+# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -51,12 +51,15 @@ build_alias=
cache_file=config.cache
cache_file_option=
configdirs=
+extraconfigdirs=
diroptions=
exec_prefix=
exec_prefixoption=
fatal=
floating_point=default
gas=default
+gcc_version=
+gcc_version_trigger=
host_alias=NOHOST
host_makefile_frag=
moveifchange=
@@ -83,7 +86,7 @@ subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
-version="$Revision: 1.260.2.1 $"
+version="$Revision: 1.5 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
@@ -515,6 +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`
+
# this is a hack. sun4 must always be a valid host alias or this will fail.
if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
@@ -578,6 +583,28 @@ case "${exec_prefixoption}" in
*) ;;
esac
+# Define the trigger file to make sure configure will re-run whenever
+# the gcc version number changes.
+if [ "${with_gcc_version_trigger+set}" = set ]; then
+ gcc_version_trigger="$with_gcc_version_trigger"
+ gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
+else
+ # If gcc's sources are available, define the trigger file.
+ if [ -f ${topsrcdir}/gcc/version.c ] ; then
+ gcc_version_trigger=${topsrcdir}/gcc/version.c
+ gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
+ case "$arguments" in
+ *--with-gcc-version-trigger=$gcc_version_trigger* )
+ ;;
+ * )
+ # Make sure configure.in knows about this.
+ arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
+ ;;
+ esac
+ withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
+ fi
+fi
+
### break up ${srcdir}/configure.in.
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
@@ -628,8 +655,8 @@ case "${TMPDIR}" in
*) ;;
esac
-# keep this filename short for &%*%$*# 14 char file names
-tmpfile=${TMPDIR}/cONf$$
+# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
+tmpfile=${TMPDIR}/cNf$$
# Note that under many versions of sh a trap handler for 0 will *override* any
# exit status you explicitly specify! At this point, the only non-error exit
# is at the end of the script; these actions are duplicated there, minus
@@ -651,8 +678,24 @@ fi
### do common part of configure.in
+# If the language specific compiler does not exist, but the "gcc" directory does,
+# we will skip this directory; in this case the sub-directory's common part
+# of configure.in will create a small shell script "skip-this-dir" containing
+# commands to completely clean up any temporary or created files.
+
. ${tmpfile}.com
+if test -f skip-this-dir; then
+ # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
+ # and reset the trap handler.
+ trap 0
+ rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
+ # Execute the final clean-up actions
+ ${config_shell} skip-this-dir
+ # and stop configuring this directory.
+ exit 0
+fi
+
# some sanity checks on configure.in
case "${srctrigger}" in
"")
@@ -762,7 +805,7 @@ fi
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it. This is to handle running
# ./config.status by hand.
-if [ -z "${CC}" -a -r Makefile ]; then
+if [ -z "${CC}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
@@ -772,7 +815,7 @@ t loop
rm -f Makefile.cc
fi
-if [ -z "${CFLAGS}" -a -r Makefile ]; then
+if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
@@ -782,7 +825,7 @@ t loop
rm -f Makefile.cc
fi
-if [ -z "${CXX}" -a -r Makefile ]; then
+if [ -z "${CXX}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
@@ -792,7 +835,7 @@ t loop
rm -f Makefile.cc
fi
-if [ -z "${CXXFLAGS}" -a -r Makefile ]; then
+if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
@@ -821,6 +864,25 @@ do
test -n "$DEFAULT_YACC" && break
done
+# Generate a default definition for M4. This is used if the makefile can't
+# locate m4 in objdir.
+
+for prog in gm4 gnum4 m4
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_M4="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_M4" && break
+done
+
# Generate a default definition for LEX. This is used if the makefile can't
# locate flex in objdir.
@@ -840,6 +902,9 @@ 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.
@@ -852,7 +917,7 @@ if [ "${build}" != "${host}" ]; then
tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
for var in ${tools}; do
- if [ -z "`eval 'echo $'"${var}"`" -a -r Makefile ]; then
+ if [ -z "`eval 'echo $'"${var}"`" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
@@ -873,7 +938,7 @@ t loop
AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
BISON=${BISON-bison}
CC=${CC-${host_alias}-gcc}
- CFLAGS=${CFLAGS-"-g -O2"}
+ CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
CXX=${CXX-${host_alias}-c++}
CXXFLAGS=${CXXFLAGS-"-g -O2"}
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
@@ -953,11 +1018,11 @@ else
CC="gcc"
echo 'void f(){}' > conftest.c
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CFLAGS-"-g -O2"}
+ CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CFLAGS-"-O2"}
+ CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"}
+ CXXFLAGS=${CXXFLAGS-"-O2"}
fi
rm -f conftest*
break
@@ -965,6 +1030,24 @@ else
done
IFS="$save_ifs"
CC=${CC-cc}
+ else
+ if test -z "${CFLAGS}"; then
+ # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
+ # is set to a version of gcc.
+ case "${CC}" in
+ *gcc)
+ echo 'void f(){}' > conftest.c
+ if test -z "`${CC} -g -c conftest.c 2>&1`"; then
+ CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+ else
+ CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"}
+ CXXFLAGS=${CXXFLAGS-"-O2"}
+ fi
+ rm -f conftest*
+ ;;
+ esac
+ fi
fi
CXX=${CXX-"c++"}
@@ -1050,27 +1133,34 @@ for subdir in . ${subdirs} ; do
set ${links}; link=$1; shift; links=$*
if [ ! -r ${srcdir}/${file} ] ; then
+ if [ ! -r ${file} ] ; then
+
echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
exit 1
+ else
+ srcfile=${file}
+ fi
+ else
+ srcfile=${srcdir}/${file}
fi
${remove} -f ${link}
# Make a symlink if possible, otherwise try a hard link
- if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
+ if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
true
else
# We need to re-remove the file because Lynx leaves a
# very strange directory there when it fails an NFS symlink.
${remove} -r -f ${link}
- ${hard_link} ${srcdir}/${file} ${link}
+ ${hard_link} ${srcfile} ${link}
fi
if [ ! -r ${link} ] ; then
- echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
+ echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
exit 1
fi
- echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
+ echo "Linked \"${link}\" to \"${srcfile}\"."
done
# Create a .gdbinit file which runs the one in srcdir
@@ -1243,14 +1333,24 @@ EOF
echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
fi
- # provide a proper gxx_include_dir to all subdirs.
- # Note, if you change the default, make sure to fix both here
- # and in the gcc subdirectory.
- if test -z "${with_gxx_include_dir}"; then
- echo gxx_include_dir = '${prefix}/include/g++' >> ${Makefile}
+ # record if we want to build shared libs.
+ if test -z "${enable_shared}"; then
+ echo enable_shared = no >> ${Makefile}
else
- echo gxx_include_dir = ${with_gxx_include_dir} >> ${Makefile}
+ echo enable_shared = ${enable_shared} >> ${Makefile}
fi
+ # record if we want to rumtime library stuff installed in libsubdir.
+ if test -z "${enable_version_specific_runtime_libs}"; then
+ echo enable_version_specific_runtime_libs = no >> ${Makefile}
+ else
+ echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
+ fi
+
+ # Emit a macro which describes the file containing gcc's
+ # version number.
+ echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
+ # And emit a macro defining gcc's version number.
+ echo gcc_version = ${gcc_version} >> ${Makefile}
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
# remove any form feeds.
@@ -1313,7 +1413,9 @@ EOF
-e "s|^tooldir[ ]*=.*$|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}:" \
${subdir}/Makefile.tem >> ${Makefile}
+
sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
mv -f ${Makefile}.tem ${Makefile}
@@ -1398,19 +1500,33 @@ ${progname}" ${arguments} "
done
# If there are subdirectories, then recur.
-if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
- for configdir in ${configdirs} ; do
+if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
+ for configdir in ${configdirs} ${extraconfigdirs} ; do
+
+ # If configdir contains ',' it is
+ # srcdir,builddir,target_alias
+ # These come from extraconfigdirs.
+ case ${configdir} in
+ *,*)
+ eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
+ ;;
+ *)
+ cfg_dir=${configdir}
+ bld_dir=${configdir}
+ tgt_alias=${target_alias}
+ ;;
+ esac
- if [ -d ${srcdir}/${configdir} ] ; then
+ if [ -d ${srcdir}/${cfg_dir} ] ; then
eval echo Configuring ${configdir}... ${redirect}
case "${srcdir}" in
".") ;;
*)
- if [ ! -d ./${configdir} ] ; then
- if mkdir ./${configdir} ; then
+ if [ ! -d ./${bld_dir} ] ; then
+ if mkdir ./${bld_dir} ; then
true
else
- echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
+ echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2
exit 1
fi
fi
@@ -1418,21 +1534,21 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
esac
POPDIR=${PWD=`pwd`}
- cd ${configdir}
+ cd ${bld_dir}
### figure out what to do with srcdir
case "${srcdir}" in
".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place.
/*) # absolute path
- newsrcdir=${srcdir}/${configdir}
+ newsrcdir=${srcdir}/${cfg_dir}
srcdiroption="--srcdir=${newsrcdir}"
;;
?:*) # absolute path on win32
- newsrcdir=${srcdir}/${configdir}
+ newsrcdir=${srcdir}/${cfg_dir}
srcdiroption="--srcdir=${newsrcdir}"
;;
*) # otherwise relative
- newsrcdir=../${srcdir}/${configdir}
+ newsrcdir=../${srcdir}/${cfg_dir}
srcdiroption="--srcdir=${newsrcdir}"
;;
esac
@@ -1462,13 +1578,13 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
*) recprog=../${progname} ;;
esac
else
- eval echo No configuration information in ${configdir} ${redirect}
+ eval echo No configuration information in ${cfg_dir} ${redirect}
recprog=
fi
### The recursion line is here.
if [ ! -z "${recprog}" ] ; then
- if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
+ if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \
${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
true
diff --git a/contrib/binutils/configure.in b/contrib/binutils/configure.in
index 5faaf02..ca1b04f 100644
--- a/contrib/binutils/configure.in
+++ b/contrib/binutils/configure.in
@@ -14,7 +14,7 @@
## For more information on these two systems, check out the documentation
## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi).
-# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1992-99, 2000 Free Software Foundation, Inc.
#
# 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
@@ -41,7 +41,7 @@
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tclX itcl tix libgui"
+host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui"
if [ "${enable_gdbgui}" = "yes" ] ; then
host_libs="${host_libs} libgui"
@@ -50,13 +50,18 @@ 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 bash m4 autoconf automake 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"
+host_tools="texinfo 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"
# 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)
#
-target_libs="target-libiberty target-libgloss target-newlib target-libio target-librx target-libstdc++ target-libg++"
-
+target_libs="target-libiberty \
+ target-libgloss \
+ target-newlib \
+ target-libio \
+ target-librx \
+ target-libstdc++ \
+ target-libg++"
# these tools are built using the target libs, and are intended to run only
# in the target environment
@@ -79,11 +84,11 @@ target_tools="target-examples target-groff target-gperf"
#
# This must be a single line because of the way it is searched by grep in
# the code below.
-native_only="autoconf automake cvssrc emacs emacs19 fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time bash prms snavigator gnuserv target-gperf libtool"
+native_only="autoconf automake libtool cvssrc emacs emacs19 fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time ash bash bzip2 prms snavigator gnuserv target-gperf"
# directories to be built in a cross environment only
#
-cross_only="target-libgloss target-newlib target-cygmon target-opcodes"
+cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub"
## All tools belong in one of the four categories, and are assigned above
## We assign ${configdirs} this way to remove all embedded newlines. This
@@ -149,6 +154,9 @@ case "${host}" in
mips*-*-sysv*)
host_makefile_frag="${host_makefile_frag} config/mh-riscos"
;;
+ i[3456]86-*-sysv5*)
+ host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
+ ;;
i[3456]86-*-dgux*)
host_makefile_frag="${host_makefile_frag} config/mh-dgux386"
;;
@@ -164,6 +172,9 @@ case "${host}" in
i[3456]86-*-sco*)
host_makefile_frag="${host_makefile_frag} config/mh-sco"
;;
+ i[3456]86-*-udk*)
+ host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
+ ;;
i[3456]86-*-isc*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv"
;;
@@ -173,18 +184,18 @@ case "${host}" in
i[3456]86-*-aix*)
host_makefile_frag="${host_makefile_frag} config/mh-aix386"
;;
- i[3456]86-*-go32*)
- host_makefile_frag="${host_makefile_frag} config/mh-go32"
- ;;
i[3456]86-*-msdosdjgpp*)
- host_makefile_frag="${host_makefile_frag} config/mh-go32"
+ host_makefile_frag="${host_makefile_frag} config/mh-djgpp"
;;
- *-cygwin32*)
- host_makefile_frag="${host_makefile_frag} config/mh-cygwin32"
+ *-cygwin*)
+ host_makefile_frag="${host_makefile_frag} config/mh-cygwin"
;;
*-mingw32*)
host_makefile_frag="${host_makefile_frag} config/mh-mingw32"
;;
+ *-interix*)
+ host_makefile_frag="${host_makefile_frag} config/mh-interix"
+ ;;
*-windows*)
host_makefile_frag="${host_makefile_frag} config/mh-windows"
;;
@@ -223,7 +234,7 @@ fi
# If we aren't going to be using gcc, see if we can extract a definition
# of CC from the fragment.
-if [ -z "${CC}" -a "${build}" = "${host}" ]; then
+if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
found=
for dir in $PATH; do
@@ -234,7 +245,7 @@ if [ -z "${CC}" -a "${build}" = "${host}" ]; then
fi
done
IFS="$save_ifs"
- if [ -z "${found}" -a -n "${host_makefile_frag}" -a -f "${srcdir}/${host_makefile_frag}" ]; then
+ if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then
xx=`sed -n -e 's/^[ ]*CC[ ]*=[ ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}`
if [ -n "${xx}" ] ; then
CC=$xx
@@ -262,22 +273,34 @@ esac
if [ x${shared} = xyes ]; then
case "${host}" in
- hppa*)
+ alpha*-*-linux*)
+ host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic"
+ ;;
+ arm*-*-*)
+ host_makefile_frag="${host_makefile_frag} config/mh-armpic"
+ ;;
+ hppa*-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-papic"
;;
- i[3456]86-*)
+ i[3456]86-*-cygwin*)
+ # We don't want -fPIC on Cygwin.
+ ;;
+ i[3456]86-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-x86pic"
;;
- sparc64-*)
+ i370-*-*)
+ host_makefile_frag="${host_makefile_frag} config/mh-i370pic"
+ ;;
+ sparc64-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-sparcpic"
;;
- powerpc*-*)
- host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
+ powerpc*-*-aix*)
+ # We don't want -fPIC on AIX.
;;
- alpha*-*-linux*)
- host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic"
+ powerpc*-*-*)
+ host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
;;
- *)
+ *-*-*)
if test -f ${srcdir}/config/mh-${host_cpu}pic; then
host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
fi
@@ -306,9 +329,35 @@ case "${target}" in
powerpc-*-netware*)
target_makefile_frag="${target_makefile_frag} config/mt-netware"
;;
- *-*-linux-gnu)
+ *-*-linux-gnu*)
target_makefile_frag="${target_makefile_frag} config/mt-linux"
;;
+ *-*-aix4.[3456789]* | *-*-aix[56789].*)
+ target_makefile_frag="${target_makefile_frag} config/mt-aix43"
+ ;;
+ mips*-*-pe | sh*-*-pe | *arm-wince-pe)
+ target_makefile_frag="${target_makefile_frag} config/mt-wince"
+ ;;
+esac
+
+# If --enable-target-optspace always use -Os instead of -O2 to build
+# the target libraries, similarly if it is not specified, use -Os
+# on selected platforms.
+case "${enable_target_optspace}:${target}" in
+ yes:*)
+ target_makefile_frag="${target_makefile_frag} config/mt-ospace"
+ ;;
+ :d30v-*)
+ target_makefile_frag="${target_makefile_frag} config/mt-d30v"
+ ;;
+ :m32r-* | :d10v-* | :fr30-*)
+ target_makefile_frag="${target_makefile_frag} config/mt-ospace"
+ ;;
+ no:* | :*)
+ ;;
+ *)
+ echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
+ ;;
esac
skipdirs=
@@ -342,20 +391,17 @@ if [ x"${host}" = x"${target}" ] ; then
# that are in the 'cross only' list
skipdirs="${skipdirs} ${cross_only}"
is_cross_compiler=no
- target_subdir=.
- case "${host}" in
- # We need multilib support for irix6, to get libiberty built
- # properly for o32 and n32.
- mips-sgi-irix6*) target_subdir=${host} ;;
- esac
else
# similarly, don't build the targets in the 'native only'
# list when building a cross compiler
skipdirs="${skipdirs} ${native_only}"
is_cross_compiler=yes
- target_subdir=${target_alias}
fi
+# We always want to use the same name for this directory, so that dejagnu
+# can reliably find it.
+target_subdir=${target_alias}
+
if [ ! -d ${target_subdir} ] ; then
if mkdir ${target_subdir} ; then true
else
@@ -418,7 +464,7 @@ if [ x${with_stabs} = x ]; then
case "${target}" in
mips*-*-irix6*)
;;
- mips*-*-* | alpha*-*-osf* | i[3456]86*-*-sysv4* | i[3456]86*-*-unixware*)
+ mips*-*-* | alpha*-*-osf*)
with_stabs=yes;
withoptions="${withoptions} --with-stabs"
;;
@@ -463,8 +509,8 @@ case "${host}" in
configdirs="$configdirs dosrel" ;;
i[3456]86-*-mingw32*)
configdirs="$configdirs dosrel" ;;
- *-cygwin32*)
- configdirs="$configdirs dosrel" ;;
+ *-cygwin*)
+ configdirs="$configdirs libtermcap dosrel" ;;
esac
# Remove more programs from consideration, based on the host or
@@ -482,16 +528,13 @@ case "${host}" in
;;
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"
- noconfigdirs="expect dejagnu cvs autoconf automake send-pr gprof rcs guile perl texinfo apache inet libtool"
+ noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool"
;;
- *-*-cygwin32)
- noconfigdirs="autoconf automake send-pr gprof rcs guile perl texinfo apache inet"
- ;;
- *-*-windows*)
-# This is only used to build WinGDB...
-# note that powerpc-eabi depends on sim configured before gdb.
- configdirs="bfd libiberty opcodes readline sim gdb"
- target_configdirs=
+ i[3456]86-*-beos*)
+ noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
+ ;;
+ *-*-cygwin*)
+ noconfigdirs="autoconf automake send-pr rcs guile perl texinfo apache inet"
;;
*-*-netbsd*)
noconfigdirs="rcs"
@@ -531,6 +574,21 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ 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 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"
+ skipdirs="$skipdirs target-newlib"
+ case "${host}" in
+ *-*-cygwin*) ;; # keep gdb and readline
+ *) noconfigdirs="$noconfigdirs gdb readline target-libio target-libstdc++ target-libg++"
+ ;;
+ esac
+ ;;
arc-*-*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
@@ -539,26 +597,67 @@ case "${target}" in
;;
arm-*-coff*)
noconfigdirs="$noconfigdirs target-libgloss"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ arm-*-elf*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ arm-*-oabi*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
+ c4x-*-*)
+ noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
;;
thumb-*-coff)
noconfigdirs="$noconfigdirs target-libgloss"
;;
- thumb-*-pe) # CYGNUS LOCAL nickc/thumb
+ thumb-*-elf)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
+ thumb-*-oabi)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
+ strongarm-*-elf)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ strongarm-*-coff)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ thumb-*-pe)
noconfigdirs="$noconfigdirs target-libgloss"
;;
arm-*-riscix*)
noconfigdirs="$noconfigdirs ld target-libgloss"
;;
d10v-*-*)
- noconfigdirs="$noconfigdirs target-librx target-libg++ target-libstdc++ target-libio target-libgloss"
+ noconfigdirs="$noconfigdirs target-librx target-libg++ target-libstdc++ target-libio"
+ ;;
+ d30v-*-*)
+ ;;
+ fr30-*-elf*)
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
+ fi
;;
h8300*-*-* | \
h8500-*-*)
noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
;;
hppa*-*-*elf* | \
+ hppa*-*-linux-gnu* | \
hppa*-*-lites*)
- # Do configure ld/binutils/gas for this case.
+ # Do configure ld/binutils/gas for the above cases.
;;
hppa*-*-*)
# HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach
@@ -570,6 +669,11 @@ case "${target}" in
esac
noconfigdirs="$noconfigdirs ld shellutils"
;;
+ i[3456]86-*-coff | i[3456]86-*-elf)
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-libstub target-cygmon"
+ fi
+ ;;
i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*)
# but don't build gdb
noconfigdirs="$noconfigdirs gdb target-libg++ target-libstdc++ target-libio target-librx"
@@ -585,15 +689,15 @@ case "${target}" in
;;
esac
;;
- *-*-cygwin32*)
- target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs target-gperf target-libgloss"
+ *-*-cygwin*)
+ target_configdirs="$target_configdirs target-libtermcap target-winsup"
+ noconfigdirs="$noconfigdirs target-libgloss"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
- # Can't build gdb for cygwin32 if not native.
+ # Can't build gdb for Cygwin if not native.
case "${host}" in
- *-*-cygwin32*) ;; # keep gdb tcl tk expect etc.
+ *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
*) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
;;
esac
@@ -604,16 +708,13 @@ case "${target}" in
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 gprof ld target-libgloss"
+ noconfigdirs="$noconfigdirs ld target-libgloss"
;;
i[3456]86-*-sco*)
noconfigdirs="$noconfigdirs gprof target-libgloss"
;;
i[3456]86-*-solaris2*)
- # The linker does static linking correctly, but the Solaris C library
- # has bugs such that some important functions won't work when statically
- # linked. (See man pages for getpwuid, for example.)
- noconfigdirs="$noconfigdirs ld target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss"
;;
i[3456]86-*-sysv4*)
# The SYSV4 C compiler doesn't handle Emacs correctly
@@ -624,16 +725,38 @@ case "${target}" in
# but that's okay since emacs doesn't work anyway
noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss"
;;
+ i[3456]86-*-beos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
+ ;;
+ m68k-*-elf*)
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
+ m68k-*-coff*)
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
mn10200-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-libstub target-cygmon"
+ fi
;;
mn10300-*-*)
noconfigdirs="$noconfigdirs"
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
+ fi
;;
powerpc-*-aix*)
# copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss"
- # This is needed until gcc and ld are fixed to work together.
+ # 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 cvssrc target-libgloss ld"
use_gnu_ld=no
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
@@ -646,14 +769,22 @@ case "${target}" in
powerpcle-*-solaris*)
noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv"
;;
+ powerpc-*-eabi)
+ if [ x${is_cross_compiler} != xno ] ; then
+ target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
+ fi
+ ;;
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"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs gprof"
- # This is needed until gcc and ld are fixed to work together.
+ # 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"
use_gnu_ld=no
;;
rs6000-*-*)
@@ -668,9 +799,14 @@ case "${target}" in
noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss"
;;
mips*-*-irix6*)
- # The GNU assembler and linker do not support IRIX 6.
+ # The GNU assembler does not support IRIX 6.
# emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
- noconfigdirs="$noconfigdirs ld gas gprof emacs target-libgloss"
+ 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"
@@ -678,6 +814,10 @@ case "${target}" in
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss"
;;
+ mipstx39-*-*)
+ noconfigdirs="$noconfigdirs gprof" # same as generic mips
+ target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
+ ;;
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
@@ -695,17 +835,17 @@ case "${target}" in
;;
sparc-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
- target_configdirs="${target_configdirs} target-cygmon"
+ target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
;;
sparc64-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
- target_configdirs="${target_configdirs} target-cygmon"
+ target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
;;
- sparclite-*-aout*)
+ sparclite-*-*)
if [ x${is_cross_compiler} != xno ] ; then
- target_configdirs="${target_configdirs} target-cygmon"
+ target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
sparc-*-sunos4*)
@@ -721,12 +861,22 @@ case "${target}" in
v850-*-*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
+ v850e-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
+ v850ea-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
vax-*-vms)
noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss"
;;
vax-*-*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ *-*-linux*)
+ # linux has rx in libc
+ skipdirs="$skipdirs target-librx"
+ ;;
*-*-lynxos*)
# Newlib makes problems for libg++ in crosses.
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -808,12 +958,12 @@ fi
# Deconfigure all subdirectories, in case we are changing the
# configuration from one where a subdirectory is supported to one where it
# is not.
-if [ -z "${norecursion}" -a -n "${configdirs}" ]; then
+if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then
for i in `echo ${configdirs} | sed -e s/target-//g` ; do
rm -f $i/Makefile
done
fi
-if [ -z "${norecursion}" -a -n "${target_configdirs}" ]; then
+if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
rm -f ${target_subdir}/$i/Makefile
done
@@ -984,21 +1134,10 @@ if [ "${shared}" = "yes" ]; then
esac
fi
-# If we are building for a win32 host, then set INSTALL_PROGRAM_ARGS to
-# -x. This will cause programs to be installed with .exe extensions.
-case "${host}" in
-*-*-cygwin32* | i[3456]86-*-mingw32)
- sed -e 's/^INSTALL_PROGRAM_ARGS[ ]*=.*$/INSTALL_PROGRAM_ARGS = -x/' \
- Makefile > Makefile.tem
- rm -f Makefile
- mv -f Makefile.tem Makefile
- ;;
-esac
-
# Record target_configdirs and the configure arguments in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
targargs=`echo "${arguments}" | \
- sed -e 's/--norecursion//' \
+ sed -e 's/--no[^ ]*//' \
-e 's/--cache[a-z-]*=[^ ]*//' \
-e 's/--ho[a-z-]*=[^ ]*//' \
-e 's/--bu[a-z-]*=[^ ]*//' \
@@ -1018,10 +1157,46 @@ if [ x${enable_multilib} = x ]; then
targargs="--enable-multilib ${targargs}"
fi
+# Pass --with-newlib if appropriate. Note that target_configdirs has
+# changed from the earlier setting of with_newlib.
+if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
+ targargs="--with-newlib ${targargs}"
+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.
+# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
+gxx_include_dir=
+if test -n "${with_gxx_include_dir}"; then
+ case "${with_gxx_include_dir}" in
+ yes )
+ echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
+ exit 1
+ ;;
+ no )
+ ;;
+ * )
+ gxx_include_dir=${with_gxx_include_dir}
+ ;;
+ esac
+fi
+if test x${gxx_include_dir} = x; then
+ if test x${enable_version_specific_runtime_libs} = xyes; then
+ gxx_include_dir='${libsubdir}/include/g++'
+ else
+ . ${topsrcdir}/config.if
+ gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
+ fi
+else
+ gxx_include_dir=${gxx_include_dir}
+fi
+
targargs="--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%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
+ -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
Makefile > Makefile.tem
rm -f Makefile
mv -f Makefile.tem Makefile
diff --git a/contrib/binutils/etc/ChangeLog b/contrib/binutils/etc/ChangeLog
new file mode 100644
index 0000000..0453a3e
--- /dev/null
+++ b/contrib/binutils/etc/ChangeLog
@@ -0,0 +1,507 @@
+1999-04-01 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * add-log.el, add-log.vi: New files.
+
+Wed Jan 20 01:33:50 1999 Angela Marie Thomas (angela@cygnus.com)
+
+ * comp-tools-verify: Remove some checks that are no longer valid.
+
+1998-12-03 Nick Clifton <nickc@cygnus.com>
+
+ * targetdoc/fr30.texi: New document.
+
+Thu Oct 1 21:15:59 1998 Angela Marie Thomas (angela@cygnus.com)
+
+ * comp-tools-fix, cross-tools-fix: Replace /usr/include
+ with ${FIXINCDIR}.
+
+Tue Aug 11 19:22:11 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * make-rel-sym-tree (version): Update calculation.
+
+Fri Jun 12 21:34:01 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.texi: Various additions.
+ * Makefile.in (TEXI2HTML, DVIPS): New variables.
+ (standards.ps): New target.
+ (configure.dvi): Copy .tin files in as well.
+ (configure.ps, configure.html): New targets.
+ (clean): Remove configdev.jpg and configbuild.jpg.
+ * configdev.fig: New file.
+ * configdev.ein: New file (EPS version of configdev.fig).
+ * configdev.jin: New file (JPEG version of configdev.fig).
+ * configbuild.fig: New file.
+ * configbuild.ein: New file (EPS version of configbuild.fig).
+ * configbuild.jin: New file (JPEG version of configbuild.fig).
+
+Wed Jun 10 14:41:25 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.texi: New file.
+ * configdev.tin: New file.
+ * configbuild.tin: New file.
+ * Makefile.in (MAKEINFO): Use makeinfo from texinfo directory if
+ it exists.
+ (TEXI2DVI): Likewise for texi2dvi.
+ (INFOFILES): Add configure.info.
+ (DVIFILES): Add configure.dvi.
+ (info): Only build info files if the source files exist.
+ (install-info): Only install info files if they exist.
+ (dvi): Only build DVI files if the sources files exist.
+ (configure.info): New target.
+ (configure.dvi): New target.
+ (clean): Remove configdev and configbuild derived files.
+
+ Remove obsolete documentation.
+ * intro.texi: Remove.
+ * install.texi: Remove.
+ * config-names.texi: Remove.
+ * screen1.eps: Remove.
+ * screen1.obj: Remove.
+ * screen2.eps: Remove.
+ * screen2.obj: Remove.
+ * Makefile.in: Remove references to the above.
+
+Thu May 21 14:34:51 1998 Nick Clifton <nickc@cygnus.com>
+
+ * targetdoc/arm-interwork.texi: Add note about ignoring linker
+ warning message when using --support-old-code.
+
+Mon May 18 14:27:37 1998 Angela Marie Thomas (angela@cygnus.com)
+
+ * Install.in, comp-tools-fix, comp-tools-verify, cross-tools-fix:
+ Use $GCCvn rather than substitute everywhere.
+
+Thu May 14 14:43:10 1998 Nick Clifton <nickc@cygnus.com>
+
+ * targetdoc/arm-interwork.texi: Document dlltool support of
+ interworking.
+
+Thu May 7 16:49:38 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * Install.in: Remove references to TCL_LIBRARY, TK_LIBRARY,
+ and GDBTK_FILENAME.
+
+Wed Apr 1 17:11:44 1998 Nick Clifton <nickc@cygnus.com>
+
+ * targetdoc/arm-interwork.texi: Document ARM/thumb interworking.
+
+Tue Mar 31 15:28:20 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * standards.texi, make-stds.texi: Update to current FSF versions.
+ * Makefile.in (standards.info): Depend upon make-std.texi.
+
+Tue Mar 24 16:13:26 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
+
+ * configure: Regenerate with autoconf 2.12.1 to fix shell issues
+ for NT native builds.
+
+Mon Mar 9 16:41:04 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * make-rel-sym-tree (binprogs): Add objcopy.
+
+Tue Feb 24 18:11:58 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * make-rel-sym-tree: as.new -> as-new, ld.new -> ld-new
+ nm.new -> nm-new. Make symlinks to crt*.o.
+
+Fri Nov 21 12:54:58 1997 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * Makefile.in: Add --no-split argument to avoid creating files
+ with names longer than 14 characters.
+
+Thu Sep 25 13:13:11 1997 Jason Molenda (crash@pern.cygnus.com)
+
+ * intro.texi: Add closing ifset.
+
+Mon Sep 1 10:31:32 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * Install.in: Move setting HOST and TARGET to the beginning
+ of the file for editing convenience.
+
+Mon Sep 1 10:28:37 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * Install.in.: More friendly options/messages when extracting
+ from a file instead of a tape device.
+
+Tue Jun 17 15:50:23 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * Install.in: Add /usr/bsd to PATH for Irix (home of compress)
+
+Thu Jun 12 13:47:00 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * Install.in (show_exec_prefix_msg): fix quoting
+
+Wed Jun 4 15:31:43 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * rebuilding.texi: Removed.
+
+Sat May 24 18:02:20 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * cross-tools-fix: Remove host check since it doesn't matter
+ for this case.
+ * Install.in (guess_system): clean up more unused hosts.
+ * Install.in, cross-tools-fix, comp-tools-fix, comp-tools-verify:
+ Hack for host check to not warn the user for certain cases.
+
+Fri May 23 23:46:10 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * subst-strings: Remove a lot of unused code
+ * Install.in: Remove reference to TAPEdflt, use variables instead of
+ string substitution when able.
+
+Fri Apr 11 17:25:52 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Change file named in AC_INIT to Makefile.in.
+ * configure: Rebuild.
+
+Fri Apr 11 18:12:42 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Install.in (guess_system): Back out change to INSTALLHOST to
+ call all IRIX systems "mips-sgi-irix4"
+
+ * Makefile.in: Remove references to configure.texi and cfg-paper.texi.
+
+Thu Apr 10 23:26:45 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * srctree.texi, emacs-relnotes.texi, cfg-paper.texi: Remove.
+ * Install.in: Remove Ultrix-specific hacks.
+ Update Cygnus phone numbers.
+ (guess_system): Remove some old systems (Ultrix, OSF1 v1 & 2,
+ m68k-HPUX, m68k SunOS, etc.)
+ (show_gnu_root_msg): Remove.
+ Removed all the remove option code.
+
+Thu Apr 10 23:23:33 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * configure.man, configure.texi: Remote.
+
+Mon Apr 7 18:15:00 1997 Brendan Kehoe <brendan@cygnus.com>
+
+ * Fix the version string for OSF1 4.0 to recognize either
+ V4.* or X4.*
+
+Mon Apr 7 15:34:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * standards.texi, make-stds.texi: Update to current FSF versions.
+
+Tue Nov 19 15:36:14 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * make-rel-sym-tree: New file.
+
+Wed Oct 23 00:34:07 1996 Angela Marie Thomas (angela@cygnus.com)
+
+ * Lots of patches from progressive...
+ * Install.in: restore DDOPTS for AIX 4.x
+ * Install.in, subst-strings: add case for DG Aviion
+ * subst-strings: fix typo in INSTALLdir var setting
+ * comp-tools-verify: set SHLIB_PATH for shared libs
+ * Install.in, subst-strings: add case for solaris2.5
+ * Install.in: fix regression for hppa1.1 check
+ * comp-tools-fix: set LD_LIBRARY_PATH
+ * comp-tools-fix: If fixincludes fixes /usr/include/limits.h,
+ install it as syslimits.h.
+
+Wed Oct 16 19:20:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * Install.in (guess_system): Treat powerpc-ibm-aix4.1 the same as
+ rs6000-ibm-aix4.1, since the compiler now uses common mode by
+ default.
+
+Wed Oct 2 15:39:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * configure.in (AC_PROG_INSTALL): Added.
+ * Makefile.in (distclean): Remove config.cache.
+
+Wed Oct 2 14:33:58 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * configure.in: Switch to autoconf configure.in.
+ * configure: New.
+ * Makefile.in: Use autoconf-substituted values.
+
+Tue Jun 25 18:56:08 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (datadir): Changed to $(prefix)/share.
+
+Fri Mar 29 11:38:01 1996 J.T. Conklin (jtc@lisa.cygnus.com)
+
+ * configure.man: Changed to be recognized by catman -w on Solaris.
+
+Wed Dec 6 15:40:28 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * comp-tools-fix (fixincludes): Define FIXPROTO_DEFINES from
+ .../install-tools/fixproto-defines.
+
+Sun Nov 12 19:31:27 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * comp-tools-verify (verify_cxx_initializers): delete argv,
+ argc declarations, add -static to compile line.
+ (verify_cxx_hello_world): delete argv, argc declarations, add
+ -static to compile line.
+
+Wed Sep 20 13:21:52 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (maintainer-clean): New target, synonym for
+ realclean.
+
+Mon Aug 28 17:25:49 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Install.in (PATH): add /usr/ucb to $PATH (for SunOS 4.1.x).
+
+Tue Aug 15 21:51:58 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Install.in (guess_system): Match OSF/1 v3.x as the same as
+ v2.x--v2.x binaries are upward compatible.
+
+Tue Aug 15 21:46:54 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Install.in (guess_system): recognize HP 9000/800 systems as the
+ same as HP 9000/700 systems.
+
+Tue Aug 8 13:11:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * Install.in: For emacs, run show_emacs_alternate_msg and exit.
+ (show_emacs_alternate_msg): New message saying how emacs can't be
+ installed in an alternate prefix.
+
+Thu Jun 8 00:42:56 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
+
+ * subst-strings: change du commands to $BINDIR/. & $SRCDIR/. just
+ in case they are symlinks.
+
+Tue Apr 18 14:23:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * cdk-fix: Extracted table of targets that don't need their
+ headers fixed from gcc's configure script.
+
+ * cdk-fix, cdk-verify: Use ${HOST} instead of ||HOSTstr||
+
+ * cdk-fix, cdk-verify: New files, install script fragments used
+ for Cygnus Developer's Kit.
+
+ * Install.in (do_mkdir): New function.
+
+ * Install.in: Added support for --with and --without options.
+ Changed so that tape commands are not run when extracting
+ from a file.
+ (do_mt): Changed to take only one argument.
+
+Wed Mar 29 11:16:38 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Install.in: catch UNAME==alpha-dec-osf2.x and correct entry for
+ alpha-dec-osf1.x
+
+Fri Jan 27 12:04:29 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * subst-strings (mips-sgi-irix5): New entry in table.
+
+Thu Jan 19 12:15:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Install.in: Major rewrite, bundle dependent code (for example,
+ fixincludes for comp-tools) will be inserted into the Install
+ script when it is generated.
+
+Tue Jan 17 16:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * Makefile.in (Makefile): Rebuild using $(SHELL).
+
+Thu Nov 3 19:30:33 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (install-info): Depend on info.
+
+Fri Aug 19 16:16:38 1994 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Install.in: set $FIX_HEADER so fixproto can find fix-header.
+
+Fri May 6 16:18:58 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Makefile.in (install-info): add a semicolon in the if statement.
+
+Fri Apr 29 16:56:07 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * cfg-paper.texi: Update some outdated information.
+
+ * Makefile.in (install-info): Pass file, not directory, as last
+ arg to INSTALL_DATA.
+ (uninstall): New target.
+
+Thu Apr 28 14:42:22 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure.texi: Comment out @smallbook.
+
+ * Makefile.in: Define TEXI2DVI and TEXIDIR, and use the latter.
+ Remove info files in realclean, not clean, per coding standards.
+ Remove TeX output in clean.
+
+Tue Apr 26 17:18:03 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: fixincludes output is actually put in fixincludes.log,
+ but echo'ed messages claim it is fixinc.log. This is the same
+ messages as I logged in March 4 1994, but for some reason we found
+ the change hadn't been done. I'll have to dig through the logs
+ and find out what I really did do that day. :)
+
+Mon Apr 25 20:28:19 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: use eval to call do_mt() for Ultrix brokenness.
+
+Mon Apr 25 20:00:00 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in(do_mt): exit with error status 1 if # of parameters
+ != 3.
+
+Mon Apr 25 19:42:36 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: lose TAPE_FORWARD and TAPE_REWIND, add do_mt()
+ to do all tape movement operations. Currently untested. Addresses
+ PR # 4886 from bull.
+
+ * Install.in: add 1994 to the copyright thing.
+
+Fri Apr 22 19:05:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * standards.texi: Update from FSF.
+
+Fri Apr 22 15:46:10 1994 Jason Molenda (crash@cygnus.com)
+
+ * Install.in: Add $DDOPTS, has ``bs=124b'' for all systems except
+ AIX (some versions of AIX don't understand bs=124b. Silly OS).
+
+Mon Apr 4 22:55:05 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: null out $TOOLS before adding stuff to it
+ non-destructively.
+
+Wed Mar 30 21:45:35 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * standards.texi: Fix typo.
+
+ * configure.texi, configure.man: Document --disable-.
+
+Mon Mar 28 13:22:15 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * standards.texi: Update from FSF.
+
+Sat Mar 26 09:21:44 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * standards.texi, make-stds.texi: Update from FSF.
+
+Fri Mar 25 22:59:45 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * configure.texi, configure.man: Document --enable-* options.
+
+Wed Mar 23 23:38:24 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: set CPP to be gcc -E for fixincludes.
+
+Wed Mar 23 13:42:48 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: set PATH to $PATH:/bin:/usr/bin so we can pick
+ up native tools even if the user doesn't have them in his
+ path.
+
+ * Install.in: ``hppa-1.1-hp-hpux'' -> ``hppa1.1-hp-hpux''.
+
+Tue Mar 15 22:09:20 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: TAPE_REWIND and TAPE_FORWARD variables for Unixunaware,
+ added switch statement to detect if system is Unixunaware.
+
+Fri Mar 4 12:10:30 1994 Jason Molenda (crash@sendai.cygnus.com)
+
+ * Install.in: fixincludes output is actually put in fixincludes.log,
+ but echo'ed messages claim it is fixinc.log.
+
+Wed Nov 3 02:58:02 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com)
+
+ * subst-strings: output TEXBUNDLE for more install notes matching
+ * install-texi.in: PRMS info now exists
+
+Tue Oct 26 16:57:12 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * subst-strings: match solaris*. Also, add default case to catch
+ and error out for unrecognized systems.
+
+Thu Aug 19 18:21:31 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * Install.in: handle the new fixproto work
+
+Mon Jul 19 12:05:41 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com)
+
+ * Install.in: remove "MT=tctl" for AIX (not needed, and barely
+ worked anyway)
+
+Mon Jun 14 19:09:22 1993 Jeffrey Osier (jeffrey@cygnus.com)
+
+ * subst-strings: changed HOST to recognize Solaris for install notes
+
+Thu Jun 10 16:01:25 1993 Jeffrey Osier (jeffrey@cygnus.com)
+
+ * dos-inst.texi: new file.
+
+Wed Jun 9 19:23:59 1993 Jeffrey Osier (jeffrey@rtl.cygnus.com)
+
+ * install-texi.in: added conditionals (nearly complete)
+ cleaned up
+ added support for other releases (not done)
+
+Wed Jun 9 15:53:58 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * Makefile.in (install-info): Use INSTALL_DATA.
+ ({dist,real}clean): Also delete Makefile and config.status.
+
+Fri Jun 4 17:09:56 1993 Jeffrey Osier (jeffrey@cygnus.com)
+
+ * subst-strings: added data for OS_STRING
+
+ * subst-strings: added support for OS_STRING
+
+Thu Jun 3 00:37:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Install.in: pull COPYING and COPYING.LIB off of the tape
+
+Tue Jun 1 16:52:08 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * subst-strings: replace RELEASE_DIR too
+
+Mon Mar 22 23:55:27 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: add installcheck target
+
+Wed Mar 17 02:21:15 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Install.in: fix 'source only' extraction bug where it looked for
+ the src dir under H-<host>/src instead of src; also remove stray
+ reference to EMACSHIBIN
+
+Mon Mar 15 01:25:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * make-stds.texi: added 'installcheck' to the standard targets
+
+Tue Mar 9 19:48:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * standards.texi: added INFO-DIR-ENTRY, updated version from the FSF
+
+Tue Feb 9 12:40:23 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (standards.info): Added -I$(srcdir) to find
+ make-stds.texi.
+
+Mon Feb 1 16:32:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * standards.texi: updated to latest FSF version, which includes:
+
+ * make-stds.texi: new file
+
+Mon Nov 30 01:31:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * install-texi.in, relnotes.texi, intro.texi: changed Cygnus phone
+ numbers from the old Palo Alto ones to the new Mtn. View numbers
+
+Mon Nov 16 16:50:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: define $(RM) to "rm -f"
+
+Sun Oct 11 16:05:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * intro.texi: added INFO-DIR-ENTRY
+
diff --git a/contrib/binutils/etc/Makefile.in b/contrib/binutils/etc/Makefile.in
index c490082..eedc8c9 100644
--- a/contrib/binutils/etc/Makefile.in
+++ b/contrib/binutils/etc/Makefile.in
@@ -31,8 +31,14 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+MAKEINFO = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
+ then echo ../texinfo/makeinfo/makeinfo; \
+ else echo makeinfo; fi`
+TEXI2DVI = `if [ -f ../texinfo/util/texi2dvi ]; \
+ then echo ../texinfo/util/texi2dvi; \
+ else echo texi2dvi; fi`
+TEXI2HTML = texi2html
+DVIPS = dvips
# Where to find texinfo.tex to format documentation with TeX.
TEXIDIR = $(srcdir)/../texinfo
@@ -40,8 +46,8 @@ TEXIDIR = $(srcdir)/../texinfo
#### Host, target, and site specific Makefile fragments come in here.
###
-INFOFILES = standards.info
-DVIFILES = standards.dvi
+INFOFILES = standards.info configure.info
+DVIFILES = standards.dvi configure.dvi
all:
@@ -49,26 +55,88 @@ install:
uninstall:
-info: $(INFOFILES)
+info:
+ for f in $(INFOFILES); do \
+ if test -f $(srcdir)/`echo $$f | sed -e 's/.info$$/.texi/'`; then \
+ if $(MAKE) "MAKEINFO=$(MAKEINFO)" $$f; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done
install-info: info
- if test ! -f standards.info ; then cd $(srcdir); fi; \
- for i in standards.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
+ if test ! -f standards.info; then cd $(srcdir); fi; \
+ if test -f standards.info; then \
+ for i in standards.info*; do \
+ $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ done; \
+ fi
+ if test ! -f configure.info; then cd $(srcdir); fi; \
+ if test -f configure.info; then \
+ for i in configure.info*; do \
+ $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ done; \
+ fi
+
+dvi:
+ for f in $(DVIFILES); do \
+ if test -f $(srcdir)/`echo $$f | sed -e 's/.dvi$$/.texi/'`; then \
+ if $(MAKE) "TEXI2DVI=$(TEXI2DVI)" $$f; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
done
-dvi: $(DVIFILES)
-
standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
$(MAKEINFO) --no-split -I$(srcdir) -o standards.info $(srcdir)/standards.texi
standards.dvi: $(srcdir)/standards.texi
TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/standards.texi
+standards.ps: standards.dvi
+ $(DVIPS) standards.dvi -o standards.ps
+
+# makeinfo requires images to be in the current directory.
+configure.info: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin
+ rm -f configdev.txt configbuild.txt
+ cp $(srcdir)/configdev.tin configdev.txt
+ cp $(srcdir)/configbuild.tin configbuild.txt
+ $(MAKEINFO) -I$(srcdir) -o configure.info $(srcdir)/configure.texi
+ rm -f configdev.txt configbuild.txt
+
+# texi2dvi wants both the .txt and the .eps files.
+configure.dvi: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
+ rm -f configdev.txt configbuild.txt
+ cp $(srcdir)/configdev.tin configdev.txt
+ cp $(srcdir)/configbuild.tin configbuild.txt
+ rm -f configdev.eps configbuild.eps
+ cp $(srcdir)/configdev.ein configdev.eps
+ cp $(srcdir)/configbuild.ein configbuild.eps
+ TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/configure.texi
+ rm -f configdev.txt configbuild.txt
+ rm -f configdev.eps configbuild.eps
+
+# dvips requires images to be in the current directory
+configure.ps: configure.dvi $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
+ rm -f configdev.eps configbuild.eps
+ cp $(srcdir)/configdev.ein configdev.eps
+ cp $(srcdir)/configbuild.ein configbuild.eps
+ $(DVIPS) configure.dvi -o configure.ps
+ rm -f configdev.eps configbuild.eps
+
+configure.html: $(srcdir)/configure.texi
+ $(TEXI2HTML) -split_chapter $(srcdir)/configure.texi
clean:
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
+ rm -f configdev.txt configbuild.txt configdev.eps configbuild.eps
+ rm -f configdev.jpg configbuild.jpg
mostlyclean: clean
diff --git a/contrib/binutils/etc/add-log.el b/contrib/binutils/etc/add-log.el
new file mode 100644
index 0000000..60c88e8
--- /dev/null
+++ b/contrib/binutils/etc/add-log.el
@@ -0,0 +1,573 @@
+;;; ============ NOTE WELL! =============
+;;;
+;;; You only need to use this file if you're using a version of Emacs
+;;; prior to 20.1 to work on GDB. The only difference between this
+;;; and the standard add-log.el provided with 19.34 is that it
+;;; generates dates using the terser format used by Emacs 20. This is
+;;; the format recommended for use in GDB ChangeLogs.
+;;;
+;;; To use this code, you should create a directory `~/elisp', save the code
+;;; below in `~/elisp/add-log.el', and then put something like this in
+;;; your `~/.emacs' file, to tell Emacs where to find it:
+;;;
+;;; (setq load-path
+;;; (cons (expand-file-name "~/elisp")
+;;; load-path))
+;;;
+;;; If you want, you can also byte-compile it --- it'll run a little
+;;; faster, and use a little less memory. (Not that those matter much for
+;;; this file.) To do that, after you've saved the text as
+;;; ~/elisp/add-log.el, bring it up in Emacs, and type
+;;;
+;;; C-u M-x byte-compile-file
+;;;
+;;; --- Jim Blandy
+
+;;; add-log.el --- change log maintenance commands for Emacs
+
+;; Copyright (C) 1985, 1986, 1988, 1993, 1994 Free Software Foundation, Inc.
+
+;; Keywords: maint
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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.
+
+;; GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This facility is documented in the Emacs Manual.
+
+;;; Code:
+
+(defvar change-log-default-name nil
+ "*Name of a change log file for \\[add-change-log-entry].")
+
+(defvar add-log-current-defun-function nil
+ "\
+*If non-nil, function to guess name of current function from surrounding text.
+\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
+instead) with no arguments. It returns a string or nil if it cannot guess.")
+
+;;;###autoload
+(defvar add-log-full-name nil
+ "*Full name of user, for inclusion in ChangeLog daily headers.
+This defaults to the value returned by the `user-full-name' function.")
+
+;;;###autoload
+(defvar add-log-mailing-address nil
+ "*Electronic mail address of user, for inclusion in ChangeLog daily headers.
+This defaults to the value of `user-mail-address'.")
+
+(defvar change-log-font-lock-keywords
+ '(("^[SMTWF].+" . font-lock-function-name-face) ; Date line.
+ ("^\t\\* \\([^ :\n]+\\)" 1 font-lock-comment-face) ; File name.
+ ("(\\([^)\n]+\\)):" 1 font-lock-keyword-face)) ; Function name.
+ "Additional expressions to highlight in Change Log mode.")
+
+(defvar change-log-mode-map nil
+ "Keymap for Change Log major mode.")
+(if change-log-mode-map
+ nil
+ (setq change-log-mode-map (make-sparse-keymap))
+ (define-key change-log-mode-map "\M-q" 'change-log-fill-paragraph))
+
+(defun change-log-name ()
+ (or change-log-default-name
+ (if (eq system-type 'vax-vms)
+ "$CHANGE_LOG$.TXT"
+ (if (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))
+ "changelo"
+ "ChangeLog"))))
+
+;;;###autoload
+(defun prompt-for-change-log-name ()
+ "Prompt for a change log name."
+ (let* ((default (change-log-name))
+ (name (expand-file-name
+ (read-file-name (format "Log file (default %s): " default)
+ nil default))))
+ ;; Handle something that is syntactically a directory name.
+ ;; Look for ChangeLog or whatever in that directory.
+ (if (string= (file-name-nondirectory name) "")
+ (expand-file-name (file-name-nondirectory default)
+ name)
+ ;; Handle specifying a file that is a directory.
+ (if (file-directory-p name)
+ (expand-file-name (file-name-nondirectory default)
+ (file-name-as-directory name))
+ name))))
+
+;;;###autoload
+(defun find-change-log (&optional file-name)
+ "Find a change log file for \\[add-change-log-entry] and return the name.
+
+Optional arg FILE-NAME specifies the file to use.
+If FILE-NAME is nil, use the value of `change-log-default-name'.
+If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
+\(or whatever we use on this operating system).
+
+If 'change-log-default-name' contains a leading directory component, then
+simply find it in the current directory. Otherwise, search in the current
+directory and its successive parents for a file so named.
+
+Once a file is found, `change-log-default-name' is set locally in the
+current buffer to the complete file name."
+ ;; If user specified a file name or if this buffer knows which one to use,
+ ;; just use that.
+ (or file-name
+ (setq file-name (and change-log-default-name
+ (file-name-directory change-log-default-name)
+ change-log-default-name))
+ (progn
+ ;; Chase links in the source file
+ ;; and use the change log in the dir where it points.
+ (setq file-name (or (and buffer-file-name
+ (file-name-directory
+ (file-chase-links buffer-file-name)))
+ default-directory))
+ (if (file-directory-p file-name)
+ (setq file-name (expand-file-name (change-log-name) file-name)))
+ ;; Chase links before visiting the file.
+ ;; This makes it easier to use a single change log file
+ ;; for several related directories.
+ (setq file-name (file-chase-links file-name))
+ (setq file-name (expand-file-name file-name))
+ ;; Move up in the dir hierarchy till we find a change log file.
+ (let ((file1 file-name)
+ parent-dir)
+ (while (and (not (or (get-file-buffer file1) (file-exists-p file1)))
+ (progn (setq parent-dir
+ (file-name-directory
+ (directory-file-name
+ (file-name-directory file1))))
+ ;; Give up if we are already at the root dir.
+ (not (string= (file-name-directory file1)
+ parent-dir))))
+ ;; Move up to the parent dir and try again.
+ (setq file1 (expand-file-name
+ (file-name-nondirectory (change-log-name))
+ parent-dir)))
+ ;; If we found a change log in a parent, use that.
+ (if (or (get-file-buffer file1) (file-exists-p file1))
+ (setq file-name file1)))))
+ ;; Make a local variable in this buffer so we needn't search again.
+ (set (make-local-variable 'change-log-default-name) file-name)
+ file-name)
+
+;;;###autoload
+(defun add-change-log-entry (&optional whoami file-name other-window new-entry)
+ "Find change log file and add an entry for today.
+Optional arg (interactive prefix) non-nil means prompt for user name and site.
+Second arg is file name of change log. If nil, uses `change-log-default-name'.
+Third arg OTHER-WINDOW non-nil means visit in other window.
+Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
+never append to an existing entry."
+ (interactive (list current-prefix-arg
+ (prompt-for-change-log-name)))
+ (or add-log-full-name
+ (setq add-log-full-name (user-full-name)))
+ (or add-log-mailing-address
+ (setq add-log-mailing-address user-mail-address))
+ (if whoami
+ (progn
+ (setq add-log-full-name (read-input "Full name: " add-log-full-name))
+ ;; Note that some sites have room and phone number fields in
+ ;; full name which look silly when inserted. Rather than do
+ ;; anything about that here, let user give prefix argument so that
+ ;; s/he can edit the full name field in prompter if s/he wants.
+ (setq add-log-mailing-address
+ (read-input "Mailing address: " add-log-mailing-address))))
+ (let ((defun (funcall (or add-log-current-defun-function
+ 'add-log-current-defun)))
+ paragraph-end entry)
+
+ (setq file-name (expand-file-name (find-change-log file-name)))
+
+ ;; Set ENTRY to the file name to use in the new entry.
+ (and buffer-file-name
+ ;; Never want to add a change log entry for the ChangeLog file itself.
+ (not (string= buffer-file-name file-name))
+ (setq entry (if (string-match
+ (concat "^" (regexp-quote (file-name-directory
+ file-name)))
+ buffer-file-name)
+ (substring buffer-file-name (match-end 0))
+ (file-name-nondirectory buffer-file-name))))
+
+ (if (and other-window (not (equal file-name buffer-file-name)))
+ (find-file-other-window file-name)
+ (find-file file-name))
+ (or (eq major-mode 'change-log-mode)
+ (change-log-mode))
+ (undo-boundary)
+ (goto-char (point-min))
+ (let ((heading (format "%s %s <%s>"
+ (format-time-string "%Y-%m-%d")
+ add-log-full-name
+ add-log-mailing-address)))
+ (if (looking-at (regexp-quote heading))
+ (forward-line 1)
+ (insert heading "\n\n")))
+
+ ;; Search only within the first paragraph.
+ (if (looking-at "\n*[^\n* \t]")
+ (skip-chars-forward "\n")
+ (forward-paragraph 1))
+ (setq paragraph-end (point))
+ (goto-char (point-min))
+
+ ;; Now insert the new line for this entry.
+ (cond ((re-search-forward "^\\s *\\*\\s *$" paragraph-end t)
+ ;; Put this file name into the existing empty entry.
+ (if entry
+ (insert entry)))
+ ((and (not new-entry)
+ (let (case-fold-search)
+ (re-search-forward
+ (concat (regexp-quote (concat "* " entry))
+ ;; Don't accept `foo.bar' when
+ ;; looking for `foo':
+ "\\(\\s \\|[(),:]\\)")
+ paragraph-end t)))
+ ;; Add to the existing entry for the same file.
+ (re-search-forward "^\\s *$\\|^\\s \\*")
+ (goto-char (match-beginning 0))
+ ;; Delete excess empty lines; make just 2.
+ (while (and (not (eobp)) (looking-at "^\\s *$"))
+ (delete-region (point) (save-excursion (forward-line 1) (point))))
+ (insert "\n\n")
+ (forward-line -2)
+ (indent-relative-maybe))
+ (t
+ ;; Make a new entry.
+ (forward-line 1)
+ (while (looking-at "\\sW")
+ (forward-line 1))
+ (while (and (not (eobp)) (looking-at "^\\s *$"))
+ (delete-region (point) (save-excursion (forward-line 1) (point))))
+ (insert "\n\n\n")
+ (forward-line -2)
+ (indent-to left-margin)
+ (insert "* " (or entry ""))))
+ ;; Now insert the function name, if we have one.
+ ;; Point is at the entry for this file,
+ ;; either at the end of the line or at the first blank line.
+ (if defun
+ (progn
+ ;; Make it easy to get rid of the function name.
+ (undo-boundary)
+ (insert (if (save-excursion
+ (beginning-of-line 1)
+ (looking-at "\\s *$"))
+ ""
+ " ")
+ "(" defun "): "))
+ ;; No function name, so put in a colon unless we have just a star.
+ (if (not (save-excursion
+ (beginning-of-line 1)
+ (looking-at "\\s *\\(\\*\\s *\\)?$")))
+ (insert ": ")))))
+
+;;;###autoload
+(defun add-change-log-entry-other-window (&optional whoami file-name)
+ "Find change log file in other window and add an entry for today.
+Optional arg (interactive prefix) non-nil means prompt for user name and site.
+Second arg is file name of change log. \
+If nil, uses `change-log-default-name'."
+ (interactive (if current-prefix-arg
+ (list current-prefix-arg
+ (prompt-for-change-log-name))))
+ (add-change-log-entry whoami file-name t))
+;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
+
+;;;###autoload
+(defun change-log-mode ()
+ "Major mode for editing change logs; like Indented Text Mode.
+Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
+New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window].
+Each entry behaves as a paragraph, and the entries for one day as a page.
+Runs `change-log-mode-hook'."
+ (interactive)
+ (kill-all-local-variables)
+ (indented-text-mode)
+ (setq major-mode 'change-log-mode
+ mode-name "Change Log"
+ left-margin 8
+ fill-column 74
+ indent-tabs-mode t
+ tab-width 8)
+ (use-local-map change-log-mode-map)
+ ;; Let each entry behave as one paragraph:
+ ;; We really do want "^" in paragraph-start below: it is only the lines that
+ ;; begin at column 0 (despite the left-margin of 8) that we are looking for.
+ (set (make-local-variable 'paragraph-start) "\\s *$\\|\f\\|^\\sw")
+ (set (make-local-variable 'paragraph-separate) "\\s *$\\|\f\\|^\\sw")
+ ;; Let all entries for one day behave as one page.
+ ;; Match null string on the date-line so that the date-line
+ ;; is grouped with what follows.
+ (set (make-local-variable 'page-delimiter) "^\\<\\|^\f")
+ (set (make-local-variable 'version-control) 'never)
+ (set (make-local-variable 'adaptive-fill-regexp) "\\s *")
+ (set (make-local-variable 'font-lock-defaults)
+ '(change-log-font-lock-keywords t))
+ (run-hooks 'change-log-mode-hook))
+
+;; It might be nice to have a general feature to replace this. The idea I
+;; have is a variable giving a regexp matching text which should not be
+;; moved from bol by filling. change-log-mode would set this to "^\\s *\\s(".
+;; But I don't feel up to implementing that today.
+(defun change-log-fill-paragraph (&optional justify)
+ "Fill the paragraph, but preserve open parentheses at beginning of lines.
+Prefix arg means justify as well."
+ (interactive "P")
+ (let ((end (save-excursion (forward-paragraph) (point)))
+ (beg (save-excursion (backward-paragraph)(point)))
+ (paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
+ (fill-region beg end justify)))
+
+(defvar add-log-current-defun-header-regexp
+ "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]"
+ "*Heuristic regexp used by `add-log-current-defun' for unknown major modes.")
+
+;;;###autoload
+(defun add-log-current-defun ()
+ "Return name of function definition point is in, or nil.
+
+Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
+Texinfo (@node titles), Perl, and Fortran.
+
+Other modes are handled by a heuristic that looks in the 10K before
+point for uppercase headings starting in the first column or
+identifiers followed by `:' or `=', see variable
+`add-log-current-defun-header-regexp'.
+
+Has a preference of looking backwards."
+ (condition-case nil
+ (save-excursion
+ (let ((location (point)))
+ (cond ((memq major-mode '(emacs-lisp-mode lisp-mode scheme-mode
+ lisp-interaction-mode))
+ ;; If we are now precisely at the beginning of a defun,
+ ;; make sure beginning-of-defun finds that one
+ ;; rather than the previous one.
+ (or (eobp) (forward-char 1))
+ (beginning-of-defun)
+ ;; Make sure we are really inside the defun found, not after it.
+ (if (and (looking-at "\\s(")
+ (progn (end-of-defun)
+ (< location (point)))
+ (progn (forward-sexp -1)
+ (>= location (point))))
+ (progn
+ (if (looking-at "\\s(")
+ (forward-char 1))
+ (forward-sexp 1)
+ (skip-chars-forward " '")
+ (buffer-substring (point)
+ (progn (forward-sexp 1) (point))))))
+ ((and (memq major-mode '(c-mode c++-mode c++-c-mode objc-mode))
+ (save-excursion (beginning-of-line)
+ ;; Use eq instead of = here to avoid
+ ;; error when at bob and char-after
+ ;; returns nil.
+ (while (eq (char-after (- (point) 2)) ?\\)
+ (forward-line -1))
+ (looking-at "[ \t]*#[ \t]*define[ \t]")))
+ ;; Handle a C macro definition.
+ (beginning-of-line)
+ (while (eq (char-after (- (point) 2)) ?\\) ;not =; note above
+ (forward-line -1))
+ (search-forward "define")
+ (skip-chars-forward " \t")
+ (buffer-substring (point)
+ (progn (forward-sexp 1) (point))))
+ ((memq major-mode '(c-mode c++-mode c++-c-mode objc-mode))
+ (beginning-of-line)
+ ;; See if we are in the beginning part of a function,
+ ;; before the open brace. If so, advance forward.
+ (while (not (looking-at "{\\|\\(\\s *$\\)"))
+ (forward-line 1))
+ (or (eobp)
+ (forward-char 1))
+ (beginning-of-defun)
+ (if (progn (end-of-defun)
+ (< location (point)))
+ (progn
+ (backward-sexp 1)
+ (let (beg tem)
+
+ (forward-line -1)
+ ;; Skip back over typedefs of arglist.
+ (while (and (not (bobp))
+ (looking-at "[ \t\n]"))
+ (forward-line -1))
+ ;; See if this is using the DEFUN macro used in Emacs,
+ ;; or the DEFUN macro used by the C library.
+ (if (condition-case nil
+ (and (save-excursion
+ (end-of-line)
+ (while (= (preceding-char) ?\\)
+ (end-of-line 2))
+ (backward-sexp 1)
+ (beginning-of-line)
+ (setq tem (point))
+ (looking-at "DEFUN\\b"))
+ (>= location tem))
+ (error nil))
+ (progn
+ (goto-char tem)
+ (down-list 1)
+ (if (= (char-after (point)) ?\")
+ (progn
+ (forward-sexp 1)
+ (skip-chars-forward " ,")))
+ (buffer-substring (point)
+ (progn (forward-sexp 1) (point))))
+ (if (looking-at "^[+-]")
+ (get-method-definition)
+ ;; Ordinary C function syntax.
+ (setq beg (point))
+ (if (and (condition-case nil
+ ;; Protect against "Unbalanced parens" error.
+ (progn
+ (down-list 1) ; into arglist
+ (backward-up-list 1)
+ (skip-chars-backward " \t")
+ t)
+ (error nil))
+ ;; Verify initial pos was after
+ ;; real start of function.
+ (save-excursion
+ (goto-char beg)
+ ;; For this purpose, include the line
+ ;; that has the decl keywords. This
+ ;; may also include some of the
+ ;; comments before the function.
+ (while (and (not (bobp))
+ (save-excursion
+ (forward-line -1)
+ (looking-at "[^\n\f]")))
+ (forward-line -1))
+ (>= location (point)))
+ ;; Consistency check: going down and up
+ ;; shouldn't take us back before BEG.
+ (> (point) beg))
+ (let (end middle)
+ ;; Don't include any final newline
+ ;; in the name we use.
+ (if (= (preceding-char) ?\n)
+ (forward-char -1))
+ (setq end (point))
+ (backward-sexp 1)
+ ;; Now find the right beginning of the name.
+ ;; Include certain keywords if they
+ ;; precede the name.
+ (setq middle (point))
+ (forward-word -1)
+ ;; Ignore these subparts of a class decl
+ ;; and move back to the class name itself.
+ (while (looking-at "public \\|private ")
+ (skip-chars-backward " \t:")
+ (setq end (point))
+ (backward-sexp 1)
+ (setq middle (point))
+ (forward-word -1))
+ (and (bolp)
+ (looking-at "struct \\|union \\|class ")
+ (setq middle (point)))
+ (buffer-substring middle end)))))))))
+ ((memq major-mode
+ '(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el
+ plain-tex-mode latex-mode;; cmutex.el
+ ))
+ (if (re-search-backward
+ "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" nil t)
+ (progn
+ (goto-char (match-beginning 0))
+ (buffer-substring (1+ (point));; without initial backslash
+ (progn
+ (end-of-line)
+ (point))))))
+ ((eq major-mode 'texinfo-mode)
+ (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t)
+ (buffer-substring (match-beginning 1)
+ (match-end 1))))
+ ((eq major-mode 'perl-mode)
+ (if (re-search-backward "^sub[ \t]+\\([^ \t\n]+\\)" nil t)
+ (buffer-substring (match-beginning 1)
+ (match-end 1))))
+ ((eq major-mode 'fortran-mode)
+ ;; must be inside function body for this to work
+ (beginning-of-fortran-subprogram)
+ (let ((case-fold-search t)) ; case-insensitive
+ ;; search for fortran subprogram start
+ (if (re-search-forward
+ "^[ \t]*\\(program\\|subroutine\\|function\
+\\|[ \ta-z0-9*]*[ \t]+function\\)"
+ nil t)
+ (progn
+ ;; move to EOL or before first left paren
+ (if (re-search-forward "[(\n]" nil t)
+ (progn (forward-char -1)
+ (skip-chars-backward " \t"))
+ (end-of-line))
+ ;; Use the name preceding that.
+ (buffer-substring (point)
+ (progn (forward-sexp -1)
+ (point)))))))
+ (t
+ ;; If all else fails, try heuristics
+ (let (case-fold-search)
+ (end-of-line)
+ (if (re-search-backward add-log-current-defun-header-regexp
+ (- (point) 10000)
+ t)
+ (buffer-substring (match-beginning 1)
+ (match-end 1))))))))
+ (error nil)))
+
+(defvar get-method-definition-md)
+
+;; Subroutine used within get-method-definition.
+;; Add the last match in the buffer to the end of `md',
+;; followed by the string END; move to the end of that match.
+(defun get-method-definition-1 (end)
+ (setq get-method-definition-md
+ (concat get-method-definition-md
+ (buffer-substring (match-beginning 1) (match-end 1))
+ end))
+ (goto-char (match-end 0)))
+
+;; For objective C, return the method name if we are in a method.
+(defun get-method-definition ()
+ (let ((get-method-definition-md "["))
+ (save-excursion
+ (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t)
+ (get-method-definition-1 " ")))
+ (save-excursion
+ (cond
+ ((re-search-forward "^\\([-+]\\)[ \t\n\f\r]*\\(([^)]*)\\)?\\s-*" nil t)
+ (get-method-definition-1 "")
+ (while (not (looking-at "[{;]"))
+ (looking-at
+ "\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ \t\n\f\r]*")
+ (get-method-definition-1 ""))
+ (concat get-method-definition-md "]"))))))
+
+
+(provide 'add-log)
+
+;;; add-log.el ends here
diff --git a/contrib/binutils/etc/add-log.vi b/contrib/binutils/etc/add-log.vi
new file mode 100644
index 0000000..efb8c77
--- /dev/null
+++ b/contrib/binutils/etc/add-log.vi
@@ -0,0 +1,11 @@
+Here is a vi macro to create entries in the recommended format for
+GDB's ChangeLogs.
+
+map  1GO:r !date '+\%Y-\%m-\%d'2GA Jason Molenda (:r !whoamikJxA@:r !hostnameA)kJxkddjO * k$
+
+It contains control and escape sequences, so don't just cut and paste it.
+You'll need to change the "Jason Molenda" bit, of course. :-) Put this
+in your $HOME/.exrc and when you type control-X in move-around-mode,
+you'll have a changelog template inserted.
+
+--- Jason Molenda
diff --git a/contrib/binutils/etc/configbuild.ein b/contrib/binutils/etc/configbuild.ein
new file mode 100644
index 0000000..7a0e214
--- /dev/null
+++ b/contrib/binutils/etc/configbuild.ein
@@ -0,0 +1,149 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: configbuild.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Jun 12 20:13:16 1998
+%%For: ian@tito.cygnus.com (Ian Lance Taylor)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 322 173
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-62.0 226.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1050 900 m 2100 900 l 2100 1425 l 1050 1425 l clp gs col-1 s gr
+% Polyline
+n 1500 1425 m 1500 2100 l gs col-1 s gr
+n 1530.00 1980.00 m 1500.00 2100.00 l 1470.00 1980.00 l 1500.50 1980.50 l 1530.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1500 2625 m 1500 3300 l gs col-1 s gr
+n 1530.00 3180.00 m 1500.00 3300.00 l 1470.00 3180.00 l 1500.50 3180.50 l 1530.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2925 900 m 3825 900 l 3825 1425 l 2925 1425 l clp gs col-1 s gr
+% Polyline
+n 1155 2100 m 1050 2100 1050 2520 105 arcto 4 {pop} repeat 1050 2625 2220 2625 105 arcto 4 {pop} repeat 2325 2625 2325 2205 105 arcto 4 {pop} repeat 2325 2100 1155 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 2850 2100 m 4125 2100 l 4125 2625 l 2850 2625 l clp gs col-1 s gr
+% Polyline
+n 3375 1425 m 3375 2100 l gs col-1 s gr
+n 3405.00 1980.00 m 3375.00 2100.00 l 3345.00 1980.00 l 3375.50 1980.50 l 3405.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 5100 900 m 6300 900 l 6300 1350 l 5100 1350 l clp gs col-1 s gr
+% Polyline
+n 5625 1350 m 5625 2100 l gs col-1 s gr
+n 5655.00 1980.00 m 5625.00 2100.00 l 5595.00 1980.00 l 5625.50 1980.50 l 5655.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 5205 2100 m 5100 2100 5100 2520 105 arcto 4 {pop} repeat 5100 2625 6270 2625 105 arcto 4 {pop} repeat 6375 2625 6375 2205 105 arcto 4 {pop} repeat 6375 2100 5205 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 5625 2625 m 5625 3300 l gs col-1 s gr
+n 5655.00 3180.00 m 5625.00 3300.00 l 5595.00 3180.00 l 5625.50 3180.50 l 5655.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 5100 3300 m 6225 3300 l 6225 3750 l 5100 3750 l clp gs col-1 s gr
+% Polyline
+ [1 50.0] 50.000000 setdash
+n 2850 2400 m 2325 2400 l gs col-1 s gr [] 0 setdash
+n 2445.00 2430.00 m 2325.00 2400.00 l 2445.00 2370.00 l 2445.50 2400.50 l 2445.00 2430.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+ [1 50.0] 50.000000 setdash
+n 4125 2400 m 5100 2400 l gs col-1 s gr [] 0 setdash
+n 4980.00 2370.00 m 5100.00 2400.00 l 4980.00 2430.00 l 4980.50 2400.50 l 4980.00 2370.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 3300 m 1950 3300 l 1950 3750 l 1050 3750 l clp gs col-1 s gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 1200 m
+gs 1 -1 sc (config.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (configure) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 2400 m
+gs 1 -1 sc (config.status) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 2400 m
+gs 1 -1 sc (config.status) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 3600 m
+gs 1 -1 sc (config.h) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5250 1200 m
+gs 1 -1 sc (Makefile.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5250 2400 m
+gs 1 -1 sc (config.status) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5250 3600 m
+gs 1 -1 sc (Makefile) col-1 show gr
+$F2psEnd
+restore
diff --git a/contrib/binutils/etc/configbuild.fig b/contrib/binutils/etc/configbuild.fig
new file mode 100644
index 0000000..747592d
--- /dev/null
+++ b/contrib/binutils/etc/configbuild.fig
@@ -0,0 +1,50 @@
+#FIG 3.1
+Portrait
+Center
+Inches
+1200 2
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 900 2100 900 2100 1425 1050 1425 1050 900
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 1425 1500 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 2625 1500 3300
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2925 900 3825 900 3825 1425 2925 1425 2925 900
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2325 2625 2325 2100 1050 2100 1050 2625 2325 2625
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2850 2100 4125 2100 4125 2625 2850 2625 2850 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3375 1425 3375 2100
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5100 900 6300 900 6300 1350 5100 1350 5100 900
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 1350 5625 2100
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 6375 2625 6375 2100 5100 2100 5100 2625 6375 2625
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 2625 5625 3300
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5100 3300 6225 3300 6225 3750 5100 3750 5100 3300
+2 1 2 1 -1 7 0 0 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 2850 2400 2325 2400
+2 1 2 1 -1 7 0 0 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4125 2400 5100 2400
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 3300 1950 3300 1950 3750 1050 3750 1050 3300
+4 0 -1 0 0 0 12 0.0000000 4 180 645 1200 1200 config.in\001
+4 0 -1 0 0 0 12 0.0000000 4 180 705 3000 1200 configure\001
+4 0 -1 0 0 0 12 0.0000000 4 180 990 3000 2400 config.status\001
+4 0 -1 0 0 0 12 0.0000000 4 180 990 1200 2400 config.status\001
+4 0 -1 0 0 0 12 0.0000000 4 180 600 1200 3600 config.h\001
+4 0 -1 0 0 0 12 0.0000000 4 135 855 5250 1200 Makefile.in\001
+4 0 -1 0 0 0 12 0.0000000 4 180 990 5250 2400 config.status\001
+4 0 -1 0 0 0 12 0.0000000 4 135 675 5250 3600 Makefile\001
diff --git a/contrib/binutils/etc/configbuild.jin b/contrib/binutils/etc/configbuild.jin
new file mode 100644
index 0000000..44cd939
--- /dev/null
+++ b/contrib/binutils/etc/configbuild.jin
Binary files differ
diff --git a/contrib/binutils/etc/configbuild.tin b/contrib/binutils/etc/configbuild.tin
new file mode 100644
index 0000000..cfdd6fe
--- /dev/null
+++ b/contrib/binutils/etc/configbuild.tin
@@ -0,0 +1,9 @@
+ config.in *configure* Makefile.in
+ | | |
+ | v |
+ | config.status |
+ | | |
+ *config.status*<======+==========>*config.status*
+ | |
+ v v
+ config.h Makefile
diff --git a/contrib/binutils/etc/configdev.ein b/contrib/binutils/etc/configdev.ein
new file mode 100644
index 0000000..7f83785
--- /dev/null
+++ b/contrib/binutils/etc/configdev.ein
@@ -0,0 +1,185 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: configdev.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Mon Jun 15 17:35:19 1998
+%%For: ian@tito.cygnus.com (Ian Lance Taylor)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 344 317
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-62.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1050 900 m 2100 900 l 2100 1425 l 1050 1425 l clp gs col-1 s gr
+% Polyline
+n 2925 900 m 3975 900 l 3975 1425 l 2925 1425 l clp gs col-1 s gr
+% Polyline
+n 5550 900 m 6750 900 l 6750 1350 l 5550 1350 l clp gs col-1 s gr
+% Polyline
+n 3750 1800 m 5025 1800 l 5025 2250 l 3750 2250 l clp gs col-1 s gr
+% Polyline
+n 1155 2100 m 1050 2100 1050 2520 105 arcto 4 {pop} repeat 1050 2625 2070 2625 105 arcto 4 {pop} repeat 2175 2625 2175 2205 105 arcto 4 {pop} repeat 2175 2100 1155 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 5550 3300 m 6675 3300 l 6675 3750 l 5550 3750 l clp gs col-1 s gr
+% Polyline
+n 5655 2100 m 5550 2100 5550 2520 105 arcto 4 {pop} repeat 5550 2625 6495 2625 105 arcto 4 {pop} repeat 6600 2625 6600 2205 105 arcto 4 {pop} repeat 6600 2100 5655 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 3750 3600 m 4875 3600 l 4875 4050 l 3750 4050 l clp gs col-1 s gr
+% Polyline
+n 3855 2700 m 3750 2700 3750 3045 105 arcto 4 {pop} repeat 3750 3150 4545 3150 105 arcto 4 {pop} repeat 4650 3150 4650 2805 105 arcto 4 {pop} repeat 4650 2700 3855 2700 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 2850 5700 m 3750 5700 l 3750 6150 l 2850 6150 l clp gs col-1 s gr
+% Polyline
+n 3030 4800 m 2925 4800 2925 5145 105 arcto 4 {pop} repeat 2925 5250 3645 5250 105 arcto 4 {pop} repeat 3750 5250 3750 4905 105 arcto 4 {pop} repeat 3750 4800 3030 4800 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 1500 1425 m 1500 2100 l gs col-1 s gr
+n 1530.00 1980.00 m 1500.00 2100.00 l 1470.00 1980.00 l 1500.50 1980.50 l 1530.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 1425 m 3300 4800 l gs col-1 s gr
+n 3330.00 4680.00 m 3300.00 4800.00 l 3270.00 4680.00 l 3300.50 4680.50 l 3330.00 4680.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 1575 m 1875 1575 l 1875 2100 l gs col-1 s gr
+n 1905.00 1980.00 m 1875.00 2100.00 l 1845.00 1980.00 l 1875.50 1980.50 l 1905.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 1575 m 5700 1575 l 5700 2100 l gs col-1 s gr
+n 5730.00 1980.00 m 5700.00 2100.00 l 5670.00 1980.00 l 5700.50 1980.50 l 5730.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 6225 1350 m 6225 2100 l gs col-1 s gr
+n 6255.00 1980.00 m 6225.00 2100.00 l 6195.00 1980.00 l 6225.50 1980.50 l 6255.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 6075 2625 m 6075 3300 l gs col-1 s gr
+n 6105.00 3180.00 m 6075.00 3300.00 l 6045.00 3180.00 l 6075.50 3180.50 l 6105.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 4200 2250 m 4200 2700 l gs col-1 s gr
+n 4230.00 2580.00 m 4200.00 2700.00 l 4170.00 2580.00 l 4200.50 2580.50 l 4230.00 2580.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 4200 3150 m 4200 3600 l gs col-1 s gr
+n 4230.00 3480.00 m 4200.00 3600.00 l 4170.00 3480.00 l 4200.50 3480.50 l 4230.00 3480.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 4200 4050 m 4200 4500 l 3675 4500 l 3675 4800 l gs col-1 s gr
+n 3705.00 4680.00 m 3675.00 4800.00 l 3645.00 4680.00 l 3675.50 4680.50 l 3705.00 4680.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3375 5250 m 3375 5700 l gs col-1 s gr
+n 3405.00 5580.00 m 3375.00 5700.00 l 3345.00 5580.00 l 3375.50 5580.50 l 3405.00 5580.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 2925 m 3750 2925 l gs col-1 s gr
+n 3630.00 2895.00 m 3750.00 2925.00 l 3630.00 2955.00 l 3630.50 2925.50 l 3630.00 2895.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1500 2625 m 1500 3300 l gs col-1 s gr
+n 1530.00 3180.00 m 1500.00 3300.00 l 1470.00 3180.00 l 1500.50 3180.50 l 1530.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 3300 m 2100 3300 l 2100 3750 l 1050 3750 l clp gs col-1 s gr
+% Polyline
+n 4875 3825 m 5250 3825 l 5250 2400 l 5550 2400 l gs col-1 s gr
+n 5430.00 2370.00 m 5550.00 2400.00 l 5430.00 2430.00 l 5430.50 2400.50 l 5430.00 2370.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 1200 m
+gs 1 -1 sc (acconfig.h) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (configure.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5700 1200 m
+gs 1 -1 sc (Makefile.am) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3900 2100 m
+gs 1 -1 sc (acinclude.m4) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 2400 m
+gs 1 -1 sc (autoheader) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 3600 m
+gs 1 -1 sc (config.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5700 3600 m
+gs 1 -1 sc (Makefile.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5700 2400 m
+gs 1 -1 sc (automake) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3900 3900 m
+gs 1 -1 sc (aclocal.m4) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3900 3000 m
+gs 1 -1 sc (aclocal) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 6000 m
+gs 1 -1 sc (configure) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 5100 m
+gs 1 -1 sc (autoconf) col-1 show gr
+$F2psEnd
+restore
diff --git a/contrib/binutils/etc/configdev.fig b/contrib/binutils/etc/configdev.fig
new file mode 100644
index 0000000..4d386ec
--- /dev/null
+++ b/contrib/binutils/etc/configdev.fig
@@ -0,0 +1,80 @@
+#FIG 3.1
+Portrait
+Center
+Inches
+1200 2
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 900 2100 900 2100 1425 1050 1425 1050 900
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2925 900 3975 900 3975 1425 2925 1425 2925 900
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5550 900 6750 900 6750 1350 5550 1350 5550 900
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 3750 1800 5025 1800 5025 2250 3750 2250 3750 1800
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2175 2625 2175 2100 1050 2100 1050 2625 2175 2625
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5550 3300 6675 3300 6675 3750 5550 3750 5550 3300
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 6600 2625 6600 2100 5550 2100 5550 2625 6600 2625
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 3750 3600 4875 3600 4875 4050 3750 4050 3750 3600
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 4650 3150 4650 2700 3750 2700 3750 3150 4650 3150
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2850 5700 3750 5700 3750 6150 2850 6150 2850 5700
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 3750 5250 3750 4800 2925 4800 2925 5250 3750 5250
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 1425 1500 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3300 1425 3300 4800
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 3300 1575 1875 1575 1875 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 3300 1575 5700 1575 5700 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6225 1350 6225 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6075 2625 6075 3300
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4200 2250 4200 2700
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4200 3150 4200 3600
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
+ 1 1 1.00 60.00 120.00
+ 4200 4050 4200 4500 3675 4500 3675 4800
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3375 5250 3375 5700
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3300 2925 3750 2925
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 2625 1500 3300
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 3300 2100 3300 2100 3750 1050 3750 1050 3300
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
+ 1 1 1.00 60.00 120.00
+ 4875 3825 5250 3825 5250 2400 5550 2400
+4 0 -1 0 0 0 12 0.0000000 4 180 780 1200 1200 acconfig.h\001
+4 0 -1 0 0 0 12 0.0000000 4 180 885 3000 1200 configure.in\001
+4 0 -1 0 0 0 12 0.0000000 4 135 945 5700 1200 Makefile.am\001
+4 0 -1 0 0 0 12 0.0000000 4 135 990 3900 2100 acinclude.m4\001
+4 0 -1 0 0 0 12 0.0000000 4 135 840 1200 2400 autoheader\001
+4 0 -1 0 0 0 12 0.0000000 4 180 645 1200 3600 config.in\001
+4 0 -1 0 0 0 12 0.0000000 4 135 855 5700 3600 Makefile.in\001
+4 0 -1 0 0 0 12 0.0000000 4 135 735 5700 2400 automake\001
+4 0 -1 0 0 0 12 0.0000000 4 135 810 3900 3900 aclocal.m4\001
+4 0 -1 0 0 0 12 0.0000000 4 135 540 3900 3000 aclocal\001
+4 0 -1 0 0 0 12 0.0000000 4 180 705 3000 6000 configure\001
+4 0 -1 0 0 0 12 0.0000000 4 135 660 3000 5100 autoconf\001
diff --git a/contrib/binutils/etc/configdev.jin b/contrib/binutils/etc/configdev.jin
new file mode 100644
index 0000000..9b11a71
--- /dev/null
+++ b/contrib/binutils/etc/configdev.jin
Binary files differ
diff --git a/contrib/binutils/etc/configdev.tin b/contrib/binutils/etc/configdev.tin
new file mode 100644
index 0000000..c9b6f34
--- /dev/null
+++ b/contrib/binutils/etc/configdev.tin
@@ -0,0 +1,17 @@
+ acconfig.h configure.in Makefile.am
+ | | |
+ | --------------+---------------------- |
+ | | | | |
+ v v | acinclude.m4 | |
+ *autoheader* | | v v
+ | | v --->*automake*
+ v |--->*aclocal* | |
+ config.in | | | v
+ | v | Makefile.in
+ | aclocal.m4---
+ | |
+ v v
+ *autoconf*
+ |
+ v
+ configure
diff --git a/contrib/binutils/etc/configure.texi b/contrib/binutils/etc/configure.texi
index 4457774..9140167 100644
--- a/contrib/binutils/etc/configure.texi
+++ b/contrib/binutils/etc/configure.texi
@@ -1,23 +1,20 @@
-\input texinfo @c -*-texinfo-*-
+\input texinfo
+@c %**start of header
@setfilename configure.info
-@settitle Cygnus configure
+@settitle The GNU configure and build system
+@setchapternewpage off
+@c %**end of header
-@synindex ky cp
-
-@setchapternewpage odd
+@dircategory GNU admin
+@direntry
+* configure: (configure). The GNU configure and build system
+@end direntry
@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* configure: (configure). Cygnus configure.
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
+This file documents the GNU configure and build system.
-@ifinfo
-This document describes the Cygnus Support version of @code{configure}.
+Copyright (C) 1998 Cygnus Solutions.
-Copyright (C) 1991, 1992, 1993 Cygnus Support
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.
@@ -26,9 +23,9 @@ are preserved on all copies.
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-@end ignore
+
+@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
@@ -37,23 +34,16 @@ 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,
except that this permission notice may be stated in a translation approved
-by Cygnus Support.
+by the Foundation.
@end ifinfo
-@c We should not distribute texinfo files with smallbook enabled.
-@c @smallbook
-@finalout
@titlepage
-@title Cygnus configure
-@author K. Richard Pixley
-@author Cygnus Support
-@page
-@cindex copyleft
+@title The GNU configure and build system
+@author Ian Lance Taylor
+@page
@vskip 0pt plus 1filll
-Edited January, 1993, by Jeffrey Osier, Cygnus Support.
-
-Copyright @copyright{} 1991, 1992, 1993 Cygnus Support
+Copyright @copyright{} 1998 Cygnus Solutions
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -66,1765 +56,2589 @@ 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,
-except that this permission notice may be stated in a translation approved
-by Cygnus Support.
+except that this permission notice may be stated in a translation
+approved by the Free Software Foundation.
@end titlepage
-@c ---------------------------------------------------------------------
@ifinfo
@node Top
-@top Cygnus configure
+@top GNU configure and build system
-This file documents the configuration system used and distributed by
-Cygnus Support.
+The GNU configure and build system.
@menu
-* What configure does:: What configure does
-* Invoking configure:: Invoking configure---basic usage
-* Using configure:: More than you ever wanted to know
-* Porting:: How to use configure with new programs
-* Variables Index::
-* Concept Index::
+* Introduction:: Introduction.
+* Getting Started:: Getting Started.
+* Files:: Files.
+* Configuration Names:: Configuration Names.
+* Cross Compilation Tools:: Cross Compilation Tools.
+* Canadian Cross:: Canadian Cross.
+* Cygnus Configure:: Cygnus Configure.
+* Multilibs:: Multilibs.
+* FAQ:: Frequently Asked Questions.
+* Index:: Index.
@end menu
-@end ifinfo
-@c ---------------------------------------------------------------------
-@node What configure does
-@chapter What @code{configure} does
-@cindex Introduction
-@cindex Overview
-@cindex What @code{configure} does
-@kindex Cygnus Support Developer's Kit
-
-This manual documents Cygnus @code{configure}, a program which helps to
-automate much of the setup activity associated with building large suites of
-programs, such the Cygnus Support Developer's Kit. This manual is therefore
-geared toward readers who are likely to face the problem of configuring
-software in source form before compiling and installing it. We assume you are
-an experienced programmer or system administrator.
-@ifinfo
-For further background on this topic, see @ref{Some Basic Terms, , Apologia
-Configure, cfg-paper, On Configuring Development Tools}, by K. Richard
-Pixley.
@end ifinfo
-@iftex
-For further background on this topic, see @cite{On Configuring Development
-Tools} by K. Richard Pixley.
-@end iftex
-
-When @code{configure} runs, it does the following things:
-
-@table @emph
-@item @bullet{} creates build directories
-@vindex srcdir
-@cindex @code{srcdir}
-@cindex Build directories
-When you run @code{configure} with the @samp{--srcdir} option, it uses the
-current directory as the @dfn{build directory}, creating under it a directory
-tree that parallels the directory structure of the source directory. If you
-don't specify a @samp{srcdir}, @code{configure} first assumes that the source
-code you wish to configure is in your current directory; if it finds no
-@file{configure.in} input file there, it searches in the directory
-@code{configure} itself lies in. (For details, see @ref{Build directories, ,
-Build directories}.)
-
-@item @bullet{} generates @file{Makefile}
-@cindex @code{Makefile} generation
-A @file{Makefile} template from the source directory, usually called
-@file{Makefile.in}, is copied to an output file in the build directory which is
-most often named @file{Makefile}. @code{configure} places definitions for a
-number of standard @file{Makefile} macros at the beginning of the output file.
-If @w{@samp{--prefix=@var{dir}}} or @w{@samp{--exec_prefix=@var{dir}}} are
-specified on the @code{configure} command line, corresponding @file{Makefile}
-variables are set accordingly. If host, target, or site-specific
-@file{Makefile} fragments exist, these are inserted into the output file. (For
-details, see @ref{Makefile generation, , @code{Makefile} generation}.)
-
-@item @bullet{} generates @file{.gdbinit}
-@cindex @code{.gdbinit}
-If the source directory contains a @file{.gdbinit} file and the build directory
-is not the same as the source directory, a @file{.gdbinit} file is created in
-the build directory. This @file{.gdbinit} file contains commands which allow
-the source directory to be read when debugging with the @sc{gnu} debugger,
-@code{gdb}. (@xref{Command Files, , Command Files, gdb, Debugging With GDB}.)
-
-@item @bullet{} makes symbolic links
-@cindex Symbolic links
-Most build directories require that some symbolic links with generic names are
-built pointing to specific files in the source directory. If the system where
-@code{configure} runs cannot support symbolic links, hard links are used
-instead. (For details, see @ref{configure.in, , The @code{configure.in} input
-file}.)
-
-@item @bullet{} generates @file{config.status}
-@cindex @code{config.status}
-@code{configure} creates a shell script named @file{config.status} in the build
-directory. This shell script, when run from the build directory (usually from
-within a @file{Makefile}), will reconfigure the build directory (but not its
-subdirectories). This is most often used to have a @file{Makefile} update
-itself automatically if a new source directory is available.
-
-@item @bullet{} calls itself recursively
-@cindex Recursion
-If the source directory has subdirectories that should also be configured,
-@code{configure} is called for each.
+
+@node Introduction
+@chapter Introduction
+
+This document describes the GNU configure and build systems. It
+describes how autoconf, automake, libtool, and make fit together. It
+also includes a discussion of the older Cygnus configure system.
+
+This document does not describe in detail how to use each of the tools;
+see the respective manuals for that. Instead, it describes which files
+the developer must write, which files are machine generated and how they
+are generated, and where certain common problems should be addressed.
+
+@ifnothtml
+This document draws on several sources, including the autoconf manual by
+David MacKenzie (@pxref{Top, , autoconf overview, autoconf, Autoconf}),
+the automake manual by David MacKenzie and Tom Tromey (@pxref{Top, ,
+automake overview, automake, GNU Automake}), the libtool manual by
+Gordon Matzigkeit (@pxref{Top, , libtool overview, libtool, GNU
+libtool}), and the Cygnus configure manual by K. Richard Pixley.
+@end ifnothtml
+@ifhtml
+This document draws on several sources, including
+@uref{http://www.delorie.com/gnu/docs/autoconf/autoconf_toc.html, the
+autoconf manual} by David MacKenzie,
+@uref{http://www.delorie.com/gnu/docs/automake/automake_toc.html, the
+automake manual} by David MacKenzie and Tom Tromey,
+@uref{http://www.delorie.com/gnu/docs/libtool/libtool_toc.html, the
+libtool manual} by Gordon Matzigkeit, and the Cygnus configure manual by
+K. Richard Pixley.
+@end ifhtml
+
+@menu
+* Goals:: Goals.
+* Tools:: The tools.
+* History:: History.
+* Building:: Building.
+@end menu
+
+@node Goals
+@section Goals
+@cindex goals
+
+The GNU configure and build system has two main goals.
+
+The first is to simplify the development of portable programs. The
+system permits the developer to concentrate on writing the program,
+simplifying many details of portability across Unix and even Windows
+systems, and permitting the developer to describe how to build the
+program using simple rules rather than complex Makefiles.
+
+The second is to simplify the building of programs distributed as source
+code. All programs are built using a simple, standardized, two step
+process. The program builder need not install any special tools in
+order to build the program.
+
+@node Tools
+@section Tools
+
+The GNU configure and build system is comprised of several different
+tools. Program developers must build and install all of these tools.
+
+People who just want to build programs from distributed sources normally
+do not need any special tools beyond a Unix shell, a make program, and a
+C compiler.
+
+@table @asis
+@item autoconf
+provides a general portability framework, based on testing the features
+of the host system at build time.
+@item automake
+a system for describing how to build a program, permitting the developer
+to write a simplified @file{Makefile}.
+@item libtool
+a standardized approach to building shared libraries.
+@item gettext
+provides a framework for translation of text messages into other
+languages; not really discussed in this document.
+@item m4
+autoconf requires the GNU version of m4; the standard Unix m4 does not
+suffice.
+@item perl
+automake requires perl.
@end table
-@c ---------------------------------------------------------------------
-@node Invoking configure
-@chapter Invoking @code{configure}
-@cindex Invoking @code{configure}
-@cindex Usage
+@node History
+@section History
+@cindex history
+
+This is a very brief and probably inaccurate history.
+
+As the number of Unix variants increased during the 1980s, it became
+harder to write programs which could run on all variants. While it was
+often possible to use @code{#ifdef} to identify particular systems,
+developers frequently did not have access to every system, and the
+characteristics of some systems changed from version to version.
+
+By 1992, at least three different approaches had been developed:
+@itemize @bullet
+@item
+The Metaconfig program, by Larry Wall, Harlan Stenn, and Raphael
+Manfredi.
+@item
+The Cygnus configure script, by K. Richard Pixley, and the gcc configure
+script, by Richard Stallman. These use essentially the same approach,
+and the developers communicated regularly.
+@item
+The autoconf program, by David MacKenzie.
+@end itemize
+
+The Metaconfig program is still used for Perl and a few other programs.
+It is part of the Dist package. I do not know if it is being developed.
+
+In 1994, David MacKenzie and others modified autoconf to incorporate all
+the features of Cygnus configure. Since then, there has been a slow but
+steady conversion of GNU programs from Cygnus configure to autoconf. gcc
+has been converted, eliminating the gcc configure script.
+
+GNU autoconf was regularly maintained until late 1996. As of this
+writing in June, 1998, it has no public maintainer.
+
+Most programs are built using the make program, which requires the
+developer to write Makefiles describing how to build the programs.
+Since most programs are built in pretty much the same way, this led to a
+lot of duplication.
+
+The X Window system is built using the imake tool, which uses a database
+of rules to eliminate the duplication. However, building a tool which
+was developed using imake requires that the builder have imake
+installed, violating one of the goals of the GNU system.
+
+The new BSD make provides a standard library of Makefile fragments,
+which permits developers to write very simple Makefiles. However, this
+requires that the builder install the new BSD make program.
+
+In 1994, David MacKenzie wrote the first version of automake, which
+permitted writing a simple build description which was converted into a
+Makefile which could be used by the standard make program. In 1995, Tom
+Tromey completely rewrote automake in Perl, and he continues to enhance
+it.
+
+Various free packages built libraries, and by around 1995 several
+included support to build shared libraries on various platforms.
+However, there was no consistent approach. In early 1996, Gordon
+Matzigkeit began working on libtool, which provided a standardized
+approach to building shared libraries. This was integrated into
+automake from the start.
+
+The development of automake and libtool was driven by the GNITS project,
+a group of GNU maintainers who designed standardized tools to help meet
+the GNU coding standards.
+
+@node Building
+@section Building
+
+Most readers of this document should already know how to build a tool by
+running @samp{configure} and @samp{make}. This section may serve as a
+quick introduction or reminder.
+
+Building a tool is normally as simple as running @samp{configure}
+followed by @samp{make}. You should normally run @samp{configure} from
+an empty directory, using some path to refer to the @samp{configure}
+script in the source directory. The directory in which you run
+@samp{configure} is called the @dfn{object directory}.
+
+In order to use a object directory which is different from the source
+directory, you must be using the GNU version of @samp{make}, which has
+the required @samp{VPATH} support. Despite this restriction, using a
+different object directory is highly recommended:
+@itemize @bullet
+@item
+It keeps the files generated during the build from cluttering up your
+sources.
+@item
+It permits you to remove the built files by simply removing the entire
+build directory.
+@item
+It permits you to build from the same sources with several sets of
+configure options simultaneously.
+@end itemize
+
+If you don't have GNU @samp{make}, you will have to run @samp{configure}
+in the source directory. All GNU packages should support this; in
+particular, GNU packages should not assume the presence of GNU
+@samp{make}.
+
+After running @samp{configure}, you can build the tools by running
+@samp{make}.
+
+To install the tools, run @samp{make install}. Installing the tools
+will copy the programs and any required support files to the
+@dfn{installation directory}. The location of the installation
+directory is controlled by @samp{configure} options, as described below.
+
+In the Cygnus tree at present, the info files are built and installed as
+a separate step. To build them, run @samp{make info}. To install them,
+run @samp{make install-info}.
+
+All @samp{configure} scripts support a wide variety of options. The
+most interesting ones are @samp{--with} and @samp{--enable} options
+which are generally specific to particular tools. You can usually use
+the @samp{--help} option to get a list of interesting options for a
+particular configure script.
+
+The only generic options you are likely to use are the @samp{--prefix}
+and @samp{--exec-prefix} options. These options are used to specify the
+installation directory.
+
+The directory named by the @samp{--prefix} option will hold machine
+independent files such as info files.
-Cygnus @code{configure} is a shell script which resides in a source tree. The
-usual way to invoke @code{configure} is from the shell, as follows:
+The directory named by the @samp{--exec-prefix} option, which is
+normally a subdirectory of the @samp{--prefix} directory, will hold
+machine dependent files such as executables.
-@cindex Example session
+The default for @samp{--prefix} is @file{/usr/local}. The default for
+@samp{--exec-prefix} is the value used for @samp{--prefix}.
+
+The convention used in Cygnus releases is to use a @samp{--prefix}
+option of @file{/usr/cygnus/@var{release}}, where @var{release} is the
+name of the release, and to use a @samp{--exec-prefix} option of
+@file{/usr/cygnus/@var{release}/H-@var{host}}, where @var{host} is the
+configuration name of the host system (@pxref{Configuration Names}).
+
+Do not use either the source or the object directory as the installation
+directory. That will just lead to confusion.
+
+@node Getting Started
+@chapter Getting Started
+
+To start using the GNU configure and build system with your software
+package, you must write three files, and you must run some tools to
+manually generate additional files.
+
+@menu
+* Write configure.in:: Write configure.in.
+* Write Makefile.am:: Write Makefile.am.
+* Write acconfig.h:: Write acconfig.h.
+* Generate files:: Generate files.
+* Getting Started Example:: Example.
+@end menu
+
+@node Write configure.in
+@section Write configure.in
+@cindex @file{configure.in}, writing
+
+You must first write the file @file{configure.in}. This is an autoconf
+input file, and the autoconf manual describes in detail what this file
+should look like.
+
+You will write tests in your @file{configure.in} file to check for
+conditions that may change from one system to another, such as the
+presence of particular header files or functions.
+
+For example, not all systems support the @samp{gettimeofday} function.
+If you want to use the @samp{gettimeofday} function when it is
+available, and to use some other function when it is not, you would
+check for this by putting @samp{AC_CHECK_FUNCS(gettimeofday)} in
+@file{configure.in}.
+
+When the configure script is run at build time, this will arrange to
+define the preprocessor macro @samp{HAVE_GETTIMEOFDAY} to the value 1 if
+the @samp{gettimeofday} function is available, and to not define the
+macro at all if the function is not available. Your code can then use
+@samp{#ifdef} to test whether it is safe to call @samp{gettimeofday}.
+
+If you have an existing body of code, the @samp{autoscan} program may
+help identify potential portability problems, and hence configure tests
+that you will want to use.
+@ifnothtml
+@xref{Invoking autoscan, , , autoconf, the autoconf manual}.
+@end ifnothtml
+@ifhtml
+See @uref{http://www.delorie.com/gnu/docs/autoconf/autoconf_4.html, the
+autoscan documentation}.
+@end ifhtml
+
+Another handy tool for an existing body of code is @samp{ifnames}. This
+will show you all the preprocessor conditionals that the code already
+uses.
+@ifnothtml
+@xref{Invoking ifnames, , , autoconf, the autoconf manual}.
+@end ifnothtml
+@ifhtml
+See @uref{http://www.delorie.com/gnu/docs/autoconf/autoconf_5.html, the
+ifnames documentation}.
+@end ifhtml
+
+Besides the portability tests which are specific to your particular
+package, every @file{configure.in} file should contain the following
+macros.
+
+@table @samp
+@item AC_INIT
+@cindex @samp{AC_INIT}
+This macro takes a single argument, which is the name of a file in your
+package. For example, @samp{AC_INIT(foo.c)}.
+
+@item AC_PREREQ(@var{VERSION})
+@cindex @samp{AC_PREREQ}
+This macro is optional. It may be used to indicate the version of
+@samp{autoconf} that you are using. This will prevent users from
+running an earlier version of @samp{autoconf} and perhaps getting an
+invalid @file{configure} script. For example, @samp{AC_PREREQ(2.12)}.
+
+@item AM_INIT_AUTOMAKE
+@cindex @samp{AM_INIT_AUTOMAKE}
+This macro takes two arguments: the name of the package, and a version
+number. For example, @samp{AM_INIT_AUTOMAKE(foo, 1.0)}. (This macro is
+not needed if you are not using automake).
+
+@item AM_CONFIG_HEADER
+@cindex @samp{AM_CONFIG_HEADER}
+This macro names the header file which will hold the preprocessor macro
+definitions at run time. Normally this should be @file{config.h}. Your
+sources would then use @samp{#include "config.h"} to include it.
+
+This macro may optionally name the input file for that header file; by
+default, this is @file{config.h.in}, but that file name works poorly on
+DOS filesystems. Therefore, it is often better to name it explicitly as
+@file{config.in}.
+
+This is what you should normally put in @file{configure.in}:
@example
-eg$ ./configure @var{hosttype}
+AM_CONFIG_HEADER(config.h:config.in)
@end example
-@noindent
-This prepares the source in the current directory (@file{.}) to be
-compiled for a @var{hosttype} environment. It assumes that you wish to
-build programs and files in the default @dfn{build directory} (also the
-current directory, @file{.}). If you do not specify a value for
-@var{hosttype}, Cygnus @code{configure} will attempt to discover this
-information by itself (@pxref{config.guess, , Determining system
-information}). For information on @var{hosttype} environments,
-@xref{Host, , Host}.
-
-All @sc{gnu} software is packaged with one or more @code{configure} script(s)
-(@pxref{Configuration, , How Configuration Should Work, standards, GNU Coding
-Standards}). By using @code{configure} you prepare the source for your
-specific environment by selecting and using @file{Makefile} fragments and
-fragments of shell scripts, which are prepared in advance and stored with the
-source.
-
-@code{configure}'s command-line options also allow you to specify other aspects
-of the source configuration:
+@cindex @samp{AC_CONFIG_HEADER}
+(If you are not using automake, use @samp{AC_CONFIG_HEADER} rather than
+@samp{AM_CONFIG_HEADER}).
+
+@item AM_MAINTAINER_MODE
+@cindex @samp{AM_MAINTAINER_MODE}
+This macro always appears in Cygnus configure scripts. Other programs
+may or may not use it.
+
+If this macro is used, the @samp{--enable-maintainer-mode} option is
+required to enable automatic rebuilding of generated files used by the
+configure system. This of course requires that developers be aware of,
+and use, that option.
+
+If this macro is not used, then the generated files will always be
+rebuilt automatically. This will cause problems if the wrong versions
+of autoconf, automake, or others are in the builder's @samp{PATH}.
+
+(If you are not using automake, you do not need to use this macro).
+
+@item AC_EXEEXT
+@cindex @samp{AC_EXEEXT}
+@cindex @samp{AM_EXEEXT}
+Either this macro or @samp{AM_EXEEXT} always appears in Cygnus configure
+files. Other programs may or may not use one of them.
+
+This macro looks for the executable suffix used on the host system. On
+Unix systems, this is the empty string. On Windows systems, this is
+@samp{.exe}. This macro directs automake to use the executable suffix
+as appropriate when creating programs. This macro does not take any
+arguments.
+
+The @samp{AC_EXEEXT} form is new, and is part of a Cygnus patch to
+autoconf to support compiling with Visual C++. Older programs use
+@samp{AM_EXEEXT} instead.
+
+(Programs which do not use automake use neither @samp{AC_EXEEXT} nor
+@samp{AM_EXEEXT}).
+
+@item AC_PROG_CC
+@cindex @samp{AC_PROG_CC}
+If you are writing C code, you will normally want to use this macro. It
+locates the C compiler to use. It does not take any arguments.
+
+However, if this @file{configure.in} file is for a library which is to
+be compiled by a cross compiler which may not fully work, then you will
+not want to use @samp{AC_PROG_CC}. Instead, you will want to use a
+variant which does not call the macro @samp{AC_PROG_CC_WORKS}. Examples
+can be found in various @file{configure.in} files for libraries that are
+compiled with cross compilers, such as libiberty or libgloss. This is
+essentially a bug in autoconf, and there will probably be a better
+workaround at some point.
+
+@item AC_PROG_CXX
+@cindex @samp{AC_PROG_CXX}
+If you are writing C++ code, you will want to use this macro. It
+locates the C++ compiler to use. It does not take any arguments. The
+same cross compiler comments apply as for @samp{AC_PROG_CC}.
+
+@item AM_PROG_LIBTOOL
+@cindex @samp{AM_PROG_LIBTOOL}
+If you want to build libraries, and you want to permit them to be
+shared, or you want to link against libraries which were built using
+libtool, then you will need this macro. This macro is required in order
+to use libtool.
+
+@cindex @samp{AM_DISABLE_SHARED}
+By default, this will cause all libraries to be built as shared
+libraries. To prevent this--to change the default--use
+@samp{AM_DISABLE_SHARED} before @samp{AM_PROG_LIBTOOL}. The configure
+options @samp{--enable-shared} and @samp{--disable-shared} may be used
+to override the default at build time.
+
+@item AC_DEFINE(_GNU_SOURCE)
+@cindex @samp{_GNU_SOURCE}
+GNU packages should normally include this line before any other feature
+tests. This defines the macro @samp{_GNU_SOURCE} when compiling, which
+directs the libc header files to provide the standard GNU system
+interfaces including all GNU extensions. If this macro is not defined,
+certain GNU extensions may not be available.
+
+@item AC_OUTPUT
+@cindex @samp{AC_OUTPUT}
+This macro takes a list of file names which the configure process should
+produce. This is normally a list of one or more @file{Makefile} files
+in different directories. If your package lives entirely in a single
+directory, you would use simply @samp{AC_OUTPUT(Makefile)}. If you also
+have, for example, a @file{lib} subdirectory, you would use
+@samp{AC_OUTPUT(Makefile lib/Makefile)}.
+@end table
+If you want to use locally defined macros in your @file{configure.in}
+file, then you will need to write a @file{acinclude.m4} file which
+defines them (if not using automake, this file is called
+@file{aclocal.m4}). Alternatively, you can put separate macros in an
+@file{m4} subdirectory, and put @samp{ACLOCAL_AMFLAGS = -I m4} in your
+@file{Makefile.am} file so that the @samp{aclocal} program will be able
+to find them.
+
+The different macro prefixes indicate which tool defines the macro.
+Macros which start with @samp{AC_} are part of autoconf. Macros which
+start with @samp{AM_} are provided by automake or libtool.
+
+@node Write Makefile.am
+@section Write Makefile.am
+@cindex @file{Makefile.am}, writing
+
+You must write the file @file{Makefile.am}. This is an automake input
+file, and the automake manual describes in detail what this file should
+look like.
+
+The automake commands in @file{Makefile.am} mostly look like variable
+assignments in a @file{Makefile}. automake recognizes special variable
+names, and automatically add make rules to the output as needed.
+
+There will be one @file{Makefile.am} file for each directory in your
+package. For each directory with subdirectories, the @file{Makefile.am}
+file should contain the line
@smallexample
- configure @var{hosttype} [--target=@var{target}] [--srcdir=@var{dir}] [--rm]
- [--site=@var{site}] [--prefix=@var{dir}] [--exec-prefix=@var{dir}]
- [--program-prefix=@var{string}] [--tmpdir=@var{dir}]
- [--with-@var{package}[=@var{yes/no}]] [--without-@var{package}]
- [--enable-@var{feature}[=@var{yes/no}]] [--disable-@var{feature}]
- [--norecursion] [--nfp] [-s] [-v] [-V | --version] [--help]
+SUBDIRS = @var{dir} @var{dir} @dots{}
@end smallexample
+@noindent
+where each @var{dir} is the name of a subdirectory.
+
+For each @file{Makefile.am}, there should be a corresponding
+@file{Makefile} in the @samp{AC_OUTPUT} macro in @file{configure.in}.
-@table @code
-@item --target=@var{target}
-@cindex @code{--target}
-@cindex @code{target} option
-@vindex target
-Requests that the sources be configured to target the @var{target} machine. If
-no target is specified explicitly, the target is assumed to be the same as the
-host (i.e., a @dfn{native} configuration). @xref{Host, , Host}, and
-@ref{Target, , Target}, for
-discussions of each.
-
-@item --srcdir=@var{dir}
-@cindex @code{--srcdir}
-@cindex @code{srcdir} option
-@vindex srcdir
-Direct each generated @file{Makefile} to use the sources located in directory
-@var{dir}. Use this option whenever you wish the object code to reside in a
-different place from the source code. The @dfn{build directory} is always
-assumed to be the directory you call @code{configure} from. See @ref{Build
-directories, , Build directories}, for an example. If the source directory is
-not specified, @code{configure} assumes that the source is in your current
-directory. If @code{configure} finds no @file{configure.in} there, it searches
-in the same directory that the @code{configure} script itself lies in.
-Pathnames specified (Values for @var{dir}) can be either absolute relative to
-the @emph{build} directory.
-
-@item --rm
-@cindex @code{--rm}
-@cindex @code{rm} option
-@vindex rm
-@emph{Remove} the configuration specified by @var{hosttype} and the other
-command-line options, rather than create it.
-
-@c FIXME: check @ref
-@quotation
-@emph{Note:} We recommend that you use @samp{make distclean} rather than
-use this option; see @ref{Invoking make,,Invoking @code{make},make,GNU
-Make}, for details on @samp{make distclean}.
-@end quotation
-
-@item --site=@var{site}
-@cindex @code{--site}
-@cindex @code{site} option
-@vindex site
-Generate the @file{Makefile} using site-specific @file{Makefile} fragments for
-@var{site}. @xref{Makefile fragments, , Adding information about local
-conventions}.
-
-@item --prefix=@var{dir}
-@cindex @code{--prefix}
-@cindex @code{prefix} option
-@vindex prefix
-Configure the source to install programs and files under directory @var{dir}.
-
-This option sets the variable @samp{prefix}. Each generated @file{Makefile}
-will have its @samp{prefix} variables set to this value. (@xref{What configure
-really does, , What @code{configure} really does}.)
-
-@item --exec-prefix=@var{dir}
-@cindex @code{--exec-prefix}
-@cindex @code{exec-prefix} option
-@vindex exec-prefix
-Configure the source to install @dfn{host dependent} files in @var{dir}.
-
-This option sets the variable @samp{exec_prefix}. Each generated
-@file{Makefile} will have its @samp{exec_prefix} variables set to this value.
-(@xref{What configure really does, , What @code{configure} really does}.)
-
-@item --program-prefix=@var{string}
-@cindex @code{--program-prefix}
-@cindex @code{program-prefix} option
-@vindex program-prefix
-Configure the source to install certain programs using @var{string} as a
-prefix. This applies to programs which might be used for cross-compilation,
-such as the compiler and the binary utilities, and also to programs which have
-the same names as common Unix programs, such as @code{make}.
-
-This option sets the variable @samp{program_prefix}. Each generated
-@file{Makefile} will have its @samp{program_prefix} variables set to this
-value. (@xref{What configure really does, , What @code{configure} really
-does}.)
-
-@item --tmpdir=@var{tmpdir}
-@cindex @code{--tmpdir}
-@cindex @code{tmpdir} option
-@vindex tmpdir
-Use the directory @var{tmpdir} for @code{configure}'s temporary files. The
-default is the value of the environment variable @w{@code{TMPDIR}}, or
-@file{/tmp} if the environment variable is not set.
-
-@item --with-@var{package}[=@var{yes/no}]
-@itemx --without-@var{package}
-@cindex @code{--with-@var{package}}
-@cindex @code{with-@var{package}} option
-@vindex with-@var{package}
-@cindex @code{--without-@var{package}}
-@cindex @code{without-@var{package}} option
-@vindex without-@var{package}
-Indicate that @var{package} is present, or not present, depending on
-@var{yes/no}. If @var{yes/no} is nonexistent, its value is assumed to be
-@code{yes}. @samp{--without-@var{package}} is equivalent to
-@samp{--with-@var{package}=no}.
-
-For example, if you wish to configure the program @code{gcc} for a Sun
-SPARCstation running SunOS 4.x, and you want @code{gcc} to use the
-@sc{gnu} linker @code{ld}, you can configure @code{gcc} using
-
-@cindex Example session
+Every @file{Makefile.am} written at Cygnus should contain the line
@smallexample
-eg$ configure --with-gnu-ld sun4
+AUTOMAKE_OPTIONS = cygnus
@end smallexample
+@noindent
+This puts automake into Cygnus mode. See the automake manual for
+details.
+You may to include the version number of @samp{automake} that you are
+using on the @samp{AUTOMAKE_OPTIONS} line. For example,
+@smallexample
+AUTOMAKE_OPTIONS = cygnus 1.3
+@end smallexample
@noindent
-@xref{What configure really does, , What @code{configure} really does}, for
-details. See the installation or release notes for your particular package for
-details on which other @var{package} options are recognized.
-@c FIXME - need to include info about --with-* in other dox!
-
-@item --enable-@var{feature}[=@var{yes/no}]
-@itemx --disable-@var{feature}
-@cindex @code{--enable-@var{feature}}
-@cindex @code{enable-@var{feature}} option
-@vindex enable-@var{feature}
-@cindex @code{--disable-@var{feature}}
-@cindex @code{disable-@var{feature}} option
-@vindex disable-@var{feature}
-Include @var{feature}, or not, depending on @var{yes/no}. If @var{yes/no} is
-nonexistent, its value is assumed to be @code{yes}.
-@samp{--disable-@var{feature}} is equivalent to
-@samp{--enable-@var{feature}=no}.
+This will prevent users from running an earlier version of
+@samp{automake} and perhaps getting an invalid @file{Makefile.in}.
+If your package builds a program, then in the directory where that
+program is built you will normally want a line like
+@smallexample
+bin_PROGRAMS = @var{program}
+@end smallexample
@noindent
-@xref{What configure really does, , What @code{configure} really does}, for
-details. See the installation or release notes for your particular package for
-details on which other @var{feature} options are recognized.
-@c FIXME - need to include info about --enable-* in other dox!
-
-@item --norecursion
-@cindex @code{--norecursion}
-@cindex @code{norecursion} option
-@vindex norecursion
-Configure only this directory; ignore any subdirectories. This is used by the
-executable shell script @file{config.status} to reconfigure only the current
-directory; it is most often used non-interactively, when @code{make} is
-invoked. (@xref{config.status, , @code{config.status}}.)
-
-@item --nfp
-@cindex @code{--nfp}
-@cindex @code{nfp} option
-@vindex nfp
-Assume that the intended @var{hosttype} has no floating point unit.
-
-@item -s
-@cindex @code{-s}
-@cindex @code{s} option
-Suppress status output. This option is used internally by
-@code{configure} when calling itself recursively in subdirectories. You
-can override this option with the @code{--verbose} option.
-
-@item -v
-@itemx --verbose
-@cindex @code{-v}
-@cindex @code{--verbose}
-@cindex @code{v} option
-@cindex @code{verbose} option
-@cindex Verbose Output
-@vindex verbose
-Print status lines for each directory configured. Normally, only the
-status lines for the initial working directory are printed.
-
-@item --version
-@itemx -V
-@cindex version
-@cindex @code{--version}
-@cindex version
-Print the @code{configure} version number.
-
-@item --help
-@cindex Usage
-@cindex @code{--help}
-@cindex @code{help} option
-Print a short summary of how to invoke @code{configure}.
-@end table
+where @var{program} is the name of the program. You will then want a
+line like
+@smallexample
+@var{program}_SOURCES = @var{file} @var{file} @dots{}
+@end smallexample
+@noindent
+where each @var{file} is the name of a source file to link into the
+program (e.g., @samp{foo.c}).
-@cindex Abbreviating option names
-@cindex Truncating option names
-@cartouche
-@emph{Note:} You may introduce options with a single dash, @samp{-}, rather
-than two dashes, @samp{--}. However, you may not be able to truncate long
-option names when using a single dash. When using two dashes, options may be
-abbreviated as long as each option can be uniquely identified. For example,
+If your package builds a library, and you do not want the library to
+ever be built as a shared library, then in the directory where that
+library is built you will normally want a line like
@smallexample
-eg$ configure --s=/u/me/src @var{hosttype}
+lib_LIBRARIES = lib@var{name}.a
@end smallexample
@noindent
-is ambiguous, as @w{@samp{--s}} could refer to either @w{@samp{--site}} or
-@w{@samp{--srcdir}}. However,
+where @samp{lib@var{name}.a} is the name of the library. You will then
+want a line like
@smallexample
-eg$ configure --src=/u/me/src @var{hosttype}
+lib@var{name}_a_SOURCES = @var{file} @var{file} @dots{}
@end smallexample
@noindent
-is a valid abbreviation.
-@end cartouche
+where each @var{file} is the name of a source file to add to the
+library.
+If your package builds a library, and you want to permit building the
+library as a shared library, then in the directory where that library is
+built you will normally want a line like
+@smallexample
+lib_LTLIBRARIES = lib@var{name}.la
+@end smallexample
+The use of @samp{LTLIBRARIES}, and the @samp{.la} extension, indicate a
+library to be built using libtool. As usual, you will then want a line
+like
+@smallexample
+lib@var{name}_la_SOURCES = @var{file} @var{file} @dots{}
+@end smallexample
-@c ========================================================================
-@node Using configure
-@chapter Using @code{configure}
-@cindex Using @code{configure}
-@cindex Detailed usage
-@cindex Usage: detailed
+The strings @samp{bin} and @samp{lib} that appear above in
+@samp{bin_PROGRAMS} and @samp{lib_LIBRARIES} are not arbitrary. They
+refer to particular directories, which may be set by the @samp{--bindir}
+and @samp{--libdir} options to @file{configure}. If those options are
+not used, the default values are based on the @samp{--prefix} or
+@samp{--exec-prefix} options to @file{configure}. It is possible to use
+other names if the program or library should be installed in some other
+directory.
-@code{configure} prepares source directories for building programs in
-them. ``Configuring'' is the process of preparing software to compile
-correctly on a given @dfn{host}, for a given @dfn{target}.
+The @file{Makefile.am} file may also contain almost anything that may
+appear in a normal @file{Makefile}. automake also supports many other
+special variables, as well as conditionals.
-@code{configure} subsequently writes a configured @file{Makefile} from a
-pre-built template; @code{configure} uses variables that have been set in the
-configuring process to determine the values of some variables in the
-@file{Makefile}. Because of this we will refer to both @code{configure}
-variables and @file{Makefile} variables. This convention allows us to
-determine where the variable should be set initially, in either
-@file{configure.in} or @file{Makefile.in}.
+See the automake manual for more information.
-@menu
-* What configure really does:: What configure really does
-* configure.in:: The configure.in input file
-* Install locations:: Where to install things once they are built
-* Host:: Telling configure what will source will be built
-* Target:: Telling configure what the source will target
-* Makefile fragments:: Adding information about local conventions
-* Makefile extensions:: Extensions to the GNU coding standards
-@end menu
+@node Write acconfig.h
+@section Write acconfig.h
+@cindex @file{acconfig.h}, writing
-@c ---------------------------------------------------------------------
-@node What configure really does
-@section What @code{configure} really does
-@cindex What @code{configure} really does
-@cindex Behind the scenes
-@cindex @code{configure} back end
-@cindex @code{configure} details
+If you are generating a portability header file, (i.e., you are using
+@samp{AM_CONFIG_HEADER} in @file{configure.in}), then you will have to
+write a @file{acconfig.h} file. It will have to contain the following
+lines.
-Cygnus @code{configure} is a shell script that sets up an environment in
-which your programs will compile correctly for your machine and
-operating system, and will install in proper places. @code{configure}
-accomplishes this task by doing the following:
+@smallexample
+/* Name of package. */
+#undef PACKAGE
-@itemize @bullet
-@item
-it generates a @file{Makefile} from a custom template called
-@file{Makefile.in} in each relevant source directory;
+/* Version of package. */
+#undef VERSION
+@end smallexample
-@item
-it customizes the build process to your specifications; you set certain
-variables for @code{configure}, either on the command line or in the
-file @file{configure.in}, which subsequently sets variables in each
-generated @file{Makefile} to be used by @code{make} when actually
-building the software;
+This requirement is really a bug in the system, and the requirement may
+be eliminated at some later date.
-@item
-it creates @dfn{build directories}, places for your code to be compiled
-in before being installed;
+The @file{acconfig.h} file will also similar comment and @samp{#undef}
+lines for any unusual macros in the @file{configure.in} file, including
+any macro which appears in a @samp{AC_DEFINE} macro.
-@item
-it generates a @file{.gdbinit} in the build directory, if needed, to
-communicate to @code{gdb} where to find the program's source code;
+In particular, if you are writing a GNU package and therefore include
+@samp{AC_DEFINE(_GNU_SOURCE)} in @file{configure.in} as suggested above,
+you will need lines like this in @file{acconfig.h}:
+@smallexample
+/* Enable GNU extensions. */
+#undef _GNU_SOURCE
+@end smallexample
-@item
-it generates a shell script called @file{config.status}
-which is used most often by the @file{Makefile} to reconfigure itself;
+Normally the @samp{autoheader} program will inform you of any such
+requirements by printing an error message when it is run. However, if
+you do anything particular odd in your @file{configure.in} file, you
+will have to make sure that the right entries appear in
+@file{acconfig.h}, since otherwise the results of the tests may not be
+available in the @file{config.h} file which your code will use.
-@item
-it recurses in subdirectories, setting up entire trees so that they build
-correctly; if @code{configure} finds another @code{configure} script
-further down in a given source tree, it knows to use this script and not
-recur.
-@end itemize
+(Thee @samp{PACKAGE} and @samp{VERSION} lines are not required if you
+are not using automake, and in that case you may not need a
+@file{acconfig.h} file at all).
-For the sake of safety (i.e., in order to prevent broken installations), the
-@sc{gnu} coding standards call for software to be @dfn{configured} in such a
-way that an end user trying to build a given package will be able to do so by
-affecting a finite number of variables. All @sc{gnu} software comes with an
-executable @code{configure} shell script which sets up an environment within a
-build directory which will correctly compile your new package for your host
-(or, alternatively, whatever host you specify to @code{configure}).
-@ifinfo
-For further background on this topic, see @ref{Some Basic Terms, , Apologia
-Configure, cfg-paper, On Configuring Development Tools}, by K. Richard
-Pixley.
-@end ifinfo
-@iftex
-For further background on this topic, see @cite{On Configuring Development
-Tools} by K. Richard Pixley.
-@end iftex
+@node Generate files
+@section Generate files
-Use @code{configure} to set for the build process:
+Once you have written @file{configure.in}, @file{Makefile.am},
+@file{acconfig.h}, and possibly @file{acinclude.m4}, you must use
+autoconf and automake programs to produce the first versions of the
+generated files. This is done by executing the following sequence of
+commands.
-@itemize @bullet
-@item
-correct values for certain variables;
+@smallexample
+aclocal
+autoconf
+autoheader
+automake
+@end smallexample
-@item
-which type of host you wish to configure a given package for
-(@pxref{Host, , Host});
+The @samp{aclocal} and @samp{automake} commands are part of the automake
+package, and the @samp{autoconf} and @samp{autoheader} commands are part
+of the autoconf package.
-@item
-where you want to install this package (by using @samp{prefix},
-@samp{exec-prefix} and @samp{program-prefix}; @pxref{Install details, ,
-Full descriptions of all installation directories});
+If you are using a @file{m4} subdirectory for your macros, you will need
+to use the @samp{-I m4} option when you run @samp{aclocal}.
-@item
-optionally, which type of machine you wish to @dfn{target} this
-package's output to (@pxref{Target, , Target});
+If you are not using the Cygnus tree, use the @samp{-a} option when
+running @samp{automake} command in order to copy the required support
+files into your source directory.
-@item
-which other @sc{gnu} packages are already installed and available to
-this particular build (by using the @samp{--with-@var{package}} option;
-@pxref{Invoking configure, , Invoking @code{configure}});
+If you are using libtool, you must build and install the libtool package
+with the same @samp{--prefix} and @samp{--exec-prefix} options as you
+used with the autoconf and automake packages. You must do this before
+running any of the above commands. If you are not using the Cygnus
+tree, you will need to run the @samp{libtoolize} program to copy the
+libtool support files into your directory.
-@item
-where to place temporary files (by using the @samp{--tmpdir=@var{dir}}
-option; @pxref{Invoking configure, , Invoking @code{configure}});
+Once you have managed to run these commands without getting any errors,
+you should create a new empty directory, and run the @samp{configure}
+script which will have been created by @samp{autoconf} with the
+@samp{--enable-maintainer-mode} option. This will give you a set of
+Makefiles which will include rules to automatically rebuild all the
+generated files.
-@item whether to recur in subdirectories (changeable through the
-@w{@samp{--norecursion}} option; @pxref{Invoking configure, , Invoking
-@code{configure}}).
-@end itemize
+After doing that, whenever you have changed some of the input files and
+want to regenerated the other files, go to your object directory and run
+@samp{make}. Doing this is more reliable than trying to rebuild the
+files manually, because there are complex order dependencies and it is
+easy to forget something.
-@code{configure} uses a few other files to complete its tasks. These are
-discussed in detail where noted.
+@node Getting Started Example
+@section Example
-@table @code
-@cindex Other files
-@item configure.in
-@cindex @code{configure.in} definition
-Input file for @code{configure}. Shell script fragments reside here.
-@xref{configure.in, , The @code{configure.in} input file}.
+Let's consider a trivial example.
-@item Makefile.in
-@cindex @code{Makefile.in} definition
-Template which @code{configure} uses to build a file called @file{Makefile} in
-the @dfn{build directory}. @xref{Makefile generation, , @code{Makefile}
-generation}.
+Suppose we want to write a simple version of @samp{touch}. Our program,
+which we will call @samp{poke}, will take a single file name argument,
+and use the @samp{utime} system call to set the modification and access
+times of the file to the current time. We want this program to be
+highly portable.
-@item config.sub
-@cindex @code{config.sub} definition
-Shell script used by @code{configure} to expand referents to the
-@var{hosttype} argument into a single specification of the form
-@w{@var{cpu-vendor-os}}. For instance, on the command line you can
-specify
+We'll first see what this looks like without using autoconf and
+automake, and then see what it looks like with them.
+
+@menu
+* Getting Started Example 1:: First Try.
+* Getting Started Example 2:: Second Try.
+* Getting Started Example 3:: Third Try.
+* Generate Files in Example:: Generate Files.
+@end menu
+
+@node Getting Started Example 1
+@subsection First Try
+
+Here is our first try at @samp{poke.c}. Note that we've written it
+without ANSI/ISO C prototypes, since we want it to be highly portable.
-@cindex Example session
@example
-eg$ ./configure sun4
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <utime.h>
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+@{
+ if (argc != 2)
+ @{
+ fprintf (stderr, "Usage: poke file\n");
+ exit (1);
+ @}
+
+ if (utime (argv[1], NULL) < 0)
+ @{
+ perror ("utime");
+ exit (1);
+ @}
+
+ exit (0);
+@}
@end example
-@noindent
-to configure for a Sun SPARCstation running SunOS 4.x. @code{configure}
-consults @code{config.sub} to find that the three-part specification for this
-is
+We also write a simple @file{Makefile}.
@example
-sparc-sun-sunos4.1.1
+CC = gcc
+CFLAGS = -g -O2
+
+all: poke
+
+poke: poke.o
+ $(CC) -o poke $(CFLAGS) $(LDFLAGS) poke.o
@end example
-@noindent
-which notes the @var{cpu} as @samp{sparc}, the @var{manufacturer} as @samp{sun}
-(Sun Microsystems), and the @var{os} (operating system) as @samp{sunos4.1.1},
-the SunOS 4.1.1 release. @xref{configure variables, , Variables available to @code{configure}}.
+So far, so good.
-@item config.guess
-@cindex @code{config.guess} definition
-If you do not put the @var{hosttype} argument on the command line,
-@code{configure} uses the @code{config.guess} shell script to make an
-analysis of your machine (it assumes that you wish to configure your
-software for the type of machine on which you are running). The output
-of @code{config.guess} is a three-part identifier as described above.
+Unfortunately, there are a few problems.
-@item config.status
-@cindex @code{config.status} definition
-The final step in configuring a directory is to create a shell script,
-@code{config.status}. The main purpose of this file is to allow the
-@file{Makefile} for the current directory to rebuild itself, if
-necessary. @xref{config.status, , @code{config.status}}.
-
-@item config/*
-@cindex @code{config/} subdirectory
-@code{configure} uses three types of @file{Makefile} @dfn{fragments}, which
-reside in the directory @file{@var{srcdir}/config/}. @xref{Makefile fragments,
-, Adding information about local conventions}.
-@end table
+On older Unix systems derived from BSD 4.3, the @samp{utime} system call
+does not accept a second argument of @samp{NULL}. On those systems, we
+need to pass a pointer to @samp{struct utimbuf} structure.
+Unfortunately, even older systems don't define that structure; on those
+systems, we need to pass an array of two @samp{long} values.
-@menu
-* Build variables:: Variable-spaghetti made simple
-* Build directories:: Build directories described well
-* Makefile generation:: To build a Makefile
-* config.guess:: Be vewwy quiet, I'm hunting system information
-* config.status:: To rebuild a Makefile
-@end menu
+The header file @file{stdlib.h} was invented by ANSI C, and older
+systems don't have a copy. We included it above to get a declaration of
+@samp{exit}.
+
+We can find some of these portability problems by running
+@samp{autoscan}, which will create a @file{configure.scan} file which we
+can use as a prototype for our @file{configure.in} file. I won't show
+the output, but it will notice the potential problems with @samp{utime}
+and @file{stdlib.h}.
+
+In our @file{Makefile}, we don't provide any way to install the program.
+This doesn't matter much for such a simple example, but a real program
+will need an @samp{install} target. For that matter, we will also want
+a @samp{clean} target.
+
+@node Getting Started Example 2
+@subsection Second Try
+
+Here is our second try at this program.
+
+We modify @file{poke.c} to use preprocessor macros to control what
+features are available. (I've cheated a bit by using the same macro
+names which autoconf will use).
-@c ---------------------------------------------------------------------
-@node Build variables
-@subsection Build variables
-@cindex Build variables
-@cindex Cygnus Support Developer's Kit
-@cindex Variables
-
-There are several variables in the build process which you can control through
-build programs such as @code{make}. These include machine definitions, local
-conventions, installation locations, locations for temporary files, etc. This
-data is accessible through certain variables which are configurable in the
-build process; we refer to them as @dfn{build variables}.
-
-For lists of build variables which you can affect by using @code{configure},
-see @ref{configure variables, , Variables available to @code{configure.in}},
-and @ref{Install details, , Full descriptions of all installation directories}.
-
-Generally, build variables, which are used by the @file{Makefile} to
-determine various aspects of the build and installation processes, are
-changeable with command-line options to @code{configure}. In most large
-suites of programs, like the Cygnus Support Developer's Kit, the
-individual programs reside in several subdirectories of a single source
-code ``tree''. All of these subdirectories need to be configured with
-information relative to the @dfn{build directory}, which is not known
-until @code{configure} is run. Unless specified otherwise,
-@code{configure} recursively configures every subdirectory in the source
-tree.
-
-Build variables are passed from @code{configure} directly into the
-@file{Makefile}, and use the same names (except that dashes are
-transformed into underbars; for example, when you specify the option
-@samp{--exec-prefix} on the command line, the @file{Makefile} variable
-@samp{exec_prefix} is set). In other words, if you specify
-
-@cindex Example session
@example
-eg$ ./configure --prefix=/usr/gnu/local @dots{} @var{hosttype}
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif
+
+#ifndef HAVE_UTIME_NULL
+
+#include <time.h>
+
+#ifndef HAVE_STRUCT_UTIMBUF
+
+struct utimbuf
+@{
+ long actime;
+ long modtime;
+@};
+
+#endif
+
+static int
+utime_now (file)
+ char *file;
+@{
+ struct utimbuf now;
+
+ now.actime = now.modtime = time (NULL);
+ return utime (file, &now);
+@}
+
+#define utime(f, p) utime_now (f)
+
+#endif /* HAVE_UTIME_NULL */
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+@{
+ if (argc != 2)
+ @{
+ fprintf (stderr, "Usage: poke file\n");
+ exit (1);
+ @}
+
+ if (utime (argv[1], NULL) < 0)
+ @{
+ perror ("utime");
+ exit (1);
+ @}
+
+ exit (0);
+@}
@end example
-@noindent
-on the command line, @code{configure} sets an variable called @samp{prefix} to
-@samp{/usr/gnu/local}, and passes this into the @file{Makefile} in the same
-manner. After this command, each @file{Makefile} generated by @code{configure}
-will contain a line that reads:
+Here is the associated @file{Makefile}. We've added support for the
+preprocessor flags we use. We've also added @samp{install} and
+@samp{clean} targets.
@example
-prefix = /usr/gnu/local
+# Set this to your installation directory.
+bindir = /usr/local/bin
+
+# Uncomment this if you have the standard ANSI/ISO C header files.
+# STDC_HDRS = -DSTDC_HEADERS
+
+# Uncomment this if you have utime.h.
+# UTIME_H = -DHAVE_UTIME_H
+
+# Uncomment this if utime (FILE, NULL) works on your system.
+# UTIME_NULL = -DHAVE_UTIME_NULL
+
+# Uncomment this if struct utimbuf is defined in utime.h.
+# UTIMBUF = -DHAVE_STRUCT_UTIMBUF
+
+CC = gcc
+CFLAGS = -g -O2
+
+ALL_CFLAGS = $(STDC_HDRS) $(UTIME_H) $(UTIME_NULL) $(UTIMBUF) $(CFLAGS)
+
+all: poke
+
+poke: poke.o
+ $(CC) -o poke $(ALL_CFLAGS) $(LDFLAGS) poke.o
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) poke.c
+
+install: poke
+ cp poke $(bindir)/poke
+
+clean:
+ rm poke poke.o
@end example
-For a list of the @file{Makefile} variables @code{configure} can change, and
-instructions on how to change them, see @ref{configure variables, , Variables
-available to @code{configure.in}}, and @ref{Invoking configure, , Invoking
-@code{configure}}.
-
-@c ---------------------------------------------------------------------
-@node Build directories
-@subsection Build directories
-@cindex Build directories
-@cindex Object directories
-@cindex Building for multiple hosts
-@cindex Building for multiple targets
-
-By default, @code{configure} builds a @file{Makefile} and symbolic links in the
-same directory as the source files. This default works for many cases, but it
-has limitations. For instance, using this approach, you can only build object
-code for one host at a time.
-
-We refer to each directory where @code{configure} builds a @file{Makefile} as
-a @dfn{build directory}.
-
-The build directory for any given build is always the directory from which you
-call @code{configure}, or @file{.} relative to your prompt. The default
-@dfn{source directory}, the place @code{configure} looks to find source code,
-is also @file{.}. For instance, if we have a directory @file{/gnu-stuff/src/}
-that is the top branch of a tree of @sc{gnu} source code we wish to configure,
-then the program we will use to configure this code is
-@file{/gnu-stuff/src/configure}, as follows. (Assume for the sake of argument
-that our machine is a sun4.)
-
-@cindex Example session
+Some problems with this approach should be clear.
+
+Users who want to compile poke will have to know how @samp{utime} works
+on their systems, so that they can uncomment the @file{Makefile}
+correctly.
+
+The installation is done using @samp{cp}, but many systems have an
+@samp{install} program which may be used, and which supports optional
+features such as stripping debugging information out of the installed
+binary.
+
+The use of @file{Makefile} variables like @samp{CC}, @samp{CFLAGS} and
+@samp{LDFLAGS} follows the requirements of the GNU standards. This is
+convenient for all packages, since it reduces surprises for users.
+However, it is easy to get the details wrong, and wind up with a
+slightly nonstandard distribution.
+
+@node Getting Started Example 3
+@subsection Third Try
+
+For our third try at this program, we will write a @file{configure.in}
+script to discover the configuration features on the host system, rather
+than requiring the user to edit the @file{Makefile}. We will also write
+a @file{Makefile.am} rather than a @file{Makefile}.
+
+The only change to @file{poke.c} is to add a line at the start of the
+file:
@smallexample
-@group
-eg$ cd /gnu-stuff/src
-eg$ ./configure sun4
-Created "Makefile" in /gnu-stuff/src
-eg$
-@end group
+#include "config.h"
@end smallexample
-We just configured the code in @file{/gnu-stuff/src} to run on a Sun
-SPARCstation using SunOS 4.x by creating a @file{Makefile} in
-@file{/gnu-stuff/src}. By default, we also specified that when this code is
-built, the object code should reside in the same directory,
-@file{/gnu-stuff/src}.
-
-However, if we wanted to build this code for more than one host, we would be in
-trouble, because the new configuration would write over the old one, destroying
-it in the process. What we can do is to make a new @dfn{build directory} and
-configure from there. Running @code{configure} from the new directory will
-place a correct @file{Makefile} and a @file{config.status} in this new file.
-That is all @code{configure} does; we must run @code{make} to generate any
-object code.
-
-The new @file{Makefile} in @file{/gnu-stuff/sun4-obj}, created from the
-template file @file{/gnu-stuff/src/Makefile.in}, contains all the information
-needed to build the program.
-
-@cindex Example session
+The new @file{configure.in} file is as follows.
+
+@example
+AC_INIT(poke.c)
+AM_INIT_AUTOMAKE(poke, 1.0)
+AM_CONFIG_HEADER(config.h:config.in)
+AC_PROG_CC
+AC_HEADER_STDC
+AC_CHECK_HEADERS(utime.h)
+AC_EGREP_HEADER(utimbuf, utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))
+AC_FUNC_UTIME_NULL
+AC_OUTPUT(Makefile)
+@end example
+
+The first four macros in this file, and the last one, were described
+above; see @ref{Write configure.in}. If we omit these macros, then when
+we run @samp{automake} we will get a reminder that we need them.
+
+The other macros are standard autoconf macros.
+
+@table @samp
+@item AC_HEADER_STDC
+Check for standard C headers.
+@item AC_CHECK_HEADERS
+Check whether a particular header file exists.
+@item AC_EGREP_HEADER
+Check for a particular string in a particular header file, in this case
+checking for @samp{utimbuf} in @file{utime.h}.
+@item AC_FUNC_UTIME_NULL
+Check whether @samp{utime} accepts a NULL second argument to set the
+file change time to the current time.
+@end table
+
+See the autoconf manual for a more complete description.
+
+The new @file{Makefile.am} file is as follows. Note how simple this is
+compared to our earlier @file{Makefile}.
+
+@example
+bin_PROGRAMS = poke
+
+poke_SOURCES = poke.c
+@end example
+
+This means that we should build a single program name @samp{poke}. It
+should be installed in the binary directory, which we called
+@samp{bindir} earlier. The program @samp{poke} is built from the source
+file @file{poke.c}.
+
+We must also write a @file{acconfig.h} file. Besides @samp{PACKAGE} and
+@samp{VERSION}, which must be mentioned for all packages which use
+automake, we must include @samp{HAVE_STRUCT_UTIMBUF}, since we mentioned
+it in an @samp{AC_DEFINE}.
+
+@example
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
+/* Whether utime.h defines struct utimbuf. */
+#undef HAVE_STRUCT_UTIMBUF
+@end example
+
+@node Generate Files in Example
+@subsection Generate Files
+
+We must now generate the other files, using the following commands.
+
@smallexample
-@group
-eg$ mkdir /gnu-stuff/sun4-obj
-eg$ cd /gnu-stuff/sun4-obj
-eg$ ../src/configure --srcdir=../src sun4
-Created "Makefile" in /gnu-stuff/sun4-obj
-eg$ ls
-Makefile config.status
-eg$ make all info install install-info clean
-@var{compilation messages@dots{}}
-eg$ mkdir /gnu-stuff/solaris2
-eg$ cd /gnu-stuff/solaris2
-eg$ ../src/configure --srcdir=../src sol2
-Created "Makefile" in /gnu-stuff/solaris2
-eg$ ls
-Makefile config.status
-eg$ make all info install install-info clean
-@var{compilation messages@dots{}}
-@end group
+aclocal
+autoconf
+autoheader
+automake
@end smallexample
-We can repeat this for other configurations of the same software simply
-by making a new build directory and reconfiguring from inside it. If
-you do not specify the @var{hosttype} argument, @code{configure}
-will attempt to figure out what kind of machine and operating system you
-happen to be using. @xref{config.guess, , Determining system
-information}. Of course, this may not always be the configuration you
-wish to build.
-
-@emph{Caution:} If you build more than one configuration for a single program,
-remember that you must also specify a different @samp{--prefix} for each
-configuration at configure-time. Otherwise, both configurations will be
-installed in the same default location (@file{/usr/local}); the configuration
-to be installed last would overwrite previously installed configurations.
-
-@c ---------------------------------------------------------------------
-@node Makefile generation
-@subsection @code{Makefile} generation
-@cindex @code{Makefile} generation
-
-Cygnus @code{configure} creates a file called @file{Makefile} in the build
-directory which can be used with @code{make} to automatically build a given
-program or package. @code{configure} also builds a @file{Makefile} for each
-relevant subdirectory for a given program or package (irrelevant subdirectories
-would be those which contain no code which needs configuring, and which
-therefore have no @code{configure} input file @file{configure.in} and no
-@file{Makefile} template @file{Makefile.in}). @xref{Running, @code{make}
-Invocation, How to Run @code{make}, make, GNU Make}, for details on using
-@code{make} to compile your source code.
-
-Each @file{Makefile} contains variables which have been configured for a
-specific build. These build variables are determined when @code{configure} is
-run. All build variables have defaults. By default, @code{configure}
-generates a @file{Makefile} which specifies:
-
-@cindex Default configuration
-@itemize @bullet
-@item a @dfn{native} build, which is to occur
+When we run @samp{autoheader}, it will remind us of any macros we forgot
+to add to @file{acconfig.h}.
+
+When we run @samp{automake}, it will want to add some files to our
+distribution. It will add them automatically if we use the
+@samp{--add-missing} option.
-@item in the current directory, and which will be installed
+By default, @samp{automake} will run in GNU mode, which means that it
+will want us to create certain additional files; as of this writing, it
+will want @file{NEWS}, @file{README}, @file{AUTHORS}, and
+@file{ChangeLog}, all of which are files which should appear in a
+standard GNU distribution. We can either add those files, or run
+@samp{automake} with the @samp{--foreign} option.
-@item in the default installation directory (@file{/usr/local}) when the code
-is compiled with @code{make}.
+Running these tools will generate the following files, all of which are
+described in the next chapter.
+
+@itemize @bullet
+@item
+@file{aclocal.m4}
+@item
+@file{configure}
+@item
+@file{config.in}
+@item
+@file{Makefile.in}
+@item
+@file{stamp-h.in}
@end itemize
-@noindent
-Variables are changeable through command-line options to @code{configure}
-(@pxref{Invoking configure, , Invoking @code{configure}}).
-
-If you are porting a new program and intend to use @code{configure}, see
-@ref{Porting, , Porting with @code{configure}}, as well as @ref{Makefiles, ,
-Writing Makefiles, make, GNU Make}, and @ref{Makefiles, , Makefile Conventions,
-standards, GNU Coding Standards}.
-
-@c ---------------------------------------------------------------------
-@node config.guess
-@subsection Determining system information
-@cindex @code{config.guess}
-
-The shell script @code{config.guess} is called when you do not specify a
-@var{hosttype} on the command line to @code{configure}. @code{config.guess}
-acquires available system information from your local machine through the shell
-command @code{uname}. It compares this information to a database and attempts
-to determine a usable three-part system identifier (known as a @dfn{triple}) to
-use as your @var{hosttype}. @xref{What configure really does, , What
-@code{configure} really does}, to see how this information is used.
-
-@emph{Note:} If you do not specify a @var{hosttype} on the command line,
-@code{configure} will attempt to configure your software to run on the machine
-you happen to be using. This may not be the configuration you desire.
-
-@c ---------------------------------------------------------------------
-@node config.status
-@subsection @code{config.status}
-@cindex @code{config.status}
-
-The final step in configuring a directory is to create an executable shell
-script, @file{config.status}. The main purpose of this file is to allow the
-@file{Makefile} for the current directory to rebuild itself, if necessary. It
-is usually run from within the @file{Makefile}. @xref{Makefile extensions, ,
-Extensions to the @sc{gnu} coding standards}.
-
-@file{config.status} also contains a record of the @code{configure} session
-which created it.
-
-@c ---------------------------------------------------------------------
-@node configure.in
-@section The @code{configure.in} input file
-@cindex @code{configure.in}
-
-A @file{configure.in} file for Cygnus @code{configure} consists of a
-@dfn{per-invocation} section, followed by a @dfn{per-host} section, followed by
-a @dfn{per-target} section, optionally followed by a @dfn{post-target} section.
-Each section is a shell script fragment, which is executed by the
-@code{configure} shell script at an appropriate time. Values are passed among
-@code{configure} and the shell fragments through a set of shell variables.
-When each section is being interpreted by the shell, the shell's current
-directory is the build directory, and any files created by the section (or
-referred to by the section) will be relative to the build directory. To
-reference files in other places (such as the source directory), prepend a shell
-variable such as @samp{$(srcdir)/} to the desired file name.
-
-@cindex @i{per-invocation} section
-The beginning of the @file{configure.in} file begins the @dfn{per-invocation}
-section.
-
-@cindex @i{per-host} section
-A line beginning with @samp{# per-host:} begins the @dfn{per-host} section.
-
-@cindex @i{per-target} section
-A line beginning with @samp{# per-target:} begins the @dfn{per-target} section.
-
-@cindex @i{post-target} section
-If it exists, the @dfn{post-target} section begins with @samp{# post-target:}.
+@node Files
+@chapter Files
+
+As was seen in the previous chapter, the GNU configure and build system
+uses a number of different files. The developer must write a few files.
+The others are generated by various tools.
+
+The system is rather flexible, and can be used in many different ways.
+In describing the files that it uses, I will describe the common case,
+and mention some other cases that may arise.
@menu
-* configure variables:: Variables available to configure.in
-* Minimal:: A minimal configure.in
-* Declarations:: For each invocation
-* per-host:: Host-specific instructions
-* per-target:: Target-specific instructions
-* post-target:: Instructions to be executed after target info
-* Example:: An example configure.in
+* Developer Files:: Developer Files.
+* Build Files:: Build Files.
+* Support Files:: Support Files.
@end menu
-@c ---------------------------------------------------------------------
-@node configure variables
-@subsection Variables available to @code{configure.in}
-@cindex @file{configure.in} interface
-@cindex configure variables
-
-The following variables pass information between the standard parts of
-@code{configure} and the shell-script fragments in @file{configure.in}:
-
-@table @code
-@item srctrigger
-@cindex @code{srctrigger}
-@vindex srctrigger
-Contains the name of a source file that is expected to live in the source
-directory. You must usually set this in the @dfn{per-invocation} section of
-@file{configure.in}. @code{configure} tests to see that this file exists. If
-the file does not exist, @code{configure} prints an error message. This is
-used as a sanity check that @file{configure.in} matches the source directory.
-
-@item srcname
-@cindex @code{srcname}
-@vindex srcname
-Contains the name of the source collection contained in the source directory.
-You must usually set this in the @dfn{per-invocation} section of
-@file{configure.in}. If the file named in @samp{srctrigger} does not exist,
-@code{configure} uses the value of @samp{srcname} when it prints the error
-message.
-
-@item configdirs
-@cindex @code{configdirs}
-@vindex configdirs
-Contains the names of any subdirectories in which @code{configure} should
-recurse. You must usually set this in the @dfn{per-invocation} section of
-@file{configure.in}.
-If @file{Makefile.in} contains a line starting with @samp{SUBDIRS =},
-then it will be replaced with an assignment to @samp{SUBDIRS} using
-the value of @samp{configdirs} (if @samp{subdirs} is empty). This can
-be used to determine which directories to configure and build depending
-on the host and target configurations.
-@c Most other matching makefile/config vars use the same name. Why not
-@c this? (FIXME).
-@c Can we get rid of SUBDIRS-substitution? It doesn't work well with subdirs.
-Use @samp{configdirs} (instead of the @samp{subdirs} variable
-described below) if you want to be able to partition the
-subdirectories, or use independent @file{Makefile} fragments.
-Each subdirectory can be independent, and independently reconfigured.
-
-@item subdirs
-@cindex @code{subdirs}
-@vindex subdirs
-Contains the names of any subdirectories where @code{configure} should create a
-@file{Makefile} (in addition to the current directory), @emph{without}
-recursively running @code{configure}. Use @samp{subdirs} (instead of the
-@samp{configdirs} variable described above) if you want to configure all of the
-directories as a unit. Since there is a single invocation of @code{configure}
-that configures many directories, all the directories can use the same
-@file{Makefile} fragments, and the same @code{configure.in}.
+@node Developer Files
+@section Developer Files
-@item host
-@cindex @code{host}
-@cindex Canonical ``triple''
-@vindex host
-Contains the full configuration name for the host (generated by the script
-@file{config.sub} from the name that you entered). This is a three-part
-name (commonly referred to as a @dfn{triple}) of the form
-@var{cpu}-@var{vendor}-@var{os}.
-
-There are separate variables @samp{host_cpu}, @samp{host_vendor}, and
-@samp{host_os} that you can use to test each of the three parts; this variable
-is useful, however, for error messages, and for testing combinations of the
-three components.
+This section describes the files written or generated by the developer
+of a package.
-@item host_cpu
-@vindex host_cpu
-Contains the first element of the canonical triple representing the host
-as returned by @file{config.sub}. This is occasionally used to
-distinguish between minor variations of a particular vendor's operating
-system and sometimes to determine variations in binary format between
-the host and the target.
-
-@item host_vendor
-@vindex host_vendor
-Contains the second element of the canonical triple representing the host as
-returned by @file{config.sub}. This is usually used to distinguish among the
-numerous variations of @emph{common} operating systems.
-@c "@emph{common} OS" doesn't convey much to me. Is this meant to cover
-@c cases like Unix, widespread but with many variations?
-
-@item host_os
-@vindex host_os
-Contains the the third element of the canonical triple representing the
-host as returned by @file{config.sub}.
+@menu
+* Developer Files Picture:: Developer Files Picture.
+* Written Developer Files:: Written Developer Files.
+* Generated Developer Files:: Generated Developer Files.
+@end menu
-@item target
-@cindex @code{target}
-@cindex Canonical ``triple''
-@vindex target
-Contains the full configuration name (generated by the script @file{config.sub}
-from the name that you entered) for the target. Like the host, this is a
-three-part name of the form @var{cpu}-@var{vendor}-@var{os}.
-
-There are separate variables @samp{target_cpu}, @samp{target_vendor}, and
-@samp{target_os} that you can use to test each of the three parts; this
-variable is useful, however, for error messages, and for testing combinations
-of the three components.
+@node Developer Files Picture
+@subsection Developer Files Picture
-@item target_cpu
-@vindex target_cpu
-Contains the first element of the canonical triple representing the target as
-returned by @file{config.sub}. This variable is used heavily by programs which
-are involved in building other programs, like the compiler, assembler, linker,
-etc. Most programs will not need the @samp{target} variables at all, but this
-one could conceivably be used to build a program, for instance, that operated
-on binary data files whose byte order or alignment differ from the system where
-the program is running.
-
-@item target_vendor
-@vindex target_vendor
-Contains the second element of the canonical triple representing the target as
-returned by @file{config.sub}. This is usually used to distinguish among the
-numerous variations of @emph{common} operating systems or object file
-formats. It is sometimes used to switch between different flavors of user
-interfaces.
-@c above query re "@emph{common} OS" applies here too
-
-@item target_os
-@vindex target_os
-Contains the the third element of the canonical triple representing the
-target as returned by @file{config.sub}. This variable is used by
-development tools to distinguish between subtle variations in object
-file formats that some vendors use across operating system releases. It
-might also be use to decide which libraries to build or what user
-interface the tool should provide.
-
-@item floating_point
-@cindex @code{floating_point}
-@cindex @code{nfp} option
-@vindex floating_point
-Set to @samp{no} if you invoked @code{configure} with the @samp{--nfp}
-command-line option, otherwise it is empty. This is a request to target
-machines with @dfn{no floating point} unit, even if the targets ordinarily have
-floating point units available.
-
-@item gas
-@cindex @code{with-gnu-as} option
-@vindex gas
-Set to @samp{true} if you invoked @code{configure} with the
-@w{@samp{--with-gnu-as}} command line option, otherwise it is empty. This is a
-request to assume that the specified @var{hosttype} machine has @sc{gnu} @code{as}
-available even if it ordinarily does not.
-
-@item srcdir
-@cindex @code{srcdir}
-@vindex srcdir
-Set to the name of the directory containing the source for this program.
-This will be different from @file{.} if you have specified the
-@samp{--srcdir=@var{dir}} option. @samp{srcdir} can indicate either an
-absolute path or a path relative to the build directory.
-
-@item package_makefile_frag
-@vindex package_makefile_frag
-If set in @file{configure.in}, this variable should be the name a file relative
-to @samp{srcdir} to be included in the resulting @file{Makefile}. If the named
-file does not exist, @code{configure} will print a warning message. This
-variable is not set by @code{configure}.
-
-@item host_makefile_frag
-@vindex host_makefile_frag
-If set in @file{configure.in}, this variable should be the name a file relative
-to @samp{srcdir} to be included in the resulting @file{Makefile}. If the named
-file does not exist, @code{configure} will print a warning message. This
-variable is not set by @code{configure}.
-
-@item target_makefile_frag
-@vindex target_makefile_frag
-If set in @file{configure.in}, this variable should be the name of a file,
-relative to @samp{srcdir}, to be included in the resulting @file{Makefile}. If
-the named file does not exist, @code{configure} will print a warning message.
-This variable is not set by @code{configure}.
-
-@item site_makefile_frag
-@vindex site_makefile_frag
-Set to a file name representing to the default @file{Makefile} fragment for
-this host. It may be set in @file{configure.in} to override this default.
-Normally @samp{site_makefile_frag} is empty, but will have a value if you
-specify @samp{--site=@var{site}} on the command line.
-@ignore -- this doesn't fit
-It is probably not a good idea to override this variable from
-@file{configure.in}, since that may defeat the @code{configure} user's
-intentions.
-@end ignore
+Here is a picture of the files which are written by the developer, the
+generated files which would be included with a complete source
+distribution, and the tools which create those files.
+@ifinfo
+The file names are plain text and the tool names are enclosed by
+@samp{*} characters
+@end ifinfo
+@ifnotinfo
+The file names are in rectangles with square corners and the tool names
+are in rectangles with rounded corners
+@end ifnotinfo
+(e.g., @samp{autoheader} is the name of a tool, not the name of a file).
+
+@image{configdev}
+
+@node Written Developer Files
+@subsection Written Developer Files
+
+The following files would be written by the developer.
+
+@table @file
+@item configure.in
+@cindex @file{configure.in}
+This is the configuration script. This script contains invocations of
+autoconf macros. It may also contain ordinary shell script code. This
+file will contain feature tests for portability issues. The last thing
+in the file will normally be an @samp{AC_OUTPUT} macro listing which
+files to create when the builder runs the configure script. This file
+is always required when using the GNU configure system. @xref{Write
+configure.in}.
+
+@item Makefile.am
+@cindex @file{Makefile.am}
+This is the automake input file. It describes how the code should be
+built. It consists of definitions of automake variables. It may also
+contain ordinary Makefile targets. This file is only needed when using
+automake (newer tools normally use automake, but there are still older
+tools which have not been converted, in which the developer writes
+@file{Makefile.in} directly). @xref{Write Makefile.am}.
+
+@item acconfig.h
+@cindex @file{acconfig.h}
+When the configure script creates a portability header file, by using
+@samp{AM_CONFIG_HEADER} (or, if not using automake,
+@samp{AC_CONFIG_HEADER}), this file is used to describe macros which are
+not recognized by the @samp{autoheader} command. This is normally a
+fairly uninteresting file, consisting of a collection of @samp{#undef}
+lines with comments. Normally any call to @samp{AC_DEFINE} in
+@file{configure.in} will require a line in this file. @xref{Write
+acconfig.h}.
+
+@item acinclude.m4
+@cindex @file{acinclude.m4}
+This file is not always required. It defines local autoconf macros.
+These macros may then be used in @file{configure.in}. If you don't need
+any local autoconf macros, then you don't need this file at all. In
+fact, in general, you never need local autoconf macros, since you can
+put everything in @file{configure.in}, but sometimes a local macro is
+convenient.
+
+Newer tools may omit @file{acinclude.m4}, and instead use a
+subdirectory, typically named @file{m4}, and define
+@samp{ACLOCAL_AMFLAGS = -I m4} in @file{Makefile.am} to force
+@samp{aclocal} to look there for macro definitions. The macro
+definitions are then placed in separate files in that directory.
+
+The @file{acinclude.m4} file is only used when using automake; in older
+tools, the developer writes @file{aclocal.m4} directly, if it is needed.
+@end table
+
+@node Generated Developer Files
+@subsection Generated Developer Files
+
+The following files would be generated by the developer.
+
+When using automake, these files are normally not generated manually
+after the first time. Instead, the generated @file{Makefile} contains
+rules to automatically rebuild the files as required. When
+@samp{AM_MAINTAINER_MODE} is used in @file{configure.in} (the normal
+case in Cygnus code), the automatic rebuilding rules will only be
+defined if you configure using the @samp{--enable-maintainer-mode}
+option.
+
+When using automatic rebuilding, it is important to ensure that all the
+various tools have been built and installed on your @samp{PATH}. Using
+automatic rebuilding is highly recommended, so much so that I'm not
+going to explain what you have to do if you don't use it.
+
+@table @file
+@item configure
+@cindex @file{configure}
+This is the configure script which will be run when building the
+package. This is generated by @samp{autoconf} from @file{configure.in}
+and @file{aclocal.m4}. This is a shell script.
+
+@item Makefile.in
+@cindex @file{Makefile.in}
+This is the file which the configure script will turn into the
+@file{Makefile} at build time. This file is generated by
+@samp{automake} from @file{Makefile.am}. If you aren't using automake,
+you must write this file yourself. This file is pretty much a normal
+@file{Makefile}, with some configure substitutions for certain
+variables.
+
+@item aclocal.m4
+@cindex @file{aclocal.m4}
+This file is created by the @samp{aclocal} program, based on the
+contents of @file{configure.in} and @file{acinclude.m4} (or, as noted in
+the description of @file{acinclude.m4} above, on the contents of an
+@file{m4} subdirectory). This file contains definitions of autoconf
+macros which @samp{autoconf} will use when generating the file
+@file{configure}. These autoconf macros may be defined by you in
+@file{acinclude.m4} or they may be defined by other packages such as
+automake, libtool or gettext. If you aren't using automake, you will
+normally write this file yourself; in that case, if @file{configure.in}
+uses only standard autoconf macros, this file will not be needed at all.
+
+@item config.in
+@cindex @file{config.in}
+@cindex @file{config.h.in}
+This file is created by @samp{autoheader} based on @file{acconfig.h} and
+@file{configure.in}. At build time, the configure script will define
+some of the macros in it to create @file{config.h}, which may then be
+included by your program. This permits your C code to use preprocessor
+conditionals to change its behaviour based on the characteristics of the
+host system. This file may also be called @file{config.h.in}.
+
+@item stamp.h-in
+@cindex @file{stamp-h.in}
+This rather uninteresting file, which I omitted from the picture, is
+generated by @samp{automake}. It always contains the string
+@samp{timestamp}. It is used as a timestamp file indicating whether
+@file{config.in} is up to date. Using a timestamp file means that
+@file{config.in} can be marked as up to date without actually changing
+its modification time. This is useful since @file{config.in} depends
+upon @file{configure.in}, but it is easy to change @file{configure.in}
+in a way which does not affect @file{config.in}.
+@end table
+
+@node Build Files
+@section Build Files
+
+This section describes the files which are created at configure and
+build time. These are the files which somebody who builds the package
+will see.
+
+Of course, the developer will also build the package. The distinction
+between developer files and build files is not that the developer does
+not see the build files, but that somebody who only builds the package
+does not have to worry about the developer files.
+
+@menu
+* Build Files Picture:: Build Files Picture.
+* Build Files Description:: Build Files Description.
+@end menu
+
+@node Build Files Picture
+@subsection Build Files Picture
+
+Here is a picture of the files which will be created at build time.
+@file{config.status} is both a created file and a shell script which is
+run to create other files, and the picture attempts to show that.
+
+@image{configbuild}
+
+@node Build Files Description
+@subsection Build Files Description
+
+This is a description of the files which are created at build time.
+
+@table @file
+@item config.status
+@cindex @file{config.status}
+The first step in building a package is to run the @file{configure}
+script. The @file{configure} script will create the file
+@file{config.status}, which is itself a shell script. When you first
+run @file{configure}, it will automatically run @file{config.status}.
+An @file{Makefile} derived from an automake generated @file{Makefile.in}
+will contain rules to automatically run @file{config.status} again when
+necessary to recreate certain files if their inputs change.
@item Makefile
-@vindex Makefile
-Set to the name of the generated @file{Makefile}. Normally this value is
-precisely @file{Makefile}, but some programs may want something else.
-
-@item removing
-@cindex @code{rm} option
-@vindex removing
-Normally empty but will be set to some non-null value if you specified
-@samp{--rm} on the command line. That is, if @samp{removing} is not empty,
-then @code{configure} is @emph{removing} a configuration rather than creating
-one.
-
-@item files
-@cindex Symbolic links
-@vindex files
-If this variable is not empty following the @dfn{per-target} section,
-then each word in its value will be the target of a symbolic link named
-in the corresponding word from the @samp{links} variable.
-
-@item links
-@cindex Symbolic links
-@vindex links
-If the @samp{files} variable is not empty following the @dfn{per-target}
-section, then @code{configure} creates symbolic links with the first word of
-@samp{links} pointing to the first word of @samp{files}, the second word of
-@samp{links} pointing to the second word of @samp{files}, and so on.
+@cindex @file{Makefile}
+This is the file which make will read to build the program. The
+@file{config.status} script will transform @file{Makefile.in} into
+@file{Makefile}.
+
+@item config.h
+@cindex @file{config.h}
+This file defines C preprocessor macros which C code can use to adjust
+its behaviour on different systems. The @file{config.status} script
+will transform @file{config.in} into @file{config.h}.
+
+@item config.cache
+@cindex @file{config.cache}
+This file did not fit neatly into the picture, and I omitted it. It is
+used by the @file{configure} script to cache results between runs. This
+can be an important speedup. If you modify @file{configure.in} in such
+a way that the results of old tests should change (perhaps you have
+added a new library to @samp{LDFLAGS}), then you will have to remove
+@file{config.cache} to force the tests to be rerun.
+
+The autoconf manual explains how to set up a site specific cache file.
+This can speed up running @file{configure} scripts on your system.
+
+@item stamp.h
+@cindex @file{stamp-h}
+This file, which I omitted from the picture, is similar to
+@file{stamp-h.in}. It is used as a timestamp file indicating whether
+@file{config.h} is up to date. This is useful since @file{config.h}
+depends upon @file{config.status}, but it is easy for
+@file{config.status} to change in a way which does not affect
+@file{config.h}.
@end table
-@c ---------------------------------------------------------------------
-@node Minimal
-@subsection A minimal @code{configure.in}
-@cindex Minimal @file{configure.in} example
+@node Support Files
+@section Support Files
+
+The GNU configure and build system requires several support files to be
+included with your distribution. You do not normally need to concern
+yourself with these. If you are using the Cygnus tree, most are already
+present. Otherwise, they will be installed with your source by
+@samp{automake} (with the @samp{--add-missing} option) and
+@samp{libtoolize}.
+
+You don't have to put the support files in the top level directory. You
+can put them in a subdirectory, and use the @samp{AC_CONFIG_AUX_DIR}
+macro in @file{configure.in} to tell @samp{automake} and the
+@file{configure} script where they are.
+
+In this section, I describe the support files, so that you can know what
+they are and why they are there.
+
+@table @file
+@item ABOUT-NLS
+Added by automake if you are using gettext. This is a documentation
+file about the gettext project.
+@item ansi2knr.c
+Used by an automake generated @file{Makefile} if you put @samp{ansi2knr}
+in @samp{AUTOMAKE_OPTIONS} in @file{Makefile.am}. This permits
+compiling ANSI C code with a K&R C compiler.
+@item ansi2knr.1
+The man page which goes with @file{ansi2knr.c}.
+@item config.guess
+A shell script which determines the configuration name for the system on
+which it is run.
+@item config.sub
+A shell script which canonicalizes a configuration name entered by a
+user.
+@item elisp-comp
+Used to compile Emacs LISP files.
+@item install-sh
+A shell script which installs a program. This is used if the configure
+script can not find an install binary.
+@item ltconfig
+Used by libtool. This is a shell script which configures libtool for
+the particular system on which it is used.
+@item ltmain.sh
+Used by libtool. This is the actual libtool script which is used, after
+it is configured by @file{ltconfig} to build a library.
+@item mdate-sh
+A shell script used by an automake generated @file{Makefile} to pretty
+print the modification time of a file. This is used to maintain version
+numbers for texinfo files.
+@item missing
+A shell script used if some tool is missing entirely. This is used by
+an automake generated @file{Makefile} to avoid certain sorts of
+timestamp problems.
+@item mkinstalldirs
+A shell script which creates a directory, including all parent
+directories. This is used by an automake generated @file{Makefile}
+during installation.
+@item texinfo.tex
+Required if you have any texinfo files. This is used when converting
+Texinfo files into DVI using @samp{texi2dvi} and @TeX{}.
+@item ylwrap
+A shell script used by an automake generated @file{Makefile} to run
+programs like @samp{bison}, @samp{yacc}, @samp{flex}, and @samp{lex}.
+These programs default to producing output files with a fixed name, and
+the @file{ylwrap} script runs them in a subdirectory to avoid file name
+conflicts when using a parallel make program.
+@end table
-A minimal @file{configure.in} consists of four lines.
+@node Configuration Names
+@chapter Configuration Names
+@cindex configuration names
+@cindex configuration triplets
+@cindex triplets
+@cindex host names
+@cindex host triplets
+@cindex canonical system names
+@cindex system names
+@cindex system types
+
+The GNU configure system names all systems using a @dfn{configuration
+name}. All such names used to be triplets (they may now contain four
+parts in certain cases), and the term @dfn{configuration triplet} is
+still seen.
-@example
-srctrigger=foo.c
-srcname="source for the foo program"
-# per-host:
-# per-target:
-@end example
+@menu
+* Configuration Name Definition:: Configuration Name Definition.
+* Using Configuration Names:: Using Configuration Names.
+@end menu
-The @samp{# per-host:} and @samp{# per-target:} lines divide the file into the
-three required sections. The @samp{srctrigger} line names a file.
-@code{configure} checks to see that this file exists in the source directory
-before configuring. If the @samp{srctrigger} file does not exist,
-@code{configure} uses the value of @samp{srcname} to print an error message
-about not finding the source.
-
-This particular example uses no links, and only the default host,
-target, and site-specific @file{Makefile} fragments if they exist.
-
-@c ---------------------------------------------------------------------
-@node Declarations
-@subsection For each invocation
-@cindex For each invocation
-@cindex Declarations section
-@cindex @i{per-invocation} section
-
-@code{configure} invokes the entire shell script fragment from the start of
-@file{configure.in} up to a line beginning with @w{@samp{# per-host:}}
-immediately after parsing command line arguments. The variables
-@samp{srctrigger} and @samp{srcname} @emph{must} be set here.
-
-You might also want to set the variables @samp{configdirs} and
-@samp{package_makefile_frag} here.
-
-@c ---------------------------------------------------------------------
-@node per-host
-@subsection Host-specific instructions
-@cindex Host-specific instructions
-@cindex @i{host} shell-script fragment
-@cindex @i{per-host} section
-
-The @dfn{per-host} section of @file{configure.in} starts with the line that
-begins with @w{@samp{# per-host:}} and ends before a line beginning with
-@w{@samp{# per-target:}}. @code{configure} invokes the commands in the
-@dfn{per-host} section when determining host-specific information.
-
-This section usually contains a big @code{case} statement using the variable
-@samp{host} to determine appropriate values for @samp{host_makefile_frag} and
-@samp{files}, although @samp{files} is not usually set here. Usually, it is
-set at the end of the @dfn{per-target} section after determining the names of
-the target specific configuration files.
-
-@c ---------------------------------------------------------------------
-@node per-target
-@subsection Target-specific instructions
-@cindex Target-specific instructions
-@cindex target shell-script fragment
-@cindex @i{per-target} section
-
-The @dfn{per-target} section of @file{configure.in} starts with the line that
-begins with @w{@samp{# per-target:}} and ends before the line that begins with
-@w{@samp{# post-target:}}, if there is such a line. Otherwise the
-@dfn{per-target} section extends to the end of the file. @code{configure}
-invokes the commands in the @dfn{per-target} section when determining
-target-specific information, and before building any files, directories, or
-links.
-
-This section usually contains a big @code{case} statement using the variable
-@samp{target} to determine appropriate values for @samp{target_makefile_frag}
-and @samp{files}. The last lines in the @dfn{per-target} section normally set
-the variables @samp{files} and @samp{links}.
-
-@c ---------------------------------------------------------------------
-@node post-target
-@subsection Instructions to be executed after target info
-@cindex Post-target shell-script fragment
-@cindex @i{post-target} section
-
-The @dfn{post-target} section is optional. If it exists, the
-@samp{post-target} section starts with a line beginning with @w{@samp{#
-Post-target:}} and extends to the end of the file. If it exists,
-@code{configure} invokes this section once for each target after
-building all files, directories, or links.
-
-This section is seldom needed, but you can use it to edit the @file{Makefile}
-generated by @code{configure}.
-
-@c ---------------------------------------------------------------------
-@node Example
-@subsection An example @code{configure.in}
-@cindex Example @file{configure.in}
-@cindex Sample @file{configure.in}
-@c @cindex @code{bison} @file{configure.in}
-@c this won't be the bison configure.in for long.. need better example
-
-Here is a small example of a @file{configure.in} file.
-
-@cartouche
-@example
-@group
-# This file is a collection of shell script fragments
-# used to tailor a template configure script as
-# appropriate for this directory. For more information,
-# see configure.texi.
+@node Configuration Name Definition
+@section Configuration Name Definition
+
+This is a string of the form
+@var{cpu}-@var{manufacturer}-@var{operating_system}. In some cases,
+this is extended to a four part form:
+@var{cpu}-@var{manufacturer}-@var{kernel}-@var{operating_system}.
+
+When using a configuration name in a configure option, it is normally
+not necessary to specify an entire name. In particular, the
+@var{manufacturer} field is often omitted, leading to strings such as
+@samp{i386-linux} or @samp{sparc-sunos}. The shell script
+@file{config.sub} will translate these shortened strings into the
+canonical form. autoconf will arrange for @file{config.sub} to be run
+automatically when it is needed.
+
+The fields of a configuration name are as follows:
+
+@table @var
+@item cpu
+The type of processor. This is typically something like @samp{i386} or
+@samp{sparc}. More specific variants are used as well, such as
+@samp{mipsel} to indicate a little endian MIPS processor.
+@item manufacturer
+A somewhat freeform field which indicates the manufacturer of the
+system. This is often simply @samp{unknown}. Other common strings are
+@samp{pc} for an IBM PC compatible system, or the name of a workstation
+vendor, such as @samp{sun}.
+@item operating_system
+The name of the operating system which is run on the system. This will
+be something like @samp{solaris2.5} or @samp{irix6.3}. There is no
+particular restriction on the version number, and strings like
+@samp{aix4.1.4.0} are seen. For an embedded system, which has no
+operating system, this field normally indicates the type of object file
+format, such as @samp{elf} or @samp{coff}.
+@item kernel
+This is used mainly for GNU/Linux. A typical GNU/Linux configuration
+name is @samp{i586-pc-linux-gnulibc1}. In this case the kernel,
+@samp{linux}, is separated from the operating system, @samp{gnulibc1}.
+@end table
-configdirs=
-srctrigger=warshall.c
-srcname="bison"
+The shell script @file{config.guess} will normally print the correct
+configuration name for the system on which it is run. It does by
+running @samp{uname} and by examining other characteristics of the
+system.
+
+Because @file{config.guess} can normally determine the configuration
+name for a machine, it is normally only necessary to specify a
+configuration name when building a cross-compiler or when building using
+a cross-compiler.
+
+@node Using Configuration Names
+@section Using Configuration Names
+
+A configure script will sometimes have to make a decision based on a
+configuration name. You will need to do this if you have to compile
+code differently based on something which can not be tested using a
+standard autoconf feature test.
+
+It is normally better to test for particular features, rather than to
+test for a particular system. This is because as Unix evolves,
+different systems copy features from one another. Even if you need to
+determine whether the feature is supported based on a configuration
+name, you should define a macro which describes the feature, rather than
+defining a macro which describes the particular system you are on.
+
+Testing for a particular system is normally done using a case statement
+in @file{configure.in}. The case statement might look something like
+the following, assuming that @samp{host} is a shell variable holding a
+canonical configuration name (which will be the case if
+@file{configure.in} uses the @samp{AC_CANONICAL_HOST} or
+@samp{AC_CANONICAL_SYSTEM} macro).
-# per-host:
+@smallexample
case "$@{host@}" in
-m88k-motorola-*)
- host_makefile_frag=config/mh-delta88
- ;;
+i[3456]86-*-linux-gnu*) do something ;;
+sparc*-sun-solaris2.[56789]*) do something ;;
+sparc*-sun-solaris*) do something ;;
+mips*-*-elf*) do something ;;
esac
+@end smallexample
-# per-target:
-files="bison_in.hairy"
-links="bison.hairy"
+It is particularly important to use @samp{*} after the operating system
+field, in order to match the version number which will be generated by
+@file{config.guess}.
-# post-target:
-@end group
-@end example
-@end cartouche
+In most cases you must be careful to match a range of processor types.
+For most processor families, a trailing @samp{*} suffices, as in
+@samp{mips*} above. For the i386 family, something along the lines of
+@samp{i[3456]86} suffices at present. For the m68k family, you will
+need something like @samp{m68*}. Of course, if you do not need to match
+on the processor, it is simpler to just replace the entire field by a
+@samp{*}, as in @samp{*-*-irix*}.
-@c ---------------------------------------------------------------------
-@node Install locations
-@section Install locations
-@cindex Where to install
-@cindex Install locations
+@node Cross Compilation Tools
+@chapter Cross Compilation Tools
+@cindex cross tools
-Using the default configuration, @samp{make install} creates a single tree of
-files, some of which are programs. The location of this tree is determined by
-the value of the variable @samp{prefix}. The default value of @samp{prefix} is
-@samp{/usr/local}. This is often correct for native tools installed on only
-one host.
+The GNU configure and build system can be used to build @dfn{cross
+compilation} tools. A cross compilation tool is a tool which runs on
+one system and produces code which runs on another system.
@menu
-* prefix:: Changing the default install directory
-* exec_prefix:: How to separate host independent files
- from host dependent files when
- installing for multiple hosts
-* Install details:: Full descriptions of all installation subdirectories
+* Cross Compilation Concepts:: Cross Compilation Concepts.
+* Host and Target:: Host and Target.
+* Using the Host Type:: Using the Host Type.
+* Specifying the Target:: Specifying the Target.
+* Using the Target Type:: Using the Target Type.
+* Cross Tools in the Cygnus Tree:: Cross Tools in the Cygnus Tree
@end menu
-@c ---------------------------------------------------------------------
-@node prefix
-@subsection Changing the default install directory
-@cindex Changing the install directory
-@cindex @code{prefix} option
-@vindex prefix
-
-In the default configuration, all files are installed in subdirectories
-of @file{/usr/local}. The location is determined by the value of
-the @code{configure} variable @samp{prefix}; in turn, this determines the
-value of the @file{Makefile} variable of the same name (@samp{prefix}).
-
-You can also set the value of the @file{Makefile} variable @samp{prefix}
-explicitly each time you invoke @code{make} if you are so inclined. However,
-because many programs have this location compiled in, you must specify the
-@samp{prefix} value consistently on each invocation of @code{make}, or you will
-end up with a broken installation.
-
-To make this easier, the value of the @code{configure} variable
-@samp{prefix} can be set on the command line to @code{configure}
-using the option @samp{--prefix=}.
-
-@c ---------------------------------------------------------------------
-@node exec_prefix
-@subsection Installing for multiple hosts
-@cindex Configuring for multiple hosts
-@cindex Sharing host-independent files
-@cindex Installing host-independent files
-@cindex The @code{exec_prefix} directory
-@vindex exec_prefix
-
-By default, host dependent files are installed in subdirectories of
-@file{$(exec_prefix)}. The location is determined by the value of the
-@code{configure} variable @samp{exec_prefix}, which determines the value of the
-@file{Makefile} variable @samp{exec_prefix}. This makes it easier to install
-for a single host, and simplifies changing the default location for the install
-tree. The default doesn't allow for multiple hosts to effectively share
-host independent files, however.
-
-To configure so that multiple hosts can share common files, use something like:
-
-@cindex Example session
-@smallexample
-configure @var{host1} -prefix=/usr/gnu -exec_prefix=/usr/gnu/H-host1
-make all info install install-info clean
+@node Cross Compilation Concepts
+@section Cross Compilation Concepts
+
+@cindex cross compiler
+A compiler which produces programs which run on a different system is a
+cross compilation compiler, or simply a @dfn{cross compiler}.
+Similarly, we speak of cross assemblers, cross linkers, etc.
+
+In the normal case, a compiler produces code which runs on the same
+system as the one on which the compiler runs. When it is necessary to
+distinguish this case from the cross compilation case, such a compiler
+is called a @dfn{native compiler}. Similarly, we speak of native
+assemblers, etc.
+
+Although the debugger is not strictly speaking a compilation tool, it is
+nevertheless meaningful to speak of a cross debugger: a debugger which
+is used to debug code which runs on another system. Everything that is
+said below about configuring cross compilation tools applies to the
+debugger as well.
+
+@node Host and Target
+@section Host and Target
+@cindex host system
+@cindex target system
+
+When building cross compilation tools, there are two different systems
+involved: the system on which the tools will run, and the system for
+which the tools generate code.
+
+The system on which the tools will run is called the @dfn{host} system.
+
+The system for which the tools generate code is called the @dfn{target}
+system.
+
+For example, suppose you have a compiler which runs on a GNU/Linux
+system and generates ELF programs for a MIPS embedded system. In this
+case the GNU/Linux system is the host, and the MIPS ELF system is the
+target. Such a compiler could be called a GNU/Linux cross MIPS ELF
+compiler, or, equivalently, a @samp{i386-linux-gnu} cross
+@samp{mips-elf} compiler.
+
+Naturally, most programs are not cross compilation tools. For those
+programs, it does not make sense to speak of a target. It only makes
+sense to speak of a target for tools like @samp{gcc} or the
+@samp{binutils} which actually produce running code. For example, it
+does not make sense to speak of the target of a tool like @samp{bison}
+or @samp{make}.
+
+Most cross compilation tools can also serve as native tools. For a
+native compilation tool, it is still meaningful to speak of a target.
+For a native tool, the target is the same as the host. For example, for
+a GNU/Linux native compiler, the host is GNU/Linux, and the target is
+also GNU/Linux.
+
+@node Using the Host Type
+@section Using the Host Type
+
+In almost all cases the host system is the system on which you run the
+@samp{configure} script, and on which you build the tools (for the case
+when they differ, @pxref{Canadian Cross}).
+
+@cindex @samp{AC_CANONICAL_HOST}
+If your configure script needs to know the configuration name of the
+host system, and the package is not a cross compilation tool and
+therefore does not have a target, put @samp{AC_CANONICAL_HOST} in
+@file{configure.in}. This macro will arrange to define a few shell
+variables when the @samp{configure} script is run.
+
+@table @samp
+@item host
+The canonical configuration name of the host. This will normally be
+determined by running the @file{config.guess} shell script, although the
+user is permitted to override this by using an explicit @samp{--host}
+option.
+@item host_alias
+In the unusual case that the user used an explicit @samp{--host} option,
+this will be the argument to @samp{--host}. In the normal case, this
+will be the same as the @samp{host} variable.
+@item host_cpu
+@itemx host_vendor
+@itemx host_os
+The first three parts of the canonical configuration name.
+@end table
-configure @var{host2} -prefix=/usr/gnu -exec_prefix=/usr/gnu/H-host2
-make all info install install-info
-@end smallexample
+The shell variables may be used by putting shell code in
+@file{configure.in}. For an example, see @ref{Using Configuration
+Names}.
-The first line configures the source for @var{host1} to place host-specific
-programs in subdirectories of @file{/usr/gnu/H-@var{host1}}.
-
-The second line builds and installs all programs for @var{host1},
-including both host-independent and host-specific files, as well as removing
-the host-specific object files from of the build directory.
-
-The third line reconfigures the source for @var{host2} to place host
-specific programs in subdirectories of @file{/usr/gnu/H-@var{host2}}.
-
-The fourth line builds and installs all programs for @var{host2}. Host
-specific files are installed in new directories, but the host
-independent files are installed @emph{on top of} the host
-independent files installed for @var{host1}. This results in a single
-copy of the host independent files, suitable for use by both hosts.
-
-@xref{Makefile extensions, , Extensions to the @sc{gnu} coding standards}, for
-more information.
-
-@c ---------------------------------------------------------------------
-@node Install details
-@subsection Full descriptions of all installation subdirectories
-@cindex Install details
-@cindex Installation subdirectories
-@cindex Subdirectories
-
-During any install, a number of standard directories are created. Their names
-are determined by @file{Makefile} variables. Some of the defaults for
-@file{Makefile} variables can be changed at configuration time using command
-line options to @code{configure}. For more information on the standard
-directories or the @file{Makefile} variables, please refer to @ref{Makefiles, ,
-Makefile Conventions, standards, GNU Coding Standards}. See also @ref{Makefile
-extensions, , Extensions to the @sc{gnu} coding standards}.
-
-Note that @code{configure} does not create the directory indicated by the
-variable @samp{srcdir} at any time. @code{$(srcdir)} is not an installation
-directory.
+@node Specifying the Target
+@section Specifying the Target
-You can override all @file{Makefile} variables on the command line to
-@code{make}. (@xref{Overriding, , Overriding Variables, make, GNU Make}.) If
-you do so, you will need to specify the value precisely the same way for each
-invocation of @code{make}, or you risk ending up with a broken installation.
-This is because many programs have the locations of other programs or files
-compiled into them. If you find yourself overriding any of the variables
-frequently, you should consider site dependent @file{Makefile} fragments. See
-also @ref{Sites, , Adding site info}.
-
-During @samp{make install}, a number of standard directories are created and
-populated. The following @file{Makefile} variables define them. Those whose
-defaults are set by corresponding @code{configure} variables are marked
-``@code{Makefile} and @code{configure}''.
-
-@table @code
-@item prefix (@code{Makefile} and @code{configure})
-@cindex @code{prefix}
-@vindex prefix
-The root of the installation tree. You can set its @file{Makefile} default
-with the @samp{--prefix=} command line option to @code{configure}
-(@pxref{Invoking configure, , Invoking @code{configure}}). The default value
-for @samp{prefix} is @samp{/usr/local}.
-
-@item bindir
-@cindex @code{bindir}
-@vindex bindir
-A directory for binary programs that users can run. The default value for
-@samp{bindir} depends on @samp{prefix}; @samp{bindir} is normally changed only
-indirectly through @samp{prefix}. The default value for @samp{bindir} is
-@samp{$(prefix)/bin}.
-
-@item exec_prefix (@code{Makefile} and @code{configure})
-@cindex @code{exec_prefix}
-@vindex exec_prefix
-A directory for host dependent files. You can specify the @file{Makefile}
-default value by using the @samp{--exec_prefix=} option to @code{configure}.
-(@xref{Invoking configure, , Invoking @code{configure}}.) The default value
-for @samp{exec_prefix} is @samp{$(prefix)}.
-
-@item libdir
-@cindex @code{libdir}
-@vindex libdir
-A directory for libraries and support programs. The default value for
-@samp{libdir} depends on @samp{prefix}; @samp{libdir} is normally changed only
-indirectly through @samp{prefix}. The default value for @samp{libdir} is
-@samp{$(prefix)/lib}.
-
-@item mandir
-@cindex @code{mandir}
-@vindex mandir
-A directory for @code{man} format documentation (``man pages''). The default
-value for @samp{mandir} depends on @samp{prefix}; @samp{mandir} is normally
-changed only indirectly through @samp{prefix}. The default value for
-@samp{mandir} is @samp{$(prefix)/man}.
-
-@item man@var{N}dir
-@cindex @code{man@var{N}dir}
-@vindex man@var{N}dir
-These are eight variables named @samp{man1dir}, @samp{man2dir}, etc. They name
-the specific directories for each man page section. For example,
-@samp{man1dir} by default holds the filename @file{$(mandir)/man1}; this
-directory contains @file{emacs.1} (the man page for @sc{gnu} Emacs).
-Similarly, @samp{man5dir} contains the value @file{$(mandir)/man5}, indicating
-the directory which holds @file{rcsfile.5} (the man page describing the
-@code{rcs} data file format). The default value for any of the
-@samp{man@var{N}dir} variables depends indirectly on @samp{prefix}, and is
-normally changed only through @samp{prefix}. The default value for
-@samp{man@var{N}dir} is @samp{$(mandir)/man@var{N}}.
-
-@item man@var{N}ext
-@cindex @code{man@var{N}ext}
-@vindex man@var{N}ext
-@emph{Not supported by Cygnus @code{configure}}. The @cite{@sc{gnu} Coding
-Standards} do not call for @samp{man1ext}, @samp{man2ext}, so the intended use
-for @code{manext} is apparently not parallel to @samp{mandir}. Its use is not
-clear. (See also @ref{Makefile extensions, , Extensions to the @sc{gnu} coding
-standards}.)
-
-@item infodir
-@cindex @code{infodir}
-@vindex infodir
-A directory for @code{info} format documentation. The default value for
-@samp{infodir} depends indirectly on @samp{prefix}; @samp{infodir} is
-normally changed only through @samp{prefix}. The default value for
-@samp{infodir} is @samp{$(prefix)/info}.
-
-@item docdir
-@cindex @code{docdir}
-@vindex docdir
-A directory for any documentation that is in a format other than those used by
-@code{info} or @code{man}. The default value for @samp{docdir} depends
-indirectly on @samp{prefix}; @samp{docdir} is normally changed only through
-@samp{prefix}. The default value for @samp{docdir} is @samp{$(datadir)/doc}.
-@emph{This variable is an extension to the @sc{gnu} coding standards}. (See
-also @ref{Makefile extensions, , Extensions to the @sc{gnu} coding standards}.)
-
-@item includedir
-@cindex @code{includedir}
-@vindex includedir
-A directory for the header files accompanying the libraries installed in
-@samp{libdir}. The default value for @samp{includedir} depends on
-@samp{prefix}; @samp{includedir} is normally changed only indirectly
-through @samp{prefix}. The default value for @samp{includedir} is
-@samp{$(prefix)/include}.
-@end table
+By default, the @samp{configure} script will assume that the target is
+the same as the host. This is the more common case; for example, it
+leads to a native compiler rather than a cross compiler.
-@c ---------------------------------------------------------------------
-@node Host
-@section Host
-@cindex Host
-
-The arguments to @code{configure} are @dfn{hosttypes}. By
-@dfn{hosttype} we mean the @dfn{environment} in which the source will be
-compiled. This need not necessarily be the same as the physical machine
-involved, although it usually is.
-
-For example, if some obscure machine had the @sc{gnu} @code{POSIX} emulation
-libraries available, it would be possible to configure most @sc{gnu} source for
-a @code{POSIX} system and build it on the obscure host.
-
-For more on this topic, see @ref{Host Environments, On Configuring Development
-Tools, Host Environments, cfg-paper, On Configuring Development Tools}.
-
-@c ---------------------------------------------------------------------
-@node Target
-@section Target
-@cindex Target
-
-For building native development tools, or most of the other @sc{gnu}
-tools, you need not worry about the target. The @dfn{target} of a
-configuration defaults to the same as the @dfn{host}.
-
-For building cross development tools, please see @ref{Building Development
-Environments, On Configuring Development Tools, Building Development
-Environments, cfg-paper, On Configuring Development Tools}.
-
-@c ---------------------------------------------------------------------
-@node Makefile fragments
-@section Adding information about local conventions
-@cindex @code{Makefile} fragments
-@cindex Local conventions
-@cindex Adding local info
-@cindex Adding site info
-
-If you find that a tool does not get configured to your liking, or if
-@code{configure}'s conventions differ from your local conventions, you should
-probably consider @dfn{site-specific @file{Makefile} fragments}. See also
-@ref{Sites, , Adding site info}.
-
-These are probably not the right choice for options that can be set from
-the @code{configure} command line or for differences that are host or
-target dependent.
-
-Cygnus @code{configure} uses three types of @file{Makefile} fragments. In a
-generated @file{Makefile} they appear in the order: @dfn{target fragment},
-@dfn{host fragment}, and @dfn{site fragment}. This allows host fragments to
-override target fragments, and site fragments to override both.
-
-Host-specific @file{Makefile} fragments conventionally reside in the
-@file{./config/} subdirectory with names of the form @file{mh-@var{hosttype}}.
-They are used for hosts that require odd options to the standard compiler and
-for compile time options based on the host configuration.
-
-Target-specific @file{Makefile} fragments conventionally reside in the
-@file{./config/} subdirectory with names of the form @file{mt-@var{target}}.
-They are used for target dependent compile time options.
-
-Site specific @file{Makefile} fragments conventionally reside in the
-@file{./config/} subdirectory with names of the form @file{ms-@var{site}}.
-They are used to override host- and target-independent compile time options.
-Note that you can also override these options on the @code{make} invocation
-line.
-
-@c ---------------------------------------------------------------------
-@node Makefile extensions
-@section Extensions to the @sc{gnu} coding standards
-@cindex @code{Makefile} extensions
-@cindex Cygnus extensions
-@cindex Coding standards extensions
-
-The following additions to the @sc{gnu} coding standards are required for
-Cygnus @code{configure} to work properly.
+@cindex @samp{--target} option
+@cindex target option
+@cindex configure target
+If you want to build a cross compilation tool, you must specify the
+target explicitly by using the @samp{--target} option when you run
+@samp{configure}. The argument to @samp{--target} is the configuration
+name of the system for which you wish to generate code.
+@xref{Configuration Names}.
-@itemize @bullet
-@item
-The @file{Makefile} must contain exactly one line starting with @samp{####}.
-This line should follow any default macro definitions but precede any rules.
-Host, target, and site-specific @file{Makefile} fragments will be inserted
-immediately after this line. If the line is missing, the fragments will not be
-inserted.
+For example, to build tools which generate code for a MIPS ELF embedded
+system, you would use @samp{--target mips-elf}.
-@item
-Cygnus adds the following targets to each @file{Makefile}. Their existence is
-not required for Cygnus @code{configure}, but they are documented here for
-completeness.
+@node Using the Target Type
+@section Using the Target Type
-@table @code
-@kindex info
-@item info
-Build all info files from texinfo source.
+@cindex @samp{AC_CANONICAL_SYSTEM}
+When writing @file{configure.in} for a cross compilation tool, you will
+need to use information about the target. To do this, put
+@samp{AC_CANONICAL_SYSTEM} in @file{configure.in}.
-@kindex install-info
-@item install-info
-Install all info files.
+@samp{AC_CANONICAL_SYSTEM} will look for a @samp{--target} option and
+canonicalize it using the @file{config.sub} shell script. It will also
+run @samp{AC_CANONICAL_HOST} (@pxref{Using the Host Type}).
-@kindex clean-info
-@item clean-info
-Remove all info files and any intermediate files that can be generated
-from texinfo source.
+The target type will be recorded in the following shell variables. Note
+that the host versions of these variables will also be defined by
+@samp{AC_CANONICAL_HOST}.
-@kindex Makefile
-@item Makefile
-Calls @code{./config.status} to rebuild the @file{Makefile} in this directory.
+@table @samp
+@item target
+The canonical configuration name of the target.
+@item target_alias
+The argument to the @samp{--target} option. If the user did not specify
+a @samp{--target} option, this will be the same as @samp{host_alias}.
+@item target_cpu
+@itemx target_vendor
+@itemx target_os
+The first three parts of the canonical target configuration name.
@end table
-@item
-The following @file{Makefile} targets have revised semantics:
-
-@table @code
-@kindex install
-@item install
-Should @emph{not} depend on the target @samp{all}. If the program is not
-already built, @samp{make install} should fail. This allows you to install
-programs even when @code{make} would otherwise determine them to be out of
-date. This can happen, for example, when the result of a @samp{make all} is
-transported via tape to another machine for installation.
-
-@kindex clean
-@item clean
-Should remove any file that can be regenerated by the @file{Makefile},
-excepting only the @file{Makefile} itself, and any links created by
-@code{configure}. That is, @code{make all clean} should return all directories
-to their original condition. If this is not done, then the command sequence
-
-@cindex Example session
-@example
-configure @var{host1} ; make all install clean ;
-configure @var{host2} ; make all install
-@end example
+Note that if @samp{host} and @samp{target} are the same string, you can
+assume a native configuration. If they are different, you can assume a
+cross configuration.
+
+It is arguably possible for @samp{host} and @samp{target} to represent
+the same system, but for the strings to not be identical. For example,
+if @samp{config.guess} returns @samp{sparc-sun-sunos4.1.4}, and somebody
+configures with @samp{--target sparc-sun-sunos4.1}, then the slight
+differences between the two versions of SunOS may be unimportant for
+your tool. However, in the general case it can be quite difficult to
+determine whether the differences between two configuration names are
+significant or not. Therefore, by convention, if the user specifies a
+@samp{--target} option without specifying a @samp{--host} option, it is
+assumed that the user wants to configure a cross compilation tool.
+
+The variables @samp{target} and @samp{target_alias} should be handled
+differently.
+
+In general, whenever the user may actually see a string,
+@samp{target_alias} should be used. This includes anything which may
+appear in the file system, such as a directory name or part of a tool
+name. It also includes any tool output, unless it is clearly labelled
+as the canonical target configuration name. This permits the user to
+use the @samp{--target} option to specify how the tool will appear to
+the outside world.
+
+On the other hand, when checking for characteristics of the target
+system, @samp{target} should be used. This is because a wide variety of
+@samp{--target} options may map into the same canonical configuration
+name. You should not attempt to duplicate the canonicalization done by
+@samp{config.sub} in your own code.
+
+By convention, cross tools are installed with a prefix of the argument
+used with the @samp{--target} option, also known as @samp{target_alias}
+(@pxref{Using the Target Type}). If the user does not use the
+@samp{--target} option, and thus is building a native tool, no prefix is
+used.
+
+For example, if gcc is configured with @samp{--target mips-elf}, then
+the installed binary will be named @samp{mips-elf-gcc}. If gcc is
+configured without a @samp{--target} option, then the installed binary
+will be named @samp{gcc}.
+
+The autoconf macro @samp{AC_ARG_PROGRAM} will handle this for you. If
+you are using automake, no more need be done; the programs will
+automatically be installed with the correct prefixes. Otherwise, see
+the autoconf documentation for @samp{AC_ARG_PROGRAM}.
+
+@node Cross Tools in the Cygnus Tree
+@section Cross Tools in the Cygnus Tree
+
+The Cygnus tree is used for various packages including gdb, the GNU
+binutils, and egcs. It is also, of course, used for Cygnus releases.
+
+In the Cygnus tree, the top level @file{configure} script uses the old
+Cygnus configure system, not autoconf. The top level @file{Makefile.in}
+is written to build packages based on what is in the source tree, and
+supports building a large number of tools in a single
+@samp{configure}/@samp{make} step.
+
+The Cygnus tree may be configured with a @samp{--target} option. The
+@samp{--target} option applies recursively to every subdirectory, and
+permits building an entire set of cross tools at once.
-@noindent
-will fail because of intermediate files intended for @var{host1}.
-@end table
+@menu
+* Host and Target Libraries:: Host and Target Libraries.
+* Target Library Configure Scripts:: Target Library Configure Scripts.
+* Make Targets in Cygnus Tree:: Make Targets in Cygnus Tree.
+* Target libiberty:: Target libiberty
+@end menu
-@item
-Cygnus adds the following macros to all @file{Makefile.in} files, but
-you are not required to use them to run Cygnus @code{configure}.
-
-@table @code
-@kindex docdir
-@item docdir
-The directory in which to install any documentation that is not either a
-@code{man} page or an @code{info} file. For @code{man} pages, see
-@samp{mandir}; for @code{info}, see @samp{infodir}.
-
-@kindex includedir
-@item includedir
-The directory in which to install any header files that should be made
-available to users. This is distinct from the @code{gcc} include directory,
-which is intended for @code{gcc} only. Files in @samp{includedir} may be used
-by @code{cc} as well.
-@end table
+@node Host and Target Libraries
+@subsection Host and Target Libraries
+
+The Cygnus tree distinguishes host libraries from target libraries.
+
+Host libraries are built with the compiler used to build the programs
+which run on the host, which is called the host compiler. This includes
+libraries such as @samp{bfd} and @samp{tcl}. These libraries are built
+with the host compiler, and are linked into programs like the binutils
+or gcc which run on the host.
+
+Target libraries are built with the target compiler. If gcc is present
+in the source tree, then the target compiler is the gcc that is built
+using the host compiler. Target libraries are libraries such as
+@samp{newlib} and @samp{libstdc++}. These libraries are not linked into
+the host programs, but are instead made available for use with programs
+built with the target compiler.
+
+For the rest of this section, assume that gcc is present in the source
+tree, so that it will be used to build the target libraries.
+
+There is a complication here. The configure process needs to know which
+compiler you are going to use to build a tool; otherwise, the feature
+tests will not work correctly. The Cygnus tree handles this by not
+configuring the target libraries until the target compiler is built. In
+order to permit everything to build using a single
+@samp{configure}/@samp{make}, the configuration of the target libraries
+is actually triggered during the make step.
+
+When the target libraries are configured, the @samp{--target} option is
+not used. Instead, the @samp{--host} option is used with the argument
+of the @samp{--target} option for the overall configuration. If no
+@samp{--target} option was used for the overall configuration, the
+@samp{--host} option will be passed with the output of the
+@file{config.guess} shell script. Any @samp{--build} option is passed
+down unchanged.
+
+This translation of configuration options is done because since the
+target libraries are compiled with the target compiler, they are being
+built in order to run on the target of the overall configuration. By
+the definition of host, this means that their host system is the same as
+the target system of the overall configuration.
+
+The same process is used for both a native configuration and a cross
+configuration. Even when using a native configuration, the target
+libraries will be configured and built using the newly built compiler.
+This is particularly important for the C++ libraries, since there is no
+reason to assume that the C++ compiler used to build the host tools (if
+there even is one) uses the same ABI as the g++ compiler which will be
+used to build the target libraries.
+
+There is one difference between a native configuration and a cross
+configuration. In a native configuration, the target libraries are
+normally configured and built as siblings of the host tools. In a cross
+configuration, the target libraries are normally built in a subdirectory
+whose name is the argument to @samp{--target}. This is mainly for
+historical reasons.
+
+To summarize, running @samp{configure} in the Cygnus tree configures all
+the host libraries and tools, but does not configure any of the target
+libraries. Running @samp{make} then does the following steps:
+@itemize @bullet
@item
-The following macros have revised semantics. Most of them describe
-installation directories; see also @ref{Install details, , Full description of
-all installation subdirectories}.
-
-@table @code
-@kindex datadir
-@item datadir
-is used for host independent data files.
-
-@kindex mandir
-@item mandir
-The default path for @samp{mandir} depends on @samp{prefix}.
-
-@kindex infodir
-@item infodir
-The default path for @samp{infodir} depends on @samp{prefix}.
-
-@kindex BISON
-@item BISON
-is assumed to have a @code{yacc} calling convention. To use @sc{gnu}
-@code{bison}, use @samp{BISON=bison -y}.
-@end table
-
+Build the host libraries.
@item
-Each Cygnus @file{Makefile} also conforms to one additional restriction:
-
-When libraries are installed, the line containing the call to
-@samp{INSTALL_DATA} should always be followed by a line containing a call to
-@samp{RANLIB} on the installed library. This is to accommodate systems that
-use @code{ranlib}. Systems that do not use @code{ranlib} can set @samp{RANLIB}
-to ``@code{echo}'' in a host specific @file{Makefile} fragment.
+Build the host programs, including gcc. Note that we call gcc both a
+host program (since it runs on the host) and a target compiler (since it
+generates code for the target).
+@item
+Using the newly built target compiler, configure the target libraries.
+@item
+Build the target libraries.
@end itemize
-@c ========================================================================
-@node Porting
-@chapter Porting with @code{configure}
-@cindex Porting with @code{configure}
-
-This section explains how to add programs, host and target configuration
-names, and site-specific information to Cygnus @code{configure}.
+The steps need not be done in precisely this order, since they are
+actually controlled by @file{Makefile} targets.
+
+@node Target Library Configure Scripts
+@subsection Target Library Configure Scripts
+
+There are a few things you must know in order to write a configure
+script for a target library. This is just a quick sketch, and beginners
+shouldn't worry if they don't follow everything here.
+
+The target libraries are configured and built using a newly built target
+compiler. There may not be any startup files or libraries for this
+target compiler. In fact, those files will probably be built as part of
+some target library, which naturally means that they will not exist when
+your target library is configured.
+
+This means that the configure script for a target library may not use
+any test which requires doing a link. This unfortunately includes many
+useful autoconf macros, such as @samp{AC_CHECK_FUNCS}. autoconf macros
+which do a compile but not a link, such as @samp{AC_CHECK_HEADERS}, may
+be used.
+
+This is a severe restriction, but normally not a fatal one, as target
+libraries can often assume the presence of other target libraries, and
+thus know which functions will be available.
+
+As of this writing, the autoconf macro @samp{AC_PROG_CC} does a link to
+make sure that the compiler works. This may fail in a target library,
+so target libraries must use a different set of macros to locate the
+compiler. See the @file{configure.in} file in a directory like
+@file{libiberty} or @file{libgloss} for an example.
+
+As noted in the previous section, target libraries are sometimes built
+in directories which are siblings to the host tools, and are sometimes
+built in a subdirectory. The @samp{--with-target-subdir} configure
+option will be passed when the library is configured. Its value will be
+an empty string if the target library is a sibling. Its value will be
+the name of the subdirectory if the target library is in a subdirectory.
+
+If the overall build is not a native build (i.e., the overall configure
+used the @samp{--target} option), then the library will be configured
+with the @samp{--with-cross-host} option. The value of this option will
+be the host system of the overall build. Recall that the host system of
+the library will be the target of the overall build. If the overall
+build is a native build, the @samp{--with-cross-host} option will not be
+used.
+
+A library which can be built both standalone and as a target library may
+want to install itself into different directories depending upon the
+case. When built standalone, or when built native, the library should
+be installed in @samp{$(libdir)}. When built as a target library which
+is not native, the library should be installed in @samp{$(tooldir)/lib}.
+The @samp{--with-cross-host} option may be used to distinguish these
+cases.
+
+This same test of @samp{--with-cross-host} may be used to see whether it
+is OK to use link tests in the configure script. If the
+@samp{--with-cross-host} option is not used, then the library is being
+built either standalone or native, and a link should work.
+
+@node Make Targets in Cygnus Tree
+@subsection Make Targets in Cygnus Tree
+
+The top level @file{Makefile} in the Cygnus tree defines targets for
+every known subdirectory.
+
+For every subdirectory @var{dir} which holds a host library or program,
+the @file{Makefile} target @samp{all-@var{dir}} will build that library
+or program.
+
+There are dependencies among host tools. For example, building gcc
+requires first building gas, because the gcc build process invokes the
+target assembler. These dependencies are reflected in the top level
+@file{Makefile}.
+
+For every subdirectory @var{dir} which holds a target library, the
+@file{Makefile} target @samp{configure-target-@var{dir}} will configure
+that library. The @file{Makefile} target @samp{all-target-@var{dir}}
+will build that library.
+
+Every @samp{configure-target-@var{dir}} target depends upon
+@samp{all-gcc}, since gcc, the target compiler, is required to configure
+the tool. Every @samp{all-target-@var{dir}} target depends upon the
+corresponding @samp{configure-target-@var{dir}} target.
+
+There are several other targets which may be of interest for each
+directory: @samp{install-@var{dir}}, @samp{clean-@var{dir}}, and
+@samp{check-@var{dir}}. There are also corresponding @samp{target}
+versions of these for the target libraries , such as
+@samp{install-target-@var{dir}}.
+
+@node Target libiberty
+@subsection Target libiberty
+
+The @file{libiberty} subdirectory is currently a special case, in that
+it is the only directory which is built both using the host compiler and
+using the target compiler.
+
+This is because the files in @file{libiberty} are used when building the
+host tools, and they are also incorporated into the @file{libstdc++}
+target library as support code.
+
+This duality does not pose any particular difficulties. It means that
+there are targets for both @samp{all-libiberty} and
+@samp{all-target-libiberty}.
+
+In a native configuration, when target libraries are not built in a
+subdirectory, the same objects are normally used as both the host build
+and the target build. This is normally OK, since libiberty contains
+only C code, and in a native configuration the results of the host
+compiler and the target compiler are normally interoperable.
+
+Irix 6 is again an exception here, since the SGI native compiler
+defaults to using the @samp{O32} ABI, and gcc defaults to using the
+@samp{N32} ABI. On Irix 6, the target libraries are built in a
+subdirectory even for a native configuration, avoiding this problem.
+
+There are currently no other libraries built for both the host and the
+target, but there is no conceptual problem with adding more.
+
+@node Canadian Cross
+@chapter Canadian Cross
+@cindex canadian cross
+@cindex building with a cross compiler
+@cindex cross compiler, building with
+
+It is possible to use the GNU configure and build system to build a
+program which will run on a system which is different from the system on
+which the tools are built. In other words, it is possible to build
+programs using a cross compiler.
+
+This is referred to as a @dfn{Canadian Cross}.
@menu
-* Programs:: Adding configure to new programs
-* Hosts and targets:: Adding hosts and targets
-* Sites:: Adding site info
+* Canadian Cross Example:: Canadian Cross Example.
+* Canadian Cross Concepts:: Canadian Cross Concepts.
+* Build Cross Host Tools:: Build Cross Host Tools.
+* Build and Host Options:: Build and Host Options.
+* CCross not in Cygnus Tree:: Canadian Cross not in Cygnus Tree.
+* CCross in Cygnus Tree:: Canadian Cross in Cygnus Tree.
+* Supporting Canadian Cross:: Supporting Canadian Cross.
@end menu
-@c ---------------------------------------------------------------------
-@node Programs
-@section Adding @code{configure} to new programs
-@cindex Adding @code{configure} to new programs
-
-If you are writing a new program, you probably shouldn't worry about porting or
-configuration issues until it is running reasonably on some host. Then refer
-back to this section.
-
-If your program currently has a @code{configure} script that meets the @sc{gnu}
-standards (@pxref{Configuration, , How Configuration Should Work, standards,
-GNU Coding Standards}, please do not add Cygnus @code{configure}. It should be
-possible to add this program without change to a Cygnus @code{configure} style
-source tree.
-
-@cindex @code{autoconf}
-If the program is not target dependent, please consider using @code{autoconf}
-instead of Cygnus @code{configure}. @code{autoconf} is available from the Free
-Software Foundation; it is a program which generates an executable shell script
-called @file{configure} by automatically finding information on the system to
-be configured on and embedding this information in the shell script.
-@file{configure} scripts generated by @code{autoconf} require no arguments, and
-accept the same options as Cygnus @code{configure}. For detailed instructions
-on using @code{autoconf}, see @ref{Making configure Scripts, , How to organize
-and produce Autoconf scripts, autoconf, Autoconf}.
-
-
-To add Cygnus @code{configure} to an existing program, do the following:
-
-@table @bullet
-@item Make sure the @file{Makefile} conforms to the @sc{gnu} standard
-The coding standard for writing a @sc{gnu} @file{Makefile} is described in
-@ref{Makefiles, , Makefile Conventions, standards, GNU Coding Standards}. For
-technical information on writing a @file{Makefile}, see @ref{Makefiles, ,
-Writing Makefiles, make, GNU Make}.
-
-@item Add Cygnus extensions to the @file{Makefile}
-These are described in @ref{Makefile extensions, , Extensions to the @sc{gnu}
-coding standards}.
-
-@item Collect package specific definitions in a single file
-Many packages are best configured using a common @file{Makefile} fragment which
-is included by all of the makefiles in the different directories of the
-package. In order to accomplish this, set the variable
-@samp{package_makefile_fragment} to the name of the file. It will be inserted
-into the final @file{Makefile} before the target-specific fragment.
-
-@item Move host support from @file{Makefile} to fragments
-This usually involves finding sections of the @file{Makefile} that say things
-like ``uncomment these lines for host @var{hosttype}'' and moving them to a new
-file called @file{./config/mh-@var{hosttype}}. For more information, see @ref{Hosts
-and targets, , Adding hosts and targets}.
-
-@item Choose defaults
-If the program has compile-time options that determine the way the program
-should behave, choose reasonable defaults and make these @file{Makefile}
-variables. Be sure the variables are assigned their default values before the
-@samp{####} line so that site-specific @file{Makefile} fragments can override
-them (@pxref{Makefile extensions, , Extensions to the @sc{gnu} coding
-standards}).
-
-@item Locate configuration files
-If there is configuration information in header files or source files, separate
-it in such a way that the files have generic names. Then move the specific
-instances of those files into the @file{./config/} subdirectory.
-
-@item Separate host and target information
-Some programs already have this information separated. If yours does not, you
-will need to separate these two kinds of configuration information. @dfn{Host
-specific} information is the information needed to compile the program.
-@dfn{Target specific} information is information on the format of data files
-that the program will read or write. This information should live in separate
-files in the @file{./config/} subdirectory with names that reflect the
-configuration for which they are intended.
-
-At this point you might skip this step and simply move on. If you do, you
-should end up with a program that can be configured only to build @dfn{native}
-tools, that is, tools for which the host system is also the target system.
-Later, you could attempt to build a cross tool and separate out the
-target-specific information by figuring out what went wrong. This is often
-simpler than combing through all of the source code.
-
-@item Write @code{configure.in}
-Usually this involves writing shell script fragments to map from canonical
-configuration names into the names of the configuration files. These files
-will then be linked at configure time from the specific instances of those
-files in @file{./config} to files in the build directory with more generic
-names. (See also @ref{Build directories, , Build directories}.) The format of
-@file{configure.in} is described in @ref{configure.in, , The
-@code{configure.in} input file}.
-
-@item Rename @file{Makefile} to @file{Makefile.in}
-@end table
+@node Canadian Cross Example
+@section Canadian Cross Example
+
+Here is an example of a Canadian Cross.
+
+While running on a GNU/Linux, you can build a program which will run on
+a Solaris system. You would use a GNU/Linux cross Solaris compiler to
+build the program.
+
+Of course, you could not run the resulting program on your GNU/Linux
+system. You would have to copy it over to a Solaris system before you
+would run it.
+
+Of course, you could also simply build the programs on the Solaris
+system in the first place. However, perhaps the Solaris system is not
+available for some reason; perhaps you actually don't have one, but you
+want to build the tools for somebody else to use. Or perhaps your
+GNU/Linux system is much faster than your Solaris system.
+
+A Canadian Cross build is most frequently used when building programs to
+run on a non-Unix system, such as DOS or Windows. It may be simpler to
+configure and build on a Unix system than to support the configuration
+machinery on a non-Unix system.
+
+@node Canadian Cross Concepts
+@section Canadian Cross Concepts
+
+When building a Canadian Cross, there are at least two different systems
+involved: the system on which the tools are being built, and the system
+on which the tools will run.
+
+The system on which the tools are being built is called the @dfn{build}
+system.
+
+The system on which the tools will run is called the host system.
+
+For example, if you are building a Solaris program on a GNU/Linux
+system, as in the previous section, the build system would be GNU/Linux,
+and the host system would be Solaris.
+
+It is, of course, possible to build a cross compiler using a Canadian
+Cross (i.e., build a cross compiler using a cross compiler). In this
+case, the system for which the resulting cross compiler generates code
+is called the target system. (For a more complete discussion of host
+and target systems, @pxref{Host and Target}).
+
+An example of building a cross compiler using a Canadian Cross would be
+building a Windows cross MIPS ELF compiler on a GNU/Linux system. In
+this case the build system would be GNU/Linux, the host system would be
+Windows, and the target system would be MIPS ELF.
+
+The name Canadian Cross comes from the case when the build, host, and
+target systems are all different. At the time that these issues were
+all being hashed out, Canada had three national political parties.
+
+@node Build Cross Host Tools
+@section Build Cross Host Tools
+
+In order to configure a program for a Canadian Cross build, you must
+first build and install the set of cross tools you will use to build the
+program.
+
+These tools will be build cross host tools. That is, they will run on
+the build system, and will produce code that runs on the host system.
+
+It is easy to confuse the meaning of build and host here. Always
+remember that the build system is where you are doing the build, and the
+host system is where the resulting program will run. Therefore, you
+need a build cross host compiler.
+
+In general, you must have a complete cross environment in order to do
+the build. This normally means a cross compiler, cross assembler, and
+so forth, as well as libraries and include files for the host system.
+
+@node Build and Host Options
+@section Build and Host Options
+@cindex configuring a canadian cross
+@cindex canadian cross, configuring
+
+When you run @file{configure}, you must use both the @samp{--build} and
+@samp{--host} options.
+
+@cindex @samp{--build} option
+@cindex build option
+@cindex configure build system
+The @samp{--build} option is used to specify the configuration name of
+the build system. This can normally be the result of running the
+@file{config.guess} shell script, and it is reasonable to use
+@samp{--build=`config.guess`}.
+
+@cindex @samp{--host} option
+@cindex host option
+@cindex configure host
+The @samp{--host} option is used to specify the configuration name of
+the host system.
+
+As we explained earlier, @file{config.guess} is used to set the default
+value for the @samp{--host} option (@pxref{Using the Host Type}). We
+can now see that since @file{config.guess} returns the type of system on
+which it is run, it really identifies the build system. Since the host
+system is normally the same as the build system (i.e., people do not
+normally build using a cross compiler), it is reasonable to use the
+result of @file{config.guess} as the default for the host system when
+the @samp{--host} option is not used.
+
+It might seem that if the @samp{--host} option were used without the
+@samp{--build} option that the configure script could run
+@file{config.guess} to determine the build system, and presume a
+Canadian Cross if the result of @file{config.guess} differed from the
+@samp{--host} option. However, for historical reasons, some configure
+scripts are routinely run using an explicit @samp{--host} option, rather
+than using the default from @file{config.guess}. As noted earlier, it
+is difficult or impossible to reliably compare configuration names
+(@pxref{Using the Target Type}). Therefore, by convention, if the
+@samp{--host} option is used, but the @samp{--build} option is not used,
+then the build system defaults to the host system.
+
+@node CCross not in Cygnus Tree
+@section Canadian Cross not in Cygnus Tree.
+
+If you are not using the Cygnus tree, you must explicitly specify the
+cross tools which you want to use to build the program. This is done by
+setting environment variables before running the @file{configure}
+script.
+
+You must normally set at least the environment variables @samp{CC},
+@samp{AR}, and @samp{RANLIB} to the cross tools which you want to use to
+build.
+
+For some programs, you must set additional cross tools as well, such as
+@samp{AS}, @samp{LD}, or @samp{NM}.
+
+You would set these environment variables to the build cross tools which
+you are going to use.
+
+For example, if you are building a Solaris program on a GNU/Linux
+system, and your GNU/Linux cross Solaris compiler were named
+@samp{solaris-gcc}, then you would set the environment variable
+@samp{CC} to @samp{solaris-gcc}.
+
+@node CCross in Cygnus Tree
+@section Canadian Cross in Cygnus Tree
+@cindex canadian cross in cygnus tree
+
+This section describes configuring and building a Canadian Cross when
+using the Cygnus tree.
-At this point you should have a program that can be configured using
-Cygnus @code{configure}.
+@menu
+* Standard Cygnus CCross:: Building a Normal Program.
+* Cross Cygnus CCross:: Building a Cross Program.
+@end menu
-@c ---------------------------------------------------------------------
-@node Hosts and targets
-@section Adding hosts and targets
-@cindex Adding hosts and targets
-@cindex Hosts and targets
+@node Standard Cygnus CCross
+@subsection Building a Normal Program
+
+When configuring a Canadian Cross in the Cygnus tree, all the
+appropriate environment variables are automatically set to
+@samp{@var{host}-@var{tool}}, where @var{host} is the value used for the
+@samp{--host} option, and @var{tool} is the name of the tool (e.g.,
+@samp{gcc}, @samp{as}, etc.). These tools must be on your @samp{PATH}.
+
+Adding a prefix of @var{host} will give the usual name for the build
+cross host tools. To see this, consider that when these cross tools
+were built, they were configured to run on the build system and to
+produce code for the host system. That is, they were configured with a
+@samp{--target} option that is the same as the system which we are now
+calling the host. Recall that the default name for installed cross
+tools uses the target system as a prefix (@pxref{Using the Target
+Type}). Since that is the system which we are now calling the host,
+@var{host} is the right prefix to use.
+
+For example, if you configure with @samp{--build=i386-linux-gnu} and
+@samp{--host=solaris}, then the Cygnus tree will automatically default
+to using the compiler @samp{solaris-gcc}. You must have previously
+built and installed this compiler, probably by doing a build with no
+@samp{--host} option and with a @samp{--target} option of
+@samp{solaris}.
+
+@node Cross Cygnus CCross
+@subsection Building a Cross Program
+
+There are additional considerations if you want to build a cross
+compiler, rather than a native compiler, in the Cygnus tree using a
+Canadian Cross.
+
+When you build a cross compiler using the Cygnus tree, then the target
+libraries will normally be built with the newly built target compiler
+(@pxref{Host and Target Libraries}). However, this will not work when
+building with a Canadian Cross. This is because the newly built target
+compiler will be a program which runs on the host system, and therefore
+will not be able to run on the build system.
+
+Therefore, when building a cross compiler with the Cygnus tree, you must
+first install a set of build cross target tools. These tools will be
+used when building the target libraries.
+
+Note that this is not a requirement of a Canadian Cross in general. For
+example, it would be possible to build just the host cross target tools
+on the build system, to copy the tools to the host system, and to build
+the target libraries on the host system. The requirement for build
+cross target tools is imposed by the Cygnus tree, which expects to be
+able to build both host programs and target libraries in a single
+@samp{configure}/@samp{make} step. Because it builds these in a single
+step, it expects to be able to build the target libraries on the build
+system, which means that it must use a build cross target toolchain.
+
+For example, suppose you want to build a Windows cross MIPS ELF compiler
+on a GNU/Linux system. You must have previously installed both a
+GNU/Linux cross Windows compiler and a GNU/Linux cross MIPS ELF
+compiler.
+
+In order to build the Windows (configuration name @samp{i386-cygwin32})
+cross MIPS ELF (configure name @samp{mips-elf}) compiler, you might
+execute the following commands (long command lines are broken across
+lines with a trailing backslash as a continuation character).
-To add a host or target to a program that already uses Cygnus @code{configure},
-do the following.
+@example
+mkdir linux-x-cygwin32
+cd linux-x-cygwin32
+@var{srcdir}/configure --target i386-cygwin32 --prefix=@var{installdir} \
+ --exec-prefix=@var{installdir}/H-i386-linux
+make
+make install
+cd ..
+mkdir linux-x-mips-elf
+cd linux-x-mips-elf
+@var{srcdir}/configure --target mips-elf --prefix=@var{installdir} \
+ --exec-prefix=@var{installdir}/H-i386-linux
+make
+make install
+cd ..
+mkdir cygwin32-x-mips-elf
+cd cygwin32-x-mips-elf
+@var{srcdir}/configure --build=i386-linux-gnu --host=i386-cygwin32 \
+ --target=mips-elf --prefix=@var{wininstalldir} \
+ --exec-prefix=@var{wininstalldir}/H-i386-cygwin32
+make
+make install
+@end example
-@itemize @bullet
+You would then copy the contents of @var{wininstalldir} over to the
+Windows machine, and run the resulting programs.
-@item
-Make sure the new configuration name is represented in @file{config.sub}. If
-not, add it. For more details, see the comments in the shell script
-@file{config.sub}.
+@node Supporting Canadian Cross
+@section Supporting Canadian Cross
-@item
-If you are adding a host configuration, look in @file{configure.in}, in the
-@dfn{per-host} section. Make sure that your configuration name is represented
-in the mapping from host configuration names to configuration files. If not,
-add it. Also see @ref{configure.in, , The @code{configure.in} input file}.
+If you want to make it possible to build a program you are developing
+using a Canadian Cross, you must take some care when writing your
+configure and make rules. Simple cases will normally work correctly.
+However, it is not hard to write configure and make tests which will
+fail in a Canadian Cross.
-@item
-If you are adding a target configuration, look in @file{configure.in}, in the
-@dfn{per-target} section. Make sure that your configuration name is
-represented in the mapping from target configuration names to configuration
-files. If not, add it. Also see @ref{configure.in, , The @code{configure.in}
-input file}.
+@menu
+* CCross in Configure:: Supporting Canadian Cross in Configure Scripts.
+* CCross in Make:: Supporting Canadian Cross in Makefiles.
+@end menu
-@item
-Look in @file{configure.in} for the variables @samp{files}, @samp{links},
-@samp{host_makefile_frag}, and @samp{target_makefile_frag}. The values
-assigned to these variables are the names of the configuration files, (relative
-to @samp{srcdir}) that the program uses. Make sure that copies of the files
-exist for your host. If not, create them. See also @ref{configure variables,
-, Variables available to @code{configure.in}}.
-@end itemize
+@node CCross in Configure
+@subsection Supporting Canadian Cross in Configure Scripts
+@cindex canadian cross in configure
+
+In a @file{configure.in} file, after calling @samp{AC_PROG_CC}, you can
+find out whether this is a Canadian Cross configure by examining the
+shell variable @samp{cross_compiling}. In a Canadian Cross, which means
+that the compiler is a cross compiler, @samp{cross_compiling} will be
+@samp{yes}. In a normal configuration, @samp{cross_compiling} will be
+@samp{no}.
+
+You ordinarily do not need to know the type of the build system in a
+configure script. However, if you do need that information, you can get
+it by using the macro @samp{AC_CANONICAL_SYSTEM}, the same macro that is
+used to determine the target system. This macro will set the variables
+@samp{build}, @samp{build_alias}, @samp{build_cpu}, @samp{build_vendor},
+and @samp{build_os}, which correspond to the similar @samp{target} and
+@samp{host} variables, except that they describe the build system.
+
+When writing tests in @file{configure.in}, you must remember that you
+want to test the host environment, not the build environment.
+
+Macros like @samp{AC_CHECK_FUNCS} which use the compiler will test the
+host environment. That is because the tests will be done by running the
+compiler, which is actually a build cross host compiler. If the
+compiler can find the function, that means that the function is present
+in the host environment.
+
+Tests like @samp{test -f /dev/ptyp0}, on the other hand, will test the
+build environment. Remember that the configure script is running on the
+build system, not the host system. If your configure scripts examines
+files, those files will be on the build system. Whatever you determine
+based on those files may or may not be the case on the host system.
+
+Most autoconf macros will work correctly for a Canadian Cross. The main
+exception is @samp{AC_TRY_RUN}. This macro tries to compile and run a
+test program. This will fail in a Canadian Cross, because the program
+will be compiled for the host system, which means that it will not run
+on the build system.
+
+The @samp{AC_TRY_RUN} macro provides an optional argument to tell the
+configure script what to do in a Canadian Cross. If that argument is
+not present, you will get a warning when you run @samp{autoconf}:
+@smallexample
+warning: AC_TRY_RUN called without default to allow cross compiling
+@end smallexample
+@noindent
+This tells you that the resulting @file{configure} script will not work
+with a Canadian Cross.
+
+In some cases while it may better to perform a test at configure time,
+it is also possible to perform the test at run time. In such a case you
+can use the cross compiling argument to @samp{AC_TRY_RUN} to tell your
+program that the test could not be performed at configure time.
+
+There are a few other autoconf macros which will not work correctly with
+a Canadian Cross: a partial list is @samp{AC_FUNC_GETPGRP},
+@samp{AC_FUNC_SETPGRP}, @samp{AC_FUNC_SETVBUF_REVERSED}, and
+@samp{AC_SYS_RESTARTABLE_SYSCALLS}. The @samp{AC_CHECK_SIZEOF} macro is
+generally not very useful with a Canadian Cross; it permits an optional
+argument indicating the default size, but there is no way to know what
+the correct default should be.
+
+@node CCross in Make
+@subsection Supporting Canadian Cross in Makefiles.
+@cindex canadian cross in makefile
+
+The main Canadian Cross issue in a @file{Makefile} arises when you want
+to use a subsidiary program to generate code or data which you will then
+include in your real program.
+
+If you compile this subsidiary program using @samp{$(CC)} in the usual
+way, you will not be able to run it. This is because @samp{$(CC)} will
+build a program for the host system, but the program is being built on
+the build system.
+
+You must instead use a compiler for the build system, rather than the
+host system. In the Cygnus tree, this make variable
+@samp{$(CC_FOR_BUILD)} will hold a compiler for the build system.
+
+Note that you should not include @file{config.h} in a file you are
+compiling with @samp{$(CC_FOR_BUILD)}. The @file{configure} script will
+build @file{config.h} with information for the host system. However,
+you are compiling the file using a compiler for the build system (a
+native compiler). Subsidiary programs are normally simple filters which
+do no user interaction, and it is normally possible to write them in a
+highly portable fashion so that the absence of @file{config.h} is not
+crucial.
+
+@cindex @samp{HOST_CC}
+The gcc @file{Makefile.in} shows a complex situation in which certain
+files, such as @file{rtl.c}, must be compiled into both subsidiary
+programs run on the build system and into the final program. This
+approach may be of interest for advanced build system hackers. Note
+that the build system compiler is rather confusingly called
+@samp{HOST_CC}.
+
+@node Cygnus Configure
+@chapter Cygnus Configure
+@cindex cygnus configure
+
+The Cygnus configure script predates autoconf. All of its interesting
+features have been incorporated into autoconf. No new programs should
+be written to use the Cygnus configure script.
+
+However, the Cygnus configure script is still used in a few places: at
+the top of the Cygnus tree and in a few target libraries in the Cygnus
+tree. Until those uses have been replaced with autoconf, some brief
+notes are appropriate here. This is not complete documentation, but it
+should be possible to use this as a guide while examining the scripts
+themselves.
-This should be enough to @code{configure} for a new host or target
-configuration name. Getting the program to compile and run properly represents
-the hardest work of any port.
+@menu
+* Cygnus Configure Basics:: Cygnus Configure Basics.
+* Cygnus Configure in C++ Libraries:: Cygnus Configure in C++ Libraries.
+@end menu
-@c ---------------------------------------------------------------------
-@node Sites
-@section Adding site info
-@cindex Sites
-@cindex Adding site info
+@node Cygnus Configure Basics
+@section Cygnus Configure Basics
+
+Cygnus configure does not use any generated files; there is no program
+corresponding to @samp{autoconf}. Instead, there is a single shell
+script named @samp{configure} which may be found at the top of the
+Cygnus tree. This shell script was written by hand; it was not
+generated by autoconf, and it is incorrect, and indeed harmful, to run
+@samp{autoconf} in the top level of a Cygnus tree.
+
+Cygnus configure works in a particular directory by examining the file
+@file{configure.in} in that directory. That file is broken into four
+separate shell scripts.
+
+The first is the contents of @file{configure.in} up to a line that
+starts with @samp{# per-host:}. This is the common part.
+
+The second is the rest of @file{configure.in} up to a line that starts
+with @samp{# per-target:}. This is the per host part.
+
+The third is the rest of @file{configure.in} up to a line that starts
+with @samp{# post-target:}. This is the per target part.
+
+The fourth is the remainder of @file{configure.in}. This is the post
+target part.
+
+If any of these comment lines are missing, the corresponding shell
+script is empty.
+
+Cygnus configure will first execute the common part. This must set the
+shell variable @samp{srctrigger} to the name of a source file, to
+confirm that Cygnus configure is looking at the right directory. This
+may set the shell variables @samp{package_makefile_frag} and
+@samp{package_makefile_rules_frag}.
+
+Cygnus configure will next set the @samp{build} and @samp{host} shell
+variables, and execute the per host part. This may set the shell
+variable @samp{host_makefile_frag}.
+
+Cygnus configure will next set the @samp{target} variable, and execute
+the per target part. This may set the shell variable
+@samp{target_makefile_frag}.
+
+Any of these scripts may set the @samp{subdirs} shell variable. This
+variable is a list of subdirectories where a @file{Makefile.in} file may
+be found. Cygnus configure will automatically look for a
+@file{Makefile.in} file in the current directory. The @samp{subdirs}
+shell variable is not normally used, and I believe that the only
+directory which uses it at present is @file{newlib}.
+
+For each @file{Makefile.in}, Cygnus configure will automatically create
+a @file{Makefile} by adding definitions for @samp{make} variables such
+as @samp{host} and @samp{target}, and automatically editing the values
+of @samp{make} variables such as @samp{prefix} if they are present.
+
+Also, if any of the @samp{makefile_frag} shell variables are set, Cygnus
+configure will interpret them as file names relative to either the
+working directory or the source directory, and will read the contents of
+the file into the generated @file{Makefile}. The file contents will be
+read in after the first line in @file{Makefile.in} which starts with
+@samp{####}.
+
+These @file{Makefile} fragments are used to customize behaviour for a
+particular host or target. They serve to select particular files to
+compile, and to define particular preprocessor macros by providing
+values for @samp{make} variables which are then used during compilation.
+Cygnus configure, unlike autoconf, normally does not do feature tests,
+and normally requires support to be added manually for each new host.
+
+The @file{Makefile} fragment support is similar to the autoconf
+@samp{AC_SUBST_FILE} macro.
+
+After creating each @file{Makefile}, the post target script will be run
+(i.e., it may be run several times). This script may further customize
+the @file{Makefile}. When it is run, the shell variable @samp{Makefile}
+will hold the name of the @file{Makefile}, including the appropriate
+directory component.
+
+Like an autoconf generated @file{configure} script, Cygnus configure
+will create a file named @file{config.status} which, when run, will
+automatically recreate the configuration. The @file{config.status} file
+will simply execute the Cygnus configure script again with the
+appropriate arguments.
+
+Any of the parts of @file{configure.in} may set the shell variables
+@samp{files} and @samp{links}. Cygnus configure will set up symlinks
+from the names in @samp{links} to the files named in @samp{files}. This
+is similar to the autoconf @samp{AC_LINK_FILES} macro.
+
+Finally, any of the parts of @file{configure.in} may set the shell
+variable @samp{configdirs} to a set of subdirectories. If it is set,
+Cygnus configure will recursively run the configure process in each
+subdirectory. If the subdirectory uses Cygnus configure, it will
+contain a @file{configure.in} file but no @file{configure} file, in
+which case Cygnus configure will invoke itself recursively. If the
+subdirectory has a @file{configure} file, Cygnus configure assumes that
+it is an autoconf generated @file{configure} script, and simply invokes
+it directly.
+
+@node Cygnus Configure in C++ Libraries
+@section Cygnus Configure in C++ Libraries
+@cindex @file{libstdc++} configure
+@cindex @file{libio} configure
+@cindex @file{libg++} configure
+
+The C++ library configure system, written by Per Bothner, deserves
+special mention. It uses Cygnus configure, but it does feature testing
+like that done by autoconf generated @file{configure} scripts. This
+approach is used in the libraries @file{libio}, @file{libstdc++}, and
+@file{libg++}.
+
+Most of the @file{Makefile} information is written out by the shell
+script @file{libio/config.shared}. Each @file{configure.in} file sets
+certain shell variables, and then invokes @file{config.shared} to create
+two package @file{Makefile} fragments. These fragments are then
+incorporated into the resulting @file{Makefile} by the Cygnus configure
+script.
+
+The file @file{_G_config.h} is created in the @file{libio} object
+directory by running the shell script @file{libio/gen-params}. This
+shell script uses feature tests to define macros and typedefs in
+@file{_G_config.h}.
+
+@node Multilibs
+@chapter Multilibs
+@cindex multilibs
+
+For some targets gcc may have different processor requirements depending
+upon command line options. An obvious example is the
+@samp{-msoft-float} option supported on several processors. This option
+means that the floating point registers are not available, which means
+that floating point operations must be done by calling an emulation
+subroutine rather than by using machine instructions.
+
+For such options, gcc is often configured to compile target libraries
+twice: once with @samp{-msoft-float} and once without. When gcc
+compiles target libraries more than once, the resulting libraries are
+called @dfn{multilibs}.
+
+Multilibs are not really part of the GNU configure and build system, but
+we discuss them here since they require support in the @file{configure}
+scripts and @file{Makefile}s used for target libraries.
-If some of the @file{Makefile} defaults are not right for your site, you can
-build site-specific @file{Makefile} fragments. To do this, do the following.
+@menu
+* Multilibs in gcc:: Multilibs in gcc.
+* Multilibs in Target Libraries:: Multilibs in Target Libraries.
+@end menu
-@itemize @bullet
+@node Multilibs in gcc
+@section Multilibs in gcc
+
+In gcc, multilibs are defined by setting the variable
+@samp{MULTILIB_OPTIONS} in the target @file{Makefile} fragment. Several
+other @samp{MULTILIB} variables may also be defined there. @xref{Target
+Fragment, , The Target Makefile Fragment, gcc, Using and Porting GNU
+CC}.
+
+If you have built gcc, you can see what multilibs it uses by running it
+with the @samp{-print-multi-lib} option. The output @samp{.;} means
+that no multilibs are used. In general, the output is a sequence of
+lines, one per multilib. The first part of each line, up to the
+@samp{;}, is the name of the multilib directory. The second part is a
+list of compiler options separated by @samp{@@} characters.
+
+Multilibs are built in a tree of directories. The top of the tree,
+represented by @samp{.} in the list of multilib directories, is the
+default library to use when no special compiler options are used. The
+subdirectories of the tree hold versions of the library to use when
+particular compiler options are used.
+
+@node Multilibs in Target Libraries
+@section Multilibs in Target Libraries
+
+The target libraries in the Cygnus tree are automatically built with
+multilibs. That means that each library is built multiple times.
+
+This default is set in the top level @file{configure.in} file, by adding
+@samp{--enable-multilib} to the list of arguments passed to configure
+when it is run for the target libraries (@pxref{Host and Target
+Libraries}).
+
+Each target library uses the shell script @file{config-ml.in}, written
+by Doug Evans, to prepare to build target libraries. This shell script
+is invoked after the @file{Makefile} has been created by the
+@file{configure} script. If multilibs are not enabled, it does nothing,
+otherwise it modifies the @file{Makefile} to support multilibs.
+
+The @file{config-ml.in} script makes one copy of the @file{Makefile} for
+each multilib in the appropriate subdirectory. When configuring in the
+source directory (which is not recommended), it will build a symlink
+tree of the sources in each subdirectory.
+
+The @file{config-ml.in} script sets several variables in the various
+@file{Makefile}s. The @file{Makefile.in} must have definitions for
+these variables already; @file{config-ml.in} simply changes the existing
+values. The @file{Makefile} should use default values for these
+variables which will do the right thing in the subdirectories.
+
+@table @samp
+@item MULTISRCTOP
+@file{config-ml.in} will set this to a sequence of @samp{../} strings,
+where the number of strings is the number of multilib levels in the
+source tree. The default value should be the empty string.
+@item MULTIBUILDTOP
+@file{config-ml.in} will set this to a sequence of @samp{../} strings,
+where the number of strings is number of multilib levels in the object
+directory. The default value should be the empty string. This will
+differ from @samp{MULTISRCTOP} when configuring in the source tree
+(which is not recommended).
+@item MULTIDIRS
+In the top level @file{Makefile} only, @file{config-ml.in} will set this
+to the list of multilib subdirectories. The default value should be the
+empty string.
+@item MULTISUBDIR
+@file{config-ml.in} will set this to the installed subdirectory name to
+use for this subdirectory, with a leading @samp{/}. The default value
+shold be the empty string.
+@item MULTIDO
+@itemx MULTICLEAN
+In the top level @file{Makefile} only, @file{config-ml.in} will set
+these variables to commands to use when doing a recursive make. These
+variables should both default to the string @samp{true}, so that by
+default nothing happens.
+@end table
-@item
-Choose a name for your site. It must currently be less than eleven characters.
+All references to the parent of the source directory should use the
+variable @samp{MULTISRCTOP}. Instead of writing @samp{$(srcdir)/..},
+you must write @samp{$(srcdir)/$(MULTISRCTOP)..}.
-@item
-If the program source does not have a @file{./config/} subdirectory, create it.
+Similarly, references to the parent of the object directory should use
+the variable @samp{MULTIBUILDTOP}.
-@item
-Create a file called @file{./config/ms-@var{site}} where @var{site} is the name
-of your site. In it, set whatever @file{Makefile} variables you need to
-override to match your site's conventions.
+In the installation target, the libraries should be installed in the
+subdirectory @samp{MULTISUBDIR}. Instead of installing
+@samp{$(libdir)/libfoo.a}, install
+@samp{$(libdir)$(MULTISUBDIR)/libfoo.a}.
-@item
-Configure the program with:
+The @file{config-ml.in} script also modifies the top level
+@file{Makefile} to add @samp{multi-do} and @samp{multi-clean} targets
+which are used when building multilibs.
-@cindex Example session
-@example
-configure @dots{} --site=@var{site}
-@end example
+The default target of the @file{Makefile} should include the following
+command:
+@smallexample
+@@$(MULTIDO) $(FLAGS_TO_PASS) DO=all multi-do
+@end smallexample
+@noindent
+This assumes that @samp{$(FLAGS_TO_PASS)} is defined as a set of
+variables to pass to a recursive invocation of @samp{make}. This will
+build all the multilibs. Note that the default value of @samp{MULTIDO}
+is @samp{true}, so by default this command will do nothing. It will
+only do something in the top level @file{Makefile} if multilibs were
+enabled.
+
+The @samp{install} target of the @file{Makefile} should include the
+following command:
+@smallexample
+@@$(MULTIDO) $(FLAGS_TO_PASS) DO=install multi-do
+@end smallexample
-@end itemize
+In general, any operation, other than clean, which should be performed
+on all the multilibs should use a @samp{$(MULTIDO)} line, setting the
+variable @samp{DO} to the target of each recursive call to @samp{make}.
-@c ---------------------------------------------------------------------
-@node Variables Index
-@unnumbered Variable Index
+The @samp{clean} targets (@samp{clean}, @samp{mostlyclean}, etc.) should
+use @samp{$(MULTICLEAN)}. For example, the @samp{clean} target should
+do this:
+@smallexample
+@@$(MULTICLEAN) DO=clean multi-clean
+@end smallexample
-@printindex vr
+@node FAQ
+@chapter Frequently Asked Questions
+
+@table @asis
+@item Which do I run first, @samp{autoconf} or @samp{automake}?
+Except when you first add autoconf or automake support to a package, you
+shouldn't run either by hand. Instead, configure with the
+@samp{--enable-maintainer-mode} option, and let @samp{make} take care of
+it.
+
+@cindex undefined macros
+@item @samp{autoconf} says something about undefined macros.
+This means that you have macros in your @file{configure.in} which are
+not defined by @samp{autoconf}. You may be using an old version of
+@samp{autoconf}; try building and installing a newer one. Make sure the
+newly installled @samp{autoconf} is first on your @samp{PATH}. Also,
+see the next question.
+
+@cindex @samp{CY_GNU_GETTEXT} in @file{configure}
+@cindex @samp{AM_PROG_LIBTOOL} in @file{configure}
+@item My @file{configure} script has stuff like @samp{CY_GNU_GETTEXT} in it.
+This means that you have macros in your @file{configure.in} which should
+be defined in your @file{aclocal.m4} file, but aren't. This usually
+means that @samp{aclocal} was not able to appropriate definitions of the
+macros. Make sure that you have installed all the packages you need.
+In particular, make sure that you have installed libtool (this is where
+@samp{AM_PROG_LIBTOOL} is defined) and gettext (this is where
+@samp{CY_GNU_GETTEXT} is defined, at least in the Cygnus version of
+gettext).
+
+@cindex @file{Makefile}, garbage characters
+@item My @file{Makefile} has @samp{@@} characters in it.
+This may mean that you tried to use an autoconf substitution in your
+@file{Makefile.in} without adding the appropriate @samp{AC_SUBST} call
+to your @file{configure} script. Or it may just mean that you need to
+rebuild @file{Makefile} in your build directory. To rebuild
+@file{Makefile} from @file{Makefile.in}, run the shell script
+@file{config.status} with no arguments. If you need to force
+@file{configure} to run again, first run @samp{config.status --recheck}.
+These runs are normally done automatically by @file{Makefile} targets,
+but if your @file{Makefile} has gotten messed up you'll need to help
+them along.
+
+@cindex @samp{config.status --recheck}
+@item Why do I have to run both @samp{config.status --recheck} and @samp{config.status}?
+Normally, you don't; they will be run automatically by @file{Makefile}
+targets. If you do need to run them, use @samp{config.status --recheck}
+to run the @file{configure} script again with the same arguments as the
+first time you ran it. Use @samp{config.status} (with no arguments) to
+regenerate all files (@file{Makefile}, @file{config.h}, etc.) based on
+the results of the configure script. The two cases are separate because
+it isn't always necessary to regenerate all the files after running
+@samp{config.status --recheck}. The @file{Makefile} targets generated
+by automake will use the environment variables @samp{CONFIG_FILES} and
+@samp{CONFIG_HEADERS} to only regenerate files as they are needed.
+
+@item What is the Cygnus tree?
+The Cygnus tree is used for various packages including gdb, the GNU
+binutils, and egcs. It is also, of course, used for Cygnus releases.
+It is the build system which was developed at Cygnus, using the Cygnus
+configure script. It permits building many different packages with a
+single configure and make. The configure scripts in the tree are being
+converted to autoconf, but the general build structure remains intact.
+
+@item Why do I have to keep rebuilding and reinstalling the tools?
+I know, it's a pain. Unfortunately, there are bugs in the tools
+themselves which need to be fixed, and each time that happens everybody
+who uses the tools need to reinstall new versions of them. I don't know
+if there is going to be a clever fix until the tools stabilize.
+
+@item Why not just have a Cygnus tree @samp{make} target to update the tools?
+The tools unfortunately need to be installed before they can be used.
+That means that they must be built using an appropriate prefix, and it
+seems unwise to assume that every configuration uses an appropriate
+prefix. It might be possible to make them work in place, or it might be
+possible to install them in some subdirectory; so far these approaches
+have not been implemented.
+@end table
-@page
-@c ---------------------------------------------------------------------
-@node Concept Index
-@unnumbered Concept Index
+@node Index
+@unnumbered Index
@printindex cp
+
@contents
@bye
-
-@c Local Variables:
-@c fill-column: 79
-@c outline-regexp: "@chap"
-@c End:
-@c (setq outline-regexp "@chapt\\\|@unnum\\\|@setf\\\|@conte\\\|@sectio\\\|@subsect\\\|@itemize\\\|@defvar{")
-
diff --git a/contrib/binutils/gas/CONTRIBUTORS b/contrib/binutils/gas/CONTRIBUTORS
index 96d8775..b3fd03e 100644
--- a/contrib/binutils/gas/CONTRIBUTORS
+++ b/contrib/binutils/gas/CONTRIBUTORS
@@ -69,7 +69,8 @@ Ian Lance Taylor of Cygnus Solutions merged the Motorola and MIT
syntaxes for the 68k, completed support for some COFF targets (68k,
i386 SVR3, and SCO Unix), wrote the ECOFF support based on Michael
Meissner's mips-tfile program, wrote the PowerPC and RS/6000 support,
-and made a few other minor patches.
+and made a few other minor patches. He handled the binutils releases
+for versions 2.7 through 2.9.
David Edelsohn contributed fixes for the PowerPC and AIX support.
@@ -98,6 +99,12 @@ Klaus Kaempf ported the assembler and the binutils to openVMS/Alpha.
Steve Haworth contributed the support for the Texas Instruction c30
(tms320c30).
+H.J. Lu has contributed many patches and much testing.
+
+Alan Modra reworked much of the i386 backend, improving the error
+checking, updating the code, and improving the 16 bit support, using
+patches from the work of Martynas Kunigelis and H.J. Lu.
+
Many others have contributed large or small bugfixes and enhancements. If
you've 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 aren't
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog
index a7e46aa..cef6d17 100644
--- a/contrib/binutils/gas/ChangeLog
+++ b/contrib/binutils/gas/ChangeLog
@@ -1,7020 +1,5723 @@
-Mon Apr 27 13:45:04 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set version number to 2.9.1.
- * configure: Rebuild.
-
-Fri Apr 24 12:47:42 1998 Philippe De Muyter <phdm@macqel.be>
-
- * 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.
-
-Thu Apr 23 19:23:23 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a
- reloc is in the TOC csect.
-
-Tue Apr 21 16:18:12 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/Makefile.am (as.dvi): New target.
- * doc/Makefile.in: Rebuild.
-
-Thu Apr 2 16:36:47 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * gasp.c (main): Set next field of new include_path structure to
- NULL. From Avery Pennarun <averyp@gdc.ca>.
-
-Wed Apr 1 14:41:31 1998 Dean M. Deaver <deaver@amt.tay1.dec.com>
-
- * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx
- also.
-
-Wed Apr 1 13:13:20 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * 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 <ian@cygnus.com>
-
- * 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 16:12:34 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-i386.h, config/tc-i386.c: Revert March 24
- LinearAddress patch.
-
- * configure.in: Set version number to 2.9.
- * configure: Rebuild.
-
-Mon Mar 30 11:22:08 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * 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 <schwab@issan.informatik.uni-dortmund.de>
-
- * stabs.c (get_stab_string_offset): Always create a stab string
- section.
-
-Sat Mar 28 22:28:02 1998 Ian Lance Taylor <ian@cygnus.com>
-
- 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 <ian@cygnus.com>
-
- * config/tc-m68k.c (m68k_ip): Check legal addressing modes for
- mcf5200 just as we do for m68000.
- (m68k_init_after_args): Likewise.
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
+
+ * as.h: #include "file", not <file> 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.
+
+2000-05-08 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * 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.
-Thu Mar 26 23:07:18 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * 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 <devans@canuck.cygnus.com>
-
- * 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 <bruno@linuix.mathematik.uni-karlsruhe.de>
-
- * 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 <ian@cygnus.com>
-
- Based on patch from H.J. Lu <hjl@gnu.org>:
- * Makefile.am (DISTSTUFF): New variable.
- (diststuff): New target.
- * Makefile.in: Rebuild.
-
-Tue Mar 24 16:51:29 1998 Nick Clifton <nickc@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <hjl@gnu.org>
-
- * 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 <joel@OARcorp.com>
-
- * configure.in: (sh*-*-rtems*): Switched from ELF to COFF.
- * configure: Rebuild.
-
-Fri Mar 20 19:15:44 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4, configure: Rebuild with libtool 1.2.
-
-Thu Mar 19 16:03:12 1998 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): fix code to test the range of
- PC relative branches (PR15358). Patch courtesy of Jonathan
- Walton.
-
-
-Wed Mar 18 09:29:51 1998 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (emulations): Add thumb-pe target.
-
- * configure (emulations): Add thumb-pe target.
-
-1998-03-17 Ken Raeburn <raeburn@cygnus.com>
-
- * itbl-lex.l (yywrap): Don't define if already defined as a
- macro.
-
-Fri Mar 13 16:31:38 1998 Tom Tromey <tromey@cygnus.com>
-
- * depend.c (quote_string_for_make): New function.
- (wrap_output): Use it.
-
-Thu Mar 12 18:28:22 1998 Nick Clifton <nickc@cygnus.com>
-
- * 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 <rth@cygnus.com>
-
- * 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 <rth@cygnus.com>
-
- * config/obj-elf.c [TC_ALPHA]: Include <elf/alpha.h>.
- * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New.
-
-Mon Feb 23 11:29:06 1998 Doug Evans <devans@seba.cygnus.com>
+2000-05-04 Alan Modra <alan@linuxcare.com.au>
- * cgen.c: #include symcat.h.
- * config/tc-m32r.c: Likewise.
+ * as.c (parse_args): Just mention current year in printed
+ copyright message.
-Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com)
+2000-05-03 Ian Lance Taylor <ian@zembu.com>
- * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be
- absolute expressions instead of '$' prefixed register names.
+ * 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 21 22:36:52 1998 Richard Henderson <rth@cygnus.com>
-
- * 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 <ian@cygnus.com>
+2000-05-03 David O'Brien <obrien@NUXI.com>
- * config/tc-ppc.c (md_pseudo_table): Add "section".
- (ppc_named_section): New static function.
+ * as.c (parse_args): Update copyright.
-Thu Feb 19 22:25:42 1998 Richard Henderson <rth@cygnus.com>
+2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
- * tc-ppc.c (ppc_biei): Cache the last symbol we inserted
- so we don't have to scan the entire list.
+ * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4
+ for the .bss section too.
-Thu Feb 19 16:08:15 1998 Richard Henderson <rth@cygnus.com>
+2000-04-29 Andreas Jaeger <aj@suse.de>
- * listing.c (list_symbol_table): Categorize symbols by
- undefined_section rather than sy_frag->line == NULL.
+ * as.h: Correctly check GCC version.
-Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
+2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
- * Makefile.am (install-exec-local): Install properly when ln
- fails or tooldir == prefix.
+ * config/tc-mn10300.c (HAVE_AM30): Define.
+ (md_assemble): Use it.
-Tue Feb 17 18:58:51 1998 Doug Evans <devans@seba.cygnus.com>
+2000-04-19 Alan Modra <alan@linuxcare.com.au>
- * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand.
- Test result of insert_operand for error.
+ * 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.
-Fri Feb 13 16:41:42 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * 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.
+ * Makefile.am (YACC, LEX): Get them from configure.
-Fri Feb 13 00:47:44 1998 Ian Lance Taylor <ian@cygnus.com>
+ * as.h (SEEK_SET): Define if undefined.
- * config/tc-mips.c (macro_build): Handle operand type 'C'.
- (macro): Fix handling of M_COP[0-3].
+2000-04-09 Nick Clifton <nickc@cygnus.com>
-Thu Feb 12 14:06:59 1998 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (CPU_TYPES): Add 'avr'.
+ (TARGET_CPU_CFILES): Add 'tc-avr.c'.
+ (TARGET_CPU_HFILES): Add 'tc-avr.h'.
- Based on patches from Ross Harvey <ross@teraflop.com>:
- * 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.
+2000-04-05 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
- NetBSD patches from Gordon W. Ross <gwr@mc.com>:
- * configure.in (alpha*-*-netbsd*): New target.
- * config/te-nbsd.h (LOCAL_LABELS_FB): Define.
- * configure: Rebuild.
+ * config/tc-sparc.c (sparc_ip): Avoid string pasting.
- * as.h (flag_warn_suppress_instructionswap): Move from here...
- * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to
- here, and make static.
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
- * ehopt.c (eh_frame_code_alignment): Only use seg_info if
- BFD_ASSEMBLER or MANY_SEGMENTS.
+ * po/gas.pot: Regenerate.
- * as.c (show_usage): Update bug-gnu-utils address.
+ * as.c (show_usage): Restore translated part of bug string.
* 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 <amylaar@cygnus.co.uk>
-
-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 <rth@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <jlemke@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <iancarm@cygnus.com>
-
- * expr.c: Add support for 0x1_2_3_4 bignums.
-
-Tue Feb 10 14:43:40 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * Makefile.am: Update dependencies.
- * Makefile.in: Rebuild.
-
-Sat Feb 7 15:33:51 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * 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.
-
-Thu Feb 5 12:39:08 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <nickc@cygnus.com>
-
- * 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 <jsmith@teknema.demon.co.uk>
-
- * 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF.
-
-Mon Feb 2 18:30:34 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- 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 <nickc@cygnus.com>
-
- * config/tc-v850.c (md_assemble): Improvements to error messages
- for PR 14720.
-
-Mon Feb 2 12:39:05 1998 Geoff Keating <geoffk@ozemail.com.au>
-
- * 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 <devans@canuck.cygnus.com>
-
- * read.h (include_dirs): Declare.
- (include_dir_count,include_dir_maxlen): Declare.
-
-Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Correct check for shared opcodes library.
- * configure: Rebuild.
+ * 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.
- * listing.c (buffer_line): If we can't open the file, set at_end.
- (listing_print): Remove unused local variable fi.
+2000-04-04 Alexandre Oliva <aoliva@cygnus.com>
- * config/m68k-parse.y (reglistpair): Handle register list in
- either order.
+ * 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/vms-conf.h: Don't undef VERSION.
-
-Thu Jan 29 14:42:44 1998 Pat Rankin <rankin@eql.caltech.edu>
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
- * 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.
+ * 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.
-Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com>
+ * config/tc-sparc.c (md_show_usage): Add a trailing newline.
- * 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.
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
-Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
+ * 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 (i386-*-mingw32*): New target.
- * configure: Rebuild.
+2000-04-02 Richard Henderson <rth@cygnus.com>
-Wed Jan 28 14:51:18 1998 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * symbols.c (resolve_symbol_value): Don't set the segment if it
- hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER.
+2000-04-01 Ian Lance Taylor <ian@zembu.com>
- * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to
- S_GET_SEGMENT.
+ * 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.
-Wed Jan 28 13:54:50 1998 Pat Rankin <rankin@eql.caltech.edu>
+2000-03-31 Nick Clifton <nickc@cygnus.com>
- as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove
- depends upon HAVE_{UNLINK,REMOVE} values rather than host
- compiler.
+ * config/tc-d10v.h (md_flush_pending_output): Define.
-Wed Jan 28 13:48:08 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-03-29 Nick Clifton <nickc@cygnus.com>
- * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define.
+ * 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.
-Wed Jan 28 09:52:00 1998 Nick Clifton <nickc@cygnus.com>
+2000-03-29 Nick Clifton <nickc@cygnus.com
- * config/tc-v850.c (v850_insert_operand): Display instruction when
- an error is encountered.
+ * config/tc-arm.c (tinsns): Add "bal" instruction pattern.
-Tue Jan 27 13:32:01 1998 Robert Lipe <robertl@dgii.com>
+2000-03-28 Alan Modra <alan@linuxcare.com.au>
- * configure.in (i386-*-sco3.2v5*): Defaults to ELF now.
- (i386-*-sco3.2v5*coff): New target.
- (i386-*-sco3.2*): New target.
- * configure: Rebuild.
+ * listing.c (LISTING_LHS_WIDTH): Default depends on
+ LISTING_WORD_SIZE.
+ (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH.
-Tue Jan 27 11:06:52 1998 Nick Clifton <nickc@cygnus.com>
+2000-03-27 Ian Lance Taylor <ian@zembu.com>
- * config/tc-v850.c: Fix PRs 14721, 14722, 14723, tidying error
- message production.
+ * config/tc-sh.c (md_show_usage): Use backslash before newline in
+ string literal.
-Tue Jan 27 12:24:32 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
- * 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.
+ * config/tc-avr.h (TC_HANDLES_FX_DONE): Define.
-Tue Jan 27 06:51:59 1998 Richard Henderson <rth@cygnus.com>
+ * 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.
- * 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.
+2000-03-27 Denis Chertykov <denisc@overta.ru>
-Tue Jan 27 06:38:35 1998 Richard Henderson <rth@cygnus.com>
+ * config/tc-avr.c: New file for AVR support.
+ * config/tc-avr.h: Likewise.
+ * configure.in: Add AVR support.
+ * configure: Regenerate.
- * 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.
+2000-03-26 Timothy Wall <twall@cygnus.com>
+
+ * 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.
-Tue Jan 27 05:32:05 1998 Richard Henderson <rth@cygnus.com>
+2000-03-26 Alan Modra <alan@linuxcare.com.au>
- * 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.
+ * config/tc-i386.c: Don't start any as_bad or as_warn message with
+ an initial capital letter.
+ (i386_index_check): Reindent.
-Mon Jan 26 13:07:41 1998 Nick Clifton <nickc@cygnus.com>
+2000-03-19 Nick Clifton <nickc@cygnus.com>
- * config/tc-m32r.c: Detect if explicitly parallel instructions
- might have an io conflict and issue a warning message.
+ * config/tc-arm.c (md_apply_fix3): Fix bug detectng overflow of pc
+ relative branches.
-Thu Jan 22 17:51:44 1998 Nick Clifton <nickc@cygnus.com>
+2000-03-17 Thomas de Lellis <tdel@windriver.com>
- * 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 <rth@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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.
+ * 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 <nickc@cygnus.com>
-Fri Jan 16 11:30:37 1998 Richard Henderson <rth@cygnus.com>
-
- * 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.
+ * config/tc-arm.c (md_apply_fix3): Handle same-section relocations
+ that have a destingation >= 0x400000.
+ Fix compile time warning messages.
-Thu Jan 15 14:19:01 1998 Richard Henderson <rth@cygnus.com>
+Thu Mar 16 23:45:16 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * tc-sh.c (get_specific): Handle SGR & DBR.
+ * 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.
-Thu Jan 15 13:46:48 1998 Richard Henderson <rth@cygnus.com>
+Thu Mar 16 21:18:13 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * 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.
+ * 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.
-Wed Jan 14 17:52:33 1998 Nick Clifton <nickc@cygnus.com>
+Thu Mar 16 20:58:10 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
- * cgen.c: Formatting changes to improve readability.
+ * config/tc-sh.c (md_show_usage): Add description of -dsp.
-Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com)
+2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk>
- * config/tc-mips.c (macro): Rework division code to avoid unfilled
- delay slot.
+ * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before
+ normal operands.
-Wed Jan 14 15:02:19 1998 Doug Evans <devans@seba.cygnus.com>
+2000-03-15 Kazu Hirata <kazu@hxi.com>
- * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO.
+ * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate.
-Mon Jan 12 13:04:57 1998 Doug Evans <devans@seba.cygnus.com>
+Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson <hp@axis.se>
- * 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.
+ * expr.c (operand) [case 'f']: When testing if '0f' can start a
+ floating-point-number, make sure 'f' is in FLT_CHARS.
-Tue Jan 6 15:36:02 1998 Richard Henderson <rth@cygnus.com>
+Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se>
- * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms.
- (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication.
+ * 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.
-Fri Jan 2 16:08:54 1998 Ian Lance Taylor <ian@cygnus.com>
+2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
- * config/tc-i386.c (i386_operand): Give an error if there are
- unrecognized characters after an expression.
+ * config/tc-mips.c (mips_ip): Don't put stuff in .rodata
+ when embedded-pic.
-Wed Dec 31 12:29:47 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10200.c (md_relax_table): Correct branch ranges.
-
-Mon Dec 22 13:06:05 1997 Joel Sherrill <joel@oarcorp.com>
-
- * configure.in (i386*-go32-rtems*): Fix to be the same as
- i[3456]86-go32.
- * configure: Rebuild.
-
-Mon Dec 22 12:54:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (macro): The 4650 doesn't permit M_LDC1_AB,
- M_SDC1_AB, M_L_DOB, M_L_DAB, M_S_DAB, or M_S_DOB.
- (mips_ip): Always check for FP_D, not just for instructions that
- are not part of the regular ISA.
-
-Thu Dec 18 16:49:28 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-d10v.c (build_insn): Make `number' a long for 64-bit hosts.
-
-Thu Dec 18 16:42:57 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (cpu_types): 21164pc/pca56 does not have CIX.
-
-Wed Dec 17 21:23:07 1997 Jeffrey A Law (law@cygnus.com)
-
- * expr.c (integer_constant 32bit bignum): Mask off bits outside
- the range we care about.
-
-Tue Dec 16 09:20:43 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c: Prevent use of interworking support for
- non-COFF targets.
-
-Mon Dec 15 15:20:32 1997 Nick Clifton <nickc@cygnus.com>
-
- * doc/all.texi: Add M32R cpu.
-
- * doc/as.texinfo: Add documentation of m32r processor.
-
- * doc/c-m32r.texi: New file, documenting m32r specific features.
+ * 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.
+2000-03-09 Catherine Moore <clm@cygnus.com>
+
+ * config/tc-m32r.c (m32r_fix_adjustable): Look up the
+ relocation type based on the entry in the fixup structure.
-Mon Dec 15 10:32:28 1997 Jeffrey A Law (law@cygnus.com)
+2000-03-08 H.J. Lu (hjl@gnu.org)
- * config/tc-mips.c (mips_ip): Correctly insert 'P' operands into
- the instruction.
+ * Makefile.am (install-exec-tooldir): Depend on
+ install-exec-bindir for parallel make.
+ * Makefile.in: Regenerated.
-Fri Dec 12 10:35:01 1997 Nick Clifton <nickc@cygnus.com>
+2000-03-06 Nick Clifton <nickc@cygnus.com>
- * doc/c-arm.texi (ARM Options): Document support for new ARM
- processor names.
+ * 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.
- * config/tc-arm.c (md_parse_option): Add support for new ARM
- processor names.
+ * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi.
+ * doc/Makefile.in: Regenerate.
+ * doc/c-m32r.texi (M32R-Opts): Document new command line switch.
-Thu Dec 11 17:46:50 1997 Richard Henderson <rth@cygnus.com>
+2000-03-02 Michael Meissner <meissner@redhat.com>
- * config/tc-m68k.c (m68k_ip): Don't overwrite opcode table data.
- (insop, m68k_ip): Make `opcode' const so it doesn't happen again.
+ * config/tc-d30v.c (check_range): Remove code that incorrectly
+ sign extended values where bits < 32.
-Fri Dec 5 11:23:59 1997 Nick Clifton <nickc@cygnus.com>
+2000-03-02 H.J. Lu (hjl@gnu.org)
- * config/tc-v850.c (md_assemble): Fix BFD_RELOC_32 against a
- symbol + offset.
+ * configure.in: Support --enable-targets=all on ia32.
+ * configure: Regenerated.
- * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Use
- SHT_V850_{S|T|Z}COMMON to mark special common sections.
+2000-03-01 Nick Clifton <nickc@cygnus.com>
-Tue Dec 2 17:05:13 1997 Nick Clifton <nickc@cygnus.com>
+ * gasp.c (do_align): Remove bogus check of alignment value.
- * config/tc-v850.c: Brought up to date with the branch.
+2000-02-27 Thomas de Lellis <tdel@windriver.com>
-Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * 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-sh.c (SWITCH_TABLE_CONS): Handle (fix)->fx_size == 1.
- (SWITCH_TABLE): Handle BFD_RELOC_8.
- (md_apply_fix): #ifndef BFD_ASSEMBLER code: Handle fixP->fx_size == 1.
- (coff_reloc_map): Add BFD_RELOC_8_PCREL entry.
- (sh_coff_reloc_mangle): SWITCH_TABLE case: Handle BFD_RELOC_8.
+2000-02-27 Hans-Peter Nilsson <hp@axis.com>
-Sat Nov 22 16:19:22 1997 Richard Henderson <rth@cygnus.com>
+ * 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.
- * tc-alpha.c (range_signed_16, range_signed_32): Work around an
- apparent bug in gcc's long long support crossing from x86.
+2000-02-27 Jakub Jelinek <jakub@redhat.com>
-Sat Nov 22 14:26:09 1997 Nick Clifton <nickc@cygnus.com>
+ * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option.
+ (md_parse_option): Handle it.
+ (md_show_usage): Document it.
- * config/tc-arm.c: Brought up to date with latest changes on arm
- branch.
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
-Sat Nov 22 15:50:09 1997 Klaus Kaempf <kkaempf@progis.de>
+ * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an
+ opcode, for the instruction `pal19'. From Andrea Arcangeli
+ <andrea@suse.de>.
- * config-gas.com: Get version info from configure.in.
+2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au>
- * makefile.vms: include depend.obj in OBJS.
+ * 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.
- * config/tc-alpha.c (s_alpha_section): Remove ".lcomm" handling.
+2000-02-26 Andreas Jaeger <aj@suse.de>
- * config/tc-alpha.c (alpha_basereg_clobbered): Remove variable and
- all corresponding code.
+ * doc/c-mips.texi (MIPS Opts): Fix typo in last patch.
-Thu Nov 20 15:06:08 1997 Richard Earnshaw <rearnsha@arm.com>
+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-arm.h (TARGET_FORMAT for generic a.out targets): Allow
- run-time endian selection.
+ * 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.
-Wed Nov 19 17:44:42 1997 Richard Henderson <rth@cygnus.com>
+2000-02-24 Nick Clifton <nickc@cygnus.com>
- * tc-sh.c (parse_reg): Properly quote for fv4.
+ * configure: Add arm-wince, mips-pe and sh-pe targets.
+ * configure: Regenerate.
-Wed Nov 19 23:46:18 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
+
+ * 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-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.
+
+ * 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/te-wince-pe.h: New file for WinCE targets. Define
+ TE_WINCE.
+
+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * 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.
+
+2000-02-24 Catherine Moore <clm@cygnus.com>
+
+ * config/obj-som.c (obj_pseudo_table): Add "weak".
+ (obj_som_weak): New routine.
+
+2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * 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.h (TC_RELOC): Delete.
+ * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC
+ with equivalent call to reloc.
+
+ * 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.
+
+ * NEWS: Mention IBM 370 support.
+
+2000-02-23 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-i386.c (md_assemble): When swapping operands for
+ intel_syntax, assume everything that's not Imm or Disp is a
+ register.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * 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.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
- * symbols.c (resolve_symbol_value): Add missing breaks in case on
- symbol value operator.
+ * 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.
-Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+2000-02-19 Michael Meissner <meissner@redhat.com>
- * config/tc-d10v.c (parallel_ok, find_opcode):
- Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
+ * 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.
-Sun Nov 16 10:05:07 1997 Fred Fish <fnf@cygnus.com>
+2000-02-22 Andrew Haley <aph@cygnus.com>
- * config/obj-coff.c (fixup_segment): Cast second arg of
- md_apply_fix3 call to type "valueT *".
+ * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64.
-Thu Nov 13 13:53:10 1997 Andrew Cagney <cagney@b1.cygnus.com>
+1999-12-30 Andrew Haley <aph@cygnus.com>
- * configure.in (emulations): Make FreeBSD an aout / i386bsd
- variant.
- * configure: Re-generate.
+ * 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.
-Thu Nov 13 11:07:14 1997 Gavin Koch <gavin@cygnus.com>
-
- * config/tc-mips.c (macro_build): Use the membership field
- for INSN_MACRO's.
- (mips_ip): Same.
-
-Thu Nov 13 02:04:55 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-d10v.c (find_opcode): For OPCODE_FAKE, add check for
- first argument if it's supposed to be a register.
-
-Tue Nov 11 19:25:05 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * app.c (do_scrub_chars): If d10v, re-insert a space before
- a '#' when in state 10.
-
-Tue Nov 11 13:33:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-h8300.c: Include "subsegs.h".
- (tc_reloc_mangle): Handle references to symbols which are not
- being output, so that references to `.' work.
-
-Mon Nov 10 13:43:33 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-m68k.c (m68k_ip): Call add_fix when needed for '_'
- case.
-
- * macro.c (sub_actual): If we don't find a parameter for an &,
- just substitute &.
-
-Fri Nov 7 21:29:32 1997 Ken Raeburn <raeburn@cygnus.com>
-
- * config/tc-mips.c (mips_ip): In default case, call as_bad
- instead of fprintf, to get "assembler messages:" message output
- before instead of after.
-
-Fri Nov 7 10:36:22 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * frags.h: Handle multiple inclusion.
-
-Wed Nov 5 10:51:49 1997 Doug Evans <devans@canuck.cygnus.com>
-
- Based on a patch from Ian.Dall@dsto.defence.gov.au.
- * as.h (struct frag, frag support): Moved from here.
- * frags.h: To here.
- (struct frag, member tc_frag_data): New member if TC_FRAG_TYPE
- is defined.
- (struct frag, member fr_cgen): Renamed from fr_targ.cgen.
- * cgen.c (cgen_asm_finish_insn): Update.
- * config/tc-m32r.c (md_estimate_size_before_relax): Update.
- * config/tc-m32r.h (TC_FRAG_INIT): Renamed from md_init_frag.
- (md_convert_frag): Ditto.
- * config/tc-ns32k.h (TC_FRAG_TYPE): Define.
- (frag_opcode_frag,frag_opcode_offset,frag_bsr): Update.
- (TC_FRAG_INIT): Update.
-
-Tue Nov 4 16:35:57 1997 Ian Dall <Ian.Dall@dsto.defence.gov.au>
-
- * write.c (print_fixup): Use TC_FIX_DATA_PRINT (if defined) to
- print out MD fields of fix.
- * frags.c (frag_var, frag_variant): Use TC_FRAG_INIT macro (if
- defined) to initialize MD fields in frag.
- * as.h (struct frag, ns32k support): Rename ns32k to fr_ns32k.
- Delete pcrel_adjust. Add fr_opcode_fragP, fr_opcode_offset.
- * config/tc-ns32k.h: Add comments. Remove obsolete
- BFD_FAST_SECTION_FILL definition, change prototypes for
- fix_new_ns32k and fix_new_ns32k_exp to add new arguments
- opcode_frag and opcode_offset and remove pcrel_adjust.
- (TC_FIX_TYPE): add opcode_fragP and opcode_offset fields.
- (TC_FIX_DATA_PRINT): new macro to print out TC_FIX_TYPE.
- (TC_FRAG_INIT): new macro to initialize machine dependent field in
- frags.
- (frag_opcode_frag, frag_opcode_offset, frag_bsr): macros to access
- MD fields in frag structure.
- (fix_im_disp, fix_bit_fixP, fix_opcode_frag, fix_opcode_offset,
- fix_bsr): macros to access MD fields in fix structure.
- * config/tc-ns32k.c: Avoid overlength lines. Align comments. Don't
- use struct opcode_location as these fields are now in the frag
- structure.
- (convert_iif): Call frag_more as it is needed instead
- of trying to allocate for the whole insn. Avoid call of frag_more
- with negative argument.
- (md_pcrel_adjust, md_fix_pcrel_adjust, md_apply_fix,
- md_estimate_size_before_relax, md_pcrel_from,
- tc_aout_fix_to_chars): use accessor macros to get md fields in fix
- and frag structures.
- (fix_new_ns32k, fix_new_ns32k_exp): add new arguments opcode_frag and
- opcode_offset and remove pcrel_adjust.
- (convert_iif, cons_fix_new_ns32k): call fix_new_ns32k,
- fix_new_ns32k_exp with changed arguments.
-
-Mon Nov 3 13:30:17 1997 Gavin Koch <gavin@cygnus.com>
-
- * tc-mips.c (md_begin): Reorganize setting of default values so
- that mips_cpu depends on TARGET_CPU, and mips_opts.isa depends on
- mips_cpu.
- (md_parse_option): Remove all code that sets defaults; md_begin
- handles all of this now.
-
-Sun Nov 2 14:46:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (STAGESTUFF): Change bin_PROGRAMS to
- noinst_PROGRAMS.
- (bootstrap, bootstrap2, bootstrap3): Likewise.
- * Makefile.in: Rebuild.
-
- * config/tc-ppc.c (ppc_fix_adjustable): Don't adjust relocs in the
- TOC section to be against the csect.
-
-Fri Oct 31 18:19:55 1997 Ken Raeburn <raeburn@cygnus.com>
-
- * config/tc-mips.c (validate_mips_insn): New function, checks
- match versus mask bits, and also verifies that all bits to be
- output are actually specified somewhere.
- (md_begin): Call it for 32-bit instructions, instead of doing
- match/mask check here. In case of failure, print a message, but
- check the rest of the opcode table before exiting.
-
-Thu Oct 30 13:46:20 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Fix thumb ADR pseudo op. Patch
- from Tony Thompson at ARM: athompso@arm.com
-
-Fri Oct 24 15:56:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-ppc.c (md_assemble): When handling @l, always sign
- extend if the operand expects a signed value.
-
- * config/tc-mips.h (LOCAL_LABELS_DOLLAR): Don't define; use
- default which is to permit dollar labels.
-
-Fri Oct 24 11:19:22 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
-
- * config/tc-sparc.c (sparc_memory_model): New variable.
- (md_longopts): Add -TSO/-PSO/-RMO options.
- (md_parse_options): Handle them.
- (sparc_elf_final_processing): For 64 ELF, set required
- memory ordering in e_flags. Default to RMO and let the user
- override it through command line.
-
- * config/tc-sparc.h (elf_tc_final_processing): Add.
-
-Wed Oct 22 17:42:12 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-sparc.c (v9a_asr_table): New variable.
- (sparc_ip): Handle v9a asr's.
- Patch from David Miller <davem@vger.rutgers.edu>.
-
-Wed Oct 22 17:22:59 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-sparc.h (md_do_align): New macro.
- * config/tc-sparc.c (sparc_handle_align): Handle rs_align_code.
- Patch from Jakub Jelinek <jj@sunsite.mff.cuni.cz>.
-
-Wed Oct 22 12:51:18 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-sh.c (sh_small): New variable.
- (OPTION_SMALL): Define.
- (md_longopts): Add "small".
- (md_parse_option): Handle OPTION_SMALL.
- (md_show_usage): Mention -small.
- * config/tc-sh.h (sh_small): Declare.
- (SUB_SEGMENT_ALIGN): Handle sh_small.
- * config/obj-coff.h (TARGET_FORMAT): Check sh_small in TC_SH
- case.
-
- * config/tc-mips.c (macro): Correct handling of constant in M_LI_D
- case in little endian mode.
-
-Tue Oct 21 10:20:11 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * config/tc-sparc.c (md_apply_fix3, cases ..._H44, ..._HIX22): Leave
- overflow signalling to linker.
-
-Mon Oct 20 14:54:06 1997 Klaus K"ampf <kkaempf@progis.de>
-
- * makefile.vms: Fix for dec c.
-
- * config-gas.com: Give explanation for dec c setup in error
- message.
-
- * config/tc-alpha.c (s_alpha_comm): Make .comm symbols separate
- sections on openvms/alpha.
-
- * config/obj-evax.c: support .weak pseudo-op
-
-Mon Oct 20 10:13:32 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * config/tc-sparc.c (default_arch_size): New static local.
- (struct sparc_arch): Rename arch_size to default_arch_size.
- New member user_option_p.
- (sparc_arch_table): Always include v9, v9a. New entry v9-64.
- (init_default_arch): Check whether default arch is valid.
- Set default_arch_size in addition to sparc_arch_size.
- (OPTION_32,OPTION_64): Define.
- (md_longopts): New entries for -32, -64.
- (md_parse_option): Handle them.
- (md_show_usage): Print them. Ensure init_default_arch called.
- * configure.in (sparc64): Set arch to v9-64.
- * configure: Regenerated.
-
-Sun Oct 19 13:50:50 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * write.c (subsegs_finish): New function, broken out of
- write_object_file.
- (write_object_file): Some code moves into subsegs_finish.
- * write.c (subsegs_finish): Declare.
- * as.c (main): Call subsegs_finish.
-
- * read.c (s_include): Check for error return from
- demand_copy_string.
-
-Tue Oct 14 20:50:58 1997 Richard Henderson <rth@cygnus.com>
-
- * read.c (get_line_sb): Accept any eol marker while scanning macros.
-
-Tue Oct 14 19:12:45 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.h (DIFF_EXPR_OK): Define.
- * config/tc-i386.h (DIFF_EXPR_OK): Define.
- * config/tc-alpha.c (md_apply_fix): Notice fx_pcrel and substitute
- the correct relocation when it exists.
- * config/tc-i386.c (md_apply_fix3): Likewise.
-
- * config/tc-ppc.h: Correct typo in comment.
- * config/tc-v850.h: Likewise.
-
-Fri Oct 10 16:09:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/tc-d10v.c (parallel_ok): Allow parallel instruction issue
- when second instruction is writing to first instructions inputs.
+2000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * config/obj-coff.c (add_lineno): Accept non-positive lineno with
+ warning, and bump it to 1.
+
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
+
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * dwarf2dbg.c (print_stats): Add cast to force printf argument to
+ match format.
+
+2000-02-21 Catherine Moore <clm@cygnus.com>
+
+ * 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.
+
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * listing.c (print_lines): Remove unused variable `end'.
+
+ * 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-02-18 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-d10v.c (find_opcode): Add a symbol's value to
+ the computed frag offset, rather than overwriting it.
+
+Thu Feb 17 00:11:08 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * 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.
+
+Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com)
+
+ * 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.
+
+2000-02-10 Nick Clifton <nickc@cygnus.com>
+
+ * 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-02-10 Timothy Wall <twall@redhat.com>
+
+ * 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-02-10 Timothy Wall <twall@redhat.com>
+
+ * 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-02-08 Timothy Wall <twall@redhat.com>
+
+ * 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.
-Mon Oct 13 15:27:17 1997 Richard Henderson <rth@cygnus.com>
-
- * ecoff.c (PAGE_SIZE): Double to 8k as a hack to allow some C++
- templated programs to build with -g.
-
-Fri Oct 10 17:48:29 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (md_relax_table): Add support for relaxing
- unconditional branches. This patch is courtesy of Jim Wilson.
- (md_convert_frag): Fix relaxing of branches. This patch is
- courtesy of Jim Wilson.
- (md_assemble): Create different fixups for conditional and
- unconditional branches. This patch is courtesy of Jim Wilson.
- (md_estimate_size_before_relax): Estimate size of variable part of
- fixup based on whether it is for a conditional or an unconditional
- branch. This patch is courtesy of Jim Wilson.
- (v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
- v850_zbss, v850_rosdata, v850_rozdata, v850_bss): Add call to
- obj_elf_section_change_hook().
- (v850_comm): New function.
- (md_pseudo_table): Add new pseudo ops .zcomm, .scomm and .tcomm.
- (md_begin): Add bss flag to seg_info of bss sections.
-
- Add support for .scommon, .tcommon and .zcommon sections.
-
- * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add .scommon,
- .zcommon, .tbss, .call_table_data and .call_table_text.
-
-Fri Oct 10 15:01:14 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (sparc): Set DEFAULT_ARCH from correct target.
- * configure: Regenerated.
-
-Fri Oct 10 11:22:45 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * config/tc-d10v.c: Fixes to make sure the AT_WORD
- expression is not confused with -1.
-
-Fri Oct 10 11:54:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/tc-d10v.c (parallel_ok): Flag SP as modified for @-sp
- operand - OPERAND_ATMINUS.
-
-Fri Oct 10 00:47:44 1997 Michael Meissner <meissner@cygnus.com>
-
- * config/tc-d10v.c (parallel_ok): Note that auto increment and
- decrement modify the index register.
-
-Thu Oct 9 15:17:50 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Robin Kirkham <Robin.Kirkham@mlb.dmt.csiro.au>:
- * config/tc-m68k.c (archs): Add 68306, 68307, 68322, 68356, 68334,
- 68336, 68341, 68349.
- * doc/c-m68k.texi (M68K-Opts): Add -m68ec000 -m68hc000 -m68hc001
- -m68306, -m68307, -m68322, -m68356, -m68ec020, -m68ec030,
- -m68ec040, -m68ec060, -m68330, -m68334, -m68336, -m68341,
- -m68349.
-
- * doc/Makefile.am (CPU_DOCS): Define.
- (as.info): Depend upon $(CPU_DOCS).
- * doc/Makefile.in: Rebuild.
-
- * configure.in: Remove AM_PROG_INSTALL; it's called by
- AM_INIT_AUTOMAKE.
- * configure: Rebuild.
-
-Thu Oct 9 01:44:36 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * tc-d10v.h (TC_START_LABEL): Don't define.
- (tc_frob_label): Define.
+2000-02-08 Timothy Wall <twall@redhat.com>
-Thu Oct 9 00:07:23 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-d10v.c (write_2_short): Fix bug that wouldn't allow
- to pair a branch and link with anything but an exe instruction.
-
-Wed Oct 8 16:28:53 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (load_expression): Disable the sym+const .got
- optimization to reduce the alignment surprises for gcc.
-
-Wed Oct 8 16:11:15 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * config/obj-coff.h (TC_SPARC): Don't define TARGET_FORMAT.
- * config/tc-sparc.c (sparc_target_format): Handle coff here.
- (sparc_ip): Add %hix,%lox.
- (md_apply_fix3): Call as_bad_where, not as_bad.
- Add support for BFD_RELOC_SPARC_{HIX22,LOX10}.
- (tc_gen_reloc): Add support for BFD_RELOC_SPARC_{HIX22,LOX10}.
-
-Wed Oct 8 12:33:32 1997 Richard Henderson <rth@cygnus.com>
-
- * configure.in: Change alpha-*-* to alpha*-*-*; config.guess now
- recognizes alphaev5 etc.
- * configure: Rebuild.
-
-Wed Oct 8 00:04:05 1997 Gavin Koch <gavin@cygnus.com>
-
- * config/tc-mips.c (md_begin): Replace the TARGET_CPU value
- of mipsr3900 with mipstx39.
-
- * config/tc-mips.c (mips_ip): Don't print the 'opcode requires
- -mipsXX message' if the insn isn't an ISA insn.
-
-Tue Oct 7 12:48:30 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * config/tc-sparc.h (TARGET_FORMAT support): Moved to tc-sparc.c.
- Redefine TARGET_FORMAT to call sparc_target_format.
- * config/tc-sparc.c (in_unsigned_range): New function.
- (sparc_arch_size): Make static.
- (sparc_target_format): New function.
- (sparc_ip): Delete variable immediate_max. Rewrite %hi/etc reloc
- handling. Add support for %hh,%hm,%lm,%h44,%m44,%l44.
- (output_insn): Set `fx_no_overflow'.
- (md_apply_fix3): Handle BFD_RELOC_SPARC_{7,H44,M44,L44}.
- (tc_gen_reloc): Likewise.
-
-Mon Oct 6 14:04:50 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (v850_section): Remove.
-
- * config/obj-elf.c (obj_elf_section): Enhance error message.
-
-Fri Oct 3 15:40:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c: Undef OBJ_COPY_SYMBOL_ATTRIBUTES before
- including obj-elf.h in OBJ_MAYBE_ELF case.
- (mips_target_format): Return NULL after abort to avoid warning.
-
- * ecoff.c (generate_ecoff_stab): Remove unused static function.
-
- * expr.c (operator): Accept ==. From Anders Blomdell
- <anders.blomdell@control.lth.se>.
-
- * config/atof-ieee.c (gen_to_words): When generating a denormal
- number, handle an overflow into the smallest normalized number.
-
-Mon Sep 29 15:24:52 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * as.h, input-scrub.c (new_logical_line): New return value.
- * read.c (s_app_file): Don't note the same file several times
- in a row.
-
-Thu Sep 25 13:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-m68k.c (m68k_ip): Remove ` operand specifier.
-
-Wed Sep 24 16:54:40 1997 Joel Sherrill <joel@oarcorp.com>
+ * 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 <twall@redhat.com>
- * configure.in (sh*-*-rtems*): New target, like sh-*-elf*.
- * configure: Rebuild.
+ * 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 <twall@redhat.com>
-Wed Sep 24 11:30:25 1997 Ian Lance Taylor <ian@cygnus.com>
+ * listing.c (print_lines): Remove conditionals causing bug in
+ listings.
- * config/tc-m68k.c (m68k_ip): Handle q and v operand specifiers.
+2000-02-03 Timothy Wall <twall@cygnus.com>
+
+ * 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 <twall@cygnus.com>
- * doc/c-i386.texi (i386-Float): Remove incorrect assertion that
- fn* instructions do not insert implicit fwait. This was changed
- Jan 29, 1996.
+ * 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/m68k-parse.y (yylex): Permit an expression to be used for
- the scale factor.
+2000-01-31 Nick Clifton <nickc@cygnus.com>
+ * config/tc-arm.c (reg_table): Add support for ATPCS register
+ naming conventions.
- * Makefile.am (EXTRA_as_new_SOURCES): Set to config/m68k-parse.y,
- not m68k-parse.y.
- * Makefile.in: Rebuild.
-
- * aclocal.m4: Rebuild with new libtool.
- * configure: Rebuild.
+2000-01-31 Geoff Keating <geoffk@cygnus.com>
+
+ * 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.
-Tue Sep 23 17:48:09 1997 Ian Lance Taylor <ian@cygnus.com>
+2000-01-19 Chandra Chavva <cchavva@cygnus.com>
- * app.c (do_scrub_chars): Clear mri_state at end of .mri
- pseudo-op.
+ * config/tc-mcore.c (md_assemble): Give warning message if
+ operands passes to instruction are more than the spec.
- * config/tc-mips.c (hilo_interlocks): Change from a static
- variable to a macro, so that it varies with the variables upon
- which it depends.
- (gpr_interlocks, cop_interlocks): Likewise.
- (md_begin): Don't initialize them.
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
-Fri Sep 19 17:08:41 1997 Jeffrey A Law (law@cygnus.com)
+ * 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-mn10300.c (md_assemble): Use strcasecomp instead
- of strcmp where appropriate.
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-Thu Sep 18 14:11:56 1997 Nick Clifton <nickc@cygnus.com>
+ * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c
+ Add dependencies for e-i386aout.o. Fix 2 comment lines.
- * config/tc-v850.c (md_assemble): Cope with a zero data area
- relocation with a constant offset.
- (md_assemble): Produce error message when special data area
- relocations are used on instructions which do not support them.
- (md_assemble): Reset processor mask if defined by command line
- switch.
+ * Makefile.in: Same here.
+ Update copyright.
-Thu Sep 18 11:24:01 1997 Doug Evans <dje@canuck.cygnus.com>
+ * 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-sparc.c: Reorganize file.
- (parse_keyword_arg): Allow numbers in reg names.
- (SPECIAL_CASE_NONE): New macro.
- (md_assemble): Use it.
- (lookup_arch,init_default_arch): New functions.
- (default_arch,default_init_p,sparc_arch_table): New static locals.
- (sparc_arch_size): New static local.
- (max_architecture): Initialize in init_default_arch.
- (md_parse_options): Call init_default_arch if necessary.
- Rewrite -xarch/-A processing.
- (md_show_usage): Print -A values from sparc_arch_table.
- (md_begin): Call init_default_arch if necessary.
- (sparc_md_end): Handle both 32 and 64 bit environments.
- * config/tc-sparc.h (TARGET_FORMAT): Likewise.
- * acconfig.h (SPARC_V9,SPARC_ARCH64): Delete.
- (DEFAULT_ARCH): Add.
- * config.in: Regenerate.
- * configure.in (sparc): Default DEFAULT_ARCH based on target cpu.
- (SPARC_V9,SPARC_ARCH64): Delete.
* configure: Regenerate.
- * config/vms-conf.h (SPARC_V9,SPARC_ARCH64): Delete.
-
-Wed Sep 17 16:54:20 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (v850_reloc_prefix): Recoded to use CHECK_ ()
- macro.
- (handle_tdaoff, handle_zdaoff, handle_sdaoff): New functions.
-
-Tue Sep 16 14:18:22 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (v850_reloc_prefix): Add support for a 16 bit
- displacement from the tiny data area pointer.
-
-Mon Sep 15 21:28:09 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c (fix_new_hppa): Make declaration match
- definition.
-
-Mon Sep 15 18:33:06 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (processor_mask): New variable.
- (set_machine, md_parse_option): Set processor_mask.
- (md_assemble): Check that instruction is available to target
- processor.
-
- * config/tc-v850.h (TARGET_PROCESSOR): New constant.
-
-Wed Sep 10 10:07:08 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (emulations): Add v850 emulation.
-
-Tue Sep 9 17:14:33 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.am (CPU_TYPES): Add arc.
- (TARGET_CPU_CFILES): Add tc-arc.c.
- (TARGET_CPU_HFILES): Add tc-arc.h.
- (dependencies): Rebuild.
- * Makefile.in: Rebuild.
- * configure.in: Recognize arc-*-elf*.
- * configure: Regenerated.
- * config/tc-arc.[ch]: New files.
-
-Tue Sep 9 10:19:37 1997 Nick Clifton <nickc@cygnus.com>
-
- * doc/c-v850.texi (V850 Opcodes): Document hi0() reloc prefix.
- Correct description of hi() reloc prefix.
+ * config/e-i386aout.c: New file.
+
+ * 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.
+
+ * obj.h (struct format_ops): Add s_get_other and s_get_desc.
+ (aout_format_ops): New.
+ Update copyright.
+
+ * 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.
+
+ * 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.
+
+ * symbols.c (colon): Rewrite "already defined" fatal message
+ code for aout with USE_EMULATIONS.
+ Update copyright.
+
+ * 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.
+
+ * 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-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/obj-coff.h (obj_pop_insert): Define.
+ (coff_pseudo_table): Declare.
+ Update copyright.
+
+ * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for
+ s_get_size, s_set_size. Comment all zero entries.
+ Update copyright.
+
+ * 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/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/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.
+
+ * 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-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*.
+ Define TARGET_FORMAT for aout only when not multi.
+ Update copyright.
+
+ * config/te-multi.h: Delete file as it's identical to te-generic.h
+
+2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete.
+ * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to
+ LONG_MNEM_SUFFIX.
+
+ * 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-01-13 Clinton Popetz <cpopetz@cygnus.com>
+
+ * config/tc-mips.c (mips_do_align): New function.
+ * config/tc-mips.h (md_do_align): Define.
+
+2000-01-10 Philip Blundell <philb@gnu.org>
+
+ * 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.
+
+2000-01-10 Philip Blundell <pb@futuretv.com>
+
+ * configure.in (arm*-*-conix*): New target.
+ (arm*-*-linux-gnu*): Match instead of arm-*-linux* and
+ armv*-*-linux-gnu.
+ * configure: Regenerate.
- * doc/c-v850.texi: Document new pseudo ops and command line
- options.
+2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
- * config/tc-v850.c (set_machine): New function.
- * config/tc-v850.c (.v850): New pseudo op.
+ * 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.
-Mon Sep 8 23:08:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Support -alh and -ald for DWARF 1:
- * listing.c (struct list_info_struct): Add debugging field.
- (listing_newline): Initialize the debugging field. If ELF, if the
- section starts with .debug or .line, set the debugging field in
- the listing structure.
- (debugging_pseudo): Add list parameter. Change all callers. If
- the debugging field is set, consider it to be a debugging pseudo.
- If ELF, skip blank lines between debugging lines.
- * read.c (emit_expr): If ELF, look for line numbers.
- (stringer): If ELF, look for file names.
-
-Mon Sep 8 12:33:40 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c (v850_insert_operand): Only test for overflow
- if there is no insert function.
-
- * config/tc-v850.h (TARGET_MACHINE): New constant.
-
- * config/tc-v850.c (v850_insert_operand): Add
- -mwarn_unsigned_overflow.
- (md_begin): Set BFD machine number based on machine variable.
- (md_parse_option): Add -mv850, -mv850e and -mv850ea options.
-
-Mon Sep 8 11:20:46 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * as.h: Don't declare alloca if it is a macro.
- * macro.c: Likewise.
-
-Sun Sep 7 00:30:19 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (md_parse_option): Move m[] out to top level and
- rename to cpu_types[].
- (s_alpha_arch): New function.
- (md_pseudo_table): Add "arch".
-
- * config/tc-alpha.c (md_begin): Merge the two loops through the
- opcode table.
- (s_alpha_proc): Add initial SKIP_WHITESPACE.
- (s_alpha_set): Likewise. Use get_symbol_end instead local while loop.
-
-Sat Sep 6 19:38:12 1997 Fred Fish <fnf@cygnus.com>
-
- * read.h (s_lcomm_bytes): Add prototype (for real this time).
-
-Thu Sep 4 12:10:01 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-elf.c (elf_frob_symbol): Only set BSF_OBJECT for
- symbols on Irix.
-
-Wed Sep 3 11:21:33 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-v850.c: Remove BFD_RELOC_V850_16_PCREL.
-
-Tue Sep 2 18:32:30 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10200.c (md_convert_frag): PC relative instructions arex
- relative to the next instruction, not the current instruction.
- (md_assemble): Similarly.
-
-Tue Sep 2 15:58:52 1997 Nick Clifton <nickc@cygnus.com>
-
- * doc/c-v850.texi: Explanations of offsets in SDA/ZDA areas
- correcetd.
-
- * config/tc-v850.c: Add support for SDA/TDA/ZDA sections.
- (v850_reloc_prefix): Duplicate code eliminated. Add code to
- recognise special instructions.
- (md_assemble): Calculation of the size of a fixups corrected.
-
- * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add SDA/TDA/ZDA
- sections.
-
-Tue Sep 2 15:40:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/tc-v850.c (md_assemble): Use opcode->name instead of
- opcode->opcode as the sentinal. Zero is a valid opcode.
-
-Tue Aug 26 16:51:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/as.texinfo (Machine Dependencies): Add v850 to menu.
- * doc/c-v850.texi: Change node name to match other chapter nodes.
-
-Tue Aug 26 09:46:22 1997 Nick Clifton <nickc@cygnus.com>
-
- * doc/c-v850.texi (V850 Opcodes): Correct name for tiny data area
- pointer.
-
-Tue Aug 26 12:23:25 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
- * expr.c (integer_constant): If BFD64, don't make a bignum if the
- number will fit in 64 bits.
+ * 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.
- * config/tc-alpha.c (load_expression): Check explicitly for O_big,
- rather than calling abort.
+1999-12-22 Philip Blundell <pb@futuretv.com>
- * as.h: Don't define alloca if __GNUC__. Just declare it.
- * macro.c: Copy alloca handling from as.h.
+ * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate
+ hook function when changing sections.
+ (arm_s_data): Likewise.
- * config/tc-i386.c (i386_align_code): Correct 16 bit noops. From
- Gabriel Paubert <paubert@iram.es>.
+1999-12-14 Nick Clifton <nickc@cygnus.com>
- * config/tc-i386.c (md_assemble): In JumpByte case, when looking
- for a WORD_PREFIX_OPCODE, change it to ADDR_PREFIX_OPCODE if this
- is jcxz or a loop instruction.
+ * config/tc-arm.c (md_parse_option): Add support for -marm720
+ command line switch.
-Mon Aug 25 16:04:14 1997 Nick Clifton <nickc@cygnus.com>
+Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com)
- * config/tc-v850.c (pre_defined_registers): Add 'hp' as alias for
- r2.
- (md_begin): Set up machine architecture and type.
+ * 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.
-Mon Aug 25 14:25:48 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-11-29 Nick Clifton <nickc@cygnus.com>
- * symbols.c (resolve_symbol_value): Store the value back into the
- symbol expression, to handle add or subtract simplification
- correctly. Handle O_symbol_rva. Add default case.
+ * 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.
- * config/tc-ppc.c (ppc_change_csect): Temporarily lower the
- chunksize while creating the new subsection.
- * as.c (chunksize): Initialize to zero.
- * subsegs.c (subseg_set_rest): Change 5000 to chunksize when
- calling obstack_begin.
+1999-11-28 Michael Meissner <meissner@cygnus.com>
-Mon Aug 25 11:21:48 1997 Nick Clifton <nickc@cygnus.com>
+ * 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 <nickc@cygnus.com>
- * config/tc-v850.c (md_assemble): Restore input_line_pointer upon
- exit.
+ * 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.
-Mon Aug 25 10:19:34 1997 Nick Clifton <nickc@cygnus.com>
+1999-11-16 Alan Modra <alan@spri.levels.unisa.edu.au>
- * doc/c-v850.texi: Change the major node to v850 Machine
- Dependencies.
+ * config/tc-i386.c (i386_immediate): Disallow O_big immediates.
+ (i386_displacement): Disallow O_big displacements.
-Fri Aug 22 11:16:14 1997 Nick Clifton <nickc@cygnus.com>
+Mon Nov 15 20:12:43 1999 Donald Lindsay <dlindsay@cygnus.com>
- * doc/as.texinfo: Add inclusion of c-v850.texi
+ * 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.
- * doc/c-v850.texi: New file.
+1999-11-12 Nick Clifton <nickc@cygnus.com>
- * read.c (is_end_of_line): Make NUL character be considered to be
- a line terminator.
+ * macro.c (buffer_and_nest): Do not check beyond the end of the
+ buffer.
-Fri Aug 22 10:45:33 1997 Nick Clifton <nickc@cygnus.com>
+1999-11-11 Nick Clifton <nickc@cygnus.com>
- * config/tc-v850.c (parse_register_list): Add support for curly
- brace syntax.
- (cc_names): Add "e" and "ne" conditions.
+ * macro.c (buffer_and_nest): Look for seperator after TO and
+ FROM tokens.
-Thu Aug 21 11:00:36 1997 Nick Clifton <nickc@cygnus.com>
+1999-11-08 Andrew Haley <aph@cygnus.com>
- * app.c (do_scrub_chars): Support a double dash as starting a
- comment that extends to end of line.
+ * app.c (do_scrub_chars): When in State 10, treat backslash
+ characters in the same way as as symbol characters.
-Thu Aug 21 10:54:27 1997 Nick Clifton <nickc@cygnus.com>
+1999-11-07 Richard Henderson <rth@cygnus.com>
- * config/tc-v850.c (v850_section, v850_bss, v850_offset): New
- functions.
- (md_pseudo_table): New pseudo ops: .bss, .offset, .section
+ * config/tc-alpha.c (alpha_align): Check, don't assert, that
+ the previous label was in the current section before playing
+ with auto-alignment.
-Thu Aug 21 00:59:53 1997 Doug Evans <dje@canuck.cygnus.com>
+1999-11-06 Nick Clifton <nickc@cygnus.com>
- * config/tc-m32r.c (md_estimate_size_before_relax): Update recorded
- insn when changing to a different instruction.
+ * 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.
-Wed Aug 20 00:45:20 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+1999-11-05 Michael Meissner <meissner@cygnus.com>
- * tc-sh.c (parse_reg, get_specific, build_Mytes): Add SH4
- floating point extensions.
- (parse_reg): parse sgr and dbr.
+ * expr.h (operatorT): Increase machine dependent operators to 16.
+ * expr.c (op_rank): Ditto.
-Tue Aug 19 17:07:34 1997 Nick Clifton <nickc@cygnus.com>
+1999-11-03 Ian Lance Taylor <ian@zembu.com>
- * config/tc-v850.c (system_register_name): Support numbers for
- system register IDs.
+ * read.c (pseudo_set): Reject attempts to set the value of a
+ section symbol.
-Tue Aug 19 08:59:12 1997 Fred Fish <fnf@cygnus.com>
+ * config/obj-elf.c (obj_elf_ident): Call md_flush_pending_output
+ if it is defined.
- * read.c (s_lcomm_internal): Renamed from s_lcomm, added arg to
- flag when alignment is in bytes instead of power of 2, and code to
- use that flag to convert alignment to bytes.
- (s_lcomm, s_lcomm_bytes): New helpers that call s_lcomm_internal.
- * read.h (s_lcomm_bytes): Add prototype.
- * config/obj-coff.c (write_object_file): If ALIGNMENT_IN_S_FLAGS is
- defined, write alignment to alignment bits in section header s_flags
- rather than the s_align field.
+ * config/obj-elf.c (elf_set_index): Add ATTRIBUTE_UNUSED.
-Mon Aug 18 20:42:23 1997 Richard Henderson <rth@cygnus.com>
+ * config/obj-elf.c (elf_frob_file_after_relocs): Don't pass NULL
+ to bfd_set_section_contents.
- * macro.c (check_macro): use alloca instead of xmalloc to plug leak.
+1999-11-03 Nick Clifton <nickc@cygnus.com>
-Mon Aug 18 20:33:06 1997 Richard Henderson <rth@cygnus.com>
+ * config/tc-mcore.h (TARGET_BYTES_BIG_ENDIAN): Change to false.
- * as.c (show_usage): Add -am.
- * input-scrub.c (input_scrub_include_sb): Don't add leading \n
- if we've already got one.
- * listing.c (struct list_info_struct): Add line_contents.
- (listing_newline): Put unused argument to work: if non-null, save it...
- (listing_listing): ... and regurgitate during listing instead of line
- from file.
- * listing.h (LISTING_MACEXP): New define.
- (LISTING_NEWLINE): Argument is NULL.
- * read.c (read_a_source_file): If expanding macros, break up input
- lines and pass them to listing_newline.
- * doc/as.texinfo: Document -ac and -am.
+1999-11-01 Gavin Romig-Koch <gavin@cygnus.com>
- * cond.c (s_ifc): Add missing demand_empty_rest_of_line.
+ * config/tc-mips.c (macro_build): Use OPCODE_IS_MEMBER.
+ (mips_ip): Use OPCODE_IS_MEMBER.
-Mon Aug 18 11:26:36 1997 Nick Clifton <nickc@cygnus.com>
+Wed Oct 27 16:50:44 1999 Don Lindsay <dlindsay@cygnus.com>
- * config/tc-v850.c (md_apply_fix3): Add support for new 16 bit PC
- relative reloc.
+ * config/tc-arm.c (reg_required_here): Improve comments.
+ * config/tc-arm.c (thumb_opcode): Add "variants" field.
+ (tinsns): Initialize variants field.
-Fri Aug 15 14:00:13 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and
+ BAD_PC respectively.
- * Makefile.am (check-DEJAGNU): Don't cd into testsuite until after
- setting EXPECT and TCL_LIBRARY.
- * Makefile.in: Rebuild.
+1999-10-27 Scott Bambrough <scottb@netwinder.org>
- * as.h (enum debug_info_type): Define.
- (debug_type): Declare.
- * as.c (debug_type): New global variable.
- (show_usage): Add --gstabs.
- (parse_args): Handle --gstabs.
- * read.c (generate_asm_lineno): Remove.
- (read_a_source_file): Output stabs debugging if appropriate.
- Change checks of generate_asm_lineno to check debug_type. Only
- generate ECOFF debugging if ECOFF_DEBUGGING is defined.
- * read.h (generate_asm_lineno): Don't declare.
- (stabs_generate_asm_lineno): Declare.
- * stabs.c (stabs_generate_asm_lineno): New function.
- * ecoff.c (add_file): Use debug_type, not generate_asm_lineno.
- Don't turn off debugging.
- (add_file): Remove old #if 0 code.
- (ecoff_new_file): Set debug_type, not generate_asm_lineno.
- (ecoff_directive_end): Don't generate stabs line symbols.
- (ecoff_generate_asm_lineno): Don't check stabs_seen. Don't set
- generate_asm_lineno.
- (line_label_cnt): Remove.
- (ecoff_generate_asm_line_stab): Remove.
- * ecoff.h (ecoff_generate_asm_line_stab): Don't declare.
- * doc/as.texinfo, doc/as.1: Document --gstabs.
-
-Wed Aug 13 18:58:56 1997 Nick Clifton <nickc@cygnus.com>
+ * config/tc-arm.c (reloc_map[]): Fix compiler warning.
+ * config/tc-arm.h: Fix compile time warnings.
-
- * config/tc-v850.c (md_assemble): Fix error recovery to reload
- text of entire opcode.
+Mon Oct 18 18:11:10 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
-Tue Aug 12 10:27:34 1997 Richard Henderson <rth@cygnus.com>
+ * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the
+ form @abs16, @(abs16) and @(abs16 + imm).
- * doc/internals.texi: Document rs_leb128.
+1999-10-21 Gavin Romig-Koch <gavin@cygnus.com>
-Tue Aug 12 12:17:03 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-m68k.c (m68k_ip): Give an error message for SIZE_BYTE
- in ABSL case, rather than calling abort.
+1999-10-18 Michael Meissner <meissner@cygnus.com>
-Mon Aug 11 21:48:00 1997 Richard Henderson <rth@cygnus.com>
+ * 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.
- * as.h (enum _relax_state): Add rs_leb128.
- * read.c (potable): Add sleb128 and uleb128.
- (sizeof_*leb128, output_*leb128, emit_leb128_expr, s_leb128): New
- functions.
- * read.h: Update prototypes.
- * symbols.c (resolve_symbol_value): Streamline quite a bit. Return
- the symbol value, add a second FINALIZE argument that prevents
- changes from being comitted. Update all callers.
- * write.c (cvt_frag_to_fill, relax_segment): Handle rs_leb128.
- * doc/as.texinfo: Document the new pseudos.
-
-Sun Aug 10 14:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (MOSTLYCLEANFILES): Add site.bak, site.exp, stage,
- stage1, and stage2.
- (DISTCLEANFILES): Define.
- * doc/Makefile.am (DISTCLEANFILES): Define.
- * Makefile.in, doc/Makefile.in: Rebuild.
-
-Wed Aug 6 00:30:30 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Define TARGET_BYTES_BIG_ENDIAN if endian is set.
- Don't set targ or gas_target. Define SCO_ELF and
- TARGET_SOLARIS_COMMENT when appropriate. Don't substitute for
- target_frag.
- * Makefile.am: Remove @target_frag@.
- (INCLUDES): Remove $(INTERNAL_CFLAGS), $(CROSS), $(HDEFINES), and
- $(TDEFINES).
- (dep-am): Mark as phony.
- * acconfig.h: Add TARGET_BYTES_BIG_ENDIAN, TARGET_SOLARIS_COMMENT,
- and SCO_ELF.
- * config/arm-big.mt, config/arm-lit.mt: Remove.
- * config/mips-big.mt, config/mips-lit.mt: Remove.
- * config/ppc-big.mt, config/ppc-lit.mt: Remove.
- * config/ppc-sol.mt: Remove.
- * config/i386coff.mt, config/m68kcoff.mt: Remove.
- * config/m88kcoff.mt: Remove.
- * config/sco5.mt: Remove.
- * configure, config.in, Makefile.in: Rebuild.
-
- * Makefile.am ($(srcdir)/config/m68k-parse.h): New target, to
- further try to circumvent the .y.h rule.
- * Makefile.in: Rebuild.
+ * expr.c (op_rank): Add machine dependent operators.
-Tue Aug 5 12:32:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * 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, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
- AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
- * config.in: New file, created by autoheader.
- * conf.in: Remove.
- * acconfig.h: Mention PACKAGE, VERSION, and USING_CGEN.
- * stamp-h.in: New file.
- * as.c (print_version_id): Change GAS_VERSION to VERSION.
- (parse_args): Likewise.
- * config/obj-vms.c: (Write_VMS_MHD_Records): Likewise.
- * doc/Makefile.am: New file, based on old doc/Makefile.in.
- * Makefile.in, doc/Makefile.in: Now built with automake.
- * aclocal.m4: Now built with aclocal.
- * configure: Rebuild.
+ * 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.
- * cond.c (s_else): If not listing false conditionals, turn listing
- off in the false branch of the else.
+Sun Oct 17 17:15:58 1999 Jeffrey A Law (law@cygnus.com)
-Mon Aug 4 11:28:35 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (md_apply_fix): Make "fmt" an int.
- * config/tc-mips.c (macro): Fix handling of a double load from a
- symbol plus an offset.
+1999-10-12 Alan Modra <alan@spri.levels.unisa.edu.au>
- * ecoff.c (ecoff_build_symbols): Set fMerge to 0 for an FDR which
- has an associated external symbol.
+ * config/tc-i386.c (i386_index_check): Correct #endif location.
-Sun Aug 3 23:23:59 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (s_alpha_ucons): New function.
- (md_pseudo_table): Add unaligned data pseudos for DWARF.
+Mon Oct 11 14:02:40 1999 Geoffrey Keating <geoffk@cygnus.com>
-Thu Jul 31 15:13:43 1997 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * config/tc-v850.c (md_assemble): Ignore the rest of the current
- line if we encounter an error.
+Sun Oct 10 01:47:23 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
- * config/tc-v850.c (md_assemble): Sign extend constants value
- for hi and hi0 expressions.
- (v850_insert_operand): Enable range checking for generic 16bit
+ * 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 <dnovillo@cygnus.com>
+
+ * 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 <dnovillo@cygnus.com>
+
+ * config/tc-d10v.c (check_range): Check range for RESTRICTED_NUM3
operands.
-Tue Jul 29 14:20:43 1997 Jeffrey A Law (law@cygnus.com)
+Mon Oct 4 17:24:23 1999 Nick Clifton <nickc@cygnus.com>
+ Doug Evans <devans@cygnus.com>
- * config/tc-v850.c (md_assemble): Turn on fx_no_overflow for
- LO16, HI16 and HI16_S relocs.
+ 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.
-Mon Jul 28 18:41:41 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+Tue Sep 28 14:06:44 1999 Geoffrey Keating <geoffk@cygnus.com>
- * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
- win32 dependencies.
- * configure: Regenerated with autoconf 2.12.
- * Makefile.in: Add $(EXEEXT) to all executables.
+ * 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++.
-Fri Jul 25 10:54:43 1997 Jeffrey A Law (law@cygnus.com)
+Thu Sep 23 07:13:45 1999 Jerry Quinn <jquinn@nortelnetworks.com>
- * tc-hppa.c (md_apply_fix): Improve warnings for out of range
- unconditional branches.
- (hppa_fix_adjustable): Don't adjust anything with a RR% or LR%
- field selector.
+ * config/tc-hppa.c (pa_ip): Replace 'B', 'M', 'l' and 'g' handling
+ with cleaner code using completer prefixes. Add 'Y'.
-Thu Jul 24 15:21:49 1997 Doug Evans <dje@canuck.cygnus.com>
+ * config/tc-hppa.c (pa_ip): Add parens to silence compiler.
- * tc-sparc.c (md_begin): Cast sparc_opcodes to PTR for hash_insert.
+Wed Sep 22 09:37:19 1999 Jeffrey A Law (law@cygnus.com)
-Thu Jul 24 17:51:29 1997 Ian Lance Taylor <ian@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.
- * macro.c (define_macro): Make sure the index is in range before
- checking for '('.
+1999-09-22 Nick Clifton <nickc@cygnus.com>
-Tue Jul 22 18:38:56 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+ * config/tc-arm.c (MULTI_SET_PSR): Rename to LDM_TYPE_2_OR_3.
- * config/te-go32.h (USE_ALIGN_PTWO): Define.
- * config/tc-i386.c (md_pseudo_table): If USE_ALIGN_PTWO is
- defined, use s_align_ptwo for .align.
- * configure.in (i386-*-msdosdjgpp*): New target.
- (i386-*-go32*): Set em to go32 and targ to coffgo32.
- * configure: Rebuild.
+Mon Sep 20 04:01:41 1999 Jeffrey A Law (law@cygnus.com)
-Tue Jul 22 12:41:40 1997 Doug Evans <dje@canuck.cygnus.com>
+ * config/tc-hppa.c (pa_ip): Fix thinkos in recent cleanup
+ of PA2.0 support.
- * config/tc-sparc.c (last_opcode): New static local.
- (md_assemble): Don't issue "FP branch in delay slot" warning if
- the delay slot has been annulled.
+1999-09-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-Tue Jul 22 13:25:13 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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-m68k.c (md_apply_fix_2): Check for PC relative reloc
- code if BFD_ASSEMBLER.
+Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com)
-Mon Jul 21 08:57:17 1997 Jeffrey A Law (law@cygnus.com)
+ * config/tc-hppa.c (pa_ip): Handle 'J', 'K' and 'cc'
+ operands.
- * config/tc-v850.c (system_registers): Fix ordering of registers.
+ * config/tc-hppa.c (pa_ip); Handle "fe", and 'cJ'.
-Mon Jul 14 23:10:58 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'.
- * config/tc-mips.c (macro_build): Restore check of fmt argument.
- (mips_ip): Fix ISA checks.
+ * 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.
-Sun Jul 13 20:43:46 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Handle 'X' operand.
+ (md_apply_fix): Handle 22bit pc-rel branches.
- * config/tc-mips.c (check_absolute_expr): Change warning to
- error.
+ * config/tc-hppa.c (pa_ip): Handle 'B' operand.
-Fri Jul 11 10:18:47 1997 Jeffrey A Law (law@cygnus.com)
+ * config/tc-hppa.c (pa_ip): Handle 'L' and 'M' operands.
- * config/tc-mips.c (macro_build): Refine code to check if an
- instruction is available on a particular cpu variant.
- (mips_ip): Likewise.
+ * config/tc-hppa.c (pa_ip): Handle 'l' operand.
-Mon Jul 7 22:53:08 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-i386.c (tc_i386_fix_adjustable): Change ifndef
- OBJ_AOUT to ifdef OBJ_ELF.
- (md_apply_fix3): When mangling 32 bit PC relative reloc for
- BFD_ASSEMBLER, handle one ELF case for COFF as well, and add a PE
- case.
- * write.c (fixup_segment): Change special case for i386-coff to
- not apply for i386-pe.
- * config/obj-coff.c (coff_adjust_section_syms): Only count fixups
- which were not done.
- (coff_frob_file_after_relocs): Rename from coff_frob_file.
- (coff_format_ops): Initialize frob_file_after_relocs field rather
- than frob_file field.
- * config/obj-coff.h (coff_frob_file): Don't declare.
- (coff_frob_file_after_relocs): Declare.
- (obj_frob_file): Don't define.
- (obj_frob_file_after_relocs): Define.
- * configure.in: Set bfd_gas to yes for i386-*-cygwin32.
- * configure: Rebuild.
+ * config/tc-hppa.c (pa_ip): Handle 'g' operand.
-Wed Jul 2 12:05:00 1997 Ian Lance Taylor <ian@cygnus.com>
+at Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com)
- * config/obj-coff.c (fixup_segment): Never subtract section
- address from PC relative reloc which will be fully resolved.
+ * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling.
+ (pa_ip): Handle 'fX'.
-Tue Jul 1 15:23:07 1997 Jeffrey A Law (law@cygnus.com)
+Sat Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com)
- * ecoff.c (page_type): Renamed from page_t to avoid conflict
- with hpux10 header files.
+ * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling.
+ (pa_ip): Handle 'fX'.
-Mon Jun 30 12:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
+Fri Sep 17 11:57:34 1999 Jeffrey A Law (law@cygnus.com)
- From Jason Merrill <jason@cygnus.com>:
- * read.c (do_align): If BFD_ASSEMBLER, only use NOP_OPCODE if
- SEC_CODE is set.
- * config/tc-i386.h (md_maybe_text): Define.
- (md_do_align): Use md_maybe_text.
+ * 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.
-Fri Jun 27 19:15:27 1997 Michael Meissner <meissner@cygnus.com>
+Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com)
- * config/tc-ppc.h (tc_fix_adjustable): Only check for GOT type
- relocations, don't check for symbol being external, weak, etc.
+ * config/tc-hppa.c (pa_ip): Move dwarf2 stuff from here.
+ (md_assemble): To here. Tweak address generation.
-Mon Jun 16 19:12:51 1997 Geoff Keating <geoffk@ozemail.com.au>
+ * 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-ppc.h (tc_fix_adjustable): Don't let the assembler
- calculate relocations to any external symbol, because we might be
- linking a shared object and the symbol might be overriden or moved
- (for instance, moved into a static executable's .bss section).
- (GLOBAL_OFFSET_TABLE_NAME): Delete. This is an i386 wierdness.
+1999-09-14 Michael Meissner <meissner@cygnus.com>
- * config/tc-ppc.h (tc_fix_adjustable): GOT-based relocations can't
- be calculated by the assembler.
-
- * config/tc-ppc.c (md_apply_fix3): Handle @plt or @local branch
- whose destination lies in the same file, by ignoring the @plt or
- @local and aiming the branch at its destination.
+ * 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.
-Mon Jun 16 13:59:18 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+1999-09-14 Donn Terry <donn@interix.com>
- * symbols.c (copy_symbol_attributes): Copy BSF_OBJECT flag.
- * config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Copy size
- expression.
+ * config/te-interix.h (GLOBAL_OFFSET_TABLE_NAME): Define.
- * config/obj-multi.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Define instead
- of obj_copy_symbol_attributes.
+1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au>
-Mon Jun 16 12:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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-ppc.c (ppc_insert_operand): In 32 bit mode, with a
- signed operand, sign extend a 32 bit value to the host size.
+ * config/tc-i386.c (md_assemble): Correct frag_var size. Tidy
+ jump handling code and comments.
- * Makefile.in (CFLAGS): Subsitute from configure script. From
- Jeff Makey <jeff@cts.com>.
+1999-09-12 Ian Lance Taylor <ian@zembu.com>
- * config/tc-i386.c (i386_operand): Use alloca rather than a fixed
- buffer size to make a copy of the symbol.
+ * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to
+ the value if TE_PE and a global defined symbol.
- * Makefile.in (OBJS): Put @extra_objects@ on the same line as
- macro.o.
+1999-09-11 Ian Lance Taylor <ian@zembu.com>
-Thu Jun 12 12:16:20 1997 Ian Lance Taylor <ian@cygnus.com>
+ * write.c (dump_section_relocs): Call print_symbol_value_1 to
+ print the symbol, rather than printing it here.
- * write.c (write_object_file): In non BFD_ASSEMBLER code, as we
- step through the frags calling cvt_frag_to_fill, switch to
- SEG_DATA when we reach data_frag_root.
+1999-09-11 Donn Terry <donn@interix.com>
-Tue Jun 10 17:08:34 1997 Jeffrey A Law (law@cygnus.com)
+ * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
+ BFD_RELOC_RVA relocations.
- * config/tc-mn10300.c (md_assemble): Allow an empty register
- list for instructions which use register lists.
+ * 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".
-Tue Jun 10 11:18:09 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+ * 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-arm.c (md_apply_fix3): Make temp unsigned long.
+ * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
+ relocations against global symbols if TE_PE.
- * config/tc-arm.c (arm_adjust_symtab): Only set storage classes if
- OBJ_COFF.
+ * config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version.
+ (obj_pseudo_table): Always handle ".ident" with obj-coff_ident.
- * config/tc-arm.c: Add prototypes for many static functions.
- (struct asm_opcode ): Add prototypes for parms field.
- (struct thumb_opcode ): Likewise.
- (fp_op2): Remove unused flags parameter.
- (output_inst): Make static.
- (arm_after_pass_hook): Remove unused ignore parameter.
- * config/tc-arm.h (arm_after_pass_hook): Declare.
- (arm_start_line_hook): Declare.
- (arm_frob_label): Declare.
+ * config/obj-coff.c (coff_frob_symbol): Prohibit weak common
+ symbols.
-Mon Jun 9 12:55:45 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+ * 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.
- * depend.c (wrap_output): new prototype.
+ * 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.
-Mon Jun 9 12:52:44 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-coff.c (obj_coff_loc): New static function.
+ (obj_pseudo_table): Add "loc".
- * config/tc-sh.c (md_apply_fix): Check for overflow.
+ * config/obj-coff.c (add_lineno): Check that the line number is
+ positive.
- * config/tc-m68k.c (md_section_align): If a.out and BFD, force
- section size to be aligned.
+ * 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.
-Fri Jun 6 17:15:55 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-coff.c (obj_coff_section): Default to setting
+ SEC_LOAD. Don't set SEC_DATA for 'w' modifier.
- * config/tc-sh.h (md_cons_align): Define.
- (sh_cons_align): Declare.
- * config/tc-sh.c (md_pseudo_table): Add .uaword and .ualong.
- (sh_no_align_cons): New static variable.
- (s_uacons): New static function.
- (sh_cons_align): New function.
- (sh_handle_align): Warn about misaligned data.
- * doc/c-sh.texi: Document .uaword and .ualong.
+ * write.c (adjust_reloc_syms): Print adjusted fixup.
-Thu Jun 5 15:38:17 1997 Ian Lance Taylor <ian@cygnus.com>
+ * expr.c (integer_constant): Correct too_many_digits calculation
+ in base 10 case.
- * macro.c (macro_expand): In MRI mode, treat single quote as a
- separator character when checking for a positional argument.
+1999-09-09 Andreas Schwab <schwab@suse.de>
-Tue Jun 3 16:15:13 1997 Nick Clifton <nickc@cygnus.com>
+ * doc/c-arm.texi: Fix arguments of @var to not contain
+ punctuation.
- * config/tc-arm.c (md_parse_option): Merge in changes from
- armT-970328-branch.
+1999-09-08 Philip Blundell <pb@nexus.co.uk>
- * config/tc-arm.h: Merge in changes from armT-970328-branch.
+ * 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.
- * configure.in (emulations): Add Thumb architecture support from
- armT-9703-28-branch.
+Tue Sep 7 13:28:59 1999 Jeffrey A Law (law@cygnus.com)
-Mon Jun 2 16:25:07 1997 Nick Clifton <nickc@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Put strict register checks before
+ call to pa_parse_number.
- * doc/all.texi: Add enabling of ARM documentation.
+ * config/tc-hppa.c (pa_ip): Support 'Z' argument.
- * doc/as.texinfo: Add ARM documentation from armT-970328-branch.
+1999-09-06 Ian Lance Taylor <ian@zembu.com>
-Mon Jun 2 11:55:12 1997 Gavin Koch <gavin@cygnus.com>
+ * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for
+ BFD_ASSEMBLER code.
- * config/tc-mips.c: Added r3900 support.
+1999-09-06 Donn Terry <donn@interix.com>
-Thu May 29 12:58:26 1997 Ben Pfaff <pfaffben@pilot.msu.edu>
+ * as.c (perform_an_assembly_pass): Set SEC_DATA for data_section.
- * as.c: (parse_args) `-t' option requires an argument.
+Mon Sep 6 04:26:56 1999 Jeffrey A Law (law@cygnus.com)
-Wed May 28 15:45:07 1997 Nick Clifton <nickc@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 <nickc@cygnus.com>
- * config/tc-arm.c (md_begin): Change call to
- coff_arm_bfd_set_private_flags() to a call to
- bfd_set_private_flags().
+ * config/tc-m32r.c (md_longopts): Fix value for -Wnuh.
-Wed May 28 16:17:34 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-09-04 Steve Chamberlain <sac@pobox.com>
- * Makefile.in: Rebuild dependencies.
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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 <nickc@cygnus.com>
+
+ * config/tc-mcore.c (mcore_s_section): Do not dump literals if a
+ .section .line directive is encountered.
+
+1999-09-01 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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.c (tc_gen_reloc): Don't try to convert the type
- of a BFD_RELOC_RVA reloc.
+1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
-Wed May 28 10:48:14 1997 Jeffrey A Law (law@cygnus.com)
+ Based on a patch from H.J. Lu <hjl@gnu.org>
+ * config/tc-i386.c (parse_register): Handle FP regs specially.
+ (md_begin): Remove '(' and ')' from register_chars.
- * config/tc-hppa.c (tc_fix_adjustable): Reject absolute calls/jumps.
- (hppa_force_relocation): Force a relocation for an absolute
- call/jump.
+1999-08-29 Doug Evans <devans@casey.cygnus.com>
-Mon May 26 13:24:25 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-m32r.c (md_parse_option): Delete unrecognized option
+ error message (done elsewhere).
- * doc/as.texinfo: Don't use @value in section names or index
- entries; it confuses texinfo.tex.
+Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com)
-Fri May 23 00:09:35 1997 Tom Tromey <tromey@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers.
- * doc/as.texinfo: Updated for -MD option.
- * Makefile.in (CFILES): Added depend.c.
- (OBJS): Added depend.o.
- * as.h (start_dependencies, register_dependency,
- print_dependencies): New declarations.
- * depend.c: New file.
- * as.c (parse_args): Added -MD option.
- (main): Call print_dependencies.
- (show_usage): Added help for -MD.
- * read.c (s_app_file): Call register_dependency.
- (s_include): Call register_dependency when file is found.
- (read_a_source_file): Call register_dependency.
+Sat Aug 28 00:26:26 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-Wed May 21 17:39:28 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register
+ args by 'f'.
- * config/obj-coff.c (symbol_to_chars): If TE_PE, don't add the
- section address to the symbol value.
+ * config/tc-hppa.c (pa_ip): Add args q, %, and |.
-Tue May 20 11:23:31 1997 Gavin Koch <gavin@cygnus.com>
+ * 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-mips.c (macro_build,mips_ip): Move the INSN_ISA field
- into the new membership field.
+ * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH',
+ 'cS', and 'c*'.
-Thu May 15 10:00:53 1997 Nick Clifton <nickc@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'.
- * config/tc-arm.c (md_begin): If no cpu type is specified on the
- command line then the ARM7 is now chosen by default when setting
- the BFD machine and architecture.
+ * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!'
-Wed May 14 09:54:53 1997 Nick Clifton <nickc@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Add case for 'I'.
- * config/tc-arm.c (global variables): Added 'uses_apcs_26' flag to
- hold APCS selection.
- (md_begin): Added code to generate flags to be set into the COFF
- header and the calls to the BFD functions to do this.
- (md_parse_option, md_show_usage): Added new command line
- options -mapcs-32, -mapcs-26, -marmv2, -marmv2a, -marmv3,
- -marmv3m, -marmv4, -marmv4t.
+1999-08-27 Jim Wilson <wilson@cygnus.com>
- * tc-arm.h (LOCAL_LABEL): Removed the definition of this macro
- as it is never used.
+ * 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.
-Tue May 13 22:26:14 1997 Jeffrey A Law (law@cygnus.com)
+1999-08-26 David Mosberger <davidm@hpl.hp.com>
- * config/tc-mn10200.c (md_convert_frag): Prefix temporary
- label name with ".".
- * config/tc-mn10300.c (md_convert_frag): Likewise.
+ * 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.
-Tue May 13 14:44:39 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-26 Jim Wilson <wilson@cygnus.com>
- * config/tc-mips.c (set_at): Check for bignum.
- (check_absolute_expr, macro, mips16_macro): Likewise.
+ * 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.
-Mon May 12 13:33:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-i386.c (pi): Check for RegMMX.
+ * config/tc-i386.c (i386_index_check): Fix the displacement size
+ when INFER_ADDR_PREFIX.
-Thu May 8 11:10:15 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-18 Nick Clifton <nickc@cygnus.com>
- * expr.c (expr): When subtracting values in the same frag,
- subtract X_add_number rather than adding it.
+ * config/tc-arm.c (md_apply_fix3): If an offset is invalid,
+ display its value.
-Wed May 7 15:39:48 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-17 Ian Lance Taylor <ian@zembu.com>
- * config/obj-coff.c (write_object_file): Just pass NULL to
- md_do_align, not the address of a char holding NOP_OPCODE.
+ * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to
+ handle 0xffffNNNN constants correctly.
- * config/tc-mips.c (macro): Handle constants for M_LI_D and
- M_LI_DD.
- (mips_ip): For 'F', 'L', 'f', and 'l', generate a constant rather
- than an address if the floating point value looks sufficiently
- simple.
+1999-08-16 Nick Clifton <nickc@cygnus.com>
-Tue May 6 12:18:09 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (do_ldst): Look for register conflicts on stores
+ as well as loads.
- * config/tc-i386.c (md_section_align): If a.out and BFD, force
- section size to be aligned.
+1999-08-13 Nick Clifton <nickc@cygnus.com>
-Mon May 5 17:16:55 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (validate_offset_imm): Work on unsigned values.
+ (md_apply_fix3): Always pass positive values to
+ validate_offset_imm.
- * cond.c: Include "macro.h".
- (struct conditional_frame): Add macro_nest field.
- (initialize_cframe): Initialize macro_nest.
- (cond_finish_check): Add nest parameter. Change all callers.
- (cond_exit_macro): New function.
- * as.h (cond_finish_check): Update declaration.
- (cond_exit_macro): Declare.
- * input-scrub.c (macro_nest): Make globally visible.
- (input_scrub_next_buffer): Call cond_finish_check.
- * macro.h (macro_nest): Declare.
- * read.c (s_mexit): Call cond_exit_macro.
+1999-08-12 Nick Clifton <nickc@cygnus.com>
- * config/tc-i386.h (RegMMX): Define.
- * config/tc-i386.c (pi): Check for all register types.
- (type_names): Add RegMMX.
- (md_assemble): Handle RegMMX.
+ * 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 <alan@spri.levels.unisa.edu.au>
-Wed Apr 30 12:47:00 1997 Manfred Hollstein <manfred@s-direktnet.de>
+ * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax
+ LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h
- * config/obj-coff.c (c_section_symbol): Clear the LOCAL bit #ifdef
- TE_DELTA.
+Tue Aug 10 12:58:31 1999 Jeffrey A Law (law@cygnus.com)
-Tue Apr 29 20:23:10 1997 Jim Wilson <wilson@cygnus.com>
+ * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section
+ flags for the unwind subspace.
- * config/tc-mips.c (nopic_need_relax): Add new parameter
- before_relaxing. Use it when testing ecoff_extern_size.
- (load_address, macro, md_estimate_size_before_relax): Fix all
- callers.
+ * 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".
-Tue Apr 29 19:54:36 1997 Richard Henderson <rth@tamu.edu>
+Mon Aug 9 20:02:22 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/obj-elf.c (elf_pseudo_table): Add "subsection".
- (obj_elf_subsection): New static function.
+ * config/tc-d30v.c (write_2_short): Don't group repeat instructions
+ with the following instruction unless this was specified.
-Tue Apr 29 19:52:47 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-09 Ian Lance Taylor <ian@zembu.com>
- * config/obj-coff.c (coff_header_append): Don't reset string_size
- each time through the loop.
+ * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for
+ certain sections, to match BFD changes.
-Fri Apr 25 14:17:46 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
- * Makefile.in (DISTSTUFF): Add itbl-parse.h.
+ * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT).
+ (EXTRA_SCRIPTS): Define to keep automake happy.
+ * Makefile.in: Rebuild.
-Fri Apr 25 12:03:15 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
- * doc/internals.texi (Porting GAS): Correct documentation for
- current configure handling of targ-cpu.h, et. al.
- (CPU backend): Document listing macros.
+ * 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.
- * listing.c (data_buffer): Set size based on other listing macros,
- rather than always using 100.
- (data_buffer_size): Remove static variable.
- (calc_hex): Make data_buffer_size a local variable. Don't leave
- any slop when filling data_buffer.
+1999-08-08 Jakub Jelinek <jj@ultra.linux.cz>
-Mon Apr 21 15:33:19 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg.
- * doc/c-mips.texi: Document .set autoextend.
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
-Sat Apr 19 23:09:25 1997 Niklas Hallqvist <niklas@petra.appli.se>
+ * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to
+ avoid problems on DOS filesystems.
+ * Makefile.in: Rebuild.
- * configure.in (i386-*-openbsd*, m68k-*-openbsd*,
- mips-dec-openbsd*, ppc-*-*bsd*, ns32k-pc532-openbsd*,
- sparc-*-openbsd*): New targets.
- * configure: Rebuild.
+ * doc/as.texinfo (Section): Document 's' flag for COFF version.
-Sat Apr 19 22:52:03 1997 Jim Wilson <wilson@cygnus.com>
+1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
- * config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
- for all undefined symbols.
+ * config/obj-coff.c (obj_coff_section): Handle 's' (shared)
+ section flag.
-Fri Apr 18 13:37:35 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
- * config/tc-ppc.c (ppc_fix_adjustable): Handle zero length csects
- correctly.
+ * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT
+ line to create ${GDBINIT} rather than .gdbinit.
+ * configure, Makefile.in, doc/Makefile.in: Rebuild.
-Fri Apr 18 11:51:35 1997 Niklas Hallqvist <niklas@appli.se>
+Fri Aug 6 12:12:44 1999 Jeffrey A Law (law@cygnus.com)
- * configure.in (alpha*-*-openbsd*): New target.
- * configure: Rebuild.
+ * config/tc-hppa.c (pa_ip, case '?'): Add missing break.
-Thu Apr 17 13:59:47 1997 Per Fogelstrom <pefo@openbsd.org>
+Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
- * configure.in (mips-*-openbsd*): New target.
- * configure: Rebuild.
+ * config/tc-hppa.c (pa_ip): Add 64 bit condition completers.
-Tue Apr 15 18:11:44 1997 Gavin Koch <gavin@cygnus.com>
+1999-08-06 Jakub Jelinek <jj@ultra.linux.cz>
- * config/tc-mips.c (insn_uses_reg): Correct test for fpr pairs.
+ * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local
+ non-adjustable symbols.
-Tue Apr 15 13:04:47 1997 Ian Lance Taylor <ian@cygnus.com>
+Thu Aug 5 16:52:51 1999 Jerry Quinn <jquinn@nortelnetworks.com>
- * Makefile.in (srcroot): Remove.
- (INSTALL): Set to @INSTALL@.
- (INSTALL_XFORM, INSTALL_XFORM1): Remove.
- (all, dvi): Don't set srcroot.
- (install): Depend upon as.new, gasp.new, and installdirs. Use
- $(program_transform_name) directly, rather than using
- $(INSTALL_XFORM) and $(INSTALL_XFORM1).
- (installdirs): New target.
- * doc/Makefile.in (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-as): Run mkinstalldirs.
- (install-info-gasp): Likewise.
+ * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix.
-Mon Apr 14 11:59:08 1997 Ian Lance Taylor <ian@cygnus.com>
+Thu Aug 5 23:05:56 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
- * Makefile.in (INSTALL): Change install.sh to install-sh.
+ * config/tc-sh.c (md_assemble): Call as_bad when there are excess
+ operands.
- * symbols.c (resolve_symbol_value): Check for division by zero.
+1999-08-05 Donn Terry <donn@interix.com>
- From Thomas Graichen <graichen@rzpd.de>:
- * Makefile.in: Always use $(SHELL) when running move-if-change.
- * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
+ * config/te-interix.h: New file.
+ * configure.in (i386-*-interix*): New target.
* configure: Rebuild.
-Thu Apr 10 14:40:00 1997 Doug Evans <dje@canuck.cygnus.com>
+Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com)
- * cgen.c (cgen_parse_operand): Renamed from cgen_asm_parse_operand.
- New argument `want'. Update enum cgen_parse_operand_result values.
- Initialize if CGEN_PARSE_OPERAND_INIT.
- * config/tc-m32r.c (md_begin): Set cgen_parse_operand_fn.
- (md_assemble): Call cgen_asm_init_parse.
- Update call to m32r_cgen_assemble_insn, call as_bad if assembly failed.
+ * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte
+ selectors for ELF too.
+ (selector_table): Add "ltp" and "rtp" selectors.
-Wed Apr 9 11:49:41 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-08-04 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-m68k.c (m68k_ip): Handle #j.
+ * 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.
-Tue Apr 8 16:37:57 1997 Jeffrey A Law (law@cygnus.com)
+ * doc/c-i386.texi (i386-16bit): Document .code16gcc.
- * config/tc-mn10300.c (md_convert_frag): Create fixup at the
- right address for call label:32,regs,imm.
+ * config/tc-i386.h (DefaultSize): Define. Renumber following
+ opcode_modifier defines.
-Mon Apr 7 14:58:22 1997 Jeffrey A Law (law@cygnus.com)
+ From Etienne Lorrain <etienne.lorrain@ibm.net>
+ * 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.
- * config/tc-hppa.c (pa_subspace_start): If OBJ_ELF, then always return
- zero.
- * config/tc-hppa.h (tc_frob_symbol): Don't reset the value of the
- symbol for OBJ_ELF anymore.
+1999-08-03 Ian Lance Taylor <ian@zembu.com>
-Mon Apr 7 10:54:59 1997 Doug Evans <dje@canuck.cygnus.com>
+ * config/obj-coff.c (coff_frob_symbol): Always update set_end with
+ next_set_end even if the end symbol is being discarded.
- * Makefile.in: Regenerate dependencies.
- (TARG_CPU): New variable.
- (cgen.o): Depend on cgen.h, $(TARG_CPU)-opc.h.
- (.dep1): Delete creating of cgen-opc.h.
- (.tcdep): Put proper contents in cgen-opc.h.
- * configure.in (m32r): Delete setting of extra_files, extra_links.
- (AC_OUTPUT): Create cgen-opc.h.
- * configure: Regenerated.
-
-Sat Apr 5 13:19:12 1997 Klaus Kaempf <kkaempf@progis.de>
-
- * makefile.vms: Update to build gasp.exe.
-
-Fri Apr 4 16:10:02 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * write.c (relax_frag): Make non-static.
- * write.h (relax_frag): Add prototype for.
- * config/tc-m32r.h (md_do_align): New arg `max'.
- * config/tc-m32r.c (m32r_do_align): Likewise.
- Update calls to frag_align, frag_align_pattern.
- (fill_insn): Update call to m32r_do_align.
- (m32r_scomm): Update call to frag_align.
-
- * config/tc-m32r.[ch]: New files.
- * cgen.c: New file.
- * Makefile.in (CPU_TYPES): Add m32r.
- (TARGET_CPU_CFILES): Add tc-m32r.c.
- (TARGET_CPU_HFILES): Add tc-m32r.h.
- (DISTCLEAN_HERE): Add cgen-opc.h.
- (.dep1,.tcdep): Create empty cgen-opc.h.
- (cgen.o): Add dependencies.
- (dependencies): Regenerate.
- * as.h (struct frag): New member fr_targ.
- (fr_pcrel_adjust,fr_bsr): Move into union fr_targ.ns32k.
- * conf.in (USING_CGEN): New macro.
- * configure.in (m32r-*-*): Add entry for.
- Add cgen.o to extra_objects.
- * configure: Regenerate.
- * frags.c (frag_var): fr_pcrel_adjust renamed to
- fr_targ.ns32k.pcrel_adjust. fr_bsr renamed to fr_targ.ns32k.bsr.
- (frag_variant): Likewise.
- * write.c (relax_frag): Likewise.
- * config/tc-ns32k.c (*): Likewise.
+ * 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.
-Fri Apr 4 13:26:10 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From
+ Ralf Baechle <ralf@uni-koblenz.de>.
- * config/tc-hppa.h (TC_EOL_IN_INSN): Check explicitly for '!',
- rather than for any end of line character.
+1999-08-03 Etienne Lorrain <etienne.lorrain@ibm.net>
- * config/tc-hppa.c (tc_gen_reloc): If hppa_ren_reloc_type fails,
- call abort (i.e., as_abort) rather than crashing.
+ * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop.
- * config/tc-mips.c: Protect uses of STO_MIPS16 with an ifdef of
- OBJ_ELF, rather than of S_GET_OTHER.
+1999-08-03 Alan Modra <alan@spri.levels.unisa.edu.au>
- * Makefile.in (DISTCLEAN_HERE): Add site.exp and site.bak.
+ * 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.
-Thu Apr 3 13:16:18 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
- * Makefile.in (VERSION): Set to 2.8.1.
+ * 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.
- * Branched binutils 2.8.
+1999-07-30 Catherine Moore <clm@cygnus.com>
-Wed Apr 2 12:24:10 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in
+ the relocation's section offset.
- * COPYING: Update FSF address.
+1999-07-29 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-mips.c (mips16_macro): Handle M_DMUL and M_MUL.
+ * write.c (fixup_segment): Fix generic error check overflow test.
-Tue Apr 1 18:29:47 1997 Jim Wilson <wilson@cygnus.com>
+ * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast
+ X_add_number to long.
- * config/tc-mips.c (md_begin): Don't set interlocks for 4100.
+Wed Jul 28 02:04:24 1999 "Jerry Quinn" <jquinn@nortelnetworks.com>
-Tue Apr 1 16:24:28 1997 Klaus Kaempf <kkaempf@progis.de>
+ * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code
+ processing.
- * config-gas.com: Update to handle both vax and alpha.
- * makefile.vms: Update to use config-gas.
- * conf-a-gas.com: Remove file.
+1999-07-27 Ian Lance Taylor <ian@zembu.com>
-Tue Apr 1 16:08:21 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or
+ VTABLE relocations.
- * Makefile.in: Remove unnecessary itbl-parse.h, ibtl-parse.c, and
- itbl-lex.c dependencies. Remove rules for itbl-lex.o,
- itbl-parse.o, and itbl-ops.o; just use the normal .c.o rule.
+1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
-Tue Apr 1 00:07:30 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define.
- * config/tc-m68k.c: Only compile tc_coff_symbol_emit_hook and
- tc_coff_sizemachdep if OBJ_COFF.
+ * configure.bat: Remove; obsolete.
+ * config/go32.cfg: Likewise.
-Mon Mar 31 23:53:44 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+1999-07-21 Brad M. Garcia <bgarcia@fore.com>
- * config/tc-ppc.c (register_name): Declare.
-
-Mon Mar 31 16:31:04 1997 Joel Sherrill <joel@oarcorp.com>
-
- * configure.in (hppa*-*-rtems*): New target, like hppa-*-*elf*.
+ * configure.in (i386-*-vxworks*): New target.
* configure: Rebuild.
-Mon Mar 31 14:15:19 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
- * config/tc-mips.c (mips_pseudo_table): Add "stabn".
- (mips16_mark_labels): New static function.
- (append_insn): Call mips16_mark_labels.
- (mips_emit_delays): Likewise.
- (s_insn): Likewise. Don't call mips_clear_insn_labels.
- (s_mips_stab): New static function.
+ * doc/c-sparc.texi: Document .register and .nword pseudo-ops.
- * configure.in: Use ELF for mips-*-gnu*.
- * configure: Rebuild.
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-Mon Mar 31 14:01:40 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+ * 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.
- * config/tc-m68k.h (TARGET_FORMAT): Set to "coff-m68k-sysv" if
- TE_DELTA.
+1999-07-16 Alan Modra <alan@spri.levels.unisa.edu.au>
-Fri Mar 28 18:03:19 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * 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.
- * configure.in: Add AC_ARG_ENABLE for commonbfdlib. If it is set,
- set OPCODES_LIB to empty.
- * configure: Rebuild.
+1999-07-15 Ian Lance Taylor <ian@zembu.com>
-Fri Mar 28 15:25:24 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * configure.in (sparc-*-linux*aout*, sparc-*-linux*): New
- targets.
+ * configure.in: Bump version number to 2.9.5.
* configure: Rebuild.
-Fri Mar 28 13:08:33 1997 Ian Lance Taylor <ian@cygnus.com>
+ * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long
+ or %llx work.
- * itbl-parse.y (yyerror): Make static. Declare.
+Thu Jul 15 02:45:30 1999 Jeffrey A Law (law@cygnus.com)
- From Ralf Baechle <ralf@gnu.ai.mit.edu>:
- * configure.in: Set emulations for mips-*-linux*-*.
- * configure: Rebuild.
+ * 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-mips.c (struct mips_set_options): Define.
- (mips_opts): New static variable.
- (mips_isa): Remove. Now a field in mips_opts. Change all
- references.
- (mips16, mips16_autoextend, mips_warn_about_macros): Likewise.
- (mips_noreorder, mips_nomove, mips_noat, mips_nobopt): Likewise.
- (struct mips_option_stack): Define.
- (mips_opts_stack): New static variable.
- (s_mipsset): Add support for .set push and .set pop.
- * doc/c-mips.texi: Document .set push and .set pop.
-
- * config/obj-elf.c (obj_elf_section_change_hook): New function.
- * config/obj-elf.h (obj_elf_section_change_hook): Declare it.
- * config/tc-mips.c (s_change_sec): Call it if OBJ_ELF.
-
-Thu Mar 27 12:23:56 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * as.c (parse_args): Update copyright date in version message.
-
- * Makefile.in (clean-here): Remove dependency files.
-
- * read.c (s_comm): Check S_IS_COMMON as well as S_IS_DEFINED.
- (s_mri_common): Check S_IS_COMMON unconditionally.
- * symbols.c (colon): Check S_IS_COMMON as well as S_IS_DEFINED.
- * config/tc-alpha.c (s_alpha_comm): Likewise.
- * config/tc-mips.c (nopic_need_relax): Likewise.
- * config/tc-ppc.c (ppc_elf_lcomm): Likewise.
- (ppc_pe_comm): Likewise.
- * config/obj-elf.c (obj_elf_common): Likewise. Set segment of
- common symbol to bfd_com_section_ptr.
- * config/tc-sparc.c (s_common): Likewise.
- (tc_gen_reloc): Likewise.
+1999-07-14 Philip Blundell <pb@nexus.co.uk>
-Wed Mar 26 13:35:15 1997 H.J. Lu <hjl@lucon.org>
-
- * config/tc-i386.c (tc_i386_fix_adjustable): Only define if
- BFD_ASSEMBLER.
-
-Wed Mar 26 11:32:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * input-scrub.c (input_scrub_next_buffer): Handle very long input
- lines correctly.
-
- * listing.c (print_lines): Add lineno parameter. Change all
- callers.
- (listing_listing): Only call calc_hex for the right line.
- (listing_list): Set the new edict based on the current edict, in
- order to handle listing commands in macros correctly.
+ * 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-mips.c (insn_uses_reg): Map register numbers in mips16
- instructions.
+ * 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.
- * cond.c (cond_finish_check): New function.
- * as.h (cond_finish_check): Declare.
- * as.c (main): Call cond_finish_check.
+1999-07-14 Ian Lance Taylor <ian@zembu.com>
-Mon Mar 24 12:11:18 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-i386.h (iclrKludge): Define.
- * config/tc-i386.c (md_assemble): Handle iclrKludge.
+1999-07-12 Andreas Schwab <schwab@suse.de>
- * config/tc-alpha.h (tc_frob_file_before_adjust): Define if
- OBJ_ECOFF.
- (alpha_frob_file_before_adjust): Declare if OBJ_ECOFF.
- * config/tc-alpha.c (alpha_debug): New static variable.
- (md_parse_option): Set alpha_debug if -g is seen.
- (alpha_frob_file_before_adjust): New function if OBJ_ECOFF.
+ * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED.
-Sat Mar 22 13:44:28 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
- * Makefile.in: Added automatic dependency building.
- * dep-in.sed: New file.
+ * 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.
-Fri Mar 21 15:42:37 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-07-10 Ian Lance Taylor <ian@zembu.com>
- * config/obj-ieee.c (segment_name): Don't define function if this
- is a macro.
+ * 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/obj-coff.h (DO_STRIP): Don't define.
- * config/tc-h8300.h (DO_STRIP): Don't define.
- * config/tc-h8500.h (DO_STRIP): Don't define.
- * config/tc-w65.h (DO_STRIP): Don't define.
- * config/tc-z8k.h (DO_STRIP): Don't define.
+Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
- * symbols.c (colon): Call obj_frob_label if it is defined.
- * config/obj-vms.h (obj_frob_label): Rename from tc_frob_label.
+ * configure.in (hppa*-linux-gnu*): New target.
+ * configure: Rebuilt.
- * configure.in: Don't set files and links. Don't call
- AC_LINK_FILES. Substitute te_file. Create targ-cpu.h,
- obj-format.h, targ-env.h, and itbl-cpu.h in AC_OUTPUT.
- * configure: Rebuild.
- * Makefile.in (TARG_CPU_C): New variable.
- (TARG_CPU_O, TARG_CPU_H): New variables.
- (OBJ_FORMAT_C, OBJ_FORMAT_O, OBJ_FORMAT_H): New variables.
- (TARG_ENV_H, ATOF_TARG_C, ATOF_TARG_O): New variables.
- (SOURCES): Rename from REAL_SOURCES. Delete old definition.
- (LINKED_SOURCES): Remove.
- (HEADERS): Rename from REAL_HEADERS. Delete old definition.
- (LINKED_HEADERS): Remove.
- (OBJS): Use $(TARG_CPU_O), etc., rather than targ-cpu.o, etc.
- ($(OBJS)): Depend upon $(TARG_ENV_H), etc., rather than
- targ-cpu.h, etc.
- ($(TARG_CPU_O), $(OBJ_FORMAT_O) $(ATOF_TARG_O)): New targets.
- (targ-cpu.o, obj-format.o, atof-targ.o): Remove targets.
- (itbl-cpu.h): Remove target.
- (DISTCLEAN_HERE): Remove targ-cpu.c, obj-format.c, atof-targ.c,
- atof-targ.h.
-
-Thu Mar 20 19:18:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/as.texinfo (Symbol Names): Don't use obsolete @ctrl macro.
-
-Thu Mar 20 16:49:14 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * config/tc-m68k.c (mri_chip): Replace calls to get_symbol_end by
- open coded loop that does not require the name to start with a
- name beginner.
-
-Thu Mar 20 13:42:01 1997 H.J. Lu <hjl@lucon.org>
-
- * frags.c (frag_var): Change offset parameter to offsetT.
- (frag_variant): Likewise.
- * frags.h (frag_variant, frag_var): Update declarations.
- * config/tc-m68k.c (struct m68k_it): Change foff field to
- offsetT.
- (add_frag): Change off parameter to offsetT.
- * Several files: Add casts to calls to frag_var.
+1999-07-08 Nick Clifton <nickc@cygnus.com>
- * Makefile.in (m68k-parse.c): Depend upon itbl-parse.c, to
- serialize a parallel make.
- (itbl-parse.h): Split target out from itbl-parse.c.
+ * doc/c-arm.texi (ARM Directives): Document .thumb_set directive.
-Thu Mar 20 12:48:45 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+1999-07-07 Nick Clifton <nickc@cygnus.com>
- * config/m68k-parse.y (motorola_operand): Allow (zdireg,EXPR).
+ * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than
+ accessing symbolP directly.
- * config/te-delta.h (COFF_COMMON_ADDEND): Define.
- * config/obj-coff.c (fixup_segment): Check COFF_COMMON_ADDEND when
- storing the value of a common symbol.
+Tue Jul 6 10:41:42 1999 Jeffrey A Law (law@cygnus.com)
-Wed Mar 19 11:37:57 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+ * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol
+ for ELF.
- * config/obj-coff.c (glue_symbols): Unused variable symbolP
- removed.
- (crawl_symbols): Do not modify symbol_rootP and symbol_lastP here;
- that is done by symbol_remove and symbol_insert.
+1999-07-05 Nick Clifton <nickc@cygnus.com>
- * config/obj-coff.h (S_IS_LOCAL): Return 0 for a debugging
- symbol.
+ * 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.
-Wed Mar 19 11:06:29 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (load_register): In 32 bit mode, when not
- dealing with a 64 bit number, permit the upper 32 bits to be set
- even if bit 31 is not set.
-
-Tue Mar 18 23:30:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (potable): Add "equiv".
- (s_set): Handle .equiv based on argument.
- * doc/as.texinfo (Equiv): New node to document .equiv.
- (Err): New node to document .err.
-
-Tue Mar 18 15:50:13 1997 H.J. Lu <hjl@lucon.org>
-
- * Many files: Add function prototypes.
- * as.c (show_usage, parse_args): Make static.
- * frags.h (frag_alloc): Declare.
- * subsegs.c (subseg_set_rest): Don't declare frag_alloc.
- * symbols.c (dollar_label_instance): Change return type to long.
- * symbols.h (print_symbol_value): Declare.
- (print_expr, print_expr_1, print_symbol_value_1): Declare.
- * write.c (fix_new_exp): Don't declare make_expr_symbol.
- (remove_subsegs, relax_frag): Make static.
- * config/atof-vax.c (atof_vax_sizeof): Change letter to int.
- (what_kind_of_float): Likewise.
- (atof_vax): Make static. Change what_kind to int.
- (md_atof): Change what_statement_type to int.
- * config/obj-ecoff.h (obj_ecoff_set_ext): Declare.
- * config/tc-alpha.c (vax_md_atof): Declare.
- (md_atof): Don't declare atof_ieee and vax_md_atof.
- * config/tc-i386.c (set_16bit_code_flag): Make static.
- * config/tc-i386.h (tc_i386_fix_adjustable): Declare.
- * config/tc-m68k.c (add_fix): Change width to int.
- (insert_reg): Change regname to const.
- (md_atof): Don't declare atof_ieee.
- (demand_empty_rest_of_line): Don't declare.
- * config/tc-m88k.c (md_atof): Don't declare atof_ieee.
- * config/tc-sparc.c (cmp_reg_entry): Change args to const PTR.
- (parse_keyword_arg): Change lookup_fn to take const arg.
- (md_atof): Don't declare atof_ieee.
- * config/tc-sparc.h: Add ifdef for multiple inclusion.
- (tc_aout_pre_write_hook): Don't declare.
-
-Mon Mar 17 11:21:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * as.h (bfd_alloc_by_size_t): Don't declare.
- * Many files: Use xmalloc rather than bfd_alloc_by_size_t.
-
-Sun Mar 16 13:49:21 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * symbols.c (symbol_new): Don't call debug_verify_symchain.
- (symbol_append): Set sy_next and sy_previous when adding a single
- symbol to an empty list. Call debug_verify_symchain.
- (verify_symbol_chain): Use assert, not know.
-
-Sat Mar 15 20:27:12 1997 Fred Fish <fnf@cygnus.com>
-
- * NEWS: Note BeOS support.
- * configure.in: (ppc-*-beos): New target, use coff as object format.
- * configure: Regenerate with autoconf.
+ * doc/c-arm.texi: Document -marmv5 command line option.
-Sat Mar 15 19:14:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (md_apply_fix): Improve error message for out
- of range branch.
-
- * Makefile.in: Add dependencies on obstack.h where needed.
-
-Fri Mar 14 15:33:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (md_estimate_size_before_relax): Handle the
- case of a symbol equated to another symbol when using SVR4_PIC.
-
- * Makefile.in (TARG_CPU_DEP_sparc): Add opcode/sparc.h.
-
-Thu Mar 13 11:20:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (read_a_source_file): Call LISTING_NEWLINE before
- HANDLE_CONDITIONAL_ASSEMBLY when handling an MRI line label.
-
- * config/obj-elf.c (obj_elf_data): Call md_flush_pending_output
- and md_elf_section_change_hook if they are defined.
- (obj_elf_text, obj_elf_previous): Likewise.
-
-Wed Mar 12 11:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-multi.h (struct elf_obj_sy): Define if
- OBJ_MAYBE_ELF.
- (OBJ_SYMFIELD_TYPE): Define as struct elf_obj_sy if
- OBJ_MAYBE_ELF.
- * config/obj-elf.h (struct elf_obj_sy): Don't define if
- OBJ_SYMFIELD_TYPE is defined.
-
- * doc/as.texinfo (bss): Improve description of .bss section. In
- ELF or COFF, you are permitted to switch into the section.
- (Comm): Rewrite description of common symbols.
- (Lcomm): Mention that some targets permit a third argument.
-
-Tue Mar 11 01:13:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-ppc.c (ppc_elf_lcomm): Don't call S_CLEAR_EXTERNAL.
-
- * symbols.c (colon): Change type of local to int. From Alan Modra
- <alan@spri.levels.unisa.edu.au>.
-
- * config/tc-m88k.c (m88k_do_align): Don't use a special nop
- alignment if a zero fill pattern was explicitly specified.
- * config/tc-sh.c (sh_do_align): Likewise.
-
- * read.c (equals): Always permit register names to be redefined.
-
- * config/tc-mips.c (mips_fix_adjustable): Permit a reloc against a
- mips16 symbol to be adjusted if a symbol is being subtracted from
- it.
-
- From Eric Youngdale <eric@andante.jic.com>:
- * config/obj-elf.c (obj_elf_symver): Check for duplicate or
- illegal symbol version names.
- (elf_frob_symbol): Check for external default versions.
-
-Sun Mar 9 23:49:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * config/obj-elf.h (struct elf_obj_sy): Define.
- (OBJ_SYMFIELD_TYPE): Define to elf_obj_sy struct. Change all
- users.
- * config/obj-elf.c (obj_elf_symver): Just record the name.
- (obj_symbol_new_hook): Initialized versioned_name field.
- (elf_frob_symbol): If there is a versioned_name, either rename the
- symbol, or add an alias with that name.
-
-Thu Mar 6 13:55:32 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (md_relax_table): Define.
- (md_convert_frag): Implement.
- (md_assemble): Handle relaxable operands/instructions correctly.
- (md_estimate_size_before_relax): Implement.
- * config/tc-mn10300.h (TC_GENERIC_RELAX_TABLE): Define.
-
- * config/tc-mn10200.c (md_relax_table): Fix typos.
-
- * config/tc-mn10300.c (md_assemble): Don't use any MN10300 specific
- relocs anymore. Tweak fx_offset for pc-relative relocs.
-
-Wed Mar 5 15:46:16 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * cond.c (s_ifc): Call mri_comment_field and mri_comment_end when
- in MRI mode.
-
-Tue Mar 4 10:01:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (equals): Add reassign parameter. Change all callers.
- * read.h (equals): Update declaration.
-
-Sat Mar 1 01:04:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (mips16_extended_frag): Don't assume that we
- can rely on the frag address to determine whether a frag is
- earlier or later.
-
-Fri Feb 28 14:40:00 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * write.h (LOCAL_LABEL): Only define if not BFD_ASSEMBLER.
- (S_LOCAL_NAME): Likewise.
- (FAKE_LABEL_NAME): Define unconditionally.
- * symbols.c (colon): Call bfd_is_local_label, not LOCAL_LABEL, if
- BFD_ASSEMBLER.
- (S_IS_LOCAL): Call bfd_is_local_label_name, not LOCAL_LABEL.
- * config/tc-*.h: Only define LOCAL_LABEL if not BFD_ASSEMBLER.
- Don't define FAKE_LABEL_NAME.
- * config/te-ic960.h: Likewise.
- * config/tc-mips.h (tc_frob_file_before_adjust): Define.
- (mips_frob_file_before_adjust): Declare.
- * config/tc-mips.c (mips_frob_file_before_adjust): New function.
- (mips_local_label): Remove.
-
- * config/te-sco386.h: Remove; not used.
-
-Thu Feb 27 13:29:04 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-m68k.c (md_assemble): Handle a reloc width of 'W'.
+ * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops.
- * gasp.c (hash_add_to_string_table): Correct misspelling in error
- message, and add newline.
- (process_file): Don't process assignments in the label if this is
- a equ or assign pseudo-op.
- (process_pseudo_op): Swap first argument to do_assign for K_ASSIGN
- and K_EQU, to match documentation.
+Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com)
-Thu Feb 27 12:00:03 1997 Michael Meissner <meissner@cygnus.com>
+ * config/tc-hppa.c (pa_ip): Convert the opcode and all completers
+ into lower case.
- * config/obj-coff.c (obj_coff_section): Add 'r' section attribute
- to denote read-only data sections.
+1999-06-27 H.J. Lu <hjl@gnu.org>
-Thu Feb 27 00:26:33 1997 Ian Lance Taylor <ian@cygnus.com>
+ * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for
+ non BFD_ASSEMBLER case.
- * config/obj-elf.c (obj_elf_common): Set BSF_OBJECT in flags.
- * config/tc-sparc.c (s_common): Likewise, if BFD_ASSEMBLER.
+1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
- * expr.c (operand): Simplify 0b handling. Don't treat 0b as a
- binary number if the next character is '+' or '-'.
+ * config/obj-coff.c (obj_coff_section): Mark writable sections as
+ data.
-Wed Feb 26 18:19:00 1997 Stan Shebs <shebs@andros.cygnus.com>
+1999-06-26 David Mosberger <davidm@hpl.hp.com>
- * configure.in (mips*-*-lnews*): New target, also make empty
- emulation list for this target.
- * configure: Update.
- * tc-mips.c (ECOFF_LITTLE_FORMAT): Define.
- (mips_target_format): Use.
- * te-lnews.h: New file.
+ * 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.
-Wed Feb 26 11:56:11 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-23 Nick Clifton <nickc@cygnus.com>
- * Makefile.in (itbl-parse.c itbl-parse.h): Use $(BISON) and
- $(BISONFLAGS), not $(YACC) and $(YACCFLAGS).
+ * 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 <ian@zembu.com>
+
+ * 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 <jlarmour@cygnus.co.uk>
+
+ * 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.
-Tue Feb 25 22:02:23 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com)
- * config/tc-m68k.c (instring): Useless local declaration of
- crack_operand removed.
- * expr.h (expressionS): Changed type of X_op field to operatorT if
- __GNUC__.
+ * 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.
-Tue Feb 25 13:17:27 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-21 Ian Lance Taylor <ian@zembu.com>
- Based on patches from Robert Lipe <robertl@dgii.com>:
- * configure.in: Add i386coff and i386elf to emulation list.
+ * 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 <nickc@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <ian@zembu.com>
+
+ From K. Richard Pixley <rich@noir.com>:
+ * configure.in (ppc-*-vxworks*): New target.
* configure: Rebuild.
- * as.c (i386coff, i386elf): Declare.
- * obj.h (coff_format_ops): Declare.
- * config/obj-coff.c (OBJ_HEADER): Define.
- (coff_obj_symbol_new_hook): Rename from obj_symbol_new_hook.
- (coff_obj_read_begin_hook): Rename from obj_read_begin_hook.
- (obj_pseudo_table): Add "version".
- (coff_pop_insert): New static function.
- (coff_sec_sym_ok_for_reloc): New static function.
- (no_func): New static function.
- (coff_format_ops): New variable.
- * config/obj-coff.h (coff_obj_symbol_new_hook): Declare.
- (obj_symbol_new_hook): Define.
- (coff_obj_read_begin_hook): Declare.
- (obj_read_begin_hook): Define.
- * config/tc-i386.h (i386_target_format): Declare.
- * config/tc-i386.c: Check OBJ_MAYBE_ELF as well as OBJ_ELF; check
- OUTPUT_FLAVOR when appropriate.
- (i386_target_format): New function.
- * Makefile.in (obj-coff.o): New target.
- (e-i386coff.o, e-i386elf.o): New targets.
-
- From Stephen Williams <steve@icarus.icarus.com>:
- * config/tc-i960.h (TC_SYMFIELD_TYPE): Define if OBJ_COFF.
- (_tc_get_bal_of_call): Don't declare.
- (tc_get_bal_of_call): Declare as function, don't define as macro.
- * config/tc-i960.c (tc_set_bal_of_call): If OBJ_COFF, store balP
- in sy_tc field, not x_balntry field.
- (tc_get_bal_of_call): Rename from _tc_get_bal_of_call. Change
- return type to symbolS *. If OBJ_COFF, retrieve value from sy_tc
- field, not x_balntry field.
-
- * config/obj-elf.c (obj_elf_section): Permit a .note section to
- have the SHF_ALLOC attribute.
-
- * Makefile.in ($(OBJS)): Don't depend upon $(IT_HDRS).
- (TARG_CPU_DEP_mips): Depend upon $(srcdir)/itbl-ops.h.
- (itbl-lex.o): Depend upon itbl-parse.h.
-
- * itbl-parse.y (yyerror): Change return type to int. Change to
- use old style function declaration.
-
- * Makefile.in (itbl-lex.o): Remove -Wall.
- (itbl-parse.o): Likewise.
-
- * cond.c (s_ifdef): If we should omit conditionals from listings,
- call listing_list.
- (s_if, s_ifc, s_endif, s_else, s_ifeqs): Likewise.
- * listing.c (list_info_struct): Add EDICT_NOLIST_NEXT.
- (listing_listing): Handle EDICT_NOLIST_NEXT.
- (listing_list): An argument of 2 means EDICT_NOLIST_NEXT.
- * listing.h (LISTING_NOCOND): Define.
- (LISTING_SKIP_COND): Define.
- * as.c (show_usage): Mention c as a suboption of -a.
- (parse_args): Handle c as a suboption of -a.
- * doc/as.texinfo: Document -alc.
-
-Mon Feb 24 18:27:43 1997 Eric Youngdale <eric@andante.jic.com>
-
- * doc/as.texinfo: Document .symver.
-
-Mon Feb 24 15:19:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/tc-d10v.c: Change pre_defined_registers to
- d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
-
-Mon Feb 24 10:40:45 1997 Fred Fish <fnf@cygnus.com>
-
- * config/obj-coff.c: Fix typo in comment section.
-
-Mon Feb 24 02:23:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * Makefile.in: Remove dependancies on itbl-cpu.h.
- * as.c: Define stubs for itbl_parse and itbl_init if HAVE_ITBL_CPU
- is not defined.
-
-Mon Feb 24 02:03:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * itbl-ops.h: Include as.h.
-Mon Feb 24 01:04:00 1997 Dawn Perchik <dawn@cygnus.com>
+1999-06-12 Philip Blundell <philb@gnu.org>
- * as.c: Remove -t option.
- * configure, configure.in: Move itbl-cpu.h to mips specific configure.
- * itbl-ops.h: Include itbl-cpu.h only if HAVE_ITBL_CPU is defined.
- * config/tc-mips.h: Define HAVE_ITBL_CPU.
+ * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs.
-Sun Feb 23 18:01:00 1997 Dawn Perchik <dawn@cygnus.com>
+1999-06-13 Ian Lance Taylor <ian@zembu.com>
- * itbl-ops.c: Don't define DEBUG.
+ * 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.
-Sun Feb 23 17:49:00 1997 Dawn Perchik <dawn@cygnus.com>
+1999-06-12 Ian Lance Taylor <ian@zembu.com>
- * Makefile.in: Update itbl-test.c to reflect its new location.
-
-Sun Feb 23 15:50:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * itbl-ops.c: Add test for itbl_have_entries.
- * config/tc-mips.c: Remove test for itbl_have_entries.
- * config/tc-mips.h: Define tc_init_after_args to mips_init_after_args.
-
-Sun Feb 23 18:13:19 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (DISTSTUFF): Remove itbl-parse.y, itbl-lex.l, and
- itbl-ops.c. Add itbl-parse.c and itbl-lex.c.
- (LEX, LEXFLAGS): Define.
- * itbl-ops.c (append_insns_as_macros): Remove bogus ASSERT.
-
-Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * itbl-parse.y: Fix indentation mistakes from indent program.
- * itbl-lex.l: Fix indentation mistakes from indent program.
- * itbl-ops.h: Add include for ansidecl.h.
- Add PARAMS around function arguments.
- Add declaration for itbl_have_entries.
- * itbl-ops.c: Add PARAMS around function arguments.
- * Makefile.in: Add itbl build rules.
- Add dependancies for itbl files to mips target.
- * as.c: Add itbl support.
- Add new option "--insttbl" for dynamically extending instruction set.
- * as.h: Declare insttbl_file_name;
- the name of file defining extensions to the basic instruction set
- * configure.in, configure: Add itbl-parse.o, itbl-lex.o, and
- itbl-ops.o to extra_objects for mips configuration.
- Add include file link from itbl-cpu.h to
- config/itbl-${target_cpu_type}.h.
- * config/tc-mips.c: Allow copz instructions.
- Add notes for future additions to the itbl support.
- Add debug macros.
- (macro): Call itbl_assemble to assemble itbl instructions.
- See if an unknown register is specified in an itbl entry.
-
-Sat Feb 22 20:53:01 1997 Fred Fish <fnf@cygnus.com>
- * doc/internals.texi (CPU backend): Fix typo in md_section_align
- description.
-
-Fri Feb 21 14:34:31 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c (md_pcrel_from_section): Return 0 if
- relocation is in different section. Fixes PR11574.
-
-Fri Feb 21 10:08:25 1997 Jim Wilson <wilson@cygnus.com>
-
- * tc-mips.c (mips_ip): If configured for an embedded ELF system,
- don't set the section alignment to 2**4.
-
-Fri Feb 21 11:55:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-m68k.c (line_comment_chars): Add '*'.
+ * 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.
- * app.c (LEX_IS_TWOCHAR_COMMENT_2ND): Don't define.
- (do_scrub_begin): Don't set lex['*'].
- (do_scrub_chars): When handling LEX_IS_TWOCHAR_COMMENT_1ST, don't
- check for LEX_IS_TWOCHAR_COMMENT_2ND. Instead, just check for
- a literal '*'.
+1999-06-12 David O'Brien <obrien@freebsd.org>
- * configure.in: Set em=svr4 for m68k-*-sysv4*.
+ * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF.
* configure: Rebuild.
- * config/te-svr4.h: New file.
- * config/tc-m68k.c (m68k_comment_chars): Only include `#' if
- TE_SVR4 or TE_DELTA.
-
-Thu Feb 20 22:24:39 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10200.c (md_convert_frag): Create a fixup for the
- short conditional branch around a long unconditional branch.
-
-Thu Feb 20 13:56:00 1997 Ian Lance Taylor <ian@cygnus.com>
- * config/obj-coff.c (obj_coff_ln [both versions]): Call
- new_logical_line.
+1999-06-12 Ian Lance Taylor <ian@zembu.com>
- * config/tc-arm.c (fix_new_arm): Use make_expr_symbol to handle a
- complex expression.
-
- * symbols.c (resolve_symbol_value): If both left and right
- operands are undefined, warn about both of them.
-
-Wed Feb 19 00:53:28 1997 Ian Lance Taylor <ian@cygnus.com>
+ * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>.
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
- Based on patches from Eric Youngdale <eric@andante.jic.com>:
- * config/obj-elf.c (elf_pseudo_table): Add "symver".
- (obj_elf_symver): New static function.
- * config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Copy the st_other
- field.
+ * config/tc-i386.c (i386_immediate): Remove unused label
+ seg_unimplemented.
- * write.c (relax_segment): Make type and printf format agree.
+ * 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.
- * read.c (get_line_sb): Don't end the line on a semicolon inside a
- string.
+ * 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.
-Sun Feb 16 17:47:29 1997 Fred Fish <fnf@cygnus.com>
+1999-06-11 Ian Lance Taylor <ian@zembu.com>
- * config/tc-alpha.h (md_operand): Define with a null expansion,
- like all the other targets.
- * doc/internals.texi (CPU backend): Add missing word in
- md_flush_pending_output description. Fix typo in md_convert_frag
- description.
-
-Fri Feb 14 18:09:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+ * dwarf2dbg.h: Use PARAMS in function declarations.
- * config/tc-m68k.c (LOCAL_LABEL): Macro redefined if TE_DELTA.
- (tc_canonicalize_symbol_name): Macro defined if TE_DELTA.
- * config/obj-coff.c (obj_coff_def): Use
- tc_canonicalize_symbol_name if defined.
- (obj_coff_tag, obj_coff_val): Likewise.
- * expr.c (operand): Reject '~' as operator if is_name_beginner.
+1999-06-11 Martin Dorey <mdorey@madge.com>
-Fri Feb 14 17:24:48 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- Based on notes from Peter Eriksson <peter@ifm.liu.se>. The target
- does not actually work, though:
- * configure.in (i386-sequent-bsd*): New target.
- * configure: Rebuild.
- * config/tc-dynix.h: New file.
- * config/tc-i386.h: Define TARGET_FORMAT if TE_DYNIX.
-
- * read.c (do_align): Add max parameter. Change all callers.
- Remove useless static variables.
- (s_align): New static function. Do common portion of
- s_align_bytes and s_align_ptwo.
- (s_align_bytes, s_align_ptwo): Just call s_align.
- * frags.c (frag_align): Add max parameter. Change all callers.
- (frag_align_pattern): Likewise.
- * frags.h (frag_align, frag_align_pattern): Update declarations.
- * write.c (relax_segment): Limit alignment change to fr_subtype.
- Fix some types to be addressT.
- * config/obj-coff.c (size_section): Likewise.
- * config/obj-ieee.c (size_section): Likewise.
- * config/tc-d10v.h (md_do_align): Add max parameter.
- * config/tc-i386.h (md_do_align): Likewise.
- * config/tc-m88k.h (md_do_align): Likewise.
- * config/tc-m88k.c (m88k_do_align): Likewise.
- * config/tc-sh.h (md_do_align): Likewise.
- * config/tc-sh.c (sh_do_align): Likewise.
- * as.h: Improve comments on rs_align and rs_align_code.
- * doc/as.texinfo: Document new alignment arguments.
- * doc/internals.texi (Frags): Document use of fr_subtype field for
- rs_align and rs_align_code.
+1999-06-11 Ian Lance Taylor <ian@zembu.com>
-Fri Feb 14 15:56:06 1997 Gavin Koch <gavin@cygnus.com>
+ * config/tc-i386.c (md_apply_fix3): Add default case to switch.
- * config/tc-mips.c: Changed opcode parsing.
+ * config/tc-sparc.c (md_pseudo_table): Remove pushsection and
+ popsection.
-Thu Feb 13 20:02:16 1997 Fred Fish <fnf@cygnus.com>
+ * config/tc-sparc.c (sparc_ip): Add default case to reloc switch.
- * config/{tc-alpha.h, tc-d10v.h, tc-generic.h, tc-i960.h,
- tc-mn10200.h, tc-mn10300.h, tc-sh.h, tc-vax.h, tc-w65.h}:
- Add default definition of zero for TARGET_BYTES_BIG_ENDIAN.
- * config/{tc-arm.h, tc-hppa.h, tc-i386.h, tc-mips.h, tc-ns32k.h,
- tc-ppc.h, tc-sparc.h}: Move definition of TARGET_BYTES_BIG_ENDIAN
- to a location consistent with the rest of the target include files.
- * config/tc-i386.c: Remove misleading comment.
- * doc/internals.texi (CPU backend): Add description of function
- md_undefined_symbol.
-
-Thu Feb 13 21:44:18 1997 Klaus Kaempf <kkaempf@progis.de>
-
- * as.h: GNU c provides unlink() function.
-
- Unify section handling on openVMS/Alpha:
- * config/tc-alpha.c(s_alpha_link): Remove.
- (s_alpha_section): New function.
- Remove case-hacking of symbols
- Add .code_address pseudo-op.
- (BFD_RELOC_ALPHA_CODEADDR): New relocation.
- (s_alpha_code_address): New function.
- (alpha_ctors_section, alpha_dtors_section): New sections for C++
- static constructors/destructors.
- Add debug code for crash debugs, to be removed when traceback code
- is added to object code.
- (s_alpha_name): New function for .name pseudo-op.
- (alpha_print_token): New function to print token expressions with
- alpha specific extensions.
-
- * makefile.vms: Allow compilation with current gcc snapshot.
-
-Thu Feb 13 16:29:04 1997 Fred Fish <fnf@cygnus.com>
-
- * doc/Makefile.in (TEXI2DVI): Set to just name of program.
- (DVIPS): Set to dvips.
- (ps, as.ps, gasp.ps): New targets.
- (internals.info, gasp.dvi, internals.dvi): Set both TEXINPUTS
- and MAKEINFO env variables.
- (internals.ps): Use DVIPS macro.
- (clean): Remove core and backup files.
- (distclean): Remove temporary files from building internals.
- (clean-dvi): Ditto.
- * doc/internals.texi (Frags): Fix typo.
- (GAS processing): Ditto.
- (CPU backend): Ditto.
- * ecoff.c (init_file): Use TARGET_BYTES_BIG_ENDIAN value directly.
- * mpw-config.in: Define TARGET_BYTES_BIG_ENDIAN as 1.
- * read.c: Remove ugly hack that dealt with config files not
- correctly defining TARGET_BYTES_BIG_ENDIAN.
- (target_big_endian): Use TARGET_BYTES_BIG_ENDIAN directly.
- * config/arm-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1.
- * config/arm-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0.
- * config/mips-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1.
- * config/mips-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0.
- * config/ppc-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 1.
- * config/ppc-sol.mt: Replace TARGET_BYTES_LITTLE_ENDIAN
- with TARGET_BYTES_BIG_ENDIAN defined to 0.
- * config/tc-arm.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN
- and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just
- whether it is defined or not.
- * config/tc-mips.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN.
- * config/tc-ppc.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN
- and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just
- whether it is defined or not.
-
-Thu Feb 13 14:40:16 1997 Doug Evans <dje@canuck.cygnus.com>
+ * read.c (read_a_source_file): Only declare inescape if
+ QUOTES_IN_INSN.
- * write.c (write_relocs): Correct text in as_fatal error message,
- bfd_perform_relocation -> bfd_install_relocation.
+ * itbl-ops.c (itbl_disassemble): Change sprintf format strings to
+ match parameters.
+ (find_entry_byval): Add parens to avoid warning.
-Thu Feb 13 14:48:03 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+ * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h".
- * config/tc-m68k.c (LEX_TILDE): Define if TE_DELTA.
- * read.c (LEX_TILDE): Define if not defined.
- (lex_type): Use LEX_TILDE.
- * expr.c (get_symbol_end): Check first char with is_name_beginner,
- not is_part_of_name.
+ * symbols.c (resolve_symbol_value): Don't permit subtraction of
+ undefined symbols.
-Thu Feb 13 11:40:58 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
- * config/tc-sparc.c (md_show_usage): Add missing backslash at end
- of continued line.
+ * config/tc-sparc.c (sparc_ip): Don't use side-effect expression
+ with isoctal.
- * config/tc-mips.c (mips16_extended_frag): Correct base address
- for an extended PC relative instruction.
- (md_convert_frag): Likewise.
+ * 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.
- * config/tc-mips.c (prev_nop_frag): New static variable.
- (prev_nop_frag_holds): New static variable.
- (prev_nop_frag_required): New static variable.
- (prev_nop_frag_since): New static variable.
- (append_insn): If we aren't reordering, and prev_nop_frag is not
- NULL, and we don't need any nops, then decrease the size of
- prev_nop_frag. Don't insert nops because of instructions in
- noreorder sections. Remember whether the previous instructions
- where in noreorder sections even when not reordering.
- (mips_no_prev_insn): Add preserver parameter. Change all
- callers. Refer prev_nop_frag variables when appropriate.
- (mips_emit_delays): Set up prev_nop_frag.
- (s_mipsset): Clear prev_nop_frag if reordering.
-
-Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (append_insn): Remove useless code which
- handled swapping a mips16 jump with a mips16 instruction with a
- reloc.
-
- * config/tc-mips.c (md_parse_option): When debugging, set
- mips_optimize to 1, not 0.
-
- * config/tc-mips.c (mips16_ip): Handle an extend operand.
-
- * config/tc-mips.c (my_getExpression): In mips16 mode, if it looks
- like the expression was based on `.', adjust the value of the
- symbol.
+1999-06-10 Ian Lance Taylor <ian@zembu.com>
- * config/tc-mips.c (append_insn): Warn about an attempt to put an
- extended instruction in a delay slot when not reordering.
- (md_convert_frag): Warn if an extended instruction appears in a
- delay slot.
+ Based on patches from John W. Woznack <jwoznack@concentric.net>:
+ * 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-mips.c (mips_pseudo_table): Add "insn".
- (s_insn): New static function.
- * doc/c-mips.texi: Document .insn.
+ * symbols.c (copy_symbol_attributes): Convert local symbols to
+ regular symbols.
- * config/tc-mips.c (md_begin): Add the general registers to the
- symbol table.
- (mips16_ip): First parse the expression, and then see whether it
- came up with a register, rather than trying to first see whether
- we are looking at a register.
+1999-06-10 Nick Clifton <nickc@cygnus.com>
-Tue Feb 11 15:52:22 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (md_parse_option): Add support for ARM920 and
+ ARM920t.
- * config/tc-mips.c (mips16_ip): Handle %gprel modifier.
- (md_apply_fix): Handle BFD_RELOC_MIPS16_GPREL.
+1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
- * config/tc-mips.c (append_insn): Output jump instruction as a
- pair of 2 byte instructions, rather than as a single 4 byte
- instruction.
+ * 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.
-Mon Feb 10 22:06:00 1997 Dawn Perchik (dawn@cygnus.com)
+1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
- * itbl-ops.c, itbl-lex.l, itbl-parse.y, itbl-ops.h,
- config/itbl-mips.h: Add copyright message and fix indentation.
+ * 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 Feb 10 18:09:00 1997 Dawn Perchik (dawn@cygnus.com)
+Mon Jun 7 10:22:16 1999 Richard Henderson <rth@cygnus.com>
- * itbl-ops.c: New file. Add support for dynamically read
- instruction registers, opcodes and formats. Build internal table
- for new instructions and provide callbacks for assembler and
- disassembler.
- * itbl-lex.l, itbl-parse.y: Lex and yacc parsers for instruction
- spec table.
- * itbl-ops.h: New file. Header file for itbl support.
- * config/itbl-mips.h: New file. Mips specific definitions for
- itbl support.
+ * expr.h (struct expressionS): Revert last change; widen X_op.
+ * config/tc-alpha.c (md_begin): Check the field is wide enough.
-Fri Feb 7 09:52:34 1997 Jeffrey A Law (law@cygnus.com)
+Mon Jun 7 11:25:16 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
- * config/tc-mn10200.c (md_assemble): If a constant operand won't
- fit into the constant field of a relaxable operand, then it does
- not match.
+ * 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.
-Thu Feb 6 20:08:12 1997 Jeffrey A Law (law@cygnus.com)
+ * 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'.
- * config/tc-mn10200.c (md_estimate_size_before_relax): Treat
- a jsr target in a different section just like a jsr to
- an undefined target.
+1999-06-06 Richard Henderson <rth@cygnus.com>
-Thu Feb 6 16:52:57 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-elf.c (obj_elf_section): Don't free the return
+ value of demand_copy_C_string.
- * config/tc-mips.c (mips_fix_adjustable): Don't adjust relocations
- against any mips16 symbols, not just externally visible ones.
- (md_apply_fix): Corresponding change.
+1999-06-05 Richard Henderson <rth@cygnus.com>
-Wed Feb 5 11:11:06 1997 Ian Lance Taylor <ian@cygnus.com>
+ * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol
+ creation logic from obj_elf_create_section.
- * config/tc-mips.c (mips16_ip): Accept floating point registers in
- the operand of the exit instruction.
+ * 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.
-Tue Feb 4 14:12:39 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * symbols.c (resolve_symbol_value): If we leave an equated symbol
- as O_symbol, copy over the segment.
+1999-06-05 Richard Henderson <rth@cygnus.com>
-Mon Feb 3 12:35:54 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-mips.c (md_apply_fix): If we aren't adjusting this
- fixup to be against the section symbol, adjust the value
- accordingly.
+ * 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.
- * symbols.c (resolve_symbol_value): Don't change X_add_number for
- an equated symbol.
- * write.c (write_relocs): Avoid looping on equated symbols.
- Adjust fx_offset by X_add_number for each symbol.
- * config/obj-coff.c (do_relocs_for): Avoid looping on equated
- symbols.
- (fixup_segment): Add a loop to track down equated symbols and
- adjust fx_offset appropriately.
+1999-06-04 Mark Klein <mklein@dis.com>
-Fri Jan 31 15:21:02 1997 Jeffrey A Law (law@cygnus.com)
+ * 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-mn10200.c (md_relax_table): Add entries to allow
- jmp -> bra relaxing.
- (md_convert_frag): Handle jmp->bra relaxing.
- (md_assemble): Handle jmp->bra relaxing.
- (md_estimate_size_before_relax): Likewise.
+ * config/tc-hppa.c: Update for symbol handling changes.
-Fri Jan 31 13:15:05 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
+1999-06-03 Ian Lance Taylor <ian@zembu.com>
- * config/tc-i386.c (i386_align_code): Add comments explaining the
- nop instructions.
+ * cgen.c: Update for symbol handling changes.
+ * config/tc-m32r.c: Likewise.
-Fri Jan 31 10:46:14 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.h: Update for symbol handling changes.
+ * config/tc-hppa.c: Likewise.
- * config/tc-sparc.c (enforce_aligned_data): New static variable.
- (sparc_cons_align): Don't do anything unless enforce_aligned_data
- is set.
- (md_longopts): Add "enforce-aligned-data".
- (md_show_usage): Mention --enforce-aligned-data.
- * doc/c-sparc.texi (Sparc-Aligned-Data): New node; document
- enforce-aligned-data.
+ * config/tc-arm.h: Update for symbol handling changes.
+ * config/tc-arm.c: Likewise.
+ (symbol_make_empty): Remove. Just use symbol_create.
- * config/tc-ppc.c (md_pseudo_table): If OBJ_XCOFF, add "long",
- "word", and "short".
- (ppc_xcoff_cons): New static function.
+ * symbols.c (symbol_set_tc): Correct name.
- * write.c (relax_segment): Give an error if a .space symbol is
- common or undefined.
+ * 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.
- * read.c (read_a_source_file): Don't handle mri_pending_align if
- the handler is s_globl or s_ignore.
+ * doc/internals.texi (Symbols): Describe changes in symbol
+ handling.
-Thu Jan 30 11:46:59 1997 Fred Fish <fnf@cygnus.com>
+1999-06-03 Richard Henderson <rth@cygnus.com>
+
+ * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol
+ instead of doing the work by hand.
+
+1999-06-03 David Mosberger <davidm@hpl.hp.com>
+
+ * 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 <davidm@hpl.hp.com>
+
+ * 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 <ian@zembu.com>
+
+ 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 <nickc@cygnus.com>
+
+ * 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 <devans@canuck.cygnus.com>
+
+ -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 <tege@matematik.su.se>
+
+ * 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 <linus.nordberg@canit.se>
+
+ * 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 <mdorey@madge.com>
+
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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
- * config/tc-d10v.c (find_opcode): Remove unused variable "numops".
+ From Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * 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.
-Thu Jan 30 12:28:18 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
+Fri May 14 10:52:13 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
- * config/tc-i386.c (i386_align_code): Improve the nop patterns.
+ * config/atof-ieee.c (gen_to_words): Correctly round a
+ denormalized number. Fix off-by-one in range checking for
+ exponent in a denormal.
-Thu Jan 30 12:08:40 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-05-10 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (mips_fix_adjustable): New function.
- * config/tc-mips.h (tc_fix_adjustable): Call mips_fix_adjustable.
- (mips_fix_adjustable): Declare.
+ * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register
+ name.
- Ideas from Srinivas Addagarla <srinivas@cdotd.ernet.in>:
- * read.c (read_a_source_file): After doing an mri_pending_align,
- adjust the line_label if there is one.
- (s_space): Set mri_pending_align if an odd number of bytes were
- output.
+Thu May 13 09:46:59 1999 Joel Sherrill (joel@OARcorp.com)
-Wed Jan 29 15:31:12 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets.
- * config/tc-d10v.h (md_do_align): Add this hook to call
- d10v_cleanup() when a ".align" is detected. Fixes PR11487.
+1999-05-12 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-d10v.c (find_opcode): Correctly calculate
- branch displacement when .aligns are present.
+ * 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.
-Wed Jan 29 09:42:11 1997 Jeffrey A Law (law@cygnus.com)
+ From Doug Ledford <dledford@redhat.com>
+ * config/tc-i386.h (RegXMM): New for P/III.
+ * config/tc-i386.c: Add support for P/III.
- * config/tc-mn10200.c (md_relax_table): Define.
- (md_convert_frag): Implement.
- (md_assemble): Handle relaxable operands/instructions correctly.
- (md_estimate_size_before_relax): Implement.
- * config/tc-mn10200.h (TC_GENERIC_RELAX_TABLE): Define.
+Sat May 8 23:28:50 1999 Richard Henderson <rth@cygnus.com>
-Tue Jan 28 15:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-mips.c (append_insn): Give an error for jumps to a
- misaligned address.
- (md_apply_fix): Make a branch to an odd address an error rather
- than a warning.
+Thu May 6 23:13:39 1999 Richard Henderson <rth@cygnus.com>
- * config/tc-mips.c (md_convert_frag): If the user explicitly
- requested an extended opcode, pass warn as true to mips16_immed.
+ * config/tc-i386.c (i386_immediate): Skip whitespace before
+ complaining about junk after expression.
+ (i386_displacement): Likewise.
- * config/tc-mips.c (mips16_ip): Handle a missing expression like
- an explicit 0, so that explicitly extended instructions work
- correctly.
+Thu May 6 19:50:14 1999 Richard Henderson <rth@cygnus.com>
-Mon Jan 27 17:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
+ * symbols.c (symbol_find_base): Use memcpy instead of strcpy.
+ Don't copy before downcaseing.
- * ecoff.c (ecoff_build_symbols): Don't generate a local ECOFF
- symbol for a common symbol.
+1999-05-05 Catherine Moore <clm@cygnus.com>
+
+ * 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)
-Wed Jan 22 10:39:39 1997 Doug Evans <dje@canuck.cygnus.com>
+ * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a
+ 17 bit fmt insn.
- Patch presumed to have been checked in awhile ago but wasn't.
- Mon Nov 25 10:45:14 1996 Doug Evans <dje@seba.cygnus.com>
- * write.c: Delete "ifndef md_relax_frag" around is_dnrange.
- (relax_segment, case rs_org): Move code inside braces. Move locals
- target,after inside too.
- (relax_segment, case rs_machine_dependent): Guts moved to ...
- (relax_frag): New function.
- Call md_prepare_relax_scan if defined.
+1999-04-30 Nick Clifton <nickc@cygnus.com>
-Mon Jan 20 10:56:47 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * config/tc-mcore.c (mcore_s_section): Dump literals before
+ changing section.
- * config/tc-m68k.c (m68k_ip): Reject pc-relative addresses for the
- 'p' operand specifier.
+1999-04-29 Nick Clifton <nickc@cygnus.com>
-Mon Jan 20 10:39:36 1997 J.T. Conklin <jtc@cygnus.com>
+ * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn
+ for COFF/PE port.
- * config/tc-m68k.c (HAVE_LONG_BRANCH): New macro, returns true for
- m68k family cpus which support long branch addressing modes.
- (m68k_ip, md_convert_frag_1, md_estimate_size_before_relax,
- md_create_long_jump): Use it.
+Mon Apr 26 12:34:37 1999 Doug Evans <devans@canuck.cygnus.com>
-Mon Jan 20 12:42:06 1997 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-mips.c (md_begin): Don't set SEC_ALLOC or SEC_LOAD for
- the .reginfo or .MIPS.options section if configured for an
- embedded target.
+ * 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-mips.c (md_begin): Don't set interlocks for
- mips_4650.
+ * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused.
-Wed Jan 15 13:51:50 1997 Ian Lance Taylor <ian@cygnus.com>
+1999-04-26 Tom Tromey <tromey@cygnus.com>
- * read.c (read_a_source_file): Make sure the symbol ends with
- whitespace before checking whether the next character is '='.
+ * aclocal.m4, configure: Updated for new version of libtool.
-Tue Jan 14 15:07:27 1997 Robert Lipe <robertl@dgii.com>
+1999-04-22 Nick Clifton <nickc@cygnus.com>
- * config/tc-i386.c (sco_id): Moved from here...
- * config/obj-elf.c (sco_id): ...to here. Adding the identifier
- really is an SCO ELF specific thing, not just a SCO x86 specific
- thing.
+ * 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.
-Thu Jan 9 09:08:43 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mcore.h (MD_APPLY_FIX3): Define.
- * read.c (emit_expr): Check for overflow of a negative value
- correctly.
- * write.c (fixup_segment): Likewise.
- * config/obj-coff.c (fixup_segment): Likewise.
+1999-04-20 Nick Clifton <nickc@cygnus.com>
- * config/tc-m68k.c (struct label_line): Define.
- (labels, current_label): New static variables.
- (md_assemble): Mark current_label as text, and clear it.
- (m68k_frob_label): New function.
- (m68k_flush_pending_output): New function.
- (m68k_frob_symbol): New function.
- * config/tc-m68k.h (tc_frob_label): Define.
- (md_flush_pending_output): Define.
- (tc_frob_symbol): Don't warn, just call m68k_frob_symbol.
- (tc_frob_coff_symbol): Likewise.
+ * 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.
- * read.c (read_a_source_file): When defining a macro in MRI mode,
- don't add the symbol to the symbol table.
+1999-04-18 Ian Lance Taylor <ian@zembu.com>
-Tue Jan 7 11:21:42 1997 Jeffrey A Law (law@cygnus.com)
+ * 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-mn10300.c (tc_gen_reloc): Handle sym1-sym2 fixups
- here since fixup_segment doesn't (linkrelax is set).
- * config/tc-mn10200.c (tc_gen_reloc): Likewise.
+ * config/tc-alpha.c (find_opcode_match): Add default case to
+ switch.
+ (find_macro_match): Likewise.
+ (load_expression): Parenthesize && within ||.
-Mon Jan 6 15:19:32 1997 Jeffrey A Law (law@cygnus.com)
+ * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
- * config/tc-mn10200.c (md_assemble): Tweak fx_offset for pc-relative
- relocs.
+1999-04-17 Nick Clifton <nickc@cygnus.com>
-Fri Jan 3 16:47:08 1997 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * config/tc-hppa.c (struct hppa_fix_struct): Tweak fx_r_field's type
- to avoid warnings with the native HP compiler.
- (fix_new_hppa): Similarly for the r_type argument.
- (pa_build_unwind_subspace, hppa_elf_mark_end_of_function): Enclose
- in an #if OBJ_ELF to keep gcc -Wall quiet.
- (md_apply_fix): Always initialize "result".
+1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
- * config/tc-mn10200.c (md_assemble): Generate relocations.
+ * 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 Jan 3 18:17:23 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+Fri Apr 16 12:26:39 1999 Bob Manson <manson@charmed.cygnus.com>
- * config/tc-m68k.c (s_even): Adjust the alignment of the current
- section.
+ * config/obj-coff.c (c_section_symbol): Fix typo in previous
+ change.
-Fri Jan 3 17:10:33 1997 Richard Henderson <rth@tamu.edu>
+1999-04-16 Nick Clifton <nickc@cygnus.com>
- * config/obj-elf.c (elf_file_symbol): When using ECOFF debugging,
- pass on the new file hook.
+ * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1.
- * config/tc-alpha.c (alpha_fix_adjustable): Not quite the same as
- !alpha_force_relocation, as local LITERALs can be adjusted to be
- relative to the section.
+Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com)
-Fri Jan 3 12:09:24 1997 Ian Lance Taylor <ian@cygnus.com>
+ * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3"
+ expressions correctly.
- * config/obj-coff.c (yank_symbols): If tc_frob_coff_symbol is
- defined, call it.
- * config/tc-m68k.h (tc_frob_symbol): Check whether text label is
- aligned to odd boundary.
- (tc_frob_coff_symbol): Define.
- * doc/as.texinfo (Set): Change parenthesized @xref to @pxref.
+1999-04-15 Gavin Romig-Koch <gavin@cygnus.com>
- * macro.c (macro_expand_body): In MRI mode, just copy a single &.
+ * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH.
- * config/tc-m68k.c (m68k_ip): Call frag_grow before adding a
- PCINDEX frag. From Ronald F. Guilmette <rfg@monkeys.com>.
+Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com)
- * config/tc-m68k.c (m68k_ip): Accept 'B' as a size for an
- immediate value.
- (md_assemble): If the size is 'B', set fx_signed.
- (md_apply_fix_2): Use fx_signed when checking for overflow.
+ * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd
+ and fmpynfadd instructions.
- * write.h (struct fix): Add fx_signed field.
- * write.c (fix_new_internal): Initialize fx_no_overflow and
- fx_signed fields.
- (fixup_segment): Use fx_signed when checking for overflow.
- * config/obj-coff.c (fixup_segment): Check fx_no_overflow and
- fx_signed when checking for overflow.
+1999-04-11 Richard Henderson <rth@cygnus.com>
-Thu Jan 2 13:37:29 1997 Ian Lance Taylor <ian@cygnus.com>
+ * as.h (environ): Declare it, if needed.
+ * as.c (dump_statistics): Don't declare environ.
+ * configure.in (environ): Detect declaration.
+ * configure, config.in: Rebuild
- * NOTES, NOTES.config: Removed. These are rarely, if ever,
- updated, and all the useful information is in doc/internals.texi.
+ * config/tc-i386.c (i386_immediate): Accept @GOT relocations.
+ (i386_displacement): Allocate enough space for replacement buffer.
+ Clean up replacement buffer initialization.
- Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
- * read.c (read_a_source_file): Check for conditional operators
- before doing an MRI pending alignment.
- * config/tc-m68k.h (m68k_conditional_pseudoop): Declare.
- (tc_conditional_pseudop): Define.
- * config/tc-m68k.c (m68k_conditional_pseudop): New function.
- * doc/internals.texi (CPU backend): Describe
- tc_conditional_pseudoop.
+1999-04-11 Bob Manson <manson@charmed.cygnus.com>:
- Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
- * config/tc-m68k.c (m68k_rel32_from_cmdline): New static
- variable.
- (md_begin): Check m68k_rel32_from_cmdline before setting
- m68k_rel32.
- (m68k_mri_mode_change): Likewise.
- (md_longopts): Add --disp-size-default-16 and
- --disp-size-default-32.
- (md_parse_option): Handle new options.
- (md_show_usage): Mention new options.
- * doc/c-m68k.texi (M68K-Opts): Document new options.
+ * 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.
- Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
- * config/tc-m68k.c (m68k_index_width_default): New static
- variable.
- (m68k_ip): Use m68k_index_width_default to set the size of a base
- register whose size was not given.
- (md_longopts): Add --base-size-default-16 and
- --base-size-default-32.
- (md_parse_option): Handle new options.
- (md_show_usage): Mention new options.
- * doc/c-m68k.texi (M68K-Opts): Document new options.
+Sat Apr 10 20:10:02 1999 Richard Henderson <rth@cygnus.com>
- * doc/c-mips.texi: Mention ISA level 4, and the -mips16 option.
+ * tc-alpha.c (load_expression): Call as_bad instead of abort.
- * configure.in: Recognize mips-*-linux* target.
- * configure: Rebuild.
+1999-04-08 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (load_register): Rewrite 64 bit handling to
- work if valueT is only 32 bits.
+ * 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.
- * config/tc-mips.c: Throughout, check target_big_endian rather
- than byte_order.
- (byte_order): Remove.
- (mips_init_after_args): Remove.
- * config/tc-mips.h (LITTLE_ENDIAN, BIG_ENDIAN): Don't define.
- (mips_init_after_args): Don't declare.
- (tc_init_after_args): Don't define.
-
- * config/tc-mips.h (tc_frob_after_relocs): Define if
- OBJ_MAYBE_ELF.
- (mips_elf_final_processing): Likewise.
- (ELF_TC_SPECIAL_SECTIONS): Likewise.
-
-Tue Dec 31 15:12:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/tc-v850.c (md_assemble): If this is sst.{h,w} or
- sld.{h,w} and the operand is relocatable, adjust the adend by
- shifting it right one bit.
-
-Tue Dec 31 12:56:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (read_a_source_file): Check mri_pending_align after
- checking for a macro. From Ronald F. Guilmette
- <rfg@monkeys.com>.
-
- * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
-
- * config/tc-sparc.c (md_apply_fix3): Rename from md_apply_fix, and
- add segment argument. If OBJ_ELF, treat a relocation against a
- symbol in a linkonce section like a relocation against an external
- symbol.
- * config/tc-sparc.h (MD_APPLY_FIX3): Define.
-
-Mon Dec 30 11:35:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (mips16_macro): Add case for M_ABS.
-
-Fri Dec 27 22:51:51 1996 Fred Fish <fnf@cygnus.com>
+ * Makefile.am: Add support for MCore targets.
+ * Makefile.in: Regenerate.
+ * configure.in: Add support for MCore targets.
+ * configure: Regenerate.
- * NOTES.config (Implementation): as.h #define's "GAS" not "gas",
- includes config.h instead of host.h, tc.h instead of tp.h, and
- targ-env.h instead of target-environment.h.
- Also, obj-format.h includes targ-cpu.h instead of
- target-processor.h.
+ * doc/all.texi: Set MCORE.
+ * doc/as.texinfo: Document MCore specific command line options.
-Fri Dec 27 11:42:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/as.texinfo (M): Mention explicitly that -M changes macro
- handling.
+ * write.h: Prevent multiple inclusion.
-Thu Dec 19 12:06:08 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-04-06 Ian Lance Taylor <ian@zembu.com>
- * write.c (adjust_reloc_syms): If the fixup symbol has been
- equated to an undefined symbol, convert the fixup to being against
- the target symbol. Remove obsolete code handling a special case
- for i386 PIC.
+ * 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.
-Wed Dec 18 22:54:39 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Use NewFolderRecursive for installation.
-
-Wed Dec 18 16:00:42 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/tc-d10v.c (do_assemble): Correct previous bug fix.
-
-Wed Dec 18 15:27:40 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/tc-d10v.c (md_assemble): Fix bug which caused
- second instruction in a line to be case sensitize. PR11312
-
-Wed Dec 18 10:08:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10200.c (mn10200_insert_operand): Don't
- range check operands with MN10200_OPERAND_NOCHECK set.
- (check_operand): Likewise.
-
-Tue Dec 17 10:59:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c: Undo part of last Friday's alignment changes.
- (md_begin): Always align the text section to a four byte
- boundary.
- (append_insn): Remove call to record_align.
-
- * config/tc-mips.c (insn_label): Remove.
- (struct insn_label_list): Define.
- (insn_labels, free_insn_labels): New static variables.
- (mips_clear_insn_labels): New static function.
- (append_insn): Mark all mips16 text labels, and make them odd.
- Handle all labels after emitting a nop, not just one. Call
- mips_clear_insn_labels rather than just clearing insn_label.
- (mips_emit_delays): Add insns parameter, and use it to decide
- whether to mark mips16 labels. Handle all labels, not just one.
- Force mips16 labels to be odd. Change all callers.
- (mips16_immed): Don't check for an odd branch target.
- (md_apply_fix): Don't check mips16 mode for a branch reloc.
- (mips16_extended_frag): Ignore the low bit in a branch target.
- (md_convert_frag): Likewise.
- (mips_no_prev_insn): Call mips_clear_insn_labels rather than just
- clearing insn_label.
- (mips_align, mips_flush_pending_output, s_cons): Likewise.
- (s_float_cons, s_gpword): Likewise.
- (s_align): Use insn_labels rather than insn_label.
- (s_cons, s_float_cons, s_gpword): Likewise.
- (mips_frob_file_after_relocs): New function.
- (mips_define_label): Rewrite to add to insn_labels list.
- * config/tc-mips.h (tc_frob_file_after_relocs): Define.
- * ecoff.c (ecoff_build_symbols): If the size of a function comes
- out odd, increment it.
-
- * config/tc-mips.c (append_insn): Only update prev_insn when not
- reordering if place is NULL.
-
- * config/tc-mips.c (mips16_ip): Check for a missing expression
- when using the register indirect addressing mode.
-
-Mon Dec 16 10:08:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10200.c (mn10200_insert_operand): Don't
- check 24bit operands for overflow.
- (check_operand): Likewise.
-
-Mon Dec 16 11:50:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/as.texinfo (Section): Document how to use the .section
- pseudo-op for COFF and ELF.
-
-Sun Dec 15 15:26:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * write.c (adjust_reloc_syms): Fix linkonce check for ELF.
-
-Sat Dec 14 22:37:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (prev_insn_reloc_type): New static variable.
- (RELAX_MIPS16_ENCODE): Add dslot and jal_dslot arguments, and
- store them. Adjust other RELAX_MIPS16 macros.
- (RELAX_MIPS16_DSLOT): Define.
- (RELAX_MIPS16_JAL_DSLOT): Define.
- (append_insn): Pass new arguments to RELAX_MIPS16_ENCODE. Correct
- handling of whether previous instruction has a fixup. Set
- prev_insn_reloc_type.
- (mips_no_prev_insn): Clear prev_insn_reloc_type.
- (mips16_extended_frag): Use the right base address for a PC
- relative add or load.
- (md_convert_frag): Likewise. If a PC relative add or load is
- used, record the alignment for the section.
-
-Fri Dec 13 13:00:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * write.c (adjust_reloc_syms): Don't reduce a reloc against a
- linkonce section into a reloc against the section symbol.
-
- * config/tc-mips.c (mips16_macro): Remove nop instructions after
- branch instructions.
-
- * config/tc-mips.c (md_begin): If configured for an embedded ELF
- system, don't set the section alignment to 2**4.
- (s_change_sec): Likewise.
- (append_insn): Call record_alignment for the section.
- (md_section_align): Don't align the section size for an embedded
- ELF system.
-
-Thu Dec 12 16:40:47 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * write.c (adjust_reloc_syms): Make sure that symbols are
- resolved; expression symbols may have been skipped.
- * config/obj-coff.c (fixup_segment): Likewise.
+ * 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.
-Thu Dec 12 15:18:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * config/tc-sparc.h (md_do_align): Just allocate the number of
+ bytes necessary, rather than always allocating 1024.
- * config/tc-ppc.c (ppc_elf_suffix): Move @plt to
- BFD_RELOC_24_PLT_PCREL relocation.
- (md_apply_fix3): Support BFD_RELOC_24_PLT_PCREL.
+1999-04-04 Ian Lance Taylor <ian@zembu.com>
-Tue Dec 10 13:51:55 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * 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.
- * config/tc-d10v.c (write_2_short): Remove code that called
- parallel_ok() when the programmer specified parallel instructions.
+1999-04-04 Don Bowman <don@pixsci.com>
-Tue Dec 10 12:23:19 1996 Jeffrey A Law (law@cygnus.com)
+ * configure.in: Add mips*-*-vxworks* target; have it define
+ MIPS_STABS_ELF.
+ * configure, config.in: Rebuild.
- * config/tc-mn10300.c (md_assemble): Update to handle endianness
- issues correctly.
+1999-03-31 Nick Clifton <nickc@cygnus.com>
- * config/tc-mn10200.c (md_assemble): Opcode 0x0 is valid!
- * config/tc-mn10300.c (md_assemble): Likewise.
+ * 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.
-Tue Dec 10 11:37:14 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Mar 29 10:15:40 CST 1999 Catherine Moore <clm@cygnus.com>
- * config/tc-mips.c (append_insn): Make sure there is enough room
- in a frag after a mips16 instruction to switch it with a jump
- instruction.
+ * tc-mips.c (md_apply_fix): Adjust value for linkonce sections.
- * config/tc-mips.c (mips16_extended_frag): Give an error for an
- attempt to use a non absolute symbol in an extending frag.
+Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com)
-Mon Dec 9 16:48:20 1996 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.
- * config/tc-mn10200.c: Flesh out assembler support for MN10200.
- * config/tc-mn10200.h: Likewise.
-Mon Dec 9 17:09:42 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com)
- * app.c (do_scrub_chars): At the end of a C comment, pass space to
- UNGET rather than PUT. Set old_state before setting state to -2.
+ * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit
+ instruction is encoded with one bit.
- * config/tc-mips.c (mips16_extended_frag): Avoid an infinite loop
- when extending because the value is exactly maxtiny + 1.
- * config/tc-mips.c (RELAX_MIPS16_ENCODE): Add small and ext
- arguments, and store them. Adjust other RELAX_MIPS16 macros.
- (RELAX_MIPS16_USER_SMALL): Define.
- (RELAX_MIPS16_USER_EXT): Define.
- (mips16_small, mips16_ext): New static variables.
- (append_insn): Pass mips16_small and mips16_ext to
- RELAX_MIPS16_ENCODE.
- (mips16_ip): Set mips16_small and mips16_ext.
- (mips16_immed): Don't check mips16_autoextend.
- (mips16_extended_frag): Check USER_SMALL and USER_EXT.
+1999-03-23 Ian Lance Taylor <ian@zembu.com>
- * write.c (write_relocs): Print an error for an out of range
- fixup, rather than calling abort.
+ * doc/internals.texi (CPU backend): Mention that
+ line_separator_chars should not include newline. From thi
+ <ttn@mingle.glug.org>.
- * as.c (main): Unlink the output file if there are errors while
- generating the fixups.
+1999-03-22 Doug Evans <devans@casey.cygnus.com>
-Fri Dec 6 18:48:13 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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/tc-mips.c (mips16_extended_frag): Don't call
- S_GET_VALUE.
- (md_convert_frag): Call resolve_symbol_value before calling
- S_GET_VALUE, and don't add in the frag address.
+Sun Mar 21 18:08:18 1999 Richard Henderson <rth@cygnus.com>
- * config/tc-mips.c (mips16_immed): Add file and line parameters,
- and use them when reporting errors. Change all callers.
+ * tc-alpha.c (md_assemble): Allow '6' in an opcode.
-Fri Dec 6 15:36:32 1996 Jeffrey A Law (law@cygnus.com)
+Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com)
- * config/tc-mn10300.c: Fix various gcc -Wall warnings.
- Remove '$' prefixing for registers.
+ * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr.
-Fri Dec 6 00:55:48 1996 Martin <hunt@cygnus.com>
- * config/tc-d10v.c (md_assemble): Check to see if prev_seg
- is initialized before using it.
- (d10v_cleanup): No longer uses its argument, so make it void.
+Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com)
- * config/tc-d10v.h (d10v_cleanup): Change prototype.
+ * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n".
-Thu Dec 5 11:03:31 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-03-15 Martin Hunt <hunt@cygnus.com>
- * write.c (fixup_segment): Don't discard the symbol for a PC
- relative fixup to an absolute symbol.
+ * app.c (do_scrub_begin): Change '-' back to a symbol char
+ so we can use multiple opcodes on a line again.
-Wed Dec 4 15:42:41 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-d30v.c: By default, warn if a symbol has
+ the same name as a register. Plus some minor
+ updates from the branch.
- * config/tc-d10v.c (md_assemble, d10v_cleanup): Fix bug
- with multiple sections.
+1999-03-13 Nick Clifton <nickc@cygnus.com>
-Wed Dec 4 13:00:07 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8,
+ BFD_RELOC_16 and BFD_RELOC_64.
- * config/tc-mips.c (md_longopts): Rename mips-16 to mips16, and
- no-mips-16 to no-mips16.
- (s_mipsset): Accept .set mips16 and .set nomips16.
+1999-03-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-Wed Dec 4 10:35:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/tc-ppc.c (ppc_elf_suffix): Take expressionS pointer
- argument, and check for +/- constant following the suffix, folding
- it into the expression.
- (ppc_elf_cons): Change ppc_elf_suffix calls.
- (md_assemble): Ditto.
- (shlib): Replace boolean mrelocatable with enumeration shlib.
- (md_parse_option): Discriminate between PIC style shared libraries
- and -mrelocatable.
- (ppc_elf_validate_fix): Don't report warnings for PIC style shared
- libraries.
+ * expr.c (expr): Add missing else.
-Tue Dec 3 23:18:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+1999-03-12 Nick Clifton <nickc@cygnus.com>
- * config/tc-ppc.h ({tc,ppc}_comment_chars): Define, so that we can
- change the comment characters.
+ * config/tc-arm.c (md_apply_fix3): Improve error message.
- * config/tc-ppc.c (comment_chars): Delete in favor of
- tc_comment_chars.
- (ppc_{eabi,solaris}_comment_chars): Eabi and Solaris versions of
- comment chars.
- (ppc_comment_chars): Select appropriate comment chars by default.
- (msolaris): New flag for -m{,no-}solaris.
- (md_parse_option): Recognize -K pic. Add support for
- -m{,no-}solaris.
- (md_show_usage): Update.
- (md_begin): Do not set ELF flags if Solaris.
- (ppc_elf_suffix): @local sets R_PPC_LOCAL24PC relocation.
- (md_apply_fix3): Add support for R_PPC_LOCAL24PC.
+1999-03-11 Doug Evans <devans@casey.cygnus.com>
-Mon Dec 2 13:48:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * as.c (main): Correct handling of flag_always_generate_output.
-
-Sun Dec 1 21:46:05 1996 Jeffrey A Law (law@cygnus.com)
+ * Makefile.am (CPU_TYPES): Add fr30.
+ (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency.
+ (fr30,m32r dependencies): Update.
+ * Makefile.in: Rebuild.
- * config/tc-mn10300.c (tc_gen_reloc): Get the addend from
- fx_offset, not fx_addnumber.
+ * 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.
- * config/tc-mn10300.h (tc_fix_adjustable): Don't do any
- reloc adjustments.
+1999-03-09 Jim Blandy <jimb@zwingli.cygnus.com>
-Sat Nov 30 17:34:48 1996 Eliot Dresselhaus <eliot@wally.edc.com>
+ * config/tc-mips.c (md_show_usage): Fix message.
- * config/tc-i386.c: Correct misspelling: balenced to balanced.
+1999-03-03 Nick Clifton <nickc@cygnus.com>
-Wed Nov 27 13:25:39 1996 Ian Lance Taylor <ian@cygnus.com>
+ * doc/c-arm.texi (ARM Syntax): Document new command line switches
+ and LDR reg,=<expr> instruction.
- * config/tc-mips.c (md_section_align): Check for an alignment of
- 4, not an alignment of 16. Corrects August 7 patch.
+ * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and
+ -mcpu=arm9tdmi.
-Tue Nov 26 10:33:16 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Feb 19 09:36:30 1999 Ian Lance Taylor <ian@cygnus.com>
- * configure, conf.in: Rebuild with autoconf 2.12.
+ * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'.
- * config/tc-ppc.c (ppc_elf_lcomm): Don't give an error if no
- alignment is specified.
+1999-02-17 Nick Clifton <nickc@cygnus.com>
- Add support for mips16 (16 bit MIPS implementation):
- * config/tc-mips.c: Extensive additions for mips16 support, not
- listed here.
- (RELAX_OLD, RELAX_NEW): Use only 7 bits each.
- (insn_uses_reg): Change last parameter to an enum.
- * config/tc-mips.h (LOCAL_LABELS_DOLLAR): Define as 0.
- (md_relax_frag): Define as mips_relax_frag.
- (mips_relax_frag): Declare.
- (struct mips_cl_insn): Add use_extend and extend fields.
+ This patch was created by: Scott Bambrough
+ <scottb@corelcomputer.com>
+
+ * 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.
- * config/obj-elf.h (S_GET_OTHER): Define.
- (S_SET_OTHER): Define.
-
-Mon Nov 25 18:02:29 1996 J.T. Conklin <jtc@beauty.cygnus.com>
-
- * config/tc-m68k.c (m68k_ip): Implement cases for new <, >, m, n,
- o and p operand specifiers.
-
-Mon Nov 25 10:45:14 1996 Doug Evans <dje@seba.cygnus.com>
-
- * write.c: Delete "ifndef md_relax_frag" around is_dnrange.
- (relax_segment, case rs_org): Move code inside braces. Move locals
- target,after inside too.
- (relax_segment, case rs_machine_dependent): Guts moved to ...
- (relax_frag): New function.
- Call md_prepare_relax_scan if defined.
- * config/tc-m68k.h (md_prepare_relax_scan): Renamed from
- M68K_AIM_KLUDGE.
-
-Mon Nov 25 08:49:36 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (address_registers): Use '$' as register
- prefix instead of '%'.
- (data_registers, other_registers, md_assemble): Likewise.
-
- * config/tc-mn10300.c (address_registers): Use '%' prefix for regs.
- (data_registers, other_registers, md_assemble): Likewise.
-
- * config/tc-mn10300.c (md_assemble): Correctly determine the
- correct location and type for each relocation.
- (md_pcrel_from): Simplify.
-
-Fri Nov 22 15:42:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-sh.c (md_convert_frag): Improve warning when branch is
- converted into branch around branch.
-
-Thu Nov 21 11:56:11 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.h (DIFF_EXPR_OK): Don't define this.
- (tc_fix_adjustable): Don't adjust relocs against weak symbols or
- pc-relative relocs.
- * config/tc-mn10300.c (md_begin): Set linkrelax.
- (md_assemble): Create fixups as needed.
- (md_apply_fix3): Gut. It shouldn't ever get called anymore.
-
-Tue Nov 19 17:48:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/tc-d10v.c (parallel_ok): When automatically converting
- serial ops to parallel, do not consider a branch as the first
- instruction.
-
-Tue Nov 19 13:35:22 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (md_assemble): Handle MN10300_OPERAND_REG_LIST.
-
-Mon Nov 18 15:26:55 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (mn10300_insert_operand): Provide prototype
- via PARAMS.
- (check_operand): Likewise.
-
-Mon Nov 18 15:22:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/tc-d10v.c (parallel_ok): Branch and link instructions
- modify r13.
- (write_2_short): Call parallel_ok to check whether two short
- instructions the user requested execute in parallel, can be
- executed that way.
-
-Thu Nov 14 11:17:49 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/tc-d10v.c (write_2_short): Fix bug that wouldn't
- allow a branch and link in parallel with an exe instruction.
-
-Fri Nov 8 13:55:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * doc/c-d10v.texi: Add info on @word modifier.
-
-Wed Nov 6 13:46:07 1996 Jeffrey A Law (law@cygnus.com)
+ (GLOBAL_OFFSET_TABLE_NAME): Define.
- * config/tc-mn10300.c (mn10300_insert_operand): MN10300_OPERAND_SPLIT
- operands are assumed to be 32bits. Use "bits" field to hold the
- number of bits in the main instruction word for MN10300_OPERAND_SPLIT.
- (mn10300_check_operand): MN10300_OPERAND_SPLIT operands are assumed
- to be 32bits.
-
- * config/tc-mn10300.c (mn10300_insert_operand): Shift low part
- of a MN10300_OPERAND_SPLIT operand by operand->shift.
-
- * config/tc-mn10300.c (mn10300_insert_operand): Handle
- MN10300_OPERAND_SPLIT.
-
-Tue Nov 5 13:30:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (md_assemble): Insert operands into
- the extension part of the instruction if necessary.
- (mn10300_insert_operand): Accept pointer to extension word
- argument. Make insn a pointer argument too. Return type
- is now void. All callers changed.
-
-Mon Nov 4 12:53:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (mn10300_insert_operand): Handle
- repeated register operands.
-
-Fri Nov 1 10:42:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * doc/as.texinfo: Added section on reporting bugs.
-
- * config/tc-alpha.c: Change uses of void * to PTR. Change the
- alpha_macro emit field to expect a const argument, and change the
- arg field to be const. Fix some spacing to follow the GNU
- standard.
-
-Fri Nov 1 10:32:03 1996 Richard Henderson <rth@tamu.edu>
-
- * config/tc-alpha.c (md_parse_option): Add knowledge of 21164pc
- (pca56) and 21264 (ev6) cpus.
- (md_apply_fix): Private relocation types are now negative.
- (alpha_force_relocation): Likewise.
- (tc_gen_reloc): Likewise.
- (emit_insn): Likewise.
- (emit_ldXu): Do the right thing when the hardware can do byte insns.
- (emit_stX): Likewise.
- (emit_sextX): Likewise.
-
-Thu Oct 31 16:33:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-coff.c (do_relocs_for): Call resolve_symbol_value on
- a symbol found in a reloc.
-
- * symbols.c (resolve_symbol_value): Improve the error message if
- an undefined symbol is used in an expression.
+ * 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 <ian@cygnus.com>
+
+ * 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.
-Wed Oct 30 20:15:35 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-02-15 Jim Lemke <jlemke@cygnus.com>
- * doc/internals.texi: Rewrite, and add a lot of documentation.
- * doc/Makefile.in (internals.info): New target.
+ * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for
+ non-constant offset from a base register.
-Wed Oct 30 14:55:57 1996 Jeffrey A Law (law@cygnus.com)
+1999-02-14 Ken Raeburn <raeburn@raeburn.org>
- * config/tc-v850.h (tc_fix_adjustable): Don't adjust relocs
- against weak symbols.
+ * config/tc-alpha.c (md_show_usage): Put \ before newline in
+ strings always.
-Tue Oct 29 12:28:16 1996 Jeffrey A Law (law@cygnus.com)
+Sat Feb 13 14:10:10 1999 Richard Henderson <rth@cygnus.com>
- * config/tc-v850.c (md_assemble): Don't lose for relaxable
- addresses like .+6.
+ * 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.
- * config/tc-v850.c (md_convert_frag): Make sure we insert the
- fixup at the right address within the frag.
+1999-02-13 Jim Blandy <jimb@zwingli.cygnus.com>
- * config/tc-v850.c (md_convert_frag): Don't set fragP->fr_fix
- to an absolute value, instead increment it as needed.
+ * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and
+ -mcpu=NNNN flags.
- * config/tc-v850.h (TC_GENERIC_RELAX_TABLE): Define.
- * config/tc-v850.c: Fix some indention problems.
- (md_relax_table): Define for D9->D99 branch displacement
- relaxing.
- (md_convert_frag): Do something useful instead of aborting.
- (md_estimate_size_before_relax): Likewise.
- (md_assemble): Note if the matching instruction has a relaxable
- operand. If it does, allocate frag with frag_var and don't
- do any fixups.
+ * 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.
-Mon Oct 28 10:48:40 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Sat Feb 13 00:17:26 1999 Richard Henderson <rth@cygnus.com>
- * config/tc-d10v.h (md_cleanup): New function. This is needed to
- write out any buffered instructions when a ".end" is found.
+ * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather
+ than treat as an immediate specifier.
-Mon Oct 28 10:43:45 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Thu Feb 11 16:18:31 1999 Richard Henderson <rth@cygnus.com>
- * read.c (read_a_source_file): New hook md_cleanup().
+ * 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.
-Fri Oct 25 00:01:00 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Feb 11 11:21:02 1999 Ian Lance Taylor <ian@cygnus.com>
- * write.c (fix_new_exp): Use make_expr_symbol to build an
- expression symbol for a complex fixup.
+ * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake
+ patch.
+ * Makefile.in: Rebuild.
-Thu Oct 24 14:31:04 1996 Jeffrey A Law (law@cygnus.com)
+1999-02-09 Doug Evans <devans@casey.cygnus.com>
- * config/tc-v850.c (v850_reloc_prefix): Several disgusting
- hacks to improve parsing of complex hi, lo, zda, etc
- expressions.
- (md_assemble): Don't demand and eat a trailing ')' after finding
- a v850 relocation prefix. Sign extend the constant in a
- BFD_RELOC_LO16 expression. Do eat a trailing ')' after a complete
- operand.
- (parse_cons_expression_v850): Don't eat a trailing ')' after
- finding a v850 relocation prefix.
+ * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h.
+ (cgen.o): Ditto.
+ (EXTRA_as_new_SOURCES): Comment out.
+ (.tcdep): <arch>-opc.h renamed to <arch>-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): <arch>-opc.h renamed to <arch>-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.
- * config/tc-v850.h (TC_PARSE_CONS_EXPRESSION): Define.
- (TC_CONS_FIX_NEW): Likewise.
- * config/tc-v850.c (parse_cons_expression_v850): New function.
- (cons_fix_new_v850): Likewise.
+1999-02-09 Nick Clifton <nickc@cygnus.com>
- * config/tc-v850.h (tc_fix_adjustable): Don't adjust TDA relocs.
+ * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2
+ relocations for ELF targets.
-Wed Oct 23 18:20:29 1996 Ian Lance Taylor <ian@cygnus.com>
+1999-02-08 Nick Clifton <nickc@cygnus.com>
- * config/tc-ppc.c (md_apply_fix3): Give a better warning message
- for an unknown relocation type.
+ * configure.in: Add support for StrongARM target.
+ * configure: Regenerate.
-Wed Oct 23 16:21:28 1996 Jeffrey A Law (law@cygnus.com)
+1999-02-05 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <rth@cygnus.com>
+
+ * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options.
+
+Mon Feb 1 20:37:30 1999 Catherine Moore <clm@cygnus.com>
+
+ * 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 <clm@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <nickc@cygnus.com>
+
+ * 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 <devans@casey.cygnus.com>
+
+ * Makefile.in: Regenerate.
+ * configure.in: Redo test for using cgen.
+ * configure: Regenerate.
- * config/tc-v850.c (md_pseudo_table): Add .word; allocates
- 4 bytes of space.
+1999-01-09 Nick Clifton <nickc@cygnus.com>
-Tue Oct 22 22:01:25 1996 Jeffrey A Law (law@cygnus.com)
+ * config/obj-coff.h (obj_adjust_symtab): Prevent accidental
+ redefinition of this macro.
- * config/tc-v850.c (md_assemble): Handle TDAOFF relocs
- differently for movea & sst/sld insns.
+Tue Jan 5 21:58:03 1999 Doug Evans <devans@canuck.cygnus.com>
-Tue Oct 22 17:09:32 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc"
+ warning.
- * config/tc-d10v.c (parallel_ok): Don't allow illegal combinations
- of instructions.
+1998-12-29 Gavin Romig-Koch <gavin@cygnus.com>
-Tue Oct 22 11:28:39 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (append_insn): For mips16, insert a nop between
+ a read of HI or LO and an immediatly following branch.
- * obj.h (struct format_ops): Add frob_file_after_relocs field.
- * config/obj-multi.h (obj_frob_file_after_relocs): Define.
- * config/obj-ecoff.c (ecoff_format_ops): Initialize new
- frob_file_after_relocs field.
- * config/obj-elf.c (elf_format_ops): Likewise.
- * config/tc-mips.c: Undefine obj_frob_file_after_relocs before
- including obj-elf.h.
+1998-12-29 Gavin Romig-Koch <gavin@cygnus.com>
-Mon Oct 21 11:38:30 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (md_begin): Another correction to the setting of
+ mips_eabi64.
- * config/tc-mips.c (cons_fix_new_mips): Only treat 8 byte reloc
- specially if not ELF.
- (md_apply_fix): Handle BFD_RELOC_64.
- (tc_gen_reloc): Handle BFD_RELOC_64.
+1998-12-23 Gavin Romig-Koch <gavin@cygnus.com>
- * config/tc-i386.c (md_apply_fix3): Don't increment value for a PC
- relative reloc when BFD_ASSEMBLER and OBJ_AOUT (more ugly gas
- reloc hacking).
+ * config/tc-mips.c (md_begin): Correct type-o in setting of mips_eabi64.
- * config/obj-aout.h (S_IS_DEFINE): non BFD_ASSEMBLER version:
- Don't check S_GET_OTHER.
+1998-12-21 Nick Clifton <nickc@cygnus.com>
-Fri Oct 18 14:06:26 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-mips.c (mips_ip): Accept an odd floating point
- register with l.s or s.s.
+1998-12-19 Gavin Romig-Koch <gavin@cygnus.com>
- * config/obj-aout.c (obj_pseudo_table): Use obj_aout_type for
- .type pseudo-op.
- (obj_aout_type): New static function.
+ * config/tc-mips.c (mips_eabi64): New.
+ (md_begin): Set mips_eabi64.
+ (mips_elf_final_processing): Use it.
-Thu Oct 17 17:55:17 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-12-18 Gavin Romig-Koch <gavin@cygnus.com>
- * Makefile.in ($(OBJS)): Depend upon libiberty.h.
+ * config/tc-mips.c (mips_elf_final_processing):
+ Correct setting of ABI in e_flags.
-Wed Oct 16 11:28:31 1996 Jeffrey A Law (law@cygnus.com)
+Wed Dec 16 16:17:22 1998 Dave Brolley <brolley@cygnus.com>
- * config/tc-v850.c (v850_reloc_prefix): Recognize zdaoff, tdaoff
- and sdaoff expressions.
+ * config/tc-fr30.c (md_assemble): Warn about invalid instructions in delay slots.
- * write.c (fixup_segment): Don't add symbol value to addend if
- TC_V850 and OBJ_ELF.
- * config/tc-v850.h (tc_fix_adjustable): Don't adjust any
- pc-relative fixups.
+1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
- * config/tc-v850.c (md_pcrel_from): Undo yesterday's changes.
- (md_pcrel_from_section): Likewise.
- * config/tc-v850.h (MD_PCREL_FROM_SECTION): Likewise.
+ * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111.
+
+1998-12-15 Doug Evans <devans@casey.cygnus.com>
-Tue Oct 15 23:19:00 1996 Jeffrey A Law (law@cygnus.com)
+ * 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-v850.c (md_pcrel_from): Delete unused function.
- (md_pcrel_from_section): New function.
- * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
+1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
-Mon Oct 14 13:59:12 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-mips.c (load_register): Add cast to offsetT when using
- a constant with &~.
+1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
-Mon Oct 14 11:24:28 1996 Richard Henderson <rth@tamu.edu>
+ * config/tc-mips.c (md_parse_option): Handle vr4111.
- * config/obj-elf.c (elf_frob_file): Move ECOFF debug processing to ...
- (elf_frob_file_after_relocs): ... here. New function.
- * config/obj-elf.h (obj_from_file_after_relocs): New macro.
- * write.c (write_object_file): Call *frob_after_relocs after the
- call to write_relocs.
+98-12-11 Ken Raeburn <raeburn@cygnus.com>
- * config/tc-alpha.c: Use new BFD_RELOC_ALPHA_ELF_LITERAL reloc.
+ * 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.
- * config/tc-alpha.c (load_expression): Don't SET_VALUE on the section
- symbol, as this messes up linking. Instead, expand the recursive call
- inline and change up the appropriate bits to get the 0x8000 offset
- in the reloc addend.
+1998-12-10 Nick Clifton <nickc@cygnus.com>
-Thu Oct 10 17:30:31 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.c: Add line separator character.
- * config/tc-sparc.h (tc_fix_adjustable): Permit the difference of
- two symbols in the same segment to be adjusted.
+Tue Dec 8 19:51:50 1998 Mark Klein <mklein@dis.com>
- * configure.in: Don't get confused by CPU-VENDOR-linux-gnu.
+ * 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.
-Thu Oct 10 17:22:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Tue Dec 8 15:00:50 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (ppc_insert_operand): Change most warnings into
- errors.
- (ppc_elf_validate_fix): Ditto.
- (md_assemble): Ditto.
- (ppc_tc): Ditto.
- (ppc_pe_section): Ditto.
- (ppc_frob_symbol): Ditto.
-
-Thu Oct 10 12:05:45 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/mn10300.c (md_assemble): Pass an extra shift count
- to mn10300_insert_operand based on the opcode format.
- (mn10300_insert_operand): Accept and use extra shift count
- parameter.
-
- * config/tc-mn10300.c (md_assemble): Use FMT_* macros for
- formats rather than hard-coded constants.
-
- * config/tc-mn10300.c (md_assemble): Format D5 instructions
- are 7 bytes long. Write out instructions in big-endian format.
-
-Tue Oct 8 14:56:15 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.c (md_assemble): Tweak further so
- that all instructions are parsed correctly.
-
-Tue Oct 8 13:02:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * as.h: Include libiberty.h.
- (xmalloc, xrealloc): Don't declare.
- * as.c: Don't include libiberty.h.
- * expr.c, read.c, stabs.c, config/obj-coff.c: Likewise.
- * config/tc-mips.c: Likewise.
- * messages.c: Likewise.
- (xstrerror): Don't declare.
- * xmalloc.c: Remove.
-
-Mon Oct 7 16:53:23 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.h (pre_defined_registers) Remove.
- (system_registers, cc_names): Likewise.
- (address_registers, data_registers, other_registers): New register
- arrays.
- (register_name, system_register_name, cc_name): Remove.
- (mn10300_reloc_prefix): Likewise.
- (data_register_name): New function.
- (address_register_name, other_register_name): Likewise.
- (md_assemble): Rough cut at parsing operands. Remove lots of
- unwanted code.
- (md_apply_fix3): Disable for now.
-
-Mon Oct 7 11:38:34 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * config/tc-m68k.c (select_control_regs): New function, extracted
- out of m68k_init_after_args.
- (m68k_init_after_args): Use it.
- (mri_chip): Use it here as well to update set of allowed control
- regs for movec.
-
-Mon Oct 7 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-elf.c (elf_begin): New function.
- (obj_elf_section): Add the section symbol to the symbol table.
- * config/obj-elf.h (obj_begin): Define.
- (elf_begin): Declare.
- * as.c (perform_an_assembly_pass): Call obj_begin if it is
- defined.
-
-Fri Oct 4 18:37:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-coff.c (fixup_segment): Subtract the section address
- from a PC relative reloc if TC_M68K.
+ * read.c (output_leb128): Don't mark as inline.
-Thu Oct 3 15:15:30 1996 Ian Lance Taylor <ian@cygnus.com>
+1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
- * config/tc-sparc.c (md_pseudo_table): Make .uahalf, .uaword, and
- .uaxword available even if not OBJ_ELF.
- (md_atof): Remove unused local variable wordP.
+ * 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.
-Thu Oct 3 00:16:50 1996 Jeffrey A Law (law@cygnus.com)
+1998-12-07 Nick Clifton <nickc@cygnus.com>
- * config/tc-mn10x00.c, config/tc-mn10x00.h: New files
- for Matsushita MN10x00 support.
- * configure.in: Recognize mn10x00-*-*
- * configure: Rebuilt.
+ * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous
+ input handling.
-Wed Oct 2 15:54:03 1996 Klaus Kaempf <kkaempf@progis.de>
+Mon Dec 7 09:48:34 1998 Catherine Moore <clm@cygnus.com>
- * obj-evax.h: move openvms definitions from here to tc-alpha.c.
- * tc-alpha.c: add support for vms_case_hack like in vax/vms.
- (load_expression): track clobbering of base reg before jmp/jsr.
- (s_alpha_file): pass case_hack flags and source filename via
- symbol table to bfd.
- * tc-alpha.h (TC_CONS_FIX_NEW): define
+ * config/tc-arm.c (elf32_arm_force_relocation): Check for
+ BFD_RELOC_ARM_PCREL_BRANCH.
-Tue Oct 1 16:16:01 1996 Joel Sherrill <joel@oarcorp.com>
+Sun Dec 6 12:46:36 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in (mips-*-rtems*): New target, like mips-*-elf*.
+ * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after
+ checking the target type.
+ (mips-dec-bsd*): Set endian to little.
* configure: Rebuild.
-Tue Oct 1 12:37:48 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (s_macro): Warn if a macro has the same name as a
- pseudo-op.
- (s_space): In m68k MRI mode, align to a word boundary.
- * macro.c (define_macro): Add namep parameter. Change all
- callers.
- * macro.h (define_macro): Update declaration.
-
- * as.c (show_usage): Print bug report address.
- (parse_args): Change version printing to match current GNU
- standards.
- * gasp.c (show_usage): Print bug report address.
- (main): Change version printing to match current GNU standards.
+ COFF weak symbol support, based on patches from Mark Elbrecht
+ <snowball3@usa.net>:
+ * 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".
- * config/tc-m68k.c (init_table): Correct access control unit
- register numbers. From Ken Rose <rose@netcom.com>.
+ * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent
+ <aymeric.vincent@emi.u-bordeaux.fr>.
+ * aclocal.m4: Rebuild with current tools.
+ * configure: Rebuild.
- * config/tc-alpha.c: Add some static function prototypes.
- (alpha_macros): Move to top of file. Make static.
- (alpha_num_macros): Move to top of file.
+ * 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.
-Tue Oct 1 09:36:19 1996 Stu Grossman (grossman@critters.cygnus.com)
+ * expr.c (operator): And with 0xff to avoid problems with signed
+ char.
- * tc-v850.h: Define LOCAL_LABEL to recognise _.L_* symbols
- generated by DWARF.
+1998-12-03 Nick Clifton <nickc@cygnus.com>
-Sat Sep 28 03:38:08 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.c (md_cgen_lookup_reloc): Generate
+ BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32.
- * listing.c (list_symbol_table): Remove bogus code in BFD64 case,
- and just call sprintf_vma.
+1998-12-02 Nick Clifton <nickc@cygnus.com>
-Thu Sep 26 16:04:11 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for
+ LDI:20 insn.
- * expr.c (expr): Change >>= to >> (fix typo). (From meissner).
+Thu Nov 26 11:23:48 1998 Dave Brolley <brolley@cygnus.com>
-Tue Sep 24 19:05:08 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.c (md_pcrel_from_section): Restore previous calculation
+ of pcrel point.
- * read.c (float_cons): Call md_flush_pending_output if it is
- defined.
+Tue Nov 24 17:21:52 1998 Nick Clifton <nickc@cygnus.com>
-Tue Sep 24 12:22:18 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of
+ pcrel point.
- * config/tc-d10v.c (md_operand): Created. Allows operands to
- start with '#'.
- * config/tc-d10v.h (md_operand): Undefined.
+Tue Nov 24 14:54:38 1998 Nick Clifton <nickc@cygnus.com>
-Mon Sep 23 12:13:18 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-m68k.c (add_fix): Treat a width of '3' like 'B'.
- (md_assemble): A fixup width of '3' means a 1 byte reloc.
+Fri Nov 20 11:41:13 1998 Nick Clifton <nickc@cygnus.com>
-Thu Sep 19 12:21:24 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for
+ FR30_OPERAND_I32.
- * config/obj-coff.c (fixup_segment): Don't adjust PC relative
- reloc for the i960 for a reloc in the same section. This undoes
- one of the two changes made Aug 19.
+Thu Nov 19 15:01:29 1998 Nick Clifton <nickc@cygnus.com>
-Wed Sep 18 12:11:58 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and
+ -marm6xxx command line switches.
- * config/obj-coff.c (obj_coff_endef): Both versions: Move C_STAT
- symbols to the position of the debugging information.
+1998-11-18 Doug Evans <devans@casey.cygnus.com>
-Mon Sep 16 11:41:40 1996 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.am (DEP): Use $(srcdir)/../mkdep.
+ (itbl-ops.o): Delete duplicate dependencies.
+ Rebuild dependencies.
+ Add fr30 dependencies.
+ * Makefile.in: Rebuild.
- * expr.c (expr): Always use unsigned right shifts for >>.
+Tue Nov 17 13:42:42 1998 Nick Clifton <nickc@cygnus.com>
-Thu Sep 12 10:25:45 1996 James G. Smith <jsmith@cygnus.co.uk>
+ * 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-arm.c (md_apply_fix3): Update two thumb instruction
- slots when processing BL fixups.
+Thu Nov 12 19:21:24 1998 Dave Brolley <brolley@cygnus.com>
- * config/tc-arm.c (output_inst): Ensure Thumb BL fixup is marked
- on the first half of the instruction.
+ * po/gas.pot: Regenerated.
-Wed Sep 11 00:09:35 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Nov 12 10:54:16 1998 Nick Clifton <nickc@cygnus.com>
- * ecoff.c (ecoff_stab): Create an expression symbol for a complex
- stabs expression, rather than giving an error.
+ * config/tc-fr30.c (fr30_is_colon_insn): New name for
+ fr30_is_label_start(). Also checks for delay slot insns.
- * ecoff.c (ecoff_new_file): Don't do anything if we are still in
- the same file.
+ * config/tc-fr30.c (fr30_is_label_start): New function: Handle
+ FR30 instructions which contain a colon in the mnemonic.
-Tue Sep 10 11:45:37 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.h (TC_START_LABEL): Define this macro.
- * config/tc-mips.c (append_insn): Fill in the value for a constant
- jump, rather than creating a reloc.
+Wed Nov 11 09:58:21 1998 Nick Clifton <nickc@cygnus.com>
-Mon Sep 9 10:57:42 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-fr30.c: Removed currently superflous code.
- * config/tc-mips.c (append_insn): Don't swap an instruction which
- sets a condition code with an instruction which uses a condition
- code.
- (mips_ip): In cases 'N' and 'M', look for $fccN rather than an
- immediate value.
+Tue Nov 10 13:13:05 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (md_begin): Recognize r5000 for cpu.
- (mips_ip): Give a better error message if the ISA level is wrong.
- (md_parse_option): Recognize -mcpu=[v][r]5000.
+ * config/tc-fr30.h: New file.
+ * config/tc-fr30.c: Tweaking so that it will compile.
-Sat Sep 7 13:25:55 1996 James G. Smith <jsmith@cygnus.co.uk>
+Tue Nov 10 14:41:33 1998 Catherine Moore <clm@cygnus.com>
- * config/tc-mips.c (COUNT_TOP_ZEROES): Added macro to count
- leading zeroes.
- (load_register): Ensure hi32 bits are not lost during lo32bit
- processing. Fix shift offset that was overflowing into the next
- instruction field. Add code to generate shorter sequences for
- constants with a single contiguous seqeuence of ones.
+ * 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.
-Fri Sep 6 17:07:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Mon Nov 9 14:25:06 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-d10v.c (d10v_dot_word): New function to support
- "@word" with the word pseudo-op.
- (md_apply_fix3): Cleanup and changes to support correct sizes
- for 16 and 18-bit relocs.
+ * config/tc-d30v.c: Change default behaviour to ignore potential
+ conflicts between register name and symbol names.
-Fri Sep 6 16:00:29 1996 Doug Evans <dje@canuck.cygnus.com>
+Wed Nov 4 18:42:00 1998 Dave Brolley <brolley@cygnus.com>
- * configure.in (sparc-*-aout): Set `em'.
+ * configure.in: Add fr30-*-*.
+ * config/tc-fr30.c: New file.
+ * Makefile.in: Regenerated.
+ * config.in: Regenerated.
* configure: Regenerated.
- * config/te-sparcaout.h: New file.
- * config/tc-sparc.h (TARGET_BYTES_BIG_ENDIAN): Define.
- Ifdef TE_SPARCOUT define TARGET_FORMAT and SPARC_BIENDIAN.
- * config/tc-sparc.c (INSN_BIG_ENDIAN): New macro.
- (SPECIAL_CASE_{SETSW,SETX}): Define.
- ({NOP,OR,FMOVS,SETHI,SLLX,SRA}_INSN): Define.
- (md_begin): Delete setting of `target_big_endian'.
- (output_insn): New function.
- (md_assemble): Rewrite. Add `setx' support.
- (sparc_ip): Handle `0' operand char. Recognize setuw, setsw, setx
- special cases.
- (md_atof): Add little endian support.
- (md_number_to_chars): Likewise.
- (md_apply_fix): Likewise.
- (md_longopts): Recognize -EL,-EB ifdef SPARC_BIENDIAN.
- (md_parse_option): Likewise.
- (md_show_usage): Print -EL, -EB ifdef SPARC_BIENDIAN.
+ * doc/Makefile.in: Regenerated.
+ * po/gas.pot: Regenerated.
-Thu Sep 5 13:40:29 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Nov 2 20:54:16 1998 Doug Evans <devans@canuck.cygnus.com>
- * ecoff.c (ecoff_new_file): New function.
- * ecoff.h (ecoff_new_file): Declare.
- * config/obj-ecoff.h (obj_app_file): Define.
+ * config/tc-m32r.c (assemble_two_insns): Ensure both insns
+ are 16 bit insns.
-Thu Sep 5 13:39:25 1996 Richard Henderson <rth@tamu.edu>
+Mon Nov 2 20:10:18 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
- * config/tc-alpha.c (load_expression): Bias the .lit8 section
- symbol by 32k so that our 16-bit signed offset can address the
- entire chunk. Reported by <matt@lkg.dec.com>.
+ * 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.
-Wed Sep 4 10:23:20 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com>
- * config/tc-mips.c (load_register): Remove unused variable tmp.
+ * configure.in: detect cygwin* instead of cygwin32*
+ * configure: regenerate
-Wed Sep 4 11:24:29 1996 James G. Smith <jsmith@cygnus.co.uk>
+Tue Oct 27 13:18:40 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (load_register): Remove unnecessary code that
- was causing the high 32bits of 64bit constants to be lost.
-
-Tue Sep 3 13:52:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/tc-d10v.c: Added changes to support function
- pointers and "@word" syntax.
+ * listing.c: Add support for producing a listing from piped
+ input.
-Tue Sep 3 11:57:18 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-v850.c: Remove commented out and #if 0'd code.
- (v850_reloc_prefix): Provide prototype.
- (postfix, get_reloc, build_insn): Remove prototypes for nonexistant
- functions.
- (md_begin, md_assemble, md_apply_fix3): Remove unused variables.
- (md_assemble): Add default to case statement.
+Tue Oct 27 08:56:44 1998 Gavin Romig-Koch <gavin@cygnus.com>
-Sat Aug 31 16:03:00 1996 Jeffrey A Law (law@cygnus.com)
+ * config/tc-mips.c (hilo_interlocks): Remove mips_3900.
+ (append_insn): Account for the tx39's multiply behavior.
- * config/tc-v850.c (md_assemble): Compute size of the instrction
- from the opcode.
+1998-10-26 Michael Meissner <meissner@cygnus.com>
- * config/tc-v850.c (md_apply_fix3): Do simple byte, short and
- word fixups too.
+ * 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.
-Fri Aug 30 23:50:08 1996 Jeffrey A Law (law@cygnus.com)
+Sat Oct 24 15:12:19 1998 Catherine Moore <clm@cygnus.com>
- * config/tc-v850.c (md_apply_fix3): Use little endian get/put
- routines to fetch/store the updated instruction from/to memory.
- (v850_insert_operand): If the operand has a specialized insert
- routine, call it.
+ * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and
+ WEAK handling.
-Fri Aug 30 18:35:26 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+Thu Oct 22 12:41:33 1998 Catherine Moore <clm@cygnus.com>
- * config/tc-v850.c (reg_name_search): Align calling convention to
- be like identical function found in tc-ppc.c.
- (get_reloc): Removed.
- (v850_reloc_prefix): New function, parse lo(), hi() and hi0().
- (md_assemble): emit fixups.
- (md_pcrel_from): renamed from md_pcrel_from_section, emit proper
- displacement.
- (md_apply_fix3): handle fixups/relocs.
- * config/tc-v850.h (MD_PCREL_FROM_SECTION): Removed definition.
-
-Fri Aug 30 18:12:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- Add SH ELF support.
- * configure.in (sh-*-elf*): New target.
- * config/tc-sh.h (TARGET_ARCH): Define.
- (WORKING_DOT_WORD): Define.
- (TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
- (BFD_ARCH, COFF_MAGIC, TC_COUNT_RELOC): Likewise.
- (TC_RELOC_MANGLE, tc_coff_symbol_emit_hook): Likewise.
- (DO_NOT_STRIP, NEED_FX_R_TYPE, TC_KEEP_FX_OFFSET): Likewise.
- (TC_COFF_SIZEMACHDEP, tc_frob_file): Likewise.
- (SUB_SEGMENT_ALIGN): Likewise.
- (RELOC_32): Don't define.
- (tc_frob_file_before_adjust): Define if BFD_ASSEMBLER.
- (target_big_endian): Declare if OBJ_ELF.
- (TARGET_FORMAT): Define if OBJ_ELF.
- * config/tc-sh.c: Use BFD reloc codes instead of SH COFF reloc
- numbers throughout.
- (tc_crawl_symbol_chain): Only define if OBJ_COFF.
- (tc_headers_hook, tc_coff_sizemachdep): Likewise.
- (struct sh_count_relocs): Define.
- (sh_count_relocs): New static function, broken out of
- sh_frob_file. Add BFD_ASSEMBLER code.
- (sh_frob_section): Likewise.
- (sh_frob_file): Call sh_frob_section.
- (md_convert_frag): If BFD_ASSEMBLER, change type of headers, and
- call section_symbol rather than seg_info (seg)->dot.
- (md_section_align): Add OBJ_ELF version.
- (SWITCH_TABLE_CONS): Define.
- (SWITCH_TABLE): Use SWITCH_TABLE_CONS.
- (md_apply_fix): Change parameter types if BFD_ASSEMBLER. Only
- handle fx_r_type == 0 if not BFD_ASSEMBLER. Return 0 if
- BFD_ASSEMBLER.
- (struct reloc_map): Define if not BFD_ASSEMBLER.
- (coff_reloc_map): Likewise.
- (sh_coff_reloc_mangle): Use coff_reloc_map to convert fx_r_type.
- (tc_gen_reloc): New function if BFD_ASSEMBLER.
- * write.c (write_relocs): Ifdef out fx_where test which triggers
- inappropriately for SH ELF.
- (write_object_file): Call tc_frob_file_before_adjust and
- obj_frob_file_before_adjust if they are defined.
+ * cgen.c (gas_cgen_md_apply_fix3): Revert last change.
- * write.c (write_object_file): Use BFD_RELOC_16, not
- BFD_RELOC_NONE, when calling fix_new_exp for a broken word.
+Thu Oct 22 10:03:15 1998 Ron Unrau <runrau@cygnus.com>
- * read.c (emit_expr): Fix conversion of byte count to BFD reloc
- code.
+ * config/tc-mips.c : support frame and regmask/fregmask when
+ MIPS_STABS_ELF is specified.
-Fri Aug 30 14:47:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Wed Oct 21 11;34:51 1998 Catherine Moore <clm@cygnus.com>
- * config/tc-d10v.c (find_opcode): Fix problem with calculating
- branch sizes in across sections.
+ * 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.
-Fri Aug 30 00:44:13 1996 Jeffrey A Law (law@cygnus.com)
+Tue Oct 20 11:18:28 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-850.c (md_assemble): Handle hi() correctly. Handle
- hi0() too.
+ * 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.
-Wed Aug 28 23:11:08 1996 Jeffrey A Law (law@cygnus.com)
+ * 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-v850.c (md_begin): Deal with end of opcode
- table marker.
+ * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX.
-Wed Aug 28 19:20:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-i386.c (i386_operand): Check for garbage after
+ register name.
- * config/tc-d10v.c (find_opcode): Fix a bug which could generate
- the wrong opcode for cases like st2w where there are many forms
- of the same instruction.
+Tue Oct 20 10:49:42 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Aug 27 13:53:22 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc
+ for BFD_ASSEMBLER to only change value when COFF if TE_PE.
- * expr.c (operand): If md_parse_name is defined, call it before
- calling symbol_find_or_make.
- * config/tc-ppc.h (md_parse_name): Define.
- (ppc_parse_name): Declare.
- * config/tc-ppc.c (reg_name_search): Add regs and regcount
- parameters.
- (register_name): Update call to reg_name_search.
- (cr_operand): New static variable.
- (cr_names): New static const array.
- (ppc_parse_name): New function.
- (md_assemble): If PPC_OPERAND_CR is set in the operand flags, set
- cr_operand before calling expression.
+Mon Oct 19 20:20:42 1998 Catherine Moore <clm@cygnus.com>
-Tue Aug 27 09:05:50 1996 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * config/tc-hppa.c (tc_gen_reloc): Add new argument to
- hppa_gen_reloc_type call.
+Mon Oct 19 12:35:43 1998 Doug Evans <devans@seba.cygnus.com>
-Mon Aug 26 18:24:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * 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.
- * config/tc-d10v.c: Fixed ".word". Fixed problem with range checking
- on addresses. Improved error messages.
- * doc/c-d10v.texi: Added docs for register pairs.
+Mon Oct 19 13:16:12 1998 Catherine Moore <clm@cygnus.com>
-Mon Aug 26 13:39:27 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-m32r.c (m32r_force_relocation): Fix typo.
- * config/tc-d10v.c (parallel_ok): Fix bug in parallel
- checking code.
+Sun Oct 18 18:48:57 1998 Jeffrey A Law (law@cygnus.com)
-Mon Aug 26 14:38:22 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-sh.c (md_assemble): Make sure the entire opcode is
+ converted into lower case.
- * ecoff.c (init_file): Initialize fMerge to 1.
- (add_file): Restore old file merging code, but only merge files if
- fMerge is set.
- (ecoff_directive_loc): Clear fMerge field of current file.
- (ecoff_generate_asm_lineno): Likewise.
+Fri Oct 16 13:36:34 CDT Catherine Moore <clm@cygnus.com>
-Fri Aug 23 11:40:47 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * 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.
- * doc/c-d10v.texi: Fix typo.
+Wed Oct 14 11:33:38 1998 Nick Clifton <nickc@cygnus.com>
-Fri Aug 23 10:41:32 1996 Jeffrey A Law (law@cygnus.com)
+ * doc/c-arm.texi (ARM Directives): Document .ltorn directive.
- * config/tc-v850.c (md_assemble): Correct bit masking for
- hi and lo expressions.
+Mon Oct 12 11:07:21 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-v850.c (md_assemble): Rough cut at demanding
- "ep" or "r30" in sst and sld instructions.
- (md_apply_fix3): Don't abort. Just warn that we don't
- have relocs yet.
+ * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode
+ to lower case before parsing.
- * config/tc-v850.c (CC_NAME_CNT): Define.
- (cc_name): New function.
- (md_assemble): Handle V850_OPERAND_CC correctly.
+ * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly
+ parallel insns modift buts in the PSW as a side effect.
- * config/tc-v850.c (md_assemble): Don't forget to initialize
- "insn"!
+Thu Oct 8 10:18:33 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-v850.c (reg_name_search): Generalize to search
- any given register table.
- (register_name): Pass appropriate table and size to reg_name_search.
- (system_register_name): New function.
- (SYSREG_NAME_CNT): Define.
- (md_assemble): Handle operands which are system registers.
+ * config/tc-d30v.c (find_format): Test for missing flag and
+ control registers.
- * config/tc-v850.c (md_assemble): If we find a register, but the
- opcode doesn't want a register, then we don't have a match.
- (md_assemble): Get size of the instruction from the opcode table.
-
-Thu Aug 22 10:20:30 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set and substitute HLDENV.
- * configure: Rebuild.
- * Makefile.in (HLDENV): New variable.
- (as.new): Use $(HLDENV).
-
- * ecoff.c (ecoff_directive_endef): Avoid a division by zero error
- if an array dimension is not known.
-
-Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ (md_apply_fix3): Fix error messages to avoid
+ assumption about presence of a symbol.
- * config/tc-d10v.c: Fix a reloc bug caused by my last change.
- * doc/c-d10v.texi: Cleanup.
-
-Tue Aug 20 15:15:16 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+ (parallel_ok): Disallow parallel instructions that both modify the
+ same flag register.
- * config/tc-v850.c: New file.
- * config/tc-v850.h: New file.
- * configure (v850-*-elf): New target.
- * configure.in (v850-*-elf): New target.
-
-Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ (find_format): Generate a warning if an odd numbered register is
+ used as the first register in a mutli-register instruction.
- * doc/c-d10v.texi: New file.
- * doc/all.texi: Added D10V stuff.
- * doc/as.texinfo: Added D10V stuff.
+Wed Oct 7 14:09:14 1998 Nick Clifton <nickc@cygnus.com>
-Tue Aug 20 14:10:02 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-d30v.c (md_apply_fix3): Do not assume that bad
+ relocations are always associated with a symbol.
- * config/tc-d10v.c: All references to defined symbols should
- now use the optimal instruction. .float and .double now work.
+Tue Oct 6 09:31:15 1998 Catherine Moore <clm@cygnus.com>
-Mon Aug 19 14:41:36 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/obj-coff.c (fixup_segment): Adjust PC relative reloc by
- section address for the i960 as is done for the i386.
+Mon Oct 5 09:25:32 1998 Catherine Moore <clm@cygnsu.com>
-Thu Aug 15 16:37:59 1996 Stan Shebs <shebs@andros.cygnus.com>
+ * 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.
- * mpw-config.in: Add wildcards for config matching, add mips-*-*
- case, forward-include bfd/elf-bfd.h.
+Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com)
-Thu Aug 15 13:24:30 1996 Martin M. Hunt <hunt@pizza.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".
- * config/tc-d10v.c: Add additional information to the opcode
- table to help determinine which instructions can be done
- in parallel.
+Sun Oct 4 20:57:43 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-Thu Aug 15 17:01:31 1996 James G. Smith <jsmith@cygnus.co.uk>
+ * 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-arm.c: Major changes to add Thumb support, with lots
- of change input from <rearnsha@armltd.co.uk>.
- Reverted to INSN_SIZE macro, rather than insn_size variable.
- (insns): Added ARM "bx" instruction support.
- (tinsns): Added Thumb instruction definition structure.
- (arm_tops_hsh): Added hash structure for Thumb opcodes.
- (md_pseudo_table): Added ".arm", ".thumb" and ".code" pseudo-ops.
- (opcode_select,s_arm,s_thumb,s_code): Added.
- (decode_shift): Allow upper-case RRX.
- (do_ldst): Simpler halfword support.
- (do_ldmstm): Improved.
- (reg_list, do_bx, thumb_reg, thumb_add_sub, thumb_shift,
- thumb_mov_compare, thumb_load_store, do_t_arit, do_t_add,
- do_t_asr, do_t_branch, do_t_bx, do_t_compare, do_t_ldmstm,
- do_t_ldrb, do_t_ldrh, do_t_lds, do_t_lsl, do_t_lsr, do_t_mov,
- do_t_push_pop, do_t_str, do_t_strb, do_t_strh, do_t_sub, do_t_swi,
- do_t_adr): Added.
- (md_apply_fix3): Add support for BFD_RELOC_ARM_THUMB_* relocations.
- (md_parse_option): Add support for -mthumb.
- (md_show_usage): Updated to reflect new command line option.
- (arm_data_in_code, arm_canonicalize_symbol_name): Added.
- * config/tc-arm.h: Provide TC_FIX_TYPE to allow private ARM
- fragment information to be held.
+ From Jeff B Epler <jepler@usgs.gov>
+ * doc/c-i386.texi (i386-SIMD): New section.
-Thu Aug 15 16:12:00 1996 Richard Earnshaw (rearnsha@armltd.co.uk)
+Thu Oct 1 15:37:54 1998 Richard Henderson <rth@cygnus.com>
- * tc-arm.c (md_apply_fix3): Also set fixP->fx_done if fx_addsy is
- non-null, but is a constant.
- (fix_new_arm): Call make_expr_symbol to make the expression symbol
- so that error reporting will work correctly.
+ * read.c (discard_rest_of_line): New function.
+ * read.h: Declare it.
+ * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it.
-Wed Aug 14 10:37:21 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Oct 1 10:33:53 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust relocs
- against weak symbols.
+ * config/tc-d10v.c (find_symbol_matching_register): New function.
+ (find_opcode): Cope with the case where a register name matches
+ a symbol name.
-Tue Aug 13 17:39:24 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Sep 30 10:52:32 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-ppc.h (TC_FORCE_RELOCTION): Define if OBJ_XCOFF.
- (ppc_force_relocation): Declare if OBJ_XCOFF.
- * config/tc-ppc.c (ppc_force_relocation): New function if
- OBJ_XCOFF.
+ * config/tc-v850.c (md_pcrel_from): Rename to
+ v850_pcrel_from_section.
+ (v850_pcrel_from_section): Do not resolves symbols in other
+ sections.
-Mon Aug 12 16:49:43 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
- * config/tc-mips.h (BYTE_ORDER): Don't define. No longer used.
+Mon Sep 28 11:01:20 1998 Nick Clifton <nickc@cygnus.com>
-Fri Aug 9 17:48:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * 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-d10v.c: Fix problem with relocs.
+Fri Sep 25 10:04:21 1998 Nick Clifton <nickc@cygnus.com>
-Fri Aug 9 14:16:14 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-d30v.c (write_2_short): But do allow delayed branch
+ instructions to have another instruction in the right bin.
- * config/tc-sh.c (sh_do_align): If not BFD_ASSEMBLER, always align
- with nops if not in data_section or bss_section.
+Thu Sep 24 09:28:34 1998 Nick Clifton <nickc@cygnus.com>
-Thu Aug 8 12:32:56 1996 Klaus Kaempf <kkaempf@progis.de>
+ * config/tc-d30v.c (write_2_short): Do not allow instructions in
+ the right container if the left container holds a branch
+ instruction.
- Add support for openVMS/Alpha.
- * as.h (PRINTF_LIKE): Don't define if VMS, for now.
- * config/obj-evax.c: New file.
- * config/obj-evax.h: New file.
- * config/tc-alpha.c: Add support for EVAX format if OBJ_EVAX is
- defined.
- * config/tc-alpha.h: Add support for EVAX format if OBJ_EVAX is
- defined. Add case for bfd_target_evax_flavour.
- * config/vms-a-conf.h: New file.
- * conf-a-gas.com: New file.
- * configure.in: Add target alpha-*-*vms*.
- * configure: Rebuild.
- * makefile.vms: New file.
- * read.c (s_lcomm): Align bss_seg on 8 byte boundary if OBJ_EVAX.
- Don't call ffs on openVMS/Alpha.
-
-Wed Aug 7 14:19:03 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
-
- * configure.in: Make GAS_CHECK_DECL_NEEDED include <string.h> or
- <strings.h> if they exist. Call GAS_CHECK_DECL_NEEDED on strstr
- and sbrk.
- * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
- (NEED_DECLARATION_SBRK): New macro.
- * configure, conf.in: Rebuild.
- * as.h: Only include <strings.h> if HAVE_STRINGS_H.
- (strstr): Declare if NEED_DECLARATION_STRSTR.
- * as.c: If HAVE_SBRK and NEED_DECLARATION_SBRK, declare sbrk.
-
-Wed Aug 7 11:50:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * symbols.c (resolve_symbol_value): Handle addition or subtraction
- by a constant before entering the main switch. Reject attempts to
- apply an arithmetic function to non-absolute symbols, except for
- the special case of subtraction of two symbols in the same
- section.
+Wed Sep 23 10:54:29 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (md_section_align): Do align if OBJ_ELF, but
- not to more than a 16 byte boundary.
+ * 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.
- * config/tc-i386.c (tc_gen_reloc): Accept all relocs; remove
- #ifndef OBJ_ELF lines. From Eric Valette <valette@crf.canon.fr>.
- (tc_gen_reloc): If out of memory call as_fatal rather than
- assert. If no howto found, call as_bad_where rather than
- as_fatal. Change the error message slightly. Set howto to a
- non-NULL value in order to keep going.
+Tue Sep 22 17:49:16 1998 Nick Clifton <nickc@cygnus.com>
-Tue Aug 6 12:58:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU
+ execution unit class.
- * config/tc-d10v.c: Added code to support 32-bit fixups for stabs.
+ (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 Aug 6 11:15:26 1996 Jeffrey A Law (law@cygnus.com)
+Tue Sep 22 16:40:52 1998 Jim Wilson <wilson@cygnus.com>
- * config/tc-h8300.c (get_specific): New operand "size" derived
- from ".b", ".w" and ".l" extensions. All callers changed. If
- the base instruction has no operands, then use the size to
- determine which specific instruction to use.
+ * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens.
-Mon Aug 5 14:21:10 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Sep 22 15:44:21 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-i960.c (mem_fmt): Call parse_expr before emit.
+ * 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.
-Fri Aug 2 11:23:31 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Sep 21 10:42:57 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (md_section_align): Don't change addr if
- OBJ_ELF.
+ * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset
+ the previous insn to empty.
-Thu Aug 1 23:51:52 1996 Jeffrey A Law (law@cygnus.com)
+1998-09-20 Michael Meissner <meissner@cygnus.com>
- * config/tc-hppa.c: Revert yesterday's changes.
-
-Wed Jul 31 14:46:11 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-ppc.c (md_apply_fix3): Do not break string into two
+ pieces, forcing the use of an ANSI compiler.
- * config/tc-d10v.c: Disable range checking on 16-bit values.
+Sun Sep 20 00:58:12 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Wed Jul 31 16:27:19 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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/tc-m68k.c (m68k_ip): Set ok_arch for every instruction,
- not just the ones that don't match.
+Tue Sep 15 08:51:07 1998 Catherine Moore <clm@cygnus.com>
+
+ * 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 Jul 31 11:45:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Wed Sep 9 11:27:16 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-d10v.c: Fixed bugs in short relocs and range checking.
+ * config/tc-i386.c (i386_operand): Fix typo in last patch.
-Wed Jul 31 15:41:42 1996 James G. Smith <jsmith@cygnus.co.uk>
+Tue Sep 8 18:10:01 1998 Catherine Moore <clm@cygnus.com>
+
+ * config/tc-arm.c (arm_adjust_symtab): Move #ifdef
+ OBJ_COFF so that routine is defined for a.out format.
- * config/tc-arm.c: Changed INSN_SIZE to variable insn_size, as
- pre-cursor to adding Thumb support. Also added cpu_variant flag
- information to each of the asm_flg structures.
- (md_parse_option): Updated ARM7 parsing to allow 't' for
- thumb/halfword support, aswell as 'm' for long multiply.
- (md_show_usage): Updated help message.
- (md_assemble): Check that instruction flags are applicated to the
- current cpu variant.
- (md_apply_fix3, tc_gen_reloc): Add BFD_RELOC_ARM_OFFSET_IMM8 and
- BFD_RELOC_ARM_HWLITERAL relocation support for new halfword and
- signextension instructions.
- (do_ldst): Generate halfword and signextension variants if
- mnemonic flags match.
- (ldst_extend): Do not allow shifts in the offset field of halfword
- or signextension instructions.
- (validate_offset_imm): Provide check on halfword and signextension
- immediate range.
- (add_to_lit_pool): Merge identical literal pool values.
+Tue Sep 8 15:56:19 1998 Richard Henderson <rth@cygnus.com>
-Tue Jul 30 14:28:23 1996 Jeffrey A Law (law@cygnus.com)
+ * config/tc-i386.c (i386_operand): Detect non-segment registers
+ used as segment prefixes.
- * config/tc-hppa.c (selector_table): Add 'E' selector.
- (cons_fix_new_hppa): Don't coke on e_esel.
- (tc_gen_reloc, SOM version): Handle R_COMP2 when used
- to help generate exception handling tables.
- (md_apply_fix): Don't try to apply fixups with an e_esel
- selector.
- (hppa_fix_adjustable): Fixups with e_esel selectors
- are not adjustable.
+Sat Sep 5 19:00:38 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Jul 30 15:51:41 1996 Ian Lance Taylor <ian@cygnus.com>
+ * ehopt.c (check_eh_frame): Check the size of the FDE, and don't
+ optimize across FDE boundaries.
- * config/tc-sparc.c (md_pseudo_table): Add 2byte, 4byte, and 8byte
- pseudo-ops.
+ * config/obj-coff.c (obj_coff_section): Preserve any link once
+ flags when setting the section flags.
-Fri Jul 26 11:43:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Fri Sep 4 17:07:14 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-d10v.c: Added lots of error checking. Added hacks
- to support accumulator shifts.
-
-Fri Jul 26 11:56:08 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.h (obj_adjust_symtab): Fixed typo.
+ * config/tc-arm.c (armelf_adjust_symtab): Reformatted.
- * symbols.c (S_SET_EXTERNAL): Let .weak override.
- (S_CLEAR_EXTERNAL): Likewise.
- (S_SET_WEAK): Remove error; just let .weak override.
+Fri Sep 4 13:57:43 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
-Thu Jul 25 15:22:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words
+ to the host width.
- * config/tc-d10v.c (md_assemble): Now handles multiline
- instructions.
+Wed Sep 2 11:31:14 1998 Richard Henderson <rth@cygnus.com>
-Thu Jul 25 12:03:33 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * frags.c (frag_grow): Include the size of the frag struct in the
+ obstack chunk size.
- * config/tc-d10v.c: Fix packaging bug. Added range checking.
- Added kludge for divs instruction. Fixed minor problem with
- multiple text sections.
- * config/tc-d10v.h (d10v_cleanup): Change prototype.
-
-Tue Jul 23 10:49:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start
+ if the new subseg comes before the old.
- * config/tc-d10v.c (md_apply_fix3): Fix all instruction
- addresses to be right-shifted by 2.
+Tue Sep 1 15:01:33 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
-Mon Jul 22 11:32:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction
+ to handle edge8 and edge16.
- * config/tc-d10v.c: Many changes to get relocs working.
- (register_name): No longer creates a symbol for register names.
- (pre_defined_registers): moved to opcodes/d10v-opc.c.
- (d10v_insert_operand): Now works correctly for either container.
- * config/tc-d10v.h (d10v_cleanup): Declare.
-
-Mon Jul 22 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (tc_gen_reloc): BFD_RELOC_PCREL_HI16_S and
- BFD_RELOC_PCREL_LO16 are expected to be PC relative.
-
-Mon Jul 22 12:46:55 1996 Richard Henderson <rth@tamu.edu>
-
- * tc-alpha.c: Patches to track current minimum alignment to reduce
- the number of fragments created with frag_align.
- (alpha_current_align): New static variable.
- (s_alpha_text): Reset alignment to 0.
- (s_alpha_data, s_alpha_rdata, s_alpha_sdata): Likewise.
- (s_alpha_stringer, s_alpha_space): New functions.
- (s_alpha_cons, alpha_flush_pending_output): Remove functions.
- (alpha_cons_align): New function to replace both of them.
- (emit_insn): Only align if alpha_current_align is less than 2;
- reset alpha_current_align to 2.
- (s_alpha_gprel32): Likewise.
- (s_alpha_section): New function. Basically duplicate the other
- alpha section change hooks. Only define for ELF.
- (s_alpha_float_cons): Simplify alignment handling.
- (md_pseudo_table): Only define "rdata" and "sdata" if OBJ_ECOFF.
- If OBJ_ELF, define "section", "section.s", "sect", and "sect.s".
- Don't define the s_alpha_cons pseudo-ops. Do define
- s_alpha_stringer and s_alpha_space pseudo-ops.
- (alpha_align): Skip if less than current default alignment. Set
- default alignment.
- * tc-alpha.h (md_flush_pending_output): Remove.
- (md_cons_align): Add.
-
- * tc-alpha.c: Add oodles of function description comments.
- (md_bignum_to_chars): Remove; there are no callers.
- (md_show_usage): Mention some more variants.
-
-Thu Jul 18 15:54:54 1996 Ian Lance Taylor <ian@cygnus.com>
-
- From Andrew Gierth <ANDREWG@microlise.co.uk>:
- * configure.in (sparc-*-sysv4*): New target.
- * configure: Rebuild.
+Mon Aug 31 09:51:14 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-sparc.c (md_pseudo_table): Change uahalf, uaword, and
- uaxword to use s_uacons.
- (sparc_no_align_cons): New static variable.
- (s_uacons): New static function.
- (sparc_cons_align): If sparc_no_align_cons is set, just clear it
- and return.
+ * config/obj-elf.c (obj_elf_vtable_inherit): Print error message
+ before we clobber the symbol involved.
- * config/tc-sparc.c (s_common): Remove unused label allocate_bss.
+Mon Aug 31 10:58:06 1998 Catherine Moore <clm@cygnus.com>
- * configure.in: Add mips-*-irix6* target. Handle Irix 6 like Irix
- 5 with regard to shared libraries.
- * configure: Rebuild.
+ * 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 <rth@cygnus.com>
- * config/tc-m68k.c (m68k_ip): Use the correct length when
- allocating space for the unsupported architecture error message.
+ * 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.
-Thu Jul 18 12:57:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Mon Aug 24 13:40:21 1998 Nick Clifton <nickc@cygnus.com>
- * configure.in (d10v-*-*): Allow d10v-*-*, don't require d10v-*-elf*.
+ * config/tc-arm.c (md_show_usage): Improve formatting of --help output.
-Wed Jul 17 14:25:13 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+Fri Aug 21 18:43:48 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-d10v.c: New file.
- * config/tc-d10v.h: New file.
- * configure (d10v-*-elf): New target.
- * configure.in (d10v-*-elf): New target.
+ * config/tc-d30v.c (md_assemble): Copy previous opcode over
+ current opcode after writing the first insturction of a reverse
+ sequential pair.
-Fri Jul 12 20:54:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Fri Aug 21 07:30:35 1998 Doug Evans <devans@canuck.cygnus.com>
- * config/tc-ppc.c (md_parse_option): Recognize -K PIC.
+ * read.h (generate_lineno_debug): Add prototype.
+ * read.c (generate_lineno_debug): Make non-static.
-Wed Jul 10 12:39:08 1996 Richard Henderson <rth@tamu.edu>
+Thu Aug 20 23:17:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-alpha.c (alpha_align): Change fill parameter
- to a pointer. Take NULL as 0 or nop depending on section. Change
- all callers.
- (s_alpha_align): Rename local variables.
+ * config/tc-i386.c (md_assemble): Only warn for address/data size
+ prefixes.
- * doc/as.texinfo (.align): Document action of omitted
- fill parameter.
+Thu Aug 20 14:45:08 1998 Nick Clifton <nickc@cygnus.com>
-Wed Jul 10 00:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations
+ against Thumb function names, as the linker needs this information.
- * config/tc-ppc.c (md_apply_fix3): Give a useful error message
- when an unsupported PC relative reloc is seen, rather than calling
- abort.
+1998-08-20 Vladimir N. Makarov <vmakarov@cygnus.com>
- * app.c (do_scrub_chars): Remove not_cpp_line local variable.
- Instead, check state when '#' comment is seen.
+ * 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?".
-Mon Jul 8 14:11:49 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Aug 19 09:30:16 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (mips_regmask_frag): Only define if OBJ_ELF or
- OBJ_MAYBE_ELF.
- (tc_gen_reloc): If fixup was changed to be PC relative, change
- reloc type accordingly. Use name of reloc in error message.
+ * 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.
- * as.h: Don't define const or volatile.
- * flonum.h: Don't define const.
+Tue Aug 18 11:59:43 1998 Catherine Moore <clm@cygnus.com>
- * config/tc-m68k.c (tc_gen_reloc): Change the code appropriately
- if fx_pcrel is set. Correct setting the addend case in the
- OBJ_ELF case (from Andreas Schwab
- <schwab@issan.informatik.uni-dortmund.de>).
- (md_show_usage): Correct -mfc5200 to -m5200.
+ * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF.
+ * tc-arm.c (arm_fix_adjustable): New routine.
-Fri Jul 5 10:32:58 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+1998-08-13 Vladimir N. Makarov <vmakarov@cygnus.com>
- * doc/c-m68k.texi: Document -m5200 flag.
- * doc/as.texinfo: Likewise.
+ * 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.
- * config/tc-m68k.c (m68k_ip): The coldfire does not support 8x
- scale factor.
+Thu Aug 13 15:08:42 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri Jul 5 11:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * symbols.c (S_SET_EXTERNAL): Change as_warn to as_bad.
- (S_CLEAR_EXTERNAL, S_SET_WEAK): Likewise.
+Wed Aug 12 18:47:38 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Jul 4 11:59:46 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (pa_enter): Call as_bad rather than abort.
+ (pa_leave): Likewise.
- * Makefile.in (VERSION): Set to cygnus-2.7.1.
+Wed Aug 12 13:25:03 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- * Released binutils 2.7.
+ * config/tc-i386.c (md_assemble): Emit a warning for stand-alone
+ prefixes.
+ (i386_operand): Fix an error message.
-Thu Jul 4 10:11:33 1996 James G. Smith <jsmith@cygnus.co.uk>
+Tue Aug 11 14:44:32 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (mips_ip): Only perform range check when
- dealing with O_constant expressions.
+ * doc/c-arm.texi (ARM Directives): Document .req directive.
-Wed Jul 3 15:02:21 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+ * 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.
- * m68k-parse.h (m68k_register): Add new coldfile control
- registers.
+Mon Aug 10 15:39:56 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-m68k.c (mcf5200_control_regs): New variable,
- array of control registers for the coldfire.
- (cpu_of_arch): Added mcf5200.
- (archs): Added mcf5200.
- (init_table): Add new control registers.
- (m68k_ip): Added support for new control registers.
- (m68k_init_after_args): Likewise.
+ * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as
+ we do for EXTERN.
- * config/tc-m68k.c (md_show_usage): Add -m5200 to usage text.
+Mon Aug 10 15:06:18 1998 Nick Clifton <nickc@cygnus.com>
-Wed Jul 3 16:05:50 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-d30v.c (d30v_align): Always perform alignment request,
+ even if it is belived to be unnecessary.
- * read.h (is_it_end_of_statement): Declare.
- * read.c (is_it_end_of_statement): Remove declaration.
+Mon Aug 10 17:48:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- * config/tc-ppc.c (ppc_elf_suffix): Correct parenthesization of ||
- within &&.
- (md_assemble): Fix handling of @l with an unsigned constant. Add
- default case to reloc switch.
+ config/tc-i386.c (i386_operand): Size immediate constants by
+ suffix (erroneously removed as part of July 7 change).
- * config/tc-i386.h (AOUT_MACHTYPE): Define as 0 if TE_386BSD.
+Sun Aug 9 20:45:32 1998 Catherine Moore <clm@cygnus.com>
- Based on patches from Tom Quiggle <quiggle@sgi.com>:
- * ecoff.c (last_lineno): New static variable.
- (add_procedure): Set last_lineno.
- (ecoff_directive_loc): Likewise.
- (ecoff_generate_asm_lineno): Likewise.
- (ecoff_fix_loc): New function.
- * ecoff.h (ecoff_fix_loc): Declare.
- * config/tc-mips.c (append_insn): When inserting nops, and using
- ECOFF debugging, call ecoff_fix_loc.
+ * 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.
-Tue Jul 2 23:02:12 1996 Jeffrey A Law (law@cygnus.com)
+Sat Aug 8 15:21:28 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-h8300.c (build_bytes): If an operand type is
- marked as SRC_IN_DST retrieve it from the "destination" op.
+ * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms.
-Sat Jun 29 13:38:31 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Aug 5 15:54:14 1998 Nick Clifton <nickc@cygnus.com>
- * configure.in (arm-*-riscix*): Set emulation to riscix.
- * configure: Rebuild.
- * config/te-riscix.h: New file to define TE_RISCIX.
+ * config/tc-arm.c (md_begin): Set BFD private flags depending upon
+ command line switches passed to assembler.
- * config/tc-sh.h (SUB_SEGMENT_ALIGN): Define.
+Mon Aug 3 14:02:52 1998 Doug Evans <devans@seba.cygnus.com>
-Fri Jun 28 15:14:31 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (config.status): Just run config.status as other
- tools do.
-
-Fri Jun 28 11:09:38 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in (TARGET_OS): Add definition to conf.
+ * 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.
-Thu Jun 27 20:39:40 1996 James G. Smith <jsmith@cygnus.co.uk>
+Sat Aug 1 19:27:30 1998 Richard Henderson <rth@cygnus.com>
+
+ * 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 <runrau@cygnus.com>
+
+ 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 <clm@cygnus.com>
+
+ * 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 <fche@cygnus.com>
+
+ * 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 <scox@cygnus.com>
+
+ * 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-mips.c (append_insn): Parenthesize
- cop_interlocks expressions.
+ * 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.
-Thu Jun 27 12:18:26 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Jul 27 16:25:58 1998 Doug Evans <devans@canuck.cygnus.com>
- * listing.c (listing_print): Close the listing file if it is not
- stdout. Close the other files opened for the listing.
+ * 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.
- * config/tc-sparc.h (md_cons_align): Define.
- (sparc_cons_align): Declare.
- (HANDLE_ALIGN): Define.
- (sparc_handle_align): Declare.
- * config/tc-sparc.c (sparc_cons_align): New function.
- (sparc_handle_align): New function.
- * read.c (cons_worker): Call md_cons_align if it is defined.
+Fri Jul 24 19:58:59 1998 Doug Evans <devans@canuck.cygnus.com>
- * as.h (struct frag): Add fr_file and fr_line fields.
- * frags.c (frag_new): Set fr_file and fr_line.
- (frag_var): Likewise.
- (frag_variant): Likewise.
+ * Makefile.am (install-exec-local): Split into two ...
+ (install-exec-bindir,install-exec-tooldir): New rules.
+ * Makefile.in: Regenerate.
- * as.h (struct frag): Remove unused align_mask and align_offset
- fields.
+Fri Jul 24 16:31:49 1998 Ian Lance Taylor <ian@cygnus.com>
- * listing.c (calc_hex): Offset by fr_fix when examining fr_var.
- From <uddeborg@carmen.se>.
+ * Makefile.am (install-exec-local): Don't remove the file before
+ checking whether $(bindir) == $(tooldir)/bin. From Maciej
+ W. Rozycki <macro@ds2.pg.gda.pl>.
+ * Makefile.in: Rebuild.
-Wed Jun 26 13:21:34 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jul 24 09:13:46 1998 Doug Evans <devans@canuck.cygnus.com>
- * configure.in (mips-*-osf*): New target.
- * configure: Rebuild.
+ * 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.
- * config/tc-m68k.c: Add 68ec060 as a synonym for 68060.
+Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com)
-Wed Jun 26 16:23:08 1996 James G. Smith <jsmith@cygnus.co.uk>
+ * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL
+ value.
- * config/tc-mips.c: Added cop_interlocks, to avoid NOP insertion
- between co-processor comparisons and branches for the VR4300.
+Wed Jul 22 14:36:56 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Jun 24 18:02:50 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+ * 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.
- * 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.
- * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
- includedir): Use autoconf set values.
- (docdir): Removed.
+Tue Jul 21 16:50:52 1998 Doug Evans <devans@seba.cygnus.com>
-Mon Jun 24 11:58:14 1996 Ian Lance Taylor <ian@cygnus.com>
+ * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand.
+ Update call to insert_operand.
- * listing.c (listing_eject): Don't do anything if listing is 0.
- (listing_list): Likewise.
- (listing_source_line): Likewise.
- (listing_title): Don't save title if listing is 0.
- (listing_source_file): Check listing rather than listing_tail.
+Fri Jul 17 11:42:20 1998 Nick Clifton <nickc@cygnus.com>
- * configure.in: On alpha*-*-osf*, link against libbfd.a if not
- using shared libraries.
- * configure: Rebuild.
+ * config/tc-m32r.c (ms_show_usage): Formatting changes.
-Fri Jun 21 18:22:23 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Jul 15 15:38:28 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-mips.c (mips_ip): In case 'i'/'j', don't require an
- absolute expression if a relocation type was specified.
+ * config/tc-i386.c (md_assemble): Don't get confused by trailing
+ whitespace after a prefix operator.
-Fri Jun 21 17:40:16 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
+Tue Jul 14 15:32:56 1998 Richard Henderson <rth@cygnus.com>
- * configure.in: Add support for *-*-rtems* configurations.
- * configure: Rebuild.
+ * configure.in (i386-*-beos{pe,elf,}*): Recognize.
-Fri Jun 21 16:01:18 1996 Richard Henderson <rth@tamu.edu>
-
- * configure.in: Add alpha-*-linuxecoff* target. Use elf for
- alpha-*-linux* target. Force bfd_gas for alpha-*. Require
- opcodes library for alpha.
- * configure: Rebuild with autoconf 2.10.
- * config/tc-alpha.c: Substantial rewrite to add ELF support and
- use new opcode table.
- * config/tc-alpha.h (md_undefined_symbol): Don't define.
- (LOCAL_LABEL): Define differently if OBJ_ELF.
- (FAKE_LABEL_NAME): Define if OBJ_ELF.
- * config/alpha-opcode.h: Remove.
- * config/obj-elf.h: If TC_ALPHA, define ECOFF_DEBUGGING.
- * Makefile.in (TARG_CPU_DEP_alpha): Depend upon
- include/opcode/alpha.h rather than config/alpha-opcode.h.
-
-Thu Jun 20 19:10:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-aout.c (obj_emit_relocations): Give an error if the
- relocation symbol was not resolved.
- * config/obj-coff.c (do_relocs_for): Likewise.
-
- * write.c (adjust_reloc_syms): Refetch the symbol section after
- calling S_GET_VALUE, since it may have changed.
-
- * expr.c (struct expr_symbol_line): Define.
- (expr_symbol_lines): New static variable.
- (make_expr_symbol): Add entry to expr_symbol_lines.
- (expr_symbol_where): New function.
- * expr.h: Use extern on function declarations.
- (expr_symbol_where): Declare.
- * symbols.c (resolve_symbol_value): Try to use expr_symbol_where
- rather than printing the meaningless name of an expression
- symbol.
+Tue Jul 14 12:33:44 1998 Chris Torek <torek@bsdi.com>
-Thu Jun 20 15:57:41 1996 Ken Raeburn <raeburn@cygnus.com>
+ * 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.c (md_number_to_chars): Deleted.
- * config/tc-i386.h (md_number_to_chars): New macro.
+Tue Jul 14 11:58:40 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-alpha.c (build_operate_n, build_mem): Moved earlier in
- the file.
- (load_symbol_address, load_expression): Use build_mem.
- (build_operate): New function.
- (emit_addq_r): Use it.
+ * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF.
+ (s_common): Likewise.
- Wed Mar 13 22:14:14 1996 Pat Rankin <rankin@eql.caltech.edu>
+ * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct
+ initialization of waddr.
+ (sparc_elf_final_processing): Add default case to switch.
- * symbols.c (colon): #if VMS, use S_SET_OTHER to store `const_flag'.
+Tue Jul 14 11:00:16 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- Tue Mar 5 14:31:45 1996 Pat Rankin <rankin@eql.caltech.edu>
+ * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather
+ than temporary real.
- * config/tc-vax.h (NOP_OPCODE): Define.
+Mon Jul 13 13:55:42 1998 Ian Lance Taylor <ian@cygnus.com>
- Sun Feb 4 21:01:03 1996 Pat Rankin <rankin@eql.caltech.edu>
+ * write.c (subsegs_finish): Don't align the segments if there were
+ any errors.
- * config/obj-vms.h (S_IS_COMMON): Define.
- (S_IS_LOCAL): Check for \002 as well as \001.
- (LONGWORD_ALIGNMENT): New macro.
- (SUB_SEGMENT_ALIGN): Use it.
+ * config/obj-coff.c (c_symbol_merge): Correct number of bytes when
+ copying aux information.
- Fri Jan 26 17:44:09 1996 Pat Rankin <rankin@eql.caltech.edu>
+ * expr.c (make_expr_symbol): Catch attempts to turn an O_big
+ expression into a symbol.
- * config/vms-conf.h: Reconcile with conf.in.
+Mon Jul 13 13:29:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-Wed Jun 19 11:31:50 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * write.c (is_dnrange): Only define if TC_GENERIC_RELAX_TABLE is
- defined.
+Fri Jul 10 16:00:04 1998 Nick Clifton <nickc@cygnus.com>
- * doc/as.texinfo: Document that any number of hex digits can
- follow \x.
-
- * as.c (struct defsym_list): Define.
- (defsyms): New static variable.
- (parse_args): Just put --defsym arguments on defsyms list, rather
- than defining them.
- (main): Define defsyms after output file is created.
-
- * config/tc-m68k.c (m68k_ip): Reject PRE and POST indexing mode on
- cpu32. From Eric Norum <Eric.Norum@usask.ca>.
-
- * config/tc-mips.c (mips_ip): In cases 'I', 'i', and 'j', set
- insn_error rather than calling check_absolute_expr.
-
- * as.c (emulation_name): Remove unused static variable.
- (default_emul_bfd_name): Add return NULL to avoid warning.
- * ecoff.c (ecoff_stab): Remove unused variables name and
- name_end.
- * frags.c (frag_new): Remove unused variable tmp.
- * hash.c (hash_grow): Parenthesize + within <<.
- (hash_print_statistics): Use %lu, not %d, to print unsigned
- long variables.
- * messages.c: Include "libiberty.h".
- (fprint_value): Add cast to avoid printf warning.
- (sprint_value): Likewise.
- * read.c: Include "ecoff.h".
- (emit_expr): Add casts to avoid printf warnings.
- * read.h: Use extern for function declarations.
- (pop_insert): Declare.
- * stabs.c: Include "ecoff.h".
- * subsegs.c (subseg_set_rest): Remove unused variables tmp,
- former_last_fragP, and new_fragP.
- * subsegs.h (subsegs_print_statistics): Declare.
- * symbols.c (debug_verify_symchain): Change macro to discard
- arguments.
- * write.c (dump_section_relocs): Likewise.
- * write.h: Use extern for function declarations.
- (write_print_statistics): Declare.
- * config/e-mipsecoff.c (mipsecoff_bfd_name): Return NULL to avoid
- warning.
- * config/e-mipself.c (mipself_bfd_name): Likewise.
- * config/obj-elf.h (elf_ecoff_set_ext): Declare.
+ * config/tc-v850.c (md_show_usage): Changed format to match that
+ of gcc, ld, etc.
- * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): If OBJ_ELF, always
- emit relocations against external symbols.
+ * as.c (show_usage): Changed format to match that of gcc, ld, etc.
- * config/tc-alpha.c (tc_gen_reloc): Output a sensible error
- message if bfd_reloc_type_lookup fails, rather than calling
- assert.
+Thu Jul 9 12:09:57 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- * config/tc-alpha.c (alpha_force_relocation): Add
- BFD_RELOC_12_PCREL to switch.
+ * 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.
-Tue Jun 18 20:29:57 1996 Doug Evans <dje@canuck.cygnus.com>
+Thu Jul 9 11:31:54 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-i386.h (LOCAL_LABEL,FAKE_LABEL_NAME): Use defaults for
- TE_PE (Lfoo, not .Lfoo).
+ * doc/Makefile.am (MAINTAINERCLEANFILES): Define.
+ * doc/Makefile.in: Rebuild.
-Tue Jun 18 17:13:33 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed Jul 8 12:18:56 1998 Jeffrey A Law (law@cygnus.com)
- * read.c (s_fill): Don't warn about a zero repeat count.
+ * 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.
- * config/tc-mips.c (mips_ip): Don't warn about using AT as a
- coprocessor register.
+Tue Jul 7 17:57:38 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-i386.c (md_assemble): When checking the size of a
- register to set the size of an instruction, do a bitwise and with
- Reg8 and Reg16 rather than requiring the type to be exactly Reg8
- or Reg16.
+ * 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 Jun 18 13:19:51 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+Tue Jul 7 11:42:16 1998 Richard Henderson <rth@cygnus.com>
+
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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 <ian@cygnus.com>
+
+ Based on patch from Matt Semersky <matts@scd.hp.com>:
+ * 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 <ian@cygnus.com>
+
+ * 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 <kkaempf@rmi.de>
+
+ * 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 <rth@cygnus.com>
+
+ * 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 <devans@seba.cygnus.com>
+
+ * Makefile.am (CGEN_CPU_PREFIX): New variable.
+ (cgen.o): Use it.
+ * Makefile.in: Regenerate.
+ * configure.in: AC_SUBST cgen_cpu_prefix.
+ * configure: Regenerate.
- * config/tc-h8300.c (parse_reg): Tweak error messages.
- (build_bytes): Likewise.
- (skip_colonthing): Handle :32 suffix.
- (get_specific): Promote L_24 to L_32 if it makes a match.
- Don't always promote L_8 to L_16.
- (do_a_fix_imm): Clean up L_32 and L_24 handling.
+Wed Jul 1 21:38:56 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/tc-h8300.c (Smode): New variable.
- (h8300hmode): Turn off Hmode.
- (h8300smode): New function. Turn on Smode and Hmode.
- (md_pseudo_table): New ".h8300s" pseudo-op.
- (parse_reg): Handle "exr" register.
- (get_operand): Handle bizarre syntax for "stm.l" and "ldm.l".
- Handle "mach" and "machl" operands for ldmac.
- (get_specific): Handle "stm.l" and "ldm.l".
- (build_bytes): Handle "stm.l" and "ldm.l"; handle MACREG operands.
- * config/tc-h8300.h (COFF_MAGIC): Handle H8/S magic number.
- (Smode): Declare.
+ * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define.
+ Changed all users of COND12_DELAY.
-Mon Jun 17 15:50:53 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com)
- * doc/as.texinfo: Reorder chapter of machine dependent options so
- that it is sorted by chip name.
+ * 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.
- * doc/as.texinfo: Use consistant spelling of Vax.
- * doc/c-vax.texi: Likewise.
+Wed Jun 24 19:06:04 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Jun 17 11:26:56 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+ * 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.
- * config/tc-hppa.c (md_pseudo_table): Add ".begin_try" and ".end_try"
- pseudo ops.
- (tc_gen_reloc, SOM version): Handle R_BEGIN_TRY and R_END_TRY.
- (md_apply_fix): Likewise.
- (pa_try): New function.
- (hppa_force_relocation): Force relocs for BEGIN_TRY and END_TRY.
+Wed Jun 24 13:45:00 1998 Catherine Moore <clm@cygnus.com>
-Sun Jun 16 22:57:47 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+ * config/tc-v850.c (v850_comm): Restore old section
+ after common processing.
- * config/tc-hppa.c (md_pseudo_table): Add ".level" pseudo op.
- (pa_level): New function.
+Wed Jun 24 11:50:54 1998 Klaus Kaempf <kkaempf@progis.de>
-Fri Jun 14 20:06:44 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-vms.c (Create_VMS_Object_File): Force binary file.
- * listing.c (listing_newline): Don't do anything if listing is 0.
+Tue Jun 23 17:47:31 1998 Jim Wilson <wilson@cygnus.com>
-Thu Jun 13 17:50:54 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to
+ char with code that explicitly sign-extends.
- * subsegs.c (section_symbol): If symbol_table_frozen is set, call
- symbol_create, not symbol_new.
+Tue Jun 23 13:54:57 1998 Nick Clifton <nickc@cygnus.com>
+
+ * 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.
-Wed Jun 12 14:10:44 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-coff.c (c_symbol_merge): Replace complex expresion
+ with call to macro SYM_AUXINFO.
- * write.c (adjust_reloc_syms): Don't set sy_used_in_reloc for an
- absolute symbol unless TC_FORCE_RELOCATION returns true.
+Tue Jun 23 15:09:27 1998 Mike Stump <mrs@wrs.com>
- * config/obj-coff.c (previous_file_symbol): Remove BFD_ASSEMBLER
- version.
- (c_dot_file_symbol): BFD_ASSEMBLER version: Don't set the value of
- the symbol to a pointer. Don't set previous_file_symbol.
- Simplify symbol list rearrangement.
- (coff_frob_symbol): Don't do anything with C_FILE symbols.
- (coff_adjust_symtab): Don't check previous_file_symbol.
+ * Makefile.am (install-exec-local): Don't let EXEEXT interfere
+ with the program transform name.
+ * Makefile.in: Rebuild.
-Mon Jun 10 14:52:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Mon Jun 22 19:52:42 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (ppc_elf_lcomm): New function for .lcomm
- directive.
- (md_pseudo_table): Add ppc_elf_lcomm.
+ * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary
+ information.
-Mon Jun 10 11:45:51 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Jun 22 15:18:58 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-m68k.c (m68k_ip): Accept ABSL for 'O', so that `bfextu
- d0{24:1},d0' works without an immediate prefix on the bit numbers.
- (md_begin): Add digits to alt_notend_table.
- (md_parse_option): Make s a const pointer.
+ * 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.
- * config/tc-sparc.c (md_pseudo_table): Add "empty".
- (s_empty): New static function.
+Sun Jun 21 21:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/obj-coff.c (struct filename_list): Only define if not
+ * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if
BFD_ASSEMBLER.
- (filename_list_head, filename_list_tail): Likewise.
- (c_section_symbol): Remove unused BFD_ASSEMBLER version.
- (obj_coff_endef, BFD_ASSEMBLER version): Don't set the debugging
- flag for C_MOS, C_MOE, C_MOU, or C_EOS symbols, since they should
- have a section of N_ABS rather than N_DEBUG. If we do a merge,
- remove the new symbol from the list.
- (obj_coff_endef, both versions): Call tag_insert even if there is
- an old symbol with the same name, if the old symbol does not
- happen to be a tag.
- (coff_frob_symbol): Check SF_GET_TAG, C_EOF, and C_FILE outside of
- the SF_GET_DEBUG condition. Don't call SA_SET_SYM_ENDNDX with a
- symbol that will be moved to the end of the symbol list.
- (coff_adjust_section_syms): Always call section_symbol for .text,
- .data, and .bss.
- (coff_frob_section): Likewise. Also, remove unused variable
- strname.
-
- * config/tc-ns32k.c (convert_iif): Call frag_grow rather than
- manipulating frags directly.
- (md_number_to_field): Adjust mem_ptr correctly if ENDIAN is
- defined.
-
- * app.c (do_scrub_chars): If '/' is LINE_COMMENT_START, check
- whether the next character is '*' before checking whether we are
- at the start of a line. Permit LINE_COMMENT_START to start a
- comment in state 1 (seen some whitespace) as well, to match the
- documentation.
-
- * gasp.c (do_align): Permit a fill value for .align.
-
-Wed Jun 5 17:09:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (next_char_of_string): Warn if a newline is seen in the
- middle of a string. Call bump_line_counters when appropriate.
-
-Wed Jun 5 17:08:36 1996 Richard Henderson <rth@tamu.edu>
-
- * symbols.c (colon): Use LOCAL_LABEL.
-
-Tue Jun 4 10:55:16 1996 Tom Tromey <tromey@csk3.cygnus.com>
-
- * Makefile.in (install): Don't check to see if tooldir exists.
- Make $(tooldir) and $(tooldir)/bin.
-
-Tue Jun 4 10:14:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/ppc-sol.mt (TDEFINES): Don't turn on -mregnames by
- default.
-
-Mon Jun 3 11:34:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (mips_ip): Don't call as_warn if we are setting
- insn_error. Don't put the string "ERROR" in insn_error. Set
- insn_error rather than calling as_warn for an unsupported opcode.
-
-Sat Jun 1 21:51:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (md_parse_option): Check for a 64 bit format
- before permitting -64.
- * output-file.c (output_file_create): Remove duplicate
- bfd_perror.
-
-Fri May 31 01:08:06 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-mips.c (md_begin): If -64, create a .MIPS.options
- section rather than a .reginfo section.
- (mips_elf_final_processing): If -64, write out 64 bit RegInfo
- information.
-
- * config/tc-mips.c (load_register): If mips_isa < 3, permit a 32
- bit value with the high bit set.
-
-Thu May 30 19:00:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (s_lcomm): Set section flags for .sbss section.
- * config/tc-mips.c (mips_64): New static variable.
- (mips_target_format): If mips_64, return elf64 targets rather than
- elf32 ones.
- (md_longopts): Add "32" and "64".
- (md_parse_option): Handle -32 and -64.
- (md_show_usage): Mention -32 and -64.
- (cons_fix_new_mips): If mips_64, don't convert an 8 byte reloc to
- a 4 byte one.
+Sun Jun 21 12:26:36 1998 Nick Clifton <nickc@cygnus.com>
-Thu May 30 10:36:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * config/tc-d30v.c (d30v_align): Always perform alignment request,
+ even if it is belived to be unnecessary.
- * config/tc-ppc.c (comment_chars): Make '!' a comment character
- for Solaris compatibility.
+Fri Jun 19 13:57:06 1998 Ian Lance Taylor <ian@cygnus.com>
- * stabs.c (s_stab_generic): Under PowerPC Solaris, convert a
- .stabd with 4 arguments into a .stabn.
+ * write.c (adjust_reloc_syms): Never adjust relocs against weak
+ symbols.
+ * config/tc-mips.c (md_apply_fix): Adjust accordingly.
-Wed May 29 16:43:16 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 19 09:50:17 1998 Jeffrey A Law (law@cygnus.com)
- * config/tc-mips.c (macro): When passing X_add_number to
- macro_build, cast it to int first.
+ * 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.
-Tue May 28 13:29:39 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 19 00:44:19 1998 Jeffrey A Law (law@cygnus.com)
- * config/tc-z8k.c (md_apply_fix): Handle fx_r_type of 0, as
- created by emit_expr.
+ * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support.
- * symbols.c (symbol_create): If bfd_make_empty_symbol fails, call
- as_perror rather than assert.
+Wed Jun 17 13:07:05 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri May 24 18:24:11 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (md_show_usage): Fix -mipsN usage.
- * config/tc-mips.c (mips_ip): Mark sections created to hold
- floating point information as read only.
+Tue Jun 16 13:06:21 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-Fri May 24 12:07:54 1996 David Edelsohn <edelsohn@mhpcc.edu>
+ * 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.
- * config/tc-ppc.c (ppc_set_cpu): Change defaults to match AIX.
+Fri Jun 12 13:36:54 1998 Tom Tromey <tromey@cygnus.com>
-Thu May 23 17:34:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
+ ($(PACKAGE).pot): Unconditionally depend on POTFILES.
- * read.c (potable): Add .skip as a synonym for .space.
+1998-06-12 Vladimir N. Makarov <vmakarov@cygnus.com>
- * stabs.c (s_stab_generic): For PowerPC ELF, allow .stabd to take
- 4 arguments, providing the 4th argument is 0, to allow
- compatibility with the Solaris assembler.
+ * config/tc-d10v.c (md_apply_fix3): Checking displacement
+ constraint in instructions REP & REPI.
-Thu May 16 15:51:48 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Jun 11 08:56:46 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-sh.h (struct sh_segment_info_type): Define.
- (TC_SEGMENT_INFO_TYPE): Define.
- (sh_frob_label): Declare.
- (tc_frob_label): Define.
- (sh_flush_pending_output): Declare.
- (md_flush_pending_output): Define.
- * config/tc-sh.c (md_assemble): If relaxing, emit a R_SH_CODE
- reloc before the instruction if necessary.
- (sh_frob_label): New function.
- (sh_flush_pending_output): New function.
- (sh_coff_frob_file): Ignore ALIGN, CODE, DATA, and LABEL relocs
- when looking for the reloc for the target of .uses.
- (md_convert_frag): Fix printf format (%0xlx to 0x%lx).
- (sh_force_relocation): Force CODE, DATA, and LABEL relocs to be
- emitted.
- (md_apply_fix): Ignore CODE, DATA, and LABEL relocs.
- (sh_coff_reloc_mangle): Force CODE, DATA, and LABEL relocs to use
- the absolute symbol.
+ * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8,
+ BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages.
- * subsegs.h (segment_info_type): Add tc_segment_info_data field if
- TC_SEGMENT_INFO_TYPE is defined.
+ (check_range): If the operand is shifted, then shift the number
+ before checking its range.
-Wed May 15 12:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
+ * write.c (adjust_reloc_syms): Add more checks for NULL pointers.
- * config/tc-i386.c (md_assemble): Make sure the opcode suffix
- matches the register size.
+ * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special
+ common sections.
-Wed May 15 08:33:37 1996 Jeffrey A Law (law@cygnus.com)
+Wed Jun 10 17:26:35 1998 Nick Clifton <nickc@cygnus.com>
- * config/obj-coff.c (count_entries_in_chain): Ignore Fixups with
- fx_done set.
- (do_relocs_for): Likewise.
- (fixup_segment): Don't just quit if linkrelax is set. Try to
- apply non pc-relative sym1-sym2 fixups, even if linkrelax is
- nonzero.
+ * config/tc-v850.c (v850_comm): Create special sections as needed.
-Fri May 10 14:16:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+1998-06-10 Vladimir N. Makarov <vmakarov@cygnus.com>
- * config/tc-ppc.c (ppc_elf_validate_fix): Allow GOT and section
- relative relocations with -mrelocatable. Also allow unfixed
- relocs in .ex_shared.
+ * config/tc-d10v.c (write_2_short): Addition of swapping
+ instructions for sequential and reverse sequential order when
+ given order is not possible.
-Tue May 7 11:24:10 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Jun 9 13:52:53 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/obj-coff.c (yank_symbols): Check that FNAME_OFFSET is
- non-zero before assuming this is a long file name.
- (w_strings): Likewise.
- (c_dot_file_symbol): Set FNAME_OFFSET to 1 for a long file name.
+ * Makefile.am: Rebuild dependencies.
+ (DEP_INCLUDES): Fix reference to intl build directory.
+ * Makefile.in: Rebuild.
- * config/obj-coff.c (w_strings): Move declaration of i inside
- #ifdef block which uses it.
+Tue Jun 9 12:20:05 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-Tue May 7 00:49:58 1996 Jeffrey A Law (law@cygnus.com)
+ * doc/c-i386.texi: Update 16 bit documentation.
- * config/tc-h8300.c (do_a_fix_imm): Rename last argument to
- "relaxmode". Output relocs which identify various relaxing
- possibilities for mov.[bwl] instructions.
- (build_bytes): Pass in a relaxing mode to do_a_fix_imm.
+ * 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 May 6 15:26:28 1996 Doug Evans <dje@canuck.cygnus.com>
+Mon Jun 8 18:32:01 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-arm.h (TC_HANDLES_FX_DONE): Define.
- (MD_APPLY_FIX3): Define.
- * config/tc-arm.c (my_get_expression): Only watch for bad segments
- if OBJ_AOUT.
- (md_apply_fix3): Renamed from md_apply_fix.
- If pcrel reloc and symbol is in different section, undo effects
- of md_pcrel_from.
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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
+ <martynas@nm3.ktu.lt>:
+ * 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 <hjl@gnu.org>:
+ * 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 <clm@cygnus.com>
+
+ * config/tc-v850.c (md_begin): Restore creation of
+ .call_table_text and .call_table_data sections.
-Sat May 4 12:49:35 1996 Jeffrey A Law (law@cygnus.com)
+Sat Jun 6 00:02:41 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust
- any reloc with an LR% or RR% field selector for SOM.
+ * config/tc-d30v.c (md_assemble): Set execution type to unknown
+ after emitting a word of noops.
-Sat May 4 11:26:19 1996 Ian Lance Taylor <ian@cygnus.com>
+Fri Jun 5 23:27:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- * Makefile.in: Add subsegs.h to appropriate TARG_CPU_DEP_*
- variables.
+ * 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'.
-Fri May 3 17:58:31 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and
+ index_reg const.
+ (add_prefix): Change parameter from char to int.
- * config/obj-coff.c (coff_frob_symbol): Don't merge a symbol with
- SF_GET_STATICS set.
- (yank_symbols): Likewise.
+ * config/tc-i386.h (Ugh): Define opcode modifier.
+ * config/tc-i386.c (md_assemble): Print warnings for Ugh insns.
-Wed May 1 13:38:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * subsegs.h (segment_info_type): If MANY_SEGMENTS and not
- BFD_ASSEMBLER, add name field.
- * config/obj-coff.c: Include "libiberty.h".
- (coff_header_append): Handle long section names.
- (crawl_symbols): Just use the name field for the symbol name,
- without worrying about null byte termination.
- (w_strings): Handle long section names.
- (write_object_file): Likewise. Also, use the name field, rather
- than scnhdr.s_name.
- (obj_coff_add_segment): Permit long section names.
- (obj_coff_init_stab_section): Use the name field, rather than
- scnhdr.s_name.
- (adjust_stab_section): Likewise.
- * config/te-pe.h (COFF_LONG_SECTION_NAMES): Define.
-
- * config/tc-i960.c (brtab_emit): Don't set fx_im_disp field.
- (mem_fmt): Likewise.
- (md_apply_fix): Don't check fx_im_disp field.
-
-Thu Apr 25 11:39:51 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add * after sparc*-*-vxworks.
+ * 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 <nickc@cygnus.com>
+
+ * config/tc-d30v.c (md_assemble): Store previous segment state
+ with previous instruction.
+
+Wed Jun 3 18:21:56 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * 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 <ian@cygnus.com>
+
+ * configure.in: Recognize m5200 as a cpu_type of m68k.
+ * aclocal.m4: Rebuild with current libtool.
* configure: Rebuild.
- * app.c (do_scrub_begin): If tc_comment_chars is not defined,
- define it to comment_chars. Use tc_comment_chars rather than
- comment_chars.
- (do_scrub_chars): Use tc_comment_chars rather than comment_chars.
- * config/tc-m68k.h (tc_comment_chars): Define.
- (m68k_comment_chars): Declare.
- * config/tc-m68k.c (m68k_comment_chars): Rename from
- comment_chars. Change into a pointer rather than an array.
- (md_longopts): Add "bitwise-or".
- (md_parse_option): Handle OPTION_BITWISE_OR.
- (md_show_usage): Mention --bitwise-or.
- * doc/c-m68k.texi: Document --bitwise-or.
-
-Wed Apr 24 11:28:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-m68k.c (m68k_ip): Prevent attempts to use long offsets
- in 68000 mode.
-
- * config/obj-coff.c (obj_coff_section): BFD_ASSEMBLER version:
- call demand_empty_rest_of_line. Non BFD_ASSEMBLER version:
- correct handling of input line pointer, and call
- demand_empty_rest_of_line.
-
-Mon Apr 22 18:02:37 1996 Doug Evans <dje@blues.cygnus.com>
-
- * config/tc-sparc.c (in_bitfield_range): New static function.
- (sparc_ip): New cases X,Y. Use SPARC_OPCODE_ARCH_V9_P.
- (md_apply_fix, cases BFD_RELOC_32_PCREL_S2,
- BFD_RELOC_SPARC_{WDISP16,WDISP19}): Fix undefined code.
- (md_apply_fix): New cases BFD_RELOC_SPARC_[56].
- (tc_gen_reloc): New cases BFD_RELOC_SPARC_[56].
+Wed Jun 3 14:11:59 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Thu Apr 18 18:58:33 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls
+ to relaxable_symbol to prevent references to external symbol from
+ being relaxed.
- * config/obj-coff.c: BFD_ASSEMBLER:
- (coff_last_bf): New static variable.
- (coff_frob_symbol): Set endndx of a .bf symbol.
- Non BFD_ASSEMBLER:
- (obj_coff_endef): Call SF_SET_PROCESS on a .bf symbol.
- (last_bfP): New static variable.
- (yank_symbols): Set endndx of a .bf symbol.
+Wed Jun 3 14:10:36 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Apr 18 11:53:58 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all
+ symbols are relaxable.
- * config/tc-ppc.c (md_parse_option): Add support for Solaris's -le
- and -s options. Add -be for good measure.
-
-Wed Apr 17 12:31:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (s_space): Support non-constant fill value. Handle fill
- value correctly for a size other than 1.
-
-Tue Apr 16 15:17:40 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * config/tc-arm.c (my_get_float_expression): Update call to
- gen_to_words, X_PRECISION changed from 6 to 5.
-
-Tue Apr 16 10:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/tc-ppc.c (register_name,reg_name_search): Move register
- name lookup from PE specific code to all targets. Add support for
- -mregnames/-mno-regnames to control whether register names are
- expanded or not.
- (md_assemble): Call register_name for all platforms.
- (md_parse_option): Add support for -mregnames/-mno-regnames.
-
- * configure.in (powerpcle*-*-solaris): Add support.
- (powerpc*-*-linux): Ditto.
- * configure: Regenerate.
-
- * config/ppc-sol.mt: New config file for PowerPC Solaris.
+Wed Jun 3 09:16:00 1998 Catherine Moore <clm@cygnus.com>
+
+ * 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)
-Mon Apr 15 12:26:33 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (macro): For div and udiv, close the
+ reorder block as soon as possible.
- * config/tc-mips.c (mips_frob_file): Permit multiple %hi relocs to
- be associated with a single %lo reloc.
+Tue Jun 2 15:36:13 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-mips.c (load_address): Cast X_add_number to valueT
- before comparing against MAX_GPREL_OFFSET, so that negative
- numbers are handled correctly.
- (macro): Likewise.
+ From Matt Semersky <matts@scd.hp.com>:
+ * 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.
-Thu Apr 11 12:39:02 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Jun 2 13:32:22 1998 Klaus Kaempf <kkaempf@progis.de>
- * config/tc-sparc.c (last_insn): New static variable.
- (md_assemble): Warn about putting floating point branches in a
- delay slot. If architecture is less than v9, insert NOP
- instructions between floating point instructions and floating
- point branches. (The SunOS assembler does both these operations.)
- Save the last instruction opcode.
- (sparc_ip): Add pinsn parameter. Change caller.
+ * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in
+ OBJ_EVAX case.
- * config/tc-m68k.c (md_estimate_size_before_relax): Correct check
- for byte jump to next instruction to skip empty frags.
+ * config/tc-alpha.c (s_alpha_comm): Defer restoring character
+ until after xstrdup in OBJ_EVAX case.
-Wed Apr 10 16:48:12 1996 Ian Lance Taylor <ian@cygnus.com>
+Tue Jun 2 13:11:13 1998 Pat Rankin <rankin@eql.caltech.edu>
- * config/tc-alpha.c (alpha_ip): If we are going to call emit_add64
- for addq with a 16 bit signed value, just emit a lda instruction
- instead.
+ * 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.
-Wed Apr 10 14:34:49 1996 Jeffrey A Law (law@cygnus.com)
+Tue Jun 2 09:25:34 1998 Doug Evans <devans@canuck.cygnus.com>
- * config/tc-h8300.c (do_a_fix_imm): Don't cut off high bits
- of a 32bit operand.
+ * read.c (do_s_func): New function.
+ (s_func): Call it.
+ * read.h (do_s_func): Add prototype.
-Mon Apr 8 14:42:53 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Jun 1 12:47:30 1998 Doug Evans <devans@canuck.cygnus.com>
- * configure.in: Permit --enable-shared to specify a list of
- directories.
- * configure: Rebuild.
+ * config/tc-m32r.c (m32r_do_align): Only fill code sections with
+ nops if fill pattern not specified.
-Fri Apr 5 17:01:35 1996 Jeffrey A Law (law@cygnus.com)
+Mon Jun 1 14:08:35 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-h8300.c (get_specific): Remove some #if 0 code.
- (build_bytes): Remove all ABSMOV related code; it's unnecessary.
+ From Andrew Crabtree <andrewc@typhoon.rose.hp.com>:
+ * config/te-go32.h (TE_GO32): Define.
+ * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32.
-Fri Apr 5 15:13:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+Sun May 31 15:43:06 1998 Doug Evans <devans@canuck.cygnus.com>
- * config/atof-ieee.c: Fix handling of denormalized extended
- precision numbers and overflow/underflow detection.
- (MAX_PRECISION, X_PRECISION, P_PRECISION): Changed from 6 to 5, to
- not include the 16 bit gap in the m68k extended precision format.
-
-Fri Apr 5 14:29:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add i386-*-freebsdelf* target; from John Polstra
- <jdp@polstra.com>.
- * configure: Rebuild.
+ 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 <ian@cygnus.com>
+
+ * 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 <rankin@eql.caltech.edu>
+
+ * 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 <ian@cygnus.com>
+
+ * symbols.c (symbol_find_base): Fix case insensitive symbol name
+ code. From Chris Moller <moller@bops.com>.
+
+ Based on patch from Klaus Kaempf <kkaempf@progis.de>:
+ * 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 <ian@cygnus.com>
+
+ * 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 <scox@equinox.cygnus.com>
+
+ * 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 <nickc@cygnus.com>
-Fri Apr 5 18:39:28 1996 James G. Smith <jsmith@cygnus.co.uk>
+ * config/tc-arm.c (find_real_start): Relax definition of local
+ labels.
- * config/tc-mips.c: Allow non-zero offsets from .sdata symbols to
- be accessed using the $gp register.
- * config/tc-mips.h (MAX_GPREL_OFFSET): Added.
+Tue May 19 16:59:44 1998 Nick Clifton <nickc@cygnus.com>
-Wed Apr 3 10:56:14 1996 Doug Evans <dje@canuck.cygnus.com>
+ * config/tc-d30v.c (d30v_align): Apply address adjustment to all
+ symbols at the given address, not just the last one specified.
- * config/tc-sparc.c (sparc_md_end): Set bfd machine number to
- bfd_mach_sparc_sparclet if current_architecture is sparclet.
+Tue May 19 08:25:19 1998 Catherine Moore <clm@cygnus.com>
-Mon Apr 1 16:55:44 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian
+ or number_to_chars_littleendian to write data.
- * read.c (get_line_sb): Bump line counters based on
- input_line_pointer[-1], not *input_line_pointer. Don't bother to
- call LISTING_NEWLINE.
- (s_macro): Don't call demand_empty_rest_of_line.
- * app.c (do_scrub_chars): When handling C style comments, unget
- ch2 rather than ch.
+Mon May 18 17:09:30 1998 Nick Clifton <nickc@cygnus.com>
-Fri Mar 29 16:15:06 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-v850.c (md_assemble): Remove artificially created
+ register name symbols.
- * read.h (enum linkonce_type): Define.
- (s_linkonce): Declare.
- * read.c (potable): Add "linkonce".
- (s_linkonce): New function.
- * subsegs.h (segment_info_type): Add linkonce field to
- MANY_SEGMENTS && ! BFD_ASSEMBLER section.
- * config/obj-coff.h (obj_handle_link_once): Define if TE_PE.
- (obj_coff_pe_handle_link_once): Declare if TE_PE.
- * config/obj-coff.c: If TE_PE and not BFD_ASSEMBLER, #include
- "coff/pe.h".
- (obj_coff_pe_handle_link_once): New function, defined if TE_PE.
- (c_section_symbol): If TE_PE, set the x_comdat field in the aux
- entry based on the linkonce field in segment_info.
- * doc/as.texinfo: Document .linkonce.
+Mon May 18 13:47:06 1998 Doug Evans <devans@canuck.cygnus.com>
-Fri Mar 29 11:31:27 1996 J.T. Conklin (jtc@lisa.cygnus.com)
+ * write.c (fixup_segment): Change "segment" to "section" in
+ error message.
- * doc/as.1: Changed to be recognized by catman -w on Solaris.
+Mon May 18 16:55:40 1998 Michael Meissner <meissner@cygnus.com>
-Thu Mar 28 15:27:47 1996 Ian Lance Taylor <ian@cygnus.com>
+ * write.c (fixup_segment): Change sym1-sym2 message again.
- * stabs.c (s_stab_generic): Call the listing functions before
- doing the rest of the processing, which may involve freeing the
- string. Pass string, not string + stroff, to OBJ_PROCESS_STAB in
- SEPARATE_STAB_SECTIONS case.
+Mon May 18 09:31:43 1998 Michael Meissner <meissner@cygnus.com>
- * config/tc-hppa.c: Remove nested comment.
- (tc_gen_reloc): Move label done inside the ifdef in which it is
- used.
- (md_apply_fix): Pass pointers to correct types to libhppa.h
- functions. Always return a value.
-
- * config/tc-mips.h (tc_frob_file): Define.
- (mips_frob_file): Declare.
- * config/tc-mips.c (struct mips_hi_fixup): Define.
- (mips_hi_fixup_list): New static variable.
- (imm_unmatched_hi): New static variable.
- (md_assemble): Clear imm_reloc, imm_unmatched_hi, and
- offset_reloc. Pass imm_unmatched_hi to append_insn.
- (append_insn): Add unmatched_hi parameter. If it is set, add the
- new fixup to mips_hi_fixup_list. Change all callers.
- (mips_ip): Set imm_unmatched_hi when appropriate.
- (mips_frob_file): New function.
-
-Thu Mar 28 11:47:59 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (sparc-*-solaris2*): Renamed from sparc*-*-solaris2*.
- * configure: Regenerated.
+ * write.c (fixup_segment): Improve error message for sym1-sym2
+ errors when sym1 is in a different segment from sym2.
-Tue Mar 26 18:19:12 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed May 13 10:16:37 1998 Doug Evans <devans@canuck.cygnus.com>
- * as.c (main): Call bfd_set_error_program_name.
+ * 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 <rth@cygnus.com>
+
+ * 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.
-Fri Mar 22 11:13:00 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu May 7 11:47:22 1998 Doug Evans <devans@canuck.cygnus.com>
- * as.h (strdup): Don't declare.
- * stabs.c: Include libiberty.h
- (get_stab_string_offset): Use xstrdup rather than strdup.
- (s_stab_generic): Likewise.
- * as.c (parse_args): Likewise.
- * read.c (s_mri_sect): Likewise.
+ * Makefile.am: Update with `make dep-am'.
+ (HFILES): Add cgen.h.
+ (cgen.o): Depend on cgen.h.
+ * Makefile.in: Regenerate.
- * gasp.c (change_base): Recognize \(...) construct documented to
- pass through enclosed characters literally through to the output.
- (process_assigns): Likewise. Also, be more careful to avoid
- looking past the end of the buffer.
+ * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where.
-Thu Mar 21 13:18:43 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu May 7 13:20:56 1998 Anders Blomdell <anders.blomdell@control.lth.se>
- * config/tc-i386.c (md_parse_option): If OBJ_ELF, ignore -k for
- FreeBSD compatibility. From John Polstra <jdp@polstra.com>.
+ * gasp.c (grab_label): Permit a label to be a preprocessor
+ variable by permitting a label to start with a backslash.
-Wed Mar 20 18:13:32 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+Thu May 7 12:50:33 1998 Frank Ch. Eigler <fche@cygnus.com>
- * doc/as.texinfo, doc/c-i960.texi: Fix typos.
+ * config/tc-mips.c (validate_mips_insn): Removed hack
+ for previously inaccessible bitfields in some INSN_TRAP
+ instructions.
-Wed Mar 20 17:05:16 1996 David Mosberger-Tang <davidm@azstarnet.com>
+Thu May 7 11:13:00 1998 Frank Ch. Eigler <fche@cygnus.com>
- * config/alpha-opcode.h: Added cvtst instruction.
+ * 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 <fche@cygnus.com>
-Mon Mar 18 13:12:46 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * ecoff.c (ecoff_stab): Don't try to make a symbol out of the stab
- string. Extract the addend from the result of expression.
+Thu May 7 07:47:14 1998 Michael Meissner <meissner@cygnus.com>
-Fri Mar 15 17:10:43 1996 Ian Lance Taylor <ian@cygnus.com>
+ * cgen.c (cgen_asm_finish_insn): Fix typo.
- * app.c (do_scrub_chars): If whitespace is seen in state 11, and
- LABELS_WITHOUT_COLONS is not defined, and we are not in m68k MRI
- mode, change the state to 3 rather than 1.
+Thu May 7 02:19:14 1998 Doug Evans <devans@charmed.cygnus.com>
-Thu Mar 14 18:18:25 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/obj-coff.h (C_REGISTER_SECTION): Change from 20 to 50, to
- correspond to 11 March change.
+Wed May 6 16:29:19 1998 Jeffrey A Law (law@cygnus.com)
-Thu Mar 14 15:27:10 1996 Jeffrey A Law (law@cygnus.com)
+ * config/tc-hppa.c (md_apply_fix): Slightly rework some code
+ to avoid compiler warning.
- * config/tc-h8300.c (build_bytes, MEMIND case): Generate
- an R_MEM_INDIRECT reloc rather than R_RELBYTE.
+Wed May 6 15:26:34 1998 Klaus Kaempf <kkaempf@progis.de>
-Tue Mar 12 12:21:10 1996 Ian Lance Taylor <ian@cygnus.com>
+ * makefile.vms: Run dec c with /nodebug. Pass CC value when
+ calling make.
- * configure: Rebuild with autoconf 2.8.
+ * makefile.vms (OBJS): Add ehopt.obj
-Mon Mar 11 18:57:12 1996 Ian Lance Taylor <ian@cygnus.com>
+Wed May 6 15:11:12 1998 Klaus Kaempf <kkaempf@progis.de>
- * config/atof-ieee.c (gen_to_words): Improve handling of
- X_PRECISION numbers. Based on patches from Andreas Schwab
- <schwab@issan.informatik.uni-dortmund.de>.
+ * doc/c-vax.texi: Correct and extend vax/vms documentation.
-Mon Mar 11 09:59:53 1996 Steve Chamberlain <sac@slash.cygnus.com>
+Wed May 6 11:51:51 1998 Richard Henderson <rth@cygnus.com>
- * as.h (SEG_NORMAL, SEG_LIST): Bump segment limit from 10 to 40.
- (SEG_LAST): New.
- * subsegs.c (MANY_SEGMENTS): Increase segment limit.
- * obj-coff.c (seg_N_TYPE, seg_info_off_by_4): Likewise.
- (do_relocs_for, w_symbols, obj_coff_add_segment, do_linenos_for,
- crawl_symbols, coff_header_append): Loop to SEG_LAST rather than
- SEG_E9.
+ * config/tc-d30v.c (do_assemble): Accept a new parameter requesting
+ a short format insn.
+ (md_assemble): Set it for explicitly packed insns.
-Thu Mar 7 15:17:39 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * config/tc-sparc.c (sparc_ip): Handle operand char 'O' (neg reg).
+Tue May 5 13:23:13 1998 Nick Clifton <nickc@cygnus.com>
-Thu Mar 7 09:19:15 1996 Jeffrey A Law (law@cygnus.com)
+ * config/obj-coff.c (c_symbol_merge): Do not take address of
+ native fields when performing the memcpy.
- * config/tc-hppa.c (SUBSEG_MILLI): Define.
- (pa_def_subspaces): Add $MILLICODE$.
- (pa_spaces_begin): Set section flags for $MILLICODE$.
+Tue May 5 13:10:41 1998 Gavin Koch <gavin@cygnus.com>
-Wed Mar 6 14:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (macro,macro2): Implement
+ M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I.
- * config/obj-elf.c (obj_elf_section): Only SEC_LOAD if the type is
- not SHT_NOBITS. Don't tamper with flags based on type if a
- special section was found (revert Feb 29 change).
+Mon May 4 17:49:14 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- * config/tc-sh.c (sh_do_align): Only align using the nop pattern
- if aligning to a longword boundary or greater.
+ * 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.
-Tue Mar 5 15:10:43 1996 Jim Wilson <wilson@chestnut.cygnus.com>
+Mon May 4 16:12:23 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-sh.c (sh_do_align): Pass 1 not 2 to frag_align.
+ * 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.
-Mon Mar 4 20:50:57 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (i386-*-cygwin32): Don't use bfd_gas.
- * configure: Regenerated.
-
-Mon Mar 4 10:13:06 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-hppa.c: Add default definitions for R_N0SEL and
- R_N1SEL since they're not defined for old versions of hpux.
-
- * config/tc-hppa.c (tc_gen_reloc): Fix typo in R_COMP2 code.
- Set "sym_ptr_ptr" and "addend" fields to dummy values for
- R_N0SEL and R_N1SEL.
-
-Fri Mar 1 10:20:52 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * flonum-konst.c: Add two more constants for 1e+-2048 and
- 1e+-4096, and correct the other constants.
-
- * symbols.c (resolve_symbol_value): Handle O_logical_not.
-
-Thu Feb 29 13:58:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * 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.
- * config/obj-elf.c (obj_elf_section): Allow predefined section
- types to set the nobits type. Avoid a shadowed declaration.
+Thu Apr 30 13:09:39 1998 Fred Fish <fnf@ninemoons.com>
-Wed Feb 28 15:38:56 1996 Jeffrey A Law (law@cygnus.com)
+ * read.c (sizeof_leb128): Referenced externally by write.c so
+ don't inline.
- * config/tc-hppa.c (hppa_fix_adjustable): For SOM, don't
- reduce relocs using e_nlrsel field selectors.
+Wed Apr 29 15:45:57 1998 Michael Meissner <meissner@cygnus.com>
- * write.c (fix_new_exp): Don't use #elif. Some compilers
- don't handle it.
+ * 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.
- * config/tc-hppa.c (selector_table): Add "n", "nl", and "nlr" to
- the selector table.
- (pa_chk_field_selector): Handle new field selectors for SOM.
+Tue Apr 28 19:16:26 1998 Tom Tromey <tromey@cygnus.com>
-Tue Feb 27 14:42:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * as.c (main): Conditionally call setlocale.
+ * gasp.c (main): Likewise.
+ * asintl.h: Include <locale.h> if HAVE_LOCALE_H.
+ (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
- * configure.in (m68k-*-linux*aout*, m68k-*-linux*): New targets.
- * configure: Rebuild.
- * config/te-linux.h (LOCAL_LABELS_FB): Define.
- * config/tc-m68k.h (TARGET_FORMAT) [TE_LINUX]: Define to
- "a.out-m68k-linux".
- * config/tc-m68k.c (comment_chars): Don't include '#' if TE_LINUX
- is defined.
+Tue Apr 28 18:33:23 1998 Frank Ch. Eigler <fche@cygnus.com>
-Mon Feb 26 18:58:58 1996 Stan Shebs <shebs@andros.cygnus.com>
+ * config/tc-d30v.c (md_show_usage): Correct gettext typo.
+
+Tue Apr 28 12:16:30 1998 Ian Lance Taylor <ian@cygnus.com>
- * mpw-make.sed: Update to handle shared library support.
+ * 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.
-Mon Feb 26 10:34:10 1996 Doug Evans <dje@charmed.cygnus.com>
+Tue Apr 28 11:35:56 1998 Frank Ch. Eigler <fche@cygnus.com>
- * config/tc-sparc.c (sparc_ip): Print all architectures that support
- the insn on mismatch.
+ * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno
+ for line numbers for assembly source.
-Fri Feb 23 21:44:39 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+Mon Apr 27 15:58:46 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Add support for a29-coff.
+ * configure.in: Change version number to 2.9.4
* configure: Rebuild.
-Thu Feb 22 16:39:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-sh.c (sh_coff_frob_file): Don't consider the address
- of the section when looking for the R_SH_USES fixup, because the
- frag addresses have not yet been adjusted.
-
- * gdbinit.in: Set a breakpoint on as_warn_where.
+Mon Apr 27 12:07:33 1998 Doug Evans <devans@seba.cygnus.com>
- * config/tc-mips.c (macro): Add missing arguments to macro_build
- omitted in last change. From Jim Wilson <wilson@cygnus.com>.
+ * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated.
-Wed Feb 21 17:00:32 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Apr 27 15:16:12 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-h8300.c (tc_reloc_mangle): Change reloc based on size
- if it is TC_CONS_RELOC. Set a size of 4 to R_RELLONG.
-
-Wed Feb 21 09:25:39 1996 Doug Evans <dje@charmed.cygnus.com>
+ * ecoff.h: Change symbolS in function declaration to struct
+ symbol.
- * config/tc-sparc.c (sparc_ip): Recognize %asr0 for v8.
+Sun Apr 26 13:44:22 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Feb 20 21:48:03 1996 Doug Evans <dje@charmed.cygnus.com>
+ * config/tc-sh.c (parse_reg): Add casts to avoid warnings.
+ (md_convert_frag): Fix i18n typo.
- * config/tc-sparc.c (parse_keyword_arg): Accept leading '%'.
- (sparc_ip): Accept %asr[1..31] for v8 and %asr[%16..31] for v9.
- Recognize [uU] format args as sparclet cpregs.
+Sat Apr 25 20:12:02 1998 Richard Henderson <rth@cygnus.com>
-Tue Feb 20 22:25:55 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-sh.c (sh_handle_align): Don't emit R_SH_ALIGN relocs
- in bss_section.
+Sat Apr 25 14:00:52 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Feb 19 14:16:24 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): Check S_IS_WEAK as
- well as S_IS_EXTERNAL.
- (tc_fix_adjustable): Likewise.
- * config/tc-sparc.c (md_apply_fix): In OBJ_ELF case, check for
- S_IS_WEAK as well as S_IS_EXTERNAL when deciding whether to return
- early.
- (tc_gen_reloc): Check S_IS_WEAK as wel as S_IS_EXTERNAL when
- deciding whether to convert BFD_RELOC_32_PCREL_S2 if PIC.
+Fri Apr 24 12:47:42 1998 Philippe De Muyter <phdm@macqel.be>
-Mon Feb 19 02:15:57 1996 Doug Evans <dje@charmed.cygnus.com>
+ * 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.
- * config/tc-sparc.c (max_architecture): Change to sparclite for
- 32 bit arch.
- (default_compatible): Delete.
- (sparc_ffs): New function.
- (md_begin): Only call SPARC_OPCODE_CONFLICT_P once.
- (sparc_ip): Rewrite architecture match and bump logic.
+Fri Apr 24 09:26:46 1998 Nick Clifton <nickc@cygnus.com>
-Sun Feb 18 15:03:50 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-v850.c: Add internationalisation macros to error
+ strings.
- * configure.in: Check for 'do not mix' from native linker before
- trying to use -rpath.
- * configure: Rebuild.
+ * config/tc-m32r.c (can_make_parallel): Add internationalisation
+ macros to error strings.
-Fri Feb 16 16:53:31 1996 Ian Lance Taylor <ian@cygnus.com>
+Thu Apr 23 19:23:23 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/obj-coff.h (SF_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
- (SF_GET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
- (SF_SET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
- * config/obj-coff.c (obj_coff_endef): Set ADJ_LNNOPTR when LNNOPTR
- is set.
- (w_symbols): If ADJ_LNNOPTR is set, add the section lnnoptr field
- to the symbol lnnoptr field, to get the correct file offset.
+ * 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 <nickc@cygnus.com>
+
+ * 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 <tromey@cygnus.com>
+
+ * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
+
+Wed Apr 22 14:52:36 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <tromey@scribbles.cygnus.com>
+
+ * 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 <alan@spri.levels.unisa.edu.au>
+
+ * 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.
-Thu Feb 15 14:48:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Tue Apr 21 16:18:12 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/obj-elf.c (elf_frob_symbol): On the PowerPC, force all
- symbols that are not function, file, or section symbols to be
- object types.
+ * 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.
-Thu Feb 15 11:20:18 1996 Ian Lance Taylor <ian@cygnus.com>
+ * doc/Makefile.am (as.dvi): New target.
+ * doc/Makefile.in: Rebuild.
- * configure: Set and substitute RPATH_ENVVAR.
- * configure: Rebuild.
- * Makefile.in (RPATH_ENVVAR): New variable.
- (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
+Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
- * configure.in: Accept i686. From H.J. Lu <hjl@zoom.com>: i386
- doesn't need opcodes. If configuring shared, opcodes needs bfd.
+ * 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.
-Wed Feb 14 16:33:12 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * read.c (s_mri_sect): Don't return '\0' in type. Set all
- appropriate flags in BFD section.
-
- * configure.in (m68k-*-psos*): New target.
- * configure: Rebuild.
- * config/te-psos.h: New file.
- * config/tc-m68k.c (comment_chars): Don't include '#' if TE_PSOS
- is defined.
+ * config/tc-sparc.h (SPARC_BIENDIAN) Always define.
+
+Sat Apr 18 01:19:01 1998 Jeffrey A Law (law@cygnus.com)
-Wed Feb 14 13:43:24 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (mips_ip): Note when we use get match on
+ the full instruction name.
- From Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in: Remove duplicate setting of cpu_type. Check
- whether opcodes library is required for on all targets, not just
- primary one.
- * configure: Rebuild.
+Wed Apr 15 15:17:27 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-mips.c (mips_big_got): New static variable.
- (s_extern): Don't declare.
- (reg_needs_delay): New static function.
- (macro_build): Permit GOT/CALL_HI/LO relocs.
- (macro_build_lui): If place is not NULL, use the number in the
- expression.
- (load_address): Handle mips_big_got case.
- (macro): Handle mips_big_got for M_LA_AB, M_JAL_A, and load and
- store macros.
- (OPTION_XGOT): Define.
- (md_longopts): Add "xgot" if OBJ_ELF.
- (md_parse_option): Handle -xgot.
- (md_show_usage): Mention -xgot.
- (md_apply_fix): Permit GOT/CALL_HI/LO relocs.
- (tc_gen_reloc): Handle GOT/CALL_HI/LO relocs.
-
-Wed Feb 14 11:22:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * config/tc-m68k.c (m68k_ip) [operand kind '#']: When fixing
- the byte relocation, point it to the low byte of the word.
-
-Tue Feb 13 15:31:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Set HDLFLAGS for *-*-hpux with --enable-shared.
- * configure: Rebuild.
+ * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol
+ back into the expression to handle add/sub simplification correctly.
-Mon Feb 12 15:53:46 1996 Doug Evans <dje@charmed.cygnus.com>
+Wed Apr 15 07:06:04 1998 Catherine Moore <clm@cygnus.com>
- * configure.in: Recognize any sparc* cpu.
- * configure: Regenerated.
+ * config/tc-mips.c (hilo_interlocks): Remove 4300.
-Mon Feb 12 15:41:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (potable): Add "mri" and ".mri".
- (s_mri): New function.
- * read.h (s_mri): Declare.
- * app.c (scrub_m68k_mri): New static variable.
- (mri_pseudo): New static variable.
- (do_scrub_begin): Add m68k_mri parameter. Use it rather than
- flag_m68k_mri. Initialize scrub_m68k_mri.
- (mri_state, mri_last_ch): New static variables.
- (struct app_save): Add scrub_m68k_mri, mri_state, and mri_last_ch
- fields.
- (app_push): Save new fields.
- (app_pop): Restore new fields.
- (do_scrub_chars): Check scrub_m68k_mri rather than flag_mri_mri.
- If TC_M68K, use a trivial state machine to look for occurrences of
- the .mri pseudo-op, and change the mode appropriately.
- * as.h (do_scrub_begin): Update prototype.
- * input-scrub.c (input_scrub_begin): Pass flag_m68k_mri to
- do_scrub_begin.
- * config/tc-m68k.c (reg_prefix_optional_seen): New static
- variable.
- (m68k_mri_mode_change): New function.
- (md_parse_option): Set reg_prefix_optional_seen.
- * config/tc-m68k.h (m68k_mri_mode_change): Declare.
- (MRI_MODE_CHANGE): Define.
- * doc/as.texinfo: Document .mri pseudo-op.
-
- * app.c (do_scrub_chars): In MRI mode, don't treat '#' as a
- comment character.
-
-Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- Support for OBJ_ELF on m68k, mostly inside #ifdef OBJ_ELF:
- * config/m68k-parse.h (enum pic_relocation): Define.
- (struct m68k_exp): Add pic_reloc field.
- * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
- (tc_fix_adjustable): Define to call tc_m68k_fix_adjustable.
- (NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
- otherwise.
- * config/tc-m68k.c: Delete definition of NO_RELOC.
- (struct m68k_it): Add pic_reloc field.
- (add_fix): Copy over pic_reloc field.
- (md_pseudo_table): Interpret .align parameter as byte count.
- (mote_pseudo_table): Likewise.
- (tc_m68k_fix_adjustable): New function.
- (get_reloc_code): New function.
- (md_assemble): Use it as last argument to fix_new_exp.
- (md_apply_fix_2): For a relocation against a symbol don't put the
- addend into the data.
- (tc_gen_reloc): Different addend computation for OBJ_ELF.
- (m68k_ip): Don't relax an operand that requires pic relocation.
- (md_begin): Align .text, .data and .bss on 4 byte boundary by
- default.
- * write.c (fixup_segment): Don't add symbol value to addend if
- TC_M68K and OBJ_ELF.
- * config/m68k-parse.y (yylex): Handle @PLTPC, etc.
- (motorola_operand): Add rule for `(zapc, EXPR)'.
-
-Mon Feb 12 10:07:33 1996 David Mosberger-Tang <davidm@azstarnet.com>
-
- * ecoff.c (ecoff_directive_weakext): Fixed so that whitespace
- *really* is permissible before the comma.
-
-Mon Feb 12 00:12:13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-sh.c (sh_do_align): Align to a 2 byte boundary before
- inserting nop instructions.
-
-Fri Feb 9 10:54:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/te-aux.h: Change include of aux.h to aux-coff.h.
-
-Thu Feb 8 20:02:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-i960.c (tc_coff_symbol_emit_hook): Correct storage
- class setting for a CALLNAME symbol in COFF.
-
- * read.c (potable): Pass negative numbers for new .balign[wl] and
- .p2align[wl] pseudo-ops.
- (s_align_bytes): Treat a negative argument as specifying the fill
- length.
- (s_align_ptwo): Likewise.
-
-Wed Feb 7 14:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * read.c (potable): Add balignw, balignl, p2alignw, and p2alignl.
- (do_align): Take new len parameter. Change all callers. Pass it
- to md_do_align.
- (s_align_bytes): Arg now indicates the length of the fill pattern.
- (s_align_ptwo): Likewise.
- * config/obj-coff.c (write_object_file): Pass length to
- md_do_align.
- * config/tc-i386.h (md_do_align): Take new len parameter.
- * config/tc-m88k.h (md_do_align): Likewise.
- * config/tc-m88k.c (m88k_do_align): Likewise.
- * config/tc-sh.h (md_do_align): Likewise.
- * config/tc-sh.c (sh_do_align): Likewise.
- * doc/as.texinfo: Document new pseudo-ops.
+Mon Apr 13 16:51:04 1998 Nick Clifton <nickc@cygnus.com>
- * config/obj-coff.c (fixup_mdeps): Divide offset by fr_var, as is
- done in cvt_frag_to_fill.
+ * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg,
+ #<n>' instruction.
- * config/tc-sh.h (sh_do_align): Declare.
- (md_do_align): Define.
- * config/tc-sh.c (sh_do_align): New function.
+Thu Apr 9 10:29:42 1998 Doug Evans <devans@canuck.cygnus.com>
- * ecoff.c (ecoff_build_lineno): Don't try to store the address
- difference if the next address is before the current one.
+ * 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.
- * config/tc-m68k.c (struct m68k_cpu): Add alias field.
- (archs): Initialize new field.
- (m68k_ip): Don't list alias names when listing CPUs which support
- an instruction.
+Wed Apr 8 16:16:11 1998 Doug Evans <devans@canuck.cygnus.com>
- * as.c (main): Call parse_args before read_begin.
- * app.c (do_scrub_chars): If flag_m68k_mri, don't put a dot in
- front of generated pseudo-ops.
- * read.c (potable): Ignore "name".
- (s_app_file): Permit a single quote after the string, since one
- may appear in m68k MRI mode.
+ * symbols.c (print_binary): New function.
+ (print_expr_1): Call it.
- * configure.in: Check for --enable-shared. If linking against
- shared BFD and opcodes, fix library name on SunOS, and try to set
- -rpath reasonably.
- * configure: Rebuild.
+Mon Apr 6 12:06:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Tue Feb 6 15:16:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * as.h (flag_m68k_mri): Declare.
- * as.c (parse_args): If TC_M68K, set flag_m68k_mri for -M.
- * Many files: For MRI syntax that is specific to the m68k MRI
- assembler, check flag_m68k_mri rather than flag_mri or
- MRI_MODE_NEEDS_PSEUDO_DOT.
-
-Mon Feb 5 16:29:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-i960.c (ARCH_HX): Define.
- (arch_tab): Add HX.
- (targ_has_sfr): Handle ARCH_HX.
- (targ_has_iclass): Handle ARCH_HX.
- (tc_coff_fix2rtype): Add return 0 to avoid warning.
- (tc_headers_hook): If the architecture was specified explicitly,
- use it when setting the flags. Set the extern variable coff_flags
- rather than headers->filehdr.f_flags, since the latter is set
- unconditionally in obj-coff.c.
- (i960_handle_align): Remove unused variable fixp.
-
- Support for building bfd and opcodes as shared libraries, based on
- patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
- * configure.in: Set OPCODES and BFD to search directories.
- Substitute OPCODES_DEP and BFDDEP. On SunOS, set HLDFLAGS.
- * configure: Rebuild.
- * Makefile.in (LDFLAGS, HLDFLAGS): New variables.
- (LIBDEPS): New variable.
- (as.new0: Depend upon $(LIBDEPS) rather than $(LIBS). Use
- $(HLDFLAGS) in link.
- (check): Set LD_LIBRARY_PATH in the environment.
-
-Fri Feb 2 17:41:53 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * config/tc-ppc.h (ELF_TC_SPECIAL_SECTIONS): Make .sdata2, .sbss2,
- .PPC.EMB.sdata0, and .PPC.EMB.sbss0 sections all default to
- read-only, not read/write.
-
-Fri Feb 2 14:09:25 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * Makefile.in (INSTALL_XFORM): Remove -e.
-
-Fri Feb 2 12:32:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * write.c (write_relocs): Use S_IS_DEFINED and S_IS_COMMON rather
- than comparing S_GET_SEGMENT to undefined_section.
- (write_object_file): Skip symbols which were equated to an
- undefined or common symbol.
- * symbols.c (resolve_symbol_value): Use S_IS_DEFINED and
- S_IS_COMMON rather than comparing S_GET_SEGMENT to
- undefined_section.
- (S_GET_VALUE): Likewise. Avoid recursion problems if S_IS_DEFINED
- or S_IS_COMMON call S_GET_VALUE.
- * config/obj-aout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
- * config/obj-aout.c (obj_emit_relocations): If a reloc is equated
- to an undefined or common symbol, convert the reloc to be against
- the target symbol.
- (obj_crawl_symbol_chain): Skip symbols which were equated to an
- undefined or common symbol.
- * config/obj-bout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
- * config/obj-bout.c (obj_emit_relocations): If a reloc is equated
- to an undefined or common symbol, convert the reloc to be against
- the target symbol.
- (obj_crawl_symbol_chain): Skip symbols which were equated to an
- undefined or common symbol.
- * config/obj-coff.c (do_relocs_for): Use S_IS_DEFINED and
- S_IS_COMMON rather than comparing S_GET_SEGMENT to
- undefined_section.
- (yank_symbols): Skip symbols which were equated to an undefined or
- common symbol.
-
-Thu Feb 1 15:34:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config/obj-aout.h (S_IS_LOCAL): Check for \002 as well as \001.
- * config/obj-bout.h (S_IS_LOCAL): Likewise.
+ * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the
+ operand in the opcode.
- * configure.in: Make sure we only add m68k-parse.o to
- ${extra_objects} once, no matter how many m68k targets have been
- enabled.
- * configure: Rebuild.
+Fri Apr 3 11:58:19 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-Wed Jan 31 18:31:46 1996 Steve Chamberlain <sac@slash.cygnus.com>
+ * 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.
- * configure.in (i386-*-cygwin32, ppc-*-cygwin32): New.
- * configure: Rebuild.
+Fri Apr 3 11:44:34 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Jan 31 14:03:17 1996 Richard Henderson <rth@tamu.edu>
+ * doc/as.texinfo (Invoking): Clarify -Wa example.
- * config/tc-m68k.c (md_pseudo_table): Add "extend" and "ldouble".
- * doc/c-m68k.texi: Document .extend and .ldouble.
+Fri Apr 3 09:12:23 1998 Gavin Koch <gavin@cetus.cygnus.com>
- * configure.in (m68*-apple-aux*): New target.
- * config/te-aux.h: New file.
- * config/obj-coff.c (compare_external_relocs): New static function
- if TE_AUX.
- (do_relocs_for): Sort relocs if TE_AUX.
- (fixup_segment): If TE_AUX, store common symbol value in segment.
- * config/tc-m68k.h (TARGET_FORMAT): Define if TE_AUX.
+ * 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)
-Wed Jan 31 12:24:58 1996 Ian Lance Taylor <ian@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.
- * config/obj-coff.h (S_IS_LOCAL): Check for \002 as well as \001.
+Thu Apr 2 16:36:47 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-mips.c (s_mips_globl): Set BSF_OBJECT if it is not
- BSF_FUNCTION.
- (s_cpload): Set BSF_OBJECT for _gp_disp symbol.
- * read.c (s_lcomm): If S_SET_SIZE is defined, set the size of the
- symbol.
- * ecoff.c (add_procedure): Set the BSF_FUNCTION flag.
- (ecoff_build_symbols): If S_SET_SIZE is defined, set the size of
- an undefined symbol and the size of a function symbol.
- * config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
- for all common symbols.
+ * gasp.c (main): Set next field of new include_path structure to
+ NULL. From Avery Pennarun <averyp@gdc.ca>.
-Tue Jan 30 12:35:24 1996 Ken Raeburn <raeburn@cygnus.com>
+ * read.c (s_mri_sect): Call as_bad rather than abort for an
+ unsupported MRI target.
- * config/tc-i960.c (parse_memop): In MRI mode, don't use implicit
- scaling of index.
+Wed Apr 1 11:08:27 1998 Nick Clifton <nickc@cygnus.com>
- * expr.c (operand): Accept 0x hex constants in MRI mode if not on
- m68k.
+ * 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.
-Mon Jan 29 12:21:30 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-arm.h: Define TC_VALIDATE_FIX.
- * config/obj-elf.c (obj_elf_type): Set BSF_OBJECT flag for a type
- of object. From Ronald F. Guilmette <rfg@monkeys.com>.
+Tue Mar 31 13:27:33 1998 Dean M. Deaver <deaver@amt.tay1.dec.com>
- * ecoff.c (localsym_t): Add addend field.
- (add_ecoff_symbol): Add addend argument. Change all callers.
- (coff_sym_value): Make static.
- (coff_sym_addend): New static variable.
- (ecoff_directive_def): Initialize coff_sym_addend.
- (ecoff_directive_val): Accept symbol + constant.
- (ecoff_directive_endef): Pass coff_sym_addend to add_ecoff_symbol.
- (ecoff_build_symbols): Include the addend in the symbol value.
+ * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx
+ also.
-Fri Jan 26 19:28:52 1996 Kim Knuttila <krk@cygnus.com>
+Wed Apr 1 13:13:20 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- * config/tc-ppc.c (md_assemble): Ignore overflow on
- BFD_RELOC_16_GOTOFF and BFD_RELOC_PPC_TOC16.
+ * doc/as.texinfo: Use @itemx for a secondary item in a table.
+ * doc/c-hppa.texi: Likewise.
-Fri Jan 26 16:14:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+Tue Mar 31 17:52:40 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (md_apply_fix3): SDA21 relocations are now 4
- bytes in size, so offset appropriately in big endian mode when
- writing the bottom 2 bytes.
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
-Thu Jan 25 20:26:23 1996 Doug Evans <dje@charmed.cygnus.com>
+ * 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.
- * config/tc-sparc.c (default_compatible): New static local.
- (md_begin): Initialize it. Rewrite warn_on_bump handling.
- (sparc_ip): If no architecture or -bump specified, don't mark as
- mismatched those in default_compatible.
+Mon Mar 30 12:46:48 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Jan 25 12:21:53 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i386.h, config/tc-i386.c: Revert March 24
+ LinearAddress patch.
- SCO ELF support from Robert Lipe <robertl@arnet.com>:
- * configure.in (i386-*-sco*elf*): Use fmt elf, targ sco5.
+ * configure.in: Set version to 2.9.1.
* configure: Rebuild.
- * config/sco5.mt: New file; set TDEFINES to -DSCO_ELF.
- * config/tc-i386.c (sco_id): New function, if SCO_ELF.
- * config/tc-i386.h (tc_init_after_args): Define if SCO_ELF.
- (sco_id): Declare if SCO_ELF.
-
-Thu Jan 25 03:10:53 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * config/tc-sparc.c (initial_architecture,can_bump_v9_p): Deleted.
- ({max,warn_after}_architecture): New static locals.
- (md_begin): Replace NUMOPCODES with sparc_num_opcodes.
- If both architecture and -bump requested, set max_architecture to max.
- (sparc_md_end): Simplify.
- (sparc_ip): Replace references to can_bump_v9_p with max_architecture.
- Rewrite code to bump architecture and check for conflicts.
- (md_longopts): Recognize -xarch={v8plus,v8plusa} for compatibility
- with Solaris assembler.
- (md_parse_option): Likewise. Call sparc_opcode_lookup_arch.
- (md_show_usage): Update.
-
-Wed Jan 24 22:11:03 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * Makefile.in (RUNTEST): Fix reference to $${srcdir}.
-
-Mon Jan 22 09:21:36 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * config/tc-sparc.h (TARGET_FORMAT): Use #ifdef SPARC_ARCH64 instead of
- #ifdef sparcv9 when choosing value.
- (ENV64): Delete.
- (md_end): Define.
- (sparc_md_end): Declare.
- * config/tc-sparc.c (SPARC_V9): Renamed from sparcv9.
- (initial_architecture): New static local.
- (can_bump_v9_p): Likewise.
- (NO_V9): Delete all occurrences.
- (sparc_md_end): New function.
- (sparc_ip): New local v9_arg_p. Rework fp reg number test.
- Don't bump architecture to v9 unless can_bump_v9_p set.
- (md_parse_option): -A<arch> passed, set can_bump_v9_p accordingly.
- * configure.in (sparc64 target cpu): Don't set obj_format here.
- (SPARC_V9): Renamed from sparcv9.
- (sparc64-*-elf*): Define SPARC_ARCH64.
- * configure: Regenerated.
- * acconfig.h (SPARC_V9): Renamed from sparcv9.
- (SPARC_ARCH64): Add.
- * conf.in: Regenerated.
- * config/vmsconf.h: Update.
-
-Mon Jan 22 17:24:47 1996 James G. Smith <jsmith@cygnus.co.uk>
- * config/tc-mips.c (load_register): Optimise "dli" loads.
- (md_show_usage): add "-mcpu=vr4100" to help text.
+ * Branched binutils 2.9.
-Mon Jan 22 11:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
+Mon Mar 30 11:22:08 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
- * symbols.c (resolve_symbol_value): If a symbol is equated to an
- undefined symbol, preserve the X_op of O_symbol.
- (S_GET_VALUE): Fix check to permit this case.
- * write.c (write_relocs): If a reloc is against an undefined
- symbol equated to another symbol, change the reloc to be against
- the latter symbol.
- * config/obj-coff.c (do_relocs_for): Likewise.
+ * 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.
- * config/tc-ppc.c (ppc_csect): An unnamed csect is storage class
- XMC_PR.
+Mon Mar 30 10:12:00 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Mon Jan 22 10:59:48 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * stabs.c (get_stab_string_offset): Always create a stab string
+ section.
- * config/obj-elf.c (elf/ppc.h): Include elf/ppc.h if target
- computer is PowerPC.
+Sat Mar 28 22:28:02 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (md_apply_fix3): Add more embedded relocations.
+ 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.
- * config/tc-ppc.h (ELF_TC_SPECIAL_SECTIONS): Add sections
- mentioned in the eabi.
+Fri Mar 27 12:46:47 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Jan 18 17:58:19 1996 Kim Knuttila <krk@cygnus.com>
+ * 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.
- * config/tc-ppc.c (ppc_reldata): Changed alignement on reldata_section
- * config/tc-ppc.c (ppc_pdata): Changed the alignment on pdata_section
+Fri Mar 27 10:30:01 1998 Catherine Moore <clm@cygnus.com>
-Mon Jan 15 17:43:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * config/tc-v850.c (md_assemble): Store relocation addend in
+ fixup instead of instruction.
- * config/tc-ppc.c (mapping): Add more relocation suffixes.
+Thu Mar 26 23:07:18 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-Sun Jan 14 21:29:36 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * 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.
- * config/tc-ppc.c (ppc_elf_validate_fix): Allow .gcc_except_table
- as a section it is ok to have unadorned -mrelocatable pointers in.
+Wed Mar 25 13:44:18 1998 Doug Evans <devans@canuck.cygnus.com>
-Sat Jan 13 11:09:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * 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.
- * config/tc-ppc.c (ppc_section*): Wrap these functions inside
- #ifdef OBJ_ELF.
+Wed Mar 25 13:10:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
-Fri Jan 12 15:32:07 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+ * 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.
- * config/obj-elf.c (obj_elf_section): Add hooks so machine
- dependent section attributes can be handled.
+Wed Mar 25 12:59:07 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.h: (md_elf_section_{letter,type,word,flags}): New
- macros to add support for exclude section flag and ordered section
- type.
+ Based on patch from H.J. Lu <hjl@gnu.org>:
+ * Makefile.am (DISTSTUFF): New variable.
+ (diststuff): New target.
+ * Makefile.in: Rebuild.
- * config/tc-ppc.c (ppc_elf_section_{letter,type,word,flags}): New
- functions to add support for exclude section flag and ordered
- section type.
+Tue Mar 24 16:51:29 1998 Nick Clifton <nickc@cygnus.com>
-Fri Jan 12 12:04:00 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call
+ m32r_elf_section_change_hook.
- * subsegs.c (section_symbol): Don't try to look up the section
- symbol in the hash table. It should be possible to have a symbol
- with the same name as a section, but no connection to it.
+ * config/tc-m32r.c (m32r_elf_section_change_hook): New function to
+ emit a nop if a section ends with a 16 bit instruction.
- * read.c (cons_worker): Only call mri_comment_end from flag_mri.
- From James Carlson <carlson@xylogics.com>.
+Tue Mar 24 19:48:09 1998 Ian Lance Taylor <ian@cygnus.com>
- * expr.c (operand): Skip whitespace after a close parenthesis.
- From James Carlson <carlson@xylogics.com>.
+ * 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 Jan 2 12:43:23 1996 Jim Wilson <wilson@chestnut.cygnus.com>
+Tue Mar 24 18:30:58 1998 H.J. Lu <hjl@gnu.org>
- * config/tc-sh.c (md_apply_fix): Call as_bad_where instead of
- as_warn_where for relocation overflow.
- (parse_reg): Accept register name only if next character is
- not alphanumeric.
+ * 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.
-Sat Dec 30 23:42:51 1995 Jeffrey A Law (law@cygnus.com)
+Mon Mar 23 18:53:40 1998 Joel Sherrill <joel@OARcorp.com>
- * ecoff.c (ecoff_stab): Simplify. Correctly handle sym + offset
- addresses for static variables.
+ * configure.in: (sh*-*-rtems*): Switched from ELF to COFF.
+ * configure: Rebuild.
-Thu Dec 21 12:54:32 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+Fri Mar 20 19:15:44 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (mapping): Make @got give a real GOT relocation,
- and xgot give the old toc16 relocation.
- (md_apply_fix3): Support all GOT relocations.
+ * aclocal.m4, configure: Rebuild with libtool 1.2.
-Wed Dec 20 14:57:17 1995 Ian Lance Taylor <ian@cygnus.com>
+Thu Mar 19 16:03:12 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-mips.c (load_address): Correctly handle a constant in
- SVR4_PIC case. From Richard Kenner <kenner@vlsi1.ultra.nyu.edu>.
+ * config/tc-arm.c (md_apply_fix3): fix code to test the range of
+ PC relative branches. Patch courtesy of Jonathan Walton.
-Fri Dec 15 14:25:07 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+Wed Mar 18 09:29:51 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-sh.c (parse_reg): Recognize SH3 registers.
- (get_specific): Handle A_SSR, A_SPC and A_REG_B.
- (build_Mbytes): Handle REG_B.
+ * configure.in (emulations): Add thumb-pe target.
-Fri Dec 15 16:07:25 1995 Ian Lance Taylor <ian@cygnus.com>
+ * configure (emulations): Add thumb-pe target.
- * ecoff.c (ecoff_build_aux): Use new bfd_big_endian macro.
+1998-03-17 Ken Raeburn <raeburn@cygnus.com>
-Fri Dec 15 12:11:48 1995 Raymond Jou <rjou@mexican.cygnus.com>
+ * itbl-lex.l (yywrap): Don't define if already defined as a
+ macro.
- * mpw-make.sed: If linking, edit ALL_CFLAGS to CFLAGS.
+Fri Mar 13 16:31:38 1998 Tom Tromey <tromey@cygnus.com>
-Thu Dec 14 15:09:52 1995 Ian Lance Taylor <ian@cygnus.com>
+ * depend.c (quote_string_for_make): New function.
+ (wrap_output): Use it.
- * config/obj-coff.c (write_object_file): Set the s_align field to
- the number of bytes, rather than to the power of 2.
+Thu Mar 12 18:28:22 1998 Nick Clifton <nickc@cygnus.com>
-Tue Dec 12 12:19:37 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info
+ structure if type is SHT_NOBITS. [Bug fix courtesy of rth]
- * Makefile.in (DISTCLEAN_HERE): New variable.
- (distclean): Use it.
- (maintainer-clean): Depend upon clean-here rather than clean,
- distclean, and clean-info. Run make maintainer-clean in doc.
- Remove files listed in DISTCLEAN_HERE.
- * doc/Makefile.in (maintainer-clean realclean): Split out from
- distclean. Depend upon clean-info and distclean.
+Sat Feb 28 17:28:55 1998 Richard Henderson <rth@cygnus.com>
-Mon Dec 11 16:23:51 1995 Stan Shebs <shebs@andros.cygnus.com>
+ * 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.
- * mac-as.r: Fix copyright and version strings.
- (cfrg): Use PROG_NAME instead of literal name.
+Sat Feb 28 17:06:22 1998 Richard Henderson <rth@cygnus.com>
-Mon Dec 11 14:14:08 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-elf.c [TC_ALPHA]: Include <elf/alpha.h>.
+ * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New.
- * read.c (read_a_source_file): If tc_unrecognized_line is defined,
- call it.
- * config/tc-a29k.h (tc_unrecognized_line): Define.
- * config/tc-a29k.c (a29k_unrecognized_line): New function.
- (md_operand): Handle a29k style local dollar labels.
+Thu Feb 26 15:49:04 1998 Michael Meissner <meissner@cygnus.com>
-Wed Dec 6 17:52:52 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't
+ require padding to the next long word boundary.
- * config/obj-multi.h: If OBJ_MAYBE_ELF, define OBJ_SYMFIELD_TYPE.
+Mon Feb 23 11:29:06 1998 Doug Evans <devans@seba.cygnus.com>
-Tue Dec 5 13:26:34 1995 Ken Raeburn <raeburn@cygnus.com>
+ * cgen.c: #include symcat.h.
+ * config/tc-m32r.c: Likewise.
- * read.c (s_fill): If md_flush_pending_output is defined, call
- it.
+Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com)
-Mon Dec 4 15:10:53 1995 Ken Raeburn <raeburn@cygnus.com>
+ * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be
+ absolute expressions instead of '$' prefixed register names.
- * config/obj-coff.c (size_section, fill_section, fixup_mdeps):
- Treat rs_align_code like rs_align.
+Sat Feb 21 22:36:52 1998 Richard Henderson <rth@cygnus.com>
-Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+ * read.c (s_set): Record file and line info for symbols when -as.
+ (pseudo_set): Don't overwrite that dummy fragment.
- * config/tc-arm.c (cp_address_required_here): Set pre_inc when
- converting an absolute address into a PC-relative one.
+Fri Feb 20 15:03:13 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri Dec 1 11:57:56 1995 Stan Shebs <shebs@andros.cygnus.com>
+ * config/tc-ppc.c (md_pseudo_table): Add "section".
+ (ppc_named_section): New static function.
- * mpw-config.in: Don't always use te-generic.h for emulation.
- (powerpc-apple-macos): Use emulation te-macos.h.
- * mpw-make.sed (install, install-only): Edit in Mac-specific
- install procedure.
+Thu Feb 19 22:25:42 1998 Richard Henderson <rth@cygnus.com>
-Fri Dec 1 10:59:25 1995 Ian Lance Taylor <ian@cygnus.com>
+ * tc-ppc.c (ppc_biei): Cache the last symbol we inserted
+ so we don't have to scan the entire list.
- * configure.in: Improve message about unsupported ELF targets.
- * configure: Rebuild.
+Tue Feb 17 17:02:15 1998 Fred Fish <fnf@cygnus.com>
- * config/tc-m88k.c (m88k_do_align): Correct check for whether fill
- pattern is zero. From Manfred Hollstein.
-
-Thu Nov 30 13:25:49 1995 Kim Knuttila <krk@cygnus.com>
-
- * config/tc-ppc.c (ppc_pe_section): To get the alignment right for
- the various idata sections, we check the name on the .section pseudo.
-
-Thu Nov 30 11:23:42 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * config/obj-coff.c (fixup_segment): If TC_M88K is defined, do not
- add section's paddr to add_number; compatibility to native as and
- ld forbids.
-
-Wed Nov 29 23:14:27 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * configure.in: Treat m68k-sysv4 like m68k-elf, not m68k-sysv3.
-
- * hash.c (struct hash_entry): Moved here...
- * hash.h (struct hash_entry): ...from here.
-
- * config/obj-elf.c (elf_frob_symbol): Don't free and clear sy_obj
- if it's already known to be null.
-
-Wed Nov 29 13:00:20 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/tc-ppc.c (md_apply_fix3): Don't adjust the value for 32
- bit relocs converted to PC relative relocs. This turned out to
- add the offset from the beginning of .text twice.
-
-Tue Nov 28 10:42:36 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * stabs.c (s_stab_generic): In 's' case, free string from
- obstack.
-
- * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Remove unused field
- sy_name_offset.
- * config/obj-multi.h (ELF_TARGET_SYMBOL_FIELDS) [OBJ_MAYBE_ELF]:
- Ditto.
-
- * subsegs.h (segment_info_type): Make bitfields unsigned.
+ * config/tc-d30v.c (parallel_ok): For the explicitly parallel
+ case, allow the parallel instructions to modify the same flag
+ bits.
- * expr.h (struct expressionS): Make X_op and X_unsigned bitfields,
- and move them together. On most systems this will reduce the
- structure size by one word.
- (operatorT): Define O_max.
- * expr.c (expr_begin): Verify that X_op is wide enough to hold
- O_max.
+Thu Feb 19 16:08:15 1998 Richard Henderson <rth@cygnus.com>
- * read.c (pop_insert): Print error returned by hash table
- insertion code.
+ * listing.c (list_symbol_table): Categorize symbols by
+ undefined_section rather than sy_frag->line == NULL.
- * as.c (dump_statistics): Split out from main; dump some hash
- table stats and target-specific stats.
- (start_time): No longer automatic to main.
- (main): Set file-level start_time and call dump_statistics at
- exit. Exit by calling xexit.
- (show_usage): Make --statistics description less specific.
- * subsegs.c (subsegs_print_statistics): New function.
- * write.c (write_print_statistics): New function.
- (n_fixups): New static variable.
- (fix_new_internal): Increment it.
- * read.c (read_print_statistics): New function.
- * read.h (read_print_statistics): Declare.
- * symbol.c (symbol_print_statistics): New function.
- * symbol.h (symbol_print_statistics): Declare.
- * hash.c (hash_print_statistics): New function.
- * hash.h (hash_print_statistics): Declare.
- * config/tc-i386.c (i386_print_statistics): New function.
- * config/tc-i386.h (i386_print_statistics): Declare.
- (tc_print_statistics): New macro.
- * messages.c (as_fatal, as_assert, as_abort): Use xexit, not
- exit.
+Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
- * hash.c (DELETED): Rewrite to use a valid but unique address.
- (START_POWER): Reduce to 10.
- (enum stat_enum): New enumerator, replacing STAT_* index macros.
- Add new values for counting strcmp calls.
- (GROW_FACTOR): New macro.
- (hash_grow): Use GROW_FACTOR. Rewrite for quick returns instead
- of nesting blocks.
- (FULL_VALUE): New macro. Use 1/4 of table size instead of 1/2.
- (hash_new): Use FULL_VALUE.
- (struct hash_control): Definition moved here.
- (hash_code): Don't mask to low bits.
- (hash_ask): Mask returned hash code here. Check hash value before
- calling strcmp; count strcmp calls.
- * hash.h (struct hash_control): Declare, don't define, here.
- (HASH_STATLENGTH): Deleted.
- (struct hash_entry): Add field for hash code.
- (hash_say, hash_apply): Don't declare.
+ * Makefile.am (install-exec-local): Install properly when ln
+ fails or tooldir == prefix.
- * hash.c (destroy): Return void.
- (applicatee): Ditto.
- (main): Fix declarations.
- (hash_apply): Return void. Argument `function' returns void. Put
- inside "#ifdef TEST".
- (hash_say): Define only if TEST is defined.
- * hash.h (hash_apply, hash_say): Declarations deleted.
+Tue Feb 17 18:58:51 1998 Doug Evans <devans@seba.cygnus.com>
-Mon Nov 27 13:18:25 1995 Ian Lance Taylor <ian@cygnus.com>
+ * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand.
+ Test result of insert_operand for error.
- * configure: Rebuild with autoconf 2.7.
+Fri Feb 13 16:41:42 1998 Ian Lance Taylor <ian@cygnus.com>
-Tue Nov 21 18:39:01 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * aclocal.m4 (AC_PROG_CC): Remove local definition.
- * configure: Rebuild with autoconf 2.6.
+Fri Feb 13 00:47:44 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Nov 20 17:26:00 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (macro_build): Handle operand type 'C'.
+ (macro): Fix handling of M_COP[0-3].
- * config/tc-ppc.c (ppc_debug_name_section_size): Remove.
- (ppc_stabx): Don't increment ppc_debug_name_section_size.
- (ppc_bc): Likewise.
- (ppc_frob_file): Remove.
- * config/tc-ppc.h (tc_frob_file): Don't define.
- (ppc_frob_file): Don't declare.
+Thu Feb 12 14:06:59 1998 Ian Lance Taylor <ian@cygnus.com>
-Mon Nov 20 13:37:05 1995 Ken Raeburn <raeburn@cygnus.com>
+ Based on patches from Ross Harvey <ross@teraflop.com>:
+ * 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.
- * Makefile.in (TARG_CPU_DEP_alpha): Mention alpha-opcode.h.
- * config/alpha-opcode.h: Include one-operand variants of jmp and
- jsr.
+ NetBSD patches from Gordon W. Ross <gwr@mc.com>:
+ * configure.in (alpha*-*-netbsd*): New target.
+ * config/te-nbsd.h (LOCAL_LABELS_FB): Define.
+ * configure: Rebuild.
- * config/te-delt88.h: Renamed from te-delta88.h, to avoid conflict
- with te-delta.h in 8.3 file systems.
- * configure.in: Adjusted.
+ * as.h (flag_warn_suppress_instructionswap): Move from here...
+ * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to
+ here, and make static.
-Thu Nov 16 12:49:38 1995 Ian Lance Taylor <ian@cygnus.com>
+ * ehopt.c (eh_frame_code_alignment): Only use seg_info if
+ BFD_ASSEMBLER or MANY_SEGMENTS.
- * config/tc-mips.c (s_err): Remove; just use the one in read.c.
+ * as.c (show_usage): Update bug-gnu-utils address.
+ * gasp.c (show_usage): Likewise.
+ * doc/as.texinfo (Bug Reporting): Likewise.
- * config/m68k-parse.y (yylex): In MRI mode, '@' can start an octal
- number.
- * expr.c (operand): Handle MRI suffixes after unadorned 0.
+Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com)
-Thu Nov 16 00:21:44 1995 Ken Raeburn <raeburn@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.
- Version 2.6 released.
- * Makefile.in (VERSION): Updated to 2.6.
+Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/obj-coff.c (write_object_file): Change use of md_do_align
- to pass a pointer rather than a fill value, to match other uses.
+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 Nov 15 03:52:00 1995 Ken Raeburn <raeburn@cygnus.com>
+Wed Feb 11 16:28:13 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-ns32k.h (TC_FIX_TYPE): Add missing semicolon.
+ * read.c (s_fill): Handle non-constant repeat counts by creating
+ an rs_space fragment.
- * as.c (main): Move md_end call to just after call to
- perform_an_assembly_pass. Delete cpu-specific code here.
- * config/tc-i960.h (md_end): New macro, calls brtab_emit.
- * config/tc-arm.c (md_end): Unused function deleted.
- * config/tc-ns32k.c (md_end): Ditto.
+Tue Feb 10 18:31:31 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-i386.c (i386_align_code): New function, moved here
- from HANDLE_ALIGN macro.
- * config/tc-i386.h (HANDLE_ALIGN): Call it.
+ * config/tc-i386.c (i386_operand): Change error added Jan 2 1998
+ from as_bad to as_warn.
- Mon Jul 31 14:53:19 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+Tue Feb 10 18:04:00 1998 Jim Lemke <jlemke@cygnus.com>
- * config/tc-i386.h (md_do_align): cast fill and 0x90 to char
- before comparing
+ * 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
- Mon May 1 10:91:49 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+Tue Feb 10 17:58:18 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-i386.h (md_do_align): Make ".align n,0x90" generate
- multi-byte nops to avoid changing gcc. The necessary gcc change
- might break old assemblers.
+ * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use
+ seg_fix_rotP rather than fix_root from seg_info.
- Sat Apr 22 20:53:05 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+Tue Feb 10 15:32:22 1998 Ian Carmichael <iancarm@cygnus.com>
- * config/tc-i386.h (md_do_align, HANDLE_ALIGN): Add macros to
- generate optimal multi-byte nop instructions for ".align n"
- ".align n,0x90", and aligns requiring more than 15 bytes of
- padding still generate multiple 0x90's as before.
+ * expr.c: Add support for 0x1_2_3_4 bignums.
-Mon Nov 13 17:40:21 1995 Ian Lance Taylor <ian@cygnus.com>
+Tue Feb 10 14:43:40 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-m68k.c (s_mri_until): Call pop_mri_control.
+ * configure.in: Change -linux* to -linux-gnu*.
+ * configure: Rebuild.
-Mon Nov 13 20:39:06 1995 Stan Shebs <shebs@andros.cygnus.com>
+ * app.c (do_scrub_begin): Treat \r as whitespace.
- * configure.in (ppc-*-macos*, ppc-*-mpw*): New configurations.
- * configure: Update.
- * mpw-make.sed: Reorder commands to make sed happier.
- * config/te-macos.h: New file.
- * config/tc-ppc.h (TARGET_FORMAT): Set correctly for PowerMac.
+Mon Feb 9 14:16:11 1998 Ian Lance Taylor <ian@cygnus.com>
-Sun Nov 12 21:14:56 1995 Jeffrey A Law (law@cygnus.com)
+ * Makefile.am: Update dependencies.
+ * Makefile.in: Rebuild.
- * config/tc-hppa.c (pa_ip): Fix off-by-2 bug in length check for
- conditional branches.
- (md_apply_fix): Likewise.
+Sat Feb 7 15:33:51 1998 Ian Lance Taylor <ian@cygnus.com>
-Thu Nov 9 16:14:01 1995 Ian Lance Taylor <ian@cygnus.com>
+ * configure, aclocal.m4: Rebuild with new libtool.
- * config/tc-a29k.c (md_apply_fix): Warn if an attempt is made to
- generate a reloc which the linker will not handle correctly. Fix
- overflow checking--R_IREL is 18 bits, not 17.
+Fri Feb 6 16:08:30 1998 Jeffrey A Law (law@cygnus.com)
-Wed Nov 8 19:59:36 1995 Ian Lance Taylor <ian@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.
- * config/obj-coff.c (fixup_segment): Don't subtract md_pcrel_from
- from a PC relative reloc if TC_A29K.
+Fri Feb 6 14:44:34 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-a29k.c (line_separator_chars): Restore '@'. Existing
- code depends upon it.
+ * config/tc-v850.c (md_parse_option): Add -mv850any command line option.
- * config/tc-a29k.c (md_operand): Handle $float, $double, and
- $extend. Based on code from Eric Freudenthal
- <freudenthal@nyu.edu>.
- * config/tc-a29k.h (LEX_DOLLAR): Define.
- * read.c (LEX_DOLLAR): Define if not defined.
- (lex_type): Use LEX_DOLLAR.
+Thu Feb 5 12:39:08 1998 Ian Lance Taylor <ian@cygnus.com>
-Wed Nov 8 16:38:14 1995 Eric Freudenthal <freudenthal@nyu.edu>
+ * 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.
- * configure.in (a29k-nyu-sym1): New target, just like other a29k
- targets.
+ * 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.
-Wed Nov 8 11:38:48 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/obj-coff.c (c_dot_file_symbol): Cast xmalloc return.
+ * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
+ * doc/Makefile.in: Likewise.
-Tue Nov 7 09:14:35 1995 Kim Knuttila <krk@cygnus.com>
+Wed Feb 4 15:41:54 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-ppc.c (md_apply_fix3): Added BFD_RELOC_RVA. Currently
- used only by "dlltool.c".
+ * 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.
-Mon Nov 6 18:51:26 1995 Ian Lance Taylor <ian@cygnus.com>
+Wed Feb 4 20:00:26 1998 James G. Smith <jsmith@teknema.demon.co.uk>
- * config/tc-alpha.c: Undefine inline if not __GNUC__.
- (md_pseudo_table): Don't define "extern".
+ * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup().
-Sat Nov 4 00:51:21 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-ppc.c (ppc_biei): Force symbol into text_section.
+Wed Feb 4 13:17:19 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (md_show_usage): Put backslash at end of line.
+ * 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.
-Fri Nov 3 13:02:59 1995 Ian Lance Taylor <ian@cygnus.com>
+ * as.h: If gcc version greater than 2.6, use `__format__' and
+ `__printf__' in function attributes, rather than `format' and
+ `printf'.
- * macro.c (macro_expand_body): Don't warn about == with a
- nonexistent parameter, in case it is in a comment field.
+Mon Feb 2 18:38:18 1998 Ian Lance Taylor <ian@cygnus.com>
- * as.c (main): On TC_A29K, call macro_init with macro_alternate
- set to 1.
- * macro.c (get_any_string): Don't keep quotes if macro_strip_at is
- set, even if macro_alternate is set.
- (get_apost_token): If macro_strip_at, only skip kind if it is '@'.
- (sub_actual): If macro_strip_at, and kind is '@', don't look up
- the token unless it ended in '@'.
- * config/tc-a29k.c (line_separator_chars): Remove '@'.
- * doc/c-a29k.texi: Document macro usage on A29K.
+ * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF.
-Thu Nov 2 23:07:57 1995 Ian Lance Taylor <ian@cygnus.com>
+Mon Feb 2 18:30:34 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
- * config/tc-m68k.c (m68k_ip): Handle new 'W' place, meaning a
- signed word.
- (install_operand): Likewise.
+ 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.
- * config/obj-elf.c (ecoff_debug_pseudo_table): Add "extern".
+Mon Feb 2 10:20:37 1998 Nick Clifton <nickc@cygnus.com>
-Wed Nov 1 15:17:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
+ * config/tc-v850.c (md_assemble): Improvements to error messages.
- * configure.in (m88k-motorola-sysv*): New target.
- * configure: Rebuild.
- * config/te-delta88.h: New file.
- * config/obj-coff.c (write_object_file): Use md_do_align if it is
- defined.
- * config/tc-m88k.h (SUB_SEGMENT_ALIGN): Define.
- (md_do_align): Define.
- * config/tc-m88k.c: Include "subsegs.h".
- (m88k_do_align): New function.
+Mon Feb 2 12:39:05 1998 Geoff Keating <geoffk@ozemail.com.au>
- * config/te-delta.h (STRIP_UNDERSCORE): Don't define.
- (COFF_NOLOAD_PROBLEM): Define.
- (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): Define.
+ * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and
+ BFD_RELOC_HI16_S to store the high bits of any value.
-Wed Nov 1 16:07:43 1995 Ken Raeburn <raeburn@cygnus.com>
+ * 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-i386.c (md_assemble): For a jump instruction with
- non-constant target, require 7 available bytes in the current
- frag, not 6.
+ * 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.
-Tue Oct 31 15:37:16 1995 Fred Fish <fnf@rtl.cygnus.com>
+Fri Jan 30 11:02:35 1998 Doug Evans <devans@canuck.cygnus.com>
- * config/obj-elf.h: Include bfd/elf-bfd.h rather than
- bfd/libelf.h.
+ * read.h (include_dirs): Declare.
+ (include_dir_count,include_dir_maxlen): Declare.
-Tue Oct 31 16:34:28 1995 David Mosberger-Tang <davidm@azstarnet.com>
+Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in (alpha-*-linux*): Use ecoff.
+ * configure.in: Correct check for shared opcodes library.
* configure: Rebuild.
- * ecoff.c (ecoff_directive_extern): New function.
- (ecoff_directive_weakext): New function.
- (ecoff_build_symbols): Handle weak symbols.
- (ecoff_setup_ext): Likewise.
- (ecoff_frob_symbol): Warn about weak common symbols.
- * ecoff.h (ecoff_directive_extern): Declare.
- (ecoff_directive_weakext): Declare.
- * symbols.c (S_IS_WEAK): New function.
- * symbols.h (S_IS_WEAK): Declare.
- * config/obj-ecoff.c (obj_pseudo_table): Add "extern" and
- "weakext".
- * config/tc-mips.c (mips_pseudo_table): Remove "extern".
- (s_extern): Remove.
-
-Tue Oct 31 13:29:08 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config/tc-ppc.c (ppc_lglobl): Do the right thing.
-
- * config/tc-ppc.c (ppc_bb): Call SF_SET_PROCESS.
- (ppc_eb): Likewise. Set the storage class to C_BLOCK, not C_FCN.
- (ppc_frob_symbol): Don't change C_BLOCK symbols to C_HIDEXT.
- * config/obj-coff.c (coff_frob_symbol): Don't call
- SA_SET_SYM_ENDNDX with the current symbol; call it with the next
- one. If OBJ_XCOFF, try to figure out whether the symbol is going
- to be dropped.
-
- * config/tc-ppc.c (md_pseudo_table): Add "bc" and "ec".
- (ppc_stab_symbol): New static variable.
- (ppc_change_csect): Check that ppc_toc_csect is not NULL.
- (ppc_stabx): Set ppc_stab_symbol around call to symbol_make. Set
- sy_tc.real_name to the stab string.
- (ppc_bc, ppc_ec): New static functions.
- (ppc_canonicalize_symbol_name): If ppc_stab_symbol is set, don't
- do anything.
- (ppc_symbol_new_hook): If ppc_stab_symbol is set, don't look for a
- suffix.
- (ppc_frob_symbol): Set BSF_NOT_AT_END for symbols with csect aux
- entries.
-
- * input-scrub.c (input_scrub_push): Reset sb_index.
-
-Mon Oct 30 17:52:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * listing.c (listing_newline): Don't create a frag in the absolute
- section.
-
-Sat Oct 28 01:02:05 1995 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (md_pseudo_table): Add "data" and "text".
- (ppc_csect): Move most of the code to ppc_change_csect, and call
- it.
- (ppc_change_csect): New static function, taken from ppc_csect.
- (ppc_section): New static function.
- (ppc_saw_abs): New static varable.
- (ppc_frob_symbol): Create aux entry for absolute symbols. Warn if
- a symbol has no csect.
- (ppc_adjust_symtab): New function.
- * config/tc-ppc.h (tc_adjust_symtab): Define if OBJ_XCOFF.
- (ppc_adjust_symtab): Declare if OBJ_XCOFF.
-
- * write.c (write_object_file): If tc_adjust_symtab is defined,
- call it just before the call to obj_adjust_symtab.
+ * listing.c (buffer_line): If we can't open the file, set at_end.
+ (listing_print): Remove unused local variable fi.
- * symbols.c (symbol_find_or_make): Change name to be const.
- * symbols.h (symbol_find_or_make): Update declaration.
+ * config/m68k-parse.y (reglistpair): Handle register list in
+ either order.
-Thu Oct 26 19:18:27 1995 Ken Raeburn <raeburn@cygnus.com>
+ * config/vms-conf.h: Don't undef VERSION.
- * doc/as.texinfo (Align): Mention SH.
- * doc/c-m68k.texi (M68K-Directives, .even): Describe behavior, not
- .align value.
- * doc/c-z8k.texi (Z8000 Directives, global): Fix minor typo.
- (Z8000 Directives, even): Don't give numeric align value, instead
- explain behavior.
+Thu Jan 29 14:42:44 1998 Pat Rankin <rankin@eql.caltech.edu>
-Thu Oct 26 11:45:03 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+ * 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.
- * tc-arm.c (do_ldst): Assemble ldr/str r0, [r1] as a pre-increment
- instruction.
+Thu Jan 29 18:48:19 1998 Bill Moyer <billm@cygnus.com>
-Wed Oct 25 11:59:24 1995 Per Bothner <bothner@kalessin.cygnus.com>
+ * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel.
+ (parallel_ok): Relaxed parallel subinstruction dependency check.
- * Makefile.in (diststuff): Also make info.
- (maintainer-clean realclean): Also make clean-info.
+Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com>
-Tue Oct 24 15:21:33 1995 Jeffrey A Law (law@cygnus.com)
+ * 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.
- * config/tc-hppa.c (md_pseudo_table): Add new ".nsubspa" opcode.
- (pa_subspace): For ".nsubspa", always create a new subspace
- with the given attributes, even if one already exists with the
- same name.
+Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
-Tue Oct 24 14:50:38 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+ * configure.in (i386-*-mingw32*): New target.
+ * configure: Rebuild.
- * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Rename from
- TC_FORCE_RELOCATION, taking an additional section argument. If
- the section of the target symbol is not the same as the current
- section, always force the relocation to be used.
- (MD_PCREL_FROM_SECTION): New macro to call md_pcrel_from_section.
+Wed Jan 28 14:51:18 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-ppc.c (md_pcrel_from_section): Rename from the
- md_pcrel_from function, taking an additional section argument.
- Invoke TC_FORCE_RELOCATION_SECTION instead of TC_FORCE_RELOCATION.
+ * symbols.c (resolve_symbol_value): Don't set the segment if it
+ hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER.
- * write.c (TC_FORCE_RELOCATION_SECTION): Define in terms of the
- older TC_FORCE_RELOCATION if not defined.
- (MD_PCREL_FROM_SECTION): If not defined, invoke md_pcrel_from.
- (fixup_segment): Use MD_PCREL_FROM_SECTION instead of
- md_pcrel_from, and TC_FORCE_RELOCATION_SECTION instead of
- TC_FORCE_RELOCATION.
-
-Mon Oct 23 16:20:04 1995 Ken Raeburn <raeburn@cygnus.com>
+ * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to
+ S_GET_SEGMENT.
- * input-scrub.c (as_where): Set name to null pointer if we don't
- have a file name.
- * messages.c (identify): Only print filename if non-null.
- (as_show_where): Ditto, for line number too.
- (as_warn_internal, as_bad_internal): Ditto.
+Wed Jan 28 13:54:50 1998 Pat Rankin <rankin@eql.caltech.edu>
- * input-file.c (input_file_open): If the input file can't be
- opened, consider it an error.
+ as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove
+ depends upon HAVE_{UNLINK,REMOVE} values rather than host
+ compiler.
-Mon Oct 23 11:15:44 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
+Wed Jan 28 13:48:08 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-mips.c: Added mips_4100 control, and support for
- accepting the 4100 as a MIPS architecture variant (md_begin,
- macro_build, mips_ip, md_parse_option). Adding suitable
- command-line OPTIONs, and updating the help text (md_show_usage).
-
-Wed Oct 18 13:20:32 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * subsegs.c (subseg_begin): Only set absolute_frchain.fix_* when
- BFD_ASSEMBLER is defined.
-
- * Use one active frag and one obstack per frag chain:
- * frags.c (frags): Variable deleted.
- (frag_alloc): New function.
- (frag_grow, frag_more, frag_variant, frag_now_fix,
- frag_append_1_char): Refer to frchain_now->frch_obstack instead of
- frags variable.
- (frag_new): Ditto. Verify that frch_last and frag_now match on
- entry and exit, and that old frag_now has non-zero type. Replace
- "know" uses with "assert". Use frag_alloc instead of mucking with
- obstack alignment.
- * frags.h (frags): Declaration deleted.
- * subsegs.h (struct frchain): Add new field frch_frag_now.
- * subsegs.c (frchains, dummy_frag, absolute_frchain): New static
- variables.
- (subsegs_begin): Initialize frchains obstack. Under gcc, don't
- give it any stricter alignment than frchainS structures need. Do
- not initialize frags obstack. Set frag_now to point to
- dummy_obstack. Initialize absolute_frchain.
- (subseg_set_rest): Save and restore frag_now in frch_frag_now
- field of frchainS. Don't create new frags on section switch, and
- use frag_alloc when creating a new frag chain. For absolute
- section, set frchain_now to absolute_frchain. Verify that
- frch_last and frag_now match on entry and exit. Initialize
- per-chain obstack, and under gcc, set required alignment to that
- needed by fragS structure.
-
- * write.c (chain_frchains_together_1): Verify fr_type is nonzero.
-
- * stabs.c (get_stab_string_offset): Only copy input string if a
- fresh copy is needed, not if the section already exists.
- (s_stab_generic): Cache stab section name to bypass lookups, since
- usually it will match. Could be made faster still by changing the
- memory allocation rules.
- (s_xstab): Cache section name to bypass repeated string
- allocation.
-
- * frags.c (frag_new): Deleted register declarations.
-
- * listing.c (frag_now): Don't declare.
-
- * as.c (chunksize): New variable.
- (debug_memory): New variable.
- (main): If debug_memory is set, reduce chunksize and
- _bfd_chunksize.
- * as.h (chunksize): Declare it.
- * read.c (read_begin): Use it.
-
- * config/tc-alpha.c (md_shortopts): Include 'g'.
- (md_parse_option): Ignore it.
-
- * Makefile.in (distclean): Remove Makefile and config.status from
- testsuite directory.
- (clean-here): Don't delete testsuite. Instead, delete only the
- files within it that would be generated by running tests.
-
- * config/tc-hppa.c (hppa_elf_mark_end_of_function): Call
- frag_now_fix instead of accessing obstack info directly.
- * config/tc-arm.c (s_ltorg): Ditto.
- (md_assemble): Ditto.
+ * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define.
- * config/tc-i386.c (md_assemble): Call frag_grow instead of
- obstack_room.
+Wed Jan 28 09:52:00 1998 Nick Clifton <nickc@cygnus.com>
-Wed Oct 18 12:22:59 1995 Ken Raeburn <raeburn@cygnus.com>
+ * config/tc-v850.c (v850_insert_operand): Display instruction when
+ an error is encountered.
- * stabs.c (aout_process_stab): Insert debug symbol into symbol
- chain after parsing value expression, if any, to avoid separating
- continued .stabs lines.
+Tue Jan 27 13:32:01 1998 Robert Lipe <robertl@dgii.com>
-Mon Oct 16 10:56:41 1995 Ian Lance Taylor <ian@cygnus.com>
+ * configure.in (i386-*-sco3.2v5*): Defaults to ELF now.
+ (i386-*-sco3.2v5*coff): New target.
+ (i386-*-sco3.2*): New target.
+ * configure: Rebuild.
- * config/tc-mips.c (mips_elf_pseudo_table): Remove.
- (mips_pop_insert): Don't call pop_insert on mips_elf_pseudo_table.
+Tue Jan 27 11:06:52 1998 Nick Clifton <nickc@cygnus.com>
-Mon Oct 16 07:07:37 1995 Michael Meissner <meissner@wogglebug.tiac.net>
+ * config/tc-v850.c: Tidy error message production.
- * config/tc-ppc.c (md_begin): Use new flags PPC_OPCODE_COMMON for
- -mcom support and PPC_OPCODE_ANY for -many.
- (md_parse_option): Ditto.
- (ppc_arch): Ditto.
- (md_begin): For duplicate instructions, print all duplicates
- before aborting.
+Tue Jan 27 12:24:32 1998 Ian Lance Taylor <ian@cygnus.com>
-Sun Oct 15 22:06:14 1995 Michael Meissner <meissner@cygnus.com>
+ * 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.
- * config/tc-ppc.c (md_parse_option): Support for -mcom to turn on
- common mode operation.
- (md_show_usage): Add -mcom to usage message.
+Tue Jan 27 06:51:59 1998 Richard Henderson <rth@cygnus.com>
-Fri Oct 13 13:32:45 1995 steve chamberlain <sac@slash.cygnus.com>
+ * 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.
- * expr.c (op_rank): Add O_symbol_rva.
- * expr.h (operatorT): Add O_symbol_rva.
- * read.c (cons_worker): Set O_symbol_rva when necessary.
- * write.c (fix_new_exp): Understand O_symbol_rva.
+Tue Jan 27 06:38:35 1998 Richard Henderson <rth@cygnus.com>
-Tue Oct 10 11:34:14 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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 <rth@cygnus.com>
- * config/tc-mips.c: Correct s_cons arguments. From Michael
- Joosten <joost@ori.cadlab.de>.
+ * 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 Oct 9 19:59:53 1995 Ian Lance Taylor <ian@cygnus.com>
+Mon Jan 26 13:07:41 1998 Nick Clifton <nickc@cygnus.com>
- * config/tc-ppc.c (ppc_macro): Make count unsigned.
- (ppc_biei): Set segment to now_seg and value to coff_n_line_nos.
- (ppc_frob_symbol): Handle C_BINCL and C_EINCL symbols by setting
- the fix_line field.
- * config/obj-coff.c (coff_n_line_nos): Rename from n_line_nos, and
- make non-static. Change all users.
- * config/obj-coff.h (coff_n_line_nos): Declare.
+ * config/tc-m32r.c: Detect if explicitly parallel instructions
+ might have an io conflict and issue a warning message.
-Fri Oct 6 16:24:27 1995 Ken Raeburn <raeburn@cygnus.com>
+Thu Jan 22 17:51:44 1998 Nick Clifton <nickc@cygnus.com>
- Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ * 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.
- * configure.in (AC_ARG_WITH(bfd-assembler)): Fix help message.
+Wed Jan 21 16:49:10 1998 Richard Henderson <rth@cygnus.com>
- * config/obj-elf.c (obj_elf_common): Convert specified byte
- alignment to power of two. Set size of local bss symbol.
+ * 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.
- * config/tc-m68k.c (tc_gen_reloc): Fix typo in variable name.
+Fri Jan 16 14:51:48 1998 Ian Lance Taylor <ian@cygnus.com>
-Fri Oct 6 15:22:25 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * sb.c, macro.c: Decide whether to include <string.h> or
- <strings.h> just as as.h does.
+Fri Jan 16 11:30:37 1998 Richard Henderson <rth@cygnus.com>
-Fri Oct 6 09:55:33 1995 Doug Evans <dje@canuck.cygnus.com>
+ * 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.
- * Makefile.in (site.exp): Fix setting of $srcdir.
+Thu Jan 15 14:19:01 1998 Richard Henderson <rth@cygnus.com>
- * config/tc-arm.c (md_atof): Fix little-endian output.
- * config/tc-arm.h (ARM_BI_ENDIAN): Move definition so defined for
- all coff targets.
+ * tc-sh.c (get_specific): Handle SGR & DBR.
-Thu Oct 5 20:17:30 1995 Ken Raeburn <raeburn@cygnus.com>
+Thu Jan 15 13:46:48 1998 Richard Henderson <rth@cygnus.com>
- * doc/as.texinfo: Split out the NS32k family documentation,
- despite its being commented out for now.
- * doc/c-ns32k.texi: New file.
+ * 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.
- * sb.c, macro.c: Include string.h.
+Wed Jan 14 17:52:33 1998 Nick Clifton <nickc@cygnus.com>
- * Makefile.in (comparison): Only check *.o; we don't care if
- timestamps inserted by the native linker differ.
+ * cgen.c: Formatting changes to improve readability.
- * config/tc-alpha.c (alpha_align): Only fill with a no-op pattern
- if alignment stricter than 4 bytes is requested; in that case,
- align to a 4-byte boundary first.
+Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com)
- Thu Sep 28 19:35:27 1995 Pat Rankin <rankin@eql.caltech.edu>
+ * config/tc-mips.c (macro): Rework division code to avoid unfilled
+ delay slot.
- * config/obj-vms.c (VMS_RSYM_Parse): eliminate "might be used
- uninitialized" warning for `Max_Source_Offset'.
+Wed Jan 14 18:04:20 1998 Michael Meissner <meissner@cygnus.com>
-Wed Oct 4 16:17:02 1995 Kim Knuttila <krk@cygnus.com>
+ 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.
- * config/tc-ppc.c (parse_toc_entry): New function to parse [toc]
- qualifiers and detect errors if present.
- (md_assemble): Add call to parse_toc_entry. Also added some support
- for the [tocv] qualifier.
- (ppc_pe_tocd): New function to support data in the toc section.
+Wed Jan 14 15:02:19 1998 Doug Evans <devans@seba.cygnus.com>
-Wed Oct 4 14:03:39 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO.
- * config/tc-ppc.c (ppc_frob_symbol): Don't create an aux entry for
- an absolute symbol.
+Mon Jan 12 13:04:57 1998 Doug Evans <devans@seba.cygnus.com>
-Tue Oct 3 12:18:19 1995 Ian Lance Taylor <ian@cygnus.com>
+ * 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.
- * config/tc-m68k.c (isword): Accept all values from -65536 to
- +65535, so ~VAL will not be rejected.
+Tue Jan 6 15:36:02 1998 Richard Henderson <rth@cygnus.com>
- * cond.c (s_endif): Call demand_empty_rest_of_line. In MRI mode,
- skip characters after the pseudo-op.
- (s_else): Likewise.
- * read.c (get_line_sb): Don't look past buffer_limit.
- (s_include): In MRI mode, skip characters after the file name.
+ * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms.
+ (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication.
-Mon Oct 2 16:15:27 1995 Ian Lance Taylor <ian@cygnus.com>
+Fri Jan 2 16:08:54 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/m68k-parse.y (m68k_reg_parse): In MRI mode, permit
- periods in register names.
+ * config/tc-i386.c (i386_operand): Give an error if there are
+ unrecognized characters after an expression.
-For older changes see ChangeLog.1.
+For older changes see ChangeLog-9697
diff --git a/contrib/binutils/gas/ChangeLog-9295 b/contrib/binutils/gas/ChangeLog-9295
new file mode 100644
index 0000000..7ea48e6
--- /dev/null
+++ b/contrib/binutils/gas/ChangeLog-9295
@@ -0,0 +1,13110 @@
+Sat Dec 30 23:42:51 1995 Jeffrey A Law (law@cygnus.com)
+
+ * ecoff.c (ecoff_stab): Simplify. Correctly handle sym + offset
+ addresses for static variables.
+
+Thu Dec 21 12:54:32 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (mapping): Make @got give a real GOT relocation,
+ and xgot give the old toc16 relocation.
+ (md_apply_fix3): Support all GOT relocations.
+
+Wed Dec 20 14:57:17 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (load_address): Correctly handle a constant in
+ SVR4_PIC case. From Richard Kenner <kenner@vlsi1.ultra.nyu.edu>.
+
+Fri Dec 15 14:25:07 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config/tc-sh.c (parse_reg): Recognize SH3 registers.
+ (get_specific): Handle A_SSR, A_SPC and A_REG_B.
+ (build_Mbytes): Handle REG_B.
+
+Fri Dec 15 16:07:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_build_aux): Use new bfd_big_endian macro.
+
+Fri Dec 15 12:11:48 1995 Raymond Jou <rjou@mexican.cygnus.com>
+
+ * mpw-make.sed: If linking, edit ALL_CFLAGS to CFLAGS.
+
+Thu Dec 14 15:09:52 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (write_object_file): Set the s_align field to
+ the number of bytes, rather than to the power of 2.
+
+Tue Dec 12 12:19:37 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (DISTCLEAN_HERE): New variable.
+ (distclean): Use it.
+ (maintainer-clean): Depend upon clean-here rather than clean,
+ distclean, and clean-info. Run make maintainer-clean in doc.
+ Remove files listed in DISTCLEAN_HERE.
+ * doc/Makefile.in (maintainer-clean realclean): Split out from
+ distclean. Depend upon clean-info and distclean.
+
+Mon Dec 11 16:23:51 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mac-as.r: Fix copyright and version strings.
+ (cfrg): Use PROG_NAME instead of literal name.
+
+Mon Dec 11 14:14:08 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (read_a_source_file): If tc_unrecognized_line is defined,
+ call it.
+ * config/tc-a29k.h (tc_unrecognized_line): Define.
+ * config/tc-a29k.c (a29k_unrecognized_line): New function.
+ (md_operand): Handle a29k style local dollar labels.
+
+Wed Dec 6 17:52:52 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-multi.h: If OBJ_MAYBE_ELF, define OBJ_SYMFIELD_TYPE.
+
+Tue Dec 5 13:26:34 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * read.c (s_fill): If md_flush_pending_output is defined, call
+ it.
+
+Mon Dec 4 15:10:53 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/obj-coff.c (size_section, fill_section, fixup_mdeps):
+ Treat rs_align_code like rs_align.
+
+Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * config/tc-arm.c (cp_address_required_here): Set pre_inc when
+ converting an absolute address into a PC-relative one.
+
+Fri Dec 1 11:57:56 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Don't always use te-generic.h for emulation.
+ (powerpc-apple-macos): Use emulation te-macos.h.
+ * mpw-make.sed (install, install-only): Edit in Mac-specific
+ install procedure.
+
+Fri Dec 1 10:59:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Improve message about unsupported ELF targets.
+ * configure: Rebuild.
+
+ * config/tc-m88k.c (m88k_do_align): Correct check for whether fill
+ pattern is zero. From Manfred Hollstein.
+
+Thu Nov 30 13:25:49 1995 Kim Knuttila <krk@cygnus.com>
+
+ * config/tc-ppc.c (ppc_pe_section): To get the alignment right for
+ the various idata sections, we check the name on the .section pseudo.
+
+Thu Nov 30 11:23:42 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
+
+ * config/obj-coff.c (fixup_segment): If TC_M88K is defined, do not
+ add section's paddr to add_number; compatibility to native as and
+ ld forbids.
+
+Wed Nov 29 23:14:27 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * configure.in: Treat m68k-sysv4 like m68k-elf, not m68k-sysv3.
+
+ * hash.c (struct hash_entry): Moved here...
+ * hash.h (struct hash_entry): ...from here.
+
+ * config/obj-elf.c (elf_frob_symbol): Don't free and clear sy_obj
+ if it's already known to be null.
+
+Wed Nov 29 13:00:20 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_apply_fix3): Don't adjust the value for 32
+ bit relocs converted to PC relative relocs. This turned out to
+ add the offset from the beginning of .text twice.
+
+Tue Nov 28 10:42:36 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * stabs.c (s_stab_generic): In 's' case, free string from
+ obstack.
+
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Remove unused field
+ sy_name_offset.
+ * config/obj-multi.h (ELF_TARGET_SYMBOL_FIELDS) [OBJ_MAYBE_ELF]:
+ Ditto.
+
+ * subsegs.h (segment_info_type): Make bitfields unsigned.
+
+ * expr.h (struct expressionS): Make X_op and X_unsigned bitfields,
+ and move them together. On most systems this will reduce the
+ structure size by one word.
+ (operatorT): Define O_max.
+ * expr.c (expr_begin): Verify that X_op is wide enough to hold
+ O_max.
+
+ * read.c (pop_insert): Print error returned by hash table
+ insertion code.
+
+ * as.c (dump_statistics): Split out from main; dump some hash
+ table stats and target-specific stats.
+ (start_time): No longer automatic to main.
+ (main): Set file-level start_time and call dump_statistics at
+ exit. Exit by calling xexit.
+ (show_usage): Make --statistics description less specific.
+ * subsegs.c (subsegs_print_statistics): New function.
+ * write.c (write_print_statistics): New function.
+ (n_fixups): New static variable.
+ (fix_new_internal): Increment it.
+ * read.c (read_print_statistics): New function.
+ * read.h (read_print_statistics): Declare.
+ * symbol.c (symbol_print_statistics): New function.
+ * symbol.h (symbol_print_statistics): Declare.
+ * hash.c (hash_print_statistics): New function.
+ * hash.h (hash_print_statistics): Declare.
+ * config/tc-i386.c (i386_print_statistics): New function.
+ * config/tc-i386.h (i386_print_statistics): Declare.
+ (tc_print_statistics): New macro.
+ * messages.c (as_fatal, as_assert, as_abort): Use xexit, not
+ exit.
+
+ * hash.c (DELETED): Rewrite to use a valid but unique address.
+ (START_POWER): Reduce to 10.
+ (enum stat_enum): New enumerator, replacing STAT_* index macros.
+ Add new values for counting strcmp calls.
+ (GROW_FACTOR): New macro.
+ (hash_grow): Use GROW_FACTOR. Rewrite for quick returns instead
+ of nesting blocks.
+ (FULL_VALUE): New macro. Use 1/4 of table size instead of 1/2.
+ (hash_new): Use FULL_VALUE.
+ (struct hash_control): Definition moved here.
+ (hash_code): Don't mask to low bits.
+ (hash_ask): Mask returned hash code here. Check hash value before
+ calling strcmp; count strcmp calls.
+ * hash.h (struct hash_control): Declare, don't define, here.
+ (HASH_STATLENGTH): Deleted.
+ (struct hash_entry): Add field for hash code.
+ (hash_say, hash_apply): Don't declare.
+
+ * hash.c (destroy): Return void.
+ (applicatee): Ditto.
+ (main): Fix declarations.
+ (hash_apply): Return void. Argument `function' returns void. Put
+ inside "#ifdef TEST".
+ (hash_say): Define only if TEST is defined.
+ * hash.h (hash_apply, hash_say): Declarations deleted.
+
+Mon Nov 27 13:18:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Rebuild with autoconf 2.7.
+
+Tue Nov 21 18:39:01 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * aclocal.m4 (AC_PROG_CC): Remove local definition.
+ * configure: Rebuild with autoconf 2.6.
+
+Mon Nov 20 17:26:00 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_debug_name_section_size): Remove.
+ (ppc_stabx): Don't increment ppc_debug_name_section_size.
+ (ppc_bc): Likewise.
+ (ppc_frob_file): Remove.
+ * config/tc-ppc.h (tc_frob_file): Don't define.
+ (ppc_frob_file): Don't declare.
+
+Mon Nov 20 13:37:05 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.in (TARG_CPU_DEP_alpha): Mention alpha-opcode.h.
+ * config/alpha-opcode.h: Include one-operand variants of jmp and
+ jsr.
+
+ * config/te-delt88.h: Renamed from te-delta88.h, to avoid conflict
+ with te-delta.h in 8.3 file systems.
+ * configure.in: Adjusted.
+
+Thu Nov 16 12:49:38 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (s_err): Remove; just use the one in read.c.
+
+ * config/m68k-parse.y (yylex): In MRI mode, '@' can start an octal
+ number.
+ * expr.c (operand): Handle MRI suffixes after unadorned 0.
+
+Thu Nov 16 00:21:44 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ Version 2.6 released.
+ * Makefile.in (VERSION): Updated to 2.6.
+
+ * config/obj-coff.c (write_object_file): Change use of md_do_align
+ to pass a pointer rather than a fill value, to match other uses.
+
+Wed Nov 15 03:52:00 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-ns32k.h (TC_FIX_TYPE): Add missing semicolon.
+
+ * as.c (main): Move md_end call to just after call to
+ perform_an_assembly_pass. Delete cpu-specific code here.
+ * config/tc-i960.h (md_end): New macro, calls brtab_emit.
+ * config/tc-arm.c (md_end): Unused function deleted.
+ * config/tc-ns32k.c (md_end): Ditto.
+
+ * config/tc-i386.c (i386_align_code): New function, moved here
+ from HANDLE_ALIGN macro.
+ * config/tc-i386.h (HANDLE_ALIGN): Call it.
+
+ Mon Jul 31 14:53:19 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.h (md_do_align): cast fill and 0x90 to char
+ before comparing
+
+ Mon May 1 10:91:49 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.h (md_do_align): Make ".align n,0x90" generate
+ multi-byte nops to avoid changing gcc. The necessary gcc change
+ might break old assemblers.
+
+ Sat Apr 22 20:53:05 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.h (md_do_align, HANDLE_ALIGN): Add macros to
+ generate optimal multi-byte nop instructions for ".align n"
+ ".align n,0x90", and aligns requiring more than 15 bytes of
+ padding still generate multiple 0x90's as before.
+
+Mon Nov 13 17:40:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (s_mri_until): Call pop_mri_control.
+
+Mon Nov 13 20:39:06 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.in (ppc-*-macos*, ppc-*-mpw*): New configurations.
+ * configure: Update.
+ * mpw-make.sed: Reorder commands to make sed happier.
+ * config/te-macos.h: New file.
+ * config/tc-ppc.h (TARGET_FORMAT): Set correctly for PowerMac.
+
+Sun Nov 12 21:14:56 1995 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (pa_ip): Fix off-by-2 bug in length check for
+ conditional branches.
+ (md_apply_fix): Likewise.
+
+Thu Nov 9 16:14:01 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-a29k.c (md_apply_fix): Warn if an attempt is made to
+ generate a reloc which the linker will not handle correctly. Fix
+ overflow checking--R_IREL is 18 bits, not 17.
+
+Wed Nov 8 19:59:36 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Don't subtract md_pcrel_from
+ from a PC relative reloc if TC_A29K.
+
+ * config/tc-a29k.c (line_separator_chars): Restore '@'. Existing
+ code depends upon it.
+
+ * config/tc-a29k.c (md_operand): Handle $float, $double, and
+ $extend. Based on code from Eric Freudenthal
+ <freudenthal@nyu.edu>.
+ * config/tc-a29k.h (LEX_DOLLAR): Define.
+ * read.c (LEX_DOLLAR): Define if not defined.
+ (lex_type): Use LEX_DOLLAR.
+
+Wed Nov 8 16:38:14 1995 Eric Freudenthal <freudenthal@nyu.edu>
+
+ * configure.in (a29k-nyu-sym1): New target, just like other a29k
+ targets.
+
+Wed Nov 8 11:38:48 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (c_dot_file_symbol): Cast xmalloc return.
+
+Tue Nov 7 09:14:35 1995 Kim Knuttila <krk@cygnus.com>
+
+ * config/tc-ppc.c (md_apply_fix3): Added BFD_RELOC_RVA. Currently
+ used only by "dlltool.c".
+
+Mon Nov 6 18:51:26 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-alpha.c: Undefine inline if not __GNUC__.
+ (md_pseudo_table): Don't define "extern".
+
+Sat Nov 4 00:51:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_biei): Force symbol into text_section.
+
+ * config/tc-ppc.c (md_show_usage): Put backslash at end of line.
+
+Fri Nov 3 13:02:59 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * macro.c (macro_expand_body): Don't warn about == with a
+ nonexistent parameter, in case it is in a comment field.
+
+ * as.c (main): On TC_A29K, call macro_init with macro_alternate
+ set to 1.
+ * macro.c (get_any_string): Don't keep quotes if macro_strip_at is
+ set, even if macro_alternate is set.
+ (get_apost_token): If macro_strip_at, only skip kind if it is '@'.
+ (sub_actual): If macro_strip_at, and kind is '@', don't look up
+ the token unless it ended in '@'.
+ * config/tc-a29k.c (line_separator_chars): Remove '@'.
+ * doc/c-a29k.texi: Document macro usage on A29K.
+
+Thu Nov 2 23:07:57 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Handle new 'W' place, meaning a
+ signed word.
+ (install_operand): Likewise.
+
+ * config/obj-elf.c (ecoff_debug_pseudo_table): Add "extern".
+
+Wed Nov 1 15:17:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
+
+ * configure.in (m88k-motorola-sysv*): New target.
+ * configure: Rebuild.
+ * config/te-delta88.h: New file.
+ * config/obj-coff.c (write_object_file): Use md_do_align if it is
+ defined.
+ * config/tc-m88k.h (SUB_SEGMENT_ALIGN): Define.
+ (md_do_align): Define.
+ * config/tc-m88k.c: Include "subsegs.h".
+ (m88k_do_align): New function.
+
+ * config/te-delta.h (STRIP_UNDERSCORE): Don't define.
+ (COFF_NOLOAD_PROBLEM): Define.
+ (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): Define.
+
+Wed Nov 1 16:07:43 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-i386.c (md_assemble): For a jump instruction with
+ non-constant target, require 7 available bytes in the current
+ frag, not 6.
+
+Tue Oct 31 15:37:16 1995 Fred Fish <fnf@rtl.cygnus.com>
+
+ * config/obj-elf.h: Include bfd/elf-bfd.h rather than
+ bfd/libelf.h.
+
+Tue Oct 31 16:34:28 1995 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * configure.in (alpha-*-linux*): Use ecoff.
+ * configure: Rebuild.
+ * ecoff.c (ecoff_directive_extern): New function.
+ (ecoff_directive_weakext): New function.
+ (ecoff_build_symbols): Handle weak symbols.
+ (ecoff_setup_ext): Likewise.
+ (ecoff_frob_symbol): Warn about weak common symbols.
+ * ecoff.h (ecoff_directive_extern): Declare.
+ (ecoff_directive_weakext): Declare.
+ * symbols.c (S_IS_WEAK): New function.
+ * symbols.h (S_IS_WEAK): Declare.
+ * config/obj-ecoff.c (obj_pseudo_table): Add "extern" and
+ "weakext".
+ * config/tc-mips.c (mips_pseudo_table): Remove "extern".
+ (s_extern): Remove.
+
+Tue Oct 31 13:29:08 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_lglobl): Do the right thing.
+
+ * config/tc-ppc.c (ppc_bb): Call SF_SET_PROCESS.
+ (ppc_eb): Likewise. Set the storage class to C_BLOCK, not C_FCN.
+ (ppc_frob_symbol): Don't change C_BLOCK symbols to C_HIDEXT.
+ * config/obj-coff.c (coff_frob_symbol): Don't call
+ SA_SET_SYM_ENDNDX with the current symbol; call it with the next
+ one. If OBJ_XCOFF, try to figure out whether the symbol is going
+ to be dropped.
+
+ * config/tc-ppc.c (md_pseudo_table): Add "bc" and "ec".
+ (ppc_stab_symbol): New static variable.
+ (ppc_change_csect): Check that ppc_toc_csect is not NULL.
+ (ppc_stabx): Set ppc_stab_symbol around call to symbol_make. Set
+ sy_tc.real_name to the stab string.
+ (ppc_bc, ppc_ec): New static functions.
+ (ppc_canonicalize_symbol_name): If ppc_stab_symbol is set, don't
+ do anything.
+ (ppc_symbol_new_hook): If ppc_stab_symbol is set, don't look for a
+ suffix.
+ (ppc_frob_symbol): Set BSF_NOT_AT_END for symbols with csect aux
+ entries.
+
+ * input-scrub.c (input_scrub_push): Reset sb_index.
+
+Mon Oct 30 17:52:46 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * listing.c (listing_newline): Don't create a frag in the absolute
+ section.
+
+Sat Oct 28 01:02:05 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (md_pseudo_table): Add "data" and "text".
+ (ppc_csect): Move most of the code to ppc_change_csect, and call
+ it.
+ (ppc_change_csect): New static function, taken from ppc_csect.
+ (ppc_section): New static function.
+ (ppc_saw_abs): New static varable.
+ (ppc_frob_symbol): Create aux entry for absolute symbols. Warn if
+ a symbol has no csect.
+ (ppc_adjust_symtab): New function.
+ * config/tc-ppc.h (tc_adjust_symtab): Define if OBJ_XCOFF.
+ (ppc_adjust_symtab): Declare if OBJ_XCOFF.
+
+ * write.c (write_object_file): If tc_adjust_symtab is defined,
+ call it just before the call to obj_adjust_symtab.
+
+ * symbols.c (symbol_find_or_make): Change name to be const.
+ * symbols.h (symbol_find_or_make): Update declaration.
+
+Thu Oct 26 19:18:27 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * doc/as.texinfo (Align): Mention SH.
+ * doc/c-m68k.texi (M68K-Directives, .even): Describe behavior, not
+ .align value.
+ * doc/c-z8k.texi (Z8000 Directives, global): Fix minor typo.
+ (Z8000 Directives, even): Don't give numeric align value, instead
+ explain behavior.
+
+Thu Oct 26 11:45:03 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * tc-arm.c (do_ldst): Assemble ldr/str r0, [r1] as a pre-increment
+ instruction.
+
+Wed Oct 25 11:59:24 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * Makefile.in (diststuff): Also make info.
+ (maintainer-clean realclean): Also make clean-info.
+
+Tue Oct 24 15:21:33 1995 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (md_pseudo_table): Add new ".nsubspa" opcode.
+ (pa_subspace): For ".nsubspa", always create a new subspace
+ with the given attributes, even if one already exists with the
+ same name.
+
+Tue Oct 24 14:50:38 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Rename from
+ TC_FORCE_RELOCATION, taking an additional section argument. If
+ the section of the target symbol is not the same as the current
+ section, always force the relocation to be used.
+ (MD_PCREL_FROM_SECTION): New macro to call md_pcrel_from_section.
+
+ * config/tc-ppc.c (md_pcrel_from_section): Rename from the
+ md_pcrel_from function, taking an additional section argument.
+ Invoke TC_FORCE_RELOCATION_SECTION instead of TC_FORCE_RELOCATION.
+
+ * write.c (TC_FORCE_RELOCATION_SECTION): Define in terms of the
+ older TC_FORCE_RELOCATION if not defined.
+ (MD_PCREL_FROM_SECTION): If not defined, invoke md_pcrel_from.
+ (fixup_segment): Use MD_PCREL_FROM_SECTION instead of
+ md_pcrel_from, and TC_FORCE_RELOCATION_SECTION instead of
+ TC_FORCE_RELOCATION.
+
+Mon Oct 23 16:20:04 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * input-scrub.c (as_where): Set name to null pointer if we don't
+ have a file name.
+ * messages.c (identify): Only print filename if non-null.
+ (as_show_where): Ditto, for line number too.
+ (as_warn_internal, as_bad_internal): Ditto.
+
+ * input-file.c (input_file_open): If the input file can't be
+ opened, consider it an error.
+
+Mon Oct 23 11:15:44 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
+
+ * config/tc-mips.c: Added mips_4100 control, and support for
+ accepting the 4100 as a MIPS architecture variant (md_begin,
+ macro_build, mips_ip, md_parse_option). Adding suitable
+ command-line OPTIONs, and updating the help text (md_show_usage).
+
+Wed Oct 18 13:20:32 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * subsegs.c (subseg_begin): Only set absolute_frchain.fix_* when
+ BFD_ASSEMBLER is defined.
+
+ * Use one active frag and one obstack per frag chain:
+ * frags.c (frags): Variable deleted.
+ (frag_alloc): New function.
+ (frag_grow, frag_more, frag_variant, frag_now_fix,
+ frag_append_1_char): Refer to frchain_now->frch_obstack instead of
+ frags variable.
+ (frag_new): Ditto. Verify that frch_last and frag_now match on
+ entry and exit, and that old frag_now has non-zero type. Replace
+ "know" uses with "assert". Use frag_alloc instead of mucking with
+ obstack alignment.
+ * frags.h (frags): Declaration deleted.
+ * subsegs.h (struct frchain): Add new field frch_frag_now.
+ * subsegs.c (frchains, dummy_frag, absolute_frchain): New static
+ variables.
+ (subsegs_begin): Initialize frchains obstack. Under gcc, don't
+ give it any stricter alignment than frchainS structures need. Do
+ not initialize frags obstack. Set frag_now to point to
+ dummy_obstack. Initialize absolute_frchain.
+ (subseg_set_rest): Save and restore frag_now in frch_frag_now
+ field of frchainS. Don't create new frags on section switch, and
+ use frag_alloc when creating a new frag chain. For absolute
+ section, set frchain_now to absolute_frchain. Verify that
+ frch_last and frag_now match on entry and exit. Initialize
+ per-chain obstack, and under gcc, set required alignment to that
+ needed by fragS structure.
+
+ * write.c (chain_frchains_together_1): Verify fr_type is nonzero.
+
+ * stabs.c (get_stab_string_offset): Only copy input string if a
+ fresh copy is needed, not if the section already exists.
+ (s_stab_generic): Cache stab section name to bypass lookups, since
+ usually it will match. Could be made faster still by changing the
+ memory allocation rules.
+ (s_xstab): Cache section name to bypass repeated string
+ allocation.
+
+ * frags.c (frag_new): Deleted register declarations.
+
+ * listing.c (frag_now): Don't declare.
+
+ * as.c (chunksize): New variable.
+ (debug_memory): New variable.
+ (main): If debug_memory is set, reduce chunksize and
+ _bfd_chunksize.
+ * as.h (chunksize): Declare it.
+ * read.c (read_begin): Use it.
+
+ * config/tc-alpha.c (md_shortopts): Include 'g'.
+ (md_parse_option): Ignore it.
+
+ * Makefile.in (distclean): Remove Makefile and config.status from
+ testsuite directory.
+ (clean-here): Don't delete testsuite. Instead, delete only the
+ files within it that would be generated by running tests.
+
+ * config/tc-hppa.c (hppa_elf_mark_end_of_function): Call
+ frag_now_fix instead of accessing obstack info directly.
+ * config/tc-arm.c (s_ltorg): Ditto.
+ (md_assemble): Ditto.
+
+ * config/tc-i386.c (md_assemble): Call frag_grow instead of
+ obstack_room.
+
+Wed Oct 18 12:22:59 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * stabs.c (aout_process_stab): Insert debug symbol into symbol
+ chain after parsing value expression, if any, to avoid separating
+ continued .stabs lines.
+
+Mon Oct 16 10:56:41 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_elf_pseudo_table): Remove.
+ (mips_pop_insert): Don't call pop_insert on mips_elf_pseudo_table.
+
+Mon Oct 16 07:07:37 1995 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * config/tc-ppc.c (md_begin): Use new flags PPC_OPCODE_COMMON for
+ -mcom support and PPC_OPCODE_ANY for -many.
+ (md_parse_option): Ditto.
+ (ppc_arch): Ditto.
+ (md_begin): For duplicate instructions, print all duplicates
+ before aborting.
+
+Sun Oct 15 22:06:14 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (md_parse_option): Support for -mcom to turn on
+ common mode operation.
+ (md_show_usage): Add -mcom to usage message.
+
+Fri Oct 13 13:32:45 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * expr.c (op_rank): Add O_symbol_rva.
+ * expr.h (operatorT): Add O_symbol_rva.
+ * read.c (cons_worker): Set O_symbol_rva when necessary.
+ * write.c (fix_new_exp): Understand O_symbol_rva.
+
+Tue Oct 10 11:34:14 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c: Correct s_cons arguments. From Michael
+ Joosten <joost@ori.cadlab.de>.
+
+Mon Oct 9 19:59:53 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_macro): Make count unsigned.
+ (ppc_biei): Set segment to now_seg and value to coff_n_line_nos.
+ (ppc_frob_symbol): Handle C_BINCL and C_EINCL symbols by setting
+ the fix_line field.
+ * config/obj-coff.c (coff_n_line_nos): Rename from n_line_nos, and
+ make non-static. Change all users.
+ * config/obj-coff.h (coff_n_line_nos): Declare.
+
+Fri Oct 6 16:24:27 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * configure.in (AC_ARG_WITH(bfd-assembler)): Fix help message.
+
+ * config/obj-elf.c (obj_elf_common): Convert specified byte
+ alignment to power of two. Set size of local bss symbol.
+
+ * config/tc-m68k.c (tc_gen_reloc): Fix typo in variable name.
+
+Fri Oct 6 15:22:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * sb.c, macro.c: Decide whether to include <string.h> or
+ <strings.h> just as as.h does.
+
+Fri Oct 6 09:55:33 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (site.exp): Fix setting of $srcdir.
+
+ * config/tc-arm.c (md_atof): Fix little-endian output.
+ * config/tc-arm.h (ARM_BI_ENDIAN): Move definition so defined for
+ all coff targets.
+
+Thu Oct 5 20:17:30 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * doc/as.texinfo: Split out the NS32k family documentation,
+ despite its being commented out for now.
+ * doc/c-ns32k.texi: New file.
+
+ * sb.c, macro.c: Include string.h.
+
+ * Makefile.in (comparison): Only check *.o; we don't care if
+ timestamps inserted by the native linker differ.
+
+ * config/tc-alpha.c (alpha_align): Only fill with a no-op pattern
+ if alignment stricter than 4 bytes is requested; in that case,
+ align to a 4-byte boundary first.
+
+ Thu Sep 28 19:35:27 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (VMS_RSYM_Parse): eliminate "might be used
+ uninitialized" warning for `Max_Source_Offset'.
+
+Wed Oct 4 16:17:02 1995 Kim Knuttila <krk@cygnus.com>
+
+ * config/tc-ppc.c (parse_toc_entry): New function to parse [toc]
+ qualifiers and detect errors if present.
+ (md_assemble): Add call to parse_toc_entry. Also added some support
+ for the [tocv] qualifier.
+ (ppc_pe_tocd): New function to support data in the toc section.
+
+Wed Oct 4 14:03:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_frob_symbol): Don't create an aux entry for
+ an absolute symbol.
+
+Tue Oct 3 12:18:19 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (isword): Accept all values from -65536 to
+ +65535, so ~VAL will not be rejected.
+
+ * cond.c (s_endif): Call demand_empty_rest_of_line. In MRI mode,
+ skip characters after the pseudo-op.
+ (s_else): Likewise.
+ * read.c (get_line_sb): Don't look past buffer_limit.
+ (s_include): In MRI mode, skip characters after the file name.
+
+Mon Oct 2 16:15:27 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/m68k-parse.y (m68k_reg_parse): In MRI mode, permit
+ periods in register names.
+
+Sat Sep 30 23:03:31 1995 Jeff Law (law@hurl.cygnus.com)
+
+ * config/tc-hppa.c (hppa_fix_adjustable): DP relative relocs
+ are not adjustable in SOM to avoid confusing the optimizing
+ linker.
+
+Fri Sep 29 15:18:08 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Add some support for i960 MRI compatibility mode.
+ * config/tc-i960.c (md_pseudo_table): Add endian.
+ (get_args): Don't discard a space between alphanumeric characters.
+ (get_cdisp): Change text_section to now_seg.
+ (s_endian): New static function.
+ * config/tc-i960.h (MRI_MODE_NEEDS_PSEUDO_DOT): Define.
+ * expr.h (operatorT): Add O_logical_not, O_logical_and, and
+ O_logical_or.
+ * expr.c (operand): Treat '!' as logical not operator. If
+ TC_I960, in MRI mode permit `sizeof secname' and `startof
+ secname'.
+ (op_rank): Bump values by 2 to make room for && and ||. Add
+ entries for !, &&, and ||.
+ (expr_begin): Only do MRI changes if TC_M68K.
+ (operator): Recognize || and &&.
+ (expr): Handle new operatorT values.
+ * symbols.c (resolve_symbol_value): Handle new operatorT values.
+ (print_expr_1): Likewise.
+ * read.c (potable): Add debug, err, irep, irepc, print, purgem,
+ and rep.
+ (read_a_source_file): Handle MRI_MODE_NEEDS_PSEUDO_DOT.
+ (mri_comment_field): Only handle weird comments if TC_M68K.
+ (s_err): New function.
+ (s_org): Only punt in MRI mode if TC_M68K.
+ (s_mri_sect): Write TC_I960 version.
+ (s_print, s_purgem): New functions.
+ * read.h (s_err, s_print, s_purgem): Declare.
+ * cond.c (s_ifeqs): Implement.
+ (ignore_input): Handle MRI_MODE_NEEDS_PSEUDO_DOT.
+ * macro.c (macro_strip_at): New static variable.
+ (macro_init): Add strip_at parameter.
+ (do_formals): If macro_strip_at, change NARG to $NARG.
+ (define_macro): Skip a comma after the macro name.
+ (get_apost_token): Skip character if macro_strip_at, even if
+ macro_mri.
+ (macro_expand_body): If macro_strip_at, don't recognize parameters
+ in strings unless they are preceded by an '@'. If macro_strip_at,
+ pass '@' as strip character to sub_actual. If macro_strip_at,
+ strip '@' characters.
+ (macro_expand): If macro_strip_at, change NARG to $NARG.
+ (delete_macro): New function.
+ (expand_irp): Skip leading and trailing '"' characters if irpc.
+ * macro.h (macro_init): Mention new strip_at parameter.
+ (delete_macro): Declare.
+ * as.c (main): If TC_I960, pass flag_mri to macro_init as
+ strip_at; otherwise, pass 0.
+ * gasp.c (process_pseudo_op): Pass 0 to macro_init as strip_at.
+ (main): Likewise.
+ * doc/as.texinfo: Document i960 MRI mode.
+
+ * as.c (show_usage): Mention --defsym.
+
+Thu Sep 28 19:25:04 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Translate "powerpc" into "ppc", remove gen of
+ VERSION, move gen of "conf" here from makefile.
+ * mpw-make.sed: New file, sed commands to translate Unix makefile
+ into MPW syntax.
+ * mpw-make.in: Remove.
+ * mac-as.r: New file, Mac resource file.
+ * as.h (inline): Don't decide about defining if __MWERKS__,
+ remove redundant conditional and definition.
+
+ * stabs.c (s_stab_generic): Fix syntax for OBJ_PROCESS_STAB.
+
+Thu Sep 28 15:43:15 1995 Kim Knuttila <krk@nellie>
+
+ * config/tc-ppc.c (md_apply_fix3): Removed some TE_PE specific
+ manipulations, since I can't prove they're needed.
+ (md_begin): Removed init_regtable, insert_reg, and the call points.
+ (register_name): New function. Parses a register name, if appropriate.
+ (md_assemble): Added call to register_name to handle symbolic names.
+ (ppc_pe_section): Removed all duplicate IMAGE defines, and include
+ coff/pe.h instead.
+
+Thu Sep 28 12:09:19 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.h (tc_fix_adjustable): Define.
+ (ppc_pe_fix_adjustable): Declare.
+ * config/tc-ppc.c (ppc_pe_fix_adjustable): New function.
+
+Thu Sep 28 01:11:58 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * config/tc-arm.h (TARGET_FORMAT): Define for arm-coff.
+
+Wed Sep 27 12:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (S_IS_LOCAL): All symbols in reg_section are local.
+
+ * config/tc-ppc.h (OBJ_XCOFF): Define if OBJ_COFF and not TE_PE.
+ Change OBJ_COFF checks to check OBJ_XCOFF instead.
+ (TARGET_FORMAT): Fully parenthesize.
+ (LEX_QM): Define if TE_PE.
+ * config/tc-ppc.c: Replace OBJ_COFF by OBJ_XCOFF throughout.
+ Remove checks of TE_PE within #ifdef OBJ_XCOFF sections.
+ (init_regtable): Make i unsigned.
+ (ppc_set_current_section): Rename from setCurrentSection. Change
+ all callers.
+ (ppc_arch): Return after as_fatal to avoid gcc warning.
+ (md_assemble): Only declare reloc if OBJ_ELF. Add default to
+ switch on fixups[i].reloc to avoid gcc warning.
+ (IMAGE_SGN_LNK_OTHER): Fix nested comment.
+ (ppc_pe_function): Don't call ppc_canonicalize_symbol_name.
+ (ppc_frob_symbol): Remove TE_PE section checks.
+ (md_estimate_size_before_relax): Return after abort to avoid gcc
+ warning.
+ (md_apply_fix3): Add BFD_RELOC_16_GOT_PCREL to switch.
+ * read.c (LEX_QM): Define as 0 if not defined.
+ (lex_type): Use LEX_QM for '?'.
+
+ * configure.in: No need to check whether ${cpu_type} is powerpc;
+ it never will be.
+ * configure: Rebuild.
+
+Wed Sep 27 11:33:38 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_apply_fix3): Remove Sep 26 changes to this
+ function, keeping other Sep. 26 changes.
+
+Wed Sep 27 10:29:13 1995 Kim Knuttila <krk@nellie>
+
+ * configure (emulations): Added support for ppcle-*-[pe|winnt]
+ (target_frag): Removed an extraneous PPC definition.
+ * configure.in (emulations): Same
+ * config/tc-ppc.h:
+ * config/tc-ppc.c (md_pseudo_table): Base support for new or altered
+ pseudo ops - <previous, pdata, ydata, reldata, rdata, ualong, znop,
+ section, comm, function> There will be more.
+ (pre_defined_registers): Predefined reg table to name registers, etc
+ (md_begin): Setup reg table initialization
+ (md_assemble): Initial [toc]x(rtoc) support
+ (ppc_frob_label): Removed some xcoff specific processing from TE_PE
+ (ppc_frob_symbol): Removed some xcoff specific processing from TE_PE
+ Added support for more predefined sections
+ (ppc_frob_section): Removed some xcoff specific processing from TE_PE
+ (ppc_fix_adjustable): Removed from TE_PE mainline
+ (md_apply_fix3): For TE_PE toc entries, we don't need to mess
+ with fx_addnumber. Removed for the time being.
+ (lots): Put back missing assignments to ppc_current_csect.
+
+Tue Sep 26 14:57:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Support all of the V.4
+ relocations.
+ (ppc_elf_cons): Remove restriction that @ suffixes must be done
+ with .long. Add error if relocation does not fit in the number of
+ bytes provided.
+ (md_assemble): For absolute branches, map PC relative relocations
+ back into an equivalent absolute relocation.
+ (md_pcrel_from): If TC_FORCE_RELOCATION is true, relocation offset
+ is 0, not segment start.
+ (md_apply_fix3): Don't bother writing addend into the instruction,
+ since it is ignored, given that we use RELA relocations for ELF.
+
+ * config/tc-ppc.h (TC_FORCE_RELOCATION): Define to force all
+ branch prediction relocations to always be emitted.
+
+Mon Sep 25 16:08:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Lower case reloc before
+ testing.
+ (md_assemble): Be more robust in terms of relocations.
+ (md_apply_fix3): Allow 14 bit relocs to be emitted for external
+ symbols in addition to 26 bit relocs. Properly insert 26/14 bit
+ reloc value fields into the instruction stream.
+
+Mon Sep 25 00:23:16 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-arm.c (md_atof): Output little endian constants in
+ little endian mode.
+
+ * config/obj-coff.c (obj_coff_section): Pass &type, not type,
+ s_mri_sect.
+
+ * configure.in: Fix typo: fmt-elf to fmt=elf.
+
+Fri Sep 22 16:34:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Rewrite to use a table of
+ strings and relocations they represent. Add @br{,n}taken for
+ branch taken/not taken support.
+ (md_apply_fix3): Add BFD_RELOC_PPC_B16_BR{,N}TAKEN support.
+
+Thu Sep 21 21:10:17 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (md_parse_option): -mrelocatable-lib now only
+ sets EF_PPC_RELOCATABLE_LIB and not also EF_PPC_RELOCATABLE.
+
+Thu Sep 21 16:30:56 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * subsegs.c (subseg_set): Permit SEG_ABSOLUTE in know expression.
+ * expr.c (expr): Account for new operatorT values in know
+ expression.
+
+ * write.c (fixup_segment): Clear fixp->fx_subsy if the relocation
+ is fully resolved.
+
+Thu Sep 21 14:11:49 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (ppc_flags): New variable to hold the flag bits
+ to set in the ELF header.
+ (md_parse_option): Add support for -mrelocatable-lib. Make both
+ -mrelocatable and -mrelocatable-lib set ppc_flags.
+ (md_begin): Set ELF flags with ppc_flags.
+
+Wed Sep 20 13:01:52 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (maintainer-clean): New target, synonym for
+ realclean. Add GNU standard maintainer-clean echos.
+ * doc/Makefile.in (maintainer-clean): New target, synonym for
+ realclean.
+
+Tue Sep 19 11:31:31 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Reject immediate operands for '%'.
+
+ * config/tc-m68k.c (m68k_ip): Reject immediate operands for '|'.
+ Replace 'P' with '0', '1', and '2'.
+
+ * config/tc-m68k.c (parse_mri_control_operand): Change leftstop
+ and rightstop to not be const.
+ (parse_mri_control_expression): Likewise.
+ (build_mri_control_operand): Likewise. Use m68k_ip_op to examine
+ the operand, not m68k_reg_parse.
+ (s_mri_if): In MRI mode, stop at the first '*'.
+ (s_mri_while): Likewise.
+ (s_mri_else): In MRI mode, ignore trailing characters.
+ (s_mri_endi, s_mri_break, s_mri_next, s_mri_for): Likewise.
+ (s_mri_endf, s_mri_repeat, s_mri_until, s_mri_endw): Likewise.
+ * config/m68k-parse.y: Revert yesterday's change.
+ * config/m68k-parse.h: Revert yesterday's change.
+
+Mon Sep 18 15:22:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (parse_mri_control_operand): Change leftstart
+ and rightstart to not be const.
+ (parse_mri_control_expression): Likewise.
+ (build_mri_control_operand): Likewise. If the left side of the
+ comparison is a register, and the right side is not, swap the two
+ sides.
+ * config/m68k-parse.y (m68k_reg_parse): Make globally visible.
+ * config/m68k-parse.h (m68k_reg_parse): Declare.
+
+ * read.c (mri_comment_field): New function.
+ (mri_comment_end): New function.
+ (s_align_bytes): Use mri_comment_field.
+ (s_align_ptwo, s_comm, s_mri_common, s_fail, s_globl): Likewise.
+ (s_float_space, s_struct): Likewise.
+ (s_space): Use mri_comment_field rather than doing it by hand.
+ (cons_worker, equals): Likewise.
+ (s_end): Ignore comments starting with '*' or '!'.
+ * read.h (mri_comment_field): Declare.
+ (mri_comment_end): Declare.
+ * cond.c (s_if): Use mri_comment_field.
+ * config/tc-m68k.c (s_chip, s_reg): Likewise.
+
+ * write.c (fixup_segment): Handle ABS-sym in -sym case rather than
+ sym-sym case.
+ * config/obj-coff.c (fixup_segment): Likewise. Permit negative
+ symbols if TC_M68K.
+ * config/tc-m68k.c (tc_coff_fix2rtype): If fx_tcbit is set, return
+ R_RELLONG_NEG.
+ (tc_gen_reloc): If fx_tcbit is set, abort.
+ (md_apply_fix_2): For a negative reloc, move fx_subsy to fx_addsy,
+ and set fx_tcbit.
+
+ * config/tc-m68k.c (s_reg): Ignore comment field in MRI mode.
+
+Mon Sep 18 14:44:04 1995 Arne H. Juul <arnej@pvv.unit.no>
+
+ * configure.in (mips-dec-netbsd*): New target.
+ * configure: Rebuild.
+
+Sun Sep 17 22:17:43 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set endian to little for mips-*-ultrix*.
+ * configure: Rebuild.
+
+Fri Sep 15 13:16:55 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (current_location): New static function. Handle magic
+ symbol `.'; in absolute section, return a constant.
+ (operand): Call current_location for '.' and '$', instead of doing
+ it inline. In MRI mode, call current_location for '*'.
+
+Fri Sep 15 21:39:29 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-m68k.c: Change some "CONST" references to "const".
+
+Fri Sep 15 17:27:41 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ Tue Sep 12 17:08:23 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (VMS_stab_parse): simplify first loop;
+ use S_GET_NAME/modify/S_SET_NAME sequence instead of abusing
+ S_GET_NAME when updating symbol name.
+ (local_symbols_DST): first prefix/postfix typo from July 21st.
+ [plus comment reformatting --kr]
+
+Wed Sep 13 12:33:03 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (EXPECT): New variable.
+ (CHECKFLAGS): Remove.
+ (site.exp): New target.
+ (check): Rewrite to invoke runtest directly, rather than recurring
+ down into testsuite.
+ (clean-here): Remove testsuite directory.
+ (clean, distclean): Don't recur into testsuite.
+ * configure.in: Don't call AC_CONFIG_SUBDIRS(testsuite).
+ * configure: Rebuild.
+
+ * write.c (relax_and_size_seg): Change to the segment we are
+ relaxing, in case md_convert_frag, called by cvt_frag_to_fill,
+ wants to call fix_new.
+ * config/tc-m68k.c (m68k_ip): Permit PC relative code if the
+ segment of the symbol is the current segment, not just in
+ text_section.
+ (md_convert_frag_1): Don't call subseg_change.
+ (md_estimate_size_before_relax): Likewise.
+
+Tue Sep 12 10:36:40 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-arm.c (md_atof): Fix debugging printf, and leave it
+ out by default.
+
+Mon Sep 11 11:39:11 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/configure.in: Remove unused file.
+
+ * app.c (do_scrub_chars): Grab all available spaces at start of
+ line before preserving a single space. Remove state == 0 test
+ which will never succeed.
+ * macro.c (macro_expand_body): Delete local variables from the
+ formal hash table.
+ (macro_expand): In MRI mode, stop when whitespace is seen in the
+ argument list.
+
+ * sb.c: Include "libiberty.h".
+ * macro.c: Likewise. Also include <stdlib.h> if it exists.
+
+Fri Sep 8 00:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): In MRI mode, keep a space before a
+ possible comment character.
+ * config/tc-m68k.c (m68k_ip): In MRI mode, ignore anything after
+ an instruction which takes no operands.
+
+ * Makefile.in (install): Don't install gasp in $(tooldir).
+
+ * config/tc-mips.c (macro): Handle a non zero base register for
+ M_U{L,S}{D,W,H}_A.
+
+ * gasp.c (show_usage): Put program_name argument in first fprintf,
+ not second.
+
+Thu Sep 7 12:33:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (operand): Handle 08 and 09 in MRI mode.
+ * macro.c (ISSEP): Remove duplicated `"' character.
+ (get_any_string): Copy some characters for which ISSEP is true:
+ ';', '>', '(', ')'. Otherwise we can get in an infinite loop.
+ * read.c (s_space): In MRI mode, the expressions stop at the first
+ unquoted space.
+ (cons_worker): In MRI mode, restore the terminating character at
+ the end of the function.
+
+ * read.c (cons_worker): Don't use #elif; old compilers don't
+ support it.
+
+Wed Sep 6 21:13:06 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): In MRI mode, silently end quoted strings
+ at newline characters. In MRI mode, always keep spaces in the
+ operands field. In MRI mode, treat a line comment character as a
+ regular comment character following a space.
+ * cond.c (ignore_input): Use strncasecmp rather than strncmp when
+ looking for special pseudo-ops.
+ * read.c (cons_worker): In MRI mode, the expressions stop at the
+ first unquoted space.
+ (equals): Likewise.
+
+Wed Sep 6 15:03:53 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * config/tc-sh.c (get_operands): Read third arg if it exists.
+ Otherwise, clear it.
+ (get_specific, case F_FR0): Add.
+
+Wed Sep 6 15:03:53 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * config/tc-sh.c (get_specific): Delete arg_to_test.
+ (md_assemble): Increase operand array from 2 to 3.
+
+Tue Sep 5 16:47:36 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config/tc-mips.c: Remove CYGNUS LOCAL comments.
+ (md_begin): Use 0/1 instead of TRUE/FALSE.
+ (md_show_usage): Break up long format string for the benefit
+ of lame compilers.
+ * config/tc-m68k.c (md_show_usage): Ditto.
+ * gasp.c (show_usage): Ditto.
+ * macro.c (check_macro): Cast result of hash_find.
+
+Tue Sep 5 14:46:38 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * configure.in: When testing for a free() declaration in system
+ header files, cast the address to a function pointer, not to an
+ integer.
+
+ * write.c (fix_new_internal): Call TC_INIT_FIX_DATA if TC_FIX_TYPE
+ is defined. Don't initialize fx_bsr. Verify that fx_size field
+ is wide enough to hold stored value.
+ * write.h (struct fix): Change tc_fix_data to type TC_FIX_TYPE if
+ that is defined, otherwise omit it. Delete fx_bsr. Change
+ fx_size to unsigned char.
+ * config/tc-i960.h (TC_FIX_TYPE, fx_bsr, TC_INIT_FIX_DATA): New
+ macros.
+ * config/tc-ns32k.h (TC_FIX_TYPE, fx_bsr, TC_INIT_FIX_DATA): New
+ macros.
+ * config/tc-hppa.h (TC_FIX_TYPE): Define as PTR.
+
+ * config/tc-i860.c (md_apply_fix): Delete code for checking
+ fx_im_disp, and for handling non-zero values, since it never gets
+ set after being initialized to zero.
+
+ * write.h (struct fix): Make fx_im_disp always 2 bits, since the
+ only tc-* files actually using it need that much.
+
+ NS32K changes from Ian Dall:
+ * configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
+ ns32k-pc532-lites* like ns32k-pc532-netbsd*.
+ * config/tc-ns32k.h (LOCAL_LABELS_FB): Define to 1.
+
+Fri Sep 1 17:02:15 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * write.c (fixup_segment): Get TC_FORCE_RELOCATION up the
+ right way!
+
+Fri Sep 1 08:20:19 1995 James G. Smith <jsmith@beauty.cygnus.com>
+
+ * config/tc-mips.c (md_parse_option, md_begin, md_show_usage):
+ Add support for "-mcpu=vr4300" as processor identifier.
+
+Thu Aug 31 16:41:06 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * write.c (fixup_segment): Remove change of 29th.
+ * config/tc-{i386,arm}.h (TC_FORCE_RELOCATION): Keep RVA relocs.
+
+Tue Aug 29 19:42:58 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/tc-m68k.c (m68k_ip) [case POST/PRE/BASE]: Fix typo when
+ looking at outer displacement. Don't set the postindex bit if the
+ index suppress bit is set (for memory indirect addressing mode).
+
+Thu Aug 31 06:49:37 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-arm.c (tc_gen_reloc): Delete duplicated code.
+
+Wed Aug 30 23:51:57 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): Free saved_input when the from buffer
+ exactly fills the to buffer.
+
+Wed Aug 30 13:46:39 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c (parse_keyword_arg, parse_const_expr_arg): New fns.
+ (sparc_ip): Call them for asi, membar, and prefetch parsing.
+
+Tue Aug 29 15:45:37 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c (membar_masks): Deleted.
+ (sparc_ip): Clean up ASI and membar support.
+
+Tue Aug 29 13:20:27 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * read.c (potable): Rva is new entry.
+ (cons_worker): New, split from cons. Handles rva.
+ (cons, s_rva): Call cons_worker.
+ * read.h (s_rva): New declaration.
+ * write.c (fixup_segment): Don't throw away rva relocs.
+ * config/tc-arm.c (md_apply_fix, tc_gen_reloc): Handle RVA.
+ * config/tc-i386.c (tc_coff_fix2type): Handle RVA.
+ * config/tc-i386.h (TC_COUNT_RELOC): Remember RVAs.
+ (TC_RVA_RELOC): New definition.
+
+Sun Aug 27 17:41:05 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-arm.c (do_swi): Allow optional leading '#'.
+
+Sat Aug 26 17:24:20 1995 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-m68k.c (comment_chars): If TE_DELTA is defined,
+ include '#'.
+ * config/tc-m68k.h (NO_PSEUDO_DOT): Define if TE_DELTA is
+ defined.
+
+ * config/te-delta.h: Include obj-format.h.
+ * config/te-sco386.h: Likewise.
+ * config/te-sysv32.h: Likewise.
+
+ * app.c (scrub_file): Remove.
+ (scrub_from_file, scrub_to_file): Remove.
+ (scrub_string, scrub_last_string): Remove.
+ (scrub_from_string, scrub_to_string): Remove.
+ (saved_input, saved_input_len): New static variables.
+ (struct app_saved): Remove scrub_string, scrub_last_string, and
+ scrub_file fields. Add saved_input and saved_input_len fields.
+ (app_push): Adjust saved fields for changes in struct app_save.
+ Initialize state and saved_input.
+ (app_pop): Adjust saved fields for changes in struct app_save.
+ (do_scrub_chars): Rename from do_scrub_next_char and rewrite to
+ process a buffer at a time rather than a character at a time.
+ (main, as_warn): Remove obsolete testing code.
+ * as.h (do_scrub_next_char): Don't declare.
+ (do_scrub_chars): Declare.
+ (scrub_from_file, scrub_from_string): Don't declare.
+ (scrub_to_file, scrub_to_string): Don't declare.
+ * input-file.c (input_file_get): New static function.
+ (input_file_give_next_buffer): Call do_scrub_chars rather than
+ do_scrub_next_char.
+ * read.c (scrub_string, scrub_string_end): New static variables.
+ (scrub_from_string): New static function.
+ (read_a_source_file): Call do_scrub_chars rather than
+ do_scrub_next_char.
+
+Thu Aug 24 18:50:19 1995 Ian Lance Taylor (ian@cygnus.com)
+
+ * gasp.c (as_abort): New function.
+ * sb.c (sb_build): Revert yesterday's patch.
+
+ * Makefile.in (gasp.new): Depend upon ../libiberty/libiberty.a.
+ Just link against libiberty, not against $(LIBS).
+
+Wed Aug 23 15:18:20 1995 Ian Lance Taylor (ian@cygnus.com)
+
+ * sb.c (sb_build): Undefine abort before calling it, since gasp
+ does not provide as_abort.
+
+Wed Aug 23 10:40:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (set_target_endian): New static to say whether
+ we've initialized target_big_endian or not.
+ (md_parse_option): Set set_target_endian if we set the variable
+ target_big_endian.
+ (md_begin): Only set target_big_endian if !set_target_endian.
+
+Tue Aug 22 03:00:33 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ Sat Aug 19 18:08:16 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.h (DST_S_C_SRC_SETREC_W, DST_S_C_SRC_DEFLINES_B):
+ New macros.
+ * config/obj-vms.c (VMS_TBT_Line_PC_Correlation,
+ VMS_TBT_Source_Lines): Make traceback info be robust enough to
+ handle huge source files.
+ (VMS_TBT_Source_File): Reorganize the native- vs cross-assembly
+ support so that actual object file output is clearer.
+ (VMS_TBT_Source_File: Fab, Nam, Date_Xab, File_Header_Xab):
+ Replace static variables with automatic ones.
+
+ Sat Aug 12 20:18:15 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (Module_Name): new file scope variable.
+ (VMS_TBT_Module_Begin): use it instead of local variable.
+ (Write_VMS_MHD_Records): ditto; assign its value here.
+ (Write_VMS_EOM_Record): second argument has type valueT.
+ (VMS_Initialized_Data_Size): simplify search loop; return
+ type is offsetT; second argument is unsigned.
+
+ Sat Jun 17 19:05:25 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * messages.c (as_perror): Use xstrerror instead of strerror.
+
+Mon Aug 21 13:57:20 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.c (parse_args): Accept --defsym SYM=VALUE.
+ * doc/as.texinfo, doc/as.1: Document --defsym.
+
+ * read.c (read_a_source_file): In MRI mode, don't end the
+ statement inside a quotation.
+ (s_space): Don't warn about a zero repeat count in MRI mode.
+ * config/tc-m68k.c (crack_operand): In MRI mode, don't count
+ parentheses inside quotes.
+ (md_assemble): In MRI mode, anything after the operands field is a
+ comment.
+ (parse_mri_control_operand): Adjust start and stop to remove
+ spaces.
+ (s_mri_for): Likewise.
+
+ * cond.c (s_ifdef): Restore the character after the symbol name,
+ in case it is a newline.
+ (s_if): If ignoring the current tree, don't try to parse the
+ expression.
+
+ * app.c (do_scrub_next_char): If LEX_IS_STRINGQUOTE or
+ LEX_IS_ONECHAR_QUOTE is seen in state 10, preserve one space.
+
+ * doc/as.texinfo: Document irp, irpc, macro, and rept. MRI mode
+ now supports macros, ifc, ifnc, irp, irpc, rept, and endr, without
+ using gasp.
+
+ Add support for macros.
+ * as.c: Include sb.h and macro.h.
+ (max_macro_next): New global variable.
+ (main): Call macro_init.
+ (macro_expr): New static function.
+ * as.h (max_macro_nest): Declare.
+ * read.c (line_label): Rename from mri_line_label. Change all
+ uses.
+ (potable): Add exitm, irp, irpc, macro, mexit, rept.
+ (read_a_source_file): Always clear line_label at the start of a
+ line, not just when flag_mri or LABELS_WITHOUT_COLONS. Fix
+ MRI/LABELS_WITHOUT_COLONS handling. In MRI mode, permit label:
+ equ val. Set line_label when calling colon. In MRI mode, a
+ leading '.' does not imply a pseudo-op. Check for macro expansion
+ before calling md_assemble.
+ (s_irp): New function.
+ (get_line_sb): New static function.
+ (s_macro): New function.
+ (s_mexit): New function.
+ (s_rept): New function.
+ * read.h (line_label): Rename from mri_line_label.
+ (s_irp, s_rept): Declare.
+ (s_macro, s_mexit): Declare.
+ * input-scrub.c: Include sb.h.
+ (sb_index, from_sb): New static variables.
+ (macro_nest): New static variable.
+ (struct input_save): Add sb_index and from_sb fields. Change
+ next_saved_file field to be struct input_save *.
+ (next_saved_file): Changed to be struct input_save *.
+ (input_scrub_push): Change to return type struct input_save *.
+ Save sb_index and from_sb.
+ (input_scrub_pop): Change parameter type to struct input_save *.
+ Restore sb_index and from_sb.
+ (input_scrub_include_sb): New function.
+ (input_scrub_next_buffer): Handle reading from from_sb.
+ (bump_line_counters): Only increment lines if not using from_sb.
+ * config/tc-m68k.c (opt_table): Add nest.
+ (opt_nest): New static function.
+ * gasp.c: Include sb.h and macro.h. Move all sb related functions
+ and definitions to sb.h and sb.c. Move all macro related
+ functions and definitions to macro.h and macro.c.
+ * sb.h, sb.c: New files, extracted from gasp.c.
+ * macro.h, macro.c: Likewise.
+ * Makefile.in (OBJS): Add sb.o and macro.o
+ (GASPOBJS): Define.
+ (gasp.new): Depend upon $(GASPOBJS). Use $(GASPOBJS) to link.
+ (TARG_CPU_DEP_m68k): Depend upon subsegs.h.
+ (gasp.o): Depend upon sb.h and macro.h.
+ (sb.o): New target.
+ (macro.o): New target.
+ (as.o): Depend upon sb.h and macro.h.
+ (input-scrub.o): Depend upon sb.h.
+ (read.o): Depend upon sb.h and macro.h.
+
+ * cond.c (get_mri_string): New static function.
+ (s_ifc): New function.
+ * read.c (potable): Add ifc and ifnc.
+ * read.h (s_ifc): Declare.
+
+ * app.c (do_scrub_begin): In MRI mode, set lex of ' to
+ LEX_IS_STRINGQUOTE.
+
+Mon Aug 21 13:41:33 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (md_assemble): Allow @HA, @L, and @H suffixes on
+ constant expressions.
+
+Sun Aug 20 15:54:37 1995 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-arm.c (md_reloc_size): Add const to declaration.
+
+Fri Aug 18 10:58:09 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_include): In MRI mode, don't expect quotes around the
+ file name.
+ * listing.c (listing_title): Don't require the title to be quoted.
+
+ * gasp.c (include_print_where_line): Always subtract 1 from
+ linecount before printing it.
+ (process_file): In MRI mode, lines beginning with '*' or '!' are
+ comments.
+ (do_reg): In MRI mode, don't require parentheses.
+ (do_include): In MRI mode, don't requires quotes. If the file can
+ not be found in the include path, try opening it in the current
+ directory. Print the file name correctly in the error message.
+ (chartype_init): In MRI mode, set FIRSTBIT for '.'.
+ (main): Set comment_char to ';' when entering MRI mode.
+
+ * config/tc-m68k.c: Include subsegs.h.
+ (m68k_ip): Pass 64 rather than -1 to add_Fix in 'B' 'B' case.
+ (md_pcrel_from): If fx_pcrel_adjust is 64, use -1 instead.
+
+ * config/tc-sparc.h (tc_fix_adjustable): For OBJ_AOUT case, adjust
+ BFD_RELOC_16 and BFD_RELOC_32 relocs.
+
+Wed Aug 16 14:48:44 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * as.h (alloca): Use void* declaration on HP/UX.
+
+Wed Aug 16 12:49:17 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (tc_gen_reloc): If PIC, only change PCREL_S2
+ to WPLT30 for an undefined or external symbol. Don't consider
+ PC10 or PC22 to be a PC relative reloc when choosing between
+ fx_addnumber and fx_offset.
+
+ * config/tc-z8k.c (md_number_to_chars): Don't do it here, call
+ number_to_chars_bigendian.
+ * config/tc-z8k.h (TARGET_BYTES_BIG_ENDIAN): Define.
+
+ * expr.c (operand): Add support for .startof. and .sizeof. by
+ using magic symbol names which the linker will recognize
+ specially.
+ * doc/as.texinfo: Take out note that .startof. and .sizeof. are
+ not supported.
+
+Tue Aug 15 15:08:49 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (md_pseudo_table): Add MRI structured control
+ directives: if, if.b, if.w, if.l, else, else.s, else.l, endi,
+ break, break.s, break.l, next, next.s, next.l, for, for.b, for.w,
+ for.l, endf, repeat, until, until.b, until.w, until.l, while,
+ while.b, while.w, while.l, endw.
+ (enum mri_control_type): Define.
+ (struct mri_control_info): Define.
+ (mri_control_stack): New static variable.
+ (mri_control_index): New static variable.
+ (mri_control_label): New static function.
+ (push_mri_control, pop_mri_control): New static functions.
+ (parse_mri_condition): New static function.
+ (parse_mri_control_operand): New static function.
+ (swap_mri_condition, reverse_mri_condition): New static functions.
+ (build_mri_control_operand): New static function.
+ (parse_mri_control_expression): New static function.
+ (s_mri_if, s_mri_else, s_mri_endi): New static functions.
+ (s_mri_break, s_mri_next): New static functions.
+ (s_mri_for, s_mri_endf): New static functions.
+ (s_mri_repeat, s_mri_until): New static functions.
+ (s_mri_while, s_mri_endw): New static functions.
+ * gasp.c (mrikinfo): Remove IF.
+ * expr.c (get_symbol_end): Accept \001 as part of a name.
+
+ * symbols.c (colon): Change parameter to const char *.
+ * symbols.h (colon): Update declaration.
+
+Mon Aug 14 20:51:56 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * write.c (write_contents): Always do it the BFD_FAST_SECTION_FILL
+ way. Reformat and reindent that code to GNU standards.
+ (BFD_FAST_SECTION_FILL): Don't define.
+
+Mon Aug 14 14:08:07 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Don't try to apply BEGIN_BRTAB
+ or END_BRTAB fixups.
+
+Mon Aug 14 15:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * gasp.c (do_align, get_any_string): Mark as static.
+ (do_assigna, do_assignc, new_file): Likewise.
+
+ * config/tc-m68k.c (s_reg): Rename local op to rop to avoid
+ confusion with macro op.
+
+ * gasp.c (strip_comments): Comment out; it's not used.
+ (do_end): Add parameter. In MRI mode, print it out.
+ (do_irp): New static function.
+ (sub_actual): Change parameter m to formal_hash, changing type
+ from macro_entryh * to hash_table *.
+ (macro_expand_body): New static function, broken out of
+ macro_expand.
+ (macro_expand): Call macro_expand_body.
+ (K_*): Fully parenthesize.
+ (K_IRP, K_IRPC): Define.
+ (mrikinfo): Add IRP and IRPC.
+ (process_pseudo_op): In MRI mode, print out END pseudo-op. Pass
+ line to do_end. Handle K_IRP and K_IRPC.
+
+ * config/tc-m68k.c (s_opt): Reset *input_line_pointer even if we
+ don't do anything with the option.
+
+Sun Aug 13 17:03:58 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * frags.c (frag_align): Handle absolute_section.
+ * write.c (record_alignment): Likewise.
+
+ * config/tc-mips.c (macro_build): Skip insns with an inappropriate
+ ISA level.
+
+Sun Aug 13 00:35:02 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_pseudo_table): Add entries for
+ "begin_brtab" and "end_brtab" pseudo-ops.
+ (pa_brtab): New function.
+ (tc_gen_reloc, SOM version): Handle R_BEGIN_BRTAB and R_END_BRTAB.
+ (hppa_force_relocation): Force relocations for BRTAB fixups
+ when OBJ_SOM is defined.
+
+Fri Aug 11 20:34:05 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * Makefile.in (TE_OBJS): Add empty definition.
+
+Fri Aug 11 19:16:08 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * gasp.c (change_base): Don't treat ' specially in MRI mode.
+ (process_file): Don't warn about missing END in MRI mode.
+ (do_if): New static function.
+ (get_mri_string, do_ifc): New static functions.
+ (buffer_and_nest): Treat MRI mode like alternate syntax mode.
+ (do_aendr): Change error message in MRI mode.
+ (do_arepeat): Use REPT/ENDR in MRI mode.
+ (do_formals): In MRI mode, add special NARG formal.
+ (macro_expand): Various changes for MRI mode: permit a qualifier
+ on the macro name; set special NARG formal; permit unnamed
+ positional arguments; use && to concatenate named parameters;
+ permit \d to specify an unnamed parameter; permit named parameters
+ to not start with \; use == to see if a parameter exists.
+ (getstring): In MRI mode, allow <> to quote a string.
+ (K_IFEQ, K_IFNE, K_IFLT, K_IFLE, K_IFGE, K_IFGT): Define.
+ (K_IFC, K_IFNC): Define.
+ (struct keyword): Name structure used in kinfo array.
+ (mrikinfo): New static array.
+ (process_pseudo_op): Don't require leading '.' in MRI mode.
+ Handle new MRI pseudo-op definitions.
+ (add_keyword): New static function, broken out of process_init.
+ (process_init): Use add_keyword. In MRI mode, add mrikinfo table.
+ (long_options): Add "mri".
+ (show_usage): Mention -M/--mri.
+ (main): Call process_init after processing arguments. Handle -M.
+ * doc/gasp.texi: Document -M/--mri.
+
+ * gasp.c: Include ansidecl.h. Make all local functions static.
+ Add prototypes for all static functions.
+ (mri): New global variable.
+ (sb_add_char): Change parameter c from char to int.
+ (sb_add_string): Make parameter s into a const pointer.
+ (sb_add_buffer): Likewise.
+ (checkconst): Change parameter op from char to int.
+ (exp_get_abs): Make parameter emsg into a const pointer.
+ (do_res): Change parameter type from char to int.
+ (buffer_and_nest): Make parameters from and to into const
+ pointers.
+ (do_sdata): Change parameter type from char to int.
+ (new_file): Make parameter name into a const pointer.
+ (do_define): Make parameter string into a const pointer.
+
+ * config/tc-h8300.c (md_number_to_chars): Don't do it here, call
+ number_to_chars_bigendian.
+ * config/tc-h8300.h (TARGET_BYTES_BIG_ENDIAN): Define.
+
+Fri Aug 11 13:23:56 1995 Michael Meissner <meissner@cygnus.com>
+
+ * write.h (struct fix): Add new field fx_no_overflow.
+
+ * write.c (fixup_segment): If fx_no_overflow is non-zero, don't
+ complain if the addend is too large.
+
+ * config/tc-ppc.c (md_assemble): Set fx_no_overflow if the half
+ word relocations BFD_RELOC_{LO16,HI16,HI16_S}.
+
+Thu Aug 10 20:56:38 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * read.c (s_mri_sect) [BFD_ASSEMBLER]: Fix typos in choosing and
+ setting section flags.
+
+Thu Aug 10 00:38:11 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo: Add documentation for MRI compatibility mode.
+ * doc/as.1: Likewise.
+
+ * config/tc-m68k.c (m68k_ip): When recognizing '#', use isbyte and
+ iword rather than expr8 and expr16. When recognizing 'M', use
+ issbyte rather than expr8. When recognizing 'Q' and 't', just
+ check for O_constant rather than using expr8.
+ * config/m68k-parse.h (expr8, expr16): Don't define.
+ * Makefile.in (m68k-parse.o): Depend upon m68k-parse.h, not
+ m68k-parse.y.
+
+ * read.c (potable): Add spc, ttl, xcom, xref.
+ (s_mri_sect): New function.
+ * read.h (s_mri_sect): Declare.
+ * config/obj-coff.c (obj_coff_section) (both versions): In MRI
+ mode, call s_mri_sect.
+ (obj_pseudo_table): Add sect.s and section.s. Move sect outside
+ of ifndef BFD_ASSEMBLER.
+ * config/obj-elf.c (elf_pseudo_table): Add section.s, sect,
+ sect.s.
+ (obj_elf_section): In MRI mode, call s_mri_sect.
+ * config/tc-m68k.c (md_pseudo_table): Add restore, save.
+ (struct save_opts): Define.
+ (save_stack): New static variable.
+ (s_save, s_restore): New static functions.
+
+ * read.c (s_set): Remove unused local ptr.
+ (hex_float): Check target_big_endian.
+ (equals): Remove unused local p.
+
+ * config/tc-a29k.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-h8500.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-hppa.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-i860.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-m68k.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-m88k.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-tahoe.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ * config/tc-sh.c (little): Set target_big_endian.
+ (md_begin): Likewise.
+ (md_parse_option): Likewise.
+ (build_relax): Check target_big_endian rather than shl.
+ (build_Mytes, md_atof): Likewise.
+ (md_convert_frag, md_apply_fix): Likewise.
+ (md_number_to_chars): Likewise.
+
+Wed Aug 9 10:51:48 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_abspcadd): New static variable.
+ (m68k_quick): New static variable.
+ (m68k_rel32): New static variable.
+ (md_pseudo_table): Add opt and reg.
+ (m68k_ip): Permit absolute symbols in 'l'/'L' recognition. Check
+ m68k_quick in 'M' and 'Q' recognition. Check m68k_abspcadd in
+ DISP handling. Check m68k_rel32 in BASE/POST/PRE handling.
+ (md_begin): In MRI mode, initialize m68k_abspcadd and m68k_rel32.
+ In MRI mode, change unsized branch aliases to be variable sized.
+ (struct opt_action): Define.
+ (opt_table): Define.
+ (s_opt): New static function.
+ (skip_to_comma): New static function.
+ (opt_chip): New static function.
+ (opt_list): New static function.
+ (opt_list_symbols): New static function.
+ (s_reg): New static function.
+ * as.h (flag_keep_locals): Change from unsigned char to int.
+ (flag_no_warnings): Likewise.
+
+ * read.c (mri_line_label): Make non-static.
+ (potable): Add nopage, page, plen.
+ (s_org): Error if in MRI mode.
+ * read.h (mri_line_label): Declare.
+ * listing.c (listing_nopage): New function.
+ * listing.h (listing_nopage): Declare.
+
+ * symbols.c (symbol_begin): Set sy_frag of abs_symbol to
+ &zero_address_frag.
+
+ * write.c (adjust_reloc_syms): Check that symbol is not NULL
+ before checking sy_mri_common.
+ (fixup_segment): Likewise.
+ * config/obj-coff.c (fixup_segment): Likewise.
+
+ * read.c (abs_section_offset): New global variable.
+ (potable): Add offset, struct.
+ (do_org): New static function; handle changing the origin in the
+ absolute section.
+ (s_org): Use do_org.
+ (s_set): Likewise.
+ (equals): Likewise.
+ (s_space): In absolute_section, just increase abs_section_offset.
+ (s_struct): New function.
+ (emit_expr): Handle absolute_section specially.
+ * read.h (abs_section_offset): Declare.
+ (s_struct): Declare.
+ * frags.c (frag_more): Warn if in absolute_section.
+ (frag_now_fix): In absolute_section, return abs_section_offset.
+ * subsegs.c (subseg_change): If switching to absolute_section,
+ just set now_seg and now_subseg.
+ (subseg_set_rest): Special handling when switching to or from
+ absolute_section.
+
+ * config/tc-m68k.c (m68k_float_copnum): New static variable.
+ (md_pseudo_table): Add fopt and mask2.
+ (m68k_ip): Use m68k_float_copnum, not COPNUM, when setting
+ coprocessor register to use. In case 'I' when checking operands,
+ correct coprocessor register numbers. In case 'I' when setting
+ operands, don't add 1.
+ (s_fopt): New static function.
+ * config/m68k-parse.h (COPNUM): Don't define.
+
+ * read.c (potable): Add ifeq, ifge, ifgt, ifle, iflt, ifne.
+ Change if to pass O_ne to s_if.
+ (read_a_source_file): Don't define an label without a colon if
+ ignore_input returns true.
+ * cond.c (s_if): Treat argument as an operatorT describing how to
+ compare the argument against zero.
+ (ignore_input): Don't require an initial dot in MRI mode, or if
+ NO_PSEUDO_DOT is defined.
+
+ * read.c (potable): Add dcb, dcb.b, dcb.d, dcb.l, dcb.s, dcb.w,
+ dcb.x, ds.d, ds.p, ds.s, ds.x, elsec, endc, fail, format, llen,
+ noformat.
+ (read_a_source_file): If pseudo-op handler is s_end, quit
+ immediately.
+ (s_end): New function.
+ (s_fail): New function.
+ (s_float_space): New function.
+ (hex_float): New static function.
+ (float_cons): Use hex_float.
+ * read.h (s_fail): Declare.
+ (s_float_space): Declare.
+ * cond.c (s_end): Remove.
+ * listing.c (listing_psize): Treat argument as indicating whether
+ a height is expected.
+
+ * read.c (mri_pending_align): New static variable.
+ (read_a_source_file): Handle mri_pending_align.
+ (cons): Set mri_pending_align if appropriate.
+
+ * configure.in: Move random special target handling before
+ possible break.
+ * configure: Rebuild.
+
+Tue Aug 8 23:41:25 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * configure.in: Consistently use ${target_cpu_type} rather than
+ ${cpu_type} after the loop.
+ * configure: Rebuild.
+ * Makefile.in (targ-cpu.o): Use @target_cpu_type@ rather than
+ @cpu_type@.
+
+Tue Aug 8 17:27:17 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * expr.h (operatorT): Remove comma after last enumerator value.
+
+ * config/obj-vms.c: Some whitespace cleanup from Pat Rankin.
+
+ * as.h (alloca): If __STDC__, declare void* instead of char*.
+
+ Wed Aug 2 18:54:37 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (Flush_VMS_Object_Record_Buffer,
+ Close_VMS_Object_File): Reorganize the `#if !VMS' cross-assmebler
+ support code.
+ (Close_VMS_Object_File): Call Set_VMS_Object_File_Record to flush
+ output buffer--just in case--before closing the file.
+
+Tue Aug 8 13:07:05 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (archs): Add 68ec000, 68hc000, 68hc001,
+ 68ec020, 68ec030, 68ec040, and 68330.
+ (md_pseudo_table): Add chip and comline.
+ (m68k_init_after_args): Use strcasecmp when comparing default_cpu
+ against architectures.
+ (mri_chip, s_chip): New static functions.
+
+ * struc-symbol.h (struct symbol): Add sy_mri_common bit.
+ * read.h (mri_comon_symbol): Declare.
+ (s_mri_common): Declare.
+ * read.c (mri_line_label): New static variable.
+ (mri_common_symbol): New global variable.
+ (potable): Add "common" and "common.s".
+ (read_a_source_file): In MRI mode, set mri_line_label for a label
+ at the start of a line.
+ (s_mri_common): New function.
+ (s_space): Handle mri_common_symbol.
+ * symbols.c (colon): Change return value from void to symbolS *,
+ and return new symbol. If mri_common_symbol is set, attach the
+ new symbol to it.
+ (resolve_symbol_value): Handle an sy_mri_common symbol.
+ * symbols.h (colon): Change return value in declaration.
+ * subsegs.c (subseg_set_rest): Clear mri_common_symbol.
+ (subseg_set (both versions)): Likewise.
+ * frags.c (frag_more): Warn if mri_common_symbol is not NULL.
+ * write.c (adjust_reloc_syms): Skip sy_mri_common symbols.
+ (write_object_file): Discard sy_mri_common symbols.
+ (fixup_segment): Change relocations against sy_mri_common symbols
+ to be against the common symbol itself.
+ * config/obj-coff.c (yank_symbols): Discard sy_mri_common symbols.
+ (fixup_segment): Change relocations against sy_mri_common symbols
+ to be against the common symbol itself.
+ * config/obj-aout.c (obj_crawl_symbol_chain): Discard
+ sy_mri_common symbols.
+
+ * doc/c-m68k.texi: Add documentation for CPU specific options, and
+ for Motorola syntax.
+
+ * config/m68k-parse.y (motorola_operand): For (%pc), set mode to
+ DISP, not BASE.
+
+Tue Aug 8 02:31:38 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * write.c (relax_align): Add extra padding for linkrelax only if
+ LINKER_RELAXING_SHRINKS_ONLY is defined.
+ * config/tc-i960.h (LINKER_RELAXING_SHRINKS_ONLY): Define it.
+ * doc/internals.texi (Relaxation): Write up some stuff on linker
+ relaxing and LINKER_RELAXING_SHRINKS_ONLY.
+
+Mon Aug 7 17:18:10 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/m68k-parse.y: New file: bison grammar for m68k operands,
+ including support for Motorola syntax.
+ * config/m68k-parse.h: New file; definitions shared between
+ m68k-parse.y and tc-m68k.c.
+ * config/tc-m68k.c: Include m68k-parse.h.
+ (enum operand_type): Move to m68k-parse.h, where it is named
+ m68k_operand_type. Rename all uses. Rearrange somewhat. Add
+ FPREG. Rename AOFF to DISP. Rename AINDX to BASE. Rename APODX
+ to POST. Rename APRDX to PRE. Remove AMIND. Rename MSCR to
+ CONTROL. Remove DINDR.
+ (struct m68k_exp): Move to m68k-parse.h. Remove e_beg, e_end and
+ e_seg fields. Rename e_exp to exp. Rename e_siz to size, and
+ change type to enum m68k_size. Change all uses.
+ (enum _register): Move to m68k-parse.h, where it is named
+ m68k_register. Rename all uses. Add ZDATA0-7 and ZADDR0-7.
+ (struct m68k_op): Move to m68k-parse.h. Change all fields.
+ (seg): Don't define.
+ (add_exp): Remove.
+ (FAIL, OK): Remove.
+ (m68k_reg_parse): Move to m68k-parse.y, and rewrite.
+ (SKIP_WHITE, SKIP_W): Remove.
+ (try_moto_index, try_index): Remove.
+ (m68k_ip_op): Move to m68k-parse.y, and rewrite to use grammar.
+ (main): Remove obsolete test function.
+ (m68k_ip): Extensive changes to use new grammar.
+ (get_regs): Remove.
+ (crack_operand): m68k_ip_op now returns 0 on success.
+ (init_table): Add ssp, zd0-7 and za0-7.
+ (md_assemble): Make er const. Correct loop over operands when
+ looking for error message.
+ (md_begin): Set alt_notend_table for '(' and '@'.
+ (get_num): Expression is already parsed. Don't set seg.
+ * configure.in: If cpu_type is m68k, put m68k-parse.o in
+ extra-objects.
+ * configure: Rebuild.
+ * Makefile.in (DISTSTUFF): Add m68k-parse.c.
+ (BISON): Use ../bison/bison if it exists.
+ (BISONFLAGS): Define as empty.
+ (TARG_CPU_DEP_m68k): Depend upon $(srcdir)/config/m68k-parse.h.
+ (m68k-parse.c, m68k-parse.o): New targets.
+
+Mon Aug 7 02:54:20 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-sh.c (parse_reg): Handle new FP registers.
+ (get_specific): Handle new operand types.
+
+Fri Aug 4 12:29:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (op_encoding): Make non-const. Don't set '"' to
+ O_bit_not.
+ (expr_begin): Set op_encoding['"'] in MRI mode.
+
+Wed Aug 2 18:39:43 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c: Remove BREAK_UP_BIG_DECL stuff.
+ (struct m68k_incant): Change m_operands field to be const.
+ (struct m68k_it): Change args field to be const.
+ (m68k_ip): Change local variable s to be const.
+ (opcode_ptr): Remove.
+ (md_begin): Use m68k_numopcodes, not numopcodes. Use
+ m68k_opcodes, not removed opcode_ptr. Use m68k_numaliases, not
+ numaliases.
+
+Tue Aug 1 17:35:26 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (init_table): Add "control", "status", "iaddr",
+ "sfcr", and "dfcr" as synonyms for existing entries.
+ (md_begin): In MRI mode, force flag_reg_prefix_optional to 1.
+ (md_parse_option): Removed unused locals i and arch. Change type
+ of arch (another one) to unsigned long.
+ (tc_coff_sizemachdep): Add return after abort to avoid warning.
+
+ Initial support for MRI style labels and expressions.
+ * as.h (flag_mri): Declare/define.
+ * as.c (show_usage): Mention -M and its synonym --mri.
+ (parse_args): Add 'M' to std_shortopts. Add "mri" to
+ std_longopts. Set flag_mri if -M is seen.
+ (main): Call parse_args before input_scrub_begin. Call
+ expr_begin.
+ * app.c (do_scrub_begin): Don't set lex for '"' or '\'' in MRI
+ mode. Do set lex for ';', '*', and '!' in MRI mode.
+ (do_scrub_next_char): Remove MRI ifdef in LEX_IS_WHITESPACE case.
+ In MRI mode, keep spaces between labels and colons. Remove MRI
+ ifndef around LEX_IS_ONECHAR_QUOTE case. In MRI mode, don't use
+ '!' or '*' as comment characters even if they are in
+ comment_chars.
+ * read.h (lex_type): No longer const.
+ * read.c: Include libiberty.h.
+ (lex_type): No longer const.
+ (read_begin): In MRI mode, set lex_type of '?' to 3.
+ (potable): Add dc, dc.b, dc.d, dc.l, dc.s, dc.w, dc.x, ds, ds.b,
+ ds.l, ds.w, and xdef.
+ (read_a_source_file): Change LABELS_WITHOUT_COLON ifdef to check
+ for MRI mode at runtime rather than compile time. Handle the EQU
+ pseudo-op in MRI mode. Remove bogus MRI ifdef around done_pseudo.
+ Change NO_PSEUDO_DOT ifdef to also take effect for MRI mode at
+ runtime.
+ (cons): In MRI mode, always call parse_mri_cons rather than
+ TC_PARSE_CONS_EXPRESSION.
+ (parse_mri_cons): Always compile, not just when MRI is defined.
+ Call TC_PARSE_CONS_EXPRESSION, not expression, when the input is
+ not a string constant. Handle A and E modifiers.
+ (float_cons): Accept :xxxx, where the x's are hex digits.
+ * expr.h (operatorT): Add O_eq, O_ne, O_lt, O_le, O_ge, O_gt.
+ (expr_begin): Declare.
+ * expr.c (integer_constant): In MRI mode, if the base was not
+ specified, look for a suffix on the number to set the base.
+ (mri_char_constant): New static function.
+ (operand): Remove MRI ifdef. In MRI mode, do various things: Pass
+ 0 as the base when calling integer_constant if there was no
+ prefix. Check for a hex constant suffix if when a leading '0' is
+ seen. Don't accept 0x or 0b as a prefix. Check for E'chars' and
+ A'chars'. Handle MRI character constants. Treat '"' as the
+ unary bitwise not operator. Treat $ as the program counter, or as
+ the prefix for a hex constant. Treat % as the prefix for a binary
+ constant and @ as the prefix for an octal constant. Treat : as
+ the prefix for a hex constant.
+ (op_encoding): Set '"' to O_bit_not, '<' to O_lt, and '>' to O_gt.
+ (op_rank): No longer const. Change rank values.
+ (expr_begin): New function.
+ (operator): New static function.
+ (expr): Use operator. Don't bother to mention the operator in
+ warnings. Remove bogus #if 0 code. Handle new operatorT values.
+ * atof-generic.c (atof_generic): In MRI mode, accept underscores
+ around the exponent in floating point numbers.
+ * symbols.h (symbols_case_sensitive): Declare.
+ * symbols.c (symbols_case_sensitive): New global variable.
+ (symbol_create): Check symbols_case_sensitive.
+ (symbol_find_base): Likewise.
+ (resolve_symbol_value): Handle new operatorT values.
+ (print_expr_1): Likewise.
+ (S_IS_LOCAL): In MRI mode, names beginning with two '?' characters
+ are local.
+
+Tue Aug 1 11:35:18 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * tc-sh.c (md_convert_frag): Make some error messages more
+ explict.
+
+Mon Jul 31 21:40:47 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ Sat Jul 29 18:55:23 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (COPY_SHORT, COPY_LONG, PUT_SHORT, PUT_LONG):
+ Make expansion be safe for use in expressions.
+ (PUT_COUNTED_STRING): Bracket expansion with `do {...} while (0)'
+ rather than just `{...}'.
+
+Mon Jul 31 18:19:26 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * gasp.c (main): Parse -I option.
+ (do_include): Look through include list.
+ * gasp.c (change_base): Don't modify numbers in strings.
+
+Mon Jul 31 12:16:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.h (SUB_SEGMENT_ALIGN): Define. From Niclas
+ Andersson <nican@ida.liu.se>.
+
+Thu Jul 27 20:47:12 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Don't do further pcrel
+ processing after converting difference of two symbols in the
+ same segment. From Jim Wilson.
+
+ * configure.in (i386-*-linuxoldld): Add as synonym for
+ i386-*-linux*aout*. From Fred Fish.
+ * configure: Regenerated.
+
+Thu Jul 27 16:14:56 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (enum ps_type {ps_TEXT,ps_DATA,ps_COMMON,
+ ps_CONST}): New constants.
+ (VMS_Psect_Spec): Use them instead of literal strings.
+ (vms_write_object_file, global_symbol_directory): Adjust callers.
+
+Wed Jul 26 18:31:35 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (const_flag): Change from char to unsigned char.
+ * config/obj-vms.h (const_flag): Ditto.
+ (struct nlist): Replace union n_un and n_un.{n_name,n_next,n_strx}
+ fields with just n_name; delete field n_value; change n_other from
+ char to unsigned char and n_desc from short to int; insert explicit
+ padding for alignment.
+
+Mon Jul 24 20:06:17 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * subsegs.h (struct seg_info_trash): Make bitfield types valid.
+
+ * config/obj-coff.c (fixup_segment): Local add_number should not
+ be declared register since its address is taken for
+ MD_APPLY_FIX3.
+
+ Fri Jul 21 15:28:18 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ Split huge vms_write_object_file routine into managable pieces.
+
+ * config/obj-vms.c (vms_fixup_text_section, synthesize_data_segment,
+ vms_fixup_data_section, global_symbol_directory, local_symbols_DST,
+ vms_build_DST): New routines.
+ (vms_write_object_file): Call them.
+ (struct vms_obj_state): New file scope variable used by the above.
+
+Mon Jul 24 14:10:24 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (md_pseudo_table): Add "uses".
+ (s_uses): New static function.
+ (sh_coff_frob_file): New function.
+ (md_convert_frag): Call subseg_change before calling fix_new.
+ (sh_handle_align): New function.
+ (SWITCH_TABLE): Define.
+ (sh_force_relocation): New function.
+ (md_apply_fix): Handle R_SH_USES, R_SH_COUNT and R_SH_ALIGN.
+ (sh_coff_reloc_mangle): Likewise. Also handle switch table
+ entries.
+ * config/tc-sh.h (HANDLE_ALIGN): Define.
+ (sh_handle_align): Declare.
+ (TC_FORCE_RELOCATION): Define.
+ (sh_force_relocation): Declare.
+ (TC_COUNT_RELOC): Simplify; rely on TC_FORCE_RELOCATION instead.
+ (tc_frob_file): Define.
+ (sh_coff_frob_file): Declare.
+ * config/obj-coff.c (write_object_file): Call tc_frob_file if it
+ is defined.
+ (fixup_mdeps): Call HANDLE_ALIGN if it is defined.
+ (TC_FORCE_RELOCATION): Define if not defined.
+ (fixup_segment): Use TC_FORCE_RELOCATION to decide whether to
+ clear the symbol fields of fixP.
+
+Fri Jul 21 22:38:00 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Add support for R_PPC_SDAREL
+ relocation.
+ (md_apply_fix3): Ditto.
+
+Thu Jul 20 13:00:56 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-m68k.c (md_convert_frag): Rename argument seg to sec,
+ since seg is a macro name in this file.
+
+ * configure.in (arm-*-riscix*): Don't set emulation.
+
+Wed Jul 19 16:08:29 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/obj-coff.h (TE_PE): Delete.
+ * config/tc-arm.h (BYTE_ORDER): Delete.
+ (TARGET_FORMAT): Provide value for OBJ_COFF and TE_PE.
+ (ARM_BI_ENDIAN): Define if OBJ_COFF and TE_PE.
+ * config/tc-arm.c (byte_order): Delete.
+ (md_number_to_chars): Reference target_big_endian, not byte_order.
+ (md_chars_to_number): Likewise.
+ (md_longopts): Add -EB/-EL if ARM_BI_ENDIAN.
+ (md_parse_options): Recognize -EB/-EL.
+ (md_show_usage): List -EB/-EL.
+
+Wed Jul 19 11:49:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * gasp.c (process_assigns): Use toupper before comparing against
+ upper case letter.
+ (whatcond): Likewise.
+
+ * config/tc-sh.c (sh_relax): Rename from relax, and make global.
+ Renamed all uses.
+ (insert): Pass a size of 2, not 4.
+ (build_relax): Remove unused len variable.
+ (md_show_usage): Mention -little option.
+ (md_convert_frag): Add segT argument. Rewrite to generate relocs
+ rather than to generate complete instructions here.
+ (md_apply_fix): Adjust and clarify R_SH_PCRELIMM8BY4 case for
+ changes in insert and md_pcrel_from. Add cases for R_SH_PCDISP
+ and R_SH_PCDISP8BY2.
+ (md_pcrel_from): Don't subtract 1, add 2.
+ (tc_coff_fix2rtype): Remove.
+ (sh_coff_reloc_mangle): New function.
+ * config/tc-sh.h (TC_COFF_FIX2RTYPE): Just return fx_r_type.
+ (sh_relax): Declare.
+ (TC_COUNT_RELOC): If relaxing, count PC relative relocs.
+ (TC_RELOC_MANGLE): Define.
+ (sh_coff_reloc_mangle): Declare.
+ (tc_coff_sizemachdep): Declare.
+ * tc.h (md_convert_frag): Add segT parameter to non BFD_ASSEMBLER
+ declaration.
+ * write.c (cvt_frag_to_fill): Add sec argument to non
+ BFD_ASSEMBLER version. Pass it to md_convert_frag.
+ (write_object_file): Pass SEG_TEXT to cvs_frag_to_fill.
+ * config/obj-coff.c (do_relocs_for): Pass segment info to
+ TC_RELOC_MANGLE.
+ (fixup_mdeps): Pass segment type to md_convert_frag.
+ * config/tc-a29k.c (md_convert_frag): Add segT argument.
+ * config/tc-h8300.c (md_convert_frag): Likewise.
+ * config/tc-h8500.c (md_convert_frag): Likewise.
+ * config/tc-i386.c (md_convert_frag): Likewise.
+ * config/tc-i860.c (md_convert_frag): Likewise.
+ * config/tc-i960.c (md_convert_frag): Likewise.
+ * config/tc-m68k.c (md_convert_frag): Likewise.
+ * config/tc-m88k.h (md_convert_frag): Likewise.
+ * config/tc-ns32k.c (md_convert_frag): Likewise.
+ * config/tc-tahoe.c (md_convert_frag): Likewise.
+ * config/tc-vax.c (md_convert_frag): Likewise.
+ * config/tc-w65.c (md_convert_frag): Likewise.
+ * config/tc-z8k.c (md_convert_frag): Likewise.
+ * config/tc-h8300.h (TC_RELOC_MANGLE): Add segment argument.
+ * config/tc-h8500.h (TC_RELOC_MANGLE): Likewise.
+ * config/tc-w65.h (TC_RELOC_MANGLE): Likewise.
+ * config/tc-z8k.h (TC_RELOC_MANGLE): Likewise.
+
+Mon Jul 17 15:02:54 1995 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.c (Current_Routine, Text_Psect): Delete as file
+ scope variables.
+ (Define_Routine, Define_Local_Symbols): Take Current_Routine and
+ Text_Psect as arguments.
+ (VMS_DBG_Define_Routine): Delete.
+ (VMS_TBT_Block_End): Change `Size' argument from int to valueT.
+ (vms_write_object_file: text and data fixup loops): Difference
+ of two symbols has type offsetT rather than int; convert with
+ md_number_to_chars before passing to VMS_Store_Immediate_Data.
+ (vms_write_object_file: debug symbol loop): Call Define_Routine
+ instead of VMS_DBG_Define_Routine.
+
+Sat Jul 15 00:01:35 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Add @fixup so that the
+ compiler can mark which relocs not to complain about with
+ -mrelocatable.
+ (ppc_elf_validate_fix): Add .fixup to sections not to complain
+ about, and also don't complain for BFD_RELOC_CTOR relocations in
+ writable non-code segments.
+ (md_apply_fix): Treat BFD_RELOC_CTOR just like BFD_RELOC_32.
+
+Fri Jul 14 19:54:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Add support for SPARC SunOS PIC:
+ * config/tc-sparc.h (sparc_pic_code): Always declare, not just
+ when OBJ_ELF.
+ (TC_RELOC_RTSYM_LOC_FIXUP): Define when OBJ_AOUT.
+ (tc_fix_adjustable): New definition for OBJ_AOUT.
+ * config/tc-sparc.c (sparc_pic_code): Always define, not just when
+ OBJ_ELF.
+ (md_apply_fix): Adjust reloc addend for OBJ_AOUT and PIC. In
+ BFD_RELOC_32_PCREL_S2 case, don't increment val for an external
+ symbol when PIC.
+ (tc_gen_reloc): Generate different PIC relocs when OBJ_AOUT, as
+ well as when OBJ_ELF.
+ (md_shortopts): If OBJ_AOUT, include `k'.
+ (md_parse_option): If OBJ_AOUT, handle 'k'.
+ (md_show_usage): Mention -k if OBJ_AOUT, and -KPIC if OBJ_ELF.
+ (md_pcrel_from): Don't add in size for an external symbol when
+ PIC.
+
+Thu Jul 13 21:16:43 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.h (UNDEFINED_DIFFERENCE_OK): Define for SOM.
+ * write.c (adjust_reloc_syms): Set sy_used_in_reloc for both
+ symbols in a fixup where a defined symbol is subtracted from an
+ undefined symbol (when UNDEFINED_DIFFERENCE_OK is defined).
+ (fixup_segment): Do nothing for the difference of two symbols if
+ UNDEFINED_DIFFERENCE_OK is defined.
+
+Wed Jul 12 23:33:40 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Support MD_APPLY_FIX3.
+
+Wed Jul 12 01:12:12 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
+
+ * write.c (fix_new): Use int, not short int, for argument type.
+ (fix_new_exp): Ditto.
+
+ * configure.in (arm-*-riscix*): Don't set emulations.
+
+ * config/tc-mips.c (NO_ECOFF_DEBUGGING): Define if ECOFF_DEBUGGING
+ wasn't previously defined.
+ (s_extern): Don't set ecoff_extern_size if NO_ECOFF_DEBUGGING.
+ (nopic_need_relax): Don't check it if NO_ECOFF_DEBUGGING.
+ (macro_build) [!USE_STDARG]: Don't use variadic prototype.
+ (mips_local_label) [NO_ECOFF_DEBUGGING]: Don't preserve potential
+ ECOFF debugging symbols.
+
+ * emul.h (struct emulation): Use unsigned, not unsigned char, for
+ bitfields.
+ * obj.h (struct format_ops): Likewise.
+
+ * config/tc-arm.c (symbol_make_empty) [BFD_ASSEMBLER]: Set
+ udata.p, not udata.
+
+Tue Jul 11 14:30:19 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/c-mips.texi: Document -m4010 and -mno-4010.
+
+Tue Jul 11 14:28:55 1995 Jeff Spiegel <jeffs@lsil.com>
+
+ * config/tc-mips.c (mips_4010): New static variable.
+ (interlocks): New static variable.
+ (md_begin): Check for a cpu of "r4010". Set mips_4010 correctly.
+ If mips_4650 or mips_4010, set interlocks.
+ (append_insn): Check interlocks, not mips_4650.
+ (mips_emit_delays): Likewise.
+ (mips_ip): Only permit INSN_4010 instructions if mips_4010.
+ (md_longopts): Add "m4010" and "no-m4010".
+ (md_parse_option): Accept -mcpu=r4010. Handle -m4010 and
+ -no-m4010.
+ (md_show_usage): Document -m4010 and -no-m4010.
+
+Tue Jul 11 13:22:50 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (struct efdr): Add new field fake.
+ (init_file): Initialize fake.
+ (add_file): Add new parameter fake. Change all callers.
+ (ecoff_build_debug): Don't warn about a missing .end for a fake
+ file.
+
+Mon Jul 10 16:01:31 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * doc/as.texinfo: Split out most cpu chapters...
+ * doc/c-*.texi: ...to here.
+
+ * read.c (po_hash): Now static.
+
+Mon Jul 10 13:47:22 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Based on patches from H.J. Lu <hjl@nynexst.com>:
+ * config/tc-i386.c (md_apply_fix3): Rename from md_apply_fix1.
+ Accept pointer to value and segment. Fix OBJ_ELF PCREL case to
+ handle global defined symbols correctly.
+ (md_apply_fix): Remove both versions.
+ * config/tc-i386.h (MD_APPLY_FIX3): Define.
+
+ * configure.in: When switching on ${cpu}, use ${cpu}, not
+ $[target_cpu}, in default case.
+ * configure: Rebuild.
+
+Sat Jul 8 13:27:55 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (fixup_segment): Call resolve_symbol_value on
+ sub_symbolP, in case it isn't in the symbol table.
+
+Fri Jul 7 11:17:27 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_lcomm): For .lcomm 1, set align to 0, not 1.
+
+ * config/obj-coff.c (coff_frob_symbol): If SF_GET_FUNCTION, set
+ BSF_FUNCTION.
+ (symbol_globalP, symbol_global_lastP): New global variables.
+ (yank_symbols): Sort defined global symbols to the end, just
+ before the undefined symbols.
+ (glue_symbols): Add two arguments, and use them instead of
+ referring directly to global variables.
+ (crawl_symbols): Call glue_symbols twice, once for defined globals
+ and once for undefined. Add corresponding know calls.
+
+ * app.c (do_scrub_next_char): Always accept \v. Don't make it
+ conditional on BACKSLASH_V.
+ * read.c (next_char_of_string): Likewise.
+ * config/obj-bout.h (BACKSLASH_V): Don't define.
+ * config/tc-mips.h (BACKSLASH_V): Don't define.
+
+ Add SPARC ELF PIC support.
+ * write.c (fixup_segment): Pass fixP to TC_RELOC_RTSYM_LOC_FIXUP,
+ not fixP->fx_r_type.
+ * config/tc-sparc.c (sparc_pic_code): New global variable.
+ (md_apply_fix): If generating PIC, adjust fx_addnumber for any non
+ PC relative reloc.
+ (tc_gen_reloc): If generating PIC, adjust various reloc types.
+ Remove fx_pcrel assert, since it is no longer true.
+ (md_parse_option): Handle -K PIC.
+ * config/tc-sparc.h (sparc_pic_code): Declare if OBJ_ELF.
+ (TC_RELOC_RTSYM_LOC_FIXUP): Define if OBJ_ELF.
+ (tc_fix_adjustable): Don't adjust PC relative relocs if PIC.
+ * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Take a fixp, not a
+ reloc type.
+
+ * Makefile.in (Makefile): Add dependency on conf.in, so that conf
+ is rebuilt when conf.in changes.
+
+Thu Jul 6 16:49:38 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * All files: Updated FSF address.
+
+Thu Jul 6 16:30:34 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * ecoff.c (add_file): Don't collapse multiple .file commands into
+ a single file structure.
+ (ecoff_build_lineno): Set ilineBase to sum of previous file's
+ ilineBase and cline.
+
+Thu Jul 6 12:54:27 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ Patches from Jerry Blakely <gerry_blakley@wellfleet.com>:
+ * as.c (listing_filename): New static variable.
+ (show_usage): Mention -a=file.
+ (parse_args): Support = option of -a to set name of listing file.
+ (main): Pass listing_filename to listing_print.
+ * listing.c (list_file): New static variable.
+ (various): Replace printf with fprintf to list_file.
+ (listing_print): If name argument is not NULL, open it as
+ list_file.
+ * doc/as.texinfo, doc/as.1: Document -a=file.
+
+ * config/tc-sparc.c (s_reserve): Don't permit redefinition, even
+ if the symbol was already in bss_section. Fix warning message.
+
+ * listing.c (struct file_info_struct): Rename end_pending field to
+ at_end.
+ (file_info): Initialize at_end, not end_pending.
+ (buffer_line): If at_end set, just return immediately. Don't
+ worry about end_pending cases. Set at_end when EOF is read.
+ (print_source): Check at_end, not end_pending.
+ (listing_listing): Likewise.
+
+ * config/tc-alpha.h (alpha_do_align): Don't declare.
+ (md_do_align): Don't define.
+ (tc_frob_label): Define.
+ (alpha_define_label): Declare.
+ (md_flush_pending_output): Define.
+ (alpha_flush_pending_output): Declare.
+ * config/tc-alpha.c (insn_label): New static variable.
+ (auto_align): New static variable.
+ (md_pseudo_table): Add cases for .text, .data, .align, .byte,
+ .hword, .int, .long, .octa, .quad, .short, .word, .double, .float,
+ and .single. Change .t_floating, .s_floating, .f_floating,
+ .g_floating, and .d_floating to use s_alpha_float_cons rather than
+ float_cons.
+ (s_alpha_text, s_alpha_data): New static functions.
+ (s_rdata, s_sdata): Clear insn_label and set auto_align.
+ (s_gprel32): If auto_align, align. Clear insn_label.
+ (emit_insn): Clear insn_label.
+ (s_alpha_align): New static function.
+ (alpha_align): Make static. Take label argument.
+ (alpha_flush_pending_output): New static function.
+ (s_alpha_cons, s_alpha_float_cons): New static functions.
+ (alpha_define_label): New function.
+
+Wed Jul 5 22:49:31 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * conf.in: Regenerate with autoreconf.
+
+ Mon Jul 3 19:47:53 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.h (vms_resolve_symbol_redef): Use full prototype.
+ (vms_check_for_special_label, tc_frob_label): Move them to group
+ with other prototypes.
+ [WANT_VMS_OBJ_DEFS]: Only define the many OBJ_x, DBG_x, and DST_x
+ macros when this is defined.
+ * config/obj-vms.c: Fully prototype all local functions.
+ [symbolS, fragS]: Use consistently instead of their struct tags.
+ [WANT_VMS_OBJ_DEFS]: Define this.
+ (s_const): Make definition correctly match actual usage.
+ (VMS_stab_parse): Make `expected_type' arg be int rather than char.
+ (get_VMS_time_on_unix): Define as `static void'.
+ (hash_string): Make definition match actual usage; argument is
+ `char const *' rather than `unsigned char *'.
+ (VMS_Case_Hack_Symbol, VMS_Modify_Psect_Attributes, VMS_Psect_Spec,
+ VMS_Global_Symbol_Spec): Declare string args as `const char *'.
+ [IS_GXX_VTABLE]: New macro.
+ (vms_write_object_file: GSD loop): Use it.
+ (vms_write_object_file: data segment): Reorganize `fill' loop.
+
+Wed Jul 5 12:01:49 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (md_shortopts): Add "K:" if OBJ_ELF.
+ (md_parse_option): If OBJ_ELF, check for -K. Die if -K PIC, since
+ PIC code is not currently supported.
+
+ * as.c (parse_args): Change std_shortopts to be an array rather
+ than a constant string. Only include 'K' if WORKING_DOT_WORD is
+ not defined. Only check for 'K' in that case as well.
+ * as.h (flag_warn_displacement): Only declare if WORKING_DOT_WORD
+ is not defined.
+
+ * conf.in: Add undef of HAVE_SBRK.
+
+ * config/obj-coff.c (obj_coff_line): Call listing_source_line, in
+ both BFD_ASSEMBLER and non BFD_ASSEMBLER versions of the function.
+
+ * symbols.c (S_SET_EXTERNAL): Warn if symbol is weak.
+ (S_CLEAR_EXTERNAL): Likewise.
+ (S_SET_WEAK): Warn if symbol is global.
+
+ * config/obj-aout.c (obj_aout_frob_symbol): Warn about an attempt
+ to put an undefined symbol into a set.
+
+ * Makefile.in: Remove @configure_input@; it's not needed in
+ files named Makefile.
+
+ * config/tc-m88k.c (md_pseudo_table): Add ".set" so that the
+ explicit pseudo-op works, while continuing to treat "set" as an
+ instruction.
+
+ * ecoff.c (ecoff_debugging_seen): New global variable.
+ (ecoff_directive_def): Set ecoff_debugging_seen.
+ (ecoff_stab): Likewise.
+ * ecoff.h: Make idempotent.
+ (ecoff_debugging_seen): Declare.
+ * config/tc-mips.c: Include ecoff.h.
+ (mips_debug): New static variable.
+ (s_stringer, s_mips_space): Remove unneeded declarations.
+ (md_parse_option): In case 'g', set mips_debug to debugging level.
+ (mips_local_label): New function.
+ * tc-mips.h (LOCAL_LABEL): Call mips_local_label.
+ (mips_local_label): Declare.
+
+Wed Jul 5 00:59:22 1995 Fred Fish (fnf@cygnus.com)
+
+ * as.c (main): Only use sbrk when HAVE_SBRK defined.
+ * configure.in: Add test for sbrk.
+ * configure: Regenerate using autoconf 2.4.
+
+Mon Jul 3 15:58:16 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.h (MAX_RELOC_EXPANSION): Bump to 6.
+ * config/tc-hppa.c (tc_gen_reloc, SOM version): Handle
+ relocations for the difference of two (possibly external)
+ symbols.
+ (hppa_fix_adjustable): For SOM, reject reductions involving
+ the difference of two symbols.
+ (hppa_force_relocation): Force relocations for expressions
+ involving the difference of two symbols.
+
+Mon Jul 3 14:22:59 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure[.in] (i386-*-win32): New host and target.
+
+Thu Jun 29 17:25:43 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ Support for long filenames non-bfd coff.
+ * config/obj-coff.c (filename_list_head, filename_list_tail): New.
+ (yank_symbols): Notice and record filenames which are too long.
+ (w_strings): Write out filename strings.
+ (c_dot_file_symbols): Put long filenames onto list.
+
+Wed Jun 28 17:33:13 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): PE doesn't use
+ the strange common symbol format that other 386s formats
+ do.
+ * config/tc-i386.c (md_begin): If LEX_AT defined then
+ '@' is in the set of identifiers.
+ (i386_operand): If LEX_AT, then don't look for @goto stuff.
+ * config/te-pe.h: Define LEX_AT.
+
+Wed Jun 28 17:49:59 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * doc/as.texinfo (H8/500 Floating Point): Indicate that IEEE FP
+ numbers are for the standard emulation code.
+ (SH Floating Point): Ditto.
+ (Overview): Describe new --emulation option for MIPS.
+ * doc/*.m4: Deleted.
+
+Thu Jun 22 19:26:25 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu>
+
+ * configure.in: Added i386-*-moss* target.
+
+Thu Jun 22 14:41:23 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * write.c (write_object_file): Cast decode_local_label_name
+ argument to char * to avoid warning.
+
+Wed Jun 21 18:07:59 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Changes from Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>:
+ * config/tc-m68k.c (insword): Increment the frag offsets.
+ (struct m68k_it): Add reloc[].pcrel_fix field to hold pc-rel
+ fixup.
+ (add_fix): Accept additional parameter, the pc-rel fixup. All
+ callers changed. Fix offset address if width == 'b'.
+ (m68k_ip) [case AINDX]: Allow explicit size spec. Don't make the
+ outer displacement pc-relative.
+ (md_pcrel_from): Make it relative to the first extension word of
+ the operand.
+ (opcode_ptr): Make it a macro if DO_BREAK_UP_BIG_DECL is
+ undefined.
+ (md_convert_frag_1): Don't reference fragP->fr_opcode[2..].
+ (md_estimate_size_before_relax) [case TAB (FBRANCH, SZ_UNDEF)]:
+ Turn on long bit.
+ (m68k_ip) [case 'C']: Don't set set long bit, set it in the opcode
+ table.
+ (md_estimate_size_before_relax) [case TAB (PCINDEX, SZ_UNDEF)]:
+ Variable part increases by four, not six.
+ * write.c (fixup_segment) [TC_M68K]: Don't do further pcrel
+ processing after converting difference of two symbols in the
+ same segment.
+
+ * write.c (fixup_segment): Don't conditionalize the pcrel fix on
+ TC_M68K.
+
+ * config/tc-sparc.c (sparc_ip, case 'A'): If ASI is not a "#"
+ value, don't shift it an extra time.
+
+Wed Jun 21 14:18:37 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * gasp.c (do_print, do_form, buffer_and_nest): Use case insensitive
+ string compares.
+
+Tue Jun 20 14:55:02 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-coff.c (write_object_file): Cast time() argument to
+ time_t *.
+
+Tue Jun 20 12:00:53 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_build_unwind_subspace): Fix typo in last
+ change.
+
+Mon Jun 19 15:27:17 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_build_unwind_subspace): Zero out memory
+ from frag_more calls.
+
+Thu Jun 15 16:53:37 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config/obj-coff.c: Don't use "bfd/" when including libbfd.h
+ and libcoff.h.
+ (fill_section): Call PROGRESS.
+ * Makefile.in (INCLUDES): Add bfd srcdir.
+
+ * mpw-config.in: Add bfd_gas flag and set for each config.
+ (i386-unknown-go32, m68k-unknown-coff): Recognize.
+ * mpw-make.in (HACK_O_RAMA, OBJ_COFF_OMIT_TIMESTAMP): Add to
+ config.h.
+
+Thu Jun 15 10:04:26 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-arm.h (LOCAL_LABEL): Prepend '.' if not OBJ_AOUT.
+ (FAKE_LABEL_NAME): Likewise.
+
+Mon Jun 12 22:25:39 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): Check for invalid register in single
+ precision fmpyadd and fmpysub instructions.
+
+Thu Jun 8 19:33:02 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.c (myname): Delete all references.
+ (VMS_stab_parse, Write_VMS_MHD_Records, VMS_Case_Hack_Symbol):
+ Replace printf calls with as_tsktsk.
+ (PUT_LONG, PUT_SHORT): Use COPY_LONG, COPY_SHORT.
+ (VMS_Store_Immediate_Data): Move second buffer capacity check
+ below bottom of loop; first check at top suffices for loop itself.
+ (find_file): Remove redundant pointer checks in first two loops;
+ replace third loop with pointer to last list element determined
+ in first loop.
+
+Tue Jun 6 13:53:06 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-sparc.c (sparc_ip): Handle defined absolute symbols as
+ ASI values.
+
+ * config/obj-vms.c (vms_write_object_file, case N_DATA): Use
+ strcmp against FAKE_LABEL_NAME instead of checking third
+ character. (Suggested by Pat Rankin.)
+
+Mon Jun 5 20:10:46 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ Add support for N_ABS and N_ABS|N_EXT type symbols.
+
+ * config/obj-vms.h (LSY_S_M_{DEF,REL}, ENV_S_M_{DEF,NESTED}):
+ New macros for local symbols (from <lsydef.h> and <envdef.h>).
+ * config/obj-vms.c (Current_Environment): New file-scope variable.
+ (VMS_Local_Environment_Setup): New routine.
+ (GBLSYM_LCL): New macro.
+ (VMS_Global_Symbol_Spec): Handle local symbols too.
+ (VMS_Psect_Spec): Set GLOBALVALUE_BIT for absolute symbols.
+ (VMS_Emit_Globalvalues): Handle local and global absolute symbols.
+ (VMS_Store_PIC_Symbol_Reference): Ditto.
+ (vms_write_object_file: GSD symbol loop): Ditto.
+
+Mon Jun 5 16:10:40 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * config/tc-arm.h (LOCAL_LABELS_FB): Define.
+
+Mon Jun 5 02:17:58 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * configure.in (i386-*-gnu*): Always use GNU ELF config.
+
+Wed May 31 17:49:18 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.c (obj_crawl_symbol_chain): Update *symbolPP
+ in `else' clause when removing a symbol. Also, revise comments
+ to match the code.
+ (vms_write_object_file (GSD symbol loop, case N_DATA)): Never
+ output symbol definitions for local numeric labels.
+
+Tue May 30 18:29:10 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * configure.in (architecture variants, cases armeb and arm*): Remove
+ spaces round assignment to endian.
+
+Tue May 30 12:31:31 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * write.c (write_object_file): Check for undefined local dollar
+ and fb labels.
+
+ * symbols.c (decode_local_label_name): Extract instance number
+ from the correct location.
+
+Sat May 27 21:28:49 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config/te-dpx2.h: Include obj-format.h.
+ (COFF_MAGIC): Renamed from FILE_HEADER_MAGIC.
+
+Wed May 24 13:45:32 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure, configure.in, config/obj-coff.c, config/obj-coff.h:
+ Add support for ARM pe
+
+Tue May 23 17:00:32 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_SPARC_WDISP16
+ and BFD_RELOC_SPARC_WDISP19.
+
+Tue May 23 19:18:33 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * as.c (parse_args) [! USE_EMULATIONS]: Always print an error
+ message.
+
+ * doc/internals.texi: Document obj_app_file and
+ TARGET_BYTES_BIG_ENDIAN.
+
+Mon May 22 20:03:23 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * ecoff.c (ecoff_stab): Add extra leading argument, for 4 May
+ change.
+ * ecoff.h (ecoff_stab): Fix declaration.
+ * obj.h (format_ops.process_stab): Include prototype.
+ * config/obj-elf.h (OBJ_PROCESS_STAB): Pass through seg argument.
+ * config/obj-ecoff.h (OBJ_PROCESS_STAB): Ditto.
+
+ * config/e-mipself.c (mipself): New emulation mode, doesn't change
+ endianness from configured default.
+ * config/e-mipsecoff.c (mipsecoff): Ditto.
+ * configure.in (mips ecoff/elf targets): Include them.
+ * as.c (mipself, mipsecoff): Declare.
+
+ * as.c (emulation_name): New variable.
+ (select_emulation_mode): Set emulation_name. Don't change argv.
+ (parse_args): Handle --emulation; complain if the supplied name
+ isn't what select_emulation_name came up with.
+
+Sun May 21 21:36:17 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Reverse changes from Dec. 19th which
+ changed the way unwinds were built for ELF. Rely on relocation
+ symbol reductions to avoid placing the end of function marker
+ symbols into the object file's symbol table.
+
+Sat May 20 12:31:36 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ Added improved VMS support from Pat Rankin:
+
+ Fri 19 May 16:51:40 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.h (AOUT_STABS): Define.
+
+ * config/obj-vms.c (fpush, rpush): New routines.
+ (push): Replaced by the above.
+ (find_symbol): Slight reorganization to expose tail recursion.
+
+ Fri Mar 17 18:40:36 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * Makefile.in (VMS_OTHER_OBJS): delete this.
+ * vmsconf.sh (make-gas.com): build ../libiberty/liberty.olb
+ first if necessary; link gas against it.
+
+Fri May 19 16:37:39 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * gasp.c (istrue): Correctly test for string inequality.
+
+Thu May 18 04:25:11 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * config/tc-arm.c (CP_T_{Pre,UD,WB}): Define, bits in co-processor
+ instructions.
+ ([ls]fm_flags): Correct error in bitmasks.
+ (cp_address_required_here): Delete second parameter, FLAGS. All
+ callers changed. Remove all dead code referring to FLAGS. If
+ address is just "[Reg]" then convert into a PRE-INCREMENT UP format.
+ (do_fp_ldmstm): Handle full-descending and empty-ascending stack
+ formats explicitly.
+
+ * config/tc-arm.c (internalError): Define.
+ (ARM_{1,2,250,3,6,7,7DM,ANY,2UP,ALL,3UP,6UP,LONGMUL}): Define processor
+ variants.
+ (FPU_{CORE,FPA10,FPA11,NONE,ALL,MEMMULTI}): Define floating point
+ variants.
+ ({CPU,FPU}_DEFAULT): Define.
+ (cpu_variant): New variable.
+ (asm_flg): Change more_flags to flag_bits.
+ Add prototypes for new functions.
+ (FLAG_{S,P,B,T,ED,FD,FA,EA,IB,IA,DB,DA,L}): Delete.
+ (s_flag[], ldst_flags[], byte_flag[], cmp_flags[], ldm_flags[],
+ stm_flags[], lfm_flags[], sfm_flags[], round_flags[], except_flags[],
+ cplong_flag[]): New variables.
+ (asm_opcode, insns[]): New format, add version support.
+ (arm_flg_hsh): Delete.
+ (do_mul, do_mla): Remove "Warning" from warning messages.
+ (do_arit): Simplify.
+ (do_swap): Make error message more appropriate.
+ (md_begin): Build hash tables starting at first entry in tables.
+ (md_number_to_chars): Cope with big/little-endian selection.
+ (md_chars_to_number): New function.
+ (md_apply_fix): Rewrite to make endian independent.
+ (tc_gen_reloc): Better error messages.
+ (md_assemble): Reject opcodes forbidden by the currently selected cpu
+ variant. Rewrite handling code for instruction flags.
+ (md_shortopts): Add option "m:".
+ (md_parse_option): Get the desired cpu/fpu variant.
+
+ From: David Taylor (dtaylor@armltd.co.uk)
+ * configure.in (architecture variants): Check for "armeb" and "arm*",
+ set endianness accordingly.
+ * read.c (read_a_source_file): New hooks md_start_line_hook and
+ md_after_pass_hook.
+ * config/arm-{big,lit}.mt: New files
+ * config/tc-arm.h ({LITTLE,BIG}_ENDIAN, BYTE_ORDER): Define.
+ (TARGET_FORMAT): Select depending on endianness and emulation and
+ object format.
+ (md_after_pass_hook, md_start_line_hook): Define.
+ * config/tc-arm.c: Include subsegs.h, symbols.h and listing.h.
+ (shift[]): Add uppper case equivalents.
+ (CP_T_[XY], TRANS_BIT): Define.
+ (conds[]): Delete initial NULL entry, add "lo" entry as synonym for
+ "cc".
+ (LONGEST_FLAG, flags[]): Delete.
+ (arm_psr): New structure.
+ (psrs[]): New variable.
+ (PSR_ALL): Define.
+ (LONGEST_INST): Bump to 5.
+ (LITERAL_MASK, COND_MASK, OPCODE_MASK, DATA_OP_SHIFT): Define.
+ (OPCODE_{AND,EOR,SUB,RSB,ADD,ADC,SBC,RSC,TST,TEQ,CMP,CMN,ORR,MOV,BIC,
+ MVN}): Define.
+ (insns[]): Add smull, umull, smlal, umlal, ldfm, stfm, msr and mrs
+ instructions. Add nop and adr pseudo ops.
+ (reg_table): Add APCS register name variants.
+ (arm_psr_hsh): New hash table.
+ (md_pseudo_table): Add "ltorg", "pool", "extend", "ldouble" and
+ "packed".
+ (MAX_LITERAL_POOL_SIZE): Define.
+ (struct literalS): New structure.
+ (literals, next_literal_pool_place, lit_pool_num, current_poolP): New
+ variables.
+ (add_to_lit_pool, symbol_locate, symbol_make_empty): New functions.
+ (validate_immediate): Return FAIL on failure.
+ (s_ltorg): New function.
+ (psr_required_here, psrf_required_here): New functions.
+ (cp_address_required_here): New parameter, flag, all callers changed.
+ If flag is non-zero, restrict the legal addressing modes.
+ (do_nop, do_mrs, do_msr, do_mull): New functions.
+ (negate_data_op): New function.
+ (data_op2): accept #x,y meaning x rotated right by y, but only when
+ suitable constants. If immediate is not legal, try changing the
+ opcode.
+ (do_adr): New function.
+ (do_ldst): accept "ldr reg, =expr". Put expr in the pool if it can't
+ be done as an immediate.
+ (do_fp_ldst): Use CP_T_[XY], not immediate values.
+ (do_fp_ldmstm): New function.
+ (arm_psr_parse): New function.
+ (output_inst): Use INSN_SIZE in call to md_number_to_chars.
+ (md_assemble): Add hack so that "Label instruction" causes alignment of
+ the label.
+ (arm_after_pass_hook, arm_start_line_hook, arm_frob_symbol): New
+ functions.
+
+Wed May 17 05:25:16 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_show_usage): Add \'s at end of lines in
+ strings for non-GCC compilers.
+
+Tue May 16 19:36:00 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-ecoff.c (ecoff_pop_insert): New function.
+ (ecoff_format_ops): Use it.
+ (obj_ecoff_frob_symbol): Now static.
+
+Wed May 17 00:59:12 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
+
+ * config/tc-ppc.c (md_begin): Was assuming that an instruction was
+ bigendian and hence 16bit relocs withing instructions would
+ ALWAYS be at addresses i+2-i+3. In LE mode it is i+0-i+1.
+
+Tue May 16 16:29:58 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-multi.h (obj_frob_symbol, obj_frob_file, S_GET_SIZE,
+ S_SET_SIZE, S_GET_ALIGN, S_SET_ALIGN, obj_copy_symbol_attributes,
+ OBJ_PROCESS_STAB): New macros.
+ * config/tc-mips.c: Protect against redefining them also when
+ including obj-elf.h. Test only OBJ_ELF for including elf/mips.h.
+ (mips_init_after_args): New function. Set byte_order here.
+ (md_parse_option): Not here.
+ (byte_order): Don't bother initializing.
+ * config/tc-mips.h (mips_init_after_args): Declare.
+ (tc_init_after_args): New macro.
+
+ * read.c (s_lcomm): Do ELF/ECOFF test at run time, not compile
+ time.
+
+Fri May 12 14:17:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ Initial support for PE object files.
+ * configure.in, configure (i386-*-pe, i386-*-*nt): Add.
+ * config/obj-coff.c (fixup_segment): Cope with PE wierdness.
+ * config/obj-coff.h (TE_PE): New target format.
+
+Thu May 11 14:58:21 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-elf.c (NEED_ECOFF_DEBUG): Define if ECOFF_DEBUGGING
+ was defined by header files. Test in preprocessor conditionals
+ instead of ECOFF_DEBUGGING.
+ (ecoff_debug_pseudo_table): Make empty if NEED_ECOFF_DEBUG is not
+ defined.
+ (obj_read_begin_hook, obj_symbol_new_hook, elf_frob_symbol,
+ elf_frob_file): Only call ecoff routines if NEED_ECOFF_DEBUG is
+ defined.
+ (elf_ecoff_set_ext, elf_get_extr, elf_set_index): Define only if
+ NEED_ECOFF_DEBUG is defined.
+ (elf_format_ops): Reference elf_ecoff_set_ext only if
+ NEED_ECOFF_DEBUG.
+
+Wed May 10 18:09:12 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (OBJS): Include @extra_objects@.
+ (obj-elf.o, obj-ecoff.o, e-mipself.o, e-mipsecoff.o): New rules
+ for building these independently.
+ * emul-target.h, config/e-mipself.c, config/e-mipsecoff.c: New
+ files.
+
+ * acconfig.h (DEFAULT_EMULATION, EMULATIONS, USE_EMULATIONS,
+ OBJ_MAYBE_*, I386COFF, M68KCOFF, M88KCOFF): New macros.
+ * aclocal.m4 (GAS_UNIQ): New macro.
+
+ * as.c (emulations, n_emulations) [USE_EMULATIONS]: New variable.
+ (select_emulation_mode, default_emul_bfd_name, common_emul_init)
+ [USE_EMULATIONS]: New functions.
+ (main) [USE_EMULATIONS]: Call select_emulation_mode before other
+ initialization.
+ * emul.h: New file.
+ * as.h [USE_EMULATIONS]: Include it.
+
+ * configure.in: Handle enable-targets option. Iterate over target
+ list, building up a list of object file formats and emulation
+ configurations. (Only supports emulations for MIPS CPU so far.)
+ If multiple formats are needed, set obj_format to multi and add
+ format config files to extra_files. If emulation modes are
+ needed, add the relevant files to extra_files.
+
+ * configure.in: Define I386COFF, M68KCOFF, M88KCOFF for those
+ configurations.
+
+ * ecoff.c (ecoff_generate_asm_lineno): Filename argument now
+ points to const.
+ * ecoff.h (ecoff_generate_asm_lineno): Updated declaration.
+
+ * obj.h (obj_read_begin_hook): Don't declare function if it's
+ already a macro.
+
+ * read.c (s_space, cons, stringer): If md_flush_pending_output is
+ defined, call it on entry.
+ * config/obj-elf.c (obj_elf_section): If md_flush_pending_output
+ is defined, call it on entry. If md_elf_section_change_hook is
+ defined, call it before returning normally.
+
+ * read.h (target_big_endian): Declare.
+
+ * obj.h (struct format_ops): Added new function pointer fields
+ ecoff_set_ext, read_begin_hook, symbol_new_hook.
+ (ecoff_format_ops, elf_format_ops): Declare.
+ * config/obj-elf.c (elf_s_get_size, elf_s_set_size,
+ elf_s_get_align, elf_s_set_align, elf_copy_symbol_attributes,
+ elf_sec_sym_ok_for_reloc): New functions.
+ (elf_format_ops): New variable.
+ (elf_frob_symbol): Now takes additional int* argument.
+ * config/obj-elf.h (elf_frob_symbol): Update declaration.
+ (elf_pop_insert): Declare.
+ (obj_pop_insert): Define to call elf_pop_insert.
+ * config/obj-ecoff.c (ecoff_sec_sym_ok_for_reloc,
+ obj_ecoff_frob_symbol): New functions.
+ (ecoff_format_ops): New variable.
+
+ * config/te-generic.h: If OBJ_HEADER is defined, use it as the
+ filename to include in place of obj-format.h.
+ * config/te-multi.h: New file, copied from te-generic.h.
+ * config/obj-elf.c (OBJ_HEADER): Define it to "obj-elf.h".
+ * config/obj-ecoff.c (OBJ_HEADER): Define it to "obj-ecoff.h".
+
+ * config/obj-elf.c (ECOFF_DEBUGGING): Default to 0.
+ (obj_read_begin_hook, obj_symbol_new_hook, elf_frob_symbol,
+ elf_frob_file): Test it at run time.
+ (obj_ecoff_set_ext, elf_get_extr, elf_set_index): Define
+ unconditionally.
+ (elf_pseudo_table): Renamed from obj_pseudo_table, now static.
+ (ecoff_debug_pseudo_table): Split off into separate table. Define
+ it unconditionally.
+ (elf_pop_insert): New function.
+ * config/obj-elf.h (elf_pop_insert): Declare.
+ (obj_pop_insert): New macro.
+ (obj_ecoff_set_ext) [!OBJ_MAYBE_ELF]: Define to elf_ecoff_set_ext.
+ * config/obj-ecoff.h (obj_ecoff_set_ext): Define to ecoff_set_ext.
+
+ * config/tc-mips.h: Protect against multiple inclusions.
+ (mips_pop_insert): Declare.
+ (md_pop_insert): Call it.
+
+ * config/tc-mips.c: If OBJ_MAYBE_ELF is defined, include
+ obj-elf.h, but preserve OUTPUT_FLAVOR and protect some other
+ macros from redefinition.
+ (ECOFF_DEBUGGING): Default to 0. All references changed to
+ run-time tests or made unconditional.
+ (s_stringer, s_mips_space, s_elf_section): Deleted.
+ (md_pseudo_table): Don't refer to them. Split table into three
+ sections, for MIPS, non-ECOFF_DEBUGGING, and ELF.
+ (mips_pop_insert): New function.
+ (mips_flush_pending_output): New function.
+ (mips_enable_auto_align): New function.
+ * config/tc-mips.h (mips_pop_insert): Declare.
+ (md_pop_insert): New macro.
+ (mips_flush_pending_output): Declare.
+ (md_flush_pending_output): New macro.
+ (mips_enable_auto_align): Declare.
+ (md_elf_section_change_hook): New macro, calls
+ mips_enable_auto_align.
+
+Tue May 9 17:07:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in: Add little endian PowerPC support.
+ * configure: Rebuild with autoconf.
+ * config/ppc-big.mt: New file for big endian PowerPC systems.
+ * config/ppc-lit.mt: New file for little endian PowerPC systems.
+
+ * config/tc-ppc.h (target_big_endian): Declare.
+ (TARGET_FORMAT): Deal with little and big endian ELF variants.
+ (TARGET_BYTES_BIG_ENDIAN): Define as 1, not empty.
+
+ * config/tc-ppc.c (ppc_big_endian): Delete variable, use
+ target_big_endian instead.
+ (md_parse_option): Parse -mlittle and -mlittle-endian to use
+ little endian support. Parse -mbig and -mbig-endian to use big
+ endian support.
+ (md_show_usage): Update to reflect current switches.
+ (ppc_set_cpu): Recognize powerpcle as little endian PowerPC. Use
+ as_fatal, not abort if unknown machine.
+
+Tue May 9 10:58:41 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Cast *valp to an integer when
+ comparing against signed values.
+ (hppa_force_relocation): Make "distance" an integer.
+
+Tue May 9 00:47:03 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * obj.h (struct format_ops) [BFD_ASSEMBLER]: New type.
+ (this_format) [BFD_ASSEMBLER]: Declare new variable, if not
+ already defined as a macro.
+
+Mon May 8 21:44:13 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * subsegs.h (seg_info): Provide dummy version for
+ non-BFD_ASSEMBLER, non-MANY_SEGMENTS configuration. It should
+ never get invoked, but this is easier than conditionalizing some
+ of the uses.
+ (struct seg_info_trash): Dummy type used by above to make code
+ compile.
+
+Fri May 5 14:47:13 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define to 1, not
+ empty.
+ * config/obj-elf.h (SEPARATE_STAB_SECTIONS): Ditto.
+ * config/obj-som.h (SEPARATE_STAB_SECTIONS): Ditto.
+
+Thu May 4 19:26:55 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * stabs.c (get_stab_string_offset): Always define. If
+ SEPARATE_STAB_SECTIONS isn't set, abort.
+ (SEPARATE_STAB_SECTIONS): Default to zero.
+ (aout_process_stab): New function, split out from s_stab_generic.
+ (OBJ_PROCESS_STAB) [AOUT_STABS]: Define to call aout_process_stab,
+ if not already defined.
+ (s_stab_generic): Test SEPARATE_STAB_SECTIONS at run time. If
+ it's not set, and OBJ_PROCESS_STAB isn't defined, abort. Always
+ pass six arguments to OBJ_PROCESS_STAB.
+ * read.h (get_stab_string_offset): Declare unconditionally.
+ * config/obj-aout.h (AOUT_STABS): Define.
+ * config/obj-bout.h (AOUT_STABS): Define.
+ * config/obj-ecoff.h (OBJ_PROCESS_STAB): Add new first argument,
+ ignored.
+ * config/obj-elf.h (OBJ_PROCESS_STAB) [ECOFF_DEBUGGING]: Ditto.
+
+ * config/obj-ecoff.h (ECOFF_DEBUGGING): Define to 1, not empty.
+ * config/obj-elf.h (ECOFF_DEBUGGING): Ditto. Test value, not
+ whether it's defined.
+
+Wed May 3 21:38:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already
+ defined, define them to zero.
+ * config/tc-*.h, config/te-*.h: If defining them, define them to
+ be 1 instead of empty.
+ * expr.c (integer_constant, operand): Test them at run time
+ instead of compile time.
+ * read.c (read_a_source_file): Ditto.
+ * symbols.c (colon): Ditto.
+ (dollar_*, define_dollar_label, fb_*): Define unconditionally.
+ * symbols.h (dollar_*, define_dollar_label, fb_*): Declare
+ unconditionally.
+
+Wed May 3 13:08:53 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Do nothing for an out of range
+ PC relative call since those only occur in cases where the linker
+ can fix them up.
+ (hppa_force_relocation): Force relocations for out of range PC
+ relative calls.
+
+Tue May 2 16:34:47 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * configure (hppa*-*-lites*): Handle just like hppa*-*-*elf*.
+ * configure.in: Likewise.
+
+Tue May 2 11:22:00 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * read.c (pop_insert): New function.
+ (pop_override_ok, pop_table_name): New variables.
+ (md_pop_insert, obj_pop_insert): New macros.
+ (pobegin): Use them.
+
+ * config/tc-mips.c: Use USE_STDARG and USE_VARARGS instead of
+ NO_STDARG &c.
+
+ * read.c (target_big_endian): If TARGET_BYTES_BIG_ENDIAN is
+ defined, initialize to 1.
+ * config/tc-mips.c (mips_target_format): Changed to a function,
+ checking flavor and byte order at run time.
+ (md_parse_option, cases OPTION_EB and OPTION_EL): Set
+ target_big_endian here.
+ (md_begin): Not here.
+ * config/tc-mips.h (mips_target_format): Adjust declaration.
+ (TARGET_FORMAT): Call mips_target_format.
+
+ * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Define in terms of
+ OUTPUT_FLAVOR.
+ * config/tc-mips.c (g_switch_value, g_switch_seen): Define
+ unconditionally.
+ (md_begin, mips_ip, md_parse_option, s_change_sec, s_option,
+ s_abicalls, nopic_need_relax): Check USE_GLOBAL_POINTER_OPT at run
+ time, instead of compiling conditionally on GPOPT.
+ (GPOPT): Don't define.
+ (md_shortopts): Always include -G.
+ (RDATA_SECTION_NAME): Select at run time.
+ (md_begin): Test for ELF format at run time instead of compile time.
+ (mips_ip, s_change_sec): Ditto.
+ (md_parse_option, cases OPTION_CALL_SHARED and OPTION_NON_SHARED):
+ Ditto.
+ (OPTION_CALL_SHARED, OPTION_NON_SHARED, mips_regmask_frag): Define
+ unconditionally.
+
+Tue May 2 00:17:04 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * Makefile.in (TARG_CPU_DEP_*): New variables.
+ (targ-cpu.o): Depend on one, selected by autoconf substitution,
+ instead of TARG_CPU_DEPENDENTS.
+ * configure.in: Substitute $cpu_type, $obj_format, $atof, and
+ $emulation into Makefile.in.
+ * config/h8300.mt: Deleted.
+ * config/h8500.mt: Deleted.
+ * config/i386coff.mt (TARG_CPU_DEPENDENTS): Deleted.
+ * config/m68k.mt: Deleted.
+ * config/m68kcoff.mt (TARG_CPU_DEPENDENTS): Deleted.
+ * config/m88kcoff.mt (TARG_CPU_DEPENDENTS): Deleted.
+ * config/mips-big.mt (TARG_CPU_DEPENDENTS): Deleted.
+ * config/mips-lit.mt (TARG_CPU_DEPENDENTS): Deleted.
+ * config/sh.mt: Deleted.
+ * config/w65.mt: Deleted.
+ * config/z8k.mt: Deleted.
+
+ * config/te-dpx2.h (dpx2): Deleted unused macro.
+ * config/te-generic.h (TE_GENERIC): Ditto.
+ * config/te-go32.h (TE_GO32): Ditto.
+ * config/te-hp300.h (TE_HP300): Ditto.
+ * config/te-hppa.h (PA, _TE_PA_H): Ditto.
+ * config/te-ic960.h (TE_IC960): Ditto.
+ * config/te-nbsd532.h (TE_NETBSD532): Ditto.
+ * config/te-pc532mach.h (TE_PC532MACH): Ditto.
+ * config/te-ppcnw.h (TE_PPCNW): Ditto.
+ * config/te-sco386.h (scounix): Ditto.
+
+Mon May 1 15:59:56 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * read.c (s_app_file): If obj_app_file is defined, call it with
+ string as argument. Don't call c_dot_file_symbol or
+ elf_file_symbol.
+ * config/obj-coff.h (obj_app_file): Define as c_dot_file_symbol.
+ * config/obj-elf.h (obj_app_file): Define as elf_file_symbol.
+
+ * as.h (OUTPUT_FLAVOR): Don't define here.
+ * config/obj-aout.h (OUTPUT_FLAVOR) [BFD_ASSEMBLER]: Define.
+ * config/obj-bout.h (OUTPUT_FLAVOR): Define.
+ * config/obj-coff.h (OUTPUT_FLAVOR) [BFD_ASSEMBLER]: Define.
+ * config/obj-ecoff.h (OUTPUT_FLAVOR): Define.
+ * config/obj-elf.h (OUTPUT_FLAVOR): Define.
+
+Thu Apr 27 20:07:33 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (RUNTEST): Use one in srcdir if present.
+ (RUNTESTFLAGS): Define.
+
+Wed Apr 26 15:54:10 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Support for more portable alignment handling in assembly code,
+ based on patches from Bryan Ford <baford@schirf.cs.utah.edu>:
+ * read.c (potable): Added balign and p2align, for aligning by
+ bytes or powers of two independent of what ".align" does for a
+ given target.
+ * doc/as.texinfo: Document them.
+
+Tue Apr 25 11:12:04 1995 Rob Savoye <rob@thepub.cygnus.com>
+
+ * configure, configure.in: Look for m68k-*-vxworks* rather than
+ just m68k-wrs-vxworks so gas can be configured for
+ m68k-vxworks5.1.
+
+Fri Apr 21 15:19:06 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-sh.c (md_apply_fix): If fx_r_type is zero, handle
+ fx_size of 1, and abort on unrecognized sizes.
+
+ * config/tc-m68k.c (m68k_ip): Fix bug in last change regarding
+ non-isvar case.
+
+Sun Apr 16 01:52:52 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
+
+ * config/tc-m68k.h (md_relax_table, TC_GENERIC_RELAX_TABLE):
+ Missed this one in 11 Apr changes.
+
+ * config/tc-i386.h (TC_GENERIC_RELAX_TABLE): Fix typo.
+
+Thu Apr 13 18:18:08 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-sh.c (md_convert_frag): Instead of aborting on large
+ displacements, print an error message. Don't invoke the code that
+ followed the abort call until it's been verified.
+
+ * config/tc-m68k.c (md_show_usage): Add 68060 to list. Split cpu
+ list into three lines.
+
+Thu Apr 13 14:34:36 1995 Torbjorn Granlund <tege@adder.cygnus.com>
+
+ * tc-m68k.c (m68k_init_after_args): Test for m68360.
+ (md_parse_option): Likewise.
+ (md_show_usage): Mention m68360.
+ * tc-m68k.h (TARGET_WORD_SIZE): Define.
+ (TARGET_ARCH): Define.
+
+ * expr.c (integer_constant): If TARGET_WORD_SIZE is defined,
+ sign-extend appropriately.
+
+Thu Apr 13 11:20:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Properly use PARAMS to
+ hide prototype from non-ANSI compilers, and don't use ANSI syntax
+ for arguments.
+
+Wed Apr 12 12:20:19 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in (TDEFINES): Put empty definition into
+ makefile fragment.
+ * mpw-make.in (xmalloc.c.o): Remove.
+ (as.new): Depend on Version.r.
+ (Version.r): Generate from version info.
+
+ * mpw-make.in: Delete references to hex-value.c.
+
+ * mpw-config.in: Add mapping from configs to object file formats,
+ get VERSION from Makefile.in and add to mk.tmp.
+ (mips-idt-ecoff) [TDEFINES]: Add TARGET_BYTES_BIG_ENDIAN.
+ * mpw-make.in (VERSION, gC): Don't define.
+ (ALL_CFLAGS): Remove -d flags.
+ (config.h): Remove definition of MPW, add HAVE_STDARG_H,
+ BFD_ASSEMBLER.
+
+ * mpw-make.in (ALL_CFLAGS): Add definition of HAVE_STDARG_H,
+ include of ::libiberty:.
+ (config.h): Ifdef contents on GAS_VERSION.
+
+ * mpw-make.in (as.c): Compile with C not gC.
+ (config-stamp): Touch correctly.
+ (install-only): New target.
+ (install): Depend on all and install-only.
+
+ * mpw-config.in: Parse target and use to generate forward includes
+ to tc-, obj-, and atof- files, use te-generic.h for emulation.
+ * mpw-make.in (VERSION): Define.
+ (as.c): Compile with GCC.
+ (TARG_OBJECTS, CLIBS): Define.
+ (as.new): Use LDFLAGS, TARG_OBJECTS, CLIBS and EXTRALIBS in link
+ command.
+ (config.h, config-stamp): Build.
+
+ * mpw-make.in (C, CFLAGS): Removed definitions.
+ (ALL_CFLAGS): Define.
+ Set default rule to use {CC} instead of {C}.
+
+ * mpw-make.in (install): Moved here from mpw-build.in.
+ * mpw-build.in: Removed, functionality in mpw-make.in
+
+ * mpw-make.in (CFLAGS): Add more include paths.
+
+ * mpw-config.in (varargs.h, sys/*.h): Don't create when
+ configuring.
+ * mpw-make.in (CFLAGS): Add -w flag.
+
+ * mpw-make.in: Replace 8-bit chars with their names.
+
+ * mpw-config.in: New file, MPW version of configure.in.
+ * mpw-make.in: New file, MPW version of Makefile.in.
+
+Tue Apr 11 01:42:36 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * configure.in: Require at least autoconf 2.3, because earlier
+ versions lose on some AIX versions.
+ * configure: Regenerated.
+
+ * configure.in: Add m68k-*-elf.
+ * config/tc-m68k.c (comment_chars) [OBJ_ELF]: Include '#'.
+ (md_pseudo_table) [OBJ_ELF]: Ignore "swbeg".
+ (md_begin): Set alt_notend_table['&'], so svr4-style immediate
+ operands are accepted.
+ (md_apply_fix): Argument VALP should point to valueT.
+ (md_convert_frag): Argument SEC should be type segT.
+ (md_shortopts) [OBJ_ELF]: Accept 'Q' with an argument.
+ (md_parse_option): Ignore it.
+ (md_convert_frag_1): Add in frag address for the symbol in the
+ displacement calculation.
+ * config/tc-m68k.h (TARGET_FORMAT) [OBJ_ELF]: Use "elf32-m68k".
+ (TARGET_ARCH): Define.
+ (REGISTER_PREFIX_OPTIONAL) [OBJ_ELF]: Default to 0.
+ (LOCAL_LABEL, FAKE_LABEL_NAME, REGISTER_PREFIX_OPTIONAL): Handle
+ these the same way for OBJ_ELF as for M68KCOFF.
+
+ * gdbinit.in: Add breakpoint in as_abort.
+
+ * write.c (cvt_frag_to_fill): If offset is less than zero,
+ complain about it specifically, instead of reporting an assertion
+ failure.
+ (relax_segment): Complain about .org backwards, then ignore it.
+ Do generic rs_machine_dependent relaxation only if
+ TC_GENERIC_RELAX_TABLE is defined, and use its value for the base
+ of the table.
+ * tc.h (md_relax_table): Delete declaration.
+ * as.h (struct relax_type): Add forward declaration for type.
+ * config/tc-a29k.c: Deleted md_relax_table.
+ * config/tc-{alpha,arm,h8300,hppa,i860,m88k,mips,ppc,sparc,z8k}.c:
+ Ditto.
+ * config/tc-{h8500,i386,i960,ns32k,sh,tahoe,vax,w65}.h: Declare
+ md_relax_table here, and define TC_GENERIC_RELAX_TABLE to expand
+ to md_relax_table.
+ * config/tc-h8500.c (md_relax_table): No longer const.
+ * config/tc-w65.c (md_relax_table): Ditto.
+ * config/tc-sparc.c (md_short_jump_size, md_long_jump_size):
+ Deleted.
+ * doc/internals.texi: Describe TC_GENERIC_RELAX_TABLE and
+ WORKING_DOT_WORD. Mention md_*_jump_size (but description needs
+ to be fleshed out later). Note m68k PCINDEX mode has been checked
+ in.
+
+Mon Apr 10 15:57:42 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-mips.c (nopic_need_relax): New static function, split
+ out from md_estimate_size_before_relax.
+ (md_estimate_size_before_relax): Call it.
+ (load_address, macro): In NO_PIC branches, if nopic_need_relax
+ returns nonzero, don't attempt GP optimization.
+
+ * config/tc-m68k.c (PCINDEX): New macro.
+ (md_relax_table): No longer const. Add PCINDEX entries.
+ (m68k_ip): For AINDX with simple symbol operand, generate a
+ PCINDEX frag if PC is used, or do normal non-AINDX processing for
+ address register.
+ (m68k_init_after_args): If cpu is 68000 or 68010, fix
+ md_relax_table to prevent relaxation of PCINDEX/BYTE mode to
+ SHORT, since they don't support that mode.
+ (md_convert_frag_1, case PCLEA/LONG): Add 4 to offset, not 2. Add
+ support for new PCINDEX modes.
+ (md_estimate_size_before_relax): Process PCINDEX/SZ_UNDEF mode.
+
+ * config/tc-m68k.c (md_convert_frag_1, case PCLEA/SHORT): Add 2 to
+ offset.
+ (m68k_ip, case most punctuation/AOFF): If using PC, call add_frag
+ using PCLEA.
+
+ * config/tc-m68k.c: Don't explicitly include config.h. Deleted a
+ bunch of "#if 0" code and useless comments.
+ (struct m68k_cpu): New type.
+ (archs, n_archs): New variables, with single list of name/enum
+ mapping and aliases.
+ (m68k_ip): Delete the table here.
+ (m68k_init_after_args): Use the new table here instead of
+ open-coding it.
+ (md_parse_option, case 'm'): Ditto.
+
+ * doc/Makefile.in (Makefile): Fix rule for running config.status.
+ (internals.dvi, internals.ps, internals.ps4): New targets, not
+ built by default.
+
+ * doc/internals.texi: Add loud disclaimer. Refill to 79 columns,
+ specify fill-column in local-variables section. Change
+ subheadings to subsections so they can be cross-referenced.
+ Describe broken words, frags, frag chains, generic relaxation,
+ relax table, m68k relaxation, m68k addressing modes, test suite
+ code. Add a few words about various file formats.
+
+ * doc/as.texinfo (m68k): Recommend using `%' with registers as the
+ normal case, instead of the exceptional case.
+
+Thu Mar 30 14:38:47 1995 H.J. Lu (hjl@nynexst.com)
+
+ * configure.in: Change linux to default to elf. Using
+ i[345]86-*-linuxaout will defaults to a.out.
+ * configure: Rebuild.
+
+Wed Mar 29 17:16:30 1995 Torbjorn Granlund <tege@adder.cygnus.com>
+
+ * config/tc-m68k.c (md_apply_fix_2): Cast negative offsets to offsetT
+ (for hosting on 64 bit machines).
+
+Tue Mar 21 16:53:27 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_show_usage): Mention -mips4 and -m4650.
+
+Fri Mar 17 16:47:13 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * write.c (write_object_file): Add PROGRESS macros.
+
+Fri Mar 17 12:40:34 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_comm): Make sure to always reset the frag
+ and section for common symbols.
+
+Thu Mar 16 17:26:18 1995 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Allow non PC relative
+ pointers in the .ctors and .dtors section also when using the
+ -mrelocatable option.
+ (md_parse_option): Support -m403 as a PowerPC computer.
+ (md_show_usage): Ditto.
+
+Wed Mar 15 14:45:42 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_build_debug): The cur_scope field of a fil_ptr
+ may be NULL when given strange input. Don't core dump.
+
+Tue Mar 14 21:36:34 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (load_register): Don't use addiu for dli of an
+ unsigned seemingly negative number. Don't bother shifting a zero
+ value.
+ (mips_ip): For case 'j', if there are more alternatives, and the
+ ISA level is at least 3, don't accept an unsigned seemingly
+ negative number.
+
+Tue Mar 14 19:16:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * read.c (s_app_line): Fix last patch to deal with a line number
+ of 1.
+
+Tue Mar 14 17:00:57 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Use as_warn_where, not
+ as_bad_where to give a warning instead of an error.
+
+Mon Mar 13 17:03:46 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/tc-vax.c (md_assemble): issue a warning if a constant
+ is used as an operand where an immediate value is not allowed.
+
+Fri Mar 10 19:21:19 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-coff.c: Redo my 10 Jan change, but get it right this
+ time. :-)
+ (fixup_segment): If linkrelax is set, just return.
+ (write_object_file): Don't treat h8300 and z8k specially with
+ regard to fixups.
+ * config/tc-h8300.c (md_begin): Set linkrelax.
+ * config/tc-z8k.c (md_begin): Ditto.
+
+Thu Mar 9 18:01:37 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (coff_header_append): Check return value of
+ bfd_coff_swap_scnhdr_out.
+
+Thu Mar 9 13:51:30 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ Delete this patch, it breaks the h8300 assembler.
+ Tue Jan 10 13:34:14 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * config/obj-coff.c (write_object_file): Don't treat h8300 and z8k
+ specially with regard to fixups.
+
+Thu Mar 9 12:28:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (mrelocatable): Change type to boolean.
+ (md_begin): Set the EF_PPC_RELOCATABLE if -mrelocatable.
+
+Wed Mar 8 15:39:39 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_begin): Check for a cpu string of r8000 or
+ r10000. If mips_isa is 4, set the machine number to 8000.
+ (append_insn): If mips_isa is at least 4, don't generate nops for
+ coprocessor delays. Check INSN_READ_FPR_R when setting
+ mips_cprmask[1].
+ (mips_emit_delays): If mips_isa is at least 4, don't generate nops
+ for coprocessor delays.
+ (mips_ip): Check for INSN_ISA4 instructions. Handle new argument
+ types 'h', 'R', 'N', and 'M'.
+ (md_longopts): Accept "mips4".
+ (md_parse_option): Handle -mips4, and -mcpu=10000 and -mcpu=8000.
+ (s_mipsset): Permit .set mips4.
+
+Wed Mar 8 09:36:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Allow .stab sections to
+ have non PC relative relocations with -mrelocatable.
+
+Wed Mar 8 02:57:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-m68k.c (opcode_ptr): Return pointer to const.
+ (md_begin): Make hash table errors fatal. Process opcode aliases
+ after main opcode table.
+ (md_apply_fix_2, case 4): Recode setting of lower_limit to avoid
+ gcc warning.
+
+Tue Mar 7 16:07:10 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo: Add documentation for SPARC V9, from Doug Evans
+ <dje@cygnus.com>.
+
+Mon Mar 6 09:58:34 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Change all occurences of pa-89 with pa-11 to
+ be consistent with current naming conventions.
+ (md_begin): Set a default architecture and machine type.
+ (pa_ip): If the current instruction specifies a newer machine type
+ than the current machine type, then update the current machine
+ type.
+ (need_pa11_opcode): Likewise.
+
+Sun Mar 5 19:38:09 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip, case 'z'): Don't lose argument
+ relocation bits for absolute calls.
+
+Fri Mar 3 17:41:50 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-h8300.* (md_operand): Change empty function to empty
+ macro.
+
+ * config/tc-h8300.c (build_bytes): Make H8/300-H warning message
+ clearer.
+
+ * write.c (write_contents): If bfd_set_section_contents fails,
+ print a message and exit, instead of aborting.
+
+Fri Mar 3 16:26:19 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * tc.h (md_apply_fix3): If MD_APPLY_FIX3 is defined, declare
+ md_apply_fix3.
+
+ * write.c (fixup_segment): If MD_APPLY_FIX3 is defined, call
+ md_apply_fix3 with the normal 2 arguments and the current segment
+ pointer instead of md_apply_fix.
+
+ * config/tc-ppc.h (MD_APPLY_FIX3): Define.
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Warn if -mrelocatable
+ and a non PC relative relocation that isn't in the .got2 segment
+ was performed.
+ (md_apply_fix3): Rename from md_apply_fix and take segment pointer
+ as third argument. If ELF object format, call ppc_elf_validate_fix
+ for normal relocations.
+ (md_parse_option): If ELF object format, recognize the
+ -mrelocatable switch.
+
+Thu Mar 2 16:34:44 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.h (AOUT_MACHTYPE): Define as 100, not 0.
+
+Tue Feb 28 18:29:27 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-arm.c, config/tc-arm.h (md_operand): Replaced empty
+ function in .c file with empty macro in .h file.
+ * config/tc-h8500.*, config/tc-hppa.*, config/tc-i386.*,
+ config/tc-i860.*, config/tc-i960.*, config/tc-ns32k.*,
+ config/tc-ppc.*, config/tc-sh.*, config/tc-sparc.*,
+ config/tc-tahoe.*, config/tc-vax.*, config/tc-w65.*,
+ config/tc-z8k.*: Ditto.
+ * config/tc-m68k.*: Ditto.
+
+ * config/tc-m68k.c (mote_pseudo_table): Removed dots from opcode
+ names.
+
+ * read.c (s_app_line): Ignore non-positive line numbers.
+
+Tue Feb 28 15:34:14 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust PLT or
+ GOT relocs either.
+
+Mon Feb 27 13:03:41 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * configure.in: add a29k-*-vxworks configuration.
+
+Fri Feb 24 14:41:15 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (load_register): Take dbl argument to determine
+ handling of signed 32 bit values in 64 bit modes. Change all
+ callers.
+ (macro): Handle M_DLI and M_DLA_AB.
+
+Wed Feb 22 23:10:56 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Don't subtract the value of the
+ add symbol if it's a common symbol (the value of a common symbol
+ is its size, not a value in the traditional sense).
+
+Wed Feb 22 21:12:28 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (append_insn): If listing_prev_line is called,
+ call frag_grow to make sure there is still room for a variant.
+
+Fri Feb 17 14:50:08 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_pseudo_table): Add 2byte, 4byte and 8byte
+ if OBJ_ELF. From gary@Intrepid.COM (Gary Funck).
+
+ * config/obj-elf.c (elf_frob_symbol): Warn if a symbol is both
+ weak and common.
+ * config/obj-aout.c (obj_aout_frob_symbol): Likewise.
+
+Fri Feb 17 12:43:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_pseudo_table): Don't redefine byte under
+ ELF.
+ (ppc_elf_cons): Don't support @pcrel any more, since DIFF_EXPR_OK
+ allows the normal expressions to generate it.
+ (md_apply_fix): Convert BFD_RELOC_32 with pcrel bit set into
+ BFD_RELOC_32_PCREL. Abort if either BFD_RELOC_16 or BFD_RELOC_8
+ need PC relative relocations.
+
+ * config/tc-ppc.h (DIFF_EXPR_OK): Define to allow PC relative
+ expressions to be handled.
+
+Thu Feb 16 14:30:13 1995 Doug Evans <dje@cygnus.com>
+
+ * expr.c (operand): Move md_operand handling to default case
+ (so it works).
+
+Wed Feb 15 16:08:47 1995 Jason Molenda <crash@cygnus.com>
+
+ * config/tc-h8500.c (tc_coff_symbol_emit_hook): Add ignored
+ parameter, to match prototype.
+
+Wed Feb 15 15:07:00 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_pseudo_table): If ELF, go to ppc_elf_cons
+ instead of cons.
+ (md_show_usage): Show all of the PowerPc options.
+ (ppc_elf_suffix): New function to recognize ELF suffixes that
+ specify a relocation, such as @GOT.
+ (ppc_elf_cons): Replacement for the standard cons function that
+ knows about the ELF suffixes.
+ (ppc_fixup): Add reloc field to hold non-standard relocation.
+ (md_assemble): Handle ELF suffixes like @GOT.
+ (md_create_short_jump): Dummy in case WORKING_DOT_WORD is not
+ defined.
+ (md_create_long_jump): Ditto.
+ (md_short_jump_size): Ditto.
+ (md_long_jump_size): Ditto.
+ (md_apply_fix): Handle BFD_RELOC_32_PCREL, BFD_RELOC_LO16,
+ BFD_RELOC_HI16, BFD_RELOC_HI16_S, BFD_RELOC_PPC_TOC16, and
+ BFD_RELOC_16 relocations. If relocation can not be found, print
+ the decimal value of the relocation.
+
+Wed Feb 15 11:46:02 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_apply_fix): Accept BFD_RELOC_16, for
+ DWARF. From gary@Intrepid.COM (Gary Funck).
+
+ * config/tc-mips.c (macro): Handle M_U{L,S}D[_A] (unaligned double
+ loads and stores).
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Do adjust global
+ symbols if OBJ_AOUT.
+
+ * config/tc-mips.c (macro): Don't use the target register as a
+ base register when building the address for M_L{W,D}{L,R}_AB.
+
+Mon Feb 13 14:44:32 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (KT0, KT1): Define.
+ (mips_ip): Recognize $kt0 and $kt1 as register names.
+
+ * config/tc-sparc.h (tc_fix_adjustable): Define if OBJ_ELF.
+ * config/tc-sparc.c (md_apply_fix): If OBJ_ELF, subtract out the
+ value of a defined symbol; the value was added in by
+ fixup_segment. This was previously corrected, if the reloc was
+ changed to be against a section symbol, in tc_gen_reloc.
+
+Fri Feb 10 14:04:04 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Use S_IS_EXTERN
+ rather than !S_IS_LOCAL.
+
+Thu Feb 9 18:16:34 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (md_assemble): Adjust conditions for changing
+ BFD_RELOC_32 to BFD_RELOC_386_GOTPC to handle a switch in frags.
+ Patch originally from Rob Ryan <robr@cmu.edu>.
+
+ * config/tc-i386.c: Include subsegs.h.
+ (tc_i386_fix_adjustable): Declare return value.
+ (i386_operand): Don't use an assignment directly as a condition.
+
+Thu Feb 9 10:37:13 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): In some cases subtract the
+ value of the add symbol from valp. Offsets braindamage in the
+ "machine independent" fixup_segment.
+
+Wed Feb 8 18:51:23 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * messages.c (as_abort): New function.
+ * as.h (as_abort): Declare it.
+ (abort): New macro.
+
+ Thu Jan 19 18:10:05 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/vms-conf.h (HAVE_UNISTD_H): define it unconditionally.
+ * config-gas.com: test for availability of <unistd.h>; create a
+ rudimentary one if necessary.
+
+Tue Feb 7 13:34:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in: Add powerpc-*-eabi support, which is the same as
+ powerpc-*-elf.
+ (configure): Rebuild with autoconf.
+
+Mon Feb 6 03:37:00 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Changes from Bryan Ford <baford@schirf.cs.utah.edu> for i386
+ 16-bit and msdos support:
+ * config/tc-i386.c (flag_16bit_code): New variable.
+ (set_16bit_code_flag): New function.
+ (md_pseudo_table): Added entries "code16" and "code32".
+ (md_assemble): Ensure that correct data-size prefixes get emitted,
+ based on the current mode. Ensure that 32-bit addressing will
+ always be done. Move segment-prefix handling code. (Why?) Use
+ 16-bit jumps for 16-bit code, 32-bit jumps for 32-bit code.
+ * config/tc-i386.h (MAX_PREFIXES): Bump to 5.
+ (Data16, Data32): Define.
+ * doc/as.texinfo (i386-16bit): New node.
+ * configure.in (i386-*-msdos*): New target, using a.out format.
+ * configure: Regenerated.
+
+Thu Feb 2 15:21:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-m68k.c (cpu32_control_regs): New macro.
+ (m68k_init_after_args): Use it, for cpu32 processors.
+
+ Tue Jan 31 17:20:45 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.c (vms_tir_stack_psect): new routine;
+ (VMS_Set_Data, VMS_Set_Psect, VMS_Store_PIC_Symbol_Reference,
+ VMS_TBT_Routine_Begin, VMS_TBT_Line_PC_Correlation): use it;
+ (VMS_Global_Symbol_Spec, VMS_Procedure_Entry_Pt): treat
+ Psect_Number as `unsigned'.
+
+ Thu Jan 26 17:06:28 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.c: performance tuning.
+ (VMS_Symbol_type_list): convert from single list head to small
+ array of list heads;
+ (SYMTYP_HASH): new macro for accessing VMS_Symbol_type_list[];
+ (find_symbol, setup_basic_type, VMS_typedef_parse): use it;
+ (VMS_RSYM_Parse): move S_GET_VALUE() inside switch to avoid
+ calling it for uninteresting cases.
+
+Wed Feb 1 23:52:45 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Go ahead and call
+ hppa_field_adjust to get a new value for R_DATA_ONE_SYMBOL
+ relocations in SOM.
+ (hppa_fix_adjustable): Refine somewhat.
+
+Fri Jan 27 21:29:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.h (NO_STRING_ESCAPES): Don't define if we are
+ using ELF.
+
+Thu Jan 26 19:03:42 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-h8300.c (get_specific): Add parens around | inside &.
+ (skip_colonthing): Set L_8 if ":8" is specified.
+
+Thu Jan 26 18:38:01 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (md_begin): Permit mfdec to be duplicated on the
+ 601. Check that the error return from hash_insert is "exists".
+
+Thu Jan 26 11:35:33 1995 Michael Meissner <meissner@cygnus.com>
+
+ * configure: Add support for configuring powerpc-*-eabi.
+
+ * config/tc-ppc.c (GOT_symbol): Define if object format is ELF.
+
+ * config/tc-ppc.h (GLOBAL_OFFSET_TABLE_NAME): Define if object
+ format is ELF and not defined to be "_GLOBAL_OFFSET_TABLE_".
+
+Wed Jan 25 16:23:13 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * tc-sh.c (little): Add argument IGNORE to avoid compiler warnings.
+ (md_pseudo_table): Add space for consistent formatting.
+ (COND8_RANGE, COND12_RANGE): Delete unused macros.
+ (COND8_F, COND8_M, COND12_F, COND12_M, UNCOND12_F, UNCOND12_M):
+ Correct minimum and maximum branch offsets. Add comments explaining
+ why these numbers are correct.
+
+Wed Jan 25 15:32:09 1995 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * config/tc-ppc.c (md_parse_option): Accept mpwr2 as a synonym for
+ mpwrx; mppc32, m603, and m604 as synonyms for mppc; and mppc64 and
+ m620 for PowerPC64 mode.
+ (ppc_symbol_new_hook): Add T0 as synonym for TC0 suffix.
+
+Tue Jan 24 16:44:23 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-vax.c (vip): Introduce new ptr-to-const local variable
+ for scanning operand string.
+
+ Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/vax-inst.h (struct vop, fields `vop_warn', `vop_error'):
+ make them pointers to const char;
+ (struct vit, field `vit_error'): ditto.
+ * config/atof-vax.c (md_atof): rename local `littlenum_pointer'
+ to `littlenumP' to avoid shadowing file scope variable.
+ * config/tc-vax.c (vip_begin, vip_op_defaults, vip_op_1): make
+ string arguments be pointers to const char;
+ (vip): make `alloperr' const char *;
+ (vip_op): make `err' and `wrn' const char *; rename `access' to
+ `access_mode' to avoid shadowing library function.
+ * config/obj-vms.c (`symbol_name'): make it const char *;
+ (get_struct_name): cast one use of `symbol_name' to char *
+ [caller guarantees that it won't modify the pointer's target];
+ (PUT_COUNTED_STRING): use pointer to const char;
+ (VMS_typedef_parse): make `pnt2' const char *;
+ (Write_VMS_MHD_Records): make `cp' const char *;
+ (VMS_Modify_Psect_Attributes, array `Attributes'): make const,
+ and make field `Name' pointer to const char;
+
+ * as.h (`seg_name[]' declaration): pointers to const char;
+ (struct _pseudo_type, field `poc_name'): pointer to const char.
+ * subsegs.c (`seg_name[]' definition): ditto;
+ * hash.c (hash_ask): rename argument `access' to `access_type'
+ to avoid shadowing library function.
+ * write.c (variable `the_object_file'): move from file scope
+ to block scope within write_object_file(); free it after use;
+ (fixup_segment): conditionally exclude it for OBJ_VMS.
+ (cvt_frag_to_fill): rename argument `headers' to `headersP'
+ to avoid shadowing file scope variable.
+
+Mon Jan 23 21:42:39 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip, case 'D'): Fix typo which caused
+ miscompilation of "diag" instructions.
+
+Mon Jan 23 15:51:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * configure: Regenerated.
+
+ * config/tc-mips.c: Include libiberty.h.
+
+Mon Jan 23 14:07:58 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-sh.h (tc_init_after_args): Don't define.
+ * config/tc-sh.c (md_begin): Remove unused variable table.
+ (md_assemble): Remove unused variable p.
+ (md_convert_frag): Cast fr_address to unsigned long for printf.
+ (md_apply_fix): Use as_warn_where rather than as_warn.
+ (sh_init_after_args): Remove empty function.
+
+ * configure.in (i386-*-gnu*elf*): New target.
+
+Sat Jan 21 19:02:23 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
+
+ * hash.c (hash_ask): If we find the slot after wrapping around,
+ break out of the loop. Fixes bug in Jan 18 change.
+
+Fri Jan 20 17:07:31 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * hash.c (hash_code): Undo last change.
+
+Thu Jan 19 14:49:47 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-alpha.c (alpha_ip): Initialize local variables to keep
+ gcc quiet.
+ (gpdisp_hi16_howto): Don't use "const" with reloc_howto_type.
+ (in_range_signed): Add parens around subtraction inside shift.
+ * gasp.c (do_data): Initialize local variable "opname".
+ (istrue): Provide a default case to set "res" and keep "gcc -Wall"
+ quiet.
+ * write.c (write_contents): Deleted unused variable.
+ (print_symbol_value_1): Declare.
+ * hash.c (hash_ask): Delete disabled non-strcmp version of the
+ code, and automatic variables used only in those sections.
+ * write.c (chain_frchains_together_1): Only define local variable
+ "prev_fix" if BFD_ASSEMBLER.
+ * flonum-konst.c (dummy1): Return void.
+ * config/tc-vax.c (md_assemble): Remove two comparisons of
+ unsigned numbers versus zero.
+ * as.h (bcopy): If neither memcpy nor bcopy is defined as a macro,
+ define to use memcpy.
+
+ * config/tc-alpha.c, config/alpha-opcode.h: Revert 2 June changes.
+ Turns out we never got the assignment done after all.
+
+ Cleanup of VAX and VMS code, from Pat Rankin:
+ * config/obj-vms.c: Changed exported function names to lower case.
+ (Changed call sites in write.c.) Declare VMS system function
+ names used, conditional on actually being on VMS. Changed many
+ functions that returned no useful value to now be declared to
+ return void. Removed many unused variables. Supply missing
+ return statements or values. Supply `default' case in switch
+ statements. Ensure local variables get initialized.
+ * config/tc-vax.c: Minor changes to silence "gcc -Wall".
+ * config/obj-vms.h, config/tc-vax.h: Added some missing
+ declarations.
+
+Wed Jan 18 13:49:26 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * atof-generic.c (flonum_print) [TRACE]: New function.
+ (atof_generic) [TRACE]: Print multiplier before multiplication,
+ and print multiplication result before and after copy.
+
+ * flonum-mult.c (flonum_multip): Avoid sign extension problems
+ around multiplication operation.
+
+ * atof-generic.c (ASSUME_DECIMAL_MARK_IS_DOT): Define.
+ (atof_generic) [ASSUME_DECIMAL_MARK_IS_DOT]: Check for '.'
+ explicitly instead of calling strchr.
+
+ * config/tc-sparc.c (sparc_ip): When scanning successive opcode
+ table entries, check names for pointer equality before doing
+ string comparisons.
+
+ * hash.c (hash_ask): Call strcmp instead of expanding it inline.
+ (hash_code): Replaced with a version from bfd.
+
+ * config/obj-coff.c (write_object_file): If COFF_FLAGS isn't
+ defined, default it to zero.
+
+Wed Jan 18 12:16:07 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * write.c (fix_new_internal): Clear fx_bsr on those targets which
+ use it.
+
+ * expr.c (operand): Parenthesize && within ||.
+ * listing.c (listing_newline): Likewise.
+ (list_symbol_table): Use %lu to print sizeof.
+ * symbols.c: Comment out unused function indent.
+ (print_symbol_value_1): Cast pointer to unsigned long for printf.
+ * config/obj-coff.c (do_relocs_for): Only declare symbol_ptr if it
+ will be used.
+ * config/tc-h8300.c (md_begin): Remove unused variable reg.
+ (get_operand): Declare type of parameter direction. Remove unused
+ variable size.
+ (get_specific): Fix comment to avoid nested comments.
+ (check_operand): Cast X_add_number to unsigned long for printf.
+ (build_bytes): Remove unused local variables output_ptr, part, and
+ high.
+ (build_bytes): Cast X_add_number to unsigned long for printf.
+ (clever_message): Remove unused variable scan.
+ (md_assemble): Remove unused variable i.
+ (tc_coff_sizemachdep): Remove unused function.
+ * tc-h8300.h (tc_reloc_mangle): Declare.
+
+Tue Jan 17 10:58:06 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (mips_4650): New static variable.
+ (md_begin): Handle a cpu string of "4650". If mips_4650 was not
+ initialized, set it to 0.
+ (append_insn): Don't insert nops around HI and LO on a 4650.
+ (mips_emit_delays): Likewise.
+ (mips_ip): Use INSN_ISA mask to check ISA of instruction. Check
+ for INSN_4650.
+ (md_longopts): Add m4650 and no-m4650.
+ (md_parse_option): Handle mips-cpu=4650. Handle -m4650 and
+ -no-m4650.
+ * doc/as.texinfo: Document new MIPS options.
+
+Sat Jan 14 23:48:13 1995 Steve Chamberlain <sac@jonny>
+
+ * config/tc-w65.c, config/tc-w65.h, config/w65.mt: Newfiles.
+ * config/obj-coff.h: Cope with w65.
+ * configure, configure.in: Recognize w65.
+
+Thu Jan 12 17:56:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * app.c (do_scrub_next_char) [__GNUC__ && __OPTIMIZE__]: If `get'
+ function is scrub_from_file, call scrub_from_file directly, and
+ get gcc's inlining capability into the act.
+
+ * Makefile.in (VMS_OTHER_OBJS): Add ../libiberty/hex.o.
+ (OBJS): Delete hex-value.o.
+ (REAL_SOURCES): Delete hex-value.c.
+ (hex-value.o): Delete dependencies.
+ * hex-value.c: Deleted.
+ * as.c (main): Call hex_init.
+ * expr.c, config/tc-mips.c: Include libiberty.h. Replace
+ hex_value array references with hex_* macros.
+
+Wed Jan 11 17:51:38 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-h8300.h (COFF_FLAGS): Don't define.
+ * config/tc-h8500.h (COFF_FLAGS), config/tc-sh.h (COFF_FLAGS),
+ config/tc-z8k.h (COFF_FLAGS): Ditto.
+
+ * config/obj-coff.c (KEEP_RELOC_INFO): Make sure it's always
+ defined.
+
+ * config/tc-m68k.c (m68k_ip, cases AOFF and AINDEX): Don't
+ generate 68020 addressing modes for a 68000 processor.
+ (md_estimate_size_before_relax, cases PCREL and PCLEA): Ditto.
+
+Tue Jan 10 13:34:14 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/obj-coff.c (write_object_file): Don't treat h8300 and z8k
+ specially with regard to fixups.
+
+Mon Jan 9 16:22:28 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-mips.c (RELAX_RELOC1, RELAX_RELOC2): Cast values to
+ bfd_vma before subtracting.
+
+ * config/obj-coff.c (size_section): Handle rs_space like rs_fill,
+ but make sure fr_symbol is null.
+ (fill_section): Ditto.
+
+Sun Jan 8 16:14:19 1995 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
+
+ * config/tc-mips.c (mips_ip): Fix handling of floating point
+ values when GPOPT is not defined.
+
+Fri Jan 6 16:59:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * gasp.c: Include string.h. Put config.h before other includes.
+
+ * config/tc-alpha.c (alpha_ip): Delay calls to emit_add64 until
+ after any remaining operands are also known to match.
+
+Fri Dec 30 18:21:41 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * listing.c (list_symbol_table): Build a format string based on
+ the size of the value to be printed, as long as "unsigned long" is
+ at least as wide, after handling the special case of 4-byte
+ values.
+
+ * Makefile.in (dependencies): Make $(OBJS) depend on as.h and
+ everything it includes. Delete those files from per-file
+ dependencies.
+
+ * as.h (relax_substateT): Now defined to be unsigned int.
+ (relax_stateT): Separate typedef from enum definition.
+ (enum _relax_state): Reordered for better punctuation. Added new
+ values rs_align_code and rs_space.
+ (lineno, struct lineno_struct): Unused, deleted.
+
+ * as.h: No longer include assert.h.
+ (as_assert): Declare.
+ (assert): New definition, calls as_assert longer needed.
+ (__PRETTY_FUNCTION__): Provide default for older versions of gcc.
+ * messages.c (as_assert): New function.
+ * gdbinit.in: Put a breakpoint there.
+
+ * read.c (s_space): Rewrite to handle general expressions.
+ Generate rs_space frags for non-constant values.
+ * write.c (cvt_frag_to_fill): Treat rs_align_code and rs_space
+ like rs_align and rs_org. Verify that fr_offset is non-negative,
+ and force frag type to rs_fill only after assertion checks.
+ (relax_segment): Treat rs_align_code like rs_align. Treat
+ rs_space like rs_org in the first switch; in the second, force the
+ operand to a constant, and use it for the growth size.
+
+Wed Dec 28 20:57:37 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_subspace): For sections with the ZERO
+ attribute, set the "bss" field in the appropriate seginfo structure.
+
+Wed Dec 28 15:01:01 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * subsegs.h: Include obstack.h.
+
+Tue Dec 27 18:16:04 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * as.h (struct frag): Enable align* components now.
+
+Tue Dec 20 14:56:31 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * frags.c (frag_init): Call obstack_begin on `frags'.
+ * subsegs.c (subsegs_begin): Don't do it here.
+ * as.c (main): Call frag_init before subsegs_begin.
+
+ * frags.c (frag_append_1_char): New function.
+ * frags.h (frag_append_1_char): Declare it.
+ (FRAG_APPEND_1_CHAR): Call it. Old definition is commented out
+ for now.
+
+ * as.h (struct frag): Added (but commented out) new fields for
+ tracking current alignment.
+ (frag_now_fix): Changed macro to function declaration.
+ * frags.c (frag_now_fix): Define function here.
+ (frag_new): Use it instead of accessing `frags' directly.
+ * frags.h (frags): Change comment to indicate it shouldn't be
+ accessed directly.
+ * subsegs.h (struct frchain): New field frch_obstack, intended to
+ eventually replace global `frags' obstack.
+ * subsegs.c (subseg_set_rest): Use frag_now_fix instead of
+ accessing `frags' directly. Initialize fields of new frchainS
+ explicitly instead of with memset.
+ * config/obj-coff.c (obj_coff_ln) [!BFD_ASSEMBLER]: Use
+ frag_now_fix.
+ * config/tc-mips.c (s_loc), config/obj-vms.c
+ (vms_resolve_symbol_redef), symbols.c (colon): Likewise.
+
+ * config/tc-m68k.c (md_apply_fix_2): Use offsetT and addressT
+ instead of long and unsigned long.
+ (md_apply_fix): Cast value before passing it.
+
+ * config/obj-aout.h, config/obj-coff.c, config/obj-elf.h,
+ config/obj-som.h, config/tc-h8500.c, config/tc-hppa.c,
+ config/tc-hppa.h, config/tc-sh.c, config/tc-z8k.c: Don't rely on
+ use of ".." when including header files.
+
+ * config/obj-coff.c (fixup_segment): Reformat condition in an `if'
+ statement.
+
+ * Makefile.in (SUBDIR_INCLUDES): Deleted.
+
+Tue Dec 20 13:40:36 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/obj-coff.h: Include bfd/libcoff.h, not libcoff.h.
+
+Mon Dec 19 16:53:36 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (load_register): Rewrite to handle O_big 64 bit
+ constants.
+ (mips_ip): Accept O_big constants in case 'I'. Change case
+ 'i'/'j' to treat an O_big constant as an out of range value.
+
+Mon Dec 19 14:15:07 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_subspace): Make sure SEC_HAS_CONTENTS is
+ clear for a section with the "ZERO" attribute.
+
+ * Reduce useless symbols for ELF in an attempt to make smaller
+ objects and speed up the linker.
+ * config/tc-hppa.c (struct call_info): Replace end_symbol field
+ with a size field.
+ (hppa_elf_mark_end_function): Delete unneeded function.
+ (pa_build_unwind_subspace): For the 2nd unwind relocation, use
+ the function symbol + function size instead of a special symbol
+ for the end of the function.
+ (process_exit): Compute the function size here. Don't call
+ hppa_elf_mark_end_of_function anymore.
+ (pa_procend): Likewise.
+ (hppa_fix_adjustable): Only reject 32bit relocations for SOM.
+ (elf_hppa_final_processing): Simplify.
+
+Mon Dec 19 13:49:07 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * configure.in: Recognize mips-sony-bsd and mips-dec-bsd, but
+ reject other vendors until we can be sure we're consistent with
+ bfd.
+
+ * config/obj-vms.c (Create_VMS_Object_File): Instead of formatting
+ a buffer to pass to `error', just call `as_fatal' directly.
+ (VMS_Psect_Spec): Ditto.
+ (VMS_TBT_Module_Begin, VMS_TBT_Source_File, gen1,
+ VMS_typedef_parse, VMS_LSYM_Parse, VMS_Emit_Globalvalues): Call
+ as_tsktsk instead of printf.
+ (VMS_TBT_Module_Begin, VMS_TBT_Line_PC_Correlation,
+ VMS_TBT_Source_File, VMS_TBT_Source_Lines,
+ VMS_Store_Repeated_Data, VMS_Check_For_Main): Use explicit
+ integers rather than sizeof expressions using basic integer types,
+ in case host and target aren't the same. Use memcpy or COPY_*
+ macros instead of possibly unaligned word or longword assignment.
+
+ * config/obj-vms.h (OBJ_SYMFIELD_TYPE): New macro.
+ * config/obj-vms.c (VMS_Store_PIC_Symbol_Reference,
+ VMS_Check_For_Main, VMS_write_object_file): Use sy_obj instead of
+ forcing sy_number to hold a pointer.
+
+Fri Dec 16 14:40:16 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-sh.c (md_begin): Don't fill in md_relax_table here.
+ (md_relax_table): Use static initialization.
+
+ * config/tc-h8300.c (parse_exp, get_operands, clever_message,
+ md_assemble, tc_crawl_symbol_chain, md_undefined_symbol,
+ tc_headers_hook, md_operand, md_number_to_chars): Don't use DEFUN.
+
+ * Makefile.in (CHECKFLAGS): Don't pass AS_FOR_TARGET,
+ CC_FOR_TARGET, OBJDUMP_FOR_TARGET, NM_FOR_TARGET; they're not
+ used.
+ (AS_FOR_TARGET, CC_FOR_TARGET, OBJDUMP, OBJDUMP_FOR_TARGET, NM,
+ NM_FOR_TARGET): Don't define.
+ (VMS_OTHER_OBJS): Add xmalloc.o and xexit.o from libiberty.
+ (tooldir): Use exec_prefix, not libdir.
+
+Fri Dec 16 11:07:10 1994 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config/obj-coff.h: Include libcoff.h, not ../bfd/libcoff.h.
+
+ * as.h: Include progress.h.
+ * as.c (main): Call START_PROGRESS and END_PROGRESS.
+ (main, perform_an_assembly_pass): Call PROGRESS.
+
+Fri Dec 16 00:46:08 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
+
+ * write.c (adjust_reloc_syms): Use bfd_is_und_section and
+ bfd_is_abs_section rather than comparing against &bfd_und_section
+ and &bfd_abs_section.
+
+Thu Dec 15 15:27:14 1994 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * config/tc-sh.c (md_begin): Use a local variable when
+ initializing md_relax_table to avoid errors about modifying a
+ const data structure.
+
+Tue Dec 13 15:42:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-ppc.c (tc_gen_reloc): Remove OBJ_ELF hack which
+ appears to no longer be needed.
+
+Tue Dec 13 08:04:15 1994 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro_build): Accept BFD_RELOC_PCREL* without
+ requiring that the X_op_symbol be in the text_section.
+ (macro): Change the test for a legel expression difference to
+ correspond to changes in pseudo_set in read.c.
+
+Fri Dec 9 21:04:17 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * write.c (write_relocs) [RELOC_EXPANSION_POSSIBLE]: Use
+ bfd_install_relocation.
+
+ * ecoff.c (ecoff_set_gp_prolog_size): If there is no current
+ routine, just return.
+
+ * config/tc-alpha.c (alpha_ip, case 'B', subcase 'c'): Use opcode
+ value from pattern instead of assuming jsr.
+ * config/alpha-opcode.h (jmp): Add a "1,Bc" form.
+
+Thu Dec 8 17:48:25 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (NM_FOR_TARGET): Use ../binutils/nm.new, not just
+ plain nm.
+
+ * configure.in (ns32k-pc532-mach*): Select correct emulation.
+ (mips-sony-bsd*): Use ecoff.
+ (mips-*-gnu*): New target, using aout format, from Roland McGrath.
+ * configure: Regenerated.
+
+Tue Nov 29 13:58:10 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Use libiberty version of xmalloc:
+ * Makefile.in (REAL_SOURCES): Delete xmalloc.c.
+ (OBJS): Delete xmalloc.o.
+ (xmalloc.o): Delete dependencies.
+ * as.c (main): Call xmalloc_set_program_name once program name is
+ known.
+
+ * config/tc-alpha.c (in_range_signed, in_range_unsigned): New
+ routines, split from in_range.
+ (in_range): Deleted. All calls changed to in_range_*signed.
+ (create_lita_section): Macro deleted. Single use expanded in
+ place.
+ (alpha_ip): Handle `t' and `8' operand types.
+ (md_apply_fix): Handle BFD_RELOC_12_PCREL. Print name of
+ unhandled relocation types.
+ * config/alpha-opcode.h: Added HALT and DRAINA. Disabled MOVI,
+ since it doesn't work, and isn't supported by the native
+ assembler.
+
+ * input-scrub.c: Change wording of a comment to avoid interference
+ with Cygnus source-control tools.
+
+ * as.h (errno) [NEED_DECLARATION_ERRNO]: Declare.
+
+ * config/tc-m68k.c (init_table): List buscr and pcr control
+ registers.
+ (m68k_ip, case 'J'): Handle them.
+
+ Delete signal handler code. It's been disabled since March 1993
+ without complaints.
+ * as.c: Don't include signal.h.
+ (got_sig): Unused function deleted, declaration deleted.
+ (SIGTY): Macro deleted.
+ (main): Deleted disabled code for establishing signal handler.
+
+Mon Nov 28 11:37:35 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * app.c (do_scrub_next_char): Insert missing newline at end of file
+ like warning says we do.
+
+Mon Nov 28 00:11:15 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.h (pa_check_eof): Declare new extern function.
+ (tc_frob_file): Define to call pa_check_eof.
+
+ * config/tc-hppa.c (pa_check_current_space_and_subspace): New
+ function to verify the current space and subspace are reasonable.
+ Call for the appropriate pseudo-ops and before instruction parsing.
+ (pa_check_eof): New function to verify enter/exit and proc/procend
+ pairs match at EOF.
+ (pa_code): Simplify.
+
+ * config/obj-som.c: Delete #if 0 code.
+
+Wed Nov 23 19:36:09 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/obj-coff.h (TARGET_FORMAT): Select between coff-shl and
+ coff-sh.
+ * config/sh.mh (TARG_CPU_DEPENDENTS): Get it right.
+ * config/tc-sh.c (little): New function.
+ (md_parse_option): Notice new option.
+ (build_relax, build_Mytes, md_atof, md_convert_frag, md_apply_fix):
+ Cope with little endian data.
+ * config/tc-sh.h (COFF_MAGIC, LISTING_HEADER): Endian dependent.
+
+Wed Nov 23 10:54:38 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (tc_gen_reloc, ELF variant): Revert last
+ change. The real bug was in bfd/elfcode.h and has been fixed.
+
+Tue Nov 22 23:31:20 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (tc_gen_reloc, ELF variant): Add section->vma
+ to the relocation's offset.
+
+Tue Nov 22 14:37:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * Makefile.in (INSTALL_XFORM): Fix typo.
+
+Tue Nov 22 10:23:25 1994 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config/tc-alpha.c (s_alpha_set): Ignore the .set (no)move and
+ .set (no)volatile directives.
+
+Tue Nov 15 21:44:13 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_subspace): Make sure to always reset
+ current_subspace.
+ (pa_text, pa_data): Likewise.
+
+ * config/tc-hppa.c (pa_align): New function. Aligns the current
+ offset within the current subspace along with updating the
+ alignment of the subspace itself.
+ (pa_subspace): Default alignment to one byte rathern than zero
+ bytes to avoid setting alignment to log2(0).
+ (md_pseudo_table): Use pa_alignment for .align.
+
+Tue Nov 15 15:24:45 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * messages.c (as_fatal): Always put a space after "fatal error:"
+ when printing message.
+
+Tue Nov 15 11:10:43 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.h (obj_frob_symbol): Delete.
+ (tc_frob_symbol): Make definition conditional on OBJ_SOM or
+ OBJ_ELF. For ELF subtract out symbol->section->vma for non common
+ symbols.
+
+Wed Nov 9 14:53:03 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/te-delta.h: New file, derived from te-sysv32.h.
+
+Wed Nov 9 11:52:44 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-ppc.c (ppc_bf): Always set coff_line_base.
+
+Mon Nov 7 01:58:49 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (VERSION): Bump to 2.5.3.
+
+ * configure.in: Compare generic cpu name against "sparc", not
+ "sparc*", since sparc variants should be changed to "sparc".
+ * configure: Regenerated with autoconf 2.1.
+
+ * config/tc-a29k.c (octal, toHex): Variables deleted.
+ (isoctal): Macro deleted.
+ (md_begin): Don't initialize them.
+ (machine_ip, case 'P'/'A'): For absolute operand, generate an
+ error message if it's out of range.
+ (md_apply_fix, case RELOC_JUMPTARG): Check range for PC-relative
+ jumps.
+ (md_apply_fix): Delete code inside "#if 0".
+
+Thu Nov 3 20:20:40 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/go32.mh: Unused file deleted.
+
+ * read.c (get_absolute_expression): Indicate that the error may
+ merely be that the expression can't currently be reduced.
+
+Thu Nov 3 16:09:59 1994 J.T. Conklin (jtc@rtl.cygnus.com)
+
+ * config/tc-m68k.h (TARGET_FORMAT): If TE_NetBSD define as
+ "a.out-m68k-netbsd".
+ * config/tc-sparc.h (TARGET_FORMAT): If TE_NetBSD define as
+ "a.out-sparc-netbsd".
+
+ * config/te-nbsd.h: New file, NetBSD target emulation
+ * config/te-netbsd.h: Removed.
+ * configure.in (i[345]86-*-netbsd*,m68*-*-netbsd*,sparc*-*-netbsd*):
+ Set bfd_gas. Use nbsd emulation.
+
+Thu Nov 3 17:44:47 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Changes from net 2.5.2 release branch:
+
+ * configure.in: Put AC_DEFINE(sparcv9) on its own line, so that
+ the shell variable settings associated with it are permanent. For
+ CPUs requiring bfd_gas=yes, select it based on CPU only, not
+ individual target names. Handle m68k-hp-hpux*, not just -hpux.
+
+ * config/tc-z8k.c (tc_coff_symbol_emit_hook): Add dummy argument
+ to match prototype in obj-coff.h.
+
+ * configure.in: Skip tests for defining WANT_FOPEN_BIN and
+ IBM_COMPILER_SUX.
+ * acconfig.h: Deleted them.
+ * configure, conf.in: Rebuild with autoconf 2.0.
+ * config/go32.cfg, config/vms-conf.h: Updated.
+
+ * config/tc-m68k.c (md_apply_fix_2, md_convert_frag_1): Always use
+ IBM_COMPILER_SUX version of code, with comments indicating why.
+
+ * listing.c (file_info): Use text mode when opening file for read.
+ Use "r" directly, no macro.
+ * input-file.c (input_file_open): Don't use FOPEN_RT, just use
+ "r".
+ * read.c (s_include): Ditto.
+ * output-file.c (output_file_create): Try both "wb" and "w", don't
+ bother with FOPEN_* macros.
+ * as.h: Don't include fopen-*.h.
+
+ * config/alpha-opcode.h: Make "ret" with no operands equivalent to
+ "ret zero,(ra)", to match OSF1 and to be consistent with both
+ one-operand forms.
+
+ Patches from DJ Delorie:
+ * as.h (alloca): undef alloca before defining it just in case
+ * config/go32.cfg: new file for autoconf values
+ * config/te-go32.h: new file
+ * configure.bat: new for autoconf
+
+ * config/tc-i386.c (md_assemble): Fix typo in GOTPC check; had =
+ for ==.
+
+ * configure.in: If target_frag doesn't exist, use /dev/null.
+
+ * as.c (parse_args): For non-VMS systems, re-add `v' to
+ std_shortopts. Add "verbose" to list of long options.
+
+ * write.c (adjust_reloc_syms): When generating an absolute section
+ symbol as a placeholder, don't mark it as used in a relocation
+ entry, here.
+
+ * Makefile.in (comparison): Compare using makefile code from gcc,
+ stripped down to discard subdir stuff and adapted to give a
+ non-zero exit status if either file differs.
+
+Thu Nov 3 15:43:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (load_address): Fix RELAX_ENCODE arguments for
+ NO_PIC case.
+
+Tue Nov 1 16:10:59 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (s_change_sec): If not GPOPT, don't permit
+ switching to the readonly data section.
+
+ * ecoff.c (ecoff_directive_type): Fix warning message.
+
+Sun Oct 30 00:57:35 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_proc): Delete disabled code to put each
+ proc in its own subspace, we're not going to use it.
+
+Tue Oct 25 14:44:33 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (macro): Ensure that mips2 case of M_LI_DD in
+ .rdata does not become a variant frag.
+
+ * config/tc-mips.c (mips_cpu): Initialize to -1.
+ (md_begin): Don't mips_cpu if it was already set.
+ (md_parse_option): For -mipsN, don't set mips_cpu if it was
+ already set. For -mcpu=, just set mips_cpu, not mips_isa.
+
+Fri Oct 21 20:42:29 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (md_pseudo_table): If OBJ_ELF, handle .section.
+ (s_elf_section): New static function.
+ * ecoff.c (ecoff_build_symbols): Don't abort if we don't recognize
+ the section when setting the storage class; default to sc_Data.
+
+Thu Oct 20 00:43:38 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Set new_val to 8 for all
+ fixups to branch instructions (not just pc-relative ones) which
+ will generate SOM relocations.
+
+Wed Oct 19 13:41:56 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-a29k.c: Include ctype.h with angle brackets.
+ (define_some_regs): Add new special register names defined on the
+ 29040.
+ (parse_operand): Add argument opt. If non-zero, don't warn about
+ a missing operand.
+ (machine_ip): If handling argument type 'I', pass opt as non-zero
+ to parse_operand. Handle new optional operand type 'I'.
+ (md_undefined_symbol): Handle special register names (srNN).
+
+Tue Oct 18 00:45:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * write.c (renumber_sections): New static BFD_ASSEMBLER function.
+ (write_object_file): Call it after removing gas created sections.
+
+Mon Oct 17 18:06:05 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * symbols.c (symbol_create): Use udata.p, not just udata.
+ * config/obj-elf.c (obj_ecoff_set_ext): Likewise.
+ (elf_get_extr): Likewise.
+
+ * read.c (read_a_source_file): The second argument to as_where is
+ unsigned int *, not int *.
+
+Mon Oct 17 02:26:32 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Eliminate all uses of fx_addnumber.
+ (tc_gen_reloc): Simplify. It's no longer necessary to set a
+ reloc's addend field to zero for function symbols.
+ (md_apply_fix): Simplify. For fixups which will require a SOM
+ reloc, just clear out the necessary bits in the output file.
+
+Fri Oct 14 19:06:46 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (BISON): Use bison -y, not bison.
+
+Thu Oct 13 19:22:54 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (VERSION): Updated to 2.5.
+ (clean-here): Delete stamp-mk.com.
+ (distclean): Delete .gdbinit.
+ * Version 2.5 released.
+
+Wed Oct 12 20:30:51 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/te-nbsd532.h: Renamed from te-netbsd532.h.
+ * configure.in, configure: Adjusted.
+
+Wed Oct 12 16:33:38 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * config/cplus-dem.c: Removed. It isn't used. Even if it was,
+ it's better to use the one in libiberty.
+
+Wed Oct 12 18:48:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * symbols.c (resolve_symbol_value, case O_symbol): Undo last
+ change; it breaks the rs6000 support, and doesn't seem to be
+ needed.
+
+Wed Oct 12 11:56:50 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * config/tc-i386.h,te-netbsd532.h (TARGET_FORMAT): Changed to
+ a.out-<arch>-netbsd to match corresponding changes in BFD.
+
+Wed Oct 12 11:06:11 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-ppc.c (ppc_fix_adjustable): Resolve symbol values
+ rather than explicitly adding the frag address.
+ * config/obj-coff.c (coff_frob_symbol): Add a zero entry to mark
+ the end of the line numbers; this replaces the zero entry which
+ used to be added by coff_add_linesym, removed Oct 7.
+ (coff_adjust_section_syms): Ignore sections with no seginfo.
+
+Wed Oct 12 01:41:37 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (bootstrap, bootstrap2, bootstrap3): Create a
+ "stage" symlink to the appropriate stage* directory, and use it
+ instead in the -B options.
+ (comparison): Revert yesterday's change.
+
+Tue Oct 11 16:48:11 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-sparc.c (tc_gen_reloc): For non-a.out relocations, if
+ pc-relative, use fx_offset only, ignore address of relocation.
+
+Tue Oct 11 15:24:00 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/tc-mips.c (mips_ip): Don't use S_IS_LOCAL when checking
+ for an embedded PIC switch expression, since the definition of
+ S_IS_LOCAL was changed.
+
+Tue Oct 11 15:05:11 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * Makefile.in (comparison): When comparing as.new or gasp.new, try
+ running the binary through sed to avoid differences due to
+ "stage1" or "stage2" having been written into the binary.
+
+Sat Oct 8 01:48:04 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ ELF symbol size handling, based on code from Eric Youngdale:
+ * config/obj-elf.h (OBJ_SYMFIELD_TYPE): New macro. Adds an
+ expression pointer to the symbol structure, used for `size'
+ expressions that couldn't be reduced to constants when initially
+ processed.
+ (elf_frob_symbol): Declare.
+ (obj_frob_symbol): Call elf_frob_symbol always, rather than
+ ecoff_frob_symbol only if ECOFF_DEBUGGING defined.
+ * config/obj-elf.c (obj_symbol_new_hook): Deleted unused code.
+ Clear sy_obj field.
+ (obj_elf_size): Deleted unused code. If size is non-reducible
+ expression, allocate some storage for the sy_obj field and copy
+ the expression.
+ (elf_frob_symbol): New function. Computes sizes, calls
+ ecoff_frob_symbol if appropriate.
+
+ * write.c (fixup_segment): For i386 elf and coff (for now), don't
+ add in value of symbol from another defined section of the file.
+
+Fri Oct 7 17:54:02 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/tc-m88k.h (TC_KEEP_FX_OFFSET): Define.
+ * config/obj-coff.c (do_relocs_for): Test only TC_KEEP_FX_OFFSET,
+ rather than both it and TC_M88K.
+ (coff_adjust_section_syms): New function.
+ (coff_frob_section): For non-empty sections, create aux entry for
+ the section symbol, indicating the size.
+ (n_line_nos): New variable.
+ (add_lineno): Increment it.
+ (coff_add_linesym): Increment n_line_nos, don't call add_lineno.
+ (coff_frob_file): New function; map coff_adjust_section_syms over
+ sections.
+ (obj_coff_line): Only reset line_base for .bf symbols.
+ * config/obj-coff.h (coff_adjust_section_syms, coff_frob_file):
+ Declare.
+ (obj_frob_file): New macro.
+
+ * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Renamed from
+ obj_frob_forward_symbol, and rewritten for new parameter list.
+
+ Mon Oct 3 21:02:38 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.h (S_IS_LOCAL): fix obsolete flagseen[] reference.
+
+Wed Oct 5 11:49:26 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * config/obj-ecoff.c (obj_pseudo_table): Accept .esize and .etype
+ as synonyms for .size and .type.
+
+Wed Oct 5 00:08:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-coff.c (coff_frob_section): Remove assert about
+ section alignment.
+ * config/tc-sparc.c (md_section_align): Use section alignment, not
+ xvec align_power_min field.
+
+Fri Sep 30 19:05:20 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * vmsconf.sh (make-gas.com): handle DCL verification to enable
+ sensible feedback to the user while gas is being built.
+
+Fri Sep 30 16:23:31 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (DISTSTUFF): New variable, listing only make-gas.com
+ for now.
+ (diststuff): New target; builds DISTSTUFF.
+ (realclean): Separate target, depend on clean and distclean, then
+ delete DISTSTUFF.
+ * make-gas.com: Deleted.
+
+ * config/tc-i386.c (i386_validate_fix) [BFD_ASSEMBLER]: New
+ function. Converts reloc for "foo-GOT" to BFD_RELOC_386_GOTOFF
+ reloc for "foo".
+ (i386_operand): Don't look up section symbol for
+ undefined_section.
+ (reloc): Always permit return of 8- and 16-bit relocation types.
+ Add a space after "pc-relative" in the error message.
+ (tc_i386_fix_adjustable) [BFD_ASSEMBLER]: Reject
+ BFD_RELOC_386_GOTOFF relocs.
+ (i386_operand): For any GOTOFF reloc, convert it to a BFD_RELOC_32
+ with a "foo-GOT" value.
+ * config/tc-i386.h (i386_validate_fix): Declare it.
+ (TC_VALIDATE_FIX): New macro -- call it.
+ (NOP_OPCODE): Cast to `char' to avoid compiler warnings.
+
+ * as.h: If __STDC__ is not defined and varargs.h is available, use
+ it rather than stdarg.h.
+
+ * write.h (struct fix): Added new bitfield fx_plt, for fixups
+ referring to PLT entries.
+ * write.c (fix_new_internal): Initialize fx_plt to zero.
+ (adjust_reloc_syms): Re-fetch `sym' after top of reduction loop.
+ Don't adjust fx_offset by frag address, since S_GET_VALUE now
+ includes the frag address.
+ (fixup_segment): Changed local var PCREL to type int, added PLT.
+ If PC-relative fixup refers to a PLT entry for a symbol in the
+ current section, don't reduce it.
+
+ * write.c (adjust_reloc_syms): Exit loop through a label. If
+ DEBUG5 is defined, print out each fixup before and after
+ processing.
+ (fixup_segment): If DEBUG5 is defined, print out each fixup before
+ and after processing.
+ (print_fixup): Added prototype. Show address on first line. Show
+ fx_offset and fx_subsy. [!BFD_ASSEMBLER]: Only show fx_r_type if
+ NEED_FX_R_TYPE is defined.
+
+ * symbols.c (print_symbol_value_1): Check S_IS_LOCAL, S_IS_EXTERN,
+ S_IS_DEBUG, S_IS_DEFINED also.
+
+Thu Sep 29 18:57:06 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * Makefile.in (all): Depend on .gdbinit.
+ (.gdbinit): Rebuild from gdbinit.in by running config.status.
+
+ * gdbinit.in: Define new function "pf". Fix doc on "pe" and "ps".
+
+ * write.c (print_fixup): Print source location on first line.
+ Show fx_r_type and fx_addsy fields.
+
+Wed Sep 28 14:56:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * configure.in: Set bfd_gas for all sparc targets in one place,
+ instead of separately for each. Correctly handle user-supplied
+ "--enable-bfd-gas" option.
+
+ * gdbinit.in: Move "break abort" to end, in case gdb complains.
+
+ * as.h (PRINTF_WHERE_LIKE, PRINT_LIKE) [USE_STDARG, !__GNUC__]:
+ Use PARAMS macro.
+
+ * symbols.c (resolve_symbol_value, case O_symbol): Don't do any
+ processing if add_symbol is undefined or in expr_section.
+ (resolve_symbol_value, case O_add): For symbol plus
+ constant-valued symbol, convert to O_symbol and re-reduce.
+ (S_GET_VALUE): If symbol needs resolving, resolve it.
+ (indent_level): No longer static.
+ (print_symbol_value_1): Don't print frag address if it matches
+ zero_address_frag. Don't print "resolving" if already resolved.
+ Print segment name. Don't call print_expr_1 on an undefined
+ symbol.
+ (print_expr_1): Fix whitespace before printing X_add_number.
+
+ * expr.c (make_expr_symbol): No longer static. Use symbol_create,
+ not symbol_new, for symbols holding expression values.
+ * expr.h (make_expr_symbol): Move declaration here.
+ * write.c (fix_new_exp): Handle O_add by creating an
+ expression-valued symbol, and calling fix_new_exp recursively.
+ (adjust_reloc_syms): If a fixup's symbol value is a sum of an
+ undefined symbol and a constant, fold the constant into the fixup,
+ and refer to the undefined symbol directly. Then process the
+ fixup again from scratch.
+ (write_object_file): Before calling adjust_reloc_syms, make a pass
+ through the symbol list trying to resolve values.
+
+ * write.c (print_fixup): New routine, for debugging.
+ (write_relocs): Call bfd_install_relocation. Deleted various
+ hacks for working around problems with bfd_perform_relocation.
+
+ * Makefile.in (VERSION): Update to 2.4.90.
+
+Wed Sep 28 11:50:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * Makefile.in (gasp.o): Depends upon config.h.
+
+ * config/tc-mips.c: Include subsegs.h.
+ (md_apply_fix): If an unconditional b or bal overflows, and we are
+ not assembling PIC code, replace it with a j or jal.
+
+ * config/tc-mips.c (md_apply_fix): Correct branch overflow test.
+ Use as_bad_where and as_warn_where rather than as_bad and as_warn.
+
+Mon Sep 26 17:15:59 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * write.c (write_relocs): Add file name and line number to
+ as_fatal calls. Handle bfd_reloc_overflow case specifically when
+ RELOC_EXPANSION_POSSIBLE.
+
+Fri Sep 23 16:11:28 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * as.h (USE_STDARG, USE_VARARGS): Define one or neither of these
+ here. Use them for deciding which PRINTF*LIKE macro definitions
+ to use.
+ * messages.c: Use them, instead of NO_STDARG, NO_VARARGS.
+ [!USE_STDARG && !USE_VARARGS] (va_alist, va_dcl, ...): Provide
+ default definitions matching what we were doing before.
+ (as_tsktsk): Remove the non-stdarg, non-varargs version, and
+ always use the varargs form if not using stdarg. It's safe to
+ always use vfprintf, because libiberty will provide it if the
+ native system doesn't. Also, always make format be const.
+ (as_warn, as_warn_where, as_bad, as_bad_where, as_fatal): Ditto.
+
+Fri Sep 23 14:42:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.c (load_register): Always use addiu when adding a
+ constant to $zero--no need to use daddiu.
+ (macro): Hack the -mips3 overflow tests to not fail when offsetT
+ is only 32 bits.
+
+ * symbols.h (copy_symbol_attributes): Declare.
+
+Thu Sep 22 21:58:24 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * listing.c: Bugfixes based in part on patches from Paul
+ Kranenburg.
+ (listing_newline): Check filename as well as line number when
+ deciding whether to record it.
+ (list_symbol_table) [S_IS_REGISTER]: Check that S_IS_REGISTER is
+ false (if defined) as well as checking for reg_section.
+ (listing_listing): Iterate fetching lines while line number is too
+ low, and we haven't run off the end of the input file.
+
+ * config/vms-conf.h: Changed HAVE_DELETE to HAVE_REMOVE.
+
+Thu Sep 22 13:39:10 1994 Kung Hsu (kung@x1.cygnus.com)
+
+ * ecoff.c (ecoff_generate_asm_lineno): check if
+ current_stabs_filename is NULL before strcmp.
+ * read.c (read_a_source_file): fix a bug in generate_asm_lineno
+ checking.
+
+Wed Sep 21 18:17:35 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * config/ho-*.h: Now-unused files deleted.
+
+ * symbols.c (copy_symbol_attributes): New function. Copies BFD
+ symbol flags and calls OBJ_COPY_SYMBOL_ATTRIBUTES.
+ (resolve_symbol_value, case O_symbol): Call it, if X_add_number is
+ zero. Don't call obj_frob_forward_symbol.
+ * read.c (pseudo_set): Call copy_symbol_attributes, but only if
+ X_add_number is zero.
+ * config/obj-elf.h (obj_frob_forward_symbol): Deleted.
+
+ * config/tc-i960.c: Lots of whitespace, comment reformatting,
+ using GNU indent.
+ (strchr): Don't declare.
+ [BFD_ASSEMBLER]: Don't compile md_convert_frag,
+ md_estimate_size_before_relax, md_ri_to_chars,
+ md_create_short_jump, md_create_long_jump.
+ (brtab_emit): Use data_section, not SEG_DATA.
+
+ Mon Sep 19 17:14:44 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/vms-conf.h: new file, manually derived from conf.in.
+ * config-gas.com: use it, and eliminate obsolete "host.h".
+
+Wed Sep 21 11:11:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-ppc.c (ppc_current_block): New static variable.
+ (ppc_stabx): Set sy_tc.within of a C_STSYM symbol to
+ ppc_current_block. Don't move around any stab symbol, just those
+ for common symbols.
+ (ppc_bs): Set ppc_current_block.
+ (ppc_es): Clear ppc_current_block.
+ (ppc_frob_symbol): Set the value of a C_STSYM symbol to the offset
+ from the csect of the enclosing block.
+
+ * config/tc-mips.c (insns_since_cache_access): Remove.
+ (append_insn): Remove setting of insns_since_cache_access, and
+ special 4600 handling; it turns out not to be required.
+
+Tue Sep 20 16:13:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.c (md_shortopts): Remove E.
+ (md_longopts): Add EB and EL.
+ (md_parse_option): Handle -EB and -EL as separate options, rather
+ than as a single -E option with an argument.
+
+Mon Sep 19 12:42:05 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (hppa_fix_adjustable): Reject reductions
+ involving global symbols too.
+
+Mon Sep 19 12:12:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * as.h: Test NEED_DECLARATION_*, not NEED_*_DECLARATION.
+
+ * configure.in: Test for remove, not delete. Fix cross-assembler
+ test.
+ * as.h: Test HAVE_REMOVE, not HAVE_DELETE; define unlink to
+ remove, not delete.
+
+ * read.c (pseudo_set, case O_symbol): If
+ OBJ_COPY_SYMBOL_ATTRIBUTES is defined, invoke it.
+ [BFD_ASSEMBLER]: Copy BSF_FUNCTION setting too.
+ * config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Define.
+
+ Wed Aug 10 19:15:30 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.h (DSG_S_C_UBITU, DST_K_VFLAGS_DSC, DST_K_TS_ATOM,
+ many others): new macros; values obtained from "DSTRECRDS.SDL".
+ * config/obj-vms.h (various): use them.
+ (USE_BITSTRING_DESCRIPTOR): new macro, for selecting bitfield
+ representation (only enum bitfields can avoid being bitstrings).
+ (bitfield_suffix, setup_basic_type): new routines.
+ (VMS_typedef_parse): use them. Now recognize bitfields of all
+ integral types, not just type `int'. Caveat: the representation
+ used for bitfields still does not work for objects placed in
+ registers, and gcc's optimizer sometimes puts small structs there.
+
+ Tue Jun 14 17:31:44 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * read.c (s_text) [#if OBJ_VMS]: clear the IN_DEFAULT_SECTION
+ bit from const_flag.
+ * config/obj-vms.h (IN_DEFAULT_SECTION): define this macro.
+ (tc_frob_label): define this to call vms_check_for_special_label,
+ and declare the latter.
+ * config/obj-vms.c (vax_g_doubles): declare this file-scope
+ variable.
+ (const_flag): initialize to IN_DEFAULT_SECTION instead of 0.
+ (vms_check_for_special_label): new routine (tc_frob_label).
+ (VMS_TBT_Routine_End): don't bother checking for `gcc_compiled.'
+ and `gcc2_compiled.' labels; they won't reach here any more.
+ (VMS_typedef_parse) [case 'r']: for types `double' and `complex
+ double', use `vax_g_doubles' flag to select type of double.
+ (VMS_write_object_file) [traceback setup]: don't pass symbols
+ with the IN_DEFAULT_SECTION attribute to the TBT_Routine_Begin
+ and TBT_Routine_End functions.
+
+ Mon Jun 6 20:52:20 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.c (VMS_TBT_Routine_End): cache the result of
+ S_GET_VALUE() to avoid many repeated function calls.
+ (VMS_Check_For_Main) [#if HACK_DEC_C_STARTUP]: capitalize
+ _C$MAIN_ARGS in advance, in case -h3 (leave symbol name as-is)
+ gets requested. [All the HACK_DEC_C_STARTUP code appears to
+ be obsolete; gcc does it automatically for vms target. It's
+ also misnamed, because it is for the "VAX C" run-time library,
+ not the newer "DEC C" one which has much different startup code.]
+ {various}: use `S_SET_xxx(symbol,new_value)' rather than
+ `S_GET_xxx(symbol) = new_value'.
+
+Mon Sep 19 12:05:03 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-coff.c (c_dot_file_symbol): Use bfd_abs_section_ptr,
+ not &bfd_abs_section.
+
+Thu Sep 15 18:36:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * expr.c (clean_up_expression): Use addressT, not bfd_vma.
+
+Tue Sep 13 20:05:47 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * expr.c (expr): Don't reduce the difference of two symbols in the
+ same frag if the symbols are not in normal sections.
+
+ * config/obj-som.h (S_SET_OTHER, S_SET_TYPE): Delete a.out crud.
+ (S_SET_DESC, S_GET_OTHER, S_GET_TYPE, S_GET_DESC): Likewise.
+ (obj_attach_unwind_info): Do not define. Not needed anymore.
+ * config/tc-hppa.c: Delete whitespace at EOL.
+ (struct hppa_fix_struct): Delete fx_unwind field and all references.
+ (fix_new_hppa): Last arg is now a pointer to an int. Do not
+ call obj_attach_unwind_info anymore. For SOM R_ENTRY and R_EXIT
+ fixups, store 32bits of unwind information in the fx_addnumber
+ field of the fixup.
+ (md_assemble, pa_entry, process_exit, pa_procend): For SOM R_ENTRY
+ and R_EXIT fixups, pass a NULL pointer to fix_new_hppa, and a
+ pointer to 32 bits of unwind info.
+ (tc_gen_reloc): For SOM R_ENTRY and R_EXIT fixups, set the symbol
+ pointer to the dummy symbol; set the addend field to fx_addnumber.
+ (pa_comm, pa_equ, pa_type_args, pa_import): Use bfd_XXX_section_ptr
+ rather than &bfd_XXX_section.
+
+Tue Sep 13 21:15:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-i386.c (md_apply_fix_1): For GOTPC relocs, decrement
+ value by one; discard adjustments previously being made. From
+ Eric Youngdale.
+
+ VMS- and Vax-related changes from Pat Rankin:
+ * Makefile.in (VMS_OTHER_OBJS): add concat, getopt, and getopt1.
+ * vmsconf.sh: no longer have make-gas.com echo text about needing
+ to modify the gcc-vms driver when intending to use with gcc 1.x.
+ * as.c (parse_options): suppress 'v' from std_short_options and
+ eliminate VMS-specific conditional initialization;
+ [default case]: check for '-v' if md_parse_options doesn't recognize
+ an option;
+ [default case, #if VMS]: check for filename argument when '-v' seen;
+ [case 'v']: delete.
+ * config/tc-vax.c (md_assemble): don't rely on `this_add_number'
+ for O_big literal operands (double floats and long long ints);
+ [VMS, md_shortopts]: add second colon after 'v';
+ (md_parse_options) [VMS, case 'v']: check for argument, so
+ caller can handle `-v' w/o arg.
+
+Tue Sep 13 16:45:08 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/obj-coff.c (do_relocs_for): If TC_KEEP_FX_OFFSET
+ is defined, put the tx_offset into the r_offset.
+ * config/tc-sh.c (line_comment_chars): Add #
+ (tc_reloc_mangle): Deleted.
+ * config/tc-sh.h (TC_KEEP_FX_OFFSET): Define.
+ (TC_RELOC_MANGLE): Delete.
+
+Tue Sep 13 16:20:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * flonum-konst.c: Change preprocessor tests of HO_VMS to just VMS.
+ * hex-value.c: Ditto.
+ * config/obj-vms.c: Ditto.
+
+ * config/tc-sparc.c (sparc_ip): Replace as_bad/exit sequence with
+ a call to as_fatal.
+ * config/tc-i860.c (i860_ip): Ditto.
+ * config/tc-hppa.c (pa_ip): Ditto.
+ * config/tc-alpha.c (alpha_ip): Ditto.
+ * as.c (parse_args): Ditto.
+
+ * config/tc-mips.c (mips_ip): Replace as_warn/exit sequence with a
+ call to as_fatal.
+
+ * write.c (write_contents): Use EXIT_FAILURE.
+ * output-file.c (output_file_create, output_file_close,
+ output_file_create, output_file_close): Ditto.
+ * messages.c (as_fatal): Ditto.
+ * config/obj-som.c (obj_som_version, obj_som_copyright): Ditto.
+ * config/obj-ieee.c (write_object_file): Ditto.
+ * config/obj-coff.c (write_object_file): Ditto.
+ * config/tc-vax.c (main): Use EXIT_SUCCESS.
+ * config/tc-m68k.c (main): Ditto.
+
+ * hash.c (main): Pass a value to exit().
+
+ * as.h (EXIT_SUCCESS, EXIT_FAILURE): Moved here.
+ * as.c: ...from here.
+ (parse_args): Use them always.
+ (main): Use exit rather than return.
+
+ * Makefile.in (*_FOR_TARGET, INSTALL_XFORM, install, uninstall):
+ Rewrite handling of program_transform_name.
+
+ * configure.in: Test for functions unlink and delete.
+ * as.h: If unlink isn't available but delete is, define unlink to
+ be delete.
+
+ Update for autoconf 1.118:
+ * gdbinit.in: New file, created from old .gdbinit.
+ * .gdbinit: Deleted.
+ * aclocal.m4 (GAS_GDBINIT): Deleted.
+ * configure.in: Don't use it. Instead, generate .gdbinit from
+ gdbinit.in. Don't substitute cpu_type, obj_format, emulation,
+ atof. Switched order of AC_LINK_FILES arguments. Use AC_PREREQ
+ to ensure that older versions of autoconf aren't used.
+ * Makefile.in: Added @configure_input@ line.
+ (configure): Deleted rule.
+
+Tue Sep 13 12:08:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-coff.c (fixup_segment): After handling the difference
+ of two symbols from the same segment, set fx_subsy to NULL, to
+ satisfy existing TC_COUNT_RELOC macros.
+
+Tue Sep 13 01:47:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * aclocal.m4 (GAS_GDBINIT): New macro.
+ * configure.in: Use it.
+ * configure: Regenerated.
+
+Mon Sep 12 20:56:38 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com)
+
+ * .gdbinit (pe, ps): Define new commands.
+ * symbols.c (indent_level): New static variable.
+ (indent, print_expr_1, print_symbol_value_1, print_symbol_value,
+ print_expr): New functions.
+
+ * Makefile.in (config-stamp): Add a "this file generated by make"
+ message to config.h.
+
+ PIC implementation for i386-linux, based on code from Eric
+ Youngdale and Paul Kranenburg, with some work of my own:
+
+ * write.c (fixup_segment): Test TC_RELOC_RTSYM_LOC_FIXUP on fixup
+ before processing same-section pcrel relocations.
+ (TC_RELOC_RTSYM_LOC_FIXUP): Default to 1.
+
+ * expr.c (make_expr_symbol): If operator is O_symbol and
+ X_add_number is zero, just return the symbol. If operator is
+ O_constant, resolve the symbol's value before returning.
+ (operand): Permit use of "[]" for grouping.
+ (clean_up_expression): For difference of two symbols in the same
+ frag, add the difference of their offsets into X_add_number.
+ (expr): Reduce difference of two symbols in same frag to their
+ difference.
+
+ * config/tc-i386.c (TC_RELOC): New macro.
+ (struct _i386_insn): New field disp_reloc.
+ (GOT_symbol): New variable.
+ (operand_special_chars): Added square-brackets and at-sign.
+ (reloc) [BFD_ASSEMBLER]: Added new argument OTHER; if it is not
+ NO_RELOC, just return it.
+ (reloc) [! BFD_ASSEMBLER]: Add third argument to dummy macro.
+ (BFD_RELOC_386_PLT32, _GOT32, _GOTOFF) [! BFD_ASSEMBLER]: More
+ dummy macros.
+ (tc_i386_fix_adjustable): New function. Returns zero if symbol in
+ fixup is not local, to prevent relocations against externals from
+ being dropped.
+ (md_assemble): Initialize disp_reloc field to NO_RELOC. Pass
+ disp_reloc field to reloc() function, and use TC_RELOC to generate
+ value to pass to fix_new_exp.
+ (md_assemble): Change 32-bit reloc against GOT_symbol into a GOTPC
+ reloc.
+ (i386_operand): Initialize disp_reloc field to NO_RELOC. Handle
+ @GOTOFF, @PLT, @GOT operands. For GOTOFF relocations with local
+ symbols, force generation of the section symbol.
+ (md_estimate_size_before_relax): If GOT_symbol exists, decide
+ we're generating PIC code, and convert relocations against
+ undefined symbols from PCREL to PLT32.
+ (md_apply_fix_1) [OBJ_ELF]: Fix up values for dynamic-linking
+ relocs.
+ (md_undefined_symbol): Notice GLOBAL_OFFSET_TABLE_NAME and set
+ and return GOT_symbol if it matches.
+ (F, MAP): Move macro definitions outside function.
+ (tc_gen_reloc): Only switch on size and pcrel if code wasn't
+ already supplied as PLT32. GOT32, GOTOFF, or GOTPC. Convert
+ BFD_RELOC_32 using GOT_symbol into GOTPC.
+ * config/tc-i386.h (TC_RELOC, tc_fix_adjustable,
+ TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): New
+ macros.
+ (NEED_FX_R_TYPE): Define.
+ (LOCAL_LABEL): Accept ".X" prefix too.
+ (GLOBAL_OFFSET_TABLE_NAME): Default to "_GLOBAL_OFFSET_TABLE_".
+
+Mon Sep 12 17:51:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_type): Rewrite to accept syntax
+ reportedly to be used on Irix 6.
+
+ * config/tc-mips.c (md_pseudo_table): Handle .globl and .global.
+ (s_mips_globl): New static function; needed for Irix 5 support.
+ * ecoff.c (ecoff_build_symbols): If BSF_FUNCTION is set for an
+ external symbol with no type, set the type to st_Proc rather than
+ st_Global. Don't set the index of an external st_Proc or
+ st_StaticProc symbol unless it is also a local symbol.
+
+ * read.c (read_a_source_file): The second argument to as_where is
+ unsigned int *, not int *.
+
+Thu Sep 8 17:18:24 1994 Kung Hsu (kung@mexican.cygnus.com)
+
+ * config/obj-ecoff.h : Change names to OBJ_GENERATE_ASM_LINENO,
+ and generate_asm_lineno.
+ * config/obj-elf.h : ditto.
+ * read.h : ditto.
+ * read.c (read_a_source_file): if no file when inst is read, set
+ generate_asm_lineno to true.
+ * ecoff.h : change name to generate_asm_lineno and add function
+ ecoff_no_current_file.
+ * ecoff.c : change name to generate_asm_lineno.
+ * ecoff.c (ecoff_generate_asm_lineno) : new function, to generate
+ ecoff style line for asm file.
+
+Thu Sep 8 19:43:49 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-coff.c (size_section): Do an fprintf to stderr rather
+ than a printf.
+ (fixup_segment): Use as_bad_where rather than as_bad.
+
+Wed Sep 7 17:21:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/tc-{h8300,sh}.[ch] (tc_coff_symbol_emit): Function doing
+ nothing becomes macro doing nothing.
+
+Wed Sep 7 19:10:09 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * Makefile.in (Makefile): Depend on config.status.
+ (config.status): Run config.status from . instead of srcdir.
+
+ * config/tc-i386.c (tc_gen_reloc): Use bfd_get_reloc_code_name to
+ display the name of the relocation type that couldn't be handled.
+ * config/tc-sparc.c (tc_gen_reloc): Likewise.
+ * config/tc-alpha.c (tc_gen_reloc): Likewise. Deleted abort call
+ after call to as_fatal.
+
+ * configure.in (i386-*-linux*): Don't set bfd_gas.
+
+ * Makefile.in (CC_FOR_TARGET, NM_FOR_TARGET, OBJDUMP_FOR_TARGET,
+ install, uninstall): Don't use "brokensed" hack any more, the new
+ autoconf code should never let program_transform_name be empty.
+
+ Update for autoconf beta 1.112:
+ * aclocal.m4 (GAS_CHECK_DECL_NEEDED, GAS_WORKING_ASSERT): New
+ macros.
+ * configure.in: Use them. Use AC_ARG_PROGRAM (now provided by
+ autoconf) instead of my hacked-up AC_PROGRAM_TRANSFORM_NAME. Move
+ test for CROSS_COMPILE just before AC_FUNC_ALLOCA, and emit a
+ message to try to ease confusion about autoconf's
+ "cross-compiling" message.
+ * acconfig.h (NEED_DECLARATION_MALLOC, NEED_DECLARATION_FREE,
+ NEED_DECLARATION_ERRNO): Renamed from NEED_*_DECLARATION.
+ * configure, conf.in: Regenerated.
+
+Wed Sep 7 12:49:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure.in: Check ${host} and ${target} rather than
+ ${host_canon} and ${target_canon}.
+ * configure: Likewise.
+
+Tue Sep 6 11:42:38 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.c (mips_cpu): New static variable.
+ (insns_since_cache_access): New static variable.
+ (md_begin): Set mips_cpu as well as mips_isa.
+ (append_insn): If mips_cpu is 4600, require four nop instructions
+ between an instruction which accesses the cache and certain CACHE
+ instructions. Keep track of the number of instructions seen since
+ an instruction which accesses the cache.
+ (md_parse_option): Set mips_cpu as well as mips_isa.
+
+Mon Sep 5 07:09:00 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * doc/Makefile.in (VPATH): Define using @srcdir@.
+ (prefix, program_transform_name, exec_prefix): Use autoconf style
+ @-substitutions.
+
+Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+
+ * config/ho-riscix.h, config/tc-arm.c, config/tc-arm.h: New files
+ * configure.in: Recognize the arm.
+
+Fri Sep 2 16:05:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * ecoff.c (add_file): Don't try to generate line numbers if the
+ symbol table has been frozen.
+
+Thu Sep 1 19:48:01 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * aclocal.m4 (AC_PROG_CC): Use AC_DEFUN, and omit AC_PROVIDE.
+
+ * configure.in: Handle user-specified bfd-assembler option with
+ separate variable from preferred configuration, until the two are
+ resolved. Indicate bfd_gas=preferred for linux a.out. Use
+ AC_PROGRAM_TRANSFORM_NAME, for which a patch has been sent to djm.
+ * Makefile.in (target_alias, program_transform_name): Define,
+ using autoconf @-substitutions.
+
+Wed Aug 31 17:43:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * atof-generic.c: Deleted alloca handling here.
+
+ * Makefile.in (prefix, exec_prefix): Use @-subtitutions.
+
+ * aclocal.m4 (AC_OUTPUT_LINKS): Deleted redefinition, since
+ autoconf 1.109 has this fixed.
+ * configure.in: Don't change quote characters around AC_MSG_ERROR
+ invocation. Don't use AC_HEADER_STDC, since it requires running a
+ program. Cache NEED_*_DECLARATION values.
+ * configure, conf.in: Regenerated with a modified autoconf 1.109.
+
+ * as.h (volatile): Don't test or define here; not needed.
+ (alloca): Replace alloca-conf.h inclusion with code recommended in
+ autoconf documentation. Include config.h first.
+
+Wed Aug 31 11:20:48 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-coff.h (S_IS_DEFINED): Absolute symbols are defined
+ also.
+
+ * configure.in, configure: Initialize bfd_gas to no.
+
+Tue Aug 30 19:31:14 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * as.h: Include alloca-conf.h from "libiberty", not
+ "../libiberty".
+
+Mon Aug 29 16:11:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-ppc.c (md_apply_fix): Don't generate a reloc when a
+ symbol is used as an offset into a CSECT that is not a TOC. These
+ types of loads are generated by gcc -mminimal-toc.
+
+Sun Aug 28 13:22:52 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * as.h (flag_*): Added comments describing meanings of some of
+ these variables.
+ (struct frag): Add some comments about the ns32k-specific fields
+ and why they're here.
+ (SIZEOF_STRUCT_FRAG): Cast addresses to char*, not int.
+ (flag_print_statistics): Declare.
+
+ * as.c (parse_args): Set flag_print_statistics instead of
+ statistics_flag. Options array is now const. Added new option
+ "dump-config"; if specified, print TARGET_ALIAS, TARGET_CANONICAL,
+ TARGET_CPU, TARGET_OBJ_FORMAT, and TARGET_FORMAT, if defined.
+ (main): Change test to check flag_print_statistics.
+ (statistics_flag): Deleted.
+
+ * frags.c (frag_variant): Removed PCREL_ADJUST and BSR arguments.
+ Always initialize them to zero.
+ * frags.h (frag_variant): Fixed prototype.
+ * config/tc-i960.c (get_cdisp): Don't pass the extra zero args.
+ * config/tc-ns32k.c (convert_iif): Don't pass the arguments; cache
+ the value of frag_now and fill in the fields later.
+
+ * Makefile.in (distclean, realclean): Remove new
+ configure-generated files.
+
+Sat Aug 27 20:26:12 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com)
+
+ Conversion to autoconf:
+ * acconfig.h, aclocal.m4: New files.
+ * configure.in: Rewritten (except for some target-specific code)
+ for autoconf.
+ * conf.in, configure: New files, generated from the above.
+ * Makefile.in: Changed magic sequence indicating insertion of
+ makefile fragments.
+ (VPATH, srcdir, CC, LIBS, OBJS dependencies): Use @-substitutions
+ from configure.
+ (LINKED_HEADERS): Deleted a.out.gnu.h, a.out.h, and host.h.
+ (config.status, configure): Rewrite rules.
+ (config-stamp): Depend on conf. Skip variables that configure is
+ now substituting itself.
+ (*.o dependencies): Deleted host.h.
+ (distclean, realclean): Don't delete host.h.
+ * as.c: Don't include stdio.h, string.h, sys/types.h. Include
+ signal.h after as.h.
+ * as.h: Include alloca-conf.h first. Include ctype.h, string.h,
+ strings.h, stdlib.h, unistd.h, sys/types.h, fopen-bin.h,
+ fopen-same.h, as suggested by autoconf test results.
+ [BROKEN_ASSERT]: Don't include assert.h.
+ (strdup): Declare.
+ (volatile, const): Define if not __STDC__ and not already defined.
+ (malloc, realloc) [NEED_MALLOC_DECLARATION]: Declare.
+ (free) [NEED_FREE_DECLARATION]: Declare.
+ * gasp.c: Include config.h, stdlib.h (if HAVE_STDLIB_H). Don't
+ include host.h.
+ (malloc) [NEED_MALLOC_DECLARATION]: Declare.
+ * messages.c: Include as.h first. Include errno.h only if
+ HAVE_ERRNO_H. If HAVE_VARARGS_H and not __STDC__, undefine
+ HAVE_STDARG_H. Set NO_STDARG and NO_VARARGS as appropriate.
+ * doc/Makefile.in (srcdir, INSTALL, INSTALL_PROGRAM,
+ INSTALL_DATA): Use autoconf @-substitutions.
+
+ * input-file.c: Don't include assert.h here, 'cause as.h already
+ includes it.
+
+ * config/tc-alpha.c: Added various prototypes for static
+ functions.
+ (in_range): New function, tests whether a value can fit in an
+ N-bit field.
+ (build_mem, build_operate_n): New functions for constructing
+ opcode values.
+ (emit_sll_n, emit_ldah_num, emit_addq_r, emit_lda_n): New
+ functions for emitting single instructions, no longer requiring a
+ recursive call to md_assemble.
+ (emit_add64): New function for expanding a REG:=REG+CONST
+ operation into one or more instructions, to handle wide constants.
+ (clear_insn): New variable.
+ (md_begin): Fill it in with zeros and BFD_RELOC_NONE values.
+ (alpha_ip): Use it to initialize local variable insns.
+ (alpha_ip, label "immediate" and cases 'P', 'G'): Use emit_add64
+ for calculations.
+
+Fri Aug 26 14:46:15 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com)
+
+ * subsegs.c (section_symbol): Reverse still-wrong test of
+ EMIT_SECTION_SYMBOLS.
+
+ * write.c (BFD_FAST_SECTION_FILL): Always define.
+ (write_contents): If fill_size is 1, use memset instead of looping
+ calling memcpy.
+
+Wed Aug 24 12:46:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.h (LOCAL_LABEL): Define as 0, for compatibility
+ with native MIPS assembler.
+ * configure.in (mips-*-irix*): Don't set emulation.
+ * config/te-irix.h: Remove.
+
+ * ecoff.c (ecoff_symbol_new_hook): Don't add a new file if we
+ haven't seen any input files yet.
+ * config/tc-alpha.c (md_begin): Just call symbol_create, rather
+ than calling symbol_new and then removing the symbol from the
+ list.
+
+ * as.c (main): Move a inside the #if 0 block which uses it.
+ * ecoff.c (current_stabs_filename): Make const.
+ * frags.h (frag_align_pattern): Declare.
+ * gasp.c (new_file): Cast isp to long, and use %ld to print it.
+ * config/tc-alpha.h (md_operand): Add cast to void.
+ (alpha_do_align): Declare argument types.
+ (tc_get_register): Declare.
+ (alpha_frob_ecoff_data): Declare.
+ * config/tc-alpha.c: Include <ctype.h>.
+ (s_mask): Don't declare; does not exist.
+ (line_comment_chars): Remove /* from descriptive comment.
+ (tc_get_register): Remove unused local reg.
+ (tc_gen_reloc): Don't bother to compare unsigned to zero.
+ (s_base): Correct warning to actually print register number.
+ (md_begin): Remove unused locals retval, lose, and i.
+ (alpha_fix_adjustable): Move default case inside switch to avoid
+ warning.
+ (load_symbol_address): Remove unused locals reloc_addr, p, sym,
+ and addend.
+ (emit_byte_manip_r): Declare types for all arguments.
+ (emit_extract_r, emit_insert_r, emit_mask_r): Likewise.
+ (emit_sign_extend, emit_bis_r, s_proc): Likewise.
+ (alpha_ip): Use sprint_value to print offsetT value. Remove
+ unused local size. Remove unused label get_macro.
+ (alpha_do_align): Make fill const.
+ (md_apply_fix): Remove unused label check_zov.
+
+ * configure.in: Recognize i586 as a synonym for i[34]86.
+
+Tue Aug 23 12:32:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-coff.c (c_line_new): Change line_number argument from
+ unsigned short to int so that the type in the prototype matches
+ the promoted type in the definition.
+ (stack_delete): Comment out; not used.
+ * config/obj-coff.h (tc_coff_symbol_emit_hook): Declare if not
+ BFD_ASSEMBLER, not if BFD_ASSEMBLER. Declare argument type.
+ * config/tc-m68k.h (tc_coff_sizemachdep): Declare.
+ * config/tc-m68k.c (tc_coff_symbol_emit_hook): Add ignored
+ argument.
+
+Tue Aug 16 01:48:20 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * gas/config/tc-hppa.c (pa_comm): Undo last change. Set sy_frag for
+ the common symbol to the zero address frag (the correct fix).
+
+Tue Aug 16 01:48:20 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * gas/config/tc-hppa.c (pa_comm): Undo last change. Set sy_frag for
+ the common symbol to the zero address frag (the correct fix).
+
+ * config/tc-hppa.c (pa_comm): Set sy_resolved for the common
+ symbol.
+
+Fri Aug 12 17:51:48 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.c (md_begin): Drop "el" from the end of
+ TARGET_CPU. Check for mips64orion.
+
+Tue Aug 9 19:43:45 1994 Stu Grossman (grossman@cygnus.com)
+
+ * configure.in: Recognize ppc-*-netware.
+ * config/te-ppcnw.h: New file to support Power-PC/Netware
+ configurations. Currently, it just enables the use of backslash
+ escapes in string directives.
+
+Tue Aug 9 11:12:13 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-ppc.c (ppc_stabx): Call expression directly, rather
+ than via pseudo_set. If expression is a symbol, move stab symbol
+ to just after symbol from expression.
+
+ * ecoff.c (ecoff_build_procs): Don't force adr of first fdr to be
+ zero. Undoes change of June 4, 1993.
+
+ * config/tc-mips.c (md_parse_option): Accept -mcpu=4400, 4600, and
+ orion.
+
+Mon Aug 8 16:28:08 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * as.h: Remove FOPEN_WB patch of Aug 6.
+ * configure.in: Configure for ho-go32 correctly.
+ * config/ho-go32.h: Fix copyright.
+
+Mon Aug 8 11:59:51 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * gas/config/tc-hppa.c (md_pseudo_table): Delete redundant
+ upper-case versions of the pseudo-ops.
+
+Mon Aug 8 13:42:16 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-sparc.c (md_apply_fix): If we are going to generate a
+ non PC relative reloc, don't put the addend in the object file.
+
+Sat Aug 6 01:15:02 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * as.h: If FOPEN_WB is not defined, do the right thing in a go32
+ environment.
+
+Mon Jul 11 11:34:52 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/tc-h8300.c (pint): New function for handling varying
+ size of int pseudo op.
+ * doc/as.texinfo: Fix typo describing .h8300h pseduop.
+
+Mon Aug 1 02:40:43 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (create_new_space): Initialize sd_subspaces
+ field in the space chain.
+
+ * config/tc-hppa.c (tc_gen_reloc): Cast return value from
+ hppa_gen_reloc_type.
+
+Thu Jul 28 15:45:37 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Check more carefully for
+ conflicting architectures.
+ (md_parse_option) [NO_V9]: Complain if v9 was selected.
+ (md_show_usage): Derive architecture list in usage message from
+ architecture_pname array.
+ (cypress): Macro deleted.
+ (op_hash): Don't initialize.
+ (s_common): Use bfd_und_section_ptr instead of bfd_und_section.
+
+ * config/tc-sparc.c (BSR): New function.
+ (sparc_ip): Use it for right-shift operations of 32 bits or more.
+
+ * config/tc-sparc.c (sparc_ip): Implement new operand type 'x'.
+
+Tue Jul 26 18:21:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff.h: Moved common includes and TARGET_FORMAT
+ definitions together.
+ (WORKING_DOT_WORD, WARN_SIGNED_OVERFLOW_WORD,
+ OBJ_COFF_OMIT_OPTIONAL_HEADER, BFD_HEADERS, BFD) [!BFD_ASSEMBLER]:
+ Moved these definitions to the start of the file, before the
+ includes.
+ (SYMBOLS_NEED_BACKPOINTERS, OBJ_COFF_MAX_AUXENTRIES): Always
+ define these.
+ (S_GET_ZEROES): Deleted.
+ (S_SET_ZEROES): Moved to obj-coff.c.
+
+ * config/obj-coff.c (obj_coff_* psuedo-op fns): Deleted
+ forward declarations.
+ (obj_pseudo_table): Moved to one version end of file,
+ conditionalized internally.
+ (stack typedef, stack_init, stack_delete, stack_push, stack_pop,
+ tag_hash, tag_init, tag_insert, tag_find, tag_find_or_make): Moved
+ to one combined version at top of file, unconditional. Deleted
+ forward declarations.
+ (s_get_name): Moved one copy of declarations to start of file.
+ (def_symbol_in_progress): Ditto. Don't initialize.
+ (S_SET_ZEROES): Moved here from obj-coff.h.
+ (write_object_file): If TC_COFF_SET_MACHINE is defined, call it on
+ the file headers.
+
+ * config/obj-coff.c (seg_info_off_by_4): Now const and static.
+ (SEG_INFO_FROM_SEG_NUMBER): Unused macro deleted.
+ (previous_file_symbol, def_symbol_in_progress, symbol_externP,
+ symbol_extern_lastP, last_functionP) [!BFD_ASSEMBLER]: Don't
+ bother explicitly initializing to zero value.
+
+ * config/obj-coff.c (fixup_segment) [TC_I960]: Use SF_GET_BALNAME
+ and SF_GET_CALLNAME instead of the TC_S_IS_ versions.
+
+ * config/tc-i960.h (TC_COFF_SET_MACHINE): New macro. Calls
+ tc_headers_hook.
+
+ * config/tc-i960.c (targ_has_iclass): Use I_CX | I_CX2 where I_CX
+ was used previously.
+ (tc_headers_hook): If I_CX2 is found, set flags to F_I960CA.
+
+ * config/tc-i960.c (po_hash): Declaration deleted.
+ (next_object_file_charP): Ditto.
+ (regnames, aregs, coj): Now const.
+ (parse_memop): Static array def_scale now const.
+ (md_begin): Cast away const when passing hash routines addresses
+ of values in regnames or aregs.
+ (md_longopts): Added "link-relax" and "no-relax" hyphenated forms.
+ Continue to accept one-word forms.
+ (struct tabentry, arch_tab): Moved to top level from inside
+ md_parse_option. Now const.
+ (md_show_usage): Use arch_tab to generate usage message. Print
+ hyphenated forms of relax options.
+
+ * config/tc-i960.h (DEFINE_I960_AOUT, TC_S_IS_*, TC_S_*_SYSPROC,
+ TC_S_FORCE_TO_*): Moved from here...
+ * config/tc-i960.c: ... to here. Changed DEFINE_I960_AOUT stuff
+ to test OBJ_AOUT and OBJ_BOUT directly.
+
+ * config/tc-i960.h (CTRL, COBR, COJ, REG, MEM*, FBRA, CALLJ,
+ M1-M3, REG_OPC, R_*, SFR, LIT, FP, OP, R, RS, RL, RSL, F,
+ {R,F}{,L}{2,4}, M, SFR_OK, LIT_OK, FP_OK, REG_ALIGN, MEMOP, I_*):
+ Macros deleted.
+
+ * config/tc-i960.c (ARCH_JX): Define.
+ (arch_tab): Include JX.
+ (targ_has_sfr, targ_has_iclass): Handle JX.
+ (tc_headers_hook): Set flags to F_I960JX for i960JX.
+
+Fri Jul 15 15:36:51 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * subsegs.c (section_symbol): Had last change backwards.
+
+Thu Jul 14 13:21:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/atof-ns32k.c: Deleted.
+
+ * config/obj-aout.c (obj_aout_frob_symbol): Use
+ bfd_ind_section_ptr and bfd_und_section_ptr.
+
+ * subsegs.c (subseg_set_rest): Compare segT values directly,
+ without casting to int first.
+
+ * config/tc-ns32k.c (md_begin): Return value from hash_insert
+ should be pointer to const. Don't call exit explicitly after
+ calling as_fatal; it won't return.
+ (convert_iif): Make local variable j be pointer to bit_fixS, since
+ that's how it's used.
+ (encode_operand, case 'b'): Ignore sprintf return value. Don't try
+ converting freeptr to int and back.
+
+ Merged in NS32K support update from Ian Dall (dall@hfrd.dsto.gov.au):
+
+ * config/te-pc532mach.h: New file. pc532-mach target emulation.
+
+ * config/te-netbsd532.h: New file. Netbsd532 target emulation.
+
+ * config/tc-ns32k.h: Add definition of NOP_OPCODE.
+
+ * config/tc-ns32k.h: Add prototype for fix_new_ns32k_exp.
+
+ * config/tc-ns32k.h: Add BFD_ASSEMBLER support.
+
+ * config/tc-ns32k.c (tc_gen_reloc): New function for BFD_ASSEMBLER.
+
+ * config/tc-ns32k.c (fix_new_ns32k_exp): Get reloc type
+ differently for BFD_ASSEMBLER.
+
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Get reloc
+ type differently for BFD_ASSEMBLER.
+
+ * config/tc-ns32k.c (md_create_long_jump): Size of opcode is one
+ not 2.
+
+ * config/tc-ns32k.c (md_convert_frag): Code for the BFD_ASSEMBLER
+ case. Also use smart md_pcrel_adjust function.
+
+ * config/tc-ns32k.c (md_apply_fix): Code for the BFD_ASSEMBLER
+ case. Also use smart md_fix_pcrel_adjust function.
+
+ * config/tc-ns32k.c (md_fix_pcrel_adjust): New function which can
+ find offset from opcode to operand even if in another frag
+ and in the presence of relaxing.
+
+ * config/tc-ns32k.c (md_pcrel_adjust): New function which can
+ find offset from opcode to operand even if in another frag
+ and in the presence of relaxing.
+
+ * config/tc-ns32k.c (md_number_to_disp): Check ranges properly.
+
+ * config/tc-ns32k.c (md_atof): use atof_ieee instead of special
+ atof_ns32k.
+
+ * config/tc-ns32k.c (reloc): New (static) function for
+ BFD_ASSEMBLER.
+
+ * config/tc-ns32k.c (convert_iif): More correct pc relative code.
+ md_relax must be able to find opcode address even if in another frag.
+
+ * config/tc-ns32k.c: More extensive comments.
+
+ * config/tc-ns32k.c (encode_operand): Support new operand classes I
+ and Z. Drop Q.
+
+ * config/tc-ns32k.c (fix_new_ns32k_exp): new function and
+ corresponding prototype.
+
+ * config/tc-ns32k.c: make 32532 default machine instead of 32032.
+
+ * config/tc-ns32k.c: include opcode/ns32k.h after as.h
+
+ * aout_gnu.h: r_disp needs to be 2 bits for TC_NS32K
+
+ * write.h: fx_im_disp needs to be 2 bits big for TC_NS32K
+
+ * write.c (relax_segment): Use TC_PCREL_ADJUST macro (if defined)
+ instead of adding pcrel_adjust.
+
+ * write.c (write_object_file): Adjust to_addr for the
+ BROKEN_DOT_WORD feature for the BFD_ASSEMBLER case.
+
+ * write.c (write_object_file): Use TC_CONS_FIX_NEW if it is defined.
+
+ * write.c (write_contents): Add code (currently if
+ BFD_FAST_SECTION_FILL is defined) to make large fills a lot faster.
+
+ * configure.in: Remove ns32k from special FP list. All the ns32k
+ series use ieee float.
+
+ * configure.in: Add ns32k-pc532-mach and ns32k-pc532-netbsd targets
+
+ * as.h: include expr.h before targ-env.h. Some target dependent file
+ want to use expr structures.
+
+Wed Jul 13 14:49:05 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip): Change rp to be a const pointer.
+ (md_parse_option): Clear cpu field of current_architecture before
+ setting a new cpu type. Clear no_68881 for m68881 or m68882.
+ Clear no_68851 for m68851.
+
+Tue Jul 12 21:27:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/ho-sysv.h (realloc): Declare.
+
+ * symbols.c (symbol_create): New function, most of the guts of the
+ old symbol_new function.
+ (symbol_new): Now just checks symbol_table_frozen, calls
+ symbol_create, and enters the symbol into the symbol table.
+ * subsegs.c (section_symbol): If EMIT_SECTION_SYMBOLS is not true,
+ and the symbol table is frozen, call symbol_create instead of
+ symbol_new.
+ * symbols.h (symbol_create, symbol_table_frozen): Declare.
+
+ * symbols.c (symbol_clear_list_pointers): Always a function now.
+ * struc-symbol.h (symbol_clear_list_pointers): Deleted macro
+ version.
+
+ * symbols.c (debug_verify_symchain): New macro, defined to be
+ verify_symbol_chain or a cast to void, depending on DEBUG_SYMS.
+ (many functions): Invoke debug_verify_symchain unconditionally.
+
+Tue Jul 12 12:06:42 1994 Kung Hsu (kung@x1.cygnus.com)
+
+ * config/obj-ecoff.h: change calling interface of
+ OBJ_GENERATE_ASM_LINE_STAB.
+ * config/obj-elf.h: ditto.
+ * read.c (read_a_source_file): ditto.
+ * ecoff.h: change calling interface of
+ ecoff_generate_asm_line_stab.
+ * ecoff.c (add_file): record of filename to handle case of include
+ files, also change default built-in type from int to void for
+ asm file.
+ * ecoff.c (ecoff_generate_asm_line_stab): handle case of include
+ files.
+
+Mon Jul 11 17:20:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.c (macro): In case M_LA_AB, SVR4_PIC, large
+ constant, and case ldd_std, set mips_optimize to 2 temporarily to
+ avoid inserting an unexpected nop instruction.
+
+Sat Jul 9 00:05:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_build_lineno): Handle count correctly for last
+ line number.
+
+Fri Jul 8 15:22:07 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * gasp.c (process_pseudo_op): Pass right args to do do_aif.
+ (get_any_string): New arg 'pretend_quote'.
+ (get_and_process, do_formals, macro_expand, do_sdata,
+ process_pseudo_op): Use new arg.
+
+Fri Jul 8 12:23:44 1994 Kung Hsu (kung@mexican.cygnus.com)
+
+ * config/obj-ecoff.h: define macro OBJ_GENERATE_ASM_LINE_STAB.
+ * config/obj-elf.h: ditto.
+ * read.c (read_a_source_file): generate line stabs for asm file.
+ * read.h: add extern generate_asm_line_stab.
+ * ecoff.h : add prototype for ecoff_generate_asm_line_stab().
+ * ecoff.c (add_file): if there's no filename provided, set switch
+ to generate line stabs for .s file.
+ * ecoff.c (add_procedure): add stabs symbol for .ent directive.
+ * ecoff.c (generate_ecoff_stab): creates an artificial stabs.
+ * ecoff.c (generate_asm_line_stab): generate a artifitial label
+ for each line and generate a stabn for the line.
+
+Thu Jul 7 17:04:03 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * gasp.c (get_any_string): Cope with getting a string with an
+ alternate base specifier.
+ (do_aif, do_aelse): Only enable output if expression is true and previous
+ level was on.
+ (chartype_init): Add BASEBIT chartype.
+ (process_pseudo_op): Notice nesteed AIFs.
+
+Thu Jul 7 12:30:22 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * h8300.c (do_a_fix_imm): Code for 2 bit reloc type using in trapa
+ insn. (fix pr 5165, 5174)
+
+Thu Jul 7 11:31:32 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (R_DLT_REL): If it isn't defined, then define
+ to an appropriate value to avoid losing on old hpux systems.
+
+ * config/tc-hppa.c (hppa_fix_adjustable): Reject reductions for
+ symbols in DLT relative relocs.
+ (tc_gen_reloc): Zero out the addend field for DLT relative relocs.
+
+Wed Jul 6 01:07:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-ppc.c (ppc_tc): If not OBJ_COFF, force TOC entry to
+ align to a four byte boundary.
+
+Tue Jul 5 15:42:09 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-alpha.c (load_expression): Handle 32-bit addends.
+ (gpdisp_hi16_howto): Now points to const.
+ (load_insn_table, alpha_ip): Fix uses of const.
+
+ * doc/internals.texi: Updates to COFF description. Added "@end
+ defmac" as needed, and some extra heading and "@bye" so it'll
+ format as a separate document.
+
+Tue Jul 5 13:54:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/obj-elf.h (S_GET_ALIGN, S_SET_ALIGN): Define.
+ * config/obj-elf.c (obj_elf_common): Set alignment of common
+ symbol.
+ * config/tc-sparc.c (s_common): If OBJ_ELF, set alignment of
+ common symbol.
+
+Mon Jul 4 18:29:43 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (is_complex): New macro.
+ (cons_fix_new_hppa): "Handle" complex expressions.
+
+Fri Jul 1 00:48:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-coff.c (write_object_file): Set s_align field from
+ section_alignment array.
+
+Thu Jun 30 15:05:28 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * write.c (write_object_file): Use bfd_com_section_ptr.
+ * as.h (absolute_section, undefined_section): Use new BFD macros
+ bfd_abs_section_ptr and bfd_und_section_ptr.
+
+Thu Jun 30 14:36:37 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * config/tc-mips.c (macro): For M_LI_SS, decide how to handle it
+ based on contents of imm_expr and offset_expr, rather than
+ mips_pic. For M_LI_DD, decide how to handle it based on segment
+ name of offset_expr, rather than mips_pic.
+ (mips_ip): If g_switch_value < 4, use immediate values for 'l'.
+ If g_switch_value < 8, use .rdata rather than .lit for 'L'.
+
+Wed Jun 29 17:30:46 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * as.c (show_usage): Break long string into shorter ones.
+ (parse_args): Add -v, prints version id and continues.
+ * config/tc-mips.c (md_show_usage): Break long string.
+
+Mon Jun 27 09:47:16 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * config/tc-i386.c (md_parse_option): Handle "-V" and "-Q" if
+ OBJ_ELF is defined.
+
+Sun Jun 26 16:30:48 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * as.c (main) [HOST_SPECIAL_INIT]: New hook, for host-specific
+ initialization.
+
+Wed Jun 22 00:24:55 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.h (obj_frob_symbol): Define for OBJ_ELF.
+ More gas/bfd lossage exposed by the new linker code.
+
+Tue Jun 21 11:32:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * subsegs.c (subseg_change): Clear seginfo after allocating it.
+ (subseg_get): Pass actual size of seginfo to memset.
+
+ * subsegs.c (abs_seg_info, und_seg_info): Define if BFD_ASSEMBLER.
+ (subseg_change): Store seg_info for bfd_abs_section_ptr in
+ abs_seg_info, and store seg_info for bfd_und_section_ptr in
+ und_seg_info.
+ (subseg_get): Likewise. Also, don't set output_section if it is
+ already set.
+ (seg_info): Define as function.
+ * subsegs.h (seg_info): Declare as function rather than defining
+ as macro.
+ * write.c (relax_and_size_seg): Call seg_info rather than
+ bfd_get_section_userdata.
+
+Mon Jun 20 16:30:54 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure.in (ppc-*-elf*): New target, like -sysv4*.
+
+ * expr.c (operand): If "0f" is followed by '\0', don't do eol
+ checks.
+
+Mon Jun 20 15:17:43 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * ecoff.c (ecoff_build_aux): Call swap_tir_out and swap_rndx_out
+ via backend pointer, not directly.
+
+Fri Jun 17 18:05:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (config-stamp): Make sure there is at least one
+ element in the for loop.
+
+Fri Jun 17 11:01:04 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Misc trivial changes to make gcc -Wall happy.
+
+ * config/tc-hppa.h (elf_hppa_final_processing): Declare.
+
+Wed Jun 15 20:44:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * as.c (parse_args): Cast xmalloc return value.
+
+ * Makefile.in (config-stamp): If $(defs) contains multiple words,
+ emit a #define line for each.
+ * configure.in: For sparc64 target, use sparc cpu files and add
+ sparcv9 to extra_defs. No longer treat sparc64-*-aout* specially.
+
+ * config/tc-sparc.c (membar_masks): Now static and const.
+ (md_show_usage) [!NO_V9]: Add -Av9 to usage message.
+ (current_architecture) [sparcv9]: Initialize to v9.
+ (md_begin) [sparcv9]: Don't bother changing it unconditionally
+ here.
+ (s_reserve): Don't pass unexpected argument to as_bad with
+ bad-segment message.
+
+ * as.h (bfd_alloc_by_size_t) [BFD_ASSEMBLER]: Declare.
+
+ * config/atof-ieee.c (int_to_gen): Commented out unused routine.
+
+ * config/tc-vax.c (md_assemble): Removed check of operand section.
+
+ Fri Jun 3 17:25:08 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.h (DBG_S_C_COMPLX4, DBG_S_C_COMPLX8): define
+ these new VMS symbol-type macros for `complex float' and
+ `complex double' support. Their values come from the existing
+ DSC$K_DTYPE_FC and DSC$K_DTYPE_DC macros in <descrip.h>.
+ (DBG_S_C_REAL8_G, DBG_S_C_COMPLX8_G): G_float versions of
+ REAL8 and COMPLX8; not used yet, because gcc outputs the same
+ .stabs for `double' regardless of whether `-mg' is used.
+ * config/obj-vms.c (VMS_typedef_parse) [case 'r']: add entries
+ for gcc2's predefined types "complex float", "complex double",
+ and "complex long double" (identical to complex double).
+
+Wed Jun 15 12:32:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-coff.c (coff_frob_symbol): Use C_STAT for the .text
+ section symbol, not C_LABEL.
+
+ * config/tc-mips.c (mips_ip): Permit a modifier in 'o' case, and
+ permit non constant expressions in 'u' case. Lets ``lui
+ $8,%hi(foo); lw $8,%lo(foo)($8)'' work correctly.
+
+Mon Jun 13 12:08:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-aout.c (obj_aout_frob_symbol): Warn about an attempt
+ to put a common symbol in a set.
+
+Sat Jun 11 16:41:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Add weak symbols as an extension to a.out.
+ * read.c (pseudo_set): Only preserve external bit for OBJ_AOUT and
+ OBJ_BOUT if not BFD_ASSEMBLER.
+ * config/aout_gnu.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB):
+ Define as in ../include/aout/aout64.h.
+ * config/obj-aout.h (OBJ_SYMFIELD_TYPE): If not BFD_ASSEMBLER,
+ define as char.
+ (S_GET_WEAK, S_SET_WEAK): Define if not BFD_ASSEMBLER.
+ * config/obj-aout.c (obj_pseudo_table): Add "weak".
+ (obj_emit_symbols): Adjust type of weak symbols.
+ (obj_aout_weak): New static function.
+
+Fri Jun 10 13:48:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_section): Don't set any flags based on
+ the type of a special section.
+
+ * config/ho-sunos.h: Include <stdlib.h>. Don't declare malloc,
+ realloc, free, or atol.
+
+Wed Jun 8 06:28:37 1994 Bill Cox (bill@cygnus.com)
+
+ * Makefile.in (check): Delete as.new dependency, so that
+ regression test doesn't trigger an assembler build.
+
+Tue Jun 7 13:33:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (mostlyclean, realclean): New targets.
+ * doc/Makefile.in, testsuite/Makefile.in: Likewise.
+
+Mon Jun 6 13:10:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (RDATA_SECTION_NAME): Define.
+ (macro): Correct M_LI_SS SVR4_PIC/EMBEDDED_PIC case. After M_LI_D
+ or M_L_DOB or label dob, force a new frag to avoid getting
+ confused in tc_gen_reloc.
+ (mips_ip): Use RDATA_SECTION_NAME, not .rdata.
+ (s_change_sec): Likewise.
+
+Fri Jun 3 23:35:36 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (emit_expr): Use memset to zero out memory, rather than
+ going through md_number_to_chars. This permits handling symbolic
+ arguments when the size is larger than sizeof (valueT), if
+ TC_CONS_FIX_NEW is prepared to handle the case (as it is on MIPS).
+
+Fri Jun 3 12:50:13 1994 David J. MacKenzie (djm@rtl.cygnus.com)
+
+ * as.c (show_usage), config/tc-alpha.c (md_show_usage),
+ config/tc-mips.c (md_show_usage): Fix up messages.
+
+ * as.h: Replace flagseen with separate variables.
+ * as.c (parse_args): Set them. Don't accept -1 option, or -v
+ explicitly (it's a synonym for --version).
+ * as.c, input-scrub.c, messages.c, read.c, symbols.c, write.c,
+ config/obj-aout.c, config/obj-aout.h, config/obj-bout.c,
+ config/obj-bout.h, config/obj-coff.c, config/obj-coff.h,
+ config/obj-vms.c, config/tc-hppa.c, config/tc-i386.c,
+ config/tc-i960.c, config/tc-m68k.c, config/tc-mips.c,
+ config/tc-vax.c: Use the new flag variables instead of flagseen.
+ * config/tc-vax.c [OBJ_VMS]: Recognize -+, -1, -v, and document in
+ usage.
+
+ * as.c (show_usage): Remove target specific messages;
+ instead, call md_show_usage.
+ (parse_args): Use getopt_long_only. Take pointers to argc and
+ argv.
+ (main): Pass parse_args pointers.
+ * as.h: Remove 3 variables that are redundant with flagseen.
+ * as.c, messages.c: Change their users to use flagseen.
+ Define getopt stuff.
+ * tc.h: Update md_parse_option decl. Add md_show_usage decl.
+ * config/tc-*.c: Add md_shortopts, md_longopts,
+ md_longopts_size, md_show_usage. Change calling convention for
+ md_parse_option. Remove md_parse_long_option.
+ * config/tc-ns32k.c: Rename `struct option' to `struct ns32k_option'.
+ * config/tc-i386.h: Don't define md_parse_option.
+
+Thu Jun 2 13:54:46 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * as.c (show_usage): New function.
+ (parse_args): Code moved from main.
+ Recognize --help and --version.
+ * config/tc-ns32k.h: Define TC_NS32K.
+ * doc/as.texinfo: Document all of the target-independent command
+ line options.
+
+Thu Jun 2 12:07:25 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * gasp.c (hash_new_table): Clear newly allocated table.
+
+ * config/tc-m68k.c (enum _register): Add 68060 control registers
+ BUSCR and PCR.
+ (last_movec_reg): New macro.
+ (m68000_control_regs, m68010_control_regs, m68020_control_regs,
+ m68040_control_regs, m68060_control_regs): New arrays.
+ (control_regs): New pointer.
+ (m68k_ip): Use control_regs instead of testing CPU every time.
+ Use last_movec_reg too. In error messages, handle 68060, and
+ print 68060 for mfloat, too.
+ (m68k_init_after_args): Handle "68060". Use m68040up for making
+ m68851 choice. Set control_regs.
+ (md_parse_option): Handle "68060".
+ * configure.in: Setting cpu_type, recognize m68060 too.
+
+ * config/obj-coff.c (fixup_segment) [!BFD_ASSEMBLER]
+ [DIFF_EXPR_OK]: Do conversion to pc-relative for difference, even
+ if pcrel is already set.
+
+ * read.c (potable): Add this_gcc_requires_the_gnu_assembler in all
+ lower-case, in case we're ignoring case of opcodes in the input
+ file.
+
+ * doc/as.texinfo (.section): Document as unavailable for a.out
+ type formats.
+
+ * config/tc-alpha.c (machine): New variable.
+ (load_insn): New macro.
+ (load_insn_table): New function.
+ (md_begin): Call load_insn_table, once for basic instructions and
+ once for appropriate PAL instruction table.
+ (md_parse_option): Set `machine' based on -m##### arguments.
+ * config/alpha-opcode.h (alpha_pal21064_opcodes): Split out from
+ alpha_opcodes.
+ (alpha_pal21164_opcodes): New table.
+ (NUM21064OPCODES, NUM21164OPCODES): New macros.
+
+ * configure.in (target i386-*-netbsd0.8): Use 386bsd emulation.
+
+ * doc/Makefile.in (install-info-gasp): Use $$dir when installing
+ file.
+
+Wed Jun 1 10:48:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Force floating point values to be
+ aligned correctly.
+
+Fri May 27 10:05:53 1994 Ken Raeburn (raeburn@cygnus.com)
+
+ Merged in changes from gas-2.3 net release:
+
+ * Makefile.in (VERSION): Updated to cygnus-2.3.1.
+
+ * config/obj-vms.c: Replaced unchecked uses of malloc with
+ xmalloc.
+
+ * listing.c (list_symbol_table): Only test BFD64, not
+ BFD_ASSEMBLER too.
+
+ * config/obj-coff.c (fixup_segment) [BFD_ASSEMBLER]
+ [DIFF_EXPR_OK]: Don't check pcrel, just convert it.
+
+ * config/obj-vms.c: Removed lots of extra semicolons after
+ compound statements.
+ (strchr): Don't declare here.
+
+ * config/ho-vax.h (realloc): Declare.
+
+ * config/ho-vms.h (strchr, strdup): Declare.
+
+ * config/tc-sparc.c (md_parse_option) [OBJ_ELF]: Accept and ignore
+ option `-q'.
+
+ Wed May 18 20:50:35 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.h (DBG_S_C_SQUAD, DBG_S_C_UQUAD): define these
+ new VMS symbol-type macros; signed and unsigned quadword integers,
+ for `long long' support. Their values come from the existing
+ DSC$K_DTYPE_QU and DSC$K_DTYPE_Q macros in <descrip.h>. The
+ VMS debugger now recognizes `long long' variables correctly.
+ * config/obj-vms.c (VMS_typedef_parse) [case 'r']: add entries
+ for gcc2's predefined types "long double" (same as double, as
+ per gcc's current state), "long long int", "long long unsigned
+ int", and final `otherwise' case (to avoid uninitialized type
+ and size fields). [caveat: predefined types "complex int",
+ "complex float", "complex double", and "complex long double" are
+ still missing.]
+
+ * config/ho-vms.h (EXIT_FAILURE): define as 0x10000002 instead
+ of 0, because the latter indicates success rather than failure
+ when passed to `exit' or return from `main' compiled by gcc2.
+
+ * config/obj-vms.c (array_suffix, generate_suffix): replace two
+ hardcoded `0xa3's with macro DBG_S_C_ADVANCED_TYPE from obj-vms.h.
+ (VMS_typedef_parse): eliminate redundant if-then-else when
+ allocating new symbol entry and linking it to VMS_Symbol_type_list.
+
+ Tue May 17 20:47:31 1994 Pat Rankin (rankin@eql.caltech.edu)
+
+ * config/obj-vms.c (Write_VMS_MHD_Records): don't try to interpret
+ the contents of the GAS_VERSION string when falling back to it for
+ language processor identification.
+
+ * make-gas.com, vmsconf.sh (ENVIRON): fix misspelling of
+ `psect_attr' in linker options.
+
+ Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
+
+ * configure.bat: update to latest makefile.in
+ * config/te-go32.h: [new] go32's environment
+
+Fri May 20 17:59:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * as.h: Don't declare parameters for strstr.
+
+Thu May 19 15:40:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-sparc.c (md_section_align): Don't change the size if
+ OBJ_ELF.
+
+Wed May 18 13:08:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (install): Redirect ln output to /dev/null. If ln
+ fails on gasp, install gasp.new, not gasp.
+
+Wed May 18 09:16:36 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): Use R_HPPA_ABS_CALL, not R_HPPA for
+ absolute calls.
+
+Tue May 17 12:50:46 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_parse_fp_cmp_cond): Report an error
+ on a partial completer match.
+
+Mon May 16 12:03:49 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Change .hppa_unwind to .PARISC.unwind
+ throughout code.
+ (is_complex): Delete definition and support for complex relocation
+ types.
+ (tc_gen_reloc): Delete special unwind crud for ELF. Simplify and
+ rewrite ELF code based on 94-02-02 PA ELF draft spec.
+ (pa_build_unwind_subspace): Use standard PARISC_DIR32 relocs for
+ the unwind descriptors.
+
+Fri May 6 14:13:15 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * config/go32.mh: New makefile fragment for go32 crossing.
+ * configure.in (host==go32): Use new fragment.
+
+Fri May 6 14:35:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * gasp.c: Include libiberty.h.
+ (main): Remove unused variable i.
+
+ * config/tc-ppc.c (md_begin): When using -many, permit comparison
+ instructions to appear multiple times in the opcode table.
+
+Thu May 5 19:14:43 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * Makefile.in (VERSION): Update to 2.2.90.
+
+ * symbols.c (symbol_new) [BFD_ASSEMBLER]: Don't permit additions
+ to the symbol table if it's already been set in the output bfd.
+ (symbol_begin) [! EMIT_SECTION_SYMBOLS] [RELOC_REQUIRES_SYMBOL]:
+ Don't use bfd_abs_section.symbol for gas absolute symbol.
+
+ * doc/Makefile.in (distclean, clean-dvi, clean-info): Delete gasp
+ files too.
+
+Thu May 5 18:12:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_emit_delays): Make call to
+ mips_no_prev_insn unconditional.
+
+Thu May 5 17:25:38 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff*.*: Merged coffbfd versions into coff versions,
+ with a single "#ifdef BFD_ASSEMBLER" controlling most of it for
+ now. Deleted obj-coffbfd.* files.
+ * configure.in: Always use obj-coff.* for COFF targets.
+
+Wed May 4 13:34:11 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/te-dpx2.h (TARGET_FORMAT, REGISTER_PREFIX_OPTIONAL):
+ Define.
+ * configure.in (m68k-bull-sysv3*): Enable.
+
+ * config/coff_gnu.h: Deleted.
+
+Wed May 4 11:29:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-m68k.h (TARGET_FORMAT): If not TE_SUN3, define as
+ "a.out-zero.big".
+
+ * config/obj-coffbfd.c (fixup_segment): Make common symbol and PC
+ relative adjustments when TE_LYNX is defined as well as when
+ TC_I386 is defined.
+
+Wed May 4 02:29:21 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * as.h (strstr): Restore declaration.
+ (subseg_get) [BFD_ASSEMBLER]: Declare.
+
+ * write.c (write_object_file): If obj_adjust_symtab is defined,
+ invoke it. Then call set_symtab, and finally invoke *_frob_file
+ hooks.
+ * config/obj-coff.c (coff_adjust_symtab): Renamed from
+ coff_frob_file.
+ * config/obj-coff.h (coff_adjust_symtab): Changed declaration
+ accordingly.
+ (obj_adjust_symtab): Macro also changed.
+
+ * configure.in (i386-*-gnu*): New target, handled like i386-mach.
+
+Tue May 3 21:04:16 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff.h (TARGET_FORMAT) [TC_I960]: Select little
+ endian version.
+
+ * config/obj-coffbfd.h (TARGET_FORMAT) [TC_I960]: Ditto.
+
+ * config/obj-coff.c (coff_frob_section): Round up the size of
+ every section to a multiple of the alignment, so that BFD doesn't
+ surprise us.
+
+ Eliminate many simple differences between the two COFF back ends:
+
+ * config/obj-coffbfd.c: Removed all uses of DEFUN and DEFUN_VOID.
+ Made minor stylistic changes, deleted some register declarations.
+ (stack_top): Deleted.
+ (symbol_to_chars): Use absolute_section and reg_section instead of
+ the corresponding SEG_* symbols.
+ (obj_coff_endef, tag_find_or_make, fixup_segment): Likewise.
+ (stack typedef, stack_init, stack_delete, stack_push, stack_pop):
+ Moved to just after pseudo-op table. All functions now static.
+ (stack_delete): Removed declaration.
+ (tag_init, tag_insert, tag_find_or_make, tag_find): Moved to just
+ after stack functions.
+ * config/obj-coffbfd.h: Reordered some declarations and macros.
+ (stack_init, stack_delete, stack_push, stack_pop): Don't declare.
+ (stack typedef): Deleted.
+ (SYMBOLS_NEED_BACKPOINTERS): Always undef then define; don't test.
+ (SYM_AUXENT): New macro.
+ (SA_GET_*, SA_SET_*): Define in terms of SYM_AUXENT when feasible.
+ (SF_GET_*, SF_SET_*): Define in terms of SF_GET when feasible.
+ (SA_GET_SYM_TAGNDX, SA_GET_SYM_ENDNDX, SA_SET_SYM_TAGNDX,
+ SA_SET_SYM_ENDNDX, object_headers typedef, data_section_header,
+ text_section_header): Delete non-BFD_HEADERS versions, since we
+ always define that symbol now.
+
+ * config/obj-coff.c (stack_top): Deleted.
+ (obj_coff_endef, obj_coff_dim, obj_coff_line, obj_coff_size,
+ obj_coff_scl, obj_coff_tag, obj_coff_type, obj_coff_val): Change
+ argument name from "ignored" to "ignore".
+ (obj_coff_val): Use frag_now_fix.
+ (obj_pseudo_table): Removed IGNORE_DEBUG version, since it doesn't
+ get used.
+ (stack typedef, stack_init, stack_delete, stack_push, stack_pop):
+ Moved to just after pseudo-op table. All functions now static.
+ (tag_init, tag_insert, tag_find_or_make, tag_find): Moved to just
+ after stack functions.
+ * config/obj-coff.h: Reordered some declarations and macros.
+ Protected against multiple inclusions.
+ (stack_init, stack_delete, stack_push, stack_pop): Don't declare.
+ (stack typedef): Deleted.
+ (SYMBOLS_NEED_BACKPOINTERS): Always undef then define; don't test.
+ (stdoutput): Deleted declaration.
+ (TARGET_FORMAT) [TC_I386]: Don't define if already defined.
+
+Mon May 2 17:09:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * subsegs.h (segment_info_type): Use fix_tail field even if
+ BFD_ASSEMBLER.
+ * subsegs.c (subseg_change): Initialize fix_tail field.
+ (subseg_get): Likewise.
+ * write.c (frags_chained): New static variable.
+ (fix_new_internal): If frags_chained is set, use fix_root and
+ fix_tail from seg_info (now_seg), rather than frchain_now.
+ (chain_frchains_together_1): Set fix_tail field.
+ (chain_frchains_together): Set frags_chained.
+
+Thu Apr 28 01:39:15 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/tc-mips.c (s_option): Only refer to g_switch_* variables
+ if GPOPT is defined.
+ (s_abicalls): Ditto.
+ (md_apply_fix): Cast char* to unsigned char* to avoid pointer
+ mismatch.
+
+Wed Apr 27 11:06:32 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * configure.in (i386-*-go32): Uses coff now.
+ * gasp.c (main): Now takes -D on command line.
+ (show_usage): Describe new options.
+
+Tue Apr 26 17:10:30 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * listing.c (list_symbol_table): Print "NO DEFINED SYMBOLS" and
+ "NO UNDEFINED SYMBOLS" if there aren't any, instead of displaying
+ the header with an empty list.
+
+ * config/obj-coffbfd.c (fill_section): Check COFF_NOLOAD_PROBLEM
+ also before setting STYP_NOLOAD for .bss section.
+
+ * config/tc-m68k.c (flag_reg_prefix_optional): New variable.
+ Initialized to value of REGISTER_PREFIX_OPTIONAL, if defined, or
+ zero.
+ (m68k_reg_parse): If flag_reg_prefix_optional is set, permit
+ register prefix to be absent.
+ (m68k_ip_op): Accept `&' also for immediate constants.
+ (insert_reg): Don't bother with (two!?) sanity checks of the
+ symbol table when inserting each register.
+ (m68k_parse_long_option): New function. Set
+ flag_reg_prefix_optional if "register-prefix-optional" is passed.
+ * config/tc-m68k.h (REGISTER_PREFIX): Always define if not already
+ defined.
+ (OPTIONAL_REGISTER_PREFIX): Don't define.
+ (REGISTER_PREFIX_OPTIONAL): If not already defined, define as zero
+ or one depending on M68KCOFF.
+
+ Some changes to help Apollo support, from troy@cbme.unsw.edu.au:
+ * config/tc-m68k.c (DATA, ADDR, SP, FPREG, COPNUM, BAD, BAC):
+ Define as macros instead of enumerators, since the Apollo compiler
+ can't handle "enumVal1, enumVal2 = enumVal1" when defining an enum
+ type.
+ (make_pcrel_absolute) [NO_PCREL_RELOCS]: New function.
+ (tc_coff_fix2rtype) [NO_PCREL_RELOCS]: Generate only R_RELBYTE,
+ R_DIR16, and R_DIR32 relocs.
+ * config/tc-m68k.h [TE_APOLLO] (COFF_MAGIC, COFF_AOUTHDR_MAGIC):
+ Use Apollo versions.
+ [TE_APOLLO] (OBJ_COFF_OMIT_OPTIONAL_HEADER): Undefine. That is,
+ do include the optional header for Apollo target.
+ (COFF_MAGIC): Don't define as MC68MAGIC if it's already defined.
+
+ * config/tc-m68k.h [TE_DELTA] (LEX_PCT): Define as 1, so that `%'
+ can be used within a label name.
+
+ * config/tc-m68k.h (m68k_init_after_args): Declare.
+ (tc_init_after_args): Define as m68k_init_after_args.
+ * config/tc-m68k.c (m68k_init_after_args): New function,
+ containing one-shot code from md_assemble. Added warning for
+ combination of 68040 and 68851.
+ (md_assemble): Startup-time code deleted.
+
+Mon Apr 25 16:19:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * doc/Makefile.in (clean, distclean): Remove asconfig.texi.
+
+Sun Apr 24 00:13:08 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): 13 bit immediate constant (for break
+ instruction) is unsigned.
+
+Fri Apr 22 17:58:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-ecoff.c (ecoff_frob_file): Use bfd_ecoff_set_gp_value
+ and bfd_ecoff_set_regmasks to set the GP value and the register
+ masks, rather than using the now obsolete fake .reginfo section.
+
+Fri Apr 22 15:17:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * listing.c (list_symbol_table): Don't print register symbols as
+ undefined.
+
+ * config/obj-coff.c (obj_symbol_new_hook): Don't need to strip
+ underscores, since symbol_new will already have done it.
+ * config/obj-coffbfd.c (obj_symbol_new_hook): Ditto.
+
+ * as.c (main): If tc_init_after_args is defined, invoke it after
+ all arguments have been processed.
+
+ Some changes to help Apollo support, from troy@cbme.unsw.edu.au:
+ * as.c (perform_an_assembly_pass) [TE_APOLLO]: Create .wtext
+ section instead of .text. Call create_target_segments.
+ * read.c (demand_copy_string): No longer static.
+
+Thu Apr 21 15:50:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (append_insn): Permit branches to be switched
+ with the preceding instruction even if .set nobopt has been seen.
+ .set nobopt actually controls whether to bring up an instruction
+ from the branch target, which gas does not currently support.
+
+Wed Apr 20 18:46:14 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff.h, config/obj-coff.c: Deleted all code used only
+ when BFD_ASSEMBLER is not defined, and all conditionals relating
+ to such code. No such targets remain.
+
+ Fixes for stabs-in-coff:
+ * config/obj-coff.c: Include subsegs.h.
+ (coff_frob_section): New function.
+ (obj_coff_init_stab_section): New function.
+ * config/obj-coff.h (obj_coff_init_stab_section,
+ coff_frob_section): Declare.
+ (obj_frob_section): New macro; uses coff_frob_section.
+ (INIT_STAB_SECTION): New macro; uses obj_coff_init_stab_section.
+
+ * config/tc-sparc.c (md_section_align): Always round up to
+ multiple of alignment power specified in bfd target vector.
+
+ * gasp.c: Include ctype.h.
+
+Mon Apr 18 21:08:01 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * doc/Makefile.in, doc/as.texinfo: Renamed asdoc-config.texi to
+ asconfig.texi.
+
+ * doc/Makefile.in (install-info-as, install-info-gasp): Get file
+ names from source directory without pathname.
+
+ * config/obj-vms.c (VMS_write_object_file): While looking for
+ register mask, skip empty fill frags caused by enabling listing
+ output.
+
+ * config/ho-sysv.h: Include string.h.
+
+ * doc/internals.texi: New (well, recently added) file. Just added
+ info on as_warn and friends.
+
+Mon Apr 18 14:28:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_parse_space_stmt): Use the built-in
+ defaults for defined, private, and spnum fields for the
+ $TEXT$ and $PRIVATE$ spaces. Do not clobber spnum. Do
+ not reset the segment if just updating a space.
+ (pa_spaces_begin): Set BFD section flags for all built-in
+ subspaces.
+
+Fri Apr 15 10:51:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (first_proc_ptr): New static variable.
+ (add_procedure): Set first_proc_ptr if it hasn't been set.
+ (ecoff_build_lineno): If the first procedure does not start at
+ address zero, insert a dummy line to compensate.
+
+ * Makefile.in (bootstrap, bootstrap2, bootstrap3): Make gasp.new
+ as well as as.new.
+
+Thu Apr 14 15:12:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * expr.c (operand): Try to parse "0f" and "0b" sequences as
+ floating point and binary numbers respectively; if it doesn't
+ work, treat them as local labels.
+
+ * Makefile.in: Make $(OBJS) depend on $(ALL_OBJ_DEPS).
+ * configure.in: Set ALL_OBJ_DEPS in output Makefile.
+
+ Based on suggestions from <BAILEY@hmivax.humgen.upenn.edu>
+ (Charles Bailey):
+ * vmsconf.sh: In generated file, get ".obj" suffix right, build
+ source files from other directories into objects in the current
+ directory, and specify PSECT attributes explicitly to linker.
+ Also added missing label.
+ * Makefile.in (stamp-mk.com): Reference new variable
+ VMS_OTHER_OBJS for list of non-local object files, instead of
+ listing them here.
+ (VMS_OTHER_OBJS): New variable, added more libiberty files.
+ * make-gas.com: Regenerated.
+
+ * config/ho-vms.h (unlink): Define as delete.
+
+ * config-gas.com: Fix quoting on TARGET_CANONICAL definition.
+ Delete files before creating them.
+
+Thu Apr 14 13:34:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (de-stage1, de-stage2, de-stage3): Use rm -f.
+
+ * config/tc-mips.h (DIFF_EXPR_OK): Define.
+ * config/tc-mips.c (macro_build): Permit BFD_RELOC_PCREL_LO16 for
+ certain cases of 'i', 'j' and 'o'. Change 'u' to take an
+ argument, the reloc type.
+ (load_register): Pass reloc type to macro_build for 'u'.
+ (macro): Likewise. For M_LA_AB permit a difference expression
+ when generating embedded PIC code between an arbitrary symbol and
+ a symbol in the .text section.
+ (mips_force_relocation): Force BFD_RELOC_PCREL_HI16_S and
+ BFD_RELOC_PCREL_LO16 to be emitted.
+ (md_apply_fix): Check that most relocs are not PC relative.
+ Handle BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
+ (tc_gen_reloc): Change #error to as_fatal. Handle
+ BFD_RELOC_PCREL_LO16 and BFD_RELOC_PCREL_HI16_S.
+
+Tue Apr 12 18:25:13 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * subsegs.c (subsegs_begin): Call memset with args in the correct
+ order.
+ (subseg_get): Clear newly allocated seginfo, set its pointer slots
+ to NULL instead of 0.
+
+Mon Apr 11 09:00:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_procend): Handle case where label was
+ defined after the .proc directive.
+
+ * config/tc-hppa.c (pa_procend): Give an error if we encounter a
+ procend for a procedure without a name.
+
+Thu Apr 7 14:28:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (macro): Pass NULL for expression argument to
+ macro_build for nori case.
+ (SWITCH_TABLE): Define.
+ (mips_force_relocation): Force a relocation for a switch table
+ entry.
+ (md_apply_fix): Write switch table entry value into file.
+ (tc_gen_reloc): Use BFD_RELOC_GPREL32 for a switch table entry,
+ and set the addend to the difference between the reloc address and
+ the subtrahend.
+
+Thu Apr 7 10:38:18 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.h (elf_tc_symbol): Delete. No longer used.
+ (elf_tc_make_sections): Likewise.
+ (hppa_tc_make_sections, hppa_tc_symbol): Delete extern decls.
+
+ * config/tc-hppa.c (hppa_tc_make_sections): Delete function.
+ (hppa_tc_symbol): Likewise.
+
+ * config/obj-elf.c (elf_frob_file): Delete elf_tc_symbol and
+ elf_tc_make_sections stuff. It was there to support PA braindamage
+ which has been fixed, and in the case of elf_tc_make_sections is
+ redundant with elf_tc_final_processing.
+
+Wed Apr 6 20:48:30 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
+ manufacturer.
+
+Tue Apr 5 15:48:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): For case 'o', when generating
+ embedded PIC code, accept the difference between two local symbols
+ as being constant.
+ (mips_force_relocation): Only force a reloc to be generated for a
+ PC relative fixup.
+ (md_apply_fix): For BFD_RELOC_32 and BFD_RELOC_LO16, put the fixup
+ value into the file if the fixup will not generate a reloc.
+
+Tue Apr 5 11:14:14 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * config/tc-sparc.c (s_reserve): If section passed isn't bss,
+ don't spew remainder of input file in error message.
+ (tc_gen_reloc): If bfd_reloc_type_lookup returns null, print error
+ message with reloc type and try to process remainder of file.
+
+ * doc/Makefile.in (install-info-as, install-info-gasp): New
+ targets, now explicitly checking $(srcdir) for info files.
+ (install-info): Depend on both of them; do nothing more.
+
+Mon Apr 4 17:06:04 1994 Jeffrey A. Law (law@cygnus.com)
+
+ * config/tc-hppa.c (tc_gen_reloc): Fix thinko in ELF version.
+
+Mon Apr 4 12:39:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-ppc.c (ppc_insert_operand): Check PPC_OPERAND_SIGNED
+ flag rather than signedp field. Only permit extended range if
+ PPC_OPERAND_SIGNOPT flag is set and assembling in 32 bit mode.
+ Based on patch from David Edelsohn (edelsohn@npac.syr.edu).
+
+ * config/tc-ppc.c (ppc_size): New static variable.
+ (ppc_arch): Check for PPC_OPCODE_PPC before PPC_OPCODE_POWER.
+ (md_begin): If an instruction has a size specific flag set, only
+ add it if we are assembling that size.
+
+Thu Mar 31 16:51:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-sparc.c (tc_gen_reloc): Add a gruesome hack to get
+ cross section PC relative relocs right for COFF and ELF.
+
+Mon Mar 28 14:38:23 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Always define.
+ (OBJ_PROCESS_STAB): Don't define.
+
+Mon Mar 28 12:40:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-aout.c (obj_aout_frob_symbols): Don't let BFD clobber
+ the type of symbol set symbols which happen to be in the absolute
+ or undefined section.
+
+Mon Mar 28 12:35:00 1994 David Edelsohn (edelsohn@npac.syr.edu)
+
+ * config/tc-ppc.c (md_parse_option): Add -mpwrx (POWER/2 aka
+ RIOS2), -mpwr (POWER aka RIOS1), -mppc (PowerPC aka MPC603/604),
+ and -many (all architectures).
+
+Sun Mar 27 14:04:19 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (tc_gen_reloc): Set addend for relocation
+ involving a function symbol which is not a plabel to zero.
+ (md_apply_fix): Never pass a function symbol to field_adjust.
+
+Fri Mar 25 17:35:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-aout.c (obj_aout_frob_symbol): If N_EXT is set for an
+ N_INDR symbol, set BSF_EXPORT and clear BSF_LOCAL.
+
+ * config/tc-mips.c (append_insn): If EMBEDDED_PIC, don't swap a
+ branch with an instruction that uses $at, in case the branch is
+ later expanded.
+ (macro): If EMBEDDED_PIC, case M_JAL_A may use $at.
+ (md_pcrel_from): If not OBJ_AOUT, return 4 for an undefined symbol
+ to make it pcrel_offset.
+ (tc_gen_reloc): If not OBJ_AOUT, set the reloc addend to
+ reloc->address; another gruesome hack to get gas reloc handling to
+ do the right thing.
+
+Thu Mar 24 21:29:29 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-alpha.c (alpha_ip): Only set GP prolog size if using
+ PV register.
+ (T12): New macro.
+ (emit_insn): New function.
+ (md_assemble): Call it.
+ (alpha_force_relocation): Handle BFD_RELOC_26, for call_pal
+ instructions.
+ (lituse_pending): New variable. Set by anything that generates a
+ LITERAL reloc, cleared by anything that generates a LITUSE reloc,
+ tested by code that might want to emit a LITUSE reloc.
+ (emit_unaligned_io): New function. Currently calls md_assemble,
+ but it should eventually be converted to generate the insn itself
+ and call emit_insn directly.
+ (emit_load_unal, emit_store_unal, emit_byte_manip_r,
+ emit_extract_r, emit_insert_r, emit_mask_r, emit_sign_extend,
+ emit_bis_r): Likewise.
+ (alpha_ip, case 'I'): Handle with BFD_RELOC_23.
+ (alpha_ip, label get_macro): Don't emit the final instruction if
+ the opcode is zero.
+ (alpha_ip, case 'B', subcase 'd'): New case, for subword and
+ unaligned memory access macros.
+ (md_apply_fix): Handle BFD_RELOC_26. Generate an error message if
+ the value can't be resolved.
+
+Wed Mar 23 16:06:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (md_parse_option): For -membedded-pic, force
+ the -G value to 0x7fffffff. For SVR4 PIC options, don't call
+ bfd_set_gp_size here, it's done in md_begin. Don't permit -G with
+ -membedded-pic.
+ (mips_force_relocation): New function.
+ (md_apply_fix): Set fixP->fx_done appropriately.
+ (s_change_sec): For EMBEDDED_PIC, change .data and .rdata to
+ .sdata.
+ * config/tc-mips.h (TC_FORCE_RELOCATION): Define.
+ (mips_force_relocation): Declare.
+ (TC_HANDLE_FX_DONE): Define.
+
+Tue Mar 22 13:58:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (enum mips_pic_level): New enum.
+ (mips_pic): Change from int to enum mips_pic_level. Change all
+ uses (0 becomes NO_PIC, 2 becomes SVR4_PIC).
+ (load_address): Handle EMBEDDED_PIC.
+ (macro): Handle EMBEDDED_PIC in all PIC cases.
+ (md_parse_option): Accept -membedded-pic to use EMBEDDED_PIC. If
+ OBJ_ELF, accept -KPIC and -call_shared to use SVR4_PIC and accept
+ -non_shared to use NO_PIC (this is how the Irix 5 assembler
+ works). Do not permit -G with SVR4_PIC.
+ (s_abicalls): Warn if -G was used, and force -G 0.
+ (tc_gen_reloc): Set reloc->addend to 0 for a PC relative reloc for
+ anything but a.out, not just for ELF. For ECOFF, don't generate a
+ BFD_RELOC_16_PCREL_S2 reloc unless using EMBEDDED_PIC.
+
+ * config/obj-ecoff.h (obj_sec_sym_ok_for_reloc): Define to be 1.
+
+Sun Mar 20 16:31:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (create_new_space): Use ints, not chars as
+ parameters to avoid losing when compiling with HP CC.
+ (create_new_subspace, update_subspace, fix_new_hppa): Likewise.
+
+Sun Mar 20 14:43:14 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * Makefile.in (config-stamp): If `defs' is defined, emit a
+ preprocessor directive to create a macro named by this value into
+ config.new; don't explicitly go for BFD_ASSEMBLER.
+ * configure.in: Define `defs', not `BFDDEF'. Set it to
+ MANY_SEGMENTS for any obj-coffbfd target.
+ * config/obj-coffbfd.h (BFD_HEADERS, BFD): Define.
+ * config/i386coff.mt (TDEFINES): Don't define BFD, MANY_SEGMENTS,
+ or BFD_HEADERS.
+ (LOCAL_LOADLIBES): Deleted.
+ * config/m68kcoff.mt (TDEFINES): Don't define those macros.
+ * config/m88kcoff.mt (TDEFINES): Ditto.
+ * config/ebmon29k.mt: Deleted.
+ * config/h8300hds.mt: Deleted.
+ * config/ic960coff.mt: Deleted.
+ * config/sparc.mt: Deleted.
+ * config/h8300.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
+ * config/h8500.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
+ * config/sh.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
+ * config/z8k.mt (LOCAL_LOADLIBES): Deleted.
+ (TDEFINES): Don't define the coffbfd macros.
+
+ * Makefile.in: Insert makefile fragments before OBJS definition.
+ (OBJS): Add $(TE_OBJS).
+
+ * config/obj-coff.c (obj_pseudo_table): Supply "section"
+ unconditionally.
+
+ * write.c (set_symtab): Define only if BFD_ASSEMBLER.
+
+Sun Mar 20 12:06:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Makefile.in (STAGESTUFF): Add gasp.new.
+
+Fri Mar 18 20:09:16 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * write.c (symbol_table_frozen): New variable, to be set after
+ bfd_set_symtab is called.
+ (dump_section_relocs): Note whether a symbol is a section symbol
+ or not.
+ (adjust_reloc_syms): For now, always supply an absolute symbol for
+ fixups without symbols but not yet `done'. Use section_symbol to
+ get the symbol, instead of going directly for abs_symbol.
+ (write_relocs) [DEBUG4]: Abort if any symbol referred to by a
+ reloc is not a section symbol and is not in the symbol table.
+ (set_symtab): New function, broken out from write_object_file.
+ Counts symbol table instead of relying on an earlier count.
+ (write_object_file): Call set_symtab, but do it after potentially
+ invoking the *_frob_file macros. Don't bother counting symbols.
+ Call symbol_remove, instead of expanding it in place. Moved the
+ conditionalized `object_file_size' declaration down to
+ conditionalized block where it's used. When using the absolute
+ symbol for a fixup without a symbol, set sy_used_in_reloc.
+ (write_object_file) [BFD_ASSEMBLER]: Call section_symbol to get
+ the correct symbol for the absolute section.
+
+ * subsegs.c (section_symbol): Use symbol_new instead of
+ symbol_make, since we may want it to go into the symbol table.
+ Make the new symbol have internal linkage. If
+ obj_sec_sym_ok_for_reloc says it's okay, use the BFD section
+ symbol with the newly created GAS symbol.
+ (obj_sec_sym_ok_for_reloc): Default to always returning 0.
+ * config/obj-aout.h (obj_sec_sym_ok_for_reloc) [BFD_ASSEMBLER]:
+ New macro.
+ * config/obj-elf.h (obj_sec_sym_ok_for_reloc): New macro.
+
+ * config/tc-sparc.c: Include subsegs.h.
+ (in_signed_range): New function.
+ (sparc_ip): Use it.
+ (sparc_ip, case 'i'): Use BFD_RELOC_SPARC13, not _BASE13.
+ (sparc_ip, label "immediate"): Reject constants for pcrel
+ instructions only if the relocation type indicates a "call"
+ instruction and the offset is within range of a "jmpl %g0". If
+ it's not in range, use the absolute section symbol plus an offset.
+ (md_apply_fix): Use in_signed_range. Combined _SPARC13 and
+ _BASE13 cases.
+ (tc_gen_reloc): Permit BFD_RELOC_SPARC13.
+
+ * config/ic960coff.mt (TDEFINES): Fixed typo (MANY_SECTIONS, not
+ MANY_SEGMENTS).
+
+ * configure.in: Eliminated all targets using obj-coff but not
+ defining BFD_ASSEMBLER; I think all such targets that are
+ supported will be matched by real CPU-OS combinations earlier in
+ the case statement.
+ (targets *-*-coff*, *-sysv*, *-*-sco*, *-*-sysv32): Deleted. Made
+ some comments about the dpx2 configuration, but left it disabled,
+ since it couldn't be reached before.
+ (target a29k-amd-ebmonold): Deleted.
+
+Thu Mar 17 13:36:09 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_import): Correctly handle importing of an
+ already defined symbol.
+
+Wed Mar 16 17:11:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Only accept overly large values for
+ the 'j' operand if there are no further alternatives for this
+ instruction.
+
+ * config/obj-coffbfd.c (adjust_stab_section): Initialize
+ stabstrseg to SEG_UNKNOWN, not -1. After loop, check whether it
+ is not SEG_UNKNOWN rather than checking whether it is >= 0.
+
+ * config/tc-mips.c (mips_align): Take new argument, label, and use
+ it instead of global insn_label.
+ (s_align, s_cons, s_float_cons, s_gpword): Save insn_label before
+ call to mips_emit_delay and pass it to mips_align.
+
+Wed Mar 16 11:54:12 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_equ): Handle both .reg and .equ correctly.
+
+ * config/tc-hppa.c (pa_callinfo): Accept "millicode" as an
+ argument to a .callinfo directive. Don't loop forever on errors.
+
+ * config/tc-hppa.c (pa_equ): Use pa_parse_number so that we can
+ use pre-defined registers as arguments.
+
+Mon Mar 14 14:29:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * write.c (write_object_file): Check both S_IS_LOCAL and
+ S_IS_EXTERNAL when deciding whether to discard a symbol.
+
+ * config-gas.com: Scan Makefile.in, not version.c, for current
+ version number. Delete all versions of temp files when finished
+ with them. Create config.h.
+
+ * config/obj-vms.c (VMS_Initialized_Data_Size): Cache symbol
+ values to reduce number of lookups with S_GET_VALUE. Skip debug
+ symbols to avoid "a really nasty bug". (From Holger Teutsch,
+ holger@botbso.rhein-main.de.)
+ (VMS_write_object_file): For "__vt.*" symbols, set S_GET_OTHER
+ field. (Also from Holger Teutsch.) Watch for a would-be register
+ mask that spans frags.
+
+ * config/obj-coffbfd.c (obj_coff_line): Set symbol lnno field with
+ this_base, not line_base. (Patch from Andreas Arens,
+ ari@obelix.av.rwth-aachen.de.)
+
+ * config/obj-aout.c (obj_crawl_symbol_chain): Retain symbols that
+ look local if they're exported or undefined. Used to be done for
+ i960 only.
+
+ * read.c (s_lcomm, s_comm): Print symbol name being redefined.
+ Get it from the looked-up symbol, instead of using the string from
+ the input stream, which is no longer null-terminated.
+ (LEX_PCT): New macro, defaults to 0.
+ (lex_type): Use it for `%'.
+
+ * config/tc-vax.c (md_parse_option): Handle `-h#' option for VMS.
+ (vip_op): Now static, and returns void. Callers changed. Added
+ forward decl.
+ (vip): Ditto. Call as_fatal directly if a program bug is
+ detected.
+ (op_hash): Let default initialization suffice.
+
+ * Makefile.in (literal.o): Provide dependencies.
+
+ * configure.in: Set new makefile variable OPCODES_LIB.
+ * Makefile.in (LIBS): Use it.
+
+ * Makefile.in (make-gas.com, stamp-mk.com): New targets.
+ * vmsconf.sh: New file.
+ * make-gas.com: Regenerated from new script.
+
+ * configure.in (sparc*-*-lynxos*): Handle any version number
+ suffix after "lynxos". Set emulation to lynx.
+
+Mon Mar 14 11:30:49 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/obj-coff.c (obj_coff_section): Delete declaration.
+
+Fri Mar 11 22:25:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-ppc.c (md_pcrel_from): Return 0 for undefined ELF
+ symbols.
+ (ppc_is_toc_sym): Change .toc to .got.
+ (md_apply_fix): Change handling of ELF relocs.
+ (tc_gen_reloc): Likewise.
+
+Fri Mar 11 17:42:20 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-vms.c (Close_VMS_Object_File): Add comment pointing
+ out some code that doesn't belong in this file.
+
+ * config/obj-vms.h: Include aout/stab_gnu.h.
+ (N_GSYM, ..., N_LENG): Deleted.
+ (NO_RELOC): Undefine before defining as part of enum reloc_type.
+
+ * config/tc-alpha.c: Add comment questioning need for all the
+ characters in FLT_CHARS.
+
+ * as.c (main) [OBJ_VMS]: Don't call output_file_close.
+
+ * config/obj-ecoff.c (ecoff_frob_file): Set strict order for
+ sections with recognized names, before computing VMA values.
+
+Fri Mar 11 17:56:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Accept numbers between 0x8000 and
+ 0xffff for 'j' to be compatible with MIPS assembler. These
+ numbers are actually treated as negative.
+
+Thu Mar 10 13:36:29 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-sparc.h (LOCAL_LABEL): Local labels are .Lfoo.
+
+Tue Mar 8 21:17:12 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff.c: Minor formatting/stylistic changes, plus:
+ (obj_coff_section): Declare.
+ (obj_pseudo_table): Make it available only if MANY_SECTIONS.
+ (obj_symbol_to_chars) [CROSS_COMPILE]: Some attemps to make this
+ work. It still doesn't. It now fails to compile, instead of
+ silently compiling to do nothing.
+ * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define only if
+ MANY_SECTIONS.
+ (OBJ_PROCESS_STAB) [! MANY_SECTIONS]: New macro, just emits
+ warning.
+
+ Handle Alpha load-immediate-FP pseudo-instructions:
+ * config/alpha-opcode.h (ldif, ldig, ldis, ldit): New patterns.
+ * config/tc-alpha.c (lit8_sec, lit4_sec, lit8_sym, lit4_sym): New
+ variables.
+ (create_literal_section): New function.
+ (create_lita_section): Now a macro.
+ (get_lit8_offset, get_lit4_offset): New functions.
+ (maybe_set_gp): New function.
+ (select_gp_value): Call it.
+ (load_expression): Preserve addend if symbol is a section symbol.
+ (alpha_ip): Handle new operand type `F' for floating-point
+ constants; store them in .lit{4,8} sections.
+ (alpha_ip, case 'G'): Emit LITUSE relocations for symbol exprs.
+
+ * config/tc-i386.c (smallest_imm_type): Never return Imm1.
+
+Tue Mar 8 14:18:15 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/obj-coffbfd.c (w_strings): Only copy strings out if
+ their symbols are going to be written.
+
+Tue Mar 8 11:49:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * messages.c (as_perror): Declare arguments const.
+ * as.h (as_perror): Change declaration.
+
+Mon Mar 7 16:08:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (load_address): When calling frag_grow, allow
+ for the (up to) two nops which may be inserted by append_insn if
+ mips_optimize is 0.
+ (macro): Likewise.
+
+Thu Mar 3 11:37:55 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/atof-ieee.c (make_invalid_floating_point_number):
+ Add cast to avoid warning from gcc.
+
+Wed Mar 2 10:31:01 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Add a few casts to make HP C compiler happy.
+
+ * config/obj-som.c (obj_som_version, obj_som_copyright): Be
+ prepared
+ to handle an error from bfd_som_attach_aux_hdr.
+
+ * config/tc-hppa.h: Wrap ELF specific decls inside an ifdef.
+
+Mon Feb 28 15:03:26 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-alpha.c (md_atof): Omit warning about FP values.
+ (line_comment_chars): Add ! to list.
+ (md_apply_fix): Do process 32- and 64-bit relocations.
+
+ * config/obj-coffbfd.c (obj_coff_lcomm): Put "#if 0" around the
+ unused parts (most of the function).
+ (obj_coff_init_stab_section): Cast alloca result.
+
+ * configure.in (i960-*-coff, i960-*-vxworks5.*): Use coffbfd, and
+ gas_target ic960coff.
+ * config/ic960coff.mt: New file.
+ * config/obj-coffbfd.h [TC_I960]: Include coff/i960.h.
+ (TARGET_FORMAT) [TC_I960]: Use coff-Intel-little.
+ * config/te-ic960.h (CROSS_COMPILE): Don't undef this. We'll
+ always build little-endian object files.
+ * config/tc-i960.c (md_reloc_size): Don't define at all if BFD or
+ BFD_ASSEMBLER is defined.
+ (mem_fmt): Since COFF doesn't handle callx relocations yet, treat
+ them like normal 32-bit relocations.
+ (md_apply_fix): For callx relocations, store zero.
+ (tc_bout_fix_to_chars): Store symbol index for all callx
+ relocations, regardless of link-relax setting.
+ (tc_coff_fix2rtype, tc_coff_sizemachdep): New functions.
+ (i960_handle_align) [! OBJ_BOUT]: If link-relax option is
+ selected, print an error message and clear it.
+ * config/tc-i960.h (BFD_ARCH, COFF_FLAGS, COFF_MAGIC,
+ TC_COUNT_RELOC, TC_COFF_FIX2RTYPE, TC_COFF_SIZEMACHDEP,
+ tc_fix_adjustable): New macros.
+ (tc_coff_fix2rtype, tc_coff_sizemachdep): Declare.
+
+Fri Feb 25 20:56:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (hppa_tc_symbol): Call PA ELF BFD version.
+ (hppa_tc_make_sections): Likewise.
+ (pa_build_symextn_section): Delete unused function.
+ (hppa_tc_make_symextn_section): Likewise.
+ (pa_export): Delete call to pa_build_symextn_section.
+
+ * config/tc-hppa.h (hppa_tc_symbol): Add extern decl.
+ (elf_hppa_final_processing): Delete extern decl.
+ (hppa_tc_symbol): Delete extern decl.
+
+Fri Feb 25 13:15:31 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-coffbfd.c (fill_section): Correct test for whether to
+ fill a section (from Minh Tran-Le <TRANLE@intellicorp.com>).
+
+Thu Feb 24 11:30:26 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure.in: Don't require version number for i386-*-mach.
+
+ * read.c (potable): Added ".this_GCC_requires_the_GNU_assembler",
+ which is ignored by gas, but will cause other assemblers to choke.
+ Intended for use by gcc ports that require gas instead of native
+ assemblers.
+
+Thu Feb 24 07:10:31 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/ho-hppaosf.h: Fix braino in test for ANSI-C.
+
+Wed Feb 23 16:51:43 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * write.c (write_contents): Give the user a reasonable error
+ message rather than "assertion failed" if bfd_set_section_contents
+ fails.
+
+Tue Feb 22 10:07:32 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * config/ho-mach3.h: New file.
+
+Mon Feb 21 11:41:18 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * ecoff.c (ecoff_build_debug): Don't set hdr->magic here. It is
+ now set in bfd/ecofflink.c:ecoff_write_symhdr.
+
+ * config/obj-coffbfd.c (write_object_file): use bfd_get_error (),
+ not bfd_error.
+ * config/obj-elf.c (elf_frob_file): Likewise.
+
+ * read.c (s_lcomm): Use an alignment power of 3 for 8 byte .lcomm
+ variables.
+
+ * config/ho-hpux.h (BROKEN_ASSERT): Define if not __GNUC__.
+
+ * read.c (read_a_source_file): Use correct arguments to memcpy
+ (broken 19 Jul 1993). From kjd@pescadero.stanford.edu (Kenneth
+ Duda).
+
+Sun Feb 20 18:01:54 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
+
+ * config/obj-coff.h (obj_coff_section): Declare.
+ * config/obj-coff.c (obj_pseudo_table): For "section", use
+ obj_coff_section.
+ (obj_coff_section): Rewrite.
+
+Fri Feb 18 14:16:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure.in (i386-*-mach3*): New target; uses BFD.
+ * config/te-mach.h: New file.
+ * config/obj-aout.c (obj_aout_frob_file): New function.
+ * config/obj-aout.h (obj_aout_frob_file): Declare it.
+ (frob_file): New macro.
+ * config/tc-i386.c (md_apply_fix_1) [TE_Mach]: Don't adjust
+ pcrel32 relocations.
+ * config/tc-i386.h (TARGET_FORMAT) [TE_Mach]: Use a.out-mach3.
+
+ * write.c (write_object_file): Removed register declarations.
+
+Thu Feb 17 16:25:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Some support for PowerPC ELF.
+ * configure.in: If cpu is powerpc*, use ppc.
+ (ppc-*-sysv4*): Use object format elf.
+ * config/tc-ppc.h: Only declare a number of things if OBJ_COFF is
+ defined.
+ (TARGET_ARCH): Make it call ppc_arch.
+ (ppc_arch): Declare.
+ (TARGET_FORMAT): Set based on OBJ_COFF or OBJ_ELF.
+ (NO_STRING_ESCAPES): Define.
+ (LOCAL_LABEL, FAKE_LABEL_NAME): Define for OBJ_ELF.
+ * config/tc-ppc.c: Only define a number of functions of OBJ_COFF
+ is defined.
+ (md_pseudo_table): Most pseudo-ops are OBJ_COFF specific. Added
+ OBJ_COFF specific "bi" and "ei".
+ (md_parse_option): Fix handling of -u. Make -m601 set
+ PPC_OPCODE_601. If OBJ_ELF, accept -V and -Q.
+ (ppc_set_cpu): New function.
+ (ppc_arch): New function.
+ (md_begin): Call ppc_set_cpu.
+ (ppc_insert_operand): For a signed operand accept an unsigned
+ value, for IBM compatibility.
+ (ppc_byte): Don't call stringer for strings; instead, treat two
+ double quotes as a single double quote.
+ (ppc_comm): Set sy_tc.output for a .lcomm symbol.
+ (ppc_biei): New function.
+ (ppc_tc): If not OBJ_COFF, ignore first argument.
+ (ppc_fix_adjustable): Call as_bad_where, not as_bad.
+ (ppc_is_toc_sym): New function.
+ (md_apply_fix): Use ppc_is_toc_sym. Handle BFD_RELOC_16 and
+ BFD_RELOC_8.
+
+Thu Feb 17 09:29:37 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * messages.c (as_perror) [BFD_ASSEMBLER]: Use bfd_get_error and
+ bfd_set_error and new error names.
+
+Tue Feb 15 20:23:20 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * configure.in: Support i960-vxworks versions > 5.0 as coff.
+ Default is still bout if no version is specified.
+
+ * atof-generic.c (atof_generic): Use switch and strcasecmp instead
+ of large number of compares when looking for inf/nan values.
+
+Fri Feb 11 13:13:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (macro): Do unaligned loads and stores
+ correctly when big endian, and give errors on overflow rather than
+ generating incorrect code.
+
+Thu Feb 10 11:24:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * as.c: Include libiberty.h.
+
+ * read.c (do_align): Don't define label just_record_alignment
+ unless it might be used.
+
+ * as.c (main): If md_parse_long_option is defined, call it with a
+ long option.
+ * config/tc-mips.h (md_parse_long_option): Define.
+ * config/tc-mips.c (mips_trap): New static variable.
+ (md_begin): Report an error if mips_trap is set at ISA level 1.
+ (macro): If mips_trap, use trap instructions instead of break
+ instructions for overflow and divide by zero detection.
+ (mips_parse_long_option): New function. Support --trap,
+ --no-break, --break and --no-trap.
+ * doc/as.texinfo: Document new options.
+
+ * read.c (potable): Add "zero".
+ * config/tc-i386.c (md_pseudo_table): Remove "zero".
+ * config/tc-m88k.c (md_pseudo_table): Likewise.
+
+Thu Feb 10 01:24:27 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Reject integer values for
+ pc-relative operand fields. This forces "call 0" to become "jmpl
+ %g0,%o7" with no relocations needed.
+
+Wed Feb 9 13:08:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * as.h (xmalloc, xrealloc): Declare using PTR rather than char *.
+ * xmalloc.c (xmalloc, xrealloc): Use PTR rather than char *.
+
+ * app.c (do_scrub_next_char): If NO_STRING_ESCAPES is defined,
+ don't treat backslash specially inside strings.
+ * read.c (next_char_of_string): Likewise.
+
+Wed Feb 9 09:42:45 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config/obj-coffbfd.c (obj_coff_init_stab_section): Use memset
+ instead of memcpy to zero the initial stab symbol, duh.
+ * config/obj-elf.c (obj_elf_init_stab_section): Ditto.
+ * config/obj-som.c (obj_som_init_stab_section): Ditto.
+
+Tue Feb 8 17:25:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * write.c (fixup_segment): Use as_bad_where, not as_bad.
+
+ * subsegs.c (subseg_set_rest): Call memset with the arguments in
+ the right order. Explicitly clear fix_root and fix_tail fields.
+
+Tue Feb 8 16:00:25 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/obj-coff.c (coff_frob_symbol): For abs_symbol, set *punt
+ and do nothing else.
+
+ * symbols.c (symbol_begin): Initialize value of abs_symbol
+ properly.
+
+ * write.c (adjust_reloc_syms): Use abs_symbol instead of calling
+ section_symbol.
+
+ * ecoff.c (ecoff_build_debug): Fix "/*" in comment to silence
+ complaint from "gcc -Wall".
+
+ * configure.in (alpha-*-netware*): New target, like alpha-*-osf*.
+
+ * config/tc-alpha.c (GP_ADJUSTMENT): Move definition to start of
+ file.
+ (tc_gen_reloc): Remove uninitialized variable `code', and code
+ that tried to use it (incorrectly). For LITERAL reloc, set addend
+ to negative of GP value.
+ (load_symbol_address): Don't adjust return value by GP_ADJUSTMENT.
+
+ * write.c (write_relocs): Print some sensible error message if
+ bfd_perform_relocation returns bfd_reloc_overflow.
+
+Mon Feb 7 15:49:24 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * configure.in (hppa*-*elf*): New configuration for PA ELF.
+ (hppa*-*-osf*): Default object format is SOM.
+
+Mon Feb 7 16:07:35 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-alpha.c (md_atof): Warn that floating-point values
+ might not assemble properly.
+
+ * configure.in (target alpha-*-osf*): Don't set "dev=yes" any
+ more.
+
+ * config/tc-alpha.c (load_expression): Parenthesize operations in
+ range checking, to avoid precedence questions.
+
+ * config/tc-alpha.c (addr32): New static variable.
+ (md_parse_option): Set it for "-32addr".
+ (load_symbol_address): If addr32 is set, use ldl instead of ldq.
+
+ * atof-generic.c (atof_generic): Calculate maximum_useful_digits
+ and more_than_enough_bits_for_digits in integer arithmetic, to
+ eliminate the only sources of dependence on floating point
+ support, which doesn't work yet on the Alpha.
+
+Mon Feb 7 03:56:05 1994 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * ecoff.c (ecoff_build_debug) [TC_ALPHA]: Specify version stamp as
+ 0x30b for Alpha for now, until ".verstamp" is handled.
+
+ * literal.c (add_to_literal_pool): Use seginfo->frchainP, which
+ actually refers to the literal pool section, rather than
+ frchain_now, which refers to whatever section the assembler was
+ in.
+
+ * write.c (fixup_segment): Only do range checking if size of fixup
+ is smaller than word size. Otherwise, we always wind up with
+ zeros.
+
+ * config/tc-alpha.c (md_section_align): Change second argument and
+ return type to valueT, to agree with tc.h.
+ (alpha_do_align): Local static array nop_pattern is now unsigned
+ char, to avoid overflow warnings.
+ * config/tc-alpha.h (md_section_align): Delete declaration.
+
+ * config/obj-ecoff.c (ecoff_frob_file): Ensure that ecoff_data for
+ output bfd is non-null before indirecting through it.
+
+ * config/tc-alpha.c (alpha_frob_ecoff_data): Renamed from
+ alpha_frob_file.
+ * config/tc-alpha.h (tc_frob_file): Macro deleted.
+ * config/obj-ecoff.c (ecoff_frob_file) [TC_ALPHA]: Call
+ alpha_frob_ecoff_data, then fill in optional-header info with gp
+ value and register masks.
+
+Sun Feb 6 16:13:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * configure.in (hiux): Fixes from m-kasahr@sramhc.sra.co.JP.
+
+ * config/obj-som.c (obj_som_init_stab_section): Same change
+ as coffbfd and elf below. Zero the initial stab symbol after
+ allocating it.
+
+Sat Feb 5 12:30:32 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config/obj-coffbfd.c (obj_coff_init_stab_section): Zero the
+ initial stab symbol after allocating it.
+ * config/obj-elf.c (obj_elf_init_stab_section): Ditto.
+
+Sat Feb 5 11:53:31 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): addb[tf] should only accept
+ non-negated condition completers. Add support for addb pseudo-op
+ which accepts both negated and non-negated completers.
+
+Sat Feb 5 00:15:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in (rs6000*): Use cpu_type ppc.
+ (ppc-*-aix*): New target; use coff and force bfd_gas.
+ * config/tc-ppc.h, config/tc-ppc.c: New files for PowerPC/POWER
+ (RS/6000) support. At the moment, only XCOFF is supported.
+
+ * config/obj-coff.c (SA_SET_SYM_ENDNDX): Made non-static.
+ (S_SET_DATA_TYPE): Likewise.
+ (coff_last_function): Renamed from local static last_functionP in
+ coff_frob_symbol and made externally visible.
+ (coff_frob_symbol): New local static set_end; use it to try to
+ avoid calling SA_SET_SYM_ENDNDX on a symbol that will be punted.
+ * config/obj-coff.h (S_SET_DATA_TYPE): Declare.
+ (SA_SET_SYM_ENDNDX): Declare.
+ (coff_last_function): Declare.
+
+ * expr.c (operand): If DOLLAR_DOT is defined, accept `$' as
+ equivalent to `.' to mean the current location.
+
+ * read.c (LEX_BR): If not defined, define as 0.
+ (lex_type): Use LEX_BR as the type of `{',`}',`[',`]'.
+
+ * symbols.c (symbol_new): If tc_canonicalize_symbol_name is
+ defined, call it with preserved_copy_of_name. If
+ tc_symbol_new_hook is defined, call it on the new symbol.
+ (symbol_find_base): If tc_canonicalize_symbol_name is defined,
+ call it on a copy of the name argument.
+
+ * write.c (write_object_file): Simplified usage of obj_frob_symbol
+ and tc_frob_symbol. Always call both if the symbol is going to be
+ output.
+
+ * write.c (relax_segment): Use %ld rather than %d when printing
+ fragP->fr_var, and cast it to long.
+
+ Changed relocs to be based on subsegments (when BFD_ASSEMBLER).
+ * subsegs.h (struct frchain): If BFD_ASSEMBLER, added new fields
+ fix_root and fix_tail.
+ (segment_info_type): If BFD_ASSEMBLER, don't define fix_tail
+ field.
+ * write.c (fix_new_internal): If BFD_ASSEMBLER, set fix_rootP and
+ fix_tailP based on frchain_now, not seg_info (now_seg).
+ (chain_frchains_together_1): Chain the subsegment relocs together.
+ * subsegs.c (subseg_change): Don't clear fix_tail field.
+ (subseg_get): Likewise.
+ * literal.c (add_to_literal_pool): Look through the relocs via
+ frchain_now, not seginfo.
+
+Thu Feb 3 23:07:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-ecoff.h (TARGET_SYMBOL_FIELDS): Changed
+ ecoff_undefined to ecoff_extern_size.
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Likewise.
+ * config/tc-mips.c (s_extern): Set ecoff_extern_size to the
+ external symbol size, rathern than setting the symbol value.
+ (md_estimate_size_before_relax): Check both ecoff_extern_size and
+ symbol value to see if GP referencing can be used.
+ * ecoff.c (ecoff_symbol_new_hook): Clear ecoff_extern_size, not
+ ecoff_undefined.
+ (ecoff_frob_symbol): Don't check ecoff_undefined.
+ (ecoff_build_symbols): Get size of an undefined symbol from
+ sym->ecoff_extern_size, not S_GET_VALUE (sym).
+
+Wed Feb 2 13:55:08 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Makefile.in: Avoid bug in losing hpux sed.
+
+Wed Feb 2 11:40:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (file_mips_isa): New static variable.
+ (md_begin): Set it.
+ (s_mipsset): Add support for .set mipN to set the ISA level.
+
+ * gasp.c (kinfo): Fully bracket initializer.
+
+Tue Feb 1 19:28:12 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * gasp.c (malloc): Don't declare, since host.h or system header
+ files may declare it differently.
+
+ * config/atof-ieee.c (int_to_gen): Now static.
+
+ * config/ho-i386aix.h: Include sys/types.h and stdlib.h, not
+ ho-sysv.h. Based loosely on a patch from Minh Tran-Le.
+
+Tue Feb 1 10:50:17 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * gasp.c: Include host.h.
+
+Tue Feb 1 12:13:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Make an unsupported instruction a
+ warning, not an error.
+
+ * config/obj-coff.c (dot_text_symbol, dot_data_symbol,
+ dot_bss_symbol): Don't define if BFD_ASSEMBLER.
+ (obj_symbol_to_chars): bfd_coff_swap_aux_out now takes more
+ arguments.
+ (coff_line_base): Renamed from line_base. Changed all uses.
+ (coff_add_linesym): Renamed from add_line_sym. Made non-static.
+ Changed all uses.
+ * config/obj-coff.h: If TC_PPC, include coff/rs6000.h.
+ (S_SET_STORAGE_CLASS, S_GET_STORAGE_CLASS): Declare if
+ BFD_ASSEMBLER.
+ (coff_line_base): Declare.
+ (coff_add_linesym): Declare if BFD_ASSEMBLER.
+ * config/obj-coffbfd.c (symbol_to_chars): bfd_coff_swap_aux_out
+ now takes more arguments.
+
+Mon Jan 31 17:55:14 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * as.c (statistics_flag): Renamed from quiet_flag.
+ (main): Get statistics with --statistics instead of -noquiet.
+
+Mon Jan 31 07:19:30 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * Makefile.in: Support for Gnu ASsembler Preprocessor.
+ * gasp.c: New file.
+ * read.c (s_lcomm): Align lcomm data.
+ * config/tc-z8k.c (tc_reloc_mangle): Don't allow subtraction
+ from different sections.
+
+Sun Jan 30 14:58:26 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * write.c (write_object_file): If tc_frob_file is defined, call it
+ just before calling obj_frob_file.
+ * config/tc-alpha.c (alpha_gp_value): Renamed from gp_value
+ (references changed), and made non-static.
+ (getExpression): Return void.
+ (select_gp_value): Abort if gp_value is non-zero. Delete call to
+ non-existent bfd_set_gp_value.
+ (alpha_validate_fix): Function deleted.
+ (alpha_frob_symbol): Function deleted.
+ (alpha_local_label): Function deleted.
+ (alpha_frob_file): Renamed from alpha_end.
+ * config/tc-alpha.h (alpha_frob_symbol, alpha_validate_fix,
+ alpha_local_label, alpha_end): Declarations deleted.
+ (alpha_gp_value, alpha_frob_file): Declare.
+ (tc_frob_symbol, TC_VALIDATE_FIX, md_end): Macros deleted.
+ (LOCAL_LABEL): Move code here from tc-alpha.c:alpha_local_label.
+ (md_convert_frag): Simplified slightly.
+ (tc_frob_file): New macro.
+
+ * read.c (do_align): New function, most of guts of s_align_*
+ functions. Look for md_do_align macro, give it a chance to bypass
+ all but recording of section alignment.
+ (s_align_bytes, s_align_ptwo): Call do_align.
+ (s_lcomm) [TC_ALPHA]: Align object to largest power of two that
+ divides object size.
+
+ * frags.c (frag_align_pattern): New function.
+ (frag_align): Rewrite for clarity.
+
+ * config/tc-vax.c (md_assemble): Handle O_constant expression.
+ (vip_begin): Returns pointer to const char. Cast hash_insert arg
+ to PTR to avoid compiler complaints about const.
+ (md_begin): Local variable errtxt must point to const.
+
+ * configure.in: Handle host vax-*-ultrix* like vax-*-bsd*. Don't
+ bother with *-*-ultrix or *-*-sysv*, except *-*-sysv, since only
+ the last has an existing host support file. Do handle vax-bsd and
+ vax-ultrix targets.
+
+Fri Jan 28 11:26:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-coff.c (obj_coff_section_header_append): Do not
+ declare if BFD_ASSEMBLER.
+ (stack_pop): Correct test for stack underflow.
+ (obj_coff_endef, obj_coff_dim, obj_coff_line, obj_coff_size,
+ obj_coff_scl, obj_coff_tag, obj_coff_type, obj_coff_val): Declare
+ type of ignored argument to avoid gcc warning.
+ (align): Removed unused function.
+
+Thu Jan 27 18:14:19 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-alpha.c, config/tc-alpha.h, config/alpha-opcode.h: New
+ files, based on port of gas-1.38 contributed by CMU, using a.out
+ variant. Updated for gas-2.x and ECOFF. Floating-point constants
+ are still broken, bootstrap testing incomplete.
+
+ * literal.c: Comment changes.
+
+ * listing.c (listing_source_file): Check for null listing_tail
+ before indirecting through it.
+
+ * expr.h (struct expressionS): Added struct tag.
+
+ * as.h: If __GNUC__ and inline are both undefined, define inline
+ away.
+
+ * write.c (cvt_frag_to_fill): Don't assume that fr_var for
+ rs_align or rs_org frags will be 1.
+ (relax_segment): For rs_align, if fr_var is not 1, complain if
+ required padding is not a multiple of the size of the pad pattern.
+ (fixup_segment): Leave gp-relative relocations alone. For pcrel
+ relocations referring to the same segment, clear fx_pcrel when
+ clearing fx_addsy.
+ * as.h: Adjust comments on rs_align.
+
+ * atof-generic.c: Some reformatting.
+ (atof_generic): Be careful when mixing signed/unsigned values of
+ different sizes.
+
+ * write.c, config/obj-{aout,bout,coff*}.c, config/tc-sparc.c:
+ Query the fx_done field instead of fx_addsy to see if the fixup
+ still needs to be applied. Set fx_done and clear fx_addsy both,
+ for now. If TC_HANDLES_FX_DONE isn't defined, assume md_apply_fix
+ will only clear fx_addsy, and set fx_done accordingly after
+ returning.
+ * config/tc-sparc.h (TC_HANDLES_FX_DONE): Define.
+ * config/tc-sparc.c (md_apply_fix): Set fx_done for non-pcrel fix
+ with no fx_addsy.
+
+ * symbols.c (dot_text_symbol, dot_data_symbol, dot_bss_symbol):
+ Deleted.
+ (symbol_begin): Moved to end of file, so function inlining can
+ work better.
+ (fb_label_count, fb_label_max): Default C static initializers are
+ sufficient.
+ * symbols.h (dot_text_symbol, dot_data_symbol, dot_bss_symbol):
+ Declarations deleted.
+ * config/obj-coff.c (dot_text_symbol, dot_data_symbol,
+ dot_bss_symbol): Defined here, static.
+
+ * config/obj-aout.c [BFD_ASSEMBLER]: Undef NO_RELOC before
+ including aout/aout64.h.
+
+ * write.c (write_object_file): If EMIT_SECTION_SYMBOLS is false,
+ don't write out a section symbol even if it's used in a
+ relocation; assume relocations will handle section numbers
+ somehow. Rename "punt_it" label to "punt_it_if_unused" to reflect
+ it's true use.
+ (EMIT_SECTION_SYMBOLS): Default to 1.
+ (adjust_reloc_syms): Don't create a new symbol for an absolute
+ reference; just use the absolute section symbol.
+ (write_relocs): Make printout of reloc values dependent on flag
+ DEBUG3, not DEBUG2.
+ * config/obj-aout.h (EMIT_SECTION_SYMBOLS): Define as 0.
+ * config/obj-ecoff.h (EMIT_SECTION_SYMBOLS): Ditto.
+
+Thu Jan 27 16:43:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (lex_type): No longer make '{' a valid character for
+ symbol names.
+
+ * as.c (main): Print long values using %ld.
+
+ * messages.c (as_warn_internal): New static function.
+ (as_warn, 3 versions): Use as_warn_internal.
+ (as_warn_where, 3 versions): New function.
+ * as.h (as_warn_where): Declare.
+
+Tue Jan 25 18:30:34 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * as.c (quiet_flag): New flag.
+ (main): If -noquiet given, display execution time and memory used.
+
+Tue Jan 25 15:53:11 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * doc/{all.texi,as.texinfo}: Add documentation for HPPA port.
+
+Mon Jan 24 19:18:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_frob_symbol): New function. Put undefined
+ symbols of known size in the undefined section. Put small common
+ symbols in a .scommon section.
+ * ecoff.h (ecoff_frob_symbol): Declare.
+ * config/obj-ecoff.h (obj_frob_symbol): Define.
+ * config/obj-elf.c (obj_elf_write_symbol_p, obj_elf_write_symbol,
+ obj_elf_frob_symbol): Removed unused functions.
+ * config/obj-elf.h (obj_frob_symbol, obj_write_symbol): Removed
+ unused macros.
+ (obj_elf_frob_symbol, obj_elf_write_symbol): Removed declarations
+ of unused functions.
+ (obj_frob_symbol): Define if ECOFF_DEBUGGING.
+
+ * tc-mips.c (g_switch_seen): New static variable.
+ (md_parse_option): Set g_switch_seen for -G option.
+ (s_option): If creating PIC code, force the GP size to be 0. Warn
+ if -G switch used with a non-zero value.
+
+ * symbols.c (S_IS_COMMON): Use bfd_is_com_section rather than
+ comparing against bfd_com_section.
+
+Mon Jan 24 14:12:25 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * read.c (s_lcomm): Treat Alpha like MIPS in handling of .sbss
+ section.
+
+Thu Jan 20 13:17:58 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * expr.c (operand): For floating point operand with unusual fp
+ char from FLT_CHARS, preserve the character. Patch from Lisa
+ Repka.
+
+Wed Jan 19 23:15:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (md_pseudo_table): Add all data allocation
+ pseudo-ops: .hword, .int, .long, .octa, .quad, .short, .single.
+
+Tue Jan 18 15:51:59 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/obj-coffbfd.c (obj_coff_endef): For C_EFCN, C_BLOCK and
+ C_FCN assume .val has been set to .
+
+Tue Jan 18 16:19:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: Disable multiple $CODE$ subspace code. It
+ confuses GDB for some unknown reason.
+ * cofnig/obj-som.c: Likewise.
+
+Tue Jan 18 19:05:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * literal.c (add_to_literal_pool): Handle duplicates of values
+ already written to literal pool.
+
+Tue Jan 18 17:23:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-aout.c (obj_aout_frob_symbol): Try to get symbols
+ with explicitly marked stabs through BFD: if a symbol marked
+ N_UNDF | N_EXT is in the absolute section, move it to the
+ undefined section; move a symbol marked N_INDR into
+ bfd_ind_section and set the BSF_INDIRECT flag; set the
+ BSF_WARNING flag for a symbol makred N_WARNING.
+
+Mon Jan 17 15:40:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.h (ecoff_set_gp_prolog_size): Declare.
+ * ecoff.c (ecoff_set_gp_prolog_size): Return type is void.
+
+Mon Jan 17 00:18:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): Explicitly check for comma before 'u'
+ and 'f' template operand.
+
+ * config/tc-hppa.c (pa_ip): Handle 'N', 'O', 'o', '0', '1', 'u',
+ and '2' in copr and sfu instruction templates.
+
+Sun Jan 16 16:44:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * as.h (subseg_force_new): Add prototype.
+
+Sat Jan 15 09:20:55 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * app.c (do_scrub_next_char): Allow lines like " foolab :".
+
+ * read.c (emit_expr): Fix computation of mask.
+ * config/obj-elf.c (obj_elf_section): Fix loop termination test.
+
+Thu Jan 13 16:15:15 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * ecoff.c (ecoff_set_gp_prolog_size): New function.
+ (current_file_idx): New static variable.
+ (add_file): Use and increment current_file_idx instead of indx
+ parameter.
+
+ * struc-symbol.h (struct symbol): Make all bitfields unsigned.
+
+ * config/tc-i960.c (i960_validate_fix): Added argument
+ add_symbolPP. Indirect through it to get "add_symbolP".
+ * config/tc-i960.h (i960_validate_fix): Supply prototype.
+ (TC_VALIDATE_FIX): Pass address of add_symbolP.
+
+ * configure.in (i386-*-netbsd*): New target, using te-netbsd.h.
+ (i386-*-netbsd0.8): New target, like 386bsd.
+
+ * configure.in: Set BFDDEF in Makefile to "define" or "undef".
+ * Makefile.in (config.h): Protect against multiple inclusions.
+ Define or undef BFD_ASSEMBLER as specified by $(BFDDEF).
+ (ALL_CFLAGS): Omit $(BFDDEF).
+ * as.h: Include config.h.
+ (struct symbol): Added forward declaration.
+ (add_to_literal_pool): Fix declaration.
+ * as.c: Don't include config.h.
+
+ * literal.c (add_to_literal_pool): Take symbol and addend as
+ arguments, instead of expression, for now. Fix calculation of
+ offset to return.
+
+ * subsegs.h (segment_info_type) [NEED_LITERAL_POOL]: Add field
+ literal_pool_size.
+
+Thu Jan 13 12:14:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu
+
+ * subsegs.c (subseg_get): Accept new argument "force_new". If
+ set then a new segment is always created. All callers changed.
+ (subseg_force_new): New function. Similar to subseg_new, but
+ always force a new segment to be created.
+
+ * config/obj-som.c (som_frob_file): Call adjust_code_sections
+ for each section.
+ (adjust_code_sections): New function. Adjusts the VMA for all the
+ $CODE$ subspaces.
+
+ * config/tc-hppa.c (md_assemble): Also handle creating a fixup
+ for the unwind descriptors if a function's label follows the
+ .PROC and .ENTRY directives.
+ (pa_entry): Don't set BSF_FUNCTION for the label symbol here; it
+ is done elsewhere. Don't create a fixup for the unwind
+ descriptors if the function's label has not been defined yet.
+ (pa_proc): For SOM, place each procedure within a new $CODE$
+ subspace. Adjust the segment and frag for the associated
+ function label if it exists.
+
+Wed Jan 12 22:05:33 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (hppa_fix_struct): Add new "segment" field.
+ (hppa_fix_new): Initialize segment field.
+ (md_apply_fix): Do nothing for pc-relative fixup which involves
+ crossing a segment boundary.
+ (pa_procend): Undefine the current label after handling .PROC
+ and .PROCEND directives.
+ (dummy_symbol): Make type "symbolS *". Change references as
+ appropriate.
+
+Wed Jan 12 13:29:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (read_a_source_file): Cast array argument to unsigned
+ char.
+ * write.c (adjust_reloc_syms): Remove unused variable symseginfo.
+ (write_object_file): Don't define punt_it if it won't be used.
+ (fixup_segment): Don't define skip if it won't be used.
+
+ * config/tc-mips.h (TARGET_FORMAT): Define as mips_target_format.
+ (mips_target_format): Declare.
+ * config/tc-mips.c (mips_target_format): Define with appropriate
+ default definition.
+ (md_parse_option): If -EL or -EB is used, change byte_order and
+ mips_target_format as appropriate.
+
+Tue Jan 11 21:52:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * app.c (do_scrub_next_char): Another attempt to fix bugs
+ dealing with labels without colons (for HPPA and MRI).
+
+Tue Jan 11 17:01:06 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Truncate args to %hi/%lo to 32 bits.
+
+ * expr.c (integer_constant): Fix computation of too_many_digits.
+ Variable digit_2 renamed to start. Fix check for whether number
+ will fit in 32 bits.
+ * read.c (emit_expr): Use valueT instead of long.
+
+Tue Jan 11 13:01:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.c: If TC_MIPS, include elf/mips.h.
+ (special_sections): Define.
+ (obj_elf_special_section): Get default types and attributes from
+ list of special sections.
+ * config/tc-mips.c (ELF_TC_SPECIAL_SECTIONS): Define.
+
+ * config/obj-ecoff.c (ecoff_frob_file): Force .sdata and .sbss
+ sections to be close together.
+
+ * config/tc-mips.c (macro): Corrected $at warnings in a couple of
+ spots.
+
+ * listing.c (listing_prev_line): New function.
+ * listing.c: Include subsegs.h.
+ (listing_prev_line): New function.
+ (calc_hex): Reset byte_in_frag to zero for each new frag.
+ * config/tc-mips.c (append_insn): Call listing_prev_line after
+ emitting nop instructions.
+ * Makefile.in (listing.o): Depends upon subsegs.h.
+
+Mon Jan 10 09:52:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): Put check for missing label on .PROC
+ here. Handle case where label may be defined after the .PROC.
+ (pa_proc): It is not an error if the procedure's label isn't
+ defined before the .PROC directive.
+
+Sun Jan 9 04:43:30 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/te-netbsd.h: New file.
+ * config/tc-i386.h (TARGET_FORMAT) [TE_NetBSD]: Use bfd target
+ a.out-netbsd-386 for this configuration.
+
+Fri Jan 7 17:38:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_stab): Don't clobber the ECOFF symbol information
+ with the associated stabs information.
+ (ecoff_build_symbols): Never set the type of stabs symbols to
+ st_Global. Don't update the symbol index or ifd if the gas symbol
+ is not the same as the ECOFF symbol (which is now the case for
+ stabs symbols).
+
+Fri Jan 7 11:14:07 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * config/tc-mips.c (macro): Add a LOSING_COMPILER ifdef that
+ splits the function.
+ (macro2): New function, if LOSING_COMPILER defined.
+
+Fri Jan 7 09:38:25 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * config/obj-coffbfd.c (fill_section): Don't ever fill past the
+ end of a section. (write_object_file): Temporary fix - setup
+ stdoutput.
+
+Thu Jan 6 18:05:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/tc-sparc.c (tc_gen_reloc): Fix handling of addends in
+ non-pcrel_offset relocations.
+
+Thu Jan 6 01:06:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Warn about using $1 as well as $at
+ without .set noat.
+
+Wed Jan 5 14:22:22 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * literal.c: New file.
+ * Makefile.in (REAL_SOURCES, OBJS): List it.
+
+ * as.h (DEBUG): Don't define.
+ (struct expressionS, struct fix): Declare in case they're used in
+ prototypes.
+ (add_to_literal_pool) [BFD_ASSEMBLER]: Declare.
+
+ * config/tc-mips.h (TARGET_FORMAT) [OBJ_AOUT]: Fix for new names
+ in bfd.
+
+ * subsegs.c (subseg_get): New function. Creates segment if
+ needed, returns pointer, but doesn't change current segment.
+ (subseg_new): Use it.
+
+Tue Jan 4 15:12:43 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * Makefile.in (INCLUDES): Add $(srcdir)/.. to places to search.
+ * config/obj-ecoff.c: Include files as "bfd/" instead of "../bfd/".
+ * app.c, flonum.h, hex-value.c (const): Change #if to be more
+ portable.
+
+Tue Jan 4 22:11:34 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * config/ho-vsta.h, configure.in: Add support for VSTa
+ micro-kernel.
+
+Thu Dec 30 15:27:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * write.c (write_relocs): bfd_perform_relocation now takes an
+ additional argument, to return an error string (which we ignore).
+
+Wed Dec 29 14:37:26 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * write.h (struct fix): Field tc_fix_data should be type PTR, not
+ void*, for compatibility with non-ANSI compilers. Added
+ single-bit field "fx_done".
+
+Sun Dec 26 14:31:47 1993 Torbjorn Granlund (tege@adder.cygnus.com)
+
+ * tc-hppa.c (pre_defined_registers): Convert to lower case.
+ Delete spurious register names "%r4L", etc.
+ (selector_table): Sort and convert to lower case.
+ (cons_fix_new_hppa): `reloc_type' => `rel_type'.
+ (pa_ip): Always use strcmp for non-text and strcasecmp for text.
+ (reg_name_search): Rewrite to call strcasecmp only once per
+ iteration.
+ (pa_chk_field_selector): Rewrite to use binary search.
+ (pa_parse_neg_add_cmpltr): Use strcasecmp for completer comparisons.
+ (pa_parse_space_stmt): $TEXT$ and $PRIVATE$ are symbols; use case
+ sensitive comparisons.
+ (pa_parse_space_stmt): Canonicalize strncasecmp arg to lower case.
+ (pa_space): "$text$" => "$TEXT$"; "$private$" => "$PRIVATE$". Use
+ case sensitive comparison for all symbolic names.
+ (pa_subspace): Canonicalize strncasecmp arg to lower case.
+ (pa_subspace_start): Use case sensitive comparison for symbolic names.
+
+Mon Dec 20 10:37:48 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * write.c (adjust_reloc_syms) [RELOC_REQUIRES_SYMBOL]: If no
+ symbol is present (i.e., relocation against absolute), create a
+ phony local symbol, and use it in the reloc.
+ (fixup_segment): When adjusting a reloc with an absolute symbol,
+ have TC_FORCE_RELOCATION control clearing add_symbolP too.
+ * config/tc-sparc.h (RELOC_REQUIRES_SYMBOL): Define, for OBJ_COFF.
+
+ * symbols.c (S_IS_EXTERNAL, S_IS_LOCAL): Don't use both BSF_EXPORT
+ and BSF_GLOBAL, since they're the same.
+
+ * as.c (main): Only invoke md_end if it's defined as a macro.
+ * tc.h (md_end): Don't declare it.
+ * config/tc-*.[ch] (md_end): Deleted, in cases where it doesn't do
+ anything.
+ * config/tc-vax.c (vip_end): Deleted null function.
+ * config/tc-mips.c (md_mips_end): Renamed from md_end.
+ * config/tc-mips.h (md_mips_end): Declare.
+ (md_end): New macro, calls md_mips_end.
+
+ * write.c (write_object_file): Don't close output file.
+ * as.c (main): Close output file (if needed) after calling
+ listing_print, which should be after calling write_object_file,
+ which sets the frag addresses.
+
+ * config/obj-coff.c (obj_coff_dim, obj_coff_endef, obj_coff_line,
+ obj_coff_scl, obj_coff_size, obj_coff_tag, obj_coff_type,
+ obj_coff_val): Add unused int argument to satisfy prototypes; goes
+ with Ian's 10 Sep changes.
+ (S_GET_DATA_TYPE, S_SET_DATA_TYPE, S_GET_STORAGE_CLASS,
+ S_SET_STORAGE_CLASS): Now function instead of macros.
+ (obj_emit_lineno) [BFD_ASSEMBLER]: Deleted.
+ (tag_insert): Local var ERROR_STRING is const. Use "const" not
+ "CONST" for argument NAME. Fixed prototype.
+ (coff_frob_symbol): Removed explicit "#if 1" directive. If
+ S_IS_EXTERNAL, set storage class to C_EXT.
+ (s_get_name): Use "const" not "CONST".
+ * config/obj-coff.h (S_GET_DATA_TYPE, S_SET_DATA_TYPE,
+ S_GET_STORAGE_CLASS, S_SET_STORAGE_CLASS): Deleted.
+ (obj_emit_lineno): Declare only for non-BFD_ASSEMBLER. For
+ BFD_ASSEMBLER, define as macro that aborts.
+ (obj_extra_stuff, tc_headers_hook): Declare only for
+ non-BFD_ASSEMBLER.
+ (coff_frob_symbol): Fix prototype.
+
+Sun Dec 19 00:37:20 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (tc_gen_reloc): Test of pcrel_offset had sense
+ reversed.
+
+Thu Dec 16 21:13:11 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_begin): Initialize "dummy_label".
+ (tc_gen_reloc, SOM version): For relocations which have no symbol,
+ set sym_ptr_ptr to dummy_label. Avoids lossage in generic BFD code.
+
+Thu Dec 16 16:07:56 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * read.c (lex_type): No longer make '[' a valid character for
+ symbol names.
+
+ * config/tc-vax.c (tc_aout_fix_to_chars): Local variable
+ NBYTES_R_LENGTH now const.
+
+ * config/obj-*.c, config/tc-*.c: Omit superfluous "return"
+ statements at ends of functions. Don't check for null return from
+ hash_new, since it won't return at all if there's no memory
+ available. Also, check for null return from hash_insert, rather
+ than zero-length string, as success indicator.
+
+ * subsegs.c (section_symbol): New function.
+ * subsegs.h (section_symbol): Declare.
+ * write.c (adjust_reloc_syms): Use it.
+
+Wed Dec 15 15:39:53 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * Makefile.in (RUNTEST): New variable.
+ (CHECKFLAGS): Pass it down.
+
+ * ecoff.c (ecoff_directive_frame): Permit extra trailing operands;
+ unused for now, but supplied by Alpha OSF1 compiler.
+
+ * as.h: Protect against multiple inclusions.
+ (int_to_gen): Don't declare.
+
+ * config/atof-vax.c (atof_vax): NULL is not a valid character
+ constant.
+
+Tue Dec 14 21:38:25 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * configure.in (hppa*-*-osf*): Do not consider this a developmental
+ configuration.
+
+ * config/tc-hppa.c (md_apply_fix): Handle cases where no
+ relocation will be emitted for 32bit formats.
+
+Mon Dec 13 23:33:40 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Do not call hppa_field_adjust
+ for any of the 'T' field selectors.
+
+Sat Dec 11 11:23:12 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/tc-h8500.c (build_bytes): Get reloc type right for a
+ %page operation. (md_assemble): Don't modify input_line_pointer.
+ (mdcoff_sizemachdep): New function.
+ * config/tc-h8500.h (TC_COFF_SIZEMACHDEP): New macro.
+ * config/tc-z8k.c (get_operand): Delete bogus check.
+
+Wed Dec 8 16:31:51 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * write.c (number_to_chars_*): Delete bogus range check.
+
+ * output-file.c (TARGET_ARCH): No default.
+
+Tue Dec 7 16:02:53 1993 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/tc-sh.c (md_convert_frag): Truncate disps before calling
+ md_number_to_chars. (md_assemble): Don't modify
+ input_line_pointer.
+
+Mon Dec 6 11:49:03 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-h8300.c (md_assemble): Don't update input_line_pointer.
+
+Mon Dec 6 11:20:02 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/obj-som.[ch] (obj_read_begin_hook): Remove last change.
+ Breaks with the HP compilers.
+
+ * config/tc-hppa.c (struct call_info): Remove fields which were
+ set but never used. Remove all code which sets those fields.
+ (struct subspace_dictionary_chain): Likewise.
+ (struct space_dictionary_chain): Likewise.
+ (pa_desc): Delete useless function. Delete all references.
+ (hppa_tc_make_sections): No need to count the number of symbols for
+ the symbol extension section.
+
+Sun Dec 5 17:05:29 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/obj-som.c (obj_som_version): Pass version string to
+ SOM BFD backend.
+ (obj_som_copyright): New function. Much like obj_som_version.
+
+ * config/tc-hppa.c (obj_copyright): Define as appropriate for
+ SOM and ELF.
+ (pa_copyright): Just a stub now.
+
+ * config/obj-som.c (obj_read_begin_hook): Delete unused function.
+ * config/obj-som.h (obj_read_begin_hook): Provide dummy definition.
+ (TARGET_SYMBOL_FIELDS): Delete. SOM isn't making use of them.
+
+ * config/tc-hppa.c (tc_gen_reloc, SOM version): Handle relocation
+ expansion due to rounding mode selectors. Handle R_[RDSN]_MODE
+ relocations for selecting the current rounding mode.
+
+ * config/tc-hppa.c (evaluate_absolute): Support e_rrsel and
+ e_rlsel field selectors.
+
+Fri Dec 3 18:33:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.h: If ECOFF_DEBUGGING, undef
+ SEPARATE_STAB_SECTIONS and INIT_STAB_SECTION, and define
+ OBJ_PROCESS_STAB to call ecoff_stab.
+ * config/obj-elf.c: Don't compile obj_elf_init_stab_section if
+ INIT_STAB_SECTION is not defined.
+
+Fri Dec 3 10:56:40 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_apply_fix): Delete old wrapper function.
+ (md_apply_fix_1): Rename to md_apply_fix. Fix argument decls.
+ Fix comments in various places. Always return a value.
+ Avoid dereferencing a NULL fx_addsy.
+ (hppa_force_relocation): Avoid dereferencing a NULL fx_addsy.
+
+ Fri Dec 3 09:47:30 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
+
+ * tc-hppa.c: (tc_gen_reloc): Addend for a plabel relocation should
+ be either 0 or 2 (no static link or static link required). Always
+ assume no static link.
+
+Thu Dec 2 11:52:21 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-sparc.c (tc_gen_reloc): Make adjustment to addend be
+ dependent on howto fields, not on format flavour.
+
+ * struc-symbol.h (struct symbol): New fields sy_obj and sy_tc,
+ defined as types OBJ_SYMFIELD_TYPE and TC_SYMFIELD_TYPE, if those
+ macros are defined.
+ * config/obj-coff.h (TC_SYMFIELD_TYPE, OBJ_SYMFIELD_TYPE): Define.
+ (TARGET_SYMBOL_FIELDS, I960_SYM_FIELDS): Don't define.
+ (sy_tc, sy_obj): Define so that the fields look like they used to,
+ until all references get changed.
+
+ * write.c (fixup_segment): Lots of variables no longer register.
+ Reordered some code for easier reading.
+ * config/obj-coff.c (obj_coff_dim): dim_index no longer register.
+ Deleted superfluous return statement.
+ (obj_coff_line, obj_coff_size, obj_coff_scl, obj_coff_type,
+ obj_coff_val, tag_init, tag_insert): Deleted superfluous return
+ statement.
+ (align, obj_coff_section): Deleted debugging printfs.
+ * config/tc-i386.c (md_assemble): Discard some register decls.
+ Use assignment rather than memcpy to copy template.
+ (op_hash, reg_hash, prefix_hash): Default C initialization of
+ statics is sufficient.
+ * config/tc-sparc.c (print_insn): Array Reloc is now const, and
+ points to const.
+
+ * config/obj-coff.h (TARGET_FORMAT): Only use coff-sparc-lynx if
+ TE_LYNX; use coff-sparc otherwise.
+ [USE_NATIVE_HEADERS]: Delete this code; it isn't used.
+
+ * write.c (fixup_segment): Call TC_VALIDATE_FIX, if defined,
+ before processing a fixup. Call TC_ADJUST_RELOC_COUNT just before
+ returning. Remove some i960-coff-specific code.
+ (TC_ADJUST_RELOC_COUNT): Default to doing nothing.
+ * config/tc-i960.h (TC_ADJUST_RELOC_COUNT) [OBJ_COFF]: Define.
+ (i960_validate_fix): Declare.
+ (TC_VALIDATE_FIX): Define.
+ * config/tc-i960.c (i960_validate_fix): New function.
+
+ * write.c (number_to_chars_littleendian): New function. Write out
+ bytes in little endian order, doing size and range checking.
+ (number_to_chars_bigendian): New function, similar.
+ * write.h: Declare them.
+ * config/tc-*.c (md_number_to_chars): Use them.
+ * config/tc-vax.c (md_apply_fix): Ditto.
+ * config/tc-i386.c (md_apply_fix): Ditto.
+
+ * config/obj-coff.c: Rearranged code for handling line number
+ data.
+ (line_fsym): Renamed from function_lineoff in BFD_ASSEMBLER case,
+ since the usage is different from non-BFD_ASSEMBLER case.
+ (in_function, clear_function, set_function): New macros, to
+ combine some of the functionality implemented in differnet ways in
+ BFD_ASSEMBLER and non-... code. Used in other functions that used
+ to check function_lineoff &c.
+ (obj_emit_lineno): Split into two copies, one for BFD_ASSEMBLER,
+ one for not. Non-BFD_ASSEMBLER version now has temporary variable
+ to contain char* pointer pointed to by char** argument. Always
+ follow CROSS_COMPILE code; easier to read that way.
+ (obj_coff_ln): Don't call add_lineno or c_line_new if appline is
+ set.
+ (obj_coff_endef) [BFD_ASSEMBLER]: Don't do anything special for
+ ".bf", it's been done elsewhere.
+ (coff_frob_symbol): If ilne number data is pending, call
+ add_linesym to flush it.
+ (coff_frob_file): Don't do that here.
+ * config/obj-coff.h (coff_frob_file): Declare.
+ (obj_frob_file): Define, to call it.
+
+ * config/tc-sparc.h (md_create_short_jump, md_create_long_jump,
+ md_estimate_size_before_relax: Define them as macros calling
+ as_fatal.
+ * config/tc-sparc.c: Don't define them as functions.
+
+ * configure.in: Handle target alpha-*-osf*. (No cpu files yet.)
+
+Wed Dec 1 23:37:14 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Makefile (clean): Depend on clean-here.
+
+Wed Dec 1 11:35:21 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * config/ho-go32.h: Include fopen-bin.h.
+ * as.h: If FOPEN_WB isn't defined, include fopen-same.h.
+ * output-file.c (output_file_create): Use FOPEN_WB instead of "w".
+ * input-file.c (input_file_open): Use FOPEN_RT instead of "r".
+ * listing.c (file_info): Use FOPEN_RB instead of "rb".
+ * read.c (s_include): Use FOPEN_RT instead of "r".
+
+ * stabs.c: Include obstack.h.
+
+ * tc.h (md_create_long_jump): Don't declare if it's already
+ defined as a macro.
+ (md_create_short_jump, md_estimate_size_before_relax): Ditto.
+
+ * messages.c (as_perror) [BFD_ASSEMBLER]: Use bfd_errmsg instead
+ of strerror. Clear bfd_error.
+
+ * config/te-lynx.h (LOCAL_LABELS_FB): Define, if not already
+ defined.
+
+Wed Dec 1 10:41:56 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (hppa_elf_mark_end_of_function): New function.
+ (pa_process_exit, pa_procend): Call it for ELF objects.
+
+Wed Dec 1 12:10:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (macro): Subtract 8 from offset in non PIC l.d
+ case. See comment. From wilson@cygnus.com: for M_L_DAB, set
+ coproc before doing goto ld.
+
+Tue Nov 30 13:40:30 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * write.c (TC_FORCE_RELOCATION): Provide a default definition.
+ (fixup_segment): Allow the target machine to specify that a
+ relocation must be generated for a particular fixup. Remove
+ #ifndef TC_HPPA hack.
+
+ * config/tc-hppa.h (TC_FORCE_RELOCATION): Define.
+
+ * config/tc-hppa.c (md_apply_fix_1): Never change fx_addsy to
+ be NULL. Only fixup_segment is supposed to do that.
+ (hppa_force_relocation): New function.
+
+Tue Nov 30 11:21:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (stabs.o): Added dependencies.
+
+ * config/obj-ecoff.c (ecoff_frob_file): Don't call bfd_set_symtab.
+
+Sun Nov 28 12:11:40 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * app.c (do_scrub_next_char): Output a TAB before any
+ .app* directive.
+
+ * config/tc-hppa.c (fix_new_hppa): Make sure a sub_symbol
+ exists before trying to peek at its name.
+ (pa_space): Do not call pa_align_subseg. See hppa/unsorted/align3.s
+ for testcase.
+ (pa_align_subseg): Delete unused/unwanted function.
+
+Sat Nov 27 22:49:07 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * read.c (read_a_source_file): Fix test for when to stick a colon
+ on the end of a label. Make code conditional on either MRI or
+ LABELS_WITHOUT_COLONS.
+
+ * app.c (do_scrub_next_char): If a line begins with whitespace, leave
+ the single whitespace character alone. Eat all others.
+
+ * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define.
+
+Wed Nov 24 01:22:54 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_procend): Do not call process_exit.
+ (exit_processing_complete): Delete unwanted variable and all
+ references.
+
+Wed Nov 24 02:31:38 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ecoff.c (ecoff_setup_ext): Renamed from ecoff_build_ext.
+ Changed to not actually build the external symbol information, as
+ that is now done by the ECOFF back end.
+ (ecoff_build_debug): Changed accordingly.
+ * ecoff.h (obj_ecoff_set_ext): Declare. obj-format.c function
+ called by ecoff_setup_ext.
+ * config/obj-ecoff.c (ecoff_frob_file): If debug_info count is 0,
+ set corresponding pointer to NULL. Don't set raw_size and
+ raw_syments.
+ (obj_ecoff_set_sym_index): Removed.
+ (obj_ecoff_set_ext): New function.
+ * config/obj-ecoff.h (obj_set_sym_index): Don't define.
+ (obj_ecoff_set_sym_index): Don't declare.
+ * config/obj-elf.c (obj_ecoff_set_ext, elf_get_extr,
+ elf_set_index): New functions used for ECOFF_DEBUGGING.
+ (elf_frob_file): Reworked ECOFF debug generation to use
+ new functions in bfd/ecofflink.c.
+
+Sun Nov 21 23:54:52 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_def_subspaces): Only create the unwind
+ subspace for ELF. In the SOM world, the linker is responsible
+ for creating the unwind subspaces.
+
+Fri Nov 19 16:25:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-coffbfd.c: Use PARAMS rather than EXFUN.
+ (yank_symbols): Don't call S_SET_EXTERNAL if the storage class is
+ already set. Fixes .def var; .val external_var; .scl 3; .endef.
+ (adjust_stab_section): Make static. Declare return type. Remove
+ unused variables.
+
+ * config/tc-i386.h: Declare tc_coff_fix2rtype and
+ tc_coff_sizemachdep.
+
+Fri Nov 19 04:33:59 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * write.c (write_object_file): Disable obj_check_file_symbols
+ hook; only back end using it wasn't using it correctly.
+ (write_object_file): Always call obj_frob_symbol and
+ tc_frob_symbol; always retain symbol if it's used by a relocation,
+ regardless of what these routines indicate.
+ * config/obj-coff.c (coff_frob_symbol): Renamed from
+ coff_check_file_symbols.
+ * config/obj-coff.h (obj_check_file_symbols): Deleted.
+ (coff_frob_symbol): Declare.
+ (obj_frob_symbol): Call it.
+
+ * config/obj-coff.c (obj_crawl_symbol_chain, obj_emit_strings,
+ obj_pre_write_hook): Don't define for BFD_ASSEMBLER.
+ (c_section_header): Ditto. Delete superfluous return at end of
+ function.
+
+ * config/obj-coff.h [TC_SPARC]: Include coff/sparc.h, and specify
+ coff-sparc-lynx.
+ (SA_GET_SYM_TAGNDX): Use BFD_HEADERS version for BFD_ASSEMBLER
+ too.
+ (c_section_header): Rewrite prototype so that it contains no
+ preprocessing directives. Don't declare it at all if
+ BFD_ASSEMBLER.
+
+ * configure.in (sparc*-*-lynxos): New target, using coff and
+ BFD_ASSEMBLER.
+
+ * stabs.c: New file.
+ * Makefile.in (REAL_SOURCES, OBJS): List it.
+ * read.c (STAB_SECTION_NAME, STAB_STRING_SECTION_NAME,
+ get_stab_string_offset, s_stab_generic, s_stab, s_xstab, s_desc):
+ Moved to new file.
+
+ * config/tc-sparc.c (tc_gen_reloc): Handle coff files like elf
+ files.
+
+Wed Nov 17 17:23:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in (mips-*-irix5*): New target. Use elf and mips-big.
+ * config/obj-elf.c: If ECOFF_DEBUGGING, include ecoff.h.
+ (obj_pseudo_table): If ECOFF_DEBUGGING, define ECOFF
+ pseudo-ops.
+ (obj_read_begin_hook): If ECOFF_DEBUGGING, call
+ ecoff_read_begin_hook.
+ (obj_symbol_new_hook): If ECOFF_DEBUGGING, call
+ ecoff_symbol_new_hook.
+ (obj_elf_init_stab_section): Cast alloca result.
+ (elf_frob_file): If ECOFF_DEBUGGING, finish up ECOFF debugging
+ information and write it out into .mdebug section.
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): New macro.
+ (TARGET_SYMBOL_FIELDS): Use ELF_TARGET_SYMBOL_FIELDS.
+ (ECOFF_DEBUGGING): Define if TC_MIPS.
+ (TARGET_SYMBOL_FIELDS): If ECOFF_DEBUGGING, override to add
+ fields required by ECOFF.
+ * config/tc-mips.c: Check ECOFF_DEBUGGING rather than
+ OBJ_ECOFF in many cases.
+ (mips_any_noreorder): New variable.
+ (mips_cprestore_offset): Initialize to -1.
+ (mips_frame_reg): New variable.
+ (RELAX_ENCODE, RELAX_OLD, RELAX_NEW, RELAX_RELOC1,
+ RELAX_RELOC2, RELAX_RELOC3, RELAX_WARN): New macros.
+ (md_pseudo_table): Handle "gpword" and "cpadd".
+ (md_begin): Initialize ok to false. If OBJ_ELF, set alignment
+ of text, data and bss sections to 4. Set alignment of
+ .reginfo section to 2. If ECOFF_DEBUGGING, create .mdebug
+ section.
+ (ALIGN_ERR, ALIGN_ERR2): Removed unused and useless alignment
+ check.
+ (append_insn, macro_build, macro_build_lui): Take place
+ argument. Changed all callers.
+ (append_insn): If appending a nop, don't emit one.
+ (macro_build): Changed assertion for 'i', 'j', 'o' case.
+ (gp_reference): Removed.
+ (load_address): New function.
+ (macro): If mips_noreorder is used, set mips_any_noreorder.
+ Extensive changes to handle GP and PIC symbols differently.
+ Build both possible code choices using a variant frag, and
+ make a final decision at the end of assembly when all
+ information is known. Added PIC support for all symbol
+ references.
+ (mips_ip): Don't permit anything but a number after $ for a
+ coprocessor register. Don't use .lit4 or .lit8 sections when
+ generating PIC code. If OBJ_ELF, set alignment of .lit4 or
+ .lit8 section to 4.
+ (md_apply_fix): Accept and ignore GOT16 and GPREL32 relocs.
+ (s_change_sec): Set alignment of ELF .rodata or .sdata section
+ to 4.
+ (s_mipsset): If .set noreorder, set mips_any_noreorder.
+ (s_cpload): Ignore .cpload if not generating PIC code. Warn
+ if .cpload is not in noreorder section.
+ (s_cprestore): Ignore .cprestore if not generating PIC code.
+ (s_gpword, s_cpadd): New functions.
+ (tc_get_register): Added frame argument; if true, set
+ mips_frame_reg to return value. Changed all callers.
+ (md_estimate_size_before_relax): Don't error out, but instead
+ determine how much a frag should grow.
+ (tc_gen_reloc): Return multiple relocs if appropriate, as
+ determined by md_estimate_size_before_relax.
+ (md_convert_frag): New function.
+ (mips_elf_final_processing): Set ELF header flags based on
+ mips_any_noreorder and mips_pic.
+ * config/tc-mips.h (RELOC_EXPANSION_POSSIBLE): Define.
+ (MAX_RELOC_EXPANSION): Define to be 3.
+ (md_relax_frag): Define to be 0.
+ (md_convert_frag): Don't define.
+ (tc_get_register): Changed declaration.
+
+ * ecoff.h, ecoff.c: New files pulled out of config/obj-ecoff.c to
+ support generating ECOFF debugging information for MIPS ELF
+ targets. Compiled only if ECOFF_DEBUGGING is defined. Changed
+ handling of external symbols: it now always generates exactly
+ those external symbols that are defined in the global symbol list.
+ * Makefile.in (REAL_SOURCES): Added ecoff.c.
+ (REAL_HEADERS): Added ecoff.h.
+ (OBJS): Added ecoff.o.
+ (ecoff.o): New target.
+ * config/obj-ecoff.c: Almost entirely moved into ecoff.c.
+ Remaining code mostly just calls ecoff.c code.
+ * config/obj-ecoff.h: Define ECOFF_DEBUGGING.
+ (TARGET_SYMBOL_FIELDS): Make ecoff_symbol a pointer to a
+ struct localsym.
+ (obj_read_begin_hook, obj_symbol_new_hook): Define to call
+ functions in ecoff.c.
+ (ecoff_stab): Don't declare (now declared in ecoff.h).
+ (obj_set_sym_index): Define.
+ (obj_ecoff_set_sym_index): Declare.
+
+ * frags.h (frag_grow): Declare.
+ * frags.c (frag_grow): Made non-static.
+
+ * write.c (is_dnrange): Do not define if md_relax_frag is defined.
+ (relax_segment): If md_relax_frag is defined, use it to handle a
+ frag of type rs_machine_dependent rather than looking through
+ md_relax_table.
+
+ * read.c (read_a_source_file): If we find a bad pseudo-op,
+ do a continue to go on to the next line rather than a break.
+ Removed duplicate bad pseudo-op code which was never executed.
+
+ * read.c (s_lcomm): Do not require a comma after the name.
+
+ * subsegs.h (segment_info_type): Changed hadone field to bitfield.
+ Added bss bitfield.
+ * as.c (perform_an_assembly_pass): Set bss flag for bss_section.
+ * read.c (s_lcomm): Set bss flag for .sbss section if used.
+ * write.c (relax_and_size_seg): Don't set SEC_HAS_CONTENTS for a
+ bss section. Set SEC_RELOC if there are any relocations, even for
+ a zero size section.
+
+ * write.c (write_relocs): In RELOC_EXPANSION_POSSIBLE case, base
+ data offset on reloc[0]->address rather than reloc[j]->address, so
+ that multiple relocs can affect different memory locations.
+
+ * write.c (chain_frchains_together, relax_and_size_seg,
+ adjust_reloc_syms, write_relocs): Make third argument PTR, not
+ char *, to match definition of bfd_map_over_sections.
+
+ * app.c (do_scrub_next_char): Don't interpret a comment character
+ as starting a CPP line directive unless it is a '#' and is the
+ very first characters on the line (i.e., do not permit leading
+ whitespace).
+
+ * messages.c (identify): Make file argument non-const, to match
+ callers.
+
+Tue Nov 16 20:38:21 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_ip): Fix thinko in 21bit range check.
+
+Sat Nov 13 18:22:48 1993 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * config/tc-sh.c (md_apply_fix): Cope with IMM16 type too.
+ * config/tc-z8k.c (build_bytes, md_apply_fix): Understand nDISP7
+ relocs.
+
+Fri Nov 12 16:51:47 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.[ch]: Fix assorted trivial indention problems.
+ * config/obj-som.c (obj_som_version): Add missing ';'.
+ (som_frob_file): Delete whitespace at EOL.
+
+Fri Nov 12 15:26:21 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * Makefile.in (VERSION): Updated following 2.2 release.
+
+Fri Nov 12 14:52:17 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (hppa_fix_struct): Use a real type for the
+ field selector, rather than an int. All uses of field selectors
+ fixed.
+ (tc_gen_reloc): For SOM PLABELs, always set addend to zero for now.
+ (md_apply_fix_1): Do not call hppa_field_adjust for any PLABEL
+ field.
+
+ Thu Nov 11 15:49:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_type_args): For .import statements,
+ silently ignore attempt to change the symbol type for a function
+ from ST_ENTRY to ST_CODE on .import.
+
+Wed Nov 10 16:19:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * write.h (fixS): Rename fx_callj field to fx_tcbit.
+ * write.c, config/obj-coff.c, config/obj-coffbfd.c,
+ config/tc-i960.c: Corresponding changes.
+
+Tue Nov 9 00:49:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Makefile.in (distclean): Delete config-stamp and config.h
+
+ * config/tc-hppa.c (evaluate_absolute): Avoid relying on
+ ANSI-C features.
+
+ * config/tc-hppa.c (pa_type_args): Renamed from pa_export_args.
+ Accept new argument "is_export". All callers changed. When
+ processing a .export directive for a function, do not allow
+ the user to set the type to "CODE", instead warn and set the
+ type to "ENTRY".
+
+Mon Nov 8 12:05:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip, printInsn): Handle 'k' (from Ted
+ Lemon <mellon@pepper.ncd.com>).
+ (mips_ip): Permit odd numbered floating point registers if -mips3.
+ (macro): Use BFD_RELOC_MIPS_LITERAL relocation for M_LI_SS.
+
+Mon Nov 8 07:45:01 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in: Remove h8300h, we have multilib now.
+
+Mon Nov 8 06:09:18 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
+
+ * configure.in: Support generic netware as being ELF format.
+ Recognise unixware if the user supplies it.
+
+Sun Nov 7 01:02:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * First cut at cleaning up PA instruction parsing.
+ * config/tc-hppa.c (pa_get_absolute_expression): Accept pointer to
+ insn structure as an argument, and a pointer to a string. All
+ callers changed. Always read any field selector here. Call
+ evaluate absolute to get a return value.
+ (evaluate_absolute): Addept pointer to insn structure as its
+ argument. All callers changed.
+ (INSERT_FIELD_AND_CONTINUE): New macro for inserting a bitfield
+ into an instruction and continuing the main pa_ip loop.
+ (CHECK_FIELD): New macro for simple range checking of fields.
+ (pa_ip): Delete unused variables. Use INSERT_FIELD_AND_CONTINUE
+ and CHECK_FIELD. All immediate fields now pass through
+ pa_get_absolute_expression which will also handle field selectors.
+ Delete dead code. Simplify.
+ (md_apply_fix_1): Use CHECK_FIELD to verify any fixes that are
+ applied are in range. Use bfd_put_32 rather than inserting each
+ byte of the fixed instrution into the buffer ourselves.
+
+ * write.c (fixup_segment): Delete {SEG,GLOBAL}_DIFF_ALLOWED code,
+ it was PA specific and is no longer needed (it's now handled
+ within the PA backend).
+ * config/tc-hppa.h (SEG_DIFF_ALLOWED): Delete definition.
+ * config/tc-hppa.c (fix_new_hppa): If the subtract symbol for
+ a fixup is $global$ change it to NULL as $global$ is really only
+ needed long enough to determine the base type of relocation to use.
+
+ * config/tc-hppa.c (create_new_subspace): Initialize subspace_defined.
+
+ * config/tc-hppa.c (pa-ip, case 'z'): Make field selectors work
+ for 'z' operands (target of ble branch).
+
+Sat Nov 6 22:41:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c: (update_subspace): Fix type and name of last
+ parameter. All callers fixed.
+ (md_begin, pa_chk_field_selector, pa_entry): Lint.
+
+ * config/tc-hppa.c (cons_fix_new_hppa): Reset field selector
+ to default state after it's been used.
+
+Fri Nov 5 12:08:21 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/obj-som.c (obj_som_init_stab_section): Change
+ space/subspace sort keys for the stab sections so as to avoid
+ bugs in the hp linker and pxdb.
+
+Thu Nov 4 17:00:05 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * write.c (chain_frchains_together): Update pointer to last
+ frag for a segment in the seginfo structure.
+
+Thu Nov 04 09:09:35 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * Makefile.in: Changed RUNTESTFLAGS to RUNTEST_FLAGS
+
+Wed Nov 3 12:16:27 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * write.c (fixup_segment): Handle conversion of subtraction to
+ pc-relative addressing even if pc-relative flag is already set.
+
+ * config/tc-m68k.c (m68k_ip_op): Use strchr, not index. Don't
+ declare either.
+
+ * doc/Makefile.in (distclean): Delete intermediate files from dvi
+ build, but not the dvi or info files.
+ * Makefile.in (clean-here): New target; cleans up current
+ directory only.
+ (distclean): Use it instead of clean.
+
+ * read.c (s_xstab): Don't use alloca.
+
+ * messages.c (identify): New routine; print message identifying
+ following messages as coming from assembler.
+ (as_show_where, as_bad_internal, as_bad_where): Call it.
+ (as_fatal): Don't need to identify program any more.
+
+Tue Nov 2 18:04:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Add default case to reloc switch.
+
+ * read.c (s_lcomm): Put small objects in .sbss for MIPS ELF as
+ well as MIPS ECOFF.
+ (get_stab_string_offset): Remove unused variable aligned.
+
+Tue Nov 2 15:07:07 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * tc-hppa.c: Add %dp and %rp as synonyms for %r27 and %r2 in the
+ predefined register table.
+ (pa_parse_number): Handle %rp in common register shortcut code.
+ Consistently set return value to -1 for an error. Clean up error
+ messages and only print them when "print_errors" is true. Handle
+ empty string case like the HP assembler -- assume a value of
+ zero.
+
+ * config/ho-hpux.h: Do not include ho-sysv.h. Instead include
+ standard hpux include files to pick up various function decls.
+
+ * config/ho-hppaosf.h: Delete _IO* macros. They are defined in
+ stdio.h. Delete bogus declaration of free. Get path to
+ alloca-conf.h right.
+
+Tue Nov 2 13:57:30 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * expr.c (operand): Fix checks for characters following "0b" or
+ "0f".
+
+Mon Nov 1 21:37:04 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/obj-som.h (obj_attach_unwind_info): Define as a hook
+ so GAS can attach unwind descriptor information to a BFD symbol.
+ * config/tc-hppa.c (fix_new_hppa): If necessary attach unwind
+ descriptor information to the BFD symbol.
+ (md_apply_fix): R_HPPA_ENTRY and R_HPPA_EXIT can never be "applied",
+ they are simply markers. Make R_HPPA_UNWIND_* handling OBJ_ELF
+ dependent.
+ (pa_build_unwind_subspace): Whole function is OBJ_ELF dependent.
+ (pa_entry): Build a R_HPPA_ENTRY relocation when configured for SOM.
+ (pa_exit): Likewise, but built a R_HPPA_EXIT relocation. Do not
+ build "end-of-function" symbols for SOM, they are not needed.
+
+ * config/tc-hppa.c (process_exit): Create temporary symbols with
+ correct prefixes so they can be eliminated later.
+
+ * config/tc-hppa.c (call_info struct): Delete unused "frame" field.
+ (pa_callinfo): Insert framesize into the unwind information as
+ soon as it's available.
+ (pa_build_unwind_subspace): Do not insert framesize into the unwind
+ information here.
+
+ * Add support for marker type relocations. These mark areas
+ of interest to the linker. ENTRY/EXIT relocations for SOM are
+ an example of marker relocations.
+ * write.c (write_relocs): Instead of assuming size of a relocation
+ is 4 bytes, pick up the size from relocation itself.
+ (fixup_segment): Do not complain that a value is too small for
+ marker relocations.
+
+ * struc-symbol.h: Add new "sy_used" field to the symbol structure.
+ * expr.c (operand): Set sy_used for any symbol used as an operand.
+ (expr): Likewise for any symbol used in an expression.
+ * config/tc-hppa.h (tc_frob_symbol): Define. Punt imported
+ symbols which are never used and absolute symbols which local scope.
+
+ * config/obj-som.h (obj_frob_file): Define.
+ * config/obj-som.c (obj_som_init_stab_section): Set alignment
+ of stab sections. Make space for the special stab entry.
+ (adjust_stab_sections): Adjust the special entry in the
+ stabs section.
+ (som_frob_file): New function. Simply calls adjust_stab_sections
+ for each section.
+
+Mon Nov 1 17:54:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (PIC_CALL_REG, SP, FP): Define.
+ (mips_pic, mips_cprestore_offset): New static variables.
+ (md_pseudo_table): Handle .abicalls, .cpload, and .cprestore.
+ Ignore .bgnb and .endb.
+ (gp_reference): _gp_disp is never addressed off GP.
+ (macro_build): Ignore macros while searching for insn. For cases
+ i, j, and o, accept the reloc type as an argument rather than
+ assuming BFD_RELOC_LO16. Don't try to convert BFD_RELOC_LO16 to
+ BFD_RELOC_MIPS_GPREL. Added new case a.
+ (set_at, load_register, macro): Changed calls to macro_build to
+ pass new argument for i, j and o cases.
+ (macro): Handle M_JAL_1, M_JAL_2 and M_JAL_A. These require
+ special handling when generating SVR4 PIC code.
+ (mips_ip, tc_get_register, s_frame): Use macros FP, SP, GP and AT
+ rather than hard coded constants.
+ (md_apply_fix): Handle BFD_RELOC_MIPS_LITERAL and
+ BFD_RELOC_MIPS_CALL16.
+ (s_option): Set mips_pic based on .option picN.
+ (s_abicalls): New function; set mips_pic to 2.
+ (s_cpload): New function; handle .cpload.
+ (s_cprestore): New function; handle .cprestore.
+
+ * config/obj-ecoff.c (obj_pseudo_table): Add entries for .bgnb,
+ .endb and .verstamp, setting them to s_ignore.
+
+Sun Oct 31 00:36:40 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (subspace_dictionary_chain): Add new ssd_defined
+ field. Define SUBSPACE_DEFINED accessor macro.
+ (pa_subspace): Allow user to override subspace attributes for
+ built-in subspaces. Set ssd_defined at the end of fcn -- that
+ way the attributes can only be changed once. Pass newly allocated
+ name to is_defined_subspace, not a pointer to the input line.
+ Fix typo in space/subspace rework.
+ (is_defined_subspace): Delete unused 2nd arg. All callers changed.
+
+ * config/tc-hppa.c (pa_import): If currently in the text segment
+ and a symbol is imported without type information, set BSF_FUNCTION
+ for the symbol.
+ * write.c (relax_and_size_seg): Correct test to determine if
+ the section's size was rounded up.
+
+ * config/obj-som.h (obj_set_symbol_type): Define a hook so GAS
+ can properly set all the SOM symbol types.
+ * config/tc-hppa.c (pa_symbol_type): New enum to represent the
+ symbol types which can be set from an IMPORT/EXPORT statement.
+ (pa_export_args): Set the pa_symbol_type type based on arguments.
+ If defined, call obj_set_symbol_type to pass this information on
+ to the BFD backend.
+
+ * read.c (get_stab_string_offset): Set SEC_DEBUGGING for any
+ stab section we make.
+ (s_stab_generic): Likewise.
+
+Sat Oct 30 14:26:20 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Allow backends to override the value of the fake label.
+ * write.h (LOCAL_LABEL): Delete DOT_LABEL_PREFIX code. Instead
+ assume backends will define LOCAL_LABEL if anything other than
+ 'L' is used to denote a local label.
+ (FAKE_LABEL_NAME): New macro. Defines the default name used for
+ the "fake" label.
+ * expr.c (make_expr_symbol): Delete DOT_LABEL_PREFIX code
+ and instead simply use the string defined by FAKE_LABEL_NAME.
+ (operand): Likewise.
+ * read.c (s_stab_generic): Likewise.
+ * config/tc-hppa.h (FAKE_LABEL_NAME): Define as L$0\001 so it's
+ known to be a local label.
+ * config/tc-i386.h (DOT_LABEL_PREFIX): Delete.
+ (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
+ * config/tc-m68k.h (DOT_LABEL_PREFIX): Delete.
+ (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
+ * config/te-sco386.h (DOT_LABEL_PREFIX): Delete.
+ (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
+
+ Rework space/subspace handling in PA code to fully support
+ SOM spaces/subspaces.
+ * config/tc-hppa.c (USE_ALIASES): New object-format dependent define
+ to control the use of space/subspace name aliases.
+ (update_subspace): Accept space chain entry for containing space
+ as a new parameter. All callers changed.
+ (pa_get_label): Use current_space rather than pa_segment_to_space.
+ (pa_define_label): Likewise.
+ (pa_undefine_label): Likewise.
+ (md_begin): Change into the (possibly modified) text_section.
+ (pa_parse_space_stmt): Create a new segment/space if create_flag
+ is true, and the space name is not one of the two predefined spaces.
+ (pa_subspace): Use current_space rather than a lookup via
+ pa_segment_to_space. Reset BFD section flags as required by
+ the .subspace directive. Likewise for the section alignment.
+ Pass the current space to update_subspace and create_new_subspace.
+ (pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
+ is true. When not using aliases, create a BFD section for each
+ subspace encountered. When not using aliases replace the default
+ text, data, and bss segments with new ones.
+ (create_new_subspace): When not using aliases each subspace has a
+ section/segment and subsegments are not needed, so set the subsegment
+ to zero.
+
+ * config/tc-hppa.c (pa_parse_space_stmt): If needed, call
+ obj_set_section_attributes to pass space attributes to the
+ BFD backend.
+ (create_new_space): Likewise.
+ (create_new_subspace): Likewise for subspace attributes using
+ obj_set_subsection_attributes.
+ (update_subspace): Likewise for subspace attributes using
+ obj_set_subsection_attributes.
+
+ * config/tc-hppa.c (pa_parse_space_stmt): Get segment and sort key
+ for $TEXT$ and $PRIVATE$ from the default space structure.
+
+ * config/tc-hppa.c (pa_export_args): Always set BSF_FUNCTION
+ as appropriate for the given type.
+
+ * config/tc-hppa.c (tc_gen_reloc): Preliminary stab at handling
+ SOM relocations.
+
+ * config/tc-hppa.c (pa_comm): Delete incorrect check for symbol
+ redefinition.
+
+ * config/obj-som.[ch]: New files for SOM support. Note SOM
+ support is not yet complete in GAS or BFD.
+
+ * config/ho-hppabsd.h: Delete IO* macros, they are defined in
+ stdio.h. Delete declaration of free. Include stdlib.h, unistd.h,
+ and string.h.
+
+Fri Oct 29 13:26:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * Allow backends to override the section names used for embedded
+ stabs support. Needed for SOM.
+ * read.c (STAB_SECTION_NAME): Default the name of the stab section
+ to ".stab".
+ (STAB_STRING_SECTION_NAME): Likewise for the stab strings section.
+ (get_stab_string_offset): Is now passed the full name for the
+ stab string section rather than a name prefix. All references
+ changed.
+ (s_stab_generic): New argument for the stab string section name.
+ all references changed.
+ (s_xstab): Append "str" to the stab section name to get the
+ stab string section name.
+ * config/obj-coffbfd.c (obj_coff_init_stab_section): Append "str"
+ to stab section name to get the stab string section name. Pass
+ the full name of the stab string section to get_stab_string_offset.
+ * config/obj-elf.c (obj_elf_init_stab_section): Likewise.
+
+ * config/tc-hppa.c (md_begin): Disable "-R" option to fold
+ textand data segments. Warn user "-R" is unsupported on the
+ PA.
+
+Thu Oct 28 12:36:13 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (md_pseudo_table): Default alignment is 8 for
+ .align and .ALIGN directives.
+
+ * config/tc-hppa.c (pa_space): Do not report an error for a .space
+ directive which does not define a "well-known" space and does
+ not include a space number as an argument.
+
+ * config/tc-hppa.c (pa_def_subspaces): Correct initialization of the
+ "defined", "loadable", "code_only" and "space_index" fields.
+ (pa_def_spaces): Correct initialization of the "spnum", "defined",
+ and "private" fields.
+
+ * write.h (struct fix): Add new tc_fix_data field for the various
+ backends to attach machine dependent fixup information to.
+ * write.c (fix_new_internal): Initialize new tc_fix_data field.
+ * config/tc-hppa.c (hppa_fix_struct): Delete unnecessary fix_fixP and
+ fx_next fields.
+ (hppa_find_hppa_fix): Delete unnecessary function. Fix all
+ callers to get HPPA fixup information from the tc_fix_data field
+ in the GAS fixup.
+ (hppa_fix_root): Delete unnecessary variable.
+ (fix_new_hppa): Attach HPPA fixup data to the GAS fixup.
+
+ * config/tc-hppa.c (pa_set_start_symbol); Delete unwanted
+ function. Fix all callers.
+ (subspace_dictionary_chain): Delete unused ssd_start_sym field.
+
+ * config/tc-hppa.c (hppa_fix_adjustable): New function to determine
+ if a particular fixup is adjustable.
+ * config/tc-hppa.h (tc_fix_adjustable): Call hppa_fix_adjustable to
+ perform the real work.
+
+ * config/tc-hppa.h (RELOC_EXPANSION_POSSIBLE): Move definition out
+ of OBJ_XXX conditionals.
+ (MAX_RELOC_EXPANSION): Likewise.
+
+ * config/tc-hppa.c (log2): Renamed from is_power_of_2. Fix all
+ callers. Now returns log2 (N) for positive N which are an exact
+ power of two or -1 for an error.
+
+ * config/tc-hppa.c (pa_callinfo): Range check values provided for
+ ENTRY_GR, ENTRY_FR and ENTRY_SR. Properly adjust vaues before
+ inserting them into the unwind table.
+
+ * config/tc-hppa.c (NEEDS_FIXUP): Delete definition and all references.
+ (hppa_gen_reloc_type): New object format dependent macro.
+ (pa_ip): Delete tons of code which was either OBJ_SOM or OBJ_ELF
+ conditional. The code can (and will) be shared between SOM & ELF
+ formats in the near future.
+ (cons_fix_new_hppa, md_apply_fix_1): Likewise.
+ (pa_build_unwind_subspace, process_exit, pa_exit): Likewise.
+ (tc_gen_reloc): Use hppa_gen_reloc rather than an object format
+ specific call.
+
+ * config/tc-hppa.c (pa_comm): Set the segment for a common symbol
+ to bfd_und_section.
+
+ * config/obj-elf.h (obj_elf_version): Add extern prototype.
+
+ * configure.in (hppa-*-bsd*): New configuration.
+ BFD is always used for GAS generating SOM objects.
+
+ * write.c (adjust_reloc_syms): Set sy_used_in_reloc if an
+ adjustment is rejected by the target machine.
+
+ * config/tc-hppa.c (pa_big_cons): Delete function and its
+ declaration. All callers changed to use pa_cons.
+
+ * write.c (fixup_segment): Fix indention and open/close brace
+ problem.
+
+ From Pete Hoogenboom:
+ * config/tc-hppa.c (md_atof): Return a NULL on success rather than
+ an empty string.
+
+ * config/tc-hppa.c (pa_parse_space_stmt): Advance
+ input_line_poitner when an invalid argument is encountered.
+
+Thu Oct 28 13:09:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-a29k.c (md_begin): When opcodes are mashed together in
+ the table, require that the one without bit 0x1000000 set come
+ first. Require further that it be case 'b' or 'P'. The a29k
+ opcode table already meets these constraints.
+ (machine_ip): When handling case 'i' or 'A', make sure that the
+ appropriate opcode really exists by looking at the next entry in
+ the opcode table.
+
+Wed Oct 27 11:48:56 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip): Adjust offsets for PC relative
+ fixups. Add 6 for long 7.3 case, 2 for short 7.2 case.
+
+ * config/obj-ecoff.c (obj_ecoff_ent): Ignore an optional number
+ after a .ent directive.
+
+ * config/tc-mips.c (mips_ip): Handle '>' case (shift amount
+ between 32 and 63 for double shift instruction). Do & 0x1f rather
+ than % 32.
+ (printInsn): Handle '>'.
+
+Tue Oct 26 16:58:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-ns32k.c (tc_aout_fix_to_chars): Output the symbol
+ number in the right place. Untested. Probably does not work for
+ cross assembly. From cagney@cs.adelaide.edu.au (Andrew Cagney).
+
+ * config/tc-m68k.c (md_apply_fix_2): Error if a short branch uses
+ an illegal offset of 0 or -1.
+
+ * config/obj-elf.c (obj_elf_init_stab_section): Align .stab
+ section to a longword boundary.
+
+Tue Oct 26 10:24:31 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * Makefile.in (CHECKFLAGS): Pass down RUNTESTFLAGS.
+
+ From Jeff Law:
+ * config/tc-hppa.c (tc_gen_reloc): ELF32_HPPA_R_ADDEND ->
+ HPPA_R_ADDEND.
+
+Mon Oct 25 14:06:17 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Fix up membar argument handling.
+
+Mon Oct 25 11:17:58 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * config/tc-sh.c (build_Mbytes): Write the relocs to the correct
+ address. (md_assemble): Make error handling a bit more graceful.
+ (md_apply_fix): Don't warn on non aligned displacement.
+
+ * config/tc-z8k.c (get_specific, built_bytes): Understand all the
+ aspects of lda.
+
+Mon Oct 25 10:20:31 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * doc/Makefile.in (install-info): Use "$<*" so VPATH will find
+ as.info* even if they're in $(srcdir) (e.g., for FSF
+ distributions).
+
+ * write.c (write_relocs): For relocs that are pc_relative and
+ pcrel_offset and not partial_inplace, adjust reloc->addend to
+ compensate for a bfd_perform_relocation bug.
+
+ * config/tc-sparc.h: Removed remaining non-BFD_ASSEMBLER code.
+ * config/tc-sparc.c: Ditto.
+ (tc_gen_reloc): Include fx_offset for pcrel fixups.
+
+Sun Oct 24 16:49:00 1993 Jim Wilson (wilson@x1.cygnus.com)
+
+ * tc-mips.c (md_pseudo_table): Add dword pseudo op.
+
+Fri Oct 22 20:40:56 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * messages.c: replaced all variables called Format with 'format',
+ for consistency throughout
+
+ * configure.in: handle mips*- instead of mips, mips*el for little
+ endian configurations
+
+Fri Oct 22 14:45:49 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * input-scrub.c (physical_input_file, logical_input_file,
+ physical_input_line, logical_input_line): Made static.
+ (as_where): Return current file name and line number, don't print
+ them out.
+ * messages.c (as_show_where): New static function. Other
+ functions use it instead of as_where.
+ (as_bad_internal): New static function.
+ (as_bad): Use as_bad_internal.
+ (as_bad_where): New function, like as_bad but taking a file name
+ and line number.
+ * as.h (as_bad_where): Declare.
+ (as_where): Change prototype for new arguments.
+ * write.h (fixS): Added fields fx_file and fx_line.
+ * write.c (fix_new_internal): Save file and line number in fix.
+ (fixup_segment): Use as_bad_where, not as_bad.
+ * input-file.c (f_in, file_name): Made static.
+ * cond.c (struct file_line): Just use file and line fields.
+ (s_else): Use as_where and as_bad_where, not get_file_line and
+ set_file_line.
+ (get_file_line, set_file_line): Removed.
+ * listing.c (listing_newline): Use as_where.
+ * config/obj-coffbfd.c (obj_coff_init_stab_section): Use as_where.
+ * config/obj-ecoff.c (add_file): Use as_where.
+ * config/obj-elf.c (obj_elf_init_stab_section): Use as_where.
+ * config/tc-m68k.c (md_apply_fix_2): Use as_bad_where.
+ * config/tc-mips.c (tc_gen_reloc): Use as_bad_where, not assert.
+
+Thu Oct 21 12:52:01 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-m68k.h: Don't define REGISTER_PREFIX or
+ OPTIONAL_REGISTER_PREFIX if either is already defined.
+
+ * config/tc-m68k.c (m68k_ip): Delete some code in "#if 0".
+
+ * configure.in: Set bfd_gas for all sparc targets. Added facility
+ for keeping or rejecting configurations still under development;
+ default is to assume production environment, and reject configs
+ still being worked on. Mark Elf configurations (except sparc and
+ i386) as developmental. Deleted cases matching some generic names
+ in favor of more specific names. (E.g., when we get Alpha
+ support, we'll still only support VMS for Vax.)
+
+ * config/tc-sparc.h (md_end): New macro.
+ * config/tc-sparc.c (md_end): Function deleted.
+ (BFD_RELOC_*): Delete macros that used to help keep the non-bfd
+ version compiling. All sparc targets will use bfd now.
+ * tc.h (md_end): Don't declare if it's defined as a macro.
+
+ Changes from Jeff Law and Peter Hoogenboom:
+
+ * read.c (next_char_of_string): Limit octal character constants to
+ three digits.
+
+ * config/tc-hppa.h: Major cleanup. Use GNU-style comments. Warn
+ against placing additional object-file dependent code here. Warn
+ against contaminating all of GAS with the internals of tc-hppa.c
+ through inclusion of tc-hppa.h. Delete all forward declarations
+ for functions only used within tc-hppa.c, likewise for structures,
+ variables, and #defines. Try to group OBJ_ELF and OBJ_SOM
+ conditional code in a few small places.
+
+ * config/tc-hppa.c: Major cleanup. Use GNU-style comments. Group
+ structures, global variables, forward declarations together.
+ Reduce (or in some cases eliminate) OBJ_ELF and OBJ_SOM
+ conditional code -- try to group conditional code together
+ into a few places. Make all functions and variables which
+ are only used within tc-hppa.c static. PARAMize all functions.
+ Add comments to functions. Delete unused functions, variables,
+ #defines, etc. Delete unused members within structures. Delete
+ ldil;ble hacks -- it is believed they were installed to work
+ around old gas bugs. Avoid using mixed case for local
+ functions, variables, and structures. Fix formatting problems
+ not found by GNU-indent. Add FIXME notices for things which
+ should be worked on the near future. Delete lots of old
+ useless (1.36 PA-SOM) code.
+
+ * config/tc-hppa.c: (fix_new_hppa): Initialize the fx_r_type
+ field of the fixS structure. Needed to build unwind
+ descriptors correctly.
+
+ * write.c: (fixup_segment): Allow expressions such as
+ sym1-sym2+const as long as sym2 is $global$.
+
+ * write.c (adjust_reloc_syms): Provide a hook so that a target
+ cpu configuration can reject certain relocation reductions.
+ * tc-hppa.h (tc_fix_adjustable): New macro. Only accept relocations
+ which do not involve function symbols.
+
+ * config/tc-hppa.h: Reindent with GNU-indent. Delete references
+ to OBJ_OSFROSE. Fix typos (OBJ_SOME -> OBJ_SOM). Delete unused
+ STAB_FIXUP macro.
+ * config/tc-hppa.c: Likewise.
+
+ * config/tc-hppa.c (md_apply_fix_1): Use elf_symbol_type, instead
+ of elf32_symbol_type.
+ (pa_export_args): Likewise.
+ (elf_hppa_final_processing): Likewise.
+ (pa_desc): Do not call obj_elf_desc. (Is pa_desc even needed
+ anymore?)
+ (hppa_tc_make_sections): Do not declare elf_get_symtab_map any
+ ore.
+
+ * config/tc-hppa.c: (md_section_align): Align all sections to
+ a multiple of the section alignment rather than always a
+ multiple of 8.
+
+ * config/tc-hppa.c (hppa_tc_symbol): If the argument relocation
+ bits are zero (eg they specify no relocations), then do not even
+ bother adding their entries to thesymextn section.
+
+Thu Oct 21 15:44:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-sparc.c (md_parse_option): Accept and ignore -sparc
+ option, which is used by the SunOS make default .s.o rule.
+
+Wed Oct 20 12:26:33 1993 Ken Raeburn (raeburn@rover.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip, label "immediate"): Convert relocs
+ operating on upper 32 bits of immediate constants to lower-half
+ relocs with adjusted constants.
+
+Tue Oct 19 18:13:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-m68k.h (AOUT_MACHTYPE): Define to be external variable
+ m68k_aout_machtype.
+ * config/tc-m68k.c (omagic): Remove obsolete and unused variable.
+ (m68k_aout_machtype): New variable, if OBJ_AOUT.
+ (md_assemble): Initialize m68k_aout_machtype based on
+ current_architecture, if OBJ_AOUT.
+ (md_parse_option): Remove obsolete reference to omagic.
+
+Thu Oct 14 16:51:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (md_pseudo_table): Ignore .livereg pseudo-op.
+ (s_option): Ignore .option O* and .option pic*.
+ (s_ent): Skip whitespace between symbol and optional digit.
+ (my_getSmallExpression): Handle ($xx) correctly: assume 0($xx).
+
+ * app.c (do_scrub_next_char): Always accept 'x' and 'X' as escape
+ characters in state 6.
+ * read.c (next_char_of_string): Accept \Xh* and \xh* where h* are
+ hexidecimal digits.
+
+ * config/tc-i386.c (md_apply_fix_1): Make cross segment calls work
+ for ELF by hacking around bizarre bfd_perform_relocation behaviour
+ that I don't dare change.
+
+Thu Oct 14 11:33:25 1993 Michael Meissner (meissner@osf.org)
+
+ * config/tc-i386.c: (md_begin): Do not zero static arrays. Don't
+ call strchr for each character to see if it is a special char,
+ instead add a second loop over special_chars. Set alignment
+ of text, data and bss sections to 4.
+ (pi, te, pt, pe, ps): Add declarations so that DEBUG386 can be
+ used again.
+ (reloc): Don't return 8 and 16 bit non-PC relative relocations on
+ ELF, since the ELF object format does not have these type of
+ relocations. Change the abort into as as_bad and return
+ BFD_RELOC_NONE to silence compiler warnings.
+ (md_assemble): Keep track of the instruction size. Allow white
+ space between the $ and the constant for compatibility with older
+ gases and other assemblers.
+ (i386_operand): Skip spaces between $ and expression.
+ (tc_gen_reloc): Don't allow anything but 32 bit relocations on
+ ELF. Convert abort into an as_bad and assert into as_fatal.
+
+Wed Oct 13 16:50:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-coffbfd.c (fixup_segment) [DIFF_EXPR_OK]: If
+ sub_symbolP is in the current segment, convert to a PC-relative
+ fixup and discard the symbol.
+
+Wed Oct 13 14:00:02 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-ecoff.c (ecoff_build_symbols): Handle st_End symbol
+ for st_StaticProc just like st_Proc.
+
+ * write.c (relax_and_size_all_segments): Moved #endif for OBJ_BOUT
+ so that OBJ_BOUT doesn't forget to adjust all the fragments in the
+ .bss section.
+
+Tue Oct 12 17:26:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c: If OBJ_ELF, include elf/mips.h.
+ (mips_regmask_frag): New static variable, if OBJ_ELF.
+ (md_begin): If OBJ_ELF, create .reginfo section and set
+ mips_regmask_frag to a frag.
+ (mips_elf_final_processing): New function, if OBJ_ELF. Set
+ mips_regmask_frag to register mask information.
+ * config/tc-mips.h (elf_tc_final_processing): New macro, defined
+ if OBJ_ELF.
+
+Tue Oct 12 03:33:26 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * messages.c (as_fatal): Use myname when printing messages.
+
+ * config/tc-i960.c (md_begin): Use null pointer, not empty string,
+ as initial "return" value in case hashing isn't needed.
+
+ * config/tc-a29k.c (md_atof): Return null, not empty string, on
+ success.
+ * config/tc-h8300.c (md_atof), config/tc-h8500.c (md_atof),
+ config/tc-hppa.c (md_atof), config/tc-i860.c (md_atof),
+ config/tc-i960.c (md_atof), config/tc-m88k.c (md_atof),
+ config/tc-ns32k.c (md_atof), config/tc-sh.c (md_atof): Ditto.
+
+Mon Oct 11 16:46:31 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ fix for pr 3571
+ * config/tc-h8300.c (get_specific): Special action if 8 bit
+ address seen. (check_operand): Don't complain if truncating top
+ bits of an 8 bit address. (build_bytes): Allow an immediate and
+ an absolute in the same insn.
+
+Mon Oct 11 17:18:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * write.c (write_contents): Don't crash if seginfo is NULL.
+
+ * config/obj-ecoff.c (ecoff_frob_file): Write out register masks
+ by modifying .reginfo section, not by directly modifying BFD
+ backend data.
+
+Mon Oct 11 14:11:32 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config/ho-sunos.h: remove extern time declaration
+
+Mon Oct 11 16:14:43 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * messages.c (as_fatal): Do mention that it's the assembler that
+ got the fatal error.
+
+Fri Oct 8 14:09:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_gprmask, mips_cprmask): New variables to
+ hold register masks.
+ (md_begin): Initialize them to zero.
+ (append_insn): Update mips_gprmask and mips_cprmask. Also add
+ register variables pinfo and prev_pinfo.
+ * config/tc-mips.h (mips_gprmask, mips_cprmask): Declare.
+ * config/obj-ecoff.c (ecoff_frob_file): If TC_MIPS, set gprmask
+ and cprmask from mips_gprmask and mips_cprmask.
+
+ * config/tc-mips.h: Define TARGET_FORMAT if OBJ_ELF.
+ * config/tc-mips.c (GPOPT): Define if OBJ_ECOFF or OBJ_ELF.
+ (various): Change all references to GP references to apply if
+ GPOPT, not if OBJ_ECOFF.
+ (s_change_sec): Rearrange somewhat. If OBJ_ELF, use .rodata
+ instead of .rdata. If OBJ_ELF, set section flags for .rodata and
+ .sdata sections.
+ (s_frame, s_loc, s_mask): Comment out entire functions, rather
+ than just body. They're not used anyhow.
+ * configure.in: Set cpu_type to mips for mips*. Accept
+ mips-*-elfl* and mips-*-elf*.
+
+Thu Oct 7 18:36:29 1993 Michael Meissner (meissner@osf.org)
+
+ * config/obj-elf.c (obj_elf_common): Allow the alignment field to
+ not be specified.
+
+Wed Oct 6 13:01:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (cons_fix_new_mips): New function. Turn
+ BFD_RELOC_64 into BFD_RELOC_32.
+ * config/tc-mips.h (TC_CONS_FIX_NEW): Define.
+ (cons_fix_new_mips): Declare.
+
+ Changes to let cons handle bignums like general expressions.
+ * expr.h (expressionS): New field X_unsigned.
+ * expr.c (operand): Initialize X_unsigned to 1. Set it to 0 for
+ unary minus case.
+ (expr) Fix typo resultP to right if missing operand. Set
+ X_unsigned to 1 when building new expression.
+ * read.c (potable): Make "octa" and "quad" call cons, not
+ big_cons.
+ (cons): Handle bignums. If given an O_constant (small integer) to
+ fill a big space, turn it into a bignum.
+ (parse_bitfield_cons): Set X_unsigned field.
+ (bignum_low, bignum_limit, bignum_high, grow_bignum, big_cons):
+ Removed.
+ * read.h (big_cons): Remove prototype.
+ * symbols.c (resolve_symbol_value): Don't give a warning if a
+ symbol in expr_section can not be resolved.
+ (S_SET_VALUE): Clear X_unsigned.
+ * write.c (write_object_file): If resolve_symbol_value failed on a
+ symbol we are writing out, give a warning.
+ * config/tc-h8500.c (parse_reglist): Set X_unsigned.
+ * config/tc-hppa.c (md_pseudo_table): Change "octa" and "quad" to
+ call pa_cons, not pa_big_cons.
+ (pa_big_cons): Remove.
+ * config/tc-hppa.h (pa_big_cons): Remove declaration.
+ * config/tc-i960.c (md_pseudo_table): Change "quad" to call cons,
+ not big_cons.
+
+Tue Oct 5 10:53:36 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * doc/as.texinfo (Copying): new node, to handle the recent changes
+ in the texinfo/gpl.texinfo file
+
+Mon Oct 4 17:10:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (big_cons): Handle "0" correctly.
+
+ * config/tc-mips.c (md_begin): Set target_big_endian correctly.
+
+Mon Oct 4 15:37:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip): Mode 7.3 operand using PC should
+ have pc-relative fixup.
+ (md_parse_option): Move "-k" case down near "-pic" case.
+
+ * configure.in: Alphabetize list of cpu type alternatives. Enable
+ OS values of "linux*elf*" and "linux*coff*" to select those
+ formats, with linux emulation. Don't bother checking for upper-
+ or mixed-case versions of "ose".
+
+Thu Sep 30 11:05:35 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * config/z8k.c (md_pseudo_table): add "unseg".
+
+Wed Sep 29 16:15:11 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config/m88k-opcode.h (m88k_opcodes): correct a few mistakes
+ found while extending the dissassembler.
+
+Tue Sep 28 12:02:04 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * configure.in: Split i386 LynxOS out from other coff targets,
+ add a specific Lynx emulation.
+ Add m68k LynxOS target.
+ * config/tc-i386.c: Define specific Lynx target format.
+ * config/tc-m68k.c: Define specific Lynx target format.
+ * config/te-lynx.h: New file.
+
+ * config/obj-coffbfd.h: Don't set TARGET_FORMAT to be
+ "coff-{i386,m68k}" if TARGET_FORMAT already defined.
+ (INIT_STAB_SECTION): Define.
+ * config/obj-coffbfd.c: Include <time.h>.
+ (write_object_file): Look for .stab sections and call
+ adjust_stab_section.
+ (adjust_stab_section): New function, fills in the first symbol
+ of a stab section with number of symbols and string table size.
+ (obj_coff_init_stab_section): New function, creates the initial
+ symbol for a stab section.
+
+Mon Sep 27 15:21:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/atof-vax.c (md_atof): Return null on success instead of
+ empty string.
+ * config/atof-tahoe.c (md_atof): Ditto.
+ * read.c (float_cons): Expect a null pointer for success, not an
+ empty string.
+
+ * hash.c (hash_insert, hash_jam, hash_grow): Return null pointer
+ on success, instead of empty string. All callers changed.
+
+ * config/tc-vax.c: Use PARAMS in declarations.
+ (vip_op): Use NULL instead of empty string for success in error
+ and warning fields.
+
+Sun Sep 26 23:45:29 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * expr.c (expr) [DIFF_EXPR_OK]: Permit subtraction of two symbols
+ in different defined segments.
+
+ * write.c (relax_segment): Localize "aim" variable. If
+ DIFF_EXPR_OK, don't impose checks on symbol segment types.
+ (fixup_segment) [DIFF_EXPR_OK]: If sub_symbolP is in the current
+ segment, convert to a PC-relative fixup and discard the symbol.
+
+ * config/tc-m68k.c (flag_want_pic): New variable, mostly ignored.
+ (md_parse_option) [TE_SUN3]: Set it for "-k".
+ (m68k_ip): Generate proper fixup for mode 7.3.
+ * config/tc-m68k.h (DIFF_EXPR_OK): Define.
+
+Sat Sep 25 05:08:19 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m68k.c (struct m68k_incant, getone, gettwo): Moved
+ earlier in the file.
+ (insop, add_exp): Now defined as functions, for readability.
+ (insop): Now takes two arguments; callers changed.
+
+Fri Sep 24 12:37:59 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config/tc-m88k.c (get_o6): new function.
+ (get_bf, get_cmp, get_cnd, get_cr, get_fcr, get_imm16, get_reg,
+ get_vec9, getval, get_pcr, calcop, match_name): make static and
+ prototype.
+ (s_file): remove extraneous forward decl.
+ (md_begin): add const to retval decl.
+ (calcop): cope with instructions without arguments. Handle 'o'
+ type argument, the o6 field of the prot insn.
+ (md_estimate_size_before_relax): return a dummy value.
+
+ * config/m88k-opcode.h (m88k_opcodes): comment change; o6 field is
+ in bits 10 through 7. flt.[dxs]s requires an r register in the
+ second argument. New instruction lda.x. New instruction muls
+ (alias for mul).
+
+Fri Sep 24 13:43:30 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (distclean): Recurse like clean.
+ * doc/Makefile.in (distclean): New target.
+
+ * config/tc-mips.c (md_begin): Set BFD architecture and machine
+ based on MIPS ISA level.
+
+Thu Sep 23 17:58:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * as.c (main): "exhausted", not "exhuasted".
+
+ * struc-symbol.h (struct symbol): Add sy_used_in_reloc field.
+ * write.c (adjust_reloc_syms): Set sy_used_in_reloc.
+ (write_object_file): Never strip symbols with sy_used_in_reloc
+ set.
+
+ * config/obj-elf.c (obj_elf_section): Rewrote to handle both
+ Solaris and SVR4 style .section pseudo-ops.
+ (obj_elf_ident): Set SEC_READONLY for .comment section.
+ * config/tc-sparc.c (md_apply_fix): If this is ELF, and we're
+ generating a reloc, don't apply a fix.
+
+Thu Sep 23 13:16:58 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-coffbfd.c (relax_align): Now static.
+
+Mon Sep 20 19:23:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (get_stab_string_offset): Make non-static. Make
+ arguments const. Don't align strings to 4 byte boundaries.
+ * read.h: Declare get_stab_string_offset.
+ * config/obj-elf.c (obj_elf_section): Set SEC_ALLOC as well as
+ SEC_LOAD for progbits section.
+ (obj_elf_init_stab_section): New function.
+ (adjust_stab_sections): Add casts to avoid warnings.
+ * config/obj-elf.h (INIT_STAB_SECTION): Call
+ obj_elf_init_stab_section.
+ (OBJ_PROCESS_STAB): Removed definition.
+
+Fri Sep 17 18:12:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.h (S_GET_SIZE): Define.
+ (obj_frob_forward_symbol): Define.
+ * config/tc-i386.c (line_comment_chars): Initialize in all cases.
+
+Thu Sep 16 14:23:08 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * tc.h: Declare tc_gen_reloc differently depending upon
+ RELOC_EXPANSION_POSSIBLE.
+ * config/obj-elf.c (obj_elf_section): Only set flags when first
+ creating the section.
+
+Wed Sep 15 12:15:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (append_insn): Don't swap a trap instruction
+ with a branch.
+
+Tue Sep 14 13:31:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_data, obj_elf_text): New functions;
+ set previous_section and previous_subsection and then call s_data
+ and s_text, respectively.
+ (obj_pseudo_table): Add data and text.
+ (obj_elf_section): Add SEC_LOAD to default initialization of
+ flags. Treat .rodata1 like .rodata. Set SEC_LOAD as well as
+ SEC_ALLOC for "alloc" string. Don't bother trying to find the
+ section; just use subseg_new.
+
+ * read.c (change_to_section): Removed. This is now done by
+ subseg_new.
+ (get_stab_string_offset): Rearranged somewhat. Create the section
+ using subseg_new. Store the string index in seg_info, rather than
+ in a static variable. Force the first string to be empty. Use
+ frag_more rather than FRAG_APPEND_1_CHAR.
+ (s_stab_generic): Rewrote.
+ * subsegs.h (segment_info_type): Added stabu union.
+ * subsegs.c (subseg_new): Initialize stab_string_size to 0.
+ * config/obj-aout.c: Don't include aout/stab_gnu.h.
+ (obj_aout_stab, obj_aout_desc): Removed.
+ (obj_pseudo_table): Removed desc and stabX entries.
+ * config/obj-bout.c: Same changes as config/obj-aout.c.
+ * config/obj-bout.h (S_SET_TYPE): Define.
+ (tc_bout_fix_to_chars): Declare.
+ * config/obj-coff.c (obj_coff_stab): Removed.
+ (obj_pseudo_table): Removed desc and stabX entries.
+ * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define.
+ * config/obj-coffbfd.c (current_stab_symbol): Removed.
+ * config/obj-coffbfd.h (obj_symbol_type): Removed n_strx, n_type,
+ n_other, n_desc and n_value fields.
+ (S_{S,G}ET_{OFFSET,OTHER,TYPE,DESC}): Removed.
+ (MAKE_STAB_SYMBOL): Removed.
+ * config/obj-ecoff.c (obj_ecoff_stab): Renamed to ecoff_stab.
+ Changed arguments and removed parsing code.
+ (obj_pseudo_table): Removed stabX entries.
+ * config/obj-ecoff.h (ecoff_stab): Declare.
+ (OBJ_PROCESS_STAB): Define.
+ * config/obj-elf.c: Don't include aout/stab_gnu.h.
+ (obj_elf_stab, obj_elf_xstab, obj_elf_desc,
+ elf_stab_symbol_string, elf_stab_symbol, obj_elf_stab_generic):
+ Removed.
+ (obj_pseudo_table): Removed desc, stabX and xstabs entries.
+ (obj_elf_version): Use subseg_new, not bfd_make_section. Don't
+ set SEC_LOAD for .note section.
+ (adjust_stab_sections): Get frag pointer from seg_info, rather
+ than looking through frags.
+ * config/obj-elf.h (S_{S,G}ET_{OTHER,TYPE,DESC}): Removed.
+ (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
+ Define.
+ * config/obj-vms.c (obj_aout_stab): Removed.
+ (obj_pseudo_table): Removed stabX entries.
+ * config/obj-vms.h (S_SET_TYPE): Define.
+
+ * as.h: Declare listing.
+ * read.c: Don't declare listing.
+ (emit_expr): Cast fix_new_exp argument.
+ (parse_bitfield_cons): Correct printf format.
+ * symbols.c (symbol_new): Add cast to avoid warning.
+ * write.h: Declare text_last_frag and data_last_frag.
+ * config/obj-bout.c (obj_bout_line): Added dummy argument.
+ * config/obj-coffbfd.c: Add some casts to avoid warnings.
+ * config/tc-a29k.c: Likewise.
+ * config/tc-i960.c: Likewise. Also fully bracket structure
+ initializations, fix printf formats, and remove unused variables.
+
+Mon Sep 13 16:48:38 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (s_desc): Only compile and use if S_SET_DESC is defined.
+ * struc-symbol.h: Declare verify_symbol_chain and
+ verify_symbol_chain_2 even if not SYMBOLS_NEED_BACKPOINTERS.
+ * symbols.c (verify_symbol_chain): Removed useless expression.
+ * write.c (headers, the_object_file): Only use if not
+ BFD_ASSEMBLER and not BFD.
+ (fixup_segment, cvs_frag_to_fill): Only use if BFD_ASSEMBLER or
+ not BFD.
+ (merge_data_into_text): Only use if BFD_ASSEMBLER or (not BFD and
+ not OBJ_AOUT).
+ * write.h: Declare relax_segment.
+ * config/obj-coffbfd.c (stack_pop, stack_push, stack_init): Made
+ static.
+ (stack_top): Commented out, since it's not used.
+ Fixed up pseudo-op functions to take an ignored int argument.
+ (size_section): Added default BAD_CASE to switch.
+ Changed bzero calls to memset.
+ * config/obj-coffbfd.h (S_IS_LOCAL): Call strchr on S_GET_NAME
+ (s), not on s itself.
+ * config/tc-a29k.c (s_use): Take ignored int argument. Only
+ define if OBJ_COFF is not defined.
+ * config/tc-i386.c: (fits_in_signed_byte, smallest_imm_type): Make
+ argument signed again.
+ * config/tc-m68k.c (s_bss, s_even, s_proc): Take ignored int
+ argument.
+ (m68k_ip): Fully bracket initialization of archs.
+ Correct several formats for __LINE__ to be %d rather than %s.
+ (init_table): Fully bracket initialization.
+ Cast values larger than 0x7f assigned to fr_opcode to char.
+
+ * subsegs.c: Renamed non-BFD_ASSEMBLER subseg_new to subseg_set.
+ Wrote non-BFD_ASSEMBLER subseg_new. Now subseg_new always takes a
+ section name, and subseg_set always takes a segT. Changed all
+ callers as appropriate.
+ * config/obj-coffbfd.c (change_to_section): Renamed to
+ obj_coff_add_segment. Corrected. Made callers use subseg_new.
+ * config/obj-coffbfd.h (obj_segment_name, obj_add_segment):
+ Define.
+
+Mon Sep 13 13:15:03 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-sparc.h (LOCAL_LABEL): Remove test for name[0] == 'L'.
+
+Fri Sep 10 11:22:08 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.h (S_SET_SIZE): Actually set the size.
+
+ Gcc lint.
+ * Added a number of casts to function calls.
+ * app.c (do_scrub_begin), as.c (main), expr.c (integer_constant,
+ operand, expr), read.c (read_begin, HANDLE_CONDITIONAL_ASSEMBLY,
+ read_a_source_file, s_align_bytes, demand_empty_rest_of_line,
+ ignore_rest_of_line, big_cons, is_it_end_of_statement, s_ignore),
+ read.h (is_name_beginner, is_part_of_name), config/obj-elf.c
+ (obj_elf_section), config/tc-i386.c (parse_register),
+ config/tc-sparc.c (isoctal, s_proc): Cast char
+ array indices to unsigned char.
+ * app.c (process_escape): Make static. Add prototype. Change
+ argument from char to int.
+ * as.c: Include output-file.h for prototypes. Comment out unused
+ function got_sig.
+ * Makefile.in (as.o): Depend on output-file.h.
+ * as.h (BAD_CASE): Cast val argument to long, and use %ld.
+ (pseudo_typeS): Add prototype to poc_handler field.
+ (print_version_id): Add prototype.
+ (xmalloc, xrealloc): Change size arguments to unsigned long.
+ (do_scrub_next_char): Add prototypes for function arguments.
+ (had_errors, had_warnings, scrub_from_file): Remove duplicate
+ declarations.
+ * atof-generic.c (atof_generic): Make size variables unsigned.
+ * cond.c (ignore_input): Removed unused local variable ptr.
+ * expr.c (floating_constant, integer_constant): Make static. Add
+ prototypes.
+ * flonum-copy.c (flonum_copy): Make size variables unsigned.
+ * frags.h: Add prototype for frag_init.
+ * hash.h, hash.c: Change hash values from char * to PTR, make hash
+ strings const, make returned error strings const char *. Added
+ prototypes for functions.
+ * input-file.h, input-file.c (input_file_buffer_size): Return
+ unsigned int.
+ * input-scrub.c (buffer_length): Make unsigned.
+ (input_scrub_push, input_scrub_pop): Make static.
+ * listing.c (list_symbol_table): Cast sprintf argument to unsigned
+ long and use %lx. Print name of segment rather than address of
+ structure.
+ (listing_list, listing_title): Change argument to int.
+ (listing_eject, listing_flags, listing_psize): Add int argument.
+ * listing.h: Corresponding declaration changes.
+ * obj.h (obj_emit_symbols): Rename prototype argument to avoid
+ shadowing.
+ * read.h: Change get_absolute_expression prototype to return
+ offsetT. Add prototype for next_char_of_string. Various
+ prototype changes.
+ * read.c: Remove prototype for next_char_of_string.
+ (pobegin): Make errtxt const. Make new_length, tmp_len and num
+ unsigned.
+ (s_abort, s_align_ptwo, s_comm, s_data, s_app_line, s_fill,
+ s_globl, s_lsym, s_org, s_set, s_text, s_desc): Add int argument.
+ Change all callers.
+ (s_comm): Change temp from valueT to offsetT. Cast to long when
+ printing and use %ld (only for error messages anyhow).
+ (s_long, s_int): Remove unused functions.
+ (cons): Change argument to int.
+ (emit_expr): Use %lx when printing longs.
+ (get_absolute_expression): Return offsetT, not long.
+ (get_stab_string_offset): Comment out unless
+ SEPARATE_STAB_SECTIONS.
+ (s_stab_generic): Remove unused offset. Define seg_is_new only
+ if SEPARATE_STAB_SECTIONS. Use toP only in local block.
+ * struc-symbol.h (verify_symbol_chain_2): Add prototype.
+ * symbols.c: Remove nested comment.
+ (symbol_new): Rename value to valu.
+ (colon): Use %ld and cast to long in error message.
+ * symbols.h: Remove duplicate verify_symbol_chain declaration.
+ * tc.h: Remove unused md_emit_relocations declaration.
+ (tc_gen_reloc): Add declaration.
+ * write.c (cvt_frag_to_fill): Change first argument name depending
+ on BFD_ASSEMBLER.
+ (write_relocs): Remove unused offset, frags. Remove tc_gen_reloc
+ declarations. Make n unsigned.
+ (write_contents): Remove unused i, n, relocs, fixp. Rename frags
+ to f to avoid shadowing.
+ (write_object_file): Define fragP only if not BFD_ASSEMBLER or not
+ WORKING_DOT_WORD. Remove unused keep. Only declare punt and
+ punt_it if they will be used. Make i and n unsigned.
+ (fixup_segment): Cast to long and use %ld in error message.
+ * xmalloc.c (xmalloc, xrealloc): Make size argument unsigned.
+ * config/obj-aout.h: Remove nested comment. Add prototype for
+ obj_aout_frob_symbol.
+ (obj_aout_line, obj_aout_desc): Add int argument.
+ * config/obj-ecoff.c: Changed build routines to use an unsigned
+ offset.
+ (add_string): Make len unsigned long.
+ (obj_ecoff_stab): Use %lu in error message.
+ * config/obj-elf.c (obj_elf_common): Comment out unused label
+ allocate_bss.
+ (obj_elf_frob_symbol): Return 0 (currently broken).
+ (obj_elf_desc, obj_elf_version, obj_elf_size, obj_elf_type,
+ obj_elf_ident, obj_elf_weak, obj_elf_local, obj_elf_common,
+ obj_elf_line, obj_elf_previous): Add int argument.
+ (obj_elf_write_symbol_p): Make static.
+ * config/obj-elf.h (obj_elf_write_symbol): Add prototype.
+ * config/tc-hppa.h: Remove declarations of functions declared in
+ read.h.
+ * config/tc-i386.c (ENCODE_RELAX_STATE): Cast to relax_substateT.
+ (s_bss): Add int argument.
+ (fits_in_signed_byte, smallest_imm_type): Make argument unsigned.
+ (dummy): Remove unused function.
+ (md_assemble): Rename local o to op to avoid shadowing.
+ (tc_gen_reloc): Rename local reloc to rel to avoid shadowing.
+ * config/tc-m68k.c (s_data1, s_data2): Add int argument.
+ * config/tc-mips.c (mips_ip, md_apply_fix): Cast to long and use
+ %ld in error messages.
+ * config/tc-sparc.c: Remove duplicate declarations.
+ (getExpression): Rewrite condition to avoid empty conditional
+ body.
+ (s_reg, s_proc, s_reserve, s_common, s_seg, s_xword): Add int
+ argument.
+
+Thu Sep 9 17:10:00 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ Changes from Jeff Law:
+
+ * config/tc-hppa.c (md_assemble): Fix typo.
+ (pa_ip): Delete unused variables and labels. Do not check for
+ unsigned values being < 0, it can't happen.
+ (is_same_frag): Return a value in recursive call case.
+ (pa_callinfo): Delete unused variables and labels.
+ (pa_comm): Likewise.
+ (pa_copyright): Likewise.
+ (pa_export): Likewise.
+ (pa_import): Likewise.
+ (pa_param): Likewise.
+ (pa_space): Likewise.
+ (pa_subspace): Likewise.
+
+Thu Sep 9 15:05:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (get_stab_string_offset, s_stab_generic): If
+ BFD_ASSEMBLER, call subseg_set rather than subseg_new.
+
+Wed Sep 8 15:09:17 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_section): Set SEC_LOAD when using
+ default flag values.
+
+Tue Sep 7 10:22:52 1993 Stan Shebs (shebs@rtl.cygnus.com)
+
+ * read.c: (change_to_section): Don't include body if not MANY_SECTIONS.
+
+ * read.c: (s_stab, s_xstab, s_desc): New functions to parse
+ various stab-related directives.
+ * read.h: (s_stab, s_xstab, s_desc): New function prototypes.
+ * write.c: (merge_data_into_text): Fix ifdef tangle.
+ * config/obj-coffbfd.c (current_stab_symbol): Fake symbol
+ for stab reader to use.
+ * config/obj-coffbfdh.h (obj_symbol_type): Added fields for
+ stab reader, macros to access.
+
+Fri Sep 3 16:44:03 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-elf.h (elf_symbol): No longer special-cased on
+ sparcv9, since elf_symbol_type is now independent of size.
+
+ * config/obj-elf.h (elf_symbol): Fixed name of elf_symbol_type.
+
+ * config/tc-hppa.h (struct default_subspace_dict, struct
+ default_space_dict): Field "sort" is now unsigned char.
+
+ * config/tc-hppa.c (pa_def_subspaces, pa_def_spaces): Align
+ columns for easier reading.
+ (bcmp, index): Deleted USG-specific definitions. Should be dealt
+ with in ho-*.h, or in libiberty. Changed mention of index to
+ strchr.
+ (label_symbolP, label_symbol_defined, callinfo_found,
+ within_entry_exit, exit_processing_complete, within_procedure,
+ pa_def_subspaces, pa_def_spaces, pa_pseudo_op_moves_pc,
+ label_symbols_rootP, pa_get_label, pa_label_is_defined,
+ pa_undefine_label): Now static.
+ (movers): Now const, in addition to pointing to const data.
+ * config/tc-hppa.h (label_symbolS_rootP, pa_get_label,
+ pa_label_is_defined, pa_undefine_label, pa_pseudo_op_moves_pc):
+ Delete declarations.
+
+ Merged more changes from Jeff Law and Pete Hoogenboom:
+
+ * config/tc-hppa.c (pa_def_subspaces, pa_def_subspaces): Remove
+ entries for .stab and .stabstr.
+
+ * config/obj-elf.c: (elf_stab_symbol_string): Set the
+ SEC_LOAD attribute for the .stabstr section.
+ (obj_elf_stab_generic): Set the SEC_LOAD attribute for the
+ .stab section.
+ (obj_elf_stab_generic): Change '#if 1' to '#if 0'.
+ (obj_elf_stab_generic): Incorrect byte count on call to
+ md_number_to_chars function.
+
+ * config/tc-hppa.c (hppa_tc_symbol): Static functions need
+ argument relocation bits too.
+
+ * config/tc-hppa.c (pa_stringer): Correctly handle escaping
+ characters which should appear unaltered in the output string (for
+ example an escaped double-quote).
+
+ * config/tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Always
+ initialize name.
+ (pa_parse_neg_cmpsub_cmpltr): Likewise.
+ (pa_parse_nonneg_add_cmpltr): Likewise.
+ (pa_parse_neg_add_cmpltr): Likewise.
+
+ * config/tc-hppa.h (parse_cons_expression_hppa): Remove prototype
+ for now.
+ (cons_fix_new_hppa): Likewise.
+ * config/tc-hppa.c (md_apply_fix): Fix type of valp to match
+ prototype.
+
+ * config/tc-hppa.c: Include libhppa.h.
+
+ * config/tc-hppa.h: Delete extern declarations of functions
+ found in libhppa.h.
+
+ * config/tc-hppa.c (pa_space): Rework to avoid unwanted #ifdef
+ OBJ_ELF conditionals.
+ * config/tc-hppa.h (LOCAL_LABEL): Correctly identify local labels
+ on the PA.
+
+Thu Sep 2 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (macro_build): Accept 'z', and ignore it.
+ (macro): Use "z,s,t" for div instructions to match corresponding
+ change in opcode table.
+ (mips_ip): Added 'z'--must be zero register.
+
+Wed Sep 1 15:56:42 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * write.c (write_relocs) [RELOC_EXPANSION_POSSIBLE]: Declare
+ tc_gen_reloc correctly.
+
+ * configure.in: Use "case" instead of "if" when possible. Rewrote
+ Makefile editing to reduce work done. Treat "hppa*" as "hppa".
+
+Wed Sep 1 12:19:07 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config/obj-coffbfd.c (obj_coff_section): add 'd' as an alias for
+ section type of data. 'd' seems to be used for m88k.
+
+Wed Aug 25 22:33:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_align, s_stringer, s_cons, s_float_cons,
+ s_mips_space): Set insn_label to NULL to avoid changing it at the
+ next .align statement.
+ (append_insn): Don't swap jal with instruction that sets the
+ register that jal sets.
+
+Wed Aug 25 16:15:57 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * configure.in: recognize m88110.
+
+Wed Aug 25 13:37:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ Merged changes from Pete Hoogenboom and Jeff Law at Utah:
+ * config/tc-hppa.c (pa_build_unwind_subspace): SEC_ALLOC should
+ not be on for .hppa_unwind.
+ (md_pseudo_table): .PARAM and .param are valid pseudo-ops for GAS.
+ (pa_param): New function to handle .PARAM directives.
+ (pa_ip): Pass "isbranch" argument down to pa_parse_*_compltr
+ functions. Handle '|' for movb; allow movb,n.
+ (pa_parse_nonneg_cmpsub_cmpltr): Delete old useless
+ version. Handle cases where no completer exists for
+ comb,n or addb,n.
+ (pa_parse_neg_cmpsub_cmpltr): Handle cases where no
+ completer exists for comb,n or addb,n. Make logic
+ mirror that of pa_parse_nonneg_cmpsub_cmpltr.
+ (pa_parse_nonneg_add_cmpltr): Likewise.
+ (pa_parse_neg_add_cmpltr): Likewise.
+ * tc-hppa.h (pa_param): Declare.
+
+Tue Aug 24 15:41:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-hppa.c (hppa_tc_make_symextn_section): Now static.
+ Added forward declaration.
+
+ Merged changes from Pete Hoogenboom and Jeff Law at Utah:
+
+ * config/obj-elf.c (elf_frob_file): Arguments were incorrect on
+ call to elf_tc_make_sections.
+ (obj_elf_version): A .note section shouldn't have the SEC_ALLOC
+ attribute.
+
+ * config/tc-hppa.c (hppa_tc_make_sections): Add some processing to
+ handle symbol extension sections.
+
+ * config/tc-hppa.c (pa_build_symextn_section): New function to
+ create a symbol extension section.
+ (pa_export_args): Make call to pa_build_symextn_section.
+ (hppa_tc_symbol, hppa_tc_make_sections,
+ hppa_tc_make_symextn_section): New functions.
+ * config/tc-hppa.h: Update elf_tc_symbol and elf_tc_make_sections
+ macros.
+
+ * read.c (emit_expr): Place check for TC_CONS_FIX_NEW in the
+ BFD_ASSEMBLER branch as well.
+
+ * config/tc-hppa.h: If ELF is the target object format, define
+ some ELF- and hppa-specific types and constants.
+
+ * config/tc-hppa.c (getExpression): Fix a typo.
+
+ * read.c (read_a_source_file): Use TC_EQUAL_IN_INSN to determine
+ if a `=' is part of an instruction.
+ (read_a_source_file): Handle case where end-of-line markers are
+ also used within instructions.
+ * config/tc-hppa.h (TC_EQUAL_IN_INSN, TC_EOL_IN_INSN): Define.
+
+ * config/tc-hppa.c (md_apply_fix_1): Keep relocations for
+ out-of-range branches/'calls using "bl" or calls which may need
+ argument relocation stubs. Do not need/keep relocations for
+ conditional branches.
+ (elf_hppa_final_processing): Fix calculation of function size.
+
+ * config/obj-elf.c (obj_elf_version): Mark .note section as
+ READONLY.
+
+ * config/tc-hppa.c (parse_cons_expression_hppa): Pass exp, not the
+ address of exp, to expression.
+ (pa_build_unwind_subspace): Turn SEC_HAS_CONTENTS flag on.
+ (md_apply_fix_1): Delete unwanted comments.
+ (process_exit): Symbols marking the end of a function are always
+ BSF_LOCAL.
+
+ * config/tc-hppa.c: Include elf32-hppa.h from BFD tree.
+ (pa_space): Declare and initialize gdb_section.
+
+ * config/obj-elf.c (elf_frob_file): Change
+ elf_tc_final_processing_hook to elf_tc_final_processing.
+
+ * config/tc-hppa.c (fix_new_hppa): Fix argument list to match
+ argument type declarations.
+ (getExpression): Fix typo.
+ (pa_export_args): Change elf_symbol_type to elf32_symbol_type.
+ (elf_hppa_final_processing): Likewise. Name changed from
+ elf_hppa_final_processing_hook.
+ (start_symbol_root, start_symbol_last): Deleted.
+
+ * config/tc-hppa.h (TC_PARSE_CONS_EXPRESSION): Fix typo.
+
+ * config/tc-hppa.h: Replace "symbolS" with "struct symbol" to
+ avoid changing include ordering.
+
+ * config/tc-hppa.c (pa_ip, case 'y'): Handle just like 't'.
+
+Mon Aug 23 12:47:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (set_at): Added unsignedp argument. Use
+ load_register.
+ (set_at_unsigned): Removed; changed callers to use set_at.
+ (load_register): Removed unused ip argument. Changed callers.
+ (append_insn): Don't swap branch and branch likely.
+ (macro_build): Handle 'u'.
+ (load_register): Handle 64 bit constants.
+ (macro): Added M_DABS, removed M_ABSU. Numerous changes to
+ support 64 bit constants.
+ (mips_ip): Use hex constants in range checks for clarity.
+ (md_number_to_chars): Support 8 byte values.
+
+Fri Aug 20 16:50:59 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * config/tc-m88k.h: updated copyrights.
+ (TC_CONS_RELOC): declare to be RELOC_32.
+
+Fri Aug 20 11:16:44 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_isa): New static variable.
+ (md_begin): Initialize mips_isa based on TARGET_CPU. Don't sanity
+ check macros. Set text alignment and GP size here.
+ (md_assemble): Don't set text alignment and GP size here.
+ (append_insn): Don't insert NOPs for load delays if mips_isa >= 2.
+ Use the right mask and shift for WRITE_FPR_T and WRITE_FPR_S. Add
+ a NOP after a branch likely.
+ (mips_emit_delays): Don't insert NOPS for load delays if mips_isa
+ >= 2.
+ (macro): Support r6000 and r4000 macros.
+ (mips_ip): Check insn ISA level against mips_isa before using it.
+ Added 'x' case for ignored register.
+ (md_parse_option): Handle -mipsN and -mcpu=XX.
+
+Fri Aug 20 01:26:52 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-i386.c (md_pseudo_table) [OBJ_ELF]: Handle ".zero".
+
+Thu Aug 19 12:15:18 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (s_local): Function moved and renamed...
+ * config/obj-elf.c (obj_elf_local): ...to here.
+ * config/tc-sparc.c (md_pseudo_table), config/obj-elf.c
+ (obj_pseudo_table): Move handling of ".local".
+
+ * tc.h (md_parse_option): Don't declare if defined as a macro.
+
+ * config/tc-i386.h (NO_RELOC) [BFD_ASSEMBLER]: Define as
+ BFD_RELOC_NONE.
+ (md_parse_option): New macro, converted from function.
+ * config/tc-i386.c (md_parse_option): Function deleted.
+ (comment_chars) [OBJ_ELF]: Include "/".
+ (line_comment_chars) [OBJ_ELF || TE_I386AIX]: Don't include "/".
+ (md_assemble): Cast 0xe9 to char explicitly, to avoid compiler
+ warning.
+ (md_assemble, md_estimate_size_before_relax, md_create_long_jump):
+ Call reloc for fix_new type, or use correct enumerator, instead of
+ always using NO_RELOC.
+ (i386_operand): Change "ifndef I386COFF" to "ifdef OBJ_AOUT" for
+ tests for valid section.
+ (md_convert_frag) [BFD_ASSEMBLER]: Compensate for frag start
+ address.
+ (md_apply_fix_1) [BFD_ASSEMBLER]: For pc-relative reloc with
+ symbol, compensate for location of reloc.
+ (reloc, BFD_RELOC_32, BFD_RELOC_32_PCREL) [!BFD_ASSEMBLER]: Define
+ to return zero.
+
+Wed Aug 18 16:51:29 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-elf.c: Undef NO_RELOC before including aout/aout64.h.
+ (obj_elf_weak): New function.
+ (obj_pseudo_table): Handle ".weak".
+ (obj_elf_section): If section directive includes a string, ignore
+ it for now. Accept "progbits" flag.
+ (obj_elf_type): Accept `@' before flag name.
+
+ * write.c (relax_and_size_seg) [BFD_ASSEMBLER]: Get rid of `if(1)'
+ condition.
+ (fixup_segment) [BFD_ASSEMBLER]: Use bfd_is_com_section, rather
+ than checking for bfd_com_section directly.
+ (fixup_segment): Simplify range check.
+ (fixup_segment) [OBJ_COFF && TC_I960]: Simplify cpp condition
+ test.
+
+ * symbols.h (S_SET_WEAK): Declare.
+ * symbols.c (S_SET_WEAK): New function.
+ (S_SET_EXTERNAL, S_CLEAR_EXTERNAL): Don't bother with BSF_EXPORT,
+ it's not a separate flag any more. Clear BSF_WEAK.
+
+ * read.c (potable): Treat "string" like "asciz".
+
+Wed Aug 18 15:30:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (append_insn): Don't swap branch instructions
+ if .set nobopt or .set volatile.
+ (gp_reference): .lit8 and .lit4 are accessed via the GP register.
+ (macro): Added cases M_LI_S, M_LI_SS. Fixed M_LI_D and M_LI_DD.
+ (mips_ip): Added cases 'F', 'L', 'f', 'l' for floating point.
+ * config/obj-ecoff.c: Renamed some variables to avoid shadow
+ warnings.
+
+Mon Aug 16 14:16:02 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config/obj-coff.h (S_IS_COMMON): add missing backslash
+
+ * configure.in (z8k-*-{coff,sim}): use coffbfd for this target
+
+Thu Aug 12 11:47:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Suggested by
+ davidj@ICSI.Berkeley.EDU (David Johnson): Don't accept symbolic
+ names for 'E' and 'G' argument types (coprocessor registers) and
+ don't warn if $1 is used on the coprocessor.
+ (macro): Handle M_{L,S}WC{0,2,3}_AB correctly.
+
+Mon Aug 9 12:09:14 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * read.c (emit_expr): Use BFD_RELOC_16 for 2-byte values.
+ * config/tc-sparc.c (md_apply_fix, tc_gen_reloc): Handle
+ BFD_RELOC_16.
+ * config/tc-sparc.h (WORKING_DOT_WORD): Define.
+
+Mon Aug 9 13:36:22 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * write.c (merge_data_into_text): Define only if BFD_ASSEMBLER is
+ defined or BFD is not.
+ (relax_and_size_all_segments): Declare local variable fragP.
+
+Fri Aug 6 15:22:53 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (md_apply_fix, case BFD_RELOC_32): Fill in
+ bytes with real values, not zeros.
+
+Fri Aug 6 10:57:59 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in (mips-*-riscos*, mips-*-sysv*): New (untested)
+ targets, using ecoff and mips-big.
+
+ * config/tc-mips.c (mips_ip): From davidj@ICSI.Berkeley.EDU (David
+ Johnson): Added case for 'C' for coprocessor instruction codes.
+
+Thu Aug 5 13:08:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (md_apply_fix, case BFD_RELOC_64): Fill in
+ bytes with real values, not zeros.
+ (md_pseudo_table): Call cons for .uaxword.
+
+ * config/obj-elf.c (obj_pseudo_table): Handle ".8byte".
+
+ * read.c (emit_expr): Use BFD_RELOC_64 for 8-byte expressions.
+
+ * write.c (write_object_file): Test DEBUG_SYMS instead of DEBUG
+ for verifying symbol chain.
+ (merge_data_into_text, relax_and_size_all_segments): New
+ functions, split out from write_object_file.
+
+Tue Aug 3 15:43:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_stab_generic, in disabled code): If
+ debug section is new, allocate an extra 12 bytes at its start. If
+ ".stabs" type is N_SO, fill in filename symbol field of that first
+ entry. Return early if "goof", to simplify later code slightly.
+ (adjust_stab_sections): New function.
+ (elf_frob_file): Apply adjust_stab_sections to each section.
+
+ * config/obj-elf.c (obj_elf_section, obj_elf_previous): No longer
+ static.
+ * config/obj-elf.h (obj_elf_section, obj_elf_previous): Declare.
+ * config/tc-sparc.c (md_pseudo_table): Call them for "pushsection"
+ and "popsection", and call cons for "uaword" and "uahalf".
+
+ * config/obj-elf.c (obj_elf_version): Use English in error
+ messages.
+
+Tue Aug 3 11:29:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-ecoff.c: Updated for BFD ECOFF changes. Now gets the
+ swapping routines and external structure sizes via the
+ ecoff_backend information. No longer includes coff/mips.h.
+
+Mon Aug 2 17:35:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-ecoff.c (get_tag): Save tag name in permanent memory
+ and in hash_ptr->string.
+
+ * app.c (do_scrub_next_char): Reset state to 0 after .appline if
+ file name is not seen.
+
+Mon Aug 2 11:51:41 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (md_apply_fix, case BFD_RELOC_64): New case,
+ parallel to BFD_RELOC_32.
+ (tc_gen_reloc): Accept BFD_RELOC_64.
+
+Thu Jul 29 22:21:28 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * write.c: Don't use short int in a prototype.
+
+ * expr.c (operand): Make return value simply depend on contents of
+ returned expression.
+
+Thu Jul 29 18:38:37 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: sparc*-aout and sparc*-vxworks are BFD assemblers
+
+Thu Jul 29 18:38:37 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * config/ho-sunos.h: remove some old function decls that conflict
+ w/ ANSI, and which weren't needed anyway
+
+Wed Jul 28 16:34:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-elf.h (obj_frob_symbol): Renamed from tc_frob_symbol,
+ and disabled since it breaks Ian's new symbol-value code.
+
+ * expr.c (integer_constant): Accept more digits if BFD64.
+
+Wed Jul 28 11:30:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip): If we have a normal constant when we
+ expect a bignum, turn it into a bignum. Output extra zeroes
+ before a short bignum, rather than after.
+
+Tue Jul 27 15:54:27 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * symbols.c (symbol_new): Conditionalize verify_symbol_chain call
+ on DEBUG_SYMS, not DEBUG.
+ (symbol_remove): Likewise.
+ (symbol_insert): Likewise.
+
+Tue Jul 27 08:45:05 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.c (mips_optimize): New static variable.
+ (append_insn): If mips_optimize == 0, always insert NOP
+ instructions. If mips_optimize < 2, don't swap branches.
+ (md_parse_option): If -Ox or -gx, set mips_optimize accordingly.
+
+Mon Jul 26 18:02:43 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * Makefile.in (clean): if testsuite does not exist, then skip it.
+
+Fri Jul 23 14:13:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c (prev_insn_unreordered,
+ prev_prev_insn_unreordered): New static variables.
+ (append_insn): Don't swap branch instruction if
+ prev_prev_insn_unreordered (see comment).
+ (mips_no_prev_insn): Clear the unreordered variables.
+ (s_mipsset): When turning on reordering, set the unreordered
+ variables.
+
+Fri Jul 23 13:09:44 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_section): Sections ".init" and ".fini"
+ are also magic, and have special default flag settings.
+ (obj_elf_frob_symbol): Since the return value from this function
+ isn't used, don't bother calling obj_elf_write_symbol_p, since it
+ doesn't accomplish anything else.
+
+ * config/tc-sparc.c (md_section_align): Round up section size only
+ for a.out format.
+
+ * symbols.c: Don't define DEBUG by default.
+
+Thu Jul 22 12:09:41 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * write.c (fix_new_exp): Handle a O_uminus expression.
+
+ * expr.c (expr): Don't let absolute_section override
+ undefined_section for the return value.
+
+ * read.c (read_a_source_file): In NO_PSEUDO_DOT case, if we find a
+ pseudo-op with a poc_handler field of NULL, ignore it and treat it
+ as an instruction instead.
+ * config/tc-m88k.c (md_pseudo_table): Add "set" with a NULL
+ poc_handler field.
+
+ * config/tc-h8500.c (md_begin): Use a local variable when
+ initializing md_relax_table to avoid warnings about modifying a
+ supposedly const data structure.
+
+Thu Jul 22 10:58:51 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * config/obj-aout.c: Only include aout/aout64.h if BFD_ASSEMBLER
+ is defined.
+
+Wed Jul 21 17:32:02 1993 Fred Fish (fnf@deneb.cygnus.com)
+
+ * configure.in (case ${host}): Map *-*-sysv4* to gas_host=sysv.
+ * configure.in (case ${generic_target}): Add i[34]86-*-sysv4*
+ case to set obj_format=elf. Must go before i386-*-sysv* case that
+ sets obj_format=coffbsd. Add *-*-sysv4* to *-*-elf and
+ *-*-solaris case, and move to before *-sysv* case that wants to
+ set obj_format to coff.
+ * config/tc-i386.c (i386_operand): Change all 'exp.X_op' to
+ 'exp->X_op'.
+ * config/tc-i386.c (md_apply_fix): Fix valp to be 'valueT *' for
+ BFD_ASSEMBLER case.
+
+Wed Jul 21 12:47:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-aout.c: Include aout/aout64.h.
+ (obj_aout_frob_symbol): Set BSF_DEBUGGING for a constructor
+ symbol, so that BFD doesn't tamper with the type.
+
+ * read.c (read_a_source_file): If NO_PSEUDO_DOT is defined, look
+ up opcodes as pseudo-ops even if they don't start with '.'.
+ * config/tc-m88k.h (NO_PSEUDO_DOT): Define.
+ * config/tc-m88k.c (md_assemble): Removed special pseudo-op
+ handling.
+ (md_apply_fix): Set fx_offset to the upper 16 bits of the reloc.
+ Output the low 16 bits for RELOC_HI16, not the high 16 bits.
+ * config/obj-coffbfd.c (do_relocs_for): If TC_M88K, set the
+ r_offset field of the reloc to the fixup offset.
+ (fixup_segments): If TC_M88K, don't warn about fixup overflows.
+ * doc/as.texinfo: Minor updates.
+
+Tue Jul 20 19:28:56 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Extensive changes to permit symbols to contain any expression
+ type and to delay the computation of the expression until the
+ value is actually needed. This permits setting symbols to values
+ calculated based on object code size. Expressions were changed to
+ no longer be in a section, to stop the overloading of segment and
+ expression type that previously occurred.
+
+ * as.c (big_section, pass1_section, diff_section, absent_section):
+ Removed.
+ (expr_section): Added (used for dummy symbols which hold
+ intermediate expression values).
+ (perform_an_assembly_pass): Create expr_section, do not create the
+ sections now removed.
+ * as.h (segT): Removed SEG_ABSENT, SEG_PASS1, SEG_BIG, and
+ SEG_DIFFERENCE. Added SEG_EXPR.
+ (SEG_NORMAL): Corresponding changes.
+ * subsegs.c (seg_name, subsegs_begin): Changed accordingly.
+ * write.c (write_object_file): Ditto.
+ * config/obj-aout.c (seg_N_TYPE): Ditto.
+ * config/obj-bout.c (seg_N_TYPE): Ditto.
+ * config/obj-coff.c (seg_N_TYPE): Ditto.
+ * config/obj-coffbfd.c (seg_N_TYPE): Ditto.
+ * config/obj-vms.c (seg_N_TYPE): Ditto.
+
+ * expr.h (operatorT): Moved in from expr.c, added some values.
+ (expressionS): Added X_op field, removed X_seg field; renamed
+ X_subtract_symbol to X_op_symbol.
+ * expr.c: Extensive changes to assign expression types rather than
+ sections and to simplify the parsing.
+ * write.c (fix_new_internal): New static function.
+ (fix_new): Removed sub_symbol argument.
+ (fix_new_exp): New function, takes expression argument.
+ * write.h: Prototype changes for fix_new and fix_new_exp.
+ * cond.c (s_if): Changed accordingly.
+ * read.c (s_lsym, pseudo_set, emit_expr, parse_bitfield_cons,
+ parse_repeat_cons, get_segmented_expression,
+ get_known_segmented_expression, get_absolute_expression): Ditto.
+ * symbols.c (resolve_symbol_value, S_GET_VALUE, S_SET_VALUE):
+ Ditto.
+ * write.c (write_object_file): Ditto.
+ * config/obj-coff.c (obj_coff_def, obj_coff_val): Ditto.
+ * config/obj-coffbfd.c (obj_coff_def, obj_coff_val,
+ obj_coff_endef, yank_symbols): Ditto.
+ * config/obj-elf.c (obj_elf_stab_generic, obj_elf_size): Ditto.
+ * config/tc-a29k.c (md_assemble, parse_operand, machine_ip,
+ print_insn, md_operand): Ditto.
+ * config/tc-h8300.c (parse_exp, colonmod24, check_operand,
+ do_a_fix_imm, build_bytes): Ditto.
+ * config/tc-h8500.c (parse_exp, skip_colonthing, parse_reglist,
+ get_specific, check, insert, md_convert_frag): Ditto.
+ * config/tc-hppa.c (the_insn, fix_new_hppa, cons_fix_new_hppa,
+ md_assemble, pa_ip, getExpression, getAbsoluteExpression,
+ evaluateAbsolute, pa_build_unwind_subspace, pa_entry,
+ process_exit): Ditto.
+ * config/tc-hppa.h (STAB_FIXUP, is_DP_relative, is_PC_relative,
+ is_complex): Ditto.
+ * config/tc-i386.c (pe, md_assemble, i386_operand,
+ md_estimate_size_before_relax, md_create_long_jump): Ditto.
+ * config/tc-i860.c (md_assemble, getExpression, print_insn):
+ Ditto.
+ * config/tc-i960.c (parse_expr, subs, segs, md_convert_frag,
+ get_cdisp, mem_fmt, parse_ldconst, relax_cobr, s_sysproc,
+ i960_handle_align): Ditto.
+ * config/tc-m68k.c (struct m68k_exp, struct m68k_it, seg, op,
+ subs, add_fix, isvar, m68k_ip, md_assemble, md_convert_frag_1,
+ md_estimate_size_before_relax, md_create_long_jump, get_num):
+ Ditto.
+ * config/tc-m88k.c (md_assemble, get_imm16, get_pcr,
+ md_create_short_jump, md_create_long_jump): Ditto.
+ * config/tc-mips.c (md_assemble, append_insn, gp_reference,
+ macro_build, macro, my_getExpression): Ditto. Also removed
+ get_optional_absolute_expression; just use get_absolute_expression
+ instead.
+ * config/tc-ns32k.c (get_addr_mode, evaluate_expr, convert_iif,
+ fix_new_ns32k, fix_new_ns32k_exp, cons_fix_new_ns32k): Ditto.
+ * config/tc-ns32k.h (fix_new_ns32k prototype): Ditto.
+ * config/tc-sh.c (parse_exp, check, insert, md_convert_frag):
+ Ditto.
+ * config/tc-sparc.c (md_assemble, sparc_ip, getExpression,
+ print_insn): Ditto.
+ * config/tc-tahoe.c (struct top, md_estimate_size_before_relax,
+ tip_op, md_assemble): Ditto.
+ * config/tc-vax.c (seg_of_operand, md_assemble,
+ md_estimate_size_before_relax, md_create_long_jump): Ditto.
+ * config/tc-z8k.c (parse_exp, check_operand, newfix): Ditto.
+
+Tue Jul 20 12:17:16 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: i386-lynx is the same as i386-coff
+
+Mon Jul 19 15:21:20 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_previous): New function.
+ (previous_section, previous_subsection): New vars.
+ (obj_elf_section): Save current place in case DWARF code wants us
+ to pop back to it. Handle unquoted section name as well as quoted
+ section name. Don't crash on invalid strings.
+ (obj_pseudo_table): Handle new pseudos "previous", "2byte", and
+ "4byte".
+
+ * config/obj-elf.h: Don't include struc-symbol.h.
+ (obj_elf_frob_symbol): Declare arg as struct symbol *.
+
+ * tc-sparc.h (LOCAL_LABEL) [OBJ_ELF]: Local labels can start with
+ "L" or "_.L_".
+
+ * write.c (write_relocs): New function, split off from
+ write_contents. Use memset instead of bzero.
+ (write_object_file): Apply write_relocs to each section before
+ applying write_contents.
+
+ * read.c (read_begin): Call obstack_begin with values closer to 1K
+ multiples.
+ (read_a_source_file, big_cons, float_cons): Use memcpy instead of
+ bcopy.
+
+Mon Jul 19 14:30:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip_op): Don't decrement strend when
+ calculating opP->isiz; this permits the expression size to be
+ determined as well, later on.
+
+ * expr.c (clean_up_expression): Don't cancel the subtraction of
+ undefined symbols.
+
+ * read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R,
+ switch to text section rather than data section.
+
+Mon Jul 19 12:35:39 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip, case AINDX): Add 6 to operand
+ expression (to take the pc-rel instruction itself into account)
+ before using the expression, instead of after.
+
+Fri Jul 16 08:56:04 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * read.c (float_cons): Simplified parsing logic. If
+ REPEAT_CONS_EXPRESSIONS is defined, accept a repeat count.
+
+ * symbols.c (colon): Rather than a special case for TC_HPPA,
+ use new macro tc_frob_label.
+ * config/tc-hppa.h (tc_frob_label): Define.
+
+ * config/tc-mips.c: Many changes to support simple assembler
+ optimization.
+ (insn_label, prev_insn, prev_prev_insn, dummy_opcode,
+ prev_insn_valid, prev_insn_frag, prev_insn_where,
+ prev_insn_fixp, prev_insn_is_delay_slot): New static
+ variables.
+ (insn_uses_reg, mips_no_prev_insn, mips_emit_delays,
+ mips_align, s_stringer, s_mips_space): New static functions.
+ (mips_define_label): New global function.
+ (md_pseudo_table): For "ascii", "asciz", "asciiz", call
+ s_stringer. Changed argument to float_cons from 0 or 1 to 'f'
+ or 'd'. For "space" call s_mips_space.
+ (md_begin): Call mips_no_prev_insn.
+ (append_insn): Only insert necessary NOP instructions.
+ (macro): Call mips_emit_delays before setting mips_noreorder.
+ Increment and decrement mips_noreorder rather than using
+ save_reorder_condition. Don't bother to use noreorder in
+ M_L_DOB and M_L_DAB, since append_insn will not insert a NOP.
+ (md_atof): Handle floating point numbers correctly for both
+ big and little endian targets.
+ (s_align, s_cons): Call mips_align rather than frag_align.
+ (s_change_seg, s_cons): Call mips_emit_delays.
+ (s_float_cons): Let float_cons do the work.
+ (s_mipsset): Call mips_emit_delays when setting noreorder.
+ * config/tc-mips.h (tc_frob_label): Define to be
+ mips_define_label.
+
+ * config/obj-ecoff.c (ecoff_build_symbols, ecoff_build_procs,
+ ecoff_frob_files): Consistently use S_GET_VALUE rather than
+ bfd_asymbol_value. Warn if taking difference of symbols in
+ different segments.
+
+Thu Jul 15 11:51:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-ecoff.c (ecoff_frob_file): Discard all open scopes,
+ with a warning.
+
+ * config/obj-coffbfd.c (fixup_segment): If TC_M88K, don't adjust
+ by md_pcrel_from if we are relocating against a symbol (we still
+ need md_pcrel_from for a PC relative relocation within the same
+ file).
+ * config/tc-m88k.c (md_pcrel_from): Corrected return value.
+ (omagic): Removed unused variable.
+
+ * Preliminary support for m88k-coff.
+ * configure.in (m88k-*-coff*): New target. Use coffbfd and
+ m88kcoff.
+ * config/m88kcoff.mt: New file.
+ * read.c (lex_type): New macro LEX_AT to set lex type of '@'.
+ (pseudo_set): Handle difference of symbols in different fragments
+ by saving the entire expression as the value of the symbol.
+ * symbols.c (resolve_symbol_value): Resolve difference
+ expressions.
+ * config/obj-coffbfd.c (obj_pseudo_table): If TC_M88K, accept
+ "sdef" as a synonym for "def".
+ * config/obj-coffbfd.h: If TC_M88K, include coff/m88k.h and set
+ TARGET_FORMAT.
+ (S_IS_LOCAL): Any symbol which includes \001 in the name is local.
+ * config/tc-m88k.c, config/tc-m88k.h: Numerous changes to bring
+ m88k port up to date, and to add COFF support.
+
+Wed Jul 14 15:09:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Removed sy_forward and replaced it with an undefined expression
+ as the value of a symbol.
+ * struc-symbol.h (struct symbol): Removed sy_forward field. Added
+ sy_resolved and sy_resolving single bit fields.
+ * symbols.c (symbol_new): Don't initialize sy_forward field.
+ (resolve_symbol_value): New function to adjust symbol value by
+ fragment address, using recursion to resolve forward symbols.
+ * symbols.h: Added prototype for new function.
+ * read.c (pseudo_set): Set symbolP->sy_value to an undefined
+ expression rather than setting symbolP->sy_forward.
+ * write.c (write_object_file): Use resolve_symbol_value on
+ symbols, keeping the common case (the old behaviour) inline.
+ * config/obj-aout.c (obj_aout_frob_symbol): Removed sy_forward
+ handling (subsumed by write.c change).
+ * config/obj-coff.c, config/obj-coffbfd.c (obj_coff_val): Set
+ sy_value rather than sy_forward.
+ * config/obj-coffbfd.c (obj_coff_endef, yank_symbols): Check
+ expression segment rather than sy_forward.
+ (yank_symbols): Use resolve_symbol_value.
+ (crawl_symbols): Removed extra pass over symbols.
+ * config/obj-aout.c, config/obj-bout.c, config/obj-coff.c,
+ config/obj-vms.c (obj_crawl_symbol_chain): Removed extra pass over
+ symbols which handled sy_forward; use resolve_symbol_value
+ instead.
+ * config/obj-coff.h, config/obj-coffbfd.h (obj_frob_forward_symbol):
+ Define.
+ * config/obj-elf.c (obj_elf_stab_generic): Check expression
+ segment rather than sy_forward.
+ * config/obj-vms.c (VMS_Check_For_Main): Don't initialize
+ sy_forward; do initialize sy_resolved and sy_resolving.
+ * config/tc-hppa.h (STAB_FIXUP): Use sy_value, not sy_forward.
+
+ * Changes to keep a full expression as the value of a symbol, not
+ just a longword:
+ * struc-symbol.h: New field sy_value.
+ * as.h: Include expr.h before struc-symbol.h.
+ * expr.h: Use struct symbol rather than symbolS.
+ * symbols.c (S_GET_VALUE, S_SET_VALUE): Rewrote to retrieve value
+ of sy_value field; compile unconditionally, not just if
+ BFD_ASSEMBLER.
+ * symbols.h: Compile S_{SG}ET_VALUE prototypes unconditionally.
+ * write.c (write_object_file): Set BFD symbol value to gas symbol
+ value.
+ * config/obj-aout.h, config/obj-bout.h, config/obj-coff.h,
+ config/obj-coffbfd.h, config/obj-generic.h, config/obj-vms.h
+ (S_GET_VALUE, S_SET_VALUE): Removed macro definitions.
+ * config/obj-ieee.c (S_GET_VALUE, S_SET_VALUE): Removed.
+ * config/obj-coff.h, obj-coffbfd.h: Rewrote several macros to use
+ S_GET_VALUE rather than ost_entry.n_value.
+ * config/obj-aout.c (obj_symbol_to_chars), config/obj-bout.c
+ (obj_symbol_to_chars), config/obj-coff.c (obj_symbol_to_chars),
+ config/obj-coffbfd.c (symbol_to_chars): Get value to write out
+ using S_GET_VALUE--don't assume it is already set.
+ * config/obj-ieee.c (do_symbols): Set BFD symbol value to gas
+ symbol value.
+ * config/obj-vms.c (various): Don't assign directly to
+ S_GET_VALUE; use S_SET_VALUE instead.
+
+Wed Jul 14 09:35:23 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in: Make sparc64-*-aout* use bfd gas.
+
+ * configure.in: Recognize h8300h.
+
+Tue Jul 13 12:09:44 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * config/tc-h8500.c (line_comment_chars): Add hash.
+ (parse_exp, skip_colonthing, build_bytes): Add support for
+ R_H8500_HIGH16 relocation type.
+
+Mon Jul 12 11:15:34 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * config/obj-elf.c (obj_elf_section): Allow `@' to introduce an
+ attribute name. Handle `execinstr' attribute.
+
+Mon Jul 12 07:22:28 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.c (mips_ip): Don't warn on 'i' or 'j' mismatch if
+ there is another alternative for the instruction.
+
+Fri Jul 9 17:31:34 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * doc/as.texinfo: updates for H8/300H
+
+Thu Jul 8 14:41:43 1993 Mark Eichin (eichin@cygnus.com)
+
+ * config/tc-i960.c (md_create_short_jump, md_create_long_jump,
+ md_number_to_chars, md_section_align): Adjusted to use valueT,
+ addressT, to match tc.h.
+
+Thu Jul 8 14:15:05 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (s_common): Revamp to handle both syntaxes,
+ independent of format.
+
+Thu Jul 8 07:25:25 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-h8300.h (TC_CONS_RELOC): Use R_RELLONG if h8/300h.
+
+Wed Jul 7 18:11:07 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
+
+ * configure.in: define CROSS=-DCROSS_COMPILE if it is a cross
+ build; also recognize h8300-*-coff
+
+Wed Jul 7 10:21:24 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * symbols.c (fb_label_instance, fb_label_instance_inc): Don't dump
+ core just because somebody uses a label before it is defined.
+
+ * config/mips-opcode.h: Moved to opcode/mips.h.
+ * config/tc-mips.c: Include opcode/mips.h rather than
+ mips-opcode.h.
+ (append_insn): An extra NOP is only needed after instructions
+ which set HI or LO, not after instructions which read it.
+ (macro_build, mips_ip): Support new 'E', 'G' and 'B' arguments.
+ (macro): cfc1 and ctc1 now take "t,G" rather than "t,d".
+ * config/tc-mips.h (struct mips_opcode): Don't define.
+ * config/mips-big.mt, config/mips-lit.mt (TARG_CPU_DEPENDENTS):
+ Set to $(srcdir)/../include/opcode/mips.h.
+
+ Get the MIPS assembler up to speed with other gas changes:
+
+ * config/obj-ecoff.c (ecoff_set_vma, ecoff_frob_symbol):
+ Removed; don't change the symbol value.
+ (ecoff_build_symbols, ecoff_build_procs, ecoff_frob_file): Use
+ bfd_asymbol_value rather than S_GET_VALUE to include section
+ vma in symbol value.
+ (ecoff_frob_file): Ignore BSF_SECTION_SYM symbols, since ECOFF
+ doesn't output them. Set the vma of sections.
+ * config/obj-ecoff.h: Don't define obj_frob_symbol.
+ * config/tc-mips.c (tc_gen_reloc): Adjustment by section vma is no
+ longer necessary.
+ (various): use valueT rather than long.
+
+Wed Jul 7 08:33:30 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.h (ENV64): Define for v9.
+
+ * config/tc-sparc.c (s_xword): For numbers, call big_cons.
+ (sparc_ip, md_apply_fix, tc_gen_reloc): Handle some sparc64
+ relocation types.
+ (md_number_to_chars): Handle 8-byte value.
+
+ * config/obj-elf.h (elf_symbol): For v9, use 64-bit symbol type.
+
+ * as.h (valueT): Typedef moved here.
+ * struc-symbol.h (valueT): ...from here.
+ * write.c (write_object_file): Locals from_addr, to_addr,
+ table_addr are now addressT. Supply prototype for bfd_alloc for
+ now.
+ (fixup_segment): Local add_number is now valueT. Correct some
+ range-checking bugs.
+ (relax_align): Type `int' should be sufficient for the exponent.
+ (fix_new): Argument offset is type offsetT. Locals size and
+ newsize are type valueT.
+ * write.h (struct fix): Fields fx_offset and fx_addnumber are now
+ type valueT.
+ (fix_new): Fix prototype.
+ * symbols.c (symbol_new): Symbol value is type valueT.
+ (S_SET_VALUE, S_GET_VALUE): Likewise.
+ (S_IS_*): Specify int return type explicitly.
+ * symbols.h (symbol_new, S_GET_VALUE, S_SET_VALUE): Fixed
+ prototypes.
+ * read.c (s_comm): Values read are type valueT.
+ * expr.h (expressionS): Field X_add_number is an offsetT.
+ * tc.h (md_create_long_jump, md_create_short_jump,
+ md_section_align): Addresses are now type addressT.
+ (md_number_to_chars, md_apply_fix): Pass value as valueT.
+ * config/tc-i386.c (md_create_short_jump, md_create_long_jump,
+ md_number_to_chars, md_section_align): Adjusted.
+ * config/tc-sparc.c (sparc_ip): Initialize `len' variable to make
+ gcc shut up.
+ (md_create_short_jump, md_create_long_jump, md_number_to_chars,
+ md_section_align): Adjusted.
+
+ * config/tc-sparc.c (s_reserve): Permit use for other than a.out
+ format.
+ (s_common): Handle Solaris-2 version.
+
+ * config/ho-generic.h (free): Returns void if __STDC__.
+
+ * config/obj-elf.h (obj_elf_frob_symbol, elf_frob_file,
+ elf_file_symbol): Declare.
+
+ * expr.c (floating_constant, integer_constant): Now return void.
+
+Thu Jul 1 12:13:43 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Match on sparc*-fujitsu-none rather than
+ sparclite*-fujitsu-none.
+
+Wed Jun 30 11:12:02 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * read.c (cons): Conditionalize parsing of expression. Move
+ putting value into object file into separate function. Separate
+ out MRI and WANT_BITFIELDS cases into separate functions.
+ (emit_expr): New function to write data into object file.
+ Conditionalize on TC_CONS_FIX_NEW and TC_CONS_RELOC rather than on
+ processor types.
+ (parse_bitfield_cons): New function to parse bitfield expressions
+ as used by i960 assemblers. Only compiled if
+ BITFIELD_CONS_EXPRESSIONS is defined.
+ (parse_mri_cons): New function to parse MRI style strings. Only
+ compiled if MRI is defined.
+ (parse_repeat_cons): New function to parse repeat counts. Only
+ compiled if REPEAT_CONS_EXPRESSIONS is defined.
+ * read.h (emit_expr): Added declaration of new function.
+ * config/tc-a29k.h (TC_CONS_RELOC): Define to be RELOC_32.
+ * config/tc-h8300.h (TC_CONS_RELOC): Define to be R_RELWORD.
+ * config/tc-hppa.c (parse_cons_expression_hppa): New function to
+ parse a HPPA expression, rather than special case in cons
+ function.
+ (cons_fix_new_hppa): New function to emit an HPPA fixup, rather
+ than special case in emit_expr function.
+ * config/tc-hppa.h (TC_PARSE_CONS_EXPRESSION, TC_CONS_FIX_NEW):
+ Define to use new functions from tc-hppa.c.
+ * config/tc-i960.h (BITFIELD_CONS_EXPRESSIONS): Define.
+ (WANT_BITFIELDS): Removed; now obsolete.
+ * config/tc-mips.h (REPEAT_CONS_EXPRESSIONS): Define.
+ * config/tc-ns32k.c (cons_fix_new_ns32k): New function to emit an
+ NS32K fixup, rather than special case in emit_expr function.
+ * config/tc-ns32k.h (TC_CONS_FIX_NEW): Define to be
+ cons_fix_new_ns32k. Also use PARAMS rather than checking
+ __STDC__.
+ * config/tc-sparc.h (TC_CONS_RELOC): Define to RELOC_32.
+
+ * write.c (relax_and_size_seg, adjust_reloc_syms, write_contents):
+ Don't core dump if gas has no information about a section.
+
+Wed Jun 30 06:21:27 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (md_begin): If sparcv9 is defined, reset
+ current_architecture to v9 automatically.
+
+ * config/tc-sparc.h (TARGET_FORMAT): Use elf64-sparc for v9.
+
+ * config/tc-sparc64.h, config/tc-sparc64.c: New files.
+ * configure.in: Use sparc64 cpu files for v9, and default to elf
+ format.
+
+ * write.c (relax_and_size_seg): Always fully process a section.
+ Section size is last frag's (vm)address plus its size. If no
+ relocations are present, force SEC_RELOC flag clear.
+ (dump_section_relocs): New debugging routine.
+ (adjust_reloc_syms): New routine, broken out from write_contents.
+ Don't adjust relocs that are already relative to section symbol.
+ Look for obj_fix_adjustable macro to know what else to skip,
+ instead of obj_write_symbol. Look for section symbol stored in
+ section information.
+ (write_object_file): Map adjust_reloc_syms over all sections.
+ (write_contents): Clear SEC_RELOC flag if no relocations are
+ found.
+
+ * as.h (__PTR_TO_INT, __INT_TO_PTR): New versions for Saber, to
+ keep it quiet.
+
+ * write.c (remove_subsegs): Don't define for BFD_ASSEMBLER.
+
+Fri Jun 25 14:42:53 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * Makefile.in (all, dvi, info, install-info, clean-info): do not
+ echo recursion lines.
+ (install-info, clean-info): collapse into the dvi and info rule.
+
+Fri Jun 25 10:47:24 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Remove support for %d/%q fp regs.
+ All fp regs are now specified as %f.
+ (priv_reg_table): fpq -> fq.
+
+Fri Jun 25 03:43:06 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * as.h (strstr): Disable declaration for now.
+ (fprint_value, sprint_value): Declare.
+
+ * subsegs.c (subseg_new_rest): Use memset to clear new frag.
+ (subseg_new) [BFD_ASSEMBLER]: Initialize all seginfo fields.
+
+ * expr.c (expr_part): Made sanity checks a.out-specific.
+ (expr): Disabled sanity checks.
+
+ * subsegs.h (segment_info_type) [BFD_ASSEMBLER]: Add field for
+ section symbol.
+ * subsegs.c (subseg_change): Initialize section symbol pointer
+ when setting up a new section.
+
+ * symbols.c (symbol_new) [BFD_ASSEMBLER]: Point BFD symbol's udata
+ field back at gas symbol structure.
+
+ * symbols.c (colon): Cast obstack_next_free value to char* before
+ doing arithmetic on it.
+ * subsegs.c (subseg_new_rest): Likewise.
+ * as.h (frag_now_fix): Likewise.
+
+ * config/obj-elf.c (elf_file_symbol): Use subseg_new instead of
+ calling bfd_make_section_old_way directly, and call subseg_set
+ instead of subseg_change. Now returns void.
+ (obj_elf_write_symbol): Only check local symbols for now.
+ (elf_stab_symbol): Now static and void, and disabled until it
+ works completely.
+ (obj_elf_size): For expression values, fail silently for now.
+ (obj_symbol_new_hook): Do nothing.
+
+ * config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_SPARC_WDISP22
+ relocation.
+ (s_local) [OBJ_ELF]: New function.
+ (md_pseudo_table) [OBJ_ELF]: Call it for "local".
+ (s_common): Rearrange to handle Solaris .common pseudo, which may
+ sometimes use bss space instead of common.
+ * config/obj-elf.h (TARGET_SYMBOL_FIELDS): Add new `local' field.
+
+Thu Jun 24 16:33:53 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: set host config to hpux for hppa*-hp-hpux
+
+Thu Jun 24 13:35:06 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * app.c (app_pop, app_push): Fix bug reported by Chris Arthur.
+
+Tue Jun 22 01:04:23 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * subsegs.c (subseg_new): Don't special-case a.out -R flag here.
+ * config/obj-aout.c (s_sect): Do it here.
+
+ * as.h (BAD_CASE): Don't make some lame compilers think we want
+ substitution inside strings.
+
+ * as.c (print_version_id): New function, split off from main.
+ (main): Call it.
+ * config/tc-sparc.c (md_parse_option) [OBJ_ELF]: Print version id
+ for -V. Ignore -Q and -s options for now.
+
+Mon Jun 21 17:37:59 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: make installation & builds work again for crosses
+
+Sun Jun 20 18:18:26 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * listing.c (list_symbol_table): Rewrite to print wide (>32 bits)
+ symbol values correctly.
+
+ * write.c (write_object_file): Deleted unused variables.
+ (fixup_segment): Use sprint_value.
+
+ * messages.c (sprint_value, fprint_value): New routines.
+
+ * config/obj-elf.c (elf_stab_symbol): Now returns void.
+ (obj_elf_stab_generic): Fix typo in logic.
+
+ * Makefile.in (INCLUDES): Look in ../bfd for bfd.h.
+
+ * as.h (addressT, offsetT): New types, using BFD types if
+ available.
+ (relax_addressT, struct frag): Use them.
+ * struc-symbol.h (valueT, struct broken_word): Likewise.
+
+ * as.h (subseg_new) [BFD_ASSEMBLER]: Name argument is const.
+ * subsegs.c (subseg_new) [BFD_ASSEMBLER]: Name argument is const.
+
+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)
+
+Sun Jun 20 02:34:04 1993 Ashley Saulsbury (ans@sics.se)
+
+ * m88k-opcode.h : fixed tiny tiny mistake - xcr was incorrectly
+ specified, should have both S1 and S2 fields identical
+ If only finding the problem was as fast as fixing the bug !!!!
+
+Tue Jun 15 16:01:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * write.c (write_contents): Do write out non-loadable sections.
+ Debug sections can fall in this category.
+
+ * read.c (s_app_file): Call elf_file_symbol for ELF files.
+ * config/obj-elf.c (elf_file_symbol): New function.
+
+ * config/obj-elf.c (elf_stab_symbol_string): Renamed from pa_...,
+ added argument to specify section base name.
+ (obj_elf_stab_generic): Renamed from ..._stab. New argument
+ specifies section base name.
+ (obj_elf_stab): New function, calls obj_elf_stab_generic with
+ ".stab" as section base name.
+ (obj_elf_xstab): New function, calls obj_elf_stab_generic.
+ (obj_elf_type): Handle "object". Use bitwise-or to merge in
+ symbol flags rather than simply replacing, so global/local flags
+ are preserved.
+ (obj_elf_ident): Rewrite.
+
+Tue Jun 15 17:03:25 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: remove parentdir support; use INSTALL_XFORM
+
+Wed Jun 9 11:26:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-i386.c (md_pseudo_table): .align uses a power of two
+ for any a.out target, not just Linux and 386BSD.
+ * config/tc-i386.h (DOT_LABEL_PREFIX): Do not define for any a.out
+ target.
+
+Mon Jun 7 13:33:19 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m88k.c: Don't include flonum.h, md.h, m88k.h. They
+ don't exist or duplicate other inclusions.
+
+ * config/tc-vax.h (NO_RELOC): Define.
+
+Mon Jun 7 09:55:03 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Fix parsing of asi number.
+ Fix error message.
+
+Sat Jun 5 19:32:52 1993 Torbjorn Granlund (tege@nada.kth.se)
+
+ * gas/config/m88k-opcode.h (m88k_opcodes): Add 88110 instructions.
+ * gas/config/tc-m88k.c (get_reg): New arg reg_prefix. Compare first
+ char to reg_prefix instead of to 'r'.
+ (calcop): Change calls to get_reg.
+ (calcop): Handle new case 'x' to set reg_prefix.
+ (calcop): Set reg_prefix to 'r' after each call to get_reg.
+ (cmpslot): Add 88110 conditions.
+
+ * gas/config/m88k-opcode.h: Swap cases for "rot" for consistency.
+
+ * gas/config/tc-m88k.c (get_bf): Always restore input_line_pointer
+ before returning.
+
+ * gas/config/m88k-opcode.h (m88k_opcodes): Make equal mnemonics
+ adjacent; mov.s and mov.d swapped.
+ (m88k_opcodes): Fix typo `r2' -> `2'.
+
+Fri Jun 4 15:59:31 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * config/h8300.c: Support for H8/300-H opcodes.
+
+ * config/obj-coffbfd.c (w_strings): String table length is 4
+ bytes, no matter what the host int size is.
+
+ * configure.in (alpha-*-osf*): New.
+
+Fri Jun 4 07:51:18 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in (mips-*-ecoffl*): New target; use ecoff and
+ mips-lit.
+ (mips-*-ecoff*): Added trailing '*'.
+
+ * config/obj-ecoff.c (ecoff_build_procs): Force the adr of the
+ first FDR in a file to be zero.
+
+Thu Jun 3 14:09:59 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (VERSION): Jump to 2.1.4.
+
+ * config/ho-hppabsd.h: New file, from Peter Hoogenboom.
+
+ * config/tc-mips.c (md_assemble): Call bfd_set_gp_size only for
+ ECOFF format.
+
+Tue Jun 1 15:21:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m68k.c (md_assemble): The 68040 cpu doesn't want a
+ separate '851 mmu.
+
+ * config/obj-elf.c, config/obj-elf.h: Update for new type, macro,
+ and routine names. Assuming 32 bits for now.
+
+ * config/obj-elf.c (elf_frob_file): Look for macro
+ elf_tc_final_processing_hook, instead of assuming a function
+ always exists.
+ * config/tc-hppa.c (elf_hppa_final_processing_hook): Renamed from
+ tc_final_processing_hook.
+ * config/tc-hppa.h (elf_tc_final_processing_hook): Use it.
+
+ * config/tc-hppa.h (elf_tc_symbol, elf_tc_make_sections): Macros
+ moved here from obj-elf.h.
+ * config/obj-elf.h: Don't include CPU-specific header files.
+
+Sun May 30 16:49:37 1993 Peter Hoogenboom (hoogen@fast.cs.utah.edu)
+
+ * configure.in: configurations should match on 'hppa*' not 'hppa'.
+
+ * read.c: Add support for HPPA assembly language syntax (denoted
+ with '#ifdef TC_HPPA').
+
+ * symbols.c: Add support for HPPA assembly language syntax (denoted
+ with '#ifdef TC_HPPA').
+
+ * write.c (write_contents): Add support for HPPA-style
+ relocations.
+
+ * config/obj-elf.c: Stab symbols weren't written properly.
+ (obj_elf_version):
+ (obj_elf_desc):
+ (obj_elf_write_symbol):
+ (obj_elf_write_symbol_p):
+ (obj_elf_frob_symbol):
+ (elf_stab_symbol):
+ (elf_frob_file):
+
+ * config/tc-hppa.c: Support for HPPA symbol extension sections.
+ Remove some unused code. Support for HPPA assembly language
+ syntax.
+
+ * app.c:
+
+ * symbols.c:
+
+ * config/obj-elf.h:
+ (obj_write_symbol):
+ (obj_frob_file):
+ (elf_tc_symbol):
+ (elf_tc_make_sections):
+
+ * config/tc-hppa.h:
+
+Sun May 30 21:44:45 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/obj-ecoff.c (obj_read_begin_hook, add_file): Assume
+ hash_new will have succeeded if it returns.
+ * config/tc-a29k.c (md_begin): Likewise.
+
+ * config/tc-i386.c (tc_aout_fix_to_chars): Now nbytes_r_length is
+ const.
+ (mode_from_disp_size, opcode_suffic_to_type): Now inline under
+ gcc.
+ (fits_in_{signed,unsigned}_{byte,word}): Likewise.
+
+ * expr.c: Delete register declarations; gcc ignores them anyways.
+
+Fri May 28 19:03:32 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * hash.c (hash_new): Use xmalloc, since many callers don't check
+ for failure.
+
+Thu May 27 13:02:15 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * frags.c (zero_address_frag, bss_address_frag): These are
+ external.
+
+ * tc.h (md_reloc_size): This is const.
+ * config/tc-{a29k,h8300,h8500,i386,i860,i960,m68k,ns32k,z8k}.c
+ (md_reloc_size): Now const.
+
+ * config/aout_gnu.h (enum machine_type, enum reloc_type): Delete
+ trailing commas.
+ * as.h (enum _segT): Ditto.
+
+ * struc-symbol.h (N_TYPE_seg): This should be const.
+
+Thu May 27 11:43:59 1993 Michael Meissner (meissner@osf.org)
+
+ * config/obj-ecoff.c (add_file): Cast file_name to char * in
+ listing_source_file call.
+
+ * config/obj-elf.c (elf_stab_symbol_string): Cast first argument
+ of subseg_new call to eliminate const attribute.
+ (obj_elf_stab): Ditto.
+ (obj_symbol_new_hook): Cast first argument of bzero call to char *.
+
+ * read.c (s_align_bytes): Properly record alignment.
+
+ * expr.c (__): Undefine __ macro before use, since OSF/1 uses it
+ for the prototype/no prototype macro.
+
+ * as.c (got_sig): Don't do return ((SIGTY) 0), SIGTY might well be
+ void.
+
+ * as.h (relax_stateT enum): Delete trailing comma.
+
+Thu May 27 11:07:50 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * app.c (do_scrub_begin): Let line_comment_chars override
+ comment_chars.
+ (do_scrub_next_char): If a line comment character is not at the
+ start of a line, treat it as a comment character if it is one.
+ For a CPP line comment use pseudo-op .appline rather than .line.
+ * input-scrub.c (logical_input_line): Make int rather than
+ unsigned.
+ (input_scrub_push, input_scrub_begin): Initialize
+ logical_input_line to -1 rather than 0.
+ (bump_line_counters): Increment logical_input_line.
+ (new_logical_line): If line_number is -2, decrement
+ logical_input_line.
+ (as_where): Use logical_input_line even if it is 0.
+ * read.h (s_app_file prototype): Now takes an int argument.
+ * read.c (potable): Make .appfile call s_app_file with 1. New
+ .appline pseudo-op calls s_app_line.
+ (s_app_file): If .appfile, call new_logical_line with -2 to
+ account for newline inserted by do_scrub_next_char. If listing,
+ call listing_source_file.
+ (s_app_line): New function to handle fake pseudo-op .appline.
+ * config/obj-coff.c (obj_pseudo_table): Make .appline call
+ obj_coff_ln.
+ (obj_coff_ln): Added argument to indicate whether .appline.
+ * config/obj-coffbfd.c (obj_pseudo_table): Make .appline call
+ obj_coff_ln.
+ (obj_coff_ln): Added argument to indicate whether .appline.
+ * config/tc-mips.c (s_file): Pass argument to s_app_file.
+
+Tue May 25 11:59:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-bout.h (S_GET_VALUE): Removed unnecessary cast.
+
+Thu May 20 19:14:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m68k.c (md_apply_fix_2): Straighten out check for
+ invalid values.
+
+Wed May 19 07:33:17 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * config/tc-h5000.c (build_bytes): Understand @rd mode and build
+ relocations correctly.
+
+Mon May 17 15:06:26 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * Makefile.in (FLAGS_TO_PASS): Leave out TEXI2DVI for now, because
+ it's wrong.
+
+ * config/tc-m68k.c (md_apply_fix_2): Apply range checks and warn
+ if value is out of range.
+
+ Patch from Minh Tran-Le:
+ * config/tc-i386.c (i386_operand): For in/out port register used
+ as base reg, include InOutPortReg in operand type.
+ (MATCH): Accept overlap value of InOutPortReg.
+
+Mon May 17 09:29:34 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-ecoff.c (add_file, obj_ecoff_loc, obj_ecoff_stab):
+ Add calls to listing routines to produce combined source/assembler
+ listings.
+ (obj_ecoff_stab): Create a file pointer if none used yet.
+ (ecoff_frob_file): Set symcount to correct value.
+
+Fri May 14 06:53:33 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * Makefile.in (VERSION): Bump to version 2.1, in preparation for
+ release.
+
+ * config/obj-aout.h (H_GET_HEADER_SIZE, H_SET_SYMBOL_TABLE_SIZE):
+ Define in terms of constants, not C structure sizes.
+
+ * config/tc-rs6000.c, config/tc-rs6000.h: Delete empty files.
+
+Thu May 13 17:01:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-aout.c (obj_header_append): Don't define if it's
+ defined as a macro.
+ * config/obj-hp300.h (obj_header_append): Define it as a macro.
+ * config/obj-hp300.c (hp300_header_append): New function.
+
+ * Makefile.in (distclean): Don't bother cleaning up doc files;
+ they aren't going to be in this directory.
+
+Thu May 13 07:51:35 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-ecoff.c (ecoff_build_symbols): Handle absolute
+ symbols.
+
+ * tc.h (TC_COFF_SIZEMACHDEP): Don't define here.
+ * config/tc-sh.h (TC_COFF_SIZEMACHDEP): Define here instead.
+
+Mon May 10 06:01:12 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/obj-vms.c (VMS_Symbol_type_list): Don't bother with
+ initialization.
+
+ * configure.in (targets): Treat m68*-*-sysv* like m68k-*-coff.
+
+Wed May 5 14:00:49 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.c (macro): Correct floating point double word
+ loads and stores for big endian target.
+
+Wed May 5 08:39:21 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * config/tc-i386.c: Replace SEG_* with *_section, fix up subseg_*
+ calls. Deleted some unused code.
+ * config/obj-coff.c: Likewise.
+
+ ELF support, mostly contributed by Utah:
+ * config/obj-elf.c (obj_elf_section, obj_elf_stab, obj_elf_line,
+ obj_elf_type): Rewrite.
+ (obj_elf_frob_symbol, elf_stab_symbol_string, elf_stab_symbol,
+ obj_elf_desc, obj_elf_version, obj_symbol_new_hook, obj_elf_size):
+ New functions.
+ (obj_elf_ident): Dummy.
+ * config/obj-elf.h (FALSE, TRUE, S_*, tc_frob_symbol,
+ TARGET_SYMBOL_FIELDS): New macros.
+ (gdb_section): New variable decl.
+
+ * config/tc-i386.c (md_atof): Return zero, not empty string, on
+ success.
+
+ BFD_ASSEMBLER conditional changes:
+ * config/obj-coff.c (lineno_rootP, seg_N_TYPE, *_section_header):
+ Don't define these.
+ (SA_SET_SYM_ENDNDX, SA_SET_SYM_TAGNDX): New functions.
+ (fetch_coff_debug_section): Ditto.
+ (obj_coff_endef): Call fetch_coff_debug_section.
+ (struct line_no): New type.
+ (c_symbol_merge): New way for copying aux fields.
+ (c_dot_file_symbol): Put symbol in absolute section, and set flag
+ BSF_DEBUGGING.
+ (function_lineoff): New symbol.
+ (function_lineoff, text_lineno_number, our_lineno_number,
+ lineno_lastP): Don't define.
+ (c_line_new): Don't define.
+ (obj_emit_lineno, obj_coff_endef): Use abort calls as, uh,
+ placeholders, until
+ line-number recording gets implemented.
+ (obj_new_symbol_hook): New code for handling aux fields.
+ (add_lineno, add_linesym): New functions.
+ (obj_coff_ln): Call add_lineno, not c_line_new.
+ (obj_coff_endef): New code for handling symbol names. New lineno
+ code. Look for section name "*DEBUG*" for debugging section.
+ (align, coff_check_file_symbols, obj_coff_section,
+ coff_frob_file): New functions.
+ * config/obj-coff.h: Reordered some includes.
+ (BYTE_ORDERING, FILE_HEADER_MAGIC, seg_N_TYPE, N_TYPE_seg,
+ DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE, AOUTHDR, AOUTHDRSIZE): Don't
+ define these.
+ (TARGET_SYMBOL_FIELDS, I960_SYM_FIELDS): New macros.
+ (SYM_AUXENT): New macro (for non-BFD_ASSEMBLER too) for accessing
+ aux entries. Most SA_* macros now use it unconditionally.
+ (S_*): Use `bsym' field, and access BFD private data.
+ (SF_*): Use `sy_flags' symbol field for most of these.
+ (H_*, object_headers, lineno, lineno_*P, OBJ_EMIT_LINENO): Don't
+ define.
+ (*_section_header): Don't define.
+ * config/tc-i386.c (md_convert_frag, md_apply_fix): Changed
+ interface.
+ (tc_gen_reloc) [I386COFF]: New function.
+ (tc_aout_fix_to_chars, tc_coff_fix2rtype): Don't define.
+ * config/tc-i386.h (TARGET_ARCH, TARGET_BYTES_BIG_ENDIAN): New
+ macros.
+
+ * config/obj-coff.c (stack_init): Don't do assignments inside
+ conditions.
+ (obj_coff_def): Simplified handling of symbol name a bit.
+ (tag_insert): Name argument is now pointer to CONST.
+ (obj_crawl_symbol_chain): Commented out.
+
+ * config/obj-coff.h: Use PARAMS macro in prototypes.
+
+ * write.c (relax_and_size_seg) [BFD_ASSEMBLER]: Don't indirect
+ through frchainP pointer if it is null.
+
+ * configure.in: Warn if BFD mode is explicitly turned off but is
+ required by specified target.
+ (mips ecoff targets): Don't need to set bfd_gas here; it gets
+ taken care of later.
+
+ * config/obj-coffbfd.c (crawl_symbols): Don't clear sy_forward
+ field.
+ (yank_symbols): Merge symbols only if sy_forward is null.
+
+ * config/tc-m68k.h (AOUT_MACHTYPE): Don't define if already
+ defined.
+
+ * tc.h (md_convert_frag) [BFD_ASSEMBLER]: Section arg is not
+ pointer.
+ * config/tc-m68k.c (md_convert_frag) [BFD_ASSEMBLER]: Ditto.
+
+ * config/tc-sparc.h (LOCAL_LABEL) [OBJ_ELF]: Anything starting
+ with "." is a local label.
+
+ * config/te-hppa.h, config/tc-hppa.h, config/tc-hppa.c: New config
+ files.
+
+ * config/te-linux.h, config/te-386bsd.h: New config files.
+ * configure.in (i386-*-linux, i386-*-bsd): Use them.
+ * config/tc-i386.h (TARGET_FORMAT): Select format based on target
+ environment.
+ (DOT_LABEL_PREFIX): Don't define for 386bsd or Linux.
+
+Wed May 5 13:14:01 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-ecoff.c (init_file): Set fMerge to 0 since dbx seems
+ to want it that way.
+ (ecoff_build_symbols): Turn local st_Proc symbols into
+ st_StaticProc symbols. Set index field of external st_Proc and
+ st_staticProc symbols correctly.
+ * config/tc-mips.h (NO_LISTING): Don't define. People might want
+ listings.
+
+Tue May 4 21:22:54 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-hp300.h, config/obj-hp300.c, config/te-hp300.h: New
+ files.
+ * configure.in (m68k-*-hpux): Use them.
+
+ * config/obj-aout.c (obj_pre_write_hook): Use AOUT_VERSION if
+ defined, otherwise zero.
+
+ * config/aout_gnu.h (OMAGIC): Don't define if already defined.
+
+Mon May 3 15:59:32 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Allow any abs expression as an
+ address space number.
+
+Wed Apr 28 19:11:22 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
+
+ * config/obj-aout.h (TARGET_DEFAULT): Don't default this at all.
+
+ * config/tc-a29k.c: Include ctype.h.
+ (define_some_regs): Added special-purpose registers for 29050.
+
+ * config/tc-i386.c (comment_chars) [TE_I386AIX]: Include "/".
+
+ * config/obj-coffbfd.c (fill_section): Don't set STYP_REG here.
+ (change_to_section): Set it here instead.
+
+Wed Apr 28 13:40:29 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
+
+ * config/obj-ecoff.c (obj_symbol_new_hook): Make up a .file if one
+ hasn't been seen yet.
+ (add_ecoff_symbol): Don't refer to cur_file_ptr if it is NULL.
+
+Mon Apr 26 18:29:05 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/tc-sh.ch, config/tc-sh.h: New files supporting Hitachi
+ SH.
+
+Mon Apr 26 12:28:27 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * expr.c (operand): Fix unary plus operator (previously was the
+ same as '~' operator!).
+
+Wed Apr 21 00:20:11 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * write.c (cvt_frag_to_fill): Define even if BFD is defined.
+ (write_object_file): Do define if BFD_ASSEMBLER. Invoke
+ obj_check_file_symbols if defined. Call verify_symbol_chain_2
+ instead of open-coding it. Fix some bugs in patching up symbol
+ chain.
+ (relax_segment): Make some code we "ought to be able to" use for
+ all targets no longer conditionalized on ns32k target; instead, do
+ it always, and if the appropriate conditions fail, abort.
+
+ * symbols.c (DEBUG): Enabled.
+ (symbol_new): Make sure bfd_make_empty_symbol works.
+ (verify_symbol_chain_2): New function; takes one symbol as
+ argument, anywhere in the chain.
+ (dollar_label*): Use default initializers.
+
+ * as.c (perform_an_assembly_pass): Call md_begin here...
+ (main): ...and not here.
+
+ * config/tc-m68k.h (TARGET_FORMAT): Use a.out-sunos-big for a.out.
+ (tc_frob_symbol): New macro: Get rid of symbols in reg_section.
+
+ * config/tc-m68k.c (omagic): Don't define for BFD_ASSEMBLER.
+ (add_fix, add_frag): Now functions instead of macros.
+ (m68k_reg_parse, m68k_ip, md_estimate_size_before_relax, get_num,
+ s_data1, s_data2, s_bss): Use new *_section names, for
+ compatibility with BFD_ASSEMBLER mode; rewrite switch statements
+ to handle non-integral segT.
+ (tc_coff_fix2rtype, tc_aout_fix_to_chars,
+ tc_coff_symbol_emit_hook): Don't define for BFD_ASSEMBLER.
+ (tc_gen_reloc): New routine for BFD_ASSEMBLER.
+ (md_apply_fix, md_apply_fix_2): Renamed old md_apply_fix to
+ md_apply_fix_2; new md_apply_fix definition varies interface
+ depending on BFD_ASSEMBLER.
+ (md_convert_frag, md_convert_frag_1): Likewise. Use new *_section
+ names.
+
+ * config/obj-vms.c: Include config.h.
+ (version_string): Delete declaration.
+ (Write_VMS_MHD_Records): Use GAS_VERSION instead.
+ (vms_resolve_symbol_redef): New function, taken from VMS code in
+ symbols.c.
+ (_doprnt): Deleted.
+ (VMS_Store_Struct, VMS_Def_Struct, VMS_Set_Struct,
+ VMS_TBT_Block_End, get_VMS_time_on_unix, generate_suffix,
+ VMS_Psect_Spec): Fixed to compile under traditional C.
+ * config/obj-vms.h: Use PARAMS macro.
+ (vms_resolve_symbol_redef): Declare.
+ (RESOLVE_SYMBOL_REDEFINITION): New macro.
+ * symbols.c (colon): Remove some VMS-specific code, look for
+ RESOLVE_SYMBOL_REDEFINITION macro instead.
+
+ * config/tc-m68k.c (m68k_ip): Don't try expanding DBcc
+ instructions.
+
+ * config/tc-i386.c: Reordered some functions so inlining might
+ work. Use PARAMS in function declarations.
+ (reloc): New routine.
+ (md_assemble): Rearrange switch statements to work with
+ non-integral segT.
+
+ * struc-symbol.h [BFD_ASSEMBLER]: Undefine
+ SYMBOLS_NEED_BACKPOINTERS before defining it.
+
+ * subsegs.c (subseg_new_rest): Now static.
+
+ * read.c (pseudo_set): Better error message for difference of
+ symbols in different frags.
+
+ * Makefile.in (check): Pass down some new variables, indicating
+ pathname or program name for cc, nm, objdump.
+
+ * as.h (OUTPUT_FLAVOR): New macro.
+ * config/tc-sparc.c (tc_gen_reloc): Use OUTPUT_FLAVOR.
+
+ * configure.in: Initialize bfd_gas properly. Warn that ELF
+ support is incomplete.
+
+Thu Apr 15 22:39:05 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * read.c (float_cons): Accept null pointer return from md_atof.
+ * config/tc-m68k.c (md_atof): Return null for success.
+ * config/tc-sparc.c (md_atof): Ditto.
+
+Thu Apr 15 16:04:39 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * doc/as.texinfo: formatting and comment cleanups; show SPARC
+ alternative options in same style as other machines; simplify some
+ conditional use; include GPL as separate file (from texinfo dir)
+
+ * doc/Makefile.in: (as.info) include directory containing GPL in
+ makeinfo search path
+
+ * doc/h8.texi: new file; conditional settings for GAS manual
+ on Hitachi chips
+
+Tue Apr 13 15:31:40 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * doc/as.texinfo: mention SPARC architecture options.
+
+Fri Apr 9 17:43:11 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * configure.in: Rearranged whitespace in per-host/per-target
+ sections. Added hooks for dropping in HPPA support (not included
+ yet). Separate out overrides of variables based on target format
+ and bfd-gas selection from actual target-specific commands. Add
+ error message for recognized but unsupported format name.
+
+Fri Apr 9 09:05:47 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-ecoff.h (ecoff_build_lineno): Make ilineMax in
+ symbolic header match cline in FDR; the native linker seems to
+ want that.
+
+Thu Apr 8 15:51:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * doc/Makefile.in: as.texinfo is in $(srcdir). Use
+ $(srcdir)/as.texinfo explicitly in several places
+
+Thu Apr 8 15:15:02 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * doc/Makefile.in: update dvi, clean targets for new source
+ file structure
+
+Thu Apr 8 12:52:46 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/ho-decstatn.h: Define BROKEN_ASSERT if not __GNUC__,
+ rather than undefining know.
+ * configure.in: Match ultrix*, not just ultrix.
+
+Wed Apr 7 20:18:10 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * doc/as.texinfo: converted conditional markup to use new
+ Texinfo facilities, avoiding m4.
+
+ * doc/as-all.texinfo, all.m4, pretex.m4: deleted.
+
+ * doc/Makefile.in: recast doc configuration to use a link to an
+ included texinfo file.
+
+ * doc/all.texi: settings for generic form of documentation.
+
+Tue Apr 6 11:56:21 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * read.c (cons): Zero out frag when creating reloc.
+
+Mon Apr 5 09:41:58 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.c (gp_reference): Certain magic symbols can never
+ be referenced off the GP register.
+
+ * app.c (do_scrub_next_char): Handle states 9 and 10 correctly
+ when dealing with characters of type LEX_IS_TWOCHAR_COMMENT_1ST,
+ LEX_IS_STRINGQUOTE, and LEX_IS_ONECHAR_QUOTE.
+
+ * config/te-irix.h: New file; irix needs a different LOCAL_LABEL
+ definition from other MIPS targets.
+ * configure.in (mips-*-irix): Use emulation irix.
+
+Sun Apr 4 15:21:09 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/tc-h8500.c: Get relax size of branch instructions right,
+ (get_operand): Parse @sp+ correctly.
+
+Fri Apr 2 15:59:49 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * subsegs.h (segment_info_type) [BFD_ASSEMBLER]: Don't include
+ COFF section header field.
+
+ * configure.in: Print error message if host or target is not
+ supported.
+
+ * configure.in: If with-bfd-assembler, use obj-coff instead of
+ obj-coffbfd.
+
+ * config/ho-generic.h: Include string.h.
+
+Fri Apr 2 08:54:57 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.h (LOCAL_LABEL): Treat any label starting with
+ '$' as local, for any object file format.
+
+ * config/tc-mips.c (macro): Optimizations to branching code and a
+ couple of bug fixes from ralphc@pyrps5.eng.pyramid.com (Ralph
+ Campbell).
+
+ * config/ho-irix.h: New file; if not gcc, define BROKEN_ASSERT.
+ * configure.in (mips-sgi-irix*): Set gas_host to irix.
+
+Wed Mar 31 17:53:54 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * subsegs.c (subseg_new): Set output_section of new section.
+ * as.c (perform_an_assemly_pass): Don't set output_section here.
+ * expr.c (expr_part, expr): Turn off section assertions for ECOFF,
+ since it has additional sections.
+ * read.c (s_lcomm): For MIPS ECOFF, put small objects in .sbss,
+ not bss_section.
+ * config/obj-ecoff.h (TARGET_SYMBOL_FIELDS): Added
+ ecoff_undefined field.
+ * config/obj-ecoff.c (obj_symbol_new_hook): Initialize
+ ecoff_undefined field.
+ (add_file): If using stabs, just output a stabs symbol rather than
+ creating a new fdr.
+ (obj_ecoff_begin, obj_ecoff_bend): Ignore line number by reading
+ it with get_absolute_expression, rather than skipping it by hand.
+ (obj_ecoff_loc): If using stabs, just output a stabs symbol rather
+ than ECOFF line number information.
+ (obj_ecoff_stab): Accept non-zero values for stabs line number.
+ (ecoff_build_symbols): Set ifilesym correctly. Set storage class
+ to small, undefined and/or readonly sections if appropriate.
+ Don't output symbol names containing \001 characters.
+ (ecoff_frob_file): Make sure at least one fdr is output.
+ * config/tc-mips.h: Define TC_MIPS.
+ * config/tc-mips.c (g_switch_value): New static variable.
+ (md_assemble): Set gp size of output BFD.
+ (gp_reference): New function; returns 1 if expression can be
+ accesssed via gp. Always returns 0 if not using ECOFF.
+ (macro_build): Convert BFD_RELOC_LO16 to BFD_RELOC_MIPS_GPREL if
+ possible.
+ (macro): Generate sequences using gp if possible.
+ (md_parse_option): Ignore -EL and -EB. Parse -G.
+ (md_apply_fix): Added BFD_RELOC_MIPS_GPREL to ignored case.
+ (s_change_sec): Handle .rdata and .sdata for ECOFF.
+ (s_extern): Mark symbol as external. Set ecoff_undefined field.
+
+Tue Mar 30 10:11:41 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * output-file.c (output_file_create): Don't call as_perror for
+ filename rejected by application.
+
+ * as.c (main) [BFD_ASSEMBLER]: If errors occur, close and unlink
+ the output file.
+
+ * doc/as.texinfo: Don't use @value in node names for the moment;
+ references don't appear to work right.
+
+ * as.h (const, volatile): Put these definitions back, and use
+ them.
+
+ * doc/as.texinfo: First pass at using new texinfo features --
+ variables, conditional tests. Far from complete.
+
+Mon Mar 29 16:05:40 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * read.c: Temporary hack to handle some 64-bit constants. This
+ should be redone later.
+ (target_big_endian): Declare.
+ (big_cons): If it's set, reverse order of bytes being copied.
+ * config/tc-sparc.c (md_begin): Set target_big_endian.
+
+ * read.c (s_ignore): Delete declaration of is_end_of_line.
+
+ * config/obj-coffbfd.c (yank_symbols): Build list of file symbol
+ forward pointers properly.
+
+Mon Mar 29 13:47:33 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/obj-coffbfd.c (do_relocs_for): Fix bug where nrelocs
+ wasn't being stored into scnhdr.
+ * config/obj-coffbfd.h: Add prototype of s_get_segment.
+ * read.c (TC_START_LABEL): Default definition.
+ (read_a_source_file): Use TC_START_LABEL macro to work out
+ if a label has been seen.
+
+Mon Mar 29 12:56:56 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Set BFDDEF and BFDLIB at the top of Makefile, not
+ the bottom (make expands variables in dependencies when the
+ dependencies are read, not when they are used).
+
+ * config/obj-coffbfd.c (fill_section): Don't set NOLOAD bit for
+ a29k .bss section; the mondfe program doesn't like it.
+
+Sun Mar 28 08:12:53 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/tc-m68k.c: Use PARAMS macro, and use CONST instead of
+ const.
+ (current_architecture): Don't need initializer.
+
+Fri Mar 26 08:12:48 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * doc/none.m4: Define Z8000.
+ * doc/Makefile.in (as-*.texinfo): Refer to $(srcdir). Remove the
+ texinfo file before recreating it.
+ (TEXI2DVI): Need to set TEXINPUTS if "make as.dvi" is to work in
+ this directory.
+ (srcdir): Delete second, bogus definition.
+ (as.info): Look for as-*.texinfo in current directory rather than
+ in $(srcdir).
+ (as.dvi): Ditto.
+ (dvi): New rule.
+ * doc/configure.in: Create links to all as-*.texinfo files in the
+ source directory, if that's not the current directory.
+
+ * configure.in (per-host): Accept MIPS host with BSD version
+ number.
+ (per-target): Classify i486 as i386. Use generic cpu_type instead
+ of target_cpu in selecting format etc.
+
+ * app.c (do_scrub_next_char): Use .appfile, not .app-file.
+ * read.c (potable): Change .app-file to .appfile.
+
+ * config/ho-decstatn.h: Renamed from ho-decstation.h.
+ * configure.in: Adjusted.
+
+ * config/obj-bfd-sunos.*: Unused; deleted.
+
+ * Makefile.in (version.c, vers-stamp): Deleted.
+ (config.h): Define GAS_VERSION.
+ * as.c (version_string): Deleted declaration.
+ (main): Look for GAS_VERSION instead.
+
+ * doc/as.texinfo: Updated description of -a* (listing) options,
+ and describe how to pass them through from gcc.
+
+ * config/obj-coffbfd.c (do_relocs_for): Don't allocate storage or
+ process relocs if there aren't any relocs to process. Avoids
+ malloc/free bug on SCO too.
+
+ * as.h: Move local include files below system include files, to
+ avoid some redefinition complaints on some systems.
+ (const, volatile): Don't need these conditionally defined if we
+ use CONST and VOLATILE from ansidecl.h.
+ (seg_name): Use CONST, not const.
+
+Fri Mar 26 10:22:04 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.c: Reindented to GNU standards.
+
+Thu Mar 25 08:59:14 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-coffbfd.c (do_relocs_for): Remove a29k special case.
+ (fixup_segment): Add a29k special case; the linker is not prepared
+ to see a segment offset here.
+
+ * app.c (do_scrub_next_char): Added new state, 10, modifying state
+ 9 to only keep a space in between identifier characters.
+
+Wed Mar 24 02:16:22 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
+
+ * Makefile.in: add dvi target; as-$(config).texinfo might live in
+ srcdir, might be in objdir.
+
+ * doc/Makefile.in: dvi depends on as.dvi
+
+Mon Mar 22 23:59:13 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: add installcheck target
+
+Mon Mar 22 16:25:57 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Add support for membar mask names.
+ Add missing colons in prefetch error messages. Add support for
+ ASI names.
+
+Mon Mar 22 10:19:00 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/tc-mips.c (macro): Use $AT for any floating point load.
+
+Sat Mar 20 12:50:51 1993 Ken Raeburn (raeburn@urth.cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip): For operand type 'M', reject
+ bignums, but don't emit error message.
+
+Fri Mar 19 21:02:19 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * Makefile.in (targ-cpu.o): Depend on config.h.
+
+Wed Mar 17 16:44:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * app.c (do_scrub_next_char): Added new state, 9, to avoid
+ dropping a space immediately following an identifier.
+ * expr.c, write.c: Rewrote assert expressions to not use multiple
+ lines; I don't think that can be done portably.
+ * config/tc-mips.c (macro): Use $AT if target register is zero in
+ load instruction, which it can be for a floating point load.
+
+Mon Mar 15 12:17:28 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * write.c (write_contents): Compute the relocs before writing out
+ the section contents.
+ * config/obj-ecoff.h, config/obj-ecoff.c: Numerous changes to get
+ symbol table and values right.
+ * config/tc-mips.h (LOCAL_LABEL): If OBJ_ECOFF, any label starting
+ with $L is local.
+ * config/tc-mips.c (tc_gen_reloc): If OBJ_ECOFF, adjust the addend
+ by the section vma.
+
+ * config/z8k.mt (TARG_CPU_DEPENDENTS): The relevant file is
+ z8k-opc.h, not z8k.h.
+
+ * config/obj-coffbfd.c (obj_coff_endef): Correct test for .bf
+ symbol.
+
+Fri Mar 12 18:33:36 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: recognize sparc-sun-solaris2* instead of -solaris2
+
+Fri Mar 12 12:00:07 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * expr.c, write.c: Ultrix native 4.2 cc requires assert condition
+ to be on a single line.
+
+Thu Mar 11 17:56:22 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (config.h): Create file, writing out definitions of
+ target cpu, alias, and canonical name.
+ (ALL_CFLAGS): No longer define TARGET_CPU.
+
+ * Makefile.in (check): Print a message, instead of quitting
+ silently.
+
+ * as.c (main): Don't catch any signals, for now.
+
+ * version.c: Deleted.
+ * Makefile.in: Generate it, putting in only the version number
+ itself.
+ (VERSION): New variable.
+ * as.c: Include config.h.
+ (main): Reformatted version string. Include target alias. Don't
+ print if not requested (i.e., unknown -v argument).
+
+ * as.c (stralloc): Deleted.
+ (main): Call strdup instead.
+
+ * configure.in: Handle all 68300 series chips.
+ * config/tc-m68k.c: Include config.h.
+ (md_assemble): Assume TARGET_CPU is defined. Accept some 68300
+ series cpus as defaults.
+ (md_parse_option): Accept some m68300 series CPUs as defaults.
+
+Wed Mar 10 17:41:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * as.c (EXIT_SUCCESS, EXIT_FAILURE): Define to normal values if
+ not already defined.
+ (main, got_sig): Use them.
+ * config/ho-vms.h (EXIT_SUCCESS, EXIT_FAILURE): Reverse default
+ values.
+
+Tue Mar 9 07:40:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-ecoff.c, config/obj-ecoff.h: Preliminary ECOFF
+ support.
+
+ * config/tc-mips.h (TARGET_FORMAT): Define based on OBJ_AOUT vs.
+ OBJ_ECOFF as well as TARGET_BYTES_*_ENDIAN.
+ (struct loc, struct proc, struct file): Moved to tc-mips.c within
+ #ifndef OBJ_ECOFF block, since ECOFF uses different versions.
+ * config/tc-mips.c: Rearranged for ECOFF support. Added
+ prototypes for all static functions. Moved existing minimal
+ debugging format support info #ifndef OBJ_ECOFF blocks.
+ (macro_build_lui): Eliminated sign_extend argument, because ECOFF
+ does not support a non sign extended high 16 bits reloc. Adjusted
+ all callers accordingly.
+ (tc_get_register): Renamed from get_register, and made non-static.
+
+ * config/mips-big.mt, config/mips-lit.mt: New files. Define
+ TARGET_BYTES_BIG_ENDIAN and TARGET_BYTES_LITTLE_ENDIAN,
+ respectively.
+ * configure.in (mips-*-bsd*): Use gas_target mips-lit.
+ (mips-*-ultrix*, mips-*-irix*, mips-*-ecoff): New targets, using
+ obj_format ecoff and gas_target mips-lit or mips-big.
+
+Tue Mar 9 07:43:01 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * version.c: Bump to version 2.0.1.
+
+Tue Mar 9 07:40:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * write.c (chain_frchains_together): Check that seg_info (section)
+ is not NULL.
+ (write_object_file): Call obj_frob_file after setting the symbols,
+ not before.
+
+Tue Mar 9 00:00:00 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * Version 2.0 released.
+
+Mon Mar 8 14:57:10 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-i386.h (TC_COUNT_RELOC): Look for fx_addsy only.
+
+Fri Mar 5 09:05:55 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * read.h: Define stringer here.
+ read.c, config/obj-ieee.c, config/obj-tcm88k.c: Not any of these
+ places.
+
+Thu Mar 4 11:52:23 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * read.c (s_space): Multiply repeat count by mult, not fill.
+
+Thu Mar 4 05:20:42 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * read.c: Include ctype.h.
+
+Wed Mar 3 10:41:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ Patches from Eric Youngdale:
+ * make-gas.com: Find obstack.obj if it's not in the current
+ directory.
+ * read.c (s_ignore): Don't declare is_end_of_line. It's
+ redundant, and triggers a VMS gcc compiler bug.
+
+ * write.c (write_object_file): Macro SUB_SEGMENT_ALIGN now takes
+ current segment as an argument. (Ignored in all cases but VMS.)
+ All callers and definitions changed.
+
+Tue Mar 2 11:56:19 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * listing.c: Cleaned up a bit, added prototypes, made NO_LISTING
+ case compile again.
+
+Tue Mar 2 08:53:34 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-m68k.c (isbyte): Accept all values from -255 to +255,
+ so "~0x80" won't be rejected.
+
+ * config/obj-elf.c: No longer include elf/reloc.h.
+ (obj_elf_section): Set SEC_READONLY and SEC_CODE for text section.
+ (obj_elf_stab, obj_elf_desc): Deleted do-nothing and commented-out
+ routines.
+ (obj_elf_xstab): New routine.
+ (obj_elf_set_size): Call as_warn, not fprintf. Pass desired
+ argument to s_ignore. Put "#if 0" around unused code.
+ (obj_pseudo_table): Use s_ignore instead of do-nothing routines.
+ Call elf_xstabs for .stabs and .xstabs operators.
+
+ * config/tc-sparc.h (TARGET_FORMAT) [OBJ_ELF]: Now "elf32-sparc".
+
+ * write.c (relax_and_size_seg): Set SEC_RELOC only if fixups are
+ present.
+
+ * configure.in: mips-bsd configuration was missing format spec.
+ Should use aout.
+
+ * Makefile.in (Makefile): Depends on configure.in.
+
+ * config/tc-mips.c (append_insn): Don't check for alignment of
+ frag in memory; alignment of instructions in section is a separate
+ matter.
+
+ * config/tc-mips.c (macro_build_lui): Fix some assumptions of ANSI
+ C availability.
+
+ * listing.h: Always provide function declarations, not macros, so
+ pcc won't lose.
+
+Tue Mar 2 00:50:43 1993 John Gilmore (gnu@cygnus.com)
+
+ * CONTRIBUTORS: Update Gilmore entry.
+
+Mon Mar 1 12:03:16 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): Correctly assemble prefetch
+ instructions. Accept integer prefetch function numbers.
+
+Wed Feb 24 14:58:19 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (s_xword): Now call big_cons, so large
+ constants are accepted, but symbolic values are not. GCC will not
+ generate the latter currently.
+
+ * frags.c (frag_init): New function.
+ (zero_address_frag, bss_address_frag): Now initialized at run
+ time.
+ * as.c (main): Call frag_init.
+
+Wed Feb 24 10:32:42 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * app.c (do_scrub_next_char): In LEX_IS_LINE_COMMENT_START case:
+ Don't unget ch2 if we didn't get it.
+
+Wed Feb 24 04:14:07 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * doc/Makefile.in (TEXIDIR): Updated for new layout.
+
+ * config/tc-sparc.c (s_common): Add support for ELF version.
+ (tc_gen_reloc) [BFD_ASSEMBLER]: New function.
+ * config/tc-sparc.h (TARGET_ARCH, TARGET_FORMAT) [BFD_ASSEMBLER]:
+ New macros.
+ (md_convert_frag): New macro.
+
+ * config/tc-m68k.c (m68k_ip): For PC-relative addressing of a
+ symbol, fix the offset so "+2" isn't required.
+
+ * config/tc-i960.c (line_comment_chars, line_separator_chars):
+ Define as common/bss.
+ (op_hash, reg_hash, areg_hash, iclasses_seen, br_cnt): Default C
+ initializers are sufficient.
+
+ * config/obj-aout.h [BFD_ASSEMBLER]: Include libaout.h from bfd.
+ (TARGET_FORMAT) [BFD_ASSEMBLER]: Default to "a.out".
+ (S_SET_*, S_GET_*, obj_frob_symbol) [BFD_ASSEMBLER]: New macros.
+ (S_SET_TYPE) [!BFD_ASSEMBLER]: New macro.
+ * config/obj-aout.c: Use PARAMS macro for declarations. Remove
+ "IGNORE_DEBUG" conditional, since both branches are identical.
+ Use S_SET_TYPE, S_GET_TYPE, and S_GET_DESC instead of directly
+ referencing symbol structure members.
+ (obj_aout_frob_symbol) [BFD_ASSEMBLER]: New function.
+
+ * as.h (struct frag): Reordered a couple of fields for better
+ packing.
+
+ * write.c (record_alignment) [BFD_ASSEMBLER]: Record it in the
+ section info.
+ (write_contents) [BFD_ASSEMBLER]: New function.
+ (write_object_file) [BFD_ASSEMBLER]: Always handle -R here. Call
+ fix_new with BFD_RELOC_NONE instead of 0 or NO_RELOC. Call
+ obj_frob_file, obj_frob_symbol, tc_frob_symbol if defined.
+ (fixup_segment): Make sure common-section symbols get treated the
+ same as undefined symbols.
+ (fix_new) [BFD_ASSEMBLER]: Argument r_type is of type
+ bfd_reloc_code_real_type. Use seg_fix_{root,tail}P derived from
+ section info.
+ * write.h (fix_new): Update prototype.
+
+ * tc.h (md_operand, md_convert_frag, tc_headers_hook,
+ md_section_align, md_undefined_symbol): Don't provide prototypes
+ if these are defined as macros.
+ (md_convert_frag) [BFD_ASSEMBLER]: BFD version needs bfd and
+ section passed.
+
+ * symbols.c (symbol_new): Argument NAME is now pointer to const.
+ Simplified STRIP_UNDERSCORE code. Remove assumptions about null
+ pointers in freshly allocated storage. [BFD_ASSEMBLER]: Get new
+ BFD symbol.
+ (colon): Display other/desc fields of redefined symbol only if
+ S_GET_OTHER and S_GET_DESC are defined.
+ (symbol_make): Argument NAME is now pointer to const.
+ (symbol_find, symbol_find_base): Likewise.
+ (S_IS_*, S_GET_*, S_SET_*) [BFD_ASSEMBLER]: New functions.
+ * symbols.h: Fix prototypes for new const arguments. Add
+ prototypes for BFD_ASSEMBLER S_* functions.
+
+ * subsegs.c (subseg_change) [BFD_ASSEMBLER]: BFD version of code
+ for changing to an existing section.
+ (subseg_new_rest) [BFD_ASSEMBLER]: Split off from subseg_new,
+ called by subseg_new and subseg_set.
+ (subseg_new) [BFD_ASSEMBLER]: Rewritten to change to new section,
+ given section name and subseg number.
+ (subseg_set) [BFD_ASSEMBLER]: New function; change to a possibly
+ new section/subsection.
+
+ * read.c: Don't include ctype.h.
+ (cons) [BFD_ASSEMBLER]: For undefined symbols, use BFD_RELOC_32
+ for now; should be machine-dependent.
+
+ * configure.in: Accept *-*-elf and *-*-solaris* as ELF format
+ targets, forcing BFD use.
+
+Wed Feb 17 18:59:03 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c: Use PARAMS macro for static function
+ declarations. Use BFD_RELOC_ macros everywhere, with
+ compatibility macros declared for non-BFD mode.
+ (struct sparc_it) [BFD_ASSEMBLER]: Use bfd_reloc_code_real_type
+ instead of enum reloc_type.
+ (emit_sparc_reloc): Commented-out function deleted.
+ (md_convert_frag): Deleted.
+ (tc_aout_pre_write_hook): Don't define for BFD_ASSEMBLER.
+ (md_apply_fix): Changed calling sequence (conditionally) for BFD
+ version.
+ * config/tc-sparc.h (md_convert_frag): New macro.
+
+ * config/obj-aout.c (obj_aout_stab): Refer to undefined_section,
+ not SEG_UNKNOWN. Use S_SET_TYPE, S_GET_TYPE, S_GET_DESC instead
+ of referencing fields directly.
+
+ * write.c (cvt_frag_to_fill): New function; extracted from
+ write_object_file.
+ (write_object_file) [! BFD_ASSEMBLER]: Call it.
+ (relax_and_size_seg) [BFD_ASSEMBLER]: New function; relax section
+ and set its size and flags.
+
+ * struc-symbol.h (struct symbol) [BFD_ASSEMBLER]: Replace some
+ fields with BFD equivalents. Turn on back-pointers, and add
+ target-specific fields at end.
+
+Thu Feb 11 09:20:37 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/obj-coffbfd.c (fill_section): Don't set vaddr here.
+ (write_object_file): Set it here instead, so that fixup_segment
+ can see the correct value.
+
+Mon Feb 8 13:56:17 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * write.c (write_object_file): Check for errors and warnings and
+ bail out before processing contents.
+ (chain_frchains_together_1): New function, does most of the work
+ of remove_subsegs.
+ (chain_frchains_together) [BFD_ASSEMBLER]: New function.
+ (remove_subsegs) [! BFD]: Call it.
+ (write_object_file) [BFD_ASSEMBLER]: Converted to use BFD
+ structures and routines.
+
+ * config/obj-elf.*: New files.
+
+ * config/mips.mt, config/rs6000.mt: Deleted.
+
+ * config/h8300.mt: Don't specify compiler here.
+
+ * config/z8k.mt: The z8k code depends on the z8k opcode table,
+ not the h8300 one.
+ * config/tc-z8k.h: Comment fix.
+
+ * write.c: Reordered some functions for better inlining.
+ (fixup_segment): Linkrelax code is no longer conditional on
+ TC_I960.
+
+Thu Feb 4 12:45:16 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/{h8500.mt, tc-h8500.c, tc-h8500.h, obj-coffbfd.c,
+ obj-coffbfd.h}: support for the H8/500
+
+Wed Feb 3 19:28:18 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-vms.h (SUB_SEGMENT_ALIGN): Define VMS version here.
+ * write.c (write_object_file): Not here.
+ (fix_new): Initialize fx_addnumber.
+
+ * listing.c: Don't include target-cpu.h explicitly, since as.h
+ includes it.
+
+Thu Jan 28 00:35:40 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * write.h [BFD_ASSEMBLER]: Don't declare next_object_file_charP,
+ *_fix_root, *_fix_tail, seg_fix_rootP, seg_fix_tailP.
+ (struct fix): Reordered fields for compactness and efficiency.
+ Converted some logical fields to 1-bit fields.
+
+ * config/obj-aout.h: Use PARAMS.
+ [BFD_ASSEMBLER]: Don't define/declare AOUT_MACHTYPE, seg_N_TYPE,
+ N_TYPE_seg, DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE.
+
+ * read.c: Don't include listing.h; as.h includes it. Removed
+ DONTDEF code.
+ [BFD_ASSEMBLER]: Include subsegs.h.
+ (old_buffer, new_broken_words): Default initialization is
+ sufficient.
+
+ * output-file.c [BFD_ASSEMBLER]: Include bfd.h, default TARGET_MACH
+ to 0, define stdoutput.
+ (output_file_create) [BFD_ASSEMBLER]: Call bfd_perror on failure.
+ Call bfd_set_arch_mach.
+ (output_file_close) [BFD_ASSEMBLER]: Call bfd_close, not
+ bfd_close_all_done. Call bfd_perror on failure.
+ (output_file_append) [BFD_ASSEMBLER]: Don't define.
+
+ * config/m68kcoff.mt (LOCAL_LOADLIBES): Delete definition.
+
+ * subsegs.h (segment_info_type): Always define. Omit field scnhdr
+ if not MANY_SEGMENTS. Define new field bfd_section if
+ BFD_ASSEMBLER.
+ (seg_info): New macro.
+
+ * expr.c, input-scrub.c: Use PARAMS macro. Deleted unused
+ variables, and some irrelevant comments.
+
+ * Makefile.in (ALL_CFLAGS): Include $(BFDDEF).
+ (LIBS): Include $(BFDLIB). Don't bother with $(CLIB).
+ * configure.in: Permit --with-bfd-assembler now, with a warning.
+ Variable need_bfd is now a boolean, as is new variable bfd_gas.
+ Set BFDDEF and BFDLIB in Makefile when appropriate.
+
+ * as.c: Removed "#ifdef DONTDEF" and "#ifdef comment" code.
+ (main): Refer to flag_always_generate_output instead of
+ flagseen['Z'].
+
+ * as.c (main) [BFD_ASSEMBLER]: Open output bfd.
+ (*_section) [BFD_ASSEMBLER]: Define them.
+ (perform_an_assembly_pass) [BFD_ASSEMBLER]: Initialize them, and
+ set section flags when appropriate.
+ * as.h (SEG_NORMAL) [BFD_ASSEMBLER]: Require that the specified
+ section is not absolute, undefined, or an assembler internal one.
+ (absolute_section, undefined_section): Always define.
+ * expr.c, read.c, symbols.c: Refer to *_section, not SEG_*; break
+ switch statements into if-else trees.
+ * symbols.c [MANY_SEGMENTS]: Deleted redundant definitions of
+ SEG_BSS and SEG_DATA.
+
+ * as.h (frag_now_fix): New macro.
+ * symbols.c (colon): Use it.
+
+Wed Jan 27 21:43:53 PST 1993 Ralph Campbell (ralphc@pyramid.com)
+
+ * config/tc-mips.c: Added mips support for mips-dec-bsd.
+ * config/tc-mips.h: Added mips support for mips-dec-bsd.
+ * config/ho-mipsbsd.h: Added mips support for mips-dec-bsd.
+ * config/mips-opcode.h: Added mips support for mips-dec-bsd.
+ * configure.in: Added mips support for mips-dec-bsd.
+ * atof-generic.c: Define TRUE and FALSE if not defined.
+
+Thu Jan 21 12:48:19 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * version.c: Bumped version number to 1.93.05.
+
+Wed Jan 20 17:11:53 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/obj-coff.c (obj_emit_relocations): Don't use #elif.
+ (obj_emit_lineno): Don't need return at end of void function.
+ (obj_symbol_new_hook): Ditto.
+
+ * config/tc-m68k.c: Removed some unused code.
+ (tc_aout_fix_to_chars): Array nbytes_r_length is now const.
+
+ * config/tc-m68k.h (TC_COUNT_RELOC): Don't emit reloc if only
+ offset field is set.
+
+Fri Jan 8 05:44:49 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-sparc.c (sparc_ip): For %uhi and %ulo, if not
+ ENV64, emit no reloc.
+ (md_pseudo_table): For ".xword", call s_xword.
+ (s_xword): New function.
+
+ * config/tc-sparc.c (architecture_requested, warn_on_bump,
+ md_relax_table): Use default zero initialization.
+ (s_reserve): Since SEG_E2 is equivalent to SEG_BSS, just use the
+ latter, instead of selecting with preprocessor conditionals.
+
+Thu Jan 7 08:58:21 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: recognise all sparclite variants
+
+Thu Jan 7 05:25:25 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * read.c (s_data) [!BFD_ASSEMBLER]: Fix typo in 4 Jan change --
+ accidentally changed to use subseg_change where it should have
+ been subseg_new.
+
+Tue Jan 5 08:42:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * expr.c (operand): If character other than comma or newline is a
+ logical end-of-line character, use the newline case.
+ From Eric Youngdale:
+ (operand): Set X_add_number field for floating-point numbers.
+ (operand): Treat zero byte as end-of-operand.
+
+ * configure.in (per-target): Look for with_bfd_assembler option.
+ For now, only accept "no", until the merge is done.
+
+ Merged changes from Eric Youngdale (youngdale@v6550c.nrl.navy.mil):
+ * as.c, flonum-konst.c, hex-value.c, input-file.c, version.c,
+ config/obj-aout.h, config/obj-vms.c: VMS -> HO_VMS.
+ * read.c: Finish conversion to S_* macros in the VMS only
+ parts of the program. Add "const" modifier to hex_value.
+ * as.c, read.c, symbols.c, write.c: Change "ifdef VMS" to
+ "ifdef OBJ_VMS".
+ * expr.c: Add "const" modifier to hex_value.
+ * symbols.c: Finish conversion to S_* macros in the VMS only
+ parts of the program. Add "const" modifier to
+ md_[long,short]_jump_size. Remove declaration of const_flag
+ (which will be declared in obj-vms.h).
+ * write.c: Add "const" modifier to md_[long,short]_jump_size.
+ Fix arguments to VMS_write_object_file.
+ * config-gas.com: New file. Script for VMS systems to set up the
+ configuration to build gas for VMS, and create config.status.
+ * make-gas.com: Redone to work with new scheme.
+ * obj-vms.c: Patch to fix bug where we were not correctly parsing the
+ stabs directives.
+ * obj-vms.c: Define macros COPY_LONG and COPY_SHORT which
+ will swap bytes if needed on a big endian system. Use throughout
+ as needed.
+ * obj-vms.c (obj_aout_stab): Add code to generate listing file.
+ * obj-vms.c (VMS_typedef_parse): Add alias to correctly handle certain
+ types of malformed stabs. Change parsing algorithm so that we are
+ more certain of having all of the information that we need on hand.
+ * obj-vms.c (final_forward_reference): New function, used to help
+ resolve the data types of as many struct elements as possible
+ when some part of the struct is not fully defined by the compiler.
+ * obj-vms.c (VMS_LSYM_Parse): Correctly handle case of continuation
+ stabs directives.
+ * obj-vms.c (VMS_write_object_file): Define all vtable psects
+ as symbols as well in the object file. Look for external functions
+ that start with "__vt.", and turn them into variables, since the
+ g++ compiler is incapable of doing this.
+ * tc-vax.c: Add '1' option for backward compatibility with older GCC
+ versions.
+ * bignum-copy.c (bignum_copy): Fix bug where we pad with zeroes.
+ * input-scrub.c (as_where): Fix bug where as would crash if we did not
+ have the name of the source file yet.
+ * config/ho-vms.h: define HO_VMS, not HO_VAX.
+
+Mon Jan 4 05:17:26 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * read.c (s_data): Always use "data_section", since it'll map to
+ SEG_DATA or SEG_E1 if needed.
+ (s_lcomm): Likewise with bss_section.
+ (s_fill): Use memset, not bzero.
+
+Thu Dec 31 04:29:27 1992 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * read.c: Deleted some code under "#ifdef DONTDEF" that was for
+ handling GDB symbol table data.
+
+ * config/obj-aout.h (segment_name): Delete definition.
+ (seg_name): Delete declaration.
+ * config/obj-bout.h (segment_name, seg_name): Ditto.
+ * config/obj-vms.h (segment_name, seg_name): Ditto.
+ * config/obj-coff.h (segment_name): Ditto.
+ * config/obj-coffbfd.h (segment_name): Ditto.
+
+ * Changes for BFD_ASSEMBLER:
+ * obj.h (obj_crawl_symbol_chain): Declare only if not
+ BFD_ASSEMBLER.
+ (obj_header_append, obj_pre_write_hook): Ditto.
+ * as.h (stdoutput): New var, defined only if BFD_ASSEMBLER.
+ (segT) [BFD_ASSEMBLER]: New typedef for "asection *".
+ (segment_name) If BFD_ASSEMBLER, look up BFD section name;
+ otherwise, use seg_name array.
+ (seg_name): Declare only if not BFD_ASSEMBLER.
+ (section_alignment): Declare only if not BFD_ASSEMBLER.
+ (big_section, reg_section, pass1_section, diff_section,
+ absent_section, text_section, data_section, bss_section): If
+ BFD_ASSEMBLER, declare as variables; otherwise, declare as macros,
+ mapping to segT enum values.
+ (tc_aout_fix_to_chars, next_object_file_charP): Force parse errors
+ if these are used or defined, if BFD_ASSEMBLER.
+ (subseg_set, subseg_new) [BFD_ASSEMBLER]: Functionality of old
+ subseg_new split into two functions.
+ (SEG_NORMAL): For BFD_ASSEMBLER, always return true, for now.
+
+ * as.h (volatile): Don't define if already defined.
+ (had_errors, had_warnings): Provide prototypes for ANSI C even if
+ NO_STDARG.
+ (as_bad, as_fatal, as_tsktsk, as_warn): For GNU C version 2,
+ declare with format attribute for -Wformat checking.
+
+Wed Dec 30 10:18:57 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * app.c, config/tc-*.c: Don't include read.h, since it is already
+ included by as.h.
+
+ * These are based on patches from Minh Tran-le
+ <mtranle@paris.intellicorp.com>.
+ * configure.in (i[34]86-ibm-aix*): Accept i486 for host. Use
+ obj_format coffbfd and gas_target i386coff for target.
+ (i[34]86-*-isc*): New host (uses sysv).
+ * config/i386aix.mt: Removed (no longer used).
+ * config/mh-i386aix (RANLIB): Use true rather than /bin/true.
+ (MINUS_G): Removed.
+ (LDFLAGS): Added, defined as -shlib.
+ * config/te-i386aix.h (REVERSE_SORT_RELOCS): Undefine.
+ * config/te-sco386.h (LOCAL_LABEL): Don't define.
+ (DOT_LABEL_PREFIX): Define.
+ * expr.c (operand): If DOT_LABEL_PREFIX, use .L0\001 as a label
+ name rather than L0\001.
+ * read.c (s_lcomm): Make a frag in SEG_BSS rather than using
+ local_bss_counter.
+ * symbols.c, symbols.h (local_bss_counter): Removed.
+ * write.c (write_object_file): bss no longer uses
+ local_bss_counter. Pass correct data and bss size to
+ VMS_write_object_file.
+ * config/obj-vms.c (VMS_write_object_file): Accept bss size as
+ argument, rather than using local_bss_counter.
+ * config/tc-m88k.c (s_bss): Don't use local_bss_counter.
+ * config/tc-sparc.c (s_reserve): Don't use local_bss_counter.
+ * config/obj-coffbfd.c (had_lineno, had_reloc): Removed.
+ (size_section): Restored sanity check.
+ (do_relocs_for): Base section address on s_paddr rather than
+ computing it. Adjust a29k R_IHIHALF special case to account for
+ section paddr (used to require paddr to be zero). If there are no
+ reclos, set s_relptr to 0. Set relocation size in object_headers.
+ (fill_section): Always set s_vaddr here, removing
+ ZERO_BASED_SEGMENTS case. Force s_scnptr for bss to 0. Don't set
+ NOLOAD for i386 .bss, because it confuses the SVR3 native linker.
+ Set STYP_INFO for .comment.
+ (coff_header_append): Use object headers and H_{SET,GET}_* macros.
+ Make aouthdr writing depend on OBJ_COFF_OMIT_OPTIONAL_HEADER.
+ (crawl_symbols): Handle 8 character section name correctly. Use
+ H_{SET,GET}_* macros.
+ (do_linenos_for): Set lineno size in object_headers.
+ (write_object_file): Use H_{SET,GET}_* macros. Don't bother to
+ set s_vaddr here. If string_byte_count remains 4, set it back to
+ 0, and only write strings out if there are some. Call
+ fill_section before do_relocs_for and do_linenos_for.
+ (obj_coff_section): Handle optional quoted second argument giving
+ section characteristics.
+ (obj_coff_bss): Added to handle .bss.
+ (obj_coff_ident): Added to handle .ident (puts string in .comment
+ section).
+ (obj_coff_lcomm): Put common symbols in .bss, not .data.
+ (fixup_mdeps): Change to segment. Call frag_wane after
+ md_convert_frag.
+ (fixup_segment): Explicitly check S_IS_COMMON before making 386
+ adjustment (already happened only for common symbols, but this is
+ clearer).
+ * config/obj-coffbfd.h (OBJ_COFF_OMIT_OPTIONAL_HEADER): Define.
+ * config/tc-i386.c (s_bss): Don't use if I386COFF.
+ (md_pseudo_table): Ignore .optim and .noopt.
+ (tc_coff_sizemachdep): New function.
+ * config/tc-i386.h (REVERSE_SORT_RELOCS): Undef, for SVR3
+ compatibility.
+ (LOCAL_LABEL): Removed definition.
+ (DOT_LABEL_PREFIX): Defined.
+
+Mon Dec 28 10:32:05 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * app.c (app_push): Use memcpy, not bcopy.
+ (do_scrub_next_char): For \", return " not '.
+ (symbol_chars): Now const.
+
+ * expr.c (operand): If not LOCAL_LABELS_FB, don't look for "0f"
+ and "0b". If LOCAL_LABELS_DOLLAR, check for "0$".
+
+ * config/obj-coff.h: Don't use #elif.
+
+ * config/ho-sunos.h: Don't include sys/stdtypes.h; 4.0.3 doesn't
+ have it. (Reported by Noah Friedman, friedman@gnu.ai.mit.edu.)
+
+Wed Dec 16 12:12:33 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * write.c, obj-ieee.c: don't define SUB_SEGMENT_ALIGN if it is
+ already defined.
+
+Tue Dec 15 12:40:11 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * app.c (do_scrub_begin): allow single quote strings if so
+ configured.
+
+ * config/*z8k*: checkpoint
+
+Sun Dec 13 00:04:38 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * read.c (read_a_source_file): avoid calling xmalloc (0).
+
+Sat Dec 12 15:26:34 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * listing.c: Call xmalloc, not malloc; don't declare malloc.
+
+ * Changes to support SCO 3.2v4:
+ * read.c (s_align_bytes, s_align_ptwo): If not SEG_DATA or
+ SEG_BSS, fill with NOP_OPCODE.
+ * config/i386coff.mt: Add opcode/i386.h to TARG_CPU_DEPENDENTS.
+ * config/obj-coffbfd.c (do_relocs_for): Increment addr even if not
+ using ZERO_BASED_SEGMENTS.
+ (fill_section): If ZERO_BASED_SEGMENTS, set segment addresses, but
+ never set segment address for SEG_E2 (.bss) and don't write out
+ SEG_E2 contents. Set .init and .fini sections to STYP_TEXT.
+ (obj_coff_endef): Don't merge labels or symbols awaiting forward
+ definitions, and don't merge tags with non-tags. Check for .bf
+ rather than just checking whether the second character is b and
+ the third character is f.
+ (obj_coff_val): gcc can generate values which we don't handle
+ correctly; discard information for now, since it only affects the
+ debugging information.
+ (tag_find_or_name): Don't insert tags in the symbol table.
+ (yank_symbols): Don't merge labels.
+ (write_object_file): Don't define SUB_SEGMENT_ALIGN if it is
+ already defined. Fill subsegments with NOP_OPCODE, not 0. Don't
+ set segment address if ZERO_BASED_SEGMENTS.
+ (obj_coff_section): Accept and ignore a trailing quoted string, as
+ used in AT&T i386 syntax.
+ (fixup_segment): Take segment as argument. On the i386, adjust PC
+ relative addends by the segment vaddr.
+ * tc-i386.h: Define SUB_SEGMENT_ALIGN.
+ * tc-a29k.h: Define ZERO_BASED_SEGMENTS.
+ * tc-i386.c: (i386_operand): If I386COFF, accept any segment type.
+
+Tue Dec 8 00:06:48 1992 Ken Raeburn (raeburn@rtl.cygnus.com)
+
+ * config/obj-coffbfd.c: Include libcoff.h.
+
+ * version.c: Now version 1.93.
+
+Mon Dec 7 00:39:09 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-i386.c (md_pseudo_table): For 386bsd and linux, do
+ power-of-two alignment for .align.
+
+ * as.h: If BROKEN_ASSERT, just redefine `assert' to be trivial,
+ and leave everything else alone.
+
+Fri Dec 4 16:58:42 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (as.new): Don't bother saving as.old.
+
+ * write.c: Conditionalize on OBJ_VMS, not VMS.
+ (magic_number_for_object_file): Don't define if OBJ_VMS.
+
+ * config/obj-vms.c: Changes for traditional C.
+
+Thu Dec 3 01:24:07 1992 Ken Raeburn (raeburn@kr-pc.cygnus.com)
+
+ * config/ho-generic.h (malloc, realloc): Declare.
+
+ * Lots of comment/whitespace changes.
+
+ * write.h (struct fix): Some fields reordered, narrowed.
+
+ * read.c (MASK_CHAR): Define using C types, not magic number.
+
+ * as.c, input-file.c: Deleted some unused code.
+
+ * app.c, as.h: Doc fix.
+
+ * flonum-konst.c, flonum-mult.c: Include ansidecl.h.
+
+ * as.h (xmalloc): Argument is long.
+
+ * xmalloc.c (error): Remove declaration; as.h takes care of it.
+
+ * doc/as.texinfo: Regrouped documentation of some command-line
+ options. Updated options documentation for m68k. Some minor
+ wording/punctuation changes.
+
+Mon Nov 30 11:42:11 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * configure.in: Accept target OS "vms".
+
+ * symbols.c: Merged ANSI and non-ANSI function decls, using
+ PARAMS macro.
+
+ * xmalloc.c: Just include as.h, don't bother trying to figure out
+ other header files.
+
+ * strstr.c, strerror.c: Deleted.
+ * Makefile.in: Deleted references.
+
+ * config/tc-ns32k.c: Don't include header file for string
+ declarations; leave that to ho-*.h.
+
+Fri Nov 27 04:11:36 1992 Ken Raeburn (raeburn at cambridge-laptop.cygnus.com)
+
+ * config/coff_gnu.h [TC_I860]: Guesses for reloc type values,
+ imported from FSF sources.
+
+ * messages.c (strerror): Declare unconditionally.
+
+ * as.h: Delete alloca and register definitions.
+
+ * config/atof-ieee.c (mask): Now const.
+
+ * obstack.c, obstack.h: Deleted.
+
+ * as.h (flag_readonly_data_in_text): New flag.
+ * as.c (main): Set it for -R.
+
+ * as.h (flag_suppress_warnings): New flag.
+ * as.c (main): Set it for -W.
+ * messages.c (as_warn): Check it instead of flagseen['W'].
+
+ * as.h (flag_always_generate_output): New flag.
+ * as.c (main): Set it for -Z.
+
+ * config/tc-sparc.h: Define NEED_FX_R_TYPE.
+ * config/tc-a29k.h: Ditto.
+ * write.h (struct fix): Don't conditionalize fx_r_type field on TC
+ macros.
+
+ * as.h: Merged ANSI and non-ANSI function decls, using PARAMS
+ macro.
+ * bignum.h, expr.h, flonum.h, frags.h, input-file.h, listing.h,
+ obj.h, output-file.h, read.h, struc-symbol.h, symbols.h, tc.h,
+ write.h: Likewise.
+ * read.c: Likewise.
+
+ * xmalloc.c: Conditionalize on HAVE_MALLOC_H, not USG. Fold in
+ xrealloc from xrealloc.c.
+ * xrealloc.c: Deleted.
+ * Makefile.in (REAL_SOURCES, OBJS): Adjusted.
+
+ * configure.in: For host CPU a29k, rs6000, vax, consider using bsd
+ or vms ho- files.
+
+ * config/ho-sysv.h (setbuffer, HO_USG): Deleted.
+
+ * config/atof-ieee.c (atof_ieee): Exponent field isn't a pointer;
+ don't initialize it with NULL.
+
+ * config/ho-vax.h (M_VAX): Deleted; was unused.
+
+ * README-vms, config/ho-vms.h, config/obj-vms.c, config/obj-vms.h:
+ New files imported from FSF version, contributed by Eric Youngdale.
+ * README-vms-dbg, config/vms: Deleted.
+
+ * ChangeLog, config/ChangeLog: Merged.
+
+ * config/*tahoe*, configure.in: Tahoe support brought in from FSF
+ version.
+
+ * input-file.c (input_file_open): Eliminate call to setvbuf.
+ [USG] (setbuffer): Deleted macro.
+
+Mon Nov 23 11:00:16 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * all files: Whitespace changes for GNU indentation style, done by
+ GNU `indent'. Some cleanup still needed, especially of comments.
+
+ * configure.in: No te-386bsd.h file exists; don't try to use it.
+
+ * obj-coff.c (obj_coff_endef): Use as_warn, not fprintf.
+
+ * tc-m68k.c (md_assemble): Don't complain about 68000 with 68881;
+ could be doing emulation.
+
+Thu Nov 19 11:47:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ z8000 documentation
+ * doc/Makefile.in, doc/all.m4, doc/as-all.texinfo, doc/as.texinfo:
+ all modified.
+
+Tue Nov 10 09:49:24 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (as.o, obj-format.o): added dependency on subsegs.h.
+
+ * subsegs.h: add extern to segment_info declaration.
+
+ * read.h: added extern declarations for comment_chars,
+ line_comment_chars, and line_separator_chars.
+ read.c, app.c: removed definitions of comment_chars,
+ line_comment_chars, and line_separator_chars.
+
+ * tc-m68k.c (m68k_reg_parse): If REGISTER_PREFIX isn't defined,
+ still accept (but don't require) OPTIONAL_REGISTER_PREFIX before
+ the register name.
+ (insert_reg): put REGISTER_PREFIX before register names before
+ putting them in the symbol table.
+ * tc-m68k.h (OPTIONAL_REGISTER_PREFIX): Define to be "%", if not
+ M68KCOFF.
+
+ * obj-coffbfd.c (fill_section): set STYP_NOLOAD bit for .bss
+ section.
+
+ * atof-ieee.c, atof-ns32k.c, tc-*.c: made EXP_CHARS, FLT_CHARS,
+ comment_chars, line_comment_chars and line_seperator_chars
+ consistently const, and always initialized them. Included read.h.
+
+Thu Nov 5 17:55:41 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * tc-sparc.c (sparc_ip): Add code to flag error if an absolute
+ constant will not fit in an immediate field.
+ (md_apply_fix, RELOC_BASE13 case): Check for relocation overflow.
+
+Wed Nov 4 07:50:46 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * obj-coff.c (callj_table): Delete global variable.
+ (obj_emit_relocations): Define it locally here, and only if
+ TC_I960 is defined.
+
+ * tc-m68k.c (m68k_reg_parse): Underscore is part of a symbol name.
+ (m68k_ip): Don't warn about bignum used as float bit-pattern.
+
+ * obj-coff.c: Replaced ANSI and non-ANSI function declarations
+ with a single set using PARAMS macro.
+
+ * tc-i960.c (tc_bout_fix_to_chars): Bit-field fixups want a length
+ of 2.
+
+ * tc-i960.c: Missed a couple of 0->NO_RELOC conversions.
+
+ * tc-i960.h (N_BALNAME, N_CALLNAME): Define as char-type values,
+ so widening works consistently.
+
+Wed Oct 28 08:52:34 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * version.c: Put conditional "const" before version_string, not
+ before dummy function for VMS. Now version 1.91.03.
+
+ * app.c (do_scrub_next_char): Need double-\ before `000' to show
+ printed rep of null character.
+
+Fri Oct 23 14:40:38 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * obj-coffbfd.c (write_object_file): check return value of
+ bfd_close_all_done.
+
+Tue Oct 20 12:18:08 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Support for i386-sysv.
+ obj-coffbfd.c (do_relocs_for, write_object_file): set segment
+ addresses to reasonable sizes. New define ZERO_BASED_SEGMENTS can
+ be used to set them all to zero as was done before.
+ (fill_section): segment addresses now set in write_object_file.
+ (fill_section): Don't set STYP_NOLOAD for .bss section.
+ (fixup_segment): 386 uses strange common symbol format.
+ tc-i386.c (tc_coff_fix2rtype): use R_DIR32, not R_RELLONG, for
+ compatibility with SVR3.2 linker.
+ * configure.in: i386-sysv and i386-sco use coffbfd.
+
+ * app.c (do_scrub_next_char): discard whitespace after a label.
+
+Sat Oct 10 12:33:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: differentiate between SunOS 4 and Solaris2 for Sun4
+ hosts, use the sysv configuration for solaris2
+
+Mon Oct 5 09:28:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ fix i960+non-bfd coff bit rot.
+ * obj-coff.c (c_dot_file_symbol, obj_coff_ln, obj_coff_line):
+ support for C source listings. (obj_coff_endef): look in the right
+ part of the symbol for the symbol name
+
+ * tc-m68k.c (get_num): make it work for all segments, not just the
+ first three.
+
+Mon Oct 5 03:30:36 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * configure.in: recognize i386-*-bsd emulation.
+
+Thu Oct 1 23:05:12 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in: use the cpu-vendor-os triple for host and target
+
+Tue Sep 29 12:22:52 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * obj-coffbfd.c (write_object_file): don't fixup for the z8k
+ * tc-z8k.c: lots of bug fixes
+
+Tue Sep 29 10:51:55 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * tc-i960.h, tc-i960.c: avoid the ANSI preprocessor addition
+ #elif, since it is not supported by old compilers.
+ ho-rs6000.h, tc-m68k.c: the native RS/6000 compiler miscompiles a
+ couple of expressions in tc-m68k.c.
+
+Mon Sep 28 21:18:24 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * read.c (cons): If NO_RELOC is defined, use it.
+
+ * tc-i960.c (get_cdisp): Use NO_RELOC, not 0, in call to fix_new.
+
+Fri Sep 25 18:18:52 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * tc-m68k.h: if M68KCOFF, define DOT_LABEL_PREFIX (to require
+ local labels to start with a .) and set REGISTER_PREFIX to %.
+ tc-m68k.c (m68k_reg_parse): accept REGISTER_PREFIX if defined.
+
+Fri Sep 25 17:53:43 1992 John Gilmore (gnu@cygnus.com)
+
+ * messages.c: Comment changes.
+
+Fri Sep 25 14:12:58 1992 Ken Raeburn (raeburn@kyriath.cygnus.com)
+
+ * as.h: Test if __STDC__ is defined only, don't test its value.
+ * messages.c: If __STDC__ is not defined, define NO_STDARG.
+
+Thu Sep 24 12:42:32 1992 Brendan Kehoe (brendan@rtl.cygnus.com)
+
+ * listing.c (debugging_pseudo): Add stabs and stabn as things to
+ ignore.
+
+Tue Sep 22 13:02:07 1992 Sean Eric Fagan (sef@cygnus.com)
+
+ * obj-coffbfd.c (do_relocs_for,fill_section): now allocate all
+ sections starting from zero, rather than making them consecutive.
+ This makes subsequent reloc calculations easier, esp if the object
+ format doesn't understand addends. (obj_coff_lcomm): (maybe temporarily)
+ allocate lcomm in .data rather than in .bss. It seems that some
+ tools can't cope with a non-zero sized bss before linkage.
+
+Tue Sep 22 15:10:51 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * tc-m68k.c: Replace "enum m68k_architecture" with "int"
+ throughout. That enum no longer means what we thought it meant.
+
+ * tc-m68k.c (md_assemble, md_parse_option): Handle new
+ "-mno-688[58]1" options.
+
+ * tc-m68k.c: Added CPU32 support.
+
+Fri Sep 18 08:02:18 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * tc-m68k.c (m68k_ip): An(disp) is not pc relative.
+
+Tue Sep 15 17:25:05 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * Makefile.in (as.new): Remove dependence on LOCAL_LOADLIBES.
+ Change LIBDEPS dependence to LIBS.
+
+Tue Sep 15 15:32:02 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (install): if $(tooldir) exists, install as in
+ $(tooldir)/bin.
+
+Sun Sep 13 20:30:10 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Added WARN_SIGNED_OVERFLOW_WORD define to give an error if any
+ .word is < -32768 or > 32767. The -J flag causes the error to be
+ ignored. This is to catch over-sized switches generated by gcc on
+ systems which don't support the broken .word hack.
+ as.c (main): permit -J if WARN_SIGNED_OVERFLOW_WORD.
+ write.c (fixup_segment): check for signed .word overflow if
+ WARN_SIGNED_OVERFLOW_WORD.
+
+ * write.c (fixup_segment): fixed missing parens in expression
+ checking for byte or word overflow.
+
+ * obj-coffbfd.h: define WARN_SIGNED_OVERFLOW_WORD.
+ obj-coffbfd.c (fixup_segment): check for signed .word overflow if
+ WARN_SIGNED_OVERFLOW_WORD.
+
+ * obj-coffbfd.c (fixup_segment): fixed missing parens in
+ expression checking for byte or word overflow.
+
+Fri Sep 11 10:21:04 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ Support for i386 coff
+ * obj-coffbfd.h : added stuff
+ * tc-i386.c (tc_coff_fix2rtype): new function
+ * tc-i386.h : new coff defines
+
+Thu Sep 10 09:23:15 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * input-scrub.c (input_scrub_push): call input_file_begin, not
+ input_scrub_begin.
+ messages.c (as_perror): print ": " between the passed in error and
+ the strerror, like perror does.
+
+Wed Sep 9 11:06:25 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: use gas_target instead of modifying target_cpu.
+ From Steve Chamberlain:
+ Makefile.in: Handle m68*-*-coff*.
+ read.c, read.h: add mult argument to s_space
+
+ * tc-m68k.c (m68k_ip, m68k_ip_op, get_num, try_moto_index): merge
+ Motorola and MIT syntax; gas can now assemble either type of
+ file.
+ tc-m68kmote.c, tc-m68kmote.h: removed now superfluous files.
+ From Steve Chamberlain:
+ m68kcoff.mt: for m68k COFF.
+ obj-coffbfd.c: (fixup_mdeps) added
+ (size_section) removed bad sanity check
+ (fill_section) added rs_machine_dependent case
+ (write_object_file) call fixup_mdeps
+ (fixup_segment) set fx_subsy to 0.
+ obj-coffbfd.h: define WORKING_DOT_WORD (too hard to support) and
+ handle m68k.
+ tc-m68k.c, config/tc-m68k.h: added m68k COFF support and Motorala
+ pseudo ops.
+
+Tue Sep 8 17:10:58 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * Makefile.in (LIBS): Include opcode library.
+
+Fri Sep 4 18:20:56 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-m68k.c (get_num, case SEG_BIG): If only small integers
+ including zero are accepted, pass +0.0.
+
+Sun Aug 30 21:24:46 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: map "as" through program_transform_name when
+ installing.
+
+ * doc/Makefile.in: map "as" through program_transform_name when
+ installing.
+
+Sat Aug 29 12:11:12 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * Makefile.in (as.new): Depend on LOCAL_LOADLIBES.
+
+Fri Aug 28 16:25:22 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * obj-bout.h, obj-bout.c (obj_header_append, obj_symbol_to_chars),
+ tc-i960.c (md_ri_to_chars): Always output bout object file in
+ little endian byte order (used to use endianness of host).
+
+Tue Aug 25 15:50:48 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * config/tc-m68k.c (init_table): Now const. Always include 68851
+ data, so that "bc" is available to 68040 cache instructions.
+ Added "tt0", "tt1", and 68ec030 variants.
+ (md_assemble): Complain if 68000 (only) and 68881 are specified.
+ (enum _register): Added TT0, TT1.
+ (m68k_ip, cases '3' and 't'): Handle new operand type codes. Pass
+ line number correctly in "internal error" messages. Don't print
+ architecture-mismatch message for operand errors.
+
+ From Colin Smith (colin@wrs.com):
+ * config/tc-m68k.c (m68k_ip, case '_'): Use addword twice rather
+ than install_operand.
+
+Tue Aug 25 15:13:48 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * listing.c (buffer_line): rewind to the start of include
+ files, they might be included twice.
+
+ * z8k.c, z8k.h, z8k.mt: z8000 support stuff
+
+Mon Aug 24 12:45:43 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: defined TARGET_CPU for C code so that it can choose
+ one element of a family.
+
+ * tc-m68k.c: use TARGET_CPU to choose default cpu type.
+
+ * te-generic.h: default to LOCAL_LABELS_DOLLAR and LOCAL_LABELS_FB
+ so that we can assemble hand-written libgcc code.
+
+Fri Aug 21 14:38:44 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
+
+ * messages.c (as_warn): Use fputs, not fprintf, with a buffer that
+ has already been formatted (but may still contain %-characters).
+ (as_bad): Likewise.
+
+Wed Aug 19 11:20:59 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * tc-m68k.c, tc-m68kmote.c: the cas2 instruction is supposed to be
+ written with indirection on the last two operands, which can be
+ either data or address registers. Added a new operand type 'r'
+ which accepts either register type. Added '(' to notend stuff in
+ tc-m68kmote.c to accept (a0):(a2) in cas2 instruction.
+
+Wed Aug 19 09:25:09 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * as.h (enum _relax_state): Start off at one, not zero, to better
+ catch uninitialized-variable errors.
+ (linkrelax): Declare new variable.
+
+ * messages.c (warning_count, error_count): Default initializer is
+ sufficient.
+
+ * write.c: Merged some declarations, using PARMS macro.
+ (text_frag_root, data_frag_root, bss_frag_root, text_last_frag,
+ data_last_frag): No longer static.
+ (write_object_file, case rs_align or rs_org): If HANDLE_ALIGN is
+ defined, call it. Change segments before calling fixup_segment.
+ (relax_align): If linkrelax, provide extra padding.
+
+ * obj-bout.c (obj_emit_relocations): Emit alignment relocs despite
+ their not having symbols associated.
+
+ * tc-i960.c (norelax, instrument_branches): Default initializer is
+ sufficient.
+ (linkrelax): Delete variable definition.
+ (mem_fmt): Call fix_new with NO_RELOC.
+ (tc_bout_fix_to_chars): Handle alignment relocs.
+ (i960_handle_align): New function.
+ * tc-i960.h (linkrelax): Delete declaration.
+ (HANDLE_ALIGN): New macro; calls i960_handle_align.
+ (NEED_FX_R_TYPE, NO_RELOC): New macros.
+
+Tue Aug 18 14:59:21 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/sparc.mt: New file. Grab sparc opcode table from bfd
+ library.
+
+Tue Aug 18 14:16:38 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: always create installation directories. Removed
+ MINUS_G, set CFLAGS to default to -g, added FLAGS_TO_PASS, passed
+ FLAGS_TO_PASS to recursive makes.
+
+ * doc/Makefile.in: always create installation directories.
+
+Mon Aug 17 15:09:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * input-scrub.c (input_scrub_pop, input_scrub_push): memcpy was
+ being used with args swapped, causing occasional lossage when
+ refilling buffers after an include file.
+
+Mon Aug 17 13:18:51 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * messages.c (as_tsktsk): Use correct ANSI form for stdarg
+ version. Discard bogus DONTDEF version.
+ (as_warn, as_bad, as_fatal): Likewise.
+
+Fri Aug 14 18:31:14 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-m68k.c (m68k_ip): If instruction is invalid for the
+ selected architecture, print a message saying so and listing what
+ processors support it, rather than saying "operands mismatch".
+
+Thu Aug 13 13:53:19 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * as.h [BROKEN_ASSERT]: If defined, turn off all assertion checks.
+
+ * config/ho-rs6000.h (M_RS6000): Don't define it.
+ (free): Declare it.
+ (BROKEN_ASSERT): Define it if not __STDC__.
+
+Tue Aug 11 12:58:14 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * sparc.mt: New file.
+
+Mon Aug 10 14:37:08 1992 Per Bothner (bothner@cygnus.com)
+
+ * tc-m68k.c: ".align N" means align to N-byte boundary *only*
+ if TN_SUN3; otherwise align to 2**N-byte bounary.
+
+Thu Aug 6 12:10:39 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * read.c (s_fill): make the .fill size clamped error a warn and
+ fix bug where 0's were always placed.
+
+ * config/tc-h8300.c: if a :8 is seen after an operand, fill top
+ two bytes of any constant with 0xff:
+
+Wed Aug 5 12:02:40 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/tc-m68k.c (md_pseudo_table): fix the .align thing
+ the right way; for just the 68k. Sun 3 .align is nbytes, not ptwo.
+
+Wed Aug 5 01:54:34 1992 John Gilmore (gnu at cygnus.com)
+
+ * tc-m68k.c (try_index): Error if index scaling specified and
+ assembling for an older CPU than a 68020.
+
+Sat Aug 1 19:10:13 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * config/tc-sparc.c (tc_aout_fix_to_chars): If pc-relative, take
+ fx_offset into account.
+
+Fri Jul 31 21:53:28 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * configure.in (mips host): Accept "ultrix" with version number.
+
+ * expr.c (floating_constant): Separate "=-" to avoid confusing
+ ancient or broken compilers.
+
+ * config/tc-m68k.c (m68k_ip): Mismatch error could also indicate
+ processor/opcode mismatch, so reword the error message.
+ (md_assemble): If no CPU has been set (even if FPU/PMMU
+ characteristics have been), default to 68020. Don't need extra
+ quotes around error string.
+
+Fri Jul 31 12:26:34 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * read.c (potable): Revert sac's incorrect change made Jul 13.
+ Align really is supposed to be ptwo not nbytes.
+
+Mon Jul 20 02:51:59 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * Makefile.in: _Do_ include libiberty. (from sef)
+
+Fri Jul 17 15:15:28 1992 Ken Raeburn (raeburn@cygnus.com)
+
+ * expr.c (integer_constant): Handle "0f" and "0b" label references
+ properly.
+
+Thu Jul 16 08:20:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * write.c (fixup_segment): if relaxing, don't do anything.
+ * config/obj-bout.[ch] : maintain the a_relaxable file header info
+ * config/tc-i960.c: new option -linkrelax
+
+Mon Jul 13 14:11:36 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * expr.c (expr): allow SEG_BSS in expressions
+ * read.c (potable): align should be nbytes, not ptwo!
+ * write.c (write_object_file): extra glue for new bss attributes
+ (relax_segment): SEG_BSS is ok now
+ * config/tc-m68k.c (m68k_ip_op): can now parse more @( modes
+
+Mon Jul 6 17:09:32 1992 Steve Chamberlain (sac@cygnus.com)
+
+ * obj-coffbfd.c (fill_section): mark .lit sections as STYP_LIT
+
+Mon Jun 1 16:20:22 1992 Michael Tiemann (tiemann@cygnus.com)
+
+ * configure.in: recognize m680x0 as having sun3 emulation mode for
+ vxworks environment.
+
+
+Tue Jun 30 20:25:54 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * Makefile.in: Add program_suffix (parallel to program_prefix)
+
+Wed Jun 24 10:57:54 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * app.c (process_escape): new function to handle escapes the right
+ way, (do_scrub_next_char): use new function
+ * cond.c (s_ifdef): do ifdef/ifndef right
+ * read.c (s_fill): make the , expressions optional like the doc
+ says
+ * config/tc-h8300.[ch]: better warnings
+
+Tue Jun 9 07:54:54 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * subsegs.c (subsegs_begin): create bss0_frchainP in the same was
+ as data0_frchainP
+
+ * write.c (write_object_file): various changes to handle data in
+ the BSS segment in much the same was as stuff in the DATA segment.
+
+ * tc-m68k.c (m68kip): Fix typo so that only arch's >=68020 do
+ pcrel data stuff. (md_estimate_size_before_relax): when relaxing a
+ 68010 bxx into a bra+6 jmpxx, put the bytes of the jmp opcode into
+ the right place. (s_bss): Don't put .bss stuff into SEG_DATA, put
+ it into SEG_BSS
+
+Thu Jun 4 11:59:13 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * expr.c(expr): allow SEG_REGISTER in expressions.
+ * read.c(pseudo_set): register expressions can be the source of a
+ set.
+ * subsegs.c (subseg_new): Now -R forces all changes to SEG_DATA to
+ goto SEG_TEXT (if a.out)
+ * write.c (write_object_file): If a.out don't use the old way for
+ -R.
+ * config/obj-a.out (s_sect): complain if the user tries to use a
+ subsegment with a value which might interfere with out -R hackery.
+ * config/tc-m68k.c (m68k_reg_parse): lookup names in symbol table
+ rather than use ugly if tree. (init_regtable): insert register
+ names into symbol table.
+
+Tue Jun 2 16:47:09 1992 Steve Chamberlain (sac@cygnus.com)
+
+ * write.c (write_object_file): keep the fix_tail clean, which
+ fixes a bug in -R where relocations were being lost.
+
+Mon Jun 1 16:20:22 1992 Michael Tiemann (tiemann@cygnus.com)
+
+ * configure.in: recognize m680x0 as having sun3 emulation mode for
+ vxworks environment.
+
+Sun May 31 05:33:00 1992 david d `zoo' zuhn (zoo@cygnus.com)
+
+ * configure.in: recognize m680x0 as an m68k
+
+Thu May 28 11:22:02 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * configure.in: Recognize sparclite as a sparc variant.
+
+ * tc-sparc.c: Use new ARCHITECTURES_CONFLICT_P macro. Mention new
+ -Asparclite flag.
+
+Tue May 26 16:47:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * config/tc-a29k.c: lint
+ * listing.c, expr.c: patches from Andrew Smith
+
+Thu May 14 17:22:48 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * doc/Makefile.in: use m4 rather than gm4.
+
+Mon May 4 18:56:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * obj-coffbfd.c: use is a synonym for section, (do_relocs_for):
+ calc the base of relocs correctly.
+ * tc-a29k.c (parse_operand): allow expressions to be in any section.
+
+Mon Apr 27 13:13:31 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * as.c, write.c: use -K rather than -k for the broken word warning
+ option.
+
+Tue Apr 21 13:35:30 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: do not print recursion lines.
+
+Wed Apr 15 21:19:31 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: the tooldir copy of gas goes directly in tooldir.
+
+Tue Apr 14 14:50:22 1992 Ken Raeburn (Raeburn@Cygnus.COM)
+
+ * write.c (write_object_file): For b.out format, round up section
+ start addresses to match required alignment.
+
+Thu Apr 9 05:45:29 1992 Ken Raeburn (Raeburn@Cygnus.COM)
+
+ * Makefile.in (install): Install into $(tooldir)/bin, since that's
+ where gcc looks for it.
+
+Tue Apr 7 15:12:15 1992 Sean Eric Fagan (sef@cygnus.com)
+
+ * Makefile.in: Changed some lines to be less confusing for some
+ makes.
+
+ * input-file.c: Conditionalize on _IOFBF, not VMS.
+
+ * read.c, write.c: Change a series of ifdef/elif to
+ ifdef/else/ifdef etc.
+
+Fri Mar 27 12:21:16 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * symbols.c (fb_label_init): fix sizeof to memset.
+
+Fri Mar 13 15:45:44 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: install the man page.
+
+ * Makefile.in: pass down MAKEINFO explicitly on info.
+
+ * doc/Makefile.in: use $(MAKEINFO) not makeinfo.
+
+Fri Mar 13 08:03:03 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * flonum-const.c: renamed flonum-konst.c to stop dos name
+ conflict.
+
+Thu Mar 12 04:42:38 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * tc-m68k.h, te-sun3.h: moved LOCAL_LABELS_FB definition from
+ tc-m68k.h to te-sun3.h.
+
+Wed Mar 11 23:32:42 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * configure.in: vxworks68 gets te-sun3.h.
+
+ * expr.c: remove limitation that local_labels_dollar or
+ local_labels_fb must be < 10.
+
+ * symbols.c: remove local_labels_dollar, replace with a function
+ interface for a sparse array. All users adjusted.
+
+ * te-sun3.h: add LOCAL_LABELS_DOLLAR.
+
+Sat Mar 7 00:06:25 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * doc/Makefile.in: commented out line for building as-all.texinfo.
+ This is temporary.
+
+ * doc/as.texinfo, doc/as-all.texinfo: added menu item hooks.
+
+Fri Mar 6 21:57:18 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in: added check target.
+
+Tue Mar 3 15:45:56 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: added tooldir and program_prefix.
+
+Sun Mar 1 04:43:19 1992 Michael Tiemann (tiemann@cygnus.com)
+
+ * write.{c,h} (fix_new): Make these declarations consistent.
+
+Sat Feb 29 13:59:10 1992 Michael Tiemann (tiemann@cygnus.com)
+
+ * Makefile.in (strerror.o): Add rule so that broken Sun make can
+ work in subdirs.
+
+Wed Feb 26 19:26:28 1992 Steve Chamberlain (sac at thepub.cygnus.com)
+
+ * read.c, obj-coffbfd.c : fix h8300 specific bit rot
+
+ * expr.c (operand): if can't work out what sort of operand it is,
+ then look through FLT_CHARS for a hint.
+
+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.
+
+ * doc/Makefile.in, doc/configure.in: removed traces of namesubdir,
+ -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
+ copyrights to '92, changed some from Cygnus to FSF.
+
+Tue Feb 25 14:17:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * expr.c: If an expression is single comma, then return with
+ SEG_ABSENT rather than an error - since the sparc front end does
+ really strange things with things like fbge,a
+
+ * as.h: include bfd.h if using many sections
+ * expr.c: LOCAL_LABELS_FB had been changed to lower case - so
+ local labels didn't work.
+ * listing.c (list_symbol_table): don't core dump when there's no
+ symbol there.
+ * write.c, write.h: call fix_new with the right number of args on
+ the H8.
+ * config/tc-h8300.[ch] : fix bugs reported by HMSI, and make
+ errors nices
+
+Sat Feb 22 12:26:28 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * app.c: MRI compatibility - allow single quote to start a string.
+ * as.c: fix typo recently introduced.
+ * as.h : Don't include aout/reloc.h - it's not right for COFF!
+ * expr.c: Much rewriting, to accomodate MRI syntax for
+ expressions. Also easier to read now.
+ * listing.c: Put back defuns
+ * read.c: modified to accept MRI syntax, put back listing pseudo
+ ops so that an assembler built with NO_LISTING ignores list ops
+ rather than pukes.
+ * write.c, write.h: fixs - only keep a reloc type in a fix if the target
+ machine is a SPARC or a 29K.
+ * config/obj-aout.c: added s_sect pseudo op
+ * config/obj-coffbfd.c: lints, set the filehdr flags right and
+ fill in the timestamp.
+ * config/obj-coffbfd.h: Since we don't include aout/reloc.h
+ anymore, define all the relocs which the tc-<x> bit will use so we
+ can translate from them to the coff types.
+ * config/tc-a29k.c: reloc_type isn't ane enum any more
+ * config/tc-m68k.c: Added NO_RELOC definition.
+
+Fri Feb 21 06:21:07 1992 K. Richard Pixley (rich@rtl.cygnus.com)
+
+ * Makefile.in: put header files before C source for TAGS; remove
+ references to non-existent syscalls.h.
+
+ * read.c, write.c subsegs.c: back out the .bss changes.
+
+ * obj-aout.c: do not include stab.gnu.h if NO_LISTING.
+
+ * tc-i860.c, a.out.gnu.h: move i860 relocs to a proper place.
+
+ * a.out.h: removed.
+
+Fri Feb 21 01:08:48 1992 Minh Tran-Le (TRANLE@INTELLICORP.COM)
+
+ * symbols.c (local_label_name): symbols now start with ^A.
+
+ * read.c, subsegs.c, write.c obj-coff.c: added handling of
+ `.bss` pseudo op for unitialized data. The new gcc (1.37.9x)
+ generate these sections. .align: will use NOP_OPCODE or 0
+ for padding. This is just for being nice to the
+ disassembler.
+
+ * expr.c (operand): changed to generate local label "\001L0"
+ starting with a ^A so that it is recognized as a local label.
+
+ * as.c (perform_an_assembly_pass): zero bss_fix_root, too.
+
+ * tc-i386.c: tc-i386.c: added handling of the following opcodes:
+ i/o opcodes - inb, inw, outb and outw. string manipulation with
+ att syntax - scmp, slod, smov, ssca, ssto.
+
+ * obj-coff.c: (for aix386) Moved the symbols .text, .data and .bss
+ to just after .file .
+
+ In obj_crawl_symbol_chain() where it tries to put the external
+ symbols apart, with the condition:
+ (!S_IS_DEFINED(symbolP) &&
+ !S_IS_DEBUG(symbolP) &&
+ !SF_GET_STATICS(symbolP))
+ it was moving too many symbols out. So I switch it back to the
+ condition:
+ (S_GET_STORAGE_CLASS(symbolP) == C_EXT && !SF_GET_FUNCTION(symbolP))
+
+ In obj_emit_relocations() added the conditional on KEEP_RELOC_INFO
+ so that we don't use the F_RELFLG which make the linker complain
+ that somebody has stripped the relocation info.
+
+ Also, the AIX ld program require that the relocation table
+ is sorted by r_vaddr like the standard ATT assembler does.
+
+ [he also changed the sizeof(struct ...)'s into the coff
+ style FOOSZ macros. I'm not sure this is right, but I can't
+ remember why. xoxorich.]
+
+Fri Feb 21 01:08:48 1992 K. Richard Pixley (rich@cygnus.com)
+
+ * Makefile.in, configure.in, doc: use the doc. Build it, install
+ it, clean it, etc.
+
+Tue Feb 18 02:21:25 1992 K. Richard Pixley (rich at cygnus.com)
+
+ * read.c: white space and comments only.
+
+ * configure.in: use the new atof-ns32.c for ns32k.
+
+ * write.c: comment change only.
+
+ * tc-m88k.[hc]: pulled in from hack's unfinished work. These
+ aren't yet integrated.
+
+ * tc-i860.[hc]: blew off the dust. Something must still be done
+ about conflicting relocation types.
+
+ * tc-ns32k.c: Replaced previous tc_aout_fix_to_chars stub with the
+ real thing.
+
+ * tc-i960.c, tc-sparc.c: white space and comments only.
+
+ * tc-a29k.h: delete duplicate macro definition.
+
+ * new file atof-ns32k.c copied from hack's last unreleased gas.
+
+Mon Feb 17 07:51:06 1992 K. Richard Pixley (rich at cygnus.com)
+
+ * config/tc-ns32k.c: actually make tc_aout_fix_to_chars work
+ rather than abort.
+
+ * nearly everything. flush ChangeLog, package as gas-1.92.1.
+ ChangeLog's prior to this are sketchy at best. I have logs.
+ They just aren't ChangeLogs.
diff --git a/contrib/binutils/gas/ChangeLog-9697 b/contrib/binutils/gas/ChangeLog-9697
new file mode 100644
index 0000000..dd2af82
--- /dev/null
+++ b/contrib/binutils/gas/ChangeLog-9697
@@ -0,0 +1,5960 @@
+Wed Dec 31 12:29:47 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_relax_table): Correct branch ranges.
+
+Mon Dec 22 13:06:05 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (i386*-go32-rtems*): Fix to be the same as
+ i[3456]86-go32.
+ * configure: Rebuild.
+
+Mon Dec 22 12:54:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro): The 4650 doesn't permit M_LDC1_AB,
+ M_SDC1_AB, M_L_DOB, M_L_DAB, M_S_DAB, or M_S_DOB.
+ (mips_ip): Always check for FP_D, not just for instructions that
+ are not part of the regular ISA.
+
+Thu Dec 18 16:49:28 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-d10v.c (build_insn): Make `number' a long for 64-bit hosts.
+
+Thu Dec 18 16:42:57 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (cpu_types): 21164pc/pca56 does not have CIX.
+
+Wed Dec 17 21:23:07 1997 Jeffrey A Law (law@cygnus.com)
+
+ * expr.c (integer_constant 32bit bignum): Mask off bits outside
+ the range we care about.
+
+Wed Dec 17 15:29:03 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-d30v.c (md_shortopts): Add 'n' and 'N' options.
+ (exec_type_enum): Enumeration giving all of the exec types.
+ (warn_nops): New static variable to give nop warning level.
+ ({cur,prev}_mul32_p): New static variable to keep track of whether
+ the current/previous instruction is a 32-bit multiply.
+ (Optimizing): Make static.
+ (NOP{2,_LEFT,_RIGHT}): Macros for word of nops and left/right
+ nops.
+ (d30v_insert_operand): Delete declaration of unused function.
+ (write_2_short): Make exec_type argument enum, not int.
+ (parallel_ok): Ditto.
+ (check_range): Delete unused variable(s).
+ (build_insn): Ditto.
+ (find_format): Ditto.
+ (md_apply_fix3): Ditto.
+ (md_show_usage): Document -n and -N.
+ (md_parse_option): Parse -n and -N.
+ (write_1_short): If -n, warn about adding a nop. Use
+ NOP_{LEFT,RIGHT}.
+ (write_2_short): Use enumeration values instead of hard coded
+ integers. Reset exec_type for default operations. For explicit
+ parallel operations, call parallel_ok to make sure everything is
+ ok. If writing out a parallel operation, and the previous
+ instruction was a 32-bit multiply, indicate current instruction
+ is.
+ (parallel_ok): Allow add/tx ... to be done in parallel with
+ another add/tx ... assuming the gpr registers don't overlap.
+ (md_assemble): Use exec type enumeration values, not hard coded
+ ints. Check for loads or 16-bit multiplies following in the next
+ cycle after a 32-bit multiply. Add nops if that is the case.
+ (do_assemble): Copy prev_mul32_p to cur_mul32_p, and set
+ cur_mul32_p if current instruction is a 32-bit multiply.
+ (find_format): Change spacing and layout.
+
+Tue Dec 16 16:55:45 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (tic80_relax): New static variable.
+ (md_longopts): Add new OPTION_RELAX and OPTION_NO_RELAX options.
+ (md_parse_option): Handle new relax options.
+ (md_show_usage): Document new relax options.
+ (find_opcode): Don't use short forms of PC relative branches if
+ tic80_relax is set.
+
+Tue Dec 16 15:26:03 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-d30v.c (parallel_ok): Remove non-register bits from
+ used/set flag fields. Make flag vars unsigned long. Use
+ FLAG_A{0,1} for accumulators. Allow any 2 insns to be done in
+ parallel if they use the same conditional flag with reversed
+ meaning. Allow 2 add/sub insns that set the carry or overflow
+ flags but do not query them to be done in parallel. Don't allow 2
+ word store operations to be done in parallel with ADDppp or
+ SUBppp. Don't allow loads to be done in parallel with 16 bit
+ multiplies.
+
+Tue Dec 16 09:20:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c: Prevent use of interworking support for
+ non-COFF targets.
+
+Mon Dec 15 15:20:32 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/all.texi: Add M32R cpu.
+
+ * doc/as.texinfo: Add documentation of m32r processor.
+
+ * 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
+ the instruction.
+
+Fri Dec 12 11:44:20 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (build_insn): Handle instructions that have
+ long (32 bit) PC relative offsets. Fix places that previously
+ misused R_MPPCR for 15 bit offsets to use the new R_MPPCR15W type.
+ (md_apply_fix): Add case to handle long PC relative offsets.
+
+Fri Dec 12 10:35:01 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-arm.texi (ARM Options): Document support for new ARM
+ processor names.
+
+ * config/tc-arm.c (md_parse_option): Add support for new ARM
+ processor names.
+
+Thu Dec 11 17:46:50 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Don't overwrite opcode table data.
+ (insop, m68k_ip): Make `opcode' const so it doesn't happen again.
+
+Fri Dec 5 11:23:59 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Fix BFD_RELOC_32 against a
+ symbol + offset.
+
+ * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Use
+ SHT_V850_{S|T|Z}COMMON to mark special common sections.
+
+Tue Dec 2 17:05:13 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Brought up to date with the branch.
+
+Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-sh.c (SWITCH_TABLE_CONS): Handle (fix)->fx_size == 1.
+ (SWITCH_TABLE): Handle BFD_RELOC_8.
+ (md_apply_fix): #ifndef BFD_ASSEMBLER code: Handle fixP->fx_size == 1.
+ (coff_reloc_map): Add BFD_RELOC_8_PCREL entry.
+ (sh_coff_reloc_mangle): SWITCH_TABLE case: Handle BFD_RELOC_8.
+
+Sat Nov 22 16:19:22 1997 Richard Henderson <rth@cygnus.com>
+
+ * tc-alpha.c (range_signed_16, range_signed_32): Work around an
+ apparent bug in gcc's long long support crossing from x86.
+
+Sat Nov 22 14:26:09 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c: Brought up to date with latest changes on arm
+ branch.
+
+Sat Nov 22 15:50:09 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * config-gas.com: Get version info from configure.in.
+
+ * makefile.vms: include depend.obj in OBJS.
+
+ * config/tc-alpha.c (s_alpha_section): Remove ".lcomm" handling.
+
+ * config/tc-alpha.c (alpha_basereg_clobbered): Remove variable and
+ all corresponding code.
+
+Thu Nov 20 15:06:08 1997 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/tc-arm.h (TARGET_FORMAT for generic a.out targets): Allow
+ run-time endian selection.
+
+Wed Nov 19 17:44:42 1997 Richard Henderson <rth@cygnus.com>
+
+ * tc-sh.c (parse_reg): Properly quote for fv4.
+
+Wed Nov 19 23:46:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): Add missing breaks in case on
+ symbol value operator.
+
+Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-d10v.c (parallel_ok, find_opcode):
+ Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
+
+Sun Nov 16 10:05:07 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Cast second arg of
+ md_apply_fix3 call to type "valueT *".
+
+Thu Nov 13 13:53:10 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (emulations): Make FreeBSD an aout / i386bsd
+ variant.
+ * configure: Re-generate.
+
+Thu Nov 13 11:07:14 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (macro_build): Use the membership field
+ for INSN_MACRO's.
+ (mips_ip): Same.
+
+Thu Nov 13 02:04:55 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-d10v.c (find_opcode): For OPCODE_FAKE, add check for
+ first argument if it's supposed to be a register.
+
+Tue Nov 11 19:25:05 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * app.c (do_scrub_chars): If d10v, re-insert a space before
+ a '#' when in state 10.
+
+Tue Nov 11 13:33:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-h8300.c: Include "subsegs.h".
+ (tc_reloc_mangle): Handle references to symbols which are not
+ being output, so that references to `.' work.
+
+Mon Nov 10 13:43:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Call add_fix when needed for '_'
+ case.
+
+ * macro.c (sub_actual): If we don't find a parameter for an &,
+ just substitute &.
+
+Fri Nov 7 21:29:32 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): In default case, call as_bad
+ instead of fprintf, to get "assembler messages:" message output
+ before instead of after.
+
+Fri Nov 7 10:36:22 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * frags.h: Handle multiple inclusion.
+
+Wed Nov 5 10:51:49 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ Based on a patch from Ian.Dall@dsto.defence.gov.au.
+ * as.h (struct frag, frag support): Moved from here.
+ * frags.h: To here.
+ (struct frag, member tc_frag_data): New member if TC_FRAG_TYPE
+ is defined.
+ (struct frag, member fr_cgen): Renamed from fr_targ.cgen.
+ * cgen.c (cgen_asm_finish_insn): Update.
+ * config/tc-m32r.c (md_estimate_size_before_relax): Update.
+ * config/tc-m32r.h (TC_FRAG_INIT): Renamed from md_init_frag.
+ (md_convert_frag): Ditto.
+ * config/tc-ns32k.h (TC_FRAG_TYPE): Define.
+ (frag_opcode_frag,frag_opcode_offset,frag_bsr): Update.
+ (TC_FRAG_INIT): Update.
+
+Tue Nov 4 16:35:57 1997 Ian Dall <Ian.Dall@dsto.defence.gov.au>
+
+ * write.c (print_fixup): Use TC_FIX_DATA_PRINT (if defined) to
+ print out MD fields of fix.
+ * frags.c (frag_var, frag_variant): Use TC_FRAG_INIT macro (if
+ defined) to initialize MD fields in frag.
+ * as.h (struct frag, ns32k support): Rename ns32k to fr_ns32k.
+ Delete pcrel_adjust. Add fr_opcode_fragP, fr_opcode_offset.
+ * config/tc-ns32k.h: Add comments. Remove obsolete
+ BFD_FAST_SECTION_FILL definition, change prototypes for
+ fix_new_ns32k and fix_new_ns32k_exp to add new arguments
+ opcode_frag and opcode_offset and remove pcrel_adjust.
+ (TC_FIX_TYPE): add opcode_fragP and opcode_offset fields.
+ (TC_FIX_DATA_PRINT): new macro to print out TC_FIX_TYPE.
+ (TC_FRAG_INIT): new macro to initialize machine dependent field in
+ frags.
+ (frag_opcode_frag, frag_opcode_offset, frag_bsr): macros to access
+ MD fields in frag structure.
+ (fix_im_disp, fix_bit_fixP, fix_opcode_frag, fix_opcode_offset,
+ fix_bsr): macros to access MD fields in fix structure.
+ * config/tc-ns32k.c: Avoid overlength lines. Align comments. Don't
+ use struct opcode_location as these fields are now in the frag
+ structure.
+ (convert_iif): Call frag_more as it is needed instead
+ of trying to allocate for the whole insn. Avoid call of frag_more
+ with negative argument.
+ (md_pcrel_adjust, md_fix_pcrel_adjust, md_apply_fix,
+ md_estimate_size_before_relax, md_pcrel_from,
+ tc_aout_fix_to_chars): use accessor macros to get md fields in fix
+ and frag structures.
+ (fix_new_ns32k, fix_new_ns32k_exp): add new arguments opcode_frag and
+ opcode_offset and remove pcrel_adjust.
+ (convert_iif, cons_fix_new_ns32k): call fix_new_ns32k,
+ fix_new_ns32k_exp with changed arguments.
+
+Mon Nov 3 13:30:17 1997 Gavin Koch <gavin@cygnus.com>
+
+ * tc-mips.c (md_begin): Reorganize setting of default values so
+ that mips_cpu depends on TARGET_CPU, and mips_opts.isa depends on
+ mips_cpu.
+ (md_parse_option): Remove all code that sets defaults; md_begin
+ handles all of this now.
+
+Sun Nov 2 14:46:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (STAGESTUFF): Change bin_PROGRAMS to
+ noinst_PROGRAMS.
+ (bootstrap, bootstrap2, bootstrap3): Likewise.
+ * Makefile.in: Rebuild.
+
+ * config/tc-ppc.c (ppc_fix_adjustable): Don't adjust relocs in the
+ TOC section to be against the csect.
+
+Fri Oct 31 18:19:55 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-mips.c (validate_mips_insn): New function, checks
+ match versus mask bits, and also verifies that all bits to be
+ output are actually specified somewhere.
+ (md_begin): Call it for 32-bit instructions, instead of doing
+ match/mask check here. In case of failure, print a message, but
+ check the rest of the opcode table before exiting.
+
+Thu Oct 30 13:46:20 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_apply_fix3): Fix thumb ADR pseudo op. Patch
+ from Tony Thompson at ARM: athompso@arm.com
+
+Thu Oct 30 11:11:26 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-d30v.c (build_insn): Allow odd registers for ld2w and
+ friends.
+
+Fri Oct 24 15:56:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (md_assemble): When handling @l, always sign
+ extend if the operand expects a signed value.
+
+ * config/tc-mips.h (LOCAL_LABELS_DOLLAR): Don't define; use
+ default which is to permit dollar labels.
+
+Fri Oct 24 11:19:22 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
+
+ * config/tc-sparc.c (sparc_memory_model): New variable.
+ (md_longopts): Add -TSO/-PSO/-RMO options.
+ (md_parse_options): Handle them.
+ (sparc_elf_final_processing): For 64 ELF, set required
+ memory ordering in e_flags. Default to RMO and let the user
+ override it through command line.
+
+ * config/tc-sparc.h (elf_tc_final_processing): Add.
+
+Wed Oct 22 17:42:12 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-sparc.c (v9a_asr_table): New variable.
+ (sparc_ip): Handle v9a asr's.
+ Patch from David Miller <davem@vger.rutgers.edu>.
+
+Wed Oct 22 17:22:59 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-sparc.h (md_do_align): New macro.
+ * config/tc-sparc.c (sparc_handle_align): Handle rs_align_code.
+ Patch from Jakub Jelinek <jj@sunsite.mff.cuni.cz>.
+
+Wed Oct 22 12:51:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (sh_small): New variable.
+ (OPTION_SMALL): Define.
+ (md_longopts): Add "small".
+ (md_parse_option): Handle OPTION_SMALL.
+ (md_show_usage): Mention -small.
+ * config/tc-sh.h (sh_small): Declare.
+ (SUB_SEGMENT_ALIGN): Handle sh_small.
+ * config/obj-coff.h (TARGET_FORMAT): Check sh_small in TC_SH
+ case.
+
+ * config/tc-mips.c (macro): Correct handling of constant in M_LI_D
+ case in little endian mode.
+
+Tue Oct 21 10:20:11 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * config/tc-sparc.c (md_apply_fix3, cases ..._H44, ..._HIX22): Leave
+ overflow signalling to linker.
+
+Mon Oct 20 14:54:06 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * makefile.vms: Fix for dec c.
+
+ * config-gas.com: Give explanation for dec c setup in error
+ message.
+
+ * config/tc-alpha.c (s_alpha_comm): Make .comm symbols separate
+ sections on openvms/alpha.
+
+ * config/obj-evax.c: support .weak pseudo-op
+
+Mon Oct 20 10:13:32 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * config/tc-sparc.c (default_arch_size): New static local.
+ (struct sparc_arch): Rename arch_size to default_arch_size.
+ New member user_option_p.
+ (sparc_arch_table): Always include v9, v9a. New entry v9-64.
+ (init_default_arch): Check whether default arch is valid.
+ Set default_arch_size in addition to sparc_arch_size.
+ (OPTION_32,OPTION_64): Define.
+ (md_longopts): New entries for -32, -64.
+ (md_parse_option): Handle them.
+ (md_show_usage): Print them. Ensure init_default_arch called.
+ * configure.in (sparc64): Set arch to v9-64.
+ * configure: Regenerated.
+
+Sun Oct 19 13:50:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (subsegs_finish): New function, broken out of
+ write_object_file.
+ (write_object_file): Some code moves into subsegs_finish.
+ * write.c (subsegs_finish): Declare.
+ * as.c (main): Call subsegs_finish.
+
+ * read.c (s_include): Check for error return from
+ demand_copy_string.
+
+Tue Oct 14 20:50:58 1997 Richard Henderson <rth@cygnus.com>
+
+ * read.c (get_line_sb): Accept any eol marker while scanning macros.
+
+Tue Oct 14 19:12:45 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.h (DIFF_EXPR_OK): Define.
+ * config/tc-i386.h (DIFF_EXPR_OK): Define.
+ * config/tc-alpha.c (md_apply_fix): Notice fx_pcrel and substitute
+ the correct relocation when it exists.
+ * config/tc-i386.c (md_apply_fix3): Likewise.
+
+ * config/tc-ppc.h: Correct typo in comment.
+ * config/tc-v850.h: Likewise.
+
+Fri Oct 10 16:09:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Allow parallel instruction issue
+ when second instruction is writing to first instructions inputs.
+
+Mon Oct 13 15:27:17 1997 Richard Henderson <rth@cygnus.com>
+
+ * ecoff.c (PAGE_SIZE): Double to 8k as a hack to allow some C++
+ templated programs to build with -g.
+
+Fri Oct 10 17:48:29 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_relax_table): Add support for relaxing
+ unconditional branches. This patch is courtesy of Jim Wilson.
+ (md_convert_frag): Fix relaxing of branches. This patch is
+ courtesy of Jim Wilson.
+ (md_assemble): Create different fixups for conditional and
+ unconditional branches. This patch is courtesy of Jim Wilson.
+ (md_estimate_size_before_relax): Estimate size of variable part of
+ fixup based on whether it is for a conditional or an unconditional
+ branch. This patch is courtesy of Jim Wilson.
+ (v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
+ v850_zbss, v850_rosdata, v850_rozdata, v850_bss): Add call to
+ obj_elf_section_change_hook().
+ (v850_comm): New function.
+ (md_pseudo_table): Add new pseudo ops .zcomm, .scomm and .tcomm.
+ (md_begin): Add bss flag to seg_info of bss sections.
+
+ Add support for .scommon, .tcommon and .zcommon sections.
+
+ * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add .scommon,
+ .zcommon, .tbss, .call_table_data and .call_table_text.
+
+Fri Oct 10 15:01:14 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (sparc): Set DEFAULT_ARCH from correct target.
+ * configure: Regenerated.
+
+Fri Oct 10 11:22:45 1997 Martin M. Hunt <hunt@cygnus.com>
+
+ * config/tc-d10v.c: Fixes to make sure the AT_WORD
+ expression is not confused with -1.
+
+Fri Oct 10 11:54:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Flag SP as modified for @-sp
+ operand - OPERAND_ATMINUS.
+
+Fri Oct 10 00:47:44 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Note that auto increment and
+ decrement modify the index register.
+
+Thu Oct 9 15:17:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Robin Kirkham <Robin.Kirkham@mlb.dmt.csiro.au>:
+ * config/tc-m68k.c (archs): Add 68306, 68307, 68322, 68356, 68334,
+ 68336, 68341, 68349.
+ * doc/c-m68k.texi (M68K-Opts): Add -m68ec000 -m68hc000 -m68hc001
+ -m68306, -m68307, -m68322, -m68356, -m68ec020, -m68ec030,
+ -m68ec040, -m68ec060, -m68330, -m68334, -m68336, -m68341,
+ -m68349.
+
+ * doc/Makefile.am (CPU_DOCS): Define.
+ (as.info): Depend upon $(CPU_DOCS).
+ * doc/Makefile.in: Rebuild.
+
+ * configure.in: Remove AM_PROG_INSTALL; it's called by
+ AM_INIT_AUTOMAKE.
+ * configure: Rebuild.
+
+Thu Oct 9 01:44:36 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * tc-d10v.h (TC_START_LABEL): Don't define.
+ (tc_frob_label): Define.
+
+Thu Oct 9 00:07:23 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-d10v.c (write_2_short): Fix bug that wouldn't allow
+ to pair a branch and link with anything but an exe instruction.
+
+Wed Oct 8 16:28:53 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (load_expression): Disable the sym+const .got
+ optimization to reduce the alignment surprises for gcc.
+
+Wed Oct 8 16:11:15 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/obj-coff.h (TC_SPARC): Don't define TARGET_FORMAT.
+ * config/tc-sparc.c (sparc_target_format): Handle coff here.
+ (sparc_ip): Add %hix,%lox.
+ (md_apply_fix3): Call as_bad_where, not as_bad.
+ Add support for BFD_RELOC_SPARC_{HIX22,LOX10}.
+ (tc_gen_reloc): Add support for BFD_RELOC_SPARC_{HIX22,LOX10}.
+
+Wed Oct 8 12:33:32 1997 Richard Henderson <rth@cygnus.com>
+
+ * configure.in: Change alpha-*-* to alpha*-*-*; config.guess now
+ recognizes alphaev5 etc.
+ * configure: Rebuild.
+
+Wed Oct 8 00:04:05 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (md_begin): Replace the TARGET_CPU value
+ of mipsr3900 with mipstx39.
+
+ * config/tc-mips.c (mips_ip): Don't print the 'opcode requires
+ -mipsXX message' if the insn isn't an ISA insn.
+
+Tue Oct 7 12:48:30 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.h (TARGET_FORMAT support): Moved to tc-sparc.c.
+ Redefine TARGET_FORMAT to call sparc_target_format.
+ * config/tc-sparc.c (in_unsigned_range): New function.
+ (sparc_arch_size): Make static.
+ (sparc_target_format): New function.
+ (sparc_ip): Delete variable immediate_max. Rewrite %hi/etc reloc
+ handling. Add support for %hh,%hm,%lm,%h44,%m44,%l44.
+ (output_insn): Set `fx_no_overflow'.
+ (md_apply_fix3): Handle BFD_RELOC_SPARC_{7,H44,M44,L44}.
+ (tc_gen_reloc): Likewise.
+
+Mon Oct 6 14:04:50 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_section): Remove.
+
+ * config/obj-elf.c (obj_elf_section): Enhance error message.
+
+Fri Oct 3 15:40:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c: Undef OBJ_COPY_SYMBOL_ATTRIBUTES before
+ including obj-elf.h in OBJ_MAYBE_ELF case.
+ (mips_target_format): Return NULL after abort to avoid warning.
+
+ * ecoff.c (generate_ecoff_stab): Remove unused static function.
+
+ * expr.c (operator): Accept ==. From Anders Blomdell
+ <anders.blomdell@control.lth.se>.
+
+ * config/atof-ieee.c (gen_to_words): When generating a denormal
+ number, handle an overflow into the smallest normalized number.
+
+Mon Sep 29 15:24:52 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * as.h, input-scrub.c (new_logical_line): New return value.
+ * read.c (s_app_file): Don't note the same file several times
+ in a row.
+
+Thu Sep 25 13:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Remove ` operand specifier.
+
+Wed Sep 24 16:54:40 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (sh*-*-rtems*): New target, like sh-*-elf*.
+ * configure: Rebuild.
+
+Wed Sep 24 11:30:25 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Handle q and v operand specifiers.
+
+ * doc/c-i386.texi (i386-Float): Remove incorrect assertion that
+ fn* instructions do not insert implicit fwait. This was changed
+ Jan 29, 1996.
+
+ * config/m68k-parse.y (yylex): Permit an expression to be used for
+ the scale factor.
+
+ * Makefile.am (EXTRA_as_new_SOURCES): Set to config/m68k-parse.y,
+ not m68k-parse.y.
+ * Makefile.in: Rebuild.
+
+ * aclocal.m4: Rebuild with new libtool.
+ * configure: Rebuild.
+
+Tue Sep 23 17:48:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): Clear mri_state at end of .mri
+ pseudo-op.
+
+ * config/tc-mips.c (hilo_interlocks): Change from a static
+ variable to a macro, so that it varies with the variables upon
+ which it depends.
+ (gpr_interlocks, cop_interlocks): Likewise.
+ (md_begin): Don't initialize them.
+
+Fri Sep 19 17:08:41 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Use strcasecomp instead
+ of strcmp where appropriate.
+
+Thu Sep 18 14:11:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Cope with a zero data area
+ relocation with a constant offset.
+ (md_assemble): Produce error message when special data area
+ relocations are used on instructions which do not support them.
+ (md_assemble): Reset processor mask if defined by command line
+ switch.
+
+Thu Sep 18 11:24:01 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c: Reorganize file.
+ (parse_keyword_arg): Allow numbers in reg names.
+ (SPECIAL_CASE_NONE): New macro.
+ (md_assemble): Use it.
+ (lookup_arch,init_default_arch): New functions.
+ (default_arch,default_init_p,sparc_arch_table): New static locals.
+ (sparc_arch_size): New static local.
+ (max_architecture): Initialize in init_default_arch.
+ (md_parse_options): Call init_default_arch if necessary.
+ Rewrite -xarch/-A processing.
+ (md_show_usage): Print -A values from sparc_arch_table.
+ (md_begin): Call init_default_arch if necessary.
+ (sparc_md_end): Handle both 32 and 64 bit environments.
+ * config/tc-sparc.h (TARGET_FORMAT): Likewise.
+ * acconfig.h (SPARC_V9,SPARC_ARCH64): Delete.
+ (DEFAULT_ARCH): Add.
+ * config.in: Regenerate.
+ * configure.in (sparc): Default DEFAULT_ARCH based on target cpu.
+ (SPARC_V9,SPARC_ARCH64): Delete.
+ * configure: Regenerate.
+ * config/vms-conf.h (SPARC_V9,SPARC_ARCH64): Delete.
+
+Wed Sep 17 16:54:20 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_reloc_prefix): Recoded to use CHECK_ ()
+ macro.
+ (handle_tdaoff, handle_zdaoff, handle_sdaoff): New functions.
+
+ * config/tc-v850.c (md_assemble): Corrected typo.
+ * config/tc-v850.c Add new sections: call_table_data and
+ call_table_text.
+ (v850_reloc_prefix): Add support for ctoff() relocation prefix.
+ (handle_ctoff): New Function.
+
+ * doc/c-v850.texi (V850 Opcodes): Document call table relocations.
+
+Tue Sep 16 14:18:22 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_reloc_prefix): Add support for a 16 bit
+ displacement from the tiny data area pointer.
+
+Mon Sep 15 21:28:09 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (fix_new_hppa): Make declaration match
+ definition.
+
+Mon Sep 15 18:33:06 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (processor_mask): New variable.
+ (set_machine, md_parse_option): Set processor_mask.
+ (md_assemble): Check that instruction is available to target
+ processor.
+
+ * config/tc-v850.h (TARGET_PROCESSOR): New constant.
+
+Mon Sep 15 11:28:04 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ Merge in work from Martin Hunt:
+
+ * config/tc-d30v.c (build_insn): For mvfsys and mvtsys,
+ CR is 0 for PSWL and PSWH.
+
+ * config/tc-d30v.c (do_assemble): Don't accept
+ illegal condition codes for cmpu instruction.
+
+ * config/tc-d30v.c: Add support for BFD_RELOC_D30V_9_PCREL
+ used in d*i instructions.
+
+ * config/tc-d30v.c (check_size): New function. Check
+ relocations for overflows.
+ (md_pcrel_from_section): Fix relocations between sections.
+ (md_apply_fix3): Use new relocation types for 15 and 21
+ bit relocations in the right container. Needed because
+ the address of the instruction is not eight-byte aligned
+ but the relocations must be.
+
+ * config/tc-d30v.c (md_apply_fix3): Check for overflow.
+ (find_format): If ".s" or ".l" are used, don't try
+ to compute branch sizes.
+
+ * config/tc-d30v.c (do_assemble): Check for ".s" or
+ ".l" extensions to opcode names.
+ (find_format): Generate the correct instructions when
+ ".s" or ".l" are used.
+
+ * config/tc-d30v.c (build_insn): Check for odd registers
+ on instructions that require even registers.
+
+ * config/tc-d30v.h (md_start_line_hook): Define.
+ * config/tc-d30v.c (md_start_line_hook): New hook.
+ Checks the beginning of each line for a ".". If it
+ finds one, assume a pseudo-op and flush any unwritten
+ instructions.
+
+ * config/tc-d30v.c (md_apply_fix3): Fix problem
+ with determining when fixups were done.
+
+ * config/tc-d30v.c (build_insn): Fix bug where the numeric
+ part of a symbol (for example, "foo+8") was being written
+ into the instruction.
+ (md_pseudo_table): Change .word to be 32 bits and add
+ .hword as 16 bits.
+
+ * config/tc-d30v.c (parallel_ok): Check to see if first
+ instruction is a jump.
+
+ * config/tc-d30v.c (parallel_ok): Major code reorganization.
+
+Wed Sep 10 10:07:08 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Corrected spelling mistake.
+ * configure.in (emulations): Add v850 emulation.
+
+Tue Sep 9 17:14:33 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.am (CPU_TYPES): Add arc.
+ (TARGET_CPU_CFILES): Add tc-arc.c.
+ (TARGET_CPU_HFILES): Add tc-arc.h.
+ (dependencies): Rebuild.
+ * Makefile.in: Rebuild.
+ * configure.in: Recognize arc-*-elf*.
+ * configure: Regenerated.
+ * config/tc-arc.[ch]: New files.
+
+Tue Sep 9 10:19:37 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi (V850 Opcodes): Document hi0() reloc prefix.
+ Correct description of hi() reloc prefix.
+
+ * doc/c-v850.texi (V850 Opcodes): Document new reloc prefix.
+ * config/tc-v850.c (v850_reloc_prefix): Add hilo() reloc prefix.
+ * config/tc-v850.c (md_assemble): Add support for BFD_RELOC_32.
+
+ * doc/c-v850.texi: Document new pseudo ops and command line
+ options.
+
+ * config/tc-v850.c (set_machine): New function.
+ * config/tc-v850.c (.v850): New pseudo op.
+ * config/tc-v850.c (.v850e): New pseudo op.
+ * config/tc-v850.c (.v850ea): New pseudo op.
+
+
+Mon Sep 8 23:08:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Support -alh and -ald for DWARF 1:
+ * listing.c (struct list_info_struct): Add debugging field.
+ (listing_newline): Initialize the debugging field. If ELF, if the
+ section starts with .debug or .line, set the debugging field in
+ the listing structure.
+ (debugging_pseudo): Add list parameter. Change all callers. If
+ the debugging field is set, consider it to be a debugging pseudo.
+ If ELF, skip blank lines between debugging lines.
+ * read.c (emit_expr): If ELF, look for line numbers.
+ (stringer): If ELF, look for file names.
+
+Mon Sep 8 12:33:40 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_insert_operand): Only test for overflow
+ if there is no insert function.
+
+ * config/tc-v850.h (TARGET_MACHINE): New constant.
+
+ * config/tc-v850.c (v850_insert_operand): Add
+ -mwarn_unsigned_overflow.
+ (md_begin): Set BFD machine number based on machine variable.
+ (md_parse_option): Add -mv850, -mv850e and -mv850ea options.
+
+Mon Sep 8 11:20:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.h: Don't declare alloca if it is a macro.
+ * macro.c: Likewise.
+
+Sun Sep 7 00:30:19 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (md_parse_option): Move m[] out to top level and
+ rename to cpu_types[].
+ (s_alpha_arch): New function.
+ (md_pseudo_table): Add "arch".
+
+ * config/tc-alpha.c (md_begin): Merge the two loops through the
+ opcode table.
+ (s_alpha_proc): Add initial SKIP_WHITESPACE.
+ (s_alpha_set): Likewise. Use get_symbol_end instead local while loop.
+
+Sat Sep 6 19:38:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * read.h (s_lcomm_bytes): Add prototype (for real this time).
+
+Thu Sep 4 12:10:01 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (elf_frob_symbol): Only set BSF_OBJECT for
+ symbols on Irix.
+
+Wed Sep 3 11:21:33 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Remove BFD_RELOC_V850_16_PCREL.
+
+Tue Sep 2 18:32:30 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_convert_frag): PC relative instructions arex
+ relative to the next instruction, not the current instruction.
+ (md_assemble): Similarly.
+
+Tue Sep 2 15:58:52 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi: Explanations of offsets in SDA/ZDA areas
+ correcetd.
+
+ * config/tc-v850.c: Add support for SDA/TDA/ZDA sections.
+ (v850_reloc_prefix): Duplicate code eliminated. Add code to
+ recognise special instructions.
+ (md_assemble): Calculation of the size of a fixups corrected.
+
+ * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add SDA/TDA/ZDA
+ sections.
+
+Tue Sep 2 15:40:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Use opcode->name instead of
+ opcode->opcode as the sentinal. Zero is a valid opcode.
+
+Tue Aug 26 16:51:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo (Machine Dependencies): Add v850 to menu.
+ * doc/c-v850.texi: Change node name to match other chapter nodes.
+
+Tue Aug 26 09:46:22 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi (V850 Opcodes): Correct name for tiny data area
+ pointer.
+
+Tue Aug 26 12:23:25 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (integer_constant): If BFD64, don't make a bignum if the
+ number will fit in 64 bits.
+
+ * config/tc-alpha.c (load_expression): Check explicitly for O_big,
+ rather than calling abort.
+
+ * as.h: Don't define alloca if __GNUC__. Just declare it.
+ * macro.c: Copy alloca handling from as.h.
+
+ * config/tc-i386.c (i386_align_code): Correct 16 bit noops. From
+ Gabriel Paubert <paubert@iram.es>.
+
+ * config/tc-i386.c (md_assemble): In JumpByte case, when looking
+ for a WORD_PREFIX_OPCODE, change it to ADDR_PREFIX_OPCODE if this
+ is jcxz or a loop instruction.
+
+Mon Aug 25 16:04:14 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (pre_defined_registers): Add 'hp' as alias for
+ r2.
+ (md_begin): Set up machine architecture and type.
+
+Mon Aug 25 14:25:48 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): Store the value back into the
+ symbol expression, to handle add or subtract simplification
+ correctly. Handle O_symbol_rva. Add default case.
+
+ * config/tc-ppc.c (ppc_change_csect): Temporarily lower the
+ chunksize while creating the new subsection.
+ * as.c (chunksize): Initialize to zero.
+ * subsegs.c (subseg_set_rest): Change 5000 to chunksize when
+ calling obstack_begin.
+
+Mon Aug 25 11:21:48 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Restore input_line_pointer upon
+ exit.
+
+ * config/tc-v850.c (parse_register_list): Support constant
+ expressions as register lists.
+
+Mon Aug 25 10:19:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi: Change the major node to v850 Machine
+ Dependencies.
+
+Fri Aug 22 11:16:14 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/as.texinfo: Add inclusion of c-v850.texi
+
+ * doc/c-v850.texi: New file.
+
+ * read.c (is_end_of_line): Make NUL character be considered to be
+ a line terminator.
+
+Fri Aug 22 10:45:33 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (parse_register_list): Add support for curly
+ brace syntax.
+ (cc_names): Add "e" and "ne" conditions.
+
+Thu Aug 21 11:00:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * app.c (do_scrub_chars): Support a double dash as starting a
+ comment that extends to end of line.
+
+Thu Aug 21 10:54:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_section, v850_bss, v850_offset): New
+ functions.
+ (md_pseudo_table): New pseudo ops: .bss, .offset, .section
+
+Thu Aug 21 00:59:53 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-m32r.c (md_estimate_size_before_relax): Update recorded
+ insn when changing to a different instruction.
+
+Wed Aug 20 00:45:20 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * tc-sh.c (parse_reg, get_specific, build_Mytes): Add SH4
+ floating point extensions.
+ (parse_reg): parse sgr and dbr.
+
+Tue Aug 19 17:07:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (system_register_name): Support numbers for
+ system register IDs.
+
+Tue Aug 19 08:59:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * read.c (s_lcomm_internal): Renamed from s_lcomm, added arg to
+ flag when alignment is in bytes instead of power of 2, and code to
+ use that flag to convert alignment to bytes.
+ (s_lcomm, s_lcomm_bytes): New helpers that call s_lcomm_internal.
+ * read.h (s_lcomm_bytes): Add prototype.
+ * config/obj-coff.c (write_object_file): If ALIGNMENT_IN_S_FLAGS is
+ defined, write alignment to alignment bits in section header s_flags
+ rather than the s_align field.
+ * config/obj-coff.h (ALIGNMENT_IN_S_FLAGS): Define for TC_TIC80.
+ * config/tc-tic80.c (md_pseudo_table): Use s_lcomm_bytes for bss
+ pseudo, instead of s_lcomm which wants a power of two for alignment.
+
+Mon Aug 18 20:42:23 1997 Richard Henderson <rth@cygnus.com>
+
+ * macro.c (check_macro): use alloca instead of xmalloc to plug leak.
+
+Mon Aug 18 20:33:06 1997 Richard Henderson <rth@cygnus.com>
+
+ * as.c (show_usage): Add -am.
+ * input-scrub.c (input_scrub_include_sb): Don't add leading \n
+ if we've already got one.
+ * listing.c (struct list_info_struct): Add line_contents.
+ (listing_newline): Put unused argument to work: if non-null, save it...
+ (listing_listing): ... and regurgitate during listing instead of line
+ from file.
+ * listing.h (LISTING_MACEXP): New define.
+ (LISTING_NEWLINE): Argument is NULL.
+ * read.c (read_a_source_file): If expanding macros, break up input
+ lines and pass them to listing_newline.
+ * doc/as.texinfo: Document -ac and -am.
+
+ * cond.c (s_ifc): Add missing demand_empty_rest_of_line.
+
+Mon Aug 18 11:26:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_apply_fix3): Add support for new 16 bit PC
+ relative reloc.
+
+Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Remove support_v850e flag and command line
+ option.
+
+ * configure.in (emulations): Add support for v850e target
+
+ * configure (emulations): Add support for v850e target
+
+Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Remove support_v850ea flag and command line
+ option.
+
+ * configure.in (emulations): Add support for v850ea target
+
+ * configure (emulations): Add support for v850ea target
+
+Fri Aug 15 14:00:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (check-DEJAGNU): Don't cd into testsuite until after
+ setting EXPECT and TCL_LIBRARY.
+ * Makefile.in: Rebuild.
+
+ * as.h (enum debug_info_type): Define.
+ (debug_type): Declare.
+ * as.c (debug_type): New global variable.
+ (show_usage): Add --gstabs.
+ (parse_args): Handle --gstabs.
+ * read.c (generate_asm_lineno): Remove.
+ (read_a_source_file): Output stabs debugging if appropriate.
+ Change checks of generate_asm_lineno to check debug_type. Only
+ generate ECOFF debugging if ECOFF_DEBUGGING is defined.
+ * read.h (generate_asm_lineno): Don't declare.
+ (stabs_generate_asm_lineno): Declare.
+ * stabs.c (stabs_generate_asm_lineno): New function.
+ * ecoff.c (add_file): Use debug_type, not generate_asm_lineno.
+ Don't turn off debugging.
+ (add_file): Remove old #if 0 code.
+ (ecoff_new_file): Set debug_type, not generate_asm_lineno.
+ (ecoff_directive_end): Don't generate stabs line symbols.
+ (ecoff_generate_asm_lineno): Don't check stabs_seen. Don't set
+ generate_asm_lineno.
+ (line_label_cnt): Remove.
+ (ecoff_generate_asm_line_stab): Remove.
+ * ecoff.h (ecoff_generate_asm_line_stab): Don't declare.
+ * doc/as.texinfo, doc/as.1: Document --gstabs.
+
+Wed Aug 13 18:58:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble, md_show_usage, md_parse_option):
+ Add support for v850ea instructions.
+
+ * config/tc-v850.c (md_assemble, md_show_usage, md_parse_option):
+ Add support for v850e instructions.
+
+ * config/tc-v850.c (md_assemble): Fix error recovery to reload
+ text of entire opcode.
+
+Tue Aug 12 10:27:34 1997 Richard Henderson <rth@cygnus.com>
+
+ * doc/internals.texi: Document rs_leb128.
+
+Tue Aug 12 12:17:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Give an error message for SIZE_BYTE
+ in ABSL case, rather than calling abort.
+
+Mon Aug 11 21:48:00 1997 Richard Henderson <rth@cygnus.com>
+
+ * as.h (enum _relax_state): Add rs_leb128.
+ * read.c (potable): Add sleb128 and uleb128.
+ (sizeof_*leb128, output_*leb128, emit_leb128_expr, s_leb128): New
+ functions.
+ * read.h: Update prototypes.
+ * symbols.c (resolve_symbol_value): Streamline quite a bit. Return
+ the symbol value, add a second FINALIZE argument that prevents
+ changes from being comitted. Update all callers.
+ * write.c (cvt_frag_to_fill, relax_segment): Handle rs_leb128.
+ * doc/as.texinfo: Document the new pseudos.
+
+Sun Aug 10 14:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (MOSTLYCLEANFILES): Add site.bak, site.exp, stage,
+ stage1, and stage2.
+ (DISTCLEANFILES): Define.
+ * doc/Makefile.am (DISTCLEANFILES): Define.
+ * Makefile.in, doc/Makefile.in: Rebuild.
+
+Wed Aug 6 00:30:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Define TARGET_BYTES_BIG_ENDIAN if endian is set.
+ Don't set targ or gas_target. Define SCO_ELF and
+ TARGET_SOLARIS_COMMENT when appropriate. Don't substitute for
+ target_frag.
+ * Makefile.am: Remove @target_frag@.
+ (INCLUDES): Remove $(INTERNAL_CFLAGS), $(CROSS), $(HDEFINES), and
+ $(TDEFINES).
+ (dep-am): Mark as phony.
+ * acconfig.h: Add TARGET_BYTES_BIG_ENDIAN, TARGET_SOLARIS_COMMENT,
+ and SCO_ELF.
+ * config/arm-big.mt, config/arm-lit.mt: Remove.
+ * config/mips-big.mt, config/mips-lit.mt: Remove.
+ * config/ppc-big.mt, config/ppc-lit.mt: Remove.
+ * config/ppc-sol.mt: Remove.
+ * config/i386coff.mt, config/m68kcoff.mt: Remove.
+ * config/m88kcoff.mt: Remove.
+ * config/sco5.mt: Remove.
+ * configure, config.in, Makefile.in: Rebuild.
+
+ * Makefile.am ($(srcdir)/config/m68k-parse.h): New target, to
+ further try to circumvent the .y.h rule.
+ * Makefile.in: Rebuild.
+
+Tue Aug 5 12:32:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
+ AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
+ * config.in: New file, created by autoheader.
+ * conf.in: Remove.
+ * acconfig.h: Mention PACKAGE, VERSION, and USING_CGEN.
+ * stamp-h.in: New file.
+ * as.c (print_version_id): Change GAS_VERSION to VERSION.
+ (parse_args): Likewise.
+ * config/obj-vms.c: (Write_VMS_MHD_Records): Likewise.
+ * doc/Makefile.am: New file, based on old doc/Makefile.in.
+ * Makefile.in, doc/Makefile.in: Now built with automake.
+ * aclocal.m4: Now built with aclocal.
+ * configure: Rebuild.
+
+ * cond.c (s_else): If not listing false conditionals, turn listing
+ off in the false branch of the else.
+
+Mon Aug 4 11:28:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro): Fix handling of a double load from a
+ symbol plus an offset.
+
+ * ecoff.c (ecoff_build_symbols): Set fMerge to 0 for an FDR which
+ has an associated external symbol.
+
+Sun Aug 3 23:23:59 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (s_alpha_ucons): New function.
+ (md_pseudo_table): Add unaligned data pseudos for DWARF.
+
+Thu Jul 31 15:13:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Ignore the rest of the current
+ line if we encounter an error.
+
+ * config/tc-v850.c (md_assemble): Sign extend constants value
+ for hi and hi0 expressions.
+ (v850_insert_operand): Enable range checking for generic 16bit
+ operands.
+
+Tue Jul 29 14:20:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Turn on fx_no_overflow for
+ LO16, HI16 and HI16_S relocs.
+
+Mon Jul 28 18:41:41 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
+ win32 dependencies.
+ * configure: Regenerated with autoconf 2.12.
+ * Makefile.in: Add $(EXEEXT) to all executables.
+
+Fri Jul 25 10:54:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * tc-hppa.c (md_apply_fix): Improve warnings for out of range
+ unconditional branches.
+ (hppa_fix_adjustable): Don't adjust anything with a RR% or LR%
+ field selector.
+
+Thu Jul 24 15:21:49 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * tc-sparc.c (md_begin): Cast sparc_opcodes to PTR for hash_insert.
+
+Thu Jul 24 17:51:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * macro.c (define_macro): Make sure the index is in range before
+ checking for '('.
+
+Thu Jul 24 12:13:19 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (build_insn): Remove "extended" and replace with
+ "fx" and "fxfrag". Add "ffrag". Change code to initialize and use
+ the right f/ffrag and fx/fxfrag pairs since instruction may be split
+ across frags.
+
+Tue Jul 22 18:38:56 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * config/te-go32.h (USE_ALIGN_PTWO): Define.
+ * config/tc-i386.c (md_pseudo_table): If USE_ALIGN_PTWO is
+ defined, use s_align_ptwo for .align.
+ * configure.in (i386-*-msdosdjgpp*): New target.
+ (i386-*-go32*): Set em to go32 and targ to coffgo32.
+ * configure: Rebuild.
+
+Tue Jul 22 12:41:40 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c (last_opcode): New static local.
+ (md_assemble): Don't issue "FP branch in delay slot" warning if
+ the delay slot has been annulled.
+
+Tue Jul 22 13:25:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (md_apply_fix_2): Check for PC relative reloc
+ code if BFD_ASSEMBLER.
+
+Mon Jul 21 08:57:17 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (system_registers): Fix ordering of registers.
+
+Tue Jul 15 16:29:54 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (build_insn): Initialize extended word to zero
+ when it will be filled in later by relocation information.
+
+Mon Jul 14 23:10:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro_build): Restore check of fmt argument.
+ (mips_ip): Fix ISA checks.
+
+Mon Jul 14 19:30:55 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (build_insn): Fix endianness problem with
+ O_big operands.
+
+Sun Jul 13 20:43:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (check_absolute_expr): Change warning to
+ error.
+
+Fri Jul 11 10:18:47 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mips.c (macro_build): Refine code to check if an
+ instruction is available on a particular cpu variant.
+ (mips_ip): Likewise.
+
+Mon Jul 7 22:53:08 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Change ifndef
+ OBJ_AOUT to ifdef OBJ_ELF.
+ (md_apply_fix3): When mangling 32 bit PC relative reloc for
+ BFD_ASSEMBLER, handle one ELF case for COFF as well, and add a PE
+ case.
+ * write.c (fixup_segment): Change special case for i386-coff to
+ not apply for i386-pe.
+ * config/obj-coff.c (coff_adjust_section_syms): Only count fixups
+ which were not done.
+ (coff_frob_file_after_relocs): Rename from coff_frob_file.
+ (coff_format_ops): Initialize frob_file_after_relocs field rather
+ than frob_file field.
+ * config/obj-coff.h (coff_frob_file): Don't declare.
+ (coff_frob_file_after_relocs): Declare.
+ (obj_frob_file): Don't define.
+ (obj_frob_file_after_relocs): Define.
+ * configure.in: Set bfd_gas to yes for i386-*-cygwin32.
+ * configure: Rebuild.
+
+Wed Jul 2 12:05:00 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Never subtract section
+ address from PC relative reloc which will be fully resolved.
+
+Tue Jul 1 15:23:07 1997 Jeffrey A Law (law@cygnus.com)
+
+ * ecoff.c (page_type): Renamed from page_t to avoid conflict
+ with hpux10 header files.
+
+Mon Jun 30 12:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Jason Merrill <jason@cygnus.com>:
+ * read.c (do_align): If BFD_ASSEMBLER, only use NOP_OPCODE if
+ SEC_CODE is set.
+ * config/tc-i386.h (md_maybe_text): Define.
+ (md_do_align): Use md_maybe_text.
+
+Fri Jun 27 19:15:27 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.h (tc_fix_adjustable): Only check for GOT type
+ relocations, don't check for symbol being external, weak, etc.
+
+Mon Jun 16 19:12:51 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * config/tc-ppc.h (tc_fix_adjustable): Don't let the assembler
+ calculate relocations to any external symbol, because we might be
+ linking a shared object and the symbol might be overriden or moved
+ (for instance, moved into a static executable's .bss section).
+ (GLOBAL_OFFSET_TABLE_NAME): Delete. This is an i386 wierdness.
+
+ * config/tc-ppc.h (tc_fix_adjustable): GOT-based relocations can't
+ be calculated by the assembler.
+
+ * config/tc-ppc.c (md_apply_fix3): Handle @plt or @local branch
+ whose destination lies in the same file, by ignoring the @plt or
+ @local and aiming the branch at its destination.
+
+Mon Jun 16 13:59:18 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * symbols.c (copy_symbol_attributes): Copy BSF_OBJECT flag.
+ * config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Copy size
+ expression.
+
+ * config/obj-multi.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Define instead
+ of obj_copy_symbol_attributes.
+
+Mon Jun 16 12:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_insert_operand): In 32 bit mode, with a
+ signed operand, sign extend a 32 bit value to the host size.
+
+ * Makefile.in (CFLAGS): Subsitute from configure script. From
+ Jeff Makey <jeff@cts.com>.
+
+ * config/tc-i386.c (i386_operand): Use alloca rather than a fixed
+ buffer size to make a copy of the symbol.
+
+ * Makefile.in (OBJS): Put @extra_objects@ on the same line as
+ macro.o.
+
+Thu Jun 12 12:16:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (write_object_file): In non BFD_ASSEMBLER code, as we
+ step through the frags calling cvt_frag_to_fill, switch to
+ SEG_DATA when we reach data_frag_root.
+
+Tue Jun 10 17:08:34 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Allow an empty register
+ list for instructions which use register lists.
+
+Tue Jun 10 11:18:09 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * config/tc-arm.c (md_apply_fix3): Make temp unsigned long.
+
+ * config/tc-arm.c (arm_adjust_symtab): Only set storage classes if
+ OBJ_COFF.
+
+ * config/tc-arm.c: Add prototypes for many static functions.
+ (struct asm_opcode ): Add prototypes for parms field.
+ (struct thumb_opcode ): Likewise.
+ (fp_op2): Remove unused flags parameter.
+ (output_inst): Make static.
+ (arm_after_pass_hook): Remove unused ignore parameter.
+ * config/tc-arm.h (arm_after_pass_hook): Declare.
+ (arm_start_line_hook): Declare.
+ (arm_frob_label): Declare.
+
+Mon Jun 9 12:55:45 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * depend.c (wrap_output): new prototype.
+
+Mon Jun 9 12:52:44 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (md_apply_fix): Check for overflow.
+
+ * config/tc-m68k.c (md_section_align): If a.out and BFD, force
+ section size to be aligned.
+
+Fri Jun 6 17:15:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.h (md_cons_align): Define.
+ (sh_cons_align): Declare.
+ * config/tc-sh.c (md_pseudo_table): Add .uaword and .ualong.
+ (sh_no_align_cons): New static variable.
+ (s_uacons): New static function.
+ (sh_cons_align): New function.
+ (sh_handle_align): Warn about misaligned data.
+ * doc/c-sh.texi: Document .uaword and .ualong.
+
+Thu Jun 5 15:38:17 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * macro.c (macro_expand): In MRI mode, treat single quote as a
+ separator character when checking for a positional argument.
+
+Tue Jun 3 16:15:13 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_parse_option): Merge in changes from
+ armT-970328-branch.
+
+ * config/tc-arm.h: Merge in changes from armT-970328-branch.
+
+ * configure.in (emulations): Add Thumb architecture support from
+ armT-9703-28-branch.
+
+Mon Jun 2 16:25:07 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/all.texi: Add enabling of ARM documentation.
+
+ * doc/as.texinfo: Add ARM documentation from armT-970328-branch.
+
+Mon Jun 2 11:55:12 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c: Added r3900 support.
+
+Thu May 29 12:58:26 1997 Ben Pfaff <pfaffben@pilot.msu.edu>
+
+ * as.c: (parse_args) `-t' option requires an argument.
+
+Wed May 28 15:45:07 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_begin): Change call to
+ coff_arm_bfd_set_private_flags() to a call to
+ bfd_set_private_flags().
+
+Wed May 28 16:17:34 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Rebuild dependencies.
+
+ * config/tc-i386.c (tc_gen_reloc): Don't try to convert the type
+ of a BFD_RELOC_RVA reloc.
+
+Wed May 28 10:48:14 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (tc_fix_adjustable): Reject absolute calls/jumps.
+ (hppa_force_relocation): Force a relocation for an absolute
+ call/jump.
+
+Mon May 26 13:24:25 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo: Don't use @value in section names or index
+ entries; it confuses texinfo.tex.
+
+Fri May 23 00:09:35 1997 Tom Tromey <tromey@cygnus.com>
+
+ * doc/as.texinfo: Updated for -MD option.
+ * Makefile.in (CFILES): Added depend.c.
+ (OBJS): Added depend.o.
+ * as.h (start_dependencies, register_dependency,
+ print_dependencies): New declarations.
+ * depend.c: New file.
+ * as.c (parse_args): Added -MD option.
+ (main): Call print_dependencies.
+ (show_usage): Added help for -MD.
+ * read.c (s_app_file): Call register_dependency.
+ (s_include): Call register_dependency when file is found.
+ (read_a_source_file): Call register_dependency.
+
+Wed May 21 17:39:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (symbol_to_chars): If TE_PE, don't add the
+ section address to the symbol value.
+
+Tue May 20 11:23:31 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (macro_build,mips_ip): Move the INSN_ISA field
+ into the new membership field.
+
+Thu May 15 10:00:53 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_begin): If no cpu type is specified on the
+ command line then the ARM7 is now chosen by default when setting
+ the BFD machine and architecture.
+
+Wed May 14 09:54:53 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (global variables): Added 'uses_apcs_26' flag to
+ hold APCS selection.
+ (md_begin): Added code to generate flags to be set into the COFF
+ header and the calls to the BFD functions to do this.
+ (md_parse_option, md_show_usage): Added new command line
+ options -mapcs-32, -mapcs-26, -marmv2, -marmv2a, -marmv3,
+ -marmv3m, -marmv4, -marmv4t.
+
+ * tc-arm.h (LOCAL_LABEL): Removed the definition of this macro
+ as it is never used.
+
+Tue May 13 22:26:14 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_convert_frag): Prefix temporary
+ label name with ".".
+ * config/tc-mn10300.c (md_convert_frag): Likewise.
+
+Tue May 13 14:44:39 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (set_at): Check for bignum.
+ (check_absolute_expr, macro, mips16_macro): Likewise.
+
+Tue May 13 10:45:56 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (md_apply_fix): Check PC relative relocations
+ for overflow/underflow, only insert lower 15 bits into instruction.
+
+Mon May 12 13:33:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * config/tc-i386.c (pi): Check for RegMMX.
+
+Thu May 8 11:10:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (expr): When subtracting values in the same frag,
+ subtract X_add_number rather than adding it.
+
+Wed May 7 15:39:48 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (write_object_file): Just pass NULL to
+ md_do_align, not the address of a char holding NOP_OPCODE.
+
+ * config/tc-mips.c (macro): Handle constants for M_LI_D and
+ M_LI_DD.
+ (mips_ip): For 'F', 'L', 'f', and 'l', generate a constant rather
+ than an address if the floating point value looks sufficiently
+ simple.
+
+Tue May 6 12:18:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (md_section_align): If a.out and BFD, force
+ section size to be aligned.
+
+Mon May 5 17:16:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cond.c: Include "macro.h".
+ (struct conditional_frame): Add macro_nest field.
+ (initialize_cframe): Initialize macro_nest.
+ (cond_finish_check): Add nest parameter. Change all callers.
+ (cond_exit_macro): New function.
+ * as.h (cond_finish_check): Update declaration.
+ (cond_exit_macro): Declare.
+ * input-scrub.c (macro_nest): Make globally visible.
+ (input_scrub_next_buffer): Call cond_finish_check.
+ * macro.h (macro_nest): Declare.
+ * read.c (s_mexit): Call cond_exit_macro.
+
+ * config/tc-i386.h (RegMMX): Define.
+ * config/tc-i386.c (pi): Check for all register types.
+ (type_names): Add RegMMX.
+ (md_assemble): Handle RegMMX.
+
+Wed Apr 30 12:47:00 1997 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * config/obj-coff.c (c_section_symbol): Clear the LOCAL bit #ifdef
+ TE_DELTA.
+
+Tue Apr 29 20:23:10 1997 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-mips.c (nopic_need_relax): Add new parameter
+ before_relaxing. Use it when testing ecoff_extern_size.
+ (load_address, macro, md_estimate_size_before_relax): Fix all
+ callers.
+
+Tue Apr 29 19:54:36 1997 Richard Henderson <rth@tamu.edu>
+
+ * config/obj-elf.c (elf_pseudo_table): Add "subsection".
+ (obj_elf_subsection): New static function.
+
+Tue Apr 29 19:52:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (coff_header_append): Don't reset string_size
+ each time through the loop.
+
+Fri Apr 25 14:17:46 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * Makefile.in (DISTSTUFF): Add itbl-parse.h.
+
+Fri Apr 25 12:03:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/internals.texi (Porting GAS): Correct documentation for
+ current configure handling of targ-cpu.h, et. al.
+ (CPU backend): Document listing macros.
+
+ * listing.c (data_buffer): Set size based on other listing macros,
+ rather than always using 100.
+ (data_buffer_size): Remove static variable.
+ (calc_hex): Make data_buffer_size a local variable. Don't leave
+ any slop when filling data_buffer.
+
+Mon Apr 21 15:33:19 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/c-mips.texi: Document .set autoextend.
+
+Sat Apr 19 23:09:25 1997 Niklas Hallqvist <niklas@petra.appli.se>
+
+ * configure.in (i386-*-openbsd*, m68k-*-openbsd*,
+ mips-dec-openbsd*, ppc-*-*bsd*, ns32k-pc532-openbsd*,
+ sparc-*-openbsd*): New targets.
+ * configure: Rebuild.
+
+Sat Apr 19 22:52:03 1997 Jim Wilson <wilson@cygnus.com>
+
+ * config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
+ for all undefined symbols.
+
+Fri Apr 18 13:37:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_fix_adjustable): Handle zero length csects
+ correctly.
+
+Fri Apr 18 11:51:35 1997 Niklas Hallqvist <niklas@appli.se>
+
+ * configure.in (alpha*-*-openbsd*): New target.
+ * configure: Rebuild.
+
+Thu Apr 17 13:59:47 1997 Per Fogelstrom <pefo@openbsd.org>
+
+ * configure.in (mips-*-openbsd*): New target.
+ * configure: Rebuild.
+
+Wed Apr 16 12:31:24 1997 Martin Hunt <hunt@cygnus.com>
+
+ * config/tc-d30v.c (parallel_ok): Fix parallel checking
+ for instructions using conditional execution.
+
+Tue Apr 15 18:11:44 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (insn_uses_reg): Correct test for fpr pairs.
+
+Tue Apr 15 13:04:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (srcroot): Remove.
+ (INSTALL): Set to @INSTALL@.
+ (INSTALL_XFORM, INSTALL_XFORM1): Remove.
+ (all, dvi): Don't set srcroot.
+ (install): Depend upon as.new, gasp.new, and installdirs. Use
+ $(program_transform_name) directly, rather than using
+ $(INSTALL_XFORM) and $(INSTALL_XFORM1).
+ (installdirs): New target.
+ * doc/Makefile.in (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-as): Run mkinstalldirs.
+ (install-info-gasp): Likewise.
+
+Mon Apr 14 11:59:08 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL): Change install.sh to install-sh.
+
+ * symbols.c (resolve_symbol_value): Check for division by zero.
+
+ From Thomas Graichen <graichen@rzpd.de>:
+ * Makefile.in: Always use $(SHELL) when running move-if-change.
+ * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
+ * configure: Rebuild.
+
+Thu Apr 10 14:40:00 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * cgen.c (cgen_parse_operand): Renamed from cgen_asm_parse_operand.
+ New argument `want'. Update enum cgen_parse_operand_result values.
+ Initialize if CGEN_PARSE_OPERAND_INIT.
+ * config/tc-m32r.c (md_begin): Set cgen_parse_operand_fn.
+ (md_assemble): Call cgen_asm_init_parse.
+ Update call to m32r_cgen_assemble_insn, call as_bad if assembly failed.
+
+Wed Apr 9 11:49:41 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Handle #j.
+
+Tue Apr 8 16:37:57 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_convert_frag): Create fixup at the
+ right address for call label:32,regs,imm.
+
+Mon Apr 7 14:58:22 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (pa_subspace_start): If OBJ_ELF, then always return
+ zero.
+ * config/tc-hppa.h (tc_frob_symbol): Don't reset the value of the
+ symbol for OBJ_ELF anymore.
+
+Mon Apr 7 10:54:59 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in: Regenerate dependencies.
+ (TARG_CPU): New variable.
+ (cgen.o): Depend on cgen.h, $(TARG_CPU)-opc.h.
+ (.dep1): Delete creating of cgen-opc.h.
+ (.tcdep): Put proper contents in cgen-opc.h.
+ * configure.in (m32r): Delete setting of extra_files, extra_links.
+ (AC_OUTPUT): Create cgen-opc.h.
+ * configure: Regenerated.
+
+Sat Apr 5 13:19:12 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * makefile.vms: Update to build gasp.exe.
+
+Fri Apr 4 16:10:02 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * write.c (relax_frag): Make non-static.
+ * write.h (relax_frag): Add prototype for.
+ * config/tc-m32r.h (md_do_align): New arg `max'.
+ * config/tc-m32r.c (m32r_do_align): Likewise.
+ Update calls to frag_align, frag_align_pattern.
+ (fill_insn): Update call to m32r_do_align.
+ (m32r_scomm): Update call to frag_align.
+
+ * config/tc-m32r.[ch]: New files.
+ * cgen.c: New file.
+ * Makefile.in (CPU_TYPES): Add m32r.
+ (TARGET_CPU_CFILES): Add tc-m32r.c.
+ (TARGET_CPU_HFILES): Add tc-m32r.h.
+ (DISTCLEAN_HERE): Add cgen-opc.h.
+ (.dep1,.tcdep): Create empty cgen-opc.h.
+ (cgen.o): Add dependencies.
+ (dependencies): Regenerate.
+ * as.h (struct frag): New member fr_targ.
+ (fr_pcrel_adjust,fr_bsr): Move into union fr_targ.ns32k.
+ * conf.in (USING_CGEN): New macro.
+ * configure.in (m32r-*-*): Add entry for.
+ Add cgen.o to extra_objects.
+ * configure: Regenerate.
+ * frags.c (frag_var): fr_pcrel_adjust renamed to
+ fr_targ.ns32k.pcrel_adjust. fr_bsr renamed to fr_targ.ns32k.bsr.
+ (frag_variant): Likewise.
+ * write.c (relax_frag): Likewise.
+ * config/tc-ns32k.c (*): Likewise.
+
+Fri Apr 4 13:26:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-hppa.h (TC_EOL_IN_INSN): Check explicitly for '!',
+ rather than for any end of line character.
+
+ * config/tc-hppa.c (tc_gen_reloc): If hppa_ren_reloc_type fails,
+ call abort (i.e., as_abort) rather than crashing.
+
+ * config/tc-mips.c: Protect uses of STO_MIPS16 with an ifdef of
+ OBJ_ELF, rather than of S_GET_OTHER.
+
+ * Makefile.in (DISTCLEAN_HERE): Add site.exp and site.bak.
+
+Thu Apr 3 13:16:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (VERSION): Set to 2.8.1.
+
+ * Branched binutils 2.8.
+
+Wed Apr 2 12:24:10 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * COPYING: Update FSF address.
+
+ * config/tc-mips.c (mips16_macro): Handle M_DMUL and M_MUL.
+
+Tue Apr 1 18:29:47 1997 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-mips.c (md_begin): Don't set interlocks for 4100.
+
+Tue Apr 1 16:24:28 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * config-gas.com: Update to handle both vax and alpha.
+ * makefile.vms: Update to use config-gas.
+ * conf-a-gas.com: Remove file.
+
+Tue Apr 1 16:08:21 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Remove unnecessary itbl-parse.h, ibtl-parse.c, and
+ itbl-lex.c dependencies. Remove rules for itbl-lex.o,
+ itbl-parse.o, and itbl-ops.o; just use the normal .c.o rule.
+
+Tue Apr 1 11:25:56 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-tic80.c (line_comment_char): Make '#' start comments
+ at the beginning of a line for compatibility with .S files where
+ cpp leaves the filename transitions beginning with '#'.
+
+Tue Apr 1 00:07:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c: Only compile tc_coff_symbol_emit_hook and
+ tc_coff_sizemachdep if OBJ_COFF.
+
+Mon Mar 31 23:53:44 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * config/tc-ppc.c (register_name): Declare.
+
+Mon Mar 31 16:31:04 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (hppa*-*-rtems*): New target, like hppa-*-*elf*.
+ * configure: Rebuild.
+
+Mon Mar 31 14:15:19 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_pseudo_table): Add "stabn".
+ (mips16_mark_labels): New static function.
+ (append_insn): Call mips16_mark_labels.
+ (mips_emit_delays): Likewise.
+ (s_insn): Likewise. Don't call mips_clear_insn_labels.
+ (s_mips_stab): New static function.
+
+ * configure.in: Use ELF for mips-*-gnu*.
+ * configure: Rebuild.
+
+Mon Mar 31 14:01:40 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * config/tc-m68k.h (TARGET_FORMAT): Set to "coff-m68k-sysv" if
+ TE_DELTA.
+
+Fri Mar 28 18:03:19 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * configure.in: Add AC_ARG_ENABLE for commonbfdlib. If it is set,
+ set OPCODES_LIB to empty.
+ * configure: Rebuild.
+
+Fri Mar 28 15:25:24 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * configure.in (sparc-*-linux*aout*, sparc-*-linux*): New
+ targets.
+ * configure: Rebuild.
+
+Fri Mar 28 13:08:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * itbl-parse.y (yyerror): Make static. Declare.
+
+ From Ralf Baechle <ralf@gnu.ai.mit.edu>:
+ * configure.in: Set emulations for mips-*-linux*-*.
+ * configure: Rebuild.
+
+ * config/tc-mips.c (struct mips_set_options): Define.
+ (mips_opts): New static variable.
+ (mips_isa): Remove. Now a field in mips_opts. Change all
+ references.
+ (mips16, mips16_autoextend, mips_warn_about_macros): Likewise.
+ (mips_noreorder, mips_nomove, mips_noat, mips_nobopt): Likewise.
+ (struct mips_option_stack): Define.
+ (mips_opts_stack): New static variable.
+ (s_mipsset): Add support for .set push and .set pop.
+ * doc/c-mips.texi: Document .set push and .set pop.
+
+ * config/obj-elf.c (obj_elf_section_change_hook): New function.
+ * config/obj-elf.h (obj_elf_section_change_hook): Declare it.
+ * config/tc-mips.c (s_change_sec): Call it if OBJ_ELF.
+
+Thu Mar 27 12:23:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.c (parse_args): Update copyright date in version message.
+
+ * Makefile.in (clean-here): Remove dependency files.
+
+ * read.c (s_comm): Check S_IS_COMMON as well as S_IS_DEFINED.
+ (s_mri_common): Check S_IS_COMMON unconditionally.
+ * symbols.c (colon): Check S_IS_COMMON as well as S_IS_DEFINED.
+ * config/tc-alpha.c (s_alpha_comm): Likewise.
+ * config/tc-mips.c (nopic_need_relax): Likewise.
+ * config/tc-ppc.c (ppc_elf_lcomm): Likewise.
+ (ppc_pe_comm): Likewise.
+ * config/obj-elf.c (obj_elf_common): Likewise. Set segment of
+ common symbol to bfd_com_section_ptr.
+ * config/tc-sparc.c (s_common): Likewise.
+ (tc_gen_reloc): Likewise.
+
+Thu Mar 27 00:29:46 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d30v.c (md_apply_fix3): Get the relocs right.
+
+Wed Mar 26 13:35:15 1997 H.J. Lu <hjl@lucon.org>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Only define if
+ BFD_ASSEMBLER.
+
+Wed Mar 26 11:32:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * input-scrub.c (input_scrub_next_buffer): Handle very long input
+ lines correctly.
+
+ * listing.c (print_lines): Add lineno parameter. Change all
+ callers.
+ (listing_listing): Only call calc_hex for the right line.
+ (listing_list): Set the new edict based on the current edict, in
+ order to handle listing commands in macros correctly.
+
+ * config/tc-mips.c (insn_uses_reg): Map register numbers in mips16
+ instructions.
+
+ * cond.c (cond_finish_check): New function.
+ * as.h (cond_finish_check): Declare.
+ * as.c (main): Call cond_finish_check.
+
+Tue Mar 25 14:45:54 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d30v.c (md_assemble): If two instructions
+ are supposed to be assembled in parallel and the first one is
+ long, print an error and stop.
+ (md_apply_fix3): Don't calculate absolute relocs. Just write
+ them out.
+
+Mon Mar 24 12:11:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.h (iclrKludge): Define.
+ * config/tc-i386.c (md_assemble): Handle iclrKludge.
+
+ * config/tc-alpha.h (tc_frob_file_before_adjust): Define if
+ OBJ_ECOFF.
+ (alpha_frob_file_before_adjust): Declare if OBJ_ECOFF.
+ * config/tc-alpha.c (alpha_debug): New static variable.
+ (md_parse_option): Set alpha_debug if -g is seen.
+ (alpha_frob_file_before_adjust): New function if OBJ_ECOFF.
+
+Sun Mar 23 18:03:31 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d30v.c (build_insn): Enable range-checking code.
+ (postfix): Stop at space or comma.
+ (md_assemble): Change error message.
+
+Sat Mar 22 13:44:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Added automatic dependency building.
+ * dep-in.sed: New file.
+
+Fri Mar 21 15:42:37 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-ieee.c (segment_name): Don't define function if this
+ is a macro.
+
+ * config/obj-coff.h (DO_STRIP): Don't define.
+ * config/tc-h8300.h (DO_STRIP): Don't define.
+ * config/tc-h8500.h (DO_STRIP): Don't define.
+ * config/tc-w65.h (DO_STRIP): Don't define.
+ * config/tc-z8k.h (DO_STRIP): Don't define.
+
+ * symbols.c (colon): Call obj_frob_label if it is defined.
+ * config/obj-vms.h (obj_frob_label): Rename from tc_frob_label.
+
+ * configure.in: Don't set files and links. Don't call
+ AC_LINK_FILES. Substitute te_file. Create targ-cpu.h,
+ obj-format.h, targ-env.h, and itbl-cpu.h in AC_OUTPUT.
+ * configure: Rebuild.
+ * Makefile.in (TARG_CPU_C): New variable.
+ (TARG_CPU_O, TARG_CPU_H): New variables.
+ (OBJ_FORMAT_C, OBJ_FORMAT_O, OBJ_FORMAT_H): New variables.
+ (TARG_ENV_H, ATOF_TARG_C, ATOF_TARG_O): New variables.
+ (SOURCES): Rename from REAL_SOURCES. Delete old definition.
+ (LINKED_SOURCES): Remove.
+ (HEADERS): Rename from REAL_HEADERS. Delete old definition.
+ (LINKED_HEADERS): Remove.
+ (OBJS): Use $(TARG_CPU_O), etc., rather than targ-cpu.o, etc.
+ ($(OBJS)): Depend upon $(TARG_ENV_H), etc., rather than
+ targ-cpu.h, etc.
+ ($(TARG_CPU_O), $(OBJ_FORMAT_O) $(ATOF_TARG_O)): New targets.
+ (targ-cpu.o, obj-format.o, atof-targ.o): Remove targets.
+ (itbl-cpu.h): Remove target.
+ (DISTCLEAN_HERE): Remove targ-cpu.c, obj-format.c, atof-targ.c,
+ atof-targ.h.
+
+Thu Mar 20 19:18:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo (Symbol Names): Don't use obsolete @ctrl macro.
+
+Thu Mar 20 16:49:14 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/tc-m68k.c (mri_chip): Replace calls to get_symbol_end by
+ open coded loop that does not require the name to start with a
+ name beginner.
+
+Thu Mar 20 13:42:01 1997 H.J. Lu <hjl@lucon.org>
+
+ * frags.c (frag_var): Change offset parameter to offsetT.
+ (frag_variant): Likewise.
+ * frags.h (frag_variant, frag_var): Update declarations.
+ * config/tc-m68k.c (struct m68k_it): Change foff field to
+ offsetT.
+ (add_frag): Change off parameter to offsetT.
+ * Several files: Add casts to calls to frag_var.
+
+ * Makefile.in (m68k-parse.c): Depend upon itbl-parse.c, to
+ serialize a parallel make.
+ (itbl-parse.h): Split target out from itbl-parse.c.
+
+Thu Mar 20 12:48:45 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * config/m68k-parse.y (motorola_operand): Allow (zdireg,EXPR).
+
+ * config/te-delta.h (COFF_COMMON_ADDEND): Define.
+ * config/obj-coff.c (fixup_segment): Check COFF_COMMON_ADDEND when
+ storing the value of a common symbol.
+
+Wed Mar 19 11:37:57 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * config/obj-coff.c (glue_symbols): Unused variable symbolP
+ removed.
+ (crawl_symbols): Do not modify symbol_rootP and symbol_lastP here;
+ that is done by symbol_remove and symbol_insert.
+
+ * config/obj-coff.h (S_IS_LOCAL): Return 0 for a debugging
+ symbol.
+
+Wed Mar 19 11:06:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (load_register): In 32 bit mode, when not
+ dealing with a 64 bit number, permit the upper 32 bits to be set
+ even if bit 31 is not set.
+
+Tue Mar 18 23:30:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (potable): Add "equiv".
+ (s_set): Handle .equiv based on argument.
+ * doc/as.texinfo (Equiv): New node to document .equiv.
+ (Err): New node to document .err.
+
+Tue Mar 18 15:50:13 1997 H.J. Lu <hjl@lucon.org>
+
+ * Many files: Add function prototypes.
+ * as.c (show_usage, parse_args): Make static.
+ * frags.h (frag_alloc): Declare.
+ * subsegs.c (subseg_set_rest): Don't declare frag_alloc.
+ * symbols.c (dollar_label_instance): Change return type to long.
+ * symbols.h (print_symbol_value): Declare.
+ (print_expr, print_expr_1, print_symbol_value_1): Declare.
+ * write.c (fix_new_exp): Don't declare make_expr_symbol.
+ (remove_subsegs, relax_frag): Make static.
+ * config/atof-vax.c (atof_vax_sizeof): Change letter to int.
+ (what_kind_of_float): Likewise.
+ (atof_vax): Make static. Change what_kind to int.
+ (md_atof): Change what_statement_type to int.
+ * config/obj-ecoff.h (obj_ecoff_set_ext): Declare.
+ * config/tc-alpha.c (vax_md_atof): Declare.
+ (md_atof): Don't declare atof_ieee and vax_md_atof.
+ * config/tc-i386.c (set_16bit_code_flag): Make static.
+ * config/tc-i386.h (tc_i386_fix_adjustable): Declare.
+ * config/tc-m68k.c (add_fix): Change width to int.
+ (insert_reg): Change regname to const.
+ (md_atof): Don't declare atof_ieee.
+ (demand_empty_rest_of_line): Don't declare.
+ * config/tc-m88k.c (md_atof): Don't declare atof_ieee.
+ * config/tc-sparc.c (cmp_reg_entry): Change args to const PTR.
+ (parse_keyword_arg): Change lookup_fn to take const arg.
+ (md_atof): Don't declare atof_ieee.
+ * config/tc-sparc.h: Add ifdef for multiple inclusion.
+ (tc_aout_pre_write_hook): Don't declare.
+
+Mon Mar 17 11:21:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.h (bfd_alloc_by_size_t): Don't declare.
+ * Many files: Use xmalloc rather than bfd_alloc_by_size_t.
+
+Sun Mar 16 13:49:21 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * symbols.c (symbol_new): Don't call debug_verify_symchain.
+ (symbol_append): Set sy_next and sy_previous when adding a single
+ symbol to an empty list. Call debug_verify_symchain.
+ (verify_symbol_chain): Use assert, not know.
+
+Sat Mar 15 20:27:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * NEWS: Note BeOS support.
+ * configure.in: (ppc-*-beos): New target, use coff as object format.
+ * configure: Regenerate with autoconf.
+
+Sat Mar 15 19:14:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_apply_fix): Improve error message for out
+ of range branch.
+
+ * Makefile.in: Add dependencies on obstack.h where needed.
+
+Fri Mar 14 15:33:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_estimate_size_before_relax): Handle the
+ case of a symbol equated to another symbol when using SVR4_PIC.
+
+ * Makefile.in (TARG_CPU_DEP_sparc): Add opcode/sparc.h.
+
+Thu Mar 13 11:20:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (read_a_source_file): Call LISTING_NEWLINE before
+ HANDLE_CONDITIONAL_ASSEMBLY when handling an MRI line label.
+
+ * config/obj-elf.c (obj_elf_data): Call md_flush_pending_output
+ and md_elf_section_change_hook if they are defined.
+ (obj_elf_text, obj_elf_previous): Likewise.
+
+Wed Mar 12 11:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-multi.h (struct elf_obj_sy): Define if
+ OBJ_MAYBE_ELF.
+ (OBJ_SYMFIELD_TYPE): Define as struct elf_obj_sy if
+ OBJ_MAYBE_ELF.
+ * config/obj-elf.h (struct elf_obj_sy): Don't define if
+ OBJ_SYMFIELD_TYPE is defined.
+
+ * doc/as.texinfo (bss): Improve description of .bss section. In
+ ELF or COFF, you are permitted to switch into the section.
+ (Comm): Rewrite description of common symbols.
+ (Lcomm): Mention that some targets permit a third argument.
+
+Tue Mar 11 01:13:31 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_lcomm): Don't call S_CLEAR_EXTERNAL.
+
+ * symbols.c (colon): Change type of local to int. From Alan Modra
+ <alan@spri.levels.unisa.edu.au>.
+
+ * config/tc-m88k.c (m88k_do_align): Don't use a special nop
+ alignment if a zero fill pattern was explicitly specified.
+ * config/tc-sh.c (sh_do_align): Likewise.
+
+ * read.c (equals): Always permit register names to be redefined.
+
+ * config/tc-mips.c (mips_fix_adjustable): Permit a reloc against a
+ mips16 symbol to be adjusted if a symbol is being subtracted from
+ it.
+
+ From Eric Youngdale <eric@andante.jic.com>:
+ * config/obj-elf.c (obj_elf_symver): Check for duplicate or
+ illegal symbol version names.
+ (elf_frob_symbol): Check for external default versions.
+
+Sun Mar 9 23:49:12 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Eric Youngdale <eric@andante.jic.com>:
+ * config/obj-elf.h (struct elf_obj_sy): Define.
+ (OBJ_SYMFIELD_TYPE): Define to elf_obj_sy struct. Change all
+ users.
+ * config/obj-elf.c (obj_elf_symver): Just record the name.
+ (obj_symbol_new_hook): Initialized versioned_name field.
+ (elf_frob_symbol): If there is a versioned_name, either rename the
+ symbol, or add an alias with that name.
+
+Thu Mar 6 13:55:32 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_relax_table): Define.
+ (md_convert_frag): Implement.
+ (md_assemble): Handle relaxable operands/instructions correctly.
+ (md_estimate_size_before_relax): Implement.
+ * config/tc-mn10300.h (TC_GENERIC_RELAX_TABLE): Define.
+
+ * config/tc-mn10200.c (md_relax_table): Fix typos.
+
+ * config/tc-mn10300.c (md_assemble): Don't use any MN10300 specific
+ relocs anymore. Tweak fx_offset for pc-relative relocs.
+
+Wed Mar 5 15:46:16 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * cond.c (s_ifc): Call mri_comment_field and mri_comment_end when
+ in MRI mode.
+
+Tue Mar 4 19:34:21 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (md_pseudo_table): Add "sect" and "section"
+ pseudo-ops.
+ * config/tc-tic80.c (md_begin): Declare external variable
+ coff_flags and insert an F_AR32WR bit into it.
+
+Tue Mar 4 10:01:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (equals): Add reassign parameter. Change all callers.
+ * read.h (equals): Update declaration.
+
+Sat Mar 1 01:04:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips16_extended_frag): Don't assume that we
+ can rely on the frag address to determine whether a frag is
+ earlier or later.
+
+Fri Feb 28 14:40:00 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.h (LOCAL_LABEL): Only define if not BFD_ASSEMBLER.
+ (S_LOCAL_NAME): Likewise.
+ (FAKE_LABEL_NAME): Define unconditionally.
+ * symbols.c (colon): Call bfd_is_local_label, not LOCAL_LABEL, if
+ BFD_ASSEMBLER.
+ (S_IS_LOCAL): Call bfd_is_local_label_name, not LOCAL_LABEL.
+ * config/tc-*.h: Only define LOCAL_LABEL if not BFD_ASSEMBLER.
+ Don't define FAKE_LABEL_NAME.
+ * config/te-ic960.h: Likewise.
+ * config/tc-mips.h (tc_frob_file_before_adjust): Define.
+ (mips_frob_file_before_adjust): Declare.
+ * config/tc-mips.c (mips_frob_file_before_adjust): New function.
+ (mips_local_label): Remove.
+
+ * config/te-sco386.h: Remove; not used.
+
+Thu Feb 27 15:39:16 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80 (md_pseudo_table): Add align pseudo op to do
+ byte alignment rather than power-of-two alignment that is the
+ GAS default.
+
+Thu Feb 27 13:29:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (md_assemble): Handle a reloc width of 'W'.
+
+ * gasp.c (hash_add_to_string_table): Correct misspelling in error
+ message, and add newline.
+ (process_file): Don't process assignments in the label if this is
+ a equ or assign pseudo-op.
+ (process_pseudo_op): Swap first argument to do_assign for K_ASSIGN
+ and K_EQU, to match documentation.
+
+Thu Feb 27 12:00:03 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/obj-coff.c (obj_coff_section): Add 'r' section attribute
+ to denote read-only data sections.
+
+Thu Feb 27 00:26:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (obj_elf_common): Set BSF_OBJECT in flags.
+ * config/tc-sparc.c (s_common): Likewise, if BFD_ASSEMBLER.
+
+ * expr.c (operand): Simplify 0b handling. Don't treat 0b as a
+ binary number if the next character is '+' or '-'.
+
+Wed Feb 26 20:47:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (FLT_CHARS): Change from "dD" to "fF".
+ (find_opcode): Match operands that can be floats.
+ (build_insn): Handle O_big (float) expressions and build
+ correct opcode.
+
+Wed Feb 26 18:19:00 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.in (mips*-*-lnews*): New target, also make empty
+ emulation list for this target.
+ * configure: Update.
+ * tc-mips.c (ECOFF_LITTLE_FORMAT): Define.
+ (mips_target_format): Use.
+ * te-lnews.h: New file.
+
+Wed Feb 26 15:33:46 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (find_opcode, build_insn): Changes to match
+ operands with :m or :s modifiers and generate the right opcodes
+ for them.
+
+Wed Feb 26 11:56:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (itbl-parse.c itbl-parse.h): Use $(BISON) and
+ $(BISONFLAGS), not $(YACC) and $(YACCFLAGS).
+
+Tue Feb 25 22:02:23 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * config/tc-m68k.c (instring): Useless local declaration of
+ crack_operand removed.
+ * expr.h (expressionS): Changed type of X_op field to operatorT if
+ __GNUC__.
+
+Tue Feb 25 13:17:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Based on patches from Robert Lipe <robertl@dgii.com>:
+ * configure.in: Add i386coff and i386elf to emulation list.
+ * configure: Rebuild.
+ * as.c (i386coff, i386elf): Declare.
+ * obj.h (coff_format_ops): Declare.
+ * config/obj-coff.c (OBJ_HEADER): Define.
+ (coff_obj_symbol_new_hook): Rename from obj_symbol_new_hook.
+ (coff_obj_read_begin_hook): Rename from obj_read_begin_hook.
+ (obj_pseudo_table): Add "version".
+ (coff_pop_insert): New static function.
+ (coff_sec_sym_ok_for_reloc): New static function.
+ (no_func): New static function.
+ (coff_format_ops): New variable.
+ * config/obj-coff.h (coff_obj_symbol_new_hook): Declare.
+ (obj_symbol_new_hook): Define.
+ (coff_obj_read_begin_hook): Declare.
+ (obj_read_begin_hook): Define.
+ * config/tc-i386.h (i386_target_format): Declare.
+ * config/tc-i386.c: Check OBJ_MAYBE_ELF as well as OBJ_ELF; check
+ OUTPUT_FLAVOR when appropriate.
+ (i386_target_format): New function.
+ * Makefile.in (obj-coff.o): New target.
+ (e-i386coff.o, e-i386elf.o): New targets.
+
+ From Stephen Williams <steve@icarus.icarus.com>:
+ * config/tc-i960.h (TC_SYMFIELD_TYPE): Define if OBJ_COFF.
+ (_tc_get_bal_of_call): Don't declare.
+ (tc_get_bal_of_call): Declare as function, don't define as macro.
+ * config/tc-i960.c (tc_set_bal_of_call): If OBJ_COFF, store balP
+ in sy_tc field, not x_balntry field.
+ (tc_get_bal_of_call): Rename from _tc_get_bal_of_call. Change
+ return type to symbolS *. If OBJ_COFF, retrieve value from sy_tc
+ field, not x_balntry field.
+
+ * config/obj-elf.c (obj_elf_section): Permit a .note section to
+ have the SHF_ALLOC attribute.
+
+ * Makefile.in ($(OBJS)): Don't depend upon $(IT_HDRS).
+ (TARG_CPU_DEP_mips): Depend upon $(srcdir)/itbl-ops.h.
+ (itbl-lex.o): Depend upon itbl-parse.h.
+
+ * itbl-parse.y (yyerror): Change return type to int. Change to
+ use old style function declaration.
+
+ * Makefile.in (itbl-lex.o): Remove -Wall.
+ (itbl-parse.o): Likewise.
+
+ * cond.c (s_ifdef): If we should omit conditionals from listings,
+ call listing_list.
+ (s_if, s_ifc, s_endif, s_else, s_ifeqs): Likewise.
+ * listing.c (list_info_struct): Add EDICT_NOLIST_NEXT.
+ (listing_listing): Handle EDICT_NOLIST_NEXT.
+ (listing_list): An argument of 2 means EDICT_NOLIST_NEXT.
+ * listing.h (LISTING_NOCOND): Define.
+ (LISTING_SKIP_COND): Define.
+ * as.c (show_usage): Mention c as a suboption of -a.
+ (parse_args): Handle c as a suboption of -a.
+ * doc/as.texinfo: Document -alc.
+
+Mon Feb 24 23:34:14 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c (md_apply_fix): Handle R_ABS type fixups.
+
+Mon Feb 24 18:27:43 1997 Eric Youngdale <eric@andante.jic.com>
+
+ * doc/as.texinfo: Document .symver.
+
+Mon Feb 24 15:19:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Change pre_defined_registers to
+ d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
+
+Mon Feb 24 10:40:45 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/obj-coff.c: Fix typo in comment section.
+ * config/tc-tic80.c (md_pseudo_table): Add entry for bss, which takes
+ an additional alignment argument.
+ (find_opcode): Allow O_symbol relocs for any 32 bit field, not just
+ base relative ones.
+ (build_insn): Handle O_symbol relocs for any 32 bit field, not just
+ base relative ones.
+
+Mon Feb 24 02:23:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * Makefile.in: Remove dependancies on itbl-cpu.h.
+ * as.c: Define stubs for itbl_parse and itbl_init if HAVE_ITBL_CPU
+ is not defined.
+
+Mon Feb 24 02:03:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * itbl-ops.h: Include as.h.
+
+Mon Feb 24 01:04:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * as.c: Remove -t option.
+ * configure, configure.in: Move itbl-cpu.h to mips specific configure.
+ * itbl-ops.h: Include itbl-cpu.h only if HAVE_ITBL_CPU is defined.
+ * config/tc-mips.h: Define HAVE_ITBL_CPU.
+
+Sun Feb 23 18:01:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * itbl-ops.c: Don't define DEBUG.
+
+Sun Feb 23 17:49:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * Makefile.in: Update itbl-test.c to reflect its new location.
+
+Sun Feb 23 15:50:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * itbl-ops.c: Add test for itbl_have_entries.
+ * config/tc-mips.c: Remove test for itbl_have_entries.
+ * config/tc-mips.h: Define tc_init_after_args to mips_init_after_args.
+
+Sun Feb 23 18:13:19 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (DISTSTUFF): Remove itbl-parse.y, itbl-lex.l, and
+ itbl-ops.c. Add itbl-parse.c and itbl-lex.c.
+ (LEX, LEXFLAGS): Define.
+ * itbl-ops.c (append_insns_as_macros): Remove bogus ASSERT.
+
+Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
+
+ * itbl-parse.y: Fix indentation mistakes from indent program.
+ * itbl-lex.l: Fix indentation mistakes from indent program.
+ * itbl-ops.h: Add include for ansidecl.h.
+ Add PARAMS around function arguments.
+ Add declaration for itbl_have_entries.
+ * itbl-ops.c: Add PARAMS around function arguments.
+ * Makefile.in: Add itbl build rules.
+ Add dependancies for itbl files to mips target.
+ * as.c: Add itbl support.
+ Add new option "--insttbl" for dynamically extending instruction set.
+ * as.h: Declare insttbl_file_name;
+ the name of file defining extensions to the basic instruction set
+ * configure.in, configure: Add itbl-parse.o, itbl-lex.o, and
+ itbl-ops.o to extra_objects for mips configuration.
+ Add include file link from itbl-cpu.h to
+ config/itbl-${target_cpu_type}.h.
+ * config/tc-mips.c: Allow copz instructions.
+ Add notes for future additions to the itbl support.
+ Add debug macros.
+ (macro): Call itbl_assemble to assemble itbl instructions.
+ See if an unknown register is specified in an itbl entry.
+
+Sat Feb 22 20:53:01 1997 Fred Fish <fnf@cygnus.com>
+ * doc/internals.texi (CPU backend): Fix typo in md_section_align
+ description.
+ * config/tc-tic80.h (NEED_FX_R_TYPE): Define.
+ * config/tc-tic80.c (find_opcode): Add code to support O_symbol
+ operands.
+ (build_insn): Grab a frag early so we can use the address in
+ fixups. Take one's complement of BITNUM values before insertion
+ in opcode. Add code to support O_symbol operands.
+ (md_apply_fix): Replace unimplemented warning with implementation.
+ (md_pcrel_from): Ditto.
+ (tc_coff_fix2rtype): Ditto.
+
+Fri Feb 21 14:34:31 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d30v.c (parallel_ok): New function.
+ * config/tc-d30v.h: Define TARGET_BYTES_BIG_ENDIAN.
+ * config/tc-d10v.c (md_pcrel_from_section): Return 0 if
+ relocation is in different section.
+
+Fri Feb 21 10:08:25 1997 Jim Wilson <wilson@cygnus.com>
+
+ * tc-mips.c (mips_ip): If configured for an embedded ELF system,
+ don't set the section alignment to 2**4.
+
+Fri Feb 21 11:55:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (line_comment_chars): Add '*'.
+
+ * app.c (LEX_IS_TWOCHAR_COMMENT_2ND): Don't define.
+ (do_scrub_begin): Don't set lex['*'].
+ (do_scrub_chars): When handling LEX_IS_TWOCHAR_COMMENT_1ST, don't
+ check for LEX_IS_TWOCHAR_COMMENT_2ND. Instead, just check for
+ a literal '*'.
+
+ * configure.in: Set em=svr4 for m68k-*-sysv4*.
+ * configure: Rebuild.
+ * config/te-svr4.h: New file.
+ * config/tc-m68k.c (m68k_comment_chars): Only include `#' if
+ TE_SVR4 or TE_DELTA.
+
+Thu Feb 20 22:24:39 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_convert_frag): Create a fixup for the
+ short conditional branch around a long unconditional branch.
+
+Thu Feb 20 13:56:00 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (obj_coff_ln [both versions]): Call
+ new_logical_line.
+
+ * config/tc-arm.c (fix_new_arm): Use make_expr_symbol to handle a
+ complex expression.
+
+ * symbols.c (resolve_symbol_value): If both left and right
+ operands are undefined, warn about both of them.
+
+Wed Feb 19 00:53:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Based on patches from Eric Youngdale <eric@andante.jic.com>:
+ * config/obj-elf.c (elf_pseudo_table): Add "symver".
+ (obj_elf_symver): New static function.
+ * config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Copy the st_other
+ field.
+
+ * write.c (relax_segment): Make type and printf format agree.
+
+ * read.c (get_line_sb): Don't end the line on a semicolon inside a
+ string.
+
+Tue Feb 18 18:42:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d30v.c, config/tc-d30v.h: New files.
+
+ * configure: Rebuilt.
+
+ * configure.in: Add case for d30v.
+
+Sun Feb 16 17:47:29 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-alpha.h (md_operand): Define with a null expansion,
+ like all the other targets.
+ * doc/internals.texi (CPU backend): Add missing word in
+ md_flush_pending_output description. Fix typo in md_convert_frag
+ description.
+ * config/tc-tic80: Minor comment additions/changes.
+
+Fri Feb 14 18:09:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * config/tc-m68k.c (LOCAL_LABEL): Macro redefined if TE_DELTA.
+ (tc_canonicalize_symbol_name): Macro defined if TE_DELTA.
+ * config/obj-coff.c (obj_coff_def): Use
+ tc_canonicalize_symbol_name if defined.
+ (obj_coff_tag, obj_coff_val): Likewise.
+ * expr.c (operand): Reject '~' as operator if is_name_beginner.
+
+Fri Feb 14 17:24:48 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Based on notes from Peter Eriksson <peter@ifm.liu.se>. The target
+ does not actually work, though:
+ * configure.in (i386-sequent-bsd*): New target.
+ * configure: Rebuild.
+ * config/tc-dynix.h: New file.
+ * config/tc-i386.h: Define TARGET_FORMAT if TE_DYNIX.
+
+ * read.c (do_align): Add max parameter. Change all callers.
+ Remove useless static variables.
+ (s_align): New static function. Do common portion of
+ s_align_bytes and s_align_ptwo.
+ (s_align_bytes, s_align_ptwo): Just call s_align.
+ * frags.c (frag_align): Add max parameter. Change all callers.
+ (frag_align_pattern): Likewise.
+ * frags.h (frag_align, frag_align_pattern): Update declarations.
+ * write.c (relax_segment): Limit alignment change to fr_subtype.
+ Fix some types to be addressT.
+ * config/obj-coff.c (size_section): Likewise.
+ * config/obj-ieee.c (size_section): Likewise.
+ * config/tc-d10v.h (md_do_align): Add max parameter.
+ * config/tc-i386.h (md_do_align): Likewise.
+ * config/tc-m88k.h (md_do_align): Likewise.
+ * config/tc-m88k.c (m88k_do_align): Likewise.
+ * config/tc-sh.h (md_do_align): Likewise.
+ * config/tc-sh.c (sh_do_align): Likewise.
+ * as.h: Improve comments on rs_align and rs_align_code.
+ * doc/as.texinfo: Document new alignment arguments.
+ * doc/internals.texi (Frags): Document use of fr_subtype field for
+ rs_align and rs_align_code.
+
+Fri Feb 14 15:56:06 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c: Changed opcode parsing.
+
+Thu Feb 13 20:02:16 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/{tc-alpha.h, tc-d10v.h, tc-generic.h, tc-i960.h,
+ tc-mn10200.h, tc-mn10300.h, tc-sh.h, tc-vax.h, tc-w65.h}:
+ Add default definition of zero for TARGET_BYTES_BIG_ENDIAN.
+ * config/{tc-arm.h, tc-hppa.h, tc-i386.h, tc-mips.h, tc-ns32k.h,
+ tc-ppc.h, tc-sparc.h}: Move definition of TARGET_BYTES_BIG_ENDIAN
+ to a location consistent with the rest of the target include files.
+ * config/tc-i386.c: Remove misleading comment.
+ * doc/internals.texi (CPU backend): Add description of function
+ md_undefined_symbol.
+ * config/tc-tic80.c: Add code to insert predefined symbols into the
+ symbol table so they can be parsed by the standard expression parser.
+ Remove custom code that use to parse them.
+ * config/tc-tic80.h: Move definition of TARGET_BYTES_BIG_ENDIAN
+ to a location consistent with the rest of the target include files.
+
+Thu Feb 13 21:44:18 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * as.h: GNU c provides unlink() function.
+
+ Unify section handling on openVMS/Alpha:
+ * config/tc-alpha.c(s_alpha_link): Remove.
+ (s_alpha_section): New function.
+ Remove case-hacking of symbols
+ Add .code_address pseudo-op.
+ (BFD_RELOC_ALPHA_CODEADDR): New relocation.
+ (s_alpha_code_address): New function.
+ (alpha_ctors_section, alpha_dtors_section): New sections for C++
+ static constructors/destructors.
+ Add debug code for crash debugs, to be removed when traceback code
+ is added to object code.
+ (s_alpha_name): New function for .name pseudo-op.
+ (alpha_print_token): New function to print token expressions with
+ alpha specific extensions.
+
+ * makefile.vms: Allow compilation with current gcc snapshot.
+
+Thu Feb 13 16:29:04 1997 Fred Fish <fnf@cygnus.com>
+
+ * doc/Makefile.in (TEXI2DVI): Set to just name of program.
+ (DVIPS): Set to dvips.
+ (ps, as.ps, gasp.ps): New targets.
+ (internals.info, gasp.dvi, internals.dvi): Set both TEXINPUTS
+ and MAKEINFO env variables.
+ (internals.ps): Use DVIPS macro.
+ (clean): Remove core and backup files.
+ (distclean): Remove temporary files from building internals.
+ (clean-dvi): Ditto.
+ * doc/internals.texi (Frags): Fix typo.
+ (GAS processing): Ditto.
+ (CPU backend): Ditto.
+ * ecoff.c (init_file): Use TARGET_BYTES_BIG_ENDIAN value directly.
+ * mpw-config.in: Define TARGET_BYTES_BIG_ENDIAN as 1.
+ * read.c: Remove ugly hack that dealt with config files not
+ correctly defining TARGET_BYTES_BIG_ENDIAN.
+ (target_big_endian): Use TARGET_BYTES_BIG_ENDIAN directly.
+ * config/arm-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1.
+ * config/arm-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0.
+ * config/mips-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1.
+ * config/mips-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0.
+ * config/ppc-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 1.
+ * config/ppc-sol.mt: Replace TARGET_BYTES_LITTLE_ENDIAN
+ with TARGET_BYTES_BIG_ENDIAN defined to 0.
+ * config/tc-arm.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN
+ and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just
+ whether it is defined or not.
+ * config/tc-mips.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN.
+ * config/tc-ppc.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN
+ and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just
+ whether it is defined or not.
+ * config/tic80.h (TARGET_FORMAT): Define to coff-tic80.
+ (TARGET_BYTES_BIG_ENDIAN): Define to 0.
+
+Thu Feb 13 14:40:16 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * write.c (write_relocs): Correct text in as_fatal error message,
+ bfd_perform_relocation -> bfd_install_relocation.
+
+Thu Feb 13 14:48:03 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * config/tc-m68k.c (LEX_TILDE): Define if TE_DELTA.
+ * read.c (LEX_TILDE): Define if not defined.
+ (lex_type): Use LEX_TILDE.
+ * expr.c (get_symbol_end): Check first char with is_name_beginner,
+ not is_part_of_name.
+
+Thu Feb 13 11:40:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (md_show_usage): Add missing backslash at end
+ of continued line.
+
+ * config/tc-mips.c (mips16_extended_frag): Correct base address
+ for an extended PC relative instruction.
+ (md_convert_frag): Likewise.
+
+ * config/tc-mips.c (prev_nop_frag): New static variable.
+ (prev_nop_frag_holds): New static variable.
+ (prev_nop_frag_required): New static variable.
+ (prev_nop_frag_since): New static variable.
+ (append_insn): If we aren't reordering, and prev_nop_frag is not
+ NULL, and we don't need any nops, then decrease the size of
+ prev_nop_frag. Don't insert nops because of instructions in
+ noreorder sections. Remember whether the previous instructions
+ where in noreorder sections even when not reordering.
+ (mips_no_prev_insn): Add preserver parameter. Change all
+ callers. Refer prev_nop_frag variables when appropriate.
+ (mips_emit_delays): Set up prev_nop_frag.
+ (s_mipsset): Clear prev_nop_frag if reordering.
+
+Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (append_insn): Remove useless code which
+ handled swapping a mips16 jump with a mips16 instruction with a
+ reloc.
+
+ * config/tc-mips.c (md_parse_option): When debugging, set
+ mips_optimize to 1, not 0.
+
+ * config/tc-mips.c (mips16_ip): Handle an extend operand.
+
+ * config/tc-mips.c (my_getExpression): In mips16 mode, if it looks
+ like the expression was based on `.', adjust the value of the
+ symbol.
+
+ * config/tc-mips.c (append_insn): Warn about an attempt to put an
+ extended instruction in a delay slot when not reordering.
+ (md_convert_frag): Warn if an extended instruction appears in a
+ delay slot.
+
+ * config/tc-mips.c (mips_pseudo_table): Add "insn".
+ (s_insn): New static function.
+ * doc/c-mips.texi: Document .insn.
+
+ * config/tc-mips.c (md_begin): Add the general registers to the
+ symbol table.
+ (mips16_ip): First parse the expression, and then see whether it
+ came up with a register, rather than trying to first see whether
+ we are looking at a register.
+
+Tue Feb 11 15:13:39 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-tic80.c: Numerous changes and additions to flesh
+ out functions that were previously just stubs, and fix some
+ problems found using the new TIc80 testsuite cases.
+
+Tue Feb 11 15:52:22 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips16_ip): Handle %gprel modifier.
+ (md_apply_fix): Handle BFD_RELOC_MIPS16_GPREL.
+
+ * config/tc-mips.c (append_insn): Output jump instruction as a
+ pair of 2 byte instructions, rather than as a single 4 byte
+ instruction.
+
+Mon Feb 10 22:06:00 1997 Dawn Perchik (dawn@cygnus.com)
+
+ * itbl-ops.c, itbl-lex.l, itbl-parse.y, itbl-ops.h,
+ config/itbl-mips.h: Add copyright message and fix indentation.
+
+Mon Feb 10 18:09:00 1997 Dawn Perchik (dawn@cygnus.com)
+
+ * itbl-ops.c: New file. Add support for dynamically read
+ instruction registers, opcodes and formats. Build internal table
+ for new instructions and provide callbacks for assembler and
+ disassembler.
+ * itbl-lex.l, itbl-parse.y: Lex and yacc parsers for instruction
+ spec table.
+ * itbl-ops.h: New file. Header file for itbl support.
+ * config/itbl-mips.h: New file. Mips specific definitions for
+ itbl support.
+
+Fri Feb 7 09:52:34 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_assemble): If a constant operand won't
+ fit into the constant field of a relaxable operand, then it does
+ not match.
+
+Thu Feb 6 20:08:12 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_estimate_size_before_relax): Treat
+ a jsr target in a different section just like a jsr to
+ an undefined target.
+
+Thu Feb 6 16:52:57 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_fix_adjustable): Don't adjust relocations
+ against any mips16 symbols, not just externally visible ones.
+ (md_apply_fix): Corresponding change.
+
+Wed Feb 5 11:11:06 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips16_ip): Accept floating point registers in
+ the operand of the exit instruction.
+
+Tue Feb 4 14:12:39 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): If we leave an equated symbol
+ as O_symbol, copy over the segment.
+
+Mon Feb 3 12:35:54 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_apply_fix): If we aren't adjusting this
+ fixup to be against the section symbol, adjust the value
+ accordingly.
+
+ * symbols.c (resolve_symbol_value): Don't change X_add_number for
+ an equated symbol.
+ * write.c (write_relocs): Avoid looping on equated symbols.
+ Adjust fx_offset by X_add_number for each symbol.
+ * config/obj-coff.c (do_relocs_for): Avoid looping on equated
+ symbols.
+ (fixup_segment): Add a loop to track down equated symbols and
+ adjust fx_offset appropriately.
+
+Fri Jan 31 15:21:02 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_relax_table): Add entries to allow
+ jmp -> bra relaxing.
+ (md_convert_frag): Handle jmp->bra relaxing.
+ (md_assemble): Handle jmp->bra relaxing.
+ (md_estimate_size_before_relax): Likewise.
+
+Fri Jan 31 13:15:05 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.c (i386_align_code): Add comments explaining the
+ nop instructions.
+
+Fri Jan 31 10:46:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (enforce_aligned_data): New static variable.
+ (sparc_cons_align): Don't do anything unless enforce_aligned_data
+ is set.
+ (md_longopts): Add "enforce-aligned-data".
+ (md_show_usage): Mention --enforce-aligned-data.
+ * doc/c-sparc.texi (Sparc-Aligned-Data): New node; document
+ enforce-aligned-data.
+
+ * config/tc-ppc.c (md_pseudo_table): If OBJ_XCOFF, add "long",
+ "word", and "short".
+ (ppc_xcoff_cons): New static function.
+
+ * write.c (relax_segment): Give an error if a .space symbol is
+ common or undefined.
+
+ * read.c (read_a_source_file): Don't handle mri_pending_align if
+ the handler is s_globl or s_ignore.
+
+Thu Jan 30 11:46:59 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/tc-d10v.c (find_opcode): Remove unused variable "numops".
+ * config/tc-tic80.c: Many additions to previous placeholder file.
+ * config/tc-tic80.h: Ditto.
+
+Thu Jan 30 12:28:18 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.c (i386_align_code): Improve the nop patterns.
+
+Thu Jan 30 12:08:40 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_fix_adjustable): New function.
+ * config/tc-mips.h (tc_fix_adjustable): Call mips_fix_adjustable.
+ (mips_fix_adjustable): Declare.
+
+ Ideas from Srinivas Addagarla <srinivas@cdotd.ernet.in>:
+ * read.c (read_a_source_file): After doing an mri_pending_align,
+ adjust the line_label if there is one.
+ (s_space): Set mri_pending_align if an odd number of bytes were
+ output.
+
+Wed Jan 29 15:31:12 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.h (md_do_align): Add this hook to call
+ d10v_cleanup() when a ".align" is detected.
+
+ * config/tc-d10v.c (find_opcode): Correctly calculate
+ branch displacement when .aligns are present.
+
+Wed Jan 29 09:42:11 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_relax_table): Define.
+ (md_convert_frag): Implement.
+ (md_assemble): Handle relaxable operands/instructions correctly.
+ (md_estimate_size_before_relax): Implement.
+ * config/tc-mn10200.h (TC_GENERIC_RELAX_TABLE): Define.
+
+Tue Jan 28 15:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (append_insn): Give an error for jumps to a
+ misaligned address.
+ (md_apply_fix): Make a branch to an odd address an error rather
+ than a warning.
+
+ * config/tc-mips.c (md_convert_frag): If the user explicitly
+ requested an extended opcode, pass warn as true to mips16_immed.
+
+ * config/tc-mips.c (mips16_ip): Handle a missing expression like
+ an explicit 0, so that explicitly extended instructions work
+ correctly.
+
+Mon Jan 27 17:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_build_symbols): Don't generate a local ECOFF
+ symbol for a common symbol.
+
+Wed Jan 22 10:39:39 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ Patch presumed to have been checked in awhile ago but wasn't.
+ Mon Nov 25 10:45:14 1996 Doug Evans <dje@seba.cygnus.com>
+ * write.c: Delete "ifndef md_relax_frag" around is_dnrange.
+ (relax_segment, case rs_org): Move code inside braces. Move locals
+ target,after inside too.
+ (relax_segment, case rs_machine_dependent): Guts moved to ...
+ (relax_frag): New function.
+ Call md_prepare_relax_scan if defined.
+
+Mon Jan 20 10:56:47 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/tc-m68k.c (m68k_ip): Reject pc-relative addresses for the
+ 'p' operand specifier.
+
+Mon Jan 20 10:39:36 1997 J.T. Conklin <jtc@cygnus.com>
+
+ * config/tc-m68k.c (HAVE_LONG_BRANCH): New macro, returns true for
+ m68k family cpus which support long branch addressing modes.
+ (m68k_ip, md_convert_frag_1, md_estimate_size_before_relax,
+ md_create_long_jump): Use it.
+
+Mon Jan 20 12:42:06 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_begin): Don't set SEC_ALLOC or SEC_LOAD for
+ the .reginfo or .MIPS.options section if configured for an
+ embedded target.
+
+ * config/tc-mips.c (md_begin): Don't set interlocks for
+ mips_4650.
+
+Wed Jan 15 13:51:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (read_a_source_file): Make sure the symbol ends with
+ whitespace before checking whether the next character is '='.
+
+Tue Jan 14 15:07:27 1997 Robert Lipe <robertl@dgii.com>
+
+ * config/tc-i386.c (sco_id): Moved from here...
+ * config/obj-elf.c (sco_id): ...to here. Adding the identifier
+ really is an SCO ELF specific thing, not just a SCO x86 specific
+ thing.
+
+Mon Jan 13 22:43:01 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (tic80-*-*): Don't require 'coff'.
+ * configure: Regenerate.
+
+Thu Jan 9 09:08:43 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (emit_expr): Check for overflow of a negative value
+ correctly.
+ * write.c (fixup_segment): Likewise.
+ * config/obj-coff.c (fixup_segment): Likewise.
+
+ * config/tc-m68k.c (struct label_line): Define.
+ (labels, current_label): New static variables.
+ (md_assemble): Mark current_label as text, and clear it.
+ (m68k_frob_label): New function.
+ (m68k_flush_pending_output): New function.
+ (m68k_frob_symbol): New function.
+ * config/tc-m68k.h (tc_frob_label): Define.
+ (md_flush_pending_output): Define.
+ (tc_frob_symbol): Don't warn, just call m68k_frob_symbol.
+ (tc_frob_coff_symbol): Likewise.
+
+ * read.c (read_a_source_file): When defining a macro in MRI mode,
+ don't add the symbol to the symbol table.
+
+Tue Jan 7 11:21:42 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (tc_gen_reloc): Handle sym1-sym2 fixups
+ here since fixup_segment doesn't (linkrelax is set).
+ * config/tc-mn10200.c (tc_gen_reloc): Likewise.
+
+Mon Jan 6 15:19:32 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_assemble): Tweak fx_offset for pc-relative
+ relocs.
+
+Fri Jan 3 16:47:08 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (struct hppa_fix_struct): Tweak fx_r_field's type
+ to avoid warnings with the native HP compiler.
+ (fix_new_hppa): Similarly for the r_type argument.
+ (pa_build_unwind_subspace, hppa_elf_mark_end_of_function): Enclose
+ in an #if OBJ_ELF to keep gcc -Wall quiet.
+ (md_apply_fix): Always initialize "result".
+
+ * config/tc-mn10200.c (md_assemble): Generate relocations.
+
+Fri Jan 3 18:17:23 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/tc-m68k.c (s_even): Adjust the alignment of the current
+ section.
+
+Fri Jan 3 17:10:33 1997 Richard Henderson <rth@tamu.edu>
+
+ * config/obj-elf.c (elf_file_symbol): When using ECOFF debugging,
+ pass on the new file hook.
+
+ * config/tc-alpha.c (alpha_fix_adjustable): Not quite the same as
+ !alpha_force_relocation, as local LITERALs can be adjusted to be
+ relative to the section.
+
+Fri Jan 3 12:09:24 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (yank_symbols): If tc_frob_coff_symbol is
+ defined, call it.
+ * config/tc-m68k.h (tc_frob_symbol): Check whether text label is
+ aligned to odd boundary.
+ (tc_frob_coff_symbol): Define.
+
+ * doc/as.texinfo (Set): Change parenthesized @xref to @pxref.
+
+ * macro.c (macro_expand_body): In MRI mode, just copy a single &.
+
+ * config/tc-m68k.c (m68k_ip): Call frag_grow before adding a
+ PCINDEX frag. From Ronald F. Guilmette <rfg@monkeys.com>.
+
+ * config/tc-m68k.c (m68k_ip): Accept 'B' as a size for an
+ immediate value.
+ (md_assemble): If the size is 'B', set fx_signed.
+ (md_apply_fix_2): Use fx_signed when checking for overflow.
+
+ * write.h (struct fix): Add fx_signed field.
+ * write.c (fix_new_internal): Initialize fx_no_overflow and
+ fx_signed fields.
+ (fixup_segment): Use fx_signed when checking for overflow.
+ * config/obj-coff.c (fixup_segment): Check fx_no_overflow and
+ fx_signed when checking for overflow.
+
+Thu Jan 2 13:37:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * NOTES, NOTES.config: Removed. These are rarely, if ever,
+ updated, and all the useful information is in doc/internals.texi.
+
+ Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
+ * read.c (read_a_source_file): Check for conditional operators
+ before doing an MRI pending alignment.
+ * config/tc-m68k.h (m68k_conditional_pseudoop): Declare.
+ (tc_conditional_pseudop): Define.
+ * config/tc-m68k.c (m68k_conditional_pseudop): New function.
+ * doc/internals.texi (CPU backend): Describe
+ tc_conditional_pseudoop.
+
+ Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
+ * config/tc-m68k.c (m68k_rel32_from_cmdline): New static
+ variable.
+ (md_begin): Check m68k_rel32_from_cmdline before setting
+ m68k_rel32.
+ (m68k_mri_mode_change): Likewise.
+ (md_longopts): Add --disp-size-default-16 and
+ --disp-size-default-32.
+ (md_parse_option): Handle new options.
+ (md_show_usage): Mention new options.
+ * doc/c-m68k.texi (M68K-Opts): Document new options.
+
+ Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
+ * config/tc-m68k.c (m68k_index_width_default): New static
+ variable.
+ (m68k_ip): Use m68k_index_width_default to set the size of a base
+ register whose size was not given.
+ (md_longopts): Add --base-size-default-16 and
+ --base-size-default-32.
+ (md_parse_option): Handle new options.
+ (md_show_usage): Mention new options.
+ * doc/c-m68k.texi (M68K-Opts): Document new options.
+
+ * doc/c-mips.texi: Mention ISA level 4, and the -mips16 option.
+
+ * configure.in: Recognize mips-*-linux* target.
+ * configure: Rebuild.
+
+ * config/tc-mips.c (load_register): Rewrite 64 bit handling to
+ work if valueT is only 32 bits.
+
+ * config/tc-mips.c: Throughout, check target_big_endian rather
+ than byte_order.
+ (byte_order): Remove.
+ (mips_init_after_args): Remove.
+ * config/tc-mips.h (LITTLE_ENDIAN, BIG_ENDIAN): Don't define.
+ (mips_init_after_args): Don't declare.
+ (tc_init_after_args): Don't define.
+
+ * config/tc-mips.h (tc_frob_after_relocs): Define if
+ OBJ_MAYBE_ELF.
+ (mips_elf_final_processing): Likewise.
+ (ELF_TC_SPECIAL_SECTIONS): Likewise.
+
+Tue Dec 31 15:12:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-v850.c (md_assemble): If this is sst.{h,w} or
+ sld.{h,w} and the operand is relocatable, adjust the adend by
+ shifting it right one bit.
+
+Tue Dec 31 12:56:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (read_a_source_file): Check mri_pending_align after
+ checking for a macro. From Ronald F. Guilmette
+ <rfg@monkeys.com>.
+
+ * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
+
+ * config/tc-sparc.c (md_apply_fix3): Rename from md_apply_fix, and
+ add segment argument. If OBJ_ELF, treat a relocation against a
+ symbol in a linkonce section like a relocation against an external
+ symbol.
+ * config/tc-sparc.h (MD_APPLY_FIX3): Define.
+
+Mon Dec 30 11:35:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips16_macro): Add case for M_ABS.
+
+Fri Dec 27 22:51:51 1996 Fred Fish <fnf@cygnus.com>
+
+ * NOTES.config (Implementation): as.h #define's "GAS" not "gas",
+ includes config.h instead of host.h, tc.h instead of tp.h, and
+ targ-env.h instead of target-environment.h.
+ Also, obj-format.h includes targ-cpu.h instead of
+ target-processor.h.
+ * configure.in (case ${generic_target}): Add tic80-*-coff entry.
+ * configure: Rebuild with autoconf.
+ * config/obj-coff.h (coff/tic80.h): Include if TC_TIC80 defined.
+ (TARGET_FORMAT): Define to "coff-tic80".
+ * config/tc-tic80.c: New file for TIc80 support.
+ * config/tc-tic80.h: New file for TIc80 support.
+
+Fri Dec 27 11:42:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo (M): Mention explicitly that -M changes macro
+ handling.
+
+Thu Dec 19 12:06:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (adjust_reloc_syms): If the fixup symbol has been
+ equated to an undefined symbol, convert the fixup to being against
+ the target symbol. Remove obsolete code handling a special case
+ for i386 PIC.
+
+Wed Dec 18 22:54:39 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-make.sed: Use NewFolderRecursive for installation.
+
+Wed Dec 18 16:00:42 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (do_assemble): Correct previous bug fix.
+
+Wed Dec 18 15:27:40 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (md_assemble): Fix bug which caused
+ second instruction in a line to be case sensitize.
+
+Wed Dec 18 10:08:46 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (mn10200_insert_operand): Don't
+ range check operands with MN10200_OPERAND_NOCHECK set.
+ (check_operand): Likewise.
+
+Tue Dec 17 10:59:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c: Undo part of last Friday's alignment changes.
+ (md_begin): Always align the text section to a four byte
+ boundary.
+ (append_insn): Remove call to record_align.
+
+ * config/tc-mips.c (insn_label): Remove.
+ (struct insn_label_list): Define.
+ (insn_labels, free_insn_labels): New static variables.
+ (mips_clear_insn_labels): New static function.
+ (append_insn): Mark all mips16 text labels, and make them odd.
+ Handle all labels after emitting a nop, not just one. Call
+ mips_clear_insn_labels rather than just clearing insn_label.
+ (mips_emit_delays): Add insns parameter, and use it to decide
+ whether to mark mips16 labels. Handle all labels, not just one.
+ Force mips16 labels to be odd. Change all callers.
+ (mips16_immed): Don't check for an odd branch target.
+ (md_apply_fix): Don't check mips16 mode for a branch reloc.
+ (mips16_extended_frag): Ignore the low bit in a branch target.
+ (md_convert_frag): Likewise.
+ (mips_no_prev_insn): Call mips_clear_insn_labels rather than just
+ clearing insn_label.
+ (mips_align, mips_flush_pending_output, s_cons): Likewise.
+ (s_float_cons, s_gpword): Likewise.
+ (s_align): Use insn_labels rather than insn_label.
+ (s_cons, s_float_cons, s_gpword): Likewise.
+ (mips_frob_file_after_relocs): New function.
+ (mips_define_label): Rewrite to add to insn_labels list.
+ * config/tc-mips.h (tc_frob_file_after_relocs): Define.
+ * ecoff.c (ecoff_build_symbols): If the size of a function comes
+ out odd, increment it.
+
+ * config/tc-mips.c (append_insn): Only update prev_insn when not
+ reordering if place is NULL.
+
+ * config/tc-mips.c (mips16_ip): Check for a missing expression
+ when using the register indirect addressing mode.
+
+Mon Dec 16 10:08:46 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (mn10200_insert_operand): Don't
+ check 24bit operands for overflow.
+ (check_operand): Likewise.
+
+Mon Dec 16 11:50:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo (Section): Document how to use the .section
+ pseudo-op for COFF and ELF.
+
+Sun Dec 15 15:26:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (adjust_reloc_syms): Fix linkonce check for ELF.
+
+Sat Dec 14 22:37:27 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (prev_insn_reloc_type): New static variable.
+ (RELAX_MIPS16_ENCODE): Add dslot and jal_dslot arguments, and
+ store them. Adjust other RELAX_MIPS16 macros.
+ (RELAX_MIPS16_DSLOT): Define.
+ (RELAX_MIPS16_JAL_DSLOT): Define.
+ (append_insn): Pass new arguments to RELAX_MIPS16_ENCODE. Correct
+ handling of whether previous instruction has a fixup. Set
+ prev_insn_reloc_type.
+ (mips_no_prev_insn): Clear prev_insn_reloc_type.
+ (mips16_extended_frag): Use the right base address for a PC
+ relative add or load.
+ (md_convert_frag): Likewise. If a PC relative add or load is
+ used, record the alignment for the section.
+
+Fri Dec 13 13:00:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (adjust_reloc_syms): Don't reduce a reloc against a
+ linkonce section into a reloc against the section symbol.
+
+ * config/tc-mips.c (mips16_macro): Remove nop instructions after
+ branch instructions.
+
+ * config/tc-mips.c (md_begin): If configured for an embedded ELF
+ system, don't set the section alignment to 2**4.
+ (s_change_sec): Likewise.
+ (append_insn): Call record_alignment for the section.
+ (md_section_align): Don't align the section size for an embedded
+ ELF system.
+
+Thu Dec 12 16:40:47 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (adjust_reloc_syms): Make sure that symbols are
+ resolved; expression symbols may have been skipped.
+ * config/obj-coff.c (fixup_segment): Likewise.
+
+Thu Dec 12 15:18:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Move @plt to
+ BFD_RELOC_24_PLT_PCREL relocation.
+ (md_apply_fix3): Support BFD_RELOC_24_PLT_PCREL.
+
+Tue Dec 10 13:51:55 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (write_2_short): Remove code that called
+ parallel_ok() when the programmer specified parallel instructions.
+
+Tue Dec 10 12:23:19 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Update to handle endianness
+ issues correctly.
+
+ * config/tc-mn10200.c (md_assemble): Opcode 0x0 is valid!
+ * config/tc-mn10300.c (md_assemble): Likewise.
+
+Tue Dec 10 11:37:14 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (append_insn): Make sure there is enough room
+ in a frag after a mips16 instruction to switch it with a jump
+ instruction.
+
+ * config/tc-mips.c (mips16_extended_frag): Give an error for an
+ attempt to use a non absolute symbol in an extending frag.
+
+Mon Dec 9 16:48:20 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c: Flesh out assembler support for MN10200.
+ * config/tc-mn10200.h: Likewise.
+
+Mon Dec 9 17:09:42 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): At the end of a C comment, pass space to
+ UNGET rather than PUT. Set old_state before setting state to -2.
+
+ * config/tc-mips.c (mips16_extended_frag): Avoid an infinite loop
+ when extending because the value is exactly maxtiny + 1.
+
+ * config/tc-mips.c (RELAX_MIPS16_ENCODE): Add small and ext
+ arguments, and store them. Adjust other RELAX_MIPS16 macros.
+ (RELAX_MIPS16_USER_SMALL): Define.
+ (RELAX_MIPS16_USER_EXT): Define.
+ (mips16_small, mips16_ext): New static variables.
+ (append_insn): Pass mips16_small and mips16_ext to
+ RELAX_MIPS16_ENCODE.
+ (mips16_ip): Set mips16_small and mips16_ext.
+ (mips16_immed): Don't check mips16_autoextend.
+ (mips16_extended_frag): Check USER_SMALL and USER_EXT.
+
+ * write.c (write_relocs): Print an error for an out of range
+ fixup, rather than calling abort.
+
+ * as.c (main): Unlink the output file if there are errors while
+ generating the fixups.
+
+Fri Dec 6 18:48:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips16_extended_frag): Don't call
+ S_GET_VALUE.
+ (md_convert_frag): Call resolve_symbol_value before calling
+ S_GET_VALUE, and don't add in the frag address.
+
+ * config/tc-mips.c (mips16_immed): Add file and line parameters,
+ and use them when reporting errors. Change all callers.
+
+Fri Dec 6 15:36:32 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c: Fix various gcc -Wall warnings.
+ Remove '$' prefixing for registers.
+
+Fri Dec 6 00:55:48 1996 Martin <hunt@cygnus.com>
+
+ * config/tc-d10v.c (md_assemble): Check to see if prev_seg
+ is initialized before using it.
+ (d10v_cleanup): No longer uses its argument, so make it void.
+
+ * config/tc-d10v.h (d10v_cleanup): Change prototype.
+
+Thu Dec 5 11:03:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (fixup_segment): Don't discard the symbol for a PC
+ relative fixup to an absolute symbol.
+
+Wed Dec 4 15:42:41 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (md_assemble, d10v_cleanup): Fix bug
+ with multiple sections.
+
+Wed Dec 4 13:00:07 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_longopts): Rename mips-16 to mips16, and
+ no-mips-16 to no-mips16.
+ (s_mipsset): Accept .set mips16 and .set nomips16.
+
+Wed Dec 4 10:35:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_suffix): Take expressionS pointer
+ argument, and check for +/- constant following the suffix, folding
+ it into the expression.
+ (ppc_elf_cons): Change ppc_elf_suffix calls.
+ (md_assemble): Ditto.
+ (shlib): Replace boolean mrelocatable with enumeration shlib.
+ (md_parse_option): Discriminate between PIC style shared libraries
+ and -mrelocatable.
+ (ppc_elf_validate_fix): Don't report warnings for PIC style shared
+ libraries.
+
+Tue Dec 3 23:18:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.h ({tc,ppc}_comment_chars): Define, so that we can
+ change the comment characters.
+
+ * config/tc-ppc.c (comment_chars): Delete in favor of
+ tc_comment_chars.
+ (ppc_{eabi,solaris}_comment_chars): Eabi and Solaris versions of
+ comment chars.
+ (ppc_comment_chars): Select appropriate comment chars by default.
+ (msolaris): New flag for -m{,no-}solaris.
+ (md_parse_option): Recognize -K pic. Add support for
+ -m{,no-}solaris.
+ (md_show_usage): Update.
+ (md_begin): Do not set ELF flags if Solaris.
+ (ppc_elf_suffix): @local sets R_PPC_LOCAL24PC relocation.
+ (md_apply_fix3): Add support for R_PPC_LOCAL24PC.
+
+Mon Dec 2 13:48:57 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.c (main): Correct handling of flag_always_generate_output.
+
+Sun Dec 1 21:46:05 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (tc_gen_reloc): Get the addend from
+ fx_offset, not fx_addnumber.
+
+ * config/tc-mn10300.h (tc_fix_adjustable): Don't do any
+ reloc adjustments.
+
+Sat Nov 30 17:34:48 1996 Eliot Dresselhaus <eliot@wally.edc.com>
+
+ * config/tc-i386.c: Correct misspelling: balenced to balanced.
+
+Wed Nov 27 13:25:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_section_align): Check for an alignment of
+ 4, not an alignment of 16. Corrects August 7 patch.
+
+Tue Nov 26 10:33:16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure, conf.in: Rebuild with autoconf 2.12.
+
+ * config/tc-ppc.c (ppc_elf_lcomm): Don't give an error if no
+ alignment is specified.
+
+ Add support for mips16 (16 bit MIPS implementation):
+ * config/tc-mips.c: Extensive additions for mips16 support, not
+ listed here.
+ (RELAX_OLD, RELAX_NEW): Use only 7 bits each.
+ (insn_uses_reg): Change last parameter to an enum.
+ * config/tc-mips.h (LOCAL_LABELS_DOLLAR): Define as 0.
+ (md_relax_frag): Define as mips_relax_frag.
+ (mips_relax_frag): Declare.
+ (struct mips_cl_insn): Add use_extend and extend fields.
+ (tc_fix_adjustable): Define.
+ * config/obj-elf.h (S_GET_OTHER): Define.
+ (S_SET_OTHER): Define.
+
+Mon Nov 25 18:02:29 1996 J.T. Conklin <jtc@beauty.cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Implement cases for new <, >, m, n,
+ o and p operand specifiers.
+
+Mon Nov 25 10:45:14 1996 Doug Evans <dje@seba.cygnus.com>
+
+ * write.c: Delete "ifndef md_relax_frag" around is_dnrange.
+ (relax_segment, case rs_org): Move code inside braces. Move locals
+ target,after inside too.
+ (relax_segment, case rs_machine_dependent): Guts moved to ...
+ (relax_frag): New function.
+ Call md_prepare_relax_scan if defined.
+ * config/tc-m68k.h (md_prepare_relax_scan): Renamed from
+ M68K_AIM_KLUDGE.
+
+Mon Nov 25 08:49:36 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (address_registers): Use '$' as register
+ prefix instead of '%'.
+ (data_registers, other_registers, md_assemble): Likewise.
+
+ * config/tc-mn10300.c (address_registers): Use '%' prefix for regs.
+ (data_registers, other_registers, md_assemble): Likewise.
+
+ * config/tc-mn10300.c (md_assemble): Correctly determine the
+ correct location and type for each relocation.
+ (md_pcrel_from): Simplify.
+
+Fri Nov 22 15:42:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (md_convert_frag): Improve warning when branch is
+ converted into branch around branch.
+
+Thu Nov 21 11:56:11 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.h (DIFF_EXPR_OK): Don't define this.
+ (tc_fix_adjustable): Don't adjust relocs against weak symbols or
+ pc-relative relocs.
+ * config/tc-mn10300.c (md_begin): Set linkrelax.
+ (md_assemble): Create fixups as needed.
+ (md_apply_fix3): Gut. It shouldn't ever get called anymore.
+
+Tue Nov 19 17:48:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): When automatically converting
+ serial ops to parallel, do not consider a branch as the first
+ instruction.
+
+Tue Nov 19 13:35:22 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Handle MN10300_OPERAND_REG_LIST.
+
+Mon Nov 18 15:26:55 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (mn10300_insert_operand): Provide prototype
+ via PARAMS.
+ (check_operand): Likewise.
+
+Mon Nov 18 15:22:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Branch and link instructions
+ modify r13.
+ (write_2_short): Call parallel_ok to check whether two short
+ instructions the user requested execute in parallel, can be
+ executed that way.
+
+Thu Nov 14 11:17:49 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (write_2_short): Fix bug that wouldn't
+ allow a branch and link in parallel with an exe instruction.
+
+Fri Nov 8 13:55:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * doc/c-d10v.texi: Add info on @word modifier.
+
+Wed Nov 6 13:46:07 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (mn10300_insert_operand): MN10300_OPERAND_SPLIT
+ operands are assumed to be 32bits. Use "bits" field to hold the
+ number of bits in the main instruction word for MN10300_OPERAND_SPLIT.
+ (mn10300_check_operand): MN10300_OPERAND_SPLIT operands are assumed
+ to be 32bits.
+
+ * config/tc-mn10300.c (mn10300_insert_operand): Shift low part
+ of a MN10300_OPERAND_SPLIT operand by operand->shift.
+
+ * config/tc-mn10300.c (mn10300_insert_operand): Handle
+ MN10300_OPERAND_SPLIT.
+
+Tue Nov 5 13:30:40 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Insert operands into
+ the extension part of the instruction if necessary.
+ (mn10300_insert_operand): Accept pointer to extension word
+ argument. Make insn a pointer argument too. Return type
+ is now void. All callers changed.
+
+Mon Nov 4 12:53:40 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (mn10300_insert_operand): Handle
+ repeated register operands.
+
+Fri Nov 1 10:42:49 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo: Added section on reporting bugs.
+
+ * config/tc-alpha.c: Change uses of void * to PTR. Change the
+ alpha_macro emit field to expect a const argument, and change the
+ arg field to be const. Fix some spacing to follow the GNU
+ standard.
+
+Fri Nov 1 10:32:03 1996 Richard Henderson <rth@tamu.edu>
+
+ * config/tc-alpha.c (md_parse_option): Add knowledge of 21164pc
+ (pca56) and 21264 (ev6) cpus.
+ (md_apply_fix): Private relocation types are now negative.
+ (alpha_force_relocation): Likewise.
+ (tc_gen_reloc): Likewise.
+ (emit_insn): Likewise.
+ (emit_ldXu): Do the right thing when the hardware can do byte insns.
+ (emit_stX): Likewise.
+ (emit_sextX): Likewise.
+
+Thu Oct 31 16:33:21 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (do_relocs_for): Call resolve_symbol_value on
+ a symbol found in a reloc.
+
+ * symbols.c (resolve_symbol_value): Improve the error message if
+ an undefined symbol is used in an expression.
+
+Wed Oct 30 20:15:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/internals.texi: Rewrite, and add a lot of documentation.
+ * doc/Makefile.in (internals.info): New target.
+
+Wed Oct 30 14:55:57 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.h (tc_fix_adjustable): Don't adjust relocs
+ against weak symbols.
+
+Tue Oct 29 12:28:16 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Don't lose for relaxable
+ addresses like .+6.
+
+ * config/tc-v850.c (md_convert_frag): Make sure we insert the
+ fixup at the right address within the frag.
+
+ * config/tc-v850.c (md_convert_frag): Don't set fragP->fr_fix
+ to an absolute value, instead increment it as needed.
+
+ * config/tc-v850.h (TC_GENERIC_RELAX_TABLE): Define.
+ * config/tc-v850.c: Fix some indention problems.
+ (md_relax_table): Define for D9->D99 branch displacement
+ relaxing.
+ (md_convert_frag): Do something useful instead of aborting.
+ (md_estimate_size_before_relax): Likewise.
+ (md_assemble): Note if the matching instruction has a relaxable
+ operand. If it does, allocate frag with frag_var and don't
+ do any fixups.
+
+Mon Oct 28 10:48:40 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.h (md_cleanup): New function. This is needed to
+ write out any buffered instructions when a ".end" is found.
+
+Mon Oct 28 10:43:45 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * read.c (read_a_source_file): New hook md_cleanup().
+
+Fri Oct 25 00:01:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (fix_new_exp): Use make_expr_symbol to build an
+ expression symbol for a complex fixup.
+
+Thu Oct 24 14:31:04 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (v850_reloc_prefix): Several disgusting
+ hacks to improve parsing of complex hi, lo, zda, etc
+ expressions.
+ (md_assemble): Don't demand and eat a trailing ')' after finding
+ a v850 relocation prefix. Sign extend the constant in a
+ BFD_RELOC_LO16 expression. Do eat a trailing ')' after a complete
+ operand.
+ (parse_cons_expression_v850): Don't eat a trailing ')' after
+ finding a v850 relocation prefix.
+
+ * config/tc-v850.h (TC_PARSE_CONS_EXPRESSION): Define.
+ (TC_CONS_FIX_NEW): Likewise.
+ * config/tc-v850.c (parse_cons_expression_v850): New function.
+ (cons_fix_new_v850): Likewise.
+
+ * config/tc-v850.h (tc_fix_adjustable): Don't adjust TDA relocs.
+
+Wed Oct 23 18:20:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (md_apply_fix3): Give a better warning message
+ for an unknown relocation type.
+
+Wed Oct 23 16:21:28 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_pseudo_table): Add .word; allocates
+ 4 bytes of space.
+
+Tue Oct 22 22:01:25 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Handle TDAOFF relocs
+ differently for movea & sst/sld insns.
+
+Tue Oct 22 17:09:32 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Don't allow illegal combinations
+ of instructions.
+
+Tue Oct 22 11:28:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * obj.h (struct format_ops): Add frob_file_after_relocs field.
+ * config/obj-multi.h (obj_frob_file_after_relocs): Define.
+ * config/obj-ecoff.c (ecoff_format_ops): Initialize new
+ frob_file_after_relocs field.
+ * config/obj-elf.c (elf_format_ops): Likewise.
+ * config/tc-mips.c: Undefine obj_frob_file_after_relocs before
+ including obj-elf.h.
+
+Mon Oct 21 11:38:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (cons_fix_new_mips): Only treat 8 byte reloc
+ specially if not ELF.
+ (md_apply_fix): Handle BFD_RELOC_64.
+ (tc_gen_reloc): Handle BFD_RELOC_64.
+
+ * config/tc-i386.c (md_apply_fix3): Don't increment value for a PC
+ relative reloc when BFD_ASSEMBLER and OBJ_AOUT (more ugly gas
+ reloc hacking).
+
+ * config/obj-aout.h (S_IS_DEFINE): non BFD_ASSEMBLER version:
+ Don't check S_GET_OTHER.
+
+Fri Oct 18 14:06:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): Accept an odd floating point
+ register with l.s or s.s.
+
+ * config/obj-aout.c (obj_pseudo_table): Use obj_aout_type for
+ .type pseudo-op.
+ (obj_aout_type): New static function.
+
+Thu Oct 17 17:55:17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in ($(OBJS)): Depend upon libiberty.h.
+
+Wed Oct 16 11:28:31 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (v850_reloc_prefix): Recognize zdaoff, tdaoff
+ and sdaoff expressions.
+
+ * write.c (fixup_segment): Don't add symbol value to addend if
+ TC_V850 and OBJ_ELF.
+ * config/tc-v850.h (tc_fix_adjustable): Don't adjust any
+ pc-relative fixups.
+
+ * config/tc-v850.c (md_pcrel_from): Undo yesterday's changes.
+ (md_pcrel_from_section): Likewise.
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Likewise.
+
+Tue Oct 15 23:19:00 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_pcrel_from): Delete unused function.
+ (md_pcrel_from_section): New function.
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
+
+Mon Oct 14 13:59:12 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (load_register): Add cast to offsetT when using
+ a constant with &~.
+
+Mon Oct 14 11:24:28 1996 Richard Henderson <rth@tamu.edu>
+
+ * config/obj-elf.c (elf_frob_file): Move ECOFF debug processing to ...
+ (elf_frob_file_after_relocs): ... here. New function.
+ * config/obj-elf.h (obj_from_file_after_relocs): New macro.
+ * write.c (write_object_file): Call *frob_after_relocs after the
+ call to write_relocs.
+
+ * config/tc-alpha.c: Use new BFD_RELOC_ALPHA_ELF_LITERAL reloc.
+
+ * config/tc-alpha.c (load_expression): Don't SET_VALUE on the section
+ symbol, as this messes up linking. Instead, expand the recursive call
+ inline and change up the appropriate bits to get the 0x8000 offset
+ in the reloc addend.
+
+Thu Oct 10 17:30:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.h (tc_fix_adjustable): Permit the difference of
+ two symbols in the same segment to be adjusted.
+
+ * configure.in: Don't get confused by CPU-VENDOR-linux-gnu.
+ * configure: Rebuild.
+
+Thu Oct 10 17:22:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_insert_operand): Change most warnings into
+ errors.
+ (ppc_elf_validate_fix): Ditto.
+ (md_assemble): Ditto.
+ (ppc_tc): Ditto.
+ (ppc_pe_section): Ditto.
+ (ppc_frob_symbol): Ditto.
+
+Thu Oct 10 12:05:45 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/mn10300.c (md_assemble): Pass an extra shift count
+ to mn10300_insert_operand based on the opcode format.
+ (mn10300_insert_operand): Accept and use extra shift count
+ parameter.
+
+ * config/tc-mn10300.c (md_assemble): Use FMT_* macros for
+ formats rather than hard-coded constants.
+
+ * config/tc-mn10300.c (md_assemble): Format D5 instructions
+ are 7 bytes long. Write out instructions in big-endian format.
+
+Tue Oct 8 14:56:15 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Tweak further so
+ that all instructions are parsed correctly.
+
+Tue Oct 8 13:02:21 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.h: Include libiberty.h.
+ (xmalloc, xrealloc): Don't declare.
+ * as.c: Don't include libiberty.h.
+ * expr.c, read.c, stabs.c, config/obj-coff.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * messages.c: Likewise.
+ (xstrerror): Don't declare.
+ * xmalloc.c: Remove.
+
+Mon Oct 7 16:53:23 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.h (pre_defined_registers) Remove.
+ (system_registers, cc_names): Likewise.
+ (address_registers, data_registers, other_registers): New register
+ arrays.
+ (register_name, system_register_name, cc_name): Remove.
+ (mn10300_reloc_prefix): Likewise.
+ (data_register_name): New function.
+ (address_register_name, other_register_name): Likewise.
+ (md_assemble): Rough cut at parsing operands. Remove lots of
+ unwanted code.
+ (md_apply_fix3): Disable for now.
+
+Mon Oct 7 11:38:34 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/tc-m68k.c (select_control_regs): New function, extracted
+ out of m68k_init_after_args.
+ (m68k_init_after_args): Use it.
+ (mri_chip): Use it here as well to update set of allowed control
+ regs for movec.
+
+Mon Oct 7 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (elf_begin): New function.
+ (obj_elf_section): Add the section symbol to the symbol table.
+ * config/obj-elf.h (obj_begin): Define.
+ (elf_begin): Declare.
+ * as.c (perform_an_assembly_pass): Call obj_begin if it is
+ defined.
+
+Fri Oct 4 18:37:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Subtract the section address
+ from a PC relative reloc if TC_M68K.
+
+Thu Oct 3 15:15:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (md_pseudo_table): Make .uahalf, .uaword, and
+ .uaxword available even if not OBJ_ELF.
+ (md_atof): Remove unused local variable wordP.
+
+Thu Oct 3 00:16:50 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10x00.c, config/tc-mn10x00.h: New files
+ for Matsushita MN10x00 support.
+ * configure.in: Recognize mn10x00-*-*
+ * configure: Rebuilt.
+
+Wed Oct 2 15:54:03 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ * obj-evax.h: move openvms definitions from here to tc-alpha.c.
+ * tc-alpha.c: add support for vms_case_hack like in vax/vms.
+ (load_expression): track clobbering of base reg before jmp/jsr.
+ (s_alpha_file): pass case_hack flags and source filename via
+ symbol table to bfd.
+ * tc-alpha.h (TC_CONS_FIX_NEW): define
+
+Tue Oct 1 16:16:01 1996 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (mips-*-rtems*): New target, like mips-*-elf*.
+ * configure: Rebuild.
+
+Tue Oct 1 12:37:48 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_macro): Warn if a macro has the same name as a
+ pseudo-op.
+ (s_space): In m68k MRI mode, align to a word boundary.
+ * macro.c (define_macro): Add namep parameter. Change all
+ callers.
+ * macro.h (define_macro): Update declaration.
+
+ * as.c (show_usage): Print bug report address.
+ (parse_args): Change version printing to match current GNU
+ standards.
+ * gasp.c (show_usage): Print bug report address.
+ (main): Change version printing to match current GNU standards.
+
+ * config/tc-m68k.c (init_table): Correct access control unit
+ register numbers. From Ken Rose <rose@netcom.com>.
+
+ * config/tc-alpha.c: Add some static function prototypes.
+ (alpha_macros): Move to top of file. Make static.
+ (alpha_num_macros): Move to top of file.
+
+Tue Oct 1 09:36:19 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * tc-v850.h: Define LOCAL_LABEL to recognise _.L_* symbols
+ generated by DWARF.
+
+Sat Sep 28 03:38:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * listing.c (list_symbol_table): Remove bogus code in BFD64 case,
+ and just call sprintf_vma.
+
+Thu Sep 26 16:04:11 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (expr): Change >>= to >> (fix typo). (From meissner).
+
+Tue Sep 24 19:05:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (float_cons): Call md_flush_pending_output if it is
+ defined.
+
+Tue Sep 24 12:22:18 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (md_operand): Created. Allows operands to
+ start with '#'.
+ * config/tc-d10v.h (md_operand): Undefined.
+
+Mon Sep 23 12:13:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (add_fix): Treat a width of '3' like 'B'.
+ (md_assemble): A fixup width of '3' means a 1 byte reloc.
+
+Thu Sep 19 12:21:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Don't adjust PC relative
+ reloc for the i960 for a reloc in the same section. This undoes
+ one of the two changes made Aug 19.
+
+Wed Sep 18 12:11:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (obj_coff_endef): Both versions: Move C_STAT
+ symbols to the position of the debugging information.
+
+Mon Sep 16 11:41:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (expr): Always use unsigned right shifts for >>.
+
+Thu Sep 12 10:25:45 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-arm.c (md_apply_fix3): Update two thumb instruction
+ slots when processing BL fixups.
+
+ * config/tc-arm.c (output_inst): Ensure Thumb BL fixup is marked
+ on the first half of the instruction.
+
+Wed Sep 11 00:09:35 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_stab): Create an expression symbol for a complex
+ stabs expression, rather than giving an error.
+
+ * ecoff.c (ecoff_new_file): Don't do anything if we are still in
+ the same file.
+
+Tue Sep 10 11:45:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (append_insn): Fill in the value for a constant
+ jump, rather than creating a reloc.
+
+Mon Sep 9 10:57:42 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (append_insn): Don't swap an instruction which
+ sets a condition code with an instruction which uses a condition
+ code.
+ (mips_ip): In cases 'N' and 'M', look for $fccN rather than an
+ immediate value.
+
+ * config/tc-mips.c (md_begin): Recognize r5000 for cpu.
+ (mips_ip): Give a better error message if the ISA level is wrong.
+ (md_parse_option): Recognize -mcpu=[v][r]5000.
+
+Sat Sep 7 13:25:55 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c (COUNT_TOP_ZEROES): Added macro to count
+ leading zeroes.
+ (load_register): Ensure hi32 bits are not lost during lo32bit
+ processing. Fix shift offset that was overflowing into the next
+ instruction field. Add code to generate shorter sequences for
+ constants with a single contiguous seqeuence of ones.
+
+Fri Sep 6 17:07:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (d10v_dot_word): New function to support
+ "@word" with the word pseudo-op.
+ (md_apply_fix3): Cleanup and changes to support correct sizes
+ for 16 and 18-bit relocs.
+
+Fri Sep 6 16:00:29 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (sparc-*-aout): Set `em'.
+ * configure: Regenerated.
+ * config/te-sparcaout.h: New file.
+ * config/tc-sparc.h (TARGET_BYTES_BIG_ENDIAN): Define.
+ Ifdef TE_SPARCOUT define TARGET_FORMAT and SPARC_BIENDIAN.
+ * config/tc-sparc.c (INSN_BIG_ENDIAN): New macro.
+ (SPECIAL_CASE_{SETSW,SETX}): Define.
+ ({NOP,OR,FMOVS,SETHI,SLLX,SRA}_INSN): Define.
+ (md_begin): Delete setting of `target_big_endian'.
+ (output_insn): New function.
+ (md_assemble): Rewrite. Add `setx' support.
+ (sparc_ip): Handle `0' operand char. Recognize setuw, setsw, setx
+ special cases.
+ (md_atof): Add little endian support.
+ (md_number_to_chars): Likewise.
+ (md_apply_fix): Likewise.
+ (md_longopts): Recognize -EL,-EB ifdef SPARC_BIENDIAN.
+ (md_parse_option): Likewise.
+ (md_show_usage): Print -EL, -EB ifdef SPARC_BIENDIAN.
+
+Thu Sep 5 13:40:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_new_file): New function.
+ * ecoff.h (ecoff_new_file): Declare.
+ * config/obj-ecoff.h (obj_app_file): Define.
+
+Thu Sep 5 13:39:25 1996 Richard Henderson <rth@tamu.edu>
+
+ * config/tc-alpha.c (load_expression): Bias the .lit8 section
+ symbol by 32k so that our 16-bit signed offset can address the
+ entire chunk. Reported by <matt@lkg.dec.com>.
+
+Wed Sep 4 10:23:20 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (load_register): Remove unused variable tmp.
+
+Wed Sep 4 11:24:29 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c (load_register): Remove unnecessary code that
+ was causing the high 32bits of 64bit constants to be lost.
+
+Tue Sep 3 13:52:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Added changes to support function
+ pointers and "@word" syntax.
+
+Tue Sep 3 11:57:18 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c: Remove commented out and #if 0'd code.
+ (v850_reloc_prefix): Provide prototype.
+ (postfix, get_reloc, build_insn): Remove prototypes for nonexistant
+ functions.
+ (md_begin, md_assemble, md_apply_fix3): Remove unused variables.
+ (md_assemble): Add default to case statement.
+
+Sat Aug 31 16:03:00 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Compute size of the instrction
+ from the opcode.
+
+ * config/tc-v850.c (md_apply_fix3): Do simple byte, short and
+ word fixups too.
+
+Fri Aug 30 23:50:08 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_apply_fix3): Use little endian get/put
+ routines to fetch/store the updated instruction from/to memory.
+ (v850_insert_operand): If the operand has a specialized insert
+ routine, call it.
+
+Fri Aug 30 18:35:26 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * config/tc-v850.c (reg_name_search): Align calling convention to
+ be like identical function found in tc-ppc.c.
+ (get_reloc): Removed.
+ (v850_reloc_prefix): New function, parse lo(), hi() and hi0().
+ (md_assemble): emit fixups.
+ (md_pcrel_from): renamed from md_pcrel_from_section, emit proper
+ displacement.
+ (md_apply_fix3): handle fixups/relocs.
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Removed definition.
+
+Fri Aug 30 18:12:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ Add SH ELF support.
+ * configure.in (sh-*-elf*): New target.
+ * config/tc-sh.h (TARGET_ARCH): Define.
+ (WORKING_DOT_WORD): Define.
+ (TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
+ (BFD_ARCH, COFF_MAGIC, TC_COUNT_RELOC): Likewise.
+ (TC_RELOC_MANGLE, tc_coff_symbol_emit_hook): Likewise.
+ (DO_NOT_STRIP, NEED_FX_R_TYPE, TC_KEEP_FX_OFFSET): Likewise.
+ (TC_COFF_SIZEMACHDEP, tc_frob_file): Likewise.
+ (SUB_SEGMENT_ALIGN): Likewise.
+ (RELOC_32): Don't define.
+ (tc_frob_file_before_adjust): Define if BFD_ASSEMBLER.
+ (target_big_endian): Declare if OBJ_ELF.
+ (TARGET_FORMAT): Define if OBJ_ELF.
+ * config/tc-sh.c: Use BFD reloc codes instead of SH COFF reloc
+ numbers throughout.
+ (tc_crawl_symbol_chain): Only define if OBJ_COFF.
+ (tc_headers_hook, tc_coff_sizemachdep): Likewise.
+ (struct sh_count_relocs): Define.
+ (sh_count_relocs): New static function, broken out of
+ sh_frob_file. Add BFD_ASSEMBLER code.
+ (sh_frob_section): Likewise.
+ (sh_frob_file): Call sh_frob_section.
+ (md_convert_frag): If BFD_ASSEMBLER, change type of headers, and
+ call section_symbol rather than seg_info (seg)->dot.
+ (md_section_align): Add OBJ_ELF version.
+ (SWITCH_TABLE_CONS): Define.
+ (SWITCH_TABLE): Use SWITCH_TABLE_CONS.
+ (md_apply_fix): Change parameter types if BFD_ASSEMBLER. Only
+ handle fx_r_type == 0 if not BFD_ASSEMBLER. Return 0 if
+ BFD_ASSEMBLER.
+ (struct reloc_map): Define if not BFD_ASSEMBLER.
+ (coff_reloc_map): Likewise.
+ (sh_coff_reloc_mangle): Use coff_reloc_map to convert fx_r_type.
+ (tc_gen_reloc): New function if BFD_ASSEMBLER.
+ * write.c (write_relocs): Ifdef out fx_where test which triggers
+ inappropriately for SH ELF.
+ (write_object_file): Call tc_frob_file_before_adjust and
+ obj_frob_file_before_adjust if they are defined.
+
+ * write.c (write_object_file): Use BFD_RELOC_16, not
+ BFD_RELOC_NONE, when calling fix_new_exp for a broken word.
+
+ * read.c (emit_expr): Fix conversion of byte count to BFD reloc
+ code.
+
+Fri Aug 30 14:47:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (find_opcode): Fix problem with calculating
+ branch sizes in across sections.
+
+Fri Aug 30 00:44:13 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-850.c (md_assemble): Handle hi() correctly. Handle
+ hi0() too.
+
+Wed Aug 28 23:11:08 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_begin): Deal with end of opcode
+ table marker.
+
+Wed Aug 28 19:20:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (find_opcode): Fix a bug which could generate
+ the wrong opcode for cases like st2w where there are many forms
+ of the same instruction.
+
+Tue Aug 27 13:53:22 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (operand): If md_parse_name is defined, call it before
+ calling symbol_find_or_make.
+ * config/tc-ppc.h (md_parse_name): Define.
+ (ppc_parse_name): Declare.
+ * config/tc-ppc.c (reg_name_search): Add regs and regcount
+ parameters.
+ (register_name): Update call to reg_name_search.
+ (cr_operand): New static variable.
+ (cr_names): New static const array.
+ (ppc_parse_name): New function.
+ (md_assemble): If PPC_OPERAND_CR is set in the operand flags, set
+ cr_operand before calling expression.
+
+Tue Aug 27 09:05:50 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (tc_gen_reloc): Add new argument to
+ hppa_gen_reloc_type call.
+
+Mon Aug 26 18:24:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Fixed ".word". Fixed problem with range checking
+ on addresses. Improved error messages.
+ * doc/c-d10v.texi: Added docs for register pairs.
+
+Mon Aug 26 13:39:27 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Fix bug in parallel
+ checking code.
+
+Mon Aug 26 14:38:22 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (init_file): Initialize fMerge to 1.
+ (add_file): Restore old file merging code, but only merge files if
+ fMerge is set.
+ (ecoff_directive_loc): Clear fMerge field of current file.
+ (ecoff_generate_asm_lineno): Likewise.
+
+Fri Aug 23 11:40:47 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * doc/c-d10v.texi: Fix typo.
+
+Fri Aug 23 10:41:32 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Correct bit masking for
+ hi and lo expressions.
+
+ * config/tc-v850.c (md_assemble): Rough cut at demanding
+ "ep" or "r30" in sst and sld instructions.
+ (md_apply_fix3): Don't abort. Just warn that we don't
+ have relocs yet.
+
+ * config/tc-v850.c (CC_NAME_CNT): Define.
+ (cc_name): New function.
+ (md_assemble): Handle V850_OPERAND_CC correctly.
+
+ * config/tc-v850.c (md_assemble): Don't forget to initialize
+ "insn"!
+
+ * config/tc-v850.c (reg_name_search): Generalize to search
+ any given register table.
+ (register_name): Pass appropriate table and size to reg_name_search.
+ (system_register_name): New function.
+ (SYSREG_NAME_CNT): Define.
+ (md_assemble): Handle operands which are system registers.
+
+ * config/tc-v850.c (md_assemble): If we find a register, but the
+ opcode doesn't want a register, then we don't have a match.
+ (md_assemble): Get size of the instruction from the opcode table.
+
+Thu Aug 22 10:20:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set and substitute HLDENV.
+ * configure: Rebuild.
+ * Makefile.in (HLDENV): New variable.
+ (as.new): Use $(HLDENV).
+
+ * ecoff.c (ecoff_directive_endef): Avoid a division by zero error
+ if an array dimension is not known.
+
+Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Fix a reloc bug caused by my last change.
+ * doc/c-d10v.texi: Cleanup.
+
+Tue Aug 20 15:15:16 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * config/tc-v850.c: New file.
+ * config/tc-v850.h: New file.
+ * configure (v850-*-elf): New target.
+ * configure.in (v850-*-elf): New target.
+
+Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * doc/c-d10v.texi: New file.
+ * doc/all.texi: Added D10V stuff.
+ * doc/as.texinfo: Added D10V stuff.
+
+Tue Aug 20 14:10:02 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: All references to defined symbols should
+ now use the optimal instruction. .float and .double now work.
+
+Mon Aug 19 14:41:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Adjust PC relative reloc by
+ section address for the i960 as is done for the i386.
+
+Thu Aug 15 16:37:59 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in: Add wildcards for config matching, add mips-*-*
+ case, forward-include bfd/elf-bfd.h.
+
+Thu Aug 15 13:24:30 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Add additional information to the opcode
+ table to help determinine which instructions can be done
+ in parallel.
+
+Thu Aug 15 17:01:31 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-arm.c: Major changes to add Thumb support, with lots
+ of change input from <rearnsha@armltd.co.uk>.
+ Reverted to INSN_SIZE macro, rather than insn_size variable.
+ (insns): Added ARM "bx" instruction support.
+ (tinsns): Added Thumb instruction definition structure.
+ (arm_tops_hsh): Added hash structure for Thumb opcodes.
+ (md_pseudo_table): Added ".arm", ".thumb" and ".code" pseudo-ops.
+ (opcode_select,s_arm,s_thumb,s_code): Added.
+ (decode_shift): Allow upper-case RRX.
+ (do_ldst): Simpler halfword support.
+ (do_ldmstm): Improved.
+ (reg_list, do_bx, thumb_reg, thumb_add_sub, thumb_shift,
+ thumb_mov_compare, thumb_load_store, do_t_arit, do_t_add,
+ do_t_asr, do_t_branch, do_t_bx, do_t_compare, do_t_ldmstm,
+ do_t_ldrb, do_t_ldrh, do_t_lds, do_t_lsl, do_t_lsr, do_t_mov,
+ do_t_push_pop, do_t_str, do_t_strb, do_t_strh, do_t_sub, do_t_swi,
+ do_t_adr): Added.
+ (md_apply_fix3): Add support for BFD_RELOC_ARM_THUMB_* relocations.
+ (md_parse_option): Add support for -mthumb.
+ (md_show_usage): Updated to reflect new command line option.
+ (arm_data_in_code, arm_canonicalize_symbol_name): Added.
+ * config/tc-arm.h: Provide TC_FIX_TYPE to allow private ARM
+ fragment information to be held.
+
+Thu Aug 15 16:12:00 1996 Richard Earnshaw (rearnsha@armltd.co.uk)
+
+ * tc-arm.c (md_apply_fix3): Also set fixP->fx_done if fx_addsy is
+ non-null, but is a constant.
+ (fix_new_arm): Call make_expr_symbol to make the expression symbol
+ so that error reporting will work correctly.
+
+Wed Aug 14 10:37:21 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust relocs
+ against weak symbols.
+
+Tue Aug 13 17:39:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.h (TC_FORCE_RELOCTION): Define if OBJ_XCOFF.
+ (ppc_force_relocation): Declare if OBJ_XCOFF.
+ * config/tc-ppc.c (ppc_force_relocation): New function if
+ OBJ_XCOFF.
+
+Mon Aug 12 16:49:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.h (BYTE_ORDER): Don't define. No longer used.
+
+Fri Aug 9 17:48:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Fix problem with relocs.
+
+Fri Aug 9 14:16:14 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (sh_do_align): If not BFD_ASSEMBLER, always align
+ with nops if not in data_section or bss_section.
+
+Thu Aug 8 12:32:56 1996 Klaus Kaempf <kkaempf@progis.de>
+
+ Add support for openVMS/Alpha.
+ * as.h (PRINTF_LIKE): Don't define if VMS, for now.
+ * config/obj-evax.c: New file.
+ * config/obj-evax.h: New file.
+ * config/tc-alpha.c: Add support for EVAX format if OBJ_EVAX is
+ defined.
+ * config/tc-alpha.h: Add support for EVAX format if OBJ_EVAX is
+ defined. Add case for bfd_target_evax_flavour.
+ * config/vms-a-conf.h: New file.
+ * conf-a-gas.com: New file.
+ * configure.in: Add target alpha-*-*vms*.
+ * configure: Rebuild.
+ * makefile.vms: New file.
+ * read.c (s_lcomm): Align bss_seg on 8 byte boundary if OBJ_EVAX.
+ Don't call ffs on openVMS/Alpha.
+
+Wed Aug 7 14:19:03 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
+
+ * configure.in: Make GAS_CHECK_DECL_NEEDED include <string.h> or
+ <strings.h> if they exist. Call GAS_CHECK_DECL_NEEDED on strstr
+ and sbrk.
+ * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
+ (NEED_DECLARATION_SBRK): New macro.
+ * configure, conf.in: Rebuild.
+ * as.h: Only include <strings.h> if HAVE_STRINGS_H.
+ (strstr): Declare if NEED_DECLARATION_STRSTR.
+ * as.c: If HAVE_SBRK and NEED_DECLARATION_SBRK, declare sbrk.
+
+Wed Aug 7 11:50:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): Handle addition or subtraction
+ by a constant before entering the main switch. Reject attempts to
+ apply an arithmetic function to non-absolute symbols, except for
+ the special case of subtraction of two symbols in the same
+ section.
+
+ * config/tc-mips.c (md_section_align): Do align if OBJ_ELF, but
+ not to more than a 16 byte boundary.
+
+ * config/tc-i386.c (tc_gen_reloc): Accept all relocs; remove
+ #ifndef OBJ_ELF lines. From Eric Valette <valette@crf.canon.fr>.
+ (tc_gen_reloc): If out of memory call as_fatal rather than
+ assert. If no howto found, call as_bad_where rather than
+ as_fatal. Change the error message slightly. Set howto to a
+ non-NULL value in order to keep going.
+
+Tue Aug 6 12:58:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Added code to support 32-bit fixups for stabs.
+
+Tue Aug 6 11:15:26 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (get_specific): New operand "size" derived
+ from ".b", ".w" and ".l" extensions. All callers changed. If
+ the base instruction has no operands, then use the size to
+ determine which specific instruction to use.
+
+Mon Aug 5 14:21:10 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i960.c (mem_fmt): Call parse_expr before emit.
+
+Fri Aug 2 11:23:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_section_align): Don't change addr if
+ OBJ_ELF.
+
+Thu Aug 1 23:51:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c: Revert yesterday's changes.
+
+Wed Jul 31 14:46:11 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Disable range checking on 16-bit values.
+
+Wed Jul 31 16:27:19 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Set ok_arch for every instruction,
+ not just the ones that don't match.
+
+Wed Jul 31 11:45:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Fixed bugs in short relocs and range checking.
+
+Wed Jul 31 15:41:42 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-arm.c: Changed INSN_SIZE to variable insn_size, as
+ pre-cursor to adding Thumb support. Also added cpu_variant flag
+ information to each of the asm_flg structures.
+ (md_parse_option): Updated ARM7 parsing to allow 't' for
+ thumb/halfword support, aswell as 'm' for long multiply.
+ (md_show_usage): Updated help message.
+ (md_assemble): Check that instruction flags are applicated to the
+ current cpu variant.
+ (md_apply_fix3, tc_gen_reloc): Add BFD_RELOC_ARM_OFFSET_IMM8 and
+ BFD_RELOC_ARM_HWLITERAL relocation support for new halfword and
+ signextension instructions.
+ (do_ldst): Generate halfword and signextension variants if
+ mnemonic flags match.
+ (ldst_extend): Do not allow shifts in the offset field of halfword
+ or signextension instructions.
+ (validate_offset_imm): Provide check on halfword and signextension
+ immediate range.
+ (add_to_lit_pool): Merge identical literal pool values.
+
+Tue Jul 30 14:28:23 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (selector_table): Add 'E' selector.
+ (cons_fix_new_hppa): Don't coke on e_esel.
+ (tc_gen_reloc, SOM version): Handle R_COMP2 when used
+ to help generate exception handling tables.
+ (md_apply_fix): Don't try to apply fixups with an e_esel
+ selector.
+ (hppa_fix_adjustable): Fixups with e_esel selectors
+ are not adjustable.
+
+Tue Jul 30 15:51:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (md_pseudo_table): Add 2byte, 4byte, and 8byte
+ pseudo-ops.
+
+Fri Jul 26 11:43:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Added lots of error checking. Added hacks
+ to support accumulator shifts.
+
+Fri Jul 26 11:56:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (S_SET_EXTERNAL): Let .weak override.
+ (S_CLEAR_EXTERNAL): Likewise.
+ (S_SET_WEAK): Remove error; just let .weak override.
+
+Thu Jul 25 15:22:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (md_assemble): Now handles multiline
+ instructions.
+
+Thu Jul 25 12:03:33 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Fix packaging bug. Added range checking.
+ Added kludge for divs instruction. Fixed minor problem with
+ multiple text sections.
+ * config/tc-d10v.h (d10v_cleanup): Change prototype.
+
+Tue Jul 23 10:49:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c (md_apply_fix3): Fix all instruction
+ addresses to be right-shifted by 2.
+
+Mon Jul 22 11:32:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: Many changes to get relocs working.
+ (register_name): No longer creates a symbol for register names.
+ (pre_defined_registers): moved to opcodes/d10v-opc.c.
+ (d10v_insert_operand): Now works correctly for either container.
+ * config/tc-d10v.h (d10v_cleanup): Declare.
+
+Mon Jul 22 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (tc_gen_reloc): BFD_RELOC_PCREL_HI16_S and
+ BFD_RELOC_PCREL_LO16 are expected to be PC relative.
+
+Mon Jul 22 12:46:55 1996 Richard Henderson <rth@tamu.edu>
+
+ * tc-alpha.c: Patches to track current minimum alignment to reduce
+ the number of fragments created with frag_align.
+ (alpha_current_align): New static variable.
+ (s_alpha_text): Reset alignment to 0.
+ (s_alpha_data, s_alpha_rdata, s_alpha_sdata): Likewise.
+ (s_alpha_stringer, s_alpha_space): New functions.
+ (s_alpha_cons, alpha_flush_pending_output): Remove functions.
+ (alpha_cons_align): New function to replace both of them.
+ (emit_insn): Only align if alpha_current_align is less than 2;
+ reset alpha_current_align to 2.
+ (s_alpha_gprel32): Likewise.
+ (s_alpha_section): New function. Basically duplicate the other
+ alpha section change hooks. Only define for ELF.
+ (s_alpha_float_cons): Simplify alignment handling.
+ (md_pseudo_table): Only define "rdata" and "sdata" if OBJ_ECOFF.
+ If OBJ_ELF, define "section", "section.s", "sect", and "sect.s".
+ Don't define the s_alpha_cons pseudo-ops. Do define
+ s_alpha_stringer and s_alpha_space pseudo-ops.
+ (alpha_align): Skip if less than current default alignment. Set
+ default alignment.
+ * tc-alpha.h (md_flush_pending_output): Remove.
+ (md_cons_align): Add.
+
+ * tc-alpha.c: Add oodles of function description comments.
+ (md_bignum_to_chars): Remove; there are no callers.
+ (md_show_usage): Mention some more variants.
+
+Thu Jul 18 15:54:54 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ From Andrew Gierth <ANDREWG@microlise.co.uk>:
+ * configure.in (sparc-*-sysv4*): New target.
+ * configure: Rebuild.
+
+ * config/tc-sparc.c (md_pseudo_table): Change uahalf, uaword, and
+ uaxword to use s_uacons.
+ (sparc_no_align_cons): New static variable.
+ (s_uacons): New static function.
+ (sparc_cons_align): If sparc_no_align_cons is set, just clear it
+ and return.
+
+ * config/tc-sparc.c (s_common): Remove unused label allocate_bss.
+
+ * configure.in: Add mips-*-irix6* target. Handle Irix 6 like Irix
+ 5 with regard to shared libraries.
+ * configure: Rebuild.
+
+ * config/tc-m68k.c (m68k_ip): Use the correct length when
+ allocating space for the unsupported architecture error message.
+
+Thu Jul 18 12:57:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (d10v-*-*): Allow d10v-*-*, don't require d10v-*-elf*.
+
+Wed Jul 17 14:25:13 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * config/tc-d10v.c: New file.
+ * config/tc-d10v.h: New file.
+ * configure (d10v-*-elf): New target.
+ * configure.in (d10v-*-elf): New target.
+
+Fri Jul 12 20:54:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_parse_option): Recognize -K PIC.
+
+Wed Jul 10 12:39:08 1996 Richard Henderson <rth@tamu.edu>
+
+ * config/tc-alpha.c (alpha_align): Change fill parameter
+ to a pointer. Take NULL as 0 or nop depending on section. Change
+ all callers.
+ (s_alpha_align): Rename local variables.
+
+ * doc/as.texinfo (.align): Document action of omitted
+ fill parameter.
+
+Wed Jul 10 00:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (md_apply_fix3): Give a useful error message
+ when an unsupported PC relative reloc is seen, rather than calling
+ abort.
+
+ * app.c (do_scrub_chars): Remove not_cpp_line local variable.
+ Instead, check state when '#' comment is seen.
+
+Mon Jul 8 14:11:49 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_regmask_frag): Only define if OBJ_ELF or
+ OBJ_MAYBE_ELF.
+ (tc_gen_reloc): If fixup was changed to be PC relative, change
+ reloc type accordingly. Use name of reloc in error message.
+
+ * as.h: Don't define const or volatile.
+ * flonum.h: Don't define const.
+
+ * config/tc-m68k.c (tc_gen_reloc): Change the code appropriately
+ if fx_pcrel is set. Correct setting the addend case in the
+ OBJ_ELF case (from Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>).
+ (md_show_usage): Correct -mfc5200 to -m5200.
+
+Fri Jul 5 10:32:58 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * doc/c-m68k.texi: Document -m5200 flag.
+ * doc/as.texinfo: Likewise.
+
+ * config/tc-m68k.c (m68k_ip): The coldfire does not support 8x
+ scale factor.
+
+Fri Jul 5 11:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (S_SET_EXTERNAL): Change as_warn to as_bad.
+ (S_CLEAR_EXTERNAL, S_SET_WEAK): Likewise.
+
+Thu Jul 4 11:59:46 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (VERSION): Set to cygnus-2.7.1.
+
+ * Released binutils 2.7.
+
+Thu Jul 4 10:11:33 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c (mips_ip): Only perform range check when
+ dealing with O_constant expressions.
+
+Wed Jul 3 15:02:21 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k-parse.h (m68k_register): Add new coldfile control
+ registers.
+
+ * config/tc-m68k.c (mcf5200_control_regs): New variable,
+ array of control registers for the coldfire.
+ (cpu_of_arch): Added mcf5200.
+ (archs): Added mcf5200.
+ (init_table): Add new control registers.
+ (m68k_ip): Added support for new control registers.
+ (m68k_init_after_args): Likewise.
+
+ * config/tc-m68k.c (md_show_usage): Add -m5200 to usage text.
+
+Wed Jul 3 16:05:50 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.h (is_it_end_of_statement): Declare.
+ * read.c (is_it_end_of_statement): Remove declaration.
+
+ * config/tc-ppc.c (ppc_elf_suffix): Correct parenthesization of ||
+ within &&.
+ (md_assemble): Fix handling of @l with an unsigned constant. Add
+ default case to reloc switch.
+
+ * config/tc-i386.h (AOUT_MACHTYPE): Define as 0 if TE_386BSD.
+
+ Based on patches from Tom Quiggle <quiggle@sgi.com>:
+ * ecoff.c (last_lineno): New static variable.
+ (add_procedure): Set last_lineno.
+ (ecoff_directive_loc): Likewise.
+ (ecoff_generate_asm_lineno): Likewise.
+ (ecoff_fix_loc): New function.
+ * ecoff.h (ecoff_fix_loc): Declare.
+ * config/tc-mips.c (append_insn): When inserting nops, and using
+ ECOFF debugging, call ecoff_fix_loc.
+
+Tue Jul 2 23:02:12 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (build_bytes): If an operand type is
+ marked as SRC_IN_DST retrieve it from the "destination" op.
+
+Sat Jun 29 13:38:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in (arm-*-riscix*): Set emulation to riscix.
+ * configure: Rebuild.
+ * config/te-riscix.h: New file to define TE_RISCIX.
+
+ * config/tc-sh.h (SUB_SEGMENT_ALIGN): Define.
+
+Fri Jun 28 15:14:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (config.status): Just run config.status as other
+ tools do.
+
+Fri Jun 28 11:09:38 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-config.in (TARGET_OS): Add definition to conf.
+
+Thu Jun 27 20:39:40 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c (append_insn): Parenthesize
+ cop_interlocks expressions.
+
+Thu Jun 27 12:18:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * listing.c (listing_print): Close the listing file if it is not
+ stdout. Close the other files opened for the listing.
+
+ * config/tc-sparc.h (md_cons_align): Define.
+ (sparc_cons_align): Declare.
+ (HANDLE_ALIGN): Define.
+ (sparc_handle_align): Declare.
+ * config/tc-sparc.c (sparc_cons_align): New function.
+ (sparc_handle_align): New function.
+ * read.c (cons_worker): Call md_cons_align if it is defined.
+
+ * as.h (struct frag): Add fr_file and fr_line fields.
+ * frags.c (frag_new): Set fr_file and fr_line.
+ (frag_var): Likewise.
+ (frag_variant): Likewise.
+
+ * as.h (struct frag): Remove unused align_mask and align_offset
+ fields.
+
+ * listing.c (calc_hex): Offset by fr_fix when examining fr_var.
+ From <uddeborg@carmen.se>.
+
+Wed Jun 26 13:21:34 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in (mips-*-osf*): New target.
+ * configure: Rebuild.
+
+ * config/tc-m68k.c: Add 68ec060 as a synonym for 68060.
+
+Wed Jun 26 16:23:08 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c: Added cop_interlocks, to avoid NOP insertion
+ between co-processor comparisons and branches for the VR4300.
+
+Mon Jun 24 18:02:50 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.
+ * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
+ includedir): Use autoconf set values.
+ (docdir): Removed.
+
+Mon Jun 24 11:58:14 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * listing.c (listing_eject): Don't do anything if listing is 0.
+ (listing_list): Likewise.
+ (listing_source_line): Likewise.
+ (listing_title): Don't save title if listing is 0.
+ (listing_source_file): Check listing rather than listing_tail.
+
+ * configure.in: On alpha*-*-osf*, link against libbfd.a if not
+ using shared libraries.
+ * configure: Rebuild.
+
+Fri Jun 21 18:22:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): In case 'i'/'j', don't require an
+ absolute expression if a relocation type was specified.
+
+Fri Jun 21 17:40:16 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
+
+ * configure.in: Add support for *-*-rtems* configurations.
+ * configure: Rebuild.
+
+Fri Jun 21 16:01:18 1996 Richard Henderson <rth@tamu.edu>
+
+ * configure.in: Add alpha-*-linuxecoff* target. Use elf for
+ alpha-*-linux* target. Force bfd_gas for alpha-*. Require
+ opcodes library for alpha.
+ * configure: Rebuild with autoconf 2.10.
+ * config/tc-alpha.c: Substantial rewrite to add ELF support and
+ use new opcode table.
+ * config/tc-alpha.h (md_undefined_symbol): Don't define.
+ (LOCAL_LABEL): Define differently if OBJ_ELF.
+ (FAKE_LABEL_NAME): Define if OBJ_ELF.
+ * config/alpha-opcode.h: Remove.
+ * config/obj-elf.h: If TC_ALPHA, define ECOFF_DEBUGGING.
+ * Makefile.in (TARG_CPU_DEP_alpha): Depend upon
+ include/opcode/alpha.h rather than config/alpha-opcode.h.
+
+Thu Jun 20 19:10:28 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-aout.c (obj_emit_relocations): Give an error if the
+ relocation symbol was not resolved.
+ * config/obj-coff.c (do_relocs_for): Likewise.
+
+ * write.c (adjust_reloc_syms): Refetch the symbol section after
+ calling S_GET_VALUE, since it may have changed.
+
+ * expr.c (struct expr_symbol_line): Define.
+ (expr_symbol_lines): New static variable.
+ (make_expr_symbol): Add entry to expr_symbol_lines.
+ (expr_symbol_where): New function.
+ * expr.h: Use extern on function declarations.
+ (expr_symbol_where): Declare.
+ * symbols.c (resolve_symbol_value): Try to use expr_symbol_where
+ rather than printing the meaningless name of an expression
+ symbol.
+
+Thu Jun 20 15:57:41 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-i386.c (md_number_to_chars): Deleted.
+ * config/tc-i386.h (md_number_to_chars): New macro.
+
+ * config/tc-alpha.c (build_operate_n, build_mem): Moved earlier in
+ the file.
+ (load_symbol_address, load_expression): Use build_mem.
+ (build_operate): New function.
+ (emit_addq_r): Use it.
+
+ Wed Mar 13 22:14:14 1996 Pat Rankin <rankin@eql.caltech.edu>
+
+ * symbols.c (colon): #if VMS, use S_SET_OTHER to store `const_flag'.
+
+ Tue Mar 5 14:31:45 1996 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/tc-vax.h (NOP_OPCODE): Define.
+
+ Sun Feb 4 21:01:03 1996 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/obj-vms.h (S_IS_COMMON): Define.
+ (S_IS_LOCAL): Check for \002 as well as \001.
+ (LONGWORD_ALIGNMENT): New macro.
+ (SUB_SEGMENT_ALIGN): Use it.
+
+ Fri Jan 26 17:44:09 1996 Pat Rankin <rankin@eql.caltech.edu>
+
+ * config/vms-conf.h: Reconcile with conf.in.
+
+Wed Jun 19 11:31:50 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (is_dnrange): Only define if TC_GENERIC_RELAX_TABLE is
+ defined.
+
+ * doc/as.texinfo: Document that any number of hex digits can
+ follow \x.
+
+ * as.c (struct defsym_list): Define.
+ (defsyms): New static variable.
+ (parse_args): Just put --defsym arguments on defsyms list, rather
+ than defining them.
+ (main): Define defsyms after output file is created.
+
+ * config/tc-m68k.c (m68k_ip): Reject PRE and POST indexing mode on
+ cpu32. From Eric Norum <Eric.Norum@usask.ca>.
+
+ * config/tc-mips.c (mips_ip): In cases 'I', 'i', and 'j', set
+ insn_error rather than calling check_absolute_expr.
+
+ * as.c (emulation_name): Remove unused static variable.
+ (default_emul_bfd_name): Add return NULL to avoid warning.
+ * ecoff.c (ecoff_stab): Remove unused variables name and
+ name_end.
+ * frags.c (frag_new): Remove unused variable tmp.
+ * hash.c (hash_grow): Parenthesize + within <<.
+ (hash_print_statistics): Use %lu, not %d, to print unsigned
+ long variables.
+ * messages.c: Include "libiberty.h".
+ (fprint_value): Add cast to avoid printf warning.
+ (sprint_value): Likewise.
+ * read.c: Include "ecoff.h".
+ (emit_expr): Add casts to avoid printf warnings.
+ * read.h: Use extern for function declarations.
+ (pop_insert): Declare.
+ * stabs.c: Include "ecoff.h".
+ * subsegs.c (subseg_set_rest): Remove unused variables tmp,
+ former_last_fragP, and new_fragP.
+ * subsegs.h (subsegs_print_statistics): Declare.
+ * symbols.c (debug_verify_symchain): Change macro to discard
+ arguments.
+ * write.c (dump_section_relocs): Likewise.
+ * write.h: Use extern for function declarations.
+ (write_print_statistics): Declare.
+ * config/e-mipsecoff.c (mipsecoff_bfd_name): Return NULL to avoid
+ warning.
+ * config/e-mipself.c (mipself_bfd_name): Likewise.
+ * config/obj-elf.h (elf_ecoff_set_ext): Declare.
+
+ * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): If OBJ_ELF, always
+ emit relocations against external symbols.
+
+ * config/tc-alpha.c (tc_gen_reloc): Output a sensible error
+ message if bfd_reloc_type_lookup fails, rather than calling
+ assert.
+
+ * config/tc-alpha.c (alpha_force_relocation): Add
+ BFD_RELOC_12_PCREL to switch.
+
+Tue Jun 18 20:29:57 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-i386.h (LOCAL_LABEL,FAKE_LABEL_NAME): Use defaults for
+ TE_PE (Lfoo, not .Lfoo).
+
+Tue Jun 18 17:13:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_fill): Don't warn about a zero repeat count.
+
+ * config/tc-mips.c (mips_ip): Don't warn about using AT as a
+ coprocessor register.
+
+ * config/tc-i386.c (md_assemble): When checking the size of a
+ register to set the size of an instruction, do a bitwise and with
+ Reg8 and Reg16 rather than requiring the type to be exactly Reg8
+ or Reg16.
+
+Tue Jun 18 13:19:51 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * config/tc-h8300.c (parse_reg): Tweak error messages.
+ (build_bytes): Likewise.
+ (skip_colonthing): Handle :32 suffix.
+ (get_specific): Promote L_24 to L_32 if it makes a match.
+ Don't always promote L_8 to L_16.
+ (do_a_fix_imm): Clean up L_32 and L_24 handling.
+
+ * config/tc-h8300.c (Smode): New variable.
+ (h8300hmode): Turn off Hmode.
+ (h8300smode): New function. Turn on Smode and Hmode.
+ (md_pseudo_table): New ".h8300s" pseudo-op.
+ (parse_reg): Handle "exr" register.
+ (get_operand): Handle bizarre syntax for "stm.l" and "ldm.l".
+ Handle "mach" and "machl" operands for ldmac.
+ (get_specific): Handle "stm.l" and "ldm.l".
+ (build_bytes): Handle "stm.l" and "ldm.l"; handle MACREG operands.
+ * config/tc-h8300.h (COFF_MAGIC): Handle H8/S magic number.
+ (Smode): Declare.
+
+Mon Jun 17 15:50:53 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * doc/as.texinfo: Reorder chapter of machine dependent options so
+ that it is sorted by chip name.
+
+ * doc/as.texinfo: Use consistant spelling of Vax.
+ * doc/c-vax.texi: Likewise.
+
+Mon Jun 17 11:26:56 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * config/tc-hppa.c (md_pseudo_table): Add ".begin_try" and ".end_try"
+ pseudo ops.
+ (tc_gen_reloc, SOM version): Handle R_BEGIN_TRY and R_END_TRY.
+ (md_apply_fix): Likewise.
+ (pa_try): New function.
+ (hppa_force_relocation): Force relocs for BEGIN_TRY and END_TRY.
+
+Sun Jun 16 22:57:47 1996 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * config/tc-hppa.c (md_pseudo_table): Add ".level" pseudo op.
+ (pa_level): New function.
+
+Fri Jun 14 20:06:44 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * listing.c (listing_newline): Don't do anything if listing is 0.
+
+Thu Jun 13 17:50:54 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * subsegs.c (section_symbol): If symbol_table_frozen is set, call
+ symbol_create, not symbol_new.
+
+Wed Jun 12 14:10:44 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (adjust_reloc_syms): Don't set sy_used_in_reloc for an
+ absolute symbol unless TC_FORCE_RELOCATION returns true.
+
+ * config/obj-coff.c (previous_file_symbol): Remove BFD_ASSEMBLER
+ version.
+ (c_dot_file_symbol): BFD_ASSEMBLER version: Don't set the value of
+ the symbol to a pointer. Don't set previous_file_symbol.
+ Simplify symbol list rearrangement.
+ (coff_frob_symbol): Don't do anything with C_FILE symbols.
+ (coff_adjust_symtab): Don't check previous_file_symbol.
+
+Mon Jun 10 14:52:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_lcomm): New function for .lcomm
+ directive.
+ (md_pseudo_table): Add ppc_elf_lcomm.
+
+Mon Jun 10 11:45:51 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Accept ABSL for 'O', so that `bfextu
+ d0{24:1},d0' works without an immediate prefix on the bit numbers.
+ (md_begin): Add digits to alt_notend_table.
+ (md_parse_option): Make s a const pointer.
+
+ * config/tc-sparc.c (md_pseudo_table): Add "empty".
+ (s_empty): New static function.
+
+ * config/obj-coff.c (struct filename_list): Only define if not
+ BFD_ASSEMBLER.
+ (filename_list_head, filename_list_tail): Likewise.
+ (c_section_symbol): Remove unused BFD_ASSEMBLER version.
+ (obj_coff_endef, BFD_ASSEMBLER version): Don't set the debugging
+ flag for C_MOS, C_MOE, C_MOU, or C_EOS symbols, since they should
+ have a section of N_ABS rather than N_DEBUG. If we do a merge,
+ remove the new symbol from the list.
+ (obj_coff_endef, both versions): Call tag_insert even if there is
+ an old symbol with the same name, if the old symbol does not
+ happen to be a tag.
+ (coff_frob_symbol): Check SF_GET_TAG, C_EOF, and C_FILE outside of
+ the SF_GET_DEBUG condition. Don't call SA_SET_SYM_ENDNDX with a
+ symbol that will be moved to the end of the symbol list.
+ (coff_adjust_section_syms): Always call section_symbol for .text,
+ .data, and .bss.
+ (coff_frob_section): Likewise. Also, remove unused variable
+ strname.
+
+ * config/tc-ns32k.c (convert_iif): Call frag_grow rather than
+ manipulating frags directly.
+ (md_number_to_field): Adjust mem_ptr correctly if ENDIAN is
+ defined.
+
+ * app.c (do_scrub_chars): If '/' is LINE_COMMENT_START, check
+ whether the next character is '*' before checking whether we are
+ at the start of a line. Permit LINE_COMMENT_START to start a
+ comment in state 1 (seen some whitespace) as well, to match the
+ documentation.
+
+ * gasp.c (do_align): Permit a fill value for .align.
+
+Wed Jun 5 17:09:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (next_char_of_string): Warn if a newline is seen in the
+ middle of a string. Call bump_line_counters when appropriate.
+
+Wed Jun 5 17:08:36 1996 Richard Henderson <rth@tamu.edu>
+
+ * symbols.c (colon): Use LOCAL_LABEL.
+
+Tue Jun 4 10:55:16 1996 Tom Tromey <tromey@csk3.cygnus.com>
+
+ * Makefile.in (install): Don't check to see if tooldir exists.
+ Make $(tooldir) and $(tooldir)/bin.
+
+Tue Jun 4 10:14:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/ppc-sol.mt (TDEFINES): Don't turn on -mregnames by
+ default.
+
+Mon Jun 3 11:34:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): Don't call as_warn if we are setting
+ insn_error. Don't put the string "ERROR" in insn_error. Set
+ insn_error rather than calling as_warn for an unsupported opcode.
+
+Sat Jun 1 21:51:55 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_parse_option): Check for a 64 bit format
+ before permitting -64.
+ * output-file.c (output_file_create): Remove duplicate
+ bfd_perror.
+
+Fri May 31 01:08:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (md_begin): If -64, create a .MIPS.options
+ section rather than a .reginfo section.
+ (mips_elf_final_processing): If -64, write out 64 bit RegInfo
+ information.
+
+ * config/tc-mips.c (load_register): If mips_isa < 3, permit a 32
+ bit value with the high bit set.
+
+Thu May 30 19:00:19 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_lcomm): Set section flags for .sbss section.
+
+ * config/tc-mips.c (mips_64): New static variable.
+ (mips_target_format): If mips_64, return elf64 targets rather than
+ elf32 ones.
+ (md_longopts): Add "32" and "64".
+ (md_parse_option): Handle -32 and -64.
+ (md_show_usage): Mention -32 and -64.
+ (cons_fix_new_mips): If mips_64, don't convert an 8 byte reloc to
+ a 4 byte one.
+
+Thu May 30 10:36:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (comment_chars): Make '!' a comment character
+ for Solaris compatibility.
+
+ * stabs.c (s_stab_generic): Under PowerPC Solaris, convert a
+ .stabd with 4 arguments into a .stabn.
+
+Wed May 29 16:43:16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro): When passing X_add_number to
+ macro_build, cast it to int first.
+
+Tue May 28 13:29:39 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-z8k.c (md_apply_fix): Handle fx_r_type of 0, as
+ created by emit_expr.
+
+ * symbols.c (symbol_create): If bfd_make_empty_symbol fails, call
+ as_perror rather than assert.
+
+Fri May 24 18:24:11 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): Mark sections created to hold
+ floating point information as read only.
+
+Fri May 24 12:07:54 1996 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * config/tc-ppc.c (ppc_set_cpu): Change defaults to match AIX.
+
+Thu May 23 17:34:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * read.c (potable): Add .skip as a synonym for .space.
+
+ * stabs.c (s_stab_generic): For PowerPC ELF, allow .stabd to take
+ 4 arguments, providing the 4th argument is 0, to allow
+ compatibility with the Solaris assembler.
+
+Thu May 16 15:51:48 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.h (struct sh_segment_info_type): Define.
+ (TC_SEGMENT_INFO_TYPE): Define.
+ (sh_frob_label): Declare.
+ (tc_frob_label): Define.
+ (sh_flush_pending_output): Declare.
+ (md_flush_pending_output): Define.
+ * config/tc-sh.c (md_assemble): If relaxing, emit a R_SH_CODE
+ reloc before the instruction if necessary.
+ (sh_frob_label): New function.
+ (sh_flush_pending_output): New function.
+ (sh_coff_frob_file): Ignore ALIGN, CODE, DATA, and LABEL relocs
+ when looking for the reloc for the target of .uses.
+ (md_convert_frag): Fix printf format (%0xlx to 0x%lx).
+ (sh_force_relocation): Force CODE, DATA, and LABEL relocs to be
+ emitted.
+ (md_apply_fix): Ignore CODE, DATA, and LABEL relocs.
+ (sh_coff_reloc_mangle): Force CODE, DATA, and LABEL relocs to use
+ the absolute symbol.
+
+ * subsegs.h (segment_info_type): Add tc_segment_info_data field if
+ TC_SEGMENT_INFO_TYPE is defined.
+
+Wed May 15 12:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (md_assemble): Make sure the opcode suffix
+ matches the register size.
+
+Wed May 15 08:33:37 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/obj-coff.c (count_entries_in_chain): Ignore Fixups with
+ fx_done set.
+ (do_relocs_for): Likewise.
+ (fixup_segment): Don't just quit if linkrelax is set. Try to
+ apply non pc-relative sym1-sym2 fixups, even if linkrelax is
+ nonzero.
+
+Fri May 10 14:16:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Allow GOT and section
+ relative relocations with -mrelocatable. Also allow unfixed
+ relocs in .ex_shared.
+
+Tue May 7 11:24:10 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (yank_symbols): Check that FNAME_OFFSET is
+ non-zero before assuming this is a long file name.
+ (w_strings): Likewise.
+ (c_dot_file_symbol): Set FNAME_OFFSET to 1 for a long file name.
+
+ * config/obj-coff.c (w_strings): Move declaration of i inside
+ #ifdef block which uses it.
+
+Tue May 7 00:49:58 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (do_a_fix_imm): Rename last argument to
+ "relaxmode". Output relocs which identify various relaxing
+ possibilities for mov.[bwl] instructions.
+ (build_bytes): Pass in a relaxing mode to do_a_fix_imm.
+
+Mon May 6 15:26:28 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-arm.h (TC_HANDLES_FX_DONE): Define.
+ (MD_APPLY_FIX3): Define.
+ * config/tc-arm.c (my_get_expression): Only watch for bad segments
+ if OBJ_AOUT.
+ (md_apply_fix3): Renamed from md_apply_fix.
+ If pcrel reloc and symbol is in different section, undo effects
+ of md_pcrel_from.
+
+Sat May 4 12:49:35 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust
+ any reloc with an LR% or RR% field selector for SOM.
+
+Sat May 4 11:26:19 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Add subsegs.h to appropriate TARG_CPU_DEP_*
+ variables.
+
+Fri May 3 17:58:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (coff_frob_symbol): Don't merge a symbol with
+ SF_GET_STATICS set.
+ (yank_symbols): Likewise.
+
+Wed May 1 13:38:17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * subsegs.h (segment_info_type): If MANY_SEGMENTS and not
+ BFD_ASSEMBLER, add name field.
+ * config/obj-coff.c: Include "libiberty.h".
+ (coff_header_append): Handle long section names.
+ (crawl_symbols): Just use the name field for the symbol name,
+ without worrying about null byte termination.
+ (w_strings): Handle long section names.
+ (write_object_file): Likewise. Also, use the name field, rather
+ than scnhdr.s_name.
+ (obj_coff_add_segment): Permit long section names.
+ (obj_coff_init_stab_section): Use the name field, rather than
+ scnhdr.s_name.
+ (adjust_stab_section): Likewise.
+ * config/te-pe.h (COFF_LONG_SECTION_NAMES): Define.
+
+ * config/tc-i960.c (brtab_emit): Don't set fx_im_disp field.
+ (mem_fmt): Likewise.
+ (md_apply_fix): Don't check fx_im_disp field.
+
+Thu Apr 25 11:39:51 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add * after sparc*-*-vxworks.
+ * configure: Rebuild.
+
+ * app.c (do_scrub_begin): If tc_comment_chars is not defined,
+ define it to comment_chars. Use tc_comment_chars rather than
+ comment_chars.
+ (do_scrub_chars): Use tc_comment_chars rather than comment_chars.
+ * config/tc-m68k.h (tc_comment_chars): Define.
+ (m68k_comment_chars): Declare.
+ * config/tc-m68k.c (m68k_comment_chars): Rename from
+ comment_chars. Change into a pointer rather than an array.
+ (md_longopts): Add "bitwise-or".
+ (md_parse_option): Handle OPTION_BITWISE_OR.
+ (md_show_usage): Mention --bitwise-or.
+ * doc/c-m68k.texi: Document --bitwise-or.
+
+Wed Apr 24 11:28:38 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Prevent attempts to use long offsets
+ in 68000 mode.
+
+ * config/obj-coff.c (obj_coff_section): BFD_ASSEMBLER version:
+ call demand_empty_rest_of_line. Non BFD_ASSEMBLER version:
+ correct handling of input line pointer, and call
+ demand_empty_rest_of_line.
+
+Mon Apr 22 18:02:37 1996 Doug Evans <dje@blues.cygnus.com>
+
+ * config/tc-sparc.c (in_bitfield_range): New static function.
+ (sparc_ip): New cases X,Y. Use SPARC_OPCODE_ARCH_V9_P.
+ (md_apply_fix, cases BFD_RELOC_32_PCREL_S2,
+ BFD_RELOC_SPARC_{WDISP16,WDISP19}): Fix undefined code.
+ (md_apply_fix): New cases BFD_RELOC_SPARC_[56].
+ (tc_gen_reloc): New cases BFD_RELOC_SPARC_[56].
+
+Thu Apr 18 18:58:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c: BFD_ASSEMBLER:
+ (coff_last_bf): New static variable.
+ (coff_frob_symbol): Set endndx of a .bf symbol.
+ Non BFD_ASSEMBLER:
+ (obj_coff_endef): Call SF_SET_PROCESS on a .bf symbol.
+ (last_bfP): New static variable.
+ (yank_symbols): Set endndx of a .bf symbol.
+
+Thu Apr 18 11:53:58 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_parse_option): Add support for Solaris's -le
+ and -s options. Add -be for good measure.
+
+Wed Apr 17 12:31:01 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_space): Support non-constant fill value. Handle fill
+ value correctly for a size other than 1.
+
+Tue Apr 16 15:17:40 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-arm.c (my_get_float_expression): Update call to
+ gen_to_words, X_PRECISION changed from 6 to 5.
+
+Tue Apr 16 10:25:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (register_name,reg_name_search): Move register
+ name lookup from PE specific code to all targets. Add support for
+ -mregnames/-mno-regnames to control whether register names are
+ expanded or not.
+ (md_assemble): Call register_name for all platforms.
+ (md_parse_option): Add support for -mregnames/-mno-regnames.
+
+ * configure.in (powerpcle*-*-solaris): Add support.
+ (powerpc*-*-linux): Ditto.
+ * configure: Regenerate.
+
+ * config/ppc-sol.mt: New config file for PowerPC Solaris.
+
+Mon Apr 15 12:26:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (mips_frob_file): Permit multiple %hi relocs to
+ be associated with a single %lo reloc.
+
+ * config/tc-mips.c (load_address): Cast X_add_number to valueT
+ before comparing against MAX_GPREL_OFFSET, so that negative
+ numbers are handled correctly.
+ (macro): Likewise.
+
+Thu Apr 11 12:39:02 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.c (last_insn): New static variable.
+ (md_assemble): Warn about putting floating point branches in a
+ delay slot. If architecture is less than v9, insert NOP
+ instructions between floating point instructions and floating
+ point branches. (The SunOS assembler does both these operations.)
+ Save the last instruction opcode.
+ (sparc_ip): Add pinsn parameter. Change caller.
+
+ * config/tc-m68k.c (md_estimate_size_before_relax): Correct check
+ for byte jump to next instruction to skip empty frags.
+
+Wed Apr 10 16:48:12 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-alpha.c (alpha_ip): If we are going to call emit_add64
+ for addq with a 16 bit signed value, just emit a lda instruction
+ instead.
+
+Wed Apr 10 14:34:49 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (do_a_fix_imm): Don't cut off high bits
+ of a 32bit operand.
+
+Mon Apr 8 14:42:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Permit --enable-shared to specify a list of
+ directories.
+ * configure: Rebuild.
+
+Fri Apr 5 17:01:35 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (get_specific): Remove some #if 0 code.
+ (build_bytes): Remove all ABSMOV related code; it's unnecessary.
+
+Fri Apr 5 15:13:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/atof-ieee.c: Fix handling of denormalized extended
+ precision numbers and overflow/underflow detection.
+ (MAX_PRECISION, X_PRECISION, P_PRECISION): Changed from 6 to 5, to
+ not include the 16 bit gap in the m68k extended precision format.
+
+Fri Apr 5 14:29:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add i386-*-freebsdelf* target; from John Polstra
+ <jdp@polstra.com>.
+ * configure: Rebuild.
+
+Fri Apr 5 18:39:28 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c: Allow non-zero offsets from .sdata symbols to
+ be accessed using the $gp register.
+ * config/tc-mips.h (MAX_GPREL_OFFSET): Added.
+
+Wed Apr 3 10:56:14 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c (sparc_md_end): Set bfd machine number to
+ bfd_mach_sparc_sparclet if current_architecture is sparclet.
+
+Mon Apr 1 16:55:44 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (get_line_sb): Bump line counters based on
+ input_line_pointer[-1], not *input_line_pointer. Don't bother to
+ call LISTING_NEWLINE.
+ (s_macro): Don't call demand_empty_rest_of_line.
+ * app.c (do_scrub_chars): When handling C style comments, unget
+ ch2 rather than ch.
+
+Fri Mar 29 16:15:06 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.h (enum linkonce_type): Define.
+ (s_linkonce): Declare.
+ * read.c (potable): Add "linkonce".
+ (s_linkonce): New function.
+ * subsegs.h (segment_info_type): Add linkonce field to
+ MANY_SEGMENTS && ! BFD_ASSEMBLER section.
+ * config/obj-coff.h (obj_handle_link_once): Define if TE_PE.
+ (obj_coff_pe_handle_link_once): Declare if TE_PE.
+ * config/obj-coff.c: If TE_PE and not BFD_ASSEMBLER, #include
+ "coff/pe.h".
+ (obj_coff_pe_handle_link_once): New function, defined if TE_PE.
+ (c_section_symbol): If TE_PE, set the x_comdat field in the aux
+ entry based on the linkonce field in segment_info.
+ * doc/as.texinfo: Document .linkonce.
+
+Fri Mar 29 11:31:27 1996 J.T. Conklin (jtc@lisa.cygnus.com)
+
+ * doc/as.1: Changed to be recognized by catman -w on Solaris.
+
+Thu Mar 28 15:27:47 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * stabs.c (s_stab_generic): Call the listing functions before
+ doing the rest of the processing, which may involve freeing the
+ string. Pass string, not string + stroff, to OBJ_PROCESS_STAB in
+ SEPARATE_STAB_SECTIONS case.
+
+ * config/tc-hppa.c: Remove nested comment.
+ (tc_gen_reloc): Move label done inside the ifdef in which it is
+ used.
+ (md_apply_fix): Pass pointers to correct types to libhppa.h
+ functions. Always return a value.
+
+ * config/tc-mips.h (tc_frob_file): Define.
+ (mips_frob_file): Declare.
+ * config/tc-mips.c (struct mips_hi_fixup): Define.
+ (mips_hi_fixup_list): New static variable.
+ (imm_unmatched_hi): New static variable.
+ (md_assemble): Clear imm_reloc, imm_unmatched_hi, and
+ offset_reloc. Pass imm_unmatched_hi to append_insn.
+ (append_insn): Add unmatched_hi parameter. If it is set, add the
+ new fixup to mips_hi_fixup_list. Change all callers.
+ (mips_ip): Set imm_unmatched_hi when appropriate.
+ (mips_frob_file): New function.
+
+Thu Mar 28 11:47:59 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (sparc-*-solaris2*): Renamed from sparc*-*-solaris2*.
+ * configure: Regenerated.
+
+Tue Mar 26 18:19:12 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.c (main): Call bfd_set_error_program_name.
+
+Fri Mar 22 11:13:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.h (strdup): Don't declare.
+ * stabs.c: Include libiberty.h
+ (get_stab_string_offset): Use xstrdup rather than strdup.
+ (s_stab_generic): Likewise.
+ * as.c (parse_args): Likewise.
+ * read.c (s_mri_sect): Likewise.
+
+ * gasp.c (change_base): Recognize \(...) construct documented to
+ pass through enclosed characters literally through to the output.
+ (process_assigns): Likewise. Also, be more careful to avoid
+ looking past the end of the buffer.
+
+Thu Mar 21 13:18:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (md_parse_option): If OBJ_ELF, ignore -k for
+ FreeBSD compatibility. From John Polstra <jdp@polstra.com>.
+
+Wed Mar 20 18:13:32 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * doc/as.texinfo, doc/c-i960.texi: Fix typos.
+
+Wed Mar 20 17:05:16 1996 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * config/alpha-opcode.h: Added cvtst instruction.
+
+Mon Mar 18 13:12:46 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (ecoff_stab): Don't try to make a symbol out of the stab
+ string. Extract the addend from the result of expression.
+
+Fri Mar 15 17:10:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): If whitespace is seen in state 11, and
+ LABELS_WITHOUT_COLONS is not defined, and we are not in m68k MRI
+ mode, change the state to 3 rather than 1.
+
+Thu Mar 14 18:18:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.h (C_REGISTER_SECTION): Change from 20 to 50, to
+ correspond to 11 March change.
+
+Thu Mar 14 15:27:10 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (build_bytes, MEMIND case): Generate
+ an R_MEM_INDIRECT reloc rather than R_RELBYTE.
+
+Tue Mar 12 12:21:10 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Rebuild with autoconf 2.8.
+
+Mon Mar 11 18:57:12 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/atof-ieee.c (gen_to_words): Improve handling of
+ X_PRECISION numbers. Based on patches from Andreas Schwab
+ <schwab@issan.informatik.uni-dortmund.de>.
+
+Mon Mar 11 09:59:53 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * as.h (SEG_NORMAL, SEG_LIST): Bump segment limit from 10 to 40.
+ (SEG_LAST): New.
+ * subsegs.c (MANY_SEGMENTS): Increase segment limit.
+ * obj-coff.c (seg_N_TYPE, seg_info_off_by_4): Likewise.
+ (do_relocs_for, w_symbols, obj_coff_add_segment, do_linenos_for,
+ crawl_symbols, coff_header_append): Loop to SEG_LAST rather than
+ SEG_E9.
+
+Thu Mar 7 15:17:39 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (sparc_ip): Handle operand char 'O' (neg reg).
+
+Thu Mar 7 09:19:15 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (SUBSEG_MILLI): Define.
+ (pa_def_subspaces): Add $MILLICODE$.
+ (pa_spaces_begin): Set section flags for $MILLICODE$.
+
+Wed Mar 6 14:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (obj_elf_section): Only SEC_LOAD if the type is
+ not SHT_NOBITS. Don't tamper with flags based on type if a
+ special section was found (revert Feb 29 change).
+
+ * config/tc-sh.c (sh_do_align): Only align using the nop pattern
+ if aligning to a longword boundary or greater.
+
+Tue Mar 5 15:10:43 1996 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * config/tc-sh.c (sh_do_align): Pass 1 not 2 to frag_align.
+
+Mon Mar 4 20:50:57 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in (i386-*-cygwin32): Don't use bfd_gas.
+ * configure: Regenerated.
+
+Mon Mar 4 10:13:06 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c: Add default definitions for R_N0SEL and
+ R_N1SEL since they're not defined for old versions of hpux.
+
+ * config/tc-hppa.c (tc_gen_reloc): Fix typo in R_COMP2 code.
+ Set "sym_ptr_ptr" and "addend" fields to dummy values for
+ R_N0SEL and R_N1SEL.
+
+Fri Mar 1 10:20:52 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * flonum-konst.c: Add two more constants for 1e+-2048 and
+ 1e+-4096, and correct the other constants.
+
+ * symbols.c (resolve_symbol_value): Handle O_logical_not.
+
+Thu Feb 29 13:58:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/obj-elf.c (obj_elf_section): Allow predefined section
+ types to set the nobits type. Avoid a shadowed declaration.
+
+Wed Feb 28 15:38:56 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (hppa_fix_adjustable): For SOM, don't
+ reduce relocs using e_nlrsel field selectors.
+
+ * write.c (fix_new_exp): Don't use #elif. Some compilers
+ don't handle it.
+
+ * config/tc-hppa.c (selector_table): Add "n", "nl", and "nlr" to
+ the selector table.
+ (pa_chk_field_selector): Handle new field selectors for SOM.
+
+Tue Feb 27 14:42:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * configure.in (m68k-*-linux*aout*, m68k-*-linux*): New targets.
+ * configure: Rebuild.
+ * config/te-linux.h (LOCAL_LABELS_FB): Define.
+ * config/tc-m68k.h (TARGET_FORMAT) [TE_LINUX]: Define to
+ "a.out-m68k-linux".
+ * config/tc-m68k.c (comment_chars): Don't include '#' if TE_LINUX
+ is defined.
+
+Mon Feb 26 18:58:58 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mpw-make.sed: Update to handle shared library support.
+
+Mon Feb 26 10:34:10 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (sparc_ip): Print all architectures that support
+ the insn on mismatch.
+
+Fri Feb 23 21:44:39 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Add support for a29-coff.
+ * configure: Rebuild.
+
+Thu Feb 22 16:39:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (sh_coff_frob_file): Don't consider the address
+ of the section when looking for the R_SH_USES fixup, because the
+ frag addresses have not yet been adjusted.
+
+ * gdbinit.in: Set a breakpoint on as_warn_where.
+
+ * config/tc-mips.c (macro): Add missing arguments to macro_build
+ omitted in last change. From Jim Wilson <wilson@cygnus.com>.
+
+Wed Feb 21 17:00:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-h8300.c (tc_reloc_mangle): Change reloc based on size
+ if it is TC_CONS_RELOC. Set a size of 4 to R_RELLONG.
+
+Wed Feb 21 09:25:39 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (sparc_ip): Recognize %asr0 for v8.
+
+Tue Feb 20 21:48:03 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (parse_keyword_arg): Accept leading '%'.
+ (sparc_ip): Accept %asr[1..31] for v8 and %asr[%16..31] for v9.
+ Recognize [uU] format args as sparclet cpregs.
+
+Tue Feb 20 22:25:55 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (sh_handle_align): Don't emit R_SH_ALIGN relocs
+ in bss_section.
+
+Mon Feb 19 14:16:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): Check S_IS_WEAK as
+ well as S_IS_EXTERNAL.
+ (tc_fix_adjustable): Likewise.
+ * config/tc-sparc.c (md_apply_fix): In OBJ_ELF case, check for
+ S_IS_WEAK as well as S_IS_EXTERNAL when deciding whether to return
+ early.
+ (tc_gen_reloc): Check S_IS_WEAK as wel as S_IS_EXTERNAL when
+ deciding whether to convert BFD_RELOC_32_PCREL_S2 if PIC.
+
+Mon Feb 19 02:15:57 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (max_architecture): Change to sparclite for
+ 32 bit arch.
+ (default_compatible): Delete.
+ (sparc_ffs): New function.
+ (md_begin): Only call SPARC_OPCODE_CONFLICT_P once.
+ (sparc_ip): Rewrite architecture match and bump logic.
+
+Sun Feb 18 15:03:50 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Check for 'do not mix' from native linker before
+ trying to use -rpath.
+ * configure: Rebuild.
+
+Fri Feb 16 16:53:31 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.h (SF_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
+ (SF_GET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
+ (SF_SET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
+ * config/obj-coff.c (obj_coff_endef): Set ADJ_LNNOPTR when LNNOPTR
+ is set.
+ (w_symbols): If ADJ_LNNOPTR is set, add the section lnnoptr field
+ to the symbol lnnoptr field, to get the correct file offset.
+
+Thu Feb 15 14:48:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/obj-elf.c (elf_frob_symbol): On the PowerPC, force all
+ symbols that are not function, file, or section symbols to be
+ object types.
+
+Thu Feb 15 11:20:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure: Set and substitute RPATH_ENVVAR.
+ * configure: Rebuild.
+ * Makefile.in (RPATH_ENVVAR): New variable.
+ (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
+
+ * configure.in: Accept i686. From H.J. Lu <hjl@zoom.com>: i386
+ doesn't need opcodes. If configuring shared, opcodes needs bfd.
+ * configure: Rebuild.
+
+Wed Feb 14 16:33:12 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
+
+ * read.c (s_mri_sect): Don't return '\0' in type. Set all
+ appropriate flags in BFD section.
+
+ * configure.in (m68k-*-psos*): New target.
+ * configure: Rebuild.
+ * config/te-psos.h: New file.
+ * config/tc-m68k.c (comment_chars): Don't include '#' if TE_PSOS
+ is defined.
+
+Wed Feb 14 13:43:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ From Alan Modra <alan@spri.levels.unisa.edu.au>:
+ * configure.in: Remove duplicate setting of cpu_type. Check
+ whether opcodes library is required for on all targets, not just
+ primary one.
+ * configure: Rebuild.
+
+ * config/tc-mips.c (mips_big_got): New static variable.
+ (s_extern): Don't declare.
+ (reg_needs_delay): New static function.
+ (macro_build): Permit GOT/CALL_HI/LO relocs.
+ (macro_build_lui): If place is not NULL, use the number in the
+ expression.
+ (load_address): Handle mips_big_got case.
+ (macro): Handle mips_big_got for M_LA_AB, M_JAL_A, and load and
+ store macros.
+ (OPTION_XGOT): Define.
+ (md_longopts): Add "xgot" if OBJ_ELF.
+ (md_parse_option): Handle -xgot.
+ (md_show_usage): Mention -xgot.
+ (md_apply_fix): Permit GOT/CALL_HI/LO relocs.
+ (tc_gen_reloc): Handle GOT/CALL_HI/LO relocs.
+
+Wed Feb 14 11:22:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * config/tc-m68k.c (m68k_ip) [operand kind '#']: When fixing
+ the byte relocation, point it to the low byte of the word.
+
+Tue Feb 13 15:31:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set HDLFLAGS for *-*-hpux with --enable-shared.
+ * configure: Rebuild.
+
+Mon Feb 12 15:53:46 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * configure.in: Recognize any sparc* cpu.
+ * configure: Regenerated.
+
+Mon Feb 12 15:41:21 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (potable): Add "mri" and ".mri".
+ (s_mri): New function.
+ * read.h (s_mri): Declare.
+ * app.c (scrub_m68k_mri): New static variable.
+ (mri_pseudo): New static variable.
+ (do_scrub_begin): Add m68k_mri parameter. Use it rather than
+ flag_m68k_mri. Initialize scrub_m68k_mri.
+ (mri_state, mri_last_ch): New static variables.
+ (struct app_save): Add scrub_m68k_mri, mri_state, and mri_last_ch
+ fields.
+ (app_push): Save new fields.
+ (app_pop): Restore new fields.
+ (do_scrub_chars): Check scrub_m68k_mri rather than flag_mri_mri.
+ If TC_M68K, use a trivial state machine to look for occurrences of
+ the .mri pseudo-op, and change the mode appropriately.
+ * as.h (do_scrub_begin): Update prototype.
+ * input-scrub.c (input_scrub_begin): Pass flag_m68k_mri to
+ do_scrub_begin.
+ * config/tc-m68k.c (reg_prefix_optional_seen): New static
+ variable.
+ (m68k_mri_mode_change): New function.
+ (md_parse_option): Set reg_prefix_optional_seen.
+ * config/tc-m68k.h (m68k_mri_mode_change): Declare.
+ (MRI_MODE_CHANGE): Define.
+ * doc/as.texinfo: Document .mri pseudo-op.
+
+ * app.c (do_scrub_chars): In MRI mode, don't treat '#' as a
+ comment character.
+
+Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ Support for OBJ_ELF on m68k, mostly inside #ifdef OBJ_ELF:
+ * config/m68k-parse.h (enum pic_relocation): Define.
+ (struct m68k_exp): Add pic_reloc field.
+ * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
+ (tc_fix_adjustable): Define to call tc_m68k_fix_adjustable.
+ (NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
+ otherwise.
+ * config/tc-m68k.c: Delete definition of NO_RELOC.
+ (struct m68k_it): Add pic_reloc field.
+ (add_fix): Copy over pic_reloc field.
+ (md_pseudo_table): Interpret .align parameter as byte count.
+ (mote_pseudo_table): Likewise.
+ (tc_m68k_fix_adjustable): New function.
+ (get_reloc_code): New function.
+ (md_assemble): Use it as last argument to fix_new_exp.
+ (md_apply_fix_2): For a relocation against a symbol don't put the
+ addend into the data.
+ (tc_gen_reloc): Different addend computation for OBJ_ELF.
+ (m68k_ip): Don't relax an operand that requires pic relocation.
+ (md_begin): Align .text, .data and .bss on 4 byte boundary by
+ default.
+ * write.c (fixup_segment): Don't add symbol value to addend if
+ TC_M68K and OBJ_ELF.
+ * config/m68k-parse.y (yylex): Handle @PLTPC, etc.
+ (motorola_operand): Add rule for `(zapc, EXPR)'.
+
+Mon Feb 12 10:07:33 1996 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * ecoff.c (ecoff_directive_weakext): Fixed so that whitespace
+ *really* is permissible before the comma.
+
+Mon Feb 12 00:12:13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (sh_do_align): Align to a 2 byte boundary before
+ inserting nop instructions.
+
+Fri Feb 9 10:54:19 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/te-aux.h: Change include of aux.h to aux-coff.h.
+
+Thu Feb 8 20:02:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i960.c (tc_coff_symbol_emit_hook): Correct storage
+ class setting for a CALLNAME symbol in COFF.
+
+ * read.c (potable): Pass negative numbers for new .balign[wl] and
+ .p2align[wl] pseudo-ops.
+ (s_align_bytes): Treat a negative argument as specifying the fill
+ length.
+ (s_align_ptwo): Likewise.
+
+Wed Feb 7 14:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (potable): Add balignw, balignl, p2alignw, and p2alignl.
+ (do_align): Take new len parameter. Change all callers. Pass it
+ to md_do_align.
+ (s_align_bytes): Arg now indicates the length of the fill pattern.
+ (s_align_ptwo): Likewise.
+ * config/obj-coff.c (write_object_file): Pass length to
+ md_do_align.
+ * config/tc-i386.h (md_do_align): Take new len parameter.
+ * config/tc-m88k.h (md_do_align): Likewise.
+ * config/tc-m88k.c (m88k_do_align): Likewise.
+ * config/tc-sh.h (md_do_align): Likewise.
+ * config/tc-sh.c (sh_do_align): Likewise.
+ * doc/as.texinfo: Document new pseudo-ops.
+
+ * config/obj-coff.c (fixup_mdeps): Divide offset by fr_var, as is
+ done in cvt_frag_to_fill.
+
+ * config/tc-sh.h (sh_do_align): Declare.
+ (md_do_align): Define.
+ * config/tc-sh.c (sh_do_align): New function.
+
+ * ecoff.c (ecoff_build_lineno): Don't try to store the address
+ difference if the next address is before the current one.
+
+ * config/tc-m68k.c (struct m68k_cpu): Add alias field.
+ (archs): Initialize new field.
+ (m68k_ip): Don't list alias names when listing CPUs which support
+ an instruction.
+
+ * as.c (main): Call parse_args before read_begin.
+ * app.c (do_scrub_chars): If flag_m68k_mri, don't put a dot in
+ front of generated pseudo-ops.
+ * read.c (potable): Ignore "name".
+ (s_app_file): Permit a single quote after the string, since one
+ may appear in m68k MRI mode.
+
+ * configure.in: Check for --enable-shared. If linking against
+ shared BFD and opcodes, fix library name on SunOS, and try to set
+ -rpath reasonably.
+ * configure: Rebuild.
+
+Tue Feb 6 15:16:17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.h (flag_m68k_mri): Declare.
+ * as.c (parse_args): If TC_M68K, set flag_m68k_mri for -M.
+ * Many files: For MRI syntax that is specific to the m68k MRI
+ assembler, check flag_m68k_mri rather than flag_mri or
+ MRI_MODE_NEEDS_PSEUDO_DOT.
+
+Mon Feb 5 16:29:11 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i960.c (ARCH_HX): Define.
+ (arch_tab): Add HX.
+ (targ_has_sfr): Handle ARCH_HX.
+ (targ_has_iclass): Handle ARCH_HX.
+ (tc_coff_fix2rtype): Add return 0 to avoid warning.
+ (tc_headers_hook): If the architecture was specified explicitly,
+ use it when setting the flags. Set the extern variable coff_flags
+ rather than headers->filehdr.f_flags, since the latter is set
+ unconditionally in obj-coff.c.
+ (i960_handle_align): Remove unused variable fixp.
+
+ Support for building bfd and opcodes as shared libraries, based on
+ patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
+ * configure.in: Set OPCODES and BFD to search directories.
+ Substitute OPCODES_DEP and BFDDEP. On SunOS, set HLDFLAGS.
+ * configure: Rebuild.
+ * Makefile.in (LDFLAGS, HLDFLAGS): New variables.
+ (LIBDEPS): New variable.
+ (as.new0: Depend upon $(LIBDEPS) rather than $(LIBS). Use
+ $(HLDFLAGS) in link.
+ (check): Set LD_LIBRARY_PATH in the environment.
+
+Fri Feb 2 17:41:53 1996 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * config/tc-ppc.h (ELF_TC_SPECIAL_SECTIONS): Make .sdata2, .sbss2,
+ .PPC.EMB.sdata0, and .PPC.EMB.sbss0 sections all default to
+ read-only, not read/write.
+
+Fri Feb 2 14:09:25 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * Makefile.in (INSTALL_XFORM): Remove -e.
+
+Fri Feb 2 12:32:15 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (write_relocs): Use S_IS_DEFINED and S_IS_COMMON rather
+ than comparing S_GET_SEGMENT to undefined_section.
+ (write_object_file): Skip symbols which were equated to an
+ undefined or common symbol.
+ * symbols.c (resolve_symbol_value): Use S_IS_DEFINED and
+ S_IS_COMMON rather than comparing S_GET_SEGMENT to
+ undefined_section.
+ (S_GET_VALUE): Likewise. Avoid recursion problems if S_IS_DEFINED
+ or S_IS_COMMON call S_GET_VALUE.
+ * config/obj-aout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
+ * config/obj-aout.c (obj_emit_relocations): If a reloc is equated
+ to an undefined or common symbol, convert the reloc to be against
+ the target symbol.
+ (obj_crawl_symbol_chain): Skip symbols which were equated to an
+ undefined or common symbol.
+ * config/obj-bout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
+ * config/obj-bout.c (obj_emit_relocations): If a reloc is equated
+ to an undefined or common symbol, convert the reloc to be against
+ the target symbol.
+ (obj_crawl_symbol_chain): Skip symbols which were equated to an
+ undefined or common symbol.
+ * config/obj-coff.c (do_relocs_for): Use S_IS_DEFINED and
+ S_IS_COMMON rather than comparing S_GET_SEGMENT to
+ undefined_section.
+ (yank_symbols): Skip symbols which were equated to an undefined or
+ common symbol.
+
+Thu Feb 1 15:34:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-aout.h (S_IS_LOCAL): Check for \002 as well as \001.
+ * config/obj-bout.h (S_IS_LOCAL): Likewise.
+
+ * configure.in: Make sure we only add m68k-parse.o to
+ ${extra_objects} once, no matter how many m68k targets have been
+ enabled.
+ * configure: Rebuild.
+
+Wed Jan 31 18:31:46 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in (i386-*-cygwin32, ppc-*-cygwin32): New.
+ * configure: Rebuild.
+
+Wed Jan 31 14:03:17 1996 Richard Henderson <rth@tamu.edu>
+
+ * config/tc-m68k.c (md_pseudo_table): Add "extend" and "ldouble".
+ * doc/c-m68k.texi: Document .extend and .ldouble.
+
+ * configure.in (m68*-apple-aux*): New target.
+ * config/te-aux.h: New file.
+ * config/obj-coff.c (compare_external_relocs): New static function
+ if TE_AUX.
+ (do_relocs_for): Sort relocs if TE_AUX.
+ (fixup_segment): If TE_AUX, store common symbol value in segment.
+ * config/tc-m68k.h (TARGET_FORMAT): Define if TE_AUX.
+
+Wed Jan 31 12:24:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.h (S_IS_LOCAL): Check for \002 as well as \001.
+
+ * config/tc-mips.c (s_mips_globl): Set BSF_OBJECT if it is not
+ BSF_FUNCTION.
+ (s_cpload): Set BSF_OBJECT for _gp_disp symbol.
+ * read.c (s_lcomm): If S_SET_SIZE is defined, set the size of the
+ symbol.
+ * ecoff.c (add_procedure): Set the BSF_FUNCTION flag.
+ (ecoff_build_symbols): If S_SET_SIZE is defined, set the size of
+ an undefined symbol and the size of a function symbol.
+ * config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
+ for all common symbols.
+
+Tue Jan 30 12:35:24 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-i960.c (parse_memop): In MRI mode, don't use implicit
+ scaling of index.
+
+ * expr.c (operand): Accept 0x hex constants in MRI mode if not on
+ m68k.
+
+Mon Jan 29 12:21:30 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (obj_elf_type): Set BSF_OBJECT flag for a type
+ of object. From Ronald F. Guilmette <rfg@monkeys.com>.
+
+ * ecoff.c (localsym_t): Add addend field.
+ (add_ecoff_symbol): Add addend argument. Change all callers.
+ (coff_sym_value): Make static.
+ (coff_sym_addend): New static variable.
+ (ecoff_directive_def): Initialize coff_sym_addend.
+ (ecoff_directive_val): Accept symbol + constant.
+ (ecoff_directive_endef): Pass coff_sym_addend to add_ecoff_symbol.
+ (ecoff_build_symbols): Include the addend in the symbol value.
+
+Fri Jan 26 19:28:52 1996 Kim Knuttila <krk@cygnus.com>
+
+ * config/tc-ppc.c (md_assemble): Ignore overflow on
+ BFD_RELOC_16_GOTOFF and BFD_RELOC_PPC_TOC16.
+
+Fri Jan 26 16:14:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (md_apply_fix3): SDA21 relocations are now 4
+ bytes in size, so offset appropriately in big endian mode when
+ writing the bottom 2 bytes.
+
+Thu Jan 25 20:26:23 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (default_compatible): New static local.
+ (md_begin): Initialize it. Rewrite warn_on_bump handling.
+ (sparc_ip): If no architecture or -bump specified, don't mark as
+ mismatched those in default_compatible.
+
+Thu Jan 25 12:21:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ SCO ELF support from Robert Lipe <robertl@arnet.com>:
+ * configure.in (i386-*-sco*elf*): Use fmt elf, targ sco5.
+ * configure: Rebuild.
+ * config/sco5.mt: New file; set TDEFINES to -DSCO_ELF.
+ * config/tc-i386.c (sco_id): New function, if SCO_ELF.
+ * config/tc-i386.h (tc_init_after_args): Define if SCO_ELF.
+ (sco_id): Declare if SCO_ELF.
+
+Thu Jan 25 03:10:53 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (initial_architecture,can_bump_v9_p): Deleted.
+ ({max,warn_after}_architecture): New static locals.
+ (md_begin): Replace NUMOPCODES with sparc_num_opcodes.
+ If both architecture and -bump requested, set max_architecture to max.
+ (sparc_md_end): Simplify.
+ (sparc_ip): Replace references to can_bump_v9_p with max_architecture.
+ Rewrite code to bump architecture and check for conflicts.
+ (md_longopts): Recognize -xarch={v8plus,v8plusa} for compatibility
+ with Solaris assembler.
+ (md_parse_option): Likewise. Call sparc_opcode_lookup_arch.
+ (md_show_usage): Update.
+
+Wed Jan 24 22:11:03 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * Makefile.in (RUNTEST): Fix reference to $${srcdir}.
+
+Mon Jan 22 09:21:36 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.h (TARGET_FORMAT): Use #ifdef SPARC_ARCH64 instead of
+ #ifdef sparcv9 when choosing value.
+ (ENV64): Delete.
+ (md_end): Define.
+ (sparc_md_end): Declare.
+ * config/tc-sparc.c (SPARC_V9): Renamed from sparcv9.
+ (initial_architecture): New static local.
+ (can_bump_v9_p): Likewise.
+ (NO_V9): Delete all occurrences.
+ (sparc_md_end): New function.
+ (sparc_ip): New local v9_arg_p. Rework fp reg number test.
+ Don't bump architecture to v9 unless can_bump_v9_p set.
+ (md_parse_option): -A<arch> passed, set can_bump_v9_p accordingly.
+ * configure.in (sparc64 target cpu): Don't set obj_format here.
+ (SPARC_V9): Renamed from sparcv9.
+ (sparc64-*-elf*): Define SPARC_ARCH64.
+ * configure: Regenerated.
+ * acconfig.h (SPARC_V9): Renamed from sparcv9.
+ (SPARC_ARCH64): Add.
+ * conf.in: Regenerated.
+ * config/vmsconf.h: Update.
+
+Mon Jan 22 17:24:47 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * config/tc-mips.c (load_register): Optimise "dli" loads.
+ (md_show_usage): add "-mcpu=vr4100" to help text.
+
+Mon Jan 22 11:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): If a symbol is equated to an
+ undefined symbol, preserve the X_op of O_symbol.
+ (S_GET_VALUE): Fix check to permit this case.
+ * write.c (write_relocs): If a reloc is against an undefined
+ symbol equated to another symbol, change the reloc to be against
+ the latter symbol.
+ * config/obj-coff.c (do_relocs_for): Likewise.
+
+ * config/tc-ppc.c (ppc_csect): An unnamed csect is storage class
+ XMC_PR.
+
+Mon Jan 22 10:59:48 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/obj-elf.c (elf/ppc.h): Include elf/ppc.h if target
+ computer is PowerPC.
+
+ * config/tc-ppc.c (md_apply_fix3): Add more embedded relocations.
+
+ * config/tc-ppc.h (ELF_TC_SPECIAL_SECTIONS): Add sections
+ mentioned in the eabi.
+
+Thu Jan 18 17:58:19 1996 Kim Knuttila <krk@cygnus.com>
+
+ * config/tc-ppc.c (ppc_reldata): Changed alignement on reldata_section
+ * config/tc-ppc.c (ppc_pdata): Changed the alignment on pdata_section
+
+Mon Jan 15 17:43:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (mapping): Add more relocation suffixes.
+
+Sun Jan 14 21:29:36 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): Allow .gcc_except_table
+ as a section it is ok to have unadorned -mrelocatable pointers in.
+
+Sat Jan 13 11:09:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.c (ppc_section*): Wrap these functions inside
+ #ifdef OBJ_ELF.
+
+Fri Jan 12 15:32:07 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/obj-elf.c (obj_elf_section): Add hooks so machine
+ dependent section attributes can be handled.
+
+ * config/tc-ppc.h: (md_elf_section_{letter,type,word,flags}): New
+ macros to add support for exclude section flag and ordered section
+ type.
+
+ * config/tc-ppc.c (ppc_elf_section_{letter,type,word,flags}): New
+ functions to add support for exclude section flag and ordered
+ section type.
+
+Fri Jan 12 12:04:00 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * subsegs.c (section_symbol): Don't try to look up the section
+ symbol in the hash table. It should be possible to have a symbol
+ with the same name as a section, but no connection to it.
+
+ * read.c (cons_worker): Only call mri_comment_end from flag_mri.
+ From James Carlson <carlson@xylogics.com>.
+
+ * expr.c (operand): Skip whitespace after a close parenthesis.
+ From James Carlson <carlson@xylogics.com>.
+
+Tue Jan 2 12:43:23 1996 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * config/tc-sh.c (md_apply_fix): Call as_bad_where instead of
+ as_warn_where for relocation overflow.
+ (parse_reg): Accept register name only if next character is
+ not alphanumeric.
+
+For older changes see ChangeLog-9295
diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am
index e645c2c..49b52f7 100644
--- a/contrib/binutils/gas/Makefile.am
+++ b/contrib/binutils/gas/Makefile.am
@@ -1,15 +1,18 @@
## Process this file with automake to generate Makefile.in
+## Work around apparent automake bug.
+INTLLIBS = @INTLLIBS@
+
AUTOMAKE_OPTIONS = cygnus dejagnu
-SUBDIRS = doc
+SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+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`
-DEP = mkdep
+MKDEP = gcc -MM
TARG_CPU = @target_cpu_type@
TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
@@ -35,25 +38,32 @@ CPU_TYPES = \
alpha \
arc \
arm \
+ avr \
d10v \
+ d30v \
+ fr30 \
h8300 \
h8500 \
hppa \
+ i370 \
i386 \
i860 \
i960 \
m32r \
m68k \
m88k \
+ mcore \
mips \
mn10200 \
mn10300 \
ns32k \
+ pj \
ppc \
sh \
sparc \
tahoe \
tic30 \
+ tic80 \
vax \
w65 \
v850 \
@@ -110,12 +120,23 @@ CPU_OBJ_VALID = \
esac ;; \
esac;
-# This is like CPU_OBJ_VALID, for the obj=multi case.
+# These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
+
+MULTI_CPU_TYPES = i386 mips
-CPU_MULTI_VALID = \
+MULTI_CPU_OBJ_VALID = \
valid= ; \
- case $$c in \
- i386 | mips) valid=yes ;; \
+ case $$o in \
+ aout) \
+ case $$c in \
+ i386) valid=yes ;; \
+ esac ;; \
+ coff) valid=yes ;; \
+ ecoff) \
+ case $$c in \
+ mips) valid=yes ;; \
+ esac ;; \
+ elf) valid=yes ;; \
esac;
# Regular source files.
@@ -127,6 +148,7 @@ GAS_CFILES = \
bignum-copy.c \
cond.c \
depend.c \
+ dwarf2dbg.c \
ecoff.c \
ehopt.c \
expr.c \
@@ -153,8 +175,11 @@ CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
HFILES = \
as.h \
+ asintl.h \
bignum.h \
bit_fix.h \
+ cgen.h \
+ dwarf2dbg.h \
ecoff.h \
emul-target.h \
emul.h \
@@ -183,25 +208,32 @@ TARGET_CPU_CFILES = \
config/tc-alpha.c \
config/tc-arc.c \
config/tc-arm.c \
+ config/tc-avr.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-i370.c \
config/tc-i386.c \
config/tc-i860.c \
config/tc-i960.c \
config/tc-m32r.c \
config/tc-m68k.c \
config/tc-m88k.c \
+ config/tc-mcore.c \
config/tc-mips.c \
config/tc-mn10200.c \
config/tc-mn10300.c \
config/tc-ns32k.c \
+ config/tc-pj.c \
config/tc-ppc.c \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
config/tc-tic30.c \
+ config/tc-tic80.c \
config/tc-vax.c \
config/tc-w65.c \
config/tc-v850.c \
@@ -212,25 +244,32 @@ TARGET_CPU_HFILES = \
config/tc-alpha.h \
config/tc-arc.h \
config/tc-arm.h \
+ config/tc-avr.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-i370.h \
config/tc-i386.h \
config/tc-i860.h \
config/tc-i960.h \
config/tc-m32r.h \
config/tc-m68k.h \
config/tc-m88k.h \
+ config/tc-mcore.h \
config/tc-mips.h \
config/tc-mn10200.h \
config/tc-mn10300.h \
config/tc-ns32k.h \
+ config/tc-pj.h \
config/tc-ppc.h \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
config/tc-tic30.h \
+ config/tc-tic80.h \
config/tc-vax.h \
config/tc-w65.h \
config/tc-v850.h \
@@ -271,6 +310,7 @@ TARG_ENV_HFILES = \
config/te-delt88.h \
config/te-dpx2.h \
config/te-dynix.h \
+ config/te-epoc-pe.h \
config/te-generic.h \
config/te-go32.h \
config/te-hp300.h \
@@ -298,6 +338,7 @@ TARG_ENV_HFILES = \
# Multi files in config
MULTI_CFILES = \
+ config/e-i386aout.c \
config/e-i386coff.c \
config/e-i386elf.c \
config/e-mipsecoff.c \
@@ -316,6 +357,7 @@ GENERIC_OBJS = \
bignum-copy.o \
cond.o \
depend.o \
+ dwarf2dbg.o \
ehopt.o \
expr.o \
flonum-konst.o \
@@ -340,8 +382,16 @@ GENERIC_OBJS = \
OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
+POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
+ $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
+ $(HFILES) $(CFILES) $(GAS_CFILES)
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
noinst_PROGRAMS = as-new gasp-new
-noinst_SCRIPTS = .gdbinit
+noinst_SCRIPTS = $(GDBINIT)
+EXTRA_SCRIPTS = .gdbinit
$(srcdir)/make-gas.com: stamp-mk.com
stamp-mk.com: vmsconf.sh Makefile
@@ -354,7 +404,7 @@ EXTRA_DIST = make-gas.com
DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
diststuff: $(DISTSTUFF) info
-DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
+DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
# Now figure out from those variables how to compile and link.
@@ -367,13 +417,13 @@ INCDIR = $(BASEDIR)/include
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# This should be parallel to INCLUDES, but should replace $(srcdir)
# with $${srcdir}, and should work in a subdirectory. This is used
# when building dependencies, because the dependency building is done
# in a subdirectory.
-DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd -I$${srcdir}/../intl -I../../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# How to link with both our special library facilities
# and the system's installed libraries.
@@ -387,18 +437,19 @@ $(OBJS): @ALL_OBJ_DEPS@
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLLIBS)
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(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 struc-symbol.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
+ 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
gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
-gasp_new_LDADD = ../libiberty/libiberty.a
+gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
+gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
echo $${rootme}/../expect/expect ; \
@@ -475,6 +526,8 @@ e-mipself.o : $(srcdir)/config/e-mipself.c
$(COMPILE) -c $(srcdir)/config/e-mipself.c
e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
$(COMPILE) -c $(srcdir)/config/e-mipsecoff.c
+e-i386aout.o: $(srcdir)/config/e-i386aout.c
+ $(COMPILE) -c $(srcdir)/config/e-i386aout.c
e-i386coff.o: $(srcdir)/config/e-i386coff.c
$(COMPILE) -c $(srcdir)/config/e-i386coff.c
e-i386elf.o: $(srcdir)/config/e-i386elf.c
@@ -484,8 +537,28 @@ e-i386elf.o: $(srcdir)/config/e-i386elf.c
EXTRA_as_new_SOURCES = config/m68k-parse.y
+# 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
+# absolute path into the generated file. That's a pain when it comes
+# to generating snapshots, because it introduces spurious diffs.
+# Since when we make the snapshots $(srcdir) = ".", we check for that
+# case and handle it differently. This means that anybody who
+# configures with $(srcdir) = "." will have to set their path in the
+# debugger if they want to debug m68k-parse.y. This is bad, but on
+# the other hand it's good that people who use the prebuilt
+# m68k-parse.c don't get a spurious absolute path.
m68k-parse.c: $(srcdir)/config/m68k-parse.y
- $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/config/m68k-parse.y y.tab.c m68k-parse.c --
+ f=$(srcdir)/config/m68k-parse.y; \
+ if [ $$f = "./config/m68k-parse.y" ]; then \
+ ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
+ ln config/m68k-parse.y . > /dev/null 2>/dev/null || \
+ cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
+ f=m68k-parse.y; \
+ else true; fi; \
+ $(SHELL) $(YLWRAP) "$(YACC)" $$f y.tab.c m68k-parse.c --; \
+ if [ $$f = "m68k-parse.y" ]; then \
+ rm -f m68k-parse.y; \
+ else true; fi
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
# Don't let the .y.h rule clobber m68k-parse.h.
@@ -508,19 +581,22 @@ itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
EXTRA_PROGRAMS = itbl-test
itbl_test_SOURCES = itbl-parse.y itbl-lex.l
-itbl_test_LDADD = itbl-test-ops.o itbl-test.o $(GASLIBS) @LEXLIB@
+itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
-itbl-test-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
- $(COMPILE) -o itbl-test-ops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
+itbl-tops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+ $(COMPILE) -o itbl-tops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
$(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
# CGEN interface.
-cgen.o: cgen.c cgen-opc.h subsegs.h \
+CGEN_CPU_PREFIX = @cgen_cpu_prefix@
+
+cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/$(TARG_CPU)-opc.h
+ $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
+ $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
# Remake the info files.
@@ -528,23 +604,31 @@ 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 .tcdep .objdep .dep2 .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
+
+install-exec-local: install-exec-bindir @install_tooldir@
-install-exec-local: $(noinst_PROGRAMS)
- $(mkinstalldirs) $(bindir) $(tooldir)/bin
+install-exec-bindir: $(noinst_PROGRAMS)
+ $(mkinstalldirs) $(bindir)
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
- rm -f $(tooldir)/bin/as$(EXEEXT)
+
+install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
+ $(mkinstalldirs) $(tooldir)/bin
n=`echo as | sed '$(transform)'`; \
if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+ rm -f $(tooldir)/bin/as$(EXEEXT); \
ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
+ else \
+ true ; \
fi
# These exist for maintenance purposes.
@@ -631,41 +715,41 @@ de-stage3:
DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
-.dep: dep.sed $(DEP_FILE_DEPS) .tcdep .objdep .dep2
- rm -f .dep1
+DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2
+ rm -f DEP1
srcdir=`cd $(srcdir); pwd`; \
- $(MAKE) DEP=$(DEP) srcdir=$${srcdir} VPATH=$${srcdir} .dep1
- rm -rf .depdir
- sed -f dep.sed < .dep1 > .depa
- sed -f dep.sed < .tcdep >> .depa
- sed -f dep.sed < .objdep >> .depa
- sed -f dep.sed < .dep2 >> .depa
- echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '$$(TARG_CPU_O): $$(TCDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '$$(OBJ_FORMAT_O): $$(OBJDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> .depa
- $(SHELL) $(srcdir)/../move-if-change .depa .dep
-
-# This rule needs a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(MULTI_CFILES)
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ $(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1
+ rm -rf DEPDIR
+ sed -f dep.sed < DEP1 > DEPA
+ sed -f dep.sed < DEPTC >> DEPA
+ sed -f dep.sed < DEPOBJ >> DEPA
+ sed -f dep.sed < DEP2 >> 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 $@
+
+DEP1: $(CFILES) $(MULTI_CFILES)
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
echo '' > targ-cpu.h; \
echo '' > obj-format.h; \
echo '' > targ-env.h; \
echo '' > itbl-cpu.h; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $?
- sed -e '/IF YOU PUT ANYTHING/,$$d' < .depdir/.dep > .dep1
- rm -f .depdir/.dep
+ 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
+ mv -f DEPDIR/DEP $@
# Work out the special dependencies for the tc-*.c files.
-.tcdep: $(TARGET_CPU_CFILES)
- rm -f .tcdepa
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+DEPTC: $(TARGET_CPU_CFILES)
+ rm -f DEPTCA
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
for c in $(CPU_TYPES); do \
for o in $(OBJ_FORMATS); do \
$(CPU_OBJ_VALID) \
@@ -674,44 +758,37 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
echo '#include "te-generic.h"' > targ-env.h; \
echo '' > itbl-cpu.h; \
- echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
+ echo '' > itbl-parse.h; \
+ echo '#include "opcodes/'"$${c}"'-desc.h"' > cgen-desc.h; \
rm -f dummy.c; \
cp $${srcdir}/config/tc-$${c}.c dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/TCDEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.tcdepa; \
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ sed -e "s/dummy.o: dummy.c/DEPTC_$${c}_$${o} =/" >> ../DEPTCA; \
rm -f dummy.c; \
else true; fi; \
done; \
done
- echo 'TCDEP_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
- echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .tcdepa
- echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> .tcdepa
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'TCDEP_'"$${c}"'_multi = \' >> .tcdepa; \
- echo '$$(TCDEP_'"$${c}"'_coff) \' >> .tcdepa; \
+ echo 'DEPTC_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> DEPTCA
+ 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; \
+ for o in $(OBJ_FORMATS); do \
+ $(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(TCDEP_'"$${c}"'_ecoff) \' >> .tcdepa; \
+ echo '$$(DEPTC_'"$${c}_$${o}"') \' >> DEPTCA; \
else true; fi; \
- echo '$$(TCDEP_'"$${c}"'_elf)' >> .tcdepa; \
- else true; fi; \
+ done; \
+ echo '' >> DEPTCA; \
done
- mv -f .tcdepa .tcdep
+ mv -f DEPTCA DEPTC
# Work out the special dependencies for the obj-*.c files.
-.objdep: $(OBJ_FORMAT_CFILES)
- rm -f .objdepa
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+DEPOBJ: $(OBJ_FORMAT_CFILES)
+ rm -f DEPOBJA
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
for c in $(CPU_TYPES); do \
for o in $(OBJ_FORMATS); do \
$(CPU_OBJ_VALID) \
@@ -720,76 +797,61 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
echo '#include "te-generic.h"' > targ-env.h; \
echo '' > itbl-cpu.h; \
+ echo '' > itbl-parse.h; \
rm -f dummy.c; \
cp $${srcdir}/config/obj-$${o}.c dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/OBJDEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.objdepa; \
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ sed -e "s/dummy.o: dummy.c/DEPOBJ_$${c}_$${o} =/" >> ../DEPOBJA; \
rm -f dummy.c; \
else true; fi; \
done; \
done
- echo 'OBJDEP_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
- echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .objdepa
- echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> .objdepa
- echo ' $$(INCDIR)/aout/stab.def' >> .objdepa
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'OBJDEP_'"$${c}"'_multi = \' >> .objdepa; \
- echo '$$(OBJDEP_'"$${c}"'_coff) \' >> .objdepa; \
+ echo 'DEPOBJ_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> DEPOBJA
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPOBJA
+ 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; \
+ for o in $(OBJ_FORMATS); do \
+ $(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(OBJDEP_'"$${c}"'_ecoff) \' >> .objdepa; \
+ echo '$$(DEPOBJ_'"$${c}_$${o}"') \' >> DEPOBJA; \
else true; fi; \
- echo '$$(OBJDEP_'"$${c}"'_elf)' >> .objdepa; \
- else true; fi; \
+ done; \
+ echo '' >> DEPOBJA; \
done
- mv -f .objdepa .objdep
+ mv -f DEPOBJA DEPOBJ
# 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
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
+ rm -f DEP2a
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
for c in $(CPU_TYPES); do \
for o in $(OBJ_FORMATS); do \
$(CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.dep2a; \
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \
else true; fi; \
done; \
done
- echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> .dep2a
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'DEP_'"$${c}"'_multi = \' >> .dep2a; \
- echo '$$(DEP_'"$${c}"'_coff) \' >> .dep2a; \
+ echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a
+ for c in $(MULTI_CPU_TYPES); do \
+ echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \
+ for o in $(OBJ_FORMATS); do \
+ $(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(DEP_'"$${c}"'_ecoff) \' >> .dep2a; \
+ echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \
else true; fi; \
- echo '$$(DEP_'"$${c}"'_elf)' >> .dep2a; \
- else true; fi; \
+ done; \
+ echo '' >> DEP2a; \
done
- mv -f .dep2a .dep2
+ mv -f DEP2a DEP2
dep.sed: dep-in.sed config.status
srcdir=`cd $(srcdir); pwd`; \
@@ -798,565 +860,785 @@ dep.sed: dep-in.sed config.status
-e "s!@BFDDIR@!$${srcdir}/../bfd!" \
-e "s!@SRCDIR@!$${srcdir}!"
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.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
-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
-ecoff.o: ecoff.c
-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
+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 subsegs.h $(INCDIR)/obstack.h
-hash.o: hash.c
-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
+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
-output-file.o: output-file.c output-file.h
-read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \
- ecoff.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)/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
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
-gasp.o: gasp.c sb.h macro.h
-e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \
- emul-target.h
-e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h
-e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul.h \
- emul-target.h
-e-mipself.o: $(srcdir)/config/e-mipself.c emul.h emul-target.h
-
-TCDEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-TCDEP_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
-TCDEP_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
-TCDEP_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 $(INCDIR)/opcode/alpha.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
-TCDEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.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_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 \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
- $(srcdir)/config/atof-vax.c
-TCDEP_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 $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
- $(srcdir)/config/atof-vax.c
-TCDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
+ $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
$(srcdir)/config/atof-vax.c
-TCDEP_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
-TCDEP_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
-TCDEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
-TCDEP_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
-TCDEP_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 \
+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 \
+ $(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 \
+ $(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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 $(BFDDIR)/libbfd.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 \
+ $(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 \
+ $(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 \
+ $(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
-TCDEP_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 subsegs.h \
- $(INCDIR)/obstack.h $(BFDDIR)/libbfd.h $(INCDIR)/opcode/hppa.h
-TCDEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/i386.h
-TCDEP_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 $(INCDIR)/opcode/i386.h
-TCDEP_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)/opcode/i386.h
-TCDEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i860.h
-TCDEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/opcode/i860.h
-TCDEP_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 $(INCDIR)/opcode/i860.h
-TCDEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-TCDEP_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
-TCDEP_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 \
+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 \
$(INCDIR)/opcode/i960.h
-TCDEP_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 cgen-opc.h \
- $(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/cgen.h
-TCDEP_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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
- $(INCDIR)/opcode/cgen.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.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 \
+ $(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 \
- $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
+ emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h
-TCDEP_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
-TCDEP_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
-TCDEP_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 ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h
-TCDEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-TCDEP_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
-TCDEP_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 ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-TCDEP_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
-TCDEP_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 \
+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 \
+ $(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 \
+ $(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 \
+ 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 \
+ 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_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 \
$(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-TCDEP_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
-TCDEP_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 \
+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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+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 \
$(INCDIR)/obstack.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+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 \
$(INCDIR)/opcode/tahoe.h
-TCDEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+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 \
$(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-TCDEP_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 \
+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 \
$(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+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
-TCDEP_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
-TCDEP_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.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-z8k.h
-TCDEP_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.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
+DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \
$(BFDDIR)/som.h
-TCDEP_i386_multi = $(TCDEP_i386_coff) $(TCDEP_i386_elf)
-TCDEP_mips_multi = $(TCDEP_mips_coff) $(TCDEP_mips_ecoff) \
- $(TCDEP_mips_elf)
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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)/aout/aout64.h
-OBJDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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 subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-OBJDEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-OBJDEP_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
-OBJDEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-hp300.h \
+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 \
+ $(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 \
+ $(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 $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-OBJDEP_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
-OBJDEP_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)/aout/aout64.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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)/aout/aout64.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/obstack.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_hppa_som = $(srcdir)/config/obj-som.h subsegs.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 \
+ $(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 \
+ 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_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
-OBJDEP_i386_multi = $(OBJDEP_i386_coff) $(OBJDEP_i386_elf)
-OBJDEP_mips_multi = $(OBJDEP_mips_coff) $(OBJDEP_mips_ecoff) \
- $(OBJDEP_mips_elf)
+DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \
+ $(DEPOBJ_i386_elf)
+DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
+ $(DEPOBJ_mips_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 \
@@ -1386,11 +1668,26 @@ DEP_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
DEP_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
+DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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_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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h
+DEP_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
DEP_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
@@ -1405,10 +1702,11 @@ 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 \
+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 \
$(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)/bfdlink.h $(srcdir)/config/tc-i370.h
DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
@@ -1452,10 +1750,17 @@ DEP_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
DEP_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
+DEP_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
+DEP_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
DEP_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
DEP_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
DEP_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
@@ -1478,6 +1783,11 @@ DEP_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
DEP_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
+DEP_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
DEP_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
@@ -1513,6 +1823,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_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
+DEP_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
DEP_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
@@ -1540,10 +1856,11 @@ DEP_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
DEP_hppa_som = $(BFDDIR)/som.h
-DEP_i386_multi = $(DEP_i386_coff) $(DEP_i386_elf)
+DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
+ $(DEP_i386_elf)
DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
$(DEP_mips_elf)
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
-$(TARG_CPU_O): $(TCDEP_@target_cpu_type@_@obj_format@)
-$(OBJ_FORMAT_O): $(OBJDEP_@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
diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in
index 51eb930..569b98e 100644
--- a/contrib/binutils/gas/Makefile.in
+++ b/contrib/binutils/gas/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -62,35 +64,59 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
+AS = @AS@
BFDLIB = @BFDLIB@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
-LD = @LD@
+GDBINIT = @GDBINIT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-NM = @NM@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
atof = @atof@
+cgen_cpu_prefix = @cgen_cpu_prefix@
extra_objects = @extra_objects@
+install_tooldir = @install_tooldir@
+l = @l@
obj_format = @obj_format@
target_cpu_type = @target_cpu_type@
te_file = @te_file@
+INTLLIBS = @INTLLIBS@
+
AUTOMAKE_OPTIONS = cygnus dejagnu
-SUBDIRS = doc
+SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+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`
-DEP = mkdep
+MKDEP = gcc -MM
TARG_CPU = @target_cpu_type@
TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
@@ -104,10 +130,10 @@ ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
ATOF_TARG_O = atof-@atof@.o
# use @target_cpu_type@ for refering to configured target name
-IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
-IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
-IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
-IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
+IT_HDRS = itbl-parse.h $(srcdir)/itbl-ops.h
+IT_SRCS = itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
+IT_DEPS = $(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
+IT_OBJS = itbl-parse.o itbl-lex.o itbl-ops.o
# CPU types. This is only used for dependency information.
@@ -116,30 +142,38 @@ CPU_TYPES = \
alpha \
arc \
arm \
+ avr \
d10v \
+ d30v \
+ fr30 \
h8300 \
h8500 \
hppa \
+ i370 \
i386 \
i860 \
i960 \
m32r \
m68k \
m88k \
+ mcore \
mips \
mn10200 \
mn10300 \
ns32k \
+ pj \
ppc \
sh \
sparc \
tahoe \
tic30 \
+ tic80 \
vax \
w65 \
v850 \
z8k
+
# Object format types. This is only used for dependency information.
# We deliberately omit som, since it does not work as a cross assembler.
@@ -154,6 +188,7 @@ OBJ_FORMATS = \
ieee \
vms
+
# This is an sh case which sets valid according to whether the CPU
# type in the shell variable c and the OS type in the shell variable o
# are supported. This helps cuts down on the amount of dependency
@@ -191,14 +226,27 @@ CPU_OBJ_VALID = \
esac ;; \
esac;
-# This is like CPU_OBJ_VALID, for the obj=multi case.
-CPU_MULTI_VALID = \
+# These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
+
+MULTI_CPU_TYPES = i386 mips
+
+MULTI_CPU_OBJ_VALID = \
valid= ; \
- case $$c in \
- i386 | mips) valid=yes ;; \
+ case $$o in \
+ aout) \
+ case $$c in \
+ i386) valid=yes ;; \
+ esac ;; \
+ coff) valid=yes ;; \
+ ecoff) \
+ case $$c in \
+ mips) valid=yes ;; \
+ esac ;; \
+ elf) valid=yes ;; \
esac;
+
# Regular source files.
GAS_CFILES = \
@@ -208,6 +256,7 @@ GAS_CFILES = \
bignum-copy.c \
cond.c \
depend.c \
+ dwarf2dbg.c \
ecoff.c \
ehopt.c \
expr.c \
@@ -230,12 +279,16 @@ GAS_CFILES = \
symbols.c \
write.c
+
CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
HFILES = \
as.h \
+ asintl.h \
bignum.h \
bit_fix.h \
+ cgen.h \
+ dwarf2dbg.h \
ecoff.h \
emul-target.h \
emul.h \
@@ -257,6 +310,7 @@ HFILES = \
tc.h \
write.h
+
# CPU files in config.
TARGET_CPU_CFILES = \
@@ -264,59 +318,75 @@ TARGET_CPU_CFILES = \
config/tc-alpha.c \
config/tc-arc.c \
config/tc-arm.c \
+ config/tc-avr.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-i370.c \
config/tc-i386.c \
config/tc-i860.c \
config/tc-i960.c \
config/tc-m32r.c \
config/tc-m68k.c \
config/tc-m88k.c \
+ config/tc-mcore.c \
config/tc-mips.c \
config/tc-mn10200.c \
config/tc-mn10300.c \
config/tc-ns32k.c \
+ config/tc-pj.c \
config/tc-ppc.c \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
config/tc-tic30.c \
+ config/tc-tic80.c \
config/tc-vax.c \
config/tc-w65.c \
config/tc-v850.c \
config/tc-z8k.c
+
TARGET_CPU_HFILES = \
config/tc-a29k.h \
config/tc-alpha.h \
config/tc-arc.h \
config/tc-arm.h \
+ config/tc-avr.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-i370.h \
config/tc-i386.h \
config/tc-i860.h \
config/tc-i960.h \
config/tc-m32r.h \
config/tc-m68k.h \
config/tc-m88k.h \
+ config/tc-mcore.h \
config/tc-mips.h \
config/tc-mn10200.h \
config/tc-mn10300.h \
config/tc-ns32k.h \
+ config/tc-pj.h \
config/tc-ppc.h \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
config/tc-tic30.h \
+ config/tc-tic80.h \
config/tc-vax.h \
config/tc-w65.h \
config/tc-v850.h \
config/tc-z8k.h
+
# OBJ files in config
OBJ_FORMAT_CFILES = \
@@ -331,6 +401,7 @@ OBJ_FORMAT_CFILES = \
config/obj-som.c \
config/obj-vms.c
+
OBJ_FORMAT_HFILES = \
config/obj-aout.h \
config/obj-bout.h \
@@ -343,6 +414,7 @@ OBJ_FORMAT_HFILES = \
config/obj-som.h \
config/obj-vms.h
+
# Emulation header files in config
TARG_ENV_HFILES = \
@@ -352,6 +424,7 @@ TARG_ENV_HFILES = \
config/te-delt88.h \
config/te-dpx2.h \
config/te-dynix.h \
+ config/te-epoc-pe.h \
config/te-generic.h \
config/te-go32.h \
config/te-hp300.h \
@@ -376,20 +449,24 @@ TARG_ENV_HFILES = \
config/te-svr4.h \
config/te-sysv32.h
+
# Multi files in config
MULTI_CFILES = \
+ config/e-i386aout.c \
config/e-i386coff.c \
config/e-i386elf.c \
config/e-mipsecoff.c \
config/e-mipself.c
+
CONFIG_OBJS = \
$(TARG_CPU_O) \
$(OBJ_FORMAT_O) \
$(ATOF_TARG_O) \
$(extra_objects)
+
GENERIC_OBJS = \
app.o \
as.o \
@@ -397,6 +474,7 @@ GENERIC_OBJS = \
bignum-copy.o \
cond.o \
depend.o \
+ dwarf2dbg.o \
ehopt.o \
expr.o \
flonum-konst.o \
@@ -419,16 +497,23 @@ GENERIC_OBJS = \
sb.o \
macro.o
+
OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
+POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
+ $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
+ $(HFILES) $(CFILES) $(GAS_CFILES)
+
+
noinst_PROGRAMS = as-new gasp-new
-noinst_SCRIPTS = .gdbinit
+noinst_SCRIPTS = $(GDBINIT)
+EXTRA_SCRIPTS = .gdbinit
EXTRA_DIST = make-gas.com
DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
-DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
+DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
# Now figure out from those variables how to compile and link.
@@ -441,13 +526,13 @@ INCDIR = $(BASEDIR)/include
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# This should be parallel to INCLUDES, but should replace $(srcdir)
# with $${srcdir}, and should work in a subdirectory. This is used
# when building dependencies, because the dependency building is done
# in a subdirectory.
-DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd -I$${srcdir}/../intl -I../../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
# How to link with both our special library facilities
# and the system's installed libraries.
@@ -459,21 +544,26 @@ STAGESTUFF = *.o $(noinst_PROGRAMS)
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLLIBS)
+
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS)
+ $(extra_objects) $(GASLIBS) $(INTLDEPS)
+
gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
-gasp_new_LDADD = ../libiberty/libiberty.a
+gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
+gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
echo $${rootme}/../expect/expect ; \
else echo expect ; fi`
+
RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
fi`
-RUNTESTFLAGS=
+
+RUNTESTFLAGS =
# The m68k operand parser.
@@ -483,7 +573,11 @@ EXTRA_as_new_SOURCES = config/m68k-parse.y
EXTRA_PROGRAMS = itbl-test
itbl_test_SOURCES = itbl-parse.y itbl-lex.l
-itbl_test_LDADD = itbl-test-ops.o itbl-test.o $(GASLIBS) @LEXLIB@
+itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
+
+# CGEN interface.
+
+CGEN_CPU_PREFIX = @cgen_cpu_prefix@
# Remake the info files.
@@ -491,708 +585,1204 @@ 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 .tcdep .objdep .dep2 .dep1 .depa .dep .depdir
-against=stage2
+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) \
+DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
-TCDEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-TCDEP_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
-TCDEP_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
-TCDEP_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 $(INCDIR)/opcode/alpha.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
-TCDEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.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_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 \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
- $(srcdir)/config/atof-vax.c
-TCDEP_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 $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
+ $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
$(srcdir)/config/atof-vax.c
-TCDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
- $(srcdir)/config/atof-vax.c
-TCDEP_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
-TCDEP_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
-TCDEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
-TCDEP_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
-TCDEP_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 \
+
+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 \
+ $(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 \
+ $(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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 $(BFDDIR)/libbfd.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 \
+ $(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 \
+ $(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 \
+ $(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
-TCDEP_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 subsegs.h \
- $(INCDIR)/obstack.h $(BFDDIR)/libbfd.h $(INCDIR)/opcode/hppa.h
-TCDEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/i386.h
-TCDEP_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 $(INCDIR)/opcode/i386.h
-TCDEP_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)/opcode/i386.h
-TCDEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i860.h
-TCDEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/opcode/i860.h
-TCDEP_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 $(INCDIR)/opcode/i860.h
-TCDEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-TCDEP_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
-TCDEP_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 \
+
+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 \
$(INCDIR)/opcode/i960.h
-TCDEP_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 cgen-opc.h \
- $(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/cgen.h
-TCDEP_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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
- $(INCDIR)/opcode/cgen.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.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 \
+ $(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 \
- $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
+ emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h
-TCDEP_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
-TCDEP_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
-TCDEP_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 ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h
-TCDEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-TCDEP_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
-TCDEP_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 ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-TCDEP_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
-TCDEP_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 \
+
+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 \
+ $(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 \
+ $(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 \
+ 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 \
+ 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_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 \
$(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-TCDEP_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
-TCDEP_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 \
+
+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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+
+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 \
$(INCDIR)/obstack.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+
+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 \
$(INCDIR)/opcode/tahoe.h
-TCDEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+
+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 \
$(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-TCDEP_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 \
+
+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 \
$(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-TCDEP_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
-TCDEP_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
-TCDEP_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
-TCDEP_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 \
+
+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
-TCDEP_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
-TCDEP_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.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-z8k.h
-TCDEP_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.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
+
+DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \
$(BFDDIR)/som.h
-TCDEP_i386_multi = $(TCDEP_i386_coff) $(TCDEP_i386_elf)
-TCDEP_mips_multi = $(TCDEP_mips_coff) $(TCDEP_mips_ecoff) \
- $(TCDEP_mips_elf)
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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)/aout/aout64.h
-OBJDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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 subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-OBJDEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-OBJDEP_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
-OBJDEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-hp300.h \
+
+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 \
+ $(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 \
+ $(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 $(INCDIR)/aout/aout64.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/obstack.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-OBJDEP_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
-OBJDEP_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)/aout/aout64.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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)/aout/aout64.h
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_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
-OBJDEP_hppa_som = $(srcdir)/config/obj-som.h subsegs.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 \
+ $(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 \
+ 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_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
-OBJDEP_i386_multi = $(OBJDEP_i386_coff) $(OBJDEP_i386_elf)
-OBJDEP_mips_multi = $(OBJDEP_mips_coff) $(OBJDEP_mips_ecoff) \
- $(OBJDEP_mips_elf)
+
+DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \
+ $(DEPOBJ_i386_elf)
+
+DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
+ $(DEPOBJ_mips_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 \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+
DEP_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
+
DEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_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
+
+DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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_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 \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h
+
+DEP_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_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
+
+DEP_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_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
+
DEP_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
+
DEP_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
+
DEP_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
+
DEP_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
+
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 \
+
+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 \
$(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)/bfdlink.h $(srcdir)/config/tc-i370.h
+
DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_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
+
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
+
DEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h
DEP_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
+
DEP_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
+
DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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_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 \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_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
+
+DEP_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
+
+DEP_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
+
DEP_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+
DEP_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+
DEP_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
+
DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
+DEP_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_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
+
DEP_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
+
DEP_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
+
DEP_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
+
DEP_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
+
DEP_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_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
+
DEP_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_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
+
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_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
+
+DEP_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
+
DEP_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+
DEP_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
+
DEP_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
+
DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
DEP_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
+
DEP_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
+
DEP_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
+
DEP_hppa_som = $(BFDDIR)/som.h
-DEP_i386_multi = $(DEP_i386_coff) $(DEP_i386_elf)
+DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
+ $(DEP_i386_elf)
+
DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
$(DEP_mips_elf)
+
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = .gdbinit
+CONFIG_CLEAN_FILES = ${GDBINIT}
noinst_PROGRAMS = as-new$(EXEEXT) gasp-new$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
@@ -1202,17 +1792,16 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
itbl_test_OBJECTS = itbl-parse.o itbl-lex.o
-itbl_test_DEPENDENCIES = itbl-test-ops.o itbl-test.o \
+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 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
+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_LDFLAGS =
gasp_new_OBJECTS = gasp.o macro.o sb.o hash.o
-gasp_new_DEPENDENCIES = ../libiberty/libiberty.a
gasp_new_LDFLAGS =
SCRIPTS = $(noinst_SCRIPTS)
@@ -1220,51 +1809,58 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LEXLIB = @LEXLIB@
YLWRAP = $(top_srcdir)/../ylwrap
CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in NEWS \
-acconfig.h acinclude.m4 aclocal.m4 config.in config/m68k-parse.c \
-configure configure.in gdbinit.in itbl-lex.c itbl-parse.c stamp-h.in
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = README ./stamp-h.in COPYING ChangeLog Makefile.am \
+Makefile.in NEWS acinclude.m4 aclocal.m4 config.in config/m68k-parse.c \
+configure configure.in gdbinit.in itbl-lex.c itbl-parse.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
+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)
-default: all
-
+all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .l .lo .o .s .y
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-config.status: $(srcdir)/configure
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
- @:
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
$(SHELL) ./config.status
- @echo timestamp > stamp-h
-$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
@@ -1274,8 +1870,8 @@ distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
-.gdbinit: $(top_builddir)/config.status gdbinit.in
- cd $(top_builddir) && CONFIG_FILES=$@:gdbinit.in CONFIG_HEADERS= ./config.status
+${GDBINIT}: $(top_builddir)/config.status gdbinit.in
+ cd $(top_builddir) && CONFIG_FILES=$@:gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstPROGRAMS:
@@ -1335,13 +1931,13 @@ as-new$(EXEEXT): $(as_new_OBJECTS) $(as_new_DEPENDENCIES)
gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES)
@rm -f gasp-new$(EXEEXT)
$(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS)
+.l.c:
+ $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
.y.c:
- $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS)
+ $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
config/m68k-parse.h: config/m68k-parse.c
itbl-parse.h: itbl-parse.c
-.l.c:
- $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -1356,41 +1952,65 @@ all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $$target) \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
- target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $$target) \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) tags); \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+ && mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
@@ -1416,29 +2036,31 @@ top_distdir = $(distdir)
# tarfile.
distcheck: dist
-rm -rf $(distdir)
- GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
- @echo "========================"; \
- echo "$(distdir).tar.gz is ready for distribution"; \
- echo "========================"
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
@@ -1446,17 +2068,23 @@ distdir: $(DISTFILES)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
done
for subdir in $(SUBDIRS); do \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
|| exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
done
DEJATOOL = $(PACKAGE)
@@ -1464,7 +2092,7 @@ DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
site.exp: Makefile
@echo 'Making a new site.exp file...'
- -@rm -f site.bak
+ @test ! -f site.bak || rm -f site.bak
@echo '## these variables are automatically generated by make ##' > $@-t
@echo '# Do not edit here. If you wish to override these values' >> $@-t
@echo '# edit the last section' >> $@-t
@@ -1478,38 +2106,40 @@ site.exp: Makefile
@echo 'set build_alias $(build_alias)' >> $@-t
@echo 'set build_triplet $(build_triplet)' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
- -@mv site.exp site.bak
+ @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp
+info-am:
info: info-recursive
+dvi-am:
dvi: dvi-recursive
-check:
- $(MAKE) check-recursive check-DEJAGNU
+check-am:
+ $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+check: check-recursive
+installcheck-am:
installcheck: installcheck-recursive
+install-info-am:
install-info: install-info-recursive
all-recursive-am: config.h
- $(MAKE) all-recursive
-
-all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am: install-exec-local
+install-exec: install-exec-recursive
-install-exec: install-exec-recursive install-exec-am
- @$(NORMAL_INSTALL)
-
+install-data-am:
install-data: install-data-recursive
- @$(NORMAL_INSTALL)
-
-install: install-recursive install-exec-am
- @:
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
uninstall: uninstall-recursive
-
-all: all-recursive-am all-am
-
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h
+all-redirect: all-recursive-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
+installdirs-am:
mostlyclean-generic:
@@ -1519,60 +2149,64 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "itbl-lexlconfig/m68k-parsehconfig/m68k-parsecitbl-parsehitbl-parsec" || rm -f itbl-lexl config/m68k-parseh config/m68k-parsec itbl-parseh itbl-parsec
mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-tags mostlyclean-generic
+mostlyclean: mostlyclean-recursive
+
clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
clean-tags clean-generic mostlyclean-am
+clean: clean-recursive
+
distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
distclean-libtool distclean-tags distclean-generic \
clean-am
+ -rm -f libtool
+
+distclean: distclean-recursive
+ -rm -f config.status
maintainer-clean-am: maintainer-clean-hdr \
maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
-
-mostlyclean: mostlyclean-recursive mostlyclean-am
-
-clean: clean-recursive clean-am
-
-distclean: distclean-recursive distclean-am
- -rm -f config.status
- -rm -f libtool
-
-maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
-distclean-noinstPROGRAMS clean-noinstPROGRAMS \
-maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info dvi installcheck install-info all-recursive-am all-am \
-install-exec-am install-exec install-data install uninstall all \
+info-am info dvi-am dvi check check-am installcheck-am installcheck \
+install-info-am install-info all-recursive-am install-exec-local \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
$(srcdir)/make-gas.com: stamp-mk.com
stamp-mk.com: vmsconf.sh Makefile
@@ -1586,8 +2220,8 @@ $(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 struc-symbol.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
+ 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
check-DEJAGNU: site.exp
if [ -d testsuite ]; then \
@@ -1655,13 +2289,35 @@ e-mipself.o : $(srcdir)/config/e-mipself.c
$(COMPILE) -c $(srcdir)/config/e-mipself.c
e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
$(COMPILE) -c $(srcdir)/config/e-mipsecoff.c
+e-i386aout.o: $(srcdir)/config/e-i386aout.c
+ $(COMPILE) -c $(srcdir)/config/e-i386aout.c
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
+# 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
+# absolute path into the generated file. That's a pain when it comes
+# to generating snapshots, because it introduces spurious diffs.
+# Since when we make the snapshots $(srcdir) = ".", we check for that
+# case and handle it differently. This means that anybody who
+# configures with $(srcdir) = "." will have to set their path in the
+# debugger if they want to debug m68k-parse.y. This is bad, but on
+# the other hand it's good that people who use the prebuilt
+# m68k-parse.c don't get a spurious absolute path.
m68k-parse.c: $(srcdir)/config/m68k-parse.y
- $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/config/m68k-parse.y y.tab.c m68k-parse.c --
+ f=$(srcdir)/config/m68k-parse.y; \
+ if [ $$f = "./config/m68k-parse.y" ]; then \
+ ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
+ ln config/m68k-parse.y . > /dev/null 2>/dev/null || \
+ cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
+ f=m68k-parse.y; \
+ else true; fi; \
+ $(SHELL) $(YLWRAP) "$(YACC)" $$f y.tab.c m68k-parse.c --; \
+ if [ $$f = "m68k-parse.y" ]; then \
+ rm -f m68k-parse.y; \
+ else true; fi
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
# Don't let the .y.h rule clobber m68k-parse.h.
@@ -1680,33 +2336,40 @@ itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- -d
-itbl-test-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
- $(COMPILE) -o itbl-test-ops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
+itbl-tops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+ $(COMPILE) -o itbl-tops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
$(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
-# CGEN interface.
-
-cgen.o: cgen.c cgen-opc.h subsegs.h \
+cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/$(TARG_CPU)-opc.h
+ $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
+ $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
.PHONY: install-exec-local install-data-local
+.PHONY: install-exec-bindir install-exec-tooldir
-install-exec-local: $(noinst_PROGRAMS)
- $(mkinstalldirs) $(bindir) $(tooldir)/bin
+install-exec-local: install-exec-bindir @install_tooldir@
+
+install-exec-bindir: $(noinst_PROGRAMS)
+ $(mkinstalldirs) $(bindir)
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
- rm -f $(tooldir)/bin/as$(EXEEXT)
+
+install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
+ $(mkinstalldirs) $(tooldir)/bin
n=`echo as | sed '$(transform)'`; \
if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+ rm -f $(tooldir)/bin/as$(EXEEXT); \
ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
+ else \
+ true ; \
fi
# These exist for maintenance purposes.
@@ -1784,41 +2447,41 @@ de-stage3:
- (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
- rmdir stage3
-.dep: dep.sed $(DEP_FILE_DEPS) .tcdep .objdep .dep2
- rm -f .dep1
+DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2
+ rm -f DEP1
srcdir=`cd $(srcdir); pwd`; \
- $(MAKE) DEP=$(DEP) srcdir=$${srcdir} VPATH=$${srcdir} .dep1
- rm -rf .depdir
- sed -f dep.sed < .dep1 > .depa
- sed -f dep.sed < .tcdep >> .depa
- sed -f dep.sed < .objdep >> .depa
- sed -f dep.sed < .dep2 >> .depa
- echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '$$(TARG_CPU_O): $$(TCDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '$$(OBJ_FORMAT_O): $$(OBJDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> .depa
- $(SHELL) $(srcdir)/../move-if-change .depa .dep
-
-# This rule needs a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(MULTI_CFILES)
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ $(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1
+ rm -rf DEPDIR
+ sed -f dep.sed < DEP1 > DEPA
+ sed -f dep.sed < DEPTC >> DEPA
+ sed -f dep.sed < DEPOBJ >> DEPA
+ sed -f dep.sed < DEP2 >> 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 $@
+
+DEP1: $(CFILES) $(MULTI_CFILES)
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
echo '' > targ-cpu.h; \
echo '' > obj-format.h; \
echo '' > targ-env.h; \
echo '' > itbl-cpu.h; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $?
- sed -e '/IF YOU PUT ANYTHING/,$$d' < .depdir/.dep > .dep1
- rm -f .depdir/.dep
+ 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
+ mv -f DEPDIR/DEP $@
# Work out the special dependencies for the tc-*.c files.
-.tcdep: $(TARGET_CPU_CFILES)
- rm -f .tcdepa
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+DEPTC: $(TARGET_CPU_CFILES)
+ rm -f DEPTCA
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
for c in $(CPU_TYPES); do \
for o in $(OBJ_FORMATS); do \
$(CPU_OBJ_VALID) \
@@ -1827,44 +2490,37 @@ de-stage3:
echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
echo '#include "te-generic.h"' > targ-env.h; \
echo '' > itbl-cpu.h; \
- echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
+ echo '' > itbl-parse.h; \
+ echo '#include "opcodes/'"$${c}"'-desc.h"' > cgen-desc.h; \
rm -f dummy.c; \
cp $${srcdir}/config/tc-$${c}.c dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/TCDEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.tcdepa; \
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ sed -e "s/dummy.o: dummy.c/DEPTC_$${c}_$${o} =/" >> ../DEPTCA; \
rm -f dummy.c; \
else true; fi; \
done; \
done
- echo 'TCDEP_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
- echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .tcdepa
- echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> .tcdepa
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'TCDEP_'"$${c}"'_multi = \' >> .tcdepa; \
- echo '$$(TCDEP_'"$${c}"'_coff) \' >> .tcdepa; \
+ echo 'DEPTC_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> DEPTCA
+ 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; \
+ for o in $(OBJ_FORMATS); do \
+ $(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(TCDEP_'"$${c}"'_ecoff) \' >> .tcdepa; \
+ echo '$$(DEPTC_'"$${c}_$${o}"') \' >> DEPTCA; \
else true; fi; \
- echo '$$(TCDEP_'"$${c}"'_elf)' >> .tcdepa; \
- else true; fi; \
+ done; \
+ echo '' >> DEPTCA; \
done
- mv -f .tcdepa .tcdep
+ mv -f DEPTCA DEPTC
# Work out the special dependencies for the obj-*.c files.
-.objdep: $(OBJ_FORMAT_CFILES)
- rm -f .objdepa
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+DEPOBJ: $(OBJ_FORMAT_CFILES)
+ rm -f DEPOBJA
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
for c in $(CPU_TYPES); do \
for o in $(OBJ_FORMATS); do \
$(CPU_OBJ_VALID) \
@@ -1873,76 +2529,61 @@ de-stage3:
echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
echo '#include "te-generic.h"' > targ-env.h; \
echo '' > itbl-cpu.h; \
+ echo '' > itbl-parse.h; \
rm -f dummy.c; \
cp $${srcdir}/config/obj-$${o}.c dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/OBJDEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.objdepa; \
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ sed -e "s/dummy.o: dummy.c/DEPOBJ_$${c}_$${o} =/" >> ../DEPOBJA; \
rm -f dummy.c; \
else true; fi; \
done; \
done
- echo 'OBJDEP_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
- echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .objdepa
- echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> .objdepa
- echo ' $$(INCDIR)/aout/stab.def' >> .objdepa
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'OBJDEP_'"$${c}"'_multi = \' >> .objdepa; \
- echo '$$(OBJDEP_'"$${c}"'_coff) \' >> .objdepa; \
+ echo 'DEPOBJ_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> DEPOBJA
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPOBJA
+ 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; \
+ for o in $(OBJ_FORMATS); do \
+ $(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(OBJDEP_'"$${c}"'_ecoff) \' >> .objdepa; \
+ echo '$$(DEPOBJ_'"$${c}_$${o}"') \' >> DEPOBJA; \
else true; fi; \
- echo '$$(OBJDEP_'"$${c}"'_elf)' >> .objdepa; \
- else true; fi; \
+ done; \
+ echo '' >> DEPOBJA; \
done
- mv -f .objdepa .objdep
+ mv -f DEPOBJA DEPOBJ
# 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
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
+DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
+ rm -f DEP2a
+ if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi
srcdir=`cd $(srcdir); pwd`; \
- cd .depdir; \
+ cd DEPDIR; \
for c in $(CPU_TYPES); do \
for o in $(OBJ_FORMATS); do \
$(CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.dep2a; \
+ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \
else true; fi; \
done; \
done
- echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> .dep2a
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'DEP_'"$${c}"'_multi = \' >> .dep2a; \
- echo '$$(DEP_'"$${c}"'_coff) \' >> .dep2a; \
+ echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a
+ for c in $(MULTI_CPU_TYPES); do \
+ echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \
+ for o in $(OBJ_FORMATS); do \
+ $(MULTI_CPU_OBJ_VALID) \
if [ x$${valid} = xyes ]; then \
- echo '$$(DEP_'"$${c}"'_ecoff) \' >> .dep2a; \
+ echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \
else true; fi; \
- echo '$$(DEP_'"$${c}"'_elf)' >> .dep2a; \
- else true; fi; \
+ done; \
+ echo '' >> DEP2a; \
done
- mv -f .dep2a .dep2
+ mv -f DEP2a DEP2
dep.sed: dep-in.sed config.status
srcdir=`cd $(srcdir); pwd`; \
@@ -1951,66 +2592,85 @@ dep.sed: dep-in.sed config.status
-e "s!@BFDDIR@!$${srcdir}/../bfd!" \
-e "s!@SRCDIR@!$${srcdir}!"
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.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
-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
-ecoff.o: ecoff.c
-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
+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 subsegs.h $(INCDIR)/obstack.h
-hash.o: hash.c
-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
+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
-output-file.o: output-file.c output-file.h
-read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \
- ecoff.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)/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
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
-gasp.o: gasp.c sb.h macro.h
-e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \
- emul-target.h
-e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h
-e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul.h \
- emul-target.h
-e-mipself.o: $(srcdir)/config/e-mipself.c emul.h emul-target.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
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
-$(TARG_CPU_O): $(TCDEP_@target_cpu_type@_@obj_format@)
-$(OBJ_FORMAT_O): $(OBJDEP_@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
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS
index de21098..03f554c 100644
--- a/contrib/binutils/gas/NEWS
+++ b/contrib/binutils/gas/NEWS
@@ -1,11 +1,53 @@
-*- text -*-
+Changes in 2.10:
+
+Support for ATMEL AVR.
+
+Support for IBM 370 ELF. Somewhat experimental.
+
+Support for numbers with suffixes.
+
+Added support for breaking to the end of repeat loops.
+
+Added support for parallel instruction syntax (DOUBLEBAR_PARALLEL).
+
+New .elseif pseudo-op added.
+
+New --fatal-warnings option.
+
+picoJava architecture support added.
+
+Motorola MCore 210 processor support added.
+
+A new pseudo-op .intel_syntax has been implemented to allow gas to parse i386
+assembly programs with intel syntax.
+
+New pseudo-ops .func,.endfunc to aid in debugging user-written assembler code.
+
+Added -gdwarf2 option to generate DWARF 2 debugging information.
+
+Full 16-bit mode support for i386.
+
+Greatly improved instruction operand checking for i386. This change will
+produce errors or warnings on incorrect assembly code that previous versions of
+gas accepted. If you get unexpected messages from code that worked with older
+versions of gas, please double check the code before reporting a bug.
+
+Weak symbol support added for COFF targets.
+
+Mitsubishi D30V support added.
+
+Texas Instruments c80 (tms320c80) support added.
+
+i960 ELF support added.
+
Changes in 2.9:
-Texas Instruction c30 (tms320c30) support added.
+Texas Instruments c30 (tms320c30) support added.
The assembler now optimizes the exception frame information generated by egcs
-and gcc 2.8. The new --traditional-format disables this optimization.
+and gcc 2.8. The new --traditional-format option disables this optimization.
Added --gstabs option to generate stabs debugging information.
diff --git a/contrib/binutils/gas/README b/contrib/binutils/gas/README
index c7f3226..4ac27db 100644
--- a/contrib/binutils/gas/README
+++ b/contrib/binutils/gas/README
@@ -183,10 +183,12 @@ most of the above hosts, plus
i386-aix (ps/2)
i960-coff
mips ecoff (decstation-ultrix, iris, mips magnum, mips-idt-ecoff)
+ Mitsubishi d10v and d30v
nindy960
powerpc EABI
SH (Hitachi)
sco386
+ TI tic30 and tic80
vax bsd or ultrix?
vms
vxworks68k
diff --git a/contrib/binutils/gas/acinclude.m4 b/contrib/binutils/gas/acinclude.m4
index 60f54e9..31a2c16 100644
--- a/contrib/binutils/gas/acinclude.m4
+++ b/contrib/binutils/gas/acinclude.m4
@@ -9,12 +9,10 @@ $2 x;
x = ($2) $1;
], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
AC_MSG_RESULT($gas_cv_decl_needed_$1)
-test $gas_cv_decl_needed_$1 = no || {
- ifelse(index($1,[$]),-1,
- [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
- [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
- AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
-}
+if test $gas_cv_decl_needed_$1 = yes; then
+ AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
+ [Define if $1 is not declared in system header files.])
+fi
])dnl
dnl
dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
@@ -35,7 +33,7 @@ assert (a == b
|| c == d);
], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
AC_MSG_RESULT($gas_cv_assert_ok)
-test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
+test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
])dnl
dnl
dnl Since many Bourne shell implementations lack subroutines, use this
diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4
index c60bd9f..4b4ca84 100644
--- a/contrib/binutils/gas/aclocal.m4
+++ b/contrib/binutils/gas/aclocal.m4
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.2e
+dnl aclocal.m4 generated automatically by aclocal 1.4
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -21,12 +21,10 @@ $2 x;
x = ($2) $1;
], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
AC_MSG_RESULT($gas_cv_decl_needed_$1)
-test $gas_cv_decl_needed_$1 = no || {
- ifelse(index($1,[$]),-1,
- [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
- [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
- AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
-}
+if test $gas_cv_decl_needed_$1 = yes; then
+ AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
+ [Define if $1 is not declared in system header files.])
+fi
])dnl
dnl
dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
@@ -47,7 +45,7 @@ assert (a == b
|| c == d);
], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
AC_MSG_RESULT($gas_cv_assert_ok)
-test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
+test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
])dnl
dnl
dnl Since many Bourne shell implementations lack subroutines, use this
@@ -79,7 +77,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@@ -89,8 +87,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
@@ -102,15 +100,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
#
# Check to make sure that the build environment is sane.
#
@@ -171,32 +160,75 @@ fi
AC_SUBST($1)])
-# serial 24 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AM_ENABLE_SHARED])dnl
-AC_REQUIRE([AM_ENABLE_STATIC])dnl
+# 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([AM_PROG_LD])dnl
-AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -218,30 +250,42 @@ case "$host" in
*-*-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
;;
-esac
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
+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])])
-# AM_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# 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(AM_ENABLE_SHARED,
-[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@@ -258,29 +302,23 @@ no) enable_shared=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
-# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AM_DISABLE_SHARED,
-[AM_ENABLE_SHARED(no)])
+# 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)])
-# AM_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AM_DISABLE_STATIC,
-[AM_ENABLE_STATIC(no)])
-
-# AM_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# 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(AM_ENABLE_STATIC,
-[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@@ -297,28 +335,73 @@ no) enable_static=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+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)])
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
+# 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])
+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.
+ # Accept absolute paths.
changequote(,)dnl
- /* | [A-Za-z]:\\*)
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -335,10 +418,10 @@ else
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ 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"; then
+ 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.
@@ -346,7 +429,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -361,11 +444,10 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
+AC_PROG_LD_GNU
])
-AC_DEFUN(AM_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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -375,43 +457,117 @@ else
fi])
])
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
+# 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,
-[case "$NM" in
-changequote(,)dnl
-/* | [A-Za-z]:\\*)
-changequote([,])dnl
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+[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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
+fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
-AC_SUBST(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,
@@ -435,6 +591,360 @@ 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 <drepper@cygnus.com>, 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 <libintl.h>], [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 <locale.h> in the installed <libintl.h> 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 <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. 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 <drepper@cygnus.com>, 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 <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 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 <locale.h>], [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
@@ -449,69 +959,22 @@ AC_DEFUN(AM_MAINTAINER_MODE,
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
-# Check to see if we're running under Cygwin32, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN32()
-AC_DEFUN(AM_CYGWIN32,
-[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin32=yes, am_cv_cygwin32=no)
-rm -f conftest*])
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
-
-# Check to see if we're running under Win32, without using
-# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
-# Otherwise set it to "".
-
-dnl AM_EXEEXT()
-dnl This knows we add .exe if we're building in the Cygwin32
-dnl environment. But if we're not, then it compiles a test program
-dnl to see if there is a suffix for executables.
-AC_DEFUN(AM_EXEEXT,
-[AC_REQUIRE([AM_CYGWIN32])
-AC_REQUIRE([AM_MINGW32])
-AC_MSG_CHECKING([for executable suffix])
-AC_CACHE_VAL(am_cv_exeext,
-[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*])
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
-fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-AC_MSG_RESULT(${am_cv_exeext})
-AC_SUBST(EXEEXT)])
-
-# Check to see if we're running under Mingw, without using
-# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_MINGW32()
-AC_DEFUN(AM_MINGW32,
-[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
-[AC_TRY_COMPILE(,[return __MINGW32__;],
-am_cv_mingw32=yes, am_cv_mingw32=no)
-rm -f conftest*])
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes])
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c
index b58f705..2613e74 100644
--- a/contrib/binutils/gas/app.c
+++ b/contrib/binutils/gas/app.c
@@ -1,5 +1,5 @@
/* This is the Assembler Pre-Processor
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -34,15 +34,26 @@
#endif
#endif
+#ifdef TC_M68K
/* Whether we are scrubbing in m68k MRI mode. This is different from
flag_m68k_mri, because the two flags will be affected by the .mri
pseudo-op at different times. */
static int scrub_m68k_mri;
+#else
+#define scrub_m68k_mri 0
+#endif
/* The pseudo-op which switches in and out of MRI mode. See the
comment in do_scrub_chars. */
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.
+ See the comment in do_scrub_chars. */
+static const char symver_pseudo[] = ".symver";
+static const char * symver_state;
+#endif
+
static char lex[256];
static const char symbol_chars[] =
"$._ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
@@ -61,6 +72,9 @@ static const char symbol_chars[] =
#define LEX_IS_DOUBLEDASH_1ST 12
#endif
#ifdef TC_M32R
+#define DOUBLEBAR_PARALLEL
+#endif
+#ifdef DOUBLEBAR_PARALLEL
#define LEX_IS_DOUBLEBAR_1ST 13
#endif
#define IS_SYMBOL_COMPONENT(c) (lex[c] == LEX_IS_SYMBOL_COMPONENT)
@@ -78,11 +92,10 @@ static int process_escape PARAMS ((int));
void
do_scrub_begin (m68k_mri)
- int m68k_mri;
+ int m68k_mri ATTRIBUTE_UNUSED;
{
const char *p;
-
- scrub_m68k_mri = m68k_mri;
+ int c;
lex[' '] = LEX_IS_WHITESPACE;
lex['\t'] = LEX_IS_WHITESPACE;
@@ -91,11 +104,16 @@ do_scrub_begin (m68k_mri)
lex[';'] = LEX_IS_LINE_SEPARATOR;
lex[':'] = LEX_IS_COLON;
+#ifdef TC_M68K
+ scrub_m68k_mri = m68k_mri;
+
if (! m68k_mri)
+#endif
{
lex['"'] = LEX_IS_STRINGQUOTE;
-#ifndef TC_HPPA
+#if ! defined (TC_HPPA) && ! defined (TC_I370)
+ /* I370 uses single-quotes to delimit integer, float constants */
lex['\''] = LEX_IS_ONECHAR_QUOTE;
#endif
@@ -114,6 +132,19 @@ do_scrub_begin (m68k_mri)
lex[(unsigned char) *p] = LEX_IS_SYMBOL_COMPONENT;
} /* declare symbol characters */
+ for (c = 128; c < 256; ++c)
+ lex[c] = LEX_IS_SYMBOL_COMPONENT;
+
+#ifdef tc_symbol_chars
+ /* This macro permits the processor to specify all characters which
+ may appears in an operand. This will prevent the scrubber from
+ discarding meaningful whitespace in certain cases. The i386
+ backend uses this to support prefixes, which can confuse the
+ scrubber as to whether it is parsing operands or opcodes. */
+ for (p = tc_symbol_chars; *p; ++p)
+ lex[(unsigned char) *p] = LEX_IS_SYMBOL_COMPONENT;
+#endif
+
/* The m68k backend wants to be able to change comment_chars. */
#ifndef tc_comment_chars
#define tc_comment_chars comment_chars
@@ -140,6 +171,7 @@ do_scrub_begin (m68k_mri)
lex['/'] = LEX_IS_TWOCHAR_COMMENT_1ST;
}
+#ifdef TC_M68K
if (m68k_mri)
{
lex['\''] = LEX_IS_STRINGQUOTE;
@@ -149,13 +181,18 @@ do_scrub_begin (m68k_mri)
then it can't be used in an expression. */
lex['!'] = LEX_IS_LINE_COMMENT_START;
}
+#endif
#ifdef TC_V850
lex['-'] = LEX_IS_DOUBLEDASH_1ST;
#endif
-#ifdef TC_M32R
+#ifdef DOUBLEBAR_PARALLEL
lex['|'] = LEX_IS_DOUBLEBAR_1ST;
#endif
+#ifdef TC_D30V
+ /* must do this is we want VLIW instruction with "->" or "<-" */
+ lex['-'] = LEX_IS_SYMBOL_COMPONENT;
+#endif
} /* do_scrub_begin() */
/* Saved state of the scrubber */
@@ -166,6 +203,7 @@ static char out_buf[20];
static int add_newlines;
static char *saved_input;
static int saved_input_len;
+static char input_buffer[32 * 1024];
static const char *mri_state;
static char mri_last_ch;
@@ -176,16 +214,21 @@ static char mri_last_ch;
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;
- int scrub_m68k_mri;
- const char *mri_state;
- char mri_last_ch;
+ 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;
+#endif
+ const char * mri_state;
+ char mri_last_ch;
+#if defined TC_ARM && defined OBJ_ELF
+ const char * symver_state;
+#endif
};
char *
@@ -199,11 +242,22 @@ app_push ()
saved->out_string = out_string;
memcpy (saved->out_buf, out_buf, sizeof (out_buf));
saved->add_newlines = add_newlines;
- saved->saved_input = saved_input;
- saved->saved_input_len = saved_input_len;
+ if (saved_input == NULL)
+ saved->saved_input = NULL;
+ else
+ {
+ saved->saved_input = xmalloc (saved_input_len);
+ memcpy (saved->saved_input, saved_input, saved_input_len);
+ saved->saved_input_len = saved_input_len;
+ }
+#ifdef TC_M68K
saved->scrub_m68k_mri = scrub_m68k_mri;
+#endif
saved->mri_state = mri_state;
saved->mri_last_ch = mri_last_ch;
+#if defined TC_ARM && defined OBJ_ELF
+ saved->symver_state = symver_state;
+#endif
/* do_scrub_begin() is not useful, just wastes time. */
@@ -225,11 +279,24 @@ app_pop (arg)
out_string = saved->out_string;
memcpy (out_buf, saved->out_buf, sizeof (out_buf));
add_newlines = saved->add_newlines;
- saved_input = saved->saved_input;
- saved_input_len = saved->saved_input_len;
+ if (saved->saved_input == NULL)
+ saved_input = NULL;
+ else
+ {
+ assert (saved->saved_input_len <= (int) (sizeof input_buffer));
+ memcpy (input_buffer, saved->saved_input, saved->saved_input_len);
+ saved_input = input_buffer;
+ saved_input_len = saved->saved_input_len;
+ free (saved->saved_input);
+ }
+#ifdef TC_M68K
scrub_m68k_mri = saved->scrub_m68k_mri;
+#endif
mri_state = saved->mri_state;
mri_last_ch = saved->mri_last_ch;
+#if defined TC_ARM && defined OBJ_ELF
+ symver_state = saved->symver_state;
+#endif
free (arg);
} /* app_pop() */
@@ -274,7 +341,7 @@ process_escape (ch)
int
do_scrub_chars (get, tostart, tolen)
- int (*get) PARAMS ((char **));
+ int (*get) PARAMS ((char *, int));
char *tostart;
int tolen;
{
@@ -302,7 +369,7 @@ do_scrub_chars (get, tostart, tolen)
#ifdef TC_V850
12: After seeing a dash, looking for a second dash as a start of comment.
#endif
-#ifdef TC_M32R
+#ifdef DOUBLEBAR_PARALLEL
13: After seeing a vertical bar, looking for a second vertical bar as a parallel expression seperator.
#endif
*/
@@ -323,19 +390,16 @@ do_scrub_chars (get, tostart, tolen)
/* This macro gets the next input character. */
-#define GET() \
- (from < fromend \
- ? *from++ \
- : ((saved_input != NULL \
- ? (free (saved_input), \
- saved_input = NULL, \
- 0) \
- : 0), \
- fromlen = (*get) (&from), \
- fromend = from + fromlen, \
- (fromlen == 0 \
- ? EOF \
- : *from++)))
+#define GET() \
+ (from < fromend \
+ ? * (unsigned char *) (from++) \
+ : (saved_input = NULL, \
+ fromlen = (*get) (input_buffer, sizeof input_buffer), \
+ from = input_buffer, \
+ fromend = from + fromlen, \
+ (fromlen == 0 \
+ ? EOF \
+ : * (unsigned char *) (from++))))
/* This macro pushes a character back on the input stream. */
@@ -366,9 +430,10 @@ do_scrub_chars (get, tostart, tolen)
}
else
{
- fromlen = (*get) (&from);
+ fromlen = (*get) (input_buffer, sizeof input_buffer);
if (fromlen == 0)
return 0;
+ from = input_buffer;
fromend = from + fromlen;
}
@@ -398,7 +463,7 @@ do_scrub_chars (get, tostart, tolen)
if (ch == EOF)
{
- as_warn ("end of file in comment");
+ as_warn (_("end of file in comment"));
goto fromeof;
}
@@ -412,7 +477,7 @@ do_scrub_chars (get, tostart, tolen)
if (ch == EOF)
{
- as_warn ("end of file in comment");
+ as_warn (_("end of file in comment"));
goto fromeof;
}
@@ -491,7 +556,7 @@ do_scrub_chars (get, tostart, tolen)
ch = GET ();
if (ch == EOF)
{
- as_warn ("end of file in string: inserted '\"'");
+ as_warn (_("end of file in string: inserted '\"'"));
state = old_state;
UNGET ('\n');
PUT ('"');
@@ -557,7 +622,7 @@ do_scrub_chars (get, tostart, tolen)
break;
#if defined(IGNORE_NONSTANDARD_ESCAPES) | defined(ONLY_STANDARD_ESCAPES)
default:
- as_warn ("Unknown escape '\\%c' in string: Ignored", ch);
+ as_warn (_("Unknown escape '\\%c' in string: Ignored"), ch);
break;
#else /* ONLY_STANDARD_ESCAPES */
default:
@@ -566,7 +631,7 @@ do_scrub_chars (get, tostart, tolen)
#endif /* ONLY_STANDARD_ESCAPES */
case EOF:
- as_warn ("End of file in string: '\"' inserted");
+ as_warn (_("End of file in string: '\"' inserted"));
PUT ('"');
continue;
}
@@ -600,6 +665,35 @@ do_scrub_chars (get, tostart, tolen)
recycle:
+#if defined TC_ARM && defined OBJ_ELF
+ /* We need to watch out for .symver directives. See the comment later
+ in this function. */
+ if (symver_state == NULL)
+ {
+ if ((state == 0 || state == 1) && ch == symver_pseudo[0])
+ symver_state = symver_pseudo + 1;
+ }
+ else
+ {
+ /* We advance to the next state if we find the right
+ character. */
+ if (ch != '\0' && (*symver_state == ch))
+ ++symver_state;
+ else if (*symver_state != '\0')
+ /* We did not get the expected character, or we didn't
+ get a valid terminating character after seeing the
+ entire pseudo-op, so we must go back to the beginning. */
+ symver_state = NULL;
+ else
+ {
+ /* We've read the entire pseudo-op. If this is the end
+ of the line, go back to the beginning. */
+ if (IS_NEWLINE (ch))
+ symver_state = NULL;
+ }
+ }
+#endif /* TC_ARM && OBJ_ELF */
+
#ifdef TC_M68K
/* We want to have pseudo-ops which control whether we are in
MRI mode or not. Unfortunately, since m68k MRI mode affects
@@ -657,7 +751,7 @@ do_scrub_chars (get, tostart, tolen)
{
if (state != 0)
{
- as_warn ("end of file not at end of a line; newline inserted");
+ as_warn (_("end of file not at end of a line; newline inserted"));
state = 0;
PUT ('\n');
}
@@ -685,6 +779,21 @@ do_scrub_chars (get, tostart, tolen)
break;
}
+#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;
+ }
+ }
+#endif
if (IS_COMMENT (ch)
|| ch == '/'
|| IS_LINE_SEPARATOR (ch))
@@ -755,11 +864,7 @@ do_scrub_chars (get, tostart, tolen)
state = 10; /* Sp after symbol char */
goto recycle;
case 11:
- if (flag_m68k_mri
-#ifdef LABELS_WITHOUT_COLONS
- || 1
-#endif
- )
+ if (LABELS_WITHOUT_COLONS || flag_m68k_mri)
state = 1;
else
{
@@ -803,7 +908,7 @@ do_scrub_chars (get, tostart, tolen)
}
if (ch2 == EOF)
- as_warn ("end of file in multiline comment");
+ as_warn (_("end of file in multiline comment"));
ch = ' ';
goto recycle;
@@ -852,7 +957,7 @@ do_scrub_chars (get, tostart, tolen)
ch = GET ();
if (ch == EOF)
{
- as_warn ("end of file after a one-character quote; \\0 inserted");
+ as_warn (_("end of file after a one-character quote; \\0 inserted"));
ch = 0;
}
if (ch == '\\')
@@ -860,7 +965,7 @@ do_scrub_chars (get, tostart, tolen)
ch = GET ();
if (ch == EOF)
{
- as_warn ("end of file in escape character");
+ as_warn (_("end of file in escape character"));
ch = '\\';
}
else
@@ -872,7 +977,7 @@ do_scrub_chars (get, tostart, tolen)
if ((ch = GET ()) != '\'')
{
#ifdef REQUIRE_CHAR_CLOSE_QUOTE
- as_warn ("Missing close quote: (assumed)");
+ as_warn (_("Missing close quote: (assumed)"));
#else
if (ch != EOF)
UNGET (ch);
@@ -894,10 +999,14 @@ do_scrub_chars (get, tostart, tolen)
#endif
case LEX_IS_COLON:
+#ifdef KEEP_WHITE_AROUND_COLON
+ state = 9;
+#else
if (state == 9 || state == 10)
state = 3;
else if (state != 3)
state = 1;
+#endif
PUT (ch);
break;
@@ -931,13 +1040,13 @@ do_scrub_chars (get, tostart, tolen)
while (ch != EOF && ch != '\n');
if (ch == EOF)
{
- as_warn ("end of file in comment; newline inserted");
+ as_warn (_("end of file in comment; newline inserted"));
}
state = 0;
PUT ('\n');
break;
#endif
-#ifdef TC_M32R
+#ifdef DOUBLEBAR_PARALLEL
case LEX_IS_DOUBLEBAR_1ST:
ch2 = GET();
if (ch2 != '|')
@@ -985,7 +1094,7 @@ do_scrub_chars (get, tostart, tolen)
while (ch != EOF && IS_WHITESPACE (ch));
if (ch == EOF)
{
- as_warn ("end of file in comment; newline inserted");
+ as_warn (_("end of file in comment; newline inserted"));
PUT ('\n');
break;
}
@@ -995,7 +1104,7 @@ do_scrub_chars (get, tostart, tolen)
while (ch != EOF && !IS_NEWLINE (ch))
ch = GET ();
if (ch == EOF)
- as_warn ("EOF in Comment: Newline inserted");
+ as_warn (_("EOF in Comment: Newline inserted"));
state = 0;
PUT ('\n');
break;
@@ -1039,13 +1148,22 @@ do_scrub_chars (get, tostart, tolen)
goto de_fault;
/* Fall through. */
case LEX_IS_COMMENT_START:
+#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. */
+ if ((symver_state != NULL) && (*symver_state == 0))
+ goto de_fault;
+#endif
do
{
ch = GET ();
}
while (ch != EOF && !IS_NEWLINE (ch));
if (ch == EOF)
- as_warn ("end of file in comment; newline inserted");
+ as_warn (_("end of file in comment; newline inserted"));
state = 0;
PUT ('\n');
break;
@@ -1067,7 +1185,12 @@ do_scrub_chars (get, tostart, tolen)
/* This is a common case. Quickly copy CH and all the
following symbol component or normal characters. */
- if (to + 1 < toend && mri_state == NULL)
+ if (to + 1 < toend
+ && mri_state == NULL
+#if defined TC_ARM && defined OBJ_ELF
+ && symver_state == NULL
+#endif
+ )
{
char *s;
int len;
@@ -1076,7 +1199,7 @@ do_scrub_chars (get, tostart, tolen)
{
int type;
- ch2 = *s;
+ ch2 = * (unsigned char *) s;
type = lex[ch2];
if (type != 0
&& type != LEX_IS_SYMBOL_COMPONENT)
@@ -1137,6 +1260,23 @@ do_scrub_chars (get, tostart, tolen)
}
else if (state == 10)
{
+ if (ch == '\\')
+ {
+ /* Special handling for backslash: a backslash may
+ be the beginning of a formal parameter (of a
+ macro) following another symbol character, with
+ whitespace in between. If that is the case, we
+ output a space before the parameter. Strictly
+ speaking, correct handling depends upon what the
+ macro parameter expands into; if the parameter
+ expands into something which does not start with
+ an operand character, then we don't want to keep
+ the space. We don't have enough information to
+ make the right choice, so here we are making the
+ choice which is more likely to be correct. */
+ PUT (' ');
+ }
+
state = 3;
}
PUT (ch);
@@ -1155,23 +1295,12 @@ do_scrub_chars (get, tostart, tolen)
processed. */
if (fromend > from)
{
- char *save;
-
- save = (char *) xmalloc (fromend - from);
- memcpy (save, from, fromend - from);
- if (saved_input != NULL)
- free (saved_input);
- saved_input = save;
+ saved_input = from;
saved_input_len = fromend - from;
}
else
- {
- if (saved_input != NULL)
- {
- free (saved_input);
- saved_input = NULL;
- }
- }
+ saved_input = NULL;
+
return to - tostart;
}
diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c
index d7ed4b8..f02c42a 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, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -43,7 +43,10 @@
#include "output-file.h"
#include "sb.h"
#include "macro.h"
-#ifndef HAVE_ITBL_CPU
+
+#ifdef HAVE_ITBL_CPU
+#include "itbl-ops.h"
+#else
#define itbl_parse(itbl_file) 1
#define itbl_init()
#endif
@@ -108,87 +111,12 @@ struct itbl_file_list
static struct itbl_file_list *itbl_files;
-void
-print_version_id ()
-{
- static int printed;
- if (printed)
- return;
- printed = 1;
-
- fprintf (stderr, "GNU assembler version %s (%s)", VERSION, TARGET_ALIAS);
-#ifdef BFD_ASSEMBLER
- fprintf (stderr, ", using BFD version %s", BFD_VERSION);
-#endif
- fprintf (stderr, "\n");
-}
-
-static void
-show_usage (stream)
- FILE *stream;
-{
- fprintf (stream, "Usage: %s [option...] [asmfile...]\n", myname);
-
- fprintf (stream, "\
-Options:\n\
--a[sub-option...] turn on listings\n\
- Sub-options [default hls]:\n\
- c omit false conditionals\n\
- d omit debugging directives\n\
- h include high-level source\n\
- l include assembly\n\
- m include macro expansions\n\
- n omit forms processing\n\
- s include symbols\n\
- =file set listing file name (must be last sub-option)\n");
- fprintf (stream, "\
--D produce assembler debugging messages\n\
---defsym SYM=VAL define symbol SYM to given value\n\
--f skip whitespace and comment preprocessing\n\
---gstabs generate stabs debugging information\n\
---help show this message and exit\n\
--I DIR add DIR to search list for .include directives\n\
--J don't warn about signed overflow\n\
--K warn when differences altered for long displacements\n\
--L,--keep-locals keep local symbols (e.g. starting with `L')\n");
- fprintf (stream, "\
--M,--mri assemble in MRI compatibility mode\n\
---MD FILE write dependency information in FILE (default none)\n\
--nocpp ignored\n\
--o OBJFILE name the object-file output OBJFILE (default a.out)\n\
--R fold data section into text section\n\
---statistics print various measured statistics from execution\n\
---strip-local-absolute strip local absolute symbols\n\
---traditional-format Use same format as native assembler when possible\n\
---version print assembler version number and exit\n\
--W suppress warnings\n\
---itbl INSTTBL extend instruction set to include instructions\n\
- matching the specifications defined in file INSTTBL\n\
--w ignored\n\
--X ignored\n\
--Z generate object file even after errors\n");
- fprintf (stream, "\
---listing-lhs-width set the width in words of the output data column of\n\
- the listing\n\
---listing-lhs-width2 set the width in words of the continuation lines\n\
- of the output data column; ignored if smaller than\n\
- the width of the first line\n\
---listing-rhs-width set the max width in characters of the lines from\n\
- the source file\n\
---listing-cont-lines set the maximum number of continuation lines used\n\
- for the output data column of the listing\n");
-
- md_show_usage (stream);
-
- fprintf (stream, "\nReport bugs to bug-gnu-utils@gnu.org\n");
-}
-
#ifdef USE_EMULATIONS
#define EMULATION_ENVIRON "AS_EMULATION"
extern struct emulation mipsbelf, mipslelf, mipself;
extern struct emulation mipsbecoff, mipslecoff, mipsecoff;
-extern struct emulation i386coff, i386elf;
+extern struct emulation i386coff, i386elf, i386aout;
static struct emulation *const emulations[] = { EMULATIONS };
static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]);
@@ -217,7 +145,7 @@ select_emulation_mode (argc, argv)
p = argv[i+1];
if (!p || !*p)
- as_fatal ("missing emulation mode name");
+ as_fatal (_("missing emulation mode name"));
em = p;
do_default:
@@ -232,7 +160,7 @@ select_emulation_mode (argc, argv)
if (!strcmp (emulations[i]->name, em))
break;
if (i == n_emulations)
- as_fatal ("unrecognized emulation name `%s'", em);
+ as_fatal (_("unrecognized emulation name `%s'"), em);
this_emulation = emulations[i];
}
else
@@ -270,6 +198,134 @@ common_emul_init ()
}
#endif
+void
+print_version_id ()
+{
+ static int printed;
+ if (printed)
+ return;
+ printed = 1;
+
+#ifdef BFD_ASSEMBLER
+ fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
+ VERSION, TARGET_ALIAS, BFD_VERSION);
+#else
+ fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
+#endif
+ fprintf (stderr, "\n");
+}
+
+static void
+show_usage (stream)
+ FILE *stream;
+{
+ fprintf (stream, _("Usage: %s [option...] [asmfile...]\n"), myname);
+
+ fprintf (stream, _("\
+Options:\n\
+ -a[sub-option...] turn on listings\n\
+ Sub-options [default hls]:\n\
+ c omit false conditionals\n\
+ d omit debugging directives\n\
+ h include high-level source\n\
+ l include assembly\n\
+ m include macro expansions\n\
+ n omit forms processing\n\
+ s include symbols\n\
+ L include line debug statistics (if applicable)\n\
+ =FILE list to FILE (must be last sub-option)\n"));
+
+ fprintf (stream, _("\
+ -D produce assembler debugging messages\n"));
+ fprintf (stream, _("\
+ --defsym SYM=VAL define symbol SYM to given value\n"));
+#ifdef USE_EMULATIONS
+ {
+ int i;
+ char *def_em;
+
+ fprintf (stream, "\
+ --em=[");
+ 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)
+ def_em = DEFAULT_EMULATION;
+ fprintf (stream, _("\
+ emulate output (default %s)\n"), def_em);
+ }
+#endif
+ fprintf (stream, _("\
+ -f skip whitespace and comment preprocessing\n"));
+ fprintf (stream, _("\
+ --gstabs generate stabs debugging information\n"));
+ fprintf (stream, _("\
+ --gdwarf2 generate DWARF2 debugging information\n"));
+ fprintf (stream, _("\
+ --help show this message and exit\n"));
+ fprintf (stream, _("\
+ -I DIR add DIR to search list for .include directives\n"));
+ fprintf (stream, _("\
+ -J don't warn about signed overflow\n"));
+ fprintf (stream, _("\
+ -K warn when differences altered for long displacements\n"));
+ fprintf (stream, _("\
+ -L,--keep-locals keep local symbols (e.g. starting with `L')\n"));
+ fprintf (stream, _("\
+ -M,--mri assemble in MRI compatibility mode\n"));
+ fprintf (stream, _("\
+ --MD FILE write dependency information in FILE (default none)\n"));
+ fprintf (stream, _("\
+ -nocpp ignored\n"));
+ fprintf (stream, _("\
+ -o OBJFILE name the object-file output OBJFILE (default a.out)\n"));
+ fprintf (stream, _("\
+ -R fold data section into text section\n"));
+ fprintf (stream, _("\
+ --statistics print various measured statistics from execution\n"));
+ fprintf (stream, _("\
+ --strip-local-absolute strip local absolute symbols\n"));
+ fprintf (stream, _("\
+ --traditional-format Use same format as native assembler when possible\n"));
+ fprintf (stream, _("\
+ --version print assembler version number and exit\n"));
+ fprintf (stream, _("\
+ -W --no-warn suppress warnings\n"));
+ fprintf (stream, _("\
+ --warn don't suppress warnings\n"));
+ fprintf (stream, _("\
+ --fatal-warnings treat warnings as errors\n"));
+ fprintf (stream, _("\
+ --itbl INSTTBL extend instruction set to include instructions\n\
+ matching the specifications defined in file INSTTBL\n"));
+ fprintf (stream, _("\
+ -w ignored\n"));
+ fprintf (stream, _("\
+ -X ignored\n"));
+ fprintf (stream, _("\
+ -Z generate object file even after errors\n"));
+ fprintf (stream, _("\
+ --listing-lhs-width set the width in words of the output data column of\n\
+ the listing\n"));
+ fprintf (stream, _("\
+ --listing-lhs-width2 set the width in words of the continuation lines\n\
+ of the output data column; ignored if smaller than\n\
+ the width of the first line\n"));
+ fprintf (stream, _("\
+ --listing-rhs-width set the max width in characters of the lines from\n\
+ the source file\n"));
+ fprintf (stream, _("\
+ --listing-cont-lines set the maximum number of continuation lines used\n\
+ for the output data column of the listing\n"));
+
+ md_show_usage (stream);
+
+ fputc ('\n', stream);
+ 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 "".
@@ -359,7 +415,14 @@ parse_args (pargc, pargv)
#define OPTION_STRIP_LOCAL_ABSOLUTE (OPTION_STD_BASE + 15)
{"strip-local-absolute", no_argument, NULL, OPTION_STRIP_LOCAL_ABSOLUTE},
#define OPTION_TRADITIONAL_FORMAT (OPTION_STD_BASE + 16)
- {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT}
+ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
+#define OPTION_GDWARF2 (OPTION_STD_BASE + 17)
+ {"gdwarf2", no_argument, NULL, OPTION_GDWARF2},
+ {"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)
+ {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
};
/* Construct the option lists from the standard list and the
@@ -450,33 +513,33 @@ 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 1997 Free Software Foundation, Inc.\n");
- printf ("\
+ printf (_("GNU assembler %s\n"), VERSION);
+ printf (_("Copyright 2000 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");
- printf ("This assembler was configured for a target of `%s'.\n",
+the GNU General Public License. This program has absolutely no warranty.\n"));
+ printf (_("This assembler was configured for a target of `%s'.\n"),
TARGET_ALIAS);
exit (EXIT_SUCCESS);
case OPTION_EMULATION:
#ifdef USE_EMULATIONS
if (strcmp (optarg, this_emulation->name))
- as_fatal ("multiple emulation names specified");
+ as_fatal (_("multiple emulation names specified"));
#else
- as_fatal ("emulations not handled in this configuration");
+ as_fatal (_("emulations not handled in this configuration"));
#endif
break;
case OPTION_DUMPCONFIG:
- fprintf (stderr, "alias = %s\n", TARGET_ALIAS);
- fprintf (stderr, "canonical = %s\n", TARGET_CANONICAL);
- fprintf (stderr, "cpu-type = %s\n", TARGET_CPU);
+ fprintf (stderr, _("alias = %s\n"), TARGET_ALIAS);
+ fprintf (stderr, _("canonical = %s\n"), TARGET_CANONICAL);
+ fprintf (stderr, _("cpu-type = %s\n"), TARGET_CPU);
#ifdef TARGET_OBJ_FORMAT
- fprintf (stderr, "format = %s\n", TARGET_OBJ_FORMAT);
+ fprintf (stderr, _("format = %s\n"), TARGET_OBJ_FORMAT);
#endif
#ifdef TARGET_FORMAT
- fprintf (stderr, "bfd-target = %s\n", TARGET_FORMAT);
+ fprintf (stderr, _("bfd-target = %s\n"), TARGET_FORMAT);
#endif
exit (EXIT_SUCCESS);
@@ -489,7 +552,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
for (s = optarg; *s != '\0' && *s != '='; s++)
;
if (*s == '\0')
- as_fatal ("bad defsym; format is --defsym name=value");
+ as_fatal (_("bad defsym; format is --defsym name=value"));
*s++ = '\0';
i = strtol (s, (char **) NULL, 0);
n = (struct defsym_list *) xmalloc (sizeof *n);
@@ -509,7 +572,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
if (optarg == NULL)
{
- as_warn ( "No file name following -t option\n" );
+ as_warn ( _("No file name following -t option\n") );
break;
}
@@ -525,7 +588,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
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);
}
@@ -540,6 +603,10 @@ the GNU General Public License. This program has absolutely no warranty.\n");
debug_type = DEBUG_STABS;
break;
+ case OPTION_GDWARF2:
+ debug_type = DEBUG_DWARF2;
+ break;
+
case 'J':
flag_signed_overflow_ok = 1;
break;
@@ -588,6 +655,16 @@ the GNU General Public License. This program has absolutely no warranty.\n");
flag_no_warnings = 1;
break;
+ case OPTION_WARN:
+ flag_no_warnings = 0;
+ flag_fatal_warnings = 0;
+ break;
+
+ case OPTION_WARN_FATAL:
+ flag_no_warnings = 0;
+ flag_fatal_warnings = 1;
+ break;
+
case 'Z':
flag_always_generate_output = 1;
break;
@@ -625,7 +702,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
optarg += strlen (listing_filename);
break;
default:
- as_fatal ("invalid listing option `%c'", *optarg);
+ as_fatal (_("invalid listing option `%c'"), *optarg);
break;
}
optarg++;
@@ -685,6 +762,11 @@ main (argc, argv)
start_time = get_run_time ();
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
if (debug_memory)
{
@@ -813,6 +895,9 @@ 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 (had_errors () > 0 && ! flag_always_generate_output)
keep_it = 0;
@@ -837,16 +922,15 @@ main (argc, argv)
static void
dump_statistics ()
{
- extern char **environ;
#ifdef HAVE_SBRK
char *lim = (char *) sbrk (0);
#endif
long run_time = get_run_time () - start_time;
- fprintf (stderr, "%s: total time in assembly: %ld.%06ld\n",
+ fprintf (stderr, _("%s: total time in assembly: %ld.%06ld\n"),
myname, run_time / 1000000, run_time % 1000000);
#ifdef HAVE_SBRK
- fprintf (stderr, "%s: data size %ld\n",
+ fprintf (stderr, _("%s: data size %ld\n"),
myname, (long) (lim - (char *) &environ));
#endif
@@ -930,9 +1014,9 @@ perform_an_assembly_pass (argc, argv)
bfd_set_section_flags (stdoutput, text_section,
applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC
| SEC_CODE | SEC_READONLY));
- /* @@ FIXME -- SEC_CODE seems to mean code only, rather than code possibly.*/
bfd_set_section_flags (stdoutput, data_section,
- applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC));
+ applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_DATA));
bfd_set_section_flags (stdoutput, bss_section, applicable & SEC_ALLOC);
seg_info (bss_section)->bss = 1;
subseg_new (BFD_ABS_SECTION_NAME, 0);
diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h
index 3f457e9..e56d6cd 100644
--- a/contrib/binutils/gas/as.h
+++ b/contrib/binutils/gas/as.h
@@ -1,5 +1,5 @@
/* as.h - global header file
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -38,6 +38,7 @@
*/
#include "config.h"
+#include "bin-bugs.h"
/* This is the code recommended in the autoconf documentation, almost
verbatim. If it doesn't work for you, let me know, and notify
@@ -111,7 +112,7 @@ extern void *alloca ();
#ifdef DEBUG
#undef NDEBUG
#endif
-#if !defined (__GNUC__) || __GNUC_MINOR__ <= 5
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
#define __PRETTY_FUNCTION__ ((char*)0)
#endif
#if 0
@@ -137,14 +138,14 @@ extern void *alloca ();
/* Now GNU header files... */
-#include <ansidecl.h>
+#include "ansidecl.h"
#ifdef BFD_ASSEMBLER
-#include <bfd.h>
+#include "bfd.h"
#endif
-#include <libiberty.h>
+#include "libiberty.h"
/* Define the standard progress macros. */
-#include <progress.h>
+#include "progress.h"
/* This doesn't get taken care of anywhere. */
#ifndef __MWERKS__ /* Metrowerks C chokes on the "defined (inline)" */
@@ -167,6 +168,9 @@ extern void free ();
#ifdef NEED_DECLARATION_ERRNO
extern int errno;
#endif
+#ifdef NEED_DECLARATION_ENVIRON
+extern char **environ;
+#endif
/* This is needed for VMS. */
#if ! defined (HAVE_UNLINK) && defined (HAVE_REMOVE)
@@ -207,14 +211,20 @@ extern int errno;
#define EXIT_FAILURE 1
#endif
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free xfree
#define xfree free
+#include "asintl.h"
+
#define BAD_CASE(val) \
{ \
- as_fatal("Case value %ld unexpected at line %d of file \"%s\"\n", \
+ as_fatal(_("Case value %ld unexpected at line %d of file \"%s\"\n"), \
(long) val, __LINE__, __FILE__); \
}
@@ -412,9 +422,6 @@ COMMON int flag_keep_locals; /* -L */
/* True if we are assembling in MRI mode. */
COMMON int flag_mri;
-/* True if we are assembling in m68k MRI mode. */
-COMMON int flag_m68k_mri;
-
/* Should the data section be made read-only and appended to the text
section? */
COMMON unsigned char flag_readonly_data_in_text; /* -R */
@@ -422,6 +429,9 @@ COMMON unsigned char flag_readonly_data_in_text; /* -R */
/* True if warnings should be inhibited. */
COMMON int flag_no_warnings; /* -W */
+/* True if warnings count as errors. */
+COMMON int flag_fatal_warnings; /* --fatal-warnings */
+
/* True if we should attempt to generate output even if non-fatal errors
are detected. */
COMMON unsigned char flag_always_generate_output; /* -Z */
@@ -452,9 +462,17 @@ COMMON int linkrelax;
extern int listing;
/* Type of debugging information we should generate. We currently
- only support stabs and ECOFF. */
+ support stabs, ECOFF, and DWARF2. */
-enum debug_info_type { DEBUG_NONE, DEBUG_STABS, DEBUG_ECOFF };
+enum debug_info_type
+ {
+ DEBUG_UNSPECIFIED,
+ DEBUG_NONE,
+ DEBUG_STABS,
+ DEBUG_ECOFF,
+ DEBUG_DWARF,
+ DEBUG_DWARF2
+ };
extern enum debug_info_type debug_type;
@@ -494,7 +512,7 @@ typedef struct _pseudo_type pseudo_typeS;
#if (__GNUC__ >= 2) && !defined(VMS)
/* for use with -Wformat */
-#if __GNUC_MINOR__ < 6
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 6
/* Support for double underscores in attribute names was added in gcc
2.6, so avoid them if we are using an earlier version. */
#define __printf__ printf
@@ -525,14 +543,14 @@ typedef struct _pseudo_type pseudo_typeS;
#endif /* ! USE_STDARG */
PRINTF_LIKE (as_bad);
-PRINTF_LIKE (as_fatal);
+PRINTF_LIKE (as_fatal) ATTRIBUTE_NORETURN;
PRINTF_LIKE (as_tsktsk);
PRINTF_LIKE (as_warn);
PRINTF_WHERE_LIKE (as_bad_where);
PRINTF_WHERE_LIKE (as_warn_where);
void as_assert PARAMS ((const char *, int, const char *));
-void as_abort PARAMS ((const char *, int, const char *));
+void as_abort PARAMS ((const char *, int, const char *)) ATTRIBUTE_NORETURN;
void fprint_value PARAMS ((FILE *file, addressT value));
void sprint_value PARAMS ((char *buf, addressT value));
@@ -544,9 +562,11 @@ void print_version_id PARAMS ((void));
char *app_push PARAMS ((void));
char *atof_ieee PARAMS ((char *str, int what_kind, LITTLENUM_TYPE * words));
char *input_scrub_include_file PARAMS ((char *filename, char *position));
+extern void input_scrub_insert_line PARAMS((const char *line));
+extern void input_scrub_insert_file PARAMS((char *path));
char *input_scrub_new_file PARAMS ((char *filename));
char *input_scrub_next_buffer PARAMS ((char **bufp));
-int do_scrub_chars PARAMS ((int (*get) (char **), char *to, int tolen));
+int do_scrub_chars PARAMS ((int (*get) (char *, int), char *to, int tolen));
int gen_to_words PARAMS ((LITTLENUM_TYPE * words, int precision,
long exponent_bits));
int had_err PARAMS ((void));
@@ -572,6 +592,7 @@ void subseg_set PARAMS ((segT seg, subsegT subseg));
#ifdef BFD_ASSEMBLER
segT subseg_get PARAMS ((const char *, int));
#endif
+int subseg_text_p PARAMS ((segT));
void start_dependencies PARAMS ((char *));
void register_dependency PARAMS ((char *));
@@ -579,13 +600,13 @@ void print_dependencies PARAMS ((void));
struct expressionS;
struct fix;
-struct symbol;
+typedef struct symbol symbolS;
struct relax_type;
typedef struct frag fragS;
#ifdef BFD_ASSEMBLER
/* literal.c */
-valueT add_to_literal_pool PARAMS ((struct symbol *, valueT, segT, int));
+valueT add_to_literal_pool PARAMS ((symbolS *, valueT, segT, int));
#endif
int check_eh_frame PARAMS ((struct expressionS *, unsigned int *));
@@ -598,7 +619,6 @@ void eh_frame_convert_frag PARAMS ((fragS *));
/* this one starts the chain of target dependant headers */
#include "targ-env.h"
-#include "struc-symbol.h"
#include "write.h"
#include "frags.h"
#include "hash.h"
@@ -613,6 +633,17 @@ void eh_frame_convert_frag PARAMS ((fragS *));
#endif
#include "listing.h"
+#ifdef TC_M68K
+/* True if we are assembling in m68k MRI mode. */
+COMMON int flag_m68k_mri;
+#else
+#define flag_m68k_mri 0
+#endif
+
+#ifndef NUMBERS_WITH_SUFFIX
+#define NUMBERS_WITH_SUFFIX 0
+#endif
+
#ifndef LOCAL_LABELS_DOLLAR
#define LOCAL_LABELS_DOLLAR 0
#endif
@@ -621,12 +652,30 @@ void eh_frame_convert_frag PARAMS ((fragS *));
#define LOCAL_LABELS_FB 0
#endif
+#ifndef LABELS_WITHOUT_COLONS
+#define LABELS_WITHOUT_COLONS 0
+#endif
+
+#ifndef NO_PSEUDO_DOT
+#define NO_PSEUDO_DOT 0
+#endif
+
#ifndef TEXT_SECTION_NAME
#define TEXT_SECTION_NAME ".text"
#define DATA_SECTION_NAME ".data"
#define BSS_SECTION_NAME ".bss"
#endif
+#ifndef OCTETS_PER_BYTE_POWER
+#define OCTETS_PER_BYTE_POWER 0
+#endif
+#ifndef OCTETS_PER_BYTE
+#define OCTETS_PER_BYTE (1<<OCTETS_PER_BYTE_POWER)
+#endif
+#if OCTETS_PER_BYTE != (1<<OCTETS_PER_BYTE_POWER)
+ #error "Octets per byte conflicts with its power-of-two definition!"
+#endif
+
#endif /* GAS */
/* end of as.h */
diff --git a/contrib/binutils/gas/asintl.h b/contrib/binutils/gas/asintl.h
new file mode 100644
index 0000000..b733c85
--- /dev/null
+++ b/contrib/binutils/gas/asintl.h
@@ -0,0 +1,44 @@
+/* asintl.h - gas-specific header for gettext code.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+
+ Written by Tom Tromey <tromey@cygnus.com>
+
+ 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. */
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) gettext (String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# 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 _(String) (String)
+# define N_(String) (String)
+#endif
diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c
index e3ae2e1..de29f21 100644
--- a/contrib/binutils/gas/atof-generic.c
+++ b/contrib/binutils/gas/atof-generic.c
@@ -220,7 +220,7 @@ atof_generic (address_of_string_pointer,
&& (!c || !strchr (string_of_decimal_exponent_marks, c)));
p++)
{
- if (isdigit (c))
+ if (isdigit ((unsigned char) c))
{
/* This may be retracted below. */
number_of_digits_after_decimal++;
@@ -435,7 +435,7 @@ atof_generic (address_of_string_pointer,
* We have a GROSS internal error.
* This should never happen.
*/
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
}
}
else
diff --git a/contrib/binutils/gas/cgen.c b/contrib/binutils/gas/cgen.c
index 2c541ef..e15e1b6 100644
--- a/contrib/binutils/gas/cgen.c
+++ b/contrib/binutils/gas/cgen.c
@@ -1,5 +1,5 @@
/* GAS interface for targets using CGEN: Cpu tools GENerator.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,11 +19,17 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <setjmp.h>
#include "ansidecl.h"
+#include "libiberty.h"
#include "bfd.h"
#include "symcat.h"
-#include "cgen-opc.h"
+#include "cgen-desc.h"
#include "as.h"
#include "subsegs.h"
+#include "cgen.h"
+
+/* Opcode table descriptor, must be set by md_begin. */
+
+CGEN_CPU_DESC gas_cgen_cpu_desc;
/* Callback to insert a register into the symbol table.
A target may choose to let GAS parse the registers.
@@ -32,7 +38,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
void
cgen_asm_record_register (name, number)
char * name;
- int number;
+ int number;
{
/* Use symbol_create here instead of symbol_new so we don't try to
output registers into the object file's symbol table. */
@@ -53,21 +59,19 @@ cgen_asm_record_register (name, number)
struct fixup
{
- int opindex;
- int opinfo;
+ int opindex;
+ int opinfo;
expressionS exp;
};
-#define MAX_FIXUPS 5
-
-static struct fixup fixups [MAX_FIXUPS];
-static int num_fixups;
+static struct fixup fixups [GAS_CGEN_MAX_FIXUPS];
+static int num_fixups;
/* Prepare to parse an instruction.
??? May wish to make this static and delete calls in md_assemble. */
void
-cgen_asm_init_parse ()
+gas_cgen_init_parse ()
{
num_fixups = 0;
}
@@ -75,13 +79,13 @@ cgen_asm_init_parse ()
/* Queue a fixup. */
static void
-cgen_queue_fixup (opindex, opinfo, expP)
+queue_fixup (opindex, opinfo, expP)
int opindex;
expressionS * expP;
{
/* We need to generate a fixup for this expression. */
- if (num_fixups >= MAX_FIXUPS)
- as_fatal ("too many fixups");
+ if (num_fixups >= GAS_CGEN_MAX_FIXUPS)
+ as_fatal (_("too many fixups"));
fixups[num_fixups].exp = * expP;
fixups[num_fixups].opindex = opindex;
fixups[num_fixups].opinfo = opinfo;
@@ -92,11 +96,14 @@ cgen_queue_fixup (opindex, opinfo, expP)
and to have this backup be swapped with the current chain. This allows
certain ports, eg the m32r, to swap two instructions and swap their fixups
at the same time. */
-static struct fixup saved_fixups [MAX_FIXUPS];
-static int saved_num_fixups;
+/* ??? I think with cgen_asm_finish_insn (or something else) there is no
+ more need for this. */
+
+static struct fixup saved_fixups [GAS_CGEN_MAX_FIXUPS];
+static int saved_num_fixups;
void
-cgen_save_fixups ()
+gas_cgen_save_fixups ()
{
saved_num_fixups = num_fixups;
@@ -106,7 +113,7 @@ cgen_save_fixups ()
}
void
-cgen_restore_fixups ()
+gas_cgen_restore_fixups ()
{
num_fixups = saved_num_fixups;
@@ -116,18 +123,18 @@ cgen_restore_fixups ()
}
void
-cgen_swap_fixups ()
+gas_cgen_swap_fixups ()
{
- int tmp;
+ int tmp;
struct fixup tmp_fixup;
if (num_fixups == 0)
{
- cgen_restore_fixups ();
+ gas_cgen_restore_fixups ();
}
else if (saved_num_fixups == 0)
{
- cgen_save_fixups ();
+ gas_cgen_save_fixups ();
}
else
{
@@ -135,7 +142,7 @@ cgen_swap_fixups ()
saved_num_fixups = num_fixups;
num_fixups = tmp;
- for (tmp = MAX_FIXUPS; tmp--;)
+ for (tmp = GAS_CGEN_MAX_FIXUPS; tmp--;)
{
tmp_fixup = saved_fixups [tmp];
saved_fixups [tmp] = fixups [tmp];
@@ -158,7 +165,7 @@ cgen_swap_fixups ()
operand type. We pick a BFD reloc type in md_apply_fix. */
fixS *
-cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
+gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
fragS * frag;
int where;
const CGEN_INSN * insn;
@@ -174,10 +181,12 @@ cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
but it is the operand that has a pc relative relocation. */
fixP = fix_new (frag, where, length / 8, symbol, offset,
- CGEN_OPERAND_ATTR (operand, CGEN_OPERAND_PCREL_ADDR) != 0,
- (bfd_reloc_code_real_type) ((int) BFD_RELOC_UNUSED + CGEN_OPERAND_INDEX (operand)));
- fixP->tc_fix_data.insn = (PTR) insn;
- fixP->tc_fix_data.opinfo = opinfo;
+ CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
+ (bfd_reloc_code_real_type)
+ ((int) BFD_RELOC_UNUSED
+ + (int) operand->type));
+ fixP->fx_cgen.insn = insn;
+ fixP->fx_cgen.opinfo = opinfo;
return fixP;
}
@@ -196,7 +205,7 @@ cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
operand type. We pick a BFD reloc type in md_apply_fix. */
fixS *
-cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
+gas_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
fragS * frag;
int where;
const CGEN_INSN * insn;
@@ -211,10 +220,12 @@ cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
but it is the operand that has a pc relative relocation. */
fixP = fix_new_exp (frag, where, length / 8, exp,
- CGEN_OPERAND_ATTR (operand, CGEN_OPERAND_PCREL_ADDR) != 0,
- (bfd_reloc_code_real_type) ((int) BFD_RELOC_UNUSED + CGEN_OPERAND_INDEX (operand)));
- fixP->tc_fix_data.insn = (PTR) insn;
- fixP->tc_fix_data.opinfo = opinfo;
+ CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
+ (bfd_reloc_code_real_type)
+ ((int) BFD_RELOC_UNUSED
+ + (int) operand->type));
+ fixP->fx_cgen.insn = insn;
+ fixP->fx_cgen.opinfo = opinfo;
return fixP;
}
@@ -234,28 +245,29 @@ static jmp_buf expr_jmp_buf;
The resulting value is stored in VALUEP. */
const char *
-cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
- enum cgen_parse_operand_type want;
- const char ** strP;
- int opindex;
- int opinfo;
+gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
+ CGEN_CPU_DESC cd;
+ enum cgen_parse_operand_type want;
+ const char ** strP;
+ int opindex;
+ int opinfo;
enum cgen_parse_operand_result * resultP;
- bfd_vma * valueP;
+ bfd_vma * valueP;
{
#ifdef __STDC__
- /* These is volatile to survive the setjmp. */
- char * volatile hold;
+ /* These are volatile to survive the setjmp. */
+ char * volatile hold;
enum cgen_parse_operand_result * volatile resultP_1;
#else
- static char * hold;
- static enum cgen_parse_operand_result * resultP_1;
+ static char * hold;
+ static enum cgen_parse_operand_result * resultP_1;
#endif
- const char * errmsg = NULL;
- expressionS exp;
+ const char * errmsg = NULL;
+ expressionS exp;
if (want == CGEN_PARSE_OPERAND_INIT)
{
- cgen_asm_init_parse ();
+ gas_cgen_init_parse ();
return NULL;
}
@@ -264,7 +276,7 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
input_line_pointer = (char *) * strP;
/* We rely on md_operand to longjmp back to us.
- This is done via cgen_md_operand. */
+ This is done via gas_cgen_md_operand. */
if (setjmp (expr_jmp_buf) != 0)
{
input_line_pointer = (char *) hold;
@@ -282,11 +294,11 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
switch (exp.X_op)
{
case O_illegal :
- errmsg = "illegal operand";
+ errmsg = _("illegal operand");
* resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_absent :
- errmsg = "missing operand";
+ errmsg = _("missing operand");
* resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_constant :
@@ -298,7 +310,7 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
* resultP = CGEN_PARSE_OPERAND_RESULT_REGISTER;
break;
default :
- cgen_queue_fixup (opindex, opinfo, & exp);
+ queue_fixup (opindex, opinfo, & exp);
* valueP = 0;
* resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
break;
@@ -313,7 +325,7 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
??? This could be done differently by adding code to `expression'. */
void
-cgen_md_operand (expressionP)
+gas_cgen_md_operand (expressionP)
expressionS * expressionP;
{
longjmp (expr_jmp_buf, 1);
@@ -322,24 +334,27 @@ cgen_md_operand (expressionP)
/* Finish assembling instruction INSN.
BUF contains what we've built up so far.
LENGTH is the size of the insn in bits.
- Returns the address of the buffer containing the assembled instruction,
- in case the caller needs to modify it for some reason. */
+ RELAX_P is non-zero if relaxable insns should be emitted as such.
+ Otherwise they're emitted in non-relaxable forms.
+ The "result" is stored in RESULT if non-NULL. */
-char *
-cgen_asm_finish_insn (insn, buf, length)
+void
+gas_cgen_finish_insn (insn, buf, length, relax_p, result)
const CGEN_INSN * insn;
- cgen_insn_t * buf;
- unsigned int length;
+ CGEN_INSN_BYTES_PTR buf;
+ unsigned int length;
+ int relax_p;
+ finished_insnS * result;
{
- int i;
- int relax_operand;
- char * f;
+ int i;
+ int relax_operand;
+ char * f;
unsigned int byte_len = length / 8;
/* ??? Target foo issues various warnings here, so one might want to provide
a hook here. However, our caller is defined in tc-foo.c so there
shouldn't be a need for a hook. */
-
+
/* Write out the instruction.
It is important to fetch enough space in one call to `frag_more'.
We use (f - frag_now->fr_literal) to compute where we are and we
@@ -348,21 +363,21 @@ cgen_asm_finish_insn (insn, buf, length)
Relaxable instructions: We need to ensure we allocate enough
space for the largest insn. */
- if (CGEN_INSN_ATTR (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX))
abort (); /* These currently shouldn't get here. */
/* Is there a relaxable insn with the relaxable operand needing a fixup? */
relax_operand = -1;
- if (CGEN_INSN_ATTR (insn, CGEN_INSN_RELAXABLE) != 0)
+ if (relax_p && CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXABLE))
{
/* Scan the fixups for the operand affected by relaxing
(i.e. the branch address). */
for (i = 0; i < num_fixups; ++ i)
{
- if (CGEN_OPERAND_ATTR (& CGEN_SYM (operand_table) [fixups[i].opindex],
- CGEN_OPERAND_RELAX) != 0)
+ if (CGEN_OPERAND_ATTR_VALUE (cgen_operand_lookup_by_num (gas_cgen_cpu_desc, fixups[i].opindex),
+ CGEN_OPERAND_RELAX))
{
relax_operand = i;
break;
@@ -372,7 +387,7 @@ cgen_asm_finish_insn (insn, buf, length)
if (relax_operand != -1)
{
- int max_len;
+ int max_len;
fragS * old_frag;
#ifdef TC_CGEN_MAX_RELAX
@@ -383,10 +398,10 @@ cgen_asm_finish_insn (insn, buf, length)
/* Ensure variable part and fixed part are in same fragment. */
/* FIXME: Having to do this seems like a hack. */
frag_grow (max_len);
-
+
/* Allocate space for the fixed part. */
f = frag_more (byte_len);
-
+
/* Create a relaxable fragment for this instruction. */
old_frag = frag_now;
@@ -399,36 +414,26 @@ cgen_asm_finish_insn (insn, buf, length)
fixups[relax_operand].exp.X_add_symbol,
fixups[relax_operand].exp.X_add_number,
f);
-
+
/* Record the operand number with the fragment so md_convert_frag
- can use cgen_md_record_fixup to record the appropriate reloc. */
+ can use gas_cgen_md_record_fixup to record the appropriate reloc. */
old_frag->fr_cgen.insn = insn;
old_frag->fr_cgen.opindex = fixups[relax_operand].opindex;
old_frag->fr_cgen.opinfo = fixups[relax_operand].opinfo;
+ if (result)
+ result->frag = old_frag;
}
else
- f = frag_more (byte_len);
+ {
+ f = frag_more (byte_len);
+ if (result)
+ result->frag = frag_now;
+ }
/* If we're recording insns as numbers (rather than a string of bytes),
target byte order handling is deferred until now. */
-#if 0 /*def CGEN_INT_INSN*/
- switch (length)
- {
- case 16:
- if (cgen_big_endian_p)
- bfd_putb16 ((bfd_vma) * buf, f);
- else
- bfd_putl16 ((bfd_vma) * buf, f);
- break;
- case 32:
- if (cgen_big_endian_p)
- bfd_putb32 ((bfd_vma) * buf, f);
- else
- bfd_putl32 ((bfd_vma) * buf, f);
- break;
- default:
- abort ();
- }
+#if CGEN_INT_INSN_P
+ cgen_put_insn_value (gas_cgen_cpu_desc, f, length, *buf);
#else
memcpy (f, buf, byte_len);
#endif
@@ -436,26 +441,35 @@ cgen_asm_finish_insn (insn, buf, length)
/* Create any fixups. */
for (i = 0; i < num_fixups; ++i)
{
+ fixS *fixP;
+ const CGEN_OPERAND *operand =
+ cgen_operand_lookup_by_num (gas_cgen_cpu_desc, fixups[i].opindex);
+
/* Don't create fixups for these. That's done during relaxation.
We don't need to test for CGEN_INSN_RELAX as they can't get here
(see above). */
- if (CGEN_INSN_ATTR (insn, CGEN_INSN_RELAXABLE) != 0
- && CGEN_OPERAND_ATTR (& CGEN_SYM (operand_table) [fixups[i].opindex],
- CGEN_OPERAND_RELAX) != 0)
+ if (relax_p
+ && CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXABLE)
+ && CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_RELAX))
continue;
#ifndef md_cgen_record_fixup_exp
-#define md_cgen_record_fixup_exp cgen_record_fixup_exp
+#define md_cgen_record_fixup_exp gas_cgen_record_fixup_exp
#endif
- md_cgen_record_fixup_exp (frag_now, f - frag_now->fr_literal,
- insn, length,
- & CGEN_SYM (operand_table) [fixups[i].opindex],
- fixups[i].opinfo,
- & fixups[i].exp);
+ fixP = md_cgen_record_fixup_exp (frag_now, f - frag_now->fr_literal,
+ insn, length, operand,
+ fixups[i].opinfo,
+ & fixups[i].exp);
+ if (result)
+ result->fixups[i] = fixP;
}
- return f;
+ if (result)
+ {
+ result->num_fixups = num_fixups;
+ result->addr = f;
+ }
}
/* Apply a fixup to the object code. This is called for all the
@@ -471,14 +485,16 @@ cgen_asm_finish_insn (insn, buf, length)
should handle them all. */
int
-cgen_md_apply_fix3 (fixP, valueP, seg)
+gas_cgen_md_apply_fix3 (fixP, valueP, seg)
fixS * fixP;
valueT * valueP;
segT seg;
{
char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
valueT value;
-
+ /* canonical name, since used a lot */
+ CGEN_CPU_DESC cd = gas_cgen_cpu_desc;
+
/* FIXME FIXME FIXME: The value we are passed in *valuep includes
the symbol values. Since we are using BFD_ASSEMBLER, if we are
doing this relocation the code in write.c is going to call
@@ -508,19 +524,19 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
{
/* We don't actually support subtracting a symbol. */
as_bad_where (fixP->fx_file, fixP->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
{
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
- const CGEN_OPERAND * operand = & CGEN_SYM (operand_table) [opindex];
- const char * errmsg;
+ int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ const CGEN_OPERAND *operand = cgen_operand_lookup_by_num (cd, opindex);
+ const char *errmsg;
bfd_reloc_code_real_type reloc_type;
- CGEN_FIELDS fields;
- const CGEN_INSN * insn = (CGEN_INSN *) fixP->tc_fix_data.insn;
+ CGEN_FIELDS *fields = alloca (CGEN_CPU_SIZEOF_FIELDS (cd));
+ const CGEN_INSN *insn = fixP->fx_cgen.insn;
/* If the reloc has been fully resolved finish the operand here. */
/* FIXME: This duplicates the capabilities of code in BFD. */
@@ -529,11 +545,27 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
finish the job. Testing for pcrel is a temporary hack. */
|| fixP->fx_pcrel)
{
- CGEN_FIELDS_BITSIZE (& fields) = CGEN_INSN_BITSIZE (insn);
- CGEN_SYM (set_operand) (opindex, & value, & fields);
- errmsg = CGEN_SYM (insert_operand) (opindex, & fields, where);
+ CGEN_CPU_SET_FIELDS_BITSIZE (cd) (fields, CGEN_INSN_BITSIZE (insn));
+ CGEN_CPU_SET_VMA_OPERAND (cd) (cd, opindex, fields, (bfd_vma) value);
+
+#if CGEN_INT_INSN_P
+ {
+ CGEN_INSN_INT insn_value =
+ cgen_get_insn_value (cd, where, CGEN_INSN_BITSIZE (insn));
+
+ /* ??? 0 is passed for `pc' */
+ errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
+ &insn_value, (bfd_vma) 0);
+ cgen_put_insn_value (cd, where, CGEN_INSN_BITSIZE (insn),
+ insn_value);
+ }
+#else
+ /* ??? 0 is passed for `pc' */
+ errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, where,
+ (bfd_vma) 0);
+#endif
if (errmsg)
- as_warn_where (fixP->fx_file, fixP->fx_line, "%s\n", errmsg);
+ as_bad_where (fixP->fx_file, fixP->fx_line, "%s", errmsg);
}
if (fixP->fx_done)
@@ -544,7 +576,7 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
bfd_install_relocation. Note that this doesn't work when
partial_inplace == false. */
- reloc_type = CGEN_SYM (lookup_reloc) (insn, operand, fixP);
+ reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
if (reloc_type != BFD_RELOC_NONE)
{
fixP->fx_r_type = reloc_type;
@@ -552,7 +584,7 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
else
{
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;
}
@@ -574,7 +606,10 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
break;
/* FIXME: later add support for 64 bits. */
default:
- abort ();
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("internal error: can't install fix for reloc type %d (`%s')"),
+ fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
+ break;
}
}
else
@@ -595,28 +630,35 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
FIXME: To what extent can we get all relevant targets to use this? */
arelent *
-cgen_tc_gen_reloc (section, fixP)
+gas_cgen_tc_gen_reloc (section, fixP)
asection * section;
fixS * fixP;
{
arelent * reloc;
- reloc = (arelent *) bfd_alloc (stdoutput, sizeof (arelent));
+ reloc = (arelent *) xmalloc (sizeof (arelent));
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,
- "internal error: can't export reloc type %d (`%s')",
+ _("internal error: can't export reloc type %d (`%s')"),
fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
return NULL;
}
assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
- reloc->sym_ptr_ptr = & fixP->fx_addsy->bsym;
- reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
- reloc->addend = fixP->fx_addnumber;
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
+
+ /* Use fx_offset for these cases */
+ 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;
+ reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
return reloc;
}
diff --git a/contrib/binutils/gas/cgen.h b/contrib/binutils/gas/cgen.h
new file mode 100644
index 0000000..2bc1732
--- /dev/null
+++ b/contrib/binutils/gas/cgen.h
@@ -0,0 +1,94 @@
+/* GAS cgen support.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef GAS_CGEN_H
+#define GAS_CGEN_H
+
+/* Opcode table handle. */
+extern CGEN_CPU_DESC gas_cgen_cpu_desc;
+
+/* Maximum number of fixups in an insn.
+ If you need to change this, allow target to override and do so there. */
+#define GAS_CGEN_MAX_FIXUPS 3
+
+/* Struct defining result of gas_cgen_finish_insn. */
+typedef struct {
+ /* frag containing the insn */
+ fragS * frag;
+ /* Address of insn in frag. */
+ char * addr;
+ /* Number of fixups this insn has. */
+ int num_fixups;
+ /* Array of fixups. */
+ fixS * fixups[GAS_CGEN_MAX_FIXUPS];
+} finished_insnS;
+
+/* Callback for operand parsing.
+ The result is an error message or NULL for success.
+ The parsed value is stored in the bfd_vma *. */
+extern const char * gas_cgen_parse_operand
+ PARAMS ((CGEN_CPU_DESC, enum cgen_parse_operand_type,
+ const char **, int, int, enum cgen_parse_operand_result *,
+ bfd_vma *));
+
+/* Call this from md_assemble to initialize the assembler callback. */
+extern void gas_cgen_init_parse PARAMS ((void));
+
+extern void gas_cgen_save_fixups PARAMS ((void));
+extern void gas_cgen_restore_fixups PARAMS ((void));
+extern void gas_cgen_swap_fixups PARAMS ((void));
+
+/* Add a register to the assembler's hash table.
+ This makes lets GAS parse registers for us.
+ ??? This isn't currently used, but it could be in the future. */
+extern void cgen_asm_record_register PARAMS ((char *, int));
+
+/* After CGEN_SYM (assemble_insn) is done, this is called to
+ output the insn and record any fixups. */
+extern void gas_cgen_finish_insn PARAMS ((const CGEN_INSN *,
+ CGEN_INSN_BYTES_PTR, unsigned int,
+ int, finished_insnS *));
+
+/* Record a fixup. */
+extern fixS * gas_cgen_record_fixup PARAMS ((fragS *, int, const CGEN_INSN *,
+ int, const CGEN_OPERAND *, int,
+ symbolS *, offsetT));
+extern fixS * gas_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *,
+ int, const CGEN_OPERAND *, int,
+ expressionS *));
+
+/* md_apply_fix3 handler */
+extern int gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
+
+/* tc_gen_reloc handler */
+extern arelent *gas_cgen_tc_gen_reloc PARAMS ((asection *, fixS *));
+
+/* Target supplied routine to lookup a reloc. */
+extern bfd_reloc_code_real_type
+md_cgen_lookup_reloc PARAMS ((const CGEN_INSN *, const CGEN_OPERAND *,
+ fixS *));
+
+/* Optional target supplied routine to record a fixup for an expression. */
+extern fixS *
+md_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *, int,
+ const CGEN_OPERAND *, int,
+ expressionS *));
+
+#endif /* GAS_CGEN_H */
diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c
index eef4747..025ca51 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, 1998
+ Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -64,7 +64,7 @@ s_ifdef (arg)
int arg;
{
register char *name; /* points to name of symbol */
- register struct symbol *symbolP; /* Points to symbol */
+ register symbolS *symbolP; /* Points to symbol */
struct conditional_frame cframe;
SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */
@@ -72,7 +72,7 @@ s_ifdef (arg)
if (!is_name_beginner (*name))
{
- as_bad ("invalid identifier for \".ifdef\"");
+ as_bad (_("invalid identifier for \".ifdef\""));
obstack_1grow (&cond_obstack, 0);
ignore_rest_of_line ();
}
@@ -125,7 +125,7 @@ s_if (arg)
{
expression (&operand);
if (operand.X_op != O_constant)
- as_bad ("non-constant expression in \".if\" statement");
+ as_bad (_("non-constant expression in \".if\" statement"));
}
switch ((operatorT) arg)
@@ -221,7 +221,7 @@ s_ifc (arg)
s1 = get_mri_string (',', &len1);
if (*input_line_pointer != ',')
- as_bad ("bad format for ifc or ifnc");
+ as_bad (_("bad format for ifc or ifnc"));
else
++input_line_pointer;
@@ -247,14 +247,94 @@ s_ifc (arg)
}
void
-s_endif (arg)
+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)
+ {
+ as_bad (_("\".elseif\" after \".else\" - ignored"));
+ as_bad_where (current_cframe->else_file_line.file,
+ current_cframe->else_file_line.line,
+ _("here is the previous \"else\""));
+ as_bad_where (current_cframe->if_file_line.file,
+ current_cframe->if_file_line.line,
+ _("here is the previous \"if\""));
+ }
+ else
+ {
+ as_where (&current_cframe->else_file_line.file,
+ &current_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. */
+
+ 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;
+ }
+ else
+ {
+ 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;
+
+ if (LISTING_SKIP_COND ()
+ && current_cframe->ignoring
+ && (current_cframe->previous_cframe == NULL
+ || ! current_cframe->previous_cframe->ignoring))
+ listing_list (2);
+
+ demand_empty_rest_of_line ();
+}
+
+void
+s_endif (arg)
+ int arg ATTRIBUTE_UNUSED;
+{
struct conditional_frame *hold;
if (current_cframe == NULL)
{
- as_bad ("\".endif\" without \".if\"");
+ as_bad (_("\".endif\" without \".if\""));
}
else
{
@@ -280,22 +360,22 @@ s_endif (arg)
void
s_else (arg)
- int arg;
+ int arg ATTRIBUTE_UNUSED;
{
if (current_cframe == NULL)
{
- as_bad (".else without matching .if - ignored");
+ as_bad (_(".else without matching .if - ignored"));
}
else if (current_cframe->else_seen)
{
- as_bad ("duplicate \"else\" - ignored");
+ as_bad (_("duplicate \"else\" - ignored"));
as_bad_where (current_cframe->else_file_line.file,
current_cframe->else_file_line.line,
- "here is the previous \"else\"");
+ _("here is the previous \"else\""));
as_bad_where (current_cframe->if_file_line.file,
current_cframe->if_file_line.line,
- "here is the previous \"if\"");
+ _("here is the previous \"if\""));
}
else
{
@@ -340,7 +420,7 @@ s_ifeqs (arg)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad (".ifeqs syntax error");
+ as_bad (_(".ifeqs syntax error"));
ignore_rest_of_line ();
return;
}
@@ -372,11 +452,7 @@ ignore_input ()
s = input_line_pointer;
- if (flag_m68k_mri
-#ifdef NO_PSEUDO_DOT
- || 1
-#endif
- )
+ if (NO_PSEUDO_DOT || flag_m68k_mri)
{
if (s[-1] != '.')
--s;
@@ -426,15 +502,17 @@ cond_finish_check (nest)
{
if (current_cframe != NULL && current_cframe->macro_nest >= nest)
{
- as_bad ("end of %s inside conditional",
- nest >= 0 ? "macro" : "file");
+ if (nest >= 0)
+ as_bad (_("end of macro inside conditional"));
+ else
+ as_bad (_("end of file inside conditional"));
as_bad_where (current_cframe->if_file_line.file,
current_cframe->if_file_line.line,
- "here is the start of the unterminated conditional");
+ _("here is the start of the unterminated conditional"));
if (current_cframe->else_seen)
as_bad_where (current_cframe->else_file_line.file,
current_cframe->else_file_line.line,
- "here is the \"else\" of the unterminated conditional");
+ _("here is the \"else\" of the unterminated conditional"));
}
}
diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in
index d737a21..81f2ada 100644
--- a/contrib/binutils/gas/config.in
+++ b/contrib/binutils/gas/config.in
@@ -3,6 +3,9 @@
/* Define if using alloca.c. */
#undef C_ALLOCA
+/* Define to empty if the keyword does not work. */
+#undef const
+
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
@@ -13,9 +16,21 @@
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
+/* Define to `long' if <sys/types.h> 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 <sys/types.h> doesn't define. */
+#undef size_t
+
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
@@ -25,104 +40,81 @@
*/
#undef STACK_DIRECTION
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
-/* Name of package. */
-#undef PACKAGE
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
-/* Version of package. */
-#undef VERSION
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
-/* Should gas use high-level BFD interfaces? */
-#undef BFD_ASSEMBLER
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Some assert/preprocessor combinations are incapable of handling
- certain kinds of constructs in the argument of assert. For example,
- quoted strings (if requoting isn't done right) or newlines. */
-#undef BROKEN_ASSERT
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
-/* If we aren't doing cross-assembling, some operations can be optimized,
- since byte orders and value sizes don't need to be adjusted. */
-#undef CROSS_COMPILE
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
-/* Some gas code wants to know these parameters. */
-#undef TARGET_ALIAS
-#undef TARGET_CPU
-#undef TARGET_CANONICAL
-#undef TARGET_OS
-#undef TARGET_VENDOR
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
-/* Sometimes the system header files don't declare strstr. */
-#undef NEED_DECLARATION_STRSTR
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
-/* Sometimes the system header files don't declare malloc and realloc. */
-#undef NEED_DECLARATION_MALLOC
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
-/* Sometimes the system header files don't declare free. */
-#undef NEED_DECLARATION_FREE
-
-/* Sometimes the system header files don't declare sbrk. */
-#undef NEED_DECLARATION_SBRK
-
-/* Sometimes errno.h doesn't declare errno itself. */
-#undef NEED_DECLARATION_ERRNO
-
-#undef MANY_SEGMENTS
-
-/* The configure script defines this for some targets based on the
- target name used. It is not always defined. */
-#undef TARGET_BYTES_BIG_ENDIAN
-
-/* Needed only for some configurations that can produce multiple output
- formats. */
-#undef DEFAULT_EMULATION
-#undef EMULATIONS
-#undef USE_EMULATIONS
-#undef OBJ_MAYBE_AOUT
-#undef OBJ_MAYBE_BOUT
-#undef OBJ_MAYBE_COFF
-#undef OBJ_MAYBE_ECOFF
-#undef OBJ_MAYBE_ELF
-#undef OBJ_MAYBE_GENERIC
-#undef OBJ_MAYBE_HP300
-#undef OBJ_MAYBE_IEEE
-#undef OBJ_MAYBE_SOM
-#undef OBJ_MAYBE_VMS
-
-/* Used for some of the COFF configurations, when the COFF code needs
- to select something based on the CPU type before it knows it... */
-#undef I386COFF
-#undef M68KCOFF
-#undef M88KCOFF
+/* Define if you have the remove function. */
+#undef HAVE_REMOVE
-/* Using cgen code? */
-#undef USING_CGEN
+/* Define if you have the sbrk function. */
+#undef HAVE_SBRK
-/* Needed only for sparc configuration. */
-#undef DEFAULT_ARCH
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
-/* Needed only for PowerPC Solaris. */
-#undef TARGET_SOLARIS_COMMENT
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
-/* Needed only for SCO 5. */
-#undef SCO_ELF
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
-/* Define if you have the remove function. */
-#undef HAVE_REMOVE
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the sbrk function. */
-#undef HAVE_SBRK
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
/* Define if you have the unlink function. */
#undef HAVE_UNLINK
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
/* Define if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
/* Define if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@@ -135,11 +127,147 @@
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
/* Define if you have the <varargs.h> header file. */
#undef HAVE_VARARGS_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if defaulting to ELF on SCO 5. */
+#undef SCO_ELF
+
+/* Use ELF stabs for MIPS, not ECOFF stabs */
+#undef MIPS_STABS_ELF
+
+/* Define if default target is PowerPC Solaris. */
+#undef TARGET_SOLARIS_COMMENT
+
+/* Define as 1 if big endian. */
+#undef TARGET_BYTES_BIG_ENDIAN
+
+/* Default architecture. */
+#undef DEFAULT_ARCH
+
+/* Using cgen code? */
+#undef USING_CGEN
+
+/* Using i386 COFF? */
+#undef I386COFF
+
+/* Using m68k COFF? */
+#undef M68KCOFF
+
+/* Using m88k COFF? */
+#undef M88KCOFF
+
+/* a.out support? */
+#undef OBJ_MAYBE_AOUT
+
+/* b.out support? */
+#undef OBJ_MAYBE_BOUT
+
+/* COFF support? */
+#undef OBJ_MAYBE_COFF
+
+/* ECOFF support? */
+#undef OBJ_MAYBE_ECOFF
+
+/* ELF support? */
+#undef OBJ_MAYBE_ELF
+
+/* generic support? */
+#undef OBJ_MAYBE_GENERIC
+
+/* HP300 support? */
+#undef OBJ_MAYBE_HP300
+
+/* IEEE support? */
+#undef OBJ_MAYBE_IEEE
+
+/* SOM support? */
+#undef OBJ_MAYBE_SOM
+
+/* VMS support? */
+#undef OBJ_MAYBE_VMS
+
+/* Use emulation support? */
+#undef USE_EMULATIONS
+
+/* Supported emulations. */
+#undef EMULATIONS
+
+/* Default emulation. */
+#undef DEFAULT_EMULATION
+
+/* old COFF support? */
+#undef MANY_SEGMENTS
+
+/* Use BFD interface? */
+#undef BFD_ASSEMBLER
+
+/* Target alias. */
+#undef TARGET_ALIAS
+
+/* Canonical target. */
+#undef TARGET_CANONICAL
+
+/* Target CPU. */
+#undef TARGET_CPU
+
+/* Target vendor. */
+#undef TARGET_VENDOR
+
+/* Target OS. */
+#undef TARGET_OS
+
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Compiling cross-assembler? */
+#undef CROSS_COMPILE
+
+/* assert broken? */
+#undef BROKEN_ASSERT
+
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
+
+/* Define if malloc is not declared in system header files. */
+#undef NEED_DECLARATION_MALLOC
+
+/* Define if free is not declared in system header files. */
+#undef NEED_DECLARATION_FREE
+
+/* Define if sbrk is not declared in system header files. */
+#undef NEED_DECLARATION_SBRK
+
+/* Define if environ is not declared in system header files. */
+#undef NEED_DECLARATION_ENVIRON
+
+/* Define if errno is not declared in system header files. */
+#undef NEED_DECLARATION_ERRNO
+
diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c
index 3ac1f01..2e3c0dc 100644
--- a/contrib/binutils/gas/config/atof-ieee.c
+++ b/contrib/binutils/gas/config/atof-ieee.c
@@ -1,5 +1,5 @@
/* atof_ieee.c - turn a Flonum into an IEEE floating point number
- Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -136,7 +136,7 @@ static void
make_invalid_floating_point_number (words)
LITTLENUM_TYPE *words;
{
- as_bad ("cannot create floating-point number");
+ as_bad (_("cannot create floating-point number"));
words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1; /* Zero the leftmost bit */
words[1] = (LITTLENUM_TYPE) -1;
words[2] = (LITTLENUM_TYPE) -1;
@@ -160,7 +160,7 @@ make_invalid_floating_point_number (words)
char *
atof_ieee (str, what_kind, words)
char *str; /* Text to convert to binary. */
- char what_kind; /* 'd', 'f', 'g', 'h' */
+ 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
@@ -460,7 +460,7 @@ gen_to_words (words, precision, exponent_bits)
/* 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 */
make_invalid_floating_point_number (words);
@@ -501,7 +501,7 @@ gen_to_words (words, precision, exponent_bits)
if (next_bits (1))
{
--lp;
- if (prec_bits > LITTLENUM_NUMBER_OF_BITS)
+ if (prec_bits >= LITTLENUM_NUMBER_OF_BITS)
{
int n = 0;
int tmp_bits;
@@ -515,7 +515,19 @@ gen_to_words (words, precision, exponent_bits)
--n;
tmp_bits -= LITTLENUM_NUMBER_OF_BITS;
}
- if (tmp_bits > LITTLENUM_NUMBER_OF_BITS || (lp[n] & mask[tmp_bits]) != mask[tmp_bits])
+ if (tmp_bits > LITTLENUM_NUMBER_OF_BITS
+ || (lp[n] & mask[tmp_bits]) != mask[tmp_bits]
+ || (prec_bits != (precision * LITTLENUM_NUMBER_OF_BITS
+ - exponent_bits - 1)
+#ifdef TC_I386
+ /* An extended precision float with only the integer
+ bit set would be invalid. That must be converted
+ to the smallest normalized number. */
+ && !(precision == X_PRECISION
+ && prec_bits == (precision * LITTLENUM_NUMBER_OF_BITS
+ - exponent_bits - 2))
+#endif
+ ))
{
unsigned long carry;
@@ -539,11 +551,18 @@ gen_to_words (words, precision, exponent_bits)
<< ((LITTLENUM_NUMBER_OF_BITS - 1)
- exponent_bits));
*lp++ = word1;
+#ifdef TC_I386
+ /* Set the integer bit in the extended precision format.
+ This cannot happen on the m68k where the mantissa
+ just overflows into the integer bit above. */
+ if (precision == X_PRECISION)
+ *lp++ = 1 << (LITTLENUM_NUMBER_OF_BITS - 1);
+#endif
while (lp < words_end)
*lp++ = 0;
}
}
- else if ((*lp & mask[prec_bits]) != mask[prec_bits])
+ else
*lp += 1;
}
@@ -605,11 +624,13 @@ gen_to_words (words, precision, exponent_bits)
don't get a sticky sign bit after shifting right, and that
permits us to propagate the carry without any masking of bits.
#endif */
- for (carry = 1, lp--; carry && (lp >= words); lp--)
+ for (carry = 1, lp--; carry; lp--)
{
carry = *lp + carry;
*lp = carry;
carry >>= LITTLENUM_NUMBER_OF_BITS;
+ if (lp == words)
+ break;
}
if (precision == X_PRECISION && exponent_bits == 15)
{
@@ -656,7 +677,7 @@ int_to_gen (x)
sprintf (buf, "%ld", x);
bufp = &buf[0];
if (atof_generic (&bufp, ".", EXP_CHARS, &generic_floating_point_number))
- as_bad ("Error converting number to floating point (Exponent overflow?)");
+ as_bad (_("Error converting number to floating point (Exponent overflow?)"));
}
#endif
diff --git a/contrib/binutils/gas/config/e-i386aout.c b/contrib/binutils/gas/config/e-i386aout.c
new file mode 100644
index 0000000..18fdf68
--- /dev/null
+++ b/contrib/binutils/gas/config/e-i386aout.c
@@ -0,0 +1,17 @@
+#include "as.h"
+#include "emul.h"
+
+static const char *
+i386aout_bfd_name ()
+{
+ abort ();
+ return NULL;
+}
+
+#define emul_bfd_name i386aout_bfd_name
+#define emul_format &aout_format_ops
+
+#define emul_name "i386aout"
+#define emul_struct_name i386aout
+#define emul_default_endian 0
+#include "emul-target.h"
diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c
index 7dc8946..eabbe92 100644
--- a/contrib/binutils/gas/config/obj-aout.c
+++ b/contrib/binutils/gas/config/obj-aout.c
@@ -1,5 +1,5 @@
/* a.out object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996
+ 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.
@@ -14,9 +14,12 @@ 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. */
+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. */
+
+#define OBJ_HEADER "obj-aout.h"
#include "as.h"
#ifdef BFD_ASSEMBLER
@@ -66,7 +69,7 @@ static void obj_aout_line PARAMS ((int));
static void obj_aout_weak PARAMS ((int));
static void obj_aout_type PARAMS ((int));
-const pseudo_typeS obj_pseudo_table[] =
+const pseudo_typeS aout_pseudo_table[] =
{
{"line", obj_aout_line, 0}, /* source code line number */
{"ln", obj_aout_line, 0}, /* coff line number that we use anyway */
@@ -93,8 +96,8 @@ const pseudo_typeS obj_pseudo_table[] =
/* other stuff */
{"ABORT", s_abort, 0},
- {NULL} /* end sentinel */
-}; /* obj_pseudo_table */
+ {NULL, NULL, 0} /* end sentinel */
+}; /* aout_pseudo_table */
#ifdef BFD_ASSEMBLER
@@ -108,18 +111,21 @@ obj_aout_frob_symbol (sym, punt)
asection *sec;
int desc, type, other;
- flags = sym->bsym->flags;
- desc = S_GET_DESC (sym);
- type = S_GET_TYPE (sym);
- other = S_GET_OTHER (sym);
- sec = sym->bsym->section;
+ flags = symbol_get_bfdsym (sym)->flags;
+ desc = aout_symbol (symbol_get_bfdsym (sym))->desc;
+ type = aout_symbol (symbol_get_bfdsym (sym))->type;
+ other = aout_symbol (symbol_get_bfdsym (sym))->other;
+ sec = S_GET_SEGMENT (sym);
/* Only frob simple symbols this way right now. */
if (! (type & ~ (N_TYPE | N_EXT)))
{
if (type == (N_UNDF | N_EXT)
&& sec == &bfd_abs_section)
- sym->bsym->section = sec = bfd_und_section_ptr;
+ {
+ sec = bfd_und_section_ptr;
+ S_SET_SEGMENT (sym, sec);
+ }
if ((type & N_TYPE) != N_INDR
&& (type & N_TYPE) != N_SETA
@@ -141,7 +147,7 @@ obj_aout_frob_symbol (sym, punt)
case N_SETB:
/* Set the debugging flag for constructor symbols so that
BFD leaves them alone. */
- sym->bsym->flags |= BSF_DEBUGGING;
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
/* You can't put a common symbol in a set. The way a set
element works is that the symbol has a definition and a
@@ -154,42 +160,42 @@ obj_aout_frob_symbol (sym, punt)
on the other hand, we certainly don't want anybody to be
mislead into thinking that their code will work. */
if (S_IS_COMMON (sym))
- as_bad ("Attempt to put a common symbol into set %s",
+ as_bad (_("Attempt to put a common symbol into set %s"),
S_GET_NAME (sym));
/* Similarly, you can't put an undefined symbol in a set. */
else if (! S_IS_DEFINED (sym))
- as_bad ("Attempt to put an undefined symbol into set %s",
+ as_bad (_("Attempt to put an undefined symbol into set %s"),
S_GET_NAME (sym));
break;
case N_INDR:
/* Put indirect symbols in the indirect section. */
- sym->bsym->section = bfd_ind_section_ptr;
- sym->bsym->flags |= BSF_INDIRECT;
+ S_SET_SEGMENT (sym, bfd_ind_section_ptr);
+ symbol_get_bfdsym (sym)->flags |= BSF_INDIRECT;
if (type & N_EXT)
{
- sym->bsym->flags |= BSF_EXPORT;
- sym->bsym->flags &=~ BSF_LOCAL;
+ symbol_get_bfdsym (sym)->flags |= BSF_EXPORT;
+ symbol_get_bfdsym (sym)->flags &=~ BSF_LOCAL;
}
break;
case N_WARNING:
/* Mark warning symbols. */
- sym->bsym->flags |= BSF_WARNING;
+ symbol_get_bfdsym (sym)->flags |= BSF_WARNING;
break;
}
}
else
{
- sym->bsym->flags |= BSF_DEBUGGING;
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
}
- S_SET_TYPE (sym, type);
+ aout_symbol (symbol_get_bfdsym (sym))->type = type;
/* Double check weak symbols. */
- if (sym->bsym->flags & BSF_WEAK)
+ if (S_IS_WEAK (sym))
{
if (S_IS_COMMON (sym))
- as_bad ("Symbol `%s' can not be both weak and common",
+ as_bad (_("Symbol `%s' can not be both weak and common"),
S_GET_NAME (sym));
}
}
@@ -215,7 +221,7 @@ obj_aout_frob_file ()
assert (x == true);
}
-#else
+#else /* ! BFD_ASSEMBLER */
/* Relocation. */
@@ -247,9 +253,9 @@ obj_emit_relocations (where, fixP, segment_address_in_file)
unsigned int line;
if (expr_symbol_where (sym, &file, &line))
- as_bad_where (file, line, "unresolved relocation");
+ as_bad_where (file, line, _("unresolved relocation"));
else
- as_bad ("bad relocation: symbol `%s' not in symbol table",
+ as_bad (_("bad relocation: symbol `%s' not in symbol table"),
S_GET_NAME (sym));
}
@@ -291,7 +297,7 @@ obj_header_append (where, headers)
#endif /* CROSS_COMPILE */
}
-#endif
+#endif /* ! defined (obj_header_append) */
void
obj_symbol_to_chars (where, symbolP)
@@ -336,7 +342,7 @@ obj_emit_symbols (where, symbol_rootP)
case N_TEXT: S_SET_TYPE (symbolP, N_WEAKT); break;
case N_DATA: S_SET_TYPE (symbolP, N_WEAKD); break;
case N_BSS: S_SET_TYPE (symbolP, N_WEAKB); break;
- default: as_bad ("%s: bad type for weak symbol", temp); break;
+ default: as_bad (_("%s: bad type for weak symbol"), temp); break;
}
}
@@ -416,9 +422,17 @@ obj_aout_type (ignore)
{
++input_line_pointer;
if (strncmp (input_line_pointer, "object", 6) == 0)
+#ifdef BFD_ASSEMBLER
+ aout_symbol (symbol_get_bfdsym (sym))->other = 1;
+#else
S_SET_OTHER (sym, 1);
+#endif
else if (strncmp (input_line_pointer, "function", 8) == 0)
+#ifdef BFD_ASSEMBLER
+ aout_symbol (symbol_get_bfdsym (sym))->other = 2;
+#else
S_SET_OTHER (sym, 2);
+#endif
}
}
}
@@ -427,11 +441,6 @@ obj_aout_type (ignore)
s_ignore (0);
}
-void
-obj_read_begin_hook ()
-{
-}
-
#ifndef BFD_ASSEMBLER
void
@@ -450,7 +459,7 @@ obj_crawl_symbol_chain (headers)
if (symbolP->sy_mri_common)
{
if (S_IS_EXTERNAL (symbolP))
- as_bad ("%s: global symbols not supported in common sections",
+ as_bad (_("%s: global symbols not supported in common sections"),
S_GET_NAME (symbolP));
*symbolPP = symbol_next (symbolP);
continue;
@@ -508,7 +517,7 @@ obj_crawl_symbol_chain (headers)
}
else /* .Stabd case. */
symbolP->sy_name_offset = 0;
- symbolPP = &(symbol_next (symbolP));
+ symbolPP = &symbolP->sy_next;
}
else
{
@@ -517,7 +526,7 @@ obj_crawl_symbol_chain (headers)
Well, maybe if you're doing twisted things with
register names... */
{
- as_bad ("Local symbol %s never defined.", decode_local_label_name (S_GET_NAME (symbolP)));
+ as_bad (_("Local symbol %s never defined."), decode_local_label_name (S_GET_NAME (symbolP)));
} /* oops. */
/* Unhook it from the chain */
@@ -605,7 +614,7 @@ DEFUN_VOID (s_sect)
}
if (exp >= 1000)
{
- as_bad ("subsegment index too high");
+ as_bad (_("subsegment index too high"));
}
if (strcmp (section_name, ".text") == 0)
@@ -626,4 +635,58 @@ DEFUN_VOID (s_sect)
#endif /* ! BFD_ASSEMBLER */
+#ifdef BFD_ASSEMBLER
+
+/* Support for an AOUT emulation. */
+
+static void aout_pop_insert PARAMS ((void));
+static int obj_aout_s_get_other PARAMS ((symbolS *));
+static int obj_aout_s_get_desc PARAMS ((symbolS *));
+
+static void
+aout_pop_insert ()
+{
+ pop_insert (aout_pseudo_table);
+}
+
+static int
+obj_aout_s_get_other (sym)
+ symbolS *sym;
+{
+ return aout_symbol (symbol_get_bfdsym (sym))->other;
+}
+
+static int
+obj_aout_s_get_desc (sym)
+ symbolS *sym;
+{
+ return aout_symbol (symbol_get_bfdsym (sym))->desc;
+}
+
+
+const struct format_ops aout_format_ops =
+{
+ bfd_target_aout_flavour,
+ 1, /* dfl_leading_underscore */
+ 0, /* emit_section_symbols */
+ obj_aout_frob_symbol,
+ obj_aout_frob_file,
+ 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_get_desc,
+ 0, /* copy_symbol_attributes */
+ 0, /* generate_asm_lineno */
+ 0, /* process_stab */
+ 0, /* 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 339070e..d08302a 100644
--- a/contrib/binutils/gas/config/obj-aout.h
+++ b/contrib/binutils/gas/config/obj-aout.h
@@ -1,5 +1,5 @@
/* obj-aout.h, a.out object file format for gas, the assembler.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1998
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -51,6 +51,12 @@ extern const segT N_TYPE_seg[];
#endif /* ! BFD_ASSEMBLER */
+extern const pseudo_typeS aout_pseudo_table[];
+
+#ifndef obj_pop_insert
+#define obj_pop_insert() pop_insert (aout_pseudo_table)
+#endif
+
/* SYMBOL TABLE */
/* Symbol table entry data type */
@@ -60,18 +66,24 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
#ifdef BFD_ASSEMBLER
-#define S_SET_OTHER(S,V) (aout_symbol((S)->bsym)->other = (V))
-#define S_SET_TYPE(S,T) (aout_symbol((S)->bsym)->type = (T))
-#define S_SET_DESC(S,D) (aout_symbol((S)->bsym)->desc = (D))
-#define S_GET_OTHER(S) (aout_symbol((S)->bsym)->other)
-#define S_GET_TYPE(S) (aout_symbol((S)->bsym)->type)
-#define S_GET_DESC(S) (aout_symbol((S)->bsym)->desc)
+#define S_SET_OTHER(S,V) \
+ (aout_symbol (symbol_get_bfdsym (S))->other = (V))
+#define S_SET_TYPE(S,T) \
+ (aout_symbol (symbol_get_bfdsym (S))->type = (T))
+#define S_SET_DESC(S,D) \
+ (aout_symbol (symbol_get_bfdsym (S))->desc = (D))
+#define S_GET_OTHER(S) \
+ (aout_symbol (symbol_get_bfdsym (S))->other)
+#define S_GET_TYPE(S) \
+ (aout_symbol (symbol_get_bfdsym (S))->type)
+#define S_GET_DESC(S) \
+ (aout_symbol (symbol_get_bfdsym (S))->desc)
asection *text_section, *data_section, *bss_section;
#define obj_frob_symbol(S,PUNT) obj_aout_frob_symbol (S, &PUNT)
#define obj_frob_file() obj_aout_frob_file ()
-extern void obj_aout_frob_symbol PARAMS ((struct symbol *, int *));
+extern void obj_aout_frob_symbol PARAMS ((symbolS *, int *));
extern void obj_aout_frob_file PARAMS ((void));
#define obj_sec_sym_ok_for_reloc(SEC) (1)
@@ -230,6 +242,7 @@ void tc_aout_fix_to_chars PARAMS ((char *where, struct fix *fixP, relax_addressT
#endif
+#define obj_read_begin_hook() {;}
#define obj_symbol_new_hook(s) {;}
#define EMIT_SECTION_SYMBOLS 0
diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c
index a6421bf..d750868 100644
--- a/contrib/binutils/gas/config/obj-coff.c
+++ b/contrib/binutils/gas/config/obj-coff.c
@@ -1,5 +1,5 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS.
@@ -32,8 +32,24 @@
static void obj_coff_bss PARAMS ((int));
const char *s_get_name PARAMS ((symbolS * s));
-static symbolS *def_symbol_in_progress;
+static void obj_coff_ln PARAMS ((int));
+static void obj_coff_def PARAMS ((int));
+static void obj_coff_endef PARAMS ((int));
+static void obj_coff_dim PARAMS ((int));
+static void obj_coff_line PARAMS ((int));
+static void obj_coff_size PARAMS ((int));
+static void obj_coff_scl PARAMS ((int));
+static void obj_coff_tag PARAMS ((int));
+static void obj_coff_val PARAMS ((int));
+static void obj_coff_type PARAMS ((int));
+static void obj_coff_ident PARAMS ((int));
+#ifdef BFD_ASSEMBLER
+static void obj_coff_loc PARAMS((int));
+#endif
+/* This is used to hold the symbol built by a sequence of pseudo-ops
+ from .def and .endef. */
+static symbolS *def_symbol_in_progress;
/* stack stuff */
typedef struct
@@ -130,7 +146,7 @@ tag_insert (name, symbolP)
if ((error_string = hash_jam (tag_hash, name, (char *) symbolP)))
{
- as_fatal ("Inserting \"%s\" into structure table failed: %s",
+ as_fatal (_("Inserting \"%s\" into structure table failed: %s"),
name, error_string);
}
}
@@ -171,7 +187,7 @@ tag_find_or_make (name)
static void
obj_coff_bss (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (*input_line_pointer == '\n')
subseg_new (".bss", get_absolute_expression ());
@@ -179,6 +195,47 @@ obj_coff_bss (ignore)
s_lcomm (0);
}
+/* Handle .weak. This is a GNU extension. */
+
+static void
+obj_coff_weak (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ char *name;
+ int c;
+ symbolS *symbolP;
+
+ do
+ {
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ symbolP = symbol_find_or_make (name);
+ *input_line_pointer = c;
+ SKIP_WHITESPACE ();
+
+#ifdef BFD_ASSEMLER
+ S_SET_WEAK (symbolP);
+#endif
+
+#ifdef TE_PE
+ S_SET_STORAGE_CLASS (symbolP, C_NT_WEAK);
+#else
+ S_SET_STORAGE_CLASS (symbolP, C_WEAKEXT);
+#endif
+
+ if (c == ',')
+ {
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '\n')
+ c = '\n';
+ }
+ }
+ while (c == ',');
+
+ demand_empty_rest_of_line ();
+}
+
#ifdef BFD_ASSEMBLER
static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *));
@@ -208,8 +265,8 @@ SA_SET_SYM_ENDNDX (sym, val)
{
combined_entry_type *entry, *p;
- entry = &coffsymbol (sym->bsym)->native[1];
- p = coffsymbol (val->bsym)->native;
+ entry = &coffsymbol (symbol_get_bfdsym (sym))->native[1];
+ p = coffsymbol (symbol_get_bfdsym (val))->native;
entry->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p = p;
entry->fix_end = 1;
}
@@ -221,8 +278,8 @@ SA_SET_SYM_TAGNDX (sym, val)
{
combined_entry_type *entry, *p;
- entry = &coffsymbol (sym->bsym)->native[1];
- p = coffsymbol (val->bsym)->native;
+ entry = &coffsymbol (symbol_get_bfdsym (sym))->native[1];
+ p = coffsymbol (symbol_get_bfdsym (val))->native;
entry->u.auxent.x_sym.x_tagndx.p = p;
entry->fix_tag = 1;
}
@@ -231,7 +288,7 @@ static int
S_GET_DATA_TYPE (sym)
symbolS *sym;
{
- return coffsymbol (sym->bsym)->native->u.syment.n_type;
+ return coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_type;
}
int
@@ -239,7 +296,7 @@ S_SET_DATA_TYPE (sym, val)
symbolS *sym;
int val;
{
- coffsymbol (sym->bsym)->native->u.syment.n_type = val;
+ coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_type = val;
return val;
}
@@ -247,7 +304,7 @@ int
S_GET_STORAGE_CLASS (sym)
symbolS *sym;
{
- return coffsymbol (sym->bsym)->native->u.syment.n_sclass;
+ return coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_sclass;
}
int
@@ -255,7 +312,7 @@ S_SET_STORAGE_CLASS (sym, val)
symbolS *sym;
int val;
{
- coffsymbol (sym->bsym)->native->u.syment.n_sclass = val;
+ coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_sclass = val;
return val;
}
@@ -270,21 +327,17 @@ c_symbol_merge (debug, normal)
S_SET_STORAGE_CLASS (normal, S_GET_STORAGE_CLASS (debug));
if (S_GET_NUMBER_AUXILIARY (debug) > S_GET_NUMBER_AUXILIARY (normal))
- /* take the most we have */
- S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
+ {
+ /* take the most we have */
+ S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
+ }
if (S_GET_NUMBER_AUXILIARY (debug) > 0)
{
/* Move all the auxiliary information. */
- /* @@ How many fields do we want to preserve? Would it make more
- sense to pick and choose those we want to copy? Should look
- into this further.... [raeburn:19920512.2209EST] */
- alent *linenos;
- linenos = coffsymbol (normal->bsym)->lineno;
- memcpy ((char *) &coffsymbol (normal->bsym)->native,
- (char *) &coffsymbol (debug->bsym)->native,
- S_GET_NUMBER_AUXILIARY(debug) * AUXESZ);
- coffsymbol (normal->bsym)->lineno = linenos;
+ memcpy (SYM_AUXINFO (normal), SYM_AUXINFO (debug),
+ (S_GET_NUMBER_AUXILIARY (debug)
+ * sizeof (*SYM_AUXINFO (debug))));
}
/* Move the debug flags. */
@@ -297,12 +350,14 @@ c_dot_file_symbol (filename)
{
symbolS *symbolP;
+ /* BFD converts filename to a .file symbol with an aux entry. It
+ also handles chaining. */
symbolP = symbol_new (filename, bfd_abs_section_ptr, 0, &zero_address_frag);
S_SET_STORAGE_CLASS (symbolP, C_FILE);
S_SET_NUMBER_AUXILIARY (symbolP, 1);
- symbolP->bsym->flags = BSF_DEBUGGING;
+ symbol_get_bfdsym (symbolP)->flags = BSF_DEBUGGING;
#ifndef NO_LISTING
{
@@ -344,21 +399,20 @@ void
coff_obj_symbol_new_hook (symbolP)
symbolS *symbolP;
{
- char underscore = 0; /* Symbol has leading _ */
+ 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;
- {
- long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
- char *s = (char *) xmalloc (sz);
- memset (s, 0, sz);
- coffsymbol (symbolP->bsym)->native = (combined_entry_type *) s;
- }
S_SET_DATA_TYPE (symbolP, T_NULL);
S_SET_STORAGE_CLASS (symbolP, 0);
S_SET_NUMBER_AUXILIARY (symbolP, 0);
if (S_IS_STRING (symbolP))
SF_SET_STRING (symbolP);
- if (!underscore && S_IS_LOCAL (symbolP))
+
+ if (S_IS_LOCAL (symbolP))
SF_SET_LOCAL (symbolP);
}
@@ -384,6 +438,12 @@ add_lineno (frag, offset, num)
{
abort ();
}
+ if (num <= 0)
+ {
+ /* Zero is used as an end marker in the file. */
+ as_warn (_("Line numbers must be positive integers\n"));
+ num = 1;
+ }
new_line->next = line_nos;
new_line->frag = frag;
new_line->l.line_number = num;
@@ -398,7 +458,8 @@ coff_add_linesym (sym)
{
if (line_nos)
{
- coffsymbol (current_lineno_sym->bsym)->lineno = (alent *) line_nos;
+ coffsymbol (symbol_get_bfdsym (current_lineno_sym))->lineno =
+ (alent *) line_nos;
coff_n_line_nos++;
line_nos = 0;
}
@@ -413,7 +474,7 @@ obj_coff_ln (appline)
if (! appline && def_symbol_in_progress != NULL)
{
- as_warn (".ln pseudo-op inside .def/.endef: ignored.");
+ as_warn (_(".ln pseudo-op inside .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
}
@@ -443,6 +504,84 @@ obj_coff_ln (appline)
demand_empty_rest_of_line ();
}
+/* .loc is essentially the same as .ln; parse it for assembler
+ compatibility. */
+
+static void
+obj_coff_loc (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ int lineno;
+
+ /* FIXME: Why do we need this check? We need it for ECOFF, but why
+ do we need it for COFF? */
+ if (now_seg != text_section)
+ {
+ as_warn (_(".loc outside of .text"));
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ if (def_symbol_in_progress != NULL)
+ {
+ as_warn (_(".loc pseudo-op inside .def/.endef: ignored."));
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ /* Skip the file number. */
+ SKIP_WHITESPACE ();
+ get_absolute_expression ();
+ SKIP_WHITESPACE ();
+
+ lineno = get_absolute_expression ();
+
+#ifndef NO_LISTING
+ {
+ extern int listing;
+
+ if (listing)
+ {
+ lineno += coff_line_base - 1;
+ listing_source_line (lineno);
+ }
+ }
+#endif
+
+ demand_empty_rest_of_line ();
+
+ add_lineno (frag_now, frag_now_fix (), lineno);
+}
+
+/* Handle the .ident pseudo-op. */
+
+static void
+obj_coff_ident (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ segT current_seg = now_seg;
+ subsegT current_subseg = now_subseg;
+
+#ifdef TE_PE
+ {
+ segT sec;
+
+ /* We could put it in .comment, but that creates an extra section
+ that shouldn't be loaded into memory, which requires linker
+ changes... For now, until proven otherwise, use .rdata. */
+ sec = subseg_new (".rdata$zzz", 0);
+ bfd_set_section_flags (stdoutput, sec,
+ ((SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA)
+ & bfd_applicable_section_flags (stdoutput)));
+ }
+#else
+ subseg_new (".comment", 0);
+#endif
+
+ stringer (1);
+ subseg_set (current_seg, current_subseg);
+}
+
/*
* def()
*
@@ -464,7 +603,7 @@ obj_coff_ln (appline)
static void
obj_coff_def (what)
- int what;
+ int what ATTRIBUTE_UNUSED;
{
char name_end; /* Char after the end of name */
char *symbol_name; /* Name of the debug symbol */
@@ -473,7 +612,7 @@ obj_coff_def (what)
if (def_symbol_in_progress != NULL)
{
- as_warn (".def pseudo-op used inside of .def/.endef: ignored.");
+ as_warn (_(".def pseudo-op used inside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -496,7 +635,7 @@ obj_coff_def (what)
/* Initialize the new symbol */
def_symbol_in_progress = symbol_make (symbol_name_copy);
- def_symbol_in_progress->sy_frag = &zero_address_frag;
+ symbol_set_frag (def_symbol_in_progress, &zero_address_frag);
S_SET_VALUE (def_symbol_in_progress, 0);
if (S_IS_STRING (def_symbol_in_progress))
@@ -511,14 +650,15 @@ unsigned int dim_index;
static void
obj_coff_endef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *symbolP;
+
/* DIM BUG FIX sac@cygnus.com */
dim_index = 0;
if (def_symbol_in_progress == NULL)
{
- as_warn (".endef pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -548,15 +688,31 @@ obj_coff_endef (ignore)
CONST char *name;
S_SET_SEGMENT (def_symbol_in_progress, text_section);
- name = bfd_asymbol_name (def_symbol_in_progress->bsym);
- if (name[1] == 'b' && name[2] == 'f')
- {
- if (! in_function ())
- as_warn ("`%s' symbol without preceding function", name);
-/* SA_SET_SYM_LNNO (def_symbol_in_progress, 12345);*/
- /* Will need relocating */
- SF_SET_PROCESS (def_symbol_in_progress);
- clear_function ();
+ name = S_GET_NAME (def_symbol_in_progress);
+ if (name[0] == '.' && name[2] == 'f' && name[3] == '\0')
+ {
+ switch (name[1])
+ {
+ case 'b':
+ /* .bf */
+ if (! in_function ())
+ as_warn (_("`%s' symbol without preceding function"), name);
+ /* Will need relocating. */
+ SF_SET_PROCESS (def_symbol_in_progress);
+ clear_function ();
+ break;
+#ifdef TE_PE
+ 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_GET_SYM_LNNO (def_symbol_in_progress)
+ + coff_line_base));
+ break;
+#endif
+ }
}
}
break;
@@ -581,22 +737,30 @@ obj_coff_endef (ignore)
break;
case C_EXT:
+ case C_WEAKEXT:
+#ifdef TE_PE
+ case C_NT_WEAK:
+#endif
case C_STAT:
case C_LABEL:
/* Valid but set somewhere else (s_comm, s_lcomm, colon) */
break;
+ default:
case C_USTATIC:
case C_EXTDEF:
case C_ULABEL:
- as_warn ("unexpected storage class %d",
+ as_warn (_("unexpected storage class %d"),
S_GET_STORAGE_CLASS (def_symbol_in_progress));
break;
} /* switch on storage class */
/* Now that we have built a debug symbol, try to find if we should
merge with an existing symbol or not. If a symbol is C_EFCN or
- SEG_ABSOLUTE or untagged SEG_DEBUG it never merges. */
+ absolute_section or untagged SEG_DEBUG it never merges. We also
+ don't merge labels, which are in a different namespace, nor
+ symbols which have not yet been defined since they are typically
+ unique, nor do we merge tags with non-tags. */
/* Two cases for functions. Either debug followed by definition or
definition followed by debug. For definition first, we will
@@ -611,16 +775,24 @@ obj_coff_endef (ignore)
time. */
if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
+ || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL
|| (!strcmp (bfd_get_section_name (stdoutput,
S_GET_SEGMENT (def_symbol_in_progress)),
"*DEBUG*")
&& !SF_GET_TAG (def_symbol_in_progress))
|| S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
- || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress), DO_NOT_STRIP)) == NULL)
+ || ! symbol_constant_p (def_symbol_in_progress)
+ || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
+ DO_NOT_STRIP)) == NULL
+ || SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP))
{
+ /* If it already is at the end of the symbol list, do nothing */
if (def_symbol_in_progress != symbol_lastP)
- symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP,
- &symbol_lastP);
+ {
+ symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP);
+ symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP,
+ &symbol_lastP);
+ }
}
else
{
@@ -685,13 +857,13 @@ obj_coff_endef (ignore)
static void
obj_coff_dim (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int dim_index;
if (def_symbol_in_progress == NULL)
{
- as_warn (".dim pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -711,7 +883,7 @@ obj_coff_dim (ignore)
break;
default:
- as_warn ("badly formed .dim directive ignored");
+ as_warn (_("badly formed .dim directive ignored"));
/* intentional fallthrough */
case '\n':
case ';':
@@ -725,7 +897,7 @@ obj_coff_dim (ignore)
static void
obj_coff_line (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int this_base;
@@ -741,7 +913,7 @@ obj_coff_line (ignore)
coff_line_base = this_base;
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
- SA_SET_SYM_LNNO (def_symbol_in_progress, coff_line_base);
+ SA_SET_SYM_LNNO (def_symbol_in_progress, this_base);
demand_empty_rest_of_line ();
@@ -751,18 +923,18 @@ obj_coff_line (ignore)
extern int listing;
if (listing)
- listing_source_line ((unsigned int) coff_line_base);
+ listing_source_line ((unsigned int) this_base);
}
#endif
}
static void
obj_coff_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".size pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".size pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -774,11 +946,11 @@ obj_coff_size (ignore)
static void
obj_coff_scl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".scl pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".scl pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -789,14 +961,14 @@ obj_coff_scl (ignore)
static void
obj_coff_tag (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *symbol_name;
char name_end;
if (def_symbol_in_progress == NULL)
{
- as_warn (".tag pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".tag pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
}
@@ -815,7 +987,7 @@ obj_coff_tag (ignore)
tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
{
- as_warn ("tag not found for .tag %s", symbol_name);
+ as_warn (_("tag not found for .tag %s"), symbol_name);
} /* not defined */
SF_SET_TAGGED (def_symbol_in_progress);
@@ -826,11 +998,11 @@ obj_coff_tag (ignore)
static void
obj_coff_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".type pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".type pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -848,11 +1020,11 @@ obj_coff_type (ignore)
static void
obj_coff_val (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".val pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".val pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -867,24 +1039,33 @@ obj_coff_val (ignore)
#endif
if (!strcmp (symbol_name, "."))
{
- def_symbol_in_progress->sy_frag = frag_now;
+ symbol_set_frag (def_symbol_in_progress, frag_now);
S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ());
/* If the .val is != from the .def (e.g. statics) */
}
else if (strcmp (S_GET_NAME (def_symbol_in_progress), symbol_name))
{
- def_symbol_in_progress->sy_value.X_op = O_symbol;
- def_symbol_in_progress->sy_value.X_add_symbol =
- symbol_find_or_make (symbol_name);
- def_symbol_in_progress->sy_value.X_op_symbol = NULL;
- def_symbol_in_progress->sy_value.X_add_number = 0;
+ expressionS exp;
+
+ exp.X_op = O_symbol;
+ exp.X_add_symbol = symbol_find_or_make (symbol_name);
+ exp.X_op_symbol = NULL;
+ exp.X_add_number = 0;
+ symbol_set_value_expression (def_symbol_in_progress, &exp);
/* If the segment is undefined when the forward reference is
resolved, then copy the segment id from the forward
symbol. */
SF_SET_GET_SEGMENT (def_symbol_in_progress);
+
+ /* FIXME: gcc can generate address expressions here in
+ unusual cases (search for "obscure" in sdbout.c). We
+ just ignore the offset here, thus generating incorrect
+ debugging information. We ignore the rest of the line
+ just below. */
}
- /* Otherwise, it is the name of a non debug symbol and its value will be calculated later. */
+ /* Otherwise, it is the name of a non debug symbol and its value
+ will be calculated later. */
*input_line_pointer = name_end;
}
else
@@ -932,7 +1113,18 @@ coff_frob_symbol (symp, punt)
if (!block_stack)
block_stack = stack_init (512, sizeof (symbolS*));
- if (!S_IS_DEFINED (symp) && S_GET_STORAGE_CLASS (symp) != C_STAT)
+ if (S_IS_WEAK (symp))
+ {
+#ifdef TE_PE
+ S_SET_STORAGE_CLASS (symp, C_NT_WEAK);
+#else
+ S_SET_STORAGE_CLASS (symp, C_WEAKEXT);
+#endif
+ }
+
+ if (!S_IS_DEFINED (symp)
+ && !S_IS_WEAK (symp)
+ && S_GET_STORAGE_CLASS (symp) != C_STAT)
S_SET_STORAGE_CLASS (symp, C_EXT);
if (!SF_GET_DEBUG (symp))
@@ -970,7 +1162,7 @@ coff_frob_symbol (symp, punt)
symbolS *begin;
begin = *(symbolS **) stack_pop (block_stack);
if (begin == 0)
- as_warn ("mismatched .eb");
+ as_warn (_("mismatched .eb"));
else
next_set_end = begin;
}
@@ -981,14 +1173,14 @@ coff_frob_symbol (symp, punt)
coff_last_function = symp;
if (S_GET_NUMBER_AUXILIARY (symp) < 1)
S_SET_NUMBER_AUXILIARY (symp, 1);
- auxp = &coffsymbol (symp->bsym)->native[1].u.auxent;
+ auxp = SYM_AUXENT (symp);
memset (auxp->x_sym.x_fcnary.x_ary.x_dimen, 0,
sizeof (auxp->x_sym.x_fcnary.x_ary.x_dimen));
}
if (S_GET_STORAGE_CLASS (symp) == C_EFCN)
{
if (coff_last_function == 0)
- as_fatal ("C_EFCN symbol out of scope");
+ as_fatal (_("C_EFCN symbol out of scope"));
SA_SET_SYM_FSIZE (coff_last_function,
(long) (S_GET_VALUE (symp)
- S_GET_VALUE (coff_last_function)));
@@ -1002,11 +1194,16 @@ coff_frob_symbol (symp, punt)
*punt = 1;
if (SF_GET_FUNCTION (symp))
- symp->bsym->flags |= BSF_FUNCTION;
+ symbol_get_bfdsym (symp)->flags |= BSF_FUNCTION;
/* more ... */
}
+ /* Double check weak symbols. */
+ if (S_IS_WEAK (symp) && S_IS_COMMON (symp))
+ as_bad (_("Symbol `%s' can not be both weak and common"),
+ S_GET_NAME (symp));
+
if (SF_GET_TAG (symp))
last_tagP = symp;
else if (S_GET_STORAGE_CLASS (symp) == C_EOS)
@@ -1015,17 +1212,17 @@ coff_frob_symbol (symp, punt)
#ifdef OBJ_XCOFF
/* This is pretty horrible, but we have to set *punt correctly in
order to call SA_SET_SYM_ENDNDX correctly. */
- if (! symp->sy_used_in_reloc
- && ((symp->bsym->flags & BSF_SECTION_SYM) != 0
+ if (! symbol_used_in_reloc_p (symp)
+ && ((symbol_get_bfdsym (symp)->flags & BSF_SECTION_SYM) != 0
|| (! S_IS_EXTERNAL (symp)
- && ! symp->sy_tc.output
+ && ! symbol_get_tc (symp)->output
&& S_GET_STORAGE_CLASS (symp) != C_FILE)))
*punt = 1;
#endif
if (set_end != (symbolS *) NULL
&& ! *punt
- && ((symp->bsym->flags & BSF_NOT_AT_END) != 0
+ && ((symbol_get_bfdsym (symp)->flags & BSF_NOT_AT_END) != 0
|| (S_IS_DEFINED (symp)
&& ! S_IS_COMMON (symp)
&& (! S_IS_EXTERNAL (symp) || SF_GET_FUNCTION (symp)))))
@@ -1034,9 +1231,13 @@ coff_frob_symbol (symp, punt)
set_end = NULL;
}
- if (next_set_end != NULL
- && ! *punt)
- set_end = next_set_end;
+ if (next_set_end != NULL)
+ {
+ if (set_end != NULL)
+ as_warn ("Warning: internal error: forgetting to set endndx of %s",
+ S_GET_NAME (set_end));
+ set_end = next_set_end;
+ }
if (! *punt
&& S_GET_STORAGE_CLASS (symp) == C_FCN
@@ -1047,28 +1248,28 @@ coff_frob_symbol (symp, punt)
coff_last_bf = symp;
}
- if (coffsymbol (symp->bsym)->lineno)
+ if (coffsymbol (symbol_get_bfdsym (symp))->lineno)
{
int i;
struct line_no *lptr;
alent *l;
- lptr = (struct line_no *) coffsymbol (symp->bsym)->lineno;
+ lptr = (struct line_no *) coffsymbol (symbol_get_bfdsym (symp))->lineno;
for (i = 0; lptr; lptr = lptr->next)
i++;
- lptr = (struct line_no *) coffsymbol (symp->bsym)->lineno;
+ lptr = (struct line_no *) coffsymbol (symbol_get_bfdsym (symp))->lineno;
/* We need i entries for line numbers, plus 1 for the first
entry which BFD will override, plus 1 for the last zero
entry (a marker for BFD). */
l = (alent *) xmalloc ((i + 2) * sizeof (alent));
- coffsymbol (symp->bsym)->lineno = l;
+ coffsymbol (symbol_get_bfdsym (symp))->lineno = l;
l[i + 1].line_number = 0;
l[i + 1].u.sym = NULL;
for (; i > 0; i--)
{
if (lptr->frag)
- lptr->l.u.offset += lptr->frag->fr_address;
+ lptr->l.u.offset += lptr->frag->fr_address / OCTETS_PER_BYTE;
l[i] = lptr->l;
lptr = lptr->next;
}
@@ -1077,9 +1278,9 @@ coff_frob_symbol (symp, punt)
void
coff_adjust_section_syms (abfd, sec, x)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
- PTR x;
+ PTR x ATTRIBUTE_UNUSED;
{
symbolS *secsym;
segment_info_type *seginfo = seg_info (sec);
@@ -1113,6 +1314,8 @@ coff_adjust_section_syms (abfd, sec, x)
&& sec != bss_section)
return;
secsym = section_symbol (sec);
+ /* This is an estimate; we'll plug in the real value using
+ SET_SECTION_RELOCS later */
SA_SET_SCN_NRELOC (secsym, nrelocs);
SA_SET_SCN_NLINNO (secsym, nlnno);
}
@@ -1136,13 +1339,14 @@ coff_frob_file_after_relocs ()
* 'd' (apparently m88k for data)
* 'x' for text
* 'r' for read-only data
+ * 's' for shared data (PE)
* But if the argument is not a quoted string, treat it as a
* subsegment number.
*/
void
obj_coff_section (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
/* Strip out the section name */
char *section_name;
@@ -1171,7 +1375,7 @@ obj_coff_section (ignore)
SKIP_WHITESPACE ();
exp = 0;
- flags = SEC_NO_FLAGS;
+ flags = SEC_LOAD;
if (*input_line_pointer == ',')
{
@@ -1189,20 +1393,21 @@ obj_coff_section (ignore)
{
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
case 'n': flags &=~ SEC_LOAD; break;
- case 'd':
+ case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
case 'w': flags &=~ SEC_READONLY; break;
- case 'x': flags |= SEC_CODE; break;
+ case 'x': flags |= SEC_CODE | SEC_LOAD; break;
case 'r': flags |= SEC_READONLY; break;
+ case 's': flags |= SEC_SHARED; break;
case 'i': /* STYP_INFO */
case 'l': /* STYP_LIB */
case 'o': /* STYP_OVER */
- as_warn ("unsupported section attribute '%c'",
+ as_warn (_("unsupported section attribute '%c'"),
*input_line_pointer);
break;
default:
- as_warn("unknown section attribute '%c'",
+ as_warn(_("unknown section attribute '%c'"),
*input_line_pointer);
break;
}
@@ -1217,8 +1422,14 @@ obj_coff_section (ignore)
if (flags != SEC_NO_FLAGS)
{
+ flagword oldflags;
+
+ oldflags = bfd_get_section_flags (stdoutput, sec);
+ oldflags &= SEC_LINK_ONCE | SEC_LINK_DUPLICATES;
+ flags |= oldflags;
+
if (! bfd_set_section_flags (stdoutput, sec, flags))
- as_warn ("error setting flags for \"%s\": %s",
+ as_warn (_("error setting flags for \"%s\": %s"),
bfd_section_name (stdoutput, sec),
bfd_errmsg (bfd_get_error ()));
}
@@ -1242,25 +1453,32 @@ coff_frob_section (sec)
char *p;
fragS *fragp;
bfd_vma size, n_entries, mask;
+ bfd_vma align_power = (bfd_vma)sec->alignment_power + OCTETS_PER_BYTE_POWER;
/* The COFF back end in BFD requires that all section sizes be
- rounded up to multiples of the corresponding section alignments.
- Seems kinda silly to me, but that's the way it is. */
+ 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. */
size = bfd_get_section_size_before_reloc (sec);
- mask = ((bfd_vma) 1 << (bfd_vma) sec->alignment_power) - 1;
+ mask = ((bfd_vma) 1 << align_power) - 1;
+#if !defined(TICOFF)
if (size & mask)
{
size = (size + mask) & ~mask;
bfd_set_section_size (stdoutput, sec, size);
}
+#endif
/* If the section size is non-zero, the section symbol needs an aux
entry associated with it, indicating the size. We don't know
all the values yet; coff_frob_symbol will fill them in later. */
+#ifndef TICOFF
if (size != 0
|| sec == text_section
|| sec == data_section
|| sec == bss_section)
+#endif
{
symbolS *secsym = section_symbol (sec);
@@ -1337,7 +1555,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),
@@ -1371,9 +1589,10 @@ symbol_dump ()
#define S_SET_ZEROES(s,v) ((s)->sy_symbol.ost_entry.n_zeroes = (v))
#define MIN(a,b) ((a) < (b)? (a) : (b))
-/* This vector is used to turn an internal segment into a section #
- suitable for insertion into a coff symbol table
- */
+
+/* This vector is used to turn a gas internal segment number into a
+ section number suitable for insertion into a coff symbol table.
+ This must correspond to seg_info_off_by_4. */
const short seg_N_TYPE[] =
{ /* in: segT out: N_TYPE bits */
@@ -1446,53 +1665,43 @@ static void adjust_stab_section PARAMS ((bfd *abfd, segT seg));
static void obj_coff_lcomm PARAMS ((int));
static void obj_coff_text PARAMS ((int));
static void obj_coff_data PARAMS ((int));
-static void obj_coff_ident PARAMS ((int));
void obj_coff_section PARAMS ((int));
-/* Section stuff
-
- We allow more than just the standard 3 sections, infact, we allow
- 40 sections, (though the usual three have to be there).
-
- This structure performs the mappings for us:
-*/
+/* When not using BFD_ASSEMBLER, we permit up to 40 sections.
+ This array maps a COFF section number into a gas section number.
+ Because COFF uses negative section numbers, you must add 4 to the
+ COFF section number when indexing into this array; this is done via
+ the SEG_INFO_FROM_SECTION_NUMBER macro. This must correspond to
+ seg_N_TYPE. */
-typedef struct
+static const segT seg_info_off_by_4[] =
{
- segT seg_t;
- int i;
-} seg_info_type;
-
-static const seg_info_type seg_info_off_by_4[] =
-{
- {SEG_PTV, },
- {SEG_NTV, },
- {SEG_DEBUG, },
- {SEG_ABSOLUTE, },
- {SEG_UNKNOWN, },
- {SEG_E0}, {SEG_E1}, {SEG_E2}, {SEG_E3}, {SEG_E4},
- {SEG_E5}, {SEG_E6}, {SEG_E7}, {SEG_E8}, {SEG_E9},
- {SEG_E10},{SEG_E11},{SEG_E12},{SEG_E13},{SEG_E14},
- {SEG_E15},{SEG_E16},{SEG_E17},{SEG_E18},{SEG_E19},
- {SEG_E20},{SEG_E21},{SEG_E22},{SEG_E23},{SEG_E24},
- {SEG_E25},{SEG_E26},{SEG_E27},{SEG_E28},{SEG_E29},
- {SEG_E30},{SEG_E31},{SEG_E32},{SEG_E33},{SEG_E34},
- {SEG_E35},{SEG_E36},{SEG_E37},{SEG_E38},{SEG_E39},
- {(segT)40},
- {(segT)41},
- {(segT)42},
- {(segT)43},
- {(segT)44},
- {(segT)45},
- {(segT)0},
- {(segT)0},
- {(segT)0},
- {SEG_REGISTER}
+ SEG_PTV,
+ SEG_NTV,
+ SEG_DEBUG,
+ SEG_ABSOLUTE,
+ SEG_UNKNOWN,
+ SEG_E0, SEG_E1, SEG_E2, SEG_E3, SEG_E4,
+ SEG_E5, SEG_E6, SEG_E7, SEG_E8, SEG_E9,
+ SEG_E10, SEG_E11, SEG_E12, SEG_E13, SEG_E14,
+ SEG_E15, SEG_E16, SEG_E17, SEG_E18, SEG_E19,
+ SEG_E20, SEG_E21, SEG_E22, SEG_E23, SEG_E24,
+ SEG_E25, SEG_E26, SEG_E27, SEG_E28, SEG_E29,
+ SEG_E30, SEG_E31, SEG_E32, SEG_E33, SEG_E34,
+ SEG_E35, SEG_E36, SEG_E37, SEG_E38, SEG_E39,
+ (segT) 40,
+ (segT) 41,
+ (segT) 42,
+ (segT) 43,
+ (segT) 44,
+ (segT) 45,
+ (segT) 0,
+ (segT) 0,
+ (segT) 0,
+ SEG_REGISTER
};
-
-
#define SEG_INFO_FROM_SECTION_NUMBER(x) (seg_info_off_by_4[(x)+4])
static relax_addressT
@@ -1513,14 +1722,14 @@ segT
s_get_segment (x)
symbolS * x;
{
- return SEG_INFO_FROM_SECTION_NUMBER (x->sy_symbol.ost_entry.n_scnum).seg_t;
+ return SEG_INFO_FROM_SECTION_NUMBER (x->sy_symbol.ost_entry.n_scnum);
}
/* calculate the size of the frag chain and fill in the section header
to contain all of it, also fill in the addr of the sections */
static unsigned int
size_section (abfd, idx)
- bfd * abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
unsigned int idx;
{
@@ -1531,7 +1740,7 @@ size_section (abfd, idx)
size = frag->fr_address;
if (frag->fr_address != size)
{
- fprintf (stderr, "Out of step\n");
+ fprintf (stderr, _("Out of step\n"));
size = frag->fr_address;
}
@@ -1704,9 +1913,9 @@ do_relocs_for (abfd, h, file_cursor)
if (expr_symbol_where (symbol_ptr, &file, &line))
as_bad_where (file, line,
- "unresolved relocation");
+ _("unresolved relocation"));
else
- as_bad ("bad relocation: symbol `%s' not in symbol table",
+ as_bad (_("bad relocation: symbol `%s' not in symbol table"),
S_GET_NAME (symbol_ptr));
}
dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
@@ -1784,7 +1993,7 @@ do_relocs_for (abfd, h, file_cursor)
static void
fill_section (abfd, h, file_cursor)
bfd * abfd;
- object_headers *h;
+ object_headers *h ATTRIBUTE_UNUSED;
unsigned long *file_cursor;
{
@@ -1966,7 +2175,7 @@ coff_header_append (abfd, h)
&(segment_info[i].scnhdr),
buffer);
if (size == 0)
- as_bad ("bfd_coff_swap_scnhdr_out failed");
+ as_bad (_("bfd_coff_swap_scnhdr_out failed"));
bfd_write (buffer, size, 1, abfd);
}
}
@@ -2051,7 +2260,7 @@ obj_coff_ln (appline)
if (! appline && def_symbol_in_progress != NULL)
{
- as_warn (".ln pseudo-op inside .def/.endef: ignored.");
+ as_warn (_(".ln pseudo-op inside .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* wrong context */
@@ -2099,7 +2308,7 @@ obj_coff_ln (appline)
static void
obj_coff_def (what)
- int what;
+ int what ATTRIBUTE_UNUSED;
{
char name_end; /* Char after the end of name */
char *symbol_name; /* Name of the debug symbol */
@@ -2108,7 +2317,7 @@ obj_coff_def (what)
if (def_symbol_in_progress != NULL)
{
- as_warn (".def pseudo-op used inside of .def/.endef: ignored.");
+ as_warn (_(".def pseudo-op used inside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2154,14 +2363,14 @@ unsigned int dim_index;
static void
obj_coff_endef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
symbolS *symbolP = 0;
/* DIM BUG FIX sac@cygnus.com */
dim_index = 0;
if (def_symbol_in_progress == NULL)
{
- as_warn (".endef pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2193,7 +2402,7 @@ obj_coff_endef (ignore)
{ /* .bf */
if (function_lineoff < 0)
{
- fprintf (stderr, "`.bf' symbol without preceding function\n");
+ fprintf (stderr, _("`.bf' symbol without preceding function\n"));
} /* missing function symbol */
SA_GET_SYM_LNNOPTR (last_line_symbol) = function_lineoff;
@@ -2224,6 +2433,10 @@ obj_coff_endef (ignore)
break;
case C_EXT:
+ case C_WEAKEXT:
+#ifdef TE_PE
+ case C_NT_WEAK:
+#endif
case C_STAT:
case C_LABEL:
/* Valid but set somewhere else (s_comm, s_lcomm, colon) */
@@ -2232,7 +2445,7 @@ obj_coff_endef (ignore)
case C_USTATIC:
case C_EXTDEF:
case C_ULABEL:
- as_warn ("unexpected storage class %d", S_GET_STORAGE_CLASS (def_symbol_in_progress));
+ as_warn (_("unexpected storage class %d"), S_GET_STORAGE_CLASS (def_symbol_in_progress));
break;
} /* switch on storage class */
@@ -2333,13 +2546,13 @@ obj_coff_endef (ignore)
static void
obj_coff_dim (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int dim_index;
if (def_symbol_in_progress == NULL)
{
- as_warn (".dim pseudo-op used outside of .def/.endef: ignored.");
+ as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2359,7 +2572,7 @@ obj_coff_dim (ignore)
break;
default:
- as_warn ("badly formed .dim directive ignored");
+ as_warn (_("badly formed .dim directive ignored"));
/* intentional fallthrough */
case '\n':
case ';':
@@ -2373,7 +2586,7 @@ obj_coff_dim (ignore)
static void
obj_coff_line (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int this_base;
const char *name;
@@ -2418,11 +2631,11 @@ obj_coff_line (ignore)
static void
obj_coff_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".size pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".size pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2434,11 +2647,11 @@ obj_coff_size (ignore)
static void
obj_coff_scl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".scl pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".scl pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2449,14 +2662,14 @@ obj_coff_scl (ignore)
static void
obj_coff_tag (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *symbol_name;
char name_end;
if (def_symbol_in_progress == NULL)
{
- as_warn (".tag pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".tag pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
}
@@ -2474,7 +2687,7 @@ obj_coff_tag (ignore)
(long) tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
{
- as_warn ("tag not found for .tag %s", symbol_name);
+ as_warn (_("tag not found for .tag %s"), symbol_name);
} /* not defined */
SF_SET_TAGGED (def_symbol_in_progress);
@@ -2485,11 +2698,11 @@ obj_coff_tag (ignore)
static void
obj_coff_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".type pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".type pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2507,11 +2720,11 @@ obj_coff_type (ignore)
static void
obj_coff_val (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (def_symbol_in_progress == NULL)
{
- as_warn (".val pseudo-op used outside of .def/.endef ignored.");
+ as_warn (_(".val pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
} /* if not inside .def/.endef */
@@ -2544,12 +2757,11 @@ obj_coff_val (ignore)
symbol. */
SF_SET_GET_SEGMENT (def_symbol_in_progress);
- /* FIXME: gcc can generate address expressions
- here in unusual cases (search for "obscure"
- in sdbout.c). We just ignore the offset
- here, thus generating incorrect debugging
- information. We ignore the rest of the
- line just below. */
+ /* FIXME: gcc can generate address expressions here in
+ unusual cases (search for "obscure" in sdbout.c). We
+ just ignore the offset here, thus generating incorrect
+ debugging information. We ignore the rest of the line
+ just below. */
}
/* Otherwise, it is the name of a non debug symbol and
its value will be calculated later. */
@@ -2629,8 +2841,12 @@ yank_symbols ()
{
if (symbolP->sy_mri_common)
{
- if (S_GET_STORAGE_CLASS (symbolP) == C_EXT)
- as_bad ("%s: global symbols not supported in common sections",
+ if (S_GET_STORAGE_CLASS (symbolP) == C_EXT
+#ifdef TE_PE
+ || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK
+#endif
+ || S_GET_STORAGE_CLASS (symbolP) == C_WEAKEXT)
+ as_bad (_("%s: global symbols not supported in common sections"),
S_GET_NAME (symbolP));
symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
continue;
@@ -2703,7 +2919,7 @@ yank_symbols ()
register symbolS *begin_symbolP;
begin_symbolP = *(symbolS **) stack_pop (block_stack);
if (begin_symbolP == (symbolS *) 0)
- as_warn ("mismatched .eb");
+ as_warn (_("mismatched .eb"));
else
SA_SET_SYM_ENDNDX (begin_symbolP, symbol_number + 2);
}
@@ -2743,7 +2959,7 @@ yank_symbols ()
/* I don't even know if this is needed for sdb. But
the standard assembler generates it, so... */
if (last_functionP == (symbolS *) 0)
- as_fatal ("C_EFCN symbol out of scope");
+ as_fatal (_("C_EFCN symbol out of scope"));
SA_SET_SYM_FSIZE (last_functionP,
(long) (S_GET_VALUE (symbolP) -
S_GET_VALUE (last_functionP)));
@@ -2814,9 +3030,13 @@ yank_symbols ()
}
else if (!S_IS_DEFINED (symbolP)
&& !S_IS_DEBUG (symbolP)
- && !SF_GET_STATICS (symbolP) &&
- S_GET_STORAGE_CLASS (symbolP) == C_EXT)
- { /* C_EXT && !SF_GET_FUNCTION(symbolP)) */
+ && !SF_GET_STATICS (symbolP)
+ && (S_GET_STORAGE_CLASS (symbolP) == C_EXT
+#ifdef TE_PE
+ || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK
+#endif
+ || S_GET_STORAGE_CLASS (symbolP) == C_WEAKEXT))
+ {
/* if external, Remove from the list */
symbolS *hold = symbol_previous (symbolP);
@@ -2828,7 +3048,11 @@ yank_symbols ()
else if (! S_IS_DEBUG (symbolP)
&& ! SF_GET_STATICS (symbolP)
&& ! SF_GET_FUNCTION (symbolP)
- && S_GET_STORAGE_CLASS (symbolP) == C_EXT)
+ && (S_GET_STORAGE_CLASS (symbolP) == C_EXT
+#ifdef TE_PE
+ || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK
+#endif
+ || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK))
{
symbolS *hold = symbol_previous (symbolP);
@@ -2922,7 +3146,7 @@ tie_tags ()
static void
crawl_symbols (h, abfd)
object_headers *h;
- bfd * abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
unsigned int i;
@@ -3138,7 +3362,7 @@ write_object_file ()
if (abfd == 0)
{
- as_perror ("FATAL: Can't create %s", out_file_name);
+ as_perror (_("FATAL: Can't create %s"), out_file_name);
exit (EXIT_FAILURE);
}
bfd_set_format (abfd, bfd_object);
@@ -3156,6 +3380,7 @@ write_object_file ()
at the next frag. */
subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg);
+
#ifndef SUB_SEGMENT_ALIGN
#define SUB_SEGMENT_ALIGN(SEG) 1
#endif
@@ -3163,7 +3388,9 @@ 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), NOP_OPCODE, 0);
+ frag_align (SUB_SEGMENT_ALIGN (now_seg),
+ subseg_text_p (now_seg) ? NOP_OPCODE : 0,
+ 0);
#ifdef md_do_align
alignment_done:
#endif
@@ -3312,7 +3539,7 @@ write_object_file ()
/* Recent changes to write need this, but where it should
go is up to Ken.. */
if (bfd_close_all_done (abfd) == false)
- as_fatal ("Can't close %s: %s", out_file_name,
+ as_fatal (_("Can't close %s: %s"), out_file_name,
bfd_errmsg (bfd_get_error ()));
#else
{
@@ -3346,7 +3573,7 @@ obj_coff_add_segment (name)
if (i == SEG_LAST)
{
- as_bad ("Too many new sections; can't add \"%s\"", name);
+ as_bad (_("Too many new sections; can't add \"%s\""), name);
return now_seg;
}
@@ -3378,7 +3605,7 @@ obj_coff_add_segment (name)
void
obj_coff_section (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
/* Strip out the section name */
char *section_name, *name;
@@ -3438,7 +3665,7 @@ obj_coff_section (ignore)
case 'x': flags |= STYP_TEXT; break;
case 'r': flags |= STYP_LIT; break;
default:
- as_warn("unknown section attribute '%c'",
+ as_warn(_("unknown section attribute '%c'"),
*input_line_pointer);
break;
}
@@ -3459,7 +3686,7 @@ obj_coff_section (ignore)
static void
obj_coff_text (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
subseg_new (".text", get_absolute_expression ());
}
@@ -3467,7 +3694,7 @@ obj_coff_text (ignore)
static void
obj_coff_data (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (flag_readonly_data_in_text)
subseg_new (".text", get_absolute_expression () + 1000);
@@ -3477,7 +3704,7 @@ obj_coff_data (ignore)
static void
obj_coff_ident (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
segT current_seg = now_seg; /* save current seg */
subsegT current_subseg = now_subseg;
@@ -3623,9 +3850,15 @@ c_section_symbol (name, idx)
{
symbolS *symbolP;
- symbolP = symbol_new (name, idx,
- 0,
- &zero_address_frag);
+ symbolP = symbol_find_base (name, DO_NOT_STRIP);
+ if (symbolP == NULL)
+ symbolP = symbol_new (name, idx, 0, &zero_address_frag);
+ else
+ {
+ /* Mmmm. I just love violating interfaces. Makes me feel...dirty. */
+ S_SET_SEGMENT (symbolP, idx);
+ symbolP->sy_frag = &zero_address_frag;
+ }
S_SET_STORAGE_CLASS (symbolP, C_STAT);
S_SET_NUMBER_AUXILIARY (symbolP, 1);
@@ -3730,7 +3963,7 @@ w_symbols (abfd, where, symbol_rootP)
static void
obj_coff_lcomm (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
s_lcomm(0);
return;
@@ -3750,19 +3983,19 @@ obj_coff_lcomm (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after name");
+ as_bad (_("Expected comma after name"));
ignore_rest_of_line ();
return;
}
if (*input_line_pointer == '\n')
{
- as_bad ("Missing size expression");
+ as_bad (_("Missing size expression"));
return;
}
input_line_pointer++;
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn ("lcomm length (%d.) <0! Ignored.", temp);
+ as_warn (_("lcomm length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -3790,7 +4023,7 @@ obj_coff_lcomm (ignore)
}
}
else
- as_bad("Symbol %s already defined", name);
+ as_bad(_("Symbol %s already defined"), name);
demand_empty_rest_of_line();
#endif
@@ -3884,7 +4117,7 @@ fixup_segment (segP, this_segment_type)
if (!SF_GET_BALNAME (tc_get_bal_of_call (add_symbolP)))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "No 'bal' entry point for leafproc %s",
+ _("No 'bal' entry point for leafproc %s"),
S_GET_NAME (add_symbolP));
continue;
}
@@ -3963,7 +4196,7 @@ fixup_segment (segP, this_segment_type)
{
#ifndef TC_M68K
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Negative of non-absolute symbol %s",
+ _("Negative of non-absolute symbol %s"),
S_GET_NAME (sub_symbolP));
#endif
add_number -= S_GET_VALUE (sub_symbolP);
@@ -3984,7 +4217,7 @@ fixup_segment (segP, this_segment_type)
if (fixP->fx_tcbit)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "callj to difference of 2 symbols");
+ _("callj to difference of 2 symbols"));
}
#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP) -
@@ -4030,7 +4263,7 @@ fixup_segment (segP, this_segment_type)
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld.",
+ _("Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld."),
segment_name (S_GET_SEGMENT (sub_symbolP)),
S_GET_NAME (sub_symbolP),
(long) (fragP->fr_address + where));
@@ -4120,7 +4353,7 @@ fixup_segment (segP, this_segment_type)
* relocation.
*/
as_bad_where (fixP->fx_file, fixP->fx_line,
- "can't use COBR format with external label");
+ _("can't use COBR format with external label"));
fixP->fx_addsy = NULL;
fixP->fx_done = 1;
continue;
@@ -4177,6 +4410,12 @@ fixup_segment (segP, this_segment_type)
#endif
} /* if pcrel */
+#ifdef MD_APPLY_FIX3
+ md_apply_fix3 (fixP, (valueT *) &add_number, this_segment_type);
+#else
+ md_apply_fix (fixP, add_number);
+#endif
+
if (!fixP->fx_bit_fixP && ! fixP->fx_no_overflow)
{
#ifndef TC_M88K
@@ -4194,7 +4433,7 @@ fixup_segment (segP, this_segment_type)
|| (add_number & 0x8000) == 0)))
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Value of %ld too large for field of %d bytes at 0x%lx",
+ _("Value of %ld too large for field of %d bytes at 0x%lx"),
(long) add_number, size,
(unsigned long) (fragP->fr_address + where));
}
@@ -4208,18 +4447,11 @@ fixup_segment (segP, this_segment_type)
&& size == 2
&& add_number > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Signed .word overflow; switch may be too large; %ld at 0x%lx",
+ _("Signed .word overflow; switch may be too large; %ld at 0x%lx"),
(long) add_number,
(unsigned long) (fragP->fr_address + where));
#endif
} /* not a bit fix */
- /* Once this fix has been applied, we don't have to output
- anything nothing more need be done. */
-#ifdef MD_APPLY_FIX3
- md_apply_fix3 (fixP, (valueT *) &add_number, this_segment_type);
-#else
- md_apply_fix (fixP, add_number);
-#endif
} /* For each fixS in this segment. */
} /* fixup_segment() */
@@ -4302,13 +4534,16 @@ adjust_stab_section(abfd, seg)
#endif /* not BFD_ASSEMBLER */
-const pseudo_typeS obj_pseudo_table[] =
+const pseudo_typeS coff_pseudo_table[] =
{
{"def", obj_coff_def, 0},
{"dim", obj_coff_dim, 0},
{"endef", obj_coff_endef, 0},
{"line", obj_coff_line, 0},
{"ln", obj_coff_ln, 0},
+#ifdef BFD_ASSEMBLER
+ {"loc", obj_coff_loc, 0},
+#endif
{"appline", obj_coff_ln, 1},
{"scl", obj_coff_scl, 0},
{"size", obj_coff_size, 0},
@@ -4323,15 +4558,15 @@ const pseudo_typeS obj_pseudo_table[] =
/* We accept the .bss directive for backward compatibility with
earlier versions of gas. */
{"bss", obj_coff_bss, 0},
+ {"weak", obj_coff_weak, 0},
+ {"ident", obj_coff_ident, 0},
#ifndef BFD_ASSEMBLER
{"use", obj_coff_section, 0},
{"text", obj_coff_text, 0},
{"data", obj_coff_data, 0},
{"lcomm", obj_coff_lcomm, 0},
- {"ident", obj_coff_ident, 0},
#else
{"optim", s_ignore, 0}, /* For sun386i cc (?) */
- {"ident", s_ignore, 0}, /* we don't yet handle this. */
#endif
{"version", s_ignore, 0},
{"ABORT", s_abort, 0},
@@ -4339,62 +4574,43 @@ const pseudo_typeS obj_pseudo_table[] =
/* The m88k uses sdef instead of def. */
{"sdef", obj_coff_def, 0},
#endif
- {NULL} /* end sentinel */
-}; /* obj_pseudo_table */
+ {NULL, NULL, 0} /* end sentinel */
+}; /* coff_pseudo_table */
#ifdef BFD_ASSEMBLER
/* Support for a COFF emulation. */
-static void
-coff_pop_insert ()
-{
- pop_insert (obj_pseudo_table);
-}
-
-static int
-coff_sec_sym_ok_for_reloc (sec)
- asection *sec;
-{
- return 0;
-}
+static void coff_pop_insert PARAMS ((void));
static void
-no_func ()
+coff_pop_insert ()
{
- abort ();
+ pop_insert (coff_pseudo_table);
}
const struct format_ops coff_format_ops =
{
bfd_target_coff_flavour,
- 0,
- 1,
+ 0, /* dfl_leading_underscore */
+ 1, /* emit_section_symbols */
coff_frob_symbol,
- no_func,
+ 0, /* frob_file */
coff_frob_file_after_relocs,
- 0, 0,
- 0, 0,
- 0,
-#if 0
- obj_generate_asm_lineno,
-#else
- no_func,
-#endif
-#if 0
- obj_stab,
-#else
- no_func,
-#endif
- coff_sec_sym_ok_for_reloc,
+ 0, /* s_get_size */
+ 0, /* s_set_size */
+ 0, /* s_get_align */
+ 0, /* s_set_align */
+ 0, /* s_get_other */
+ 0, /* s_get_desc */
+ 0, /* copy_symbol_attributes */
+ 0, /* generate_asm_lineno */
+ 0, /* process_stab */
+ 0, /* sec_sym_ok_for_reloc */
coff_pop_insert,
-#if 0
- obj_set_ext,
-#else
- no_func,
-#endif
+ 0, /* ecoff_set_ext */
coff_obj_read_begin_hook,
- coff_obj_symbol_new_hook,
+ coff_obj_symbol_new_hook
};
#endif
diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h
index f796461..f60ae36 100644
--- a/contrib/binutils/gas/config/obj-coff.h
+++ b/contrib/binutils/gas/config/obj-coff.h
@@ -1,5 +1,5 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 1998
+ Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS.
@@ -110,12 +110,29 @@
#endif
#ifdef TC_SH
+
+#ifdef TE_PE
+#define COFF_WITH_PE
+#endif
+
#include "coff/sh.h"
+
+#ifdef TE_PE
+#define TARGET_FORMAT "pe-shl"
+#else
#define TARGET_FORMAT \
(shl \
? (sh_small ? "coff-shl-small" : "coff-shl") \
: (sh_small ? "coff-sh-small" : "coff-sh"))
#endif
+#endif
+
+#ifdef TC_MIPS
+#define COFF_WITH_PE
+#include "coff/mipspe.h"
+#undef TARGET_FORMAT
+#define TARGET_FORMAT "pe-mips"
+#endif
#ifdef TC_M88K
#include "coff/m88k.h"
@@ -132,6 +149,18 @@
#define TARGET_FORMAT "coff-tic30"
#endif
+#ifdef TC_TIC80
+#include "coff/tic80.h"
+#define TARGET_FORMAT "coff-tic80"
+#define ALIGNMENT_IN_S_FLAGS 1
+#endif
+
+#ifdef TC_MCORE
+#include "coff/mcore.h"
+#ifndef TARGET_FORMAT
+#define TARGET_FORMAT "pe-mcore"
+#endif
+#endif
/* Targets may also set this. Also, if BFD_ASSEMBLER is defined, this
will already have been defined. */
@@ -142,7 +171,7 @@
#define OBJ_COFF_MAX_AUXENTRIES 1
#endif /* OBJ_COFF_MAX_AUXENTRIES */
-extern void coff_obj_symbol_new_hook PARAMS ((struct symbol *));
+extern void coff_obj_symbol_new_hook PARAMS ((symbolS *));
#define obj_symbol_new_hook coff_obj_symbol_new_hook
extern void coff_obj_read_begin_hook PARAMS ((void));
@@ -199,31 +228,35 @@ extern void coff_obj_read_begin_hook PARAMS ((void));
/* Alter the field names, for now, until we've fixed up the other
references to use the new name. */
#ifdef TC_I960
-#define TC_SYMFIELD_TYPE struct symbol *
+#define TC_SYMFIELD_TYPE symbolS *
#define sy_tc bal
#endif
#define OBJ_SYMFIELD_TYPE unsigned long
#define sy_obj sy_flags
-#define SYM_AUXENT(S) (&coffsymbol ((S)->bsym)->native[1].u.auxent)
+#define SYM_AUXENT(S) \
+ (&coffsymbol (symbol_get_bfdsym (S))->native[1].u.auxent)
+#define SYM_AUXINFO(S) \
+ (&coffsymbol (symbol_get_bfdsym (S))->native[1])
#define DO_NOT_STRIP 0
extern void obj_coff_section PARAMS ((int));
/* The number of auxiliary entries */
-#define S_GET_NUMBER_AUXILIARY(s) (coffsymbol((s)->bsym)->native->u.syment.n_numaux)
+#define S_GET_NUMBER_AUXILIARY(s) \
+ (coffsymbol (symbol_get_bfdsym (s))->native->u.syment.n_numaux)
/* 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. */
#define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0)
-extern int S_SET_DATA_TYPE PARAMS ((struct symbol *, int));
-extern int S_SET_STORAGE_CLASS PARAMS ((struct symbol *, int));
-extern int S_GET_STORAGE_CLASS PARAMS ((struct symbol *));
-extern void SA_SET_SYM_ENDNDX PARAMS ((struct symbol *, struct symbol *));
+extern int S_SET_DATA_TYPE PARAMS ((symbolS *, int));
+extern int S_SET_STORAGE_CLASS PARAMS ((symbolS *, int));
+extern int S_GET_STORAGE_CLASS PARAMS ((symbolS *));
+extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
/* Auxiliary entry macros. SA_ stands for symbol auxiliary */
/* Omit the tv related fields */
@@ -285,9 +318,9 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((struct symbol *, struct symbol *));
/* All other bits are unused. */
/* Accessors */
-#define SF_GET(s) ((s)->sy_flags)
-#define SF_GET_DEBUG(s) ((s)->bsym->flags & BSF_DEBUGGING)
-#define SF_SET_DEBUG(s) ((s)->bsym->flags |= BSF_DEBUGGING)
+#define SF_GET(s) (*symbol_get_obj (s))
+#define SF_GET_DEBUG(s) (symbol_get_bfdsym (s)->flags & BSF_DEBUGGING)
+#define SF_SET_DEBUG(s) (symbol_get_bfdsym (s)->flags |= BSF_DEBUGGING)
#define SF_GET_NORMAL_FIELD(s) (SF_GET (s) & SF_NORMAL_MASK)
#define SF_GET_DEBUG_FIELD(s) (SF_GET (s) & SF_DEBUG_MASK)
#define SF_GET_FILE(s) (SF_GET (s) & SF_FILE)
@@ -333,26 +366,29 @@ extern int coff_line_base;
extern int coff_n_line_nos;
#define obj_emit_lineno(WHERE,LINE,FILE_START) abort ()
-extern void coff_add_linesym PARAMS ((struct symbol *));
+extern void coff_add_linesym PARAMS ((symbolS *));
void c_dot_file_symbol PARAMS ((char *filename));
#define obj_app_file c_dot_file_symbol
-extern void coff_frob_symbol PARAMS ((struct symbol *, int *));
+extern void coff_frob_symbol PARAMS ((symbolS *, int *));
extern void coff_adjust_symtab PARAMS ((void));
extern void coff_frob_section PARAMS ((segT));
extern void coff_adjust_section_syms PARAMS ((bfd *, asection *, PTR));
extern void coff_frob_file_after_relocs PARAMS ((void));
#define obj_frob_symbol(S,P) coff_frob_symbol(S,&P)
+#ifndef obj_adjust_symtab
#define obj_adjust_symtab() coff_adjust_symtab()
+#endif
#define obj_frob_section(S) coff_frob_section (S)
#define obj_frob_file_after_relocs() coff_frob_file_after_relocs ()
-extern struct symbol *coff_last_function;
+extern symbolS *coff_last_function;
/* Forward the segment of a forwarded symbol, handle assignments that
just copy symbol values, etc. */
+#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES
#ifndef TE_I386AIX
#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \
(SF_GET_GET_SEGMENT (dest) \
@@ -364,6 +400,7 @@ extern struct symbol *coff_last_function;
? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \
: 0)
#endif
+#endif
/* sanity check */
@@ -468,6 +505,16 @@ typedef struct
/* 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. */
+#ifdef TE_PE
+#define S_IS_WEAK(s) \
+ ((s)->sy_symbol.ost_entry.n_sclass == C_NT_WEAK \
+ || (s)->sy_symbol.ost_entry.n_sclass == C_WEAKEXT)
+#else
+#define S_IS_WEAK(s) \
+ ((s)->sy_symbol.ost_entry.n_sclass == C_WEAKEXT)
+#endif
+
/* Accessors */
/* The name of the symbol */
#define S_GET_NAME(s) ((char*)(s)->sy_symbol.ost_entry.n_offset)
@@ -753,7 +800,7 @@ extern void c_dot_file_symbol PARAMS ((char *filename));
#define obj_app_file c_dot_file_symbol
extern void obj_extra_stuff PARAMS ((object_headers * headers));
-extern segT s_get_segment PARAMS ((struct symbol * ptr));
+extern segT s_get_segment PARAMS ((symbolS *ptr));
extern void c_section_header PARAMS ((struct internal_scnhdr * header,
char *name,
@@ -767,7 +814,7 @@ extern void c_section_header PARAMS ((struct internal_scnhdr * header,
long alignment));
#ifndef tc_coff_symbol_emit_hook
-void tc_coff_symbol_emit_hook PARAMS ((struct symbol *));
+void tc_coff_symbol_emit_hook PARAMS ((symbolS *));
#endif
/* sanity check */
@@ -793,6 +840,12 @@ extern void obj_coff_pe_handle_link_once ();
#endif /* not BFD_ASSEMBLER */
+extern const pseudo_typeS coff_pseudo_table[];
+
+#ifndef obj_pop_insert
+#define obj_pop_insert() pop_insert (coff_pseudo_table)
+#endif
+
/* In COFF, if a symbol is defined using .def/.val SYM/.endef, it's OK
to redefine the symbol later on. This can happen if C symbols use
a prefix, and a symbol is defined both with and without the prefix,
@@ -813,4 +866,8 @@ extern void obj_coff_pe_handle_link_once ();
extern void obj_coff_init_stab_section PARAMS ((segT));
#define INIT_STAB_SECTION(seg) obj_coff_init_stab_section (seg)
+/* Store the number of relocations in the section aux entry. */
+#define SET_SECTION_RELOCS(sec, relocs, n) \
+ SA_SET_SCN_NRELOC (section_symbol (sec), n)
+
#endif /* OBJ_FORMAT_H */
diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c
index 27194a0..767dc58 100644
--- a/contrib/binutils/gas/config/obj-ecoff.c
+++ b/contrib/binutils/gas/config/obj-ecoff.c
@@ -1,5 +1,6 @@
/* ECOFF object file format.
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -81,7 +82,11 @@ const pseudo_typeS obj_pseudo_table[] =
/* Other ECOFF directives. */
{ "extern", ecoff_directive_extern, 0 },
+
+#ifndef TC_MIPS
+ /* For TC_MIPS, tc-mips.c adds this. */
{ "weakext", ecoff_directive_weakext, 0 },
+#endif
/* These are used on Irix. I don't know how to implement them. */
{ "bgnb", s_ignore, 0 },
@@ -232,14 +237,14 @@ ecoff_frob_file ()
alpha_frob_ecoff_data ();
if (! bfd_ecoff_set_gp_value (stdoutput, alpha_gp_value))
- as_fatal ("Can't set GP value");
+ as_fatal (_("Can't set GP value"));
gprmask = alpha_gprmask;
fprmask = alpha_fprmask;
#endif
if (! bfd_ecoff_set_regmasks (stdoutput, gprmask, fprmask, cprmask))
- as_fatal ("Can't set register masks");
+ as_fatal (_("Can't set register masks"));
}
}
@@ -256,8 +261,9 @@ obj_ecoff_set_ext (sym, ext)
= &ecoff_backend (stdoutput)->debug_swap;
ecoff_symbol_type *esym;
- know (bfd_asymbol_flavour (sym->bsym) == bfd_target_ecoff_flavour);
- esym = ecoffsymbol (sym->bsym);
+ know (bfd_asymbol_flavour (symbol_get_bfdsym (sym))
+ == bfd_target_ecoff_flavour);
+ esym = ecoffsymbol (symbol_get_bfdsym (sym));
esym->local = false;
esym->native = xmalloc (debug_swap->external_ext_size);
(*debug_swap->swap_ext_out) (stdoutput, ext, esym->native);
@@ -287,14 +293,18 @@ ecoff_pop_insert ()
const struct format_ops ecoff_format_ops =
{
bfd_target_ecoff_flavour,
- 0,
- 1,
+ 0, /* dfl_leading_underscore */
+ 1, /* emit_section_symbols */
obj_ecoff_frob_symbol,
ecoff_frob_file,
- 0,
- 0, 0,
- 0, 0,
- 0,
+ 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_get_desc */
+ 0, /* copy_symbol_attributes */
ecoff_generate_asm_lineno,
ecoff_stab,
ecoff_sec_sym_ok_for_reloc,
diff --git a/contrib/binutils/gas/config/obj-ecoff.h b/contrib/binutils/gas/config/obj-ecoff.h
index 0192afe..8bca254 100644
--- a/contrib/binutils/gas/config/obj-ecoff.h
+++ b/contrib/binutils/gas/config/obj-ecoff.h
@@ -1,5 +1,5 @@
/* ECOFF object file format header file.
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -36,10 +36,14 @@
symbols is undefined (this last is needed to distinguish a .extern
symbols from a .comm symbol). */
-#define TARGET_SYMBOL_FIELDS \
- struct efdr *ecoff_file; \
- struct localsym *ecoff_symbol; \
+struct ecoff_sy_obj
+{
+ struct efdr *ecoff_file;
+ struct localsym *ecoff_symbol;
valueT ecoff_extern_size;
+};
+
+#define OBJ_SYMFIELD_TYPE struct ecoff_sy_obj
/* Modify the ECOFF symbol. */
#define obj_frob_symbol(symp, punt) ecoff_frob_symbol (symp)
@@ -60,11 +64,8 @@ extern void ecoff_frob_file PARAMS ((void));
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
ecoff_stab ((seg), (what), (string), (type), (other), (desc))
-#define OBJ_GENERATE_ASM_LINENO(filename, lineno) \
- ecoff_generate_asm_lineno ((filename), (lineno))
-
#define EMIT_SECTION_SYMBOLS 0
#define obj_sec_sym_ok_for_reloc(SEC) 1
#define obj_ecoff_set_ext ecoff_set_ext
-extern void obj_ecoff_set_ext PARAMS ((struct symbol *, EXTR *));
+extern void obj_ecoff_set_ext PARAMS ((symbolS *, EXTR *));
diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c
index b8201f5..21fd0fa 100644
--- a/contrib/binutils/gas/config/obj-elf.c
+++ b/contrib/binutils/gas/config/obj-elf.c
@@ -1,5 +1,6 @@
/* ELF object file format
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -45,6 +46,10 @@
#include "elf/ppc.h"
#endif
+#ifdef TC_I370
+#include "elf/i370.h"
+#endif
+
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 *));
@@ -65,15 +70,17 @@ static void obj_elf_type PARAMS ((int));
static void obj_elf_ident PARAMS ((int));
static void obj_elf_weak PARAMS ((int));
static void obj_elf_local PARAMS ((int));
-static void obj_elf_common PARAMS ((int));
+static void obj_elf_visibility PARAMS ((int));
static void obj_elf_symver PARAMS ((int));
-static void obj_elf_data PARAMS ((int));
-static void obj_elf_text 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));
static const pseudo_typeS elf_pseudo_table[] =
{
{"comm", obj_elf_common, 0},
+ {"common", obj_elf_common, 1},
{"ident", obj_elf_ident, 0},
{"local", obj_elf_local, 0},
{"previous", obj_elf_previous, 0},
@@ -81,11 +88,18 @@ static const pseudo_typeS elf_pseudo_table[] =
{"section.s", obj_elf_section, 0},
{"sect", obj_elf_section, 0},
{"sect.s", obj_elf_section, 0},
+ {"pushsection", obj_elf_section, 1},
+ {"popsection", obj_elf_popsection, 0},
{"size", obj_elf_size, 0},
{"type", obj_elf_type, 0},
{"version", obj_elf_version, 0},
{"weak", obj_elf_weak, 0},
+ /* These define symbol visibility. */
+ {"internal", obj_elf_visibility, STV_INTERNAL},
+ {"hidden", obj_elf_visibility, STV_HIDDEN},
+ {"protected", obj_elf_visibility, STV_PROTECTED},
+
/* These are used for stabs-in-elf configurations. */
{"line", obj_elf_line, 0},
@@ -95,6 +109,10 @@ static const pseudo_typeS elf_pseudo_table[] =
/* A GNU extension to change subsection only. */
{"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},
+
/* These are used for dwarf. */
{"2byte", cons, 2},
{"4byte", cons, 4},
@@ -105,7 +123,7 @@ static const pseudo_typeS elf_pseudo_table[] =
{"text", obj_elf_text, 0},
/* End sentinel. */
- {NULL},
+ {NULL, NULL, 0},
};
static const pseudo_typeS ecoff_debug_pseudo_table[] =
@@ -150,7 +168,7 @@ static const pseudo_typeS ecoff_debug_pseudo_table[] =
{ "vreg", s_ignore, 0 },
#endif
- {NULL} /* end sentinel */
+ {NULL, NULL, 0} /* end sentinel */
};
#undef NO_RELOC
@@ -208,6 +226,13 @@ elf_s_set_align (sym, align)
S_SET_ALIGN (sym, align);
}
+int
+elf_s_get_other (sym)
+ symbolS *sym;
+{
+ return elf_symbol (symbol_get_bfdsym (sym))->internal_elf_sym.st_other;
+}
+
static void
elf_copy_symbol_attributes (dest, src)
symbolS *dest, *src;
@@ -229,8 +254,8 @@ elf_file_symbol (s)
symbolS *sym;
sym = symbol_new (s, absolute_section, (valueT) 0, (struct frag *) 0);
- sym->sy_frag = &zero_address_frag;
- sym->bsym->flags |= BSF_FILE;
+ symbol_set_frag (sym, &zero_address_frag);
+ symbol_get_bfdsym (sym)->flags |= BSF_FILE;
if (symbol_rootP != sym)
{
@@ -246,9 +271,9 @@ elf_file_symbol (s)
#endif
}
-static void
-obj_elf_common (ignore)
- int ignore;
+void
+obj_elf_common (is_common)
+ int is_common;
{
char *name;
char c;
@@ -257,6 +282,12 @@ obj_elf_common (ignore)
symbolS *symbolP;
int have_align;
+ if (flag_mri && is_common)
+ {
+ s_mri_common (0);
+ return;
+ }
+
name = input_line_pointer;
c = get_symbol_end ();
/* just after name is now '\0' */
@@ -265,14 +296,14 @@ obj_elf_common (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name");
+ as_bad (_("Expected comma after symbol-name"));
ignore_rest_of_line ();
return;
}
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (".COMMon length (%d.) <0! Ignored.", temp);
+ as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -282,15 +313,15 @@ obj_elf_common (ignore)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol");
+ 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)
+ if (S_GET_VALUE (symbolP) != (valueT) size)
{
- as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."),
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
}
}
@@ -313,10 +344,10 @@ obj_elf_common (ignore)
if (temp < 0)
{
temp = 0;
- as_warn ("Common alignment negative; 0 assumed");
+ as_warn (_("Common alignment negative; 0 assumed"));
}
}
- if (symbolP->local)
+ if (symbol_get_obj (symbolP)->local)
{
segT old_sec;
int old_subsec;
@@ -332,7 +363,7 @@ obj_elf_common (ignore)
for (align = 0; (temp & 1) == 0; temp >>= 1, ++align);
if (temp != 1)
{
- as_bad ("Common alignment not a power of 2");
+ as_bad (_("Common alignment not a power of 2"));
ignore_rest_of_line ();
return;
}
@@ -344,8 +375,8 @@ obj_elf_common (ignore)
if (align)
frag_align (align, 0, 0);
if (S_GET_SEGMENT (symbolP) == bss_section)
- symbolP->sy_frag->fr_symbol = 0;
- symbolP->sy_frag = frag_now;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
+ symbol_set_frag (symbolP, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *) 0);
*pfrag = 0;
@@ -383,7 +414,7 @@ obj_elf_common (ignore)
goto allocate_common;
}
- symbolP->bsym->flags |= BSF_OBJECT;
+ symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
demand_empty_rest_of_line ();
return;
@@ -395,7 +426,7 @@ obj_elf_common (ignore)
p++;
c = *p;
*p = '\0';
- as_bad ("bad .common segment %s", input_line_pointer + 1);
+ as_bad (_("bad .common segment %s"), input_line_pointer + 1);
*p = c;
input_line_pointer = p;
ignore_rest_of_line ();
@@ -405,7 +436,7 @@ obj_elf_common (ignore)
static void
obj_elf_local (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -419,7 +450,7 @@ obj_elf_local (ignore)
*input_line_pointer = c;
SKIP_WHITESPACE ();
S_CLEAR_EXTERNAL (symbolP);
- symbolP->local = 1;
+ symbol_get_obj (symbolP)->local = 1;
if (c == ',')
{
input_line_pointer++;
@@ -434,7 +465,7 @@ obj_elf_local (ignore)
static void
obj_elf_weak (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -448,7 +479,7 @@ obj_elf_weak (ignore)
*input_line_pointer = c;
SKIP_WHITESPACE ();
S_SET_WEAK (symbolP);
- symbolP->local = 1;
+ symbol_get_obj (symbolP)->local = 1;
if (c == ',')
{
input_line_pointer++;
@@ -461,9 +492,61 @@ obj_elf_weak (ignore)
demand_empty_rest_of_line ();
}
+static void
+obj_elf_visibility (visibility)
+ int visibility;
+{
+ char *name;
+ int c;
+ symbolS *symbolP;
+ asymbol *bfdsym;
+ elf_symbol_type *elfsym;
+
+ do
+ {
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ symbolP = symbol_find_or_make (name);
+ *input_line_pointer = c;
+
+ SKIP_WHITESPACE ();
+
+ bfdsym = symbol_get_bfdsym (symbolP);
+ elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
+
+ assert (elfsym);
+
+ elfsym->internal_elf_sym.st_other = visibility;
+
+ if (c == ',')
+ {
+ input_line_pointer ++;
+
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer == '\n')
+ c = '\n';
+ }
+ }
+ while (c == ',');
+
+ demand_empty_rest_of_line ();
+}
+
+
static segT previous_section;
static int previous_subsection;
+struct section_stack
+{
+ struct section_stack *next;
+ segT seg, prev_seg;
+ int subseg, prev_subseg;
+};
+
+static struct section_stack *section_stack;
+
+
/* Handle the .section pseudo-op. This code supports two different
syntaxes.
@@ -491,7 +574,7 @@ struct special_section
int attributes;
};
-static struct special_section special_sections[] =
+static struct special_section const special_sections[] =
{
{ ".bss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
{ ".comment", SHT_PROGBITS, 0 },
@@ -530,25 +613,198 @@ static struct special_section special_sections[] =
};
void
-obj_elf_section (xxx)
- int xxx;
+obj_elf_change_section (name, type, attr, push)
+ char *name;
+ int type, attr, push;
{
- char *string;
int new_sec;
segT sec;
- int type, attr;
- int i;
- flagword flags;
- symbolS *secsym;
#ifdef md_flush_pending_output
md_flush_pending_output ();
#endif
+ /* Switch to the section, creating it if necessary. */
+ if (push)
+ {
+ struct section_stack *elt;
+ elt = xmalloc (sizeof (struct section_stack));
+ elt->next = section_stack;
+ elt->seg = now_seg;
+ elt->prev_seg = previous_section;
+ elt->subseg = now_subseg;
+ elt->prev_subseg = previous_subsection;
+ section_stack = elt;
+ }
+ previous_section = now_seg;
+ previous_subsection = now_subseg;
+
+ new_sec = bfd_get_section_by_name (stdoutput, name) == NULL;
+ 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)
+ {
+ /* 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);
+#endif
+
+ /* Prevent SEC_HAS_CONTENTS from being inadvertently set. */
+ if (type == SHT_NOBITS)
+ seg_info (sec)->bss = 1;
+
+ bfd_set_section_flags (stdoutput, sec, flags);
+
+ /* Add a symbol for this section to the symbol table. */
+ secsym = symbol_find (name);
+ if (secsym != NULL)
+ symbol_set_bfdsym (secsym, sec->symbol);
+ else
+ symbol_table_insert (section_symbol (sec));
+ }
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
+}
+
+int
+obj_elf_parse_section_letters (str, len)
+ char *str;
+ size_t len;
+{
+ int attr = 0;
+
+ while (len > 0)
+ {
+ switch (*str)
+ {
+ case 'a':
+ attr |= SHF_ALLOC;
+ break;
+ case 'w':
+ attr |= SHF_WRITE;
+ break;
+ case 'x':
+ attr |= SHF_EXECINSTR;
+ break;
+ default:
+ {
+ char *bad_msg = _("Unrecognized .section attribute: want a,w,x");
+#ifdef md_elf_section_letter
+ int md_attr = md_elf_section_letter (*str, &bad_msg);
+ if (md_attr >= 0)
+ attr |= md_attr;
+ else
+#endif
+ {
+ as_warn ("%s", bad_msg);
+ attr = -1;
+ }
+ }
+ break;
+ }
+ str++, len--;
+ }
+
+ return attr;
+}
+
+int
+obj_elf_section_word (str, len)
+ char *str;
+ size_t len;
+{
+ if (len == 5 && strncmp (str, "write", 5) == 0)
+ return SHF_WRITE;
+ if (len == 5 && strncmp (str, "alloc", 5) == 0)
+ return SHF_ALLOC;
+ if (len == 9 && strncmp (str, "execinstr", 9) == 0)
+ return SHF_EXECINSTR;
+
+#ifdef md_elf_section_word
+ {
+ int md_attr = md_elf_section_word (str, len);
+ if (md_attr >= 0)
+ return md_attr;
+ }
+#endif
+
+ as_warn (_("Unrecognized section attribute"));
+ return 0;
+}
+
+int
+obj_elf_section_type (str, len)
+ char *str;
+ size_t len;
+{
+ if (len == 8 && strncmp (str, "progbits", 8) == 0)
+ return SHT_PROGBITS;
+ if (len == 6 && strncmp (str, "nobits", 6) == 0)
+ return SHT_NOBITS;
+
+#ifdef md_elf_section_type
+ {
+ int md_type = md_elf_section_type (str, len);
+ if (md_type >= 0)
+ return md_type;
+ }
+#endif
+
+ as_warn (_("Unrecognized section type"));
+ return 0;
+}
+
+void
+obj_elf_section (push)
+ int push;
+{
+ char *name, *beg, *end;
+ int type, attr, dummy;
+
+#ifndef TC_I370
if (flag_mri)
{
char mri_type;
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
previous_section = now_seg;
previous_subsection = now_subseg;
@@ -560,13 +816,14 @@ obj_elf_section (xxx)
return;
}
+#endif /* ! defined (TC_I370) */
/* Get name of section. */
SKIP_WHITESPACE ();
if (*input_line_pointer == '"')
{
- string = demand_copy_C_string (&xxx);
- if (string == NULL)
+ name = demand_copy_C_string (&dummy);
+ if (name == NULL)
{
ignore_rest_of_line ();
return;
@@ -574,46 +831,21 @@ obj_elf_section (xxx)
}
else
{
- char *p = input_line_pointer;
- char c;
- while (0 == strchr ("\n\t,; ", *p))
- p++;
- if (p == input_line_pointer)
+ end = input_line_pointer;
+ while (0 == strchr ("\n\t,; ", *end))
+ end++;
+ if (end == input_line_pointer)
{
- as_warn ("Missing section name");
+ as_warn (_("Missing section name"));
ignore_rest_of_line ();
return;
}
- c = *p;
- *p = 0;
- string = xmalloc ((unsigned long) (p - input_line_pointer + 1));
- strcpy (string, input_line_pointer);
- *p = c;
- input_line_pointer = p;
- }
-
- /* Switch to the section, creating it if necessary. */
- previous_section = now_seg;
- previous_subsection = now_subseg;
-
- new_sec = bfd_get_section_by_name (stdoutput, string) == NULL;
- sec = subseg_new (string, 0);
-
- /* If this section already existed, we don't bother to change the
- flag values. */
- if (! new_sec)
- {
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
- ++input_line_pointer;
- ++input_line_pointer;
-
-#ifdef md_elf_section_change_hook
- md_elf_section_change_hook ();
-#endif
- return;
+ name = xmalloc (end - input_line_pointer + 1);
+ memcpy (name, input_line_pointer, end - input_line_pointer);
+ name[end - input_line_pointer] = '\0';
+ input_line_pointer = end;
}
-
SKIP_WHITESPACE ();
type = SHT_NULL;
@@ -623,81 +855,41 @@ obj_elf_section (xxx)
{
/* Skip the comma. */
++input_line_pointer;
-
SKIP_WHITESPACE ();
if (*input_line_pointer == '"')
{
- /* Pick up a string with a combination of a, w, x. */
- ++input_line_pointer;
- while (*input_line_pointer != '"')
+ beg = demand_copy_C_string (&dummy);
+ if (beg == NULL)
{
- switch (*input_line_pointer)
- {
- case 'a':
- attr |= SHF_ALLOC;
- break;
- case 'w':
- attr |= SHF_WRITE;
- break;
- case 'x':
- attr |= SHF_EXECINSTR;
- break;
- default:
- {
- char *bad_msg = "Bad .section directive: want a,w,x in string";
-#ifdef md_elf_section_letter
- int md_attr = md_elf_section_letter (*input_line_pointer, &bad_msg);
- if (md_attr)
- attr |= md_attr;
- else
-#endif
- {
- as_warn (bad_msg);
- ignore_rest_of_line ();
- return;
- }
- }
- }
- ++input_line_pointer;
+ ignore_rest_of_line ();
+ return;
}
-
- /* Skip the closing quote. */
- ++input_line_pointer;
+ attr |= obj_elf_parse_section_letters (beg, strlen (beg));
SKIP_WHITESPACE ();
if (*input_line_pointer == ',')
{
+ char c;
++input_line_pointer;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '@')
+ c = *input_line_pointer;
+ if (c == '"')
{
- ++input_line_pointer;
- if (strncmp (input_line_pointer, "progbits",
- sizeof "progbits" - 1) == 0)
+ beg = demand_copy_C_string (&dummy);
+ if (beg == NULL)
{
- type = SHT_PROGBITS;
- input_line_pointer += sizeof "progbits" - 1;
- }
- else if (strncmp (input_line_pointer, "nobits",
- sizeof "nobits" - 1) == 0)
- {
- type = SHT_NOBITS;
- input_line_pointer += sizeof "nobits" - 1;
- }
- else
- {
-#ifdef md_elf_section_type
- int md_type = md_elf_section_type (&input_line_pointer);
- if (md_type)
- type = md_type;
- else
-#endif
- {
- as_warn ("Unrecognized section type");
- ignore_rest_of_line ();
- }
+ ignore_rest_of_line ();
+ return;
}
+ type = obj_elf_section_type (beg, strlen (beg));
+ }
+ else if (c == '@' || c == '%')
+ {
+ beg = ++input_line_pointer;
+ c = get_symbol_end ();
+ *input_line_pointer = c;
+ type = obj_elf_section_type (beg, input_line_pointer - beg);
}
}
}
@@ -705,46 +897,21 @@ obj_elf_section (xxx)
{
do
{
+ char c;
+
SKIP_WHITESPACE ();
if (*input_line_pointer != '#')
{
- as_warn ("Bad .section directive - character following name is not '#'");
+ as_warn (_("Bad .section directive - character following name is not '#'"));
ignore_rest_of_line ();
return;
}
- ++input_line_pointer;
- if (strncmp (input_line_pointer, "write",
- sizeof "write" - 1) == 0)
- {
- attr |= SHF_WRITE;
- input_line_pointer += sizeof "write" - 1;
- }
- else if (strncmp (input_line_pointer, "alloc",
- sizeof "alloc" - 1) == 0)
- {
- attr |= SHF_ALLOC;
- input_line_pointer += sizeof "alloc" - 1;
- }
- else if (strncmp (input_line_pointer, "execinstr",
- sizeof "execinstr" - 1) == 0)
- {
- attr |= SHF_EXECINSTR;
- input_line_pointer += sizeof "execinstr" - 1;
- }
- else
- {
-#ifdef md_elf_section_word
- int md_attr = md_elf_section_word (&input_line_pointer);
- if (md_attr)
- attr |= md_attr;
- else
-#endif
- {
- as_warn ("Unrecognized section attribute");
- ignore_rest_of_line ();
- return;
- }
- }
+ beg = ++input_line_pointer;
+ c = get_symbol_end ();
+ *input_line_pointer = c;
+
+ attr |= obj_elf_section_word (beg, input_line_pointer - beg);
+
SKIP_WHITESPACE ();
}
while (*input_line_pointer++ == ',');
@@ -752,77 +919,14 @@ obj_elf_section (xxx)
}
}
- /* See if this is one of the special sections. */
- for (i = 0; special_sections[i].name != NULL; i++)
- {
- if (string[1] == special_sections[i].name[1]
- && strcmp (string, 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", string);
-
- if ((attr &~ special_sections[i].attributes) != 0)
- {
- /* 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 (string, ".note") != 0
- || attr != SHF_ALLOC)
- as_warn ("Setting incorrect section attributes for %s",
- string);
- }
- attr |= special_sections[i].attributes;
-
- break;
- }
- }
-
- 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 (special_sections[i].name == NULL)
- {
- if (type == SHT_PROGBITS)
- flags |= SEC_ALLOC | SEC_LOAD;
- else if (type == SHT_NOBITS)
- {
- flags |= SEC_ALLOC;
- flags &=~ SEC_LOAD;
- }
-
-#ifdef md_elf_section_flags
- flags = md_elf_section_flags (flags, attr, type);
-#endif
- }
-
- /* Prevent SEC_HAS_CONTENTS from being inadvertently set. */
- if (type == SHT_NOBITS)
- seg_info (sec)->bss = 1;
-
- bfd_set_section_flags (stdoutput, sec, flags);
-
- /* Add a symbol for this section to the symbol table. */
- secsym = symbol_find (string);
- if (secsym != NULL)
- secsym->bsym = sec->symbol;
- else
- symbol_table_insert (section_symbol (sec));
-
-#ifdef md_elf_section_change_hook
- md_elf_section_change_hook ();
-#endif
-
demand_empty_rest_of_line ();
+
+ obj_elf_change_section (name, type, attr, push);
}
/* Change to the .data section. */
-static void
+void
obj_elf_data (i)
int i;
{
@@ -841,7 +945,7 @@ obj_elf_data (i)
/* Change to the .text section. */
-static void
+void
obj_elf_text (i)
int i;
{
@@ -860,7 +964,7 @@ obj_elf_text (i)
static void
obj_elf_subsection (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
register int temp;
@@ -892,11 +996,41 @@ obj_elf_section_change_hook ()
void
obj_elf_previous (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
+ segT new_section;
+ int new_subsection;
+
if (previous_section == 0)
{
- as_bad (".previous without corresponding .section; ignored");
+ as_bad (_(".previous without corresponding .section; ignored"));
+ return;
+ }
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ new_section = previous_section;
+ new_subsection = previous_subsection;
+ previous_section = now_seg;
+ previous_subsection = now_subseg;
+ subseg_set (new_section, new_subsection);
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
+}
+
+static void
+obj_elf_popsection (xxx)
+ int xxx ATTRIBUTE_UNUSED;
+{
+ struct section_stack *top = section_stack;
+
+ if (top == NULL)
+ {
+ as_bad (_(".popsection without corresponding .pushsection; ignored"));
return;
}
@@ -904,8 +1038,11 @@ obj_elf_previous (ignore)
md_flush_pending_output ();
#endif
- subseg_set (previous_section, previous_subsection);
- previous_section = 0;
+ section_stack = top->next;
+ previous_section = top->prev_seg;
+ previous_subsection = top->prev_subseg;
+ subseg_set (top->seg, top->subseg);
+ free (top);
#ifdef md_elf_section_change_hook
md_elf_section_change_hook ();
@@ -914,7 +1051,7 @@ obj_elf_previous (ignore)
static void
obj_elf_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. */
@@ -922,7 +1059,7 @@ obj_elf_line (ignore)
demand_empty_rest_of_line ();
}
-/* This handle the .symver pseudo-op, which is used to specify a
+/* This handles the .symver pseudo-op, which is used to specify a
symbol version. The syntax is ``.symver NAME,SYMVERNAME''.
SYMVERNAME may contain ELF_VER_CHR ('@') characters. This
pseudo-op causes the assembler to emit a symbol named SYMVERNAME
@@ -930,7 +1067,7 @@ obj_elf_line (ignore)
static void
obj_elf_symver (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -943,9 +1080,9 @@ obj_elf_symver (ignore)
*input_line_pointer = c;
- if (sym->sy_obj.versioned_name != NULL)
+ if (symbol_get_obj (sym)->versioned_name != NULL)
{
- as_bad ("multiple .symver directives for symbol `%s'",
+ as_bad (_("multiple .symver directives for symbol `%s'"),
S_GET_NAME (sym));
ignore_rest_of_line ();
return;
@@ -954,7 +1091,7 @@ obj_elf_symver (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("expected comma after name in .symver");
+ as_bad (_("expected comma after name in .symver"));
ignore_rest_of_line ();
return;
}
@@ -969,23 +1106,136 @@ obj_elf_symver (ignore)
*input_line_pointer++ = c;
}
- sym->sy_obj.versioned_name = xstrdup (name);
+ symbol_get_obj (sym)->versioned_name = xstrdup (name);
+
+ *input_line_pointer = c;
+
+ 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;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* This handles the .vtable_inherit pseudo-op, which is used to indicate
+ to the linker the hierarchy in which a particular table resides. The
+ syntax is ".vtable_inherit CHILDNAME, PARENTNAME". */
+
+static void
+obj_elf_vtable_inherit (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ char *cname, *pname;
+ symbolS *csym, *psym;
+ char c, bad = 0;
+
+ if (*input_line_pointer == '#')
+ ++input_line_pointer;
+
+ cname = input_line_pointer;
+ c = get_symbol_end ();
+ csym = symbol_find (cname);
+
+ /* GCFIXME: should check that we don't have two .vtable_inherits for
+ the same child symbol. Also, we can currently only do this if the
+ child symbol is already exists and is placed in a fragment. */
+
+ if (csym == NULL || symbol_get_frag (csym) == NULL)
+ {
+ as_bad ("expected `%s' to have already been set for .vtable_inherit",
+ cname);
+ bad = 1;
+ }
+
+ *input_line_pointer = c;
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ {
+ as_bad ("expected comma after name in .vtable_inherit");
+ ignore_rest_of_line ();
+ return;
+ }
+
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer == '#')
+ ++input_line_pointer;
+
+ if (input_line_pointer[0] == '0'
+ && (input_line_pointer[1] == '\0'
+ || isspace ((unsigned char) input_line_pointer[1])))
+ {
+ psym = section_symbol (absolute_section);
+ ++input_line_pointer;
+ }
+ else
+ {
+ pname = input_line_pointer;
+ c = get_symbol_end ();
+ psym = symbol_find_or_make (pname);
+ *input_line_pointer = c;
+ }
+
+ demand_empty_rest_of_line ();
+
+ if (bad)
+ return;
+
+ 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);
+}
+/* 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
+obj_elf_vtable_entry (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ char *name;
+ symbolS *sym;
+ offsetT offset;
+ char c;
+
+ if (*input_line_pointer == '#')
+ ++input_line_pointer;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ sym = symbol_find_or_make (name);
*input_line_pointer = c;
- if (strchr (sym->sy_obj.versioned_name, ELF_VER_CHR) == NULL)
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
{
- as_bad ("missing version name in `%s' for symbol `%s'",
- sym->sy_obj.versioned_name, S_GET_NAME (sym));
+ as_bad ("expected comma after name in .vtable_entry");
ignore_rest_of_line ();
return;
}
+ ++input_line_pointer;
+ if (*input_line_pointer == '#')
+ ++input_line_pointer;
+
+ offset = get_absolute_expression ();
+
+ fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0,
+ BFD_RELOC_VTABLE_ENTRY);
+
demand_empty_rest_of_line ();
}
void
-obj_read_begin_hook ()
+elf_obj_read_begin_hook ()
{
#ifdef NEED_ECOFF_DEBUG
if (ECOFF_DEBUGGING)
@@ -994,11 +1244,14 @@ obj_read_begin_hook ()
}
void
-obj_symbol_new_hook (symbolP)
+elf_obj_symbol_new_hook (symbolP)
symbolS *symbolP;
{
- symbolP->sy_obj.size = NULL;
- symbolP->sy_obj.versioned_name = NULL;
+ struct elf_obj_sy *sy_obj;
+
+ sy_obj = symbol_get_obj (symbolP);
+ sy_obj->size = NULL;
+ sy_obj->versioned_name = NULL;
#ifdef NEED_ECOFF_DEBUG
if (ECOFF_DEBUGGING)
@@ -1008,7 +1261,7 @@ obj_symbol_new_hook (symbolP)
void
obj_elf_version (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
unsigned int c;
@@ -1068,14 +1321,14 @@ obj_elf_version (ignore)
}
else
{
- as_bad ("Expected quoted string");
+ as_bad (_("Expected quoted string"));
}
demand_empty_rest_of_line ();
}
static void
obj_elf_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name = input_line_pointer;
char c = get_symbol_end ();
@@ -1089,7 +1342,7 @@ obj_elf_size (ignore)
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad ("expected comma after name `%s' in .size directive", name);
+ as_bad (_("expected comma after name `%s' in .size directive"), name);
*p = c;
ignore_rest_of_line ();
return;
@@ -1098,7 +1351,7 @@ obj_elf_size (ignore)
expression (&exp);
if (exp.X_op == O_absent)
{
- as_bad ("missing expression in .size directive");
+ as_bad (_("missing expression in .size directive"));
exp.X_op = O_constant;
exp.X_add_number = 0;
}
@@ -1109,24 +1362,29 @@ obj_elf_size (ignore)
S_SET_SIZE (sym, exp.X_add_number);
else
{
- sym->sy_obj.size = (expressionS *) xmalloc (sizeof (expressionS));
- *sym->sy_obj.size = exp;
+ symbol_get_obj (sym)->size =
+ (expressionS *) xmalloc (sizeof (expressionS));
+ *symbol_get_obj (sym)->size = exp;
}
demand_empty_rest_of_line ();
}
/* Handle the ELF .type pseudo-op. This sets the type of a symbol.
- There are three syntaxes. The first (used on Solaris) is
+ There are four syntaxes:
+
+ The first (used on Solaris) is
.type SYM,#function
The second (used on UnixWare) is
.type SYM,@function
The third (reportedly to be used on Irix 6.0) is
.type SYM STT_FUNC
+ The fourth (used on NetBSD/Arm and Linux/ARM) is
+ .type SYM,%function
*/
static void
obj_elf_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -1144,7 +1402,9 @@ obj_elf_type (ignore)
++input_line_pointer;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '#' || *input_line_pointer == '@')
+ if ( *input_line_pointer == '#'
+ || *input_line_pointer == '@'
+ || *input_line_pointer == '%')
++input_line_pointer;
typename = input_line_pointer;
@@ -1158,23 +1418,27 @@ obj_elf_type (ignore)
|| strcmp (typename, "STT_OBJECT") == 0)
type = BSF_OBJECT;
else
- as_bad ("ignoring unrecognized symbol type \"%s\"", typename);
+ as_bad (_("ignoring unrecognized symbol type \"%s\""), typename);
*input_line_pointer = c;
- sym->bsym->flags |= type;
+ symbol_get_bfdsym (sym)->flags |= type;
demand_empty_rest_of_line ();
}
static void
obj_elf_ident (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
static segT comment_section;
segT old_section = now_seg;
int old_subsection = now_subseg;
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
if (!comment_section)
{
char *p;
@@ -1229,7 +1493,7 @@ static void
adjust_stab_sections (abfd, sec, xxx)
bfd *abfd;
asection *sec;
- PTR xxx;
+ PTR xxx ATTRIBUTE_UNUSED;
{
char *name;
asection *strsec;
@@ -1271,7 +1535,7 @@ elf_ecoff_set_ext (sym, ext)
symbolS *sym;
struct ecoff_extr *ext;
{
- sym->bsym->udata.p = (PTR) ext;
+ symbol_get_bfdsym (sym)->udata.p = (PTR) ext;
}
/* This function is called by bfd_ecoff_debug_externals. It is
@@ -1295,8 +1559,8 @@ elf_get_extr (sym, ext)
/*ARGSUSED*/
static void
elf_set_index (sym, indx)
- asymbol *sym;
- bfd_size_type indx;
+ asymbol *sym ATTRIBUTE_UNUSED;
+ bfd_size_type indx ATTRIBUTE_UNUSED;
{
}
@@ -1307,35 +1571,39 @@ elf_frob_symbol (symp, puntp)
symbolS *symp;
int *puntp;
{
+ struct elf_obj_sy *sy_obj;
+
#ifdef NEED_ECOFF_DEBUG
if (ECOFF_DEBUGGING)
ecoff_frob_symbol (symp);
#endif
- if (symp->sy_obj.size != NULL)
+ sy_obj = symbol_get_obj (symp);
+
+ if (sy_obj->size != NULL)
{
- switch (symp->sy_obj.size->X_op)
+ switch (sy_obj->size->X_op)
{
case O_subtract:
S_SET_SIZE (symp,
- (S_GET_VALUE (symp->sy_obj.size->X_add_symbol)
- + symp->sy_obj.size->X_add_number
- - S_GET_VALUE (symp->sy_obj.size->X_op_symbol)));
+ (S_GET_VALUE (sy_obj->size->X_add_symbol)
+ + sy_obj->size->X_add_number
+ - S_GET_VALUE (sy_obj->size->X_op_symbol)));
break;
case O_constant:
S_SET_SIZE (symp,
- (S_GET_VALUE (symp->sy_obj.size->X_add_symbol)
- + symp->sy_obj.size->X_add_number));
+ (S_GET_VALUE (sy_obj->size->X_add_symbol)
+ + sy_obj->size->X_add_number));
break;
default:
- as_bad (".size expression too complicated to fix up");
+ as_bad (_(".size expression too complicated to fix up"));
break;
}
- free (symp->sy_obj.size);
- symp->sy_obj.size = NULL;
+ free (sy_obj->size);
+ sy_obj->size = NULL;
}
- if (symp->sy_obj.versioned_name != NULL)
+ if (sy_obj->versioned_name != NULL)
{
/* This symbol was given a new name with the .symver directive.
@@ -1355,15 +1623,15 @@ elf_frob_symbol (symp, puntp)
/* Verify that the name isn't using the @@ syntax--this is
reserved for definitions of the default version to link
against. */
- p = strchr (symp->sy_obj.versioned_name, ELF_VER_CHR);
+ 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'",
- symp->sy_obj.versioned_name);
+ as_bad (_("invalid attempt to declare external version name as default in symbol `%s'"),
+ sy_obj->versioned_name);
*puntp = true;
}
- S_SET_NAME (symp, symp->sy_obj.versioned_name);
+ S_SET_NAME (symp, sy_obj->versioned_name);
}
else
{
@@ -1375,7 +1643,7 @@ elf_frob_symbol (symp, puntp)
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 (symp->sy_obj.versioned_name);
+ symp2 = symbol_find_or_make (sy_obj->versioned_name);
/* Now we act as though we saw symp2 = sym. */
@@ -1383,9 +1651,11 @@ elf_frob_symbol (symp, puntp)
/* 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) - symp->sy_frag->fr_address);
+ S_SET_VALUE (symp2,
+ (S_GET_VALUE (symp)
+ - symbol_get_frag (symp)->fr_address));
- symp2->sy_frag = symp->sy_frag;
+ symbol_set_frag (symp2, symbol_get_frag (symp));
/* This will copy over the size information. */
copy_symbol_attributes (symp2, symp);
@@ -1399,10 +1669,10 @@ elf_frob_symbol (symp, puntp)
}
/* Double check weak symbols. */
- if (symp->bsym->flags & BSF_WEAK)
+ if (S_IS_WEAK (symp))
{
if (S_IS_COMMON (symp))
- as_bad ("Symbol `%s' can not be both weak and common",
+ as_bad (_("Symbol `%s' can not be both weak and common"),
S_GET_NAME (symp));
}
@@ -1415,19 +1685,23 @@ elf_frob_symbol (symp, puntp)
.global directives to mark functions. */
if (S_IS_COMMON (symp))
- symp->bsym->flags |= BSF_OBJECT;
+ symbol_get_bfdsym (symp)->flags |= BSF_OBJECT;
if (strstr (TARGET_OS, "irix") != NULL
- && (! S_IS_DEFINED (symp) && ((symp->bsym->flags & BSF_FUNCTION) == 0)))
- symp->bsym->flags |= BSF_OBJECT;
+ && ! S_IS_DEFINED (symp)
+ && (symbol_get_bfdsym (symp)->flags & BSF_FUNCTION) == 0)
+ symbol_get_bfdsym (symp)->flags |= BSF_OBJECT;
#endif
-#ifdef TC_PPC
- /* Frob the PowerPC, so that the symbol always has object type
- if it is not some other type. VxWorks needs this. */
- if ((symp->bsym->flags & (BSF_FUNCTION | BSF_FILE | BSF_SECTION_SYM)) == 0
+#if 0 /* TC_PPC */
+ /* If TC_PPC is defined, we used to force the type of a symbol to be
+ BSF_OBJECT if it was otherwise unset. This was required by some
+ version of VxWorks. Thomas de Lellis <tdel@windriver.com> says
+ that this is no longer needed, so it is now commented out. */
+ if ((symbol_get_bfdsym (symp)->flags
+ & (BSF_FUNCTION | BSF_FILE | BSF_SECTION_SYM)) == 0
&& S_IS_DEFINED (symp))
- symp->bsym->flags |= BSF_OBJECT;
+ symbol_get_bfdsym (symp)->flags |= BSF_OBJECT;
#endif
}
@@ -1485,7 +1759,7 @@ elf_frob_file_after_relocs ()
debug.external_ext = debug.external_ext_end = NULL;
if (! bfd_ecoff_debug_externals (stdoutput, &debug, debug_swap, true,
elf_get_extr, elf_set_index))
- as_fatal ("Failed to set up debugging information: %s",
+ as_fatal (_("Failed to set up debugging information: %s"),
bfd_errmsg (bfd_get_error ()));
sec = bfd_get_section_by_name (stdoutput, ".mdebug");
@@ -1499,9 +1773,13 @@ elf_frob_file_after_relocs ()
this? */
sec->_raw_size = bfd_ecoff_debug_size (stdoutput, &debug, debug_swap);
- if (! bfd_set_section_contents (stdoutput, sec, (PTR) NULL,
+ /* Pass BUF to bfd_set_section_contents because this will
+ eventually become a call to fwrite, and ISO C prohibits
+ passing a NULL pointer to a stdio function even if the
+ pointer will not be used. */
+ if (! bfd_set_section_contents (stdoutput, sec, (PTR) buf,
(file_ptr) 0, (bfd_size_type) 0))
- as_fatal ("Can't start writing .mdebug section: %s",
+ as_fatal (_("Can't start writing .mdebug section: %s"),
bfd_errmsg (bfd_get_error ()));
know (stdoutput->output_has_begun == true);
@@ -1509,7 +1787,7 @@ elf_frob_file_after_relocs ()
if (! bfd_ecoff_write_debug (stdoutput, &debug, debug_swap,
sec->filepos))
- as_fatal ("Could not write .mdebug section: %s",
+ as_fatal (_("Could not write .mdebug section: %s"),
bfd_errmsg (bfd_get_error ()));
}
#endif /* NEED_ECOFF_DEBUG */
@@ -1530,14 +1808,14 @@ elf_frob_file_after_relocs ()
SCO OpenServer 5 identifies it's ELF modules with a standard ELF
.note section.
- int_32 namesz = 4 ; Name size
- int_32 descsz = 12 ; Descriptive information
- int_32 type = 1 ;
- char name[4] = "SCO" ; Originator name ALWAYS SCO + NULL
+ int_32 namesz = 4 ; Name size
+ int_32 descsz = 12 ; Descriptive information
+ int_32 type = 1 ;
+ char name[4] = "SCO" ; Originator name ALWAYS SCO + NULL
int_32 version = (major ver # << 16) | version of tools ;
int_32 source = (tool_id << 16 ) | 1 ;
int_32 info = 0 ; These are set by the SCO tools, but we
- don't know enough about the source
+ don't know enough about the source
environment to set them. SCO ld currently
ignores them, and recommends we set them
to zero. */
@@ -1569,7 +1847,7 @@ sco_id ()
/* process the version string */
- i_note.namesz = 4;
+ i_note.namesz = 4;
i_note.descsz = 12; /* 12 descriptive bytes */
i_note.type = NT_VERSION; /* Contains a version string */
@@ -1583,7 +1861,7 @@ sco_id ()
md_number_to_chars (p, (valueT) i_note.type, 4);
p = frag_more (4);
- strcpy (p, "SCO");
+ strcpy (p, "SCO");
/* Note: this is the version number of the ELF we're representing */
p = frag_more (4);
@@ -1600,7 +1878,7 @@ sco_id ()
and just set them to zero. */
p = frag_more (4);
md_number_to_chars (p, 0x0000, 4);
-
+
frag_align (2, 0, 0);
/* We probably can't restore the current segment, for there likely
@@ -1615,28 +1893,30 @@ sco_id ()
const struct format_ops elf_format_ops =
{
bfd_target_elf_flavour,
- 0,
- 1,
+ 0, /* dfl_leading_underscore */
+ 1, /* emit_section_symbols */
elf_frob_symbol,
elf_frob_file,
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,
+ 0, /* s_get_desc */
elf_copy_symbol_attributes,
#ifdef NEED_ECOFF_DEBUG
ecoff_generate_asm_lineno,
ecoff_stab,
#else
- 0,
- 0, /* process_stab */
+ 0, /* generate_asm_lineno */
+ 0, /* process_stab */
#endif
elf_sec_sym_ok_for_reloc,
elf_pop_insert,
#ifdef NEED_ECOFF_DEBUG
elf_ecoff_set_ext,
#else
- 0,
+ 0, /* ecoff_set_ext */
#endif
- obj_read_begin_hook,
- obj_symbol_new_hook,
+ elf_obj_read_begin_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 ff65790..722c5fd 100644
--- a/contrib/binutils/gas/config/obj-elf.h
+++ b/contrib/binutils/gas/config/obj-elf.h
@@ -1,5 +1,6 @@
/* ELF object file format.
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -27,39 +28,61 @@
#define OBJ_ELF 1
+#ifndef OUTPUT_FLAVOR
#define OUTPUT_FLAVOR bfd_target_elf_flavour
+#endif
#include <bfd.h>
#define BYTES_IN_WORD 4 /* for now */
#include "bfd/elf-bfd.h"
-/* Additional information we keep for each symbol. */
+#include "targ-cpu.h"
+
+#ifdef TC_ALPHA
+#define ECOFF_DEBUGGING alpha_flag_mdebug
+extern int alpha_flag_mdebug;
+#endif
+
+/* For now, always set ECOFF_DEBUGGING for a MIPS target. */
+#ifdef TC_MIPS
+#ifdef MIPS_STABS_ELF
+#define ECOFF_DEBUGGING 0
+#else
+#define ECOFF_DEBUGGING 1
+#endif /* MIPS_STABS_ELF */
+#endif /* TC_MIPS */
+
+#ifdef OBJ_MAYBE_ECOFF
+#ifndef ECOFF_DEBUGGING
+#define ECOFF_DEBUGGING 1
+#endif
+#endif
-/* FIXME: For some reason, this structure is needed both here and in
- obj-multi.h. */
-#ifndef OBJ_SYMFIELD_TYPE
+/* Additional information we keep for each symbol. */
struct elf_obj_sy
{
+ /* Whether the symbol has been marked as local. */
+ int local;
+
/* Use this to keep track of .size expressions that involve
differences that we can't compute yet. */
expressionS *size;
/* The name specified by the .symver directive. */
char *versioned_name;
-};
+
+#ifdef ECOFF_DEBUGGING
+ /* If we are generating ECOFF debugging information, we need some
+ additional fields for each symbol. */
+ struct efdr *ecoff_file;
+ struct localsym *ecoff_symbol;
+ valueT ecoff_extern_size;
#endif
+};
#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
@@ -71,24 +94,43 @@ extern void elf_begin PARAMS ((void));
/* should be conditional on address size! */
#define elf_symbol(asymbol) ((elf_symbol_type *)(&(asymbol)->the_bfd))
-#define S_GET_SIZE(S) (elf_symbol ((S)->bsym)->internal_elf_sym.st_size)
+#ifndef S_GET_SIZE
+#define S_GET_SIZE(S) \
+ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_size)
+#endif
+#ifndef S_SET_SIZE
#define S_SET_SIZE(S,V) \
- (elf_symbol((S)->bsym)->internal_elf_sym.st_size = (V))
+ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_size = (V))
+#endif
-#define S_GET_ALIGN(S) (elf_symbol ((S)->bsym)->internal_elf_sym.st_value)
+#ifndef S_GET_ALIGN
+#define S_GET_ALIGN(S) \
+ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_value)
+#endif
+#ifndef S_SET_ALIGN
#define S_SET_ALIGN(S,V) \
- (elf_symbol ((S)->bsym)->internal_elf_sym.st_value = (V))
+ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_value = (V))
+#endif
-#define S_GET_OTHER(S) (elf_symbol ((S)->bsym)->internal_elf_sym.st_other)
+int elf_s_get_other PARAMS ((symbolS *));
+#ifndef S_GET_OTHER
+#define S_GET_OTHER(S) (elf_s_get_other (S))
+#endif
+#ifndef S_SET_OTHER
#define S_SET_OTHER(S,V) \
- (elf_symbol ((S)->bsym)->internal_elf_sym.st_other = (V))
+ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_other = (V))
+#endif
extern asection *gdb_section;
+#ifndef obj_frob_file
#define obj_frob_file elf_frob_file
+#endif
extern void elf_frob_file 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));
#define obj_app_file elf_file_symbol
@@ -99,34 +141,53 @@ extern void obj_elf_section_change_hook PARAMS ((void));
extern void obj_elf_section PARAMS ((int));
extern void obj_elf_previous PARAMS ((int));
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));
/* BFD wants to write the udata field, which is a no-no for the
globally defined sections. */
+#ifndef obj_sec_sym_ok_for_reloc
#define obj_sec_sym_ok_for_reloc(SEC) ((SEC)->owner != 0)
+#endif
+
+void elf_obj_read_begin_hook PARAMS ((void));
+#ifndef obj_read_begin_hook
+#define obj_read_begin_hook elf_obj_read_begin_hook
+#endif
+
+void elf_obj_symbol_new_hook PARAMS ((symbolS *));
+#ifndef obj_symbol_new_hook
+#define obj_symbol_new_hook elf_obj_symbol_new_hook
+#endif
/* When setting one symbol equal to another, by default we probably
want them to have the same "size", whatever it means in the current
context. */
+#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES
#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
do \
{ \
- if ((SRC)->sy_obj.size) \
+ struct elf_obj_sy *srcelf = symbol_get_obj (SRC); \
+ struct elf_obj_sy *destelf = symbol_get_obj (DEST); \
+ if (srcelf->size) \
{ \
- if ((DEST)->sy_obj.size == NULL) \
- (DEST)->sy_obj.size = \
+ if (destelf->size == NULL) \
+ destelf->size = \
(expressionS *) xmalloc (sizeof (expressionS)); \
- *(DEST)->sy_obj.size = *(SRC)->sy_obj.size; \
+ *destelf->size = *srcelf->size; \
} \
else \
{ \
- if ((DEST)->sy_obj.size != NULL) \
- free ((DEST)->sy_obj.size); \
- (DEST)->sy_obj.size = NULL; \
+ if (destelf->size != NULL) \
+ free (destelf->size); \
+ destelf->size = NULL; \
} \
S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \
S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \
} \
while (0)
+#endif
/* Stabs go in a separate section. */
#define SEPARATE_STAB_SECTIONS 1
@@ -136,51 +197,39 @@ while (0)
extern void obj_elf_init_stab_section PARAMS ((segT));
#define INIT_STAB_SECTION(seg) obj_elf_init_stab_section (seg)
-/* For now, always set ECOFF_DEBUGGING for an Alpha target. */
-#ifdef TC_ALPHA
-#define ECOFF_DEBUGGING 1
-#endif
-
-/* For now, always set ECOFF_DEBUGGING for a MIPS target. */
-#ifdef TC_MIPS
-#define ECOFF_DEBUGGING 1
-#endif
-
-#if ECOFF_DEBUGGING
-
-/* If we are generating ECOFF debugging information, we need some
- additional fields for each symbol. */
-#undef TARGET_SYMBOL_FIELDS
-#define TARGET_SYMBOL_FIELDS \
- ELF_TARGET_SYMBOL_FIELDS \
- struct efdr *ecoff_file; \
- struct localsym *ecoff_symbol; \
- valueT ecoff_extern_size;
-
+#ifdef ECOFF_DEBUGGING
/* We smuggle stabs in ECOFF rather than using a separate section.
The Irix linker can not handle a separate stabs section. */
-#undef SEPARATE_STAB_SECTIONS
-#undef INIT_STAB_SECTION
-#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
- ecoff_stab ((seg), (what), (string), (type), (other), (desc))
-#define OBJ_GENERATE_ASM_LINENO(filename, lineno) \
- ecoff_generate_asm_lineno ((filename), (lineno))
+#undef SEPARATE_STAB_SECTIONS
+#define SEPARATE_STAB_SECTIONS (!ECOFF_DEBUGGING)
+#undef INIT_STAB_SECTION
+#define INIT_STAB_SECTION(seg) \
+ ((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) \
+ if (ECOFF_DEBUGGING) \
+ ecoff_stab ((seg), (what), (string), (type), (other), (desc))
#endif /* ECOFF_DEBUGGING */
-extern void elf_frob_symbol PARAMS ((struct symbol *, int *));
+extern void elf_frob_symbol PARAMS ((symbolS *, int *));
+#ifndef obj_frob_symbol
#define obj_frob_symbol(symp, punt) elf_frob_symbol (symp, &punt)
+#endif
extern void elf_pop_insert PARAMS ((void));
+#ifndef obj_pop_insert
#define obj_pop_insert() elf_pop_insert()
+#endif
#ifndef OBJ_MAYBE_ELF
#define obj_ecoff_set_ext elf_ecoff_set_ext
#ifdef ANSI_PROTOTYPES
struct ecoff_extr;
#endif
-extern void elf_ecoff_set_ext PARAMS ((struct symbol *, struct ecoff_extr *));
+extern void elf_ecoff_set_ext PARAMS ((symbolS *, struct ecoff_extr *));
#endif
#endif /* _OBJ_ELF_H */
diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c
index 42e4b1f..30a0798 100644
--- a/contrib/binutils/gas/config/obj-ieee.c
+++ b/contrib/binutils/gas/config/obj-ieee.c
@@ -1,5 +1,5 @@
/* obj-format for ieee-695 records.
- Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 1997, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -66,7 +66,7 @@ DEFUN (size_section, (abfd, idx),
{
if (frag->fr_address != size)
{
- printf ("Out of step\n");
+ printf (_("Out of step\n"));
size = frag->fr_address;
}
size += frag->fr_fix;
@@ -457,7 +457,7 @@ obj_ieee_section (ignore)
}
if (i == SEG_UNKNOWN)
{
- as_bad ("too many sections");
+ as_bad (_("too many sections"));
return;
}
@@ -519,7 +519,7 @@ DEFUN_VOID (write_object_file)
if (abfd == 0)
{
- as_perror ("FATAL: Can't create %s", out_file_name);
+ as_perror (_("FATAL: Can't create %s"), out_file_name);
exit (EXIT_FAILURE);
}
bfd_set_format (abfd, bfd_object);
diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h
index fe8d98d..42b7eb3 100644
--- a/contrib/binutils/gas/config/obj-multi.h
+++ b/contrib/binutils/gas/config/obj-multi.h
@@ -1,50 +1,104 @@
-/* hi */
+/* Multiple object format emulation.
+ Copyright (C) 1995, 96, 97, 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
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef _OBJ_MULTI_H
+#define _OBJ_MULTI_H
+
+#ifdef OBJ_HEADER
+#include OBJ_HEADER
+#else
#include "emul.h"
#include "targ-cpu.h"
-#define OUTPUT_FLAVOR (this_format->flavor)
-#define obj_frob_symbol(S,P) (this_format->frob_symbol)(S,&(P))
-#define obj_frob_file (this_format->frob_file)
-#define obj_frob_file_after_relocs (this_format->frob_file_after_relocs)
-#define obj_ecoff_set_ext (this_format->ecoff_set_ext)
-#define obj_pop_insert (this_format->pop_insert)
-#define obj_read_begin_hook() (this_format->read_begin_hook?this_format->read_begin_hook():(void)0)
-#define obj_symbol_new_hook (this_format->symbol_new_hook)
-#define obj_sec_sym_ok_for_reloc (this_format->sec_sym_ok_for_reloc)
-#define S_GET_SIZE (this_format->s_get_size)
-#define S_SET_SIZE (this_format->s_set_size)
-#define S_GET_ALIGN (this_format->s_get_align)
-#define S_SET_ALIGN (this_format->s_set_align)
-#define OBJ_COPY_SYMBOL_ATTRIBUTES (this_format->copy_symbol_attributes)
-#define OBJ_PROCESS_STAB (this_format->process_stab)
-
-#if defined (OBJ_MAYBE_ECOFF) || (defined (OBJ_MAYBE_ELF) && defined (TC_MIPS))
-#define ECOFF_DEBUGGING 1
-#endif
+#define OUTPUT_FLAVOR \
+ (this_format->flavor)
-/* FIXME: What's the story here? Why do we have to define
- OBJ_SYMFIELD_TYPE both here and in obj-elf.h? */
-#ifdef OBJ_MAYBE_ELF
-struct elf_obj_sy
-{
- expressionS *size;
- char *versioned_name;
-};
-#define OBJ_SYMFIELD_TYPE struct elf_obj_sy
-#define ELF_TARGET_SYMBOL_FIELDS int local:1;
-#else
-#define ELF_TARGET_SYMBOL_FIELDS
-#endif
+#define obj_frob_symbol(S,P) \
+ (*this_format->frob_symbol) (S, &(P))
-#ifdef ECOFF_DEBUGGING
-struct efdr;
-struct localsym;
-#define ECOFF_DEBUG_TARGET_SYMBOL_FIELDS struct efdr *ecoff_file; struct localsym *ecoff_symbol; valueT ecoff_extern_size;
-#else
-#define ECOFF_DEBUG_TARGET_SYMBOL_FIELDS
+#define obj_frob_file() \
+ (this_format->frob_file \
+ ? (*this_format->frob_file) () \
+ : (void) 0)
+
+#define obj_frob_file_after_relocs() \
+ (this_format->frob_file_after_relocs \
+ ? (*this_format->frob_file_after_relocs) () \
+ : (void) 0)
+
+#define obj_ecoff_set_ext \
+ (*this_format->ecoff_set_ext)
+
+#define obj_pop_insert \
+ (*this_format->pop_insert)
+
+#define obj_read_begin_hook() \
+ (this_format->read_begin_hook \
+ ? (*this_format->read_begin_hook) () \
+ : (void) 0)
+
+#define obj_symbol_new_hook(S) \
+ (this_format->symbol_new_hook \
+ ? (*this_format->symbol_new_hook) (S) \
+ : (void) 0)
+
+#define obj_sec_sym_ok_for_reloc(A) \
+ (this_format->sec_sym_ok_for_reloc \
+ ? (*this_format->sec_sym_ok_for_reloc) (A) \
+ : 0)
+
+#define S_GET_SIZE \
+ (*this_format->s_get_size)
+
+#define S_SET_SIZE \
+ (*this_format->s_set_size)
+
+#define S_GET_ALIGN \
+ (*this_format->s_get_align)
+
+#define S_SET_ALIGN \
+ (*this_format->s_set_align)
+
+#define S_GET_OTHER \
+ (*this_format->s_get_other)
+
+#define S_GET_DESC \
+ (*this_format->s_get_desc)
+
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \
+ (this_format->copy_symbol_attributes \
+ ? (*this_format->copy_symbol_attributes) (d, s) \
+ : (void) 0)
+
+#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) \
+ (this_format->process_stab \
+ ? (*this_format->process_stab) (SEG,W,S,T,O,D) \
+ : (void) 0)
+
+#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
-#define TARGET_SYMBOL_FIELDS \
- ELF_TARGET_SYMBOL_FIELDS \
- ECOFF_DEBUG_TARGET_SYMBOL_FIELDS
+#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 4c4da6c..61dba4b 100644
--- a/contrib/binutils/gas/config/tc-alpha.c
+++ b/contrib/binutils/gas/config/tc-alpha.c
@@ -1,10 +1,10 @@
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
- Copyright (C) 1989, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 93-98, 1999 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.
Modified by Richard Henderson for ELF support.
- Modified by Klaus K"ampf for EVAX (openVMS/Alpha) support.
+ Modified by Klaus K"ampf for EVAX (OpenVMS/Alpha) support.
This file is part of GAS, the GNU Assembler.
@@ -51,6 +51,8 @@
#include "as.h"
#include "subsegs.h"
+#include "struc-symbol.h"
+#include "ecoff.h"
#include "opcode/alpha.h"
@@ -63,6 +65,9 @@
/* Local types */
+#define TOKENIZE_ERROR -1
+#define TOKENIZE_ERROR_REPORT -2
+
#define MAX_INSN_FIXUPS 2
#define MAX_INSN_ARGS 5
@@ -77,11 +82,22 @@ struct alpha_insn
unsigned insn;
int nfixups;
struct alpha_fixup fixups[MAX_INSN_FIXUPS];
+ unsigned sequence[MAX_INSN_FIXUPS];
};
enum alpha_macro_arg
{
- MACRO_EOA = 1, MACRO_IR, MACRO_PIR, MACRO_CPIR, MACRO_FPR, MACRO_EXP
+ MACRO_EOA = 1,
+ MACRO_IR,
+ MACRO_PIR,
+ MACRO_OPIR,
+ MACRO_CPIR,
+ MACRO_FPR,
+ MACRO_EXP,
+ MACRO_LITERAL,
+ MACRO_BASE,
+ MACRO_BYTOFF,
+ MACRO_JSR
};
struct alpha_macro
@@ -92,11 +108,25 @@ struct alpha_macro
enum alpha_macro_arg argsets[16];
};
-/* Two extra symbols we want to see in our input. This is a blatent
- misuse of the expressionS.X_op field. */
+/* Extra expression types. */
+
+#define O_pregister O_md1 /* O_register, in parentheses */
+#define O_cpregister O_md2 /* + a leading comma */
+
+#ifdef RELOC_OP_P
+/* Note, the alpha_reloc_op table below depends on the ordering
+ of O_literal .. O_gprelow. */
+#define O_literal O_md3 /* !literal relocation */
+#define O_lituse_base O_md4 /* !lituse_base relocation */
+#define O_lituse_bytoff O_md5 /* !lituse_bytoff relocation */
+#define O_lituse_jsr O_md6 /* !lituse_jsr relocation */
+#define O_gpdisp O_md7 /* !gpdisp relocation */
+#define O_gprelhigh O_md8 /* !gprelhigh relocation */
+#define O_gprellow O_md9 /* !gprellow relocation */
+
+#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprellow)
+#endif
-#define O_pregister (O_max+1) /* O_register, but in parentheses */
-#define O_cpregister (O_pregister+1) /* + a leading comma */
/* Macros for extracting the type and number of encoded register tokens */
@@ -180,7 +210,8 @@ static void assemble_tokens
PARAMS ((const char *, const expressionS *, int, int));
static int load_expression
- PARAMS ((int, const expressionS *, int *, expressionS *));
+ PARAMS ((int, const expressionS *, int *, expressionS *,
+ const expressionS *));
static void emit_ldgp PARAMS ((const expressionS *, int, const PTR));
static void emit_division PARAMS ((const expressionS *, int, const PTR));
@@ -203,8 +234,6 @@ static void s_alpha_text PARAMS ((int));
static void s_alpha_data PARAMS ((int));
#ifndef OBJ_ELF
static void s_alpha_comm PARAMS ((int));
-#endif
-#if defined (OBJ_ECOFF) || defined (OBJ_EVAX)
static void s_alpha_rdata PARAMS ((int));
#endif
#ifdef OBJ_ECOFF
@@ -212,6 +241,12 @@ static void s_alpha_sdata PARAMS ((int));
#endif
#ifdef OBJ_ELF
static void s_alpha_section PARAMS ((int));
+static void s_alpha_ent PARAMS ((int));
+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_coff_wrapper PARAMS ((int));
#endif
#ifdef OBJ_EVAX
static void s_alpha_section PARAMS ((int));
@@ -231,15 +266,14 @@ static void select_gp_value PARAMS ((void));
#endif
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. */
-/* These are exported to relaxing code, even though we don't do any
- relaxing on this processor currently. */
-int md_short_jump_size = 4;
-int md_long_jump_size = 4;
-
/* Characters which always start a comment. */
const char comment_chars[] = "#";
@@ -274,6 +308,12 @@ struct option md_longopts[] = {
{ "32addr", no_argument, NULL, OPTION_32ADDR },
#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)
+ { "mdebug", no_argument, NULL, OPTION_MDEBUG },
+ { "no-mdebug", no_argument, NULL, OPTION_NO_MDEBUG },
+#endif
{ NULL, no_argument, NULL, 0 }
};
@@ -354,6 +394,11 @@ static offsetT alpha_lit4_literal;
static offsetT alpha_lit8_literal;
#endif
+/* The active .ent symbol. */
+#ifdef OBJ_ELF
+static symbolS *alpha_cur_ent_sym;
+#endif
+
/* Is the assembler not allowed to use $at? */
static int alpha_noat_on = 0;
@@ -386,6 +431,11 @@ unsigned long alpha_gprmask, alpha_fprmask;
/* Whether the debugging option was seen. */
static int alpha_debug;
+#ifdef OBJ_ELF
+/* Whether we are emitting an mdebug section. */
+int alpha_flag_mdebug = 1;
+#endif
+
/* Don't fully resolve relocations, allowing code movement in the linker. */
static int alpha_flag_relax;
@@ -417,6 +467,110 @@ static int alpha_flag_show_after_trunc = 0; /* -H */
#endif
+#ifdef RELOC_OP_P
+/* A table to map the spelling of a relocation operand into an appropriate
+ bfd_reloc_code_real_type type. The table is assumed to be ordered such
+ that op-O_literal indexes into it. */
+
+#define ALPHA_RELOC_TABLE(op) \
+&alpha_reloc_op[ ((!USER_RELOC_P (op)) \
+ ? (abort (), 0) \
+ : (int)(op) - (int)O_literal) ]
+
+#define LITUSE_BASE 1
+#define LITUSE_BYTOFF 2
+#define LITUSE_JSR 3
+
+static const struct alpha_reloc_op_tag {
+ const char *name; /* string to lookup */
+ size_t length; /* size of the string */
+ bfd_reloc_code_real_type reloc; /* relocation before frob */
+ operatorT op; /* which operator to use */
+ int lituse; /* addened to specify lituse */
+} alpha_reloc_op[] = {
+
+ {
+ "literal", /* name */
+ sizeof ("literal")-1, /* length */
+ BFD_RELOC_ALPHA_USER_LITERAL, /* reloc */
+ O_literal, /* op */
+ 0, /* lituse */
+ },
+
+ {
+ "lituse_base", /* name */
+ sizeof ("lituse_base")-1, /* length */
+ BFD_RELOC_ALPHA_USER_LITUSE_BASE, /* reloc */
+ O_lituse_base, /* op */
+ LITUSE_BASE, /* lituse */
+ },
+
+ {
+ "lituse_bytoff", /* name */
+ sizeof ("lituse_bytoff")-1, /* length */
+ BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF, /* reloc */
+ O_lituse_bytoff, /* op */
+ LITUSE_BYTOFF, /* lituse */
+ },
+
+ {
+ "lituse_jsr", /* name */
+ sizeof ("lituse_jsr")-1, /* length */
+ BFD_RELOC_ALPHA_USER_LITUSE_JSR, /* reloc */
+ O_lituse_jsr, /* op */
+ LITUSE_JSR, /* lituse */
+ },
+
+ {
+ "gpdisp", /* name */
+ sizeof ("gpdisp")-1, /* length */
+ BFD_RELOC_ALPHA_USER_GPDISP, /* reloc */
+ O_gpdisp, /* op */
+ 0, /* lituse */
+ },
+
+ {
+ "gprelhigh", /* name */
+ sizeof ("gprelhigh")-1, /* length */
+ BFD_RELOC_ALPHA_USER_GPRELHIGH, /* reloc */
+ O_gprelhigh, /* op */
+ 0, /* lituse */
+ },
+
+ {
+ "gprellow", /* name */
+ sizeof ("gprellow")-1, /* length */
+ BFD_RELOC_ALPHA_USER_GPRELLOW, /* reloc */
+ O_gprellow, /* op */
+ 0, /* lituse */
+ },
+};
+
+static const int alpha_num_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))
+
+/* Structure to hold explict sequence information. */
+struct alpha_literal_tag
+{
+ fixS *lituse; /* head of linked list of !literals */
+ segT segment; /* segment relocs are in or undefined_section*/
+ int multi_section_p; /* True if more than one section was used */
+ unsigned sequence; /* sequence # */
+ unsigned n_literals; /* # of literals */
+ unsigned n_lituses; /* # of lituses */
+ char string[1]; /* printable form of sequence to hash with */
+};
+
+/* Hash table to link up literals with the appropriate lituse */
+static struct hash_control *alpha_literal_hash;
+#endif
+
/* A table of CPU names and opcode sets. */
static const struct cpu_type
@@ -435,14 +589,11 @@ static const struct cpu_type
{ "21066", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
{ "21068", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
{ "21164", AXP_OPCODE_BASE|AXP_OPCODE_EV5 },
- /* Do we have CIX extension here? */
{ "21164a", AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX },
- /* Still same PALcodes? */
{ "21164pc", (AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX
|AXP_OPCODE_MAX) },
- /* All new PALcodes? Extras? */
- { "21264", (AXP_OPCODE_BASE|AXP_OPCODE_BWX
- |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
+ { "21264", (AXP_OPCODE_BASE|AXP_OPCODE_EV6|AXP_OPCODE_BWX
+ |AXP_OPCODE_MAX|AXP_OPCODE_CIX) },
{ "ev4", AXP_OPCODE_BASE },
{ "ev45", AXP_OPCODE_BASE },
@@ -450,10 +601,10 @@ static const struct cpu_type
{ "ev5", AXP_OPCODE_BASE },
{ "ev56", AXP_OPCODE_BASE|AXP_OPCODE_BWX },
{ "pca56", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX },
- { "ev6", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_CIX|AXP_OPCODE_MAX },
+ { "ev6", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX|AXP_OPCODE_CIX },
{ "all", AXP_OPCODE_BASE },
- { 0 }
+ { 0, 0 }
};
/* The macro table */
@@ -461,67 +612,48 @@ static const struct cpu_type
static const struct alpha_macro alpha_macros[] = {
/* Load/Store macros */
{ "lda", emit_lda, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_LITERAL, MACRO_BASE, MACRO_EOA } },
{ "ldah", emit_ldah, NULL,
{ MACRO_IR, MACRO_EXP, MACRO_EOA } },
{ "ldl", emit_ir_load, "ldl",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldl_l", emit_ir_load, "ldl_l",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldq", emit_ir_load, "ldq",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_LITERAL, MACRO_EOA } },
{ "ldq_l", emit_ir_load, "ldq_l",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldq_u", emit_ir_load, "ldq_u",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldf", emit_loadstore, "ldf",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldg", emit_loadstore, "ldg",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "lds", emit_loadstore, "lds",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldt", emit_loadstore, "ldt",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldb", emit_ldX, (PTR)0,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldbu", emit_ldXu, (PTR)0,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldw", emit_ldX, (PTR)1,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldwu", emit_ldXu, (PTR)1,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "uldw", emit_uldX, (PTR)1,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "uldwu", emit_uldXu, (PTR)1,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "uldl", emit_uldX, (PTR)2,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "uldlu", emit_uldXu, (PTR)2,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "uldq", emit_uldXu, (PTR)3,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ldgp", emit_ldgp, NULL,
{ MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA } },
@@ -546,48 +678,34 @@ static const struct alpha_macro alpha_macros[] = {
#endif
{ "stl", emit_loadstore, "stl",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stl_c", emit_loadstore, "stl_c",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stq", emit_loadstore, "stq",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stq_c", emit_loadstore, "stq_c",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stq_u", emit_loadstore, "stq_u",
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stf", emit_loadstore, "stf",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stg", emit_loadstore, "stg",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "sts", emit_loadstore, "sts",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stt", emit_loadstore, "stt",
- { MACRO_FPR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_FPR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stb", emit_stX, (PTR)0,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "stw", emit_stX, (PTR)1,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ustw", emit_ustX, (PTR)1,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ustl", emit_ustX, (PTR)2,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
{ "ustq", emit_ustX, (PTR)3,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
/* Arithmetic macros */
#if 0
@@ -650,15 +768,15 @@ static const struct alpha_macro alpha_macros[] = {
MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
{ "jsr", emit_jsrjmp, "jsr",
- { MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_EXP, MACRO_EOA } },
+ { MACRO_PIR, MACRO_EXP, MACRO_JSR, MACRO_EOA,
+ MACRO_PIR, MACRO_JSR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_JSR, MACRO_EOA,
+ MACRO_EXP, MACRO_JSR, MACRO_EOA } },
{ "jmp", emit_jsrjmp, "jmp",
- { MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_EXP, MACRO_EOA } },
+ { MACRO_PIR, MACRO_EXP, MACRO_JSR, MACRO_EOA,
+ MACRO_PIR, MACRO_JSR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_JSR, MACRO_EOA,
+ MACRO_EXP, MACRO_JSR, MACRO_EOA } },
{ "ret", emit_retjcr, "ret",
{ MACRO_IR, MACRO_EXP, MACRO_EOA,
MACRO_IR, MACRO_EOA,
@@ -682,7 +800,7 @@ static const struct alpha_macro alpha_macros[] = {
MACRO_EOA } },
};
-static const int alpha_num_macros
+static const unsigned int alpha_num_macros
= sizeof(alpha_macros) / sizeof(*alpha_macros);
/* Public interface functions */
@@ -696,6 +814,13 @@ md_begin ()
{
unsigned int i;
+ /* Verify that X_op field is wide enough. */
+ {
+ expressionS e;
+ e.X_op = O_max;
+ assert (e.X_op == O_max);
+ }
+
/* Create the opcode hash table */
alpha_opcode_hash = hash_new ();
@@ -706,7 +831,7 @@ md_begin ()
name = alpha_opcodes[i].name;
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);
+ as_fatal (_("internal error: can't hash opcode `%s': %s"), name, retval);
/* Some opcodes include modifiers of various sorts with a "/mod"
syntax, like the architecture manual suggests. However, for
@@ -740,7 +865,7 @@ md_begin ()
name = alpha_macros[i].name;
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
@@ -786,24 +911,18 @@ md_begin ()
#ifdef OBJ_ELF
if (ECOFF_DEBUGGING)
{
- segT sec;
-
- sec = subseg_new(".mdebug", (subsegT)0);
+ 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);
-
-#ifdef ERIC_neverdef
- sec = subseg_new(".reginfo", (subsegT)0);
- /* The ABI says this section should be loaded so that the running
- program can access it. */
- bfd_set_section_flags(stdoutput, sec,
- SEC_ALLOC|SEC_LOAD|SEC_READONLY|SEC_DATA);
- bfd_set_section_alignement(stdoutput, sec, 3);
-#endif
}
#endif /* OBJ_ELF */
subseg_set(text_section, 0);
+
+#ifdef RELOC_OP_P
+ /* Create literal lookup hash table. */
+ alpha_literal_hash = hash_new();
+#endif
}
/* The public interface to the instruction assembler. */
@@ -814,10 +933,11 @@ md_assemble (str)
{
char opname[32]; /* current maximum is 13 */
expressionS tok[MAX_INSN_ARGS];
- int ntok, opnamelen, trunclen;
+ int ntok, trunclen;
+ size_t opnamelen;
/* split off the opcode */
- opnamelen = strspn (str, "abcdefghijklmnopqrstuvwxyz_/48");
+ opnamelen = strspn (str, "abcdefghijklmnopqrstuvwxyz_/46819");
trunclen = (opnamelen < sizeof (opname) - 1
? opnamelen
: sizeof (opname) - 1);
@@ -827,7 +947,9 @@ md_assemble (str)
/* tokenize the rest of the line */
if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0)
{
- as_bad ("syntax error");
+ if (ntok != TOKENIZE_ERROR_REPORT)
+ as_bad (_("syntax error"));
+
return;
}
@@ -900,7 +1022,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -950,7 +1072,7 @@ md_parse_option (c, arg)
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;
@@ -972,6 +1094,15 @@ md_parse_option (c, arg)
alpha_flag_relax = 1;
break;
+#ifdef OBJ_ELF
+ case OPTION_MDEBUG:
+ alpha_flag_mdebug = 1;
+ break;
+ case OPTION_NO_MDEBUG:
+ alpha_flag_mdebug = 0;
+ break;
+#endif
+
default:
return 0;
}
@@ -985,19 +1116,20 @@ 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\
--m21064 | -m21066 | -m21164 | -m21164a\n\
--mev4 | -mev45 | -mev5 | -mev56 | -mall\n\
- specify variant of Alpha architecture\n",
+-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mall\n\
+ specify variant of Alpha architecture\n\
+-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264\n\
+ these variants include PALcode opcodes\n"),
stream);
#ifdef OBJ_EVAX
- fputs ("\
+ fputs (_("\
VMS options:\n\
-+ hash encode (don't truncate) names longer than 64 characters\n\
--H show new symbol after hash truncation\n",
+-H show new symbol after hash truncation\n"),
stream);
#endif
}
@@ -1069,7 +1201,7 @@ md_apply_fix (fixP, valueP)
#endif
do_reloc_gp:
- fixP->fx_addsy = section_symbol (absolute_section);
+ fixP->fx_addsy = section_symbol (now_seg);
md_number_to_chars (fixpos, value, 2);
break;
@@ -1145,15 +1277,28 @@ md_apply_fix (fixP, valueP)
return 1;
#endif
+#ifdef RELOC_OP_P
+ 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:
+ return 1;
+
+ case BFD_RELOC_ALPHA_USER_GPDISP:
+ case BFD_RELOC_ALPHA_USER_GPRELHIGH:
+ case BFD_RELOC_ALPHA_USER_GPRELLOW:
+ abort ();
+#endif
+
default:
{
const struct alpha_operand *operand;
if ((int)fixP->fx_r_type >= 0)
- as_fatal ("unhandled relocation type %s",
+ as_fatal (_("unhandled relocation type %s"),
bfd_get_reloc_code_name (fixP->fx_r_type));
- assert (-(int)fixP->fx_r_type < alpha_num_operands);
+ 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
@@ -1161,9 +1306,9 @@ md_apply_fix (fixP, valueP)
Therefore they must be completely resolved as constants. */
if (fixP->fx_addsy != 0
- && fixP->fx_addsy->bsym->section != absolute_section)
+ && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "non-absolute expression in constant field");
+ _("non-absolute expression in constant field"));
image = bfd_getl32(fixpos);
image = insert_operand(image, operand, (offsetT)value,
@@ -1177,7 +1322,7 @@ md_apply_fix (fixP, valueP)
else
{
as_warn_where(fixP->fx_file, fixP->fx_line,
- "type %d reloc done?\n", (int)fixP->fx_r_type);
+ _("type %d reloc done?\n"), (int)fixP->fx_r_type);
goto done;
}
@@ -1228,14 +1373,14 @@ md_undefined_symbol(name)
break;
if (!alpha_noat_on && num == 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;
@@ -1305,6 +1450,15 @@ alpha_force_relocation (f)
case BFD_RELOC_ALPHA_LINKAGE:
case BFD_RELOC_ALPHA_CODEADDR:
#endif
+#ifdef RELOC_OP_P
+ 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:
+#endif
return 1;
case BFD_RELOC_23_PCREL_S2:
@@ -1314,7 +1468,7 @@ alpha_force_relocation (f)
return 0;
default:
- assert((int)f->fx_r_type < 0 && -(int)f->fx_r_type < alpha_num_operands);
+ assert((int)f->fx_r_type < 0 && -(int)f->fx_r_type < (int)alpha_num_operands);
return 0;
}
}
@@ -1327,7 +1481,7 @@ alpha_fix_adjustable (f)
{
#ifdef OBJ_ELF
/* Prevent all adjustments to global symbols */
- if (S_IS_EXTERN (f->fx_addsy))
+ if (S_IS_EXTERN (f->fx_addsy) || S_IS_WEAK (f->fx_addsy))
return 0;
#endif
@@ -1346,6 +1500,9 @@ alpha_fix_adjustable (f)
#ifdef OBJ_ELF
case BFD_RELOC_ALPHA_ELF_LITERAL:
#endif
+#ifdef RELOC_OP_P
+ case BFD_RELOC_ALPHA_USER_LITERAL:
+#endif
#ifdef OBJ_EVAX
case BFD_RELOC_ALPHA_LINKAGE:
case BFD_RELOC_ALPHA_CODEADDR:
@@ -1353,6 +1510,14 @@ alpha_fix_adjustable (f)
return 1;
case BFD_RELOC_ALPHA_LITUSE:
+#ifdef RELOC_OP_P
+ 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:
+#endif
return 0;
case BFD_RELOC_GPREL32:
@@ -1364,7 +1529,7 @@ alpha_fix_adjustable (f)
default:
assert ((int)f->fx_r_type < 0
- && - (int)f->fx_r_type < alpha_num_operands);
+ && - (int)f->fx_r_type < (int)alpha_num_operands);
return 1;
}
/*NOTREACHED*/
@@ -1375,13 +1540,14 @@ alpha_fix_adjustable (f)
arelent *
tc_gen_reloc (sec, fixp)
- asection *sec;
+ asection *sec ATTRIBUTE_UNUSED;
fixS *fixp;
{
arelent *reloc;
reloc = (arelent *) xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
+ 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;
/* Make sure none of our internal relocations make it this far.
@@ -1392,14 +1558,14 @@ tc_gen_reloc (sec, fixp)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "cannot represent `%s' relocation in object file",
+ _("cannot represent `%s' relocation in object file"),
bfd_get_reloc_code_name (fixp->fx_r_type));
return NULL;
}
if (!fixp->fx_pcrel != !reloc->howto->pc_relative)
{
- as_fatal ("internal error? cannot generate `%s' relocation",
+ as_fatal (_("internal error? cannot generate `%s' relocation"),
bfd_get_reloc_code_name (fixp->fx_r_type));
}
assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
@@ -1421,8 +1587,9 @@ tc_gen_reloc (sec, fixp)
* at assembly time. bfd_perform_reloc doesn't know about this sort
* of thing, and as a result we need to fake it out here.
*/
- if (S_IS_EXTERN (fixp->fx_addsy) && !S_IS_COMMON(fixp->fx_addsy))
- reloc->addend -= fixp->fx_addsy->bsym->value;
+ if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
+ && !S_IS_COMMON(fixp->fx_addsy))
+ reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value;
#endif
}
@@ -1437,7 +1604,7 @@ tc_gen_reloc (sec, fixp)
int
tc_get_register (frame)
- int frame;
+ int frame ATTRIBUTE_UNUSED;
{
int framereg = AXP_REG_SP;
@@ -1452,7 +1619,7 @@ tc_get_register (frame)
if (sym && (framereg = S_GET_VALUE (sym)) <= 31)
goto found;
}
- as_warn ("frame reg expected, using $%d.", framereg);
+ as_warn (_("frame reg expected, using $%d."), framereg);
found:
note_gpreg (framereg);
@@ -1478,6 +1645,250 @@ alpha_frob_file_before_adjust ()
#endif /* OBJ_ECOFF */
+#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.
+ */
+
+void
+alpha_adjust_symtab ()
+{
+ if (alpha_literal_hash)
+ {
+#ifdef DEBUG2_ALPHA
+ 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);
+ }
+}
+
+
+/* Inner function to move LITUSE's next to the LITERAL. */
+
+static void
+alpha_adjust_symtab_relocs (abfd, sec, ptr)
+ bfd *abfd;
+ asection *sec;
+ PTR ptr;
+{
+ segment_info_type *seginfo = seg_info (sec);
+ fixS **prevP;
+ fixS *fixp;
+ fixS *next;
+ fixS *lituse;
+ int n_lituses = 0;
+
+#ifdef DEBUG2_ALPHA
+ int n = 0;
+ int n_literals = 0;
+ 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 == NULL)
+ return;
+
+ /* If there are no relocations, skip the section. */
+ if (! seginfo->fix_root)
+ return;
+
+ /* First rebuild the fixup chain without the expicit lituse's. */
+ prevP = &(seginfo->fix_root);
+ for (fixp = seginfo->fix_root; fixp; fixp = next)
+ {
+ next = fixp->fx_next;
+ fixp->fx_next = (fixS *)0;
+#ifdef DEBUG2_ALPHA
+ n++;
+#endif
+
+ switch (fixp->fx_r_type)
+ {
+ default:
+ *prevP = fixp;
+ prevP = &(fixp->fx_next);
+#ifdef DEBUG2_ALPHA
+ fprintf (stderr,
+ "alpha_adjust_symtab_relocs: 0x%lx, other relocation %s\n",
+ (long)fixp,
+ bfd_get_reloc_code_name (fixp->fx_r_type));
+#endif
+ break;
+
+ case BFD_RELOC_ALPHA_USER_LITERAL:
+ *prevP = fixp;
+ prevP = &(fixp->fx_next);
+ /* prevent assembler from trying to adjust the offset */
+#ifdef DEBUG2_ALPHA
+ n_literals++;
+ if (fixp->tc_fix_data.info->n_literals != 1)
+ n_dup_literals++;
+ fprintf (stderr,
+ "alpha_adjust_symtab_relocs: 0x%lx, !literal!%.6d, # literals = %2d\n",
+ (long)fixp,
+ fixp->tc_fix_data.info->sequence,
+ fixp->tc_fix_data.info->n_literals);
+#endif
+ break;
+
+ /* do not link in lituse's */
+ case BFD_RELOC_ALPHA_USER_LITUSE_BASE:
+ case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF:
+ case BFD_RELOC_ALPHA_USER_LITUSE_JSR:
+ n_lituses++;
+ if (fixp->tc_fix_data.info->n_literals == 0)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("No !literal!%d was found"),
+ fixp->tc_fix_data.info->sequence);
+#ifdef DEBUG2_ALPHA
+ fprintf (stderr,
+ "alpha_adjust_symtab_relocs: 0x%lx, !lituse !%.6d, # lituses = %2d, next_lituse = 0x%lx\n",
+ (long)fixp,
+ fixp->tc_fix_data.info->sequence,
+ fixp->tc_fix_data.info->n_lituses,
+ (long)fixp->tc_fix_data.next_lituse);
+#endif
+ break;
+ }
+ }
+
+ /* If there were any lituses, go and add them to the chain, unless there is
+ more than one !literal for a given sequence number. They are linked
+ through the next_lituse field in reverse order, so as we go through the
+ next_lituse chain, we effectively reverse the chain once again. If there
+ was more than one !literal, we fall back to loading up the address w/o
+ optimization. Also, if the !literals/!lituses are spread in different
+ segments (happens in the Linux kernel semaphores), suppress the
+ optimization. */
+ if (n_lituses)
+ {
+ for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
+ {
+ switch (fixp->fx_r_type)
+ {
+ default:
+ break;
+
+ case BFD_RELOC_ALPHA_USER_LITERAL:
+#ifdef OBJ_ELF
+ fixp->fx_r_type = BFD_RELOC_ALPHA_ELF_LITERAL;
+#else
+ fixp->fx_r_type = BFD_RELOC_ALPHA_LITERAL; /* XXX check this */
+#endif
+ if (fixp->tc_fix_data.info->n_literals == 1
+ && ! fixp->tc_fix_data.info->multi_section_p)
+ {
+ for (lituse = fixp->tc_fix_data.info->lituse;
+ lituse != (fixS *)0;
+ lituse = lituse->tc_fix_data.next_lituse)
+ {
+ lituse->fx_next = fixp->fx_next;
+ fixp->fx_next = lituse;
+ }
+ }
+ break;
+
+ case BFD_RELOC_ALPHA_USER_LITUSE_BASE:
+ case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF:
+ case BFD_RELOC_ALPHA_USER_LITUSE_JSR:
+ fixp->fx_r_type = BFD_RELOC_ALPHA_LITUSE;
+ break;
+ }
+ }
+ }
+
+#ifdef DEBUG2_ALPHA
+ fprintf (stderr, "alpha_adjust_symtab_relocs: %s, %d literal%s, %d duplicate literal%s, %d lituse%s\n\n",
+ sec->name,
+ n_literals, (n_literals == 1) ? "" : "s",
+ n_dup_literals, (n_dup_literals == 1) ? "" : "s",
+ n_lituses, (n_lituses == 1) ? "" : "s");
+#endif
+}
+
+#endif /* RELOC_OP_P */
+
+
+#ifdef DEBUG_ALPHA
+static void
+debug_exp (tok, ntok)
+ expressionS tok[];
+ int ntok;
+{
+ int i;
+
+ fprintf (stderr, "debug_exp: %d tokens", ntok);
+ for (i = 0; i < ntok; i++)
+ {
+ expressionS *t = &tok[i];
+ const char *name;
+ switch (t->X_op)
+ {
+ default: name = "unknown"; break;
+ case O_illegal: name = "O_illegal"; break;
+ case O_absent: name = "O_absent"; break;
+ case O_constant: name = "O_constant"; break;
+ case O_symbol: name = "O_symbol"; break;
+ case O_symbol_rva: name = "O_symbol_rva"; break;
+ case O_register: name = "O_register"; break;
+ case O_big: name = "O_big"; break;
+ case O_uminus: name = "O_uminus"; break;
+ case O_bit_not: name = "O_bit_not"; break;
+ case O_logical_not: name = "O_logical_not"; break;
+ case O_multiply: name = "O_multiply"; break;
+ case O_divide: name = "O_divide"; break;
+ case O_modulus: name = "O_modulus"; break;
+ case O_left_shift: name = "O_left_shift"; break;
+ case O_right_shift: name = "O_right_shift"; break;
+ case O_bit_inclusive_or: name = "O_bit_inclusive_or"; break;
+ case O_bit_or_not: name = "O_bit_or_not"; break;
+ case O_bit_exclusive_or: name = "O_bit_exclusive_or"; break;
+ case O_bit_and: name = "O_bit_and"; break;
+ case O_add: name = "O_add"; break;
+ case O_subtract: name = "O_subtract"; break;
+ case O_eq: name = "O_eq"; break;
+ case O_ne: name = "O_ne"; break;
+ case O_lt: name = "O_lt"; break;
+ case O_le: name = "O_le"; break;
+ case O_ge: name = "O_ge"; break;
+ case O_gt: name = "O_gt"; break;
+ case O_logical_and: name = "O_logical_and"; break;
+ case O_logical_or: name = "O_logical_or"; break;
+ case O_index: name = "O_index"; break;
+ case O_pregister: name = "O_pregister"; break;
+ case O_cpregister: name = "O_cpregister"; break;
+ case O_literal: name = "O_literal"; break;
+ case O_lituse_base: name = "O_lituse_base"; break;
+ case O_lituse_bytoff: name = "O_lituse_bytoff"; break;
+ case O_lituse_jsr: name = "O_lituse_jsr"; break;
+ case O_gpdisp: name = "O_gpdisp"; break;
+ case O_gprelhigh: name = "O_gprelhigh"; break;
+ case O_gprellow: name = "O_gprellow"; break;
+ case O_md10: name = "O_md10"; break;
+ case O_md11: name = "O_md11"; break;
+ case O_md12: name = "O_md12"; break;
+ case O_md13: name = "O_md13"; break;
+ case O_md14: name = "O_md14"; break;
+ case O_md15: name = "O_md15"; break;
+ case O_md16: name = "O_md16"; break;
+ }
+
+ 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);
+ }
+ fprintf (stderr, "\n");
+ fflush (stderr);
+}
+#endif
+
/* Parse the arguments to an opcode. */
static int
@@ -1489,6 +1900,16 @@ tokenize_arguments (str, tok, ntok)
expressionS *end_tok = tok + ntok;
char *old_input_line_pointer;
int saw_comma = 0, saw_arg = 0;
+#ifdef DEBUG_ALPHA
+ expressionS *orig_tok = tok;
+#endif
+#ifdef RELOC_OP_P
+ char *p;
+ const struct alpha_reloc_op_tag *r;
+ int c, i;
+ size_t len;
+ int reloc_found_p = 0;
+#endif
memset (tok, 0, sizeof (*tok) * ntok);
@@ -1504,6 +1925,72 @@ tokenize_arguments (str, tok, ntok)
case '\0':
goto fini;
+#ifdef RELOC_OP_P
+ case '!':
+ /* A relocation operand can be placed after the normal operand on an
+ assembly language statement, and has the following form:
+ !relocation_type!sequence_number. */
+ if (reloc_found_p)
+ { /* only support one relocation op per insn */
+ as_bad (_("More than one relocation op per insn"));
+ goto err_report;
+ }
+
+ if (!saw_arg)
+ goto err;
+
+ for (p = ++input_line_pointer;
+ ((c = *p) != '!' && c != ';' && c != '#' && c != ','
+ && !is_end_of_line[c]);
+ p++)
+ ;
+
+ /* Parse !relocation_type */
+ len = p - input_line_pointer;
+ if (len == 0)
+ {
+ as_bad (_("No relocation operand"));
+ goto err_report;
+ }
+
+ if (c != '!')
+ {
+ as_bad (_("No !sequence-number after !%s"), input_line_pointer);
+ goto err_report;
+ }
+
+ r = &alpha_reloc_op[0];
+ for (i = alpha_num_reloc_op-1; i >= 0; i--, r++)
+ {
+ if (len == r->length
+ && memcmp (input_line_pointer, r->name, len) == 0)
+ break;
+ }
+ if (i < 0)
+ {
+ as_bad (_("Unknown relocation operand: !%s"), input_line_pointer);
+ goto err_report;
+ }
+
+ input_line_pointer = ++p;
+
+ /* Parse !sequence_number */
+ memset (tok, '\0', sizeof (expressionS));
+ expression (tok);
+
+ 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);
+ goto err_report;
+ }
+
+ tok->X_op = r->op;
+ reloc_found_p = 1;
+ ++tok;
+ break;
+#endif
+
case ',':
++input_line_pointer;
if (saw_comma || !saw_arg)
@@ -1534,6 +2021,7 @@ tokenize_arguments (str, tok, ntok)
default:
if (saw_arg && !saw_comma)
goto err;
+
expression (tok);
if (tok->X_op == O_illegal || tok->X_op == O_absent)
goto err;
@@ -1549,11 +2037,22 @@ fini:
if (saw_comma)
goto err;
input_line_pointer = old_input_line_pointer;
+
+#ifdef DEBUG_ALPHA
+ debug_exp (orig_tok, ntok - (end_tok - tok));
+#endif
+
return ntok - (end_tok - tok);
err:
input_line_pointer = old_input_line_pointer;
- return -1;
+ return TOKENIZE_ERROR;
+
+#ifdef RELOC_OP_P
+err_report:
+ input_line_pointer = old_input_line_pointer;
+ return TOKENIZE_ERROR_REPORT;
+#endif
}
/* Search forward through all variants of an opcode looking for a
@@ -1632,6 +2131,9 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch)
case O_pregister:
case O_cpregister:
goto match_failed;
+
+ default:
+ break;
}
break;
@@ -1688,24 +2190,38 @@ find_macro_match(first_macro, tok, pntok)
tokidx = 0;
break;
+ /* index register */
case MACRO_IR:
if (tokidx >= ntok || tok[tokidx].X_op != O_register
|| !is_ir_num(tok[tokidx].X_add_number))
goto match_failed;
++tokidx;
break;
+
+ /* parenthesized index register */
case MACRO_PIR:
if (tokidx >= ntok || tok[tokidx].X_op != O_pregister
|| !is_ir_num(tok[tokidx].X_add_number))
goto match_failed;
++tokidx;
break;
+
+ /* optional parenthesized index register */
+ case MACRO_OPIR:
+ if (tokidx < ntok && tok[tokidx].X_op == O_pregister
+ && 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))
goto match_failed;
++tokidx;
break;
+
+ /* floating point register */
case MACRO_FPR:
if (tokidx >= ntok || tok[tokidx].X_op != O_register
|| !is_fpr_num(tok[tokidx].X_add_number))
@@ -1713,6 +2229,7 @@ find_macro_match(first_macro, tok, pntok)
++tokidx;
break;
+ /* normal expression */
case MACRO_EXP:
if (tokidx >= ntok)
goto match_failed;
@@ -1723,11 +2240,55 @@ find_macro_match(first_macro, tok, pntok)
case O_register:
case O_pregister:
case O_cpregister:
+#ifdef RELOC_OP_P
+ case O_literal:
+ case O_lituse_base:
+ case O_lituse_bytoff:
+ case O_lituse_jsr:
+ case O_gpdisp:
+ case O_gprelhigh:
+ case O_gprellow:
+#endif
goto match_failed;
+
+ default:
+ break;
}
++tokidx;
break;
+ /* optional !literal!<number> */
+ case MACRO_LITERAL:
+#ifdef RELOC_OP_P
+ if (tokidx < ntok && tok[tokidx].X_op == O_literal)
+ tokidx++;
+#endif
+ break;
+
+ /* optional !lituse_base!<number> */
+ case MACRO_BASE:
+#ifdef RELOC_OP_P
+ if (tokidx < ntok && tok[tokidx].X_op == O_lituse_base)
+ tokidx++;
+#endif
+ break;
+
+ /* optional !lituse_bytoff!<number> */
+ case MACRO_BYTOFF:
+#ifdef RELOC_OP_P
+ if (tokidx < ntok && tok[tokidx].X_op == O_lituse_bytoff)
+ tokidx++;
+#endif
+ break;
+
+ /* optional !lituse_jsr!<number> */
+ case MACRO_JSR:
+#ifdef RELOC_OP_P
+ if (tokidx < ntok && tok[tokidx].X_op == O_lituse_jsr)
+ tokidx++;
+#endif
+ break;
+
match_failed:
while (*arg != MACRO_EOA)
++arg;
@@ -1771,7 +2332,7 @@ insert_operand(insn, operand, val, file, line)
if (val < min || val > max)
{
const char *err =
- "operand out of range (%s not between %d and %d)";
+ _("operand out of range (%s not between %d and %d)");
char buf[sizeof (val) * 3 + 2];
sprint_value(buf, val);
@@ -1818,7 +2379,7 @@ 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 *t = (const expressionS *)0;
if (operand->flags & AXP_OPERAND_FAKE)
{
@@ -1839,8 +2400,10 @@ assemble_insn(opcode, tok, ntok, insn)
break;
case AXP_OPERAND_DEFAULT_ZERO:
{
- static const expressionS zero_exp = { 0, 0, 0, O_constant, 1 };
+ static expressionS zero_exp;
t = &zero_exp;
+ zero_exp.X_op = O_constant;
+ zero_exp.X_unsigned = 1;
}
break;
default:
@@ -1868,7 +2431,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++];
@@ -1907,36 +2470,64 @@ emit_insn (insn)
/* Apply the fixups in order */
for (i = 0; i < insn->nfixups; ++i)
{
+ const struct alpha_operand *operand = (const struct alpha_operand *)0;
struct alpha_fixup *fixup = &insn->fixups[i];
int size, pcrel;
fixS *fixP;
+#ifdef RELOC_OP_P
+ char buffer[ALPHA_RELOC_DIGITS];
+ struct alpha_literal_tag *info;
+#endif
/* Some fixups are only used internally and so have no howto */
if ((int)fixup->reloc < 0)
- size = 4, pcrel = 0;
-#ifdef OBJ_ELF
- /* These relocation types are only used internally. */
- else if (fixup->reloc == BFD_RELOC_ALPHA_GPDISP_HI16
- || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_LO16)
{
- size = 2, pcrel = 0;
+ operand = &alpha_operands[-(int)fixup->reloc];
+ size = 4;
+ pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0);
}
-#endif
- else
+ else switch (fixup->reloc)
{
- reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
- assert (reloc_howto);
+#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;
+#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;
+#endif
- size = bfd_get_reloc_size (reloc_howto);
- pcrel = reloc_howto->pc_relative;
+ 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;
+ }
+ assert (size >= 1 && size <= 4);
+ break;
}
- assert (size >= 1 && size <= 4);
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
&fixup->exp, pcrel, fixup->reloc);
- /* Turn off complaints that the addend is too large for some fixups */
+ /* Turn off complaints that the addend is too large for some fixups,
+ and copy in the sequence number for the explicit relocations. */
switch (fixup->reloc)
{
case BFD_RELOC_ALPHA_GPDISP_LO16:
@@ -1949,7 +2540,76 @@ emit_insn (insn)
case BFD_RELOC_GPREL32:
fixP->fx_no_overflow = 1;
break;
+
+#ifdef RELOC_OP_P
+ case BFD_RELOC_ALPHA_USER_LITERAL:
+ fixP->fx_no_overflow = 1;
+ sprintf (buffer, "!%u", insn->sequence[i]);
+ info = ((struct alpha_literal_tag *)
+ hash_find (alpha_literal_hash, buffer));
+
+ if (! info)
+ {
+ size_t len = strlen (buffer);
+ const char *errmsg;
+
+ info = ((struct alpha_literal_tag *)
+ xcalloc (sizeof (struct alpha_literal_tag) + len, 1));
+
+ info->segment = now_seg;
+ info->sequence = insn->sequence[i];
+ strcpy (info->string, buffer);
+ errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info);
+ if (errmsg)
+ as_bad (errmsg);
+ }
+
+ ++info->n_literals;
+
+ if (info->segment != now_seg)
+ info->multi_section_p = 1;
+
+ fixP->tc_fix_data.info = info;
+ break;
+
+ case BFD_RELOC_ALPHA_USER_LITUSE_BASE:
+ case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF:
+ case BFD_RELOC_ALPHA_USER_LITUSE_JSR:
+ sprintf (buffer, "!%u", insn->sequence[i]);
+ info = ((struct alpha_literal_tag *)
+ hash_find (alpha_literal_hash, buffer));
+
+ if (! info)
+ {
+ size_t len = strlen (buffer);
+ const char *errmsg;
+
+ info = ((struct alpha_literal_tag *)
+ xcalloc (sizeof (struct alpha_literal_tag) + len, 1));
+
+ info->segment = now_seg;
+ info->sequence = insn->sequence[i];
+ strcpy (info->string, buffer);
+ errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info);
+ if (errmsg)
+ as_bad (errmsg);
+ }
+ info->n_lituses++;
+ fixP->tc_fix_data.info = info;
+ fixP->tc_fix_data.next_lituse = info->lituse;
+ info->lituse = fixP;
+ if (info->segment != now_seg)
+ info->multi_section_p = 1;
+
+ break;
+#endif
+
default:
+ if ((int)fixup->reloc < 0)
+ {
+ if (operand->flags & AXP_OPERAND_NOOVERFLOW)
+ fixP->fx_no_overflow = 1;
+ }
break;
}
}
@@ -1982,13 +2642,13 @@ assemble_tokens_to_insn(opname, tok, ntok, insn)
return;
}
else if (cpumatch)
- as_bad ("inappropriate arguments for opcode `%s'", opname);
+ as_bad (_("inappropriate arguments for opcode `%s'"), opname);
else
- as_bad ("opcode `%s' not supported for target %s", opname,
+ as_bad (_("opcode `%s' not supported for target %s"), opname,
alpha_target_name);
}
else
- as_bad ("unknown opcode `%s'", opname);
+ as_bad (_("unknown opcode `%s'"), opname);
}
/* Given an opcode name and a pre-tokenized set of arguments, take the
@@ -2023,6 +2683,17 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
}
}
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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);
+ ntok--;
+ }
+#endif
+
/* search opcodes */
opcode = (const struct alpha_opcode *) hash_find (alpha_opcode_hash, opname);
if (opcode)
@@ -2040,12 +2711,12 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
if (found_something)
if (cpumatch)
- as_bad ("inappropriate arguments for opcode `%s'", opname);
+ as_bad (_("inappropriate arguments for opcode `%s'"), opname);
else
- as_bad ("opcode `%s' not supported for target %s", opname,
+ as_bad (_("opcode `%s' not supported for target %s"), opname,
alpha_target_name);
else
- as_bad ("unknown opcode `%s'", opname);
+ as_bad (_("unknown opcode `%s'"), opname);
}
@@ -2066,8 +2737,8 @@ static const char * const ldXu_op[] = { "ldbu", "ldwu", NULL, NULL };
static void
emit_ldgp (tok, ntok, unused)
const expressionS *tok;
- int ntok;
- const PTR unused;
+ int ntok ATTRIBUTE_UNUSED;
+ const PTR unused ATTRIBUTE_UNUSED;
{
#ifdef OBJ_AOUT
FIXME
@@ -2079,8 +2750,16 @@ FIXME
expressionS newtok[3];
expressionS addend;
- /* We're going to need this symbol in md_apply_fix(). */
- (void) section_symbol (absolute_section);
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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");
+ ntok--;
+ }
+#endif
#ifdef OBJ_ECOFF
if (regno (tok[2].X_add_number) == AXP_REG_PV)
@@ -2096,7 +2775,8 @@ FIXME
addend = tok[1];
#ifdef OBJ_ECOFF
- assert (addend.X_op == O_constant);
+ if (addend.X_op != O_constant)
+ as_bad (_("can not resolve expression"));
addend.X_op = O_symbol;
addend.X_add_symbol = alpha_gp_symbol;
#endif
@@ -2144,7 +2824,7 @@ add_to_link_pool (basesym, sym, addend)
segment_info_type *seginfo = seg_info (alpha_link_section);
fixS *fixp;
- offset = -basesym->sy_obj;
+ offset = - *symbol_get_obj (basesym);
/* @@ This assumes all entries in a given section will be of the same
size... Probably correct, but unwise to rely on. */
@@ -2194,15 +2874,19 @@ add_to_link_pool (basesym, sym, addend)
i.e. "ldq $targ, LIT($gp); addq $targ, $0, $targ". Odd, perhaps,
but this is what OSF/1 does.
+ If explicit relocations of the form !literal!<number> are allowed,
+ and used, then explict_reloc with be an expression pointer.
+
Finally, the return value is true if the calling macro may emit a
LITUSE reloc if otherwise appropriate. */
static int
-load_expression (targreg, exp, pbasereg, poffset)
+load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
int targreg;
const expressionS *exp;
int *pbasereg;
expressionS *poffset;
+ const expressionS *explicit_reloc;
{
int emit_lituse = 0;
offsetT addend = exp->X_add_number;
@@ -2234,16 +2918,16 @@ load_expression (targreg, exp, pbasereg, poffset)
}
if (lit >= 0x8000)
- as_fatal ("overflow in literal (.lita) table");
+ as_fatal (_("overflow in literal (.lita) table"));
/* emit "ldq r, lit(gp)" */
if (basereg != alpha_gp_register && targreg == basereg)
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
if (targreg == AXP_REG_AT)
- as_bad ("macro requires $at while $at in use");
+ as_bad (_("macro requires $at while $at in use"));
set_tok_reg (newtok[0], AXP_REG_AT);
}
@@ -2254,6 +2938,7 @@ load_expression (targreg, exp, pbasereg, poffset)
assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
+ assert (explicit_reloc == (const expressionS *)0);
assert (insn.nfixups == 1);
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL;
#endif /* OBJ_ECOFF */
@@ -2263,9 +2948,9 @@ load_expression (targreg, exp, pbasereg, poffset)
if (basereg != alpha_gp_register && targreg == basereg)
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
if (targreg == AXP_REG_AT)
- as_bad ("macro requires $at while $at in use");
+ as_bad (_("macro requires $at while $at in use"));
set_tok_reg (newtok[0], AXP_REG_AT);
}
@@ -2275,8 +2960,8 @@ load_expression (targreg, exp, pbasereg, poffset)
/* 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;
@@ -2291,13 +2976,25 @@ load_expression (targreg, exp, pbasereg, poffset)
assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
assert (insn.nfixups == 1);
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
+ if (!explicit_reloc)
+ insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
+ else
+ {
+#ifdef RELOC_OP_P
+ insn.fixups[0].reloc
+ = (ALPHA_RELOC_TABLE (explicit_reloc->X_op))->reloc;
+ insn.sequence[0] = explicit_reloc->X_add_number;
+#else
+ abort ();
+#endif
+ }
#endif /* OBJ_ELF */
#ifdef OBJ_EVAX
offsetT link;
/* Find symbol or symbol pointer in link section. */
+ assert (explicit_reloc == (const expressionS *)0);
if (exp->X_add_symbol == alpha_evax_proc.symbol)
{
if (range_signed_16 (addend))
@@ -2356,12 +3053,14 @@ load_expression (targreg, exp, pbasereg, poffset)
break;
case O_constant:
+ 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. */
+ assert (explicit_reloc == (const expressionS *)0);
set_tok_reg (newtok[0], targreg);
newtok[1] = *exp;
set_tok_preg (newtok[2], basereg);
@@ -2372,13 +3071,17 @@ load_expression (targreg, exp, pbasereg, poffset)
return 0;
case O_big:
- as_bad ("%s number invalid; zero assumed",
- exp->X_add_number > 0 ? "bignum" : "floating point");
+ if (exp->X_add_number > 0)
+ as_bad (_("bignum invalid; zero assumed"));
+ else
+ as_bad (_("floating point number invalid; zero assumed"));
addend = 0;
break;
default:
- abort();
+ as_bad (_("can't handle expression"));
+ addend = 0;
+ break;
}
if (!range_signed_32 (addend))
@@ -2407,22 +3110,22 @@ load_expression (targreg, exp, pbasereg, poffset)
alpha_lit8_literal = add_to_literal_pool (alpha_lit8_symbol, 0x8000,
alpha_lita_section, 8);
if (alpha_lit8_literal >= 0x8000)
- as_fatal ("overflow in literal (.lita) table");
+ as_fatal (_("overflow in literal (.lita) table"));
#endif
}
lit = add_to_literal_pool (NULL, addend, alpha_lit8_section, 8) - 0x8000;
if (lit >= 0x8000)
- as_fatal ("overflow in literal (.lit8) table");
+ as_fatal (_("overflow in literal (.lit8) table"));
/* emit "lda litreg, .lit8+0x8000" */
if (targreg == basereg)
{
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
if (targreg == AXP_REG_AT)
- as_bad ("macro requires $at while $at in use");
+ as_bad (_("macro requires $at while $at in use"));
set_tok_reg (newtok[0], AXP_REG_AT);
}
@@ -2463,8 +3166,9 @@ load_expression (targreg, exp, pbasereg, poffset)
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- insn.fixups[0].exp.X_op = O_constant;
- insn.fixups[0].exp.X_add_number = 1;
+ insn.fixups[0].exp.X_op = O_symbol;
+ insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg);
+ insn.fixups[0].exp.X_add_number = LITUSE_BASE;
emit_lituse = 0;
emit_insn (&insn);
@@ -2544,19 +3248,66 @@ load_expression (targreg, exp, pbasereg, poffset)
large constants. */
static void
-emit_lda (tok, ntok, unused)
+emit_lda (tok, ntok, opname)
const expressionS *tok;
int ntok;
- const PTR unused;
+ const PTR opname;
{
int basereg;
+ const expressionS *reloc = (const expressionS *)0;
+
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ const struct alpha_reloc_op_tag *r;
+
+ 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);
+
+ reloc = (const expressionS *)0;
+ ntok--;
+ break;
+
+ case O_literal:
+ ntok--;
+ break;
+
+ /* For lda $x,0($x)!lituse_base!y, don't use load_expression, since
+ it is really too general for our needs. Instead just generate the
+ lda directly. */
+ case O_lituse_base:
+ if (ntok != 4
+ || tok[0].X_op != O_register
+ || !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))
+ {
+ as_bad (_("bad instruction format for lda !%s!%d"), r->name,
+ reloc->X_add_number);
+
+ reloc = (const expressionS *)0;
+ ntok--;
+ break;
+ }
+
+ emit_loadstore (tok, ntok, "lda");
+ return;
+ }
+ }
+#endif
if (ntok == 2)
basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register);
else
basereg = tok[2].X_add_number;
- (void) load_expression (tok[0].X_add_number, &tok[1], &basereg, NULL);
+ (void) load_expression (tok[0].X_add_number, &tok[1], &basereg, NULL, reloc);
}
/* The ldah macro differs from the ldah instruction in that it has $31
@@ -2565,11 +3316,22 @@ emit_lda (tok, ntok, unused)
static void
emit_ldah (tok, ntok, unused)
const expressionS *tok;
- int ntok;
- const PTR unused;
+ int ntok ATTRIBUTE_UNUSED;
+ const PTR unused ATTRIBUTE_UNUSED;
{
expressionS newtok[3];
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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");
+ ntok--;
+ }
+#endif
+
newtok[0] = tok[0];
newtok[1] = tok[1];
set_tok_preg (newtok[2], AXP_REG_ZERO);
@@ -2591,19 +3353,66 @@ emit_ir_load (tok, ntok, opname)
expressionS newtok[3];
struct alpha_insn insn;
+#ifdef RELOC_OP_P
+ const expressionS *reloc = (const expressionS *)0;
+
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ const struct alpha_reloc_op_tag *r;
+
+ reloc = &tok[ntok-1];
+ switch (reloc->X_op)
+ {
+ case O_lituse_base:
+ ntok--;
+ break;
+
+ case O_literal:
+ if (strcmp ((const char *)opname, "ldq") == 0)
+ {
+ emit_lda (tok, ntok, opname);
+ return;
+ }
+
+ /* fall through */
+ default:
+ 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);
+ }
+ }
+#endif
+
if (ntok == 2)
basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register);
else
basereg = tok[2].X_add_number;
lituse = load_expression (tok[0].X_add_number, &tok[1], &basereg,
- &newtok[1]);
+ &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);
+#ifdef RELOC_OP_P
+ if (reloc)
+ {
+ int nfixups = insn.nfixups;
+ const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc->X_op);
+
+ assert (nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[nfixups].reloc = r->reloc;
+ insn.fixups[nfixups].exp.X_op = O_symbol;
+ insn.fixups[nfixups].exp.X_add_symbol = section_symbol (now_seg);
+ insn.fixups[nfixups].exp.X_add_number = r->lituse;
+ insn.sequence[nfixups] = reloc->X_add_number;
+ insn.nfixups++;
+ }
+#endif
+
if (lituse)
{
assert (insn.nfixups < MAX_INSN_FIXUPS);
@@ -2614,8 +3423,9 @@ emit_ir_load (tok, ntok, opname)
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- insn.fixups[0].exp.X_op = O_constant;
- insn.fixups[0].exp.X_add_number = 1;
+ insn.fixups[0].exp.X_op = O_symbol;
+ insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg);
+ insn.fixups[0].exp.X_add_number = LITUSE_BASE;
}
emit_insn (&insn);
@@ -2634,6 +3444,21 @@ emit_loadstore (tok, ntok, opname)
expressionS newtok[3];
struct alpha_insn insn;
+#ifdef RELOC_OP_P
+ const expressionS *reloc = (const expressionS *)0;
+
+ 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 ];
+ as_bad (_("Cannot use !%s!%d with %s"), r->name,
+ (int)reloc->X_add_number, (const char *)opname);
+ }
+ }
+#endif
+
if (ntok == 2)
basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register);
else
@@ -2642,9 +3467,10 @@ emit_loadstore (tok, ntok, opname)
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");
+ as_bad (_("macro requires $at register while noat in effect"));
- lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1]);
+ lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1],
+ (const expressionS *)0);
}
else
{
@@ -2657,6 +3483,22 @@ emit_loadstore (tok, ntok, opname)
assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn);
+#ifdef RELOC_OP_P
+ if (reloc)
+ {
+ int nfixups = insn.nfixups;
+ const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc->X_op);
+
+ assert (nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[nfixups].reloc = r->reloc;
+ insn.fixups[nfixups].exp.X_op = O_symbol;
+ insn.fixups[nfixups].exp.X_add_symbol = section_symbol (now_seg);
+ insn.fixups[nfixups].exp.X_add_number = r->lituse;
+ insn.sequence[nfixups] = reloc->X_add_number;
+ insn.nfixups++;
+ }
+#endif
+
if (lituse)
{
assert (insn.nfixups < MAX_INSN_FIXUPS);
@@ -2667,8 +3509,9 @@ emit_loadstore (tok, ntok, opname)
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- insn.fixups[0].exp.X_op = O_constant;
- insn.fixups[0].exp.X_add_number = 1;
+ insn.fixups[0].exp.X_op = O_symbol;
+ insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg);
+ insn.fixups[0].exp.X_add_number = LITUSE_BASE;
}
emit_insn (&insn);
@@ -2688,8 +3531,21 @@ emit_ldXu (tok, ntok, vlgsize)
{
expressionS newtok[3];
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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");
+ ntok--;
+ }
+#endif
+
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" */
@@ -2737,7 +3593,7 @@ emit_uldXu (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" */
@@ -2799,10 +3655,21 @@ static void
emit_ldil (tok, ntok, unused)
const expressionS *tok;
int ntok;
- const PTR unused;
+ const PTR unused ATTRIBUTE_UNUSED;
{
expressionS newtok[2];
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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, "ldil");
+ ntok--;
+ }
+#endif
+
memcpy (newtok, tok, sizeof(newtok));
newtok[1].X_add_number = sign_extend_32 (tok[1].X_add_number);
@@ -2826,7 +3693,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" */
@@ -2967,6 +3834,19 @@ emit_sextX (tok, ntok, vlgsize)
int bitshift = 64 - 8 * (1 << lgsize);
expressionS newtok[3];
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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");
+ ntok--;
+ }
+#endif
+
/* emit "sll src,bits,dst" */
newtok[0] = tok[0];
@@ -3013,6 +3893,17 @@ emit_division (tok, ntok, symname)
symbolS *sym;
expressionS newtok[3];
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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);
+ ntok--;
+ }
+#endif
+
xr = regno (tok[0].X_add_number);
yr = regno (tok[1].X_add_number);
@@ -3027,7 +3918,7 @@ emit_division (tok, ntok, symname)
/* They are in exactly the wrong order -- swap through AT */
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
set_tok_reg (newtok[0], AXP_REG_R16);
set_tok_reg (newtok[1], AXP_REG_AT);
@@ -3112,6 +4003,17 @@ emit_division (tok, ntok, symname)
symbolS *sym;
expressionS newtok[3];
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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);
+ ntok--;
+ }
+#endif
+
xr = regno (tok[0].X_add_number);
yr = regno (tok[1].X_add_number);
@@ -3128,7 +4030,7 @@ emit_division (tok, ntok, symname)
/* They are in exactly the wrong order -- swap through AT */
if (alpha_noat_on)
- as_bad ("macro requires $at register while noat in effect");
+ as_bad (_("macro requires $at register while noat in effect"));
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_reg (newtok[1], AXP_REG_AT);
@@ -3208,6 +4110,17 @@ emit_jsrjmp (tok, ntok, vopname)
expressionS newtok[3];
int r, tokidx = 0, lituse = 0;
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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);
+ ntok--;
+ }
+#endif
+
if (tokidx < ntok && tok[tokidx].X_op == O_register)
r = regno (tok[tokidx++].X_add_number);
else
@@ -3224,7 +4137,8 @@ emit_jsrjmp (tok, ntok, vopname)
else
{
int basereg = alpha_gp_register;
- lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL);
+ lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL,
+ (const expressionS *)0);
}
#endif
@@ -3252,8 +4166,9 @@ emit_jsrjmp (tok, ntok, vopname)
}
insn.nfixups++;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- insn.fixups[0].exp.X_op = O_constant;
- insn.fixups[0].exp.X_add_number = 3;
+ insn.fixups[0].exp.X_op = O_symbol;
+ insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg);
+ insn.fixups[0].exp.X_add_number = LITUSE_JSR;
}
emit_insn (&insn);
@@ -3272,6 +4187,17 @@ emit_retjcr (tok, ntok, vopname)
expressionS newtok[3];
int r, tokidx = 0;
+#ifdef RELOC_OP_P
+ if (ntok && USER_RELOC_P (tok[ntok-1].X_op))
+ {
+ 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);
+ ntok--;
+ }
+#endif
+
if (tokidx < ntok && tok[tokidx].X_op == O_register)
r = regno (tok[tokidx++].X_add_number);
else
@@ -3362,23 +4288,36 @@ s_alpha_comm (ignore)
}
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (".COMMon length (%ld.) <0! Ignored.", (long) temp);
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
ignore_rest_of_line ();
return;
}
*p = 0;
symbolP = symbol_find_or_make (name);
- *p = c;
#ifdef OBJ_EVAX
/* Make a section for the common symbol. */
new_seg = subseg_new (xstrdup (name), 0);
#endif
+ *p = c;
+
+#ifdef OBJ_EVAX
+ /* alignment might follow */
+ if (*input_line_pointer == ',')
+ {
+ offsetT align;
+
+ input_line_pointer++;
+ align = get_absolute_expression ();
+ bfd_set_section_alignment (stdoutput, new_seg, align);
+ }
+#endif
+
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol");
+ as_bad (_("Ignoring attempt to re-define symbol"));
ignore_rest_of_line ();
return;
}
@@ -3387,7 +4326,7 @@ s_alpha_comm (ignore)
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.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) bfd_section_size (stdoutput, new_seg),
(long) temp);
@@ -3396,7 +4335,7 @@ s_alpha_comm (ignore)
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
- as_bad ("Length of .comm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
@@ -3409,7 +4348,7 @@ s_alpha_comm (ignore)
p = frag_more (temp);
new_seg->flags |= SEC_IS_COMMON;
if (! S_IS_DEFINED (symbolP))
- symbolP->bsym->section = new_seg;
+ S_SET_SEGMENT (symbolP, new_seg);
#else
S_SET_VALUE (symbolP, (valueT) temp);
#endif
@@ -3420,7 +4359,7 @@ s_alpha_comm (ignore)
subseg_set (current_section, current_subsec);
#endif
- know (symbolP->sy_frag == &zero_address_frag);
+ know (symbol_get_frag (symbolP) == &zero_address_frag);
demand_empty_rest_of_line ();
}
@@ -3484,7 +4423,181 @@ s_alpha_section (ignore)
alpha_current_align = 0;
}
-#endif
+static void
+s_alpha_ent (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ if (ECOFF_DEBUGGING)
+ ecoff_directive_ent (0);
+ else
+ {
+ char *name, name_end;
+ name = input_line_pointer;
+ name_end = get_symbol_end ();
+
+ if (! is_name_beginner (*name))
+ {
+ as_warn (_(".ent directive has no name"));
+ *input_line_pointer = name_end;
+ }
+ else
+ {
+ symbolS *sym;
+
+ if (alpha_cur_ent_sym)
+ as_warn (_("nested .ent directives"));
+
+ sym = symbol_find_or_make (name);
+ symbol_get_bfdsym (sym)->flags |= BSF_FUNCTION;
+ alpha_cur_ent_sym = sym;
+
+ /* The .ent directive is sometimes followed by a number. Not sure
+ what it really means, but ignore it. */
+ *input_line_pointer = name_end;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
+ {
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ }
+ if (isdigit (*input_line_pointer) || *input_line_pointer == '-')
+ (void) get_absolute_expression ();
+ }
+ demand_empty_rest_of_line ();
+ }
+}
+
+static void
+s_alpha_end (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ if (ECOFF_DEBUGGING)
+ ecoff_directive_end (0);
+ else
+ {
+ char *name, name_end;
+ name = input_line_pointer;
+ name_end = get_symbol_end ();
+
+ if (! is_name_beginner (*name))
+ {
+ as_warn (_(".end directive has no name"));
+ *input_line_pointer = name_end;
+ }
+ else
+ {
+ symbolS *sym;
+
+ sym = symbol_find (name);
+ if (sym != alpha_cur_ent_sym)
+ as_warn (_(".end directive names different symbol than .ent"));
+
+ /* Create an expression to calculate the size of the function. */
+ if (sym)
+ {
+ symbol_get_obj (sym)->size =
+ (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_get_obj (sym)->size->X_op_symbol = sym;
+ symbol_get_obj (sym)->size->X_add_number = 0;
+ }
+
+ alpha_cur_ent_sym = NULL;
+
+ *input_line_pointer = name_end;
+ }
+ demand_empty_rest_of_line ();
+ }
+}
+
+static void
+s_alpha_mask (fp)
+ int fp;
+{
+ if (ECOFF_DEBUGGING)
+ {
+ if (fp)
+ ecoff_directive_fmask (0);
+ else
+ ecoff_directive_mask (0);
+ }
+ else
+ discard_rest_of_line ();
+}
+
+static void
+s_alpha_frame (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ if (ECOFF_DEBUGGING)
+ ecoff_directive_frame (0);
+ else
+ discard_rest_of_line ();
+}
+
+static void
+s_alpha_prologue (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ symbolS *sym;
+ int arg;
+
+ arg = get_absolute_expression ();
+ demand_empty_rest_of_line ();
+
+ if (ECOFF_DEBUGGING)
+ sym = ecoff_get_cur_proc_sym ();
+ else
+ sym = alpha_cur_ent_sym;
+ know (sym != NULL);
+
+ 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;
+ }
+}
+
+static void
+s_alpha_coff_wrapper (which)
+ int which;
+{
+ static void (* const fns[]) PARAMS ((int)) = {
+ ecoff_directive_begin,
+ ecoff_directive_bend,
+ 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)));
+
+ if (ECOFF_DEBUGGING)
+ (*fns[which])(0);
+ else
+ {
+ as_bad (_("ECOFF debugging is disabled."));
+ ignore_rest_of_line ();
+ }
+}
+#endif /* OBJ_ELF */
#ifdef OBJ_EVAX
@@ -3501,7 +4614,7 @@ s_alpha_section (secid)
if ((secid <= 0) || (secid > EVAX_SECTION_COUNT))
{
- as_fatal ("Unknown section directive");
+ as_fatal (_("Unknown section directive"));
demand_empty_rest_of_line ();
return;
}
@@ -3514,18 +4627,6 @@ s_alpha_section (secid)
}
-/* .prologue */
-
-static void
-s_alpha_prologue (ignore)
- int ignore;
-{
- demand_empty_rest_of_line ();
-
- return;
-}
-
-
/* Parse .ent directives. */
static void
@@ -3550,13 +4651,13 @@ s_alpha_ent (ignore)
if (symexpr.X_op != O_symbol)
{
- as_fatal (".ent directive has no symbol");
+ as_fatal (_(".ent directive has no symbol"));
demand_empty_rest_of_line ();
return;
}
symbol = make_expr_symbol (&symexpr);
- symbol->bsym->flags |= BSF_FUNCTION;
+ symbol_get_bfdsym (symbol)->flags |= BSF_FUNCTION;
alpha_evax_proc.symbol = symbol;
demand_empty_rest_of_line ();
@@ -3578,7 +4679,7 @@ s_alpha_frame (ignore)
if (*input_line_pointer++ != ','
|| get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .frame directive 1./2. param");
+ as_warn (_("Bad .frame directive 1./2. param"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3590,7 +4691,7 @@ s_alpha_frame (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer++ != ',')
{
- as_warn ("Bad .frame directive 3./4. param");
+ as_warn (_("Bad .frame directive 3./4. param"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3615,7 +4716,7 @@ s_alpha_pdesc (ignore)
if (now_seg != alpha_link_section)
{
- as_bad (".pdesc directive not in link (.link) section");
+ as_bad (_(".pdesc directive not in link (.link) section"));
demand_empty_rest_of_line ();
return;
}
@@ -3623,29 +4724,31 @@ s_alpha_pdesc (ignore)
if ((alpha_evax_proc.symbol == 0)
|| (!S_IS_DEFINED (alpha_evax_proc.symbol)))
{
- as_fatal (".pdesc has no matching .ent");
+ as_fatal (_(".pdesc has no matching .ent"));
demand_empty_rest_of_line ();
return;
}
- alpha_evax_proc.symbol->sy_obj = (valueT)seginfo->literal_pool_size;
+ *symbol_get_obj (alpha_evax_proc.symbol) =
+ (valueT) seginfo->literal_pool_size;
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_warn (".pdesc directive has no entry symbol");
+ as_warn (_(".pdesc directive has no entry symbol"));
demand_empty_rest_of_line ();
return;
}
entry_sym = make_expr_symbol (&exp);
/* Save bfd symbol of proc desc in function symbol. */
- alpha_evax_proc.symbol->bsym->udata.p = (PTR)entry_sym->bsym;
+ symbol_get_bfdsym (alpha_evax_proc.symbol)->udata.p
+ = symbol_get_bfdsym (entry_sym);
SKIP_WHITESPACE ();
if (*input_line_pointer++ != ',')
{
- as_warn ("No comma after .pdesc <entryname>");
+ as_warn (_("No comma after .pdesc <entryname>"));
demand_empty_rest_of_line ();
return;
}
@@ -3668,7 +4771,7 @@ s_alpha_pdesc (ignore)
}
else
{
- as_fatal ("unknown procedure kind");
+ as_fatal (_("unknown procedure kind"));
demand_empty_rest_of_line ();
return;
}
@@ -3763,7 +4866,7 @@ s_alpha_name (ignore)
if (now_seg != alpha_link_section)
{
- as_bad (".name directive not in link (.link) section");
+ as_bad (_(".name directive not in link (.link) section"));
demand_empty_rest_of_line ();
return;
}
@@ -3771,7 +4874,7 @@ s_alpha_name (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_warn (".name directive has no symbol");
+ as_warn (_(".name directive has no symbol"));
demand_empty_rest_of_line ();
return;
}
@@ -3806,7 +4909,7 @@ s_alpha_linkage (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_fatal ("No symbol after .linkage");
+ as_fatal (_("No symbol after .linkage"));
}
else
{
@@ -3835,7 +4938,7 @@ s_alpha_code_address (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_fatal ("No symbol after .code_address");
+ as_fatal (_("No symbol after .code_address"));
}
else
{
@@ -3870,7 +4973,7 @@ s_alpha_mask (ignore)
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .mask directive");
+ as_warn (_("Bad .mask directive"));
--input_line_pointer;
}
else
@@ -3892,7 +4995,7 @@ s_alpha_fmask (ignore)
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .fmask directive");
+ as_warn (_("Bad .fmask directive"));
--input_line_pointer;
}
else
@@ -3931,14 +5034,14 @@ s_alpha_file (ignore)
extern char *demand_copy_string PARAMS ((int *lenP));
sprintf (case_hack, "<CASE:%01d%01d>",
- alpha_flag_hash_long_names, alpha_flag_show_after_trunc);
+ alpha_flag_hash_long_names, alpha_flag_show_after_trunc);
s = symbol_find_or_make (case_hack);
- s->bsym->flags |= BSF_FILE;
+ symbol_get_bfdsym (s)->flags |= BSF_FILE;
get_absolute_expression ();
s = symbol_find_or_make (demand_copy_string (&length));
- s->bsym->flags |= BSF_FILE;
+ symbol_get_bfdsym (s)->flags |= BSF_FILE;
demand_empty_rest_of_line ();
return;
@@ -3949,7 +5052,7 @@ s_alpha_file (ignore)
static void
s_alpha_gprel32 (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS e;
char *p;
@@ -4044,7 +5147,7 @@ s_alpha_float_cons (type)
static void
s_alpha_proc (is_static)
- int is_static;
+ int is_static ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -4063,7 +5166,7 @@ s_alpha_proc (is_static)
if (*input_line_pointer != ',')
{
*p = 0;
- as_warn ("Expected comma after name \"%s\"", name);
+ as_warn (_("Expected comma after name \"%s\""), name);
*p = c;
temp = 0;
ignore_rest_of_line ();
@@ -4073,8 +5176,8 @@ s_alpha_proc (is_static)
input_line_pointer++;
temp = get_absolute_expression ();
}
- /* symbolP->sy_other = (signed char) temp; */
- as_warn ("unhandled: .proc %s,%d", name, temp);
+ /* *symbol_get_obj (symbolP) = (signed char) temp; */
+ as_warn (_("unhandled: .proc %s,%d"), name, temp);
demand_empty_rest_of_line ();
}
@@ -4083,7 +5186,7 @@ s_alpha_proc (is_static)
static void
s_alpha_set (x)
- int x;
+ int x ATTRIBUTE_UNUSED;
{
char *name, ch, *s;
int yesno = 1;
@@ -4109,7 +5212,7 @@ s_alpha_set (x)
else if (!strcmp ("volatile", s))
/* ignore */ ;
else
- as_warn ("Tried to .set unrecognized mode `%s'", name);
+ as_warn (_("Tried to .set unrecognized mode `%s'"), name);
*input_line_pointer = ch;
demand_empty_rest_of_line ();
@@ -4120,13 +5223,13 @@ s_alpha_set (x)
static void
s_alpha_base (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
#if 0
if (first_32bit_quadrant)
{
/* not fatal, but it might not work in the end */
- as_warn ("File overrides no-base-register option.");
+ as_warn (_("File overrides no-base-register option."));
first_32bit_quadrant = 0;
}
#endif
@@ -4143,7 +5246,7 @@ s_alpha_base (ignore)
if (alpha_gp_register < 0 || alpha_gp_register > 31)
{
alpha_gp_register = AXP_REG_GP;
- as_warn ("Bad base register, using $%d.", alpha_gp_register);
+ as_warn (_("Bad base register, using $%d."), alpha_gp_register);
}
demand_empty_rest_of_line ();
@@ -4155,7 +5258,7 @@ s_alpha_base (ignore)
static void
s_alpha_align (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int align;
char fill, *pfill;
@@ -4165,11 +5268,11 @@ s_alpha_align (ignore)
if (align > max_alignment)
{
align = max_alignment;
- as_bad ("Alignment too large: %d. assumed", align);
+ as_bad (_("Alignment too large: %d. assumed"), align);
}
else if (align < 0)
{
- as_warn ("Alignment negative: 0 assumed");
+ as_warn (_("Alignment negative: 0 assumed"));
align = 0;
}
@@ -4253,7 +5356,7 @@ s_alpha_ucons (bytes)
static void
s_alpha_arch (ignored)
- int ignored;
+ int ignored ATTRIBUTE_UNUSED;
{
char *name, ch;
const struct cpu_type *p;
@@ -4344,6 +5447,28 @@ const pseudo_typeS md_pseudo_table[] =
{ "ctors", s_alpha_section, 4},
{ "dtors", s_alpha_section, 5},
#endif
+#ifdef OBJ_ELF
+ /* Frame related pseudos. */
+ {"ent", s_alpha_ent, 0},
+ {"end", s_alpha_end, 0},
+ {"mask", s_alpha_mask, 0},
+ {"fmask", s_alpha_mask, 1},
+ {"frame", s_alpha_frame, 0},
+ {"prologue", s_alpha_prologue, 0},
+ /* 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},
+#else
+ {"prologue", s_ignore, 0},
+#endif
{"gprel32", s_alpha_gprel32, 0},
{"t_floating", s_alpha_float_cons, 'd'},
{"s_floating", s_alpha_float_cons, 'f'},
@@ -4358,7 +5483,6 @@ const pseudo_typeS md_pseudo_table[] =
{"livereg", s_ignore, 0},
{"base", s_alpha_base, 0}, /*??*/
{"option", s_ignore, 0},
- {"prologue", s_ignore, 0},
{"aent", s_ignore, 0},
{"ugen", s_ignore, 0},
{"eflag", s_ignore, 0},
@@ -4461,7 +5585,7 @@ select_gp_value ()
S_SET_VALUE (alpha_gp_symbol, alpha_gp_value);
#ifdef DEBUG1
- printf ("Chose GP value of %lx\n", alpha_gp_value);
+ printf (_("Chose GP value of %lx\n"), alpha_gp_value);
#endif
}
#endif /* OBJ_ECOFF */
@@ -4476,7 +5600,7 @@ alpha_align (n, pfill, label, force)
int n;
char *pfill;
symbolS *label;
- int force;
+ int force ATTRIBUTE_UNUSED;
{
if (alpha_current_align >= n)
return;
@@ -4512,14 +5636,13 @@ alpha_align (n, pfill, label, force)
alpha_current_align = n;
- if (label != NULL)
+ if (label != NULL && S_GET_SEGMENT (label) == now_seg)
{
- assert (S_GET_SEGMENT (label) == now_seg);
- label->sy_frag = frag_now;
+ symbol_set_frag (label, frag_now);
S_SET_VALUE (label, (valueT) frag_now_fix ());
}
- record_alignment(now_seg, n);
+ record_alignment (now_seg, n);
/* ??? if alpha_flag_relax && force && elf, record the requested alignment
in a reloc for the linker to see. */
diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h
index bdc8ec1..632b04e 100644
--- a/contrib/binutils/gas/config/tc-alpha.h
+++ b/contrib/binutils/gas/config/tc-alpha.h
@@ -1,5 +1,5 @@
/* This file is tc-alpha.h
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by Ken Raeburn <raeburn@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -23,6 +23,8 @@
#define TARGET_BYTES_BIG_ENDIAN 0
+#define WORKING_DOT_WORD
+
#define TARGET_ARCH bfd_arch_alpha
#define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
@@ -30,7 +32,7 @@
: OUTPUT_FLAVOR == bfd_target_elf_flavour \
? "elf64-alpha" \
: OUTPUT_FLAVOR == bfd_target_evax_flavour \
- ? "evax-alpha" \
+ ? "vms-alpha" \
: "unknown-format")
#define NEED_LITERAL_POOL
@@ -47,9 +49,19 @@ extern valueT alpha_gp_value;
#define tc_fix_adjustable(FIXP) alpha_fix_adjustable (FIXP)
#define RELOC_REQUIRES_SYMBOL
+/* 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. */
+
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy)))
+
#define md_convert_frag(b,s,f) as_fatal ("alpha convert_frag\n")
-#define md_create_long_jump(p,f,t,fr,s) as_fatal("alpha_create_long_jump")
-#define md_create_short_jump(p,f,t,fr,s) as_fatal("alpha_create_short_jump")
#define md_estimate_size_before_relax(f,s) \
(as_fatal("estimate_size_before_relax called"),1)
#define md_operand(x)
@@ -73,7 +85,7 @@ extern int tc_get_register PARAMS ((int frame));
extern void alpha_frob_ecoff_data PARAMS ((void));
#define tc_frob_label(sym) alpha_define_label (sym)
-extern void alpha_define_label PARAMS ((struct symbol *));
+extern void alpha_define_label PARAMS ((symbolS *));
#define md_cons_align(nbytes) alpha_cons_align (nbytes)
extern void alpha_cons_align PARAMS ((int));
@@ -90,3 +102,47 @@ extern void alpha_frob_file_before_adjust PARAMS ((void));
{ ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, \
{ ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
#endif
+
+/* Whether to add support for explict !relocation_op!sequence_number. At the
+ moment, only do this for ELF, though ECOFF could use it as well. */
+
+#ifdef OBJ_ELF
+#define RELOC_OP_P
+#endif
+
+#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.
+ */
+#define tc_adjust_symtab() alpha_adjust_symtab ()
+extern void alpha_adjust_symtab PARAMS ((void));
+
+/* New fields for supporting explicit relocations (such as !literal to mark
+ where a pointer is loaded from the global table, and !lituse_base to track
+ all of the normal uses of that pointer). */
+
+#define TC_FIX_TYPE struct alpha_fix_tag
+
+struct alpha_fix_tag
+{
+ struct fix *next_lituse; /* next !lituse */
+ struct alpha_literal_tag *info; /* other members with same sequence */
+};
+
+/* Initialize the TC_FIX_TYPE field. */
+#define TC_INIT_FIX_DATA(fixP) \
+do { \
+ fixP->tc_fix_data.next_lituse = (struct fix *)0; \
+ fixP->tc_fix_data.info = (struct alpha_literal_tag *)0; \
+} while (0)
+
+/* Work with DEBUG5 to print fields in tc_fix_type. */
+#define TC_FIX_DATA_PRINT(stream,fixP) \
+do { \
+ if (fixP->tc_fix_data.info) \
+ fprintf (stderr, "\tinfo = 0x%lx, next_lituse = 0x%lx\n", \
+ (long)fixP->tc_fix_data.info, \
+ (long)fixP->tc_fix_data.next_lituse); \
+} while (0)
+#endif
diff --git a/contrib/binutils/gas/config/tc-arc.c b/contrib/binutils/gas/config/tc-arc.c
index 6fed5c6..3aafea3 100644
--- a/contrib/binutils/gas/config/tc-arc.c
+++ b/contrib/binutils/gas/config/tc-arc.c
@@ -1,5 +1,5 @@
/* tc-arc.c -- Assembler for the ARC
- Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
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 <stdio.h>
#include <ctype.h>
@@ -133,10 +134,10 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf (stream, "\
+ fprintf (stream, _("\
ARC options:\n\
-EB generate big endian output\n\
--EL generate little endian output\n");
+-EL generate little endian output\n"));
}
/* This function is called once, at assembler startup time. It should
@@ -151,7 +152,7 @@ md_begin ()
target_big_endian = byte_order == BIG_ENDIAN;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, arc_mach_type))
- as_warn ("could not set architecture and machine");
+ as_warn (_("could not set architecture and machine"));
/* Assume the base cpu. This call is necessary because we need to
initialize `arc_operand_map' which may be needed before we see the
@@ -171,10 +172,10 @@ init_opcode_tables (mach)
char *last;
if ((arc_suffix_hash = hash_new ()) == NULL)
- as_fatal ("virtual memory exhausted");
+ as_fatal (_("virtual memory exhausted"));
if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, mach))
- as_warn ("could not set architecture and machine");
+ as_warn (_("could not set architecture and machine"));
/* This initializes a few things in arc-opc.c that we need.
This must be called before the various arc_xxx_supported fns. */
@@ -250,7 +251,7 @@ arc_insert_operand (insn, operand, mods, reg, val, file, line)
if (test < (offsetT) min || test > (offsetT) max)
{
const char *err =
- "operand out of range (%s not between %ld and %ld)";
+ _("operand out of range (%s not between %ld and %ld)");
char buf[100];
sprint_value (buf, test);
@@ -385,7 +386,7 @@ md_assemble (str)
}
operand = arc_operands + arc_operand_map[*syn];
if (operand->fmt == 0)
- as_fatal ("unknown syntax format character `%c'", *syn);
+ as_fatal (_("unknown syntax format character `%c'"), *syn);
if (operand->flags & ARC_OPERAND_FAKE)
{
@@ -484,7 +485,7 @@ md_assemble (str)
else
{
if (num_suffixes == MAX_SUFFIXES)
- as_bad ("too many suffixes");
+ as_bad (_("too many suffixes"));
else
insn_suffixes[num_suffixes++] = suffix;
}
@@ -529,9 +530,9 @@ md_assemble (str)
input_line_pointer = hold;
if (exp.X_op == O_illegal)
- as_bad ("illegal operand");
+ as_bad (_("illegal operand"));
else if (exp.X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
else if (exp.X_op == O_constant)
{
value = exp.X_add_number;
@@ -544,7 +545,7 @@ md_assemble (str)
{
/* We need to generate a fixup for this expression. */
if (fc >= MAX_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[fc].exp = exp;
/* If this is a register constant (IE: one whose
@@ -616,7 +617,7 @@ md_assemble (str)
++str;
if (*str != '\0')
- as_bad ("junk at end of line: `%s'", str);
+ as_bad (_("junk at end of line: `%s'"), str);
/* Is there a limm value? */
limm_p = arc_opcode_limm_p (&limm);
@@ -656,9 +657,9 @@ md_assemble (str)
be legal, but let's warn the user anyway. Ditto for 8 byte
jumps with delay slots. */
if (in_delay_slot_p && limm_p)
- as_warn ("8 byte instruction in delay slot");
+ as_warn (_("8 byte instruction in delay slot"));
if (delay_slot_type != ARC_DELAY_NONE && limm_p)
- as_warn ("8 byte jump instruction with delay slot");
+ as_warn (_("8 byte jump instruction with delay slot"));
in_delay_slot_p = (delay_slot_type != ARC_DELAY_NONE) && !limm_p;
/* Warn when a conditional branch immediately follows a set of
@@ -666,7 +667,7 @@ md_assemble (str)
insn that sets the condition codes uses a limm. */
if (cond_branch_p && conditional != 0 /* 0 = "always" */
&& prev_insn_needs_cc_nop_p)
- as_warn ("conditional branch follows set of flags");
+ as_warn (_("conditional branch follows set of flags"));
prev_insn_needs_cc_nop_p = cc_set_p && !limm_p;
}
@@ -745,7 +746,7 @@ md_assemble (str)
/* Try the next entry. */
}
- as_bad ("bad instruction `%s'", start);
+ as_bad (_("bad instruction `%s'"), start);
}
/* ??? This was copied from tc-sparc.c, I think. Is it necessary? */
@@ -768,14 +769,14 @@ arc_common (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("expected comma after symbol-name");
+ as_bad (_("expected comma after symbol-name"));
ignore_rest_of_line ();
return;
}
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (".COMMon length (%d.) <0! Ignored.", temp);
+ as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -785,7 +786,7 @@ arc_common (ignore)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("ignoring attempt to re-define symbol");
+ as_bad (_("ignoring attempt to re-define symbol"));
ignore_rest_of_line ();
return;
}
@@ -793,14 +794,14 @@ arc_common (ignore)
{
if (S_GET_VALUE (symbolP) != size)
{
- as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."),
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
}
}
- assert (symbolP->sy_frag == &zero_address_frag);
+ assert (symbol_get_frag (symbolP) == &zero_address_frag);
if (*input_line_pointer != ',')
{
- as_bad ("expected comma after common length");
+ as_bad (_("expected comma after common length"));
ignore_rest_of_line ();
return;
}
@@ -812,7 +813,7 @@ arc_common (ignore)
if (temp < 0)
{
temp = 0;
- as_warn ("Common alignment negative; 0 assumed");
+ as_warn (_("Common alignment negative; 0 assumed"));
}
if (symbolP->local)
{
@@ -830,8 +831,8 @@ arc_common (ignore)
if (align)
frag_align (align, 0, 0);
if (S_GET_SEGMENT (symbolP) == bss_section)
- symbolP->sy_frag->fr_symbol = 0;
- symbolP->sy_frag = frag_now;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
+ symbol_set_frag (symbolP, frag_now);
p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *) 0);
*p = 0;
@@ -872,7 +873,7 @@ arc_common (ignore)
p++;
c = *p;
*p = '\0';
- as_bad ("bad .common segment %s", input_line_pointer + 1);
+ as_bad (_("bad .common segment %s"), input_line_pointer + 1);
*p = c;
input_line_pointer = p;
ignore_rest_of_line ();
@@ -893,7 +894,7 @@ arc_cpu (ignore)
/* If an instruction has already been seen, it's too late. */
if (cpu_tables_init_p)
{
- as_bad (".cpu command must appear before any instructions");
+ as_bad (_(".cpu command must appear before any instructions"));
ignore_rest_of_line ();
return;
}
@@ -912,18 +913,18 @@ arc_cpu (ignore)
/* ??? This was a command line option early on. It's gone now, but
leave this in. */
if (mach_type_specified_p && mach != arc_mach_type)
- as_bad (".cpu conflicts with previous value");
+ as_bad (_(".cpu conflicts with previous value"));
else
{
arc_mach_type = mach;
mach_type_specified_p = 1;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, mach))
- as_warn ("could not set architecture and machine");
+ as_warn (_("could not set architecture and machine"));
}
return;
bad_cpu:
- as_bad ("bad .cpu op");
+ as_bad (_("bad .cpu op"));
ignore_rest_of_line ();
}
@@ -947,7 +948,7 @@ arc_rename (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("missing rename string");
+ as_bad (_("missing rename string"));
ignore_rest_of_line ();
return;
}
@@ -959,14 +960,14 @@ arc_rename (ignore)
if (*name == '\0')
{
*input_line_pointer = c;
- as_bad ("invalid symbol to rename to");
+ as_bad (_("invalid symbol to rename to"));
ignore_rest_of_line ();
return;
}
new = (char *) xmalloc (strlen (name) + 1);
strcpy (new, name);
*input_line_pointer = c;
- sym->sy_tc.real_name = new;
+ symbol_get_tc (sym)->real_name = new;
demand_empty_rest_of_line ();
}
@@ -1006,7 +1007,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -1093,7 +1094,7 @@ md_operand (expressionP)
expression (expressionP);
if (*input_line_pointer != ')')
{
- as_bad ("missing ')' in %-op");
+ as_bad (_("missing ')' in %-op"));
return;
}
++input_line_pointer;
@@ -1127,7 +1128,7 @@ md_operand (expressionP)
}
else
{
- as_bad ("expression too complex for %%st");
+ as_bad (_("expression too complex for %%st"));
return;
}
}
@@ -1241,13 +1242,13 @@ get_arc_exp_reloc_type (data_p, default_type, exp, expnew)
if (exp->X_op == O_right_shift
&& exp->X_op_symbol != NULL
- && exp->X_op_symbol->sy_value.X_op == O_constant
- && exp->X_op_symbol->sy_value.X_add_number == 2
+ && symbol_constant_p (exp->X_op_symbol)
+ && S_GET_VALUE (exp->X_op_symbol) == 2
&& exp->X_add_number == 0)
{
if (exp->X_add_symbol != NULL
- && (exp->X_add_symbol->sy_value.X_op == O_constant
- || exp->X_add_symbol->sy_value.X_op == O_symbol))
+ && (symbol_constant_p (exp->X_add_symbol)
+ || symbol_equated_p (exp->X_add_symbol)))
{
*expnew = *exp;
expnew->X_op = O_symbol;
@@ -1255,9 +1256,10 @@ get_arc_exp_reloc_type (data_p, default_type, exp, expnew)
return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
}
else if (exp->X_add_symbol != NULL
- && exp->X_add_symbol->sy_value.X_op == O_subtract)
+ && (symbol_get_value_expression (exp->X_add_symbol)->X_op
+ == O_subtract))
{
- *expnew = exp->X_add_symbol->sy_value;
+ *expnew = *symbol_get_value_expression (exp->X_add_symbol);
return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
}
}
@@ -1321,7 +1323,7 @@ md_apply_fix3 (fixP, valueP, seg)
{
/* We can't actually support subtracting a symbol. */
as_bad_where (fixP->fx_file, fixP->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
@@ -1387,7 +1389,7 @@ md_apply_fix3 (fixP, valueP, seg)
else
{
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;
}
@@ -1445,13 +1447,14 @@ tc_gen_reloc (section, fixP)
reloc = (arelent *) xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = &fixP->fx_addsy->bsym;
+ 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,
- "internal error: can't export reloc type %d (`%s')",
+ _("internal error: can't export reloc type %d (`%s')"),
fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
return NULL;
}
@@ -1473,8 +1476,8 @@ int
arc_frob_symbol (sym)
symbolS *sym;
{
- if (sym->sy_tc.real_name != (char *) NULL)
- S_SET_NAME (sym, sym->sy_tc.real_name);
+ if (symbol_get_tc (sym)->real_name != (char *) NULL)
+ S_SET_NAME (sym, symbol_get_tc (sym)->real_name);
return 0;
}
diff --git a/contrib/binutils/gas/config/tc-arc.h b/contrib/binutils/gas/config/tc-arc.h
index 6a95ff4..5066201 100644
--- a/contrib/binutils/gas/config/tc-arc.h
+++ b/contrib/binutils/gas/config/tc-arc.h
@@ -1,5 +1,5 @@
/* tc-arc.h - Macros and type defines for the ARC.
- Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
@@ -66,6 +66,6 @@ struct arc_tc_sy
#define TC_SYMFIELD_TYPE struct arc_tc_sy
/* Finish up the symbol. */
-extern int arc_frob_symbol PARAMS ((struct symbol *));
+extern int arc_frob_symbol PARAMS ((symbolS *));
#define tc_frob_symbol(sym, punt) punt = arc_frob_symbol (sym)
#endif
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
new file mode 100644
index 0000000..4779b3d
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -0,0 +1,7204 @@
+/* tc-arm.c -- Assemble for the ARM
+ 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)
+
+ 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. */
+
+#include <ctype.h>
+#include <string.h>
+#define NO_RELOC 0
+#include "as.h"
+
+/* need TARGET_CPU */
+#include "config.h"
+#include "subsegs.h"
+#include "obstack.h"
+#include "symbols.h"
+#include "listing.h"
+
+#ifdef OBJ_ELF
+#include "elf/arm.h"
+#endif
+
+/* Types of processor to assemble for. */
+#define ARM_1 0x00000001
+#define ARM_2 0x00000002
+#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_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" */
+
+/* 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_V5 (ARM_ARCH_V4 | ARM_EXT_V5)
+#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_THUMB)
+
+/* Some useful combinations: */
+#define ARM_ANY 0x00ffffff
+#define ARM_2UP (ARM_ANY - ARM_1)
+#define ARM_ALL ARM_2UP /* Not arm1 only */
+#define ARM_3UP 0x00fffffc
+#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 */
+
+
+#ifndef CPU_DEFAULT
+#if defined __thumb__
+#define CPU_DEFAULT (ARM_ARCH_V4 | ARM_THUMB)
+#else
+#define CPU_DEFAULT ARM_ALL
+#endif
+#endif
+
+#ifndef FPU_DEFAULT
+#define FPU_DEFAULT FPU_ALL
+#endif
+
+#define streq(a, b) (strcmp (a, b) == 0)
+#define skip_whitespace(str) while (* (str) == ' ') ++ (str)
+
+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;
+#endif
+
+/* 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[] = "@";
+
+/* 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
+ first line of the input file. This is because the compiler outputs
+ #NO_APP at the beginning of its output. */
+/* 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 */
+
+CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
+
+/* Prefix characters that indicate the start of an immediate
+ value. */
+#define is_immediate_prefix(C) ((C) == '#' || (C) == '$')
+
+#ifdef OBJ_ELF
+symbolS * GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+#endif
+
+CONST int md_reloc_size = 8; /* Size of relocation record */
+
+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;
+} arm_fix_data;
+
+struct arm_it
+{
+ CONST char * error;
+ unsigned long instruction;
+ int suffix;
+ int size;
+ struct
+ {
+ bfd_reloc_code_real_type type;
+ expressionS exp;
+ int pc_rel;
+ } reloc;
+};
+
+struct arm_it inst;
+
+struct asm_shift
+{
+ CONST char * template;
+ unsigned long value;
+};
+
+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}
+};
+
+#define NO_SHIFT_RESTRICT 1
+#define SHIFT_RESTRICT 0
+
+#define NUM_FLOAT_VALS 8
+
+CONST char * fp_const[] =
+{
+ "0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0", 0
+};
+
+/* Number of littlenums required to hold an extended precision number. */
+#define MAX_LITTLENUMS 6
+
+LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
+
+#define FAIL (-1)
+#define SUCCESS (0)
+
+#define SUFF_S 1
+#define SUFF_D 2
+#define SUFF_E 3
+#define SUFF_P 4
+
+#define CP_T_X 0x00008000
+#define CP_T_Y 0x00400000
+#define CP_T_Pre 0x01000000
+#define CP_T_UD 0x00800000
+#define CP_T_WB 0x00200000
+
+#define CONDS_BIT (0x00100000)
+#define LOAD_BIT (0x00100000)
+#define TRANS_BIT (0x00200000)
+
+struct asm_cond
+{
+ CONST char * template;
+ unsigned long value;
+};
+
+/* This is to save a hash look-up in the common case. */
+#define COND_ALWAYS 0xe0000000
+
+static CONST struct asm_cond conds[] =
+{
+ {"eq", 0x00000000},
+ {"ne", 0x10000000},
+ {"cs", 0x20000000}, {"hs", 0x20000000},
+ {"cc", 0x30000000}, {"ul", 0x30000000}, {"lo", 0x30000000},
+ {"mi", 0x40000000},
+ {"pl", 0x50000000},
+ {"vs", 0x60000000},
+ {"vc", 0x70000000},
+ {"hi", 0x80000000},
+ {"ls", 0x90000000},
+ {"ge", 0xa0000000},
+ {"lt", 0xb0000000},
+ {"gt", 0xc0000000},
+ {"le", 0xd0000000},
+ {"al", 0xe0000000},
+ {"nv", 0xf0000000}
+};
+
+/* Warning: If the top bit of the set_bits is set, then the standard
+ instruction bitmask is ignored, and the new bitmask is taken from
+ the set_bits: */
+struct asm_flg
+{
+ CONST char * template; /* Basic flag string */
+ unsigned long set_bits; /* Bits to set */
+};
+
+static CONST struct asm_flg s_flag[] =
+{
+ {"s", CONDS_BIT},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg ldr_flags[] =
+{
+ {"b", 0x00400000},
+ {"t", TRANS_BIT},
+ {"bt", 0x00400000 | TRANS_BIT},
+ {"h", 0x801000b0},
+ {"sh", 0x801000f0},
+ {"sb", 0x801000d0},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg str_flags[] =
+{
+ {"b", 0x00400000},
+ {"t", TRANS_BIT},
+ {"bt", 0x00400000 | TRANS_BIT},
+ {"h", 0x800000b0},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg byte_flag[] =
+{
+ {"b", 0x00400000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg cmp_flags[] =
+{
+ {"s", CONDS_BIT},
+ {"p", 0x0010f000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg ldm_flags[] =
+{
+ {"ed", 0x01800000},
+ {"fd", 0x00800000},
+ {"ea", 0x01000000},
+ {"fa", 0x08000000},
+ {"ib", 0x01800000},
+ {"ia", 0x00800000},
+ {"db", 0x01000000},
+ {"da", 0x08000000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg stm_flags[] =
+{
+ {"ed", 0x08000000},
+ {"fd", 0x01000000},
+ {"ea", 0x00800000},
+ {"fa", 0x01800000},
+ {"ib", 0x01800000},
+ {"ia", 0x00800000},
+ {"db", 0x01000000},
+ {"da", 0x08000000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg lfm_flags[] =
+{
+ {"fd", 0x00800000},
+ {"ea", 0x01000000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg sfm_flags[] =
+{
+ {"fd", 0x01000000},
+ {"ea", 0x00800000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg round_flags[] =
+{
+ {"p", 0x00000020},
+ {"m", 0x00000040},
+ {"z", 0x00000060},
+ {NULL, 0}
+};
+
+/* The implementation of the FIX instruction is broken on some assemblers,
+ in that it accepts a precision specifier as well as a rounding specifier,
+ despite the fact that this is meaningless. To be more compatible, we
+ accept it as well, though of course it does not set any bits. */
+static CONST struct asm_flg fix_flags[] =
+{
+ {"p", 0x00000020},
+ {"m", 0x00000040},
+ {"z", 0x00000060},
+ {"sp", 0x00000020},
+ {"sm", 0x00000040},
+ {"sz", 0x00000060},
+ {"dp", 0x00000020},
+ {"dm", 0x00000040},
+ {"dz", 0x00000060},
+ {"ep", 0x00000020},
+ {"em", 0x00000040},
+ {"ez", 0x00000060},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg except_flag[] =
+{
+ {"e", 0x00400000},
+ {NULL, 0}
+};
+
+static CONST struct asm_flg cplong_flag[] =
+{
+ {"l", 0x00400000},
+ {NULL, 0}
+};
+
+struct asm_psr
+{
+ CONST char * template;
+ unsigned long number;
+};
+
+#define PSR_FIELD_MASK 0x000f0000
+
+#define PSR_FLAGS 0x00080000
+#define PSR_CONTROL 0x00010000 /* Undocumented instruction, its use is discouraged by ARM */
+#define PSR_ALL 0x00090000
+
+#define CPSR_ALL 0
+#define SPSR_ALL 1
+#define CPSR_FLG 2
+#define SPSR_FLG 3
+#define CPSR_CTL 4
+#define SPSR_CTL 5
+
+static CONST struct asm_psr psrs[] =
+{
+ /* Valid <psr>'s */
+ {"cpsr", CPSR_ALL},
+ {"cpsr_all", CPSR_ALL},
+ {"spsr", SPSR_ALL},
+ {"spsr_all", SPSR_ALL},
+
+ /* Valid <psrf>'s */
+ {"cpsr_flg", CPSR_FLG},
+ {"spsr_flg", SPSR_FLG},
+
+ /* Valid <psrc>'s */
+ {"cpsr_c", CPSR_CTL},
+ {"cpsr_ctl", CPSR_CTL},
+ {"spsr_c", SPSR_CTL},
+ {"spsr_ctl", SPSR_CTL}
+};
+
+/* Functions called by parser. */
+/* 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));
+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 */
+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 */
+static void do_mul PARAMS ((char *, unsigned long));
+static void do_mla PARAMS ((char *, unsigned long));
+/* ARM 3 */
+static void do_swap PARAMS ((char *, unsigned long));
+/* ARM 6 */
+static void do_msr PARAMS ((char *, unsigned long));
+static void do_mrs PARAMS ((char *, unsigned long));
+/* ARM 7M */
+static void do_mull PARAMS ((char *, unsigned long));
+/* ARM THUMB */
+static void do_bx 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));
+static void do_fp_ctrl PARAMS ((char *, unsigned long));
+static void do_fp_ldst PARAMS ((char *, unsigned long));
+static void do_fp_ldmstm PARAMS ((char *, unsigned long));
+static void do_fp_dyadic PARAMS ((char *, unsigned long));
+static void do_fp_monadic PARAMS ((char *, unsigned long));
+static void do_fp_cmp PARAMS ((char *, unsigned long));
+static void do_fp_from_reg PARAMS ((char *, unsigned long));
+static void do_fp_to_reg PARAMS ((char *, unsigned long));
+
+static void fix_new_arm PARAMS ((fragS *, int, short, expressionS *, int, int));
+static int arm_reg_parse PARAMS ((char **));
+static int arm_psr_parse PARAMS ((char **));
+static void symbol_locate PARAMS ((symbolS *, CONST char *, segT, valueT, fragS *));
+static int add_to_lit_pool PARAMS ((void));
+static unsigned validate_immediate PARAMS ((unsigned));
+static unsigned validate_immediate_twopart PARAMS ((unsigned int, unsigned int *));
+static int validate_offset_imm PARAMS ((unsigned int, int));
+static void opcode_select PARAMS ((int));
+static void end_of_line PARAMS ((char *));
+static int reg_required_here PARAMS ((char **, int));
+static int psr_required_here PARAMS ((char **, int, int));
+static int co_proc_number PARAMS ((char **));
+static int cp_opc_expr PARAMS ((char **, int, int));
+static int cp_reg_required_here PARAMS ((char **, int));
+static int fp_reg_required_here PARAMS ((char **, int));
+static int cp_address_offset PARAMS ((char **));
+static int cp_address_required_here PARAMS ((char **));
+static int my_get_float_expression PARAMS ((char **));
+static int skip_past_comma PARAMS ((char **));
+static int walk_no_bignums PARAMS ((symbolS *));
+static int negate_data_op PARAMS ((unsigned long *, unsigned long));
+static int data_op2 PARAMS ((char **));
+static int fp_op2 PARAMS ((char **));
+static long reg_list PARAMS ((char **));
+static void thumb_load_store PARAMS ((char *, int, int));
+static int decode_shift PARAMS ((char **, int));
+static int ldst_extend PARAMS ((char **, int));
+static void thumb_add_sub PARAMS ((char *, int));
+static void insert_reg PARAMS ((int));
+static void thumb_shift PARAMS ((char *, int));
+static void thumb_mov_compare PARAMS ((char *, int));
+static void set_constant_flonums PARAMS ((void));
+static valueT md_chars_to_number PARAMS ((char *, int));
+static void insert_reg_alias PARAMS ((char *, int));
+static void output_inst PARAMS ((void));
+#ifdef OBJ_ELF
+static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
+#endif
+
+/* ARM instructions take 4bytes in the object file, Thumb instructions
+ take 2: */
+#define INSN_SIZE 4
+
+/* LONGEST_INST is the longest basic instruction name without conditions or
+ flags. ARM7M has 4 of length 5. */
+
+#define LONGEST_INST 5
+
+
+struct asm_opcode
+{
+ CONST char * template; /* Basic string to match */
+ unsigned long value; /* Basic instruction code */
+
+ /* Compulsory suffix that must follow conds. If "", then the
+ instruction is not conditional and must have no suffix. */
+ CONST char * comp_suffix;
+
+ 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));
+};
+
+static CONST struct asm_opcode insns[] =
+{
+/* 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},
+ {"rsb", 0x00600000, NULL, s_flag, ARM_ANY, do_arit},
+ {"add", 0x00800000, NULL, s_flag, ARM_ANY, do_arit},
+ {"adc", 0x00a00000, NULL, s_flag, ARM_ANY, do_arit},
+ {"sbc", 0x00c00000, NULL, s_flag, ARM_ANY, do_arit},
+ {"rsc", 0x00e00000, NULL, s_flag, ARM_ANY, do_arit},
+ {"orr", 0x01800000, NULL, s_flag, ARM_ANY, do_arit},
+ {"bic", 0x01c00000, NULL, s_flag, ARM_ANY, do_arit},
+ {"tst", 0x01000000, NULL, cmp_flags, ARM_ANY, do_cmp},
+ {"teq", 0x01200000, NULL, cmp_flags, ARM_ANY, do_cmp},
+ {"cmp", 0x01400000, NULL, cmp_flags, ARM_ANY, do_cmp},
+ {"cmn", 0x01600000, NULL, cmp_flags, ARM_ANY, do_cmp},
+ {"mov", 0x01a00000, NULL, s_flag, ARM_ANY, do_mov},
+ {"mvn", 0x01e00000, NULL, s_flag, ARM_ANY, do_mov},
+ {"str", 0x04000000, NULL, str_flags, ARM_ANY, do_ldst},
+ {"ldr", 0x04100000, NULL, ldr_flags, ARM_ANY, do_ldst},
+ {"stm", 0x08000000, NULL, stm_flags, ARM_ANY, do_ldmstm},
+ {"ldm", 0x08100000, NULL, ldm_flags, ARM_ANY, do_ldmstm},
+ {"swi", 0x0f000000, NULL, NULL, ARM_ANY, do_swi},
+#ifdef TE_WINCE
+ {"bl", 0x0b000000, NULL, NULL, ARM_ANY, do_branch},
+ {"b", 0x0a000000, NULL, NULL, ARM_ANY, do_branch},
+#else
+ {"bl", 0x0bfffffe, NULL, NULL, ARM_ANY, do_branch},
+ {"b", 0x0afffffe, NULL, NULL, ARM_ANY, do_branch},
+#endif
+
+/* 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 */
+ {"mul", 0x00000090, NULL, s_flag, ARM_2UP, do_mul},
+ {"mla", 0x00200090, NULL, s_flag, ARM_2UP, do_mla},
+
+/* ARM 3 - swp instructions */
+ {"swp", 0x01000090, NULL, byte_flag, ARM_3UP, do_swap},
+
+/* 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 and 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 THUMB interworking */
+ {"bx", 0x012fff10, NULL, NULL, ARM_THUMB, do_bx},
+
+/* 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},
+ {"rfc", 0x0e500110, NULL, NULL, FPU_ALL, do_fp_ctrl},
+ {"ldf", 0x0c100100, "sdep", NULL, FPU_ALL, do_fp_ldst},
+ {"stf", 0x0c000100, "sdep", NULL, FPU_ALL, do_fp_ldst},
+ {"lfm", 0x0c100200, NULL, lfm_flags, FPU_MEMMULTI, do_fp_ldmstm},
+ {"sfm", 0x0c000200, NULL, sfm_flags, FPU_MEMMULTI, do_fp_ldmstm},
+ {"mvf", 0x0e008100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"mnf", 0x0e108100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"abs", 0x0e208100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"rnd", 0x0e308100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"sqt", 0x0e408100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"log", 0x0e508100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"lgn", 0x0e608100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"exp", 0x0e708100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"sin", 0x0e808100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"cos", 0x0e908100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"tan", 0x0ea08100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"asn", 0x0eb08100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"acs", 0x0ec08100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"atn", 0x0ed08100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"urd", 0x0ee08100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"nrm", 0x0ef08100, "sde", round_flags, FPU_ALL, do_fp_monadic},
+ {"adf", 0x0e000100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"suf", 0x0e200100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"rsf", 0x0e300100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"muf", 0x0e100100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"dvf", 0x0e400100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"rdf", 0x0e500100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"pow", 0x0e600100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"rpw", 0x0e700100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"rmf", 0x0e800100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"fml", 0x0e900100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"fdv", 0x0ea00100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"frd", 0x0eb00100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"pol", 0x0ec00100, "sde", round_flags, FPU_ALL, do_fp_dyadic},
+ {"cmf", 0x0e90f110, NULL, except_flag, FPU_ALL, do_fp_cmp},
+ {"cnf", 0x0eb0f110, NULL, except_flag, FPU_ALL, do_fp_cmp},
+/* The FPA10 data sheet suggests that the 'E' of cmfe/cnfe should not
+ be an optional suffix, but part of the instruction. To be compatible,
+ we accept either. */
+ {"cmfe", 0x0ed0f110, NULL, NULL, FPU_ALL, do_fp_cmp},
+ {"cnfe", 0x0ef0f110, NULL, NULL, FPU_ALL, do_fp_cmp},
+ {"flt", 0x0e000110, "sde", round_flags, FPU_ALL, do_fp_from_reg},
+ {"fix", 0x0e100110, NULL, fix_flags, FPU_ALL, do_fp_to_reg},
+
+/* Generic copressor instructions. */
+ {"cdp", 0x0e000000, NULL, NULL, ARM_2UP, do_cdp},
+ {"ldc", 0x0c100000, NULL, cplong_flag, ARM_2UP, do_lstc},
+ {"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},
+};
+
+/* Defines for various bits that we will want to toggle. */
+#define INST_IMMEDIATE 0x02000000
+#define OFFSET_REG 0x02000000
+#define HWOFFSET_IMM 0x00400000
+#define SHIFT_BY_REG 0x00000010
+#define PRE_INDEX 0x01000000
+#define INDEX_UP 0x00800000
+#define WRITE_BACK 0x00200000
+#define LDM_TYPE_2_OR_3 0x00400000
+
+#define LITERAL_MASK 0xf000f000
+#define COND_MASK 0xf0000000
+#define OPCODE_MASK 0xfe1fffff
+#define DATA_OP_SHIFT 21
+
+/* Codes to distinguish the arithmetic instructions. */
+#define OPCODE_AND 0
+#define OPCODE_EOR 1
+#define OPCODE_SUB 2
+#define OPCODE_RSB 3
+#define OPCODE_ADD 4
+#define OPCODE_ADC 5
+#define OPCODE_SBC 6
+#define OPCODE_RSC 7
+#define OPCODE_TST 8
+#define OPCODE_TEQ 9
+#define OPCODE_CMP 10
+#define OPCODE_CMN 11
+#define OPCODE_ORR 12
+#define OPCODE_MOV 13
+#define OPCODE_BIC 14
+#define OPCODE_MVN 15
+
+static void do_t_nop PARAMS ((char *));
+static void do_t_arit PARAMS ((char *));
+static void do_t_add PARAMS ((char *));
+static void do_t_asr PARAMS ((char *));
+static void do_t_branch9 PARAMS ((char *));
+static void do_t_branch12 PARAMS ((char *));
+static void do_t_branch23 PARAMS ((char *));
+static void do_t_bx PARAMS ((char *));
+static void do_t_compare PARAMS ((char *));
+static void do_t_ldmstm PARAMS ((char *));
+static void do_t_ldr PARAMS ((char *));
+static void do_t_ldrb PARAMS ((char *));
+static void do_t_ldrh PARAMS ((char *));
+static void do_t_lds PARAMS ((char *));
+static void do_t_lsl PARAMS ((char *));
+static void do_t_lsr PARAMS ((char *));
+static void do_t_mov PARAMS ((char *));
+static void do_t_push_pop PARAMS ((char *));
+static void do_t_str PARAMS ((char *));
+static void do_t_strb PARAMS ((char *));
+static void do_t_strh PARAMS ((char *));
+static void do_t_sub PARAMS ((char *));
+static void do_t_swi PARAMS ((char *));
+static void do_t_adr PARAMS ((char *));
+
+#define T_OPCODE_MUL 0x4340
+#define T_OPCODE_TST 0x4200
+#define T_OPCODE_CMN 0x42c0
+#define T_OPCODE_NEG 0x4240
+#define T_OPCODE_MVN 0x43c0
+
+#define T_OPCODE_ADD_R3 0x1800
+#define T_OPCODE_SUB_R3 0x1a00
+#define T_OPCODE_ADD_HI 0x4400
+#define T_OPCODE_ADD_ST 0xb000
+#define T_OPCODE_SUB_ST 0xb080
+#define T_OPCODE_ADD_SP 0xa800
+#define T_OPCODE_ADD_PC 0xa000
+#define T_OPCODE_ADD_I8 0x3000
+#define T_OPCODE_SUB_I8 0x3800
+#define T_OPCODE_ADD_I3 0x1c00
+#define T_OPCODE_SUB_I3 0x1e00
+
+#define T_OPCODE_ASR_R 0x4100
+#define T_OPCODE_LSL_R 0x4080
+#define T_OPCODE_LSR_R 0x40c0
+#define T_OPCODE_ASR_I 0x1000
+#define T_OPCODE_LSL_I 0x0000
+#define T_OPCODE_LSR_I 0x0800
+
+#define T_OPCODE_MOV_I8 0x2000
+#define T_OPCODE_CMP_I8 0x2800
+#define T_OPCODE_CMP_LR 0x4280
+#define T_OPCODE_MOV_HR 0x4600
+#define T_OPCODE_CMP_HR 0x4500
+
+#define T_OPCODE_LDR_PC 0x4800
+#define T_OPCODE_LDR_SP 0x9800
+#define T_OPCODE_STR_SP 0x9000
+#define T_OPCODE_LDR_IW 0x6800
+#define T_OPCODE_STR_IW 0x6000
+#define T_OPCODE_LDR_IH 0x8800
+#define T_OPCODE_STR_IH 0x8000
+#define T_OPCODE_LDR_IB 0x7800
+#define T_OPCODE_STR_IB 0x7000
+#define T_OPCODE_LDR_RW 0x5800
+#define T_OPCODE_STR_RW 0x5000
+#define T_OPCODE_LDR_RH 0x5a00
+#define T_OPCODE_STR_RH 0x5200
+#define T_OPCODE_LDR_RB 0x5c00
+#define T_OPCODE_STR_RB 0x5400
+
+#define T_OPCODE_PUSH 0xb400
+#define T_OPCODE_POP 0xbc00
+
+#define T_OPCODE_BRANCH 0xe7fe
+
+static int thumb_reg PARAMS ((char ** str, int hi_lo));
+
+#define THUMB_SIZE 2 /* Size of thumb instruction. */
+#define THUMB_REG_LO 0x1
+#define THUMB_REG_HI 0x2
+#define THUMB_REG_ANY 0x3
+
+#define THUMB_H1 0x0080
+#define THUMB_H2 0x0040
+
+#define THUMB_ASR 0
+#define THUMB_LSL 1
+#define THUMB_LSR 2
+
+#define THUMB_MOVE 0
+#define THUMB_COMPARE 1
+
+#define THUMB_LOAD 0
+#define THUMB_STORE 1
+
+#define THUMB_PP_PC_LR 0x0100
+
+/* These three are used for immediate shifts, do not alter. */
+#define THUMB_WORD 2
+#define THUMB_HALFWORD 1
+#define THUMB_BYTE 0
+
+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 */
+};
+
+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 */
+};
+
+struct reg_entry
+{
+ CONST char * name;
+ int number;
+};
+
+#define int_register(reg) ((reg) >= 0 && (reg) <= 15)
+#define cp_register(reg) ((reg) >= 32 && (reg) <= 47)
+#define fp_register(reg) ((reg) >= 16 && (reg) <= 23)
+
+#define REG_PC 15
+#define REG_LR 14
+#define REG_SP 13
+
+/* These are the standard names. Users can add aliases with .req */
+static CONST struct reg_entry reg_table[] =
+{
+ /* Processor Register Numbers. */
+ {"r0", 0}, {"r1", 1}, {"r2", 2}, {"r3", 3},
+ {"r4", 4}, {"r5", 5}, {"r6", 6}, {"r7", 7},
+ {"r8", 8}, {"r9", 9}, {"r10", 10}, {"r11", 11},
+ {"r12", 12}, {"r13", REG_SP},{"r14", REG_LR},{"r15", REG_PC},
+ /* APCS conventions. */
+ {"a1", 0}, {"a2", 1}, {"a3", 2}, {"a4", 3},
+ {"v1", 4}, {"v2", 5}, {"v3", 6}, {"v4", 7}, {"v5", 8},
+ {"v6", 9}, {"sb", 9}, {"v7", 10}, {"sl", 10},
+ {"fp", 11}, {"ip", 12}, {"sp", REG_SP},{"lr", REG_LR},{"pc", REG_PC},
+ /* ATPCS additions to APCS conventions. */
+ {"wr", 7}, {"v8", 11},
+ /* FP Registers. */
+ {"f0", 16}, {"f1", 17}, {"f2", 18}, {"f3", 19},
+ {"f4", 20}, {"f5", 21}, {"f6", 22}, {"f7", 23},
+ {"c0", 32}, {"c1", 33}, {"c2", 34}, {"c3", 35},
+ {"c4", 36}, {"c5", 37}, {"c6", 38}, {"c7", 39},
+ {"c8", 40}, {"c9", 41}, {"c10", 42}, {"c11", 43},
+ {"c12", 44}, {"c13", 45}, {"c14", 46}, {"c15", 47},
+ {"cr0", 32}, {"cr1", 33}, {"cr2", 34}, {"cr3", 35},
+ {"cr4", 36}, {"cr5", 37}, {"cr6", 38}, {"cr7", 39},
+ {"cr8", 40}, {"cr9", 41}, {"cr10", 42}, {"cr11", 43},
+ {"cr12", 44}, {"cr13", 45}, {"cr14", 46}, {"cr15", 47},
+ /* ATPCS additions to float register names. */
+ {"s0",16}, {"s1",17}, {"s2",18}, {"s3",19},
+ {"s4",20}, {"s5",21}, {"s6",22}, {"s7",23},
+ {"d0",16}, {"d1",17}, {"d2",18}, {"d3",19},
+ {"d4",20}, {"d5",21}, {"d6",22}, {"d7",23},
+ /* FIXME: At some point we need to add VFP register names. */
+ /* Array terminator. */
+ {NULL, 0}
+};
+
+#define BAD_ARGS _("Bad arguments to instruction")
+#define BAD_PC _("r15 not allowed here")
+#define BAD_FLAGS _("Instruction should not have flags")
+#define BAD_COND _("Instruction is not conditional")
+
+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;
+
+/* 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. */
+
+static void s_req PARAMS ((int));
+static void s_align PARAMS ((int));
+static void s_bss PARAMS ((int));
+static void s_even PARAMS ((int));
+static void s_ltorg PARAMS ((int));
+static void s_arm PARAMS ((int));
+static void s_thumb PARAMS ((int));
+static void s_code PARAMS ((int));
+static void s_force_thumb PARAMS ((int));
+static void s_thumb_func PARAMS ((int));
+static void s_thumb_set PARAMS ((int));
+static void arm_s_text PARAMS ((int));
+static void arm_s_data PARAMS ((int));
+#ifdef OBJ_ELF
+static void arm_s_section PARAMS ((int));
+static void s_arm_elf_cons PARAMS ((int));
+#endif
+
+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 */
+ { "bss", s_bss, 0 },
+ { "align", s_align, 0 },
+ { "arm", s_arm, 0 },
+ { "thumb", s_thumb, 0 },
+ { "code", s_code, 0 },
+ { "force_thumb", s_force_thumb, 0 },
+ { "thumb_func", s_thumb_func, 0 },
+ { "thumb_set", s_thumb_set, 0 },
+ { "even", s_even, 0 },
+ { "ltorg", s_ltorg, 0 },
+ { "pool", s_ltorg, 0 },
+ /* Allow for the effect of section changes. */
+ { "text", arm_s_text, 0 },
+ { "data", arm_s_data, 0 },
+#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 },
+#else
+ { "word", cons, 4},
+#endif
+ { "extend", float_cons, 'x' },
+ { "ldouble", float_cons, 'x' },
+ { "packed", float_cons, 'p' },
+ { 0, 0, 0 }
+};
+
+/* Stuff needed to resolve the label ambiguity
+ As:
+ ...
+ label: <insn>
+ may differ from:
+ ...
+ label:
+ <insn>
+*/
+
+symbolS * last_label_seen;
+static int label_is_thumb_function_name = false;
+
+/* Literal stuff */
+
+#define MAX_LITERAL_POOL_SIZE 1024
+
+typedef struct literalS
+{
+ 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 */
+symbolS * current_poolP = NULL;
+
+static int
+add_to_lit_pool ()
+{
+ int lit_count = 0;
+
+ if (current_poolP == NULL)
+ current_poolP = symbol_create (FAKE_LABEL_NAME, undefined_section,
+ (valueT) 0, &zero_address_frag);
+
+ /* Check if this literal value is already in the 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;
+ lit_count++;
+ }
+
+ 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;
+ }
+
+ literals[next_literal_pool_place].exp = inst.reloc.exp;
+ lit_count = next_literal_pool_place++;
+ }
+
+ inst.reloc.exp.X_op = O_symbol;
+ inst.reloc.exp.X_add_number = (lit_count) * 4 - 8;
+ inst.reloc.exp.X_add_symbol = current_poolP;
+
+ 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_<something>) */
+ 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 */
+ obstack_grow (&notes, name, name_length);
+ preserved_copy_of_name = obstack_finish (&notes);
+#ifdef STRIP_UNDERSCORE
+ if (preserved_copy_of_name[0] == '_')
+ preserved_copy_of_name++;
+#endif
+
+#ifdef tc_canonicalize_symbol_name
+ preserved_copy_of_name =
+ tc_canonicalize_symbol_name (preserved_copy_of_name);
+#endif
+
+ S_SET_NAME (symbolP, preserved_copy_of_name);
+
+ S_SET_SEGMENT (symbolP, segment);
+ S_SET_VALUE (symbolP, valu);
+ symbol_clear_list_pointers(symbolP);
+
+ symbol_set_frag (symbolP, frag);
+
+ /* Link to end of symbol chain. */
+ {
+ extern int symbol_table_frozen;
+ if (symbol_table_frozen)
+ abort ();
+ }
+
+ symbol_append (symbolP, symbol_lastP, & symbol_rootP, & symbol_lastP);
+
+ obj_symbol_new_hook (symbolP);
+
+#ifdef tc_symbol_new_hook
+ tc_symbol_new_hook (symbolP);
+#endif
+
+#ifdef DEBUG_SYMS
+ verify_symbol_chain (symbol_rootP, symbol_lastP);
+#endif /* DEBUG_SYMS */
+}
+
+/* Check that an immediate is valid, and 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 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 * highpart;
+{
+ unsigned int a;
+ unsigned int i;
+
+ for (i = 0; i < 32; i += 2)
+ if (((a = rotate_left (val, i)) & 0xff) != 0)
+ {
+ if (a & 0xff00)
+ {
+ if (a & ~ 0xffff)
+ continue;
+ * highpart = (a >> 8) | ((i + 24) << 7);
+ }
+ else if (a & 0xff0000)
+ {
+ 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;
+}
+
+static int
+validate_offset_imm (val, hwse)
+ unsigned int val;
+ int hwse;
+{
+ if ((hwse && val > 255) || val > 4095)
+ return FAIL;
+ return val;
+}
+
+
+static void
+s_req (a)
+ int a ATTRIBUTE_UNUSED;
+{
+ as_bad (_("Invalid syntax for .req directive."));
+}
+
+static void
+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?.. */
+ subseg_set (bss_section, 0);
+ demand_empty_rest_of_line ();
+}
+
+static void
+s_even (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ if (!need_pass_2) /* Never make frag if expect extra pass. */
+ frag_align (1, 0, 0);
+
+ record_alignment (now_seg, 1);
+
+ demand_empty_rest_of_line ();
+}
+
+static void
+s_ltorg (ignored)
+ int ignored ATTRIBUTE_UNUSED;
+{
+ int lit_count = 0;
+ char sym_name[20];
+
+ if (current_poolP == NULL)
+ return;
+
+ /* Align pool as you have word accesses */
+ /* Only make a frag if we have to ... */
+ if (!need_pass_2)
+ frag_align (2, 0, 0);
+
+ record_alignment (now_seg, 2);
+
+ sprintf (sym_name, "$$lit_\002%x", lit_pool_num++);
+
+ symbol_locate (current_poolP, sym_name, now_seg,
+ (valueT) frag_now_fix (), frag_now);
+ 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 */
+
+ next_literal_pool_place = 0;
+ current_poolP = NULL;
+}
+
+static void
+s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */
+ int unused ATTRIBUTE_UNUSED;
+{
+ register int temp;
+ register long temp_fill;
+ long max_alignment = 15;
+
+ temp = get_absolute_expression ();
+ if (temp > max_alignment)
+ as_bad (_("Alignment too large: %d. assumed."), temp = max_alignment);
+ else if (temp < 0)
+ {
+ as_bad (_("Alignment negative. 0 assumed."));
+ temp = 0;
+ }
+
+ if (*input_line_pointer == ',')
+ {
+ input_line_pointer++;
+ temp_fill = get_absolute_expression ();
+ }
+ else
+ temp_fill = 0;
+
+ if (!temp)
+ temp = 2;
+
+ /* 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 ();
+
+ record_alignment (now_seg, temp);
+}
+
+static void
+s_force_thumb (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ /* If we are not already in thumb mode go into it, EVEN if
+ the target processor does not support thumb instructions.
+ 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 ();
+}
+
+static void
+s_thumb_func (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ /* 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 ();
+}
+
+/* Perform a .set directive, but also mark the alias as
+ being a thumb function. */
+
+static void
+s_thumb_set (equiv)
+ int equiv;
+{
+ /* XXX the following is a duplicate of the code for s_set() in read.c
+ We cannot just call that code as we need to get at the symbol that
+ is created. */
+ register char * name;
+ register char delim;
+ 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.
+ */
+ name = input_line_pointer;
+ delim = get_symbol_end ();
+ end_name = input_line_pointer;
+ *end_name = delim;
+
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer != ',')
+ {
+ *end_name = 0;
+ as_bad (_("Expected comma after name \"%s\""), name);
+ *end_name = delim;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ input_line_pointer++;
+ *end_name = 0;
+
+ if (name[0] == '.' && name[1] == '\0')
+ {
+ /* XXX - this should not happen to .thumb_set */
+ abort ();
+ }
+
+ if ((symbolP = symbol_find (name)) == NULL
+ && (symbolP = md_undefined_symbol (name)) == NULL)
+ {
+#ifndef NO_LISTING
+ /* When doing symbol listings, play games with dummy fragments living
+ outside the normal fragment chain to record the file and line info
+ for this symbol. */
+ if (listing & LISTING_SYMBOLS)
+ {
+ extern struct list_info_struct * listing_tail;
+ 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);
+ dummy_frag->fr_symbol = symbolP;
+ }
+ else
+#endif
+ symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+
+#ifdef OBJ_COFF
+ /* "set" symbols are local unless otherwise specified. */
+ SF_SET_LOCAL (symbolP);
+#endif /* OBJ_COFF */
+ } /* make a new symbol */
+
+ symbol_table_insert (symbolP);
+
+ * end_name = delim;
+
+ if (equiv
+ && S_IS_DEFINED (symbolP)
+ && S_GET_SEGMENT (symbolP) != reg_section)
+ 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
+ ARM_SET_INTERWORK (symbolP, support_interwork);
+#endif
+}
+
+/* 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
+ s_text (ignore);
+#endif
+}
+
+static void
+arm_s_data (ignore)
+ int ignore;
+{
+ if (flag_readonly_data_in_text)
+ {
+ if (now_seg != text_section)
+ s_ltorg (0);
+ }
+ else if (now_seg != data_section)
+ s_ltorg (0);
+
+#ifdef OBJ_ELF
+ obj_elf_data (ignore);
+#else
+ s_data (ignore);
+#endif
+}
+
+#ifdef OBJ_ELF
+static void
+arm_s_section (ignore)
+ int ignore;
+{
+ s_ltorg (0);
+
+ obj_elf_section (ignore);
+}
+#endif
+
+static void
+opcode_select (width)
+ int width;
+{
+ switch (width)
+ {
+ case 16:
+ if (! thumb_mode)
+ {
+ if (! (cpu_variant & ARM_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);
+ }
+ break;
+
+ case 32:
+ if (thumb_mode)
+ {
+ if ((cpu_variant & ARM_ANY) == ARM_THUMB)
+ as_bad (_("selected processor does not support ARM opcodes"));
+ thumb_mode = 0;
+ if (!need_pass_2)
+ frag_align (2, 0, 0);
+ record_alignment (now_seg, 1);
+ }
+ break;
+
+ default:
+ as_bad (_("invalid instruction size selected (%d)"), width);
+ }
+}
+
+static void
+s_arm (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ opcode_select (32);
+ demand_empty_rest_of_line ();
+}
+
+static void
+s_thumb (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ opcode_select (16);
+ demand_empty_rest_of_line ();
+}
+
+static void
+s_code (unused)
+ int unused ATTRIBUTE_UNUSED;
+{
+ register int temp;
+
+ temp = get_absolute_expression ();
+ switch (temp)
+ {
+ case 16:
+ case 32:
+ opcode_select (temp);
+ break;
+
+ default:
+ as_bad (_("invalid operand to .code directive (%d) (expecting 16 or 32)"), temp);
+ }
+}
+
+static void
+end_of_line (str)
+ char * str;
+{
+ skip_whitespace (str);
+
+ if (* str != '\0')
+ inst.error = _("Garbage following instruction");
+}
+
+static int
+skip_past_comma (str)
+ char ** str;
+{
+ char *p = *str, c;
+ int comma = 0;
+
+ while ((c = *p) == ' ' || c == ',')
+ {
+ p++;
+ if (c == ',' && comma++)
+ return FAIL;
+ }
+
+ if (c == '\0')
+ return FAIL;
+
+ *str = p;
+ return comma ? SUCCESS : FAIL;
+}
+
+/* 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.
+ 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;
+
+ if ((reg = arm_reg_parse (str)) != FAIL && int_register (reg))
+ {
+ if (shift >= 0)
+ inst.instruction |= reg << shift;
+ return reg;
+ }
+
+ /* 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);
+ inst.error = buff;
+
+ return FAIL;
+}
+
+static int
+psr_required_here (str, cpsr, spsr)
+ char ** str;
+ int cpsr;
+ int spsr;
+{
+ int psr;
+ char * start = *str;
+ psr = arm_psr_parse (str);
+
+ if (psr == cpsr || psr == spsr)
+ {
+ if (psr == spsr)
+ inst.instruction |= 1 << 22;
+
+ return SUCCESS;
+ }
+
+ /* In the few cases where we might be able to accept something else
+ this error can be overridden. */
+ inst.error = _("<psr(f)> expected");
+
+ /* Restore the start point. */
+ *str = start;
+ return FAIL;
+}
+
+static int
+co_proc_number (str)
+ char ** str;
+{
+ int processor, pchar;
+
+ skip_whitespace (* str);
+
+ /* The data sheet seems to imply that just a number on its own is valid
+ here, but the RISC iX assembler seems to accept a prefix 'p'. We will
+ accept either. */
+ if (**str == 'p' || **str == 'P')
+ (*str)++;
+
+ pchar = *(*str)++;
+ if (pchar >= '0' && pchar <= '9')
+ {
+ processor = pchar - '0';
+ if (**str >= '0' && **str <= '9')
+ {
+ processor = processor * 10 + *(*str)++ - '0';
+ if (processor > 15)
+ {
+ inst.error = _("Illegal co-processor number");
+ return FAIL;
+ }
+ }
+ }
+ else
+ {
+ inst.error = _("Bad or missing co-processor number");
+ return FAIL;
+ }
+
+ inst.instruction |= processor << 8;
+ return SUCCESS;
+}
+
+static int
+cp_opc_expr (str, where, length)
+ char ** str;
+ int where;
+ int length;
+{
+ expressionS expr;
+
+ skip_whitespace (* str);
+
+ memset (&expr, '\0', sizeof (expr));
+
+ if (my_get_expression (&expr, str))
+ return FAIL;
+ if (expr.X_op != O_constant)
+ {
+ inst.error = _("bad or missing expression");
+ return FAIL;
+ }
+
+ if ((expr.X_add_number & ((1 << length) - 1)) != expr.X_add_number)
+ {
+ inst.error = _("immediate co-processor expression too large");
+ return FAIL;
+ }
+
+ inst.instruction |= expr.X_add_number << where;
+ return SUCCESS;
+}
+
+static int
+cp_reg_required_here (str, where)
+ char ** str;
+ int where;
+{
+ int reg;
+ char * start = *str;
+
+ if ((reg = arm_reg_parse (str)) != FAIL && cp_register (reg))
+ {
+ reg &= 15;
+ inst.instruction |= reg << where;
+ return reg;
+ }
+
+ /* In the few cases where we might be able to accept something else
+ this error can be overridden. */
+ inst.error = _("Co-processor register expected");
+
+ /* Restore the start point. */
+ *str = start;
+ return FAIL;
+}
+
+static int
+fp_reg_required_here (str, where)
+ char ** str;
+ int where;
+{
+ int reg;
+ char * start = *str;
+
+ if ((reg = arm_reg_parse (str)) != FAIL && fp_register (reg))
+ {
+ reg &= 7;
+ inst.instruction |= reg << where;
+ return reg;
+ }
+
+ /* In the few cases where we might be able to accept something else
+ this error can be overridden. */
+ inst.error = _("Floating point register expected");
+
+ /* Restore the start point. */
+ *str = start;
+ return FAIL;
+}
+
+static int
+cp_address_offset (str)
+ char ** str;
+{
+ int offset;
+
+ skip_whitespace (* str);
+
+ if (! is_immediate_prefix (**str))
+ {
+ inst.error = _("immediate expression expected");
+ return FAIL;
+ }
+
+ (*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");
+ return FAIL;
+ }
+
+ if (offset > 1023 || offset < -1023)
+ {
+ inst.error = _("offset too large");
+ return FAIL;
+ }
+
+ if (offset >= 0)
+ inst.instruction |= INDEX_UP;
+ else
+ offset = -offset;
+
+ inst.instruction |= offset >> 2;
+ }
+ else
+ inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
+
+ return SUCCESS;
+}
+
+static int
+cp_address_required_here (str)
+ char ** str;
+{
+ char * p = * str;
+ int pre_inc = 0;
+ int write_back = 0;
+
+ if (*p == '[')
+ {
+ int reg;
+
+ p++;
+ skip_whitespace (p);
+
+ if ((reg = reg_required_here (& p, 16)) == FAIL)
+ return FAIL;
+
+ skip_whitespace (p);
+
+ if (*p == ']')
+ {
+ p++;
+
+ if (skip_past_comma (& p) == SUCCESS)
+ {
+ /* [Rn], #expr */
+ write_back = WRITE_BACK;
+
+ if (reg == REG_PC)
+ {
+ inst.error = _("pc may not be used in post-increment");
+ return FAIL;
+ }
+
+ if (cp_address_offset (& p) == FAIL)
+ return FAIL;
+ }
+ else
+ pre_inc = PRE_INDEX | INDEX_UP;
+ }
+ else
+ {
+ /* '['Rn, #expr']'[!] */
+
+ if (skip_past_comma (& p) == FAIL)
+ {
+ inst.error = _("pre-indexed expression expected");
+ return FAIL;
+ }
+
+ pre_inc = PRE_INDEX;
+
+ if (cp_address_offset (& p) == FAIL)
+ return FAIL;
+
+ skip_whitespace (p);
+
+ if (*p++ != ']')
+ {
+ inst.error = _("missing ]");
+ return FAIL;
+ }
+
+ skip_whitespace (p);
+
+ if (*p == '!')
+ {
+ if (reg == REG_PC)
+ {
+ inst.error = _("pc may not be used with write-back");
+ return FAIL;
+ }
+
+ p++;
+ write_back = WRITE_BACK;
+ }
+ }
+ }
+ else
+ {
+ if (my_get_expression (&inst.reloc.exp, &p))
+ return FAIL;
+
+ inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
+ inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */
+ inst.reloc.pc_rel = 1;
+ inst.instruction |= (REG_PC << 16);
+ pre_inc = PRE_INDEX;
+ }
+
+ inst.instruction |= write_back | pre_inc;
+ *str = p;
+ return SUCCESS;
+}
+
+static void
+do_nop (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ /* Do nothing really. */
+ inst.instruction |= flags; /* This is pointless. */
+ end_of_line (str);
+ return;
+}
+
+static void
+do_mrs (str, flags)
+ char *str;
+ unsigned long flags;
+{
+ /* Only one syntax. */
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || psr_required_here (& str, CPSR_ALL, SPSR_ALL) == FAIL)
+ {
+ inst.error = _("<psr> expected");
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+/* Three possible forms: "<psr>, Rm", "<psrf>, Rm", "<psrf>, #expression". */
+static void
+do_msr (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int reg;
+
+ skip_whitespace (str);
+
+ if (psr_required_here (&str, CPSR_ALL, SPSR_ALL) == SUCCESS)
+ {
+ inst.instruction |= PSR_ALL;
+
+ /* Sytax should be "<psr>, Rm" */
+ if (skip_past_comma (&str) == FAIL
+ || (reg = reg_required_here (&str, 0)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+ }
+ else
+ {
+ if (psr_required_here (& str, CPSR_FLG, SPSR_FLG) == SUCCESS)
+ inst.instruction |= PSR_FLAGS;
+ else if (psr_required_here (& str, CPSR_CTL, SPSR_CTL) == SUCCESS)
+ inst.instruction |= PSR_CONTROL;
+ else
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* Syntax could be "<psrf>, rm", "<psrf>, #expression" */
+
+ if ((reg = reg_required_here (& str, 0)) != FAIL)
+ ;
+ /* Immediate expression. */
+ else if (is_immediate_prefix (* str))
+ {
+ str ++;
+ inst.error = NULL;
+
+ if (my_get_expression (& inst.reloc.exp, & str))
+ {
+ inst.error = _("Register or shift expression expected");
+ return;
+ }
+
+ if (inst.reloc.exp.X_add_symbol)
+ {
+ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
+ inst.reloc.pc_rel = 0;
+ }
+ else
+ {
+ unsigned value = validate_immediate (inst.reloc.exp.X_add_number);
+ if (value == (unsigned) FAIL)
+ {
+ inst.error = _("Invalid constant");
+ return;
+ }
+
+ inst.instruction |= value;
+ }
+
+ flags |= INST_IMMEDIATE;
+ }
+ else
+ {
+ inst.error = _("Error: unrecognised syntax for second argument to msr instruction");
+ return;
+ }
+ }
+
+ inst.error = NULL;
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+/* Long Multiply Parser
+ UMULL RdLo, RdHi, Rm, Rs
+ SMULL RdLo, RdHi, Rm, Rs
+ UMLAL RdLo, RdHi, Rm, Rs
+ SMLAL RdLo, RdHi, Rm, Rs
+*/
+static void
+do_mull (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rdlo, rdhi, rm, rs;
+
+ /* Only one format "rdlo, rdhi, rm, rs" */
+ skip_whitespace (str);
+
+ if ((rdlo = reg_required_here (&str, 12)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (rdhi = reg_required_here (&str, 16)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (rm = reg_required_here (&str, 0)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* 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"));
+
+ if (skip_past_comma (&str) == FAIL
+ || (rs = reg_required_here (&str, 8)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rdhi == REG_PC || rdhi == REG_PC || rdhi == REG_PC || rdhi == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_mul (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd, rm;
+
+ /* Only one format "rd, rm, rs" */
+ skip_whitespace (str);
+
+ if ((rd = reg_required_here (&str, 16)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rd == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (rm = reg_required_here (&str, 0)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rm == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ if (rm == rd)
+ as_tsktsk (_("rd and rm should be different in mul"));
+
+ if (skip_past_comma (&str) == FAIL
+ || (rm = reg_required_here (&str, 8)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rm == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_mla (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int rd, rm;
+
+ /* Only one format "rd, rm, rs, rn" */
+ skip_whitespace (str);
+
+ if ((rd = reg_required_here (&str, 16)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rd == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (rm = reg_required_here (&str, 0)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rm == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ if (rm == rd)
+ as_tsktsk (_("rd and rm should be different in mla"));
+
+ if (skip_past_comma (&str) == FAIL
+ || (rd = reg_required_here (&str, 8)) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || (rm = reg_required_here (&str, 12)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (rd == REG_PC || rm == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+/* 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 [(int)(*save_in)] || *save_in == '\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 = 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)
+ {
+ inst.error = _("bad_segment");
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 1;
+ }
+#endif
+
+ /* Get rid of any bignums now, so that we don't generate an error for which
+ we can't establish a line number later on. Big numbers are never valid
+ in instructions, which is where this routine is always called. */
+ if (ep->X_op == O_big
+ || (ep->X_add_symbol
+ && (walk_no_bignums (ep->X_add_symbol)
+ || (ep->X_op_symbol
+ && walk_no_bignums (ep->X_op_symbol)))))
+ {
+ inst.error = _("Invalid constant");
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 1;
+ }
+
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 0;
+}
+
+/* unrestrict should be one if <shift> <register> is permitted for this
+ instruction */
+
+static int
+decode_shift (str, unrestrict)
+ char ** str;
+ int unrestrict;
+{
+ struct asm_shift * shft;
+ char * p;
+ char c;
+
+ skip_whitespace (* str);
+
+ for (p = *str; isalpha (*p); p++)
+ ;
+
+ 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)
+ {
+ if (!strncmp (*str, "rrx", 3)
+ || !strncmp (*str, "RRX", 3))
+ {
+ *str = p;
+ inst.instruction |= shft->value;
+ return SUCCESS;
+ }
+
+ 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;
+
+ /* 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, or lsl #32 */
+ if (num > 32 || (num == 32 && shft->value == 0))
+ {
+ inst.error = _("Invalid immediate shift");
+ return FAIL;
+ }
+
+ /* Shifts of zero should be converted to lsl (which is zero)*/
+ if (num == 0)
+ {
+ *str = p;
+ return SUCCESS;
+ }
+
+ /* Shifts of 32 are encoded as 0, for those shifts that
+ support it. */
+ if (num == 32)
+ num = 0;
+
+ inst.instruction |= (num << 7) | shft->value;
+ *str = p;
+ return SUCCESS;
+ }
+
+ inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
+ inst.reloc.pc_rel = 0;
+ inst.instruction |= shft->value;
+ *str = p;
+ return SUCCESS;
+ }
+ else
+ {
+ inst.error = unrestrict ? _("shift requires register or #expression")
+ : _("shift requires #expression");
+ *str = p;
+ return FAIL;
+ }
+ }
+
+ inst.error = _("Shift expression expected");
+ return FAIL;
+}
+
+/* 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.
+*/
+static int
+negate_data_op (instruction, value)
+ unsigned long * instruction;
+ unsigned long value;
+{
+ int op, new_inst;
+ unsigned long negated, inverted;
+
+ negated = validate_immediate (-value);
+ inverted = validate_immediate (~value);
+
+ op = (*instruction >> DATA_OP_SHIFT) & 0xf;
+ switch (op)
+ {
+ /* First negates */
+ case OPCODE_SUB: /* ADD <-> SUB */
+ new_inst = OPCODE_ADD;
+ value = negated;
+ break;
+
+ case OPCODE_ADD:
+ new_inst = OPCODE_SUB;
+ value = negated;
+ break;
+
+ case OPCODE_CMP: /* CMP <-> CMN */
+ new_inst = OPCODE_CMN;
+ value = negated;
+ break;
+
+ case OPCODE_CMN:
+ new_inst = OPCODE_CMP;
+ value = negated;
+ break;
+
+ /* Now Inverted ops */
+ case OPCODE_MOV: /* MOV <-> MVN */
+ new_inst = OPCODE_MVN;
+ value = inverted;
+ break;
+
+ case OPCODE_MVN:
+ new_inst = OPCODE_MOV;
+ value = inverted;
+ break;
+
+ case OPCODE_AND: /* AND <-> BIC */
+ new_inst = OPCODE_BIC;
+ value = inverted;
+ break;
+
+ case OPCODE_BIC:
+ new_inst = OPCODE_AND;
+ value = inverted;
+ break;
+
+ case OPCODE_ADC: /* ADC <-> SBC */
+ new_inst = OPCODE_SBC;
+ value = inverted;
+ break;
+
+ case OPCODE_SBC:
+ new_inst = OPCODE_ADC;
+ value = inverted;
+ break;
+
+ /* We cannot do anything */
+ default:
+ return FAIL;
+ }
+
+ if (value == (unsigned) FAIL)
+ return FAIL;
+
+ *instruction &= OPCODE_MASK;
+ *instruction |= new_inst << DATA_OP_SHIFT;
+ return value;
+}
+
+static int
+data_op2 (str)
+ char ** str;
+{
+ int value;
+ expressionS expr;
+
+ skip_whitespace (* str);
+
+ if (reg_required_here (str, 0) != FAIL)
+ {
+ if (skip_past_comma (str) == SUCCESS)
+ /* Shift operation on register. */
+ return decode_shift (str, NO_SHIFT_RESTRICT);
+
+ return SUCCESS;
+ }
+ else
+ {
+ /* Immediate expression */
+ if (is_immediate_prefix (**str))
+ {
+ (*str)++;
+ inst.error = NULL;
+
+ if (my_get_expression (&inst.reloc.exp, str))
+ return FAIL;
+
+ if (inst.reloc.exp.X_add_symbol)
+ {
+ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
+ inst.reloc.pc_rel = 0;
+ }
+ else
+ {
+ if (skip_past_comma (str) == SUCCESS)
+ {
+ /* #x, y -- ie explicit rotation by Y */
+ if (my_get_expression (&expr, str))
+ return FAIL;
+
+ if (expr.X_op != O_constant)
+ {
+ inst.error = _("Constant expression expected");
+ return FAIL;
+ }
+
+ /* 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)
+ {
+ inst.error = _("Invalid constant");
+ return FAIL;
+ }
+ inst.instruction |= INST_IMMEDIATE;
+ inst.instruction |= inst.reloc.exp.X_add_number;
+ inst.instruction |= expr.X_add_number << 7;
+ return SUCCESS;
+ }
+
+ /* 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 */
+ if ((value = negate_data_op (&inst.instruction,
+ inst.reloc.exp.X_add_number))
+ == FAIL)
+ {
+ inst.error = _("Invalid constant");
+ return FAIL;
+ }
+ }
+
+ inst.instruction |= value;
+ }
+
+ inst.instruction |= INST_IMMEDIATE;
+ return SUCCESS;
+ }
+
+ (*str)++;
+ inst.error = _("Register or shift expression expected");
+ return FAIL;
+ }
+}
+
+static int
+fp_op2 (str)
+ char ** str;
+{
+ skip_whitespace (* str);
+
+ if (fp_reg_required_here (str, 0) != FAIL)
+ return SUCCESS;
+ else
+ {
+ /* Immediate expression */
+ if (*((*str)++) == '#')
+ {
+ int i;
+
+ inst.error = NULL;
+
+ skip_whitespace (* str);
+
+ /* 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++)
+ {
+ if (strncmp (*str, fp_const[i], strlen (fp_const[i])) == 0)
+ {
+ char *start = *str;
+
+ *str += strlen (fp_const[i]);
+ if (is_end_of_line[(int)**str] || **str == '\0')
+ {
+ inst.instruction |= i + 8;
+ return SUCCESS;
+ }
+ *str = start;
+ }
+ }
+
+ /* Just because we didn't get a match doesn't mean that the
+ constant isn't valid, just that it is in a format that we
+ don't automatically recognize. Try parsing it with
+ the standard expression routines. */
+ if ((i = my_get_float_expression (str)) >= 0)
+ {
+ inst.instruction |= i + 8;
+ return SUCCESS;
+ }
+
+ inst.error = _("Invalid floating point immediate expression");
+ return FAIL;
+ }
+ inst.error = _("Floating point register or immediate expression expected");
+ return FAIL;
+ }
+}
+
+static void
+do_arit (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 16) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || data_op2 (&str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_adr (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ /* This is a pseudo-op of the form "adr rd, label" to be converted
+ into a relative address of the form "add rd, pc, #label-.-8". */
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || my_get_expression (&inst.reloc.exp, &str))
+ {
+ if (!inst.error)
+ 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;
+ 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)" */
+
+ skip_whitespace (str);
+
+ if (reg_required_here (& str, 12) == FAIL
+ || skip_past_comma (& str) == FAIL
+ || my_get_expression (& inst.reloc.exp, & str))
+ {
+ if (!inst.error)
+ 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.pc_rel = 1;
+ inst.instruction |= flags;
+ inst.size = INSN_SIZE * 2;
+
+ return;
+}
+
+static void
+do_cmp (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 16) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || data_op2 (&str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ if ((flags & 0x0000f000) == 0)
+ inst.instruction |= CONDS_BIT;
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_mov (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || data_op2 (&str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static int
+ldst_extend (str, hwse)
+ char ** str;
+ int hwse;
+{
+ int add = INDEX_UP;
+
+ switch (**str)
+ {
+ case '#':
+ case '$':
+ (*str)++;
+ if (my_get_expression (& inst.reloc.exp, str))
+ return FAIL;
+
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ int value = inst.reloc.exp.X_add_number;
+
+ if ((hwse && (value < -255 || value > 255))
+ || (value < -4095 || value > 4095))
+ {
+ inst.error = _("address offset too large");
+ return FAIL;
+ }
+
+ if (value < 0)
+ {
+ value = -value;
+ 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;
+ }
+ else
+ {
+ 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 */
+ case '+':
+ (*str)++; /* and fall through */
+ default:
+ if (reg_required_here (str, 0) == FAIL)
+ return FAIL;
+
+ if (hwse)
+ inst.instruction |= add;
+ else
+ {
+ inst.instruction |= add | OFFSET_REG;
+ if (skip_past_comma (str) == SUCCESS)
+ return decode_shift (str, SHIFT_RESTRICT);
+ }
+
+ return SUCCESS;
+ }
+}
+
+static void
+do_ldst (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int halfword = 0;
+ int pre_inc = 0;
+ int conflict_reg;
+ int value;
+
+ /* 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): */
+ 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
+ = _("Processor does not support halfwords or signed bytes");
+ return;
+ }
+
+ 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)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (& str) == FAIL)
+ {
+ inst.error = _("Address expected");
+ return;
+ }
+
+ if (*str == '[')
+ {
+ int reg;
+
+ str++;
+
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 16)) == FAIL)
+ return;
+
+ /* Conflicts can occur on stores as well as loads. */
+ conflict_reg = (conflict_reg == reg);
+
+ skip_whitespace (str);
+
+ if (*str == ']')
+ {
+ str ++;
+
+ if (skip_past_comma (&str) == SUCCESS)
+ {
+ /* [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") );
+ }
+ else
+ {
+ /* [Rn] */
+ if (halfword)
+ inst.instruction |= HWOFFSET_IMM;
+
+ 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;
+ }
+
+ flags |= INDEX_UP;
+ if (! (flags & TRANS_BIT))
+ pre_inc = 1;
+ }
+ }
+ else
+ {
+ /* [Rn,...] */
+ if (skip_past_comma (&str) == FAIL)
+ {
+ inst.error = _("pre-indexed expression expected");
+ return;
+ }
+
+ pre_inc = 1;
+ if (ldst_extend (&str, halfword) == FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ 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;
+ }
+ }
+ }
+ else if (*str == '=')
+ {
+ /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */
+ str++;
+
+ skip_whitespace (str);
+
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+
+ if (inst.reloc.exp.X_op != O_constant
+ && inst.reloc.exp.X_op != O_symbol)
+ {
+ inst.error = _("Constant expression expected");
+ return;
+ }
+
+ if (inst.reloc.exp.X_op == O_constant
+ && (value = validate_immediate(inst.reloc.exp.X_add_number)) != FAIL)
+ {
+ /* 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;
+ }
+ else
+ {
+ /* Insert into literal pool */
+ if (add_to_lit_pool () == FAIL)
+ {
+ if (!inst.error)
+ 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
+ inst.reloc.type = BFD_RELOC_ARM_LITERAL;
+ inst.reloc.pc_rel = 1;
+ inst.instruction |= (REG_PC << 16);
+ pre_inc = 1;
+ }
+ }
+ else
+ {
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+
+ if (halfword)
+ {
+ inst.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
+ }
+ else
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
+#ifndef TE_WINCE
+ inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */
+#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");
+
+ inst.instruction |= flags | (pre_inc ? PRE_INDEX : 0);
+ end_of_line (str);
+ return;
+}
+
+static long
+reg_list (strp)
+ char ** strp;
+{
+ char * str = *strp;
+ long range = 0;
+ int another_range;
+
+ /* We come back here if we get ranges concatenated by '+' or '|' */
+ do
+ {
+ another_range = 0;
+
+ if (*str == '{')
+ {
+ 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");
+ return FAIL;
+ }
+
+ for (i = cur_reg + 1; i < reg; i++)
+ {
+ if (range & (1 << i))
+ as_tsktsk
+ (_("Warning: Duplicated register (r%d) in register list"),
+ i);
+ else
+ range |= 1 << i;
+ }
+ in_range = 0;
+ }
+
+ if (range & (1 << reg))
+ as_tsktsk (_("Warning: Duplicated register (r%d) in register list"),
+ reg);
+ else if (reg <= cur_reg)
+ as_tsktsk (_("Warning: Register range not in ascending order"));
+
+ range |= 1 << reg;
+ cur_reg = reg;
+ } while (skip_past_comma (&str) != FAIL
+ || (in_range = 1, *str++ == '-'));
+ str--;
+ skip_whitespace (str);
+
+ if (*str++ != '}')
+ {
+ inst.error = _("Missing `}'");
+ return FAIL;
+ }
+ }
+ else
+ {
+ expressionS expr;
+
+ if (my_get_expression (&expr, &str))
+ return FAIL;
+
+ if (expr.X_op == O_constant)
+ {
+ if (expr.X_add_number
+ != (expr.X_add_number & 0x0000ffff))
+ {
+ inst.error = _("invalid register mask");
+ return FAIL;
+ }
+
+ if ((range & expr.X_add_number) != 0)
+ {
+ int regno = range & expr.X_add_number;
+
+ regno &= -regno;
+ regno = (1 << regno) - 1;
+ as_tsktsk
+ (_("Warning: Duplicated register (r%d) in register list"),
+ regno);
+ }
+
+ range |= expr.X_add_number;
+ }
+ else
+ {
+ if (inst.reloc.type != 0)
+ {
+ inst.error = _("expression too complex");
+ return FAIL;
+ }
+
+ memcpy (&inst.reloc.exp, &expr, sizeof (expressionS));
+ inst.reloc.type = BFD_RELOC_ARM_MULTI;
+ inst.reloc.pc_rel = 0;
+ }
+ }
+
+ skip_whitespace (str);
+
+ if (*str == '|' || *str == '+')
+ {
+ str++;
+ another_range = 1;
+ }
+ } while (another_range);
+
+ *strp = str;
+ return range;
+}
+
+static void
+do_ldmstm (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int base_reg;
+ long range;
+
+ skip_whitespace (str);
+
+ if ((base_reg = reg_required_here (&str, 16)) == FAIL)
+ return;
+
+ if (base_reg == REG_PC)
+ {
+ inst.error = _("r15 not allowed as base register");
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if (*str == '!')
+ {
+ flags |= WRITE_BACK;
+ str++;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (range = reg_list (&str)) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (*str == '^')
+ {
+ str++;
+ flags |= LDM_TYPE_2_OR_3;
+ }
+
+ inst.instruction |= flags | range;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_swi (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ /* Allow optional leading '#'. */
+ if (is_immediate_prefix (*str))
+ str++;
+
+ if (my_get_expression (& inst.reloc.exp, & str))
+ return;
+
+ 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;
+ unsigned long flags;
+{
+ int reg;
+
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 12)) == FAIL)
+ return;
+
+ if (reg == REG_PC)
+ {
+ inst.error = _("r15 not allowed in swap");
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (reg = reg_required_here (&str, 0)) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (reg == REG_PC)
+ {
+ inst.error = _("r15 not allowed in swap");
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || *str++ != '[')
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 16)) == FAIL)
+ return;
+
+ if (reg == REG_PC)
+ {
+ inst.error = BAD_PC;
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_branch (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_BRANCH;
+ inst.reloc.pc_rel = 1;
+ }
+ input_line_pointer = save_in;
+ }
+#else
+ inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH;
+ inst.reloc.pc_rel = 1;
+#endif /* OBJ_ELF */
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_bx (str, flags)
+ char * str;
+ unsigned long flags ATTRIBUTE_UNUSED;
+{
+ int reg;
+
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 0)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (reg == REG_PC)
+ inst.error = BAD_PC;
+
+ end_of_line (str);
+}
+
+static void
+do_cdp (str, flags)
+ char * str;
+ unsigned long flags ATTRIBUTE_UNUSED;
+{
+ /* Co-processor data operation.
+ Format: CDP{cond} CP#,<expr>,CRd,CRn,CRm{,<expr>} */
+ 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;
+ }
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_lstc (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ /* Co-processor register load/store.
+ Format: <LDC|STC{cond}[L] CP#,CRd,<address> */
+
+ skip_whitespace (str);
+
+ if (co_proc_number (&str) == 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_address_required_here (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_co_reg (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ /* Co-processor register transfer.
+ Format: <MCR|MRC>{cond} CP#,<expr1>,Rd,CRn,CRm{,<expr2>} */
+
+ 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);
+ return;
+}
+
+static void
+do_fp_ctrl (str, flags)
+ char * str;
+ unsigned long flags ATTRIBUTE_UNUSED;
+{
+ /* FP control registers.
+ Format: <WFS|RFS|WFC|RFC>{cond} Rn */
+
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_fp_ldst (str, flags)
+ char * str;
+ unsigned long flags ATTRIBUTE_UNUSED;
+{
+ skip_whitespace (str);
+
+ switch (inst.suffix)
+ {
+ case SUFF_S:
+ break;
+ case SUFF_D:
+ inst.instruction |= CP_T_X;
+ break;
+ case SUFF_E:
+ inst.instruction |= CP_T_Y;
+ break;
+ case SUFF_P:
+ inst.instruction |= CP_T_X | CP_T_Y;
+ break;
+ default:
+ abort ();
+ }
+
+ if (fp_reg_required_here (&str, 12) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || cp_address_required_here (&str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+}
+
+static void
+do_fp_ldmstm (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ int num_regs;
+
+ skip_whitespace (str);
+
+ if (fp_reg_required_here (&str, 12) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* Get Number of registers to transfer */
+ if (skip_past_comma (&str) == FAIL
+ || my_get_expression (&inst.reloc.exp, &str))
+ {
+ if (! inst.error)
+ inst.error = _("constant expression expected");
+ return;
+ }
+
+ if (inst.reloc.exp.X_op != O_constant)
+ {
+ inst.error = _("Constant value required for number of registers");
+ return;
+ }
+
+ num_regs = inst.reloc.exp.X_add_number;
+
+ if (num_regs < 1 || num_regs > 4)
+ {
+ inst.error = _("number of registers must be in the range [1:4]");
+ return;
+ }
+
+ switch (num_regs)
+ {
+ case 1:
+ inst.instruction |= CP_T_X;
+ break;
+ case 2:
+ inst.instruction |= CP_T_Y;
+ break;
+ case 3:
+ inst.instruction |= CP_T_Y | CP_T_X;
+ break;
+ case 4:
+ break;
+ default:
+ abort ();
+ }
+
+ if (flags)
+ {
+ int reg;
+ int write_back;
+ int offset;
+
+ /* The instruction specified "ea" or "fd", so we can only accept
+ [Rn]{!}. The instruction does not really support stacking or
+ unstacking, so we have to emulate these by setting appropriate
+ bits and offsets. */
+ if (skip_past_comma (&str) == FAIL
+ || *str != '[')
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ str++;
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 16)) == FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (*str != ']')
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ str++;
+ if (*str == '!')
+ {
+ write_back = 1;
+ str++;
+ if (reg == REG_PC)
+ {
+ inst.error = _("R15 not allowed as base register with write-back");
+ return;
+ }
+ }
+ else
+ write_back = 0;
+
+ if (flags & CP_T_Pre)
+ {
+ /* Pre-decrement */
+ offset = 3 * num_regs;
+ if (write_back)
+ flags |= CP_T_WB;
+ }
+ else
+ {
+ /* Post-increment */
+ if (write_back)
+ {
+ flags |= CP_T_WB;
+ offset = 3 * num_regs;
+ }
+ else
+ {
+ /* No write-back, so convert this into a standard pre-increment
+ instruction -- aesthetically more pleasing. */
+ flags = CP_T_Pre | CP_T_UD;
+ offset = 0;
+ }
+ }
+
+ inst.instruction |= flags | offset;
+ }
+ else if (skip_past_comma (&str) == FAIL
+ || cp_address_required_here (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+}
+
+static void
+do_fp_dyadic (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ switch (inst.suffix)
+ {
+ case SUFF_S:
+ break;
+ case SUFF_D:
+ inst.instruction |= 0x00000080;
+ break;
+ case SUFF_E:
+ inst.instruction |= 0x00080000;
+ break;
+ default:
+ abort ();
+ }
+
+ if (fp_reg_required_here (&str, 12) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || fp_reg_required_here (&str, 16) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || fp_op2 (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_fp_monadic (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ switch (inst.suffix)
+ {
+ case SUFF_S:
+ break;
+ case SUFF_D:
+ inst.instruction |= 0x00000080;
+ break;
+ case SUFF_E:
+ inst.instruction |= 0x00080000;
+ break;
+ default:
+ abort ();
+ }
+
+ if (fp_reg_required_here (&str, 12) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || fp_op2 (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_fp_cmp (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (fp_reg_required_here (&str, 16) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || fp_op2 (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_fp_from_reg (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ switch (inst.suffix)
+ {
+ case SUFF_S:
+ break;
+ case SUFF_D:
+ inst.instruction |= 0x00000080;
+ break;
+ case SUFF_E:
+ inst.instruction |= 0x00080000;
+ break;
+ default:
+ abort ();
+ }
+
+ if (fp_reg_required_here (&str, 16) == 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;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_fp_to_reg (str, flags)
+ char * str;
+ unsigned long flags;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || fp_reg_required_here (&str, 0) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= flags;
+ end_of_line (str);
+ return;
+}
+
+/* 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
+ has been parsed. */
+static int
+thumb_reg (strp, hi_lo)
+ char ** strp;
+ int hi_lo;
+{
+ int reg;
+
+ if ((reg = reg_required_here (strp, -1)) == FAIL)
+ return FAIL;
+
+ switch (hi_lo)
+ {
+ case THUMB_REG_LO:
+ if (reg > 7)
+ {
+ inst.error = _("lo register required");
+ return FAIL;
+ }
+ break;
+
+ case THUMB_REG_HI:
+ if (reg < 8)
+ {
+ inst.error = _("hi register required");
+ return FAIL;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return reg;
+}
+
+/* Parse an add or subtract instruction, SUBTRACT is non-zero if the opcode
+ was SUB. */
+static void
+thumb_add_sub (str, subtract)
+ char * str;
+ int subtract;
+{
+ int Rd, Rs, Rn = FAIL;
+
+ skip_whitespace (str);
+
+ if ((Rd = thumb_reg (&str, THUMB_REG_ANY)) == FAIL
+ || skip_past_comma (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (is_immediate_prefix (*str))
+ {
+ Rs = Rd;
+ str++;
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ }
+ else
+ {
+ if ((Rs = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL)
+ {
+ /* Two operand format, shuffle the registers and pretend there
+ are 3 */
+ Rn = Rs;
+ Rs = Rd;
+ }
+ else if (is_immediate_prefix (*str))
+ {
+ str++;
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ }
+ else if ((Rn = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
+ return;
+ }
+
+ /* 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. */
+ if (Rn != FAIL)
+ {
+ /* All register format. */
+ if (Rd > 7 || Rs > 7 || Rn > 7)
+ {
+ if (Rs != Rd)
+ {
+ inst.error = _("dest and source1 must be the same register");
+ return;
+ }
+
+ /* Can't do this for SUB */
+ if (subtract)
+ {
+ inst.error = _("subtract valid only on lo regs");
+ return;
+ }
+
+ inst.instruction = (T_OPCODE_ADD_HI
+ | (Rd > 7 ? THUMB_H1 : 0)
+ | (Rn > 7 ? THUMB_H2 : 0));
+ inst.instruction |= (Rd & 7) | ((Rn & 7) << 3);
+ }
+ else
+ {
+ inst.instruction = subtract ? T_OPCODE_SUB_R3 : T_OPCODE_ADD_R3;
+ inst.instruction |= Rd | (Rs << 3) | (Rn << 6);
+ }
+ }
+ else
+ {
+ /* Immediate expression, now things start to get nasty. */
+
+ /* First deal with HI regs, only very restricted cases allowed:
+ Adjusting SP, and using PC or SP to get an address. */
+ if ((Rd > 7 && (Rd != REG_SP || Rs != REG_SP))
+ || (Rs > 7 && Rs != REG_SP && Rs != REG_PC))
+ {
+ inst.error = _("invalid Hi register with immediate");
+ return;
+ }
+
+ 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
+ work it all out. */
+ inst.instruction = (subtract ? 0x8000 : 0) | (Rd << 4) | Rs;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
+ }
+ else
+ {
+ int offset = inst.reloc.exp.X_add_number;
+
+ if (subtract)
+ offset = -offset;
+
+ if (offset < 0)
+ {
+ offset = -offset;
+ subtract = 1;
+
+ /* Quick check, in case offset is MIN_INT */
+ if (offset < 0)
+ {
+ inst.error = _("immediate value out of range");
+ return;
+ }
+ }
+ else
+ subtract = 0;
+
+ if (Rd == REG_SP)
+ {
+ if (offset & ~0x1fc)
+ {
+ inst.error = _("invalid immediate value for stack adjust");
+ return;
+ }
+ inst.instruction = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
+ inst.instruction |= offset >> 2;
+ }
+ else if (Rs == REG_PC || Rs == REG_SP)
+ {
+ if (subtract
+ || (offset & ~0x3fc))
+ {
+ inst.error = _("invalid immediate for address calculation");
+ return;
+ }
+ inst.instruction = (Rs == REG_PC ? T_OPCODE_ADD_PC
+ : T_OPCODE_ADD_SP);
+ inst.instruction |= (Rd << 8) | (offset >> 2);
+ }
+ else if (Rs == Rd)
+ {
+ if (offset & ~0xff)
+ {
+ inst.error = _("immediate value out of range");
+ return;
+ }
+ inst.instruction = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
+ inst.instruction |= (Rd << 8) | offset;
+ }
+ else
+ {
+ if (offset & ~0x7)
+ {
+ inst.error = _("immediate value out of range");
+ return;
+ }
+ inst.instruction = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
+ inst.instruction |= Rd | (Rs << 3) | (offset << 6);
+ }
+ }
+ }
+
+ end_of_line (str);
+}
+
+static void
+thumb_shift (str, shift)
+ char * str;
+ int shift;
+{
+ int Rd, Rs, Rn = FAIL;
+
+ skip_whitespace (str);
+
+ if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
+ || skip_past_comma (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (is_immediate_prefix (*str))
+ {
+ /* Two operand immediate format, set Rs to Rd. */
+ Rs = Rd;
+ str ++;
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ }
+ else
+ {
+ 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 */
+ Rn = Rs;
+ Rs = Rd;
+ }
+ else if (is_immediate_prefix (*str))
+ {
+ str++;
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ }
+ else if ((Rn = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ return;
+ }
+
+ /* 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. */
+
+ if (Rn != FAIL)
+ {
+ if (Rs != Rd)
+ {
+ inst.error = _("source1 and dest must be same register");
+ return;
+ }
+
+ switch (shift)
+ {
+ case THUMB_ASR: inst.instruction = T_OPCODE_ASR_R; break;
+ case THUMB_LSL: inst.instruction = T_OPCODE_LSL_R; break;
+ case THUMB_LSR: inst.instruction = T_OPCODE_LSR_R; break;
+ }
+
+ inst.instruction |= Rd | (Rn << 3);
+ }
+ else
+ {
+ switch (shift)
+ {
+ case THUMB_ASR: inst.instruction = T_OPCODE_ASR_I; break;
+ case THUMB_LSL: inst.instruction = T_OPCODE_LSL_I; break;
+ case THUMB_LSR: inst.instruction = T_OPCODE_LSR_I; break;
+ }
+
+ if (inst.reloc.exp.X_op != O_constant)
+ {
+ /* Value isn't known yet, create a dummy reloc and let reloc
+ hacking fix it up */
+
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT;
+ }
+ else
+ {
+ unsigned shift_value = inst.reloc.exp.X_add_number;
+
+ if (shift_value > 32 || (shift_value == 32 && shift == THUMB_LSL))
+ {
+ inst.error = _("Invalid immediate for shift");
+ return;
+ }
+
+ /* 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 */
+ if (shift_value == 32)
+ shift_value = 0;
+
+ inst.instruction |= shift_value << 6;
+ }
+
+ inst.instruction |= Rd | (Rs << 3);
+ }
+
+ end_of_line (str);
+}
+
+static void
+thumb_mov_compare (str, move)
+ char * str;
+ int move;
+{
+ int Rd, Rs = FAIL;
+
+ skip_whitespace (str);
+
+ if ((Rd = thumb_reg (&str, THUMB_REG_ANY)) == FAIL
+ || skip_past_comma (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (is_immediate_prefix (*str))
+ {
+ str++;
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ }
+ else if ((Rs = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
+ return;
+
+ if (Rs != FAIL)
+ {
+ if (Rs < 8 && Rd < 8)
+ {
+ if (move == THUMB_MOVE)
+ /* A move of two lowregs is encoded as ADD Rd, Rs, #0
+ since a MOV instruction produces unpredictable results */
+ inst.instruction = T_OPCODE_ADD_I3;
+ else
+ inst.instruction = T_OPCODE_CMP_LR;
+ inst.instruction |= Rd | (Rs << 3);
+ }
+ else
+ {
+ if (move == THUMB_MOVE)
+ inst.instruction = T_OPCODE_MOV_HR;
+ else
+ inst.instruction = T_OPCODE_CMP_HR;
+
+ if (Rd > 7)
+ inst.instruction |= THUMB_H1;
+
+ if (Rs > 7)
+ inst.instruction |= THUMB_H2;
+
+ inst.instruction |= (Rd & 7) | ((Rs & 7) << 3);
+ }
+ }
+ else
+ {
+ if (Rd > 7)
+ {
+ inst.error = _("only lo regs allowed with immediate");
+ return;
+ }
+
+ if (move == THUMB_MOVE)
+ inst.instruction = T_OPCODE_MOV_I8;
+ else
+ inst.instruction = T_OPCODE_CMP_I8;
+
+ inst.instruction |= Rd << 8;
+
+ if (inst.reloc.exp.X_op != O_constant)
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_IMM;
+ else
+ {
+ unsigned value = inst.reloc.exp.X_add_number;
+
+ if (value > 255)
+ {
+ inst.error = _("invalid immediate");
+ return;
+ }
+
+ inst.instruction |= value;
+ }
+ }
+
+ end_of_line (str);
+}
+
+static void
+thumb_load_store (str, load_store, size)
+ char * str;
+ int load_store;
+ int size;
+{
+ int Rd, Rb, Ro = FAIL;
+
+ skip_whitespace (str);
+
+ if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
+ || skip_past_comma (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (*str == '[')
+ {
+ str++;
+ if ((Rb = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) != FAIL)
+ {
+ if (is_immediate_prefix (*str))
+ {
+ str++;
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ }
+ else if ((Ro = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ return;
+ }
+ else
+ {
+ inst.reloc.exp.X_op = O_constant;
+ inst.reloc.exp.X_add_number = 0;
+ }
+
+ if (*str != ']')
+ {
+ inst.error = _("expected ']'");
+ return;
+ }
+ str++;
+ }
+ else if (*str == '=')
+ {
+ /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */
+ str++;
+
+ skip_whitespace (str);
+
+ if (my_get_expression (& inst.reloc.exp, & str))
+ return;
+
+ end_of_line (str);
+
+ if ( inst.reloc.exp.X_op != O_constant
+ && inst.reloc.exp.X_op != O_symbol)
+ {
+ inst.error = "Constant expression expected";
+ return;
+ }
+
+ if (inst.reloc.exp.X_op == O_constant
+ && ((inst.reloc.exp.X_add_number & ~0xFF) == 0))
+ {
+ /* 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;
+ }
+
+ /* Insert into literal pool */
+ if (add_to_lit_pool () == FAIL)
+ {
+ if (!inst.error)
+ 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 */
+
+ return;
+ }
+ else
+ {
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+
+ inst.instruction = T_OPCODE_LDR_PC | (Rd << 8);
+ inst.reloc.pc_rel = 1;
+ inst.reloc.exp.X_add_number -= 4; /* Pipeline offset */
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
+ end_of_line (str);
+ return;
+ }
+
+ if (Rb == REG_PC || Rb == REG_SP)
+ {
+ if (size != THUMB_WORD)
+ {
+ inst.error = _("byte or halfword not valid for base register");
+ return;
+ }
+ else if (Rb == REG_PC && load_store != THUMB_LOAD)
+ {
+ inst.error = _("R15 based store not allowed");
+ return;
+ }
+ else if (Ro != FAIL)
+ {
+ inst.error = _("Invalid base register for register offset");
+ return;
+ }
+
+ if (Rb == REG_PC)
+ inst.instruction = T_OPCODE_LDR_PC;
+ else if (load_store == THUMB_LOAD)
+ inst.instruction = T_OPCODE_LDR_SP;
+ else
+ inst.instruction = T_OPCODE_STR_SP;
+
+ inst.instruction |= Rd << 8;
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ unsigned offset = inst.reloc.exp.X_add_number;
+
+ if (offset & ~0x3fc)
+ {
+ inst.error = _("invalid offset");
+ return;
+ }
+
+ inst.instruction |= offset >> 2;
+ }
+ else
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
+ }
+ else if (Rb > 7)
+ {
+ inst.error = _("invalid base register in load/store");
+ return;
+ }
+ else if (Ro == FAIL)
+ {
+ /* Immediate offset */
+ if (size == THUMB_WORD)
+ inst.instruction = (load_store == THUMB_LOAD
+ ? T_OPCODE_LDR_IW : T_OPCODE_STR_IW);
+ else if (size == THUMB_HALFWORD)
+ inst.instruction = (load_store == THUMB_LOAD
+ ? T_OPCODE_LDR_IH : T_OPCODE_STR_IH);
+ else
+ inst.instruction = (load_store == THUMB_LOAD
+ ? T_OPCODE_LDR_IB : T_OPCODE_STR_IB);
+
+ inst.instruction |= Rd | (Rb << 3);
+
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ unsigned offset = inst.reloc.exp.X_add_number;
+
+ if (offset & ~(0x1f << size))
+ {
+ inst.error = _("Invalid offset");
+ return;
+ }
+ inst.instruction |= (offset >> size) << 6;
+ }
+ else
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
+ }
+ else
+ {
+ /* Register offset */
+ if (size == THUMB_WORD)
+ inst.instruction = (load_store == THUMB_LOAD
+ ? T_OPCODE_LDR_RW : T_OPCODE_STR_RW);
+ else if (size == THUMB_HALFWORD)
+ inst.instruction = (load_store == THUMB_LOAD
+ ? T_OPCODE_LDR_RH : T_OPCODE_STR_RH);
+ else
+ inst.instruction = (load_store == THUMB_LOAD
+ ? T_OPCODE_LDR_RB : T_OPCODE_STR_RB);
+
+ inst.instruction |= Rd | (Rb << 3) | (Ro << 6);
+ }
+
+ end_of_line (str);
+}
+
+static void
+do_t_nop (str)
+ char * str;
+{
+ /* Do nothing */
+ end_of_line (str);
+ return;
+}
+
+/* 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;
+{
+ int Rd, Rs, Rn;
+
+ skip_whitespace (str);
+
+ if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || (Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) != FAIL)
+ {
+ /* Three operand format not allowed for TST, CMN, NEG and MVN.
+ (It isn't allowed for CMP either, but that isn't handled by this
+ function.) */
+ if (inst.instruction == T_OPCODE_TST
+ || inst.instruction == T_OPCODE_CMN
+ || inst.instruction == T_OPCODE_NEG
+ || inst.instruction == T_OPCODE_MVN)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if ((Rn = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ return;
+
+ if (Rs != Rd)
+ {
+ inst.error = _("dest and source1 one must be the same register");
+ return;
+ }
+ Rs = Rn;
+ }
+
+ if (inst.instruction == T_OPCODE_MUL
+ && Rs == Rd)
+ as_tsktsk (_("Rs and Rd must be different in MUL"));
+
+ inst.instruction |= Rd | (Rs << 3);
+ end_of_line (str);
+}
+
+static void
+do_t_add (str)
+ char * str;
+{
+ thumb_add_sub (str, 0);
+}
+
+static void
+do_t_asr (str)
+ char * str;
+{
+ thumb_shift (str, THUMB_ASR);
+}
+
+static void
+do_t_branch9 (str)
+ char * str;
+{
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH9;
+ inst.reloc.pc_rel = 1;
+ end_of_line (str);
+}
+
+static void
+do_t_branch12 (str)
+ char * str;
+{
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH12;
+ inst.reloc.pc_rel = 1;
+ end_of_line (str);
+}
+
+/* Find the real, Thumb encoded start of a Thumb function. */
+
+static symbolS *
+find_real_start (symbolP)
+ symbolS * symbolP;
+{
+ char * real_start;
+ const char * name = S_GET_NAME (symbolP);
+ symbolS * new_target;
+
+ /* This definiton must agree with the one in gcc/config/arm/thumb.c */
+#define STUB_NAME ".real_start_of"
+
+ if (name == NULL)
+ 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);
+ new_target = symbolP;
+ }
+
+ free (real_start);
+
+ 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);
+
+ /* If the destination of the branch is a defined symbol which does not have
+ 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 ( inst.reloc.exp.X_op == O_symbol
+ && 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);
+}
+
+static void
+do_t_bx (str)
+ char * str;
+{
+ int reg;
+
+ skip_whitespace (str);
+
+ if ((reg = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
+ return;
+
+ /* This sets THUMB_H2 from the top bit of reg. */
+ inst.instruction |= reg << 3;
+
+ /* ??? FIXME: Should add a hacky reloc here if reg is REG_PC. The reloc
+ should cause the alignment to be checked once it is known. This is
+ because BX PC only works if the instruction is word aligned. */
+
+ end_of_line (str);
+}
+
+static void
+do_t_compare (str)
+ char * str;
+{
+ thumb_mov_compare (str, THUMB_COMPARE);
+}
+
+static void
+do_t_ldmstm (str)
+ char * str;
+{
+ int Rb;
+ long range;
+
+ skip_whitespace (str);
+
+ if ((Rb = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ return;
+
+ if (*str != '!')
+ as_warn (_("Inserted missing '!': load/store multiple always writes back base register"));
+ else
+ str++;
+
+ if (skip_past_comma (&str) == FAIL
+ || (range = reg_list (&str)) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (inst.reloc.type != BFD_RELOC_NONE)
+ {
+ /* This really doesn't seem worth it. */
+ inst.reloc.type = BFD_RELOC_NONE;
+ inst.error = _("Expression too complex");
+ return;
+ }
+
+ if (range & ~0xff)
+ {
+ inst.error = _("only lo-regs valid in load/store multiple");
+ return;
+ }
+
+ inst.instruction |= (Rb << 8) | range;
+ end_of_line (str);
+}
+
+static void
+do_t_ldr (str)
+ char * str;
+{
+ thumb_load_store (str, THUMB_LOAD, THUMB_WORD);
+}
+
+static void
+do_t_ldrb (str)
+ char * str;
+{
+ thumb_load_store (str, THUMB_LOAD, THUMB_BYTE);
+}
+
+static void
+do_t_ldrh (str)
+ char * str;
+{
+ thumb_load_store (str, THUMB_LOAD, THUMB_HALFWORD);
+}
+
+static void
+do_t_lds (str)
+ char * str;
+{
+ int Rd, Rb, Ro;
+
+ skip_whitespace (str);
+
+ if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || *str++ != '['
+ || (Rb = thumb_reg (&str, THUMB_REG_LO)) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || (Ro = thumb_reg (&str, THUMB_REG_LO)) == FAIL
+ || *str++ != ']')
+ {
+ if (! inst.error)
+ inst.error = _("Syntax: ldrs[b] Rd, [Rb, Ro]");
+ return;
+ }
+
+ inst.instruction |= Rd | (Rb << 3) | (Ro << 6);
+ end_of_line (str);
+}
+
+static void
+do_t_lsl (str)
+ char * str;
+{
+ thumb_shift (str, THUMB_LSL);
+}
+
+static void
+do_t_lsr (str)
+ char * str;
+{
+ thumb_shift (str, THUMB_LSR);
+}
+
+static void
+do_t_mov (str)
+ char * str;
+{
+ thumb_mov_compare (str, THUMB_MOVE);
+}
+
+static void
+do_t_push_pop (str)
+ char * str;
+{
+ long range;
+
+ skip_whitespace (str);
+
+ if ((range = reg_list (&str)) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (inst.reloc.type != BFD_RELOC_NONE)
+ {
+ /* This really doesn't seem worth it. */
+ inst.reloc.type = BFD_RELOC_NONE;
+ inst.error = _("Expression too complex");
+ return;
+ }
+
+ if (range & ~0xff)
+ {
+ if ((inst.instruction == T_OPCODE_PUSH
+ && (range & ~0xff) == 1 << REG_LR)
+ || (inst.instruction == T_OPCODE_POP
+ && (range & ~0xff) == 1 << REG_PC))
+ {
+ inst.instruction |= THUMB_PP_PC_LR;
+ range &= 0xff;
+ }
+ else
+ {
+ inst.error = _("invalid register list to push/pop instruction");
+ return;
+ }
+ }
+
+ inst.instruction |= range;
+ end_of_line (str);
+}
+
+static void
+do_t_str (str)
+ char * str;
+{
+ thumb_load_store (str, THUMB_STORE, THUMB_WORD);
+}
+
+static void
+do_t_strb (str)
+ char * str;
+{
+ thumb_load_store (str, THUMB_STORE, THUMB_BYTE);
+}
+
+static void
+do_t_strh (str)
+ char * str;
+{
+ thumb_load_store (str, THUMB_STORE, THUMB_HALFWORD);
+}
+
+static void
+do_t_sub (str)
+ char * str;
+{
+ thumb_add_sub (str, 1);
+}
+
+static void
+do_t_swi (str)
+ char * str;
+{
+ skip_whitespace (str);
+
+ if (my_get_expression (&inst.reloc.exp, &str))
+ return;
+
+ inst.reloc.type = BFD_RELOC_ARM_SWI;
+ end_of_line (str);
+ return;
+}
+
+static void
+do_t_adr (str)
+ char * str;
+{
+ int reg;
+
+ /* This is a pseudo-op of the form "adr rd, label" to be converted
+ into a relative address of the form "add rd, pc, #label-.-4". */
+ skip_whitespace (str);
+
+ /* Store Rd in temporary location inside instruction. */
+ if ((reg = reg_required_here (&str, 4)) == FAIL
+ || (reg > 7) /* For Thumb reg must be r0..r7. */
+ || skip_past_comma (&str) == FAIL
+ || my_get_expression (&inst.reloc.exp, &str))
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
+ 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);
+}
+
+static void
+insert_reg (entry)
+ int entry;
+{
+ int len = strlen (reg_table[entry].name) + 2;
+ char * buf = (char *) xmalloc (len);
+ char * buf2 = (char *) xmalloc (len);
+ int i = 0;
+
+#ifdef REGISTER_PREFIX
+ buf[i++] = REGISTER_PREFIX;
+#endif
+
+ strcpy (buf + i, reg_table[entry].name);
+
+ for (i = 0; buf[i]; i++)
+ buf2[i] = islower (buf[i]) ? toupper (buf[i]) : buf[i];
+
+ buf2[i] = '\0';
+
+ hash_insert (arm_reg_hsh, buf, (PTR) &reg_table[entry]);
+ hash_insert (arm_reg_hsh, buf2, (PTR) &reg_table[entry]);
+}
+
+static void
+insert_reg_alias (str, regnum)
+ char *str;
+ int regnum;
+{
+ struct reg_entry *new =
+ (struct reg_entry *)xmalloc (sizeof (struct reg_entry));
+ char *name = xmalloc (strlen (str) + 1);
+ strcpy (name, str);
+
+ new->name = name;
+ new->number = regnum;
+
+ hash_insert (arm_reg_hsh, name, (PTR) new);
+}
+
+static void
+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)
+ abort ();
+}
+
+void
+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
+ || (arm_shift_hsh = hash_new ()) == NULL
+ || (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 (psrs) / sizeof (struct asm_psr); i++)
+ hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i));
+
+ for (i = 0; reg_table[i].name; i++)
+ insert_reg (i);
+
+ set_constant_flonums ();
+
+#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;
+ if (uses_apcs_float) flags |= F_APCS_FLOAT;
+ if (pic_code) flags |= F_PIC;
+ if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT;
+
+ bfd_set_private_flags (stdoutput, flags);
+ }
+#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;
+ 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)
+ mach = bfd_mach_arm_3M;
+ }
+
+ bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
+}
+
+/* Turn an integer of n bytes (in val) into a stream of bytes appropriate
+ for use in the a.out file, and stores them in the array pointed to by buf.
+ This knows about the endian-ness of the target machine and does
+ 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;
+ valueT val;
+ int n;
+{
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
+}
+
+static valueT
+md_chars_to_number (buf, n)
+ char * buf;
+ int n;
+{
+ valueT result = 0;
+ unsigned char * where = (unsigned char *) buf;
+
+ if (target_big_endian)
+ {
+ while (n--)
+ {
+ result <<= 8;
+ result |= (*where++ & 255);
+ }
+ }
+ else
+ {
+ while (n--)
+ {
+ result <<= 8;
+ result |= (where[n] & 255);
+ }
+ }
+
+ return result;
+}
+
+/* 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.
+
+ Note that fp constants aren't represent in the normal way on the ARM.
+ In big endian mode, things are as expected. However, in little endian
+ mode fp constants are big-endian word-wise, and little-endian byte-wise
+ within the words. For example, (double) 1.1 in big endian mode is
+ the byte sequence 3f f1 99 99 99 99 99 9a, and in little endian mode is
+ the byte sequence 99 99 f1 3f 9a 99 99 99.
+
+ ??? The format of 12 byte floats is uncertain according to gcc's arm.h. */
+
+char *
+md_atof (type, litP, sizeP)
+ char type;
+ char * litP;
+ int * sizeP;
+{
+ int prec;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ char *t;
+ int i;
+
+ switch (type)
+ {
+ case 'f':
+ case 'F':
+ case 's':
+ case 'S':
+ prec = 2;
+ break;
+
+ case 'd':
+ case 'D':
+ case 'r':
+ case 'R':
+ prec = 4;
+ break;
+
+ case 'x':
+ case 'X':
+ prec = 6;
+ break;
+
+ case 'p':
+ case 'P':
+ prec = 6;
+ break;
+
+ default:
+ *sizeP = 0;
+ return _("Bad call to MD_ATOF()");
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+ *sizeP = prec * 2;
+
+ if (target_big_endian)
+ {
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
+ }
+ else
+ {
+ /* For a 4 byte float the order of elements in `words' is 1 0. For an
+ 8 byte float the order is 1 0 3 2. */
+ for (i = 0; i < prec; i += 2)
+ {
+ md_number_to_chars (litP, (valueT) words[i + 1], 2);
+ md_number_to_chars (litP + 2, (valueT) words[i], 2);
+ litP += 4;
+ }
+ }
+
+ return 0;
+}
+
+/* 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
+ && 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
+ as the bottom two bits of the PC are forced to zero
+ for the calculation. */
+ return (fixP->fx_where + fixP->fx_frag->fr_address) & ~3;
+ }
+
+#ifdef TE_WINCE
+ /* The pattern was adjusted to accomodate CE's off-by-one fixups,
+ so we un-adjust here to compensate for the accomodation. */
+ return fixP->fx_where + fixP->fx_frag->fr_address + 8;
+#else
+ return fixP->fx_where + fixP->fx_frag->fr_address;
+#endif
+}
+
+/* Round up a section size to the appropriate boundary. */
+valueT
+md_section_align (segment, size)
+ segT segment ATTRIBUTE_UNUSED;
+ valueT size;
+{
+#ifdef OBJ_ELF
+ return size;
+#else
+ /* 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. */
+
+/* ARGSUSED */
+symbolS *
+md_undefined_symbol (name)
+ char * name;
+{
+#ifdef OBJ_ELF
+ if (name[0] == '_' && name[1] == 'G'
+ && streq (name, GLOBAL_OFFSET_TABLE_NAME))
+ {
+ if (!GOT_symbol)
+ {
+ if (symbol_find (name))
+ as_bad ("GOT already in the symbol table");
+
+ GOT_symbol = symbol_new (name, undefined_section,
+ (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. */
+
+static int
+arm_reg_parse (ccp)
+ register char ** ccp;
+{
+ char * start = * ccp;
+ char c;
+ char * p;
+ struct reg_entry * reg;
+
+#ifdef REGISTER_PREFIX
+ if (*start != REGISTER_PREFIX)
+ return FAIL;
+ p = start + 1;
+#else
+ p = start;
+#ifdef OPTIONAL_REGISTER_PREFIX
+ if (*p == OPTIONAL_REGISTER_PREFIX)
+ p++, start++;
+#endif
+#endif
+ if (!isalpha (*p) || !is_name_beginner (*p))
+ return FAIL;
+
+ c = *p++;
+ while (isalpha (c) || isdigit (c) || c == '_')
+ c = *p++;
+
+ *--p = 0;
+ reg = (struct reg_entry *) hash_find (arm_reg_hsh, start);
+ *p = c;
+
+ if (reg)
+ {
+ *ccp = p;
+ return reg->number;
+ }
+
+ return FAIL;
+}
+
+static int
+arm_psr_parse (ccp)
+ register char ** ccp;
+{
+ char * start = * ccp;
+ char c;
+ char * p;
+ CONST struct asm_psr * psr;
+
+ p = start;
+ c = *p++;
+ while (isalpha (c) || c == '_')
+ c = *p++;
+
+ *--p = 0;
+ psr = (CONST struct asm_psr *) hash_find (arm_psr_hsh, start);
+ *p = c;
+
+ if (psr)
+ {
+ *ccp = p;
+ return psr->number;
+ }
+
+ return FAIL;
+}
+
+int
+md_apply_fix3 (fixP, val, seg)
+ fixS * fixP;
+ valueT * val;
+ segT seg;
+{
+ offsetT value = * val;
+ offsetT newval;
+ unsigned int newimm;
+ unsigned long temp;
+ int sign;
+ char * buf = fixP->fx_where + fixP->fx_frag->fr_literal;
+ arm_fix_data * arm_data = (arm_fix_data *) fixP->tc_fix_data;
+
+ 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 ((fixP->fx_addsy == 0 || symbol_constant_p (fixP->fx_addsy))
+ && !fixP->fx_pcrel)
+#else
+ if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
+#endif
+ fixP->fx_done = 1;
+
+ /* If this symbol is in a different section then we need to leave it for
+ the linker to deal with. Unfortunately, md_pcrel_from can't tell,
+ so we have to undo it's effects here. */
+ if (fixP->fx_pcrel)
+ {
+ if (fixP->fx_addsy != NULL
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ {
+ if (target_oabi
+ && (fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
+ ))
+ value = 0;
+ else
+ value += md_pcrel_from (fixP);
+ }
+ }
+
+ fixP->fx_addnumber = value; /* Remember value for emit_reloc. */
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_ARM_IMMEDIATE:
+ newimm = validate_immediate (value);
+ temp = md_chars_to_number (buf, INSN_SIZE);
+
+ /* If the instruction will fail, see if we can fix things up by
+ changing the opcode. */
+ if (newimm == (unsigned int) FAIL
+ && (newimm = negate_data_op (&temp, value)) == (unsigned int) FAIL)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid constant (%lx) after fixup"),
+ (unsigned long) value);
+ break;
+ }
+
+ newimm |= (temp & 0xfffff000);
+ md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
+ break;
+
+ case BFD_RELOC_ARM_ADRL_IMMEDIATE:
+ {
+ unsigned int highpart = 0;
+ unsigned int newinsn = 0xe1a00000; /* nop */
+ newimm = validate_immediate (value);
+ temp = md_chars_to_number (buf, INSN_SIZE);
+
+ /* If the instruction will fail, see if we can fix things up by
+ changing the opcode. */
+ 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. */
+ newimm = validate_immediate_twopart (value, & highpart);
+
+ /* 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 (validate_immediate_twopart (- value, & highpart) != (unsigned int) FAIL)
+ 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);
+ 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. */
+ newinsn &= ~ 0xf0000;
+ newinsn |= ((newinsn & 0x0f000) << 4);
+ }
+
+ newimm |= (temp & 0xfffff000);
+ md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
+
+ highpart |= (newinsn & 0xfffff000);
+ md_number_to_chars (buf + INSN_SIZE, (valueT) highpart, INSN_SIZE);
+ }
+ break;
+
+ 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;
+ }
+
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ newval &= 0xff7ff000;
+ newval |= value | (sign ? INDEX_UP : 0);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ break;
+
+ 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)"),
+ (long) value);
+ break;
+ }
+
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ newval &= 0xff7ff0f0;
+ newval |= ((value >> 4) << 8) | (value & 0xf) | (sign ? INDEX_UP : 0);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ break;
+
+ 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,
+ _("invalid literal constant: pool needs to be closer"));
+ break;
+ }
+
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ newval &= 0xff7ff000;
+ newval |= value | (sign ? INDEX_UP : 0);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ break;
+
+ case BFD_RELOC_ARM_SHIFT_IMM:
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ if (((unsigned long) value) > 32
+ || (value == 32
+ && (((newval & 0x60) == 0) || (newval & 0x60) == 0x60)))
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("shift expression is too large"));
+ break;
+ }
+
+ if (value == 0)
+ newval &= ~0x60; /* Shifts of zero must be done as lsl */
+ else if (value == 32)
+ value = 0;
+ newval &= 0xfffff07f;
+ newval |= (value & 0x1f) << 7;
+ md_number_to_chars (buf, newval , INSN_SIZE);
+ break;
+
+ case BFD_RELOC_ARM_SWI:
+ if (arm_data->thumb_mode)
+ {
+ if (((unsigned long) value) > 0xff)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid swi expression"));
+ newval = md_chars_to_number (buf, THUMB_SIZE) & 0xff00;
+ newval |= value;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ }
+ else
+ {
+ if (((unsigned long) value) > 0x00ffffff)
+ 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);
+ }
+ break;
+
+ case BFD_RELOC_ARM_MULTI:
+ if (((unsigned long) value) > 0xffff)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid expression in load/store multiple"));
+ newval = value | md_chars_to_number (buf, INSN_SIZE);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ break;
+
+ case BFD_RELOC_ARM_PCREL_BRANCH:
+ newval = md_chars_to_number (buf, INSN_SIZE);
+
+ /* Sign-extend a 24-bit number. */
+#define SEXT24(x) ((((x) & 0xffffff) ^ (~ 0x7fffff)) + 0x800000)
+
+#ifdef OBJ_ELF
+ if (! target_oabi)
+ value = fixP->fx_offset;
+#endif
+
+ /* We are going to store value (shifted right by two) in the
+ 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))
+ {
+#ifdef OBJ_ELF
+ /* Normally we would be stuck at this point, since we cannot store
+ the absolute address that is the destination of the branch in the
+ 24 bits of the branch instruction. If however, we happen to know
+ 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. */
+ if (! target_oabi
+ && fixP->fx_addsy != NULL
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && S_GET_SEGMENT (fixP->fx_addsy) == 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)
+ fixP->fx_done = 1;
+ }
+
+ if (! fixP->fx_done)
+#endif
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("gas can't handle same-section branch dest >= 0x04000000"));
+ }
+
+ value >>= 2;
+ value += SEXT24 (newval);
+
+ if ((value & 0xff000000UL) != 0
+ && ((value & 0xff000000UL) != 0xff000000UL))
+ 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_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);
+ }
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ break;
+
+ 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);
+ }
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ break;
+
+ case BFD_RELOC_THUMB_PCREL_BRANCH23:
+ {
+ 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)
+ diff |= ~0x3fffff;
+#ifdef OBJ_ELF
+ value = fixP->fx_offset;
+#endif
+ 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);
+ }
+ break;
+
+ case BFD_RELOC_8:
+ if (fixP->fx_done || fixP->fx_pcrel)
+ 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);
+ }
+#endif
+ break;
+
+ case BFD_RELOC_16:
+ if (fixP->fx_done || fixP->fx_pcrel)
+ 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);
+ }
+#endif
+ break;
+
+#ifdef OBJ_ELF
+ case BFD_RELOC_ARM_GOT32:
+ case BFD_RELOC_ARM_GOTOFF:
+ md_number_to_chars (buf, 0, 4);
+ break;
+#endif
+
+ case BFD_RELOC_RVA:
+ case BFD_RELOC_32:
+ if (fixP->fx_done || fixP->fx_pcrel)
+ 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);
+ }
+#endif
+ break;
+
+#ifdef OBJ_ELF
+ case BFD_RELOC_ARM_PLT32:
+ /* 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))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Illegal value for co-processor offset"));
+ 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);
+ 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 */
+ switch (newval >> 12)
+ {
+ 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
+ aligned (since the final address produced must be, and
+ we can only describe word-aligned immediate offsets). */
+
+ 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));
+
+ if ((value + 2) & ~0x3fe)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Invalid offset, value too big (0x%08X)"), value);
+
+ /* Round up, since pc will be rounded down. */
+ newval |= (value + 2) >> 2;
+ break;
+
+ 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);
+ newval |= value >> 2;
+ break;
+
+ 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 */
+ break;
+
+ 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);
+ newval |= value << 6;
+ break;
+
+ 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 */
+ break;
+
+ default:
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ "Unable to process relocation for thumb opcode: %lx",
+ (unsigned long) newval);
+ break;
+ }
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ break;
+
+ 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
+
+ The type of instruction being processed is encoded in the
+ instruction field:
+ 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)"),
+ (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);
+ }
+ }
+ 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"),
+ (long) value);
+ newval |= value;
+ break;
+
+ default:
+ abort ();
+ }
+ md_number_to_chars (buf, newval , THUMB_SIZE);
+ break;
+
+ case BFD_RELOC_ARM_THUMB_SHIFT:
+ /* 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);
+ break;
+
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
+ fixP->fx_done = 0;
+ return 1;
+
+ case BFD_RELOC_NONE:
+ default:
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Bad relocation fixup type (%d)"), fixP->fx_r_type);
+ }
+
+ return 1;
+}
+
+/* Translate internal representation of relocation info to BFD target
+ format. */
+arelent *
+tc_gen_reloc (section, fixp)
+ asection * section ATTRIBUTE_UNUSED;
+ fixS * fixp;
+{
+ arelent * reloc;
+ bfd_reloc_code_real_type code;
+
+ 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;
+
+ /* @@ Why fx_addnumber sometimes and fx_offset other times? */
+#ifndef OBJ_ELF
+ if (fixp->fx_pcrel == 0)
+ reloc->addend = fixp->fx_offset;
+ else
+ reloc->addend = fixp->fx_offset = reloc->address;
+#else /* OBJ_ELF */
+ reloc->addend = fixp->fx_offset;
+#endif
+
+ switch (fixp->fx_r_type)
+ {
+ case BFD_RELOC_8:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_8_PCREL;
+ break;
+ }
+
+ case BFD_RELOC_16:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_16_PCREL;
+ break;
+ }
+
+ case BFD_RELOC_32:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_32_PCREL;
+ break;
+ }
+
+ case BFD_RELOC_ARM_PCREL_BRANCH:
+ 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_VTABLE_ENTRY:
+ case BFD_RELOC_VTABLE_INHERIT:
+ code = fixp->fx_r_type;
+ break;
+
+ 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 */
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Literal referenced across section boundary (Implicit dump?)"));
+ return NULL;
+
+#ifdef OBJ_ELF
+ case BFD_RELOC_ARM_GOT32:
+ case BFD_RELOC_ARM_GOTOFF:
+ case BFD_RELOC_ARM_PLT32:
+ code = fixp->fx_r_type;
+ break;
+#endif
+
+ case BFD_RELOC_ARM_IMMEDIATE:
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Internal_relocation (type %d) not fixed up (IMMEDIATE)"),
+ fixp->fx_r_type);
+ return NULL;
+
+ 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);
+ return NULL;
+
+ case BFD_RELOC_ARM_OFFSET_IMM:
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Internal_relocation (type %d) not fixed up (OFFSET_IMM)"),
+ fixp->fx_r_type);
+ return NULL;
+
+ default:
+ {
+ char * type;
+ switch (fixp->fx_r_type)
+ {
+ case BFD_RELOC_ARM_IMMEDIATE: type = "IMMEDIATE"; break;
+ case BFD_RELOC_ARM_OFFSET_IMM: type = "OFFSET_IMM"; break;
+ case BFD_RELOC_ARM_OFFSET_IMM8: type = "OFFSET_IMM8"; break;
+ case BFD_RELOC_ARM_SHIFT_IMM: type = "SHIFT_IMM"; break;
+ case BFD_RELOC_ARM_SWI: type = "SWI"; break;
+ case BFD_RELOC_ARM_MULTI: type = "MULTI"; break;
+ case BFD_RELOC_ARM_CP_OFF_IMM: type = "CP_OFF_IMM"; break;
+ case BFD_RELOC_ARM_THUMB_ADD: type = "THUMB_ADD"; break;
+ case BFD_RELOC_ARM_THUMB_SHIFT: type = "THUMB_SHIFT"; break;
+ case BFD_RELOC_ARM_THUMB_IMM: type = "THUMB_IMM"; break;
+ case BFD_RELOC_ARM_THUMB_OFFSET: type = "THUMB_OFFSET"; break;
+ default: type = _("<unknown>"); 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);
+ 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;
+ }
+#endif
+
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
+
+ if (reloc->howto == NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Can not represent %s relocation in this object file format"),
+ bfd_get_reloc_code_name (code));
+ 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;
+
+ return reloc;
+}
+
+int
+md_estimate_size_before_relax (fragP, segtype)
+ fragS * fragP ATTRIBUTE_UNUSED;
+ segT segtype ATTRIBUTE_UNUSED;
+{
+ as_fatal (_("md_estimate_size_before_relax\n"));
+ return 1;
+}
+
+static void
+output_inst PARAMS ((void))
+{
+ char * to = NULL;
+
+ if (inst.error)
+ {
+ as_bad (inst.error);
+ return;
+ }
+
+ to = frag_more (inst.size);
+
+ if (thumb_mode && (inst.size > THUMB_SIZE))
+ {
+ assert (inst.size == (2 * THUMB_SIZE));
+ md_number_to_chars (to, inst.instruction >> 16, THUMB_SIZE);
+ md_number_to_chars (to + THUMB_SIZE, inst.instruction, THUMB_SIZE);
+ }
+ else if (inst.size > INSN_SIZE)
+ {
+ assert (inst.size == (2 * INSN_SIZE));
+ md_number_to_chars (to, inst.instruction, INSN_SIZE);
+ md_number_to_chars (to + INSN_SIZE, inst.instruction, INSN_SIZE);
+ }
+ else
+ md_number_to_chars (to, inst.instruction, inst.size);
+
+ if (inst.reloc.type != BFD_RELOC_NONE)
+ fix_new_arm (frag_now, to - frag_now->fr_literal,
+ inst.size, & inst.reloc.exp, inst.reloc.pc_rel,
+ inst.reloc.type);
+
+ return;
+}
+
+void
+md_assemble (str)
+ char * str;
+{
+ char c;
+ char * p;
+ char * q;
+ 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 */
+
+ /* Align the previous label if needed. */
+ if (last_label_seen != NULL)
+ {
+ symbol_set_frag (last_label_seen, frag_now);
+ S_SET_VALUE (last_label_seen, (valueT) frag_now_fix ());
+ S_SET_SEGMENT (last_label_seen, now_seg);
+ }
+
+ memset (&inst, '\0', sizeof (inst));
+ 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);
+ return;
+ }
+
+ if (thumb_mode)
+ {
+ CONST struct thumb_opcode * opcode;
+
+ c = *p;
+ *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;
+ }
+
+ inst.instruction = opcode->value;
+ inst.size = opcode->size;
+ (*opcode->parms)(p);
+ output_inst ();
+ return;
+ }
+ }
+ else
+ {
+ CONST struct asm_opcode * opcode;
+ unsigned long cond_code;
+
+ inst.size = INSN_SIZE;
+ /* 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;
+ char * r;
+
+ /* Check that this instruction is supported for this CPU. */
+ if ((opcode->variants & cpu_variant) == 0)
+ goto try_shorter;
+
+ inst.instruction = opcode->value;
+ if (q == p) /* Just a simple opcode. */
+ {
+ 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);
+ }
+ else
+ {
+ /* A conditional instruction with default condition. */
+ inst.instruction |= COND_ALWAYS;
+ (*opcode->parms)(q, 0);
+ }
+ output_inst ();
+ return;
+ }
+
+ /* Not just a simple opcode. Check if extra is a conditional. */
+ r = q;
+ if (p - r >= 2)
+ {
+ CONST struct asm_cond *cond;
+ char d = *(r + 2);
+
+ *(r + 2) = '\0';
+ cond = (CONST struct asm_cond *) hash_find (arm_cond_hsh, r);
+ *(r + 2) = d;
+ if (cond)
+ {
+ if (cond->value == 0xf0000000)
+ as_tsktsk (
+_("Warning: Use of the 'nv' conditional is deprecated\n"));
+
+ cond_code = cond->value;
+ r += 2;
+ }
+ else
+ cond_code = COND_ALWAYS;
+ }
+ else
+ cond_code = COND_ALWAYS;
+
+ /* 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;
+ }
+ }
+ else
+ /* 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 (opcode->comp_suffix && *opcode->comp_suffix != '\0')
+ {
+ CONST char *s = opcode->comp_suffix;
+
+ while (*s)
+ {
+ inst.suffix++;
+ if (*r == *s)
+ break;
+ s++;
+ }
+
+ if (*s == '\0')
+ {
+ as_bad (_("Opcode `%s' must have suffix from <%s>\n"), str,
+ opcode->comp_suffix);
+ return;
+ }
+
+ r++;
+ }
+
+ /* The remainder, if any should now be flags for the instruction;
+ Scan these checking each one found with the opcode. */
+ if (r != p)
+ {
+ char d;
+ CONST struct asm_flg *flag = opcode->flags;
+
+ if (flag)
+ {
+ int flagno;
+
+ d = *p;
+ *p = '\0';
+
+ for (flagno = 0; flag[flagno].template; flagno++)
+ {
+ if (streq (r, flag[flagno].template))
+ {
+ flag_bits |= flag[flagno].set_bits;
+ break;
+ }
+ }
+
+ *p = d;
+ if (! flag[flagno].template)
+ goto try_shorter;
+ }
+ else
+ goto try_shorter;
+ }
+
+ (*opcode->parms) (p, flag_bits);
+ output_inst ();
+ return;
+ }
+
+ try_shorter:
+ ;
+ }
+ }
+
+ /* It wasn't an instruction, but it might be a register alias of the form
+ 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 * r;
+
+ q += 4;
+ skip_whitespace (q);
+
+ for (r = q; *r != '\0'; r++)
+ if (*r == ' ')
+ break;
+
+ if (r != q)
+ {
+ int regnum;
+ char d = *r;
+
+ *r = '\0';
+ regnum = arm_reg_parse (& q);
+ *r = d;
+
+ reg = arm_reg_parse (& str);
+
+ if (reg == FAIL)
+ {
+ if (regnum != FAIL)
+ insert_reg_alias (str, regnum);
+ else
+ as_warn (_("register '%s' does not exist\n"), q);
+ }
+ else if (regnum != FAIL)
+ {
+ if (reg != regnum)
+ as_warn (_("ignoring redefinition of register alias '%s'"),
+ copy_of_str );
+
+ /* Do not warn about redefinitions to the same alias. */
+ }
+ else
+ as_warn (_("ignoring redefinition of register alias '%s' to non-existant register '%s'"),
+ copy_of_str, q);
+ }
+ else
+ as_warn (_("ignoring incomplete .req pseuso op"));
+
+ *p = c;
+ return;
+ }
+
+ *p = c;
+ 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] 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
+ */
+
+CONST char * md_shortopts = "m:k";
+struct option md_longopts[] =
+{
+#ifdef ARM_BI_ENDIAN
+#define OPTION_EB (OPTION_MD_BASE + 0)
+ {"EB", no_argument, NULL, OPTION_EB},
+#define OPTION_EL (OPTION_MD_BASE + 1)
+ {"EL", no_argument, NULL, OPTION_EL},
+#ifdef OBJ_ELF
+#define OPTION_OABI (OPTION_MD_BASE +2)
+ {"oabi", no_argument, NULL, OPTION_OABI},
+#endif
+#endif
+ {NULL, no_argument, NULL, 0}
+};
+size_t md_longopts_size = sizeof (md_longopts);
+
+int
+md_parse_option (c, arg)
+ int c;
+ char * arg;
+{
+ char * str = arg;
+
+ switch (c)
+ {
+#ifdef ARM_BI_ENDIAN
+ case OPTION_EB:
+ target_big_endian = 1;
+ break;
+ case OPTION_EL:
+ target_big_endian = 0;
+ break;
+#endif
+
+ case 'm':
+ switch (*str)
+ {
+ case 'f':
+ if (streq (str, "fpa10"))
+ cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_FPA10;
+ else if (streq (str, "fpa11"))
+ cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_FPA11;
+ else if (streq (str, "fpe-old"))
+ cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_CORE;
+ else
+ goto bad;
+ break;
+
+ case 'n':
+ if (streq (str, "no-fpu"))
+ cpu_variant &= ~FPU_ALL;
+ break;
+
+#ifdef OBJ_ELF
+ 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)
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T;
+#if defined OBJ_COFF || defined OBJ_ELF
+ support_interwork = true;
+#endif
+ }
+ else
+ goto bad;
+ break;
+
+ default:
+ if (streq (str, "all"))
+ {
+ cpu_variant = ARM_ALL | FPU_ALL;
+ return 1;
+ }
+#if defined OBJ_COFF || defined OBJ_ELF
+ if (! strncmp (str, "apcs-", 5))
+ {
+ /* GCC passes on all command line options starting "-mapcs-..."
+ to us, so we must parse them here. */
+
+ str += 5;
+
+ if (streq (str, "32"))
+ {
+ uses_apcs_26 = false;
+ return 1;
+ }
+ else if (streq (str, "26"))
+ {
+ uses_apcs_26 = true;
+ return 1;
+ }
+ else if (streq (str, "frame"))
+ {
+ /* Stack frames are being generated - does not affect
+ linkage of code. */
+ return 1;
+ }
+ else if (streq (str, "stack-check"))
+ {
+ /* Stack checking is being performed - does not affect
+ linkage, but does require that the functions
+ __rt_stkovf_split_small and __rt_stkovf_split_big be
+ present in the final link. */
+
+ return 1;
+ }
+ else if (streq (str, "float"))
+ {
+ /* Floating point arguments are being passed in the floating
+ point registers. This does affect linking, since this
+ version of the APCS is incompatible with the version that
+ passes floating points in the integer registers. */
+
+ uses_apcs_float = true;
+ return 1;
+ }
+ else if (streq (str, "reentrant"))
+ {
+ /* Reentrant code has been generated. This does affect
+ linking, since there is no point in linking reentrant/
+ position independent code with absolute position code. */
+ pic_code = true;
+ return 1;
+ }
+
+ as_bad (_("Unrecognised APCS switch -m%s"), arg);
+ return 0;
+ }
+#endif
+ /* Strip off optional "arm" */
+ if (! strncmp (str, "arm", 3))
+ str += 3;
+
+ switch (*str)
+ {
+ case '1':
+ if (streq (str, "1"))
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_1;
+ else
+ goto bad;
+ break;
+
+ case '2':
+ if (streq (str, "2"))
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_2;
+ else if (streq (str, "250"))
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_250;
+ else
+ goto bad;
+ break;
+
+ case '3':
+ if (streq (str, "3"))
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_3;
+ else
+ goto bad;
+ break;
+
+ case '6':
+ switch (strtol (str, NULL, 10))
+ {
+ case 6:
+ case 60:
+ case 600:
+ case 610:
+ case 620:
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_6;
+ break;
+ default:
+ goto bad;
+ }
+ break;
+
+ case '7':
+ switch (strtol (str, & str, 10)) /* Eat the processor name */
+ {
+ case 7:
+ case 70:
+ case 700:
+ case 710:
+ case 720:
+ case 7100:
+ case 7500:
+ break;
+ 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
+ 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;
+ 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;
+ else if (streq (str, "920"))
+ cpu_variant = (cpu_variant & ~ARM_ANY)
+ | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL;
+ else if (streq (str, "920t"))
+ cpu_variant = (cpu_variant & ~ARM_ANY)
+ | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB;
+ else if (streq (str, "9tdmi"))
+ cpu_variant = (cpu_variant & ~ARM_ANY)
+ | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB;
+ 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;
+ else
+ goto bad;
+ break;
+
+ case 'v':
+ /* Select variant based on architecture rather than processor. */
+ switch (*++str)
+ {
+ case '2':
+ switch (*++str)
+ {
+ case 'a':
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_3;
+ break;
+ case 0:
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_2;
+ break;
+ default:
+ as_bad (_("Invalid architecture variant -m%s"), arg);
+ break;
+ }
+ break;
+
+ case '3':
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7;
+
+ switch (*++str)
+ {
+ case 'm': cpu_variant |= ARM_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;
+
+ switch (*++str)
+ {
+ case 't': cpu_variant |= ARM_THUMB; break;
+ case 0: break;
+ default:
+ as_bad (_("Invalid architecture variant -m%s"), arg);
+ break;
+ }
+ break;
+
+ case '5':
+ cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V5;
+ switch (*++str)
+ {
+ case 't': cpu_variant |= ARM_THUMB; break;
+ case 'e': cpu_variant |= ARM_EXT_V5E; break;
+ case 0: break;
+ default:
+ as_bad (_("Invalid architecture variant -m%s"), arg);
+ break;
+ }
+ break;
+
+ default:
+ as_bad (_("Invalid architecture variant -m%s"), arg);
+ break;
+ }
+ break;
+
+ default:
+ bad:
+ as_bad (_("Invalid processor variant -m%s"), arg);
+ return 0;
+ }
+ }
+ break;
+
+#if defined OBJ_ELF || defined OBJ_COFF
+ case 'k':
+ pic_code = 1;
+ break;
+#endif
+
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+void
+md_show_usage (fp)
+ FILE * fp;
+{
+ fprintf (fp, _("\
+ ARM Specific Assembler Options:\n\
+ -m[arm][<processor name>] select processor variant\n\
+ -m[arm]v[2|2a|3|3m|4|4t|5[t][e]] select architecture variant\n\
+ -mthumb only allow Thumb instructions\n\
+ -mthumb-interwork mark the assembled code as supporting interworking\n\
+ -mall allow any instruction\n\
+ -mfpa10, -mfpa11 select floating point architecture\n\
+ -mfpe-old don't allow floating-point multiple instructions\n\
+ -mno-fpu don't allow any floating-point instructions.\n\
+ -k generate PIC code.\n"));
+#if defined OBJ_COFF || defined OBJ_ELF
+ fprintf (fp, _("\
+ -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to use\n\
+ -mapcs-float floating point args are passed in FP regs\n\
+ -mapcs-reentrant the code is position independent/reentrant\n"));
+ #endif
+#ifdef OBJ_ELF
+ fprintf (fp, _("\
+ -moabi support the old ELF ABI\n"));
+#endif
+#ifdef ARM_BI_ENDIAN
+ fprintf (fp, _("\
+ -EB assemble code for a big endian cpu\n\
+ -EL assemble code for a little endian cpu\n"));
+#endif
+}
+
+/* We need to be able to fix up arbitrary expressions in some statements.
+ This is so that we can handle symbols that are an arbitrary distance from
+ the pc. The most common cases are of the form ((+/-sym -/+ . - 8) & mask),
+ which returns part of an address in a form which will be valid for
+ a data instruction. We do this by pushing the expression into a symbol
+ in the expr_section, and creating a fix for that. */
+
+static void
+fix_new_arm (frag, where, size, exp, pc_rel, reloc)
+ fragS * frag;
+ int where;
+ short int size;
+ expressionS * exp;
+ int pc_rel;
+ int reloc;
+{
+ fixS * new_fix;
+ arm_fix_data * arm_data;
+
+ switch (exp->X_op)
+ {
+ case O_constant:
+ case O_symbol:
+ case O_add:
+ case O_subtract:
+ new_fix = fix_new_exp (frag, where, size, exp, pc_rel, reloc);
+ break;
+
+ default:
+ new_fix = fix_new (frag, where, size, make_expr_symbol (exp), 0,
+ pc_rel, reloc);
+ break;
+ }
+
+ /* 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;
+
+ return;
+}
+
+
+/* This fix_new is called by cons via TC_CONS_FIX_NEW. */
+void
+cons_fix_new_arm (frag, where, size, exp)
+ fragS * frag;
+ int where;
+ int size;
+ expressionS * exp;
+{
+ bfd_reloc_code_real_type type;
+ int pcrel = 0;
+
+ /* Pick a reloc ...
+ *
+ * @@ Should look at CPU word size.
+ */
+ switch (size)
+ {
+ case 2:
+ type = BFD_RELOC_16;
+ break;
+ case 4:
+ default:
+ type = BFD_RELOC_32;
+ break;
+ case 8:
+ 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. */
+ s_ltorg (0);
+ listing_prev_line ();
+}
+
+void
+arm_start_line_hook ()
+{
+ last_label_seen = NULL;
+}
+
+void
+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
+ bit of that address should be set. This will allow
+ interworking between Arm and Thumb functions to work
+ correctly. */
+
+ THUMB_SET_FUNC (sym, 1);
+
+ label_is_thumb_function_name = false;
+ }
+}
+
+/* Adjust the symbol table. This marks Thumb symbols as distinct from
+ ARM ones. */
+
+void
+arm_adjust_symtab ()
+{
+#ifdef OBJ_COFF
+ symbolS * sym;
+
+ 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_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC);
+
+ else if (S_GET_STORAGE_CLASS (sym) == C_EXT)
+ S_SET_STORAGE_CLASS (sym, C_THUMBEXTFUNC);
+ else
+ as_bad (_("%s: unexpected function type: %d"),
+ 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;
+ }
+ }
+
+ if (ARM_IS_INTERWORK (sym))
+ coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_flags = 0xFF;
+ }
+#endif
+#ifdef OBJ_ELF
+ 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))
+ elf_sym->internal_elf_sym.st_info =
+ ELF_ST_INFO (bind, STT_ARM_TFUNC);
+ else
+ elf_sym->internal_elf_sym.st_info =
+ ELF_ST_INFO (bind, STT_ARM_16BIT);
+ }
+ }
+#endif
+}
+
+int
+arm_data_in_code ()
+{
+ if (thumb_mode && ! strncmp (input_line_pointer + 1, "data:", 5))
+ {
+ *input_line_pointer = '/';
+ input_line_pointer += 5;
+ *input_line_pointer = 0;
+ return 1;
+ }
+
+ return 0;
+}
+
+char *
+arm_canonicalize_symbol_name (name)
+ char * name;
+{
+ int len;
+
+ if (thumb_mode && (len = strlen (name)) > 5
+ && streq (name + len - 5, "/data"))
+ *(name + len - 5) = 0;
+
+ return name;
+}
+
+boolean
+arm_validate_fix (fixP)
+ fixS * fixP;
+{
+ /* If the destination of the branch is a defined symbol which does not have
+ 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
+ && fixP->fx_addsy != NULL
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && ! THUMB_IS_FUNC (fixP->fx_addsy))
+ {
+ fixP->fx_addsy = find_real_start (fixP->fx_addsy);
+ return true;
+ }
+
+ return false;
+}
+
+#ifdef OBJ_ELF
+/* Relocations against Thumb function names must be left unadjusted,
+ so that the linker can use this information to correctly set the
+ bottom bit of their addresses. The MIPS version of this function
+ also prevents relocations that are mips-16 specific, but I do not
+ know why it does this.
+
+ FIXME:
+ There is one other problem that ought to be addressed here, but
+ which currently is not: Taking the address of a label (rather
+ 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. */
+ 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 */
+ if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 0;
+
+ return 1;
+}
+
+const char *
+elf32_arm_target_format ()
+{
+ if (target_big_endian)
+ if (target_oabi)
+ return "elf32-bigarm-oabi";
+ else
+ return "elf32-bigarm";
+ else
+ if (target_oabi)
+ return "elf32-littlearm-oabi";
+ else
+ return "elf32-littlearm";
+}
+
+void
+armelf_frob_symbol (symp, puntp)
+ symbolS * symp;
+ int * puntp;
+{
+ elf_frob_symbol (symp, puntp);
+}
+
+int
+arm_force_relocation (fixp)
+ struct fix * 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)
+ return 1;
+
+ return 0;
+}
+
+static bfd_reloc_code_real_type
+arm_parse_reloc ()
+{
+ char id[16];
+ char * ip;
+ unsigned int i;
+ static struct
+ {
+ char * str;
+ int len;
+ bfd_reloc_code_real_type reloc;
+ }
+ reloc_map[] =
+ {
+#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 */
+ MAP ("(plt)", BFD_RELOC_ARM_PLT32),
+ { NULL, 0, BFD_RELOC_UNUSED }
+#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;
+}
+
+static void
+s_arm_elf_cons (nbytes)
+ int nbytes;
+{
+ expressionS exp;
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ if (is_it_end_of_statement ())
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+#ifdef md_cons_align
+ md_cons_align (nbytes);
+#endif
+
+ 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",
+ 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
+ emit_expr (& exp, (unsigned int) nbytes);
+ }
+ while (*input_line_pointer++ == ',');
+
+ input_line_pointer--; /* Put terminator back into stream. */
+ demand_empty_rest_of_line ();
+}
+
+#endif /* OBJ_ELF */
diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h
new file mode 100644
index 0000000..c5ab887
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-arm.h
@@ -0,0 +1,211 @@
+/* This file is tc-arm.h
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999
+ Free Software Foundation, Inc.
+ Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+ Modified by David Taylor (dtaylor@armltd.co.uk)
+
+ 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. */
+
+#define TC_ARM 1
+
+#ifndef TARGET_BYTES_BIG_ENDIAN
+#define TARGET_BYTES_BIG_ENDIAN 0
+#endif
+
+#define WORKING_DOT_WORD
+
+#define COFF_MAGIC ARMMAGIC
+#define TARGET_ARCH bfd_arch_arm
+
+#define AOUT_MACHTYPE 0
+
+#define DIFF_EXPR_OK
+
+#ifdef LITTLE_ENDIAN
+#undef LITTLE_ENDIAN
+#endif
+
+#ifdef BIG_ENDIAN
+#undef BIG_ENDIAN
+#endif
+
+#define LITTLE_ENDIAN 1234
+#define BIG_ENDIAN 4321
+
+#if defined OBJ_AOUT
+#if defined TE_RISCIX
+# define TARGET_FORMAT "a.out-riscix"
+#elif defined TE_LINUX
+# define ARM_BI_ENDIAN
+# define TARGET_FORMAT "a.out-arm-linux"
+#elif defined TE_NetBSD
+# define TARGET_FORMAT "a.out-arm-netbsd"
+#else
+# define ARM_BI_ENDIAN
+# define TARGET_FORMAT \
+ (target_big_endian ? "a.out-arm-big" : "a.out-arm-little")
+#endif
+#endif /* OBJ_AOUT */
+
+#ifdef OBJ_AIF
+#define TARGET_FORMAT "aif"
+#endif
+
+#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)
+# ifdef TE_EPOC
+# define TARGET_FORMAT (target_big_endian ? "epoc-pe-arm-big" : "epoc-pe-arm-little")
+# else
+# define TARGET_FORMAT (target_big_endian ? "pe-arm-big" : "pe-arm-little")
+# endif
+# else
+# define TARGET_FORMAT (target_big_endian ? "coff-arm-big" : "coff-arm-little")
+# endif
+#endif
+
+#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
+
+#define md_convert_frag(b, s, f) {as_fatal (_("arm convert_frag\n"));}
+
+#define md_cleanup() arm_cleanup ()
+ extern void arm_cleanup PARAMS ((void));
+
+#define md_start_line_hook() arm_start_line_hook ()
+ extern void arm_start_line_hook PARAMS ((void));
+
+#define tc_frob_label(S) arm_frob_label (S)
+ extern void arm_frob_label PARAMS ((symbolS *));
+
+/* We also need to mark assembler created symbols: */
+#define tc_frob_fake_label(S) arm_frob_label (S)
+
+/* NOTE: The fake label creation in stabs.c:s_stab_generic() has
+ deliberately not been updated to mark assembler created stabs
+ symbols as Thumb. */
+
+#define TC_FIX_TYPE PTR
+#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)
+
+#ifdef OBJ_ELF
+#include "write.h" /* For definition of fixS */
+#define obj_fix_adjustable(fixP) arm_fix_adjustable (fixP)
+boolean arm_fix_adjustable PARAMS ((fixS *));
+#else
+#define obj_fix_adjustable(fixP) 0
+#endif
+
+/* We need to keep some local information on symbols. */
+
+#define TC_SYMFIELD_TYPE unsigned int
+#define ARM_GET_FLAG(s) (*symbol_get_tc (s))
+#define ARM_SET_FLAG(s,v) (*symbol_get_tc (s) |= (v))
+#define ARM_RESET_FLAG(s,v) (*symbol_get_tc (s) &= ~(v))
+
+#define ARM_FLAG_THUMB (1 << 0) /* The symbol is a Thumb symbol rather than an Arm symbol. */
+#define ARM_FLAG_INTERWORK (1 << 1) /* The symbol is attached to code that suppports interworking. */
+#define THUMB_FLAG_FUNC (1 << 2) /* The symbol is attached to the start of a Thumb function. */
+
+#define ARM_IS_THUMB(s) (ARM_GET_FLAG (s) & ARM_FLAG_THUMB)
+#define ARM_IS_INTERWORK(s) (ARM_GET_FLAG (s) & ARM_FLAG_INTERWORK)
+#define THUMB_IS_FUNC(s) (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)
+
+#define ARM_SET_THUMB(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_THUMB) : ARM_RESET_FLAG (s, ARM_FLAG_THUMB))
+#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));
+
+#define tc_canonicalize_symbol_name(str) \
+ arm_canonicalize_symbol_name (str);
+char * arm_canonicalize_symbol_name PARAMS ((char *));
+
+#define obj_adjust_symtab() arm_adjust_symtab ()
+ extern void arm_adjust_symtab PARAMS ((void));
+
+#ifdef OBJ_ELF
+#define obj_frob_symbol(sym, punt) armelf_frob_symbol ((sym), & (punt))
+void armelf_frob_symbol PARAMS ((symbolS *, int *));
+#endif
+
+#define tc_aout_pre_write_hook(x) {;} /* not used */
+
+#define LISTING_HEADER "ARM GAS "
+
+#define OPTIONAL_REGISTER_PREFIX '%'
+
+#define md_operand(x)
+
+#define TC_HANDLES_FX_DONE
+
+#define MD_APPLY_FIX3
+
+#define LOCAL_LABEL(name) (name[0] == '.' && (name[1] == 'L'))
+#define LOCAL_LABELS_FB 1
+#ifdef OBJ_ELF
+#define LOCAL_LABEL_PREFIX '.'
+#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. */
+
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ( (FIX)->fx_r_type != BFD_RELOC_ARM_GOT12 \
+ && (FIX)->fx_r_type != BFD_RELOC_ARM_GOT32 \
+ && (FIX)->fx_r_type != BFD_RELOC_32)
+
+#define TC_CONS_FIX_NEW cons_fix_new_arm
+ 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. */
+#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 */
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index cc173ec..7efd6dd 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/gas/config/tc-i386.c
@@ -1,5 +1,5 @@
/* i386.c -- Assemble code for the Intel 80386
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -30,21 +30,38 @@
#include "as.h"
#include "subsegs.h"
-
-#include "obstack.h"
#include "opcode/i386.h"
-#ifndef TC_RELOC
-#define TC_RELOC(X,Y) (Y)
+#ifndef REGISTER_WARNINGS
+#define REGISTER_WARNINGS 1
+#endif
+
+#ifndef INFER_ADDR_PREFIX
+#define INFER_ADDR_PREFIX 1
+#endif
+
+#ifndef SCALE1_WHEN_NO_INDEX
+/* Specifying a scale factor besides 1 when there is no index is
+ futile. eg. `mov (%ebx,2),%al' does exactly the same as
+ `mov (%ebx),%al'. To slavishly follow what the programmer
+ specified, set SCALE1_WHEN_NO_INDEX to 0. */
+#define SCALE1_WHEN_NO_INDEX 1
#endif
-static unsigned long mode_from_disp_size PARAMS ((unsigned long));
+#define true 1
+#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 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_intel_syntax PARAMS ((int));
+
#ifdef BFD_ASSEMBLER
static bfd_reloc_code_real_type reloc
PARAMS ((int, int, bfd_reloc_code_real_type));
@@ -53,13 +70,21 @@ static bfd_reloc_code_real_type reloc
/* 'md_assemble ()' gathers together information and puts it into a
i386_insn. */
+union i386_op
+ {
+ expressionS *disps;
+ expressionS *imms;
+ const reg_entry *regs;
+ };
+
struct _i386_insn
{
/* TM holds the template for the insn were currently assembling. */
template tm;
- /* SUFFIX holds the opcode suffix (e.g. 'l' for 'movl') if given. */
+
+ /* SUFFIX holds the instruction mnemonic suffix if given.
+ (e.g. 'l' for 'movl') */
char suffix;
- /* Operands are coded with OPERANDS, TYPES, DISPS, IMMS, and REGS. */
/* OPERANDS gives the number of given operands. */
unsigned int operands;
@@ -70,12 +95,12 @@ struct _i386_insn
unsigned int reg_operands, disp_operands, mem_operands, imm_operands;
/* TYPES [i] is the type (see above #defines) which tells us how to
- search through DISPS [i] & IMMS [i] & REGS [i] for the required
- operand. */
+ use OP[i] for the corresponding operand. */
unsigned int types[MAX_OPERANDS];
- /* Displacements (if given) for each operand. */
- expressionS *disps[MAX_OPERANDS];
+ /* Displacement expression, immediate expression, or register for each
+ operand. */
+ union i386_op op[MAX_OPERANDS];
/* Relocation type for operand */
#ifdef BFD_ASSEMBLER
@@ -84,43 +109,48 @@ struct _i386_insn
int disp_reloc[MAX_OPERANDS];
#endif
- /* Immediate operands (if given) for each operand. */
- expressionS *imms[MAX_OPERANDS];
-
- /* Register operands (if given) for each operand. */
- reg_entry *regs[MAX_OPERANDS];
-
/* BASE_REG, INDEX_REG, and LOG2_SCALE_FACTOR are used to encode
the base index byte below. */
- reg_entry *base_reg;
- reg_entry *index_reg;
+ const reg_entry *base_reg;
+ const reg_entry *index_reg;
unsigned int log2_scale_factor;
- /* SEG gives the seg_entry of this insn. It is equal to zero unless
- an explicit segment override is given. */
- const seg_entry *seg; /* segment for memory operands (if given) */
+ /* 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) */
/* PREFIX holds all the given prefix opcodes (usually null).
- PREFIXES is the size of PREFIX. */
- /* richfix: really unsigned? */
- unsigned char prefix[MAX_PREFIXES];
+ PREFIXES is the number of prefix opcodes. */
unsigned int prefixes;
+ unsigned char prefix[MAX_PREFIXES];
- /* RM and BI are the modrm byte and the base index byte where the
- addressing modes of this insn are encoded. */
+ /* RM and SIB are the modrm byte and the sib byte where the
+ addressing modes of this insn are encoded. */
modrm_byte rm;
- base_index_byte bi;
+ sib_byte sib;
};
typedef struct _i386_insn i386_insn;
+/* List of chars besides those in app.c:symbol_chars that can start an
+ operand. Used to prevent the scrubber eating vital white-space. */
+#ifdef LEX_AT
+const char extra_symbol_chars[] = "*%-(@";
+#else
+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)
+#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX))
+/* Putting '/' here makes it impossible to use the divide operator.
+ However, we need it for compatibility with SVR4 systems. */
const char comment_chars[] = "#/";
+#define PREFIX_SEPARATOR '\\'
#else
const char comment_chars[] = "#";
+#define PREFIX_SEPARATOR '/'
#endif
/* This array holds the chars that only start a comment at the beginning of
@@ -131,11 +161,12 @@ const char comment_chars[] = "#";
#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)
+#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX))
const char line_comment_chars[] = "";
#else
const char line_comment_chars[] = "/";
#endif
+
const char line_separator_chars[] = "";
/* Chars that can be used to separate mant from exp in floating point nums */
@@ -147,64 +178,73 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "fFdDxX";
/* tables for lexical analysis */
-static char opcode_chars[256];
+static char mnemonic_chars[256];
static char register_chars[256];
static char operand_chars[256];
-static char space_chars[256];
static char identifier_chars[256];
static char digit_chars[256];
/* lexical macros */
-#define is_opcode_char(x) (opcode_chars[(unsigned char) x])
+#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])
-#define is_space_char(x) (space_chars[(unsigned char) x])
+#define is_space_char(x) ((x) == ' ')
#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 */
static char operand_special_chars[] = "%$-+(,)*._~/<>|&^!:[@]";
-static char *ordinal_names[] = {"first", "second", "third"}; /* for printfs */
-
/* 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). */
static char save_stack[32];
static char *save_stack_p; /* stack pointer */
-#define END_STRING_AND_SAVE(s) *save_stack_p++ = *s; *s = '\0'
-#define RESTORE_END_STRING(s) *s = *--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. */
static i386_insn i;
+/* Possible templates for current insn. */
+static const templates *current_templates;
+
/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */
static expressionS disp_expressions[2], im_expressions[2];
-/* pointers to ebp & esp entries in reg_hash hash table */
-static reg_entry *ebp, *esp;
-
static int this_operand; /* current operand we are working on */
static int flag_do_long_jump; /* FIXME what does this do? */
static int flag_16bit_code; /* 1 if we're writing 16-bit code, 0 if 32-bit */
+static int intel_syntax = 0; /* 1 for intel syntax, 0 if att syntax */
+
+static int allow_naked_reg = 0; /* 1 if register prefix % not required */
+
+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. */
+
/* Interface to relax_segment.
There are 2 relax states for 386 jump insns: one for conditional &
- one for unconditional jumps. This is because the these two types
- of jumps add different sizes to frags when we're figuring out what
+ one for unconditional jumps. This is because these two types of
+ jumps add different sizes to frags when we're figuring out what
sort of jump to choose to reach a given label. */
/* types */
#define COND_JUMP 1 /* conditional jump */
#define UNCOND_JUMP 2 /* unconditional jump */
/* sizes */
-#define BYTE 0
-#define WORD 1
-#define DWORD 2
-#define UNKNOWN_SIZE 3
+#define CODE16 1
+#define SMALL 0
+#define SMALL16 (SMALL|CODE16)
+#define BIG 2
+#define BIG16 (BIG|CODE16)
#ifndef INLINE
#ifdef __GNUC__
@@ -217,40 +257,46 @@ static int flag_16bit_code; /* 1 if we're writing 16-bit code, 0 if 32-bit */
#define ENCODE_RELAX_STATE(type,size) \
((relax_substateT)((type<<2) | (size)))
#define SIZE_FROM_RELAX_STATE(s) \
- ( (((s) & 0x3) == BYTE ? 1 : (((s) & 0x3) == WORD ? 2 : 4)) )
+ ( (((s) & 0x3) == BIG ? 4 : (((s) & 0x3) == BIG16 ? 2 : 1)) )
+
+/* This table is used by relax_frag to promote short jumps to long
+ ones where necessary. SMALL (short) jumps may be promoted to BIG
+ (32 bit long) ones, and SMALL16 jumps to BIG16 (16 bit long). We
+ don't allow a short jump in a 32 bit code segment to be promoted to
+ a 16 bit offset jump because it's slower (requires data size
+ prefix), and doesn't work, unless the destination is in the bottom
+ 64k of the code segment (The top 16 bits of eip are zeroed). */
const relax_typeS md_relax_table[] =
{
-/* The fields are:
- 1) most positive reach of this state,
- 2) most negative reach of this state,
- 3) how many bytes this mode will add to the size of the current frag
- 4) which index into the table to try if we can't fit into this one.
- */
+ /* The fields are:
+ 1) most positive reach of this state,
+ 2) most negative reach of this state,
+ 3) how many bytes this mode will add to the size of the current frag
+ 4) which index into the table to try if we can't fit into this one.
+ */
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
- /* For now we don't use word displacement jumps; they may be
- untrustworthy. */
- {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, DWORD)},
- /* word conditionals add 3 bytes to frag:
- 2 opcode prefix; 1 displacement bytes */
- {32767 + 2, -32768 + 2, 3, ENCODE_RELAX_STATE (COND_JUMP, DWORD)},
+ {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG)},
+ {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG16)},
/* dword conditionals adds 4 bytes to frag:
- 1 opcode prefix; 3 displacement bytes */
+ 1 extra opcode byte, 3 extra displacement bytes. */
{0, 0, 4, 0},
- {1, 1, 0, 0},
+ /* word conditionals add 2 bytes to frag:
+ 1 extra opcode byte, 1 extra displacement byte. */
+ {0, 0, 2, 0},
- {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, DWORD)},
- /* word jmp adds 2 bytes to frag:
- 1 opcode prefix; 1 displacement bytes */
- {32767 + 2, -32768 + 2, 2, ENCODE_RELAX_STATE (UNCOND_JUMP, DWORD)},
+ {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)},
+ {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)},
/* dword jmp adds 3 bytes to frag:
- 0 opcode prefix; 3 displacement bytes */
+ 0 extra opcode bytes, 3 extra displacement bytes. */
{0, 0, 3, 0},
- {1, 1, 0, 0},
+ /* word jmp adds 1 byte to frag:
+ 0 extra opcode bytes, 1 extra displacement byte. */
+ {0, 0, 1, 0}
};
@@ -302,6 +348,8 @@ i386_align_code (fragP, count)
static const char f32_15[] =
{0xeb,0x0d,0x90,0x90,0x90,0x90,0x90, /* jmp .+15; lotsa nops */
0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
+ static const char f16_3[] =
+ {0x8d,0x74,0x00}; /* lea 0(%esi),%esi */
static const char f16_4[] =
{0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
static const char f16_5[] =
@@ -321,7 +369,7 @@ i386_align_code (fragP, count)
f32_9, f32_10, f32_11, f32_12, f32_13, f32_14, f32_15
};
static const char *const f16_patt[] = {
- f32_1, f32_2, f32_3, f16_4, f16_5, f16_6, f16_7, f16_8,
+ f32_1, f32_2, f16_3, f16_4, f16_5, f16_6, f16_7, f16_8,
f32_15, f32_15, f32_15, f32_15, f32_15, f32_15, f32_15
};
@@ -343,34 +391,23 @@ i386_align_code (fragP, count)
static char *output_invalid PARAMS ((int c));
static int i386_operand PARAMS ((char *operand_string));
-static reg_entry *parse_register PARAMS ((char *reg_string));
+static int i386_intel_operand PARAMS ((char *operand_string, int got_a_float));
+static const reg_entry *parse_register PARAMS ((char *reg_string,
+ char **end_op));
+
#ifndef I386COFF
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 long
+static INLINE unsigned int
mode_from_disp_size (t)
- unsigned long t;
+ unsigned int t;
{
- return (t & Disp8) ? 1 : (t & Disp32) ? 2 : 0;
+ return (t & Disp8) ? 1 : (t & (Disp16|Disp32)) ? 2 : 0;
}
-#if 0
-/* Not used. */
-/* convert opcode suffix ('b' 'w' 'l' typically) into type specifier */
-
-static INLINE unsigned long
-opcode_suffix_to_type (s)
- unsigned long s;
-{
- return (s == BYTE_OPCODE_SUFFIX
- ? Byte : (s == WORD_OPCODE_SUFFIX
- ? Word : DWord));
-} /* opcode_suffix_to_type() */
-#endif
-
static INLINE int
fits_in_signed_byte (num)
long num;
@@ -422,11 +459,114 @@ smallest_imm_type (num)
: (Imm32));
} /* smallest_imm_type() */
+/* 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
+ added. */
+static int
+add_prefix (prefix)
+ unsigned int 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 (i.prefix[q])
+ {
+ as_bad (_("same type of prefix used twice"));
+ return 0;
+ }
+
+ i.prefixes += 1;
+ i.prefix[q] = prefix;
+ return ret;
+}
+
static void
set_16bit_code_flag (new_16bit_code_flag)
- int new_16bit_code_flag;
+ int new_16bit_code_flag;
{
flag_16bit_code = new_16bit_code_flag;
+ stackop_size = '\0';
+}
+
+static void
+set_16bit_gcc_code_flag (new_16bit_code_flag)
+ int new_16bit_code_flag;
+{
+ flag_16bit_code = new_16bit_code_flag;
+ stackop_size = new_16bit_code_flag ? 'l' : '\0';
+}
+
+static void
+set_intel_syntax (syntax_flag)
+ int syntax_flag;
+{
+ /* Find out if register prefixing is specified. */
+ int ask_naked_reg = 0;
+
+ SKIP_WHITESPACE ();
+ if (! is_end_of_line[(unsigned char) *input_line_pointer])
+ {
+ char *string = input_line_pointer;
+ int e = get_symbol_end ();
+
+ if (strcmp(string, "prefix") == 0)
+ ask_naked_reg = 1;
+ else if (strcmp(string, "noprefix") == 0)
+ ask_naked_reg = -1;
+ else
+ as_bad (_("bad argument to syntax directive."));
+ *input_line_pointer = e;
+ }
+ demand_empty_rest_of_line ();
+
+ intel_syntax = syntax_flag;
+
+ if (ask_naked_reg == 0)
+ {
+#ifdef BFD_ASSEMBLER
+ allow_naked_reg = (intel_syntax
+ && (bfd_get_symbol_leading_char (stdoutput) != '\0'));
+#else
+ allow_naked_reg = 0; /* conservative default */
+#endif
+ }
+ else
+ allow_naked_reg = (ask_naked_reg < 0);
}
const pseudo_typeS md_pseudo_table[] =
@@ -445,23 +585,21 @@ const pseudo_typeS md_pseudo_table[] =
{"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},
+ {"intel_syntax", set_intel_syntax, 1},
+ {"att_syntax", set_intel_syntax, 0},
{0, 0, 0}
};
/* for interface with expression () */
extern char *input_line_pointer;
-/* obstack for constructing various things in md_begin */
-struct obstack o;
-
-/* hash table for opcode lookup */
+/* hash table for instruction mnemonic lookup */
static struct hash_control *op_hash;
/* hash table for register lookup */
static struct hash_control *reg_hash;
-/* hash table for prefix lookup */
-static struct hash_control *prefix_hash;
void
@@ -469,46 +607,40 @@ md_begin ()
{
const char *hash_err;
- obstack_begin (&o, 4096);
-
/* initialize op_hash hash table */
op_hash = hash_new ();
{
register const template *optab;
register templates *core_optab;
- char *prev_name;
optab = i386_optab; /* setup for loop */
- prev_name = optab->name;
- obstack_grow (&o, optab, sizeof (template));
core_optab = (templates *) xmalloc (sizeof (templates));
+ core_optab->start = optab;
- for (optab++; optab < i386_optab_end; optab++)
+ while (1)
{
- if (!strcmp (optab->name, prev_name))
- {
- /* same name as before --> append to current template list */
- obstack_grow (&o, optab, sizeof (template));
- }
- else
+ ++optab;
+ if (optab->name == NULL
+ || strcmp (optab->name, (optab - 1)->name) != 0)
{
/* different name --> ship out current template list;
add to hash table; & begin anew */
- /* Note: end must be set before start! since obstack_next_free
- changes upon opstack_finish */
- core_optab->end = (template *) obstack_next_free (&o);
- core_optab->start = (template *) obstack_finish (&o);
- hash_err = hash_insert (op_hash, prev_name, (char *) core_optab);
+ 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", prev_name,
+ as_fatal (_("Internal Error: Can't hash %s: %s"),
+ (optab - 1)->name,
hash_err);
}
- prev_name = optab->name;
+ if (optab->name == NULL)
+ break;
core_optab = (templates *) xmalloc (sizeof (templates));
- obstack_grow (&o, optab, sizeof (template));
+ core_optab->start = optab;
}
}
}
@@ -518,7 +650,9 @@ md_begin ()
{
register const reg_entry *regtab;
- for (regtab = i386_regtab; regtab < i386_regtab_end; regtab++)
+ for (regtab = i386_regtab;
+ regtab < i386_regtab + sizeof (i386_regtab) / sizeof (i386_regtab[0]);
+ regtab++)
{
hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab);
if (hash_err)
@@ -526,66 +660,48 @@ md_begin ()
}
}
- esp = (reg_entry *) hash_find (reg_hash, "esp");
- ebp = (reg_entry *) hash_find (reg_hash, "ebp");
-
- /* initialize reg_hash hash table */
- prefix_hash = hash_new ();
- {
- register const prefix_entry *prefixtab;
-
- for (prefixtab = i386_prefixtab;
- prefixtab < i386_prefixtab_end; prefixtab++)
- {
- hash_err = hash_insert (prefix_hash, prefixtab->prefix_name,
- (PTR) prefixtab);
- if (hash_err)
- goto hash_error;
- }
- }
-
- /* fill in lexical tables: opcode_chars, operand_chars, space_chars */
+ /* fill in lexical tables: mnemonic_chars, operand_chars. */
{
register int c;
register char *p;
for (c = 0; c < 256; c++)
{
- if (islower (c) || isdigit (c))
+ if (isdigit (c))
{
- opcode_chars[c] = c;
+ digit_chars[c] = c;
+ mnemonic_chars[c] = c;
register_chars[c] = c;
+ operand_chars[c] = c;
}
- else if (isupper (c))
+ else if (islower (c))
{
- opcode_chars[c] = tolower (c);
- register_chars[c] = opcode_chars[c];
- }
- else if (c == PREFIX_SEPERATOR)
- {
- opcode_chars[c] = c;
+ mnemonic_chars[c] = c;
+ register_chars[c] = c;
+ operand_chars[c] = c;
}
- else if (c == ')' || c == '(')
+ else if (isupper (c))
{
- register_chars[c] = c;
+ mnemonic_chars[c] = tolower (c);
+ register_chars[c] = mnemonic_chars[c];
+ operand_chars[c] = c;
}
- if (isupper (c) || islower (c) || isdigit (c))
- operand_chars[c] = c;
-
- if (isdigit (c) || c == '-')
- digit_chars[c] = c;
-
- if (isalpha (c) || c == '_' || c == '.' || isdigit (c))
+ if (isalpha (c) || isdigit (c))
identifier_chars[c] = c;
+ else if (c >= 128)
+ {
+ identifier_chars[c] = c;
+ operand_chars[c] = c;
+ }
+ }
#ifdef LEX_AT
- identifier_chars['@'] = '@';
+ identifier_chars['@'] = '@';
#endif
-
- if (c == ' ' || c == '\t')
- space_chars[c] = c;
- }
+ digit_chars['-'] = '-';
+ identifier_chars['_'] = '_';
+ identifier_chars['.'] = '.';
for (p = operand_special_chars; *p != '\0'; p++)
operand_chars[(unsigned char) *p] = *p;
@@ -607,7 +723,6 @@ i386_print_statistics (file)
{
hash_print_statistics (file, "i386 opcode", op_hash);
hash_print_statistics (file, "i386 register", reg_hash);
- hash_print_statistics (file, "i386 prefix", prefix_hash);
}
@@ -640,12 +755,12 @@ pi (line, x)
pt (x->types[i]);
fprintf (stdout, "\n");
if (x->types[i]
- & (Reg | SReg2 | SReg3 | Control | Debug | Test | RegMMX))
- fprintf (stdout, "%s\n", x->regs[i]->reg_name);
+ & (Reg | SReg2 | SReg3 | Control | Debug | Test | RegMMX | RegXMM))
+ fprintf (stdout, "%s\n", x->op[i].regs->reg_name);
if (x->types[i] & Imm)
- pe (x->imms[i]);
- if (x->types[i] & (Disp | Abs))
- pe (x->disps[i]);
+ pe (x->op[i].imms);
+ if (x->types[i] & Disp)
+ pe (x->op[i].disps);
}
}
@@ -676,9 +791,9 @@ static void
pe (e)
expressionS *e;
{
- fprintf (stdout, " operation %d\n", e->X_op);
- fprintf (stdout, " add_number %d (%x)\n",
- e->X_add_number, e->X_add_number);
+ fprintf (stdout, " operation %d\n", e->X_op);
+ fprintf (stdout, " add_number %ld (%lx)\n",
+ (long) e->X_add_number, (long) e->X_add_number);
if (e->X_add_symbol)
{
fprintf (stdout, " add_symbol ");
@@ -718,28 +833,25 @@ type_names[] =
{ Imm8S, "i8s" },
{ Imm16, "i16" },
{ Imm32, "i32" },
- { Mem8, "Mem8" },
- { Mem16, "Mem16" },
- { Mem32, "Mem32" },
+ { Imm1, "i1" },
{ BaseIndex, "BaseIndex" },
- { Abs8, "Abs8" },
- { Abs16, "Abs16" },
- { Abs32, "Abs32" },
{ Disp8, "d8" },
{ Disp16, "d16" },
{ Disp32, "d32" },
- { SReg2, "SReg2" },
- { SReg3, "SReg3" },
- { Acc, "Acc" },
{ InOutPortReg, "InOutPortReg" },
{ ShiftCount, "ShiftCount" },
- { Imm1, "i1" },
{ Control, "control reg" },
{ Test, "test reg" },
+ { Debug, "debug reg" },
{ FloatReg, "FReg" },
{ FloatAcc, "FAcc" },
+ { SReg2, "SReg2" },
+ { SReg3, "SReg3" },
+ { Acc, "Acc" },
{ JumpAbsolute, "Jump Absolute" },
{ RegMMX, "rMMX" },
+ { RegXMM, "rXMM" },
+ { EsSeg, "es" },
{ 0, "" }
};
@@ -751,7 +863,7 @@ pt (t)
if (t == Unknown)
{
- fprintf (stdout, "Unknown");
+ fprintf (stdout, _("Unknown"));
}
else
{
@@ -764,7 +876,25 @@ pt (t)
#endif /* DEBUG386 */
+int
+tc_i386_force_relocation (fixp)
+ struct fix *fixp;
+{
#ifdef BFD_ASSEMBLER
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 1;
+ return 0;
+#else
+ /* 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)
int size;
@@ -774,22 +904,26 @@ reloc (size, pcrel, other)
if (other != NO_RELOC) return other;
if (pcrel)
- switch (size)
- {
- case 1: return BFD_RELOC_8_PCREL;
- case 2: return BFD_RELOC_16_PCREL;
- case 4: return BFD_RELOC_32_PCREL;
- }
+ {
+ switch (size)
+ {
+ case 1: return BFD_RELOC_8_PCREL;
+ case 2: return BFD_RELOC_16_PCREL;
+ case 4: return BFD_RELOC_32_PCREL;
+ }
+ as_bad (_("can not do %d byte pc-relative relocation"), size);
+ }
else
- switch (size)
- {
- case 1: return BFD_RELOC_8;
- case 2: return BFD_RELOC_16;
- case 4: return BFD_RELOC_32;
- }
+ {
+ 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);
+ }
- as_bad ("Can not do %d byte %srelocation", size,
- pcrel ? "pc-relative " : "");
return BFD_RELOC_NONE;
}
@@ -800,32 +934,54 @@ reloc (size, pcrel, other)
* some cases we force the original symbol to be used.
*/
int
-tc_i386_fix_adjustable(fixP)
- fixS * fixP;
+tc_i386_fix_adjustable (fixP)
+ fixS *fixP;
{
-#ifdef OBJ_ELF
- /* Prevent all adjustments to global symbols. */
+#if defined (OBJ_ELF) || defined (TE_PE)
+ /* Prevent all adjustments to global symbols, or else dynamic
+ linking will not work correctly. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
-#endif /* ! defined (OBJ_AOUT) */
+#endif
/* 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_386_GOT32
+ || fixP->fx_r_type == BFD_RELOC_RVA
+ || 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
#endif
+static int
+intel_float_operand PARAMS ((char *mnemonic));
+
+static int
+intel_float_operand (mnemonic)
+ char *mnemonic;
+{
+ if (mnemonic[0] == 'f' && mnemonic[1] =='i')
+ return 2;
+
+ if (mnemonic[0] == 'f')
+ return 1;
+
+ return 0;
+}
+
/* This is the guts of the machine-dependent assembler. LINE points to a
machine dependent instruction. This function is supposed to emit
the frags/bytes it assembles to. */
@@ -840,15 +996,9 @@ md_assemble (line)
/* Count the size of the instruction generated. */
int insn_size = 0;
- /* Possible templates for current insn */
- templates *current_templates = (templates *) 0;
-
int j;
- /* Wait prefix needs to come before any other prefixes, so handle it
- specially. wait_prefix will hold the opcode modifier flag FWait
- if a wait prefix is given. */
- int wait_prefix = 0;
+ char mnemonic[MAX_MNEM_SIZE];
/* Initialize globals. */
memset (&i, '\0', sizeof (i));
@@ -858,147 +1008,144 @@ md_assemble (line)
memset (im_expressions, '\0', sizeof (im_expressions));
save_stack_p = save_stack; /* reset stack pointer */
- /* First parse an opcode & call i386_operand for the operands.
+ /* 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) opcode. */
+ start of a (possibly prefixed) mnemonic. */
{
char *l = line;
-
- /* 1 if operand is pending after ','. */
- unsigned int expecting_operand = 0;
- /* 1 if we found a prefix only acceptable with string insns. */
- unsigned int expecting_string_instruction = 0;
- /* Non-zero if operand parens not balanced. */
- unsigned int paren_not_balanced;
char *token_start = l;
+ char *mnem_p;
- while (!is_space_char (*l) && *l != END_OF_INSN)
+ /* Non-zero if we found a prefix only acceptable with string insns. */
+ const char *expecting_string_instruction = NULL;
+
+ while (1)
{
- if (!is_opcode_char (*l))
+ mnem_p = mnemonic;
+ while ((*mnem_p = mnemonic_chars[(unsigned char) *l]) != 0)
{
- as_bad ("invalid character %s in opcode", output_invalid (*l));
- return;
+ mnem_p++;
+ if (mnem_p >= mnemonic + sizeof (mnemonic))
+ {
+ as_bad (_("no such 386 instruction: `%s'"), token_start);
+ return;
+ }
+ l++;
}
- else if (*l != PREFIX_SEPERATOR)
+ if (!is_space_char (*l)
+ && *l != END_OF_INSN
+ && *l != PREFIX_SEPARATOR)
{
- *l = opcode_chars[(unsigned char) *l]; /* fold case of opcodes */
- l++;
+ as_bad (_("invalid character %s in mnemonic"),
+ output_invalid (*l));
+ return;
}
- else
+ if (token_start == l)
{
- /* This opcode's got a prefix. */
- unsigned int q;
- prefix_entry *prefix;
+ if (*l == PREFIX_SEPARATOR)
+ as_bad (_("expecting prefix; got nothing"));
+ else
+ as_bad (_("expecting mnemonic; got nothing"));
+ return;
+ }
+
+ /* Look up instruction (or prefix) via hash table. */
+ current_templates = hash_find (op_hash, mnemonic);
- if (l == token_start)
+ if (*l != END_OF_INSN
+ && (! is_space_char (*l) || l[1] != END_OF_INSN)
+ && current_templates
+ && (current_templates->start->opcode_modifier & IsPrefix))
+ {
+ /* If we are in 16-bit mode, do not allow addr16 or data16.
+ 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))
{
- as_bad ("expecting prefix; got nothing");
+ as_bad (_("redundant %s prefix"),
+ current_templates->start->name);
return;
}
- END_STRING_AND_SAVE (l);
- prefix = (prefix_entry *) hash_find (prefix_hash, token_start);
- if (!prefix)
+ /* Add prefix, checking for repeated prefixes. */
+ switch (add_prefix (current_templates->start->base_opcode))
{
- as_bad ("no such opcode prefix ('%s')", token_start);
+ case 0:
return;
+ case 2:
+ expecting_string_instruction =
+ current_templates->start->name;
+ break;
}
- RESTORE_END_STRING (l);
- /* check for repeated prefix */
- for (q = 0; q < i.prefixes; q++)
- if (i.prefix[q] == prefix->prefix_code)
- {
- as_bad ("same prefix used twice; you don't really want this!");
- return;
- }
- if (prefix->prefix_code == FWAIT_OPCODE)
- {
- if (wait_prefix != 0)
- {
- as_bad ("same prefix used twice; you don't really want this!");
- return;
- }
- wait_prefix = FWait;
- }
- else
- {
- if (i.prefixes == MAX_PREFIXES)
- {
- as_bad ("too many opcode prefixes");
- return;
- }
- i.prefix[i.prefixes++] = prefix->prefix_code;
- if (prefix->prefix_code == REPE
- || prefix->prefix_code == REPNE)
- expecting_string_instruction = 1;
- }
- /* skip past PREFIX_SEPERATOR and reset token_start */
+ /* Skip past PREFIX_SEPARATOR and reset token_start. */
token_start = ++l;
}
- }
- END_STRING_AND_SAVE (l);
- if (token_start == l)
- {
- as_bad ("expecting opcode; got nothing");
- return;
+ else
+ break;
}
- /* Lookup insn in hash; try intel & att naming conventions if appropriate;
- that is: we only use the opcode suffix 'b' 'w' or 'l' if we need to. */
- current_templates = (templates *) hash_find (op_hash, token_start);
if (!current_templates)
{
- int last_index = strlen (token_start) - 1;
- char last_char = token_start[last_index];
- switch (last_char)
+ /* See if we can get a match by trimming off a suffix. */
+ switch (mnem_p[-1])
{
- case DWORD_OPCODE_SUFFIX:
- case WORD_OPCODE_SUFFIX:
- case BYTE_OPCODE_SUFFIX:
- token_start[last_index] = '\0';
- current_templates = (templates *) hash_find (op_hash, token_start);
- token_start[last_index] = last_char;
- i.suffix = last_char;
+ case WORD_MNEM_SUFFIX:
+ case BYTE_MNEM_SUFFIX:
+ case SHORT_MNEM_SUFFIX:
+ case LONG_MNEM_SUFFIX:
+ i.suffix = mnem_p[-1];
+ mnem_p[-1] = '\0';
+ current_templates = hash_find (op_hash, mnemonic);
+ break;
+
+ /* Intel Syntax */
+ case DWORD_MNEM_SUFFIX:
+ if (intel_syntax)
+ {
+ i.suffix = mnem_p[-1];
+ mnem_p[-1] = '\0';
+ current_templates = hash_find (op_hash, mnemonic);
+ break;
+ }
}
if (!current_templates)
{
- as_bad ("no such 386 instruction: `%s'", token_start);
+ as_bad (_("no such 386 instruction: `%s'"), token_start);
return;
}
}
- RESTORE_END_STRING (l);
/* check for rep/repne without a string instruction */
- if (expecting_string_instruction &&
- !IS_STRING_INSTRUCTION (current_templates->
- start->base_opcode))
+ if (expecting_string_instruction
+ && !(current_templates->start->opcode_modifier & IsString))
{
- as_bad ("expecting string instruction after rep/repne");
+ as_bad (_("expecting string instruction after `%s'"),
+ expecting_string_instruction);
return;
}
/* There may be operands to parse. */
- if (*l != END_OF_INSN &&
- /* For string instructions, we ignore any operands if given. This
- kludges, for example, 'rep/movsb %ds:(%esi), %es:(%edi)' where
- the operands are always going to be the same, and are not really
- encoded in machine code. */
- !IS_STRING_INSTRUCTION (current_templates->
- start->base_opcode))
+ if (*l != END_OF_INSN)
{
/* parse operands */
+
+ /* 1 if operand is pending after ','. */
+ unsigned int expecting_operand = 0;
+
+ /* Non-zero if operand parens not balanced. */
+ unsigned int paren_not_balanced;
+
do
{
/* skip optional white space before operand */
- while (!is_operand_char (*l) && *l != END_OF_INSN)
+ if (is_space_char (*l))
+ ++l;
+ if (!is_operand_char (*l) && *l != END_OF_INSN)
{
- if (!is_space_char (*l))
- {
- as_bad ("invalid character %s before %s operand",
- output_invalid (*l),
- ordinal_names[i.operands]);
- return;
- }
- l++;
+ as_bad (_("invalid character %s before operand %d"),
+ output_invalid (*l),
+ i.operands + 1);
+ return;
}
token_start = l; /* after white space */
paren_not_balanced = 0;
@@ -1008,8 +1155,12 @@ md_assemble (line)
{
if (paren_not_balanced)
{
- as_bad ("unbalanced parenthesis in %s operand.",
- ordinal_names[i.operands]);
+ if (!intel_syntax)
+ as_bad (_("unbalanced parenthesis in operand %d."),
+ i.operands + 1);
+ else
+ as_bad (_("unbalanced brackets in operand %d."),
+ i.operands + 1);
return;
}
else
@@ -1017,15 +1168,25 @@ md_assemble (line)
}
else if (!is_operand_char (*l) && !is_space_char (*l))
{
- as_bad ("invalid character %s in %s operand",
+ as_bad (_("invalid character %s in operand %d"),
output_invalid (*l),
- ordinal_names[i.operands]);
+ i.operands + 1);
return;
}
- if (*l == '(')
- ++paren_not_balanced;
- if (*l == ')')
- --paren_not_balanced;
+ if (!intel_syntax)
+ {
+ if (*l == '(')
+ ++paren_not_balanced;
+ if (*l == ')')
+ --paren_not_balanced;
+ }
+ else
+ {
+ if (*l == '[')
+ ++paren_not_balanced;
+ if (*l == ']')
+ --paren_not_balanced;
+ }
l++;
}
if (l != token_start)
@@ -1034,13 +1195,18 @@ md_assemble (line)
this_operand = i.operands++;
if (i.operands > MAX_OPERANDS)
{
- as_bad ("spurious operands; (%d operands/instruction max)",
+ as_bad (_("spurious operands; (%d operands/instruction max)"),
MAX_OPERANDS);
return;
}
/* now parse operand adding info to 'i' as we go along */
END_STRING_AND_SAVE (l);
- operand_ok = i386_operand (token_start);
+
+ if (intel_syntax)
+ 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 */
if (!operand_ok)
return;
@@ -1050,12 +1216,12 @@ md_assemble (line)
if (expecting_operand)
{
expecting_operand_after_comma:
- as_bad ("expecting operand after ','; got nothing");
+ as_bad (_("expecting operand after ','; got nothing"));
return;
}
if (*l == ',')
{
- as_bad ("expecting operand before ','; got nothing");
+ as_bad (_("expecting operand before ','; got nothing"));
return;
}
}
@@ -1074,52 +1240,161 @@ md_assemble (line)
}
}
- /* Now we've parsed the opcode into a set of templates, and have the
+ /* Now we've parsed the mnemonic into a set of templates, and have the
operands at hand.
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. */
-#define MATCH(overlap,given_type) \
- (overlap && \
- (((overlap & (JumpAbsolute|BaseIndex|Mem8)) \
- == (given_type & (JumpAbsolute|BaseIndex|Mem8))) \
- || (overlap == InOutPortReg)))
-
-
- /* If m0 and m1 are register matches they must be consistent
- with the expected operand types t0 and t1.
- That is, if both m0 & m1 are register matches
- i.e. ( ((m0 & (Reg)) && (m1 & (Reg)) ) ?
- then, either 1. or 2. must be true:
- 1. the expected operand type register overlap is null:
- (t0 & t1 & Reg) == 0
- AND
- the given register overlap is null:
- (m0 & m1 & Reg) == 0
- 2. the expected operand type register overlap == the given
- operand type overlap: (t0 & t1 & m0 & m1 & Reg).
- */
-#define CONSISTENT_REGISTER_MATCH(m0, m1, t0, t1) \
- ( ((m0 & (Reg)) && (m1 & (Reg))) ? \
- ( ((t0 & t1 & (Reg)) == 0 && (m0 & m1 & (Reg)) == 0) || \
- ((t0 & t1) & (m0 & m1) & (Reg)) \
- ) : 1)
+#define MATCH(overlap, given, template) \
+ ((overlap & ~JumpAbsolute) \
+ && ((given) & (BaseIndex|JumpAbsolute)) == ((overlap) & (BaseIndex|JumpAbsolute)))
+
+ /* If given types r0 and r1 are registers they must be of the same type
+ unless the expected operand type register overlap is null.
+ Note that Acc in a template matches every size of reg. */
+#define CONSISTENT_REGISTER_MATCH(m0, g0, t0, m1, g1, t1) \
+ ( ((g0) & Reg) == 0 || ((g1) & Reg) == 0 || \
+ ((g0) & Reg) == ((g1) & Reg) || \
+ ((((m0) & Acc) ? Reg : (t0)) & (((m1) & Acc) ? Reg : (t1)) & Reg) == 0 )
+
{
register unsigned int overlap0, overlap1;
- expressionS *exp;
unsigned int overlap2;
unsigned int found_reverse_match;
+ int suffix_check;
+
+ /* All intel opcodes have reversed operands except for "bound" and
+ "enter". We also don't reverse intersegment "jmp" and "call"
+ instructions with 2 immediate operands so that the immediate segment
+ precedes the offset, as it does when in AT&T mode. "enter" and the
+ intersegment "jmp" and "call" instructions are the only ones that
+ have two immediate operands. */
+ if (intel_syntax && i.operands > 1
+ && (strcmp (mnemonic, "bound") != 0)
+ && !((i.types[0] & Imm) && (i.types[1] & Imm)))
+ {
+ union i386_op temp_op;
+ unsigned int temp_type;
+ int xchg1 = 0;
+ int xchg2 = 0;
+
+ if (i.operands == 2)
+ {
+ xchg1 = 0;
+ xchg2 = 1;
+ }
+ else if (i.operands == 3)
+ {
+ xchg1 = 0;
+ xchg2 = 2;
+ }
+ temp_type = i.types[xchg2];
+ i.types[xchg2] = i.types[xchg1];
+ i.types[xchg1] = temp_type;
+ temp_op = i.op[xchg2];
+ i.op[xchg2] = i.op[xchg1];
+ i.op[xchg1] = temp_op;
+
+ if (i.mem_operands == 2)
+ {
+ const seg_entry *temp_seg;
+ temp_seg = i.seg[0];
+ i.seg[0] = i.seg[1];
+ i.seg[1] = temp_seg;
+ }
+ }
+
+ if (i.imm_operands)
+ {
+ /* Try to ensure constant immediates are represented in the smallest
+ opcode possible. */
+ char guess_suffix = 0;
+ int op;
+
+ if (i.suffix)
+ guess_suffix = i.suffix;
+ else if (i.reg_operands)
+ {
+ /* Figure out a suffix from the last register operand specified.
+ 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; )
+ 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;
+ break;
+ }
+ }
+ else if (flag_16bit_code ^ (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)
+ {
+ /* If a suffix is given, this operand may be shortened. */
+ switch (guess_suffix)
+ {
+ case WORD_MNEM_SUFFIX:
+ i.types[op] |= Imm16;
+ break;
+ case BYTE_MNEM_SUFFIX:
+ i.types[op] |= Imm16 | Imm8 | Imm8S;
+ 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);
+ }
+ i.types[op] |= smallest_imm_type ((long) i.op[op].imms->X_add_number);
+ }
+ }
+
+ overlap0 = 0;
+ overlap1 = 0;
+ overlap2 = 0;
+ found_reverse_match = 0;
+ suffix_check = (i.suffix == BYTE_MNEM_SUFFIX
+ ? No_bSuf
+ : (i.suffix == WORD_MNEM_SUFFIX
+ ? No_wSuf
+ : (i.suffix == SHORT_MNEM_SUFFIX
+ ? No_sSuf
+ : (i.suffix == LONG_MNEM_SUFFIX
+ ? No_lSuf
+ : (i.suffix == DWORD_MNEM_SUFFIX
+ ? No_dSuf
+ : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0))))));
- overlap0 = overlap1 = overlap2 = found_reverse_match = 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->base_opcode == 0xd9
+ && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */
+ || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */
+ continue;
+
else if (!t->operands)
break; /* 0 operands always matches */
@@ -1127,50 +1402,56 @@ md_assemble (line)
switch (t->operands)
{
case 1:
- if (!MATCH (overlap0, i.types[0]))
+ if (!MATCH (overlap0, i.types[0], t->operand_types[0]))
continue;
break;
case 2:
case 3:
overlap1 = i.types[1] & t->operand_types[1];
- if (!MATCH (overlap0, i.types[0]) ||
- !MATCH (overlap1, i.types[1]) ||
- !CONSISTENT_REGISTER_MATCH (overlap0, overlap1,
- t->operand_types[0],
- t->operand_types[1]))
+ if (!MATCH (overlap0, i.types[0], t->operand_types[0])
+ || !MATCH (overlap1, i.types[1], t->operand_types[1])
+ || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
+ t->operand_types[0],
+ overlap1, i.types[1],
+ t->operand_types[1]))
{
/* check if other direction is valid ... */
- if (!(t->opcode_modifier & COMES_IN_BOTH_DIRECTIONS))
+ if ((t->opcode_modifier & (D|FloatD)) == 0)
continue;
/* 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]) ||
- !MATCH (overlap1, i.types[1]) ||
- !CONSISTENT_REGISTER_MATCH (overlap0, overlap1,
- t->operand_types[1],
- t->operand_types[0]))
+ if (!MATCH (overlap0, i.types[0], t->operand_types[1])
+ || !MATCH (overlap1, i.types[1], t->operand_types[0])
+ || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
+ t->operand_types[1],
+ overlap1, i.types[1],
+ t->operand_types[0]))
{
/* does not match either direction */
continue;
}
- /* found a reverse match here -- slip through */
- /* found_reverse_match holds which of D or FloatD we've found */
- found_reverse_match = t->opcode_modifier & COMES_IN_BOTH_DIRECTIONS;
- } /* endif: not forward match */
- /* found either forward/reverse 2 operand match here */
+ /* 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)
{
+ /* Here we make use of the fact that there are no
+ reverse match 3 operand instructions, and all 3
+ operand instructions only need to be checked for
+ register consistency between operands 2 and 3. */
overlap2 = i.types[2] & t->operand_types[2];
- if (!MATCH (overlap2, i.types[2]) ||
- !CONSISTENT_REGISTER_MATCH (overlap0, overlap2,
- t->operand_types[0],
- t->operand_types[2]) ||
- !CONSISTENT_REGISTER_MATCH (overlap1, overlap2,
- t->operand_types[1],
- t->operand_types[2]))
+ if (!MATCH (overlap2, i.types[2], t->operand_types[2])
+ || !CONSISTENT_REGISTER_MATCH (overlap1, i.types[1],
+ t->operand_types[1],
+ overlap2, i.types[2],
+ t->operand_types[2]))
+
continue;
}
/* found either forward/reverse 2 or 3 operand match here:
@@ -1180,247 +1461,397 @@ md_assemble (line)
} /* for (t = ... */
if (t == current_templates->end)
{ /* we found no match */
- as_bad ("operands given don't match any known 386 instruction");
+ 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))
+ {
+ 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);
+ }
+
/* Copy the template we found. */
i.tm = *t;
- i.tm.opcode_modifier |= wait_prefix;
-
if (found_reverse_match)
{
+ /* If we found a reverse match we must alter the opcode
+ direction bit. found_reverse_match holds bits to change
+ (different for int & float insns). */
+
+ i.tm.base_opcode ^= found_reverse_match;
+
i.tm.operand_types[0] = t->operand_types[1];
i.tm.operand_types[1] = t->operand_types[0];
}
- /* If the matched instruction specifies an explicit opcode suffix,
- use it - and make sure none has already been specified. */
- if (i.tm.opcode_modifier & (Data16|Data32))
+ /* 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 (i.tm.opcode_modifier & FWait)
+ if (! add_prefix (FWAIT_OPCODE))
+ return;
+
+ /* Check string instruction segment overrides */
+ if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0)
{
- if (i.suffix)
+ int mem_op = (i.types[0] & AnyMem) ? 0 : 1;
+ if ((i.tm.operand_types[mem_op] & EsSeg) != 0)
{
- as_bad ("extraneous opcode suffix given");
- return;
+ if (i.seg[0] != NULL && i.seg[0] != &es)
+ {
+ as_bad (_("`%s' operand %d must use `%%es' segment"),
+ i.tm.name,
+ mem_op + 1);
+ return;
+ }
+ /* There's only ever one segment override allowed per instruction.
+ This instruction possibly has a legal segment override on the
+ second operand, so copy the segment to where non-string
+ instructions store it, allowing common code. */
+ i.seg[0] = i.seg[1];
+ }
+ else if ((i.tm.operand_types[mem_op + 1] & EsSeg) != 0)
+ {
+ if (i.seg[1] != NULL && i.seg[1] != &es)
+ {
+ as_bad (_("`%s' operand %d must use `%%es' segment"),
+ i.tm.name,
+ mem_op + 2);
+ return;
+ }
}
- if (i.tm.opcode_modifier & Data16)
- i.suffix = WORD_OPCODE_SUFFIX;
- else
- i.suffix = DWORD_OPCODE_SUFFIX;
}
- /* If there's no opcode suffix we try to invent one based on register
- operands. */
- if (!i.suffix && i.reg_operands)
+ /* If matched instruction specifies an explicit instruction mnemonic
+ suffix, use it. */
+ if (i.tm.opcode_modifier & (Size16 | Size32))
{
- /* We take i.suffix from the LAST register operand specified. This
- assumes that the last register operands is the destination register
- operand. */
- int op;
- for (op = 0; op < MAX_OPERANDS; op++)
- if (i.types[op] & Reg)
- {
- i.suffix = ((i.types[op] & Reg8) ? BYTE_OPCODE_SUFFIX :
- (i.types[op] & Reg16) ? WORD_OPCODE_SUFFIX :
- DWORD_OPCODE_SUFFIX);
- }
+ if (i.tm.opcode_modifier & Size16)
+ i.suffix = WORD_MNEM_SUFFIX;
+ else
+ i.suffix = LONG_MNEM_SUFFIX;
}
- else if (i.suffix != 0
- && i.reg_operands != 0
- && (i.types[i.operands - 1] & Reg) != 0)
+ else if (i.reg_operands)
{
- int bad;
+ /* If there's no instruction mnemonic suffix we try to invent one
+ 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; )
+ 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 :
+ LONG_MNEM_SUFFIX);
+ break;
+ }
+ }
+ else if (i.suffix == BYTE_MNEM_SUFFIX)
+ {
+ int op;
+ 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. */
+ if (i.types[op] & Reg8)
+ continue;
- /* If the last operand is a register, make sure it is
- compatible with the suffix. */
+ /* 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 == 0xfbe
+ || i.tm.base_opcode == 0xfbf))
+ continue;
- bad = 0;
- switch (i.suffix)
+ if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4
+#if 0
+ /* Check that the template allows eight bit regs
+ This kills insns such as `orb $1,%edx', which
+ maybe should be allowed. */
+ && (i.tm.operand_types[op] & (Reg8|InOutPortReg))
+#endif
+ )
+ {
+#if REGISTER_WARNINGS
+ if ((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->reg_name,
+ i.suffix);
+#endif
+ continue;
+ }
+ /* Any other register is bad */
+ if (i.types[op] & (Reg | RegMMX | RegXMM
+ | SReg2 | SReg3
+ | Control | Debug | Test
+ | FloatReg | FloatAcc))
+ {
+ as_bad (_("`%%%s' not allowed with `%s%c'"),
+ i.op[op].regs->reg_name,
+ i.tm.name,
+ i.suffix);
+ return;
+ }
+ }
+ }
+ else if (i.suffix == LONG_MNEM_SUFFIX)
{
- default:
- abort ();
- case BYTE_OPCODE_SUFFIX:
- /* 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. */
- if ((i.types[i.operands - 1] & Reg8) == 0
- && i.regs[i.operands - 1]->reg_num >= 4)
- bad = 1;
- break;
- case WORD_OPCODE_SUFFIX:
- case DWORD_OPCODE_SUFFIX:
- /* We don't insist on the presence or absence of the e
- prefix on the register, but we reject eight bit
- registers. */
- if ((i.types[i.operands - 1] & Reg8) != 0)
- bad = 1;
+ 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;
+ }
+#if REGISTER_WARNINGS
+ /* Warn if the e prefix on a general reg is missing. */
+ else if ((i.types[op] & Reg16) != 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);
+ }
+#endif
+ }
+ else if (i.suffix == WORD_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;
+ }
+#if REGISTER_WARNINGS
+ /* Warn if the e prefix on a general reg is present. */
+ else if ((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);
+ }
+#endif
}
- if (bad)
- as_bad ("register does not match opcode suffix");
+ else
+ 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!
- We assume this. */
+ given in i.suffix. Note: overlap2 cannot be an immediate! */
if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32))
&& overlap0 != Imm8 && overlap0 != Imm8S
&& overlap0 != Imm16 && overlap0 != Imm32)
{
- if (!i.suffix)
+ if (i.suffix)
{
- as_bad ("no opcode suffix given; can't determine immediate size");
+ overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) :
+ (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32));
+ }
+ else if (overlap0 == (Imm16 | Imm32))
+ {
+ overlap0 =
+ (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32;
+ }
+ else
+ {
+ as_bad (_("no instruction mnemonic suffix given; can't determine immediate size"));
return;
}
- overlap0 &= (i.suffix == BYTE_OPCODE_SUFFIX ? (Imm8 | Imm8S) :
- (i.suffix == WORD_OPCODE_SUFFIX ? Imm16 : Imm32));
}
if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32))
&& overlap1 != Imm8 && overlap1 != Imm8S
&& overlap1 != Imm16 && overlap1 != Imm32)
{
- if (!i.suffix)
+ if (i.suffix)
{
- as_bad ("no opcode suffix given; can't determine immediate size");
+ overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) :
+ (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32));
+ }
+ else if (overlap1 == (Imm16 | Imm32))
+ {
+ overlap1 =
+ (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32;
+ }
+ else
+ {
+ as_bad (_("no instruction mnemonic suffix given; can't determine immediate size"));
return;
}
- overlap1 &= (i.suffix == BYTE_OPCODE_SUFFIX ? (Imm8 | Imm8S) :
- (i.suffix == WORD_OPCODE_SUFFIX ? Imm16 : Imm32));
}
+ assert ((overlap2 & Imm) == 0);
i.types[0] = overlap0;
- i.types[1] = overlap1;
- i.types[2] = overlap2;
-
if (overlap0 & ImplicitRegister)
i.reg_operands--;
+ if (overlap0 & Imm1)
+ i.imm_operands = 0; /* kludge for shift insns */
+
+ i.types[1] = overlap1;
if (overlap1 & ImplicitRegister)
i.reg_operands--;
+
+ i.types[2] = overlap2;
if (overlap2 & ImplicitRegister)
i.reg_operands--;
- if (overlap0 & Imm1)
- i.imm_operands = 0; /* kludge for shift insns */
/* Finalize opcode. First, we change the opcode based on the operand
- size given by i.suffix: we never have to change things for byte insns,
- or when no opcode suffix is need to size the operands. */
+ size given by i.suffix: We need not change things for byte insns. */
if (!i.suffix && (i.tm.opcode_modifier & W))
{
- as_bad ("no opcode suffix given and no register operands; can't size instruction");
+ as_bad (_("no instruction mnemonic suffix given and no register operands; can't size instruction"));
return;
}
- if (i.suffix && i.suffix != BYTE_OPCODE_SUFFIX)
+ /* 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)
+ {
+ unsigned int prefix = DATA_PREFIX_OPCODE;
+
+ if ((i.op[1].regs->reg_type & Reg16) != 0)
+ if (!add_prefix (prefix))
+ return;
+ }
+
+ if (i.suffix && i.suffix != BYTE_MNEM_SUFFIX)
{
- /* Select between byte and word/dword operations. */
+ /* It's not a byte, select word/dword operation. */
if (i.tm.opcode_modifier & W)
- i.tm.base_opcode |= W;
- /* Now select between word & dword operations via the
- operand size prefix. */
- if ((i.suffix == WORD_OPCODE_SUFFIX) ^ flag_16bit_code)
{
- if (i.prefixes == MAX_PREFIXES)
- {
- as_bad ("%d prefixes given and data size prefix gives too many prefixes",
- MAX_PREFIXES);
- return;
- }
- i.prefix[i.prefixes++] = WORD_PREFIX_OPCODE;
+ if (i.tm.opcode_modifier & ShortForm)
+ i.tm.base_opcode |= 8;
+ else
+ i.tm.base_opcode |= 1;
+ }
+ /* 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
+ && !(i.tm.opcode_modifier & IgnoreSize))
+ {
+ unsigned int prefix = DATA_PREFIX_OPCODE;
+ if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */
+ prefix = ADDR_PREFIX_OPCODE;
+
+ if (! add_prefix (prefix))
+ return;
+ }
+ /* Size floating point instruction. */
+ if (i.suffix == LONG_MNEM_SUFFIX
+ || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX))
+ {
+ if (i.tm.opcode_modifier & FloatMF)
+ i.tm.base_opcode ^= 4;
}
}
+ if (i.tm.opcode_modifier & ImmExt)
+ {
+ /* These AMD 3DNow! and Intel Katmai New Instructions have an
+ opcode suffix which is coded in the same place as an 8-bit
+ immediate field would be. Here we fake an 8-bit immediate
+ operand from the opcode suffix stored in tm.extension_opcode. */
+
+ expressionS *exp;
+
+ assert(i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS);
+
+ exp = &im_expressions[i.imm_operands++];
+ i.op[i.operands].imms = exp;
+ i.types[i.operands++] = Imm8;
+ exp->X_op = O_constant;
+ exp->X_add_number = i.tm.extension_opcode;
+ i.tm.extension_opcode = None;
+ }
+
/* For insns with operands there are more diddles to do to the opcode. */
if (i.operands)
{
- /* Default segment register this instruction will use
+ /* Default segment register this instruction will use
for memory accesses. 0 means unknown.
This is only for optimizing out unnecessary segment overrides. */
const seg_entry *default_seg = 0;
- /* True if this instruction uses a memory addressing mode,
- and therefore may need an address-size prefix. */
- int uses_mem_addrmode = 0;
-
-
- /* If we found a reverse match we must alter the opcode direction bit
- found_reverse_match holds bit to set (different for int &
- float insns). */
-
- if (found_reverse_match)
- {
- i.tm.base_opcode |= found_reverse_match;
- }
-
/* The imul $imm, %reg instruction is converted into
- imul $imm, %reg, %reg. */
- if (i.tm.opcode_modifier & imulKludge)
- {
- /* Pretend we saw the 3 operand case. */
- i.regs[2] = i.regs[1];
- i.reg_operands = 2;
- }
-
- /* The clr %reg instruction is converted into xor %reg, %reg. */
- if (i.tm.opcode_modifier & iclrKludge)
+ imul $imm, %reg, %reg, and the clr %reg instruction
+ is converted into xor %reg, %reg. */
+ if (i.tm.opcode_modifier & regKludge)
{
- i.regs[1] = i.regs[0];
+ 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];
i.reg_operands = 2;
}
- /* Certain instructions expect the destination to be in the i.rm.reg
- field. This is by far the exceptional case. For these
- instructions, if the source operand is a register, we must reverse
- the i.rm.reg and i.rm.regmem fields. We accomplish this by faking
- that the two register operands were given in the reverse order. */
- if ((i.tm.opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2)
- {
- unsigned int first_reg_operand = (i.types[0] & Reg) ? 0 : 1;
- unsigned int second_reg_operand = first_reg_operand + 1;
- reg_entry *tmp = i.regs[first_reg_operand];
- i.regs[first_reg_operand] = i.regs[second_reg_operand];
- i.regs[second_reg_operand] = tmp;
- }
-
if (i.tm.opcode_modifier & ShortForm)
{
/* 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. */
- i.tm.base_opcode |= i.regs[op]->reg_num;
- }
- else if (i.tm.opcode_modifier & ShortFormW)
- {
- /* Short form with 0x8 width bit. Register is always dest. operand */
- i.tm.base_opcode |= i.regs[1]->reg_num;
- if (i.suffix == WORD_OPCODE_SUFFIX ||
- i.suffix == DWORD_OPCODE_SUFFIX)
- i.tm.base_opcode |= 0x8;
- }
- else if (i.tm.opcode_modifier & Seg2ShortForm)
- {
- if (i.tm.base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1)
+ i.tm.base_opcode |= i.op[op].regs->reg_num;
+ if ((i.tm.opcode_modifier & Ugh) != 0)
{
- as_bad ("you can't 'pop cs' on the 386.");
- return;
+ /* 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. */
+ 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 */
+ as_warn (_("translating to `%s %%%s'"), i.tm.name,
+ i.op[0].regs->reg_name);
+ }
}
- i.tm.base_opcode |= (i.regs[0]->reg_num << 3);
- }
- else if (i.tm.opcode_modifier & Seg3ShortForm)
- {
- /* 'push %fs' is 0x0fa0; 'pop %fs' is 0x0fa1.
- 'push %gs' is 0x0fa8; 'pop %fs' is 0x0fa9.
- So, only if i.regs[0]->reg_num == 5 (%gs) do we need
- to change the opcode. */
- if (i.regs[0]->reg_num == 5)
- i.tm.base_opcode |= 0x08;
- }
- else if ((i.tm.base_opcode & ~DW) == MOV_AX_DISP32)
- {
- /* This is a special non-modrm instruction
- that addresses memory with a 32-bit displacement mode anyway,
- and thus requires an address-size prefix if in 16-bit mode. */
- uses_mem_addrmode = 1;
- default_seg = &ds;
}
else if (i.tm.opcode_modifier & Modrm)
{
@@ -1435,30 +1866,29 @@ md_assemble (line)
{
unsigned int source, dest;
source = ((i.types[0]
- & (Reg
- | SReg2
- | SReg3
- | Control
- | Debug
- | Test
- | RegMMX))
+ & (Reg | RegMMX | RegXMM
+ | SReg2 | SReg3
+ | Control | Debug | Test))
? 0 : 1);
dest = source + 1;
+
i.rm.mode = 3;
- /* We must be careful to make sure that all
- segment/control/test/debug/MMX registers go into
- the i.rm.reg field (despite the whether they are
- source or destination operands). */
- if (i.regs[dest]->reg_type
- & (SReg2 | SReg3 | Control | Debug | Test | RegMMX))
+ /* One of the register operands will be encoded in the
+ i.tm.reg field, the other in the combined i.tm.mode
+ and i.tm.regmem fields. If no form of this
+ instruction supports a memory destination operand,
+ then we assume the source operand may sometimes be
+ a memory operand and so we need to store the
+ destination in the i.rm.reg field. */
+ if ((i.tm.operand_types[dest] & AnyMem) == 0)
{
- i.rm.reg = i.regs[dest]->reg_num;
- i.rm.regmem = i.regs[source]->reg_num;
+ i.rm.reg = i.op[dest].regs->reg_num;
+ i.rm.regmem = i.op[source].regs->reg_num;
}
else
{
- i.rm.reg = i.regs[source]->reg_num;
- i.rm.regmem = i.regs[dest]->reg_num;
+ i.rm.reg = i.op[source].regs->reg_num;
+ i.rm.regmem = i.op[dest].regs->reg_num;
}
}
else
@@ -1466,116 +1896,129 @@ md_assemble (line)
if (i.mem_operands)
{
unsigned int fake_zero_displacement = 0;
- unsigned int op = (i.types[0] & Mem) ? 0 : ((i.types[1] & Mem) ? 1 : 2);
+ unsigned int op = ((i.types[0] & AnyMem)
+ ? 0
+ : (i.types[1] & AnyMem) ? 1 : 2);
- /* Encode memory operand into modrm byte and base index
- byte. */
+ default_seg = &ds;
- if (i.base_reg == esp && !i.index_reg)
+ if (! i.base_reg)
{
- /* <disp>(%esp) becomes two byte modrm with no index
- register. */
- i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
- i.rm.mode = mode_from_disp_size (i.types[op]);
- i.bi.base = ESP_REG_NUM;
- i.bi.index = NO_INDEX_REGISTER;
- i.bi.scale = 0; /* Must be zero! */
- }
- else if (i.base_reg == ebp && !i.index_reg)
- {
- if (!(i.types[op] & Disp))
+ i.rm.mode = 0;
+ if (! i.disp_operands)
+ fake_zero_displacement = 1;
+ if (! i.index_reg)
{
- /* Must fake a zero byte displacement. There is
- no direct way to code '(%ebp)' directly. */
- fake_zero_displacement = 1;
- /* fake_zero_displacement code does not set this. */
- i.types[op] |= Disp8;
- }
- i.rm.mode = mode_from_disp_size (i.types[op]);
- i.rm.regmem = EBP_REG_NUM;
- }
- else if (!i.base_reg && (i.types[op] & BaseIndex))
- {
- /* There are three cases here.
- Case 1: '<32bit disp>(,1)' -- indirect absolute.
- (Same as cases 2 & 3 with NO index register)
- Case 2: <32bit disp> (,<index>) -- no base register with disp
- Case 3: (, <index>) --- no base register;
- no disp (must add 32bit 0 disp). */
- i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
- i.rm.mode = 0; /* 32bit mode */
- i.bi.base = NO_BASE_REGISTER;
- i.types[op] &= ~Disp;
- i.types[op] |= Disp32; /* Must be 32bit! */
- if (i.index_reg)
- { /* case 2 or case 3 */
- i.bi.index = i.index_reg->reg_num;
- i.bi.scale = i.log2_scale_factor;
- if (i.disp_operands == 0)
- fake_zero_displacement = 1; /* case 3 */
+ /* Operand is just <disp> */
+ if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0))
+ {
+ i.rm.regmem = NO_BASE_REGISTER_16;
+ i.types[op] &= ~Disp;
+ i.types[op] |= Disp16;
+ }
+ else
+ {
+ i.rm.regmem = NO_BASE_REGISTER;
+ i.types[op] &= ~Disp;
+ i.types[op] |= Disp32;
+ }
}
- else
+ else /* ! i.base_reg && i.index_reg */
{
- i.bi.index = NO_INDEX_REGISTER;
- i.bi.scale = 0;
+ 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 */
}
}
- else if (i.disp_operands && !i.base_reg && !i.index_reg)
+ else if (i.base_reg->reg_type & Reg16)
{
- /* Operand is just <32bit disp> */
- i.rm.regmem = EBP_REG_NUM;
- i.rm.mode = 0;
- i.types[op] &= ~Disp;
- i.types[op] |= Disp32;
+ switch (i.base_reg->reg_num)
+ {
+ case 3: /* (%bx) */
+ if (! i.index_reg)
+ i.rm.regmem = 7;
+ else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */
+ i.rm.regmem = i.index_reg->reg_num - 6;
+ break;
+ 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) */
+ i.types[op] |= Disp8;
+ fake_zero_displacement = 1;
+ }
+ }
+ 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 */
+ i.rm.regmem = i.base_reg->reg_num - 6 + 4;
+ }
+ i.rm.mode = mode_from_disp_size (i.types[op]);
}
- else
+ else /* i.base_reg and 32 bit mode */
{
- /* It's not a special case; rev'em up. */
i.rm.regmem = i.base_reg->reg_num;
- i.rm.mode = mode_from_disp_size (i.types[op]);
- if (i.index_reg)
+ i.sib.base = i.base_reg->reg_num;
+ if (i.base_reg->reg_num == EBP_REG_NUM)
{
- i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
- i.bi.base = i.base_reg->reg_num;
- i.bi.index = i.index_reg->reg_num;
- i.bi.scale = i.log2_scale_factor;
- if (i.base_reg == ebp && i.disp_operands == 0)
- { /* pace */
+ default_seg = &ss;
+ if (i.disp_operands == 0)
+ {
fake_zero_displacement = 1;
i.types[op] |= Disp8;
- i.rm.mode = mode_from_disp_size (i.types[op]);
}
}
+ else if (i.base_reg->reg_num == ESP_REG_NUM)
+ {
+ default_seg = &ss;
+ }
+ i.sib.scale = i.log2_scale_factor;
+ if (! i.index_reg)
+ {
+ /* <disp>(%esp) becomes two byte modrm
+ with no index register. We've already
+ stored the code for esp in i.rm.regmem
+ ie. ESCAPE_TO_TWO_BYTE_ADDRESSING. Any
+ base register besides %esp will not use
+ the extra modrm byte. */
+ i.sib.index = NO_INDEX_REGISTER;
+#if ! SCALE1_WHEN_NO_INDEX
+ /* Another case where we force the second
+ modrm byte. */
+ if (i.log2_scale_factor)
+ i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
+#endif
+ }
+ else
+ {
+ i.sib.index = i.index_reg->reg_num;
+ i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
+ }
+ i.rm.mode = mode_from_disp_size (i.types[op]);
}
+
if (fake_zero_displacement)
{
/* Fakes a zero displacement assuming that i.types[op]
holds the correct displacement size. */
+ expressionS *exp;
+
+ assert (i.op[op].disps == 0);
exp = &disp_expressions[i.disp_operands++];
- i.disps[op] = exp;
+ i.op[op].disps = exp;
exp->X_op = O_constant;
exp->X_add_number = 0;
exp->X_add_symbol = (symbolS *) 0;
exp->X_op_symbol = (symbolS *) 0;
}
-
- /* Find the default segment for the memory operand.
- Used to optimize out explicit segment specifications. */
- if (i.seg)
- {
- unsigned int seg_index;
-
- if (i.rm.regmem == ESCAPE_TO_TWO_BYTE_ADDRESSING)
- {
- seg_index = (i.rm.mode << 3) | i.bi.base;
- default_seg = two_byte_segment_defaults[seg_index];
- }
- else
- {
- seg_index = (i.rm.mode << 3) | i.rm.regmem;
- default_seg = one_byte_segment_defaults[seg_index];
- }
- }
}
/* Fill in i.rm.reg or i.rm.regmem field with register
@@ -1587,24 +2030,26 @@ md_assemble (line)
{
unsigned int op =
((i.types[0]
- & (Reg | SReg2 | SReg3 | Control | Debug
- | Test | RegMMX))
+ & (Reg | RegMMX | RegXMM
+ | SReg2 | SReg3
+ | Control | Debug | Test))
? 0
: ((i.types[1]
- & (Reg | SReg2 | SReg3 | Control | Debug
- | Test | RegMMX))
+ & (Reg | RegMMX | RegXMM
+ | SReg2 | SReg3
+ | Control | Debug | Test))
? 1
: 2));
/* If there is an extension opcode to put here, the
register number must be put into the regmem field. */
if (i.tm.extension_opcode != None)
- i.rm.regmem = i.regs[op]->reg_num;
+ i.rm.regmem = i.op[op].regs->reg_num;
else
- i.rm.reg = i.regs[op]->reg_num;
+ i.rm.reg = i.op[op].regs->reg_num;
/* 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
- operand int the regmem field */
+ operand in the regmem field. */
if (!i.mem_operands)
i.rm.mode = 3;
}
@@ -1613,23 +2058,25 @@ md_assemble (line)
if (i.tm.extension_opcode != None)
i.rm.reg = i.tm.extension_opcode;
}
-
- if (i.rm.mode != 3)
- uses_mem_addrmode = 1;
}
-
- /* GAS currently doesn't support 16-bit memory addressing modes at all,
- so if we're writing 16-bit code and using a memory addressing mode,
- always spew out an address size prefix. */
- if (uses_mem_addrmode && flag_16bit_code)
+ else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm))
{
- if (i.prefixes == MAX_PREFIXES)
+ if (i.tm.base_opcode == POP_SEG_SHORT && i.op[0].regs->reg_num == 1)
{
- as_bad ("%d prefixes given and address size override gives too many prefixes",
- MAX_PREFIXES);
- return;
+ as_bad (_("you can't `pop %%cs'"));
+ return;
}
- i.prefix[i.prefixes++] = ADDR_PREFIX_OPCODE;
+ i.tm.base_opcode |= (i.op[0].regs->reg_num << 3);
+ }
+ else if ((i.tm.base_opcode & ~(D|W)) == MOV_AX_DISP32)
+ {
+ default_seg = &ds;
+ }
+ else if ((i.tm.opcode_modifier & IsString) != 0)
+ {
+ /* For the string instructions that allow a segment override
+ on one of their operands, the default segment is ds. */
+ default_seg = &ds;
}
/* If a segment was explicitly specified,
@@ -1638,26 +2085,36 @@ md_assemble (line)
If we never figured out what the default segment is,
then default_seg will be zero at this point,
and the specified segment prefix will always be used. */
- if ((i.seg) && (i.seg != default_seg))
+ if ((i.seg[0]) && (i.seg[0] != default_seg))
{
- if (i.prefixes == MAX_PREFIXES)
- {
- as_bad ("%d prefixes given and %s segment override gives too many prefixes",
- MAX_PREFIXES, i.seg->seg_name);
- return;
- }
- i.prefix[i.prefixes++] = i.seg->seg_prefix;
+ if (! add_prefix (i.seg[0]->seg_prefix))
+ return;
}
}
+ else if ((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. */
- if (i.tm.base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3)
+ if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3)
{
i.tm.base_opcode = INT3_OPCODE;
i.imm_operands = 0;
}
+ if ((i.tm.opcode_modifier & (Jump | JumpByte | JumpDword))
+ && i.op[0].disps->X_op == O_constant)
+ {
+ /* Convert "jmp constant" (and "call constant") to a jump (call) to
+ the absolute address given by the constant. Since ix86 jumps and
+ calls are pc relative, we need to generate a reloc. */
+ i.op[0].disps->X_add_symbol = &abs_symbol;
+ i.op[0].disps->X_op = O_symbol;
+ }
+
/* We are ready to output the insn. */
{
register char *p;
@@ -1665,204 +2122,187 @@ md_assemble (line)
/* Output jumps. */
if (i.tm.opcode_modifier & Jump)
{
- unsigned long n = i.disps[0]->X_add_number;
+ int size;
+ int code16;
+ int prefix;
- if (i.disps[0]->X_op == O_constant)
- {
- if (fits_in_signed_byte (n))
- {
- p = frag_more (2);
- insn_size += 2;
- p[0] = i.tm.base_opcode;
- p[1] = n;
- }
- else
- { /* It's an absolute word/dword displacement. */
-
- /* Use only 16-bit jumps for 16-bit code,
- because text segments are limited to 64K anyway;
- use only 32-bit jumps for 32-bit code,
- because they're faster. */
- int jmp_size = flag_16bit_code ? 2 : 4;
- if (flag_16bit_code && !fits_in_signed_word (n))
- {
- as_bad ("16-bit jump out of range");
- return;
- }
+ code16 = 0;
+ if (flag_16bit_code)
+ code16 = CODE16;
- if (i.tm.base_opcode == JUMP_PC_RELATIVE)
- { /* pace */
- /* unconditional jump */
- p = frag_more (1 + jmp_size);
- insn_size += 1 + jmp_size;
- p[0] = (char) 0xe9;
- md_number_to_chars (&p[1], (valueT) n, jmp_size);
- }
- else
- {
- /* conditional jump */
- p = frag_more (2 + jmp_size);
- insn_size += 2 + jmp_size;
- p[0] = TWO_BYTE_OPCODE_ESCAPE;
- p[1] = i.tm.base_opcode + 0x10;
- md_number_to_chars (&p[2], (valueT) n, jmp_size);
- }
- }
- }
- else
+ prefix = 0;
+ if (i.prefix[DATA_PREFIX])
{
- if (flag_16bit_code)
- {
- FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
- insn_size += 1;
- }
-
- /* It's a symbol; end frag & setup for relax.
- Make sure there are more than 6 chars left in the current frag;
- if not we'll have to start a new one. */
- frag_grow (7);
- p = frag_more (1);
- insn_size += 1;
- p[0] = i.tm.base_opcode;
- frag_var (rs_machine_dependent,
- 6, /* 2 opcode/prefix + 4 displacement */
- 1,
- ((unsigned char) *p == JUMP_PC_RELATIVE
- ? ENCODE_RELAX_STATE (UNCOND_JUMP, BYTE)
- : ENCODE_RELAX_STATE (COND_JUMP, BYTE)),
- i.disps[0]->X_add_symbol,
- (offsetT) n, p);
+ prefix = 1;
+ i.prefixes -= 1;
+ code16 ^= CODE16;
}
+
+ size = 4;
+ if (code16)
+ size = 2;
+
+ if (i.prefixes != 0 && !intel_syntax)
+ as_warn (_("skipping prefixes on this instruction"));
+
+ /* It's always a symbol; End frag & setup for relax.
+ Make sure there is enough room in this frag for the largest
+ instruction we may generate in md_convert_frag. This is 2
+ bytes for the opcode and room for the prefix and largest
+ displacement. */
+ frag_grow (prefix + 2 + size);
+ insn_size += prefix + 1;
+ /* Prefix and 1 opcode byte go in fr_fix. */
+ p = frag_more (prefix + 1);
+ if (prefix)
+ *p++ = DATA_PREFIX_OPCODE;
+ *p = i.tm.base_opcode;
+ /* 1 possible extra opcode + displacement go in fr_var. */
+ frag_var (rs_machine_dependent,
+ 1 + size,
+ 1,
+ ((unsigned char) *p == JUMP_PC_RELATIVE
+ ? ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL) | code16
+ : ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16),
+ i.op[0].disps->X_add_symbol,
+ i.op[0].disps->X_add_number,
+ p);
}
else if (i.tm.opcode_modifier & (JumpByte | JumpDword))
{
- int size = (i.tm.opcode_modifier & JumpByte) ? 1 : 4;
- unsigned long n = i.disps[0]->X_add_number;
- unsigned char *q;
+ int size;
- /* The jcx/jecx instruction might need a data size prefix. */
- for (q = i.prefix; q < i.prefix + i.prefixes; q++)
+ if (i.tm.opcode_modifier & JumpByte)
{
- if (*q == WORD_PREFIX_OPCODE)
+ /* This is a loop or jecxz type instruction. */
+ size = 1;
+ if (i.prefix[ADDR_PREFIX])
{
- /* The jcxz/jecxz instructions are marked with Data16
- and Data32, which means that they may get
- WORD_PREFIX_OPCODE added to the list of prefixes.
- However, the are correctly distinguished using
- ADDR_PREFIX_OPCODE. Here we look for
- WORD_PREFIX_OPCODE, and actually emit
- ADDR_PREFIX_OPCODE. This is a hack, but, then, so
- is the instruction itself.
-
- If an explicit suffix is used for the loop
- instruction, that actually controls whether we use
- cx vs. ecx. This is also controlled by
- ADDR_PREFIX_OPCODE.
-
- I don't know if there is any valid case in which we
- want to emit WORD_PREFIX_OPCODE, but I am keeping
- the old behaviour for safety. */
-
- if (IS_JUMP_ON_CX_ZERO (i.tm.base_opcode)
- || IS_LOOP_ECX_TIMES (i.tm.base_opcode))
- FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
- else
- FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
- insn_size += 1;
- break;
+ insn_size += 1;
+ FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
+ i.prefixes -= 1;
}
}
-
- if ((size == 4) && (flag_16bit_code))
+ else
{
- FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
- insn_size += 1;
+ int code16;
+
+ code16 = 0;
+ if (flag_16bit_code)
+ code16 = CODE16;
+
+ if (i.prefix[DATA_PREFIX])
+ {
+ insn_size += 1;
+ FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE);
+ i.prefixes -= 1;
+ code16 ^= CODE16;
+ }
+
+ size = 4;
+ if (code16)
+ size = 2;
}
+ if (i.prefixes != 0 && !intel_syntax)
+ as_warn (_("skipping prefixes on this instruction"));
+
if (fits_in_unsigned_byte (i.tm.base_opcode))
{
- FRAG_APPEND_1_CHAR (i.tm.base_opcode);
- insn_size += 1;
+ insn_size += 1 + size;
+ p = frag_more (1 + size);
}
else
{
- p = frag_more (2); /* opcode can be at most two bytes */
- insn_size += 2;
- /* put out high byte first: can't use md_number_to_chars! */
+ /* opcode can be at most two bytes */
+ insn_size += 2 + size;
+ p = frag_more (2 + size);
*p++ = (i.tm.base_opcode >> 8) & 0xff;
- *p = i.tm.base_opcode & 0xff;
}
+ *p++ = i.tm.base_opcode & 0xff;
- p = frag_more (size);
- insn_size += size;
- if (i.disps[0]->X_op == O_constant)
- {
- md_number_to_chars (p, (valueT) n, size);
- if (size == 1 && !fits_in_signed_byte (n))
- {
- as_bad ("loop/jecx only takes byte displacement; %lu shortened to %d",
- n, *p);
- }
- }
- else
- {
- fix_new_exp (frag_now, p - frag_now->fr_literal, size,
- i.disps[0], 1, reloc (size, 1, i.disp_reloc[0]));
-
- }
+ fix_new_exp (frag_now, p - frag_now->fr_literal, size,
+ i.op[0].disps, 1, reloc (size, 1, i.disp_reloc[0]));
}
else if (i.tm.opcode_modifier & JumpInterSegment)
{
+ int size;
+ int prefix;
+ int code16;
+
+ code16 = 0;
if (flag_16bit_code)
+ code16 = CODE16;
+
+ prefix = 0;
+ if (i.prefix[DATA_PREFIX])
{
- FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
- insn_size += 1;
+ prefix = 1;
+ i.prefixes -= 1;
+ code16 ^= CODE16;
}
- p = frag_more (1 + 2 + 4); /* 1 opcode; 2 segment; 4 offset */
- insn_size += 1 + 2 + 4;
- p[0] = i.tm.base_opcode;
- if (i.imms[1]->X_op == O_constant)
- md_number_to_chars (p + 1, (valueT) i.imms[1]->X_add_number, 4);
+ size = 4;
+ if (code16)
+ size = 2;
+
+ if (i.prefixes != 0 && !intel_syntax)
+ as_warn (_("skipping prefixes on this instruction"));
+
+ insn_size += prefix + 1 + 2 + size; /* 1 opcode; 2 segment; offset */
+ p = frag_more (prefix + 1 + 2 + size);
+ if (prefix)
+ *p++ = DATA_PREFIX_OPCODE;
+ *p++ = i.tm.base_opcode;
+ if (i.op[1].imms->X_op == O_constant)
+ {
+ long n = (long) i.op[1].imms->X_add_number;
+
+ if (size == 2
+ && !fits_in_unsigned_word (n)
+ && !fits_in_signed_word (n))
+ {
+ as_bad (_("16-bit jump out of range"));
+ return;
+ }
+ md_number_to_chars (p, (valueT) n, size);
+ }
else
- fix_new_exp (frag_now, p + 1 - frag_now->fr_literal, 4,
- i.imms[1], 0, BFD_RELOC_32);
- if (i.imms[0]->X_op != O_constant)
- as_bad ("can't handle non absolute segment in long call/jmp");
- md_number_to_chars (p + 5, (valueT) i.imms[0]->X_add_number, 2);
+ fix_new_exp (frag_now, p - frag_now->fr_literal, size,
+ i.op[1].imms, 0, reloc (size, 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);
+ md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2);
}
else
{
/* Output normal instructions here. */
unsigned char *q;
- /* Hack for fwait. It must come before any prefixes, as it
- really is an instruction rather than a prefix. */
- if ((i.tm.opcode_modifier & FWait) != 0)
- {
- p = frag_more (1);
- insn_size += 1;
- md_number_to_chars (p, (valueT) FWAIT_OPCODE, 1);
- }
-
/* The prefix bytes. */
- for (q = i.prefix; q < i.prefix + i.prefixes; q++)
+ for (q = i.prefix;
+ q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]);
+ q++)
{
- p = frag_more (1);
- insn_size += 1;
- md_number_to_chars (p, (valueT) *q, 1);
+ if (*q)
+ {
+ insn_size += 1;
+ p = frag_more (1);
+ md_number_to_chars (p, (valueT) *q, 1);
+ }
}
/* Now the opcode; be careful about word order here! */
if (fits_in_unsigned_byte (i.tm.base_opcode))
{
- FRAG_APPEND_1_CHAR (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))
{
- p = frag_more (2);
insn_size += 2;
+ p = frag_more (2);
/* put out high byte first: can't use md_number_to_chars! */
*p++ = (i.tm.base_opcode >> 8) & 0xff;
*p = i.tm.base_opcode & 0xff;
@@ -1871,41 +2311,44 @@ md_assemble (line)
{ /* opcode is either 3 or 4 bytes */
if (i.tm.base_opcode & 0xff000000)
{
- p = frag_more (4);
insn_size += 4;
+ p = frag_more (4);
*p++ = (i.tm.base_opcode >> 24) & 0xff;
}
else
{
- p = frag_more (3);
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 base index byte (if present). */
+ /* Now the modrm byte and sib byte (if present). */
if (i.tm.opcode_modifier & Modrm)
{
- p = frag_more (1);
insn_size += 1;
- /* md_number_to_chars (p, i.rm, 1); */
+ p = frag_more (1);
md_number_to_chars (p,
(valueT) (i.rm.regmem << 0
| i.rm.reg << 3
| i.rm.mode << 6),
1);
- /* If i.rm.regmem == ESP (4) && i.rm.mode != Mode 3 (Register mode)
- ==> need second modrm byte. */
- if (i.rm.regmem == ESCAPE_TO_TWO_BYTE_ADDRESSING && i.rm.mode != 3)
+ /* If i.rm.regmem == ESP (4)
+ && i.rm.mode != (Register mode)
+ && not 16 bit
+ ==> need second modrm byte. */
+ if (i.rm.regmem == ESCAPE_TO_TWO_BYTE_ADDRESSING
+ && i.rm.mode != 3
+ && !(i.base_reg && (i.base_reg->reg_type & Reg16) != 0))
{
- p = frag_more (1);
insn_size += 1;
- /* md_number_to_chars (p, i.bi, 1); */
- md_number_to_chars (p, (valueT) (i.bi.base << 0
- | i.bi.index << 3
- | i.bi.scale << 6),
+ p = frag_more (1);
+ md_number_to_chars (p,
+ (valueT) (i.sib.base << 0
+ | i.sib.index << 3
+ | i.sib.scale << 6),
1);
}
}
@@ -1916,43 +2359,45 @@ md_assemble (line)
for (n = 0; n < i.operands; n++)
{
- if (i.disps[n])
+ if (i.types[n] & Disp)
{
- if (i.disps[n]->X_op == O_constant)
+ if (i.op[n].disps->X_op == O_constant)
{
- if (i.types[n] & (Disp8 | Abs8))
- {
- p = frag_more (1);
- insn_size += 1;
- md_number_to_chars (p,
- (valueT) i.disps[n]->X_add_number,
- 1);
- }
- else if (i.types[n] & (Disp16 | Abs16))
+ int size = 4;
+ long val = (long) i.op[n].disps->X_add_number;
+
+ if (i.types[n] & (Disp8 | Disp16))
{
- p = frag_more (2);
- insn_size += 2;
- md_number_to_chars (p,
- (valueT) i.disps[n]->X_add_number,
- 2);
- }
- else
- { /* Disp32|Abs32 */
- p = frag_more (4);
- insn_size += 4;
- md_number_to_chars (p,
- (valueT) i.disps[n]->X_add_number,
- 4);
+ 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);
}
+ insn_size += size;
+ p = frag_more (size);
+ md_number_to_chars (p, (valueT) val, size);
}
else
- { /* not absolute_section */
- /* need a 32-bit fixup (don't support 8bit non-absolute disps) */
- p = frag_more (4);
- insn_size += 4;
- fix_new_exp (frag_now, p - frag_now->fr_literal, 4,
- i.disps[n], 0,
- TC_RELOC(i.disp_reloc[n], BFD_RELOC_32));
+ {
+ int size = 4;
+
+ if (i.types[n] & Disp16)
+ size = 2;
+
+ 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]));
}
}
}
@@ -1965,68 +2410,68 @@ md_assemble (line)
for (n = 0; n < i.operands; n++)
{
- if (i.imms[n])
+ if (i.types[n] & Imm)
{
- if (i.imms[n]->X_op == O_constant)
+ if (i.op[n].imms->X_op == O_constant)
{
- if (i.types[n] & (Imm8 | Imm8S))
- {
- p = frag_more (1);
- insn_size += 1;
- md_number_to_chars (p,
- (valueT) i.imms[n]->X_add_number,
- 1);
- }
- else if (i.types[n] & Imm16)
- {
- p = frag_more (2);
- insn_size += 2;
- md_number_to_chars (p,
- (valueT) i.imms[n]->X_add_number,
- 2);
- }
- else
+ int size = 4;
+ long val = (long) i.op[n].imms->X_add_number;
+
+ if (i.types[n] & (Imm8 | Imm8S | Imm16))
{
- p = frag_more (4);
- insn_size += 4;
- md_number_to_chars (p,
- (valueT) i.imms[n]->X_add_number,
- 4);
+ 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);
}
+ insn_size += size;
+ p = frag_more (size);
+ md_number_to_chars (p, (valueT) val, size);
}
else
{ /* not absolute_section */
/* Need a 32-bit fixup (don't support 8bit
- non-absolute ims). Try to support other
+ non-absolute imms). Try to support other
sizes ... */
- int r_type;
- int size;
- int pcrel = 0;
+#ifdef BFD_ASSEMBLER
+ enum bfd_reloc_code_real reloc_type;
+#else
+ int reloc_type;
+#endif
+ int size = 4;
- if (i.types[n] & (Imm8 | Imm8S))
- size = 1;
- else if (i.types[n] & Imm16)
+ if (i.types[n] & Imm16)
size = 2;
- else
- size = 4;
- r_type = reloc (size, 0, i.disp_reloc[0]);
- p = frag_more (size);
+ else if (i.types[n] & (Imm8 | Imm8S))
+ size = 1;
+
insn_size += size;
+ p = frag_more (size);
+ reloc_type = reloc (size, 0, i.disp_reloc[0]);
#ifdef BFD_ASSEMBLER
- if (r_type == BFD_RELOC_32
+ if (reloc_type == BFD_RELOC_32
&& GOT_symbol
- && GOT_symbol == i.imms[n]->X_add_symbol
- && (i.imms[n]->X_op == O_symbol
- || (i.imms[n]->X_op == O_add
- && (i.imms[n]->X_op_symbol->sy_value.X_op
+ && GOT_symbol == i.op[n].imms->X_add_symbol
+ && (i.op[n].imms->X_op == O_symbol
+ || (i.op[n].imms->X_op == O_add
+ && ((symbol_get_value_expression
+ (i.op[n].imms->X_op_symbol)->X_op)
== O_subtract))))
{
- r_type = BFD_RELOC_386_GOTPC;
- i.imms[n]->X_add_number += 3;
+ reloc_type = BFD_RELOC_386_GOTPC;
+ i.op[n].imms->X_add_number += 3;
}
#endif
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
- i.imms[n], pcrel, r_type);
+ i.op[n].imms, 0, reloc_type);
}
}
}
@@ -2042,6 +2487,882 @@ md_assemble (line)
}
}
+static int i386_immediate PARAMS ((char *));
+
+static int
+i386_immediate (imm_start)
+ char *imm_start;
+{
+ char *save_input_line_pointer;
+ segT exp_seg = 0;
+ expressionS * exp;
+
+ if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
+ {
+ as_bad (_("only 1 or 2 immediate operands are allowed"));
+ return 0;
+ }
+
+ exp = &im_expressions[i.imm_operands++];
+ i.op[this_operand].imms = exp;
+
+ if (is_space_char (*imm_start))
+ ++imm_start;
+
+ save_input_line_pointer = input_line_pointer;
+ input_line_pointer = imm_start;
+
+#ifndef LEX_AT
+ {
+ /*
+ * We can have operands of the form
+ * <symbol>@GOTOFF+<nnn>
+ * Take the easy way out here and copy everything
+ * into a temporary buffer...
+ */
+ register char *cp;
+
+ cp = strchr (input_line_pointer, '@');
+ if (cp != NULL)
+ {
+ char *tmpbuf;
+ int len = 0;
+ int first;
+
+ /* GOT relocations are not supported in 16 bit mode */
+ if (flag_16bit_code)
+ as_bad (_("GOT relocations not supported in 16 bit mode"));
+
+ if (GOT_symbol == NULL)
+ GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
+
+ if (strncmp (cp + 1, "PLT", 3) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
+ len = 3;
+ }
+ else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
+ len = 6;
+ }
+ else if (strncmp (cp + 1, "GOT", 3) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
+ len = 3;
+ }
+ else
+ as_bad (_("bad reloc specifier in expression"));
+
+ /* Replace the relocation token with ' ', so that errors like
+ foo@GOTOFF1 will be detected. */
+ first = cp - input_line_pointer;
+ tmpbuf = (char *) alloca (strlen(input_line_pointer));
+ memcpy (tmpbuf, input_line_pointer, first);
+ tmpbuf[first] = ' ';
+ strcpy (tmpbuf + first + 1, cp + 1 + len);
+ input_line_pointer = tmpbuf;
+ }
+ }
+#endif
+
+ exp_seg = expression (exp);
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer)
+ as_bad (_("ignoring junk `%s' after expression"), input_line_pointer);
+
+ input_line_pointer = save_input_line_pointer;
+
+ if (exp->X_op == O_absent || exp->X_op == O_big)
+ {
+ /* missing or bad expr becomes absolute 0 */
+ as_bad (_("missing or invalid immediate expression `%s' taken as 0"),
+ imm_start);
+ exp->X_op = O_constant;
+ exp->X_add_number = 0;
+ exp->X_add_symbol = (symbolS *) 0;
+ exp->X_op_symbol = (symbolS *) 0;
+ }
+
+ if (exp->X_op == O_constant)
+ {
+ i.types[this_operand] |= Imm32; /* Size it properly later. */
+ }
+#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
+ else if (
+#ifdef BFD_ASSEMBLER
+ OUTPUT_FLAVOR == bfd_target_aout_flavour &&
+#endif
+ exp_seg != text_section
+ && exp_seg != data_section
+ && exp_seg != bss_section
+ && exp_seg != undefined_section
+#ifdef BFD_ASSEMBLER
+ && !bfd_is_com_section (exp_seg)
+#endif
+ )
+ {
+#ifdef BFD_ASSEMBLER
+ as_bad (_("unimplemented segment %s in operand"), exp_seg->name);
+#else
+ as_bad (_("unimplemented segment type %d in operand"), exp_seg);
+#endif
+ return 0;
+ }
+#endif
+ else
+ {
+ /* 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);
+ }
+
+ return 1;
+}
+
+static int i386_scale PARAMS ((char *));
+
+static int
+i386_scale (scale)
+ char *scale;
+{
+ if (!isdigit (*scale))
+ goto bad_scale;
+
+ switch (*scale)
+ {
+ case '0':
+ case '1':
+ i.log2_scale_factor = 0;
+ break;
+ case '2':
+ i.log2_scale_factor = 1;
+ break;
+ case '4':
+ i.log2_scale_factor = 2;
+ break;
+ case '8':
+ i.log2_scale_factor = 3;
+ break;
+ default:
+ bad_scale:
+ as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
+ scale);
+ return 0;
+ }
+ if (i.log2_scale_factor != 0 && ! i.index_reg)
+ {
+ as_warn (_("scale factor of %d without an index register"),
+ 1 << i.log2_scale_factor);
+#if SCALE1_WHEN_NO_INDEX
+ i.log2_scale_factor = 0;
+#endif
+ }
+ return 1;
+}
+
+static int i386_displacement PARAMS ((char *, char *));
+
+static int
+i386_displacement (disp_start, disp_end)
+ char *disp_start;
+ char *disp_end;
+{
+ register expressionS *exp;
+ segT exp_seg = 0;
+ char *save_input_line_pointer;
+ int bigdisp = Disp32;
+
+ if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0))
+ bigdisp = Disp16;
+ i.types[this_operand] |= bigdisp;
+
+ exp = &disp_expressions[i.disp_operands];
+ i.op[this_operand].disps = exp;
+ i.disp_operands++;
+ save_input_line_pointer = input_line_pointer;
+ input_line_pointer = disp_start;
+ END_STRING_AND_SAVE (disp_end);
+
+#ifndef GCC_ASM_O_HACK
+#define GCC_ASM_O_HACK 0
+#endif
+#if GCC_ASM_O_HACK
+ END_STRING_AND_SAVE (disp_end + 1);
+ if ((i.types[this_operand] & BaseIndex) != 0
+ && displacement_string_end[-1] == '+')
+ {
+ /* This hack is to avoid a warning when using the "o"
+ constraint within gcc asm statements.
+ For instance:
+
+ #define _set_tssldt_desc(n,addr,limit,type) \
+ __asm__ __volatile__ ( \
+ "movw %w2,%0\n\t" \
+ "movw %w1,2+%0\n\t" \
+ "rorl $16,%1\n\t" \
+ "movb %b1,4+%0\n\t" \
+ "movb %4,5+%0\n\t" \
+ "movb $0,6+%0\n\t" \
+ "movb %h1,7+%0\n\t" \
+ "rorl $16,%1" \
+ : "=o"(*(n)) : "q" (addr), "ri"(limit), "i"(type))
+
+ This works great except that the output assembler ends
+ up looking a bit weird if it turns out that there is
+ no offset. You end up producing code that looks like:
+
+ #APP
+ movw $235,(%eax)
+ movw %dx,2+(%eax)
+ rorl $16,%edx
+ movb %dl,4+(%eax)
+ movb $137,5+(%eax)
+ movb $0,6+(%eax)
+ movb %dh,7+(%eax)
+ rorl $16,%edx
+ #NO_APP
+
+ So here we provide the missing zero.
+ */
+
+ *displacement_string_end = '0';
+ }
+#endif
+#ifndef LEX_AT
+ {
+ /*
+ * We can have operands of the form
+ * <symbol>@GOTOFF+<nnn>
+ * Take the easy way out here and copy everything
+ * into a temporary buffer...
+ */
+ register char *cp;
+
+ cp = strchr (input_line_pointer, '@');
+ if (cp != NULL)
+ {
+ char *tmpbuf;
+ int len = 0;
+ int first;
+
+ /* GOT relocations are not supported in 16 bit mode */
+ if (flag_16bit_code)
+ as_bad (_("GOT relocations not supported in 16 bit mode"));
+
+ if (GOT_symbol == NULL)
+ GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
+
+ if (strncmp (cp + 1, "PLT", 3) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
+ len = 3;
+ }
+ else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
+ len = 6;
+ }
+ else if (strncmp (cp + 1, "GOT", 3) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
+ len = 3;
+ }
+ else
+ as_bad (_("bad reloc specifier in expression"));
+
+ /* Replace the relocation token with ' ', so that errors like
+ foo@GOTOFF1 will be detected. */
+ first = cp - input_line_pointer;
+ tmpbuf = (char *) alloca (strlen(input_line_pointer));
+ memcpy (tmpbuf, input_line_pointer, first);
+ tmpbuf[first] = ' ';
+ strcpy (tmpbuf + first + 1, cp + 1 + len);
+ input_line_pointer = tmpbuf;
+ }
+ }
+#endif
+
+ exp_seg = expression (exp);
+
+#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)
+ {
+ 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;
+ }
+#endif
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer)
+ as_bad (_("ignoring junk `%s' after expression"),
+ input_line_pointer);
+#if GCC_ASM_O_HACK
+ RESTORE_END_STRING (disp_end + 1);
+#endif
+ RESTORE_END_STRING (disp_end);
+ input_line_pointer = save_input_line_pointer;
+
+ if (exp->X_op == O_absent || exp->X_op == O_big)
+ {
+ /* missing or bad expr becomes absolute 0 */
+ as_bad (_("missing or invalid displacement expression `%s' taken as 0"),
+ disp_start);
+ exp->X_op = O_constant;
+ exp->X_add_number = 0;
+ exp->X_add_symbol = (symbolS *) 0;
+ 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 (
+#ifdef BFD_ASSEMBLER
+ OUTPUT_FLAVOR == bfd_target_aout_flavour &&
+#endif
+ 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);
+#else
+ as_bad (_("unimplemented segment type %d in operand"), exp_seg);
+#endif
+ return 0;
+ }
+#endif
+ 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 *));
+
+/* Make sure the memory operand we've been dealt is valid.
+ Returns 1 on success, 0 on a failure.
+*/
+static int
+i386_index_check (operand_string)
+ const char *operand_string;
+{
+#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)))))
+ {
+#if INFER_ADDR_PREFIX
+ if (i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0')
+ {
+ i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE;
+ i.prefixes += 1;
+ /* Change the size of any displacement too. At most one of
+ 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.
+ */
+ if (i.types[this_operand] & (Disp16|Disp32))
+ i.types[this_operand] ^= (Disp16|Disp32);
+ fudged = 1;
+ goto tryprefix;
+ }
+ if (fudged)
+ as_bad (_("`%s' is not a valid base/index expression"),
+ operand_string);
+ else
+#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");
+ return 0;
+ }
+ return 1;
+}
+
+static int i386_intel_memory_operand PARAMS ((char *));
+
+static int
+i386_intel_memory_operand (operand_string)
+ char *operand_string;
+{
+ 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;
+ }
+ }
+
+ /* Look for displacement preceding open bracket */
+ if (*op_string != '[')
+ {
+ 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;
+ }
+
+ if (*op_string == '[')
+ {
+ ++op_string;
+
+ /* Pick off each component and figure out where it belongs */
+
+ end_of_operand_string = op_string;
+
+ while (*op_string != ']')
+ {
+ 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 == '+')
+ {
+ ++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. */
@@ -2049,196 +3370,142 @@ static int
i386_operand (operand_string)
char *operand_string;
{
- register char *op_string = operand_string;
-
- /* Address of '\0' at end of operand_string. */
- char *end_of_operand_string = operand_string + strlen (operand_string);
+ const reg_entry *r;
+ char *end_op;
+ char *op_string = operand_string;
- /* Start and end of displacement string expression (if found). */
- char *displacement_string_start = NULL;
- char *displacement_string_end = NULL;
+ 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++;
+ ++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)
+ if ((*op_string == REGISTER_PREFIX || allow_naked_reg)
+ && (r = parse_register (op_string, &end_op)) != NULL)
{
- register reg_entry *r;
- if (!(r = parse_register (op_string)))
- {
- as_bad ("bad register name ('%s')", op_string);
- return 0;
- }
- /* Check for segment override, rather than segment register by
- searching for ':' after %<x>s where <x> = s, c, d, e, f, g. */
- if ((r->reg_type & (SReg2 | SReg3)) && op_string[3] == ':')
+ /* 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 = (seg_entry *) & es;
+ i.seg[i.mem_operands] = &es;
break;
case 1:
- i.seg = (seg_entry *) & cs;
+ i.seg[i.mem_operands] = &cs;
break;
case 2:
- i.seg = (seg_entry *) & ss;
+ i.seg[i.mem_operands] = &ss;
break;
case 3:
- i.seg = (seg_entry *) & ds;
+ i.seg[i.mem_operands] = &ds;
break;
case 4:
- i.seg = (seg_entry *) & fs;
+ i.seg[i.mem_operands] = &fs;
break;
case 5:
- i.seg = (seg_entry *) & gs;
+ i.seg[i.mem_operands] = &gs;
break;
}
- op_string += 4; /* skip % <x> s : */
- operand_string = op_string; /* Pretend given string starts here. */
- if (!is_digit_char (*op_string) && !is_identifier_char (*op_string)
- && *op_string != '(' && *op_string != ABSOLUTE_PREFIX)
+
+ /* Skip the ':' and whitespace. */
+ ++op_string;
+ if (is_space_char (*op_string))
+ ++op_string;
+
+ if (!is_digit_char (*op_string)
+ && !is_identifier_char (*op_string)
+ && *op_string != '('
+ && *op_string != ABSOLUTE_PREFIX)
{
- as_bad ("bad memory operand after segment override");
+ as_bad (_("bad memory operand `%s'"), op_string);
return 0;
}
/* Handle case of %es:*foo. */
if (*op_string == ABSOLUTE_PREFIX)
{
- op_string++;
+ ++op_string;
+ if (is_space_char (*op_string))
+ ++op_string;
i.types[this_operand] |= JumpAbsolute;
}
goto do_memory_reference;
}
- i.types[this_operand] |= r->reg_type;
- i.regs[this_operand] = r;
+ if (*op_string)
+ {
+ as_bad (_("junk `%s' after register"), op_string);
+ return 0;
+ }
+ 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 (*op_string == IMMEDIATE_PREFIX)
{ /* ... or an immediate */
- char *save_input_line_pointer;
- segT exp_seg = 0;
- expressionS *exp;
-
- if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
- {
- as_bad ("only 1 or 2 immediate operands are allowed");
- return 0;
- }
-
- exp = &im_expressions[i.imm_operands++];
- i.imms[this_operand] = exp;
- save_input_line_pointer = input_line_pointer;
- input_line_pointer = ++op_string; /* must advance op_string! */
- SKIP_WHITESPACE ();
- exp_seg = expression (exp);
- if (*input_line_pointer != '\0')
- {
- /* This should be as_bad, but some versions of gcc, up to
- about 2.8 and egcs 1.01, generate a bogus @GOTOFF(%ebx)
- in certain cases. Oddly, the code in question turns out
- to work correctly anyhow, so we make this just a warning
- until those versions of gcc are obsolete. */
- as_warn ("warning: unrecognized characters `%s' in expression",
- input_line_pointer);
- }
- input_line_pointer = save_input_line_pointer;
-
- if (exp->X_op == O_absent)
- {
- /* missing or bad expr becomes absolute 0 */
- as_bad ("missing or invalid immediate expression '%s' taken as 0",
- operand_string);
- exp->X_op = O_constant;
- exp->X_add_number = 0;
- exp->X_add_symbol = (symbolS *) 0;
- exp->X_op_symbol = (symbolS *) 0;
- i.types[this_operand] |= Imm;
- }
- else if (exp->X_op == O_constant)
- {
- i.types[this_operand] |=
- smallest_imm_type ((unsigned long) exp->X_add_number);
- }
-#ifdef OBJ_AOUT
- else if (exp_seg != text_section
- && exp_seg != data_section
- && exp_seg != bss_section
- && exp_seg != undefined_section
-#ifdef BFD_ASSEMBLER
- && ! bfd_is_com_section (exp_seg)
-#endif
- )
+ ++op_string;
+ if (i.types[this_operand] & JumpAbsolute)
{
- seg_unimplemented:
- as_bad ("Unimplemented segment type %d in parse_operand", exp_seg);
+ as_bad (_("immediate operand illegal with absolute jump"));
return 0;
}
-#endif
- else
- {
- /* this is an address ==> 32bit */
- i.types[this_operand] |= Imm32;
- }
- /* shorten this type of this operand if the instruction wants
- * fewer bits than are present in the immediate. The bit field
- * code can put out 'andb $0xffffff, %al', for example. pace
- * also 'movw $foo,(%eax)'
- */
- switch (i.suffix)
- {
- case WORD_OPCODE_SUFFIX:
- i.types[this_operand] |= Imm16;
- break;
- case BYTE_OPCODE_SUFFIX:
- i.types[this_operand] |= Imm16 | Imm8 | Imm8S;
- break;
- }
+ if (!i386_immediate (op_string))
+ return 0;
}
- else if (is_digit_char (*op_string) || is_identifier_char (*op_string)
- || *op_string == '(')
+ else if (is_digit_char (*op_string)
+ || is_identifier_char (*op_string)
+ || *op_string == '(' )
{
/* This is a memory reference of some sort. */
- register char *base_string;
- unsigned int found_base_index_form;
+ char *base_string;
+
+ /* Start and end of displacement string expression (if found). */
+ char *displacement_string_start;
+ char *displacement_string_end;
do_memory_reference:
- if (i.mem_operands == MAX_MEMORY_OPERANDS)
+ if ((i.mem_operands == 1
+ && (current_templates->start->opcode_modifier & IsString) == 0)
+ || i.mem_operands == 2)
{
- as_bad ("more than 1 memory reference in instruction");
+ as_bad (_("too many memory references for `%s'"),
+ current_templates->start->name);
return 0;
}
- i.mem_operands++;
-
- /* Determine type of memory operand from opcode_suffix;
- no opcode suffix implies general memory references. */
- switch (i.suffix)
- {
- case BYTE_OPCODE_SUFFIX:
- i.types[this_operand] |= Mem8;
- break;
- case WORD_OPCODE_SUFFIX:
- i.types[this_operand] |= Mem16;
- break;
- case DWORD_OPCODE_SUFFIX:
- default:
- i.types[this_operand] |= Mem32;
- }
/* Check for base index form. We detect the base index form by
looking for an ')' at the end of the operand, searching
for the '(' matching it, and finding a REGISTER_PREFIX or ','
- after it. */
- base_string = end_of_operand_string - 1;
- found_base_index_form = 0;
+ after the '('. */
+ base_string = op_string + strlen (op_string);
+
+ --base_string;
+ if (is_space_char (*base_string))
+ --base_string;
+
+ /* 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;
+
if (*base_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. */
@@ -2251,283 +3518,129 @@ i386_operand (operand_string)
parens_balanced--;
}
while (parens_balanced);
- base_string++; /* Skip past '('. */
- if (*base_string == REGISTER_PREFIX || *base_string == ',')
- found_base_index_form = 1;
- }
- /* If we can't parse a base index register expression, we've found
- a pure displacement expression. We set up displacement_string_start
- and displacement_string_end for the code below. */
- if (!found_base_index_form)
- {
- displacement_string_start = op_string;
- displacement_string_end = end_of_operand_string;
- }
- else
- {
- char *base_reg_name, *index_reg_name, *num_string;
- int num;
+ temp_string = base_string;
- i.types[this_operand] |= BaseIndex;
-
- /* If there is a displacement set-up for it to be parsed later. */
- if (base_string != op_string + 1)
- {
- displacement_string_start = op_string;
- displacement_string_end = base_string - 1;
- }
+ /* Skip past '(' and whitespace. */
+ ++base_string;
+ if (is_space_char (*base_string))
+ ++base_string;
- /* Find base register (if any). */
- if (*base_string != ',')
+ if (*base_string == ','
+ || ((*base_string == REGISTER_PREFIX || allow_naked_reg)
+ && (i.base_reg = parse_register (base_string, &end_op)) != NULL))
{
- base_reg_name = base_string++;
- /* skip past register name & parse it */
- while (isalpha (*base_string))
- base_string++;
- if (base_string == base_reg_name + 1)
- {
- as_bad ("can't find base register name after '(%c'",
- REGISTER_PREFIX);
- return 0;
- }
- END_STRING_AND_SAVE (base_string);
- if (!(i.base_reg = parse_register (base_reg_name)))
- {
- as_bad ("bad base register name ('%s')", base_reg_name);
- return 0;
- }
- RESTORE_END_STRING (base_string);
- }
+ displacement_string_end = temp_string;
- /* Now check seperator; must be ',' ==> index reg
- OR num ==> no index reg. just scale factor
- OR ')' ==> end. (scale factor = 1) */
- if (*base_string != ',' && *base_string != ')')
- {
- as_bad ("expecting ',' or ')' after base register in `%s'",
- operand_string);
- return 0;
- }
+ i.types[this_operand] |= BaseIndex;
- /* There may index reg here; and there may be a scale factor. */
- if (*base_string == ',' && *(base_string + 1) == REGISTER_PREFIX)
- {
- index_reg_name = ++base_string;
- while (isalpha (*++base_string));
- END_STRING_AND_SAVE (base_string);
- if (!(i.index_reg = parse_register (index_reg_name)))
+ if (i.base_reg)
{
- as_bad ("bad index register name ('%s')", index_reg_name);
- return 0;
+ base_string = end_op;
+ if (is_space_char (*base_string))
+ ++base_string;
}
- RESTORE_END_STRING (base_string);
- }
- /* Check for scale factor. */
- if (*base_string == ',' && isdigit (*(base_string + 1)))
- {
- num_string = ++base_string;
- while (is_digit_char (*base_string))
- base_string++;
- if (base_string == num_string)
+ /* There may be an index reg or scale factor here. */
+ if (*base_string == ',')
{
- as_bad ("can't find a scale factor after ','");
- return 0;
+ ++base_string;
+ if (is_space_char (*base_string))
+ ++base_string;
+
+ if ((*base_string == REGISTER_PREFIX || allow_naked_reg)
+ && (i.index_reg = parse_register (base_string, &end_op)) != NULL)
+ {
+ base_string = end_op;
+ if (is_space_char (*base_string))
+ ++base_string;
+ if (*base_string == ',')
+ {
+ ++base_string;
+ if (is_space_char (*base_string))
+ ++base_string;
+ }
+ else if (*base_string != ')' )
+ {
+ as_bad (_("expecting `,' or `)' after index register in `%s'"),
+ operand_string);
+ return 0;
+ }
+ }
+ else if (*base_string == REGISTER_PREFIX)
+ {
+ as_bad (_("bad register name `%s'"), base_string);
+ return 0;
+ }
+
+ /* Check for scale factor. */
+ if (isdigit ((unsigned char) *base_string))
+ {
+ if (!i386_scale (base_string))
+ return 0;
+
+ ++base_string;
+ if (is_space_char (*base_string))
+ ++base_string;
+ if (*base_string != ')')
+ {
+ as_bad (_("expecting `)' after scale factor in `%s'"),
+ operand_string);
+ return 0;
+ }
+ }
+ else if (!i.index_reg)
+ {
+ as_bad (_("expecting index register or scale factor after `,'; got '%c'"),
+ *base_string);
+ return 0;
+ }
}
- END_STRING_AND_SAVE (base_string);
- /* We've got a scale factor. */
- if (!sscanf (num_string, "%d", &num))
+ else if (*base_string != ')')
{
- as_bad ("can't parse scale factor from '%s'", num_string);
- return 0;
- }
- RESTORE_END_STRING (base_string);
- switch (num)
- { /* must be 1 digit scale */
- case 1:
- i.log2_scale_factor = 0;
- break;
- case 2:
- i.log2_scale_factor = 1;
- break;
- case 4:
- i.log2_scale_factor = 2;
- break;
- case 8:
- i.log2_scale_factor = 3;
- break;
- default:
- as_bad ("expecting scale factor of 1, 2, 4, 8; got %d", num);
+ as_bad (_("expecting `,' or `)' after base register in `%s'"),
+ operand_string);
return 0;
}
}
- else
+ else if (*base_string == REGISTER_PREFIX)
{
- if (!i.index_reg && *base_string == ',')
- {
- as_bad ("expecting index register or scale factor after ','; got '%c'",
- *(base_string + 1));
- return 0;
- }
+ as_bad (_("bad register name `%s'"), base_string);
+ return 0;
}
}
- /* If there's an expression begining the operand, parse it,
- assuming displacement_string_start and displacement_string_end
- are meaningful. */
- if (displacement_string_start)
+ /* If there's an expression beginning the operand, parse it,
+ assuming displacement_string_start and
+ displacement_string_end are meaningful. */
+ if (displacement_string_start != displacement_string_end)
{
- register expressionS *exp;
- segT exp_seg = 0;
- char *save_input_line_pointer;
- exp = &disp_expressions[i.disp_operands];
- i.disps[this_operand] = exp;
- i.disp_reloc[this_operand] = NO_RELOC;
- i.disp_operands++;
- save_input_line_pointer = input_line_pointer;
- input_line_pointer = displacement_string_start;
- END_STRING_AND_SAVE (displacement_string_end);
-
-#ifndef LEX_AT
- {
- /*
- * We can have operands of the form
- * <symbol>@GOTOFF+<nnn>
- * Take the easy way out here and copy everything
- * into a temporary buffer...
- */
- register char *cp;
-
- cp = strchr (input_line_pointer, '@');
- if (cp != NULL)
- {
- char *tmpbuf;
-
- if (GOT_symbol == NULL)
- GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
-
- tmpbuf = (char *) alloca ((cp - input_line_pointer) + 20);
-
- if (strncmp (cp + 1, "PLT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
- *cp = '\0';
- strcpy (tmpbuf, input_line_pointer);
- strcat (tmpbuf, cp + 1 + 3);
- *cp = '@';
- }
- else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
- *cp = '\0';
- strcpy (tmpbuf, input_line_pointer);
- strcat (tmpbuf, cp + 1 + 6);
- *cp = '@';
- }
- else if (strncmp (cp + 1, "GOT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
- *cp = '\0';
- strcpy (tmpbuf, input_line_pointer);
- strcat (tmpbuf, cp + 1 + 3);
- *cp = '@';
- }
- else
- as_bad ("Bad reloc specifier '%s' in expression", cp + 1);
-
- input_line_pointer = tmpbuf;
- }
- }
-#endif
-
- exp_seg = expression (exp);
-
-#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)
- {
- if (S_IS_LOCAL(exp->X_add_symbol)
- && S_GET_SEGMENT (exp->X_add_symbol) != undefined_section)
- section_symbol(exp->X_add_symbol->bsym->section);
- 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;
- }
-#endif
-
- if (*input_line_pointer)
- as_bad ("Ignoring junk '%s' after expression", input_line_pointer);
- RESTORE_END_STRING (displacement_string_end);
- input_line_pointer = save_input_line_pointer;
- if (exp->X_op == O_absent)
- {
- /* missing expr becomes absolute 0 */
- as_bad ("missing or invalid displacement '%s' taken as 0",
- operand_string);
- i.types[this_operand] |= (Disp | Abs);
- exp->X_op = O_constant;
- exp->X_add_number = 0;
- exp->X_add_symbol = (symbolS *) 0;
- exp->X_op_symbol = (symbolS *) 0;
- }
- else if (exp->X_op == O_constant)
- {
- i.types[this_operand] |= SMALLEST_DISP_TYPE (exp->X_add_number);
- }
- else if (exp_seg == text_section
- || exp_seg == data_section
- || exp_seg == bss_section
- || exp_seg == undefined_section)
- {
- i.types[this_operand] |= Disp32;
- }
- else
- {
-#ifndef OBJ_AOUT
- i.types[this_operand] |= Disp32;
-#else
- goto seg_unimplemented;
-#endif
- }
+ if (!i386_displacement (displacement_string_start,
+ displacement_string_end))
+ return 0;
}
- /* Make sure the memory operand we've been dealt is valid. */
- if (i.base_reg && i.index_reg &&
- !(i.base_reg->reg_type & i.index_reg->reg_type & Reg))
+ /* Special case for (%dx) while doing input/output op. */
+ if (i.base_reg
+ && i.base_reg->reg_type == (Reg16 | InOutPortReg)
+ && i.index_reg == 0
+ && i.log2_scale_factor == 0
+ && i.seg[i.mem_operands] == 0
+ && (i.types[this_operand] & Disp) == 0)
{
- as_bad ("register size mismatch in (base,index,scale) expression");
- return 0;
- }
- /*
- * special case for (%dx) while doing input/output op
- */
- if ((i.base_reg &&
- (i.base_reg->reg_type == (Reg16 | InOutPortReg)) &&
- (i.index_reg == 0)))
- {
- i.types[this_operand] |= InOutPortReg;
+ i.types[this_operand] = InOutPortReg;
return 1;
}
- if ((i.base_reg && (i.base_reg->reg_type & Reg32) == 0) ||
- (i.index_reg && (i.index_reg->reg_type & Reg32) == 0))
- {
- as_bad ("base/index register must be 32 bit register");
- return 0;
- }
- if (i.index_reg && i.index_reg == esp)
- {
- as_bad ("%s may not be used as an index register", esp->reg_name);
- return 0;
- }
+
+ if (i386_index_check (operand_string) == 0)
+ return 0;
+ i.mem_operands++;
}
else
{ /* it's not a memory operand; argh! */
- as_bad ("invalid char %s begining %s operand '%s'",
- output_invalid (*op_string), ordinal_names[this_operand],
+ as_bad (_("invalid char %s beginning operand %d `%s'"),
+ output_invalid (*op_string),
+ this_operand + 1,
op_string);
return 0;
}
@@ -2535,7 +3648,7 @@ i386_operand (operand_string)
}
/*
- * md_estimate_size_before_relax()
+ * md_estimate_size_before_relax()
*
* Called just before relax().
* Any symbol that is now undefined will not become defined.
@@ -2556,44 +3669,53 @@ md_estimate_size_before_relax (fragP, segment)
old_fr_fix = fragP->fr_fix;
opcode = (unsigned char *) fragP->fr_opcode;
- /* We've already got fragP->fr_subtype right; all we have to do is check
- for un-relaxable symbols. */
+ /* We've already got fragP->fr_subtype right; all we have to do is
+ check for un-relaxable symbols. */
if (S_GET_SEGMENT (fragP->fr_symbol) != segment)
{
/* symbol is undefined in this segment */
+ int code16 = fragP->fr_subtype & CODE16;
+ int size = code16 ? 2 : 4;
+#ifdef BFD_ASSEMBLER
+ enum bfd_reloc_code_real reloc_type;
+#else
+ int reloc_type;
+#endif
+
+ if (GOT_symbol /* Not quite right - we should switch on presence of
+ @PLT, but I cannot see how to get to that from
+ here. We should have done this in md_assemble to
+ really get it right all of the time, but I think it
+ does not matter that much, as this will be right
+ most of the time. ERY */
+ && S_GET_SEGMENT(fragP->fr_symbol) == undefined_section)
+ reloc_type = BFD_RELOC_386_PLT32;
+ else if (code16)
+ reloc_type = BFD_RELOC_16_PCREL;
+ else
+ reloc_type = BFD_RELOC_32_PCREL;
+
switch (opcode[0])
{
case JUMP_PC_RELATIVE: /* make jmp (0xeb) a dword displacement jump */
opcode[0] = 0xe9; /* dword disp jmp */
- fragP->fr_fix += 4;
- fix_new (fragP, old_fr_fix, 4,
- fragP->fr_symbol,
+ fragP->fr_fix += size;
+ fix_new (fragP, old_fr_fix, size,
+ fragP->fr_symbol,
fragP->fr_offset, 1,
- (GOT_symbol && /* Not quite right - we should switch on
- presence of @PLT, but I cannot see how
- to get to that from here. We should have
- done this in md_assemble to really
- get it right all of the time, but I
- think it does not matter that much, as
- this will be right most of the time. ERY*/
- S_GET_SEGMENT(fragP->fr_symbol) == undefined_section)?
- BFD_RELOC_386_PLT32 : BFD_RELOC_32_PCREL);
+ reloc_type);
break;
default:
- /* This changes the byte-displacement jump 0x7N -->
- the dword-displacement jump 0x0f8N */
+ /* This changes the byte-displacement jump 0x7N
+ to the dword-displacement jump 0x0f,0x8N. */
opcode[1] = opcode[0] + 0x10;
- opcode[0] = TWO_BYTE_OPCODE_ESCAPE; /* two-byte escape */
- fragP->fr_fix += 1 + 4; /* we've added an opcode byte */
- fix_new (fragP, old_fr_fix + 1, 4,
+ opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
+ fragP->fr_fix += 1 + size; /* we've added an opcode byte */
+ fix_new (fragP, old_fr_fix + 1, size,
fragP->fr_symbol,
- fragP->fr_offset, 1,
- (GOT_symbol && /* Not quite right - we should switch on
- presence of @PLT, but I cannot see how
- to get to that from here. ERY */
- S_GET_SEGMENT(fragP->fr_symbol) == undefined_section)?
- BFD_RELOC_386_PLT32 : BFD_RELOC_32_PCREL);
+ fragP->fr_offset, 1,
+ reloc_type);
break;
}
frag_wane (fragP);
@@ -2615,14 +3737,14 @@ md_estimate_size_before_relax (fragP, segment)
#ifndef BFD_ASSEMBLER
void
md_convert_frag (headers, sec, fragP)
- object_headers *headers;
- segT sec;
+ object_headers *headers ATTRIBUTE_UNUSED;
+ segT sec ATTRIBUTE_UNUSED;
register fragS *fragP;
#else
void
md_convert_frag (abfd, sec, fragP)
- bfd *abfd;
- segT sec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ segT sec ATTRIBUTE_UNUSED;
register fragS *fragP;
#endif
{
@@ -2638,7 +3760,7 @@ md_convert_frag (abfd, sec, fragP)
/* 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 += fragP->fr_symbol->sy_frag->fr_address;
+ target_address += symbol_get_frag (fragP->fr_symbol)->fr_address;
#endif
/* Address opcode resides at in file space. */
@@ -2649,38 +3771,38 @@ md_convert_frag (abfd, sec, fragP)
switch (fragP->fr_subtype)
{
- case ENCODE_RELAX_STATE (COND_JUMP, BYTE):
- case ENCODE_RELAX_STATE (UNCOND_JUMP, BYTE):
+ case ENCODE_RELAX_STATE (COND_JUMP, SMALL):
+ case ENCODE_RELAX_STATE (COND_JUMP, SMALL16):
+ case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL):
+ case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL16):
/* don't have to change opcode */
extension = 1; /* 1 opcode + 1 displacement */
where_to_put_displacement = &opcode[1];
break;
- case ENCODE_RELAX_STATE (COND_JUMP, WORD):
- opcode[1] = TWO_BYTE_OPCODE_ESCAPE;
- opcode[2] = opcode[0] + 0x10;
- opcode[0] = WORD_PREFIX_OPCODE;
- extension = 4; /* 3 opcode + 2 displacement */
- where_to_put_displacement = &opcode[3];
+ case ENCODE_RELAX_STATE (COND_JUMP, BIG):
+ extension = 5; /* 2 opcode + 4 displacement */
+ opcode[1] = opcode[0] + 0x10;
+ opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
+ where_to_put_displacement = &opcode[2];
break;
- case ENCODE_RELAX_STATE (UNCOND_JUMP, WORD):
- opcode[1] = 0xe9;
- opcode[0] = WORD_PREFIX_OPCODE;
- extension = 3; /* 2 opcode + 2 displacement */
- where_to_put_displacement = &opcode[2];
+ case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG):
+ extension = 4; /* 1 opcode + 4 displacement */
+ opcode[0] = 0xe9;
+ where_to_put_displacement = &opcode[1];
break;
- case ENCODE_RELAX_STATE (COND_JUMP, DWORD):
+ case ENCODE_RELAX_STATE (COND_JUMP, BIG16):
+ extension = 3; /* 2 opcode + 2 displacement */
opcode[1] = opcode[0] + 0x10;
opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
- extension = 5; /* 2 opcode + 4 displacement */
where_to_put_displacement = &opcode[2];
break;
- case ENCODE_RELAX_STATE (UNCOND_JUMP, DWORD):
+ case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16):
+ extension = 2; /* 1 opcode + 2 displacement */
opcode[0] = 0xe9;
- extension = 4; /* 1 opcode + 4 displacement */
where_to_put_displacement = &opcode[1];
break;
@@ -2704,8 +3826,8 @@ void
md_create_short_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;
@@ -2750,52 +3872,109 @@ 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; /* Segment fix is from. */
+ segT seg ATTRIBUTE_UNUSED; /* Segment fix is from. */
{
register char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT value = *valp;
- if (fixP->fx_r_type == BFD_RELOC_32 && fixP->fx_pcrel)
- fixP->fx_r_type = BFD_RELOC_32_PCREL;
-
#if defined (BFD_ASSEMBLER) && !defined (TE_Mach)
- /*
- * This is a hack. There should be a better way to
- * handle this.
- */
- if (fixP->fx_r_type == BFD_RELOC_32_PCREL && fixP->fx_addsy)
+ if (fixP->fx_pcrel)
+ {
+ switch (fixP->fx_r_type)
+ {
+ default:
+ break;
+
+ case BFD_RELOC_32:
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
+ break;
+ case BFD_RELOC_16:
+ fixP->fx_r_type = BFD_RELOC_16_PCREL;
+ break;
+ case BFD_RELOC_8:
+ fixP->fx_r_type = BFD_RELOC_8_PCREL;
+ break;
+ }
+ }
+
+ /* This is a hack. There should be a better way to handle this.
+ This covers for the fact that bfd_install_relocation will
+ subtract the current location (for partial_inplace, PC relative
+ relocations); see more below. */
+ 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)
{
#ifndef OBJ_AOUT
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- || OUTPUT_FLAVOR == bfd_target_coff_flavour)
+#ifdef TE_PE
+ || OUTPUT_FLAVOR == bfd_target_coff_flavour
+#endif
+ )
value += fixP->fx_where + fixP->fx_frag->fr_address;
#endif
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- && (S_GET_SEGMENT (fixP->fx_addsy) == seg
- || (fixP->fx_addsy->bsym->flags & BSF_SECTION_SYM) != 0))
+ if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
{
- /* Yes, we add the values in twice. This is because
- bfd_perform_relocation subtracts them out again. I think
- bfd_perform_relocation is broken, but I don't dare change
- it. FIXME. */
- value += fixP->fx_where + fixP->fx_frag->fr_address;
+ segT fseg = S_GET_SEGMENT (fixP->fx_addsy);
+
+ if ((fseg == seg
+ || (symbol_section_p (fixP->fx_addsy)
+ && fseg != absolute_section))
+ && ! S_IS_EXTERNAL (fixP->fx_addsy)
+ && ! S_IS_WEAK (fixP->fx_addsy)
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && ! S_IS_COMMON (fixP->fx_addsy))
+ {
+ /* Yes, we add the values in twice. This is because
+ bfd_perform_relocation subtracts them out again. I think
+ bfd_perform_relocation is broken, but I don't dare change
+ it. FIXME. */
+ value += fixP->fx_where + fixP->fx_frag->fr_address;
+ }
}
#endif
#if defined (OBJ_COFF) && defined (TE_PE)
/* For some reason, the PE format does not store a section
- address offset for a PC relative symbol. */
+ 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. */
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
&& fixP->fx_addsy)
- switch(fixP->fx_r_type) {
+ 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. */
@@ -2803,19 +3982,19 @@ md_apply_fix3 (fixP, valp, seg)
break;
case BFD_RELOC_386_GOTPC:
/*
- * This is tough to explain. We end up with this one if we have
+ * 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
- * relocation for this. The actual sequence of instructions often look
+ * relocation for this. The actual sequence of instructions often look
* something like:
- *
- * call .L66
+ *
+ * call .L66
* .L66:
- * popl %ebx
- * addl $_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx
- *
- * The call and pop essentially return the absolute address of
+ * popl %ebx
+ * addl $_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx
+ *
+ * The call and pop essentially return the absolute address of
* the label .L66 and store it in %ebx. The linker itself will
* ultimately change the first operand of the addl so that %ebx points to
* the GOT, but to keep things simple, the .o file must have this operand
@@ -2824,17 +4003,17 @@ md_apply_fix3 (fixP, valp, seg)
* treat a GOTPC relocation as asking for a pcrel offset to the GOT to be
* added in, and the addend of the relocation is stored in the operand
* field for the instruction itself.
- *
- * Our job here is to fix the operand so that it would add the correct
+ *
+ * Our job here is to fix the operand so that it would add the correct
* offset so that %ebx would point to itself. The thing that is tricky is
* that .-.L66 will point to the beginning of the instruction, so we need
* to further modify the operand so that it will point to itself.
* There are other cases where you have something like:
- *
- * .long $_GLOBAL_OFFSET_TABLE_+[.-.L66]
- *
+ *
+ * .long $_GLOBAL_OFFSET_TABLE_+[.-.L66]
+ *
* and here no correction would be required. Internally in the assembler
- * we treat operands of this form as not being pcrel since the '.' is
+ * we treat operands of this form as not being pcrel since the '.' is
* 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
@@ -2843,17 +4022,22 @@ md_apply_fix3 (fixP, valp, seg)
value -= 1;
break;
case BFD_RELOC_386_GOT32:
- value = 0; /* Fully resolved at runtime. No addend. */
+ 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;
+
default:
break;
}
-#endif
-
-#endif
+#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);
return 1;
@@ -2884,7 +4068,7 @@ md_chars_to_number (con, nbytes)
is stored in *sizeP . An error message is returned, or NULL on OK. */
char *
md_atof (type, litP, sizeP)
- char type;
+ int type;
char *litP;
int *sizeP;
{
@@ -2912,7 +4096,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to md_atof ()";
+ return _("Bad call to md_atof ()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -2931,9 +4115,11 @@ md_atof (type, litP, sizeP)
char output_invalid_buf[8];
+static char * output_invalid PARAMS ((int));
+
static char *
output_invalid (c)
- char c;
+ int c;
{
if (isprint (c))
sprintf (output_invalid_buf, "'%c'", c);
@@ -2942,40 +4128,82 @@ output_invalid (c)
return output_invalid_buf;
}
-/* reg_string starts *before* REGISTER_PREFIX */
-static reg_entry *
-parse_register (reg_string)
+
+/* REG_STRING starts *before* REGISTER_PREFIX. */
+
+static const reg_entry *
+parse_register (reg_string, end_op)
char *reg_string;
+ char **end_op;
{
- register char *s = reg_string;
- register char *p;
- char reg_name_given[MAX_REG_NAME_SIZE];
+ char *s = reg_string;
+ char *p;
+ char reg_name_given[MAX_REG_NAME_SIZE + 1];
+ const reg_entry *r;
+
+ /* Skip possible REGISTER_PREFIX and possible whitespace. */
+ if (*s == REGISTER_PREFIX)
+ ++s;
- s++; /* skip REGISTER_PREFIX */
- for (p = reg_name_given; is_register_char (*s); p++, s++)
+ if (is_space_char (*s))
+ ++s;
+
+ p = reg_name_given;
+ while ((*p++ = register_chars[(unsigned char) *s]) != '\0')
{
- *p = register_chars[(unsigned char) *s];
if (p >= reg_name_given + MAX_REG_NAME_SIZE)
- return (reg_entry *) 0;
+ return (const reg_entry *) NULL;
+ s++;
+ }
+
+ *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 (is_space_char (*s))
+ ++s;
+ if (*s == '(')
+ {
+ ++s;
+ if (is_space_char (*s))
+ ++s;
+ if (*s >= '0' && *s <= '7')
+ {
+ r = &i386_float_regtab[*s - '0'];
+ ++s;
+ if (is_space_char (*s))
+ ++s;
+ if (*s == ')')
+ {
+ *end_op = s + 1;
+ return r;
+ }
+ }
+ /* We have "%st(" then garbage */
+ return (const reg_entry *) NULL;
+ }
}
- *p = '\0';
- return (reg_entry *) hash_find (reg_hash, reg_name_given);
+
+ return r;
}
-#ifdef OBJ_ELF
-CONST char *md_shortopts = "kmVQ:";
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+CONST char *md_shortopts = "kmVQ:sq";
#else
CONST char *md_shortopts = "m";
#endif
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)
int c;
- char *arg;
+ char *arg ATTRIBUTE_UNUSED;
{
switch (c)
{
@@ -2997,6 +4225,16 @@ md_parse_option (c, arg)
should be emitted or not. FIXME: Not implemented. */
case 'Q':
break;
+
+ case 's':
+ /* -s: On i386 Solaris, this tells the native assembler to use
+ .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. */
+ break;
#endif
default:
@@ -3009,13 +4247,22 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf (stream, "\
--m do long jump\n");
+ 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"));
+#endif
}
#ifdef BFD_ASSEMBLER
-#ifdef OBJ_MAYBE_ELF
-#ifdef OBJ_MAYBE_COFF
+#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)))
/* Pick the target format to use. */
@@ -3024,66 +4271,78 @@ i386_target_format ()
{
switch (OUTPUT_FLAVOR)
{
+#ifdef OBJ_MAYBE_AOUT
+ case bfd_target_aout_flavour:
+ return AOUT_TARGET_FORMAT;
+#endif
+#ifdef OBJ_MAYBE_COFF
case bfd_target_coff_flavour:
return "coff-i386";
+#endif
+#ifdef OBJ_MAYBE_ELF
case bfd_target_elf_flavour:
return "elf32-i386";
+#endif
default:
abort ();
return NULL;
}
}
-#endif /* OBJ_MAYBE_COFF */
-#endif /* OBJ_MAYBE_ELF */
+#endif /* OBJ_MAYBE_ more than one */
#endif /* BFD_ASSEMBLER */
-/* ARGSUSED */
symbolS *
md_undefined_symbol (name)
char *name;
{
- if (*name == '_' && *(name+1) == 'G'
- && strcmp(name, GLOBAL_OFFSET_TABLE_NAME) == 0)
- {
- if(!GOT_symbol)
- {
- if(symbol_find(name))
- as_bad("GOT already in symbol table");
- GOT_symbol = symbol_new (name, undefined_section,
- (valueT) 0, &zero_address_frag);
- };
- return GOT_symbol;
- }
+ if (name[0] == GLOBAL_OFFSET_TABLE_NAME[0]
+ && name[1] == GLOBAL_OFFSET_TABLE_NAME[1]
+ && name[2] == GLOBAL_OFFSET_TABLE_NAME[2]
+ && strcmp (name, GLOBAL_OFFSET_TABLE_NAME) == 0)
+ {
+ if (!GOT_symbol)
+ {
+ if (symbol_find (name))
+ as_bad (_("GOT already in symbol table"));
+ GOT_symbol = symbol_new (name, undefined_section,
+ (valueT) 0, &zero_address_frag);
+ };
+ return GOT_symbol;
+ }
return 0;
}
/* Round up a section size to the appropriate boundary. */
valueT
md_section_align (segment, size)
- segT segment;
+ segT segment ATTRIBUTE_UNUSED;
valueT size;
{
-#ifdef OBJ_AOUT
#ifdef BFD_ASSEMBLER
- /* For a.out, force the section size to be aligned. If we don't do
- this, BFD will align it for us, but it will not write out the
- final bytes of the section. This may be a bug in BFD, but it is
- easier to fix it here since that is how the other a.out targets
- work. */
- int align;
-
- align = bfd_get_section_alignment (stdoutput, segment);
- size = ((size + (1 << align) - 1) & ((valueT) -1 << align));
+#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
+ if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
+ {
+ /* For a.out, force the section size to be aligned. If we don't do
+ this, BFD will align it for us, but it will not write out the
+ final bytes of the section. This may be a bug in BFD, but it is
+ easier to fix it here since that is how the other a.out targets
+ work. */
+ int align;
+
+ align = bfd_get_section_alignment (stdoutput, segment);
+ size = ((size + (1 << align) - 1) & ((valueT) -1 << align));
+ }
#endif
#endif
return size;
}
-/* Exactly what point is a PC-relative offset relative TO? On the
- i386, they're relative to the address of the offset, plus its
- size. (??? Is this right? FIXME-SOON!) */
+/* On the i386, PC-relative offsets are relative to the start of the
+ next instruction. That is, the address of the offset, plus its
+ size, since the offset is always the last part of the insn. */
+
long
md_pcrel_from (fixP)
fixS *fixP;
@@ -3095,7 +4354,7 @@ md_pcrel_from (fixP)
static void
s_bss (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
register int temp;
@@ -3120,42 +4379,55 @@ i386_validate_fix (fixp)
}
}
-#define F(SZ,PCREL) (((SZ) << 1) + (PCREL))
-#define MAP(SZ,PCREL,TYPE) case F(SZ,PCREL): code = (TYPE); break
-
arelent *
tc_gen_reloc (section, fixp)
- asection *section;
+ asection *section ATTRIBUTE_UNUSED;
fixS *fixp;
{
arelent *rel;
bfd_reloc_code_real_type code;
- switch(fixp->fx_r_type)
+ switch (fixp->fx_r_type)
{
case BFD_RELOC_386_PLT32:
case BFD_RELOC_386_GOT32:
case BFD_RELOC_386_GOTOFF:
case BFD_RELOC_386_GOTPC:
case BFD_RELOC_RVA:
+ case BFD_RELOC_VTABLE_ENTRY:
+ case BFD_RELOC_VTABLE_INHERIT:
code = fixp->fx_r_type;
break;
default:
- switch (F (fixp->fx_size, fixp->fx_pcrel))
+ if (fixp->fx_pcrel)
{
- MAP (1, 0, BFD_RELOC_8);
- MAP (2, 0, BFD_RELOC_16);
- MAP (4, 0, BFD_RELOC_32);
- MAP (1, 1, BFD_RELOC_8_PCREL);
- MAP (2, 1, BFD_RELOC_16_PCREL);
- MAP (4, 1, BFD_RELOC_32_PCREL);
- default:
- as_bad ("Can not do %d byte %srelocation", fixp->fx_size,
- fixp->fx_pcrel ? "pc-relative " : "");
+ switch (fixp->fx_size)
+ {
+ default:
+ as_bad (_("can not do %d byte pc-relative relocation"),
+ fixp->fx_size);
+ code = BFD_RELOC_32_PCREL;
+ break;
+ case 1: code = BFD_RELOC_8_PCREL; break;
+ case 2: code = BFD_RELOC_16_PCREL; break;
+ case 4: code = BFD_RELOC_32_PCREL; break;
+ }
}
+ else
+ {
+ switch (fixp->fx_size)
+ {
+ default:
+ as_bad (_("can not do %d byte relocation"), fixp->fx_size);
+ code = BFD_RELOC_32;
+ break;
+ case 1: code = BFD_RELOC_8; break;
+ case 2: code = BFD_RELOC_16; break;
+ case 4: code = BFD_RELOC_32; break;
+ }
+ }
+ break;
}
-#undef MAP
-#undef F
if (code == BFD_RELOC_32
&& GOT_symbol
@@ -3163,8 +4435,15 @@ tc_gen_reloc (section, fixp)
code = BFD_RELOC_386_GOTPC;
rel = (arelent *) xmalloc (sizeof (arelent));
- rel->sym_ptr_ptr = &fixp->fx_addsy->bsym;
+ 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 (fixp->fx_pcrel)
rel->addend = fixp->fx_addnumber;
else
@@ -3174,7 +4453,7 @@ tc_gen_reloc (section, fixp)
if (rel->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Cannot represent relocation type %s",
+ _("cannot represent relocation type %s"),
bfd_get_reloc_code_name (code));
/* Set howto to a garbage value so that we can keep going. */
rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
@@ -3252,6 +4531,6 @@ tc_coff_sizemachdep (frag)
#endif /* I386COFF */
-#endif /* BFD_ASSEMBLER? */
+#endif /* ! BFD_ASSEMBLER */
/* end of tc-i386.c */
diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h
index 5142642..2bf9a7f 100644
--- a/contrib/binutils/gas/config/tc-i386.h
+++ b/contrib/binutils/gas/config/tc-i386.h
@@ -1,5 +1,6 @@
/* tc-i386.h -- Header file for tc-i386.c
- Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation.
+ Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -37,11 +38,6 @@ struct fix;
type. The idea is that if the original type is already some kind of PIC
relocation, we leave it alone, otherwise we give it the desired type */
-#define TC_RELOC(X,Y) (((X) != BFD_RELOC_386_PLT32 && \
- (X) != BFD_RELOC_386_GOTOFF && \
- (X) != BFD_RELOC_386_GOT32 && \
- (X) != BFD_RELOC_386_GOTPC) ? Y : X)
-
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
@@ -61,42 +57,48 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
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. */
-#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
- ((FIX)->fx_r_type != BFD_RELOC_386_PLT32 \
- && (FIX)->fx_r_type != BFD_RELOC_386_GOT32 \
- && (FIX)->fx_r_type != BFD_RELOC_386_GOTPC)
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_r_type != BFD_RELOC_386_PLT32 \
+ && (FIX)->fx_r_type != BFD_RELOC_386_GOT32 \
+ && (FIX)->fx_r_type != BFD_RELOC_386_GOTPC \
+ && ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy))))
#define TARGET_ARCH bfd_arch_i386
-#ifdef OBJ_AOUT
#ifdef TE_NetBSD
-#define TARGET_FORMAT "a.out-i386-netbsd"
+#define AOUT_TARGET_FORMAT "a.out-i386-netbsd"
#endif
#ifdef TE_386BSD
-#define TARGET_FORMAT "a.out-i386-bsd"
+#define AOUT_TARGET_FORMAT "a.out-i386-bsd"
#endif
#ifdef TE_LINUX
-#define TARGET_FORMAT "a.out-i386-linux"
+#define AOUT_TARGET_FORMAT "a.out-i386-linux"
#endif
#ifdef TE_Mach
-#define TARGET_FORMAT "a.out-mach3"
+#define AOUT_TARGET_FORMAT "a.out-mach3"
#endif
#ifdef TE_DYNIX
-#define TARGET_FORMAT "a.out-i386-dynix"
+#define AOUT_TARGET_FORMAT "a.out-i386-dynix"
#endif
-#ifndef TARGET_FORMAT
-#define TARGET_FORMAT "a.out-i386"
+#ifndef AOUT_TARGET_FORMAT
+#define AOUT_TARGET_FORMAT "a.out-i386"
#endif
-#endif /* OBJ_AOUT */
+#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)))
+extern const char *i386_target_format PARAMS ((void));
+#define TARGET_FORMAT i386_target_format ()
+#else
#ifdef OBJ_ELF
#define TARGET_FORMAT "elf32-i386"
#endif
-
-#ifdef OBJ_MAYBE_ELF
-#ifdef OBJ_MAYBE_COFF
-extern const char *i386_target_format PARAMS ((void));
-#define TARGET_FORMAT i386_target_format ()
+#ifdef OBJ_AOUT
+#define TARGET_FORMAT AOUT_TARGET_FORMAT
#endif
#endif
@@ -108,12 +110,26 @@ extern const char *i386_target_format PARAMS ((void));
#define BFD_ARCH bfd_arch_i386
#define COFF_FLAGS F_AR32WR
#define TC_COUNT_RELOC(x) ((x)->fx_addsy || (x)->fx_r_type==7)
-#define TC_FORCE_RELOCATION(x) ((x)->fx_r_type==7)
#define TC_COFF_FIX2RTYPE(fixP) tc_coff_fix2rtype(fixP)
extern short tc_coff_fix2rtype PARAMS ((struct fix *));
#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
+
+#ifdef TE_GO32
+/* DJGPP now expects some sections to be 2**4 aligned. */
+#define SUB_SEGMENT_ALIGN(SEG) \
+ ((strcmp (obj_segment_name (SEG), ".text") == 0 \
+ || strcmp (obj_segment_name (SEG), ".data") == 0 \
+ || strcmp (obj_segment_name (SEG), ".bss") == 0 \
+ || strncmp (obj_segment_name (SEG), ".gnu.linkonce.t", 15) == 0 \
+ || strncmp (obj_segment_name (SEG), ".gnu.linkonce.d", 15) == 0 \
+ || strncmp (obj_segment_name (SEG), ".gnu.linkonce.r", 15) == 0) \
+ ? 4 \
+ : 2)
+#else
#define SUB_SEGMENT_ALIGN(SEG) 2
+#endif
+
#define TC_RVA_RELOC 7
/* Need this for PIC relocations */
#define NEED_FX_R_TYPE
@@ -131,6 +147,9 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
#endif /* ! BFD_ASSEMBLER */
+#define TC_FORCE_RELOCATION(fixp) tc_i386_force_relocation(fixp)
+extern int tc_i386_force_relocation PARAMS ((struct fix *));
+
#ifdef BFD_ASSEMBLER
#define NO_RELOC BFD_RELOC_NONE
#else
@@ -141,12 +160,14 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
#ifndef BFD_ASSEMBLER
#ifndef OBJ_AOUT
#ifndef TE_PE
+#ifndef TE_GO32
/* Local labels starts with .L */
#define LOCAL_LABEL(name) (name[0] == '.' \
&& (name[1] == 'L' || name[1] == 'X' || name[1] == '.'))
#endif
#endif
#endif
+#endif
#define LOCAL_LABELS_FB 1
@@ -154,16 +175,27 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
#define tc_crawl_symbol_chain(a) {;} /* not used */
#define tc_headers_hook(a) {;} /* not used */
+extern const char extra_symbol_chars[];
+#define tc_symbol_chars extra_symbol_chars
+
#define MAX_OPERANDS 3 /* max operands per insn */
-#define MAX_PREFIXES 5 /* max prefixes per opcode */
-#define MAX_IMMEDIATE_OPERANDS 2/* max immediates per insn */
-#define MAX_MEMORY_OPERANDS 2 /* max memory ref per insn (lcall uses 2) */
+#define MAX_IMMEDIATE_OPERANDS 2/* max immediates per insn (lcall, ljmp) */
+#define MAX_MEMORY_OPERANDS 2 /* max memory refs per insn (string ops) */
+
+/* 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. */
+#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 */
/* we define the syntax here (modulo base,index,scale syntax) */
#define REGISTER_PREFIX '%'
#define IMMEDIATE_PREFIX '$'
#define ABSOLUTE_PREFIX '*'
-#define PREFIX_SEPERATOR '/'
#define TWO_BYTE_OPCODE_ESCAPE 0x0f
#define NOP_OPCODE (char) 0x90
@@ -178,11 +210,17 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
#define NO_INDEX_REGISTER ESP_REG_NUM
/* index_base_byte.base for no base register addressing */
#define NO_BASE_REGISTER EBP_REG_NUM
-
-/* these are the att as opcode suffixes, making movl --> mov, for example */
-#define DWORD_OPCODE_SUFFIX 'l'
-#define WORD_OPCODE_SUFFIX 'w'
-#define BYTE_OPCODE_SUFFIX 'b'
+#define NO_BASE_REGISTER_16 6
+
+/* these are the instruction mnemonic suffixes. */
+#define WORD_MNEM_SUFFIX 'w'
+#define BYTE_MNEM_SUFFIX 'b'
+#define SHORT_MNEM_SUFFIX 's'
+#define LONG_MNEM_SUFFIX 'l'
+/* 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 */
@@ -190,67 +228,88 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag));
#define END_OF_INSN '\0'
+/* Intel Syntax */
+/* Values 0-4 map onto scale factor */
+#define BYTE_PTR 0
+#define WORD_PTR 1
+#define DWORD_PTR 2
+#define QWORD_PTR 3
+#define XWORD_PTR 4
+#define SHORT 5
+#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 i386-opcode.h.
+ the opcode table in opcode/i386.h.
*/
-#define Unknown 0x0
/* register */
-#define Reg8 0x1 /* 8 bit reg */
-#define Reg16 0x2 /* 16 bit reg */
-#define Reg32 0x4 /* 32 bit reg */
-#define Reg (Reg8|Reg16|Reg32) /* gen'l register */
-#define WordReg (Reg16|Reg32) /* for push/pop operands */
+#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 */
-#define ImmUnknown Imm32 /* for unknown expressions */
-#define Imm (Imm8|Imm8S|Imm16|Imm32) /* gen'l 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 Disp8 0x200 /* 8 bit displacement (for jumps) */
-#define Disp16 0x400 /* 16 bit displacement */
-#define Disp32 0x800 /* 32 bit displacement */
-#define Disp (Disp8|Disp16|Disp32) /* General displacement */
-#define DispUnknown Disp32 /* for unknown size displacements */
-#define Mem8 0x1000
-#define Mem16 0x2000
-#define Mem32 0x4000
-#define BaseIndex 0x8000
-#define Mem (Disp|Mem8|Mem16|Mem32|BaseIndex) /* General memory */
-#define WordMem (Mem16|Mem32|Disp|BaseIndex)
-#define ByteMem (Mem8|Disp|BaseIndex)
+#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 0x10000 /* register to hold in/out port addr = dx */
-#define ShiftCount 0x20000 /* register to hold shift cound = cl */
-#define Control 0x40000 /* Control register */
-#define Debug 0x80000 /* Debug register */
-#define Test 0x100000 /* Test register */
-#define FloatReg 0x200000 /* Float register */
-#define FloatAcc 0x400000 /* Float stack top %st(0) */
-#define SReg2 0x800000 /* 2 bit segment register */
-#define SReg3 0x1000000 /* 3 bit segment register */
-#define Acc 0x2000000 /* Accumulator %al or %ax or %eax */
+#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 JumpAbsolute 0x4000000
-#define Abs8 0x08000000
-#define Abs16 0x10000000
-#define Abs32 0x20000000
-#define Abs (Abs8|Abs16|Abs32)
-#define RegMMX 0x40000000 /* MMX register */
-
-#define Byte (Reg8|Imm8|Imm8S)
-#define Word (Reg16|Imm16)
-#define DWord (Reg32|Imm32)
+#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|Abs8|Abs32) : (Disp32|Abs32)
+ (fits_in_signed_byte(num) ? (Disp8|Disp32) : Disp32)
typedef struct
{
@@ -260,13 +319,16 @@ typedef struct
/* how many operands */
unsigned int operands;
- /* base_opcode is the fundamental opcode byte with a optional prefix(es). */
+ /* base_opcode is the fundamental opcode byte without optional
+ prefix(es). */
unsigned int base_opcode;
/* extension_opcode is the 3 bit extension for group <n> insns.
+ This field is also used to store the 8-bit opcode suffix for the
+ AMD 3DNow! instructions.
If this template has no extension opcode (the usual case) use None */
- unsigned char extension_opcode;
-#define None 0xff /* If no extension_opcode is possible. */
+ unsigned int extension_opcode;
+#define None 0xffff /* If no extension_opcode is possible. */
/* 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
@@ -274,41 +336,37 @@ typedef struct
unsigned int opcode_modifier;
/* opcode_modifier bits: */
-#define W 0x1 /* set if operands are words or dwords */
-#define D 0x2 /* D = 0 if Reg --> Regmem; D = 1 if Regmem --> Reg */
- /* direction flag for floating insns: MUST BE 0x400 */
-#define FloatD 0x400
- /* shorthand */
-#define DW (D|W)
-#define ShortForm 0x10 /* register is in low 3 bits of opcode */
-#define ShortFormW 0x20 /* ShortForm and W bit is 0x8 */
-#define Seg2ShortForm 0x40 /* encoding of load segment reg insns */
-#define Seg3ShortForm 0x80 /* fs/gs segment register insns. */
-#define Jump 0x100 /* special case for jump insns. */
+#define W 0x1 /* set if operands can be words or dwords
+ encoded the canonical way */
+#define D 0x2 /* D = 0 if Reg --> Regmem;
+ D = 1 if Regmem --> Reg: MUST BE 0x2 */
+#define Modrm 0x4
+#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 JumpDword 0x80 /* call and jump */
+#define JumpByte 0x100 /* loop and jecxz */
#define JumpInterSegment 0x200 /* special case for intersegment leaps/calls */
- /* 0x400 CANNOT BE USED since it's already used by FloatD above */
-#define DONT_USE 0x400
-#define NoModrm 0x800
-#define Modrm 0x1000
-#define imulKludge 0x2000
-#define JumpByte 0x4000
-#define JumpDword 0x8000
-#define ReverseRegRegmem 0x10000
-#define Data16 0x20000 /* needs data prefix if in 32-bit mode */
-#define Data32 0x40000 /* needs data prefix if in 16-bit mode */
-#define iclrKludge 0x80000 /* used to convert clr to xor */
-#define FWait 0x100000 /* instruction needs FWAIT */
-
- /* (opcode_modifier & COMES_IN_ALL_SIZES) is true if the
- instuction comes in byte, word, and dword sizes and is encoded into
- machine code in the canonical way. */
-#define COMES_IN_ALL_SIZES (W)
-
- /* (opcode_modifier & COMES_IN_BOTH_DIRECTIONS) indicates that the
- source and destination operands can be reversed by setting either
- the D (for integer insns) or the FloatD (for floating insns) bit
- in base_opcode. */
-#define COMES_IN_BOTH_DIRECTIONS (D|FloatD)
+#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 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 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.
@@ -327,8 +385,8 @@ template;
*/
typedef struct
{
- template *start;
- template *end;
+ const template *start;
+ const template *end;
} templates;
/* these are for register name --> number & type hash lookup */
@@ -338,7 +396,6 @@ typedef struct
unsigned int reg_type;
unsigned int reg_num;
}
-
reg_entry;
typedef struct
@@ -346,37 +403,25 @@ typedef struct
char *seg_name;
unsigned int seg_prefix;
}
-
seg_entry;
-/* these are for prefix name --> prefix code hash lookup */
-typedef struct
- {
- char *prefix_name;
- unsigned char prefix_code;
- }
-
-prefix_entry;
-
/* 386 operand encoding bytes: see 386 book for details of this. */
typedef struct
{
- unsigned regmem:3; /* codes register or memory operand */
- unsigned reg:3; /* codes register operand (or extended opcode) */
- unsigned mode:2; /* 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. */
typedef struct
{
- unsigned base:3;
- unsigned index:3;
- unsigned scale:2;
+ unsigned base;
+ unsigned index;
+ unsigned scale;
}
-
-base_index_byte;
+sib_byte;
/* The name of the global offset table generated by the compiler. Allow
this to be overridden if need be. */
@@ -396,21 +441,10 @@ void i386_validate_fix PARAMS ((struct fix *));
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
-
-extern int flag_16bit_code;
-
-#ifdef BFD_ASSEMBLER
-#define md_maybe_text() \
- ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
-#else
-#define md_maybe_text() \
- (now_seg != data_section && now_seg != bss_section)
-#endif
-
#define md_do_align(n, fill, len, max, around) \
if ((n) && !need_pass_2 \
&& (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \
- && md_maybe_text ()) \
+ && subseg_text_p (now_seg)) \
{ \
char *p; \
p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \
diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c
new file mode 100644
index 0000000..365a535
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-ppc.c
@@ -0,0 +1,5026 @@
+/* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support.
+
+ 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. */
+
+#include <stdio.h>
+#include <ctype.h>
+#include "as.h"
+#include "subsegs.h"
+
+#include "opcode/ppc.h"
+
+#ifdef OBJ_ELF
+#include "elf/ppc.h"
+#endif
+
+#ifdef TE_PE
+#include "coff/pe.h"
+#endif
+
+/* This is the assembler for the PowerPC or POWER (RS/6000) chips. */
+
+/* Tell the main code what the endianness is. */
+extern int target_big_endian;
+
+/* Whether or not, we've set target_big_endian. */
+static int set_target_endian = 0;
+
+/* Whether to use user friendly register names. */
+#ifndef TARGET_REG_NAMES_P
+#ifdef TE_PE
+#define TARGET_REG_NAMES_P true
+#else
+#define TARGET_REG_NAMES_P false
+#endif
+#endif
+
+static boolean reg_names_p = TARGET_REG_NAMES_P;
+
+static boolean register_name PARAMS ((expressionS *));
+static void ppc_set_cpu PARAMS ((void));
+static unsigned long ppc_insert_operand
+ PARAMS ((unsigned long insn, const struct powerpc_operand *operand,
+ offsetT val, char *file, unsigned int line));
+static void ppc_macro PARAMS ((char *str, const struct powerpc_macro *macro));
+static void ppc_byte PARAMS ((int));
+static int ppc_is_toc_sym PARAMS ((symbolS *sym));
+static void ppc_tc PARAMS ((int));
+
+#ifdef OBJ_XCOFF
+static void ppc_comm PARAMS ((int));
+static void ppc_bb PARAMS ((int));
+static void ppc_bc PARAMS ((int));
+static void ppc_bf PARAMS ((int));
+static void ppc_biei PARAMS ((int));
+static void ppc_bs PARAMS ((int));
+static void ppc_eb PARAMS ((int));
+static void ppc_ec PARAMS ((int));
+static void ppc_ef PARAMS ((int));
+static void ppc_es PARAMS ((int));
+static void ppc_csect PARAMS ((int));
+static void ppc_change_csect PARAMS ((symbolS *));
+static void ppc_function PARAMS ((int));
+static void ppc_extern PARAMS ((int));
+static void ppc_lglobl PARAMS ((int));
+static void ppc_section PARAMS ((int));
+static void ppc_named_section PARAMS ((int));
+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_vbyte PARAMS ((int));
+#endif
+
+#ifdef OBJ_ELF
+static bfd_reloc_code_real_type ppc_elf_suffix PARAMS ((char **, expressionS *));
+static void ppc_elf_cons PARAMS ((int));
+static void ppc_elf_rdata PARAMS ((int));
+static void ppc_elf_lcomm PARAMS ((int));
+static void ppc_elf_validate_fix PARAMS ((fixS *, segT));
+#endif
+
+#ifdef TE_PE
+static void ppc_set_current_section PARAMS ((segT));
+static void ppc_previous PARAMS ((int));
+static void ppc_pdata PARAMS ((int));
+static void ppc_ydata PARAMS ((int));
+static void ppc_reldata PARAMS ((int));
+static void ppc_rdata PARAMS ((int));
+static void ppc_ualong PARAMS ((int));
+static void ppc_znop PARAMS ((int));
+static void ppc_pe_comm PARAMS ((int));
+static void ppc_pe_section PARAMS ((int));
+static void ppc_pe_function PARAMS ((int));
+static void ppc_pe_tocd PARAMS ((int));
+#endif
+
+/* Generic assembler global variables which must be defined by all
+ targets. */
+
+#ifdef OBJ_ELF
+/* This string holds the chars that always start a comment. If the
+ pre-processor is disabled, these aren't very useful. The macro
+ tc_comment_chars points to this. We use this, rather than the
+ usual comment_chars, so that we can switch for Solaris conventions. */
+static const char ppc_solaris_comment_chars[] = "#!";
+static const char ppc_eabi_comment_chars[] = "#";
+
+#ifdef TARGET_SOLARIS_COMMENT
+const char *ppc_comment_chars = ppc_solaris_comment_chars;
+#else
+const char *ppc_comment_chars = ppc_eabi_comment_chars;
+#endif
+#else
+const char comment_chars[] = "#";
+#endif
+
+/* 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
+ single line. */
+const char line_separator_chars[] = ";";
+
+/* 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,
+ as in 0d1.0. */
+const char FLT_CHARS[] = "dD";
+
+/* The target specific pseudo-ops which we support. */
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ /* Pseudo-ops which must be overridden. */
+ { "byte", ppc_byte, 0 },
+
+#ifdef OBJ_XCOFF
+ /* Pseudo-ops specific to the RS/6000 XCOFF format. Some of these
+ legitimately belong in the obj-*.c file. However, XCOFF is based
+ on COFF, and is only implemented for the RS/6000. We just use
+ obj-coff.c, and add what we need here. */
+ { "comm", ppc_comm, 0 },
+ { "lcomm", ppc_comm, 1 },
+ { "bb", ppc_bb, 0 },
+ { "bc", ppc_bc, 0 },
+ { "bf", ppc_bf, 0 },
+ { "bi", ppc_biei, 0 },
+ { "bs", ppc_bs, 0 },
+ { "csect", ppc_csect, 0 },
+ { "data", ppc_section, 'd' },
+ { "eb", ppc_eb, 0 },
+ { "ec", ppc_ec, 0 },
+ { "ef", ppc_ef, 0 },
+ { "ei", ppc_biei, 1 },
+ { "es", ppc_es, 0 },
+ { "extern", ppc_extern, 0 },
+ { "function", ppc_function, 0 },
+ { "lglobl", ppc_lglobl, 0 },
+ { "rename", ppc_rename, 0 },
+ { "section", ppc_named_section, 0 },
+ { "stabx", ppc_stabx, 0 },
+ { "text", ppc_section, 't' },
+ { "toc", ppc_toc, 0 },
+ { "long", ppc_xcoff_cons, 2 },
+ { "word", ppc_xcoff_cons, 1 },
+ { "short", ppc_xcoff_cons, 1 },
+ { "vbyte", ppc_vbyte, 0 },
+#endif
+
+#ifdef OBJ_ELF
+ { "long", ppc_elf_cons, 4 },
+ { "word", ppc_elf_cons, 2 },
+ { "short", ppc_elf_cons, 2 },
+ { "rdata", ppc_elf_rdata, 0 },
+ { "rodata", ppc_elf_rdata, 0 },
+ { "lcomm", ppc_elf_lcomm, 0 },
+#endif
+
+#ifdef TE_PE
+ /* Pseudo-ops specific to the Windows NT PowerPC PE (coff) format */
+ { "previous", ppc_previous, 0 },
+ { "pdata", ppc_pdata, 0 },
+ { "ydata", ppc_ydata, 0 },
+ { "reldata", ppc_reldata, 0 },
+ { "rdata", ppc_rdata, 0 },
+ { "ualong", ppc_ualong, 0 },
+ { "znop", ppc_znop, 0 },
+ { "comm", ppc_pe_comm, 0 },
+ { "lcomm", ppc_pe_comm, 1 },
+ { "section", ppc_pe_section, 0 },
+ { "function", ppc_pe_function,0 },
+ { "tocd", ppc_pe_tocd, 0 },
+#endif
+
+ /* This pseudo-op is used even when not generating XCOFF output. */
+ { "tc", ppc_tc, 0 },
+
+ { NULL, NULL, 0 }
+};
+
+
+/* Predefined register names if -mregnames (or default for Windows NT). */
+/* In general, there are lots of them, in an attempt to be compatible */
+/* with a number of other Windows NT assemblers. */
+
+/* Structure to hold information about predefined registers. */
+struct pd_reg
+ {
+ char *name;
+ int value;
+ };
+
+/* List of registers that are pre-defined:
+
+ Each general register has predefined names of the form:
+ 1. r<reg_num> which has the value <reg_num>.
+ 2. r.<reg_num> which has the value <reg_num>.
+
+
+ Each floating point register has predefined names of the form:
+ 1. f<reg_num> which has the value <reg_num>.
+ 2. f.<reg_num> which has the value <reg_num>.
+
+ Each condition register has predefined names of the form:
+ 1. cr<reg_num> which has the value <reg_num>.
+ 2. cr.<reg_num> which has the value <reg_num>.
+
+ There are individual registers as well:
+ sp or r.sp has the value 1
+ rtoc or r.toc has the value 2
+ fpscr has the value 0
+ xer has the value 1
+ lr has the value 8
+ ctr has the value 9
+ pmr has the value 0
+ dar has the value 19
+ dsisr has the value 18
+ dec has the value 22
+ sdr1 has the value 25
+ srr0 has the value 26
+ srr1 has the value 27
+
+ The table is sorted. Suitable for searching by a binary search. */
+
+static const struct pd_reg pre_defined_registers[] =
+{
+ { "cr.0", 0 }, /* Condition Registers */
+ { "cr.1", 1 },
+ { "cr.2", 2 },
+ { "cr.3", 3 },
+ { "cr.4", 4 },
+ { "cr.5", 5 },
+ { "cr.6", 6 },
+ { "cr.7", 7 },
+
+ { "cr0", 0 },
+ { "cr1", 1 },
+ { "cr2", 2 },
+ { "cr3", 3 },
+ { "cr4", 4 },
+ { "cr5", 5 },
+ { "cr6", 6 },
+ { "cr7", 7 },
+
+ { "ctr", 9 },
+
+ { "dar", 19 }, /* Data Access Register */
+ { "dec", 22 }, /* Decrementer */
+ { "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.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 },
+ { "f30", 30 },
+ { "f31", 31 },
+ { "f4", 4 },
+ { "f5", 5 },
+ { "f6", 6 },
+ { "f7", 7 },
+ { "f8", 8 },
+ { "f9", 9 },
+
+ { "fpscr", 0 },
+
+ { "lr", 8 }, /* Link Register */
+
+ { "pmr", 0 },
+
+ { "r.0", 0 }, /* General Purpose Registers */
+ { "r.1", 1 },
+ { "r.10", 10 },
+ { "r.11", 11 },
+ { "r.12", 12 },
+ { "r.13", 13 },
+ { "r.14", 14 },
+ { "r.15", 15 },
+ { "r.16", 16 },
+ { "r.17", 17 },
+ { "r.18", 18 },
+ { "r.19", 19 },
+ { "r.2", 2 },
+ { "r.20", 20 },
+ { "r.21", 21 },
+ { "r.22", 22 },
+ { "r.23", 23 },
+ { "r.24", 24 },
+ { "r.25", 25 },
+ { "r.26", 26 },
+ { "r.27", 27 },
+ { "r.28", 28 },
+ { "r.29", 29 },
+ { "r.3", 3 },
+ { "r.30", 30 },
+ { "r.31", 31 },
+ { "r.4", 4 },
+ { "r.5", 5 },
+ { "r.6", 6 },
+ { "r.7", 7 },
+ { "r.8", 8 },
+ { "r.9", 9 },
+
+ { "r.sp", 1 }, /* Stack Pointer */
+
+ { "r.toc", 2 }, /* Pointer to the table of contents */
+
+ { "r0", 0 }, /* More general purpose registers */
+ { "r1", 1 },
+ { "r10", 10 },
+ { "r11", 11 },
+ { "r12", 12 },
+ { "r13", 13 },
+ { "r14", 14 },
+ { "r15", 15 },
+ { "r16", 16 },
+ { "r17", 17 },
+ { "r18", 18 },
+ { "r19", 19 },
+ { "r2", 2 },
+ { "r20", 20 },
+ { "r21", 21 },
+ { "r22", 22 },
+ { "r23", 23 },
+ { "r24", 24 },
+ { "r25", 25 },
+ { "r26", 26 },
+ { "r27", 27 },
+ { "r28", 28 },
+ { "r29", 29 },
+ { "r3", 3 },
+ { "r30", 30 },
+ { "r31", 31 },
+ { "r4", 4 },
+ { "r5", 5 },
+ { "r6", 6 },
+ { "r7", 7 },
+ { "r8", 8 },
+ { "r9", 9 },
+
+ { "rtoc", 2 }, /* Table of contents */
+
+ { "sdr1", 25 }, /* Storage Description Register 1 */
+
+ { "sp", 1 },
+
+ { "srr0", 26 }, /* Machine Status Save/Restore Register 0 */
+ { "srr1", 27 }, /* Machine Status Save/Restore Register 1 */
+
+ { "xer", 1 },
+
+};
+
+#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. */
+
+static int reg_name_search
+ PARAMS ((const struct pd_reg *, int, const char * name));
+
+static int
+reg_name_search (regs, regcount, name)
+ const struct pd_reg *regs;
+ int regcount;
+ const char *name;
+{
+ int middle, low, high;
+ int cmp;
+
+ low = 0;
+ high = regcount - 1;
+
+ do
+ {
+ middle = (low + high) / 2;
+ cmp = strcasecmp (name, regs[middle].name);
+ if (cmp < 0)
+ high = middle - 1;
+ else if (cmp > 0)
+ low = middle + 1;
+ else
+ return regs[middle].value;
+ }
+ while (low <= high);
+
+ return -1;
+}
+
+/*
+ * Summary of register_name().
+ *
+ * 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.
+ */
+
+static boolean
+register_name (expressionP)
+ expressionS *expressionP;
+{
+ int reg_number;
+ char *name;
+ char *start;
+ char c;
+
+ /* Find the spelling of the operand */
+ start = name = input_line_pointer;
+ if (name[0] == '%' && isalpha (name[1]))
+ name = ++input_line_pointer;
+
+ else if (!reg_names_p || !isalpha (name[0]))
+ return false;
+
+ c = get_symbol_end ();
+ 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)
+ {
+ 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;
+ *input_line_pointer = c; /* put back the delimiting char */
+ return true;
+ }
+ else
+ {
+ /* reset the line as if we had not done anything */
+ *input_line_pointer = c; /* put back the delimiting char */
+ input_line_pointer = start; /* reset input_line pointer */
+ return false;
+ }
+}
+
+/* This function is called for each symbol seen in an expression. It
+ handles the special parsing which PowerPC assemblers are supposed
+ to use for condition codes. */
+
+/* Whether to do the special parsing. */
+static boolean cr_operand;
+
+/* Names to recognize in a condition code. This table is sorted. */
+static const struct pd_reg cr_names[] =
+{
+ { "cr0", 0 },
+ { "cr1", 1 },
+ { "cr2", 2 },
+ { "cr3", 3 },
+ { "cr4", 4 },
+ { "cr5", 5 },
+ { "cr6", 6 },
+ { "cr7", 7 },
+ { "eq", 2 },
+ { "gt", 1 },
+ { "lt", 0 },
+ { "so", 3 },
+ { "un", 3 }
+};
+
+/* Parsing function. This returns non-zero if it recognized an
+ expression. */
+
+int
+ppc_parse_name (name, expr)
+ const char *name;
+ expressionS *expr;
+{
+ int val;
+
+ if (! cr_operand)
+ return 0;
+
+ val = reg_name_search (cr_names, sizeof cr_names / sizeof cr_names[0],
+ name);
+ if (val < 0)
+ return 0;
+
+ expr->X_op = O_constant;
+ expr->X_add_number = val;
+
+ return 1;
+}
+
+/* Local variables. */
+
+/* The type of processor we are assembling for. This is one or more
+ of the PPC_OPCODE flags defined in opcode/ppc.h. */
+static int ppc_cpu = 0;
+
+/* The size of the processor we are assembling for. This is either
+ PPC_OPCODE_32 or PPC_OPCODE_64. */
+static unsigned long ppc_size = PPC_OPCODE_32;
+
+/* Opcode hash table. */
+static struct hash_control *ppc_hash;
+
+/* Macro hash table. */
+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;
+
+/* Flags to set in the elf header */
+static flagword ppc_flags = 0;
+
+/* Whether this is Solaris or not. */
+#ifdef TARGET_SOLARIS_COMMENT
+#define SOLARIS_P true
+#else
+#define SOLARIS_P false
+#endif
+
+static boolean msolaris = SOLARIS_P;
+#endif
+
+#ifdef OBJ_XCOFF
+
+/* The RS/6000 assembler uses the .csect pseudo-op to generate code
+ using a bunch of different sections. These assembler sections,
+ however, are all encompassed within the .text or .data sections of
+ the final output file. We handle this by using different
+ subsegments within these main segments. */
+
+/* Next subsegment to allocate within the .text segment. */
+static subsegT ppc_text_subsegment = 2;
+
+/* Linked list of csects in the text section. */
+static symbolS *ppc_text_csects;
+
+/* Next subsegment to allocate within the .data segment. */
+static subsegT ppc_data_subsegment = 2;
+
+/* Linked list of csects in the data section. */
+static symbolS *ppc_data_csects;
+
+/* The current csect. */
+static symbolS *ppc_current_csect;
+
+/* The RS/6000 assembler uses a TOC which holds addresses of functions
+ and variables. Symbols are put in the TOC with the .tc pseudo-op.
+ A special relocation is used when accessing TOC entries. We handle
+ the TOC as a subsegment within the .data segment. We set it up if
+ we see a .toc pseudo-op, and save the csect symbol here. */
+static symbolS *ppc_toc_csect;
+
+/* The first frag in the TOC subsegment. */
+static fragS *ppc_toc_frag;
+
+/* The first frag in the first subsegment after the TOC in the .data
+ segment. NULL if there are no subsegments after the TOC. */
+static fragS *ppc_after_toc_frag;
+
+/* The current static block. */
+static symbolS *ppc_current_block;
+
+/* The COFF debugging section; set by md_begin. This is not the
+ .debug section, but is instead the secret BFD section which will
+ cause BFD to set the section number of a symbol to N_DEBUG. */
+static asection *ppc_coff_debug_section;
+
+#endif /* OBJ_XCOFF */
+
+#ifdef TE_PE
+
+/* Various sections that we need for PE coff support. */
+static segT ydata_section;
+static segT pdata_section;
+static segT reldata_section;
+static segT rdata_section;
+static segT tocdata_section;
+
+/* The current section and the previous section. See ppc_previous. */
+static segT ppc_previous_section;
+static segT ppc_current_section;
+
+#endif /* TE_PE */
+
+#ifdef OBJ_ELF
+symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE" */
+#endif /* OBJ_ELF */
+
+#ifdef OBJ_ELF
+CONST char *md_shortopts = "b:l:usm:K:VQ:";
+#else
+CONST char *md_shortopts = "um:";
+#endif
+struct option md_longopts[] = {
+ {NULL, no_argument, NULL, 0}
+};
+size_t md_longopts_size = sizeof(md_longopts);
+
+int
+md_parse_option (c, arg)
+ int c;
+ char *arg;
+{
+ switch (c)
+ {
+ case 'u':
+ /* -u means that any undefined symbols should be treated as
+ external, which is the default for gas anyhow. */
+ break;
+
+#ifdef OBJ_ELF
+ case 'l':
+ /* Solaris as takes -le (presumably for little endian). For completeness
+ sake, recognize -be also. */
+ if (strcmp (arg, "e") == 0)
+ {
+ target_big_endian = 0;
+ set_target_endian = 1;
+ }
+ else
+ return 0;
+
+ break;
+
+ case 'b':
+ if (strcmp (arg, "e") == 0)
+ {
+ target_big_endian = 1;
+ set_target_endian = 1;
+ }
+ else
+ return 0;
+
+ break;
+
+ case 'K':
+ /* Recognize -K PIC */
+ if (strcmp (arg, "PIC") == 0 || strcmp (arg, "pic") == 0)
+ {
+ shlib = SHLIB_PIC;
+ ppc_flags |= EF_PPC_RELOCATABLE_LIB;
+ }
+ else
+ return 0;
+
+ break;
+#endif
+
+ case 'm':
+ /* -mpwrx and -mpwr2 mean to assemble for the IBM POWER/2
+ (RIOS2). */
+ if (strcmp (arg, "pwrx") == 0 || strcmp (arg, "pwr2") == 0)
+ ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_POWER2;
+ /* -mpwr means to assemble for the IBM POWER (RIOS1). */
+ 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. */
+ else if (strcmp (arg, "601") == 0)
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601;
+ /* -mppc, -mppc32, -m603, and -m604 mean to assemble for the
+ Motorola PowerPC 603/604. */
+ else if (strcmp (arg, "ppc") == 0
+ || strcmp (arg, "ppc32") == 0
+ || strcmp (arg, "403") == 0
+ || strcmp (arg, "603") == 0
+ || strcmp (arg, "604") == 0)
+ ppc_cpu = PPC_OPCODE_PPC;
+ /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
+ 620. */
+ else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
+ {
+ ppc_cpu = PPC_OPCODE_PPC;
+ ppc_size = PPC_OPCODE_64;
+ }
+ else if (strcmp (arg, "ppc64bridge") == 0)
+ {
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64_BRIDGE;
+ ppc_size = PPC_OPCODE_64;
+ }
+ /* -mcom means assemble for the common intersection between Power
+ and PowerPC. At present, we just allow the union, rather
+ than the intersection. */
+ else if (strcmp (arg, "com") == 0)
+ ppc_cpu = PPC_OPCODE_COMMON;
+ /* -many means to assemble for any architecture (PWR/PWRX/PPC). */
+ else if (strcmp (arg, "any") == 0)
+ ppc_cpu = PPC_OPCODE_ANY;
+
+ else if (strcmp (arg, "regnames") == 0)
+ reg_names_p = true;
+
+ else if (strcmp (arg, "no-regnames") == 0)
+ reg_names_p = false;
+
+#ifdef OBJ_ELF
+ /* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */
+ else if (strcmp (arg, "relocatable") == 0)
+ {
+ shlib = SHILB_MRELOCATABLE;
+ ppc_flags |= EF_PPC_RELOCATABLE;
+ }
+
+ else if (strcmp (arg, "relocatable-lib") == 0)
+ {
+ shlib = SHILB_MRELOCATABLE;
+ ppc_flags |= EF_PPC_RELOCATABLE_LIB;
+ }
+
+ /* -memb, set embedded bit */
+ else if (strcmp (arg, "emb") == 0)
+ ppc_flags |= EF_PPC_EMB;
+
+ /* -mlittle/-mbig set the endianess */
+ else if (strcmp (arg, "little") == 0 || strcmp (arg, "little-endian") == 0)
+ {
+ target_big_endian = 0;
+ set_target_endian = 1;
+ }
+
+ else if (strcmp (arg, "big") == 0 || strcmp (arg, "big-endian") == 0)
+ {
+ target_big_endian = 1;
+ set_target_endian = 1;
+ }
+
+ else if (strcmp (arg, "solaris") == 0)
+ {
+ msolaris = true;
+ ppc_comment_chars = ppc_solaris_comment_chars;
+ }
+
+ else if (strcmp (arg, "no-solaris") == 0)
+ {
+ msolaris = false;
+ ppc_comment_chars = ppc_eabi_comment_chars;
+ }
+#endif
+ else
+ {
+ as_bad (_("invalid switch -m%s"), arg);
+ return 0;
+ }
+ break;
+
+#ifdef OBJ_ELF
+ /* -V: SVR4 argument to print version ID. */
+ case 'V':
+ print_version_id ();
+ break;
+
+ /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section
+ should be emitted or not. FIXME: Not implemented. */
+ case 'Q':
+ break;
+
+ /* Solaris takes -s to specify that .stabs go in a .stabs section,
+ rather than .stabs.excl, which is ignored by the linker.
+ FIXME: Not implemented. */
+ case 's':
+ if (arg)
+ return 0;
+
+ break;
+#endif
+
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+void
+md_show_usage (stream)
+ FILE *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\
+ 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\
+-mcom generate code Power/PowerPC common instructions\n\
+-many generate code for any architecture (PWR/PWRX/PPC)\n\
+-mregnames Allow symbolic names for registers\n\
+-mno-regnames Do not allow symbolic names for registers\n"));
+#ifdef OBJ_ELF
+ 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\
+-mlittle, -mlittle-endian\n\
+ generate code for a little endian machine\n\
+-mbig, -mbig-endian generate code for a big endian machine\n\
+-msolaris generate code for Solaris\n\
+-mno-solaris do not generate code for Solaris\n\
+-V print assembler version number\n\
+-Qy, -Qn ignored\n"));
+#endif
+}
+
+/* Set ppc_cpu if it is not already set. */
+
+static void
+ppc_set_cpu ()
+{
+ const char *default_os = TARGET_OS;
+ const char *default_cpu = TARGET_CPU;
+
+ if (ppc_cpu == 0)
+ {
+ if (strncmp (default_os, "aix", 3) == 0
+ && default_os[3] >= '4' && default_os[3] <= '9')
+ ppc_cpu = PPC_OPCODE_COMMON;
+ else if (strncmp (default_os, "aix3", 4) == 0)
+ ppc_cpu = PPC_OPCODE_POWER;
+ else if (strcmp (default_cpu, "rs6000") == 0)
+ ppc_cpu = PPC_OPCODE_POWER;
+ else if (strcmp (default_cpu, "powerpc") == 0
+ || strcmp (default_cpu, "powerpcle") == 0)
+ ppc_cpu = PPC_OPCODE_PPC;
+ else
+ as_fatal (_("Unknown default cpu = %s, os = %s"), default_cpu, default_os);
+ }
+}
+
+/* Figure out the BFD architecture to use. */
+
+enum bfd_architecture
+ppc_arch ()
+{
+ const char *default_cpu = TARGET_CPU;
+ ppc_set_cpu ();
+
+ if ((ppc_cpu & PPC_OPCODE_PPC) != 0)
+ return bfd_arch_powerpc;
+ else if ((ppc_cpu & PPC_OPCODE_POWER) != 0)
+ return bfd_arch_rs6000;
+ else if ((ppc_cpu & (PPC_OPCODE_COMMON | PPC_OPCODE_ANY)) != 0)
+ {
+ if (strcmp (default_cpu, "rs6000") == 0)
+ return bfd_arch_rs6000;
+ else if (strcmp (default_cpu, "powerpc") == 0
+ || strcmp (default_cpu, "powerpcle") == 0)
+ return bfd_arch_powerpc;
+ }
+
+ as_fatal (_("Neither Power nor PowerPC opcodes were selected."));
+ return bfd_arch_unknown;
+}
+
+/* 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. */
+
+void
+md_begin ()
+{
+ register const struct powerpc_opcode *op;
+ const struct powerpc_opcode *op_end;
+ const struct powerpc_macro *macro;
+ const struct powerpc_macro *macro_end;
+ boolean dup_insn = false;
+
+ ppc_set_cpu ();
+
+#ifdef OBJ_ELF
+ /* Set the ELF flags if desired. */
+ if (ppc_flags && !msolaris)
+ bfd_set_private_flags (stdoutput, ppc_flags);
+#endif
+
+ /* Insert the opcodes into a hash table. */
+ ppc_hash = hash_new ();
+
+ op_end = powerpc_opcodes + powerpc_num_opcodes;
+ for (op = powerpc_opcodes; op < op_end; op++)
+ {
+ know ((op->opcode & op->mask) == op->opcode);
+
+ if ((op->flags & ppc_cpu) != 0
+ && ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == 0
+ || (op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == ppc_size
+ || (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0))
+ {
+ const char *retval;
+
+ retval = hash_insert (ppc_hash, op->name, (PTR) op);
+ if (retval != (const char *) NULL)
+ {
+ /* Ignore Power duplicates for -m601 */
+ if ((ppc_cpu & PPC_OPCODE_601) != 0
+ && (op->flags & PPC_OPCODE_POWER) != 0)
+ continue;
+
+ as_bad (_("Internal assembler error for instruction %s"), op->name);
+ dup_insn = true;
+ }
+ }
+ }
+
+ /* Insert the macros into a hash table. */
+ ppc_macro_hash = hash_new ();
+
+ macro_end = powerpc_macros + powerpc_num_macros;
+ for (macro = powerpc_macros; macro < macro_end; macro++)
+ {
+ if ((macro->flags & ppc_cpu) != 0)
+ {
+ const char *retval;
+
+ retval = hash_insert (ppc_macro_hash, macro->name, (PTR) macro);
+ if (retval != (const char *) NULL)
+ {
+ as_bad (_("Internal assembler error for macro %s"), macro->name);
+ dup_insn = true;
+ }
+ }
+ }
+
+ if (dup_insn)
+ abort ();
+
+ /* Tell the main code what the endianness is if it is not overidden by the user. */
+ if (!set_target_endian)
+ {
+ set_target_endian = 1;
+ target_big_endian = PPC_BIG_ENDIAN;
+ }
+
+#ifdef OBJ_XCOFF
+ ppc_coff_debug_section = coff_section_from_bfd_index (stdoutput, N_DEBUG);
+
+ /* Create dummy symbols to serve as initial csects. This forces the
+ text csects to precede the data csects. These symbols will not
+ be output. */
+ ppc_text_csects = symbol_make ("dummy\001");
+ symbol_get_tc (ppc_text_csects)->within = ppc_text_csects;
+ ppc_data_csects = symbol_make ("dummy\001");
+ symbol_get_tc (ppc_data_csects)->within = ppc_data_csects;
+#endif
+
+#ifdef TE_PE
+
+ ppc_current_section = text_section;
+ ppc_previous_section = 0;
+
+#endif
+}
+
+/* Insert an operand value into an instruction. */
+
+static unsigned long
+ppc_insert_operand (insn, operand, val, file, line)
+ unsigned long insn;
+ const struct powerpc_operand *operand;
+ offsetT val;
+ char *file;
+ unsigned int line;
+{
+ if (operand->bits != 32)
+ {
+ long min, max;
+ offsetT test;
+
+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+ {
+ if ((operand->flags & PPC_OPERAND_SIGNOPT) != 0)
+ max = (1 << operand->bits) - 1;
+ else
+ max = (1 << (operand->bits - 1)) - 1;
+ min = - (1 << (operand->bits - 1));
+
+ if (ppc_size == PPC_OPCODE_32)
+ {
+ /* Some people write 32 bit hex constants with the sign
+ extension done by hand. This shouldn't really be
+ valid, but, to permit this code to assemble on a 64
+ bit host, we sign extend the 32 bit value. */
+ if (val > 0
+ && (val & (offsetT) 0x80000000) != 0
+ && (val & (offsetT) 0xffffffff) == val)
+ {
+ val -= 0x80000000;
+ val -= 0x80000000;
+ }
+ }
+ }
+ else
+ {
+ max = (1 << operand->bits) - 1;
+ min = 0;
+ }
+
+ if ((operand->flags & PPC_OPERAND_NEGATIVE) != 0)
+ test = - val;
+ else
+ test = val;
+
+ if (test < (offsetT) min || test > (offsetT) max)
+ {
+ const char *err =
+ _("operand out of range (%s not between %ld and %ld)");
+ char buf[100];
+
+ sprint_value (buf, test);
+ if (file == (char *) NULL)
+ as_bad (err, buf, min, max);
+ else
+ as_bad_where (file, line, err, buf, min, max);
+ }
+ }
+
+ if (operand->insert)
+ {
+ const char *errmsg;
+
+ errmsg = NULL;
+ insn = (*operand->insert) (insn, (long) val, &errmsg);
+ if (errmsg != (const char *) NULL)
+ as_bad (errmsg);
+ }
+ else
+ insn |= (((long) val & ((1 << operand->bits) - 1))
+ << operand->shift);
+
+ return insn;
+}
+
+
+#ifdef OBJ_ELF
+/* Parse @got, etc. and return the desired relocation. */
+static bfd_reloc_code_real_type
+ppc_elf_suffix (str_p, exp_p)
+ char **str_p;
+ expressionS *exp_p;
+{
+ struct map_bfd {
+ char *string;
+ int length;
+ bfd_reloc_code_real_type reloc;
+ };
+
+ char ident[20];
+ char *str = *str_p;
+ char *str2;
+ int ch;
+ int len;
+ struct map_bfd *ptr;
+
+#define MAP(str,reloc) { str, sizeof(str)-1, reloc }
+
+ static struct map_bfd mapping[] = {
+ MAP ("l", BFD_RELOC_LO16),
+ MAP ("h", BFD_RELOC_HI16),
+ MAP ("ha", BFD_RELOC_HI16_S),
+ MAP ("brtaken", BFD_RELOC_PPC_B16_BRTAKEN),
+ MAP ("brntaken", BFD_RELOC_PPC_B16_BRNTAKEN),
+ MAP ("got", BFD_RELOC_16_GOTOFF),
+ MAP ("got@l", BFD_RELOC_LO16_GOTOFF),
+ MAP ("got@h", BFD_RELOC_HI16_GOTOFF),
+ MAP ("got@ha", BFD_RELOC_HI16_S_GOTOFF),
+ MAP ("fixup", BFD_RELOC_CTOR), /* warnings with -mrelocatable */
+ MAP ("plt", BFD_RELOC_24_PLT_PCREL),
+ MAP ("pltrel24", BFD_RELOC_24_PLT_PCREL),
+ MAP ("copy", BFD_RELOC_PPC_COPY),
+ MAP ("globdat", BFD_RELOC_PPC_GLOB_DAT),
+ MAP ("local24pc", BFD_RELOC_PPC_LOCAL24PC),
+ MAP ("local", BFD_RELOC_PPC_LOCAL24PC),
+ MAP ("pltrel", BFD_RELOC_32_PLT_PCREL),
+ MAP ("plt@l", BFD_RELOC_LO16_PLTOFF),
+ MAP ("plt@h", BFD_RELOC_HI16_PLTOFF),
+ MAP ("plt@ha", BFD_RELOC_HI16_S_PLTOFF),
+ MAP ("sdarel", BFD_RELOC_GPREL16),
+ MAP ("sectoff", BFD_RELOC_32_BASEREL),
+ MAP ("sectoff@l", BFD_RELOC_LO16_BASEREL),
+ MAP ("sectoff@h", BFD_RELOC_HI16_BASEREL),
+ MAP ("sectoff@ha", BFD_RELOC_HI16_S_BASEREL),
+ MAP ("naddr", BFD_RELOC_PPC_EMB_NADDR32),
+ MAP ("naddr16", BFD_RELOC_PPC_EMB_NADDR16),
+ MAP ("naddr@l", BFD_RELOC_PPC_EMB_NADDR16_LO),
+ MAP ("naddr@h", BFD_RELOC_PPC_EMB_NADDR16_HI),
+ MAP ("naddr@ha", BFD_RELOC_PPC_EMB_NADDR16_HA),
+ MAP ("sdai16", BFD_RELOC_PPC_EMB_SDAI16),
+ MAP ("sda2rel", BFD_RELOC_PPC_EMB_SDA2REL),
+ MAP ("sda2i16", BFD_RELOC_PPC_EMB_SDA2I16),
+ MAP ("sda21", BFD_RELOC_PPC_EMB_SDA21),
+ MAP ("mrkref", BFD_RELOC_PPC_EMB_MRKREF),
+ MAP ("relsect", BFD_RELOC_PPC_EMB_RELSEC16),
+ MAP ("relsect@l", BFD_RELOC_PPC_EMB_RELST_LO),
+ MAP ("relsect@h", BFD_RELOC_PPC_EMB_RELST_HI),
+ MAP ("relsect@ha", BFD_RELOC_PPC_EMB_RELST_HA),
+ MAP ("bitfld", BFD_RELOC_PPC_EMB_BIT_FLD),
+ MAP ("relsda", BFD_RELOC_PPC_EMB_RELSDA),
+ MAP ("xgot", BFD_RELOC_PPC_TOC16),
+
+ { (char *)0, 0, BFD_RELOC_UNUSED }
+ };
+
+ if (*str++ != '@')
+ return BFD_RELOC_UNUSED;
+
+ for (ch = *str, str2 = ident;
+ (str2 < ident + sizeof (ident) - 1
+ && (isalnum (ch) || ch == '@'));
+ ch = *++str)
+ {
+ *str2++ = (islower (ch)) ? ch : tolower (ch);
+ }
+
+ *str2 = '\0';
+ len = str2 - ident;
+
+ ch = ident[0];
+ for (ptr = &mapping[0]; ptr->length > 0; ptr++)
+ if (ch == ptr->string[0]
+ && len == ptr->length
+ && memcmp (ident, ptr->string, ptr->length) == 0)
+ {
+ if (exp_p->X_add_number != 0
+ && (ptr->reloc == BFD_RELOC_16_GOTOFF
+ || ptr->reloc == BFD_RELOC_LO16_GOTOFF
+ || ptr->reloc == BFD_RELOC_HI16_GOTOFF
+ || ptr->reloc == BFD_RELOC_HI16_S_GOTOFF))
+ as_warn (_("identifier+constant@got means identifier@got+constant"));
+
+ /* Now check for identifier@suffix+constant */
+ if (*str == '-' || *str == '+')
+ {
+ char *orig_line = input_line_pointer;
+ expressionS new_exp;
+
+ input_line_pointer = str;
+ expression (&new_exp);
+ if (new_exp.X_op == O_constant)
+ {
+ exp_p->X_add_number += new_exp.X_add_number;
+ str = input_line_pointer;
+ }
+
+ if (&input_line_pointer != str_p)
+ input_line_pointer = orig_line;
+ }
+
+ *str_p = str;
+ return ptr->reloc;
+ }
+
+ return BFD_RELOC_UNUSED;
+}
+
+/* Like normal .long/.short/.word, except support @got, etc. */
+/* clobbers input_line_pointer, checks */
+/* end-of-line. */
+static void
+ppc_elf_cons (nbytes)
+ register int nbytes; /* 1=.byte, 2=.word, 4=.long */
+{
+ expressionS exp;
+ bfd_reloc_code_real_type reloc;
+
+ if (is_it_end_of_statement ())
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ do
+ {
+ expression (&exp);
+ if (exp.X_op == O_symbol
+ && *input_line_pointer == '@'
+ && (reloc = ppc_elf_suffix (&input_line_pointer, &exp)) != BFD_RELOC_UNUSED)
+ {
+ reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, reloc);
+ int size = bfd_get_reloc_size (reloc_howto);
+
+ if (size > nbytes)
+ as_bad (_("%s relocations do not fit in %d bytes\n"), reloc_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
+ emit_expr (&exp, (unsigned int) nbytes);
+ }
+ while (*input_line_pointer++ == ',');
+
+ input_line_pointer--; /* Put terminator back into stream. */
+ demand_empty_rest_of_line ();
+}
+
+/* Solaris pseduo op to change to the .rodata section. */
+static void
+ppc_elf_rdata (xxx)
+ int xxx;
+{
+ char *save_line = input_line_pointer;
+ static char section[] = ".rodata\n";
+
+ /* Just pretend this is .section .rodata */
+ input_line_pointer = section;
+ obj_elf_section (xxx);
+
+ input_line_pointer = save_line;
+}
+
+/* Pseudo op to make file scope bss items */
+static void
+ppc_elf_lcomm(xxx)
+ int xxx ATTRIBUTE_UNUSED;
+{
+ register char *name;
+ register char c;
+ register char *p;
+ offsetT size;
+ register symbolS *symbolP;
+ offsetT align;
+ segT old_sec;
+ int old_subsec;
+ char *pfrag;
+ int align2;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+
+ /* 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: rest of line ignored."));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ input_line_pointer++; /* skip ',' */
+ if ((size = get_absolute_expression ()) < 0)
+ {
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) size);
+ ignore_rest_of_line ();
+ return;
+ }
+
+ /* The third argument to .lcomm is the alignment. */
+ if (*input_line_pointer != ',')
+ align = 8;
+ else
+ {
+ ++input_line_pointer;
+ align = get_absolute_expression ();
+ if (align <= 0)
+ {
+ as_warn (_("ignoring bad alignment"));
+ align = 8;
+ }
+ }
+
+ *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 `%s'."),
+ S_GET_NAME (symbolP));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (S_GET_VALUE (symbolP) && S_GET_VALUE (symbolP) != (valueT) size)
+ {
+ as_bad (_("Length of .lcomm \"%s\" is already %ld. Not changed to %ld."),
+ S_GET_NAME (symbolP),
+ (long) S_GET_VALUE (symbolP),
+ (long) size);
+
+ ignore_rest_of_line ();
+ return;
+ }
+
+ /* allocate_bss: */
+ old_sec = now_seg;
+ old_subsec = now_subseg;
+ if (align)
+ {
+ /* convert to a power of 2 alignment */
+ for (align2 = 0; (align & 1) == 0; align >>= 1, ++align2);
+ if (align != 1)
+ {
+ as_bad (_("Common alignment not a power of 2"));
+ ignore_rest_of_line ();
+ return;
+ }
+ }
+ else
+ align2 = 0;
+
+ record_alignment (bss_section, align2);
+ subseg_set (bss_section, 0);
+ if (align2)
+ frag_align (align2, 0, 0);
+ if (S_GET_SEGMENT (symbolP) == bss_section)
+ symbol_get_frag (symbolP)->fr_symbol = 0;
+ symbol_set_frag (symbolP, frag_now);
+ pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size,
+ (char *) 0);
+ *pfrag = 0;
+ S_SET_SIZE (symbolP, size);
+ S_SET_SEGMENT (symbolP, bss_section);
+ subseg_set (old_sec, old_subsec);
+ demand_empty_rest_of_line ();
+}
+
+/* Validate any relocations emitted for -mrelocatable, possibly adding
+ fixups for word relocations in writable segments, so we can adjust
+ them at runtime. */
+static void
+ppc_elf_validate_fix (fixp, seg)
+ fixS *fixp;
+ segT seg;
+{
+ if (fixp->fx_done || fixp->fx_pcrel)
+ return;
+
+ switch (shlib)
+ {
+ case SHLIB_NONE:
+ case SHLIB_PIC:
+ return;
+
+ case SHILB_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
+ && fixp->fx_r_type != BFD_RELOC_LO16_GOTOFF
+ && fixp->fx_r_type != BFD_RELOC_HI16_S_GOTOFF
+ && fixp->fx_r_type != BFD_RELOC_32_BASEREL
+ && fixp->fx_r_type != BFD_RELOC_LO16_BASEREL
+ && fixp->fx_r_type != BFD_RELOC_HI16_BASEREL
+ && fixp->fx_r_type != BFD_RELOC_HI16_S_BASEREL
+ && strcmp (segment_name (seg), ".got2") != 0
+ && strcmp (segment_name (seg), ".dtors") != 0
+ && strcmp (segment_name (seg), ".ctors") != 0
+ && strcmp (segment_name (seg), ".fixup") != 0
+ && strcmp (segment_name (seg), ".stab") != 0
+ && strcmp (segment_name (seg), ".gcc_except_table") != 0
+ && strcmp (segment_name (seg), ".eh_frame") != 0
+ && strcmp (segment_name (seg), ".ex_shared") != 0)
+ {
+ if ((seg->flags & (SEC_READONLY | SEC_CODE)) != 0
+ || fixp->fx_r_type != BFD_RELOC_CTOR)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("Relocation cannot be done when using -mrelocatable"));
+ }
+ }
+ return;
+ }
+}
+#endif /* OBJ_ELF */
+
+#ifdef TE_PE
+
+/*
+ * Summary of parse_toc_entry().
+ *
+ * in: Input_line_pointer points to the '[' in one of:
+ *
+ * [toc] [tocv] [toc32] [toc64]
+ *
+ * Anything else is an error of one kind or another.
+ *
+ * out:
+ * return value: success or failure
+ * toc_kind: kind of toc reference
+ * input_line_pointer:
+ * success: first char after the ']'
+ * failure: unchanged
+ *
+ * settings:
+ *
+ * [toc] - rv == success, toc_kind = default_toc
+ * [tocv] - rv == success, toc_kind = data_in_toc
+ * [toc32] - rv == success, toc_kind = must_be_32
+ * [toc64] - rv == success, toc_kind = must_be_64
+ *
+ */
+
+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 */
+ must_be_64 /* The toc cell constructed must be 64 bits wide */
+};
+
+static int
+parse_toc_entry(toc_kind)
+ enum toc_size_qualifier *toc_kind;
+{
+ char *start;
+ char *toc_spec;
+ char c;
+ enum toc_size_qualifier t;
+
+ /* save the input_line_pointer */
+ start = input_line_pointer;
+
+ /* 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)
+ {
+ t = default_toc;
+ }
+ else if (strcmp(toc_spec, "tocv") == 0)
+ {
+ t = data_in_toc;
+ }
+ else if (strcmp(toc_spec, "toc32") == 0)
+ {
+ t = must_be_32;
+ }
+ else if (strcmp(toc_spec, "toc64") == 0)
+ {
+ t = must_be_64;
+ }
+ else
+ {
+ as_bad (_("syntax error: invalid toc specifier `%s'"), toc_spec);
+ *input_line_pointer = c; /* put back the delimiting char */
+ input_line_pointer = start; /* reset input_line pointer */
+ return 0;
+ }
+
+ /* 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. */
+
+ if (c != ']')
+ {
+ as_bad (_("syntax error: expected `]', found `%c'"), c);
+ input_line_pointer = start; /* reset input_line pointer */
+ return 0;
+ }
+
+ *toc_kind = t; /* set return value */
+ return 1;
+}
+#endif
+
+
+/* We need to keep a list of fixups. We can't simply generate them as
+ we go, because that would require us to first create the frag, and
+ that would screw up references to ``.''. */
+
+struct ppc_fixup
+{
+ expressionS exp;
+ int opindex;
+ bfd_reloc_code_real_type reloc;
+};
+
+#define MAX_INSN_FIXUPS (5)
+
+/* This routine is called for each instruction to be assembled. */
+
+void
+md_assemble (str)
+ char *str;
+{
+ char *s;
+ const struct powerpc_opcode *opcode;
+ unsigned long insn;
+ const unsigned char *opindex_ptr;
+ int skip_optional;
+ int need_paren;
+ int next_opindex;
+ struct ppc_fixup fixups[MAX_INSN_FIXUPS];
+ int fc;
+ char *f;
+ int i;
+#ifdef OBJ_ELF
+ bfd_reloc_code_real_type reloc;
+#endif
+
+ /* Get the opcode. */
+ for (s = str; *s != '\0' && ! isspace (*s); s++)
+ ;
+ if (*s != '\0')
+ *s++ = '\0';
+
+ /* Look up the opcode in the hash table. */
+ opcode = (const struct powerpc_opcode *) hash_find (ppc_hash, str);
+ if (opcode == (const struct powerpc_opcode *) NULL)
+ {
+ const struct powerpc_macro *macro;
+
+ macro = (const struct powerpc_macro *) hash_find (ppc_macro_hash, str);
+ if (macro == (const struct powerpc_macro *) NULL)
+ as_bad (_("Unrecognized opcode: `%s'"), str);
+ else
+ ppc_macro (s, macro);
+
+ return;
+ }
+
+ insn = opcode->opcode;
+
+ str = s;
+ while (isspace (*str))
+ ++str;
+
+ /* PowerPC operands are just expressions. The only real issue is
+ that a few operand types are optional. All cases which might use
+ an optional operand separate the operands only with commas (in
+ some cases parentheses are used, as in ``lwz 1,0(1)'' but such
+ cases never have optional operands). There is never more than
+ one optional operand for an instruction. So, before we start
+ seriously parsing the operands, we check to see if we have an
+ optional operand, and, if we do, we count the number of commas to
+ see whether the operand should be omitted. */
+ skip_optional = 0;
+ for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++)
+ {
+ const struct powerpc_operand *operand;
+
+ operand = &powerpc_operands[*opindex_ptr];
+ if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0)
+ {
+ unsigned int opcount;
+
+ /* There is an optional operand. Count the number of
+ commas in the input line. */
+ if (*str == '\0')
+ opcount = 0;
+ else
+ {
+ opcount = 1;
+ s = str;
+ while ((s = strchr (s, ',')) != (char *) NULL)
+ {
+ ++opcount;
+ ++s;
+ }
+ }
+
+ /* If there are fewer operands in the line then are called
+ for by the instruction, we want to skip the optional
+ operand. */
+ if (opcount < strlen (opcode->operands))
+ skip_optional = 1;
+
+ break;
+ }
+ }
+
+ /* Gather the operands. */
+ need_paren = 0;
+ next_opindex = 0;
+ fc = 0;
+ for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++)
+ {
+ const struct powerpc_operand *operand;
+ const char *errmsg;
+ char *hold;
+ expressionS ex;
+ char endc;
+
+ if (next_opindex == 0)
+ operand = &powerpc_operands[*opindex_ptr];
+ else
+ {
+ operand = &powerpc_operands[next_opindex];
+ next_opindex = 0;
+ }
+
+ errmsg = NULL;
+
+ /* If this is a fake operand, then we do not expect anything
+ from the input. */
+ if ((operand->flags & PPC_OPERAND_FAKE) != 0)
+ {
+ insn = (*operand->insert) (insn, 0L, &errmsg);
+ if (errmsg != (const char *) NULL)
+ as_bad (errmsg);
+ continue;
+ }
+
+ /* If this is an optional operand, and we are skipping it, just
+ insert a zero. */
+ if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
+ && skip_optional)
+ {
+ if (operand->insert)
+ {
+ insn = (*operand->insert) (insn, 0L, &errmsg);
+ if (errmsg != (const char *) NULL)
+ as_bad (errmsg);
+ }
+ if ((operand->flags & PPC_OPERAND_NEXT) != 0)
+ next_opindex = *opindex_ptr + 1;
+ continue;
+ }
+
+ /* Gather the operand. */
+ hold = input_line_pointer;
+ input_line_pointer = str;
+
+#ifdef TE_PE
+ 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
+ register must be the toc register: 'rtoc' or '2'
+
+ The effect is to 0 as the displacement field
+ in the instruction, and issue an IMAGE_REL_PPC_TOCREL16 (or
+ the appropriate variation) reloc against it based on the symbol.
+ The linker will build the toc, and insert the resolved toc offset.
+
+ Note:
+ o The size of the toc entry is currently assumed to be
+ 32 bits. This should not be assumed to be a hard coded
+ number.
+ o In an effort to cope with a change from 32 to 64 bits,
+ there are also toc entries that are specified to be
+ either 32 or 64 bits:
+ lwz r4,[toc32].GS.0.static_int(rtoc)
+ lwz r4,[toc64].GS.0.static_int(rtoc)
+ These demand toc entries of the specified size, and the
+ instruction probably requires it.
+ */
+
+ int valid_toc;
+ enum toc_size_qualifier toc_kind;
+ bfd_reloc_code_real_type toc_reloc;
+
+ /* go parse off the [tocXX] part */
+ valid_toc = parse_toc_entry(&toc_kind);
+
+ if (!valid_toc)
+ {
+ /* Note: message has already been issued. */
+ /* FIXME: what sort of recovery should we do? */
+ /* demand_rest_of_line(); return; ? */
+ }
+
+ /* Now get the symbol following the ']' */
+ expression(&ex);
+
+ switch (toc_kind)
+ {
+ case default_toc:
+ /* In this case, we may not have seen the symbol yet, since */
+ /* it is allowed to appear on a .extern or .globl or just be */
+ /* a label in the .data section. */
+ toc_reloc = BFD_RELOC_PPC_TOC16;
+ break;
+ case data_in_toc:
+ /* 1. The symbol must be defined and either in the toc */
+ /* section, or a global. */
+ /* 2. The reloc generated must have the TOCDEFN flag set in */
+ /* upper bit mess of the reloc type. */
+ /* 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)
+ {
+ assert (ex.X_add_symbol != NULL);
+ if (symbol_get_bfdsym (ex.X_add_symbol)->section
+ != tocdata_section)
+ {
+ as_bad(_("[tocv] symbol is not a toc symbol"));
+ }
+ }
+
+ toc_reloc = BFD_RELOC_PPC_TOC16;
+ break;
+ case must_be_32:
+ /* FIXME: these next two specifically specify 32/64 bit toc */
+ /* entries. We don't support them today. Is this the */
+ /* right way to say that? */
+ toc_reloc = BFD_RELOC_UNUSED;
+ as_bad (_("Unimplemented toc32 expression modifier"));
+ break;
+ case must_be_64:
+ /* FIXME: see above */
+ toc_reloc = BFD_RELOC_UNUSED;
+ as_bad (_("Unimplemented toc64 expression modifier"));
+ break;
+ default:
+ fprintf(stderr,
+ _("Unexpected return value [%d] from parse_toc_entry!\n"),
+ toc_kind);
+ abort();
+ break;
+ }
+
+ /* We need to generate a fixup for this expression. */
+ if (fc >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+
+ fixups[fc].reloc = toc_reloc;
+ fixups[fc].exp = ex;
+ fixups[fc].opindex = *opindex_ptr;
+ ++fc;
+
+ /* Ok. We've set up the fixup for the instruction. Now make it
+ look like the constant 0 was found here */
+ ex.X_unsigned = 1;
+ ex.X_op = O_constant;
+ ex.X_add_number = 0;
+ ex.X_add_symbol = NULL;
+ ex.X_op_symbol = NULL;
+ }
+
+ else
+#endif /* TE_PE */
+ {
+ if (! register_name (&ex))
+ {
+ if ((operand->flags & PPC_OPERAND_CR) != 0)
+ cr_operand = true;
+ expression (&ex);
+ cr_operand = false;
+ }
+ }
+
+ str = input_line_pointer;
+ input_line_pointer = hold;
+
+ if (ex.X_op == O_illegal)
+ as_bad (_("illegal operand"));
+ else if (ex.X_op == O_absent)
+ as_bad (_("missing operand"));
+ else if (ex.X_op == O_register)
+ {
+ insn = ppc_insert_operand (insn, operand, ex.X_add_number,
+ (char *) NULL, 0);
+ }
+ else if (ex.X_op == O_constant)
+ {
+#ifdef OBJ_ELF
+ /* Allow @HA, @L, @H on constants. */
+ char *orig_str = str;
+
+ if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED)
+ switch (reloc)
+ {
+ default:
+ str = orig_str;
+ break;
+
+ case BFD_RELOC_LO16:
+ /* X_unsigned is the default, so if the user has done
+ something which cleared it, we always produce a
+ signed value. */
+ if (ex.X_unsigned
+ && (operand->flags & PPC_OPERAND_SIGNED) == 0)
+ ex.X_add_number &= 0xffff;
+ else
+ ex.X_add_number = (((ex.X_add_number & 0xffff)
+ ^ 0x8000)
+ - 0x8000);
+ break;
+
+ case BFD_RELOC_HI16:
+ ex.X_add_number = (ex.X_add_number >> 16) & 0xffff;
+ break;
+
+ case BFD_RELOC_HI16_S:
+ ex.X_add_number = ((((ex.X_add_number >> 16) & 0xffff)
+ + ((ex.X_add_number >> 15) & 1))
+ & 0xffff);
+ break;
+ }
+#endif
+ insn = ppc_insert_operand (insn, operand, ex.X_add_number,
+ (char *) NULL, 0);
+ }
+#ifdef OBJ_ELF
+ else if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED)
+ {
+ /* For the absoulte forms of branchs, convert the PC relative form back into
+ the absolute. */
+ if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
+ {
+ switch (reloc)
+ {
+ case BFD_RELOC_PPC_B26:
+ reloc = BFD_RELOC_PPC_BA26;
+ break;
+ case BFD_RELOC_PPC_B16:
+ reloc = BFD_RELOC_PPC_BA16;
+ break;
+ case BFD_RELOC_PPC_B16_BRTAKEN:
+ reloc = BFD_RELOC_PPC_BA16_BRTAKEN;
+ break;
+ case BFD_RELOC_PPC_B16_BRNTAKEN:
+ reloc = BFD_RELOC_PPC_BA16_BRNTAKEN;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* We need to generate a fixup for this expression. */
+ if (fc >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+ fixups[fc].exp = ex;
+ fixups[fc].opindex = 0;
+ fixups[fc].reloc = reloc;
+ ++fc;
+ }
+#endif /* OBJ_ELF */
+
+ else
+ {
+ /* We need to generate a fixup for this expression. */
+ 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;
+ ++fc;
+ }
+
+ if (need_paren)
+ {
+ endc = ')';
+ need_paren = 0;
+ }
+ else if ((operand->flags & PPC_OPERAND_PARENS) != 0)
+ {
+ endc = '(';
+ need_paren = 1;
+ }
+ else
+ endc = ',';
+
+ /* The call to expression should have advanced str past any
+ whitespace. */
+ if (*str != endc
+ && (endc != ',' || *str != '\0'))
+ {
+ as_bad (_("syntax error; found `%c' but expected `%c'"), *str, endc);
+ break;
+ }
+
+ if (*str != '\0')
+ ++str;
+ }
+
+ while (isspace (*str))
+ ++str;
+
+ if (*str != '\0')
+ as_bad (_("junk at end of line: `%s'"), str);
+
+ /* Write out the instruction. */
+ f = frag_more (4);
+ md_number_to_chars (f, insn, 4);
+
+ /* 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
+ 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. */
+ for (i = 0; i < fc; i++)
+ {
+ const struct powerpc_operand *operand;
+
+ operand = &powerpc_operands[fixups[i].opindex];
+ if (fixups[i].reloc != BFD_RELOC_UNUSED)
+ {
+ reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
+ int size;
+ int offset;
+ fixS *fixP;
+
+ if (!reloc_howto)
+ abort ();
+
+ size = bfd_get_reloc_size (reloc_howto);
+ offset = target_big_endian ? (4 - size) : 0;
+
+ if (size < 1 || size > 4)
+ abort();
+
+ fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size,
+ &fixups[i].exp, reloc_howto->pc_relative,
+ fixups[i].reloc);
+
+ /* Turn off complaints that the addend is too large for things like
+ foo+100000@ha. */
+ switch (fixups[i].reloc)
+ {
+ case BFD_RELOC_16_GOTOFF:
+ case BFD_RELOC_PPC_TOC16:
+ case BFD_RELOC_LO16:
+ case BFD_RELOC_HI16:
+ case BFD_RELOC_HI16_S:
+ fixP->fx_no_overflow = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ fix_new_exp (frag_now, f - frag_now->fr_literal, 4,
+ &fixups[i].exp,
+ (operand->flags & PPC_OPERAND_RELATIVE) != 0,
+ ((bfd_reloc_code_real_type)
+ (fixups[i].opindex + (int) BFD_RELOC_UNUSED)));
+ }
+}
+
+/* Handle a macro. Gather all the operands, transform them as
+ described by the macro, and call md_assemble recursively. All the
+ operands are separated by commas; we don't accept parentheses
+ around operands here. */
+
+static void
+ppc_macro (str, macro)
+ char *str;
+ const struct powerpc_macro *macro;
+{
+ char *operands[10];
+ unsigned int count;
+ char *s;
+ unsigned int len;
+ const char *format;
+ int arg;
+ char *send;
+ char *complete;
+
+ /* Gather the users operands into the operands array. */
+ count = 0;
+ s = str;
+ while (1)
+ {
+ if (count >= sizeof operands / sizeof operands[0])
+ break;
+ operands[count++] = s;
+ s = strchr (s, ',');
+ if (s == (char *) NULL)
+ break;
+ *s++ = '\0';
+ }
+
+ if (count != macro->operands)
+ {
+ as_bad (_("wrong number of operands"));
+ return;
+ }
+
+ /* Work out how large the string must be (the size is unbounded
+ because it includes user input). */
+ len = 0;
+ format = macro->format;
+ while (*format != '\0')
+ {
+ if (*format != '%')
+ {
+ ++len;
+ ++format;
+ }
+ else
+ {
+ arg = strtol (format + 1, &send, 10);
+ know (send != format && arg >= 0 && arg < count);
+ len += strlen (operands[arg]);
+ format = send;
+ }
+ }
+
+ /* Put the string together. */
+ complete = s = (char *) alloca (len + 1);
+ format = macro->format;
+ while (*format != '\0')
+ {
+ if (*format != '%')
+ *s++ = *format++;
+ else
+ {
+ arg = strtol (format + 1, &send, 10);
+ strcpy (s, operands[arg]);
+ s += strlen (s);
+ format = send;
+ }
+ }
+ *s = '\0';
+
+ /* Assemble the constructed instruction. */
+ md_assemble (complete);
+}
+
+#ifdef OBJ_ELF
+/* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED */
+
+int
+ppc_section_letter (letter, ptr_msg)
+ int letter;
+ char **ptr_msg;
+{
+ if (letter == 'e')
+ return SHF_EXCLUDE;
+
+ *ptr_msg = _("Bad .section directive: want a,w,x,e in string");
+ return 0;
+}
+
+int
+ppc_section_word (str, len)
+ char *str;
+ size_t len;
+{
+ if (len == 7 && strncmp (str, "exclude", 7) == 0)
+ return SHF_EXCLUDE;
+
+ return -1;
+}
+
+int
+ppc_section_type (str, len)
+ char *str;
+ size_t len;
+{
+ if (len == 7 && strncmp (str, "ordered", 7) == 0)
+ return SHT_ORDERED;
+
+ return -1;
+}
+
+int
+ppc_section_flags (flags, attr, type)
+ int flags;
+ int attr;
+ int type;
+{
+ if (type == SHT_ORDERED)
+ flags |= SEC_ALLOC | SEC_LOAD | SEC_SORT_ENTRIES;
+
+ if (attr & SHF_EXCLUDE)
+ flags |= SEC_EXCLUDE;
+
+ return flags;
+}
+#endif /* OBJ_ELF */
+
+
+/* Pseudo-op handling. */
+
+/* The .byte pseudo-op. This is similar to the normal .byte
+ pseudo-op, but it can also take a single ASCII string. */
+
+static void
+ppc_byte (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ if (*input_line_pointer != '\"')
+ {
+ cons (1);
+ return;
+ }
+
+ /* Gather characters. A real double quote is doubled. Unusual
+ characters are not permitted. */
+ ++input_line_pointer;
+ while (1)
+ {
+ char c;
+
+ c = *input_line_pointer++;
+
+ if (c == '\"')
+ {
+ if (*input_line_pointer != '\"')
+ break;
+ ++input_line_pointer;
+ }
+
+ FRAG_APPEND_1_CHAR (c);
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+#ifdef OBJ_XCOFF
+
+/* XCOFF specific pseudo-op handling. */
+
+/* This is set if we are creating a .stabx symbol, since we don't want
+ to handle symbol suffixes for such symbols. */
+static boolean ppc_stab_symbol;
+
+/* The .comm and .lcomm pseudo-ops for XCOFF. XCOFF puts common
+ symbols in the .bss segment as though they were local common
+ symbols, and uses a different smclas. */
+
+static void
+ppc_comm (lcomm)
+ int lcomm;
+{
+ asection *current_seg = now_seg;
+ subsegT current_subseg = now_subseg;
+ char *name;
+ char endc;
+ char *end_name;
+ offsetT size;
+ offsetT align;
+ symbolS *lcomm_sym = NULL;
+ symbolS *sym;
+ char *pfrag;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+ end_name = input_line_pointer;
+ *end_name = endc;
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing size"));
+ ignore_rest_of_line ();
+ return;
+ }
+ ++input_line_pointer;
+
+ size = get_absolute_expression ();
+ if (size < 0)
+ {
+ as_bad (_("negative size"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (! lcomm)
+ {
+ /* The third argument to .comm is the alignment. */
+ if (*input_line_pointer != ',')
+ align = 3;
+ else
+ {
+ ++input_line_pointer;
+ align = get_absolute_expression ();
+ if (align <= 0)
+ {
+ as_warn (_("ignoring bad alignment"));
+ align = 3;
+ }
+ }
+ }
+ else
+ {
+ char *lcomm_name;
+ char lcomm_endc;
+
+ if (size <= 1)
+ align = 0;
+ else if (size <= 2)
+ align = 1;
+ else if (size <= 4)
+ align = 2;
+ else
+ align = 3;
+
+ /* The third argument to .lcomm appears to be the real local
+ common symbol to create. References to the symbol named in
+ the first argument are turned into references to the third
+ argument. */
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing real symbol name"));
+ ignore_rest_of_line ();
+ return;
+ }
+ ++input_line_pointer;
+
+ lcomm_name = input_line_pointer;
+ lcomm_endc = get_symbol_end ();
+
+ lcomm_sym = symbol_find_or_make (lcomm_name);
+
+ *input_line_pointer = lcomm_endc;
+ }
+
+ *end_name = '\0';
+ sym = symbol_find_or_make (name);
+ *end_name = endc;
+
+ if (S_IS_DEFINED (sym)
+ || S_GET_VALUE (sym) != 0)
+ {
+ as_bad (_("attempt to redefine symbol"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ record_alignment (bss_section, align);
+
+ if (! lcomm
+ || ! S_IS_DEFINED (lcomm_sym))
+ {
+ symbolS *def_sym;
+ offsetT def_size;
+
+ if (! lcomm)
+ {
+ def_sym = sym;
+ def_size = size;
+ S_SET_EXTERNAL (sym);
+ }
+ else
+ {
+ symbol_get_tc (lcomm_sym)->output = 1;
+ def_sym = lcomm_sym;
+ def_size = 0;
+ }
+
+ 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);
+ *pfrag = 0;
+ S_SET_SEGMENT (def_sym, bss_section);
+ symbol_get_tc (def_sym)->align = align;
+ }
+ else if (lcomm)
+ {
+ /* Align the size of lcomm_sym. */
+ symbol_get_frag (lcomm_sym)->fr_offset =
+ ((symbol_get_frag (lcomm_sym)->fr_offset + (1 << align) - 1)
+ &~ ((1 << align) - 1));
+ if (align > symbol_get_tc (lcomm_sym)->align)
+ symbol_get_tc (lcomm_sym)->align = align;
+ }
+
+ if (lcomm)
+ {
+ /* Make sym an offset from lcomm_sym. */
+ S_SET_SEGMENT (sym, bss_section);
+ symbol_set_frag (sym, symbol_get_frag (lcomm_sym));
+ S_SET_VALUE (sym, symbol_get_frag (lcomm_sym)->fr_offset);
+ symbol_get_frag (lcomm_sym)->fr_offset += size;
+ }
+
+ subseg_set (current_seg, current_subseg);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .csect pseudo-op. This switches us into a different
+ subsegment. The first argument is a symbol whose value is the
+ start of the .csect. In COFF, csect symbols get special aux
+ entries defined by the x_csect field of union internal_auxent. The
+ optional second argument is the alignment (the default is 2). */
+
+static void
+ppc_csect (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+ symbolS *sym;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ if (S_GET_NAME (sym)[0] == '\0')
+ {
+ /* An unnamed csect is assumed to be [PR]. */
+ symbol_get_tc (sym)->class = XMC_PR;
+ }
+
+ ppc_change_csect (sym);
+
+ if (*input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ symbol_get_tc (sym)->align = get_absolute_expression ();
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* Change to a different csect. */
+
+static void
+ppc_change_csect (sym)
+ symbolS *sym;
+{
+ if (S_IS_DEFINED (sym))
+ subseg_set (S_GET_SEGMENT (sym), symbol_get_tc (sym)->subseg);
+ else
+ {
+ symbolS **list_ptr;
+ int after_toc;
+ int hold_chunksize;
+ symbolS *list;
+
+ /* This is a new csect. We need to look at the symbol class to
+ figure out whether it should go in the text section or the
+ data section. */
+ after_toc = 0;
+ switch (symbol_get_tc (sym)->class)
+ {
+ case XMC_PR:
+ case XMC_RO:
+ case XMC_DB:
+ case XMC_GL:
+ case XMC_XO:
+ case XMC_SV:
+ case XMC_TI:
+ case XMC_TB:
+ S_SET_SEGMENT (sym, text_section);
+ symbol_get_tc (sym)->subseg = ppc_text_subsegment;
+ ++ppc_text_subsegment;
+ list_ptr = &ppc_text_csects;
+ break;
+ case XMC_RW:
+ case XMC_TC0:
+ case XMC_TC:
+ case XMC_DS:
+ case XMC_UA:
+ case XMC_BS:
+ case XMC_UC:
+ if (ppc_toc_csect != NULL
+ && (symbol_get_tc (ppc_toc_csect)->subseg + 1
+ == ppc_data_subsegment))
+ after_toc = 1;
+ S_SET_SEGMENT (sym, data_section);
+ symbol_get_tc (sym)->subseg = ppc_data_subsegment;
+ ++ppc_data_subsegment;
+ list_ptr = &ppc_data_csects;
+ break;
+ default:
+ abort ();
+ }
+
+ /* We set the obstack chunk size to a small value before
+ changing subsegments, so that we don't use a lot of memory
+ space for what may be a small section. */
+ hold_chunksize = chunksize;
+ chunksize = 64;
+
+ subseg_new (segment_name (S_GET_SEGMENT (sym)),
+ symbol_get_tc (sym)->subseg);
+
+ chunksize = hold_chunksize;
+
+ if (after_toc)
+ ppc_after_toc_frag = frag_now;
+
+ symbol_set_frag (sym, frag_now);
+ S_SET_VALUE (sym, (valueT) frag_now_fix ());
+
+ symbol_get_tc (sym)->align = 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);
+ }
+
+ ppc_current_csect = sym;
+}
+
+/* This function handles the .text and .data pseudo-ops. These
+ pseudo-ops aren't really used by XCOFF; we implement them for the
+ convenience of people who aren't used to XCOFF. */
+
+static void
+ppc_section (type)
+ int type;
+{
+ const char *name;
+ symbolS *sym;
+
+ if (type == 't')
+ name = ".text[PR]";
+ else if (type == 'd')
+ name = ".data[RW]";
+ else
+ abort ();
+
+ sym = symbol_find_or_make (name);
+
+ ppc_change_csect (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* This function handles the .section pseudo-op. This is mostly to
+ give an error, since XCOFF only supports .text, .data and .bss, but
+ we do permit the user to name the text or data section. */
+
+static void
+ppc_named_section (ignore)
+ int ignore;
+{
+ char *user_name;
+ const char *real_name;
+ char c;
+ symbolS *sym;
+
+ user_name = input_line_pointer;
+ c = get_symbol_end ();
+
+ if (strcmp (user_name, ".text") == 0)
+ real_name = ".text[PR]";
+ else if (strcmp (user_name, ".data") == 0)
+ real_name = ".data[RW]";
+ else
+ {
+ as_bad (_("The XCOFF file format does not support arbitrary sections"));
+ *input_line_pointer = c;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ *input_line_pointer = c;
+
+ sym = symbol_find_or_make (real_name);
+
+ ppc_change_csect (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .extern pseudo-op. We create an undefined symbol. */
+
+static void
+ppc_extern (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ (void) symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .lglobl pseudo-op. Keep the symbol in the symbol table. */
+
+static void
+ppc_lglobl (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+ symbolS *sym;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ symbol_get_tc (sym)->output = 1;
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .rename pseudo-op. The RS/6000 assembler can rename symbols,
+ although I don't know why it bothers. */
+
+static void
+ppc_rename (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+ symbolS *sym;
+ int len;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing rename string"));
+ ignore_rest_of_line ();
+ return;
+ }
+ ++input_line_pointer;
+
+ symbol_get_tc (sym)->real_name = demand_copy_C_string (&len);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .stabx pseudo-op. This is similar to a normal .stabs
+ pseudo-op, but slightly different. A sample is
+ .stabx "main:F-1",.main,142,0
+ The first argument is the symbol name to create. The second is the
+ value, and the third is the storage class. The fourth seems to be
+ always zero, and I am assuming it is the type. */
+
+static void
+ppc_stabx (ignore)
+ int ignore;
+{
+ char *name;
+ int len;
+ symbolS *sym;
+ expressionS exp;
+
+ name = demand_copy_C_string (&len);
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing value"));
+ return;
+ }
+ ++input_line_pointer;
+
+ ppc_stab_symbol = true;
+ sym = symbol_make (name);
+ ppc_stab_symbol = false;
+
+ symbol_get_tc (sym)->real_name = name;
+
+ (void) expression (&exp);
+
+ switch (exp.X_op)
+ {
+ case O_illegal:
+ case O_absent:
+ case O_big:
+ as_bad (_("illegal .stabx expression; zero assumed"));
+ exp.X_add_number = 0;
+ /* Fall through. */
+ case O_constant:
+ S_SET_VALUE (sym, (valueT) exp.X_add_number);
+ symbol_set_frag (sym, &zero_address_frag);
+ break;
+
+ case O_symbol:
+ if (S_GET_SEGMENT (exp.X_add_symbol) == undefined_section)
+ symbol_set_value_expression (sym, &exp);
+ else
+ {
+ S_SET_VALUE (sym,
+ exp.X_add_number + S_GET_VALUE (exp.X_add_symbol));
+ symbol_set_frag (sym, symbol_get_frag (exp.X_add_symbol));
+ }
+ break;
+
+ default:
+ /* The value is some complex expression. This will probably
+ fail at some later point, but this is probably the right
+ thing to do here. */
+ symbol_set_value_expression (sym, &exp);
+ break;
+ }
+
+ S_SET_SEGMENT (sym, ppc_coff_debug_section);
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing class"));
+ return;
+ }
+ ++input_line_pointer;
+
+ S_SET_STORAGE_CLASS (sym, get_absolute_expression ());
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing type"));
+ return;
+ }
+ ++input_line_pointer;
+
+ S_SET_DATA_TYPE (sym, get_absolute_expression ());
+
+ symbol_get_tc (sym)->output = 1;
+
+ if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
+ symbol_get_tc (sym)->within = ppc_current_block;
+
+ if (exp.X_op != O_symbol
+ || ! S_IS_EXTERNAL (exp.X_add_symbol)
+ || S_GET_SEGMENT (exp.X_add_symbol) != bss_section)
+ ppc_frob_label (sym);
+ else
+ {
+ symbol_remove (sym, &symbol_rootP, &symbol_lastP);
+ symbol_append (sym, exp.X_add_symbol, &symbol_rootP, &symbol_lastP);
+ if (symbol_get_tc (ppc_current_csect)->within == exp.X_add_symbol)
+ symbol_get_tc (ppc_current_csect)->within = sym;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .function pseudo-op. This takes several arguments. The first
+ argument seems to be the external name of the symbol. The second
+ argment seems to be the label for the start of the function. gcc
+ uses the same name for both. I have no idea what the third and
+ fourth arguments are meant to be. The optional fifth argument is
+ an expression for the size of the function. In COFF this symbol
+ gets an aux entry like that used for a csect. */
+
+static void
+ppc_function (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+ char *s;
+ symbolS *ext_sym;
+ symbolS *lab_sym;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ /* Ignore any [PR] suffix. */
+ name = ppc_canonicalize_symbol_name (name);
+ s = strchr (name, '[');
+ if (s != (char *) NULL
+ && strcmp (s + 1, "PR]") == 0)
+ *s = '\0';
+
+ ext_sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing symbol name"));
+ ignore_rest_of_line ();
+ return;
+ }
+ ++input_line_pointer;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ lab_sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ if (ext_sym != lab_sym)
+ {
+ expressionS exp;
+
+ exp.X_op = O_symbol;
+ exp.X_add_symbol = lab_sym;
+ exp.X_op_symbol = NULL;
+ exp.X_add_number = 0;
+ exp.X_unsigned = 0;
+ symbol_set_value_expression (ext_sym, &exp);
+ }
+
+ if (symbol_get_tc (ext_sym)->class == -1)
+ symbol_get_tc (ext_sym)->class = XMC_PR;
+ symbol_get_tc (ext_sym)->output = 1;
+
+ if (*input_line_pointer == ',')
+ {
+ expressionS ignore;
+
+ /* Ignore the third argument. */
+ ++input_line_pointer;
+ expression (&ignore);
+ if (*input_line_pointer == ',')
+ {
+ /* Ignore the fourth argument. */
+ ++input_line_pointer;
+ expression (&ignore);
+ if (*input_line_pointer == ',')
+ {
+ /* The fifth argument is the function size. */
+ ++input_line_pointer;
+ symbol_get_tc (ext_sym)->size = symbol_new ("L0\001",
+ absolute_section,
+ (valueT) 0,
+ &zero_address_frag);
+ pseudo_set (symbol_get_tc (ext_sym)->size);
+ }
+ }
+ }
+
+ S_SET_DATA_TYPE (ext_sym, DT_FCN << N_BTSHFT);
+ SF_SET_FUNCTION (ext_sym);
+ SF_SET_PROCESS (ext_sym);
+ coff_add_linesym (ext_sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .bf pseudo-op. This is just like a COFF C_FCN symbol named
+ ".bf". */
+
+static void
+ppc_bf (ignore)
+ int ignore;
+{
+ symbolS *sym;
+
+ sym = symbol_make (".bf");
+ S_SET_SEGMENT (sym, text_section);
+ symbol_set_frag (sym, frag_now);
+ S_SET_VALUE (sym, frag_now_fix ());
+ S_SET_STORAGE_CLASS (sym, C_FCN);
+
+ coff_line_base = get_absolute_expression ();
+
+ S_SET_NUMBER_AUXILIARY (sym, 1);
+ SA_SET_SYM_LNNO (sym, coff_line_base);
+
+ symbol_get_tc (sym)->output = 1;
+
+ ppc_frob_label (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .ef pseudo-op. This is just like a COFF C_FCN symbol named
+ ".ef", except that the line number is absolute, not relative to the
+ most recent ".bf" symbol. */
+
+static void
+ppc_ef (ignore)
+ int ignore;
+{
+ symbolS *sym;
+
+ sym = symbol_make (".ef");
+ S_SET_SEGMENT (sym, text_section);
+ symbol_set_frag (sym, frag_now);
+ S_SET_VALUE (sym, frag_now_fix ());
+ S_SET_STORAGE_CLASS (sym, C_FCN);
+ S_SET_NUMBER_AUXILIARY (sym, 1);
+ SA_SET_SYM_LNNO (sym, get_absolute_expression ());
+ symbol_get_tc (sym)->output = 1;
+
+ ppc_frob_label (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .bi and .ei pseudo-ops. These take a string argument and
+ generates a C_BINCL or C_EINCL symbol, which goes at the start of
+ the symbol list. */
+
+static void
+ppc_biei (ei)
+ int ei;
+{
+ static symbolS *last_biei;
+
+ char *name;
+ int len;
+ symbolS *sym;
+ symbolS *look;
+
+ name = demand_copy_C_string (&len);
+
+ /* The value of these symbols is actually file offset. Here we set
+ the value to the index into the line number entries. In
+ ppc_frob_symbols we set the fix_line field, which will cause BFD
+ to do the right thing. */
+
+ sym = symbol_make (name);
+ /* obj-coff.c currently only handles line numbers correctly in the
+ .text section. */
+ S_SET_SEGMENT (sym, text_section);
+ S_SET_VALUE (sym, coff_n_line_nos);
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
+
+ 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
+ || S_GET_STORAGE_CLASS (look) == C_BINCL
+ || S_GET_STORAGE_CLASS (look) == C_EINCL));
+ look = symbol_next (look))
+ ;
+ if (look != (symbolS *) NULL)
+ {
+ symbol_remove (sym, &symbol_rootP, &symbol_lastP);
+ symbol_insert (sym, look, &symbol_rootP, &symbol_lastP);
+ last_biei = sym;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .bs pseudo-op. This generates a C_BSTAT symbol named ".bs".
+ There is one argument, which is a csect symbol. The value of the
+ .bs symbol is the index of this csect symbol. */
+
+static void
+ppc_bs (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+ symbolS *csect;
+ symbolS *sym;
+
+ if (ppc_current_block != NULL)
+ as_bad (_("nested .bs blocks"));
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ csect = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ sym = symbol_make (".bs");
+ S_SET_SEGMENT (sym, now_seg);
+ S_SET_STORAGE_CLASS (sym, C_BSTAT);
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
+ symbol_get_tc (sym)->output = 1;
+
+ symbol_get_tc (sym)->within = csect;
+
+ ppc_frob_label (sym);
+
+ ppc_current_block = sym;
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .es pseudo-op. Generate a C_ESTART symbol named .es. */
+
+static void
+ppc_es (ignore)
+ int ignore;
+{
+ symbolS *sym;
+
+ if (ppc_current_block == NULL)
+ as_bad (_(".es without preceding .bs"));
+
+ sym = symbol_make (".es");
+ S_SET_SEGMENT (sym, now_seg);
+ S_SET_STORAGE_CLASS (sym, C_ESTAT);
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
+ symbol_get_tc (sym)->output = 1;
+
+ ppc_frob_label (sym);
+
+ ppc_current_block = NULL;
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .bb pseudo-op. Generate a C_BLOCK symbol named .bb, with a
+ line number. */
+
+static void
+ppc_bb (ignore)
+ int ignore;
+{
+ symbolS *sym;
+
+ sym = symbol_make (".bb");
+ S_SET_SEGMENT (sym, text_section);
+ symbol_set_frag (sym, frag_now);
+ S_SET_VALUE (sym, frag_now_fix ());
+ S_SET_STORAGE_CLASS (sym, C_BLOCK);
+
+ S_SET_NUMBER_AUXILIARY (sym, 1);
+ SA_SET_SYM_LNNO (sym, get_absolute_expression ());
+
+ symbol_get_tc (sym)->output = 1;
+
+ SF_SET_PROCESS (sym);
+
+ ppc_frob_label (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .eb pseudo-op. Generate a C_BLOCK symbol named .eb, with a
+ line number. */
+
+static void
+ppc_eb (ignore)
+ int ignore;
+{
+ symbolS *sym;
+
+ sym = symbol_make (".eb");
+ S_SET_SEGMENT (sym, text_section);
+ symbol_set_frag (sym, frag_now);
+ S_SET_VALUE (sym, frag_now_fix ());
+ S_SET_STORAGE_CLASS (sym, C_BLOCK);
+ S_SET_NUMBER_AUXILIARY (sym, 1);
+ SA_SET_SYM_LNNO (sym, get_absolute_expression ());
+ symbol_get_tc (sym)->output = 1;
+
+ SF_SET_PROCESS (sym);
+
+ ppc_frob_label (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .bc pseudo-op. This just creates a C_BCOMM symbol with a
+ specified name. */
+
+static void
+ppc_bc (ignore)
+ int ignore;
+{
+ char *name;
+ int len;
+ symbolS *sym;
+
+ name = demand_copy_C_string (&len);
+ sym = symbol_make (name);
+ S_SET_SEGMENT (sym, ppc_coff_debug_section);
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
+ S_SET_STORAGE_CLASS (sym, C_BCOMM);
+ S_SET_VALUE (sym, 0);
+ symbol_get_tc (sym)->output = 1;
+
+ ppc_frob_label (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .ec pseudo-op. This just creates a C_ECOMM symbol. */
+
+static void
+ppc_ec (ignore)
+ int ignore;
+{
+ symbolS *sym;
+
+ sym = symbol_make (".ec");
+ S_SET_SEGMENT (sym, ppc_coff_debug_section);
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
+ S_SET_STORAGE_CLASS (sym, C_ECOMM);
+ S_SET_VALUE (sym, 0);
+ symbol_get_tc (sym)->output = 1;
+
+ ppc_frob_label (sym);
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .toc pseudo-op. Switch to the .toc subsegment. */
+
+static void
+ppc_toc (ignore)
+ int ignore;
+{
+ if (ppc_toc_csect != (symbolS *) NULL)
+ subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg);
+ else
+ {
+ subsegT subseg;
+ symbolS *sym;
+ symbolS *list;
+
+ subseg = ppc_data_subsegment;
+ ++ppc_data_subsegment;
+
+ subseg_new (segment_name (data_section), subseg);
+ ppc_toc_frag = frag_now;
+
+ sym = symbol_find_or_make ("TOC[TC0]");
+ symbol_set_frag (sym, frag_now);
+ S_SET_SEGMENT (sym, data_section);
+ S_SET_VALUE (sym, (valueT) frag_now_fix ());
+ symbol_get_tc (sym)->subseg = subseg;
+ symbol_get_tc (sym)->output = 1;
+ 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)
+ ;
+ 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);
+ }
+
+ ppc_current_csect = ppc_toc_csect;
+
+ demand_empty_rest_of_line ();
+}
+
+/* The AIX assembler automatically aligns the operands of a .long or
+ .short pseudo-op, and we want to be compatible. */
+
+static void
+ppc_xcoff_cons (log_size)
+ int log_size;
+{
+ frag_align (log_size, 0, 0);
+ record_alignment (now_seg, log_size);
+ cons (1 << log_size);
+}
+
+static void
+ppc_vbyte (dummy)
+ int dummy;
+{
+ expressionS exp;
+ int byte_count;
+
+ (void) expression (&exp);
+
+ if (exp.X_op != O_constant)
+ {
+ as_bad (_("non-constant byte count"));
+ return;
+ }
+
+ byte_count = exp.X_add_number;
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing value"));
+ return;
+ }
+
+ ++input_line_pointer;
+ cons (byte_count);
+}
+
+#endif /* OBJ_XCOFF */
+
+/* The .tc pseudo-op. This is used when generating either XCOFF or
+ ELF. This takes two or more arguments.
+
+ When generating XCOFF output, the first argument is the name to
+ give to this location in the toc; this will be a symbol with class
+ TC. The rest of the arguments are 4 byte values to actually put at
+ this location in the TOC; often there is just one more argument, a
+ relocateable symbol reference.
+
+ When not generating XCOFF output, the arguments are the same, but
+ the first argument is simply ignored. */
+
+static void
+ppc_tc (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+#ifdef OBJ_XCOFF
+
+ /* Define the TOC symbol name. */
+ {
+ char *name;
+ char endc;
+ symbolS *sym;
+
+ if (ppc_toc_csect == (symbolS *) NULL
+ || ppc_toc_csect != ppc_current_csect)
+ {
+ as_bad (_(".tc not in .toc section"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ if (S_IS_DEFINED (sym))
+ {
+ symbolS *label;
+
+ label = symbol_get_tc (ppc_current_csect)->within;
+ if (symbol_get_tc (label)->class != XMC_TC0)
+ {
+ as_bad (_(".tc with no label"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ S_SET_SEGMENT (label, S_GET_SEGMENT (sym));
+ symbol_set_frag (label, symbol_get_frag (sym));
+ S_SET_VALUE (label, S_GET_VALUE (sym));
+
+ while (! is_end_of_line[(unsigned char) *input_line_pointer])
+ ++input_line_pointer;
+
+ return;
+ }
+
+ S_SET_SEGMENT (sym, now_seg);
+ symbol_set_frag (sym, frag_now);
+ S_SET_VALUE (sym, (valueT) frag_now_fix ());
+ symbol_get_tc (sym)->class = XMC_TC;
+ symbol_get_tc (sym)->output = 1;
+
+ ppc_frob_label (sym);
+ }
+
+#else /* ! defined (OBJ_XCOFF) */
+
+ /* Skip the TOC symbol name. */
+ while (is_part_of_name (*input_line_pointer)
+ || *input_line_pointer == '['
+ || *input_line_pointer == ']'
+ || *input_line_pointer == '{'
+ || *input_line_pointer == '}')
+ ++input_line_pointer;
+
+ /* Align to a four byte boundary. */
+ frag_align (2, 0, 0);
+ record_alignment (now_seg, 2);
+
+#endif /* ! defined (OBJ_XCOFF) */
+
+ if (*input_line_pointer != ',')
+ demand_empty_rest_of_line ();
+ else
+ {
+ ++input_line_pointer;
+ cons (4);
+ }
+}
+
+#ifdef TE_PE
+
+/* Pseudo-ops specific to the Windows NT PowerPC PE (coff) format */
+
+/* Set the current section. */
+static void
+ppc_set_current_section (new)
+ segT new;
+{
+ ppc_previous_section = ppc_current_section;
+ ppc_current_section = new;
+}
+
+/* pseudo-op: .previous
+ behaviour: toggles the current section with the previous section.
+ errors: None
+ warnings: "No previous section"
+*/
+static void
+ppc_previous(ignore)
+ int ignore;
+{
+ symbolS *tmp;
+
+ if (ppc_previous_section == NULL)
+ {
+ as_warn(_("No previous section to return to. Directive ignored."));
+ return;
+ }
+
+ subseg_set(ppc_previous_section, 0);
+
+ ppc_set_current_section(ppc_previous_section);
+}
+
+/* pseudo-op: .pdata
+ behaviour: predefined read only data section
+ double word aligned
+ errors: None
+ warnings: None
+ initial: .section .pdata "adr3"
+ a - don't know -- maybe a misprint
+ d - initialized data
+ r - readable
+ 3 - double word aligned (that would be 4 byte boundary)
+
+ commentary:
+ Tag index tables (also known as the function table) for exception
+ handling, debugging, etc.
+
+*/
+static void
+ppc_pdata(ignore)
+ int ignore;
+{
+ 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
+ {
+ pdata_section = subseg_new(".pdata", 0);
+ }
+ ppc_set_current_section(pdata_section);
+}
+
+/* pseudo-op: .ydata
+ behaviour: predefined read only data section
+ double word aligned
+ errors: None
+ warnings: None
+ initial: .section .ydata "drw3"
+ a - don't know -- maybe a misprint
+ d - initialized data
+ r - readable
+ 3 - double word aligned (that would be 4 byte boundary)
+ commentary:
+ Tag tables (also known as the scope table) for exception handling,
+ debugging, etc.
+*/
+static void
+ppc_ydata(ignore)
+ int ignore;
+{
+ if (ydata_section == 0)
+ {
+ ydata_section = subseg_new (".ydata", 0);
+ bfd_set_section_flags (stdoutput, ydata_section,
+ (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_READONLY | SEC_DATA ));
+
+ bfd_set_section_alignment (stdoutput, ydata_section, 3);
+ }
+ else
+ {
+ ydata_section = subseg_new (".ydata", 0);
+ }
+ ppc_set_current_section(ydata_section);
+}
+
+/* pseudo-op: .reldata
+ behaviour: predefined read write data section
+ double word aligned (4-byte)
+ FIXME: relocation is applied to it
+ FIXME: what's the difference between this and .data?
+ errors: None
+ warnings: None
+ initial: .section .reldata "drw3"
+ d - initialized data
+ r - readable
+ w - writeable
+ 3 - double word aligned (that would be 8 byte boundary)
+
+ commentary:
+ Like .data, but intended to hold data subject to relocation, such as
+ function descriptors, etc.
+*/
+static void
+ppc_reldata(ignore)
+ int ignore;
+{
+ if (reldata_section == 0)
+ {
+ reldata_section = subseg_new (".reldata", 0);
+
+ bfd_set_section_flags (stdoutput, reldata_section,
+ ( SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_DATA ));
+
+ bfd_set_section_alignment (stdoutput, reldata_section, 2);
+ }
+ else
+ {
+ reldata_section = subseg_new (".reldata", 0);
+ }
+ ppc_set_current_section(reldata_section);
+}
+
+/* pseudo-op: .rdata
+ behaviour: predefined read only data section
+ double word aligned
+ errors: None
+ warnings: None
+ initial: .section .rdata "dr3"
+ d - initialized data
+ r - readable
+ 3 - double word aligned (that would be 4 byte boundary)
+*/
+static void
+ppc_rdata(ignore)
+ int ignore;
+{
+ if (rdata_section == 0)
+ {
+ rdata_section = subseg_new (".rdata", 0);
+ bfd_set_section_flags (stdoutput, rdata_section,
+ (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_READONLY | SEC_DATA ));
+
+ bfd_set_section_alignment (stdoutput, rdata_section, 2);
+ }
+ else
+ {
+ rdata_section = subseg_new (".rdata", 0);
+ }
+ ppc_set_current_section(rdata_section);
+}
+
+/* pseudo-op: .ualong
+ behaviour: much like .int, with the exception that no alignment is
+ performed.
+ FIXME: test the alignment statement
+ errors: None
+ warnings: None
+*/
+static void
+ppc_ualong(ignore)
+ int ignore;
+{
+ /* try for long */
+ cons ( 4 );
+}
+
+/* pseudo-op: .znop <symbol name>
+ behaviour: Issue a nop instruction
+ Issue a IMAGE_REL_PPC_IFGLUE relocation against it, using
+ the supplied symbol name.
+ errors: None
+ warnings: Missing symbol name
+*/
+static void
+ppc_znop(ignore)
+ int ignore;
+{
+ unsigned long insn;
+ const struct powerpc_opcode *opcode;
+ expressionS ex;
+ char *f;
+
+ symbolS *sym;
+
+ /* Strip out the symbol name */
+ char *symbol_name;
+ char c;
+ char *name;
+ unsigned int exp;
+ flagword flags;
+ asection *sec;
+
+ symbol_name = input_line_pointer;
+ c = get_symbol_end ();
+
+ name = xmalloc (input_line_pointer - symbol_name + 1);
+ strcpy (name, symbol_name);
+
+ sym = symbol_find_or_make (name);
+
+ *input_line_pointer = c;
+
+ SKIP_WHITESPACE ();
+
+ /* Look up the opcode in the hash table. */
+ opcode = (const struct powerpc_opcode *) hash_find (ppc_hash, "nop");
+
+ /* stick in the nop */
+ insn = opcode->opcode;
+
+ /* Write out the instruction. */
+ f = frag_more (4);
+ md_number_to_chars (f, insn, 4);
+ fix_new (frag_now,
+ f - frag_now->fr_literal,
+ 4,
+ sym,
+ 0,
+ 0,
+ BFD_RELOC_16_GOT_PCREL);
+
+}
+
+/* pseudo-op:
+ behaviour:
+ errors:
+ warnings:
+*/
+static void
+ppc_pe_comm(lcomm)
+ int lcomm;
+{
+ register char *name;
+ register char c;
+ register char *p;
+ offsetT temp;
+ register symbolS *symbolP;
+ offsetT align;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+
+ /* 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: rest of line ignored."));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ input_line_pointer++; /* skip ',' */
+ if ((temp = get_absolute_expression ()) < 0)
+ {
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (! lcomm)
+ {
+ /* The third argument to .comm is the alignment. */
+ if (*input_line_pointer != ',')
+ align = 3;
+ else
+ {
+ ++input_line_pointer;
+ align = get_absolute_expression ();
+ if (align <= 0)
+ {
+ as_warn (_("ignoring bad alignment"));
+ align = 3;
+ }
+ }
+ }
+
+ *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 `%s'."),
+ S_GET_NAME (symbolP));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (S_GET_VALUE (symbolP))
+ {
+ if (S_GET_VALUE (symbolP) != (valueT) temp)
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
+ S_GET_NAME (symbolP),
+ (long) S_GET_VALUE (symbolP),
+ (long) temp);
+ }
+ else
+ {
+ S_SET_VALUE (symbolP, (valueT) temp);
+ S_SET_EXTERNAL (symbolP);
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/*
+ * implement the .section pseudo op:
+ * .section name {, "flags"}
+ * ^ ^
+ * | +--- optional flags: 'b' for bss
+ * | 'i' for info
+ * +-- section name 'l' for lib
+ * 'n' for noload
+ * 'o' for over
+ * 'w' for data
+ * 'd' (apparently m88k for data)
+ * 'x' for text
+ * But if the argument is not a quoted string, treat it as a
+ * subsegment number.
+ *
+ * FIXME: this is a copy of the section processing from obj-coff.c, with
+ * 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
+ * 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)
+ *
+ * Section Contents:
+ * 'a' - unknown - referred to in documentation, but no definition supplied
+ * 'c' - section has code
+ * 'd' - section has initialized data
+ * 'u' - section has uninitialized data
+ * 'i' - section contains directives (info)
+ * 'n' - section can be discarded
+ * 'R' - remove section at link time
+ *
+ * Section Protection:
+ * 'r' - section is readable
+ * 'w' - section is writeable
+ * 'x' - section is executable
+ * 's' - section is sharable
+ *
+ * Section Alignment:
+ * '0' - align to byte boundary
+ * '1' - align to halfword undary
+ * '2' - align to word boundary
+ * '3' - align to doubleword boundary
+ * '4' - align to quadword boundary
+ * '5' - align to 32 byte boundary
+ * '6' - align to 64 byte boundary
+ *
+ */
+
+void
+ppc_pe_section (ignore)
+ int ignore;
+{
+ /* Strip out the section name */
+ char *section_name;
+ char c;
+ char *name;
+ unsigned int exp;
+ flagword flags;
+ segT sec;
+ int align;
+
+ section_name = input_line_pointer;
+ c = get_symbol_end ();
+
+ name = xmalloc (input_line_pointer - section_name + 1);
+ strcpy (name, section_name);
+
+ *input_line_pointer = c;
+
+ SKIP_WHITESPACE ();
+
+ exp = 0;
+ flags = SEC_NO_FLAGS;
+
+ if (strcmp (name, ".idata$2") == 0)
+ {
+ align = 0;
+ }
+ else if (strcmp (name, ".idata$3") == 0)
+ {
+ align = 0;
+ }
+ else if (strcmp (name, ".idata$4") == 0)
+ {
+ align = 2;
+ }
+ else if (strcmp (name, ".idata$5") == 0)
+ {
+ align = 2;
+ }
+ else if (strcmp (name, ".idata$6") == 0)
+ {
+ align = 1;
+ }
+ else
+ align = 4; /* default alignment to 16 byte boundary */
+
+ if (*input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != '"')
+ exp = get_absolute_expression ();
+ else
+ {
+ ++input_line_pointer;
+ while (*input_line_pointer != '"'
+ && ! is_end_of_line[(unsigned char) *input_line_pointer])
+ {
+ switch (*input_line_pointer)
+ {
+ /* Section Contents */
+ case 'a': /* unknown */
+ as_bad (_("Unsupported section attribute -- 'a'"));
+ break;
+ case 'c': /* code section */
+ flags |= SEC_CODE;
+ break;
+ case 'd': /* section has initialized data */
+ flags |= SEC_DATA;
+ break;
+ case 'u': /* section has uninitialized data */
+ /* FIXME: This is IMAGE_SCN_CNT_UNINITIALIZED_DATA
+ in winnt.h */
+ flags |= SEC_ROM;
+ break;
+ case 'i': /* section contains directives (info) */
+ /* FIXME: This is IMAGE_SCN_LNK_INFO
+ in winnt.h */
+ flags |= SEC_HAS_CONTENTS;
+ break;
+ case 'n': /* section can be discarded */
+ flags &=~ SEC_LOAD;
+ break;
+ case 'R': /* Remove section at link time */
+ flags |= SEC_NEVER_LOAD;
+ break;
+
+ /* Section Protection */
+ case 'r': /* section is readable */
+ flags |= IMAGE_SCN_MEM_READ;
+ break;
+ case 'w': /* section is writeable */
+ flags |= IMAGE_SCN_MEM_WRITE;
+ break;
+ case 'x': /* section is executable */
+ flags |= IMAGE_SCN_MEM_EXECUTE;
+ break;
+ case 's': /* section is sharable */
+ flags |= IMAGE_SCN_MEM_SHARED;
+ break;
+
+ /* Section Alignment */
+ case '0': /* align to byte boundary */
+ flags |= IMAGE_SCN_ALIGN_1BYTES;
+ align = 0;
+ break;
+ case '1': /* align to halfword boundary */
+ flags |= IMAGE_SCN_ALIGN_2BYTES;
+ align = 1;
+ break;
+ case '2': /* align to word boundary */
+ flags |= IMAGE_SCN_ALIGN_4BYTES;
+ align = 2;
+ break;
+ case '3': /* align to doubleword boundary */
+ flags |= IMAGE_SCN_ALIGN_8BYTES;
+ align = 3;
+ break;
+ case '4': /* align to quadword boundary */
+ flags |= IMAGE_SCN_ALIGN_16BYTES;
+ align = 4;
+ break;
+ case '5': /* align to 32 byte boundary */
+ flags |= IMAGE_SCN_ALIGN_32BYTES;
+ align = 5;
+ break;
+ case '6': /* align to 64 byte boundary */
+ flags |= IMAGE_SCN_ALIGN_64BYTES;
+ align = 6;
+ break;
+
+ default:
+ as_bad(_("unknown section attribute '%c'"),
+ *input_line_pointer);
+ break;
+ }
+ ++input_line_pointer;
+ }
+ if (*input_line_pointer == '"')
+ ++input_line_pointer;
+ }
+ }
+
+ sec = subseg_new (name, (subsegT) exp);
+
+ ppc_set_current_section(sec);
+
+ if (flags != SEC_NO_FLAGS)
+ {
+ if (! bfd_set_section_flags (stdoutput, sec, flags))
+ as_bad (_("error setting flags for \"%s\": %s"),
+ bfd_section_name (stdoutput, sec),
+ bfd_errmsg (bfd_get_error ()));
+ }
+
+ bfd_set_section_alignment(stdoutput, sec, align);
+
+}
+
+static void
+ppc_pe_function (ignore)
+ int ignore;
+{
+ char *name;
+ char endc;
+ symbolS *ext_sym;
+
+ name = input_line_pointer;
+ endc = get_symbol_end ();
+
+ ext_sym = symbol_find_or_make (name);
+
+ *input_line_pointer = endc;
+
+ S_SET_DATA_TYPE (ext_sym, DT_FCN << N_BTSHFT);
+ SF_SET_FUNCTION (ext_sym);
+ SF_SET_PROCESS (ext_sym);
+ coff_add_linesym (ext_sym);
+
+ demand_empty_rest_of_line ();
+}
+
+static void
+ppc_pe_tocd (ignore)
+ int ignore;
+{
+ if (tocdata_section == 0)
+ {
+ tocdata_section = subseg_new (".tocd", 0);
+ /* FIXME: section flags won't work */
+ bfd_set_section_flags (stdoutput, tocdata_section,
+ (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_READONLY | SEC_DATA ));
+
+ bfd_set_section_alignment (stdoutput, tocdata_section, 2);
+ }
+ else
+ {
+ rdata_section = subseg_new (".tocd", 0);
+ }
+
+ ppc_set_current_section(tocdata_section);
+
+ demand_empty_rest_of_line ();
+}
+
+/* Don't adjust TOC relocs to use the section symbol. */
+
+int
+ppc_pe_fix_adjustable (fix)
+ fixS *fix;
+{
+ return fix->fx_r_type != BFD_RELOC_PPC_TOC16;
+}
+
+#endif
+
+#ifdef OBJ_XCOFF
+
+/* XCOFF specific symbol and file handling. */
+
+/* Canonicalize the symbol name. We use the to force the suffix, if
+ any, to use square brackets, and to be in upper case. */
+
+char *
+ppc_canonicalize_symbol_name (name)
+ char *name;
+{
+ char *s;
+
+ if (ppc_stab_symbol)
+ return name;
+
+ for (s = name; *s != '\0' && *s != '{' && *s != '['; s++)
+ ;
+ if (*s != '\0')
+ {
+ char brac;
+
+ if (*s == '[')
+ brac = ']';
+ else
+ {
+ *s = '[';
+ brac = '}';
+ }
+
+ for (s++; *s != '\0' && *s != brac; s++)
+ if (islower (*s))
+ *s = toupper (*s);
+
+ if (*s == '\0' || s[1] != '\0')
+ as_bad (_("bad symbol suffix"));
+
+ *s = ']';
+ }
+
+ return name;
+}
+
+/* Set the class of a symbol based on the suffix, if any. This is
+ called whenever a new symbol is created. */
+
+void
+ppc_symbol_new_hook (sym)
+ symbolS *sym;
+{
+ struct ppc_tc_sy *tc;
+ const char *s;
+
+ tc = symbol_get_tc (sym);
+ tc->next = NULL;
+ tc->output = 0;
+ tc->class = -1;
+ tc->real_name = NULL;
+ tc->subseg = 0;
+ tc->align = 0;
+ tc->size = NULL;
+ tc->within = NULL;
+
+ if (ppc_stab_symbol)
+ return;
+
+ s = strchr (S_GET_NAME (sym), '[');
+ if (s == (const char *) NULL)
+ {
+ /* There is no suffix. */
+ return;
+ }
+
+ ++s;
+
+ switch (s[0])
+ {
+ case 'B':
+ if (strcmp (s, "BS]") == 0)
+ tc->class = XMC_BS;
+ break;
+ case 'D':
+ if (strcmp (s, "DB]") == 0)
+ tc->class = XMC_DB;
+ else if (strcmp (s, "DS]") == 0)
+ tc->class = XMC_DS;
+ break;
+ case 'G':
+ if (strcmp (s, "GL]") == 0)
+ tc->class = XMC_GL;
+ break;
+ case 'P':
+ if (strcmp (s, "PR]") == 0)
+ tc->class = XMC_PR;
+ break;
+ case 'R':
+ if (strcmp (s, "RO]") == 0)
+ tc->class = XMC_RO;
+ else if (strcmp (s, "RW]") == 0)
+ tc->class = XMC_RW;
+ break;
+ case 'S':
+ if (strcmp (s, "SV]") == 0)
+ tc->class = XMC_SV;
+ break;
+ case 'T':
+ if (strcmp (s, "TC]") == 0)
+ tc->class = XMC_TC;
+ else if (strcmp (s, "TI]") == 0)
+ tc->class = XMC_TI;
+ else if (strcmp (s, "TB]") == 0)
+ tc->class = XMC_TB;
+ else if (strcmp (s, "TC0]") == 0 || strcmp (s, "T0]") == 0)
+ tc->class = XMC_TC0;
+ break;
+ case 'U':
+ if (strcmp (s, "UA]") == 0)
+ tc->class = XMC_UA;
+ else if (strcmp (s, "UC]") == 0)
+ tc->class = XMC_UC;
+ break;
+ case 'X':
+ if (strcmp (s, "XO]") == 0)
+ tc->class = XMC_XO;
+ break;
+ }
+
+ if (tc->class == -1)
+ as_bad (_("Unrecognized symbol suffix"));
+}
+
+/* Set the class of a label based on where it is defined. This
+ handles symbols without suffixes. Also, move the symbol so that it
+ follows the csect symbol. */
+
+void
+ppc_frob_label (sym)
+ symbolS *sym;
+{
+ if (ppc_current_csect != (symbolS *) NULL)
+ {
+ if (symbol_get_tc (sym)->class == -1)
+ symbol_get_tc (sym)->class = symbol_get_tc (ppc_current_csect)->class;
+
+ symbol_remove (sym, &symbol_rootP, &symbol_lastP);
+ symbol_append (sym, symbol_get_tc (ppc_current_csect)->within,
+ &symbol_rootP, &symbol_lastP);
+ symbol_get_tc (ppc_current_csect)->within = sym;
+ }
+}
+
+/* This variable is set by ppc_frob_symbol if any absolute symbols are
+ seen. It tells ppc_adjust_symtab whether it needs to look through
+ the symbols. */
+
+static boolean ppc_saw_abs;
+
+/* Change the name of a symbol just before writing it out. Set the
+ real name if the .rename pseudo-op was used. Otherwise, remove any
+ class suffix. Return 1 if the symbol should not be included in the
+ symbol table. */
+
+int
+ppc_frob_symbol (sym)
+ symbolS *sym;
+{
+ static symbolS *ppc_last_function;
+ static symbolS *set_end;
+
+ /* Discard symbols that should not be included in the output symbol
+ table. */
+ if (! symbol_used_in_reloc_p (sym)
+ && ((symbol_get_bfdsym (sym)->flags & BSF_SECTION_SYM) != 0
+ || (! S_IS_EXTERNAL (sym)
+ && ! symbol_get_tc (sym)->output
+ && S_GET_STORAGE_CLASS (sym) != C_FILE)))
+ return 1;
+
+ if (symbol_get_tc (sym)->real_name != (char *) NULL)
+ S_SET_NAME (sym, symbol_get_tc (sym)->real_name);
+ else
+ {
+ const char *name;
+ const char *s;
+
+ name = S_GET_NAME (sym);
+ s = strchr (name, '[');
+ if (s != (char *) NULL)
+ {
+ unsigned int len;
+ char *snew;
+
+ len = s - name;
+ snew = xmalloc (len + 1);
+ memcpy (snew, name, len);
+ snew[len] = '\0';
+
+ S_SET_NAME (sym, snew);
+ }
+ }
+
+ if (set_end != (symbolS *) NULL)
+ {
+ SA_SET_SYM_ENDNDX (set_end, sym);
+ set_end = NULL;
+ }
+
+ if (SF_GET_FUNCTION (sym))
+ {
+ if (ppc_last_function != (symbolS *) NULL)
+ as_bad (_("two .function pseudo-ops with no intervening .ef"));
+ ppc_last_function = sym;
+ if (symbol_get_tc (sym)->size != (symbolS *) NULL)
+ {
+ resolve_symbol_value (symbol_get_tc (sym)->size, 1);
+ SA_SET_SYM_FSIZE (sym,
+ (long) S_GET_VALUE (symbol_get_tc (sym)->size));
+ }
+ }
+ else if (S_GET_STORAGE_CLASS (sym) == C_FCN
+ && strcmp (S_GET_NAME (sym), ".ef") == 0)
+ {
+ if (ppc_last_function == (symbolS *) NULL)
+ as_bad (_(".ef with no preceding .function"));
+ else
+ {
+ set_end = ppc_last_function;
+ ppc_last_function = NULL;
+
+ /* We don't have a C_EFCN symbol, but we need to force the
+ COFF backend to believe that it has seen one. */
+ coff_last_function = NULL;
+ }
+ }
+
+ if (! S_IS_EXTERNAL (sym)
+ && (symbol_get_bfdsym (sym)->flags & BSF_SECTION_SYM) == 0
+ && S_GET_STORAGE_CLASS (sym) != C_FILE
+ && S_GET_STORAGE_CLASS (sym) != C_FCN
+ && S_GET_STORAGE_CLASS (sym) != C_BLOCK
+ && S_GET_STORAGE_CLASS (sym) != C_BSTAT
+ && S_GET_STORAGE_CLASS (sym) != C_ESTAT
+ && S_GET_STORAGE_CLASS (sym) != C_BINCL
+ && S_GET_STORAGE_CLASS (sym) != C_EINCL
+ && S_GET_SEGMENT (sym) != ppc_coff_debug_section)
+ S_SET_STORAGE_CLASS (sym, C_HIDEXT);
+
+ if (S_GET_STORAGE_CLASS (sym) == C_EXT
+ || S_GET_STORAGE_CLASS (sym) == C_HIDEXT)
+ {
+ int i;
+ union internal_auxent *a;
+
+ /* Create a csect aux. */
+ i = S_GET_NUMBER_AUXILIARY (sym);
+ S_SET_NUMBER_AUXILIARY (sym, i + 1);
+ a = &coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].u.auxent;
+ if (symbol_get_tc (sym)->class == XMC_TC0)
+ {
+ /* This is the TOC table. */
+ know (strcmp (S_GET_NAME (sym), "TOC") == 0);
+ a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_smtyp = (2 << 3) | XTY_SD;
+ }
+ else if (symbol_get_tc (sym)->subseg != 0)
+ {
+ /* This is a csect symbol. x_scnlen is the size of the
+ csect. */
+ if (symbol_get_tc (sym)->next == (symbolS *) NULL)
+ a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput,
+ S_GET_SEGMENT (sym))
+ - S_GET_VALUE (sym));
+ else
+ {
+ resolve_symbol_value (symbol_get_tc (sym)->next, 1);
+ a->x_csect.x_scnlen.l = (S_GET_VALUE (symbol_get_tc (sym)->next)
+ - S_GET_VALUE (sym));
+ }
+ a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_SD;
+ }
+ else if (S_GET_SEGMENT (sym) == bss_section)
+ {
+ /* This is a common symbol. */
+ a->x_csect.x_scnlen.l = symbol_get_frag (sym)->fr_offset;
+ a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_CM;
+ if (S_IS_EXTERNAL (sym))
+ symbol_get_tc (sym)->class = XMC_RW;
+ else
+ symbol_get_tc (sym)->class = XMC_BS;
+ }
+ else if (S_GET_SEGMENT (sym) == absolute_section)
+ {
+ /* This is an absolute symbol. The csect will be created by
+ ppc_adjust_symtab. */
+ ppc_saw_abs = true;
+ a->x_csect.x_smtyp = XTY_LD;
+ if (symbol_get_tc (sym)->class == -1)
+ symbol_get_tc (sym)->class = XMC_XO;
+ }
+ else if (! S_IS_DEFINED (sym))
+ {
+ /* This is an external symbol. */
+ a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_smtyp = XTY_ER;
+ }
+ else if (symbol_get_tc (sym)->class == XMC_TC)
+ {
+ symbolS *next;
+
+ /* This is a TOC definition. x_scnlen is the size of the
+ TOC entry. */
+ next = symbol_next (sym);
+ while (symbol_get_tc (next)->class == XMC_TC0)
+ next = symbol_next (next);
+ if (next == (symbolS *) NULL
+ || symbol_get_tc (next)->class != XMC_TC)
+ {
+ if (ppc_after_toc_frag == (fragS *) NULL)
+ a->x_csect.x_scnlen.l = (bfd_section_size (stdoutput,
+ data_section)
+ - S_GET_VALUE (sym));
+ else
+ a->x_csect.x_scnlen.l = (ppc_after_toc_frag->fr_address
+ - S_GET_VALUE (sym));
+ }
+ else
+ {
+ resolve_symbol_value (next, 1);
+ a->x_csect.x_scnlen.l = (S_GET_VALUE (next)
+ - S_GET_VALUE (sym));
+ }
+ a->x_csect.x_smtyp = (2 << 3) | XTY_SD;
+ }
+ else
+ {
+ symbolS *csect;
+
+ /* This is a normal symbol definition. x_scnlen is the
+ symbol index of the containing csect. */
+ if (S_GET_SEGMENT (sym) == text_section)
+ csect = ppc_text_csects;
+ else if (S_GET_SEGMENT (sym) == data_section)
+ csect = ppc_data_csects;
+ else
+ abort ();
+
+ /* Skip the initial dummy symbol. */
+ csect = symbol_get_tc (csect)->next;
+
+ if (csect == (symbolS *) NULL)
+ {
+ as_warn (_("warning: symbol %s has no csect"), S_GET_NAME (sym));
+ a->x_csect.x_scnlen.l = 0;
+ }
+ else
+ {
+ while (symbol_get_tc (csect)->next != (symbolS *) NULL)
+ {
+ resolve_symbol_value (symbol_get_tc (csect)->next, 1);
+ if (S_GET_VALUE (symbol_get_tc (csect)->next)
+ > S_GET_VALUE (sym))
+ break;
+ csect = symbol_get_tc (csect)->next;
+ }
+
+ a->x_csect.x_scnlen.p =
+ coffsymbol (symbol_get_bfdsym (csect))->native;
+ coffsymbol (symbol_get_bfdsym (sym))->native[i + 1].fix_scnlen =
+ 1;
+ }
+ 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)
+ a->x_csect.x_smclas = XMC_PR;
+ else
+ a->x_csect.x_smclas = symbol_get_tc (sym)->class;
+ a->x_csect.x_stab = 0;
+ a->x_csect.x_snstab = 0;
+
+ /* Don't let the COFF backend resort these symbols. */
+ symbol_get_bfdsym (sym)->flags |= BSF_NOT_AT_END;
+ }
+ else if (S_GET_STORAGE_CLASS (sym) == C_BSTAT)
+ {
+ /* We want the value to be the symbol index of the referenced
+ csect symbol. BFD will do that for us if we set the right
+ flags. */
+ S_SET_VALUE (sym,
+ ((valueT)
+ coffsymbol (symbol_get_bfdsym
+ (symbol_get_tc (sym)->within))->native));
+ coffsymbol (symbol_get_bfdsym (sym))->native->fix_value = 1;
+ }
+ else if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
+ {
+ symbolS *block;
+ symbolS *csect;
+
+ /* The value is the offset from the enclosing csect. */
+ block = symbol_get_tc (sym)->within;
+ csect = symbol_get_tc (block)->within;
+ resolve_symbol_value (csect, 1);
+ S_SET_VALUE (sym, S_GET_VALUE (sym) - S_GET_VALUE (csect));
+ }
+ else if (S_GET_STORAGE_CLASS (sym) == C_BINCL
+ || S_GET_STORAGE_CLASS (sym) == C_EINCL)
+ {
+ /* We want the value to be a file offset into the line numbers.
+ BFD will do that for us if we set the right flags. We have
+ already set the value correctly. */
+ coffsymbol (symbol_get_bfdsym (sym))->native->fix_line = 1;
+ }
+
+ return 0;
+}
+
+/* Adjust the symbol table. This creates csect symbols for all
+ absolute symbols. */
+
+void
+ppc_adjust_symtab ()
+{
+ symbolS *sym;
+
+ if (! ppc_saw_abs)
+ return;
+
+ for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
+ {
+ symbolS *csect;
+ int i;
+ union internal_auxent *a;
+
+ if (S_GET_SEGMENT (sym) != absolute_section)
+ continue;
+
+ csect = symbol_create (".abs[XO]", absolute_section,
+ S_GET_VALUE (sym), &zero_address_frag);
+ symbol_get_bfdsym (csect)->value = S_GET_VALUE (sym);
+ S_SET_STORAGE_CLASS (csect, C_HIDEXT);
+ i = S_GET_NUMBER_AUXILIARY (csect);
+ S_SET_NUMBER_AUXILIARY (csect, i + 1);
+ a = &coffsymbol (symbol_get_bfdsym (csect))->native[i + 1].u.auxent;
+ a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_smtyp = XTY_SD;
+ a->x_csect.x_parmhash = 0;
+ a->x_csect.x_snhash = 0;
+ a->x_csect.x_smclas = XMC_XO;
+ a->x_csect.x_stab = 0;
+ a->x_csect.x_snstab = 0;
+
+ symbol_insert (csect, sym, &symbol_rootP, &symbol_lastP);
+
+ i = S_GET_NUMBER_AUXILIARY (sym);
+ a = &coffsymbol (symbol_get_bfdsym (sym))->native[i].u.auxent;
+ a->x_csect.x_scnlen.p = coffsymbol (symbol_get_bfdsym (csect))->native;
+ coffsymbol (symbol_get_bfdsym (sym))->native[i].fix_scnlen = 1;
+ }
+
+ ppc_saw_abs = false;
+}
+
+/* Set the VMA for a section. This is called on all the sections in
+ turn. */
+
+void
+ppc_frob_section (sec)
+ asection *sec;
+{
+ static bfd_size_type vma = 0;
+
+ bfd_set_section_vma (stdoutput, sec, vma);
+ vma += bfd_section_size (stdoutput, 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
+ returned, or NULL on OK. */
+
+char *
+md_atof (type, litp, sizep)
+ int type;
+ char *litp;
+ int *sizep;
+{
+ int prec;
+ LITTLENUM_TYPE words[4];
+ char *t;
+ int i;
+
+ switch (type)
+ {
+ case 'f':
+ prec = 2;
+ break;
+
+ case 'd':
+ prec = 4;
+ break;
+
+ default:
+ *sizep = 0;
+ return _("bad call to md_atof");
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+
+ *sizep = prec * 2;
+
+ if (target_big_endian)
+ {
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litp, (valueT) words[i], 2);
+ litp += 2;
+ }
+ }
+ else
+ {
+ for (i = prec - 1; i >= 0; i--)
+ {
+ md_number_to_chars (litp, (valueT) words[i], 2);
+ litp += 2;
+ }
+ }
+
+ return NULL;
+}
+
+/* Write a value out to the object file, using the appropriate
+ endianness. */
+
+void
+md_number_to_chars (buf, val, n)
+ char *buf;
+ valueT val;
+ int n;
+{
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
+}
+
+/* Align a section (I don't know why this is machine dependent). */
+
+valueT
+md_section_align (seg, addr)
+ asection *seg;
+ valueT addr;
+{
+ int align = bfd_get_section_alignment (stdoutput, seg);
+
+ return ((addr + (1 << align) - 1) & (-1 << align));
+}
+
+/* We don't have any form of relaxing. */
+
+int
+md_estimate_size_before_relax (fragp, seg)
+ fragS *fragp ATTRIBUTE_UNUSED;
+ asection *seg ATTRIBUTE_UNUSED;
+{
+ abort ();
+ return 0;
+}
+
+/* Convert a machine dependent frag. We never generate these. */
+
+void
+md_convert_frag (abfd, sec, fragp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ fragS *fragp ATTRIBUTE_UNUSED;
+{
+ abort ();
+}
+
+/* We have no need to default values of symbols. */
+
+/*ARGSUSED*/
+symbolS *
+md_undefined_symbol (name)
+ char *name ATTRIBUTE_UNUSED;
+{
+ return 0;
+}
+
+/* Functions concerning relocs. */
+
+/* The location from which a PC relative jump should be calculated,
+ given a PC relative reloc. */
+
+long
+md_pcrel_from_section (fixp, sec)
+ fixS *fixp;
+ segT sec ATTRIBUTE_UNUSED;
+{
+ return fixp->fx_frag->fr_address + fixp->fx_where;
+}
+
+#ifdef OBJ_XCOFF
+
+/* This is called to see whether a fixup should be adjusted to use a
+ section symbol. We take the opportunity to change a fixup against
+ a symbol in the TOC subsegment into a reloc against the
+ corresponding .tc symbol. */
+
+int
+ppc_fix_adjustable (fix)
+ fixS *fix;
+{
+ valueT val;
+
+ resolve_symbol_value (fix->fx_addsy, 1);
+ val = S_GET_VALUE (fix->fx_addsy);
+ if (ppc_toc_csect != (symbolS *) NULL
+ && fix->fx_addsy != (symbolS *) NULL
+ && fix->fx_addsy != ppc_toc_csect
+ && S_GET_SEGMENT (fix->fx_addsy) == data_section
+ && val >= ppc_toc_frag->fr_address
+ && (ppc_after_toc_frag == (fragS *) NULL
+ || val < ppc_after_toc_frag->fr_address))
+ {
+ symbolS *sy;
+
+ for (sy = symbol_next (ppc_toc_csect);
+ sy != (symbolS *) NULL;
+ sy = symbol_next (sy))
+ {
+ if (symbol_get_tc (sy)->class == XMC_TC0)
+ continue;
+ if (symbol_get_tc (sy)->class != XMC_TC)
+ break;
+ resolve_symbol_value (sy, 1);
+ if (val == S_GET_VALUE (sy))
+ {
+ fix->fx_addsy = sy;
+ fix->fx_addnumber = val - ppc_toc_frag->fr_address;
+ return 0;
+ }
+ }
+
+ as_bad_where (fix->fx_file, fix->fx_line,
+ _("symbol in .toc does not match any .tc"));
+ }
+
+ /* Possibly adjust the reloc to be against the csect. */
+ if (fix->fx_addsy != (symbolS *) NULL
+ && symbol_get_tc (fix->fx_addsy)->subseg == 0
+ && symbol_get_tc (fix->fx_addsy)->class != XMC_TC0
+ && symbol_get_tc (fix->fx_addsy)->class != XMC_TC
+ && S_GET_SEGMENT (fix->fx_addsy) != bss_section
+ /* Don't adjust if this is a reloc in the toc section. */
+ && (S_GET_SEGMENT (fix->fx_addsy) != data_section
+ || ppc_toc_csect == NULL
+ || val < ppc_toc_frag->fr_address
+ || (ppc_after_toc_frag != NULL
+ && val >= ppc_after_toc_frag->fr_address)))
+ {
+ symbolS *csect;
+
+ if (S_GET_SEGMENT (fix->fx_addsy) == text_section)
+ csect = ppc_text_csects;
+ else if (S_GET_SEGMENT (fix->fx_addsy) == data_section)
+ csect = ppc_data_csects;
+ else
+ abort ();
+
+ /* Skip the initial dummy symbol. */
+ csect = symbol_get_tc (csect)->next;
+
+ if (csect != (symbolS *) NULL)
+ {
+ while (symbol_get_tc (csect)->next != (symbolS *) NULL
+ && (symbol_get_frag (symbol_get_tc (csect)->next)->fr_address
+ <= val))
+ {
+ /* If the csect address equals the symbol value, then we
+ have to look through the full symbol table to see
+ whether this is the csect we want. Note that we will
+ only get here if the csect has zero length. */
+ if ((symbol_get_frag (csect)->fr_address == val)
+ && S_GET_VALUE (csect) == S_GET_VALUE (fix->fx_addsy))
+ {
+ symbolS *scan;
+
+ for (scan = symbol_next (csect);
+ scan != NULL;
+ scan = symbol_next (scan))
+ {
+ if (symbol_get_tc (scan)->subseg != 0)
+ break;
+ if (scan == fix->fx_addsy)
+ break;
+ }
+
+ /* If we found the symbol before the next csect
+ symbol, then this is the csect we want. */
+ if (scan == fix->fx_addsy)
+ break;
+ }
+
+ csect = symbol_get_tc (csect)->next;
+ }
+
+ fix->fx_offset += (S_GET_VALUE (fix->fx_addsy)
+ - symbol_get_frag (csect)->fr_address);
+ fix->fx_addsy = csect;
+ }
+ }
+
+ /* Adjust a reloc against a .lcomm symbol to be against the base
+ .lcomm. */
+ if (fix->fx_addsy != (symbolS *) NULL
+ && S_GET_SEGMENT (fix->fx_addsy) == bss_section
+ && ! S_IS_EXTERNAL (fix->fx_addsy))
+ {
+ resolve_symbol_value (symbol_get_frag (fix->fx_addsy)->fr_symbol, 1);
+ fix->fx_offset +=
+ (S_GET_VALUE (fix->fx_addsy)
+ - S_GET_VALUE (symbol_get_frag (fix->fx_addsy)->fr_symbol));
+ fix->fx_addsy = symbol_get_frag (fix->fx_addsy)->fr_symbol;
+ }
+
+ return 0;
+}
+
+/* A reloc from one csect to another must be kept. The assembler
+ will, of course, keep relocs between sections, and it will keep
+ absolute relocs, but we need to force it to keep PC relative relocs
+ between two csects in the same section. */
+
+int
+ppc_force_relocation (fix)
+ fixS *fix;
+{
+ /* At this point fix->fx_addsy should already have been converted to
+ a csect symbol. If the csect does not include the fragment, then
+ we need to force the relocation. */
+ if (fix->fx_pcrel
+ && fix->fx_addsy != NULL
+ && symbol_get_tc (fix->fx_addsy)->subseg != 0
+ && ((symbol_get_frag (fix->fx_addsy)->fr_address
+ > fix->fx_frag->fr_address)
+ || (symbol_get_tc (fix->fx_addsy)->next != NULL
+ && (symbol_get_frag (symbol_get_tc (fix->fx_addsy)->next)->fr_address
+ <= fix->fx_frag->fr_address))))
+ return 1;
+
+ return 0;
+}
+
+#endif /* OBJ_XCOFF */
+
+/* See whether a symbol is in the TOC section. */
+
+static int
+ppc_is_toc_sym (sym)
+ symbolS *sym;
+{
+#ifdef OBJ_XCOFF
+ return symbol_get_tc (sym)->class == XMC_TC;
+#else
+ return strcmp (segment_name (S_GET_SEGMENT (sym)), ".got") == 0;
+#endif
+}
+
+/* Apply a fixup to the object code. This is called for all the
+ fixups we generated by the call to fix_new_exp, above. In the call
+ above we used a reloc code which was the largest legal reloc code
+ plus the operand index. Here we undo that to recover the operand
+ index. At this point all symbol values should be fully resolved,
+ and we attempt to completely resolve the reloc. If we can not do
+ that, we determine the correct reloc code and put it back in the
+ fixup. */
+
+int
+md_apply_fix3 (fixp, valuep, seg)
+ fixS *fixp;
+ valueT *valuep;
+ segT seg;
+{
+ valueT value;
+
+#ifdef OBJ_ELF
+ value = *valuep;
+ if (fixp->fx_addsy != NULL)
+ {
+ /* `*valuep' may contain the value of the symbol on which the reloc
+ will be based; we have to remove it. */
+ if (symbol_used_in_reloc_p (fixp->fx_addsy)
+ && S_GET_SEGMENT (fixp->fx_addsy) != absolute_section
+ && S_GET_SEGMENT (fixp->fx_addsy) != undefined_section
+ && ! bfd_is_com_section (S_GET_SEGMENT (fixp->fx_addsy)))
+ value -= S_GET_VALUE (fixp->fx_addsy);
+
+ /* FIXME: Why '+'? Better yet, what exactly is '*valuep'
+ supposed to be? I think this is related to various similar
+ FIXMEs in tc-i386.c and tc-sparc.c. */
+ if (fixp->fx_pcrel)
+ value += fixp->fx_frag->fr_address + fixp->fx_where;
+ }
+ else
+ {
+ fixp->fx_done = 1;
+ }
+#else
+ /* FIXME FIXME FIXME: The value we are passed in *valuep includes
+ the symbol values. Since we are using BFD_ASSEMBLER, if we are
+ doing this relocation the code in write.c is going to call
+ bfd_install_relocation, which is also going to use the symbol
+ value. That means that if the reloc is fully resolved we want to
+ use *valuep since bfd_install_relocation is not being used.
+ However, if the reloc is not fully resolved we do not want to use
+ *valuep, and must use fx_offset instead. However, if the reloc
+ is PC relative, we do want to use *valuep since it includes the
+ result of md_pcrel_from. This is confusing. */
+ if (fixp->fx_addsy == (symbolS *) NULL)
+ {
+ value = *valuep;
+ fixp->fx_done = 1;
+ }
+ else if (fixp->fx_pcrel)
+ value = *valuep;
+ else
+ {
+ value = fixp->fx_offset;
+ if (fixp->fx_subsy != (symbolS *) NULL)
+ {
+ if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section)
+ value -= S_GET_VALUE (fixp->fx_subsy);
+ else
+ {
+ /* We can't actually support subtracting a symbol. */
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("expression too complex"));
+ }
+ }
+ }
+#endif
+
+ if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ {
+ int opindex;
+ const struct powerpc_operand *operand;
+ char *where;
+ unsigned long insn;
+
+ opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED;
+
+ operand = &powerpc_operands[opindex];
+
+#ifdef OBJ_XCOFF
+ /* It appears that an instruction like
+ l 9,LC..1(30)
+ when LC..1 is not a TOC symbol does not generate a reloc. It
+ uses the offset of LC..1 within its csect. However, .long
+ LC..1 will generate a reloc. I can't find any documentation
+ on how these cases are to be distinguished, so this is a wild
+ guess. These cases are generated by gcc -mminimal-toc. */
+ if ((operand->flags & PPC_OPERAND_PARENS) != 0
+ && operand->bits == 16
+ && operand->shift == 0
+ && operand->insert == NULL
+ && fixp->fx_addsy != NULL
+ && symbol_get_tc (fixp->fx_addsy)->subseg != 0
+ && symbol_get_tc (fixp->fx_addsy)->class != XMC_TC
+ && symbol_get_tc (fixp->fx_addsy)->class != XMC_TC0
+ && S_GET_SEGMENT (fixp->fx_addsy) != bss_section)
+ {
+ value = fixp->fx_offset;
+ fixp->fx_done = 1;
+ }
+#endif
+
+ /* Fetch the instruction, insert the fully resolved operand
+ value, and stuff the instruction back again. */
+ where = fixp->fx_frag->fr_literal + fixp->fx_where;
+ if (target_big_endian)
+ insn = bfd_getb32 ((unsigned char *) where);
+ else
+ insn = bfd_getl32 ((unsigned char *) where);
+ insn = ppc_insert_operand (insn, operand, (offsetT) value,
+ fixp->fx_file, fixp->fx_line);
+ if (target_big_endian)
+ bfd_putb32 ((bfd_vma) insn, (unsigned char *) where);
+ else
+ bfd_putl32 ((bfd_vma) insn, (unsigned char *) where);
+
+ if (fixp->fx_done)
+ {
+ /* 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.
+ FIXME: We need to handle the DS field at the very least.
+ FIXME: Selecting the reloc type is a bit haphazard; perhaps
+ there should be a new field in the operand table. */
+ if ((operand->flags & PPC_OPERAND_RELATIVE) != 0
+ && operand->bits == 26
+ && operand->shift == 0)
+ fixp->fx_r_type = BFD_RELOC_PPC_B26;
+ else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0
+ && operand->bits == 16
+ && operand->shift == 0)
+ fixp->fx_r_type = BFD_RELOC_PPC_B16;
+ else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0
+ && operand->bits == 26
+ && operand->shift == 0)
+ fixp->fx_r_type = BFD_RELOC_PPC_BA26;
+ else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0
+ && operand->bits == 16
+ && operand->shift == 0)
+ fixp->fx_r_type = BFD_RELOC_PPC_BA16;
+ 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))
+ {
+ fixp->fx_size = 2;
+ if (target_big_endian)
+ fixp->fx_where += 2;
+ fixp->fx_r_type = BFD_RELOC_PPC_TOC16;
+ }
+ else
+ {
+ char *sfile;
+ unsigned int sline;
+
+ /* Use expr_symbol_where to see if this is an expression
+ symbol. */
+ if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline))
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("unresolved expression that must be resolved"));
+ else
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("unsupported relocation type"));
+ fixp->fx_done = 1;
+ return 1;
+ }
+ }
+ else
+ {
+#ifdef OBJ_ELF
+ ppc_elf_validate_fix (fixp, seg);
+#endif
+ switch (fixp->fx_r_type)
+ {
+ case BFD_RELOC_32:
+ case BFD_RELOC_CTOR:
+ if (fixp->fx_pcrel)
+ fixp->fx_r_type = BFD_RELOC_32_PCREL;
+ /* fall through */
+
+ case BFD_RELOC_RVA:
+ case BFD_RELOC_32_PCREL:
+ case BFD_RELOC_32_BASEREL:
+ case BFD_RELOC_PPC_EMB_NADDR32:
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ value, 4);
+ break;
+
+ case BFD_RELOC_LO16:
+ case BFD_RELOC_16:
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_16_GOT_PCREL:
+ case BFD_RELOC_16_GOTOFF:
+ case BFD_RELOC_LO16_GOTOFF:
+ case BFD_RELOC_HI16_GOTOFF:
+ case BFD_RELOC_HI16_S_GOTOFF:
+ case BFD_RELOC_LO16_BASEREL:
+ case BFD_RELOC_HI16_BASEREL:
+ case BFD_RELOC_HI16_S_BASEREL:
+ case BFD_RELOC_PPC_EMB_NADDR16:
+ case BFD_RELOC_PPC_EMB_NADDR16_LO:
+ case BFD_RELOC_PPC_EMB_NADDR16_HI:
+ case BFD_RELOC_PPC_EMB_NADDR16_HA:
+ case BFD_RELOC_PPC_EMB_SDAI16:
+ case BFD_RELOC_PPC_EMB_SDA2REL:
+ case BFD_RELOC_PPC_EMB_SDA2I16:
+ case BFD_RELOC_PPC_EMB_RELSEC16:
+ case BFD_RELOC_PPC_EMB_RELST_LO:
+ case BFD_RELOC_PPC_EMB_RELST_HI:
+ case BFD_RELOC_PPC_EMB_RELST_HA:
+ case BFD_RELOC_PPC_EMB_RELSDA:
+ case BFD_RELOC_PPC_TOC16:
+ if (fixp->fx_pcrel)
+ {
+ if (fixp->fx_addsy != NULL)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot emit PC relative %s relocation against %s"),
+ bfd_get_reloc_code_name (fixp->fx_r_type),
+ S_GET_NAME (fixp->fx_addsy));
+ else
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot emit PC relative %s relocation"),
+ bfd_get_reloc_code_name (fixp->fx_r_type));
+ }
+
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ value, 2);
+ break;
+
+ /* This case happens when you write, for example,
+ lis %r3,(L1-L2)@ha
+ where L1 and L2 are defined later. */
+ case BFD_RELOC_HI16:
+ if (fixp->fx_pcrel)
+ abort ();
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ value >> 16, 2);
+ break;
+ case BFD_RELOC_HI16_S:
+ if (fixp->fx_pcrel)
+ abort ();
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ (value + 0x8000) >> 16, 2);
+ break;
+
+ /* Because SDA21 modifies the register field, the size is set to 4
+ bytes, rather than 2, so offset it here appropriately */
+ case BFD_RELOC_PPC_EMB_SDA21:
+ if (fixp->fx_pcrel)
+ abort ();
+
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where
+ + ((target_big_endian) ? 2 : 0),
+ value, 2);
+ break;
+
+ case BFD_RELOC_8:
+ if (fixp->fx_pcrel)
+ abort ();
+
+ md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ value, 1);
+ break;
+
+ case BFD_RELOC_24_PLT_PCREL:
+ case BFD_RELOC_PPC_LOCAL24PC:
+ if (!fixp->fx_pcrel && !fixp->fx_done)
+ abort ();
+
+ if (fixp->fx_done)
+ {
+ 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;
+ if (target_big_endian)
+ insn = bfd_getb32 ((unsigned char *) where);
+ else
+ insn = bfd_getl32 ((unsigned char *) where);
+ if ((value & 3) != 0)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("must branch to an address a multiple of 4"));
+ if ((offsetT) value < -0x40000000
+ || (offsetT) value >= 0x40000000)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("@local or @plt branch destination is too far away, %ld bytes"),
+ value);
+ insn = insn | (value & 0x03fffffc);
+ if (target_big_endian)
+ bfd_putb32 ((bfd_vma) insn, (unsigned char *) where);
+ else
+ bfd_putl32 ((bfd_vma) insn, (unsigned char *) where);
+ }
+ break;
+
+ case BFD_RELOC_VTABLE_INHERIT:
+ fixp->fx_done = 0;
+ if (fixp->fx_addsy
+ && !S_IS_DEFINED (fixp->fx_addsy)
+ && !S_IS_WEAK (fixp->fx_addsy))
+ S_SET_WEAK (fixp->fx_addsy);
+ break;
+
+ case BFD_RELOC_VTABLE_ENTRY:
+ fixp->fx_done = 0;
+ break;
+
+ default:
+ fprintf(stderr,
+ _("Gas failure, reloc value %d\n"), fixp->fx_r_type);
+ fflush(stderr);
+ abort ();
+ }
+ }
+
+#ifdef OBJ_ELF
+ fixp->fx_addnumber = value;
+#else
+ if (fixp->fx_r_type != BFD_RELOC_PPC_TOC16)
+ fixp->fx_addnumber = 0;
+ else
+ {
+#ifdef TE_PE
+ fixp->fx_addnumber = 0;
+#else
+ /* We want to use the offset within the data segment of the
+ symbol, not the actual VMA of the symbol. */
+ fixp->fx_addnumber =
+ - bfd_get_section_vma (stdoutput, S_GET_SEGMENT (fixp->fx_addsy));
+#endif
+ }
+#endif
+
+ return 1;
+}
+
+/* Generate a reloc for a fixup. */
+
+arelent *
+tc_gen_reloc (seg, 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);
+ if (reloc->howto == (reloc_howto_type *) NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("reloc %d not supported by object file format"), (int)fixp->fx_r_type);
+ return NULL;
+ }
+ reloc->addend = fixp->fx_addnumber;
+
+ return reloc;
+}
diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h
new file mode 100644
index 0000000..783a215
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-ppc.h
@@ -0,0 +1,289 @@
+/* tc-ppc.h -- Header file for tc-ppc.c.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support.
+
+ 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. */
+
+#define TC_PPC
+
+#ifdef ANSI_PROTOTYPES
+struct fix;
+#endif
+
+/* Set the endianness we are using. Default to big endian. */
+#ifndef TARGET_BYTES_BIG_ENDIAN
+#define TARGET_BYTES_BIG_ENDIAN 1
+#endif
+
+#ifndef BFD_ASSEMBLER
+ #error PowerPC support requires BFD_ASSEMBLER
+#endif
+
+/* If OBJ_COFF is defined, and TE_PE is not defined, we are assembling
+ XCOFF for AIX or PowerMac. If TE_PE is defined, we are assembling
+ COFF for Windows NT. */
+
+#ifdef OBJ_COFF
+#ifndef TE_PE
+#define OBJ_XCOFF
+#endif
+#endif
+
+/* The target BFD architecture. */
+#define TARGET_ARCH (ppc_arch ())
+extern enum bfd_architecture ppc_arch 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
+
+/* Permit temporary numeric labels. */
+#define LOCAL_LABELS_FB 1
+
+/* $ is used to refer to the current location. */
+#define DOLLAR_DOT
+
+/* Strings do not use backslash escapes under COFF. */
+#ifdef OBJ_COFF
+#define NO_STRING_ESCAPES
+#endif
+
+#ifdef OBJ_ELF
+#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
+#endif
+
+#if TARGET_BYTES_BIG_ENDIAN
+#define PPC_BIG_ENDIAN 1
+#else
+#define PPC_BIG_ENDIAN 0
+#endif
+
+/* We don't need to handle .word strangely. */
+#define WORKING_DOT_WORD
+
+/* We set the fx_done field appropriately in md_apply_fix. */
+#define TC_HANDLES_FX_DONE
+
+#ifdef TE_PE
+
+/* Question marks are permitted in symbol names. */
+#define LEX_QM 1
+
+/* Don't adjust TOC relocs. */
+#define tc_fix_adjustable(fixp) ppc_pe_fix_adjustable (fixp)
+extern int ppc_pe_fix_adjustable PARAMS ((struct fix *));
+
+#endif
+
+#ifdef OBJ_XCOFF
+
+/* Declarations needed when generating XCOFF code. XCOFF is an
+ extension of COFF, used only on the RS/6000. Rather than create an
+ obj-xcoff, we just use obj-coff, and handle the extensions here in
+ tc-ppc. */
+
+/* We need to keep some information for symbols. */
+struct ppc_tc_sy
+{
+ /* We keep a few linked lists of symbols. */
+ symbolS *next;
+ /* Non-zero if the symbol should be output. The RS/6000 assembler
+ only outputs symbols that are external or are mentioned in a
+ .globl or .lglobl statement. */
+ int output;
+ /* The symbol class. */
+ int class;
+ /* The real name, if the symbol was renamed. */
+ char *real_name;
+ /* For a csect symbol, the subsegment we are using. This is zero
+ for symbols that are not csects. */
+ subsegT subseg;
+ /* For a csect or common symbol, the alignment to use. */
+ int align;
+ /* For a function symbol, a symbol whose value is the size. The
+ field is NULL if there is no size. */
+ symbolS *size;
+ /* For a csect symbol, the last symbol which has been defined in
+ this csect, or NULL if none have been defined so far. For a .bs
+ symbol, the referenced csect symbol. */
+ symbolS *within;
+};
+
+#define TC_SYMFIELD_TYPE struct ppc_tc_sy
+
+/* We need an additional auxent for function symbols. */
+#define OBJ_COFF_MAX_AUXENTRIES 2
+
+/* Square and curly brackets are permitted in symbol names. */
+#define LEX_BR 3
+
+/* Canonicalize the symbol name. */
+#define tc_canonicalize_symbol_name(name) ppc_canonicalize_symbol_name (name)
+extern char *ppc_canonicalize_symbol_name PARAMS ((char *));
+
+/* Get the symbol class from the name. */
+#define tc_symbol_new_hook(sym) ppc_symbol_new_hook (sym)
+extern void ppc_symbol_new_hook PARAMS ((symbolS *));
+
+/* Set the symbol class of a label based on the csect. */
+#define tc_frob_label(sym) ppc_frob_label (sym)
+extern void ppc_frob_label PARAMS ((symbolS *));
+
+/* TOC relocs requires special handling. */
+#define tc_fix_adjustable(fixp) ppc_fix_adjustable (fixp)
+extern int ppc_fix_adjustable PARAMS ((struct fix *));
+
+/* A relocation from one csect to another must be kept. */
+#define TC_FORCE_RELOCATION(FIXP) ppc_force_relocation (FIXP)
+extern int ppc_force_relocation PARAMS ((struct fix *));
+
+/* We need to set the section VMA. */
+#define tc_frob_section(sec) ppc_frob_section (sec)
+extern void ppc_frob_section PARAMS ((asection *));
+
+/* Finish up the symbol. */
+#define tc_frob_symbol(sym, punt) punt = ppc_frob_symbol (sym)
+extern int ppc_frob_symbol PARAMS ((symbolS *));
+
+/* Finish up the entire symtab. */
+#define tc_adjust_symtab() ppc_adjust_symtab ()
+extern void ppc_adjust_symtab PARAMS ((void));
+
+/* Niclas Andersson <nican@ida.liu.se> says this is needed. */
+#define SUB_SEGMENT_ALIGN(SEG) 2
+
+/* We also need to copy, in particular, the class of the symbol,
+ over what obj-coff would otherwise have copied. */
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \
+do { \
+ if (SF_GET_GET_SEGMENT (dest)) \
+ S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \
+ symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \
+ symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \
+ symbol_get_tc (dest)->class = symbol_get_tc (src)->class; \
+ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \
+} while (0)
+
+
+#endif /* OBJ_XCOFF */
+
+#ifdef OBJ_ELF
+
+/* Branch prediction relocations must force relocation, as must
+ the vtable description relocs. */
+#define TC_FORCE_RELOCATION(FIXP) \
+((FIXP)->fx_r_type == BFD_RELOC_PPC_B16_BRTAKEN \
+ || (FIXP)->fx_r_type == BFD_RELOC_PPC_B16_BRNTAKEN \
+ || (FIXP)->fx_r_type == BFD_RELOC_PPC_BA16_BRTAKEN \
+ || (FIXP)->fx_r_type == BFD_RELOC_PPC_BA16_BRNTAKEN \
+ || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \
+ || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+
+#define TC_FORCE_RELOCATION_SECTION(FIXP,SEC) \
+(TC_FORCE_RELOCATION (FIXP) \
+ || ((FIXP)->fx_addsy && !(FIXP)->fx_subsy \
+ && S_GET_SEGMENT ((FIXP)->fx_addsy) != SEC))
+
+/* Support for SHF_EXCLUDE and SHT_ORDERED */
+extern int ppc_section_letter PARAMS ((int, char **));
+extern int ppc_section_type PARAMS ((char *, size_t));
+extern int ppc_section_word PARAMS ((char *, size_t));
+extern int ppc_section_flags PARAMS ((int, int, int));
+
+#define md_elf_section_letter(LETTER, PTR_MSG) ppc_section_letter (LETTER, PTR_MSG)
+#define md_elf_section_type(STR, LEN) ppc_section_type (STR, LEN)
+#define md_elf_section_word(STR, LEN) ppc_section_word (STR, LEN)
+#define md_elf_section_flags(FLAGS, ATTR, TYPE) ppc_section_flags (FLAGS, ATTR, TYPE)
+
+/* Add extra PPC sections -- Note, for now, make .sbss2 and .PPC.EMB.sbss0 a
+ normal section, and not a bss section so that the linker doesn't crater
+ when trying to make more than 2 sections. */
+#define ELF_TC_SPECIAL_SECTIONS \
+ { ".tags", SHT_ORDERED, SHF_ALLOC }, \
+ { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \
+ { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, \
+ { ".sdata2", SHT_PROGBITS, SHF_ALLOC }, \
+ { ".sbss2", SHT_PROGBITS, SHF_ALLOC }, \
+ { ".PPC.EMB.sdata0", SHT_PROGBITS, SHF_ALLOC }, \
+ { ".PPC.EMB.sbss0", SHT_PROGBITS, SHF_ALLOC },
+
+#define tc_comment_chars ppc_comment_chars
+extern const char *ppc_comment_chars;
+
+/* 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 \
+ && (FIX)->fx_r_type != BFD_RELOC_HI16_GOTOFF \
+ && (FIX)->fx_r_type != BFD_RELOC_HI16_S_GOTOFF \
+ && (FIX)->fx_r_type != BFD_RELOC_GPREL16 \
+ && (FIX)->fx_r_type != BFD_RELOC_VTABLE_INHERIT \
+ && (FIX)->fx_r_type != BFD_RELOC_VTABLE_ENTRY \
+ && ! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && ((FIX)->fx_pcrel \
+ || ((FIX)->fx_subsy != NULL \
+ && (S_GET_SEGMENT ((FIX)->fx_subsy) \
+ == S_GET_SEGMENT ((FIX)->fx_addsy))) \
+ || S_IS_LOCAL ((FIX)->fx_addsy)))
+
+/* We must never ever try to resolve references to externally visible
+ symbols in the assembler, because the .o file might go into a shared
+ library, and some other shared library might override that symbol. */
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy)))
+
+#endif /* OBJ_ELF */
+
+/* call md_apply_fix3 with segment instead of md_apply_fix */
+#define MD_APPLY_FIX3
+
+/* call md_pcrel_from_section, not md_pcrel_from */
+#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
+extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
+
+#define md_parse_name(name, exp) ppc_parse_name (name, exp)
+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 18d6572..149610e 100644
--- a/contrib/binutils/gas/config/tc-sparc.c
+++ b/contrib/binutils/gas/config/tc-sparc.c
@@ -1,5 +1,5 @@
/* tc-sparc.c -- Assemble for the SPARC
- Copyright (C) 1989, 90-96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1989, 90-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
@@ -31,11 +31,14 @@
static struct sparc_arch *lookup_arch PARAMS ((char *));
static void init_default_arch PARAMS ((void));
-static void sparc_ip PARAMS ((char *, const struct sparc_opcode **));
+static int sparc_ip PARAMS ((char *, const struct sparc_opcode **));
static int in_signed_range PARAMS ((bfd_signed_vma, bfd_signed_vma));
static int in_unsigned_range PARAMS ((bfd_vma, bfd_vma));
static int in_bitfield_range PARAMS ((bfd_signed_vma, bfd_signed_vma));
static int sparc_ffs PARAMS ((unsigned int));
+static void synthetize_setuw PARAMS ((const struct sparc_opcode *));
+static void synthetize_setsw PARAMS ((const struct sparc_opcode *));
+static void synthetize_setx PARAMS ((const struct sparc_opcode *));
static bfd_vma BSR PARAMS ((bfd_vma, int));
static int cmp_reg_entry PARAMS ((const PTR, const PTR));
static int parse_keyword_arg PARAMS ((int (*) (const char *), char **, int *));
@@ -84,6 +87,10 @@ static int warn_on_bump;
architecture, issue a warning. */
static enum sparc_opcode_arch_val warn_after_architecture;
+/* Non-zero if as should generate error if an undeclared g[23] register
+ has been used in -64. */
+static int no_undeclared_regs;
+
/* Non-zero if we are generating PIC code. */
int sparc_pic_code;
@@ -92,16 +99,25 @@ static int enforce_aligned_data;
extern int target_big_endian;
-/* V9 has big and little endian data, but instructions are always big endian.
- The sparclet has bi-endian support but both data and insns have the same
- endianness. Global `target_big_endian' is used for data. The following
- macro is used for instructions. */
+static int target_little_endian_data;
+
+/* Symbols for global registers on v9. */
+static symbolS *globals[8];
+
+/* V9 and 86x have big and little endian data, but instructions are always big
+ endian. The sparclet has bi-endian support but both data and insns have
+ the same endianness. Global `target_big_endian' is used for data.
+ The following macro is used for instructions. */
+#ifndef INSN_BIG_ENDIAN
#define INSN_BIG_ENDIAN (target_big_endian \
+ || default_arch_type == sparc86x \
|| SPARC_OPCODE_ARCH_V9_P (max_architecture))
+#endif
/* handle of the OPCODE hash table */
static struct hash_control *op_hash;
+static int log2 PARAMS ((int));
static void s_data1 PARAMS ((void));
static void s_seg PARAMS ((int));
static void s_proc PARAMS ((int));
@@ -109,6 +125,8 @@ static void s_reserve PARAMS ((int));
static void s_common PARAMS ((int));
static void s_empty PARAMS ((int));
static void s_uacons PARAMS ((int));
+static void s_ncons PARAMS ((int));
+static void s_register PARAMS ((int));
const pseudo_typeS md_pseudo_table[] =
{
@@ -117,6 +135,7 @@ const pseudo_typeS md_pseudo_table[] =
{"empty", s_empty, 0},
{"global", s_globl, 0},
{"half", cons, 2},
+ {"nword", s_ncons, 0},
{"optim", s_ignore, 0},
{"proc", s_proc, 0},
{"reserve", s_reserve, 0},
@@ -129,11 +148,10 @@ const pseudo_typeS md_pseudo_table[] =
{"uaxword", s_uacons, 8},
#ifdef OBJ_ELF
/* these are specific to sparc/svr4 */
- {"pushsection", obj_elf_section, 0},
- {"popsection", obj_elf_previous, 0},
{"2byte", s_uacons, 2},
{"4byte", s_uacons, 4},
{"8byte", s_uacons, 8},
+ {"register", s_register, 0},
#endif
{NULL, 0, 0},
};
@@ -168,9 +186,7 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
changed in read.c. Ideally it shouldn't have to know about it at all,
but nothing is ideal around here. */
-static unsigned char octal[256];
-#define isoctal(c) octal[(unsigned char) (c)]
-static unsigned char toHex[256];
+#define isoctal(c) ((unsigned)((c) - '0') < '8')
struct sparc_it
{
@@ -178,6 +194,7 @@ struct sparc_it
unsigned long opcode;
struct nlist *nlistp;
expressionS exp;
+ expressionS exp2;
int pcrel;
bfd_reloc_code_real_type reloc;
};
@@ -192,30 +209,38 @@ static void output_insn
for this use. That table is for opcodes only. This table is for opcodes
and file formats. */
+enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus,
+ v8plusa, v9, v9a, v9_64};
+
static struct sparc_arch {
char *name;
char *opcode_arch;
+ enum sparc_arch_types arch_type;
/* Default word size, as specified during configuration.
A value of zero means can't be used to specify default architecture. */
int default_arch_size;
/* Allowable arg to -A? */
int user_option_p;
} sparc_arch_table[] = {
- { "v6", "v6", 0, 1 },
- { "v7", "v7", 0, 1 },
- { "v8", "v8", 32, 1 },
- { "sparclet", "sparclet", 32, 1 },
- { "sparclite", "sparclite", 32, 1 },
- { "v8plus", "v9", 0, 1 },
- { "v8plusa", "v9a", 0, 1 },
- { "v9", "v9", 0, 1 },
- { "v9a", "v9a", 0, 1 },
+ { "v6", "v6", v6, 0, 1 },
+ { "v7", "v7", v7, 0, 1 },
+ { "v8", "v8", v8, 32, 1 },
+ { "sparclet", "sparclet", sparclet, 32, 1 },
+ { "sparclite", "sparclite", sparclite, 32, 1 },
+ { "sparc86x", "sparclite", sparc86x, 32, 1 },
+ { "v8plus", "v9", v9, 0, 1 },
+ { "v8plusa", "v9a", v9, 0, 1 },
+ { "v9", "v9", v9, 0, 1 },
+ { "v9a", "v9a", 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", 64, 0 },
- { NULL, NULL, 0 }
+ { "v9-64", "v9", v9, 64, 0 },
+ { NULL, NULL, v8, 0, 0 }
};
+/* Variant of default_arch */
+static enum sparc_arch_types default_arch_type;
+
static struct sparc_arch *
lookup_arch (name)
char *name;
@@ -240,13 +265,14 @@ init_default_arch ()
if (sa == NULL
|| sa->default_arch_size == 0)
- as_fatal ("Invalid default architecture, broken assembler.");
+ as_fatal (_("Invalid default architecture, broken assembler."));
max_architecture = sparc_opcode_lookup_arch (sa->opcode_arch);
if (max_architecture == SPARC_OPCODE_ARCH_BAD)
- as_fatal ("Bad opcode table, broken assembler.");
+ as_fatal (_("Bad opcode table, broken assembler."));
default_arch_size = sparc_arch_size = sa->default_arch_size;
default_init_p = 1;
+ default_arch_type = sa->arch_type;
}
/* Called by TARGET_FORMAT. */
@@ -264,7 +290,11 @@ sparc_target_format ()
return "a.out-sparc-netbsd";
#else
#ifdef TE_SPARCAOUT
- return target_big_endian ? "a.out-sunos-big" : "a.out-sparc-little";
+ if (target_big_endian)
+ 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-sunos-big";
#endif
@@ -377,6 +407,14 @@ struct option md_longopts[] = {
#endif
#define OPTION_ENFORCE_ALIGNED_DATA (OPTION_MD_BASE + 10)
{"enforce-aligned-data", no_argument, NULL, OPTION_ENFORCE_ALIGNED_DATA},
+#define OPTION_LITTLE_ENDIAN_DATA (OPTION_MD_BASE + 11)
+ {"little-endian-data", no_argument, NULL, OPTION_LITTLE_ENDIAN_DATA},
+#ifdef OBJ_ELF
+#define OPTION_NO_UNDECLARED_REGS (OPTION_MD_BASE + 12)
+ {"no-undeclared-regs", no_argument, NULL, OPTION_NO_UNDECLARED_REGS},
+#define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13)
+ {"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS},
+#endif
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof(md_longopts);
@@ -403,7 +441,7 @@ md_parse_option (c, arg)
if (strcmp (arg, "v8plus") != 0
&& strcmp (arg, "v8plusa") != 0)
{
- as_bad ("invalid architecture -xarch=%s", arg);
+ as_bad (_("invalid architecture -xarch=%s"), arg);
return 0;
}
@@ -418,13 +456,13 @@ md_parse_option (c, arg)
if (sa == NULL
|| ! sa->user_option_p)
{
- as_bad ("invalid architecture -A%s", arg);
+ as_bad (_("invalid architecture -A%s"), arg);
return 0;
}
opcode_arch = sparc_opcode_lookup_arch (sa->opcode_arch);
if (opcode_arch == SPARC_OPCODE_ARCH_BAD)
- as_fatal ("Bad opcode table, broken assembler.");
+ as_fatal (_("Bad opcode table, broken assembler."));
max_architecture = opcode_arch;
architecture_requested = 1;
@@ -442,6 +480,15 @@ md_parse_option (c, arg)
#ifdef SPARC_BIENDIAN
case OPTION_LITTLE_ENDIAN:
target_big_endian = 0;
+ if (default_arch_type != sparclet)
+ as_fatal ("This target does not support -EL");
+ break;
+ case OPTION_LITTLE_ENDIAN_DATA:
+ target_little_endian_data = 1;
+ target_big_endian = 0;
+ if (default_arch_type != sparc86x
+ && default_arch_type != v9)
+ as_fatal ("This target does not support --little-endian-data");
break;
case OPTION_BIG_ENDIAN:
target_big_endian = 1;
@@ -476,7 +523,7 @@ md_parse_option (c, arg)
}
}
if (*l == NULL)
- as_fatal ("No compiled in support for %d bit object file format",
+ as_fatal (_("No compiled in support for %d bit object file format"),
sparc_arch_size);
free (list);
}
@@ -513,10 +560,18 @@ md_parse_option (c, arg)
case 'K':
if (strcmp (arg, "PIC") != 0)
- as_warn ("Unrecognized option following -K");
+ as_warn (_("Unrecognized option following -K"));
else
sparc_pic_code = 1;
break;
+
+ case OPTION_NO_UNDECLARED_REGS:
+ no_undeclared_regs = 1;
+ break;
+
+ case OPTION_UNDECLARED_REGS:
+ no_undeclared_regs = 0;
+ break;
#endif
default:
@@ -537,7 +592,7 @@ md_show_usage (stream)
if (! default_init_p)
init_default_arch ();
- fprintf(stream, "SPARC options:\n");
+ fprintf(stream, _("SPARC options:\n"));
for (arch = &sparc_arch_table[0]; arch->name; arch++)
{
if (arch != &sparc_arch_table[0])
@@ -545,42 +600,69 @@ md_show_usage (stream)
if (arch->user_option_p)
fprintf (stream, "-A%s", arch->name);
}
- fprintf (stream, "\n-xarch=v8plus | -xarch=v8plusa\n");
- fprintf (stream, "\
+ fprintf (stream, _("\n-xarch=v8plus | -xarch=v8plusa\n"));
+ fprintf (stream, _("\
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"));
#ifdef OBJ_AOUT
- fprintf (stream, "\
--k generate PIC\n");
+ fprintf (stream, _("\
+-k generate PIC\n"));
#endif
#ifdef OBJ_ELF
- fprintf (stream, "\
+ fprintf (stream, _("\
-32 create 32 bit object file\n\
--64 create 64 bit object file\n");
- fprintf (stream, "\
- [default is %d]\n", default_arch_size);
- fprintf (stream, "\
+-64 create 64 bit object file\n"));
+ fprintf (stream, _("\
+ [default is %d]\n"), default_arch_size);
+ fprintf (stream, _("\
-TSO use Total Store Ordering\n\
-PSO use Partial Store Ordering\n\
--RMO use Relaxed Memory Ordering\n");
- fprintf (stream, "\
- [default is %s]\n", (default_arch_size == 64) ? "RMO" : "TSO");
- fprintf (stream, "\
+-RMO use Relaxed Memory Ordering\n"));
+ fprintf (stream, _("\
+ [default is %s]\n"), (default_arch_size == 64) ? "RMO" : "TSO");
+ fprintf (stream, _("\
-KPIC generate PIC\n\
-V print assembler version number\n\
+-undeclared-regs ignore application global register usage without\n\
+ appropriate .register directive (default)\n\
+-no-undeclared-regs force error on application global register usage\n\
+ without appropriate .register directive\n\
-q ignored\n\
-Qy, -Qn ignored\n\
--s ignored\n");
+-s ignored\n"));
#endif
#ifdef SPARC_BIENDIAN
- fprintf (stream, "\
+ fprintf (stream, _("\
-EL generate code for a little endian machine\n\
--EB generate code for a big endian machine\n");
+-EB generate code for a big endian machine\n\
+--little-endian-data generate code for a machine having big endian\n\
+ instructions and little endian data.\n"));
#endif
}
+/* native operand size opcode translation */
+struct
+ {
+ char *name;
+ char *name32;
+ char *name64;
+ } native_op_table[] =
+{
+ {"ldn", "ld", "ldx"},
+ {"ldna", "lda", "ldxa"},
+ {"stn", "st", "stx"},
+ {"stna", "sta", "stxa"},
+ {"slln", "sll", "sllx"},
+ {"srln", "srl", "srlx"},
+ {"sran", "sra", "srax"},
+ {"casn", "cas", "casx"},
+ {"casna", "casa", "casxa"},
+ {"clrn", "clr", "clrx"},
+ {NULL, NULL, NULL},
+};
+
/* sparc64 priviledged registers */
struct priv_reg_entry
@@ -661,16 +743,16 @@ md_begin ()
retval = hash_insert (op_hash, name, (PTR) &sparc_opcodes[i]);
if (retval != NULL)
{
- fprintf (stderr, "internal error: can't hash `%s': %s\n",
- sparc_opcodes[i].name, retval);
+ as_bad (_("Internal error: can't hash `%s': %s\n"),
+ sparc_opcodes[i].name, retval);
lose = 1;
}
do
{
if (sparc_opcodes[i].match & sparc_opcodes[i].lose)
{
- fprintf (stderr, "internal error: losing opcode: `%s' \"%s\"\n",
- sparc_opcodes[i].name, sparc_opcodes[i].args);
+ as_bad (_("Internal error: losing opcode: `%s' \"%s\"\n"),
+ sparc_opcodes[i].name, sparc_opcodes[i].args);
lose = 1;
}
++i;
@@ -679,17 +761,32 @@ md_begin ()
&& !strcmp (sparc_opcodes[i].name, name));
}
- if (lose)
- as_fatal ("Broken assembler. No assembly attempted.");
+ 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);
+ if (insn == NULL)
+ {
+ 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);
+ if (retval != NULL)
+ {
+ as_bad (_("Internal error: can't hash `%s': %s\n"),
+ sparc_opcodes[i].name, retval);
+ lose = 1;
+ }
+ }
+ }
- for (i = '0'; i < '8'; ++i)
- octal[i] = 1;
- for (i = '0'; i <= '9'; ++i)
- toHex[i] = i - '0';
- for (i = 'a'; i <= 'f'; ++i)
- toHex[i] = i + 10 - 'a';
- for (i = 'A'; i <= 'F'; ++i)
- toHex[i] = i + 10 - 'A';
+ if (lose)
+ as_fatal (_("Broken assembler. No assembly attempted."));
qsort (priv_reg_table, sizeof (priv_reg_table) / sizeof (priv_reg_table[0]),
sizeof (priv_reg_table[0]), cmp_reg_entry);
@@ -739,6 +836,8 @@ sparc_md_end ()
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
@@ -757,6 +856,13 @@ in_signed_range (val, max)
{
if (max <= 0)
abort ();
+ /* Sign-extend the value from the architecture word size, so that
+ 0xffffffff is always considered -1 on sparc32. */
+ if (sparc_arch_size == 32)
+ {
+ bfd_signed_vma sign = (bfd_signed_vma)1 << 31;
+ val = ((val & 0xffffffff) ^ sign) - sign;
+ }
if (val > max)
return 0;
if (val < ~max)
@@ -812,16 +918,13 @@ BSR (val, amount)
int amount;
{
if (sizeof (bfd_vma) <= 4 && amount >= 32)
- as_fatal ("Support for 64-bit arithmetic not compiled in.");
+ as_fatal (_("Support for 64-bit arithmetic not compiled in."));
return val >> amount;
}
/* For communication between sparc_ip and get_expression. */
static char *expr_end;
-/* For communication between md_assemble and sparc_ip. */
-static int special_case;
-
/* Values for `special_case'.
Instructions that require wierd handling because they're longer than
4 bytes. */
@@ -835,6 +938,7 @@ static int special_case;
/* Bit masks of various insns. */
#define NOP_INSN 0x01000000
#define OR_INSN 0x80100000
+#define XOR_INSN 0x80180000
#define FMOVS_INSN 0x81A00020
#define SETHI_INSN 0x01000000
#define SLLX_INSN 0x81281000
@@ -845,6 +949,281 @@ static const struct sparc_opcode *last_insn;
/* The assembled opcode of `last_insn'. */
static unsigned long last_opcode;
+/* Handle the set and setuw synthetic instructions. */
+static void
+synthetize_setuw (insn)
+ const struct sparc_opcode *insn;
+{
+ int need_hi22_p = 0;
+ int rd = (the_insn.opcode & RD (~0)) >> 25;
+
+ if (the_insn.exp.X_op == O_constant)
+ {
+ if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
+ {
+ 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
+ && (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;
+ }
+ }
+
+ /* See if operand is absolute and small; skip sethi if so. */
+ if (the_insn.exp.X_op != O_constant
+ || the_insn.exp.X_add_number >= (1 << 12)
+ || the_insn.exp.X_add_number < -(1 << 12))
+ {
+ 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.reloc = (the_insn.exp.X_op != O_constant
+ ? BFD_RELOC_HI22
+ : BFD_RELOC_NONE);
+ output_insn (insn, &the_insn);
+ need_hi22_p = 1;
+ }
+
+ /* See if operand has no low-order bits; skip OR if so. */
+ if (the_insn.exp.X_op != O_constant
+ || (need_hi22_p && (the_insn.exp.X_add_number & 0x3FF) != 0)
+ || ! need_hi22_p)
+ {
+ 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.reloc = (the_insn.exp.X_op != O_constant
+ ? 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;
+{
+ int low32, rd, opc;
+
+ rd = (the_insn.opcode & RD (~0)) >> 25;
+
+ if (the_insn.exp.X_op != O_constant)
+ {
+ synthetize_setuw (insn);
+
+ /* Need to sign extend it. */
+ the_insn.opcode = (SRA_INSN | RS1 (rd) | RD (rd));
+ the_insn.reloc = BFD_RELOC_NONE;
+ output_insn (insn, &the_insn);
+ return;
+ }
+
+ 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;
+
+ if (low32 >= 0)
+ {
+ synthetize_setuw (insn);
+ return;
+ }
+
+ opc = OR_INSN;
+
+ the_insn.reloc = BFD_RELOC_NONE;
+ /* See if operand is absolute and small; skip sethi if so. */
+ if (low32 < -(1 << 12))
+ {
+ the_insn.opcode = (SETHI_INSN | RD (rd)
+ | (((~the_insn.exp.X_add_number) >> 10) & 0x3fffff));
+ output_insn (insn, &the_insn);
+ low32 = 0x1c00 | (low32 & 0x3ff);
+ opc = RS1 (rd) | XOR_INSN;
+ }
+
+ the_insn.opcode = (opc | RD (rd) | IMMED
+ | (low32 & 0x1fff));
+ output_insn (insn, &the_insn);
+}
+
+/* Handle the setsw synthetic instruction. */
+static void
+synthetize_setx (insn)
+ const struct sparc_opcode *insn;
+{
+ int upper32, lower32;
+ int tmpreg = (the_insn.opcode & RS1 (~0)) >> 14;
+ int dstreg = (the_insn.opcode & RD (~0)) >> 25;
+ 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));
+#undef SIGNEXT32
+
+ upper_dstreg = tmpreg;
+ /* The tmp reg should not be the dst reg. */
+ if (tmpreg == dstreg)
+ as_warn (_("setx: temporary register same as destination register"));
+
+ /* ??? Obviously there are other optimizations we can do
+ (e.g. sethi+shift for 0x1f0000000) and perhaps we shouldn't be
+ doing some of these. Later. If you do change things, try to
+ change all of this to be table driven as well. */
+ /* What to output depends on the number if it's constant.
+ Compute that first, then output what we've decided upon. */
+ if (the_insn.exp.X_op != O_constant)
+ {
+ if (sparc_arch_size == 32)
+ {
+ /* When arch size is 32, we want setx to be equivalent
+ to setuw for anything but constants. */
+ the_insn.exp.X_add_number &= 0xffffffff;
+ synthetize_setuw (insn);
+ return;
+ }
+ need_hh22_p = need_hm10_p = need_hi22_p = need_lo10_p = 1;
+ lower32 = 0; upper32 = 0;
+ }
+ else
+ {
+ /* Reset X_add_number, we've extracted it as upper32/lower32.
+ 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
+ /* Need lower half if number is zero or 0xffffffff00000000. */
+ || (! need_hh22_p && ! need_hm10_p))
+ {
+ /* No need for sethi if `or' insn can handle constant. */
+ if (lower32 < -(1 << 12) || lower32 >= (1 << 12)
+ /* Note that we can't use a negative constant in the `or'
+ insn unless the upper 32 bits are all ones. */
+ || (lower32 < 0 && upper32 != -1)
+ || (lower32 >= 0 && upper32 == -1))
+ need_hi22_p = 1;
+
+ if (need_hi22_p && upper32 == -1)
+ need_xor10_p = 1;
+
+ /* Does bottom part (after sethi) have bits? */
+ else if ((need_hi22_p && (lower32 & 0x3ff) != 0)
+ /* No sethi. */
+ || (! need_hi22_p && (lower32 & 0x1fff) != 0)
+ /* Need `or' if we didn't set anything else. */
+ || (! need_hi22_p && ! need_hh22_p && ! need_hm10_p))
+ need_lo10_p = 1;
+ }
+ else
+ /* 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"));
+
+ if (need_hh22_p)
+ {
+ the_insn.opcode = (SETHI_INSN | RD (upper_dstreg)
+ | ((upper32 >> 10) & 0x3fffff));
+ the_insn.reloc = (the_insn.exp.X_op != O_constant
+ ? 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));
+ the_insn.reloc = (the_insn.exp.X_op != O_constant
+ ? BFD_RELOC_SPARC_LM22 : BFD_RELOC_NONE);
+ output_insn (insn, &the_insn);
+ }
+
+ if (need_hm10_p)
+ {
+ the_insn.opcode = (OR_INSN
+ | (need_hh22_p ? RS1 (upper_dstreg) : 0)
+ | RD (upper_dstreg)
+ | IMMED
+ | (upper32 & (need_hh22_p ? 0x3ff : 0x1fff)));
+ the_insn.reloc = (the_insn.exp.X_op != O_constant
+ ? 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
+ with the highpart if hi22 isn't needed and the low part is
+ positive. */
+ the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (dstreg) : 0)
+ | RD (dstreg)
+ | IMMED
+ | (lower32 & (need_hi22_p ? 0x3ff : 0x1fff)));
+ the_insn.reloc = (the_insn.exp.X_op != O_constant
+ ? 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)
+ {
+ the_insn.opcode = (SLLX_INSN | RS1 (upper_dstreg) | RD (upper_dstreg)
+ | IMMED | 32);
+ 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)
+ {
+ the_insn.opcode = (XOR_INSN | RS1 (dstreg) | RD (dstreg) | IMMED
+ | 0x1c00 | (lower32 & 0x3ff));
+ the_insn.reloc = BFD_RELOC_NONE;
+ output_insn (insn, &the_insn);
+ }
+
+ /* If we needed to build both upper and lower parts, OR them together. */
+ else if ((need_hh22_p || need_hm10_p) && (need_hi22_p || need_lo10_p))
+ {
+ the_insn.opcode = (OR_INSN | RS1 (dstreg) | RS2 (upper_dstreg)
+ | RD (dstreg));
+ the_insn.reloc = BFD_RELOC_NONE;
+ output_insn (insn, &the_insn);
+ }
+}
+
/* Main entry point to assemble one instruction. */
void
@@ -852,10 +1231,10 @@ md_assemble (str)
char *str;
{
const struct sparc_opcode *insn;
+ int special_case;
know (str);
- special_case = SPECIAL_CASE_NONE;
- sparc_ip (str, &insn);
+ special_case = sparc_ip (str, &insn);
/* We warn about attempts to put a floating point branch in a delay slot,
unless the delay slot has been annulled. */
@@ -867,7 +1246,7 @@ md_assemble (str)
F_{UNBR,CONDBR,FBR} set is annullable. */
&& ((last_insn->flags & (F_UNBR | F_CONDBR | F_FBR)) == 0
|| (last_opcode & ANNUL) == 0))
- as_warn ("FP branch in delay slot");
+ as_warn (_("FP branch in delay slot"));
/* SPARC before v9 requires a nop instruction between a floating
point instruction and a floating point branch. We insert one
@@ -883,7 +1262,7 @@ md_assemble (str)
nop_insn.opcode = NOP_INSN;
nop_insn.reloc = BFD_RELOC_NONE;
output_insn (insn, &nop_insn);
- as_warn ("FP branch preceded by FP instruction; NOP inserted");
+ as_warn (_("FP branch preceded by FP instruction; NOP inserted"));
}
switch (special_case)
@@ -893,202 +1272,24 @@ md_assemble (str)
output_insn (insn, &the_insn);
break;
- case SPECIAL_CASE_SET:
- {
- int need_hi22_p = 0;
-
- /* "set" is not defined for negative numbers in v9: it doesn't yield
- what you expect it to. */
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture)
- && the_insn.exp.X_op == O_constant)
- {
- if (the_insn.exp.X_add_number < 0)
- as_warn ("set: used with negative number");
- else if (the_insn.exp.X_add_number > (offsetT) 0xffffffff)
- as_warn ("set: number larger than 4294967295");
- }
-
- /* See if operand is absolute and small; skip sethi if so. */
- if (the_insn.exp.X_op != O_constant
- || the_insn.exp.X_add_number >= (1 << 12)
- || the_insn.exp.X_add_number < -(1 << 12))
- {
- output_insn (insn, &the_insn);
- need_hi22_p = 1;
- }
- /* See if operand has no low-order bits; skip OR if so. */
- if (the_insn.exp.X_op != O_constant
- || (need_hi22_p && (the_insn.exp.X_add_number & 0x3FF) != 0)
- || ! need_hi22_p)
- {
- int rd = (the_insn.opcode & RD (~0)) >> 25;
- the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (rd) : 0)
- | RD (rd)
- | IMMED
- | (the_insn.exp.X_add_number
- & (need_hi22_p ? 0x3ff : 0x1fff)));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_LO10
- : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
- break;
- }
-
case SPECIAL_CASE_SETSW:
- {
- /* FIXME: Not finished. */
- break;
- }
+ synthetize_setsw (insn);
+ break;
+
+ case SPECIAL_CASE_SET:
+ synthetize_setuw (insn);
+ break;
case SPECIAL_CASE_SETX:
- {
-#define SIGNEXT32(x) ((((x) & 0xffffffff) ^ 0x80000000) - 0x80000000)
- int upper32 = SIGNEXT32 (BSR (the_insn.exp.X_add_number, 32));
- int lower32 = SIGNEXT32 (the_insn.exp.X_add_number);
-#undef SIGNEXT32
- int tmpreg = (the_insn.opcode & RS1 (~0)) >> 14;
- int dstreg = (the_insn.opcode & RD (~0)) >> 25;
- /* Output directly to dst reg if lower 32 bits are all zero. */
- int upper_dstreg = (the_insn.exp.X_op == O_constant
- && lower32 == 0) ? dstreg : tmpreg;
- int need_hh22_p = 0, need_hm10_p = 0, need_hi22_p = 0, need_lo10_p = 0;
-
- /* The tmp reg should not be the dst reg. */
- if (tmpreg == dstreg)
- as_warn ("setx: temporary register same as destination register");
-
- /* Reset X_add_number, we've extracted it as upper32/lower32.
- 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;
-
- /* ??? Obviously there are other optimizations we can do
- (e.g. sethi+shift for 0x1f0000000) and perhaps we shouldn't be
- doing some of these. Later. If you do change things, try to
- change all of this to be table driven as well. */
-
- /* What to output depends on the number if it's constant.
- Compute that first, then output what we've decided upon. */
- if (the_insn.exp.X_op != O_constant)
- need_hh22_p = need_hm10_p = need_hi22_p = need_lo10_p = 1;
- else
- {
- /* 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 || lower32 >= 0)))
- need_hm10_p = 1;
-
- /* If the lower half is all zero, we build the upper half directly
- into the dst reg. */
- if (lower32 != 0
- /* Need lower half if number is zero. */
- || (! need_hh22_p && ! need_hm10_p))
- {
- /* No need for sethi if `or' insn can handle constant. */
- if (lower32 < -(1 << 12) || lower32 >= (1 << 12)
- /* Note that we can't use a negative constant in the `or'
- insn unless the upper 32 bits are all ones. */
- || (lower32 < 0 && upper32 != -1))
- need_hi22_p = 1;
-
- /* Does bottom part (after sethi) have bits? */
- if ((need_hi22_p && (lower32 & 0x3ff) != 0)
- /* No sethi. */
- || (! need_hi22_p && (lower32 & 0x1fff) != 0)
- /* Need `or' if we didn't set anything else. */
- || (! need_hi22_p && ! need_hh22_p && ! need_hm10_p))
- need_lo10_p = 1;
- }
- }
-
- if (need_hh22_p)
- {
- the_insn.opcode = (SETHI_INSN | RD (upper_dstreg)
- | ((upper32 >> 10) & 0x3fffff));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_SPARC_HH22 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-
- if (need_hm10_p)
- {
- the_insn.opcode = (OR_INSN
- | (need_hh22_p ? RS1 (upper_dstreg) : 0)
- | RD (upper_dstreg)
- | IMMED
- | (upper32
- & (need_hh22_p ? 0x3ff : 0x1fff)));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_SPARC_HM10 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-
- if (need_hi22_p)
- {
- the_insn.opcode = (SETHI_INSN | RD (dstreg)
- | ((lower32 >> 10) & 0x3fffff));
- the_insn.reloc = BFD_RELOC_HI22;
- output_insn (insn, &the_insn);
- }
-
- if (need_lo10_p)
- {
- /* FIXME: One nice optimization to do here is to OR the low part
- with the highpart if hi22 isn't needed and the low part is
- positive. */
- the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (dstreg) : 0)
- | RD (dstreg)
- | IMMED
- | (lower32
- & (need_hi22_p ? 0x3ff : 0x1fff)));
- the_insn.reloc = BFD_RELOC_LO10;
- output_insn (insn, &the_insn);
- }
-
- /* If we needed to build the upper part, shift it into place. */
- if (need_hh22_p || need_hm10_p)
- {
- the_insn.opcode = (SLLX_INSN | RS1 (upper_dstreg) | RD (upper_dstreg)
- | IMMED | 32);
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- }
-
- /* If we needed to build both upper and lower parts, OR them together. */
- if ((need_hh22_p || need_hm10_p)
- && (need_hi22_p || need_lo10_p))
- {
- the_insn.opcode = (OR_INSN | RS1 (dstreg) | RS2 (upper_dstreg)
- | RD (dstreg));
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- }
- /* We didn't need both regs, but we may have to sign extend lower32. */
- else if (need_hi22_p && upper32 == -1)
- {
- the_insn.opcode = (SRA_INSN | RS1 (dstreg) | RD (dstreg)
- | IMMED | 0);
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- }
- break;
- }
-
+ 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
@@ -1097,17 +1298,17 @@ md_assemble (str)
assert (the_insn.reloc == BFD_RELOC_NONE);
the_insn.opcode = FMOVS_INSN | rd | RD (rd);
output_insn (insn, &the_insn);
- break;
+ return;
}
-
+
default:
- as_fatal ("failed special case insn sanity check");
+ as_fatal (_("failed special case insn sanity check"));
}
}
/* Subroutine of md_assemble to do the actual parsing. */
-static void
+static int
sparc_ip (str, pinsn)
char *str;
const struct sparc_opcode **pinsn;
@@ -1123,9 +1324,15 @@ sparc_ip (str, pinsn)
int match = 0;
int comma = 0;
int v9_arg_p;
+ int special_case = SPECIAL_CASE_NONE;
- for (s = str; islower ((unsigned char) *s) || (*s >= '0' && *s <= '3'); ++s)
- ;
+ s = str;
+ if (islower ((unsigned char) *s))
+ {
+ do
+ ++s;
+ while (islower ((unsigned char) *s) || isdigit ((unsigned char) *s));
+ }
switch (*s)
{
@@ -1142,14 +1349,14 @@ sparc_ip (str, pinsn)
break;
default:
- as_fatal ("Unknown opcode: `%s'", str);
+ as_fatal (_("Unknown opcode: `%s'"), str);
}
insn = (struct sparc_opcode *) hash_find (op_hash, str);
*pinsn = insn;
if (insn == NULL)
{
- as_bad ("Unknown opcode: `%s'", str);
- return;
+ as_bad (_("Unknown opcode: `%s'"), str);
+ return special_case;
}
if (comma)
{
@@ -1186,7 +1393,7 @@ sparc_ip (str, pinsn)
if (! parse_keyword_arg (sparc_encode_membar, &s,
&mask))
{
- error_message = ": invalid membar mask name";
+ error_message = _(": invalid membar mask name");
goto error;
}
kmask |= mask;
@@ -1200,12 +1407,12 @@ sparc_ip (str, pinsn)
{
if (! parse_const_expr_arg (&s, &kmask))
{
- error_message = ": invalid membar mask expression";
+ error_message = _(": invalid membar mask expression");
goto error;
}
if (kmask < 0 || kmask > 127)
{
- error_message = ": invalid membar mask number";
+ error_message = _(": invalid membar mask number");
goto error;
}
}
@@ -1223,7 +1430,7 @@ sparc_ip (str, pinsn)
{
if (! parse_keyword_arg (sparc_encode_prefetch, &s, &fcn))
{
- error_message = ": invalid prefetch function name";
+ error_message = _(": invalid prefetch function name");
goto error;
}
}
@@ -1231,12 +1438,12 @@ sparc_ip (str, pinsn)
{
if (! parse_const_expr_arg (&s, &fcn))
{
- error_message = ": invalid prefetch function expression";
+ error_message = _(": invalid prefetch function expression");
goto error;
}
if (fcn < 0 || fcn > 31)
{
- error_message = ": invalid prefetch function number";
+ error_message = _(": invalid prefetch function number");
goto error;
}
}
@@ -1264,7 +1471,7 @@ sparc_ip (str, pinsn)
}
if (p->name[0] != s[0])
{
- error_message = ": unrecognizable privileged register";
+ error_message = _(": unrecognizable privileged register");
goto error;
}
if (*args == '?')
@@ -1276,7 +1483,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": unrecognizable privileged register";
+ error_message = _(": unrecognizable privileged register");
goto error;
}
@@ -1300,12 +1507,12 @@ sparc_ip (str, pinsn)
}
if (p->name[0] != s[0])
{
- error_message = ": unrecognizable v9a ancillary state register";
+ error_message = _(": unrecognizable v9a ancillary state register");
goto error;
}
if (*args == '/' && (p->regnum == 20 || p->regnum == 21))
{
- error_message = ": rd on write only ancillary state register";
+ error_message = _(": rd on write only ancillary state register");
goto error;
}
if (*args == '/')
@@ -1317,7 +1524,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": unrecognizable v9a ancillary state register";
+ error_message = _(": unrecognizable v9a ancillary state register");
goto error;
}
@@ -1341,7 +1548,7 @@ sparc_ip (str, pinsn)
{
if (num < 16 || 31 < num)
{
- error_message = ": asr number must be between 16 and 31";
+ error_message = _(": asr number must be between 16 and 31");
goto error;
}
}
@@ -1349,7 +1556,7 @@ sparc_ip (str, pinsn)
{
if (num < 0 || 31 < num)
{
- error_message = ": asr number must be between 0 and 31";
+ error_message = _(": asr number must be between 0 and 31");
goto error;
}
}
@@ -1359,7 +1566,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": expecting %asrN";
+ error_message = _(": expecting %asrN");
goto error;
}
} /* if %asr */
@@ -1608,7 +1815,8 @@ sparc_ip (str, pinsn)
goto error;
case 'g': /* global register */
- if (isoctal (c = *s++))
+ c = *s++;
+ if (isoctal (c))
{
mask = c - '0';
break;
@@ -1616,7 +1824,8 @@ sparc_ip (str, pinsn)
goto error;
case 'i': /* in register */
- if (isoctal (c = *s++))
+ c = *s++;
+ if (isoctal (c))
{
mask = c - '0' + 24;
break;
@@ -1624,7 +1833,8 @@ sparc_ip (str, pinsn)
goto error;
case 'l': /* local register */
- if (isoctal (c = *s++))
+ c = *s++;
+ if (isoctal (c))
{
mask = (c - '0' + 16);
break;
@@ -1632,7 +1842,8 @@ sparc_ip (str, pinsn)
goto error;
case 'o': /* out register */
- if (isoctal (c = *s++))
+ c = *s++;
+ if (isoctal (c))
{
mask = (c - '0' + 8);
break;
@@ -1681,6 +1892,10 @@ sparc_ip (str, pinsn)
goto error;
}
+ if ((mask & ~1) == 2 && sparc_arch_size == 64
+ && no_undeclared_regs && ! globals [mask])
+ as_bad (_("detected global register use not covered by .register pseudo-op"));
+
/* Got the register, now figure out where
it goes in the opcode. */
switch (*args)
@@ -1750,9 +1965,9 @@ sparc_ip (str, pinsn)
if (mask >= 64)
{
if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- error_message = ": There are only 64 f registers; [0-63]";
+ error_message = _(": There are only 64 f registers; [0-63]");
else
- error_message = ": There are only 32 f registers; [0-31]";
+ error_message = _(": There are only 32 f registers; [0-31]");
goto error;
} /* on error */
else if (mask >= 32)
@@ -1764,7 +1979,7 @@ sparc_ip (str, pinsn)
}
else
{
- error_message = ": There are only 32 f registers; [0-31]";
+ error_message = _(": There are only 32 f registers; [0-31]");
goto error;
}
}
@@ -1808,14 +2023,10 @@ sparc_ip (str, pinsn)
}
break;
- case '0': /* 64 bit immediate (setx insn) */
+ case '0': /* 64 bit immediate (set, setsw, setx insn) */
the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */
goto immediate;
- case 'h': /* high 22 bits */
- the_insn.reloc = BFD_RELOC_HI22;
- goto immediate;
-
case 'l': /* 22 bit PC relative immediate */
the_insn.reloc = BFD_RELOC_SPARC_WDISP22;
the_insn.pcrel = 1;
@@ -1826,6 +2037,7 @@ sparc_ip (str, pinsn)
the_insn.pcrel = 1;
goto immediate;
+ case 'h':
case 'n': /* 22 bit immediate */
the_insn.reloc = BFD_RELOC_SPARC22;
goto immediate;
@@ -1839,89 +2051,227 @@ sparc_ip (str, pinsn)
if (*s == ' ')
s++;
- /* Check for %hi, etc. */
- if (*s == '%')
- {
- static struct ops {
- /* The name as it appears in assembler. */
- char *name;
- /* strlen (name), precomputed for speed */
- int len;
- /* The reloc this pseudo-op translates to. */
- int reloc;
- /* Non-zero if for v9 only. */
- int v9_p;
- /* Non-zero if can be used in pc-relative contexts. */
- int pcrel_p;/*FIXME:wip*/
- } ops[] = {
- /* hix/lox must appear before hi/lo so %hix won't be
- mistaken for %hi. */
- { "hix", 3, BFD_RELOC_SPARC_HIX22, 1, 0 },
- { "lox", 3, BFD_RELOC_SPARC_LOX10, 1, 0 },
- { "hi", 2, BFD_RELOC_HI22, 0, 1 },
- { "lo", 2, BFD_RELOC_LO10, 0, 1 },
- { "hh", 2, BFD_RELOC_SPARC_HH22, 1, 1 },
- { "hm", 2, BFD_RELOC_SPARC_HM10, 1, 1 },
- { "lm", 2, BFD_RELOC_SPARC_LM22, 1, 1 },
- { "h44", 3, BFD_RELOC_SPARC_H44, 1, 0 },
- { "m44", 3, BFD_RELOC_SPARC_M44, 1, 0 },
- { "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 }
- };
- struct ops *o;
-
- for (o = ops; o->name; o++)
- if (strncmp (s + 1, o->name, o->len) == 0)
+ {
+ char *s1;
+ char *op_arg = NULL;
+ expressionS op_exp;
+ bfd_reloc_code_real_type old_reloc = the_insn.reloc;
+
+ /* Check for %hi, etc. */
+ if (*s == '%')
+ {
+ static const struct ops {
+ /* The name as it appears in assembler. */
+ char *name;
+ /* strlen (name), precomputed for speed */
+ int len;
+ /* The reloc this pseudo-op translates to. */
+ int reloc;
+ /* Non-zero if for v9 only. */
+ int v9_p;
+ /* Non-zero if can be used in pc-relative contexts. */
+ int pcrel_p;/*FIXME:wip*/
+ } ops[] = {
+ /* hix/lox must appear before hi/lo so %hix won't be
+ mistaken for %hi. */
+ { "hix", 3, BFD_RELOC_SPARC_HIX22, 1, 0 },
+ { "lox", 3, BFD_RELOC_SPARC_LOX10, 1, 0 },
+ { "hi", 2, BFD_RELOC_HI22, 0, 1 },
+ { "lo", 2, BFD_RELOC_LO10, 0, 1 },
+ { "hh", 2, BFD_RELOC_SPARC_HH22, 1, 1 },
+ { "hm", 2, BFD_RELOC_SPARC_HM10, 1, 1 },
+ { "lm", 2, BFD_RELOC_SPARC_LM22, 1, 1 },
+ { "h44", 3, BFD_RELOC_SPARC_H44, 1, 0 },
+ { "m44", 3, BFD_RELOC_SPARC_M44, 1, 0 },
+ { "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 }
+ };
+ 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 (o->name == NULL)
- break;
+
+ if (s[o->len + 1] != '(')
+ {
+ as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name);
+ return special_case;
+ }
- the_insn.reloc = o->reloc;
- s += o->len + 1;
- v9_arg_p = o->v9_p;
- }
+ op_arg = o->name;
+ the_insn.reloc = o->reloc;
+ s += o->len + 2;
+ v9_arg_p = o->v9_p;
+ }
+
+ /* Note that if the get_expression() fails, we will still
+ have created U entries in the symbol table for the
+ 'symbols' in the input string. Try not to create U
+ symbols for registers, etc. */
- /* Note that if the get_expression() fails, we will still
- have created U entries in the symbol table for the
- 'symbols' in the input string. Try not to create U
- symbols for registers, etc. */
- {
/* This stuff checks to see if the expression ends in
+%reg. If it does, it removes the register from
the expression, and re-sets 's' to point to the
right place. */
- char *s1;
+ if (op_arg)
+ {
+ int npar = 0;
+
+ for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
+ if (*s1 == '(')
+ npar++;
+ else if (*s1 == ')')
+ {
+ if (!npar)
+ break;
+ npar--;
+ }
+
+ if (*s1 != ')')
+ {
+ as_bad (_("Illegal operands: %%%s requires arguments in ()"), op_arg);
+ return special_case;
+ }
+
+ *s1 = '\0';
+ (void) get_expression (s);
+ *s1 = ')';
+ s = s1 + 1;
+ if (*s == ',' || *s == ']' || !*s)
+ continue;
+ if (*s != '+' && *s != '-')
+ {
+ as_bad (_("Illegal operands: Can't do arithmetics other than + and - involving %%%s()"), op_arg);
+ return special_case;
+ }
+ *s1 = '0';
+ s = s1;
+ op_exp = the_insn.exp;
+ memset (&the_insn.exp, 0, sizeof(the_insn.exp));
+ }
for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) ;
if (s1 != s && isdigit ((unsigned char) s1[-1]))
{
if (s1[-2] == '%' && s1[-3] == '+')
+ s1 -= 3;
+ else if (strchr ("goli0123456789", s1[-2]) && s1[-3] == '%' && s1[-4] == '+')
+ s1 -= 4;
+ else
+ s1 = NULL;
+ if (s1)
{
- s1 -= 3;
*s1 = '\0';
- (void) get_expression (s);
+ if (op_arg && s1 == s + 1)
+ the_insn.exp.X_op = O_absent;
+ else
+ (void) get_expression (s);
*s1 = '+';
+ if (op_arg)
+ *s = ')';
s = s1;
- continue;
}
- else if (strchr ("goli0123456789", s1[-2]) && s1[-3] == '%' && s1[-4] == '+')
+ }
+ else
+ s1 = NULL;
+
+ if (!s1)
+ {
+ (void) get_expression (s);
+ if (op_arg)
+ *s = ')';
+ s = expr_end;
+ }
+
+ if (op_arg)
+ {
+ the_insn.exp2 = the_insn.exp;
+ the_insn.exp = op_exp;
+ if (the_insn.exp2.X_op == O_absent)
+ the_insn.exp2.X_op = O_illegal;
+ else if (the_insn.exp.X_op == O_absent)
{
- s1 -= 4;
- *s1 = '\0';
- (void) get_expression (s);
- *s1 = '+';
- s = s1;
- continue;
+ the_insn.exp = the_insn.exp2;
+ the_insn.exp2.X_op = O_illegal;
+ }
+ else if (the_insn.exp.X_op == O_constant)
+ {
+ valueT val = the_insn.exp.X_add_number;
+ switch (the_insn.reloc)
+ {
+ default:
+ break;
+
+ case BFD_RELOC_SPARC_HH22:
+ val = BSR (val, 32);
+ /* intentional fallthrough */
+
+ case BFD_RELOC_SPARC_LM22:
+ case BFD_RELOC_HI22:
+ val = (val >> 10) & 0x3fffff;
+ break;
+
+ case BFD_RELOC_SPARC_HM10:
+ val = BSR (val, 32);
+ /* intentional fallthrough */
+
+ case BFD_RELOC_LO10:
+ val &= 0x3ff;
+ break;
+
+ case BFD_RELOC_SPARC_H44:
+ val >>= 22;
+ val &= 0x3fffff;
+ break;
+
+ case BFD_RELOC_SPARC_M44:
+ val >>= 12;
+ val &= 0x3ff;
+ break;
+
+ case BFD_RELOC_SPARC_L44:
+ val &= 0xfff;
+ break;
+
+ case BFD_RELOC_SPARC_HIX22:
+ val = ~ val;
+ val = (val >> 10) & 0x3fffff;
+ break;
+
+ case BFD_RELOC_SPARC_LOX10:
+ val = (val & 0x3ff) | 0x1c00;
+ break;
+ }
+ the_insn.exp = the_insn.exp2;
+ the_insn.exp.X_add_number += val;
+ the_insn.exp2.X_op = O_illegal;
+ the_insn.reloc = old_reloc;
+ }
+ else if (the_insn.exp2.X_op != O_constant)
+ {
+ as_bad (_("Illegal operands: Can't add non-constant expression to %%%s()"), op_arg);
+ return special_case;
+ }
+ else
+ {
+ if (old_reloc != BFD_RELOC_SPARC13
+ || the_insn.reloc != BFD_RELOC_LO10
+ || sparc_arch_size != 64
+ || sparc_pic_code)
+ {
+ as_bad (_("Illegal operands: Can't do arithmetics involving %%%s() of a relocatable symbol"), op_arg);
+ return special_case;
+ }
+ the_insn.reloc = BFD_RELOC_SPARC_OLO10;
}
}
}
- (void) get_expression (s);
- s = expr_end;
-
/* Check for constants that don't require emitting a reloc. */
if (the_insn.exp.X_op == O_constant
&& the_insn.exp.X_add_symbol == 0
@@ -1933,7 +2283,7 @@ sparc_ip (str, pinsn)
&& the_insn.reloc == BFD_RELOC_32_PCREL_S2
&& in_signed_range (the_insn.exp.X_add_number, 0x3fff))
{
- error_message = ": PC-relative operand can't be a constant";
+ error_message = _(": PC-relative operand can't be a constant");
goto error;
}
@@ -1966,7 +2316,7 @@ sparc_ip (str, pinsn)
{
if (! parse_keyword_arg (sparc_encode_asi, &s, &asi))
{
- error_message = ": invalid ASI name";
+ error_message = _(": invalid ASI name");
goto error;
}
}
@@ -1974,12 +2324,12 @@ sparc_ip (str, pinsn)
{
if (! parse_const_expr_arg (&s, &asi))
{
- error_message = ": invalid ASI expression";
+ error_message = _(": invalid ASI expression");
goto error;
}
if (asi < 0 || asi > 255)
{
- error_message = ": invalid ASI number";
+ error_message = _(": invalid ASI number");
goto error;
}
}
@@ -2076,12 +2426,12 @@ sparc_ip (str, pinsn)
{
int n = e.X_add_number;
if (n != e.X_add_number || (n & ~0x1ff) != 0)
- as_bad ("OPF immediate operand out of range (0-0x1ff)");
+ as_bad (_("OPF immediate operand out of range (0-0x1ff)"));
else
opcode |= e.X_add_number << 5;
}
else
- as_bad ("non-immediate OPF operand, ignored");
+ as_bad (_("non-immediate OPF operand, ignored"));
s = input_line_pointer;
input_line_pointer = push;
continue;
@@ -2100,7 +2450,7 @@ sparc_ip (str, pinsn)
int cpreg;
if (! parse_keyword_arg (sparc_encode_sparclet_cpreg, &s, &cpreg))
{
- error_message = ": invalid cpreg name";
+ error_message = _(": invalid cpreg name");
goto error;
}
opcode |= (*args == 'U' ? RS1 (cpreg) : RD (cpreg));
@@ -2108,7 +2458,7 @@ sparc_ip (str, pinsn)
}
default:
- as_fatal ("failed sanity check.");
+ as_fatal (_("failed sanity check."));
} /* switch on arg code */
/* Break out of for() loop. */
@@ -2129,8 +2479,8 @@ sparc_ip (str, pinsn)
}
else
{
- as_bad ("Illegal operands%s", error_message);
- return;
+ as_bad (_("Illegal operands%s"), error_message);
+ return special_case;
}
}
else
@@ -2158,7 +2508,7 @@ sparc_ip (str, pinsn)
if (warn_on_bump
&& needed_architecture > warn_after_architecture)
{
- as_warn ("architecture bumped from \"%s\" to \"%s\" on \"%s\"",
+ as_warn (_("architecture bumped from \"%s\" to \"%s\" on \"%s\""),
sparc_opcode_archs[current_architecture].name,
sparc_opcode_archs[needed_architecture].name,
str);
@@ -2194,11 +2544,11 @@ sparc_ip (str, pinsn)
++arch;
}
- as_bad ("Architecture mismatch on \"%s\".", str);
- as_tsktsk (" (Requires %s; requested architecture is %s.)",
+ as_bad (_("Architecture mismatch on \"%s\"."), str);
+ as_tsktsk (_(" (Requires %s; requested architecture is %s.)"),
required_archs,
sparc_opcode_archs[max_architecture].name);
- return;
+ return special_case;
}
} /* if no match */
@@ -2206,6 +2556,7 @@ sparc_ip (str, pinsn)
} /* forever looking for a match */
the_insn.opcode = opcode;
+ return special_case;
}
/* Parse an argument that can be expressed as a keyword.
@@ -2289,7 +2640,7 @@ get_expression (str)
&& seg != bss_section
&& seg != undefined_section)
{
- the_insn.error = "bad segment";
+ the_insn.error = _("bad segment");
expr_end = input_line_pointer;
input_line_pointer = save_in;
return 1;
@@ -2328,6 +2679,8 @@ output_insn (insn, the_insn)
the insn size is 4 and fixup_segment will signal an overflow for
large 8 byte quantities. */
fixP->fx_no_overflow = 1;
+ if (the_insn->reloc == BFD_RELOC_SPARC_OLO10)
+ fixP->tc_fix_data = the_insn->exp2.X_add_number;
}
last_insn = insn;
@@ -2384,7 +2737,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -2423,7 +2776,11 @@ md_number_to_chars (buf, val, n)
{
if (target_big_endian)
number_to_chars_bigendian (buf, val, n);
- else
+ 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 */
+ number_to_chars_bigendian (buf, val, n);
+ else if (target_little_endian_data || ! target_big_endian)
number_to_chars_littleendian (buf, val, n);
}
@@ -2454,7 +2811,7 @@ md_apply_fix3 (fixP, value, segment)
don't want to include the value of an externally visible symbol. */
if (fixP->fx_addsy != NULL)
{
- if (fixP->fx_addsy->sy_used_in_reloc
+ if (symbol_used_in_reloc_p (fixP->fx_addsy)
&& (S_IS_EXTERNAL (fixP->fx_addsy)
|| S_IS_WEAK (fixP->fx_addsy)
|| (sparc_pic_code && ! fixP->fx_pcrel)
@@ -2499,8 +2856,23 @@ md_apply_fix3 (fixP, value, segment)
&& fixP->fx_r_type != BFD_RELOC_32_PCREL_S2
&& fixP->fx_addsy != NULL
&& ! S_IS_COMMON (fixP->fx_addsy)
- && (fixP->fx_addsy->bsym->flags & BSF_SECTION_SYM) == 0)
+ && symbol_section_p (fixP->fx_addsy))
fixP->fx_addnumber -= 2 * S_GET_VALUE (fixP->fx_addsy);
+
+ /* When generating PIC code, we need to fiddle to get
+ bfd_install_relocation to do the right thing for a PC relative
+ reloc against a local symbol which we are going to keep. */
+ if (sparc_pic_code
+ && fixP->fx_r_type == BFD_RELOC_32_PCREL_S2
+ && fixP->fx_addsy != NULL
+ && (S_IS_EXTERNAL (fixP->fx_addsy)
+ || S_IS_WEAK (fixP->fx_addsy))
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && ! S_IS_COMMON (fixP->fx_addsy))
+ {
+ val = 0;
+ fixP->fx_addnumber -= 2 * S_GET_VALUE (fixP->fx_addsy);
+ }
#endif
/* If this is a data relocation, just output VAL. */
@@ -2509,7 +2881,8 @@ md_apply_fix3 (fixP, value, segment)
{
md_number_to_chars (buf, val, 2);
}
- else if (fixP->fx_r_type == BFD_RELOC_32)
+ else if (fixP->fx_r_type == BFD_RELOC_32
+ || fixP->fx_r_type == BFD_RELOC_SPARC_REV32)
{
md_number_to_chars (buf, val, 4);
}
@@ -2517,6 +2890,12 @@ md_apply_fix3 (fixP, value, segment)
{
md_number_to_chars (buf, val, 8);
}
+ else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ {
+ fixP->fx_done = 0;
+ return 1;
+ }
else
{
/* It's a relocation against an instruction. */
@@ -2534,38 +2913,43 @@ md_apply_fix3 (fixP, value, segment)
being done! */
if (! sparc_pic_code
|| fixP->fx_addsy == NULL
- || (fixP->fx_addsy->bsym->flags & BSF_SECTION_SYM) != 0)
+ || symbol_section_p (fixP->fx_addsy))
++val;
insn |= val & 0x3fffffff;
break;
case BFD_RELOC_SPARC_11:
if (! in_signed_range (val, 0x7ff))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x7ff;
break;
case BFD_RELOC_SPARC_10:
if (! in_signed_range (val, 0x3ff))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x3ff;
break;
case BFD_RELOC_SPARC_7:
if (! in_bitfield_range (val, 0x7f))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x7f;
break;
case BFD_RELOC_SPARC_6:
if (! in_bitfield_range (val, 0x3f))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x3f;
break;
case BFD_RELOC_SPARC_5:
if (! in_bitfield_range (val, 0x1f))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x1f;
break;
@@ -2573,7 +2957,8 @@ md_apply_fix3 (fixP, value, segment)
/* FIXME: simplify */
if (((val > 0) && (val & ~0x3fffc))
|| ((val < 0) && (~(val - 1) & ~0x3fffc)))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
/* FIXME: The +1 deserves a comment. */
val = (val >> 2) + 1;
insn |= ((val & 0xc000) << 6) | (val & 0x3fff);
@@ -2583,7 +2968,8 @@ md_apply_fix3 (fixP, value, segment)
/* FIXME: simplify */
if (((val > 0) && (val & ~0x1ffffc))
|| ((val < 0) && (~(val - 1) & ~0x1ffffc)))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
/* FIXME: The +1 deserves a comment. */
val = (val >> 2) + 1;
insn |= val & 0x7ffff;
@@ -2608,7 +2994,8 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC22:
if (val & ~0x003fffff)
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= (val & 0x3fffff);
break;
@@ -2628,9 +3015,15 @@ md_apply_fix3 (fixP, value, segment)
}
break;
+ case BFD_RELOC_SPARC_OLO10:
+ val &= 0x3ff;
+ val += fixP->tc_fix_data;
+ /* intentional fallthrough */
+
case BFD_RELOC_SPARC13:
if (! in_signed_range (val, 0x1fff))
- as_bad_where (fixP->fx_file, fixP->fx_line, "relocation overflow");
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("relocation overflow"));
insn |= val & 0x1fff;
break;
@@ -2676,7 +3069,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_NONE:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
- "bad or unhandled relocation type: 0x%02x",
+ _("bad or unhandled relocation type: 0x%02x"),
fixP->fx_r_type);
break;
}
@@ -2696,17 +3089,20 @@ md_apply_fix3 (fixP, value, segment)
/* Translate internal representation of relocation info to BFD target
format. */
-arelent *
+arelent **
tc_gen_reloc (section, fixp)
asection *section;
fixS *fixp;
{
+ static arelent *relocs[3];
arelent *reloc;
bfd_reloc_code_real_type code;
- reloc = (arelent *) xmalloc (sizeof (arelent));
+ relocs[0] = reloc = (arelent *) xmalloc (sizeof (arelent));
+ relocs[1] = NULL;
- reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
+ 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;
switch (fixp->fx_r_type)
@@ -2717,6 +3113,7 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_LO10:
case BFD_RELOC_32_PCREL_S2:
case BFD_RELOC_SPARC13:
+ case BFD_RELOC_SPARC22:
case BFD_RELOC_SPARC_BASE13:
case BFD_RELOC_SPARC_WDISP16:
case BFD_RELOC_SPARC_WDISP19:
@@ -2738,6 +3135,10 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_SPARC_L44:
case BFD_RELOC_SPARC_HIX22:
case BFD_RELOC_SPARC_LOX10:
+ case BFD_RELOC_SPARC_REV32:
+ case BFD_RELOC_SPARC_OLO10:
+ case BFD_RELOC_VTABLE_ENTRY:
+ case BFD_RELOC_VTABLE_INHERIT:
code = fixp->fx_r_type;
break;
default:
@@ -2755,6 +3156,8 @@ tc_gen_reloc (section, fixp)
#define GOT_NAME "__GLOBAL_OFFSET_TABLE_"
#endif
+ /* This code must be parallel to the OBJ_ELF tc_fix_adjustable. */
+
if (sparc_pic_code)
{
switch (code)
@@ -2789,13 +3192,18 @@ tc_gen_reloc (section, fixp)
}
#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
- reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
+ if (code == BFD_RELOC_SPARC_OLO10)
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10);
+ else
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
if (reloc->howto == 0)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "internal error: can't export reloc type %d (`%s')",
+ _("internal error: can't export reloc type %d (`%s')"),
fixp->fx_r_type, bfd_get_reloc_code_name (code));
- return 0;
+ xfree (reloc);
+ relocs[0] = NULL;
+ return relocs;
}
/* @@ Why fx_addnumber sometimes and fx_offset other times? */
@@ -2805,6 +3213,14 @@ tc_gen_reloc (section, fixp)
|| code == BFD_RELOC_SPARC_PC10
|| code == BFD_RELOC_SPARC_PC22)
reloc->addend = fixp->fx_addnumber;
+ else if (sparc_pic_code
+ && fixp->fx_r_type == BFD_RELOC_32_PCREL_S2
+ && fixp->fx_addsy != NULL
+ && (S_IS_EXTERNAL (fixp->fx_addsy)
+ || S_IS_WEAK (fixp->fx_addsy))
+ && S_IS_DEFINED (fixp->fx_addsy)
+ && ! S_IS_COMMON (fixp->fx_addsy))
+ reloc->addend = fixp->fx_addnumber;
else
reloc->addend = fixp->fx_offset - reloc->address;
@@ -2814,7 +3230,7 @@ tc_gen_reloc (section, fixp)
|| code == BFD_RELOC_SPARC_PC10
|| code == BFD_RELOC_SPARC_PC22)
reloc->addend = fixp->fx_addnumber;
- else if ((fixp->fx_addsy->bsym->flags & BSF_SECTION_SYM) != 0)
+ else if (symbol_section_p (fixp->fx_addsy))
reloc->addend = (section->vma
+ fixp->fx_addnumber
+ md_pcrel_from (fixp));
@@ -2822,7 +3238,21 @@ tc_gen_reloc (section, fixp)
reloc->addend = fixp->fx_offset;
#endif
- return reloc;
+ /* We expand R_SPARC_OLO10 to R_SPARC_LO10 and R_SPARC_13
+ on the same location. */
+ if (code == BFD_RELOC_SPARC_OLO10)
+ {
+ relocs[1] = reloc = (arelent *) xmalloc (sizeof (arelent));
+ relocs[2] = NULL;
+
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *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;
+ }
+
+ return relocs;
}
/* We have no need to default values of symbols. */
@@ -2869,11 +3299,29 @@ md_pcrel_from (fixP)
ret = fixP->fx_where + fixP->fx_frag->fr_address;
if (! sparc_pic_code
|| fixP->fx_addsy == NULL
- || (fixP->fx_addsy->bsym->flags & BSF_SECTION_SYM) != 0)
+ || symbol_section_p (fixP->fx_addsy))
ret += fixP->fx_size;
return ret;
}
+/* Return log2 (VALUE), or -1 if VALUE is not an exact positive power
+ of two. */
+
+static int
+log2 (value)
+ int value;
+{
+ int shift;
+
+ if (value <= 0)
+ return -1;
+
+ for (shift = 0; (value & 1) == 0; value >>= 1)
+ ++shift;
+
+ return (value == 1) ? shift : -1;
+}
+
/*
* sort of like s_lcomm
*/
@@ -2902,7 +3350,7 @@ s_reserve (ignore)
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after name");
+ as_bad (_("Expected comma after name"));
ignore_rest_of_line ();
return;
}
@@ -2911,7 +3359,7 @@ s_reserve (ignore)
if ((size = get_absolute_expression ()) < 0)
{
- as_bad ("BSS length (%d.) <0! Ignored.", size);
+ as_bad (_("BSS length (%d.) <0! Ignored."), size);
ignore_rest_of_line ();
return;
} /* bad length */
@@ -2923,7 +3371,7 @@ s_reserve (ignore)
if (strncmp (input_line_pointer, ",\"bss\"", 6) != 0
&& strncmp (input_line_pointer, ",\".bss\"", 7) != 0)
{
- as_bad ("bad .reserve segment -- expected BSS segment");
+ as_bad (_("bad .reserve segment -- expected BSS segment"));
return;
}
@@ -2940,38 +3388,43 @@ s_reserve (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer == '\n')
{
- as_bad ("Missing alignment");
+ as_bad (_("missing alignment"));
+ ignore_rest_of_line ();
return;
}
- align = get_absolute_expression ();
+ align = (int) get_absolute_expression ();
+
#ifndef OBJ_ELF
if (align > max_alignment)
{
align = max_alignment;
- as_warn ("Alignment too large: %d. assumed.", align);
+ as_warn (_("alignment too large; assuming %d"), align);
}
#endif
+
if (align < 0)
{
- align = 0;
- as_warn ("Alignment negative. 0 assumed.");
+ as_bad (_("negative alignment"));
+ ignore_rest_of_line ();
+ return;
}
- record_alignment (bss_section, align);
-
- /* convert to a power of 2 alignment */
- for (temp = 0; (align & 1) == 0; align >>= 1, ++temp);;
-
- if (align != 1)
+ if (align != 0)
{
- as_bad ("Alignment not a power of 2");
- ignore_rest_of_line ();
- return;
- } /* not a power of two */
+ temp = log2 (align);
+ if (temp < 0)
+ {
+ as_bad (_("alignment not a power of 2"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ align = temp;
+ }
- align = temp;
- } /* if has optional alignment */
+ record_alignment (bss_section, align);
+ }
else
align = 0;
@@ -2995,9 +3448,9 @@ s_reserve (ignore)
/* detach from old frag */
if (S_GET_SEGMENT(symbolP) == bss_section)
- symbolP->sy_frag->fr_symbol = NULL;
+ symbol_get_frag (symbolP)->fr_symbol = NULL;
- symbolP->sy_frag = frag_now;
+ symbol_set_frag (symbolP, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
(offsetT) size, (char *)0);
*pfrag = 0;
@@ -3005,6 +3458,10 @@ s_reserve (ignore)
S_SET_SEGMENT (symbolP, bss_section);
subseg_set (current_seg, current_subseg);
+
+#ifdef OBJ_ELF
+ S_SET_SIZE (symbolP, size);
+#endif
}
}
else
@@ -3034,14 +3491,14 @@ s_common (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name");
+ as_bad (_("Expected comma after symbol-name"));
ignore_rest_of_line ();
return;
}
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (".COMMon length (%d.) <0! Ignored.", temp);
+ as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -3051,7 +3508,7 @@ s_common (ignore)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol");
+ as_bad (_("Ignoring attempt to re-define symbol"));
ignore_rest_of_line ();
return;
}
@@ -3059,7 +3516,7 @@ s_common (ignore)
{
if (S_GET_VALUE (symbolP) != (valueT) size)
{
- as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."),
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
}
}
@@ -3070,10 +3527,10 @@ s_common (ignore)
S_SET_EXTERNAL (symbolP);
#endif
}
- know (symbolP->sy_frag == &zero_address_frag);
+ know (symbol_get_frag (symbolP) == &zero_address_frag);
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after common length");
+ as_bad (_("Expected comma after common length"));
ignore_rest_of_line ();
return;
}
@@ -3082,20 +3539,24 @@ s_common (ignore)
if (*input_line_pointer != '"')
{
temp = get_absolute_expression ();
+
#ifndef OBJ_ELF
if (temp > max_alignment)
{
temp = max_alignment;
- as_warn ("Common alignment too large: %d. assumed", temp);
+ as_warn (_("alignment too large; assuming %d"), temp);
}
#endif
+
if (temp < 0)
{
- temp = 0;
- as_warn ("Common alignment negative; 0 assumed");
+ as_bad (_("negative alignment"));
+ ignore_rest_of_line ();
+ return;
}
+
#ifdef OBJ_ELF
- if (symbolP->local)
+ if (symbol_get_obj (symbolP)->local)
{
segT old_sec;
int old_subsec;
@@ -3104,28 +3565,42 @@ s_common (ignore)
old_sec = now_seg;
old_subsec = now_subseg;
- align = temp;
+
+ if (temp == 0)
+ align = 0;
+ else
+ align = log2 (temp);
+
+ if (align < 0)
+ {
+ as_bad (_("alignment not a power of 2"));
+ ignore_rest_of_line ();
+ return;
+ }
+
record_alignment (bss_section, align);
subseg_set (bss_section, 0);
if (align)
frag_align (align, 0, 0);
if (S_GET_SEGMENT (symbolP) == bss_section)
- symbolP->sy_frag->fr_symbol = 0;
- symbolP->sy_frag = frag_now;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
+ symbol_set_frag (symbolP, frag_now);
p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *) 0);
*p = 0;
S_SET_SEGMENT (symbolP, bss_section);
S_CLEAR_EXTERNAL (symbolP);
+ S_SET_SIZE (symbolP, size);
subseg_set (old_sec, old_subsec);
}
else
-#endif
+#endif /* OBJ_ELF */
{
allocate_common:
S_SET_VALUE (symbolP, (valueT) size);
#ifdef OBJ_ELF
S_SET_ALIGN (symbolP, temp);
+ S_SET_SIZE (symbolP, size);
#endif
S_SET_EXTERNAL (symbolP);
S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
@@ -3152,7 +3627,7 @@ s_common (ignore)
}
#ifdef BFD_ASSEMBLER
- symbolP->bsym->flags |= BSF_OBJECT;
+ symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
#endif
demand_empty_rest_of_line ();
@@ -3165,7 +3640,7 @@ s_common (ignore)
p++;
c = *p;
*p = '\0';
- as_bad ("bad .common segment %s", input_line_pointer + 1);
+ as_bad (_("bad .common segment %s"), input_line_pointer + 1);
*p = c;
input_line_pointer = p;
ignore_rest_of_line ();
@@ -3217,7 +3692,7 @@ s_seg (ignore)
subseg_set (data_section, 255); /* FIXME-SOMEDAY */
return;
}
- as_bad ("Unknown segment type");
+ as_bad (_("Unknown segment type"));
demand_empty_rest_of_line ();
}
@@ -3257,6 +3732,134 @@ s_uacons (bytes)
cons (bytes);
}
+/* This handles the native word allocation pseudo-op .nword.
+ For sparc_arch_size 32 it is equivalent to .word, for
+ sparc_arch_size 64 it is equivalent to .xword. */
+
+static void
+s_ncons (bytes)
+ int bytes;
+{
+ cons (sparc_arch_size == 32 ? 4 : 8);
+}
+
+#ifdef OBJ_ELF
+/* 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;
+{
+ char c;
+ int reg;
+ int flags;
+ const char *regname;
+
+ if (input_line_pointer[0] != '%'
+ || input_line_pointer[1] != 'g'
+ || ((input_line_pointer[2] & ~1) != '2'
+ && (input_line_pointer[2] & ~1) != '6')
+ || input_line_pointer[3] != ',')
+ as_bad (_("register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"));
+ reg = input_line_pointer[2] - '0';
+ input_line_pointer += 4;
+
+ if (*input_line_pointer == '#')
+ {
+ ++input_line_pointer;
+ regname = input_line_pointer;
+ 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')
+ regname = NULL;
+ else
+ regname = "";
+ }
+ else
+ {
+ regname = input_line_pointer;
+ c = get_symbol_end ();
+ }
+ if (sparc_arch_size == 64)
+ {
+ if (globals [reg])
+ {
+ 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;
+ else
+ {
+ if (*regname)
+ {
+ if (symbol_find (regname))
+ as_bad (_("Register symbol %s already defined."),
+ regname);
+ }
+ 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);
+ /* 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]))
+ ->internal_elf_sym.st_info =
+ ELF_ST_INFO(STB_GLOBAL, STT_REGISTER);
+ elf_symbol (symbol_get_bfdsym (globals [reg]))
+ ->internal_elf_sym.st_shndx = SHN_UNDEF;
+ }
+ }
+ }
+
+ *input_line_pointer = c;
+
+ demand_empty_rest_of_line ();
+}
+
+/* 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))
+ ->internal_elf_sym.st_info) != STT_REGISTER)
+ continue;
+
+ if (ELF_ST_TYPE (elf_symbol (symbol_get_bfdsym (sym))
+ ->internal_elf_sym.st_shndx != SHN_UNDEF))
+ continue;
+
+ S_SET_SEGMENT (sym, undefined_section);
+ }
+}
+#endif
+
/* If the --enforce-aligned-data option is used, we require .word,
et. al., to be aligned correctly. We do it by setting up an
rs_align_code frag, and checking in HANDLE_ALIGN to make sure that
@@ -3286,20 +3889,16 @@ sparc_cons_align (nbytes)
return;
}
- nalign = 0;
- while ((nbytes & 1) == 0)
- {
- ++nalign;
- nbytes >>= 1;
- }
-
+ nalign = log2 (nbytes);
if (nalign == 0)
return;
+ assert (nalign > 0);
+
if (now_seg == absolute_section)
{
if ((abs_section_offset & ((1 << nalign) - 1)) != 0)
- as_bad ("misaligned data");
+ as_bad (_("misaligned data"));
return;
}
@@ -3318,21 +3917,34 @@ sparc_handle_align (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");
+ 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))
+ 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++ = 0x01000000; /* nop */
+ 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)
- *(unsigned *)(fragp->fr_literal + fragp->fr_fix) =
- 0x30680000 | (count >> 2); /* ba,a,pt %xcc, 1f */
+ {
+ 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;
}
}
@@ -3347,18 +3959,59 @@ sparc_elf_final_processing ()
/* Set the Sparc ELF flag bits. FIXME: There should probably be some
sort of BFD interface for this. */
if (sparc_arch_size == 64)
- switch (sparc_memory_model)
- {
- case MM_RMO:
- elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_RMO;
- break;
- case MM_PSO:
- elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_PSO;
- break;
- }
+ {
+ switch (sparc_memory_model)
+ {
+ case MM_RMO:
+ elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_RMO;
+ break;
+ case MM_PSO:
+ elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_PSO;
+ break;
+ default:
+ break;
+ }
+ }
else if (current_architecture >= SPARC_OPCODE_ARCH_V9)
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS;
if (current_architecture == SPARC_OPCODE_ARCH_V9A)
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1;
}
#endif
+
+/* This is called by emit_expr via TC_CONS_FIX_NEW when creating a
+ reloc for a cons. We could use the definition there, except that
+ we want to handle little endian relocs specially. */
+
+void
+cons_fix_new_sparc (frag, where, nbytes, exp)
+ fragS *frag;
+ int where;
+ unsigned int nbytes;
+ expressionS *exp;
+{
+ bfd_reloc_code_real_type r;
+
+ r = (nbytes == 1 ? BFD_RELOC_8 :
+ (nbytes == 2 ? BFD_RELOC_16 :
+ (nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64)));
+
+ if (target_little_endian_data && nbytes == 4
+ && now_seg->flags & SEC_ALLOC)
+ r = BFD_RELOC_SPARC_REV32;
+ fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
+}
+
+#ifdef OBJ_ELF
+int
+elf32_sparc_force_relocation (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 bb09bd4..91fda22 100644
--- a/contrib/binutils/gas/config/tc-sparc.h
+++ b/contrib/binutils/gas/config/tc-sparc.h
@@ -1,5 +1,5 @@
/* tc-sparc.h - Macros and type defines for the sparc.
- Copyright (C) 1989, 90-96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1989, 90-96, 97, 98, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -35,19 +35,24 @@ struct frag;
extern const char *sparc_target_format PARAMS ((void));
#define TARGET_FORMAT sparc_target_format ()
+#define RELOC_EXPANSION_POSSIBLE
+#define MAX_RELOC_EXPANSION 2
+
+#if 0
#ifdef TE_SPARCAOUT
/* Bi-endian support may eventually be unconditional, but until things are
working well it's only provided for targets that need it. */
#define SPARC_BIENDIAN
#endif
+#endif
+/* Make it unconditional and check if -EL is valid after option parsing */
+#define SPARC_BIENDIAN
#define WORKING_DOT_WORD
-#define md_convert_frag(b,s,f) {as_fatal ("sparc convert_frag\n");}
-#define md_create_long_jump(p,f,t,fr,s) as_fatal("sparc_create_long_jump")
-#define md_create_short_jump(p,f,t,fr,s) as_fatal("sparc_create_short_jump")
+#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 "
@@ -55,10 +60,10 @@ extern int sparc_pic_code;
#define md_do_align(n, fill, len, max, around) \
if ((n) && (n) <= 10 && !need_pass_2 && !(fill) \
- && now_seg != data_section && now_seg != bss_section) \
+ && subseg_text_p (now_seg)) \
{ \
char *p; \
- p = frag_var (rs_align_code, 1024, 1, (relax_substateT) 1024, \
+ p = frag_var (rs_align_code, 1 << n, 1, (relax_substateT) 1024, \
(symbolS *) 0, (offsetT) (n), (char *) 0); \
*p = 0x00; \
goto around; \
@@ -106,6 +111,11 @@ extern void sparc_handle_align PARAMS ((struct frag *));
#define RELOC_REQUIRES_SYMBOL
#endif
+#ifdef OBJ_ELF
+#define TC_FORCE_RELOCATION(fixp) elf32_sparc_force_relocation(fixp)
+extern int elf32_sparc_force_relocation PARAMS ((struct fix *));
+#endif
+
#define MD_APPLY_FIX3
#define TC_HANDLES_FX_DONE
@@ -113,26 +123,45 @@ extern void sparc_handle_align PARAMS ((struct frag *));
/* Keep relocations against global symbols. Don't turn them into
relocations against sections. This is required for the dynamic
linker to operate properly. When generating PIC, we need to keep
- any non PC relative reloc. */
+ any non PC relative reloc. The PIC part of this test must be
+ parallel to the code in tc_gen_reloc which converts relocations to
+ GOT relocations. */
#define tc_fix_adjustable(FIX) \
(! S_IS_EXTERNAL ((FIX)->fx_addsy) \
&& ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && (FIX)->fx_r_type != BFD_RELOC_VTABLE_INHERIT \
+ && (FIX)->fx_r_type != BFD_RELOC_VTABLE_ENTRY \
&& (! sparc_pic_code \
- || (FIX)->fx_pcrel \
- || ((FIX)->fx_subsy != NULL \
- && (S_GET_SEGMENT ((FIX)->fx_subsy) \
- == S_GET_SEGMENT ((FIX)->fx_addsy))) \
- || strchr (S_GET_NAME ((FIX)->fx_addsy), '\001') != NULL \
- || strchr (S_GET_NAME ((FIX)->fx_addsy), '\002') != NULL))
+ || ((FIX)->fx_r_type != BFD_RELOC_HI22 \
+ && (FIX)->fx_r_type != BFD_RELOC_LO10 \
+ && (FIX)->fx_r_type != BFD_RELOC_SPARC13 \
+ && ((FIX)->fx_r_type != BFD_RELOC_32_PCREL_S2 \
+ || (S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy) \
+ && ! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy))) \
+ && ((FIX)->fx_pcrel \
+ || ((FIX)->fx_subsy != NULL \
+ && (S_GET_SEGMENT ((FIX)->fx_subsy) \
+ == S_GET_SEGMENT ((FIX)->fx_addsy))) \
+ || S_IS_LOCAL ((FIX)->fx_addsy)))))
+
+/* Finish up the entire symtab. */
+#define tc_adjust_symtab() sparc_adjust_symtab ()
+extern void sparc_adjust_symtab PARAMS ((void));
#endif
#ifdef OBJ_AOUT
/* When generating PIC code, we must not adjust any reloc which will
- turn into a reloc against the global offset table. */
-#define tc_fix_adjustable(FIX) \
- (! sparc_pic_code \
- || (FIX)->fx_pcrel \
- || (FIX)->fx_r_type == BFD_RELOC_16 \
+ turn into a reloc against the global offset table, nor any reloc
+ which we will need if a symbol is overridden. */
+#define tc_fix_adjustable(FIX) \
+ (! sparc_pic_code \
+ || ((FIX)->fx_pcrel \
+ && ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy)))) \
+ || (FIX)->fx_r_type == BFD_RELOC_16 \
|| (FIX)->fx_r_type == BFD_RELOC_32)
#endif
@@ -146,4 +175,25 @@ extern void sparc_md_end PARAMS ((void));
#endif
+#define TC_CONS_FIX_NEW cons_fix_new_sparc
+extern void cons_fix_new_sparc
+ PARAMS ((struct frag *, int, unsigned int, struct expressionS *));
+
+#define TC_FIX_TYPE valueT
+
+#define TC_INIT_FIX_DATA(X) \
+ do \
+ { \
+ (X)->tc_fix_data = 0; \
+ } \
+ while(0)
+
+#define TC_FIX_DATA_PRINT(FILE, FIXP) \
+ do \
+ { \
+ fprintf((FILE), "addend2=%ld\n", \
+ (unsigned long) (FIXP)->tc_fix_data); \
+ } \
+ while(0)
+
/* end of tc-sparc.h */
diff --git a/contrib/binutils/gas/config/tc-tic30.c b/contrib/binutils/gas/config/tc-tic30.c
index f78c6f8..255c06a 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 Free Software Foundation.
+ Copyright (C) 1998, 1999 Free Software Foundation.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of GAS, the GNU Assembler.
@@ -35,8 +35,6 @@ static char *ordinal_names[] =
{"first", "second", "third", "fourth", "fifth"};
const int md_reloc_size = 0;
-int md_long_jump_size = 0;
-int md_short_jump_size = 0;
const char comment_chars[] = ";";
const char line_comment_chars[] = "*";
@@ -1573,26 +1571,6 @@ md_convert_frag (abfd, sec, fragP)
debug ("In md_convert_frag()\n");
}
-void
-md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
- char *ptr;
- addressT from_addr, to_addr;
- fragS *frag;
- symbolS *to_symbol;
-{
- debug ("In md_create_short_jump()\n");
-}
-
-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;
-{
- debug ("In md_create_long_jump()\n");
-}
-
int
md_apply_fix (fixP, valP)
fixS *fixP;
@@ -1864,7 +1842,8 @@ tc_gen_reloc (section, fixP)
rel = (arelent *) xmalloc (sizeof (arelent));
assert (rel != 0);
- rel->sym_ptr_ptr = &fixP->fx_addsy->bsym;
+ 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;
if (fixP->fx_pcrel)
rel->addend = fixP->fx_addnumber;
diff --git a/contrib/binutils/gas/config/tc-tic30.h b/contrib/binutils/gas/config/tc-tic30.h
index 2fb9cb6..d172d2e 100644
--- a/contrib/binutils/gas/config/tc-tic30.h
+++ b/contrib/binutils/gas/config/tc-tic30.h
@@ -31,6 +31,8 @@
#define TARGET_ARCH bfd_arch_tic30
#define TARGET_BYTES_BIG_ENDIAN 1
+#define WORKING_DOT_WORD
+
char *output_invalid PARAMS ((int c));
#define END_OF_INSN '\0'
diff --git a/contrib/binutils/gas/config/tc-v850.c b/contrib/binutils/gas/config/tc-v850.c
index 18ec114..e53054d 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 Free Software Foundation.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -95,6 +95,8 @@ static segT rozdata_section = NULL;
static segT scommon_section = NULL;
static segT tcommon_section = NULL;
static segT zcommon_section = NULL;
+static segT call_table_data_section = NULL;
+static segT call_table_text_section = NULL;
/* fixups */
#define MAX_INSN_FIXUPS (5)
@@ -189,6 +191,25 @@ v850_rozdata (int ignore)
demand_empty_rest_of_line ();
}
+void
+v850_call_table_data (int ignore)
+{
+ 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)
+{
+ 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)
@@ -230,42 +251,54 @@ v850_comm (area)
name = input_line_pointer;
c = get_symbol_end ();
+
/* 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");
+ as_bad (_("Expected comma after symbol-name"));
ignore_rest_of_line ();
return;
}
- input_line_pointer++; /* skip ',' */
+
+ input_line_pointer ++; /* skip ',' */
+
if ((temp = get_absolute_expression ()) < 0)
{
- as_bad (".COMMon length (%d.) <0! Ignored.", temp);
+ /* 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");
+ 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)
{
- as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ /* 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 (symbolP->sy_frag == &zero_address_frag);
+
+ know (symbol_get_frag (symbolP) == & zero_address_frag);
+
if (*input_line_pointer != ',')
have_align = 0;
else
@@ -274,6 +307,7 @@ v850_comm (area)
input_line_pointer++;
SKIP_WHITESPACE ();
}
+
if (! have_align || *input_line_pointer != '"')
{
if (! have_align)
@@ -281,35 +315,81 @@ v850_comm (area)
else
{
temp = get_absolute_expression ();
+
if (temp < 0)
{
temp = 0;
- as_warn ("Common alignment negative; 0 assumed");
+ as_warn (_("Common alignment negative; 0 assumed"));
}
}
- if (symbolP->local)
+
+ if (symbol_get_obj (symbolP)->local)
{
segT old_sec;
int old_subsec;
char * pfrag;
int align;
+ flagword applicable;
- /* allocate_bss: */
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;
+ }
+
if (temp)
{
/* convert to a power of 2 alignment */
- for (align = 0; (temp & 1) == 0; temp >>= 1, ++align);
+ for (align = 0; (temp & 1) == 0; temp >>= 1, ++align)
+ ;
+
if (temp != 1)
{
- as_bad ("Common alignment not a power of 2");
+ as_bad (_("Common alignment not a power of 2"));
ignore_rest_of_line ();
return;
}
}
else
align = 0;
+
switch (area)
{
case AREA_SDA:
@@ -341,24 +421,24 @@ v850_comm (area)
{
case AREA_SDA:
if (S_GET_SEGMENT (symbolP) == sbss_section)
- symbolP->sy_frag->fr_symbol = 0;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
break;
case AREA_ZDA:
if (S_GET_SEGMENT (symbolP) == zbss_section)
- symbolP->sy_frag->fr_symbol = 0;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
break;
case AREA_TDA:
if (S_GET_SEGMENT (symbolP) == tbss_section)
- symbolP->sy_frag->fr_symbol = 0;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
break;
default:
- abort();
+ abort ();
}
- symbolP->sy_frag = frag_now;
+ symbol_set_frag (symbolP, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *) 0);
*pfrag = 0;
@@ -366,9 +446,18 @@ v850_comm (area)
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;
+ 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();
}
@@ -386,9 +475,54 @@ v850_comm (area)
switch (area)
{
- case AREA_SDA: S_SET_SEGMENT (symbolP, scommon_section); break;
- case AREA_ZDA: S_SET_SEGMENT (symbolP, zcommon_section); break;
- case AREA_TDA: S_SET_SEGMENT (symbolP, tcommon_section); break;
+ case AREA_SDA:
+ if (scommon_section == NULL)
+ {
+ flagword applicable;
+
+ applicable = bfd_applicable_section_flags (stdoutput);
+
+ scommon_section = subseg_new (".scommon", 0);
+
+ bfd_set_section_flags (stdoutput, scommon_section, applicable
+ & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA
+ | 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);
+
+ zcommon_section = subseg_new (".zcommon", 0);
+
+ bfd_set_section_flags (stdoutput, zcommon_section, applicable
+ & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA
+ | 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);
+
+ 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);
+ }
+ S_SET_SEGMENT (symbolP, tcommon_section);
+ break;
+
default:
abort();
}
@@ -414,7 +548,7 @@ v850_comm (area)
goto allocate_common;
}
- symbolP->bsym->flags |= BSF_OBJECT;
+ symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
demand_empty_rest_of_line ();
return;
@@ -426,7 +560,7 @@ v850_comm (area)
p++;
c = *p;
*p = '\0';
- as_bad ("bad .common segment %s", input_line_pointer + 1);
+ as_bad (_("bad .common segment %s"), input_line_pointer + 1);
*p = c;
input_line_pointer = p;
ignore_rest_of_line ();
@@ -443,6 +577,8 @@ set_machine (int number)
switch (machine)
{
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;
}
}
@@ -464,6 +600,10 @@ const pseudo_typeS md_pseudo_table[] =
{"scomm", v850_comm, AREA_SDA},
{"tcomm", v850_comm, AREA_TDA},
{"v850", set_machine, 0},
+ {"call_table_data", v850_call_table_data, 0},
+ {"call_table_text", v850_call_table_text, 0},
+ {"v850e", set_machine, bfd_mach_v850e},
+ {"v850ea", set_machine, bfd_mach_v850ea},
{ NULL, NULL, 0}
};
@@ -518,6 +658,11 @@ static const struct reg_name pre_defined_registers[] =
static const struct reg_name system_registers[] =
{
+ { "ctbp", 20 },
+ { "ctpc", 16 },
+ { "ctpsw", 17 },
+ { "dbpc", 18 },
+ { "dbpsw", 19 },
{ "ecr", 4 },
{ "eipc", 0 },
{ "eipsw", 1 },
@@ -527,6 +672,12 @@ static const struct reg_name system_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[] =
{
@@ -575,17 +726,19 @@ reg_name_search (regs, regcount, name, accept_numbers)
{
/* If the symbol is an alias for another name then use that.
If the symbol is an alias for a number, then return the number. */
- if (symbolP->sy_value.X_op == O_symbol)
+ if (symbol_equated_p (symbolP))
{
- name = S_GET_NAME (symbolP->sy_value.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;
@@ -662,6 +815,8 @@ register_name (expressionP)
* 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,
@@ -670,10 +825,10 @@ register_name (expressionP)
* its original state.
*/
static boolean
-system_register_name (expressionP, accept_numbers
- )
+system_register_name (expressionP, accept_numbers, accept_list_names)
expressionS * expressionP;
boolean accept_numbers;
+ boolean accept_list_names;
{
int reg_number;
char * name;
@@ -701,13 +856,23 @@ system_register_name (expressionP, accept_numbers
/* Make sure that the register number is allowable. */
if ( reg_number < 0
|| reg_number > 5
+ && reg_number < 16
+ || reg_number > 20
)
{
reg_number = -1;
}
}
+ else if (accept_list_names)
+ {
+ c = get_symbol_end ();
+ reg_number = reg_name_search (system_list_registers,
+ SYSREGLIST_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)
{
@@ -785,6 +950,226 @@ skip_white_space (void)
++ 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.
+ *
+ * out: NULL if the parse completed successfully, otherwise a
+ * pointer to an error message is returned. If the parse
+ * completes the correct bit fields in the instruction
+ * will be filled in.
+ *
+ * Parses register lists with the syntax:
+ *
+ * { rX }
+ * { rX, rY }
+ * { rX - rY }
+ * { rX - rY, rZ }
+ * etc
+ *
+ * and also parses constant epxressions whoes bits indicate the
+ * 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.
+ *
+ */
+static char *
+parse_register_list
+(
+ 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;
+ expressionS exp;
+
+
+ /* Select a register array to parse. */
+ switch (operand->shift)
+ {
+ case 0xffe00001: regs = type1_regs; break;
+ case 0xfff8000f: regs = type2_regs; break;
+ case 0xfff8001f: regs = type3_regs; break;
+ default:
+ as_bad (_("unknown operand shift: %x\n"), operand->shift);
+ return _("internal failure in parse_register_list");
+ }
+
+ skip_white_space ();
+
+ /* 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 != '{')
+ {
+ int bits;
+ int reg;
+ int i;
+
+ expression (& exp);
+
+ if (exp.X_op != O_constant)
+ return _("constant expression or register list expected");
+
+ if (regs == type1_regs)
+ {
+ if (exp.X_add_number & 0xFFFFF000)
+ return _("high bits set in register list expression");
+
+ 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);
+ }
+ }
+ 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 ++)
+ if (exp.X_add_number & (1 << (reg - 1)))
+ {
+ for (i = 0; i < 32; i++)
+ if (regs[i] == reg)
+ * insn |= (1 << i);
+ }
+
+ if (exp.X_add_number & (1 << 15))
+ * insn |= (1 << 3);
+
+ if (exp.X_add_number & (1 << 16))
+ * insn |= (1 << 19);
+ }
+ else /* regs == type3_regs */
+ {
+ if (exp.X_add_number & 0xFFFE0000)
+ return _("high bits set in register list expression");
+
+ 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);
+ }
+
+ if (exp.X_add_number & (1 << 16))
+ * insn |= (1 << 19);
+ }
+
+ return NULL;
+ }
+
+ input_line_pointer ++;
+
+ /* Parse the register list until a terminator (closing curly brace or
+ new-line) is found. */
+ for (;;)
+ {
+ if (register_name (& exp))
+ {
+ 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)
+ {
+ * insn |= (1 << i);
+ break;
+ }
+ }
+
+ if (i == 32)
+ {
+ return _("illegal register included in list");
+ }
+ }
+ else if (system_register_name (& exp, true, true))
+ {
+ if (regs == type1_regs)
+ {
+ return _("system registers cannot be included in list");
+ }
+ else if (exp.X_add_number == 5)
+ {
+ if (regs == type2_regs)
+ return _("PSW cannot be included in list");
+ else
+ * insn |= 0x8;
+ }
+ else if (exp.X_add_number < 4)
+ * insn |= 0x80000;
+ else
+ return _("High value system registers cannot be included in list");
+ }
+ else if (* input_line_pointer == '}')
+ {
+ input_line_pointer ++;
+ break;
+ }
+ else if (* input_line_pointer == ',')
+ {
+ input_line_pointer ++;
+ continue;
+ }
+ else if (* input_line_pointer == '-')
+ {
+ /* We have encountered a range of registers: rX - rY */
+ int j;
+ expressionS exp2;
+
+ /* Skip the dash. */
+ ++ input_line_pointer;
+
+ /* Get the second register in the range. */
+ if (! register_name (& exp2))
+ {
+ return _("second register should follow dash in register list");
+ exp2.X_add_number = exp.X_add_number;
+ }
+
+ /* Add the rest of the registers in the range. */
+ for (j = exp.X_add_number + 1; j <= exp2.X_add_number; j++)
+ {
+ 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)
+ {
+ * insn |= (1 << i);
+ break;
+ }
+ }
+
+ if (i == 32)
+ return _("illegal register included in list");
+ }
+ }
+ else
+ {
+ break;
+ }
+
+ skip_white_space ();
+ }
+
+ return NULL;
+}
CONST char * md_shortopts = "m:";
@@ -799,11 +1184,14 @@ void
md_show_usage (stream)
FILE * stream;
{
- fprintf (stream, "V850 options:\n");
- fprintf (stream, "\t-mwarn-signed-overflow Warn if signed immediate values overflow\n");
- fprintf (stream, "\t-mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n");
- fprintf (stream, "\t-mv850 The code is targeted at the v850\n");
-}
+ fprintf (stream, _(" V850 options:\n"));
+ fprintf (stream, _(" -mwarn-signed-overflow Warn if signed immediate values overflow\n"));
+ fprintf (stream, _(" -mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n"));
+ fprintf (stream, _(" -mv850 The code is targeted at the v850\n"));
+ fprintf (stream, _(" -mv850e The code is targeted at the v850e\n"));
+ fprintf (stream, _(" -mv850ea The code is targeted at the v850ea\n"));
+ fprintf (stream, _(" -mv850any The code is generic, despite any processor specific instructions\n"));
+}
int
md_parse_option (c, arg)
@@ -812,7 +1200,8 @@ md_parse_option (c, arg)
{
if (c != 'm')
{
- fprintf (stderr, "unknown command line option: -%c%s\n", c, arg);
+ /* xgettext:c-format */
+ fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg);
return 0;
}
@@ -829,9 +1218,25 @@ md_parse_option (c, arg)
machine = 0;
processor_mask = PROCESSOR_V850;
}
+ else if (strcmp (arg, "v850e") == 0)
+ {
+ machine = bfd_mach_v850e;
+ processor_mask = PROCESSOR_V850E;
+ }
+ else if (strcmp (arg, "v850ea") == 0)
+ {
+ machine = bfd_mach_v850ea;
+ processor_mask = PROCESSOR_V850EA;
+ }
+ 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. */
+ }
else
{
- fprintf (stderr, "unknown command line option: -%c%s\n", c, arg);
+ /* xgettext:c-format */
+ fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg);
return 0;
}
@@ -868,7 +1273,7 @@ md_atof (type, litp, sizep)
default:
*sizep = 0;
- return "bad call to md_atof";
+ return _("bad call to md_atof");
}
t = atof_ieee (input_line_pointer, type, words);
@@ -923,8 +1328,8 @@ md_convert_frag (abfd, sec, fragP)
target. */
md_number_to_chars (buffer + 2, 0x00000780, 4);
fix_new (fragP, fragP->fr_fix + 2, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int) fragP->fr_opcode
- + 1);
+ fragP->fr_offset, 1, BFD_RELOC_UNUSED +
+ (int) fragP->fr_opcode + 1);
fragP->fr_var = 0;
fragP->fr_fix += 6;
}
@@ -933,8 +1338,8 @@ md_convert_frag (abfd, sec, fragP)
{
md_number_to_chars (fragP->fr_fix + fragP->fr_literal, 0x00000780, 4);
fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
- fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int) fragP->fr_opcode
- + 1);
+ fragP->fr_offset, 1, BFD_RELOC_UNUSED +
+ (int) fragP->fr_opcode + 1);
fragP->fr_var = 0;
fragP->fr_fix += 4;
}
@@ -958,6 +1363,23 @@ md_begin ()
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;
+
+ if (processor_mask == -1)
+ processor_mask = PROCESSOR_V850E;
+ }
+ else
if (strncmp (TARGET_CPU, "v850", 4) == 0)
{
if (machine == -1)
@@ -967,7 +1389,8 @@ md_begin ()
processor_mask = PROCESSOR_V850;
}
else
- 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();
@@ -991,57 +1414,49 @@ md_begin ()
bfd_set_arch_mach (stdoutput, TARGET_ARCH, machine);
applicable = bfd_applicable_section_flags (stdoutput);
-
- sdata_section = subseg_new (".sdata", 0);
- bfd_set_section_flags (stdoutput, sdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS));
- tdata_section = subseg_new (".tdata", 0);
- bfd_set_section_flags (stdoutput, tdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS));
+ 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));
- zdata_section = subseg_new (".zdata", 0);
- bfd_set_section_flags (stdoutput, zdata_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));
- sbss_section = subseg_new (".sbss", 0);
- bfd_set_section_flags (stdoutput, sbss_section, applicable & SEC_ALLOC);
- seg_info (sbss_section)->bss = 1;
-
- tbss_section = subseg_new (".tbss", 0);
- bfd_set_section_flags (stdoutput, tbss_section, applicable & SEC_ALLOC);
- seg_info (tbss_section)->bss = 1;
-
- zbss_section = subseg_new (".zbss", 0);
- bfd_set_section_flags (stdoutput, zbss_section, applicable & SEC_ALLOC);
- seg_info (zbss_section)->bss = 1;
-
- rosdata_section = subseg_new (".rosdata", 0);
- bfd_set_section_flags (stdoutput, rosdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY));
-
- rozdata_section = subseg_new (".rozdata", 0);
- bfd_set_section_flags (stdoutput, rozdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY));
-
- scommon_section = subseg_new (".scommon", 0);
- bfd_set_section_flags (stdoutput, scommon_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS | SEC_IS_COMMON));
+ /* Restore text section as the current default. */
+ subseg_set (text_section, 0);
+}
- zcommon_section = subseg_new (".zcommon", 0);
- bfd_set_section_flags (stdoutput, zcommon_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS | SEC_IS_COMMON));
- 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));
+static bfd_reloc_code_real_type
+handle_ctoff (const struct v850_operand * operand)
+{
+ if (operand == NULL)
+ return BFD_RELOC_V850_CALLT_16_16_OFFSET;
+ 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)
{
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");
+ as_bad (_("sdaoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1053,11 +1468,12 @@ 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->bits != 16
|| operand->shift != 16)
{
- as_bad ("zdaoff() relocation used on an instruction which does not support it");
+ as_bad (_("zdaoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1069,11 +1485,13 @@ 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->bits != 7)
{
- as_bad ("tdaoff() relocation used on an instruction which does not support it");
+ as_bad (_("tdaoff() relocation used on an instruction which does not support it"));
return BFD_RELOC_64; /* Used to indicate an error condition. */
}
@@ -1112,7 +1530,8 @@ v850_reloc_prefix (const struct v850_operand * operand)
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));
/* Restore skipped parenthesis. */
if (paren_skipped)
@@ -1195,7 +1614,8 @@ v850_insert_operand (insn, operand, val, file, line, str)
if (val < (offsetT) min || val > (offsetT) max)
{
- const char * err = "operand out of range (%s not between %ld and %ld)";
+ /* 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. */
@@ -1267,7 +1687,8 @@ md_assemble (str)
opcode = (struct v850_opcode *) hash_find (v850_hash, str);
if (opcode == NULL)
{
- as_bad ("Unrecognized opcode: `%s'", str);
+ /* xgettext:c-format */
+ as_bad (_("Unrecognized opcode: `%s'"), str);
ignore_rest_of_line ();
return;
}
@@ -1288,7 +1709,7 @@ md_assemble (str)
if ((opcode->processors & processor_mask) == 0)
{
- errmsg = "Target processor does not support this instruction.";
+ errmsg = _("Target processor does not support this instruction.");
goto error;
}
@@ -1333,7 +1754,7 @@ md_assemble (str)
if ((reloc = v850_reloc_prefix (operand)) != BFD_RELOC_UNUSED)
{
/* This is a fake reloc, used to indicate an error condition. */
- if (reloc == BFD_RELOC_64)
+ if (reloc == BFD_RELOC_64)
{
match = 1;
goto error;
@@ -1375,22 +1796,50 @@ md_assemble (str)
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");
+ as_bad (_("AAARG -> unhandled constant reloc"));
break;
}
- insn = v850_insert_operand (insn, operand, ex.X_add_number,
- (char *) NULL, 0,
- copy_of_instruction);
+ if (fc > MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+
+ fixups[ fc ].exp = ex;
+ fixups[ fc ].opindex = * opindex_ptr;
+ fixups[ fc ].reloc = reloc;
+ fc++;
}
else
{
+ if (reloc == 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;
+ }
if (fc > MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[ fc ].exp = ex;
fixups[ fc ].opindex = * opindex_ptr;
@@ -1406,12 +1855,12 @@ md_assemble (str)
{
if (!register_name (& ex))
{
- errmsg = "invalid register name";
+ errmsg = _("invalid register name");
}
else if ((operand->flags & V850_NOT_R0)
&& ex.X_add_number == 0)
{
- errmsg = "register r0 cannot be used here";
+ errmsg = _("register r0 cannot be used here");
/* Force an error message to be generated by
skipping over any following potential matches
@@ -1421,10 +1870,9 @@ md_assemble (str)
}
else if ((operand->flags & V850_OPERAND_SRG) != 0)
{
- if (!system_register_name (& ex, true
- ))
+ if (!system_register_name (& ex, true, false))
{
- errmsg = "invalid system register name";
+ errmsg = _("invalid system register name");
}
}
else if ((operand->flags & V850_OPERAND_EP) != 0)
@@ -1437,7 +1885,7 @@ md_assemble (str)
/* Put things back the way we found them. */
*input_line_pointer = c;
input_line_pointer = start;
- errmsg = "expected EP register";
+ errmsg = _("expected EP register");
goto error;
}
@@ -1445,8 +1893,7 @@ md_assemble (str)
str = input_line_pointer;
input_line_pointer = hold;
- while ( *str == ' ' || *str == ',' || *str == '['
- || *str == ']')
+ while (*str == ' ' || *str == ',' || *str == '[' || *str == ']')
++ str;
continue;
}
@@ -1454,19 +1901,72 @@ md_assemble (str)
{
if (!cc_name (& ex))
{
- errmsg = "invalid condition code name";
+ errmsg = _("invalid condition code name");
}
}
+ else if (operand->flags & V850E_PUSH_POP)
+ {
+ 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)
+ {
+ expression (& ex);
+
+ if (ex.X_op != O_constant)
+ errmsg = _("constant expression expected");
+ else if (ex.X_add_number & 0xffff0000)
+ {
+ if (ex.X_add_number & 0xffff)
+ errmsg = _("constant too big to fit into instruction");
+ else if ((insn & 0x001fffc0) == 0x00130780)
+ ex.X_add_number >>= 16;
+ 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)
+ {
+ 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)
&& (operand->flags & V850_OPERAND_REG) == 0)
{
+ char c;
+ 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
the register name "zero". Attempt to reparse the
field as an expression, and only complain if we
cannot generate a constant. */
+
+ input_line_pointer = str;
+
+ c = get_symbol_end ();
+ if (symbol_find (str) != NULL)
+ exists = 1;
+
+ * input_line_pointer = c;
input_line_pointer = str;
expression (& ex);
@@ -1478,44 +1978,64 @@ md_assemble (str)
field is missing) then report this. */
if (opindex_ptr[1] != 0
&& (v850_operands [opindex_ptr [1]].flags & V850_OPERAND_REG))
- errmsg = "syntax error: value is missing before the register name";
+ errmsg = _("syntax error: value is missing before the register name");
else
- errmsg = "syntax error: register not expected";
+ 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 (exists == 0
+ && ex.X_op == O_symbol)
+ symbol_remove (ex.X_add_symbol,
+ & symbol_rootP, & symbol_lastP);
}
}
- else if (system_register_name (& ex, false
- )
+ else if (system_register_name (& ex, false, false)
&& (operand->flags & V850_OPERAND_SRG) == 0)
{
- errmsg = "syntax error: system register not expected";
+ errmsg = _("syntax error: system register not expected");
}
else if (cc_name (&ex)
&& (operand->flags & V850_OPERAND_CC) == 0)
{
- errmsg = "syntax error: condition code not expected";
+ errmsg = _("syntax error: condition code not expected");
}
else
{
expression (& ex);
+ /* Special case:
+ If we are assembling a MOV instruction (or a CALLT.... :-)
+ and the immediate value does not fit into the bits
+ available then create a fake error so that the next MOV
+ instruction will be selected. This one has a 32 bit
+ immediate field. */
+
+ 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)))
+ 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); */
+/* 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)
{
case O_illegal:
- errmsg = "illegal operand";
+ errmsg = _("illegal operand");
goto error;
case O_absent:
- errmsg = "missing operand";
+ errmsg = _("missing operand");
goto error;
case O_register:
if ((operand->flags & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0)
{
- errmsg = "invalid operand";
+ errmsg = _("invalid operand");
goto error;
}
insn = v850_insert_operand (insn, operand, ex.X_add_number,
@@ -1532,7 +2052,7 @@ md_assemble (str)
default:
/* We need to generate a fixup for this expression. */
if (fc >= MAX_INSN_FIXUPS)
- as_fatal ("too many fixups");
+ as_fatal (_("too many fixups"));
fixups[ fc ].exp = ex;
fixups[ fc ].opindex = * opindex_ptr;
@@ -1584,7 +2104,8 @@ md_assemble (str)
++str;
if (*str != '\0')
- as_bad ("junk at end of line: `%s'", str);
+ /* xgettext:c-format */
+ as_bad (_("junk at end of line: `%s'"), str);
input_line_pointer = str;
@@ -1622,6 +2143,9 @@ md_assemble (str)
else
insn_size = 2;
+ /* Special case: 32 bit MOV */
+ if ((insn & 0xffe0) == 0x0620)
+ insn_size = 2;
f = frag_more (insn_size);
@@ -1668,7 +2192,7 @@ md_assemble (str)
/* XXX This will abort on an R_V850_8 reloc -
is this reloc actually used ? */
if (size != 2 && size != 4)
- abort();
+ abort ();
address = (f - frag_now->fr_literal) + insn_size - size;
@@ -1719,22 +2243,28 @@ tc_gen_reloc (seg, fixp)
arelent * reloc;
reloc = (arelent *) xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = & fixp->fx_addsy->bsym;
+ 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,
- "reloc %d not supported by object file format",
- (int)fixp->fx_r_type);
+ /* xgettext:c-format */
+ _("reloc %d not supported by object file format"),
+ (int) fixp->fx_r_type);
xfree (reloc);
return NULL;
}
- reloc->addend = fixp->fx_addnumber;
+ 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;
}
@@ -1755,16 +2285,19 @@ md_estimate_size_before_relax (fragp, seg)
}
long
-md_pcrel_from (fixp)
+v850_pcrel_from_section (fixp, 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,
then let the linker figure it out. */
- if (fixp->fx_addsy != (symbolS *) NULL && ! S_IS_DEFINED (fixp->fx_addsy))
- {
- /* The symbol is undefined. Let the linker figure it out. */
- return 0;
- }
+ if (fixp->fx_addsy != (symbolS *) NULL
+ && (! S_IS_DEFINED (fixp->fx_addsy)
+ || S_IS_WEAK (fixp->fx_addsy)
+ || (S_GET_SEGMENT (fixp->fx_addsy) != section)))
+ return 0;
+
return fixp->fx_frag->fr_address + fixp->fx_where;
}
@@ -1777,6 +2310,13 @@ md_apply_fix3 (fixp, valuep, seg)
valueT value;
char * where;
+ if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ {
+ fixp->fx_done = 0;
+ return 1;
+ }
+
if (fixp->fx_addsy == (symbolS *) NULL)
{
value = * valuep;
@@ -1795,7 +2335,7 @@ md_apply_fix3 (fixp, valuep, seg)
{
/* We don't actually support subtracting a symbol. */
as_bad_where (fixp->fx_file, fixp->fx_line,
- "expression too complex");
+ _("expression too complex"));
}
}
}
@@ -1838,8 +2378,8 @@ md_apply_fix3 (fixp, valuep, seg)
{
/* fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); */
- as_bad_where(fixp->fx_file, fixp->fx_line,
- "unresolved expression that must be resolved");
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("unresolved expression that must be resolved"));
fixp->fx_done = 1;
return 1;
}
@@ -1850,7 +2390,7 @@ 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)
@@ -1866,7 +2406,7 @@ md_apply_fix3 (fixp, valuep, seg)
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);
@@ -1880,7 +2420,7 @@ parse_cons_expression_v850 (exp)
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;
@@ -1900,3 +2440,43 @@ cons_fix_new_v850 (frag, where, size, exp)
else
fix_new (frag, where, size, NULL, 0, 0, hold_cons_reloc);
}
+
+boolean
+v850_fix_adjustable (fixP)
+ fixS * fixP;
+{
+ if (fixP->fx_addsy == NULL)
+ return 1;
+
+ /* Prevent all adjustments to global symbols. */
+ if (S_IS_EXTERN (fixP->fx_addsy))
+ return 0;
+
+ if (S_IS_WEAK (fixP->fx_addsy))
+ return 0;
+
+ /* 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
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 0;
+
+ return 1;
+}
+
+int
+v850_force_relocation (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
+ || 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 f031366..fad4d1c 100644
--- a/contrib/binutils/gas/config/tc-v850.h
+++ b/contrib/binutils/gas/config/tc-v850.h
@@ -34,10 +34,13 @@
/* The target BFD format. */
#define TARGET_FORMAT "elf32-v850"
-
#define MD_APPLY_FIX3
#define md_operand(x)
+#define obj_fix_adjustable(fixP) v850_fix_adjustable(fixP)
+#define TC_FORCE_RELOCATION(fixp) v850_force_relocation(fixp)
+extern int v850_force_relocation PARAMS ((struct fix *));
+
/* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB 1
@@ -78,3 +81,5 @@ extern const struct relax_type md_relax_table[];
{ ".call_table_data", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \
{ ".call_table_text", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR },
+#define MD_PCREL_FROM_SECTION(fixP,section) v850_pcrel_from_section (fixP, section)
+extern long v850_pcrel_from_section ();
diff --git a/contrib/binutils/gas/config/tc-z8k.c b/contrib/binutils/gas/config/tc-z8k.c
index 909dd92..f89b14b3 100644
--- a/contrib/binutils/gas/config/tc-z8k.c
+++ b/contrib/binutils/gas/config/tc-z8k.c
@@ -1,5 +1,5 @@
/* tc-z8k.c -- Assemble code for the Zilog Z800n
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -287,7 +287,7 @@ DEFUN (parse_reg, (src, mode, reg),
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')
{
@@ -295,7 +295,7 @@ DEFUN (parse_reg, (src, mode, reg),
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')
{
@@ -303,7 +303,7 @@ DEFUN (parse_reg, (src, mode, reg),
res = whatreg (reg, src + 2);
regno = *reg;
if (regno > 7)
- as_warn ("register rl%d, out of range.",regno);
+ as_warn (_("register rl%d, out of range."),regno);
*reg += 8;
}
else if (src[1] == 'q')
@@ -312,7 +312,7 @@ DEFUN (parse_reg, (src, mode, reg),
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
{
@@ -320,7 +320,7 @@ DEFUN (parse_reg, (src, mode, reg),
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;
@@ -338,7 +338,7 @@ DEFUN (parse_exp, (s, op),
input_line_pointer = s;
expression (op);
if (op->X_op == O_absent)
- as_bad ("missing operand");
+ as_bad (_("missing operand"));
new = input_line_pointer;
input_line_pointer = save;
return new;
@@ -371,7 +371,7 @@ DEFUN (checkfor, (ptr, what),
ptr++;
else
{
- as_bad ("expected %c", what);
+ as_bad (_("expected %c"), what);
}
return ptr;
}
@@ -387,7 +387,7 @@ DEFUN (regword, (mode, string),
ok = CLASS_REG_WORD;
if (ok != mode)
{
- as_bad ("register is wrong size for a word %s", string);
+ as_bad (_("register is wrong size for a word %s"), string);
}
}
@@ -402,7 +402,7 @@ DEFUN (regaddr, (mode, string),
ok = segmented_mode ? CLASS_REG_LONG : CLASS_REG_WORD;
if (ok != mode)
{
- as_bad ("register is wrong size for address %s", string);
+ as_bad (_("register is wrong size for address %s"), string);
}
}
@@ -677,7 +677,7 @@ get_operand (ptr, mode, dst)
if (*src != ')')
{
- as_bad ("Missing ) in ra(rb)");
+ as_bad (_("Missing ) in ra(rb)"));
}
else
{
@@ -944,7 +944,7 @@ DEFUN (check_operand, (operand, width, string),
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);
}
}
@@ -1083,12 +1083,12 @@ top:;
}
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;
@@ -1116,7 +1116,7 @@ top:;
case CLASS_REGN0:
if (reg[c & 0xf] == 0)
{
- as_bad ("can't use R0 here");
+ as_bad (_("can't use R0 here"));
}
case CLASS_REG:
case CLASS_REG_BYTE:
@@ -1220,7 +1220,7 @@ DEFUN (md_assemble, (str),
if (op_end == op_start)
{
- as_bad ("can't find opcode ");
+ as_bad (_("can't find opcode "));
}
c = *op_end;
@@ -1232,7 +1232,7 @@ DEFUN (md_assemble, (str),
if (opcode == NULL)
{
- as_bad ("unknown opcode");
+ as_bad (_("unknown opcode"));
return;
}
@@ -1275,7 +1275,7 @@ DEFUN (md_assemble, (str),
where[0] = 0x0;
where[1] = 0x0;
- as_bad ("Can't find opcode to match operands");
+ as_bad (_("Can't find opcode to match operands"));
return;
}
@@ -1287,7 +1287,7 @@ void
DEFUN (tc_crawl_symbol_chain, (headers),
object_headers * headers)
{
- printf ("call to tc_crawl_symbol_chain \n");
+ printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
@@ -1301,7 +1301,7 @@ void
DEFUN (tc_headers_hook, (headers),
object_headers * headers)
{
- printf ("call to tc_headers_hook \n");
+ printf (_("call to tc_headers_hook \n"));
}
/* Various routines to kill one day */
@@ -1352,7 +1352,7 @@ md_atof (type, litP, sizeP)
default:
*sizeP = 0;
- return "Bad call to MD_ATOF()";
+ return _("Bad call to MD_ATOF()");
}
t = atof_ieee (input_line_pointer, type, words);
if (t)
@@ -1387,7 +1387,7 @@ md_parse_option (c, arg)
s_unseg ();
else
{
- as_bad ("invalid architecture -z%s", arg);
+ as_bad (_("invalid architecture -z%s"), arg);
return 0;
}
break;
@@ -1403,49 +1403,26 @@ void
md_show_usage (stream)
FILE *stream;
{
- fprintf(stream, "\
+ fprintf(stream, _("\
Z8K options:\n\
-z8001 generate segmented code\n\
--z8002 generate unsegmented code\n");
+-z8002 generate unsegmented code\n"));
}
-int md_short_jump_size;
-
void
tc_aout_fix_to_chars ()
{
- printf ("call to tc_aout_fix_to_chars \n");
+ printf (_("call to tc_aout_fix_to_chars \n"));
abort ();
}
void
-md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
- char *ptr;
- addressT from_addr;
- addressT to_addr;
- fragS *frag;
- symbolS *to_symbol;
-{
- as_fatal ("failed sanity check.");
-}
-
-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;
-{
- as_fatal ("failed sanity check.");
-}
-
-void
md_convert_frag (headers, seg, fragP)
object_headers *headers;
segT seg;
fragS *fragP;
{
- printf ("call to md_convert_frag \n");
+ printf (_("call to md_convert_frag \n"));
abort ();
}
@@ -1515,13 +1492,12 @@ md_apply_fix (fixP, val)
}
}
-int md_long_jump_size;
int
md_estimate_size_before_relax (fragP, segment_type)
register fragS *fragP;
register segT segment_type;
{
- printf ("call tomd_estimate_size_before_relax \n");
+ printf (_("call tomd_estimate_size_before_relax \n"));
abort ();
}
@@ -1544,7 +1520,7 @@ md_pcrel_from (fixP)
void
tc_coff_symbol_emit_hook (s)
- struct symbol *s;
+ symbolS *s;
{
}
@@ -1564,7 +1540,7 @@ tc_reloc_mangle (fix_ptr, intr, base)
symbolS *sub = fix_ptr->fx_subsy;
if (S_GET_SEGMENT(add) != S_GET_SEGMENT(sub))
{
- as_bad("Can't subtract symbols in different sections %s %s",
+ as_bad(_("Can't subtract symbols in different sections %s %s"),
S_GET_NAME(add), S_GET_NAME(sub));
}
else {
diff --git a/contrib/binutils/gas/config/tc-z8k.h b/contrib/binutils/gas/config/tc-z8k.h
index 1a58502..d88b656 100644
--- a/contrib/binutils/gas/config/tc-z8k.h
+++ b/contrib/binutils/gas/config/tc-z8k.h
@@ -1,5 +1,5 @@
/* This file is tc-z8k.h
- Copyright (C) 1987-1992, 93, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987-1992, 93, 95, 97, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -22,6 +22,12 @@
#define TC_Z8K
#define TARGET_BYTES_BIG_ENDIAN 1
+#if ANSI_PROTOTYPES
+struct internal_reloc;
+#endif
+
+#define WORKING_DOT_WORD
+
#ifndef BFD_ASSEMBLER
#define LOCAL_LABEL(x) 0
#endif
@@ -35,6 +41,8 @@
#define IGNORE_NONSTANDARD_ESCAPES
#define TC_RELOC_MANGLE(s,a,b,c) tc_reloc_mangle(a,b,c)
+extern void tc_reloc_mangle
+ PARAMS ((struct fix *, struct internal_reloc *, bfd_vma));
#define DO_NOT_STRIP 0
#define LISTING_HEADER "Zilog Z8000 GAS "
diff --git a/contrib/binutils/gas/config/te-ppcnw.h b/contrib/binutils/gas/config/te-ppcnw.h
new file mode 100644
index 0000000..2ddf050
--- /dev/null
+++ b/contrib/binutils/gas/config/te-ppcnw.h
@@ -0,0 +1,31 @@
+/* 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. */
+
+/* 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
+ labels. */
+#define LOCAL_LABELS_DOLLAR 1
+#define LOCAL_LABELS_FB 1
+
+/* these define interfaces */
+#include "obj-format.h"
+
+/* 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
new file mode 100644
index 0000000..6310184
--- /dev/null
+++ b/contrib/binutils/gas/config/te-sparcaout.h
@@ -0,0 +1,21 @@
+/* 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. */
+
+#define TE_SPARCAOUT 1
+#include "obj-format.h"
diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure
index 937b289..61c9e8c 100755
--- a/contrib/binutils/gas/configure
+++ b/contrib/binutils/gas/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,22 +12,26 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared build shared libraries [default=yes]
- --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-shared[=PKGS] build shared libraries [default=yes]"
ac_help="$ac_help
- --enable-static build static libraries [default=yes]
- --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-static[=PKGS] build static libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+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
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
@@ -47,6 +51,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -161,6 +166,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
@@ -331,6 +337,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=*)
@@ -352,7 +363,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
+ echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@@ -496,12 +507,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
@@ -522,9 +537,11 @@ 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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
+ac_exeext=
+ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -586,7 +603,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:590: checking host system type" >&5
+echo "configure:607: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -607,7 +624,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:611: checking target system type" >&5
+echo "configure:628: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -625,7 +642,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:629: checking build system type" >&5
+echo "configure:646: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -660,12 +677,12 @@ 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:664: checking for a BSD compatible install" >&5
+echo "configure:681: 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="${IFS}:"
+ 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
@@ -708,13 +725,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
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:718: checking whether build environment is sane" >&5
+echo "configure:734: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -771,7 +787,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:775: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:791: 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
@@ -800,7 +816,7 @@ fi
PACKAGE=gas
-VERSION=2.9.1
+VERSION=2.9.5
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; }
@@ -817,7 +833,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:821: checking for working aclocal" >&5
+echo "configure:837: 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.
@@ -830,7 +846,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:834: checking for working autoconf" >&5
+echo "configure:850: 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.
@@ -843,7 +859,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:847: checking for working automake" >&5
+echo "configure:863: 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.
@@ -856,7 +872,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:860: checking for working autoheader" >&5
+echo "configure:876: 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.
@@ -869,7 +885,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:873: checking for working makeinfo" >&5
+echo "configure:889: 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.
@@ -929,18 +945,42 @@ else
enable_static=yes
fi
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+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
+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:936: checking for $ac_word" >&5
+echo "configure:975: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -961,15 +1001,16 @@ 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:965: checking for $ac_word" >&5
+echo "configure:1005: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -990,16 +1031,17 @@ 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:994: checking for $ac_word" >&5
+echo "configure:1035: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1034,25 +1076,61 @@ 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:1086: 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:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1118: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1052 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1129 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1134: \"$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
@@ -1066,18 +1144,24 @@ else
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:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1160: 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:1081: checking whether we are using GNU C" >&5
+echo "configure:1165: 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
@@ -1086,7 +1170,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$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:1174: \"$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
@@ -1097,11 +1181,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1105: checking whether ${CC-cc} accepts -g" >&5
+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:1193: 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
@@ -1116,16 +1204,20 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
# Check whether --with-gnu-ld or --without-gnu-ld was given.
@@ -1136,18 +1228,23 @@ 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:1145: checking for ld used by GCC" >&5
+echo "configure:1236: 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]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -1159,19 +1256,19 @@ echo "configure:1145: 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:1163: checking for GNU ld" >&5
+echo "configure:1260: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1166: checking for non-GNU ld" >&5
+echo "configure:1263: 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}:"
+ 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"; then
+ 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.
@@ -1179,7 +1276,7 @@ else
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -1196,9 +1293,8 @@ 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:1202: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1298: 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
@@ -1214,44 +1310,43 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1218: checking for BSD-compatible nm" >&5
+echo "configure:1314: 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
- case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ 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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac
+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:1255: checking whether ln -s works" >&5
+echo "configure:1350: 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
@@ -1271,24 +1366,37 @@ else
echo "$ac_t""no" 1>&6
fi
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1291 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1399 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1306,17 +1414,122 @@ case "$host" in
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1421: 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 <<EOF
+#line 1426 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1433: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
;;
+
+
esac
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+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 \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# 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'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
user_bfd_gas=
# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
@@ -1348,17 +1561,37 @@ if test "${enable_commonbfdlib+set}" = set; then
esac
fi
+using_cgen=no
+
# Generate a header file
+# If we are on a DOS filesystem, we must use gdb.ini rather than
+# .gdbinit.
+GDBINIT=".gdbinit"
+case "${host}" in
+ *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+ GDBINIT="gdb.ini"
+ ;;
+esac
+
+
te_file=generic
+# Makefile target for installing gas in $(tooldir)/bin.
+install_tooldir=install-exec-tooldir
+
canon_targets=""
+all_targets=no
if test -n "$enable_targets" ; then
for t in `echo $enable_targets | sed 's/,/ /g'`; do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
+ if test $t = "all"; then
+ all_targets=yes
+ continue
+ fi
+ result=`$ac_config_sub $t 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
# else
@@ -1394,21 +1627,29 @@ for this_target in $target $canon_targets ; do
alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
+ armb*) cpu_type=arm endian=little ;;
+ armv*l) cpu_type=arm endian=little ;;
+ armv*b) cpu_type=arm endian=big ;;
+ strongarm*) cpu_type=arm endian=little ;;
thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
i[456]86) cpu_type=i386 ;;
m680[012346]0) cpu_type=m68k ;;
m68008) cpu_type=m68k ;;
m683??) cpu_type=m68k ;;
+ m5200) cpu_type=m68k ;;
m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
+ pjl*) cpu_type=pj endian=little ;;
+ pj*) cpu_type=pj endian=big ;;
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
+ sparc86x*) cpu_type=sparc arch=sparc86x ;;
sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
v850*) cpu_type=v850 ;;
*) cpu_type=${cpu} ;;
@@ -1416,17 +1657,6 @@ for this_target in $target $canon_targets ; do
if test ${this_target} = $target ; then
target_cpu_type=${cpu_type}
- if test x${endian} = xbig; then
- cat >> confdefs.h <<\EOF
-#define TARGET_BYTES_BIG_ENDIAN 1
-EOF
-
- elif test x${endian} = xlittle; then
- cat >> confdefs.h <<\EOF
-#define TARGET_BYTES_BIG_ENDIAN 0
-EOF
-
- fi
elif test ${target_cpu_type} != ${cpu_type} ; then
continue
fi
@@ -1454,38 +1684,57 @@ EOF
arc-*-elf*) fmt=elf bfd_gas=yes ;;
- arm-*-riscix*) fmt=aout em=riscix ;;
- arm-*-aout) fmt=aout ;;
- arm-*-coff | thumb-*-coff) fmt=coff ;;
- arm-*-riscix*) fmt=aout ;;
- arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
+ arm-*-aout) fmt=aout ;;
+ arm-*-coff | thumb-*-coff) fmt=coff ;;
+ 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-*-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-*-pe | thumb-*-pe) fmt=coff em=pe ;;
+ arm-*-riscix*) fmt=aout em=riscix ;;
+
+ avr-*-*) fmt=elf bfd_gas=yes ;;
d10v-*-*) fmt=elf bfd_gas=yes ;;
+ d30v-*-*) fmt=elf bfd_gas=yes ;;
+
+
+ fr30-*-*) fmt=elf bfd_gas=yes ;;
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-*-hpux*) fmt=som em=hppa ;;
+ hppa-*-mpeix*) fmt=som em=hppa ;;
hppa-*-bsd*) fmt=som em=hppa ;;
hppa-*-hiux*) fmt=som em=hppa ;;
h8300-*-coff) fmt=coff ;;
+ i370-*-elf* | i370-*-linux*) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
+ i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
+ i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
+ i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
- fmt=elf ;;
- i386-*-freebsdelf*) fmt=elf ;;
- i386-*-freebsd*) fmt=aout em=386bsd ;;
+ fmt=elf bfd_gas=yes ;;
+ i386-*-freebsdaout* | i386-*-freebsd12.* | i386-*-freebsd12)
+ 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
@@ -1500,6 +1749,7 @@ EOF
i386-*-vsta) fmt=aout ;;
i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
fmt=coff em=go32;;
+ i386-*-rtemself*) fmt=elf ;;
i386-*-rtems*) fmt=coff ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
@@ -1507,9 +1757,11 @@ EOF
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
i386-*-pe) fmt=coff em=pe ;;
- i386-*-cygwin32*) 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-*-vxworks*) fmt=aout ;;
i960-*-bout) fmt=bout ;;
i960-*-coff) fmt=coff em=ic960 ;;
i960-*-rtems*) fmt=coff em=ic960 ;;
@@ -1518,6 +1770,7 @@ EOF
i960-*-vxworks5.0) fmt=bout ;;
i960-*-vxworks5.*) fmt=coff em=ic960 ;;
i960-*-vxworks*) fmt=bout ;;
+ i960-*-elf*) fmt=elf ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
@@ -1534,6 +1787,7 @@ EOF
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
m68k-*-linux-gnu*) fmt=elf em=linux ;;
+ m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
@@ -1543,16 +1797,20 @@ EOF
m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
m88k-*-coff*) fmt=coff ;;
+ mcore-*-elf) fmt=elf bfd_gas=yes ;;
+ mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
+
# don't change em like *-*-bsd does
mips-dec-netbsd*) fmt=elf endian=little ;;
mips-dec-openbsd*) fmt=elf endian=little ;;
- mips-dec-bsd*) fmt=aout ;;
+ mips-dec-bsd*) fmt=aout endian=little ;;
mips-sony-bsd*) fmt=ecoff ;;
mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
mips-*-ultrix*) fmt=ecoff endian=little ;;
mips-*-osf*) fmt=ecoff endian=little ;;
mips-*-ecoff*) fmt=ecoff ;;
mips-*-ecoff*) fmt=ecoff ;;
+ mips-*-pe*) fmt=coff endian=little em=pe ;;
mips-*-irix6*) fmt=elf ;;
mips-*-irix5*) fmt=elf ;;
mips-*-irix*) fmt=ecoff ;;
@@ -1561,9 +1819,16 @@ EOF
mips-*-sysv*) fmt=ecoff ;;
mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
fmt=elf ;;
+ mips-*-vxworks*) fmt=elf
+ cat >> confdefs.h <<\EOF
+#define MIPS_STABS_ELF 1
+EOF
+
+ ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
- ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
+ pj*) fmt=elf ;;
+ ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
fmt=coff em=pe ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
@@ -1590,9 +1855,12 @@ EOF
ppc-*-macos* | ppc-*-mpw*)
fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
+ ppc-*-vxworks*) fmt=elf ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
+ sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
+ sh-*-rtemself*) fmt=elf ;;
sh-*-rtems*) fmt=coff ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
@@ -1610,19 +1878,25 @@ EOF
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
fmt=elf ;;
- sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ sparc-*-netbsd*) fmt=aout em=nbsd ;;
+ sparc-*-openbsd*) fmt=aout em=nbsd ;;
+
+ strongarm-*-coff) fmt=coff ;;
+ strongarm-*-elf) fmt=elf ;;
tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
-
+ tic80-*-*) fmt=coff ;;
v850-*-*) fmt=elf bfd_gas=yes ;;
+ v850e-*-*) fmt=elf bfd_gas=yes ;;
+ v850ea-*-*) fmt=elf bfd_gas=yes ;;
vax-*-bsd* | vax-*-ultrix*)
fmt=aout ;;
vax-*-vms) fmt=vms ;;
+
z8k-*-coff | z8k-*-sim)
fmt=coff ;;
@@ -1644,6 +1918,21 @@ EOF
*-*-netware) fmt=elf ;;
esac
+ if test ${this_target} = $target ; then
+ endian_def=
+ if test x${endian} = xbig; then
+ endian_def=1
+ elif test x${endian} = xlittle; then
+ endian_def=0
+ fi
+ if test x${endian_def} != x; then
+ cat >> confdefs.h <<EOF
+#define TARGET_BYTES_BIG_ENDIAN $endian_def
+EOF
+
+ fi
+ fi
+
case ${cpu_type}-${fmt} in
alpha*-*) bfd_gas=yes ;;
arm-*) bfd_gas=yes ;;
@@ -1653,18 +1942,24 @@ EOF
ns32k-*) bfd_gas=yes ;;
ppc-*) bfd_gas=yes ;;
sparc-*) bfd_gas=yes ;;
+ strongarm-*) bfd_gas=yes ;;
*-elf) bfd_gas=yes ;;
*-ecoff) bfd_gas=yes ;;
*-som) bfd_gas=yes ;;
+ #enable bfd for coff and aout to allow testing if a bfd target is
+ #the primary target, but not for coff or aout as the primary target
+ i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
+ i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
*) ;;
esac
# Other random stuff.
- # do we need the opcodes library?
+ # Do we need the opcodes library?
case ${cpu_type} in
vax | i386 | tic30)
;;
+
*)
need_opcodes=yes
@@ -1680,17 +1975,10 @@ EOF
;;
esac
+ # Any other special object files needed ?
case ${cpu_type} in
- m32r)
- case ${extra_objects} in
- *cgen.o*) ;;
- *) extra_objects="$extra_objects cgen.o"
- cat >> confdefs.h <<\EOF
-#define USING_CGEN 1
-EOF
-
- ;;
- esac
+ fr30 | m32r)
+ using_cgen=yes
;;
m68k)
@@ -1725,11 +2013,17 @@ EOF
fi
;;
-
*)
;;
esac
+ if test $using_cgen = yes ; then
+ case "x${extra_objects}" in
+ *cgen.o*) ;;
+ *) extra_objects="$extra_objects cgen.o" ;;
+ esac
+ fi
+
# See if we really can support this configuration with the emulation code.
if test $this_target = $target ; then
@@ -1762,17 +2056,39 @@ EOF
mips-*-*-elf) case "$endian" in
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
- # Uncommenting the next line will turn on support for i386 COFF
- # in any i386 ELF configuration. This probably doesn't work
- # correctly.
- # i386-*-*-elf) emulation="i386coff i386elf" ;;
esac ;;
+ # Uncommenting the next line will turn on support for i386 AOUT
+ # for the default linux configuration
+ # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
+ #
+ i386-*-aout) emulation="i386aout" ;;
+ i386-*-coff) emulation="i386coff" ;;
+ i386-*-elf) emulation="i386elf" ;;
esac
emulations="$emulations $emulation"
done
+# Turn on all targets if possible
+if test ${all_targets} = "yes"; then
+ case ${target_cpu_type} in
+ i386)
+ case ${obj_format} in
+ aout)
+ emulations="$emulations i386coff i386elf"
+ ;;
+ coff)
+ emulations="$emulations i386aout i386elf"
+ ;;
+ elf)
+ emulations="$emulations i386aout i386coff"
+ ;;
+ esac
+ ;;
+ esac
+fi
+
# Assign floating point type. Most processors with FP support
# IEEE FP. On those that don't support FP at all, usually IEEE
# is emulated.
@@ -1785,6 +2101,19 @@ case "${obj_format}" in
"") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
esac
+# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
+cgen_cpu_prefix=""
+if test $using_cgen = yes ; then
+ case ${target_cpu} in
+ *) cgen_cpu_prefix=${target_cpu} ;;
+ esac
+
+ cat >> confdefs.h <<\EOF
+#define USING_CGEN 1
+EOF
+
+fi
+
if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
{ echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
@@ -1870,6 +2199,8 @@ 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)
@@ -1911,11 +2242,11 @@ if test `set . $formats ; shift ; echo $#` -gt 1 ; then
aout) cat >> confdefs.h <<\EOF
#define OBJ_MAYBE_AOUT 1
EOF
- ;;
+ ;;
bout) cat >> confdefs.h <<\EOF
#define OBJ_MAYBE_BOUT 1
EOF
- ;;
+ ;;
coff) cat >> confdefs.h <<\EOF
#define OBJ_MAYBE_COFF 1
EOF
@@ -1954,13 +2285,18 @@ EOF
obj_format=multi
fi
if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
- te_file=multi
- extra_objects="$extra_objects $emfiles"
DEFAULT_EMULATION=`set . $emulations ; echo $2`
- cat >> confdefs.h <<\EOF
+ # e-mips* has more than one emulation per file, e-i386* has just one at the
+ # moment. If only one emulation is specified, then don't define
+ # USE_EMULATIONS or include any of the e-files as they will only be bloat.
+ case "${obj_format}${emfiles}" in
+ multi* | *mips*)
+ extra_objects="$extra_objects $emfiles"
+ cat >> confdefs.h <<\EOF
#define USE_EMULATIONS 1
EOF
-
+ ;;
+ esac
fi
cat >> confdefs.h <<EOF
@@ -1994,6 +2330,7 @@ esac
+
case "${primary_bfd_gas}" in
yes) cat >> confdefs.h <<\EOF
#define BFD_ASSEMBLER 1
@@ -2045,15 +2382,16 @@ EOF
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2049: checking for $ac_word" >&5
+echo "configure:2386: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -2074,16 +2412,17 @@ 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:2078: checking for $ac_word" >&5
+echo "configure:2416: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -2118,25 +2457,61 @@ 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:2467: 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:2126: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2499: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 2136 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 2510 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2515: \"$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
@@ -2150,18 +2525,24 @@ else
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:2160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2541: 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:2165: checking whether we are using GNU C" >&5
+echo "configure:2546: 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
@@ -2170,7 +2551,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2174: \"$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:2555: \"$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
@@ -2181,11 +2562,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:2189: checking whether ${CC-cc} accepts -g" >&5
+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:2574: 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
@@ -2200,16 +2585,20 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
@@ -2218,15 +2607,16 @@ 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:2222: checking for $ac_word" >&5
+echo "configure:2611: 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
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_YACC="$ac_prog"
@@ -2247,18 +2637,135 @@ test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:2642: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 2657 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2663: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 2674 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2680: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 2691 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2697: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+missing_dir=`cd $ac_aux_dir && pwd`
+for ac_prog in flex lex
+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:2727: 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
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LEX" && break
+done
+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:2254: checking for $ac_word" >&5
+echo "configure:2760: 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
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_LEX="flex"
@@ -2283,7 +2790,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2287: checking for yywrap in -l$ac_lib" >&5
+echo "configure:2794: 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
@@ -2291,7 +2798,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
+#line 2802 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2302,7 +2809,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2813: \"$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
@@ -2324,132 +2831,1702 @@ fi
fi
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2329: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
+echo $ac_n "checking lex output file root""... $ac_c" 1>&6
+echo "configure:2836: 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
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+echo '%%
+%%' | $LEX
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+fi
+
+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:2857: 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
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LEXLIB"
+cat > conftest.$ac_ext <<EOF
+#line 2869 "configure"
+#include "confdefs.h"
+`cat $LEX_OUTPUT_ROOT.c`
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2876: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ cat >> confdefs.h <<\EOF
+#define YYTEXT_POINTER 1
+EOF
+
+fi
+
+
+ALL_LINGUAS=
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:2900: 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
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2921: 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
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
+#line 2926 "configure"
#include "confdefs.h"
-#include <assert.h>
-Syntax Error
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2934: \"$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*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+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
+#line 2951 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+#line 2969 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
:
else
+ cat > conftest.$ac_ext <<EOF
+#line 2990 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:3025: 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 <<EOF
+#line 3030 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:3079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:3100: 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 <<EOF
+#line 3107 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:3140: 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 <<EOF
+#line 3145 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:3173: 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 <<EOF
+#line 3178 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+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:3208: 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 <<EOF
+#line 3213 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:3220: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:3241: 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 <<EOF
+#line 3246 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:3274: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:3306: 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 <<EOF
+#line 3311 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&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:3336: 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 <<EOF
+#line 3341 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3364: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:3391: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3399 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:3418: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+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:3443: 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
+#line 3448 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3453: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3482: 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 <<EOF
-#line 2361 "configure"
+#line 3487 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
-Syntax Error
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3510: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:3535: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3543 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:3683: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+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:3711: 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
+#line 3716 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3721: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP=/lib/cpp
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3751: 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 <<EOF
+#line 3756 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3779: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
rm -f conftest*
- ac_cv_prog_CPP="$CPP"
fi
- CPP="$ac_cv_prog_CPP"
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
else
- ac_cv_prog_CPP="$CPP"
+ echo "$ac_t""no" 1>&6
fi
-echo "$ac_t""$CPP" 1>&6
+done
-echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2390: checking lex output file root" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3808: 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
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-echo '%%
-%%' | $LEX
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
+ cat > conftest.$ac_ext <<EOF
+#line 3813 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3836: \"$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
- { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
fi
+rm -f conftest*
fi
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2411: checking whether yytext is a pointer" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3870: 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
- # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS="$LIBS"
-LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 3875 "configure"
#include "confdefs.h"
-`cat $LEX_OUTPUT_ROOT.c`
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3882: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3903: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3923: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3942: 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
+#line 3947 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3952: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+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:3969: 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 <<EOF
+#line 3974 "configure"
+#include "confdefs.h"
+#include <libintl.h>
int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3981: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+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:3997: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4005 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+int main() {
+bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4016: \"$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
+ 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"
-rm -f "${LEX_OUTPUT_ROOT}.c"
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:4032: 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 <<EOF
+#line 4037 "configure"
+#include "confdefs.h"
-echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
- cat >> confdefs.h <<\EOF
-#define YYTEXT_POINTER 1
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:4044: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:4072: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4106: 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 <<EOF
+#line 4111 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4134: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:4161: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:4197: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 4229 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
EOF
+if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:4269: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:4303: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:4339: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
fi
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:4429: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ 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:4457: 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
+#line 4462 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4467: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ 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
+
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2453: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4530: 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"
@@ -2459,114 +4536,130 @@ else
fi
echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
-echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:2471: checking for Cygwin32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+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:4553: 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 <<EOF
-#line 2476 "configure"
+#line 4558 "configure"
#include "confdefs.h"
int main() {
-return __CYGWIN32__;
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_cygwin32=yes
+ ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_cygwin32=no
+ ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_cygwin32" 1>&6
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:2500: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+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:4586: 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 <<EOF
-#line 2505 "configure"
+#line 4591 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:2512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_mingw32=yes
+ ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_mingw32=no
+ ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_mingw32" 1>&6
+echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
+test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2531: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+echo "configure:4617: 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 "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:4627: \"$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
-
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
fi
+
EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2559: checking for $ac_hdr" >&5
+echo "configure:4652: 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
-#line 2564 "configure"
+#line 4657 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4662: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -2595,7 +4688,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:2599: checking whether compiling a cross-assembler" >&5
+echo "configure:4692: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
@@ -2610,19 +4703,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:2614: checking for working alloca.h" >&5
+echo "configure:4707: 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 <<EOF
-#line 2619 "configure"
+#line 4712 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4719: \"$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
@@ -2643,25 +4736,30 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2647: checking for alloca" >&5
+echo "configure:4740: 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 <<EOF
-#line 2652 "configure"
+#line 4745 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
# else
-# ifdef _AIX
- #pragma alloca
+# if HAVE_ALLOCA_H
+# include <alloca.h>
# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
+# endif
# endif
# endif
# endif
@@ -2671,7 +4769,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4773: \"$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
@@ -2696,19 +4794,19 @@ if test $ac_cv_func_alloca_works = no; then
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.o
+ ALLOCA=alloca.${ac_objext}
cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2707: checking whether alloca needs Cray hooks" >&5
+echo "configure:4805: 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 <<EOF
-#line 2712 "configure"
+#line 4810 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2733,12 +4831,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:2737: checking for $ac_func" >&5
+echo "configure:4835: 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 <<EOF
-#line 2742 "configure"
+#line 4840 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2761,7 +4859,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4863: \"$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
@@ -2788,7 +4886,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2792: checking stack direction for C alloca" >&5
+echo "configure:4890: 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
@@ -2796,7 +4894,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2800 "configure"
+#line 4898 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2815,7 +4913,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4917: \"$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
@@ -2837,21 +4935,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2841: checking for inline" >&5
+echo "configure:4939: 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 <<EOF
-#line 2848 "configure"
+#line 4946 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2881,12 +4979,12 @@ esac
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2885: checking for $ac_func" >&5
+echo "configure:4983: 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 <<EOF
-#line 2890 "configure"
+#line 4988 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2909,7 +5007,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5011: \"$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
@@ -2938,12 +5036,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2942: checking for $ac_func" >&5
+echo "configure:5040: 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 <<EOF
-#line 2947 "configure"
+#line 5045 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2966,7 +5064,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5068: \"$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
@@ -2995,12 +5093,12 @@ done
# 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:2999: checking for working assert macro" >&5
+echo "configure:5097: 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 <<EOF
-#line 3004 "configure"
+#line 5102 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -3016,7 +5114,7 @@ assert (a == b
; return 0; }
EOF
-if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
@@ -3057,12 +5155,12 @@ gas_test_headers="
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:3061: checking whether declaration is required for strstr" >&5
+echo "configure:5159: 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 <<EOF
-#line 3066 "configure"
+#line 5164 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3073,7 +5171,7 @@ x = (f) strstr;
; return 0; }
EOF
-if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5175: \"$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
@@ -3085,21 +5183,21 @@ fi
rm -f conftest*
fi
echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
-test $gas_cv_decl_needed_strstr = no || {
+if test $gas_cv_decl_needed_strstr = yes; then
cat >> confdefs.h <<\EOF
#define NEED_DECLARATION_STRSTR 1
EOF
-}
+fi
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:3098: checking whether declaration is required for malloc" >&5
+echo "configure:5196: 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 <<EOF
-#line 3103 "configure"
+#line 5201 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3110,7 +5208,7 @@ x = (f) malloc;
; return 0; }
EOF
-if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5212: \"$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
@@ -3122,21 +5220,21 @@ fi
rm -f conftest*
fi
echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
-test $gas_cv_decl_needed_malloc = no || {
+if test $gas_cv_decl_needed_malloc = yes; then
cat >> confdefs.h <<\EOF
#define NEED_DECLARATION_MALLOC 1
EOF
-}
+fi
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:3135: checking whether declaration is required for free" >&5
+echo "configure:5233: 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 <<EOF
-#line 3140 "configure"
+#line 5238 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3147,7 +5245,7 @@ x = (f) free;
; return 0; }
EOF
-if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5249: \"$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
@@ -3159,21 +5257,21 @@ fi
rm -f conftest*
fi
echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
-test $gas_cv_decl_needed_free = no || {
+if test $gas_cv_decl_needed_free = yes; then
cat >> confdefs.h <<\EOF
#define NEED_DECLARATION_FREE 1
EOF
-}
+fi
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:3172: checking whether declaration is required for sbrk" >&5
+echo "configure:5270: 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 <<EOF
-#line 3177 "configure"
+#line 5275 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3184,7 +5282,7 @@ x = (f) sbrk;
; return 0; }
EOF
-if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5286: \"$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
@@ -3196,24 +5294,61 @@ fi
rm -f conftest*
fi
echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
-test $gas_cv_decl_needed_sbrk = no || {
+if test $gas_cv_decl_needed_sbrk = yes; then
cat >> confdefs.h <<\EOF
#define NEED_DECLARATION_SBRK 1
EOF
-}
+fi
+
+
+echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
+echo "configure:5307: 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 <<EOF
+#line 5312 "configure"
+#include "confdefs.h"
+$gas_test_headers
+int main() {
+
+typedef char **f;
+f x;
+x = (f) environ;
+
+; return 0; }
+EOF
+if { (eval echo configure:5323: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gas_cv_decl_needed_environ=yes
+fi
+rm -f conftest*
+fi
+echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
+if test $gas_cv_decl_needed_environ = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_ENVIRON 1
+EOF
+
+fi
# Does errno.h declare errno, or do we have to add a separate declaration
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:3212: checking whether declaration is required for errno" >&5
+echo "configure:5347: 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 <<EOF
-#line 3217 "configure"
+#line 5352 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -3228,7 +5363,7 @@ x = (f) errno;
; return 0; }
EOF
-if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5367: \"$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
@@ -3240,12 +5375,12 @@ fi
rm -f conftest*
fi
echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
-test $gas_cv_decl_needed_errno = no || {
+if test $gas_cv_decl_needed_errno = yes; then
cat >> confdefs.h <<\EOF
#define NEED_DECLARATION_ERRNO 1
EOF
-}
+fi
@@ -3273,7 +5408,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -3340,7 +5475,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -3351,7 +5486,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3364,6 +5499,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -3398,8 +5534,8 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
@@ -3410,14 +5546,15 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@RANLIB@%$RANLIB%g
s%@CC@%$CC%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
+s%@GDBINIT@%$GDBINIT%g
+s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
s%@extra_objects@%$extra_objects%g
s%@target_cpu_type@%$target_cpu_type%g
s%@obj_format@%$obj_format%g
s%@te_file@%$te_file%g
+s%@install_tooldir@%$install_tooldir%g
s%@atof@%$atof%g
s%@BFDLIB@%$BFDLIB%g
s%@OPCODES_LIB@%$OPCODES_LIB%g
@@ -3427,9 +5564,31 @@ s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@CPP@%$CPP%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+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%@ALLOCA@%$ALLOCA%g
CEOF
EOF
@@ -3471,7 +5630,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3641,6 +5800,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
target_cpu_type=${target_cpu_type}
+ cgen_cpu_prefix=${cgen_cpu_prefix}
obj_format=${obj_format}
te_file=${te_file}
EOF
@@ -3651,9 +5811,11 @@ rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itb
echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
echo '#include "te-'"${te_file}"'.h"' > targ-env.h
echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
- case ${target_cpu_type} in
- m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
- esac
+ if test "x$cgen_cpu_prefix" != x ; then
+ echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
+ fi
+
+ sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in
index ebb6202..8ee42a6 100644
--- a/contrib/binutils/gas/configure.in
+++ b/contrib/binutils/gas/configure.in
@@ -5,12 +5,12 @@ dnl brackets, be sure changequote invocations surround it.
dnl
dnl
dnl v2.5 needed for --bindir et al
-AC_PREREQ(2.5)
+AC_PREREQ(2.13)
AC_INIT(as.h)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(gas, 2.9.1)
+AM_INIT_AUTOMAKE(gas, 2.9.5)
AM_PROG_LIBTOOL
@@ -38,15 +38,35 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
+using_cgen=no
+
# Generate a header file
AM_CONFIG_HEADER(config.h:config.in)
+# If we are on a DOS filesystem, we must use gdb.ini rather than
+# .gdbinit.
+GDBINIT=".gdbinit"
+case "${host}" in
+ *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+ GDBINIT="gdb.ini"
+ ;;
+esac
+AC_SUBST(GDBINIT)
+
te_file=generic
+# Makefile target for installing gas in $(tooldir)/bin.
+install_tooldir=install-exec-tooldir
+
canon_targets=""
+all_targets=no
if test -n "$enable_targets" ; then
for t in `echo $enable_targets | sed 's/,/ /g'`; do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
+ if test $t = "all"; then
+ all_targets=yes
+ continue
+ fi
+ result=`$ac_config_sub $t 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
# else
@@ -72,23 +92,31 @@ changequote([,])dnl
alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
+ armb*) cpu_type=arm endian=little ;;
+ armv*l) cpu_type=arm endian=little ;;
+ armv*b) cpu_type=arm endian=big ;;
+ strongarm*) cpu_type=arm endian=little ;;
thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
changequote(,)dnl
i[456]86) cpu_type=i386 ;;
m680[012346]0) cpu_type=m68k ;;
+changequote([,])dnl
m68008) cpu_type=m68k ;;
m683??) cpu_type=m68k ;;
-changequote([,])dnl
+ m5200) cpu_type=m68k ;;
m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
+ pjl*) cpu_type=pj endian=little ;;
+ pj*) cpu_type=pj endian=big ;;
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
+ sparc86x*) cpu_type=sparc arch=sparc86x ;;
sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
v850*) cpu_type=v850 ;;
*) cpu_type=${cpu} ;;
@@ -96,11 +124,6 @@ changequote([,])dnl
if test ${this_target} = $target ; then
target_cpu_type=${cpu_type}
- if test x${endian} = xbig; then
- AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1)
- elif test x${endian} = xlittle; then
- AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0)
- fi
elif test ${target_cpu_type} != ${cpu_type} ; then
continue
fi
@@ -128,49 +151,70 @@ changequote([,])dnl
arc-*-elf*) fmt=elf bfd_gas=yes ;;
- arm-*-riscix*) fmt=aout em=riscix ;;
- arm-*-aout) fmt=aout ;;
- arm-*-coff | thumb-*-coff) fmt=coff ;;
- arm-*-riscix*) fmt=aout ;;
- arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
+ arm-*-aout) fmt=aout ;;
+ arm-*-coff | thumb-*-coff) fmt=coff ;;
+ 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-*-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-*-pe | thumb-*-pe) fmt=coff em=pe ;;
+ arm-*-riscix*) fmt=aout em=riscix ;;
+
+ avr-*-*) fmt=elf bfd_gas=yes ;;
d10v-*-*) fmt=elf bfd_gas=yes ;;
+ d30v-*-*) fmt=elf bfd_gas=yes ;;
+
+
+ fr30-*-*) fmt=elf bfd_gas=yes ;;
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-*-hpux*) fmt=som em=hppa ;;
+ hppa-*-mpeix*) fmt=som em=hppa ;;
hppa-*-bsd*) fmt=som em=hppa ;;
hppa-*-hiux*) fmt=som em=hppa ;;
h8300-*-coff) fmt=coff ;;
+ i370-*-elf* | i370-*-linux*) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
+ i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
+ i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
+ i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
- fmt=elf ;;
- i386-*-freebsdelf*) fmt=elf ;;
- i386-*-freebsd*) fmt=aout em=386bsd ;;
+ 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
if test ${this_target} = $target; then
- AC_DEFINE(SCO_ELF)
+ AC_DEFINE(SCO_ELF, 1,
+ [Define if defaulting to ELF on SCO 5.])
fi
;;
i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
fmt=coff em=go32;;
+ i386-*-rtemself*) fmt=elf ;;
i386-*-rtems*) fmt=coff ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
@@ -178,9 +222,11 @@ changequote([,])dnl
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
i386-*-pe) fmt=coff em=pe ;;
- i386-*-cygwin32*) 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-*-vxworks*) fmt=aout ;;
i960-*-bout) fmt=bout ;;
i960-*-coff) fmt=coff em=ic960 ;;
i960-*-rtems*) fmt=coff em=ic960 ;;
@@ -189,6 +235,7 @@ changequote([,])dnl
i960-*-vxworks5.0) fmt=bout ;;
i960-*-vxworks5.*) fmt=coff em=ic960 ;;
i960-*-vxworks*) fmt=bout ;;
+ i960-*-elf*) fmt=elf ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
@@ -205,6 +252,7 @@ changequote([,])dnl
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
m68k-*-linux-gnu*) fmt=elf em=linux ;;
+ m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
@@ -214,16 +262,20 @@ changequote([,])dnl
m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
m88k-*-coff*) fmt=coff ;;
+ mcore-*-elf) fmt=elf bfd_gas=yes ;;
+ mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
+
# don't change em like *-*-bsd does
mips-dec-netbsd*) fmt=elf endian=little ;;
mips-dec-openbsd*) fmt=elf endian=little ;;
- mips-dec-bsd*) fmt=aout ;;
+ mips-dec-bsd*) fmt=aout endian=little ;;
mips-sony-bsd*) fmt=ecoff ;;
mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
mips-*-ultrix*) fmt=ecoff endian=little ;;
mips-*-osf*) fmt=ecoff endian=little ;;
mips-*-ecoff*) fmt=ecoff ;;
mips-*-ecoff*) fmt=ecoff ;;
+ mips-*-pe*) fmt=coff endian=little em=pe ;;
mips-*-irix6*) fmt=elf ;;
mips-*-irix5*) fmt=elf ;;
mips-*-irix*) fmt=ecoff ;;
@@ -232,9 +284,14 @@ changequote([,])dnl
mips-*-sysv*) fmt=ecoff ;;
mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
fmt=elf ;;
+ mips-*-vxworks*) fmt=elf
+ AC_DEFINE(MIPS_STABS_ELF, 1,
+ [Use ELF stabs for MIPS, not ECOFF stabs])
+ ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
- ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
+ pj*) fmt=elf ;;
+ ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
fmt=coff em=pe ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
@@ -248,7 +305,8 @@ changequote([,])dnl
;;
ppc-*-solaris*) fmt=elf
if test ${this_target} = $target; then
- AC_DEFINE(TARGET_SOLARIS_COMMENT)
+ AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
+ [Define if default target is PowerPC Solaris.])
fi
if test x${endian} = xbig; then
AC_MSG_ERROR(Solaris must be configured little endian)
@@ -258,9 +316,12 @@ changequote([,])dnl
ppc-*-macos* | ppc-*-mpw*)
fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
+ ppc-*-vxworks*) fmt=elf ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
+ sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
+ sh-*-rtemself*) fmt=elf ;;
sh-*-rtems*) fmt=coff ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
@@ -278,19 +339,25 @@ changequote([,])dnl
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
fmt=elf ;;
- sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ sparc-*-netbsd*) fmt=aout em=nbsd ;;
+ sparc-*-openbsd*) fmt=aout em=nbsd ;;
+
+ strongarm-*-coff) fmt=coff ;;
+ strongarm-*-elf) fmt=elf ;;
tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
-
+ tic80-*-*) fmt=coff ;;
v850-*-*) fmt=elf bfd_gas=yes ;;
+ v850e-*-*) fmt=elf bfd_gas=yes ;;
+ v850ea-*-*) fmt=elf bfd_gas=yes ;;
vax-*-bsd* | vax-*-ultrix*)
fmt=aout ;;
vax-*-vms) fmt=vms ;;
+
z8k-*-coff | z8k-*-sim)
fmt=coff ;;
@@ -312,6 +379,19 @@ changequote([,])dnl
*-*-netware) fmt=elf ;;
esac
+ if test ${this_target} = $target ; then
+ endian_def=
+ if test x${endian} = xbig; then
+ endian_def=1
+ elif test x${endian} = xlittle; then
+ endian_def=0
+ fi
+ if test x${endian_def} != x; then
+ AC_DEFINE_UNQUOTED(TARGET_BYTES_BIG_ENDIAN, $endian_def,
+ [Define as 1 if big endian.])
+ fi
+ fi
+
case ${cpu_type}-${fmt} in
alpha*-*) bfd_gas=yes ;;
arm-*) bfd_gas=yes ;;
@@ -321,18 +401,24 @@ changequote([,])dnl
ns32k-*) bfd_gas=yes ;;
ppc-*) bfd_gas=yes ;;
sparc-*) bfd_gas=yes ;;
+ strongarm-*) bfd_gas=yes ;;
*-elf) bfd_gas=yes ;;
*-ecoff) bfd_gas=yes ;;
*-som) bfd_gas=yes ;;
+ #enable bfd for coff and aout to allow testing if a bfd target is
+ #the primary target, but not for coff or aout as the primary target
+ i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
+ i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
*) ;;
esac
# Other random stuff.
- # do we need the opcodes library?
+ # Do we need the opcodes library?
case ${cpu_type} in
vax | i386 | tic30)
;;
+
*)
need_opcodes=yes
@@ -348,14 +434,10 @@ changequote([,])dnl
;;
esac
+ # Any other special object files needed ?
case ${cpu_type} in
- m32r)
- case ${extra_objects} in
- *cgen.o*) ;;
- *) extra_objects="$extra_objects cgen.o"
- AC_DEFINE(USING_CGEN)
- ;;
- esac
+ fr30 | m32r)
+ using_cgen=yes
;;
m68k)
@@ -384,14 +466,20 @@ changequote([,])dnl
sparc)
if test $this_target = $target ; then
- AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}")
+ AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
fi
;;
-
*)
;;
esac
+ if test $using_cgen = yes ; then
+ case "x${extra_objects}" in
+ *cgen.o*) ;;
+ *) extra_objects="$extra_objects cgen.o" ;;
+ esac
+ fi
+
# See if we really can support this configuration with the emulation code.
if test $this_target = $target ; then
@@ -424,17 +512,39 @@ changequote([,])dnl
mips-*-*-elf) case "$endian" in
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
- # Uncommenting the next line will turn on support for i386 COFF
- # in any i386 ELF configuration. This probably doesn't work
- # correctly.
- # i386-*-*-elf) emulation="i386coff i386elf" ;;
esac ;;
+ # Uncommenting the next line will turn on support for i386 AOUT
+ # for the default linux configuration
+ # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
+ #
+ i386-*-aout) emulation="i386aout" ;;
+ i386-*-coff) emulation="i386coff" ;;
+ i386-*-elf) emulation="i386elf" ;;
esac
emulations="$emulations $emulation"
done
+# Turn on all targets if possible
+if test ${all_targets} = "yes"; then
+ case ${target_cpu_type} in
+ i386)
+ case ${obj_format} in
+ aout)
+ emulations="$emulations i386coff i386elf"
+ ;;
+ coff)
+ emulations="$emulations i386aout i386elf"
+ ;;
+ elf)
+ emulations="$emulations i386aout i386coff"
+ ;;
+ esac
+ ;;
+ esac
+fi
+
# Assign floating point type. Most processors with FP support
# IEEE FP. On those that don't support FP at all, usually IEEE
# is emulated.
@@ -447,6 +557,16 @@ case "${obj_format}" in
"") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;;
esac
+# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
+cgen_cpu_prefix=""
+if test $using_cgen = yes ; then
+ case ${target_cpu} in
+ *) cgen_cpu_prefix=${target_cpu} ;;
+ esac
+ AC_SUBST(cgen_cpu_prefix)
+ AC_DEFINE(USING_CGEN, 1, [Using cgen code?])
+fi
+
dnl
dnl Make sure the desired support files exist.
dnl
@@ -484,9 +604,9 @@ esac
case ${obj_format} in
coff)
case ${target_cpu_type} in
- i386) AC_DEFINE(I386COFF) ;;
- m68k) AC_DEFINE(M68KCOFF) ;;
- m88k) AC_DEFINE(M88KCOFF) ;;
+ i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
+ m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
+ m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
esac
;;
esac
@@ -514,6 +634,8 @@ 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)
@@ -528,35 +650,41 @@ GAS_UNIQ(emfiles)
if test `set . $formats ; shift ; echo $#` -gt 1 ; then
for fmt in $formats ; do
case $fmt in
- aout) AC_DEFINE(OBJ_MAYBE_AOUT) ;;
- bout) AC_DEFINE(OBJ_MAYBE_BOUT) ;;
- coff) AC_DEFINE(OBJ_MAYBE_COFF) ;;
- ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF) ;;
- elf) AC_DEFINE(OBJ_MAYBE_ELF) ;;
- generic) AC_DEFINE(OBJ_MAYBE_GENERIC) ;;
- hp300) AC_DEFINE(OBJ_MAYBE_HP300) ;;
- ieee) AC_DEFINE(OBJ_MAYBE_IEEE) ;;
- som) AC_DEFINE(OBJ_MAYBE_SOM) ;;
- vms) AC_DEFINE(OBJ_MAYBE_VMS) ;;
+ aout) AC_DEFINE(OBJ_MAYBE_AOUT, 1, [a.out support?]) ;;
+ bout) AC_DEFINE(OBJ_MAYBE_BOUT, 1, [b.out support?]) ;;
+ coff) AC_DEFINE(OBJ_MAYBE_COFF, 1, [COFF support?]) ;;
+ ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF, 1, [ECOFF support?]) ;;
+ elf) AC_DEFINE(OBJ_MAYBE_ELF, 1, [ELF support?]) ;;
+ generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;;
+ hp300) AC_DEFINE(OBJ_MAYBE_HP300, 1, [HP300 support?]) ;;
+ ieee) AC_DEFINE(OBJ_MAYBE_IEEE, 1, [IEEE support?]) ;;
+ som) AC_DEFINE(OBJ_MAYBE_SOM, 1, [SOM support?]) ;;
+ vms) AC_DEFINE(OBJ_MAYBE_VMS, 1, [VMS support?]) ;;
esac
extra_objects="$extra_objects obj-$fmt.o"
done
obj_format=multi
fi
if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
- te_file=multi
- extra_objects="$extra_objects $emfiles"
DEFAULT_EMULATION=`set . $emulations ; echo $2`
- AC_DEFINE(USE_EMULATIONS)
+ # e-mips* has more than one emulation per file, e-i386* has just one at the
+ # moment. If only one emulation is specified, then don't define
+ # USE_EMULATIONS or include any of the e-files as they will only be bloat.
+ case "${obj_format}${emfiles}" in
+ multi* | *mips*)
+ extra_objects="$extra_objects $emfiles"
+ AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
+ esac
fi
AC_SUBST(extra_objects)
-AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS)
-AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION")
+AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.])
+AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION",
+ [Default emulation.])
case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
yes-*-coff) need_bfd=yes ;;
no-*-coff) need_bfd=yes
- AC_DEFINE(MANY_SEGMENTS) ;;
+ AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;;
esac
reject_dev_configs=yes
@@ -570,11 +698,12 @@ esac
AC_SUBST(target_cpu_type)
AC_SUBST(obj_format)
AC_SUBST(te_file)
+AC_SUBST(install_tooldir)
AC_SUBST(atof)
dnl AC_SUBST(emulation)
case "${primary_bfd_gas}" in
- yes) AC_DEFINE(BFD_ASSEMBLER)
+ yes) AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?])
need_bfd=yes ;;
esac
@@ -597,21 +726,22 @@ AC_SUBST(OPCODES_LIB)
AC_SUBST(ALL_OBJ_DEPS)
-AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}")
-AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}")
-AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}")
-AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
-AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
+AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}", [Target alias.])
+AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}", [Canonical target.])
+AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", [Target CPU.])
+AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
+AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
AC_PROG_CC
AC_PROG_YACC
-AC_PROG_LEX
-AC_DECL_YYTEXT
+AM_PROG_LEX
+
+ALL_LINGUAS=
+CY_GNU_GETTEXT
AM_MAINTAINER_MODE
-AM_CYGWIN32
-AM_EXEEXT
+AC_EXEEXT
AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
@@ -622,7 +752,7 @@ if test "${host}" = "${target}"; then
cross_gas=no
else
cross_gas=yes
- AC_DEFINE(CROSS_COMPILE)
+ AC_DEFINE(CROSS_COMPILE, 1, [Compiling cross-assembler?])
fi
AC_MSG_RESULT($cross_gas)
@@ -667,6 +797,7 @@ GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
# Does errno.h declare errno, or do we have to add a separate declaration
# for it?
@@ -684,15 +815,18 @@ dnl the build directory which include the right .h file. Make sure
dnl the old symlinks don't exist, so that a reconfigure in an existing
dnl directory behaves reasonably.
-AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in,
+AC_OUTPUT(Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in,
[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
echo '#include "te-'"${te_file}"'.h"' > targ-env.h
echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
- case ${target_cpu_type} in
- m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
- esac],
+ if test "x$cgen_cpu_prefix" != x ; then
+ echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
+ fi
+
+ sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
[target_cpu_type=${target_cpu_type}
+ cgen_cpu_prefix=${cgen_cpu_prefix}
obj_format=${obj_format}
te_file=${te_file}])
diff --git a/contrib/binutils/gas/dep-in.sed b/contrib/binutils/gas/dep-in.sed
index e4ac32b..8771f0f 100644
--- a/contrib/binutils/gas/dep-in.sed
+++ b/contrib/binutils/gas/dep-in.sed
@@ -12,12 +12,12 @@ 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! struc-symbol.h!!g
s! write.h!!g
s! frags.h!!g
s! hash.h!!g
diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c
index 8cb3267..f17c7c8 100644
--- a/contrib/binutils/gas/depend.c
+++ b/contrib/binutils/gas/depend.c
@@ -192,7 +192,7 @@ print_dependencies ()
f = fopen (dep_file, "w");
if (f == NULL)
{
- as_warn ("Can't open `%s' for writing", dep_file);
+ as_warn (_("Can't open `%s' for writing"), dep_file);
return;
}
@@ -204,5 +204,5 @@ print_dependencies ()
putc ('\n', f);
if (fclose (f))
- as_warn ("Can't close %s", dep_file);
+ as_warn (_("Can't close `%s'"), dep_file);
}
diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am
index 8949476..c6eaf77 100644
--- a/contrib/binutils/gas/doc/Makefile.am
+++ b/contrib/binutils/gas/doc/Makefile.am
@@ -22,22 +22,31 @@ CPU_DOCS = \
c-h8300.texi \
c-h8500.texi \
c-hppa.texi \
+ c-i370.texi \
c-i386.texi \
c-i960.texi \
+ c-m32r.texi \
c-m68k.texi \
c-mips.texi \
c-ns32k.texi \
+ c-pj.texi \
c-sh.texi \
c-sparc.texi \
c-vax.texi \
c-v850.texi \
c-z8k.texi
-as.info: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
-as.dvi: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+gasver.texi: Makefile
+ rm -f $@
+ echo '@set VERSION $(VERSION)' > $@
+
+as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
+as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
# This one isn't ready for prime time yet. Not even a little bit.
noinst_TEXINFOS = internals.texi
DISTCLEANFILES = asconfig.texi
+
+MAINTAINERCLEANFILES = gasver.texi
diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in
index d9ee2b2..0be6179 100644
--- a/contrib/binutils/gas/doc/Makefile.in
+++ b/contrib/binutils/gas/doc/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -62,23 +64,46 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
+AS = @AS@
BFDLIB = @BFDLIB@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
-LD = @LD@
+GDBINIT = @GDBINIT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LEX = @LEX@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-NM = @NM@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
atof = @atof@
+cgen_cpu_prefix = @cgen_cpu_prefix@
extra_objects = @extra_objects@
+install_tooldir = @install_tooldir@
+l = @l@
obj_format = @obj_format@
target_cpu_type = @target_cpu_type@
te_file = @te_file@
@@ -86,7 +111,7 @@ te_file = @te_file@
AUTOMAKE_OPTIONS = cygnus
# What version of the manual you want; "all" includes everything
-CONFIG=all
+CONFIG = all
man_MANS = as.1
@@ -99,22 +124,28 @@ CPU_DOCS = \
c-h8300.texi \
c-h8500.texi \
c-hppa.texi \
+ c-i370.texi \
c-i386.texi \
c-i960.texi \
+ c-m32r.texi \
c-m68k.texi \
c-mips.texi \
c-ns32k.texi \
+ c-pj.texi \
c-sh.texi \
c-sparc.texi \
c-vax.texi \
c-v850.texi \
c-z8k.texi
+
# This one isn't ready for prime time yet. Not even a little bit.
noinst_TEXINFOS = internals.texi
DISTCLEANFILES = asconfig.texi
+
+MAINTAINERCLEANFILES = gasver.texi
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@@ -123,7 +154,8 @@ TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
INFO_DEPS = as.info gasp.info
DVIS = as.dvi gasp.dvi
TEXINFOS = as.texinfo gasp.texi
-MANS = as.1
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = Makefile.am Makefile.in
@@ -132,15 +164,14 @@ DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
-default: all
-
+GZIP_ENV = --best
+all: all-redirect
.SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -160,7 +191,7 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@@ -176,28 +207,42 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.txi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(infodir)
- @for file in $(INFO_DEPS); do \
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- for file in $(INFO_DEPS); do \
- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
@@ -206,17 +251,20 @@ uninstall-info:
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
- for file in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
test -z "$ii" \
- || install-info --info-dir=$(infodir) --remove $$file; \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
- $(NORMAL_UNINSTALL)
- for file in $(INFO_DEPS); do \
- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ @$(NORMAL_UNINSTALL)
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
- for base in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
@@ -245,21 +293,45 @@ maintainer-clean-aminfo:
fi; \
done
clean-info: mostlyclean-aminfo
-install-man: $(MANS)
- $(NORMAL_INSTALL)
- $(mkinstalldirs) $(mandir)/man1
- @sect=1; \
- inst=`echo "as" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/as.1; then file=$(srcdir)/as.1; \
- else file=as.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
-uninstall-man:
- $(NORMAL_UNINSTALL)
- -inst=`echo "as" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
+install-man1:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+uninstall-man1:
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+install-man: $(MANS)
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+ @$(NORMAL_UNINSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS
TAGS:
@@ -271,68 +343,82 @@ subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
done
- $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-info: $(INFO_DEPS)
-dvi: $(DVIS)
-check:
- $(MAKE)
-installcheck:
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+info-am: $(INFO_DEPS)
+info: info-am
+dvi-am: $(DVIS)
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am:
install-info: install-info-am
-install-exec:
- @$(NORMAL_INSTALL)
-
-install-data: install-man
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall: uninstall-man
-
-all: Makefile $(MANS)
-
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-man
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-man
+uninstall: uninstall-am
+all-am: Makefile $(MANS)
+all-redirect: all-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
- $(mkinstalldirs) $(mandir)/man1
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean: mostlyclean-aminfo mostlyclean-generic
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+
+mostlyclean: mostlyclean-am
-clean: clean-aminfo clean-generic mostlyclean
+clean-am: clean-aminfo clean-generic mostlyclean-am
-distclean: distclean-aminfo distclean-generic clean
- -rm -f config.status
+clean: clean-am
+
+distclean-am: distclean-aminfo distclean-generic clean-am
-rm -f libtool
-maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
- distclean
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
+ distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
-distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man \
-uninstall-man tags distdir info dvi installcheck install-info \
-install-exec install-data install uninstall all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean: maintainer-clean-am
+
+.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
+distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man1 \
+uninstall-man1 install-man uninstall-man tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
@@ -342,8 +428,12 @@ asconfig.texi: $(CONFIG).texi
|| ln $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
|| cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
-as.info: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
-as.dvi: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+gasver.texi: Makefile
+ rm -f $@
+ echo '@set VERSION $(VERSION)' > $@
+
+as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
+as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
# 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/doc/all.texi b/contrib/binutils/gas/doc/all.texi
index 2638dbc..d1058fb 100644
--- a/contrib/binutils/gas/doc/all.texi
+++ b/contrib/binutils/gas/doc/all.texi
@@ -1,4 +1,4 @@
-@c Copyright 1992, 1993 Free Software Foundation, Inc.
+@c Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
@c This file is part of the documentation for the GAS manual
@c Configuration settings for all-inclusive version of manual
@@ -29,20 +29,24 @@
@set ARC
@set ARM
@set D10V
+@set D30V
@set H8/300
@set H8/500
-@set SH
+@set HPPA
+@set I370
@set I80386
@set I960
-@set MIPS
@set M32R
@set M680X0
-@set Z8000
+@set MCORE
+@set MIPS
+@set PJ
+@set SH
@set SPARC
+@set V850
@set VAX
@set VXWORKS
-@set HPPA
-@set V850
+@set Z8000
@c Does this version of the assembler use the difference-table kluge?
@set DIFF-TBL-KLUGE
diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1
index adf2886..08d5805 100644
--- a/contrib/binutils/gas/doc/as.1
+++ b/contrib/binutils/gas/doc/as.1
@@ -195,8 +195,14 @@ Announce \c
.B as\c
\& version
.TP
-.B \-W
-Suppress warning messages
+.B \-W, \-\-no-warn
+Suppress warning messages.
+.TP
+.B \-\-fatal\-warnings
+Consider warnings to be fatal.
+.TP
+.B \-\-warn
+Just warn on warnings.
.TP
.IR "\-\^\-" "\ |\ " "files\|.\|.\|."
Source files to assemble, or standard input (\c
diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo
index 7bfdc08..5917a00 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, 1998
+@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@@ -16,6 +16,7 @@
@set have-stabs
@c ---
@include asconfig.texi
+@include gasver.texi
@c ---
@c common OR combinations of conditions
@ifset AOUT
@@ -115,7 +116,7 @@ into another language, under the above conditions for modified versions.
@subtitle for the @value{TARGET} family
@end ifclear
@sp 1
-@subtitle January 1994
+@subtitle Version @value{VERSION}
@sp 1
@sp 13
The Free Software Foundation Inc. thanks The Nice Computer
@@ -160,7 +161,8 @@ into another language, under the above conditions for modified versions.
@node Top
@top Using @value{AS}
-This file is a user guide to the @sc{gnu} assembler @code{@value{AS}}.
+This file is a user guide to the @sc{gnu} assembler @code{@value{AS}} version
+@value{VERSION}.
@ifclear GENERIC
This version of the file describes @code{@value{AS}} configured to generate
code for @value{TARGET} architectures.
@@ -200,9 +202,10 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
@c to be limited to one line for the header.
@smallexample
@value{AS} [ -a[cdhlns][=file] ] [ -D ] [ --defsym @var{sym}=@var{val} ]
- [ -f ] [ --gstabs ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
+ [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
[ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ]
- [ -version ] [ --version ] [ -W ] [ -w ] [ -x ] [ -Z ]
+ [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ]
+ [ -w ] [ -x ] [ -Z ]
@ifset A29K
@c am29k has no machine-dependent assembler options
@end ifset
@@ -210,22 +213,36 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
[ -mbig-endian | -mlittle-endian ]
@end ifset
@ifset ARM
- [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m[i]] ]
- [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t ]
+ [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]60 |
+ -m[arm]600 | -m[arm]610 | -m[arm]620 | -m[arm]7[t][[d]m[i]][fe] | -m[arm]70 |
+ -m[arm]700 | -m[arm]710[c] | -m[arm]7100 | -m[arm]7500 | -m[arm]8 |
+ -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 ]
[ -mthumb | -mall ]
[ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ]
[ -EB | -EL ]
- [ -mapcs-32 | -mapcs-26 ]
+ [ -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant ]
+ [ -mthumb-interwork ]
+ [ -moabi ]
+ [ -k ]
@end ifset
@ifset D10V
[ -O ]
@end ifset
+@ifset D30V
+ [ -O | -n | -N ]
+@end ifset
@ifset H8
@c Hitachi family chips have no machine-dependent assembler options
@end ifset
@ifset HPPA
@c HPPA has no machine-dependent assembler options (yet).
@end ifset
+@ifset PJ
+ [ -mb | -me ]
+@end ifset
@ifset SPARC
@c The order here is important. See c-sparc.texi.
[ -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
@@ -243,6 +260,9 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
@ifset M680X0
[ -l ] [ -m68000 | -m68010 | -m68020 | ... ]
@end ifset
+@ifset MCORE
+ [ -jsri2bsr ] [ -sifilter ] [ -relax ]
+@end ifset
@ifset MIPS
[ -nocpp ] [ -EL ] [ -EB ] [ -G @var{num} ] [ -mcpu=@var{CPU} ]
[ -mips1 ] [ -mips2 ] [ -mips3 ] [ -m4650 ] [ -no-m4650 ]
@@ -303,6 +323,10 @@ compiler output).
Generate stabs debugging information for each assembler line. This
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.
+
@item --help
Print a summary of the command line options and exit.
@@ -347,8 +371,15 @@ Print the @code{as} version.
Print the @code{as} version and exit.
@item -W
+@itemx --no-warn
Suppress warning messages.
+@item --fatal-warnings
+Treat warnings as errors.
+
+@item --warn
+Don't suppress warning messages or treat them as errors.
+
@item -w
Ignored.
@@ -387,16 +418,23 @@ The following options are available when @value{AS} is configured for the ARM
processor family.
@table @code
-@item -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m] | -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t
-Specify which variant of the ARM architecture is the target.
+@item -m[arm][1|2|3|6|7|8|9][...]
+Specify which ARM processor variant is the target.
+@item -m[arm]v[2|2a|3|3m|4|4t|5|5t]
+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.
-@item -mapcs-32 | -mapcs-26
+@item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi
Select which procedure calling convention is in use.
@item -EB | -EL
Select either big-endian (-EB) or little-endian (-EL) output.
+@item -mthumb-interwork
+Specify that the code has been generated with interworking between Thumb and
+ARM code in mind.
+@item -k
+Specify that PIC code has been generated.
@end table
@end ifset
@@ -411,6 +449,24 @@ Optimize output by parallelizing instructions.
@end table
@end ifset
+@ifset D30V
+The following options are available when @value{AS} is configured for a D30V
+processor.
+@table @code
+@cindex D30V optimization
+@cindex optimization, D30V
+@item -O
+Optimize output by parallelizing instructions.
+
+@cindex D30V nops
+@item -n
+Warn when nops are generated.
+
+@cindex D30V nops after 32-bit multiply
+@item -N
+Warn when a nop after a 32-bit multiply instruction is generated.
+@end table
+@end ifset
@ifset I960
The following options are available when @value{AS} is configured for the
@@ -459,6 +515,26 @@ unit coprocessor. The default is to assume an MMU for 68020 and up.
@end table
@end ifset
+@ifset PJ
+The following options are available when @value{AS} is configured for
+a picoJava processor.
+
+@table @code
+
+@cindex PJ endianness
+@cindex endianness, PJ
+@cindex big endian output, PJ
+@item -mb
+Generate ``big endian'' format output.
+
+@cindex little endian output, PJ
+@item -ml
+Generate ``little endian'' format output.
+
+@end table
+@end ifset
+
+
@ifset SPARC
The following options are available when @code{@value{AS}} is configured
for the SPARC architecture:
@@ -565,6 +641,28 @@ break exception.
@end table
@end ifset
+@ifset MCORE
+The following options are available when @value{AS} is configured for
+an MCore processor.
+
+@table @code
+@item -jsri2bsr
+@itemx -nojsri2bsr
+Enable or disable the JSRI to BSR transformation. By default this is enabled.
+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.
+
+@item -relax
+Alter jump instructions for long displacements.
+
+
+@end table
+@end ifset
+
@menu
* Manual:: Structure of this Manual
* GNU Assembler:: The GNU Assembler
@@ -791,10 +889,11 @@ number in a physical file; the other refers to a line number in a
to @code{@value{AS}}.
@dfn{Logical files} are simply names declared explicitly by assembler
-directives; they bear no relation to physical files. Logical file names
-help error messages reflect the original source file, when @code{@value{AS}}
-source is itself synthesized from other files.
-@xref{App-File,,@code{.app-file}}.
+directives; they bear no relation to physical files. Logical file names help
+error messages reflect the original source file, when @code{@value{AS}} source
+is itself synthesized from other files. @code{@value{AS}} understands the
+@samp{#} directives emitted by the @code{@value{GCC}} preprocessor. See also
+@ref{File,,@code{.file}}.
@node Object
@section Output (Object) File
@@ -853,9 +952,8 @@ file_name:@b{NNN}:Warning Message Text
@noindent
@cindex line numbers, in warnings/errors
(where @b{NNN} is a line number). If a logical file name has been given
-(@pxref{App-File,,@code{.app-file}}) it is used for the filename,
-otherwise the name of the current input file is used. If a logical line
-number was given
+(@pxref{File,,@code{.file}}) it is used for the filename, otherwise the name of
+the current input file is used. If a logical line number was given
@ifset GENERIC
(@pxref{Line,,@code{.line}})
@end ifset
@@ -894,18 +992,19 @@ to the @value{TARGET}.
to particular machine architectures.
@end ifset
-If you are invoking @code{@value{AS}} via the @sc{gnu} C compiler (version 2), you
-can use the @samp{-Wa} option to pass arguments through to the
-assembler. The assembler arguments must be separated from each other
-(and the @samp{-Wa}) by commas. For example:
+If you are invoking @code{@value{AS}} via the @sc{gnu} C compiler (version 2),
+you can use the @samp{-Wa} option to pass arguments through to the assembler.
+The assembler arguments must be separated from each other (and the @samp{-Wa})
+by commas. For example:
@smallexample
gcc -c -g -O -Wa,-alh,-L file.c
@end smallexample
@noindent
-emits a listing to standard output with high-level
-and assembly source.
+This passes two options to the assembler: @samp{-alh} (emit a listing to
+standard output with with high-level and assembly source) and @samp{-L} (retain
+local symbols in the symbol table).
Usually you do not need to use this @samp{-Wa} mechanism, since many compiler
command-line options are automatically passed to the assembler by the compiler.
@@ -933,7 +1032,7 @@ assembler.)
* statistics:: --statistics to see statistics about assembly
* traditional-format:: --traditional-format for compatible output
* v:: -v to announce version
-* W:: -W to suppress warnings
+* W:: -W, --no-warn, --warn, --fatal-warnings to control warnings
* Z:: -Z to make object file even after errors
@end menu
@@ -1309,19 +1408,32 @@ option @samp{-v} (which you can also spell as @samp{-version}) on the
command line.
@node W
-@section Suppress Warnings: @code{-W}
+@section Control Warnings: @code{-W}, @code{--warn}, @code{--no-warn}, @code{--fatal-warnings}
-@kindex -W
-@cindex suppressing warnings
-@cindex warnings, suppressing
@code{@value{AS}} should never give a warning or error message when
assembling compiler output. But programs written by people often
cause @code{@value{AS}} to give a warning that a particular assumption was
made. All such warnings are directed to the standard error file.
-If you use this option, no warnings are issued. This option only
-affects the warning messages: it does not change any particular of how
-@code{@value{AS}} assembles your file. Errors, which stop the assembly, are
-still reported.
+
+@kindex @samp{-W}
+@kindex @samp{--no-warn}
+@cindex suppressing warnings
+@cindex warnings, suppressing
+If you use the @code{-W} and @code{--no-warn} options, no warnings are issued.
+This only affects the warning messages: it does not change any particular of
+how @code{@value{AS}} assembles your file. Errors, which stop the assembly,
+are still reported.
+
+@kindex @samp{--fatal-warnings}
+@cindex errors, caused by warnings
+@cindex warnings, causing error
+If you use the @code{--fatal-warnings} option, @code{@value{AS}} considers
+files that generate warnings to be in error.
+
+@kindex @samp{--warn}
+@cindex warnings, switching on
+You can switch these options off again by specifying @code{--warn}, which
+causes warnings to be output as usual.
@node Z
@section Generate Object File in Spite of Errors: @code{-Z}
@@ -1443,6 +1555,9 @@ is considered a comment and is ignored. The line comment character is
@ifset ARC
@samp{;} on the ARC;
@end ifset
+@ifset ARM
+@samp{@@} on the ARM;
+@end ifset
@ifset H8/300
@samp{;} for the H8/300 family;
@end ifset
@@ -1455,6 +1570,9 @@ is considered a comment and is ignored. The line comment character is
@ifset I960
@samp{#} on the i960;
@end ifset
+@ifset PJ
+@samp{;} for picoJava;
+@end ifset
@ifset SH
@samp{!} for the Hitachi SH;
@end ifset
@@ -1593,16 +1711,6 @@ exception: they do not end statements.
It is an error to end any statement with end-of-file: the last
character of any input file should be a newline.@refill
-@cindex continuing statements
-@cindex multi-line statements
-@cindex statement on multiple lines
-You may write a statement on more than one line if you put a
-backslash (@kbd{\}) immediately in front of any newlines within the
-statement. When @code{@value{AS}} reads a backslashed newline both
-characters are ignored. You can even put backslashed newlines in
-the middle of symbol names without changing the meaning of your
-source program.
-
An empty statement is allowed, and may include whitespace. It is ignored.
@cindex instructions and directives
@@ -2982,7 +3090,6 @@ Some machine configurations provide additional directives.
@end ifset
* Align:: @code{.align @var{abs-expr} , @var{abs-expr}}
-* App-File:: @code{.app-file @var{string}}
* Ascii:: @code{.ascii "@var{string}"}@dots{}
* Asciz:: @code{.asciz "@var{string}"}@dots{}
* Balign:: @code{.balign @var{abs-expr} , @var{abs-expr}}
@@ -3002,21 +3109,27 @@ Some machine configurations provide additional directives.
* Double:: @code{.double @var{flonums}}
* Eject:: @code{.eject}
* Else:: @code{.else}
+* Elseif:: @code{.elseif}
+* End:: @code{.end}
@ifset COFF
* Endef:: @code{.endef}
@end ifset
+* Endfunc:: @code{.endfunc}
* Endif:: @code{.endif}
* Equ:: @code{.equ @var{symbol}, @var{expression}}
* Equiv:: @code{.equiv @var{symbol}, @var{expression}}
* Err:: @code{.err}
+* Exitm:: @code{.exitm}
* Extern:: @code{.extern}
+* Fail:: @code{.fail}
@ifclear no-file-dir
* File:: @code{.file @var{string}}
@end ifclear
* Fill:: @code{.fill @var{repeat} , @var{size} , @var{value}}
* Float:: @code{.float @var{flonums}}
+* Func:: @code{.func}
* Global:: @code{.global @var{symbol}}, @code{.globl @var{symbol}}
* hword:: @code{.hword @var{expressions}}
* Ident:: @code{.ident}
@@ -3046,7 +3159,9 @@ Some machine configurations provide additional directives.
* Octa:: @code{.octa @var{bignums}}
* Org:: @code{.org @var{new-lc} , @var{fill}}
* P2align:: @code{.p2align @var{abs-expr} , @var{abs-expr}}
+* Print:: @code{.print @var{string}}
* Psize:: @code{.psize @var{lines}, @var{columns}}
+* Purgem:: @code{.purgem @var{name}}
* Quad:: @code{.quad @var{bignums}}
* Rept:: @code{.rept @var{count}}
* Sbttl:: @code{.sbttl "@var{subheading}"}
@@ -3070,6 +3185,7 @@ Some machine configurations provide additional directives.
@end ifset
* String:: @code{.string "@var{str}"}
+* Struct:: @code{.struct @var{expression}}
@ifset ELF
* Symver:: @code{.symver @var{name},@var{name2@@nodename}}
@end ifset
@@ -3083,6 +3199,9 @@ Some machine configurations provide additional directives.
* 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}}
+@end ifset
* Uleb128:: @code{.uleb128 @var{expressions}}
* Word:: @code{.word @var{expressions}}
@@ -3157,24 +3276,6 @@ GAS also provides @code{.balign} and @code{.p2align} directives,
described later, which have a consistent behavior across all
architectures (but are specific to GAS).
-@node App-File
-@section @code{.app-file @var{string}}
-
-@cindex logical file name
-@cindex file name, logical
-@cindex @code{app-file} directive
-@code{.app-file}
-@ifclear no-file-dir
-(which may also be spelled @samp{.file})
-@end ifclear
-tells @code{@value{AS}} that we are about to start a new
-logical file. @var{string} is the new file name. In general, the
-filename is recognized whether or not it is surrounded by quotes @samp{"};
-but if you wish to specify an empty file name is permitted,
-you must give the quotes--@code{""}. This statement may go away in
-future: it is only recognized to be compatible with old @code{@value{AS}}
-programs.@refill
-
@node Ascii
@section @code{.ascii "@var{string}"}@dots{}
@@ -3366,15 +3467,20 @@ assembly; @pxref{If,,@code{.if}}. It marks the beginning of a section
of code to be assembled if the condition for the preceding @code{.if}
was false.
-@ignore
-@node End, Endef, Else, Pseudo Ops
+@node Elseif
+@section @code{.elseif}
+
+@cindex @code{elseif} directive
+@code{.elseif} is part of the @code{@value{AS}} support for conditional
+assembly; @pxref{If,,@code{.if}}. It is shorthand for beginning a new
+@code{.if} block that would otherwise fill the entire @code{.else} section.
+
+@node End
@section @code{.end}
@cindex @code{end} directive
-This doesn't do anything---but isn't an s_ignore, so I suspect it's
-meant to do something eventually (which is why it isn't documented here
-as "for compatibility with blah").
-@end ignore
+@code{.end} marks the end of the assembly file. @code{@value{AS}} does not
+process anything in the file past the @code{.end} directive.
@ifset COFF
@node Endef
@@ -3391,6 +3497,11 @@ directive but ignores it.
@end ifset
@end ifset
+@node Endfunc
+@section @code{.endfunc}
+@cindex @code{endfunc} directive
+@code{.endfunc} marks the end of a function specified with @code{.func}.
+
@node Endif
@section @code{.endif}
@@ -3434,6 +3545,10 @@ If @code{@value{AS}} assembles a @code{.err} directive, it will print an error
message and, unless the @code{-Z} option was used, it will not generate an
object file. This can be used to signal error an conditionally compiled code.
+@node Exitm
+@section @code{.exitm}
+Exit early from the current macro definition. @xref{Macro}.
+
@node Extern
@section @code{.extern}
@@ -3442,6 +3557,16 @@ object file. This can be used to signal error an conditionally compiled code.
with other assemblers---but it is ignored. @code{@value{AS}} treats
all undefined symbols as external.
+@node Fail
+@section @code{.fail @var{expression}}
+
+@cindex @code{fail} directive
+Generates an error or a warning. If the value of the @var{expression} is 500
+or more, @code{@value{AS}} will print a warning message. If the value is less
+than 500, @code{@value{AS}} will print an error message. The message will
+include the value of @var{expression}. This can occasionally be useful inside
+complex nested macros or conditional assembly.
+
@ifclear no-file-dir
@node File
@section @code{.file @var{string}}
@@ -3449,13 +3574,12 @@ all undefined symbols as external.
@cindex @code{file} directive
@cindex logical file name
@cindex file name, logical
-@code{.file} (which may also be spelled @samp{.app-file}) tells
-@code{@value{AS}} that we are about to start a new logical file.
-@var{string} is the new file name. In general, the filename is
-recognized whether or not it is surrounded by quotes @samp{"}; but if
-you wish to specify an empty file name, you must give the
-quotes--@code{""}. This statement may go away in future: it is only
-recognized to be compatible with old @code{@value{AS}} programs.
+@code{.file} tells @code{@value{AS}} that we are about to start a new logical
+file. @var{string} is the new file name. In general, the filename is
+recognized whether or not it is surrounded by quotes @samp{"}; but if you wish
+to specify an empty file name, you must give the quotes--@code{""}. This
+statement may go away in future: it is only recognized to be compatible with
+old @code{@value{AS}} programs.
@ifset A29K
In some configurations of @code{@value{AS}}, @code{.file} has already been
removed to avoid conflicts with other assemblers. @xref{Machine Dependencies}.
@@ -3504,6 +3628,18 @@ in @sc{ieee} format.
@end ifset
@end ifclear
+@node Func
+@section @code{.func @var{name}[,@var{label}]}
+@cindex @code{func} directive
+@code{.func} emits debugging information to denote function @var{name}, and
+is ignored unless the file is assembled with debugging enabled.
+Only @samp{--gstabs} is currently supported.
+@var{label} is the entry point of the function and if omitted @var{name}
+prepended with the @samp{leading char} is used.
+@samp{leading char} is usually @code{_} or nothing, depending on the target.
+All functions are currently defined to have @code{void} return type.
+The function must be terminated with @code{.endfunc}.
+
@node Global
@section @code{.global @var{symbol}}, @code{.globl @var{symbol}}
@@ -3567,6 +3703,8 @@ considered part of the source program being assembled if the argument
the conditional section of code must be marked by @code{.endif}
(@pxref{Endif,,@code{.endif}}); optionally, you may include code for the
alternative condition, flagged by @code{.else} (@pxref{Else,,@code{.else}}).
+If you have several conditions to check, @code{.elseif} may be used to avoid
+nesting blocks if/else within each subsequent @code{.else} block.
The following variants of @code{.if} are also supported:
@table @code
@@ -3575,11 +3713,44 @@ The following variants of @code{.if} are also supported:
Assembles the following section of code if the specified @var{symbol}
has been defined.
-@ignore
+@cindex @code{ifc} directive
+@item .ifc @var{string1},@var{string2}
+Assembles the following section of code if the two strings are the same. The
+strings may be optionally quoted with single quotes. If they are not quoted,
+the first string stops at the first comma, and the second string stops at the
+end of the line. Strings which contain whitespace should be quoted. The
+string comparison is case sensitive.
+
+@cindex @code{ifeq} directive
+@item .ifeq @var{absolute expression}
+Assembles the following section of code if the argument is zero.
+
@cindex @code{ifeqs} directive
-@item .ifeqs
-Not yet implemented.
-@end ignore
+@item .ifeqs @var{string1},@var{string2}
+Another form of @code{.ifc}. The strings must be quoted using double quotes.
+
+@cindex @code{ifge} directive
+@item .ifge @var{absolute expression}
+Assembles the following section of code if the argument is greater than or
+equal to zero.
+
+@cindex @code{ifgt} directive
+@item .ifgt @var{absolute expression}
+Assembles the following section of code if the argument is greater than zero.
+
+@cindex @code{ifle} directive
+@item .ifle @var{absolute expression}
+Assembles the following section of code if the argument is less than or equal
+to zero.
+
+@cindex @code{iflt} directive
+@item .iflt @var{absolute expression}
+Assembles the following section of code if the argument is less than zero.
+
+@cindex @code{ifnc} directive
+@item .ifnc @var{string1},@var{string2}.
+Like @code{.ifc}, but the sense of the test is reversed: this assembles the
+following section of code if the two strings are not the same.
@cindex @code{ifndef} directive
@cindex @code{ifnotdef} directive
@@ -3588,10 +3759,15 @@ Not yet implemented.
Assembles the following section of code if the specified @var{symbol}
has not been defined. Both spelling variants are equivalent.
-@ignore
-@item ifnes
-Not yet implemented.
-@end ignore
+@cindex @code{ifne} directive
+@item .ifne @var{absolute expression}
+Assembles the following section of code if the argument is not equal to zero
+(in other words, this is equivalent to @code{.if}).
+
+@cindex @code{ifnes} directive
+@item .ifnes @var{string1},@var{string2}
+Like @code{.ifeqs}, but the sense of the test is reversed: this assembles the
+following section of code if the two strings are not the same.
@end table
@node Include
@@ -4053,6 +4229,13 @@ 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.
+@node Print
+@section @code{.print @var{string}}
+
+@cindex @code{print} directive
+@code{@value{AS}} will print @var{string} on the standard output during
+assembly. You must put @var{string} in double quotes.
+
@node Psize
@section @code{.psize @var{lines} , @var{columns}}
@@ -4073,6 +4256,13 @@ lines is exceeded (or whenever you explicitly request one, using
If you specify @var{lines} as @code{0}, no formfeeds are generated save
those explicitly specified with @code{.eject}.
+@node Purgem
+@section @code{.purgem @var{name}}
+
+@cindex @code{purgem} directive
+Undefine the macro @var{name}, so that later uses of the string will not be
+expanded. @xref{Macro}.
+
@node Quad
@section @code{.quad @var{bignums}}
@@ -4184,6 +4374,8 @@ data section
read-only section
@item x
executable section
+@item s
+shared section (meaningful for PE targets)
@end table
If no flags are specified, the default flags depend upon the section name. If
@@ -4447,6 +4639,26 @@ one string to copy, separated by commas. Unless otherwise specified for a
particular machine, the assembler marks the end of each string with a 0 byte.
You can use any of the escape sequences described in @ref{Strings,,Strings}.
+@node Struct
+@section @code{.struct @var{expression}}
+
+@cindex @code{struct} directive
+Switch to the absolute section, and set the section offset to @var{expression},
+which must be an absolute expression. You might use this as follows:
+@smallexample
+ .struct 0
+field1:
+ .struct field1 + 4
+field2:
+ .struct field2 + 4
+field3:
+@end smallexample
+This would define the symbol @code{field1} to have the value 0, the symbol
+@code{field2} to have the value 4, and the symbol @code{field3} to have the
+value 8. Assembly would be left in the absolute section, and you would need to
+use a @code{.section} directive of some sort to change to some other section
+before further assembly.
+
@ifset ELF
@node Symver
@section @code{.symver}
@@ -4561,6 +4773,40 @@ configured for @code{b.out}, it accepts this directive but ignores it.
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
+
+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.
+
+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.
+
+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.
+
+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.
+
+For ELF targets, the directives are used like this:
+
+@smallexample
+.internal @var{name}
+.hidden @var{name}
+.protected @var{name}
+@end smallexample
+
+@end ifset
+
@node Word
@section @code{.word @var{expressions}}
@@ -4636,7 +4882,6 @@ One day these directives won't work.
They are included for compatibility with older assemblers.
@table @t
@item .abort
-@item .app-file
@item .line
@end table
@@ -4670,6 +4915,9 @@ subject, see the hardware manufacturer's manual.
@ifset D10V
* D10V-Dependent:: D10V Dependent Features
@end ifset
+@ifset D30V
+* D30V-Dependent:: D30V Dependent Features
+@end ifset
@ifset H8/300
* H8/300-Dependent:: Hitachi H8/300 Dependent Features
@end ifset
@@ -4679,6 +4927,9 @@ subject, see the hardware manufacturer's manual.
@ifset HPPA
* HPPA-Dependent:: HPPA Dependent Features
@end ifset
+@ifset I370
+* ESA/390-Dependent:: IBM ESA/390 Dependent Features
+@end ifset
@ifset I80386
* i386-Dependent:: Intel 80386 Dependent Features
@end ifset
@@ -4694,6 +4945,9 @@ subject, see the hardware manufacturer's manual.
@ifset SH
* SH-Dependent:: Hitachi SH Dependent Features
@end ifset
+@ifset PJ
+* PJ-Dependent:: picoJava Dependent Features
+@end ifset
@ifset SPARC
* Sparc-Dependent:: SPARC Dependent Features
@end ifset
@@ -4827,6 +5081,9 @@ family.
@include c-d10v.texi
@end ifset
+@ifset D30V
+@include c-d30v.texi
+@end ifset
@ifset H8/300
@include c-h8300.texi
@@ -4840,6 +5097,10 @@ family.
@include c-hppa.texi
@end ifset
+@ifset I370
+@include c-i370.texi
+@end ifset
+
@ifset I80386
@include c-i386.texi
@end ifset
@@ -4861,6 +5122,10 @@ family.
@include c-ns32k.texi
@end ifset
+@ifset PJ
+@include c-pj.texi
+@end ifset
+
@ifset SH
@include c-sh.texi
@end ifset
@@ -5167,6 +5432,8 @@ Jeff Law at the University of Utah (HPPA mainly), Michael Meissner of the Open
Software Foundation (i386 mainly), and Ken Raeburn of Cygnus Support (sparc,
and some initial 64-bit support).
+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.
diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi
new file mode 100644
index 0000000..ff98d7f
--- /dev/null
+++ b/contrib/binutils/gas/doc/c-arm.texi
@@ -0,0 +1,267 @@
+@c Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
+@c This is part of the GAS manual.
+@c For copying conditions, see the file as.texinfo.
+
+@ifset GENERIC
+@page
+@node ARM-Dependent
+@chapter ARM Dependent Features
+@end ifset
+
+@ifclear GENERIC
+@node Machine Dependencies
+@chapter ARM Dependent Features
+@end ifclear
+
+@cindex ARM support
+@cindex Thumb support
+@menu
+* ARM Options:: Options
+* ARM Syntax:: Syntax
+* ARM Floating Point:: Floating Point
+* ARM Directives:: ARM Machine Directives
+* ARM Opcodes:: Opcodes
+@end menu
+
+@node ARM Options
+@section Options
+@cindex ARM options (none)
+@cindex options for ARM (none)
+@table @code
+@cindex @code{-marm} command line option, ARM
+@item -marm [@var{2}|@var{250}|@var{3}|@var{6}|@var{60}|@var{600}|@var{610}|@var{620}|@var{7}|@var{7m}|@var{7d}|@var{7dm}|@var{7di}|@var{7dmi}|@var{70}|@var{700}|@var{700i}|@var{710}|@var{710c}|@var{7100}|@var{7500}|@var{7500fe}|@var{7tdmi}|@var{8}|@var{810}|@var{9}|@var{9tdmi}|@var{920}|@var{strongarm}|@var{strongarm110}|@var{strongarm1100}]
+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 [@var{2}|@var{2a}|@var{3}|@var{3m}|@var{4}|@var{4t}|@var{5}|@var{5t}]
+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.
+@cindex @code{-mthumb} command line option, ARM
+@item -mthumb
+This option specifies that only Thumb instructions should be assembled.
+@cindex @code{-mall} command line option, ARM
+@item -mall
+This option specifies that any Arm or Thumb instruction should be assembled.
+@cindex @code{-mfpa} command line option, ARM
+@item -mfpa [@var{10}|@var{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.
+@cindex @code{-mno-fpu} command line option, ARM
+@item -mno-fpu
+Do not allow the assembly of any floating point instructions.
+@cindex @code{-mthumb-interwork} command line option, ARM
+@item -mthumb-interwork
+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}|@var{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.
+@item -mapcs-float
+This indicates the the floating point variant of the APCS should be
+used. In this variant floating point arguments are passed in FP
+registers rather than integer registers.
+@item -mapcs-reentrant
+This indicates that the reentrant variant of the APCS should be used.
+This variant supports position independent code.
+@cindex @code{-EB} command line option, ARM
+@item -EB
+This option specifies that the output generated by the assembler should
+be marked as being encoded for a big-endian processor.
+@cindex @code{-EL} command line option, ARM
+@item -EL
+This option specifies that the output generated by the assembler should
+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).
+@item -moabi
+This indicates that the code should be assembled using the old ARM ELF
+conventions, based on a beta release release of the ARM-ELF
+specifications, rather than the default conventions which are based on
+the final release of the ARM-ELF specifications.
+@end table
+
+
+@node ARM Syntax
+@section Syntax
+@menu
+* ARM-Chars:: Special Characters
+* ARM-Regs:: Register Names
+@end menu
+
+@node ARM-Chars
+@subsection Special Characters
+
+@cindex line comment character, ARM
+@cindex ARM line comment character
+The presence of a @samp{@@} on a line indicates the start of a comment
+that extends to the end of the current line. If a @samp{#} appears as
+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.
+
+@cindex immediate character, ARM
+@cindex ARM immediate character
+Either @samp{#} or @samp{$} can be used to indicate immediate operands.
+
+@cindex identifiers, ARM
+@cindex ARM identifiers
+*TODO* Explain about /data modifier on symbols.
+
+@node ARM-Regs
+@subsection Register Names
+
+@cindex ARM register names
+@cindex register names, ARM
+*TODO* Explain about ARM register naming, and the predefined names.
+
+@node ARM Floating Point
+@section Floating Point
+
+@cindex floating point, ARM (@sc{ieee})
+@cindex ARM floating point (@sc{ieee})
+The ARM family uses @sc{ieee} floating-point numbers.
+
+
+
+@node ARM Directives
+@section ARM Machine Directives
+
+@cindex machine directives, ARM
+@cindex ARM machine directives
+@table @code
+
+@cindex @code{req} directive, ARM
+@item @var{name} .req @var{register name}
+This creates an alias for @var{register name} called @var{name}. For
+example:
+
+@smallexample
+ foo .req r0
+@end smallexample
+
+@cindex @code{code} directive, ARM
+@item .code [@var{16}|@var{32}]
+This directive selects the instruction set being generated. The value 16
+selects Thumb, with the value 32 selecting ARM.
+
+@cindex @code{thumb} directive, ARM
+@item .thumb
+This performs the same action as @var{.code 16}.
+
+@cindex @code{arm} directive, ARM
+@item .arm
+This performs the same action as @var{.code 32}.
+
+@cindex @code{force_thumb} directive, ARM
+@item .force_thumb
+This directive forces the selection of Thumb instructions, even if the
+target processor does not support those instructions
+
+@cindex @code{thumb_func} directive, ARM
+@item .thumb_func
+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.
+
+@cindex @code{thumb_set} directive, ARM
+@item .thumb_set
+This performs the equivalent of a @code{.set} directive in that it
+creates a symbol which is an alias for another symbol (possibly not yet
+defined). This directive also has the added property in that it marks
+the aliased symbol as being a thumb function entry point, in the same
+way that the @code{.thumb_func} directive does.
+
+@cindex @code{.ltorg} directive, ARM
+@item .ltorg
+This directive causes the current contents of the literal pool to be
+dumped into the current section (which is assumed to be the .text
+section) at the current location (aligned to a word boundary).
+
+@cindex @code{.pool} directive, ARM
+@item .pool
+This is a synonym for .ltorg.
+
+@end table
+
+@node ARM Opcodes
+@section Opcodes
+
+@cindex ARM opcodes
+@cindex opcodes for ARM
+@code{@value{AS}} implements all the standard ARM opcodes. It also
+implements several pseudo opcodes, including several synthetic load
+instructions.
+
+@table @code
+
+@cindex @code{NOP} pseudo op, ARM
+@item NOP
+@smallexample
+ nop
+@end smallexample
+
+This pseudo op will always evaluate to a legal ARM instruction that does
+nothing. Currently it will evaluate to MOV r0, r0.
+
+@cindex @code{LDR reg,=<label>} pseudo op, ARM
+@item LDR
+@smallexample
+ ldr <register> , = <expression>
+@end smallexample
+
+If expression evaluates to a numeric constant then a MOV or MVN
+instruction will be used in place of the LDR instruction, if the
+constant can be generated by either of these instructions. Otherwise
+the constant will be placed into the nearest literal pool (if it not
+already there) and a PC relative LDR instruction will be generated.
+
+@cindex @code{ADR reg,<label>} pseudo op, ARM
+@item ADR
+@smallexample
+ adr <register> <label>
+@end smallexample
+
+This instruction will load the address of @var{label} into the indicated
+register. The instruction will evaluate to a PC relative ADD or SUB
+instruction depending upon where the label is located. If the label is
+out of range, or if it is not defined in the same file (and section) as
+the ADR instruction, then an error will be generated. This instruction
+will not make use of the literal pool.
+
+@cindex @code{ADRL reg,<label>} pseudo op, ARM
+@item ADRL
+@smallexample
+ adrl <register> <label>
+@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
+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.
+
+If the label is out of range, or if it is not defined in the same file
+(and section) as the ADRL instruction, then an error will be generated.
+This instruction will not make use of the literal pool.
+
+@end table
+
+For information on the ARM or Thumb instruction sets, see @cite{ARM
+Software Development Toolkit Reference Manual}, Advanced RISC Machines
+Ltd.
+
diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi
index bb51be3..8a9c85a 100644
--- a/contrib/binutils/gas/doc/c-i386.texi
+++ b/contrib/binutils/gas/doc/c-i386.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@@ -16,13 +16,15 @@
@menu
* i386-Options:: Options
* i386-Syntax:: AT&T Syntax versus Intel Syntax
-* i386-Opcodes:: Opcode Naming
+* i386-Mnemonics:: Instruction Naming
* i386-Regs:: Register Naming
-* i386-prefixes:: Opcode Prefixes
+* i386-Prefixes:: Instruction Prefixes
* i386-Memory:: Memory References
* i386-jumps:: Handling of Jump Instructions
* i386-Float:: Floating Point
+* i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations
* i386-16bit:: Writing 16-bit Code
+* i386-Bugs:: AT&T Syntax bugs
* i386-Notes:: Notes
@end menu
@@ -41,7 +43,7 @@ The 80386 has no machine dependent options.
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
different from Intel syntax. We mention these differences because
-almost all 80386 documents used only Intel syntax. Notable differences
+almost all 80386 documents use Intel syntax. Notable differences
between the two syntaxes are:
@cindex immediate operands, i386
@@ -65,19 +67,21 @@ operands are prefixed by @samp{*}; they are undelimited in Intel syntax.
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
@samp{source, dest} convention is maintained for compatibility with
-previous Unix assemblers.
+previous Unix assemblers. Note that instructions with more than one
+source operand, such as the @samp{enter} instruction, do @emph{not} have
+reversed order. @ref{i386-Bugs}.
-@cindex opcode suffixes, i386
+@cindex mnemonic suffixes, i386
@cindex sizes operands, i386
@cindex i386 size suffixes
@item
In AT&T syntax the size of memory operands is determined from the last
-character of the opcode name. Opcode 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 prefixes memory
-operands (@emph{not} the opcodes themselves) 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.
+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.
@cindex return instructions, i386
@cindex i386 jump, call, return
@@ -97,32 +101,33 @@ The AT&T assembler does not provide support for multiple section
programs. Unix style systems expect all programs to be single sections.
@end itemize
-@node i386-Opcodes
-@section Opcode Naming
-
-@cindex i386 opcode naming
-@cindex opcode naming, i386
-Opcode names 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 and it contains no memory operands 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 opcode suffix implies long
-operand size. (This incompatibility does not affect compiler output
-since compilers always explicitly specify the opcode suffix.)
-
-Almost all opcodes have the same names in AT&T and Intel format. There
-are a few exceptions. The sign extend and zero extend instructions need
-two sizes to specify them. They need a size to sign/zero extend
-@emph{from} and a size to zero extend @emph{to}. This is accomplished
-by using two opcode suffixes in AT&T syntax. Base names for sign extend
-and zero extend are @samp{movs@dots{}} and @samp{movz@dots{}} in AT&T
-syntax (@samp{movsx} and @samp{movzx} in Intel syntax). The opcode
-suffixes 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
+@node i386-Mnemonics
+@section Instruction Naming
+
+@cindex i386 instruction naming
+@cindex instruction naming, i386
+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.)
+
+Almost all instructions have the same names in AT&T and Intel format.
+There are a few exceptions. The sign extend and zero extend
+instructions need two sizes to specify them. They need a size to
+sign/zero extend @emph{from} and a size to zero extend @emph{to}. This
+is accomplished by using two instruction mnemonic suffixes in AT&T
+syntax. Base names for sign extend and zero extend are
+@samp{movs@dots{}} and @samp{movz@dots{}} in AT&T syntax (@samp{movsx}
+and @samp{movzx} in Intel syntax). The instruction mnemonic suffixes
+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).
@@ -160,7 +165,7 @@ convention.
@cindex i386 registers
@cindex registers, i386
-Register operands are always prefixes with @samp{%}. The 80386 registers
+Register operands are always prefixed with @samp{%}. The 80386 registers
consist of
@itemize @bullet
@@ -201,26 +206,30 @@ the 8 floating point register stack @samp{%st} or equivalently
@samp{%st(4)}, @samp{%st(5)}, @samp{%st(6)}, and @samp{%st(7)}.
@end itemize
-@node i386-prefixes
-@section Opcode Prefixes
+@node i386-Prefixes
+@section Instruction Prefixes
-@cindex i386 opcode prefixes
-@cindex opcode prefixes, i386
+@cindex i386 instruction prefixes
+@cindex instruction prefixes, i386
@cindex prefixes, i386
-Opcode prefixes are used to modify the following opcode. They are used
-to repeat string instructions, to provide section overrides, to perform
-bus lock operations, and to give operand and address size (16-bit
-operands are specified in an instruction by prefixing what would
-normally be 32-bit operands with a ``operand size'' opcode prefix).
-Opcode prefixes are usually given as single-line instructions with no
-operands, and must directly precede the instruction they act upon. For
-example, the @samp{scas} (scan string) instruction is repeated with:
+Instruction prefixes are used to modify the following instruction. They
+are used to repeat string instructions, to provide section overrides, to
+perform bus lock operations, and to change operand and address sizes.
+(Most instructions that normally operate on 32-bit operands will use
+16-bit operands if the instruction has an ``operand size'' prefix.)
+Instruction prefixes are best written on the same line as the instruction
+they act upon. For example, the @samp{scas} (scan string) instruction is
+repeated with:
+
@smallexample
- repne
- scas
+ repne scas %es:(%edi),%al
@end smallexample
-Here is a list of opcode prefixes:
+You may also place prefixes on the lines immediately preceding the
+instruction, but this circumvents checks that @code{@value{AS}} does
+with prefixes, and will not work with all prefixes.
+
+Here is a list of instruction prefixes:
@cindex section override prefixes, i386
@itemize @bullet
@@ -232,27 +241,35 @@ using the @var{section}:@var{memory-operand} form for memory references.
@cindex size prefixes, i386
@item
Operand/Address size prefixes @samp{data16} and @samp{addr16}
-change 32-bit operands/addresses into 16-bit operands/addresses. Note
-that 16-bit addressing modes (i.e. 8086 and 80286 addressing modes)
-are not supported (yet).
+change 32-bit operands/addresses into 16-bit operands/addresses,
+while @samp{data32} and @samp{addr32} change 16-bit ones (in a
+@code{.code16} section) into 32-bit operands/addresses. These prefixes
+@emph{must} appear on the same line of code as the instruction they
+modify. For example, in a 16-bit @code{.code16} section, you might
+write:
+
+@smallexample
+ addr32 jmpl *(%ebx)
+@end smallexample
@cindex bus lock prefixes, i386
@cindex inhibiting interrupts, i386
@item
-The bus lock prefix @samp{lock} inhibits interrupts during
-execution of the instruction it precedes. (This is only valid with
-certain instructions; see a 80386 manual for details).
+The bus lock prefix @samp{lock} inhibits interrupts during execution of
+the instruction it precedes. (This is only valid with certain
+instructions; see a 80386 manual for details).
@cindex coprocessor wait, i386
@item
-The wait for coprocessor prefix @samp{wait} waits for the
-coprocessor to complete the current instruction. This should never be
-needed for the 80386/80387 combination.
+The wait for coprocessor prefix @samp{wait} waits for the coprocessor to
+complete the current instruction. This should never be needed for the
+80386/80387 combination.
@cindex repeat prefixes, i386
@item
The @samp{rep}, @samp{repe}, and @samp{repne} prefixes are added
-to string instructions to make them repeat @samp{%ecx} times.
+to string instructions to make them repeat @samp{%ecx} times (@samp{%cx}
+times if the current address size is 16-bits).
@end itemize
@node i386-Memory
@@ -281,7 +298,7 @@ to calculate the address of the operand. If no @var{scale} is
specified, @var{scale} is taken to be 1. @var{section} specifies the
optional section register for the memory operand, and may override the
default section register (see a 80386 manual for section register
-defaults). Note that section overrides in AT&T syntax @emph{must} have
+defaults). Note that section overrides in AT&T syntax @emph{must}
be preceded by a @samp{%}. If you specify a section override which
coincides with the default section register, @code{@value{AS}} does @emph{not}
output any section register override prefixes to assemble the given
@@ -315,9 +332,9 @@ Absolute (as opposed to PC relative) call and jump operands must be
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 @emph{must} specify its size (byte,
-word, or long) with an opcode suffix (@samp{b}, @samp{w}, or @samp{l},
-respectively).
+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).
@node i386-jumps
@section Handling of Jump Instructions
@@ -328,9 +345,10 @@ Jump instructions are always optimized to use the smallest possible
displacements. This is accomplished by using byte (8-bit) displacement
jumps whenever the target is sufficiently close. If a byte displacement
is insufficient a long (32-bit) displacement is used. We do not support
-word (16-bit) displacement jumps (i.e. prefixing the jump instruction
-with the @samp{addr16} opcode prefix), since the 80386 insists upon masking
-@samp{%eip} to 16 bits after the word displacement is added.
+word (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump
+instruction with the @samp{data16} instruction prefix), since the 80386
+insists upon masking @samp{%eip} to 16 bits after the word displacement
+is added.
Note that the @samp{jcxz}, @samp{jecxz}, @samp{loop}, @samp{loopz},
@samp{loope}, @samp{loopnz} and @samp{loopne} instructions only come in byte
@@ -355,9 +373,9 @@ 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),
double (64-bit), and extended (80-bit) precision floating point.
-Each supported type has an opcode suffix and a constructor
-associated with it. Opcode suffixes specify operand's data
-types. Constructors build these data types into memory.
+Each supported type has an instruction mnemonic suffix and a constructor
+associated with it. Instruction mnemonic suffixes specify the operand's
+data type. Constructors build these data types into memory.
@cindex @code{float} directive, i386
@cindex @code{single} directive, i386
@@ -367,10 +385,10 @@ types. Constructors build these data types into memory.
@item
Floating point constructors are @samp{.float} or @samp{.single},
@samp{.double}, and @samp{.tfloat} for 32-, 64-, and 80-bit formats.
-These correspond to opcode suffixes @samp{s}, @samp{l}, and @samp{t}.
-@samp{t} stands for temporary real, and that the 80387 only supports
-this format via the @samp{fldt} (load temporary real to stack top) and
-@samp{fstpt} (store temporary real and pop stack) instructions.
+These correspond to instruction mnemonic suffixes @samp{s}, @samp{l},
+and @samp{t}. @samp{t} stands for 80-bit (ten byte) real. The 80387
+only supports this format via the @samp{fldt} (load 80-bit real to stack
+top) and @samp{fstpt} (store 80-bit real and pop stack) instructions.
@cindex @code{word} directive, i386
@cindex @code{long} directive, i386
@@ -378,15 +396,46 @@ this format via the @samp{fldt} (load temporary real to stack top) and
@cindex @code{quad} directive, i386
@item
Integer constructors are @samp{.word}, @samp{.long} or @samp{.int}, and
-@samp{.quad} for the 16-, 32-, and 64-bit integer formats. The corresponding
-opcode suffixes are @samp{s} (single), @samp{l} (long), and @samp{q}
-(quad). As with the temporary real format the 64-bit @samp{q} format is
-only present in the @samp{fildq} (load quad integer to stack top) and
-@samp{fistpq} (store quad integer and pop stack) instructions.
+@samp{.quad} for the 16-, 32-, and 64-bit integer formats. The
+corresponding instruction mnemonic suffixes are @samp{s} (single),
+@samp{l} (long), and @samp{q} (quad). As with the 80-bit real format,
+the 64-bit @samp{q} format is only present in the @samp{fildq} (load
+quad integer to stack top) and @samp{fistpq} (store quad integer and pop
+stack) instructions.
@end itemize
-Register to register operations do not require opcode suffixes,
-so that @samp{fst %st, %st(1)} is equivalent to @samp{fstl %st, %st(1)}.
+Register to register operations should not use instruction mnemonic suffixes.
+@samp{fstl %st, %st(1)} will give a warning, and be assembled as if you
+wrote @samp{fst %st, %st(1)}, since all register to register operations
+use 80-bit floating point operands. (Contrast this with @samp{fstl %st, mem},
+which converts @samp{%st} from 80-bit to 64-bit floating point format,
+then stores the result in the 4 byte location @samp{mem})
+
+@node i386-SIMD
+@section Intel's MMX and AMD's 3DNow! SIMD Operations
+
+@cindex MMX, i386
+@cindex 3DNow!, i386
+@cindex SIMD, i386
+
+@code{@value{AS}} supports Intel's MMX instruction set (SIMD
+instructions for integer data), available on Intel's Pentium MMX
+processors and Pentium II processors, AMD's K6 and K6-2 processors,
+Cyrix' M2 processor, and probably others. It also supports AMD's 3DNow!
+instruction set (SIMD instructions for 32-bit floating point data)
+available on AMD's K6-2 processor and possibly others in the future.
+
+Currently, @code{@value{AS}} does not support Intel's floating point
+SIMD, Katmai (KNI).
+
+The eight 64-bit MMX operands, also used by 3DNow!, are called @samp{%mm0},
+@samp{%mm1}, ... @samp{%mm7}. They contain eight 8-bit integers, four
+16-bit integers, two 32-bit integers, one 64-bit integer, or two 32-bit
+floating point values. The MMX registers cannot be used at the same time
+as the floating point stack.
+
+See Intel and AMD documentation, keeping in mind that the operand order in
+instructions is reversed from the Intel syntax.
@node i386-16bit
@section Writing 16-bit Code
@@ -394,44 +443,68 @@ so that @samp{fst %st, %st(1)} is equivalent to @samp{fstl %st, %st(1)}.
@cindex i386 16-bit code
@cindex 16-bit code, i386
@cindex real-mode code, i386
+@cindex @code{code16gcc} directive, i386
@cindex @code{code16} directive, i386
@cindex @code{code32} directive, i386
-While GAS normally writes only ``pure'' 32-bit i386 code, it has limited
-support for writing code to run in real mode or in 16-bit protected mode
-code segments. To do this, insert a @samp{.code16} directive before the
-assembly language instructions to be run in 16-bit mode. You can switch
-GAS back to writing normal 32-bit code with the @samp{.code32} directive.
-
-GAS understands exactly the same assembly language syntax in 16-bit mode as
-in 32-bit mode. The function of any given instruction is exactly the same
-regardless of mode, as long as the resulting object code is executed in the
-mode for which GAS wrote it. So, for example, the @samp{ret} mnemonic
-produces a 32-bit return instruction regardless of whether it is to be run
-in 16-bit or 32-bit mode. (If GAS is in 16-bit mode, it will add an
-operand size prefix to the instruction to force it to be a 32-bit return.)
-
-This means, for one thing, that you can use @sc{gnu} @sc{cc} to write code to be run
-in real mode or 16-bit protected mode. Just insert the statement
-@samp{asm(".code16");} at the beginning of your C source file, and while
-@sc{gnu} @sc{cc} will still be generating 32-bit code, GAS will automatically add
-all the necessary size prefixes to make that code run in 16-bit mode. Of
-course, since @sc{gnu} @sc{cc} only writes small-model code (it doesn't know how to
-attach segment selectors to pointers like native x86 compilers do), any
-16-bit code you write with @sc{gnu} @sc{cc} will essentially be limited to a 64K
-address space. Also, there will be a code size and performance penalty
-due to all the extra address and operand size prefixes GAS has to add to
-the instructions.
-
-Note that placing GAS in 16-bit mode does not mean that the resulting
-code will necessarily run on a 16-bit pre-80386 processor. To write code
-that runs on such a processor, you would have to refrain from using
-@emph{any} 32-bit constructs which require GAS to output address or
-operand size prefixes. At the moment this would be rather difficult,
-because GAS currently supports @emph{only} 32-bit addressing modes: when
-writing 16-bit code, it @emph{always} outputs address size prefixes for any
-instruction that uses a non-register addressing mode. So you can write
-code that runs on 16-bit processors, but only if that code never references
-memory.
+While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code,
+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
+be run in 16-bit mode. You can switch @code{@value{AS}} back to writing
+normal 32-bit code with the @samp{.code32} directive.
+
+@samp{.code16gcc} provides experimental support for generating 16-bit
+code from gcc, and differs from @samp{.code16} in that @samp{call},
+@samp{ret}, @samp{enter}, @samp{leave}, @samp{push}, @samp{pop},
+@samp{pusha}, @samp{popa}, @samp{pushf}, and @samp{popf} instructions
+default to 32-bit size. This is so that the stack pointer is
+manipulated in the same way over function calls, allowing access to
+function parameters at the same stack offsets as in 32-bit mode.
+@samp{.code16gcc} also automatically adds address size prefixes where
+necessary to use the 32-bit addressing modes that gcc generates.
+
+The code which @code{@value{AS}} generates in 16-bit mode will not
+necessarily run on a 16-bit pre-80386 processor. To write code that
+runs on such a processor, you must refrain from using @emph{any} 32-bit
+constructs which require @code{@value{AS}} to output address or operand
+size prefixes.
+
+Note that writing 16-bit code instructions by explicitly specifying a
+prefix or an instruction mnemonic suffix within a 32-bit code section
+generates different machine instructions than those generated for a
+16-bit code segment. In a 32-bit code section, the following code
+generates the machine opcode bytes @samp{66 6a 04}, which pushes the
+value @samp{4} onto the stack, decrementing @samp{%esp} by 2.
+
+@smallexample
+ pushw $4
+@end smallexample
+
+The same code in a 16-bit code section would generate the machine
+opcode bytes @samp{6a 04} (ie. without the operand size prefix), which
+is correct since the processor default operand size is assumed to be 16
+bits in a 16-bit code section.
+
+@node i386-Bugs
+@section AT&T Syntax bugs
+
+The UnixWare assembler, and probably other AT&T derived ix86 Unix
+assemblers, generate floating point instructions with reversed source
+and destination registers in certain cases. Unfortunately, gcc and
+possibly many other programs use this reversed syntax, so we're stuck
+with it.
+
+For example
+
+@smallexample
+ fsub %st,%st(3)
+@end smallexample
+@noindent
+results in @samp{%st(3)} being updated to @samp{%st - %st(3)} rather
+than the expected @samp{%st(3) - %st}. This happens with all the
+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-Notes
@section Notes
diff --git a/contrib/binutils/gas/doc/c-sparc.texi b/contrib/binutils/gas/doc/c-sparc.texi
new file mode 100644
index 0000000..ab54eb2
--- /dev/null
+++ b/contrib/binutils/gas/doc/c-sparc.texi
@@ -0,0 +1,194 @@
+@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c This is part of the GAS manual.
+@c For copying conditions, see the file as.texinfo.
+@ifset GENERIC
+@page
+@node Sparc-Dependent
+@chapter SPARC Dependent Features
+@end ifset
+@ifclear GENERIC
+@node Machine Dependencies
+@chapter SPARC Dependent Features
+@end ifclear
+
+@cindex SPARC support
+@menu
+* Sparc-Opts:: Options
+* Sparc-Aligned-Data:: Option to enforce aligned data
+* Sparc-Float:: Floating Point
+* Sparc-Directives:: Sparc Machine Directives
+@end menu
+
+@node Sparc-Opts
+@section Options
+
+@cindex options for SPARC
+@cindex SPARC options
+@cindex architectures, SPARC
+@cindex SPARC architectures
+The SPARC chip family includes several successive levels, using the same
+core instruction set, but including a few additional instructions at
+each level. There are exceptions to this however. For details on what
+instructions each variant supports, please see the chip's architecture
+reference manual.
+
+By default, @code{@value{AS}} assumes the core instruction set (SPARC
+v6), but ``bumps'' the architecture level as needed: it switches to
+successively higher architectures as it encounters instructions that
+only exist in the higher levels.
+
+If not configured for SPARC v9 (@code{sparc64-*-*}) GAS will not bump
+passed sparclite by default, an option must be passed to enable the
+v9 instructions.
+
+GAS treats sparclite as being compatible with v8, unless an architecture
+is explicitly requested. SPARC v9 is always incompatible with sparclite.
+
+@c The order here is the same as the order of enum sparc_opcode_arch_val
+@c to give the user a sense of the order of the "bumping".
+
+@table @code
+@kindex -Av6
+@kindex Av7
+@kindex -Av8
+@kindex -Asparclet
+@kindex -Asparclite
+@kindex -Av9
+@kindex -Av9a
+@item -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
+@itemx -Av8plus | -Av8plusa | -Av9 | -Av9a
+Use one of the @samp{-A} options to select one of the SPARC
+architectures explicitly. If you select an architecture explicitly,
+@code{@value{AS}} reports a fatal error if it encounters an instruction
+or feature requiring an incompatible or higher level.
+
+@samp{-Av8plus} and @samp{-Av8plusa} select a 32 bit environment.
+
+@samp{-Av9} and @samp{-Av9a} select a 64 bit environment and are not
+available unless GAS is explicitly configured with 64 bit environment
+support.
+
+@samp{-Av8plusa} and @samp{-Av9a} enable the SPARC V9 instruction set with
+UltraSPARC extensions.
+
+@item -xarch=v8plus | -xarch=v8plusa
+For compatibility with the Solaris v9 assembler. These options are
+equivalent to -Av8plus and -Av8plusa, respectively.
+
+@item -bump
+Warn whenever it is necessary to switch to another level.
+If an architecture level is explicitly requested, GAS will not issue
+warnings until that level is reached, and will then bump the level
+as required (except between incompatible levels).
+
+@item -32 | -64
+Select the word size, either 32 bits or 64 bits.
+These options are only available with the ELF object file format,
+and require that the necessary BFD support has been included.
+@end table
+
+@node Sparc-Aligned-Data
+@section Enforcing aligned data
+
+@cindex data alignment on SPARC
+@cindex SPARC data alignment
+SPARC GAS normally permits data to be misaligned. For example, it
+permits the @code{.long} pseudo-op to be used on a byte boundary.
+However, the native SunOS and Solaris assemblers issue an error when
+they see misaligned data.
+
+@kindex --enforce-aligned-data
+You can use the @code{--enforce-aligned-data} option to make SPARC GAS
+also issue an error about misaligned data, just as the SunOS and Solaris
+assemblers do.
+
+The @code{--enforce-aligned-data} option is not the default because gcc
+issues misaligned data pseudo-ops when it initializes certain packed
+data structures (structures defined using the @code{packed} attribute).
+You may have to assemble with GAS in order to initialize packed data
+structures in your own code.
+
+@ignore
+@c FIXME: (sparc) Fill in "syntax" section!
+@c subsection syntax
+I don't know anything about Sparc syntax. Someone who does
+will have to write this section.
+@end ignore
+
+@node Sparc-Float
+@section Floating Point
+
+@cindex floating point, SPARC (@sc{ieee})
+@cindex SPARC floating point (@sc{ieee})
+The Sparc uses @sc{ieee} floating-point numbers.
+
+@node Sparc-Directives
+@section Sparc Machine Directives
+
+@cindex SPARC machine directives
+@cindex machine directives, SPARC
+The Sparc version of @code{@value{AS}} supports the following additional
+machine directives:
+
+@table @code
+@cindex @code{align} directive, SPARC
+@item .align
+This must be followed by the desired alignment in bytes.
+
+@cindex @code{common} directive, SPARC
+@item .common
+This must be followed by a symbol name, a positive number, and
+@code{"bss"}. This behaves somewhat like @code{.comm}, but the
+syntax is different.
+
+@cindex @code{half} directive, SPARC
+@item .half
+This is functionally identical to @code{.short}.
+
+@cindex @code{nword} directive, SPARC
+@item .nword
+On the Sparc, the @code{.nword} directive produces native word sized value,
+ie. if assembling with -32 it is equivalent to @code{.word}, if assembling
+with -64 it is equivalent to @code{.xword}.
+
+@cindex @code{proc} directive, SPARC
+@item .proc
+This directive is ignored. Any text following it on the same
+line is also ignored.
+
+@cindex @code{register} directive, SPARC
+@item .register
+This directive declares use of a global application or system register.
+It must be followed by a register name %g2, %g3, %g6 or %g7, comma and
+the symbol name for that register. If symbol name is @code{#scratch},
+it is a scratch register, if it is @code{#ignore}, it just surpresses any
+errors about using undeclared global register, but does not emit any
+information about it into the object file. This can be useful e.g. if you
+save the register before use and restore it after.
+
+@cindex @code{reserve} directive, SPARC
+@item .reserve
+This must be followed by a symbol name, a positive number, and
+@code{"bss"}. This behaves somewhat like @code{.lcomm}, but the
+syntax is different.
+
+@cindex @code{seg} directive, SPARC
+@item .seg
+This must be followed by @code{"text"}, @code{"data"}, or
+@code{"data1"}. It behaves like @code{.text}, @code{.data}, or
+@code{.data 1}.
+
+@cindex @code{skip} directive, SPARC
+@item .skip
+This is functionally identical to the @code{.space} directive.
+
+@cindex @code{word} directive, SPARC
+@item .word
+On the Sparc, the @code{.word} directive produces 32 bit values,
+instead of the 16 bit values it produces on many other machines.
+
+@cindex @code{xword} directive, SPARC
+@item .xword
+On the Sparc V9 processor, the @code{.xword} directive produces
+64 bit values.
+@end table
diff --git a/contrib/binutils/gas/doc/c-v850.texi b/contrib/binutils/gas/doc/c-v850.texi
index a7608f4..5416e0f 100644
--- a/contrib/binutils/gas/doc/c-v850.texi
+++ b/contrib/binutils/gas/doc/c-v850.texi
@@ -45,7 +45,22 @@ Specifies that the assembled code should be marked as being targeted at
the V850 processor. This allows the linker to detect attempts to link
such code with code assembled for other processors.
+@cindex @code{-mv850e} command line option, V850
+@item -mv850e
+Specifies that the assembled code should be marked as being targeted at
+the V850E processor. This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+@cindex @code{-mv850any} command line option, V850
+@item -mv850any
+Specifies that the assembled code should be marked as being targeted at
+the V850 processor but support instructions that are specific to the
+extended variants of the process. This allows the production of
+binaries that contain target specific code, but which are also intended
+to be used in a generic fashion. For example libgcc.a contains generic
+routines used by the code produced by GCC for all versions of the v850
+architecture, together with support routines only used by the V850E
+architecture.
@end table
@@ -158,6 +173,21 @@ ecr
@cindex @code{psw} register, V850
@item system register 5
psw
+@cindex @code{ctpc} register, V850
+@item system register 16
+ctpc
+@cindex @code{ctpsw} register, V850
+@item system register 17
+ctpsw
+@cindex @code{dbpc} register, V850
+@item system register 18
+dbpc
+@cindex @code{dbpsw} register, V850
+@item system register 19
+dbpsw
+@cindex @code{ctbp} register, V850
+@item system register 20
+ctbp
@end table
@node V850 Floating Point
@@ -189,7 +219,11 @@ Specifies that the assembled code should be marked as being targeted at
the V850 processor. This allows the linker to detect attempts to link
such code with code assembled for other processors.
-
+@cindex @code{.v850e} directive, V850
+@item .v850e
+Specifies that the assembled code should be marked as being targeted at
+the V850E processor. This allows the linker to detect attempts to link
+such code with code assembled for other processors.
@end table
@@ -249,6 +283,16 @@ in the top bit of the lo() pseudo op, the movhi instruction actually
stores 0 into r6 (0xFFFF + 1 = 0x0000), so that the movea instruction
stores 0xFFFFFFFF into r6 - the right value.
+@cindex @code{hilo} pseudo-op, V850
+@item hilo()
+Computes the 32 bit value of the given expression and stores it into
+the immediate operand field of the given instruction (which must be a
+mov instruction). For example:
+
+ @samp{mov hilo(here), r6}
+
+computes the absolute address of label 'here' and puts the result into
+register 6.
@cindex @code{sdaoff} pseudo-op, V850
@item sdaoff()
@@ -271,8 +315,7 @@ command line option].
@item tdaoff()
Computes the offset of the named variable from the start of the Tiny
Data Area (whoes address is held in register 30, the EP register) and
-stores the result as a
-7 or 8 bit unsigned value in the immediate
+stores the result as a 4,5, 7 or 8 bit unsigned value in the immediate
operand field of the given instruction. For example:
@samp{sld.w tdaoff(_a_variable)[ep],r6}
@@ -298,6 +341,18 @@ that the label is somewhere within the first 32K of memory. (Strictly
speaking it also possible to access the last 32K of memory as well, as
the offsets are signed).
+@cindex @code{ctoff} pseudo-op, V850
+@item ctoff()
+Computes the offset of the named variable from the start of the Call
+Table Area (whoes address is helg in system register 20, the CTBP
+register) and stores the result a 6 or 16 bit unsigned value in the
+immediate field of then given instruction or piece of data. For
+example:
+
+ @samp{callt ctoff(table_func1)}
+
+will put the call the function whoes address is held in the call table
+at the location labeled 'table_func1'.
@end table
diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi
index eb9f44b..8453c48 100644
--- a/contrib/binutils/gas/doc/internals.texi
+++ b/contrib/binutils/gas/doc/internals.texi
@@ -8,7 +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: 1998/02/06 03:42:57 $. It is not updated regularly, and it
+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.
@menu
@@ -115,9 +115,14 @@ This section describes some fundamental GAS data types.
@cindex symbols, internal
@cindex symbolS structure
-The definition for @code{struct symbol}, also known as @code{symbolS}, is
-located in @file{struc-symbol.h}. Symbol structures contain the following
-fields:
+The definition for the symbol structure, @code{symbolS}, is located in
+@file{struc-symbol.h}.
+
+In general, the fields of this structure may not be referred to directly.
+Instead, you must use one of the accessor functions defined in @file{symbol.h}.
+These accessor functions should work for any GAS version.
+
+Symbol structures contain the following fields:
@table @code
@item sy_value
@@ -188,16 +193,10 @@ that name is defined in @file{obj-format.h}, this field is not defined.
This processor-specific data is of type @code{TC_SYMFIELD_TYPE}. If no macro
by that name is defined in @file{targ-cpu.h}, this field is not defined.
-@item TARGET_SYMBOL_FIELDS
-If this macro is defined, it defines additional fields in the symbol structure.
-This macro is obsolete, and should be replaced when possible by uses of
-@code{OBJ_SYMFIELD_TYPE} and @code{TC_SYMFIELD_TYPE}.
@end table
-There are a number of access routines used to extract the fields of a
-@code{symbolS} structure. When possible, these routines should be used rather
-than referring to the fields directly. These routines will work for any GAS
-version.
+Here is a description of the accessor functions. These should be used rather
+than referring to the fields of @code{symbolS} directly.
@table @code
@item S_SET_VALUE
@@ -302,8 +301,136 @@ which it makes sense (primarily ELF).
@cindex S_SET_SIZE
Set the size of a symbol. This is only defined for object file formats for
which it makes sense (primarily ELF).
+
+@item symbol_get_value_expression
+@cindex symbol_get_value_expression
+Get a pointer to an @code{expressionS} structure which represents the value of
+the symbol as an expression.
+
+@item symbol_set_value_expression
+@cindex symbol_set_value_expression
+Set the value of a symbol to an expression.
+
+@item symbol_set_frag
+@cindex symbol_set_frag
+Set the frag where a symbol is defined.
+
+@item symbol_get_frag
+@cindex symbol_get_frag
+Get the frag where a symbol is defined.
+
+@item symbol_mark_used
+@cindex symbol_mark_used
+Mark a symbol as having been used in an expression.
+
+@item symbol_clear_used
+@cindex symbol_clear_used
+Clear the mark indicating that a symbol was used in an expression.
+
+@item symbol_used_p
+@cindex symbol_used_p
+Return whether a symbol was used in an expression.
+
+@item symbol_mark_used_in_reloc
+@cindex symbol_mark_used_in_reloc
+Mark a symbol as having been used by a relocation.
+
+@item symbol_clear_used_in_reloc
+@cindex symbol_clear_used_in_reloc
+Clear the mark indicating that a symbol was used in a relocation.
+
+@item symbol_used_in_reloc_p
+@cindex symbol_used_in_reloc_p
+Return whether a symbol was used in a relocation.
+
+@item symbol_mark_mri_common
+@cindex symbol_mark_mri_common
+Mark a symbol as an MRI common symbol.
+
+@item symbol_clear_mri_common
+@cindex symbol_clear_mri_common
+Clear the mark indicating that a symbol is an MRI common symbol.
+
+@item symbol_mri_common_p
+@cindex symbol_mri_common_p
+Return whether a symbol is an MRI common symbol.
+
+@item symbol_mark_written
+@cindex symbol_mark_written
+Mark a symbol as having been written.
+
+@item symbol_clear_written
+@cindex symbol_clear_written
+Clear the mark indicating that a symbol was written.
+
+@item symbol_written_p
+@cindex symbol_written_p
+Return whether a symbol was written.
+
+@item symbol_mark_resolved
+@cindex symbol_mark_resolved
+Mark a symbol as having been resolved.
+
+@item symbol_resolved_p
+@cindex symbol_resolved_p
+Return whether a symbol has been resolved.
+
+@item symbol_section_p
+@cindex symbol_section_p
+Return whether a symbol is a section symbol.
+
+@item symbol_equated_p
+@cindex symbol_equated_p
+Return whether a symbol is equated to another symbol.
+
+@item symbol_constant_p
+@cindex symbol_constant_p
+Return whether a symbol has a constant value, including being an offset within
+some frag.
+
+@item symbol_get_bfdsym
+@cindex symbol_get_bfdsym
+Return the BFD symbol associated with a symbol.
+
+@item symbol_set_bfdsym
+@cindex symbol_set_bfdsym
+Set the BFD symbol associated with a symbol.
+
+@item symbol_get_obj
+@cindex symbol_get_obj
+Return a pointer to the @code{OBJ_SYMFIELD_TYPE} field of a symbol.
+
+@item symbol_set_obj
+@cindex symbol_set_obj
+Set the @code{OBJ_SYMFIELD_TYPE} field of a symbol.
+
+@item symbol_get_tc
+@cindex symbol_get_tc
+Return a pointer to the @code{TC_SYMFIELD_TYPE} field of a symbol.
+
+@item symbol_set_tc
+@cindex symbol_set_tc
+Set the @code{TC_SYMFIELD_TYPE} field of a symbol.
+
@end table
+When @code{BFD_ASSEMBLER} is defined, GAS attempts to store local
+symbols--symbols which will not be written to the output file--using a
+different structure, @code{struct local_symbol}. This structure can only
+represent symbols whose value is an offset within a frag.
+
+Code outside of the symbol handler will always deal with @code{symbolS}
+structures and use the accessor functions. The accessor functions correctly
+deal with local symbols. @code{struct local_symbol} is much smaller than
+@code{symbolS} (which also automatically creates a bfd @code{asymbol}
+structure), so this saves space when assembling large files.
+
+The first field of @code{symbolS} is @code{bsym}, the pointer to the BFD
+symbol. The first field of @code{struct local_symbol} is a pointer which is
+always set to NULL. This is how the symbol accessor functions can distinguish
+local symbols from ordinary symbols. The symbol accessor functions
+automatically convert a local symbol into an ordinary symbol when necessary.
+
@node Expressions
@subsection Expressions
@cindex internals, expressions
@@ -768,6 +895,16 @@ comment.
@cindex tc_comment_chars
If this macro is defined, GAS will use it instead of @code{comment_chars}.
+@item tc_symbol_chars
+@cindex tc_symbol_chars
+If this macro is defined, it is a pointer to a null terminated list of
+characters which may appear in an operand. GAS already assumes that all
+alphanumberic characters, and @samp{$}, @samp{.}, and @samp{_} may appear in an
+operand (see @samp{symbol_chars} in @file{app.c}). This macro may be defined
+to treat additional characters as appearing in an operand. This affects the
+way in which GAS removes whitespace before passing the string to
+@samp{md_assemble}.
+
@item line_comment_chars
@cindex line_comment_chars
This is a null terminated @code{const char} array of characters which start a
@@ -776,8 +913,10 @@ 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 (the semicolon is such a character by default, and need not be listed in
-this array).
+lines (semicolon 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.
@item EXP_CHARS
@cindex EXP_CHARS
@@ -795,13 +934,13 @@ Usually this includes @samp{r} and @samp{f}.
@item LEX_AT
@cindex LEX_AT
-You may define this macro to the lexical type of the @kbd{@}} character. The
+You may define this macro to the lexical type of the @kbd{@@} character. The
default is zero.
Lexical types are a combination of @code{LEX_NAME} and @code{LEX_BEGIN_NAME},
both defined in @file{read.h}. @code{LEX_NAME} indicates that the character
may appear in a name. @code{LEX_BEGIN_NAME} indicates that the character may
-appear at the beginning of a nem.
+appear at the beginning of a name.
@item LEX_BR
@cindex LEX_BR
@@ -823,6 +962,12 @@ default value it zero.
You may define this macro to the lexical type of the @kbd{$} character. The
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),
+octal (Q), and hexadecimal (H). Case is not significant.
+
@item SINGLE_QUOTE_STRINGS
@cindex SINGLE_QUOTE_STRINGS
If you define this macro, GAS will treat single quotes as string delimiters.
@@ -851,6 +996,11 @@ is a label, even if it does not have a colon.
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.
+@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.
+
@item NO_PSEUDO_DOT
@cindex NO_PSEUDO_DOT
If you define this macro, GAS will not require pseudo-ops to start with a
@@ -859,7 +1009,9 @@ If you define this macro, GAS will not require pseudo-ops to start with a
@item TC_EQUAL_IN_INSN
@cindex TC_EQUAL_IN_INSN
If you define this macro, it should return nonzero if the instruction is
-permitted to contain an @kbd{=} character. GAS will use this to decide if a
+permitted to contain an @kbd{=} character. GAS will call it with two
+arguments, the character before the @kbd{=} character, and the value of
+@code{input_line_pointer} at that point. GAS uses this macro to decide if a
@kbd{=} is an assignment or an instruction.
@item TC_EOL_IN_INSN
@@ -881,13 +1033,14 @@ creates a new symbol. Typically this would be used to supply symbols whose
name or value changes dynamically, possibly in a context sensitive way.
Predefined symbols with fixed values, such as register names or condition
codes, are typically entered directly into the symbol table when @code{md_begin}
-is called.
+is called. One argument is passed, a @code{char *} for the symbol.
@item md_operand
@cindex md_operand
-GAS will call this function for any expression that can not be recognized.
-When the function is called, @code{input_line_pointer} will point to the start
-of the expression.
+GAS will call this function with one argument, an @code{expressionS}
+pointer, for any expression that can not be recognized. When the function
+is called, @code{input_line_pointer} will point to the start of the
+expression.
@item tc_unrecognized_line
@cindex tc_unrecognized_line
@@ -906,6 +1059,16 @@ upon the number of bytes that the alignment will skip.
You may define this macro to do special handling for an alignment directive.
GAS will call it at the end of the assembly.
+@item TC_IMPLICIT_LCOMM_ALIGNMENT (@var{size}, @var{p2var})
+@cindex TC_IMPLICIT_LCOMM_ALIGNMENT
+An @code{.lcomm} directive with no explicit alignment parameter will use this
+macro to set @var{p2var} to the alignment that a request for @var{size} bytes
+will have. The alignment is expressed as a power of two. If no alignment
+should take place, the macro definition should do nothing. Some targets define
+a @code{.bss} directive that is also affected by this macro. The default
+definition will set @var{p2var} to the truncated power of two of sizes up to
+eight bytes.
+
@item md_flush_pending_output
@cindex md_flush_pending_output
If you define this macro, GAS will call it each time it skips any space because of a
@@ -977,11 +1140,11 @@ relocation entry.
@cindex md_create_long_jump
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 long
-jmp) 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 long jump, and define @code{md_create_long_jump}
-to create a long jump.
+the size of a short jump (a jump that is just long enough to jump around a
+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.
@item md_estimate_size_before_relax
@cindex md_estimate_size_before_relax
@@ -1024,7 +1187,10 @@ It may also create any necessary relocations.
@item md_apply_fix
@cindex md_apply_fix
GAS will call this for each fixup. It should store the correct value in the
-object file.
+object file. @code{fixup_segment} performs a generic overflow check on the
+@code{valueT *val} argument after @code{md_apply_fix} returns. If the overflow
+check is relevant for the target machine, then @code{md_apply_fix} should
+modify @code{valueT *val}, typically to the value stored in the object file.
@item TC_HANDLES_FX_DONE
@cindex TC_HANDLES_FX_DONE
@@ -1076,7 +1242,43 @@ If you define this macro, GAS will call it each time a label is defined.
@item md_section_align
@cindex md_section_align
GAS will call this function for each section at the end of the assembly, to
-permit the CPU backend to adjust the alignment of a section.
+permit the CPU backend to adjust the alignment of a section. The function
+must take two arguments, a @code{segT} for the section and a @code{valueT}
+for the size of the section, and return a @code{valueT} for the rounded
+size.
+
+@item md_macro_start
+@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.
+
+@item md_macro_info
+@cindex md_macro_info
+If defined, GAS will call this macro after the macro expansion has been
+included in the input and after parsing the macro arguments. The single
+argument is a pointer to the macro processing's internal representation of the
+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.
+
+@item DOUBLEBAR_PARALLEL
+@cindex DOUBLEBAR_PARALLEL
+Affects the preprocessor so that lines containing '||' don't have their
+whitespace stripped following the double bar. This is useful for targets that
+implement parallel instructions.
+
+@item KEEP_WHITE_AROUND_COLON
+@cindex KEEP_WHITE_AROUND_COLON
+Normally, whitespace is compressed and removed when, in the presence of the
+colon, the adjoining tokens can be distinguished. This option affects the
+preprocessor so that whitespace around colons is preserved. This is useful
+when colons might be removed from the input after preprocessing but before
+assembling, so that adjoining tokens can still be distinguished if there is
+whitespace, or concatentated if there is not.
@item tc_frob_section
@cindex tc_frob_section
@@ -1234,6 +1436,13 @@ completed, but before the relocations have been generated.
@item obj_frob_file_after_relocs
If you define this macro, GAS will call it after the relocs have been
generated.
+
+@item SET_SECTION_RELOCS (@var{sec}, @var{relocs}, @var{n})
+@cindex SET_SECTION_RELOCS
+If you define this, it will be called after the relocations have been set for
+the section @var{sec}. The list of relocations is in @var{relocs}, and the
+number of relocations is in @var{n}. This is only used with
+@code{BFD_ASSEMBLER}.
@end table
@node Emulations
diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c
new file mode 100644
index 0000000..b83175a
--- /dev/null
+++ b/contrib/binutils/gas/dwarf2dbg.c
@@ -0,0 +1,770 @@
+/* dwarf2dbg.c - DWARF2 debug support
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+
+ 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. */
+
+/* Logical line numbers can be controlled by the compiler via the
+ following two directives:
+
+ .file FILENO "file.c"
+ .loc FILENO LINENO [COLUMN]
+
+ FILENO is the filenumber. */
+
+#include "ansidecl.h"
+
+#include "as.h"
+#include "dwarf2dbg.h"
+#include "subsegs.h"
+
+#include "elf/dwarf2.h"
+
+/* Since we can't generate the prolog until the body is complete, we
+ use three different subsegments for .debug_line: one holding the
+ prolog, one for the directory and filename info, and one for the
+ body ("statement program"). */
+#define DL_PROLOG 0
+#define DL_FILES 1
+#define DL_BODY 2
+
+/* First special line opcde - leave room for the standard opcodes.
+ Note: If you want to change this, you'll have to update the
+ "standard_opcode_lengths" table that is emitted below in
+ dwarf2_finish(). */
+#define DWARF2_LINE_OPCODE_BASE 10
+
+#ifndef DWARF2_LINE_BASE
+ /* Minimum line offset in a special line info. opcode. This value
+ was chosen to give a reasonable range of values. */
+# define DWARF2_LINE_BASE -5
+#endif
+
+/* Range of line offsets in a special line info. opcode. */
+#ifndef DWARF2_LINE_RANGE
+# define DWARF2_LINE_RANGE 14
+#endif
+
+#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
+#endif
+
+/* 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
+
+/* 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)
+
+/* Given a special op, return the address skip amount (in units of
+ DWARF2_LINE_MIN_INSN_LENGTH. */
+#define SPECIAL_ADDR(op) (((op) - DWARF2_LINE_OPCODE_BASE)/DWARF2_LINE_RANGE)
+
+/* 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 dwarf2_line_info current; /* current source info: */
+
+ /* 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,
+ {
+ 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
+ }
+ };
+
+
+/* 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));
+
+
+#define out_byte(byte) FRAG_APPEND_1_CHAR(byte)
+#define out_opcode(opc) (out_byte ((opc)), ++ls.opcode_hist[(opc) & 0xff])
+
+/* Output an unsigned "little-endian base 128" number. */
+static void
+out_uleb128 (value)
+ addressT value;
+{
+ unsigned char byte, more = 0x80;
+
+ do
+ {
+ byte = value & 0x7f;
+ value >>= 7;
+ if (value == 0)
+ more = 0;
+ out_byte (more | byte);
+ }
+ while (more);
+}
+
+/* Output a signed "little-endian base 128" number. */
+static void
+out_sleb128 (value)
+ offsetT value;
+{
+ unsigned char byte, more = 0x80;
+
+ do
+ {
+ byte = value & 0x7f;
+ value >>= 7;
+ if (((value == 0) && ((byte & 0x40) == 0))
+ || ((value == -1) && ((byte & 0x40) != 0)))
+ more = 0;
+ out_byte (more | byte);
+ }
+ while (more);
+}
+
+/* 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;
+
+ tmp = line_delta - DWARF2_LINE_BASE;
+
+ if (tmp >= DWARF2_LINE_RANGE)
+ {
+ out_opcode (DW_LNS_advance_line);
+ out_sleb128 (line_delta);
+ tmp = 0 - DWARF2_LINE_BASE;
+ line_delta = 0;
+ }
+
+ tmp += DWARF2_LINE_OPCODE_BASE;
+
+ /* try using a special opcode: */
+ opcode = tmp + addr_delta*DWARF2_LINE_RANGE;
+ if (opcode <= 255)
+ {
+ out_opcode (opcode);
+ 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)
+ {
+ out_opcode (DW_LNS_const_add_pc);
+ out_opcode (opcode);
+ return;
+ }
+
+ out_opcode (DW_LNS_advance_pc);
+ out_uleb128 (addr_delta);
+
+ if (line_delta)
+ out_opcode (tmp); /* output line-delta */
+ else
+ out_opcode (DW_LNS_copy); /* append new row with current info */
+}
+
+static void
+reset_state_machine ()
+{
+ static const struct dwarf2_sm initial_state = { INITIAL_STATE };
+
+ ls.sm = initial_state;
+}
+
+/* Set an absolute address (may results in a relocation entry): */
+static void
+out_set_addr (addr)
+ addressT addr;
+{
+ subsegT saved_subseg;
+ segT saved_seg;
+ expressionS expr;
+ symbolS *sym;
+ int bytes_per_address;
+
+ saved_seg = now_seg;
+ saved_subseg = now_subseg;
+
+ subseg_set (ls.text_seg, ls.text_subseg);
+ sym = symbol_new (".L0\001", now_seg, addr, frag_now);
+
+ subseg_set (saved_seg, saved_subseg);
+
+#ifdef BFD_ASSEMBLER
+ bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8;
+#else
+ /* FIXME. */
+ bytes_per_address = 4;
+#endif
+
+ out_opcode (DW_LNS_extended_op);
+ out_uleb128 (bytes_per_address + 1);
+
+ 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 DW_LNS_end_sequence and reset state machine. Does not
+ preserve the current segment/sub-segment! */
+static void
+out_end_sequence ()
+{
+ addressT addr, delta;
+ fragS *text_frag;
+
+ 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);
+
+ out_opcode (DW_LNS_extended_op);
+ out_uleb128 (1);
+ out_byte (DW_LNE_end_sequence);
+
+ reset_state_machine ();
+}
+
+/* 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;
+{
+ int i, last = filenum - 1;
+ char char0 = file[0];
+
+ /* 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;
+
+ /* 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;
+
+ /* 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;
+ }
+ }
+
+ /* 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;
+}
+
+/* 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. */
+
+void
+dwarf2_gen_line_info (addr, l)
+ addressT addr;
+ struct dwarf2_line_info *l;
+{
+ unsigned int filenum = l->filenum;
+ unsigned int any_output = 0;
+ subsegT saved_subseg;
+ segT saved_seg;
+ fragS *saved_frag;
+
+ 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);
+
+ 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 */
+
+ /* 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;
+
+ if (!ls.line_seg)
+ {
+#ifdef BFD_ASSEMBLER
+ symbolS *secsym;
+#endif
+
+ ls.line_seg = subseg_new (".debug_line", 0);
+
+#ifdef BFD_ASSEMBLER
+ bfd_set_section_flags (stdoutput, ls.line_seg, SEC_READONLY);
+
+ /* 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));
+#endif
+ }
+
+ subseg_set (ls.line_seg, DL_BODY);
+
+ if (ls.text_seg != saved_seg || ls.text_subseg != saved_subseg)
+ {
+ 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 (ls.sm.filenum != filenum)
+ {
+ any_output = 1;
+ out_opcode (DW_LNS_set_file);
+ out_uleb128 (filenum);
+ ls.sm.filenum = filenum;
+ }
+
+ if (ls.sm.column != l->column)
+ {
+ any_output = 1;
+ out_opcode (DW_LNS_set_column);
+ out_uleb128 (l->column);
+ ls.sm.column = l->column;
+ }
+
+ if (((l->flags & DWARF2_FLAG_BEGIN_STMT) != 0) != ls.sm.is_stmt)
+ {
+ any_output = 1;
+ out_opcode (DW_LNS_negate_stmt);
+ }
+
+ if (l->flags & DWARF2_FLAG_BEGIN_BLOCK)
+ {
+ any_output = 1;
+ out_opcode (DW_LNS_set_basic_block);
+ }
+
+ if (ls.sm.line != l->line)
+ {
+ any_output = 1;
+ if (saved_frag != ls.frag)
+ {
+ /* 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;
+ }
+ 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);
+
+ ls.num_line_entries += any_output;
+ if (any_output)
+ ls.sm.empty_sequence = 0;
+}
+
+static void
+gen_dir_list ()
+{
+ char *str, *slash, *dir_list, *dp, *cp;
+ int i, j, num_dirs;
+
+ dir_list = frag_more (0);
+ num_dirs = 0;
+
+ for (i = 0; i < ls.num_filenames; ++i)
+ {
+ str = ls.file[i].name;
+ slash = strrchr (str, '/');
+ if (slash)
+ {
+ *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)
+ {
+ /* 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;
+ }
+ *slash = '/';
+ ls.file[i].name = slash + 1;
+ }
+ }
+ out_byte ('\0'); /* terminate directory list */
+}
+
+static void
+gen_file_list ()
+{
+ size_t size;
+ char *cp;
+ int i;
+
+ for (i = 0; i < ls.num_filenames; ++i)
+ {
+ size = strlen (ls.file[i].name) + 1;
+ cp = frag_more (size);
+ memcpy (cp, ls.file[i].name, size);
+
+ out_uleb128 (ls.file[i].dir); /* directory number */
+ out_uleb128 (0); /* last modification timestamp */
+ out_uleb128 (0); /* filesize */
+ }
+ out_byte (0); /* terminate filename list */
+}
+
+static void
+print_stats (total_size)
+ unsigned long total_size;
+{
+ 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;
+
+ fprintf (stderr, "Average size: %g bytes/line\n",
+ total_size / (double) ls.num_line_entries);
+
+ fprintf (stderr, "\nStandard opcode histogram:\n");
+
+ for (i = 0; i < sizeof (opc_name)/sizeof (opc_name[0]); ++i)
+ {
+ 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]);
+ }
+
+ fprintf (stderr, "\nSpecial opcodes:\naddr\t\t\t\tline skip\n");
+
+ fprintf (stderr, "skip: ");
+ for (j = DWARF2_LINE_BASE; j < DWARF2_LINE_BASE + DWARF2_LINE_RANGE; ++j)
+ fprintf (stderr, "%3d", j);
+ fprintf (stderr, "\n-----");
+
+ for (; i < 256; ++i)
+ {
+ 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]);
+ }
+ fprintf (stderr, "\n");
+}
+
+void
+dwarf2_finish ()
+{
+ addressT body_size, total_size, prolog_size;
+ subsegT saved_subseg;
+ segT saved_seg;
+ char *cp;
+
+ if (!ls.line_seg)
+ /* no .debug_line segment, no work to do... */
+ return;
+
+ saved_seg = now_seg;
+ saved_subseg = now_subseg;
+
+ if (!ls.sm.empty_sequence)
+ out_end_sequence ();
+ total_size = body_size = frag_now_fix ();
+
+ /* 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 ();
+
+ /* and now the header ("statement program prolog", in DWARF2 lingo...) */
+ subseg_set (ls.line_seg, DL_PROLOG);
+
+ cp = frag_more (15 + DWARF2_LINE_OPCODE_BASE - 1);
+
+ total_size += frag_now_fix ();
+ prolog_size = total_size - body_size - 10;
+
+# 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);
+
+ /* 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 */
+
+ subseg_set (saved_seg, saved_subseg);
+
+ if (flag_debug)
+ print_stats (total_size);
+}
+
+void
+dwarf2_directive_file (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ int len;
+
+ /* Continue to accept a bare string and pass it off. */
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '"')
+ {
+ s_app_file (0);
+ return;
+ }
+
+ ls.any_dwarf2_directives = 1;
+
+ if (debug_type == DEBUG_NONE)
+ /* Automatically turn on DWARF2 debug info unless something else
+ has been selected. */
+ debug_type = DEBUG_DWARF2;
+
+ ls.current.filenum = get_absolute_expression ();
+ ls.current.filename = demand_copy_C_string (&len);
+
+ demand_empty_rest_of_line ();
+}
+
+void
+dwarf2_directive_loc (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ ls.any_dwarf2_directives = 1;
+
+ 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 ();
+
+ ls.current.flags = DWARF2_FLAG_BEGIN_STMT;
+
+#ifndef NO_LISTING
+ if (listing)
+ listing_source_line (ls.current.line);
+#endif
+}
+
+void
+dwarf2_where (line)
+ struct dwarf2_line_info *line;
+{
+ 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;
+ }
+}
diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h
new file mode 100644
index 0000000..a3eec1c
--- /dev/null
+++ b/contrib/binutils/gas/dwarf2dbg.h
@@ -0,0 +1,69 @@
+/* dwarf2dbg.h - DWARF2 debug support
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef AS_DWARF2DBG_H
+#define AS_DWARF2DBG_H
+
+#include "as.h"
+
+#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;
+ };
+
+/* Implements the .file FILENO "FILENAME" directive. FILENO can be 0
+ to indicate that no file number has been assigned. All real file
+ number must be >0. */
+extern void dwarf2_directive_file PARAMS ((int dummy));
+
+/* Implements the .loc FILENO LINENO [COLUMN] directive. FILENO is
+ the file number, LINENO the line number and the (optional) COLUMN
+ the column of the source code that the following instruction
+ corresponds to. FILENO can be 0 to indicate that the filename
+ specified by the textually most recent .file directive should be
+ used. */
+extern void dwarf2_directive_loc PARAMS ((int dummy));
+
+/* Returns the current source information. If .file directives have
+ been encountered, the info for the corresponding source file is
+ returned. Otherwise, the info for the assembly source file is
+ returned. */
+extern void dwarf2_where PARAMS ((struct dwarf2_line_info *l));
+
+/* This function generates .debug_line info based on the address and
+ 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. */
+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. */
+extern void dwarf2_finish PARAMS ((void));
+
+#endif /* AS_DWARF2DBG_H */
diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c
index 0cb4d50..436c8c4 100644
--- a/contrib/binutils/gas/ecoff.c
+++ b/contrib/binutils/gas/ecoff.c
@@ -1,5 +1,5 @@
/* ECOFF debugging support.
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
@@ -28,11 +28,12 @@
ECOFF debugging information (e.g., MIPS ECOFF, MIPS ELF, Alpha
ECOFF). */
+#include "ecoff.h"
+
#ifdef ECOFF_DEBUGGING
#include "coff/internal.h"
#include "coff/symconst.h"
-#include "ecoff.h"
#include "aout/stab_gnu.h"
#include <ctype.h>
@@ -1513,6 +1514,8 @@ void
ecoff_symbol_new_hook (symbolP)
symbolS *symbolP;
{
+ OBJ_SYMFIELD_TYPE *obj;
+
/* Make sure that we have a file pointer, but only if we have seen a
file. If we haven't seen a file, then this is a probably special
symbol created by md_begin which may required special handling at
@@ -1521,9 +1524,10 @@ ecoff_symbol_new_hook (symbolP)
if (cur_file_ptr == (efdr_t *) NULL
&& seen_at_least_1_file ())
add_file ((const char *) NULL, 0, 1);
- symbolP->ecoff_file = cur_file_ptr;
- symbolP->ecoff_symbol = NULL;
- symbolP->ecoff_extern_size = 0;
+ obj = symbol_get_obj (symbolP);
+ obj->ecoff_file = cur_file_ptr;
+ obj->ecoff_symbol = NULL;
+ obj->ecoff_extern_size = 0;
}
/* Add a page to a varray object. */
@@ -1570,7 +1574,7 @@ add_string (vp, hash_tbl, str, ret_hash)
register shash_t *hash_ptr;
if (len >= PAGE_USIZE)
- as_fatal ("String too big (%lu bytes)", len);
+ as_fatal (_("String too big (%lu bytes)"), len);
hash_ptr = (shash_t *) hash_find (hash_tbl, str);
if (hash_ptr == (shash_t *) NULL)
@@ -1596,7 +1600,7 @@ add_string (vp, hash_tbl, str, ret_hash)
err = hash_insert (hash_tbl, str, (char *) hash_ptr);
if (err)
- as_fatal ("Inserting \"%s\" into string hash table: %s",
+ as_fatal (_("Inserting \"%s\" into string hash table: %s"),
str, err);
}
@@ -1628,7 +1632,7 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
shash_t *hash_ptr = (shash_t *) NULL;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->symbols;
@@ -1643,7 +1647,7 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
psym->name = str;
psym->as_sym = sym_value;
if (sym_value != (symbolS *) NULL)
- sym_value->ecoff_symbol = psym;
+ symbol_get_obj (sym_value)->ecoff_symbol = psym;
psym->addend = addend;
psym->file_ptr = cur_file_ptr;
psym->proc_ptr = cur_proc_ptr;
@@ -1715,7 +1719,7 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx)
case st_End:
pscope = cur_file_ptr->cur_scope;
if (pscope == (scope_t *) NULL)
- as_fatal ("too many st_End's");
+ as_fatal (_("too many st_End's"));
else
{
st_t begin_type = (st_t) pscope->lsym->ecoff_sym.asym.st;
@@ -1821,7 +1825,7 @@ add_aux_sym_symint (aux_word)
register aux_t *aux_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->aux_syms;
@@ -1847,7 +1851,7 @@ add_aux_sym_rndx (file_index, sym_index)
register aux_t *aux_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->aux_syms;
@@ -1879,7 +1883,7 @@ add_aux_sym_tir (t, state, hash_tbl)
AUXU aux;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->aux_syms;
@@ -2035,7 +2039,7 @@ get_tag (tag, sym, basic_type)
tag_t *tag_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
hash_ptr = (shash_t *) hash_find (tag_hash, tag);
@@ -2061,7 +2065,7 @@ get_tag (tag, sym, basic_type)
hash_ptr = allocate_shash ();
err = hash_insert (tag_hash, perm, (char *) hash_ptr);
if (err)
- as_fatal ("Inserting \"%s\" into tag hash table: %s",
+ as_fatal (_("Inserting \"%s\" into tag hash table: %s"),
tag, err);
hash_ptr->string = perm;
}
@@ -2149,7 +2153,7 @@ add_procedure (func)
#endif
if (cur_file_ptr == (efdr_t *) NULL)
- as_fatal ("no current file pointer");
+ as_fatal (_("no current file pointer"));
vp = &cur_file_ptr->procs;
@@ -2170,7 +2174,7 @@ add_procedure (func)
/* Set the BSF_FUNCTION flag for the symbol. */
sym = symbol_find_or_make (func);
- sym->bsym->flags |= BSF_FUNCTION;
+ symbol_get_bfdsym (sym)->flags |= BSF_FUNCTION;
/* Push the start of the function. */
new_proc_ptr->sym = add_ecoff_symbol ((const char *) NULL, st_Proc, sc_Text,
@@ -2195,6 +2199,12 @@ add_procedure (func)
noproc_lineno = (lineno_list_t *) NULL;
}
}
+
+symbolS *
+ecoff_get_cur_proc_sym ()
+{
+ return (cur_proc_ptr ? cur_proc_ptr->sym->as_sym : NULL);
+}
/* Add a new filename, and set up all of the file relative
virtual arrays (strings, symbols, aux syms, etc.). Record
@@ -2221,7 +2231,7 @@ add_file (file_name, indx, fake)
char *file;
if (first_file != (efdr_t *) NULL)
- as_fatal ("fake .file after real one");
+ as_fatal (_("fake .file after real one"));
as_where (&file, (unsigned int *) NULL);
file_name = (const char *) file;
@@ -2309,7 +2319,7 @@ add_file (file_name, indx, fake)
(shash_t **)0);
if (strlen (file_name) > PAGE_USIZE - 2)
- as_fatal ("Filename goes over one page boundary.");
+ as_fatal (_("Filename goes over one page boundary."));
/* Push the start of the filename. We assume that the filename
will be stored at string offset 1. */
@@ -2444,14 +2454,14 @@ ecoff_directive_begin (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".begin directive without a preceding .file directive");
+ as_warn (_(".begin directive without a preceding .file directive"));
demand_empty_rest_of_line ();
return;
}
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".begin directive without a preceding .ent directive");
+ as_warn (_(".begin directive without a preceding .ent directive"));
demand_empty_rest_of_line ();
return;
}
@@ -2483,14 +2493,14 @@ ecoff_directive_bend (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".bend directive without a preceding .file directive");
+ as_warn (_(".bend directive without a preceding .file directive"));
demand_empty_rest_of_line ();
return;
}
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".bend directive without a preceding .ent directive");
+ as_warn (_(".bend directive without a preceding .ent directive"));
demand_empty_rest_of_line ();
return;
}
@@ -2503,7 +2513,7 @@ ecoff_directive_bend (ignore)
the symbol. */
endsym = symbol_find (name);
if (endsym == (symbolS *) NULL)
- as_warn (".bend directive names unknown symbol");
+ as_warn (_(".bend directive names unknown symbol"));
else
(void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, endsym,
(bfd_vma) 0, (symint_t) 0, (symint_t) 0);
@@ -2547,9 +2557,9 @@ ecoff_directive_def (ignore)
name_end = get_symbol_end ();
if (coff_sym_name != (char *) NULL)
- as_warn (".def pseudo-op used inside of .def/.endef; ignored");
+ as_warn (_(".def pseudo-op used inside of .def/.endef; ignored"));
else if (*name == '\0')
- as_warn ("Empty symbol name in .def; ignored");
+ as_warn (_("Empty symbol name in .def; ignored"));
else
{
if (coff_sym_name != (char *) NULL)
@@ -2587,7 +2597,7 @@ ecoff_directive_dim (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".dim pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".dim pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2602,7 +2612,7 @@ ecoff_directive_dim (ignore)
{
if (*input_line_pointer != '\n'
&& *input_line_pointer != ';')
- as_warn ("Badly formed .dim directive");
+ as_warn (_("Badly formed .dim directive"));
break;
}
}
@@ -2615,7 +2625,7 @@ ecoff_directive_dim (ignore)
{
if (coff_type.num_dims >= N_TQ)
{
- as_warn ("Too many .dim entries");
+ as_warn (_("Too many .dim entries"));
break;
}
coff_type.dimensions[coff_type.num_dims] = dimens[i];
@@ -2636,7 +2646,7 @@ ecoff_directive_scl (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".scl pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".scl pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2662,7 +2672,7 @@ ecoff_directive_size (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".size pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".size pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2677,7 +2687,7 @@ ecoff_directive_size (ignore)
{
if (*input_line_pointer != '\n'
&& *input_line_pointer != ';')
- as_warn ("Badly formed .size directive");
+ as_warn (_("Badly formed .size directive"));
break;
}
}
@@ -2690,7 +2700,7 @@ ecoff_directive_size (ignore)
{
if (coff_type.num_sizes >= N_TQ)
{
- as_warn ("Too many .size entries");
+ as_warn (_("Too many .size entries"));
break;
}
coff_type.sizes[coff_type.num_sizes] = sizes[i];
@@ -2713,7 +2723,7 @@ ecoff_directive_type (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".type pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".type pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2731,7 +2741,7 @@ ecoff_directive_type (ignore)
/* FIXME: We could handle this by setting the continued bit.
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",
+ as_warn (_("The type of %s is too complex; it will be simplified"),
coff_sym_name);
break;
}
@@ -2742,7 +2752,7 @@ ecoff_directive_type (ignore)
else if (ISARY (val))
*--tq_ptr = tq_Array;
else
- as_fatal ("Unrecognized .type argument");
+ as_fatal (_("Unrecognized .type argument"));
val = DECREF (val);
}
@@ -2781,7 +2791,7 @@ ecoff_directive_tag (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".tag pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".tag pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2808,7 +2818,7 @@ ecoff_directive_val (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".val pseudo-op used outside of .def/.endef; ignored");
+ as_warn (_(".val pseudo-op used outside of .def/.endef; ignored"));
demand_empty_rest_of_line ();
return;
}
@@ -2816,7 +2826,7 @@ ecoff_directive_val (ignore)
expression (&exp);
if (exp.X_op != O_constant && exp.X_op != O_symbol)
{
- as_bad (".val expression is too copmlex");
+ as_bad (_(".val expression is too copmlex"));
demand_empty_rest_of_line ();
return;
}
@@ -2847,7 +2857,7 @@ ecoff_directive_endef (ignore)
if (coff_sym_name == (char *) NULL)
{
- as_warn (".endef pseudo-op used before .def; ignored");
+ as_warn (_(".endef pseudo-op used before .def; ignored"));
return;
}
@@ -2873,7 +2883,7 @@ ecoff_directive_endef (ignore)
if (coff_type.num_sizes != 1 || diff < 0)
{
- as_warn ("Bad COFF debugging info");
+ as_warn (_("Bad COFF debugging info"));
return;
}
@@ -2922,7 +2932,7 @@ ecoff_directive_endef (ignore)
{
if (coff_tag == (char *) NULL)
{
- as_warn ("No tag specified for %s", name);
+ as_warn (_("No tag specified for %s"), name);
return;
}
@@ -2954,7 +2964,7 @@ ecoff_directive_endef (ignore)
if (coff_type.num_sizes - coff_type.num_dims - coff_type.extra_sizes
!= 1)
{
- as_warn ("Bad COFF debugging information");
+ as_warn (_("Bad COFF debugging information"));
return;
}
else
@@ -3026,14 +3036,14 @@ ecoff_directive_end (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".end directive without a preceding .file directive");
+ as_warn (_(".end directive without a preceding .file directive"));
demand_empty_rest_of_line ();
return;
}
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".end directive without a preceding .ent directive");
+ as_warn (_(".end directive without a preceding .ent directive"));
demand_empty_rest_of_line ();
return;
}
@@ -3044,7 +3054,7 @@ ecoff_directive_end (ignore)
ch = *name;
if (! is_name_beginner (ch))
{
- as_warn (".end directive has no name");
+ as_warn (_(".end directive has no name"));
*input_line_pointer = name_end;
demand_empty_rest_of_line ();
return;
@@ -3056,7 +3066,7 @@ ecoff_directive_end (ignore)
symbol. */
ent = symbol_find (name);
if (ent == (symbolS *) NULL)
- as_warn (".end directive names unknown symbol");
+ as_warn (_(".end directive names unknown symbol"));
else
(void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text,
symbol_new ("L0\001", now_seg,
@@ -3085,7 +3095,7 @@ ecoff_directive_ent (ignore)
if (cur_proc_ptr != (proc_t *) NULL)
{
- as_warn ("second .ent directive found before .end directive");
+ as_warn (_("second .ent directive found before .end directive"));
demand_empty_rest_of_line ();
return;
}
@@ -3096,7 +3106,7 @@ ecoff_directive_ent (ignore)
ch = *name;
if (! is_name_beginner (ch))
{
- as_warn (".ent directive has no name");
+ as_warn (_(".ent directive has no name"));
*input_line_pointer = name_end;
demand_empty_rest_of_line ();
return;
@@ -3116,7 +3126,8 @@ ecoff_directive_ent (ignore)
++input_line_pointer;
SKIP_WHITESPACE ();
}
- if (isdigit (*input_line_pointer) || *input_line_pointer == '-')
+ if (isdigit ((unsigned char) *input_line_pointer)
+ || *input_line_pointer == '-')
(void) get_absolute_expression ();
demand_empty_rest_of_line ();
@@ -3144,7 +3155,7 @@ ecoff_directive_extern (ignore)
++input_line_pointer;
size = get_absolute_expression ();
- symbolp->ecoff_extern_size = size;
+ symbol_get_obj (symbolp)->ecoff_extern_size = size;
}
/* Parse .file directives. */
@@ -3159,7 +3170,7 @@ ecoff_directive_file (ignore)
if (cur_proc_ptr != (proc_t *) NULL)
{
- as_warn ("No way to handle .file within .ent/.end section");
+ as_warn (_("No way to handle .file within .ent/.end section"));
demand_empty_rest_of_line ();
return;
}
@@ -3184,14 +3195,14 @@ ecoff_directive_fmask (ignore)
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".fmask outside of .ent");
+ as_warn (_(".fmask outside of .ent"));
demand_empty_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .fmask directive");
+ as_warn (_("Bad .fmask directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3213,7 +3224,7 @@ ecoff_directive_frame (ignore)
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".frame outside of .ent");
+ as_warn (_(".frame outside of .ent"));
demand_empty_rest_of_line ();
return;
}
@@ -3224,7 +3235,7 @@ ecoff_directive_frame (ignore)
if (*input_line_pointer++ != ','
|| get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .frame directive");
+ as_warn (_("Bad .frame directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3253,14 +3264,14 @@ ecoff_directive_mask (ignore)
if (cur_proc_ptr == (proc_t *) NULL)
{
- as_warn (".mask outside of .ent");
+ as_warn (_(".mask outside of .ent"));
demand_empty_rest_of_line ();
return;
}
if (get_absolute_expression_and_terminator (&val) != ',')
{
- as_warn ("Bad .mask directive");
+ as_warn (_("Bad .mask directive"));
--input_line_pointer;
demand_empty_rest_of_line ();
return;
@@ -3283,14 +3294,14 @@ ecoff_directive_loc (ignore)
if (cur_file_ptr == (efdr_t *) NULL)
{
- as_warn (".loc before .file");
+ as_warn (_(".loc before .file"));
demand_empty_rest_of_line ();
return;
}
if (now_seg != text_section)
{
- as_warn (".loc outside of .text");
+ as_warn (_(".loc outside of .text"));
demand_empty_rest_of_line ();
return;
}
@@ -3387,7 +3398,8 @@ mark_stabs (ignore)
}
/* Parse .weakext directives. */
-
+#ifndef TC_MIPS
+/* For TC_MIPS use the version in tc-mips.c. */
void
ecoff_directive_weakext (ignore)
int ignore;
@@ -3408,7 +3420,7 @@ ecoff_directive_weakext (ignore)
{
if (S_IS_DEFINED (symbolP))
{
- as_bad ("Ignoring attempt to redefine symbol `%s'.",
+ as_bad (_("Ignoring attempt to redefine symbol `%s'."),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
@@ -3421,11 +3433,11 @@ ecoff_directive_weakext (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
{
- as_bad ("bad .weakext directive");
+ as_bad (_("bad .weakext directive"));
ignore_rest_of_line();
return;
}
- symbolP->sy_value = exp;
+ symbol_set_value_expression (symbolP, &exp);
}
}
@@ -3433,6 +3445,7 @@ ecoff_directive_weakext (ignore)
demand_empty_rest_of_line ();
}
+#endif /* not TC_MIPS */
/* Handle .stabs directives. The actual parsing routine is done by a
generic routine. This routine is called via OBJ_PROCESS_STAB.
@@ -3489,7 +3502,7 @@ ecoff_stab (sec, what, string, type, other, desc)
/* We don't handle .stabd. */
if (what != 's' && what != 'n')
{
- as_bad (".stab%c is not supported", what);
+ as_bad (_(".stab%c is not supported"), what);
return;
}
@@ -3499,7 +3512,7 @@ ecoff_stab (sec, what, string, type, other, desc)
/* We ignore the other field. */
if (other != 0)
- as_warn (".stab%c: ignoring non-zero other field", what);
+ as_warn (_(".stab%c: ignoring non-zero other field"), what);
/* Make sure we have a current file. */
if (cur_file_ptr == (efdr_t *) NULL)
@@ -3533,7 +3546,7 @@ ecoff_stab (sec, what, string, type, other, desc)
dummy_symr.index = desc;
if (dummy_symr.index != desc)
{
- as_warn ("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)",
+ as_warn (_("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)"),
desc, what);
return;
}
@@ -3557,7 +3570,7 @@ ecoff_stab (sec, what, string, type, other, desc)
listing_source_file (string);
#endif
- if (isdigit (*input_line_pointer)
+ if (isdigit ((unsigned char) *input_line_pointer)
|| *input_line_pointer == '-'
|| *input_line_pointer == '+')
{
@@ -3569,7 +3582,7 @@ ecoff_stab (sec, what, string, type, other, desc)
}
else if (! is_name_beginner ((unsigned char) *input_line_pointer))
{
- as_warn ("Illegal .stab%c directive, bad character", what);
+ as_warn (_("Illegal .stab%c directive, bad character"), what);
return;
}
else
@@ -3607,12 +3620,12 @@ ecoff_stab (sec, what, string, type, other, desc)
ECOFF symbol. We want to compute the type of the ECOFF symbol
independently. */
if (sym != (symbolS *) NULL)
- hold = sym->ecoff_symbol;
+ hold = symbol_get_obj (sym)->ecoff_symbol;
(void) add_ecoff_symbol (string, st, sc, sym, addend, value, indx);
if (sym != (symbolS *) NULL)
- sym->ecoff_symbol = hold;
+ symbol_get_obj (sym)->ecoff_symbol = hold;
/* Restore normal file type. */
cur_file_ptr = save_file_ptr;
@@ -3649,10 +3662,10 @@ ecoff_frob_symbol (sym)
}
/* Double check weak symbols. */
- if (sym->bsym->flags & BSF_WEAK)
+ if (S_IS_WEAK (sym))
{
if (S_IS_COMMON (sym))
- as_bad ("Symbol `%s' can not be both weak and common",
+ as_bad (_("Symbol `%s' can not be both weak and common"),
S_GET_NAME (sym));
}
}
@@ -3728,6 +3741,7 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr)
long iline;
long totcount;
lineno_list_t first;
+ lineno_list_t *local_first_lineno = first_lineno;
if (linecntptr != (long *) NULL)
*linecntptr = 0;
@@ -3747,25 +3761,29 @@ 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. */
- if (first_proc_ptr != (proc_t *) NULL
- && first_lineno != (lineno_list_t *) NULL
+ won't screw things up too badly.
+
+ Don't do this for ECOFF assembly source line numbers. They work
+ without this extra attention. */
+ if (debug_type != DEBUG_ECOFF
+ && first_proc_ptr != (proc_t *) NULL
+ && local_first_lineno != (lineno_list_t *) NULL
&& ((S_GET_VALUE (first_proc_ptr->sym->as_sym)
+ bfd_get_section_vma (stdoutput,
S_GET_SEGMENT (first_proc_ptr->sym->as_sym)))
!= 0))
{
- first.file = first_lineno->file;
- first.proc = first_lineno->proc;
+ first.file = local_first_lineno->file;
+ first.proc = local_first_lineno->proc;
first.frag = &zero_address_frag;
first.paddr = 0;
first.lineno = 0;
- first.next = first_lineno;
- first_lineno = &first;
+ first.next = local_first_lineno;
+ local_first_lineno = &first;
}
- for (l = first_lineno; l != (lineno_list_t *) NULL; l = l->next)
+ for (l = local_first_lineno; l != (lineno_list_t *) NULL; l = l->next)
{
long count;
long delta;
@@ -4026,7 +4044,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
begin_sym = sym_ptr->proc_ptr->sym->as_sym;
if (S_GET_SEGMENT (as_sym)
!= S_GET_SEGMENT (begin_sym))
- as_warn (".begin/.bend in different segments");
+ as_warn (_(".begin/.bend in different segments"));
sym_ptr->ecoff_sym.asym.value =
S_GET_VALUE (as_sym) - S_GET_VALUE (begin_sym);
}
@@ -4070,7 +4088,8 @@ ecoff_build_symbols (backend, buf, bufend, offset)
|| S_IS_WEAK (as_sym)
|| ! S_IS_DEFINED (as_sym)))
{
- if ((as_sym->bsym->flags & BSF_FUNCTION) != 0)
+ if ((symbol_get_bfdsym (as_sym)->flags
+ & BSF_FUNCTION) != 0)
st = st_Proc;
else
st = st_Global;
@@ -4082,18 +4101,19 @@ ecoff_build_symbols (backend, buf, bufend, offset)
if (! S_IS_DEFINED (as_sym))
{
- if (as_sym->ecoff_extern_size == 0
- || (as_sym->ecoff_extern_size
- > bfd_get_gp_size (stdoutput)))
+ valueT s;
+
+ s = symbol_get_obj (as_sym)->ecoff_extern_size;
+ if (s == 0
+ || s > bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
sc = sc_SUndefined;
- sym_ptr->ecoff_sym.asym.value =
- as_sym->ecoff_extern_size;
+ sym_ptr->ecoff_sym.asym.value = s;
}
#ifdef S_SET_SIZE
- S_SET_SIZE (as_sym, as_sym->ecoff_extern_size);
+ S_SET_SIZE (as_sym, s);
#endif
}
else if (S_IS_COMMON (as_sym))
@@ -4213,7 +4233,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
know (begin_ptr->as_sym != (symbolS *) NULL);
if (S_GET_SEGMENT (as_sym)
!= S_GET_SEGMENT (begin_ptr->as_sym))
- as_warn (".begin/.bend in different segments");
+ as_warn (_(".begin/.bend in different segments"));
sym_ptr->ecoff_sym.asym.value =
(S_GET_VALUE (as_sym)
- S_GET_VALUE (begin_ptr->as_sym));
@@ -4238,7 +4258,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
begin_sym = sym_ptr->proc_ptr->sym->as_sym;
if (S_GET_SEGMENT (as_sym)
!= S_GET_SEGMENT (begin_sym))
- as_warn (".begin/.bend in different segments");
+ as_warn (_(".begin/.bend in different segments"));
sym_ptr->ecoff_sym.asym.value =
S_GET_VALUE (as_sym) - S_GET_VALUE (begin_sym);
}
@@ -4276,7 +4296,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
case this is an external symbol. Note that this
destroys the asym.index field. */
if (as_sym != (symbolS *) NULL
- && as_sym->ecoff_symbol == sym_ptr)
+ && symbol_get_obj (as_sym)->ecoff_symbol == sym_ptr)
{
if ((sym_ptr->ecoff_sym.asym.st == st_Proc
|| sym_ptr->ecoff_sym.asym.st == st_StaticProc)
@@ -4645,7 +4665,7 @@ ecoff_setup_ext ()
for (sym = symbol_rootP; sym != (symbolS *) NULL; sym = symbol_next (sym))
{
- if (sym->ecoff_symbol == NULL)
+ if (symbol_get_obj (sym)->ecoff_symbol == NULL)
continue;
/* If this is a local symbol, then force the fields to zero. */
@@ -4653,13 +4673,16 @@ ecoff_setup_ext ()
&& ! S_IS_WEAK (sym)
&& S_IS_DEFINED (sym))
{
- sym->ecoff_symbol->ecoff_sym.asym.value = 0;
- sym->ecoff_symbol->ecoff_sym.asym.st = (int) st_Nil;
- sym->ecoff_symbol->ecoff_sym.asym.sc = (int) sc_Nil;
- sym->ecoff_symbol->ecoff_sym.asym.index = indexNil;
+ struct localsym *lsym;
+
+ lsym = symbol_get_obj (sym)->ecoff_symbol;
+ lsym->ecoff_sym.asym.value = 0;
+ lsym->ecoff_sym.asym.st = (int) st_Nil;
+ lsym->ecoff_sym.asym.sc = (int) sc_Nil;
+ lsym->ecoff_sym.asym.index = indexNil;
}
- obj_ecoff_set_ext (sym, &sym->ecoff_symbol->ecoff_sym);
+ obj_ecoff_set_ext (sym, &symbol_get_obj (sym)->ecoff_symbol->ecoff_sym);
}
}
@@ -4709,12 +4732,12 @@ ecoff_build_debug (hdr, bufp, backend)
cur_proc_ptr = (proc_t *) NULL;
for (sym = symbol_rootP; sym != (symbolS *) NULL; sym = symbol_next (sym))
{
- if (sym->ecoff_symbol != NULL
- || sym->ecoff_file == (efdr_t *) NULL
- || (sym->bsym->flags & BSF_SECTION_SYM) != 0)
+ if (symbol_get_obj (sym)->ecoff_symbol != NULL
+ || symbol_get_obj (sym)->ecoff_file == (efdr_t *) NULL
+ || (symbol_get_bfdsym (sym)->flags & BSF_SECTION_SYM) != 0)
continue;
- cur_file_ptr = sym->ecoff_file;
+ cur_file_ptr = symbol_get_obj (sym)->ecoff_file;
add_ecoff_symbol ((const char *) NULL, st_Nil, sc_Nil, sym,
(bfd_vma) 0, S_GET_VALUE (sym), indexNil);
}
@@ -4736,7 +4759,7 @@ ecoff_build_debug (hdr, bufp, backend)
cur_file_ptr->cur_scope = cur_file_ptr->cur_scope->prev;
if (! end_warning && ! cur_file_ptr->fake)
{
- as_warn ("Missing .end or .bend at end of file");
+ as_warn (_("Missing .end or .bend at end of file"));
end_warning = 1;
}
}
@@ -5227,7 +5250,7 @@ ecoff_set_gp_prolog_size (sz)
cur_proc_ptr->pdr.gp_prologue = sz;
if (cur_proc_ptr->pdr.gp_prologue != sz)
{
- as_warn ("GP prologue size exceeds field size, using 0 instead");
+ as_warn (_("GP prologue size exceeds field size, using 0 instead"));
cur_proc_ptr->pdr.gp_prologue = 0;
}
@@ -5241,12 +5264,14 @@ ecoff_no_current_file ()
}
void
-ecoff_generate_asm_lineno (filename, lineno)
- const char *filename;
- int lineno;
+ecoff_generate_asm_lineno ()
{
+ unsigned int lineno;
+ char *filename;
lineno_list_t *list;
+ as_where (&filename, &lineno);
+
if (current_stabs_filename == (char *)NULL
|| strcmp (current_stabs_filename, filename))
add_file (filename, 0, 1);
@@ -5283,4 +5308,11 @@ ecoff_generate_asm_lineno (filename, lineno)
}
}
+#else
+
+void
+ecoff_generate_asm_lineno ()
+{
+}
+
#endif /* ECOFF_DEBUGGING */
diff --git a/contrib/binutils/gas/ecoff.h b/contrib/binutils/gas/ecoff.h
index 68f2b03..8ac65f8 100644
--- a/contrib/binutils/gas/ecoff.h
+++ b/contrib/binutils/gas/ecoff.h
@@ -1,5 +1,5 @@
/* ecoff.h -- header file for ECOFF debugging support
- Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -20,11 +20,11 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-#ifdef ECOFF_DEBUGGING
-
#ifndef GAS_ECOFF_H
#define GAS_ECOFF_H
+#ifdef ECOFF_DEBUGGING
+
#include "coff/sym.h"
#include "coff/ecoff.h"
@@ -41,10 +41,10 @@ extern void ecoff_new_file PARAMS ((const char *));
/* This function should be called when a new symbol is created, by
obj_symbol_new_hook. */
-extern void ecoff_symbol_new_hook PARAMS ((struct symbol *));
+extern void ecoff_symbol_new_hook PARAMS ((symbolS *));
/* This function should be called by the obj_frob_symbol hook. */
-extern void ecoff_frob_symbol PARAMS ((struct symbol *));
+extern void ecoff_frob_symbol PARAMS ((symbolS *));
/* Build the ECOFF debugging information. This should be called by
obj_frob_file. This fills in the counts in *HDR; the offsets are
@@ -89,7 +89,7 @@ extern void ecoff_set_gp_prolog_size PARAMS ((int sz));
/* This routine is called from the ECOFF code to set the external
information for a symbol. */
#ifndef obj_ecoff_set_ext
-extern void obj_ecoff_set_ext PARAMS ((struct symbol *, EXTR *));
+extern void obj_ecoff_set_ext PARAMS ((symbolS *, EXTR *));
#endif
/* This routine is used to patch up a line number directive when
@@ -99,9 +99,12 @@ extern void ecoff_fix_loc PARAMS ((fragS *, unsigned long));
/* This function is called from read.c to peek at cur_file_ptr. */
extern int ecoff_no_current_file PARAMS ((void));
-/* This routine is called from read.c to generate line number for .s
- file. */
-extern void ecoff_generate_asm_lineno PARAMS ((const char *, int));
+/* This function returns the symbol associated with the current proc. */
+extern symbolS *ecoff_get_cur_proc_sym PARAMS ((void));
-#endif /* ! GAS_ECOFF_H */
#endif /* ECOFF_DEBUGGING */
+
+/* This routine is called from read.c to generate line number for .s file. */
+extern void ecoff_generate_asm_lineno PARAMS ((void));
+
+#endif /* ! GAS_ECOFF_H */
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index 47e6933..7cca437 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, 1998
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -34,6 +34,10 @@
#include "obstack.h"
static void floating_constant PARAMS ((expressionS * expressionP));
+static valueT generic_bignum_to_int32 PARAMS ((void));
+#ifdef BFD64
+static valueT generic_bignum_to_int64 PARAMS ((void));
+#endif
static void integer_constant PARAMS ((int radix, expressionS * expressionP));
static void mri_char_constant PARAMS ((expressionS *));
static void current_location PARAMS ((expressionS *));
@@ -64,6 +68,7 @@ symbolS *
make_expr_symbol (expressionP)
expressionS *expressionP;
{
+ expressionS zero;
const char *fake;
symbolS *symbolP;
struct expr_symbol_line *n;
@@ -72,6 +77,22 @@ make_expr_symbol (expressionP)
&& expressionP->X_add_number == 0)
return expressionP->X_add_symbol;
+ if (expressionP->X_op == O_big)
+ {
+ /* This won't work, because the actual value is stored in
+ generic_floating_point_number or generic_bignum, and we are
+ going to lose it if we haven't already. */
+ if (expressionP->X_add_number > 0)
+ as_bad (_("bignum invalid; zero assumed"));
+ else
+ as_bad (_("floating point number invalid; zero assumed"));
+ zero.X_op = O_constant;
+ zero.X_add_number = 0;
+ zero.X_unsigned = 0;
+ clean_up_expression (&zero);
+ expressionP = &zero;
+ }
+
fake = FAKE_LABEL_NAME;
/* Putting constant symbols in absolute_section rather than
@@ -83,7 +104,7 @@ make_expr_symbol (expressionP)
? absolute_section
: expr_section),
0, &zero_address_frag);
- symbolP->sy_value = *expressionP;
+ symbol_set_value_expression (symbolP, expressionP);
if (expressionP->X_op == O_constant)
resolve_symbol_value (symbolP, 1);
@@ -177,6 +198,17 @@ expr_build_binary (op, s1, s2)
e.X_add_number = 0;
return make_expr_symbol (&e);
}
+
+/* Build an expression for the current location ('.'). */
+
+symbolS *
+expr_build_dot ()
+{
+ expressionS e;
+
+ current_location (&e);
+ return make_expr_symbol (&e);
+}
/*
* Build any floating-point literal here.
@@ -215,11 +247,11 @@ floating_constant (expressionP)
{
if (error_code == ERROR_EXPONENT_OVERFLOW)
{
- as_bad ("bad floating-point constant: exponent overflow, probably assembling junk");
+ as_bad (_("bad floating-point constant: exponent overflow, probably assembling junk"));
}
else
{
- as_bad ("bad floating-point constant: unknown error code=%d.", error_code);
+ as_bad (_("bad floating-point constant: unknown error code=%d."), error_code);
}
}
expressionP->X_op = O_big;
@@ -295,7 +327,7 @@ integer_constant (radix, expressionP)
#define valuesize 32
#endif
- if (flag_m68k_mri && radix == 0)
+ if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) && radix == 0)
{
int flt = 0;
@@ -357,7 +389,7 @@ integer_constant (radix, expressionP)
break;
case 10:
maxdig = radix = 10;
- too_many_digits = (valuesize + 12) / 4; /* very rough */
+ too_many_digits = (valuesize + 11) / 4; /* very rough */
}
#undef valuesize
start = input_line_pointer;
@@ -399,7 +431,7 @@ integer_constant (radix, expressionP)
/* Check for 8 digit per word max. */
if (ndigit > 8)
- as_bad ("An bignum with underscores may not have more than 8 hex digits in any word.");
+ 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.*/
know (LITTLENUM_NUMBER_OF_BITS == 16);
@@ -419,7 +451,7 @@ integer_constant (radix, expressionP)
assert (num_little_digits >= 4);
if (num_little_digits != 8)
- as_bad ("A bignum with underscores must have exactly 4 words.");
+ 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.
@@ -509,7 +541,9 @@ integer_constant (radix, expressionP)
}
}
- if (flag_m68k_mri && suffix != NULL && input_line_pointer - 1 == suffix)
+ if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
+ && suffix != NULL
+ && input_line_pointer - 1 == suffix)
c = *input_line_pointer++;
if (small)
@@ -546,7 +580,7 @@ integer_constant (radix, expressionP)
/* 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.",
+ as_bad (_("backw. ref to unknown label \"%d:\", 0 assumed."),
(int) number);
expressionP->X_op = O_constant;
}
@@ -670,7 +704,7 @@ mri_char_constant (expressionP)
if (i < 0)
{
- as_bad ("Character constant too large");
+ as_bad (_("Character constant too large"));
i = 0;
}
@@ -778,13 +812,15 @@ operand (expressionP)
case '9':
input_line_pointer--;
- integer_constant (flag_m68k_mri ? 0 : 10, expressionP);
+ integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
+ ? 0 : 10,
+ expressionP);
break;
case '0':
/* non-decimal radix */
- if (flag_m68k_mri)
+ if (NUMBERS_WITH_SUFFIX || flag_m68k_mri)
{
char *s;
@@ -797,8 +833,7 @@ operand (expressionP)
integer_constant (0, expressionP);
break;
}
- }
-
+ }
c = *input_line_pointer;
switch (c)
{
@@ -808,7 +843,7 @@ operand (expressionP)
case 'Q':
case '8':
case '9':
- if (flag_m68k_mri)
+ if (NUMBERS_WITH_SUFFIX || flag_m68k_mri)
{
integer_constant (0, expressionP);
break;
@@ -841,7 +876,7 @@ operand (expressionP)
break;
case 'b':
- if (LOCAL_LABELS_FB && ! flag_m68k_mri)
+ if (LOCAL_LABELS_FB && ! (flag_m68k_mri || NUMBERS_WITH_SUFFIX))
{
/* This code used to check for '+' and '-' here, and, in
some conditions, fall through to call
@@ -863,7 +898,7 @@ operand (expressionP)
/* Fall through. */
case 'B':
input_line_pointer++;
- if (flag_m68k_mri)
+ if (flag_m68k_mri || NUMBERS_WITH_SUFFIX)
goto default_case;
integer_constant (2, expressionP);
break;
@@ -876,7 +911,9 @@ operand (expressionP)
case '5':
case '6':
case '7':
- integer_constant (flag_m68k_mri ? 0 : 8, expressionP);
+ integer_constant ((flag_m68k_mri || NUMBERS_WITH_SUFFIX)
+ ? 0 : 8,
+ expressionP);
break;
case 'f':
@@ -886,7 +923,8 @@ operand (expressionP)
number, make it one. Otherwise, make it a local label,
and try to deal with parsing the rest later. */
if (!input_line_pointer[1]
- || (is_end_of_line[0xff & input_line_pointer[1]]))
+ || (is_end_of_line[0xff & input_line_pointer[1]])
+ || strchr (FLT_CHARS, 'f') == NULL)
goto is_0f_label;
{
char *cp = input_line_pointer + 1;
@@ -899,10 +937,14 @@ operand (expressionP)
if (*cp == 'f' || *cp == 'b')
/* 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. */
+ goto is_0f_label;
else
goto is_0f_float;
default:
- as_fatal ("expr.c(operand): bad atof_generic return val %d",
+ as_fatal (_("expr.c(operand): bad atof_generic return val %d"),
r);
}
}
@@ -922,7 +964,7 @@ operand (expressionP)
case 'd':
case 'D':
- if (flag_m68k_mri)
+ if (flag_m68k_mri || NUMBERS_WITH_SUFFIX)
{
integer_constant (0, expressionP);
break;
@@ -953,30 +995,34 @@ operand (expressionP)
break;
case '(':
+#ifndef NEED_INDEX_OPERATOR
case '[':
+#endif
/* 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++ != ']'))
{
- as_bad ("Missing ')' assumed");
+ as_bad (_("Missing ')' assumed"));
input_line_pointer--;
}
SKIP_WHITESPACE ();
/* here with input_line_pointer->char after "(...)" */
return segment;
+#ifdef TC_M68K
case 'E':
if (! flag_m68k_mri || *input_line_pointer != '\'')
goto de_fault;
- as_bad ("EBCDIC constants are not supported");
+ as_bad (_("EBCDIC constants are not supported"));
/* Fall through. */
case 'A':
if (! flag_m68k_mri || *input_line_pointer != '\'')
goto de_fault;
++input_line_pointer;
/* Fall through. */
+#endif
case '\'':
if (! flag_m68k_mri)
{
@@ -996,11 +1042,13 @@ operand (expressionP)
(void) operand (expressionP);
break;
+#ifdef TC_M68K
case '"':
/* Double quote is the bitwise not operator in MRI mode. */
if (! flag_m68k_mri)
goto de_fault;
/* Fall through. */
+#endif
case '~':
/* ~ is permitted to start a label on the Delta. */
if (is_name_beginner (c))
@@ -1037,11 +1085,12 @@ operand (expressionP)
expressionP->X_add_number = 0;
}
else
- as_warn ("Unary operator %c ignored because bad operand follows",
+ as_warn (_("Unary operator %c ignored because bad operand follows"),
c);
}
break;
+#if defined (DOLLAR_DOT) || defined (TC_M68K)
case '$':
/* $ is the program counter when in MRI mode, or when DOLLAR_DOT
is defined. */
@@ -1062,6 +1111,7 @@ operand (expressionP)
current_location (expressionP);
break;
+#endif
case '.':
if (!is_part_of_name (*input_line_pointer))
@@ -1081,7 +1131,7 @@ operand (expressionP)
input_line_pointer += start ? 8 : 7;
SKIP_WHITESPACE ();
if (*input_line_pointer != '(')
- as_bad ("syntax error in .startof. or .sizeof.");
+ as_bad (_("syntax error in .startof. or .sizeof."));
else
{
char *buf;
@@ -1106,7 +1156,7 @@ operand (expressionP)
*input_line_pointer = c;
SKIP_WHITESPACE ();
if (*input_line_pointer != ')')
- as_bad ("syntax error in .startof. or .sizeof.");
+ as_bad (_("syntax error in .startof. or .sizeof."));
else
++input_line_pointer;
}
@@ -1125,6 +1175,7 @@ operand (expressionP)
input_line_pointer--;
break;
+#ifdef TC_M68K
case '%':
if (! flag_m68k_mri)
goto de_fault;
@@ -1154,9 +1205,12 @@ operand (expressionP)
current_location (expressionP);
break;
+#endif
default:
+#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 */
@@ -1255,7 +1309,7 @@ operand (expressionP)
if (expressionP->X_op == O_absent)
{
++input_line_pointer;
- as_bad ("Bad expression");
+ as_bad (_("Bad expression"));
expressionP->X_op = O_constant;
expressionP->X_add_number = 0;
}
@@ -1273,7 +1327,7 @@ operand (expressionP)
/* The PA port needs this information. */
if (expressionP->X_add_symbol)
- expressionP->X_add_symbol->sy_used = 1;
+ symbol_mark_used (expressionP->X_add_symbol);
switch (expressionP->X_op)
{
@@ -1320,8 +1374,8 @@ clean_up_expression (expressionP)
break;
case O_subtract:
if (expressionP->X_op_symbol == expressionP->X_add_symbol
- || ((expressionP->X_op_symbol->sy_frag
- == expressionP->X_add_symbol->sy_frag)
+ || ((symbol_get_frag (expressionP->X_op_symbol)
+ == symbol_get_frag (expressionP->X_add_symbol))
&& SEG_NORMAL (S_GET_SEGMENT (expressionP->X_add_symbol))
&& (S_GET_VALUE (expressionP->X_op_symbol)
== S_GET_VALUE (expressionP->X_add_symbol))))
@@ -1366,7 +1420,7 @@ clean_up_expression (expressionP)
#undef __
#define __ O_illegal
-static operatorT op_encoding[256] =
+static const operatorT op_encoding[256] =
{ /* maps ASCII->operators */
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __,
@@ -1379,7 +1433,13 @@ static operatorT op_encoding[256] =
__, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __,
- __, __, __, __, __, __, O_bit_exclusive_or, __,
+ __, __, __,
+#ifdef NEED_INDEX_OPERATOR
+ O_index,
+#else
+ __,
+#endif
+ __, __, O_bit_exclusive_or, __,
__, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __,
@@ -1417,44 +1477,79 @@ static operator_rankT op_rank[] =
0, /* O_symbol_rva */
0, /* O_register */
0, /* O_bit */
- 8, /* O_uminus */
- 8, /* O_bit_not */
- 8, /* O_logical_not */
- 7, /* O_multiply */
- 7, /* O_divide */
- 7, /* O_modulus */
- 7, /* O_left_shift */
- 7, /* O_right_shift */
- 6, /* O_bit_inclusive_or */
- 6, /* O_bit_or_not */
- 6, /* O_bit_exclusive_or */
- 6, /* O_bit_and */
- 4, /* O_add */
- 4, /* O_subtract */
- 3, /* O_eq */
- 3, /* O_ne */
- 3, /* O_lt */
- 3, /* O_le */
- 3, /* O_ge */
- 3, /* O_gt */
- 2, /* O_logical_and */
- 1 /* O_logical_or */
+ 9, /* O_uminus */
+ 9, /* O_bit_not */
+ 9, /* O_logical_not */
+ 8, /* O_multiply */
+ 8, /* O_divide */
+ 8, /* O_modulus */
+ 8, /* O_left_shift */
+ 8, /* O_right_shift */
+ 7, /* O_bit_inclusive_or */
+ 7, /* O_bit_or_not */
+ 7, /* O_bit_exclusive_or */
+ 7, /* O_bit_and */
+ 5, /* O_add */
+ 5, /* O_subtract */
+ 4, /* O_eq */
+ 4, /* O_ne */
+ 4, /* O_lt */
+ 4, /* O_le */
+ 4, /* O_ge */
+ 4, /* O_gt */
+ 3, /* O_logical_and */
+ 2, /* O_logical_or */
+ 1, /* O_index */
+ 0, /* O_md1 */
+ 0, /* O_md2 */
+ 0, /* O_md3 */
+ 0, /* O_md4 */
+ 0, /* O_md5 */
+ 0, /* O_md6 */
+ 0, /* O_md7 */
+ 0, /* O_md8 */
+ 0, /* O_md9 */
+ 0, /* O_md10 */
+ 0, /* O_md11 */
+ 0, /* O_md12 */
+ 0, /* O_md13 */
+ 0, /* O_md14 */
+ 0, /* O_md15 */
+ 0, /* O_md16 */
};
-/* Initialize the expression parser. */
+/* Unfortunately, in MRI mode for the m68k, multiplication and
+ division have lower precedence than the bit wise operators. This
+ function sets the operator precedences correctly for the current
+ 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)
void
-expr_begin ()
+expr_set_precedence ()
{
- /* In MRI mode for the m68k, multiplication and division have lower
- precedence than the bit wise operators. */
if (flag_m68k_mri)
{
- op_rank[O_multiply] = 5;
- op_rank[O_divide] = 5;
- op_rank[O_modulus] = 5;
- op_encoding['"'] = O_bit_not;
+ op_rank[O_multiply] = MRI_MUL_PRECEDENCE;
+ op_rank[O_divide] = MRI_MUL_PRECEDENCE;
+ op_rank[O_modulus] = MRI_MUL_PRECEDENCE;
+ }
+ else
+ {
+ op_rank[O_multiply] = STANDARD_MUL_PRECEDENCE;
+ op_rank[O_divide] = STANDARD_MUL_PRECEDENCE;
+ op_rank[O_modulus] = STANDARD_MUL_PRECEDENCE;
}
+}
+
+/* Initialize the expression parser. */
+
+void
+expr_begin ()
+{
+ expr_set_precedence ();
/* Verify that X_op field is wide enough. */
{
@@ -1474,7 +1569,7 @@ operator ()
int c;
operatorT ret;
- c = *input_line_pointer;
+ c = *input_line_pointer & 0xff;
switch (c)
{
@@ -1553,10 +1648,11 @@ operator ()
/* Parse an expression. */
segT
-expr (rank, resultP)
- operator_rankT rank; /* Larger # is higher rank. */
+expr (rankarg, resultP)
+ int rankarg; /* Larger # is higher rank. */
expressionS *resultP; /* Deliver result here. */
{
+ operator_rankT rank = (operator_rankT) rankarg;
segT retval;
expressionS right;
operatorT op_left;
@@ -1578,7 +1674,7 @@ expr (rank, resultP)
rightseg = expr (op_rank[(int) op_left], &right);
if (right.X_op == O_absent)
{
- as_warn ("missing operand; zero assumed");
+ as_warn (_("missing operand; zero assumed"));
right.X_op = O_constant;
right.X_add_number = 0;
right.X_add_symbol = NULL;
@@ -1587,6 +1683,17 @@ expr (rank, resultP)
know (*input_line_pointer != ' ');
+ if (op_left == O_index)
+ {
+ if (*input_line_pointer != ']')
+ as_bad ("missing right bracket");
+ else
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ }
+ }
+
if (retval == undefined_section)
{
if (SEG_NORMAL (rightseg))
@@ -1600,7 +1707,7 @@ expr (rank, resultP)
&& op_left != O_subtract
#endif
)
- as_bad ("operation combines symbols in different segments");
+ as_bad (_("operation combines symbols in different segments"));
op_right = operator ();
@@ -1615,8 +1722,10 @@ expr (rank, resultP)
if (resultP->X_op == O_big)
{
- as_warn ("left operand is a %s; integer 0 assumed",
- resultP->X_add_number > 0 ? "bignum" : "float");
+ if (resultP->X_add_number > 0)
+ as_warn (_("left operand is a bignum; integer 0 assumed"));
+ else
+ as_warn (_("left operand is a float; integer 0 assumed"));
resultP->X_op = O_constant;
resultP->X_add_number = 0;
resultP->X_add_symbol = NULL;
@@ -1624,8 +1733,10 @@ expr (rank, resultP)
}
if (right.X_op == O_big)
{
- as_warn ("right operand is a %s; integer 0 assumed",
- right.X_add_number > 0 ? "bignum" : "float");
+ if (right.X_add_number > 0)
+ as_warn (_("right operand is a bignum; integer 0 assumed"));
+ else
+ as_warn (_("right operand is a float; integer 0 assumed"));
right.X_op = O_constant;
right.X_add_number = 0;
right.X_add_symbol = NULL;
@@ -1642,8 +1753,8 @@ expr (rank, resultP)
else if (op_left == O_subtract
&& right.X_op == O_symbol
&& resultP->X_op == O_symbol
- && (right.X_add_symbol->sy_frag
- == resultP->X_add_symbol->sy_frag)
+ && (symbol_get_frag (right.X_add_symbol)
+ == symbol_get_frag (resultP->X_add_symbol))
&& SEG_NORMAL (S_GET_SEGMENT (right.X_add_symbol)))
{
@@ -1673,7 +1784,7 @@ expr (rank, resultP)
offsetT v = right.X_add_number;
if (v == 0 && (op_left == O_divide || op_left == O_modulus))
{
- as_warn ("division by zero");
+ as_warn (_("division by zero"));
v = 1;
}
switch (op_left)
@@ -1757,7 +1868,7 @@ expr (rank, resultP)
/* The PA port needs this information. */
if (resultP->X_add_symbol)
- resultP->X_add_symbol->sy_used = 1;
+ symbol_mark_used (resultP->X_add_symbol);
return resultP->X_op == O_constant ? absolute_section : retval;
}
@@ -1785,9 +1896,13 @@ get_symbol_end ()
/* We accept \001 in a name in case this is being called with a
constructed string. */
if (is_name_beginner (c = *input_line_pointer++) || c == '\001')
- while (is_part_of_name (c = *input_line_pointer++)
- || c == '\001')
- ;
+ {
+ while (is_part_of_name (c = *input_line_pointer++)
+ || c == '\001')
+ ;
+ if (is_name_ender (c))
+ c = *input_line_pointer++;
+ }
*--input_line_pointer = 0;
return (c);
}
diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h
index a963148..0ed6af6 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-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92-98, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -102,6 +102,11 @@ typedef enum
O_logical_and,
/* (X_add_symbol || X_op_symbol) + X_add_number. */
O_logical_or,
+ /* X_op_symbol [ X_add_symbol ] */
+ O_index,
+ /* machine dependent operators */
+ O_md1, O_md2, O_md3, O_md4, O_md5, O_md6, O_md7, O_md8,
+ O_md9, O_md10, O_md11, O_md12, O_md13, O_md14, O_md15, O_md16,
/* this must be the largest value */
O_max
} operatorT;
@@ -109,25 +114,32 @@ typedef enum
typedef struct expressionS
{
/* The main symbol. */
- struct symbol *X_add_symbol;
+ symbolS *X_add_symbol;
/* The second symbol, if needed. */
- struct symbol *X_op_symbol;
+ symbolS *X_op_symbol;
/* A number to add. */
offsetT X_add_number;
+
/* The type of the expression. We can't assume that an arbitrary
compiler can handle a bitfield of enum type. FIXME: We could
check this using autoconf. */
#ifdef __GNUC__
- operatorT X_op : 5;
+ operatorT X_op : 8;
#else
- unsigned X_op : 5;
+ unsigned char X_op;
#endif
+
/* Non-zero if X_add_number should be regarded as unsigned. This is
only valid for O_constant expressions. It is only used when an
O_constant must be extended into a bignum (i.e., it is not used
when performing arithmetic on these values).
FIXME: This field is not set very reliably. */
unsigned int X_unsigned : 1;
+
+ /* 7 additional bits can be defined if needed. */
+
+ /* Machine dependent field */
+ unsigned short X_md;
} expressionS;
/* "result" should be type (expressionS *). */
@@ -146,15 +158,16 @@ typedef char operator_rankT;
extern char get_symbol_end PARAMS ((void));
extern void expr_begin PARAMS ((void));
+extern void expr_set_precedence PARAMS ((void));
extern segT expr PARAMS ((int rank, expressionS * resultP));
extern unsigned int get_single_number PARAMS ((void));
-extern struct symbol *make_expr_symbol PARAMS ((expressionS * expressionP));
+extern symbolS *make_expr_symbol PARAMS ((expressionS * expressionP));
extern int expr_symbol_where
- PARAMS ((struct symbol *, char **, unsigned int *));
+ PARAMS ((symbolS *, char **, unsigned int *));
-extern struct symbol * expr_build_uconstant PARAMS ((offsetT));
-extern struct symbol * expr_build_unary PARAMS ((operatorT, struct symbol *));
-extern struct symbol * expr_build_binary
- PARAMS ((operatorT, struct symbol *, struct symbol *));
+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/frags.c b/contrib/binutils/gas/frags.c
index aa22f35..882cb12 100644
--- a/contrib/binutils/gas/frags.c
+++ b/contrib/binutils/gas/frags.c
@@ -67,25 +67,22 @@ frag_grow (nchars)
{
if (obstack_room (&frchain_now->frch_obstack) < nchars)
{
- unsigned int n, oldn;
+ unsigned int n;
long oldc;
frag_wane (frag_now);
frag_new (0);
- oldn = (unsigned) -1;
oldc = frchain_now->frch_obstack.chunk_size;
- frchain_now->frch_obstack.chunk_size = 2 * nchars;
- while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars
- && n < oldn)
+ 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);
- oldn = n;
}
frchain_now->frch_obstack.chunk_size = oldc;
}
if (obstack_room (&frchain_now->frch_obstack) < nchars)
- as_fatal ("Can't extend frag %d. chars", nchars);
+ as_fatal (_("Can't extend frag %d. chars"), nchars);
}
/*
@@ -117,7 +114,7 @@ frag_new (old_frags_var_max_size)
assert (frchain_now->frch_last == frag_now);
/* Fix up old frag's fr_fix. */
- frag_now->fr_fix = frag_now_fix () - old_frags_var_max_size;
+ frag_now->fr_fix = frag_now_fix_octets () - old_frags_var_max_size;
/* Make sure its type is valid. */
assert (frag_now->fr_type != 0);
@@ -170,13 +167,13 @@ frag_more (nchars)
if (now_seg == absolute_section)
{
- as_bad ("attempt to allocate data in absolute section");
+ as_bad (_("attempt to allocate data in absolute section"));
subseg_set (text_section, 0);
}
if (mri_common_symbol != NULL)
{
- as_bad ("attempt to allocate data in common section");
+ as_bad (_("attempt to allocate data in common section"));
mri_common_symbol = NULL;
}
@@ -218,6 +215,11 @@ frag_var (type, max_chars, var, subtype, symbol, offset, opcode)
frag_now->fr_symbol = symbol;
frag_now->fr_offset = offset;
frag_now->fr_opcode = opcode;
+#ifdef USING_CGEN
+ frag_now->fr_cgen.insn = 0;
+ frag_now->fr_cgen.opindex = 0;
+ frag_now->fr_cgen.opinfo = 0;
+#endif
#ifdef TC_FRAG_INIT
TC_FRAG_INIT (frag_now);
#endif
@@ -253,6 +255,11 @@ frag_variant (type, max_chars, var, subtype, symbol, offset, opcode)
frag_now->fr_symbol = symbol;
frag_now->fr_offset = offset;
frag_now->fr_opcode = opcode;
+#ifdef USING_CGEN
+ frag_now->fr_cgen.insn = 0;
+ frag_now->fr_cgen.opindex = 0;
+ frag_now->fr_cgen.opinfo = 0;
+#endif
#ifdef TC_FRAG_INIT
TC_FRAG_INIT (frag_now);
#endif
@@ -329,12 +336,19 @@ frag_align_pattern (alignment, fill_pattern, n_fill, max)
}
addressT
-frag_now_fix ()
+frag_now_fix_octets ()
{
if (now_seg == absolute_section)
return abs_section_offset;
- return (addressT) ((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;
}
void
diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h
index fa834ee..b4c6e38 100644
--- a/contrib/binutils/gas/frags.h
+++ b/contrib/binutils/gas/frags.h
@@ -1,5 +1,5 @@
/* frags.h - Header file for the frag concept.
- Copyright (C) 1987, 92, 93, 94, 95, 97, 1998
+ Copyright (C) 1987, 92, 93, 94, 95, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -44,17 +44,17 @@ struct obstack;
struct frag
{
- /* Object file address. */
+ /* Object file address (as an octet offset). */
addressT fr_address;
/* Chain forward; ascending address order. Rooted in frch_root. */
struct frag *fr_next;
- /* (Fixed) number of chars we know we have. May be 0. */
+ /* (Fixed) number of octets we know we have. May be 0. */
offsetT fr_fix;
- /* (Variable) number of chars after above. May be 0. */
+ /* (Variable) number of octets after above. May be 0. */
offsetT fr_var;
/* For variable-length tail. */
- struct symbol *fr_symbol;
+ symbolS *fr_symbol;
/* For variable-length tail. */
offsetT fr_offset;
/* Points to opcode low addr byte, for relaxation. */
@@ -71,8 +71,12 @@ struct frag
#ifdef USING_CGEN
/* Don't include this unless using CGEN to keep frag size down. */
struct {
+ /* CGEN_INSN entry for this instruction. */
const struct cgen_insn *insn;
- unsigned char opindex, opinfo;
+ /* Index into operand table. */
+ int opindex;
+ /* Target specific data, usually reloc number. */
+ int opinfo;
} fr_cgen;
#endif
@@ -97,6 +101,7 @@ struct frag
instead, use frag_now_fix (). */
COMMON fragS *frag_now;
extern addressT frag_now_fix PARAMS ((void));
+extern addressT frag_now_fix_octets PARAMS ((void));
/* For foreign-segment symbol fixups. */
COMMON fragS zero_address_frag;
diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c
index d64c242..a8f5619 100644
--- a/contrib/binutils/gas/gasp.c
+++ b/contrib/binutils/gas/gasp.c
@@ -1,5 +1,6 @@
/* gasp.c - Gnu assembler preprocessor main program.
- Copyright (C) 1994, 95, 96, 97, 1998 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
@@ -49,6 +50,7 @@ suitable for gas to consume.
*/
#include "config.h"
+#include "bin-bugs.h"
#include <stdio.h>
#include <string.h>
@@ -67,6 +69,7 @@ extern char *malloc ();
#include "libiberty.h"
#include "sb.h"
#include "macro.h"
+#include "asintl.h"
char *program_version = "1.2";
@@ -75,6 +78,11 @@ char *program_version = "1.2";
it. */
extern void as_abort PARAMS ((const char *, int, const char *));
+/* The default obstack chunk size. If we set this to zero, the
+ obstack code will use whatever will fit in a 4096 byte block. This
+ 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 */
@@ -186,37 +194,6 @@ typedef struct
} hash_table;
-/* 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. */
-
-/* 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;
-
-/* 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 */
- hash_table formal_hash; /* hash table of formals. */
- }
-macro_entry;
-
/* how we nest files and expand macros etc.
we keep a stack of of include_stack structs. each include file
@@ -475,7 +452,7 @@ hash_add_to_string_table (tab, key, name, again)
if (ptr->value.s.len)
{
if (!again)
- ERROR ((stderr, "redefinition not allowed\n"));
+ ERROR ((stderr, _("redefinition not allowed\n")));
}
ptr->type = hash_string;
@@ -549,7 +526,7 @@ checkconst (op, term)
if (term->add_symbol.len
|| term->sub_symbol.len)
{
- ERROR ((stderr, "the %c operator cannot take non-absolute arguments.\n", op));
+ ERROR ((stderr, _("the %c operator cannot take non-absolute arguments.\n"), op));
}
}
@@ -626,13 +603,13 @@ level_0 (idx, string, lhs)
{
sb acc;
sb_new (&acc);
- ERROR ((stderr, "string where expression expected.\n"));
+ ERROR ((stderr, _("string where expression expected.\n")));
idx = getstring (idx, string, &acc);
sb_kill (&acc);
}
else
{
- ERROR ((stderr, "can't find primary in expression.\n"));
+ ERROR ((stderr, _("can't find primary in expression.\n")));
idx++;
}
return sb_skip_white (idx, string);
@@ -672,7 +649,7 @@ level_1 (idx, string, lhs)
idx++;
idx = level_5 (sb_skip_white (idx, string), string, lhs);
if (string->ptr[idx] != ')')
- ERROR ((stderr, "misplaced closing parens.\n"));
+ ERROR ((stderr, _("misplaced closing parens.\n")));
else
idx++;
break;
@@ -709,7 +686,7 @@ level_2 (idx, string, lhs)
checkconst ('/', lhs);
checkconst ('/', &rhs);
if (rhs.value == 0)
- ERROR ((stderr, "attempt to divide by zero.\n"));
+ ERROR ((stderr, _("attempt to divide by zero.\n")));
else
lhs->value /= rhs.value;
break;
@@ -741,7 +718,7 @@ level_3 (idx, string, lhs)
lhs->value += rhs.value;
if (lhs->add_symbol.name && rhs.add_symbol.name)
{
- ERROR ((stderr, "can't add two relocatable expressions\n"));
+ ERROR ((stderr, _("can't add two relocatable expressions\n")));
}
/* change nn+symbol to symbol + nn */
if (rhs.add_symbol.name)
@@ -887,7 +864,7 @@ exp_get_abs (emsg, idx, in, val)
exp_t res;
idx = exp_parse (idx, in, &res);
if (res.add_symbol.len || res.sub_symbol.len)
- ERROR ((stderr, emsg));
+ ERROR ((stderr, "%s", emsg));
*val = res.value;
return idx;
}
@@ -946,7 +923,7 @@ include_buf (name, ptr, type, index)
{
sp++;
if (sp - include_stack >= MAX_INCLUDES)
- FATAL ((stderr, "unreasonable nesting.\n"));
+ FATAL ((stderr, _("unreasonable nesting.\n")));
sb_new (&sp->name);
sb_add_sb (&sp->name, name);
sp->handle = 0;
@@ -1024,7 +1001,7 @@ get_line (in)
{
if (online)
{
- WARNING ((stderr, "End of file not at start of line.\n"));
+ WARNING ((stderr, _("End of file not at start of line.\n")));
if (copysource)
putc ('\n', outfile);
ch = '\n';
@@ -1079,7 +1056,7 @@ grab_label (in, out)
{
int i = 0;
sb_reset (out);
- if (ISFIRSTCHAR (in->ptr[i]))
+ if (ISFIRSTCHAR (in->ptr[i]) || in->ptr[i] == '\\')
{
sb_add_char (out, in->ptr[i]);
i++;
@@ -1145,7 +1122,7 @@ change_base (idx, in, out)
base = 10;
break;
default:
- ERROR ((stderr, "Illegal base character %c.\n", in->ptr[idx]));
+ ERROR ((stderr, _("Illegal base character %c.\n"), in->ptr[idx]));
base = 10;
break;
}
@@ -1260,7 +1237,7 @@ do_radix (ptr)
radix = 16;
break;
default:
- ERROR ((stderr, "radix is %c must be one of b, q, d or h", radix));
+ ERROR ((stderr, _("radix is %c must be one of b, q, d or h"), radix));
}
}
@@ -1296,7 +1273,7 @@ get_opsize (idx, in, size)
case '\t':
break;
default:
- ERROR ((stderr, "size must be one of b, w or l, is %c.\n", in->ptr[idx]));
+ ERROR ((stderr, _("size must be one of b, w or l, is %c.\n"), in->ptr[idx]));
break;
}
idx++;
@@ -1378,7 +1355,7 @@ do_data (idx, in, size)
idx = exp_parse (idx, in, &e);
exp_string (&e, &acc);
sb_add_char (&acc, 0);
- fprintf (outfile, acc.ptr);
+ fprintf (outfile, "%s", acc.ptr);
if (idx < in->len && in->ptr[idx] == ',')
{
fprintf (outfile, ",");
@@ -1404,9 +1381,9 @@ do_datab (idx, in)
idx = get_opsize (idx, in, &opsize);
- idx = exp_get_abs ("datab repeat must be constant.\n", idx, in, &repeat);
+ idx = exp_get_abs (_("datab repeat must be constant.\n"), idx, in, &repeat);
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs ("datab data must be absolute.\n", idx, in, &fill);
+ idx = exp_get_abs (_("datab data must be absolute.\n"), idx, in, &fill);
fprintf (outfile, ".fill\t%d,%d,%d\n", repeat, opsize, fill);
}
@@ -1420,23 +1397,18 @@ do_align (idx, in)
{
int al, have_fill, fill;
- idx = exp_get_abs ("align needs absolute expression.\n", idx, in, &al);
+ idx = exp_get_abs (_("align needs absolute expression.\n"), idx, in, &al);
idx = sb_skip_white (idx, in);
have_fill = 0;
fill = 0;
if (! eol (idx, in))
{
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs (".align needs absolute fill value.\n", idx, in,
+ idx = exp_get_abs (_(".align needs absolute fill value.\n"), idx, in,
&fill);
have_fill = 1;
}
- if (al != 1
- && al != 2
- && al != 4)
- WARNING ((stderr, "alignment must be one of 1, 2 or 4.\n"));
-
fprintf (outfile, ".align %d", al);
if (have_fill)
fprintf (outfile, ",%d", fill);
@@ -1460,7 +1432,7 @@ do_res (idx, in, type)
idx = sb_skip_white (idx, in);
if (in->ptr[idx] == ',')
idx++;
- idx = exp_get_abs ("res needs absolute expression for fill count.\n", idx, in, &count);
+ idx = exp_get_abs (_("res needs absolute expression for fill count.\n"), idx, in, &count);
if (type == 'c' || type == 'z')
count++;
@@ -1540,13 +1512,13 @@ do_form (idx, in)
if (strncasecmp (in->ptr + idx, "LIN=", 4) == 0)
{
idx += 4;
- idx = exp_get_abs ("form LIN= needs absolute expresssion.\n", idx, in, &lines);
+ idx = exp_get_abs (_("form LIN= needs absolute expresssion.\n"), idx, in, &lines);
}
- if (strncasecmp (in->ptr + idx, "COL=", 4) == 0)
+ if (strncasecmp (in->ptr + idx, _("COL="), 4) == 0)
{
idx += 4;
- idx = exp_get_abs ("form COL= needs absolute expresssion.\n", idx, in, &columns);
+ idx = exp_get_abs (_("form COL= needs absolute expresssion.\n"), idx, in, &columns);
}
idx++;
@@ -1588,7 +1560,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
int val;
char buf[20];
/* Turns the next expression into a string */
- idx = exp_get_abs ("% operator needs absolute expression",
+ idx = exp_get_abs (_("% operator needs absolute expression"),
idx + 1,
in,
&val);
@@ -1650,7 +1622,7 @@ skip_openp (idx, in)
{
idx = sb_skip_white (idx, in);
if (in->ptr[idx] != '(')
- ERROR ((stderr, "misplaced ( .\n"));
+ ERROR ((stderr, _("misplaced ( .\n")));
idx = sb_skip_white (idx + 1, in);
return idx;
}
@@ -1665,7 +1637,7 @@ skip_closep (idx, in)
{
idx = sb_skip_white (idx, in);
if (in->ptr[idx] != ')')
- ERROR ((stderr, "misplaced ).\n"));
+ ERROR ((stderr, _("misplaced ).\n")));
idx = sb_skip_white (idx + 1, in);
return idx;
}
@@ -1719,7 +1691,7 @@ doinstr (idx, in, out)
idx = sb_skip_comma (idx, in);
if (isdigit ((unsigned char) in->ptr[idx]))
{
- idx = exp_get_abs (".instr needs absolute expresson.\n", idx, in, &start);
+ idx = exp_get_abs (_(".instr needs absolute expresson.\n"), idx, in, &start);
}
else
{
@@ -1757,9 +1729,9 @@ dosubstr (idx, in, out)
idx = skip_openp (idx, in);
idx = get_and_process (idx, in, &string);
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs ("need absolute position.\n", idx, in, &pos);
+ idx = exp_get_abs (_("need absolute position.\n"), idx, in, &pos);
idx = sb_skip_comma (idx, in);
- idx = exp_get_abs ("need absolute length.\n", idx, in, &len);
+ idx = exp_get_abs (_("need absolute length.\n"), idx, in, &len);
idx = skip_closep (idx, in);
@@ -1916,7 +1888,7 @@ process_file ()
|| line.ptr[0] == '!'))
{
/* MRI line comment. */
- fprintf (outfile, sb_name (&line));
+ fprintf (outfile, "%s", sb_name (&line));
}
else
{
@@ -2008,7 +1980,7 @@ process_file ()
}
if (!had_end && !mri)
- WARNING ((stderr, "END missing from end of file.\n"));
+ WARNING ((stderr, _("END missing from end of file.\n")));
}
@@ -2038,11 +2010,11 @@ do_assigna (idx, in)
sb_new (&tmp);
process_assigns (idx, in, &tmp);
- idx = exp_get_abs (".ASSIGNA needs constant expression argument.\n", 0, &tmp, &val);
+ idx = exp_get_abs (_(".ASSIGNA needs constant expression argument.\n"), 0, &tmp, &val);
if (!label.len)
{
- ERROR ((stderr, ".ASSIGNA without label.\n"));
+ ERROR ((stderr, _(".ASSIGNA without label.\n")));
}
else
{
@@ -2067,7 +2039,7 @@ do_assignc (idx, in)
if (!label.len)
{
- ERROR ((stderr, ".ASSIGNS without label.\n"));
+ ERROR ((stderr, _(".ASSIGNS without label.\n")));
}
else
{
@@ -2134,7 +2106,7 @@ condass_lookup_name (inbuf, idx, out, warn)
{
if (warn)
{
- WARNING ((stderr, "Can't find preprocessor variable %s.\n", sb_name (&condass_acc)));
+ WARNING ((stderr, _("Can't find preprocessor variable %s.\n"), sb_name (&condass_acc)));
}
else
{
@@ -2199,7 +2171,7 @@ whatcond (idx, in, val)
}
if (cond == NEVER)
{
- ERROR ((stderr, "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n"));
+ ERROR ((stderr, _("Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n")));
cond = NEVER;
}
idx = sb_skip_white (idx + 2, in);
@@ -2233,7 +2205,7 @@ istrue (idx, in)
if (cond != EQ && cond != NE)
{
- ERROR ((stderr, "Comparison operator for strings must be EQ or NE\n"));
+ ERROR ((stderr, _("Comparison operator for strings must be EQ or NE\n")));
res = 0;
}
else
@@ -2245,17 +2217,17 @@ istrue (idx, in)
int vala;
int valb;
int cond;
- idx = exp_get_abs ("Conditional operator must have absolute operands.\n", idx, in, &vala);
+ idx = exp_get_abs (_("Conditional operator must have absolute operands.\n"), idx, in, &vala);
idx = whatcond (idx, in, &cond);
idx = sb_skip_white (idx, in);
if (in->ptr[idx] == '"')
{
- WARNING ((stderr, "String compared against expression.\n"));
+ WARNING ((stderr, _("String compared against expression.\n")));
res = 0;
}
else
{
- idx = exp_get_abs ("Conditional operator must have absolute operands.\n", idx, in, &valb);
+ idx = exp_get_abs (_("Conditional operator must have absolute operands.\n"), idx, in, &valb);
switch (cond)
{
default:
@@ -2300,7 +2272,7 @@ do_aif (idx, in)
{
if (ifi >= IFNESTING)
{
- FATAL ((stderr, "AIF nesting unreasonable.\n"));
+ FATAL ((stderr, _("AIF nesting unreasonable.\n")));
}
ifi++;
ifstack[ifi].on = ifstack[ifi-1].on ? istrue (idx, in) : 0;
@@ -2315,7 +2287,7 @@ do_aelse ()
ifstack[ifi].on = ifstack[ifi-1].on ? !ifstack[ifi].on : 0;
if (ifstack[ifi].hadelse)
{
- ERROR ((stderr, "Multiple AELSEs in AIF.\n"));
+ ERROR ((stderr, _("Multiple AELSEs in AIF.\n")));
}
ifstack[ifi].hadelse = 1;
}
@@ -2331,7 +2303,7 @@ do_aendi ()
}
else
{
- ERROR ((stderr, "AENDI without AIF.\n"));
+ ERROR ((stderr, _("AENDI without AIF.\n")));
}
}
@@ -2354,10 +2326,10 @@ do_if (idx, in, cond)
if (ifi >= IFNESTING)
{
- FATAL ((stderr, "IF nesting unreasonable.\n"));
+ FATAL ((stderr, _("IF nesting unreasonable.\n")));
}
- idx = exp_get_abs ("Conditional operator must have absolute operands.\n",
+ idx = exp_get_abs (_("Conditional operator must have absolute operands.\n"),
idx, in, &val);
switch (cond)
{
@@ -2436,7 +2408,7 @@ do_ifc (idx, in, ifnc)
if (ifi >= IFNESTING)
{
- FATAL ((stderr, "IF nesting unreasonable.\n"));
+ FATAL ((stderr, _("IF nesting unreasonable.\n")));
}
sb_new (&first);
@@ -2446,7 +2418,7 @@ do_ifc (idx, in, ifnc)
if (idx >= in->len || in->ptr[idx] != ',')
{
- ERROR ((stderr, "Bad format for IF or IFNC.\n"));
+ ERROR ((stderr, _("Bad format for IF or IFNC.\n")));
return;
}
@@ -2466,9 +2438,9 @@ static void
do_aendr ()
{
if (!mri)
- ERROR ((stderr, "AENDR without a AREPEAT.\n"));
+ ERROR ((stderr, _("AENDR without a AREPEAT.\n")));
else
- ERROR ((stderr, "ENDR without a REPT.\n"));
+ ERROR ((stderr, _("ENDR without a REPT.\n")));
}
/* .AWHILE */
@@ -2491,7 +2463,7 @@ do_awhile (idx, in)
doit = istrue (0, &exp);
if (! buffer_and_nest ("AWHILE", "AENDW", &sub, get_line))
- FATAL ((stderr, "AWHILE without a AENDW at %d.\n", line - 1));
+ FATAL ((stderr, _("AWHILE without a AENDW at %d.\n"), line - 1));
/* Turn
.AWHILE exp
@@ -2529,7 +2501,7 @@ do_awhile (idx, in)
static void
do_aendw ()
{
- ERROR ((stderr, "AENDW without a AENDW.\n"));
+ ERROR ((stderr, _("AENDW without a AENDW.\n")));
}
@@ -2574,13 +2546,13 @@ do_arepeat (idx, in)
sb_new (&copy);
sb_new (&sub);
process_assigns (idx, in, &exp);
- idx = exp_get_abs ("AREPEAT must have absolute operand.\n", 0, &exp, &rc);
+ idx = exp_get_abs (_("AREPEAT must have absolute operand.\n"), 0, &exp, &rc);
if (!mri)
ret = buffer_and_nest ("AREPEAT", "AENDR", &sub, get_line);
else
ret = buffer_and_nest ("REPT", "ENDR", &sub, get_line);
if (! ret)
- FATAL ((stderr, "AREPEAT without a AENDR at %d.\n", line - 1));
+ FATAL ((stderr, _("AREPEAT without a AENDR at %d.\n"), line - 1));
if (rc > 0)
{
/* Push back the text following the repeat, and another repeat block
@@ -2622,7 +2594,7 @@ do_arepeat (idx, in)
static void
do_endm ()
{
- ERROR ((stderr, ".ENDM without a matching .MACRO.\n"));
+ ERROR ((stderr, _(".ENDM without a matching .MACRO.\n")));
}
/* MRI IRP pseudo-op. */
@@ -2653,10 +2625,10 @@ do_irp (idx, in, irpc)
static
void
do_local (idx, line)
- int idx;
- sb *line;
+ int idx ATTRIBUTE_UNUSED;
+ sb *line ATTRIBUTE_UNUSED;
{
- ERROR ((stderr, "LOCAL outside of MACRO"));
+ ERROR ((stderr, _("LOCAL outside of MACRO")));
}
static void
@@ -2669,7 +2641,7 @@ do_macro (idx, in)
err = define_macro (idx, in, &label, get_line, (const char **) NULL);
if (err != NULL)
- ERROR ((stderr, "macro at line %d: %s\n", line - 1, err));
+ ERROR ((stderr, _("macro at line %d: %s\n"), line - 1, err));
}
static int
@@ -2685,14 +2657,14 @@ macro_op (idx, in)
return 0;
sb_terminate (in);
- if (! check_macro (in->ptr + idx, &out, comment_char, &err))
+ if (! check_macro (in->ptr + idx, &out, comment_char, &err, NULL))
return 0;
if (err != NULL)
ERROR ((stderr, "%s\n", err));
sb_new (&name);
- sb_add_string (&name, "macro expansion");
+ sb_add_string (&name, _("macro expansion"));
include_buf (&name, &out, include_macro, include_next_index ());
@@ -2744,12 +2716,12 @@ getstring (idx, in, acc)
else {
int code;
idx++;
- idx = exp_get_abs ("Character code in string must be absolute expression.\n",
+ 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"));
+ ERROR ((stderr, _("Missing > for character code.\n")));
idx++;
}
}
@@ -2808,7 +2780,7 @@ do_sdata (idx, in, type)
{
if (acc.len > 255)
{
- ERROR ((stderr, "string for SDATAC longer than 255 characters (%d).\n", acc.len));
+ ERROR ((stderr, _("string for SDATAC longer than 255 characters (%d).\n"), acc.len));
}
fprintf (outfile, "%d", acc.len);
nc = 1;
@@ -2836,7 +2808,7 @@ do_sdata (idx, in, type)
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++;
@@ -2857,10 +2829,10 @@ do_sdatab (idx, in)
sb acc;
sb_new (&acc);
- idx = exp_get_abs ("Must have absolute SDATAB repeat count.\n", idx, in, &repeat);
+ idx = exp_get_abs (_("Must have absolute SDATAB repeat count.\n"), idx, in, &repeat);
if (repeat <= 0)
{
- ERROR ((stderr, "Must have positive SDATAB repeat count (%d).\n", repeat));
+ ERROR ((stderr, _("Must have positive SDATAB repeat count (%d).\n"), repeat));
repeat = 1;
}
@@ -2888,7 +2860,7 @@ new_file (name)
return 0;
if (isp == MAX_INCLUDES)
- FATAL ((stderr, "Unreasonable include depth (%ld).\n", (long) isp));
+ FATAL ((stderr, _("Unreasonable include depth (%ld).\n"), (long) isp));
sp++;
sp->handle = newone;
@@ -2942,7 +2914,7 @@ do_include (idx, in)
if (!includes)
{
if (! new_file (sb_name (&t)))
- FATAL ((stderr, "Can't open include file `%s'.\n", sb_name (&t)));
+ FATAL ((stderr, _("Can't open include file `%s'.\n"), sb_name (&t)));
}
sb_kill (&cat);
sb_kill (&t);
@@ -3016,7 +2988,7 @@ include_next_index ()
static int index;
if (!unreasonable
&& index > MAX_REASONABLE)
- FATAL ((stderr, "Unreasonable expansion (-u turns off check).\n"));
+ FATAL ((stderr, _("Unreasonable expansion (-u turns off check).\n")));
return ++index;
}
@@ -3237,7 +3209,7 @@ 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)));
+ WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), sb_name (acc)));
#endif
return 0;
}
@@ -3304,7 +3276,7 @@ process_pseudo_op (idx, line, acc)
do_aendi ();
return 1;
case K_ORG:
- ERROR ((stderr, "ORG command not allowed.\n"));
+ ERROR ((stderr, _("ORG command not allowed.\n")));
break;
case K_RADIX:
do_radix (line);
@@ -3521,7 +3493,7 @@ 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;
}
@@ -3562,7 +3534,7 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, "\
+ fprintf (file, _("\
Usage: %s \n\
[-a] [--alternate] enter alternate macro mode\n\
[-c char] [--commentchar char] change the comment character from !\n\
@@ -3570,16 +3542,16 @@ Usage: %s \n\
[-h] [--help] print this message\n\
[-M] [--mri] enter MRI compatibility mode\n\
[-o out] [--output out] set the output file\n\
- [-p] [--print] print line numbers\n", program_name);
- fprintf (file, "\
+ [-p] [--print] print line numbers\n"), program_name);
+ fprintf (file, _("\
[-s] [--copysource] copy source through as comments \n\
[-u] [--unreasonable] allow unreasonable nesting\n\
[-v] [--version] print the program version\n\
[-Dname=value] create preprocessor variable called name, with value\n\
[-Ipath] add to include path list\n\
- [in-file]\n");
+ [in-file]\n"));
if (status == 0)
- printf ("\nReport bugs to bug-gnu-utils@gnu.org\n");
+ printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -3587,7 +3559,7 @@ Usage: %s \n\
static void
show_help ()
{
- printf ("%s: Gnu Assembler Macro Preprocessor\n",
+ printf (_("%s: Gnu Assembler Macro Preprocessor\n"),
program_name);
show_usage (stdout, 0);
}
@@ -3604,7 +3576,11 @@ main (argc, argv)
ifstack[0].on = 1;
ifi = 0;
-
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
program_name = argv[0];
xmalloc_set_program_name (program_name);
@@ -3667,11 +3643,11 @@ main (argc, argv)
/*NOTREACHED*/
case 'v':
/* This output is intended to follow the GNU standards document. */
- printf ("GNU assembler pre-processor %s\n", program_version);
- printf ("Copyright 1996 Free Software Foundation, Inc.\n");
- printf ("\
+ printf (_("GNU assembler pre-processor %s\n"), program_version);
+ printf (_("Copyright 1996 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");
+the GNU General Public License. This program has absolutely no warranty.\n"));
exit (0);
/*NOTREACHED*/
case 0:
@@ -3690,7 +3666,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
outfile = fopen (out_name, "w");
if (!outfile)
{
- fprintf (stderr, "%s: Can't open output file `%s'.\n",
+ fprintf (stderr, _("%s: Can't open output file `%s'.\n"),
program_name, out_name);
exit (1);
}
@@ -3713,7 +3689,7 @@ the GNU General Public License. This program has absolutely no warranty.\n");
}
else
{
- fprintf (stderr, "%s: Can't open input file `%s'.\n",
+ fprintf (stderr, _("%s: Can't open input file `%s'.\n"),
program_name, argv[optind]);
exit (1);
}
@@ -3732,9 +3708,9 @@ as_abort (file, line, fn)
const char *file, *fn;
int line;
{
- fprintf (stderr, "Internal error, aborting at %s line %d", file, line);
+ fprintf (stderr, _("Internal error, aborting at %s line %d"), file, line);
if (fn)
fprintf (stderr, " in %s", fn);
- fprintf (stderr, "\nPlease report this bug.\n");
+ fprintf (stderr, _("\nPlease report this bug.\n"));
exit (1);
}
diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c
index dccd660..0f129fb 100644
--- a/contrib/binutils/gas/hash.c
+++ b/contrib/binutils/gas/hash.c
@@ -1,5 +1,5 @@
-/* hash.c - hash table lookup strings -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1998
+/* hash.c -- gas hash table code
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,835 +15,408 @@
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. */
-
-/*
- * BUGS, GRIPES, APOLOGIA etc.
- *
- * A typical user doesn't need ALL this: I intend to make a library out
- * of it one day - Dean Elsner.
- * Also, I want to change the definition of a symbol to (address,length)
- * so I can put arbitrary binary in the names stored. [see hsh.c for that]
- *
- * This slime is common coupled inside the module. Com-coupling (and other
- * vandalism) was done to speed running time. The interfaces at the
- * module's edges are adequately clean.
- *
- * There is no way to (a) run a test script through this heap and (b)
- * compare results with previous scripts, to see if we have broken any
- * code. Use GNU (f)utilities to do this. A few commands assist test.
- * The testing is awkward: it tries to be both batch & interactive.
- * For now, interactive rules!
- */
-
-/*
- * The idea is to implement a symbol table. A test jig is here.
- * Symbols are arbitrary strings; they can't contain '\0'.
- * [See hsh.c for a more general symbol flavour.]
- * Each symbol is associated with a char*, which can point to anything
- * you want, allowing an arbitrary property list for each symbol.
- *
- * The basic operations are:
- *
- * new creates symbol table, returns handle
- * find (symbol) returns char*
- * insert (symbol,char*) error if symbol already in table
- * delete (symbol) returns char* if symbol was in table
- * apply so you can delete all symbols before die()
- * die destroy symbol table (free up memory)
- *
- * Supplementary functions include:
- *
- * say how big? what % full?
- * replace (symbol,newval) report previous value
- * jam (symbol,value) assert symbol:=value
- *
- * You, the caller, have control over errors: this just reports them.
- *
- * This package requires malloc(), free().
- * Malloc(size) returns NULL or address of char[size].
- * Free(address) frees same.
- */
-
-/*
- * The code and its structures are re-enterent.
- *
- * Before you do anything else, you must call hash_new() which will
- * return the address of a hash-table-control-block. You then use
- * this address as a handle of the symbol table by passing it to all
- * the other hash_...() functions. The only approved way to recover
- * the memory used by the symbol table is to call hash_die() with the
- * handle of the symbol table.
- *
- * Before you call hash_die() you normally delete anything pointed to
- * by individual symbols. After hash_die() you can't use that symbol
- * table again.
- *
- * The char* you associate with a symbol may not be NULL (0) because
- * NULL is returned whenever a symbol is not in the table. Any other
- * value is OK, except DELETED, #defined below.
- *
- * When you supply a symbol string for insertion, YOU MUST PRESERVE THE
- * STRING until that symbol is deleted from the table. The reason is that
- * only the address you supply, NOT the symbol string itself, is stored
- * in the symbol table.
- *
- * You may delete and add symbols arbitrarily.
- * Any or all symbols may have the same 'value' (char *). In fact, these
- * routines don't do anything with your symbol values.
- *
- * You have no right to know where the symbol:char* mapping is stored,
- * because it moves around in memory; also because we may change how it
- * works and we don't want to break your code do we? However the handle
- * (address of struct hash_control) is never changed in
- * the life of the symbol table.
- *
- * What you CAN find out about a symbol table is:
- * how many slots are in the hash table?
- * how many slots are filled with symbols?
- * (total hashes,collisions) for (reads,writes) (*)
- * All of the above values vary in time.
- * (*) some of these numbers will not be meaningful if we change the
- * internals. */
-
-/*
- * I N T E R N A L
- *
- * Hash table is an array of hash_entries; each entry is a pointer to a
- * a string and a user-supplied value 1 char* wide.
- *
- * The array always has 2 ** n elements, n>0, n integer.
- * There is also a 'wall' entry after the array, which is always empty
- * and acts as a sentinel to stop running off the end of the array.
- * When the array gets too full, we create a new array twice as large
- * and re-hash the symbols into the new array, then forget the old array.
- * (Of course, we copy the values into the new array before we junk the
- * old array!)
- *
- */
-
-#include <stdio.h>
-
-#ifndef FALSE
-#define FALSE (0)
-#define TRUE (!FALSE)
-#endif /* no FALSE yet */
-
-#include <ctype.h>
-#define min(a, b) ((a) < (b) ? (a) : (b))
+ 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 version of the hash table code is a wholescale replacement of
+ the old hash table code, which was fairly bad. This is based on
+ the hash table code in BFD, but optimized slightly for the
+ asssembler. The assembler does not need to derive structures that
+ are stored in the hash table. Instead, it always stores a pointer.
+ The assembler uses the hash table mostly to store symbols, and we
+ don't need to confuse the symbol structure with a hash table
+ structure. */
#include "as.h"
+#include "obstack.h"
-#define error as_fatal
-
-static char _deleted_[1];
-#define DELETED ((PTR)_deleted_) /* guarenteed unique address */
-#define START_POWER (10) /* power of two: size of new hash table */
-
-/* TRUE if a symbol is in entry @ ptr. */
-#define islive(ptr) (ptr->hash_string && ptr->hash_string!=DELETED)
-
-enum stat_enum {
- /* Number of slots in hash table. The wall does not count here.
- We expect this is always a power of 2. */
- STAT_SIZE = 0,
- /* Number of hash_ask calls. */
- STAT_ACCESS,
- STAT_ACCESS_w,
- /* Number of collisions (total). This may exceed STAT_ACCESS if we
- have lots of collisions/access. */
- STAT_COLLIDE,
- STAT_COLLIDE_w,
- /* Slots used right now. */
- STAT_USED,
- /* How many string compares? */
- STAT_STRCMP,
- STAT_STRCMP_w,
- /* Size of statistics block... this must be last. */
- STATLENGTH
-};
-#define STAT__READ (0) /* reading */
-#define STAT__WRITE (1) /* writing */
+/* The default number of entries to use when creating a hash table. */
-/* When we grow a hash table, by what power of two do we increase it? */
-#define GROW_FACTOR 1
-/* When should we grow it? */
-#define FULL_VALUE(N) ((N) / 2)
+#define DEFAULT_SIZE (4051)
-/* #define SUSPECT to do runtime checks */
-/* #define TEST to be a test jig for hash...() */
+/* An entry in a hash table. */
-#ifdef TEST
-/* TEST: use smaller hash table */
-#undef START_POWER
-#define START_POWER (3)
-#undef START_SIZE
-#define START_SIZE (8)
-#undef START_FULL
-#define START_FULL (4)
-#endif
-
struct hash_entry
{
- const char *hash_string; /* points to where the symbol string is */
- /* NULL means slot is not used */
- /* DELETED means slot was deleted */
- PTR hash_value; /* user's datum, associated with symbol */
- unsigned long h;
+ /* Next entry for this hash code. */
+ struct hash_entry *next;
+ /* String being hashed. */
+ const char *string;
+ /* Hash code. This is the full hash code, not the index into the
+ table. */
+ unsigned long hash;
+ /* Pointer being stored in the hash table. */
+ PTR data;
};
-struct hash_control {
- struct hash_entry *hash_where;/* address of hash table */
- int hash_sizelog; /* Log of ( hash_mask + 1 ) */
- int hash_mask; /* masks a hash into index into table */
- int hash_full; /* when hash_stat[STAT_USED] exceeds this, */
- /* grow table */
- struct hash_entry *hash_wall; /* point just after last (usable) entry */
- /* here we have some statistics */
- int hash_stat[STATLENGTH]; /* lies & statistics */
+/* A hash table. */
+
+struct hash_control
+{
+ /* The hash array. */
+ struct hash_entry **table;
+ /* The number of slots in the hash table. */
+ unsigned int size;
+ /* An obstack for this hash table. */
+ struct obstack memory;
+
+#ifdef HASH_STATISTICS
+ /* Statistics. */
+ unsigned long lookups;
+ unsigned long hash_compares;
+ unsigned long string_compares;
+ unsigned long insertions;
+ unsigned long replacements;
+ unsigned long deletions;
+#endif /* HASH_STATISTICS */
};
-
-/*------------------ plan ---------------------------------- i = internal
-
- struct hash_control * c;
- struct hash_entry * e; i
- int b[z]; buffer for statistics
- z size of b
- char * s; symbol string (address) [ key ]
- char * v; value string (address) [datum]
- boolean f; TRUE if we found s in hash table i
- char * t; error string; 0 means OK
- int a; access type [0...n) i
-
- c=hash_new () create new hash_control
-
- hash_die (c) destroy hash_control (and hash table)
- table should be empty.
- doesn't check if table is empty.
- c has no meaning after this.
-
- hash_say (c,b,z) report statistics of hash_control.
- also report number of available statistics.
-
- v=hash_delete (c,s) delete symbol, return old value if any.
- ask() NULL means no old value.
- f
-
- v=hash_replace (c,s,v) replace old value of s with v.
- ask() NULL means no old value: no table change.
- f
-
- t=hash_insert (c,s,v) insert (s,v) in c.
- ask() return error string.
- f it is an error to insert if s is already
- in table.
- if any error, c is unchanged.
-
- t=hash_jam (c,s,v) assert that new value of s will be v. i
- ask() it may decide to GROW the table. i
- f i
- grow() i
- t=hash_grow (c) grow the hash table. i
- jam() will invoke JAM. i
-
- ?=hash_apply (c,y) apply y() to every symbol in c.
- y evtries visited in 'unspecified' order.
-
- v=hash_find (c,s) return value of s, or NULL if s not in c.
- ask()
- f
-
- f,e=hash_ask() (c,s,a) return slot where s SHOULD live. i
- code() maintain collision stats in c. i
-
- .=hash_code (c,s) compute hash-code for s, i
- from parameters of c. i
-
- */
-
-/* Returned by hash_ask() to stop extra testing. hash_ask() wants to
- return both a slot and a status. This is the status. TRUE: found
- symbol FALSE: absent: empty or deleted slot Also returned by
- hash_jam(). TRUE: we replaced a value FALSE: we inserted a value. */
-static char hash_found;
-
-static struct hash_entry *hash_ask PARAMS ((struct hash_control *,
- const char *, int));
-static int hash_code PARAMS ((struct hash_control *, const char *));
-static const char *hash_grow PARAMS ((struct hash_control *));
-
-/* Create a new hash table. Return NULL if failed; otherwise return handle
- (address of struct hash). */
+
+/* Create a hash table. This return a control block. */
+
struct hash_control *
hash_new ()
{
- struct hash_control *retval;
- struct hash_entry *room; /* points to hash table */
- struct hash_entry *wall;
- struct hash_entry *entry;
- int *ip; /* scan stats block of struct hash_control */
- int *nd; /* limit of stats block */
-
- room = (struct hash_entry *) xmalloc (sizeof (struct hash_entry)
- /* +1 for the wall entry */
- * ((1 << START_POWER) + 1));
- retval = (struct hash_control *) xmalloc (sizeof (struct hash_control));
-
- nd = retval->hash_stat + STATLENGTH;
- for (ip = retval->hash_stat; ip < nd; ip++)
- *ip = 0;
-
- retval->hash_stat[STAT_SIZE] = 1 << START_POWER;
- retval->hash_mask = (1 << START_POWER) - 1;
- retval->hash_sizelog = START_POWER;
- /* works for 1's compl ok */
- retval->hash_where = room;
- retval->hash_wall =
- wall = room + (1 << START_POWER);
- retval->hash_full = FULL_VALUE (1 << START_POWER);
- for (entry = room; entry <= wall; entry++)
- entry->hash_string = NULL;
- return retval;
+ unsigned int size;
+ struct hash_control *ret;
+ unsigned int alloc;
+
+ size = DEFAULT_SIZE;
+
+ ret = (struct hash_control *) xmalloc (sizeof *ret);
+ obstack_begin (&ret->memory, chunksize);
+ alloc = size * sizeof (struct hash_entry *);
+ ret->table = (struct hash_entry **) obstack_alloc (&ret->memory, alloc);
+ memset (ret->table, 0, alloc);
+ ret->size = size;
+
+#ifdef HASH_STATISTICS
+ ret->lookups = 0;
+ ret->hash_compares = 0;
+ ret->string_compares = 0;
+ ret->insertions = 0;
+ ret->replacements = 0;
+ ret->deletions = 0;
+#endif
+
+ return ret;
}
-/*
- * h a s h _ d i e ( )
- *
- * Table should be empty, but this is not checked.
- * To empty the table, try hash_apply()ing a symbol deleter.
- * Return to free memory both the hash table and it's control
- * block.
- * 'handle' has no meaning after this function.
- * No errors are recoverable.
- */
+/* Delete a hash table, freeing all allocated memory. */
+
void
-hash_die (handle)
- struct hash_control *handle;
+hash_die (table)
+ struct hash_control *table;
{
- free ((char *) handle->hash_where);
- free ((char *) handle);
+ obstack_free (&table->memory, 0);
+ free (table);
}
-
-#ifdef TEST
-/*
- * h a s h _ s a y ( )
- *
- * Return the size of the statistics table, and as many statistics as
- * we can until either (a) we have run out of statistics or (b) caller
- * has run out of buffer.
- * NOTE: hash_say treats all statistics alike.
- * These numbers may change with time, due to insertions, deletions
- * and expansions of the table.
- * The first "statistic" returned is the length of hash_stat[].
- * Then contents of hash_stat[] are read out (in ascending order)
- * until your buffer or hash_stat[] is exausted.
- */
-static void
-hash_say (handle, buffer, bufsiz)
- struct hash_control *handle;
- int buffer[ /*bufsiz*/ ];
- int bufsiz;
+
+/* Look up a string in a hash table. This returns a pointer to the
+ hash_entry, or NULL if the string is not in the table. If PLIST is
+ not NULL, this sets *PLIST to point to the start of the list which
+ would hold this hash entry. If PHASH is not NULL, this sets *PHASH
+ to the hash code for KEY.
+
+ Each time we look up a string, we move it to the start of the list
+ for its hash code, to take advantage of referential locality. */
+
+static struct hash_entry *hash_lookup PARAMS ((struct hash_control *,
+ const char *,
+ struct hash_entry ***,
+ unsigned long *));
+
+static struct hash_entry *
+hash_lookup (table, key, plist, phash)
+ struct hash_control *table;
+ const char *key;
+ struct hash_entry ***plist;
+ unsigned long *phash;
{
- int *nd; /* limit of statistics block */
- int *ip; /* scan statistics */
+ register unsigned long hash;
+ unsigned int len;
+ register const unsigned char *s;
+ register unsigned int c;
+ unsigned int index;
+ struct hash_entry **list;
+ struct hash_entry *p;
+ struct hash_entry *prev;
+
+#ifdef HASH_STATISTICS
+ ++table->lookups;
+#endif
- ip = handle->hash_stat;
- nd = ip + min (bufsiz - 1, STATLENGTH);
- if (bufsiz > 0) /* trust nothing! bufsiz<=0 is dangerous */
+ hash = 0;
+ len = 0;
+ s = (const unsigned char *) key;
+ while ((c = *s++) != '\0')
{
- *buffer++ = STATLENGTH;
- for (; ip < nd; ip++, buffer++)
- {
- *buffer = *ip;
- }
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ ++len;
}
-}
-#endif
-
-/*
- * h a s h _ d e l e t e ( )
- *
- * Try to delete a symbol from the table.
- * If it was there, return its value (and adjust STAT_USED).
- * Otherwise, return NULL.
- * Anyway, the symbol is not present after this function.
- *
- */
-PTR /* NULL if string not in table, else */
-/* returns value of deleted symbol */
-hash_delete (handle, string)
- struct hash_control *handle;
- const char *string;
-{
- PTR retval;
- struct hash_entry *entry;
+ hash += len + (len << 17);
+ hash ^= hash >> 2;
+
+ if (phash != NULL)
+ *phash = hash;
+
+ index = hash % table->size;
+ list = table->table + index;
- entry = hash_ask (handle, string, STAT__WRITE);
- if (hash_found)
+ if (plist != NULL)
+ *plist = list;
+
+ prev = NULL;
+ for (p = *list; p != NULL; p = p->next)
{
- retval = entry->hash_value;
- entry->hash_string = DELETED;
- handle->hash_stat[STAT_USED] -= 1;
-#ifdef SUSPECT
- if (handle->hash_stat[STAT_USED] < 0)
+#ifdef HASH_STATISTICS
+ ++table->hash_compares;
+#endif
+
+ if (p->hash == hash)
{
- error ("hash_delete");
+#ifdef HASH_STATISTICS
+ ++table->string_compares;
+#endif
+
+ if (strcmp (p->string, key) == 0)
+ {
+ if (prev != NULL)
+ {
+ prev->next = p->next;
+ p->next = *list;
+ *list = p;
+ }
+
+ return p;
+ }
}
-#endif /* def SUSPECT */
- }
- else
- {
- retval = NULL;
- }
- return (retval);
-}
-
-/*
- * h a s h _ r e p l a c e ( )
- *
- * Try to replace the old value of a symbol with a new value.
- * Normally return the old value.
- * Return NULL and don't change the table if the symbol is not already
- * in the table.
- */
-PTR
-hash_replace (handle, string, value)
- struct hash_control *handle;
- const char *string;
- PTR value;
-{
- struct hash_entry *entry;
- char *retval;
- entry = hash_ask (handle, string, STAT__WRITE);
- if (hash_found)
- {
- retval = entry->hash_value;
- entry->hash_value = value;
+ prev = p;
}
- else
- {
- retval = NULL;
- }
- ;
- return retval;
+
+ return NULL;
}
-
-/*
- * h a s h _ i n s e r t ( )
- *
- * Insert a (symbol-string, value) into the hash table.
- * Return an error string, 0 means OK.
- * It is an 'error' to insert an existing symbol.
- */
-
-const char * /* return error string */
-hash_insert (handle, string, value)
- struct hash_control *handle;
- const char *string;
+
+/* Insert an entry into a hash table. This returns NULL on success.
+ On error, it returns a printable string indicating the error. It
+ is considered to be an error if the entry already exists in the
+ hash table. */
+
+const char *
+hash_insert (table, key, value)
+ struct hash_control *table;
+ const char *key;
PTR value;
{
- struct hash_entry *entry;
- const char *retval;
+ struct hash_entry *p;
+ struct hash_entry **list;
+ unsigned long hash;
- retval = 0;
- if (handle->hash_stat[STAT_USED] > handle->hash_full)
- {
- retval = hash_grow (handle);
- }
- if (!retval)
- {
- entry = hash_ask (handle, string, STAT__WRITE);
- if (hash_found)
- {
- retval = "exists";
- }
- else
- {
- entry->hash_value = value;
- entry->hash_string = string;
- handle->hash_stat[STAT_USED] += 1;
- }
- }
- return retval;
+ p = hash_lookup (table, key, &list, &hash);
+ if (p != NULL)
+ return "exists";
+
+#ifdef HASH_STATISTICS
+ ++table->insertions;
+#endif
+
+ p = obstack_alloc (&table->memory, sizeof *p);
+ p->string = key;
+ p->hash = hash;
+ p->data = value;
+
+ p->next = *list;
+ *list = p;
+
+ return NULL;
}
-
-/*
- * h a s h _ j a m ( )
- *
- * Regardless of what was in the symbol table before, after hash_jam()
- * the named symbol has the given value. The symbol is either inserted or
- * (its value is) replaced.
- * An error message string is returned, 0 means OK.
- *
- * WARNING: this may decide to grow the hashed symbol table.
- * To do this, we call hash_grow(), WHICH WILL recursively CALL US.
- *
- * We report status internally: hash_found is TRUE if we replaced, but
- * false if we inserted.
- */
+
+/* Insert or replace an entry in a hash table. This returns NULL on
+ success. On error, it returns a printable string indicating the
+ error. If an entry already exists, its value is replaced. */
+
const char *
-hash_jam (handle, string, value)
- struct hash_control *handle;
- const char *string;
+hash_jam (table, key, value)
+ struct hash_control *table;
+ const char *key;
PTR value;
{
- const char *retval;
- struct hash_entry *entry;
+ struct hash_entry *p;
+ struct hash_entry **list;
+ unsigned long hash;
- retval = 0;
- if (handle->hash_stat[STAT_USED] > handle->hash_full)
+ p = hash_lookup (table, key, &list, &hash);
+ if (p != NULL)
{
- retval = hash_grow (handle);
+#ifdef HASH_STATISTICS
+ ++table->replacements;
+#endif
+
+ p->data = value;
}
- if (!retval)
+ else
{
- entry = hash_ask (handle, string, STAT__WRITE);
- if (!hash_found)
- {
- entry->hash_string = string;
- handle->hash_stat[STAT_USED] += 1;
- }
- entry->hash_value = value;
+#ifdef HASH_STATISTICS
+ ++table->insertions;
+#endif
+
+ p = obstack_alloc (&table->memory, sizeof *p);
+ p->string = key;
+ p->hash = hash;
+ p->data = value;
+
+ p->next = *list;
+ *list = p;
}
- return retval;
+
+ return NULL;
}
-/*
- * h a s h _ g r o w ( )
- *
- * Grow a new (bigger) hash table from the old one.
- * We choose to double the hash table's size.
- * Return a human-scrutible error string: 0 if OK.
- * Warning! This uses hash_jam(), which had better not recurse
- * back here! Hash_jam() conditionally calls us, but we ALWAYS
- * call hash_jam()!
- * Internal.
- */
-static const char *
-hash_grow (handle) /* make a hash table grow */
- struct hash_control *handle;
+/* Replace an existing entry in a hash table. This returns the old
+ value stored for the entry. If the entry is not found in the hash
+ table, this does nothing and returns NULL. */
+
+PTR
+hash_replace (table, key, value)
+ struct hash_control *table;
+ const char *key;
+ PTR value;
{
- struct hash_entry *newwall;
- struct hash_entry *newwhere;
- struct hash_entry *newtrack;
- struct hash_entry *oldtrack;
- struct hash_entry *oldwhere;
- struct hash_entry *oldwall;
- int temp;
- int newsize;
- const char *string;
- const char *retval;
-#ifdef SUSPECT
- int oldused;
-#endif
+ struct hash_entry *p;
+ PTR ret;
- /*
- * capture info about old hash table
- */
- oldwhere = handle->hash_where;
- oldwall = handle->hash_wall;
-#ifdef SUSPECT
- oldused = handle->hash_stat[STAT_USED];
-#endif
- /*
- * attempt to get enough room for a hash table twice as big
- */
- temp = handle->hash_stat[STAT_SIZE];
- newwhere = ((struct hash_entry *)
- xmalloc ((unsigned long) ((temp << (GROW_FACTOR + 1))
- /* +1 for wall slot */
- * sizeof (struct hash_entry))));
- if (newwhere == NULL)
- return "no_room";
-
- /*
- * have enough room: now we do all the work.
- * double the size of everything in handle.
- */
- handle->hash_mask = ((handle->hash_mask + 1) << GROW_FACTOR) - 1;
- handle->hash_stat[STAT_SIZE] <<= GROW_FACTOR;
- newsize = handle->hash_stat[STAT_SIZE];
- handle->hash_where = newwhere;
- handle->hash_full <<= GROW_FACTOR;
- handle->hash_sizelog += GROW_FACTOR;
- handle->hash_wall = newwall = newwhere + newsize;
- /* Set all those pesky new slots to vacant. */
- for (newtrack = newwhere; newtrack <= newwall; newtrack++)
- newtrack->hash_string = NULL;
- /* We will do a scan of the old table, the hard way, using the
- * new control block to re-insert the data into new hash table. */
- handle->hash_stat[STAT_USED] = 0;
- for (oldtrack = oldwhere; oldtrack < oldwall; oldtrack++)
- if (((string = oldtrack->hash_string) != NULL) && string != DELETED)
- if ((retval = hash_jam (handle, string, oldtrack->hash_value)))
- return retval;
-
-#ifdef SUSPECT
- if (handle->hash_stat[STAT_USED] != oldused)
- return "hash_used";
+ p = hash_lookup (table, key, NULL, NULL);
+ if (p == NULL)
+ return NULL;
+
+#ifdef HASH_STATISTICS
+ ++table->replacements;
#endif
- /* We have a completely faked up control block.
- Return the old hash table. */
- free ((char *) oldwhere);
+ ret = p->data;
- return 0;
-}
-
-#ifdef TEST
-/*
- * h a s h _ a p p l y ( )
- *
- * Use this to scan each entry in symbol table.
- * For each symbol, this calls (applys) a nominated function supplying the
- * symbol's value (and the symbol's name).
- * The idea is you use this to destroy whatever is associted with
- * any values in the table BEFORE you destroy the table with hash_die.
- * Of course, you can use it for other jobs; whenever you need to
- * visit all extant symbols in the table.
- *
- * We choose to have a call-you-back idea for two reasons:
- * asthetic: it is a neater idea to use apply than an explicit loop
- * sensible: if we ever had to grow the symbol table (due to insertions)
- * then we would lose our place in the table when we re-hashed
- * symbols into the new table in a different order.
- *
- * The order symbols are visited depends entirely on the hashing function.
- * Whenever you insert a (symbol, value) you risk expanding the table. If
- * you do expand the table, then the hashing function WILL change, so you
- * MIGHT get a different order of symbols visited. In other words, if you
- * want the same order of visiting symbols as the last time you used
- * hash_apply() then you better not have done any hash_insert()s or
- * hash_jam()s since the last time you used hash_apply().
- *
- * In future we may use the value returned by your nominated function.
- * One idea is to abort the scan if, after applying the function to a
- * certain node, the function returns a certain code.
- *
- * The function you supply should be of the form:
- * void myfunct(string,value)
- * char * string; |* the symbol's name *|
- * char * value; |* the symbol's value *|
- * {
- * |* ... *|
- * }
- *
- */
-void
-hash_apply (handle, function)
- struct hash_control *handle;
- void (*function) ();
-{
- struct hash_entry *entry;
- struct hash_entry *wall;
+ p->data = value;
- wall = handle->hash_wall;
- for (entry = handle->hash_where; entry < wall; entry++)
- {
- if (islive (entry)) /* silly code: tests entry->string twice! */
- {
- (*function) (entry->hash_string, entry->hash_value);
- }
- }
+ return ret;
}
-#endif
-
-/*
- * h a s h _ f i n d ( )
- *
- * Given symbol string, find value (if any).
- * Return found value or NULL.
- */
+
+/* Find an entry in a hash table, returning its value. Returns NULL
+ if the entry is not found. */
+
PTR
-hash_find (handle, string)
- struct hash_control *handle;
- const char *string;
+hash_find (table, key)
+ struct hash_control *table;
+ const char *key;
{
- struct hash_entry *entry;
+ struct hash_entry *p;
- entry = hash_ask (handle, string, STAT__READ);
- if (hash_found)
- return entry->hash_value;
- else
+ p = hash_lookup (table, key, NULL, NULL);
+ if (p == NULL)
return NULL;
+
+ return p->data;
}
-
-/*
- * h a s h _ a s k ( )
- *
- * Searches for given symbol string.
- * Return the slot where it OUGHT to live. It may be there.
- * Return hash_found: TRUE only if symbol is in that slot.
- * Access argument is to help keep statistics in control block.
- * Internal.
- */
-static struct hash_entry * /* string slot, may be empty or deleted */
-hash_ask (handle, string, access_type)
- struct hash_control *handle;
- const char *string;
- int access_type;
-{
- const char *s;
- struct hash_entry *slot;
- int collision; /* count collisions */
- int strcmps;
- int hcode;
-
- /* start looking here */
- hcode = hash_code (handle, string);
- slot = handle->hash_where + (hcode & handle->hash_mask);
-
- handle->hash_stat[STAT_ACCESS + access_type] += 1;
- collision = strcmps = 0;
- hash_found = FALSE;
- while (((s = slot->hash_string) != NULL) && s != DELETED)
- {
- if (string == s)
- {
- hash_found = TRUE;
- break;
- }
- if (slot->h == (unsigned long) hcode)
- {
- if (!strcmp (string, s))
- {
- hash_found = TRUE;
- break;
- }
- strcmps++;
- }
- collision++;
- slot++;
- }
- /*
- * slot: return:
- * in use: we found string slot
- * at empty:
- * at wall: we fell off: wrap round ????
- * in table: dig here slot
- * at DELETED: dig here slot
- */
- if (slot == handle->hash_wall)
- {
- slot = handle->hash_where;/* now look again */
- while (((s = slot->hash_string) != NULL) && s != DELETED)
- {
- if (string == s)
- {
- hash_found = TRUE;
- break;
- }
- if (slot->h == (unsigned long) hcode)
- {
- if (!strcmp (string, s))
- {
- hash_found = TRUE;
- break;
- }
- strcmps++;
- }
- collision++;
- slot++;
- }
- /*
- * slot: return:
- * in use: we found it slot
- * empty: wall: ERROR IMPOSSIBLE !!!!
- * in table: dig here slot
- * DELETED:dig here slot
- */
- }
- handle->hash_stat[STAT_COLLIDE + access_type] += collision;
- handle->hash_stat[STAT_STRCMP + access_type] += strcmps;
- if (!hash_found)
- slot->h = hcode;
- return slot; /* also return hash_found */
-}
-
-/*
- * h a s h _ c o d e
- *
- * Does hashing of symbol string to hash number.
- * Internal.
- */
-static int
-hash_code (handle, string)
- struct hash_control *handle;
- const char *string;
+
+/* Delete an entry from a hash table. This returns the value stored
+ for that entry, or NULL if there is no such entry. */
+
+PTR
+hash_delete (table, key)
+ struct hash_control *table;
+ const char *key;
{
-#if 1 /* There seems to be some interesting property of this function
- that prevents the bfd version below from being an adequate
- substitute. @@ Figure out what this property is! */
- long h; /* hash code built here */
- long c; /* each character lands here */
- int n; /* Amount to shift h by */
-
- n = (handle->hash_sizelog - 3);
- h = 0;
- while ((c = *string++) != 0)
- {
- h += c;
- h = (h << 3) + (h >> n) + c;
- }
- return h;
-#else
- /* from bfd */
- unsigned long h = 0;
- unsigned int len = 0;
- unsigned int c;
-
- while ((c = *string++) != 0)
- {
- h += c + (c << 17);
- h ^= h >> 2;
- ++len;
- }
- h += len + (len << 17);
- h ^= h >> 2;
- return h;
+ struct hash_entry *p;
+ struct hash_entry **list;
+
+ p = hash_lookup (table, key, &list, NULL);
+ if (p == NULL)
+ return NULL;
+
+ if (p != *list)
+ abort ();
+
+#ifdef HASH_STATISTICS
+ ++table->deletions;
#endif
+
+ *list = p->next;
+
+ /* Note that we never reclaim the memory for this entry. If gas
+ ever starts deleting hash table entries in a big way, this will
+ have to change. */
+
+ return p->data;
}
-
+
+/* Traverse a hash table. Call the function on every entry in the
+ hash table. */
+
void
-hash_print_statistics (file, name, h)
- FILE *file;
- const char *name;
- struct hash_control *h;
+hash_traverse (table, pfn)
+ struct hash_control *table;
+ void (*pfn) PARAMS ((const char *key, PTR value));
{
- unsigned long sz, used, pct;
+ unsigned int i;
- if (h == 0)
- return;
+ for (i = 0; i < table->size; ++i)
+ {
+ struct hash_entry *p;
- sz = h->hash_stat[STAT_SIZE];
- used = h->hash_stat[STAT_USED];
- pct = (used * 100 + sz / 2) / sz;
+ for (p = table->table[i]; p != NULL; p = p->next)
+ (*pfn) (p->string, p->data);
+ }
+}
- fprintf (file, "%s hash statistics:\n\t%lu/%lu slots used (%lu%%)\n",
- name, used, sz, pct);
+/* Print hash table statistics on the specified file. NAME is the
+ name of the hash table, used for printing a header. */
-#define P(name, off) \
- fprintf (file, "\t%-16s %6dr + %6dw = %7d\n", name, \
- h->hash_stat[off+STAT__READ], \
- h->hash_stat[off+STAT__WRITE], \
- h->hash_stat[off+STAT__READ] + h->hash_stat[off+STAT__WRITE])
+void
+hash_print_statistics (f, name, table)
+ FILE *f ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ struct hash_control *table ATTRIBUTE_UNUSED;
+{
+#ifdef HASH_STATISTICS
+ unsigned int i;
+ unsigned long total;
+ unsigned long empty;
+
+ fprintf (f, "%s hash statistics:\n", name);
+ fprintf (f, "\t%lu lookups\n", table->lookups);
+ fprintf (f, "\t%lu hash comparisons\n", table->hash_compares);
+ fprintf (f, "\t%lu string comparisons\n", table->string_compares);
+ fprintf (f, "\t%lu insertions\n", table->insertions);
+ fprintf (f, "\t%lu replacements\n", table->replacements);
+ fprintf (f, "\t%lu deletions\n", table->deletions);
+
+ total = 0;
+ empty = 0;
+ for (i = 0; i < table->size; ++i)
+ {
+ struct hash_entry *p;
- P ("accesses:", STAT_ACCESS);
- P ("collisions:", STAT_COLLIDE);
- P ("string compares:", STAT_STRCMP);
+ if (table->table[i] == NULL)
+ ++empty;
+ else
+ {
+ for (p = table->table[i]; p != NULL; p = p->next)
+ ++total;
+ }
+ }
-#undef P
+ fprintf (f, "\t%g average chain length\n", (double) total / table->size);
+ fprintf (f, "\t%lu empty slots\n", empty);
+#endif
}
-/*
- * Here is a test program to exercise above.
- */
#ifdef TEST
+/* 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 */
+ /* (at once) in any testing */
#define STATBUFSIZE (12) /* we can have 12 statistics */
int statbuf[STATBUFSIZE]; /* display statistics here */
@@ -858,8 +431,9 @@ int size;
int used;
char command;
int number; /* number 0:TABLES-1 of current hashed */
-/* symbol table */
+ /* symbol table */
+int
main ()
{
void applicatee ();
@@ -891,10 +465,10 @@ main ()
}
break;
case 'a':
- hash_apply (h, applicatee);
+ hash_traverse (h, applicatee);
break;
case 'd':
- hash_apply (h, destroy);
+ hash_traverse (h, destroy);
hash_die (h);
break;
case 'f':
@@ -996,8 +570,9 @@ applicatee (string, value)
printf ("%.20s-%.20s\n", string, value);
}
+void
whattable () /* determine number: what hash table to use */
- /* also determine h: points to hash_control */
+ /* also determine h: points to hash_control */
{
for (;;)
@@ -1021,8 +596,6 @@ whattable () /* determine number: what hash table to use */
}
}
-
-
#endif /* #ifdef TEST */
/* end of hash.c */
diff --git a/contrib/binutils/gas/hash.h b/contrib/binutils/gas/hash.h
index fb229c8..df59d9f 100644
--- a/contrib/binutils/gas/hash.h
+++ b/contrib/binutils/gas/hash.h
@@ -1,5 +1,5 @@
-/* hash.h - for hash.c
- Copyright (C) 1987, 1992 Free Software Foundation, Inc.
+/* hash.h -- header file for gas hash table routines
+ Copyright (C) 1987, 92, 93, 95, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -14,32 +14,65 @@
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. */
-#ifndef hashH
-#define hashH
+#ifndef HASH_H
+#define HASH_H
struct hash_control;
-/* returns control block */
-struct hash_control *hash_new PARAMS ((void));
-void hash_die PARAMS ((struct hash_control *));
-/* returns previous value */
-PTR hash_delete PARAMS ((struct hash_control *, const char *str));
-/* returns previous value */
-PTR hash_replace PARAMS ((struct hash_control *, const char *str, PTR val));
-/* returns error string or null */
-const char *hash_insert PARAMS ((struct hash_control *, const char *str,
- PTR val));
-/* returns value */
-PTR hash_find PARAMS ((struct hash_control *, const char *str));
-/* returns error text or null (internal) */
-const char *hash_jam PARAMS ((struct hash_control *, const char *str,
- PTR val));
-
-void hash_print_statistics PARAMS ((FILE *, const char *,
- struct hash_control *));
-#endif /* #ifdef hashH */
-
-/* end of hash.c */
+/* Create a hash table. This return a control block. */
+
+extern struct hash_control *hash_new PARAMS ((void));
+
+/* Delete a hash table, freeing all allocated memory. */
+
+extern void hash_die PARAMS ((struct hash_control *));
+
+/* Insert an entry into a hash table. This returns NULL on success.
+ On error, it returns a printable string indicating the error. It
+ is considered to be an error if the entry already exists in the
+ hash table. */
+
+extern const char *hash_insert PARAMS ((struct hash_control *,
+ const char *key, PTR value));
+
+/* Insert or replace an entry in a hash table. This returns NULL on
+ success. On error, it returns a printable string indicating the
+ error. If an entry already exists, its value is replaced. */
+
+extern const char *hash_jam PARAMS ((struct hash_control *,
+ const char *key, PTR value));
+
+/* Replace an existing entry in a hash table. This returns the old
+ value stored for the entry. If the entry is not found in the hash
+ table, this does nothing and returns NULL. */
+
+extern PTR hash_replace PARAMS ((struct hash_control *, const char *key,
+ PTR value));
+
+/* Find an entry in a hash table, returning its value. Returns NULL
+ if the entry is not found. */
+
+extern PTR hash_find PARAMS ((struct hash_control *, const char *key));
+
+/* Delete an entry from a hash table. This returns the value stored
+ for that entry, or NULL if there is no such entry. */
+
+extern PTR hash_delete PARAMS ((struct hash_control *, const char *key));
+
+/* Traverse a hash table. Call the function on every entry in the
+ hash table. */
+
+extern void hash_traverse PARAMS ((struct hash_control *,
+ void (*pfn) (const char *key, PTR value)));
+
+/* Print hash table statistics on the specified file. NAME is the
+ name of the hash table, used for printing a header. */
+
+extern void hash_print_statistics PARAMS ((FILE *, const char *name,
+ struct hash_control *));
+
+#endif /* HASH_H */
diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c
index be029c2..634f6f7 100644
--- a/contrib/binutils/gas/input-file.c
+++ b/contrib/binutils/gas/input-file.c
@@ -1,5 +1,6 @@
/* input_file.c - Deal with Input Files -
- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 1999
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -14,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. */
/*
* Confines all details of reading source bytes to this module.
@@ -30,7 +32,7 @@
#include "as.h"
#include "input-file.h"
-static int input_file_get PARAMS ((char **));
+static int input_file_get PARAMS ((char *, int));
/* This variable is non-zero if the file currently being read should be
preprocessed by app. It is zero if the file can be read straight in.
@@ -145,11 +147,11 @@ input_file_open (filename, pre)
else
{ /* 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)
{
- as_bad ("Can't open %s for reading.", file_name);
+ as_bad (_("Can't open %s for reading."), file_name);
as_perror ("%s", file_name);
return;
}
@@ -191,19 +193,18 @@ input_file_close ()
/* This function is passed to do_scrub_chars. */
static int
-input_file_get (from)
- char **from;
+input_file_get (buf, buflen)
+ char *buf;
+ int buflen;
{
- static char buf[BUFFER_SIZE];
int size;
- size = fread (buf, sizeof (char), sizeof buf, f_in);
+ size = fread (buf, sizeof (char), buflen, f_in);
if (size < 0)
{
- as_perror ("Can't read from %s", file_name);
+ as_perror (_("Can't read from %s"), file_name);
size = 0;
}
- *from = buf;
return size;
}
@@ -230,7 +231,7 @@ input_file_give_next_buffer (where)
size = fread (where, sizeof (char), BUFFER_SIZE, f_in);
if (size < 0)
{
- as_perror ("Can't read from %s", file_name);
+ as_perror (_("Can't read from %s"), file_name);
size = 0;
}
if (size)
@@ -238,7 +239,7 @@ input_file_give_next_buffer (where)
else
{
if (fclose (f_in))
- as_perror ("Can't close %s", file_name);
+ as_perror (_("Can't close %s"), file_name);
f_in = (FILE *) 0;
return_value = 0;
}
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index fee00f3..ecbdaef 100644
--- a/contrib/binutils/gas/input-scrub.c
+++ b/contrib/binutils/gas/input-scrub.c
@@ -23,6 +23,7 @@
#include "as.h"
#include "input-file.h"
#include "sb.h"
+#include "listing.h"
/*
* O/S independent module to supply buffers of sanitised source code
@@ -73,6 +74,9 @@ static int sb_index = -1;
/* If we are reading from an sb structure, this is it. */
static sb from_sb;
+/* Should we do a conditional check on from_sb? */
+static int from_sb_is_expansion = 1;
+
/* The number of nested sb structures we have included. */
int macro_nest;
@@ -110,6 +114,7 @@ struct input_save
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 */
@@ -146,6 +151,7 @@ input_scrub_push (saved_position)
saved->logical_input_line = logical_input_line;
saved->sb_index = sb_index;
saved->from_sb = from_sb;
+ saved->from_sb_is_expansion = from_sb_is_expansion;
memcpy (saved->save_source, save_source, sizeof (save_source));
saved->next_saved_file = next_saved_file;
saved->input_file_save = input_file_push ();
@@ -180,6 +186,7 @@ input_scrub_pop (saved)
logical_input_line = saved->logical_input_line;
sb_index = saved->sb_index;
from_sb = saved->from_sb;
+ from_sb_is_expansion = saved->from_sb_is_expansion;
partial_where = saved->partial_where;
partial_size = saved->partial_size;
next_saved_file = saved->next_saved_file;
@@ -229,7 +236,7 @@ input_scrub_new_file (filename)
char *filename;
{
input_file_open (filename, !flag_no_comments);
- physical_input_file = filename[0] ? filename : "{standard input}";
+ physical_input_file = filename[0] ? filename : _("{standard input}");
physical_input_line = 0;
partial_size = 0;
@@ -254,17 +261,26 @@ input_scrub_include_file (filename, position)
expanding a macro. */
void
-input_scrub_include_sb (from, position)
+input_scrub_include_sb (from, position, is_expansion)
sb *from;
char *position;
+ int is_expansion;
{
if (macro_nest > max_macro_nest)
- as_fatal ("macros nested too deeply");
+ as_fatal (_("buffers nested too deeply"));
++macro_nest;
+#ifdef md_macro_start
+ if (is_expansion)
+ {
+ md_macro_start ();
+ }
+#endif
+
next_saved_file = input_scrub_push (position);
sb_new (&from_sb);
+ from_sb_is_expansion = is_expansion;
if (from->len >= 1 && from->ptr[0] != '\n')
{
/* Add the sentinel required by read.c. */
@@ -296,8 +312,15 @@ input_scrub_next_buffer (bufp)
if (sb_index >= from_sb.len)
{
sb_kill (&from_sb);
- cond_finish_check (macro_nest);
- --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 ();
+#endif
+ }
+ --macro_nest;
partial_where = NULL;
if (next_saved_file != NULL)
*bufp = input_scrub_pop (next_saved_file);
@@ -345,7 +368,7 @@ input_scrub_next_buffer (bufp)
if (limit == NULL)
{
- as_warn ("partial line at end of file ignored");
+ as_warn (_("partial line at end of file ignored"));
partial_where = NULL;
if (next_saved_file)
*bufp = input_scrub_pop (next_saved_file);
@@ -367,8 +390,12 @@ input_scrub_next_buffer (bufp)
partial_where = 0;
if (partial_size > 0)
{
- as_warn ("Partial line at end of file ignored");
+ as_warn (_("Partial line at end of file ignored"));
}
+
+ /* Tell the listing we've finished the file. */
+ LISTING_EOF ();
+
/* If we should pop to another file at EOF, do it. */
if (next_saved_file)
{
diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c
index 58fc3eb..27cca60 100644
--- a/contrib/binutils/gas/itbl-ops.c
+++ b/contrib/binutils/gas/itbl-ops.c
@@ -1,5 +1,5 @@
/* itbl-ops.c
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -356,7 +356,7 @@ append_insns_as_macros (void)
new_opcodes = (struct ITBL_OPCODE_STRUCT *) malloc (new_size);
if (!new_opcodes)
{
- printf ("Unable to allocate memory for new instructions\n");
+ printf (_("Unable to allocate memory for new instructions\n"));
return;
}
if (size) /* copy prexisting opcodes table */
@@ -457,18 +457,20 @@ form_args (struct itbl_entry *e)
/* Get processor's register name from val */
-unsigned long
-itbl_get_reg_val (char *name)
+int
+itbl_get_reg_val (char *name, unsigned long *pval)
{
e_type t;
e_processor p;
- int r = 0;
+
for (p = e_p0; p < e_nprocs; p++)
- for (t = e_regtype0; t < e_nregtypes; t++)
- {
- if (r = itbl_get_val (p, t, name), r)
- return r;
- }
+ {
+ for (t = e_regtype0; t < e_nregtypes; t++)
+ {
+ if (itbl_get_val (p, t, name, pval))
+ return 1;
+ }
+ }
return 0;
}
@@ -486,16 +488,17 @@ itbl_get_name (e_processor processor, e_type type, unsigned long val)
/* Get processor's register value from name */
-unsigned long
-itbl_get_val (e_processor processor, e_type type, char *name)
+int
+itbl_get_val (e_processor processor, e_type type, char *name,
+ unsigned long *pval)
{
struct itbl_entry *r;
/* type depends on instruction passed */
r = find_entry_byname (processor, type, name);
- if (r)
- return r->value;
- else
- return 0; /* error; invalid operand */
+ if (r == NULL)
+ return 0;
+ *pval = r->value;
+ return 1;
}
@@ -640,7 +643,7 @@ itbl_disassemble (char *s, unsigned long insn)
if (r)
strcat (s, r->name);
else
- sprintf (s, "%s$%d", s, value);
+ sprintf (s, "%s$%lu", s, value);
break;
case e_addr:
/* use assembler's symbol table to find symbol */
@@ -649,7 +652,7 @@ itbl_disassemble (char *s, unsigned long insn)
*/
/* If not a symbol, fall thru to IMMED */
case e_immed:
- sprintf (s, "%s0x%x", s, value);
+ sprintf (s, "%s0x%lx", s, value);
break;
default:
return 0; /* error; invalid field spec */
@@ -732,28 +735,20 @@ extract_range (unsigned long aval, struct itbl_range r)
/* Extract processor's assembly instruction field name from s;
* forms are "n args" "n,args" or "n" */
/* Return next argument from string pointer "s" and advance s.
- * delimiters are " ,\0" */
+ * delimiters are " ,()" */
char *
itbl_get_field (char **S)
{
static char n[128];
- char *p, *ps, *s;
+ char *s;
int len;
s = *S;
if (!s || !*s)
return 0;
- p = s + strlen (s);
- if (ps = strchr (s, ','), ps)
- p = ps;
- if (ps = strchr (s, ' '), ps)
- p = min (p, ps);
- if (ps = strchr (s, '\0'), ps)
- p = min (p, ps);
- if (p == 0)
- return 0; /* error! */
- len = p - s;
+ /* FIXME: This is a weird set of delimiters. */
+ len = strcspn (s, " \t,()");
ASSERT (128 > len + 1);
strncpy (n, s, len);
n[len] = 0;
@@ -816,8 +811,8 @@ find_entry_byval (e_processor processor, e_type type,
eval = apply_range (e->value, e->range);
val &= apply_range (0xffffffff, e->range);
}
- else if (r->sbit == e->range.sbit && r->ebit == e->range.ebit
- || e->range.sbit == 0 && e->range.ebit == 0)
+ else if ((r->sbit == e->range.sbit && r->ebit == e->range.ebit)
+ || (e->range.sbit == 0 && e->range.ebit == 0))
{
eval = apply_range (e->value, *r);
val = apply_range (val, *r);
diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h
index 2946eff..d69ea7f 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 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -92,9 +92,9 @@ char *itbl_get_field PARAMS ((char **s));
unsigned long itbl_assemble PARAMS ((char *name, char *operands));
int itbl_disassemble PARAMS ((char *str, unsigned long insn));
int itbl_parse PARAMS ((char *tbl)); /* parses insn tbl */
-unsigned long itbl_get_reg_val PARAMS ((char *name));
-unsigned long itbl_get_val PARAMS ((e_processor processor, e_type type,
- char *name));
+int itbl_get_reg_val PARAMS ((char *name, unsigned long *pval));
+int itbl_get_val PARAMS ((e_processor processor, e_type type, char *name,
+ unsigned long *pval));
char *itbl_get_name PARAMS ((e_processor processor, e_type type,
unsigned long val));
diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c
index 2fa8ae9..cecf245 100644
--- a/contrib/binutils/gas/listing.c
+++ b/contrib/binutils/gas/listing.c
@@ -1,5 +1,5 @@
/* listing.c - mainting assembly listings
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -109,10 +109,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define LISTING_WORD_SIZE 4
#endif
#ifndef LISTING_LHS_WIDTH
-#define LISTING_LHS_WIDTH 1
+#define LISTING_LHS_WIDTH ((LISTING_WORD_SIZE) > 4 ? 1 : 4 / (LISTING_WORD_SIZE))
#endif
#ifndef LISTING_LHS_WIDTH_SECOND
-#define LISTING_LHS_WIDTH_SECOND 1
+#define LISTING_LHS_WIDTH_SECOND LISTING_LHS_WIDTH
#endif
#ifndef LISTING_RHS_WIDTH
#define LISTING_RHS_WIDTH 100
@@ -124,42 +124,41 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* 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;
+ struct file_info_struct * next;
+ char * filename;
+ long pos;
+ unsigned int linenum;
+ int at_end;
}
file_info_type;
-
-/* this structure rememebrs which line from which file goes into which
+/* 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;
+ fragS * frag;
/* 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;
+ 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;
+ 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;
+ 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;
+ char * message;
enum
{
@@ -171,7 +170,7 @@ struct list_info_struct
EDICT_NOLIST_NEXT,
EDICT_EJECT
} edict;
- char *edict_arg;
+ 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
@@ -181,15 +180,25 @@ struct list_info_struct
typedef struct list_info_struct list_info_type;
-static struct list_info_struct *head;
-struct list_info_struct *listing_tail;
-extern int listing;
-static int paper_width = 200;
-static int paper_height = 60;
+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;
+int listing_rhs_width = LISTING_RHS_WIDTH;
+
+struct list_info_struct * listing_tail;
+
+static file_info_type * file_info_head;
+static file_info_type * last_open_file_info;
+static FILE * last_open_file;
+static struct list_info_struct * head;
+static int paper_width = 200;
+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. */
@@ -200,13 +209,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));
@@ -240,27 +249,16 @@ void
listing_warning (message)
const char *message;
{
- listing_message ("Warning:", message);
+ listing_message (_("Warning:"), message);
}
void
listing_error (message)
const char *message;
{
- listing_message ("Error:", message);
+ listing_message (_("Error:"), message);
}
-
-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;
-int listing_rhs_width = LISTING_RHS_WIDTH;
-
-
-static file_info_type *file_info_head;
-static file_info_type *last_open_file_info;
-static FILE *last_open_file;
-
static file_info_type *
file_info (file_name)
const char *file_name;
@@ -336,11 +334,61 @@ 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));
- new->line_contents = NULL;
+
+ /* Detect if we are reading from stdin by examining the file
+ name returned by as_where().
+
+ [FIXME: We rely upon the name in the strcmp below being the
+ 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 (strcmp (file, _("{standard input}")) == 0
+ && input_line_pointer != NULL)
+ {
+ 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] != '\\')
+ seen_quote = ! seen_quote;
+
+ len = (copy - input_line_pointer) + 2;
+
+ copy = xmalloc (len);
+
+ if (copy != NULL)
+ {
+ char * src = input_line_pointer - 1;
+ char * dest = copy;
+
+ while (--len)
+ {
+ unsigned char c = * src ++;
+
+ /* Omit control characters in the listing. */
+ if (isascii (c) && ! iscntrl (c))
+ * dest ++ = c;
+ }
+
+ *dest = 0;
+ }
+
+ new->line_contents = copy;
+ }
+ else
+ new->line_contents = NULL;
}
else
{
@@ -350,16 +398,14 @@ listing_newline (ps)
last_line = line;
last_file = file;
+
new_frag ();
if (listing_tail)
- {
- listing_tail->next = new;
- }
+ listing_tail->next = new;
else
- {
- head = new;
- }
+ head = new;
+
listing_tail = new;
new->frag = frag_now;
@@ -371,6 +417,7 @@ listing_newline (ps)
new->hll_file = (file_info_type *) NULL;
new->hll_line = 0;
new->debugging = 0;
+
new_frag ();
#ifdef OBJ_ELF
@@ -454,7 +501,7 @@ 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);
@@ -549,7 +596,7 @@ calc_hex (list)
unsigned int address = ~ (unsigned int) 0;
fragS *frag;
fragS *frag_ptr;
- unsigned int byte_in_frag;
+ unsigned int octet_in_frag;
/* Find first frag which says it belongs to this line */
frag = list->frag;
@@ -564,33 +611,33 @@ calc_hex (list)
while (frag_ptr != (fragS *) NULL && frag_ptr->line == first)
{
/* Print as many bytes from the fixed part as is sensible */
- byte_in_frag = 0;
- while ((offsetT) byte_in_frag < frag_ptr->fr_fix
+ octet_in_frag = 0;
+ while ((offsetT) octet_in_frag < frag_ptr->fr_fix
&& data_buffer_size < MAX_BYTES - 3)
{
if (address == ~ (unsigned int) 0)
{
- address = frag_ptr->fr_address;
+ address = frag_ptr->fr_address / OCTETS_PER_BYTE;
}
sprintf (data_buffer + data_buffer_size,
"%02X",
- (frag_ptr->fr_literal[byte_in_frag]) & 0xff);
+ (frag_ptr->fr_literal[octet_in_frag]) & 0xff);
data_buffer_size += 2;
- byte_in_frag++;
+ octet_in_frag++;
}
{
- unsigned int var_rep_max = byte_in_frag;
- unsigned int var_rep_idx = byte_in_frag;
+ 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 */
- while (((offsetT) byte_in_frag
- < frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)
+ 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)
{
- address = frag_ptr->fr_address;
+ address = frag_ptr->fr_address / OCTETS_PER_BYTE;
}
sprintf (data_buffer + data_buffer_size,
"%02X",
@@ -602,7 +649,7 @@ calc_hex (list)
data_buffer_size += 2;
var_rep_idx++;
- byte_in_frag++;
+ octet_in_frag++;
if ((offsetT) var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var)
var_rep_idx = var_rep_max;
@@ -630,12 +677,14 @@ print_lines (list, lineno, string, address)
unsigned int idx;
unsigned int nchars;
unsigned int lines;
- unsigned int byte_in_word = 0;
+ unsigned int octet_in_word = 0;
char *src = data_buffer;
+ int cur;
/* 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)
{
@@ -644,82 +693,86 @@ print_lines (list, lineno, string, address)
fprintf (list_file, " ");
fprintf (list_file, "\t%s\n", string ? string : "");
- on_page++;
+
+ on_page ++;
+
listing_page (0);
+ return;
}
+
+ if (had_errors ())
+ fprintf (list_file, "% 4d ???? ", lineno);
else
+ fprintf (list_file, "% 4d %04x ", lineno, address);
+
+ /* And the data to go along with it */
+ idx = 0;
+ cur = 0;
+ while (src[cur] && idx < nchars)
{
- if (had_errors ())
- {
- fprintf (list_file, "% 4d ???? ", lineno);
- }
- else
+ int offset;
+ offset = cur;
+ 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, "% 4d %04x ", lineno, address);
+ fprintf (list_file, " ");
+ idx++;
+ octet_in_word = 0;
}
-
- /* And the data to go along with it */
+
+ 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 ++)
+ {
+ nchars = ((LISTING_WORD_SIZE * 2) + 1)
+ * listing_lhs_width_second - 1;
idx = 0;
-
- while (*src && idx < nchars)
+
+ /* Print any more lines of data, but more compactly */
+ fprintf (list_file, "% 4d ", lineno);
+
+ while (src[cur] && idx < nchars)
{
- fprintf (list_file, "%c%c", src[0], src[1]);
- src += 2;
- byte_in_word++;
- if (byte_in_word == LISTING_WORD_SIZE)
+ 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, " ");
idx++;
- byte_in_word = 0;
+ octet_in_word = 0;
}
- idx += 2;
}
-
- for (; idx < nchars; idx++)
- fprintf (list_file, " ");
-
- fprintf (list_file, "\t%s\n", string ? string : "");
- on_page++;
+
+ fprintf (list_file, "\n");
+ 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;
- lines++)
- {
- nchars = (((LISTING_WORD_SIZE * 2) + 1)
- * listing_lhs_width_second - 1);
- idx = 0;
- /* Print any more lines of data, but more compactly */
- fprintf (list_file, "% 4d ", lineno);
-
- while (*src && idx < nchars)
- {
- fprintf (list_file, "%c%c", src[0], src[1]);
- src += 2;
- idx += 2;
- byte_in_word++;
- if (byte_in_word == LISTING_WORD_SIZE)
- {
- fprintf (list_file, " ");
- idx++;
- byte_in_word = 0;
- }
- }
-
- fprintf (list_file, "\n");
- on_page++;
- listing_page (list);
-
- }
-
-
}
}
@@ -741,7 +794,7 @@ list_symbol_table ()
{
#ifdef BFD_ASSEMBLER
/* Don't report section symbols. They are not interesting. */
- if (ptr->bsym->flags & BSF_SECTION_SYM)
+ if (symbol_section_p (ptr))
continue;
#endif
if (S_GET_NAME (ptr))
@@ -773,11 +826,11 @@ list_symbol_table ()
got_some = 1;
}
- if (ptr->sy_frag && ptr->sy_frag->line)
+ if (symbol_get_frag (ptr) && symbol_get_frag (ptr)->line)
{
fprintf (list_file, "%20s:%-5d %s:%s %s\n",
- ptr->sy_frag->line->file->filename,
- ptr->sy_frag->line->line,
+ symbol_get_frag (ptr)->line->file->filename,
+ symbol_get_frag (ptr)->line->line,
segment_name (S_GET_SEGMENT (ptr)),
buf, S_GET_NAME (ptr));
}
@@ -788,7 +841,7 @@ list_symbol_table ()
buf, S_GET_NAME (ptr));
}
- on_page++;
+ on_page ++;
listing_page (0);
}
}
@@ -930,7 +983,7 @@ debugging_pseudo (list, line)
static void
listing_listing (name)
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
list_info_type *list = head;
file_info_type *current_hll_file = (file_info_type *) NULL;
@@ -958,13 +1011,17 @@ listing_listing (name)
while (list)
{
+ unsigned int list_line;
+
width = listing_rhs_width > paper_width ? paper_width :
listing_rhs_width;
+ list_line = list->line;
switch (list->edict)
{
case EDICT_LIST:
- show_listing++;
+ /* Skip all lines up to the current. */
+ list_line--;
break;
case EDICT_NOLIST:
show_listing--;
@@ -985,6 +1042,20 @@ listing_listing (name)
abort ();
}
+ if (show_listing <= 0)
+ {
+ while (list->file->linenum < list_line
+ && !list->file->at_end)
+ p = buffer_line (list->file, buffer, width);
+ }
+
+ if (list->edict == EDICT_LIST)
+ {
+ /* Enable listing for the single line that caused the enable. */
+ list_line++;
+ show_listing++;
+ }
+
if (show_listing > 0)
{
/* Scan down the list and print all the stuff which can be done
@@ -1006,20 +1077,23 @@ listing_listing (name)
if (!((listing & LISTING_NODEBUG)
&& debugging_pseudo (list, list->line_contents)))
{
- print_lines (list, list->file->linenum,
+ print_lines (list,
+ list->file->linenum == 0 ? list->line : list->file->linenum,
list->line_contents, calc_hex (list));
}
+ free (list->line_contents);
+ list->line_contents = NULL;
}
else
{
- while (list->file->linenum < list->line
+ while (list->file->linenum < list_line
&& !list->file->at_end)
{
unsigned int address;
p = buffer_line (list->file, buffer, width);
- if (list->file->linenum < list->line)
+ if (list->file->linenum < list_line)
address = ~ (unsigned int) 0;
else
address = calc_hex (list);
@@ -1035,12 +1109,6 @@ listing_listing (name)
eject = 1;
}
}
- else
- {
- while (list->file->linenum < list->line
- && !list->file->at_end)
- p = buffer_line (list->file, buffer, width);
- }
if (list->edict == EDICT_NOLIST_NEXT)
--show_listing;
@@ -1058,7 +1126,7 @@ listing_print (name)
char *name;
{
int using_stdout;
-
+
title = "";
subtitle = "";
@@ -1074,7 +1142,7 @@ listing_print (name)
using_stdout = 0;
else
{
- as_perror ("can't open list file: %s", name);
+ as_perror (_("can't open list file: %s"), name);
list_file = stdout;
using_stdout = 1;
}
@@ -1098,7 +1166,7 @@ listing_print (name)
if (! using_stdout)
{
if (fclose (list_file) == EOF)
- as_perror ("error closing list file: %s", name);
+ as_perror (_("error closing list file: %s"), name);
}
if (last_open_file)
@@ -1117,7 +1185,7 @@ listing_file (name)
void
listing_eject (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (listing)
listing_tail->edict = EDICT_EJECT;
@@ -1125,7 +1193,7 @@ listing_eject (ignore)
void
listing_flags (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
while ((*input_line_pointer++) && (*input_line_pointer != '\n'))
input_line_pointer++;
@@ -1179,7 +1247,7 @@ listing_psize (width_only)
if (paper_height < 0 || paper_height > 1000)
{
paper_height = 0;
- as_warn ("strange paper height, set to no form");
+ as_warn (_("strange paper height, set to no form"));
}
if (*input_line_pointer != ',')
@@ -1198,7 +1266,7 @@ listing_psize (width_only)
void
listing_nopage (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
paper_height = 0;
}
@@ -1245,7 +1313,7 @@ listing_title (depth)
}
else if (*input_line_pointer == '\n')
{
- as_bad ("New line in title");
+ as_bad (_("New line in title"));
demand_empty_rest_of_line ();
return;
}
diff --git a/contrib/binutils/gas/listing.h b/contrib/binutils/gas/listing.h
index 6f64b09..c0d5c37 100644
--- a/contrib/binutils/gas/listing.h
+++ b/contrib/binutils/gas/listing.h
@@ -37,6 +37,7 @@
#else
#define LISTING_NEWLINE() {;}
#endif
+#define LISTING_EOF() LISTING_NEWLINE()
#define LISTING_SKIP_COND() ((listing & LISTING_NOCOND) != 0)
diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c
index 1737414..12a757e 100644
--- a/contrib/binutils/gas/macro.c
+++ b/contrib/binutils/gas/macro.c
@@ -1,5 +1,5 @@
/* macro.c - macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -65,45 +65,11 @@ extern void *alloca ();
#include "hash.h"
#include "macro.h"
+#include "asintl.h"
+
/* The routines in this file handle macro definition and expansion.
They are called by both gasp and gas. */
-/* 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. */
-
-/* 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;
-
-/* 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. */
-
-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;
-
/* Internal functions. */
static int get_token PARAMS ((int, sb *, sb *));
@@ -175,6 +141,15 @@ macro_init (alternate, mri, strip_at, expr)
macro_expr = expr;
}
+/* Switch in and out of MRI mode on the fly. */
+
+void
+macro_mri_mode (mri)
+ int mri;
+{
+ macro_mri = mri;
+}
+
/* Read input lines till we get to a TO string.
Increase nesting depth if we get a FROM string.
Put the results into sb at PTR.
@@ -234,9 +209,11 @@ buffer_and_nest (from, to, ptr, get_line)
{
if (ptr->ptr[i] == '.')
i++;
- if (strncasecmp (ptr->ptr + i, from, from_len) == 0)
+ if (strncasecmp (ptr->ptr + i, from, from_len) == 0
+ && (ptr->len == (i + from_len) || ! isalnum (ptr->ptr[i + from_len])))
depth++;
- if (strncasecmp (ptr->ptr + i, to, to_len) == 0)
+ if (strncasecmp (ptr->ptr + i, to, to_len) == 0
+ && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len])))
{
depth--;
if (depth == 0)
@@ -386,7 +363,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
int val;
char buf[20];
/* Turns the next expression into a string */
- idx = (*macro_expr) ("% operator needs absolute expression",
+ idx = (*macro_expr) (_("% operator needs absolute expression"),
idx + 1,
in,
&val);
@@ -549,7 +526,7 @@ define_macro (idx, in, label, get_line, namep)
idx = sb_skip_white (idx, in);
if (! buffer_and_nest ("MACRO", "ENDM", &macro->sub, get_line))
- return "unexpected end of file in macro definition";
+ return _("unexpected end of file in macro definition");
if (label != NULL && label->len != 0)
{
sb_add_sb (&name, label);
@@ -558,7 +535,7 @@ define_macro (idx, in, label, get_line, namep)
/* It's the label: MACRO (formals,...) sort */
idx = do_formals (macro, idx + 1, in);
if (in->ptr[idx] != ')')
- return "missing ) after formals";
+ return _("missing ) after formals");
}
else
{
@@ -715,7 +692,7 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
if (in->ptr[src] == ')')
src++;
else
- return "missplaced )";
+ return _("missplaced )");
}
else if (in->ptr[src] == '@')
{
@@ -891,7 +868,9 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
formal_entry *f;
f = loclist->next;
- hash_delete (formal_hash, sb_terminate (&loclist->name));
+ /* Setting the value to NULL effectively deletes the entry. We
+ avoid calling hash_delete because it doesn't reclaim memory. */
+ hash_jam (formal_hash, sb_terminate (&loclist->name), NULL);
sb_kill (&loclist->name);
sb_kill (&loclist->def);
sb_kill (&loclist->actual);
@@ -975,12 +954,12 @@ macro_expand (idx, in, m, out, comment_char)
sb_reset (&t);
idx = get_token (idx, in, &t);
if (in->ptr[idx] != '=')
- return "confusion in formal parameters";
+ return _("confusion in formal parameters");
/* 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";
+ return _("macro formal argument does not exist");
else
{
/* Insert this value into the right place */
@@ -995,7 +974,7 @@ macro_expand (idx, in, m, out, comment_char)
/* This is a positional arg */
is_positional = 1;
if (is_keyword)
- return "can't mix positional and keyword arguments";
+ return _("can't mix positional and keyword arguments");
if (!f)
{
@@ -1003,7 +982,7 @@ macro_expand (idx, in, m, out, comment_char)
int c;
if (!macro_mri)
- return "too many positional arguments";
+ return _("too many positional arguments");
f = (formal_entry *) xmalloc (sizeof (formal_entry));
sb_new (&f->name);
@@ -1093,11 +1072,12 @@ macro_expand (idx, in, m, out, comment_char)
gasp. Return 1 if a macro is found, 0 otherwise. */
int
-check_macro (line, expand, comment_char, error)
+check_macro (line, expand, comment_char, error, info)
const char *line;
sb *expand;
int comment_char;
const char **error;
+ macro_entry **info;
{
const char *s;
char *copy, *cs;
@@ -1138,6 +1118,10 @@ check_macro (line, expand, comment_char, error)
sb_kill (&line_sb);
+ /* export the macro information if requested */
+ if (info)
+ *info = macro;
+
return 1;
}
@@ -1178,7 +1162,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";
+ return _("unexpected end of file in irp or irpc");
sb_new (&f.name);
sb_new (&f.def);
@@ -1186,7 +1170,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char)
idx = get_token (idx, in, &f.name);
if (f.name.len == 0)
- return "missing model parameter";
+ return _("missing model parameter");
h = hash_new ();
err = hash_jam (h, sb_terminate (&f.name), &f);
diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h
index 7b73064..9c61acd 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, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -28,6 +28,42 @@
#include "ansidecl.h"
#include "sb.h"
+/* 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. */
+
+/* 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;
+
+/* 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. */
+
+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. */
extern int macro_defined;
@@ -41,10 +77,12 @@ extern int buffer_and_nest
extern void macro_init
PARAMS ((int alternate, int mri, int strip_at,
int (*) PARAMS ((const char *, int, sb *, int *))));
+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
PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *)), int));
diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c
index 7dc399d..e4b7ad0 100644
--- a/contrib/binutils/gas/messages.c
+++ b/contrib/binutils/gas/messages.c
@@ -102,7 +102,7 @@ identify (file)
if (file)
fprintf (stderr, "%s: ", file);
- fprintf (stderr, "Assembler messages:\n");
+ fprintf (stderr, _("Assembler messages:\n"));
}
static int warning_count; /* Count of number of warnings issued */
@@ -219,7 +219,7 @@ as_warn_internal (file, line, buffer)
identify (file);
if (file)
fprintf (stderr, "%s:%u: ", file, line);
- fprintf (stderr, "Warning: ");
+ fprintf (stderr, _("Warning: "));
fputs (buffer, stderr);
(void) putc ('\n', stderr);
#ifndef NO_LISTING
@@ -328,7 +328,7 @@ as_bad_internal (file, line, buffer)
identify (file);
if (file)
fprintf (stderr, "%s:%u: ", file, line);
- fprintf (stderr, "Error: ");
+ fprintf (stderr, _("Error: "));
fputs (buffer, stderr);
(void) putc ('\n', stderr);
#ifndef NO_LISTING
@@ -432,7 +432,7 @@ as_fatal (const char *format,...)
as_show_where ();
va_start (args, format);
- fprintf (stderr, "Fatal error: ");
+ fprintf (stderr, _("Fatal error: "));
vfprintf (stderr, format, args);
(void) putc ('\n', stderr);
va_end (args);
@@ -449,7 +449,7 @@ as_fatal (format, va_alist)
as_show_where ();
va_start (args);
- fprintf (stderr, "Fatal error: ");
+ fprintf (stderr, _("Fatal error: "));
vfprintf (stderr, format, args);
(void) putc ('\n', stderr);
va_end (args);
@@ -468,12 +468,13 @@ as_assert (file, line, fn)
int line;
{
as_show_where ();
- fprintf (stderr, "Internal error!\n");
- fprintf (stderr, "Assertion failure");
+ fprintf (stderr, _("Internal error!\n"));
if (fn)
- fprintf (stderr, " in %s", fn);
- fprintf (stderr, " at %s line %d.\n", file, line);
- fprintf (stderr, "Please report this bug.\n");
+ fprintf (stderr, _("Assertion failure in %s at %s line %d.\n"),
+ fn, file, line);
+ else
+ fprintf (stderr, _("Assertion failure at %s line %d.\n"), file, line);
+ fprintf (stderr, _("Please report this bug.\n"));
xexit (EXIT_FAILURE);
}
@@ -485,10 +486,13 @@ as_abort (file, line, fn)
int line;
{
as_show_where ();
- fprintf (stderr, "Internal error, aborting at %s line %d", file, line);
if (fn)
- fprintf (stderr, " in %s", fn);
- fprintf (stderr, "\nPlease report this bug.\n");
+ fprintf (stderr, _("Internal error, aborting at %s line %d in %s\n"),
+ file, line, fn);
+ else
+ fprintf (stderr, _("Internal error, aborting at %s line %d\n"),
+ file, line);
+ fprintf (stderr, _("Please report this bug.\n"));
xexit (EXIT_FAILURE);
}
diff --git a/contrib/binutils/gas/obj.h b/contrib/binutils/gas/obj.h
index a4aaf25..7fe5551 100644
--- a/contrib/binutils/gas/obj.h
+++ b/contrib/binutils/gas/obj.h
@@ -1,7 +1,8 @@
/* obj.h - defines the object dependent hooks for all object
format backends.
- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 90, 91, 92, 93, 95, 96, 97, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +17,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. */
char *obj_default_output_file_name PARAMS ((void));
void obj_emit_relocations PARAMS ((char **where, fixS * fixP,
@@ -55,8 +57,10 @@ struct format_ops {
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 *));
+ int (*s_get_desc) PARAMS ((symbolS *));
void (*copy_symbol_attributes) PARAMS ((symbolS *, symbolS *));
- void (*generate_asm_lineno) PARAMS ((const char *, int));
+ void (*generate_asm_lineno) PARAMS ((void));
void (*process_stab) PARAMS ((segT, int, const char *, int, int, int));
int (*sec_sym_ok_for_reloc) PARAMS ((asection *));
void (*pop_insert) PARAMS ((void));
@@ -70,6 +74,7 @@ struct format_ops {
extern const struct format_ops elf_format_ops;
extern const struct format_ops ecoff_format_ops;
extern const struct format_ops coff_format_ops;
+extern const struct format_ops aout_format_ops;
#ifndef this_format
COMMON const struct format_ops *this_format;
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index 552aac1..a7df72f 100644
--- a/contrib/binutils/gas/output-file.c
+++ b/contrib/binutils/gas/output-file.c
@@ -45,11 +45,11 @@ output_file_create (name)
{
if (name[0] == '-' && name[1] == '\0')
{
- as_fatal ("Can't open a bfd on stdout %s ", name);
+ as_fatal (_("Can't open a bfd on stdout %s "), name);
}
else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
{
- as_perror ("FATAL: Can't create %s", name);
+ as_perror (_("FATAL: Can't create %s"), name);
exit (EXIT_FAILURE);
}
bfd_set_format (stdoutput, bfd_object);
@@ -69,14 +69,14 @@ output_file_close (filename)
if (bfd_close (stdoutput) == 0)
{
bfd_perror (filename);
- as_perror ("FATAL: Can't close %s\n", filename);
+ as_perror (_("FATAL: Can't close %s\n"), filename);
exit (EXIT_FAILURE);
}
#else
/* Close the bfd without getting bfd to write out anything by itself */
if (bfd_close_all_done (stdoutput) == 0)
{
- as_perror ("FATAL: Can't close %s\n", filename);
+ as_perror (_("FATAL: Can't close %s\n"), filename);
exit (EXIT_FAILURE);
}
#endif
@@ -86,9 +86,9 @@ output_file_close (filename)
#ifndef BFD_ASSEMBLER
void
output_file_append (where, length, filename)
- char *where;
- long length;
- char *filename;
+ char *where ATTRIBUTE_UNUSED;
+ long length ATTRIBUTE_UNUSED;
+ char *filename ATTRIBUTE_UNUSED;
{
abort ();
}
@@ -116,7 +116,7 @@ output_file_create (name)
if (stdoutput == NULL)
{
- as_perror ("FATAL: Can't create %s", name);
+ as_perror (_("FATAL: Can't create %s"), name);
exit (EXIT_FAILURE);
}
}
@@ -127,7 +127,7 @@ output_file_close (filename)
{
if (EOF == fclose (stdoutput))
{
- as_perror ("FATAL: Can't close %s", filename);
+ as_perror (_("FATAL: Can't close %s"), filename);
exit (EXIT_FAILURE);
}
stdoutput = NULL; /* Trust nobody! */
@@ -145,8 +145,8 @@ output_file_append (where, length, filename)
if (ferror (stdoutput))
/* if ( EOF == (putc( *where, stdoutput )) ) */
{
- as_perror ("Failed to emit an object byte", filename);
- as_fatal ("Can't continue");
+ as_perror (_("Failed to emit an object byte"), filename);
+ as_fatal (_("Can't continue"));
}
}
}
diff --git a/contrib/binutils/gas/po/Make-in b/contrib/binutils/gas/po/Make-in
new file mode 100644
index 0000000..0552db1
--- /dev/null
+++ b/contrib/binutils/gas/po/Make-in
@@ -0,0 +1,251 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-info:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in
new file mode 100644
index 0000000..b4d0125
--- /dev/null
+++ b/contrib/binutils/gas/po/POTFILES.in
@@ -0,0 +1,175 @@
+app.c
+app.c
+as.c
+as.c
+as.h
+asintl.h
+atof-generic.c
+atof-generic.c
+bignum-copy.c
+bignum-copy.c
+bignum.h
+bit_fix.h
+cgen.h
+cond.c
+cond.c
+config/e-i386aout.c
+config/e-i386coff.c
+config/e-i386elf.c
+config/e-mipsecoff.c
+config/e-mipself.c
+config/obj-aout.c
+config/obj-aout.h
+config/obj-bout.c
+config/obj-bout.h
+config/obj-coff.c
+config/obj-coff.h
+config/obj-ecoff.c
+config/obj-ecoff.h
+config/obj-elf.c
+config/obj-elf.h
+config/obj-evax.c
+config/obj-evax.h
+config/obj-hp300.c
+config/obj-hp300.h
+config/obj-ieee.c
+config/obj-ieee.h
+config/obj-som.c
+config/obj-som.h
+config/obj-vms.c
+config/obj-vms.h
+config/tc-a29k.c
+config/tc-a29k.h
+config/tc-alpha.c
+config/tc-alpha.h
+config/tc-arc.c
+config/tc-arc.h
+config/tc-arm.c
+config/tc-arm.h
+config/tc-d10v.c
+config/tc-d10v.h
+config/tc-d30v.c
+config/tc-d30v.h
+config/tc-fr30.c
+config/tc-fr30.h
+config/tc-h8300.c
+config/tc-h8300.h
+config/tc-h8500.c
+config/tc-h8500.h
+config/tc-hppa.c
+config/tc-hppa.h
+config/tc-i370.c
+config/tc-i370.h
+config/tc-i386.c
+config/tc-i386.h
+config/tc-i860.c
+config/tc-i860.h
+config/tc-i960.c
+config/tc-i960.h
+config/tc-m32r.c
+config/tc-m32r.h
+config/tc-m68k.c
+config/tc-m68k.h
+config/tc-m88k.c
+config/tc-m88k.h
+config/tc-mcore.c
+config/tc-mcore.h
+config/tc-mips.c
+config/tc-mips.h
+config/tc-mn10200.c
+config/tc-mn10200.h
+config/tc-mn10300.c
+config/tc-mn10300.h
+config/tc-ns32k.c
+config/tc-ns32k.h
+config/tc-pj.c
+config/tc-pj.h
+config/tc-ppc.c
+config/tc-ppc.h
+config/tc-sh.c
+config/tc-sh.h
+config/tc-sparc.c
+config/tc-sparc.h
+config/tc-tahoe.c
+config/tc-tahoe.h
+config/tc-tic30.c
+config/tc-tic30.h
+config/tc-tic80.c
+config/tc-tic80.h
+config/tc-v850.c
+config/tc-v850.h
+config/tc-vax.c
+config/tc-vax.h
+config/tc-w65.c
+config/tc-w65.h
+config/tc-z8k.c
+config/tc-z8k.h
+depend.c
+depend.c
+dwarf2dbg.c
+dwarf2dbg.c
+dwarf2dbg.h
+ecoff.c
+ecoff.c
+ecoff.h
+ehopt.c
+ehopt.c
+emul.h
+emul-target.h
+expr.c
+expr.c
+expr.h
+flonum-copy.c
+flonum-copy.c
+flonum.h
+flonum-konst.c
+flonum-konst.c
+flonum-mult.c
+flonum-mult.c
+frags.c
+frags.c
+frags.h
+gasp.c
+hash.c
+hash.c
+hash.h
+input-file.c
+input-file.c
+input-file.h
+input-scrub.c
+input-scrub.c
+itbl-ops.c
+itbl-ops.h
+listing.c
+listing.c
+listing.h
+literal.c
+literal.c
+macro.c
+macro.c
+macro.h
+messages.c
+messages.c
+obj.h
+output-file.c
+output-file.c
+output-file.h
+read.c
+read.c
+read.h
+sb.c
+sb.c
+sb.h
+stabs.c
+stabs.c
+struc-symbol.h
+subsegs.c
+subsegs.c
+subsegs.h
+symbols.c
+symbols.c
+symbols.h
+tc.h
+write.c
+write.c
+write.h
diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot
new file mode 100644
index 0000000..4a2cd86
--- /dev/null
+++ b/contrib/binutils/gas/po/gas.pot
@@ -0,0 +1,7722 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2000-04-05 14:09+0930\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: app.c:466 app.c:480
+msgid "end of file in comment"
+msgstr ""
+
+#: app.c:559
+msgid "end of file in string: inserted '\"'"
+msgstr ""
+
+#: app.c:625
+#, c-format
+msgid "Unknown escape '\\%c' in string: Ignored"
+msgstr ""
+
+#: app.c:634
+msgid "End of file in string: '\"' inserted"
+msgstr ""
+
+#: app.c:754
+msgid "end of file not at end of a line; newline inserted"
+msgstr ""
+
+#: app.c:911
+msgid "end of file in multiline comment"
+msgstr ""
+
+#: app.c:960
+msgid "end of file after a one-character quote; \\0 inserted"
+msgstr ""
+
+#: app.c:968
+msgid "end of file in escape character"
+msgstr ""
+
+#: app.c:980
+msgid "Missing close quote: (assumed)"
+msgstr ""
+
+#: app.c:1043 app.c:1097 app.c:1166
+msgid "end of file in comment; newline inserted"
+msgstr ""
+
+#: app.c:1107
+msgid "EOF in Comment: Newline inserted"
+msgstr ""
+
+#: as.c:148
+msgid "missing emulation mode name"
+msgstr ""
+
+#: as.c:163
+#, c-format
+msgid "unrecognized emulation name `%s'"
+msgstr ""
+
+#: as.c:210
+#, c-format
+msgid "GNU assembler version %s (%s) using BFD version %s"
+msgstr ""
+
+#: as.c:213
+#, c-format
+msgid "GNU assembler version %s (%s)"
+msgstr ""
+
+#: as.c:222
+#, c-format
+msgid "Usage: %s [option...] [asmfile...]\n"
+msgstr ""
+
+#: as.c:224
+msgid ""
+"Options:\n"
+" -a[sub-option...]\t turn on listings\n"
+" \t Sub-options [default hls]:\n"
+" \t c omit false conditionals\n"
+" \t d omit debugging directives\n"
+" \t h include high-level source\n"
+" \t l include assembly\n"
+" \t m include macro expansions\n"
+" \t n omit forms processing\n"
+" \t s include symbols\n"
+" \t L include line debug statistics (if "
+"applicable)\n"
+" \t =FILE list to FILE (must be last sub-option)\n"
+msgstr ""
+
+#: as.c:238
+msgid " -D produce assembler debugging messages\n"
+msgstr ""
+
+#: as.c:240
+msgid " --defsym SYM=VAL define symbol SYM to given value\n"
+msgstr ""
+
+#: as.c:256
+#, c-format
+msgid " emulate output (default %s)\n"
+msgstr ""
+
+#: as.c:260
+msgid " -f skip whitespace and comment preprocessing\n"
+msgstr ""
+
+#: as.c:262
+msgid " --gstabs generate stabs debugging information\n"
+msgstr ""
+
+#: as.c:264
+msgid " --gdwarf2 generate DWARF2 debugging information\n"
+msgstr ""
+
+#: as.c:266
+msgid " --help show this message and exit\n"
+msgstr ""
+
+#: as.c:268
+msgid ""
+" -I DIR add DIR to search list for .include directives\n"
+msgstr ""
+
+#: as.c:270
+msgid " -J don't warn about signed overflow\n"
+msgstr ""
+
+#: as.c:272
+msgid ""
+" -K warn when differences altered for long "
+"displacements\n"
+msgstr ""
+
+#: as.c:274
+msgid " -L,--keep-locals keep local symbols (e.g. starting with `L')\n"
+msgstr ""
+
+#: as.c:276
+msgid " -M,--mri assemble in MRI compatibility mode\n"
+msgstr ""
+
+#: as.c:278
+msgid ""
+" --MD FILE write dependency information in FILE (default "
+"none)\n"
+msgstr ""
+
+#: as.c:280
+msgid " -nocpp ignored\n"
+msgstr ""
+
+#: as.c:282
+msgid ""
+" -o OBJFILE name the object-file output OBJFILE (default "
+"a.out)\n"
+msgstr ""
+
+#: as.c:284
+msgid " -R fold data section into text section\n"
+msgstr ""
+
+#: as.c:286
+msgid ""
+" --statistics print various measured statistics from execution\n"
+msgstr ""
+
+#: as.c:288
+msgid " --strip-local-absolute strip local absolute symbols\n"
+msgstr ""
+
+#: as.c:290
+msgid ""
+" --traditional-format Use same format as native assembler when possible\n"
+msgstr ""
+
+#: as.c:292
+msgid " --version print assembler version number and exit\n"
+msgstr ""
+
+#: as.c:294
+msgid " -W --no-warn suppress warnings\n"
+msgstr ""
+
+#: as.c:296
+msgid " --warn don't suppress warnings\n"
+msgstr ""
+
+#: as.c:298
+msgid " --fatal-warnings treat warnings as errors\n"
+msgstr ""
+
+#: as.c:300
+msgid ""
+" --itbl INSTTBL extend instruction set to include instructions\n"
+" matching the specifications defined in file "
+"INSTTBL\n"
+msgstr ""
+
+#: as.c:303
+msgid " -w ignored\n"
+msgstr ""
+
+#: as.c:305
+msgid " -X ignored\n"
+msgstr ""
+
+#: as.c:307
+msgid " -Z generate object file even after errors\n"
+msgstr ""
+
+#: as.c:309
+msgid ""
+" --listing-lhs-width set the width in words of the output data column "
+"of\n"
+" the listing\n"
+msgstr ""
+
+#: as.c:312
+msgid ""
+" --listing-lhs-width2 set the width in words of the continuation lines\n"
+" of the output data column; ignored if smaller "
+"than\n"
+" the width of the first line\n"
+msgstr ""
+
+#: as.c:316
+msgid ""
+" --listing-rhs-width set the max width in characters of the lines from\n"
+" the source file\n"
+msgstr ""
+
+#: as.c:319
+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
+#, c-format
+msgid "Report bugs to %s\n"
+msgstr ""
+
+#. This output is intended to follow the GNU standards document.
+#: as.c:516
+#, c-format
+msgid "GNU assembler %s\n"
+msgstr ""
+
+#: as.c:517
+msgid "Copyright 1997 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: as.c:518 gasp.c:3648
+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
+#, c-format
+msgid "This assembler was configured for a target of `%s'.\n"
+msgstr ""
+
+#: as.c:528
+msgid "multiple emulation names specified"
+msgstr ""
+
+#: as.c:530
+msgid "emulations not handled in this configuration"
+msgstr ""
+
+#: as.c:535
+#, c-format
+msgid "alias = %s\n"
+msgstr ""
+
+#: as.c:536
+#, c-format
+msgid "canonical = %s\n"
+msgstr ""
+
+#: as.c:537
+#, c-format
+msgid "cpu-type = %s\n"
+msgstr ""
+
+#: as.c:539
+#, c-format
+msgid "format = %s\n"
+msgstr ""
+
+#: as.c:542
+#, c-format
+msgid "bfd-target = %s\n"
+msgstr ""
+
+#: as.c:555
+msgid "bad defsym; format is --defsym name=value"
+msgstr ""
+
+#: as.c:575
+msgid "No file name following -t option\n"
+msgstr ""
+
+#: as.c:591
+#, c-format
+msgid "Failed to read instruction table %s\n"
+msgstr ""
+
+#: as.c:705
+#, c-format
+msgid "invalid listing option `%c'"
+msgstr ""
+
+#: as.c:899
+#, c-format
+msgid "%d warnings, treating warnings as errors"
+msgstr ""
+
+#: as.c:930
+#, c-format
+msgid "%s: total time in assembly: %ld.%06ld\n"
+msgstr ""
+
+#: as.c:933
+#, c-format
+msgid "%s: data size %ld\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
+msgid "failed sanity check."
+msgstr ""
+
+#: cond.c:75
+msgid "invalid identifier for \".ifdef\""
+msgstr ""
+
+#: cond.c:128
+msgid "non-constant expression in \".if\" statement"
+msgstr ""
+
+#: cond.c:224
+msgid "bad format for ifc or ifnc"
+msgstr ""
+
+#: cond.c:258
+msgid "\".elseif\" without matching \".if\" - ignored"
+msgstr ""
+
+#: cond.c:263
+msgid "\".elseif\" after \".else\" - ignored"
+msgstr ""
+
+#: cond.c:266 cond.c:375
+msgid "here is the previous \"else\""
+msgstr ""
+
+#: cond.c:269 cond.c:378
+msgid "here is the previous \"if\""
+msgstr ""
+
+#: cond.c:302
+msgid "non-constant expression in \".elseif\" statement"
+msgstr ""
+
+#: cond.c:337
+msgid "\".endif\" without \".if\""
+msgstr ""
+
+#: cond.c:367
+msgid ".else without matching .if - ignored"
+msgstr ""
+
+#: cond.c:372
+msgid "duplicate \"else\" - ignored"
+msgstr ""
+
+#: cond.c:423
+msgid ".ifeqs syntax error"
+msgstr ""
+
+#: cond.c:506
+msgid "end of macro inside conditional"
+msgstr ""
+
+#: cond.c:508
+msgid "end of file inside conditional"
+msgstr ""
+
+#: cond.c:511
+msgid "here is the start of the unterminated conditional"
+msgstr ""
+
+#: cond.c:515
+msgid "here is the \"else\" of the unterminated conditional"
+msgstr ""
+
+#: config/obj-aout.c:163
+#, c-format
+msgid "Attempt to put a common symbol into set %s"
+msgstr ""
+
+#: config/obj-aout.c:167
+#, 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
+#, c-format
+msgid "Symbol `%s' can not be both weak and common"
+msgstr ""
+
+#: config/obj-aout.c:256 config/obj-coff.c:1916
+msgid "unresolved relocation"
+msgstr ""
+
+#: config/obj-aout.c:258 config/obj-coff.c:1918
+#, c-format
+msgid "bad relocation: symbol `%s' not in symbol table"
+msgstr ""
+
+#: config/obj-aout.c:345
+#, c-format
+msgid "%s: bad type for weak symbol"
+msgstr ""
+
+#: config/obj-aout.c:462 config/obj-coff.c:2849 write.c:1805
+#, c-format
+msgid "%s: global symbols not supported in common sections"
+msgstr ""
+
+#: config/obj-aout.c:529
+#, c-format
+msgid "Local symbol %s never defined."
+msgstr ""
+
+#: config/obj-aout.c:617
+msgid "subsegment index too high"
+msgstr ""
+
+#: config/obj-bout.c:313 config/obj-vms.c:566
+#, c-format
+msgid "Local symbol %s never defined"
+msgstr ""
+
+#: config/obj-coff.c:149
+#, 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
+msgid "Line numbers must be positive integers\n"
+msgstr ""
+
+#: config/obj-coff.c:477 config/obj-coff.c:2263
+msgid ".ln pseudo-op inside .def/.endef: ignored."
+msgstr ""
+
+#: config/obj-coff.c:520 ecoff.c:3304
+msgid ".loc outside of .text"
+msgstr ""
+
+#: config/obj-coff.c:527
+msgid ".loc pseudo-op inside .def/.endef: ignored."
+msgstr ""
+
+#: config/obj-coff.c:615 config/obj-coff.c:2320
+msgid ".def pseudo-op used inside of .def/.endef: ignored."
+msgstr ""
+
+#: config/obj-coff.c:661 config/obj-coff.c:2373
+msgid ".endef pseudo-op used outside of .def/.endef: ignored."
+msgstr ""
+
+#: config/obj-coff.c:699
+#, c-format
+msgid "`%s' symbol without preceding function"
+msgstr ""
+
+#: config/obj-coff.c:753 config/obj-coff.c:2448
+#, c-format
+msgid "unexpected storage class %d"
+msgstr ""
+
+#: config/obj-coff.c:866 config/obj-coff.c:2555
+msgid ".dim pseudo-op used outside of .def/.endef: ignored."
+msgstr ""
+
+#: config/obj-coff.c:886 config/obj-coff.c:2575
+msgid "badly formed .dim directive ignored"
+msgstr ""
+
+#: config/obj-coff.c:937 config/obj-coff.c:2638
+msgid ".size pseudo-op used outside of .def/.endef ignored."
+msgstr ""
+
+#: config/obj-coff.c:953 config/obj-coff.c:2654
+msgid ".scl pseudo-op used outside of .def/.endef ignored."
+msgstr ""
+
+#: config/obj-coff.c:971 config/obj-coff.c:2672
+msgid ".tag pseudo-op used outside of .def/.endef ignored."
+msgstr ""
+
+#: config/obj-coff.c:990 config/obj-coff.c:2690
+#, c-format
+msgid "tag not found for .tag %s"
+msgstr ""
+
+#: config/obj-coff.c:1005 config/obj-coff.c:2705
+msgid ".type pseudo-op used outside of .def/.endef ignored."
+msgstr ""
+
+#: config/obj-coff.c:1027 config/obj-coff.c:2727
+msgid ".val pseudo-op used outside of .def/.endef ignored."
+msgstr ""
+
+#: config/obj-coff.c:1165 config/obj-coff.c:2922
+msgid "mismatched .eb"
+msgstr ""
+
+#: config/obj-coff.c:1183 config/obj-coff.c:2962
+msgid "C_EFCN symbol out of scope"
+msgstr ""
+
+#. STYP_INFO
+#. STYP_LIB
+#. STYP_OVER
+#: config/obj-coff.c:1405
+#, c-format
+msgid "unsupported section attribute '%c'"
+msgstr ""
+
+#: config/obj-coff.c:1410 config/obj-coff.c:3668 config/tc-ppc.c:3791
+#, c-format
+msgid "unknown section attribute '%c'"
+msgstr ""
+
+#: config/obj-coff.c:1432 config/tc-ppc.c:3809 read.c:2504
+#, c-format
+msgid "error setting flags for \"%s\": %s"
+msgstr ""
+
+#: config/obj-coff.c:1558
+#, c-format
+msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"
+msgstr ""
+
+#: config/obj-coff.c:1743 config/obj-ieee.c:69
+msgid "Out of step\n"
+msgstr ""
+
+#: config/obj-coff.c:2178
+msgid "bfd_coff_swap_scnhdr_out failed"
+msgstr ""
+
+#: config/obj-coff.c:2405
+msgid "`.bf' symbol without preceding function\n"
+msgstr ""
+
+#: config/obj-coff.c:3365 config/obj-ieee.c:522 output-file.c:52
+#: output-file.c:119
+#, c-format
+msgid "FATAL: Can't create %s"
+msgstr ""
+
+#: config/obj-coff.c:3542
+#, c-format
+msgid "Can't close %s: %s"
+msgstr ""
+
+#: config/obj-coff.c:3576
+#, 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
+msgid "Expected comma after name"
+msgstr ""
+
+#: config/obj-coff.c:3992 read.c:1967
+msgid "Missing size expression"
+msgstr ""
+
+#: config/obj-coff.c:3998
+#, c-format
+msgid "lcomm length (%d.) <0! Ignored."
+msgstr ""
+
+#: config/obj-coff.c:4026 read.c:2188
+#, c-format
+msgid "Symbol %s already defined"
+msgstr ""
+
+#: config/obj-coff.c:4120 config/tc-i960.c:3255
+#, c-format
+msgid "No 'bal' entry point for leafproc %s"
+msgstr ""
+
+#: config/obj-coff.c:4199 write.c:2507
+#, c-format
+msgid "Negative of non-absolute symbol %s"
+msgstr ""
+
+#: config/obj-coff.c:4220 write.c:2521
+msgid "callj to difference of 2 symbols"
+msgstr ""
+
+#: config/obj-coff.c:4266
+#, c-format
+msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld."
+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
+msgid "can't use COBR format with external label"
+msgstr ""
+
+#: config/obj-coff.c:4436
+#, 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
+#, c-format
+msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx"
+msgstr ""
+
+#: config/obj-ecoff.c:240
+msgid "Can't set GP value"
+msgstr ""
+
+#: config/obj-ecoff.c:247
+msgid "Can't set register masks"
+msgstr ""
+
+#: config/obj-elf.c:299 config/tc-sparc.c:3495 config/tc-v850.c:263
+msgid "Expected comma after symbol-name"
+msgstr ""
+
+#: config/obj-elf.c:306 config/tc-arc.c:779 config/tc-sparc.c:3502
+#, 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
+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
+#, 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
+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
+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
+#, c-format
+msgid "bad .common segment %s"
+msgstr ""
+
+#: config/obj-elf.c:658
+#, c-format
+msgid "Setting incorrect section type for %s"
+msgstr ""
+
+#: config/obj-elf.c:668
+#, c-format
+msgid "Setting incorrect section attributes for %s"
+msgstr ""
+
+#: config/obj-elf.c:726
+msgid "Unrecognized .section attribute: want a,w,x"
+msgstr ""
+
+#: config/obj-elf.c:766
+msgid "Unrecognized section attribute"
+msgstr ""
+
+#: config/obj-elf.c:788
+msgid "Unrecognized section type"
+msgstr ""
+
+#: config/obj-elf.c:839
+msgid "Missing section name"
+msgstr ""
+
+#: config/obj-elf.c:905
+msgid "Bad .section directive - character following name is not '#'"
+msgstr ""
+
+#: config/obj-elf.c:1006
+msgid ".previous without corresponding .section; ignored"
+msgstr ""
+
+#: config/obj-elf.c:1033
+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
+msgid "expected comma after name in .symver"
+msgstr ""
+
+#: config/obj-elf.c:1115
+#, 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
+msgid "Expected quoted string"
+msgstr ""
+
+#: config/obj-elf.c:1345
+#, c-format
+msgid "expected comma after name `%s' in .size directive"
+msgstr ""
+
+#: config/obj-elf.c:1354
+msgid "missing expression in .size directive"
+msgstr ""
+
+#: config/obj-elf.c:1421
+#, c-format
+msgid "ignoring unrecognized symbol type \"%s\""
+msgstr ""
+
+#: config/obj-elf.c:1599
+msgid ".size expression too complicated to fix up"
+msgstr ""
+
+#: config/obj-elf.c:1630
+#, c-format
+msgid ""
+"invalid attempt to declare external version name as default in symbol `%s'"
+msgstr ""
+
+#: config/obj-elf.c:1762
+#, c-format
+msgid "Failed to set up debugging information: %s"
+msgstr ""
+
+#: config/obj-elf.c:1782
+#, c-format
+msgid "Can't start writing .mdebug section: %s"
+msgstr ""
+
+#: config/obj-elf.c:1790
+#, c-format
+msgid "Could not write .mdebug section: %s"
+msgstr ""
+
+#: config/obj-ieee.c:460
+msgid "too many sections"
+msgstr ""
+
+#: config/obj-som.c:131
+msgid "Only one .version pseudo-op per file!"
+msgstr ""
+
+#: config/obj-som.c:157
+#, c-format
+msgid "FATAL: Attaching version header %s"
+msgstr ""
+
+#: config/obj-som.c:176
+msgid "Only one .copyright pseudo-op per file!"
+msgstr ""
+
+#: config/obj-som.c:202
+#, c-format
+msgid "FATAL: Attaching copyright header %s"
+msgstr ""
+
+#: config/obj-vms.c:464
+#, c-format
+msgid "compiler emitted zero-size common symbol `%s' already defined"
+msgstr ""
+
+#: config/obj-vms.c:474
+#, c-format
+msgid "compiler redefined zero-size common symbol `%s'"
+msgstr ""
+
+#: config/obj-vms.c:597
+#, c-format
+msgid "Couldn't create VMS object file \"%s\""
+msgstr ""
+
+#: config/obj-vms.c:623
+msgid "I/O error writing VMS object file (length prefix)"
+msgstr ""
+
+#: config/obj-vms.c:637
+msgid "I/O error writing VMS object file"
+msgstr ""
+
+#: config/obj-vms.c:1240
+msgid "Couldn't find source file \"%s\", status=%%X%x"
+msgstr ""
+
+#: config/obj-vms.c:1749 config/obj-vms.c:2937
+#, c-format
+msgid "debugger forward reference error, dbx type %d"
+msgstr ""
+
+#: config/obj-vms.c:1825
+#, c-format
+msgid "Variable descriptor %d too complicated. Defined as `void *'."
+msgstr ""
+
+#: config/obj-vms.c:2144
+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"
+" other modules, since this is not the correct way to handle this. You \n"
+" have two options: 1) get a patched compiler that does not put global \n"
+" constants in the text psect, or 2) remove the 'const' keyword from \n"
+" definitions of global variables in your source module(s). Don't say \n"
+" I didn't warn you! \n"
+msgstr ""
+
+#: config/obj-vms.c:2463
+#, c-format
+msgid "debugginer output: %d is an unknown untyped variable."
+msgstr ""
+
+#: config/obj-vms.c:2681
+#, c-format
+msgid "debugger output: structure element `%s' has undefined type"
+msgstr ""
+
+#: config/obj-vms.c:2792
+#, c-format
+msgid "debugger output: %d is an unknown type of variable."
+msgstr ""
+
+#: config/obj-vms.c:2926
+#, c-format
+msgid "debugger output: Unable to resolve %d circular references."
+msgstr ""
+
+#: config/obj-vms.c:3131
+#, c-format
+msgid "Module name truncated: %s\n"
+msgstr ""
+
+#: config/obj-vms.c:3410
+#, c-format
+msgid "Symbol %s replaced by %s\n"
+msgstr ""
+
+#. impossible
+#: config/obj-vms.c:3694
+#, c-format
+msgid "Unknown VMS psect type (%ld)"
+msgstr ""
+
+#: config/obj-vms.c:3735
+#, c-format
+msgid "Globalsymbol attribute for symbol %s was unexpected."
+msgstr ""
+
+#: config/obj-vms.c:3885
+msgid "Invalid data type for globalvalue"
+msgstr ""
+
+#: config/obj-vms.c:3897
+#, c-format
+msgid "Invalid globalvalue of %s"
+msgstr ""
+
+#: config/obj-vms.c:4247
+msgid "Couldn't find fixup fragment when checking for indirect reference"
+msgstr ""
+
+#: config/obj-vms.c:4591 config/obj-vms.c:4733
+msgid "Fixup data addsy and subsy don't have the same type"
+msgstr ""
+
+#: config/obj-vms.c:4595 config/obj-vms.c:4737
+msgid "Fixup data addsy and subsy don't have an appropriate type"
+msgstr ""
+
+#: config/obj-vms.c:4598 config/obj-vms.c:4740
+msgid "Fixup data is erroneously \"pcrel\""
+msgstr ""
+
+#: config/obj-vms.c:4614 config/obj-vms.c:4759
+msgid "Fixup datum is not a longword"
+msgstr ""
+
+#: config/obj-vms.c:4618 config/obj-vms.c:4763
+msgid "Fixup datum is not \"fixP->fx_addsy\""
+msgstr ""
+
+#: config/obj-vms.c:4834
+#, 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
+msgid "Can't handle global xtors symbols yet."
+msgstr ""
+
+#: config/obj-vms.c:4969
+#, c-format
+msgid "Unknown %s"
+msgstr ""
+
+#.
+#. * Error otherwise.
+#.
+#: config/obj-vms.c:5054
+#, c-format
+msgid "unhandled stab type %d"
+msgstr ""
+
+#: config/tc-a29k.c:160 config/tc-sparc.c:3696
+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
+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
+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
+#, c-format
+msgid "Unknown opcode: `%s'"
+msgstr ""
+
+#: config/tc-a29k.c:420
+#, c-format
+msgid "Unknown opcode `%s'."
+msgstr ""
+
+#: config/tc-a29k.c:452
+#, c-format
+msgid "Too many operands: %s"
+msgstr ""
+
+#: config/tc-a29k.c:474 config/tc-a29k.c:505
+#, c-format
+msgid "Immediate value of %ld is too large"
+msgstr ""
+
+#: config/tc-a29k.c:892 config/tc-i860.c:940
+#, c-format
+msgid "bad relocation type: 0x%02x"
+msgstr ""
+
+#: config/tc-a29k.c:916
+#, c-format
+msgid "need %o3\n"
+msgstr ""
+
+#: config/tc-a29k.c:932
+msgid "a29k_convert_frag\n"
+msgstr ""
+
+#: config/tc-a29k.c:941
+msgid "a29k_estimate_size_before_relax\n"
+msgstr ""
+
+#: config/tc-a29k.c:1092
+#, c-format
+msgid "label \"$%d\" redefined"
+msgstr ""
+
+#: config/tc-a29k.c:1165
+msgid "Invalid expression after %%%%\n"
+msgstr ""
+
+#: config/tc-a29k.c:1176
+msgid "Invalid register in & expression"
+msgstr ""
+
+#: config/tc-alpha.c:834
+#, c-format
+msgid "internal error: can't hash opcode `%s': %s"
+msgstr ""
+
+#: config/tc-alpha.c:868
+#, c-format
+msgid "internal error: can't hash macro `%s': %s"
+msgstr ""
+
+#: config/tc-alpha.c:951 config/tc-i960.c:2738
+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
+msgid "Bad call to MD_ATOF()"
+msgstr ""
+
+#: config/tc-alpha.c:1075
+#, c-format
+msgid "Unknown CPU identifier `%s'"
+msgstr ""
+
+#: config/tc-alpha.c:1119
+msgid ""
+"Alpha options:\n"
+"-32addr\t\t\ttreat addresses as 32-bit values\n"
+"-F\t\t\tlack floating point instructions support\n"
+"-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mall\n"
+"\t\t\tspecify variant of Alpha architecture\n"
+"-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264\n"
+"\t\t\tthese variants include PALcode opcodes\n"
+msgstr ""
+
+#: config/tc-alpha.c:1129
+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
+#, c-format
+msgid "unhandled relocation type %s"
+msgstr ""
+
+#: config/tc-alpha.c:1311
+msgid "non-absolute expression in constant field"
+msgstr ""
+
+#: config/tc-alpha.c:1325
+#, c-format
+msgid "type %d reloc done?\n"
+msgstr ""
+
+#: config/tc-alpha.c:1376 config/tc-alpha.c:1383 config/tc-mips.c:7360
+msgid "Used $at without \".set noat\""
+msgstr ""
+
+#: config/tc-alpha.c:1561
+#, c-format
+msgid "cannot represent `%s' relocation in object file"
+msgstr ""
+
+#: config/tc-alpha.c:1568
+#, c-format
+msgid "internal error? cannot generate `%s' relocation"
+msgstr ""
+
+#: config/tc-alpha.c:1622
+#, c-format
+msgid "frame reg expected, using $%d."
+msgstr ""
+
+#: config/tc-alpha.c:1747
+#, c-format
+msgid "No !literal!%d was found"
+msgstr ""
+
+#. only support one relocation op per insn
+#: config/tc-alpha.c:1935
+msgid "More than one relocation op per insn"
+msgstr ""
+
+#: config/tc-alpha.c:1952
+msgid "No relocation operand"
+msgstr ""
+
+#: config/tc-alpha.c:1958
+#, c-format
+msgid "No !sequence-number after !%s"
+msgstr ""
+
+#: config/tc-alpha.c:1971
+#, c-format
+msgid "Unknown relocation operand: !%s"
+msgstr ""
+
+#: config/tc-alpha.c:1984
+#, c-format
+msgid "Bad sequence number: !%s!%s"
+msgstr ""
+
+#: config/tc-alpha.c:2335
+#, 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
+msgid "too many fixups"
+msgstr ""
+
+#: config/tc-alpha.c:2645 config/tc-alpha.c:2714
+#, c-format
+msgid "inappropriate arguments for opcode `%s'"
+msgstr ""
+
+#: config/tc-alpha.c:2647 config/tc-alpha.c:2716
+#, c-format
+msgid "opcode `%s' not supported for target %s"
+msgstr ""
+
+#: config/tc-alpha.c:2651 config/tc-alpha.c:2719
+#, 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
+#, c-format
+msgid "Cannot use !%s!%d with %s"
+msgstr ""
+
+#: config/tc-alpha.c:2779
+msgid "can not resolve expression"
+msgstr ""
+
+#: config/tc-alpha.c:2921 config/tc-alpha.c:3113
+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
+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
+msgid "macro requires $at while $at in use"
+msgstr ""
+
+#: config/tc-alpha.c:3075 expr.c:86 read.c:3160
+msgid "bignum invalid; zero assumed"
+msgstr ""
+
+#: config/tc-alpha.c:3077 expr.c:88 read.c:3162 read.c:3498 read.c:4396
+msgid "floating point number invalid; zero assumed"
+msgstr ""
+
+#: config/tc-alpha.c:3082
+msgid "can't handle expression"
+msgstr ""
+
+#: config/tc-alpha.c:3119
+msgid "overflow in literal (.lit8) table"
+msgstr ""
+
+#: config/tc-alpha.c:3291
+#, c-format
+msgid "bad instruction format for lda !%s!%d"
+msgstr ""
+
+#: config/tc-alpha.c:4291 config/tc-ppc.c:1345 config/tc-ppc.c:3555
+#: read.c:1387
+#, 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
+#, c-format
+msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
+msgstr ""
+
+#: config/tc-alpha.c:4440 ecoff.c:3109
+msgid ".ent directive has no name"
+msgstr ""
+
+#: config/tc-alpha.c:4448
+msgid "nested .ent directives"
+msgstr ""
+
+#: config/tc-alpha.c:4484 ecoff.c:3057
+msgid ".end directive has no name"
+msgstr ""
+
+#: config/tc-alpha.c:4493
+msgid ".end directive names different symbol than .ent"
+msgstr ""
+
+#: config/tc-alpha.c:4568
+#, c-format
+msgid "Invalid argument %d to .prologue."
+msgstr ""
+
+#: config/tc-alpha.c:4596
+msgid "ECOFF debugging is disabled."
+msgstr ""
+
+#: config/tc-alpha.c:4617
+msgid "Unknown section directive"
+msgstr ""
+
+#: config/tc-alpha.c:4654
+msgid ".ent directive has no symbol"
+msgstr ""
+
+#: config/tc-alpha.c:4682
+msgid "Bad .frame directive 1./2. param"
+msgstr ""
+
+#: config/tc-alpha.c:4694
+msgid "Bad .frame directive 3./4. param"
+msgstr ""
+
+#: config/tc-alpha.c:4719
+msgid ".pdesc directive not in link (.link) section"
+msgstr ""
+
+#: config/tc-alpha.c:4727
+msgid ".pdesc has no matching .ent"
+msgstr ""
+
+#: config/tc-alpha.c:4738
+msgid ".pdesc directive has no entry symbol"
+msgstr ""
+
+#: config/tc-alpha.c:4751
+msgid "No comma after .pdesc <entryname>"
+msgstr ""
+
+#: config/tc-alpha.c:4774
+msgid "unknown procedure kind"
+msgstr ""
+
+#: config/tc-alpha.c:4869
+msgid ".name directive not in link (.link) section"
+msgstr ""
+
+#: config/tc-alpha.c:4877
+msgid ".name directive has no symbol"
+msgstr ""
+
+#: config/tc-alpha.c:4912
+msgid "No symbol after .linkage"
+msgstr ""
+
+#: config/tc-alpha.c:4941
+msgid "No symbol after .code_address"
+msgstr ""
+
+#: config/tc-alpha.c:4976 ecoff.c:3274
+msgid "Bad .mask directive"
+msgstr ""
+
+#: config/tc-alpha.c:4998 ecoff.c:3205
+msgid "Bad .fmask directive"
+msgstr ""
+
+#: config/tc-alpha.c:5169 config/tc-arm.c:1325 read.c:2151 read.c:2731
+#: stabs.c:460
+#, c-format
+msgid "Expected comma after name \"%s\""
+msgstr ""
+
+#. *symbol_get_obj (symbolP) = (signed char) temp;
+#: config/tc-alpha.c:5180
+#, c-format
+msgid "unhandled: .proc %s,%d"
+msgstr ""
+
+#: config/tc-alpha.c:5215
+#, 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
+msgid "File overrides no-base-register option."
+msgstr ""
+
+#: config/tc-alpha.c:5249
+#, c-format
+msgid "Bad base register, using $%d."
+msgstr ""
+
+#: config/tc-alpha.c:5271
+#, c-format
+msgid "Alignment too large: %d. assumed"
+msgstr ""
+
+#: config/tc-alpha.c:5275 config/tc-d30v.c:2182
+msgid "Alignment negative: 0 assumed"
+msgstr ""
+
+#: config/tc-alpha.c:5588
+#, 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"
+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"
+msgstr ""
+
+#: config/tc-arc.c:1097
+#, c-format
+msgid "missing ')' in %-op"
+msgstr ""
+
+#: config/tc-arc.c:1131
+msgid "expression too complex for %%st"
+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"
+msgstr ""
+
+#: config/tc-arc.c:1392 config/tc-ppc.c:4823 config/tc-v850.c:2382
+msgid "unresolved expression that must be resolved"
+msgstr ""
+
+#: config/tc-arc.c:1457 config/tc-sparc.c:3203
+#, c-format
+msgid "internal error: can't export reloc type %d (`%s')"
+msgstr ""
+
+#: config/tc-arm.c:1023
+msgid "Literal Pool Overflow"
+msgstr ""
+
+#: config/tc-arm.c:1165
+msgid "Invalid syntax for .req directive."
+msgstr ""
+
+#: config/tc-arm.c:1237 config/tc-mips.c:9963 read.c:2040
+#, c-format
+msgid "Alignment too large: %d. assumed."
+msgstr ""
+
+#: config/tc-arm.c:1240 read.c:2045
+msgid "Alignment negative. 0 assumed."
+msgstr ""
+
+#: config/tc-arm.c:1374 config/tc-m32r.c:418 read.c:2790 read.c:4867
+#, c-format
+msgid "symbol `%s' already defined"
+msgstr ""
+
+#: config/tc-arm.c:1444
+msgid "selected processor does not support THUMB opcodes"
+msgstr ""
+
+#: config/tc-arm.c:1456
+msgid "selected processor does not support ARM opcodes"
+msgstr ""
+
+#: config/tc-arm.c:1465
+#, c-format
+msgid "invalid instruction size selected (%d)"
+msgstr ""
+
+#: config/tc-arm.c:1500
+#, c-format
+msgid "invalid operand to .code directive (%d) (expecting 16 or 32)"
+msgstr ""
+
+#: config/tc-arm.c:1511
+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
+#, 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 "<psr(f)> expected"
+msgstr ""
+
+#: config/tc-arm.c:1616
+msgid "Illegal co-processor number"
+msgstr ""
+
+#: config/tc-arm.c:1623
+msgid "Bad or missing co-processor number"
+msgstr ""
+
+#: config/tc-arm.c:1647
+msgid "bad or missing expression"
+msgstr ""
+
+#: config/tc-arm.c:1653
+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
+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
+msgid "Floating point register expected"
+msgstr ""
+
+#: config/tc-arm.c:1719
+msgid "immediate expression expected"
+msgstr ""
+
+#: config/tc-arm.c:1734
+msgid "co-processor address must be word aligned"
+msgstr ""
+
+#: config/tc-arm.c:1740
+msgid "offset too large"
+msgstr ""
+
+#: config/tc-arm.c:1788
+msgid "pc may not be used in post-increment"
+msgstr ""
+
+#: config/tc-arm.c:1804 config/tc-arm.c:2934
+msgid "pre-indexed expression expected"
+msgstr ""
+
+#: config/tc-arm.c:1817 config/tc-arm.c:2946 config/tc-arm.c:3288
+msgid "missing ]"
+msgstr ""
+
+#: config/tc-arm.c:1827
+msgid "pc may not be used with write-back"
+msgstr ""
+
+#: config/tc-arm.c:1881
+msgid "<psr> expected"
+msgstr ""
+
+#: config/tc-arm.c:1942 config/tc-arm.c:2556
+msgid "Register or shift expression 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"
+msgstr ""
+
+#: config/tc-arm.c:1967
+msgid "Error: unrecognised syntax for second argument to msr instruction"
+msgstr ""
+
+#: config/tc-arm.c:2016
+msgid "rdhi, rdlo and rm must all be different"
+msgstr ""
+
+#: config/tc-arm.c:2072
+msgid "rd and rm should be different in mul"
+msgstr ""
+
+#: config/tc-arm.c:2128
+msgid "rd and rm should be different in mla"
+msgstr ""
+
+#: config/tc-arm.c:2255
+msgid "bad_segment"
+msgstr ""
+
+#: config/tc-arm.c:2301 config/tc-arm.c:2378
+msgid "Shift expression expected"
+msgstr ""
+
+#: config/tc-arm.c:2342
+msgid "Invalid immediate shift"
+msgstr ""
+
+#: config/tc-arm.c:2371
+msgid "shift requires register or #expression"
+msgstr ""
+
+#: config/tc-arm.c:2372
+msgid "shift requires #expression"
+msgstr ""
+
+#: config/tc-arm.c:2514 config/tc-arm.c:2975
+msgid "Constant expression expected"
+msgstr ""
+
+#: config/tc-arm.c:2609
+msgid "Invalid floating point immediate expression"
+msgstr ""
+
+#: config/tc-arm.c:2612
+msgid "Floating point register or immediate expression expected"
+msgstr ""
+
+#: config/tc-arm.c:2781
+msgid "address offset too large"
+msgstr ""
+
+#: config/tc-arm.c:2853
+msgid "Processor does not support halfwords or signed bytes"
+msgstr ""
+
+#: config/tc-arm.c:2874
+msgid "Address expected"
+msgstr ""
+
+#: config/tc-arm.c:2904 config/tc-arm.c:2918 config/tc-arm.c:2955
+#, 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
+msgid "destination"
+msgstr ""
+
+#: config/tc-arm.c:2905 config/tc-arm.c:2919 config/tc-arm.c:2956
+msgid "source"
+msgstr ""
+
+#: config/tc-arm.c:2995
+msgid "literal pool insertion failed"
+msgstr ""
+
+#: config/tc-arm.c:3033
+msgid "Pre-increment instruction with translate"
+msgstr ""
+
+#: config/tc-arm.c:3074
+msgid "Bad range in register list"
+msgstr ""
+
+#: config/tc-arm.c:3082 config/tc-arm.c:3091 config/tc-arm.c:3132
+#, c-format
+msgid "Warning: Duplicated register (r%d) in register list"
+msgstr ""
+
+#: config/tc-arm.c:3094
+msgid "Warning: Register range not in ascending order"
+msgstr ""
+
+#: config/tc-arm.c:3105
+msgid "Missing `}'"
+msgstr ""
+
+#: config/tc-arm.c:3121
+msgid "invalid register mask"
+msgstr ""
+
+#: config/tc-arm.c:3180
+msgid "r15 not allowed as base register"
+msgstr ""
+
+#: config/tc-arm.c:3248 config/tc-arm.c:3262
+msgid "r15 not allowed in swap"
+msgstr ""
+
+#: config/tc-arm.c:3615 config/tc-v850.c:1921 config/tc-v850.c:1942
+msgid "constant expression expected"
+msgstr ""
+
+#: config/tc-arm.c:3621
+msgid "Constant value required for number of registers"
+msgstr ""
+
+#: config/tc-arm.c:3629
+msgid "number of registers must be in the range [1:4]"
+msgstr ""
+
+#: config/tc-arm.c:3689
+msgid "R15 not allowed as base register with write-back"
+msgstr ""
+
+#: config/tc-arm.c:3936
+msgid "lo register required"
+msgstr ""
+
+#: config/tc-arm.c:3944
+msgid "hi register required"
+msgstr ""
+
+#: config/tc-arm.c:4013
+msgid "dest and source1 must be the same register"
+msgstr ""
+
+#: config/tc-arm.c:4020
+msgid "subtract valid only on lo regs"
+msgstr ""
+
+#: config/tc-arm.c:4044
+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
+msgid "invalid immediate value for stack adjust"
+msgstr ""
+
+#: config/tc-arm.c:4093
+msgid "invalid immediate for address calculation"
+msgstr ""
+
+#: config/tc-arm.c:4180
+msgid "source1 and dest must be same register"
+msgstr ""
+
+#: config/tc-arm.c:4215
+msgid "Invalid immediate for shift"
+msgstr ""
+
+#: config/tc-arm.c:4294
+msgid "only lo regs allowed with immediate"
+msgstr ""
+
+#: config/tc-arm.c:4313
+msgid "invalid immediate"
+msgstr ""
+
+#: config/tc-arm.c:4367
+msgid "expected ']'"
+msgstr ""
+
+#: config/tc-arm.c:4433
+msgid "byte or halfword not valid for base register"
+msgstr ""
+
+#: config/tc-arm.c:4438
+msgid "R15 based store not allowed"
+msgstr ""
+
+#: config/tc-arm.c:4443
+msgid "Invalid base register for register offset"
+msgstr ""
+
+#: config/tc-arm.c:4461
+msgid "invalid offset"
+msgstr ""
+
+#: config/tc-arm.c:4472
+msgid "invalid base register in load/store"
+msgstr ""
+
+#: config/tc-arm.c:4496
+msgid "Invalid offset"
+msgstr ""
+
+#: config/tc-arm.c:4570
+msgid "dest and source1 one must be the same register"
+msgstr ""
+
+#: config/tc-arm.c:4578
+msgid "Rs and Rd must be different in MUL"
+msgstr ""
+
+#: config/tc-arm.c:4722
+msgid ""
+"Inserted missing '!': load/store multiple always writes back base register"
+msgstr ""
+
+#: config/tc-arm.c:4738 config/tc-arm.c:4838
+msgid "Expression too complex"
+msgstr ""
+
+#: config/tc-arm.c:4744
+msgid "only lo-regs valid in load/store multiple"
+msgstr ""
+
+#: config/tc-arm.c:4790
+msgid "Syntax: ldrs[b] Rd, [Rb, Ro]"
+msgstr ""
+
+#: config/tc-arm.c:4854
+msgid "invalid register list to push/pop instruction"
+msgstr ""
+
+#: config/tc-arm.c:4996
+msgid "Virtual memory exhausted"
+msgstr ""
+
+#: config/tc-arm.c:5394
+#, c-format
+msgid "invalid constant (%lx) after fixup"
+msgstr ""
+
+#: config/tc-arm.c:5428
+#, c-format
+msgid "Unable to compute ADRL instructions for PC offset of 0x%x"
+msgstr ""
+
+#: config/tc-arm.c:5456
+#, c-format
+msgid "bad immediate value for offset (%ld)"
+msgstr ""
+
+#: config/tc-arm.c:5477 config/tc-arm.c:5499
+msgid "invalid literal constant: pool needs to be closer"
+msgstr ""
+
+#: config/tc-arm.c:5479
+#, c-format
+msgid "bad immediate value for half-word offset (%ld)"
+msgstr ""
+
+#: config/tc-arm.c:5516
+msgid "shift expression is too large"
+msgstr ""
+
+#: config/tc-arm.c:5534 config/tc-arm.c:5543
+msgid "Invalid swi expression"
+msgstr ""
+
+#: config/tc-arm.c:5553
+msgid "Invalid expression in load/store multiple"
+msgstr ""
+
+#: config/tc-arm.c:5605
+msgid "gas can't handle same-section branch dest >= 0x04000000"
+msgstr ""
+
+#: config/tc-arm.c:5614
+msgid "out of range branch"
+msgstr ""
+
+#: config/tc-arm.c:5631 config/tc-arm.c:5647 config/tc-mips.c:9790
+msgid "Branch out of range"
+msgstr ""
+
+#: config/tc-arm.c:5669
+msgid "Branch with link out of range"
+msgstr ""
+
+#: config/tc-arm.c:5736
+msgid "Illegal value for co-processor offset"
+msgstr ""
+
+#: config/tc-arm.c:5759
+#, 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
+#, c-format
+msgid "Invalid offset, value too big (0x%08X)"
+msgstr ""
+
+#: config/tc-arm.c:5831
+msgid "Invalid immediate for stack address calculation"
+msgstr ""
+
+#: config/tc-arm.c:5840
+#, c-format
+msgid "Invalid immediate for address calculation (value = 0x%08lX)"
+msgstr ""
+
+#: config/tc-arm.c:5850
+msgid "Invalid 8bit immediate"
+msgstr ""
+
+#: config/tc-arm.c:5858
+msgid "Invalid 3bit immediate"
+msgstr ""
+
+#: config/tc-arm.c:5874
+#, c-format
+msgid "Invalid immediate: %ld is too large"
+msgstr ""
+
+#: config/tc-arm.c:5889
+#, c-format
+msgid "Illegal Thumb shift value: %ld"
+msgstr ""
+
+#: config/tc-arm.c:5903
+#, c-format
+msgid "Bad relocation fixup type (%d)"
+msgstr ""
+
+#: config/tc-arm.c:5973
+msgid "Literal referenced across section boundary (Implicit dump?)"
+msgstr ""
+
+#: config/tc-arm.c:5986
+#, c-format
+msgid "Internal_relocation (type %d) not fixed up (IMMEDIATE)"
+msgstr ""
+
+#: config/tc-arm.c:5992
+msgid "ADRL used for a symbol not defined in the same file"
+msgstr ""
+
+#: config/tc-arm.c:5998
+#, 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
+msgid "<unknown>"
+msgstr ""
+
+#: config/tc-arm.c:6021
+#, c-format
+msgid "Can not represent %s relocation in this object file format (%d)"
+msgstr ""
+
+#: config/tc-arm.c:6042 config/tc-mips.c:11281 config/tc-sh.c:2866
+#, 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
+#, c-format
+msgid "No operator -- statement `%s'\n"
+msgstr ""
+
+#: config/tc-arm.c:6153
+msgid "selected processor does not support this opcode"
+msgstr ""
+
+#: config/tc-arm.c:6197
+#, c-format
+msgid "Opcode `%s' must have suffix from list: <%s>"
+msgstr ""
+
+#: config/tc-arm.c:6227
+msgid "Warning: Use of the 'nv' conditional is deprecated\n"
+msgstr ""
+
+#: config/tc-arm.c:6244
+#, c-format
+msgid "Opcode `%s' is unconditional\n"
+msgstr ""
+
+#: config/tc-arm.c:6269
+#, c-format
+msgid "Opcode `%s' must have suffix from <%s>\n"
+msgstr ""
+
+#: config/tc-arm.c:6355
+#, c-format
+msgid "register '%s' does not exist\n"
+msgstr ""
+
+#: config/tc-arm.c:6360
+#, c-format
+msgid "ignoring redefinition of register alias '%s'"
+msgstr ""
+
+#: config/tc-arm.c:6366
+#, c-format
+msgid ""
+"ignoring redefinition of register alias '%s' to non-existant register '%s'"
+msgstr ""
+
+#: config/tc-arm.c:6370
+msgid "ignoring incomplete .req pseuso op"
+msgstr ""
+
+#: config/tc-arm.c:6550
+#, 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
+#, c-format
+msgid "Invalid architecture variant -m%s"
+msgstr ""
+
+#: config/tc-arm.c:6745
+#, c-format
+msgid "Invalid processor variant -m%s"
+msgstr ""
+
+#: config/tc-arm.c:6768
+msgid ""
+" ARM Specific Assembler Options:\n"
+" -m[arm][<processor name>] select processor variant\n"
+" -m[arm]v[2|2a|3|3m|4|4t|5[t][e]] select architecture variant\n"
+" -mthumb only allow Thumb instructions\n"
+" -mthumb-interwork mark the assembled code as supporting "
+"interworking\n"
+" -mall allow any instruction\n"
+" -mfpa10, -mfpa11 select floating point architecture\n"
+" -mfpe-old don't allow floating-point multiple "
+"instructions\n"
+" -mno-fpu don't allow any floating-point instructions.\n"
+" -k generate PIC code.\n"
+msgstr ""
+
+#: config/tc-arm.c:6780
+msgid ""
+" -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to "
+"use\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
+msgid " -moabi support the old ELF ABI\n"
+msgstr ""
+
+#: config/tc-arm.c:6790
+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
+#, c-format
+msgid "%s: unexpected function type: %d"
+msgstr ""
+
+#: config/tc-d10v.c:228
+msgid ""
+"D10V options:\n"
+"-O optimize. Will do some operations in parallel.\n"
+msgstr ""
+
+#: config/tc-d10v.c:547 config/tc-d10v.c:629 config/tc-d30v.c:652
+#, c-format
+msgid "operand out of range: %d"
+msgstr ""
+
+#: config/tc-d10v.c:690
+msgid "Instruction must be executed in parallel with another instruction."
+msgstr ""
+
+#: config/tc-d10v.c:742
+msgid "Instruction must be executed in parallel"
+msgstr ""
+
+#: config/tc-d10v.c:745
+msgid "Long instructions may not be combined."
+msgstr ""
+
+#: config/tc-d10v.c:785
+msgid "One of these instructions may not be executed in parallel."
+msgstr ""
+
+#: config/tc-d10v.c:790 config/tc-d30v.c:860
+msgid "Two IU instructions may not be executed in parallel"
+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"
+msgstr ""
+
+#: config/tc-d10v.c:798 config/tc-d30v.c:867
+msgid "Two MU instructions may not be executed in parallel"
+msgstr ""
+
+#: config/tc-d10v.c:819 config/tc-d30v.c:886
+msgid "IU instruction may not be in the left container"
+msgstr ""
+
+#: config/tc-d10v.c:832 config/tc-d30v.c:899
+msgid "MU instruction may not be in the right container"
+msgstr ""
+
+#: config/tc-d10v.c:836 config/tc-d30v.c:907
+msgid "unknown execution type passed to write_2_short()"
+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 "
+msgstr ""
+
+#: config/tc-d10v.c:1076 config/tc-d10v.c:1094 config/tc-d30v.c:1385
+msgid "Unable to mix instructions as specified"
+msgstr ""
+
+#: config/tc-d10v.c:1142 config/tc-d30v.c:1520
+#, c-format
+msgid "unknown opcode: %s"
+msgstr ""
+
+#: config/tc-d10v.c:1223 config/tc-d10v.c:1369 config/tc-tic80.c:537
+msgid "bad opcode or operands"
+msgstr ""
+
+#: config/tc-d10v.c:1272 config/tc-m68k.c:4232
+msgid "value out of range"
+msgstr ""
+
+#: config/tc-d10v.c:1344
+msgid "illegal operand - register name found where none expected"
+msgstr ""
+
+#: config/tc-d10v.c:1380 config/tc-tic80.c:548
+msgid "Register number must be EVEN"
+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
+#, c-format
+msgid "reloc %d not supported by object file format"
+msgstr ""
+
+#: config/tc-d10v.c:1525
+#, c-format
+msgid "line %d: rep or repi must include at least 4 instructions"
+msgstr ""
+
+#: config/tc-d10v.c:1544 config/tc-d30v.c:1953
+#, c-format
+msgid "line %d: unknown relocation type: 0x%x"
+msgstr ""
+
+#: config/tc-d30v.c:191
+#, c-format
+msgid "Register name %s conflicts with symbol of the same name"
+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"
+msgstr ""
+
+#: config/tc-d30v.c:463
+msgid "unexpected 12-bit reloc type"
+msgstr ""
+
+#: config/tc-d30v.c:470
+msgid "unexpected 18-bit reloc type"
+msgstr ""
+
+#: config/tc-d30v.c:714
+#, c-format
+msgid "%s NOP inserted"
+msgstr ""
+
+#: config/tc-d30v.c:715
+msgid "sequential"
+msgstr ""
+
+#: config/tc-d30v.c:715
+msgid "parallel"
+msgstr ""
+
+#: config/tc-d30v.c:856
+msgid "Instructions may not be executed in parallel"
+msgstr ""
+
+#: config/tc-d30v.c:869 config/tc-d30v.c:876 config/tc-d30v.c:892
+#: config/tc-d30v.c:901
+#, c-format
+msgid "Executing %s in IU may not work"
+msgstr ""
+
+#: config/tc-d30v.c:888
+#, c-format
+msgid "special left instruction `%s' kills instruction `%s' in right container"
+msgstr ""
+
+#: config/tc-d30v.c:1267 config/tc-d30v.c:1284
+msgid "Cannot assemble instruction"
+msgstr ""
+
+#: config/tc-d30v.c:1269
+msgid "First opcode is long. Unable to mix instructions as specified."
+msgstr ""
+
+#: config/tc-d30v.c:1337
+msgid "word of NOPs added between word multiply and load"
+msgstr ""
+
+#: config/tc-d30v.c:1339
+msgid "word of NOPs added between word multiply and 16-bit multiply"
+msgstr ""
+
+#: config/tc-d30v.c:1369
+msgid "Instruction uses long version, so it cannot be mixed as specified"
+msgstr ""
+
+#: config/tc-d30v.c:1453 config/tc-d30v.c:1490
+#, c-format
+msgid "unknown condition code: %s"
+msgstr ""
+
+#: config/tc-d30v.c:1483
+#, c-format
+msgid "cmpu doesn't support condition code %s"
+msgstr ""
+
+#: config/tc-d30v.c:1531
+#, c-format
+msgid "operands for opcode `%s' do not match any valid format"
+msgstr ""
+
+#: config/tc-d30v.c:1744
+msgid "Odd numbered register used as target of multi-register instruction"
+msgstr ""
+
+#: config/tc-d30v.c:1842
+#, c-format
+msgid "line %d: unable to place address of symbol '%s' into a byte"
+msgstr ""
+
+#: config/tc-d30v.c:1845
+#, c-format
+msgid "line %d: unable to place value %x into a byte"
+msgstr ""
+
+#: config/tc-d30v.c:1853
+#, c-format
+msgid "line %d: unable to place address of symbol '%s' into a short"
+msgstr ""
+
+#: config/tc-d30v.c:1856
+#, c-format
+msgid "line %d: unable to place value %x into a short"
+msgstr ""
+
+#: config/tc-d30v.c:1864
+#, c-format
+msgid "line %d: unable to place address of symbol '%s' into a quad"
+msgstr ""
+
+#: config/tc-d30v.c:2034
+#, c-format
+msgid "value too large to fit in %d bits"
+msgstr ""
+
+#: config/tc-d30v.c:2178
+#, c-format
+msgid "Alignment too large: %d assumed"
+msgstr ""
+
+#: config/tc-fr30.c:84
+msgid " FR30 specific command line options:\n"
+msgstr ""
+
+#: config/tc-fr30.c:143
+#, c-format
+msgid "Instruction %s not allowed in a delay slot."
+msgstr ""
+
+#: config/tc-fr30.c:380 config/tc-m32r.c:1537
+msgid "Addend to unresolved symbol not on word boundary."
+msgstr ""
+
+#: config/tc-fr30.c:538 config/tc-i960.c:786 config/tc-m32r.c:1844
+msgid "Bad call to md_atof()"
+msgstr ""
+
+#: config/tc-h8300.c:254 config/tc-h8300.c:262
+msgid "Reg not valid for H8/300"
+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"
+msgstr ""
+
+#: config/tc-h8300.c:490 config/tc-h8300.c:553 config/tc-h8300.c:560
+msgid "Wrong size pointer register for architecture."
+msgstr ""
+
+#: config/tc-h8300.c:518 config/tc-h8300.c:527 config/tc-h8300.c:537
+msgid "expected @(exp, reg16)"
+msgstr ""
+
+#: config/tc-h8300.c:617
+msgid "expect :8 or :16 here"
+msgstr ""
+
+#: config/tc-h8300.c:823
+#, c-format
+msgid "operand %s0x%lx out of range."
+msgstr ""
+
+#: config/tc-h8300.c:910
+msgid "Can't work out size of operand.\n"
+msgstr ""
+
+#: config/tc-h8300.c:964
+#, c-format
+msgid "Opcode `%s' with these operand types not available in H8/300 mode"
+msgstr ""
+
+#: config/tc-h8300.c:1016 config/tc-h8300.c:1036
+msgid "Need #1 or #2 here"
+msgstr ""
+
+#: config/tc-h8300.c:1031
+msgid "#4 not valid on H8/300."
+msgstr ""
+
+#: config/tc-h8300.c:1112 config/tc-h8300.c:1150
+#, c-format
+msgid "branch operand has odd offset (%lx)\n"
+msgstr ""
+
+#: config/tc-h8300.c:1191
+msgid "destination operand must be 16 bit register"
+msgstr ""
+
+#: config/tc-h8300.c:1201
+msgid "source operand must be 8 bit register"
+msgstr ""
+
+#: config/tc-h8300.c:1209
+msgid "destination operand must be 16bit absolute address"
+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"
+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"
+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"
+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"
+msgstr ""
+
+#: config/tc-h8300.c:1461 config/tc-z8k.c:1425
+msgid "call to md_convert_frag \n"
+msgstr ""
+
+#: config/tc-h8300.c:1506 config/tc-z8k.c:1500
+msgid "call tomd_estimate_size_before_relax \n"
+msgstr ""
+
+#: config/tc-h8500.c:337
+msgid ":24 not valid for this opcode"
+msgstr ""
+
+#: config/tc-h8500.c:344
+msgid "expect :8,:16 or :24"
+msgstr ""
+
+#: config/tc-h8500.c:401
+msgid "syntax error in reg list"
+msgstr ""
+
+#: config/tc-h8500.c:419
+msgid "missing final register in range"
+msgstr ""
+
+#: config/tc-h8500.c:506 config/tc-h8500.c:513 config/tc-h8500.c:519
+msgid "expected @(exp, Rn)"
+msgstr ""
+
+#: config/tc-h8500.c:535
+msgid "@Rn+ needs word register"
+msgstr ""
+
+#: config/tc-h8500.c:545
+msgid "@Rn needs word register"
+msgstr ""
+
+#: config/tc-h8500.c:845 config/tc-sh.c:1149
+#, c-format
+msgid "unhandled %d\n"
+msgstr ""
+
+#: config/tc-h8500.c:873 config/tc-sh.c:1173
+#, c-format
+msgid "operand must be absolute in range %d..%d"
+msgstr ""
+
+#: config/tc-h8500.c:963 config/tc-sh.c:1299
+#, 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"
+msgstr ""
+
+#: config/tc-hppa.c:1140
+msgid "Missing .exit\n"
+msgstr ""
+
+#: config/tc-hppa.c:1143
+msgid "Missing .procend\n"
+msgstr ""
+
+#: config/tc-hppa.c:1322
+msgid "Invalid field selector. Assuming F%%."
+msgstr ""
+
+#: config/tc-hppa.c:1353
+msgid "-R option not supported on this target."
+msgstr ""
+
+#: config/tc-hppa.c:1369 config/tc-sparc.c:746 config/tc-sparc.c:781
+#, c-format
+msgid "Internal error: can't hash `%s': %s\n"
+msgstr ""
+
+#: config/tc-hppa.c:1377 config/tc-i860.c:191
+#, 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"
+msgstr ""
+
+#: config/tc-hppa.c:1570 config/tc-hppa.c:4715
+msgid "could not update architecture and machine"
+msgstr ""
+
+#: config/tc-hppa.c:1783
+msgid "Invalid Indexed Load Completer."
+msgstr ""
+
+#: config/tc-hppa.c:1788
+msgid "Invalid Indexed Load Completer Syntax."
+msgstr ""
+
+#: config/tc-hppa.c:1824
+msgid "Invalid Short Load/Store Completer."
+msgstr ""
+
+#: config/tc-hppa.c:1883 config/tc-hppa.c:1888
+msgid "Invalid Store Bytes Short Completer"
+msgstr ""
+
+#: config/tc-hppa.c:2199 config/tc-hppa.c:2205
+msgid "Invalid left/right combination completer"
+msgstr ""
+
+#: config/tc-hppa.c:2254 config/tc-hppa.c:2261
+msgid "Invalid permutation completer"
+msgstr ""
+
+#: config/tc-hppa.c:2362
+#, c-format
+msgid "Invalid Add Condition: %s"
+msgstr ""
+
+#: config/tc-hppa.c:2373 config/tc-hppa.c:2383
+#, c-format
+msgid "Invalid Add and Branch Condition: %c"
+msgstr ""
+
+#: config/tc-hppa.c:2404
+msgid "Invalid Compare/Subtract Condition"
+msgstr ""
+
+#: config/tc-hppa.c:2444
+#, c-format
+msgid "Invalid Bit Branch Condition: %c"
+msgstr ""
+
+#: config/tc-hppa.c:2530
+#, c-format
+msgid "Invalid Compare/Subtract Condition: %s"
+msgstr ""
+
+#: config/tc-hppa.c:2542
+#, c-format
+msgid "Invalid Compare/Subtract Condition: %c"
+msgstr ""
+
+#: config/tc-hppa.c:2557
+msgid "Invalid Compare and Branch Condition."
+msgstr ""
+
+#: config/tc-hppa.c:2655
+msgid "Invalid Logical Instruction Condition."
+msgstr ""
+
+#: config/tc-hppa.c:2711
+msgid "Invalid Shift/Extract/Deposit Condition."
+msgstr ""
+
+#: config/tc-hppa.c:2823
+msgid "Invalid Unit Instruction Condition."
+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"
+msgstr ""
+
+#: config/tc-hppa.c:3389
+msgid "Invalid SFU identifier"
+msgstr ""
+
+#: config/tc-hppa.c:3439
+msgid "Invalid COPR identifier"
+msgstr ""
+
+#: config/tc-hppa.c:3568
+msgid "Invalid Floating Point Operand 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"
+msgstr ""
+
+#: config/tc-hppa.c:3848
+#, c-format
+msgid "Invalid operands %s"
+msgstr ""
+
+#: config/tc-hppa.c:4415
+msgid "Unknown relocation encountered in md_apply_fix."
+msgstr ""
+
+#: config/tc-hppa.c:4425
+#, c-format
+msgid "no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n"
+msgstr ""
+
+#: config/tc-hppa.c:4567 config/tc-hppa.c:4592
+#, c-format
+msgid "Undefined register: '%s'."
+msgstr ""
+
+#: config/tc-hppa.c:4630
+#, c-format
+msgid "Non-absolute symbol: '%s'."
+msgstr ""
+
+#: config/tc-hppa.c:4645
+#, c-format
+msgid "Undefined absolute constant: '%s'."
+msgstr ""
+
+#: config/tc-hppa.c:4754
+#, c-format
+msgid "Invalid FP Compare Condition: %s"
+msgstr ""
+
+#: config/tc-hppa.c:4810
+#, c-format
+msgid "Invalid FTEST completer: %s"
+msgstr ""
+
+#: config/tc-hppa.c:4877 config/tc-hppa.c:4915
+#, c-format
+msgid "Invalid FP Operand Format: %3s"
+msgstr ""
+
+#: config/tc-hppa.c:4994
+msgid "Bad segment in expression."
+msgstr ""
+
+#: config/tc-hppa.c:5053
+msgid "Bad segment (should be absolute)."
+msgstr ""
+
+#: config/tc-hppa.c:5152
+#, c-format
+msgid "Invalid argument location: %s\n"
+msgstr ""
+
+#: config/tc-hppa.c:5183
+#, c-format
+msgid "Invalid argument description: %d"
+msgstr ""
+
+#: config/tc-hppa.c:5206
+#, c-format
+msgid "Invalid Nullification: (%c)"
+msgstr ""
+
+#: config/tc-hppa.c:5950
+#, c-format
+msgid "Invalid .CALL argument: %s"
+msgstr ""
+
+#: config/tc-hppa.c:6082
+msgid ".callinfo is not within a procedure definition"
+msgstr ""
+
+#: config/tc-hppa.c:6102
+#, c-format
+msgid "FRAME parameter must be a multiple of 8: %d\n"
+msgstr ""
+
+#: config/tc-hppa.c:6121
+msgid "Value for ENTRY_GR must be in the range 3..18\n"
+msgstr ""
+
+#: config/tc-hppa.c:6133
+msgid "Value for ENTRY_FR must be in the range 12..21\n"
+msgstr ""
+
+#: config/tc-hppa.c:6143
+msgid "Value for ENTRY_SR must be 3\n"
+msgstr ""
+
+#: config/tc-hppa.c:6199
+#, c-format
+msgid "Invalid .CALLINFO argument: %s"
+msgstr ""
+
+#: config/tc-hppa.c:6293
+msgid "The .ENTER pseudo-op is not supported"
+msgstr ""
+
+#: config/tc-hppa.c:6309
+msgid "Misplaced .entry. Ignored."
+msgstr ""
+
+#: config/tc-hppa.c:6313
+msgid "Missing .callinfo."
+msgstr ""
+
+#: config/tc-hppa.c:6361
+msgid ".REG must use a label"
+msgstr ""
+
+#: config/tc-hppa.c:6363
+msgid ".EQU must use a label"
+msgstr ""
+
+#: config/tc-hppa.c:6416
+msgid ".EXIT must appear within a procedure"
+msgstr ""
+
+#: config/tc-hppa.c:6420
+msgid "Missing .callinfo"
+msgstr ""
+
+#: config/tc-hppa.c:6424
+msgid "No .ENTRY for this .EXIT"
+msgstr ""
+
+#: config/tc-hppa.c:6451
+#, c-format
+msgid "Cannot define export symbol: %s\n"
+msgstr ""
+
+#: config/tc-hppa.c:6504
+#, c-format
+msgid "Using ENTRY rather than CODE in export directive for %s"
+msgstr ""
+
+#: config/tc-hppa.c:6613
+#, c-format
+msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s"
+msgstr ""
+
+#: config/tc-hppa.c:6695
+msgid "Missing label name on .LABEL"
+msgstr ""
+
+#: config/tc-hppa.c:6700
+msgid "extra .LABEL arguments ignored."
+msgstr ""
+
+#: config/tc-hppa.c:6717
+msgid "The .LEAVE pseudo-op is not supported"
+msgstr ""
+
+#: config/tc-hppa.c:6756
+msgid "Unrecognized .LEVEL argument\n"
+msgstr ""
+
+#: config/tc-hppa.c:6792
+#, c-format
+msgid "Cannot define static symbol: %s\n"
+msgstr ""
+
+#: config/tc-hppa.c:6827
+msgid "Nested procedures"
+msgstr ""
+
+#: config/tc-hppa.c:6837
+msgid "Cannot allocate unwind descriptor\n"
+msgstr ""
+
+#: config/tc-hppa.c:6935
+msgid "misplaced .procend"
+msgstr ""
+
+#: config/tc-hppa.c:6938
+msgid "Missing .callinfo for this procedure"
+msgstr ""
+
+#: config/tc-hppa.c:6941
+msgid "Missing .EXIT for a .ENTRY"
+msgstr ""
+
+#: config/tc-hppa.c:6980
+msgid "Not in a space.\n"
+msgstr ""
+
+#: config/tc-hppa.c:6983
+msgid "Not in a subspace.\n"
+msgstr ""
+
+#: config/tc-hppa.c:7073
+msgid "Invalid .SPACE argument"
+msgstr ""
+
+#: config/tc-hppa.c:7121
+msgid "Can't change spaces within a procedure definition. Ignored"
+msgstr ""
+
+#: config/tc-hppa.c:7248
+#, c-format
+msgid "Undefined space: '%s' Assuming space number = 0."
+msgstr ""
+
+#: config/tc-hppa.c:7272
+msgid "Must be in a space before changing or declaring subspaces.\n"
+msgstr ""
+
+#: config/tc-hppa.c:7276
+msgid "Can't change subspaces within a procedure definition. Ignored"
+msgstr ""
+
+#: config/tc-hppa.c:7311
+msgid "Parameters of an existing subspace can't be modified"
+msgstr ""
+
+#: config/tc-hppa.c:7362
+msgid "Alignment must be a power of 2"
+msgstr ""
+
+#: config/tc-hppa.c:7404
+msgid "FIRST not supported as a .SUBSPACE argument"
+msgstr ""
+
+#: config/tc-hppa.c:7406
+msgid "Invalid .SUBSPACE argument"
+msgstr ""
+
+#: config/tc-hppa.c:7589
+#, c-format
+msgid "Internal error: Unable to find containing space for %s."
+msgstr ""
+
+#: config/tc-hppa.c:7630
+#, c-format
+msgid "Out of memory: could not allocate new space chain entry: %s\n"
+msgstr ""
+
+#: config/tc-hppa.c:7716
+#, c-format
+msgid "Out of memory: could not allocate new subspace chain entry: %s\n"
+msgstr ""
+
+#: config/tc-hppa.c:8383
+#, c-format
+msgid "Symbol '%s' could not be created."
+msgstr ""
+
+#: config/tc-hppa.c:8387
+msgid "No memory for symbol name."
+msgstr ""
+
+#: config/tc-i386.c:509
+msgid "same type of prefix used twice"
+msgstr ""
+
+#: config/tc-i386.c:552
+msgid "bad argument to syntax directive."
+msgstr ""
+
+#: config/tc-i386.c:636 config/tc-m68k.c:3750
+#, c-format
+msgid "Internal Error: Can't hash %s: %s"
+msgstr ""
+
+#: config/tc-i386.c:866
+msgid "Unknown"
+msgstr ""
+
+#: config/tc-i386.c:914 config/tc-i386.c:4407
+#, c-format
+msgid "can not do %d byte pc-relative relocation"
+msgstr ""
+
+#: config/tc-i386.c:924 config/tc-i386.c:4421
+#, c-format
+msgid "can not do %d byte relocation"
+msgstr ""
+
+#: config/tc-i386.c:1030 config/tc-i386.c:1113
+#, c-format
+msgid "no such 386 instruction: `%s'"
+msgstr ""
+
+#: config/tc-i386.c:1039
+#, c-format
+msgid "invalid character %s in mnemonic"
+msgstr ""
+
+#: config/tc-i386.c:1046
+msgid "expecting prefix; got nothing"
+msgstr ""
+
+#: config/tc-i386.c:1048
+msgid "expecting mnemonic; got nothing"
+msgstr ""
+
+#: config/tc-i386.c:1066
+#, c-format
+msgid "redundant %s prefix"
+msgstr ""
+
+#: config/tc-i386.c:1122
+#, c-format
+msgid "expecting string instruction after `%s'"
+msgstr ""
+
+#: config/tc-i386.c:1145
+#, c-format
+msgid "invalid character %s before operand %d"
+msgstr ""
+
+#: config/tc-i386.c:1159
+#, c-format
+msgid "unbalanced parenthesis in operand %d."
+msgstr ""
+
+#: config/tc-i386.c:1162
+#, c-format
+msgid "unbalanced brackets in operand %d."
+msgstr ""
+
+#: config/tc-i386.c:1171
+#, c-format
+msgid "invalid character %s in operand %d"
+msgstr ""
+
+#: config/tc-i386.c:1198
+#, c-format
+msgid "spurious operands; (%d operands/instruction max)"
+msgstr ""
+
+#: config/tc-i386.c:1219
+msgid "expecting operand after ','; got nothing"
+msgstr ""
+
+#: config/tc-i386.c:1224
+msgid "expecting operand before ','; got nothing"
+msgstr ""
+
+#. we found no match
+#: config/tc-i386.c:1464
+#, c-format
+msgid "suffix or operands invalid for `%s'"
+msgstr ""
+
+#: config/tc-i386.c:1472
+#, c-format
+msgid "indirect %s without `*'"
+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
+#, c-format
+msgid "stand-alone `%s' prefix"
+msgstr ""
+
+#: config/tc-i386.c:1514 config/tc-i386.c:1529
+msgid "`%s' operand %d must use `%%es' segment"
+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"
+msgstr ""
+
+#: config/tc-i386.c:1609 config/tc-i386.c:1626 config/tc-i386.c:1653
+msgid "`%%%s' not allowed with `%s%c'"
+msgstr ""
+
+#: config/tc-i386.c:1697 config/tc-i386.c:1717
+msgid "no instruction mnemonic suffix given; can't determine immediate size"
+msgstr ""
+
+#: config/tc-i386.c:1742
+msgid ""
+"no instruction mnemonic suffix given and no register operands; can't size "
+"instruction"
+msgstr ""
+
+#. reversed arguments on faddp, fsubp, etc.
+#: config/tc-i386.c:1844
+msgid "translating to `%s %%%s,%%%s'"
+msgstr ""
+
+#. extraneous `l' suffix on fp insn
+#: config/tc-i386.c:1851
+msgid "translating to `%s %%%s'"
+msgstr ""
+
+#: config/tc-i386.c:2066
+msgid "you can't `pop %%cs'"
+msgstr ""
+
+#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc.
+#: config/tc-i386.c:2097
+#, c-format
+msgid "translating to `%sp'"
+msgstr ""
+
+#: config/tc-i386.c:2146 config/tc-i386.c:2208 config/tc-i386.c:2250
+msgid "skipping prefixes on this instruction"
+msgstr ""
+
+#: config/tc-i386.c:2265
+msgid "16-bit jump out of range"
+msgstr ""
+
+#: config/tc-i386.c:2274
+#, c-format
+msgid "can't handle non absolute segment in `%s'"
+msgstr ""
+
+#: config/tc-i386.c:2382 config/tc-i386.c:2432
+#, c-format
+msgid "%ld shortened to %ld"
+msgstr ""
+
+#: config/tc-i386.c:2502
+msgid "only 1 or 2 immediate operands are allowed"
+msgstr ""
+
+#: config/tc-i386.c:2534 config/tc-i386.c:2755
+msgid "GOT relocations not supported in 16 bit mode"
+msgstr ""
+
+#: config/tc-i386.c:2555 config/tc-i386.c:2776
+msgid "bad reloc specifier in expression"
+msgstr ""
+
+#: config/tc-i386.c:2573 config/tc-i386.c:2810
+#, c-format
+msgid "ignoring junk `%s' after expression"
+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"
+msgstr ""
+
+#: config/tc-i386.c:2607 config/tc-i386.c:2853
+#, c-format
+msgid "unimplemented segment %s in operand"
+msgstr ""
+
+#: config/tc-i386.c:2609 config/tc-i386.c:2855
+#, c-format
+msgid "unimplemented segment type %d in operand"
+msgstr ""
+
+#: config/tc-i386.c:2653
+#, c-format
+msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'"
+msgstr ""
+
+#: config/tc-i386.c:2659
+#, c-format
+msgid "scale factor of %d without an index register"
+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"
+msgstr ""
+
+#: config/tc-i386.c:3035 config/tc-i386.c:3041 config/tc-i386.c:3050
+#, c-format
+msgid "bad segment name `%s'"
+msgstr ""
+
+#: config/tc-i386.c:3108
+#, c-format
+msgid "`%s' is not a valid base/index expression"
+msgstr ""
+
+#: config/tc-i386.c:3112
+#, c-format
+msgid "`%s' is not a valid %s bit base/index expression"
+msgstr ""
+
+#: config/tc-i386.c:3133 config/tc-i386.c:3487
+#, c-format
+msgid "too many memory references for `%s'"
+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'"
+msgstr ""
+
+#: config/tc-i386.c:3433
+#, c-format
+msgid "bad memory operand `%s'"
+msgstr ""
+
+#: config/tc-i386.c:3448
+#, c-format
+msgid "junk `%s' after register"
+msgstr ""
+
+#: config/tc-i386.c:3465
+msgid "immediate operand illegal with absolute jump"
+msgstr ""
+
+#: config/tc-i386.c:3565
+#, c-format
+msgid "expecting `,' or `)' after index register in `%s'"
+msgstr ""
+
+#: config/tc-i386.c:3587
+#, c-format
+msgid "expecting `)' after scale factor in `%s'"
+msgstr ""
+
+#: config/tc-i386.c:3594
+#, c-format
+msgid "expecting index register or scale factor after `,'; got '%c'"
+msgstr ""
+
+#: config/tc-i386.c:3601
+#, c-format
+msgid "expecting `,' or `)' after base register in `%s'"
+msgstr ""
+
+#. it's not a memory operand; argh!
+#: config/tc-i386.c:3641
+#, c-format
+msgid "invalid char %s beginning operand %d `%s'"
+msgstr ""
+
+#: config/tc-i386.c:4099
+msgid "Bad call to md_atof ()"
+msgstr ""
+
+#: config/tc-i386.c:4250
+msgid " -m\t\t\t do long jump\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"
+msgstr ""
+
+#: config/tc-i386.c:4307
+msgid "GOT already in symbol table"
+msgstr ""
+
+#: config/tc-i386.c:4456
+#, c-format
+msgid "cannot represent relocation type %s"
+msgstr ""
+
+#: config/tc-i860.c:157 config/tc-i860.c:161
+msgid "Unknown temporary pseudo register"
+msgstr ""
+
+#: config/tc-i860.c:183 config/tc-mips.c:1059
+#, c-format
+msgid "internal error: can't hash `%s': %s\n"
+msgstr ""
+
+#: config/tc-i860.c:341
+#, c-format
+msgid "Expanded opcode after delayed branch: `%s'"
+msgstr ""
+
+#: config/tc-i860.c:343
+#, c-format
+msgid "Expanded opcode in dual mode: `%s'"
+msgstr ""
+
+#: config/tc-i860.c:580
+msgid "Fsr1 equals fdest with Pipelining"
+msgstr ""
+
+#: config/tc-i860.c:631
+msgid "5-bit immediate too large"
+msgstr ""
+
+#: config/tc-i860.c:725
+msgid "Illegal operands"
+msgstr ""
+
+#: config/tc-i860.c:749 config/tc-sparc.c:2644
+msgid "bad segment"
+msgstr ""
+
+#: config/tc-i860.c:878
+#, c-format
+msgid "26-bit branch w/o pc relative set: 0x%08x"
+msgstr ""
+
+#. align pcrel offset, see manual
+#. check for overflow
+#: config/tc-i860.c:882
+#, c-format
+msgid "26-bit branch offset overflow: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:891 config/tc-i860.c:922
+#, c-format
+msgid "16-bit immediate 4-byte alignment error: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:896 config/tc-i860.c:927
+#, c-format
+msgid "16-bit immediate 2-byte alignment error: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:904
+#, c-format
+msgid "16-bit branch offset overflow: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:912
+#, c-format
+msgid "16-bit immediate 16-byte alignment error: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:917
+#, c-format
+msgid "16-bit immediate 8-byte alignment error: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:933
+#, c-format
+msgid "16-bit immediate overflow: 0x%08x"
+msgstr ""
+
+#: config/tc-i860.c:951
+msgid "md_number_to_disp\n"
+msgstr ""
+
+#: config/tc-i860.c:961
+msgid "i860_number_to_field\n"
+msgstr ""
+
+#: config/tc-i860.c:1001
+msgid "i860_convert_frag\n"
+msgstr ""
+
+#: config/tc-i860.c:1010
+msgid "i860_estimate_size_before_relax\n"
+msgstr ""
+
+#: config/tc-i960.c:559
+#, c-format
+msgid "Hashing returned \"%s\"."
+msgstr ""
+
+#. Offset of last character in opcode mnemonic
+#: config/tc-i960.c:593
+msgid "branch prediction invalid on this opcode"
+msgstr ""
+
+#: config/tc-i960.c:636
+#, c-format
+msgid "invalid opcode, \"%s\"."
+msgstr ""
+
+#: config/tc-i960.c:641
+#, c-format
+msgid "improper number of operands. expecting %d, got %d"
+msgstr ""
+
+#: config/tc-i960.c:876
+#, c-format
+msgid "Fixup of %ld too large for field width of %d"
+msgstr ""
+
+#: config/tc-i960.c:994
+#, c-format
+msgid "invalid architecture %s"
+msgstr ""
+
+#: config/tc-i960.c:1014
+msgid "I960 options:\n"
+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"
+msgstr ""
+
+#: config/tc-i960.c:1425
+msgid "too many operands"
+msgstr ""
+
+#: config/tc-i960.c:1485 config/tc-i960.c:1715
+msgid "expression syntax error"
+msgstr ""
+
+#: config/tc-i960.c:1523
+msgid "attempt to branch into different segment"
+msgstr ""
+
+#: config/tc-i960.c:1527
+#, c-format
+msgid "target of %s instruction must be a label"
+msgstr ""
+
+#: config/tc-i960.c:1567
+msgid "unmatched '['"
+msgstr ""
+
+#: config/tc-i960.c:1578
+msgid "garbage after index spec ignored"
+msgstr ""
+
+#. We never moved: there was no opcode either!
+#: config/tc-i960.c:1645
+msgid "missing opcode"
+msgstr ""
+
+#: config/tc-i960.c:1953
+msgid "invalid constant"
+msgstr ""
+
+#: config/tc-i960.c:2066
+msgid "invalid index register"
+msgstr ""
+
+#: config/tc-i960.c:2089
+msgid "invalid scale factor"
+msgstr ""
+
+#: config/tc-i960.c:2272
+msgid "unaligned register"
+msgstr ""
+
+#: config/tc-i960.c:2295
+msgid "no such sfr in this architecture"
+msgstr ""
+
+#: config/tc-i960.c:2333
+msgid "illegal literal"
+msgstr ""
+
+#. Should not happen: see block comment above
+#: config/tc-i960.c:2566
+#, c-format
+msgid "Trying to 'bal' to %s"
+msgstr ""
+
+#: config/tc-i960.c:2577
+msgid "Looks like a proc, but can't tell what kind.\n"
+msgstr ""
+
+#: config/tc-i960.c:2609
+msgid "should have 1 or 2 operands"
+msgstr ""
+
+#: config/tc-i960.c:2618 config/tc-i960.c:2637
+#, c-format
+msgid "Redefining leafproc %s"
+msgstr ""
+
+#: config/tc-i960.c:2669
+msgid "should have two operands"
+msgstr ""
+
+#: config/tc-i960.c:2679
+msgid "'entry_num' must be absolute number in [0,31]"
+msgstr ""
+
+#: config/tc-i960.c:2688
+#, c-format
+msgid "Redefining entrynum for sysproc %s"
+msgstr ""
+
+#: config/tc-i960.c:2799
+msgid "architecture of opcode conflicts with that of earlier instruction(s)"
+msgstr ""
+
+#: config/tc-i960.c:2820
+msgid "big endian mode is not supported"
+msgstr ""
+
+#: config/tc-i960.c:2822
+#, c-format
+msgid "ignoring unrecognized .endian type `%s'"
+msgstr ""
+
+#: config/tc-i960.c:3104
+#, c-format
+msgid "leafproc symbol '%s' undefined"
+msgstr ""
+
+#: config/tc-i960.c:3114
+#, c-format
+msgid "Warning: making leafproc entries %s and %s both global\n"
+msgstr ""
+
+#: config/tc-i960.c:3223
+msgid "option --link-relax is only supported in b.out format"
+msgstr ""
+
+#: config/tc-i960.c:3266
+msgid "callj to difference of two symbols"
+msgstr ""
+
+#. Pretend that we do not recognise this option.
+#: config/tc-m32r.c:223
+msgid "Unrecognised option: -hidden"
+msgstr ""
+
+#: config/tc-m32r.c:256
+msgid " M32R specific command line options:\n"
+msgstr ""
+
+#: config/tc-m32r.c:258
+msgid ""
+" -m32r disable support for the m32rx instruction set\n"
+msgstr ""
+
+#: config/tc-m32r.c:260
+msgid " -m32rx support the extended m32rx instruction set\n"
+msgstr ""
+
+#: config/tc-m32r.c:262
+msgid " -O try to combine instructions in parallel\n"
+msgstr ""
+
+#: config/tc-m32r.c:265
+msgid ""
+" -warn-explicit-parallel-conflicts warn when parallel instructions\n"
+msgstr ""
+
+#: config/tc-m32r.c:267
+msgid " violate contraints\n"
+msgstr ""
+
+#: config/tc-m32r.c:269
+msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n"
+msgstr ""
+
+#: config/tc-m32r.c:271
+msgid ""
+" instructions violate contraints\n"
+msgstr ""
+
+#: config/tc-m32r.c:273
+msgid ""
+" -Wp synonym for -warn-explicit-parallel-conflicts\n"
+msgstr ""
+
+#: config/tc-m32r.c:275
+msgid ""
+" -Wnp synonym for -no-warn-explicit-parallel-conflicts\n"
+msgstr ""
+
+#: config/tc-m32r.c:278
+msgid ""
+" -warn-unmatched-high warn when an (s)high reloc has no matching low "
+"reloc\n"
+msgstr ""
+
+#: config/tc-m32r.c:280
+msgid " -no-warn-unmatched-high do not warn about missing low relocs\n"
+msgstr ""
+
+#: config/tc-m32r.c:282
+msgid " -Wuh synonym for -warn-unmatched-high\n"
+msgstr ""
+
+#: config/tc-m32r.c:284
+msgid " -Wnuh synonym for -no-warn-unmatched-high\n"
+msgstr ""
+
+#: config/tc-m32r.c:288
+msgid " -relax create linker relaxable code\n"
+msgstr ""
+
+#: config/tc-m32r.c:290
+msgid " -cpu-desc provide runtime cpu description file\n"
+msgstr ""
+
+#: config/tc-m32r.c:685
+msgid "Instructions write to the same destination register."
+msgstr ""
+
+#: config/tc-m32r.c:693
+msgid "Instructions do not use parallel execution pipelines."
+msgstr ""
+
+#: config/tc-m32r.c:700
+msgid "Instructions share the same execution pipeline"
+msgstr ""
+
+#: config/tc-m32r.c:769 config/tc-m32r.c:855
+#, c-format
+msgid "not a 16 bit instruction '%s'"
+msgstr ""
+
+#: config/tc-m32r.c:776 config/tc-m32r.c:862 config/tc-m32r.c:1017
+#, c-format
+msgid "unknown instruction '%s'"
+msgstr ""
+
+#: config/tc-m32r.c:784 config/tc-m32r.c:869 config/tc-m32r.c:1024
+#, c-format
+msgid "instruction '%s' is for the M32RX only"
+msgstr ""
+
+#: config/tc-m32r.c:792 config/tc-m32r.c:877
+#, c-format
+msgid "instruction '%s' cannot be executed in parallel."
+msgstr ""
+
+#: config/tc-m32r.c:839 config/tc-m32r.c:902 config/tc-m32r.c:1074
+msgid "internal error: lookup/get operands failed"
+msgstr ""
+
+#: config/tc-m32r.c:887
+#, c-format
+msgid "'%s': only the NOP instruction can be issued in parallel on the m32r"
+msgstr ""
+
+#: config/tc-m32r.c:916
+#, c-format
+msgid ""
+"%s: output of 1st instruction is the same as an input to 2nd instruction - "
+"is this intentional ?"
+msgstr ""
+
+#: config/tc-m32r.c:920
+#, c-format
+msgid ""
+"%s: output of 2nd instruction is the same as an input to 1st instruction - "
+"is this intentional ?"
+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."
+msgstr ""
+
+#: config/tc-m32r.c:1244
+#, c-format
+msgid ".SCOMMon length (%ld.) <0! Ignored."
+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"
+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'."
+msgstr ""
+
+#: config/tc-m32r.c:1293
+#, c-format
+msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld."
+msgstr ""
+
+#: config/tc-m32r.c:1766
+msgid "Unmatched high/shigh reloc"
+msgstr ""
+
+#: config/tc-m68k.c:646
+msgid "Unknown PC relative instruction"
+msgstr ""
+
+#: config/tc-m68k.c:772
+#, c-format
+msgid "Can not do %d byte pc-relative relocation"
+msgstr ""
+
+#: config/tc-m68k.c:774
+#, c-format
+msgid "Can not do %d byte pc-relative pic relocation"
+msgstr ""
+
+#: config/tc-m68k.c:779
+#, c-format
+msgid "Can not do %d byte relocation"
+msgstr ""
+
+#: config/tc-m68k.c:781
+#, c-format
+msgid "Can not do %d byte pic relocation"
+msgstr ""
+
+#: config/tc-m68k.c:885 config/tc-mips.c:11262
+#, c-format
+msgid "Cannot make %s relocation PC relative"
+msgstr ""
+
+#: config/tc-m68k.c:998 config/tc-tahoe.c:1505 config/tc-vax.c:1774
+msgid "No operator"
+msgstr ""
+
+#: config/tc-m68k.c:1028 config/tc-tahoe.c:1522 config/tc-vax.c:1791
+msgid "Unknown operator"
+msgstr ""
+
+#: config/tc-m68k.c:1803
+msgid "invalid instruction for this architecture; needs "
+msgstr ""
+
+#: config/tc-m68k.c:1808
+msgid "fpu (68040, 68060 or 68881/68882)"
+msgstr ""
+
+#: config/tc-m68k.c:1811
+msgid "mmu (68030 or 68851)"
+msgstr ""
+
+#: config/tc-m68k.c:1814
+msgid "68020 or higher"
+msgstr ""
+
+#: config/tc-m68k.c:1817
+msgid "68000 or higher"
+msgstr ""
+
+#: config/tc-m68k.c:1820
+msgid "68010 or higher"
+msgstr ""
+
+#: config/tc-m68k.c:1848
+msgid "operands mismatch"
+msgstr ""
+
+#: config/tc-m68k.c:1905 config/tc-m68k.c:1911 config/tc-m68k.c:1917
+msgid "operand out of range"
+msgstr ""
+
+#: config/tc-m68k.c:1974
+#, c-format
+msgid "Bignum too big for %c format; truncated"
+msgstr ""
+
+#: config/tc-m68k.c:2042
+msgid "displacement too large for this architecture; needs 68020 or higher"
+msgstr ""
+
+#: config/tc-m68k.c:2152
+msgid ""
+"scale factor invalid on this architecture; needs cpu32 or 68020 or higher"
+msgstr ""
+
+#: config/tc-m68k.c:2157
+msgid "invalid index size for coldfire"
+msgstr ""
+
+#: config/tc-m68k.c:2210
+msgid "Forcing byte displacement"
+msgstr ""
+
+#: config/tc-m68k.c:2212
+msgid "byte displacement out of range"
+msgstr ""
+
+#: config/tc-m68k.c:2259 config/tc-m68k.c:2297
+msgid "invalid operand mode for this architecture; needs 68020 or higher"
+msgstr ""
+
+#: config/tc-m68k.c:2283 config/tc-m68k.c:2317
+msgid ":b not permitted; defaulting to :w"
+msgstr ""
+
+#: config/tc-m68k.c:2399
+msgid "unsupported byte value; use a different suffix"
+msgstr ""
+
+#: config/tc-m68k.c:2413
+msgid "unknown/incorrect operand"
+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"
+msgstr ""
+
+#: config/tc-m68k.c:2518
+msgid "Can't use long branches on 68000/68010/5200"
+msgstr ""
+
+#: config/tc-m68k.c:2606
+msgid "Expression out of range, using 0"
+msgstr ""
+
+#: config/tc-m68k.c:2718 config/tc-m68k.c:2734
+msgid "Floating point register in register list"
+msgstr ""
+
+#: config/tc-m68k.c:2724
+msgid "Wrong register in floating-point reglist"
+msgstr ""
+
+#: config/tc-m68k.c:2740
+msgid "incorrect register in reglist"
+msgstr ""
+
+#: config/tc-m68k.c:2746
+msgid "wrong register in floating-point reglist"
+msgstr ""
+
+#: config/tc-m68k.c:2822
+msgid "failed sanity check"
+msgstr ""
+
+#. ERROR
+#: config/tc-m68k.c:3187
+msgid "Extra )"
+msgstr ""
+
+#. ERROR
+#: config/tc-m68k.c:3198
+msgid "Missing )"
+msgstr ""
+
+#: config/tc-m68k.c:3215
+msgid "Missing operand"
+msgstr ""
+
+#: config/tc-m68k.c:3547
+#, c-format
+msgid "%s -- statement `%s' ignored"
+msgstr ""
+
+#: config/tc-m68k.c:3591
+#, c-format
+msgid "Don't know how to figure width of %c in md_assemble()"
+msgstr ""
+
+#: config/tc-m68k.c:3759 config/tc-m68k.c:3795
+#, c-format
+msgid "Internal Error: Can't find %s in hash table"
+msgstr ""
+
+#: config/tc-m68k.c:3762 config/tc-m68k.c:3798
+#, c-format
+msgid "Internal Error: Can't hash %s: %s"
+msgstr ""
+
+#: config/tc-m68k.c:3926
+#, c-format
+msgid "unrecognized default cpu `%s' ???"
+msgstr ""
+
+#: config/tc-m68k.c:3938
+msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly"
+msgstr ""
+
+#: config/tc-m68k.c:3958
+msgid "options for 68881 and no-68881 both given"
+msgstr ""
+
+#: config/tc-m68k.c:3960
+msgid "options for 68851 and no-68851 both given"
+msgstr ""
+
+#: config/tc-m68k.c:4031
+#, c-format
+msgid "text label `%s' aligned to odd boundary"
+msgstr ""
+
+#: config/tc-m68k.c:4248
+msgid "invalid byte branch offset"
+msgstr ""
+
+#: config/tc-m68k.c:4305
+msgid "short branch with zero offset: use :w"
+msgstr ""
+
+#: config/tc-m68k.c:4351
+msgid "Long branch offset not supported."
+msgstr ""
+
+#: config/tc-m68k.c:4412
+#, c-format
+msgid "Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx"
+msgstr ""
+
+#: config/tc-m68k.c:4443
+msgid "displacement doesn't fit in one byte"
+msgstr ""
+
+#: config/tc-m68k.c:4556
+msgid "Long branch offset to extern symbol not supported."
+msgstr ""
+
+#: config/tc-m68k.c:4905 config/tc-m68k.c:4916
+msgid "expression out of range: defaulting to 1"
+msgstr ""
+
+#: config/tc-m68k.c:4948
+msgid "expression out of range: defaulting to 0"
+msgstr ""
+
+#: config/tc-m68k.c:4981 config/tc-m68k.c:4993
+#, c-format
+msgid "Can't deal with expression; defaulting to %ld"
+msgstr ""
+
+#: config/tc-m68k.c:5007
+msgid "expression doesn't fit in BYTE"
+msgstr ""
+
+#: config/tc-m68k.c:5011
+msgid "expression doesn't fit in WORD"
+msgstr ""
+
+#: config/tc-m68k.c:5104
+#, c-format
+msgid "%s: unrecognized processor name"
+msgstr ""
+
+#: config/tc-m68k.c:5169
+msgid "bad coprocessor id"
+msgstr ""
+
+#: config/tc-m68k.c:5175
+msgid "unrecognized fopt option"
+msgstr ""
+
+#: config/tc-m68k.c:5309
+#, c-format
+msgid "option `%s' may not be negated"
+msgstr ""
+
+#: config/tc-m68k.c:5320
+#, c-format
+msgid "option `%s' not recognized"
+msgstr ""
+
+#: config/tc-m68k.c:5353
+msgid "bad format of OPT NEST=depth"
+msgstr ""
+
+#: config/tc-m68k.c:5416
+msgid "missing label"
+msgstr ""
+
+#: config/tc-m68k.c:5440 config/tc-m68k.c:5469
+msgid "bad register list"
+msgstr ""
+
+#: config/tc-m68k.c:5442
+#, c-format
+msgid "bad register list: %s"
+msgstr ""
+
+#: config/tc-m68k.c:5540
+msgid "restore without save"
+msgstr ""
+
+#: config/tc-m68k.c:5717 config/tc-m68k.c:6066
+msgid "syntax error in structured control directive"
+msgstr ""
+
+#: config/tc-m68k.c:5768
+msgid "missing condition code in structured control directive"
+msgstr ""
+
+#: config/tc-m68k.c:6100
+msgid "missing then"
+msgstr ""
+
+#: config/tc-m68k.c:6182
+msgid "else without matching if"
+msgstr ""
+
+#: config/tc-m68k.c:6216
+msgid "endi without matching if"
+msgstr ""
+
+#: config/tc-m68k.c:6257
+msgid "break outside of structured loop"
+msgstr ""
+
+#: config/tc-m68k.c:6296
+msgid "next outside of structured loop"
+msgstr ""
+
+#: config/tc-m68k.c:6348
+msgid "missing ="
+msgstr ""
+
+#: config/tc-m68k.c:6386
+msgid "missing to or downto"
+msgstr ""
+
+#: config/tc-m68k.c:6422 config/tc-m68k.c:6456 config/tc-m68k.c:6666
+msgid "missing do"
+msgstr ""
+
+#: config/tc-m68k.c:6559
+msgid "endf without for"
+msgstr ""
+
+#: config/tc-m68k.c:6615
+msgid "until without repeat"
+msgstr ""
+
+#: config/tc-m68k.c:6702
+msgid "endw without while"
+msgstr ""
+
+#: config/tc-m68k.c:6818
+#, c-format
+msgid "unrecognized option `%s'"
+msgstr ""
+
+#: config/tc-m68k.c:6863
+#, c-format
+msgid "unrecognized architecture specification `%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"
+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"
+msgstr ""
+
+#: config/tc-m68k.c:6952
+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"
+msgstr ""
+
+#: config/tc-m68k.c:6987
+#, c-format
+msgid "Error %s in %s\n"
+msgstr ""
+
+#: config/tc-m68k.c:6991
+#, c-format
+msgid "Opcode(%d.%s): "
+msgstr ""
+
+#: config/tc-m88k.c:206
+#, c-format
+msgid "Can't hash instruction '%s':%s"
+msgstr ""
+
+#: config/tc-m88k.c:258
+#, c-format
+msgid "Invalid mnemonic '%s'"
+msgstr ""
+
+#: config/tc-m88k.c:278
+msgid "Parameter syntax error"
+msgstr ""
+
+#: config/tc-m88k.c:333
+msgid "Unknown relocation type"
+msgstr ""
+
+#. Having this here repeats the warning somtimes.
+#. But can't we stand that?
+#: config/tc-m88k.c:446
+msgid "Use of obsolete instruction"
+msgstr ""
+
+#: config/tc-m88k.c:563
+msgid "Expression truncated to 16 bits"
+msgstr ""
+
+#: config/tc-m88k.c:629 config/tc-m88k.c:651
+msgid "Expression truncated to 5 bits"
+msgstr ""
+
+#: config/tc-m88k.c:873
+msgid "Expression truncated to 9 bits"
+msgstr ""
+
+#: config/tc-m88k.c:895
+msgid "Removed lower 2 bits of expression"
+msgstr ""
+
+#: config/tc-m88k.c:1034
+msgid "Bad relocation type"
+msgstr ""
+
+#: config/tc-m88k.c:1047
+msgid "md_number_to_disp not defined"
+msgstr ""
+
+#: config/tc-m88k.c:1057
+msgid "md_number_to_field not defined"
+msgstr ""
+
+#: config/tc-m88k.c:1170
+msgid "Relaxation should never occur"
+msgstr ""
+
+#: config/tc-m88k.c:1267 config/tc-sparc.c:3363 read.c:1973
+#, c-format
+msgid "BSS length (%d.) <0! Ignored."
+msgstr ""
+
+#: config/tc-m88k.c:1311
+#, c-format
+msgid "Ignoring attempt to re-define symbol %s."
+msgstr ""
+
+#: config/tc-mcore.c:509
+#, c-format
+msgid "register expected, but saw '%.6s'"
+msgstr ""
+
+#: config/tc-mcore.c:593
+#, c-format
+msgid "control register expected, but saw '%.6s'"
+msgstr ""
+
+#: config/tc-mcore.c:631
+msgid "bad/missing psr specifier"
+msgstr ""
+
+#: config/tc-mcore.c:792
+msgid "more than 65K literal pools"
+msgstr ""
+
+#: config/tc-mcore.c:846
+msgid "missing ']'"
+msgstr ""
+
+#: config/tc-mcore.c:886
+msgid "operand must be a constant"
+msgstr ""
+
+#: config/tc-mcore.c:888
+#, c-format
+msgid "operand must be absolute in range %d..%d, not %d"
+msgstr ""
+
+#: config/tc-mcore.c:926
+msgid "operand must be a multiple of 4"
+msgstr ""
+
+#: config/tc-mcore.c:933
+msgid "operand must be a multiple of 2"
+msgstr ""
+
+#: config/tc-mcore.c:947 config/tc-mcore.c:1459 config/tc-mcore.c:1513
+msgid "base register expected"
+msgstr ""
+
+#: config/tc-mcore.c:996
+#, c-format
+msgid "unknown opcode \"%s\""
+msgstr ""
+
+#: config/tc-mcore.c:1039
+msgid "invalid register: r15 illegal"
+msgstr ""
+
+#: config/tc-mcore.c:1087 config/tc-mcore.c:1663
+msgid "M340 specific opcode used when assembling for M210"
+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"
+msgstr ""
+
+#: config/tc-mcore.c:1120
+msgid "destination register must be r1"
+msgstr ""
+
+#: config/tc-mcore.c:1141
+msgid "source register must be r1"
+msgstr ""
+
+#: config/tc-mcore.c:1204 config/tc-mcore.c:1261
+msgid "immediate is not a power of two"
+msgstr ""
+
+#: config/tc-mcore.c:1232
+msgid "translating bgeni to movi"
+msgstr ""
+
+#: config/tc-mcore.c:1269
+msgid "translating mgeni to movi"
+msgstr ""
+
+#: config/tc-mcore.c:1301
+msgid "translating bmaski to movi"
+msgstr ""
+
+#: config/tc-mcore.c:1375
+#, c-format
+msgid "displacement too large (%d)"
+msgstr ""
+
+#: config/tc-mcore.c:1389
+msgid "Invalid register: r0 and r15 illegal"
+msgstr ""
+
+#: config/tc-mcore.c:1420
+msgid "bad starting register: r0 and r15 invalid"
+msgstr ""
+
+#: config/tc-mcore.c:1433
+msgid "ending register must be r15"
+msgstr ""
+
+#: config/tc-mcore.c:1453
+msgid "bad base register: must be r0"
+msgstr ""
+
+#: config/tc-mcore.c:1471
+msgid "first register must be r4"
+msgstr ""
+
+#: config/tc-mcore.c:1482
+msgid "last register must be r7"
+msgstr ""
+
+#: config/tc-mcore.c:1519
+msgid "reg-reg expected"
+msgstr ""
+
+#: config/tc-mcore.c:1629
+msgid "second operand must be 1"
+msgstr ""
+
+#: config/tc-mcore.c:1650
+msgid "zero used as immediate value"
+msgstr ""
+
+#: config/tc-mcore.c:1677
+msgid "duplicated psr bit specifier"
+msgstr ""
+
+#: config/tc-mcore.c:1683
+msgid "`af' must appear alone"
+msgstr ""
+
+#: config/tc-mcore.c:1690
+#, c-format
+msgid "unimplemented opcode \"%s\""
+msgstr ""
+
+#: config/tc-mcore.c:1699
+#, c-format
+msgid "ignoring operands: %s "
+msgstr ""
+
+#: config/tc-mcore.c:1768 config/tc-w65.c:856
+msgid "Bad call to MD_NTOF()"
+msgstr ""
+
+#: config/tc-mcore.c:1841
+#, c-format
+msgid "unrecognised cpu type '%s'"
+msgstr ""
+
+#: config/tc-mcore.c:1860
+msgid ""
+"MCORE specific options:\n"
+" -{no-}jsri2bsr\t {dis}able jsri to bsr transformation (def: dis)\n"
+" -{no-}sifilter\t {dis}able silicon filter behavior (def: dis)\n"
+" -cpu=[210|340] select CPU type\n"
+" -EB assemble for a big endian system (default)\n"
+" -EL assemble for a little endian system\n"
+msgstr ""
+
+#: config/tc-mcore.c:1879
+msgid "failed sanity check: short_jump"
+msgstr ""
+
+#: config/tc-mcore.c:1890
+msgid "failed sanity check: long_jump"
+msgstr ""
+
+#: config/tc-mcore.c:1917
+#, c-format
+msgid "odd displacement at %x"
+msgstr ""
+
+#: config/tc-mcore.c:2105
+msgid "unknown"
+msgstr ""
+
+#: config/tc-mcore.c:2136
+#, c-format
+msgid "odd distance branch (0x%x bytes)"
+msgstr ""
+
+#: config/tc-mcore.c:2140
+#, c-format
+msgid "pcrel for branch to %s too far (0x%x)"
+msgstr ""
+
+#: config/tc-mcore.c:2159
+#, c-format
+msgid "pcrel for lrw/jmpi/jsri to %s too far (0x%x)"
+msgstr ""
+
+#: config/tc-mcore.c:2170
+#, c-format
+msgid "pcrel for loopt too far (0x%x)"
+msgstr ""
+
+#: config/tc-mcore.c:2402
+#, c-format
+msgid "Can not do %d byte %srelocation"
+msgstr ""
+
+#: config/tc-mcore.c:2404
+msgid "pc-relative"
+msgstr ""
+
+#: config/tc-mcore.c:2421 config/tc-pj.c:586 config/tc-sh.c:3005
+#, c-format
+msgid "Cannot represent relocation type %s"
+msgstr ""
+
+#: config/tc-mips.c:860
+msgid "-G not supported in this configuration."
+msgstr ""
+
+#: config/tc-mips.c:1005
+msgid "trap exception not supported at ISA 1"
+msgstr ""
+
+#: config/tc-mips.c:1046
+msgid "Could not set architecture and machine"
+msgstr ""
+
+#: config/tc-mips.c:1085
+#, c-format
+msgid "internal: can't hash `%s': %s"
+msgstr ""
+
+#: config/tc-mips.c:1093
+#, c-format
+msgid "internal error: bad mips16 opcode: %s %s\n"
+msgstr ""
+
+#: config/tc-mips.c:1262
+#, c-format
+msgid "returned from mips_ip(%s) insn_opcode = 0x%x\n"
+msgstr ""
+
+#: config/tc-mips.c:1816 config/tc-mips.c:11394
+msgid "extended instruction in delay slot"
+msgstr ""
+
+#: config/tc-mips.c:1838 config/tc-mips.c:1845
+#, c-format
+msgid "jump to misaligned address (0x%lx)"
+msgstr ""
+
+#: config/tc-mips.c:2495 config/tc-mips.c:2836
+msgid "Macro instruction expanded into multiple instructions"
+msgstr ""
+
+#: config/tc-mips.c:2889
+msgid "unsupported large constant"
+msgstr ""
+
+#: config/tc-mips.c:2891
+#, c-format
+msgid "Instruction %s requires absolute expression"
+msgstr ""
+
+#: config/tc-mips.c:3037
+msgid "Number larger than 32 bits"
+msgstr ""
+
+#: config/tc-mips.c:3058
+msgid "Number larger than 64 bits"
+msgstr ""
+
+#: config/tc-mips.c:3324 config/tc-mips.c:3396 config/tc-mips.c:5075
+#: config/tc-mips.c:5126 config/tc-mips.c:5662 config/tc-mips.c:5725
+msgid "PIC code offset overflow (max 16 signed bits)"
+msgstr ""
+
+#: config/tc-mips.c:3635
+#, c-format
+msgid "Branch %s is always false (nop)"
+msgstr ""
+
+#: config/tc-mips.c:3640
+#, c-format
+msgid "Branch likely %s is always false"
+msgstr ""
+
+#: config/tc-mips.c:3647 config/tc-mips.c:3721 config/tc-mips.c:3824
+#: config/tc-mips.c:3879 config/tc-mips.c:6762 config/tc-mips.c:6771
+#: config/tc-mips.c:6779 config/tc-mips.c:6888
+msgid "Unsupported large constant"
+msgstr ""
+
+#. result is always true
+#: config/tc-mips.c:3683
+#, c-format
+msgid "Branch %s is always true"
+msgstr ""
+
+#: config/tc-mips.c:3955 config/tc-mips.c:4062
+msgid "Divide by zero."
+msgstr ""
+
+#: config/tc-mips.c:4646
+msgid "MIPS PIC call to register other than $25"
+msgstr ""
+
+#: config/tc-mips.c:4651 config/tc-mips.c:4763
+msgid "No .cprestore pseudo-op used in PIC code"
+msgstr ""
+
+#: config/tc-mips.c:4836 config/tc-mips.c:4925 config/tc-mips.c:5413
+#: config/tc-mips.c:5454 config/tc-mips.c:5472 config/tc-mips.c:6101
+msgid "opcode not supported on this processor"
+msgstr ""
+
+#: config/tc-mips.c:5932 config/tc-mips.c:6656
+msgid "Macro used $at after \".set noat\""
+msgstr ""
+
+#: config/tc-mips.c:6072 config/tc-mips.c:6090
+msgid "rotate count too large"
+msgstr ""
+
+#: config/tc-mips.c:6141
+#, c-format
+msgid "Instruction %s: result is always false"
+msgstr ""
+
+#: config/tc-mips.c:6310
+#, c-format
+msgid "Instruction %s: result is always true"
+msgstr ""
+
+#: config/tc-mips.c:6449 config/tc-mips.c:6476 config/tc-mips.c:6548
+#: config/tc-mips.c:6573
+msgid "operand overflow"
+msgstr ""
+
+#. FIXME: Check if this is one of the itbl macros, since they
+#. are added dynamically.
+#: config/tc-mips.c:6652
+#, c-format
+msgid "Macro %s not implemented yet"
+msgstr ""
+
+#: config/tc-mips.c:6922
+#, c-format
+msgid "internal: bad mips opcode (mask error): %s %s"
+msgstr ""
+
+#: config/tc-mips.c:6974
+#, c-format
+msgid "internal: bad mips opcode (unknown operand type `%c'): %s %s"
+msgstr ""
+
+#: config/tc-mips.c:6981
+#, c-format
+msgid "internal: bad mips opcode (bits 0x%lx undefined): %s %s"
+msgstr ""
+
+#: config/tc-mips.c:7089
+#, c-format
+msgid "opcode not supported on this processor: %d (MIPS%d)"
+msgstr ""
+
+#: config/tc-mips.c:7159
+#, c-format
+msgid "Improper shift amount (%ld)"
+msgstr ""
+
+#: config/tc-mips.c:7186 config/tc-mips.c:8306 config/tc-mips.c:8421
+#, c-format
+msgid "Invalid value for `%s' (%lu)"
+msgstr ""
+
+#: config/tc-mips.c:7204
+#, c-format
+msgid "Illegal break code (%ld)"
+msgstr ""
+
+#: config/tc-mips.c:7218
+#, c-format
+msgid "Illegal lower break code (%ld)"
+msgstr ""
+
+#: config/tc-mips.c:7231
+#, c-format
+msgid "Illegal syscall code (%ld)"
+msgstr ""
+
+#: config/tc-mips.c:7243
+#, c-format
+msgid "Coproccesor code > 25 bits (%ld)"
+msgstr ""
+
+#: config/tc-mips.c:7257
+#, c-format
+msgid "Invalidate performance regster (%ld)"
+msgstr ""
+
+#: config/tc-mips.c:7293
+#, c-format
+msgid "Invalid register number (%d)"
+msgstr ""
+
+#: config/tc-mips.c:7453
+#, c-format
+msgid "Invalid float register number (%d)"
+msgstr ""
+
+#: config/tc-mips.c:7463
+#, c-format
+msgid "Float register should be even, was %d"
+msgstr ""
+
+#: config/tc-mips.c:7515 config/tc-mips.c:7751 config/tc-mips.c:7790
+msgid "absolute expression required"
+msgstr ""
+
+#: config/tc-mips.c:7576
+#, c-format
+msgid "Bad floating point constant: %s"
+msgstr ""
+
+#: config/tc-mips.c:7697
+msgid "Can't use floating point insn in this section"
+msgstr ""
+
+#: config/tc-mips.c:7753
+msgid "16 bit expression not in range 0..65535"
+msgstr ""
+
+#: config/tc-mips.c:7792
+msgid "16 bit expression not in range -32768..32767"
+msgstr ""
+
+#: config/tc-mips.c:7863
+msgid "lui expression not in range 0..65535"
+msgstr ""
+
+#: config/tc-mips.c:7887
+#, c-format
+msgid "invalid condition code register $fcc%d"
+msgstr ""
+
+#: config/tc-mips.c:7895
+#, c-format
+msgid "bad char = '%c'\n"
+msgstr ""
+
+#: config/tc-mips.c:7908 config/tc-mips.c:8446
+msgid "illegal operands"
+msgstr ""
+
+#: config/tc-mips.c:7975
+msgid "unrecognized opcode"
+msgstr ""
+
+#: config/tc-mips.c:8084
+#, c-format
+msgid "invalid register number (%d)"
+msgstr ""
+
+#: config/tc-mips.c:8165
+msgid "used $at without \".set noat\""
+msgstr ""
+
+#: config/tc-mips.c:8340
+msgid "can't parse register list"
+msgstr ""
+
+#: config/tc-mips.c:8374 config/tc-mips.c:8404
+msgid "invalid register list"
+msgstr ""
+
+#: config/tc-mips.c:8571
+msgid "extended operand requested but not required"
+msgstr ""
+
+#: config/tc-mips.c:8573
+msgid "invalid unextended operand value"
+msgstr ""
+
+#: config/tc-mips.c:8601
+msgid "operand value out of range for instruction"
+msgstr ""
+
+#: config/tc-mips.c:9052
+#, c-format
+msgid "ignoring invalid leading 'v' in -mcpu=%s switch"
+msgstr ""
+
+#: config/tc-mips.c:9058
+#, c-format
+msgid "invalid architecture -mcpu=%s"
+msgstr ""
+
+#: config/tc-mips.c:9108
+msgid "-G may not be used with embedded PIC code"
+msgstr ""
+
+#: config/tc-mips.c:9120
+msgid "-call_shared is supported only for ELF format"
+msgstr ""
+
+#: config/tc-mips.c:9126 config/tc-mips.c:10205 config/tc-mips.c:10373
+msgid "-G may not be used with SVR4 PIC code"
+msgstr ""
+
+#: config/tc-mips.c:9135
+msgid "-non_shared is supported only for ELF format"
+msgstr ""
+
+#: config/tc-mips.c:9151
+msgid "-G is not supported for this configuration"
+msgstr ""
+
+#: config/tc-mips.c:9156
+msgid "-G may not be used with SVR4 or embedded PIC code"
+msgstr ""
+
+#: config/tc-mips.c:9180
+msgid "No compiled in support for 64 bit object file format"
+msgstr ""
+
+#: config/tc-mips.c:9270
+msgid ""
+"MIPS options:\n"
+"-membedded-pic\t\tgenerate embedded position independent code\n"
+"-EB\t\t\tgenerate big endian output\n"
+"-EL\t\t\tgenerate little endian output\n"
+"-g, -g2\t\t\tdo not remove uneeded NOPs or swap branches\n"
+"-G NUM\t\t\tallow referencing objects up to NUM bytes\n"
+"\t\t\timplicitly with the gp register [default 8]\n"
+msgstr ""
+
+#: config/tc-mips.c:9278
+msgid ""
+"-mips1\t\t\tgenerate MIPS ISA I instructions\n"
+"-mips2\t\t\tgenerate MIPS ISA II instructions\n"
+"-mips3\t\t\tgenerate MIPS ISA III instructions\n"
+"-mips4\t\t\tgenerate MIPS ISA IV instructions\n"
+"-mcpu=CPU\t\tgenerate code for CPU, where CPU is one of:\n"
+msgstr ""
+
+#: config/tc-mips.c:9304
+msgid ""
+"-mCPU\t\t\tequivalent to -mcpu=CPU.\n"
+"-no-mCPU\t\tdon't generate code specific to CPU.\n"
+"\t\t\tFor -mCPU and -no-mCPU, CPU must be one of:\n"
+msgstr ""
+
+#: config/tc-mips.c:9317
+msgid ""
+"-mips16\t\t\tgenerate mips16 instructions\n"
+"-no-mips16\t\tdo not generate mips16 instructions\n"
+msgstr ""
+
+#: config/tc-mips.c:9320
+msgid ""
+"-O0\t\t\tremove unneeded NOPs, do not swap branches\n"
+"-O\t\t\tremove unneeded NOPs and swap branches\n"
+"--trap, --no-break\ttrap exception on div by 0 and mult overflow\n"
+"--break, --no-trap\tbreak exception on div by 0 and mult overflow\n"
+msgstr ""
+
+#: config/tc-mips.c:9326
+msgid ""
+"-KPIC, -call_shared\tgenerate SVR4 position independent code\n"
+"-non_shared\t\tdo not generate position independent code\n"
+"-xgot\t\t\tassume a 32 bit GOT\n"
+"-32\t\t\tcreate 32 bit object file (default)\n"
+"-64\t\t\tcreate 64 bit object file\n"
+msgstr ""
+
+#: config/tc-mips.c:9383
+#, c-format
+msgid "Unsupported reloc size %d"
+msgstr ""
+
+#: config/tc-mips.c:9486
+msgid "Unmatched %%hi reloc"
+msgstr ""
+
+#: config/tc-mips.c:9610
+msgid "Invalid PC relative reloc"
+msgstr ""
+
+#: config/tc-mips.c:9720 config/tc-sparc.c:2925 config/tc-sparc.c:2932
+#: config/tc-sparc.c:2939 config/tc-sparc.c:2946 config/tc-sparc.c:2953
+#: config/tc-sparc.c:2962 config/tc-sparc.c:2973 config/tc-sparc.c:2999
+#: config/tc-sparc.c:3027 write.c:971 write.c:1035
+msgid "relocation overflow"
+msgstr ""
+
+#: config/tc-mips.c:9736
+#, c-format
+msgid "Branch to odd address (%lx)"
+msgstr ""
+
+#: config/tc-mips.c:9900
+#, c-format
+msgid "%08lx UNDEFINED\n"
+msgstr ""
+
+#: config/tc-mips.c:9966
+msgid "Alignment negative: 0 assumed."
+msgstr ""
+
+#: config/tc-mips.c:10054
+msgid "No read only data section in this object file format"
+msgstr ""
+
+#: config/tc-mips.c:10077
+msgid "Global pointers not supported; recompile -G 0"
+msgstr ""
+
+#: config/tc-mips.c:10163
+#, c-format
+msgid "%s: no such section"
+msgstr ""
+
+#: config/tc-mips.c:10200
+#, c-format
+msgid ".option pic%d not supported"
+msgstr ""
+
+#: config/tc-mips.c:10211
+#, c-format
+msgid "Unrecognized option \"%s\""
+msgstr ""
+
+#: config/tc-mips.c:10274
+msgid "`noreorder' must be set before `nomacro'"
+msgstr ""
+
+#: config/tc-mips.c:10309
+msgid "unknown ISA level"
+msgstr ""
+
+#: config/tc-mips.c:10332
+msgid ".set pop with no .set push"
+msgstr ""
+
+#: config/tc-mips.c:10356
+#, c-format
+msgid "Tried to set unrecognized symbol: %s\n"
+msgstr ""
+
+#: config/tc-mips.c:10406
+msgid ".cpload not in noreorder section"
+msgstr ""
+
+#: config/tc-mips.c:10488
+msgid "Unsupported use of .gpword"
+msgstr ""
+
+#: config/tc-mips.c:10625
+msgid "expected `$'"
+msgstr ""
+
+#: config/tc-mips.c:10633
+msgid "Bad register number"
+msgstr ""
+
+#: config/tc-mips.c:10649
+msgid "Unrecognized register name"
+msgstr ""
+
+#: config/tc-mips.c:10848
+msgid "unsupported PC relative reference to different section"
+msgstr ""
+
+#: config/tc-mips.c:10957
+msgid "unsupported relocation"
+msgstr ""
+
+#: config/tc-mips.c:11040
+msgid "AT used after \".set noat\" or macro used after \".set nomacro\""
+msgstr ""
+
+#: config/tc-mips.c:11103
+msgid "Double check fx_r_type in tc-mips.c:tc_gen_reloc"
+msgstr ""
+
+#: config/tc-mips.c:11615
+msgid "missing `.end' at end of assembly"
+msgstr ""
+
+#: config/tc-mips.c:11630
+msgid "Expected simple number."
+msgstr ""
+
+#: config/tc-mips.c:11656
+#, c-format
+msgid " *input_line_pointer == '%c' 0x%02x\n"
+msgstr ""
+
+#: config/tc-mips.c:11658
+msgid "Invalid number"
+msgstr ""
+
+#: config/tc-mips.c:11713
+msgid ".end not in text section"
+msgstr ""
+
+#: config/tc-mips.c:11717
+msgid ".end directive without a preceding .ent directive."
+msgstr ""
+
+#: config/tc-mips.c:11726
+msgid ".end symbol does not match .ent symbol."
+msgstr ""
+
+#: config/tc-mips.c:11729
+msgid ".end directive missing or unknown symbol"
+msgstr ""
+
+#: config/tc-mips.c:11804
+msgid ".ent or .aent not in text section."
+msgstr ""
+
+#: config/tc-mips.c:11807
+msgid "missing `.end'"
+msgstr ""
+
+#: config/tc-mips.c:11840 ecoff.c:3227
+msgid ".frame outside of .ent"
+msgstr ""
+
+#: config/tc-mips.c:11851 ecoff.c:3238
+msgid "Bad .frame directive"
+msgstr ""
+
+#: config/tc-mips.c:11881
+msgid ".mask/.fmask outside of .ent"
+msgstr ""
+
+#: config/tc-mips.c:11888
+msgid "Bad .mask/.fmask directive"
+msgstr ""
+
+#: config/tc-mn10200.c:313
+msgid ""
+"MN10200 options:\n"
+"none yet\n"
+msgstr ""
+
+#: config/tc-mn10200.c:788 config/tc-mn10300.c:912 config/tc-ppc.c:1614
+#: config/tc-v850.c:1691
+#, c-format
+msgid "Unrecognized opcode: `%s'"
+msgstr ""
+
+#: config/tc-mn10300.c:495
+msgid ""
+"MN10300 options:\n"
+"none yet\n"
+msgstr ""
+
+#: config/tc-mn10300.c:930
+msgid "Invalid opcode/operands"
+msgstr ""
+
+#: config/tc-mn10300.c:1406
+msgid "Invalid register specification."
+msgstr ""
+
+#: config/tc-ns32k.c:444
+msgid "Invalid syntax in PC-relative addressing mode"
+msgstr ""
+
+#: config/tc-ns32k.c:468
+msgid "Invalid syntax in External addressing mode"
+msgstr ""
+
+#: config/tc-ns32k.c:537
+msgid "Invalid syntax in Memory Relative addressing mode"
+msgstr ""
+
+#: config/tc-ns32k.c:604
+msgid "Invalid scaled-indexed mode, use (b,w,d,q)"
+msgstr ""
+
+#: config/tc-ns32k.c:609
+msgid "Syntax in scaled-indexed mode, use [Rn:m] where n=[0..7] m={b,w,d,q}"
+msgstr ""
+
+#: config/tc-ns32k.c:615
+msgid "Scaled-indexed addressing mode combined with scaled-index"
+msgstr ""
+
+#: config/tc-ns32k.c:624
+msgid "Invalid or illegal addressing mode combined with scaled-index"
+msgstr ""
+
+#: config/tc-ns32k.c:731
+msgid "Premature end of suffix -- Defaulting to d"
+msgstr ""
+
+#: config/tc-ns32k.c:744
+msgid "Bad suffix after ':' use {b|w|d} Defaulting to d"
+msgstr ""
+
+#: config/tc-ns32k.c:785
+msgid "Very short instr to option, ie you can't do it on a NULLstr"
+msgstr ""
+
+#: config/tc-ns32k.c:829
+msgid "No such entry in list. (cpu/mmu register)"
+msgstr ""
+
+#: config/tc-ns32k.c:870
+msgid "Internal consistency error. check ns32k-opcode.h"
+msgstr ""
+
+#: config/tc-ns32k.c:891
+msgid "Address of immediate operand"
+msgstr ""
+
+#: config/tc-ns32k.c:892
+msgid "Invalid immediate write operand."
+msgstr ""
+
+#: config/tc-ns32k.c:1019
+msgid "Bad opcode-table-option, check in file ns32k-opcode.h"
+msgstr ""
+
+#: config/tc-ns32k.c:1048
+msgid "No such opcode"
+msgstr ""
+
+#: config/tc-ns32k.c:1116
+msgid "Bad suffix, defaulting to d"
+msgstr ""
+
+#: config/tc-ns32k.c:1138
+msgid "Too many operands passed to instruction"
+msgstr ""
+
+#. check error in default
+#: config/tc-ns32k.c:1149
+msgid "Wrong numbers of operands in default, check ns32k-opcodes.h"
+msgstr ""
+
+#: config/tc-ns32k.c:1154
+msgid "Wrong number of operands"
+msgstr ""
+
+#: config/tc-ns32k.c:1273
+msgid "iif convert internal pcrel/binary"
+msgstr ""
+
+#: config/tc-ns32k.c:1289
+msgid "Bignum too big for long"
+msgstr ""
+
+#: config/tc-ns32k.c:1364
+msgid "iif convert internal pcrel/pointer"
+msgstr ""
+
+#: config/tc-ns32k.c:1369
+msgid "Internal logic error in iif.iifP[n].type"
+msgstr ""
+
+#. We cant relax this case
+#: config/tc-ns32k.c:1403
+msgid "Can't relax difference"
+msgstr ""
+
+#: config/tc-ns32k.c:1452
+msgid "Displacement to large for :d"
+msgstr ""
+
+#: config/tc-ns32k.c:1463
+msgid "Internal logic error in iif.iifP[].type"
+msgstr ""
+
+#: config/tc-ns32k.c:1518
+#, c-format
+msgid "Can not do %d byte pc-relative relocation for storage type %d"
+msgstr ""
+
+#: config/tc-ns32k.c:1521
+#, c-format
+msgid "Can not do %d byte relocation for storage type %d"
+msgstr ""
+
+#: config/tc-ns32k.c:1553
+#, c-format
+msgid "Can't hash %s: %s"
+msgstr ""
+
+#: config/tc-ns32k.c:1637
+msgid "Byte displacement out of range. line number not valid"
+msgstr ""
+
+#: config/tc-ns32k.c:1646
+msgid "Word displacement out of range. line number not valid"
+msgstr ""
+
+#: config/tc-ns32k.c:1660
+msgid "Double word displacement out of range"
+msgstr ""
+
+#: config/tc-ns32k.c:1680
+#, c-format
+msgid "Internal logic error. line %s, file \"%s\""
+msgstr ""
+
+#: config/tc-ns32k.c:1728
+#, c-format
+msgid "Internal logic error. line %s, file \"%s\""
+msgstr ""
+
+#: config/tc-ns32k.c:1839
+msgid "Bit field out of range"
+msgstr ""
+
+#: config/tc-ns32k.c:2088
+#, c-format
+msgid "invalid architecture option -m%s"
+msgstr ""
+
+#: config/tc-ns32k.c:2104
+msgid ""
+"NS32K options:\n"
+"-m32032 | -m32532\tselect variant of NS32K architecture\n"
+msgstr ""
+
+#: config/tc-ns32k.c:2284
+#, c-format
+msgid "Cannot find relocation type for symbol %s, code %d"
+msgstr ""
+
+#: config/tc-pj.c:70 config/tc-pj.c:78
+msgid "confusing relocation expressions"
+msgstr ""
+
+#: config/tc-pj.c:172
+msgid "can't have relocation for ipush"
+msgstr ""
+
+#: config/tc-pj.c:282
+#, c-format
+msgid "unknown opcode %s"
+msgstr ""
+
+#: config/tc-pj.c:431
+msgid ""
+"PJ options:\n"
+"-little\t\t\tgenerate little endian code\n"
+"-big\t\t\tgenerate big endian code\n"
+msgstr ""
+
+#: config/tc-pj.c:472 config/tc-sh.c:2577 config/tc-sh.c:2584
+#: config/tc-sh.c:2591 config/tc-sh.c:2598
+msgid "pcrel too far"
+msgstr ""
+
+#: config/tc-pj.c:541 config/tc-sh.c:2670
+msgid "offset out of range"
+msgstr ""
+
+#: config/tc-ppc.c:835
+#, c-format
+msgid "invalid switch -m%s"
+msgstr ""
+
+#: config/tc-ppc.c:872
+msgid ""
+"PowerPC options:\n"
+"-u\t\t\tignored\n"
+"-mpwrx, -mpwr2\t\tgenerate code for IBM POWER/2 (RIOS2)\n"
+"-mpwr\t\t\tgenerate code for IBM POWER (RIOS1)\n"
+"-m601\t\t\tgenerate code for Motorola PowerPC 601\n"
+"-mppc, -mppc32, -m403, -m603, -m604\n"
+"\t\t\tgenerate code for Motorola PowerPC 603/604\n"
+"-mppc64, -m620\t\tgenerate code for Motorola PowerPC 620\n"
+"-mppc64bridge\t\tgenerate code for PowerPC 64, including bridge insns\n"
+"-mcom\t\t\tgenerate code Power/PowerPC common instructions\n"
+"-many\t\t\tgenerate code for any architecture (PWR/PWRX/PPC)\n"
+"-mregnames\t\tAllow symbolic names for registers\n"
+"-mno-regnames\t\tDo not allow symbolic names for registers\n"
+msgstr ""
+
+#: config/tc-ppc.c:887
+msgid ""
+"-mrelocatable\t\tsupport for GCC's -mrelocatble option\n"
+"-mrelocatable-lib\tsupport for GCC's -mrelocatble-lib option\n"
+"-memb\t\t\tset PPC_EMB bit in ELF flags\n"
+"-mlittle, -mlittle-endian\n"
+"\t\t\tgenerate code for a little endian machine\n"
+"-mbig, -mbig-endian\tgenerate code for a big endian machine\n"
+"-msolaris\t\tgenerate code for Solaris\n"
+"-mno-solaris\t\tdo not generate code for Solaris\n"
+"-V\t\t\tprint assembler version number\n"
+"-Qy, -Qn\t\tignored\n"
+msgstr ""
+
+#: config/tc-ppc.c:922
+#, c-format
+msgid "Unknown default cpu = %s, os = %s"
+msgstr ""
+
+#: config/tc-ppc.c:947
+msgid "Neither Power nor PowerPC opcodes were selected."
+msgstr ""
+
+#: config/tc-ppc.c:995
+#, c-format
+msgid "Internal assembler error for instruction %s"
+msgstr ""
+
+#: config/tc-ppc.c:1014
+#, c-format
+msgid "Internal assembler error for macro %s"
+msgstr ""
+
+#: config/tc-ppc.c:1224
+msgid "identifier+constant@got means identifier@got+constant"
+msgstr ""
+
+#: config/tc-ppc.c:1278
+#, c-format
+msgid "%s relocations do not fit in %d bytes\n"
+msgstr ""
+
+#: config/tc-ppc.c:1378
+#, c-format
+msgid "Length of .lcomm \"%s\" is already %ld. Not changed to %ld."
+msgstr ""
+
+#: config/tc-ppc.c:1460
+msgid "Relocation cannot be done when using -mrelocatable"
+msgstr ""
+
+#: config/tc-ppc.c:1541
+#, c-format
+msgid "syntax error: invalid toc specifier `%s'"
+msgstr ""
+
+#: config/tc-ppc.c:1555
+#, c-format
+msgid "syntax error: expected `]', found `%c'"
+msgstr ""
+
+#: config/tc-ppc.c:1790
+msgid "[tocv] symbol is not a toc symbol"
+msgstr ""
+
+#: config/tc-ppc.c:1801
+msgid "Unimplemented toc32 expression modifier"
+msgstr ""
+
+#: config/tc-ppc.c:1806
+msgid "Unimplemented toc64 expression modifier"
+msgstr ""
+
+#: config/tc-ppc.c:1810
+#, c-format
+msgid "Unexpected return value [%d] from parse_toc_entry!\n"
+msgstr ""
+
+#: config/tc-ppc.c:1963
+#, c-format
+msgid "syntax error; found `%c' but expected `%c'"
+msgstr ""
+
+#: config/tc-ppc.c:2071
+msgid "wrong number of operands"
+msgstr ""
+
+#: config/tc-ppc.c:2127
+msgid "Bad .section directive: want a,w,x,e in string"
+msgstr ""
+
+#: config/tc-ppc.c:2241
+msgid "missing size"
+msgstr ""
+
+#: config/tc-ppc.c:2250
+msgid "negative size"
+msgstr ""
+
+#: config/tc-ppc.c:2291
+msgid "missing real symbol name"
+msgstr ""
+
+#: config/tc-ppc.c:2312
+msgid "attempt to redefine symbol"
+msgstr ""
+
+#: config/tc-ppc.c:2546
+msgid "The XCOFF file format does not support arbitrary sections"
+msgstr ""
+
+#: config/tc-ppc.c:2654 config/tc-ppc.c:3171 read.c:2985
+msgid "missing value"
+msgstr ""
+
+#: config/tc-ppc.c:2672
+msgid "illegal .stabx expression; zero assumed"
+msgstr ""
+
+#: config/tc-ppc.c:2704
+msgid "missing class"
+msgstr ""
+
+#: config/tc-ppc.c:2713
+msgid "missing type"
+msgstr ""
+
+#: config/tc-ppc.c:2774
+msgid "missing symbol name"
+msgstr ""
+
+#: config/tc-ppc.c:2950
+msgid "nested .bs blocks"
+msgstr ""
+
+#: config/tc-ppc.c:2983
+msgid ".es without preceding .bs"
+msgstr ""
+
+#: config/tc-ppc.c:3163
+msgid "non-constant byte count"
+msgstr ""
+
+#: config/tc-ppc.c:3208
+msgid ".tc not in .toc section"
+msgstr ""
+
+#: config/tc-ppc.c:3227
+msgid ".tc with no label"
+msgstr ""
+
+#: config/tc-ppc.c:3302
+msgid "No previous section to return to. Directive ignored."
+msgstr ""
+
+#. Section Contents
+#. unknown
+#: config/tc-ppc.c:3721
+msgid "Unsupported section attribute -- 'a'"
+msgstr ""
+
+#: config/tc-ppc.c:3911
+msgid "bad symbol suffix"
+msgstr ""
+
+#: config/tc-ppc.c:4004
+msgid "Unrecognized symbol suffix"
+msgstr ""
+
+#: config/tc-ppc.c:4086
+msgid "two .function pseudo-ops with no intervening .ef"
+msgstr ""
+
+#: config/tc-ppc.c:4099
+msgid ".ef with no preceding .function"
+msgstr ""
+
+#: config/tc-ppc.c:4227
+#, c-format
+msgid "warning: symbol %s has no csect"
+msgstr ""
+
+#: config/tc-ppc.c:4528
+msgid "symbol in .toc does not match any .tc"
+msgstr ""
+
+#: config/tc-ppc.c:4826
+msgid "unsupported relocation type"
+msgstr ""
+
+#: config/tc-ppc.c:4880
+#, c-format
+msgid "cannot emit PC relative %s relocation against %s"
+msgstr ""
+
+#: config/tc-ppc.c:4885
+#, c-format
+msgid "cannot emit PC relative %s relocation"
+msgstr ""
+
+#: config/tc-ppc.c:4947
+msgid "must branch to an address a multiple of 4"
+msgstr ""
+
+#: config/tc-ppc.c:4951
+#, c-format
+msgid "@local or @plt branch destination is too far away, %ld bytes"
+msgstr ""
+
+#: config/tc-ppc.c:4975
+#, c-format
+msgid "Gas failure, reloc value %d\n"
+msgstr ""
+
+#: config/tc-sh.c:675
+msgid "illegal register after @-"
+msgstr ""
+
+#: config/tc-sh.c:691
+msgid "must be @(r0,...)"
+msgstr ""
+
+#: config/tc-sh.c:707
+msgid "syntax error in @(r0,...)"
+msgstr ""
+
+#: config/tc-sh.c:739 config/tc-sh.c:744
+msgid "syntax error in @(disp,[Rn, gbr, pc])"
+msgstr ""
+
+#: config/tc-sh.c:749
+msgid "expecting )"
+msgstr ""
+
+#: config/tc-sh.c:758
+msgid "illegal register after @"
+msgstr ""
+
+#: config/tc-sh.c:1262
+#, c-format
+msgid "Invalid register: 'r%d'"
+msgstr ""
+
+#: config/tc-sh.c:1398
+msgid "insn can't be combined with parallel processing insn"
+msgstr ""
+
+#: config/tc-sh.c:1405 config/tc-sh.c:1416
+msgid "multiple movx specifications"
+msgstr ""
+
+#: config/tc-sh.c:1410 config/tc-sh.c:1437
+msgid "multiple movy specifications"
+msgstr ""
+
+#: config/tc-sh.c:1418
+msgid "invalid movx address register"
+msgstr ""
+
+#: config/tc-sh.c:1424 config/tc-sh.c:1429
+msgid "invalid movx dsp register"
+msgstr ""
+
+#: config/tc-sh.c:1446 config/tc-sh.c:1451
+msgid "invalid movy dsp register"
+msgstr ""
+
+#: config/tc-sh.c:1455
+msgid "invalid movy address register"
+msgstr ""
+
+#: config/tc-sh.c:1461
+msgid "dsp immediate shift value not constant"
+msgstr ""
+
+#: config/tc-sh.c:1468 config/tc-sh.c:1481
+msgid "multiple parallel processing specifications"
+msgstr ""
+
+#: config/tc-sh.c:1474
+msgid "multiple condition specifications"
+msgstr ""
+
+#: config/tc-sh.c:1490
+msgid "insn cannot be combined with pmuls"
+msgstr ""
+
+#: config/tc-sh.c:1507
+msgid "bad padd / psub pmuls output operand"
+msgstr ""
+
+#: config/tc-sh.c:1517
+msgid "condition not followed by conditionalizable insn"
+msgstr ""
+
+#: config/tc-sh.c:1527
+msgid "unrecognized characters at end of parallel processing insn"
+msgstr ""
+
+#: config/tc-sh.c:1637
+#, c-format
+msgid "excess operands: '%s'"
+msgstr ""
+
+#: config/tc-sh.c:1783
+msgid ".uses pseudo-op seen when not relaxing"
+msgstr ""
+
+#: config/tc-sh.c:1789
+msgid "bad .uses format"
+msgstr ""
+
+#: config/tc-sh.c:1850
+msgid ""
+"SH options:\n"
+"-little\t\t\tgenerate little endian code\n"
+"-relax\t\t\talter jump instructions for long displacements\n"
+"-small\t\t\talign sections to 4 byte boundaries, not 16\n"
+"-dsp\t\t\tenable sh-dsp insns, and disable sh3e / sh4 insns.\n"
+msgstr ""
+
+#: config/tc-sh.c:1861 config/tc-w65.c:883
+msgid "call to tc_Nout_fix_to_chars \n"
+msgstr ""
+
+#: config/tc-sh.c:1947
+msgid ".uses does not refer to a local symbol in the same section"
+msgstr ""
+
+#: config/tc-sh.c:1966
+msgid "can't find fixup pointed to by .uses"
+msgstr ""
+
+#: config/tc-sh.c:1989
+msgid ".uses target does not refer to a local symbol in the same section"
+msgstr ""
+
+#: config/tc-sh.c:2086
+#, c-format
+msgid "at 0x%lx, displacement overflows 12-bit field"
+msgstr ""
+
+#: config/tc-sh.c:2089
+#, c-format
+msgid "at 0x%lx, displacement to defined symbol %s overflows 12-bit field"
+msgstr ""
+
+#: config/tc-sh.c:2093
+#, c-format
+msgid "at 0x%lx, displacement to undefined symbol %s overflows 12-bit field"
+msgstr ""
+
+#: config/tc-sh.c:2209
+#, c-format
+msgid "at 0x%lx, displacement overflows 8-bit field"
+msgstr ""
+
+#: config/tc-sh.c:2212
+#, c-format
+msgid "at 0x%lx, displacement to defined symbol %s overflows 8-bit field "
+msgstr ""
+
+#: config/tc-sh.c:2216
+#, c-format
+msgid "at 0x%lx, displacement to undefined symbol %s overflows 8-bit field "
+msgstr ""
+
+#: config/tc-sh.c:2269
+#, c-format
+msgid "overflow in branch to %s; converted into longer instruction sequence"
+msgstr ""
+
+#: config/tc-sh.c:2344 config/tc-sh.c:2372 config/tc-sparc.c:3902
+#: config/tc-sparc.c:3921
+msgid "misaligned data"
+msgstr ""
+
+#: config/tc-sh.c:2662
+msgid "misaligned offset"
+msgstr ""
+
+#: config/tc-sparc.c:268
+msgid "Invalid default architecture, broken assembler."
+msgstr ""
+
+#: config/tc-sparc.c:272 config/tc-sparc.c:465
+msgid "Bad opcode table, broken assembler."
+msgstr ""
+
+#: config/tc-sparc.c:444
+#, c-format
+msgid "invalid architecture -xarch=%s"
+msgstr ""
+
+#: config/tc-sparc.c:459
+#, c-format
+msgid "invalid architecture -A%s"
+msgstr ""
+
+#: config/tc-sparc.c:526
+#, c-format
+msgid "No compiled in support for %d bit object file format"
+msgstr ""
+
+#: config/tc-sparc.c:563
+msgid "Unrecognized option following -K"
+msgstr ""
+
+#: config/tc-sparc.c:595
+msgid "SPARC options:\n"
+msgstr ""
+
+#: config/tc-sparc.c:603
+msgid ""
+"\n"
+"-xarch=v8plus | -xarch=v8plusa\n"
+msgstr ""
+
+#: config/tc-sparc.c:604
+msgid ""
+"\t\t\tspecify variant of SPARC architecture\n"
+"-bump\t\t\twarn when assembler switches architectures\n"
+"-sparc\t\t\tignored\n"
+"--enforce-aligned-data\tforce .long, etc., to be aligned correctly\n"
+msgstr ""
+
+#: config/tc-sparc.c:610
+msgid "-k\t\t\tgenerate PIC\n"
+msgstr ""
+
+#: config/tc-sparc.c:614
+msgid ""
+"-32\t\t\tcreate 32 bit object file\n"
+"-64\t\t\tcreate 64 bit object file\n"
+msgstr ""
+
+#: config/tc-sparc.c:617
+#, c-format
+msgid "\t\t\t[default is %d]\n"
+msgstr ""
+
+#: config/tc-sparc.c:619
+msgid ""
+"-TSO\t\t\tuse Total Store Ordering\n"
+"-PSO\t\t\tuse Partial Store Ordering\n"
+"-RMO\t\t\tuse Relaxed Memory Ordering\n"
+msgstr ""
+
+#: config/tc-sparc.c:623
+#, c-format
+msgid "\t\t\t[default is %s]\n"
+msgstr ""
+
+#: config/tc-sparc.c:625
+msgid ""
+"-KPIC\t\t\tgenerate PIC\n"
+"-V\t\t\tprint assembler version number\n"
+"-undeclared-regs\tignore application global register usage without\n"
+"\t\t\tappropriate .register directive (default)\n"
+"-no-undeclared-regs\tforce error on application global register usage\n"
+"\t\t\twithout appropriate .register directive\n"
+"-q\t\t\tignored\n"
+"-Qy, -Qn\t\tignored\n"
+"-s\t\t\tignored\n"
+msgstr ""
+
+#: config/tc-sparc.c:637
+msgid ""
+"-EL\t\t\tgenerate code for a little endian machine\n"
+"-EB\t\t\tgenerate code for a big endian machine\n"
+"--little-endian-data\tgenerate code for a machine having big endian\n"
+" instructions and little endian data.\n"
+msgstr ""
+
+#: config/tc-sparc.c:754
+#, c-format
+msgid "Internal error: losing opcode: `%s' \"%s\"\n"
+msgstr ""
+
+#: config/tc-sparc.c:772
+#, c-format
+msgid "Internal error: can't find opcode `%s' for `%s'\n"
+msgstr ""
+
+#: config/tc-sparc.c:921
+msgid "Support for 64-bit arithmetic not compiled in."
+msgstr ""
+
+#: config/tc-sparc.c:967
+msgid "set: number not in 0..4294967295 range"
+msgstr ""
+
+#: config/tc-sparc.c:974
+msgid "set: number not in -2147483648..4294967295 range"
+msgstr ""
+
+#: config/tc-sparc.c:1034
+msgid "setsw: number not in -2147483648..4294967295 range"
+msgstr ""
+
+#: config/tc-sparc.c:1082
+msgid "setx: temporary register same as destination register"
+msgstr ""
+
+#: config/tc-sparc.c:1152
+msgid "setx: illegal temporary register g0"
+msgstr ""
+
+#: config/tc-sparc.c:1249
+msgid "FP branch in delay slot"
+msgstr ""
+
+#: config/tc-sparc.c:1265
+msgid "FP branch preceded by FP instruction; NOP inserted"
+msgstr ""
+
+#: config/tc-sparc.c:1305
+msgid "failed special case insn sanity check"
+msgstr ""
+
+#: config/tc-sparc.c:1396
+msgid ": invalid membar mask name"
+msgstr ""
+
+#: config/tc-sparc.c:1410
+msgid ": invalid membar mask expression"
+msgstr ""
+
+#: config/tc-sparc.c:1415
+msgid ": invalid membar mask number"
+msgstr ""
+
+#: config/tc-sparc.c:1433
+msgid ": invalid prefetch function name"
+msgstr ""
+
+#: config/tc-sparc.c:1441
+msgid ": invalid prefetch function expression"
+msgstr ""
+
+#: config/tc-sparc.c:1446
+msgid ": invalid prefetch function number"
+msgstr ""
+
+#: config/tc-sparc.c:1474 config/tc-sparc.c:1486
+msgid ": unrecognizable privileged register"
+msgstr ""
+
+#: config/tc-sparc.c:1510 config/tc-sparc.c:1527
+msgid ": unrecognizable v9a ancillary state register"
+msgstr ""
+
+#: config/tc-sparc.c:1515
+msgid ": rd on write only ancillary state register"
+msgstr ""
+
+#: config/tc-sparc.c:1551
+msgid ": asr number must be between 16 and 31"
+msgstr ""
+
+#: config/tc-sparc.c:1559
+msgid ": asr number must be between 0 and 31"
+msgstr ""
+
+#: config/tc-sparc.c:1569
+msgid ": expecting %asrN"
+msgstr ""
+
+#: config/tc-sparc.c:1897
+msgid "detected global register use not covered by .register pseudo-op"
+msgstr ""
+
+#: config/tc-sparc.c:1969
+msgid ": There are only 64 f registers; [0-63]"
+msgstr ""
+
+#: config/tc-sparc.c:1971 config/tc-sparc.c:1983
+msgid ": There are only 32 f registers; [0-31]"
+msgstr ""
+
+#: config/tc-sparc.c:2102 config/tc-sparc.c:2138
+msgid "Illegal operands: %%%s requires arguments in ()"
+msgstr ""
+
+#: config/tc-sparc.c:2150
+msgid ""
+"Illegal operands: Can't do arithmetics other than + and - involving %%%s()"
+msgstr ""
+
+#: config/tc-sparc.c:2259
+msgid "Illegal operands: Can't add non-constant expression to %%%s()"
+msgstr ""
+
+#: config/tc-sparc.c:2269
+msgid ""
+"Illegal operands: Can't do arithmetics involving %%%s() of a relocatable "
+"symbol"
+msgstr ""
+
+#: config/tc-sparc.c:2287
+msgid ": PC-relative operand can't be a constant"
+msgstr ""
+
+#: config/tc-sparc.c:2320
+msgid ": invalid ASI name"
+msgstr ""
+
+#: config/tc-sparc.c:2328
+msgid ": invalid ASI expression"
+msgstr ""
+
+#: config/tc-sparc.c:2333
+msgid ": invalid ASI number"
+msgstr ""
+
+#: config/tc-sparc.c:2430
+msgid "OPF immediate operand out of range (0-0x1ff)"
+msgstr ""
+
+#: config/tc-sparc.c:2435
+msgid "non-immediate OPF operand, ignored"
+msgstr ""
+
+#: config/tc-sparc.c:2454
+msgid ": invalid cpreg name"
+msgstr ""
+
+#: config/tc-sparc.c:2483
+#, c-format
+msgid "Illegal operands%s"
+msgstr ""
+
+#: config/tc-sparc.c:2512
+#, c-format
+msgid "architecture bumped from \"%s\" to \"%s\" on \"%s\""
+msgstr ""
+
+#: config/tc-sparc.c:2548
+#, c-format
+msgid "Architecture mismatch on \"%s\"."
+msgstr ""
+
+#: config/tc-sparc.c:2549
+#, c-format
+msgid " (Requires %s; requested architecture is %s.)"
+msgstr ""
+
+#: config/tc-sparc.c:3073
+#, c-format
+msgid "bad or unhandled relocation type: 0x%02x"
+msgstr ""
+
+#: config/tc-sparc.c:3375
+msgid "bad .reserve segment -- expected BSS segment"
+msgstr ""
+
+#: config/tc-sparc.c:3392
+msgid "missing alignment"
+msgstr ""
+
+#: config/tc-sparc.c:3403 config/tc-sparc.c:3548
+#, c-format
+msgid "alignment too large; assuming %d"
+msgstr ""
+
+#: config/tc-sparc.c:3409 config/tc-sparc.c:3554
+msgid "negative alignment"
+msgstr ""
+
+#: config/tc-sparc.c:3419 config/tc-sparc.c:3577
+msgid "alignment not a power of 2"
+msgstr ""
+
+#: config/tc-sparc.c:3534
+msgid "Expected comma after common length"
+msgstr ""
+
+#: config/tc-sparc.c:3769 config/tc-sparc.c:3779
+msgid "register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"
+msgstr ""
+
+#: config/tc-sparc.c:3797
+msgid "redefinition of global register"
+msgstr ""
+
+#: config/tc-sparc.c:3808
+#, c-format
+msgid "Register symbol %s already defined."
+msgstr ""
+
+#: config/tc-tahoe.c:387
+msgid "The -a option doesn't exist. (Despite what the man page says!"
+msgstr ""
+
+#: config/tc-tahoe.c:391 config/tc-vax.c:3141
+#, c-format
+msgid "Displacement length %s ignored!"
+msgstr ""
+
+#: config/tc-tahoe.c:395 config/tc-vax.c:3133
+msgid "SYMBOL TABLE not implemented"
+msgstr ""
+
+#: config/tc-tahoe.c:399 config/tc-vax.c:3137
+msgid "TOKEN TRACE not implemented"
+msgstr ""
+
+#: config/tc-tahoe.c:403 config/tc-vax.c:3145
+#, c-format
+msgid "I don't need or use temp. file \"%s\"."
+msgstr ""
+
+#: config/tc-tahoe.c:407 config/tc-vax.c:3149
+msgid "I don't use an interpass file! -V ignored"
+msgstr ""
+
+#: config/tc-tahoe.c:421
+msgid ""
+"Tahoe options:\n"
+"-a\t\t\tignored\n"
+"-d LENGTH\t\tignored\n"
+"-J\t\t\tignored\n"
+"-S\t\t\tignored\n"
+"-t FILE\t\t\tignored\n"
+"-T\t\t\tignored\n"
+"-V\t\t\tignored\n"
+msgstr ""
+
+#: config/tc-tahoe.c:1075
+msgid "Casting a branch displacement is bad form, and is ignored."
+msgstr ""
+
+#: config/tc-tahoe.c:1131
+msgid "Couldn't parse the [index] in this operand."
+msgstr ""
+
+#: config/tc-tahoe.c:1137
+msgid "Couldn't find the opening '[' for the index of this operand."
+msgstr ""
+
+#: config/tc-tahoe.c:1177
+msgid "Couldn't find the opening '(' for the deref of this operand."
+msgstr ""
+
+#: config/tc-tahoe.c:1187
+msgid "Operand can't be both pre-inc and post-dec."
+msgstr ""
+
+#: config/tc-tahoe.c:1217
+msgid "I parsed 2 registers in this operand."
+msgstr ""
+
+#: config/tc-tahoe.c:1267
+msgid "Can't relocate expression error."
+msgstr ""
+
+#. This is an error. Tahoe doesn't allow any expressions
+#. bigger that a 32 bit long word. Any bigger has to be referenced
+#. by address.
+#: config/tc-tahoe.c:1274
+msgid "Expression is too large for a 32 bits."
+msgstr ""
+
+#: config/tc-tahoe.c:1279
+msgid "Junk at end of expression."
+msgstr ""
+
+#: config/tc-tahoe.c:1319
+msgid "Syntax error in direct register mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1321
+msgid "You can't index a register in direct register mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1324
+msgid "SP can't be the source operand with direct register addressing."
+msgstr ""
+
+#: config/tc-tahoe.c:1326
+msgid "Can't take the address of a register."
+msgstr ""
+
+#: config/tc-tahoe.c:1328
+msgid "Direct Register can't be used in a branch."
+msgstr ""
+
+#: config/tc-tahoe.c:1330
+msgid "For quad access, the register must be even and < 14."
+msgstr ""
+
+#: config/tc-tahoe.c:1332
+msgid "You can't cast a direct register."
+msgstr ""
+
+#: config/tc-tahoe.c:1338
+msgid "Using reg 14 for quadwords can tromp the FP register."
+msgstr ""
+
+#: config/tc-tahoe.c:1350
+msgid "Syntax error in auto-dec mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1352
+msgid "You can't have an index auto dec mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1354
+msgid "Auto dec mode cant be used for reading."
+msgstr ""
+
+#: config/tc-tahoe.c:1356
+msgid "Auto dec only works of the SP register."
+msgstr ""
+
+#: config/tc-tahoe.c:1358
+msgid "Auto dec can't be used in a branch."
+msgstr ""
+
+#: config/tc-tahoe.c:1360
+msgid "Auto dec won't work with quadwords."
+msgstr ""
+
+#: config/tc-tahoe.c:1367
+msgid "Syntax error in one of the auto-inc modes."
+msgstr ""
+
+#: config/tc-tahoe.c:1373
+msgid "Auto inc deferred only works of the SP register."
+msgstr ""
+
+#: config/tc-tahoe.c:1375
+msgid "You can't have an index auto inc deferred mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1377 config/tc-tahoe.c:1388
+msgid "Auto inc can't be used in a branch."
+msgstr ""
+
+#: config/tc-tahoe.c:1384
+msgid "You can't write to an auto inc register."
+msgstr ""
+
+#: config/tc-tahoe.c:1386
+msgid "Auto inc only works of the SP register."
+msgstr ""
+
+#: config/tc-tahoe.c:1390
+msgid "Auto inc won't work with quadwords."
+msgstr ""
+
+#: config/tc-tahoe.c:1392
+msgid "You can't have an index in auto inc mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1400
+msgid "You can't index the sp register."
+msgstr ""
+
+#: config/tc-tahoe.c:1406
+msgid "Syntax error in register displaced mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1425
+msgid "An offest is needed for this operand."
+msgstr ""
+
+#: config/tc-tahoe.c:1437
+msgid "You can't index a register in immediate mode."
+msgstr ""
+
+#: config/tc-tahoe.c:1439
+msgid "Immediate access can't be used as an address."
+msgstr ""
+
+#: config/tc-tahoe.c:1550
+#, c-format
+msgid "Compiler bug: ODD number of bytes in arg structure %s."
+msgstr ""
+
+#: config/tc-tahoe.c:1577 config/tc-vax.c:1847
+msgid "Not enough operands"
+msgstr ""
+
+#: config/tc-tahoe.c:1587 config/tc-vax.c:1854
+msgid "Too many operands"
+msgstr ""
+
+#: config/tc-tahoe.c:1638 config/tc-vax.c:368
+#, c-format
+msgid "Ignoring statement due to \"%s\""
+msgstr ""
+
+#: config/tc-tahoe.c:1733
+#, c-format
+msgid "Compliler bug: Got a case (%d) I wasn't expecting."
+msgstr ""
+
+#: config/tc-tahoe.c:1827
+msgid "Real branch displacements must be expressions."
+msgstr ""
+
+#: config/tc-tahoe.c:1830
+#, c-format
+msgid "Complier error: I got an unknown synthetic branch :%c"
+msgstr ""
+
+#: config/tc-tahoe.c:1971
+#, c-format
+msgid "Barf, bad mode %x\n"
+msgstr ""
+
+#: config/tc-tic80.c:90
+msgid "Relaxation is a luxury we can't afford"
+msgstr ""
+
+#: config/tc-tic80.c:141
+msgid "bad call to md_atof ()"
+msgstr ""
+
+#: config/tc-tic80.c:245
+msgid "':' not followed by 'm' or 's'"
+msgstr ""
+
+#: config/tc-tic80.c:259
+msgid "paren nesting"
+msgstr ""
+
+#: config/tc-tic80.c:274
+msgid "mismatched parenthesis"
+msgstr ""
+
+#: config/tc-tic80.c:467
+msgid "unhandled expression type"
+msgstr ""
+
+#: config/tc-tic80.c:682
+msgid "symbol reloc that is not PC relative or 32 bits"
+msgstr ""
+
+#: config/tc-tic80.c:705
+msgid "unhandled operand modifier"
+msgstr ""
+
+#: config/tc-tic80.c:746
+msgid "unhandled expression"
+msgstr ""
+
+#: config/tc-tic80.c:797
+#, c-format
+msgid "Invalid mnemonic: '%s'"
+msgstr ""
+
+#: config/tc-tic80.c:813
+#, c-format
+msgid "Invalid operands: '%s'"
+msgstr ""
+
+#: config/tc-tic80.c:890
+msgid "unhandled predefined symbol bits"
+msgstr ""
+
+#: config/tc-tic80.c:986
+#, c-format
+msgid "PC offset 0x%lx outside range 0x%lx-0x%lx"
+msgstr ""
+
+#: config/tc-tic80.c:1001
+msgid "unhandled relocation type in fixup"
+msgstr ""
+
+#: config/tc-tic80.c:1038
+msgid "md_convert_frag() not implemented yet"
+msgstr ""
+
+#: config/tc-v850.c:273
+#, c-format
+msgid ".COMMon length (%d.) < 0! Ignored."
+msgstr ""
+
+#: config/tc-v850.c:1000
+#, c-format
+msgid "unknown operand shift: %x\n"
+msgstr ""
+
+#: config/tc-v850.c:1001
+msgid "internal failure in parse_register_list"
+msgstr ""
+
+#: config/tc-v850.c:1019
+msgid "constant expression or register list expected"
+msgstr ""
+
+#: config/tc-v850.c:1024 config/tc-v850.c:1037 config/tc-v850.c:1056
+msgid "high bits set in register list expression"
+msgstr ""
+
+#: config/tc-v850.c:1096 config/tc-v850.c:1160
+msgid "illegal register included in list"
+msgstr ""
+
+#: config/tc-v850.c:1103
+msgid "system registers cannot be included in list"
+msgstr ""
+
+#: config/tc-v850.c:1108
+msgid "PSW cannot be included in list"
+msgstr ""
+
+#: config/tc-v850.c:1115
+msgid "High value system registers cannot be included in list"
+msgstr ""
+
+#: config/tc-v850.c:1139
+msgid "second register should follow dash in register list"
+msgstr ""
+
+#: config/tc-v850.c:1187
+msgid " V850 options:\n"
+msgstr ""
+
+#: config/tc-v850.c:1188
+msgid " -mwarn-signed-overflow Warn if signed immediate values overflow\n"
+msgstr ""
+
+#: config/tc-v850.c:1189
+msgid ""
+" -mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n"
+msgstr ""
+
+#: config/tc-v850.c:1190
+msgid " -mv850 The code is targeted at the v850\n"
+msgstr ""
+
+#: config/tc-v850.c:1191
+msgid " -mv850e The code is targeted at the v850e\n"
+msgstr ""
+
+#: config/tc-v850.c:1192
+msgid " -mv850ea The code is targeted at the v850ea\n"
+msgstr ""
+
+#: config/tc-v850.c:1193
+msgid ""
+" -mv850any The code is generic, despite any processor "
+"specific instructions\n"
+msgstr ""
+
+#: config/tc-v850.c:1204 config/tc-v850.c:1239
+#, c-format
+msgid "unknown command line option: -%c%s\n"
+msgstr ""
+
+#: config/tc-v850.c:1393
+#, c-format
+msgid "Unable to determine default target processor from string: %s"
+msgstr ""
+
+#: config/tc-v850.c:1442
+msgid "ctoff() relocation used on an instruction which does not support it"
+msgstr ""
+
+#: config/tc-v850.c:1459
+msgid "sdaoff() relocation used on an instruction which does not support it"
+msgstr ""
+
+#: config/tc-v850.c:1476
+msgid "zdaoff() relocation used on an instruction which does not support it"
+msgstr ""
+
+#: config/tc-v850.c:1494
+msgid "tdaoff() relocation used on an instruction which does not support it"
+msgstr ""
+
+#: config/tc-v850.c:1712
+msgid "Target processor does not support this instruction."
+msgstr ""
+
+#: config/tc-v850.c:1802 config/tc-v850.c:1832 config/tc-v850.c:2018
+msgid "immediate operand is too large"
+msgstr ""
+
+#: config/tc-v850.c:1814
+msgid "AAARG -> unhandled constant reloc"
+msgstr ""
+
+#: config/tc-v850.c:1858
+msgid "invalid register name"
+msgstr ""
+
+#: config/tc-v850.c:1863
+msgid "register r0 cannot be used here"
+msgstr ""
+
+#: config/tc-v850.c:1875
+msgid "invalid system register name"
+msgstr ""
+
+#: config/tc-v850.c:1888
+msgid "expected EP register"
+msgstr ""
+
+#: config/tc-v850.c:1904
+msgid "invalid condition code name"
+msgstr ""
+
+#: config/tc-v850.c:1925 config/tc-v850.c:1929
+msgid "constant too big to fit into instruction"
+msgstr ""
+
+#: config/tc-v850.c:1981
+msgid "syntax error: value is missing before the register name"
+msgstr ""
+
+#: config/tc-v850.c:1983
+msgid "syntax error: register not expected"
+msgstr ""
+
+#: config/tc-v850.c:1997
+msgid "syntax error: system register not expected"
+msgstr ""
+
+#: config/tc-v850.c:2002
+msgid "syntax error: condition code not expected"
+msgstr ""
+
+#: config/tc-v850.c:2038
+msgid "invalid operand"
+msgstr ""
+
+#: config/tc-vax.c:263
+#, c-format
+msgid "VIP_BEGIN error:%s"
+msgstr ""
+
+#: config/tc-vax.c:387
+#, c-format
+msgid "Ignoring statement because \"%s\""
+msgstr ""
+
+#: config/tc-vax.c:434
+msgid "Can't relocate expression"
+msgstr ""
+
+#: config/tc-vax.c:537
+msgid "Bignum not permitted in short literal. Immediate mode assumed."
+msgstr ""
+
+#: config/tc-vax.c:546
+msgid "Can't do flonum short literal: immediate mode used."
+msgstr ""
+
+#: config/tc-vax.c:591
+#, c-format
+msgid "A bignum/flonum may not be a displacement: 0x%lx used"
+msgstr ""
+
+#: config/tc-vax.c:913
+#, c-format
+msgid "Short literal overflow(%ld.), immediate mode assumed."
+msgstr ""
+
+#: config/tc-vax.c:922
+#, c-format
+msgid "Forced short literal to immediate mode. now_seg=%s to_seg=%s"
+msgstr ""
+
+#: config/tc-vax.c:981
+msgid "Length specification ignored. Address mode 9F used"
+msgstr ""
+
+#: config/tc-vax.c:1030
+msgid "Invalid operand: immediate value used as base address."
+msgstr ""
+
+#: config/tc-vax.c:1032
+msgid "Invalid operand: immediate value used as address."
+msgstr ""
+
+#: config/tc-vax.c:1826
+msgid "odd number of bytes in operand description"
+msgstr ""
+
+#: config/tc-vax.c:1842
+msgid "Bad operand"
+msgstr ""
+
+#: config/tc-vax.c:2399
+msgid "no '[' to match ']'"
+msgstr ""
+
+#: config/tc-vax.c:2417
+msgid "bad register in []"
+msgstr ""
+
+#: config/tc-vax.c:2419
+msgid "[PC] index banned"
+msgstr ""
+
+#: config/tc-vax.c:2454
+msgid "no '(' to match ')'"
+msgstr ""
+
+#: config/tc-vax.c:2589
+msgid "invalid branch operand"
+msgstr ""
+
+#: config/tc-vax.c:2618
+msgid "address prohibits @"
+msgstr ""
+
+#: config/tc-vax.c:2620
+msgid "address prohibits #"
+msgstr ""
+
+#: config/tc-vax.c:2624
+msgid "address prohibits -()"
+msgstr ""
+
+#: config/tc-vax.c:2626
+msgid "address prohibits ()+"
+msgstr ""
+
+#: config/tc-vax.c:2629
+msgid "address prohibits ()"
+msgstr ""
+
+#: config/tc-vax.c:2631
+msgid "address prohibits []"
+msgstr ""
+
+#: config/tc-vax.c:2633
+msgid "address prohibits register"
+msgstr ""
+
+#: config/tc-vax.c:2635
+msgid "address prohibits displacement length specifier"
+msgstr ""
+
+#: config/tc-vax.c:2665
+msgid "invalid operand of S^#"
+msgstr ""
+
+#: config/tc-vax.c:2682
+msgid "S^# needs expression"
+msgstr ""
+
+#: config/tc-vax.c:2689
+msgid "S^# may only read-access"
+msgstr ""
+
+#: config/tc-vax.c:2714
+msgid "invalid operand of -()"
+msgstr ""
+
+#: config/tc-vax.c:2720
+msgid "-(PC) unpredictable"
+msgstr ""
+
+#: config/tc-vax.c:2722
+msgid "[]index same as -()register: unpredictable"
+msgstr ""
+
+#: config/tc-vax.c:2758
+msgid "invalid operand of ()+"
+msgstr ""
+
+#: config/tc-vax.c:2764
+msgid "(PC)+ unpredictable"
+msgstr ""
+
+#: config/tc-vax.c:2766
+msgid "[]index same as ()+register: unpredictable"
+msgstr ""
+
+#: config/tc-vax.c:2791
+msgid "# conflicts length"
+msgstr ""
+
+#: config/tc-vax.c:2793
+msgid "# bars register"
+msgstr ""
+
+#: config/tc-vax.c:2815
+msgid "writing or modifying # is unpredictable"
+msgstr ""
+
+#: config/tc-vax.c:2845
+msgid "length not needed"
+msgstr ""
+
+#: config/tc-vax.c:2852
+msgid "can't []index a register, because it has no address"
+msgstr ""
+
+#: config/tc-vax.c:2854
+msgid "a register has no address"
+msgstr ""
+
+#: config/tc-vax.c:2865
+msgid "PC part of operand unpredictable"
+msgstr ""
+
+#: config/tc-vax.c:3194
+msgid ""
+"VAX options:\n"
+"-d LENGTH\t\tignored\n"
+"-J\t\t\tignored\n"
+"-S\t\t\tignored\n"
+"-t FILE\t\t\tignored\n"
+"-T\t\t\tignored\n"
+"-V\t\t\tignored\n"
+msgstr ""
+
+#: config/tc-vax.c:3203
+msgid ""
+"VMS options:\n"
+"-+\t\t\thash encode names longer than 31 characters\n"
+"-1\t\t\t`const' handling compatible with gcc 1.x\n"
+"-H\t\t\tshow new symbol after hash truncation\n"
+"-h NUM\t\t\tdon't hash mixed-case names, and adjust case:\n"
+"\t\t\t0 = upper, 2 = lower, 3 = preserve case\n"
+"-v\"VERSION\"\t\tcode being assembled was produced by compiler \"VERSION\"\n"
+msgstr ""
+
+#: config/tc-w65.c:136
+msgid "need on or off."
+msgstr ""
+
+#: config/tc-w65.c:321 config/tc-w65.c:364
+msgid "syntax error after <exp"
+msgstr ""
+
+#: config/tc-z8k.c:290
+#, c-format
+msgid "register rr%d, out of range."
+msgstr ""
+
+#: config/tc-z8k.c:298
+#, c-format
+msgid "register rh%d, out of range."
+msgstr ""
+
+#: config/tc-z8k.c:306
+#, c-format
+msgid "register rl%d, out of range."
+msgstr ""
+
+#: config/tc-z8k.c:315
+#, c-format
+msgid "register rq%d, out of range."
+msgstr ""
+
+#: config/tc-z8k.c:323
+#, c-format
+msgid "register r%d, out of range."
+msgstr ""
+
+#: config/tc-z8k.c:374
+#, c-format
+msgid "expected %c"
+msgstr ""
+
+#: config/tc-z8k.c:390
+#, c-format
+msgid "register is wrong size for a word %s"
+msgstr ""
+
+#: config/tc-z8k.c:405
+#, c-format
+msgid "register is wrong size for address %s"
+msgstr ""
+
+#: config/tc-z8k.c:680
+msgid "Missing ) in ra(rb)"
+msgstr ""
+
+#: config/tc-z8k.c:947
+#, c-format
+msgid "operand %s0x%x out of range."
+msgstr ""
+
+#: config/tc-z8k.c:1086
+msgid "immediate must be 1 or 2"
+msgstr ""
+
+#: config/tc-z8k.c:1091
+msgid "immediate 1 or 2 expected"
+msgstr ""
+
+#: config/tc-z8k.c:1119
+msgid "can't use R0 here"
+msgstr ""
+
+#: config/tc-z8k.c:1278
+msgid "Can't find opcode to match operands"
+msgstr ""
+
+#: config/tc-z8k.c:1390
+#, c-format
+msgid "invalid architecture -z%s"
+msgstr ""
+
+#: config/tc-z8k.c:1406
+msgid ""
+"Z8K options:\n"
+"-z8001\t\t\tgenerate segmented code\n"
+"-z8002\t\t\tgenerate unsegmented code\n"
+msgstr ""
+
+#: config/tc-z8k.c:1543
+#, c-format
+msgid "Can't subtract symbols in different sections %s %s"
+msgstr ""
+
+#: depend.c:195
+#, c-format
+msgid "Can't open `%s' for writing"
+msgstr ""
+
+#: depend.c:207
+#, c-format
+msgid "Can't close `%s'"
+msgstr ""
+
+#: ecoff.c:1577
+#, c-format
+msgid "String too big (%lu bytes)"
+msgstr ""
+
+#: ecoff.c:1603
+#, c-format
+msgid "Inserting \"%s\" into string hash table: %s"
+msgstr ""
+
+#: ecoff.c:1635 ecoff.c:1828 ecoff.c:1854 ecoff.c:1886 ecoff.c:2042
+#: ecoff.c:2156
+msgid "no current file pointer"
+msgstr ""
+
+#: ecoff.c:1722
+msgid "too many st_End's"
+msgstr ""
+
+#: ecoff.c:2068
+#, c-format
+msgid "Inserting \"%s\" into tag hash table: %s"
+msgstr ""
+
+#: ecoff.c:2234
+msgid "fake .file after real one"
+msgstr ""
+
+#: ecoff.c:2322
+msgid "Filename goes over one page boundary."
+msgstr ""
+
+#: ecoff.c:2457
+msgid ".begin directive without a preceding .file directive"
+msgstr ""
+
+#: ecoff.c:2464
+msgid ".begin directive without a preceding .ent directive"
+msgstr ""
+
+#: ecoff.c:2496
+msgid ".bend directive without a preceding .file directive"
+msgstr ""
+
+#: ecoff.c:2503
+msgid ".bend directive without a preceding .ent directive"
+msgstr ""
+
+#: ecoff.c:2516
+msgid ".bend directive names unknown symbol"
+msgstr ""
+
+#: ecoff.c:2560
+msgid ".def pseudo-op used inside of .def/.endef; ignored"
+msgstr ""
+
+#: ecoff.c:2562
+msgid "Empty symbol name in .def; ignored"
+msgstr ""
+
+#: ecoff.c:2600
+msgid ".dim pseudo-op used outside of .def/.endef; ignored"
+msgstr ""
+
+#: ecoff.c:2615
+msgid "Badly formed .dim directive"
+msgstr ""
+
+#: ecoff.c:2628
+msgid "Too many .dim entries"
+msgstr ""
+
+#: ecoff.c:2649
+msgid ".scl pseudo-op used outside of .def/.endef; ignored"
+msgstr ""
+
+#: ecoff.c:2675
+msgid ".size pseudo-op used outside of .def/.endef; ignored"
+msgstr ""
+
+#: ecoff.c:2690
+msgid "Badly formed .size directive"
+msgstr ""
+
+#: ecoff.c:2703
+msgid "Too many .size entries"
+msgstr ""
+
+#: ecoff.c:2726
+msgid ".type pseudo-op used outside of .def/.endef; ignored"
+msgstr ""
+
+#. FIXME: We could handle this by setting the continued bit.
+#. There would still be a limit: the .type argument can not
+#. be infinite.
+#: ecoff.c:2744
+#, c-format
+msgid "The type of %s is too complex; it will be simplified"
+msgstr ""
+
+#: ecoff.c:2755
+msgid "Unrecognized .type argument"
+msgstr ""
+
+#: ecoff.c:2794
+msgid ".tag pseudo-op used outside of .def/.endef; ignored"
+msgstr ""
+
+#: ecoff.c:2821
+msgid ".val pseudo-op used outside of .def/.endef; ignored"
+msgstr ""
+
+#: ecoff.c:2829
+msgid ".val expression is too copmlex"
+msgstr ""
+
+#: ecoff.c:2860
+msgid ".endef pseudo-op used before .def; ignored"
+msgstr ""
+
+#: ecoff.c:2886
+msgid "Bad COFF debugging info"
+msgstr ""
+
+#: ecoff.c:2935
+#, c-format
+msgid "No tag specified for %s"
+msgstr ""
+
+#: ecoff.c:2967
+msgid "Bad COFF debugging information"
+msgstr ""
+
+#: ecoff.c:3039
+msgid ".end directive without a preceding .file directive"
+msgstr ""
+
+#: ecoff.c:3046
+msgid ".end directive without a preceding .ent directive"
+msgstr ""
+
+#: ecoff.c:3069
+msgid ".end directive names unknown symbol"
+msgstr ""
+
+#: ecoff.c:3098
+msgid "second .ent directive found before .end directive"
+msgstr ""
+
+#: ecoff.c:3173
+msgid "No way to handle .file within .ent/.end section"
+msgstr ""
+
+#: ecoff.c:3198
+msgid ".fmask outside of .ent"
+msgstr ""
+
+#: ecoff.c:3267
+msgid ".mask outside of .ent"
+msgstr ""
+
+#: ecoff.c:3297
+msgid ".loc before .file"
+msgstr ""
+
+#: ecoff.c:3423
+#, c-format
+msgid "Ignoring attempt to redefine symbol `%s'."
+msgstr ""
+
+#: ecoff.c:3436
+msgid "bad .weakext directive"
+msgstr ""
+
+#: ecoff.c:3505
+#, c-format
+msgid ".stab%c is not supported"
+msgstr ""
+
+#: ecoff.c:3515
+#, c-format
+msgid ".stab%c: ignoring non-zero other field"
+msgstr ""
+
+#: ecoff.c:3549
+#, c-format
+msgid ""
+"Line number (%d) for .stab%c directive cannot fit in index field (20 bits)"
+msgstr ""
+
+#: ecoff.c:3585
+#, c-format
+msgid "Illegal .stab%c directive, bad character"
+msgstr ""
+
+#: ecoff.c:4047 ecoff.c:4236 ecoff.c:4261
+msgid ".begin/.bend in different segments"
+msgstr ""
+
+#: ecoff.c:4762
+msgid "Missing .end or .bend at end of file"
+msgstr ""
+
+#: ecoff.c:5253
+msgid "GP prologue size exceeds field size, using 0 instead"
+msgstr ""
+
+#: expr.c:250
+msgid ""
+"bad floating-point constant: exponent overflow, probably assembling junk"
+msgstr ""
+
+#: expr.c:254
+#, c-format
+msgid "bad floating-point constant: unknown error code=%d."
+msgstr ""
+
+#: expr.c:434
+msgid ""
+"A bignum with underscores may not have more than 8 hex digits in any word."
+msgstr ""
+
+#: expr.c:454
+msgid "A bignum with underscores must have exactly 4 words."
+msgstr ""
+
+#. either not seen or not defined.
+#. @@ Should print out the original string instead of
+#. the parsed number.
+#: expr.c:583
+#, c-format
+msgid "backw. ref to unknown label \"%d:\", 0 assumed."
+msgstr ""
+
+#: expr.c:707
+msgid "Character constant too large"
+msgstr ""
+
+#: expr.c:947
+#, c-format
+msgid "expr.c(operand): bad atof_generic return val %d"
+msgstr ""
+
+#: expr.c:1007
+msgid "Missing ')' assumed"
+msgstr ""
+
+#: expr.c:1018 read.c:3866
+msgid "EBCDIC constants are not supported"
+msgstr ""
+
+#: expr.c:1088
+#, c-format
+msgid "Unary operator %c ignored because bad operand follows"
+msgstr ""
+
+#: expr.c:1134 expr.c:1159
+msgid "syntax error in .startof. or .sizeof."
+msgstr ""
+
+#: expr.c:1312
+msgid "Bad expression"
+msgstr ""
+
+#: expr.c:1677
+msgid "missing operand; zero assumed"
+msgstr ""
+
+#: expr.c:1710
+msgid "operation combines symbols in different segments"
+msgstr ""
+
+#: expr.c:1726
+msgid "left operand is a bignum; integer 0 assumed"
+msgstr ""
+
+#: expr.c:1728
+msgid "left operand is a float; integer 0 assumed"
+msgstr ""
+
+#: expr.c:1737
+msgid "right operand is a bignum; integer 0 assumed"
+msgstr ""
+
+#: expr.c:1739
+msgid "right operand is a float; integer 0 assumed"
+msgstr ""
+
+#: expr.c:1787 symbols.c:1109
+msgid "division by zero"
+msgstr ""
+
+#: frags.c:85
+#, c-format
+msgid "Can't extend frag %d. chars"
+msgstr ""
+
+#: frags.c:170
+msgid "attempt to allocate data in absolute section"
+msgstr ""
+
+#: frags.c:176
+msgid "attempt to allocate data in common section"
+msgstr ""
+
+#: gasp.c:455
+msgid "redefinition not allowed\n"
+msgstr ""
+
+#: gasp.c:529
+#, c-format
+msgid "the %c operator cannot take non-absolute arguments.\n"
+msgstr ""
+
+#: gasp.c:606
+msgid "string where expression expected.\n"
+msgstr ""
+
+#: gasp.c:612
+msgid "can't find primary in expression.\n"
+msgstr ""
+
+#: gasp.c:652
+msgid "misplaced closing parens.\n"
+msgstr ""
+
+#: gasp.c:689
+msgid "attempt to divide by zero.\n"
+msgstr ""
+
+#: gasp.c:721
+msgid "can't add two relocatable expressions\n"
+msgstr ""
+
+#: gasp.c:926
+msgid "unreasonable nesting.\n"
+msgstr ""
+
+#: gasp.c:1004
+msgid "End of file not at start of line.\n"
+msgstr ""
+
+#: gasp.c:1125
+#, c-format
+msgid "Illegal base character %c.\n"
+msgstr ""
+
+#: gasp.c:1240
+#, c-format
+msgid "radix is %c must be one of b, q, d or h"
+msgstr ""
+
+#: gasp.c:1276
+#, c-format
+msgid "size must be one of b, w or l, is %c.\n"
+msgstr ""
+
+#: gasp.c:1384
+msgid "datab repeat must be constant.\n"
+msgstr ""
+
+#: gasp.c:1386
+msgid "datab data must be absolute.\n"
+msgstr ""
+
+#: gasp.c:1400
+msgid "align needs absolute expression.\n"
+msgstr ""
+
+#: gasp.c:1407
+msgid ".align needs absolute fill value.\n"
+msgstr ""
+
+#: gasp.c:1435
+msgid "res needs absolute expression for fill count.\n"
+msgstr ""
+
+#: gasp.c:1515
+msgid "form LIN= needs absolute expresssion.\n"
+msgstr ""
+
+#: gasp.c:1518
+msgid "COL="
+msgstr ""
+
+#: gasp.c:1521
+msgid "form COL= needs absolute expresssion.\n"
+msgstr ""
+
+#. Turns the next expression into a string
+#: gasp.c:1563 macro.c:366
+#, c-format
+msgid "% operator needs absolute expression"
+msgstr ""
+
+#: gasp.c:1625
+msgid "misplaced ( .\n"
+msgstr ""
+
+#: gasp.c:1640
+msgid "misplaced ).\n"
+msgstr ""
+
+#: gasp.c:1694
+msgid ".instr needs absolute expresson.\n"
+msgstr ""
+
+#: gasp.c:1732
+msgid "need absolute position.\n"
+msgstr ""
+
+#: gasp.c:1734
+msgid "need absolute length.\n"
+msgstr ""
+
+#: gasp.c:1983
+msgid "END missing from end of file.\n"
+msgstr ""
+
+#: gasp.c:2013
+msgid ".ASSIGNA needs constant expression argument.\n"
+msgstr ""
+
+#: gasp.c:2017
+msgid ".ASSIGNA without label.\n"
+msgstr ""
+
+#: gasp.c:2042
+msgid ".ASSIGNS without label.\n"
+msgstr ""
+
+#: gasp.c:2109
+#, c-format
+msgid "Can't find preprocessor variable %s.\n"
+msgstr ""
+
+#: gasp.c:2174
+msgid "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n"
+msgstr ""
+
+#: gasp.c:2208
+msgid "Comparison operator for strings must be EQ or NE\n"
+msgstr ""
+
+#: gasp.c:2220 gasp.c:2230 gasp.c:2332
+msgid "Conditional operator must have absolute operands.\n"
+msgstr ""
+
+#: gasp.c:2225
+msgid "String compared against expression.\n"
+msgstr ""
+
+#: gasp.c:2275
+msgid "AIF nesting unreasonable.\n"
+msgstr ""
+
+#: gasp.c:2290
+msgid "Multiple AELSEs in AIF.\n"
+msgstr ""
+
+#: gasp.c:2306
+msgid "AENDI without AIF.\n"
+msgstr ""
+
+#: gasp.c:2329 gasp.c:2411
+msgid "IF nesting unreasonable.\n"
+msgstr ""
+
+#: gasp.c:2421
+msgid "Bad format for IF or IFNC.\n"
+msgstr ""
+
+#: gasp.c:2441
+msgid "AENDR without a AREPEAT.\n"
+msgstr ""
+
+#: gasp.c:2443
+msgid "ENDR without a REPT.\n"
+msgstr ""
+
+#: gasp.c:2466
+#, c-format
+msgid "AWHILE without a AENDW at %d.\n"
+msgstr ""
+
+#: gasp.c:2504
+msgid "AENDW without a AENDW.\n"
+msgstr ""
+
+#: gasp.c:2549
+msgid "AREPEAT must have absolute operand.\n"
+msgstr ""
+
+#: gasp.c:2555
+#, c-format
+msgid "AREPEAT without a AENDR at %d.\n"
+msgstr ""
+
+#: gasp.c:2597
+msgid ".ENDM without a matching .MACRO.\n"
+msgstr ""
+
+#: gasp.c:2631
+msgid "LOCAL outside of MACRO"
+msgstr ""
+
+#: gasp.c:2644
+#, c-format
+msgid "macro at line %d: %s\n"
+msgstr ""
+
+#: gasp.c:2667
+msgid "macro expansion"
+msgstr ""
+
+#: gasp.c:2719
+msgid "Character code in string must be absolute expression.\n"
+msgstr ""
+
+#: gasp.c:2724
+msgid "Missing > for character code.\n"
+msgstr ""
+
+#: gasp.c:2783
+#, c-format
+msgid "string for SDATAC longer than 255 characters (%d).\n"
+msgstr ""
+
+#: gasp.c:2811
+#, c-format
+msgid "illegal character in SDATA line (0x%x).\n"
+msgstr ""
+
+#: gasp.c:2832
+msgid "Must have absolute SDATAB repeat count.\n"
+msgstr ""
+
+#: gasp.c:2835
+#, c-format
+msgid "Must have positive SDATAB repeat count (%d).\n"
+msgstr ""
+
+#: gasp.c:2863
+#, c-format
+msgid "Unreasonable include depth (%ld).\n"
+msgstr ""
+
+#: gasp.c:2917
+#, c-format
+msgid "Can't open include file `%s'.\n"
+msgstr ""
+
+#: gasp.c:2991
+msgid "Unreasonable expansion (-u turns off check).\n"
+msgstr ""
+
+#. This one causes lots of pain when trying to preprocess
+#. ordinary code
+#: gasp.c:3212
+#, c-format
+msgid "Unrecognised pseudo op `%s'.\n"
+msgstr ""
+
+#: gasp.c:3279
+msgid "ORG command not allowed.\n"
+msgstr ""
+
+#: gasp.c:3496
+msgid "Invalid expression on command line.\n"
+msgstr ""
+
+#: gasp.c:3537
+#, c-format
+msgid ""
+"Usage: %s \n"
+" [-a] [--alternate] enter alternate macro mode\n"
+" [-c char] [--commentchar char] change the comment character from !\n"
+" [-d] [--debug] print some debugging info\n"
+" [-h] [--help] print this message\n"
+" [-M] [--mri] enter MRI compatibility mode\n"
+" [-o out] [--output out] set the output file\n"
+" [-p] [--print] print line numbers\n"
+msgstr ""
+
+#: gasp.c:3546
+msgid ""
+" [-s] [--copysource] copy source through as comments \n"
+" [-u] [--unreasonable] allow unreasonable nesting\n"
+" [-v] [--version] print the program version\n"
+" [-Dname=value] create preprocessor variable called name, "
+"with value\n"
+" [-Ipath] add to include path list\n"
+" [in-file]\n"
+msgstr ""
+
+#: gasp.c:3562
+#, c-format
+msgid "%s: Gnu Assembler Macro Preprocessor\n"
+msgstr ""
+
+#. This output is intended to follow the GNU standards document.
+#: gasp.c:3646
+#, c-format
+msgid "GNU assembler pre-processor %s\n"
+msgstr ""
+
+#: gasp.c:3647
+msgid "Copyright 1996 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: gasp.c:3669
+#, c-format
+msgid "%s: Can't open output file `%s'.\n"
+msgstr ""
+
+#: gasp.c:3692
+#, c-format
+msgid "%s: Can't open input file `%s'.\n"
+msgstr ""
+
+#: gasp.c:3711
+#, c-format
+msgid "Internal error, aborting at %s line %d"
+msgstr ""
+
+#: gasp.c:3714
+msgid ""
+"\n"
+"Please report this bug.\n"
+msgstr ""
+
+#. Detect if we are reading from stdin by examining the file
+#. name returned by as_where().
+#.
+#. [FIXME: We rely upon the name in the strcmp below being the
+#. 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.
+#: input-file.c:150 input-scrub.c:239 listing.c:353
+msgid "{standard input}"
+msgstr ""
+
+#: input-file.c:154
+#, c-format
+msgid "Can't open %s for reading."
+msgstr ""
+
+#: input-file.c:205 input-file.c:234
+#, c-format
+msgid "Can't read from %s"
+msgstr ""
+
+#: input-file.c:242
+#, c-format
+msgid "Can't close %s"
+msgstr ""
+
+#: input-scrub.c:270
+msgid "buffers nested too deeply"
+msgstr ""
+
+#: input-scrub.c:371
+msgid "partial line at end of file ignored"
+msgstr ""
+
+#: input-scrub.c:393
+msgid "Partial line at end of file ignored"
+msgstr ""
+
+#: itbl-ops.c:359
+msgid "Unable to allocate memory for new instructions\n"
+msgstr ""
+
+#: listing.c:252
+msgid "Warning:"
+msgstr ""
+
+#: listing.c:259
+msgid "Error:"
+msgstr ""
+
+#: listing.c:1145
+#, c-format
+msgid "can't open list file: %s"
+msgstr ""
+
+#: listing.c:1169
+#, c-format
+msgid "error closing list file: %s"
+msgstr ""
+
+#: listing.c:1250
+msgid "strange paper height, set to no form"
+msgstr ""
+
+#: listing.c:1316
+msgid "New line in title"
+msgstr ""
+
+#: macro.c:529
+msgid "unexpected end of file in macro definition"
+msgstr ""
+
+#: macro.c:538
+msgid "missing ) after formals"
+msgstr ""
+
+#: macro.c:695
+msgid "missplaced )"
+msgstr ""
+
+#: macro.c:957
+msgid "confusion in formal parameters"
+msgstr ""
+
+#: macro.c:962
+msgid "macro formal argument does not exist"
+msgstr ""
+
+#: macro.c:977
+msgid "can't mix positional and keyword arguments"
+msgstr ""
+
+#: macro.c:985
+msgid "too many positional arguments"
+msgstr ""
+
+#: macro.c:1165
+msgid "unexpected end of file in irp or irpc"
+msgstr ""
+
+#: macro.c:1173
+msgid "missing model parameter"
+msgstr ""
+
+#: messages.c:105
+msgid "Assembler messages:\n"
+msgstr ""
+
+#: messages.c:222
+msgid "Warning: "
+msgstr ""
+
+#: messages.c:331
+msgid "Error: "
+msgstr ""
+
+#: messages.c:435 messages.c:452
+msgid "Fatal error: "
+msgstr ""
+
+#: messages.c:471
+msgid "Internal error!\n"
+msgstr ""
+
+#: messages.c:473
+#, c-format
+msgid "Assertion failure in %s at %s line %d.\n"
+msgstr ""
+
+#: messages.c:476
+#, c-format
+msgid "Assertion failure at %s line %d.\n"
+msgstr ""
+
+#: messages.c:477 messages.c:495
+msgid "Please report this bug.\n"
+msgstr ""
+
+#: messages.c:490
+#, c-format
+msgid "Internal error, aborting at %s line %d in %s\n"
+msgstr ""
+
+#: messages.c:493
+#, c-format
+msgid "Internal error, aborting at %s line %d\n"
+msgstr ""
+
+#: output-file.c:48
+#, c-format
+msgid "Can't open a bfd on stdout %s "
+msgstr ""
+
+#: output-file.c:72 output-file.c:79
+#, c-format
+msgid "FATAL: Can't close %s\n"
+msgstr ""
+
+#: output-file.c:130
+#, c-format
+msgid "FATAL: Can't close %s"
+msgstr ""
+
+#: output-file.c:148
+msgid "Failed to emit an object byte"
+msgstr ""
+
+#: output-file.c:149
+msgid "Can't continue"
+msgstr ""
+
+#: read.c:454
+#, c-format
+msgid "error constructing %s pseudo-op table: %s"
+msgstr ""
+
+#: read.c:819
+#, c-format
+msgid "Unknown pseudo-op: `%s'"
+msgstr ""
+
+#: read.c:952
+#, c-format
+msgid "label \"%d$\" redefined"
+msgstr ""
+
+#: read.c:1169
+msgid ".abort detected. Abandoning ship."
+msgstr ""
+
+#: read.c:1260 read.c:2033
+msgid "Alignment not a power of 2"
+msgstr ""
+
+#: read.c:1268
+#, c-format
+msgid "Alignment too large: %u assumed"
+msgstr ""
+
+#: read.c:1300
+msgid "expected fill pattern missing"
+msgstr ""
+
+#: read.c:1497
+#, c-format
+msgid "attempt to re-define symbol `%s'"
+msgstr ""
+
+#. Some of the back ends can't deal with non-positive line numbers.
+#. Besides, it's silly.
+#: read.c:1621
+#, c-format
+msgid "Line numbers must be positive; line number %d rejected."
+msgstr ""
+
+#: read.c:1648
+msgid "start address not supported"
+msgstr ""
+
+#: read.c:1658
+msgid ".err encountered"
+msgstr ""
+
+#: read.c:1677 read.c:1679
+#, c-format
+msgid ".fail %ld encountered"
+msgstr ""
+
+#: read.c:1716
+#, c-format
+msgid ".fill size clamped to %d."
+msgstr ""
+
+#: read.c:1721
+msgid "Size negative: .fill ignored."
+msgstr ""
+
+#: read.c:1727
+msgid "Repeat < 0, .fill ignored"
+msgstr ""
+
+#: read.c:1885
+#, c-format
+msgid "unrecognized .linkonce type `%s'"
+msgstr ""
+
+#: read.c:1898 read.c:1924
+msgid ".linkonce is not supported for this object file format"
+msgstr ""
+
+#: read.c:1920
+#, c-format
+msgid "bfd_set_section_flags: %s"
+msgstr ""
+
+#: read.c:1989
+#, c-format
+msgid "error setting flags for \".sbss\": %s"
+msgstr ""
+
+#: read.c:2011
+msgid "Expected comma after size"
+msgstr ""
+
+#: read.c:2019
+msgid "Missing alignment"
+msgstr ""
+
+#: read.c:2161
+msgid "bad expression"
+msgstr ""
+
+#: read.c:2292
+#, c-format
+msgid "attempt to redefine pseudo-op `%s' ignored"
+msgstr ""
+
+#: read.c:2358
+#, c-format
+msgid "invalid segment \"%s\"; segment \"%s\" assumed"
+msgstr ""
+
+#: read.c:2364
+msgid "ignoring fill value in absolute section"
+msgstr ""
+
+#: read.c:2367
+msgid "only constant offsets supported in absolute section"
+msgstr ""
+
+#: read.c:2399
+msgid "MRI style ORG pseudo-op not supported"
+msgstr ""
+
+#: read.c:2487
+msgid "unrecognized section type"
+msgstr ""
+
+#: read.c:2555
+#, c-format
+msgid "unrecognized section type `%s'"
+msgstr ""
+
+#: read.c:2569
+msgid "absolute sections are not supported"
+msgstr ""
+
+#: read.c:2584
+#, c-format
+msgid "unrecognized section command `%s'"
+msgstr ""
+
+#: read.c:2672
+#, c-format
+msgid "%s without %s"
+msgstr ""
+
+#: read.c:2876
+msgid "Unsupported variable size or fill value"
+msgstr ""
+
+#: read.c:2901
+msgid ".space repeat count is zero, ignored"
+msgstr ""
+
+#: read.c:2903
+msgid ".space repeat count is negative, ignored"
+msgstr ""
+
+#: read.c:2932
+msgid "space allocation too complex in absolute section"
+msgstr ""
+
+#: read.c:2937
+msgid "space allocation too complex in common section"
+msgstr ""
+
+#: read.c:3024 read.c:4113
+#, c-format
+msgid "Bad floating literal: %s"
+msgstr ""
+
+#: read.c:3100
+#, c-format
+msgid "Rest of line ignored. First ignored character is `%c'."
+msgstr ""
+
+#: read.c:3103
+#, c-format
+msgid "Rest of line ignored. First ignored character valued 0x%x."
+msgstr ""
+
+#: read.c:3154
+msgid "illegal expression; zero assumed"
+msgstr ""
+
+#: read.c:3156
+msgid "missing expression; zero assumed"
+msgstr ""
+
+#: read.c:3329
+msgid "rva without symbol"
+msgstr ""
+
+#: read.c:3454
+msgid "attempt to store value in absolute section"
+msgstr ""
+
+#: read.c:3492 read.c:4390
+msgid "zero assumed for missing expression"
+msgstr ""
+
+#: read.c:3504 read.c:4402
+msgid "register value used as expression"
+msgstr ""
+
+#. Leading bits contain both 0s & 1s.
+#: read.c:3594
+#, c-format
+msgid "Value 0x%lx truncated to 0x%lx."
+msgstr ""
+
+#: read.c:3610
+#, c-format
+msgid "Bignum truncated to %d bytes"
+msgstr ""
+
+#: read.c:3687
+#, c-format
+msgid "unsupported BFD relocation size %u"
+msgstr ""
+
+#: read.c:3776
+msgid "using a bit field width of zero"
+msgstr ""
+
+#: read.c:3784
+#, c-format
+msgid "field width \"%s\" too complex for a bitfield"
+msgstr ""
+
+#: read.c:3792
+#, c-format
+msgid "field width %lu too big to fit in %d bytes: truncated to %d bits"
+msgstr ""
+
+#: read.c:3813
+#, c-format
+msgid "field value \"%s\" too complex for a bitfield"
+msgstr ""
+
+#: read.c:3937
+msgid "Unresolvable or nonpositive repeat count; using 1"
+msgstr ""
+
+#: read.c:3988
+#, c-format
+msgid "Unknown floating type type '%c'"
+msgstr ""
+
+#: read.c:4010
+msgid "Floating point constant too large"
+msgstr ""
+
+#: read.c:4135
+msgid "unresolvable or nonpositive repeat count; using 1"
+msgstr ""
+
+#: read.c:4539
+msgid "Expected <nn>"
+msgstr ""
+
+#. To be compatible with BSD 4.2 as: give the luser a linefeed!!
+#: read.c:4572 read.c:4655
+msgid "Unterminated string: Newline inserted."
+msgstr ""
+
+#: read.c:4663
+msgid "Bad escaped character in string, '?' assumed"
+msgstr ""
+
+#: read.c:4689
+msgid "expected address expression; zero assumed"
+msgstr ""
+
+#: read.c:4709
+#, c-format
+msgid "symbol \"%s\" undefined; zero assumed"
+msgstr ""
+
+#: read.c:4712
+msgid "some symbol undefined; zero assumed"
+msgstr ""
+
+#: read.c:4730
+msgid "bad or irreducible absolute expression; zero assumed"
+msgstr ""
+
+#: read.c:4768
+msgid "This string may not contain '\\0'"
+msgstr ""
+
+#: read.c:4807
+msgid "Missing string"
+msgstr ""
+
+#: read.c:5036
+msgid "missing .func"
+msgstr ""
+
+#: read.c:5053
+msgid ".endfunc missing for previous .func"
+msgstr ""
+
+#: stabs.c:209
+msgid ".stabs: Missing comma"
+msgstr ""
+
+#: stabs.c:217 stabs.c:225 stabs.c:236
+#, c-format
+msgid ".stab%c: Missing comma"
+msgstr ""
+
+#: stabs.c:415
+msgid "comma missing in .xstabs"
+msgstr ""
+
+#: subsegs.c:379
+#, c-format
+msgid "Attempt to switch to nonexistent segment \"%s\""
+msgstr ""
+
+#: symbols.c:365 symbols.c:467
+#, c-format
+msgid "Symbol %s already defined."
+msgstr ""
+
+#: symbols.c:453
+#, c-format
+msgid "Symbol \"%s\" is already defined as \"%s\"/%s%ld."
+msgstr ""
+
+#: symbols.c:536 symbols.c:543
+#, c-format
+msgid "Inserting \"%s\" into symbol table failed: %s"
+msgstr ""
+
+#: symbols.c:894
+#, c-format
+msgid "Symbol definition loop encountered at %s"
+msgstr ""
+
+#: symbols.c:1071 symbols.c:1075
+#, c-format
+msgid "undefined symbol %s in operation"
+msgstr ""
+
+#: symbols.c:1079
+msgid "invalid section for operation"
+msgstr ""
+
+#: symbols.c:1084 symbols.c:1088
+#, c-format
+msgid "undefined symbol %s in operation setting %s"
+msgstr ""
+
+#: symbols.c:1093
+#, c-format
+msgid "invalid section for operation setting %s"
+msgstr ""
+
+#: symbols.c:1111
+#, c-format
+msgid "division by zero when setting %s"
+msgstr ""
+
+#: symbols.c:1183 write.c:1881
+#, c-format
+msgid "can't resolve value for symbol \"%s\""
+msgstr ""
+
+#: symbols.c:1556
+#, c-format
+msgid "\"%d\" (instance number %d of a %s label)"
+msgstr ""
+
+#: symbols.c:1606
+#, c-format
+msgid "Attempt to get value of unresolved symbol %s"
+msgstr ""
+
+#: write.c:169
+#, c-format
+msgid "field fx_size too small to hold %d"
+msgstr ""
+
+#: write.c:306
+msgid "rva not supported"
+msgstr ""
+
+#: write.c:502
+#, c-format
+msgid "attempt to .org/.space backwards? (%ld)"
+msgstr ""
+
+#: write.c:974
+msgid "relocation out of range"
+msgstr ""
+
+#: write.c:977
+#, c-format
+msgid "%s:%u: bad return from bfd_install_relocation: %x"
+msgstr ""
+
+#: write.c:1022
+msgid "internal error: fixup not contained within frag"
+msgstr ""
+
+#: write.c:1038
+#, c-format
+msgid "%s:%u: bad return from bfd_install_relocation"
+msgstr ""
+
+#: write.c:1125 write.c:1149
+#, c-format
+msgid "FATAL: Can't write %s"
+msgstr ""
+
+#: write.c:1180
+msgid "Cannot write to output file."
+msgstr ""
+
+#: write.c:1412
+#, c-format
+msgid "%d error%s, %d warning%s, generating bad object file.\n"
+msgstr ""
+
+#: write.c:1419
+#, c-format
+msgid "%d error%s, %d warning%s, no object file generated.\n"
+msgstr ""
+
+#: write.c:1818
+#, c-format
+msgid "local label %s is not defined"
+msgstr ""
+
+#: write.c:2123
+#, c-format
+msgid "alignment padding (%lu bytes) not a multiple of %ld"
+msgstr ""
+
+#: write.c:2229
+#, c-format
+msgid ".word %s-%s+%s didn't fit"
+msgstr ""
+
+#: write.c:2309
+msgid "attempt to .org backwards ignored"
+msgstr ""
+
+#: write.c:2332
+msgid ".space specifies non-absolute value"
+msgstr ""
+
+#: write.c:2336
+msgid ".space or .fill with negative value, ignored"
+msgstr ""
+
+#: write.c:2587
+#, c-format
+msgid ""
+"Subtraction of two symbols in different sections \"%s\" {%s section} - "
+"\"%s\" {%s section} at file address %s."
+msgstr ""
+
+#: write.c:2752
+#, c-format
+msgid "Value of %s too large for field of %d bytes at %s"
+msgstr ""
diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c
index cde61bb..1522842 100644
--- a/contrib/binutils/gas/read.c
+++ b/contrib/binutils/gas/read.c
@@ -1,6 +1,6 @@
/* read.c - read a source file -
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 1998
- Free Software Foundation, Inc.
+ Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -53,6 +53,21 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define TC_START_LABEL(x,y) (x==':')
#endif
+/* Set by the object-format or the target. */
+#ifndef TC_IMPLICIT_LCOMM_ALIGNMENT
+#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \
+ do { \
+ if ((SIZE) >= 8) \
+ (P2VAR) = 3; \
+ else if ((SIZE) >= 4) \
+ (P2VAR) = 2; \
+ else if ((SIZE) >= 2) \
+ (P2VAR) = 1; \
+ else \
+ (P2VAR) = 0; \
+ } while (0)
+#endif
+
/* The NOP_OPCODE is for the alignment fill value.
* fill it a nop instruction so that the disassembler does not choke
* on it
@@ -89,6 +104,10 @@ die horribly;
#define LEX_QM 0
#endif
+#ifndef LEX_HASH
+#define LEX_HASH 0
+#endif
+
#ifndef LEX_DOLLAR
/* The a29k assembler does not permits labels to start with $. */
#define LEX_DOLLAR 3
@@ -104,19 +123,20 @@ char lex_type[256] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ[\]^_ */
- 0, 0, 0, 0, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
+ 0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, LEX_QM, /* 0123456789:;<=>? */
LEX_AT, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* @ABCDEFGHIJKLMNO */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, 0, 3, /* PQRSTUVWXYZ[\]^_ */
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* `abcdefghijklmno */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, LEX_TILDE, 0, /* pqrstuvwxyz{|}~. */
- 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,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
};
@@ -124,33 +144,33 @@ char lex_type[256] =
* In: a character.
* Out: 1 if this character ends a line.
*/
-#define _ (0)
+#define Z_ (0)
char is_end_of_line[256] =
{
#ifdef CR_EOL
- 99, _, _, _, _, _, _, _, _, _, 99, _, _, 99, _, _, /* @abcdefghijklmno */
+ 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, 99, Z_, Z_, /* @abcdefghijklmno */
#else
- 99, _, _, _, _, _, _, _, _, _, 99, _, _, _, _, _, /* @abcdefghijklmno */
+ 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, Z_, /* @abcdefghijklmno */
#endif
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
#ifdef TC_HPPA
- _,99, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* _!"#$%&'()*+,-./ */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* 0123456789:;<=>? */
+ Z_,99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* _!"#$%&'()*+,-./ */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */
#else
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, 99, _, _, _, _, /* 0123456789:;<=>? */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */
#endif
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
+ Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */
};
-#undef _
+#undef Z_
/* Functions private to this file. */
@@ -207,16 +227,25 @@ static int dwarf_file_string;
#endif
static void cons_worker PARAMS ((int, int));
-static int scrub_from_string PARAMS ((char **));
+static int scrub_from_string PARAMS ((char *, int));
static void do_align PARAMS ((int, char *, int, int));
static void s_align PARAMS ((int, int));
+static void s_lcomm_internal PARAMS ((int, int));
static int hex_float PARAMS ((int, char *));
+static inline int sizeof_sleb128 PARAMS ((offsetT));
+static inline int sizeof_uleb128 PARAMS ((valueT));
+static inline int output_sleb128 PARAMS ((char *, offsetT));
+static inline int output_uleb128 PARAMS ((char *, valueT));
+static inline int output_big_sleb128 PARAMS ((char *, LITTLENUM_TYPE *, int));
+static inline int output_big_uleb128 PARAMS ((char *, LITTLENUM_TYPE *, int));
+static int output_big_leb128 PARAMS ((char *, LITTLENUM_TYPE *, int, int));
static void do_org PARAMS ((segT, expressionS *, int));
char *demand_copy_string PARAMS ((int *lenP));
static segT get_segmented_expression PARAMS ((expressionS *expP));
static segT get_known_segmented_expression PARAMS ((expressionS * expP));
static void pobegin PARAMS ((void));
static int get_line_sb PARAMS ((sb *));
+static void generate_file_debug PARAMS ((void));
void
@@ -292,8 +321,10 @@ static const pseudo_typeS potable[] =
{"eject", listing_eject, 0}, /* Formfeed listing */
{"else", s_else, 0},
{"elsec", s_else, 0},
+ {"elseif", s_elseif, (int) O_ne},
{"end", s_end, 0},
{"endc", s_endif, 0},
+ {"endfunc", s_func, 1},
{"endif", s_endif, 0},
/* endef */
{"equ", s_set, 0},
@@ -309,6 +340,7 @@ static const pseudo_typeS potable[] =
{"fill", s_fill, 0},
{"float", float_cons, 'f'},
{"format", s_ignore, 0},
+ {"func", s_func, 0},
{"global", s_globl, 0},
{"globl", s_globl, 0},
{"hword", cons, 2},
@@ -403,7 +435,7 @@ static const pseudo_typeS potable[] =
{"xstabs", s_xstab, 's'},
{"word", cons, 2},
{"zero", s_space, 0},
- {NULL} /* end sentinel */
+ {NULL, NULL, 0} /* end sentinel */
};
static int pop_override_ok = 0;
@@ -419,7 +451,7 @@ pop_insert (table)
{
errtxt = hash_insert (po_hash, pop->poc_name, (char *) pop);
if (errtxt && (!pop_override_ok || strcmp (errtxt, "exists")))
- as_fatal ("error constructing %s pseudo-op table: %s", pop_table_name,
+ as_fatal (_("error constructing %s pseudo-op table: %s"), pop_table_name,
errtxt);
}
}
@@ -468,15 +500,18 @@ static char *scrub_string;
static char *scrub_string_end;
static int
-scrub_from_string (from)
- char **from;
+scrub_from_string (buf, buflen)
+ char *buf;
+ int buflen;
{
- int size;
-
- *from = scrub_string;
- size = scrub_string_end - scrub_string;
- scrub_string = scrub_string_end;
- return size;
+ int copy;
+
+ copy = scrub_string_end - scrub_string;
+ if (copy > buflen)
+ copy = buflen;
+ memcpy (buf, scrub_string, copy);
+ scrub_string += copy;
+ return copy;
}
/* read_a_source_file()
@@ -499,6 +534,11 @@ read_a_source_file (name)
listing_newline (NULL);
register_dependency (name);
+ /* Generate debugging information before we've read anything in to denote
+ this file as the "main" source file and not a subordinate one
+ (e.g. N_SO vs N_SOL in stabs). */
+ generate_file_debug ();
+
while ((buffer_limit = input_scrub_next_buffer (&input_line_pointer)) != 0)
{ /* We have another line to parse. */
know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */
@@ -525,11 +565,7 @@ read_a_source_file (name)
line_label = NULL;
- if (flag_m68k_mri
-#ifdef LABELS_WITHOUT_COLONS
- || 1
-#endif
- )
+ if (LABELS_WITHOUT_COLONS || flag_m68k_mri)
{
/* Text at the start of a line must be a label, we
run down and stick a colon in. */
@@ -574,7 +610,12 @@ read_a_source_file (name)
/* In MRI mode, we need to handle the MACRO
pseudo-op specially: we don't want to put the
symbol in the symbol table. */
- if (! mri_line_macro)
+ if (! mri_line_macro
+#ifdef TC_START_LABEL_WITHOUT_COLON
+ && TC_START_LABEL_WITHOUT_COLON(c,
+ input_line_pointer)
+#endif
+ )
line_label = colon (line_start);
else
line_label = symbol_create (line_start,
@@ -719,11 +760,7 @@ read_a_source_file (name)
}
#endif
- if (flag_m68k_mri
-#ifdef NO_PSEUDO_DOT
- || 1
-#endif
- )
+ if (NO_PSEUDO_DOT || flag_m68k_mri)
{
/* The MRI assembler and the m88k use pseudo-ops
without a period. */
@@ -771,7 +808,7 @@ read_a_source_file (name)
mri_pending_align = 0;
if (line_label != NULL)
{
- line_label->sy_frag = frag_now;
+ symbol_set_frag (line_label, frag_now);
S_SET_VALUE (line_label, frag_now_fix ());
}
}
@@ -779,7 +816,7 @@ read_a_source_file (name)
/* Print the error msg now, while we still can */
if (pop == NULL)
{
- as_bad ("Unknown pseudo-op: `%s'", s);
+ as_bad (_("Unknown pseudo-op: `%s'"), s);
*input_line_pointer = c;
s_ignore (0);
continue;
@@ -806,6 +843,9 @@ read_a_source_file (name)
else
{
int inquote = 0;
+#ifdef QUOTES_IN_INSN
+ int inescape = 0;
+#endif
/* WARNING: c has char, which may be end-of-line. */
/* Also: input_line_pointer->`\0` where c was. */
@@ -819,52 +859,41 @@ read_a_source_file (name)
{
if (flag_m68k_mri && *input_line_pointer == '\'')
inquote = ! inquote;
+#ifdef QUOTES_IN_INSN
+ if (inescape)
+ inescape = 0;
+ else if (*input_line_pointer == '"')
+ inquote = ! inquote;
+ else if (*input_line_pointer == '\\')
+ inescape = 1;
+#endif
input_line_pointer++;
}
c = *input_line_pointer;
*input_line_pointer = '\0';
- if (debug_type == DEBUG_STABS)
- stabs_generate_asm_lineno ();
-
-#ifdef OBJ_GENERATE_ASM_LINENO
-#ifdef ECOFF_DEBUGGING
- /* ECOFF assemblers automatically generate
- debugging information. FIXME: This should
- probably be handled elsewhere. */
- if (debug_type == DEBUG_NONE)
- {
- if (ecoff_no_current_file ())
- debug_type = DEBUG_ECOFF;
- }
-
- if (debug_type == DEBUG_ECOFF)
- {
- unsigned int lineno;
- char *s;
-
- as_where (&s, &lineno);
- OBJ_GENERATE_ASM_LINENO (s, lineno);
- }
-#endif
-#endif
+ generate_lineno_debug ();
if (macro_defined)
{
sb out;
const char *err;
+ macro_entry *macro;
- if (check_macro (s, &out, '\0', &err))
+ if (check_macro (s, &out, '\0', &err, &macro))
{
if (err != NULL)
- as_bad (err);
+ as_bad ("%s", err);
*input_line_pointer++ = c;
input_scrub_include_sb (&out,
- input_line_pointer);
+ input_line_pointer, 1);
sb_kill (&out);
buffer_limit =
input_scrub_next_buffer (&input_line_pointer);
+#ifdef md_macro_info
+ md_macro_info (macro);
+#endif
continue;
}
}
@@ -875,7 +904,7 @@ read_a_source_file (name)
mri_pending_align = 0;
if (line_label != NULL)
{
- line_label->sy_frag = frag_now;
+ symbol_set_frag (line_label, frag_now);
S_SET_VALUE (line_label, frag_now_fix ());
}
}
@@ -920,7 +949,7 @@ read_a_source_file (name)
if (dollar_label_defined (temp))
{
- as_fatal ("label \"%d$\" redefined", temp);
+ as_fatal (_("label \"%d$\" redefined"), temp);
}
define_dollar_label (temp);
@@ -1135,9 +1164,9 @@ mri_comment_end (stop, stopc)
void
s_abort (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
- as_fatal (".abort detected. Abandoning ship.");
+ as_fatal (_(".abort detected. Abandoning ship."));
}
/* Guts of .align directive. N is the power of two to which to align.
@@ -1161,21 +1190,7 @@ do_align (n, fill, len, max)
if (fill == NULL)
{
- int maybe_text;
-
-#ifdef BFD_ASSEMBLER
- if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
- maybe_text = 1;
- else
- maybe_text = 0;
-#else
- if (now_seg != data_section && now_seg != bss_section)
- maybe_text = 1;
- else
- maybe_text = 0;
-#endif
-
- if (maybe_text)
+ if (subseg_text_p (now_seg))
default_fill = NOP_OPCODE;
else
default_fill = 0;
@@ -1196,7 +1211,7 @@ do_align (n, fill, len, max)
just_record_alignment:
#endif
- record_alignment (now_seg, n);
+ record_alignment (now_seg, n - OCTETS_PER_BYTE_POWER);
}
/* Handle the .align pseudo-op. A positive ARG is a default alignment
@@ -1242,7 +1257,7 @@ s_align (arg, bytes_p)
for (i = 0; (align & 1) == 0; align >>= 1, ++i)
;
if (align != 1)
- as_bad ("Alignment not a power of 2");
+ as_bad (_("Alignment not a power of 2"));
align = i;
}
}
@@ -1250,7 +1265,7 @@ s_align (arg, bytes_p)
if (align > 15)
{
align = 15;
- as_bad ("Alignment too large: %u assumed", align);
+ as_bad (_("Alignment too large: %u assumed"), align);
}
if (*input_line_pointer != ',')
@@ -1282,7 +1297,7 @@ s_align (arg, bytes_p)
if (! fill_p)
{
if (arg < 0)
- as_warn ("expected fill pattern missing");
+ as_warn (_("expected fill pattern missing"));
do_align (align, (char *) NULL, 0, max);
}
else
@@ -1311,10 +1326,10 @@ s_align (arg, bytes_p)
}
}
+ demand_empty_rest_of_line ();
+
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
}
/* Handle the .align pseudo-op on machines where ".align 4" means
@@ -1339,7 +1354,7 @@ s_align_ptwo (arg)
void
s_comm (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
register char *name;
register char c;
@@ -1360,19 +1375,19 @@ s_comm (ignore)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after symbol-name: rest of line ignored.");
+ as_bad (_("Expected comma after symbol-name: rest of line ignored."));
+ ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- ignore_rest_of_line ();
return;
}
input_line_pointer++; /* skip ',' */
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn (".COMMon length (%ld.) <0! Ignored.", (long) temp);
+ as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp);
+ ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- ignore_rest_of_line ();
return;
}
*p = 0;
@@ -1380,17 +1395,17 @@ s_comm (ignore)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
+ ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- ignore_rest_of_line ();
return;
}
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
- as_bad ("Length of .comm \"%s\" is already %ld. Not changed to %ld.",
+ as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
@@ -1409,10 +1424,10 @@ s_comm (ignore)
#endif /* not OBJ_VMS */
know (symbolP->sy_frag == &zero_address_frag);
+ demand_empty_rest_of_line ();
+
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
} /* s_comm() */
/* The MRI COMMON pseudo-op. We handle this by creating a common
@@ -1421,7 +1436,7 @@ s_comm (ignore)
void
s_mri_common (small)
- int small;
+ int small ATTRIBUTE_UNUSED;
{
char *name;
char c;
@@ -1479,9 +1494,9 @@ s_mri_common (small)
if (S_IS_DEFINED (sym) && ! S_IS_COMMON (sym))
{
- as_bad ("attempt to re-define symbol `%s'", S_GET_NAME (sym));
- mri_comment_end (stop, stopc);
+ as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym));
ignore_rest_of_line ();
+ mri_comment_end (stop, stopc);
return;
}
@@ -1495,10 +1510,12 @@ s_mri_common (small)
if (line_label != NULL)
{
- line_label->sy_value.X_op = O_symbol;
- line_label->sy_value.X_add_symbol = sym;
- line_label->sy_value.X_add_number = S_GET_VALUE (sym);
- line_label->sy_frag = &zero_address_frag;
+ expressionS exp;
+ exp.X_op = O_symbol;
+ exp.X_add_symbol = sym;
+ exp.X_add_number = 0;
+ symbol_set_value_expression (line_label, &exp);
+ symbol_set_frag (line_label, &zero_address_frag);
S_SET_SEGMENT (line_label, expr_section);
}
@@ -1511,14 +1528,14 @@ s_mri_common (small)
if (*input_line_pointer == ',')
input_line_pointer += 2;
- mri_comment_end (stop, stopc);
-
demand_empty_rest_of_line ();
+
+ mri_comment_end (stop, stopc);
}
void
s_data (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
segT section;
register int temp;
@@ -1592,7 +1609,7 @@ s_app_file (appfile)
void
s_app_line (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int l;
@@ -1601,7 +1618,7 @@ s_app_line (ignore)
if (l < 0)
/* Some of the back ends can't deal with non-positive line numbers.
Besides, it's silly. */
- as_warn ("Line numbers must be positive; line number %d rejected.", l+1);
+ as_warn (_("Line numbers must be positive; line number %d rejected."), l+1);
else
{
new_logical_line ((char *) NULL, l);
@@ -1618,7 +1635,7 @@ s_app_line (ignore)
void
s_end (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (flag_mri)
{
@@ -1628,7 +1645,7 @@ s_end (ignore)
if (! is_end_of_line[(unsigned char) *input_line_pointer]
&& *input_line_pointer != '*'
&& *input_line_pointer != '!')
- as_warn ("start address not supported");
+ as_warn (_("start address not supported"));
}
}
@@ -1636,9 +1653,9 @@ s_end (ignore)
void
s_err (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
- as_bad (".err encountered");
+ as_bad (_(".err encountered"));
demand_empty_rest_of_line ();
}
@@ -1646,7 +1663,7 @@ s_err (ignore)
void
s_fail (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
offsetT temp;
char *stop = NULL;
@@ -1657,19 +1674,19 @@ s_fail (ignore)
temp = get_absolute_expression ();
if (temp >= 500)
- as_warn (".fail %ld encountered", (long) temp);
+ as_warn (_(".fail %ld encountered"), (long) temp);
else
- as_bad (".fail %ld encountered", (long) temp);
+ as_bad (_(".fail %ld encountered"), (long) temp);
+
+ demand_empty_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
}
void
s_fill (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS rep_exp;
long size = 1;
@@ -1696,18 +1713,18 @@ s_fill (ignore)
#define BSD_FILL_SIZE_CROCK_8 (8)
if (size > BSD_FILL_SIZE_CROCK_8)
{
- as_warn (".fill size clamped to %d.", BSD_FILL_SIZE_CROCK_8);
+ as_warn (_(".fill size clamped to %d."), BSD_FILL_SIZE_CROCK_8);
size = BSD_FILL_SIZE_CROCK_8;
}
if (size < 0)
{
- as_warn ("Size negative: .fill ignored.");
+ as_warn (_("Size negative: .fill ignored."));
size = 0;
}
else if (rep_exp.X_op == O_constant && rep_exp.X_add_number <= 0)
{
if (rep_exp.X_add_number < 0)
- as_warn ("Repeat < 0, .fill ignored");
+ as_warn (_("Repeat < 0, .fill ignored"));
size = 0;
}
@@ -1766,7 +1783,7 @@ s_fill (ignore)
void
s_globl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
@@ -1782,9 +1799,11 @@ s_globl (ignore)
name = input_line_pointer;
c = get_symbol_end ();
symbolP = symbol_find_or_make (name);
+ S_SET_EXTERNAL (symbolP);
+
*input_line_pointer = c;
SKIP_WHITESPACE ();
- S_SET_EXTERNAL (symbolP);
+ c = *input_line_pointer;
if (c == ',')
{
input_line_pointer++;
@@ -1795,10 +1814,10 @@ s_globl (ignore)
}
while (c == ',');
+ demand_empty_rest_of_line ();
+
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
}
/* Handle the MRI IRP and IRPC pseudo-ops. */
@@ -1827,7 +1846,7 @@ s_irp (irpc)
sb_kill (&s);
- input_scrub_include_sb (&out, input_line_pointer);
+ input_scrub_include_sb (&out, input_line_pointer, 1);
sb_kill (&out);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
}
@@ -1839,7 +1858,7 @@ s_irp (irpc)
void
s_linkonce (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
enum linkonce_type type;
@@ -1863,7 +1882,7 @@ s_linkonce (ignore)
else if (strcasecmp (s, "same_contents") == 0)
type = LINKONCE_SAME_CONTENTS;
else
- as_warn ("unrecognized .linkonce type `%s'", s);
+ as_warn (_("unrecognized .linkonce type `%s'"), s);
*input_line_pointer = c;
}
@@ -1876,7 +1895,7 @@ s_linkonce (ignore)
flagword flags;
if ((bfd_applicable_section_flags (stdoutput) & SEC_LINK_ONCE) == 0)
- as_warn (".linkonce is not supported for this object file format");
+ as_warn (_(".linkonce is not supported for this object file format"));
flags = bfd_get_section_flags (stdoutput, now_seg);
flags |= SEC_LINK_ONCE;
@@ -1898,11 +1917,11 @@ s_linkonce (ignore)
break;
}
if (! bfd_set_section_flags (stdoutput, now_seg, flags))
- as_bad ("bfd_set_section_flags: %s",
+ as_bad (_("bfd_set_section_flags: %s"),
bfd_errmsg (bfd_get_error ()));
}
#else /* ! defined (BFD_ASSEMBLER) */
- as_warn (".linkonce is not supported for this object file format");
+ as_warn (_(".linkonce is not supported for this object file format"));
#endif /* ! defined (BFD_ASSEMBLER) */
#endif /* ! defined (obj_handle_link_once) */
@@ -1945,13 +1964,13 @@ s_lcomm_internal (needs_align, bytes_p)
if (*input_line_pointer == '\n')
{
- as_bad ("Missing size expression");
+ as_bad (_("Missing size expression"));
return;
}
if ((temp = get_absolute_expression ()) < 0)
{
- as_warn ("BSS length (%d.) <0! Ignored.", temp);
+ as_warn (_("BSS length (%d.) <0! Ignored."), temp);
ignore_rest_of_line ();
return;
}
@@ -1967,30 +1986,20 @@ s_lcomm_internal (needs_align, bytes_p)
seg_info (bss_seg)->bss = 1;
#ifdef BFD_ASSEMBLER
if (! bfd_set_section_flags (stdoutput, bss_seg, SEC_ALLOC))
- as_warn ("error setting flags for \".sbss\": %s",
+ as_warn (_("error setting flags for \".sbss\": %s"),
bfd_errmsg (bfd_get_error ()));
#endif
}
}
#endif
+
if (!needs_align)
{
- /* FIXME. This needs to be machine independent. */
- if (temp >= 8)
- align = 3;
- else if (temp >= 4)
- align = 2;
- else if (temp >= 2)
- align = 1;
- else
- align = 0;
-
-#ifdef OBJ_EVAX
- /* FIXME: This needs to be done in a more general fashion. */
- align = 3;
-#endif
+ TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align);
- record_alignment(bss_seg, align);
+ /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */
+ if (align)
+ record_alignment(bss_seg, align);
}
if (needs_align)
@@ -1999,7 +2008,7 @@ s_lcomm_internal (needs_align, bytes_p)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("Expected comma after size");
+ as_bad (_("Expected comma after size"));
ignore_rest_of_line ();
return;
}
@@ -2007,7 +2016,7 @@ s_lcomm_internal (needs_align, bytes_p)
SKIP_WHITESPACE ();
if (*input_line_pointer == '\n')
{
- as_bad ("Missing alignment");
+ as_bad (_("Missing alignment"));
return;
}
align = get_absolute_expression ();
@@ -2021,19 +2030,19 @@ s_lcomm_internal (needs_align, bytes_p)
for (i = 0; (align & 1) == 0; align >>= 1, ++i)
;
if (align != 1)
- as_bad ("Alignment not a power of 2");
+ as_bad (_("Alignment not a power of 2"));
align = i;
}
}
if (align > max_alignment)
{
align = max_alignment;
- as_warn ("Alignment too large: %d. assumed.", align);
+ as_warn (_("Alignment too large: %d. assumed."), align);
}
else if (align < 0)
{
align = 0;
- as_warn ("Alignment negative. 0 assumed.");
+ as_warn (_("Alignment negative. 0 assumed."));
}
record_alignment (bss_seg, align);
} /* if needs align */
@@ -2055,12 +2064,17 @@ s_lcomm_internal (needs_align, bytes_p)
*p = c;
if (
-#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
- S_GET_OTHER (symbolP) == 0 &&
- S_GET_DESC (symbolP) == 0 &&
-#endif /* OBJ_AOUT or OBJ_BOUT */
- (S_GET_SEGMENT (symbolP) == bss_seg
- || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0)))
+#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT) \
+ || defined (OBJ_BOUT) || defined (OBJ_MAYBE_BOUT))
+#ifdef BFD_ASSEMBLER
+ (OUTPUT_FLAVOR != bfd_target_aout_flavour
+ || (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0)) &&
+#else
+ (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0) &&
+#endif
+#endif
+ (S_GET_SEGMENT (symbolP) == bss_seg
+ || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0)))
{
char *pfrag;
@@ -2070,9 +2084,9 @@ s_lcomm_internal (needs_align, bytes_p)
frag_align (align, 0, 0);
/* detach from old frag */
if (S_GET_SEGMENT (symbolP) == bss_seg)
- symbolP->sy_frag->fr_symbol = NULL;
+ symbol_get_frag (symbolP)->fr_symbol = NULL;
- symbolP->sy_frag = frag_now;
+ symbol_set_frag (symbolP, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
(offsetT) temp, (char *) 0);
*pfrag = 0;
@@ -2094,7 +2108,7 @@ s_lcomm_internal (needs_align, bytes_p)
#endif
}
else
- as_bad ("Ignoring attempt to re-define symbol `%s'.",
+ as_bad (_("Ignoring attempt to re-define symbol `%s'."),
S_GET_NAME (symbolP));
subseg_set (current_seg, current_subseg);
@@ -2117,7 +2131,7 @@ void s_lcomm_bytes (needs_align)
void
s_lsym (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
register char *name;
register char c;
@@ -2134,7 +2148,7 @@ s_lsym (ignore)
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad ("Expected comma after name \"%s\"", name);
+ as_bad (_("Expected comma after name \"%s\""), name);
*p = c;
ignore_rest_of_line ();
return;
@@ -2144,7 +2158,7 @@ s_lsym (ignore)
if (exp.X_op != O_constant
&& exp.X_op != O_register)
{
- as_bad ("bad expression");
+ as_bad (_("bad expression"));
ignore_rest_of_line ();
return;
}
@@ -2171,7 +2185,7 @@ s_lsym (ignore)
}
else
{
- as_bad ("Symbol %s already defined", name);
+ as_bad (_("Symbol %s already defined"), name);
}
*p = c;
demand_empty_rest_of_line ();
@@ -2239,7 +2253,7 @@ get_line_sb (line)
void
s_macro (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *file;
unsigned int line;
@@ -2267,19 +2281,15 @@ s_macro (ignore)
{
S_SET_SEGMENT (line_label, undefined_section);
S_SET_VALUE (line_label, 0);
- line_label->sy_frag = &zero_address_frag;
+ symbol_set_frag (line_label, &zero_address_frag);
}
- if (((flag_m68k_mri
-#ifdef NO_PSEUDO_DOT
- || 1
-#endif
- )
+ if (((NO_PSEUDO_DOT || flag_m68k_mri)
&& hash_find (po_hash, name) != NULL)
|| (! flag_m68k_mri
&& *name == '.'
&& hash_find (po_hash, name + 1) != NULL))
- as_warn ("attempt to redefine pseudo-op `%s' ignored",
+ as_warn (_("attempt to redefine pseudo-op `%s' ignored"),
name);
}
@@ -2291,7 +2301,7 @@ s_macro (ignore)
void
s_mexit (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
cond_exit_macro (macro_nest);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
@@ -2301,7 +2311,7 @@ s_mexit (ignore)
void
s_mri (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int on, old_flag;
@@ -2313,13 +2323,21 @@ s_mri (ignore)
#ifdef TC_M68K
flag_m68k_mri = 1;
#endif
+ macro_mri_mode (1);
}
else
{
flag_mri = 0;
+#ifdef TC_M68K
flag_m68k_mri = 0;
+#endif
+ macro_mri_mode (0);
}
+ /* Operator precedence changes in m68k MRI mode, so we need to
+ update the operator rankings. */
+ expr_set_precedence ();
+
#ifdef MRI_MODE_CHANGE
if (on != old_flag)
MRI_MODE_CHANGE (on);
@@ -2337,16 +2355,16 @@ do_org (segment, exp, fill)
int fill;
{
if (segment != now_seg && segment != absolute_section)
- as_bad ("invalid segment \"%s\"; segment \"%s\" assumed",
+ as_bad (_("invalid segment \"%s\"; segment \"%s\" assumed"),
segment_name (segment), segment_name (now_seg));
if (now_seg == absolute_section)
{
if (fill != 0)
- as_warn ("ignoring fill value in absolute section");
+ as_warn (_("ignoring fill value in absolute section"));
if (exp->X_op != O_constant)
{
- as_bad ("only constant offsets supported in absolute section");
+ as_bad (_("only constant offsets supported in absolute section"));
exp->X_add_number = 0;
}
abs_section_offset = exp->X_add_number;
@@ -2356,25 +2374,29 @@ do_org (segment, exp, fill)
char *p;
p = frag_var (rs_org, 1, 1, (relax_substateT) 0, exp->X_add_symbol,
- exp->X_add_number, (char *) NULL);
+ exp->X_add_number * OCTETS_PER_BYTE, (char *) NULL);
*p = fill;
}
}
void
s_org (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
register segT segment;
expressionS exp;
register long temp_fill;
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
/* The m68k MRI assembler has a different meaning for .org. It
means to create an absolute section at a given address. We can't
support that--use a linker script instead. */
if (flag_m68k_mri)
{
- as_bad ("MRI style ORG pseudo-op not supported");
+ as_bad (_("MRI style ORG pseudo-op not supported"));
ignore_rest_of_line ();
return;
}
@@ -2415,7 +2437,7 @@ s_org (ignore)
void
s_mri_sect (type)
- char *type;
+ char *type ATTRIBUTE_UNUSED;
{
#ifdef TC_M68K
@@ -2462,7 +2484,7 @@ s_mri_sect (type)
if (c == 'C' || c == 'D' || c == 'M' || c == 'R')
*type = c;
else
- as_bad ("unrecognized section type");
+ as_bad (_("unrecognized section type"));
++input_line_pointer;
#ifdef BFD_ASSEMBLER
@@ -2479,7 +2501,7 @@ s_mri_sect (type)
if (flags != SEC_NO_FLAGS)
{
if (! bfd_set_section_flags (stdoutput, seg, flags))
- as_warn ("error setting flags for \"%s\": %s",
+ as_warn (_("error setting flags for \"%s\": %s"),
bfd_section_name (stdoutput, seg),
bfd_errmsg (bfd_get_error ()));
}
@@ -2530,7 +2552,7 @@ s_mri_sect (type)
else if (strcasecmp (sectype, "romdata") == 0)
*type = 'R';
else
- as_warn ("unrecognized section type `%s'", sectype);
+ as_warn (_("unrecognized section type `%s'"), sectype);
*input_line_pointer = c;
}
@@ -2544,7 +2566,7 @@ s_mri_sect (type)
c = get_symbol_end ();
if (strcasecmp (seccmd, "absolute") == 0)
{
- as_bad ("absolute sections are not supported");
+ as_bad (_("absolute sections are not supported"));
*input_line_pointer = c;
ignore_rest_of_line ();
return;
@@ -2559,7 +2581,7 @@ s_mri_sect (type)
}
else
{
- as_warn ("unrecognized section command `%s'", seccmd);
+ as_warn (_("unrecognized section command `%s'"), seccmd);
*input_line_pointer = c;
}
}
@@ -2569,7 +2591,8 @@ s_mri_sect (type)
#else /* ! TC_I960 */
/* The MRI assembler seems to use different forms of .sect for
different targets. */
- abort ();
+ as_bad ("MRI mode not supported for this target");
+ ignore_rest_of_line ();
#endif /* ! TC_I960 */
#endif /* ! TC_M68K */
}
@@ -2578,7 +2601,7 @@ s_mri_sect (type)
void
s_print (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *s;
int len;
@@ -2592,7 +2615,7 @@ s_print (ignore)
void
s_purgem (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (is_it_end_of_statement ())
{
@@ -2622,18 +2645,31 @@ s_purgem (ignore)
void
s_rept (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int count;
- sb one;
- sb many;
count = get_absolute_expression ();
+ do_repeat(count, "REPT", "ENDR");
+}
+
+/* This function provides a generic repeat block implementation. It allows
+ different directives to be used as the start/end keys. */
+
+void
+do_repeat (count, start, end)
+ int count;
+ const char *start;
+ const char *end;
+{
+ sb one;
+ sb many;
+
sb_new (&one);
- if (! buffer_and_nest ("REPT", "ENDR", &one, get_line_sb))
+ if (! buffer_and_nest (start, end, &one, get_line_sb))
{
- as_bad ("rept without endr");
+ as_bad (_("%s without %s"), start, end);
return;
}
@@ -2643,11 +2679,28 @@ s_rept (ignore)
sb_kill (&one);
- input_scrub_include_sb (&many, input_line_pointer);
+ input_scrub_include_sb (&many, input_line_pointer, 1);
sb_kill (&many);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
}
+/* Skip to end of current repeat loop; EXTRA indicates how many additional
+ input buffers to skip. Assumes that conditionals preceding the loop end
+ are properly nested.
+
+ This function makes it easier to implement a premature "break" out of the
+ loop. The EXTRA arg accounts for other buffers we might have inserted,
+ such as line substitutions. */
+
+void
+end_repeat (extra)
+ int extra;
+{
+ cond_exit_macro (macro_nest);
+ while (extra-- >= 0)
+ buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+}
+
/* Handle the .equ, .equiv and .set directives. If EQUIV is 1, then
this is .equiv, and it is an error if the symbol is already
defined. */
@@ -2675,7 +2728,7 @@ s_set (equiv)
if (*input_line_pointer != ',')
{
*end_name = 0;
- as_bad ("Expected comma after name \"%s\"", name);
+ as_bad (_("Expected comma after name \"%s\""), name);
*end_name = delim;
ignore_rest_of_line ();
return;
@@ -2734,7 +2787,7 @@ s_set (equiv)
if (equiv
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
- as_bad ("symbol `%s' already defined", S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
demand_empty_rest_of_line ();
@@ -2778,9 +2831,12 @@ s_space (mult)
S_SET_VALUE (mri_common_symbol, val + 1);
if (line_label != NULL)
{
- know (line_label->sy_value.X_op == O_symbol);
- know (line_label->sy_value.X_add_symbol == mri_common_symbol);
- line_label->sy_value.X_add_number += 1;
+ expressionS *symexp;
+
+ symexp = symbol_get_value_expression (line_label);
+ know (symexp->X_op == O_symbol);
+ know (symexp->X_add_symbol == mri_common_symbol);
+ symexp->X_add_number += 1;
}
}
}
@@ -2789,7 +2845,7 @@ s_space (mult)
do_align (1, (char *) NULL, 0, 0);
if (line_label != NULL)
{
- line_label->sy_frag = frag_now;
+ symbol_set_frag (line_label, frag_now);
S_SET_VALUE (line_label, frag_now_fix ());
}
}
@@ -2817,7 +2873,7 @@ s_space (mult)
|| (mult != 0 && mult != 1 && val.X_add_number != 0))
{
if (exp.X_op != O_constant)
- as_bad ("Unsupported variable size or fill value");
+ as_bad (_("Unsupported variable size or fill value"));
else
{
offsetT i;
@@ -2841,9 +2897,10 @@ s_space (mult)
bytes = repeat;
if (repeat <= 0)
{
- if (! flag_mri || repeat < 0)
- as_warn (".space repeat count is %s, ignored",
- repeat ? "negative" : "zero");
+ if (! flag_mri)
+ as_warn (_(".space repeat count is zero, ignored"));
+ else if (repeat < 0)
+ as_warn (_(".space repeat count is negative, ignored"));
goto getout;
}
@@ -2872,12 +2929,12 @@ s_space (mult)
{
if (now_seg == absolute_section)
{
- as_bad ("space allocation too complex in absolute section");
+ as_bad (_("space allocation too complex in absolute section"));
subseg_set (text_section, 0);
}
if (mri_common_symbol != NULL)
{
- as_bad ("space allocation too complex in common section");
+ as_bad (_("space allocation too complex in common section"));
mri_common_symbol = NULL;
}
if (!need_pass_2)
@@ -2897,10 +2954,10 @@ s_space (mult)
if (flag_mri && (bytes & 1) != 0)
mri_pending_align = 1;
+ demand_empty_rest_of_line ();
+
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
}
/* This is like s_space, but the value is a floating point number with
@@ -2925,10 +2982,10 @@ s_float_space (float_type)
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad ("missing value");
+ as_bad (_("missing value"));
+ ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- ignore_rest_of_line ();
return;
}
@@ -2949,9 +3006,9 @@ s_float_space (float_type)
flen = hex_float (float_type, temp);
if (flen < 0)
{
+ ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- ignore_rest_of_line ();
return;
}
}
@@ -2964,10 +3021,10 @@ s_float_space (float_type)
know (flen > 0);
if (err)
{
- as_bad ("Bad floating literal: %s", err);
+ as_bad (_("Bad floating literal: %s"), err);
+ ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- ignore_rest_of_line ();
return;
}
}
@@ -2980,17 +3037,17 @@ s_float_space (float_type)
memcpy (p, temp, (unsigned int) flen);
}
+ demand_empty_rest_of_line ();
+
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
}
/* Handle the .struct pseudo-op, as found in MIPS assemblers. */
void
s_struct (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *stop = NULL;
char stopc;
@@ -2999,14 +3056,14 @@ s_struct (ignore)
stop = mri_comment_field (&stopc);
abs_section_offset = get_absolute_expression ();
subseg_set (absolute_section, 0);
+ demand_empty_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- demand_empty_rest_of_line ();
}
void
s_text (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
register int temp;
@@ -3040,10 +3097,10 @@ ignore_rest_of_line () /* For suspect lines: gives warning. */
if (!is_end_of_line[(unsigned char) *input_line_pointer])
{
if (isprint ((unsigned char) *input_line_pointer))
- as_bad ("Rest of line ignored. First ignored character is `%c'.",
+ as_bad (_("Rest of line ignored. First ignored character is `%c'."),
*input_line_pointer);
else
- as_bad ("Rest of line ignored. First ignored character valued 0x%x.",
+ as_bad (_("Rest of line ignored. First ignored character valued 0x%x."),
*input_line_pointer);
while (input_line_pointer < buffer_limit
&& !is_end_of_line[(unsigned char) *input_line_pointer])
@@ -3055,6 +3112,18 @@ ignore_rest_of_line () /* For suspect lines: gives warning. */
know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
}
+void
+discard_rest_of_line ()
+{
+ while (input_line_pointer < buffer_limit
+ && !is_end_of_line[(unsigned char) *input_line_pointer])
+ {
+ input_line_pointer++;
+ }
+ input_line_pointer++; /* Return pointing just after end-of-line. */
+ know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
+}
+
/*
* pseudo_set()
*
@@ -3082,17 +3151,22 @@ pseudo_set (symbolP)
(void) expression (&exp);
if (exp.X_op == O_illegal)
- as_bad ("illegal expression; zero assumed");
+ as_bad (_("illegal expression; zero assumed"));
else if (exp.X_op == O_absent)
- as_bad ("missing expression; zero assumed");
+ as_bad (_("missing expression; zero assumed"));
else if (exp.X_op == O_big)
- as_bad ("%s number invalid; zero assumed",
- exp.X_add_number > 0 ? "bignum" : "floating point");
+ {
+ if (exp.X_add_number > 0)
+ as_bad (_("bignum invalid; zero assumed"));
+ else
+ as_bad (_("floating point number invalid; zero assumed"));
+ }
else if (exp.X_op == O_subtract
&& (S_GET_SEGMENT (exp.X_add_symbol)
== S_GET_SEGMENT (exp.X_op_symbol))
&& SEG_NORMAL (S_GET_SEGMENT (exp.X_add_symbol))
- && exp.X_add_symbol->sy_frag == exp.X_op_symbol->sy_frag)
+ && (symbol_get_frag (exp.X_add_symbol)
+ == symbol_get_frag (exp.X_op_symbol)))
{
exp.X_op = O_constant;
exp.X_add_number = (S_GET_VALUE (exp.X_add_symbol)
@@ -3116,19 +3190,21 @@ pseudo_set (symbolP)
#endif /* OBJ_AOUT or OBJ_BOUT */
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
if (exp.X_op != O_constant)
- symbolP->sy_frag = &zero_address_frag;
+ symbol_set_frag (symbolP, &zero_address_frag);
break;
case O_register:
S_SET_SEGMENT (symbolP, reg_section);
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
- symbolP->sy_frag = &zero_address_frag;
+ symbol_set_frag (symbolP, &zero_address_frag);
break;
case O_symbol:
if (S_GET_SEGMENT (exp.X_add_symbol) == undefined_section
|| exp.X_add_number != 0)
- symbolP->sy_value = exp;
+ symbol_set_value_expression (symbolP, &exp);
+ else if (symbol_section_p (symbolP))
+ as_bad ("invalid attempt to set value of section symbol");
else
{
symbolS *s = exp.X_add_symbol;
@@ -3142,7 +3218,7 @@ pseudo_set (symbolP)
#endif /* OBJ_AOUT or OBJ_BOUT */
S_SET_VALUE (symbolP,
exp.X_add_number + S_GET_VALUE (s));
- symbolP->sy_frag = s->sy_frag;
+ symbol_set_frag (symbolP, symbol_get_frag (s));
copy_symbol_attributes (symbolP, s);
}
break;
@@ -3150,7 +3226,7 @@ pseudo_set (symbolP)
default:
/* The value is some complex expression.
FIXME: Should we set the segment to anything? */
- symbolP->sy_value = exp;
+ symbol_set_value_expression (symbolP, &exp);
break;
}
}
@@ -3180,8 +3256,10 @@ pseudo_set (symbolP)
are defined, which is the normal case, then only simple expressions
are permitted. */
+#ifdef TC_M68K
static void
parse_mri_cons PARAMS ((expressionS *exp, unsigned int nbytes));
+#endif
#ifndef TC_PARSE_CONS_EXPRESSION
#ifdef BITFIELD_CONS_EXPRESSIONS
@@ -3223,9 +3301,9 @@ cons_worker (nbytes, rva)
if (is_it_end_of_statement ())
{
+ demand_empty_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
- demand_empty_rest_of_line ();
return;
}
@@ -3236,9 +3314,11 @@ cons_worker (nbytes, rva)
c = 0;
do
{
+#ifdef TC_M68K
if (flag_m68k_mri)
parse_mri_cons (&exp, (unsigned int) nbytes);
else
+#endif
TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
if (rva)
@@ -3246,7 +3326,7 @@ cons_worker (nbytes, rva)
if (exp.X_op == O_symbol)
exp.X_op = O_symbol_rva;
else
- as_fatal ("rva without symbol");
+ as_fatal (_("rva without symbol"));
}
emit_expr (&exp, (unsigned int) nbytes);
++c;
@@ -3261,10 +3341,10 @@ cons_worker (nbytes, rva)
input_line_pointer--; /* Put terminator back into stream. */
+ demand_empty_rest_of_line ();
+
if (flag_mri)
mri_comment_end (stop, stopc);
-
- demand_empty_rest_of_line ();
}
@@ -3371,7 +3451,7 @@ emit_expr (exp, nbytes)
if (now_seg == absolute_section)
{
if (op != O_constant || exp->X_add_number != 0)
- as_bad ("attempt to store value in absolute section");
+ as_bad (_("attempt to store value in absolute section"));
abs_section_offset += nbytes;
return;
}
@@ -3379,13 +3459,13 @@ emit_expr (exp, nbytes)
/* Handle a negative bignum. */
if (op == O_uminus
&& exp->X_add_number == 0
- && exp->X_add_symbol->sy_value.X_op == O_big
- && exp->X_add_symbol->sy_value.X_add_number > 0)
+ && symbol_get_value_expression (exp->X_add_symbol)->X_op == O_big
+ && symbol_get_value_expression (exp->X_add_symbol)->X_add_number > 0)
{
int i;
unsigned long carry;
- exp = &exp->X_add_symbol->sy_value;
+ exp = symbol_get_value_expression (exp->X_add_symbol);
/* Negate the bignum: one's complement each digit and add 1. */
carry = 1;
@@ -3409,19 +3489,19 @@ emit_expr (exp, nbytes)
if (op == O_absent || op == O_illegal)
{
- as_warn ("zero assumed for missing expression");
+ as_warn (_("zero assumed for missing expression"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad ("floating point number invalid; zero assumed");
+ as_bad (_("floating point number invalid; zero assumed"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_register)
{
- as_warn ("register value used as expression");
+ as_warn (_("register value used as expression"));
op = O_constant;
}
@@ -3437,6 +3517,8 @@ emit_expr (exp, nbytes)
x = (struct broken_word *) xmalloc (sizeof (struct broken_word));
x->next_broken_word = broken_words;
broken_words = x;
+ x->seg = now_seg;
+ x->subseg = now_subseg;
x->frag = frag_now;
x->word_goes_here = p;
x->dispfrag = 0;
@@ -3509,7 +3591,7 @@ emit_expr (exp, nbytes)
&& ((get & mask) != mask
|| (get & hibit) == 0))
{ /* Leading bits contain both 0s & 1s. */
- as_warn ("Value 0x%lx truncated to 0x%lx.",
+ as_warn (_("Value 0x%lx truncated to 0x%lx."),
(unsigned long) get, (unsigned long) use);
}
/* put bytes in right order. */
@@ -3525,7 +3607,7 @@ emit_expr (exp, nbytes)
size = exp->X_add_number * CHARS_PER_LITTLENUM;
if (nbytes < size)
{
- as_warn ("Bignum truncated to %d bytes", nbytes);
+ as_warn (_("Bignum truncated to %d bytes"), nbytes);
size = nbytes;
}
@@ -3602,7 +3684,7 @@ emit_expr (exp, nbytes)
r = BFD_RELOC_64;
break;
default:
- as_bad ("unsupported BFD relocation size %u", nbytes);
+ as_bad (_("unsupported BFD relocation size %u"), nbytes);
r = BFD_RELOC_32;
break;
}
@@ -3691,7 +3773,7 @@ parse_bitfield_cons (exp, nbytes)
if (exp->X_op == O_absent)
{
- as_warn ("using a bit field width of zero");
+ as_warn (_("using a bit field width of zero"));
exp->X_add_number = 0;
exp->X_op = O_constant;
} /* implied zero width bitfield */
@@ -3699,7 +3781,7 @@ parse_bitfield_cons (exp, nbytes)
if (exp->X_op != O_constant)
{
*input_line_pointer = '\0';
- as_bad ("field width \"%s\" too complex for a bitfield", hold);
+ as_bad (_("field width \"%s\" too complex for a bitfield"), hold);
*input_line_pointer = ':';
demand_empty_rest_of_line ();
return;
@@ -3707,7 +3789,7 @@ parse_bitfield_cons (exp, nbytes)
if ((width = exp->X_add_number) > (BITS_PER_CHAR * nbytes))
{
- as_warn ("field width %lu too big to fit in %d bytes: truncated to %d bits",
+ as_warn (_("field width %lu too big to fit in %d bytes: truncated to %d bits"),
width, nbytes, (BITS_PER_CHAR * nbytes));
width = BITS_PER_CHAR * nbytes;
} /* too big */
@@ -3728,7 +3810,7 @@ parse_bitfield_cons (exp, nbytes)
char cache = *input_line_pointer;
*input_line_pointer = '\0';
- as_bad ("field value \"%s\" too complex for a bitfield", hold);
+ as_bad (_("field value \"%s\" too complex for a bitfield"), hold);
*input_line_pointer = cache;
demand_empty_rest_of_line ();
return;
@@ -3758,6 +3840,7 @@ parse_bitfield_cons (exp, nbytes)
/* Handle an MRI style string expression. */
+#ifdef TC_M68K
static void
parse_mri_cons (exp, nbytes)
expressionS *exp;
@@ -3780,7 +3863,7 @@ parse_mri_cons (exp, nbytes)
++input_line_pointer;
else if (*input_line_pointer == 'E')
{
- as_bad ("EBCDIC constants are not supported");
+ as_bad (_("EBCDIC constants are not supported"));
++input_line_pointer;
}
@@ -3820,6 +3903,7 @@ parse_mri_cons (exp, nbytes)
input_line_pointer++;
}
}
+#endif /* TC_M68K */
#ifdef REPEAT_CONS_EXPRESSIONS
@@ -3850,7 +3934,7 @@ parse_repeat_cons (exp, nbytes)
if (count.X_op != O_constant
|| count.X_add_number <= 0)
{
- as_warn ("Unresolvable or nonpositive repeat count; using 1");
+ as_warn (_("Unresolvable or nonpositive repeat count; using 1"));
return;
}
@@ -3901,7 +3985,7 @@ hex_float (float_type, bytes)
break;
default:
- as_bad ("Unknown floating type type '%c'", float_type);
+ as_bad (_("Unknown floating type type '%c'"), float_type);
return -1;
}
@@ -3923,7 +4007,7 @@ hex_float (float_type, bytes)
if (i >= length)
{
- as_warn ("Floating point constant too large");
+ as_warn (_("Floating point constant too large"));
return -1;
}
d = hex_value (*input_line_pointer) << 4;
@@ -4026,7 +4110,7 @@ float_cons (float_type)
know (length > 0);
if (err)
{
- as_bad ("Bad floating literal: %s", err);
+ as_bad (_("Bad floating literal: %s"), err);
ignore_rest_of_line ();
return;
}
@@ -4048,7 +4132,7 @@ float_cons (float_type)
if (count_exp.X_op != O_constant
|| count_exp.X_add_number <= 0)
{
- as_warn ("unresolvable or nonpositive repeat count; using 1");
+ as_warn (_("unresolvable or nonpositive repeat count; using 1"));
}
else
count = count_exp.X_add_number;
@@ -4111,7 +4195,7 @@ sizeof_uleb128 (value)
return size;
}
-inline int
+int
sizeof_leb128 (value, sign)
valueT value;
int sign;
@@ -4175,7 +4259,7 @@ output_uleb128 (p, value)
return p - orig;
}
-inline int
+int
output_leb128 (p, value, sign)
char *p;
valueT value;
@@ -4191,7 +4275,7 @@ output_leb128 (p, value, sign)
we don't output for NULL values of P. It isn't really as critical as
for "normal" values that this be streamlined. */
-static int
+static inline int
output_big_sleb128 (p, bignum, size)
char *p;
LITTLENUM_TYPE *bignum;
@@ -4237,7 +4321,7 @@ output_big_sleb128 (p, bignum, size)
return p - orig;
}
-static int
+static inline int
output_big_uleb128 (p, bignum, size)
char *p;
LITTLENUM_TYPE *bignum;
@@ -4279,7 +4363,7 @@ output_big_uleb128 (p, bignum, size)
return p - orig;
}
-static inline int
+static int
output_big_leb128 (p, bignum, size, sign)
char *p;
LITTLENUM_TYPE *bignum;
@@ -4303,19 +4387,19 @@ emit_leb128_expr(exp, sign)
if (op == O_absent || op == O_illegal)
{
- as_warn ("zero assumed for missing expression");
+ as_warn (_("zero assumed for missing expression"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad ("floating point number invalid; zero assumed");
+ as_bad (_("floating point number invalid; zero assumed"));
exp->X_add_number = 0;
op = O_constant;
}
else if (op == O_register)
{
- as_warn ("register value used as expression");
+ as_warn (_("register value used as expression"));
op = O_constant;
}
@@ -4372,7 +4456,7 @@ s_leb128 (sign)
/*
* stringer()
*
- * We read 0 or more ',' seperated, double-quoted strings.
+ * We read 0 or more ',' separated, double-quoted strings.
*
* Caller should have checked need_pass_2 is FALSE because we don't check it.
*/
@@ -4392,7 +4476,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
/*
* The following awkward logic is to parse ZERO or more strings,
- * comma seperated. Recall a string expression includes spaces
+ * comma separated. Recall a string expression includes spaces
* before the opening '\"' and spaces after the closing '\"'.
* We fake a leading ',' if there is (supposed to be)
* a 1st, expression. We keep demanding expressions for each
@@ -4452,7 +4536,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
FRAG_APPEND_1_CHAR (c);
if (*input_line_pointer != '>')
{
- as_bad ("Expected <nn>");
+ as_bad (_("Expected <nn>"));
}
input_line_pointer++;
break;
@@ -4485,7 +4569,7 @@ next_char_of_string ()
break;
case '\n':
- as_warn ("Unterminated string: Newline inserted.");
+ as_warn (_("Unterminated string: Newline inserted."));
bump_line_counters ();
break;
@@ -4568,7 +4652,7 @@ next_char_of_string ()
case '\n':
/* To be compatible with BSD 4.2 as: give the luser a linefeed!! */
- as_warn ("Unterminated string: Newline inserted.");
+ as_warn (_("Unterminated string: Newline inserted."));
c = '\n';
bump_line_counters ();
break;
@@ -4576,7 +4660,7 @@ next_char_of_string ()
default:
#ifdef ONLY_STANDARD_ESCAPES
- as_bad ("Bad escaped character in string, '?' assumed");
+ as_bad (_("Bad escaped character in string, '?' assumed"));
c = '?';
#endif /* ONLY_STANDARD_ESCAPES */
@@ -4602,7 +4686,7 @@ get_segmented_expression (expP)
|| expP->X_op == O_absent
|| expP->X_op == O_big)
{
- as_bad ("expected address expression; zero assumed");
+ as_bad (_("expected address expression; zero assumed"));
expP->X_op = O_constant;
expP->X_add_number = 0;
retval = absolute_section;
@@ -4622,10 +4706,10 @@ get_known_segmented_expression (expP)
expression. */
if (expP->X_add_symbol != NULL
&& S_GET_SEGMENT (expP->X_add_symbol) != expr_section)
- as_warn ("symbol \"%s\" undefined; zero assumed",
+ as_warn (_("symbol \"%s\" undefined; zero assumed"),
S_GET_NAME (expP->X_add_symbol));
else
- as_warn ("some symbol undefined; zero assumed");
+ as_warn (_("some symbol undefined; zero assumed"));
retval = absolute_section;
expP->X_op = O_constant;
expP->X_add_number = 0;
@@ -4643,7 +4727,7 @@ get_absolute_expression ()
if (exp.X_op != O_constant)
{
if (exp.X_op != O_absent)
- as_bad ("bad or irreducible absolute expression; zero assumed");
+ as_bad (_("bad or irreducible absolute expression; zero assumed"));
exp.X_add_number = 0;
}
return exp.X_add_number;
@@ -4681,7 +4765,7 @@ demand_copy_C_string (len_pointer)
s = 0;
len = 1;
*len_pointer = 0;
- as_bad ("This string may not contain \'\\0\'");
+ as_bad (_("This string may not contain \'\\0\'"));
}
}
}
@@ -4720,7 +4804,7 @@ demand_copy_string (lenP)
}
else
{
- as_warn ("Missing string");
+ as_warn (_("Missing string"));
retval = NULL;
ignore_rest_of_line ();
}
@@ -4780,12 +4864,15 @@ equals (sym_name, reassign)
if (! reassign
&& S_IS_DEFINED (symbolP)
&& S_GET_SEGMENT (symbolP) != reg_section)
- as_bad ("symbol `%s' already defined", S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
}
if (flag_mri)
- mri_comment_end (stop, stopc);
+ {
+ ignore_rest_of_line (); /* check garbage after the expression */
+ mri_comment_end (stop, stopc);
+ }
} /* equals() */
/* .include -- include a file at this point. */
@@ -4793,9 +4880,8 @@ equals (sym_name, reassign)
/* ARGSUSED */
void
s_include (arg)
- int arg;
+ int arg ATTRIBUTE_UNUSED;
{
- char *newbuf;
char *filename;
int i;
FILE *try;
@@ -4846,8 +4932,7 @@ s_include (arg)
gotit:
/* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */
register_dependency (path);
- newbuf = input_scrub_include_file (path, input_line_pointer);
- buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+ input_scrub_insert_file (path);
} /* s_include() */
void
@@ -4875,10 +4960,147 @@ add_include_dir (path)
if (i > include_dir_maxlen)
include_dir_maxlen = i;
} /* add_include_dir() */
+
+/* Output debugging information to denote the source file. */
+
+static void
+generate_file_debug ()
+{
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_file ();
+}
+
+/* Output line number debugging information for the current source line. */
+
+void
+generate_lineno_debug ()
+{
+#ifdef ECOFF_DEBUGGING
+ /* ECOFF assemblers automatically generate debugging information.
+ FIXME: This should probably be handled elsewhere. */
+ if (debug_type == DEBUG_UNSPECIFIED)
+ {
+ if (ECOFF_DEBUGGING && ecoff_no_current_file ())
+ debug_type = DEBUG_ECOFF;
+ else
+ debug_type = DEBUG_NONE;
+ }
+#endif
+
+ switch (debug_type)
+ {
+ case DEBUG_UNSPECIFIED:
+ case DEBUG_NONE:
+ break;
+ case DEBUG_STABS:
+ stabs_generate_asm_lineno ();
+ break;
+ case DEBUG_ECOFF:
+ ecoff_generate_asm_lineno ();
+ break;
+ case DEBUG_DWARF:
+ case DEBUG_DWARF2:
+ /* FIXME. */
+ break;
+ }
+}
+
+/* Output debugging information to mark a function entry point or end point.
+ END_P is zero for .func, and non-zero for .endfunc. */
+
+void
+s_func (end_p)
+ int end_p;
+{
+ do_s_func (end_p, NULL);
+}
+/* Subroutine of s_func so targets can choose a different default prefix.
+ If DEFAULT_PREFIX is NULL, use the target's "leading char". */
+
+void
+do_s_func (end_p, default_prefix)
+ int end_p;
+ const char *default_prefix;
+{
+ /* Record the current function so that we can issue an error message for
+ misplaced .func,.endfunc, and also so that .endfunc needs no
+ arguments. */
+ static char *current_name;
+ static char *current_label;
+
+ if (end_p)
+ {
+ if (current_name == NULL)
+ {
+ as_bad (_("missing .func"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_endfunc (current_name, current_label);
+
+ current_name = current_label = NULL;
+ }
+ else /* ! end_p */
+ {
+ char *name,*label;
+ char delim1,delim2;
+
+ if (current_name != NULL)
+ {
+ as_bad (_(".endfunc missing for previous .func"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ name = input_line_pointer;
+ delim1 = get_symbol_end ();
+ name = xstrdup (name);
+ *input_line_pointer = delim1;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ {
+ if (default_prefix)
+ asprintf (&label, "%s%s", default_prefix, name);
+ else
+ {
+ char leading_char = 0;
+#ifdef BFD_ASSEMBLER
+ leading_char = bfd_get_symbol_leading_char (stdoutput);
+#endif
+ /* Missing entry point, use function's name with the leading
+ char prepended. */
+ if (leading_char)
+ asprintf (&label, "%c%s", leading_char, name);
+ else
+ label = name;
+ }
+ }
+ else
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ label = input_line_pointer;
+ delim2 = get_symbol_end ();
+ label = xstrdup (label);
+ *input_line_pointer = delim2;
+ }
+
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_func (name, label);
+
+ current_name = name;
+ current_label = label;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
void
s_ignore (arg)
- int arg;
+ int arg ATTRIBUTE_UNUSED;
{
while (!is_end_of_line[(unsigned char) *input_line_pointer])
{
@@ -4895,4 +5117,36 @@ read_print_statistics (file)
hash_print_statistics (file, "pseudo-op table", po_hash);
}
+/* Inserts the given line into the input stream.
+
+ This call avoids macro/conditionals nesting checking, since the contents of
+ the line are assumed to replace the contents of a line already scanned.
+
+ An appropriate use of this function would be substition of input lines when
+ called by md_start_line_hook(). The given line is assumed to already be
+ properly scrubbed. */
+
+void
+input_scrub_insert_line (line)
+ const char *line;
+{
+ sb newline;
+ sb_new (&newline);
+ sb_add_string (&newline, line);
+ input_scrub_include_sb (&newline, input_line_pointer, 0);
+ sb_kill (&newline);
+ buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+}
+
+/* Insert a file into the input stream; the path must resolve to an actual
+ file; no include path searching or dependency registering is performed. */
+
+void
+input_scrub_insert_file (path)
+ char *path;
+{
+ input_scrub_include_file (path, input_line_pointer);
+ buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+}
+
/* end of read.c */
diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h
index 4e1e226..571b59b5 100644
--- a/contrib/binutils/gas/read.h
+++ b/contrib/binutils/gas/read.h
@@ -35,11 +35,14 @@ extern char *input_line_pointer;/* -> char we are parsing now. */
#define LEX_NAME (1) /* may continue a name */
#define LEX_BEGIN_NAME (2) /* may begin a name */
+#define LEX_END_NAME (4) /* ends a name */
#define is_name_beginner(c) \
( lex_type[(unsigned char) (c)] & LEX_BEGIN_NAME )
#define is_part_of_name(c) \
( lex_type[(unsigned char) (c)] & LEX_NAME )
+#define is_name_ender(c) \
+ ( lex_type[(unsigned char) (c)] & LEX_END_NAME )
#ifndef is_a_char
#define CHAR_MASK (0xff)
@@ -102,13 +105,21 @@ extern void emit_leb128_expr PARAMS ((expressionS *, int));
extern void equals PARAMS ((char *sym_name, int reassign));
extern void float_cons PARAMS ((int float_type));
extern void ignore_rest_of_line PARAMS ((void));
+extern void discard_rest_of_line PARAMS ((void));
extern int output_leb128 PARAMS ((char *, valueT, int sign));
extern void pseudo_set PARAMS ((symbolS * symbolP));
extern void read_a_source_file PARAMS ((char *name));
extern void read_begin PARAMS ((void));
extern void read_print_statistics PARAMS ((FILE *));
extern int sizeof_leb128 PARAMS ((valueT, int sign));
+extern void stabs_generate_asm_file PARAMS ((void));
extern void stabs_generate_asm_lineno PARAMS ((void));
+extern void stabs_generate_asm_func PARAMS ((const char *, const char *));
+extern void stabs_generate_asm_endfunc PARAMS ((const char *, const char *));
+extern void do_repeat PARAMS((int,const char *,const char *));
+extern void end_repeat PARAMS((int));
+
+extern void generate_lineno_debug PARAMS ((void));
extern void s_abort PARAMS ((int));
extern void s_align_bytes PARAMS ((int arg));
@@ -119,12 +130,15 @@ extern void s_comm PARAMS ((int));
extern void s_data PARAMS ((int));
extern void s_desc PARAMS ((int));
extern void s_else PARAMS ((int arg));
+extern void s_elseif PARAMS ((int arg));
extern void s_end PARAMS ((int arg));
extern void s_endif PARAMS ((int arg));
extern void s_err PARAMS ((int));
extern void s_fail PARAMS ((int));
extern void s_fill PARAMS ((int));
extern void s_float_space PARAMS ((int mult));
+extern void s_func PARAMS ((int));
+extern void do_s_func PARAMS ((int, const char *));
extern void s_globl PARAMS ((int arg));
extern void s_if PARAMS ((int arg));
extern void s_ifc PARAMS ((int arg));
diff --git a/contrib/binutils/gas/sb.h b/contrib/binutils/gas/sb.h
index 7e6daf1..7eaed25 100644
--- a/contrib/binutils/gas/sb.h
+++ b/contrib/binutils/gas/sb.h
@@ -94,6 +94,6 @@ extern int sb_skip_white PARAMS ((int, sb *));
extern int sb_skip_comma PARAMS ((int, sb *));
/* Actually in input-scrub.c. */
-extern void input_scrub_include_sb PARAMS ((sb *, char *));
+extern void input_scrub_include_sb PARAMS ((sb *, char *, int));
#endif /* SB_H */
diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c
index e58e6ff..7c13c2f 100644
--- a/contrib/binutils/gas/stabs.c
+++ b/contrib/binutils/gas/stabs.c
@@ -1,5 +1,5 @@
/* Generic stabs parsing for gas.
- Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "aout/stab_gnu.h"
static void s_stab_generic PARAMS ((int, char *, char *));
+static void generate_asm_file PARAMS ((int, char *));
/* Allow backends to override the names used for the stab sections. */
#ifndef STAB_SECTION_NAME
@@ -40,6 +41,15 @@ static void s_stab_generic PARAMS ((int, char *, char *));
#define STAB_STRING_SECTION_NAME ".stabstr"
#endif
+/* Non-zero if we're in the middle of a .func function, in which case
+ stabs_generate_asm_lineno emits function relative line number stabs.
+ Otherwise it emits line number stabs with absolute addresses. Note that
+ both cases only apply to assembler code assembled with -gstabs. */
+static int in_dot_func_p;
+
+/* Label at start of current function if in_dot_func_p != 0. */
+static const char *current_function_label;
+
/*
* Handle .stabX directives, which used to be open-coded.
* So much creeping featurism overloaded the semantics that we decided
@@ -142,14 +152,14 @@ aout_process_stab (what, string, type, other, desc)
if (what == 's' || what == 'n')
{
/* Pick up the value from the input line. */
- symbol->sy_frag = &zero_address_frag;
+ symbol_set_frag (symbol, &zero_address_frag);
pseudo_set (symbol);
}
else
{
/* .stabd sets the name to NULL. Why? */
S_SET_NAME (symbol, NULL);
- symbol->sy_frag = frag_now;
+ symbol_set_frag (symbol, frag_now);
S_SET_VALUE (symbol, (valueT) frag_now_fix ());
}
@@ -196,7 +206,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
input_line_pointer++;
else
{
- as_warn (".stabs: Missing comma");
+ as_warn (_(".stabs: Missing comma"));
ignore_rest_of_line ();
return;
}
@@ -204,7 +214,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
if (get_absolute_expression_and_terminator (&longint) != ',')
{
- as_warn (".stab%c: Missing comma", what);
+ as_warn (_(".stab%c: Missing comma"), what);
ignore_rest_of_line ();
return;
}
@@ -212,7 +222,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
if (get_absolute_expression_and_terminator (&longint) != ',')
{
- as_warn (".stab%c: Missing comma", what);
+ as_warn (_(".stab%c: Missing comma"), what);
ignore_rest_of_line ();
return;
}
@@ -223,7 +233,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
{
if (*input_line_pointer != ',')
{
- as_warn (".stab%c: Missing comma", what);
+ as_warn (_(".stab%c: Missing comma"), what);
ignore_rest_of_line ();
return;
}
@@ -288,6 +298,10 @@ s_stab_generic (what, stab_secname, stabstr_secname)
dot = frag_now_fix ();
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
if (cached_secname && !strcmp (cached_secname, stab_secname))
{
seg = cached_sec;
@@ -398,7 +412,7 @@ s_xstab (what)
input_line_pointer++;
else
{
- as_bad ("comma missing in .xstabs");
+ as_bad (_("comma missing in .xstabs"));
ignore_rest_of_line ();
return;
}
@@ -443,7 +457,7 @@ s_desc (ignore)
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad ("Expected comma after name \"%s\"", name);
+ as_bad (_("Expected comma after name \"%s\""), name);
*p = c;
ignore_rest_of_line ();
}
@@ -461,18 +475,30 @@ s_desc (ignore)
#endif /* defined (S_SET_DESC) */
-/* Generate stabs debugging information for the current line. This is
- used to produce debugging information for an assembler file. */
+/* Generate stabs debugging information to denote the main source file. */
void
-stabs_generate_asm_lineno ()
+stabs_generate_asm_file ()
{
- static char *last_file;
- static int lineno_count;
- char *hold;
char *file;
unsigned int lineno;
- char buf[100];
+
+ as_where (&file, &lineno);
+ generate_asm_file (N_SO, file);
+}
+
+/* Generate stabs debugging information to denote the source file.
+ TYPE is one of N_SO, N_SOL. */
+
+static void
+generate_asm_file (type, file)
+ int type;
+ char *file;
+{
+ static char *last_file;
+ static int label_count;
+ char *hold;
+ char *buf = xmalloc (2 * strlen (file) + 10);
char sym[30];
/* Rather than try to do this in some efficient fashion, we just
@@ -482,17 +508,31 @@ stabs_generate_asm_lineno ()
hold = input_line_pointer;
- as_where (&file, &lineno);
-
if (last_file == NULL
|| strcmp (last_file, file) != 0)
{
- sprintf (sym, "%sF%d", FAKE_LABEL_NAME, lineno_count);
- ++lineno_count;
-
- sprintf (buf, "\"%s\",%d,0,0,%s\n", file,
- last_file == NULL ? N_SO : N_SOL,
- sym);
+ char *tmp = file;
+ char *endp = file + strlen(file);
+ char *bufp = buf;
+
+ sprintf (sym, "%sF%d", FAKE_LABEL_NAME, label_count);
+ ++label_count;
+
+ *bufp++ = '"';
+ while (tmp < endp)
+ {
+ char *bslash = strchr (tmp, '\\');
+ int len = (bslash ? (bslash - tmp + 1) : strlen (tmp));
+ /* double all backslashes, since demand_copy_C_string (used by
+ s_stab to extract the part in quotes) will try to replace them as
+ escape sequences. backslash may appear in a filespec. */
+ strncpy (bufp, tmp, len);
+ tmp += len;
+ bufp += len;
+ if (bslash != NULL)
+ *bufp++ = '\\';
+ }
+ sprintf (bufp, "\",%d,0,0,%s\n", type, sym);
input_line_pointer = buf;
s_stab ('s');
colon (sym);
@@ -502,13 +542,110 @@ stabs_generate_asm_lineno ()
last_file = xstrdup (file);
}
- sprintf (sym, "%sL%d", FAKE_LABEL_NAME, lineno_count);
- ++lineno_count;
+ input_line_pointer = hold;
+ free (buf);
+}
+
+/* Generate stabs debugging information for the current line. This is
+ used to produce debugging information for an assembler file. */
+
+void
+stabs_generate_asm_lineno ()
+{
+ static int label_count;
+ char *hold;
+ char *file;
+ unsigned int lineno;
+ char *buf;
+ char sym[30];
+
+ /* Rather than try to do this in some efficient fashion, we just
+ generate a string and then parse it again. That lets us use the
+ existing stabs hook, which expect to see a string, rather than
+ inventing new ones. */
+
+ hold = input_line_pointer;
+
+ as_where (&file, &lineno);
+
+ generate_asm_file (N_SOL, file);
- sprintf (buf, "%d,0,%d,%s\n", N_SLINE, lineno, sym);
+ sprintf (sym, "%sL%d", FAKE_LABEL_NAME, label_count);
+ ++label_count;
+
+ if (in_dot_func_p)
+ {
+ buf = (char *) alloca (100 + strlen (current_function_label));
+ sprintf (buf, "%d,0,%d,%s-%s\n", N_SLINE, lineno,
+ sym, current_function_label);
+ }
+ else
+ {
+ buf = (char *) alloca (100);
+ sprintf (buf, "%d,0,%d,%s\n", N_SLINE, lineno, sym);
+ }
input_line_pointer = buf;
s_stab ('n');
colon (sym);
input_line_pointer = hold;
}
+
+/* Emit a function stab.
+ All assembler functions are assumed to have return type `void'. */
+
+void
+stabs_generate_asm_func (funcname, startlabname)
+ const char *funcname;
+ const char *startlabname;
+{
+ static int void_emitted_p;
+ char *hold = input_line_pointer;
+ char *buf;
+ char *file;
+ unsigned int lineno;
+
+ if (! void_emitted_p)
+ {
+ input_line_pointer = "\"void:t1=1\",128,0,0,0";
+ s_stab ('s');
+ void_emitted_p = 1;
+ }
+
+ as_where (&file, &lineno);
+ asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
+ funcname, N_FUN, lineno + 1, startlabname);
+ input_line_pointer = buf;
+ s_stab ('s');
+ free (buf);
+
+ input_line_pointer = hold;
+ current_function_label = xstrdup (startlabname);
+ in_dot_func_p = 1;
+}
+
+/* Emit a stab to record the end of a function. */
+
+void
+stabs_generate_asm_endfunc (funcname, startlabname)
+ const char *funcname ATTRIBUTE_UNUSED;
+ const char *startlabname;
+{
+ static int label_count;
+ char *hold = input_line_pointer;
+ char *buf;
+ char sym[30];
+
+ sprintf (sym, "%sendfunc%d", FAKE_LABEL_NAME, label_count);
+ ++label_count;
+ colon (sym);
+
+ asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname);
+ input_line_pointer = buf;
+ s_stab ('s');
+ free (buf);
+
+ input_line_pointer = hold;
+ in_dot_func_p = 0;
+ current_function_label = NULL;
+}
diff --git a/contrib/binutils/gas/struc-symbol.h b/contrib/binutils/gas/struc-symbol.h
index 0e60cb1..7573566 100644
--- a/contrib/binutils/gas/struc-symbol.h
+++ b/contrib/binutils/gas/struc-symbol.h
@@ -1,5 +1,5 @@
/* struct_symbol.h - Internal symbol structure
- Copyright (C) 1987, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -14,22 +14,23 @@
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. */
#ifndef __struc_symbol_h__
#define __struc_symbol_h__
-#ifdef BFD_ASSEMBLER
-/* The BFD code wants to walk the list in both directions. */
-#undef SYMBOLS_NEED_BACKPOINTERS
-#define SYMBOLS_NEED_BACKPOINTERS
-#endif
+/* The information we keep for a symbol. Note that the symbol table
+ holds pointers both to this and to local_symbol structures. See
+ below. */
-/* our version of an nlist node */
struct symbol
{
-#ifndef BFD_ASSEMBLER
+#ifdef BFD_ASSEMBLER
+ /* BFD symbol */
+ asymbol *bsym;
+#else
/* The (4-origin) position of sy_name in the symbol table of the object
file. This will be 0 for (nameless) .stabd symbols.
@@ -41,9 +42,6 @@ struct symbol
/* The 24 bit symbol number. Symbol numbers start at 0 and are unsigned. */
long sy_number;
-#else
- /* BFD symbol */
- asymbol *bsym;
#endif
/* The value of the symbol. */
@@ -90,72 +88,58 @@ struct symbol
#ifdef TC_SYMFIELD_TYPE
TC_SYMFIELD_TYPE sy_tc;
#endif
-
-#ifdef TARGET_SYMBOL_FIELDS
- TARGET_SYMBOL_FIELDS
-#endif
};
-typedef struct symbol symbolS;
-
-#ifndef WORKING_DOT_WORD
-struct broken_word
- {
- /* Linked list -- one of these structures per ".word x-y+C"
- expression. */
- struct broken_word *next_broken_word;
- /* Which frag is this broken word in? */
- fragS *frag;
- /* Where in the frag is it? */
- char *word_goes_here;
- /* Where to add the break. */
- fragS *dispfrag; /* where to add the break */
- /* Operands of expression. */
- symbolS *add;
- symbolS *sub;
- offsetT addnum;
-
- int added; /* nasty thing happend yet? */
- /* 1: added and has a long-jump */
- /* 2: added but uses someone elses long-jump */
-
- /* Pointer to broken_word with a similar long-jump. */
- struct broken_word *use_jump;
- };
-extern struct broken_word *broken_words;
-#endif /* ndef WORKING_DOT_WORD */
-
-/*
- * Current means for getting from symbols to segments and vice verse.
- * This will change for infinite-segments support (e.g. COFF).
- */
-extern const segT N_TYPE_seg[]; /* subseg.c */
-
-#define SEGMENT_TO_SYMBOL_TYPE(seg) ( seg_N_TYPE [(int) (seg)] )
-extern const short seg_N_TYPE[];/* subseg.c */
-
-#define N_REGISTER 30 /* Fake N_TYPE value for SEG_REGISTER */
-
-void symbol_clear_list_pointers PARAMS ((symbolS * symbolP));
-
-#ifdef SYMBOLS_NEED_BACKPOINTERS
+#ifdef BFD_ASSEMBLER
-void symbol_insert PARAMS ((symbolS * addme, symbolS * target,
- symbolS ** rootP, symbolS ** lastP));
-void symbol_remove PARAMS ((symbolS * symbolP, symbolS ** rootP,
- symbolS ** lastP));
+/* A pointer in the symbol may point to either a complete symbol
+ (struct symbol above) or to a local symbol (struct local_symbol
+ defined here). The symbol code can detect the case by examining
+ the first field. It is always NULL for a local symbol.
-#define symbol_previous(s) ((s)->sy_previous)
+ We do this because we ordinarily only need a small amount of
+ information for a local symbol. The symbol table takes up a lot of
+ space, and storing less information for a local symbol can make a
+ big difference in assembler memory usage when assembling a large
+ file. */
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
+struct local_symbol
+{
+ /* This pointer is always NULL to indicate that this is a local
+ symbol. */
+ asymbol *lsy_marker;
+
+ /* The symbol section. This also serves as a flag. If this is
+ reg_section, then this symbol has been converted into a regular
+ symbol, and sy_sym points to it. */
+ segT lsy_section;
+
+ /* The symbol name. */
+ const char *lsy_name;
+
+ /* The symbol frag or the real symbol, depending upon the value in
+ sy_section. If the symbol has been fully resolved, lsy_frag is
+ set to NULL. */
+ union
+ {
+ fragS *lsy_frag;
+ symbolS *lsy_sym;
+ } u;
-void verify_symbol_chain PARAMS ((symbolS * rootP, symbolS * lastP));
-void verify_symbol_chain_2 PARAMS ((symbolS * symP));
+ /* The offset within the frag. */
+ valueT lsy_offset;
+};
-void symbol_append PARAMS ((symbolS * addme, symbolS * target,
- symbolS ** rootP, symbolS ** lastP));
+#define local_symbol_converted_p(l) ((l)->lsy_section == reg_section)
+#define local_symbol_mark_converted(l) ((l)->lsy_section = reg_section)
+#define local_symbol_resolved_p(l) ((l)->u.lsy_frag == NULL)
+#define local_symbol_mark_resolved(l) ((l)->u.lsy_frag = NULL)
+#define local_symbol_get_frag(l) ((l)->u.lsy_frag)
+#define local_symbol_set_frag(l, f) ((l)->u.lsy_frag = (f))
+#define local_symbol_get_real_symbol(l) ((l)->u.lsy_sym)
+#define local_symbol_set_real_symbol(l, s) ((l)->u.lsy_sym = (s))
-#define symbol_next(s) ((s)->sy_next)
+#endif /* BFD_ASSEMBLER */
#endif /* __struc_symbol_h__ */
diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c
index 28986d6..b2bf70d 100644
--- a/contrib/binutils/gas/subsegs.c
+++ b/contrib/binutils/gas/subsegs.c
@@ -1,5 +1,5 @@
/* subsegs.c - subsegments -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -298,6 +298,16 @@ subseg_set_rest (seg, subseg)
*lastPP = newP;
newP->frch_next = frcP; /* perhaps NULL */
+
+#ifdef BFD_ASSEMBLER
+ {
+ segment_info_type *seginfo;
+ seginfo = seg_info (seg);
+ if (seginfo && seginfo->frchainP == frcP)
+ seginfo->frchainP = newP;
+ }
+#endif
+
frcP = newP;
}
/*
@@ -366,7 +376,7 @@ subseg_new (segname, subseg)
return new_seg;
}
#else
- as_bad ("Attempt to switch to nonexistent segment \"%s\"", segname);
+ as_bad (_("Attempt to switch to nonexistent segment \"%s\""), segname);
return now_seg;
#endif
}
@@ -523,15 +533,30 @@ section_symbol (sec)
|| symbol_table_frozen
#endif
)
- /* Here we know it won't be going into the symbol table. */
- s = symbol_create (sec->name, sec, 0, &zero_address_frag);
+ {
+ /* Here we know it won't be going into the symbol table. */
+ s = symbol_create (sec->name, sec, 0, &zero_address_frag);
+ }
else
- s = symbol_new (sec->name, sec, 0, &zero_address_frag);
+ {
+ s = symbol_find_base (sec->name, 0);
+ if (s == NULL)
+ s = symbol_new (sec->name, sec, 0, &zero_address_frag);
+ else
+ {
+ if (S_GET_SEGMENT (s) == undefined_section)
+ {
+ S_SET_SEGMENT (s, sec);
+ symbol_set_frag (s, &zero_address_frag);
+ }
+ }
+ }
+
S_CLEAR_EXTERNAL (s);
/* Use the BFD section symbol, if possible. */
if (obj_sec_sym_ok_for_reloc (sec))
- s->bsym = sec->symbol;
+ symbol_set_bfdsym (s, sec->symbol);
seginfo->sym = s;
return s;
@@ -539,6 +564,51 @@ section_symbol (sec)
#endif /* BFD_ASSEMBLER */
+/* Return whether the specified segment is thought to hold text. */
+
+#ifndef BFD_ASSEMBLER
+const char * const nontext_section_names[] =
+{
+ ".eh_frame",
+ ".gcc_except_table",
+#ifdef OBJ_COFF
+#ifndef COFF_LONG_SECTION_NAMES
+ ".eh_fram",
+ ".gcc_exc",
+#endif
+#endif
+ NULL
+};
+#endif /* ! BFD_ASSEMBLER */
+
+int
+subseg_text_p (sec)
+ segT sec;
+{
+#ifdef BFD_ASSEMBLER
+ return (bfd_get_section_flags (stdoutput, sec) & SEC_CODE) != 0;
+#else /* ! BFD_ASSEMBLER */
+ const char * const *p;
+
+ if (sec == data_section || sec == bss_section)
+ return 0;
+
+ for (p = nontext_section_names; *p != NULL; ++p)
+ {
+ if (strcmp (segment_name (sec), *p) == 0)
+ return 0;
+
+#ifdef obj_segment_name
+ if (strcmp (obj_segment_name (sec), *p) == 0)
+ return 0;
+#endif
+ }
+
+ return 1;
+
+#endif /* ! BFD_ASSEMBLER */
+}
+
void
subsegs_print_statistics (file)
FILE *file;
diff --git a/contrib/binutils/gas/subsegs.h b/contrib/binutils/gas/subsegs.h
index 4c8605f..4840d5b 100644
--- a/contrib/binutils/gas/subsegs.h
+++ b/contrib/binutils/gas/subsegs.h
@@ -1,5 +1,5 @@
/* subsegs.h -> subsegs.c
- Copyright (C) 1987, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92, 93, 94, 95, 96, 1998 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. */
/*
* For every sub-segment the user mentions in the ASsembler program,
@@ -63,7 +64,7 @@ extern frchainS *frchain_root;
extern frchainS *frchain_now;
-typedef struct
+typedef struct segment_info_struct
{
frchainS *frchainP;
unsigned int hadone : 1;
diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c
index 8bb601f..b54a2fd 100644
--- a/contrib/binutils/gas/symbols.c
+++ b/contrib/binutils/gas/symbols.c
@@ -1,5 +1,5 @@
/* symbols.c -symbol table-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -28,6 +28,8 @@
#include "obstack.h" /* For "symbols.h" */
#include "subsegs.h"
+#include "struc-symbol.h"
+
/* This is non-zero if symbols are case sensitive, which is the
default. */
int symbols_case_sensitive = 1;
@@ -39,6 +41,9 @@ extern int new_broken_words;
/* symbol-name => struct symbol pointer */
static struct hash_control *sy_hash;
+/* Table of local symbols. */
+static struct hash_control *local_hash;
+
/* Below are commented in "symbols.h". */
symbolS *symbol_rootP;
symbolS *symbol_lastP;
@@ -56,6 +61,8 @@ static void fb_label_init PARAMS ((void));
static long dollar_label_instance PARAMS ((long));
static long fb_label_instance PARAMS ((long));
+static void print_binary PARAMS ((FILE *, const char *, expressionS *));
+
/* symbol_new()
Return a pointer to a new symbol. Die if we can't make a new
@@ -91,39 +98,53 @@ symbol_new (name, segment, valu, frag)
return symbolP;
}
-symbolS *
-symbol_create (name, segment, valu, frag)
- const char *name; /* It is copied, the caller can destroy/modify */
- segT segment; /* Segment identifier (SEG_<something>) */
- valueT valu; /* Symbol value */
- fragS *frag; /* Associated fragment */
+/* Save a symbol name on a permanent obstack, and convert it according
+ to the object file format. */
+
+static char *
+save_symbol_name (name)
+ const char *name;
{
unsigned int name_length;
- char *preserved_copy_of_name;
- symbolS *symbolP;
+ char *ret;
name_length = strlen (name) + 1; /* +1 for \0 */
obstack_grow (&notes, name, name_length);
- preserved_copy_of_name = obstack_finish (&notes);
+ ret = obstack_finish (&notes);
+
#ifdef STRIP_UNDERSCORE
- if (preserved_copy_of_name[0] == '_')
- preserved_copy_of_name++;
+ if (ret[0] == '_')
+ ++ret;
#endif
#ifdef tc_canonicalize_symbol_name
- preserved_copy_of_name =
- tc_canonicalize_symbol_name (preserved_copy_of_name);
+ ret = tc_canonicalize_symbol_name (ret);
#endif
if (! symbols_case_sensitive)
{
unsigned char *s;
- for (s = (unsigned char *) preserved_copy_of_name; *s != '\0'; s++)
+ for (s = (unsigned char *) ret; *s != '\0'; s++)
if (islower (*s))
*s = toupper (*s);
}
+ return ret;
+}
+
+symbolS *
+symbol_create (name, segment, valu, frag)
+ const char *name; /* It is copied, the caller can destroy/modify */
+ segT segment; /* Segment identifier (SEG_<something>) */
+ valueT valu; /* Symbol value */
+ fragS *frag; /* Associated fragment */
+{
+ char *preserved_copy_of_name;
+ symbolS *symbolP;
+
+ preserved_copy_of_name = save_symbol_name (name);
+
symbolP = (symbolS *) obstack_alloc (&notes, sizeof (symbolS));
/* symbol must be born in some fixed state. This seems as good as any. */
@@ -156,6 +177,101 @@ symbol_create (name, segment, valu, frag)
return symbolP;
}
+#ifdef BFD_ASSEMBLER
+
+/* Local symbol support. If we can get away with it, we keep only a
+ small amount of information for local symbols. */
+
+static struct local_symbol *local_symbol_make PARAMS ((const char *, segT,
+ valueT, fragS *));
+static symbolS *local_symbol_convert PARAMS ((struct local_symbol *));
+
+/* Used for statistics. */
+
+static unsigned long local_symbol_count;
+static unsigned long local_symbol_conversion_count;
+
+/* This macro is called with a symbol argument passed by reference.
+ It returns whether this is a local symbol. If necessary, it
+ changes its argument to the real symbol. */
+
+#define LOCAL_SYMBOL_CHECK(s) \
+ (s->bsym == NULL \
+ ? (local_symbol_converted_p ((struct local_symbol *) s) \
+ ? (s = local_symbol_get_real_symbol ((struct local_symbol *) s), \
+ 0) \
+ : 1) \
+ : 0)
+
+/* Create a local symbol and insert it into the local hash table. */
+
+static struct local_symbol *
+local_symbol_make (name, section, offset, frag)
+ const char *name;
+ segT section;
+ valueT offset;
+ fragS *frag;
+{
+ char *name_copy;
+ struct local_symbol *ret;
+
+ ++local_symbol_count;
+
+ name_copy = save_symbol_name (name);
+
+ ret = (struct local_symbol *) obstack_alloc (&notes, sizeof *ret);
+ ret->lsy_marker = NULL;
+ ret->lsy_name = name_copy;
+ ret->lsy_section = section;
+ local_symbol_set_frag (ret, frag);
+ ret->lsy_offset = offset;
+
+ hash_jam (local_hash, name_copy, (PTR) ret);
+
+ return ret;
+}
+
+/* Convert a local symbol into a real symbol. Note that we do not
+ reclaim the space used by the local symbol. */
+
+static symbolS *
+local_symbol_convert (locsym)
+ struct local_symbol *locsym;
+{
+ symbolS *ret;
+
+ assert (locsym->lsy_marker == NULL);
+ if (local_symbol_converted_p (locsym))
+ return local_symbol_get_real_symbol (locsym);
+
+ ++local_symbol_conversion_count;
+
+ ret = symbol_new (locsym->lsy_name, locsym->lsy_section, locsym->lsy_offset,
+ local_symbol_get_frag (locsym));
+
+ if (local_symbol_resolved_p (locsym))
+ ret->sy_resolved = 1;
+
+ /* Local symbols are always either defined or used. */
+ ret->sy_used = 1;
+
+ symbol_table_insert (ret);
+
+ local_symbol_mark_converted (locsym);
+ local_symbol_set_real_symbol (locsym, ret);
+
+ hash_jam (local_hash, locsym->lsy_name, NULL);
+
+ return ret;
+}
+
+#else /* ! BFD_ASSEMBLER */
+
+#define LOCAL_SYMBOL_CHECK(s) 0
+#define local_symbol_convert(s) ((symbolS *) s)
+
+#endif /* ! BFD_ASSEMBLER */
+
/*
* colon()
@@ -236,7 +352,26 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
/*
* Now check for undefined symbols
*/
- if (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
+ if (LOCAL_SYMBOL_CHECK (symbolP))
+ {
+#ifdef BFD_ASSEMBLER
+ struct local_symbol *locsym = (struct local_symbol *) symbolP;
+
+ if (locsym->lsy_section != undefined_section
+ && (local_symbol_get_frag (locsym) != frag_now
+ || locsym->lsy_section != now_seg
+ || locsym->lsy_offset != frag_now_fix ()))
+ {
+ as_bad (_("Symbol %s already defined."), sym_name);
+ return symbolP;
+ }
+
+ locsym->lsy_section = now_seg;
+ local_symbol_set_frag (locsym, frag_now);
+ locsym->lsy_offset = frag_now_fix ();
+#endif
+ }
+ else if (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
{
if (S_GET_VALUE (symbolP) == 0)
{
@@ -302,18 +437,24 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
}
else
{
-#if defined (S_GET_OTHER) && defined (S_GET_DESC)
- as_fatal ("Symbol \"%s\" is already defined as \"%s\"/%d.%d.%ld.",
- sym_name,
- segment_name (S_GET_SEGMENT (symbolP)),
- S_GET_OTHER (symbolP), S_GET_DESC (symbolP),
- (long) S_GET_VALUE (symbolP));
+#if (!defined (OBJ_AOUT) && !defined (OBJ_MAYBE_AOUT) \
+ && !defined (OBJ_BOUT) && !defined (OBJ_MAYBE_BOUT))
+ static const char *od_buf = "";
#else
- as_fatal ("Symbol \"%s\" is already defined as \"%s\"/%ld.",
+ char od_buf[100];
+ od_buf[0] = '\0';
+#ifdef BFD_ASSEMBLER
+ if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
+#endif
+ sprintf(od_buf, "%d.%d.",
+ S_GET_OTHER (symbolP),
+ S_GET_DESC (symbolP));
+#endif
+ as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
sym_name,
segment_name (S_GET_SEGMENT (symbolP)),
+ od_buf,
(long) S_GET_VALUE (symbolP));
-#endif
}
} /* if the undefined symbol has no value */
}
@@ -323,10 +464,18 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
if (!(frag_now == symbolP->sy_frag
&& S_GET_VALUE (symbolP) == frag_now_fix ()
&& S_GET_SEGMENT (symbolP) == now_seg))
- as_fatal ("Symbol %s already defined.", sym_name);
+ as_fatal (_("Symbol %s already defined."), sym_name);
} /* if this symbol is not yet defined */
}
+#ifdef BFD_ASSEMBLER
+ else if (! flag_keep_locals && bfd_is_local_label_name (stdoutput, sym_name))
+ {
+ symbolP = (symbolS *) local_symbol_make (sym_name, now_seg,
+ (valueT) frag_now_fix (),
+ frag_now);
+ }
+#endif /* BFD_ASSEMBLER */
else
{
symbolP = symbol_new (sym_name, now_seg, (valueT) frag_now_fix (),
@@ -342,6 +491,8 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */
{
/* This symbol is actually being defined within an MRI common
section. This requires special handling. */
+ if (LOCAL_SYMBOL_CHECK (symbolP))
+ symbolP = local_symbol_convert ((struct local_symbol *) symbolP);
symbolP->sy_value.X_op = O_symbol;
symbolP->sy_value.X_add_symbol = mri_common_symbol;
symbolP->sy_value.X_add_number = S_GET_VALUE (mri_common_symbol);
@@ -377,9 +528,19 @@ symbol_table_insert (symbolP)
know (symbolP);
know (S_GET_NAME (symbolP));
+ if (LOCAL_SYMBOL_CHECK (symbolP))
+ {
+ error_string = hash_jam (local_hash, S_GET_NAME (symbolP),
+ (PTR) symbolP);
+ if (error_string != NULL)
+ as_fatal (_("Inserting \"%s\" into symbol table failed: %s"),
+ S_GET_NAME (symbolP), error_string);
+ return;
+ }
+
if ((error_string = hash_jam (sy_hash, S_GET_NAME (symbolP), (PTR) symbolP)))
{
- as_fatal ("Inserting \"%s\" into symbol table failed: %s",
+ as_fatal (_("Inserting \"%s\" into symbol table failed: %s"),
S_GET_NAME (symbolP), error_string);
} /* on error */
} /* symbol_table_insert() */
@@ -400,6 +561,20 @@ symbol_find_or_make (name)
if (symbolP == NULL)
{
+#ifdef BFD_ASSEMBLER
+ if (! flag_keep_locals && bfd_is_local_label_name (stdoutput, name))
+ {
+ symbolP = md_undefined_symbol ((char *) name);
+ if (symbolP != NULL)
+ return symbolP;
+
+ symbolP = (symbolS *) local_symbol_make (name, undefined_section,
+ (valueT) 0,
+ &zero_address_frag);
+ return symbolP;
+ }
+#endif
+
symbolP = symbol_make (name);
symbol_table_insert (symbolP);
@@ -454,24 +629,42 @@ symbol_find_base (name, strip_underscore)
#ifdef tc_canonicalize_symbol_name
{
char *copy;
+ size_t len = strlen (name) + 1;
- copy = (char *) alloca (strlen (name) + 1);
- strcpy (copy, name);
+ copy = (char *) alloca (len);
+ memcpy (copy, name, len);
name = tc_canonicalize_symbol_name (copy);
}
#endif
if (! symbols_case_sensitive)
{
- unsigned char *copy;
+ char *copy;
+ const char *orig;
+ unsigned char c;
- copy = (unsigned char *) alloca (strlen (name) + 1);
- name = (const char *) copy;
- for (; *copy != '\0'; copy++)
- if (islower (*copy))
- *copy = toupper (*copy);
+ orig = name;
+ name = copy = (char *) alloca (strlen (name) + 1);
+
+ while ((c = *orig++) != '\0')
+ {
+ if (islower (c))
+ c = toupper (c);
+ *copy++ = c;
+ }
+ *copy = '\0';
}
+#ifdef BFD_ASSEMBLER
+ {
+ struct local_symbol *locsym;
+
+ locsym = (struct local_symbol *) hash_find (local_hash, name);
+ if (locsym != NULL)
+ return (symbolS *) locsym;
+ }
+#endif
+
return ((symbolS *) hash_find (sy_hash, name));
}
@@ -491,6 +684,11 @@ symbol_append (addme, target, rootPP, lastPP)
symbolS **rootPP;
symbolS **lastPP;
{
+ if (LOCAL_SYMBOL_CHECK (addme))
+ abort ();
+ if (target != NULL && LOCAL_SYMBOL_CHECK (target))
+ abort ();
+
if (target == NULL)
{
know (*rootPP == NULL);
@@ -531,6 +729,8 @@ void
symbol_clear_list_pointers (symbolP)
symbolS *symbolP;
{
+ if (LOCAL_SYMBOL_CHECK (symbolP))
+ abort ();
symbolP->sy_next = NULL;
#ifdef SYMBOLS_NEED_BACKPOINTERS
symbolP->sy_previous = NULL;
@@ -545,6 +745,9 @@ symbol_remove (symbolP, rootPP, lastPP)
symbolS **rootPP;
symbolS **lastPP;
{
+ if (LOCAL_SYMBOL_CHECK (symbolP))
+ abort ();
+
if (symbolP == *rootPP)
{
*rootPP = symbolP->sy_next;
@@ -574,8 +777,13 @@ symbol_insert (addme, target, rootPP, lastPP)
symbolS *addme;
symbolS *target;
symbolS **rootPP;
- symbolS **lastPP;
+ symbolS **lastPP ATTRIBUTE_UNUSED;
{
+ if (LOCAL_SYMBOL_CHECK (addme))
+ abort ();
+ if (LOCAL_SYMBOL_CHECK (target))
+ abort ();
+
if (target->sy_previous != NULL)
{
target->sy_previous->sy_next = addme;
@@ -607,6 +815,9 @@ verify_symbol_chain (rootP, lastP)
for (; symbol_next (symbolP) != NULL; symbolP = symbol_next (symbolP))
{
+#ifdef BFD_ASSEMBLER
+ assert (symbolP->bsym != NULL);
+#endif
#ifdef SYMBOLS_NEED_BACKPOINTERS
assert (symbolP->sy_next->sy_previous == symbolP);
#else
@@ -645,6 +856,27 @@ resolve_symbol_value (symp, finalize)
valueT final_val;
segT final_seg;
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (symp))
+ {
+ struct local_symbol *locsym = (struct local_symbol *) symp;
+
+ if (local_symbol_resolved_p (locsym))
+ return locsym->lsy_offset / OCTETS_PER_BYTE;
+
+ final_val = (local_symbol_get_frag (locsym)->fr_address
+ + locsym->lsy_offset) / OCTETS_PER_BYTE;
+
+ if (finalize)
+ {
+ locsym->lsy_offset = final_val;
+ local_symbol_mark_resolved (locsym);
+ }
+
+ return final_val;
+ }
+#endif
+
if (symp->sy_resolved)
{
if (symp->sy_value.X_op == O_constant)
@@ -659,7 +891,7 @@ resolve_symbol_value (symp, finalize)
if (symp->sy_resolving)
{
if (finalize)
- as_bad ("Symbol definition loop encountered at %s", S_GET_NAME (symp));
+ as_bad (_("Symbol definition loop encountered at %s"), S_GET_NAME (symp));
final_val = 0;
resolved = 1;
}
@@ -689,7 +921,7 @@ resolve_symbol_value (symp, finalize)
/* Fall through. */
case O_constant:
- final_val += symp->sy_frag->fr_address;
+ final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
if (final_seg == expr_section)
final_seg = absolute_section;
resolved = 1;
@@ -705,12 +937,17 @@ resolve_symbol_value (symp, finalize)
/* This is a symbol inside an MRI common section. The
relocation routines are going to handle it specially.
Don't change the value. */
- resolved = add_symbol->sy_resolved;
+ resolved = symbol_resolved_p (add_symbol);
break;
}
if (finalize && final_val == 0)
- copy_symbol_attributes (symp, add_symbol);
+ {
+ if (LOCAL_SYMBOL_CHECK (add_symbol))
+ add_symbol = local_symbol_convert ((struct local_symbol *)
+ add_symbol);
+ copy_symbol_attributes (symp, add_symbol);
+ }
/* If we have equated this symbol to an undefined symbol, we
keep X_op set to O_symbol, and we don't change
@@ -722,12 +959,13 @@ resolve_symbol_value (symp, finalize)
{
if (finalize)
{
- symp->sy_value.X_op = O_symbol;
S_SET_SEGMENT (symp, S_GET_SEGMENT (add_symbol));
+ symp->sy_value.X_op = O_symbol;
+ symp->sy_value.X_add_symbol = add_symbol;
symp->sy_value.X_add_number = final_val;
}
final_val = 0;
- resolved = add_symbol->sy_resolved;
+ resolved = symbol_resolved_p (add_symbol);
goto exit_dont_set_value;
}
else
@@ -737,7 +975,7 @@ resolve_symbol_value (symp, finalize)
final_seg = S_GET_SEGMENT (add_symbol);
}
- resolved = add_symbol->sy_resolved;
+ resolved = symbol_resolved_p (add_symbol);
break;
case O_uminus:
@@ -756,7 +994,7 @@ resolve_symbol_value (symp, finalize)
if (final_seg == expr_section || final_seg == undefined_section)
final_seg = absolute_section;
- resolved = add_symbol->sy_resolved;
+ resolved = symbol_resolved_p (add_symbol);
break;
case O_multiply:
@@ -816,8 +1054,11 @@ resolve_symbol_value (symp, finalize)
expressions, such as IEEE-695. */
/* Don't emit messages unless we're finalizing the symbol value,
otherwise we may get the same message multiple times. */
- if ((seg_left != absolute_section || seg_right != absolute_section)
- && (op != O_subtract || seg_left != seg_right)
+ if ((seg_left != absolute_section
+ || seg_right != absolute_section)
+ && (op != O_subtract
+ || seg_left != seg_right
+ || seg_left == undefined_section)
&& finalize)
{
char *file;
@@ -827,29 +1068,29 @@ resolve_symbol_value (symp, finalize)
{
if (seg_left == undefined_section)
as_bad_where (file, line,
- "undefined symbol %s in operation",
+ _("undefined symbol %s in operation"),
S_GET_NAME (symp->sy_value.X_add_symbol));
if (seg_right == undefined_section)
as_bad_where (file, line,
- "undefined symbol %s in operation",
+ _("undefined symbol %s in operation"),
S_GET_NAME (symp->sy_value.X_op_symbol));
if (seg_left != undefined_section
&& seg_right != undefined_section)
- as_bad_where (file, line, "invalid section for operation");
+ as_bad_where (file, line, _("invalid section for operation"));
}
else
{
if (seg_left == undefined_section)
- as_bad ("undefined symbol %s in operation setting %s",
+ as_bad (_("undefined symbol %s in operation setting %s"),
S_GET_NAME (symp->sy_value.X_add_symbol),
S_GET_NAME (symp));
if (seg_right == undefined_section)
- as_bad ("undefined symbol %s in operation setting %s",
+ as_bad (_("undefined symbol %s in operation setting %s"),
S_GET_NAME (symp->sy_value.X_op_symbol),
S_GET_NAME (symp));
if (seg_left != undefined_section
&& seg_right != undefined_section)
- as_bad ("invalid section for operation setting %s",
+ as_bad (_("invalid section for operation setting %s"),
S_GET_NAME (symp));
}
}
@@ -865,9 +1106,9 @@ resolve_symbol_value (symp, finalize)
unsigned int line;
if (expr_symbol_where (symp, &file, &line))
- as_bad_where (file, line, "division by zero");
+ as_bad_where (file, line, _("division by zero"));
else
- as_bad ("division by zero when setting %s",
+ as_bad (_("division by zero when setting %s"),
S_GET_NAME (symp));
}
@@ -901,7 +1142,8 @@ resolve_symbol_value (symp, finalize)
final_val += symp->sy_frag->fr_address + left;
if (final_seg == expr_section || final_seg == undefined_section)
final_seg = absolute_section;
- resolved = (add_symbol->sy_resolved && op_symbol->sy_resolved);
+ resolved = (symbol_resolved_p (add_symbol)
+ && symbol_resolved_p (op_symbol));
break;
case O_register:
@@ -938,7 +1180,7 @@ exit_dont_set_value:
symp->sy_resolved = 1;
else if (S_GET_SEGMENT (symp) != expr_section)
{
- as_bad ("can't resolve value for symbol \"%s\"", S_GET_NAME (symp));
+ as_bad (_("can't resolve value for symbol \"%s\""), S_GET_NAME (symp));
symp->sy_resolved = 1;
}
}
@@ -946,6 +1188,33 @@ exit_dont_set_value:
return final_val;
}
+#ifdef BFD_ASSEMBLER
+
+static void resolve_local_symbol PARAMS ((const char *, PTR));
+
+/* A static function passed to hash_traverse. */
+
+static void
+resolve_local_symbol (key, value)
+ const char *key ATTRIBUTE_UNUSED;
+ PTR value;
+{
+ if (value != NULL)
+ resolve_symbol_value (value, 1);
+}
+
+#endif
+
+/* Resolve all local symbols. */
+
+void
+resolve_local_symbol_values ()
+{
+#ifdef BFD_ASSEMBLER
+ hash_traverse (local_hash, resolve_local_symbol);
+#endif
+}
+
/* Dollar labels look like a number followed by a dollar sign. Eg, "42$".
They are *really* local. That is, they go out of scope whenever we see a
label that isn't local. Also, like fb labels, there can be multiple
@@ -1069,6 +1338,9 @@ dollar_label_name (n, augend)
know (n >= 0);
know (augend == 0 || augend == 1);
p = symbol_name_build;
+#ifdef LOCAL_LABEL_PREFIX
+ *p++ = LOCAL_LABEL_PREFIX;
+#endif
*p++ = 'L';
/* Next code just does sprintf( {}, "%d", n); */
@@ -1281,7 +1553,7 @@ decode_local_label_name (s)
int label_number;
int instance_number;
char *type;
- const char *message_format = "\"%d\" (instance number %d of a %s label)";
+ const char *message_format = _("\"%d\" (instance number %d of a %s label)");
if (s[0] != 'L')
return s;
@@ -1311,6 +1583,11 @@ valueT
S_GET_VALUE (s)
symbolS *s;
{
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (s))
+ return ((struct local_symbol *) s)->lsy_offset;
+#endif
+
if (!s->sy_resolved && s->sy_value.X_op != O_constant)
resolve_symbol_value (s, 1);
if (s->sy_value.X_op != O_constant)
@@ -1326,7 +1603,7 @@ S_GET_VALUE (s)
if (! s->sy_resolved
|| s->sy_value.X_op != O_symbol
|| (S_IS_DEFINED (s) && ! S_IS_COMMON (s)))
- as_bad ("Attempt to get value of unresolved symbol %s",
+ as_bad (_("Attempt to get value of unresolved symbol %s"),
S_GET_NAME (s));
recur = NULL;
}
@@ -1340,6 +1617,14 @@ S_SET_VALUE (s, val)
symbolS *s;
valueT val;
{
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (s))
+ {
+ ((struct local_symbol *) s)->lsy_offset = val;
+ return;
+ }
+#endif
+
s->sy_value.X_op = O_constant;
s->sy_value.X_add_number = (offsetT) val;
s->sy_value.X_unsigned = 0;
@@ -1349,6 +1634,11 @@ void
copy_symbol_attributes (dest, src)
symbolS *dest, *src;
{
+ if (LOCAL_SYMBOL_CHECK (dest))
+ dest = local_symbol_convert ((struct local_symbol *) dest);
+ if (LOCAL_SYMBOL_CHECK (src))
+ src = local_symbol_convert ((struct local_symbol *) src);
+
#ifdef BFD_ASSEMBLER
/* In an expression, transfer the settings of these flags.
The user can override later, of course. */
@@ -1364,10 +1654,29 @@ copy_symbol_attributes (dest, src)
#ifdef BFD_ASSEMBLER
int
+S_IS_FUNCTION (s)
+ symbolS *s;
+{
+ flagword flags;
+
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+
+ flags = s->bsym->flags;
+
+ return (flags & BSF_FUNCTION) != 0;
+}
+
+int
S_IS_EXTERNAL (s)
symbolS *s;
{
- flagword flags = s->bsym->flags;
+ flagword flags;
+
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+
+ flags = s->bsym->flags;
/* sanity check */
if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
@@ -1380,6 +1689,8 @@ int
S_IS_WEAK (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
return (s->bsym->flags & BSF_WEAK) != 0;
}
@@ -1387,6 +1698,8 @@ int
S_IS_COMMON (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
return bfd_is_com_section (s->bsym->section);
}
@@ -1394,6 +1707,8 @@ int
S_IS_DEFINED (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return ((struct local_symbol *) s)->lsy_section != undefined_section;
return s->bsym->section != undefined_section;
}
@@ -1401,6 +1716,8 @@ int
S_IS_DEBUG (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
if (s->bsym->flags & BSF_DEBUGGING)
return 1;
return 0;
@@ -1410,9 +1727,14 @@ int
S_IS_LOCAL (s)
symbolS *s;
{
- flagword flags = s->bsym->flags;
+ flagword flags;
const char *name;
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 1;
+
+ flags = s->bsym->flags;
+
/* sanity check */
if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
abort ();
@@ -1455,6 +1777,8 @@ CONST char *
S_GET_NAME (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return ((struct local_symbol *) s)->lsy_name;
return s->bsym->name;
}
@@ -1462,6 +1786,8 @@ segT
S_GET_SEGMENT (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return ((struct local_symbol *) s)->lsy_section;
return s->bsym->section;
}
@@ -1474,6 +1800,17 @@ S_SET_SEGMENT (s, seg)
faults assigning back to const global symbols such as *ABS*, but it
shouldn't happen anyway. */
+ if (LOCAL_SYMBOL_CHECK (s))
+ {
+ if (seg == reg_section)
+ s = local_symbol_convert ((struct local_symbol *) s);
+ else
+ {
+ ((struct local_symbol *) s)->lsy_section = seg;
+ return;
+ }
+ }
+
if (s->bsym->flags & BSF_SECTION_SYM)
{
if (s->bsym->section != seg)
@@ -1487,6 +1824,8 @@ void
S_SET_EXTERNAL (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
if ((s->bsym->flags & BSF_WEAK) != 0)
{
/* Let .weak override .global. */
@@ -1500,6 +1839,8 @@ void
S_CLEAR_EXTERNAL (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
if ((s->bsym->flags & BSF_WEAK) != 0)
{
/* Let .weak override. */
@@ -1513,6 +1854,8 @@ void
S_SET_WEAK (s)
symbolS *s;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
s->bsym->flags |= BSF_WEAK;
s->bsym->flags &= ~(BSF_GLOBAL|BSF_LOCAL);
}
@@ -1522,16 +1865,383 @@ S_SET_NAME (s, name)
symbolS *s;
char *name;
{
+ if (LOCAL_SYMBOL_CHECK (s))
+ {
+ ((struct local_symbol *) s)->lsy_name = name;
+ return;
+ }
s->bsym->name = name;
}
#endif /* BFD_ASSEMBLER */
+#ifdef SYMBOLS_NEED_BACKPOINTERS
+
+/* Return the previous symbol in a chain. */
+
+symbolS *
+symbol_previous (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ abort ();
+ return s->sy_previous;
+}
+
+#endif /* SYMBOLS_NEED_BACKPOINTERS */
+
+/* Return the next symbol in a chain. */
+
+symbolS *
+symbol_next (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ abort ();
+ return s->sy_next;
+}
+
+/* Return a pointer to the value of a symbol as an expression. */
+
+expressionS *
+symbol_get_value_expression (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ return &s->sy_value;
+}
+
+/* Set the value of a symbol to an expression. */
+
+void
+symbol_set_value_expression (s, exp)
+ symbolS *s;
+ const expressionS *exp;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_value = *exp;
+}
+
+/* Set the frag of a symbol. */
+
+void
+symbol_set_frag (s, f)
+ symbolS *s;
+ fragS *f;
+{
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (s))
+ {
+ local_symbol_set_frag ((struct local_symbol *) s, f);
+ return;
+ }
+#endif
+ s->sy_frag = f;
+}
+
+/* Return the frag of a symbol. */
+
+fragS *
+symbol_get_frag (s)
+ symbolS *s;
+{
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (s))
+ return local_symbol_get_frag ((struct local_symbol *) s);
+#endif
+ return s->sy_frag;
+}
+
+/* Mark a symbol as having been used. */
+
+void
+symbol_mark_used (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ s->sy_used = 1;
+}
+
+/* Clear the mark of whether a symbol has been used. */
+
+void
+symbol_clear_used (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_used = 0;
+}
+
+/* Return whether a symbol has been used. */
+
+int
+symbol_used_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 1;
+ return s->sy_used;
+}
+
+/* Mark a symbol as having been used in a reloc. */
+
+void
+symbol_mark_used_in_reloc (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_used_in_reloc = 1;
+}
+
+/* Clear the mark of whether a symbol has been used in a reloc. */
+
+void
+symbol_clear_used_in_reloc (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ s->sy_used_in_reloc = 0;
+}
+
+/* Return whether a symbol has been used in a reloc. */
+
+int
+symbol_used_in_reloc_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_used_in_reloc;
+}
+
+/* Mark a symbol as an MRI common symbol. */
+
+void
+symbol_mark_mri_common (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_mri_common = 1;
+}
+
+/* Clear the mark of whether a symbol is an MRI common symbol. */
+
+void
+symbol_clear_mri_common (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ s->sy_mri_common = 0;
+}
+
+/* Return whether a symbol is an MRI common symbol. */
+
+int
+symbol_mri_common_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_mri_common;
+}
+
+/* Mark a symbol as having been written. */
+
+void
+symbol_mark_written (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ s->written = 1;
+}
+
+/* Clear the mark of whether a symbol has been written. */
+
+void
+symbol_clear_written (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ s->written = 0;
+}
+
+/* Return whether a symbol has been written. */
+
+int
+symbol_written_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->written;
+}
+
+/* Mark a symbol has having been resolved. */
+
+void
+symbol_mark_resolved (s)
+ symbolS *s;
+{
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (s))
+ {
+ local_symbol_mark_resolved ((struct local_symbol *) s);
+ return;
+ }
+#endif
+ s->sy_resolved = 1;
+}
+
+/* Return whether a symbol has been resolved. */
+
+int
+symbol_resolved_p (s)
+ symbolS *s;
+{
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (s))
+ return local_symbol_resolved_p ((struct local_symbol *) s);
+#endif
+ return s->sy_resolved;
+}
+
+/* Return whether a symbol is a section symbol. */
+
+int
+symbol_section_p (s)
+ symbolS *s ATTRIBUTE_UNUSED;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+#ifdef BFD_ASSEMBLER
+ return (s->bsym->flags & BSF_SECTION_SYM) != 0;
+#else
+ /* FIXME */
+ return 0;
+#endif
+}
+
+/* Return whether a symbol is equated to another symbol. */
+
+int
+symbol_equated_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_value.X_op == O_symbol;
+}
+
+/* Return whether a symbol has a constant value. */
+
+int
+symbol_constant_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 1;
+ return s->sy_value.X_op == O_constant;
+}
+
+#ifdef BFD_ASSEMBLER
+
+/* Return the BFD symbol for a symbol. */
+
+asymbol *
+symbol_get_bfdsym (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ return s->bsym;
+}
+
+/* Set the BFD symbol for a symbol. */
+
+void
+symbol_set_bfdsym (s, bsym)
+ symbolS *s;
+ asymbol *bsym;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->bsym = bsym;
+}
+
+#endif /* BFD_ASSEMBLER */
+
+#ifdef OBJ_SYMFIELD_TYPE
+
+/* Get a pointer to the object format information for a symbol. */
+
+OBJ_SYMFIELD_TYPE *
+symbol_get_obj (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ return &s->sy_obj;
+}
+
+/* Set the object format information for a symbol. */
+
+void
+symbol_set_obj (s, o)
+ symbolS *s;
+ OBJ_SYMFIELD_TYPE *o;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_obj = *o;
+}
+
+#endif /* OBJ_SYMFIELD_TYPE */
+
+#ifdef TC_SYMFIELD_TYPE
+
+/* Get a pointer to the processor information for a symbol. */
+
+TC_SYMFIELD_TYPE *
+symbol_get_tc (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ return &s->sy_tc;
+}
+
+/* Set the processor information for a symbol. */
+
+void
+symbol_set_tc (s, o)
+ symbolS *s;
+ TC_SYMFIELD_TYPE *o;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_tc = *o;
+}
+
+#endif /* TC_SYMFIELD_TYPE */
+
void
symbol_begin ()
{
symbol_lastP = NULL;
symbol_rootP = NULL; /* In case we have 0 symbols (!!) */
sy_hash = hash_new ();
+#ifdef BFD_ASSEMBLER
+ local_hash = hash_new ();
+#endif
memset ((char *) (&abs_symbol), '\0', sizeof (abs_symbol));
#ifdef BFD_ASSEMBLER
@@ -1549,9 +2259,14 @@ symbol_begin ()
fb_label_init ();
}
+
int indent_level;
+/* Maximum indent level.
+ Available for modification inside a gdb session. */
+int max_indent_level = 8;
+
#if 0
static void
@@ -1571,28 +2286,44 @@ print_symbol_value_1 (file, sym)
if (!name || !name[0])
name = "(unnamed)";
fprintf (file, "sym %lx %s", (unsigned long) sym, name);
- if (sym->sy_frag != &zero_address_frag)
- fprintf (file, " frag %lx", (long) sym->sy_frag);
- if (sym->written)
- fprintf (file, " written");
- if (sym->sy_resolved)
- fprintf (file, " resolved");
- else if (sym->sy_resolving)
- fprintf (file, " resolving");
- if (sym->sy_used_in_reloc)
- fprintf (file, " used-in-reloc");
- if (sym->sy_used)
- fprintf (file, " used");
- if (S_IS_LOCAL (sym))
- fprintf (file, " local");
- if (S_IS_EXTERN (sym))
- fprintf (file, " extern");
- if (S_IS_DEBUG (sym))
- fprintf (file, " debug");
- if (S_IS_DEFINED (sym))
- fprintf (file, " defined");
+
+ if (LOCAL_SYMBOL_CHECK (sym))
+ {
+#ifdef BFD_ASSEMBLER
+ struct local_symbol *locsym = (struct local_symbol *) sym;
+ if (local_symbol_get_frag (locsym) != &zero_address_frag
+ && local_symbol_get_frag (locsym) != NULL)
+ fprintf (file, " frag %lx", (long) local_symbol_get_frag (locsym));
+ if (local_symbol_resolved_p (locsym))
+ fprintf (file, " resolved");
+ fprintf (file, " local");
+#endif
+ }
+ else
+ {
+ if (sym->sy_frag != &zero_address_frag)
+ fprintf (file, " frag %lx", (long) sym->sy_frag);
+ if (sym->written)
+ fprintf (file, " written");
+ if (sym->sy_resolved)
+ fprintf (file, " resolved");
+ else if (sym->sy_resolving)
+ fprintf (file, " resolving");
+ if (sym->sy_used_in_reloc)
+ fprintf (file, " used-in-reloc");
+ if (sym->sy_used)
+ fprintf (file, " used");
+ if (S_IS_LOCAL (sym))
+ fprintf (file, " local");
+ if (S_IS_EXTERN (sym))
+ fprintf (file, " extern");
+ if (S_IS_DEBUG (sym))
+ fprintf (file, " debug");
+ if (S_IS_DEFINED (sym))
+ fprintf (file, " defined");
+ }
fprintf (file, " %s", segment_name (S_GET_SEGMENT (sym)));
- if (sym->sy_resolved)
+ if (symbol_resolved_p (sym))
{
segT s = S_GET_SEGMENT (sym);
@@ -1600,11 +2331,18 @@ print_symbol_value_1 (file, sym)
&& s != expr_section)
fprintf (file, " %lx", (long) S_GET_VALUE (sym));
}
- else if (indent_level < 8 && S_GET_SEGMENT (sym) != undefined_section)
+ else if (indent_level < max_indent_level
+ && S_GET_SEGMENT (sym) != undefined_section)
{
indent_level++;
fprintf (file, "\n%*s<", indent_level * 4, "");
- print_expr_1 (file, &sym->sy_value);
+#ifdef BFD_ASSEMBLER
+ if (LOCAL_SYMBOL_CHECK (sym))
+ fprintf (file, "constant %lx",
+ (long) ((struct local_symbol *) sym)->lsy_offset);
+ else
+#endif
+ print_expr_1 (file, &sym->sy_value);
fprintf (file, ">");
indent_level--;
}
@@ -1620,6 +2358,21 @@ print_symbol_value (sym)
fprintf (stderr, "\n");
}
+static void
+print_binary (file, name, exp)
+ FILE *file;
+ const char * name;
+ expressionS *exp;
+{
+ indent_level++;
+ fprintf (file, "%s\n%*s<", name, indent_level * 4, "");
+ print_symbol_value_1 (file, exp->X_add_symbol);
+ fprintf (file, ">\n%*s<", indent_level * 4, "");
+ print_symbol_value_1 (file, exp->X_op_symbol);
+ fprintf (file, ">");
+ indent_level--;
+}
+
void
print_expr_1 (file, exp)
FILE *file;
@@ -1664,52 +2417,52 @@ print_expr_1 (file, exp)
fprintf (file, "bit_not");
break;
case O_multiply:
- fprintf (file, "multiply");
+ print_binary (file, "multiply", exp);
break;
case O_divide:
- fprintf (file, "divide");
+ print_binary (file, "divide", exp);
break;
case O_modulus:
- fprintf (file, "modulus");
+ print_binary (file, "modulus", exp);
break;
case O_left_shift:
- fprintf (file, "lshift");
+ print_binary (file, "lshift", exp);
break;
case O_right_shift:
- fprintf (file, "rshift");
+ print_binary (file, "rshift", exp);
break;
case O_bit_inclusive_or:
- fprintf (file, "bit_ior");
+ print_binary (file, "bit_ior", exp);
break;
case O_bit_exclusive_or:
- fprintf (file, "bit_xor");
+ print_binary (file, "bit_xor", exp);
break;
case O_bit_and:
- fprintf (file, "bit_and");
+ print_binary (file, "bit_and", exp);
break;
case O_eq:
- fprintf (file, "eq");
+ print_binary (file, "eq", exp);
break;
case O_ne:
- fprintf (file, "ne");
+ print_binary (file, "ne", exp);
break;
case O_lt:
- fprintf (file, "lt");
+ print_binary (file, "lt", exp);
break;
case O_le:
- fprintf (file, "le");
+ print_binary (file, "le", exp);
break;
case O_ge:
- fprintf (file, "ge");
+ print_binary (file, "ge", exp);
break;
case O_gt:
- fprintf (file, "gt");
+ print_binary (file, "gt", exp);
break;
case O_logical_and:
- fprintf (file, "logical_and");
+ print_binary (file, "logical_and", exp);
break;
case O_logical_or:
- fprintf (file, "logical_or");
+ print_binary (file, "logical_or", exp);
break;
case O_add:
indent_level++;
@@ -1747,6 +2500,11 @@ symbol_print_statistics (file)
FILE *file;
{
hash_print_statistics (file, "symbol table", sy_hash);
+#ifdef BFD_ASSEMBLER
+ hash_print_statistics (file, "mini local symbol table", local_hash);
+ fprintf (file, "%lu mini local symbols created, %lu converted\n",
+ local_symbol_count, local_symbol_conversion_count);
+#endif
}
/* end of symbols.c */
diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h
index c6efbdb..f3b73af 100644
--- a/contrib/binutils/gas/symbols.h
+++ b/contrib/binutils/gas/symbols.h
@@ -1,5 +1,6 @@
/* symbols.h -
- Copyright (C) 1987, 90, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 90, 92, 93, 94, 95, 97, 1999
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,6 +19,18 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#ifdef BFD_ASSEMBLER
+/* The BFD code wants to walk the list in both directions. */
+#undef SYMBOLS_NEED_BACKPOINTERS
+#define SYMBOLS_NEED_BACKPOINTERS
+#endif
+
+#ifndef BFD_ASSEMBLER
+/* The non-BFD code expects to be able to manipulate the symbol fields
+ directly. */
+#include "struc-symbol.h"
+#endif
+
extern struct obstack notes; /* eg FixS live here. */
extern struct obstack cond_obstack; /* this is where we track .ifdef/.endif
@@ -49,6 +62,7 @@ void symbol_begin PARAMS ((void));
void symbol_print_statistics PARAMS ((FILE *));
void symbol_table_insert PARAMS ((symbolS * symbolP));
valueT resolve_symbol_value PARAMS ((symbolS *, int));
+void resolve_local_symbol_values PARAMS ((void));
void print_symbol_value PARAMS ((symbolS *));
void print_expr PARAMS ((expressionS *));
@@ -70,6 +84,7 @@ extern valueT S_GET_VALUE PARAMS ((symbolS *));
extern void S_SET_VALUE PARAMS ((symbolS *, valueT));
#ifdef BFD_ASSEMBLER
+extern int S_IS_FUNCTION PARAMS ((symbolS *));
extern int S_IS_EXTERNAL PARAMS ((symbolS *));
extern int S_IS_WEAK PARAMS ((symbolS *));
extern int S_IS_COMMON PARAMS ((symbolS *));
@@ -87,4 +102,104 @@ extern void S_CLEAR_EXTERNAL PARAMS ((symbolS *));
extern void S_SET_WEAK PARAMS ((symbolS *));
#endif
+#ifndef WORKING_DOT_WORD
+struct broken_word
+ {
+ /* Linked list -- one of these structures per ".word x-y+C"
+ expression. */
+ struct broken_word *next_broken_word;
+ /* Segment and subsegment for broken word. */
+ segT seg;
+ subsegT subseg;
+ /* Which frag is this broken word in? */
+ fragS *frag;
+ /* Where in the frag is it? */
+ char *word_goes_here;
+ /* Where to add the break. */
+ fragS *dispfrag; /* where to add the break */
+ /* Operands of expression. */
+ symbolS *add;
+ symbolS *sub;
+ offsetT addnum;
+
+ int added; /* nasty thing happend yet? */
+ /* 1: added and has a long-jump */
+ /* 2: added but uses someone elses long-jump */
+
+ /* Pointer to broken_word with a similar long-jump. */
+ struct broken_word *use_jump;
+ };
+extern struct broken_word *broken_words;
+#endif /* ndef WORKING_DOT_WORD */
+
+/*
+ * Current means for getting from symbols to segments and vice verse.
+ * This will change for infinite-segments support (e.g. COFF).
+ */
+extern const segT N_TYPE_seg[]; /* subseg.c */
+
+#define SEGMENT_TO_SYMBOL_TYPE(seg) ( seg_N_TYPE [(int) (seg)] )
+extern const short seg_N_TYPE[];/* subseg.c */
+
+#define N_REGISTER 30 /* Fake N_TYPE value for SEG_REGISTER */
+
+void symbol_clear_list_pointers PARAMS ((symbolS * symbolP));
+
+#ifdef SYMBOLS_NEED_BACKPOINTERS
+
+void symbol_insert PARAMS ((symbolS * addme, symbolS * target,
+ symbolS ** rootP, symbolS ** lastP));
+void symbol_remove PARAMS ((symbolS * symbolP, symbolS ** rootP,
+ symbolS ** lastP));
+
+extern symbolS *symbol_previous PARAMS ((symbolS *));
+
+#endif /* SYMBOLS_NEED_BACKPOINTERS */
+
+void verify_symbol_chain PARAMS ((symbolS * rootP, symbolS * lastP));
+void verify_symbol_chain_2 PARAMS ((symbolS * symP));
+
+void symbol_append PARAMS ((symbolS * addme, symbolS * target,
+ symbolS ** rootP, symbolS ** lastP));
+
+extern symbolS *symbol_next PARAMS ((symbolS *));
+
+extern expressionS *symbol_get_value_expression PARAMS ((symbolS *));
+extern void symbol_set_value_expression PARAMS ((symbolS *,
+ const expressionS *));
+extern void symbol_set_frag PARAMS ((symbolS *, fragS *));
+extern fragS *symbol_get_frag PARAMS ((symbolS *));
+extern void symbol_mark_used PARAMS ((symbolS *));
+extern void symbol_clear_used PARAMS ((symbolS *));
+extern int symbol_used_p PARAMS ((symbolS *));
+extern void symbol_mark_used_in_reloc PARAMS ((symbolS *));
+extern void symbol_clear_used_in_reloc PARAMS ((symbolS *));
+extern int symbol_used_in_reloc_p PARAMS ((symbolS *));
+extern void symbol_mark_mri_common PARAMS ((symbolS *));
+extern void symbol_clear_mri_common PARAMS ((symbolS *));
+extern int symbol_mri_common_p PARAMS ((symbolS *));
+extern void symbol_mark_written PARAMS ((symbolS *));
+extern void symbol_clear_written PARAMS ((symbolS *));
+extern int symbol_written_p PARAMS ((symbolS *));
+extern void symbol_mark_resolved PARAMS ((symbolS *));
+extern int symbol_resolved_p PARAMS ((symbolS *));
+extern int symbol_section_p PARAMS ((symbolS *));
+extern int symbol_equated_p PARAMS ((symbolS *));
+extern int symbol_constant_p PARAMS ((symbolS *));
+
+#ifdef BFD_ASSEMBLER
+extern asymbol *symbol_get_bfdsym PARAMS ((symbolS *));
+extern void symbol_set_bfdsym PARAMS ((symbolS *, asymbol *));
+#endif
+
+#ifdef OBJ_SYMFIELD_TYPE
+OBJ_SYMFIELD_TYPE *symbol_get_obj PARAMS ((symbolS *));
+void symbol_set_obj PARAMS ((symbolS *, OBJ_SYMFIELD_TYPE *));
+#endif
+
+#ifdef TC_SYMFIELD_TYPE
+TC_SYMFIELD_TYPE *symbol_get_tc PARAMS ((symbolS *));
+void symbol_set_tc PARAMS ((symbolS *, TC_SYMFIELD_TYPE *));
+#endif
+
/* end of symbols.h */
diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c
index e59ddb7..e386ece 100644
--- a/contrib/binutils/gas/write.c
+++ b/contrib/binutils/gas/write.c
@@ -1,5 +1,5 @@
/* write.c - emit .o file
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -166,7 +166,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
/* We've made fx_size a narrow field; check that it's wide enough. */
if (fixP->fx_size != size)
{
- as_bad ("field fx_size too small to hold %d", size);
+ as_bad (_("field fx_size too small to hold %d"), size);
abort ();
}
fixP->fx_addsy = add_symbol;
@@ -186,6 +186,11 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
fixP->fx_no_overflow = 0;
fixP->fx_signed = 0;
+#ifdef USING_CGEN
+ fixP->fx_cgen.insn = NULL;
+ fixP->fx_cgen.opinfo = 0;
+#endif
+
#ifdef TC_FIX_TYPE
TC_INIT_FIX_DATA(fixP);
#endif
@@ -298,7 +303,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
#if defined(TC_RVA_RELOC)
r_type = TC_RVA_RELOC;
#else
- as_fatal("rva not supported");
+ as_fatal(_("rva not supported"));
#endif
#endif
break;
@@ -377,7 +382,7 @@ record_alignment (seg, align)
static void
renumber_sections (abfd, sec, countparg)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
PTR countparg;
{
@@ -428,9 +433,9 @@ chain_frchains_together_1 (section, frchp)
static void
chain_frchains_together (abfd, section, xxx)
- bfd *abfd; /* unused */
+ bfd *abfd ATTRIBUTE_UNUSED;
segT section;
- PTR xxx; /* unused */
+ PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *info;
@@ -493,8 +498,9 @@ cvt_frag_to_fill (headersP, sec, fragP)
- fragP->fr_fix) / fragP->fr_var;
if (fragP->fr_offset < 0)
{
- as_bad ("attempt to .org/.space backwards? (%ld)",
- (long) fragP->fr_offset);
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("attempt to .org/.space backwards? (%ld)"),
+ (long) fragP->fr_offset);
}
fragP->fr_type = rs_fill;
break;
@@ -573,7 +579,7 @@ static void
relax_and_size_seg (abfd, sec, xxx)
bfd *abfd;
asection *sec;
- PTR xxx;
+ PTR xxx ATTRIBUTE_UNUSED;
{
flagword flags;
fragS *fragp;
@@ -639,7 +645,7 @@ relax_and_size_seg (abfd, sec, xxx)
#ifdef DEBUG2
static void
dump_section_relocs (abfd, sec, stream_)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
char *stream_;
{
@@ -654,22 +660,16 @@ dump_section_relocs (abfd, sec, stream_)
while (fixp)
{
symbolS *s = fixp->fx_addsy;
- if (s)
+
+ fprintf (stream, " %08lx: type %d ", (unsigned long) fixp,
+ (int) fixp->fx_r_type);
+ if (s == NULL)
+ fprintf (stream, "no sym\n");
+ else
{
- fprintf (stream, " %08x: %s(%s", fixp, S_GET_NAME (s),
- s->bsym->section->name);
- if (s->bsym->flags & BSF_SECTION_SYM)
- {
- fprintf (stream, " section sym");
- if (S_GET_VALUE (s))
- fprintf (stream, "+%x", S_GET_VALUE (s));
- }
- else
- fprintf (stream, "+%x", S_GET_VALUE (s));
- fprintf (stream, ")+%x\n", fixp->fx_offset);
+ print_symbol_value_1 (stream, s);
+ fprintf (stream, "\n");
}
- else
- fprintf (stream, " %08x: type %d no sym\n", fixp, fixp->fx_r_type);
fixp = fixp->fx_next;
}
}
@@ -683,9 +683,9 @@ dump_section_relocs (abfd, sec, stream_)
static void
adjust_reloc_syms (abfd, sec, xxx)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
- PTR xxx;
+ PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
fixS *fixp;
@@ -714,39 +714,43 @@ adjust_reloc_syms (abfd, sec, xxx)
point. It is possible to see unresolved expression
symbols, though, since they are not in the regular symbol
table. */
- if (sym != NULL && ! sym->sy_resolved)
+ if (sym != NULL)
resolve_symbol_value (sym, 1);
- if (fixp->fx_subsy != NULL && ! fixp->fx_subsy->sy_resolved)
+
+ if (fixp->fx_subsy != NULL)
resolve_symbol_value (fixp->fx_subsy, 1);
/* If this symbol is equated to an undefined symbol, convert
the fixup to being against that symbol. */
- if (sym->sy_value.X_op == O_symbol
+ if (sym != NULL && symbol_equated_p (sym)
&& (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
{
- fixp->fx_offset += sym->sy_value.X_add_number;
- sym = sym->sy_value.X_add_symbol;
+ fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
+ sym = symbol_get_value_expression (sym)->X_add_symbol;
fixp->fx_addsy = sym;
}
- symsec = S_GET_SEGMENT (sym);
-
- if (sym != NULL && sym->sy_mri_common)
+ if (sym != NULL && symbol_mri_common_p (sym))
{
/* These symbols are handled specially in fixup_segment. */
goto done;
}
+ symsec = S_GET_SEGMENT (sym);
+
+ if (symsec == NULL)
+ abort ();
+
if (bfd_is_abs_section (symsec))
{
/* The fixup_segment routine will not use this symbol in a
relocation unless TC_FORCE_RELOCATION returns 1. */
if (TC_FORCE_RELOCATION (fixp))
{
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
#ifdef UNDEFINED_DIFFERENCE_OK
if (fixp->fx_subsy != NULL)
- fixp->fx_subsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_subsy);
#endif
}
goto done;
@@ -760,22 +764,22 @@ adjust_reloc_syms (abfd, sec, xxx)
if (bfd_is_und_section (symsec)
|| bfd_is_com_section (symsec))
{
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
#ifdef UNDEFINED_DIFFERENCE_OK
/* We have the difference of an undefined symbol and some
other symbol. Make sure to mark the other symbol as used
in a relocation so that it will always be output. */
if (fixp->fx_subsy)
- fixp->fx_subsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_subsy);
#endif
goto done;
}
- /* Don't try to reduce relocs which refer to .linkonce
- sections. It can lead to confusion when a debugging
- section refers to a .linkonce section. I hope this will
- always be correct. */
- if (symsec != sec)
+ /* Don't try to reduce relocs which refer to non-local symbols
+ in .linkonce sections. It can lead to confusion when a
+ debugging section refers to a .linkonce section. I hope
+ this will always be correct. */
+ if (symsec != sec && ! S_IS_LOCAL (sym))
{
boolean linkonce;
@@ -796,10 +800,10 @@ adjust_reloc_syms (abfd, sec, xxx)
if (linkonce)
{
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
#ifdef UNDEFINED_DIFFERENCE_OK
if (fixp->fx_subsy != NULL)
- fixp->fx_subsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_subsy);
#endif
goto done;
}
@@ -807,18 +811,30 @@ adjust_reloc_syms (abfd, sec, xxx)
/* Since we're reducing to section symbols, don't attempt to reduce
anything that's already using one. */
- if (sym->bsym->flags & BSF_SECTION_SYM)
+ if (symbol_section_p (sym))
+ {
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
+ goto done;
+ }
+
+#ifdef BFD_ASSEMBLER
+ /* We can never adjust a reloc against a weak symbol. If we
+ did, and the weak symbol was overridden by a real symbol
+ somewhere else, then our relocation would be pointing at
+ the wrong area of memory. */
+ if (S_IS_WEAK (sym))
{
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
goto done;
}
+#endif
/* Is there some other reason we can't adjust this one? (E.g.,
call/bal links in i960-bout symbols.) */
#ifdef obj_fix_adjustable
if (! obj_fix_adjustable (fixp))
{
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
goto done;
}
#endif
@@ -829,7 +845,7 @@ adjust_reloc_syms (abfd, sec, xxx)
#ifdef tc_fix_adjustable
if (! tc_fix_adjustable (fixp))
{
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
goto done;
}
#endif
@@ -843,7 +859,11 @@ adjust_reloc_syms (abfd, sec, xxx)
the section when it calls resolve_symbol_value. */
fixp->fx_offset += S_GET_VALUE (sym);
fixp->fx_addsy = section_symbol (S_GET_SEGMENT (sym));
- fixp->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
+#ifdef DEBUG5
+ fprintf (stderr, "\nadjusted fixup:\n");
+ print_fixup (fixp);
+#endif
done:
;
@@ -868,7 +888,7 @@ static void
write_relocs (abfd, sec, xxx)
bfd *abfd;
asection *sec;
- PTR xxx;
+ PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
int i;
@@ -910,17 +930,17 @@ write_relocs (abfd, sec, xxx)
symbol, then use generate the reloc against the latter symbol
rather than the former. */
sym = fixp->fx_addsy;
- while (sym->sy_value.X_op == O_symbol
+ while (symbol_equated_p (sym)
&& (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
{
symbolS *n;
/* We must avoid looping, as that can occur with a badly
written program. */
- n = sym->sy_value.X_add_symbol;
+ n = symbol_get_value_expression (sym)->X_add_symbol;
if (n == sym)
break;
- fixp->fx_offset += sym->sy_value.X_add_number;
+ fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
sym = n;
}
fixp->fx_addsy = sym;
@@ -948,11 +968,14 @@ write_relocs (abfd, sec, xxx)
case bfd_reloc_ok:
break;
case bfd_reloc_overflow:
- as_bad_where (fixp->fx_file, fixp->fx_line, "relocation overflow");
+ as_bad_where (fixp->fx_file, fixp->fx_line, _("relocation overflow"));
+ break;
+ case bfd_reloc_outofrange:
+ as_bad_where (fixp->fx_file, fixp->fx_line, _("relocation out of range"));
break;
default:
- as_fatal ("%s:%u: bad return from bfd_install_relocation",
- fixp->fx_file, fixp->fx_line);
+ as_fatal (_("%s:%u: bad return from bfd_install_relocation: %x"),
+ fixp->fx_file, fixp->fx_line, s);
}
relocs[i++] = reloc;
}
@@ -980,9 +1003,9 @@ write_relocs (abfd, sec, xxx)
symbol, then use generate the reloc against the latter symbol
rather than the former. */
sym = fixp->fx_addsy;
- while (sym->sy_value.X_op == O_symbol
+ while (symbol_equated_p (sym)
&& (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
- sym = sym->sy_value.X_add_symbol;
+ sym = symbol_get_value_expression (sym)->X_add_symbol;
fixp->fx_addsy = sym;
reloc = tc_gen_reloc (sec, fixp);
@@ -996,7 +1019,7 @@ write_relocs (abfd, sec, xxx)
if (fixp->fx_where + fixp->fx_size
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
as_bad_where (fixp->fx_file, fixp->fx_line,
- "internal error: fixup not contained within frag");
+ _("internal error: fixup not contained within frag"));
for (j = 0; reloc[j]; j++)
{
s = bfd_install_relocation (stdoutput, reloc[j],
@@ -1009,10 +1032,10 @@ write_relocs (abfd, sec, xxx)
break;
case bfd_reloc_overflow:
as_bad_where (fixp->fx_file, fixp->fx_line,
- "relocation overflow");
+ _("relocation overflow"));
break;
default:
- as_fatal ("%s:%u: bad return from bfd_install_relocation",
+ as_fatal (_("%s:%u: bad return from bfd_install_relocation"),
fixp->fx_file, fixp->fx_line);
}
}
@@ -1045,6 +1068,10 @@ write_relocs (abfd, sec, xxx)
(bfd_get_section_flags (abfd, sec)
& (flagword) ~SEC_RELOC));
+#ifdef SET_SECTION_RELOCS
+ SET_SECTION_RELOCS (sec, relocs, n);
+#endif
+
#ifdef DEBUG3
{
int i;
@@ -1064,9 +1091,9 @@ write_relocs (abfd, sec, xxx)
static void
write_contents (abfd, sec, xxx)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
- PTR xxx;
+ PTR xxx ATTRIBUTE_UNUSED;
{
segment_info_type *seginfo = seg_info (sec);
unsigned long offset = 0;
@@ -1095,7 +1122,7 @@ write_contents (abfd, sec, xxx)
if (x == false)
{
bfd_perror (stdoutput->filename);
- as_perror ("FATAL: Can't write %s", stdoutput->filename);
+ as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
exit (EXIT_FAILURE);
}
offset += f->fr_fix;
@@ -1119,7 +1146,7 @@ write_contents (abfd, sec, xxx)
if (x == false)
{
bfd_perror (stdoutput->filename);
- as_perror ("FATAL: Can't write %s", stdoutput->filename);
+ as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
exit (EXIT_FAILURE);
}
offset += fill_size;
@@ -1150,7 +1177,7 @@ write_contents (abfd, sec, xxx)
buf, (file_ptr) offset,
(bfd_size_type) n_per_buf * fill_size);
if (x != true)
- as_fatal ("Cannot write to output file.");
+ as_fatal (_("Cannot write to output file."));
offset += n_per_buf * fill_size;
}
}
@@ -1309,8 +1336,8 @@ set_symtab ()
symp = symbol_rootP;
for (i = 0; i < nsyms; i++, symp = symbol_next (symp))
{
- asympp[i] = symp->bsym;
- symp->written = 1;
+ asympp[i] = symbol_get_bfdsym (symp);
+ symbol_mark_written (symp);
}
}
else
@@ -1343,7 +1370,13 @@ subsegs_finish ()
for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next)
{
subseg_set (frchainP->frch_seg, frchainP->frch_subseg);
- frag_align (SUB_SEGMENT_ALIGN (now_seg), NOP_OPCODE, 0);
+
+ /* This now gets called even if we had errors. In that case,
+ any alignment is meaningless, and, moreover, will look weird
+ if we are generating a listing. */
+ frag_align (had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg),
+ subseg_text_p (now_seg) ? NOP_OPCODE : 0,
+ 0);
/* frag_align will have left a new frag.
Use this last frag for an empty ".fill".
@@ -1376,14 +1409,14 @@ write_object_file ()
if (flag_always_generate_output)
{
if (n_warns || n_errs)
- as_warn ("%d error%s, %d warning%s, generating bad object file.\n",
+ as_warn (_("%d error%s, %d warning%s, generating bad object file.\n"),
n_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
else
{
if (n_errs)
- as_fatal ("%d error%s, %d warning%s, no object file generated.\n",
+ as_fatal (_("%d error%s, %d warning%s, no object file generated.\n"),
n_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
@@ -1522,6 +1555,7 @@ write_object_file ()
{
expressionS exp;
+ subseg_change (lie->seg, lie->subseg);
exp.X_op = O_subtract;
exp.X_add_symbol = lie->add;
exp.X_op_symbol = lie->sub;
@@ -1566,6 +1600,7 @@ write_object_file ()
addressT from_addr, to_addr;
int n, m;
+ subseg_change (lie->seg, lie->subseg);
fragP = lie->dispfrag;
/* Find out how many broken_words go here. */
@@ -1592,7 +1627,7 @@ write_object_file ()
/* This is the offset from ??? to table_ptr+0 */
to_addr = table_addr - S_GET_VALUE (lie->sub);
#ifdef BFD_ASSEMBLER
- to_addr -= lie->sub->sy_frag->fr_address;
+ to_addr -= symbol_get_frag (lie->sub)->fr_address;
#endif
md_number_to_chars (lie->word_goes_here, to_addr, 2);
for (untruth = lie->next_broken_word; untruth && untruth->dispfrag == fragP; untruth = untruth->next_broken_word)
@@ -1606,7 +1641,7 @@ write_object_file ()
from_addr = table_addr;
to_addr = S_GET_VALUE (lie->add) + lie->addnum;
#ifdef BFD_ASSEMBLER
- to_addr += lie->add->sy_frag->fr_address;
+ to_addr += symbol_get_frag (lie->add)->fr_address;
#endif
md_create_long_jump (table_ptr, from_addr, to_addr, lie->dispfrag, lie->add);
table_ptr += md_long_jump_size;
@@ -1739,9 +1774,9 @@ write_object_file ()
symbolS *symp;
for (symp = symbol_rootP; symp; symp = symbol_next (symp))
- if (!symp->sy_resolved)
- resolve_symbol_value (symp, 1);
+ resolve_symbol_value (symp, 1);
}
+ resolve_local_symbol_values ();
PROGRESS (1);
@@ -1764,10 +1799,10 @@ write_object_file ()
int punt = 0;
const char *name;
- if (symp->sy_mri_common)
+ if (symbol_mri_common_p (symp))
{
if (S_IS_EXTERNAL (symp))
- as_bad ("%s: global symbols not supported in common sections",
+ as_bad (_("%s: global symbols not supported in common sections"),
S_GET_NAME (symp));
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
continue;
@@ -1780,29 +1815,17 @@ write_object_file ()
/* They only differ if `name' is a fb or dollar local
label name. */
if (name2 != name && ! S_IS_DEFINED (symp))
- as_bad ("local label %s is not defined", name2);
+ as_bad (_("local label %s is not defined"), name2);
}
/* Do it again, because adjust_reloc_syms might introduce
more symbols. They'll probably only be section symbols,
but they'll still need to have the values computed. */
- if (! symp->sy_resolved)
- {
- if (symp->sy_value.X_op == O_constant)
- {
- /* This is the normal case; skip the call. */
- S_SET_VALUE (symp,
- (S_GET_VALUE (symp)
- + symp->sy_frag->fr_address));
- symp->sy_resolved = 1;
- }
- else
- resolve_symbol_value (symp, 1);
- }
+ resolve_symbol_value (symp, 1);
/* Skip symbols which were equated to undefined or common
symbols. */
- if (symp->sy_value.X_op == O_symbol
+ if (symbol_equated_p (symp)
&& (! S_IS_DEFINED (symp) || S_IS_COMMON (symp)))
{
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
@@ -1818,15 +1841,15 @@ write_object_file ()
printf ("symbol `%s'\n\t@%x: value=%d flags=%x seg=%s\n",
S_GET_NAME (symp), symp,
S_GET_VALUE (symp),
- symp->bsym->flags,
- segment_name (symp->bsym->section));
+ symbol_get_bfdsym (symp)->flags,
+ segment_name (S_GET_SEGMENT (symp)));
#endif
#ifdef obj_frob_symbol
obj_frob_symbol (symp, punt);
#endif
#ifdef tc_frob_symbol
- if (! punt || symp->sy_used_in_reloc)
+ if (! punt || symbol_used_in_reloc_p (symp))
tc_frob_symbol (symp, punt);
#endif
@@ -1836,13 +1859,13 @@ write_object_file ()
and symbols that the frob_symbol macros told us to punt,
but we keep such symbols if they are used in relocs. */
if ((! EMIT_SECTION_SYMBOLS
- && (symp->bsym->flags & BSF_SECTION_SYM) != 0)
+ && symbol_section_p (symp))
/* Note that S_IS_EXTERN and S_IS_LOCAL are not always
opposites. Sometimes the former checks flags and the
latter examines the name... */
|| (!S_IS_EXTERN (symp)
&& (S_IS_LOCAL (symp) || punt)
- && ! symp->sy_used_in_reloc))
+ && ! symbol_used_in_reloc_p (symp)))
{
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
/* After symbol_remove, symbol_next(symp) still returns
@@ -1853,16 +1876,16 @@ write_object_file ()
}
/* Make sure we really got a value for the symbol. */
- if (! symp->sy_resolved)
+ if (! symbol_resolved_p (symp))
{
- as_bad ("can't resolve value for symbol \"%s\"",
+ as_bad (_("can't resolve value for symbol \"%s\""),
S_GET_NAME (symp));
- symp->sy_resolved = 1;
+ symbol_mark_resolved (symp);
}
/* Set the value into the BFD symbol. Up til now the value
has only been kept in the gas symbolS struct. */
- symp->bsym->value = S_GET_VALUE (symp);
+ symbol_get_bfdsym (symp)->value = S_GET_VALUE (symp);
}
}
@@ -1971,9 +1994,7 @@ relax_frag (fragP, stretch)
#endif
know (!(S_GET_SEGMENT (symbolP) == absolute_section)
|| symbolP->sy_frag == &zero_address_frag);
- target +=
- S_GET_VALUE (symbolP)
- + symbolP->sy_frag->fr_address;
+ target += S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address;
/* If frag has yet to be reached on this pass,
assume it will move by STRETCH just as we did.
@@ -1984,8 +2005,8 @@ relax_frag (fragP, stretch)
There should be a faster way to do this. */
- if (symbolP->sy_frag->fr_address >= was_address
- && is_dnrange (fragP, symbolP->sy_frag))
+ if (symbol_get_frag (symbolP)->fr_address >= was_address
+ && is_dnrange (fragP, symbol_get_frag (symbolP)))
{
target += stretch;
}
@@ -2099,7 +2120,7 @@ relax_segment (segment_frag_root, segment)
if (offset % fragP->fr_var != 0)
{
- as_bad ("alignment padding (%lu bytes) not a multiple of %ld",
+ as_bad (_("alignment padding (%lu bytes) not a multiple of %ld"),
(unsigned long) offset, (long) fragP->fr_var);
offset -= (offset % fragP->fr_var);
}
@@ -2194,10 +2215,10 @@ relax_segment (segment_frag_root, segment)
if (lie->added)
continue;
- offset = (lie->add->sy_frag->fr_address
+ offset = (symbol_get_frag (lie->add)->fr_address
+ S_GET_VALUE (lie->add)
+ lie->addnum
- - (lie->sub->sy_frag->fr_address
+ - (symbol_get_frag (lie->sub)->fr_address
+ S_GET_VALUE (lie->sub)));
if (offset <= -32768 || offset >= 32767)
{
@@ -2205,7 +2226,7 @@ relax_segment (segment_frag_root, segment)
{
char buf[50];
sprint_value (buf, (addressT) lie->addnum);
- as_warn (".word %s-%s+%s didn't fit",
+ as_warn (_(".word %s-%s+%s didn't fit"),
S_GET_NAME (lie->add),
S_GET_NAME (lie->sub),
buf);
@@ -2219,8 +2240,10 @@ relax_segment (segment_frag_root, segment)
for (untruth = lie->next_broken_word;
untruth && untruth->dispfrag == lie->dispfrag;
untruth = untruth->next_broken_word)
- if ((untruth->add->sy_frag == lie->add->sy_frag)
- && S_GET_VALUE (untruth->add) == S_GET_VALUE (lie->add))
+ if ((symbol_get_frag (untruth->add)
+ == symbol_get_frag (lie->add))
+ && (S_GET_VALUE (untruth->add)
+ == S_GET_VALUE (lie->add)))
{
untruth->added = 2;
untruth->use_jump = lie;
@@ -2270,8 +2293,8 @@ relax_segment (segment_frag_root, segment)
know (!(S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
|| (symbolP->sy_frag == &zero_address_frag));
#endif
- target += S_GET_VALUE (symbolP)
- + symbolP->sy_frag->fr_address;
+ target += (S_GET_VALUE (symbolP)
+ + symbol_get_frag (symbolP)->fr_address);
} /* if we have a symbol */
know (fragP->fr_next);
@@ -2282,8 +2305,16 @@ relax_segment (segment_frag_root, segment)
/* Growth may be negative, but variable part of frag
cannot have fewer than 0 chars. That is, we can't
.org backwards. */
- as_bad ("attempt to .org backwards ignored");
- growth = 0;
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("attempt to .org backwards ignored"));
+
+ /* We've issued an error message. Change the
+ frag to avoid cascading errors. */
+ fragP->fr_type = rs_align;
+ fragP->fr_subtype = 0;
+ fragP->fr_offset = 0;
+ fragP->fr_fix = after - address;
+ growth = stretch;
}
growth -= stretch; /* This is an absolute growth factor */
@@ -2294,15 +2325,15 @@ relax_segment (segment_frag_root, segment)
if (symbolP)
{
growth = S_GET_VALUE (symbolP);
- if (symbolP->sy_frag != &zero_address_frag
+ if (symbol_get_frag (symbolP) != &zero_address_frag
|| S_IS_COMMON (symbolP)
|| ! S_IS_DEFINED (symbolP))
as_bad_where (fragP->fr_file, fragP->fr_line,
- ".space specifies non-absolute value");
+ _(".space specifies non-absolute value"));
fragP->fr_symbol = 0;
if (growth < 0)
{
- as_warn (".space or .fill with negative value, ignored");
+ as_warn (_(".space or .fill with negative value, ignored"));
growth = 0;
}
}
@@ -2412,11 +2443,13 @@ fixup_segment (fixP, this_segment_type)
for (; fixP; fixP = fixP->fx_next)
{
+
#ifdef DEBUG5
fprintf (stderr, "\nprocessing fixup:\n");
print_fixup (fixP);
#endif
+
fragP = fixP->fx_frag;
know (fragP);
where = fixP->fx_where;
@@ -2432,12 +2465,13 @@ fixup_segment (fixP, this_segment_type)
plt = fixP->fx_plt;
if (add_symbolP != NULL
- && add_symbolP->sy_mri_common)
+ && symbol_mri_common_p (add_symbolP))
{
know (add_symbolP->sy_value.X_op == O_symbol);
add_number += S_GET_VALUE (add_symbolP);
fixP->fx_offset = add_number;
- add_symbolP = fixP->fx_addsy = add_symbolP->sy_value.X_add_symbol;
+ add_symbolP = fixP->fx_addsy =
+ symbol_get_value_expression (add_symbolP)->X_add_symbol;
}
if (add_symbolP)
@@ -2470,7 +2504,7 @@ fixup_segment (fixP, this_segment_type)
else
bad_sub_reloc:
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Negative of non-absolute symbol %s",
+ _("Negative of non-absolute symbol %s"),
S_GET_NAME (sub_symbolP));
}
else if (S_GET_SEGMENT (sub_symbolP) == add_symbol_segment
@@ -2484,7 +2518,7 @@ fixup_segment (fixP, this_segment_type)
as the target of a call instruction. */
if (fixP->fx_tcbit)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "callj to difference of 2 symbols");
+ _("callj to difference of 2 symbols"));
#endif /* TC_I960 */
add_number += S_GET_VALUE (add_symbolP) -
S_GET_VALUE (sub_symbolP);
@@ -2550,9 +2584,12 @@ fixup_segment (fixP, this_segment_type)
char buf[50];
sprint_value (buf, fragP->fr_address + where);
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %s.",
+ _("Subtraction of two symbols in different sections \"%s\" {%s section} - \"%s\" {%s section} at file address %s."),
+ S_GET_NAME (add_symbolP),
+ segment_name (S_GET_SEGMENT (add_symbolP)),
+ S_GET_NAME (sub_symbolP),
segment_name (S_GET_SEGMENT (sub_symbolP)),
- S_GET_NAME (sub_symbolP), buf);
+ buf);
}
}
}
@@ -2625,7 +2662,7 @@ fixup_segment (fixP, this_segment_type)
* relocation.
*/
as_bad_where (fixP->fx_file, fixP->fx_line,
- "can't use COBR format with external label");
+ _("can't use COBR format with external label"));
fixP->fx_addsy = NULL;
fixP->fx_done = 1;
continue;
@@ -2645,11 +2682,15 @@ fixup_segment (fixP, this_segment_type)
seg_reloc_count++;
#if !(defined (TC_V850) && defined (OBJ_ELF))
#if !(defined (TC_M68K) && defined (OBJ_ELF))
+#if !(defined (TC_ARM) && defined (OBJ_ELF))
+#if !(defined (TC_I960) && defined (OBJ_ELF))
#if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE)
add_number += S_GET_VALUE (add_symbolP);
#endif
#endif
#endif
+#endif
+#endif
}
}
}
@@ -2664,33 +2705,42 @@ fixup_segment (fixP, this_segment_type)
#else
fixP->fx_addsy = section_symbol (absolute_section);
#endif
- fixP->fx_addsy->sy_used_in_reloc = 1;
+ symbol_mark_used_in_reloc (fixP->fx_addsy);
++seg_reloc_count;
}
}
+ if (!fixP->fx_done)
+ {
+#ifdef MD_APPLY_FIX3
+ md_apply_fix3 (fixP, &add_number, this_segment_type);
+#else
+#ifdef BFD_ASSEMBLER
+ md_apply_fix (fixP, &add_number);
+#else
+ md_apply_fix (fixP, add_number);
+#endif
+#endif
+
+#ifndef TC_HANDLES_FX_DONE
+ /* If the tc-* files haven't been converted, assume it's handling
+ it the old way, where a null fx_addsy means that the fix has
+ been applied completely, and no further work is needed. */
+ if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0)
+ fixP->fx_done = 1;
+#endif
+ }
+
if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0)
{
if ((size_t) size < sizeof (valueT))
{
- valueT mask, hibit;
+ valueT mask;
- /* set all bits to one */
mask = 0;
- mask--;
- /* Technically, combining these produces an undefined result
- if size is sizeof (valueT), though I think these two
- half-way operations should both be defined. And the
- compiler should be able to combine them if it's valid on
- the host architecture. */
- mask <<= size * 4;
- mask <<= size * 4;
- hibit = (valueT) 1 << (size * 8 - 1);
- if (((add_number & mask) != 0
- || (fixP->fx_signed
- && (add_number & hibit) != 0))
- && ((add_number & mask) != mask
- || (add_number & hibit) == 0))
+ mask--; /* set all bits to one */
+ mask <<= size * 8 - (fixP->fx_signed ? 1 : 0);
+ if ((add_number & mask) != 0 && (add_number & mask) != mask)
{
char buf[50], buf2[50];
sprint_value (buf, fragP->fr_address + where);
@@ -2699,7 +2749,7 @@ fixup_segment (fixP, this_segment_type)
else
sprintf (buf2, "%ld", (long) add_number);
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Value of %s too large for field of %d bytes at %s",
+ _("Value of %s too large for field of %d bytes at %s"),
buf2, size, buf);
} /* generic error checking */
}
@@ -2711,34 +2761,15 @@ fixup_segment (fixP, this_segment_type)
&& size == 2
&& add_number > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Signed .word overflow; switch may be too large; %ld at 0x%lx",
+ _("Signed .word overflow; switch may be too large; %ld at 0x%lx"),
(long) add_number,
(unsigned long) (fragP->fr_address + where));
#endif
} /* not a bit fix */
- if (!fixP->fx_done)
- {
-#ifdef MD_APPLY_FIX3
- md_apply_fix3 (fixP, &add_number, this_segment_type);
-#else
-#ifdef BFD_ASSEMBLER
- md_apply_fix (fixP, &add_number);
-#else
- md_apply_fix (fixP, add_number);
-#endif
-#endif
-
-#ifndef TC_HANDLES_FX_DONE
- /* If the tc-* files haven't been converted, assume it's handling
- it the old way, where a null fx_addsy means that the fix has
- been applied completely, and no further work is needed. */
- if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0)
- fixP->fx_done = 1;
-#endif
- }
#ifdef TC_VALIDATE_FIX
- skip: ;
+ skip: ATTRIBUTE_UNUSED_LABEL
+ ;
#endif
#ifdef DEBUG5
fprintf (stderr, "result:\n");
@@ -2786,7 +2817,7 @@ void
write_print_statistics (file)
FILE *file;
{
- fprintf (stderr, "fixups: %d\n", n_fixups);
+ fprintf (file, "fixups: %d\n", n_fixups);
}
/* for debugging */
diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h
index 8fd1411..186d2ad 100644
--- a/contrib/binutils/gas/write.h
+++ b/contrib/binutils/gas/write.h
@@ -18,6 +18,9 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#ifndef __write_h__
+#define __write_h__
+
#ifndef TC_I960
#ifdef hpux
#define EXEC_MACHINE_TYPE HP9000S200_ID
@@ -135,6 +138,15 @@ struct fix
char *fx_file;
unsigned fx_line;
+#ifdef USING_CGEN
+ struct {
+ /* CGEN_INSN entry for this instruction. */
+ const struct cgen_insn *insn;
+ /* Target specific data, usually reloc number. */
+ int opinfo;
+ } fx_cgen;
+#endif
+
#ifdef TC_FIX_TYPE
/* Location where a backend can attach additional data
needed to perform fixups. */
@@ -192,4 +204,5 @@ extern fixS *fix_new_exp
extern void write_print_statistics PARAMS ((FILE *));
+#endif /* __write_h__ */
/* end of write.h */
diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog
index 985d9f1..0dda323 100644
--- a/contrib/binutils/include/ChangeLog
+++ b/contrib/binutils/include/ChangeLog
@@ -1,3 +1,360 @@
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * bin-bugs.h (REPORT_BUGS_TO): Remove translated part.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * bin-bugs.h: New file.
+
+2000-03-27 Denis Chertykov <denisc@overta.ru>
+
+ * dis-asm.h (print_insn_avr): Declare.
+
+2000-03-14 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * hashtab.h (htab_trav): Modify type so that first arg is of type
+ void **.
+ (htab_find_with_hash, htab_find_slot_with_hash): Declare new
+ functions.
+
+2000-03-09 Alex Samuel <samuel@codesourcery.com>
+
+ * partition.h: New file.
+
+2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
+
+ * hashtab.h (struct htab): Add del_f.
+ (htab_del): New type.
+ (htab_create): Add fourth argument.
+
+2000-03-08 Zack Weinberg <zack@wolery.cumb.org>
+
+ * hashtab.h (hash_table_t): Rename to htab_t.
+ (struct hash_table): Rename to struct htab. Shorten element
+ names. Reorder elements by size.
+ (htab_hash, htab_eq, htab_trav): New typedefs for the callback
+ function pointers.
+ (hash_table_entry_t): Discard; just use void * for element
+ type.
+
+2000-03-01 H.J. Lu <hjl@gnu.org>
+
+ * bfdlink.h (bfd_link_callbacks): Add a boolean arg to
+ the undefined_symbol callback.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * dis-asm.h (print_insn_i370): Declare.
+
+2000-02-22 Chandra Chavva <cchavva@cygnus.com>
+
+ * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
+ cannot be combined in parallel with ADD/SUBppp.
+
+Tue Feb 22 15:19:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-sim.h (sim_trace): Document return values.
+ (sim_set_trace): Declare. Deprecate.
+
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * dis-asm.h (struct disassemble_info): Change `length' param of
+ read_memory_func to unsigned. Change type of `buffer_length' and
+ `octets_per_byte' to unsigned.
+ (buffer_read_memory): Change `length' param to unsigned.
+
+2000-02-16 Nick Clifton <nickc@cygnus.com>
+
+ * dis-asm.h: Add prototypes for ARM register name functions.
+
+Wed Feb 9 18:45:49 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * wait.h: Delete. No longer used by GDB.
+
+Tue Feb 8 17:01:13 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-sim.h (sim_resume): Clarify use of SIGGNAL.
+ (sim_stop_reason): Clarify meaning of sim_signalled.
+
+2000-02-03 Timothy Wall <twall@redhat.com>
+
+ * dis-asm.h (struct disassemble_info): Added octets_per_byte
+ field and initialize it to one (1).
+
+2000-01-27 Nick Clifton <nickc@redhat.com>
+
+ * dis-asm.h: Add prototype for disassembler_usage().
+ Add prototype for arm_disassembler_options().
+ Remove prototype for arm_toggle_regnames().
+ Add prototype for parse_arm_disassembler_option().
+
+Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s"
+ to stringify argument s.
+
+Wed Dec 15 11:22:56 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hp-symtab.h (HP_LANGUAGE_FORTRAN): New enumeration constant.
+ (HP_LANGUAGE_F77): Define using HP_LANGUAGE_FORTRAN.
+
+1999-12-15 Doug Evans <dje@transmeta.com>
+
+ * dis-asm.h: Enclose in extern "C" ifdef __cplusplus.
+
+1999-12-05 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (struct splay_tree_node): Rename to ...
+ (struct splay_tree_node_s): ... this.
+ (struct splay_tree): Rename to ...
+ (struct splay_tree_s): ... this.
+
+1999-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (ATTRIBUTE_MALLOC): New macro.
+
+ * libiberty.h (buildargv, dupargv, concat, choose_temp_base,
+ make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add
+ ATTRIBUTE_MALLOC.
+ (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN.
+
+1999-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
+ (asprintf, vasprintf): Provide declarations.
+
+Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
+ Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'.
+
+1999-11-04 Jimmy Guo <guo@cup.hp.com>
+
+ * hp-symtab.h (dntt_type_fparam): Add doc_ranges, misc_kind
+ fields, change location type to CORE_ADDR from int.
+ (dntt_type_const): Name the 5th field location_type.
+
+Sun Oct 24 19:11:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * sim-d10v.h (SIM_D10V_TS2_DMAP_REGNUM): Define.
+
+1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
+
+ * hashtab.h: Give hash_table_t a struct tag. Add prototypes
+ for clear_hash_table_slot and traverse_hash_table. Correct
+ prototype of all_hash_table_collisions.
+
+Sat Oct 23 19:00:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * sim-d10v.h: New file.
+
+Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
+
+ * hashtab.h: New file.
+
+1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of
+ explicitly testing __GNUC__ and __GNUC_MINOR__.
+
+ (ATTRIBUTE_PRINTF): Use `__format__', not `format'.
+
+1999-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (make_temp_file): Add a prototype.
+
+Tue Sep 14 00:35:02 1999 Marc Espie <espie@cvs.openbsd.org>
+
+ * libiberty.h (basename): OpenBSD has a correct prototype.
+ (xrealloc): Remove outdated comment.
+
+1999-09-07 Jeff Garzik <jgarzik@pobox.com>
+
+ * libiberty.h (xmemdup): Add prototype for new function.
+
+1999-09-04 Steve Chamberlain <sac@pobox.com>
+
+ * dis-asm.h (print_insn_pj): Declare.
+
+1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
+ in calls to `_obstack_memcpy' from here ...
+
+ (_obstack_memcpy): ... to here, except in the __STDC__ case which
+ doesn't need it.
+
+1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (getpwd): Prototype.
+
+1999-08-01 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_insert): Return the new node.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * ansidecl.h: Copy attribute support macros from egcs.
+
+1999-06-22 Mark Mitchell <mark@codesourcery.com>
+
+ * bfdlink.h (struct bfd_link_hash_entry): Add init_function and
+ fini_function.
+
+1999-06-20 Mark Mitchell <mark@codesourcery.com>
+
+ * mips.h (Elf32_Internal_Msym): New structure.
+ (Elf32_External_Msym): Likewise.
+ (ELF32_MS_REL_INDEX): New macro.
+ (ELF32_MS_FLAGS): Likewise.
+ (ELF32_MS_INFO): Likewise.
+
+1999-06-14 Nick Clifton <nickc@cygnus.com>
+
+ * dis-asm.h (arm_toggle_regnames): New prototype.
+ (struct diassemble_info): New field: disassembler_options.
+
+1999-04-11 Richard Henderson <rth@cygnus.com>
+
+ * bfdlink.h (bfd_elf_version_expr): Rename `match' to `pattern'.
+ Add `match' callback function.
+
+1999-04-10 Richard Henderson <rth@cygnus.com>
+
+ * bfdlink.h (bfd_link_info): Add no_undefined.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * dis-asm.h: Add prototype for print_insn_mcore.
+
+1999-04-02 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_compare_pointers): Declare.
+
+1999-03-30 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_compare_ints): Declare.
+
+Wed Mar 24 12:46:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * libiberty.h (basename): Cygwin{,32} should have the prototype.
+
+1999-02-22 Jim Lemke <jlemke@cygnus.com>
+
+ * bfdlink.h (bfd_link_info): add field "mpc860c0".
+
+Mon Feb 1 21:05:46 1999 Catherine Moore <clm@cygnus.com>
+
+ * dis-asm.h (print_insn_i386_att): Declare.
+ (print_insn_i386_intel): Declare.
+
+998-12-30 Michael Meissner <meissner@cygnus.com>
+
+ * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Cast STREAM and
+ FPRINTF_FUNC to avoid compiler warnings.
+
+Wed Dec 30 16:07:14 1998 David Taylor <taylor@texas.cygnus.com>
+
+ * dis-asm.h: change void * to PTR (two places).
+
+Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * demangle.h: Don't check IN_GCC anymore.
+ * splay-tree.h: Likewise.
+
+Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ The following changes were made by Elena Zannoni
+ <ezannoni@kwikemart.cygnus.com> and Edith Epstein
+ <eepstein@sophia.cygnus.com> as part of a project to merge in
+ changes made by HP; HP did not create ChangeLog entries.
+
+ * dis-asm.h (struct disassemble_info): change the type of stream
+ from FILE* to void*, for use with gdb's new type GDB_FILE.
+ (fprintf_ftype): change FILE* parameter type to void*.
+
+ * demangle.h: (DMGL_EDG): new macro for Kuck and Associates
+ (DMGL_STYLE_MASK): modify to include Kuck and Assoc style
+ (demangling_styles): add new edg_demangling style
+ (EDG_DEMANGLING_STYLE_STRING): new macro
+ (EDG_DEMANGLING): new macro
+
+ * demangle.h (DMGL_HP): new macro, for HP/aCC compiler.
+ (DMGL_STYLE_MASK): modify to include new HP's style.
+ (demangling_styles): add new hp_demangling value.
+ (HP_DEMANGLING_STYLE_STRING): new macro.
+ (ARM_DEMANGLING): coerce to int.
+ (HP_DEMANGLING): new macro.
+
+ * hp-symtab.h: rewritten, from HP.
+ (quick_procedure): change type of language field to unsigned int
+ (quick_module): change type of language field to unsigned int
+ (struct dntt_type_svar): add field thread_specific.
+ (hp_language): add languages modcal and dmpascal.
+
+Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * elf/sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
+ R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
+
+Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * libiberty.h (basename): Add prototype for FreeBSD.
+
+Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h: Prototype xcalloc.
+
+Sun Nov 8 17:42:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h: Wrap problematic macros with !IN_GCC.
+
+ * demangle.h: Never define PARAMS().
+ * splay-tree.h: Likewise.
+
+Sat Nov 7 18:30:20 1998 Peter Schauer <peter.schauer@regent.e-technik.tu-muenchen.de>
+
+ * dis-asm.h (print_insn_vax): Declare.
+
+Sat Nov 7 16:04:03 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * demangle.h: Don't include gansidecl.h.
+ * splay-tree.h: Likewise.
+
+1998-10-26 16:03 Ulrich Drepper <drepper@cygnus.com>
+
+ * bfdlink.h (struct bfd_link_info): Add new field optimize.
+
+Thu Oct 22 19:58:00 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * splay-tree.h: Wrap function pointer parameter declarations in
+ PARAMS() macro.
+
+1998-10-21 Mark Mitchell <mark@markmitchell.com>
+
+ * splay-tree.h: New file.
+
+Fri Oct 9 00:02:03 1998 Jeffrey A Law (law@cygnus.com)
+
+ * Merge devo and egcs include directories.
+
+Sat Sep 5 12:16:33 1998 Jeffrey A Law (law@cygnus.com)
+
+ * getopt.h, obstack.h: Updated from gcc.
+
+1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * libiberty.h (xexit): Change decl to use modern GCC attribute
+ to indicate exit does not return.
+
+Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * obstack.h: Update to latest FSF version.
+
+Tue May 26 20:57:43 1998 Stan Cox <scox@equinox.cygnus.com>
+
+ * elf/sparc.h (EF_SPARC_LEDATA, R_SPARC_32LE): Added.
+
Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
* dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols'
@@ -24,7 +381,7 @@ Mon Feb 2 17:13:31 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
Thu Jan 22 16:23:59 1998 Fred Fish <fnf@cygnus.com>
- * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly
+ * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly
function there is a reloc on this line.
Mon Dec 8 11:22:23 1997 Nick Clifton <nickc@cygnus.com>
@@ -97,7 +454,7 @@ Tue Oct 14 16:07:51 1997 Nick Clifton <nickc@cygnus.com>
* dis-asm.h (struct disassemble_info): New field
'symbol_at_address_func'.
(INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise new field with
- generic_symbol_at_address.
+ generic_symbol_at_address.
Mon Oct 13 10:17:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
@@ -190,12 +547,12 @@ Fri Apr 18 13:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
* remote-sim.h (enum sim_stop): Add sim_running and sim_polling as
states for use internal to simulators.
-
+
* callback.h (struct host_callback_strut): Put a magic number at
the end of the struct to allow basic checking.
(struct host_callback_struct ): Add poll_quit - so
that the console etc can be polled at regular intervals.
-
+
Thu Apr 17 02:17:12 1997 Doug Evans <dje@canuck.cygnus.com>
* remote-sim.h (struct _bfd): Declare.
@@ -270,6 +627,10 @@ Thu Feb 6 14:20:01 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
bytes_per_chunk and display_endian to control the
display of raw instructions.
+Fri Dec 27 22:17:37 1996 Fred Fish <fnf@cygnus.com>
+
+ * dis-asm.h (print_insn_tic80): Declare.
+
Sun Dec 8 17:11:12 1996 Doug Evans <dje@canuck.cygnus.com>
* callback.h (host_callback): New member `error'.
@@ -284,7 +645,7 @@ Mon Nov 18 16:34:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
Wed Nov 13 08:22:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
- * libiberty.h: Revert last commit due to conflicts with hpux
+ * libiberty.h: Revert last commit due to conflicts with hpux
system headers.
Tue Nov 12 16:31:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
@@ -453,7 +814,7 @@ Wed Jan 3 13:12:09 1996 Fred Fish <fnf@cygnus.com>
* obstack.h: Update copyright to 1996.
(_obstack_memory_used): Declare.
(obstack_memory_used): Define macro.
-
+
Thu Dec 28 11:42:12 1995 Ian Lance Taylor <ian@cygnus.com>
* libiberty.h (xstrdup): Declare.
@@ -582,7 +943,7 @@ Wed Dec 14 13:08:43 1994 Stan Shebs <shebs@andros.cygnus.com>
Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu)
* hp-symtab.h: New file describing the debug symbols emitted
- by the HP C compilers.
+ by the HP C compilers.
Fri Nov 11 15:48:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
@@ -647,8 +1008,8 @@ Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
- * obstack.h: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
+ * obstack.h: Delete use of IN_GCC to control whether
+ stddef.h or gstddef.h is included.
Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -706,7 +1067,7 @@ Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com)
* obstack.h (struct obstack): Add alloc_failed flag.
_obstack_begin, _obstack_begin_1): Declare to return int, not void.
(obstack_finish): If alloc_failed, return NULL.
- (obstack_base, obstack_next_free, objstack_object_size):
+ (obstack_base, obstack_next_free, objstack_object_size):
If alloc_failed, return 0.
(obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
obstack_int_grow, obstack_blank): If alloc_failed, do nothing that
@@ -764,7 +1125,7 @@ Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com)
- * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns,
+ * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns,
data_size, insn_type, target, target2. These are used to return
information from the instruction decoders back to the calling
program. Add comments, make more readable.
@@ -1032,7 +1393,7 @@ Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com)
Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish)
- * obstack.h: Convert bcopy() use to memcpy(), which is more
+ * obstack.h: Convert bcopy() use to memcpy(), which is more
portable, more standard, and can take advantage of gcc's builtin
functions for increased performance.
@@ -1086,7 +1447,7 @@ Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com)
Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
- * bfd.h : new target entr, bfd_relax_section
+ * bfd.h : new target entr, bfd_relax_section
Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
@@ -1153,7 +1514,7 @@ Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* internalcoff.h: (internal_scnhdr) took out #def dependency, now
s_nreloc and s_nlnno are always long. (internal_reloc): allways
- has an offset field now.
+ has an offset field now.
Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com)
@@ -1291,7 +1652,7 @@ Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com)
Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com)
- * bfd.h, elf-common.h, elf-external.h, elf-internal.h:
+ * bfd.h, elf-common.h, elf-external.h, elf-internal.h:
Add preliminary ELF support, sufficient for GDB, from Fred Fish.
* sysdep.h, sys/h-amix.h: Support Amiga SVR4.
diff --git a/contrib/binutils/include/ansidecl.h b/contrib/binutils/include/ansidecl.h
index abe87a9..1030867 100644
--- a/contrib/binutils/include/ansidecl.h
+++ b/contrib/binutils/include/ansidecl.h
@@ -1,5 +1,5 @@
/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1996 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1996, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -103,10 +103,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PTRCONST void *CONST
#define LONG_DOUBLE long double
+#ifndef IN_GCC
#define AND ,
#define NOARGS void
#define VOLATILE volatile
#define SIGNED signed
+#endif /* ! IN_GCC */
#define PARAMS(paramlist) paramlist
#define ANSI_PROTOTYPES 1
@@ -115,12 +117,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define VA_START(va_list,var) va_start(va_list,var)
/* These are obsolete. Do not use. */
+#ifndef IN_GCC
#define CONST const
#define DOTS , ...
#define PROTO(type, name, arglist) type name arglist
#define EXFUN(name, proto) name proto
#define DEFUN(name, arglist, args) name(args)
#define DEFUN_VOID(name) name(void)
+#endif /* ! IN_GCC */
#else /* Not ANSI C. */
@@ -128,13 +132,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PTRCONST PTR
#define LONG_DOUBLE double
+#ifndef IN_GCC
#define AND ;
#define NOARGS
+#define VOLATILE
+#define SIGNED
+#endif /* !IN_GCC */
+
#ifndef const /* some systems define it in header files for non-ansi mode */
#define const
#endif
-#define VOLATILE
-#define SIGNED
#define PARAMS(paramlist) ()
@@ -142,13 +149,76 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define VA_START(va_list,var) va_start(va_list)
/* These are obsolete. Do not use. */
+#ifndef IN_GCC
#define CONST
#define DOTS
#define PROTO(type, name, arglist) type name ()
#define EXFUN(name, proto) name()
#define DEFUN(name, arglist, args) name arglist args;
#define DEFUN_VOID(name) name()
+#endif /* ! IN_GCC */
#endif /* ANSI C. */
+/* Using MACRO(x,y) in cpp #if conditionals does not work with some
+ older preprocessors. Thus we can't define something like this:
+
+#define HAVE_GCC_VERSION(MAJOR, MINOR) \
+ (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
+
+and then test "#if HAVE_GCC_VERSION(2,7)".
+
+So instead we use the macro below and test it against specific values. */
+
+/* This macro simplifies testing whether we are using gcc, and if it
+ is of a particular minimum version. (Both major & minor numbers are
+ significant.) This macro will evaluate to 0 if we are not using
+ gcc at all. */
+#ifndef GCC_VERSION
+#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+#endif /* GCC_VERSION */
+
+/* Define macros for some gcc attributes. This permits us to use the
+ macros freely, and know that they will come into play for the
+ version of gcc in which they are supported. */
+
+#if (GCC_VERSION < 2007)
+# define __attribute__(x)
+#endif
+
+/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
+#ifndef ATTRIBUTE_MALLOC
+# if (GCC_VERSION >= 2096)
+# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define ATTRIBUTE_MALLOC
+# endif /* GNUC >= 2.96 */
+#endif /* ATTRIBUTE_MALLOC */
+
+/* Attributes on labels were valid as of gcc 2.93. */
+#ifndef ATTRIBUTE_UNUSED_LABEL
+# if (GCC_VERSION >= 2093)
+# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
+# else
+# define ATTRIBUTE_UNUSED_LABEL
+# endif /* GNUC >= 2.93 */
+#endif /* ATTRIBUTE_UNUSED_LABEL */
+
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif /* ATTRIBUTE_UNUSED */
+
+#ifndef ATTRIBUTE_NORETURN
+#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#endif /* ATTRIBUTE_NORETURN */
+
+#ifndef ATTRIBUTE_PRINTF
+#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
+#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
+#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
+#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
+#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
+#endif /* ATTRIBUTE_PRINTF */
+
#endif /* ansidecl.h */
diff --git a/contrib/binutils/include/aout/ChangeLog b/contrib/binutils/include/aout/ChangeLog
index 307448b..63f17ec 100644
--- a/contrib/binutils/include/aout/ChangeLog
+++ b/contrib/binutils/include/aout/ChangeLog
@@ -1,3 +1,12 @@
+1999-07-12 Ian Lance Taylor <ian@zembu.com>
+
+ * aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
+ defined as 0.
+
+Sun Jun 28 11:33:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * stab.def: Add N_ALIAS from SunPro F77.
+
Mon Mar 11 12:15:52 1996 Ian Lance Taylor <ian@cygnus.com>
* stab.def: Use __define_stab_duplicate rather than __define_stab
diff --git a/contrib/binutils/include/aout/aout64.h b/contrib/binutils/include/aout/aout64.h
index 76f1140..bf743c4 100644
--- a/contrib/binutils/include/aout/aout64.h
+++ b/contrib/binutils/include/aout/aout64.h
@@ -121,8 +121,12 @@ struct external_exec
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
files. */
#ifndef N_SHARED_LIB
+#if defined (TEXT_START_ADDR) && TEXT_START_ADDR == 0
+#define N_SHARED_LIB(x) (0)
+#else
#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR)
#endif
+#endif
/* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on
the assumption that we are dealing with a .o file, not an
diff --git a/contrib/binutils/include/aout/stab.def b/contrib/binutils/include/aout/stab.def
index 3c6b456..9c2d2dd 100644
--- a/contrib/binutils/include/aout/stab.def
+++ b/contrib/binutils/include/aout/stab.def
@@ -1,5 +1,6 @@
/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1988, 91, 92, 93, 94, 95, 96, 1998
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -135,6 +136,9 @@ __define_stab (N_ENDM, 0x62, "ENDM")
__define_stab (N_SO, 0x64, "SO")
+/* SunPro F77: Name of alias. */
+__define_stab (N_ALIAS, 0x6c, "ALIAS")
+
/* Automatic variable in the stack. Value is offset from frame pointer.
Also used for type descriptions. */
__define_stab (N_LSYM, 0x80, "LSYM")
@@ -239,7 +243,7 @@ __define_stab (N_LENG, 0xfe, "LENG")
| 50 EHDECL*| 52 | 54 CATCH | 56 |
| 58 | 5A | 5C | 5E |
| 60 SSYM | 62 ENDM | 64 SO | 66 |
- | 68 | 6A | 6C | 6E |
+ | 68 | 6A | 6C ALIAS | 6E |
| 70 | 72 | 74 | 76 |
| 78 | 7A | 7C | 7E |
| 80 LSYM | 82 BINCL | 84 SOL | 86 |
diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h
index f4acf2f..bb827a3 100644
--- a/contrib/binutils/include/bfdlink.h
+++ b/contrib/binutils/include/bfdlink.h
@@ -1,5 +1,5 @@
/* bfdlink.h -- header file for BFD link routines
- Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -193,6 +193,12 @@ struct bfd_link_info
on the output file, but may be checked when reading the input
files. */
boolean traditional_format;
+ /* true if we want to produced optimized output files. This might
+ need much more time and therefore must be explicitly selected. */
+ boolean optimize;
+ /* true if BFD should generate errors for undefined symbols
+ even if generating a shared object. */
+ boolean no_undefined;
/* Which symbols to strip. */
enum bfd_link_strip strip;
/* Which local symbols to discard. */
@@ -226,6 +232,18 @@ struct bfd_link_info
struct bfd_hash_table *wrap_hash;
/* If a base output file is wanted, then this points to it */
PTR base_file;
+
+ /* If non-zero, specifies that branches which are problematic for the
+ MPC860 C0 (or earlier) should be checked for and modified. It gives the
+ number of bytes that should be checked at the end of each text page. */
+ int mpc860c0;
+
+ /* The function to call when the executable or shared object is
+ loaded. */
+ const char *init_function;
+ /* The function to call when the executable or shared object is
+ unloaded. */
+ const char *fini_function;
};
/* This structures holds a set of callback functions. These are
@@ -311,10 +329,13 @@ struct bfd_link_callbacks
/* A function which is called when a relocation is attempted against
an undefined symbol. NAME is the symbol which is undefined.
ABFD, SECTION and ADDRESS identify the location from which the
- reference is made. In some cases SECTION may be NULL. */
+ reference is made. FATAL indicates whether an undefined symbol is
+ a fatal error or not. In some cases SECTION may be NULL. */
boolean (*undefined_symbol) PARAMS ((struct bfd_link_info *,
const char *name, bfd *abfd,
- asection *section, bfd_vma address));
+ asection *section,
+ bfd_vma address,
+ boolean fatal));
/* A function which is called when a reloc overflow occurs. NAME is
the name of the symbol or section the reloc is against,
RELOC_NAME is the name of the relocation, and ADDEND is any
@@ -469,7 +490,9 @@ struct bfd_elf_version_expr
/* Next regular expression for this version. */
struct bfd_elf_version_expr *next;
/* Regular expression. */
- const char *match;
+ const char *pattern;
+ /* Matching function. */
+ int (*match) PARAMS((struct bfd_elf_version_expr *, const char *));
};
/* Version dependencies. */
diff --git a/contrib/binutils/include/bin-bugs.h b/contrib/binutils/include/bin-bugs.h
new file mode 100644
index 0000000..cb14a66
--- /dev/null
+++ b/contrib/binutils/include/bin-bugs.h
@@ -0,0 +1,3 @@
+#ifndef REPORT_BUGS_TO
+#define REPORT_BUGS_TO "bug-gnu-utils@gnu.org"
+#endif
diff --git a/contrib/binutils/include/coff/ChangeLog b/contrib/binutils/include/coff/ChangeLog
index 21ef0bc..76b52c0 100644
--- a/contrib/binutils/include/coff/ChangeLog
+++ b/contrib/binutils/include/coff/ChangeLog
@@ -1,3 +1,107 @@
+2000-03-15 Kazu Hirata <kazu@hxi.com>
+
+ * internal.h: Fix a typo in the comment for R_MOVL2.
+
+2000-02-28 Nick Clifton <nickc@cygnus.com>
+
+ * mipspe.h (MIPS_PE_MAGIC): Define.
+ * sh.h (SH_PE_MAGIC): Define.
+
+2000-02-22 Nick Clifton <nickc@cygnus.com> DJ Delorie <dj@cygnus.com>
+
+ * sh.h: Add Windows CE definitions.
+ * arm.h: Add Windows CE definitions.
+ * mipspe.h: New file: Windows CE definitions for MIPS.
+ * pe.h: Add constants for ILF support.
+
+2000-01-05 Nick Clifton <nickc@cygnus.com>
+
+ * pe.h: Fix formatting of comments.
+ (IMAGE_FILE_AGGRESSIVE_WS_TRIM): Define.
+ (IMAGE_FILE_LARGE_ADDRESS_AWARE): Define.
+ (IMAGE_FILE_16BIT_MACHINE): Define.
+ (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP): Define.
+ (IMAGE_FILE_UP_SYSTEM_ONLY): Define.
+ (IMAGE_FILE_MACHINE_UNKNOWN): Define.
+ (IMAGE_FILE_MACHINE_ALPHA): Define.
+ (IMAGE_FILE_MACHINE_ALPHA64): Define.
+ (IMAGE_FILE_MACHINE_I386): Define.
+ (IMAGE_FILE_MACHINE_IA64): Define.
+ (IMAGE_FILE_MACHINE_M68K): Define.
+ (IMAGE_FILE_MACHINE_MIPS16): Define.
+ (IMAGE_FILE_MACHINE_MIPSFPU): Define.
+ (IMAGE_FILE_MACHINE_MIPSFPU16): Define.
+ (IMAGE_FILE_MACHINE_POWERPC): Define.
+ (IMAGE_FILE_MACHINE_R3000): Define.
+ (IMAGE_FILE_MACHINE_R4000): Define.
+ (IMAGE_FILE_MACHINE_R10000): Define.
+ (IMAGE_FILE_MACHINE_SH3): Define.
+ (IMAGE_FILE_MACHINE_SH4): Define.
+ (IMAGE_FILE_MACHINE_THUMB): Define.
+
+1999-09-20 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * internal.h: Delete bogus R_PCLONG, duplicate R_RELBYTE and
+ R_RELWORD, and rewrite some R_* as decimal.
+
+1999-09-06 Donn Terry <donn@interix.com>
+
+ * internal.h (DTYPE): Define.
+ * pe.h (struct external_PEI_filehdr): Rename from
+ external_PE_filehdr. Define even if COFF_IMAGE_WITH_PE is not
+ defined.
+
+1999-07-17 Nick Clifton <nickc@cygnus.com>
+
+ * arm.h (F_SOFT_FLOAT): Rename from F_SOFTFLOAT.
+
+1999-06-21 Philip Blundell <pb@nexus.co.uk>
+
+ * arm.h (F_SOFTFLOAT): Define.
+
+1999-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * arm.h (F_ARM_5): Define.
+
+Wed Jun 2 18:08:18 1999 Richard Henderson <rth@cygnus.com>
+
+ * internal.h (BEOS_EXE_IMAGE_BASE, BEOS_DLL_IMAGE_BASE): New.
+
+Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
+
+ * coff/arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M,
+ F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish
+ F_ARM_2a, F_ARM_3M, F_ARM_4T.
+
+1999-05-15 Nick Clifton <nickc@cygnus.com>
+
+ * mcore.h (IMAGE_REL_MCORE_RVA): Define.
+
+1999-04-21 Nick Clifton <nickc@cygnus.com>
+
+ * mcore.h (GET_LINENO_LNNO): New macro.
+ (PUT_LINENO_LNNO): New macro.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * mcore.h: New header file. Defines for Motorola's MCore
+ processor.
+
+Sun Dec 6 21:36:37 1998 Mark Elbrecht <snowball3@usa.net>
+
+ * internal.h (C_WEAKEXT): Define.
+
+Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
+
+ * coff/arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
+ Changed values to avoid clashing with IMAGE_FILE_* coff header
+ flag values.
+
+Wed Apr 1 16:06:15 1998 Nick Clifton <nickc@cygnus.com>
+
+ * internal.h: Document numbers associated with Thumb symbol
+ types.
+
Fri Mar 27 17:16:57 1998 Ian Lance Taylor <ian@cygnus.com>
* internal.h (ISPTR, ISFCN, ISARY): Add casts to unsigned long.
@@ -6,6 +110,11 @@ Mon Feb 2 17:10:38 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
* tic30.h: New file.
+Fri Dec 12 11:49:07 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (R_MPPCR15W): New relocation type, for 15 bit PC relative
+ offsets.
+
Tue Dec 2 10:21:40 1997 Nick Clifton <nickc@cygnus.com>
* arm.h (COFFARM): New define.
@@ -18,14 +127,32 @@ Sat Nov 22 15:10:14 1997 Nick Clifton <nickc@cygnus.com>
* arm.h: Add bits to support PIC and APCS-FLOAT type binaries,
when implemented.
+Fri Oct 3 14:25:17 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (R_PPL16B): Make constant uppercase for consistency.
+
Tue Jul 22 18:18:58 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* go32exe.h: New file.
+Tue Jul 8 12:23:55 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_TARGET_ID): Add define.
+ * internal.h (struct internal_filehdr): Add f_target_id field.
+
Tue Jun 3 16:44:18 1997 Nick Clifton <nickc@cygnus.com>
* internal.h: Add storage classes for Thumb symbols
+Mon May 26 14:07:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * tic80.h (R_PPL16B): Correct value.
+
+Sat May 3 08:24:59 1997 Fred Fish <fnf@cygnus.com>
+
+ * internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM):
+ New storage classes for TIc80.
+
Fri Apr 18 11:52:55 1997 Niklas Hallqvist <niklas@appli.se>
* alpha.h (ALPHA_ECOFF_BADMAG): Recognize *BSD/alpha magic too.
@@ -42,6 +169,14 @@ Mon Jan 27 13:34:30 1997 Ian Lance Taylor <ian@cygnus.com>
from here...
* i960.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): ...to here.
+Wed Jan 22 20:10:47 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80MAGIC): Renamed to TIC80_AOUTHDR_MAGIC.
+
+Fri Dec 27 22:05:45 1996 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h: New file for TIc80 support.
+
Thu Dec 19 16:18:11 1996 Ian Lance Taylor <ian@cygnus.com>
* arm.h (_LIT): Define.
diff --git a/contrib/binutils/include/coff/arm.h b/contrib/binutils/include/coff/arm.h
new file mode 100644
index 0000000..7ca9329
--- /dev/null
+++ b/contrib/binutils/include/coff/arm.h
@@ -0,0 +1,303 @@
+/* ARM COFF support for BFD.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define COFFARM 1
+
+/********************** FILE HEADER **********************/
+
+struct external_filehdr
+{
+ char f_magic[2]; /* magic number */
+ char f_nscns[2]; /* number of sections */
+ char f_timdat[4]; /* time & date stamp */
+ char f_symptr[4]; /* file pointer to symtab */
+ char f_nsyms[4]; /* number of symtab entries */
+ char f_opthdr[2]; /* sizeof(optional hdr) */
+ char f_flags[2]; /* flags */
+};
+
+/* Bits for f_flags:
+ * F_RELFLG relocation info stripped from file
+ * F_EXEC file is executable (no unresolved external references)
+ * F_LNNO line numbers stripped from file
+ * F_LSYMS local symbols stripped from file
+ * F_INTERWORK file supports switching between ARM and Thumb instruction sets
+ * F_INTERWORK_SET the F_INTERWORK bit is valid
+ * F_APCS_FLOAT code passes float arguments in float registers
+ * F_PIC code is reentrant/position-independent
+ * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
+ * F_APCS_26 file uses 26 bit ARM Procedure Calling Standard
+ * F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
+ * F_SOFT_FLOAT code does not use floating point instructions
+ */
+
+#define F_RELFLG (0x0001)
+#define F_EXEC (0x0002)
+#define F_LNNO (0x0004)
+#define F_LSYMS (0x0008)
+#define F_INTERWORK (0x0010)
+#define F_INTERWORK_SET (0x0020)
+#define F_APCS_FLOAT (0x0040)
+#undef F_AR16WR
+#define F_PIC (0x0080)
+#define F_AR32WR (0x0100)
+#define F_APCS_26 (0x0400)
+#define F_APCS_SET (0x0800)
+#define F_SOFT_FLOAT (0x2000)
+
+/* Bits stored in flags field of the internal_f structure */
+
+#define F_INTERWORK (0x0010)
+#define F_APCS_FLOAT (0x0040)
+#define F_PIC (0x0080)
+#define F_APCS26 (0x1000)
+#define F_ARM_ARCHITECTURE_MASK (0x4000+0x0800+0x0400)
+#define F_ARM_2 (0x0400)
+#define F_ARM_2a (0x0800)
+#define F_ARM_3 (0x0c00)
+#define F_ARM_3M (0x4000)
+#define F_ARM_4 (0x4400)
+#define F_ARM_4T (0x4800)
+#define F_ARM_5 (0x4c00)
+
+/*
+ * ARMMAGIC ought to encoded the procesor type,
+ * but it is too late to change it now, instead
+ * the flags field of the internal_f structure
+ * is used as shown above.
+ *
+ * XXX - NC 5/6/97
+ */
+
+#define ARMMAGIC 0xa00 /* I just made this up */
+
+#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC))
+
+#define ARMPEMAGIC 0x1c0
+#define THUMBPEMAGIC 0x1c2
+
+#undef ARMBADMAG
+#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
+
+#define FILHDR struct external_filehdr
+#define FILHSZ 20
+
+
+/********************** AOUT "OPTIONAL HEADER" **********************/
+
+
+typedef struct
+{
+ char magic[2]; /* type of file */
+ char vstamp[2]; /* version stamp */
+ char tsize[4]; /* text size in bytes, padded to FW bdry*/
+ char dsize[4]; /* initialized data " " */
+ char bsize[4]; /* uninitialized data " " */
+ char entry[4]; /* entry pt. */
+ char text_start[4]; /* base of text used for this file */
+ char data_start[4]; /* base of data used for this file */
+}
+AOUTHDR;
+
+
+#define AOUTSZ 28
+#define AOUTHDRSZ 28
+
+#define OMAGIC 0404 /* object files, eg as output */
+#define ZMAGIC 0413 /* demand load format, eg normal ld output */
+#define STMAGIC 0401 /* target shlib */
+#define SHMAGIC 0443 /* host shlib */
+
+
+/* define some NT default values */
+/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
+#define NT_SECTION_ALIGNMENT 0x1000
+#define NT_FILE_ALIGNMENT 0x200
+#define NT_DEF_RESERVE 0x100000
+#define NT_DEF_COMMIT 0x1000
+
+/********************** SECTION HEADER **********************/
+struct external_scnhdr
+{
+ char s_name[8]; /* section name */
+ char s_paddr[4]; /* physical address, aliased s_nlib */
+ char s_vaddr[4]; /* virtual address */
+ char s_size[4]; /* section size */
+ char s_scnptr[4]; /* file ptr to raw data for section */
+ char s_relptr[4]; /* file ptr to relocation */
+ char s_lnnoptr[4]; /* file ptr to line numbers */
+ char s_nreloc[2]; /* number of relocation entries */
+ char s_nlnno[2]; /* number of line number entries*/
+ char s_flags[4]; /* flags */
+};
+
+#define SCNHDR struct external_scnhdr
+#define SCNHSZ 40
+
+/*
+ * names of "special" sections
+ */
+#define _TEXT ".text"
+#define _DATA ".data"
+#define _BSS ".bss"
+#define _COMMENT ".comment"
+#define _LIB ".lib"
+
+/* We use the .rdata section to hold read only data. */
+#define _LIT ".rdata"
+
+/********************** LINE NUMBERS **********************/
+
+/* 1 line number entry for every "breakpointable" source line in a section.
+ * Line numbers are grouped on a per function basis; first entry in a function
+ * grouping will have l_lnno = 0 and in place of physical address will be the
+ * symbol table index of the function name.
+ */
+struct external_lineno
+{
+ union
+ {
+ char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
+ char l_paddr[4]; /* (physical) address of line number */
+ } l_addr;
+ char l_lnno[2]; /* line number */
+};
+
+
+#define LINENO struct external_lineno
+#define LINESZ 6
+
+
+/********************** SYMBOLS **********************/
+
+#define E_SYMNMLEN 8 /* # characters in a symbol name */
+#define E_FILNMLEN 14 /* # characters in a file name */
+#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
+
+struct external_syment
+{
+ union
+ {
+ char e_name[E_SYMNMLEN];
+ struct
+ {
+ char e_zeroes[4];
+ char e_offset[4];
+ } e;
+ } e;
+ char e_value[4];
+ char e_scnum[2];
+ char e_type[2];
+ char e_sclass[1];
+ char e_numaux[1];
+};
+
+#define N_BTMASK (0xf)
+#define N_TMASK (0x30)
+#define N_BTSHFT (4)
+#define N_TSHIFT (2)
+
+union external_auxent
+{
+ struct
+ {
+ char x_tagndx[4]; /* str, un, or enum tag indx */
+ union
+ {
+ struct
+ {
+ char x_lnno[2]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ } x_lnsz;
+ char x_fsize[4]; /* size of function */
+ } x_misc;
+ union
+ {
+ struct /* if ISFCN, tag, or .bb */
+ {
+ char x_lnnoptr[4]; /* ptr to fcn line # */
+ char x_endndx[4]; /* entry ndx past block end */
+ } x_fcn;
+ struct /* if ISARY, up to 4 dimen. */
+ {
+ char x_dimen[E_DIMNUM][2];
+ } x_ary;
+ } x_fcnary;
+ char x_tvndx[2]; /* tv index */
+ } x_sym;
+
+ union
+ {
+ char x_fname[E_FILNMLEN];
+ struct
+ {
+ char x_zeroes[4];
+ char x_offset[4];
+ } x_n;
+ } x_file;
+
+ struct
+ {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+ char x_checksum[4]; /* section COMDAT checksum */
+ char x_associated[2]; /* COMDAT associated section index */
+ char x_comdat[1]; /* COMDAT selection number */
+ } x_scn;
+
+ struct
+ {
+ char x_tvfill[4]; /* tv fill value */
+ char x_tvlen[2]; /* length of .tv */
+ char x_tvran[2][2]; /* tv range */
+ } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
+};
+
+#define SYMENT struct external_syment
+#define SYMESZ 18
+#define AUXENT union external_auxent
+#define AUXESZ 18
+
+#define _ETEXT "etext"
+
+/********************** RELOCATION DIRECTIVES **********************/
+#ifdef ARM_WINCE
+struct external_reloc
+{
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_type[2];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 10
+
+#else
+struct external_reloc
+{
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_type[2];
+ char r_offset[4];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 14
+#endif
diff --git a/contrib/binutils/include/coff/internal.h b/contrib/binutils/include/coff/internal.h
index d873f28..e89b528 100644
--- a/contrib/binutils/include/coff/internal.h
+++ b/contrib/binutils/include/coff/internal.h
@@ -53,6 +53,7 @@ struct internal_filehdr
long f_nsyms; /* number of symtab entries */
unsigned short f_opthdr; /* sizeof(optional hdr) */
unsigned short f_flags; /* flags */
+ unsigned short f_target_id; /* (TIc80 specific) */
};
@@ -88,10 +89,14 @@ typedef struct _IMAGE_DATA_DIRECTORY
} IMAGE_DATA_DIRECTORY;
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
-/* default image base for NT */
+/* Default image base for NT. */
#define NT_EXE_IMAGE_BASE 0x400000
#define NT_DLL_IMAGE_BASE 0x10000000
+/* Default image base for BeOS. */
+#define BEOS_EXE_IMAGE_BASE 0x80000000
+#define BEOS_DLL_IMAGE_BASE 0x10000000
+
/* Extra stuff in a PE aouthdr */
#define PE_DEF_SECTION_ALIGNMENT 0x1000
@@ -215,6 +220,13 @@ struct internal_aouthdr
#define C_ALIAS 105 /* duplicate tag */
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
+#define C_WEAKEXT 127 /* weak symbol -- GNU extension */
+
+/* New storage classes for TIc80 */
+#define C_UEXT 19 /* Tentative external definition */
+#define C_STATLAB 20 /* Static load time label */
+#define C_EXTLAB 21 /* External load time label */
+#define C_SYSTEM 23 /* System Wide variable */
/* New storage classes for WINDOWS_NT */
#define C_SECTION 104 /* section name */
@@ -260,11 +272,11 @@ struct internal_aouthdr
#define C_ESTAT (0x90)
/* Storage classes for Thumb symbols */
-#define C_THUMBEXT (128 + C_EXT)
-#define C_THUMBSTAT (128 + C_STAT)
-#define C_THUMBLABEL (128 + C_LABEL)
-#define C_THUMBEXTFUNC (C_THUMBEXT + 20)
-#define C_THUMBSTATFUNC (C_THUMBSTAT + 20)
+#define C_THUMBEXT (128 + C_EXT) /* 130 */
+#define C_THUMBSTAT (128 + C_STAT) /* 131 */
+#define C_THUMBLABEL (128 + C_LABEL) /* 134 */
+#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */
+#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */
/********************** SECTION HEADER **********************/
@@ -409,6 +421,7 @@ struct internal_syment
#define DT_ARY (3) /* array */
#define BTYPE(x) ((x) & N_BTMASK)
+#define DTYPE(x) (((x) & N_TMASK) >> N_BTSHFT)
#define ISPTR(x) \
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT))
@@ -577,33 +590,28 @@ struct internal_reloc
unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */
};
-#define R_RELBYTE 017
-#define R_RELWORD 020
-#define R_PCRBYTE 022
-#define R_PCRWORD 023
-#define R_PCRLONG 024
-
-#define R_DIR16 01
-#define R_DIR32 06
-#define R_PCLONG 020
-#define R_RELBYTE 017
-#define R_RELWORD 020
-#define R_IMAGEBASE 07
-
-
-#define R_PCR16L 128
-#define R_PCR26L 129
-#define R_VRT16 130
-#define R_HVRT16 131
-#define R_LVRT16 132
-#define R_VRT32 133
-#define R_RELLONG (0x11) /* Direct 32-bit relocation */
-#define R_IPRSHORT (0x18)
-#define R_IPRLONG (0x1a)
-#define R_GETSEG (0x1d)
-#define R_GETPA (0x1e)
-#define R_TAGWORD (0x1f)
-#define R_JUMPTARG 0x20 /* strange 29k 00xx00xx reloc */
+#define R_DIR16 1
+#define R_DIR32 6
+#define R_IMAGEBASE 7
+#define R_RELBYTE 15
+#define R_RELWORD 16
+#define R_RELLONG 17
+#define R_PCRBYTE 18
+#define R_PCRWORD 19
+#define R_PCRLONG 20
+#define R_IPRSHORT 24
+#define R_IPRLONG 26
+#define R_GETSEG 29
+#define R_GETPA 30
+#define R_TAGWORD 31
+#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */
+
+#define R_PCR16L 128
+#define R_PCR26L 129
+#define R_VRT16 130
+#define R_HVRT16 131
+#define R_LVRT16 132
+#define R_VRT32 133
/* This reloc identifies mov.b instructions with a 16bit absolute
@@ -663,7 +671,7 @@ struct internal_reloc
#define R_MOVL1 0x4c
/* This reloc identifies mov.[wl] insns which formerlly had
- a 32/24bit absolute address and how have a 16bit absolute address. */
+ a 32/24bit absolute address and now have a 16bit absolute address. */
#define R_MOVL2 0x4d
/* This reloc identifies a bCC:8 which will have it's condition
diff --git a/contrib/binutils/include/coff/pe.h b/contrib/binutils/include/coff/pe.h
index 7e676a5..6932ee8 100644
--- a/contrib/binutils/include/coff/pe.h
+++ b/contrib/binutils/include/coff/pe.h
@@ -3,29 +3,32 @@
#ifndef _PE_H
#define _PE_H
-/* NT specific file attributes */
+/* NT specific file attributes. */
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
+#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010
+#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020
+#define IMAGE_FILE_16BIT_MACHINE 0x0040
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
#define IMAGE_FILE_32BIT_MACHINE 0x0100
#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
+#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
#define IMAGE_FILE_SYSTEM 0x1000
#define IMAGE_FILE_DLL 0x2000
+#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
-/* additional flags to be set for section headers to allow the NT loader to
+/* Additional flags to be set for section headers to allow the NT loader to
read and write to the section data (to replace the addresses of data in
- dlls for one thing); also to execute the section in .text's case */
+ dlls for one thing); also to execute the section in .text's case. */
#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
#define IMAGE_SCN_MEM_EXECUTE 0x20000000
#define IMAGE_SCN_MEM_READ 0x40000000
#define IMAGE_SCN_MEM_WRITE 0x80000000
-/*
- * Section characteristics added for ppc-nt
- */
+/* Section characteristics added for ppc-nt. */
#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */
@@ -53,7 +56,6 @@
#define IMAGE_SCN_ALIGN_32BYTES 0x00600000
#define IMAGE_SCN_ALIGN_64BYTES 0x00700000
-
#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */
#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */
#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */
@@ -67,6 +69,26 @@
#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */
#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */
+/* Machine numbers. */
+
+#define IMAGE_FILE_MACHINE_UNKNOWN 0x0
+#define IMAGE_FILE_MACHINE_ALPHA 0x184
+#define IMAGE_FILE_MACHINE_ARM 0x1c0
+#define IMAGE_FILE_MACHINE_ALPHA64 0x284
+#define IMAGE_FILE_MACHINE_I386 0x14c
+#define IMAGE_FILE_MACHINE_IA64 0x200
+#define IMAGE_FILE_MACHINE_M68K 0x268
+#define IMAGE_FILE_MACHINE_MIPS16 0x266
+#define IMAGE_FILE_MACHINE_MIPSFPU 0x366
+#define IMAGE_FILE_MACHINE_MIPSFPU16 0x466
+#define IMAGE_FILE_MACHINE_POWERPC 0x1f0
+#define IMAGE_FILE_MACHINE_R3000 0x162
+#define IMAGE_FILE_MACHINE_R4000 0x166
+#define IMAGE_FILE_MACHINE_R10000 0x168
+#define IMAGE_FILE_MACHINE_SH3 0x1a2
+#define IMAGE_FILE_MACHINE_SH4 0x1a6
+#define IMAGE_FILE_MACHINE_THUMB 0x1c2
+
/* Magic values that are true for all dos/nt implementations */
#define DOSMAGIC 0x5a4d
#define NT_SIGNATURE 0x00004550
@@ -76,12 +98,7 @@
#undef FILNMLEN
#define FILNMLEN 18 /* # characters in a file name */
-
-#ifdef COFF_IMAGE_WITH_PE
-/* The filehdr is only weired in images */
-
-#undef FILHDR
-struct external_PE_filehdr
+struct external_PEI_filehdr
{
/* DOS header fields */
char e_magic[2]; /* Magic number, 0x5a4d */
@@ -108,7 +125,6 @@ struct external_PE_filehdr
/* From standard header */
-
char f_magic[2]; /* magic number */
char f_nscns[2]; /* number of sections */
char f_timdat[4]; /* time & date stamp */
@@ -119,12 +135,16 @@ struct external_PE_filehdr
};
+#ifdef COFF_IMAGE_WITH_PE
+
+/* The filehdr is only weird in images. */
-#define FILHDR struct external_PE_filehdr
-#undef FILHSZ
+#undef FILHDR
+#define FILHDR struct external_PEI_filehdr
+#undef FILHSZ
#define FILHSZ 152
-#endif
+#endif /* COFF_IMAGE_WITH_PE */
typedef struct
{
@@ -163,7 +183,16 @@ typedef struct
#undef E_FILNMLEN
#define E_FILNMLEN 18 /* # characters in a file name */
-#endif
+/* Import Tyoes fot ILF format object files.. */
+#define IMPORT_CODE 0
+#define IMPORT_DATA 1
+#define IMPORT_CONST 2
+/* Import Name Tyoes for ILF format object files. */
+#define IMPORT_ORDINAL 0
+#define IMPORT_NAME 1
+#define IMPORT_NAME_NOPREFIX 2
+#define IMPORT_NAME_UNDECORATE 3
+#endif /* _PE_H */
diff --git a/contrib/binutils/include/coff/powerpc.h b/contrib/binutils/include/coff/powerpc.h
new file mode 100644
index 0000000..9552cf9
--- /dev/null
+++ b/contrib/binutils/include/coff/powerpc.h
@@ -0,0 +1,199 @@
+/* Basic coff information for the PowerPC
+ *
+ * Based on coff/rs6000.h, coff/i386.h and others.
+ *
+ * Initial release: Kim Knuttila (krk@cygnus.com)
+ */
+
+/********************** FILE HEADER **********************/
+
+struct external_filehdr {
+ char f_magic[2]; /* magic number */
+ char f_nscns[2]; /* number of sections */
+ char f_timdat[4]; /* time & date stamp */
+ char f_symptr[4]; /* file pointer to symtab */
+ char f_nsyms[4]; /* number of symtab entries */
+ char f_opthdr[2]; /* sizeof(optional hdr) */
+ char f_flags[2]; /* flags */
+};
+
+#define FILHDR struct external_filehdr
+#define FILHSZ 20
+
+/* Bits for f_flags:
+ * F_RELFLG relocation info stripped from file
+ * F_EXEC file is executable (no unresolved external references)
+ * F_LNNO line numbers stripped from file
+ * F_LSYMS local symbols stripped from file
+ * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
+ */
+
+#define F_RELFLG (0x0001)
+#define F_EXEC (0x0002)
+#define F_LNNO (0x0004)
+#define F_LSYMS (0x0008)
+
+/* extra NT defines */
+#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
+#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
+#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
+
+/* from winnt.h */
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
+
+#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
+
+/********************** AOUT "OPTIONAL HEADER" **********************/
+
+typedef struct
+{
+ char magic[2]; /* type of file */
+ char vstamp[2]; /* version stamp */
+ char tsize[4]; /* text size in bytes, padded to FW bdry*/
+ char dsize[4]; /* initialized data " " */
+ char bsize[4]; /* uninitialized data " " */
+ char entry[4]; /* entry pt. */
+ char text_start[4]; /* base of text used for this file */
+ char data_start[4]; /* base of data used for this file */
+}
+AOUTHDR;
+
+#define AOUTSZ 28
+#define AOUTHDRSZ 28
+
+/********************** SECTION HEADER **********************/
+
+struct external_scnhdr {
+ char s_name[8]; /* section name */
+ char s_paddr[4]; /* physical address, aliased s_nlib */
+ char s_vaddr[4]; /* virtual address */
+ char s_size[4]; /* section size */
+ char s_scnptr[4]; /* file ptr to raw data for section */
+ char s_relptr[4]; /* file ptr to relocation */
+ char s_lnnoptr[4]; /* file ptr to line numbers */
+ char s_nreloc[2]; /* number of relocation entries */
+ char s_nlnno[2]; /* number of line number entries */
+ char s_flags[4]; /* flags */
+};
+
+#define SCNHDR struct external_scnhdr
+#define SCNHSZ 40
+
+/*
+ * names of "special" sections
+ */
+#define _TEXT ".text"
+#define _DATA ".data"
+#define _BSS ".bss"
+#define _COMMENT ".comment"
+#define _LIB ".lib"
+
+/********************** LINE NUMBERS **********************/
+
+/* 1 line number entry for every "breakpointable" source line in a section.
+ * Line numbers are grouped on a per function basis; first entry in a function
+ * grouping will have l_lnno = 0 and in place of physical address will be the
+ * symbol table index of the function name.
+ */
+struct external_lineno {
+ union {
+ char l_symndx[4]; /* function name symbol index, iff l_lnno == 0 */
+ char l_paddr[4]; /* (physical) address of line number */
+ } l_addr;
+ char l_lnno[2]; /* line number */
+};
+
+#define LINENO struct external_lineno
+#define LINESZ 6
+
+/********************** SYMBOLS **********************/
+
+#define E_SYMNMLEN 8 /* # characters in a symbol name */
+
+/* Allow the file name length to be overridden in the including file */
+#ifndef E_FILNMLEN
+#define E_FILNMLEN 14
+#endif
+
+#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
+
+struct external_syment
+{
+ union {
+ char e_name[E_SYMNMLEN];
+ struct {
+ char e_zeroes[4];
+ char e_offset[4];
+ } e;
+ } e;
+ char e_value[4];
+ char e_scnum[2];
+ char e_type[2];
+ char e_sclass[1];
+ char e_numaux[1];
+};
+
+#define SYMENT struct external_syment
+#define SYMESZ 18
+
+#define N_BTMASK (0xf)
+#define N_TMASK (0x30)
+#define N_BTSHFT (4)
+#define N_TSHIFT (2)
+
+union external_auxent {
+ struct {
+ char x_tagndx[4]; /* str, un, or enum tag indx */
+ union {
+ struct {
+ char x_lnno[2]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ } x_lnsz;
+ char x_fsize[4]; /* size of function */
+ } x_misc;
+ union {
+ struct { /* if ISFCN, tag, or .bb */
+ char x_lnnoptr[4]; /* ptr to fcn line # */
+ char x_endndx[4]; /* entry ndx past block end */
+ } x_fcn;
+ struct { /* if ISARY, up to 4 dimen. */
+ char x_dimen[E_DIMNUM][2];
+ } x_ary;
+ } x_fcnary;
+ char x_tvndx[2]; /* tv index */
+ } x_sym;
+
+ union {
+ char x_fname[E_FILNMLEN];
+ struct {
+ char x_zeroes[4];
+ char x_offset[4];
+ } x_n;
+ } x_file;
+
+ struct {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+ char x_checksum[4]; /* section COMDAT checksum */
+ char x_associated[2]; /* COMDAT associated section index */
+ char x_comdat[1]; /* COMDAT selection number */
+ } x_scn;
+};
+
+#define AUXENT union external_auxent
+#define AUXESZ 18
+
+#define _ETEXT "etext"
+
+/********************** RELOCATION DIRECTIVES **********************/
+
+struct external_reloc {
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_type[2];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 10
+
diff --git a/contrib/binutils/include/coff/sh.h b/contrib/binutils/include/coff/sh.h
index 41957df..f7271f2 100644
--- a/contrib/binutils/include/coff/sh.h
+++ b/contrib/binutils/include/coff/sh.h
@@ -16,10 +16,13 @@ struct external_filehdr {
#define SH_ARCH_MAGIC_BIG 0x0500
#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
+#define SH_ARCH_MAGIC_WINCE 0x01a2 /* Windows CE - little endian */
+#define SH_PE_MAGIC 0x010b
#define SHBADMAG(x) \
(((x).f_magic!=SH_ARCH_MAGIC_BIG) && \
+ ((x).f_magic!=SH_ARCH_MAGIC_WINCE) && \
((x).f_magic!=SH_ARCH_MAGIC_LITTLE))
#define FILHDR struct external_filehdr
@@ -48,6 +51,12 @@ AOUTHDR;
+/* Define some NT default values. */
+/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
+#define NT_SECTION_ALIGNMENT 0x1000
+#define NT_FILE_ALIGNMENT 0x200
+#define NT_DEF_RESERVE 0x100000
+#define NT_DEF_COMMIT 0x1000
/********************** SECTION HEADER **********************/
@@ -89,14 +98,26 @@ struct external_lineno {
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
char l_paddr[4]; /* (physical) address of line number */
} l_addr;
+#ifdef COFF_WITH_PE
+ char l_lnno[2]; /* line number */
+#else
char l_lnno[4]; /* line number */
+#endif
};
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
#define LINENO struct external_lineno
+#ifdef COFF_WITH_PE
+#define LINESZ 6
+#undef GET_LINENO_LNNO
+#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
+#undef PUT_LINENO_LNNO
+#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
+#else
#define LINESZ 8
+#endif
/********************** SYMBOLS **********************/
@@ -163,6 +184,9 @@ union external_auxent {
char x_scnlen[4]; /* section length */
char x_nreloc[2]; /* # relocation entries */
char x_nlinno[2]; /* # line numbers */
+ char x_checksum[4]; /* section COMDAT checksum */
+ char x_associated[2]; /* COMDAT associated section index */
+ char x_comdat[1]; /* COMDAT selection number */
} x_scn;
struct {
@@ -187,6 +211,7 @@ union external_auxent {
types on the h8 don't have room in the instruction for the entire
offset - eg the strange jump and high page addressing modes */
+#ifndef COFF_WITH_PE
struct external_reloc {
char r_vaddr[4];
char r_symndx[4];
@@ -194,14 +219,26 @@ struct external_reloc {
char r_type[2];
char r_stuff[2];
};
+#else
+struct external_reloc {
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_type[2];
+};
+#endif
#define RELOC struct external_reloc
+#ifdef COFF_WITH_PE
+#define RELSZ 10
+#else
#define RELSZ 16
+#endif
/* SH relocation types. Not all of these are actually used. */
#define R_SH_UNUSED 0 /* only used internally */
+#define R_SH_IMM32CE 2 /* 32 bit immediate for WinCE */
#define R_SH_PCREL8 3 /* 8 bit pcrel */
#define R_SH_PCREL16 4 /* 16 bit pcrel */
#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */
@@ -213,6 +250,7 @@ struct external_reloc {
#define R_SH_PCDISP 12 /* 12 bit branch */
#define R_SH_IMM32 14 /* 32 bit immediate */
#define R_SH_IMM8 16 /* 8 bit immediate */
+#define R_SH_IMAGEBASE 16 /* Windows CE */
#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */
#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */
#define R_SH_IMM4 19 /* 4 bit immediate */
diff --git a/contrib/binutils/include/coff/sparc.h b/contrib/binutils/include/coff/sparc.h
new file mode 100644
index 0000000..82a24f0
--- /dev/null
+++ b/contrib/binutils/include/coff/sparc.h
@@ -0,0 +1,210 @@
+/*** coff information for Sparc. */
+
+/* This file is an amalgamation of several standard include files that
+ define coff format, such as filehdr.h, aouthdr.h, and so forth. In
+ addition, all datatypes have been translated into character arrays of
+ (presumed) equivalent size. This is necessary so that this file can
+ be used with different systems while still yielding the same results. */
+
+/********************** FILE HEADER **********************/
+
+struct external_filehdr
+{
+ char f_magic[2]; /* magic number */
+ char f_nscns[2]; /* number of sections */
+ char f_timdat[4]; /* time & date stamp */
+ char f_symptr[4]; /* file pointer to symtab */
+ char f_nsyms[4]; /* number of symtab entries */
+ char f_opthdr[2]; /* sizeof(optional hdr) */
+ char f_flags[2]; /* flags */
+};
+
+#define F_RELFLG (0x0001) /* relocation info stripped */
+#define F_EXEC (0x0002) /* file is executable */
+#define F_LNNO (0x0004) /* line numbers stripped */
+#define F_LSYMS (0x0008) /* local symbols stripped */
+
+#define SPARCMAGIC (0540)
+
+/* This is Lynx's all-platform magic number for executables. */
+
+#define LYNXCOFFMAGIC (0415)
+
+#define FILHDR struct external_filehdr
+#define FILHSZ 20
+
+/********************** AOUT "OPTIONAL HEADER" **********************/
+
+typedef struct
+{
+ char magic[2]; /* type of file */
+ char vstamp[2]; /* version stamp */
+ char tsize[4]; /* text size in bytes, padded to FW bdry*/
+ char dsize[4]; /* initialized data " " */
+ char bsize[4]; /* uninitialized data " " */
+ char entry[4]; /* entry pt. */
+ char text_start[4]; /* base of text used for this file */
+ char data_start[4]; /* base of data used for this file */
+}
+AOUTHDR;
+
+#define AOUTSZ 28
+#define AOUTHDRSZ 28
+
+#define OMAGIC 0404 /* object files, eg as output */
+#define ZMAGIC 0413 /* demand load format, eg normal ld output */
+#define STMAGIC 0401 /* target shlib */
+#define SHMAGIC 0443 /* host shlib */
+
+/********************** SECTION HEADER **********************/
+
+struct external_scnhdr
+{
+ char s_name[8]; /* section name */
+ char s_paddr[4]; /* physical address, aliased s_nlib */
+ char s_vaddr[4]; /* virtual address */
+ char s_size[4]; /* section size */
+ char s_scnptr[4]; /* file ptr to raw data for section */
+ char s_relptr[4]; /* file ptr to relocation */
+ char s_lnnoptr[4]; /* file ptr to line numbers */
+ char s_nreloc[2]; /* number of relocation entries */
+ char s_nlnno[2]; /* number of line number entries*/
+ char s_flags[4]; /* flags */
+};
+
+#define SCNHDR struct external_scnhdr
+#define SCNHSZ 40
+
+/* Names of "special" sections. */
+
+#define _TEXT ".text"
+#define _DATA ".data"
+#define _BSS ".bss"
+#define _TV ".tv"
+#define _INIT ".init"
+#define _FINI ".fini"
+#define _COMMENT ".comment"
+#define _LIB ".lib"
+
+/********************** LINE NUMBERS **********************/
+
+/* 1 line number entry for every "breakpointable" source line in a section.
+ Line numbers are grouped on a per function basis; first entry in a function
+ grouping will have l_lnno = 0 and in place of physical address will be the
+ symbol table index of the function name. */
+
+struct external_lineno
+{
+ union {
+ char l_symndx[4]; /* fn name symbol index, iff l_lnno == 0 */
+ char l_paddr[4]; /* (physical) address of line number */
+ } l_addr;
+ char l_lnno[2]; /* line number */
+};
+
+#define LINENO struct external_lineno
+#define LINESZ (6)
+
+/********************** SYMBOLS **********************/
+
+#define E_SYMNMLEN (8) /* # characters in a symbol name */
+#define E_FILNMLEN (14) /* # characters in a file name */
+#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */
+
+struct external_syment
+{
+ union {
+ char e_name[E_SYMNMLEN];
+ struct {
+ char e_zeroes[4];
+ char e_offset[4];
+ } e;
+#if 0 /* of doubtful value */
+ char e_nptr[2][4];
+ struct {
+ char e_leading_zero[1];
+ char e_dbx_type[1];
+ char e_dbx_desc[2];
+ } e_dbx;
+#endif
+ } e;
+
+ char e_value[4];
+ char e_scnum[2];
+ char e_type[2];
+ char e_sclass[1];
+ char e_numaux[1];
+ char padding[2];
+};
+
+#define N_BTMASK (0xf)
+#define N_TMASK (0x30)
+#define N_BTSHFT (4)
+#define N_TSHIFT (2)
+
+union external_auxent
+{
+ struct {
+ char x_tagndx[4]; /* str, un, or enum tag indx */
+ union {
+ struct {
+ char x_lnno[2]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ } x_lnsz;
+ char x_fsize[4]; /* size of function */
+ } x_misc;
+ union {
+ struct { /* if ISFCN, tag, or .bb */
+ char x_lnnoptr[4]; /* ptr to fcn line # */
+ char x_endndx[4]; /* entry ndx past block end */
+ } x_fcn;
+ struct { /* if ISARY, up to 4 dimen. */
+ char x_dimen[E_DIMNUM][2];
+ } x_ary;
+ } x_fcnary;
+ char x_tvndx[2]; /* tv index */
+ } x_sym;
+
+ union {
+ char x_fname[E_FILNMLEN];
+ struct {
+ char x_zeroes[4];
+ char x_offset[4];
+ } x_n;
+ } x_file;
+
+ struct {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+ } x_scn;
+
+ struct {
+ char x_tvfill[4]; /* tv fill value */
+ char x_tvlen[2]; /* length of .tv */
+ char x_tvran[2][2]; /* tv range */
+ } x_tv; /* .tv section info (in auxent of sym .tv)) */
+
+ char x_fill[20]; /* forces to 20-byte size */
+};
+
+#define SYMENT struct external_syment
+#define SYMESZ 20
+#define AUXENT union external_auxent
+#define AUXESZ 20
+
+#define _ETEXT "etext"
+
+/********************** RELOCATION DIRECTIVES **********************/
+
+struct external_reloc {
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_type[2];
+ char r_spare[2];
+ char r_offset[4];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 16
+
diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h
index 00f6a0c..63fe5e2 100644
--- a/contrib/binutils/include/demangle.h
+++ b/contrib/binutils/include/demangle.h
@@ -20,12 +20,7 @@
#if !defined (DEMANGLE_H)
#define DEMANGLE_H
-#ifdef IN_GCC
-#include "gansidecl.h"
-#define PARAMS(ARGS) PROTO(ARGS)
-#else /* ! IN_GCC */
#include <ansidecl.h>
-#endif /* IN_GCC */
/* Options passed to cplus_demangle (in 2nd parameter). */
@@ -38,8 +33,12 @@
#define DMGL_GNU (1 << 9)
#define DMGL_LUCID (1 << 10)
#define DMGL_ARM (1 << 11)
+#define DMGL_HP (1 << 12) /* For the HP aCC compiler; same as ARM
+ except for template arguments, etc. */
+#define DMGL_EDG (1 << 13)
+
/* If none of these are set, use 'current_demangling_style' as the default. */
-#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM)
+#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG)
/* Enumeration of possible demangling styles.
@@ -55,7 +54,9 @@ extern enum demangling_styles
auto_demangling = DMGL_AUTO,
gnu_demangling = DMGL_GNU,
lucid_demangling = DMGL_LUCID,
- arm_demangling = DMGL_ARM
+ arm_demangling = DMGL_ARM,
+ hp_demangling = DMGL_HP,
+ edg_demangling = DMGL_EDG
} current_demangling_style;
/* Define string names for the various demangling styles. */
@@ -64,6 +65,8 @@ extern enum demangling_styles
#define GNU_DEMANGLING_STYLE_STRING "gnu"
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
#define ARM_DEMANGLING_STYLE_STRING "arm"
+#define HP_DEMANGLING_STYLE_STRING "hp"
+#define EDG_DEMANGLING_STYLE_STRING "edg"
/* Some macros to test what demangling style is active. */
@@ -71,7 +74,9 @@ extern enum demangling_styles
#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
-#define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM)
+#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
+#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
+#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
extern char *
cplus_demangle PARAMS ((const char *mangled, int options));
diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h
index bd7e478..6e6c04b 100644
--- a/contrib/binutils/include/dis-asm.h
+++ b/contrib/binutils/include/dis-asm.h
@@ -9,10 +9,14 @@
#ifndef DIS_ASM_H
#define DIS_ASM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdio.h>
#include "bfd.h"
-typedef int (*fprintf_ftype) PARAMS((FILE*, const char*, ...));
+typedef int (*fprintf_ftype) PARAMS((PTR, const char*, ...));
enum dis_insn_type {
dis_noninsn, /* Not a valid instruction */
@@ -37,7 +41,7 @@ enum dis_insn_type {
typedef struct disassemble_info {
fprintf_ftype fprintf_func;
- FILE *stream;
+ PTR stream;
PTR application_data;
/* Target description. We could replace this with a pointer to the bfd,
@@ -74,7 +78,7 @@ typedef struct disassemble_info {
INFO is a pointer to this struct.
Returns an errno value or 0 for success. */
int (*read_memory_func)
- PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
+ PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
struct disassemble_info *info));
/* Function which should be called if we get an error that we can't
@@ -101,7 +105,7 @@ typedef struct disassemble_info {
/* These are for buffer_read_memory. */
bfd_byte *buffer;
bfd_vma buffer_vma;
- int buffer_length;
+ unsigned int buffer_length;
/* This variable may be set by the instruction decoder. It suggests
the number of bytes objdump should display on a single line. If
@@ -117,6 +121,11 @@ typedef struct disassemble_info {
int bytes_per_chunk;
enum bfd_endian display_endian;
+ /* Number of octets per incremented target address
+ Normally one, but some DSPs have byte sizes of 16 or 32 bits
+ */
+ unsigned int octets_per_byte;
+
/* Results from instruction decoders. Not all decoders yet support
this information. This info is set each time an instruction is
decoded, and is only valid for the last such instruction.
@@ -133,6 +142,9 @@ typedef struct disassemble_info {
zero if unknown. */
bfd_vma target2; /* Second target address for dref2 */
+ /* Command line options specific to the target disassembler. */
+ char * disassembler_options;
+
} disassemble_info;
@@ -143,7 +155,9 @@ typedef int (*disassembler_ftype)
extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
@@ -162,8 +176,10 @@ extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m32r PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_mcore PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
@@ -172,12 +188,26 @@ extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
+
+extern void print_arm_disassembler_options PARAMS ((FILE *));
+extern void parse_arm_disassembler_option PARAMS ((char *));
+extern int get_arm_regname_num_options PARAMS ((void));
+extern int set_arm_regname_option PARAMS ((int));
+extern int get_arm_regnames PARAMS ((int, const char **, const char **, const char ***));
/* Fetch the disassembler for a given BFD, if that support is available. */
extern disassembler_ftype disassembler PARAMS ((bfd *));
+/* Document any target specific options available from the disassembler. */
+extern void disassembler_usage PARAMS ((FILE *));
+
/* This block of definitions is for particular callers who read instructions
into a buffer before calling the instruction decoder. */
@@ -185,7 +215,7 @@ extern disassembler_ftype disassembler PARAMS ((bfd *));
/* Here is a function which callers may wish to use for read_memory_func.
It gets bytes from a buffer. */
extern int buffer_read_memory
- PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
+ PARAMS ((bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *));
/* This function goes with buffer_read_memory.
It prints a message using info->fprintf_func and info->stream. */
@@ -209,6 +239,7 @@ extern int generic_symbol_at_address
(INFO).arch = bfd_arch_unknown, \
(INFO).mach = 0, \
(INFO).endian = BFD_ENDIAN_UNKNOWN, \
+ (INFO).octets_per_byte = 1, \
INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
/* Call this macro to initialize only the internal variables for the
@@ -217,8 +248,8 @@ extern int generic_symbol_at_address
GDB which must initialize these things seperatly. */
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
- (INFO).fprintf_func = (FPRINTF_FUNC), \
- (INFO).stream = (STREAM), \
+ (INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
+ (INFO).stream = (PTR)(STREAM), \
(INFO).symbols = NULL, \
(INFO).num_symbols = 0, \
(INFO).buffer = NULL, \
@@ -234,4 +265,8 @@ extern int generic_symbol_at_address
(INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
(INFO).insn_info_valid = 0
+#ifdef __cplusplus
+};
+#endif
+
#endif /* ! defined (DIS_ASM_H) */
diff --git a/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog
index aed10aa..e1f68c3 100644
--- a/contrib/binutils/include/elf/ChangeLog
+++ b/contrib/binutils/include/elf/ChangeLog
@@ -1,3 +1,552 @@
+2000-03-27 Denis Chertykov <denisc@overta.ru>
+
+ * avr.h: New file. AVR ELF support for BFD.
+ * common.h: Add AVR magic number.
+
+2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
+
+ * mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16,
+ R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
+ numbers.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * i370.h: New file.
+
+2000-02-22 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (ELF_ST_OTHER): Remove definition.
+ (ELF32_ST_OTHER): Remove definition.
+ (ELF64_ST_OTHER): Remove definition.
+
+2000-02-22 H.J. Lu <hjl@gnu.org>
+
+ * common.h (ELFOSABI_LINUX): Define.
+
+Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
+ (EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
+ (EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise.
+
+2000-02-03 H.J. Lu <hjl@gnu.org>
+
+ * arm-oabi.h: Duplicate changes made to arm.h on Jan. 27,
+ 2000 by Thomas de Lellis <tdel@windriver.com>.
+
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
+
+ * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC.
+ (STT_ARM_16BIT): New flag. Denotes a label that was defined in
+ Thumb block but was does not identify a function.
+
+2000-01-20 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_MCORE): Fix spelling of Motorola.
+ * mcore.h (EM_MCORE): Fix spelling of Motorola.
+
+2000-01-13 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_S370): Change comment - this is now the IBM
+ System/370.
+ (EM_IA_64): Change comment - this is now the IA-64.
+
+2000-01-11 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (DT_ENCODING): Fix definition of this value.
+ (DT_LOOS): Fix definition of this value.
+ (DT_HIOS): Fix definition of this value.
+ (OLD_DT_LOOS): Value of DT_LOOS before Oct 4, 1999 draft
+ of ELF spec changed it.
+ (OLD_DT_HIOS): Value of DT_HIOS before Oct 4, 1999 draft
+ of ELF spec changed it.
+
+2000-01-10 Egor Duda <deo@logos-m.ru>
+
+ * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps).
+
+1999-12-28 Nick Clifton <nickc@cygnus.com>
+
+ * mips.h (STO_*): Redefine in terms of STV_* values now in
+ common.h.
+
+1999-12-27 Nick Clifton <nickc@cygnus.com>
+
+ * common.h: Upgrade to match Oct4, 1999 Draft ELF ABI Spec.
+ (EM_MIPS_RS3_LE): New machine number.
+ (EM_RCE): New machine number.
+ (EM_MMA): New machine number.
+ (EM_PCP): New machine number.
+ (EM_NCPU): New machine number.
+ (EM_NDR1): New machine number.
+ (EM_STARCORE): New machine number.
+ (EM_ME16): New machine number.
+ (EM_ST100): New machine number.
+ (EM_TINYJ): New machine number.
+ (EM_FX66): New machine number.
+ (EM_ST9PLUS): New machine number.
+ (EM_ST7): New machine number.
+ (EM_68HC16): New machine number.
+ (EM_68HC11): New machine number.
+ (EM_68HC08): New machine number.
+ (EM_68HC05): New machine number.
+ (EM_SVX): New machine number.
+ (EM_VAX): New machine number.
+ (PF_MASKOS): Change value.
+ (SHT_INIT_ARRAY): New value for sh_type field.
+ (SHT_FINI_ARRAY): New value for sh_type field.
+ (SHT_PREINIT_ARRAY): New value for sh_type field.
+ (SHT_HIUSER): Change value.
+ (SHF_MERGE): New valye for sh_flags field.
+ (SHF_STRINGS): New valye for sh_flags field.
+ (SHF_INFO_LINK): New valye for sh_flags field.
+ (SHF_OS_NONCONFORMING): New valye for sh_flags field.
+ (SHF_MASKOS): Change value.
+ (ELF_ST_VISIBILITY): New macro.
+ (ELF_ST_OTHER): New macro.
+ (STT_COMMON): New symbol type.
+ (STV_DEFAULT): Value for symbol visibility.
+ (STV_INTERNAL): Value for symbol visibility.
+ (STV_HIDDEN): Value for symbol visibility.
+ (STV_PROTECTED): Value for symbol visibility.
+ (DT_RUNPATH): New dynamic section tag.
+ (DT_FLAGS): New dynamic section tag.
+ (DT_ENCODING): New dynamic section tag.
+ (DT_PREINIT_ARRAY): New dynamic section tag.
+ (DT_PREINIT_ARRAYSZ): New dynamic section tag.
+ (DT_LOPROC): New dynamic section tag index.
+ (DT_HIPROC): New dynamic section tag index.
+ (DF_ORIGIN): Value for dynamic section flag.
+ (DF_SYMBOLIC): Value for dynamic section flag.
+ (DF_TEXTREL): Value for dynamic section flag.
+ (DF_BIND_NOW): Value for dynamic section flag.
+
+1999-12-09 Fred Fish <fnf@cygnus.com>
+
+ * i960.h (reloc-macros.h): Include using relative dir elf/.
+ * i386.h (reloc-macros.h): Include using relative dir elf/.
+ * hppa.h (reloc-macros.h): Include using relative dir elf/.
+
+1999-12-07 Jim Blandy <jimb@cygnus.com>
+
+ * common.h (NT_PRXFPREG): New definition.
+
+Wed Dec 1 03:02:15 1999 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h (E_MN10300_MACH_AM33): Define.
+
+Mon Oct 11 22:42:37 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (PF_HP_PAGE_SIZE): Define.
+ (PF_HP_FAR_SHARED, PF_HP_NEAR_SHARED, PF_HP_CODE): Likewise.
+ (PF_HP_MODIFY, PF_HP_LAZYSWAP, PF_HP_SBP): Likewise.
+
+Mon Oct 4 17:42:38 1999 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r.h (E_M32RX_ARCH): Define.
+
+1999-09-15 Ulrich Drepper <drepper@cygnus.com>
+
+ * hppa.h: Add DT_HP_GST_SIZE, DT_HP_GST_VERSION, and DT_HP_GST_HASHVAL.
+
+1999-09-04 Steve Chamberlain <sac@pobox.com>
+
+ * pj.h: New file.
+ * common.h (EM_PJ): Define.
+
+1999-09-02 Ulrich Drepper <drepper@cygnus.com>
+
+ * hppa.h: Add HPUX specific symbol type definitions.
+
+ * hppa.h: Add HPUX specific dynamic and program header table
+ specific definitions.
+
+1999-08-31 Scott Bambrough <scottb@netwinder.org>
+
+ * common.h (NT_TASKSTRUCT): Define.
+
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sparc.h (EF_SPARC_SUN_US3): Define in Cheetah extensions
+ flag (as per SCD2.4.1).
+
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sparc.h (ELF64_R_TYPE_DATA): Only use ELF64_R_TYPE bits, not
+ ELF64_R_SYM bits.
+
+1999-06-21 Philip Blundell <pb@nexus.co.uk>
+
+ * arm.h (EF_SOFT_FLOAT, F_SOFT_FLOAT): Define.
+
+1999-07-13 Andreas Schwab <schwab@suse.de>
+
+ * m68k.h (EF_CPU32): Move definition inside multiple inclusion
+ guard.
+
+1999-07-08 Richard Henderson <rth@cygnus.com>
+
+ * sparc.h (ELF64_R_TYPE_DATA): Sign extend the value.
+ (ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data.
+ (DT_SPARC_PLTFMT): Delete.
+ Based on a patch from Jakub Jelinek.
+
+Mon Jun 21 16:36:02 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
+
+1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sparc.h (R_SPARC_max_std): Define.
+
+Wed Jun 9 15:16:34 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h: Update with various changes from newest PA ELF
+ specifications.
+
+1999-06-03 Ian Lance Taylor <ian@zembu.com>
+
+ * common.h (EM_PPC64): Define.
+
+1999-06-02 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * dwarf.h: Add LANG_JAVA.
+ * dwarf2.h: Add DW_LANG_Java.
+
+1999-05-29 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (ELFOSABI_ARM): Define.
+
+1999-05-28 Nick Clifton <nickc@cygnus.com>
+
+ * reloc-macros.h: Update comment.
+
+1999-05-28 Ian Lance Taylor <ian@zembu.com>
+
+ * i960.h: New file.
+
+1999-05-16 Nick Clifton <nickc@cygnus.com>
+
+ * mcore.h (R_MCORE_COPY): Define.
+ (R_MCORE_GLOB_DAT): Define.
+ (R_MCORE_JUMP_SLOT): Define.
+
+1999-05-15 Nick Clifton <nickc@cygnus.com>
+
+ * mcore.h (R_MCORE_RELATIVE): Define.
+
+999-05-05 Catherine Moore <clm@cygnus.com>
+
+ * m68k.h (EF_CPU32): Define.
+
+1999-04-21 Nick Clifton <nickc@cygnus.com>
+
+ * reloc-macros.h (START_RELOC_NUMBERS): Prepend an underscore to
+ fake reloc entry name (if possible), in order to avoid conflicts
+ with typedefs of the same name.
+
+1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (EF_MIPS_32BITMODE): New.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * mcore.h: New header file. Defines for Motorola's MCore
+ processor.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * common.h: Add new constants defined in: "System V Application
+ Binary Interface - DRAFT - April 29, 1998" found at the web site:
+ http://www.sco.com/developer/gabi/contents.html
+
+ (EM_MMA): Removed. Replaced with EM_MCORE as Motorolla own this
+ value.
+
+1999-03-31 Nick Clifton <nickc@cygnus.com>
+
+ * reloc-macros.h: Fixed to not generate an enum with a trailing
+ comma.
+
+1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (E_MIPS_MACH_5000): New.
+
+1999-03-10 Ulrich Drepper <drepper@cygnus.com>
+
+ * common.h: Add definitions for a few more Solaris ELF extensions.
+
+Thu Feb 18 18:58:26 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * external.h: Only use attribute if __GNUC__ is defined.
+
+1999-02-17 Nick Clifton <nickc@cygnus.com>
+
+ Patch submitted by: Scott Bambrough <scottb@corelcomputer.com>
+
+ * elf/external.h: struct Elf_External_Versym must be packed on
+ ARM. Code uses sizeof(Elf_External_Versym) and assumes it is
+ equal to sizeof(char[2]). Reported by Jim Pick <jim@jimpick.com>
+
+1999-02-02 Nick Clifton <nickc@cygnus.com>
+
+ * dwarf2.h (DWARF2_External_ARange): New structure.
+ (DWARF2_Internal_ARange): New structure.
+
+Mon Feb 1 11:33:56 1999 Catherine Moore <clm@cygnus.com>
+
+ * arm.h: Renumber relocs to conform to standard.
+ (EF_NEW_ABI): Define.
+ (EF_OLD_ABI): Define.
+ * arm-oabi.h: New file.
+
+1999-01-28 Nick Clifton <nickc@cygnus.com>
+
+ * fr30.h: Add R_FR30_GNU_VT{INHERIT,ENTRY} relocs.
+
+1999-01-27 Nick Clifton <nickc@cygnus.com>
+
+ * dwarf2.h: Add typedefs for structures found in dwarf2 sections.
+
+1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (E_MIPS_MACH_4111): New.
+
+1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (EF_MIPS_ABI,E_MIPS_ABI_O32,E_MIPS_ABI_O64,
+ E_MIPS_ABI_EABI32,E_MIPS_ABI_EABI64):
+
+1998-12-03 Nick Clifton <nickc@cygnus.com>
+
+ * fr30.h: Add R_FR30_48 reloc.
+
+1998-12-02 Ulrich Drepper <drepper@cygnus.com>
+
+ * mips.h: Add external data type for conflict section.
+
+ * mips.h: Add more LL_* options from Irix 6.5.
+
+ * mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately.
+
+Tue Nov 10 15:12:28 1998 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value.
+
+Tue Nov 10 15:17:28 1998 Catherine Moore <clm@cygnus.com>
+
+ * d10v.h: Add vtable relocs.
+
+Wed Nov 4 15:56:50 1998 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_CYGNUS_FR30): New machine number.
+
+ * fr30.h: New file: Definitions for the FR30.
+
+Fri Oct 30 11:54:15 1998 Catherine Moore <clm@cygnus.com>
+
+ From Philip Blundell <pb@nexus.co.uk>:
+ * arm.h (R_ARM_COPY, et al.): New relocs, used by Linux for PIC.
+ (EF_ALIGN8): New flag.
+
+Tue Oct 20 11:19:50 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * common.h (NT_LWPSTATUS): Close comment accidentally left open.
+
+Mon Oct 19 20:24:11 1998 Catherine Moore <clm@cygnus.com>
+
+ * sh.h: Add vtable relocs.
+
+Mon Oct 19 01:44:42 1998 Felix Lee <flee@cygnus.com>
+
+ * common.h (NT_PSTATUS, NT_FPREGS, NT_PSINFO,
+ NT_LWPSTATUS,NT_LWPSINFO): added.
+ * internal.h (Elf_Internal_Note): new structure members.
+
+Fri Oct 16 14:11:25 1998 Catherine Moore <clm@cygnus.com>
+
+ * m32r.h: Add vtable relocs.
+
+Tue Oct 6 09:22:22 1998 Catherine Moore <clm@cygnus.com>
+
+ * sparc.h: Add vtable relocs.
+
+Mon Oct 5 09:39:22 1998 Catherine Moore <clm@cygnus.com>
+
+ * v850.h: Add vtable relocs.
+
+Sun Oct 4 21:17:51 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * i386.h (R_386_max): Change from 252 to 24.
+
+Mon Sep 21 12:24:44 1998 Catherine Moore <clm@cygnus.com>
+
+ * i386.h: Change vtable reloc numbers.
+
+Sun Sep 20 00:54:22 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * m68k.h: Add vtable relocs and R_68K_max.
+
+Tue Sep 15 09:56:49 CDT 1998 Catherine Moore <clm@cygnus.com>
+
+ * arm.h: Add vtable relocs.
+
+Mon Aug 31 11:25:27 1998 Catherine Moore <clm@cygnus.com>
+
+ * arm.h: Define STT_ARM_TFUNC. Remove ST_THUMB_xxxx
+ definitions.
+
+Sat Aug 29 22:25:51 1998 Richard Henderson <rth@cygnus.com>
+
+ * i386.h: Add vtable relocs.
+
+1998-08-25 16:42 Ulrich Drepper <drepper@cygnus.com>
+
+ * common.h: Add SYMINFO_* macros to access Elf*_Syminfo information.
+
+ * external.h: Add Elf_External_Syminfo definition.
+
+ * internal.h: Add Elf_Internal_Syminfo, Elf32_Internal_Syminfo,
+ and Elf64_Syminfo definitions.
+
+Sun Aug 9 20:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
+
+ * arm.h: Add ST_THUMB definitions.
+
+Wed Aug 5 15:52:35 1998 Nick Clifton <nickc@cygnus.com>
+
+ * arm.h: Add ELF header flags to specify compile time optins:
+ EF_INTERWORK: New flag.
+ EF_APCS_26: New flag.
+ EF_APCS_FLOAT: New flag.
+ EF_PIC: New flag.
+
+1998-07-31 21:28 Ulrich Drepper <drepper@cygnus.com>
+
+ * mips.h: Add missing RHF_* constants.
+
+Fri Jul 31 10:01:40 1998 Catherine Moore <clm@cygnus.com>
+
+ * arm.h: Add R_ARM_THM_PC9 relocation.
+
+1998-07-30 16:25 Ulrich Drepper <drepper@cygnus.com>
+
+ * common.h: Add new DT_* entries and there flag macros from Solaris.
+
+Tue Jul 28 18:14:07 1998 Stan Cox <scox@equinox.cygnus.com>
+
+ * sparc.h: (R_SPARC_REV32): Added for little endian data e.g. sparc 86x.
+
+Fri Jul 24 11:22:06 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h: Add R_MN10300_24 relocation.
+
+1998-07-24 Ulrich Drepper <drepper@cygnus.com>
+
+ * mips.h: Add MIPS64 relocation names and values.
+
+Wed Jul 22 19:29:00 Catherine Moore <clm@cygnus.com>
+
+ * arm.h: Rename relocations.
+
+1998-07-22 Ulrich Drepper <drepper@cygnus.com>
+
+ * ppc.h: Define enum as elf_ppc_reloc_type.
+
+Wed Jul 22 16:22:11 1998 Nick Clifton <nickc@cygnus.com>
+
+ * reloc-macros.h: New file. Provides relocation macros:
+ START_RELOC_NUMBERS, RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC and
+ END_RELOC_NUMBERS used by other elf header files.
+
+ * alpha.h: Use reloc-macros.h.
+ * arc.h: Use reloc-macros.h.
+ * arm.h: Use reloc-macros.h.
+ * d10v.h: Use reloc-macros.h.
+ * d30v.h: Use reloc-macros.h.
+ * hppa.h: Use reloc-macros.h.
+ * i386.h: Use reloc-macros.h.
+ * m32r.h: Use reloc-macros.h.
+ * m68k.h: Use reloc-macros.h.
+ * mips.h: Use reloc-macros.h.
+ * mn10200.h: Use reloc-macros.h.
+ * mn10300.h: Use reloc-macros.h.
+ * ppc.h: Use reloc-macros.h.
+ * sh.h: Use reloc-macros.h.
+ * sparc.h: Use reloc-macros.h.
+ * v850.h: Use reloc-macros.h.
+
+1998-07-22 13:07 Ulrich Drepper <drepper@cygnus.com>
+
+ * mn10300.h: Rewrite relocation definition using macros.
+ * mips.h: Likewise.
+ * ppc.h: Likewise.
+ * alpha.h: Likewise.
+ * arm.h: Likewise.
+ * d10v.h: Likewise.
+ * d30v.h: Likewise.
+ * m32r.h: Likewise.
+ * m68k.h: Likewise.
+ * mn10200.h: Likewise.
+ * sh.h: Likewise.
+ * sparc.h: Likewise.
+
+1998-07-21 13:07 Ulrich Drepper <drepper@cygnus.com>
+
+ * arm.h: New file.
+ * d10v.h: New file.
+ * d30v.h: New file.
+ * i386.h: New file.
+ * m68k.h: New file.
+ * mn10200.h: New file.
+ * sh.h: New file.
+
+ * mips.h: Add R_MIPS_* and SHT_MIPS_* entries.
+
+ * mn10300.h: Add R_MN10300_* entries.
+
+ * ppc.h: Add R_PPC_* entries.
+
+1998-07-20 07:11 Ulrich Drepper <drepper@cygnus.com>
+
+ * mips.h: Add ODK_*, OEX_*, OPAD_*, OHW_*, and OGP_* constants.
+ Define Elf32_External_Lib.
+
+1998-07-19 15:24 Ulrich Drepper <drepper@cygnus.com>
+
+ * mips.h (PT_MIPS_OPTIONS): New symbol.
+ Add lots of DT_MIPS_* symbols.
+
+Fri Jun 26 10:46:35 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h: New file.
+
+Thu Jun 18 19:27:56 1998 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_960, EM_V800, EM_FR20, EM_RH32, EM_MMA,
+ EM_OLD_ALPHA): Add these constants.
+
+Thu Jun 11 17:59:01 1998 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_486, EM_S370): Add these constants.
+
+Tue Jun 9 09:35:29 1998 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_ARM): Add this constant.
+
+Wed May 6 09:45:30 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips.h (EF_MIPS_MACH,E_MIPS_MACH_*): Added.
+
+Sat Apr 25 18:35:06 1998 Richard Henderson <rth@cygnus.com>
+
+ * alpha.h (STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New.
+
+Wed Apr 15 15:42:45 1998 Richard Henderson <rth@cygnus.com>
+
+ * common.h (EM_SPARC64): Move and rename to EM_OLD_SPARCV9.
+ (EM_SPARCV9): New. This is the official ABI name and number.
+
Sat Feb 28 17:04:41 1998 Richard Henderson <rth@cygnus.com>
* alpha.h (EF_ALPHA_32BIT, EF_ALPHA_CANRELAX): New.
@@ -6,15 +555,15 @@ Mon Dec 15 15:07:49 1997 Nick Clifton <nickc@cygnus.com>
* m32r.h (EF_M32R_ARCH, E_M32R_ARCH): New flags to
specify machine architecture.
-
+
Fri Dec 5 11:20:08 1997 Nick Clifton <nickc@cygnus.com>
* v850.h: New constants: SHN_V850_SCOMMON, SHN_V850_TCOMMON,
SHN_V850_ZCOMMON, SHT_V850_SCOMMON, SHT_V850_TCOMMON,
SHT_V850_ZCOMMON to handle v850 common sections.
enum reloc_type renamed to v850_reloc_type to avoid name
- conflict.
-
+ conflict.
+
Thu Oct 23 13:55:24 1997 Richard Henderson <rth@cygnus.com>
* sparc.h (enum elf_sparc_reloc_type): Add UA64 & UA16.
@@ -37,6 +586,10 @@ Tue Sep 30 13:26:58 1997 Doug Evans <dje@canuck.cygnus.com>
(R_SPARC_{H44,M44,L44,REGISTER}): New relocations.
(ELF64_R_TYPE_{DATA,ID,INFO}): New macros.
+Wed Sep 17 16:41:42 1997 Nick Clifton <nickc@cygnus.com>
+
+ * v850.h: Add R_V850_CALLT_6_7_OFFSET and R_V850_CALLT_16_16_OFFSET.
+
Tue Sep 16 14:16:17 1997 Nick Clifton <nickc@cygnus.com>
* v850.h (reloc_type): Add R_V850_TDA_16_16_OFFSET.
@@ -51,9 +604,14 @@ Wed Sep 3 11:25:57 1997 Nick Clifton <nickc@cygnus.com>
Tue Sep 2 17:41:05 1997 Nick Clifton <nickc@cygnus.com>
-
+ * common.h: Remove magic number for V850E.
+ * common.h: Remove magic number for V850EA.
* v850.h: Add new flags for e_flags field in elf header.
+Mon Aug 25 16:06:47 1997 Nick Clifton <nickc@cygnus.com>
+
+ * common.h (EM_CYGNUS_V850E): backend magic number for v850e.
+ * common.h (EM_CYGNUS_V850EA): backend magic number for v850ea.
Mon Aug 18 11:05:23 1997 Nick Clifton <nickc@cygnus.com>
@@ -95,6 +653,10 @@ Wed Feb 19 15:35:31 1997 Ian Lance Taylor <ian@cygnus.com>
* external.h, internal.h, common.h: Added new structures and
definitions for ELF versions.
+Tue Feb 18 17:40:36 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * common.h (EM_CYGNUS_D30V): Define.
+
Mon Jan 27 11:54:44 1997 Doug Evans <dje@seba.cygnus.com>
* m32r.h (enum reloc_type): Add R_M32R_HI16_[SU]LO,R_M32R_LO16.
@@ -110,7 +672,7 @@ Fri Jan 3 11:32:51 1997 Michael Meissner <meissner@tiktok.cygnus.com>
Thu Jan 2 19:30:23 1997 Michael Meissner <meissner@tiktok.cygnus.com>
- * v850.h: New file, provide V850 specific definitions.
+ * v850.h: New file, provide V850 specific definitions.
Tue Dec 31 14:44:32 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -156,7 +718,7 @@ Tue Aug 20 14:47:54 1996 J.T. Conklin <jtc@hippo.cygnus.com>
Mon Aug 19 10:59:10 1996 Doug Evans <dje@canuck.cygnus.com>
* common.h (EM_CYGNUS_M32R): Define.
-
+
Mon Jul 22 18:59:55 1996 Ian Lance Taylor <ian@cygnus.com>
* mips.h (SHT_MIPS_IFACE, SHT_MIPS_CONTENT): Define.
@@ -170,7 +732,7 @@ Thu Jul 18 19:12:15 1996 Stan Shebs <shebs@andros.cygnus.com>
Jul 18 13:20:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * common.h (EM_CYGNUS_D10V): Define.
+ * common.h (EM_CYGNUS_D10V): Define.
* d10v.h: New file.
Fri Jun 21 12:33:24 1996 Richard Henderson <rth@tamu.edu>
@@ -380,7 +942,7 @@ Fri Apr 3 20:58:58 1992 Mark Eichin (eichin at cygnus.com)
* common.h: added ELF_R_{SYM,TYPE,INFO} for handling relocation
info
added EM_MIPS, and corrected value of EM_860 based on System V ABI
- manual.
+ manual.
* external.h: added Elf_External_{Rel,Rela}.
diff --git a/contrib/binutils/include/elf/alpha.h b/contrib/binutils/include/elf/alpha.h
index 28b9fe3..1ae9d5e 100644
--- a/contrib/binutils/include/elf/alpha.h
+++ b/contrib/binutils/include/elf/alpha.h
@@ -1,5 +1,5 @@
/* ALPHA ELF support for BFD.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
By Eric Youngdale, <eric@aib.com>. No processor supplement available
for this platform.
@@ -58,43 +58,51 @@ typedef struct
long ri_gp_value;
} Elf64_RegInfo;
-/* Alpha relocs. */
+/* Special values for the st_other field in the symbol table. */
+
+#define STO_ALPHA_NOPV 0x80
+#define STO_ALPHA_STD_GPLOAD 0x88
-#define R_ALPHA_NONE 0 /* No reloc */
-#define R_ALPHA_REFLONG 1 /* Direct 32 bit */
-#define R_ALPHA_REFQUAD 2 /* Direct 64 bit */
-#define R_ALPHA_GPREL32 3 /* GP relative 32 bit */
-#define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */
-#define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */
-#define R_ALPHA_GPDISP 6 /* Add displacement to GP */
-#define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */
-#define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */
-#define R_ALPHA_SREL16 9 /* PC relative 16 bit */
-#define R_ALPHA_SREL32 10 /* PC relative 32 bit */
-#define R_ALPHA_SREL64 11 /* PC relative 64 bit */
+#include "elf/reloc-macros.h"
+
+/* Alpha relocs. */
+START_RELOC_NUMBERS (elf_alpha_reloc_type)
+ RELOC_NUMBER (R_ALPHA_NONE, 0) /* No reloc */
+ RELOC_NUMBER (R_ALPHA_REFLONG, 1) /* Direct 32 bit */
+ RELOC_NUMBER (R_ALPHA_REFQUAD, 2) /* Direct 64 bit */
+ RELOC_NUMBER (R_ALPHA_GPREL32, 3) /* GP relative 32 bit */
+ RELOC_NUMBER (R_ALPHA_LITERAL, 4) /* GP relative 16 bit w/optimization */
+ RELOC_NUMBER (R_ALPHA_LITUSE, 5) /* Optimization hint for LITERAL */
+ RELOC_NUMBER (R_ALPHA_GPDISP, 6) /* Add displacement to GP */
+ RELOC_NUMBER (R_ALPHA_BRADDR, 7) /* PC+4 relative 23 bit shifted */
+ RELOC_NUMBER (R_ALPHA_HINT, 8) /* PC+4 relative 16 bit shifted */
+ RELOC_NUMBER (R_ALPHA_SREL16, 9) /* PC relative 16 bit */
+ RELOC_NUMBER (R_ALPHA_SREL32, 10) /* PC relative 32 bit */
+ RELOC_NUMBER (R_ALPHA_SREL64, 11) /* PC relative 64 bit */
/* Inherited these from ECOFF, but they are not particularly useful
and are depreciated. And not implemented in the BFD, btw. */
-#define R_ALPHA_OP_PUSH 12 /* OP stack push */
-#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */
-#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */
-#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */
-
-#define R_ALPHA_GPVALUE 16
-#define R_ALPHA_GPRELHIGH 17
-#define R_ALPHA_GPRELLOW 18
-#define R_ALPHA_IMMED_GP_16 19
-#define R_ALPHA_IMMED_GP_HI32 20
-#define R_ALPHA_IMMED_SCN_HI32 21
-#define R_ALPHA_IMMED_BR_HI32 22
-#define R_ALPHA_IMMED_LO32 23
+ RELOC_NUMBER (R_ALPHA_OP_PUSH, 12) /* OP stack push */
+ RELOC_NUMBER (R_ALPHA_OP_STORE, 13) /* OP stack pop and store */
+ RELOC_NUMBER (R_ALPHA_OP_PSUB, 14) /* OP stack subtract */
+ RELOC_NUMBER (R_ALPHA_OP_PRSHIFT, 15) /* OP stack right shift */
+
+ RELOC_NUMBER (R_ALPHA_GPVALUE, 16)
+ RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17)
+ RELOC_NUMBER (R_ALPHA_GPRELLOW, 18)
+ RELOC_NUMBER (R_ALPHA_IMMED_GP_16, 19)
+ RELOC_NUMBER (R_ALPHA_IMMED_GP_HI32, 20)
+ RELOC_NUMBER (R_ALPHA_IMMED_SCN_HI32, 21)
+ RELOC_NUMBER (R_ALPHA_IMMED_BR_HI32, 22)
+ RELOC_NUMBER (R_ALPHA_IMMED_LO32, 23)
/* These relocations are specific to shared libraries. */
-#define R_ALPHA_COPY 24 /* Copy symbol at runtime */
-#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
-#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
-#define R_ALPHA_RELATIVE 27 /* Adjust by program base */
+ RELOC_NUMBER (R_ALPHA_COPY, 24) /* Copy symbol at runtime */
+ RELOC_NUMBER (R_ALPHA_GLOB_DAT, 25) /* Create GOT entry */
+ RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */
+ RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */
-#define R_ALPHA_max 28
+ EMPTY_RELOC (R_ALPHA_max)
+END_RELOC_NUMBERS
#endif /* _ELF_ALPHA_H */
diff --git a/contrib/binutils/include/elf/arc.h b/contrib/binutils/include/elf/arc.h
index 25ba97a..334b55f 100644
--- a/contrib/binutils/include/elf/arc.h
+++ b/contrib/binutils/include/elf/arc.h
@@ -23,14 +23,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _ELF_ARC_H
#define _ELF_ARC_H
-enum reloc_type
-{
- R_ARC_NONE = 0,
- R_ARC_32,
- R_ARC_B26,
- R_ARC_B22_PCREL,
- R_ARC_max
-};
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_arc_reloc_type)
+ RELOC_NUMBER (R_ARC_NONE, 0)
+ RELOC_NUMBER (R_ARC_32, 1)
+ RELOC_NUMBER (R_ARC_B26, 2)
+ RELOC_NUMBER (R_ARC_B22_PCREL, 3)
+ EMPTY_RELOC (R_ARC_max)
+END_RELOC_NUMBERS
/* Processor specific flags for the ELF header e_flags field. */
diff --git a/contrib/binutils/include/elf/arm-oabi.h b/contrib/binutils/include/elf/arm-oabi.h
new file mode 100644
index 0000000..da5e731
--- /dev/null
+++ b/contrib/binutils/include/elf/arm-oabi.h
@@ -0,0 +1,88 @@
+/* ARM ELF support for BFD.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_ARM_H
+#define _ELF_ARM_H
+
+#include "elf/reloc-macros.h"
+
+/* Processor specific flags for the ELF header e_flags field. */
+#define EF_ARM_RELEXEC 0x01
+#define EF_ARM_HASENTRY 0x02
+#define EF_INTERWORK 0x04
+#define EF_APCS_26 0x08
+#define EF_APCS_FLOAT 0x10
+#define EF_PIC 0x20
+#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
+#define EF_NEW_ABI 0x80
+#define EF_OLD_ABI 0x100
+
+/* Local aliases for some flags to match names used by COFF port. */
+#define F_INTERWORK EF_INTERWORK
+#define F_APCS26 EF_APCS_26
+#define F_APCS_FLOAT EF_APCS_FLOAT
+#define F_PIC EF_PIC
+
+/* Additional symbol types for Thumb. */
+#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
+#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
+
+/* ARM-specific values for sh_flags. */
+#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
+#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */
+
+/* ARM-specific program header flags. */
+#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_arm_reloc_type)
+ RELOC_NUMBER (R_ARM_NONE, 0)
+ RELOC_NUMBER (R_ARM_PC24, 1)
+ RELOC_NUMBER (R_ARM_ABS32, 2)
+ RELOC_NUMBER (R_ARM_REL32, 3)
+ RELOC_NUMBER (R_ARM_ABS8, 4)
+ RELOC_NUMBER (R_ARM_ABS16, 5)
+ RELOC_NUMBER (R_ARM_ABS12, 6)
+ RELOC_NUMBER (R_ARM_THM_ABS5, 7)
+ RELOC_NUMBER (R_ARM_THM_PC22, 8)
+ RELOC_NUMBER (R_ARM_SBREL32, 9)
+ RELOC_NUMBER (R_ARM_AMP_VCALL9, 10)
+ RELOC_NUMBER (R_ARM_THM_PC11, 11) /* Cygnus extension to abi: Thumb unconditional branch. */
+ RELOC_NUMBER (R_ARM_THM_PC9, 12) /* Cygnus extension to abi: Thumb conditional branch. */
+ RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 13)
+ RELOC_NUMBER (R_ARM_GNU_VTENTRY, 14)
+ RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */
+ RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */
+ RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */
+ RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */
+ RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT. */
+ RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry. */
+ RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address. */
+ FAKE_RELOC (FIRST_INVALID_RELOC, 28)
+ FAKE_RELOC (LAST_INVALID_RELOC, 249)
+ RELOC_NUMBER (R_ARM_RSBREL32, 250)
+ RELOC_NUMBER (R_ARM_THM_RPC22, 251)
+ RELOC_NUMBER (R_ARM_RREL32, 252)
+ RELOC_NUMBER (R_ARM_RABS32, 253)
+ RELOC_NUMBER (R_ARM_RPC24, 254)
+ RELOC_NUMBER (R_ARM_RBASE, 255)
+END_RELOC_NUMBERS
+
+#endif
diff --git a/contrib/binutils/include/elf/arm.h b/contrib/binutils/include/elf/arm.h
new file mode 100644
index 0000000..4d3405d
--- /dev/null
+++ b/contrib/binutils/include/elf/arm.h
@@ -0,0 +1,99 @@
+/* ARM ELF support for BFD.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_ARM_H
+#define _ELF_ARM_H
+
+#include "elf/reloc-macros.h"
+
+/* Processor specific flags for the ELF header e_flags field. */
+#define EF_ARM_RELEXEC 0x01
+#define EF_ARM_HASENTRY 0x02
+#define EF_INTERWORK 0x04
+#define EF_APCS_26 0x08
+#define EF_APCS_FLOAT 0x10
+#define EF_PIC 0x20
+#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
+#define EF_NEW_ABI 0x80
+#define EF_OLD_ABI 0x100
+#define EF_SOFT_FLOAT 0x200
+
+/* Local aliases for some flags to match names used by COFF port. */
+#define F_INTERWORK EF_INTERWORK
+#define F_APCS26 EF_APCS_26
+#define F_APCS_FLOAT EF_APCS_FLOAT
+#define F_PIC EF_PIC
+#define F_SOFT_FLOAT EF_SOFT_FLOAT
+
+/* Additional symbol types for Thumb. */
+#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
+#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
+
+/* ARM-specific values for sh_flags. */
+#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
+#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */
+
+/* ARM-specific program header flags. */
+#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_arm_reloc_type)
+ RELOC_NUMBER (R_ARM_NONE, 0)
+ RELOC_NUMBER (R_ARM_PC24, 1)
+ RELOC_NUMBER (R_ARM_ABS32, 2)
+ RELOC_NUMBER (R_ARM_REL32, 3)
+ RELOC_NUMBER (R_ARM_PC13, 4)
+ RELOC_NUMBER (R_ARM_ABS16, 5)
+ RELOC_NUMBER (R_ARM_ABS12, 6)
+ RELOC_NUMBER (R_ARM_THM_ABS5, 7)
+ RELOC_NUMBER (R_ARM_ABS8, 8)
+ RELOC_NUMBER (R_ARM_SBREL32, 9)
+ RELOC_NUMBER (R_ARM_THM_PC22, 10)
+ RELOC_NUMBER (R_ARM_THM_PC8, 11)
+ RELOC_NUMBER (R_ARM_AMP_VCALL9, 12)
+ RELOC_NUMBER (R_ARM_SWI24, 13)
+ RELOC_NUMBER (R_ARM_THM_SWI8, 14)
+ RELOC_NUMBER (R_ARM_XPC25, 15)
+ RELOC_NUMBER (R_ARM_THM_XPC22, 16)
+ RELOC_NUMBER (R_ARM_COPY, 20) /* copy symbol at runtime */
+ RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* create GOT entry */
+ RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* create PLT entry */
+ RELOC_NUMBER (R_ARM_RELATIVE, 23) /* adjust by program base */
+ RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT */
+ RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT */
+ RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry */
+ RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address */
+ FAKE_RELOC (FIRST_INVALID_RELOC1, 28)
+ FAKE_RELOC (LAST_INVALID_RELOC1, 99)
+ RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100)
+ RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101)
+ RELOC_NUMBER (R_ARM_THM_PC11, 102) /* Cygnus extension to abi: Thumb unconditional branch */
+ RELOC_NUMBER (R_ARM_THM_PC9, 103) /* Cygnus extension to abi: Thumb conditional branch */
+ FAKE_RELOC (FIRST_INVALID_RELOC2, 104)
+ FAKE_RELOC (LAST_INVALID_RELOC2, 248)
+ RELOC_NUMBER (R_ARM_RXPC25, 249)
+ RELOC_NUMBER (R_ARM_RSBREL32, 250)
+ RELOC_NUMBER (R_ARM_THM_RPC22, 251)
+ RELOC_NUMBER (R_ARM_RREL32, 252)
+ RELOC_NUMBER (R_ARM_RABS32, 253)
+ RELOC_NUMBER (R_ARM_RPC24, 254)
+ RELOC_NUMBER (R_ARM_RBASE, 255)
+END_RELOC_NUMBERS
+
+#endif
diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h
index febda9c..fe8c216 100644
--- a/contrib/binutils/include/elf/common.h
+++ b/contrib/binutils/include/elf/common.h
@@ -60,14 +60,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EI_OSABI 7 /* Operating System/ABI indication */
#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_MONTEREY 7 /* Monterey */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
#define ELFOSABI_ARM 97 /* ARM */
diff --git a/contrib/binutils/include/elf/dwarf.h b/contrib/binutils/include/elf/dwarf.h
index 4333d5e..1e72cd7 100644
--- a/contrib/binutils/include/elf/dwarf.h
+++ b/contrib/binutils/include/elf/dwarf.h
@@ -3,7 +3,7 @@
Written by Ron Guilmette (rfg@ncd.com)
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -301,7 +301,8 @@ enum dwarf_source_language {
/* GNU extensions */
- LANG_CHILL = 0x00009af3 /* random value for GNU Chill */
+ LANG_CHILL = 0x00009af3, /* random value for GNU Chill */
+ LANG_JAVA = 0x00009af4 /* random value + 1 for GNU Java */
};
#define LANG_lo_user 0x00008000 /* implementation-defined range start */
diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h
index f2b2510..1bd4fa6 100644
--- a/contrib/binutils/include/elf/dwarf2.h
+++ b/contrib/binutils/include/elf/dwarf2.h
@@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF symbolic
debugging information format.
- Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
@@ -34,6 +34,92 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#ifndef _ELF_DWARF2_H
#define _ELF_DWARF2_H
+/* Structure found in the .debug_line section. */
+typedef struct
+{
+ unsigned char li_length [4];
+ unsigned char li_version [2];
+ unsigned char li_prologue_length [4];
+ unsigned char li_min_insn_length [1];
+ unsigned char li_default_is_stmt [1];
+ unsigned char li_line_base [1];
+ unsigned char li_line_range [1];
+ unsigned char li_opcode_base [1];
+}
+DWARF2_External_LineInfo;
+
+typedef struct
+{
+ unsigned long li_length;
+ unsigned short li_version;
+ unsigned int li_prologue_length;
+ unsigned char li_min_insn_length;
+ unsigned char li_default_is_stmt;
+ int li_line_base;
+ unsigned char li_line_range;
+ unsigned char li_opcode_base;
+}
+DWARF2_Internal_LineInfo;
+
+/* Structure found in .debug_pubnames section. */
+typedef struct
+{
+ unsigned char pn_length [4];
+ unsigned char pn_version [2];
+ unsigned char pn_offset [4];
+ unsigned char pn_size [4];
+}
+DWARF2_External_PubNames;
+
+typedef struct
+{
+ unsigned long pn_length;
+ unsigned short pn_version;
+ unsigned long pn_offset;
+ unsigned long pn_size;
+}
+DWARF2_Internal_PubNames;
+
+/* Strcuture found in .debug_info section. */
+typedef struct
+{
+ unsigned char cu_length [4];
+ unsigned char cu_version [2];
+ unsigned char cu_abbrev_offset [4];
+ unsigned char cu_pointer_size [1];
+}
+DWARF2_External_CompUnit;
+
+typedef struct
+{
+ unsigned long cu_length;
+ unsigned short cu_version;
+ unsigned long cu_abbrev_offset;
+ unsigned char cu_pointer_size;
+}
+DWARF2_Internal_CompUnit;
+
+typedef struct
+{
+ unsigned char ar_length [4];
+ unsigned char ar_version [2];
+ unsigned char ar_info_offset [4];
+ unsigned char ar_pointer_size [1];
+ unsigned char ar_segment_size [1];
+}
+DWARF2_External_ARange;
+
+typedef struct
+{
+ unsigned long ar_length;
+ unsigned short ar_version;
+ unsigned long ar_info_offset;
+ unsigned char ar_pointer_size;
+ unsigned char ar_segment_size;
+}
+DWARF2_Internal_ARange;
+
+
/* Tag names and codes. */
enum dwarf_tag
@@ -530,6 +616,7 @@ enum dwarf_source_language
DW_LANG_Fortran90 = 0x0008,
DW_LANG_Pascal83 = 0x0009,
DW_LANG_Modula2 = 0x000a,
+ DW_LANG_Java = 0x9af4,
DW_LANG_Mips_Assembler = 0x8001
};
diff --git a/contrib/binutils/include/elf/external.h b/contrib/binutils/include/elf/external.h
index 4399085..5cab77e 100644
--- a/contrib/binutils/include/elf/external.h
+++ b/contrib/binutils/include/elf/external.h
@@ -1,5 +1,5 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 95, 97, 98, 1999 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
I.E. it describes the in-file representation of ELF. It requires
the elf-common.h file which contains the portions that are common to
both the internal and external representations. */
-
+
/* The 64-bit stuff is kind of random. Perhaps someone will publish a
spec someday. */
@@ -240,6 +240,17 @@ typedef struct {
typedef struct {
unsigned char vs_vers[2];
-} Elf_External_Versym;
+}
+#ifdef __GNUC__
+ __attribute__ ((packed))
+#endif
+ Elf_External_Versym;
+
+/* Structure for syminfo section. */
+typedef struct
+{
+ unsigned char si_boundto[2];
+ unsigned char si_flags[2];
+} Elf_External_Syminfo;
#endif /* _ELF_EXTERNAL_H */
diff --git a/contrib/binutils/include/elf/i386.h b/contrib/binutils/include/elf/i386.h
new file mode 100644
index 0000000..0586661
--- /dev/null
+++ b/contrib/binutils/include/elf/i386.h
@@ -0,0 +1,49 @@
+/* ix86 ELF support for BFD.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_I386_H
+#define _ELF_I386_H
+
+#include "elf/reloc-macros.h"
+
+START_RELOC_NUMBERS (elf_i386_reloc_type)
+ RELOC_NUMBER (R_386_NONE, 0) /* No reloc */
+ RELOC_NUMBER (R_386_32, 1) /* Direct 32 bit */
+ RELOC_NUMBER (R_386_PC32, 2) /* PC relative 32 bit */
+ RELOC_NUMBER (R_386_GOT32, 3) /* 32 bit GOT entry */
+ RELOC_NUMBER (R_386_PLT32, 4) /* 32 bit PLT address */
+ RELOC_NUMBER (R_386_COPY, 5) /* Copy symbol at runtime */
+ RELOC_NUMBER (R_386_GLOB_DAT, 6) /* Create GOT entry */
+ RELOC_NUMBER (R_386_JUMP_SLOT, 7) /* Create PLT entry */
+ RELOC_NUMBER (R_386_RELATIVE, 8) /* Adjust by program base */
+ RELOC_NUMBER (R_386_GOTOFF, 9) /* 32 bit offset to GOT */
+ RELOC_NUMBER (R_386_GOTPC, 10) /* 32 bit PC relative offset to GOT */
+ FAKE_RELOC (FIRST_INVALID_RELOC, 11)
+ FAKE_RELOC (LAST_INVALID_RELOC, 19)
+ RELOC_NUMBER (R_386_16, 20)
+ RELOC_NUMBER (R_386_PC16, 21)
+ RELOC_NUMBER (R_386_8, 22)
+ RELOC_NUMBER (R_386_PC8, 23)
+ RELOC_NUMBER (R_386_max, 24)
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_386_GNU_VTINHERIT, 250)
+ RELOC_NUMBER (R_386_GNU_VTENTRY, 251)
+END_RELOC_NUMBERS
+
+#endif
diff --git a/contrib/binutils/include/elf/internal.h b/contrib/binutils/include/elf/internal.h
index 6540310..a9b81a07 100644
--- a/contrib/binutils/include/elf/internal.h
+++ b/contrib/binutils/include/elf/internal.h
@@ -1,5 +1,5 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
I.E. it describes the in-memory representation of ELF. It requires
the elf-common.h file which contains the portions that are common to
both the internal and external representations. */
-
+
/* NOTE that these structures are not kept in the same order as they appear
in the object file. In some cases they've been reordered for more optimal
@@ -129,7 +129,9 @@ typedef struct elf_internal_note {
unsigned long namesz; /* Size of entry's owner string */
unsigned long descsz; /* Size of the note descriptor */
unsigned long type; /* Interpretation of the descriptor */
- char name[1]; /* Start of the name+desc data */
+ char * namedata; /* Start of the name+desc data */
+ char * descdata; /* Start of the desc data */
+ bfd_vma descpos; /* File offset of the descdata */
} Elf_Internal_Note;
#define Elf32_Internal_Note Elf_Internal_Note
#define elf32_internal_note elf_internal_note
@@ -206,7 +208,7 @@ typedef struct elf_internal_verdaux {
const char *vda_nodename; /* vda_name as pointer. */
struct elf_internal_verdaux *vda_nextptr; /* vda_next as pointer. */
} Elf_Internal_Verdaux;
-
+
/* This structure appears in a SHT_GNU_verneed section. */
typedef struct elf_internal_verneed {
@@ -246,6 +248,14 @@ typedef struct elf_internal_versym {
unsigned short vs_vers;
} Elf_Internal_Versym;
+/* Structure for syminfo section. */
+typedef struct
+{
+ unsigned short int si_boundto;
+ unsigned short int si_flags;
+} Elf_Internal_Syminfo;
+
+
#define elf32_internal_verdef elf_internal_verdef
#define elf64_internal_verdef elf_internal_verdef
#define elf32_internal_verdaux elf_internal_verdaux
@@ -267,6 +277,8 @@ typedef struct elf_internal_versym {
#define Elf64_Internal_Vernaux Elf_Internal_Vernaux
#define Elf32_Internal_Versym Elf_Internal_Versym
#define Elf64_Internal_Versym Elf_Internal_Versym
+#define Elf32_Internal_Syminfo Elf_Internal_Syminfo
+#define Elf64_Internal_Syminfo Elf_Internal_Syminfo
/* This structure is used to describe how sections should be assigned
to program segments. */
diff --git a/contrib/binutils/include/elf/mips.h b/contrib/binutils/include/elf/mips.h
index f6efad3..1e2a9f9 100644
--- a/contrib/binutils/include/elf/mips.h
+++ b/contrib/binutils/include/elf/mips.h
@@ -1,5 +1,5 @@
/* MIPS ELF support for BFD.
- Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
information in the System V Application Binary Interface, MIPS
@@ -27,6 +27,65 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _ELF_MIPS_H
#define _ELF_MIPS_H
+#include "elf/reloc-macros.h"
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_mips_reloc_type)
+ RELOC_NUMBER (R_MIPS_NONE, 0)
+ RELOC_NUMBER (R_MIPS_16, 1)
+ RELOC_NUMBER (R_MIPS_32, 2)
+ RELOC_NUMBER (R_MIPS_REL32, 3)
+ RELOC_NUMBER (R_MIPS_26, 4)
+ RELOC_NUMBER (R_MIPS_HI16, 5)
+ RELOC_NUMBER (R_MIPS_LO16, 6)
+ RELOC_NUMBER (R_MIPS_GPREL16, 7)
+ RELOC_NUMBER (R_MIPS_LITERAL, 8)
+ RELOC_NUMBER (R_MIPS_GOT16, 9)
+ RELOC_NUMBER (R_MIPS_PC16, 10)
+ RELOC_NUMBER (R_MIPS_CALL16, 11)
+ RELOC_NUMBER (R_MIPS_GPREL32, 12)
+ /* The remaining relocs are defined on Irix, although they are not
+ in the MIPS ELF ABI. */
+ RELOC_NUMBER (R_MIPS_UNUSED1, 13)
+ RELOC_NUMBER (R_MIPS_UNUSED2, 14)
+ RELOC_NUMBER (R_MIPS_UNUSED3, 15)
+ RELOC_NUMBER (R_MIPS_SHIFT5, 16)
+ RELOC_NUMBER (R_MIPS_SHIFT6, 17)
+ RELOC_NUMBER (R_MIPS_64, 18)
+ RELOC_NUMBER (R_MIPS_GOT_DISP, 19)
+ RELOC_NUMBER (R_MIPS_GOT_PAGE, 20)
+ RELOC_NUMBER (R_MIPS_GOT_OFST, 21)
+ RELOC_NUMBER (R_MIPS_GOT_HI16, 22)
+ RELOC_NUMBER (R_MIPS_GOT_LO16, 23)
+ RELOC_NUMBER (R_MIPS_SUB, 24)
+ RELOC_NUMBER (R_MIPS_INSERT_A, 25)
+ RELOC_NUMBER (R_MIPS_INSERT_B, 26)
+ RELOC_NUMBER (R_MIPS_DELETE, 27)
+ RELOC_NUMBER (R_MIPS_HIGHER, 28)
+ RELOC_NUMBER (R_MIPS_HIGHEST, 29)
+ RELOC_NUMBER (R_MIPS_CALL_HI16, 30)
+ RELOC_NUMBER (R_MIPS_CALL_LO16, 31)
+ RELOC_NUMBER (R_MIPS_SCN_DISP, 32)
+ RELOC_NUMBER (R_MIPS_REL16, 33)
+ RELOC_NUMBER (R_MIPS_ADD_IMMEDIATE, 34)
+ RELOC_NUMBER (R_MIPS_PJUMP, 35)
+ RELOC_NUMBER (R_MIPS_RELGOT, 36)
+ RELOC_NUMBER (R_MIPS_JALR, 37)
+ RELOC_NUMBER (R_MIPS_max, 38)
+ /* These relocs are used for the mips16. */
+ RELOC_NUMBER (R_MIPS16_26, 100)
+ RELOC_NUMBER (R_MIPS16_GPREL, 101)
+ /* These are GNU extensions to handle embedded-pic. */
+ RELOC_NUMBER (R_MIPS_PC32, 248)
+ RELOC_NUMBER (R_MIPS_PC64, 249)
+ RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
+ RELOC_NUMBER (R_MIPS_GNU_REL_LO16, 251)
+ RELOC_NUMBER (R_MIPS_GNU_REL_HI16, 252)
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
+ RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
+END_RELOC_NUMBERS
+
/* Processor specific flags for the ELF header e_flags field. */
/* At least one .noreorder directive appears in the source. */
@@ -42,6 +101,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Code in file uses new ABI (-n32 on Irix 6). */
#define EF_MIPS_ABI2 0x00000020
+/* Indicates code compiled for a 64-bit machine in 32-bit mode.
+ (regs are 32-bits wide.) */
+#define EF_MIPS_32BITMODE 0x00000100
+
/* Four bit MIPS architecture field. */
#define EF_MIPS_ARCH 0xf0000000
@@ -56,6 +119,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* -mips4 code. */
#define E_MIPS_ARCH_4 0x30000000
+
+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
+#define EF_MIPS_ABI 0x0000F000
+
+/* The original o32 abi. */
+#define E_MIPS_ABI_O32 0x00001000
+
+/* O32 extended to work on 64 bit architectures */
+#define E_MIPS_ABI_O64 0x00002000
+
+/* EABI in 32 bit mode */
+#define E_MIPS_ABI_EABI32 0x00003000
+
+/* EABI in 64 bit mode */
+#define E_MIPS_ABI_EABI64 0x00004000
+
+
+/* Machine variant if we know it. This field was invented at Cygnus,
+ but it is hoped that other vendors will adopt it. If some standard
+ is developed, this code should be changed to follow it. */
+
+#define EF_MIPS_MACH 0x00FF0000
+
+/* Cygnus is choosing values between 80 and 9F;
+ 00 - 7F should be left for a future standard;
+ the rest are open. */
+
+#define E_MIPS_MACH_3900 0x00810000
+
+#define E_MIPS_MACH_4010 0x00820000
+#define E_MIPS_MACH_4100 0x00830000
+#define E_MIPS_MACH_4650 0x00850000
+#define E_MIPS_MACH_4111 0x00880000
+
/* Processor specific section indices. These sections do not actually
exist. Symbols with a st_shndx field corresponding to one of these
@@ -106,6 +203,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Section contains register usage information. */
#define SHT_MIPS_REGINFO 0x70000006
+/* ??? */
+#define SHT_MIPS_PACKAGE 0x70000007
+
+/* ??? */
+#define SHT_MIPS_PACKSYM 0x70000008
+
+/* ??? */
+#define SHT_MIPS_RELD 0x70000009
+
/* Section contains interface information. */
#define SHT_MIPS_IFACE 0x7000000b
@@ -115,15 +221,86 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Section contains miscellaneous options. */
#define SHT_MIPS_OPTIONS 0x7000000d
+/* ??? */
+#define SHT_MIPS_SHDR 0x70000010
+
+/* ??? */
+#define SHT_MIPS_FDESC 0x70000011
+
+/* ??? */
+#define SHT_MIPS_EXTSYM 0x70000012
+
+/* ??? */
+#define SHT_MIPS_DENSE 0x70000013
+
+/* ??? */
+#define SHT_MIPS_PDESC 0x70000014
+
+/* ??? */
+#define SHT_MIPS_LOCSYM 0x70000015
+
+/* ??? */
+#define SHT_MIPS_AUXSYM 0x70000016
+
+/* ??? */
+#define SHT_MIPS_OPTSYM 0x70000017
+
+/* ??? */
+#define SHT_MIPS_LOCSTR 0x70000018
+
+/* ??? */
+#define SHT_MIPS_LINE 0x70000019
+
+/* ??? */
+#define SHT_MIPS_RFDESC 0x7000001a
+
+/* ??? */
+#define SHT_MIPS_DELTASYM 0x7000001b
+
+/* ??? */
+#define SHT_MIPS_DELTAINST 0x7000001c
+
+/* ??? */
+#define SHT_MIPS_DELTACLASS 0x7000001d
+
/* DWARF debugging section. */
#define SHT_MIPS_DWARF 0x7000001e
-/* I'm not sure what this is, but it appears on Irix 6. */
+/* ??? */
+#define SHT_MIPS_DELTADECL 0x7000001f
+
+/* List of libraries the binary depends on. Includes a time stamp, version
+ number. */
#define SHT_MIPS_SYMBOL_LIB 0x70000020
/* Events section. */
#define SHT_MIPS_EVENTS 0x70000021
+/* ??? */
+#define SHT_MIPS_TRANSLATE 0x70000022
+
+/* ??? */
+#define SHT_MIPS_PIXIE 0x70000023
+
+/* ??? */
+#define SHT_MIPS_XLATE 0x70000024
+
+/* ??? */
+#define SHT_MIPS_XLATE_DEBUG 0x70000025
+
+/* ??? */
+#define SHT_MIPS_WHIRL 0x70000026
+
+/* ??? */
+#define SHT_MIPS_EH_REGION 0x70000027
+
+/* ??? */
+#define SHT_MIPS_XLATE_OLD 0x70000028
+
+/* ??? */
+#define SHT_MIPS_PDR_EXCEPTION 0x70000029
+
+
/* A section of type SHT_MIPS_LIBLIST contains an array of the
following structure. The sh_link field is the section index of the
string table. The sh_info field is the number of entries in the
@@ -142,6 +319,16 @@ typedef struct
unsigned long l_flags;
} Elf32_Lib;
+/* The external version of Elf32_Lib. */
+typedef struct
+{
+ unsigned char l_name[4];
+ unsigned char l_time_stamp[4];
+ unsigned char l_checksum[4];
+ unsigned char l_version[4];
+ unsigned char l_flags[4];
+} Elf32_External_Lib;
+
/* The l_flags field of an Elf32_Lib structure may contain the
following flags. */
@@ -151,9 +338,26 @@ typedef struct
/* Ignore version incompatibilities at runtime. */
#define LL_IGNORE_INT_VER 0x00000002
+/* Require matching minor version number. */
+#define LL_REQUIRE_MINOR 0x00000004
+
+/* ??? */
+#define LL_EXPORTS 0x00000008
+
+/* Delay loading of this library until really needed. */
+#define LL_DELAY_LOAD 0x00000010
+
+/* ??? Delta C++ stuff ??? */
+#define LL_DELTA 0x00000020
+
+
/* A section of type SHT_MIPS_CONFLICT is an array of indices into the
.dynsym section. Each element has the following type. */
typedef unsigned long Elf32_Conflict;
+typedef unsigned char Elf32_External_Conflict[4];
+
+typedef unsigned long Elf64_Conflict;
+typedef unsigned char Elf64_External_Conflict[8];
/* A section of type SHT_MIPS_GPTAB contains information about how
much GP space would be required for different -G arguments. This
@@ -253,6 +457,9 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Runtime procedure table. */
#define PT_MIPS_RTPROC 0x70000001
+
+/* Options (for what ???). */
+#define PT_MIPS_OPTIONS 0x70000002
/* Processor specific dynamic array tags. */
@@ -274,6 +481,9 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Base address of the segment. */
#define DT_MIPS_BASE_ADDRESS 0x70000006
+/* ??? */
+#define DT_MIPS_MSYM 0x70000007
+
/* Address of .conflict section. */
#define DT_MIPS_CONFLICT 0x70000008
@@ -303,6 +513,84 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Address of run time loader map, used for debugging. */
#define DT_MIPS_RLD_MAP 0x70000016
+
+/* Delta C++ class definition. */
+#define DT_MIPS_DELTA_CLASS 0x70000017
+
+/* Number of entries in DT_MIPS_DELTA_CLASS. */
+#define DT_MIPS_DELTA_CLASS_NO 0x70000018
+
+/* Delta C++ class instances. */
+#define DT_MIPS_DELTA_INSTANCE 0x70000019
+
+/* Number of entries in DT_MIPS_DELTA_INSTANCE. */
+#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
+
+/* Delta relocations. */
+#define DT_MIPS_DELTA_RELOC 0x7000001b
+
+/* Number of entries in DT_MIPS_DELTA_RELOC. */
+#define DT_MIPS_DELTA_RELOC_NO 0x7000001c
+
+/* Delta symbols that Delta relocations refer to. */
+#define DT_MIPS_DELTA_SYM 0x7000001d
+
+/* Number of entries in DT_MIPS_DELTA_SYM. */
+#define DT_MIPS_DELTA_SYM_NO 0x7000001e
+
+/* Delta symbols that hold class declarations. */
+#define DT_MIPS_DELTA_CLASSSYM 0x70000020
+
+/* Number of entries in DT_MIPS_DELTA_CLASSSYM. */
+#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
+
+/* Flags indicating information about C++ flavor. */
+#define DT_MIPS_CXX_FLAGS 0x70000022
+
+/* Pixie information (???). */
+#define DT_MIPS_PIXIE_INIT 0x70000023
+
+/* ??? */
+#define DT_MIPS_SYMBOL_LIB 0x70000024
+
+/* ??? */
+#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
+
+/* ??? */
+#define DT_MIPS_LOCAL_GOTIDX 0x70000026
+
+/* ??? */
+#define DT_MIPS_HIDDEN_GOTIDX 0x70000027
+
+/* ??? */
+#define DT_MIPS_PROTECTED_GOTIDX 0x70000028
+
+/* Address of `.MIPS.options'. */
+#define DT_MIPS_OPTIONS 0x70000029
+
+/* Address of `.interface'. */
+#define DT_MIPS_INTERFACE 0x7000002a
+
+/* ??? */
+#define DT_MIPS_DYNSTR_ALIGN 0x7000002b
+
+/* Size of the .interface section. */
+#define DT_MIPS_INTERFACE_SIZE 0x7000002c
+
+/* Size of rld_text_resolve function stored in the GOT. */
+#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
+
+/* Default suffix of DSO to be added by rld on dlopen() calls. */
+#define DT_MIPS_PERF_SUFFIX 0x7000002e
+
+/* Size of compact relocation section (O32). */
+#define DT_MIPS_COMPACT_SIZE 0x7000002f
+
+/* GP value for auxiliary GOTs. */
+#define DT_MIPS_GP_VALUE 0x70000030
+
+/* Address of auxiliary .dynamic. */
+#define DT_MIPS_AUX_DYNAMIC 0x70000031
/* Flags which may appear in a DT_MIPS_FLAGS entry. */
@@ -318,14 +606,27 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* Ignore LD_LIBRARY_PATH. */
#define RHS_NO_LIBRARY_REPLACEMENT \
0x00000004
+
+#define RHF_NO_MOVE 0x00000008
+#define RHF_SGI_ONLY 0x00000010
+#define RHF_GUARANTEE_INIT 0x00000020
+#define RHF_DELTA_C_PLUS_PLUS 0x00000040
+#define RHF_GUARANTEE_START_INIT 0x00000080
+#define RHF_PIXIE 0x00000100
+#define RHF_DEFAULT_DELAY_LOAD 0x00000200
+#define RHF_REQUICKSTART 0x00000400
+#define RHF_REQUICKSTARTED 0x00000800
+#define RHF_CORD 0x00001000
+#define RHF_NO_UNRES_UNDEF 0x00002000
+#define RHF_RLD_ORDER_SAFE 0x00004000
/* Special values for the st_other field in the symbol table. These
are used in an Irix 5 dynamic symbol table. */
-#define STO_DEFAULT 0x00
-#define STO_INTERNAL 0x01
-#define STO_HIDDEN 0x02
-#define STO_PROTECTED 0x03
+#define STO_DEFAULT STV_DEFAULT
+#define STO_INTERNAL STV_INTERNAL
+#define STO_HIDDEN STV_HIDDEN
+#define STO_PROTECTED STV_PROTECTED
/* This value is used for a mips16 .text symbol. */
#define STO_MIPS16 0xf0
@@ -472,7 +773,28 @@ extern void bfd_mips_elf_swap_options_out
/* Section padding information. */
#define ODK_PAD 3
-/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_Reginfo
+/* Hardware workarounds performed. */
+#define ODK_HWPATCH 4
+
+/* Fill value used by the linker. */
+#define ODK_FILL 5
+
+/* Reserved space for desktop tools. */
+#define ODK_TAGS 6
+
+/* Hardware workarounds, AND bits when merging. */
+#define ODK_HWAND 7
+
+/* Hardware workarounds, OR bits when merging. */
+#define ODK_HWOR 8
+
+/* GP group to use for text/data sections. */
+#define ODK_GP_GROUP 9
+
+/* ID information. */
+#define ODK_IDENT 10
+
+/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_RegInfo
structure. In the 64 bit ABI, it is the following structure. The
info field of the options header is not used. */
@@ -500,10 +822,79 @@ typedef struct
bfd_vma ri_gp_value;
} Elf64_Internal_RegInfo;
+typedef struct
+{
+ /* The hash value computed from the name of the corresponding
+ dynamic symbol. */
+ unsigned char ms_hash_value[4];
+ /* Contains both the dynamic relocation index and the symbol flags
+ field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used
+ to access the individual values. The dynamic relocation index
+ identifies the first entry in the .rel.dyn section that
+ references the dynamic symbol corresponding to this msym entry.
+ If the index is 0, no dynamic relocations are associated with the
+ symbol. The symbol flags field is reserved for future use. */
+ unsigned char ms_info[4];
+} Elf32_External_Msym;
+
+typedef struct
+{
+ /* The hash value computed from the name of the corresponding
+ dynamic symbol. */
+ unsigned long ms_hash_value;
+ /* Contains both the dynamic relocation index and the symbol flags
+ field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used
+ to access the individual values. The dynamic relocation index
+ identifies the first entry in the .rel.dyn section that
+ references the dynamic symbol corresponding to this msym entry.
+ If the index is 0, no dynamic relocations are associated with the
+ symbol. The symbol flags field is reserved for future use. */
+ unsigned long ms_info;
+} Elf32_Internal_Msym;
+
+#define ELF32_MS_REL_INDEX(i) ((i) >> 8)
+#define ELF32_MS_FLAGS(i) (i) & 0xff)
+#define ELF32_MS_INFO(r, f) (((r) << 8) + ((f) & 0xff))
+
/* MIPS ELF reginfo swapping routines. */
extern void bfd_mips_elf64_swap_reginfo_in
PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *));
extern void bfd_mips_elf64_swap_reginfo_out
PARAMS ((bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *));
+/* Masks for the info work of an ODK_EXCEPTIONS descriptor. */
+#define OEX_FPU_MIN 0x1f /* FPEs which must be enabled. */
+#define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */
+#define OEX_PAGE0 0x10000 /* Page zero must be mapped. */
+#define OEX_SMM 0x20000 /* Force sequential memory mode. */
+#define OEX_FPDBUG 0x40000 /* Force floating-point debug mode. */
+#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. */
+
+/* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */
+#define OEX_FPU_INVAL 0x10 /* Invalid operation exception. */
+#define OEX_FPU_DIV0 0x08 /* Division by zero exception. */
+#define OEX_FPU_OFLO 0x04 /* Overflow exception. */
+#define OEX_FPU_UFLO 0x02 /* Underflow exception. */
+#define OEX_FPU_INEX 0x01 /* Inexact exception. */
+
+/* Masks for the info word of an ODK_PAD descriptor. */
+#define OPAD_PREFIX 0x01
+#define OPAD_POSTFIX 0x02
+#define OPAD_SYMBOL 0x04
+
+/* Masks for the info word of an ODK_HWPATCH descriptor. */
+#define OHW_R4KEOP 0x01 /* R4000 end-of-page patch. */
+#define OHW_R8KPFETCH 0x02 /* May need R8000 prefetch patch. */
+#define OHW_R5KEOP 0x04 /* R5000 end-of-page patch. */
+#define OHW_R5KCVTL 0x08 /* R5000 cvt.[ds].l bug (clean == 1). */
+
+/* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */
+#define OGP_GROUP 0x0000ffff /* GP group number. */
+#define OGP_SELF 0xffff0000 /* Self-contained GP groups. */
+
+/* Masks for the info word of an ODK_HWAND/ODK_HWOR descriptor. */
+#define OHWA0_R4KEOP_CHECKED 0x00000001
+#define OHWA0_R4KEOP_CLEAN 0x00000002
+
+
#endif /* _ELF_MIPS_H */
diff --git a/contrib/binutils/include/elf/ppc.h b/contrib/binutils/include/elf/ppc.h
new file mode 100644
index 0000000..b3116d8
--- /dev/null
+++ b/contrib/binutils/include/elf/ppc.h
@@ -0,0 +1,127 @@
+/* PPC ELF support for BFD.
+ Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+
+ By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
+ in the System V Application Binary Interface, PowerPC Processor Supplement
+ and the PowerPC Embedded Application Binary Interface (eabi).
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This file holds definitions specific to the PPC ELF ABI. Note
+ that most of this is not actually implemented by BFD. */
+
+#ifndef _ELF_PPC_H
+#define _ELF_PPC_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_ppc_reloc_type)
+ RELOC_NUMBER (R_PPC_NONE, 0)
+ RELOC_NUMBER (R_PPC_ADDR32, 1)
+ RELOC_NUMBER (R_PPC_ADDR24, 2)
+ RELOC_NUMBER (R_PPC_ADDR16, 3)
+ RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
+ RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
+ RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
+ RELOC_NUMBER (R_PPC_ADDR14, 7)
+ RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
+ RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
+ RELOC_NUMBER (R_PPC_REL24, 10)
+ RELOC_NUMBER (R_PPC_REL14, 11)
+ RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
+ RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
+ RELOC_NUMBER (R_PPC_GOT16, 14)
+ RELOC_NUMBER (R_PPC_GOT16_LO, 15)
+ RELOC_NUMBER (R_PPC_GOT16_HI, 16)
+ RELOC_NUMBER (R_PPC_GOT16_HA, 17)
+ RELOC_NUMBER (R_PPC_PLTREL24, 18)
+ RELOC_NUMBER (R_PPC_COPY, 19)
+ RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
+ RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
+ RELOC_NUMBER (R_PPC_RELATIVE, 22)
+ RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
+ RELOC_NUMBER (R_PPC_UADDR32, 24)
+ RELOC_NUMBER (R_PPC_UADDR16, 25)
+ RELOC_NUMBER (R_PPC_REL32, 26)
+ RELOC_NUMBER (R_PPC_PLT32, 27)
+ RELOC_NUMBER (R_PPC_PLTREL32, 28)
+ RELOC_NUMBER (R_PPC_PLT16_LO, 29)
+ RELOC_NUMBER (R_PPC_PLT16_HI, 30)
+ RELOC_NUMBER (R_PPC_PLT16_HA, 31)
+ RELOC_NUMBER (R_PPC_SDAREL16, 32)
+ RELOC_NUMBER (R_PPC_SECTOFF, 33)
+ RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
+ RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
+ RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
+
+/* The remaining relocs are from the Embedded ELF ABI, and are not
+ in the SVR4 ELF ABI. */
+ RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
+ RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
+ RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
+ RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
+ RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
+ RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
+ RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
+ RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
+ RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
+ RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
+ RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
+ RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
+
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
+ RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
+
+/* This is a phony reloc to handle any old fashioned TOC16 references
+ that may still be in object files. */
+ RELOC_NUMBER (R_PPC_TOC16, 255)
+
+ EMPTY_RELOC (R_PPC_max)
+END_RELOC_NUMBERS
+
+
+/* Processor specific flags for the ELF header e_flags field. */
+
+#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
+
+ /* CYGNUS local bits below */
+#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */
+#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */
+
+/* Processor specific section headers, sh_type field */
+
+#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
+ entries in this section \
+ based on the address \
+ specified in the associated \
+ symbol table entry. */
+
+/* Processor specific section flags, sh_flags field */
+
+#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
+ this section from executable \
+ and shared objects that it \
+ builds when those objects \
+ are not to be furhter \
+ relocated. */
+#endif /* _ELF_PPC_H */
diff --git a/contrib/binutils/include/elf/reloc-macros.h b/contrib/binutils/include/elf/reloc-macros.h
new file mode 100644
index 0000000..42174ca
--- /dev/null
+++ b/contrib/binutils/include/elf/reloc-macros.h
@@ -0,0 +1,116 @@
+/* Generic relocation support for BFD.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* These macros are used by the various *.h target specific header
+ files to either generate an enum containing all the known relocations
+ for that target, or if RELOC_MACROS_GEN_FUNC is defined, a recognition
+ function is generated instead. (This is used by binutils/readelf.c)
+
+ Given a header file like this:
+
+ START_RELOC_NUMBERS (foo)
+ RELOC_NUMBER (R_foo_NONE, 0)
+ RELOC_NUMBER (R_foo_32, 1)
+ FAKE_RELOC (R_foo_illegal, 2)
+ EMPTY_RELOC (R_foo_max)
+ END_RELOC_NUMBERS
+
+ Then the following will be produced by default (ie if
+ RELOC_MACROS_GEN_FUNC is *not* defined).
+
+ enum foo
+ {
+ foo = -1,
+ R_foo_NONE = 0,
+ R_foo_32 = 1,
+ R_foo_illegal = 2,
+ R_foo_max
+ };
+
+ If RELOC_MACROS_GEN_FUNC *is* defined, then instead the
+ following function will be generated:
+
+ static const char * foo PARAMS ((unsigned long rtype));
+ static const char *
+ foo (rtype)
+ unsigned long rtype;
+ {
+ switch (rtype)
+ {
+ case 0: return "R_foo_NONE";
+ case 1: return "R_foo_32";
+ default: return NULL;
+ }
+ }
+ */
+
+#ifndef _RELOC_MACROS_H
+#define _RELOC_MACROS_H
+
+#ifdef RELOC_MACROS_GEN_FUNC
+
+/* This function takes the relocation number and returns the
+ string version name of the name of that relocation. If
+ the relocation is not recognised, NULL is returned. */
+
+#define START_RELOC_NUMBERS(name) \
+static const char * name PARAMS ((unsigned long rtype)); \
+static const char * \
+name (rtype) \
+ unsigned long rtype; \
+{ \
+ switch (rtype) \
+ {
+
+#ifdef __STDC__
+#define RELOC_NUMBER(name, number) case number : return #name ;
+#else
+#define RELOC_NUMBER(name, number) case number : return "name" ;
+#endif
+
+#define FAKE_RELOC(name, number)
+#define EMPTY_RELOC(name)
+
+#define END_RELOC_NUMBERS \
+ default: return NULL; \
+ } \
+}
+
+
+#else /* Default to generating enum. */
+
+/* Some compilers cannot cope with an enum that ends with a trailing
+ comma, so START_RELOC_NUMBERS creates a fake reloc entry, (initialised
+ to -1 so that the first real entry will still default to 0). Further
+ entries then prepend a comma to their definitions, creating a list
+ of enumerator entries that will satisfy these compilers. */
+#ifdef __STDC__
+#define START_RELOC_NUMBERS(name) enum name { _##name = -1
+#else
+#define START_RELOC_NUMBERS(name) enum name { name = -1
+#endif
+
+#define RELOC_NUMBER(name, number) , name = number
+#define FAKE_RELOC(name, number) , name = number
+#define EMPTY_RELOC(name) , name
+#define END_RELOC_NUMBERS };
+
+#endif
+
+#endif /* RELOC_MACROS_H */
diff --git a/contrib/binutils/include/elf/sh.h b/contrib/binutils/include/elf/sh.h
new file mode 100644
index 0000000..faee509
--- /dev/null
+++ b/contrib/binutils/include/elf/sh.h
@@ -0,0 +1,82 @@
+/* SH ELF support for BFD.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_SH_H
+#define _ELF_SH_H
+
+/* Processor specific flags for the ELF header e_flags field. */
+
+#define EF_SH_MACH_MASK 0x1f
+#define EF_SH_UNKNOWN 0 /* For backwards compatibility. */
+#define EF_SH1 1
+#define EF_SH2 2
+#define EF_SH3 3
+#define EF_SH_HAS_DSP(flags) ((flags) & 4)
+#define EF_SH_DSP 4
+#define EF_SH3_DSP 5
+#define EF_SH_HAS_FP(flags) ((flags) & 8)
+#define EF_SH3E 8
+#define EF_SH4 9
+
+#define EF_SH_MERGE_MACH(mach1, mach2) \
+ (((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
+ || ((mach1) == EF_SH_DSP \
+ && ((mach2) == EF_SH3 || (mach2) == EF_SH_UNKNOWN))) \
+ ? EF_SH3_DSP \
+ : (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
+ || ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
+ ? EF_SH3 \
+ : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
+ || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
+ ? EF_SH4 \
+ : ((mach1) > (mach2) ? (mach1) : (mach2)))
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+/* Relocations 25ff are GNU extensions.
+ 25..33 are used for relaxation and use the same constants as COFF uses. */
+START_RELOC_NUMBERS (elf_sh_reloc_type)
+ RELOC_NUMBER (R_SH_NONE, 0)
+ RELOC_NUMBER (R_SH_DIR32, 1)
+ RELOC_NUMBER (R_SH_REL32, 2)
+ RELOC_NUMBER (R_SH_DIR8WPN, 3)
+ RELOC_NUMBER (R_SH_IND12W, 4)
+ RELOC_NUMBER (R_SH_DIR8WPL, 5)
+ RELOC_NUMBER (R_SH_DIR8WPZ, 6)
+ RELOC_NUMBER (R_SH_DIR8BP, 7)
+ RELOC_NUMBER (R_SH_DIR8W, 8)
+ RELOC_NUMBER (R_SH_DIR8L, 9)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 10)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 24)
+ RELOC_NUMBER (R_SH_SWITCH16, 25)
+ RELOC_NUMBER (R_SH_SWITCH32, 26)
+ RELOC_NUMBER (R_SH_USES, 27)
+ RELOC_NUMBER (R_SH_COUNT, 28)
+ RELOC_NUMBER (R_SH_ALIGN, 29)
+ RELOC_NUMBER (R_SH_CODE, 30)
+ RELOC_NUMBER (R_SH_DATA, 31)
+ RELOC_NUMBER (R_SH_LABEL, 32)
+ RELOC_NUMBER (R_SH_SWITCH8, 33)
+ RELOC_NUMBER (R_SH_GNU_VTINHERIT, 34)
+ RELOC_NUMBER (R_SH_GNU_VTENTRY, 35)
+ EMPTY_RELOC (R_SH_max)
+END_RELOC_NUMBERS
+
+#endif
diff --git a/contrib/binutils/include/elf/sparc.h b/contrib/binutils/include/elf/sparc.h
index d9aed21..390e4a8 100644
--- a/contrib/binutils/include/elf/sparc.h
+++ b/contrib/binutils/include/elf/sparc.h
@@ -1,5 +1,5 @@
/* SPARC ELF support for BFD.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -29,6 +29,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */
#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */
#define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */
+#define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */
+
+#define EF_SPARC_LEDATA 0x800000 /* little endian data */
/* This name is used in the V9 ABI. */
#define EF_SPARC_EXT_MASK 0xffff00 /* reserved for vendor extensions */
@@ -53,65 +56,98 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STT_REGISTER 13 /* global reg reserved to app. */
-/* Relocation types. */
+#include "elf/reloc-macros.h"
-enum elf_sparc_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_WDISP30, R_SPARC_WDISP22,
- R_SPARC_HI22, R_SPARC_22,
- R_SPARC_13, R_SPARC_LO10,
- R_SPARC_GOT10, R_SPARC_GOT13, R_SPARC_GOT22,
- R_SPARC_PC10, R_SPARC_PC22,
- R_SPARC_WPLT30,
- R_SPARC_COPY,
- R_SPARC_GLOB_DAT, R_SPARC_JMP_SLOT,
- R_SPARC_RELATIVE,
- R_SPARC_UA32,
-
- /* ??? These 6 relocs are new but not currently used. For binary
- compatility in the sparc64-elf toolchain, we leave them out.
- A non-binary upward compatible change is expected for sparc64-elf. */
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_sparc_reloc_type)
+ RELOC_NUMBER (R_SPARC_NONE, 0)
+ RELOC_NUMBER (R_SPARC_8, 1)
+ RELOC_NUMBER (R_SPARC_16, 2)
+ RELOC_NUMBER (R_SPARC_32, 3)
+ RELOC_NUMBER (R_SPARC_DISP8, 4)
+ RELOC_NUMBER (R_SPARC_DISP16, 5)
+ RELOC_NUMBER (R_SPARC_DISP32, 6)
+ RELOC_NUMBER (R_SPARC_WDISP30, 7)
+ RELOC_NUMBER (R_SPARC_WDISP22, 8)
+ RELOC_NUMBER (R_SPARC_HI22, 9)
+ RELOC_NUMBER (R_SPARC_22, 10)
+ RELOC_NUMBER (R_SPARC_13, 11)
+ RELOC_NUMBER (R_SPARC_LO10, 12)
+ RELOC_NUMBER (R_SPARC_GOT10, 13)
+ RELOC_NUMBER (R_SPARC_GOT13, 14)
+ RELOC_NUMBER (R_SPARC_GOT22, 15)
+ RELOC_NUMBER (R_SPARC_PC10, 16)
+ RELOC_NUMBER (R_SPARC_PC22, 17)
+ RELOC_NUMBER (R_SPARC_WPLT30, 18)
+ RELOC_NUMBER (R_SPARC_COPY, 19)
+ RELOC_NUMBER (R_SPARC_GLOB_DAT, 20)
+ RELOC_NUMBER (R_SPARC_JMP_SLOT, 21)
+ RELOC_NUMBER (R_SPARC_RELATIVE, 22)
+ RELOC_NUMBER (R_SPARC_UA32, 23)
+
+ /* ??? These 6 relocs are new but not currently used. For binary
+ compatility in the sparc64-elf toolchain, we leave them out.
+ A non-binary upward compatible change is expected for sparc64-elf. */
#ifndef SPARC64_OLD_RELOCS
- /* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */
- R_SPARC_PLT32, R_SPARC_HIPLT22, R_SPARC_LOPLT10,
- R_SPARC_PCPLT32, R_SPARC_PCPLT22, R_SPARC_PCPLT10,
+ /* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */
+ RELOC_NUMBER (R_SPARC_PLT32, 24)
+ RELOC_NUMBER (R_SPARC_HIPLT22, 25)
+ RELOC_NUMBER (R_SPARC_LOPLT10, 26)
+ RELOC_NUMBER (R_SPARC_PCPLT32, 27)
+ RELOC_NUMBER (R_SPARC_PCPLT22, 28)
+ RELOC_NUMBER (R_SPARC_PCPLT10, 29)
#endif
- /* v9 relocs */
- R_SPARC_10, R_SPARC_11, R_SPARC_64,
- R_SPARC_OLO10, R_SPARC_HH22, R_SPARC_HM10, R_SPARC_LM22,
- R_SPARC_PC_HH22, R_SPARC_PC_HM10, R_SPARC_PC_LM22,
- R_SPARC_WDISP16, R_SPARC_WDISP19,
- R_SPARC_UNUSED_42,
- R_SPARC_7, R_SPARC_5, R_SPARC_6,
- R_SPARC_DISP64, R_SPARC_PLT64,
- R_SPARC_HIX22, R_SPARC_LOX10,
- R_SPARC_H44, R_SPARC_M44, R_SPARC_L44,
- R_SPARC_REGISTER,
- R_SPARC_UA64, R_SPARC_UA16,
-
- R_SPARC_max
-};
+ /* v9 relocs */
+ RELOC_NUMBER (R_SPARC_10, 30)
+ RELOC_NUMBER (R_SPARC_11, 31)
+ RELOC_NUMBER (R_SPARC_64, 32)
+ RELOC_NUMBER (R_SPARC_OLO10, 33)
+ RELOC_NUMBER (R_SPARC_HH22, 34)
+ RELOC_NUMBER (R_SPARC_HM10, 35)
+ RELOC_NUMBER (R_SPARC_LM22, 36)
+ RELOC_NUMBER (R_SPARC_PC_HH22, 37)
+ RELOC_NUMBER (R_SPARC_PC_HM10, 38)
+ RELOC_NUMBER (R_SPARC_PC_LM22, 39)
+ RELOC_NUMBER (R_SPARC_WDISP16, 40)
+ RELOC_NUMBER (R_SPARC_WDISP19, 41)
+ RELOC_NUMBER (R_SPARC_UNUSED_42, 42)
+ RELOC_NUMBER (R_SPARC_7, 43)
+ RELOC_NUMBER (R_SPARC_5, 44)
+ RELOC_NUMBER (R_SPARC_6, 45)
+ RELOC_NUMBER (R_SPARC_DISP64, 46)
+ RELOC_NUMBER (R_SPARC_PLT64, 47)
+ RELOC_NUMBER (R_SPARC_HIX22, 48)
+ RELOC_NUMBER (R_SPARC_LOX10, 49)
+ RELOC_NUMBER (R_SPARC_H44, 50)
+ RELOC_NUMBER (R_SPARC_M44, 51)
+ RELOC_NUMBER (R_SPARC_L44, 52)
+ RELOC_NUMBER (R_SPARC_REGISTER, 53)
+ RELOC_NUMBER (R_SPARC_UA64, 54)
+ RELOC_NUMBER (R_SPARC_UA16, 55)
+
+ /* little endian data relocs */
+ RELOC_NUMBER (R_SPARC_REV32, 56)
+
+ EMPTY_RELOC (R_SPARC_max_std)
+
+ RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
+ RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
+
+ EMPTY_RELOC (R_SPARC_max)
+END_RELOC_NUMBERS
/* Relocation macros. */
-#define ELF64_R_TYPE_DATA(info) (((bfd_vma) (info) << 32) >> 40)
-#define ELF64_R_TYPE_ID(info) (((bfd_vma) (info) << 56) >> 56)
-#define ELF64_R_TYPE_INFO(data, type) (((bfd_vma) (data) << 8) \
- + (bfd_vma) (type))
+#define ELF64_R_TYPE_DATA(info) \
+ (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000)
+#define ELF64_R_TYPE_ID(info) \
+ ((info) & 0xff)
+#define ELF64_R_TYPE_INFO(data, type) \
+ (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type))
-#define DT_SPARC_REGISTER 0x70000001
-
-/*
- * FIXME: NOT ABI -- GET RID OF THIS
- * Defines the format used by the .plt. Currently defined values are
- * 0 -- reserved to SI
- * 1 -- absolute address in .got.plt
- * 2 -- got-relative address in .got.plt
- */
+/* Values for Elf64_Dyn.d_tag. */
-#define DT_SPARC_PLTFMT 0x70000001
+#define DT_SPARC_REGISTER 0x70000001
#endif /* _ELF_SPARC_H */
diff --git a/contrib/binutils/include/elf/v850.h b/contrib/binutils/include/elf/v850.h
index cc815c5..d443b7f 100644
--- a/contrib/binutils/include/elf/v850.h
+++ b/contrib/binutils/include/elf/v850.h
@@ -32,6 +32,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* v850 code. */
#define E_V850_ARCH 0x00000000
+/* v850e code. */
+#define E_V850E_ARCH 0x10000000
+
+/* v850ea code. */
+#define E_V850EA_ARCH 0x20000000
/* Flags for the st_other field */
@@ -42,27 +47,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define V850_OTHER_ERROR 0x80 /* symbol had an error reported */
/* V850 relocations */
-enum v850_reloc_type
-{
- R_V850_NONE = 0,
- R_V850_9_PCREL,
- R_V850_22_PCREL,
- R_V850_HI16_S,
- R_V850_HI16,
- R_V850_LO16,
- R_V850_32,
- R_V850_16,
- R_V850_8,
- R_V850_SDA_16_16_OFFSET, /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
- R_V850_SDA_15_16_OFFSET, /* For ld.w, ld.h, ld.hu, st.w, st.h */
- R_V850_ZDA_16_16_OFFSET, /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
- R_V850_ZDA_15_16_OFFSET, /* For ld.w, ld.h, ld.hu, st.w, st.h */
- R_V850_TDA_6_8_OFFSET, /* For sst.w, sld.w */
- R_V850_TDA_7_8_OFFSET, /* For sst.h, sld.h */
- R_V850_TDA_7_7_OFFSET, /* For sst.b, sld.b */
- R_V850_TDA_16_16_OFFSET, /* For set1, clr1, not1, tst1, movea, movhi */
- R_V850_max
-};
+#include "elf/reloc-macros.h"
+
+START_RELOC_NUMBERS (v850_reloc_type)
+ RELOC_NUMBER (R_V850_NONE, 0)
+ RELOC_NUMBER (R_V850_9_PCREL, 1)
+ RELOC_NUMBER (R_V850_22_PCREL, 2)
+ RELOC_NUMBER (R_V850_HI16_S, 3)
+ RELOC_NUMBER (R_V850_HI16, 4)
+ RELOC_NUMBER (R_V850_LO16, 5)
+ RELOC_NUMBER (R_V850_32, 6)
+ RELOC_NUMBER (R_V850_16, 7)
+ RELOC_NUMBER (R_V850_8, 8)
+ RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
+ RELOC_NUMBER( R_V850_SDA_15_16_OFFSET, 10) /* For ld.w, ld.h, ld.hu, st.w, st.h */
+ RELOC_NUMBER( R_V850_ZDA_16_16_OFFSET, 11) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
+ RELOC_NUMBER( R_V850_ZDA_15_16_OFFSET, 12) /* For ld.w, ld.h, ld.hu, st.w, st.h */
+ RELOC_NUMBER( R_V850_TDA_6_8_OFFSET, 13) /* For sst.w, sld.w */
+ RELOC_NUMBER( R_V850_TDA_7_8_OFFSET, 14) /* For sst.h, sld.h */
+ RELOC_NUMBER( R_V850_TDA_7_7_OFFSET, 15) /* For sst.b, sld.b */
+ RELOC_NUMBER( R_V850_TDA_16_16_OFFSET, 16) /* For set1, clr1, not1, tst1, movea, movhi */
+/* CYGNUS LOCAL v850e */
+ RELOC_NUMBER( R_V850_TDA_4_5_OFFSET, 17) /* For sld.hu */
+ RELOC_NUMBER( R_V850_TDA_4_4_OFFSET, 18) /* For sld.bu */
+ RELOC_NUMBER( R_V850_SDA_16_16_SPLIT_OFFSET, 19) /* For ld.bu */
+ RELOC_NUMBER( R_V850_ZDA_16_16_SPLIT_OFFSET, 20) /* For ld.bu */
+ RELOC_NUMBER( R_V850_CALLT_6_7_OFFSET, 21) /* For callt */
+ RELOC_NUMBER( R_V850_CALLT_16_16_OFFSET, 22) /* For callt */
+/* END CYGNUS LOCAL */
+ RELOC_NUMBER (R_V850_GNU_VTINHERIT, 23)
+ RELOC_NUMBER (R_V850_GNU_VTENTRY, 24)
+
+ EMPTY_RELOC (R_V850_max)
+END_RELOC_NUMBERS
/* Processor specific section indices. These sections do not actually
diff --git a/contrib/binutils/include/fnmatch.h b/contrib/binutils/include/fnmatch.h
index 1a653ab..d5eb700 100644
--- a/contrib/binutils/include/fnmatch.h
+++ b/contrib/binutils/include/fnmatch.h
@@ -15,7 +15,8 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
#ifndef _FNMATCH_H
diff --git a/contrib/binutils/include/getopt.h b/contrib/binutils/include/getopt.h
index c4adc30..fb30719 100644
--- a/contrib/binutils/include/getopt.h
+++ b/contrib/binutils/include/getopt.h
@@ -2,7 +2,7 @@
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+ Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/contrib/binutils/include/hashtab.h b/contrib/binutils/include/hashtab.h
new file mode 100644
index 0000000..5fe2393
--- /dev/null
+++ b/contrib/binutils/include/hashtab.h
@@ -0,0 +1,128 @@
+/* An expandable hash tables datatype.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Vladimir Makarov (vmakarov@cygnus.com).
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This package implements basic hash table functionality. It is possible
+ to search for an entry, create an entry and destroy an entry.
+
+ Elements in the table are generic pointers.
+
+ The size of the table is not fixed; if the occupancy of the table
+ grows too high the hash table will be expanded.
+
+ The abstract data implementation is based on generalized Algorithm D
+ from Knuth's book "The art of computer programming". Hash table is
+ expanded by creation of new hash table and transferring elements from
+ the old table to the new table. */
+
+#ifndef __HASHTAB_H__
+#define __HASHTAB_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <ansidecl.h>
+
+/* Callback function pointer types. */
+
+/* Calculate hash of a table entry. */
+typedef unsigned int (*htab_hash) PARAMS ((const void *));
+
+/* Compare a table entry with a possible entry. The entry already in
+ the table always comes first, so the second element can be of a
+ different type (but in this case htab_find and htab_find_slot
+ cannot be used; instead the variants that accept a hash value
+ must be used). */
+typedef int (*htab_eq) PARAMS ((const void *, const void *));
+
+/* Cleanup function called whenever a live element is removed from
+ the hash table. */
+typedef void (*htab_del) PARAMS ((void *));
+
+/* Function called by htab_traverse for each live element. The first
+ arg is the slot of the element (which can be passed to htab_clear_slot
+ if desired), the second arg is the auxiliary pointer handed to
+ htab_traverse. Return 1 to continue scan, 0 to stop. */
+typedef int (*htab_trav) PARAMS ((void **, void *));
+
+/* Hash tables are of the following type. The structure
+ (implementation) of this type is not needed for using the hash
+ tables. All work with hash table should be executed only through
+ functions mentioned below. */
+
+struct htab
+{
+ /* Pointer to hash function. */
+ htab_hash hash_f;
+
+ /* Pointer to comparison function. */
+ htab_eq eq_f;
+
+ /* Pointer to cleanup function. */
+ htab_del del_f;
+
+ /* Table itself. */
+ void **entries;
+
+ /* Current size (in entries) of the hash table */
+ size_t size;
+
+ /* Current number of elements including also deleted elements */
+ size_t n_elements;
+
+ /* Current number of deleted elements in the table */
+ size_t n_deleted;
+
+ /* The following member is used for debugging. Its value is number
+ of all calls of `htab_find_slot' for the hash table. */
+ unsigned int searches;
+
+ /* The following member is used for debugging. Its value is number
+ of collisions fixed for time of work with the hash table. */
+ unsigned int collisions;
+};
+
+typedef struct htab *htab_t;
+
+/* The prototypes of the package functions. */
+
+extern htab_t htab_create PARAMS ((size_t, htab_hash,
+ htab_eq, htab_del));
+extern void htab_delete PARAMS ((htab_t));
+extern void htab_empty PARAMS ((htab_t));
+
+extern void *htab_find PARAMS ((htab_t, const void *));
+extern void **htab_find_slot PARAMS ((htab_t, const void *, int));
+extern void *htab_find_with_hash PARAMS ((htab_t, const void *,
+ unsigned int));
+extern void **htab_find_slot_with_hash PARAMS ((htab_t, const void *,
+ unsigned int, int));
+extern void htab_clear_slot PARAMS ((htab_t, void **));
+extern void htab_remove_elt PARAMS ((htab_t, void *));
+
+extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
+
+extern size_t htab_size PARAMS ((htab_t));
+extern size_t htab_elements PARAMS ((htab_t));
+extern double htab_collisions PARAMS ((htab_t));
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __HASHTAB_H */
diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h
index 951e156..9a536a4 100644
--- a/contrib/binutils/include/libiberty.h
+++ b/contrib/binutils/include/libiberty.h
@@ -19,7 +19,7 @@ extern "C" {
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
-extern char **buildargv PARAMS ((char *));
+extern char **buildargv PARAMS ((char *)) ATTRIBUTE_MALLOC;
/* Free a vector returned by buildargv. */
@@ -28,7 +28,7 @@ extern void freeargv PARAMS ((char **));
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
-extern char **dupargv PARAMS ((char **));
+extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
/* Return the last component of a path name. Note that we can't use a
@@ -36,7 +36,7 @@ extern char **dupargv PARAMS ((char **));
across different systems, sometimes as "char *" and sometimes as
"const char *" */
-#if defined(__GNU_LIBRARY__ ) || defined (__linux__)
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();
@@ -45,19 +45,28 @@ extern char *basename ();
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
Allocates memory using xmalloc. */
-extern char *concat PARAMS ((const char *, ...));
+extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
/* Check whether two file descriptors refer to the same file. */
extern int fdmatch PARAMS ((int fd1, int fd2));
+/* Get the working directory. The result is cached, so don't call
+ chdir() between calls to getpwd(). */
+
+extern char * getpwd PARAMS ((void));
+
/* Get the amount of time the process has run, in microseconds. */
extern long get_run_time PARAMS ((void));
/* Choose a temporary directory to use for scratch files. */
-extern char *choose_temp_base PARAMS ((void));
+extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC;
+
+/* Return a temporary file name or NULL if unable to create one. */
+
+extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC;
/* Allocate memory filled with spaces. Allocates using malloc. */
@@ -108,12 +117,7 @@ extern int xatexit PARAMS ((void (*fn) (void)));
/* Exit, calling all the functions registered with xatexit. */
-#ifndef __GNUC__
-extern void xexit PARAMS ((int status));
-#else
-typedef void libiberty_voidfn PARAMS ((int status));
-__volatile__ libiberty_voidfn xexit;
-#endif
+extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
/* Set the program name used by xmalloc. */
@@ -126,19 +130,29 @@ extern void xmalloc_set_program_name PARAMS ((const char *));
#ifdef ANSI_PROTOTYPES
/* Get a definition for size_t. */
#include <stddef.h>
+/* Get a definition for va_list. */
+#include <stdarg.h>
#endif
-extern PTR xmalloc PARAMS ((size_t));
+extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC;
-/* Reallocate memory without fail. This works like xmalloc.
+/* Reallocate memory without fail. This works like xmalloc. Note,
+ realloc type functions are not suitable for attribute malloc since
+ they may return the same address across multiple calls. */
+
+extern PTR xrealloc PARAMS ((PTR, size_t));
- FIXME: We do not declare the parameter types for the same reason as
+/* Allocate memory without fail and set it to zero. This works like
xmalloc. */
-extern PTR xrealloc PARAMS ((PTR, size_t));
+extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC;
/* Copy a string into a memory buffer without fail. */
-extern char *xstrdup PARAMS ((const char *));
+extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+
+/* Copy an existing memory buffer to a new memory buffer without fail. */
+
+extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
/* hex character manipulation routines */
@@ -168,6 +182,17 @@ extern int pexecute PARAMS ((const char *, char * const *, const char *,
extern int pwait PARAMS ((int, int *, int));
+/* Like sprintf but provides a pointer to malloc'd storage, which must
+ be freed by the caller. */
+
+extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
+
+/* Like vsprintf but provides a pointer to malloc'd storage, which
+ must be freed by the caller. */
+
+extern int vasprintf PARAMS ((char **, const char *, va_list))
+ ATTRIBUTE_PRINTF(2,0);
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/binutils/include/objalloc.h b/contrib/binutils/include/objalloc.h
index 24f87f8..0b451cd 100644
--- a/contrib/binutils/include/objalloc.h
+++ b/contrib/binutils/include/objalloc.h
@@ -14,7 +14,8 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
#ifndef OBJALLOC_H
#define OBJALLOC_H
diff --git a/contrib/binutils/include/obstack.h b/contrib/binutils/include/obstack.h
index ffc6b9e..a20ab55 100644
--- a/contrib/binutils/include/obstack.h
+++ b/contrib/binutils/include/obstack.h
@@ -1,19 +1,24 @@
/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@gnu.org.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
/* Summary:
@@ -100,42 +105,55 @@ Summary:
/* Don't do the contents of this file more than once. */
-#ifndef __OBSTACK_H__
-#define __OBSTACK_H__
+#ifndef _OBSTACK_H
+#define _OBSTACK_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/* We use subtraction of (char *) 0 instead of casting to int
because on word-addressable machines a simple cast to int
may ignore the byte-within-word field of the pointer. */
#ifndef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((P) - (char *) 0)
+# define __PTR_TO_INT(P) ((P) - (char *) 0)
#endif
#ifndef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((P) + (char *) 0)
+# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
-/* We need the type of the resulting object. In ANSI C it is ptrdiff_t
- but in traditional C it is usually long. If we are in ANSI C and
- don't already have ptrdiff_t get it. */
-
-#if defined (__STDC__) && __STDC__ && ! defined (offsetof)
-#if defined (__GNUC__) && defined (IN_GCC)
-/* On Next machine, the system's stddef.h screws up if included
- after we have defined just ptrdiff_t, so include all of stddef.h.
- Otherwise, define just ptrdiff_t, which is all we need. */
-#ifndef __NeXT__
-#define __need_ptrdiff_t
-#endif
-#endif
+/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
+ defined, as with GNU C, use that; that way we don't pollute the
+ namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
+ available, include it and use ptrdiff_t. In traditional C, long is
+ the best that we can do. */
-#include <stddef.h>
+#ifdef __PTRDIFF_TYPE__
+# define PTR_INT_TYPE __PTRDIFF_TYPE__
+#else
+# ifdef HAVE_STDDEF_H
+# include <stddef.h>
+# define PTR_INT_TYPE ptrdiff_t
+# else
+# define PTR_INT_TYPE long
+# endif
#endif
-#if defined (__STDC__) && __STDC__
-#define PTR_INT_TYPE ptrdiff_t
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+# if defined __STDC__ && __STDC__
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+# else
+# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
+# endif
#else
-#define PTR_INT_TYPE long
+# ifdef memcpy
+# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
+# else
+# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N))
+# endif
#endif
struct _obstack_chunk /* Lives at front of each chunk. */
@@ -154,7 +172,7 @@ struct obstack /* control current object in current chunk */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
@@ -171,12 +189,14 @@ struct obstack /* control current object in current chunk */
chunk contains a zero-length object. This
prevents freeing the chunk if we allocate
a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* chunk alloc func returned 0 */
+ unsigned alloc_failed:1; /* No longer used, as we now call the failed
+ handler on error, but retained for binary
+ compatibility. */
};
/* Declare the external functions we use; they are in obstack.c. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
@@ -184,20 +204,16 @@ extern int _obstack_begin (struct obstack *, int, int,
extern int _obstack_begin_1 (struct obstack *, int, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
-/* CYGNUS LOCAL */
extern int _obstack_memory_used (struct obstack *);
-/* END CYGNUS LOCAL */
#else
extern void _obstack_newchunk ();
extern void _obstack_free ();
extern int _obstack_begin ();
extern int _obstack_begin_1 ();
-/* CYGNUS LOCAL */
extern int _obstack_memory_used ();
-/* END CYGNUS LOCAL */
#endif
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
/* Do the function-declarations after the structs
but before defining the macros. */
@@ -225,6 +241,7 @@ void * obstack_finish (struct obstack *obstack);
int obstack_object_size (struct obstack *obstack);
int obstack_room (struct obstack *obstack);
+void obstack_make_room (struct obstack *obstack, int size);
void obstack_1grow_fast (struct obstack *obstack, int data_char);
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
void obstack_int_grow_fast (struct obstack *obstack, int data);
@@ -234,20 +251,30 @@ void * obstack_base (struct obstack *obstack);
void * obstack_next_free (struct obstack *obstack);
int obstack_alignment_mask (struct obstack *obstack);
int obstack_chunk_size (struct obstack *obstack);
-/* CYGNUS LOCAL */
int obstack_memory_used (struct obstack *obstack);
-/* END CYGNUS LOCAL */
#endif /* __STDC__ */
/* Non-ANSI C cannot really support alternative functions for these macros,
so we do not declare them. */
+
+/* Error handler called when `obstack_chunk_alloc' failed to allocate
+ more memory. This can be set to a user defined function. The
+ default action is to print a message and abort. */
+#if defined __STDC__ && __STDC__
+extern void (*obstack_alloc_failed_handler) (void);
+#else
+extern void (*obstack_alloc_failed_handler) ();
+#endif
+
+/* Exit value used when `print_and_abort' is used. */
+extern int obstack_exit_failure;
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */
-#define obstack_base(h) ((h)->alloc_failed ? 0 : (h)->object_base)
+#define obstack_base(h) ((h)->object_base)
/* Size for allocating ordinary chunks. */
@@ -255,7 +282,7 @@ int obstack_memory_used (struct obstack *obstack);
/* Pointer to next byte not yet allocated in current chunk. */
-#define obstack_next_free(h) ((h)->alloc_failed ? 0 : (h)->next_free)
+#define obstack_next_free(h) ((h)->next_free)
/* Mask specifying low bits that should be clear in address of an object. */
@@ -263,53 +290,53 @@ int obstack_memory_used (struct obstack *obstack);
/* To prevent prototype warnings provide complete argument list in
standard C version. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
-#define obstack_init(h) \
+# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-#define obstack_begin(h, size) \
+# define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) (void *, long)) (chunkfun), \
(void (*) (void *, void *)) (freefun), (arg))
-#define obstack_chunkfun(h, newchunkfun) \
+# define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-#define obstack_freefun(h, newfreefun) \
+# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
#else
-#define obstack_init(h) \
+# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-#define obstack_begin(h, size) \
+# define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-#define obstack_chunkfun(h, newchunkfun) \
+# define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-#define obstack_freefun(h, newfreefun) \
+# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)()) (newfreefun))
#endif
@@ -318,118 +345,118 @@ int obstack_memory_used (struct obstack *obstack);
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-/* CYGNUS LOCAL */
#define obstack_memory_used(h) _obstack_memory_used (h)
-/* END CYGNUS LOCAL */
-#if defined (__GNUC__) && defined (__STDC__) && __STDC__
+#if defined __GNUC__ && defined __STDC__ && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */
-#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
-#define __extension__
-#endif
+# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+# define __extension__
+# endif
/* For GNU C, if not -traditional,
we can define these macros to compute all args only once
without using a global variable.
Also, we can avoid using the `temp' slot, to make faster code. */
-#define obstack_object_size(OBSTACK) \
+# define obstack_object_size(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- __o->alloc_failed ? 0 : \
(unsigned) (__o->next_free - __o->object_base); })
-#define obstack_room(OBSTACK) \
+# define obstack_room(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(unsigned) (__o->chunk_limit - __o->next_free); })
-#define obstack_grow(OBSTACK,where,length) \
+# define obstack_make_room(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->chunk_limit - __o->next_free < __len) \
+ _obstack_newchunk (__o, __len); \
+ (void) 0; })
+
+# define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
+
+# define obstack_grow(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
- if (!__o->alloc_failed) \
- { \
- memcpy (__o->next_free, (char *) (where), __len); \
- __o->next_free += __len; \
- } \
+ _obstack_memcpy (__o->next_free, (where), __len); \
+ __o->next_free += __len; \
(void) 0; })
-#define obstack_grow0(OBSTACK,where,length) \
+# define obstack_grow0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
- if (!__o->alloc_failed) \
- { \
- memcpy (__o->next_free, (char *) (where), __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- } \
+ _obstack_memcpy (__o->next_free, (where), __len); \
+ __o->next_free += __len; \
+ *(__o->next_free)++ = 0; \
(void) 0; })
-#define obstack_1grow(OBSTACK,datum) \
+# define obstack_1grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, 1); \
- if (!__o->alloc_failed) \
- *(__o->next_free)++ = (datum); \
+ *(__o->next_free)++ = (datum); \
(void) 0; })
/* These assume that the obstack alignment is good enough for pointers or ints,
and that the data added so far to the current object
shares that much alignment. */
-#define obstack_ptr_grow(OBSTACK,datum) \
+# define obstack_ptr_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (void *)); \
- if (!__o->alloc_failed) \
- *((void **)__o->next_free)++ = ((void *)datum); \
+ *((void **)__o->next_free)++ = ((void *)datum); \
(void) 0; })
-#define obstack_int_grow(OBSTACK,datum) \
+# define obstack_int_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (int)); \
- if (!__o->alloc_failed) \
- *((int *)__o->next_free)++ = ((int)datum); \
+ *((int *)__o->next_free)++ = ((int)datum); \
(void) 0; })
-#define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
+# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-#define obstack_blank(OBSTACK,length) \
+# define obstack_blank(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
- if (!__o->alloc_failed) \
- __o->next_free += __len; \
+ __o->next_free += __len; \
(void) 0; })
-#define obstack_alloc(OBSTACK,length) \
+# define obstack_alloc(OBSTACK,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_blank (__h, (length)); \
obstack_finish (__h); })
-#define obstack_copy(OBSTACK,where,length) \
+# define obstack_copy(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow (__h, (where), (length)); \
obstack_finish (__h); })
-#define obstack_copy0(OBSTACK,where,length) \
+# define obstack_copy0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow0 (__h, (where), (length)); \
@@ -437,28 +464,23 @@ __extension__ \
/* The local variable is named __o1 to avoid a name conflict
when obstack_blank is called. */
-#define obstack_finish(OBSTACK) \
+# define obstack_finish(OBSTACK) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *value; \
- if (__o1->alloc_failed) \
- value = 0; \
- else \
- { \
- value = (void *) __o1->object_base; \
- if (__o1->next_free == value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- & ~ (__o1->alignment_mask)); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- } \
+ value = (void *) __o1->object_base; \
+ if (__o1->next_free == value) \
+ __o1->maybe_empty_object = 1; \
+ __o1->next_free \
+ = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
+ & ~ (__o1->alignment_mask)); \
+ if (__o1->next_free - (char *)__o1->chunk \
+ > __o1->chunk_limit - (char *)__o1->chunk) \
+ __o1->next_free = __o1->chunk_limit; \
+ __o1->object_base = __o1->next_free; \
value; })
-#define obstack_free(OBSTACK, OBJ) \
+# define obstack_free(OBSTACK, OBJ) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
void *__obj = (OBJ); \
@@ -468,103 +490,108 @@ __extension__ \
#else /* not __GNUC__ or not __STDC__ */
-#define obstack_object_size(h) \
- (unsigned) ((h)->alloc_failed ? 0 : (h)->next_free - (h)->object_base)
+# define obstack_object_size(h) \
+ (unsigned) ((h)->next_free - (h)->object_base)
-#define obstack_room(h) \
+# define obstack_room(h) \
(unsigned) ((h)->chunk_limit - (h)->next_free)
+# define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
+
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
in the arms of the conditional expression.
Casting the third operand to void was tried before,
but some compilers won't accept it. */
-#define obstack_grow(h,where,length) \
+# define obstack_make_room(h,length) \
+( (h)->temp = (length), \
+ (((h)->next_free + (h)->temp > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
+
+# define obstack_grow(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (memcpy ((h)->next_free, (char *) (where), (h)->temp), \
- (h)->next_free += (h)->temp)))
+ _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
+ (h)->next_free += (h)->temp)
-#define obstack_grow0(h,where,length) \
+# define obstack_grow0(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (memcpy ((h)->next_free, (char *) (where), (h)->temp), \
+ _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
(h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)))
+ *((h)->next_free)++ = 0)
-#define obstack_1grow(h,datum) \
+# define obstack_1grow(h,datum) \
( (((h)->next_free + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), 1), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (*((h)->next_free)++ = (datum))))
+ (*((h)->next_free)++ = (datum)))
-#define obstack_ptr_grow(h,datum) \
+# define obstack_ptr_grow(h,datum) \
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum))))
+ (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
-#define obstack_int_grow(h,datum) \
+# define obstack_int_grow(h,datum) \
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum))))
+ (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
-#define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
+# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-#define obstack_blank(h,length) \
+# define obstack_blank(h,length) \
( (h)->temp = (length), \
(((h)->chunk_limit - (h)->next_free < (h)->temp) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- ((h)->next_free += (h)->temp)))
+ ((h)->next_free += (h)->temp))
-#define obstack_alloc(h,length) \
+# define obstack_alloc(h,length) \
(obstack_blank ((h), (length)), obstack_finish ((h)))
-#define obstack_copy(h,where,length) \
+# define obstack_copy(h,where,length) \
(obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-#define obstack_copy0(h,where,length) \
+# define obstack_copy0(h,where,length) \
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-#define obstack_finish(h) \
-( (h)->alloc_failed ? 0 : \
- (((h)->next_free == (h)->object_base \
+# define obstack_finish(h) \
+( ((h)->next_free == (h)->object_base \
? (((h)->maybe_empty_object = 1), 0) \
: 0), \
(h)->temp = __PTR_TO_INT ((h)->object_base), \
(h)->next_free \
= __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
& ~ ((h)->alignment_mask)), \
- (((h)->next_free - (char *) (h)->chunk \
+ (((h)->next_free - (char *) (h)->chunk \
> (h)->chunk_limit - (char *) (h)->chunk) \
? ((h)->next_free = (h)->chunk_limit) : 0), \
(h)->object_base = (h)->next_free, \
- __INT_TO_PTR ((h)->temp)))
+ __INT_TO_PTR ((h)->temp))
-#if defined (__STDC__) && __STDC__
-#define obstack_free(h,obj) \
+# if defined __STDC__ && __STDC__
+# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (int) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-#else
-#define obstack_free(h,obj) \
+# else
+# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (int) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-#endif
+# endif
#endif /* not __GNUC__ or not __STDC__ */
-#endif /* not __OBSTACK_H__ */
+#ifdef __cplusplus
+} /* C++ */
+#endif
+
+#endif /* obstack.h */
diff --git a/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog
index 40ea655..7452c2b 100644
--- a/contrib/binutils/include/opcode/ChangeLog
+++ b/contrib/binutils/include/opcode/ChangeLog
@@ -1,3 +1,688 @@
+2000-03-27 Nick Clifton <nickc@cygnus.com>
+
+ * d30v.h (SHORT_A1): Fix value.
+ (SHORT_AR): Renumber so that it is at the end of the list of short
+ instructions, not the end of the list of long instructions.
+
+2000-03-26 Alan Modra <alan@linuxcare.com>
+
+ * i386.h: (UNIXWARE_COMPAT): Rename to SYSV386_COMPAT as the
+ problem isn't really specific to Unixware.
+ (OLDGCC_COMPAT): Define.
+ (i386_optab): If !OLDGCC_COMPAT, don't handle fsubp etc. with
+ destination %st(0).
+ Fix lots of comments.
+
+2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * d30v.h:
+ (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
+ (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
+ (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
+ (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
+ (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
+ (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
+ (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
+
+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (fild, fistp): Change intel d_Suf form to fildd and
+ fistpd without suffix.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * cgen.h (cgen_cpu_desc): Rename field 'flags' to
+ 'signed_overflow_ok_p'.
+ Delete prototypes for cgen_set_flags() and cgen_get_flags().
+
+2000-02-24 Andrew Haley <aph@cygnus.com>
+
+ * cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
+ (CGEN_CPU_TABLE): flags: new field.
+ Add prototypes for new functions.
+
+2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Add some more UNIXWARE_COMPAT comments.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * i370.h: New file.
+
+2000-02-22 Andrew Haley <aph@cygnus.com>
+
+ * mips.h: (OPCODE_IS_MEMBER): Add comment.
+
+1999-12-30 Andrew Haley <aph@cygnus.com>
+
+ * mips.h (OPCODE_IS_MEMBER): Add gp32 arg, which determines
+ whether synthetic opcodes (e.g. move) generate 32-bit or 64-bit
+ insns.
+
+2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Qualify intel mode far call and jmp with x_Suf.
+
+1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Add JumpAbsolute qualifier to all non-intel mode
+ indirect jumps and calls. Add FF/3 call for intel mode.
+
+Wed Dec 1 03:05:25 1999 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h: Add new operand types. Add new instruction formats.
+
+Wed Nov 24 20:28:58 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Correctly handle immediate for PA2.0 "bb"
+ instruction.
+
+1999-11-18 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (INSN_ISA5): New.
+
+1999-11-01 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (OPCODE_IS_MEMBER): New.
+
+1999-10-29 Nick Clifton <nickc@cygnus.com>
+
+ * d30v.h (SHORT_AR): Define.
+
+1999-10-18 Michael Meissner <meissner@cygnus.com>
+
+ * alpha.h (alpha_num_opcodes): Convert to unsigned.
+ (alpha_num_operands): Ditto.
+
+Sun Oct 10 01:46:56 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
+
+ * hppa.h (pa_opcodes): Add load and store cache control to
+ instructions. Add ordered access load and store.
+
+ * hppa.h (pa_opcode): Add new entries for addb and addib.
+
+ * hppa.h (pa_opcodes): Fix cmpb and cmpib entries.
+
+ * hppa.h (pa_opcodes): Add entries for cmpb and cmpib.
+
+Thu Oct 7 00:12:25 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
+
+ * d10v.h: Add flag RESTRICTED_NUM3 for imm3 operands.
+
+Thu Sep 23 07:08:38 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa.h (pa_opcodes): Add "call" and "ret". Clean up "b", "bve"
+ and "be" using completer prefixes.
+
+ * hppa.h (pa_opcodes): Add initializers to silence compiler.
+
+ * hppa.h: Update comments about character usage.
+
+Mon Sep 20 03:55:31 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Fix minor thinkos introduced while cleaning
+ up the new fstw & bve instructions.
+
+Sun Sep 19 10:40:59 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Add remaining PA2.0 integer load/store
+ instructions.
+
+ * hppa.h (pa_opcodes): Add remaining PA2.0 FP load/store instructions.
+
+ * hppa.h (pa_opcodes): Add long offset double word load/store
+ instructions.
+
+ * hppa.h (pa_opcodes): Add FLAG_STRICT variants of FP loads and
+ stores.
+
+ * hppa.h (pa_opcodes): Handle PA2.0 fcnv, fcmp and ftest insns.
+
+ * hppa.h (pa_opcodes): Finish support for PA2.0 "b" instructions.
+
+ * hppa.h (pa_opcodes): Handle PA2.0 "bve" instructions.
+
+ * hppa.h (pa_opcodes): Add new syntax "be" instructions.
+
+ * hppa.h (pa_opcodes): Note use of 'M' and 'L'.
+
+ * hppa.h (pa_opcodes): Add support for "b,l".
+
+ * hppa.h (pa_opcodes): Add support for "b,gate".
+
+Sat Sep 18 11:41:16 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Use 'fX' for first register operand
+ in xmpyu.
+
+ * hppa.h (pa_opcodes): Fix mask for probe and probei.
+
+ * hppa.h (pa_opcodes): Fix mask for depwi.
+
+Tue Sep 7 13:44:25 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Add "addil" variant which has the %r1 as
+ an explicit output argument.
+
+Mon Sep 6 04:41:42 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h: Add strict variants of PA1.0/PA1.1 loads and stores.
+ Add a few PA2.0 loads and store variants.
+
+1999-09-04 Steve Chamberlain <sac@pobox.com>
+
+ * pj.h: New file.
+
+1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (i386_regtab): Move %st to top of table, and split off
+ other fp reg entries.
+ (i386_float_regtab): To here.
+
+Sat Aug 28 00:25:25 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa.h (pa_opcodes): Replace 'f' by 'v'. Prefix float register args
+ by 'f'.
+
+ * hppa.h (pa_opcodes): Add extrd, extrw, depd, depdi, depw, depwi.
+ Add supporting args.
+
+ * hppa.h: Document new completers and args.
+ * hppa.h (pa_opcodes): Add 64 bit patterns and pa2.0 syntax for uxor,
+ uaddcm, dcor, addi, add, sub, subi, shladd, rfi, and probe. Add pa2.0
+ extensions for ssm, rsm, pdtlb, pitlb. Add performance instructions
+ pmenb and pmdis.
+
+ * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
+ hshr, hsub, mixh, mixw, permh.
+
+ * hppa.h (pa_opcodes): Change completers in instructions to
+ use 'c' prefix.
+
+ * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
+ hshladd, hshradd, shrpd, and shrpw instructions. Update arg comments.
+
+ * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
+ fnegabs to use 'I' instead of 'F'.
+
+1999-08-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Add AMD athlon instructions, pfnacc, pfpnacc, pswapd.
+ Document pf2iw and pi2fw as athlon insns. Remove pswapw.
+ Alphabetically sort PIII insns.
+
+Wed Aug 18 18:14:40 1999 Doug Evans <devans@canuck.cygnus.com>
+
+ * cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
+
+Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa.h (pa_opcodes): Add 64 bit versions of or, xor, and,
+ and andcm. Add 32 and 64 bit version of cmpclr, cmpiclr.
+
+ * hppa.h: Document 64 bit condition completers.
+
+Thu Aug 5 16:56:07 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa.h (pa_opcodes): Change condition args to use '?' prefix.
+
+1999-08-04 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (i386_optab): Add DefaultSize modifier to all insns
+ that implicitly modify %esp. #undef d_Suf, x_suf, sld_suf,
+ sldx_suf, bwld_Suf, d_FP, x_FP, sld_FP, sldx_FP at end of table.
+
+Wed Jul 28 02:04:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ Jeff Law <law@cygnus.com>
+
+ * hppa.h (pa_opcodes): Add "pushnom" and "pushbts".
+
+ * hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
+
+ * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
+ and fmpynfadd to use 'J' and 'K' instead of 'E' and 'X'.
+
+1999-07-13 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Add "undocumented" AMD 3DNow! pf2iw, pi2fw, pswapw insns.
+
+Thu Jul 1 00:17:24 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (struct pa_opcode): Add new field "flags".
+ (FLAGS_STRICT): Define.
+
+Fri Jun 25 04:22:04 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ Jeff Law <law@cygnus.com>
+
+ * hppa.h (pa_opcodes): Add pa2.0 clrbts instruction.
+
+ * hppa.h (pa_opcodes): Add entries for mfia and mtsarcm instructions.
+
+1999-06-23 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Allow `l' suffix on bswap. Allow `w' suffix on arpl,
+ lldt, lmsw, ltr, str, verr, verw. Add FP flag to fcmov*. Add FP
+ flag to fcomi and friends.
+
+Fri May 28 15:26:11 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Move integer arithmetic instructions after
+ integer logical instructions.
+
+1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
+
+ * m68k.h: Document new formats `E', `G', `H' and new places `N',
+ `n', `o'.
+
+ * m68k.h: Define mcf5206e, mcf5307, mcf. Document new format `u'
+ and new places `m', `M', `h'.
+
+Thu May 27 04:13:54 1999 Joel Sherrill (joel@OARcorp.com
+
+ * hppa.h (pa_opcodes): Add several processor specific system
+ instructions.
+
+Wed May 26 16:57:44 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (pa_opcodes): Add second entry for "comb", "comib",
+ "addb", and "addib" to be used by the disassembler.
+
+1999-05-12 Alan Modra <alan@apri.levels.unisa.edu.au>
+
+ * i386.h (ReverseModrm): Remove all occurences.
+ (InvMem): Add to control/debug/test mov insns, movhlps, movlhps,
+ movmskps, pextrw, pmovmskb, maskmovq.
+ Change NoSuf to FP on all MMX, XMM and AMD insns as these all
+ ignore the data size prefix.
+
+ * i386.h (i386_optab, i386_regtab): Add support for PIII SIMD.
+ Mostly stolen from Doug Ledford <dledford@redhat.com>
+
+Sat May 8 23:27:35 1999 Richard Henderson <rth@cygnus.com>
+
+ * ppc.h (PPC_OPCODE_64_BRIDGE): New.
+
+1999-04-14 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (CGEN_ATTR): Delete member num_nonbools.
+ (CGEN_ATTR_TYPE): Update.
+ (CGEN_ATTR_MASK): Number booleans starting at 0.
+ (CGEN_ATTR_VALUE): Update.
+ (CGEN_INSN_ATTR): Update.
+
+Mon Apr 12 23:43:27 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (fmpyfadd, fmpynfadd, fneg, fnegabs): New PA2.0
+ instructions.
+
+Tue Mar 23 11:24:38 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (bb, bvb): Tweak opcode/mask.
+
+
+1999-03-22 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (CGEN_ISA,CGEN_MACH): New typedefs.
+ (struct cgen_cpu_desc): Rename member mach to machs. New member isas.
+ New members word_bitsize,default_insn_bitsize,base_insn-bitsize,
+ min_insn_bitsize,max_insn_bitsize,isa_table,mach_table,rebuild_tables.
+ Delete member max_insn_size.
+ (enum cgen_cpu_open_arg): New enum.
+ (cpu_open): Update prototype.
+ (cpu_open_1): Declare.
+ (cgen_set_cpu): Delete.
+
+1999-03-11 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (CGEN_HW_TABLE): Delete `num_init_entries' member.
+ (CGEN_OPERAND_NIL): New macro.
+ (CGEN_OPERAND): New member `type'.
+ (@arch@_cgen_operand_table): Delete decl.
+ (CGEN_OPERAND_INDEX,CGEN_OPERAND_TYPE,CGEN_OPERAND_ENTRY): Delete.
+ (CGEN_OPERAND_TABLE): New struct.
+ (cgen_operand_lookup_by_name,cgen_operand_lookup_by_num): Declare.
+ (CGEN_OPINST): Pointer to operand table entry replaced with enum.
+ (CGEN_CPU_TABLE): New member `isa'. Change member `operand_table',
+ now a CGEN_OPERAND_TABLE. Add CGEN_CPU_DESC arg to
+ {get,set}_{int,vma}_operand.
+ (@arch@_cgen_cpu_open): New arg `isa'.
+ (cgen_set_cpu): Ditto.
+
+Fri Feb 26 02:36:45 1999 Richard Henderson <rth@cygnus.com>
+
+ * i386.h: Fill in cmov and fcmov alternates. Add fcomi short forms.
+
+1999-02-25 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (enum cgen_asm_type): Add CGEN_ASM_NONE.
+ (CGEN_HW_ENTRY): Delete member `next'. Change type of `type' to
+ enum cgen_hw_type.
+ (CGEN_HW_TABLE): New struct.
+ (hw_table): Delete declaration.
+ (CGEN_OPERAND): Change member hw to hw_type, change type from pointer
+ to table entry to enum.
+ (CGEN_OPINST): Ditto.
+ (CGEN_CPU_TABLE): Change member hw_list to hw_table.
+
+Sat Feb 13 14:13:44 1999 Richard Henderson <rth@cygnus.com>
+
+ * alpha.h (AXP_OPCODE_EV6): New.
+ (AXP_OPCODE_NOPAL): Include it.
+
+1999-02-09 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (CGEN_CPU_DESC): Renamed from CGEN_OPCODE_DESC.
+ All uses updated. New members int_insn_p, max_insn_size,
+ parse_operand,insert_operand,extract_operand,print_operand,
+ sizeof_fields,set_fields_bitsize,get_int_operand,set_int_operand,
+ get_vma_operand,set_vma_operand,parse_handlers,insert_handlers,
+ extract_handlers,print_handlers.
+ (CGEN_ATTR): Change type of num_nonbools to unsigned int.
+ (CGEN_ATTR_BOOL_OFFSET): New macro.
+ (CGEN_ATTR_MASK): Subtract it to compute bit number.
+ (CGEN_ATTR_VALUE): Redo bool/nonbool attr calculation.
+ (cgen_opcode_handler): Renamed from cgen_base.
+ (CGEN_HW_ATTR_VALUE): Renamed from CGEN_HW_ATTR, all uses updated.
+ (CGEN_OPERAND_ATTR_VALUE): Renamed from CGEN_OPERAND_ATTR,
+ all uses updated.
+ (CGEN_OPERAND_INDEX): Rewrite to use table entry, not global.
+ (enum cgen_opinst_type): Renamed from cgen_operand_instance_type.
+ (CGEN_IFLD_ATTR_VALUE): Renamed from CGEN_IFLD_ATTR, all uses updated.
+ (CGEN_OPCODE,CGEN_IBASE): New types.
+ (CGEN_INSN): Rewrite.
+ (CGEN_{ASM,DIS}_HASH*): Delete.
+ (init_opcode_table,init_ibld_table): Declare.
+ (CGEN_INSN_ATTR): New type.
+
+Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
+
+ * i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
+ (x_FP, d_FP, dls_FP, sldx_FP): Define.
+ Change *Suf definitions to include x and d suffixes.
+ (movsx): Use w_Suf and b_Suf.
+ (movzx): Likewise.
+ (movs): Use bwld_Suf.
+ (fld): Change ordering. Use sld_FP.
+ (fild): Add Intel Syntax equivalent of fildq.
+ (fst): Use sld_FP.
+ (fist): Use sld_FP.
+ (fstp): Use sld_FP. Add x_FP version.
+ (fistp): LLongMem version for Intel Syntax.
+ (fcom, fcomp): Use sld_FP.
+ (fadd, fiadd, fsub): Use sld_FP.
+ (fsubr): Use sld_FP.
+ (fmul, fimul, fdvi, fidiv, fdivr): Use sld_FP.
+
+1999-01-27 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (enum cgen_mode): Add CGEN_MODE_TARGET_MAX, CGEN_MODE_INT,
+ CGEN_MODE_UINT.
+
+Sat Jan 16 01:29:25 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (bv): Fix mask.
+
+1999-01-05 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (CGEN_ATTR_VALUE_TYPE): New typedef.
+ (CGEN_ATTR): Use it.
+ (CGEN_ATTR_TYPE,CGEN_ATTR_ENTRY): Ditto.
+ (CGEN_ATTR_TABLE): New member dfault.
+
+1998-12-30 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (MIPS16_INSN_BRANCH): New.
+
+Wed Dec 9 10:38:48 1998 David Taylor <taylor@texas.cygnus.com>
+
+ The following is part of a change made by Edith Epstein
+ <eepstein@sophia.cygnus.com> as part of a project to merge in
+ changes by HP; HP did not create ChangeLog entries.
+
+ * hppa.h (completer_chars): list of chars to not put a space
+ after.
+
+Sun Dec 6 13:21:34 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * i386.h (i386_optab): Permit w suffix on processor control and
+ status word instructions.
+
+1998-11-30 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (struct cgen_hw_entry): Delete const on attrs member.
+ (struct cgen_keyword_entry): Ditto.
+ (struct cgen_operand): Ditto.
+ (CGEN_IFLD): New typedef, with associated access macros.
+ (CGEN_IFMT): New typedef, with associated access macros.
+ (CGEN_IFMT): Renamed from CGEN_FORMAT. New member `iflds'.
+ (CGEN_IVALUE): New typedef.
+ (struct cgen_insn): Delete const on syntax,attrs members.
+ `format' now points to format data. Type of `value' is now
+ CGEN_IVALUE.
+ (struct cgen_opcode_table): New member ifld_table.
+
+1998-11-18 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen.h (cgen_extract_fn): Update type of `base_insn' arg.
+ (CGEN_OPERAND_INSTANCE): New member `attrs'.
+ (CGEN_OPERAND_INSTANCE_{ATTRS,ATTR}): New macros.
+ (cgen_dis_lookup_insn): Update type of `base_insn' arg.
+ (cgen_opcode_table): Update type of dis_hash fn.
+ (extract_operand): Update type of `insn_value' arg.
+
+Thu Oct 29 11:38:36 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * cgen.h (CGEN_VERSION_{MAJOR,MINOR,FIXLEVEL}): Delete.
+
+Tue Oct 27 08:57:59 1998 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips.h (INSN_MULT): Added.
+
+Tue Oct 20 11:31:34 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (MAX_MNEM_SIZE): Rename from MAX_OPCODE_SIZE.
+
+Mon Oct 19 12:50:00 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen.h (CGEN_INSN_INT): New typedef.
+ (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
+ (CGEN_INSN_BYTES): Renamed from cgen_insn_t.
+ (CGEN_INSN_BYTES_PTR): New typedef.
+ (CGEN_EXTRACT_INFO): New typedef.
+ (cgen_insert_fn,cgen_extract_fn): Update.
+ (cgen_opcode_table): New member `insn_endian'.
+ (assemble_insn,lookup_insn,lookup_get_insn_operands): Update.
+ (insert_operand,extract_operand): Update.
+ (cgen_get_insn_value,cgen_put_insn_value): Add prototypes.
+
+Fri Oct 9 13:38:13 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen.h (CGEN_ATTR_BOOLS): New macro.
+ (struct CGEN_HW_ENTRY): New member `attrs'.
+ (CGEN_HW_ATTR): New macro.
+ (struct CGEN_OPERAND_INSTANCE): New member `name'.
+ (CGEN_INSN_INVALID_P): New macro.
+
+Mon Oct 5 00:21:07 1998 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h: Add "fid".
+
+Sun Oct 4 21:00:00 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ From Robert Andrew Dale <rob@nb.net>
+ * i386.h (i386_optab): Add AMD 3DNow! instructions.
+ (AMD_3DNOW_OPCODE): Define.
+
+Tue Sep 22 17:53:47 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v.h (EITHER_BUT_PREFER_MU): Define.
+
+Mon Aug 10 14:09:38 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * cgen.h (cgen_insn): #if 0 out element `cdx'.
+
+Mon Aug 3 12:21:57 1998 Doug Evans <devans@seba.cygnus.com>
+
+ Move all global state data into opcode table struct, and treat
+ opcode table as something that is "opened/closed".
+ * cgen.h (CGEN_OPCODE_DESC): New type.
+ (all fns): New first arg of opcode table descriptor.
+ (cgen_set_parse_operand_fn): Add prototype.
+ (cgen_current_machine,cgen_current_endian): Delete.
+ (CGEN_OPCODE_TABLE): New members mach,endian,operand_table,
+ parse_operand_fn,asm_hash_table,asm_hash_table_entries,
+ dis_hash_table,dis_hash_table_entries.
+ (opcode_open,opcode_close): Add prototypes.
+
+ * cgen.h (cgen_insn): New element `cdx'.
+
+Thu Jul 30 21:44:25 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * d30v.h (FLAG_LKR): New flag for "left-kills-right" instructions.
+
+Tue Jul 28 10:59:07 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h: Add "no_match_operands" field for instructions.
+ (MN10300_MAX_OPERANDS): Define.
+
+Fri Jul 24 11:44:24 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * cgen.h (cgen_macro_insn_count): Declare.
+
+Tue Jul 21 13:12:13 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen.h (CGEN_VERSION_{MAJOR,MINOR,FIXLEVEL}): Define.
+ (cgen_insert_fn,cgen_extract_fn): New arg `pc'.
+ (get_operand,put_operand): Replaced with get_{int,vma}_operand,
+ set_{int,vma}_operand.
+
+Fri Jun 26 11:09:06 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h: Add "machine" field for instructions.
+ (MN103, AM30): Define machine types.
+
+Fri Jun 19 16:09:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Use FP, not sl_Suf, for fxsave and fxrstor.
+
+1998-06-18 Ulrich Drepper <drepper@cygnus.com>
+
+ * i386.h: Add support for fxsave, fxrstor, sysenter and sysexit.
+
+Sat Jun 13 11:31:35 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (i386_optab): Add general form of aad and aam. Add ud2a
+ and ud2b.
+ (i386_regtab): Allow cr0..7, db0..7, dr0..7, tr0..7, not just
+ those that happen to be implemented on pentiums.
+
+Tue Jun 9 12:16:01 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Change occurences of Data16 to Size16, Data32 to Size32,
+ IgnoreDataSize to IgnoreSize. Flag address and data size prefixes
+ with Size16|IgnoreSize or Size32|IgnoreSize.
+
+Mon Jun 8 12:15:52 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (REPNE): Rename to REPNE_PREFIX_OPCODE.
+ (REPE): Rename to REPE_PREFIX_OPCODE.
+ (i386_regtab_end): Remove.
+ (i386_prefixtab, i386_prefixtab_end): Remove.
+ (i386_optab): Use NULL as sentinel rather than "" to suit rewrite
+ of md_begin.
+ (MAX_OPCODE_SIZE): Define.
+ (i386_optab_end): Remove.
+ (sl_Suf): Define.
+ (sl_FP): Use sl_Suf.
+
+ * i386.h (i386_optab): Allow 16 bit displacement for `mov
+ mem,acc'. Combine 16 and 32 bit forms of various insns. Allow 16
+ bit form of ljmp. Add IsPrefix modifier to prefixes. Add addr32,
+ data32, dword, and adword prefixes.
+ (i386_regtab): Add BaseIndex modifier to valid 16 bit base/index
+ regs.
+
+Fri Jun 5 23:42:43 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (i386_regtab): Remove BaseIndex modifier from esp.
+
+ * i386.h: Allow `l' suffix on fld, fst, fstp, fcom, fcomp with
+ register operands, because this is a common idiom. Flag them with
+ a warning. Allow illegal faddp, fsubp, fsubrp, fmulp, fdivp,
+ fdivrp because gcc erroneously generates them. Also flag with a
+ warning.
+
+ * i386.h: Add suffix modifiers to most insns, and tighter operand
+ checks in some cases. Fix a number of UnixWare compatibility
+ issues with float insns. Merge some floating point opcodes, using
+ new FloatMF modifier.
+ (WORD_PREFIX_OPCODE): Rename to DATA_PREFIX_OPCODE for
+ consistency.
+
+ * i386.h: Change occurence of ShortformW to W|ShortForm. Add
+ IgnoreDataSize where appropriate.
+
+Wed Jun 3 18:28:45 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: (one_byte_segment_defaults): Remove.
+ (two_byte_segment_defaults): Remove.
+ (i386_regtab): Add BaseIndex to 32 bit regs reg_type.
+
+Fri May 15 15:59:04 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen.h (cgen_hw_lookup_by_name): Renamed from cgen_hw_lookup.
+ (cgen_hw_lookup_by_num): Declare.
+
+Thu May 7 09:27:58 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * mips.h (OP_{SH,MASK}_CODE2): Added "q" operand format for lower
+ ten bits of MIPS ISA1 "break" instruction, and for "sdbbp"
+
+Thu May 7 02:14:08 1998 Doug Evans <devans@charmed.cygnus.com>
+
+ * cgen.h (cgen_asm_init_parse): Delete.
+ (cgen_save_fixups,cgen_restore_fixups,cgen_swap_fixups): Delete.
+ (cgen_asm_record_register,cgen_asm_finish_insn): Delete.
+
+Mon Apr 27 10:13:11 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen.h (CGEN_ATTR_TYPE): Delete `const', moved to uses.
+ (cgen_asm_finish_insn): Update prototype.
+ (cgen_insn): New members num, data.
+ (CGEN_INSN_TABLE): Members asm_hash, asm_hash_table_size,
+ dis_hash, dis_hash_table_size moved to ...
+ (CGEN_OPCODE_TABLE). Here. Renamed from CGEN_OPCODE_DATA.
+ All uses updated. New members asm_hash_p, dis_hash_p.
+ (CGEN_MINSN_EXPANSION): New struct.
+ (cgen_expand_macro_insn): Declare.
+ (cgen_macro_insn_count): Declare.
+ (get_insn_operands): Update prototype.
+ (lookup_get_insn_operands): Declare.
+
+Tue Apr 21 17:11:32 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (i386_optab): Change iclrKludge and imulKludge to
+ regKludge. Add operands types for string instructions.
+
+Mon Apr 20 14:40:29 1998 Tom Tromey <tromey@cygnus.com>
+
+ * i386.h (X): Renamed from `Z_' to preserve formatting of opcode
+ table.
+
+Sun Apr 19 13:54:06 1998 Tom Tromey <tromey@cygnus.com>
+
+ * i386.h (Z_): Renamed from `_' to avoid clash with common alias
+ for `gettext'.
+
+Fri Apr 3 12:04:48 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h: Remove NoModrm flag from all insns: it's never checked.
+ Add IsString flag to string instructions.
+ (IS_STRING): Don't define.
+ (LOCK_PREFIX_OPCODE, CS_PREFIX_OPCODE, DS_PREFIX_OPCODE): Define.
+ (ES_PREFIX_OPCODE, FS_PREFIX_OPCODE, GS_PREFIX_OPCODE): Define.
+ (SS_PREFIX_OPCODE): Define.
+
Mon Mar 30 21:31:56 1998 Ian Lance Taylor <ian@cygnus.com>
* i386.h: Revert March 24 patch; no more LinearAddress.
@@ -25,6 +710,10 @@ Mon Mar 2 10:44:07 1998 Doug Evans <devans@seba.cygnus.com>
* cgen.h (CGEN_BOOL_ATTR): New macro.
+Thu Feb 26 15:54:31 1998 Michael Meissner <meissner@cygnus.com>
+
+ * d30v.h (FLAG_DELAY): New flag for delayed branches/jumps.
+
Mon Feb 23 10:38:21 1998 Doug Evans <devans@seba.cygnus.com>
* cgen.h (CGEN_CAT3): Delete. Use CONCAT3 now.
@@ -88,7 +777,7 @@ Thu Jan 22 17:54:56 1998 Nick Clifton <nickc@cygnus.com>
Wed Jan 14 17:21:43 1998 Nick Clifton <nickc@cygnus.com>
- * cgen.h: Formatting changes to improve readability.
+ * cgen.h: Formatting changes to improve readability.
Mon Jan 12 11:37:36 1998 Doug Evans <devans@seba.cygnus.com>
@@ -101,10 +790,22 @@ Mon Jan 12 11:37:36 1998 Doug Evans <devans@seba.cygnus.com>
(CGEN_{SYNTAX,FORMAT}): New types.
(cgen_insn): Format and syntax separated from each other.
+Tue Dec 16 15:15:52 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v.h (d30v_opcode): Reorder flags somewhat, add new flags for
+ 2 word load/store, ADDppp/SUBppp, 16/32 bit multiply. Make
+ flags_{used,set} long.
+ (d30v_operand): Make flags field long.
+
Mon Dec 1 12:24:44 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68k.h: Fix comment describing operand types.
+Sun Nov 23 22:31:27 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v.h (SHORT_CMPU): Add case for cmpu instruction, and move
+ everything else after down.
+
Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
* d10v.h (OPERAND_FLAG): Split into:
@@ -143,6 +844,26 @@ Mon Sep 15 18:28:37 1997 Nick Clifton <nickc@cygnus.com>
* v850.h (struct v850_opcode): Add processors field.
(PROCESSOR_V850, PROCESSOR_ALL): New bit constants.
+ (PROCESSOR_V850E, PROCESSOR_NOT_V850): New bit constants.
+ (PROCESSOR_V850EA): New bit constants.
+
+Mon Sep 15 11:29:43 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ Merge changes from Martin Hunt:
+
+ * d30v.h: Allow up to 64 control registers. Add
+ SHORT_A5S format.
+
+ * d30v.h (LONG_Db): New form for delayed branches.
+
+ * d30v.h: (LONG_Db): New form for repeati.
+
+ * d30v.h (SHORT_D2B): New form.
+
+ * d30v.h (SHORT_A2): New form.
+
+ * d30v.h (OPERAND_2REG): Add new operand to indicate 2
+ registers are used. Needed for VLIW optimization.
Mon Sep 8 14:05:45 1997 Doug Evans <dje@canuck.cygnus.com>
@@ -152,7 +873,7 @@ Mon Sep 8 14:05:45 1997 Doug Evans <dje@canuck.cygnus.com>
Tue Sep 2 15:32:32 1997 Nick Clifton <nickc@cygnus.com>
- * v850.h (V850_OPREAND_ADJUST_SHORT_MEMORY): Removed.
+ * v850.h (V850_OPREAND_ADJUST_SHORT_MEMORY): Removed.
Tue Aug 26 12:21:52 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -175,14 +896,15 @@ Fri Aug 22 10:38:29 1997 Nick Clifton <nickc@cygnus.com>
Mon Aug 18 11:05:58 1997 Nick Clifton <nickc@cygnus.com>
- * v850.h (struct v850_opcode): Remove flags field.
+ * v850.h (struct v850_opcode): Remove flags field.
Wed Aug 13 18:45:48 1997 Nick Clifton <nickc@cygnus.com>
* v850.h (struct v850_opcode): Add flags field.
(struct v850_operand): Extend meaning of 'bits' and 'shift'
- fields.
-
+ fields.
+ (V850E_INSTRUCTION, V850EA_INSTRUCTION): New flags.
+ (V850E_PUSH_POP, V850E_IMMEDIATE16, V850E_IMMEDIATE32): New flags.
Fri Aug 8 16:58:42 1997 Doug Evans <dje@canuck.cygnus.com>
@@ -285,26 +1007,117 @@ Thu Mar 6 14:18:30 1997 Jeffrey A Law (law@cygnus.com)
Mon Feb 24 15:15:56 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
- * d10v.h: Change pre_defined_registers to
+ * d10v.h: Change pre_defined_registers to
d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
* mips.h: Add macros for cop0, cop1 cop2 and cop3.
- Change mips_opcodes from const array to a pointer,
+ Change mips_opcodes from const array to a pointer,
and change bfd_mips_num_opcodes from const int to int,
- so that we can increase the size of the mips opcodes table
+ so that we can increase the size of the mips opcodes table
dynamically.
-
+
+Fri Feb 21 16:34:18 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * d30v.h (FLAG_X): Remove unused flag.
+
+Tue Feb 18 17:37:20 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * d30v.h: New file.
+
+Fri Feb 14 13:16:15 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (PDS_NAME): Macro to access name field of predefined symbols.
+ (PDS_VALUE): Macro to access value field of predefined symbols.
+ (tic80_next_predefined_symbol): Add prototype.
+
+Mon Feb 10 10:32:17 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (tic80_symbol_to_value): Change prototype to match
+ change in function, added class parameter.
+
+Thu Feb 6 17:30:15 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_OPERAND_ENDMASK): Add for flagging TIc80
+ endmask fields, which are somewhat weird in that 0 and 32 are
+ treated exactly the same.
+
+Thu Jan 30 13:46:18 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h: Change all the OPERAND defines to use the form (1 << X)
+ rather than a constant that is 2**X. Reorder them to put bits for
+ operands that have symbolic names in the upper bits, so they can
+ be packed into an int where the lower bits contain the value that
+ corresponds to that symbolic name.
+ (predefined_symbo): Add struct.
+ (tic80_predefined_symbols): Declare array of translations.
+ (tic80_num_predefined_symbols): Declare size of that array.
+ (tic80_value_to_symbol): Declare function.
+ (tic80_symbol_to_value): Declare function.
+
Wed Jan 29 09:37:25 1997 Jeffrey A Law (law@cygnus.com)
* mn10200.h (MN10200_OPERAND_RELAX): Define.
+Sat Jan 18 15:18:59 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_NO_R0_DEST): Add for opcodes where r0 cannot
+ be the destination register.
+
+Thu Jan 16 20:48:55 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (struct tic80_opcode): Change "format" field to "flags".
+ (FMT_UNUSED, FMT_SI, FMT_LI, FMT_REG): Delete.
+ (TIC80_VECTOR): Define a flag bit for the flags. This one means
+ that the opcode can have two vector instructions in a single
+ 32 bit word and we have to encode/decode both.
+
+Tue Jan 14 19:37:09 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_OPERAND_PCREL): Renamed from
+ TIC80_OPERAND_RELATIVE for PC relative.
+ (TIC80_OPERAND_BASEREL): New flag bit for register
+ base relative.
+
+Mon Jan 13 15:56:38 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_OPERAND_FLOAT): Add for floating point operands.
+
+Mon Jan 6 10:51:15 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_OPERAND_SCALED): Operand may have optional
+ ":s" modifier for scaling.
+
+Sun Jan 5 12:12:19 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_OPERAND_M_SI): Add operand modifier for ":m".
+ (TIC80_OPERAND_M_LI): Ditto
+
+Sat Jan 4 19:02:44 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (TIC80_OPERAND_BITNUM): Renamed from TIC80_OPERAND_CC_SZ.
+ (TIC80_OPERAND_CC): New define for condition code operand.
+ (TIC80_OPERAND_CR): New define for control register operand.
+
+Fri Jan 3 16:22:23 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h (struct tic80_opcode): Name changed.
+ (struct tic80_opcode): Remove format field.
+ (struct tic80_operand): Add insertion and extraction functions.
+ (TIC80_OPERAND_*): Remove old bogus values, start adding new
+ correct ones.
+ (FMT_*): Ditto.
+
Tue Dec 31 15:05:41 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* v850.h (V850_OPERAND_ADJUST_SHORT_MEMORY): New flag to adjust
type IV instruction offsets.
+Fri Dec 27 22:23:10 1996 Fred Fish <fnf@cygnus.com>
+
+ * tic80.h: New file.
+
Wed Dec 18 10:06:31 1996 Jeffrey A Law (law@cygnus.com)
* mn10200.h (MN10200_OPERAND_NOCHECK): Define.
@@ -314,7 +1127,7 @@ Sat Dec 14 10:48:31 1996 Fred Fish <fnf@ninemoons.com>
* mn10200.h: Fix comment, mn10200_operand not powerpc_operand.
* mn10300.h: Fix comment, mn10300_operand not powerpc_operand.
* v850.h: Fix comment, v850_operand not powerpc_operand.
-
+
Mon Dec 9 16:45:39 1996 Jeffrey A Law (law@cygnus.com)
* mn10200.h: Flesh out structures and definitions needed by
@@ -467,7 +1280,7 @@ Mon Jul 22 12:15:25 1996 Ian Lance Taylor <ian@cygnus.com>
Wed Jul 17 14:46:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * d10v.h: New file.
+ * d10v.h: New file.
Thu Jul 11 12:09:15 1996 Jeffrey A Law (law@cygnus.com)
@@ -509,7 +1322,7 @@ Tue Jun 18 16:06:00 1996 Jeffrey A. Law <law@rtl.cygnus.com>
(EBITOP): Likewise.
(O_LAST): Bump.
(ldc, stc, movb, movw, movl): Use 32bit offsets and absolutes.
-
+
* h8300.h (EXR, SHIFT_2, MACREG, SHIFT_IMM, RDINC): Define.
(O_TAS, O_CLRMAC, O_LDMAC, O_MAC, O_LDM, O_STM): Define.
(BITOP, EBITOP): Handle new H8/S addressing modes for
@@ -517,7 +1330,7 @@ Tue Jun 18 16:06:00 1996 Jeffrey A. Law <law@rtl.cygnus.com>
(UNOP3): Handle new shift/rotate insns on the H8/S.
(insns using exr): New instructions.
(tas, mac, ldmac, clrmac, ldm, stm): New instructions.
-
+
Thu May 23 16:56:48 1996 Jeffrey A Law (law@cygnus.com)
* h8300.h (add.l): Undo Apr 5th change. The manual I had
@@ -805,7 +1618,7 @@ Sun Jul 10 11:01:09 1994 Ian Dall (dall@hfrd.dsto.gov.au)
Thu Jul 7 12:34:48 1994 Steve Chamberlain (sac@jonny.cygnus.com)
- * h8300.h (xor.l) :fix bit pattern.
+ * h8300.h (xor.l) :fix bit pattern.
(L_2): New size of operand.
(trapa): Use it.
@@ -906,7 +1719,7 @@ Sat Dec 11 16:14:06 1993 Steve Chamberlain (sac@thepub.cygnus.com)
Wed Dec 1 12:15:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
- * From Hisashi MINAMINO <minamino@sramhc.sra.co.jp>
+ * From Hisashi MINAMINO <minamino@sramhc.sra.co.jp>
* hppa.h: #undef NONE to avoid conflict with hiux include files.
Sun Nov 21 22:06:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
@@ -1059,11 +1872,11 @@ Fri Jun 11 18:38:44 1993 Ken Raeburn (raeburn@cygnus.com)
Patches from Jeff Law, law@cs.utah.edu:
* hppa.h: Clean up some of the OLD_TABLE, non-OLD_TABLE braindamage.
Make the tables be the same for the following instructions:
- "bb", "addb[tf]", "addib[tf]", "add", "add[loc]", "addco",
+ "bb", "addb[tf]", "addib[tf]", "add", "add[loc]", "addco",
"sh[123]add", "sh[123]add[lo]", "sub", "sub[obt]", "sub[bt]o",
- "ds", "comclr", "addi", "addi[ot]", "addito", "subi", "subio",
- "comiclr", "fadd", "fsub", "fmpy", "fdiv", "fsqrt", "fabs",
- "frnd", "fcpy", "fcnvff", "fcnvxf", "fcnvfx", "fcnvfxt",
+ "ds", "comclr", "addi", "addi[ot]", "addito", "subi", "subio",
+ "comiclr", "fadd", "fsub", "fmpy", "fdiv", "fsqrt", "fabs",
+ "frnd", "fcpy", "fcnvff", "fcnvxf", "fcnvfx", "fcnvfxt",
"fcmp", and "ftest".
* hppa.h: Make new and old tables the same for "break", "mtctl",
@@ -1084,7 +1897,7 @@ Fri Jun 4 15:41:37 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
Thu Jun 3 15:42:59 1993 Stu Grossman (grossman@cygnus.com)
* Patches from Jeffrey Law <law@cs.utah.edu>.
- * hppa.h: Rework single precision FP
+ * hppa.h: Rework single precision FP
instructions so that they correctly disassemble code
PA1.1 code.
@@ -1131,7 +1944,7 @@ Thu Feb 18 02:03:14 1993 John Gilmore (gnu@cygnus.com)
* m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
allows callers to break up the large initialized struct full of
- opcodes into two half-sized ones. This permits GCC to compile
+ opcodes into two half-sized ones. This permits GCC to compile
this module, since it takes exponential space for initializers.
(numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
@@ -1354,7 +2167,7 @@ Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
Sat Nov 30 20:40:51 1991 Steve Chamberlain (sac at rtl.cygnus.com)
- * a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h,
+ * a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h,
m88k.h, mips.h , np1.h, ns32k.h, pn.h, pyr.h, sparc.h, tahoe.h,
vax.h, ChangeLog: renamed from ../<foo>-opcode.h
diff --git a/contrib/binutils/include/opcode/alpha.h b/contrib/binutils/include/opcode/alpha.h
index c3babc9..6f31e9a 100644
--- a/contrib/binutils/include/opcode/alpha.h
+++ b/contrib/binutils/include/opcode/alpha.h
@@ -1,5 +1,5 @@
/* alpha.h -- Header file for Alpha opcode table
- Copyright 1996 Free Software Foundation, Inc.
+ Copyright 1996, 1999 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>,
patterned after the PPC opcode table written by Ian Lance Taylor.
@@ -54,7 +54,7 @@ struct alpha_opcode
in the order in which the disassembler should consider
instructions. */
extern const struct alpha_opcode alpha_opcodes[];
-extern const int alpha_num_opcodes;
+extern const unsigned alpha_num_opcodes;
/* Values defined for the flags field of a struct alpha_opcode. */
@@ -62,11 +62,12 @@ extern const int alpha_num_opcodes;
#define AXP_OPCODE_BASE 0x0001 /* Base architecture -- all cpus. */
#define AXP_OPCODE_EV4 0x0002 /* EV4 specific PALcode insns. */
#define AXP_OPCODE_EV5 0x0004 /* EV5 specific PALcode insns. */
+#define AXP_OPCODE_EV6 0x0008 /* EV6 specific PALcode insns. */
#define AXP_OPCODE_BWX 0x0100 /* Byte/word extension (amask bit 0). */
#define AXP_OPCODE_CIX 0x0200 /* "Count" extension (amask bit 1). */
#define AXP_OPCODE_MAX 0x0400 /* Multimedia extension (amask bit 8). */
-#define AXP_OPCODE_NOPAL (~(AXP_OPCODE_EV4|AXP_OPCODE_EV5))
+#define AXP_OPCODE_NOPAL (~(AXP_OPCODE_EV4|AXP_OPCODE_EV5|AXP_OPCODE_EV6))
/* A macro to extract the major opcode from an instruction. */
#define AXP_OP(i) (((i) >> 26) & 0x3F)
@@ -134,7 +135,7 @@ struct alpha_operand
the operands field of the alpha_opcodes table. */
extern const struct alpha_operand alpha_operands[];
-extern const int alpha_num_operands;
+extern const unsigned alpha_num_operands;
/* Values defined for the flags field of a struct alpha_operand. */
diff --git a/contrib/binutils/include/opcode/arm.h b/contrib/binutils/include/opcode/arm.h
new file mode 100644
index 0000000..c7087eb
--- /dev/null
+++ b/contrib/binutils/include/opcode/arm.h
@@ -0,0 +1,294 @@
+/* ARM opcode list.
+ Copyright (C) 1989, Free Software Foundation, Inc.
+
+This file is part of GDB and GAS.
+
+GDB and GAS are 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)
+any later version.
+
+GDB and GAS are 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 GDB or GAS; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* types of instruction (encoded in bits 26 and 27 of the instruction) */
+
+#define TYPE_ARITHMETIC 0
+#define TYPE_LDR_STR 1
+#define TYPE_BLOCK_BRANCH 2
+#define TYPE_SWI 3
+
+/* bit 25 decides whether an instruction is a block move or a branch */
+#define SUBTYPE_BLOCK 0
+#define SUBTYPE_BRANCH 1
+
+/* codes to distinguish the arithmetic instructions */
+
+#define OPCODE_AND 0
+#define OPCODE_EOR 1
+#define OPCODE_SUB 2
+#define OPCODE_RSB 3
+#define OPCODE_ADD 4
+#define OPCODE_ADC 5
+#define OPCODE_SBC 6
+#define OPCODE_RSC 7
+#define OPCODE_TST 8
+#define OPCODE_TEQ 9
+#define OPCODE_CMP 10
+#define OPCODE_CMN 11
+#define OPCODE_ORR 12
+#define OPCODE_MOV 13
+#define OPCODE_BIC 14
+#define OPCODE_MVN 15
+
+/* condition codes */
+
+#define COND_EQ 0
+#define COND_NE 1
+#define COND_CS 2
+#define COND_CC 3
+#define COND_MI 4
+#define COND_PL 5
+#define COND_VS 6
+#define COND_VC 7
+#define COND_HI 8
+#define COND_LS 9
+#define COND_GE 10
+#define COND_LT 11
+#define COND_GT 12
+#define COND_LE 13
+#define COND_AL 14
+#define COND_NV 15
+
+/* Describes the format of an ARM machine instruction */
+
+struct generic_fmt {
+ unsigned rest :25; /* the rest of the instruction */
+ unsigned subtype :1; /* used to decide between block and branch */
+ unsigned type :2; /* one of TYPE_* */
+ unsigned cond :4; /* one of COND_* defined above */
+};
+
+struct arith_fmt {
+ unsigned operand2 :12; /* #nn or rn or rn shift #m or rn shift rm */
+ unsigned dest :4; /* place where the answer goes */
+ unsigned operand1 :4; /* first operand to instruction */
+ unsigned set :1; /* == 1 means set processor flags */
+ unsigned opcode :4; /* one of OPCODE_* defined above */
+ unsigned immed :1; /* operand2 is an immediate value */
+ unsigned type :2; /* == TYPE_ARITHMETIC */
+ unsigned cond :4; /* one of COND_* defined above */
+};
+
+struct ldr_str_fmt {
+ unsigned offset :12; /* #nn or rn or rn shift #m */
+ unsigned reg :4; /* destination for LDR, source for STR */
+ unsigned base :4; /* base register */
+ unsigned is_load :1; /* == 1 for LDR */
+ unsigned writeback :1; /* == 1 means write back (base+offset) into base */
+ unsigned byte :1; /* == 1 means byte access else word */
+ unsigned up :1; /* == 1 means add offset else subtract it */
+ unsigned pre_index :1; /* == 1 means [a,b] form else [a],b form */
+ unsigned immed :1; /* == 0 means immediate offset */
+ unsigned type :2; /* == TYPE_LDR_STR */
+ unsigned cond :4; /* one of COND_* defined above */
+};
+
+struct block_fmt {
+ unsigned mask :16; /* register mask */
+ unsigned base :4; /* register used as base of move */
+ unsigned is_load :1; /* == 1 for LDM */
+ unsigned writeback :1; /* == 1 means update base after move */
+ unsigned set :1; /* == 1 means set flags in pc if included in mask */
+ unsigned increment :1; /* == 1 means increment base register */
+ unsigned before :1; /* == 1 means inc/dec before each move */
+ unsigned is_block :1; /* == SUBTYPE_BLOCK */
+ unsigned type :2; /* == TYPE_BLOCK_BRANCH */
+ unsigned cond :4; /* one of COND_* defined above */
+};
+
+struct branch_fmt {
+ unsigned dest :24; /* destination of the branch */
+ unsigned link :1; /* branch with link (function call) */
+ unsigned is_branch :1; /* == SUBTYPE_BRANCH */
+ unsigned type :2; /* == TYPE_BLOCK_BRANCH */
+ unsigned cond :4; /* one of COND_* defined above */
+};
+
+#define ROUND_N 0
+#define ROUND_P 1
+#define ROUND_M 2
+#define ROUND_Z 3
+
+#define FLOAT2_MVF 0
+#define FLOAT2_MNF 1
+#define FLOAT2_ABS 2
+#define FLOAT2_RND 3
+#define FLOAT2_SQT 4
+#define FLOAT2_LOG 5
+#define FLOAT2_LGN 6
+#define FLOAT2_EXP 7
+#define FLOAT2_SIN 8
+#define FLOAT2_COS 9
+#define FLOAT2_TAN 10
+#define FLOAT2_ASN 11
+#define FLOAT2_ACS 12
+#define FLOAT2_ATN 13
+
+#define FLOAT3_ADF 0
+#define FLOAT3_MUF 1
+#define FLOAT3_SUF 2
+#define FLOAT3_RSF 3
+#define FLOAT3_DVF 4
+#define FLOAT3_RDF 5
+#define FLOAT3_POW 6
+#define FLOAT3_RPW 7
+#define FLOAT3_RMF 8
+#define FLOAT3_FML 9
+#define FLOAT3_FDV 10
+#define FLOAT3_FRD 11
+#define FLOAT3_POL 12
+
+struct float2_fmt {
+ unsigned operand2 :3; /* second operand */
+ unsigned immed :1; /* == 1 if second operand is a constant */
+ unsigned pad1 :1; /* == 0 */
+ unsigned rounding :2; /* ROUND_* */
+ unsigned is_double :1; /* == 1 if precision is double (only if not extended) */
+ unsigned pad2 :4; /* == 1 */
+ unsigned dest :3; /* destination */
+ unsigned is_2_op :1; /* == 1 if 2 operand ins */
+ unsigned operand1 :3; /* first operand (only of is_2_op == 0) */
+ unsigned is_extended :1; /* == 1 if precision is extended */
+ unsigned opcode :4; /* FLOAT2_* or FLOAT3_* depending on is_2_op */
+ unsigned must_be_2 :2; /* == 2 */
+ unsigned type :2; /* == TYPE_SWI */
+ unsigned cond :4; /* COND_* */
+};
+
+struct swi_fmt {
+ unsigned argument :24; /* argument to SWI (syscall number) */
+ unsigned must_be_3 :2; /* == 3 */
+ unsigned type :2; /* == TYPE_SWI */
+ unsigned cond :4; /* one of COND_* defined above */
+};
+
+union insn_fmt {
+ struct generic_fmt generic;
+ struct arith_fmt arith;
+ struct ldr_str_fmt ldr_str;
+ struct block_fmt block;
+ struct branch_fmt branch;
+ struct swi_fmt swi;
+ unsigned long ins;
+};
+
+struct opcode {
+ unsigned long value, mask; /* recognise instruction if (op&mask)==value */
+ char *assembler; /* how to disassemble this instruction */
+};
+
+/* format of the assembler string :
+
+ %% %
+ %<bitfield>d print the bitfield in decimal
+ %<bitfield>x print the bitfield in hex
+ %<bitfield>r print as an ARM register
+ %<bitfield>f print a floating point constant if >7 else an fp register
+ %c print condition code (always bits 28-31)
+ %P print floating point precision in arithmetic insn
+ %Q print floating point precision in ldf/stf insn
+ %R print floating point rounding mode
+ %<bitnum>'c print specified char iff bit is one
+ %<bitnum>`c print specified char iff bit is zero
+ %<bitnum>?ab print a if bit is one else print b
+ %p print 'p' iff bits 12-15 are 15
+ %o print operand2 (immediate or register + shift)
+ %a print address for ldr/str instruction
+ %b print branch destination
+ %A print address for ldc/stc/ldf/stf instruction
+ %m print register mask for ldm/stm instruction
+*/
+
+static struct opcode opcodes[] = {
+ /* ARM instructions */
+ 0x00000090, 0x0fe000f0, "mul%20's %12-15r, %16-19r, %0-3r",
+ 0x00200090, 0x0fe000f0, "mla%20's %12-15r, %16-19r, %0-3r, %8-11r",
+ 0x00000000, 0x0de00000, "and%c%20's %12-15r, %16-19r, %o",
+ 0x00200000, 0x0de00000, "eor%c%20's %12-15r, %16-19r, %o",
+ 0x00400000, 0x0de00000, "sub%c%20's %12-15r, %16-19r, %o",
+ 0x00600000, 0x0de00000, "rsb%c%20's %12-15r, %16-19r, %o",
+ 0x00800000, 0x0de00000, "add%c%20's %12-15r, %16-19r, %o",
+ 0x00a00000, 0x0de00000, "adc%c%20's %12-15r, %16-19r, %o",
+ 0x00c00000, 0x0de00000, "sbc%c%20's %12-15r, %16-19r, %o",
+ 0x00e00000, 0x0de00000, "rsc%c%20's %12-15r, %16-19r, %o",
+ 0x01000000, 0x0de00000, "tst%c%p %16-19r, %o",
+ 0x01200000, 0x0de00000, "teq%c%p %16-19r, %o",
+ 0x01400000, 0x0de00000, "cmp%c%p %16-19r, %o",
+ 0x01600000, 0x0de00000, "cmn%c%p %16-19r, %o",
+ 0x01800000, 0x0de00000, "orr%c%20's %12-15r, %16-19r, %o",
+ 0x01a00000, 0x0de00000, "mov%c%20's %12-15r, %o",
+ 0x01c00000, 0x0de00000, "bic%c%20's %12-15r, %16-19r, %o",
+ 0x01e00000, 0x0de00000, "mvn%c%20's %12-15r, %o",
+ 0x04000000, 0x0c100000, "str%c%22'b %12-15r, %a",
+ 0x04100000, 0x0c100000, "ldr%c%22'b %12-15r, %a",
+ 0x08000000, 0x0e100000, "stm%c%23?id%24?ba %16-19r%22`!, %m",
+ 0x08100000, 0x0e100000, "ldm%c%23?id%24?ba %16-19r%22`!, %m%22'^",
+ 0x0a000000, 0x0e000000, "b%c%24'l %b",
+ 0x0f000000, 0x0f000000, "swi%c %0-23x",
+ /* Floating point coprocessor instructions */
+ 0x0e000100, 0x0ff08f10, "adf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e100100, 0x0ff08f10, "muf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e200100, 0x0ff08f10, "suf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e300100, 0x0ff08f10, "rsf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e400100, 0x0ff08f10, "dvf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e500100, 0x0ff08f10, "rdf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e600100, 0x0ff08f10, "pow%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e700100, 0x0ff08f10, "rpw%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e800100, 0x0ff08f10, "rmf%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e900100, 0x0ff08f10, "fml%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0ea00100, 0x0ff08f10, "fdv%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0eb00100, 0x0ff08f10, "frd%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0ec00100, 0x0ff08f10, "pol%c%P%R %12-14f, %16-18f, %0-3f",
+ 0x0e008100, 0x0ff08f10, "mvf%c%P%R %12-14f, %0-3f",
+ 0x0e108100, 0x0ff08f10, "mnf%c%P%R %12-14f, %0-3f",
+ 0x0e208100, 0x0ff08f10, "abs%c%P%R %12-14f, %0-3f",
+ 0x0e308100, 0x0ff08f10, "rnd%c%P%R %12-14f, %0-3f",
+ 0x0e408100, 0x0ff08f10, "sqt%c%P%R %12-14f, %0-3f",
+ 0x0e508100, 0x0ff08f10, "log%c%P%R %12-14f, %0-3f",
+ 0x0e608100, 0x0ff08f10, "lgn%c%P%R %12-14f, %0-3f",
+ 0x0e708100, 0x0ff08f10, "exp%c%P%R %12-14f, %0-3f",
+ 0x0e808100, 0x0ff08f10, "sin%c%P%R %12-14f, %0-3f",
+ 0x0e908100, 0x0ff08f10, "cos%c%P%R %12-14f, %0-3f",
+ 0x0ea08100, 0x0ff08f10, "tan%c%P%R %12-14f, %0-3f",
+ 0x0eb08100, 0x0ff08f10, "asn%c%P%R %12-14f, %0-3f",
+ 0x0ec08100, 0x0ff08f10, "acs%c%P%R %12-14f, %0-3f",
+ 0x0ed08100, 0x0ff08f10, "atn%c%P%R %12-14f, %0-3f",
+ 0x0e000110, 0x0ff00f1f, "flt%c%P%R %16-18f, %12-15r",
+ 0x0e100110, 0x0fff0f98, "fix%c%R %12-15r, %0-2f",
+ 0x0e200110, 0x0fff0fff, "wfs%c %12-15r",
+ 0x0e300110, 0x0fff0fff, "rfs%c %12-15r",
+ 0x0e400110, 0x0fff0fff, "wfc%c %12-15r",
+ 0x0e500110, 0x0fff0fff, "rfc%c %12-15r",
+ 0x0e90f110, 0x0ff8fff0, "cmf%c %16-18f, %0-3f",
+ 0x0eb0f110, 0x0ff8fff0, "cnf%c %16-18f, %0-3f",
+ 0x0ed0f110, 0x0ff8fff0, "cmfe%c %16-18f, %0-3f",
+ 0x0ef0f110, 0x0ff8fff0, "cnfe%c %16-18f, %0-3f",
+ 0x0c000100, 0x0e100f00, "stf%c%Q %12-14f, %A",
+ 0x0c100100, 0x0e100f00, "ldf%c%Q %12-14f, %A",
+ /* Generic coprocessor instructions */
+ 0x0e000000, 0x0f000010, "cdp%c %8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}",
+ 0x0e000010, 0x0f100010, "mrc%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
+ 0x0e100010, 0x0f100010, "mcr%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
+ 0x0c000000, 0x0e100000, "stc%c%22`l %8-11d, cr%12-15d, %A",
+ 0x0c100000, 0x0e100000, "ldc%c%22`l %8-11d, cr%12-15d, %A",
+ /* the rest */
+ 0x00000000, 0x00000000, "undefined instruction %0-31x",
+};
+#define N_OPCODES (sizeof opcodes / sizeof opcodes[0])
diff --git a/contrib/binutils/include/opcode/cgen.h b/contrib/binutils/include/opcode/cgen.h
index ab59f24..0cff7c8 100644
--- a/contrib/binutils/include/opcode/cgen.h
+++ b/contrib/binutils/include/opcode/cgen.h
@@ -1,6 +1,6 @@
/* Header file for targets using CGEN: Cpu tools GENerator.
-Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GDB, the GNU debugger, and the GNU Binutils.
@@ -21,10 +21,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef CGEN_H
#define CGEN_H
-/* Prepend the cpu name, defined in cpu-opc.h, and _cgen_ to symbol S.
+/* ??? This file requires bfd.h but only to get bfd_vma.
+ Seems like an awful lot to require just to get such a fundamental type.
+ Perhaps the definition of bfd_vma can be moved outside of bfd.h.
+ Or perhaps one could duplicate its definition in another file.
+ Until such time, this file conditionally compiles definitions that require
+ bfd_vma using BFD_VERSION. */
+
+/* Enums must be defined before they can be used.
+ Allow them to be used in struct definitions, even though the enum must
+ be defined elsewhere.
+ If CGEN_ARCH isn't defined, this file is being included by something other
+ than <arch>-desc.h. */
+
+/* Prepend the arch name, defined in <arch>-desc.h, and _cgen_ to symbol S.
The lack of spaces in the arg list is important for non-stdc systems.
- This file is included by <cpu>-opc.h.
- It can be included independently of cpu-opc.h, in which case the cpu
+ This file is included by <arch>-desc.h.
+ It can be included independently of <arch>-desc.h, in which case the arch
dependent portions will be declared as "unknown_cgen_foo". */
#ifndef CGEN_SYM
@@ -38,92 +51,156 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* The assembler syntax is made up of expressions (duh...).
At the lowest level the values are mnemonics, register names, numbers, etc.
Above that are subexpressions, if any (an example might be the
- "effective address" in m68k cpus). At the second highest level are the
- insns themselves. Above that are pseudo-insns, synthetic insns, and macros,
- if any.
-*/
+ "effective address" in m68k cpus). Subexpressions are wip.
+ At the second highest level are the insns themselves. Above that are
+ pseudo-insns, synthetic insns, and macros, if any. */
/* Lots of cpu's have a fixed insn size, or one which rarely changes,
and it's generally easier to handle these by treating the insn as an
integer type, rather than an array of characters. So we allow targets
- to control this. */
+ to control this. When an integer type the value is in host byte order,
+ when an array of characters the value is in target byte order. */
-#ifdef CGEN_INT_INSN
-typedef unsigned int cgen_insn_t;
+typedef unsigned int CGEN_INSN_INT;
+#if CGEN_INT_INSN_P
+typedef CGEN_INSN_INT CGEN_INSN_BYTES;
+typedef CGEN_INSN_INT *CGEN_INSN_BYTES_PTR;
#else
-typedef char * cgen_insn_t;
+typedef unsigned char *CGEN_INSN_BYTES;
+typedef unsigned char *CGEN_INSN_BYTES_PTR;
#endif
#ifdef __GNUC__
-#define CGEN_INLINE inline
+#define CGEN_INLINE __inline__
#else
#define CGEN_INLINE
#endif
-/* Perhaps we should just use bfd.h, but it's not clear
- one would want to require that yet. */
enum cgen_endian
{
CGEN_ENDIAN_UNKNOWN,
CGEN_ENDIAN_LITTLE,
CGEN_ENDIAN_BIG
};
+
+/* Forward decl. */
+
+typedef struct cgen_insn CGEN_INSN;
+
+/* Opaque pointer version for use by external world. */
+
+typedef struct cgen_cpu_desc *CGEN_CPU_DESC;
/* Attributes.
- Attributes are used to describe various random things. */
+ Attributes are used to describe various random things associated with
+ an object (ifield, hardware, operand, insn, whatever) and are specified
+ as name/value pairs.
+ Integer attributes computed at compile time are currently all that's
+ supported, though adding string attributes and run-time computation is
+ straightforward. Integer attribute values are always host int's
+ (signed or unsigned). For portability, this means 32 bits.
+ Integer attributes are further categorized as boolean, bitset, integer,
+ and enum types. Boolean attributes appear frequently enough that they're
+ recorded in one host int. This limits the maximum number of boolean
+ attributes to 32, though that's a *lot* of attributes. */
+
+/* Type of attribute values. */
+
+typedef int CGEN_ATTR_VALUE_TYPE;
/* Struct to record attribute information. */
+
typedef struct
{
- unsigned char num_nonbools;
+ /* Boolean attributes. */
unsigned int bool;
- unsigned int nonbool[1];
+ /* Non-boolean integer attributes. */
+ CGEN_ATTR_VALUE_TYPE nonbool[1];
} CGEN_ATTR;
/* Define a structure member for attributes with N non-boolean entries.
- The attributes are sorted so that the non-boolean ones come first.
- num_nonbools: count of nonboolean attributes
- bool: values of boolean attributes
- nonbool: values of non-boolean attributes
- There is a maximum of 32 attributes total. */
+ There is no maximum number of non-boolean attributes.
+ There is a maximum of 32 boolean attributes (since they are all recorded
+ in one host int). */
+
#define CGEN_ATTR_TYPE(n) \
-const struct { unsigned char num_nonbools; \
- unsigned int bool; \
- unsigned int nonbool[(n) ? (n) : 1]; }
+struct { unsigned int bool; \
+ CGEN_ATTR_VALUE_TYPE nonbool[(n) ? (n) : 1]; }
+
+/* Return the boolean attributes. */
+
+#define CGEN_ATTR_BOOLS(a) ((a)->bool)
+
+/* Non-boolean attribute numbers are offset by this much. */
+
+#define CGEN_ATTR_NBOOL_OFFSET 32
+
+/* Given a boolean attribute number, return its mask. */
-/* Given an attribute number, return its mask. */
#define CGEN_ATTR_MASK(attr) (1 << (attr))
/* Return the value of boolean attribute ATTR in ATTRS. */
-#define CGEN_BOOL_ATTR(attrs, attr) \
-((CGEN_ATTR_MASK (attr) & (attrs)) != 0)
+
+#define CGEN_BOOL_ATTR(attrs, attr) ((CGEN_ATTR_MASK (attr) & (attrs)) != 0)
/* Return value of attribute ATTR in ATTR_TABLE for OBJ.
- OBJ is a pointer to the entity that has the attributes.
- It's not used at present but is reserved for future purposes. */
+ OBJ is a pointer to the entity that has the attributes
+ (??? not used at present but is reserved for future purposes - eventually
+ the goal is to allow recording attributes in source form and computing
+ them lazily at runtime, not sure of the details yet). */
+
#define CGEN_ATTR_VALUE(obj, attr_table, attr) \
-((unsigned int) (attr) < (attr_table)->num_nonbools \
- ? ((attr_table)->nonbool[attr]) \
- : (((attr_table)->bool & (1 << (attr))) != 0))
+((unsigned int) (attr) < CGEN_ATTR_NBOOL_OFFSET \
+ ? ((CGEN_ATTR_BOOLS (attr_table) & CGEN_ATTR_MASK (attr)) != 0) \
+ : ((attr_table)->nonbool[(attr) - CGEN_ATTR_NBOOL_OFFSET]))
/* Attribute name/value tables.
- These are used to assist parsing of descriptions at runtime. */
+ These are used to assist parsing of descriptions at run-time. */
typedef struct
{
const char * name;
- int value;
+ CGEN_ATTR_VALUE_TYPE value;
} CGEN_ATTR_ENTRY;
-/* For each domain (fld,operand,insn), list of attributes. */
+/* For each domain (ifld,hw,operand,insn), list of attributes. */
typedef struct
{
- const char * name;
- /* NULL for boolean attributes. */
+ const char * name;
+ const CGEN_ATTR_ENTRY * dfault;
const CGEN_ATTR_ENTRY * vals;
} CGEN_ATTR_TABLE;
+/* Instruction set variants. */
+
+typedef struct {
+ const char *name;
+
+ /* Default instruction size (in bits).
+ This is used by the assembler when it encounters an unknown insn. */
+ unsigned int default_insn_bitsize;
+
+ /* Base instruction size (in bits).
+ For non-LIW cpus this is generally the length of the smallest insn.
+ For LIW cpus its wip (work-in-progress). For the m32r its 32. */
+ unsigned int base_insn_bitsize;
+
+ /* Minimum/maximum instruction size (in bits). */
+ unsigned int min_insn_bitsize;
+ unsigned int max_insn_bitsize;
+} CGEN_ISA;
+
+/* Machine variants. */
+
+typedef struct {
+ const char *name;
+ /* The argument to bfd_arch_info->scan. */
+ const char *bfd_name;
+ /* one of enum mach_attr */
+ int num;
+} CGEN_MACH;
+
/* Parse result (also extraction result).
The result of parsing an insn is stored here.
@@ -147,95 +224,115 @@ typedef struct cgen_fields CGEN_FIELDS;
if it ever gets inlined. On architectures where insns all have the same
size, may wish to detect that and make this macro a constant - to allow
further optimizations. */
+
#define CGEN_FIELDS_BITSIZE(fields) ((fields)->length)
+/* Extraction support for variable length insn sets. */
+
+/* When disassembling we don't know the number of bytes to read at the start.
+ So the first CGEN_BASE_INSN_SIZE bytes are read at the start and the rest
+ are read when needed. This struct controls this. It is basically the
+ disassemble_info stuff, except that we provide a cache for values already
+ read (since bytes can typically be read several times to fetch multiple
+ operands that may be in them), and that extraction of fields is needed
+ in contexts other than disassembly. */
+
+typedef struct {
+ /* A pointer to the disassemble_info struct.
+ We don't require dis-asm.h so we use PTR for the type here.
+ If NULL, BYTES is full of valid data (VALID == -1). */
+ PTR dis_info;
+ /* Points to a working buffer of sufficient size. */
+ unsigned char *insn_bytes;
+ /* Mask of bytes that are valid in INSN_BYTES. */
+ unsigned int valid;
+} CGEN_EXTRACT_INFO;
+
/* Associated with each insn or expression is a set of "handlers" for
- performing operations like parsing, printing, etc. */
-
-/* Forward decl. */
-typedef struct cgen_insn CGEN_INSN;
+ performing operations like parsing, printing, etc. These require a bfd_vma
+ value to be passed around but we don't want all applications to need bfd.h.
+ So this stuff is only provided if bfd.h has been included. */
/* Parse handler.
- The first argument is a pointer to a struct describing the insn being
- parsed.
- The second argument is a pointer to a pointer to the text being parsed.
- The third argument is a pointer to a cgen_fields struct
- in which the results are placed.
- If the expression is successfully parsed, the pointer to the text is
- updated. If not it is left alone.
+ CD is a cpu table descriptor.
+ INSN is a pointer to a struct describing the insn being parsed.
+ STRP is a pointer to a pointer to the text being parsed.
+ FIELDS is a pointer to a cgen_fields struct in which the results are placed.
+ If the expression is successfully parsed, *STRP is updated.
+ If not it is left alone.
The result is NULL if success or an error message. */
-typedef const char * (cgen_parse_fn) PARAMS ((const struct cgen_insn *,
- const char **,
- CGEN_FIELDS *));
+typedef const char * (cgen_parse_fn)
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ const char **strp_, CGEN_FIELDS *fields_));
+
+/* Insert handler.
+ CD is a cpu table descriptor.
+ INSN is a pointer to a struct describing the insn being parsed.
+ FIELDS is a pointer to a cgen_fields struct from which the values
+ are fetched.
+ INSNP is a pointer to a buffer in which to place the insn.
+ PC is the pc value of the insn.
+ The result is an error message or NULL if success. */
+
+#ifdef BFD_VERSION
+typedef const char * (cgen_insert_fn)
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
+ bfd_vma pc_));
+#else
+typedef const char * (cgen_insert_fn) ();
+#endif
+
+/* Extract handler.
+ CD is a cpu table descriptor.
+ INSN is a pointer to a struct describing the insn being parsed.
+ The second argument is a pointer to a struct controlling extraction
+ (only used for variable length insns).
+ EX_INFO is a pointer to a struct for controlling reading of further
+ bytes for the insn.
+ BASE_INSN is the first CGEN_BASE_INSN_SIZE bytes (host order).
+ FIELDS is a pointer to a cgen_fields struct in which the results are placed.
+ PC is the pc value of the insn.
+ The result is the length of the insn in bits or zero if not recognized. */
+
+#ifdef BFD_VERSION
+typedef int (cgen_extract_fn)
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
+ CGEN_FIELDS *fields_, bfd_vma pc_));
+#else
+typedef int (cgen_extract_fn) ();
+#endif
/* Print handler.
- The first argument is a pointer to the disassembly info.
+ CD is a cpu table descriptor.
+ INFO is a pointer to the disassembly info.
Eg: disassemble_info. It's defined as `PTR' so this file can be included
without dis-asm.h.
- The second argument is a pointer to a struct describing the insn being
- printed.
- The third argument is a pointer to a cgen_fields struct.
- The fourth argument is the pc value of the insn.
- The fifth argument is the length of the insn, in bytes. */
-/* Don't require bfd.h unnecessarily. */
+ INSN is a pointer to a struct describing the insn being printed.
+ FIELDS is a pointer to a cgen_fields struct.
+ PC is the pc value of the insn.
+ LEN is the length of the insn, in bits. */
+
#ifdef BFD_VERSION
-typedef void (cgen_print_fn) PARAMS ((PTR, const struct cgen_insn *,
- CGEN_FIELDS *, bfd_vma, int));
+typedef void (cgen_print_fn)
+ PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
+ CGEN_FIELDS *fields_, bfd_vma pc_, int len_));
#else
typedef void (cgen_print_fn) ();
#endif
-/* Insert handler.
- The first argument is a pointer to a struct describing the insn being
- parsed.
- The second argument is a pointer to a cgen_fields struct
- from which the values are fetched.
- The third argument is a pointer to a buffer in which to place the insn.
- The result is an error message or NULL if success. */
-typedef const char * (cgen_insert_fn) PARAMS ((const struct cgen_insn *,
- CGEN_FIELDS *, cgen_insn_t *));
+/* Parse/insert/extract/print handlers.
-/* Extract handler.
- The first argument is a pointer to a struct describing the insn being
- parsed.
- The second argument is a pointer to a struct controlling extraction
- (only used for variable length insns).
- The third argument is the first CGEN_BASE_INSN_SIZE bytes.
- The fourth argument is a pointer to a cgen_fields struct
- in which the results are placed.
- The result is the length of the insn or zero if not recognized. */
-typedef int (cgen_extract_fn) PARAMS ((const struct cgen_insn *,
- void *, cgen_insn_t,
- CGEN_FIELDS *));
-
-/* The `parse' and `insert' fields are indices into these tables.
- The elements are pointer to specialized handler functions.
- Element 0 is special, it means use the default handler. */
-extern cgen_parse_fn * CGEN_SYM (parse_handlers) [];
-#define CGEN_PARSE_FN(x) (CGEN_SYM (parse_handlers)[(x)->base.parse])
-extern cgen_insert_fn * CGEN_SYM (insert_handlers) [];
-#define CGEN_INSERT_FN(x) (CGEN_SYM (insert_handlers)[(x)->base.insert])
-
-/* Likewise for the `extract' and `print' fields. */
-extern cgen_extract_fn * CGEN_SYM (extract_handlers) [];
-#define CGEN_EXTRACT_FN(x) (CGEN_SYM (extract_handlers)[(x)->base.extract])
-extern cgen_print_fn * CGEN_SYM (print_handlers) [];
-#define CGEN_PRINT_FN(x) (CGEN_SYM (print_handlers)[(x)->base.print])
-
-/* Base class of parser/printer.
- (Don't read too much into the use of the phrase "base class".
- It's a name I'm using to organize my thoughts.)
+ Indices into the handler tables.
+ We could use pointers here instead, but 90% of them are generally identical
+ and that's a lot of redundant data. Making these unsigned char indices
+ into tables of pointers saves a bit of space.
+ Using indices also keeps assembler code out of the disassembler and
+ vice versa. */
- Instructions and expressions all share this data in common.
- It's a collection of the common elements needed to parse, insert, extract,
- and print each of them. */
-
-struct cgen_base
+struct cgen_opcode_handler
{
- /* Indices into the handler tables.
- We could use pointers here instead, but in the case of the insn table,
- 90% of them would be identical and that's a lot of redundant data.
- 0 means use the default (what the default is is up to the code). */
unsigned char parse, insert, extract, print;
};
@@ -246,11 +343,12 @@ struct cgen_base
Not that one would necessarily want to do that but rather that it helps
keep a clean interface. The interface will obviously be slanted towards
GAS, but at least it's a start.
+ ??? Note that one possible user of the assembler besides GAS is GDB.
Parsing is controlled by the assembler which calls
CGEN_SYM (assemble_insn). If it can parse and build the entire insn
it doesn't call back to the assembler. If it needs/wants to call back
- to the assembler, (*cgen_parse_operand_fn) is called which can either
+ to the assembler, cgen_parse_operand_fn is called which can either
- return a number to be inserted in the insn
- return a "register" value to be inserted
@@ -263,6 +361,7 @@ struct cgen_base
The parsed value is stored in the bfd_vma *. */
/* Values for indicating what the caller wants. */
+
enum cgen_parse_operand_type
{
CGEN_PARSE_OPERAND_INIT,
@@ -270,8 +369,8 @@ enum cgen_parse_operand_type
CGEN_PARSE_OPERAND_ADDRESS
};
-/* Values for indicating what was parsed.
- ??? Not too useful at present but in time. */
+/* Values for indicating what was parsed. */
+
enum cgen_parse_operand_result
{
CGEN_PARSE_OPERAND_RESULT_NUMBER,
@@ -280,49 +379,23 @@ enum cgen_parse_operand_result
CGEN_PARSE_OPERAND_RESULT_ERROR
};
-/* Don't require bfd.h unnecessarily. */
-#ifdef BFD_VERSION
-extern const char * (*cgen_parse_operand_fn)
- PARAMS ((enum cgen_parse_operand_type, const char **, int, int,
+#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
+typedef const char * (cgen_parse_operand_fn)
+ PARAMS ((CGEN_CPU_DESC,
+ enum cgen_parse_operand_type, const char **, int, int,
enum cgen_parse_operand_result *, bfd_vma *));
+#else
+typedef const char * (cgen_parse_operand_fn) ();
#endif
-/* Called before trying to match a table entry with the insn. */
-void cgen_init_parse_operand PARAMS ((void));
-
-/* Called from <cpu>-asm.c to initialize operand parsing. */
+/* Set the cgen_parse_operand_fn callback. */
-/* These are GAS specific. They're not here as part of the interface,
- but rather that we need to put them somewhere. */
+extern void cgen_set_parse_operand_fn
+ PARAMS ((CGEN_CPU_DESC, cgen_parse_operand_fn));
-/* Call this from md_assemble to initialize the assembler callback. */
-void cgen_asm_init_parse PARAMS ((void));
-
-/* Don't require bfd.h unnecessarily. */
-#ifdef BFD_VERSION
-/* The result is an error message or NULL for success.
- The parsed value is stored in the bfd_vma *. */
-const char * cgen_parse_operand PARAMS ((enum cgen_parse_operand_type,
- const char **, int, int,
- enum cgen_parse_operand_result *,
- bfd_vma *));
-#endif
+/* Called before trying to match a table entry with the insn. */
-void cgen_save_fixups PARAMS ((void));
-void cgen_restore_fixups PARAMS ((void));
-void cgen_swap_fixups PARAMS ((void));
-
-/* Add a register to the assembler's hash table.
- This makes lets GAS parse registers for us.
- ??? This isn't currently used, but it could be in the future. */
-void cgen_asm_record_register PARAMS ((char *, int));
-
-/* After CGEN_SYM (assemble_insn) is done, this is called to
- output the insn and record any fixups. The address of the
- assembled instruction is returned in case it is needed by
- the caller. */
-char * cgen_asm_finish_insn PARAMS ((const struct cgen_insn *, cgen_insn_t *,
- unsigned int));
+extern void cgen_init_parse_operand PARAMS ((CGEN_CPU_DESC));
/* Operand values (keywords, integers, symbols, etc.) */
@@ -330,23 +403,56 @@ char * cgen_asm_finish_insn PARAMS ((const struct cgen_insn *, cgen_insn_t *,
enum cgen_asm_type
{
- CGEN_ASM_KEYWORD, CGEN_ASM_MAX
+ CGEN_ASM_NONE, CGEN_ASM_KEYWORD, CGEN_ASM_MAX
};
+#ifndef CGEN_ARCH
+enum cgen_hw_type { CGEN_HW_MAX };
+#endif
+
/* List of hardware elements. */
-typedef struct cgen_hw_entry
+typedef struct
{
- /* The type of this entry, one of `enum hw_type'.
- This is an int and not the enum as the latter may not be declared yet. */
- int type;
- const struct cgen_hw_entry * next;
- char * name;
- enum cgen_asm_type asm_type;
- PTR asm_data;
+ char *name;
+ enum cgen_hw_type type;
+ /* There is currently no example where both index specs and value specs
+ are required, so for now both are clumped under "asm_data". */
+ enum cgen_asm_type asm_type;
+ PTR asm_data;
+#ifndef CGEN_HW_NBOOL_ATTRS
+#define CGEN_HW_NBOOL_ATTRS 1
+#endif
+ CGEN_ATTR_TYPE (CGEN_HW_NBOOL_ATTRS) attrs;
+#define CGEN_HW_ATTRS(hw) (&(hw)->attrs)
} CGEN_HW_ENTRY;
-const CGEN_HW_ENTRY * cgen_hw_lookup PARAMS ((const char *));
+/* Return value of attribute ATTR in HW. */
+
+#define CGEN_HW_ATTR_VALUE(hw, attr) \
+CGEN_ATTR_VALUE ((hw), CGEN_HW_ATTRS (hw), (attr))
+
+/* Table of hardware elements for selected mach, computed at runtime.
+ enum cgen_hw_type is an index into this table (specifically `entries'). */
+
+typedef struct {
+ /* Pointer to null terminated table of all compiled in entries. */
+ const CGEN_HW_ENTRY *init_entries;
+ unsigned int entry_size; /* since the attribute member is variable sized */
+ /* Array of all entries, initial and run-time added. */
+ const CGEN_HW_ENTRY **entries;
+ /* Number of elements in `entries'. */
+ unsigned int num_entries;
+ /* For now, xrealloc is called each time a new entry is added at runtime.
+ ??? May wish to keep track of some slop to reduce the number of calls to
+ xrealloc, except that there's unlikely to be many and not expected to be
+ in speed critical code. */
+} CGEN_HW_TABLE;
+
+extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
+ PARAMS ((CGEN_CPU_DESC, const char *));
+extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
+ PARAMS ((CGEN_CPU_DESC, int));
/* This struct is used to describe things like register names, etc. */
@@ -364,7 +470,9 @@ typedef struct cgen_keyword_entry
This should, but technically needn't, appear last. It is a variable sized
array in that one architecture may have 1 nonbool attribute and another
may have more. Having this last means the non-architecture specific code
- needn't care. */
+ needn't care. The goal is to eventually record
+ attributes in their raw form, evaluate them at run-time, and cache the
+ values, so this worry will go away anyway. */
/* ??? Moving this last should be done by treating keywords like insn lists
and moving the `next' fields into a CGEN_KEYWORD_LIST struct. */
/* FIXME: Not used yet. */
@@ -373,6 +481,8 @@ typedef struct cgen_keyword_entry
#endif
CGEN_ATTR_TYPE (CGEN_KEYWORD_NBOOL_ATTRS) attrs;
+ /* ??? Putting these here means compiled in entries can't be const.
+ Not a really big deal, but something to consider. */
/* Next name hash table entry. */
struct cgen_keyword_entry *next_name;
/* Next value hash table entry. */
@@ -382,27 +492,27 @@ typedef struct cgen_keyword_entry
/* Top level struct for describing a set of related keywords
(e.g. register names).
- This struct supports runtime entry of new values, and hashed lookups. */
+ This struct supports run-time entry of new values, and hashed lookups. */
typedef struct cgen_keyword
{
/* Pointer to initial [compiled in] values. */
- CGEN_KEYWORD_ENTRY * init_entries;
+ CGEN_KEYWORD_ENTRY *init_entries;
/* Number of entries in `init_entries'. */
unsigned int num_init_entries;
/* Hash table used for name lookup. */
- CGEN_KEYWORD_ENTRY ** name_hash_table;
+ CGEN_KEYWORD_ENTRY **name_hash_table;
/* Hash table used for value lookup. */
- CGEN_KEYWORD_ENTRY ** value_hash_table;
+ CGEN_KEYWORD_ENTRY **value_hash_table;
/* Number of entries in the hash_tables. */
unsigned int hash_table_size;
/* Pointer to null keyword "" entry if present. */
- const CGEN_KEYWORD_ENTRY * null_entry;
+ const CGEN_KEYWORD_ENTRY *null_entry;
} CGEN_KEYWORD;
/* Structure used for searching. */
@@ -410,49 +520,57 @@ typedef struct cgen_keyword
typedef struct
{
/* Table being searched. */
- const CGEN_KEYWORD * table;
+ const CGEN_KEYWORD *table;
/* Specification of what is being searched for. */
- const char * spec;
+ const char *spec;
/* Current index in hash table. */
unsigned int current_hash;
/* Current element in current hash chain. */
- CGEN_KEYWORD_ENTRY * current_entry;
+ CGEN_KEYWORD_ENTRY *current_entry;
} CGEN_KEYWORD_SEARCH;
/* Lookup a keyword from its name. */
-const CGEN_KEYWORD_ENTRY * cgen_keyword_lookup_name
+
+const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_name
PARAMS ((CGEN_KEYWORD *, const char *));
+
/* Lookup a keyword from its value. */
-const CGEN_KEYWORD_ENTRY * cgen_keyword_lookup_value
+
+const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_value
PARAMS ((CGEN_KEYWORD *, int));
+
/* Add a keyword. */
+
void cgen_keyword_add PARAMS ((CGEN_KEYWORD *, CGEN_KEYWORD_ENTRY *));
+
/* Keyword searching.
This can be used to retrieve every keyword, or a subset. */
+
CGEN_KEYWORD_SEARCH cgen_keyword_search_init
PARAMS ((CGEN_KEYWORD *, const char *));
const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
PARAMS ((CGEN_KEYWORD_SEARCH *));
/* Operand value support routines. */
-/* FIXME: some of the long's here will need to be bfd_vma or some such. */
-
-const char * cgen_parse_keyword PARAMS ((const char **,
- CGEN_KEYWORD *,
- long *));
-const char * cgen_parse_signed_integer PARAMS ((const char **, int, long *));
-const char * cgen_parse_unsigned_integer PARAMS ((const char **, int,
- unsigned long *));
-const char * cgen_parse_address PARAMS ((const char **, int, int,
- enum cgen_parse_operand_result *,
- long *));
-const char * cgen_validate_signed_integer PARAMS ((long, long, long));
-const char * cgen_validate_unsigned_integer PARAMS ((unsigned long,
- unsigned long,
- unsigned long));
+
+extern const char *cgen_parse_keyword
+ PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
+#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
+extern const char *cgen_parse_signed_integer
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+extern const char *cgen_parse_unsigned_integer
+ PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+extern const char *cgen_parse_address
+ PARAMS ((CGEN_CPU_DESC, const char **, int, int,
+ enum cgen_parse_operand_result *, bfd_vma *));
+extern const char *cgen_validate_signed_integer
+ PARAMS ((long, long, long));
+extern const char *cgen_validate_unsigned_integer
+ PARAMS ((unsigned long, unsigned long, unsigned long));
+#endif
/* Operand modes. */
@@ -462,35 +580,47 @@ const char * cgen_validate_unsigned_integer PARAMS ((unsigned long,
to <arch>-opc.h, or add a hook. */
enum cgen_mode {
- CGEN_MODE_VOID, /* FIXME: rename simulator's VM to VOID */
+ CGEN_MODE_VOID, /* ??? rename simulator's VM to VOID? */
CGEN_MODE_BI, CGEN_MODE_QI, CGEN_MODE_HI, CGEN_MODE_SI, CGEN_MODE_DI,
CGEN_MODE_UBI, CGEN_MODE_UQI, CGEN_MODE_UHI, CGEN_MODE_USI, CGEN_MODE_UDI,
CGEN_MODE_SF, CGEN_MODE_DF, CGEN_MODE_XF, CGEN_MODE_TF,
+ CGEN_MODE_TARGET_MAX,
+ CGEN_MODE_INT, CGEN_MODE_UINT,
CGEN_MODE_MAX
};
/* FIXME: Until simulator is updated. */
+
#define CGEN_MODE_VM CGEN_MODE_VOID
+/* Operands. */
+
+#ifndef CGEN_ARCH
+enum cgen_operand_type { CGEN_OPERAND_MAX };
+#endif
+
+/* "nil" indicator for the operand instance table */
+#define CGEN_OPERAND_NIL CGEN_OPERAND_MAX
+
/* This struct defines each entry in the operand table. */
-typedef struct cgen_operand
+typedef struct
{
/* Name as it appears in the syntax string. */
- char * name;
+ char *name;
+
+ /* Operand type. */
+ enum cgen_operand_type type;
/* The hardware element associated with this operand. */
- const CGEN_HW_ENTRY *hw;
+ enum cgen_hw_type hw_type;
/* FIXME: We don't yet record ifield definitions, which we should.
When we do it might make sense to delete start/length (since they will
be duplicated in the ifield's definition) and replace them with a
- pointer to the ifield entry. Note that as more complicated situations
- need to be handled, going more and more with an OOP paradigm will help
- keep the complication under control. Of course, this was the goal from
- the start, but getting there in one step was too much too soon. */
+ pointer to the ifield entry. */
- /* Bit position (msb of first byte = bit 0).
+ /* Bit position.
This is just a hint, and may be unused in more complex operands.
May be unused for a modifier. */
unsigned char start;
@@ -510,7 +640,9 @@ typedef struct cgen_operand
This should, but technically needn't, appear last. It is a variable sized
array in that one architecture may have 1 nonbool attribute and another
may have more. Having this last means the non-architecture specific code
- needn't care, now or tomorrow. */
+ needn't care, now or tomorrow. The goal is to eventually record
+ attributes in their raw form, evaluate them at run-time, and cache the
+ values, so this worry will go away anyway. */
#ifndef CGEN_OPERAND_NBOOL_ATTRS
#define CGEN_OPERAND_NBOOL_ATTRS 1
#endif
@@ -519,25 +651,32 @@ typedef struct cgen_operand
} CGEN_OPERAND;
/* Return value of attribute ATTR in OPERAND. */
-#define CGEN_OPERAND_ATTR(operand, attr) \
-CGEN_ATTR_VALUE (operand, CGEN_OPERAND_ATTRS (operand), attr)
-
-/* The operand table is currently a very static entity. */
-extern const CGEN_OPERAND CGEN_SYM (operand_table)[];
-enum cgen_operand_type;
-
-#define CGEN_OPERAND_INDEX(operand) ((int) ((operand) - CGEN_SYM (operand_table)))
-/* FIXME: Rename, cpu-opc.h defines this as the typedef of the enum. */
-#define CGEN_OPERAND_TYPE(operand) ((enum cgen_operand_type) CGEN_OPERAND_INDEX (operand))
-#define CGEN_OPERAND_ENTRY(n) (& CGEN_SYM (operand_table) [n])
-
-/* Types of parse/insert/extract/print cover-fn handlers. */
-/* FIXME: move opindex first to match caller. */
-/* FIXME: also need types of insert/extract/print fns. */
-/* FIXME: not currently used as type of 3rd arg varies. */
-typedef const char * (CGEN_PARSE_OPERAND_FN) PARAMS ((const char **, int,
- long *));
+#define CGEN_OPERAND_ATTR_VALUE(operand, attr) \
+CGEN_ATTR_VALUE ((operand), CGEN_OPERAND_ATTRS (operand), (attr))
+
+/* Table of operands for selected mach/isa, computed at runtime.
+ enum cgen_operand_type is an index into this table (specifically
+ `entries'). */
+
+typedef struct {
+ /* Pointer to null terminated table of all compiled in entries. */
+ const CGEN_OPERAND *init_entries;
+ unsigned int entry_size; /* since the attribute member is variable sized */
+ /* Array of all entries, initial and run-time added. */
+ const CGEN_OPERAND **entries;
+ /* Number of elements in `entries'. */
+ unsigned int num_entries;
+ /* For now, xrealloc is called each time a new entry is added at runtime.
+ ??? May wish to keep track of some slop to reduce the number of calls to
+ xrealloc, except that there's unlikely to be many and not expected to be
+ in speed critical code. */
+} CGEN_OPERAND_TABLE;
+
+extern const CGEN_OPERAND * cgen_operand_lookup_by_name
+ PARAMS ((CGEN_CPU_DESC, const char *));
+extern const CGEN_OPERAND * cgen_operand_lookup_by_num
+ PARAMS ((CGEN_CPU_DESC, int));
/* Instruction operand instances.
@@ -545,35 +684,47 @@ typedef const char * (CGEN_PARSE_OPERAND_FN) PARAMS ((const char **, int,
written are recorded. */
/* The type of the instance. */
-enum cgen_operand_instance_type {
+
+enum cgen_opinst_type {
/* End of table marker. */
- CGEN_OPERAND_INSTANCE_END = 0,
- CGEN_OPERAND_INSTANCE_INPUT, CGEN_OPERAND_INSTANCE_OUTPUT
+ CGEN_OPINST_END = 0,
+ CGEN_OPINST_INPUT, CGEN_OPINST_OUTPUT
};
typedef struct
{
- /* The type of this operand. */
- enum cgen_operand_instance_type type;
-#define CGEN_OPERAND_INSTANCE_TYPE(opinst) ((opinst)->type)
+ /* Input or output indicator. */
+ enum cgen_opinst_type type;
+
+ /* Name of operand. */
+ const char *name;
/* The hardware element referenced. */
- const CGEN_HW_ENTRY *hw;
-#define CGEN_OPERAND_INSTANCE_HW(opinst) ((opinst)->hw)
+ enum cgen_hw_type hw_type;
/* The mode in which the operand is being used. */
enum cgen_mode mode;
-#define CGEN_OPERAND_INSTANCE_MODE(opinst) ((opinst)->mode)
- /* The operand table entry or NULL if there is none (i.e. an explicit
- hardware reference). */
- const CGEN_OPERAND *operand;
-#define CGEN_OPERAND_INSTANCE_OPERAND(opinst) ((opinst)->operand)
+ /* The operand table entry CGEN_OPERAND_NIL if there is none
+ (i.e. an explicit hardware reference). */
+ enum cgen_operand_type op_type;
- /* If `operand' is NULL, the index (e.g. into array of registers). */
+ /* If `operand' is "nil", the index (e.g. into array of registers). */
int index;
-#define CGEN_OPERAND_INSTANCE_INDEX(opinst) ((opinst)->index)
-} CGEN_OPERAND_INSTANCE;
+
+ /* Attributes.
+ ??? This perhaps should be a real attribute struct but there's
+ no current need, so we save a bit of space and just have a set of
+ flags. The interface is such that this can easily be made attributes
+ should it prove useful. */
+ unsigned int attrs;
+#define CGEN_OPINST_ATTRS(opinst) ((opinst)->attrs)
+/* Return value of attribute ATTR in OPINST. */
+#define CGEN_OPINST_ATTR(opinst, attr) \
+((CGEN_OPINST_ATTRS (opinst) & (attr)) != 0)
+/* Operand is conditionally referenced (read/written). */
+#define CGEN_OPINST_COND_REF 1
+} CGEN_OPINST;
/* Syntax string.
@@ -604,13 +755,59 @@ typedef struct
However, we treat mnemonics as just another operand of the instruction.
A value of 1 means "this is where the mnemonic appears". 1 isn't
special other than it's a non-printable ASCII char. */
+
#define CGEN_SYNTAX_MNEMONIC 1
#define CGEN_SYNTAX_MNEMONIC_P(ch) ((ch) == CGEN_SYNTAX_MNEMONIC)
+/* Instruction fields.
+
+ ??? We currently don't allow adding fields at run-time.
+ Easy to fix when needed. */
+
+typedef struct cgen_ifld {
+ /* Enum of ifield. */
+ int num;
+#define CGEN_IFLD_NUM(f) ((f)->num)
+
+ /* Name of the field, distinguishes it from all other fields. */
+ const char *name;
+#define CGEN_IFLD_NAME(f) ((f)->name)
+
+ /* Default offset, in bits, from the start of the insn to the word
+ containing the field. */
+ int word_offset;
+#define CGEN_IFLD_WORD_OFFSET(f) ((f)->word_offset)
+
+ /* Default length of the word containing the field. */
+ int word_size;
+#define CGEN_IFLD_WORD_SIZE(f) ((f)->word_size)
+
+ /* Default starting bit number.
+ Whether lsb=0 or msb=0 is determined by CGEN_INSN_LSB0_P. */
+ int start;
+#define CGEN_IFLD_START(f) ((f)->start)
+
+ /* Length of the field, in bits. */
+ int length;
+#define CGEN_IFLD_LENGTH(f) ((f)->length)
+
+#ifndef CGEN_IFLD_NBOOL_ATTRS
+#define CGEN_IFLD_NBOOL_ATTRS 1
+#endif
+ CGEN_ATTR_TYPE (CGEN_IFLD_NBOOL_ATTRS) attrs;
+#define CGEN_IFLD_ATTRS(f) (&(f)->attrs)
+} CGEN_IFLD;
+
+/* Return value of attribute ATTR in IFLD. */
+#define CGEN_IFLD_ATTR_VALUE(ifld, attr) \
+CGEN_ATTR_VALUE ((ifld), CGEN_IFLD_ATTRS (ifld), (attr))
+
+/* Instruction data. */
+
/* Instruction formats.
Instructions are grouped by format. Associated with an instruction is its
- format. Each opcode table entry contains a format table entry.
+ format. Each insn's opcode table entry contains a format table entry.
??? There is usually very few formats compared with the number of insns,
so one can reduce the size of the opcode table by recording the format table
as a separate entity. Given that we currently don't, format table entries
@@ -620,82 +817,174 @@ typedef struct
??? Support for variable length ISA's is wip. */
+/* Accompanying each iformat description is a list of its fields. */
+
+typedef struct {
+ const CGEN_IFLD *ifld;
+#define CGEN_IFMT_IFLD_IFLD(ii) ((ii)->ifld)
+} CGEN_IFMT_IFLD;
+
+#ifndef CGEN_MAX_IFMT_OPERANDS
+#define CGEN_MAX_IFMT_OPERANDS 1
+#endif
+
typedef struct
{
/* Length that MASK and VALUE have been calculated to
[VALUE is recorded elsewhere].
- Normally it is CGEN_BASE_INSN_BITSIZE. On [V]LIW architectures where
- the base insn size may be larger than the size of an insn, this field is
- less than CGEN_BASE_INSN_BITSIZE. */
+ Normally it is base_insn_bitsize. On [V]LIW architectures where the base
+ insn size may be larger than the size of an insn, this field is less than
+ base_insn_bitsize. */
unsigned char mask_length;
+#define CGEN_IFMT_MASK_LENGTH(ifmt) ((ifmt)->mask_length)
/* Total length of instruction, in bits. */
unsigned char length;
+#define CGEN_IFMT_LENGTH(ifmt) ((ifmt)->length)
/* Mask to apply to the first MASK_LENGTH bits.
Each insn's value is stored with the insn.
The first step in recognizing an insn for disassembly is
(opcode & mask) == value. */
- unsigned int mask;
-} CGEN_FORMAT;
-
-/* This struct defines each entry in the instruction table. */
+ CGEN_INSN_INT mask;
+#define CGEN_IFMT_MASK(ifmt) ((ifmt)->mask)
-struct cgen_insn
+ /* Instruction fields.
+ +1 for trailing NULL. */
+ CGEN_IFMT_IFLD iflds[CGEN_MAX_IFMT_OPERANDS + 1];
+#define CGEN_IFMT_IFLDS(ifmt) ((ifmt)->iflds)
+} CGEN_IFMT;
+
+/* Instruction values. */
+
+typedef struct
{
- /* ??? Further table size reductions can be had by moving this element
- either to the format table or to a separate table of its own. Not
- sure this is desirable yet. */
- struct cgen_base base;
-
-/* Given a pointer to a cgen_insn struct, return a pointer to `base'. */
-#define CGEN_INSN_BASE(insn) (&(insn)->base)
+ /* The opcode portion of the base insn. */
+ CGEN_INSN_INT base_value;
- /* Name of entry (that distinguishes it from all other entries).
- This is used, for example, in simulator profiling results. */
- /* ??? If mnemonics have operands, try to print full mnemonic. */
- const char * name;
-#define CGEN_INSN_NAME(insn) ((insn)->name)
+#ifdef CGEN_MAX_EXTRA_OPCODE_OPERANDS
+ /* Extra opcode values beyond base_value. */
+ unsigned long ifield_values[CGEN_MAX_EXTRA_OPCODE_OPERANDS];
+#endif
+} CGEN_IVALUE;
- /* Mnemonic. This is used when parsing and printing the insn.
- In the case of insns that have operands on the mnemonics, this is
- only the constant part. E.g. for conditional execution of an `add' insn,
- where the full mnemonic is addeq, addne, etc., this is only "add". */
- const char * mnemonic;
-#define CGEN_INSN_MNEMONIC(insn) ((insn)->mnemonic)
+/* Instruction opcode table.
+ This contains the syntax and format data of an instruction. */
+
+/* ??? Some ports already have an opcode table yet still need to use the rest
+ of what cgen_insn has. Plus keeping the opcode data with the operand
+ instance data can create a pretty big file. So we keep them separately.
+ Not sure this is a good idea in the long run. */
+
+typedef struct
+{
+ /* Indices into parse/insert/extract/print handler tables. */
+ struct cgen_opcode_handler handlers;
+#define CGEN_OPCODE_HANDLERS(opc) (& (opc)->handlers)
/* Syntax string. */
- const CGEN_SYNTAX syntax;
-#define CGEN_INSN_SYNTAX(insn) (& (insn)->syntax)
+ CGEN_SYNTAX syntax;
+#define CGEN_OPCODE_SYNTAX(opc) (& (opc)->syntax)
/* Format entry. */
- const CGEN_FORMAT format;
-#define CGEN_INSN_MASK_BITSIZE(insn) ((insn)->format.mask_length)
-#define CGEN_INSN_BITSIZE(insn) ((insn)->format.length)
+ const CGEN_IFMT *format;
+#define CGEN_OPCODE_FORMAT(opc) ((opc)->format)
+#define CGEN_OPCODE_MASK_BITSIZE(opc) CGEN_IFMT_MASK_LENGTH (CGEN_OPCODE_FORMAT (opc))
+#define CGEN_OPCODE_BITSIZE(opc) CGEN_IFMT_LENGTH (CGEN_OPCODE_FORMAT (opc))
+#define CGEN_OPCODE_IFLDS(opc) CGEN_IFMT_IFLDS (CGEN_OPCODE_FORMAT (opc))
/* Instruction opcode value. */
- unsigned int value;
-#define CGEN_INSN_VALUE(insn) ((insn)->value)
-#define CGEN_INSN_MASK(insn) ((insn)->format.mask)
+ CGEN_IVALUE value;
+#define CGEN_OPCODE_VALUE(opc) (& (opc)->value)
+#define CGEN_OPCODE_BASE_VALUE(opc) (CGEN_OPCODE_VALUE (opc)->base_value)
+#define CGEN_OPCODE_BASE_MASK(opc) CGEN_IFMT_MASK (CGEN_OPCODE_FORMAT (opc))
+} CGEN_OPCODE;
+
+/* Instruction attributes.
+ This is made a published type as applications can cache a pointer to
+ the attributes for speed. */
+
+#ifndef CGEN_INSN_NBOOL_ATTRS
+#define CGEN_INSN_NBOOL_ATTRS 1
+#endif
+typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE;
+
+/* Enum of architecture independent attributes. */
+
+#ifndef CGEN_ARCH
+/* ??? Numbers here are recorded in two places. */
+typedef enum cgen_insn_attr {
+ CGEN_INSN_ALIAS = 0
+} CGEN_INSN_ATTR;
+#endif
+
+/* This struct defines each entry in the instruction table. */
+
+typedef struct
+{
+ /* Each real instruction is enumerated. */
+ /* ??? This may go away in time. */
+ int num;
+#define CGEN_INSN_NUM(insn) ((insn)->base->num)
+
+ /* Name of entry (that distinguishes it from all other entries). */
+ /* ??? If mnemonics have operands, try to print full mnemonic. */
+ const char *name;
+#define CGEN_INSN_NAME(insn) ((insn)->base->name)
- /* Pointer to NULL entry terminated table of operands used,
- or NULL if none. */
- const CGEN_OPERAND_INSTANCE *operands;
-#define CGEN_INSN_OPERANDS(insn) ((insn)->operands)
+ /* Mnemonic. This is used when parsing and printing the insn.
+ In the case of insns that have operands on the mnemonics, this is
+ only the constant part. E.g. for conditional execution of an `add' insn,
+ where the full mnemonic is addeq, addne, etc., and the condition is
+ treated as an operand, this is only "add". */
+ const char *mnemonic;
+#define CGEN_INSN_MNEMONIC(insn) ((insn)->base->mnemonic)
+
+ /* Total length of instruction, in bits. */
+ int bitsize;
+#define CGEN_INSN_BITSIZE(insn) ((insn)->base->bitsize)
+
+#if 0 /* ??? Disabled for now as there is a problem with embedded newlines
+ and the table is already pretty big. Should perhaps be moved
+ to a file of its own. */
+ /* Semantics, as RTL. */
+ /* ??? Plain text or bytecodes? */
+ /* ??? Note that the operand instance table could be computed at run-time
+ if we parse this and cache the results. Something to eventually do. */
+ const char *rtx;
+#define CGEN_INSN_RTX(insn) ((insn)->base->rtx)
+#endif
/* Attributes.
This must appear last. It is a variable sized array in that one
architecture may have 1 nonbool attribute and another may have more.
Having this last means the non-architecture specific code needn't
- care. */
-#ifndef CGEN_INSN_NBOOL_ATTRS
-#define CGEN_INSN_NBOOL_ATTRS 1
-#endif
- CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) attrs;
-#define CGEN_INSN_ATTRS(insn) (&(insn)->attrs)
+ care. The goal is to eventually record attributes in their raw form,
+ evaluate them at run-time, and cache the values, so this worry will go
+ away anyway. */
+ CGEN_INSN_ATTR_TYPE attrs;
+#define CGEN_INSN_ATTRS(insn) (&(insn)->base->attrs)
/* Return value of attribute ATTR in INSN. */
-#define CGEN_INSN_ATTR(insn, attr) \
-CGEN_ATTR_VALUE (insn, CGEN_INSN_ATTRS (insn), attr)
+#define CGEN_INSN_ATTR_VALUE(insn, attr) \
+CGEN_ATTR_VALUE ((insn), CGEN_INSN_ATTRS (insn), (attr))
+} CGEN_IBASE;
+
+/* Return non-zero if INSN is the "invalid" insn marker. */
+
+#define CGEN_INSN_INVALID_P(insn) (CGEN_INSN_MNEMONIC (insn) == 0)
+
+/* Main struct contain instruction information.
+ BASE is always present, the rest is present only if asked for. */
+
+struct cgen_insn
+{
+ /* ??? May be of use to put a type indicator here.
+ Then this struct could different info for different classes of insns. */
+ /* ??? A speedup can be had by moving `base' into this struct.
+ Maybe later. */
+ const CGEN_IBASE *base;
+ const CGEN_OPCODE *opcode;
+ const CGEN_OPINST *opinst;
};
/* Instruction lists.
@@ -703,171 +992,408 @@ CGEN_ATTR_VALUE (insn, CGEN_INSN_ATTRS (insn), attr)
typedef struct cgen_insn_list
{
- struct cgen_insn_list * next;
- const CGEN_INSN * insn;
+ struct cgen_insn_list *next;
+ const CGEN_INSN *insn;
} CGEN_INSN_LIST;
-/* The table of instructions. */
+/* Table of instructions. */
typedef struct
{
- /* Pointer to initial [compiled in] entries. */
- const CGEN_INSN * init_entries;
-
- /* Size of an entry (since the attribute member is variable sized). */
- unsigned int entry_size;
-
- /* Number of entries in `init_entries', including trailing NULL entry. */
+ const CGEN_INSN *init_entries;
+ unsigned int entry_size; /* since the attribute member is variable sized */
unsigned int num_init_entries;
-
- /* Values added at runtime. */
- CGEN_INSN_LIST * new_entries;
-
- /* Assembler hash function. */
- unsigned int (* asm_hash) PARAMS ((const char *));
-
- /* Number of entries in assembler hash table. */
- unsigned int asm_hash_table_size;
-
- /* Disassembler hash function. */
- unsigned int (* dis_hash) PARAMS ((const char *, unsigned long));
-
- /* Number of entries in disassembler hash table. */
- unsigned int dis_hash_table_size;
+ CGEN_INSN_LIST *new_entries;
} CGEN_INSN_TABLE;
-/* ??? This is currently used by the simulator.
- We want this to be fast and the simulator currently doesn't handle
- runtime added instructions so this is ok. An alternative would be to
- store the index in the table. */
-extern const CGEN_INSN CGEN_SYM (insn_table_entries)[];
-#define CGEN_INSN_INDEX(insn) ((int) ((insn) - CGEN_SYM (insn_table_entries)))
-#define CGEN_INSN_ENTRY(n) (& CGEN_SYM (insn_table_entries) [n])
+/* Return number of instructions. This includes any added at run-time. */
+
+extern int cgen_insn_count PARAMS ((CGEN_CPU_DESC));
+extern int cgen_macro_insn_count PARAMS ((CGEN_CPU_DESC));
+
+/* Macros to access the other insn elements not recorded in CGEN_IBASE. */
+
+/* Fetch INSN's operand instance table. */
+/* ??? Doesn't handle insns added at runtime. */
+#define CGEN_INSN_OPERANDS(insn) ((insn)->opinst)
+
+/* Return INSN's opcode table entry. */
+#define CGEN_INSN_OPCODE(insn) ((insn)->opcode)
+
+/* Return INSN's handler data. */
+#define CGEN_INSN_HANDLERS(insn) CGEN_OPCODE_HANDLERS (CGEN_INSN_OPCODE (insn))
+
+/* Return INSN's syntax. */
+#define CGEN_INSN_SYNTAX(insn) CGEN_OPCODE_SYNTAX (CGEN_INSN_OPCODE (insn))
-/* Return number of instructions. This includes any added at runtime. */
+/* Return size of base mask in bits. */
+#define CGEN_INSN_MASK_BITSIZE(insn) \
+ CGEN_OPCODE_MASK_BITSIZE (CGEN_INSN_OPCODE (insn))
-int cgen_insn_count PARAMS ((void));
+/* Return mask of base part of INSN. */
+#define CGEN_INSN_BASE_MASK(insn) \
+ CGEN_OPCODE_BASE_MASK (CGEN_INSN_OPCODE (insn))
+/* Return value of base part of INSN. */
+#define CGEN_INSN_BASE_VALUE(insn) \
+ CGEN_OPCODE_BASE_VALUE (CGEN_INSN_OPCODE (insn))
+
+/* Standard way to test whether INSN is supported by MACH.
+ MACH is one of enum mach_attr.
+ The "|1" is because the base mach is always selected. */
+#define CGEN_INSN_MACH_HAS_P(insn, mach) \
+((CGEN_INSN_ATTR_VALUE ((insn), CGEN_INSN_MACH) & ((1 << (mach)) | 1)) != 0)
+
+/* Macro instructions.
+ Macro insns aren't real insns, they map to one or more real insns.
+ E.g. An architecture's "nop" insn may actually be an "mv r0,r0" or
+ some such.
+
+ Macro insns can expand to nothing (e.g. a nop that is optimized away).
+ This is useful in multi-insn macros that build a constant in a register.
+ Of course this isn't the default behaviour and must be explicitly enabled.
+
+ Assembly of macro-insns is relatively straightforward. Disassembly isn't.
+ However, disassembly of at least some kinds of macro insns is important
+ in order that the disassembled code preserve the readability of the original
+ insn. What is attempted here is to disassemble all "simple" macro-insns,
+ where "simple" is currently defined to mean "expands to one real insn".
+
+ Simple macro-insns are handled specially. They are emitted as ALIAS's
+ of real insns. This simplifies their handling since there's usually more
+ of them than any other kind of macro-insn, and proper disassembly of them
+ falls out for free. */
+
+/* For each macro-insn there may be multiple expansion possibilities,
+ depending on the arguments. This structure is accessed via the `data'
+ member of CGEN_INSN. */
+
+typedef struct cgen_minsn_expansion {
+ /* Function to do the expansion.
+ If the expansion fails (e.g. "no match") NULL is returned.
+ Space for the expansion is obtained with malloc.
+ It is up to the caller to free it. */
+ const char * (* fn) PARAMS ((const struct cgen_minsn_expansion *,
+ const char *, const char **, int *,
+ CGEN_OPERAND **));
+#define CGEN_MIEXPN_FN(ex) ((ex)->fn)
+
+ /* Instruction(s) the macro expands to.
+ The format of STR is defined by FN.
+ It is typically the assembly code of the real insn, but it could also be
+ the original Scheme expression or a tokenized form of it (with FN being
+ an appropriate interpreter). */
+ const char * str;
+#define CGEN_MIEXPN_STR(ex) ((ex)->str)
+} CGEN_MINSN_EXPANSION;
+
+/* Normal expander.
+ When supported, this function will convert the input string to another
+ string and the parser will be invoked recursively. The output string
+ may contain further macro invocations. */
+
+extern const char * cgen_expand_macro_insn
+ PARAMS ((CGEN_CPU_DESC, const struct cgen_minsn_expansion *,
+ const char *, const char **, int *, CGEN_OPERAND **));
+
/* The assembler insn table is hashed based on some function of the mnemonic
(the actually hashing done is up to the target, but we provide a few
- examples like the first letter or a function of the entire mnemonic).
- The index of each entry is the index of the corresponding table entry.
- The value of each entry is the index of the next entry, with a 0
- terminating (thus the first entry is reserved). */
-
-#ifndef CGEN_ASM_HASH
-#ifdef CGEN_MNEMONIC_OPERANDS
-#define CGEN_ASM_HASH_SIZE 127
-#define CGEN_ASM_HASH(string) (*(unsigned char *) (string) % CGEN_ASM_HASH_SIZE)
-#else
-#define CGEN_ASM_HASH_SIZE 128
-#define CGEN_ASM_HASH(string) (*(unsigned char *) (string) % CGEN_ASM_HASH_SIZE) /*FIXME*/
-#endif
-#endif
+ examples like the first letter or a function of the entire mnemonic). */
-unsigned int CGEN_SYM (asm_hash_insn) PARAMS ((const char *));
-CGEN_INSN_LIST * cgen_asm_lookup_insn PARAMS ((const char *));
-#define CGEN_ASM_LOOKUP_INSN(insn) cgen_asm_lookup_insn (insn)
+extern CGEN_INSN_LIST * cgen_asm_lookup_insn
+ PARAMS ((CGEN_CPU_DESC, const char *));
+#define CGEN_ASM_LOOKUP_INSN(cd, string) cgen_asm_lookup_insn ((cd), (string))
#define CGEN_ASM_NEXT_INSN(insn) ((insn)->next)
/* The disassembler insn table is hashed based on some function of machine
instruction (the actually hashing done is up to the target). */
-/* It doesn't make much sense to provide a default here,
- but while this is under development we do.
- BUFFER is a pointer to the bytes of the insn.
- INSN is the first CGEN_BASE_INSN_SIZE bytes as an int in host order. */
-#ifndef CGEN_DIS_HASH
-#define CGEN_DIS_HASH_SIZE 256
-#define CGEN_DIS_HASH(buffer, insn) (*(unsigned char *) (buffer))
-#endif
-
-unsigned int CGEN_SYM (dis_hash_insn) PARAMS ((const char *, unsigned long));
-CGEN_INSN_LIST * cgen_dis_lookup_insn PARAMS ((const char *, unsigned long));
-#define CGEN_DIS_LOOKUP_INSN(buf, insn) cgen_dis_lookup_insn (buf, insn)
+extern CGEN_INSN_LIST * cgen_dis_lookup_insn
+ PARAMS ((CGEN_CPU_DESC, const char *, CGEN_INSN_INT));
+/* FIXME: delete these two */
+#define CGEN_DIS_LOOKUP_INSN(cd, buf, value) cgen_dis_lookup_insn ((cd), (buf), (value))
#define CGEN_DIS_NEXT_INSN(insn) ((insn)->next)
-/* Top level structures and functions. */
+/* The CPU description.
+ A copy of this is created when the cpu table is "opened".
+ All global state information is recorded here.
+ Access macros are provided for "public" members. */
-typedef struct
+typedef struct cgen_cpu_desc
{
- const CGEN_HW_ENTRY * hw_list;
- /*CGEN_OPERAND_TABLE * operand_table; - FIXME:wip */
- CGEN_INSN_TABLE * insn_table;
-} CGEN_OPCODE_DATA;
+ /* Bitmap of selected machine(s) (a la BFD machine number). */
+ int machs;
-/* Each CPU has one of these. */
-extern CGEN_OPCODE_DATA CGEN_SYM (opcode_data);
+ /* Bitmap of selected isa(s).
+ ??? Simultaneous multiple isas might not make sense, but it's not (yet)
+ precluded. */
+ int isas;
-/* Global state access macros.
- Some of these are tucked away and accessed with cover fns.
- Simpler things like the current machine and endian are not. */
+ /* Current endian. */
+ enum cgen_endian endian;
+#define CGEN_CPU_ENDIAN(cd) ((cd)->endian)
-extern int cgen_current_machine;
-#define CGEN_CURRENT_MACHINE cgen_current_machine
+ /* Current insn endian. */
+ enum cgen_endian insn_endian;
+#define CGEN_CPU_INSN_ENDIAN(cd) ((cd)->insn_endian)
-extern enum cgen_endian cgen_current_endian;
-#define CGEN_CURRENT_ENDIAN cgen_current_endian
+ /* Word size (in bits). */
+ /* ??? Or maybe maximum word size - might we ever need to allow a cpu table
+ to be opened for both sparc32/sparc64?
+ ??? Another alternative is to create a table of selected machs and
+ lazily fetch the data from there. */
+ unsigned int word_bitsize;
-/* Prototypes of major functions. */
+ /* Indicator if sizes are unknown.
+ This is used by default_insn_bitsize,base_insn_bitsize if there is a
+ difference between the selected isa's. */
+#define CGEN_SIZE_UNKNOWN 65535
+
+ /* Default instruction size (in bits).
+ This is used by the assembler when it encounters an unknown insn. */
+ unsigned int default_insn_bitsize;
+
+ /* Base instruction size (in bits).
+ For non-LIW cpus this is generally the length of the smallest insn.
+ For LIW cpus its wip (work-in-progress). For the m32r its 32. */
+ unsigned int base_insn_bitsize;
+
+ /* Minimum/maximum instruction size (in bits). */
+ unsigned int min_insn_bitsize;
+ unsigned int max_insn_bitsize;
+
+ /* Instruction set variants. */
+ const CGEN_ISA *isa_table;
+
+ /* Machine variants. */
+ const CGEN_MACH *mach_table;
+
+ /* Hardware elements. */
+ CGEN_HW_TABLE hw_table;
+
+ /* Instruction fields. */
+ const CGEN_IFLD *ifld_table;
+
+ /* Operands. */
+ CGEN_OPERAND_TABLE operand_table;
+
+ /* Main instruction table. */
+ CGEN_INSN_TABLE insn_table;
+#define CGEN_CPU_INSN_TABLE(cd) (& (cd)->insn_table)
+
+ /* Macro instructions are defined separately and are combined with real
+ insns during hash table computation. */
+ CGEN_INSN_TABLE macro_insn_table;
+
+ /* Copy of CGEN_INT_INSN_P. */
+ int int_insn_p;
+
+ /* Called to rebuild the tables after something has changed. */
+ void (*rebuild_tables) PARAMS ((CGEN_CPU_DESC));
+
+ /* Operand parser callback. */
+ cgen_parse_operand_fn * parse_operand_fn;
+
+ /* Parse/insert/extract/print cover fns for operands. */
+ const char * (*parse_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
+ CGEN_FIELDS *fields_));
+#ifdef BFD_VERSION
+ const char * (*insert_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
+ CGEN_INSN_BYTES_PTR, bfd_vma pc_));
+ int (*extract_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ CGEN_FIELDS *fields_, bfd_vma pc_));
+ void (*print_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, PTR info_, CGEN_FIELDS * fields_,
+ void const *attrs_, bfd_vma pc_, int length_));
+#else
+ const char * (*insert_operand) ();
+ int (*extract_operand) ();
+ void (*print_operand) ();
+#endif
+#define CGEN_CPU_PARSE_OPERAND(cd) ((cd)->parse_operand)
+#define CGEN_CPU_INSERT_OPERAND(cd) ((cd)->insert_operand)
+#define CGEN_CPU_EXTRACT_OPERAND(cd) ((cd)->extract_operand)
+#define CGEN_CPU_PRINT_OPERAND(cd) ((cd)->print_operand)
+
+ /* Size of CGEN_FIELDS struct. */
+ unsigned int sizeof_fields;
+#define CGEN_CPU_SIZEOF_FIELDS(cd) ((cd)->sizeof_fields)
+
+ /* Set the bitsize field. */
+ void (*set_fields_bitsize) PARAMS ((CGEN_FIELDS *fields_, int size_));
+#define CGEN_CPU_SET_FIELDS_BITSIZE(cd) ((cd)->set_fields_bitsize)
+
+ /* CGEN_FIELDS accessors. */
+ int (*get_int_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
+ void (*set_int_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
+#ifdef BFD_VERSION
+ bfd_vma (*get_vma_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
+ void (*set_vma_operand)
+ PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, bfd_vma value_));
+#else
+ long (*get_vma_operand) ();
+ void (*set_vma_operand) ();
+#endif
+#define CGEN_CPU_GET_INT_OPERAND(cd) ((cd)->get_int_operand)
+#define CGEN_CPU_SET_INT_OPERAND(cd) ((cd)->set_int_operand)
+#define CGEN_CPU_GET_VMA_OPERAND(cd) ((cd)->get_vma_operand)
+#define CGEN_CPU_SET_VMA_OPERAND(cd) ((cd)->set_vma_operand)
+
+ /* Instruction parse/insert/extract/print handlers. */
+ /* FIXME: make these types uppercase. */
+ cgen_parse_fn * const *parse_handlers;
+ cgen_insert_fn * const *insert_handlers;
+ cgen_extract_fn * const *extract_handlers;
+ cgen_print_fn * const *print_handlers;
+#define CGEN_PARSE_FN(cd, insn) (cd->parse_handlers[(insn)->opcode->handlers.parse])
+#define CGEN_INSERT_FN(cd, insn) (cd->insert_handlers[(insn)->opcode->handlers.insert])
+#define CGEN_EXTRACT_FN(cd, insn) (cd->extract_handlers[(insn)->opcode->handlers.extract])
+#define CGEN_PRINT_FN(cd, insn) (cd->print_handlers[(insn)->opcode->handlers.print])
+
+ /* Return non-zero if insn should be added to hash table. */
+ int (* asm_hash_p) PARAMS ((const CGEN_INSN *));
+
+ /* Assembler hash function. */
+ unsigned int (* asm_hash) PARAMS ((const char *));
+
+ /* Number of entries in assembler hash table. */
+ unsigned int asm_hash_size;
+
+ /* Return non-zero if insn should be added to hash table. */
+ int (* dis_hash_p) PARAMS ((const CGEN_INSN *));
-/* Set the current cpu (+ mach number, endian, etc.). */
-void cgen_set_cpu PARAMS ((CGEN_OPCODE_DATA *, int, enum cgen_endian));
-
-/* Initialize the assembler, disassembler. */
-void cgen_asm_init PARAMS ((void));
-void cgen_dis_init PARAMS ((void));
-
-/* `init_tables' must be called before `xxx_supported'. */
-void CGEN_SYM (init_tables) PARAMS ((int));
-void CGEN_SYM (init_asm) PARAMS ((int, enum cgen_endian));
-void CGEN_SYM (init_dis) PARAMS ((int, enum cgen_endian));
-void CGEN_SYM (init_parse) PARAMS ((void));
-void CGEN_SYM (init_print) PARAMS ((void));
-void CGEN_SYM (init_insert) PARAMS ((void));
-void CGEN_SYM (init_extract) PARAMS ((void));
-
-/* FIXME: This prototype is wrong ifndef CGEN_INT_INSN.
- Furthermore, ifdef CGEN_INT_INSN, the insn is created in
- target byte order (in which case why use int's at all).
- Perhaps replace cgen_insn_t * with char *? */
-const struct cgen_insn *
-CGEN_SYM (assemble_insn) PARAMS ((const char *, CGEN_FIELDS *,
- cgen_insn_t *, char **));
-#if 0 /* old */
-int CGEN_SYM (insn_supported) PARAMS ((const struct cgen_insn *));
-int CGEN_SYM (opval_supported) PARAMS ((const struct cgen_opval *));
+ /* Disassembler hash function. */
+ unsigned int (* dis_hash) PARAMS ((const char *, CGEN_INSN_INT));
+
+ /* Number of entries in disassembler hash table. */
+ unsigned int dis_hash_size;
+
+ /* Assembler instruction hash table. */
+ CGEN_INSN_LIST **asm_hash_table;
+ CGEN_INSN_LIST *asm_hash_table_entries;
+
+ /* Disassembler instruction hash table. */
+ CGEN_INSN_LIST **dis_hash_table;
+ CGEN_INSN_LIST *dis_hash_table_entries;
+
+ /* This field could be turned into a bitfield if room for other flags is needed. */
+ unsigned int signed_overflow_ok_p;
+
+} CGEN_CPU_TABLE;
+
+/* wip */
+#ifndef CGEN_WORD_ENDIAN
+#define CGEN_WORD_ENDIAN(cd) CGEN_CPU_ENDIAN (cd)
+#endif
+#ifndef CGEN_INSN_WORD_ENDIAN
+#define CGEN_INSN_WORD_ENDIAN(cd) CGEN_CPU_INSN_ENDIAN (cd)
#endif
+
+/* Prototypes of major functions. */
+/* FIXME: Move more CGEN_SYM-defined functions into CGEN_CPU_DESC.
+ Not the init fns though, as that would drag in things that mightn't be
+ used and might not even exist. */
+
+/* Argument types to cpu_open. */
+
+enum cgen_cpu_open_arg {
+ CGEN_CPU_OPEN_END,
+ /* Select instruction set(s), arg is bitmap or 0 meaning "unspecified". */
+ CGEN_CPU_OPEN_ISAS,
+ /* Select machine(s), arg is bitmap or 0 meaning "unspecified". */
+ CGEN_CPU_OPEN_MACHS,
+ /* Select machine, arg is mach's bfd name.
+ Multiple machines can be specified by repeated use. */
+ CGEN_CPU_OPEN_BFDMACH,
+ /* Select endian, arg is CGEN_ENDIAN_*. */
+ CGEN_CPU_OPEN_ENDIAN
+};
+
+/* Open a cpu descriptor table for use.
+ ??? We only support ISO C stdargs here, not K&R.
+ Laziness, plus experiment to see if anything requires K&R - eventually
+ K&R will no longer be supported - e.g. GDB is currently trying this. */
+
+extern CGEN_CPU_DESC CGEN_SYM (cpu_open) (enum cgen_cpu_open_arg, ...);
+
+/* Cover fn to handle simple case. */
+
+extern CGEN_CPU_DESC CGEN_SYM (cpu_open_1) PARAMS ((const char *mach_name_,
+ enum cgen_endian endian_));
+
+/* Close it. */
+
+extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC));
+
+/* Initialize the opcode table for use.
+ Called by init_asm/init_dis. */
+
+extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_));
+
+/* Initialize the ibld table for use.
+ Called by init_asm/init_dis. */
+
+extern void CGEN_SYM (init_ibld_table) PARAMS ((CGEN_CPU_DESC cd_));
+
+/* Initialize an cpu table for assembler or disassembler use.
+ These must be called immediately after cpu_open. */
+
+extern void CGEN_SYM (init_asm) PARAMS ((CGEN_CPU_DESC));
+extern void CGEN_SYM (init_dis) PARAMS ((CGEN_CPU_DESC));
+
+/* Initialize the operand instance table for use. */
+
+extern void CGEN_SYM (init_opinst_table) PARAMS ((CGEN_CPU_DESC cd_));
+
+/* Assemble an instruction. */
+
+extern const CGEN_INSN * CGEN_SYM (assemble_insn)
+ PARAMS ((CGEN_CPU_DESC, const char *, CGEN_FIELDS *,
+ CGEN_INSN_BYTES_PTR, char **));
+
+extern const CGEN_KEYWORD CGEN_SYM (operand_mach);
+extern int CGEN_SYM (get_mach) PARAMS ((const char *));
+
+/* Operand index computation. */
+extern const CGEN_INSN * cgen_lookup_insn
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
+ CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
+ int length_, CGEN_FIELDS *fields_, int alias_p_));
+extern void cgen_get_insn_operands
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
+ const CGEN_FIELDS *fields_, int *indices_));
+extern const CGEN_INSN * cgen_lookup_get_insn_operands
+ PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
+ int length_, int *indices_, CGEN_FIELDS *fields_));
-extern const CGEN_KEYWORD CGEN_SYM (operand_mach);
-int CGEN_SYM (get_mach) PARAMS ((const char *));
+/* Cover fns to bfd_get/set. */
-const CGEN_INSN *
-CGEN_SYM (get_insn_operands) PARAMS ((const CGEN_INSN *, cgen_insn_t,
- int, int *));
-const CGEN_INSN *
-CGEN_SYM (lookup_insn) PARAMS ((const CGEN_INSN *, cgen_insn_t,
- int, CGEN_FIELDS *, int));
+extern CGEN_INSN_INT cgen_get_insn_value
+ PARAMS ((CGEN_CPU_DESC, unsigned char *, int));
+extern void cgen_put_insn_value
+ PARAMS ((CGEN_CPU_DESC, unsigned char *, int, CGEN_INSN_INT));
-CGEN_INLINE void
-CGEN_SYM (put_operand) PARAMS ((int, const long *,
- CGEN_FIELDS *));
-CGEN_INLINE long
-CGEN_SYM (get_operand) PARAMS ((int, const CGEN_FIELDS *));
+/* Read in a cpu description file.
+ ??? For future concerns, including adding instructions to the assembler/
+ disassembler at run-time. */
-const char *
-CGEN_SYM (parse_operand) PARAMS ((int, const char **, CGEN_FIELDS *));
+extern const char * cgen_read_cpu_file
+ PARAMS ((CGEN_CPU_DESC, const char * filename_));
-const char *
-CGEN_SYM (insert_operand) PARAMS ((int, CGEN_FIELDS *, char *));
+/* Allow signed overflow of instruction fields. */
+extern void cgen_set_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
-/* Default insn parser, printer. */
-extern cgen_parse_fn CGEN_SYM (parse_insn);
-extern cgen_insert_fn CGEN_SYM (insert_insn);
-extern cgen_extract_fn CGEN_SYM (extract_insn);
-extern cgen_print_fn CGEN_SYM (print_insn);
+/* Generate an error message if a signed field in an instruction overflows. */
+extern void cgen_clear_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
-/* Read in a cpu description file. */
-const char * cgen_read_cpu_file PARAMS ((const char *));
+/* Will an error message be generated if a signed field in an instruction overflows ? */
+extern unsigned int cgen_signed_overflow_ok_p PARAMS ((CGEN_CPU_DESC));
#endif /* CGEN_H */
diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h
index da238c9..d399f4eb 100644
--- a/contrib/binutils/include/opcode/i386.h
+++ b/contrib/binutils/include/opcode/i386.h
@@ -1,5 +1,5 @@
-/* i386-opcode.h -- Intel 80386 opcode table
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation.
+/* opcode/i386.h -- Intel 80386 opcode table
+ Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation.
This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
@@ -17,910 +17,1170 @@ 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. */
-/* The NON_BROKEN_OPCODES cases use the operands in the reverse order
- from that documented in the Intel manuals. The opcode values are
- such that they actually generate different instructions. These
- values must not be changed, as they are the values generated by the
- UnixWare assembler, and possibly other ix86 assemblers. */
+/* The SystemV/386 SVR3.2 assembler, and probably all AT&T derived
+ ix86 Unix assemblers, generate floating point instructions with
+ reversed source and destination registers in certain cases.
+ Unfortunately, gcc and possibly many other programs use this
+ reversed syntax, so we're stuck with it.
+
+ eg. `fsub %st(3),%st' results in st = st - st(3) as expected, but
+ `fsub %st,%st(3)' results in st(3) = st - st(3), rather than
+ the expected st(3) = st(3) - st
+
+ This happens with all the non-commutative arithmetic floating point
+ operations with two register operands, where the source register is
+ %st, and destination register is %st(i). See FloatDR below.
+
+ The affected opcode map is dceX, dcfX, deeX, defX. */
+
+#ifndef SYSV386_COMPAT
+/* Set non-zero for broken, compatible instructions. Set to zero for
+ non-broken opcodes at your peril. gcc generates SystemV/386
+ compatible instructions. */
+#define SYSV386_COMPAT 1
+#endif
+#ifndef OLDGCC_COMPAT
+/* Set non-zero to cater for old (<= 2.8.1) versions of gcc that could
+ generate nonsense fsubp, fsubrp, fdivp and fdivrp with operands
+ reversed. */
+#define OLDGCC_COMPAT SYSV386_COMPAT
+#endif
static const template i386_optab[] = {
-#define _ None
-/* move instructions */
+#define X None
+#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_dSuf|No_xSuf)
+#define b_Suf (No_wSuf|No_lSuf|No_sSuf|No_dSuf|No_xSuf)
+#define w_Suf (No_bSuf|No_lSuf|No_sSuf|No_dSuf|No_xSuf)
+#define l_Suf (No_bSuf|No_wSuf|No_sSuf|No_dSuf|No_xSuf)
+#define d_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_xSuf)
+#define x_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_dSuf)
+#define bw_Suf (No_lSuf|No_sSuf|No_dSuf|No_xSuf)
+#define bl_Suf (No_wSuf|No_sSuf|No_dSuf|No_xSuf)
+#define wl_Suf (No_bSuf|No_sSuf|No_dSuf|No_xSuf)
+#define sl_Suf (No_bSuf|No_wSuf|No_dSuf|No_xSuf)
+#define sld_Suf (No_bSuf|No_wSuf|No_xSuf)
+#define sldx_Suf (No_bSuf|No_wSuf)
+#define bwl_Suf (No_sSuf|No_dSuf|No_xSuf)
+#define bwld_Suf (No_sSuf|No_xSuf)
+#define FP (NoSuf|IgnoreSize)
+#define l_FP (l_Suf|IgnoreSize)
+#define d_FP (d_Suf|IgnoreSize)
+#define x_FP (x_Suf|IgnoreSize)
+#define sl_FP (sl_Suf|IgnoreSize)
+#define sld_FP (sld_Suf|IgnoreSize)
+#define sldx_FP (sldx_Suf|IgnoreSize)
+#if SYSV386_COMPAT
+/* Someone forgot that the FloatR bit reverses the operation when not
+ equal to the FloatD bit. ie. Changing only FloatD results in the
+ destination being swapped *and* the direction being reversed. */
+#define FloatDR FloatD
+#else
+#define FloatDR (FloatD|FloatR)
+#endif
+
+/* Move instructions. */
#define MOV_AX_DISP32 0xa0
-{ "mov", 2, 0xa0, _, DW|NoModrm, { Disp32, Acc, 0 } },
-{ "mov", 2, 0x88, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
-{ "mov", 2, 0xb0, _, ShortFormW, { Imm, Reg, 0 } },
-{ "mov", 2, 0xc6, _, W|Modrm, { Imm, Reg|Mem, 0 } },
-/* The next instruction accepts WordReg so that `movl %gs,%esi' can be
- used to move a segment register to a 32 bit register without using
- a size prefix. This will set the upper 16 bits of the 32 bit
- register to an implementation defined value (on the Pentium Pro,
+{ "mov", 2, 0xa0, X, bwl_Suf|D|W, { Disp16|Disp32, Acc, 0 } },
+{ "mov", 2, 0x88, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0 } },
+{ "mov", 2, 0xb0, X, bwl_Suf|W|ShortForm, { Imm, Reg, 0 } },
+{ "mov", 2, 0xc6, X, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0 } },
+/* The next two instructions accept WordReg so that a segment register
+ can be copied to a 32 bit register, and vice versa, without using a
+ size prefix. When moving to a 32 bit register, the upper 16 bits
+ are set to an implementation defined value (on the Pentium Pro,
the implementation defined value is zero). */
-{ "mov", 2, 0x8c, _, D|Modrm, { SReg3|SReg2, WordReg|WordMem, 0 } },
-/* move to/from control debug registers */
-{ "mov", 2, 0x0f20, _, D|Modrm, { Control, Reg32, 0} },
-{ "mov", 2, 0x0f21, _, D|Modrm, { Debug, Reg32, 0} },
-{ "mov", 2, 0x0f24, _, D|Modrm, { Test, Reg32, 0} },
-
-/* move with sign extend */
+{ "mov", 2, 0x8c, X, wl_Suf|Modrm, { SReg3|SReg2, WordReg|WordMem, 0 } },
+{ "mov", 2, 0x8e, X, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg3|SReg2, 0 } },
+/* Move to/from control debug registers. */
+{ "mov", 2, 0x0f20, X, l_Suf|D|Modrm|IgnoreSize, { Control, Reg32|InvMem, 0} },
+{ "mov", 2, 0x0f21, X, l_Suf|D|Modrm|IgnoreSize, { Debug, Reg32|InvMem, 0} },
+{ "mov", 2, 0x0f24, X, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|InvMem, 0} },
+
+/* Move with sign extend. */
/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
- conflict with the "movs" string move instruction. Thus,
- {"movsb", 2, 0x0fbe, _, ReverseRegRegmem|Modrm, { Reg8|Mem, Reg16|Reg32, 0} },
- is not kosher; we must seperate the two instructions. */
-{"movsbl", 2, 0x0fbe, _, ReverseRegRegmem|Modrm|Data32, { Reg8|Mem, Reg32, 0} },
-{"movsbw", 2, 0x0fbe, _, ReverseRegRegmem|Modrm|Data16, { Reg8|Mem, Reg16, 0} },
-{"movswl", 2, 0x0fbf, _, ReverseRegRegmem|Modrm, { Reg16|Mem, Reg32, 0} },
-
-/* move with zero extend */
-{"movzb", 2, 0x0fb6, _, ReverseRegRegmem|Modrm, { Reg8|Mem, Reg16|Reg32, 0} },
-{"movzwl", 2, 0x0fb7, _, ReverseRegRegmem|Modrm, { Reg16|Mem, Reg32, 0} },
-
-/* push instructions */
-{"push", 1, 0x50, _, ShortForm, { WordReg,0,0 } },
-{"push", 1, 0xff, 0x6, Modrm, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, _, NoModrm, { Imm8S, 0, 0} },
-{"push", 1, 0x68, _, NoModrm, { Imm16|Imm32, 0, 0} },
-{"push", 1, 0x06, _, Seg2ShortForm, { SReg2,0,0 } },
-{"push", 1, 0x0fa0, _, Seg3ShortForm, { SReg3,0,0 } },
-/* push all */
-{"pusha", 0, 0x60, _, NoModrm, { 0, 0, 0 } },
-
-/* pop instructions */
-{"pop", 1, 0x58, _, ShortForm, { WordReg,0,0 } },
-{"pop", 1, 0x8f, 0x0, Modrm, { WordReg|WordMem, 0, 0 } },
-#define POP_SEG_SHORT 0x7
-{"pop", 1, 0x07, _, Seg2ShortForm, { SReg2,0,0 } },
-{"pop", 1, 0x0fa1, _, Seg3ShortForm, { SReg3,0,0 } },
-/* pop all */
-{"popa", 0, 0x61, _, NoModrm, { 0, 0, 0 } },
-
-/* xchg exchange instructions
- xchg commutes: we allow both operand orders */
-{"xchg", 2, 0x90, _, ShortForm, { WordReg, Acc, 0 } },
-{"xchg", 2, 0x90, _, ShortForm, { Acc, WordReg, 0 } },
-{"xchg", 2, 0x86, _, W|Modrm, { Reg, Reg|Mem, 0 } },
-{"xchg", 2, 0x86, _, W|Modrm, { Reg|Mem, Reg, 0 } },
-
-/* in/out from ports */
-{"in", 2, 0xe4, _, W|NoModrm, { Imm8, Acc, 0 } },
-{"in", 2, 0xec, _, W|NoModrm, { InOutPortReg, Acc, 0 } },
-{"in", 1, 0xe4, _, W|NoModrm, { Imm8, 0, 0 } },
-{"in", 1, 0xec, _, W|NoModrm, { InOutPortReg, 0, 0 } },
-{"out", 2, 0xe6, _, W|NoModrm, { Acc, Imm8, 0 } },
-{"out", 2, 0xee, _, W|NoModrm, { Acc, InOutPortReg, 0 } },
-{"out", 1, 0xe6, _, W|NoModrm, { Imm8, 0, 0 } },
-{"out", 1, 0xee, _, W|NoModrm, { InOutPortReg, 0, 0 } },
-
-/* load effective address */
-{"lea", 2, 0x8d, _, Modrm, { WordMem, WordReg, 0 } },
-
-/* load segment registers from memory */
-{"lds", 2, 0xc5, _, Modrm, { Mem, Reg32, 0} },
-{"les", 2, 0xc4, _, Modrm, { Mem, Reg32, 0} },
-{"lfs", 2, 0x0fb4, _, Modrm, { Mem, Reg32, 0} },
-{"lgs", 2, 0x0fb5, _, Modrm, { Mem, Reg32, 0} },
-{"lss", 2, 0x0fb2, _, Modrm, { Mem, Reg32, 0} },
-
-/* flags register instructions */
-{"clc", 0, 0xf8, _, NoModrm, { 0, 0, 0} },
-{"cld", 0, 0xfc, _, NoModrm, { 0, 0, 0} },
-{"cli", 0, 0xfa, _, NoModrm, { 0, 0, 0} },
-{"clts", 0, 0x0f06, _, NoModrm, { 0, 0, 0} },
-{"cmc", 0, 0xf5, _, NoModrm, { 0, 0, 0} },
-{"lahf", 0, 0x9f, _, NoModrm, { 0, 0, 0} },
-{"sahf", 0, 0x9e, _, NoModrm, { 0, 0, 0} },
-{"pushfl", 0, 0x9c, _, NoModrm|Data32, { 0, 0, 0} },
-{"popfl", 0, 0x9d, _, NoModrm|Data32, { 0, 0, 0} },
-{"pushfw", 0, 0x9c, _, NoModrm|Data16, { 0, 0, 0} },
-{"popfw", 0, 0x9d, _, NoModrm|Data16, { 0, 0, 0} },
-{"pushf", 0, 0x9c, _, NoModrm, { 0, 0, 0} },
-{"popf", 0, 0x9d, _, NoModrm, { 0, 0, 0} },
-{"stc", 0, 0xf9, _, NoModrm, { 0, 0, 0} },
-{"std", 0, 0xfd, _, NoModrm, { 0, 0, 0} },
-{"sti", 0, 0xfb, _, NoModrm, { 0, 0, 0} },
-
-{"add", 2, 0x0, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"add", 2, 0x83, 0, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"add", 2, 0x4, _, W|NoModrm, { Imm, Acc, 0} },
-{"add", 2, 0x80, 0, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"inc", 1, 0x40, _, ShortForm, { WordReg, 0, 0} },
-{"inc", 1, 0xfe, 0, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"sub", 2, 0x28, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"sub", 2, 0x83, 5, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sub", 2, 0x2c, _, W|NoModrm, { Imm, Acc, 0} },
-{"sub", 2, 0x80, 5, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"dec", 1, 0x48, _, ShortForm, { WordReg, 0, 0} },
-{"dec", 1, 0xfe, 1, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"sbb", 2, 0x18, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"sbb", 2, 0x83, 3, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sbb", 2, 0x1c, _, W|NoModrm, { Imm, Acc, 0} },
-{"sbb", 2, 0x80, 3, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"cmp", 2, 0x38, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"cmp", 2, 0x83, 7, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"cmp", 2, 0x3c, _, W|NoModrm, { Imm, Acc, 0} },
-{"cmp", 2, 0x80, 7, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"test", 2, 0x84, _, W|Modrm, { Reg|Mem, Reg, 0} },
-{"test", 2, 0x84, _, W|Modrm, { Reg, Reg|Mem, 0} },
-{"test", 2, 0xa8, _, W|NoModrm, { Imm, Acc, 0} },
-{"test", 2, 0xf6, 0, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"and", 2, 0x20, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"and", 2, 0x83, 4, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"and", 2, 0x24, _, W|NoModrm, { Imm, Acc, 0} },
-{"and", 2, 0x80, 4, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"or", 2, 0x08, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"or", 2, 0x83, 1, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"or", 2, 0x0c, _, W|NoModrm, { Imm, Acc, 0} },
-{"or", 2, 0x80, 1, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"xor", 2, 0x30, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"xor", 2, 0x83, 6, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"xor", 2, 0x34, _, W|NoModrm, { Imm, Acc, 0} },
-{"xor", 2, 0x80, 6, W|Modrm, { Imm, Reg|Mem, 0} },
+ conflict with the "movs" string move instruction. */
+{"movsbl", 2, 0x0fbe, X, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
+{"movsbw", 2, 0x0fbe, X, NoSuf|Modrm, { Reg8|ByteMem, Reg16, 0} },
+{"movswl", 2, 0x0fbf, X, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
+/* Intel Syntax */
+{"movsx", 2, 0x0fbf, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
+{"movsx", 2, 0x0fbe, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+
+/* Move with zero extend. */
+{"movzb", 2, 0x0fb6, X, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+{"movzwl", 2, 0x0fb7, X, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
+/* Intel Syntax */
+{"movzx", 2, 0x0fb7, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
+{"movzx", 2, 0x0fb6, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
+
+/* Push instructions. */
+{"push", 1, 0x50, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
+{"push", 1, 0xff, 6, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
+{"push", 1, 0x6a, X, wl_Suf|DefaultSize, { Imm8S, 0, 0} },
+{"push", 1, 0x68, X, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
+{"push", 1, 0x06, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
+{"push", 1, 0x0fa0, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
+{"pusha", 0, 0x60, X, wl_Suf|DefaultSize, { 0, 0, 0 } },
+
+/* Pop instructions. */
+{"pop", 1, 0x58, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
+{"pop", 1, 0x8f, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
+#define POP_SEG_SHORT 0x07
+{"pop", 1, 0x07, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
+{"pop", 1, 0x0fa1, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
+{"popa", 0, 0x61, X, wl_Suf|DefaultSize, { 0, 0, 0 } },
+
+/* Exchange instructions.
+ xchg commutes: we allow both operand orders. */
+{"xchg", 2, 0x90, X, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
+{"xchg", 2, 0x90, X, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
+{"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
+{"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
+
+/* In/out from ports. */
+{"in", 2, 0xe4, X, bwl_Suf|W, { Imm8, Acc, 0 } },
+{"in", 2, 0xec, X, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
+{"in", 1, 0xe4, X, bwl_Suf|W, { Imm8, 0, 0 } },
+{"in", 1, 0xec, X, bwl_Suf|W, { InOutPortReg, 0, 0 } },
+{"out", 2, 0xe6, X, bwl_Suf|W, { Acc, Imm8, 0 } },
+{"out", 2, 0xee, X, bwl_Suf|W, { Acc, InOutPortReg, 0 } },
+{"out", 1, 0xe6, X, bwl_Suf|W, { Imm8, 0, 0 } },
+{"out", 1, 0xee, X, bwl_Suf|W, { InOutPortReg, 0, 0 } },
+
+/* Load effective address. */
+{"lea", 2, 0x8d, X, wl_Suf|Modrm, { WordMem, WordReg, 0 } },
+
+/* Load segment registers from memory. */
+{"lds", 2, 0xc5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"les", 2, 0xc4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lfs", 2, 0x0fb4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lgs", 2, 0x0fb5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+{"lss", 2, 0x0fb2, X, wl_Suf|Modrm, { WordMem, WordReg, 0} },
+
+/* Flags register instructions. */
+{"clc", 0, 0xf8, X, NoSuf, { 0, 0, 0} },
+{"cld", 0, 0xfc, X, NoSuf, { 0, 0, 0} },
+{"cli", 0, 0xfa, X, NoSuf, { 0, 0, 0} },
+{"clts", 0, 0x0f06, X, NoSuf, { 0, 0, 0} },
+{"cmc", 0, 0xf5, X, NoSuf, { 0, 0, 0} },
+{"lahf", 0, 0x9f, X, NoSuf, { 0, 0, 0} },
+{"sahf", 0, 0x9e, X, NoSuf, { 0, 0, 0} },
+{"pushf", 0, 0x9c, X, wl_Suf|DefaultSize, { 0, 0, 0} },
+{"popf", 0, 0x9d, X, wl_Suf|DefaultSize, { 0, 0, 0} },
+{"stc", 0, 0xf9, X, NoSuf, { 0, 0, 0} },
+{"std", 0, 0xfd, X, NoSuf, { 0, 0, 0} },
+{"sti", 0, 0xfb, X, NoSuf, { 0, 0, 0} },
+
+/* Arithmetic. */
+{"add", 2, 0x00, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"add", 2, 0x83, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"add", 2, 0x04, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"add", 2, 0x80, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"inc", 1, 0x40, X, wl_Suf|ShortForm, { WordReg, 0, 0} },
+{"inc", 1, 0xfe, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sub", 2, 0x28, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"sub", 2, 0x83, 5, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"sub", 2, 0x2c, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"sub", 2, 0x80, 5, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"dec", 1, 0x48, X, wl_Suf|ShortForm, { WordReg, 0, 0} },
+{"dec", 1, 0xfe, 1, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sbb", 2, 0x18, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"sbb", 2, 0x83, 3, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"sbb", 2, 0x1c, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"sbb", 2, 0x80, 3, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"cmp", 2, 0x38, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"cmp", 2, 0x83, 7, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"cmp", 2, 0x3c, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"cmp", 2, 0x80, 7, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"test", 2, 0x84, X, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0} },
+{"test", 2, 0x84, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"test", 2, 0xa8, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"test", 2, 0xf6, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"and", 2, 0x20, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"and", 2, 0x83, 4, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"and", 2, 0x24, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"and", 2, 0x80, 4, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"or", 2, 0x08, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"or", 2, 0x83, 1, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"or", 2, 0x0c, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"or", 2, 0x80, 1, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"xor", 2, 0x30, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"xor", 2, 0x83, 6, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"xor", 2, 0x34, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"xor", 2, 0x80, 6, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
/* iclr with 1 operand is really xor with 2 operands. */
-{"clr", 1, 0x30, _, W|Modrm|iclrKludge, { Reg } },
-
-{"adc", 2, 0x10, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"adc", 2, 0x83, 2, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"adc", 2, 0x14, _, W|NoModrm, { Imm, Acc, 0} },
-{"adc", 2, 0x80, 2, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"neg", 1, 0xf6, 3, W|Modrm, { Reg|Mem, 0, 0} },
-{"not", 1, 0xf6, 2, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"aaa", 0, 0x37, _, NoModrm, { 0, 0, 0} },
-{"aas", 0, 0x3f, _, NoModrm, { 0, 0, 0} },
-{"daa", 0, 0x27, _, NoModrm, { 0, 0, 0} },
-{"das", 0, 0x2f, _, NoModrm, { 0, 0, 0} },
-{"aad", 0, 0xd50a, _, NoModrm, { 0, 0, 0} },
-{"aam", 0, 0xd40a, _, NoModrm, { 0, 0, 0} },
-
-/* conversion insns */
-/* conversion: intel naming */
-{"cbw", 0, 0x98, _, NoModrm|Data16, { 0, 0, 0} },
-{"cwd", 0, 0x99, _, NoModrm|Data16, { 0, 0, 0} },
-{"cwde", 0, 0x98, _, NoModrm|Data32, { 0, 0, 0} },
-{"cdq", 0, 0x99, _, NoModrm|Data32, { 0, 0, 0} },
-/* att naming */
-{"cbtw", 0, 0x98, _, NoModrm|Data16, { 0, 0, 0} },
-{"cwtl", 0, 0x98, _, NoModrm|Data32, { 0, 0, 0} },
-{"cwtd", 0, 0x99, _, NoModrm|Data16, { 0, 0, 0} },
-{"cltd", 0, 0x99, _, NoModrm|Data32, { 0, 0, 0} },
+{"clr", 1, 0x30, X, bwl_Suf|W|Modrm|regKludge, { Reg, 0, 0 } },
+
+{"adc", 2, 0x10, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
+{"adc", 2, 0x83, 2, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
+{"adc", 2, 0x14, X, bwl_Suf|W, { Imm, Acc, 0} },
+{"adc", 2, 0x80, 2, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
+
+{"neg", 1, 0xf6, 3, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"not", 1, 0xf6, 2, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"aaa", 0, 0x37, X, NoSuf, { 0, 0, 0} },
+{"aas", 0, 0x3f, X, NoSuf, { 0, 0, 0} },
+{"daa", 0, 0x27, X, NoSuf, { 0, 0, 0} },
+{"das", 0, 0x2f, X, NoSuf, { 0, 0, 0} },
+{"aad", 0, 0xd50a, X, NoSuf, { 0, 0, 0} },
+{"aad", 1, 0xd5, X, NoSuf, { Imm8S, 0, 0} },
+{"aam", 0, 0xd40a, X, NoSuf, { 0, 0, 0} },
+{"aam", 1, 0xd4, X, NoSuf, { Imm8S, 0, 0} },
+
+/* Conversion insns. */
+/* Intel naming */
+{"cbw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} },
+{"cwde", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} },
+{"cwd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} },
+{"cdq", 0, 0x99, X, NoSuf|Size32, { 0, 0, 0} },
+/* AT&T naming */
+{"cbtw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} },
+{"cwtl", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} },
+{"cwtd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} },
+{"cltd", 0, 0x99, X, NoSuf|Size32, { 0, 0, 0} },
/* Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
expanding 64-bit multiplies, and *cannot* be selected to accomplish
'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
- These multiplies can only be selected with single operand forms. */
-{"mul", 1, 0xf6, 4, W|Modrm, { Reg|Mem, 0, 0} },
-{"imul", 1, 0xf6, 5, W|Modrm, { Reg|Mem, 0, 0} },
-
-
-
-
-/* imulKludge here is needed to reverse the i.rm.reg & i.rm.regmem fields.
- These instructions are exceptions: 'imul $2, %eax, %ecx' would put
- '%eax' in the reg field and '%ecx' in the regmem field if we did not
- switch them. */
-{"imul", 2, 0x0faf, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
-{"imul", 3, 0x6b, _, Modrm|ReverseRegRegmem, { Imm8S, WordReg|Mem, WordReg} },
-{"imul", 3, 0x69, _, Modrm|ReverseRegRegmem, { Imm16|Imm32, WordReg|Mem, WordReg} },
-/*
- imul with 2 operands mimicks imul with 3 by puting register both
- in i.rm.reg & i.rm.regmem fields
-*/
-{"imul", 2, 0x6b, _, Modrm|imulKludge, { Imm8S, WordReg, 0} },
-{"imul", 2, 0x69, _, Modrm|imulKludge, { Imm16|Imm32, WordReg, 0} },
-{"div", 1, 0xf6, 6, W|Modrm, { Reg|Mem, 0, 0} },
-{"div", 2, 0xf6, 6, W|Modrm, { Reg|Mem, Acc, 0} },
-{"idiv", 1, 0xf6, 7, W|Modrm, { Reg|Mem, 0, 0} },
-{"idiv", 2, 0xf6, 7, W|Modrm, { Reg|Mem, Acc, 0} },
-
-{"rol", 2, 0xd0, 0, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"rol", 2, 0xc0, 0, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"rol", 2, 0xd2, 0, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"rol", 1, 0xd0, 0, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"ror", 2, 0xd0, 1, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"ror", 2, 0xc0, 1, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"ror", 2, 0xd2, 1, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"ror", 1, 0xd0, 1, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"rcl", 2, 0xd0, 2, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"rcl", 2, 0xc0, 2, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"rcl", 2, 0xd2, 2, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"rcl", 1, 0xd0, 2, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"rcr", 2, 0xd0, 3, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"rcr", 2, 0xc0, 3, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"rcr", 2, 0xd2, 3, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"rcr", 1, 0xd0, 3, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"sal", 2, 0xd0, 4, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"sal", 2, 0xc0, 4, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"sal", 2, 0xd2, 4, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"sal", 1, 0xd0, 4, W|Modrm, { Reg|Mem, 0, 0} },
-{"shl", 2, 0xd0, 4, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"shl", 2, 0xc0, 4, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"shl", 2, 0xd2, 4, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"shl", 1, 0xd0, 4, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"shld", 3, 0x0fa4, _, Modrm, { Imm8, WordReg, WordReg|Mem} },
-{"shld", 3, 0x0fa5, _, Modrm, { ShiftCount, WordReg, WordReg|Mem} },
-{"shld", 2, 0x0fa5, _, Modrm, { WordReg, WordReg|Mem, 0} },
-
-{"shr", 2, 0xd0, 5, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"shr", 2, 0xc0, 5, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"shr", 2, 0xd2, 5, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"shr", 1, 0xd0, 5, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"shrd", 3, 0x0fac, _, Modrm, { Imm8, WordReg, WordReg|Mem} },
-{"shrd", 3, 0x0fad, _, Modrm, { ShiftCount, WordReg, WordReg|Mem} },
-{"shrd", 2, 0x0fad, _, Modrm, { WordReg, WordReg|Mem, 0} },
-
-{"sar", 2, 0xd0, 7, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"sar", 2, 0xc0, 7, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"sar", 2, 0xd2, 7, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"sar", 1, 0xd0, 7, W|Modrm, { Reg|Mem, 0, 0} },
-
-/* control transfer instructions */
-#define CALL_PC_RELATIVE 0xe8
-{"call", 1, 0xe8, _, JumpDword, { Disp32, 0, 0} },
-{"call", 1, 0xff, 2, Modrm|Data32, { Reg|Mem|JumpAbsolute, 0, 0} },
-{"callw", 1, 0xff, 2, Modrm|Data16, { Reg|Mem|JumpAbsolute, 0, 0} },
-#define CALL_FAR_IMMEDIATE 0x9a
-{"lcall", 2, 0x9a, _, JumpInterSegment, { Imm16, Imm32, 0} },
-{"lcall", 1, 0xff, 3, Modrm|Data32, { Mem, 0, 0} },
-{"lcallw", 1, 0xff, 3, Modrm|Data16, { Mem, 0, 0} },
+ These multiplies can only be selected with single operand forms. */
+{"mul", 1, 0xf6, 4, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"imul", 1, 0xf6, 5, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"imul", 2, 0x0faf, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"imul", 3, 0x6b, X, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, WordReg} },
+{"imul", 3, 0x69, X, wl_Suf|Modrm, { Imm16|Imm32, WordReg|WordMem, WordReg} },
+/* imul with 2 operands mimics imul with 3 by putting the register in
+ both i.rm.reg & i.rm.regmem fields. regKludge enables this
+ transformation. */
+{"imul", 2, 0x6b, X, wl_Suf|Modrm|regKludge,{ Imm8S, WordReg, 0} },
+{"imul", 2, 0x69, X, wl_Suf|Modrm|regKludge,{ Imm16|Imm32, WordReg, 0} },
+
+{"div", 1, 0xf6, 6, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"div", 2, 0xf6, 6, bwl_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
+{"idiv", 1, 0xf6, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"idiv", 2, 0xf6, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
+
+{"rol", 2, 0xd0, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"rol", 2, 0xc0, 0, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"rol", 2, 0xd2, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"rol", 1, 0xd0, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"ror", 2, 0xd0, 1, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"ror", 2, 0xc0, 1, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"ror", 2, 0xd2, 1, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"ror", 1, 0xd0, 1, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"rcl", 2, 0xd0, 2, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"rcl", 2, 0xc0, 2, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"rcl", 2, 0xd2, 2, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"rcl", 1, 0xd0, 2, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"rcr", 2, 0xd0, 3, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"rcr", 2, 0xc0, 3, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"rcr", 2, 0xd2, 3, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"rcr", 1, 0xd0, 3, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"sal", 2, 0xd0, 4, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"sal", 2, 0xc0, 4, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"sal", 2, 0xd2, 4, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"sal", 1, 0xd0, 4, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+{"shl", 2, 0xd0, 4, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"shl", 2, 0xc0, 4, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"shl", 2, 0xd2, 4, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"shl", 1, 0xd0, 4, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"shld", 3, 0x0fa4, X, wl_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
+{"shld", 3, 0x0fa5, X, wl_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
+{"shld", 2, 0x0fa5, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+
+{"shr", 2, 0xd0, 5, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"shr", 2, 0xc0, 5, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"shr", 2, 0xd2, 5, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"shr", 1, 0xd0, 5, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+{"shrd", 3, 0x0fac, X, wl_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
+{"shrd", 3, 0x0fad, X, wl_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
+{"shrd", 2, 0x0fad, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+
+{"sar", 2, 0xd0, 7, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
+{"sar", 2, 0xc0, 7, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
+{"sar", 2, 0xd2, 7, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
+{"sar", 1, 0xd0, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
+
+/* Control transfer instructions. */
+{"call", 1, 0xe8, X, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
+{"call", 1, 0xff, 2, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
+/* Intel Syntax */
+{"call", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
+/* Intel Syntax */
+{"call", 1, 0xff, 3, x_Suf|Modrm|DefaultSize, { WordMem, 0, 0} },
+{"lcall", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
+{"lcall", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} },
#define JUMP_PC_RELATIVE 0xeb
-{"jmp", 1, 0xeb, _, Jump, { Disp, 0, 0} },
-{"jmp", 1, 0xff, 4, Modrm, { Reg32|Mem|JumpAbsolute, 0, 0} },
-#define JUMP_FAR_IMMEDIATE 0xea
-{"ljmp", 2, 0xea, _, JumpInterSegment, { Imm16, Imm32, 0} },
-{"ljmp", 1, 0xff, 5, Modrm|Data32, { Mem, 0, 0} },
-
-{"ret", 0, 0xc3, _, NoModrm|Data32, { 0, 0, 0} },
-{"ret", 1, 0xc2, _, NoModrm|Data32, { Imm16, 0, 0} },
-{"retw", 0, 0xc3, _, NoModrm|Data16, { 0, 0, 0} },
-{"retw", 1, 0xc2, _, NoModrm|Data16, { Imm16, 0, 0} },
-{"lret", 0, 0xcb, _, NoModrm|Data32, { 0, 0, 0} },
-{"lret", 1, 0xca, _, NoModrm|Data32, { Imm16, 0, 0} },
-{"lretw", 0, 0xcb, _, NoModrm|Data16, { 0, 0, 0} },
-{"lretw", 1, 0xca, _, NoModrm|Data16, { Imm16, 0, 0} },
-{"enter", 2, 0xc8, _, NoModrm|Data32, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, _, NoModrm|Data32, { 0, 0, 0} },
-{"enterw", 2, 0xc8, _, NoModrm|Data16, { Imm16, Imm8, 0} },
-{"leavew", 0, 0xc9, _, NoModrm|Data16, { 0, 0, 0} },
-
-/* conditional jumps */
-{"jo", 1, 0x70, _, Jump, { Disp, 0, 0} },
-
-{"jno", 1, 0x71, _, Jump, { Disp, 0, 0} },
-
-{"jb", 1, 0x72, _, Jump, { Disp, 0, 0} },
-{"jc", 1, 0x72, _, Jump, { Disp, 0, 0} },
-{"jnae", 1, 0x72, _, Jump, { Disp, 0, 0} },
-
-{"jnb", 1, 0x73, _, Jump, { Disp, 0, 0} },
-{"jnc", 1, 0x73, _, Jump, { Disp, 0, 0} },
-{"jae", 1, 0x73, _, Jump, { Disp, 0, 0} },
-
-{"je", 1, 0x74, _, Jump, { Disp, 0, 0} },
-{"jz", 1, 0x74, _, Jump, { Disp, 0, 0} },
-
-{"jne", 1, 0x75, _, Jump, { Disp, 0, 0} },
-{"jnz", 1, 0x75, _, Jump, { Disp, 0, 0} },
-
-{"jbe", 1, 0x76, _, Jump, { Disp, 0, 0} },
-{"jna", 1, 0x76, _, Jump, { Disp, 0, 0} },
-
-{"jnbe", 1, 0x77, _, Jump, { Disp, 0, 0} },
-{"ja", 1, 0x77, _, Jump, { Disp, 0, 0} },
-
-{"js", 1, 0x78, _, Jump, { Disp, 0, 0} },
-
-{"jns", 1, 0x79, _, Jump, { Disp, 0, 0} },
-
-{"jp", 1, 0x7a, _, Jump, { Disp, 0, 0} },
-{"jpe", 1, 0x7a, _, Jump, { Disp, 0, 0} },
-
-{"jnp", 1, 0x7b, _, Jump, { Disp, 0, 0} },
-{"jpo", 1, 0x7b, _, Jump, { Disp, 0, 0} },
-
-{"jl", 1, 0x7c, _, Jump, { Disp, 0, 0} },
-{"jnge", 1, 0x7c, _, Jump, { Disp, 0, 0} },
-
-{"jnl", 1, 0x7d, _, Jump, { Disp, 0, 0} },
-{"jge", 1, 0x7d, _, Jump, { Disp, 0, 0} },
-
-{"jle", 1, 0x7e, _, Jump, { Disp, 0, 0} },
-{"jng", 1, 0x7e, _, Jump, { Disp, 0, 0} },
-
-{"jnle", 1, 0x7f, _, Jump, { Disp, 0, 0} },
-{"jg", 1, 0x7f, _, Jump, { Disp, 0, 0} },
-
-#define IS_JUMP_ON_CX_ZERO(o) \
- (o == 0xe3)
+{"jmp", 1, 0xeb, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jmp", 1, 0xff, 4, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
+/* Intel Syntax */
+{"jmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
+/* Intel Syntax */
+{"jmp", 1, 0xff, 5, x_Suf|Modrm, { WordMem, 0, 0} },
+{"ljmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
+{"ljmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
+
+{"ret", 0, 0xc3, X, wl_Suf|DefaultSize, { 0, 0, 0} },
+{"ret", 1, 0xc2, X, wl_Suf|DefaultSize, { Imm16, 0, 0} },
+{"lret", 0, 0xcb, X, wl_Suf|DefaultSize, { 0, 0, 0} },
+{"lret", 1, 0xca, X, wl_Suf|DefaultSize, { Imm16, 0, 0} },
+{"enter", 2, 0xc8, X, wl_Suf|DefaultSize, { Imm16, Imm8, 0} },
+{"leave", 0, 0xc9, X, wl_Suf|DefaultSize, { 0, 0, 0} },
+
+/* Conditional jumps. */
+{"jo", 1, 0x70, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jno", 1, 0x71, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jb", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jc", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnae", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnb", 1, 0x73, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnc", 1, 0x73, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jae", 1, 0x73, X, NoSuf|Jump, { Disp, 0, 0} },
+{"je", 1, 0x74, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jz", 1, 0x74, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jne", 1, 0x75, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnz", 1, 0x75, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jbe", 1, 0x76, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jna", 1, 0x76, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnbe", 1, 0x77, X, NoSuf|Jump, { Disp, 0, 0} },
+{"ja", 1, 0x77, X, NoSuf|Jump, { Disp, 0, 0} },
+{"js", 1, 0x78, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jns", 1, 0x79, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jp", 1, 0x7a, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jpe", 1, 0x7a, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnp", 1, 0x7b, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jpo", 1, 0x7b, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jl", 1, 0x7c, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnge", 1, 0x7c, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnl", 1, 0x7d, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jge", 1, 0x7d, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jle", 1, 0x7e, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jng", 1, 0x7e, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jnle", 1, 0x7f, X, NoSuf|Jump, { Disp, 0, 0} },
+{"jg", 1, 0x7f, X, NoSuf|Jump, { Disp, 0, 0} },
/* jcxz vs. jecxz is chosen on the basis of the address size prefix. */
-{"jcxz", 1, 0xe3, _, JumpByte|Data16, { Disp, 0, 0} },
-{"jecxz", 1, 0xe3, _, JumpByte|Data32, { Disp, 0, 0} },
-
-#define IS_LOOP_ECX_TIMES(o) \
- (o == 0xe2 || o == 0xe1 || o == 0xe0)
-
-{"loop", 1, 0xe2, _, JumpByte, { Disp, 0, 0} },
-
-{"loopz", 1, 0xe1, _, JumpByte, { Disp, 0, 0} },
-{"loope", 1, 0xe1, _, JumpByte, { Disp, 0, 0} },
-
-{"loopnz", 1, 0xe0, _, JumpByte, { Disp, 0, 0} },
-{"loopne", 1, 0xe0, _, JumpByte, { Disp, 0, 0} },
-
-/* set byte on flag instructions */
-{"seto", 1, 0x0f90, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setno", 1, 0x0f91, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setb", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setc", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnae", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnb", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnc", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setae", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"sete", 1, 0x0f94, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setz", 1, 0x0f94, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setne", 1, 0x0f95, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnz", 1, 0x0f95, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setbe", 1, 0x0f96, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setna", 1, 0x0f96, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnbe", 1, 0x0f97, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"seta", 1, 0x0f97, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"sets", 1, 0x0f98, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setns", 1, 0x0f99, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setp", 1, 0x0f9a, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setpe", 1, 0x0f9a, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnp", 1, 0x0f9b, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setpo", 1, 0x0f9b, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setl", 1, 0x0f9c, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnge", 1, 0x0f9c, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnl", 1, 0x0f9d, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setge", 1, 0x0f9d, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setle", 1, 0x0f9e, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setng", 1, 0x0f9e, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnle", 1, 0x0f9f, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setg", 1, 0x0f9f, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-#define IS_STRING_INSTRUCTION(o) \
- ((o) == 0xa6 || (o) == 0x6c || (o) == 0x6e || (o) == 0x6e || \
- (o) == 0xac || (o) == 0xa4 || (o) == 0xae || (o) == 0xaa || \
- (o) == 0xd7)
-
-/* string manipulation */
-{"cmps", 0, 0xa6, _, W|NoModrm, { 0, 0, 0} },
-{"scmp", 0, 0xa6, _, W|NoModrm, { 0, 0, 0} },
-{"ins", 0, 0x6c, _, W|NoModrm, { 0, 0, 0} },
-{"outs", 0, 0x6e, _, W|NoModrm, { 0, 0, 0} },
-{"lods", 0, 0xac, _, W|NoModrm, { 0, 0, 0} },
-{"slod", 0, 0xac, _, W|NoModrm, { 0, 0, 0} },
-{"movs", 0, 0xa4, _, W|NoModrm, { 0, 0, 0} },
-{"smov", 0, 0xa4, _, W|NoModrm, { 0, 0, 0} },
-{"scas", 0, 0xae, _, W|NoModrm, { 0, 0, 0} },
-{"ssca", 0, 0xae, _, W|NoModrm, { 0, 0, 0} },
-{"stos", 0, 0xaa, _, W|NoModrm, { 0, 0, 0} },
-{"ssto", 0, 0xaa, _, W|NoModrm, { 0, 0, 0} },
-{"xlat", 0, 0xd7, _, NoModrm, { 0, 0, 0} },
-
-/* bit manipulation */
-{"bsf", 2, 0x0fbc, _, Modrm|ReverseRegRegmem, { Reg|Mem, Reg, 0} },
-{"bsr", 2, 0x0fbd, _, Modrm|ReverseRegRegmem, { Reg|Mem, Reg, 0} },
-{"bt", 2, 0x0fa3, _, Modrm, { Reg, Reg|Mem, 0} },
-{"bt", 2, 0x0fba, 4, Modrm, { Imm8, Reg|Mem, 0} },
-{"btc", 2, 0x0fbb, _, Modrm, { Reg, Reg|Mem, 0} },
-{"btc", 2, 0x0fba, 7, Modrm, { Imm8, Reg|Mem, 0} },
-{"btr", 2, 0x0fb3, _, Modrm, { Reg, Reg|Mem, 0} },
-{"btr", 2, 0x0fba, 6, Modrm, { Imm8, Reg|Mem, 0} },
-{"bts", 2, 0x0fab, _, Modrm, { Reg, Reg|Mem, 0} },
-{"bts", 2, 0x0fba, 5, Modrm, { Imm8, Reg|Mem, 0} },
-
-/* interrupts & op. sys insns */
+{"jcxz", 1, 0xe3, X, NoSuf|JumpByte|Size16, { Disp, 0, 0} },
+{"jecxz", 1, 0xe3, X, NoSuf|JumpByte|Size32, { Disp, 0, 0} },
+
+/* The loop instructions also use the address size prefix to select
+ %cx rather than %ecx for the loop count, so the `w' form of these
+ instructions emit an address size prefix rather than a data size
+ prefix. */
+{"loop", 1, 0xe2, X, wl_Suf|JumpByte, { Disp, 0, 0} },
+{"loopz", 1, 0xe1, X, wl_Suf|JumpByte, { Disp, 0, 0} },
+{"loope", 1, 0xe1, X, wl_Suf|JumpByte, { Disp, 0, 0} },
+{"loopnz", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} },
+{"loopne", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} },
+
+/* Set byte on flag instructions. */
+{"seto", 1, 0x0f90, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setno", 1, 0x0f91, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setb", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setc", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnae", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnb", 1, 0x0f93, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnc", 1, 0x0f93, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setae", 1, 0x0f93, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"sete", 1, 0x0f94, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setz", 1, 0x0f94, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setne", 1, 0x0f95, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnz", 1, 0x0f95, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setbe", 1, 0x0f96, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setna", 1, 0x0f96, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnbe", 1, 0x0f97, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"seta", 1, 0x0f97, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"sets", 1, 0x0f98, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setns", 1, 0x0f99, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setp", 1, 0x0f9a, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setpe", 1, 0x0f9a, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnp", 1, 0x0f9b, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setpo", 1, 0x0f9b, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setl", 1, 0x0f9c, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnge", 1, 0x0f9c, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnl", 1, 0x0f9d, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setge", 1, 0x0f9d, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setle", 1, 0x0f9e, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setng", 1, 0x0f9e, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setnle", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+{"setg", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
+
+/* String manipulation. */
+{"cmps", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"cmps", 2, 0xa6, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
+{"scmp", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"scmp", 2, 0xa6, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
+{"ins", 0, 0x6c, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"ins", 2, 0x6c, X, bwld_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
+{"outs", 0, 0x6e, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"outs", 2, 0x6e, X, bwld_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
+{"lods", 0, 0xac, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"lods", 1, 0xac, X, bwld_Suf|W|IsString, { AnyMem, 0, 0} },
+{"lods", 2, 0xac, X, bwld_Suf|W|IsString, { AnyMem, Acc, 0} },
+{"slod", 0, 0xac, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"slod", 1, 0xac, X, bwld_Suf|W|IsString, { AnyMem, 0, 0} },
+{"slod", 2, 0xac, X, bwld_Suf|W|IsString, { AnyMem, Acc, 0} },
+{"movs", 0, 0xa4, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"movs", 2, 0xa4, X, bwld_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
+{"smov", 0, 0xa4, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"smov", 2, 0xa4, X, bwld_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
+{"scas", 0, 0xae, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"scas", 1, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"scas", 2, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
+{"ssca", 0, 0xae, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"ssca", 1, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"ssca", 2, 0xae, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
+{"stos", 0, 0xaa, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"stos", 1, 0xaa, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"stos", 2, 0xaa, X, bwld_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
+{"ssto", 0, 0xaa, X, bwld_Suf|W|IsString, { 0, 0, 0} },
+{"ssto", 1, 0xaa, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
+{"ssto", 2, 0xaa, X, bwld_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
+{"xlat", 0, 0xd7, X, b_Suf|IsString, { 0, 0, 0} },
+{"xlat", 1, 0xd7, X, b_Suf|IsString, { AnyMem, 0, 0} },
+
+/* Bit manipulation. */
+{"bsf", 2, 0x0fbc, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"bsr", 2, 0x0fbd, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"bt", 2, 0x0fa3, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"bt", 2, 0x0fba, 4, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"btc", 2, 0x0fbb, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"btc", 2, 0x0fba, 7, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"btr", 2, 0x0fb3, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"btr", 2, 0x0fba, 6, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+{"bts", 2, 0x0fab, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
+{"bts", 2, 0x0fba, 5, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
+
+/* Interrupts & op. sys insns. */
/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
- int 3 insn. */
+ int 3 insn. */
#define INT_OPCODE 0xcd
#define INT3_OPCODE 0xcc
-{"int", 1, 0xcd, _, NoModrm, { Imm8, 0, 0} },
-{"int3", 0, 0xcc, _, NoModrm, { 0, 0, 0} },
-{"into", 0, 0xce, _, NoModrm, { 0, 0, 0} },
-{"iret", 0, 0xcf, _, NoModrm|Data32, { 0, 0, 0} },
-{"iretw", 0, 0xcf, _, NoModrm|Data16, { 0, 0, 0} },
-/* i386sl, i486sl, later 486, and Pentium */
-{"rsm", 0, 0x0faa, _, NoModrm,{ 0, 0, 0} },
-
-{"boundl", 2, 0x62, _, Modrm|Data32, { Reg32, Mem, 0} },
-{"boundw", 2, 0x62, _, Modrm|Data16, { Reg16, Mem, 0} },
-
-{"hlt", 0, 0xf4, _, NoModrm, { 0, 0, 0} },
-{"wait", 0, 0x9b, _, NoModrm, { 0, 0, 0} },
-/* nop is actually 'xchgl %eax, %eax' */
-{"nop", 0, 0x90, _, NoModrm, { 0, 0, 0} },
-
-/* protection control */
-{"arpl", 2, 0x63, _, Modrm, { Reg16, Reg16|Mem, 0} },
-{"lar", 2, 0x0f02, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
-{"lgdt", 1, 0x0f01, 2, Modrm, { Mem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Modrm, { Mem, 0, 0} },
-{"lldt", 1, 0x0f00, 2, Modrm, { WordReg|Mem, 0, 0} },
-{"lmsw", 1, 0x0f01, 6, Modrm, { WordReg|Mem, 0, 0} },
-{"lsl", 2, 0x0f03, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
-{"ltr", 1, 0x0f00, 3, Modrm, { WordReg|Mem, 0, 0} },
-
-{"sgdt", 1, 0x0f01, 0, Modrm, { Mem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Modrm, { Mem, 0, 0} },
-{"sldt", 1, 0x0f00, 0, Modrm, { WordReg|Mem, 0, 0} },
-{"smsw", 1, 0x0f01, 4, Modrm, { WordReg|Mem, 0, 0} },
-{"str", 1, 0x0f00, 1, Modrm, { Reg16|Mem, 0, 0} },
-
-{"verr", 1, 0x0f00, 4, Modrm, { WordReg|Mem, 0, 0} },
-{"verw", 1, 0x0f00, 5, Modrm, { WordReg|Mem, 0, 0} },
-
-/* floating point instructions */
+{"int", 1, 0xcd, X, NoSuf, { Imm8, 0, 0} },
+{"int3", 0, 0xcc, X, NoSuf, { 0, 0, 0} },
+{"into", 0, 0xce, X, NoSuf, { 0, 0, 0} },
+{"iret", 0, 0xcf, X, wl_Suf, { 0, 0, 0} },
+/* i386sl, i486sl, later 486, and Pentium. */
+{"rsm", 0, 0x0faa, X, NoSuf, { 0, 0, 0} },
+
+{"bound", 2, 0x62, X, wl_Suf|Modrm, { WordReg, WordMem, 0} },
+
+{"hlt", 0, 0xf4, X, NoSuf, { 0, 0, 0} },
+/* nop is actually 'xchgl %eax, %eax'. */
+{"nop", 0, 0x90, X, NoSuf, { 0, 0, 0} },
+
+/* Protection control. */
+{"arpl", 2, 0x63, X, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
+{"lar", 2, 0x0f02, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"lgdt", 1, 0x0f01, 2, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"lidt", 1, 0x0f01, 3, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"lldt", 1, 0x0f00, 2, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"lmsw", 1, 0x0f01, 6, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"lsl", 2, 0x0f03, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"ltr", 1, 0x0f00, 3, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+
+{"sgdt", 1, 0x0f01, 0, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"sidt", 1, 0x0f01, 1, wl_Suf|Modrm, { WordMem, 0, 0} },
+{"sldt", 1, 0x0f00, 0, wl_Suf|Modrm, { WordReg|WordMem, 0, 0} },
+{"smsw", 1, 0x0f01, 4, wl_Suf|Modrm, { WordReg|WordMem, 0, 0} },
+{"str", 1, 0x0f00, 1, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+
+{"verr", 1, 0x0f00, 4, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"verw", 1, 0x0f00, 5, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+
+/* Floating point instructions. */
/* load */
-{"fld", 1, 0xd9c0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"flds", 1, 0xd9, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem float */
-{"fldl", 1, 0xdd, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem double */
-{"fldl", 1, 0xd9c0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fild", 1, 0xdf, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem word (16) */
-{"fildl", 1, 0xdb, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem dword (32) */
-{"fildq",1, 0xdf, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem qword (64) */
-{"fildll",1, 0xdf, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem qword (64) */
-{"fldt", 1, 0xdb, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem efloat */
-{"fbld", 1, 0xdf, 4, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem bcd */
+{"fld", 1, 0xd9c0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* register */
+{"fld", 1, 0xd9, 0, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, /* %st0 <-- mem float/double */
+{"fld", 1, 0xd9c0, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+/* Intel Syntax */
+{"fld", 1, 0xdb, 5, x_FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem efloat */
+{"fild", 1, 0xdf, 0, sl_Suf|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* %st0 <-- mem word(16)/dword(32) */
+/* Intel Syntax */
+{"fildd", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
+{"fildq", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
+{"fildll", 1, 0xdf, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem qword (64) */
+{"fldt", 1, 0xdb, 5, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem efloat */
+{"fbld", 1, 0xdf, 4, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 <-- mem bcd */
/* store (no pop) */
-{"fst", 1, 0xddd0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fsts", 1, 0xd9, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem float */
-{"fstl", 1, 0xdd, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem double */
-{"fstl", 1, 0xddd0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fist", 1, 0xdf, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem word (16) */
-{"fistl", 1, 0xdb, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem dword (32) */
+{"fst", 1, 0xddd0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* register */
+{"fst", 1, 0xd9, 2, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, /* %st0 --> mem float/double */
+{"fst", 1, 0xddd0, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+{"fist", 1, 0xdf, 2, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* %st0 --> mem word(16)/dword(32) */
/* store (with pop) */
-{"fstp", 1, 0xddd8, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fstps", 1, 0xd9, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem float */
-{"fstpl", 1, 0xdd, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem double */
-{"fstpl", 1, 0xddd8, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fistp", 1, 0xdf, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem word (16) */
-{"fistpl",1, 0xdb, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem dword (32) */
-{"fistpq",1, 0xdf, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem qword (64) */
-{"fistpll",1,0xdf, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem qword (64) */
-{"fstpt", 1, 0xdb, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem efloat */
-{"fbstp", 1, 0xdf, 6, Modrm, { Mem, 0, 0} }, /* %st0 --> mem bcd */
+{"fstp", 1, 0xddd8, X, FP|ShortForm, { FloatReg, 0, 0} }, /* register */
+{"fstp", 1, 0xd9, 3, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, /* %st0 --> mem float/double */
+{"fstp", 1, 0xddd8, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+/* Intel Syntax */
+{"fstp", 1, 0xdb, 7, x_FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem efloat */
+{"fistp", 1, 0xdf, 3, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* %st0 --> mem word(16)/dword(32) */
+/* Intel Syntax */
+{"fistpd", 1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
+{"fistpq", 1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
+{"fistpll",1, 0xdf, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem qword (64) */
+{"fstpt", 1, 0xdb, 7, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem efloat */
+{"fbstp", 1, 0xdf, 6, FP|Modrm, { LLongMem, 0, 0} }, /* %st0 --> mem bcd */
/* exchange %st<n> with %st0 */
-{"fxch", 1, 0xd9c8, _, ShortForm, { FloatReg, 0, 0} },
-{"fxch", 0, 0xd9c9, _, NoModrm, { 0, 0, 0} }, /* alias for fxch %st, %st(1) */
+{"fxch", 1, 0xd9c8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fxch", 0, 0xd9c9, X, FP, { 0, 0, 0} }, /* alias for fxch %st(1) */
/* comparison (without pop) */
-{"fcom", 1, 0xd8d0, _, ShortForm, { FloatReg, 0, 0} },
-{"fcoms", 1, 0xd8, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem float */
-{"ficoml", 1, 0xda, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem dword */
-{"fcoml", 1, 0xdc, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem double */
-{"fcoml", 1, 0xd8d0, _, ShortForm, { FloatReg, 0, 0} },
-{"ficoms", 1, 0xde, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem word */
+{"fcom", 1, 0xd8d0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fcom", 0, 0xd8d1, X, FP, { 0, 0, 0} }, /* alias for fcom %st(1) */
+{"fcom", 1, 0xd8, 2, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, /* compare %st0, mem float/double */
+{"fcom", 1, 0xd8d0, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+{"ficom", 1, 0xde, 2, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* compare %st0, mem word/dword */
/* comparison (with pop) */
-{"fcomp", 1, 0xd8d8, _, ShortForm, { FloatReg, 0, 0} },
-{"fcomp", 0, 0xd8d9, _, NoModrm, {0, 0, 0} }, /* fcomp %st, %st(1) */
-{"fcomps", 1, 0xd8, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem float */
-{"ficompl", 1, 0xda, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem dword */
-{"fcompl", 1, 0xdc, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem double */
-{"fcompl", 1, 0xd8d8, _, ShortForm, { FloatReg, 0, 0} },
-{"ficomps", 1, 0xde, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem word */
-{"fcompp", 0, 0xded9, _, NoModrm, { 0, 0, 0} }, /* compare %st0, %st1 & pop 2 */
+{"fcomp", 1, 0xd8d8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fcomp", 0, 0xd8d9, X, FP, { 0, 0, 0} }, /* alias for fcomp %st(1) */
+{"fcomp", 1, 0xd8, 3, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, /* compare %st0, mem float/double */
+{"fcomp", 1, 0xd8d8, X, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
+{"ficomp", 1, 0xde, 3, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, /* compare %st0, mem word/dword */
+{"fcompp", 0, 0xded9, X, FP, { 0, 0, 0} }, /* compare %st0, %st1 & pop 2 */
/* unordered comparison (with pop) */
-{"fucom", 1, 0xdde0, _, ShortForm, { FloatReg, 0, 0} },
-{"fucomp", 1, 0xdde8, _, ShortForm, { FloatReg, 0, 0} },
-{"fucompp", 0, 0xdae9, _, NoModrm, { 0, 0, 0} }, /* ucompare %st0, %st1 & pop twice */
+{"fucom", 1, 0xdde0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucom", 0, 0xdde1, X, FP, { 0, 0, 0} }, /* alias for fucom %st(1) */
+{"fucomp", 1, 0xdde8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucomp", 0, 0xdde9, X, FP, { 0, 0, 0} }, /* alias for fucomp %st(1) */
+{"fucompp",0, 0xdae9, X, FP, { 0, 0, 0} }, /* ucompare %st0, %st1 & pop twice */
-{"ftst", 0, 0xd9e4, _, NoModrm, { 0, 0, 0} }, /* test %st0 */
-{"fxam", 0, 0xd9e5, _, NoModrm, { 0, 0, 0} }, /* examine %st0 */
+{"ftst", 0, 0xd9e4, X, FP, { 0, 0, 0} }, /* test %st0 */
+{"fxam", 0, 0xd9e5, X, FP, { 0, 0, 0} }, /* examine %st0 */
/* load constants into %st0 */
-{"fld1", 0, 0xd9e8, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- 1.0 */
-{"fldl2t", 0, 0xd9e9, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log2(10) */
-{"fldl2e", 0, 0xd9ea, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log2(e) */
-{"fldpi", 0, 0xd9eb, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- pi */
-{"fldlg2", 0, 0xd9ec, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log10(2) */
-{"fldln2", 0, 0xd9ed, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- ln(2) */
-{"fldz", 0, 0xd9ee, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- 0.0 */
+{"fld1", 0, 0xd9e8, X, FP, { 0, 0, 0} }, /* %st0 <-- 1.0 */
+{"fldl2t", 0, 0xd9e9, X, FP, { 0, 0, 0} }, /* %st0 <-- log2(10) */
+{"fldl2e", 0, 0xd9ea, X, FP, { 0, 0, 0} }, /* %st0 <-- log2(e) */
+{"fldpi", 0, 0xd9eb, X, FP, { 0, 0, 0} }, /* %st0 <-- pi */
+{"fldlg2", 0, 0xd9ec, X, FP, { 0, 0, 0} }, /* %st0 <-- log10(2) */
+{"fldln2", 0, 0xd9ed, X, FP, { 0, 0, 0} }, /* %st0 <-- ln(2) */
+{"fldz", 0, 0xd9ee, X, FP, { 0, 0, 0} }, /* %st0 <-- 0.0 */
/* arithmetic */
/* add */
-{"fadd", 1, 0xd8c0, _, ShortForm, { FloatReg, 0, 0} },
-{"fadd", 2, 0xd8c0, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fadd", 0, 0xdcc1, _, NoModrm, { 0, 0, 0} }, /* alias for fadd %st, %st(1) */
-{"faddp", 1, 0xdec0, _, ShortForm, { FloatReg, 0, 0} },
-{"faddp", 2, 0xdec0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"faddp", 2, 0xdec0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"faddp", 0, 0xdec1, _, NoModrm, { 0, 0, 0} }, /* alias for faddp %st, %st(1) */
-{"fadds", 1, 0xd8, 0, Modrm, { Mem, 0, 0} },
-{"fiaddl", 1, 0xda, 0, Modrm, { Mem, 0, 0} },
-{"faddl", 1, 0xdc, 0, Modrm, { Mem, 0, 0} },
-{"fiadds", 1, 0xde, 0, Modrm, { Mem, 0, 0} },
-
-/* sub */
-/* Note: intel has decided that certain of these operations are reversed
- in assembler syntax. */
-{"fsub", 1, 0xd8e0, _, ShortForm, { FloatReg, 0, 0} },
-{"fsub", 2, 0xd8e0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsub", 2, 0xdce8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fsub", 2, 0xdce0, _, ShortForm, { FloatAcc, FloatReg, 0} },
+{"fadd", 2, 0xd8c0, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
+{"fadd", 1, 0xd8c0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* alias for fadd %st(i), %st */
+#if SYSV386_COMPAT
+{"fadd", 0, 0xdec1, X, FP|Ugh, { 0, 0, 0} }, /* alias for faddp */
#endif
-{"fsub", 0, 0xdce1, _, NoModrm, { 0, 0, 0} },
-{"fsubp", 1, 0xdee8, _, ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 2, 0xdee8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsubp", 2, 0xdee8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 0, 0xdee9, _, NoModrm, { 0, 0, 0} },
-#else
-{"fsubp", 2, 0xdee0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 0, 0xdee1, _, NoModrm, { 0, 0, 0} },
+{"fadd", 1, 0xd8, 0, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
+{"fiadd", 1, 0xde, 0, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+
+{"faddp", 2, 0xdec0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"faddp", 1, 0xdec0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"faddp", 0, 0xdec1, X, FP, { 0, 0, 0} }, /* alias for faddp %st, %st(1) */
+{"faddp", 2, 0xdec0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+
+/* subtract */
+{"fsub", 2, 0xd8e0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fsub", 1, 0xd8e0, X, FP|ShortForm, { FloatReg, 0, 0} },
+#if SYSV386_COMPAT
+{"fsub", 0, 0xdee1, X, FP|Ugh, { 0, 0, 0} }, /* alias for fsubp */
#endif
-{"fsubs", 1, 0xd8, 4, Modrm, { Mem, 0, 0} },
-{"fisubl", 1, 0xda, 4, Modrm, { Mem, 0, 0} },
-{"fsubl", 1, 0xdc, 4, Modrm, { Mem, 0, 0} },
-{"fisubs", 1, 0xde, 4, Modrm, { Mem, 0, 0} },
-
-/* sub reverse */
-{"fsubr", 1, 0xd8e8, _, ShortForm, { FloatReg, 0, 0} },
-{"fsubr", 2, 0xd8e8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsubr", 2, 0xdce0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fsubr", 2, 0xdce8, _, ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsub", 1, 0xd8, 4, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
+{"fisub", 1, 0xde, 4, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+
+#if SYSV386_COMPAT
+{"fsubp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubp", 0, 0xdee1, X, FP, { 0, 0, 0} },
+#if OLDGCC_COMPAT
+{"fsubp", 2, 0xdee0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
-{"fsubr", 0, 0xdce9, _, NoModrm, { 0, 0, 0} },
-{"fsubrp", 1, 0xdee0, _, ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 2, 0xdee0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsubrp", 2, 0xdee0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 0, 0xdee1, _, NoModrm, { 0, 0, 0} },
#else
-{"fsubrp", 2, 0xdee8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 0, 0xdee9, _, NoModrm, { 0, 0, 0} },
+{"fsubp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubp", 0, 0xdee9, X, FP, { 0, 0, 0} },
#endif
-{"fsubrs", 1, 0xd8, 5, Modrm, { Mem, 0, 0} },
-{"fisubrl", 1, 0xda, 5, Modrm, { Mem, 0, 0} },
-{"fsubrl", 1, 0xdc, 5, Modrm, { Mem, 0, 0} },
-{"fisubrs", 1, 0xde, 5, Modrm, { Mem, 0, 0} },
-
-/* mul */
-{"fmul", 1, 0xd8c8, _, ShortForm, { FloatReg, 0, 0} },
-{"fmul", 2, 0xd8c8, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fmul", 0, 0xdcc9, _, NoModrm, { 0, 0, 0} },
-{"fmulp", 1, 0xdec8, _, ShortForm, { FloatReg, 0, 0} },
-{"fmulp", 2, 0xdec8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fmulp", 2, 0xdec8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fmulp", 0, 0xdec9, _, NoModrm, { 0, 0, 0} },
-{"fmuls", 1, 0xd8, 1, Modrm, { Mem, 0, 0} },
-{"fimull", 1, 0xda, 1, Modrm, { Mem, 0, 0} },
-{"fmull", 1, 0xdc, 1, Modrm, { Mem, 0, 0} },
-{"fimuls", 1, 0xde, 1, Modrm, { Mem, 0, 0} },
-
-/* div */
-/* Note: intel has decided that certain of these operations are reversed
- in assembler syntax. */
-{"fdiv", 1, 0xd8f0, _, ShortForm, { FloatReg, 0, 0} },
-{"fdiv", 2, 0xd8f0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdiv", 2, 0xdcf8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fdiv", 2, 0xdcf0, _, ShortForm, { FloatAcc, FloatReg, 0} },
+
+/* subtract reverse */
+{"fsubr", 2, 0xd8e8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fsubr", 1, 0xd8e8, X, FP|ShortForm, { FloatReg, 0, 0} },
+#if SYSV386_COMPAT
+{"fsubr", 0, 0xdee9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fsubrp */
+#endif
+{"fsubr", 1, 0xd8, 5, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
+{"fisubr", 1, 0xde, 5, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+
+#if SYSV386_COMPAT
+{"fsubrp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubrp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubrp", 0, 0xdee9, X, FP, { 0, 0, 0} },
+#if OLDGCC_COMPAT
+{"fsubrp", 2, 0xdee8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
-{"fdiv", 0, 0xdcf1, _, NoModrm, { 0, 0, 0} },
-{"fdivp", 1, 0xdef8, _, ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 2, 0xdef8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdivp", 2, 0xdef8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 0, 0xdef9, _, NoModrm, { 0, 0, 0} },
#else
-{"fdivp", 2, 0xdef0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 0, 0xdef1, _, NoModrm, { 0, 0, 0} },
+{"fsubrp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fsubrp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fsubrp", 0, 0xdee1, X, FP, { 0, 0, 0} },
+#endif
+
+/* multiply */
+{"fmul", 2, 0xd8c8, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
+{"fmul", 1, 0xd8c8, X, FP|ShortForm, { FloatReg, 0, 0} },
+#if SYSV386_COMPAT
+{"fmul", 0, 0xdec9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fmulp */
+#endif
+{"fmul", 1, 0xd8, 1, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
+{"fimul", 1, 0xde, 1, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+
+{"fmulp", 2, 0xdec8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fmulp", 1, 0xdec8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fmulp", 0, 0xdec9, X, FP, { 0, 0, 0} },
+{"fmulp", 2, 0xdec8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
+
+/* divide */
+{"fdiv", 2, 0xd8f0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fdiv", 1, 0xd8f0, X, FP|ShortForm, { FloatReg, 0, 0} },
+#if SYSV386_COMPAT
+{"fdiv", 0, 0xdef1, X, FP|Ugh, { 0, 0, 0} }, /* alias for fdivp */
+#endif
+{"fdiv", 1, 0xd8, 6, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
+{"fidiv", 1, 0xde, 6, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+
+#if SYSV386_COMPAT
+{"fdivp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivp", 0, 0xdef1, X, FP, { 0, 0, 0} },
+#if OLDGCC_COMPAT
+{"fdivp", 2, 0xdef0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
-{"fdivs", 1, 0xd8, 6, Modrm, { Mem, 0, 0} },
-{"fidivl", 1, 0xda, 6, Modrm, { Mem, 0, 0} },
-{"fdivl", 1, 0xdc, 6, Modrm, { Mem, 0, 0} },
-{"fidivs", 1, 0xde, 6, Modrm, { Mem, 0, 0} },
-
-/* div reverse */
-{"fdivr", 1, 0xd8f8, _, ShortForm, { FloatReg, 0, 0} },
-{"fdivr", 2, 0xd8f8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdivr", 2, 0xdcf0, _, ShortForm, { FloatAcc, FloatReg, 0} },
#else
-{"fdivr", 2, 0xdcf8, _, ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivp", 0, 0xdef9, X, FP, { 0, 0, 0} },
+#endif
+
+/* divide reverse */
+{"fdivr", 2, 0xd8f8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
+{"fdivr", 1, 0xd8f8, X, FP|ShortForm, { FloatReg, 0, 0} },
+#if SYSV386_COMPAT
+{"fdivr", 0, 0xdef9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fdivrp */
+#endif
+{"fdivr", 1, 0xd8, 7, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
+{"fidivr", 1, 0xde, 7, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+
+#if SYSV386_COMPAT
+{"fdivrp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivrp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivrp", 0, 0xdef9, X, FP, { 0, 0, 0} },
+#if OLDGCC_COMPAT
+{"fdivrp", 2, 0xdef8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
#endif
-{"fdivr", 0, 0xdcf9, _, NoModrm, { 0, 0, 0} },
-{"fdivrp", 1, 0xdef0, _, ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 2, 0xdef0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdivrp", 2, 0xdef0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 0, 0xdef1, _, NoModrm, { 0, 0, 0} },
#else
-{"fdivrp", 2, 0xdef8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 0, 0xdef9, _, NoModrm, { 0, 0, 0} },
+{"fdivrp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} },
+{"fdivrp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fdivrp", 0, 0xdef1, X, FP, { 0, 0, 0} },
#endif
-{"fdivrs", 1, 0xd8, 7, Modrm, { Mem, 0, 0} },
-{"fidivrl", 1, 0xda, 7, Modrm, { Mem, 0, 0} },
-{"fdivrl", 1, 0xdc, 7, Modrm, { Mem, 0, 0} },
-{"fidivrs", 1, 0xde, 7, Modrm, { Mem, 0, 0} },
-
-{"f2xm1", 0, 0xd9f0, _, NoModrm, { 0, 0, 0} },
-{"fyl2x", 0, 0xd9f1, _, NoModrm, { 0, 0, 0} },
-{"fptan", 0, 0xd9f2, _, NoModrm, { 0, 0, 0} },
-{"fpatan", 0, 0xd9f3, _, NoModrm, { 0, 0, 0} },
-{"fxtract", 0, 0xd9f4, _, NoModrm, { 0, 0, 0} },
-{"fprem1", 0, 0xd9f5, _, NoModrm, { 0, 0, 0} },
-{"fdecstp", 0, 0xd9f6, _, NoModrm, { 0, 0, 0} },
-{"fincstp", 0, 0xd9f7, _, NoModrm, { 0, 0, 0} },
-{"fprem", 0, 0xd9f8, _, NoModrm, { 0, 0, 0} },
-{"fyl2xp1", 0, 0xd9f9, _, NoModrm, { 0, 0, 0} },
-{"fsqrt", 0, 0xd9fa, _, NoModrm, { 0, 0, 0} },
-{"fsincos", 0, 0xd9fb, _, NoModrm, { 0, 0, 0} },
-{"frndint", 0, 0xd9fc, _, NoModrm, { 0, 0, 0} },
-{"fscale", 0, 0xd9fd, _, NoModrm, { 0, 0, 0} },
-{"fsin", 0, 0xd9fe, _, NoModrm, { 0, 0, 0} },
-{"fcos", 0, 0xd9ff, _, NoModrm, { 0, 0, 0} },
-
-{"fchs", 0, 0xd9e0, _, NoModrm, { 0, 0, 0} },
-{"fabs", 0, 0xd9e1, _, NoModrm, { 0, 0, 0} },
+
+{"f2xm1", 0, 0xd9f0, X, FP, { 0, 0, 0} },
+{"fyl2x", 0, 0xd9f1, X, FP, { 0, 0, 0} },
+{"fptan", 0, 0xd9f2, X, FP, { 0, 0, 0} },
+{"fpatan", 0, 0xd9f3, X, FP, { 0, 0, 0} },
+{"fxtract",0, 0xd9f4, X, FP, { 0, 0, 0} },
+{"fprem1", 0, 0xd9f5, X, FP, { 0, 0, 0} },
+{"fdecstp",0, 0xd9f6, X, FP, { 0, 0, 0} },
+{"fincstp",0, 0xd9f7, X, FP, { 0, 0, 0} },
+{"fprem", 0, 0xd9f8, X, FP, { 0, 0, 0} },
+{"fyl2xp1",0, 0xd9f9, X, FP, { 0, 0, 0} },
+{"fsqrt", 0, 0xd9fa, X, FP, { 0, 0, 0} },
+{"fsincos",0, 0xd9fb, X, FP, { 0, 0, 0} },
+{"frndint",0, 0xd9fc, X, FP, { 0, 0, 0} },
+{"fscale", 0, 0xd9fd, X, FP, { 0, 0, 0} },
+{"fsin", 0, 0xd9fe, X, FP, { 0, 0, 0} },
+{"fcos", 0, 0xd9ff, X, FP, { 0, 0, 0} },
+{"fchs", 0, 0xd9e0, X, FP, { 0, 0, 0} },
+{"fabs", 0, 0xd9e1, X, FP, { 0, 0, 0} },
/* processor control */
-{"fninit", 0, 0xdbe3, _, NoModrm, { 0, 0, 0} },
-{"finit", 0, 0xdbe3, _, FWait|NoModrm, { 0, 0, 0} },
-{"fldcw", 1, 0xd9, 5, Modrm, { Mem, 0, 0} },
-{"fnstcw", 1, 0xd9, 7, Modrm, { Mem, 0, 0} },
-{"fstcw", 1, 0xd9, 7, FWait|Modrm, { Mem, 0, 0} },
-{"fnstsw", 1, 0xdfe0, _, NoModrm, { Acc, 0, 0} },
-{"fnstsw", 1, 0xdd, 7, Modrm, { Mem, 0, 0} },
-{"fnstsw", 0, 0xdfe0, _, NoModrm, { 0, 0, 0} },
-{"fstsw", 1, 0xdfe0, _, FWait|NoModrm, { Acc, 0, 0} },
-{"fstsw", 1, 0xdd, 7, FWait|Modrm, { Mem, 0, 0} },
-{"fstsw", 0, 0xdfe0, _, FWait|NoModrm, { 0, 0, 0} },
-{"fnclex", 0, 0xdbe2, _, NoModrm, { 0, 0, 0} },
-{"fclex", 0, 0xdbe2, _, FWait|NoModrm, { 0, 0, 0} },
-{"fnstenv",1, 0xd9, 6, Modrm, { Mem, 0, 0} },
-{"fstenv", 1, 0xd9, 6, FWait|Modrm, { Mem, 0, 0} },
-{"fldenv", 1, 0xd9, 4, Modrm, { Mem, 0, 0} },
-{"fnsave", 1, 0xdd, 6, Modrm, { Mem, 0, 0} },
-{"fsave", 1, 0xdd, 6, FWait|Modrm, { Mem, 0, 0} },
-{"frstor", 1, 0xdd, 4, Modrm, { Mem, 0, 0} },
-/* Short forms of fldenv, fstenv use data size prefix. (At least I
- think so. The PentPro prog ref I have says address size in one
- place, operand size elsewhere). FIXME: Are these the right names? */
-{"fnstenvs",1, 0xd9, 6, Modrm|Data16, { Mem, 0, 0} },
-{"fstenvs", 1, 0xd9, 6, FWait|Modrm|Data16, { Mem, 0, 0} },
-{"fldenvs", 1, 0xd9, 4, Modrm|Data16, { Mem, 0, 0} },
-
-{"ffree", 1, 0xddc0, _, ShortForm, { FloatReg, 0, 0} },
+{"fninit", 0, 0xdbe3, X, FP, { 0, 0, 0} },
+{"finit", 0, 0xdbe3, X, FP|FWait, { 0, 0, 0} },
+{"fldcw", 1, 0xd9, 5, FP|Modrm, { ShortMem, 0, 0} },
+{"fnstcw", 1, 0xd9, 7, FP|Modrm, { ShortMem, 0, 0} },
+{"fstcw", 1, 0xd9, 7, FP|FWait|Modrm, { ShortMem, 0, 0} },
+{"fnstsw", 1, 0xdfe0, X, FP, { Acc, 0, 0} },
+{"fnstsw", 1, 0xdd, 7, FP|Modrm, { ShortMem, 0, 0} },
+{"fnstsw", 0, 0xdfe0, X, FP, { 0, 0, 0} },
+{"fstsw", 1, 0xdfe0, X, FP|FWait, { Acc, 0, 0} },
+{"fstsw", 1, 0xdd, 7, FP|FWait|Modrm, { ShortMem, 0, 0} },
+{"fstsw", 0, 0xdfe0, X, FP|FWait, { 0, 0, 0} },
+{"fnclex", 0, 0xdbe2, X, FP, { 0, 0, 0} },
+{"fclex", 0, 0xdbe2, X, FP|FWait, { 0, 0, 0} },
+/* Short forms of fldenv, fstenv use data size prefix. */
+{"fnstenv",1, 0xd9, 6, sl_Suf|Modrm, { LLongMem, 0, 0} },
+{"fstenv", 1, 0xd9, 6, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
+{"fldenv", 1, 0xd9, 4, sl_Suf|Modrm, { LLongMem, 0, 0} },
+{"fnsave", 1, 0xdd, 6, sl_Suf|Modrm, { LLongMem, 0, 0} },
+{"fsave", 1, 0xdd, 6, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
+{"frstor", 1, 0xdd, 4, sl_Suf|Modrm, { LLongMem, 0, 0} },
+
+{"ffree", 1, 0xddc0, X, FP|ShortForm, { FloatReg, 0, 0} },
/* P6:free st(i), pop st */
-{"ffreep", 1, 0xdfc0, _, ShortForm, { FloatReg, 0, 0} },
-{"fnop", 0, 0xd9d0, _, NoModrm, { 0, 0, 0} },
+{"ffreep", 1, 0xdfc0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fnop", 0, 0xd9d0, X, FP, { 0, 0, 0} },
#define FWAIT_OPCODE 0x9b
-{"fwait", 0, 0x9b, _, NoModrm, { 0, 0, 0} },
-
-/*
- opcode prefixes; we allow them as seperate insns too
- (see prefix table below)
-*/
-{"aword", 0, 0x67, _, NoModrm, { 0, 0, 0} },
-{"addr16", 0, 0x67, _, NoModrm, { 0, 0, 0} },
-{"word", 0, 0x66, _, NoModrm, { 0, 0, 0} },
-{"data16", 0, 0x66, _, NoModrm, { 0, 0, 0} },
-{"lock", 0, 0xf0, _, NoModrm, { 0, 0, 0} },
-{"cs", 0, 0x2e, _, NoModrm, { 0, 0, 0} },
-{"ds", 0, 0x3e, _, NoModrm, { 0, 0, 0} },
-{"es", 0, 0x26, _, NoModrm, { 0, 0, 0} },
-{"fs", 0, 0x64, _, NoModrm, { 0, 0, 0} },
-{"gs", 0, 0x65, _, NoModrm, { 0, 0, 0} },
-{"ss", 0, 0x36, _, NoModrm, { 0, 0, 0} },
-{"rep", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
-{"repe", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
-{"repz", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
-{"repne", 0, 0xf2, _, NoModrm, { 0, 0, 0} },
-{"repnz", 0, 0xf2, _, NoModrm, { 0, 0, 0} },
-
-/* 486 extensions */
-
-{"bswap", 1, 0x0fc8, _, ShortForm, { Reg32,0,0 } },
-{"xadd", 2, 0x0fc0, _, W|Modrm, { Reg, Reg|Mem, 0 } },
-{"cmpxchg", 2, 0x0fb0, _, W|Modrm, { Reg, Reg|Mem, 0 } },
-{"invd", 0, 0x0f08, _, NoModrm, { 0, 0, 0} },
-{"wbinvd", 0, 0x0f09, _, NoModrm, { 0, 0, 0} },
-{"invlpg", 1, 0x0f01, 7, Modrm, { Mem, 0, 0} },
-
-/* 586 and late 486 extensions */
-{"cpuid", 0, 0x0fa2, _, NoModrm, { 0, 0, 0} },
-
-/* Pentium extensions */
-{"wrmsr", 0, 0x0f30, _, NoModrm, { 0, 0, 0} },
-{"rdtsc", 0, 0x0f31, _, NoModrm, { 0, 0, 0} },
-{"rdmsr", 0, 0x0f32, _, NoModrm, { 0, 0, 0} },
-{"cmpxchg8b", 1, 0x0fc7, 1, Modrm, { Mem, 0, 0} },
-
-/* Pentium Pro extensions */
-{"rdpmc", 0, 0x0f33, _, NoModrm, { 0, 0, 0} },
-
-{"ud2", 0, 0x0f0b, _, NoModrm, {0, 0, 0} }, /* official undefined instr. */
-
-{"cmovo", 2, 0x0f40, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovno", 2, 0x0f41, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovb", 2, 0x0f42, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovae", 2, 0x0f43, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmove", 2, 0x0f44, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovne", 2, 0x0f45, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovbe", 2, 0x0f46, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmova", 2, 0x0f47, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovs", 2, 0x0f48, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovns", 2, 0x0f49, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovp", 2, 0x0f4a, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovnp", 2, 0x0f4b, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovl", 2, 0x0f4c, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovge", 2, 0x0f4d, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovle", 2, 0x0f4e, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovg", 2, 0x0f4f, _, Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-
-{"fcmovb", 2, 0xdac0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmove", 2, 0xdac8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovbe",2, 0xdad0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovu", 2, 0xdad8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnb", 2, 0xdbc0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovne", 2, 0xdbc8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnbe",2, 0xdbd0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnu", 2, 0xdbd8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-
-{"fcomi", 2, 0xdbf0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomi", 2, 0xdbe8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcomip", 2, 0xdff0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomip",2, 0xdfe8, _, ShortForm, { FloatReg, FloatAcc, 0} },
+{"fwait", 0, 0x9b, X, FP, { 0, 0, 0} },
-/* MMX instructions. */
+/* Opcode prefixes; we allow them as separate insns too. */
-{"emms", 0, 0x0f77, _, NoModrm, { 0, 0, 0 } },
-{"movd", 2, 0x0f6e, _, Modrm, { Reg32|WordMem, RegMMX, 0 } },
-{"movd", 2, 0x0f7e, _, Modrm, { RegMMX, Reg32|WordMem, 0 } },
-{"movq", 2, 0x0f6f, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"movq", 2, 0x0f7f, _, Modrm, { RegMMX, RegMMX|WordMem, 0 } },
-{"packssdw", 2, 0x0f6b, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"packsswb", 2, 0x0f63, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"packuswb", 2, 0x0f67, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddb", 2, 0x0ffc, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddw", 2, 0x0ffd, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddd", 2, 0x0ffe, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddsb", 2, 0x0fec, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddsw", 2, 0x0fed, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddusb", 2, 0x0fdc, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"paddusw", 2, 0x0fdd, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pand", 2, 0x0fdb, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pandn", 2, 0x0fdf, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pcmpeqb", 2, 0x0f74, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pcmpeqw", 2, 0x0f75, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pcmpeqd", 2, 0x0f76, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pcmpgtb", 2, 0x0f64, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pcmpgtw", 2, 0x0f65, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pcmpgtd", 2, 0x0f66, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pmaddwd", 2, 0x0ff5, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pmulhw", 2, 0x0fe5, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pmullw", 2, 0x0fd5, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"por", 2, 0x0feb, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psllw", 2, 0x0ff1, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psllw", 2, 0x0f71, 6, Modrm, { Imm8, RegMMX, 0 } },
-{"pslld", 2, 0x0ff2, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pslld", 2, 0x0f72, 6, Modrm, { Imm8, RegMMX, 0 } },
-{"psllq", 2, 0x0ff3, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psllq", 2, 0x0f73, 6, Modrm, { Imm8, RegMMX, 0 } },
-{"psraw", 2, 0x0fe1, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psraw", 2, 0x0f71, 4, Modrm, { Imm8, RegMMX, 0 } },
-{"psrad", 2, 0x0fe2, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psrad", 2, 0x0f72, 4, Modrm, { Imm8, RegMMX, 0 } },
-{"psrlw", 2, 0x0fd1, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psrlw", 2, 0x0f71, 2, Modrm, { Imm8, RegMMX, 0 } },
-{"psrld", 2, 0x0fd2, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psrld", 2, 0x0f72, 2, Modrm, { Imm8, RegMMX, 0 } },
-{"psrlq", 2, 0x0fd3, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psrlq", 2, 0x0f73, 2, Modrm, { Imm8, RegMMX, 0 } },
-{"psubb", 2, 0x0ff8, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psubw", 2, 0x0ff9, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psubd", 2, 0x0ffa, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psubsb", 2, 0x0fe8, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psubsw", 2, 0x0fe9, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psubusb", 2, 0x0fd8, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"psubusw", 2, 0x0fd9, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"punpckhbw", 2, 0x0f68, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"punpckhwd", 2, 0x0f69, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"punpckhdq", 2, 0x0f6a, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"punpcklbw", 2, 0x0f60, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"punpcklwd", 2, 0x0f61, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"punpckldq", 2, 0x0f62, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-{"pxor", 2, 0x0fef, _, Modrm, { RegMMX|WordMem, RegMMX, 0 } },
-
-{"", 0, 0, 0, 0, { 0, 0, 0} } /* sentinel */
-};
-#undef _
+#define ADDR_PREFIX_OPCODE 0x67
+{"addr16", 0, 0x67, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"addr32", 0, 0x67, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"aword", 0, 0x67, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"adword", 0, 0x67, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+#define DATA_PREFIX_OPCODE 0x66
+{"data16", 0, 0x66, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"data32", 0, 0x66, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"word", 0, 0x66, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
+{"dword", 0, 0x66, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+#define LOCK_PREFIX_OPCODE 0xf0
+{"lock", 0, 0xf0, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"wait", 0, 0x9b, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define CS_PREFIX_OPCODE 0x2e
+{"cs", 0, 0x2e, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define DS_PREFIX_OPCODE 0x3e
+{"ds", 0, 0x3e, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define ES_PREFIX_OPCODE 0x26
+{"es", 0, 0x26, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define FS_PREFIX_OPCODE 0x64
+{"fs", 0, 0x64, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define GS_PREFIX_OPCODE 0x65
+{"gs", 0, 0x65, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define SS_PREFIX_OPCODE 0x36
+{"ss", 0, 0x36, X, NoSuf|IsPrefix, { 0, 0, 0} },
+#define REPNE_PREFIX_OPCODE 0xf2
+#define REPE_PREFIX_OPCODE 0xf3
+{"rep", 0, 0xf3, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repe", 0, 0xf3, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repz", 0, 0xf3, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repne", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} },
+{"repnz", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} },
+
+/* 486 extensions. */
+
+{"bswap", 1, 0x0fc8, X, l_Suf|ShortForm, { Reg32, 0, 0 } },
+{"xadd", 2, 0x0fc0, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
+{"cmpxchg", 2, 0x0fb0, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
+{"invd", 0, 0x0f08, X, NoSuf, { 0, 0, 0} },
+{"wbinvd", 0, 0x0f09, X, NoSuf, { 0, 0, 0} },
+{"invlpg", 1, 0x0f01, 7, NoSuf|Modrm, { AnyMem, 0, 0} },
+
+/* 586 and late 486 extensions. */
+{"cpuid", 0, 0x0fa2, X, NoSuf, { 0, 0, 0} },
+
+/* Pentium extensions. */
+{"wrmsr", 0, 0x0f30, X, NoSuf, { 0, 0, 0} },
+{"rdtsc", 0, 0x0f31, X, NoSuf, { 0, 0, 0} },
+{"rdmsr", 0, 0x0f32, X, NoSuf, { 0, 0, 0} },
+{"cmpxchg8b",1,0x0fc7, 1, NoSuf|Modrm, { LLongMem, 0, 0} },
+{"sysenter",0, 0x0f34, X, NoSuf, { 0, 0, 0} },
+{"sysexit", 0, 0x0f35, X, NoSuf, { 0, 0, 0} },
+{"fxsave", 1, 0x0fae, 0, FP|Modrm, { LLongMem, 0, 0} },
+{"fxrstor", 1, 0x0fae, 1, FP|Modrm, { LLongMem, 0, 0} },
+
+/* Pentium Pro extensions. */
+{"rdpmc", 0, 0x0f33, X, NoSuf, { 0, 0, 0} },
+
+{"ud2", 0, 0x0f0b, X, NoSuf, { 0, 0, 0} }, /* official undefined instr. */
+{"ud2a", 0, 0x0f0b, X, NoSuf, { 0, 0, 0} }, /* alias for ud2 */
+{"ud2b", 0, 0x0fb9, X, NoSuf, { 0, 0, 0} }, /* 2nd. official undefined instr. */
+
+{"cmovo", 2, 0x0f40, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovno", 2, 0x0f41, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovb", 2, 0x0f42, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovc", 2, 0x0f42, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnae", 2, 0x0f42, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovae", 2, 0x0f43, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnc", 2, 0x0f43, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnb", 2, 0x0f43, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmove", 2, 0x0f44, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovz", 2, 0x0f44, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovne", 2, 0x0f45, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnz", 2, 0x0f45, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovbe", 2, 0x0f46, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovna", 2, 0x0f46, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmova", 2, 0x0f47, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnbe", 2, 0x0f47, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovs", 2, 0x0f48, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovns", 2, 0x0f49, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovp", 2, 0x0f4a, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnp", 2, 0x0f4b, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovl", 2, 0x0f4c, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnge", 2, 0x0f4c, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovge", 2, 0x0f4d, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnl", 2, 0x0f4d, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovle", 2, 0x0f4e, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovng", 2, 0x0f4e, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovg", 2, 0x0f4f, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"cmovnle", 2, 0x0f4f, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+
+{"fcmovb", 2, 0xdac0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnae",2, 0xdac0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmove", 2, 0xdac8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovbe", 2, 0xdad0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovna", 2, 0xdad0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovu", 2, 0xdad8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovae", 2, 0xdbc0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnb", 2, 0xdbc0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovne", 2, 0xdbc8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmova", 2, 0xdbd0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnbe",2, 0xdbd0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcmovnu", 2, 0xdbd8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+
+{"fcomi", 2, 0xdbf0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcomi", 0, 0xdbf1, X, FP|ShortForm, { 0, 0, 0} },
+{"fcomi", 1, 0xdbf0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucomi", 2, 0xdbe8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fucomi", 0, 0xdbe9, X, FP|ShortForm, { 0, 0, 0} },
+{"fucomi", 1, 0xdbe8, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fcomip", 2, 0xdff0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcompi", 2, 0xdff0, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fcompi", 0, 0xdff1, X, FP|ShortForm, { 0, 0, 0} },
+{"fcompi", 1, 0xdff0, X, FP|ShortForm, { FloatReg, 0, 0} },
+{"fucomip", 2, 0xdfe8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fucompi", 2, 0xdfe8, X, FP|ShortForm, { FloatReg, FloatAcc, 0} },
+{"fucompi", 0, 0xdfe9, X, FP|ShortForm, { 0, 0, 0} },
+{"fucompi", 1, 0xdfe8, X, FP|ShortForm, { FloatReg, 0, 0} },
-static const template *const i386_optab_end
- = i386_optab + sizeof (i386_optab)/sizeof(i386_optab[0]);
+/* MMX instructions. */
-/* 386 register table */
+{"emms", 0, 0x0f77, X, FP, { 0, 0, 0 } },
+{"movd", 2, 0x0f6e, X, FP|Modrm, { Reg32|LongMem, RegMMX, 0 } },
+{"movd", 2, 0x0f7e, X, FP|Modrm, { RegMMX, Reg32|LongMem, 0 } },
+{"movq", 2, 0x0f6f, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"movq", 2, 0x0f7f, X, FP|Modrm, { RegMMX, RegMMX|LongMem, 0 } },
+{"packssdw", 2, 0x0f6b, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"packsswb", 2, 0x0f63, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"packuswb", 2, 0x0f67, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddb", 2, 0x0ffc, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddw", 2, 0x0ffd, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddd", 2, 0x0ffe, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddsb", 2, 0x0fec, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddsw", 2, 0x0fed, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddusb", 2, 0x0fdc, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"paddusw", 2, 0x0fdd, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pand", 2, 0x0fdb, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pandn", 2, 0x0fdf, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pcmpeqb", 2, 0x0f74, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pcmpeqw", 2, 0x0f75, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pcmpeqd", 2, 0x0f76, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pcmpgtb", 2, 0x0f64, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pcmpgtw", 2, 0x0f65, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pcmpgtd", 2, 0x0f66, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pmaddwd", 2, 0x0ff5, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pmulhw", 2, 0x0fe5, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pmullw", 2, 0x0fd5, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"por", 2, 0x0feb, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psllw", 2, 0x0ff1, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psllw", 2, 0x0f71, 6, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"pslld", 2, 0x0ff2, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pslld", 2, 0x0f72, 6, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psllq", 2, 0x0ff3, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psllq", 2, 0x0f73, 6, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psraw", 2, 0x0fe1, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psraw", 2, 0x0f71, 4, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psrad", 2, 0x0fe2, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psrad", 2, 0x0f72, 4, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psrlw", 2, 0x0fd1, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psrlw", 2, 0x0f71, 2, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psrld", 2, 0x0fd2, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psrld", 2, 0x0f72, 2, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psrlq", 2, 0x0fd3, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psrlq", 2, 0x0f73, 2, FP|Modrm, { Imm8, RegMMX, 0 } },
+{"psubb", 2, 0x0ff8, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psubw", 2, 0x0ff9, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psubd", 2, 0x0ffa, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psubsb", 2, 0x0fe8, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psubsw", 2, 0x0fe9, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psubusb", 2, 0x0fd8, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psubusw", 2, 0x0fd9, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"punpckhbw",2, 0x0f68, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"punpckhwd",2, 0x0f69, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"punpckhdq",2, 0x0f6a, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"punpcklbw",2, 0x0f60, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"punpcklwd",2, 0x0f61, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"punpckldq",2, 0x0f62, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pxor", 2, 0x0fef, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+
+
+/* PIII Katmai New Instructions / SIMD instructions. */
+
+{"addps", 2, 0x0f58, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"addss", 2, 0xf30f58, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"andnps", 2, 0x0f55, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"andps", 2, 0x0f54, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpeqps", 2, 0x0fc2, 0, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpeqss", 2, 0xf30fc2, 0, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpleps", 2, 0x0fc2, 2, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpless", 2, 0xf30fc2, 2, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpltps", 2, 0x0fc2, 1, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpltss", 2, 0xf30fc2, 1, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpneqps", 2, 0x0fc2, 4, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpneqss", 2, 0xf30fc2, 4, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpnleps", 2, 0x0fc2, 6, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpnless", 2, 0xf30fc2, 6, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpnltps", 2, 0x0fc2, 5, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpnltss", 2, 0xf30fc2, 5, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpordps", 2, 0x0fc2, 7, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpordss", 2, 0xf30fc2, 7, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpunordps",2, 0x0fc2, 3, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpunordss",2, 0xf30fc2, 3, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
+{"cmpps", 3, 0x0fc2, X, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
+{"cmpss", 3, 0xf30fc2, X, FP|Modrm, { Imm8, RegXMM|WordMem, RegXMM } },
+{"comiss", 2, 0x0f2f, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"cvtpi2ps", 2, 0x0f2a, X, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
+{"cvtps2pi", 2, 0x0f2d, X, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
+{"cvtsi2ss", 2, 0xf30f2a, X, FP|Modrm, { Reg32|WordMem, RegXMM, 0 } },
+{"cvtss2si", 2, 0xf30f2d, X, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
+{"cvttps2pi", 2, 0x0f2c, X, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
+{"cvttss2si", 2, 0xf30f2c, X, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
+{"divps", 2, 0x0f5e, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"divss", 2, 0xf30f5e, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"ldmxcsr", 1, 0x0fae, 2, FP|Modrm, { WordMem, 0, 0 } },
+{"maskmovq", 2, 0x0ff7, X, FP|Modrm, { RegMMX|InvMem, RegMMX, 0 } },
+{"maxps", 2, 0x0f5f, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"maxss", 2, 0xf30f5f, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"minps", 2, 0x0f5d, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"minss", 2, 0xf30f5d, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"movaps", 2, 0x0f28, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"movaps", 2, 0x0f29, X, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
+{"movhlps", 2, 0x0f12, X, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
+{"movhps", 2, 0x0f16, X, FP|Modrm, { LLongMem, RegXMM, 0 } },
+{"movhps", 2, 0x0f17, X, FP|Modrm, { RegXMM, LLongMem, 0 } },
+{"movlhps", 2, 0x0f16, X, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
+{"movlps", 2, 0x0f12, X, FP|Modrm, { LLongMem, RegXMM, 0 } },
+{"movlps", 2, 0x0f13, X, FP|Modrm, { RegXMM, LLongMem, 0 } },
+{"movmskps", 2, 0x0f50, X, FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
+{"movntps", 2, 0x0f2b, X, FP|Modrm, { RegXMM, LLongMem, 0 } },
+{"movntq", 2, 0x0fe7, X, FP|Modrm, { RegMMX, LLongMem, 0 } },
+{"movss", 2, 0xf30f10, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"movss", 2, 0xf30f11, X, FP|Modrm, { RegXMM, RegXMM|WordMem, 0 } },
+{"movups", 2, 0x0f10, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"movups", 2, 0x0f11, X, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
+{"mulps", 2, 0x0f59, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"mulss", 2, 0xf30f59, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"orps", 2, 0x0f56, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"pavgb", 2, 0x0fe0, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pavgw", 2, 0x0fe3, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pextrw", 3, 0x0fc5, X, FP|Modrm, { Imm8, RegMMX, Reg32|InvMem } },
+{"pinsrw", 3, 0x0fc4, X, FP|Modrm, { Imm8, Reg32|ShortMem, RegMMX } },
+{"pmaxsw", 2, 0x0fee, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pmaxub", 2, 0x0fde, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pminsw", 2, 0x0fea, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pminub", 2, 0x0fda, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pmovmskb", 2, 0x0fd7, X, FP|Modrm, { RegMMX, Reg32|InvMem, 0 } },
+{"pmulhuw", 2, 0x0fe4, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"prefetchnta", 1, 0x0f18, 0, FP|Modrm, { LLongMem, 0, 0 } },
+{"prefetcht0", 1, 0x0f18, 1, FP|Modrm, { LLongMem, 0, 0 } },
+{"prefetcht1", 1, 0x0f18, 2, FP|Modrm, { LLongMem, 0, 0 } },
+{"prefetcht2", 1, 0x0f18, 3, FP|Modrm, { LLongMem, 0, 0 } },
+{"psadbw", 2, 0x0ff6, X, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
+{"pshufw", 3, 0x0f70, X, FP|Modrm, { Imm8, RegMMX|LLongMem, RegMMX } },
+{"rcpps", 2, 0x0f53, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"rcpss", 2, 0xf30f53, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"rsqrtps", 2, 0x0f52, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"rsqrtss", 2, 0xf30f52, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"sfence", 0, 0x0faef8, X, FP, { 0, 0, 0 } },
+{"shufps", 3, 0x0fc6, X, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
+{"sqrtps", 2, 0x0f51, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"sqrtss", 2, 0xf30f51, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"stmxcsr", 1, 0x0fae, 3, FP|Modrm, { WordMem, 0, 0 } },
+{"subps", 2, 0x0f5c, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"subss", 2, 0xf30f5c, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"ucomiss", 2, 0x0f2e, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
+{"unpckhps", 2, 0x0f15, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"unpcklps", 2, 0x0f14, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"xorps", 2, 0x0f57, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+
+/* AMD 3DNow! instructions. */
+
+{"prefetch", 1, 0x0f0d, 0, FP|Modrm, { ByteMem, 0, 0 } },
+{"prefetchw",1, 0x0f0d, 1, FP|Modrm, { ByteMem, 0, 0 } },
+{"femms", 0, 0x0f0e, X, FP, { 0, 0, 0 } },
+{"pavgusb", 2, 0x0f0f, 0xbf, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pf2id", 2, 0x0f0f, 0x1d, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pf2iw", 2, 0x0f0f, 0x1c, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
+{"pfacc", 2, 0x0f0f, 0xae, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfadd", 2, 0x0f0f, 0x9e, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfcmpeq", 2, 0x0f0f, 0xb0, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfcmpge", 2, 0x0f0f, 0x90, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfcmpgt", 2, 0x0f0f, 0xa0, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfmax", 2, 0x0f0f, 0xa4, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfmin", 2, 0x0f0f, 0x94, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfmul", 2, 0x0f0f, 0xb4, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfnacc", 2, 0x0f0f, 0x8a, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
+{"pfpnacc", 2, 0x0f0f, 0x8e, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
+{"pfrcp", 2, 0x0f0f, 0x96, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfrcpit1", 2, 0x0f0f, 0xa6, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfrcpit2", 2, 0x0f0f, 0xb6, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfrsqit1", 2, 0x0f0f, 0xa7, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfrsqrt", 2, 0x0f0f, 0x97, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfsub", 2, 0x0f0f, 0x9a, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pfsubr", 2, 0x0f0f, 0xaa, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pi2fd", 2, 0x0f0f, 0x0d, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pi2fw", 2, 0x0f0f, 0x0c, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
+{"pmulhrw", 2, 0x0f0f, 0xb7, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"pswapd", 2, 0x0f0f, 0xbb, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } }, /* Athlon */
+
+{NULL, 0, 0, 0, 0, { 0, 0, 0} } /* sentinel */
+};
+#undef X
+#undef NoSuf
+#undef b_Suf
+#undef w_Suf
+#undef l_Suf
+#undef d_Suf
+#undef x_Suf
+#undef bw_Suf
+#undef bl_Suf
+#undef wl_Suf
+#undef sl_Suf
+#undef sld_Suf
+#undef sldx_Suf
+#undef bwl_Suf
+#undef bwld_Suf
+#undef FP
+#undef l_FP
+#undef d_FP
+#undef x_FP
+#undef sl_FP
+#undef sld_FP
+#undef sldx_FP
+
+#define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */
+
+
+/* 386 register table. */
static const reg_entry i386_regtab[] = {
+ /* make %st first as we test for it */
+ {"st", FloatReg|FloatAcc, 0},
/* 8 bit regs */
- {"al", Reg8|Acc, 0}, {"cl", Reg8|ShiftCount, 1}, {"dl", Reg8, 2},
+ {"al", Reg8|Acc, 0},
+ {"cl", Reg8|ShiftCount, 1},
+ {"dl", Reg8, 2},
{"bl", Reg8, 3},
- {"ah", Reg8, 4}, {"ch", Reg8, 5}, {"dh", Reg8, 6}, {"bh", Reg8, 7},
+ {"ah", Reg8, 4},
+ {"ch", Reg8, 5},
+ {"dh", Reg8, 6},
+ {"bh", Reg8, 7},
/* 16 bit regs */
- {"ax", Reg16|Acc, 0}, {"cx", Reg16, 1}, {"dx", Reg16|InOutPortReg, 2}, {"bx", Reg16, 3},
- {"sp", Reg16, 4}, {"bp", Reg16, 5}, {"si", Reg16, 6}, {"di", Reg16, 7},
+ {"ax", Reg16|Acc, 0},
+ {"cx", Reg16, 1},
+ {"dx", Reg16|InOutPortReg, 2},
+ {"bx", Reg16|BaseIndex, 3},
+ {"sp", Reg16, 4},
+ {"bp", Reg16|BaseIndex, 5},
+ {"si", Reg16|BaseIndex, 6},
+ {"di", Reg16|BaseIndex, 7},
/* 32 bit regs */
- {"eax", Reg32|Acc, 0}, {"ecx", Reg32, 1}, {"edx", Reg32, 2}, {"ebx", Reg32, 3},
- {"esp", Reg32, 4}, {"ebp", Reg32, 5}, {"esi", Reg32, 6}, {"edi", Reg32, 7},
+ {"eax", Reg32|BaseIndex|Acc, 0},
+ {"ecx", Reg32|BaseIndex, 1},
+ {"edx", Reg32|BaseIndex, 2},
+ {"ebx", Reg32|BaseIndex, 3},
+ {"esp", Reg32, 4},
+ {"ebp", Reg32|BaseIndex, 5},
+ {"esi", Reg32|BaseIndex, 6},
+ {"edi", Reg32|BaseIndex, 7},
/* segment registers */
- {"es", SReg2, 0}, {"cs", SReg2, 1}, {"ss", SReg2, 2},
- {"ds", SReg2, 3}, {"fs", SReg3, 4}, {"gs", SReg3, 5},
+ {"es", SReg2, 0},
+ {"cs", SReg2, 1},
+ {"ss", SReg2, 2},
+ {"ds", SReg2, 3},
+ {"fs", SReg3, 4},
+ {"gs", SReg3, 5},
/* control registers */
- {"cr0", Control, 0}, {"cr2", Control, 2}, {"cr3", Control, 3},
+ {"cr0", Control, 0},
+ {"cr1", Control, 1},
+ {"cr2", Control, 2},
+ {"cr3", Control, 3},
{"cr4", Control, 4},
+ {"cr5", Control, 5},
+ {"cr6", Control, 6},
+ {"cr7", Control, 7},
/* debug registers */
- {"db0", Debug, 0}, {"db1", Debug, 1}, {"db2", Debug, 2},
- {"db3", Debug, 3}, {"db6", Debug, 6}, {"db7", Debug, 7},
- {"dr0", Debug, 0}, {"dr1", Debug, 1}, {"dr2", Debug, 2},
- {"dr3", Debug, 3}, {"dr6", Debug, 6}, {"dr7", Debug, 7},
+ {"db0", Debug, 0},
+ {"db1", Debug, 1},
+ {"db2", Debug, 2},
+ {"db3", Debug, 3},
+ {"db4", Debug, 4},
+ {"db5", Debug, 5},
+ {"db6", Debug, 6},
+ {"db7", Debug, 7},
+ {"dr0", Debug, 0},
+ {"dr1", Debug, 1},
+ {"dr2", Debug, 2},
+ {"dr3", Debug, 3},
+ {"dr4", Debug, 4},
+ {"dr5", Debug, 5},
+ {"dr6", Debug, 6},
+ {"dr7", Debug, 7},
/* test registers */
- {"tr3", Test, 3}, {"tr4", Test, 4}, {"tr5", Test, 5},
- {"tr6", Test, 6}, {"tr7", Test, 7},
- /* float registers */
+ {"tr0", Test, 0},
+ {"tr1", Test, 1},
+ {"tr2", Test, 2},
+ {"tr3", Test, 3},
+ {"tr4", Test, 4},
+ {"tr5", Test, 5},
+ {"tr6", Test, 6},
+ {"tr7", Test, 7},
+ /* mmx and simd registers */
+ {"mm0", RegMMX, 0},
+ {"mm1", RegMMX, 1},
+ {"mm2", RegMMX, 2},
+ {"mm3", RegMMX, 3},
+ {"mm4", RegMMX, 4},
+ {"mm5", RegMMX, 5},
+ {"mm6", RegMMX, 6},
+ {"mm7", RegMMX, 7},
+ {"xmm0", RegXMM, 0},
+ {"xmm1", RegXMM, 1},
+ {"xmm2", RegXMM, 2},
+ {"xmm3", RegXMM, 3},
+ {"xmm4", RegXMM, 4},
+ {"xmm5", RegXMM, 5},
+ {"xmm6", RegXMM, 6},
+ {"xmm7", RegXMM, 7}
+};
+
+static const reg_entry i386_float_regtab[] = {
{"st(0)", FloatReg|FloatAcc, 0},
- {"st", FloatReg|FloatAcc, 0},
- {"st(1)", FloatReg, 1}, {"st(2)", FloatReg, 2},
- {"st(3)", FloatReg, 3}, {"st(4)", FloatReg, 4}, {"st(5)", FloatReg, 5},
- {"st(6)", FloatReg, 6}, {"st(7)", FloatReg, 7},
- {"mm0", RegMMX, 0}, {"mm1", RegMMX, 1}, {"mm2", RegMMX, 2},
- {"mm3", RegMMX, 3}, {"mm4", RegMMX, 4}, {"mm5", RegMMX, 5},
- {"mm6", RegMMX, 6}, {"mm7", RegMMX, 7}
+ {"st(1)", FloatReg, 1},
+ {"st(2)", FloatReg, 2},
+ {"st(3)", FloatReg, 3},
+ {"st(4)", FloatReg, 4},
+ {"st(5)", FloatReg, 5},
+ {"st(6)", FloatReg, 6},
+ {"st(7)", FloatReg, 7}
};
#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
-static const reg_entry *const i386_regtab_end
- = i386_regtab + sizeof(i386_regtab)/sizeof(i386_regtab[0]);
-
/* segment stuff */
static const seg_entry cs = { "cs", 0x2e };
static const seg_entry ds = { "ds", 0x3e };
@@ -928,54 +1188,5 @@ static const seg_entry ss = { "ss", 0x36 };
static const seg_entry es = { "es", 0x26 };
static const seg_entry fs = { "fs", 0x64 };
static const seg_entry gs = { "gs", 0x65 };
-static const seg_entry null = { "", 0x0 };
-
-/*
- This table is used to store the default segment register implied by all
- possible memory addressing modes.
- It is indexed by the mode & modrm entries of the modrm byte as follows:
- index = (mode<<3) | modrm;
-*/
-static const seg_entry *const one_byte_segment_defaults[] = {
- /* mode 0 */
- &ds, &ds, &ds, &ds, &null, &ds, &ds, &ds,
- /* mode 1 */
- &ds, &ds, &ds, &ds, &null, &ss, &ds, &ds,
- /* mode 2 */
- &ds, &ds, &ds, &ds, &null, &ss, &ds, &ds,
- /* mode 3 --- not a memory reference; never referenced */
-};
-
-static const seg_entry *const two_byte_segment_defaults[] = {
- /* mode 0 */
- &ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
- /* mode 1 */
- &ds, &ds, &ds, &ds, &ss, &ss, &ds, &ds,
- /* mode 2 */
- &ds, &ds, &ds, &ds, &ss, &ss, &ds, &ds,
- /* mode 3 --- not a memory reference; never referenced */
-};
-
-static const prefix_entry i386_prefixtab[] = {
-#define ADDR_PREFIX_OPCODE 0x67
- { "addr16", 0x67 }, /* address size prefix ==> 16bit addressing
- * (How is this useful?) */
-#define WORD_PREFIX_OPCODE 0x66
- { "data16", 0x66 }, /* operand size prefix */
- { "lock", 0xf0 }, /* bus lock prefix */
- { "wait", 0x9b }, /* wait for coprocessor */
- { "cs", 0x2e }, { "ds", 0x3e }, /* segment overrides ... */
- { "es", 0x26 }, { "fs", 0x64 },
- { "gs", 0x65 }, { "ss", 0x36 },
-/* REPE & REPNE used to detect rep/repne with a non-string instruction */
-#define REPNE 0xf2
-#define REPE 0xf3
- { "rep", 0xf3 }, /* repeat string instructions */
- { "repe", 0xf3 }, { "repz", 0xf3 },
- { "repne", 0xf2 }, { "repnz", 0xf2 }
-};
-
-static const prefix_entry *const i386_prefixtab_end
- = i386_prefixtab + sizeof(i386_prefixtab)/sizeof(i386_prefixtab[0]);
-/* end of i386-opcode.h */
+/* end of opcode/i386.h */
diff --git a/contrib/binutils/include/opcode/mips.h b/contrib/binutils/include/opcode/mips.h
index ee5ee82..68fe57a 100644
--- a/contrib/binutils/include/opcode/mips.h
+++ b/contrib/binutils/include/opcode/mips.h
@@ -47,7 +47,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
A breakpoint instruction uses OP, CODE and SPEC (10 bits of the
breakpoint instruction are not defined; Kane says the breakpoint
code field in BREAK is 20 bits; yet MIPS assemblers and debuggers
- only use ten bits).
+ only use ten bits). An optional two-operand form of break/sdbbp
+ allows the lower ten bits to be set too.
The syscall instruction uses SYSCALL.
@@ -65,6 +66,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define OP_SH_BCC 18
#define OP_MASK_CODE 0x3ff
#define OP_SH_CODE 16
+#define OP_MASK_CODE2 0x3ff
+#define OP_SH_CODE2 6
#define OP_MASK_RT 0x1f
#define OP_SH_RT 16
#define OP_MASK_FT 0x1f
@@ -171,6 +174,7 @@ struct mips_opcode
"k" 5 bit cache opcode in target register position (OP_*_CACHE)
"o" 16 bit signed offset (OP_*_DELTA)
"p" 16 bit PC relative branch target address (OP_*_DELTA)
+ "q" 10 bit extra breakpoint code (OP_*_CODE2)
"r" 5 bit same register used as both source and target (OP_*_RS)
"s" 5 bit source register specifier (OP_*_RS)
"t" 5 bit target register (OP_*_RT)
@@ -212,7 +216,7 @@ struct mips_opcode
Characters used so far, for quick reference when adding more:
"<>(),"
"ABCDEFGILMNSTRVW"
- "abcdfhijkloprstuvwxz"
+ "abcdfhijklopqrstuvwxz"
*/
/* These are the bits which may be set in the pinfo field of an
@@ -278,8 +282,10 @@ struct mips_opcode
#define FP_S 0x10000000
/* Instruction uses double precision floating point. */
#define FP_D 0x20000000
-
-/* As yet unused bits: 0x40000000 */
+/* Instruction is part of the tx39's integer multiply family. */
+#define INSN_MULT 0x40000000
+/* Instruction synchronize shared memory. */
+#define INSN_SYNC 0x80000000
/* Instruction is actually a macro. It should be ignored by the
disassembler, and requires special treatment by the assembler. */
@@ -302,6 +308,7 @@ struct mips_opcode
#define INSN_ISA3 0x00000003
/* MIPS ISA 4 instruction (R8000). */
#define INSN_ISA4 0x00000004
+#define INSN_ISA5 0x00000005
/* Chip specific instructions. These are bitmasks. */
/* MIPS R4650 instruction. */
@@ -313,6 +320,31 @@ struct mips_opcode
/* Toshiba R3900 instruction. */
#define INSN_3900 0x00000080
+/* 32-bit code running on a ISA3+ CPU. */
+#define INSN_GP32 0x00001000
+
+/* Test for membership in an ISA including chip specific ISAs.
+ INSN is pointer to an element of the opcode table; ISA is the
+ specified ISA to test against; and CPU is the CPU specific ISA
+ to test, or zero if no CPU specific ISA test is desired.
+ The gp32 arg is set when you need to force 32-bit register usage on
+ a machine with 64-bit registers; see the documentation under -mgp32
+ in the MIPS gas docs. */
+
+#define OPCODE_IS_MEMBER(insn,isa,cpu,gp32) \
+ ((((insn)->membership & INSN_ISA) != 0 \
+ && ((insn)->membership & INSN_ISA) <= isa \
+ && ((insn)->membership & INSN_GP32 ? gp32 : 1)) \
+ || (cpu == 4650 \
+ && ((insn)->membership & INSN_4650) != 0) \
+ || (cpu == 4010 \
+ && ((insn)->membership & INSN_4010) != 0) \
+ || ((cpu == 4100 \
+ || cpu == 4111 \
+ ) \
+ && ((insn)->membership & INSN_4100) != 0) \
+ || (cpu == 3900 \
+ && ((insn)->membership & INSN_3900) != 0))
/* This is a list of macro expanded instructions.
*
@@ -695,6 +727,8 @@ extern int bfd_mips_num_opcodes;
#define MIPS16_INSN_READ_PC 0x00002000
/* Reads the general purpose register in MIPS16OP_*_REGR32. */
#define MIPS16_INSN_READ_GPR_X 0x00004000
+/* Is a branch insn. */
+#define MIPS16_INSN_BRANCH 0x00010000
/* The following flags have the same value for the mips16 opcode
table:
diff --git a/contrib/binutils/include/opcode/ppc.h b/contrib/binutils/include/opcode/ppc.h
new file mode 100644
index 0000000..974f0dfa
--- /dev/null
+++ b/contrib/binutils/include/opcode/ppc.h
@@ -0,0 +1,251 @@
+/* ppc.h -- Header file for PowerPC opcode table
+ Copyright 1994, 1995 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support
+
+This file is part of GDB, GAS, and the GNU binutils.
+
+GDB, GAS, and the GNU binutils are free software; you can redistribute
+them and/or modify them under the terms of the GNU General Public
+License as published by the Free Software Foundation; either version
+1, or (at your option) any later version.
+
+GDB, GAS, and the GNU binutils are distributed in the hope that they
+will be useful, but WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this file; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef PPC_H
+#define PPC_H
+
+/* The opcode table is an array of struct powerpc_opcode. */
+
+struct powerpc_opcode
+{
+ /* The opcode name. */
+ const char *name;
+
+ /* The opcode itself. Those bits which will be filled in with
+ operands are zeroes. */
+ unsigned long opcode;
+
+ /* The opcode mask. This is used by the disassembler. This is a
+ mask containing ones indicating those bits which must match the
+ opcode field, and zeroes indicating those bits which need not
+ match (and are presumably filled in by operands). */
+ unsigned long mask;
+
+ /* One bit flags for the opcode. These are used to indicate which
+ specific processors support the instructions. The defined values
+ are listed below. */
+ unsigned long flags;
+
+ /* An array of operand codes. Each code is an index into the
+ operand table. They appear in the order which the operands must
+ appear in assembly code, and are terminated by a zero. */
+ unsigned char operands[8];
+};
+
+/* The table itself is sorted by major opcode number, and is otherwise
+ in the order in which the disassembler should consider
+ instructions. */
+extern const struct powerpc_opcode powerpc_opcodes[];
+extern const int powerpc_num_opcodes;
+
+/* Values defined for the flags field of a struct powerpc_opcode. */
+
+/* Opcode is defined for the PowerPC architecture. */
+#define PPC_OPCODE_PPC (01)
+
+/* Opcode is defined for the POWER (RS/6000) architecture. */
+#define PPC_OPCODE_POWER (02)
+
+/* Opcode is defined for the POWER2 (Rios 2) architecture. */
+#define PPC_OPCODE_POWER2 (04)
+
+/* Opcode is only defined on 32 bit architectures. */
+#define PPC_OPCODE_32 (010)
+
+/* Opcode is only defined on 64 bit architectures. */
+#define PPC_OPCODE_64 (020)
+
+/* Opcode is supported by the Motorola PowerPC 601 processor. The 601
+ is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
+ but it also supports many additional POWER instructions. */
+#define PPC_OPCODE_601 (040)
+
+/* Opcode is supported in both the Power and PowerPC architectures
+ (ie, compiler's -mcpu=common or assembler's -mcom). */
+#define PPC_OPCODE_COMMON (0100)
+
+/* Opcode is supported for any Power or PowerPC platform (this is
+ for the assembler's -many option, and it eliminates duplicates). */
+#define PPC_OPCODE_ANY (0200)
+
+/* Opcode is supported as part of the 64-bit bridge. */
+#define PPC_OPCODE_64_BRIDGE (0400)
+
+/* A macro to extract the major opcode from an instruction. */
+#define PPC_OP(i) (((i) >> 26) & 0x3f)
+
+/* The operands table is an array of struct powerpc_operand. */
+
+struct powerpc_operand
+{
+ /* The number of bits in the operand. */
+ int bits;
+
+ /* How far the operand is left shifted in the instruction. */
+ int shift;
+
+ /* Insertion function. This is used by the assembler. To insert an
+ operand value into an instruction, check this field.
+
+ If it is NULL, execute
+ i |= (op & ((1 << o->bits) - 1)) << o->shift;
+ (i is the instruction which we are filling in, o is a pointer to
+ this structure, and op is the opcode value; this assumes twos
+ complement arithmetic).
+
+ If this field is not NULL, then simply call it with the
+ instruction and the operand value. It will return the new value
+ of the instruction. If the ERRMSG argument is not NULL, then if
+ the operand value is illegal, *ERRMSG will be set to a warning
+ string (the operand will be inserted in any case). If the
+ operand value is legal, *ERRMSG will be unchanged (most operands
+ can accept any value). */
+ unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
+ const char **errmsg));
+
+ /* Extraction function. This is used by the disassembler. To
+ extract this operand type from an instruction, check this field.
+
+ If it is NULL, compute
+ op = ((i) >> o->shift) & ((1 << o->bits) - 1);
+ if ((o->flags & PPC_OPERAND_SIGNED) != 0
+ && (op & (1 << (o->bits - 1))) != 0)
+ op -= 1 << o->bits;
+ (i is the instruction, o is a pointer to this structure, and op
+ is the result; this assumes twos complement arithmetic).
+
+ If this field is not NULL, then simply call it with the
+ instruction value. It will return the value of the operand. If
+ the INVALID argument is not NULL, *INVALID will be set to
+ non-zero if this operand type can not actually be extracted from
+ this operand (i.e., the instruction does not match). If the
+ operand is valid, *INVALID will not be changed. */
+ long (*extract) PARAMS ((unsigned long instruction, int *invalid));
+
+ /* One bit syntax flags. */
+ unsigned long flags;
+};
+
+/* Elements in the table are retrieved by indexing with values from
+ the operands field of the powerpc_opcodes table. */
+
+extern const struct powerpc_operand powerpc_operands[];
+
+/* Values defined for the flags field of a struct powerpc_operand. */
+
+/* This operand takes signed values. */
+#define PPC_OPERAND_SIGNED (01)
+
+/* This operand takes signed values, but also accepts a full positive
+ range of values when running in 32 bit mode. That is, if bits is
+ 16, it takes any value from -0x8000 to 0xffff. In 64 bit mode,
+ this flag is ignored. */
+#define PPC_OPERAND_SIGNOPT (02)
+
+/* This operand does not actually exist in the assembler input. This
+ is used to support extended mnemonics such as mr, for which two
+ operands fields are identical. The assembler should call the
+ insert function with any op value. The disassembler should call
+ the extract function, ignore the return value, and check the value
+ placed in the valid argument. */
+#define PPC_OPERAND_FAKE (04)
+
+/* The next operand should be wrapped in parentheses rather than
+ separated from this one by a comma. This is used for the load and
+ store instructions which want their operands to look like
+ reg,displacement(reg)
+ */
+#define PPC_OPERAND_PARENS (010)
+
+/* This operand may use the symbolic names for the CR fields, which
+ are
+ lt 0 gt 1 eq 2 so 3 un 3
+ cr0 0 cr1 1 cr2 2 cr3 3
+ cr4 4 cr5 5 cr6 6 cr7 7
+ These may be combined arithmetically, as in cr2*4+gt. These are
+ only supported on the PowerPC, not the POWER. */
+#define PPC_OPERAND_CR (020)
+
+/* This operand names a register. The disassembler uses this to print
+ register names with a leading 'r'. */
+#define PPC_OPERAND_GPR (040)
+
+/* This operand names a floating point register. The disassembler
+ prints these with a leading 'f'. */
+#define PPC_OPERAND_FPR (0100)
+
+/* This operand is a relative branch displacement. The disassembler
+ prints these symbolically if possible. */
+#define PPC_OPERAND_RELATIVE (0200)
+
+/* This operand is an absolute branch address. The disassembler
+ prints these symbolically if possible. */
+#define PPC_OPERAND_ABSOLUTE (0400)
+
+/* This operand is optional, and is zero if omitted. This is used for
+ the optional BF and L fields in the comparison instructions. The
+ assembler must count the number of operands remaining on the line,
+ and the number of operands remaining for the opcode, and decide
+ whether this operand is present or not. The disassembler should
+ print this operand out only if it is not zero. */
+#define PPC_OPERAND_OPTIONAL (01000)
+
+/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand
+ is omitted, then for the next operand use this operand value plus
+ 1, ignoring the next operand field for the opcode. This wretched
+ hack is needed because the Power rotate instructions can take
+ either 4 or 5 operands. The disassembler should print this operand
+ out regardless of the PPC_OPERAND_OPTIONAL field. */
+#define PPC_OPERAND_NEXT (02000)
+
+/* This operand should be regarded as a negative number for the
+ purposes of overflow checking (i.e., the normal most negative
+ number is disallowed and one more than the normal most positive
+ number is allowed). This flag will only be set for a signed
+ operand. */
+#define PPC_OPERAND_NEGATIVE (04000)
+
+/* The POWER and PowerPC assemblers use a few macros. We keep them
+ with the operands table for simplicity. The macro table is an
+ array of struct powerpc_macro. */
+
+struct powerpc_macro
+{
+ /* The macro name. */
+ const char *name;
+
+ /* The number of operands the macro takes. */
+ unsigned int operands;
+
+ /* One bit flags for the opcode. These are used to indicate which
+ specific processors support the instructions. The values are the
+ same as those for the struct powerpc_opcode flags field. */
+ unsigned long flags;
+
+ /* A format string to turn the macro into a normal instruction.
+ Each %N in the string is replaced with operand number N (zero
+ based). */
+ const char *format;
+};
+
+extern const struct powerpc_macro powerpc_macros[];
+extern const int powerpc_num_macros;
+
+#endif /* PPC_H */
diff --git a/contrib/binutils/include/opcode/v850.h b/contrib/binutils/include/opcode/v850.h
index 0c10ade..88916f1 100644
--- a/contrib/binutils/include/opcode/v850.h
+++ b/contrib/binutils/include/opcode/v850.h
@@ -56,6 +56,9 @@ struct v850_opcode
/* Values for the processors field in the v850_opcode structure. */
#define PROCESSOR_V850 (1 << 0) /* Just the V850. */
#define PROCESSOR_ALL -1 /* Any processor. */
+#define PROCESSOR_V850E (1 << 1) /* Just the V850E. */
+#define PROCESSOR_NOT_V850 (~ PROCESSOR_V850) /* Any processor except the V850. */
+#define PROCESSOR_V850EA (1 << 2) /* Just the V850EA. */
/* The table itself is sorted by major opcode number, and is otherwise
in the order in which the disassembler should consider
@@ -150,5 +153,14 @@ extern const struct v850_operand v850_operands[];
/* The register specified must not be r0 */
#define V850_NOT_R0 0x80
+/* CYGNUS LOCAL v850e */
+/* push/pop type instruction, V850E specific. */
+#define V850E_PUSH_POP 0x100
+
+/* 16 bit immediate follows instruction, V850E specific. */
+#define V850E_IMMEDIATE16 0x200
+
+/* 32 bit immediate follows instruction, V850E specific. */
+#define V850E_IMMEDIATE32 0x400
#endif /* V850_H */
diff --git a/contrib/binutils/include/partition.h b/contrib/binutils/include/partition.h
new file mode 100644
index 0000000..f49d67a
--- /dev/null
+++ b/contrib/binutils/include/partition.h
@@ -0,0 +1,81 @@
+/* List implentation of a partition of consecutive integers.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by CodeSourcery, LLC.
+
+ This file is part of GNU CC.
+
+ GNU CC 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.
+
+ GNU CC 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 GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This package implements a partition of consecutive integers. The
+ elements are partitioned into classes. Each class is represented
+ by one of its elements, the canonical element, which is chosen
+ arbitrarily from elements in the class. The principal operations
+ on a partition are FIND, which takes an element, determines its
+ class, and returns the canonical element for that class, and UNION,
+ which unites the two classes that contain two given elements into a
+ single class.
+
+ The list implementation used here provides constant-time finds. By
+ storing the size of each class with the class's canonical element,
+ it is able to perform unions over all the classes in the partition
+ in O (N log N) time. */
+
+#ifndef _PARTITION_H
+#define _PARTITION_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <ansidecl.h>
+#include <stdio.h>
+
+struct partition_elem
+{
+ /* The canonical element that represents the class containing this
+ element. */
+ int class_element;
+ /* The next element in this class. Elements in each class form a
+ circular list. */
+ struct partition_elem* next;
+ /* The number of elements in this class. Valid only if this is the
+ canonical element for its class. */
+ unsigned class_count;
+};
+
+typedef struct partition_def
+{
+ /* The number of elements in this partition. */
+ int num_elements;
+ /* The elements in the partition. */
+ struct partition_elem elements[1];
+} *partition;
+
+extern partition partition_new PARAMS((int));
+extern void partition_delete PARAMS((partition));
+extern int partition_union PARAMS((partition,
+ int,
+ int));
+extern void partition_print PARAMS((partition,
+ FILE*));
+
+/* Returns the canonical element corresponding to the class containing
+ ELEMENT__ in PARTITION__. */
+
+#define partition_find(partition__, element__) \
+ ((partition__)->elements[(element__)].class_element)
+
+#endif /* _PARTITION_H */
diff --git a/contrib/binutils/include/remote-sim.h b/contrib/binutils/include/remote-sim.h
index a4480b4..b32f93f 100644
--- a/contrib/binutils/include/remote-sim.h
+++ b/contrib/binutils/include/remote-sim.h
@@ -211,7 +211,27 @@ int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int
void sim_info PARAMS ((SIM_DESC sd, int verbose));
-/* Run (or resume) the simulated program. */
+/* Run (or resume) the simulated program.
+
+ STEP, when non-zero indicates that only a single simulator cycle
+ should be emulated.
+
+ SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
+ event (hardware interrupt, signal) to be delivered to the simulated
+ program.
+
+ Hardware simulator: If the SIGRC value returned by
+ sim_stop_reason() is passed back to the simulator via SIGGNAL then
+ the hardware simulator shall correctly deliver the hardware event
+ indicated by that signal. If a value of zero is passed in then the
+ simulation will continue as if there were no outstanding signal.
+ The effect of any other SIGGNAL value is is implementation
+ dependant.
+
+ Process simulator: If SIGRC is non-zero then the corresponding
+ signal is delivered to the simulated program and execution is then
+ continued. A zero SIGRC value indicates that the program should
+ continue as normal. */
void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
@@ -234,13 +254,13 @@ int sim_stop PARAMS ((SIM_DESC sd));
(SIGTRAP); a completed single step (SIGTRAP); an internal error
condition (SIGABRT); an illegal instruction (SIGILL); Access to an
undefined memory region (SIGSEGV); Mis-aligned memory access
- (SIGBUS).
+ (SIGBUS). For some signals information in addition to the signal
+ number may be retained by the simulator (e.g. offending address),
+ that information is not directly accessable via this interface.
- SIM_SIGNALLED: The program has stopped. The simulator has
- encountered target code that requires the (HOST) signal SIGRC to be
- delivered to the simulated program. Ex: `kill (getpid (),
- TARGET_SIGxxx)'. Where TARGET_SIGxxx has been translated into a
- host signal. FIXME: This is not always possible..
+ SIM_SIGNALLED: The program has been terminated by a signal. The
+ simulator has encountered target code that causes the the program
+ to exit with signal SIGRC.
SIM_RUNNING, SIM_POLLING: The return of one of these values
indicates a problem internal to the simulator. */
@@ -288,15 +308,27 @@ void sim_set_callbacks PARAMS ((struct host_callback_struct *));
void sim_size PARAMS ((int i));
-/* Run a simulation with tracing enabled.
+/* Single-step simulator with tracing enabled.
THIS PROCEDURE IS DEPRECIATED.
+ THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
+ This procedure returns: ``0'' indicating that the simulator should
+ be continued using sim_trace() calls; ``1'' indicating that the
+ simulation has finished. */
int sim_trace PARAMS ((SIM_DESC sd));
+/* Enable tracing.
+ THIS PROCEDURE IS DEPRECIATED.
+ GDB and NRUN do not use this interface.
+ This procedure returns: ``0'' indicating that the simulator should
+ be continued using sim_trace() calls; ``1'' indicating that the
+ simulation has finished. */
+
+void sim_set_trace PARAMS ((void));
+
+
/* Configure the size of the profile buffer.
THIS PROCEDURE IS DEPRECIATED.
GDB and NRUN do not use this interface.
diff --git a/contrib/binutils/include/splay-tree.h b/contrib/binutils/include/splay-tree.h
new file mode 100644
index 0000000..6d70c8d
--- /dev/null
+++ b/contrib/binutils/include/splay-tree.h
@@ -0,0 +1,117 @@
+/* A splay-tree datatype.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ Contributed by Mark Mitchell (mark@markmitchell.com).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* For an easily readable description of splay-trees, see:
+
+ Lewis, Harry R. and Denenberg, Larry. Data Structures and Their
+ Algorithms. Harper-Collins, Inc. 1991.
+
+ The major feature of splay trees is that all basic tree operations
+ are amortized O(log n) time for a tree with n nodes. */
+
+#ifndef _SPLAY_TREE_H
+#define _SPLAY_TREE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <ansidecl.h>
+
+/* Use typedefs for the key and data types to facilitate changing
+ these types, if necessary. These types should be sufficiently wide
+ that any pointer or scalar can be cast to these types, and then
+ cast back, without loss of precision. */
+typedef unsigned long int splay_tree_key;
+typedef unsigned long int splay_tree_value;
+
+/* Forward declaration for a node in the tree. */
+typedef struct splay_tree_node_s *splay_tree_node;
+
+/* The type of a function which compares two splay-tree keys. The
+ function should return values as for qsort. */
+typedef int (*splay_tree_compare_fn) PARAMS((splay_tree_key, splay_tree_key));
+
+/* The type of a function used to deallocate any resources associated
+ with the key. */
+typedef void (*splay_tree_delete_key_fn) PARAMS((splay_tree_key));
+
+/* The type of a function used to deallocate any resources associated
+ with the value. */
+typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
+
+/* The type of a function used to iterate over the tree. */
+typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
+
+/* The nodes in the splay tree. */
+struct splay_tree_node_s
+{
+ /* The key. */
+ splay_tree_key key;
+
+ /* The value. */
+ splay_tree_value value;
+
+ /* The left and right children, respectively. */
+ splay_tree_node left;
+ splay_tree_node right;
+};
+
+/* The splay tree itself. */
+typedef struct splay_tree_s
+{
+ /* The root of the tree. */
+ splay_tree_node root;
+
+ /* The comparision function. */
+ splay_tree_compare_fn comp;
+
+ /* The deallocate-key function. NULL if no cleanup is necessary. */
+ splay_tree_delete_key_fn delete_key;
+
+ /* The deallocate-value function. NULL if no cleanup is necessary. */
+ splay_tree_delete_value_fn delete_value;
+} *splay_tree;
+
+extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
+ splay_tree_delete_key_fn,
+ splay_tree_delete_value_fn));
+extern void splay_tree_delete PARAMS((splay_tree));
+extern splay_tree_node splay_tree_insert
+ PARAMS((splay_tree,
+ splay_tree_key,
+ splay_tree_value));
+extern splay_tree_node splay_tree_lookup
+ PARAMS((splay_tree,
+ splay_tree_key));
+extern int splay_tree_foreach PARAMS((splay_tree,
+ splay_tree_foreach_fn,
+ void*));
+extern int splay_tree_compare_ints PARAMS((splay_tree_key,
+ splay_tree_key));
+extern int splay_tree_compare_pointers PARAMS((splay_tree_key,
+ splay_tree_key));
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _SPLAY_TREE_H */
diff --git a/contrib/binutils/include/symcat.h b/contrib/binutils/include/symcat.h
index 01efada..3e27162 100644
--- a/contrib/binutils/include/symcat.h
+++ b/contrib/binutils/include/symcat.h
@@ -1,6 +1,6 @@
/* Symbol concatenation utilities.
- Copyright (C) 1998, Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
#define CONCAT2(a,b) a/**/b
#define CONCAT3(a,b,c) a/**/b/**/c
#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
-#define STRINGX(s) "?"
+#define STRINGX(s) "s"
#endif
#define XCONCAT2(a,b) CONCAT2(a,b)
diff --git a/contrib/binutils/install-sh b/contrib/binutils/install-sh
index 853408c..e9de238 100755
--- a/contrib/binutils/install-sh
+++ b/contrib/binutils/install-sh
@@ -53,9 +53,6 @@ mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
-# CYGNUS LOCAL: exeext variable
-exeext=""
-# END CYGNUS LOCAL
while [ x"$1" != x ]; do
case $1 in
@@ -94,16 +91,6 @@ while [ x"$1" != x ]; do
shift
continue;;
- # CYGNUS LOCAL: -x option
- -x=*) exeext=`echo $1 | sed 's/-x=//'`
- shift
- continue;;
-
- -x) exeext=".exe"
- shift
- continue;;
- # END CYGNUS LOCAL
-
*) if [ x"$src" = x ]
then
src=$1
@@ -137,22 +124,6 @@ if [ x"$dir_arg" != x ]; then
fi
else
-# CYGNUS LOCAL noer
-# Win32-based gcc automatically appends .exe to produced executables,
-# whether asked for or not. This breaks installs. The following
-# changes the value of $src to $src.exe if $src is missing
-
- if [ -f $src ]
- then
- true
- elif [ -f $src.exe ]
- then
- echo "install: $src does not exist, trying with .exe appended"
- src="$src".exe
- fi
-
-# end CYGNUS LOCAL noer
-
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@@ -182,13 +153,6 @@ else
else
true
fi
-
- # CYGNUS LOCAL: Use exeext
- case "`basename $dst`" in
- *.*) ;;
- *) dst="$dst$exeext" ;;
- esac
- # END CYGNUS LOCAL
fi
## this sed command emulates the dirname command
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index 6baf1f4..62357d9 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,8 +1,2008 @@
+2000-05-03 Alan Modra <alan@linuxcare.com.au>
+
+ From Ulf Carlsson <ulfc@engr.sgi.com> and Andreas Jaeger <aj@suse.de>
+ * lexsup.c (set_section_start): Use bfd_scan_vma rather than
+ strtoul.
+
+2000-04-29 Andreas Jaeger <aj@suse.de>
+
+ * ld.h: Correctly check GCC version.
+
+2000-04-19 Alan Modra <alan@linuxcare.com.au>
+
+ * ld.texinfo (Simple Example): Remove extraneous paragraph.
+
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * po/ld.pot: Regenerate.
+
+ * lexsup.c (help): Restore translated part of bug string.
+
+ * Makefile.am (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.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * ld.h: #include "bin-bugs.h"
+ * lexsup.c (help): Use REPORT_BUGS_TO.
+
+2000-03-27 Denis Chertykov <denisc@overta.ru>
+
+ * configure.tgt (avr-*-*): New target support.
+ * Makefile.am: Likewise.
+ * scripttempl/elf32avr.sc: New script file.
+ * emulparams/avr1200.sh: New file.
+ * emulparams/avr23xx.sh: New file.
+ * emulparams/avr4433.sh New file.
+ * emulparams/avr44x4.sh New file.
+ * emulparams/avr85xx.sh New file.
+ * emulparams/avrmega103.sh New file.
+ * emulparams/avrmega161.sh New file.
+ * emulparams/avrmega603.sh New file.
+ * Makefile.in: Regenerate.
+
+2000-03-09 Andreas Jaeger <aj@suse.de>
+
+ * Makefile.am (check-DEJAGNU): Also unset LANG.
+ * Makefile.in: Rebuild.
+
+2000-03-06 Ian Lance Taylor <ian@zembu.com>
+
+ * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
+ archive.
+
+2000-03-02 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/elf32mcore.sh: Include "getopt.h".
+
+2000-03-01 Ian Lance Taylor <ian@zembu.com>
+
+ * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
+
+2000-03-01 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
+ * emulparams/shpe.sh: Likewise.
+
+2000-03-01 Nick Clifton <nickc@cygnus.com>
+
+ * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
+ to unused parameters.
+
+ * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
+ functions only used by DLL code.
+ (_place_orphan): Initialise 'dollar'.
+
+2000-03-01 H.J. Lu <hjl@gnu.org>
+
+ * ldmain.c (undefined_symbol): Take one more arg, fatal, to
+ indicate if the undefined symbol is a fatal error or not.
+ Don't delete the output file if "fatal" is false.
+
+2000-02-29 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
+ Set LC_COLLATE and LC_ALL to null and export them. It is for
+ sort which expects the C locale.
+ Add $(LIBS) to all $(HOSTING_LIBS).
+ * Makefile.in: Rebuild.
+
+2000-02-29 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
+ beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
+ linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
+ (ld_emulation_xfer_struct): Add missing NULL initialiser for
+ find_potential_libraries.
+
+2000-02-28 Jim Blandy <jimb@redhat.com>
+
+ * ldgram.y (exclude_name_list): Don't require a comma to separate
+ list entries; the lexer considers commas to be valid part of a
+ filename, so in something like `foo, bar' the comma is considered
+ part of the first filename, `foo,'.
+ * ld.texinfo: Update section on EXCLUDE_FILE lists.
+
+2000-02-27 Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ host "i[3456]86-*-freebsdelf*".
+
+2000-02-27 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * scripttempl/i386go32.sc: Move misplaced semicolons.
+
+2000-02-25 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
+ (ALL_64_EMULATIONS): Remove eelf64hppa.o.
+ (eelf64hppa.c, ehppaelf.c): Remove targets.
+ * Makefile.in: Rebuild.
+
+2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
+ GNU/Linux/sparc, but keep the default as 32.
+
+ * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
+ it default if sparcv9 or sparc64.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Add rules to build emipspe.o and earmpe.o.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
+
+ * ldemul.h (ld_emulation_xfer_struct): Add new field:
+ find_potential_libraries.
+ * ldemul.c (ldemul_find_potential_libraries): New function.
+
+ * ldfile.c (ldfile_open_file_search): Allow function to be
+ exported.
+ (ldfile_open_file): Call ldemul_find_potential_libraries.
+ * ldfile.h: Add prototype for ldfile_open_file_search.
+
+ * pe-dll.c: Add support for ARM, MIPS and SH targets.
+
+ * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
+ * emulparams/shpe.sh: New file. Parameters for sh-pe target.
+
+ * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
+ (gld_X_find_potential_libraries): New function. Search for
+ libraries called "*.lib".
+
+ * scriptempl/pe.sc: Add .pdata section.
+
+2000-02-23 Richard Henderson <rth@cygnus.com>
+
+ * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
+ Add and use memory regions.
+
+2000-02-23 Linas Vepstas (linas@linas.org)
+
+ * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
+
+ * Makefile.am: Add support for Linux/IBM 370.
+ * configure.tgt: Likewise.
+
+ * Makefile.in: Regenerate.
+
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * ldlang.c (print_input_section, print_data_statement,
+ print_reloc_statement, print_padding_statement, insert_pad,
+ size_input_section, lang_check_section_addresses,
+ lang_size_sections, lang_do_assignments, lang_set_startof,
+ lang_one_common): Change `opb' to unsigned.
+ (lang_do_assignments): Also change `size' to unsigned.
+
+2000-02-16 Richard Henderson <rth@cygnus.com>
+
+ * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
+
+2000-02-16 Timothy Wall <twall@cygnus.com>
+
+ * mri.c (mri_draw_tree): Add default LMA region argument to call
+ to lang_leave_output_section_statement.
+ * ldlang.h: Update prototypes with LMA region arguments.
+ * ldlang.c (lang_size_sections): Encapsulate region bounds
+ checking in os_check_region call.
+ (os_check_region): New function.
+ (lang_output_section_statement_lookup): Initialize lma_region.
+ (lang_leave_output_section_statement): Add LMA region argument.
+ (lang_leave_overlay): Ditto.
+ * ldgram.y: Handle LMA region syntax.
+ * ld.texinfo (Output Section Description): Describe LMA region usage.
+ * emultempl/armelf.em (gld$place_orphan): Add default value for
+ lma region in call to lang_leave_output_statement.
+ * emultempl/elf32.em (gld$place_orphan): Add default value for
+ lma region in call to lang_leave_output_statement.
+ * emultempl/pe.em (gld$place_orphan): Add default value for
+ lma region in call to lang_leave_output_statement.
+
+
+2000-02-04 Timothy Wall <twall@redhat.com>
+
+ * ldlang.c (lang_check_section_addresses): Use bytes instead of
+ octets when calculating section end addresses.
+
+2000-02-04 Timothy Wall <twall@redhat.com>
+
+ * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
+
+2000-02-03 Timothy Wall <twall@redhat.com>
+
+ * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not
+ octet count.
+ * ld/ldlang.c (print_input_section, print_data_statement,
+ print_reloc_statement, print_padding_statement): Print target
+ address values and section sizes as bytes, not octets.
+ (insert_pad) Calculate padding size in octets, and adjust "dot"
+ by bytes.
+ (size_input_section) Always adjust "dot" by bytes, not octets.
+ (lang_check_section_addresses, lang_do_assignments) Adjust
+ "dot" by bytes, not octets. Use the larger of the directive size
+ or octets_per_byte for the number of octets actually allocated in
+ the output section.
+ (lang_set_startof) Make sure STARTOF returns a target address.
+ (lang_one_common) Record size changes in octets.
+ (lang_abs_symbol_at_end_of) Section end symbol's value is
+ recorded in target bytes.
+ * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
+ to be clear about behavior when an octet is smaller than one byte.
+
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * ldcref.c (output_cref): Don't pass message strings to printf
+ as format arg.
+ Update copyright.
+
+ * ldmisc.c (vfinfo): Same here.
+ Update copyright.
+
+2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
+ generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
+ mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
+ Add missing NULL initialisers, and comments.
+
+ * testsuite/ld-srec/sr3.cc (__rethrow): New.
+
+2000-01-21 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_size_sections): Fix typo in comment.
+
+2000-01-18 H.J. Lu <hjl@gnu.org>
+
+ * ldlang.c (lang_size_sections): Also update the current
+ address of a region if the SEC_NEVER_LOAD bit is not set.
+
+2000-01-10 Philip Blundell <pb@futuretv.com>
+
+ * configure.tgt (arm*-*-conix*): New target.
+
+2000-01-07 Nick Clifton <nickc@cygnus.com>
+
+ * ld.texinfo (Options): Remind users to preceed linker command
+ line switches with -Wl, (or whatever is appropriate) if it is
+ being invoked by a comnpiler driver program.
+ Fix description of the behaviour of the -n command line switch.
+
+Wed Jan 5 08:02:12 2000 Catherine Moore <clm@cygnus.com>
+
+ * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
+ (name_list): New.
+ * ld.texinfo (EXCLUDE_FILE): Update documentation.
+ * ldgram.y (wildcard_spec): Support a list of excluded_files.
+ (exclude_name_list): New.
+ ldlang.c (walk_wild_section): Support list of excluded files.
+ (print_wild_statement): Likewise.
+ (lang_add_wild): Likewise.
+ * ldlang.h (lang_wild_statement_type): Likewise.
+ * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
+
+2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * pe-dll.c (pe_dll_warn_dup_exports): New variable.
+ (process_def_file): Use.
+ (pe_dll_compat_implib): New variable.
+ (make_one): Use.
+
+ * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
+ pe_dll_compat_implib.
+
+ * emultempl/pe.em (longopts): Add warn-duplicate-exports and
+ compat-implib options.
+ (gld_${EMULATION_NAME}_list_options): List new options.
+ (gld_${EMULATION_NAME}_parse_args): Handle.
+
+ * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
+ dll.
+
+ * deffilep.y (opt_name): Allow "." in name.
+
+1999-12-02 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Fix arm-epoc-pe dependencies.
+ * Makefile.in: Regenerate.
+
+ * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe.
+
+ * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for
+ EPOC by placing .rdata into .text.
+
+1999-11-26 Andreas Schwab <schwab@suse.de>
+
+ * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for
+ STRINGIFY. Use yes/no instead of true/false as value for cache
+ variable.
+ * configure: Regenerate.
+
+1999-11-24 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (IGNORE_SECTION): Section must have both ALLOC and LOAD
+ attributes in order to be checked.
+
+1999-11-22 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_check_section_addresses): Fix test to determine
+ if a section should be tested.
+ (IGNORE_SECTION): New macro.
+
+Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Clean up code to use EXTRA_SHLIB_EXTENSION.
+
+1999-11-03 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian.
+ * emulparams/mcorepe.sh (OUTPUT_FORMAT): Change to little endian.
+
+1999-11-01 Steve Chamberlain <sac@pobox.com>
+
+ * ldlang.c (section_already_linked): Rework to use hash table.
+ (already_linked_newfunc): New function.
+ (already_linked_table_init): New function.
+ (already_linked_table_free): New function.
+ (lang_process): Initialize and free the already_linked hash table.
+
+1999-10-27 Andreas Jaeger <aj@suse.de>
+
+ * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ target "mips*-*-linux-gnu*".
+
+1999-10-27 Scott Bambrough <scottb@netwinder.org>
+
+ * emultempl/armelf.em: Include ctype.h to prevent compile time
+ warnings.
+
+1999-10-26 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/armcoff.em (gld{}_finish): Remove extraneous
+ underscore from prototype.
+ * emultempl/armelf.em (gld{}_finish): Remove extraneous
+ underscore from prototype.
+
+1999-10-07 Geoffrey Keating <geoffk@cygnus.com>
+
+ * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs
+ being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*.
+ (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*.
+ (.rel.sbss): Make like .rel.bss.
+ (.rela.sbss): Make like .rel.bss.
+ (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when
+ ld -r.
+ (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS,
+ .dynsbss.
+
+1999-09-29 Andrew Haley <aph@cygnus.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
+ merging sections when not relocating.
+
+1999-09-28 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * pe-dll.c (process_def_file): Move the offset lookup from here to
+ (fill_exported_offsets): here. New static function.
+ (fill_edata): Use.
+
+1999-09-28 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * deffilep.y (tokens): Add upper and lower case versions of DATA,
+ CONSTANT, NONAME and PRIVATE tokens.
+ (command): Use DATAU.
+ (expline): Allow for drectve syntax as well.
+ (exp_opt_list): Likewise.
+ (exp_opt): Likewise.
+ * pe-dll.c (make_one): Only generate the idata entries for data
+ symbols.
+
+1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
+
+ * scripttempl/elf.sc (.sdata): Include .gnu.linkonce.s.* sections
+ in .sdata too.
+
+1999-09-26 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/elf.sc (.bss): Accept sections named .bss.*
+ (.sbss): Accept sections names .sbss.*
+
+1999-09-22 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Add earm_epoc_pe.c build target.
+
+Sat Sep 18 07:57:10 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (OTHER_READONLY_SYMBOLS): Remove ".stubs",
+ they've been renamed to ".stub", which is handled automatically
+ by elf.sc.
+
+Fri Sep 17 11:00:33 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Kill completely.
+ (DATA_START_SYMBOLS): Kill __hp_load_map definition
+
+Thu Sep 16 10:59:56 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Use the same filename extension for the bfd_elf_dt_needed_name call
+ as we did for finding the library.
+
+ * emulparms/elf64hppa.sh (DATA_START_SYMBOLS): Define.
+ (OTHER_READWRITE_SECTIONS): No longer define __hp_load_map.
+
+ * emulparms/elf64hppa.sh (TEXT_START_SYMBOLS): Define.
+
+Wed Sep 15 02:47:43 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (SHLIB_TEXT_START_ADDR): Define.
+ (SHLIB_DATA_ADDR): Likewise.
+
+ * emulparms/elf64hppa.sh (TEXT_DYNAMIC): Define.
+
+ * emulparms/elf64hppa.h (OTHER_READWRITE_SECTIONS): No longer combine
+ the .plt, .dlt, .opd into a single output section. Provide values
+ for __gp and __hp_load_map.
+
+1999-09-14 Michael Meissner <meissner@cygnus.com>
+
+ * 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 <donn@interix.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for
+ terminating null.
+
+1999-09-14 Ulrich Drepper <drepper@cygnus.com>
+
+ * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target.
+ * config.in: Add EXTRA_SHLIB_EXTENSION.
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION
+ is defined.
+
+1999-09-14 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.in: Add earm_epoc_pe.c build target.
+
+Tue Sep 14 05:26:34 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.dlt.
+
+1999-09-13 Donn Terry <donn@interix.com>
+
+ * emultempl/pe.em: Remove the output file at the start, in case it
+ is not writable.
+
+Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Search for file with .sl extension if no file with a .so extension
+ is found.
+
+ * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt
+ at the start of the .dlt output section.
+
+1999-09-12 Ian Lance Taylor <ian@zembu.com>
+
+ * pe.em: Don't include "../bfd/libbfd.h".
+ (gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
+ bfd_alloc.
+
+ * pe-dll.h: New file.
+ * pe-dll.c: Include "pe-dll.h". Mark unused arguments as needed
+ to avoid warnings.
+ (edata_sz, reloc_sz): Change from int to size_t.
+ (pe_details_type): Change type of imagebase_reloc from int to
+ unsigned int.
+ (pe_detail_list): Fully initialize last entry.
+ (pe_dll_id_target): Change parameter to const.
+ (pe_dll_generate_def_file): Likewise.
+ (pe_dll_generate_implib): Likewise.
+ (pe_implied_import_dll): Likewise. Change dll_name to const.
+ * emultempl/pe.em: Include "pe-dll.h". Remove declarations now in
+ pe-dll.h.
+ (init): Fully initialize __dll__ entry.
+ (gld_${EMULATION_NAME}_after_open): Remove unused variables
+ sequence, elt, and i.
+ * deffile.h: Add preprocessor guard.
+ * deffilep.y (def_debug): Remove.
+ * Makefile.am: Rebuild dependencies.
+ (HFILES): Add pe-dll.h.
+
+1999-09-12 Donn Terry <donn@interix.com>
+
+ * ld.h (ld_abort): Declare.
+ (abort): Define.
+ * ldmisc.c (ld_abort): Define.
+
+ * scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup.
+ Move .bss section after .rdata. Move .reloc section after .rsrc.
+
+ * lexsup.c (parse_args): Use strtoul for --split-by-reloc
+ argument.
+
+ * lexsup.c (parse_args): If we get an unrecognized argument,
+ mention --help.
+
+ * ldlang.c (section_already_linked): Use comdat information if it
+ is available.
+
+ * emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If
+ OVERRIDE_SECTION_ALIGNMENT is defined, change to that.
+ (gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is
+ defined, rather than a.exe.
+ (init): Define __subsystem__ as ${SUBSYSTEM}.
+ (set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol
+ name.
+
+1999-09-12 Ian Lance Taylor <ian@zembu.com>
+
+ * ldlang.c (open_output): Change local variable desired_endian
+ from int to enum bfd_endian.
+
+ * emulparams/arm_epoc_pe.sh: Define ENTRY, SUBSYSTEM and
+ INITIAL_SYMBOL_CHAR.
+ * emulparams/armpe.sh: Likewise.
+ * emulparams/morepe.sh: Likewise.
+ * emulparams/ppcpe.sh: Likewise.
+ * emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup.
+ (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM.
+
+Fri Sep 10 00:22:50 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (LIB_PATH): Define.
+
+ * emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before
+ unwinders so that they are closer to the text section.
+ (OTHER_BSS_SECTIONS): Define.
+ (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS.
+ (INIT_START, INIT_END): Define.
+ (FINI_START, FINI_END): Define.
+ * scripttempl/elf.sc: Add support for INIT_START, INIT_END,
+ FINI_START, FINI_END and OTHER_BSS_SECTIONS.
+
+Thu Sep 9 21:43:58 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (TEXT_START_ADDR): Move up one page.
+ (DATA_ADDR): Define.
+
+1999-09-09 Stan Shebs <shebs@andros.cygnus.com>
+
+ * emulparams/d10velf.sh (READONLY_START_ADDR): Set to 0x2000004.
+
+1999-09-09 Andreas Schwab <schwab@suse.de>
+
+ * ld.texinfo: Fix arguments of @var to not contain punctuation.
+
+Thu Sep 9 05:52:34 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Define.
+
+1999-09-08 Ulrich Drepper <drepper@cygnus.com>
+
+ * emulparams/elf64hppa.sh (ELFSIZE): New. Set to 64.
+
+Wed Sep 8 00:07:39 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/elf64hppa.sh (ENTRY): Define to main.
+
+1999-09-03 Scott Bambrough <scottb@netwinder.org>
+
+ * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ target "arm*-*-linux-gnu*"
+
+1999-09-04 Steve Chamberlain <sac@pobox.com>
+
+ * configure.tgt (pjl-*-*, pj-*-*): New targets.
+ * emulparams/pjelf.sh: New file.
+ * emulparams/pjlelf.sh: New file.
+ * scripttempl/pj.sc: New file.
+ * Makefile.am (ALL_EMULATIONS): Add epjelf.o and epjlelf.o.
+ (epjelf.o, epjlelf.o): New targets.
+ * Makefile.in: Rebuild.
+
+Fri Sep 3 20:17:08 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparams/elf64hppa.sh (MAXPAGESIZE): Define.
+ (OTHER_READONLY_SECTIONS, DATA_PLT): Likewise.
+
+Thu Sep 2 14:32:03 1999 Jeffrey A Law (law@cygnus.com)
+
+ * emulparams/elf64hppa.sh: New file.
+ * configure.tgt (hppa*w-*-*): Use elf64hppa emulation.
+ * Makefile.am (ALL_64_EMULATIONS): Add eelf64hppa.o
+ (eelf64hppa.c): Add dependencies.
+ * Makefile.in: Rebuilt.
+
+1999-08-25 Philip Blundell <pb@nexus.co.uk>
+
+ * emulparams/armelf.sh (OTHER_BSS_SYMBOLS): Add __end__.
+ * emulparams/armelf_linux.sh: Likewise.
+ * emulparams/armelf_linux26.sh: Likewise.
+
+1999-08-24 Nick Clifton <nickc@cygnus.com>
+
+ From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
+
+ * configure.tgt (arm-*-netbsd*): New target.
+ * Makefile.am (ALL_EMULATIONS): Add earmnbsd.o.
+ (earmnbsd.c): New rule with deps.
+ * Makefile.on: Regenerate.
+ * emulparams/armnbsd.sh: New file.
+
+1999-08-23 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Define.
+ Implement --base-file command line switch.
+
+ * emultempl/elf32.em: Add ability for individual targets to have
+ their own command line switches by defining PARSE_AND_LIST_ARGS.
+
+1999-08-19 Andreas Schwab <schwab@suse.de>
+
+ * configure.host: Use ${CC} instead of gcc for finding compiler
+ related files.
+
+1999-08-11 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/mcorepe.sc (OUTPUT_FORMAT): Fix typo.
+
+1999-08-09 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * scripttempl/i386go32.sc: Handle g++ exception sections.
+
+1999-08-09 Ian Lance Taylor <ian@zembu.com>
+
+ From Wally Iimura <iimura@microunity.com>:
+ * ldlang.c (lang_size_sections): When checking whether an address
+ is within a region, don't get confused by wrapping around at the
+ end of the address space.
+
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
+
+ * ldlang.c (wild_doit): Update for renaming of SEC_SHORT to
+ SEC_SMALL_DATA.
+
+ * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
+ MKDEP. Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+1999-08-08 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * configure.host (sparc-*-linux-gnu*): New host.
+ (sparc64-*-linux-gnu*): New host.
+
+1999-08-06 Ian Lance Taylor <ian@zembu.com>
+
+ * lexsup.c (is_num): Reindent.
+ (parse_args): Mention program name in error message.
+
+ * emultempl/ostring.sed: Rename from stringify.sed.
+ * emultempl/astring.sed: New file.
+ * Makefile.am (stringify.sed): New target.
+ (GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to
+ stringify.sed.
+ * configure.in: Define and substitute STRINGIFY.
+ * emultempl/*.em: Use stringify.sed from build directory rather
+ than source directory.
+ * emultempl/elf32.em: Use stringify.sed rather than inline sed
+ script.
+ * emultempl/gld960.em, emultempl/gld960c.em: Likewise.
+ * emultempl/hppaelf.em, emultempl/linux.em: Likewise.
+ * emultempl/lnk960.em, emultempl/sunos.em: Likewise.
+ * configure, Makefile.in: Rebuild.
+
+1999-08-05 Donn Terry <donn@interix.com>
+
+ * emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and
+ INITIAL_SYMBOL_CHAR.
+ * emulparams/i386pe_posix.sh: New file.
+ * 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.
+ (ALL_EMULATIONS): Add ei386pe_posix.o.
+ (ei386pe_posix.c): New target.
+ * configure.tgt (i[3456]86-*-interix*): New target.
+ * configure.host (i[3456]86-pc-interix*): New host.
+ * Makefile.in: Rebuild.
+
+1999-08-03 Ian Lance Taylor <ian@zembu.com>
+
+ * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000.
+ * emulparams/elf32ppclinux.sh (MAXPAGESIZE): Likewise.
+
+1999-08-03 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (ALL_EMULATIONS): Remove ego32.o.
+ (ego32.c): Remove.
+ * Makefile.in: Rebuild.
+
+1999-07-22 Philip Blundell <pb@nexus.co.uk>
+
+ * emulparams/armelf_linux26.sh (DATA_START_SYMBOLS): Define.
+ (OTHER_BSS_SYMBOLS, OTHER_BSS_END_SYMBOLS): Likewise.
+ * emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Define.
+
+ * configure.tgt (arm*-*-uclinux*, thumb-*-uclinux*,
+ thumb-*-linux-gnu*): New targets.
+
+1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * scripttempl/i386go32.sc: Add handling of linkonce sections.
+
+ * configure.bat: Remove; obsolete.
+ * emulparams/go32.sh: Remove; obsolete.
+ * scripttempl/go32coff.sc: Remove; obsolete.
+
+1999-07-21 H.J. Lu <hjl@gnu.org>
+
+ * configure.tgt (mips*el-*-vxworks*): New target.
+
+1999-07-21 Brad M. Garcia <bgarcia@fore.com>
+
+ * configure.tgt (i[3456]86-*-vxworks*): New target.
+
+Tue Jul 20 15:18:46 1999 Bob Manson <manson@charmed.cygnus.com>
+
+ * ldlang.c (lang_gc_sections): Only handle the start symbol
+ specially if there is one.
+
+Mon Jul 19 14:19:14 1999 Mark P. Mitchell <mark@codesourcery.com>
+
+ * emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add
+ .MIPS.events and .MIPS.content handling.
+ * emulparams/elf64bmip.sh (OTHER_RELOCATING_SECTIONS): Likewise.
+
+1999-07-17 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (get_target): New function: Return true iff the
+ given target is the target being sought.
+ (stricpy): New function: Like strcpy but convert to lower
+ case as well.
+ (strcut): New function: Like strstr but remove the located
+ substring as well.
+ (name_compare): New function: Compute a compatability rating
+ for two target names.
+ (winner): New variable: Best target found by
+ closest_target_match() so far.
+ (closest_target_match): New function: Find the target which is
+ the closest match to the original target.
+ (get_first_input_target): New function: Find the target format
+ of the first of the linker's input file.
+ (open_output): Be more clever about deciding the output target
+ format.
+
+1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * emulparams/elf64_sparc.sh: Add 64-bit directories to native LIB_PATH.
+
+Thu Jul 15 15:55:15 1999 Mark P. Mitchell <mark@codesourcery.com>
+
+ * configure.host: Set up HOSTING_CRT0 and HOSTING_LIBS for IRIX6.
+
+1999-07-15 Ian Lance Taylor <ian@zembu.com>
+
+ * configure.in: Bump version number to 2.9.5.
+ * configure: Rebuild.
+
+1999-07-14 Richard Henderson <rth@cygnus.com>
+
+ * ldlang.c (wild_doit): Copy SEC_SHORT to output section.
+
+ * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the
+ same order seen for the main sections. Add
+ OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS.
+
+1999-07-12 Andreas Schwab <schwab@suse.de>
+
+ * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Fill in
+ structure initializations.
+
+ * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Add missing
+ comma in initializer.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
+ as appropriate. Fill in structure initializations.
+
+1999-07-10 Ian Lance Taylor <ian@zembu.com>
+
+ * ldfile.c: Revert patch of 1999-07-08.
+ (ldfile_try_open_bfd): If we are searching for the file, skip
+ files with an incompatible architecture.
+
+1999-07-09 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/armcoff.sc (OUTPUT_FORMAT): Include big endian and
+ little endian formats.
+
+1999-07-08 Felix Lee <flee@cygnus.com>
+
+ * scripttempl/mcorepe.sc: fix quoting problem, for bash 2.x
+
+1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * ldfile.c (ldfile_open_file_search): Skip libraries made for
+ incompatible architectures in the search path. Let the user know
+ about any such skips.
+
+Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * configure.tgt (hppa*-linux-gnu*): New target.
+
+1999-07-07 Mark Mitchell <mark@codesourcery.com>
+
+ * Makefile.am (ALL_64_EMULATIONS): Add eelf64bmip.
+ (eelf64bmip): New target.
+ * Makefile.in: Regenerated.
+ * configure.tgt (mips-sgi-irix6*): Add 64-bit emulation.
+ * emulparams/elf64bmip.sh: New file.
+
+1999-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/pe.em (after_open): Abort if input format is ARM and
+ output format is not.
+ * emultempl/armcoff.em (after_open): Abort if input format is ARM
+ and output format is not.
+ * emultempl/armelf.em (after_open): Abort if input format is ARM
+ and output format is not.
+
+1999-07-02 Ian Lance Taylor <ian@zembu.com>
+
+ * ldlang.c: Revert change of 1999-06-23.
+
+1999-06-30 Mark Mitchell <mark@codesourcery.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eelf32bmipn32.o.
+ (eelf32bmipn32.c): New target.
+ * Makefile.in: Regenerated.
+ * configure.tgt (mips-sgi-irix6*): Make n32 the default
+ emulation.
+ * emulparams/elf32bmipn32.sh: New file.
+
+1999-06-28 Jim Pick <jim@jimpick.com>
+
+ * emultempl/armelf.em: Added code so that .xs linker scripts are
+ called so that ARM shared libraries are built correctly.
+
+1999-06-22 Mark Mitchell <mark@codesourcery.com>
+
+ * ldmain.c (main): Initialize link_info.init_function and
+ link_info.fini_function.
+ * lexsup.c (OPTION_INIT): New macro.
+ (OPTION_FINI): Likewise.
+ (ld_options): Add descriptions for them.
+ (parse_args): Handle them.
+
+1999-06-23 Ian Lance Taylor <ian@zembu.com>
+
+ * ldlang.c (section_already_linked): Only discard link once
+ sections if we are building constructors.
+
+1999-06-22 Nick Clifton <nickc@cygnus.com>
+
+ * ld.texinfo (Location Counter): Describe behaviour of
+ location counter inside section statements.
+
+1999-06-20 Mark Mitchell <mark@codesourcery.com>
+
+ * scripttempl/elf.sc (WRITABLE_RODATA): New variable for
+ controlling whether or not .rodata is in the data segment or the
+ text segment.
+
+1999-06-18 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/pe.em: Add new command line switch --thumb-entry.
+ * emultempl/armelf.em: Add new command line switch --thumb-entry.
+ * emultempl/armcoff.em: Add new command line switch --thumb-entry.
+ * ld.texinfo: Document new ARM command line switch: --thumb-entry.
+1999-06-20 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (all_libpath): Accumulate across all enabled targets.
+
+Sun Jun 20 14:10:33 1999 Richard Henderson <rth@cygnus.com>
+
+ * emultempl/armelf.em: Watch EMULATION_LIBPATH instead of
+ DEFAULT_EMULATION.
+ * emultempl/elf32.em: Likewise.
+ * emultempl/sunos.em: Likewise.
+
+Fri Jun 18 15:24:48 1999 Richard Henderson <rth@cygnus.com>
+
+ * Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.
+ * configure.in (all_emuls): Add targ_extra_libpath.
+ (all_libpath, EMULATION_LIBPATH): Define.
+ * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath.
+ * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
+
+Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * ld.texinfo: Fix use of @item vs. @itemx.
+
+1999-06-13 Ian Lance Taylor <ian@zembu.com>
+
+ From Thomas Zenker <thz@lennartz-electronic.de>:
+ * ldgram.y (attributes_opt): Use attributes_list instead of NAME.
+ (attributes_list, attributes_string): New nonterminals.
+ * ldlang.c (lang_set_flags): Add invert parameter. Don't handle
+ '!'.
+ * ldlang.c (lang_set_flags): Update declaration.
+
+1999-06-12 Ian Lance Taylor <ian@zembu.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add
+ entry_symbol as an undefined symbol when doing a relocateable
+ link. From <jeffdb@goodnet.com>.
+
+1999-06-12 David O'Brien <obrien@freebsd.org>
+
+ * configure.tgt: (i[3456]86-*-freebsd*): Now defaults to ELF.
+
+1999-06-09 Nick Clifton <nickc@cygnus.com>
+
+ * lexsup.c (help): Restore previous format of output.
+
+1999-06-04 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/pe.em: If compiling for arm_epoc_pe rename
+ interworking functions to avoid a name space clash.
+
+1999-06-02 Jason Merrill <jason@yorick.cygnus.com>
+
+ * scripttempl/v850.sc: Add initp support.
+
+1999-06-02 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/pe.em: Rename global arm interworking functions to
+ avoid name collision when all targets BFD is built.
+
+1999-05-30 Cort Dougan <cort@attis.cs.nmt.edu>
+
+ * Makefile.am (ALL_EMULATIONS): Add eelf32ppclinux.o.
+ * configure.tgt (powerpc-*-linux-gnu): Use it.
+ * emulparams/elf32ppclinux.sh: New file.
+
+1999-05-29 Ian Lance Taylor <ian@zembu.com>
+
+ * ld.texinfo (Options): Clarify that options which refer to files
+ must be properly ordered.
+
+1999-05-29 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/armelf.em (..._parse_args): New function: Parse
+ command line option. Accept arm-elf specific command line option
+ '-p' or '--no-pipeline-knowledge'.
+ (..._list_options): New function: Describe the new command line
+ option.
+ (..._before_allocation): Pass the value of the new variable
+ no_pipeline_knowledge to bfd_elf32_arm_process_before_allocation.
+
+ * emultemp/armelf_oabi.em (..._before_allocation): Pass zero as
+ the third parameter to bfd_elf32_arm_process_before_allocation.
+
+1999-05-28 Nick Clifton <nickc@cygnus.com>
+
+ * lexsup.c (help): Minor formatting changes.
+
+1999-05-28 Martin Dorey <mdorey@madge.com>
+
+ * configure.tgt (i960-*-elf*): New target.
+ * emulparams/elf32_i960.sh: New file.
+ * Makefile.am (ALL_EMULATIONS): Add eelf32_i960.o.
+ (eelf32_i960.c): New target.
+ * Makefile.in: Rebuild.
+
+1999-05-26 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/armelf_oabi.sh (TEMPLATE_NAME): Set to armelf_oabi.
+
+1999-05-24 Philip Blundell <philb@gnu.org>
+
+ * emultempl/armelf.em (before_parse): Set config.dynamic_link and
+ config.has_shared.
+ * emulparams/armelf.sh (GENERATE_SHLIB_SCRIPT): Define.
+ * emulparams/armelf_linux.sh (GENERATE_SHLIB_SCRIPT): Likewise.
+
+1999-04-13 Philip Blundell <philb@gnu.org>
+
+ * emultempl/armelf.em: Add definitions related to shared objects
+ (copied from elf32.em).
+
+Wed May 19 12:44:26 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * Makefile.am (ALL_EMULATIONS): Remove earmlinux.o and
+ earm26linux.o, add earmelf_linux.o and earmelf_linux26.o.
+ * Makefile.in: Regenerated.
+
+1999-05-16 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/elf32mcore.sh (GENERATE_SHLIB_SCRIPT): Define.
+ (TEMPLATE_NAME): Define.
+
+Thu May 13 09:48:09 1999 Joel Sherrill (joel@OARcorp.com)
+
+ * configure.tgt (i386-*-rtemself*, sh-*-rtemself*): New targets.
+ (mips*el-*-rtems*, powerpcle-*-rtems*): New targets.
+
+1999-05-10 DJ Delorie <dj@cygnus.com>
+
+ * scripttempl/pe.sc: Specify the output arch, which Ian says is
+ the Right Thing to do.
+
+ * emultempl/pe.em: various changes to parameterize the
+ target-specific information.
+ (gld_i386pe_after_open): Detect and fix MS import libraries
+ by renaming the member objects (which are all named the same).
+
+ * pe-dll.c: various changes to parameterize the target-specific
+ information.
+ (generate_reloc): support relocs more generically to allow for
+ expansion.
+ (pe_exe_build_sections): new; used to add .relocs to .exes
+ (pe_exe_fill_sections): ditto
+
+1999-05-10 Catherine Moore <clm@cygnus.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
+ Check for TARGET_IS_arm_epoc_pe.
+ (gld_${EMULATION_NAME}_before_allocation): Likewise.
+
+1999-05-12 Anthony Green <green@cygnus.com>
+
+ * ldlang.c (walk_wild, walk_wild_file, walk_wild_section,
+ output_section_callback, gc_section_callback): New functions for
+ generic section walks.
+ (wild, lang_gc_wild): Use walk_wild.
+ (wild_file, lang_gc_wild_file): Deleted. Common logic moved to
+ walk_wild_file.
+ (wild_section, lang_gc_wild_section): Deleted. Common logic moved
+ to walk_fild_section. Unique logic moved into callbacks
+ output_section_callback and gc_section_callback.
+
+1999-04-26 Tom Tromey <tromey@cygnus.com>
+
+ * aclocal.m4, configure: Updated for new version of libtool.
+
+1999-04-12 Philip Blundell <pb@nexus.co.uk>
+
+ * emulparams/armelf_linux.sh: New file. Support for ARM
+ GNU/Linux ELF ABI.
+ * emulparams/armelf_linux26.sh: New file. APCS-26 version of above.
+ * configure.tgt: For arm*-*-linux-gnu*, set default emulation to
+ `armelf_linux', and also include `armelf_linux26' and `armelf'.
+ * Makefile.am: Add rules to make earmlinux.c and earmlinux26.c.
+ (ALL_EMULATIONS): Add earmlinux.o and earmlinux26.o.
+ * Makefile.in: Regenerate.
+
+1999-04-11 Richard Henderson <rth@cygnus.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add elf_i386_be.o.
+ * configure.tgt (i[3456]86-*-beos*): Use it.
+ * emulparams/elf_i386_be.sh: New file.
+ * Makefile.in: Rebuild.
+
+ * configure.in (environ): Detect declaration.
+ * ldmain.c (main): Don't declare environ.
+ * sysdep.h (environ): Declare if needed.
+ * configure, config.in: Rebuild.
+
+1999-04-11 Richard Henderson <rth@cygnus.com>
+
+ * ldgram.y (ldgram_vers_current_lang): New.
+ (vers_defns): Accept `extern "lang" { }' syntax.
+ * ldlex.l (vers_node_nesting): New.
+ (V_IDENTIFIER): Accept . and $ in symbols.
+ (VERS_NODE): Accept `extern "lang" { }' tokens. Nest VERS_NODE states.
+ * ldlang.c (lang_new_vers_regex): New `lang' argument. Update callers.
+ (lang_vers_match_lang_c): New function.
+ (lang_vers_match_lang_cplusplus): New function.
+ (lang_vers_match_lang_java): New function.
+ (lang_do_version_exports_section): Fix iteration. Don't free
+ section contents, as it is still in use by the patterns.
+
+1999-04-10 Richard Henderson <rth@cygnus.com>
+
+ * ldmain.c (main): Init link_info.no_undefined.
+ * lexsup.c: Add command-line option --no-undefined.
+
+1999-04-06 Ian Lance Taylor <ian@zembu.com>
+
+ * ld.h (LC_MESSAGES): Never define.
+ * ldmain.c (main): Don't pass LC_MESSAGES to setlocale if the
+ system does not define it.
+
+1999-04-06 H.J. Lu <hjl@gnu.org>
+
+ * ldmain.h (demangling): Declare.
+ * ldmain.c (demangling): New global variable.
+ (main): Initialize demangling.
+ * ldmisc.c (vfinfo): Don't demangle symbol if ! demangling.
+ * lexsup.c (ld_options, parse_args): Handle --demangle and
+ --no-demangle.
+ * ld.texinfo, ld.1: Document --demangle/--no-demangle.
+
+ * ldlex.l (V_IDENTIFIER): Allow '.' in symbol.
+
+1999-04-05 Chris Torek <torek@BSDI.COM>
+
+ * emultempl/sunos.em (gld${EMULATION_NAME}_search_dir): Check that
+ a shared library really exists, avoiding broken symlinks.
+
+ * ldfile.c (ldfile_open_file): Generate a better error message if
+ we can't find a -l file.
+
+1999-04-05 DJ Delorie <dj@cygnus.com>
+
+ * configure.tgt (i386-*-pe): add targ_extra_ofiles for other PE
+ targets (i386-pe and i386-winnt)
+
+1999-04-04 Ian Lance Taylor <ian@zembu.com>
+
+ * deffilep.y: Include "sysdep.h" and "ldmisc.h".
+ (def_file_add_directive): Change return type to void. Remove
+ unused locals sh_reserve, sh_commit, and j.
+ (def_ungetc): Always return a value.
+ (def_lex): Correct parenthesization of || within &&.
+ * deffile.h (def_file_add_directive): Update declaration.
+ * pe-dll.c: Include <time.h>, <ctype.h>, and "ldemul.h".
+ (generate_edata): Remove unused local i.
+ (quoteput): Add cast to avoid warning.
+ (pe_dll_generate_def_file): Fix type in format string.
+ (quick_symbol): Remove unused local blhe.
+ (pe_dll_generate_implib): Add cast to avoid warning.
+ (pe_process_import_defs): Remove unused locals ar_head, ar_tail,
+ and n.
+ (pe_as16): Comment out.
+
+1999-04-04 Don Bowman <don@pixsci.com>
+
+ * configure.tgt: Add mips*-*-vxworks* target.
+
+1999-03-31 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.in (ALL_EMULATIONS): Add earm_epoc_pe.o
+ Add build rule and dependencies for earm_epoc_pe.c.
+
+ * emulparams/arm_epoc_pe.sh: New file.
+
+ * configure.tgt: Add 'targ_extra_ofiles' for ARM based PE
+ targets.
+
+1999-03-31 Philip Blundell <pb@nexus.co.uk>
+
+ * configure.tgt: Match `arm*-*-linux-gnu*' not
+ `armv*-*-linux-gnu'.
+
+1999-03-26 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * scripttempl/elf.sc: Put the .eh_frame and .gcc_except_table
+ sections in the data segment.
+
+Fri Mar 26 12:05:51 1999 Catherine Moore <clm@cygnus.com>
+
+ * ld.h (wildcard_spec): Add exclude_name.
+ * ldgram.y (EXCLUDE_FILE): New token.
+ (wildcard_spec): Set exclude_name.
+ (file_NAME_list): Recognize EXCLUDE_FILE.
+ * ldlang.c (wild_section): Check for excluded files.
+ (print_wild_statement): Print excluded files.
+ (lang_add_wild): New argument exclude_filename.
+ Set exclude_filename.
+ * ldlang.h (lang_wild_statement_type): Add exclude_filename.
+ * ldlex.l: New token EXCLUDE_FILE.
+ * mri.c (mri_draw_tree): Add argument to lang_add_wild.
+ * scripttempl/elf.sc (CTOR, DTOR): Exclude crtend.o from ctor wildcard.
+ Reorder sorted and unsorted ctors.
+ * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
+ * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
+ * scripttempl/elfppc.sc (CTOR, DTOR): Likewise.
+
+1999-03-26 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_gc_sections): If entry_symbol is not defined,
+ default to "start".
+
+1999-03-03 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/elf.sc: Add explicit placements for the .eh_frame
+ and .gcc_except_table sections.
+
+Wed Mar 3 09:13:34 1999 Catherine Moore <clm@cygnus.clm>
+
+ * scripttempl/elf.sc: Remove .end.ctors and .end.dtors
+ sections. Reorder .ctors section entries.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfppc.sc: Likewise.
+
+1999-02-26 Jim Lemke <jlemke@cygnus.com>
+
+ * ldmain.c (main): Wrong error msg for -r and --mpc860c0.
+
+1999-02-25 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_check_section_addresses): Remove extraneous
+ backslash.
+
+Thu Feb 25 15:07:24 1999 Catherine Moore <clm@cygnus.com>
+
+ * scripttempl/elf.sc: Don't gather .ctor and .dtor sections
+ for relocateable links.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfppc.sc: Likewise.
+
+1999-02-22 Jim Lemke <jlemke@cygnus.com>
+
+ * ldint.texinfo: remove extraneous right brace.
+ * ldmain.c (main): initialize and check option "mpc860c0".
+ * lexsup.c (ld_options, parse_args): add option "mpc860c0".
+
+Wed Feb 17 12:10:06 1999 Stan Cox <scox@cygnus.com>
+
+ * mpw-elfmips.c (gldelf32ebmip_before_allocation): Remove special
+ .reginfo section handling.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Likewise.
+ * emulparams/elf32elmip.sh (INITIAL_READONLY_SECTIONS): Removed
+ * emulparams/elf32ebmip.sh (INITIAL_READONLY_SECTIONS): Removed
+
+1999-02-17 Nick Clifton <nickc@cygnus.com>
+
+ Patch from: Scott Bambrough <scottb@corelcomputer.com>
+
+ * configure.tgt: Added armv*-*-linux-gnu to $targ_emul
+ recognition.
+
+Wed Feb 17 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * emultempl/armelf_oabi.em
+ (bfd_elf32_arm_allocate_interworking_sections,
+ bfd_elf32_arm_get_bfd_for_interworking,
+ bfd_elf32_arm_process_before_allocation): Define them to use the
+ old ABI versions of the functions.
+
+Tue Feb 16 16:48:19 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Change AC_PREREQ to 2.13. Change AM_PROG_INSTALL
+ to AC_PROG_INSTALL. Change AM_EXEEXT to AC_EXEEXT.
+ * Makefile.am (earmelf_oabi.c): Changes spaces to tab.
+ * acconfig.h: Remove.
+ * aclocal.m4: Rebuild.
+ * configure: Rebuild.
+ * Makefile.in: Rebuild.
+
+Mon Feb 15 18:21:48 1999 Vladimir N. Makarov <vmakarov@cygnus.com>
+
+ * ldexp.h (struct etree_value_type): Change valid onto valid_p.
+
+ * ldexp.c (new_abs): Ditto.
+ (new_rel, new_rel_from_section, fold_binary, invalid, fold_name,
+ exp_fold_tree, exp_binop, exp_trinop, stat_alloc,
+ exp_get_abs_int): Ditto
+
+ * ldlang.c (print_assignment, lang_size_sections,
+ lang_do_assignments): Ditto.
+
+1999-02-11 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_check_section_addresses): New function: Check
+ addresses assigned to section for overlaps.
+ (lang_process): Call lang_check_section_addresses if suitable.
+
+ * ld.h: Add new boolean field to args_type structure:
+ 'check_section_addresses'.
+
+ * ldmain.c: Initialise check_section_addresses field to true.
+
+ * lexsup.c: Add new command line options '--no-check-sections' and
+ '--check-sections'.
+
+ * ld.texinfo: Document new command line options '--check-sections'
+ and '--no-check-sections'.
+
+1999-02-08 Nick Clifton <nickc@cygnus.com>
+
+ * configure.tgt: Add support for StrongARM target.
+
+Wed Feb 3 19:41:01 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldctor.c (ldctor_build_sets): Just set SEC_KEEP once. Check for
+ an owner of a section before using it to look up a reloc type.
+ Don't set SEC_KEEP for the absolute section.
+
+Mon Feb 1 11:39:46 1999 Catherine Moore <clm@cygnus.com>
+
+ * Makefile.am (earmelf_oabi.o): New.
+ * Makefile.in: Regenerate.
+ * configure.tgt (arm-*-oabi): New.
+ (thumb-*-oabi): New.
+ * emulparams/armelf_oabi.sh: New.
+ * emultempl/armelf_oabi.em: New.
+
+1999-01-31 17:57:31 1998 Michael Meissner <meissner@cygnus.com>
+
+ * scripttempl/elfppc.sc: Add support for -fleading-underscores
+ switch in all linker generated symbols.
+
+ * configure.tgt (powerpc{,le}*-*-vxworks): Add as aliases for
+ powerpc{,le}-*-eabi.
+
+Wed Jan 20 17:01:48 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.tgt (i[3456]86-*-solaris2*): New target. From Pavel
+ Roskin <pavel_roskin@geocities.com>.
+
+1999-01-19 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_size_sections): Count loadable sections as
+ contributing to the size of the current segment.
+
+1999-01-15 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_size_sections): Only update the current
+ address of a region if the section just placed into it is an
+ allocated section.
+
+1999-01-12 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Replace efr30.o with eelf32fr30.o.
+ * Makefile.in: Regenerate.
+
+ * configure.tgt: Replace fr30 with elf32fr30.
+
+ * emulparams/elf32fr30.sh: New file: Replaces fr30.sh, and uses
+ generic elf.sc script. Also replaces the .stack section with a
+ user definable symbol __stack.
+
+1999-01-11 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/fr30.sc: Fill .init and .fini sections with NOP
+ pattern.
+
+1999-01-03 Ken Raeburn <raeburn@cygnus.com>
+
+ * Makefile.am (check-DEJAGNU): No longer provide HOSTING_EMU,
+ HOSTING_CRT0, HOSTING_LIBS; the test suite can extract them from
+ configure.host and configure.tgt now.
+ * Makefile.in: Rebuild.
+
+1998-12-27 Ulrich Drepper <drepper@cygnus.com>
+
+ * lexsup.c (parse_args, case OPTION_RPATH): Avoid adding duplicate
+ elements to rpath.
+
+Thu Dec 10 11:12:28 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * Makefile.am (ALL_EMULATIONS): Remove pe-dll.o and deffilep.o.
+ (ALL_EMUL_EXTRA_OFILES): New variable. Put them here instead.
+ * configure.in: Set EMUL_EXTRA_OFILES to $(ALL_EMUL_EXTRA_OFILES)
+ if configuring with all targets.
+ * configure, Makefile.in, aclocal.m4: Rebuild.
+
+ * emultempl/pe.em (pe_enable_stdcall_fixup): Make static.
+ (pe_dll_do_default_excludes): Removed, unused.
+ (pe_def_file, pe_dll_export_everything, pe_dll_kill_ats,
+ pe_dll_stdcall_aliases): Don't initialize them, this file may be
+ compiled more than once.
+ * pe-dll.c (pe_def_file, pe_dll_export_everything,
+ pe_dll_do_default_excludes, pe_dll_kill_ats,
+ pe_dll_stdcall_aliases): Define and initialize them here instead.
+ (generate_reloc): Fix allocation of reloc_addresses array to use
+ bfd_vma instead of unsigned long. Fix element size in qsort call.
+ (reloc_sort): Compare pointers to bfd_vma instead of unsigned
+ long.
+
+Mon Dec 7 21:10:09 1998 J.J. van der Heijden <j.j.vanderheijden@student.utwente.nl>
+
+ * configure.tgt (i[3456]86-*-mingw32*): Add cygwin target specific
+ files.
+
+Sun Dec 6 16:33:33 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.tgt (m68*-*-gnu*): New target. From Aymeric Vincent
+ <aymeric.vincent@emi.u-bordeaux.fr>.
+
+1998-12-04 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/fr30.sh (TEXT_START_ADDR): Change TEXT_START_ADDR
+ from 0x100000 to 0x10000 so that it fits in 20 bits.
+
+Sat Nov 28 22:32:20 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldemul.h (ldemul_recognized_file): Declare.
+
+Sat Nov 28 22:30:55 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * ldlang.c (lang_add_wild): Don't pretend that there is an input
+ file if the filename is a wildcard pattern.
+
+1998-11-25 DJ Delorie <dj@cygnus.com>
+
+ * ldemul.h (ld_emulation_xfer_struct): new hook "recognized_file"
+ * ldemul.c (ldemul_recognized_file): new function, new hook
+ * ldint.texinfo: document new hook.
+ * ldlang.c (load_symbols): call recognized_hook for all objects we
+ do recognize, in case the emulation needs to handle them
+ specially. PE DLLs use this.
+ * pe-dll.c (pe_dll_generate_def_file): take out hack and debug
+ printfs
+ * emultempl/pe.em (gld_i386_recognized_file): new function
+ (gld_i486_unrecognized_file): take out hack
+
+1998-11-23 DJ Delorie <dj@cygnus.com>
+
+ * pe-dll.c (fill_edata): fill in timestamp
+ (make_head): name object files sequentially to ensure
+ they link in the right order.
+ (make_tail): same here
+ (pe_process_import_defs): use sequential names for bfds to ensure
+ proper link order.
+ (pe_implied_import_dll): new function; handles linking directly
+ against DLLs by simulating IMPORTS directives. * emultempl/pe.em
+ (gld_i386pe_before_parse): hack bfd to not recognize .dll files
+ via bfd_pe_dll_not_recognized_hack
+
+1998-11-23 DJ Delorie <dj@cygnus.com>
+
+ * emultempl/pe.em (gld_i386pe_parse_args): Conditionalize call to
+ pe_dll_add_excludes
+
+Mon Nov 23 14:36:18 1998 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/pe.em (after_parse): Only create an undefined entry
+ symbol if one has been specified.
+
+1998-11-23 DJ Delorie <dj@cygnus.com>
+
+ * emultempl/pe.em (gld_i386pe_after_open): call
+ pe_process_import_defs
+ * pe-dll.c (pe_dll_generate_def_file): calculate BASE from
+ pe_data, only print if actually set. Print version only if
+ set.
+ (save_relocs): save relocs for both input and output.
+ (make_one): support internal/external different names.
+ (pe_dll_generate_implib): support new make_one
+ (pe_process_import_defs): new function; handles IMPORT
+ directives in .def files.
+
+Fri Nov 20 13:06:49 1998 Nick Clifton <nickc@cygnus.com>
+
+ * ldmisc.c (vfinfo): Cope with empty symbol names.
+
+Thu Nov 19 13:31:15 1998 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/pe.sc: Add provision of '_end' symbol.
+
+Wed Nov 18 18:18:43 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.tgt: change refs from cygwin32* to cygwin*.
+ * aclocal.m4: regenerate
+ * configure.in: don't need to call AM_CYGWIN32.
+ * configure: regenerate
+
+Mon Nov 16 22:14:07 1998 DJ Delorie <dj@cygnus.com>
+
+ * emultempl/pe.em (gld_i386_finish): generate import library
+ * deffile.h: add hint member.
+ * pe-dll.c (pe_dll_generate_implib): New function with helpers;
+ generates the import library directly from the export table.
+ (fill_edata): remember the actual hint for the import library.
+
+Sat Nov 14 14:36:24 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.1: Some cleanups from NOKUBI Hirotaka <hnokubi@yyy.or.jp>.
+
+Thu Nov 12 19:21:57 1998 Dave Brolley <brolley@cygnus.com>
+
+ * po/ld.pot: Regenerated.
+ * po/POTFILES.in: Regenerated.
+ * configure: Regenerated.
+ * aclocal.m4: Regenerated.
+ * Makefile.in: Regenerated.
+
+Wed Nov 11 18:10:15 1998 DJ Delorie <dj@cygnus.com>
+
+ * pe-dll.c (generate_reloc): don't output PE relocs for sections
+ that won't be loaded.
+
+Wed Nov 11 13:44:54 1998 DJ Delorie <dj@cygnus.com>
+
+ * pe-dll.c (fill_edata): don't strip underscores
+
+Tue Nov 10 21:28:19 1998 DJ Delorie <dj@cygnus.com>
+
+ * ld.texinfo: added i386pe option summary
+
+Tue Nov 10 17:53:17 1998 DJ Delorie <dj@cygnus.com>
+
+ * pe-dll.c (process_def_file): properly note undefined exported
+ symbols, clean up old code.
+ (pe_dll_generate_def_file): don't crash if pe_def_file is NULL
+ * emultempl/pe.em (gld_i386_parse_args): add
+ (en/dis)able-stdcall-fixups
+ (pe_fixup_stdcalls): warn about stdcall fixups
+ (gld_i386_unrecognized_file): make exported symbols undefs so that
+ archive members get pulled in
+
+Tue Nov 10 14:50:51 1998 Catherine Moore <clm@cygnus.com>
+
+ * scripttempl/elfd10v.sc: Add KEEP attribute to .init,
+ .fini, .dtors and .ctors. Add .data and .text
+ wildcards to support section garbage collection.
+
+Mon Nov 9 22:52:50 1998 DJ Delorie <dj@indy.delorie.com>
+
+ * deffilep.y: properly handle relocs with multiple def_files,
+ cache import module names
+
+Mon Nov 9 22:44:58 1998 DJ Delorie <dj@cygnus.com>
+
+ * pe-dll.c (process_def_file): don't assume exports won't move
+ during a realloc
+
+Mon Nov 9 16:41:30 1998 DJ Delorie <dj@cygnus.com>
+
+ * pe-dll.c: New file; direct support for PE DLLs
+ * deffile.h: New file; direct support for PE DLLs
+ * deffilep.y: New file; direct support for PE DLLs
+ * emultempl/pe.em: add direct support for PE DLLs
+ * configure.tgt: allow target-specific extra files
+ * configure.in: allow target-specific extra files
+ * ldlang.c (lang_add_assignment): return the assignment so that
+ one can change the value later based on the object files (pe-dll
+ DEF files do this)
+ * ldint.texinfo: add section for emulation walkthrough
+ * Makefile.am: add new files and target-specific extra files
+ * emultempl/pe.em (gld_i386_list_options): list dll-specific
+ options.
+ * pe-dll.c (process_def_file): auto-export everything if
+ nothing is otherwise exported.
+
+Wed Nov 4 16:39:18 1998 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Add support for FR30 target.
+ * configure.tgt: Add support for FR30 target.
+ * Makefile.in: Regenerate.
+ * emulparams/fr30.sh: New file.
+ * scripttemp/fr30.sc: New file.
+
+Mon Nov 2 14:47:15 1998 Catherine Moore <clm@cygnus.com>
+
+ * ldmain.c (main): Don't report error for dynamic links and
+ --gc-sections.
+
+1998-10-26 16:05 Ulrich Drepper <drepper@cygnus.com>
+
+ * lexsup.c (ld_options): Change text of -O to Optimize output file".
+ (parse_args): Set link_info.optimize based on -O argument.
+ * ldmain.c (main): Initialize link_info.optimze to false.
+ * ld.texinfo: Describe -O option.
+ * ld.1: Likewise.
+
+Mon Oct 12 14:29:56 1998 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/v850.sc: Move .sbss and .scommon sections into their
+ own segment, so that they can be next to the .bss section and so
+ initialised by the same piece of code.
+
+Fri Oct 9 15:59:52 1998 Catherine Moore <clm@cygnus.com>
+
+ * scripttempl/elf.sc: Merge .sdata.* etc sections.
+ * ldctor.c (ldctor_build_sets): Set SEC_KEEP for
+ ctor sections.
+
+Mon Oct 5 09:40:43 1998 Catherine Moore <clm@cygnus.com>
+
+ * ldmain.c (main): Error if --gc-sections and
+ dyanmic linking.
+ * scripttempl/v850.sc: Add KEEP attribute to .init,
+ .fini, .dtors and .ctors. Add .data and .text
+ wildcards to support section garbage collection.
+
+Wed Sep 30 11:19:15 1998 Nick Clifton <nickc@cygnus.com>
+
+ * scripttempl/v850.sc: Rename .call_table section to
+ .call_table_data and create a new section called
+ .call_table_text.
+
+Sun Sep 20 00:43:26 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/elf.sc: Add alignment at the end of the .bss
+ section, so that it is included in the memsize of the segment.
+
+Fri Sep 18 13:42:42 1998 Catherine Moore <clm@cygnus.com>
+
+ * emultempl/elf32.em (gld_place_orphan): Don't process for
+ sections with SEC_EXCLUDE flag.
+
+Fri Sep 4 09:24:02 1998 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/d30velf.sh (TEXT_SIZE): Increased to 2000K.
+ (DATA_SIZE): Increased to 2000K.
+
+Thu Sep 3 17:30:58 1998 Richard Henderson <rth@cygnus.com>
+
+ * emulparams/d10velf.sh (TEMPLATE_NAME): Use elf32.
+
+Mon Aug 31 01:06:00 1998 Catherine Moore <clm@cygnus.com>
+
+ * Makefile.am: Change armelf.sc to elf.sc
+ * Makefile.in: Regenerate.
+
+Mon Aug 31 11:12:04 1998 Catherine Moore <clm@cygnus.com>
+
+ * emulparams/armelf.sh: Change SCRIPT_NAME to
+ elf. Change TEXT_START_ADDR to 0x8000. Define
+ OTHER_TEXT_SECTIONS, OTHER_BSS_SYMBOLS and
+ OTHER_BSS_END_SYMBOLS.
+ * scripttempl/elf.sc: Modify to use
+ OTHER_BSS_END_SYMBOLS.
+ * scripttempl/elfarm.sc: Remove file.
+
+Tue Aug 18 12:05:34 1998 Catherine Moore <clm@cygnus.com>
+
+ * emultempl/armelf.em (gld_armelf_before_allocation):
+ Add bfd_ prefix to elf32_arm_process_before_allocation
+ and elf32_arm_allocate_interworking_sections.
+ (gld_armelf_after_open): Add bfd_ prefix to
+ elf32_arm_get_bfd_for_interworking.
+
+Fri Aug 14 15:34:29 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+ * ldgram.y: Include "ldctor.h".
+ (statement): Accept SORT around CONSTRUCTORS.
+ * ldctor.c: Include <ctype.h>.
+ (constructors_sorted): New global variable.
+ (ctor_prio, ctor_cmp): New static functions.
+ (ldctor_build_sets): Sort constructors if requested.
+ * ldctor.h (constructors_sorted): Declare.
+ * ldlang.c (print_statement): Print sorted CONSTRUCTORS
+ correctly.
+ * scripttempl/elf.sc: Add sort around CONSTRUCTORS.
+ * ld.texinfo (Output Section Keywords): Document SORT
+ (CONSTRUCTORS).
+
+Thu Aug 13 12:20:39 1998 Catherine Moore <clm@cygnus.com>
+
+ * emulparams/armelf.sh: Define TEMPLATE_NAME to armelf.
+ * scripttempl/elfarm.sc: Include .glue_7t and .glue7
+ sections.
+ * emultempl/armelf.em: New file.
+
+Thu Aug 13 12:52:45 1998 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (ld.dvi): Use " instead of ' for MAKEINFO.
+ * Makefile.in: Rebuild.
+
+Tue Aug 11 16:17:01 1998 Catherine Moore <clm@cygnus.com>
+
+ * scripttempl/elfarm.sc: Change text start address
+ back to zero.
+
+Tue Aug 11 10:01:12 1998 Jeffrey A Law (law@cygnus.com)
+
+ * emulparms/mn10200.sh (MAX_PAGESIZE): Define to 1.
+ * emulparms/mn10300.sh (MAX_PAGESIZE): Define to 1.
+
+Sun Aug 9 20:31:27 1998 Catherine Moore <clm@cygnus.com>
+
+ * scripttempl/elfarm.sc: Set text start address to
+ 0x8000. Add __bss_end definition.
+
+Sat Aug 1 11:47:37 1998 Catherine Moore <clm@cygnus.com>
+
+ * scripttempl/elfarm.sc: New file.
+ * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm.
+
+Fri Jul 31 15:56:16 1998 Catherine Moore <clm@cygnus.com>
+
+ * emulparams/armelf.sh: New file.
+ * configure.tgt: Recognize thumb-elf and arm-elf.
+ * Makefile.am (earmelf.o): New.
+ * Makefile.in: Rebuild.
+
+Fri Jul 24 12:00:57 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (install-exec-local): Don't remove the file before
+ checking whether $(bindir) == $(tooldir)/bin. From Maciej
+ W. Rozycki <macro@ds2.pg.gda.pl>.
+ * Makefile.in: Rebuild.
+
+ * configure.tgt: Recognize h8[35]00*-coff* as well as -hms*.
+
+Thu Jul 23 11:15:12 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/aout.sc: If ALIGNMENT is defined, use it to set
+ alignment of end symbol.
+ * scripttempl/elf.sc: Likewise.
+ * emulparams/sun4.sh (ALIGNMENT): Define.
+ * emulparams/elf32_sparc.sh (ALIGNMENT): Define.
+ * ldint.texinfo (emulation parameters): Document ALIGNMENT.
+
+ * lexsup.c (parse_args): Add missing break statement.
+
+ * ldlang.c (lang_gc_sections_1): Add default case to switch to
+ avoid warnings.
+
+Tue Jul 14 15:42:17 1998 Richard Henderson <rth@cygnus.com>
+
+ * configure.tgt (i?86-*-beos{pe,elf,}*): Recognize.
+ * Makefile.am (ei386beos.o): New.
+ * emulparams/i386beos.sh: New file.
+ * emultempl/beos.em, scripttempl/i386beos.sc: New file.
+
+Tue Jul 14 15:35:42 1998 Richard Henderson <rth@cygnus.com>
+
+ * lexsup.c: New option --version-exports-section.
+ * ld.h (struct args_type): Add version_exports_section.
+ * ldlang.c (lang_do_version_exports_section): New function.
+ (lang_process): Call it.
+
+Mon Jul 13 13:20:23 1998 Steve Chamberlain <sac@transmeta.com>
+
+ * ldlex.l: Accept ASSERT.
+ * ldgram.y (exp): Add ASSERT_K case.
+ * ldexp.h (node_type): Add etree_assert to node_class enum.
+ (etree_type): Add assert_s field.
+ (exp_assert): Declare.
+ * ldexp.c (exp_fold_tree): Handle etree_assert.
+ (exp_assert): New function.
+ (exp_print_tree): Handle etree_assert.
+ * ld.texinfo (Miscellaneous Commands): Document ASSERT.
+
+Wed Jul 8 14:03:12 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldgram.y: Change MAX to MAX_K and MIN to MIN_K, to avoid
+ conflicts with system header files. Change all uses.
+
+ * Makefile.am (MAINTAINERCLEANFILES): Define.
+ * Makefile.in: Rebuild.
+
+Tue Jul 7 18:03:22 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (ldver.texi): New target.
+ (ld.info, ld.dvi): Depend upon ldver.texi.
+ * ld.texinfo: Include ldver.texi. Mention version number on title
+ page and in top node.
+ * Makefile.in: Rebuild.
+
+Mon Jul 6 14:55:13 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.tgt (i[3456]86-*-solaris*): New target.
+
+Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (wild_section): Don't get an assertion failure if the
+ section is discarded.
+
+ * scripttempl/pe.sc: Use SORT to sort sections appropriately.
+ * emultempl/pe.em (sort_by_file_name): Remove.
+ (sort_by_section_name): Remove.
+ (sort_sections_1, sort_sections): Remove.
+ (gld_${EMULATION_NAME}_before_allocation): Don't call
+ sort_sections.
+ (hold_section, hold_section_name): New static variables.
+ (hold_use, hold_text, hold_rdata, hold_data, hold_bss): Likewise.
+ (gld_${EMULATION_NAME}_place_orphan): Rewrite. Look for a good
+ place to put the section. Align the section. Sort the input
+ sections by name.
+ (gld_${EMULATION_NAME}_place_section): New static function.
+
+ * ldlang.c (wild_sort): When sorting by file name, sort by archive
+ name first.
+
+ * emultempl/pe.em (set_pe_subsystem): Don't call
+ ldlang_add_undef.
+ (gld_${EMULATION_NAME}_after_parse): New static function.
+ (ld_${EMULATION_NAME}_emulation): Use new after_parse function
+ rather than after_parse_default.
+
+ * ldgram.y (extern_name_list): Do not require symbols to be
+ separated by commas.
+ (ifile_p1): Add EXTERN.
+ * ldlex.l: Accept EXTERN in BOTH and SCRIPT mode as well as MRI
+ mode.
+ * ld.texinfo (Options): Mention that EXTERN is equivalent to -u.
+ (Miscellaneous Commands): Document EXTERN.
+
+Wed Jul 1 19:40:34 1998 Richard Henderson <rth@cygnus.com>
+
+ * ld.h (args_type): Add gc_sections.
+ * ldgram.y (ldgram_had_keep, KEEP): New.
+ (input_section_spec_no_keep): Rename from old input_section_spec.
+ (input_section_spec): New. Recognize KEEP.
+ * ldlang.c (wild_section): Handle keep sections.
+ (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New.
+ (lang_gc_sections_1, lang_gc_sections): New.
+ (lang_process): Invoke lang_gc_sections.
+ (lang_add_wild): Add keep argument. Update all callers.
+ * ldlang.h (lang_wild_statement_struct): Add keep_sections.
+ * ldlex.l (KEEP): Match it.
+ * ldmain.c (main): Error on -r and --gc-sections.
+ * lexsup.c: Add --gc-sections.
+
+ * scripttempl/elf.sc: Merge .text.* etc sections appropriately.
+ Mark startup sections with KEEP.
+ * scripttempl/elfppc.sc: Likewise.
+
+ * ld.texinfo: Update for --gc-sections and KEEP.
+
+Wed Jul 1 15:21:20 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ From Peter Jordan <pjordan@chla.usc.edu>:
+ * scripttempl/i386go32.sc: Correct constructor handling for -u.
+
+Tue Jun 23 15:17:27 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (install-data-local): Make ldscripts subdirectory.
+ * Makefile.in: Rebuild.
+
+Tue Jun 23 15:17:04 1998 Mike Stump <mrs@wrs.com>
+
+ * Makefile.am (install-exec-local): Don't let EXEEXT interfere
+ with the program transform name.
+ * Makefile.in: Rebuild.
+
+Sun Jun 21 23:55:16 1998 Jeffrey A Law (law@cygnus.com)
+
+ * ld.texinfo: Note that -relax may make symbolic debugging
+ impossible on some platforms.
+
+Tue Jun 16 12:51:13 1998 Geoff Keating <geoffk@ozemail.com.au>
+
+ * Makefile.am (Makefile): Remove target.
+ (config.status): New target.
+ * Makefile.in: Rebuild.
+
+ * configure.host (powerpc*-*-linux-gnu*): New host.
+
+Fri Jun 12 17:38:07 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * scripttempl/elf.sc (INPUT_FILES): Optional INPUT spec.
+
+ * emulparams/m32relf.sh (OTHER_RELOCATING_SECTIONS): Change top of
+ stack to 8MB.
+
+Fri Jun 12 19:33:17 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (HFILES): Remove config.h.
+ (EMULATION_OFILES, POTFILES): Move patch of May 14 from
+ Makefile.in to Makefile.am.
+ (earmcoff.c): Depend upon armcoff.em, not generic.em.
+ * po/Make-in (all-yes): Correct misspelling in $(PACKAGE).
+ ($(srcdir)/$(PACKAGE).pot): Pass -C to $(XGETTEXT).
+ * Makefile.in, po/POTFILES.in, po/ld.pot: Rebuild.
+
+Fri Jun 12 13:43:17 1998 Tom Tromey <tromey@cygnus.com>
+
+ * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
+ ($(PACKAGE).pot): Unconditionally depend on POTFILES.
+
+Tue Jun 9 09:36:48 1998 Nick Clifton <nickc@cygnus.com>
+
+ * ldlang.c (lang_finish): Add CONST type modifier to declaration
+ of 'send'.
+
+Fri Jun 5 18:19:59 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set
+ config.has_shared to true.
+ * emultempl/linux.em (gld${EMULATION_NAME}_before_parse):
+ Likewise.
+ * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse):
+ Likewise.
+
+Tue Jun 2 12:55:03 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlang.c (lang_finish): If the entry symbol is not found, try
+ parsing it as a number.
+ * ld.texinfo (Options): Document this.
+
+Mon Jun 1 14:01:20 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.texinfo (Input Section Wildcards): Document SORT keyword.
+
+Mon May 18 12:42:53 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * ld.h (ld_config_type): New member has_shared.
+ * ldmain.c (main): Initialize it.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set it.
+ * lexsup.c (parse_args): Treat -shared as error if not supported.
+
+Mon May 18 13:14:43 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ From Jason Merrill <jason@cygnus.com>:
+ * ldlang.c (wild_sort): Correct order of sort.
+ * scripttempl/elf.sc: Put *crtbegin.o before other .ctors and
+ .dtors.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfppc.sc: Likewise.
+
+Fri May 15 00:22:35 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldlex.l: Recognize keyword SORT.
+ * ldgram.y (current_file): Change to struct wildcard_spec.
+ (%union): Add new fields cname and wildcard.
+ (wildcard_name, wildcard_spec): New nonterminals.
+ (file_NAME_list): Use wildcard_spec.
+ (input_section_spec): Change current_file usage.
+ * ld.h (struct wildcard_spec): Define.
+ * ldlang.h (lang_wild_statement_struct): Add new fields
+ sections_sorted and filenames_sorted.
+ (lang_add_wild): Update declaration.
+ * ldlang.c (wild_sort): New static function.
+ (wild_section): Use wild_sort.
+ (print_wild_statement): Print sorting information.
+ (lang_add_wild): Add new parameters sections_sorted and
+ filenames_sorted. Change all callers.
+ * mri.c (mri_draw_tree): Update calls to lang_add_wild.
+ * scripttempl/elf.sc: Sort .ctors.* and .dtors.* by section name.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfppc.sc: Likewise.
+
+Thu May 14 18:39:16 1998 Richard Henderson <rth@cygnus.com>
+
+ * emulparams/m32relf.sh (TEMPLATE_NAME): Define.
+
+Thu May 14 14:51:24 1998 Nick Clifton <nickc@cygnus.com>
+
+ * ldemul.h: Add new prototype: ldemul_list_emulation_options.
+ (ld_emulation_xfer_struct): Add new field: list_options.
+ * ldemul.c (ldemul_list_options): New function. Call the
+ list_options field of the ld_emulation_xfer_struct for each
+ supported emulation, if such a function is present.
+ * lexsup.c (help): Call ldemul_list_emulation_options.
+ * emultempl/pe.em (gld_<>_list_options): New function. Describe
+ the pe emulation specific command line options.
+ * emultempl/armcoff.em (gld<>_list_options): New function.
+ Describe the armcoff emulation specific command line options.
+
+ * emultempl/pe.em: Add a new command line option:
+ --support-old-code.
+ * emultempl/armcoff.em: Ditto.
+ * ld.texinfo: Document the --support-old-code option.
+
+ * Makefile.in: Add emulation files for POTFILES.in target.
+ * emultempl/pe.em: Internationalise suitable strings.
+ * emultempl/armcoff.em: Internationalise suitable strings.
+ * po/POTFILES.in: Rebuilt.
+
+Sun May 10 22:36:30 1998 Jeffrey A Law (law@cygnus.com)
+
+ * po/Make-in (install-info): New target.
+
+Tue Apr 28 19:18:30 1998 Tom Tromey <tromey@cygnus.com>
+
+ * ldmain.c (main): Conditionally call setlocale.
+ * ld.h: Include <locale.h> if HAVE_LOCALE_H.
+ (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
+
Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Set version number to 2.9.1.
+ * configure.in: Change version number to 2.9.4
* configure: Rebuild.
+ * ld.texinfo (Options) [-rpath-link]: Mention ld.so.conf.
+
Based on patch from H.J. Lu <hjl@gnu.org>:
* emultempl/elf32.em (global_vercheck_needed): New file static
variable.
@@ -16,6 +2016,66 @@ Mon Apr 27 11:56:21 1998 Ian Lance Taylor <ian@cygnus.com>
whether the libraries needs any incompatible versions.
(gld${EMULATION_NAME}_vercheck): New static function.
+Wed Apr 22 16:01:35 1998 Tom Tromey <tromey@cygnus.com>
+
+ * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
+
+Wed Apr 22 12:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (check-DEJAGNU): Add $(INTLLIBS) to LIBIBERTY when
+ invoking runtest.
+ * Makefile.in: Rebuild.
+
+ * lexsup.c (parse_args): Change -l options into --library options
+ to avoid confusion between -li and -library.
+
+ * ld.texinfo (MEMORY): Clarify use of >REGION.
+
+Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com>
+
+ * Many files: Added gettext invocations around user-visible
+ strings.
+ * ld.h: Added gettext-related includes and defines.
+ * ldmain.c: Call setlocale, bindtextdomain, textdomain.
+ * 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.
+ (TDIRS): AC_SUBST early on, to avoid having value split when it
+ happens to cross line 90 of the generated sed script.
+ * Makefile.am (SUBDIRS): New macro.
+ (POTFILES): Likewise.
+ (po/POTFILES.in): New target.
+ (ld_new_LDADD): Added INTLLIBS.
+ (ld_new_DEPENDENCIES): Added INTLDEPS.
+ * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
+
+Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.texinfo (Simple Example): Rewrite a few things as suggested
+ by Nick Clifton <nickc@cygnus.com>.
+ (PROVIDE): Likewise.
+
+Tue Apr 21 09:55:06 1998 Nick Clifton <nickc@cygnus.com>
+
+ * emultempl/pe.em: Rename external arm interworking functions
+ to conform to BFD naming conventions. Add code to _after_open()
+ function to obtain a bfd for use by the interworking code.
+
+ * emultempl/armcoff.em: Rename external arm interworking functions
+ to conform to BFD naming conventions. Add new _after_open()
+ function to obtain a bfd for use by the interworking code.
+
+Sun Apr 19 19:23:09 1998 Richard Henderson <rth@cygnus.com>
+
+ * ldlang.c (lang_size_sections) [case lang_assignment_statement_enum]:
+ Update dot and the default memory section even when relaxing.
+
+Sat Apr 18 18:41:12 1998 Richard Henderson <rth@cygnus.com>
+
+ * ldlang.c (lang_one_common): Manipulate the section's cooked size
+ rather than its raw size.
+
Tue Apr 7 13:35:29 1998 H.J. Lu <hjl@gnu.org>
* configure.in (TESTBFDLIB): New. Defined and substituted.
@@ -37,21 +2097,27 @@ Sun Apr 5 13:07:57 1998 Ian Lance Taylor <ian@cygnus.com>
* scripttempl/pe.sc: Use shell variables to avoid depending upon
how $ is handled when expanding a shell substitution.
-Fri Apr 3 13:31:46 1998 Ian Lance Taylor <ian@cygnus.com>
+Fri Apr 3 00:56:50 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (MOSTLYCLEANFILES): Add ld.log and ld.sum.
- (DISTCLEANFILES): Define with site.exp and site.bak.
+ (DISTCLEANFILES): Add site.exp and site.bak.
* Makefile.in: Rebuild.
- * Makefile.am (DISTCLEANFILES): Remove.
+ * configure.in: Put the tdirs in a file and use AC_SUBST_FILE,
+ rather than in a shell variable and using AC_SUBST.
+ * Makefile.am (DISTCLEANFILES): Remove ldscripts. Add tdirs.
(distclean-local): New target.
- * Makefile.in: Rebuild.
+ * configure, Makefile.in: Rebuild.
+
+ * ld.texinfo: Completely rewrite linker script documentation.
-Mon Mar 30 16:12:48 1998 Ian Lance Taylor <ian@cygnus.com>
+Mon Mar 30 12:47:33 1998 Ian Lance Taylor <ian@cygnus.com>
- * configure.in: Set version number to 2.9.
+ * configure.in: Set version to 2.9.1.
* configure: Rebuild.
+ * Branched binutils 2.9.
+
Sat Mar 28 16:48:19 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (MOSTLYCLEANFILES): Remove tmpdir.
@@ -131,6 +2197,12 @@ Mon Mar 2 19:24:08 1998 Michael Meissner <meissner@cygnus.com>
* ldlang.c (lang_size_sections): If the default memory region is
*default*, see if there is a memory region that could be used.
+Thu Feb 26 17:09:53 1998 Michael Meissner <meissner@cygnus.com>
+
+ * scripttempl/elfd30v.sc: Add support for .eit_v section and put
+ it at 0xfffff020.
+ * emulparams/d30v{elf,_o,_e}.sh: Ditto.
+
Mon Feb 23 17:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
* emultempl/pe.em (sort_sections): Permit the wildcard to include
@@ -250,7 +2322,7 @@ Wed Jan 28 14:06:30 1998 Richard Henderson <rth@cygnus.com>
* emulparams/elf64_sparc.sh (ELFSIZE): 64
(TEXT_START_ADDR): Round off, since SIZEOF_HEADERS is added later.
(DATA_PLT): Needed by v9 abi.
-
+
Wed Jan 28 16:37:27 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
* configure.tgt (i[3456]86-*-mingw32*): New entry.
@@ -318,6 +2390,17 @@ Fri Jan 2 20:15:37 1998 Michael Meissner <meissner@cygnus.com>
(lang_set_flags): Update prototype to match new calling sequence.
(lang_memory_region_default): Add prototype.
+ * emulparams/d30v{_e,_o,elf}.sh ({TEXT,DATA,EMEM}_DEF_SECTION):
+ Define whether or not the region gets default sections, and if so,
+ what sections.
+
+ * scripttempl/elfd30v.sc (MEMORY): Set up which of the regions get
+ default sections.
+
+Thu Jan 1 22:58:04 1998 Michael Meissner <meissner@cygnus.com>
+
+ * scripttempl/elfd30v.sc (.eh_frame): Link into the data section.
+
Thu Jan 1 18:04:51 1998 Jeffrey A Law (law@cygnus.com)
* scripttempl/h8300h.sc: Fix typo.
@@ -335,22 +2418,71 @@ Wed Dec 17 12:14:11 1997 Ian Lance Taylor <ian@cygnus.com>
multiple times on the same argument and confuse the getopt
internals.
+Thu Dec 11 09:00:15 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.tgt (d30v-elf-*): Rename d30velf_e to d30v_e and
+ d30velf_o to d30v_o to work in DOS environments.
+ * Makefile.{am,in}: Ditto.
+
+ * emulparams/d30v_{o,e}: Rename from d30velf_{o,e}.
+ * emulparams/d30velf_{o,e}: Deleted.
+
Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com>
* scripttempl/armcoff.sc: Add glue sections (code taken from Arm
- branch).
+ branch).
* emulparams/armcoff.sh (TEMPLATE_NAME): Set to armcoff.
* emultempl/armcoff.em: New file, imported from Arm branch.
+Wed Dec 10 14:10:44 1997 Michael Meissner <meissner@cygnus.com>
+
+ * scripttempl/elfd30v.sc: Add .rel and .rela sections for all
+ defined sections. Set up __{D,C}TOR_{LIST,END}__. Add onchip and
+ external memory sections for rodata. Delete .string, .rodata1,
+ and .data1 sections.
+
Tue Dec 9 15:28:17 1997 Michael Meissner <meissner@cygnus.com>
* Makefile.am: Add Oct 23 changes to Makefile.in here.
* Makefile.{am,in}: (ALL_EMULATIONS): Add ed10velf.o.
-
+ * Makefile.{am,in}: (ALL_EMULATIONS): Add etic80coff.o.
+
+ * Makefile.{am,in}: (ALL_EMULATIONS): Add ed30velf{,_e,_o}.o.
+ (ed30velf_e.c): Like d30velf, except .text/.data/etc always go in
+ external memory.
+ (ed30velf_o.c): Like d30velf, except .text/.data/etc always go in
+ onchip memory.
+
+ * emulparams/d30velf.sh (STACK_START_ADDR): Top of default
+ stack.
+ ({TEXT,DATA,EMEM}_SIZE): Sizes of the 3 memory areas.
+ ({TEXT,DATA,BSS}_MEMORY): Which memory region .text, .data, and
+ .bss should go in.
+
+ * emulparams/d30velf_{e,o}.sh: New files to be explicit whether
+ .text, .data, etc go in external memory or onchip memory.
+
+ * configure.tgt (d30v-*-*ext*): New configuration to default
+ .text, .data, etc. in external memory.
+ (d30v-*-*onchip*): New configuration to default .text, .data,
+ etc. in onchip memory.
+ (d30v-*-*): Add d30velf_{e,o} emulations.
+
+ * scripttempl/elfd30v.sc: Allow .text, .data, .bss to be put in
+ either the onchip text/data areas or the external memory area.
+ (MEMORY): Get sizes from d30velf.sh.
+ (.e{data,text,bss}): Put sections in the external memory region.
+ (.stext): Put section in the onchip text region.
+ (.s{data,bss}): Put sections in the onchip data region.
+ (__stack): Assign from ${STACK_START_ADDR}.
+ (.text): Put in ${TEXT_MEMORY} memory region.
+ (.data{,1}/.strings/.rodata{,1}): Put in ${DATA_MEMORY} memory
+ region.
+ (.bss): Put in ${BSS_MEMORY} memory region.
Tue Dec 2 10:14:47 1997 Nick Clifton <nickc@cygnus.com>
@@ -363,6 +2495,18 @@ Sat Nov 22 15:23:19 1997 Ian Lance Taylor <ian@cygnus.com>
correctly. Pass 0 rather than hex_mode to bfd_scan_vma.
* ldlex.h (hex_mode): Don't declare.
+Sun Nov 16 20:16:45 1997 Michael Meissner <meissner@cygnus.com>
+
+ * emulparams/d30velf.sh ({DATA,EMEM}_START_ADDR): Define as start
+ of internal data area and external memory on chip.
+
+ * scripttempl/elfd30v.sc: Define a MEMORY region that describes
+ the 3 regions of memory on the chip. Put .text/.init/.fini into
+ the text memory region, put other segments into the data memory
+ region. Add more of the standard elf sections. Default __stack
+ to be 0x20008000, which is 1 byte beyond end of the internal data
+ region.
+
Thu Nov 13 13:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
* configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd
@@ -448,7 +2592,7 @@ Thu Oct 2 18:40:28 1997 Ian Lance Taylor <ian@cygnus.com>
Wed Oct 1 16:41:00 1997 Nick Clifton <nickc@cygnus.com>
* emulparams/v850.sh (ROZDATA_START_ADDR, ROSDATA_START_ADDR): New
- Variables.
+ Variables.
* scripttempl/v850.sc: Move read only areas out of zero and small
data sections and into their own sections.
@@ -474,6 +2618,17 @@ Wed Sep 17 16:45:34 1997 Nick Clifton <nickc@cygnus.com>
* Makefile.am, Makefile.in: Add rule for ev850.c
* configure.tgt (targ_extra_emuls): Add v850 target.
+Wed Sep 17 16:43:39 1997 Nick Clifton <nickc@cygnus.com>
+
+ * emulparams/v850.sh (CALL_TABLE_START_ADDR): New entry.
+ * scripttempl/v850.sc: Add call table data area
+
+Mon Sep 15 11:29:13 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ Merge change from Martin Hunt:
+
+ * scripttempl/elfd30v.sc: Put .rodata in the .text section.
+
Tue Sep 9 07:49:56 1997 Fred Fish <fnf@ninemoons.com>
* ldlang.c (lang_memory_region_lookup): Remove extraneous
@@ -516,6 +2671,13 @@ Wed Aug 20 11:14:13 1997 Ian Lance Taylor <ian@cygnus.com>
* ld.texinfo (Section Definition): Clarify use of whitespace.
(Section Placement): Likewise.
+Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.tgt (targ_extra_emuls): Add support for v850e target.
+
+Mon Aug 18 11:12:03 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.tgt (targ_extra_emuls): Add support for v850e target.
Sat Aug 9 00:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -681,6 +2843,13 @@ Mon May 5 18:19:55 1997 Philip Blundell <pjb27@cam.ac.uk>
* configure.tgt, configure.host: cope with '*-*-linux-gnuaout'
targets.
+Fri May 2 15:54:28 1997 Mike Meissner <meissner@cygnus.com>
+
+ * scripttempl/tic80coff.sc (.text): Add a leading underscore to
+ __{D,C}TOR_{LIST,END}__ definations. Rearrange the order of items
+ in the .text section. Move .const, .ctors, .dtors into separate
+ sections.
+
Wed Apr 30 12:23:21 1997 Manfred Hollstein <manfred@s-direktnet.de>
* scripttempl/m88kbcs.sc (__.initp.end, _etext): Added whitespace
@@ -826,12 +2995,26 @@ Sun Mar 9 23:06:35 1997 Eric Youngdale <eric@andante.jic.com>
* ldgram.y (vers_node): Correct typo of '(' for '{'.
+Fri Mar 7 18:40:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * scripttempl/tic80coff.sc (ENTRY): Entry symbol is __start
+ rather than _start.
+ (__edata): Define this rather than "edata".
+ (__end): Define this rather than "end".
+
+Tue Mar 4 17:18:35 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.tgt (tic80-*-*): Allow dropping of -coff.
+
Sun Mar 2 22:59:49 1997 Fred Fish <fnf@cygnus.com>
* Makefile.in (ld.dvi): Set MAKEINFO environment variable as well
as TEXINPUTS. Needed for building in separate build dir.
* ldint.texinfo (SCRIPT_NAME): Fix typo.
-
+ * emulparams/tic80coff.sh: Rewrite to include internal documentation
+ about each shell variable that is set (or not set).
+ * scripttempl/tic80coff.sc: Complete rewrite.
+
Fri Feb 28 17:42:27 1997 Ian Lance Taylor <ian@cygnus.com>
* ldmain.c (main): Call bfd_set_default_target.
@@ -906,6 +3089,13 @@ Mon Feb 24 18:16:09 1997 Ian Lance Taylor <ian@cygnus.com>
* scripttempl/elf.sc: Add .gnu.version sections.
* ld.texinfo: Document symbol versioning.
+Fri Feb 21 17:37:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * Makefile.in (ed30velf.c): New target.
+ * configure.tgt (d30v-*-*): New target.
+ * emulparams/d30velf.sh: New file.
+ * scripttempl/elfd30v.sc: New file.
+
Fri Feb 14 18:28:31 1997 Ian Lance Taylor <ian@cygnus.com>
* ld.texinfo (Option Commands): Document the INCLUDE command.
@@ -925,6 +3115,13 @@ Tue Feb 11 15:34:26 1997 Ian Lance Taylor <ian@cygnus.com>
* scripttempl/elfmips.sc: When relocating, put .mips16.fn.* and
.mips16.call.* in .text.
+Sun Feb 9 18:09:13 1997 Fred Fish <fnf@cygnus.com>
+
+ * emulparams/tic80coff.sh: New (dummy) file for TIc80.
+ * scripttempl/tic80coff.sc: New (dummy) file for TIc80.
+ * Makefile.in (etic80coff.c): Add target and rule to build it.
+ * configure.tgt (tic80-*-coff): Set targ_emul to tic80coff.
+
Fri Jan 31 13:16:53 1997 Ian Lance Taylor <ian@cygnus.com>
* emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Search for
@@ -1045,7 +3242,7 @@ Fri Dec 13 14:08:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
where the different sections go. Change some whitespace.
* emulparams/v850.sh ({TEXT,{Z,S,T}DATA}_START_ADDR): Define
- appropriately. Remove crud not used anymore.
+ appropriately. Remove crud not used anymore.
Fri Dec 13 10:19:57 1996 Jeffrey A Law (law@cygnus.com)
@@ -1108,7 +3305,7 @@ Tue Nov 5 10:57:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* emulparams/d10velf.sh (READONLY_START_ADDR): Changed to 0x2000004.
(EMBEDDED): Define.
-
+
Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com>
* ld.texinfo: Add section on reporting bugs.
@@ -1123,10 +3320,10 @@ Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com)
Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * emulparams/d10velf.sh: Changes needed for D10V-EVA board.
- Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to
+ * emulparams/d10velf.sh: Changes needed for D10V-EVA board.
+ Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to
0x2000000.
-
+
* scripttempl/elfd10v.sc: Fix calculation of .text. Change
.stack to start at 0x2007ffe.
@@ -1895,7 +4092,7 @@ Thu May 9 08:52:23 1996 Rob Savoye <rob@chinadoll.cygnus.com>
* emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}:
Set a new variable to signify if the final target is an embedded
- system.
+ system.
* scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to
.text for an embedded system.
@@ -2438,7 +4635,7 @@ Wed Jan 31 17:30:19 1996 Steve Chamberlain <sac@slash.cygnus.com>
* configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New.
* emultempl/pe.em (definfo init): Make the default stack reserve
of a PPC larger.
-
+
Wed Jan 31 14:34:23 1996 Richard Henderson <rth@tamu.edu>
* configure.tgt (m68*-apple-aux*): New target.
@@ -2866,7 +5063,7 @@ Fri Oct 27 18:03:17 1995 Niklas Hallqvist <niklas@appli.se>
m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd,
pc532machaout,riscix,sa29200,sh,shl,sparclynx,sparcnbsd,
st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed
- PAGE_SIZE to TARGET_PAGE_SIZE.
+ PAGE_SIZE to TARGET_PAGE_SIZE.
* emulparams/m68knbsd.h: Ditto.
(TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize.
@@ -2876,7 +5073,7 @@ Fri Oct 27 18:03:17 1995 Niklas Hallqvist <niklas@appli.se>
* emulparams/m68k4knbsd.sh: New file.
* scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating.
-
+
Fri Oct 27 17:59:09 1995 Ian Lance Taylor <ian@cygnus.com>
* emultempl/aix.em: Include ldctor.h.
@@ -2903,7 +5100,7 @@ Fri Oct 27 17:59:09 1995 Ian Lance Taylor <ian@cygnus.com>
new name parameter.
(constructor_callback): Pass name to ldctor_add_new_set_entry for
new name parameter.
-
+
* ldmisc.c (demangle): Fix indentation. Remove a leading period.
Thu Oct 26 22:22:49 1995 Stan Shebs <shebs@andros.cygnus.com>
@@ -3318,7 +5515,7 @@ Mon Aug 21 18:30:42 1995 steve chamberlain <sac@slash.cygnus.com>
(set_pe_value): New function.
Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com>
-
+
* emultempl/{armpe.sc, i386pe.sc}: Deleted.
* emultempl/pe.sc: New file performs generic PE support and sorts
@@ -3338,7 +5535,7 @@ Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com>
* scripttempl/armpe.sc: Always start code at 0x401000, even
if -r.
* ldwrite.c (strdup): New extern declaration.
- * ldgram.y (atype): New rule to clarify type parsing.
+ * ldgram.y (atype): New rule to clarify type parsing.
* ldlang.c (init_os): Remove commented out code.
(lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits
unless told not to by the link script.
@@ -3875,7 +6072,7 @@ Thu Mar 2 14:34:43 1995 Ian Lance Taylor <ian@cygnus.com>
Doc note from pierre@phi.la.tce.com (Pierre Willard):
* ld.texinfo: -X and -x work even if -s or -S are not specified.
- * ld.1: Similar change.
+ * ld.1: Similar change.
Wed Mar 1 13:51:16 1995 Ian Lance Taylor <ian@cygnus.com>
@@ -4177,7 +6374,7 @@ Mon Oct 31 19:35:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
Wed Oct 26 13:59:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
- * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
+ * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
and esparcnbsd.o; sorted entries.
(ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets.
@@ -4186,7 +6383,7 @@ Wed Oct 26 13:59:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
* config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files.
* emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files.
- * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
+ * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
sparc*-*-netbsd*): Use above configs.
Tue Oct 25 11:47:10 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
@@ -4215,7 +6412,7 @@ Fri Oct 14 14:35:38 1994 J.T. Conklin (jtc@rtl.cygnus.com)
* config/{i386,ppc}-nw.mt, emulparams/{i386,ppc}nw.sh,
scripttempl/nw.sc: New files, for i386 and powerpc netware.
-
+
* configure.in: Changed netware ld_target name to be {i386,ppc}-nw
instead of {i386,ppc}-elf.
@@ -4597,7 +6794,7 @@ Wed Jul 20 15:49:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
Sun Jul 10 00:33:24 1994 Ian Dall (dall@hfrd.dsto.gov.au)
* emulparams/pc532machaout.sh: New file. Pc532 mach script
- parameters.
+ parameters.
* emulparams/netbsd532.sh: New file. Netbsd 532 script parameters.
@@ -4860,7 +7057,7 @@ Thu Jun 9 08:35:17 1994 Ian Lance Taylor (ian@cygnus.com)
Thu Jun 9 06:52:29 1994 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in (check): Delete ld.new dependency so that a regression
- test doesn't trigger a rebuild of the linker.
+ test doesn't trigger a rebuild of the linker.
Thu Jun 9 00:17:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -5466,7 +7663,7 @@ Thu Feb 17 15:51:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Thu Feb 17 09:32:14 1994 David J. Mackenzie (djm@thepub.cygnus.com)
* ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and
- bfd_set_error and new error names.
+ bfd_set_error and new error names.
Tue Feb 15 20:14:53 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
@@ -5522,7 +7719,7 @@ Sun Feb 6 20:31:56 1994 David J. Mackenzie (djm@thepub.cygnus.com)
Call xmalloc_set_program_name.
* ldlang.c (lang_size_sections): Check if bfd_relax_section set
- bfd_errno.
+ bfd_errno.
Sat Feb 5 03:54:34 1994 David J. Mackenzie (djm@thepub.cygnus.com)
@@ -5585,9 +7782,9 @@ Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)
Thu Jan 27 12:35:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
- * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
+ * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
exit successfully instead of complaining if no input files are
- given.
+ given.
Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com)
@@ -5862,7 +8059,7 @@ Wed Dec 1 14:04:20 1993 Ken Raeburn (raeburn@cygnus.com)
* Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o.
(em_coff_sparc.c): Add dependencies and build rules.
- * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare.
+ * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare.
Wed Dec 1 12:19:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -5916,7 +8113,7 @@ Fri Nov 5 09:02:52 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
Fri Nov 5 21:47:55 1993 David J. Mackenzie (djm@thepub.cygnus.com)
- * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR):
+ * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR):
Correct values (?).
Wed Nov 3 15:10:15 1993 Ken Raeburn (raeburn@rover.cygnus.com)
@@ -6125,7 +8322,7 @@ Sun Sep 12 16:04:40 1993 Doug Evans (dje@cygnus.com)
Fri Sep 10 09:36:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
- * Makefile.in: Changed CXX back to g++.
+ * Makefile.in: Changed CXX back to g++.
Fri Sep 10 09:34:29 1993 Jeffrey Wheat (cassidy@cygnus.com)
@@ -6368,7 +8565,7 @@ Thu Jul 15 12:44:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* ldmain.c (set_scripts_dir): Don't look in "." first.
* ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var
- option_longmap.
+ option_longmap.
Thu Jul 15 10:55:59 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -6453,7 +8650,7 @@ Mon Jul 5 14:29:48 1993 Ian Lance Taylor (ian@cygnus.com)
Fri Jul 2 18:06:05 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* genscripts.sh: Put the scripts in the ldscripts directory, not
- emulations.
+ emulations.
* configure.in (ldscripts): Make, instead of emulations.
* Makefile.in (scriptdir): Take off the "ld" part.
(install, clean, distclean): Use ldscripts, not emulations.
@@ -6509,7 +8706,7 @@ Mon Jun 21 16:38:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* ldlang.h: Change prototype.
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)
@@ -6597,7 +8794,7 @@ Mon Jun 7 12:53:28 1993 Per Bothner (bothner@rtl.cygnus.com)
Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
- * Makefile.in: remove install:all and install-info:info
+ * Makefile.in: remove install:all and install-info:info
dependencies (these cause some spurious rebuilds at 'make install'
time)
@@ -6888,7 +9085,7 @@ Fri Jan 8 14:39:07 1993 Steve Chamberlain (sac@thepub.cygnus.com)
Fix support for NOLOAD, add INCLUDE
* ldfile.c (ldfile_open_command_file): pass file name to
lex_push_file.
- * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
+ * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
* ldlang.c (wild_doit): make output sections inherit NEVER_LOAD
attribute.
@@ -6993,7 +9190,7 @@ Thu Oct 15 15:20:26 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Thu Oct 8 09:05:25 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to
+ * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to
to demangle symbols better
Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -7008,7 +9205,7 @@ Mon Oct 5 14:07:37 1992 Ian Lance Taylor (ian@cygnus.com)
Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- * ldmain.c (linear_library): don't even think about processing
+ * ldmain.c (linear_library): don't even think about processing
an object file if it's already been done
Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
@@ -7125,8 +9322,8 @@ Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* ldwrite.c (ldwrite): use malloc to allocate the largest space
used, and pass that down.
* relax.c,relax.h (write_relaxnorel): use the passed malloc area rather
- than alloca.
-
+ than alloca.
+
Mon Aug 24 14:42:06 1992 Ian Lance Taylor (ian@cygnus.com)
* configure.in, config/ose68.mt: renamed OSE to ose.
@@ -7146,7 +9343,7 @@ Thu Aug 13 11:49:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* ldlex.l: now parses comment correctly, added ~ to acceptable
chars in filenames
-
+
* ldexp.c (exp_unop): pass down abs_output_section - now can have
unary -ve constants.
@@ -7198,7 +9395,7 @@ Fri Jul 17 22:06:11 1992 K. Richard Pixley (rich@rtl.cygnus.com)
Tue Jul 14 08:34:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* ldlang.c (lang_map): print changes in sizes due to relaxing
- (size_input_section): maintain the delta information.
+ (size_input_section): maintain the delta information.
* ldlang.h: add new field to struct to contain delta info.
* relax.c (relax_section): complain if input not relaxable.
* ldlex.l : add '_', ',' and '$' to chars which can appear at the
@@ -7213,7 +9410,7 @@ Wed Jul 1 17:51:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for
aliasing problems
-
+
Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
@@ -7299,7 +9496,7 @@ Tue May 5 17:47:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* ldmain.c (main): take out ./ from library path, and close file
before unlinking. Make multiple defs of a symbol create an
unexecable file.
- * ldmisc.c: fatal errosrs delete output file
+ * ldmisc.c: fatal errosrs delete output file
Tue May 5 14:05:05 1992 Per Bothner (bothner@rtl.cygnus.com)
@@ -7375,7 +9572,7 @@ Thu Apr 9 05:52:02 1992 Ken Raeburn (Raeburn@Cygnus.COM)
Sat Apr 4 17:44:06 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer.
+ * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer.
* h8300*: fix bit rot and add support for h8300xray target
* go32.sh: target emulation for go32.
@@ -7427,7 +9624,7 @@ Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com)
Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com)
-
+
* cplus-dem.c: yet another copy of this - maybe it should go into
libiberty ?
* ldgram.y: now -V and -v have different actions
@@ -7514,7 +9711,7 @@ Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
* config/mt-coff-h8300: use EMUL like everything else
* ldlang.c: (print_padding_statement): print the right address.
* Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms
-
+
Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com)
@@ -7594,7 +9791,7 @@ Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* ldfile.c: include ctype.h
* ldmain.c: include the requried prototype headers
* ldwrite.c: get_reloc_upper_bound has been renamed
- bfd_get_reloc_upper_bound
+ bfd_get_reloc_upper_bound
Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
@@ -7640,7 +9837,7 @@ Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com)
Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com)
* Makefile.in: Rename .c files generated from ldtemplate
- to have names starting with ld__. This helps 'make clean'.
+ to have names starting with ld__. This helps 'make clean'.
Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com)
@@ -7687,7 +9884,7 @@ Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com)
ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h,
ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h,
ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c:
- Add or update copyright notices.
+ Add or update copyright notices.
Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com)
@@ -7774,7 +9971,7 @@ Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com)
Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com)
* Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun
- Make).
+ Make).
* ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a
few BFD types & enums.
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index e5be23d..a0eb125 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -1,12 +1,17 @@
## Process this file with automake to generate Makefile.in
+## FIXME: work around apparent automake bug.
+INTLLIBS = @INTLLIBS@
+
AUTOMAKE_OPTIONS = cygnus dejagnu
+SUBDIRS = po
+
tooldir = $(exec_prefix)/$(target_alias)
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -15,6 +20,7 @@ scriptdir = $(tooldir)/lib
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
+EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
# Search path to override the default search path for -lfoo libraries.
# If LIB_PATH is empty, the ones in the script (if any) are left alone.
@@ -27,7 +33,7 @@ LIB_PATH =
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
-DEP = mkdep
+MKDEP = gcc -MM
# What version of the manual to build
DOCVER = gen
@@ -84,7 +90,7 @@ info_TEXINFOS = ld.texinfo
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
@@ -95,27 +101,50 @@ ALL_EMULATIONS = \
eaixrs6.o \
ealpha.o \
earcelf.o \
+ earmelf.o \
+ earmelf_oabi.o \
+ earmelf_linux.o \
+ earmelf_linux26.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
+ earmnbsd.o \
earmpe.o \
+ earm_epoc_pe.o \
+ eavr1200.o \
+ eavr23xx.o \
+ eavr44x4.o \
+ eavr4433.o \
+ eavr85xx.o \
+ eavrmega603.o \
+ eavrmega103.o \
+ eavrmega161.o \
ecoff_sparc.o \
ed10velf.o \
+ ed30velf.o \
+ ed30v_e.o \
+ ed30v_o.o \
edelta68.o \
eebmon29k.o \
eelf32_sparc.o \
+ eelf32_i960.o \
eelf32b4300.o \
eelf32bmip.o \
eelf32ebmip.o \
eelf32elmip.o \
+ eelf32bmipn32.o \
+ eelf32i370.o \
eelf32l4300.o \
eelf32lmip.o \
eelf32lppc.o \
eelf32ppc.o \
+ eelf32ppclinux.o \
eelf_i386.o \
+ eelf_i386_be.o \
egld960.o \
egld960coff.o \
- ego32.o \
+ eelf32fr30.o \
+ eelf32mcore.o \
eh8300.o \
eh8300h.o \
eh8300s.o \
@@ -126,8 +155,8 @@ ALL_EMULATIONS = \
eh8500s.o \
ehp300bsd.o \
ehp3hpux.o \
- ehppaelf.o \
ei386aout.o \
+ ei386beos.o \
ei386bsd.o \
ei386coff.o \
ei386go32.o \
@@ -139,6 +168,7 @@ ALL_EMULATIONS = \
ei386nbsd.o \
ei386nw.o \
ei386pe.o \
+ ei386pe_posix.o \
elnk960.o \
em68k4knbsd.o \
em68kaout.o \
@@ -150,13 +180,17 @@ ALL_EMULATIONS = \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
+ emcorepe.o \
emipsbig.o \
emipsbsd.o \
emipsidt.o \
emipsidtl.o \
emipslit.o \
emipslnews.o \
+ emipspe.o \
enews.o \
+ epjelf.o \
+ epjlelf.o \
ens32knbsd.o \
epc532macha.o \
eppcmacos.o \
@@ -168,6 +202,7 @@ ALL_EMULATIONS = \
eshelf.o \
eshlelf.o \
eshl.o \
+ eshpe.o \
esparcaout.o \
esparclinux.o \
esparclynx.o \
@@ -177,6 +212,7 @@ ALL_EMULATIONS = \
esun4.o \
etic30aout.o \
etic30coff.o \
+ etic80coff.o \
evanilla.o \
evax.o \
evsta.o \
@@ -186,25 +222,40 @@ ALL_EMULATIONS = \
ALL_64_EMULATIONS = \
eelf64_sparc.o \
- eelf64alpha.o
+ eelf64alpha.o \
+ eelf64bmip.o
+
+ALL_EMUL_EXTRA_OFILES = \
+ pe-dll.o \
+ deffilep.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c
+ mri.c ldcref.c pe-dll.c
-HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
+HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h
+ ldwrite.h mri.h deffile.h pe-dll.h
-GENERATED_CFILES = ldgram.c ldlex.c
-GENERATED_HFILES = ldgram.h ldemul-list.h
+GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
+GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
- ldfile.o ldcref.o ${EMULATION_OFILES}
+ ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
STAGESTUFF = *.o ldscripts/* e*.c
+# At the moment this is just a list of those emulation template files
+# that contain internationalised strings.
+EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
+
+POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
+
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
ldmain.o: ldmain.c config.status
$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
@@ -223,10 +274,13 @@ ldemul-list.h: Makefile
echo " 0") >ldemul-tmp.h
mv ldemul-tmp.h ldemul-list.h
+stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
+ cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
+
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
-GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
@TDIRS@
ea29k.c: $(srcdir)/emulparams/a29k.sh \
@@ -244,6 +298,18 @@ ealpha.c: $(srcdir)/emulparams/alpha.sh \
earcelf.c: $(srcdir)/emulparams/arcelf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
+earmelf.c: $(srcdir)/emulparams/armelf.sh \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf "$(tdir_armelf)"
+earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
+ $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
+earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -251,29 +317,85 @@ earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} armcoff "$(tdir_armcoff)"
+earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
+earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
earmpe.c: $(srcdir)/emulparams/armpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe "$(tdir_armpe)"
+eavr85xx.c: $(srcdir)/emulparams/avr85xx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr85xx "$(tdir_avr85xx)"
+eavr1200.c: $(srcdir)/emulparams/avr1200.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr1200 "$(tdir_avr85xx)"
+eavr23xx.c: $(srcdir)/emulparams/avr23xx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr23xx "$(tdir_avr85xx)"
+eavr44x4.c: $(srcdir)/emulparams/avr44x4.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr44x4 "$(tdir_avr85xx)"
+eavr4433.c: $(srcdir)/emulparams/avr4433.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr4433 "$(tdir_avr85xx)"
+eavrmega603.c: $(srcdir)/emulparams/avrmega603.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega603 "$(tdir_avr85xx)"
+eavrmega103.c: $(srcdir)/emulparams/avrmega103.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
+eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)"
ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d10velf "$(tdir_d10v)"
+ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30velf "$(tdir_d30v)"
+ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
+ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
+eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
+eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
@@ -289,6 +411,9 @@ eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
+eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
@@ -304,24 +429,33 @@ eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
+eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
+eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
+eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
+eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960 "$(tdir_gld960)"
egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
$(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
-ego32.c: $(srcdir)/emulparams/go32.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} go32 "$(tdir_go32)"
eh8300.c: $(srcdir)/emulparams/h8300.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300 "$(tdir_h8300)"
@@ -352,12 +486,12 @@ ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
-ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386aout "$(tdir_i386aout)"
+ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
+ $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386beos "$(tdir_i386beos)"
ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
@@ -391,6 +525,9 @@ ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe "$(tdir_i386pe)"
+ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
@@ -424,6 +561,9 @@ em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
+emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipsbig
@@ -442,6 +582,9 @@ emipslit.c: $(srcdir)/emulparams/mipslit.sh \
emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipslnews
+emipspe.c: $(srcdir)/emulparams/mipspe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipspe "$(tdir_mips)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
@@ -457,6 +600,12 @@ ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
+epjelf.c: $(srcdir)/emulparams/pjelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
+epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
@@ -484,6 +633,9 @@ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
+eshpe.c: $(srcdir)/emulparams/shpe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shpe "$(tdir_shl)"
esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
@@ -511,6 +663,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
+etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
evanilla.c: $(srcdir)/emulparams/vanilla.sh \
$(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
${GENSCRIPTS} vanilla "$(tdir_vanilla)"
@@ -535,8 +690,8 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
-ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
@@ -549,6 +704,7 @@ TESTBFDLIB = @TESTBFDLIB@
check-DEJAGNU: site.exp
srcroot=`cd $(srcdir) && pwd`; export srcroot; \
r=`pwd`; export r; \
+ LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
EXPECT=$(EXPECT); export EXPECT; \
if [ -f $(top_builddir)/../expect/expect ]; then \
TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
@@ -561,8 +717,7 @@ check-DEJAGNU: site.exp
CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY)" HOSTING_EMU="$(HOSTING_EMU)" \
- HOSTING_CRT0="$(HOSTING_CRT0)" HOSTING_LIBS="$(HOSTING_LIBS)" \
+ LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -574,16 +729,16 @@ check-DEJAGNU: site.exp
ld-partial.o: ld-new$(EXEEXT)
./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
ld1$(EXEEXT): ld-partial.o
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
ld1-full$(EXEEXT): ld-new
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
ld2$(EXEEXT): ld1$(EXEEXT)
- ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
ld3$(EXEEXT): ld2$(EXEEXT)
- ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
bootstrap: ld3$(EXEEXT)
cmp ld2$(EXEEXT) ld3$(EXEEXT)
@@ -630,22 +785,29 @@ configdoc.texi: ${DOCVER}-doc.texi
|| ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
|| cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
-ld.info: $(srcdir)/ld.texinfo configdoc.texi
+ldver.texi: Makefile
+ rm -f $@
+ echo '@set VERSION $(VERSION)' > $@
+
+ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
+ MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo
+
+MAINTAINERCLEANFILES = ldver.texi
# We want to reconfigure if configure.host or configure.tgt changes.
-Makefile: configure.host configure.tgt
+config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
+ $(SHELL) ./config.status --recheck
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
mostlyclean-local:
-rm -rf tmpdir
-CLEANFILES = dep.sed .dep .dep1
+CLEANFILES = dep.sed DEP DEP1 DEP2
.PHONY: install-exec-local install-data-local
@@ -653,19 +815,19 @@ install-exec-local: ld-new$(EXEEXT)
$(mkinstalldirs) $(bindir) $(tooldir)/bin
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
- rm -f $(tooldir)/bin/ld$(EXEEXT)
n=`echo ld | sed '$(transform)'`; \
if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+ rm -f $(tooldir)/bin/ld$(EXEEXT); \
ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
fi
install-data-local:
- $(mkinstalldirs) $(scriptdir)
+ $(mkinstalldirs) $(scriptdir)/ldscripts
for f in ldscripts/*; do \
$(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
@@ -675,43 +837,42 @@ install-data-local:
LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
diststuff: $(LDDISTSTUFF) info
-DISTCLEANFILES = site.exp site.bak
-
+DISTCLEANFILES = tdirs site.exp site.bak
distclean-local:
rm -rf ldscripts
# Targets to rebuild dependencies in this Makefile.
-# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
-.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- sed -f dep.sed <.dep1 >.dep
-
-# This rule really wants a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(GENERATED_CFILES)
- rm -f .dep2
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- $(DEP) -f .dep2 $(INCLUDES) $?
- $(srcdir)/../move-if-change .dep2 .dep1
+# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
+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' >> $@
+
+DEP1: $(CFILES) $(GENERATED_CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
-e 's!@INCDIR@!$(INCDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
@@ -720,59 +881,70 @@ dep-am: .dep
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldmisc.h \
+ ldgram.h ldmain.h ldctor.h
ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldemul.h \
- ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldemul-list.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
+ ldemul-list.h
ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldmisc.h ldexp.h ldgram.h ldlang.h
+ ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
+ ldgram.h ldlang.h
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
- ldlex.h ldemul.h
+ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
+ ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
- ldctor.h ldfile.h $(INCDIR)/fnmatch.h
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmain.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \
+ ldmisc.h ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h ldemul.h \
- ldlex.h ldfile.h ldctor.h
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
+ ldemul.h ldlex.h ldfile.h ldctor.h
ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h ld.h ldmisc.h ldexp.h ldlang.h \
- ldgram.h ldlex.h ldmain.h ldfile.h
+ $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldver.h \
- ldemul.h ldmain.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ ldver.h ldemul.h ldmain.h
ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/libiberty.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h
+ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
+ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
ldver.h ldemul.h
mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/fopen-same.h ld.h ldexp.h ldlang.h \
- ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
+ config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/libiberty.h ld.h ldmain.h ldmisc.h ldexp.h \
- ldlang.h
+ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h
+pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
+ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldemul.h \
+ $(INCDIR)/coff/internal.h ../bfd/libcoff.h deffile.h \
+ pe-dll.h
ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldexp.h ldver.h ldlang.h ldemul.h ldfile.h ldmisc.h \
- ldmain.h mri.h ldlex.h
+ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \
+ ldemul.h ldfile.h ldmisc.h ldmain.h mri.h ldctor.h \
+ ldlex.h
ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h ldgram.h ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h \
- ldmain.h
-
+ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
+ ldlang.h ldfile.h ldlex.h ldmain.h
+deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
index c37aab3..6f95ee5 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -61,28 +63,54 @@ host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EMULATION_LIBPATH = @EMULATION_LIBPATH@
EXEEXT = @EXEEXT@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
-LD = @LD@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
-NM = @NM@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
-TDIRS = @TDIRS@
+STRINGIFY = @STRINGIFY@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+l = @l@
+
+INTLLIBS = @INTLLIBS@
AUTOMAKE_OPTIONS = cygnus dejagnu
+SUBDIRS = po
+
tooldir = $(exec_prefix)/$(target_alias)
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -91,6 +119,7 @@ scriptdir = $(tooldir)/lib
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
+EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
# Search path to override the default search path for -lfoo libraries.
# If LIB_PATH is empty, the ones in the script (if any) are left alone.
@@ -98,12 +127,12 @@ EMULATION_OFILES = @EMULATION_OFILES@
# a cross-linker, in which case the default is empty. See genscripts.sh.)
# Otherwise, they are replaced with the ones given in LIB_PATH,
# which may have the form: LIB_PATH=/lib:/usr/local/lib
-LIB_PATH =
+LIB_PATH =
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
-INCDIR = $(BASEDIR)/include
-DEP = mkdep
+INCDIR = $(BASEDIR)/include
+MKDEP = gcc -MM
# What version of the manual to build
DOCVER = gen
@@ -118,11 +147,13 @@ EXPECT = `if [ -f $$r/../expect/expect ] ; \
then echo $$r/../expect/expect ; \
else echo expect ; fi`
+
RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
then echo $${srcroot}/../dejagnu/runtest ; \
else echo runtest ; fi`
-RUNTESTFLAGS =
+
+RUNTESTFLAGS =
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
@@ -139,6 +170,7 @@ CC_FOR_TARGET = ` \
fi; \
fi`
+
CXX = gcc
CXX_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
@@ -155,12 +187,13 @@ CXX_FOR_TARGET = ` \
fi; \
fi`
+
noinst_PROGRAMS = ld-new
info_TEXINFOS = ld.texinfo
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
@@ -171,27 +204,50 @@ ALL_EMULATIONS = \
eaixrs6.o \
ealpha.o \
earcelf.o \
+ earmelf.o \
+ earmelf_oabi.o \
+ earmelf_linux.o \
+ earmelf_linux26.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
+ earmnbsd.o \
earmpe.o \
+ earm_epoc_pe.o \
+ eavr1200.o \
+ eavr23xx.o \
+ eavr44x4.o \
+ eavr4433.o \
+ eavr85xx.o \
+ eavrmega603.o \
+ eavrmega103.o \
+ eavrmega161.o \
ecoff_sparc.o \
ed10velf.o \
+ ed30velf.o \
+ ed30v_e.o \
+ ed30v_o.o \
edelta68.o \
eebmon29k.o \
eelf32_sparc.o \
+ eelf32_i960.o \
eelf32b4300.o \
eelf32bmip.o \
eelf32ebmip.o \
eelf32elmip.o \
+ eelf32bmipn32.o \
+ eelf32i370.o \
eelf32l4300.o \
eelf32lmip.o \
eelf32lppc.o \
eelf32ppc.o \
+ eelf32ppclinux.o \
eelf_i386.o \
+ eelf_i386_be.o \
egld960.o \
egld960coff.o \
- ego32.o \
+ eelf32fr30.o \
+ eelf32mcore.o \
eh8300.o \
eh8300h.o \
eh8300s.o \
@@ -202,8 +258,8 @@ ALL_EMULATIONS = \
eh8500s.o \
ehp300bsd.o \
ehp3hpux.o \
- ehppaelf.o \
ei386aout.o \
+ ei386beos.o \
ei386bsd.o \
ei386coff.o \
ei386go32.o \
@@ -215,6 +271,7 @@ ALL_EMULATIONS = \
ei386nbsd.o \
ei386nw.o \
ei386pe.o \
+ ei386pe_posix.o \
elnk960.o \
em68k4knbsd.o \
em68kaout.o \
@@ -226,13 +283,17 @@ ALL_EMULATIONS = \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
+ emcorepe.o \
emipsbig.o \
emipsbsd.o \
emipsidt.o \
emipsidtl.o \
emipslit.o \
emipslnews.o \
+ emipspe.o \
enews.o \
+ epjelf.o \
+ epjlelf.o \
ens32knbsd.o \
epc532macha.o \
eppcmacos.o \
@@ -244,6 +305,7 @@ ALL_EMULATIONS = \
eshelf.o \
eshlelf.o \
eshl.o \
+ eshpe.o \
esparcaout.o \
esparclinux.o \
esparclynx.o \
@@ -253,6 +315,7 @@ ALL_EMULATIONS = \
esun4.o \
etic30aout.o \
etic30coff.o \
+ etic80coff.o \
evanilla.o \
evax.o \
evsta.o \
@@ -260,49 +323,70 @@ ALL_EMULATIONS = \
ez8001.o \
ez8002.o
+
ALL_64_EMULATIONS = \
eelf64_sparc.o \
- eelf64alpha.o
+ eelf64alpha.o \
+ eelf64bmip.o
+
+
+ALL_EMUL_EXTRA_OFILES = \
+ pe-dll.o \
+ deffilep.o
+
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c
+ mri.c ldcref.c pe-dll.c
+
-HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
+HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h
+ ldwrite.h mri.h deffile.h pe-dll.h
-GENERATED_CFILES = ldgram.c ldlex.c
-GENERATED_HFILES = ldgram.h ldemul-list.h
+
+GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
+GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
- ldfile.o ldcref.o ${EMULATION_OFILES}
+ ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
+
STAGESTUFF = *.o ldscripts/* e*.c
+# At the moment this is just a list of those emulation template files
+# that contain internationalised strings.
+EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
+
+POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
+
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
-GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
-ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
+
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
# This is the real libbfd.a created by libtool.
TESTBFDLIB = @TESTBFDLIB@
+MAINTAINERCLEANFILES = ldver.texi
+
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-CLEANFILES = dep.sed .dep .dep1
+
+CLEANFILES = dep.sed DEP DEP1 DEP2
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
-DISTCLEANFILES = site.exp site.bak
+DISTCLEANFILES = tdirs site.exp site.bak
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -321,59 +405,64 @@ ld_new_LDFLAGS =
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LEXLIB = @LEXLIB@
CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
INFO_DEPS = ld.info
DVIS = ld.dvi
TEXINFOS = ld.texinfo
-MANS = ld.1
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
NROFF = nroff
-DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \
-acconfig.h acinclude.m4 aclocal.m4 config.in configure configure.in \
-ldgram.c ldlex.c stamp-h.in
+DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
+NEWS TODO acinclude.m4 aclocal.m4 config.in configure configure.in \
+ldgram.c ldlex.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
+GZIP_ENV = --best
SOURCES = $(ld_new_SOURCES)
OBJECTS = $(ld_new_OBJECTS)
-default: all
-
+all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .S .c .dvi .info .l .lo .o .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
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
- @:
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
$(SHELL) ./config.status
- @echo timestamp > stamp-h
-$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
@@ -434,15 +523,15 @@ maintainer-clean-libtool:
ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
@rm -f ld-new$(EXEEXT)
$(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
+.l.c:
+ $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
.y.c:
- $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
ldgram.h: ldgram.c
-.l.c:
- $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
ld.info: ld.texinfo
ld.dvi: ld.texinfo
@@ -455,7 +544,7 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@@ -471,28 +560,42 @@ DVIPS = dvips
$(MAKEINFO) -I $(srcdir) $<
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.txi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(infodir)
- @for file in $(INFO_DEPS); do \
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- for file in $(INFO_DEPS); do \
- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
@@ -501,17 +604,20 @@ uninstall-info:
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
- for file in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
test -z "$ii" \
- || install-info --info-dir=$(infodir) --remove $$file; \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
- $(NORMAL_UNINSTALL)
- for file in $(INFO_DEPS); do \
- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ @$(NORMAL_UNINSTALL)
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
- for base in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
@@ -537,31 +643,119 @@ maintainer-clean-aminfo:
fi; \
done
clean-info: mostlyclean-aminfo
-install-man: $(MANS)
- $(NORMAL_INSTALL)
- $(mkinstalldirs) $(mandir)/man1
- @sect=1; \
- inst=`echo "ld" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/ld.1; then file=$(srcdir)/ld.1; \
- else file=ld.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
-uninstall-man:
- $(NORMAL_UNINSTALL)
- -inst=`echo "ld" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
+install-man1:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+uninstall-man1:
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+install-man: $(MANS)
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+ @$(NORMAL_UNINSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+ && mkid -f$$here/ID $$unique $(LISP)
-TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
@@ -586,29 +780,31 @@ top_distdir = $(distdir)
# tarfile.
distcheck: dist
-rm -rf $(distdir)
- GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
- @echo "========================"; \
- echo "$(distdir).tar.gz is ready for distribution"; \
- echo "========================"
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
@@ -616,18 +812,32 @@ distdir: $(DISTFILES)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
done
- $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
site.exp: Makefile
@echo 'Making a new site.exp file...'
- -@rm -f site.bak
+ @test ! -f site.bak || rm -f site.bak
@echo '## these variables are automatically generated by make ##' > $@-t
@echo '# Do not edit here. If you wish to override these values' >> $@-t
@echo '# edit the last section' >> $@-t
@@ -641,32 +851,41 @@ site.exp: Makefile
@echo 'set build_alias $(build_alias)' >> $@-t
@echo 'set build_triplet $(build_triplet)' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
- -@mv site.exp site.bak
+ @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp
-info: $(INFO_DEPS)
-dvi: $(DVIS)
-check:
- $(MAKE) check-DEJAGNU
-installcheck:
-install-info: install-info-am
-install-exec: install-exec-local
- @$(NORMAL_INSTALL)
-
-install-data: install-man install-data-local
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall: uninstall-man
-
-all: Makefile $(PROGRAMS) $(MANS) config.h
-
+info-am: $(INFO_DEPS)
+info: info-recursive
+dvi-am: $(DVIS)
+dvi: dvi-recursive
+check-am:
+ $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-info-am:
+install-info: install-info-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am: install-exec-local
+install-exec: install-exec-recursive
+
+install-data-am: install-man install-data-local
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-man
+uninstall: uninstall-recursive
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
+all-redirect: all-recursive-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
- $(mkinstalldirs) $(mandir)/man1
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
@@ -676,50 +895,71 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
+ -test -z "ldlexlldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl ldgramh ldgramc $(MAINTAINERCLEANFILES)
+mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
mostlyclean-local
-clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
- clean-aminfo clean-tags clean-generic mostlyclean
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
+ clean-aminfo clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
-distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
+distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean distclean-local
- -rm -f config.status
+ distclean-generic clean-am distclean-local
-rm -f libtool
-maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstPROGRAMS \
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr \
+ maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-aminfo maintainer-clean-tags \
- maintainer-clean-generic distclean
+ maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
-distclean-noinstPROGRAMS clean-noinstPROGRAMS \
-maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
-clean-aminfo maintainer-clean-aminfo install-man uninstall-man tags \
-mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
-distdir check-DEJAGNU info dvi installcheck install-info install-exec \
-install-data install uninstall all installdirs mostlyclean-generic \
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool install-info-am uninstall-info \
+mostlyclean-aminfo distclean-aminfo clean-aminfo \
+maintainer-clean-aminfo install-man1 uninstall-man1 install-man \
+uninstall-man install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
+info-am info dvi-am dvi check check-am installcheck-am installcheck \
+install-info-am install-info all-recursive-am install-exec-local \
+install-exec-am install-exec install-data-local install-data-am \
+install-data install-am install uninstall-am uninstall all-redirect \
+all-am all installdirs-am installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
ldmain.o: ldmain.c config.status
$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
@@ -737,6 +977,9 @@ ldemul-list.h: Makefile
done;\
echo " 0") >ldemul-tmp.h
mv ldemul-tmp.h ldemul-list.h
+
+stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
+ cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
@TDIRS@
ea29k.c: $(srcdir)/emulparams/a29k.sh \
@@ -754,6 +997,18 @@ ealpha.c: $(srcdir)/emulparams/alpha.sh \
earcelf.c: $(srcdir)/emulparams/arcelf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
+earmelf.c: $(srcdir)/emulparams/armelf.sh \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf "$(tdir_armelf)"
+earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
+ $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
+earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_linux26.c: $(srcdir)/emulparams/armelf_linux26.sh \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_linux26 "$(tdir_armelf_linux26)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -761,29 +1016,85 @@ earmaoutl.c: $(srcdir)/emulparams/armaoutl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutl "$(tdir_armaoutl)"
earmcoff.c: $(srcdir)/emulparams/armcoff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/armcoff.em $(srcdir)/scripttempl/armcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} armcoff "$(tdir_armcoff)"
+earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
+earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
earmpe.c: $(srcdir)/emulparams/armpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe "$(tdir_armpe)"
+eavr85xx.c: $(srcdir)/emulparams/avr85xx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr85xx "$(tdir_avr85xx)"
+eavr1200.c: $(srcdir)/emulparams/avr1200.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr1200 "$(tdir_avr85xx)"
+eavr23xx.c: $(srcdir)/emulparams/avr23xx.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr23xx "$(tdir_avr85xx)"
+eavr44x4.c: $(srcdir)/emulparams/avr44x4.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr44x4 "$(tdir_avr85xx)"
+eavr4433.c: $(srcdir)/emulparams/avr4433.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr4433 "$(tdir_avr85xx)"
+eavrmega603.c: $(srcdir)/emulparams/avrmega603.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega603 "$(tdir_avr85xx)"
+eavrmega103.c: $(srcdir)/emulparams/avrmega103.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)"
+eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)"
ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d10velf "$(tdir_d10v)"
+ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30velf "$(tdir_d30v)"
+ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30v_o "$(tdir_d30v)"
+ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} d30v_e "$(tdir_d30v)"
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
+eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
+eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
@@ -799,6 +1110,9 @@ eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
+eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
@@ -814,24 +1128,33 @@ eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
+eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
+eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
+eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
+eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960 "$(tdir_gld960)"
egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
$(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960coff "$(tdir_gld960coff)"
-ego32.c: $(srcdir)/emulparams/go32.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} go32 "$(tdir_go32)"
eh8300.c: $(srcdir)/emulparams/h8300.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300 "$(tdir_h8300)"
@@ -862,12 +1185,12 @@ ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
-ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386aout "$(tdir_i386aout)"
+ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
+ $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386beos "$(tdir_i386beos)"
ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386bsd "$(tdir_i386bsd)"
@@ -901,6 +1224,9 @@ ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe "$(tdir_i386pe)"
+ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
@@ -934,6 +1260,9 @@ em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
+emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipsbig
@@ -952,6 +1281,9 @@ emipslit.c: $(srcdir)/emulparams/mipslit.sh \
emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipslnews
+emipspe.c: $(srcdir)/emulparams/mipspe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipspe "$(tdir_mips)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
@@ -967,6 +1299,12 @@ ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
+epjelf.c: $(srcdir)/emulparams/pjelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} pjelf "$(tdir_pjelf)"
+epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
@@ -994,6 +1332,9 @@ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
+eshpe.c: $(srcdir)/emulparams/shpe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shpe "$(tdir_shl)"
esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
@@ -1021,6 +1362,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
+etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)"
evanilla.c: $(srcdir)/emulparams/vanilla.sh \
$(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
${GENSCRIPTS} vanilla "$(tdir_vanilla)"
@@ -1051,6 +1395,7 @@ $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
check-DEJAGNU: site.exp
srcroot=`cd $(srcdir) && pwd`; export srcroot; \
r=`pwd`; export r; \
+ LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
EXPECT=$(EXPECT); export EXPECT; \
if [ -f $(top_builddir)/../expect/expect ]; then \
TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
@@ -1063,8 +1408,7 @@ check-DEJAGNU: site.exp
CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY)" HOSTING_EMU="$(HOSTING_EMU)" \
- HOSTING_CRT0="$(HOSTING_CRT0)" HOSTING_LIBS="$(HOSTING_LIBS)" \
+ LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -1076,16 +1420,16 @@ check-DEJAGNU: site.exp
ld-partial.o: ld-new$(EXEEXT)
./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
ld1$(EXEEXT): ld-partial.o
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
ld1-full$(EXEEXT): ld-new
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
ld2$(EXEEXT): ld1$(EXEEXT)
- ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
ld3$(EXEEXT): ld2$(EXEEXT)
- ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) $(LIBS)
bootstrap: ld3$(EXEEXT)
cmp ld2$(EXEEXT) ld3$(EXEEXT)
@@ -1132,16 +1476,21 @@ configdoc.texi: ${DOCVER}-doc.texi
|| ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
|| cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
-ld.info: $(srcdir)/ld.texinfo configdoc.texi
+ldver.texi: Makefile
+ rm -f $@
+ echo '@set VERSION $(VERSION)' > $@
+
+ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
+ MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo
# We want to reconfigure if configure.host or configure.tgt changes.
-Makefile: configure.host configure.tgt
+config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
+ $(SHELL) ./config.status --recheck
mostlyclean-local:
-rm -rf tmpdir
@@ -1151,59 +1500,58 @@ install-exec-local: ld-new$(EXEEXT)
$(mkinstalldirs) $(bindir) $(tooldir)/bin
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
- rm -f $(tooldir)/bin/ld$(EXEEXT)
n=`echo ld | sed '$(transform)'`; \
if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+ rm -f $(tooldir)/bin/ld$(EXEEXT); \
ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
fi
install-data-local:
- $(mkinstalldirs) $(scriptdir)
+ $(mkinstalldirs) $(scriptdir)/ldscripts
for f in ldscripts/*; do \
$(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
diststuff: $(LDDISTSTUFF) info
-
distclean-local:
rm -rf ldscripts
# Targets to rebuild dependencies in this Makefile.
-# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
-.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- sed -f dep.sed <.dep1 >.dep
-
-# This rule really wants a mkdep that runs "gcc -MM".
-.dep1: $(CFILES) $(GENERATED_CFILES)
- rm -f .dep2
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- $(DEP) -f .dep2 $(INCLUDES) $?
- $(srcdir)/../move-if-change .dep2 .dep1
+# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
+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' >> $@
+
+DEP1: $(CFILES) $(GENERATED_CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
-e 's!@INCDIR@!$(INCDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
@@ -1212,61 +1560,72 @@ dep-am: .dep
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldmisc.h \
+ ldgram.h ldmain.h ldctor.h
ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldemul.h \
- ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldemul-list.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
+ ldemul-list.h
ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldmisc.h ldexp.h ldgram.h ldlang.h
+ ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
+ ldgram.h ldlang.h
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
- ldlex.h ldemul.h
+ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
+ ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
- ldctor.h ldfile.h $(INCDIR)/fnmatch.h
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmain.h ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h \
+ ldmisc.h ldctor.h ldfile.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
- ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h ldemul.h \
- ldlex.h ldfile.h ldctor.h
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
+ ldemul.h ldlex.h ldfile.h ldctor.h
ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h ld.h ldmisc.h ldexp.h ldlang.h \
- ldgram.h ldlex.h ldmain.h ldfile.h
+ $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldver.h \
- ldemul.h ldmain.h
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ ldver.h ldemul.h ldmain.h
ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/libiberty.h ld.h ldexp.h ldlang.h ldwrite.h \
- ldmisc.h ldgram.h ldmain.h
+ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
+ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
ldver.h ldemul.h
mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/fopen-same.h ld.h ldexp.h ldlang.h \
- ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
+ config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/libiberty.h ld.h ldmain.h ldmisc.h ldexp.h \
- ldlang.h
+ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h
+pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
+ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldemul.h \
+ $(INCDIR)/coff/internal.h ../bfd/libcoff.h deffile.h \
+ pe-dll.h
ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h ldexp.h ldver.h ldlang.h ldemul.h ldfile.h ldmisc.h \
- ldmain.h mri.h ldlex.h
+ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \
+ ldemul.h ldfile.h ldmisc.h ldmain.h mri.h ldctor.h \
+ ldlex.h
ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h ldgram.h ldmisc.h ldexp.h ldlang.h ldfile.h ldlex.h \
- ldmain.h
-
+ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
+ ldlang.h ldfile.h ldlex.h ldmain.h
+deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h
# 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/ld/NEWS b/contrib/binutils/ld/NEWS
index ba32596..2c2340f 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,5 +1,36 @@
-*- text -*-
+Changes in version 2.10:
+
+* Added garbage collection of unused sections, enabled by --gc-sections.
+ It does require a bit of backend support; currently implemented are
+ ppc-elf, mips-elf, and mn10300-elf. Others will ignore the option.
+
+* Added SORT to the linker script language to permit sorting sections by file
+ name or section name.
+
+* Added EXTERN to the linker script language as an equivalent to the -u
+ command-line option.
+
+* Added ASSERT to the linker script language.
+
+* Added EXCLUDE_FILE to the linker script language for further control over
+ wildcard file names.
+
+* Added -O option to optimize linker output (as of this writing, this only
+affects ELF shared library generation).
+
+* The -e option now accepts a number as well as a symbol name.
+
+* Added --no-undefined option to disallow undefined symbols when creating a
+ shared library.
+
+* The linker now issues a warning, not an error, for an undefined symbol when
+ using -Bsymbolic; use the new --no-undefined option to get the old
+ behaviour.
+
+* Added --demangle and --no-demangle options.
+
Changes in version 2.9:
* Added SQUAD to the linker script language.
@@ -7,7 +38,7 @@ Changes in version 2.9:
* New option --no-warn-mismatch.
* The MEMORY command now parses the attributes to determine where sections that
-are not placed in a specific memory region are placed.
+ are not placed in a specific memory region are placed.
Changes in version 2.8:
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index cbf8bd1..8bebfa0 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.2e
+dnl aclocal.m4 generated automatically by aclocal 1.4
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,7 +22,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@@ -32,8 +32,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
@@ -45,15 +45,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
#
# Check to make sure that the build environment is sane.
#
@@ -114,32 +105,75 @@ fi
AC_SUBST($1)])
-# serial 24 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AM_ENABLE_SHARED])dnl
-AC_REQUIRE([AM_ENABLE_STATIC])dnl
+# 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([AM_PROG_LD])dnl
-AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -161,30 +195,42 @@ case "$host" in
*-*-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
;;
-esac
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
+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])])
-# AM_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# 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(AM_ENABLE_SHARED,
-[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@@ -201,29 +247,23 @@ no) enable_shared=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
-# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AM_DISABLE_SHARED,
-[AM_ENABLE_SHARED(no)])
+# 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)])
-# AM_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AM_DISABLE_STATIC,
-[AM_ENABLE_STATIC(no)])
-
-# AM_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# 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(AM_ENABLE_STATIC,
-[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@@ -240,28 +280,73 @@ no) enable_static=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+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)])
+
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
+# 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])
+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.
+ # Accept absolute paths.
changequote(,)dnl
- /* | [A-Za-z]:\\*)
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -278,10 +363,10 @@ else
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ 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"; then
+ 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.
@@ -289,7 +374,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -304,11 +389,10 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
+AC_PROG_LD_GNU
])
-AC_DEFUN(AM_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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -318,43 +402,117 @@ else
fi])
])
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
+# 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,
-[case "$NM" in
-changequote(,)dnl
-/* | [A-Za-z]:\\*)
-changequote([,])dnl
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+[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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
+fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
-AC_SUBST(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,
@@ -378,62 +536,359 @@ for am_file in <<$1>>; do
done<<>>dnl>>)
changequote([,]))])
-# Check to see if we're running under Cygwin32, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN32()
-AC_DEFUN(AM_CYGWIN32,
-[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin32=yes, am_cv_cygwin32=no)
-rm -f conftest*])
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
-
-# Check to see if we're running under Win32, without using
-# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
-# Otherwise set it to "".
-
-dnl AM_EXEEXT()
-dnl This knows we add .exe if we're building in the Cygwin32
-dnl environment. But if we're not, then it compiles a test program
-dnl to see if there is a suffix for executables.
-AC_DEFUN(AM_EXEEXT,
-[AC_REQUIRE([AM_CYGWIN32])
-AC_REQUIRE([AM_MINGW32])
-AC_MSG_CHECKING([for executable suffix])
-AC_CACHE_VAL(am_cv_exeext,
-[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+# 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 <drepper@cygnus.com>, 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 <libintl.h>], [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 <locale.h> in the installed <libintl.h> 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 <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. 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 <drepper@cygnus.com>, 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
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*])
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
+ AC_MSG_RESULT(no)
fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-AC_MSG_RESULT(${am_cv_exeext})
-AC_SUBST(EXEEXT)])
-
-# Check to see if we're running under Mingw, without using
-# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_MINGW32()
-AC_DEFUN(AM_MINGW32,
-[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
-[AC_TRY_COMPILE(,[return __MINGW32__;],
-am_cv_mingw32=yes, am_cv_mingw32=no)
-rm -f conftest*])
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes])
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 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 <locale.h>], [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])
+
+
+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])
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
@@ -449,12 +904,22 @@ AC_DEFUN(AM_MAINTAINER_MODE,
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index a9de5b8..5e17bdc 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -1,38 +1,114 @@
/* config.in. Generated automatically from configure.in by autoheader. */
-/* Name of package. */
-#undef PACKAGE
+/* Define if using alloca.c. */
+#undef C_ALLOCA
-/* Version of package. */
-#undef VERSION
+/* Define to empty if the keyword does not work. */
+#undef const
-/* Whether strstr must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRSTR
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
-/* Whether free must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_FREE
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
-/* Whether sbrk must be declared even if <unistd.h> is included. */
-#undef NEED_DECLARATION_SBRK
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
-/* Whether getenv must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_GETENV
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> 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 <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
-/* Do we need to use the b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
/* Define if you have the sbrk function. */
#undef HAVE_SBRK
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -48,5 +124,51 @@
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
+
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
+
+/* Define if free is not declared in system header files. */
+#undef NEED_DECLARATION_FREE
+
+/* Define if sbrk is not declared in system header files. */
+#undef NEED_DECLARATION_SBRK
+
+/* Define if getenv is not declared in system header files. */
+#undef NEED_DECLARATION_GETENV
+
+/* Define if environ is not declared in system header files. */
+#undef NEED_DECLARATION_ENVIRON
+
+/* Additional extension a shared object might have. */
+#undef EXTRA_SHLIB_EXTENSION
+
diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure
index d15e3d2..707add1 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
+# Generated automatically using autoconf version 2.13.1
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,20 +12,24 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared build shared libraries [default=yes]
- --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-shared[=PKGS] build shared libraries [default=yes]"
ac_help="$ac_help
- --enable-static build static libraries [default=yes]
- --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-static[=PKGS] build static libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+ac_help="$ac_help
--enable-targets alternative target configurations"
ac_help="$ac_help
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
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"
+ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
@@ -350,7 +354,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
+ echo "configure generated by autoconf version 2.13.1"
exit 0 ;;
-with-* | --with-*)
@@ -510,7 +514,7 @@ done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
- . $cache_file
+ test -f "$cache_file" && . $cache_file
else
echo "creating cache $cache_file"
> $cache_file
@@ -520,9 +524,11 @@ 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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
+ac_exeext=
+ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -552,9 +558,130 @@ done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:568: checking host system type" >&5
+if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_host_alias=$host
+ case "$ac_cv_host_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ if ac_cv_host_alias=`$ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) ac_cv_host_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
+ ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_host" 1>&6
+
+host=$ac_cv_host
+host_alias=$ac_cv_host_alias
+host_cpu=$ac_cv_host_cpu
+host_vendor=$ac_cv_host_vendor
+host_os=$ac_cv_host_os
+
+
+
+
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:609: checking target system type" >&5
+if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_target_alias=$target
+ case "$ac_cv_target_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ ac_cv_target_alias=$host_alias ;;
+
+ *) ac_cv_target_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
+ ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_target" 1>&6
+
+target=$ac_cv_target
+target_alias=$ac_cv_target_alias
+target_cpu=$ac_cv_target_cpu
+target_vendor=$ac_cv_target_vendor
+target_os=$ac_cv_target_os
+
+
+
+
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:649: checking build system type" >&5
+if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_build_alias=$build
+ case "$ac_cv_build_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ ac_cv_build_alias=$host_alias ;;
+
+ *) ac_cv_build_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
+ ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_build" 1>&6
+
+build=$ac_cv_build
+build_alias=$ac_cv_build_alias
+build_cpu=$ac_cv_build_cpu
+build_vendor=$ac_cv_build_vendor
+build_os=$ac_cv_build_os
+
+
+
# Do some error checking and defaulting for the host and target type.
@@ -577,69 +704,6 @@ NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-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:588: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:609: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:627: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
test "$host_alias" != "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
@@ -658,12 +722,12 @@ 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:662: checking for a BSD compatible install" >&5
+echo "configure:726: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ 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
@@ -678,6 +742,10 @@ else
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
@@ -706,13 +774,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-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:716: checking whether build environment is sane" >&5
+echo "configure:783: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -760,18 +827,18 @@ EOF_SED
rm -f conftestsed
fi
test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+ program_transform_name="s,^,${program_prefix},;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+ program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
# sed with no file args requires a program.
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:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:840: 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
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftestmake <<\EOF
@@ -798,7 +865,7 @@ fi
PACKAGE=ld
-VERSION=2.9.1
+VERSION=2.9.5
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; }
@@ -815,7 +882,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:819: checking for working aclocal" >&5
+echo "configure:886: 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.
@@ -828,7 +895,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:832: checking for working autoconf" >&5
+echo "configure:899: 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.
@@ -841,7 +908,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:845: checking for working automake" >&5
+echo "configure:912: 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.
@@ -854,7 +921,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:858: checking for working autoheader" >&5
+echo "configure:925: 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.
@@ -867,7 +934,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:871: checking for working makeinfo" >&5
+echo "configure:938: 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.
@@ -927,18 +994,42 @@ else
enable_static=yes
fi
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+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
+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:934: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+echo "configure:1024: checking for $ac_word" >&5
+if eval "test \"\${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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -959,15 +1050,16 @@ 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:963: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+echo "configure:1054: checking for $ac_word" >&5
+if eval "test \"\${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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -988,16 +1080,17 @@ 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:992: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+echo "configure:1084: checking for $ac_word" >&5
+if eval "test \"\${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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1032,25 +1125,61 @@ else
echo "$ac_t""no" 1>&6
fi
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32* | *CYGWIN*)
+ # 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:1135: checking for $ac_word" >&5
+if eval "test \"\${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:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1167: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1050 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1178 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1183: \"$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
@@ -1064,19 +1193,25 @@ else
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:1074: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1209: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $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:1079: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+echo "configure:1214: checking whether we are using GNU C" >&5
+if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
@@ -1084,7 +1219,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$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:1223: \"$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
@@ -1095,12 +1230,16 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1103: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+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:1242: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
@@ -1114,16 +1253,20 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
# Check whether --with-gnu-ld or --without-gnu-ld was given.
@@ -1134,18 +1277,23 @@ 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:1143: checking for ld used by GCC" >&5
+echo "configure:1285: 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]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -1157,19 +1305,19 @@ echo "configure:1143: 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:1161: checking for GNU ld" >&5
+echo "configure:1309: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1164: checking for non-GNU ld" >&5
+echo "configure:1312: checking for non-GNU ld" >&5
fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+if eval "test \"\${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}:"
+ 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"; then
+ 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.
@@ -1177,7 +1325,7 @@ else
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -1194,10 +1342,9 @@ 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:1200: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+echo "configure:1347: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"\${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.
@@ -1212,45 +1359,44 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1216: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+echo "configure:1363: checking for BSD-compatible nm" >&5
+if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ 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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac
+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:1253: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+echo "configure:1399: checking whether ln -s works" >&5
+if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata
@@ -1269,24 +1415,37 @@ else
echo "$ac_t""no" 1>&6
fi
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1289 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1448 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1304,17 +1463,122 @@ case "$host" in
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1470: checking whether the C compiler needs -belf" >&5
+if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1475 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1482: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
;;
+
+
esac
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+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 \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ test -f "$cache_file" && . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# 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'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
@@ -1354,15 +1618,16 @@ 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:1358: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+echo "configure:1622: checking for $ac_word" >&5
+if eval "test \"\${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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -1383,16 +1648,17 @@ 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:1387: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+echo "configure:1652: checking for $ac_word" >&5
+if eval "test \"\${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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1427,25 +1693,61 @@ else
echo "$ac_t""no" 1>&6
fi
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32* | *CYGWIN*)
+ # 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:1703: checking for $ac_word" >&5
+if eval "test \"\${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:1435: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1735: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1445 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1746 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1751: \"$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
@@ -1459,19 +1761,25 @@ else
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:1469: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1777: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $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:1474: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+echo "configure:1782: checking whether we are using GNU C" >&5
+if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
@@ -1479,7 +1787,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1483: \"$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:1791: \"$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
@@ -1490,12 +1798,16 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1498: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+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:1810: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
@@ -1509,104 +1821,1932 @@ 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 "$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
+
+# 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:1853: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ 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.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ 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}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ALL_LINGUAS=
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1912: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1927 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1933: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1944 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1950: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1961 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1967: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1992: 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
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2013: checking for ANSI C header files" >&5
+if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2018 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2026: \"$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*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+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
+#line 2043 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+#line 2061 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2082 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
fi
+fi
+fi
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
-echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:1529: checking for Cygwin32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2117: checking for working const" >&5
+if eval "test \"\${ac_cv_c_const+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1534 "configure"
+#line 2122 "configure"
#include "confdefs.h"
int main() {
-return __CYGWIN32__;
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
; return 0; }
EOF
-if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_cygwin32=yes
+ ac_cv_c_const=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_cygwin32=no
+ ac_cv_c_const=no
fi
rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2192: checking for inline" >&5
+if eval "test \"\${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 <<EOF
+#line 2199 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw int foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
rm -f conftest*
+done
+
fi
-echo "$ac_t""$am_cv_cygwin32" 1>&6
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:1558: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2232: checking for off_t" >&5
+if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2237 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ eval "ac_cv_type_off_t=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_type_off_t=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2267: checking for size_t" >&5
+if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1563 "configure"
+#line 2272 "configure"
#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ eval "ac_cv_type_size_t=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_type_size_t=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<EOF
+#define size_t unsigned
+EOF
+
+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:2304: checking for working alloca.h" >&5
+if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2309 "configure"
+#include "confdefs.h"
+#include <alloca.h>
int main() {
-return __MINGW32__;
+char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- am_cv_mingw32=yes
+ ac_cv_header_alloca_h=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_mingw32=no
+ ac_cv_header_alloca_h=no
fi
rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2337: checking for alloca" >&5
+if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2342 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2370: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
rm -f conftest*
fi
-echo "$ac_t""$am_cv_mingw32" 1>&6
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+fi
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1589: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2402: checking whether alloca needs Cray hooks" >&5
+if eval "test \"\${ac_cv_os_cray+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+ cat > conftest.$ac_ext <<EOF
+#line 2407 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&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:2432: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
-cat > am_c_test.c << 'EOF'
+ cat > conftest.$ac_ext <<EOF
+#line 2437 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+char (*f)();
+
int main() {
-/* Nothing needed here */
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2461: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2488: checking stack direction for C alloca" >&5
+if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2496 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2515: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+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:2540: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2545 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2550: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2579: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2584 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2608: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2633: checking for working mmap" >&5
+if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2641 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
}
+
+EOF
+if { (eval echo configure:2781: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+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:2809: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2814 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2819: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2849: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2854 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2878: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2907: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2912 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2936: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:2970: checking for LC_MESSAGES" >&5
+if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2975 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:2982: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3003: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3023: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3042: checking for libintl.h" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3047 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3052: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+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:3069: checking for gettext in libc" >&5
+if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3074 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3081: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+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:3097: checking for bindtextdomain in -lintl" >&5
+ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3105 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3116: \"$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
+ 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
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:3132: checking for gettext in libintl" >&5
+if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3137 "configure"
+#include "confdefs.h"
+
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3144: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:3172: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3206: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3211 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3235: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:3262: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3298: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3330 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:3370: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3404: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3440: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3530: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ 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:3558: checking for linux/version.h" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3563 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3568: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ 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
+
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:3631: checking for Cygwin environment" >&5
+if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3636 "configure"
+#include "confdefs.h"
+
+int main() {
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:3647: \"$ac_compile\") 1>&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*
+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:3663: checking for mingw32 environment" >&5
+if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3668 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:3675: \"$ac_compile\") 1>&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*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
+echo "configure:3691: checking for EMX OS/2 environment" >&5
+if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3696 "configure"
+#include "confdefs.h"
+
+int main() {
+return __EMX__;
+; return 0; }
+EOF
+if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_emxos2=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_emxos2=no
+fi
+rm -f conftest*
fi
+
+echo "$ac_t""$ac_cv_emxos2" 1>&6
+EMXOS2=
+test "$ac_cv_emxos2" = yes && EMXOS2=yes
+
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:3722: checking for executable suffix" >&5
+if eval "test \"\${ac_cv_exeext+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = 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:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.C | *.o | *.obj | *.xcoff) ;;
+ *) 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"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
for ac_prog in 'bison -y' byacc
@@ -1614,15 +3754,16 @@ 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:1618: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+echo "configure:3758: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_YACC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_YACC="$ac_prog"
@@ -1643,18 +3784,55 @@ test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
+missing_dir=`cd $ac_aux_dir && pwd`
+for ac_prog in flex lex
+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:3794: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_LEX+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LEX" && break
+done
+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:1650: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
+echo "configure:3827: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_LEX+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_LEX="flex"
@@ -1679,15 +3857,15 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:1683: 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 "configure:3861: checking for yywrap in -l$ac_lib" >&5
+ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1691 "configure"
+#line 3869 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1698,7 +3876,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3880: \"$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
@@ -1720,70 +3898,9 @@ fi
fi
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1725: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1740 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1757 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:1786: checking lex output file root" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
+echo "configure:3903: checking lex output file root" >&5
+if eval "test \"\${ac_cv_prog_lex_root+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# The minimal lex program is just a single line: %%. But some broken lexes
@@ -1803,8 +3920,8 @@ 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:1807: checking whether yytext is a pointer" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
+echo "configure:3924: checking whether yytext is a pointer" >&5
+if eval "test \"\${ac_cv_prog_lex_yytext_pointer+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# POSIX says lex can declare yytext either as a pointer or an array; the
@@ -1815,14 +3932,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 1819 "configure"
+#line 3936 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3943: \"$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
@@ -1845,7 +3962,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1849: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:3966: 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"
@@ -1855,11 +3972,16 @@ else
fi
echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
+
+
+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
@@ -1874,18 +3996,18 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1878: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+echo "configure:4000: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1883 "configure"
+#line 4005 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4010: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -1913,12 +4035,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1917: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+echo "configure:4039: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1922 "configure"
+#line 4044 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1927,6 +4049,7 @@ else
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
+char (*f)();
int main() {
@@ -1936,12 +4059,12 @@ int main() {
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+f = $ac_func;
#endif
; return 0; }
EOF
-if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4068: \"$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
@@ -1970,12 +4093,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:1974: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
+echo "configure:4097: checking for $ac_hdr that defines DIR" >&5
+if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1979 "configure"
+#line 4102 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1983,7 +4106,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -2008,15 +4131,15 @@ 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:2012: 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 "configure:4135: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2020 "configure"
+#line 4143 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2027,7 +4150,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4154: \"$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
@@ -2049,15 +4172,15 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2053: 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 "configure:4176: checking for opendir in -lx" >&5
+ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2061 "configure"
+#line 4184 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2068,7 +4191,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4195: \"$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
@@ -2093,7 +4216,7 @@ fi
case "${host}" in
-i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
cat >> confdefs.h <<\EOF
#define USE_BINARY_FOPEN 1
EOF
@@ -2101,12 +4224,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:2105: checking whether strstr must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
+echo "configure:4228: checking whether strstr must be declared" >&5
+if eval "test \"\${bfd_cv_decl_needed_strstr+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2110 "configure"
+#line 4233 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2127,7 +4250,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -2141,20 +4264,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
if test $bfd_cv_decl_needed_strstr = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRSTR 1
EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:2153: checking whether free must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
+echo "configure:4275: checking whether free must be declared" >&5
+if eval "test \"\${bfd_cv_decl_needed_free+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2158 "configure"
+#line 4280 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2175,7 +4297,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -2189,20 +4311,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
if test $bfd_cv_decl_needed_free = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_FREE 1
EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:2201: checking whether sbrk must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
+echo "configure:4322: checking whether sbrk must be declared" >&5
+if eval "test \"\${bfd_cv_decl_needed_sbrk+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2206 "configure"
+#line 4327 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2223,7 +4344,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -2237,20 +4358,19 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
if test $bfd_cv_decl_needed_sbrk = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_SBRK 1
EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:2249: checking whether getenv must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
+echo "configure:4369: checking whether getenv must be declared" >&5
+if eval "test \"\${bfd_cv_decl_needed_getenv+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2254 "configure"
+#line 4374 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2271,7 +4391,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -2285,11 +4405,96 @@ fi
echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
if test $bfd_cv_decl_needed_getenv = yes; then
- bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $bfd_tr_decl 1
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_GETENV 1
+EOF
+
+fi
+
+echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
+echo "configure:4416: checking whether environ must be declared" >&5
+if eval "test \"\${bfd_cv_decl_needed_environ+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4421 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *(*pfn) = (char *(*)) environ
+; return 0; }
+EOF
+if { (eval echo configure:4442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_decl_needed_environ=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_decl_needed_environ=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
+if test $bfd_cv_decl_needed_environ = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_ENVIRON 1
+EOF
+
+fi
+
+
+# When converting linker scripts into strings for use in emulation
+# files, use astring.sed if the compiler supports ANSI string
+# concatenation, or ostring.sed otherwise. This is to support the
+# broken Microsoft MSVC compiler, which limits the length of string
+# constants, while still supporting pre-ANSI compilers which do not
+# support string concatenation.
+echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
+echo "configure:4470: checking whether ANSI C string concatenation works" >&5
+if eval "test \"\${ld_cv_string_concatenation+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4475 "configure"
+#include "confdefs.h"
+
+int main() {
+char *a = "a" "a";
+; return 0; }
EOF
+if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ld_cv_string_concatenation=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ld_cv_string_concatenation=no
+fi
+rm -f conftest*
+fi
+echo "$ac_t""$ld_cv_string_concatenation" 1>&6
+if test "$ld_cv_string_concatenation" = "yes"; then
+ STRINGIFY=astring.sed
+else
+ STRINGIFY=ostring.sed
fi
@@ -2298,7 +4503,10 @@ fi
all_targets=
EMUL=
all_emuls=
-TDIRS=
+all_emul_extras=
+all_libpath=
+
+rm -f tdirs
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
@@ -2306,7 +4514,7 @@ do
all_targets=true
else
# Canonicalize the secondary target names.
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
+ result=`$ac_config_sub $targ_alias 2>/dev/null`
if test -n "$result"; then
targ=$result
else
@@ -2319,15 +4527,36 @@ do
EMUL=$targ_emul
fi
- for i in $targ_emul $targ_extra_emuls; do
+ for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
*)
all_emuls="$all_emuls e${i}.o"
eval result=\$tdir_$i
test -z "$result" && result=$targ_alias
- TDIRS="$TDIRS\\
-tdir_$i=$result"
+ echo tdir_$i=$result >> tdirs
+ ;;
+ esac
+ done
+
+ for i in $targ_emul $targ_extra_libpath; do
+ case " $all_libpath " in
+ *" ${i} "*) ;;
+ *)
+ if test -z "$all_libpath"; then
+ all_libpath=${i}
+ else
+ all_libpath="$all_libpath ${i}"
+ fi
+ ;;
+ esac
+ done
+
+ for i in $targ_extra_ofiles; do
+ case " $all_emul_extras " in
+ *" ${i} "*) ;;
+ *)
+ all_emul_extras="$all_emul_extras ${i}"
;;
esac
done
@@ -2336,6 +4565,8 @@ done
+TDIRS=tdirs
+
if test x${all_targets} = xtrue; then
if test x${want64} = xtrue; then
@@ -2343,11 +4574,17 @@ if test x${all_targets} = xtrue; then
else
EMULATION_OFILES='$(ALL_EMULATIONS)'
fi
+ EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
else
EMULATION_OFILES=$all_emuls
+ EMUL_EXTRA_OFILES=$all_emul_extras
fi
+
+EMULATION_LIBPATH=$all_libpath
+
+
if test x${enable_static} = xno; then
TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
else
@@ -2355,6 +4592,18 @@ else
fi
+target_vendor=${target_vendor=$host_vendor}
+case "$target_vendor" in
+ hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
+ *) EXTRA_SHLIB_EXTENSION= ;;
+esac
+if test x${EXTRA_SHLIB_EXTENSION} != x ; then
+ cat >> confdefs.h <<EOF
+#define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
+EOF
+
+fi
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -2378,7 +4627,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -2445,7 +4694,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -2456,7 +4705,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2469,6 +4718,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -2503,8 +4753,8 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
@@ -2515,24 +4765,49 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@RANLIB@%$RANLIB%g
s%@CC@%$CC%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
+s%@CPP@%$CPP%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
s%@EXEEXT@%$EXEEXT%g
s%@YACC@%$YACC%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
-s%@CPP@%$CPP%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
s%@HDEFINES@%$HDEFINES%g
s%@HOSTING_CRT0@%$HOSTING_CRT0%g
s%@HOSTING_LIBS@%$HOSTING_LIBS%g
s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
+s%@STRINGIFY@%$STRINGIFY%g
s%@EMUL@%$EMUL%g
-s%@TDIRS@%$TDIRS%g
+/@TDIRS@/r $TDIRS
+s%@TDIRS@%%g
s%@EMULATION_OFILES@%$EMULATION_OFILES%g
+s%@EMUL_EXTRA_OFILES@%$EMUL_EXTRA_OFILES%g
+s%@EMULATION_LIBPATH@%$EMULATION_LIBPATH%g
s%@TESTBFDLIB@%$TESTBFDLIB%g
CEOF
@@ -2575,7 +4850,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -2748,10 +5023,10 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-
+sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
index 883ce67..38ad347 100644
--- a/contrib/binutils/ld/configure.host
+++ b/contrib/binutils/ld/configure.host
@@ -11,14 +11,14 @@
HDEFINES=
HOSTING_CRT0=/lib/crt0.o
-HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc'
+HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc'
NATIVE_LIB_DIRS=
case "${host}" in
alpha*-*-linux-gnu*)
- HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`'
+ HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
alpha*-*-netbsd*)
@@ -35,6 +35,25 @@ alpha*-*-*)
NATIVE_LIB_DIRS=/usr/ccs/lib
;;
+arm*-*-linux-gnu*)
+ HOSTING_CRT0='-p -dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ ;;
+
+i[3456]86-*-freebsdelf*)
+ # The new BSD `make' has a bug: it doesn't pass empty arguments in
+ # shell commands. So we need to make this value non-empty in order
+ # for the genscripts.sh call to work. There's nothing magic about
+ # the value `/lib'; it's just a dummy.
+ NATIVE_LIB_DIRS=/lib
+ # Older versions of gcc do not use a specs file. In those cases,
+ # gcc -print-file-name=specs will simply print specs. We create a
+ # dummy specs files to handle this.
+ echo "-dynamic-linker /usr/libexec/ld-elf.so.1" > specs
+ HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ ;;
+
i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*)
# The new BSD `make' has a bug: it doesn't pass empty arguments in
# shell commands. So we need to make this value non-empty in order
@@ -45,24 +64,24 @@ i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*)
;;
i[3456]86-*-sysv4*)
- HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o'
+ HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o'
NATIVE_LIB_DIRS=/usr/ccs/lib
;;
i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*)
- HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-file-name=crtend.o; fi`'
+ HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
;;
i[3456]86-*-sysv*)
HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
;;
i[3456]86-*-solaris*)
- HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-file-name=crtn.o; fi`'
+ HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
NATIVE_LIB_DIRS=/usr/ccs/lib
;;
@@ -77,8 +96,8 @@ i[3456]86-*-sco* | i[3456]86-*-isc*)
echo "int dummy_crteng () { return 0; }" > crtend.c
${CC} -c crtend.c -o crtend.o
rm -f crtend.c
- HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-file-name=crtend.o; fi` /lib/crtn.o'
+ HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
;;
i[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld)
@@ -86,18 +105,24 @@ i[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld)
;;
i[3456]86-*-linux*libc1*)
- HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
+ HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
i[3456]86-*-linux-gnu*)
- HOSTING_CRT0='-dynamic-linker `fgrep ld-linux.so \`gcc --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `gcc --print-file-name=crt1.o` `gcc --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L`dirname \`gcc --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` `gcc --print-file-name=crtn.o`'
+ HOSTING_CRT0='-dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
i[3456]86-*-lynxos*)
HOSTING_CRT0=/lib/init1.o
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
+ ;;
+
+i[3456]86-pc-interix*)
+ HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
+ NATIVE_LIB_DIRS='$$INTERIX_ROOT/usr/lib/'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L $$X/local_bin -L $$INTERIX_ROOT/usr/lib -lc -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
;;
mips*-dec-bsd*)
@@ -106,12 +131,22 @@ mips*-dec-bsd*)
mips*-sgi-irix4*)
HOSTING_CRT0=/usr/lib/crt1.o
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
;;
-mips*-sgi-irix[56]*)
+mips*-sgi-irix5*)
HOSTING_CRT0=/usr/lib/crt1.o
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
+ ;;
+
+mips*-sgi-irix6*)
+ HOSTING_CRT0='/usr/lib32/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o ; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L/usr/lib32 -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
+ ;;
+
+mips*-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
m68*-*-linux*aout*)
@@ -119,23 +154,23 @@ m68*-*-linux*aout*)
;;
m68*-*-linux*libc1*)
- HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
+ HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
m68*-*-linux-gnu*)
- HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
+ HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
m68*-*-lynxos*)
HOSTING_CRT0=/lib/init1.o
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
;;
m68*-motorola-sysv)
- HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`gcc -print-file-name=\`crt0.o ]; then echo \`gcc -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc881 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi`'
+ HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`${CC} -print-file-name=\`crt0.o ]; then echo \`${CC} -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc881 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
;;
m68*-sun-*)
@@ -149,8 +184,13 @@ m88*-*-dgux*)
;;
m88*-motorola-sysv3)
- HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-file-name=crtend.o; fi` `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi`'
+ HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+ ;;
+
+powerpc*-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
;;
romp-*-*)
@@ -158,9 +198,19 @@ romp-*-*)
;;
sparc*-*-solaris2*)
- HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-file-name=crtn.o; fi`'
+ HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
NATIVE_LIB_DIRS=/usr/ccs/lib
;;
+sparc-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ ;;
+
+sparc64-*-linux-gnu*)
+ HOSTING_CRT0='-dynamic-linker /lib64/ld-linux.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+ ;;
+
esac
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index dbadbe0..32fc5f6 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -1,11 +1,11 @@
dnl Process this file with autoconf to produce a configure script
dnl
-AC_PREREG(2.5)
+AC_PREREG(2.13)
AC_INIT(ldmain.c)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(ld, 2.9.1)
+AM_INIT_AUTOMAKE(ld, 2.9.5)
AM_PROG_LIBTOOL
@@ -37,13 +37,15 @@ fi
# host-specific stuff:
AC_PROG_CC
-AM_PROG_INSTALL
-AM_CYGWIN32
-AM_EXEEXT
+AC_PROG_INSTALL
+
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
+AC_EXEEXT
AC_PROG_YACC
-AC_PROG_LEX
-AC_DECL_YYTEXT
+AM_PROG_LEX
AM_MAINTAINER_MODE
@@ -64,13 +66,40 @@ BFD_NEED_DECLARATION(strstr)
BFD_NEED_DECLARATION(free)
BFD_NEED_DECLARATION(sbrk)
BFD_NEED_DECLARATION(getenv)
+BFD_NEED_DECLARATION(environ)
+
+# When converting linker scripts into strings for use in emulation
+# files, use astring.sed if the compiler supports ANSI string
+# concatenation, or ostring.sed otherwise. This is to support the
+# broken Microsoft MSVC compiler, which limits the length of string
+# constants, while still supporting pre-ANSI compilers which do not
+# support string concatenation.
+AC_MSG_CHECKING([whether ANSI C string concatenation works])
+AC_CACHE_VAL(ld_cv_string_concatenation,
+[AC_TRY_COMPILE(,[char *a = "a" "a";],
+ [ld_cv_string_concatenation=yes],
+ [ld_cv_string_concatenation=no])])
+AC_MSG_RESULT($ld_cv_string_concatenation)
+if test "$ld_cv_string_concatenation" = "yes"; then
+ STRINGIFY=astring.sed
+else
+ STRINGIFY=ostring.sed
+fi
+AC_SUBST(STRINGIFY)
# target-specific stuff:
all_targets=
EMUL=
all_emuls=
-TDIRS=
+all_emul_extras=
+all_libpath=
+
+dnl We need to get an arbitrary number of tdir definitions into
+dnl Makefile. We can't do it using AC_SUBST, because autoconf does
+dnl not permit literal newlines in an AC_SUBST variables. So we use a
+dnl file.
+rm -f tdirs
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
@@ -78,7 +107,7 @@ do
all_targets=true
else
# Canonicalize the secondary target names.
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
+ result=`$ac_config_sub $targ_alias 2>/dev/null`
if test -n "$result"; then
targ=$result
else
@@ -91,15 +120,36 @@ do
EMUL=$targ_emul
fi
- for i in $targ_emul $targ_extra_emuls; do
+ for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
*)
all_emuls="$all_emuls e${i}.o"
eval result=\$tdir_$i
test -z "$result" && result=$targ_alias
- TDIRS="$TDIRS\\
-tdir_$i=$result"
+ echo tdir_$i=$result >> tdirs
+ ;;
+ esac
+ done
+
+ for i in $targ_emul $targ_extra_libpath; do
+ case " $all_libpath " in
+ *" ${i} "*) ;;
+ *)
+ if test -z "$all_libpath"; then
+ all_libpath=${i}
+ else
+ all_libpath="$all_libpath ${i}"
+ fi
+ ;;
+ esac
+ done
+
+ for i in $targ_extra_ofiles; do
+ case " $all_emul_extras " in
+ *" ${i} "*) ;;
+ *)
+ all_emul_extras="$all_emul_extras ${i}"
;;
esac
done
@@ -107,7 +157,9 @@ tdir_$i=$result"
done
AC_SUBST(EMUL)
-AC_SUBST(TDIRS)
+
+TDIRS=tdirs
+AC_SUBST_FILE(TDIRS)
dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
dnl target, and in those cases we should also build the 64 bit
@@ -118,10 +170,16 @@ if test x${all_targets} = xtrue; then
else
EMULATION_OFILES='$(ALL_EMULATIONS)'
fi
+ EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
else
EMULATION_OFILES=$all_emuls
+ EMUL_EXTRA_OFILES=$all_emul_extras
fi
AC_SUBST(EMULATION_OFILES)
+AC_SUBST(EMUL_EXTRA_OFILES)
+
+EMULATION_LIBPATH=$all_libpath
+AC_SUBST(EMULATION_LIBPATH)
if test x${enable_static} = xno; then
TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
@@ -130,4 +188,15 @@ else
fi
AC_SUBST(TESTBFDLIB)
-AC_OUTPUT(Makefile)
+target_vendor=${target_vendor=$host_vendor}
+case "$target_vendor" in
+ hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
+ *) EXTRA_SHLIB_EXTENSION= ;;
+esac
+if test x${EXTRA_SHLIB_EXTENSION} != x ; then
+ AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
+ [Additional extension a shared object might have.])
+fi
+
+AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
+[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
index 18c74c4..52715f4 100644
--- a/contrib/binutils/ld/configure.tgt
+++ b/contrib/binutils/ld/configure.tgt
@@ -7,13 +7,26 @@
# following shell variables:
# targ_emul name of linker emulation to use
# targ_extra_emuls additional linker emulations to provide
+# targ_extra_libpath additional linker emulations using LIB_PATH
+# targ_extra_ofiles additional objects needed by the emulation
targ_extra_emuls=
+targ_extra_ofiles=
case "${targ}" in
-arm-*-pe) targ_emul=armpe ;;
+arm-epoc-pe) targ_emul=arm_epoc_pe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-*-wince) targ_emul=armpe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-*-pe) targ_emul=armpe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arc-*-elf*) targ_emul=arcelf ;;
+avr-*-*) targ_emul=avr85xx
+ targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;;
d10v-*-*) targ_emul=d10velf ;;
+d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
+d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
+d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o" ;;
sparc64-*-aout*) targ_emul=sparcaout ;;
sparc64-*-elf*) targ_emul=elf64_sparc ;;
sparc-sun-sunos4*) targ_emul=sun4 ;;
@@ -36,12 +49,26 @@ sparc64-*-linux-gnu*) targ_emul=elf64_sparc
tdir_sun4=sparc-sun-sunos4
;;
sparc*-*-linux-gnu*) targ_emul=elf32_sparc
- targ_extra_emuls="sparclinux sun4"
+ targ_extra_emuls="sparclinux elf64_sparc sun4"
tdir_sparclinux=${targ_alias}aout
+ tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
tdir_sun4=sparc-sun-sunos4
;;
sparc*-*-lynxos*) targ_emul=sparclynx ;;
sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
+sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
+ targ_emul=elf32_sparc ;;
+sparc-*-solaris2*) targ_emul=elf32_sparc
+ targ_extra_emuls="elf64_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
+ ;;
+sparcv9-*-solaris2* | sparc64-*-solaris2*)
+ targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+ ;;
sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
sparc*-*-rtems*) targ_emul=sparcaout ;;
@@ -51,12 +78,15 @@ i960-wrs-vxworks*) targ_emul=gld960 ;;
i960-*-coff) targ_emul=gld960coff ;;
i960-intel-nindy) targ_emul=gld960 ;;
i960-*-rtems*) targ_emul=gld960coff ;;
+i960-*-elf*) targ_emul=elf32_i960 ;;
m32r-*-*) targ_emul=m32relf ;;
m68*-sun-sunos[34]*) targ_emul=sun3 ;;
m68*-wrs-vxworks*) targ_emul=sun3 ;;
m68*-ericsson-ose) targ_emul=sun3 ;;
m68*-apple-aux*) targ_emul=m68kaux ;;
*-tandem-none) targ_emul=st2000 ;;
+i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
+i370-*-mvs*) targ_emul=mvs ;;
i[3456]86-*-vsta) targ_emul=vsta ;;
i[3456]86-go32-rtems*) targ_emul=i386go32 ;;
i[3456]86-*-go32) targ_emul=i386go32 ;;
@@ -66,6 +96,7 @@ i[3456]86-*-sco*) targ_emul=i386coff ;;
i[3456]86-*-isc*) targ_emul=i386coff ;;
i[3456]86-*-lynxos*) targ_emul=i386lynx ;;
i[3456]86-*-coff) targ_emul=i386coff ;;
+i[3456]86-*-rtemself*) targ_emul=elf_i386 ;;
i[3456]86-*-rtems*) targ_emul=i386coff ;;
i[3456]86-*-bsd) targ_emul=i386bsd ;;
i[3456]86-*-bsd386) targ_emul=i386bsd ;;
@@ -81,22 +112,34 @@ i[3456]86-*-linux-gnu*) targ_emul=elf_i386
tdir_i386linux=${targ_alias}aout
;;
i[3456]86-*-sysv4*) targ_emul=elf_i386 ;;
+i[3456]86-*-solaris2*) targ_emul=elf_i386 ;;
i[3456]86-*-unixware) targ_emul=elf_i386 ;;
+i[3456]86-*-solaris*) targ_emul=elf_i386 ;;
i[3456]86-*-netbsd*) targ_emul=i386nbsd ;;
i[3456]86-*-netware) targ_emul=i386nw ;;
i[3456]86-*-elf*) targ_emul=elf_i386 ;;
-i[3456]86-*-freebsdelf*) targ_emul=elf_i386 ;;
-i[3456]86-*-freebsd*) targ_emul=i386bsd ;;
+i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12])
+ targ_emul=i386bsd ;;
+i[3456]86-*-freebsd*) targ_emul=elf_i386 ;;
i[3456]86-*-sysv*) targ_emul=i386coff ;;
i[3456]86-*-ptx*) targ_emul=i386coff ;;
i[3456]86-*-mach*) targ_emul=i386mach ;;
i[3456]86-*-gnu*) targ_emul=elf_i386 ;;
i[3456]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
i[3456]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
-i[3456]86-*-winnt*) targ_emul=i386pe ;;
-i[3456]86-*-pe) targ_emul=i386pe ;;
-i[3456]86-*-cygwin32*) targ_emul=i386pe ;;
-i[3456]86-*-mingw32*) targ_emul=i386pe ;;
+i[3456]86-*-winnt*) targ_emul=i386pe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-pe) targ_emul=i386pe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-cygwin*) targ_emul=i386pe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-mingw32*) targ_emul=i386pe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-interix*) targ_emul=i386pe_posix;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-beospe*) targ_emul=i386beos ;;
+i[3456]86-*-beos*) targ_emul=elf_i386_be ;;
+i[3456]86-*-vxworks*) targ_emul=i386aout ;;
m8*-*-*) targ_emul=m88kbcs ;;
a29k-*-udi) targ_emul=sa29200 ;;
a29k-*-ebmon) targ_emul=ebmon29k ;;
@@ -105,16 +148,35 @@ a29k-*-*) targ_emul=a29k ;;
arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
armeb-*-aout) targ_emul=armaoutb ;;
arm-*-coff) targ_emul=armcoff ;;
+arm-*-netbsd*) targ_emul=armnbsd ;;
+arm-*-elf) targ_emul=armelf ;;
+arm-*-oabi) targ_emul=armelf_oabi ;;
+arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf" ;;
+arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+arm*-*-conix*) targ_emul=armelf ;;
+thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+strongarm-*-coff) targ_emul=armcoff ;;
+strongarm-*-elf) targ_emul=armelf ;;
thumb-*-coff) targ_emul=armcoff ;;
-thumb-*-pe) targ_emul=armpe ;;
-h8300-*-hms) targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
+thumb-*-elf) targ_emul=armelf ;;
+thumb-*-oabi) targ_emul=armelf_oabi ;;
+thumb-epoc-pe) targ_emul=arm_epoc_pe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+thumb-*-pe) targ_emul=armpe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+h8300-*-hms* | h8300-*-coff*)
+ targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
;;
-h8500-*-hms) targ_emul=h8500
+h8500-*-hms* | h8500-*-coff*)
+ targ_emul=h8500
targ_extra_emuls="h8500s h8500b h8500m h8500c"
;;
-sh-*-elf*) targ_emul=shelf
+sh-*-elf* | sh-*-rtemself*)
+ targ_emul=shelf
targ_extra_emuls="shlelf sh shl"
;;
+sh-*-pe) targ_emul=shpe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;;
m68k-sony-*) targ_emul=news ;;
m68k-hp-bsd*) targ_emul=hp300bsd ;;
@@ -131,18 +193,26 @@ m68k-*-linux-gnu*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
;;
+m68*-*-gnu*) targ_emul=m68kelf ;;
m68*-*-lynxos*) targ_emul=m68klynx ;;
m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;;
m68*-*-netbsd*) targ_emul=m68knbsd ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtems*) targ_emul=m68kcoff ;;
+hppa*w*-*) targ_emul=elf64hppa ;;
hppa*-*-*elf*) targ_emul=hppaelf ;;
+hppa*-*-linux-gnu*) targ_emul=hppaelf ;;
hppa*-*-lites*) targ_emul=hppaelf ;;
hppa*-*-rtems*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
+mips*-*-pe) targ_emul=mipspe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
mips*-dec-osf*) targ_emul=mipslit ;;
-mips*-sgi-irix[56]*) targ_emul=elf32bsmip ;;
+mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
+mips*-sgi-irix6*) targ_emul=elf32bmipn32
+ targ_extra_emuls="elf32bsmip elf64bmip"
+ ;;
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
@@ -157,7 +227,10 @@ mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
+mips*el-*-rtems*) targ_emul=elf32elmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
+mips*el-*-vxworks*) targ_emul=elf32elmip ;;
+mips*-*-vxworks*) targ_emul=elf32ebmip ;;
mips*el-*-linux-gnu*) targ_emul=elf32lsmip
targ_extra_emuls="elf32bsmip mipslit mipsbig"
;;
@@ -180,26 +253,37 @@ alpha*-*-netbsd*) targ_emul=elf64alpha ;;
z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
-powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-linux-gnu* | powerpc-*-sysv* \
- | powerpc-*-netbsd*)
+powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;
+ targ_extra_libpath=elf32ppc ;;
+pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
+pj*-*-*) targ_emul=pjelf ;;
+powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \
+ | powerpc-*-netbsd* | powerpc-*-vxworks*)
targ_emul=elf32ppc ;;
-powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* | powerpcle-*-sysv*) targ_emul=elf32lppc ;;
+powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* \
+ | powerpcle-*-sysv* | powerpcle-*-vxworks*)
+ targ_emul=elf32lppc ;;
+powerpcle-*-rtems*) targ_emul=elf32leppc ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;;
powerpcle-*-pe) targ_emul=ppcpe ;;
powerpcle-*-winnt*) targ_emul=ppcpe ;;
-powerpcle-*-cygwin32) targ_emul=ppcpe ;;
+powerpcle-*-cygwin*) targ_emul=ppcpe ;;
powerpc-*-aix*) targ_emul=aixppc ;;
powerpc-*-beos*) targ_emul=aixppc ;;
rs6000-*-aix*) targ_emul=aixrs6 ;;
tic30-*-*aout*) targ_emul=tic30aout ;;
tic30-*-*coff*) targ_emul=tic30coff ;;
+tic80-*-*) targ_emul=tic80coff ;;
v850-*-*) targ_emul=v850 ;;
+v850e-*-*) targ_emul=v850 ;;
+v850ea-*-*) targ_emul=v850 ;;
w65-*-*) targ_emul=w65 ;;
-*-*-aout) targ_emul=${target_cpu}-${target_vendor} ;;
-*-*-coff) targ_emul=${target_cpu}-${target_vendor} ;;
-*-*-netware) targ_emul=${target_cpu}-nw ;;
+fr30-*-*) targ_emul=elf32fr30 ;;
+mcore-*-pe) targ_emul=mcorepe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+mcore-*-elf) targ_emul=elf32mcore ;;
*-*-ieee*) targ_emul=vanilla ;;
*)
diff --git a/contrib/binutils/ld/deffile.h b/contrib/binutils/ld/deffile.h
new file mode 100644
index 0000000..e2c710d
--- /dev/null
+++ b/contrib/binutils/ld/deffile.h
@@ -0,0 +1,128 @@
+/* deffile.h - header for .DEF file parser
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Written by DJ Delorie dj@cygnus.com
+
+ This file is part of GLD, the Gnu Linker.
+
+ GLD is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef DEFFILE_H
+#define DEFFILE_H
+
+#include "ansidecl.h"
+
+/* DEF storage definitions. Note that any ordinal may be zero, and
+ any pointer may be NULL, if not defined by the DEF file. */
+
+typedef struct def_file_section
+ {
+ char *name; /* always set */
+ char *class; /* may be NULL */
+ char flag_read, flag_write, flag_execute, flag_shared;
+ }
+def_file_section;
+
+typedef struct def_file_export
+ {
+ char *name; /* always set */
+ char *internal_name; /* always set, may == name */
+ int ordinal; /* -1 if not specified */
+ int hint;
+ char flag_private, flag_constant, flag_noname, flag_data;
+ }
+def_file_export;
+
+typedef struct def_file_module
+ {
+ struct def_file_module *next;
+ void *user_data;
+ char name[1]; /* extended via malloc */
+ }
+def_file_module;
+
+typedef struct def_file_import
+ {
+ char *internal_name; /* always set */
+ def_file_module *module; /* always set */
+ char *name; /* may be NULL; either this or ordinal will be set */
+ int ordinal; /* may be -1 */
+ }
+def_file_import;
+
+typedef struct def_file
+ {
+
+ /* from the NAME or LIBRARY command */
+ char *name;
+ int is_dll; /* -1 if NAME/LIBRARY not given */
+ bfd_vma base_address; /* (bfd_vma)(-1) if unspecified */
+
+ /* from the DESCRIPTION command */
+ char *description;
+
+ /* from the STACK/HEAP command, -1 if unspecified */
+ int stack_reserve, stack_commit;
+ int heap_reserve, heap_commit;
+
+ /* from the SECTION/SEGMENT commands */
+ int num_section_defs;
+ def_file_section *section_defs;
+
+ /* from the EXPORTS commands */
+ int num_exports;
+ def_file_export *exports;
+
+ /* used by imports for module names */
+ def_file_module *modules;
+
+ /* from the IMPORTS commands */
+ int num_imports;
+ def_file_import *imports;
+
+ /* from the VERSION command, -1 if not specified */
+ int version_major, version_minor;
+ }
+def_file;
+
+extern def_file *def_file_empty PARAMS ((void));
+
+/* add_to may be NULL. If not, this .def is appended to it */
+extern def_file *def_file_parse PARAMS ((const char *_filename,
+ def_file * _add_to));
+
+extern void def_file_free PARAMS ((def_file * _def));
+
+extern def_file_export *def_file_add_export PARAMS ((def_file * _def,
+ const char *_name,
+ const char *_internal_name,
+ int _ordinal));
+
+extern def_file_import *def_file_add_import PARAMS ((def_file * _def,
+ const char *_name,
+ const char *_from,
+ int _ordinal,
+ const char *_imported_name));
+
+extern void def_file_add_directive PARAMS ((def_file * _def,
+ const char *param,
+ int len));
+
+#ifdef DEF_FILE_PRINT
+extern void def_file_print PARAMS ((FILE * _file,
+ def_file * _def));
+#endif
+
+#endif /* DEFFILE_H */
diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y
new file mode 100644
index 0000000..760167b
--- /dev/null
+++ b/contrib/binutils/ld/deffilep.y
@@ -0,0 +1,1024 @@
+%{ /* deffilep.y - parser for .def files */
+
+/* Copyright (C) 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <stdio.h>
+#include <ctype.h>
+#include "libiberty.h"
+#include "bfd.h"
+#include "sysdep.h"
+#include "ld.h"
+#include "ldmisc.h"
+#include "deffile.h"
+
+#define TRACE 0
+
+#define ROUND_UP(a, b) (((a)+((b)-1))&~((b)-1))
+
+/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
+ as well as gratuitiously global symbol names, so we can have multiple
+ yacc generated parsers in ld. Note that these are only the variables
+ produced by yacc. If other parser generators (bison, byacc, etc) produce
+ additional global names that conflict at link time, then those parser
+ generators need to be fixed instead of adding those names to this list. */
+
+#define yymaxdepth def_maxdepth
+#define yyparse def_parse
+#define yylex def_lex
+#define yyerror def_error
+#define yylval def_lval
+#define yychar def_char
+#define yydebug def_debug
+#define yypact def_pact
+#define yyr1 def_r1
+#define yyr2 def_r2
+#define yydef def_def
+#define yychk def_chk
+#define yypgo def_pgo
+#define yyact def_act
+#define yyexca def_exca
+#define yyerrflag def_errflag
+#define yynerrs def_nerrs
+#define yyps def_ps
+#define yypv def_pv
+#define yys def_s
+#define yy_yys def_yys
+#define yystate def_state
+#define yytmp def_tmp
+#define yyv def_v
+#define yy_yyv def_yyv
+#define yyval def_val
+#define yylloc def_lloc
+#define yyreds def_reds /* With YYDEBUG defined */
+#define yytoks def_toks /* With YYDEBUG defined */
+#define yylhs def_yylhs
+#define yylen def_yylen
+#define yydefred def_yydefred
+#define yydgoto def_yydgoto
+#define yysindex def_yysindex
+#define yyrindex def_yyrindex
+#define yygindex def_yygindex
+#define yytable def_yytable
+#define yycheck def_yycheck
+
+static int def_lex ();
+
+static void def_description PARAMS ((const char *));
+static void def_exports PARAMS ((const char *, const char *, int, int));
+static void def_heapsize PARAMS ((int, int));
+static void def_import
+ PARAMS ((const char *, const char *, const char *, const char *, int));
+static void def_library PARAMS ((const char *, int));
+static void def_name PARAMS ((const char *, int));
+static void def_section PARAMS ((const char *, int));
+static void def_section_alt PARAMS ((const char *, const char *));
+static void def_stacksize PARAMS ((int, int));
+static void def_version PARAMS ((int, int));
+static void def_directive PARAMS ((char *));
+static int def_parse PARAMS ((void));
+static int def_error PARAMS ((const char *));
+static int def_lex PARAMS ((void));
+
+static int lex_forced_token = 0;
+static const char *lex_parse_string = 0;
+static const char *lex_parse_string_end = 0;
+
+%}
+
+%union {
+ char *id;
+ int number;
+};
+
+%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATAU, DATAL
+%token SECTIONS, EXPORTS, IMPORTS, VERSIONK, BASE, CONSTANTU, CONSTANTL
+%token PRIVATEU, PRIVATEL
+%token READ WRITE EXECUTE SHARED NONAMEU NONAMEL DIRECTIVE
+%token <id> ID
+%token <number> NUMBER
+%type <number> opt_base opt_ordinal
+%type <number> attr attr_list opt_number exp_opt_list exp_opt
+%type <id> opt_name opt_equal_name
+
+%%
+
+start: start command
+ | command
+ ;
+
+command:
+ NAME opt_name opt_base { def_name ($2, $3); }
+ | LIBRARY opt_name opt_base { def_library ($2, $3); }
+ | DESCRIPTION ID { def_description ($2);}
+ | STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
+ | HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
+ | CODE attr_list { def_section ("CODE", $2);}
+ | DATAU attr_list { def_section ("DATA", $2);}
+ | SECTIONS seclist
+ | EXPORTS explist
+ | IMPORTS implist
+ | VERSIONK NUMBER { def_version ($2, 0);}
+ | VERSIONK NUMBER '.' NUMBER { def_version ($2, $4);}
+ | DIRECTIVE ID { def_directive ($2);}
+ ;
+
+
+explist:
+ /* EMPTY */
+ | expline
+ | explist expline
+ ;
+
+expline:
+ /* The opt_comma is necessary to support both the usual
+ DEF file syntax as well as .drectve syntax which
+ mandates <expsym>,<expoptlist>. */
+ ID opt_equal_name opt_ordinal opt_comma exp_opt_list
+ { def_exports ($1, $2, $3, $5); }
+ ;
+exp_opt_list:
+ /* The opt_comma is necessary to support both the usual
+ DEF file syntax as well as .drectve syntax which
+ allows for comma separated opt list. */
+ exp_opt opt_comma exp_opt_list { $$ = $1 | $3; }
+ | { $$ = 0; }
+ ;
+exp_opt:
+ NONAMEU { $$ = 1; }
+ | NONAMEL { $$ = 1; }
+ | CONSTANTU { $$ = 2; }
+ | CONSTANTL { $$ = 2; }
+ | DATAU { $$ = 4; }
+ | DATAL { $$ = 4; }
+ | PRIVATEU { $$ = 8; }
+ | PRIVATEL { $$ = 8; }
+ ;
+implist:
+ implist impline
+ | impline
+ ;
+
+impline:
+ ID '=' ID '.' ID '.' ID { def_import ($1, $3, $5, $7, -1); }
+ | ID '=' ID '.' ID '.' NUMBER { def_import ($1, $3, $5, 0, $7); }
+ | ID '=' ID '.' ID { def_import ($1, $3, 0, $5, -1); }
+ | ID '=' ID '.' NUMBER { def_import ($1, $3, 0, 0, $5); }
+ | ID '.' ID '.' ID { def_import ( 0, $1, $3, $5, -1); }
+ | ID '.' ID { def_import ( 0, $1, 0, $3, -1); }
+;
+
+seclist:
+ seclist secline
+ | secline
+ ;
+
+secline:
+ ID attr_list { def_section ($1, $2);}
+ | ID ID { def_section_alt ($1, $2);}
+ ;
+
+attr_list:
+ attr_list opt_comma attr { $$ = $1 | $3; }
+ | attr { $$ = $1; }
+ ;
+
+opt_comma:
+ ','
+ |
+ ;
+opt_number: ',' NUMBER { $$=$2;}
+ | { $$=-1;}
+ ;
+
+attr:
+ READ { $$ = 1;}
+ | WRITE { $$ = 2;}
+ | EXECUTE { $$=4;}
+ | SHARED { $$=8;}
+ ;
+
+opt_name: ID { $$ = $1; }
+ | ID '.' ID
+ {
+ char * name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
+ sprintf (name, "%s.%s", $1, $3);
+ $$ = name;
+ }
+ | { $$ = ""; }
+ ;
+
+opt_ordinal:
+ '@' NUMBER { $$ = $2;}
+ | { $$ = -1;}
+ ;
+
+opt_equal_name:
+ '=' ID { $$ = $2; }
+ | { $$ = 0; }
+ ;
+
+opt_base: BASE '=' NUMBER { $$ = $3;}
+ | { $$ = 0;}
+ ;
+
+
+
+%%
+
+/*****************************************************************************
+ API
+ *****************************************************************************/
+
+static FILE *the_file;
+static const char *def_filename;
+static int linenumber;
+static def_file *def;
+static int saw_newline;
+
+struct directive
+ {
+ struct directive *next;
+ char *name;
+ int len;
+ };
+
+static struct directive *directives = 0;
+
+def_file *
+def_file_empty ()
+{
+ def_file *rv = (def_file *) xmalloc (sizeof (def_file));
+ memset (rv, 0, sizeof (def_file));
+ rv->is_dll = -1;
+ rv->base_address = (bfd_vma) (-1);
+ rv->stack_reserve = rv->stack_commit = -1;
+ rv->heap_reserve = rv->heap_commit = -1;
+ rv->version_major = rv->version_minor = -1;
+ return rv;
+}
+
+def_file *
+def_file_parse (filename, add_to)
+ const char *filename;
+ def_file *add_to;
+{
+ struct directive *d;
+
+ the_file = fopen (filename, "r");
+ def_filename = filename;
+ linenumber = 1;
+ if (!the_file)
+ {
+ perror (filename);
+ return 0;
+ }
+ if (add_to)
+ {
+ def = add_to;
+ }
+ else
+ {
+ def = def_file_empty ();
+ }
+
+ saw_newline = 1;
+ if (def_parse ())
+ {
+ def_file_free (def);
+ fclose (the_file);
+ return 0;
+ }
+
+ fclose (the_file);
+
+ for (d = directives; d; d = d->next)
+ {
+#if TRACE
+ printf ("Adding directive %08x `%s'\n", d->name, d->name);
+#endif
+ def_file_add_directive (def, d->name, d->len);
+ }
+
+ return def;
+}
+
+void
+def_file_free (def)
+ def_file *def;
+{
+ int i;
+ if (!def)
+ return;
+ if (def->name)
+ free (def->name);
+ if (def->description)
+ free (def->description);
+
+ if (def->section_defs)
+ {
+ for (i = 0; i < def->num_section_defs; i++)
+ {
+ if (def->section_defs[i].name)
+ free (def->section_defs[i].name);
+ if (def->section_defs[i].class)
+ free (def->section_defs[i].class);
+ }
+ free (def->section_defs);
+ }
+
+ if (def->exports)
+ {
+ for (i = 0; i < def->num_exports; i++)
+ {
+ if (def->exports[i].internal_name
+ && def->exports[i].internal_name != def->exports[i].name)
+ free (def->exports[i].internal_name);
+ if (def->exports[i].name)
+ free (def->exports[i].name);
+ }
+ free (def->exports);
+ }
+
+ if (def->imports)
+ {
+ for (i = 0; i < def->num_imports; i++)
+ {
+ if (def->imports[i].internal_name
+ && def->imports[i].internal_name != def->imports[i].name)
+ free (def->imports[i].internal_name);
+ if (def->imports[i].name)
+ free (def->imports[i].name);
+ }
+ free (def->imports);
+ }
+
+ while (def->modules)
+ {
+ def_file_module *m = def->modules;
+ def->modules = def->modules->next;
+ free (m);
+ }
+
+ free (def);
+}
+
+#ifdef DEF_FILE_PRINT
+void
+def_file_print (file, def)
+ FILE *file;
+ def_file *def;
+{
+ int i;
+ fprintf (file, ">>>> def_file at 0x%08x\n", def);
+ if (def->name)
+ fprintf (file, " name: %s\n", def->name ? def->name : "(unspecified)");
+ if (def->is_dll != -1)
+ fprintf (file, " is dll: %s\n", def->is_dll ? "yes" : "no");
+ if (def->base_address != (bfd_vma) (-1))
+ fprintf (file, " base address: 0x%08x\n", def->base_address);
+ if (def->description)
+ fprintf (file, " description: `%s'\n", def->description);
+ if (def->stack_reserve != -1)
+ fprintf (file, " stack reserve: 0x%08x\n", def->stack_reserve);
+ if (def->stack_commit != -1)
+ fprintf (file, " stack commit: 0x%08x\n", def->stack_commit);
+ if (def->heap_reserve != -1)
+ fprintf (file, " heap reserve: 0x%08x\n", def->heap_reserve);
+ if (def->heap_commit != -1)
+ fprintf (file, " heap commit: 0x%08x\n", def->heap_commit);
+
+ if (def->num_section_defs > 0)
+ {
+ fprintf (file, " section defs:\n");
+ for (i = 0; i < def->num_section_defs; i++)
+ {
+ fprintf (file, " name: `%s', class: `%s', flags:",
+ def->section_defs[i].name, def->section_defs[i].class);
+ if (def->section_defs[i].flag_read)
+ fprintf (file, " R");
+ if (def->section_defs[i].flag_write)
+ fprintf (file, " W");
+ if (def->section_defs[i].flag_execute)
+ fprintf (file, " X");
+ if (def->section_defs[i].flag_shared)
+ fprintf (file, " S");
+ fprintf (file, "\n");
+ }
+ }
+
+ if (def->num_exports > 0)
+ {
+ fprintf (file, " exports:\n");
+ for (i = 0; i < def->num_exports; i++)
+ {
+ fprintf (file, " name: `%s', int: `%s', ordinal: %d, flags:",
+ def->exports[i].name, def->exports[i].internal_name,
+ def->exports[i].ordinal);
+ if (def->exports[i].flag_private)
+ fprintf (file, " P");
+ if (def->exports[i].flag_constant)
+ fprintf (file, " C");
+ if (def->exports[i].flag_noname)
+ fprintf (file, " N");
+ if (def->exports[i].flag_data)
+ fprintf (file, " D");
+ fprintf (file, "\n");
+ }
+ }
+
+ if (def->num_imports > 0)
+ {
+ fprintf (file, " imports:\n");
+ for (i = 0; i < def->num_imports; i++)
+ {
+ fprintf (file, " int: %s, from: `%s', name: `%s', ordinal: %d\n",
+ def->imports[i].internal_name,
+ def->imports[i].module,
+ def->imports[i].name,
+ def->imports[i].ordinal);
+ }
+ }
+ if (def->version_major != -1)
+ fprintf (file, " version: %d.%d\n", def->version_major, def->version_minor);
+ fprintf (file, "<<<< def_file at 0x%08x\n", def);
+}
+#endif
+
+def_file_export *
+def_file_add_export (def, external_name, internal_name, ordinal)
+ def_file *def;
+ const char *external_name;
+ const char *internal_name;
+ int ordinal;
+{
+ def_file_export *e;
+ int max_exports = ROUND_UP(def->num_exports, 32);
+ if (def->num_exports >= max_exports)
+ {
+ max_exports = ROUND_UP(def->num_exports+1, 32);
+ if (def->exports)
+ def->exports = (def_file_export *) xrealloc (def->exports, max_exports * sizeof (def_file_export));
+ else
+ def->exports = (def_file_export *) xmalloc (max_exports * sizeof (def_file_export));
+ }
+ e = def->exports + def->num_exports;
+ memset (e, 0, sizeof (def_file_export));
+ if (internal_name && !external_name)
+ external_name = internal_name;
+ if (external_name && !internal_name)
+ internal_name = external_name;
+ e->name = xstrdup (external_name);
+ e->internal_name = xstrdup (internal_name);
+ e->ordinal = ordinal;
+ def->num_exports++;
+ return e;
+}
+
+static def_file_module *
+def_stash_module (def, name)
+ def_file *def;
+ char *name;
+{
+ def_file_module *s;
+ for (s=def->modules; s; s=s->next)
+ if (strcmp (s->name, name) == 0)
+ return s;
+ s = (def_file_module *) xmalloc (sizeof (def_file_module) + strlen (name));
+ s->next = def->modules;
+ def->modules = s;
+ s->user_data = 0;
+ strcpy (s->name, name);
+ return s;
+}
+
+def_file_import *
+def_file_add_import (def, name, module, ordinal, internal_name)
+ def_file *def;
+ const char *name;
+ const char *module;
+ int ordinal;
+ const char *internal_name;
+{
+ def_file_import *i;
+ int max_imports = ROUND_UP(def->num_imports, 16);
+ if (def->num_imports >= max_imports)
+ {
+ max_imports = ROUND_UP(def->num_imports+1, 16);
+ if (def->imports)
+ def->imports = (def_file_import *) xrealloc (def->imports, max_imports * sizeof (def_file_import));
+ else
+ def->imports = (def_file_import *) xmalloc (max_imports * sizeof (def_file_import));
+ }
+ i = def->imports + def->num_imports;
+ memset (i, 0, sizeof (def_file_import));
+ if (name)
+ i->name = xstrdup (name);
+ if (module)
+ i->module = def_stash_module(def, module);
+ i->ordinal = ordinal;
+ if (internal_name)
+ i->internal_name = xstrdup (internal_name);
+ else
+ i->internal_name = i->name;
+ def->num_imports++;
+ return i;
+}
+
+struct
+{
+ char *param;
+ int token;
+}
+diropts[] =
+{
+ { "-heap", HEAPSIZE },
+ { "-stack", STACKSIZE },
+ { "-attr", SECTIONS },
+ { "-export", EXPORTS },
+ { 0, 0 }
+};
+
+void
+def_file_add_directive (my_def, param, len)
+ def_file *my_def;
+ const char *param;
+ int len;
+{
+ def_file *save_def = def;
+ const char *pend = param + len;
+ const char *tend = param;
+ int i;
+
+ def = my_def;
+
+ while (param < pend)
+ {
+ while (param < pend && isspace (*param))
+ param++;
+ for (tend = param + 1;
+ tend < pend && !(isspace (tend[-1]) && *tend == '-');
+ tend++);
+
+ for (i = 0; diropts[i].param; i++)
+ {
+ int len = strlen (diropts[i].param);
+ if (tend - param >= len
+ && strncmp (param, diropts[i].param, len) == 0
+ && (param[len] == ':' || param[len] == ' '))
+ {
+ lex_parse_string_end = tend;
+ lex_parse_string = param + len + 1;
+ lex_forced_token = diropts[i].token;
+ saw_newline = 0;
+ def_parse ();
+ break;
+ }
+ }
+
+ if (!diropts[i].param)
+ {
+ /* xgettext:c-format */
+ einfo (_("Warning: .drectve `%.*s' unrecognized\n"),
+ tend - param, param);
+ }
+ lex_parse_string = 0;
+ param = tend;
+ }
+
+ def = save_def;
+}
+
+/*****************************************************************************
+ Parser Callbacks
+ *****************************************************************************/
+
+static void
+def_name (name, base)
+ const char *name;
+ int base;
+{
+ if (def->name)
+ free (def->name);
+ def->name = xstrdup (name);
+ def->base_address = base;
+ def->is_dll = 0;
+}
+
+static void
+def_library (name, base)
+ const char *name;
+ int base;
+{
+ if (def->name)
+ free (def->name);
+ def->name = xstrdup (name);
+ def->base_address = base;
+ def->is_dll = 1;
+}
+
+static void
+def_description (text)
+ const char *text;
+{
+ int len = def->description ? strlen (def->description) : 0;
+ len += strlen (text) + 1;
+ if (def->description)
+ {
+ def->description = (char *) xrealloc (def->description, len);
+ strcat (def->description, text);
+ }
+ else
+ {
+ def->description = (char *) xmalloc (len);
+ strcpy (def->description, text);
+ }
+}
+
+static void
+def_stacksize (reserve, commit)
+ int reserve;
+ int commit;
+{
+ def->stack_reserve = reserve;
+ def->stack_commit = commit;
+}
+
+static void
+def_heapsize (reserve, commit)
+ int reserve;
+ int commit;
+{
+ def->heap_reserve = reserve;
+ def->heap_commit = commit;
+}
+
+static void
+def_section (name, attr)
+ const char *name;
+ int attr;
+{
+ def_file_section *s;
+ int max_sections = ROUND_UP(def->num_section_defs, 4);
+ if (def->num_section_defs >= max_sections)
+ {
+ max_sections = ROUND_UP(def->num_section_defs+1, 4);
+ if (def->section_defs)
+ def->section_defs = (def_file_section *) xrealloc (def->section_defs, max_sections * sizeof (def_file_import));
+ else
+ def->section_defs = (def_file_section *) xmalloc (max_sections * sizeof (def_file_import));
+ }
+ s = def->section_defs + def->num_section_defs;
+ memset (s, 0, sizeof (def_file_section));
+ s->name = xstrdup (name);
+ if (attr & 1)
+ s->flag_read = 1;
+ if (attr & 2)
+ s->flag_write = 1;
+ if (attr & 4)
+ s->flag_execute = 1;
+ if (attr & 8)
+ s->flag_shared = 1;
+
+ def->num_section_defs++;
+}
+
+static void
+def_section_alt (name, attr)
+ const char *name;
+ const char *attr;
+{
+ int aval = 0;
+ for (; *attr; attr++)
+ {
+ switch (*attr)
+ {
+ case 'R':
+ case 'r':
+ aval |= 1;
+ break;
+ case 'W':
+ case 'w':
+ aval |= 2;
+ break;
+ case 'X':
+ case 'x':
+ aval |= 4;
+ break;
+ case 'S':
+ case 's':
+ aval |= 8;
+ break;
+ }
+ }
+ def_section (name, aval);
+}
+
+static void
+def_exports (external_name, internal_name, ordinal, flags)
+ const char *external_name;
+ const char *internal_name;
+ int ordinal;
+ int flags;
+{
+ def_file_export *dfe;
+
+ if (!internal_name && external_name)
+ internal_name = external_name;
+#if TRACE
+ printf ("def_exports, ext=%s int=%s\n", external_name, internal_name);
+#endif
+
+ dfe = def_file_add_export (def, external_name, internal_name, ordinal);
+ if (flags & 1)
+ dfe->flag_noname = 1;
+ if (flags & 2)
+ dfe->flag_constant = 1;
+ if (flags & 4)
+ dfe->flag_data = 1;
+ if (flags & 8)
+ dfe->flag_private = 1;
+}
+
+static void
+def_import (internal_name, module, dllext, name, ordinal)
+ const char *internal_name;
+ const char *module;
+ const char *dllext;
+ const char *name;
+ int ordinal;
+{
+ char *buf = 0;
+
+ if (dllext != NULL)
+ {
+ buf = (char *) xmalloc (strlen (module) + strlen (dllext) + 2);
+ sprintf (buf, "%s.%s", module, dllext);
+ module = buf;
+ }
+
+ def_file_add_import (def, name, module, ordinal, internal_name);
+ if (buf)
+ free (buf);
+}
+
+static void
+def_version (major, minor)
+ int major;
+ int minor;
+{
+ def->version_major = major;
+ def->version_minor = minor;
+}
+
+static void
+def_directive (str)
+ char *str;
+{
+ struct directive *d = (struct directive *) xmalloc (sizeof (struct directive));
+ d->next = directives;
+ directives = d;
+ d->name = xstrdup (str);
+ d->len = strlen (str);
+}
+
+static int
+def_error (err)
+ const char *err;
+{
+ einfo ("%P: %s:%d: %s\n", def_filename, linenumber, err);
+
+ return 0;
+}
+
+
+/*****************************************************************************
+ Lexical Scanner
+ *****************************************************************************/
+
+#undef TRACE
+#define TRACE 0
+
+/* Never freed, but always reused as needed, so no real leak */
+static char *buffer = 0;
+static int buflen = 0;
+static int bufptr = 0;
+
+static void
+put_buf (c)
+ char c;
+{
+ if (bufptr == buflen)
+ {
+ buflen += 50; /* overly reasonable, eh? */
+ if (buffer)
+ buffer = (char *) xrealloc (buffer, buflen + 1);
+ else
+ buffer = (char *) xmalloc (buflen + 1);
+ }
+ buffer[bufptr++] = c;
+ buffer[bufptr] = 0; /* not optimal, but very convenient */
+}
+
+static struct
+{
+ char *name;
+ int token;
+}
+tokens[] =
+{
+ { "BASE", BASE },
+ { "CODE", CODE },
+ { "CONSTANT", CONSTANTU },
+ { "constant", CONSTANTL },
+ { "DATA", DATAU },
+ { "data", DATAL },
+ { "DESCRIPTION", DESCRIPTION },
+ { "DIRECTIVE", DIRECTIVE },
+ { "EXECUTE", EXECUTE },
+ { "EXPORTS", EXPORTS },
+ { "HEAPSIZE", HEAPSIZE },
+ { "IMPORTS", IMPORTS },
+ { "LIBRARY", LIBRARY },
+ { "NAME", NAME },
+ { "NONAME", NONAMEU },
+ { "noname", NONAMEL },
+ { "PRIVATE", PRIVATEU },
+ { "private", PRIVATEL },
+ { "READ", READ },
+ { "SECTIONS", SECTIONS },
+ { "SEGMENTS", SECTIONS },
+ { "SHARED", SHARED },
+ { "STACKSIZE", STACKSIZE },
+ { "VERSION", VERSIONK },
+ { "WRITE", WRITE },
+ { 0, 0 }
+};
+
+static int
+def_getc ()
+{
+ int rv;
+ if (lex_parse_string)
+ {
+ if (lex_parse_string >= lex_parse_string_end)
+ rv = EOF;
+ else
+ rv = *lex_parse_string++;
+ }
+ else
+ {
+ rv = fgetc (the_file);
+ }
+ if (rv == '\n')
+ saw_newline = 1;
+ return rv;
+}
+
+static int
+def_ungetc (c)
+ int c;
+{
+ if (lex_parse_string)
+ {
+ lex_parse_string--;
+ return c;
+ }
+ else
+ return ungetc (c, the_file);
+}
+
+static int
+def_lex ()
+{
+ int c, i, q;
+
+ if (lex_forced_token)
+ {
+ i = lex_forced_token;
+ lex_forced_token = 0;
+#if TRACE
+ printf ("lex: forcing token %d\n", i);
+#endif
+ return i;
+ }
+
+ c = def_getc ();
+
+ /* trim leading whitespace */
+ while (c != EOF && (c == ' ' || c == '\t') && saw_newline)
+ c = def_getc ();
+
+ if (c == EOF)
+ {
+#if TRACE
+ printf ("lex: EOF\n");
+#endif
+ return 0;
+ }
+
+ if (saw_newline && c == ';')
+ {
+ do
+ {
+ c = def_getc ();
+ }
+ while (c != EOF && c != '\n');
+ if (c == '\n')
+ return def_lex ();
+ return 0;
+ }
+ /* must be something else */
+ saw_newline = 0;
+
+ if (isdigit (c))
+ {
+ bufptr = 0;
+ while (c != EOF && (isxdigit (c) || (c == 'x')))
+ {
+ put_buf (c);
+ c = def_getc ();
+ }
+ if (c != EOF)
+ def_ungetc (c);
+ yylval.number = strtoul (buffer, 0, 0);
+#if TRACE
+ printf ("lex: `%s' returns NUMBER %d\n", buffer, yylval.number);
+#endif
+ return NUMBER;
+ }
+
+ if (isalpha (c) || strchr ("$:-_?", c))
+ {
+ bufptr = 0;
+ while (c != EOF && (isalnum (c) || strchr ("$:-_?/@", c)))
+ {
+ put_buf (c);
+ c = def_getc ();
+ }
+ if (c != EOF)
+ def_ungetc (c);
+ for (i = 0; tokens[i].name; i++)
+ if (strcmp (tokens[i].name, buffer) == 0)
+ {
+#if TRACE
+ printf ("lex: `%s' is a string token\n", buffer);
+#endif
+ return tokens[i].token;
+ }
+#if TRACE
+ printf ("lex: `%s' returns ID\n", buffer);
+#endif
+ yylval.id = xstrdup (buffer);
+ return ID;
+ }
+
+ if (c == '\'' || c == '"')
+ {
+ q = c;
+ c = def_getc ();
+ bufptr = 0;
+ while (c != EOF && c != q)
+ {
+ put_buf (c);
+ c = def_getc ();
+ }
+ yylval.id = xstrdup (buffer);
+#if TRACE
+ printf ("lex: `%s' returns ID\n", buffer);
+#endif
+ return ID;
+ }
+
+ if (c == '=' || c == '.' || c == '@' || c == ',')
+ {
+#if TRACE
+ printf ("lex: `%c' returns itself\n", c);
+#endif
+ return c;
+ }
+
+ if (c == '\n')
+ {
+ linenumber++;
+ saw_newline = 1;
+ }
+
+ /*printf ("lex: 0x%02x ignored\n", c); */
+ return def_lex ();
+}
diff --git a/contrib/binutils/ld/emulparams/armaoutb.sh b/contrib/binutils/ld/emulparams/armaoutb.sh
new file mode 100644
index 0000000..59ab6f1
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armaoutb.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=armaout
+OUTPUT_FORMAT="a.out-arm-big"
+HEADER_START_ADDR=0x8000
+TEXT_START_ADDR=0x8000
+NONPAGED_TEXT_START_ADDRESS=0x8000
+TARGET_PAGE_SIZE=32768
+ARCH=arm
diff --git a/contrib/binutils/ld/emulparams/armaoutl.sh b/contrib/binutils/ld/emulparams/armaoutl.sh
new file mode 100644
index 0000000..9501f33
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armaoutl.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=armaout
+OUTPUT_FORMAT="a.out-arm-little"
+HEADER_START_ADDR=0x8000
+TEXT_START_ADDR=0x8000
+NONPAGED_TEXT_START_ADDRESS=0x8000
+TARGET_PAGE_SIZE=32768
+ARCH=arm
diff --git a/contrib/binutils/ld/emulparams/armcoff.sh b/contrib/binutils/ld/emulparams/armcoff.sh
new file mode 100644
index 0000000..91df7d3
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armcoff.sh
@@ -0,0 +1,6 @@
+ARCH=arm
+SCRIPT_NAME=armcoff
+OUTPUT_FORMAT="coff-arm-little"
+LITTLE_OUTPUT_FORMAT="coff-arm-little"
+BIG_OUTPUT_FORMAT="coff-arm-big"
+TEMPLATE_NAME=armcoff
diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh
new file mode 100644
index 0000000..8c79b64
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armelf.sh
@@ -0,0 +1,22 @@
+MACHINE=
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+TEXT_START_ADDR=0x8000
+TEMPLATE_NAME=armelf
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+
+GENERATE_SHLIB_SCRIPT=yes
+
+ARCH=arm
+MACHINE=
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+
+# Hmmm, there's got to be a better way. This sets the stack to the
+# top of the simulator memory (2^19 bytes).
+OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh
new file mode 100644
index 0000000..a85e8bd
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armelf_linux.sh
@@ -0,0 +1,19 @@
+ARCH=arm
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+MAXPAGESIZE=0x8000
+TEMPLATE_NAME=armelf
+GENERATE_SHLIB_SCRIPT=yes
+
+DATA_START_SYMBOLS='__data_start = . ;';
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+
+# This needs to be high enough so that we can load ld.so below it,
+# yet low enough to stay away from the mmap area at 0x40000000.
+# Also, it is small enough so that relocs which are pointing
+# at absolute 0 will still be fixed up.
+TEXT_START_ADDR=0x02000000
diff --git a/contrib/binutils/ld/emulparams/armelf_linux26.sh b/contrib/binutils/ld/emulparams/armelf_linux26.sh
new file mode 100644
index 0000000..36d1b0e
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armelf_linux26.sh
@@ -0,0 +1,20 @@
+ARCH=arm
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+MAXPAGESIZE=0x8000
+TEMPLATE_NAME=armelf
+GENERATE_SHLIB_SCRIPT=yes
+
+DATA_START_SYMBOLS='__data_start = . ;';
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+
+# This needs to be high enough so that we can load ld.so below it,
+# yet low enough to stay away from the mmap area at 0x01100000.
+# Also, it is small enough so that relocs which are pointing
+# at absolute 0 will still be fixed up.
+# These values give us about 0.5MB for ld.so, 16.5MB for user
+# programs, and 15MB for mmap which seems a reasonable compromise.
+TEXT_START_ADDR=0x00080000
diff --git a/contrib/binutils/ld/emulparams/armelf_oabi.sh b/contrib/binutils/ld/emulparams/armelf_oabi.sh
new file mode 100644
index 0000000..d568328
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armelf_oabi.sh
@@ -0,0 +1,21 @@
+MACHINE=
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm-oabi"
+BIG_OUTPUT_FORMAT="elf32-bigarm-oabi"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm-oabi"
+TEXT_START_ADDR=0x8000
+TEMPLATE_NAME=armelf_oabi
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+
+
+ARCH=arm
+MACHINE=
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+
+# Hmmm, there's got to be a better way. This sets the stack to the
+# top of the simulator memory (2^19 bytes).
+OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
diff --git a/contrib/binutils/ld/emulparams/armnbsd.sh b/contrib/binutils/ld/emulparams/armnbsd.sh
new file mode 100644
index 0000000..fc27791
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armnbsd.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=aout
+TEXT_START_ADDR=0x1020
+OUTPUT_FORMAT="a.out-arm-netbsd"
+TARGET_PAGE_SIZE=0x1000
+ARCH=arm
+EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
+NONPAGED_TEXT_START_ADDR=0x1000
diff --git a/contrib/binutils/ld/emulparams/armpe.sh b/contrib/binutils/ld/emulparams/armpe.sh
new file mode 100644
index 0000000..257c9de
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armpe.sh
@@ -0,0 +1,9 @@
+ARCH=arm
+SCRIPT_NAME=pe
+OUTPUT_FORMAT="pei-arm-little"
+LITTLE_OUTPUT_FORMAT="pei-arm-little"
+BIG_OUTPUT_FORMAT="pei-arm-big"
+TEMPLATE_NAME=pe
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/coff_sparc.sh b/contrib/binutils/ld/emulparams/coff_sparc.sh
new file mode 100644
index 0000000..0cf852a
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/coff_sparc.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=sparccoff
+OUTPUT_FORMAT="coff-sparc"
+# following are dubious (borrowed from sparc lynx)
+TARGET_PAGE_SIZE=0x1000
+TEXT_START_ADDR=0
+NONPAGED_TEXT_START_ADDR=0x1000
+ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh
index 3a1a7f2..74e2326 100644
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh
@@ -3,6 +3,7 @@ OUTPUT_FORMAT="elf32-sparc"
TEXT_START_ADDR=0x10000
MAXPAGESIZE=0x10000
NONPAGED_TEXT_START_ADDR=0x10000
+ALIGNMENT=8
ARCH=sparc
MACHINE=
TEMPLATE_NAME=elf32
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32.sh b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
new file mode 100755
index 0000000..56f42a9
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
@@ -0,0 +1,75 @@
+# This is an ELF platform.
+SCRIPT_NAME=elf
+
+# Handle both big- and little-ended 32-bit MIPS objects.
+ARCH=mips
+OUTPUT_FORMAT="elf32-bigmips"
+BIG_OUTPUT_FORMAT="elf32-bigmips"
+LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+
+TEMPLATE_NAME=elf32
+
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x100000
+ENTRY=__start
+
+# GOT-related settings.
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.lit4) }
+ .srdata : { *(.srdata) }
+'
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+# IRIX6 defines these symbols. 0x34 is the size of the ELF header.
+EXECUTABLE_SYMBOLS="
+ __dso_displacement = 0;
+ __elf_header = ${TEXT_START_ADDR};
+ __program_header_table = ${TEXT_START_ADDR} + 0x34;
+"
+
+# There are often dynamic relocations against the .rodata section.
+# Setting DT_TEXTREL in the .dynamic section does not convince the
+# IRIX6 linker to permit relocations against the text segment.
+# Following the IRIX linker, we simply put .rodata in the data
+# segment.
+WRITABLE_RODATA=
+
+OTHER_RELOCATING_SECTIONS='
+ .MIPS.events.text :
+ {
+ *(.MIPS.events.text)
+ *(.MIPS.events.gnu.linkonce.t*)
+ }
+ .MIPS.content.text :
+ {
+ *(.MIPS.content.text)
+ *(.MIPS.content.gnu.linkonce.t*)
+ }
+ .MIPS.events.data :
+ {
+ *(.MIPS.events.data)
+ *(.MIPS.events.gnu.linkonce.d*)
+ }
+ .MIPS.content.data :
+ {
+ *(.MIPS.content.data)
+ *(.MIPS.content.gnu.linkonce.d*)
+ }
+ .MIPS.events.rodata :
+ {
+ *(.MIPS.events.rodata)
+ *(.MIPS.events.gnu.linkonce.r*)
+ }
+ .MIPS.content.rodata :
+ {
+ *(.MIPS.content.rodata)
+ *(.MIPS.content.gnu.linkonce.r*)
+ }
+'
diff --git a/contrib/binutils/ld/emulparams/elf32ebmip.sh b/contrib/binutils/ld/emulparams/elf32ebmip.sh
index a6b80a9..00ea8fd 100644
--- a/contrib/binutils/ld/emulparams/elf32ebmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32ebmip.sh
@@ -6,7 +6,6 @@ TEXT_START_ADDR=0x0400000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
diff --git a/contrib/binutils/ld/emulparams/elf32elmip.sh b/contrib/binutils/ld/emulparams/elf32elmip.sh
index 313d74a..cf008c8 100644
--- a/contrib/binutils/ld/emulparams/elf32elmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32elmip.sh
@@ -6,7 +6,6 @@ TEXT_START_ADDR=0x0400000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
diff --git a/contrib/binutils/ld/emulparams/elf32lppc.sh b/contrib/binutils/ld/emulparams/elf32lppc.sh
new file mode 100644
index 0000000..edffc61
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32lppc.sh
@@ -0,0 +1,8 @@
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+SCRIPT_NAME=elfppc
+OUTPUT_FORMAT="elf32-powerpcle"
+TEXT_START_ADDR=0x40000
+MAXPAGESIZE=0x40000
+ARCH=powerpc
+MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
new file mode 100644
index 0000000..3e3880c
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32ppc.sh
@@ -0,0 +1,8 @@
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+SCRIPT_NAME=elfppc
+OUTPUT_FORMAT="elf32-powerpc"
+TEXT_START_ADDR=0x01800000
+MAXPAGESIZE=0x10000
+ARCH=powerpc
+MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
new file mode 100644
index 0000000..9996c7b
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
@@ -0,0 +1,8 @@
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+SCRIPT_NAME=elfppc
+OUTPUT_FORMAT="elf32-powerpc"
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x10000
+ARCH=powerpc
+MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
index d0fbdfd..2ab2e4f 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh
@@ -10,3 +10,37 @@ MACHINE=
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
NOP=0x01000000
+
+if [ "x${host}" = "x${target}" ]; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ # Native, and default or emulation requesting LIB_PATH.
+
+ # Linux and Solaris modify the default library search path
+ # to first include a 64-bit specific directory. It's put
+ # in slightly different places on the two systems.
+ case "$target" in
+ sparc*-linux*)
+ suffix=64 ;;
+ sparc*-solaris*)
+ suffix=/sparcv9 ;;
+ esac
+
+ if [ -n "${suffix}" ]; then
+
+ LIB_PATH=/lib${suffix}:/lib
+ LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
+ if [ -n "${NATIVE_LIB_DIRS}" ]; then
+ LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s/:/${suffix}:/g`${suffix}:${NATIVE_LIB_DIRS}
+ fi
+ if [ "${libdir}" != /usr/lib ]; then
+ LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
+ fi
+ if [ "${libdir}" != /usr/local/lib ]; then
+ LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
+ fi
+
+ fi
+ ;;
+ esac
+fi
diff --git a/contrib/binutils/ld/emulparams/elf64bmip.sh b/contrib/binutils/ld/emulparams/elf64bmip.sh
new file mode 100755
index 0000000..a4852d5
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64bmip.sh
@@ -0,0 +1,79 @@
+# This is an ELF platform.
+SCRIPT_NAME=elf
+
+# Handle both big- and little-ended 32-bit MIPS objects.
+ARCH=mips
+OUTPUT_FORMAT="elf64-bigmips"
+BIG_OUTPUT_FORMAT="elf64-bigmips"
+LITTLE_OUTPUT_FORMAT="elf64-littlemips"
+
+# Note that the elf32 template is used for 64-bit emulations as well
+# as 32-bit emulations.
+ELFSIZE=64
+TEMPLATE_NAME=elf32
+
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x100000
+ENTRY=__start
+
+# GOT-related settings.
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.lit4) }
+ .srdata : { *(.srdata) }
+'
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+# IRIX6 defines these symbols. 0x40 is the size of the ELF header.
+EXECUTABLE_SYMBOLS="
+ __dso_displacement = 0;
+ __elf_header = ${TEXT_START_ADDR};
+ __program_header_table = ${TEXT_START_ADDR} + 0x40;
+"
+
+# There are often dynamic relocations against the .rodata section.
+# Setting DT_TEXTREL in the .dynamic section does not convince the
+# IRIX6 linker to permit relocations against the text segment.
+# Following the IRIX linker, we simply put .rodata in the data
+# segment.
+WRITABLE_RODATA=
+
+
+OTHER_RELOCATING_SECTIONS='
+ .MIPS.events.text :
+ {
+ *(.MIPS.events.text)
+ *(.MIPS.events.gnu.linkonce.t*)
+ }
+ .MIPS.content.text :
+ {
+ *(.MIPS.content.text)
+ *(.MIPS.content.gnu.linkonce.t*)
+ }
+ .MIPS.events.data :
+ {
+ *(.MIPS.events.data)
+ *(.MIPS.events.gnu.linkonce.d*)
+ }
+ .MIPS.content.data :
+ {
+ *(.MIPS.content.data)
+ *(.MIPS.content.gnu.linkonce.d*)
+ }
+ .MIPS.events.rodata :
+ {
+ *(.MIPS.events.rodata)
+ *(.MIPS.events.gnu.linkonce.r*)
+ }
+ .MIPS.content.rodata :
+ {
+ *(.MIPS.content.rodata)
+ *(.MIPS.content.gnu.linkonce.r*)
+ }
+'
diff --git a/contrib/binutils/ld/emulparams/i386pe.sh b/contrib/binutils/ld/emulparams/i386pe.sh
index 188a8ad..a8add23 100644
--- a/contrib/binutils/ld/emulparams/i386pe.sh
+++ b/contrib/binutils/ld/emulparams/i386pe.sh
@@ -3,3 +3,6 @@ SCRIPT_NAME=pe
OUTPUT_FORMAT="pei-i386"
RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
TEMPLATE_NAME=pe
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/i386pe_posix.sh b/contrib/binutils/ld/emulparams/i386pe_posix.sh
new file mode 100644
index 0000000..37f51b5
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/i386pe_posix.sh
@@ -0,0 +1,9 @@
+ARCH=i386
+SCRIPT_NAME=pe
+OUTPUT_FORMAT="pei-i386"
+RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
+TEMPLATE_NAME=pe
+ENTRY="___PosixProcessStartup"
+SUBSYSTEM=7
+EXECUTABLE_NAME=a.out
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/ppcmacos.sh b/contrib/binutils/ld/emulparams/ppcmacos.sh
new file mode 100644
index 0000000..b6b800c
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/ppcmacos.sh
@@ -0,0 +1,4 @@
+TEMPLATE_NAME=aix
+SCRIPT_NAME=aix
+OUTPUT_FORMAT="xcoff-powermac"
+ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/ppcnw.sh b/contrib/binutils/ld/emulparams/ppcnw.sh
new file mode 100644
index 0000000..c3ead43
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/ppcnw.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=nw
+OUTPUT_FORMAT="elf32-powerpc"
+TEXT_START_ADDR=0x0400000
+DATA_ADDR=0x10000000
+MAXPAGESIZE=0x40000
+NONPAGED_TEXT_START_ADDR=0x0400000
+ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/ppcpe.sh b/contrib/binutils/ld/emulparams/ppcpe.sh
new file mode 100644
index 0000000..a2d09ef
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/ppcpe.sh
@@ -0,0 +1,7 @@
+ARCH=powerpc
+SCRIPT_NAME=ppcpe
+OUTPUT_FORMAT="pei-powerpcle"
+TEMPLATE_NAME=pe
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/contrib/binutils/ld/emulparams/sparcaout.sh b/contrib/binutils/ld/emulparams/sparcaout.sh
new file mode 100644
index 0000000..429b925
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/sparcaout.sh
@@ -0,0 +1,8 @@
+SCRIPT_NAME=aout
+OUTPUT_FORMAT="a.out-sunos-big"
+BIG_OUTPUT_FORMAT="a.out-sunos-big"
+LITTLE_OUTPUT_FORMAT="a.out-sparc-little"
+TEXT_START_ADDR=0x2020
+TARGET_PAGE_SIZE=0x2000
+NONPAGED_TEXT_START_ADDR=0x2000
+ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/sparclinux.sh b/contrib/binutils/ld/emulparams/sparclinux.sh
new file mode 100644
index 0000000..7ccb0be
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/sparclinux.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=aout
+OUTPUT_FORMAT="a.out-sparc-linux"
+TARGET_PAGE_SIZE=0x1000
+TEXT_START_ADDR=0x1020
+NONPAGED_TEXT_START_ADDR=0
+ARCH=sparc
+TEMPLATE_NAME=linux
diff --git a/contrib/binutils/ld/emulparams/sparcnbsd.sh b/contrib/binutils/ld/emulparams/sparcnbsd.sh
new file mode 100644
index 0000000..f27daf3
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/sparcnbsd.sh
@@ -0,0 +1,5 @@
+SCRIPT_NAME=aout
+TEXT_START_ADDR=0x1020
+OUTPUT_FORMAT="a.out-sparc-netbsd"
+TARGET_PAGE_SIZE=0x1000
+ARCH=sparc
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
new file mode 100644
index 0000000..d73b3d1
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/armcoff.em
@@ -0,0 +1,292 @@
+# This shell script emits a C file. -*- C -*-
+# It does some substitutions.
+cat >e${EMULATION_NAME}.c <<EOF
+/* This file is is generated by a shell script. DO NOT EDIT! */
+
+/* emulate the original gld for the given ${EMULATION_NAME}
+ Copyright (C) 1991, 93, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Written by Steve Chamberlain steve@cygnus.com
+
+This file is part of GLD, the Gnu Linker.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "getopt.h"
+
+#include "ld.h"
+#include "ldmain.h"
+#include "ldemul.h"
+#include "ldfile.h"
+#include "ldmisc.h"
+
+#include "ldexp.h"
+#include "ldlang.h"
+
+static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
+static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
+static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+static int gld${EMULATION_NAME}_parse_args PARAMS((int, char **));
+static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *));
+static void gld${EMULATION_NAME}_finish PARAMS ((void));
+
+/* If true, then interworking stubs which support calls to old, non-interworking
+ aware ARM code should be generated. */
+
+static int support_old_code = 0;
+static char * thumb_entry_symbol = NULL;
+
+#define OPTION_SUPPORT_OLD_CODE 300
+#define OPTION_THUMB_ENTRY 301
+
+static struct option longopts[] =
+{
+ {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
+ {"thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
+ {NULL, no_argument, NULL, 0}
+};
+
+static void
+gld${EMULATION_NAME}_list_options (file)
+ FILE * file;
+{
+ fprintf (file, _(" --support-old-code Support interworking with old code\n"));
+ fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
+}
+
+static int
+gld${EMULATION_NAME}_parse_args (argc, argv)
+ int argc;
+ char ** argv;
+{
+ int longind;
+ int optc;
+ int prevoptind = optind;
+ int prevopterr = opterr;
+ int wanterror;
+ static int lastoptind = -1;
+
+ if (lastoptind != optind)
+ opterr = 0;
+
+ wanterror = opterr;
+ lastoptind = optind;
+
+ optc = getopt_long_only (argc, argv, "-", longopts, & longind);
+ opterr = prevopterr;
+
+ switch (optc)
+ {
+ default:
+ if (wanterror)
+ xexit (1);
+ optind = prevoptind;
+ return 0;
+
+ case OPTION_SUPPORT_OLD_CODE:
+ support_old_code = 1;
+ break;
+
+ case OPTION_THUMB_ENTRY:
+ thumb_entry_symbol = optarg;
+ break;
+ }
+
+ return 1;
+}
+
+static void
+gld${EMULATION_NAME}_before_parse ()
+{
+#ifndef TARGET_ /* I.e., if not generic. */
+ ldfile_set_output_arch ("`echo ${ARCH}`");
+#endif /* not TARGET_ */
+}
+
+/* This is called after the sections have been attached to output
+ sections, but before any sizes or addresses have been set. */
+
+static void
+gld${EMULATION_NAME}_before_allocation ()
+{
+ /* we should be able to set the size of the interworking stub section */
+
+ /* Here we rummage through the found bfds to collect glue information */
+ /* FIXME: should this be based on a command line option? krk@cygnus.com */
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (! bfd_arm_process_before_allocation
+ (is->the_bfd, & link_info, support_old_code))
+ {
+ /* xgettext:c-format */
+ einfo (_("Errors encountered processing file %s"), is->filename);
+ }
+ }
+ }
+
+ /* We have seen it all. Allocate it, and carry on */
+ bfd_arm_allocate_interworking_sections (& link_info);
+}
+
+static void
+gld${EMULATION_NAME}_after_open ()
+{
+ if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
+ {
+ /* The arm backend needs special fields in the output hash structure.
+ These will only be created if the output format is an arm format,
+ hence we do not support linking and changing output formats at the
+ same time. Use a link followed by objcopy to change output formats. */
+ einfo ("%F%X%P: error: cannot change output format whilst linking ARM binaries\n");
+ return;
+ }
+
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (bfd_arm_get_bfd_for_interworking (is->the_bfd, & link_info))
+ break;
+ }
+ }
+}
+
+static void
+gld${EMULATION_NAME}_finish PARAMS((void))
+{
+ struct bfd_link_hash_entry * h;
+
+ if (thumb_entry_symbol == NULL)
+ return;
+
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, false, false, true);
+
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ && h->u.def.section->output_section != NULL)
+ {
+ static char buffer[32];
+ bfd_vma val;
+
+ /* Special procesing is required for a Thumb entry symbol. The
+ bottom bit of its address must be set. */
+ val = (h->u.def.value
+ + bfd_get_section_vma (output_bfd,
+ h->u.def.section->output_section)
+ + h->u.def.section->output_offset);
+
+ val |= 1;
+
+ /* Now convert this value into a string and store it in entry_symbol
+ where the lang_finish() function will pick it up. */
+ buffer[0] = '0';
+ buffer[1] = 'x';
+
+ sprintf_vma (buffer + 2, val);
+
+ if (entry_symbol != NULL && entry_from_cmdline)
+ einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
+ thumb_entry_symbol, entry_symbol);
+ entry_symbol = buffer;
+ }
+ else
+ einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
+}
+
+static char *
+gld${EMULATION_NAME}_get_script (isfile)
+ int *isfile;
+EOF
+
+if test -n "$COMPILE_IN"
+then
+# Scripts compiled in.
+
+# sed commands to quote an ld script as a C string.
+sc="-f stringify.sed"
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 0;
+
+ if (link_info.relocateable == true && config.build_constructors == true)
+ return
+EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
+
+else
+# Scripts read from the filesystem.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 1;
+
+ if (link_info.relocateable == true && config.build_constructors == true)
+ return "ldscripts/${EMULATION_NAME}.xu";
+ else if (link_info.relocateable == true)
+ return "ldscripts/${EMULATION_NAME}.xr";
+ else if (!config.text_read_only)
+ return "ldscripts/${EMULATION_NAME}.xbn";
+ else if (!config.magic_demand_paged)
+ return "ldscripts/${EMULATION_NAME}.xn";
+ else
+ return "ldscripts/${EMULATION_NAME}.x";
+}
+EOF
+
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+{
+ gld${EMULATION_NAME}_before_parse,
+ syslib_default,
+ hll_default,
+ after_parse_default,
+ gld${EMULATION_NAME}_after_open,
+ after_allocation_default,
+ set_output_arch_default,
+ ldemul_default_target,
+ gld${EMULATION_NAME}_before_allocation,
+ gld${EMULATION_NAME}_get_script,
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+ gld${EMULATION_NAME}_finish,
+ NULL, /* create output section statements */
+ NULL, /* open dynamic archive */
+ NULL, /* place orphan */
+ NULL, /* set symbols */
+ gld${EMULATION_NAME}_parse_args,
+ NULL, /* unrecognised file */
+ gld${EMULATION_NAME}_list_options,
+ NULL, /* recognized file */
+ NULL /* find_potential_libraries */
+};
+EOF
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
new file mode 100644
index 0000000..9abf7f1
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -0,0 +1,1293 @@
+# This shell script emits a C file. -*- C -*-
+# It does some substitutions.
+ELFSIZE=32
+cat >e${EMULATION_NAME}.c <<EOF
+/* This file is is generated by a shell script. DO NOT EDIT! */
+
+/* emulate the original gld for the given ${EMULATION_NAME}
+ Copyright (C) 1991, 93, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Written by Steve Chamberlain steve@cygnus.com
+
+This file is part of GLD, the Gnu Linker.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+#include "bfd.h"
+#include "sysdep.h"
+
+#include <ctype.h>
+
+#include "bfdlink.h"
+#include "getopt.h"
+
+#include "ld.h"
+#include "ldmain.h"
+#include "ldemul.h"
+#include "ldfile.h"
+#include "ldmisc.h"
+
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldgram.h"
+
+static boolean gld${EMULATION_NAME}_open_dynamic_archive
+ PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
+static void gld${EMULATION_NAME}_after_open PARAMS ((void));
+static void gld${EMULATION_NAME}_check_needed
+ PARAMS ((lang_input_statement_type *));
+static void gld${EMULATION_NAME}_stat_needed
+ PARAMS ((lang_input_statement_type *));
+static boolean gld${EMULATION_NAME}_search_needed
+ PARAMS ((const char *, const char *, int));
+static boolean gld${EMULATION_NAME}_try_needed PARAMS ((const char *, int));
+static void gld${EMULATION_NAME}_vercheck
+ PARAMS ((lang_input_statement_type *));
+static void gld${EMULATION_NAME}_find_statement_assignment
+ PARAMS ((lang_statement_union_type *));
+static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *));
+static boolean gld${EMULATION_NAME}_place_orphan
+ PARAMS ((lang_input_statement_type *, asection *));
+static void gld${EMULATION_NAME}_place_section
+ PARAMS ((lang_statement_union_type *));
+static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
+static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
+static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+static int gld${EMULATION_NAME}_parse_args PARAMS((int, char **));
+static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *));
+static void gld${EMULATION_NAME}_finish PARAMS ((void));
+
+
+static int no_pipeline_knowledge = 0;
+static char * thumb_entry_symbol = NULL;
+
+#define OPTION_THUMB_ENTRY 301
+
+static struct option longopts[] =
+{
+ { "no-pipeline-knowledge", no_argument, NULL, 'p'},
+ { "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
+ { NULL, no_argument, NULL, 0 }
+};
+
+static void
+gld${EMULATION_NAME}_list_options (file)
+ FILE * file;
+{
+ fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n"));
+ fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
+}
+
+static int
+gld${EMULATION_NAME}_parse_args (argc, argv)
+ int argc;
+ char ** argv;
+{
+ int longind;
+ int optc;
+ int prevoptind = optind;
+ int prevopterr = opterr;
+ int wanterror;
+ static int lastoptind = -1;
+
+ if (lastoptind != optind)
+ opterr = 0;
+
+ wanterror = opterr;
+ lastoptind = optind;
+
+ optc = getopt_long_only (argc, argv, "-p", longopts, & longind);
+ opterr = prevopterr;
+
+ switch (optc)
+ {
+ default:
+ if (wanterror)
+ xexit (1);
+ optind = prevoptind;
+ return 0;
+
+ case 'p':
+ no_pipeline_knowledge = 1;
+ break;
+
+ case OPTION_THUMB_ENTRY:
+ thumb_entry_symbol = optarg;
+ break;
+ }
+
+ return 1;
+}
+
+
+static void
+gld${EMULATION_NAME}_before_parse ()
+{
+#ifndef TARGET_ /* I.e., if not generic. */
+ ldfile_set_output_arch ("`echo ${ARCH}`");
+#endif /* not TARGET_ */
+ config.dynamic_link = ${DYNAMIC_LINK-true};
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
+}
+
+/* Try to open a dynamic archive. This is where we know that ELF
+ dynamic libraries have an extension of .so. */
+
+static boolean
+gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
+ const char *arch;
+ search_dirs_type *search;
+ lang_input_statement_type *entry;
+{
+ const char *filename;
+ char *string;
+
+ if (! entry->is_archive)
+ return false;
+
+ filename = entry->filename;
+
+ string = (char *) xmalloc (strlen (search->name)
+ + strlen (filename)
+ + strlen (arch)
+ + sizeof "/lib.so");
+
+ sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
+
+ if (! ldfile_try_open_bfd (string, entry))
+ {
+ free (string);
+ return false;
+ }
+
+ entry->filename = string;
+
+ /* We have found a dynamic object to include in the link. The ELF
+ backend linker will create a DT_NEEDED entry in the .dynamic
+ section naming this file. If this file includes a DT_SONAME
+ entry, it will be used. Otherwise, the ELF linker will just use
+ the name of the file. For an archive found by searching, like
+ this one, the DT_NEEDED entry should consist of just the name of
+ the file, without the path information used to find it. Note
+ that we only need to do this if we have a dynamic object; an
+ archive will never be referenced by a DT_NEEDED entry.
+
+ FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
+ very pretty. I haven't been able to think of anything that is
+ pretty, though. */
+ if (bfd_check_format (entry->the_bfd, bfd_object)
+ && (entry->the_bfd->flags & DYNAMIC) != 0)
+ {
+ char *needed_name;
+
+ ASSERT (entry->is_archive && entry->search_dirs_flag);
+ needed_name = (char *) xmalloc (strlen (filename)
+ + strlen (arch)
+ + sizeof "lib.so");
+ sprintf (needed_name, "lib%s%s.so", filename, arch);
+ bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name);
+ }
+
+ return true;
+}
+
+EOF
+if [ "x${host}" = "x${target}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
+cat >>e${EMULATION_NAME}.c <<EOF
+
+/* For a native linker, check the file /etc/ld.so.conf for directories
+ in which we may find shared libraries. /etc/ld.so.conf is really
+ only meaningful on Linux, but we check it on other systems anyhow. */
+
+static boolean gld${EMULATION_NAME}_check_ld_so_conf
+ PARAMS ((const char *, int));
+
+static boolean
+gld${EMULATION_NAME}_check_ld_so_conf (name, force)
+ const char *name;
+ int force;
+{
+ static boolean initialized;
+ static char *ld_so_conf;
+
+ if (! initialized)
+ {
+ FILE *f;
+
+ f = fopen ("/etc/ld.so.conf", FOPEN_RT);
+ if (f != NULL)
+ {
+ char *b;
+ size_t len, alloc;
+ int c;
+
+ len = 0;
+ alloc = 100;
+ b = (char *) xmalloc (alloc);
+
+ while ((c = getc (f)) != EOF)
+ {
+ if (len + 1 >= alloc)
+ {
+ alloc *= 2;
+ b = (char *) xrealloc (b, alloc);
+ }
+ if (c != ':'
+ && c != ' '
+ && c != '\t'
+ && c != '\n'
+ && c != ',')
+ {
+ b[len] = c;
+ ++len;
+ }
+ else
+ {
+ if (len > 0 && b[len - 1] != ':')
+ {
+ b[len] = ':';
+ ++len;
+ }
+ }
+ }
+
+ if (len > 0 && b[len - 1] == ':')
+ --len;
+
+ if (len > 0)
+ b[len] = '\0';
+ else
+ {
+ free (b);
+ b = NULL;
+ }
+
+ fclose (f);
+
+ ld_so_conf = b;
+ }
+
+ initialized = true;
+ }
+
+ if (ld_so_conf == NULL)
+ return false;
+
+ return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force);
+}
+
+EOF
+ ;;
+ esac
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
+
+/* These variables are required to pass information back and forth
+ between after_open and check_needed and stat_needed and vercheck. */
+
+static struct bfd_link_needed_list *global_needed;
+static struct stat global_stat;
+static boolean global_found;
+static struct bfd_link_needed_list *global_vercheck_needed;
+static boolean global_vercheck_failed;
+
+static void
+gld${EMULATION_NAME}_after_open ()
+{
+ struct bfd_link_needed_list *needed, *l;
+
+ if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
+ {
+ /* The arm backend needs special fields in the output hash structure.
+ These will only be created if the output format is an arm format,
+ hence we do not support linking and changing output formats at the
+ same time. Use a link followed by objcopy to change output formats. */
+ einfo ("%F%X%P: error: cannot change output format whilst linking ARM binaries\n");
+ return;
+ }
+
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ /* The interworking bfd must be the last one to be processed */
+ if (!is->next)
+ bfd_elf32_arm_get_bfd_for_interworking (is->the_bfd, & link_info);
+ }
+ }
+
+ /* We only need to worry about this when doing a final link. */
+ if (link_info.relocateable || link_info.shared)
+ return;
+
+ /* Get the list of files which appear in DT_NEEDED entries in
+ dynamic objects included in the link (often there will be none).
+ For each such file, we want to track down the corresponding
+ library, and include the symbol table in the link. This is what
+ the runtime dynamic linker will do. Tracking the files down here
+ permits one dynamic object to include another without requiring
+ special action by the person doing the link. Note that the
+ needed list can actually grow while we are stepping through this
+ loop. */
+ needed = bfd_elf_get_needed_list (output_bfd, &link_info);
+ for (l = needed; l != NULL; l = l->next)
+ {
+ struct bfd_link_needed_list *ll;
+ int force;
+
+ /* If we've already seen this file, skip it. */
+ for (ll = needed; ll != l; ll = ll->next)
+ if (strcmp (ll->name, l->name) == 0)
+ break;
+ if (ll != l)
+ continue;
+
+ /* See if this file was included in the link explicitly. */
+ global_needed = l;
+ global_found = false;
+ lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
+ if (global_found)
+ continue;
+
+ /* We need to find this file and include the symbol table. We
+ want to search for the file in the same way that the dynamic
+ linker will search. That means that we want to use
+ rpath_link, rpath, then the environment variable
+ LD_LIBRARY_PATH (native only), then the linker script
+ LIB_SEARCH_DIRS. We do not search using the -L arguments.
+
+ We search twice. The first time, we skip objects which may
+ introduce version mismatches. The second time, we force
+ their use. See gld${EMULATION_NAME}_vercheck comment. */
+ for (force = 0; force < 2; force++)
+ {
+ const char *lib_path;
+ size_t len;
+ search_dirs_type *search;
+
+ if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
+ l->name, force))
+ break;
+ if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
+ l->name, force))
+ break;
+ if (command_line.rpath_link == NULL
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
+ force))
+ break;
+ }
+EOF
+if [ "x${host}" = "x${target}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
+cat >>e${EMULATION_NAME}.c <<EOF
+ lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
+ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
+ break;
+EOF
+ ;;
+ esac
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
+ len = strlen (l->name);
+ for (search = search_head; search != NULL; search = search->next)
+ {
+ char *filename;
+
+ if (search->cmdline)
+ continue;
+ filename = (char *) xmalloc (strlen (search->name) + len + 2);
+ sprintf (filename, "%s/%s", search->name, l->name);
+ if (gld${EMULATION_NAME}_try_needed (filename, force))
+ break;
+ free (filename);
+ }
+ if (search != NULL)
+ break;
+EOF
+if [ "x${host}" = "x${target}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
+cat >>e${EMULATION_NAME}.c <<EOF
+ if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
+ break;
+EOF
+ ;;
+ esac
+fi
+cat >>e${EMULATION_NAME}.c <<EOF
+ }
+
+ if (force < 2)
+ continue;
+
+ einfo ("%P: warning: %s, needed by %B, not found (try using --rpath)\n",
+ l->name, l->by);
+ }
+}
+
+/* Search for a needed file in a path. */
+
+static boolean
+gld${EMULATION_NAME}_search_needed (path, name, force)
+ const char *path;
+ const char *name;
+ int force;
+{
+ const char *s;
+ size_t len;
+
+ if (path == NULL || *path == '\0')
+ return false;
+ len = strlen (name);
+ while (1)
+ {
+ char *filename, *sset;
+
+ s = strchr (path, ':');
+ if (s == NULL)
+ s = path + strlen (path);
+
+ filename = (char *) xmalloc (s - path + len + 2);
+ if (s == path)
+ sset = filename;
+ else
+ {
+ memcpy (filename, path, s - path);
+ filename[s - path] = '/';
+ sset = filename + (s - path) + 1;
+ }
+ strcpy (sset, name);
+
+ if (gld${EMULATION_NAME}_try_needed (filename, force))
+ return true;
+
+ free (filename);
+
+ if (*s == '\0')
+ break;
+ path = s + 1;
+ }
+
+ return false;
+}
+
+/* This function is called for each possible name for a dynamic object
+ named by a DT_NEEDED entry. The FORCE parameter indicates whether
+ to skip the check for a conflicting version. */
+
+static boolean
+gld${EMULATION_NAME}_try_needed (name, force)
+ const char *name;
+ int force;
+{
+ bfd *abfd;
+
+ abfd = bfd_openr (name, bfd_get_target (output_bfd));
+ if (abfd == NULL)
+ return false;
+ if (! bfd_check_format (abfd, bfd_object))
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
+ if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
+
+ /* Check whether this object would include any conflicting library
+ versions. If FORCE is set, then we skip this check; we use this
+ the second time around, if we couldn't find any compatible
+ instance of the shared library. */
+
+ if (! force)
+ {
+ struct bfd_link_needed_list *needed;
+
+ if (! bfd_elf_get_bfd_needed_list (abfd, &needed))
+ einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd);
+
+ if (needed != NULL)
+ {
+ global_vercheck_needed = needed;
+ global_vercheck_failed = false;
+ lang_for_each_input_file (gld${EMULATION_NAME}_vercheck);
+ if (global_vercheck_failed)
+ {
+ (void) bfd_close (abfd);
+ /* Return false to force the caller to move on to try
+ another file on the search path. */
+ return false;
+ }
+
+ /* But wait! It gets much worse. On Linux, if a shared
+ library does not use libc at all, we are supposed to skip
+ it the first time around in case we encounter a shared
+ library later on with the same name which does use the
+ version of libc that we want. This is much too horrible
+ to use on any system other than Linux. */
+
+EOF
+case ${target} in
+ *-*-linux-gnu*)
+ cat >>e${EMULATION_NAME}.c <<EOF
+ {
+ struct bfd_link_needed_list *l;
+
+ for (l = needed; l != NULL; l = l->next)
+ if (strncmp (l->name, "libc.so", 7) == 0)
+ break;
+ if (l == NULL)
+ {
+ (void) bfd_close (abfd);
+ return false;
+ }
+ }
+
+EOF
+ ;;
+esac
+cat >>e${EMULATION_NAME}.c <<EOF
+ }
+ }
+
+ /* We've found a dynamic object matching the DT_NEEDED entry. */
+
+ /* We have already checked that there is no other input file of the
+ same name. We must now check again that we are not including the
+ same file twice. We need to do this because on many systems
+ libc.so is a symlink to, e.g., libc.so.1. The SONAME entry will
+ reference libc.so.1. If we have already included libc.so, we
+ don't want to include libc.so.1 if they are the same file, and we
+ can only check that using stat. */
+
+ if (bfd_stat (abfd, &global_stat) != 0)
+ einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
+ global_found = false;
+ lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
+ if (global_found)
+ {
+ /* Return true to indicate that we found the file, even though
+ we aren't going to do anything with it. */
+ return true;
+ }
+
+ /* Tell the ELF backend that don't want the output file to have a
+ DT_NEEDED entry for this file. */
+ bfd_elf_set_dt_needed_name (abfd, "");
+
+ /* Add this file into the symbol table. */
+ if (! bfd_link_add_symbols (abfd, &link_info))
+ einfo ("%F%B: could not read symbols: %E\n", abfd);
+
+ return true;
+}
+
+/* See if an input file matches a DT_NEEDED entry by name. */
+
+static void
+gld${EMULATION_NAME}_check_needed (s)
+ lang_input_statement_type *s;
+{
+ if (global_found)
+ return;
+
+ if (s->filename != NULL
+ && strcmp (s->filename, global_needed->name) == 0)
+ {
+ global_found = true;
+ return;
+ }
+
+ if (s->the_bfd != NULL)
+ {
+ const char *soname;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname != NULL
+ && strcmp (soname, global_needed->name) == 0)
+ {
+ global_found = true;
+ return;
+ }
+ }
+
+ if (s->search_dirs_flag
+ && s->filename != NULL
+ && strchr (global_needed->name, '/') == NULL)
+ {
+ const char *f;
+
+ f = strrchr (s->filename, '/');
+ if (f != NULL
+ && strcmp (f + 1, global_needed->name) == 0)
+ {
+ global_found = true;
+ return;
+ }
+ }
+}
+
+/* See if an input file matches a DT_NEEDED entry by running stat on
+ the file. */
+
+static void
+gld${EMULATION_NAME}_stat_needed (s)
+ lang_input_statement_type *s;
+{
+ struct stat st;
+ const char *suffix;
+ const char *soname;
+ const char *f;
+
+ if (global_found)
+ return;
+ if (s->the_bfd == NULL)
+ return;
+
+ if (bfd_stat (s->the_bfd, &st) != 0)
+ {
+ einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
+ return;
+ }
+
+ if (st.st_dev == global_stat.st_dev
+ && st.st_ino == global_stat.st_ino)
+ {
+ global_found = true;
+ return;
+ }
+
+ /* We issue a warning if it looks like we are including two
+ different versions of the same shared library. For example,
+ there may be a problem if -lc picks up libc.so.6 but some other
+ shared library has a DT_NEEDED entry of libc.so.5. This is a
+ hueristic test, and it will only work if the name looks like
+ NAME.so.VERSION. FIXME: Depending on file names is error-prone.
+ If we really want to issue warnings about mixing version numbers
+ of shared libraries, we need to find a better way. */
+
+ if (strchr (global_needed->name, '/') != NULL)
+ return;
+ suffix = strstr (global_needed->name, ".so.");
+ if (suffix == NULL)
+ return;
+ suffix += sizeof ".so." - 1;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname == NULL)
+ soname = s->filename;
+
+ f = strrchr (soname, '/');
+ if (f != NULL)
+ ++f;
+ else
+ f = soname;
+
+ if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0)
+ einfo ("%P: warning: %s, needed by %B, may conflict with %s\n",
+ global_needed->name, global_needed->by, f);
+}
+
+/* On Linux, it's possible to have different versions of the same
+ shared library linked against different versions of libc. The
+ dynamic linker somehow tags which libc version to use in
+ /etc/ld.so.cache, and, based on the libc that it sees in the
+ executable, chooses which version of the shared library to use.
+
+ We try to do a similar check here by checking whether this shared
+ library needs any other shared libraries which may conflict with
+ libraries we have already included in the link. If it does, we
+ skip it, and try to find another shared library farther on down the
+ link path.
+
+ This is called via lang_for_each_input_file.
+ GLOBAL_VERCHECK_NEEDED is the list of objects needed by the object
+ which we ar checking. This sets GLOBAL_VERCHECK_FAILED if we find
+ a conflicting version. */
+
+static void
+gld${EMULATION_NAME}_vercheck (s)
+ lang_input_statement_type *s;
+{
+ const char *soname, *f;
+ struct bfd_link_needed_list *l;
+
+ if (global_vercheck_failed)
+ return;
+ if (s->the_bfd == NULL
+ || (bfd_get_file_flags (s->the_bfd) & DYNAMIC) == 0)
+ return;
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname == NULL)
+ soname = bfd_get_filename (s->the_bfd);
+
+ f = strrchr (soname, '/');
+ if (f != NULL)
+ ++f;
+ else
+ f = soname;
+
+ for (l = global_vercheck_needed; l != NULL; l = l->next)
+ {
+ const char *suffix;
+
+ if (strcmp (f, l->name) == 0)
+ {
+ /* Probably can't happen, but it's an easy check. */
+ continue;
+ }
+
+ if (strchr (l->name, '/') != NULL)
+ continue;
+
+ suffix = strstr (l->name, ".so.");
+ if (suffix == NULL)
+ continue;
+
+ suffix += sizeof ".so." - 1;
+
+ if (strncmp (f, l->name, suffix - l->name) == 0)
+ {
+ /* Here we know that S is a dynamic object FOO.SO.VER1, and
+ the object we are considering needs a dynamic object
+ FOO.SO.VER2, and VER1 and VER2 are different. This
+ appears to be a version mismatch, so we tell the caller
+ to try a different version of this library. */
+ global_vercheck_failed = true;
+ return;
+ }
+ }
+}
+
+/* Place an orphan section. We use this to put random SHF_ALLOC
+ sections in the right segment. */
+
+static asection *hold_section;
+static lang_output_section_statement_type *hold_use;
+static lang_output_section_statement_type *hold_text;
+static lang_output_section_statement_type *hold_rodata;
+static lang_output_section_statement_type *hold_data;
+static lang_output_section_statement_type *hold_bss;
+static lang_output_section_statement_type *hold_rel;
+static lang_output_section_statement_type *hold_interp;
+
+/*ARGSUSED*/
+static boolean
+gld${EMULATION_NAME}_place_orphan (file, s)
+ lang_input_statement_type *file;
+ asection *s;
+{
+ lang_output_section_statement_type *place;
+ asection *snew, **pps;
+ lang_statement_list_type *old;
+ lang_statement_list_type add;
+ etree_type *address;
+ const char *secname, *ps;
+ const char *outsecname;
+ lang_output_section_statement_type *os;
+
+ if ((s->flags & SEC_ALLOC) == 0)
+ return false;
+
+ /* Look through the script to see where to place this section. */
+ hold_section = s;
+ hold_use = NULL;
+ lang_for_each_statement (gld${EMULATION_NAME}_place_section);
+
+ if (hold_use != NULL)
+ {
+ /* We have already placed a section with this name. */
+ wild_doit (&hold_use->children, s, hold_use, file);
+ return true;
+ }
+
+ secname = bfd_get_section_name (s->owner, s);
+
+ /* If this is a final link, then always put .gnu.warning.SYMBOL
+ sections into the .text section to get them out of the way. */
+ if (! link_info.shared
+ && ! link_info.relocateable
+ && strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0
+ && hold_text != NULL)
+ {
+ wild_doit (&hold_text->children, s, hold_text, file);
+ return true;
+ }
+
+ /* Decide which segment the section should go in based on the
+ section name and section flags. We put loadable .note sections
+ right after the .interp section, so that the PT_NOTE segment is
+ stored right after the program headers where the OS can read it
+ in the first page. */
+ place = NULL;
+ if (s->flags & SEC_EXCLUDE)
+ return false;
+ else if ((s->flags & SEC_LOAD) != 0
+ && strncmp (secname, ".note", 4) == 0
+ && hold_interp != NULL)
+ place = hold_interp;
+ else if ((s->flags & SEC_HAS_CONTENTS) == 0
+ && hold_bss != NULL)
+ place = hold_bss;
+ else if ((s->flags & SEC_READONLY) == 0
+ && hold_data != NULL)
+ place = hold_data;
+ else if (strncmp (secname, ".rel", 4) == 0
+ && hold_rel != NULL)
+ place = hold_rel;
+ else if ((s->flags & SEC_CODE) == 0
+ && (s->flags & SEC_READONLY) != 0
+ && hold_rodata != NULL)
+ place = hold_rodata;
+ else if ((s->flags & SEC_READONLY) != 0
+ && hold_text != NULL)
+ place = hold_text;
+ if (place == NULL)
+ return false;
+
+ /* Choose a unique name for the section. This will be needed if the
+ same section name appears in the input file with different
+ loadable or allocateable characteristics. */
+ outsecname = secname;
+ if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
+ {
+ unsigned int len;
+ char *newname;
+ unsigned int i;
+
+ len = strlen (outsecname);
+ newname = xmalloc (len + 5);
+ strcpy (newname, outsecname);
+ i = 0;
+ do
+ {
+ sprintf (newname + len, "%d", i);
+ ++i;
+ }
+ while (bfd_get_section_by_name (output_bfd, newname) != NULL);
+
+ outsecname = newname;
+ }
+
+ /* Create the section in the output file, and put it in the right
+ place. This shuffling is to make the output file look neater. */
+ snew = bfd_make_section (output_bfd, outsecname);
+ if (snew == NULL)
+ einfo ("%P%F: output format %s cannot represent section called %s\n",
+ output_bfd->xvec->name, outsecname);
+ if (place->bfd_section != NULL)
+ {
+ for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
+ ;
+ *pps = snew->next;
+ snew->next = place->bfd_section->next;
+ place->bfd_section->next = snew;
+ }
+
+ /* Start building a list of statements for this section. */
+ old = stat_ptr;
+ stat_ptr = &add;
+ lang_list_init (stat_ptr);
+
+ /* If the name of the section is representable in C, then create
+ symbols to mark the start and the end of the section. */
+ for (ps = outsecname; *ps != '\0'; ps++)
+ if (! isalnum ((unsigned char) *ps) && *ps != '_')
+ break;
+ if (*ps == '\0' && config.build_constructors)
+ {
+ char *symname;
+
+ symname = (char *) xmalloc (ps - outsecname + sizeof "__start_");
+ sprintf (symname, "__start_%s", outsecname);
+ lang_add_assignment (exp_assop ('=', symname,
+ exp_unop (ALIGN_K,
+ exp_intop ((bfd_vma) 1
+ << s->alignment_power))));
+ }
+
+ if (! link_info.relocateable)
+ address = NULL;
+ else
+ address = exp_intop ((bfd_vma) 0);
+
+ lang_enter_output_section_statement (outsecname, address, 0,
+ (bfd_vma) 0,
+ (etree_type *) NULL,
+ (etree_type *) NULL,
+ (etree_type *) NULL);
+
+ os = lang_output_section_statement_lookup (outsecname);
+ wild_doit (&os->children, s, os, file);
+
+ lang_leave_output_section_statement
+ ((bfd_vma) 0, "*default*", (struct lang_output_section_phdr_list *) NULL,
+ "*default*");
+ stat_ptr = &add;
+
+ if (*ps == '\0' && config.build_constructors)
+ {
+ char *symname;
+
+ symname = (char *) xmalloc (ps - outsecname + sizeof "__stop_");
+ sprintf (symname, "__stop_%s", outsecname);
+ lang_add_assignment (exp_assop ('=', symname,
+ exp_nameop (NAME, ".")));
+ }
+
+ /* Now stick the new statement list right after PLACE. */
+ *add.tail = place->header.next;
+ place->header.next = add.head;
+
+ stat_ptr = old;
+
+ return true;
+}
+
+static void
+gld${EMULATION_NAME}_place_section (s)
+ lang_statement_union_type *s;
+{
+ lang_output_section_statement_type *os;
+
+ if (s->header.type != lang_output_section_statement_enum)
+ return;
+
+ os = &s->output_section_statement;
+
+ if (strcmp (os->name, hold_section->name) == 0
+ && os->bfd_section != NULL
+ && ((hold_section->flags & (SEC_LOAD | SEC_ALLOC))
+ == (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC))))
+ hold_use = os;
+
+ if (strcmp (os->name, ".text") == 0)
+ hold_text = os;
+ else if (strcmp (os->name, ".rodata") == 0)
+ hold_rodata = os;
+ else if (strcmp (os->name, ".data") == 0)
+ hold_data = os;
+ else if (strcmp (os->name, ".bss") == 0)
+ hold_bss = os;
+ else if (hold_rel == NULL
+ && os->bfd_section != NULL
+ && (os->bfd_section->flags & SEC_ALLOC) != 0
+ && strncmp (os->name, ".rel", 4) == 0)
+ hold_rel = os;
+ else if (strcmp (os->name, ".interp") == 0)
+ hold_interp = os;
+}
+
+/* Look through an expression for an assignment statement. */
+
+static void
+gld${EMULATION_NAME}_find_exp_assignment (exp)
+ etree_type *exp;
+{
+ struct bfd_link_hash_entry *h;
+
+ switch (exp->type.node_class)
+ {
+ case etree_provide:
+ h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst,
+ false, false, false);
+ if (h == NULL)
+ break;
+
+ /* We call record_link_assignment even if the symbol is defined.
+ This is because if it is defined by a dynamic object, we
+ actually want to use the value defined by the linker script,
+ not the value from the dynamic object (because we are setting
+ symbols like etext). If the symbol is defined by a regular
+ object, then, as it happens, calling record_link_assignment
+ will do no harm. */
+
+ /* Fall through. */
+ case etree_assign:
+ if (strcmp (exp->assign.dst, ".") != 0)
+ {
+ if (! (bfd_elf${ELFSIZE}_record_link_assignment
+ (output_bfd, &link_info, exp->assign.dst,
+ exp->type.node_class == etree_provide ? true : false)))
+ einfo ("%P%F: failed to record assignment to %s: %E\n",
+ exp->assign.dst);
+ }
+ gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
+ break;
+
+ case etree_binary:
+ gld${EMULATION_NAME}_find_exp_assignment (exp->binary.lhs);
+ gld${EMULATION_NAME}_find_exp_assignment (exp->binary.rhs);
+ break;
+
+ case etree_trinary:
+ gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.cond);
+ gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.lhs);
+ gld${EMULATION_NAME}_find_exp_assignment (exp->trinary.rhs);
+ break;
+
+ case etree_unary:
+ gld${EMULATION_NAME}_find_exp_assignment (exp->unary.child);
+ break;
+
+ default:
+ break;
+ }
+}
+
+/* This is called by the before_allocation routine via
+ lang_for_each_statement. It locates any assignment statements, and
+ tells the ELF backend about them, in case they are assignments to
+ symbols which are referred to by dynamic objects. */
+
+static void
+gld${EMULATION_NAME}_find_statement_assignment (s)
+ lang_statement_union_type *s;
+{
+ if (s->header.type == lang_assignment_statement_enum)
+ gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp);
+}
+
+/* This is called after the sections have been attached to output
+ sections, but before any sizes or addresses have been set. */
+
+static void
+gld${EMULATION_NAME}_before_allocation ()
+{
+ const char *rpath;
+ asection *sinterp;
+
+ /* If we are going to make any variable assignments, we need to let
+ the ELF backend know about them in case the variables are
+ referred to by dynamic objects. */
+ lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
+
+ /* Let the ELF backend work out the sizes of any sections required
+ by dynamic linking. */
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
+ if (! (bfd_elf${ELFSIZE}_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.export_dynamic, command_line.filter_shlib,
+ (const char * const *) command_line.auxiliary_filters,
+ &link_info, &sinterp, lang_elf_version_info)))
+ einfo ("%P%F: failed to set dynamic section sizes: %E\n");
+
+ /* Let the user override the dynamic linker we are using. */
+ if (command_line.interpreter != NULL
+ && sinterp != NULL)
+ {
+ sinterp->contents = (bfd_byte *) command_line.interpreter;
+ sinterp->_raw_size = strlen (command_line.interpreter) + 1;
+ }
+
+ /* Look for any sections named .gnu.warning. As a GNU extensions,
+ we treat such sections as containing warning messages. We print
+ out the warning message, and then zero out the section size so
+ that it does not get copied into the output file. */
+
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ asection *s;
+ bfd_size_type sz;
+ char *msg;
+ boolean ret;
+
+ if (is->just_syms_flag)
+ continue;
+
+ s = bfd_get_section_by_name (is->the_bfd, ".gnu.warning");
+ if (s == NULL)
+ continue;
+
+ sz = bfd_section_size (is->the_bfd, s);
+ msg = xmalloc ((size_t) sz + 1);
+ if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz))
+ einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
+ is->the_bfd);
+ msg[sz] = '\0';
+ ret = link_info.callbacks->warning (&link_info, msg,
+ (const char *) NULL,
+ is->the_bfd, (asection *) NULL,
+ (bfd_vma) 0);
+ ASSERT (ret);
+ free (msg);
+
+ /* Clobber the section size, so that we don't waste copying the
+ warning into the output file. */
+ s->_raw_size = 0;
+ }
+ }
+
+ /* we should be able to set the size of the interworking stub section */
+
+ /* Here we rummage through the found bfds to collect glue information */
+ /* FIXME: should this be based on a command line option? krk@cygnus.com */
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
+ no_pipeline_knowledge))
+ {
+ /* xgettext:c-format */
+ einfo (_("Errors encountered processing file %s"), is->filename);
+ }
+ }
+ }
+
+ /* We have seen it all. Allocate it, and carry on */
+ bfd_elf32_arm_allocate_interworking_sections (& link_info);
+}
+
+static void
+gld${EMULATION_NAME}_finish PARAMS((void))
+{
+ struct bfd_link_hash_entry * h;
+
+ if (thumb_entry_symbol == NULL)
+ return;
+
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, false, false, true);
+
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ && h->u.def.section->output_section != NULL)
+ {
+ static char buffer[32];
+ bfd_vma val;
+
+ /* Special procesing is required for a Thumb entry symbol. The
+ bottom bit of its address must be set. */
+ val = (h->u.def.value
+ + bfd_get_section_vma (output_bfd,
+ h->u.def.section->output_section)
+ + h->u.def.section->output_offset);
+
+ val |= 1;
+
+ /* Now convert this value into a string and store it in entry_symbol
+ where the lang_finish() function will pick it up. */
+ buffer[0] = '0';
+ buffer[1] = 'x';
+
+ sprintf_vma (buffer + 2, val);
+
+ if (entry_symbol != NULL && entry_from_cmdline)
+ einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
+ thumb_entry_symbol, entry_symbol);
+ entry_symbol = buffer;
+ }
+ else
+ einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
+}
+
+static char *
+gld${EMULATION_NAME}_get_script (isfile)
+ int *isfile;
+EOF
+
+if test -n "$COMPILE_IN"
+then
+# Scripts compiled in.
+
+# sed commands to quote an ld script as a C string.
+sc="-f stringify.sed"
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 0;
+
+ if (link_info.relocateable == true && config.build_constructors == true)
+ return
+EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+if test -n "$GENERATE_SHLIB_SCRIPT" ; then
+ echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
+ sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
+fi
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
+
+else
+# Scripts read from the filesystem.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 1;
+
+ if (link_info.relocateable == true && config.build_constructors == true)
+ return "ldscripts/${EMULATION_NAME}.xu";
+ else if (link_info.relocateable == true)
+ return "ldscripts/${EMULATION_NAME}.xr";
+ else if (!config.text_read_only)
+ return "ldscripts/${EMULATION_NAME}.xbn";
+ else if (!config.magic_demand_paged)
+ return "ldscripts/${EMULATION_NAME}.xn";
+ else if (link_info.shared)
+ return "ldscripts/${EMULATION_NAME}.xs";
+ else
+ return "ldscripts/${EMULATION_NAME}.x";
+}
+EOF
+
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+{
+ gld${EMULATION_NAME}_before_parse,
+ syslib_default,
+ hll_default,
+ after_parse_default,
+ gld${EMULATION_NAME}_after_open,
+ after_allocation_default,
+ set_output_arch_default,
+ ldemul_default_target,
+ gld${EMULATION_NAME}_before_allocation,
+ gld${EMULATION_NAME}_get_script,
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+ gld${EMULATION_NAME}_finish,
+ NULL, /* create output section statements */
+ gld${EMULATION_NAME}_open_dynamic_archive,
+ gld${EMULATION_NAME}_place_orphan,
+ NULL, /* set symbols */
+ gld${EMULATION_NAME}_parse_args,
+ NULL, /* unrecognized file */
+ gld${EMULATION_NAME}_list_options,
+ NULL, /* recognized file */
+ NULL /* find_potential_libraries */
+};
+EOF
diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em
new file mode 100644
index 0000000..d8ca87a
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/armelf_oabi.em
@@ -0,0 +1,177 @@
+# This shell script emits a C file. -*- C -*-
+# It does some substitutions.
+cat >e${EMULATION_NAME}.c <<EOF
+/* This file is is generated by a shell script. DO NOT EDIT! */
+
+/* emulate the original gld for the given ${EMULATION_NAME}
+ Copyright (C) 1991, 93, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Written by Steve Chamberlain steve@cygnus.com
+
+This file is part of GLD, the Gnu Linker.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+#define bfd_elf32_arm_allocate_interworking_sections \
+ bfd_elf32_arm_oabi_allocate_interworking_sections
+#define bfd_elf32_arm_get_bfd_for_interworking \
+ bfd_elf32_arm_oabi_get_bfd_for_interworking
+#define bfd_elf32_arm_process_before_allocation \
+ bfd_elf32_arm_oabi_process_before_allocation
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "getopt.h"
+
+#include "ld.h"
+#include "ldmain.h"
+#include "ldemul.h"
+#include "ldfile.h"
+#include "ldmisc.h"
+
+#include "ldexp.h"
+#include "ldlang.h"
+
+static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
+static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
+static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+
+static void
+gld${EMULATION_NAME}_before_parse ()
+{
+#ifndef TARGET_ /* I.e., if not generic. */
+ ldfile_set_output_arch ("`echo ${ARCH}`");
+#endif /* not TARGET_ */
+}
+
+/* This is called after the sections have been attached to output
+ sections, but before any sizes or addresses have been set. */
+
+static void
+gld${EMULATION_NAME}_before_allocation ()
+{
+ /* we should be able to set the size of the interworking stub section */
+
+ /* Here we rummage through the found bfds to collect glue information */
+ /* FIXME: should this be based on a command line option? krk@cygnus.com */
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0))
+ {
+ /* xgettext:c-format */
+ einfo (_("Errors encountered processing file %s"), is->filename);
+ }
+ }
+ }
+
+ /* We have seen it all. Allocate it, and carry on */
+ bfd_elf32_arm_allocate_interworking_sections (& link_info);
+}
+
+static void
+gld${EMULATION_NAME}_after_open ()
+{
+
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ /* The interworking bfd must be the last one to be processed */
+ if (!is->next)
+ bfd_elf32_arm_get_bfd_for_interworking (is->the_bfd, & link_info);
+ }
+}
+
+static char *
+gld${EMULATION_NAME}_get_script (isfile)
+ int *isfile;
+EOF
+
+if test -n "$COMPILE_IN"
+then
+# Scripts compiled in.
+
+# sed commands to quote an ld script as a C string.
+sc="-f stringify.sed"
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 0;
+
+ if (link_info.relocateable == true && config.build_constructors == true)
+ return
+EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
+
+else
+# Scripts read from the filesystem.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 1;
+
+ if (link_info.relocateable == true && config.build_constructors == true)
+ return "ldscripts/${EMULATION_NAME}.xu";
+ else if (link_info.relocateable == true)
+ return "ldscripts/${EMULATION_NAME}.xr";
+ else if (!config.text_read_only)
+ return "ldscripts/${EMULATION_NAME}.xbn";
+ else if (!config.magic_demand_paged)
+ return "ldscripts/${EMULATION_NAME}.xn";
+ else
+ return "ldscripts/${EMULATION_NAME}.x";
+}
+EOF
+
+fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+{
+ gld${EMULATION_NAME}_before_parse,
+ syslib_default,
+ hll_default,
+ after_parse_default,
+ gld${EMULATION_NAME}_after_open,
+ after_allocation_default,
+ set_output_arch_default,
+ ldemul_default_target,
+ gld${EMULATION_NAME}_before_allocation,
+ gld${EMULATION_NAME}_get_script,
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+ NULL, /* finish */
+ NULL, /* create output section statements */
+ NULL, /* open dynamic archive */
+ NULL, /* place orphan */
+ NULL, /* set symbols */
+ NULL, /* parse args */
+ NULL, /* unrecognized file */
+ NULL, /* list options */
+ NULL, /* recognized file */
+ NULL /* find_potential_libraries */
+};
+EOF
diff --git a/contrib/binutils/ld/emultempl/astring.sed b/contrib/binutils/ld/emultempl/astring.sed
new file mode 100644
index 0000000..08bd8a6
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/astring.sed
@@ -0,0 +1,13 @@
+s/["\\]/\\&/g
+s/$/\\n\\/
+1 s/^/"/
+25s/\\$/"/
+26s/^/"/
+50s/\\$/"/
+51s/^/"/
+75s/\\$/"/
+76s/^/"/
+100s/\\$/"/
+101s/^/"/
+$ s/$/n"/
+$ s/\\n"n"$/\\n"/
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
index c4debe2..2913ecf 100644
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ b/contrib/binutils/ld/emultempl/elf32.em
@@ -7,7 +7,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
- Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -73,10 +74,12 @@ gld${EMULATION_NAME}_before_parse()
{
ldfile_output_architecture = bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`;
config.dynamic_link = ${DYNAMIC_LINK-true};
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
}
/* Try to open a dynamic archive. This is where we know that ELF
- dynamic libraries have an extension of .so. */
+ dynamic libraries have an extension of .so (or .sl on oddball systems
+ like hpux). */
static boolean
gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
@@ -92,13 +95,27 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
filename = entry->filename;
+ /* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION
+ is defined, but it does not seem worth the headache to optimize
+ away those two bytes of space. */
string = (char *) xmalloc (strlen (search->name)
+ strlen (filename)
+ strlen (arch)
+#ifdef EXTRA_SHLIB_EXTENSION
+ + strlen (EXTRA_SHLIB_EXTENSION)
+#endif
+ sizeof "/lib.so");
sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
+#ifdef EXTRA_SHLIB_EXTENSION
+ /* Try the .so extension first. If that fails build a new filename
+ using EXTRA_SHLIB_EXTENSION. */
+ if (! ldfile_try_open_bfd (string, entry))
+ sprintf (string, "%s/lib%s%s%s", search->name,
+ filename, arch, EXTRA_SHLIB_EXTENSION);
+#endif
+
if (! ldfile_try_open_bfd (string, entry))
{
free (string);
@@ -126,10 +143,16 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
char *needed_name;
ASSERT (entry->is_archive && entry->search_dirs_flag);
- needed_name = (char *) xmalloc (strlen (filename)
- + strlen (arch)
- + sizeof "lib.so");
- sprintf (needed_name, "lib%s%s.so", filename, arch);
+
+ /* Rather than duplicating the logic above. Just use the
+ filename we recorded earlier.
+
+ First strip off everything before the last '/'. */
+ filename = strrchr (entry->filename, '/');
+ filename++;
+
+ needed_name = (char *) xmalloc (strlen (filename) + 1);
+ strcpy (needed_name, filename);
bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name);
}
@@ -138,7 +161,8 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
EOF
if [ "x${host}" = "x${target}" ] ; then
- if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
cat >>e${EMULATION_NAME}.c <<EOF
/* For a native linker, check the file /etc/ld.so.conf for directories
@@ -223,7 +247,8 @@ gld${EMULATION_NAME}_check_ld_so_conf (name, force)
}
EOF
- fi
+ ;;
+ esac
fi
cat >>e${EMULATION_NAME}.c <<EOF
@@ -308,13 +333,15 @@ gld${EMULATION_NAME}_after_open ()
}
EOF
if [ "x${host}" = "x${target}" ] ; then
- if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
cat >>e${EMULATION_NAME}.c <<EOF
lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
break;
EOF
- fi
+ ;;
+ esac
fi
cat >>e${EMULATION_NAME}.c <<EOF
len = strlen (l->name);
@@ -334,12 +361,14 @@ cat >>e${EMULATION_NAME}.c <<EOF
break;
EOF
if [ "x${host}" = "x${target}" ] ; then
- if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
+ case " ${EMULATION_LIBPATH} " in
+ *" ${EMULATION_NAME} "*)
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
break;
EOF
- fi
+ ;;
+ esac
fi
cat >>e${EMULATION_NAME}.c <<EOF
}
@@ -761,37 +790,6 @@ gld${EMULATION_NAME}_before_allocation ()
s->_raw_size = 0;
}
}
-
-#if defined (TARGET_IS_elf32bmip) || defined (TARGET_IS_elf32lmip)
- /* For MIPS ELF the .reginfo section requires special handling.
- Each input section is 24 bytes, and the final output section must
- also be 24 bytes. We handle this by clobbering all but the first
- input section size to 0. The .reginfo section is handled
- specially by the backend code anyhow. */
- {
- boolean found = false;
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- asection *s;
-
- if (is->just_syms_flag)
- continue;
-
- s = bfd_get_section_by_name (is->the_bfd, ".reginfo");
- if (s == NULL)
- continue;
-
- if (! found)
- {
- found = true;
- continue;
- }
-
- s->_raw_size = 0;
- s->_cooked_size = 0;
- }
- }
-#endif
}
/* This is called by the before_allocation routine via
@@ -925,7 +923,9 @@ gld${EMULATION_NAME}_place_orphan (file, s)
stored right after the program headers where the OS can read it
in the first page. */
place = NULL;
- if ((s->flags & SEC_LOAD) != 0
+ if (s->flags & SEC_EXCLUDE)
+ return false;
+ else if ((s->flags & SEC_LOAD) != 0
&& strncmp (secname, ".note", 4) == 0
&& hold_interp != NULL)
place = hold_interp;
@@ -1024,7 +1024,8 @@ gld${EMULATION_NAME}_place_orphan (file, s)
wild_doit (&os->children, s, os, file);
lang_leave_output_section_statement
- ((bfd_vma) 0, "*default*", (struct lang_output_section_phdr_list *) NULL);
+ ((bfd_vma) 0, "*default*", (struct lang_output_section_phdr_list *) NULL,
+ "*default*");
stat_ptr = &add;
if (*ps == '\0' && config.build_constructors)
@@ -1090,30 +1091,31 @@ then
# Scripts compiled in.
# sed commands to quote an ld script as a C string.
-sc='s/["\\]/\\&/g
-s/$/\\n\\/
-1s/^/"/
-$s/$/n"/
-'
+sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
{
*isfile = 0;
if (link_info.relocateable == true && config.build_constructors == true)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xu`;
- else if (link_info.relocateable == true)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xr`;
- else if (!config.text_read_only)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xbn`;
- else if (!config.magic_demand_paged)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xn`;
- else if (link_info.shared)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xs`;
- else
- return `sed "$sc" ldscripts/${EMULATION_NAME}.x`;
-}
+ return
EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+
+if test -n "$GENERATE_SHLIB_SCRIPT" ; then
+echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
+fi
+
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
else
# Scripts read from the filesystem.
@@ -1139,6 +1141,22 @@ EOF
fi
+if test -n "$PARSE_AND_LIST_ARGS" ; then
+cat >>e${EMULATION_NAME}.c <<EOF
+static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **));
+static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE * file));
+
+ $PARSE_AND_LIST_ARGS
+EOF
+else
+
+cat >>e${EMULATION_NAME}.c <<EOF
+#define gld_${EMULATION_NAME}_parse_args NULL
+#define gld_${EMULATION_NAME}_list_options NULL
+EOF
+
+fi
+
cat >>e${EMULATION_NAME}.c <<EOF
struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
@@ -1155,9 +1173,15 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL,
- NULL,
+ NULL, /* finish */
+ NULL, /* create output section statements */
gld${EMULATION_NAME}_open_dynamic_archive,
- gld${EMULATION_NAME}_place_orphan
+ gld${EMULATION_NAME}_place_orphan,
+ NULL, /* set_symbols */
+ gld_${EMULATION_NAME}_parse_args,
+ NULL, /* unrecognized_file */
+ gld_${EMULATION_NAME}_list_options,
+ NULL, /* recognized_file */
+ NULL /* find_potential_libraries */
};
EOF
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
index 1c0c8eb..6635e09 100644
--- a/contrib/binutils/ld/emultempl/generic.em
+++ b/contrib/binutils/ld/emultempl/generic.em
@@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 1999 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -56,7 +56,7 @@ then
# Scripts compiled in.
# sed commands to quote an ld script as a C string.
-sc="-f ${srcdir}/emultempl/stringify.sed"
+sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
{
@@ -113,6 +113,16 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
before_allocation_default,
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
- "${OUTPUT_FORMAT}"
+ "${OUTPUT_FORMAT}",
+ NULL, /* finish */
+ NULL, /* create output section statements */
+ NULL, /* open dynamic archive */
+ NULL, /* place orphan */
+ NULL, /* set symbols */
+ NULL, /* parse args */
+ NULL, /* unrecognized file */
+ NULL, /* list options */
+ NULL, /* recognized file */
+ NULL /* find_potential_libraries */
};
EOF
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
index 6860c3f..dfa855e 100644
--- a/contrib/binutils/ld/emultempl/linux.em
+++ b/contrib/binutils/ld/emultempl/linux.em
@@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* Linux a.out emulation code for ${EMULATION_NAME}
- Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
Linux support by Eric Youngdale <ericy@cais.cais.com>
@@ -53,6 +53,7 @@ gld${EMULATION_NAME}_before_parse()
{
ldfile_output_architecture = bfd_arch_${ARCH};
config.dynamic_link = true;
+ config.has_shared = true;
}
/* Try to open a dynamic archive. This is where we know that Linux
@@ -139,28 +140,25 @@ then
# Scripts compiled in.
# sed commands to quote an ld script as a C string.
-sc='s/["\\]/\\&/g
-s/$/\\n\\/
-1s/^/"/
-$s/$/n"/
-'
+sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
{
*isfile = 0;
if (link_info.relocateable == true && config.build_constructors == true)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xu`;
- else if (link_info.relocateable == true)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xr`;
- else if (!config.text_read_only)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xbn`;
- else if (!config.magic_demand_paged)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xn`;
- else
- return `sed "$sc" ldscripts/${EMULATION_NAME}.x`;
-}
+ return
EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
else
# Scripts read from the filesystem.
@@ -200,8 +198,15 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL,
+ NULL, /* finish */
gld${EMULATION_NAME}_create_output_section_statements,
- gld${EMULATION_NAME}_open_dynamic_archive
+ gld${EMULATION_NAME}_open_dynamic_archive,
+ NULL, /* place orphan */
+ NULL, /* set symbols */
+ NULL, /* parse args */
+ NULL, /* unrecognized file */
+ NULL, /* list options */
+ NULL, /* recognized file */
+ NULL /* find_potential_libraries */
};
EOF
diff --git a/contrib/binutils/ld/emultempl/ostring.sed b/contrib/binutils/ld/emultempl/ostring.sed
new file mode 100644
index 0000000..a526d3f
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/ostring.sed
@@ -0,0 +1,4 @@
+s/["\\]/\\&/g
+s/$/\\n\\/
+1 s/^/"/
+$ s/$/n"/
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index fcabcbd..d13bb40 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -1,8 +1,10 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
-cat >e${EMULATION_NAME}.c <<EOF
+rm -f e${EMULATION_NAME}.c
+(echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
+cat >>e${EMULATION_NAME}.c <<EOF
/* This file is part of GLD, the Gnu Linker.
- Copyright 1995, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,38 +43,101 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldctor.h"
#include "ldfile.h"
#include "coff/internal.h"
+
+/* FIXME: This is a BFD internal header file, and we should not be
+ using it here. */
#include "../bfd/libcoff.h"
+#include "deffile.h"
+#include "pe-dll.h"
+
#define TARGET_IS_${EMULATION_NAME}
+/* Permit the emulation parameters to override the default section
+ alignment by setting OVERRIDE_SECTION_ALIGNMENT. FIXME: This makes
+ it seem that include/coff/internal.h should not define
+ PE_DEF_SECTION_ALIGNMENT. */
+#if PE_DEF_SECTION_ALIGNMENT != ${OVERRIDE_SECTION_ALIGNMENT:-PE_DEF_SECTION_ALIGNMENT}
+#undef PE_DEF_SECTION_ALIGNMENT
+#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
+#endif
+
+#if defined(TARGET_IS_i386pe)
+#define DLL_SUPPORT
+#endif
+#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe) || defined(TARGET_IS_armpe)
+#define DLL_SUPPORT
+#endif
+
+#if defined(TARGET_IS_i386pe) || ! defined(DLL_SUPPORT)
+#define PE_DEF_SUBSYSTEM 3
+#else
+#undef NT_EXE_IMAGE_BASE
+#undef PE_DEF_SECTION_ALIGNMENT
+#undef PE_DEF_FILE_ALIGNMENT
+#define NT_EXE_IMAGE_BASE 0x00010000
+#ifdef TARGET_IS_armpe
+#define PE_DEF_SECTION_ALIGNMENT 0x00001000
+#define PE_DEF_SUBSYSTEM 9
+#else
+#define PE_DEF_SECTION_ALIGNMENT 0x00000400
+#define PE_DEF_SUBSYSTEM 2
+#endif
+#define PE_DEF_FILE_ALIGNMENT 0x00000200
+#endif
+
+#ifdef TARGET_IS_arm_epoc_pe
+#define bfd_arm_pe_allocate_interworking_sections \
+ bfd_arm_epoc_pe_allocate_interworking_sections
+#define bfd_arm_pe_get_bfd_for_interworking \
+ bfd_arm_epoc_pe_get_bfd_for_interworking
+#define bfd_arm_pe_process_before_allocation \
+ bfd_arm_epoc_pe_process_before_allocation
+#endif
+
static void gld_${EMULATION_NAME}_set_symbols PARAMS ((void));
static void gld_${EMULATION_NAME}_after_open PARAMS ((void));
static void gld_${EMULATION_NAME}_before_parse PARAMS ((void));
+static void gld_${EMULATION_NAME}_after_parse PARAMS ((void));
static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void));
-static boolean gld${EMULATION_NAME}_place_orphan
+static boolean gld_${EMULATION_NAME}_place_orphan
PARAMS ((lang_input_statement_type *, asection *));
+static void gld${EMULATION_NAME}_place_section
+ PARAMS ((lang_statement_union_type *));
static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **));
-
-#if 0 /* argument to qsort so don't prototype */
-static int sort_by_file_name PARAMS ((void *, void *));
-static int sort_by_section_name PARAMS ((void *, void *));
-#endif
-static lang_statement_union_type **sort_sections_1
- PARAMS ((lang_statement_union_type **, lang_statement_union_type *, int,
- int (*)()));
-static void sort_sections PARAMS ((lang_statement_union_type *));
+static void gld_${EMULATION_NAME}_finish PARAMS ((void));
static struct internal_extra_pe_aouthdr pe;
static int dll;
+static int support_old_code = 0;
+static char * thumb_entry_symbol = NULL;
+static lang_assignment_statement_type *image_base_statement = 0;
+
+static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
+#ifdef DLL_SUPPORT
+static char *pe_out_def_filename = 0;
+static char *pe_implib_filename = 0;
+#endif
extern const char *output_filename;
static void
gld_${EMULATION_NAME}_before_parse()
{
- output_filename = "a.exe";
+ output_filename = "${EXECUTABLE_NAME:-a.exe}";
ldfile_output_architecture = bfd_arch_${ARCH};
+#ifdef DLL_SUPPORT
+ config.has_shared = 1;
+
+#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
+#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
+ lang_add_entry ("WinMainCRTStartup", 1);
+#else
+ lang_add_entry ("_WinMainCRTStartup", 1);
+#endif
+#endif
+#endif
}
/* PE format extra command line options. */
@@ -92,31 +157,62 @@ gld_${EMULATION_NAME}_before_parse()
#define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
#define OPTION_SUBSYSTEM (OPTION_STACK + 1)
#define OPTION_HEAP (OPTION_SUBSYSTEM + 1)
-
-static struct option longopts[] = {
+#define OPTION_SUPPORT_OLD_CODE (OPTION_HEAP + 1)
+#define OPTION_OUT_DEF (OPTION_SUPPORT_OLD_CODE + 1)
+#define OPTION_EXPORT_ALL (OPTION_OUT_DEF + 1)
+#define OPTION_EXCLUDE_SYMBOLS (OPTION_EXPORT_ALL + 1)
+#define OPTION_KILL_ATS (OPTION_EXCLUDE_SYMBOLS + 1)
+#define OPTION_STDCALL_ALIASES (OPTION_KILL_ATS + 1)
+#define OPTION_ENABLE_STDCALL_FIXUP (OPTION_STDCALL_ALIASES + 1)
+#define OPTION_DISABLE_STDCALL_FIXUP (OPTION_ENABLE_STDCALL_FIXUP + 1)
+#define OPTION_IMPLIB_FILENAME (OPTION_DISABLE_STDCALL_FIXUP + 1)
+#define OPTION_THUMB_ENTRY (OPTION_IMPLIB_FILENAME + 1)
+#define OPTION_WARN_DUPLICATE_EXPORTS (OPTION_THUMB_ENTRY + 1)
+#define OPTION_IMP_COMPAT (OPTION_WARN_DUPLICATE_EXPORTS + 1)
+
+static struct option longopts[] =
+{
/* PE options */
- {"base-file", required_argument, NULL, OPTION_BASE_FILE},
- {"dll", no_argument, NULL, OPTION_DLL},
- {"file-alignment", required_argument, NULL, OPTION_FILE_ALIGNMENT},
- {"heap", required_argument, NULL, OPTION_HEAP},
- {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
- {"major-image-version", required_argument, NULL, OPTION_MAJOR_IMAGE_VERSION},
- {"major-os-version", required_argument, NULL, OPTION_MAJOR_OS_VERSION},
- {"major-subsystem-version", required_argument, NULL, OPTION_MAJOR_SUBSYSTEM_VERSION},
- {"minor-image-version", required_argument, NULL, OPTION_MINOR_IMAGE_VERSION},
- {"minor-os-version", required_argument, NULL, OPTION_MINOR_OS_VERSION},
- {"minor-subsystem-version", required_argument, NULL, OPTION_MINOR_SUBSYSTEM_VERSION},
- {"section-alignment", required_argument, NULL, OPTION_SECTION_ALIGNMENT},
- {"stack", required_argument, NULL, OPTION_STACK},
- {"subsystem", required_argument, NULL, OPTION_SUBSYSTEM},
- {NULL, no_argument, NULL, 0}
- };
+ {"base-file", required_argument, NULL, OPTION_BASE_FILE},
+ {"dll", no_argument, NULL, OPTION_DLL},
+ {"file-alignment", required_argument, NULL, OPTION_FILE_ALIGNMENT},
+ {"heap", required_argument, NULL, OPTION_HEAP},
+ {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
+ {"major-image-version", required_argument, NULL, OPTION_MAJOR_IMAGE_VERSION},
+ {"major-os-version", required_argument, NULL, OPTION_MAJOR_OS_VERSION},
+ {"major-subsystem-version", required_argument, NULL, OPTION_MAJOR_SUBSYSTEM_VERSION},
+ {"minor-image-version", required_argument, NULL, OPTION_MINOR_IMAGE_VERSION},
+ {"minor-os-version", required_argument, NULL, OPTION_MINOR_OS_VERSION},
+ {"minor-subsystem-version", required_argument, NULL, OPTION_MINOR_SUBSYSTEM_VERSION},
+ {"section-alignment", required_argument, NULL, OPTION_SECTION_ALIGNMENT},
+ {"stack", required_argument, NULL, OPTION_STACK},
+ {"subsystem", required_argument, NULL, OPTION_SUBSYSTEM},
+ {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
+ {"thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
+#ifdef DLL_SUPPORT
+ /* getopt allows abbreviations, so we do this to stop it from treating -o
+ as an abbreviation for this option */
+ {"output-def", required_argument, NULL, OPTION_OUT_DEF},
+ {"output-def", required_argument, NULL, OPTION_OUT_DEF},
+ {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL},
+ {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS},
+ {"kill-at", no_argument, NULL, OPTION_KILL_ATS},
+ {"add-stdcall-alias", no_argument, NULL, OPTION_STDCALL_ALIASES},
+ {"enable-stdcall-fixup", no_argument, NULL, OPTION_ENABLE_STDCALL_FIXUP},
+ {"disable-stdcall-fixup", no_argument, NULL, OPTION_DISABLE_STDCALL_FIXUP},
+ {"out-implib", required_argument, NULL, OPTION_IMPLIB_FILENAME},
+ {"warn-duplicate-exports", no_argument, NULL, OPTION_WARN_DUPLICATE_EXPORTS},
+ {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
+#endif
+ {NULL, no_argument, NULL, 0}
+};
/* PE/WIN32; added routines to get the subsystem type, heap and/or stack
parameters which may be input from the command line */
-typedef struct {
+typedef struct
+{
void *ptr;
int size;
int value;
@@ -132,16 +228,20 @@ static definfo init[] =
#define IMAGEBASEOFF 0
D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
#define DLLOFF 1
- {&dll, sizeof(dll), 0, "__dll__"},
+ {&dll, sizeof(dll), 0, "__dll__", 0},
D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
D(MajorOperatingSystemVersion,"__major_os_version__", 4),
D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
D(MajorImageVersion,"__major_image_version__", 1),
D(MinorImageVersion,"__minor_image_version__", 0),
+#ifdef TARGET_IS_armpe
+ D(MajorSubsystemVersion,"__major_subsystem_version__", 2),
+#else
D(MajorSubsystemVersion,"__major_subsystem_version__", 4),
+#endif
D(MinorSubsystemVersion,"__minor_subsystem_version__", 0),
- D(Subsystem,"__subsystem__", 3),
+ D(Subsystem,"__subsystem__", ${SUBSYSTEM}),
D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x2000000),
D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000),
D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000),
@@ -150,6 +250,40 @@ static definfo init[] =
{ NULL, 0, 0, NULL, 0 }
};
+static void
+gld_${EMULATION_NAME}_list_options (file)
+ FILE * file;
+{
+ fprintf (file, _(" --base_file <basefile> Generate a base file for relocatable DLLs\n"));
+ fprintf (file, _(" --dll Set image base to the default for DLLs\n"));
+ fprintf (file, _(" --file-alignment <size> Set file alignment\n"));
+ fprintf (file, _(" --heap <size> Set initial size of the heap\n"));
+ fprintf (file, _(" --image-base <address> Set start address of the executable\n"));
+ fprintf (file, _(" --major-image-version <number> Set version number of the executable\n"));
+ fprintf (file, _(" --major-os-version <number> Set minimum required OS version\n"));
+ fprintf (file, _(" --major-subsystem-version <number> Set minimum required OS subsystem version\n"));
+ fprintf (file, _(" --minor-image-version <number> Set revision number of the executable\n"));
+ fprintf (file, _(" --minor-os-version <number> Set minimum required OS revision\n"));
+ fprintf (file, _(" --minor-subsystem-version <number> Set minimum required OS subsystem revision\n"));
+ fprintf (file, _(" --section-alignment <size> Set section alignment\n"));
+ fprintf (file, _(" --stack <size> Set size of the initial stack\n"));
+ fprintf (file, _(" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"));
+ fprintf (file, _(" --support-old-code Support interworking with old code\n"));
+ fprintf (file, _(" --thumb-entry=<symbol> Set the entry point to be Thumb <symbol>\n"));
+#ifdef DLL_SUPPORT
+ fprintf (file, _(" --add-stdcall-alias Export symbols with and without @nn\n"));
+ fprintf (file, _(" --disable-stdcall-fixup Don't link _sym to _sym@nn\n"));
+ fprintf (file, _(" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"));
+ fprintf (file, _(" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"));
+ fprintf (file, _(" --export-all-symbols Automatically export all globals to DLL\n"));
+ fprintf (file, _(" --kill-at Remove @nn from exported symbols\n"));
+ fprintf (file, _(" --out-implib <file> Generate import library\n"));
+ fprintf (file, _(" --output-def <file> Generate a .DEF file for the built DLL\n"));
+ fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n"));
+ fprintf (file, _(" --compat-implib Create backward compatible import libs;\n"));
+ fprintf (file, _(" create __imp_<SYMBOL> as well.\n"));
+#endif
+}
static void
set_pe_name (name, val)
@@ -185,14 +319,19 @@ set_pe_subsystem ()
}
v[] =
{
- { "native", 1, "_NtProcessStartup" },
- { "windows", 2, "_WinMainCRTStartup" },
- { "console", 3, "_mainCRTStartup" },
+ { "native", 1, "NtProcessStartup" },
+#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
+ { "windows", 2, "WinMainCRTStartup" },
+#else
+ { "windows", 2, "WinMainCRTStartup" },
+#endif
+ { "console", 3, "mainCRTStartup" },
#if 0
/* The Microsoft linker does not recognize this. */
{ "os2", 5, "" },
#endif
- { "posix", 7, "___PosixProcessStartup"},
+ { "posix", 7, "__PosixProcessStartup"},
+ { "wince", 9, "_WinMainCRTStartup" },
{ 0, 0, 0 }
};
@@ -210,7 +349,7 @@ set_pe_subsystem ()
set_pe_name ("__minor_subsystem_version__",
strtoul (end + 1, &end, 0));
if (*end != '\0')
- einfo ("%P: warning: bad version number in -subsystem option\n");
+ einfo (_("%P: warning: bad version number in -subsystem option\n"));
}
for (i = 0; v[i].name; i++)
@@ -218,31 +357,35 @@ set_pe_subsystem ()
if (strncmp (optarg, v[i].name, len) == 0
&& v[i].name[len] == '\0')
{
+ const char *initial_symbol_char;
+ const char *entry;
+
set_pe_name ("__subsystem__", v[i].value);
- /* If the subsystem is windows, we use a different entry
- point. We also register the entry point as an undefined
- symbol. The reason we do this is so that the user
- doesn't have to because they would have to use the -u
- switch if they were specifying an entry point other than
- _mainCRTStartup. Specifically, if creating a windows
- application, entry point _WinMainCRTStartup must be
- specified. What I have found for non console
- applications (entry not _mainCRTStartup) is that the .obj
- that contains mainCRTStartup is brought in since it is
- the first encountered in libc.lib and it has other
- symbols in it which will be pulled in by the link
- process. To avoid this, adding -u with the entry point
- name specified forces the correct .obj to be used. We
- can avoid making the user do this by always adding the
- entry point name as an undefined symbol. */
- lang_add_entry (v[i].entry, 1);
- ldlang_add_undef (v[i].entry);
+ initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
+ if (*initial_symbol_char == '\0')
+ entry = v[i].entry;
+ else
+ {
+ char *alc_entry;
+
+ /* lang_add_entry expects its argument to be permanently
+ allocated, so we don't free this string. */
+ alc_entry = xmalloc (strlen (initial_symbol_char)
+ + strlen (v[i].entry)
+ + 1);
+ strcpy (alc_entry, initial_symbol_char);
+ strcat (alc_entry, v[i].entry);
+ entry = alc_entry;
+ }
+
+ lang_add_entry (entry, 1);
return;
}
}
- einfo ("%P%F: invalid subsystem type %s\n", optarg);
+
+ einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
}
@@ -253,11 +396,11 @@ set_pe_value (name)
{
char *end;
+
set_pe_name (name, strtoul (optarg, &end, 0));
+
if (end == optarg)
- {
- einfo ("%P%F: invalid hex number for PE parameter '%s'\n", optarg);
- }
+ einfo (_("%P%F: invalid hex number for PE parameter '%s'\n"), optarg);
optarg = end;
}
@@ -268,15 +411,14 @@ set_pe_stack_heap (resname, comname)
char *comname;
{
set_pe_value (resname);
+
if (*optarg == ',')
{
optarg++;
set_pe_value (comname);
}
else if (*optarg)
- {
- einfo ("%P%F: strange hex info for PE parameter '%s'\n", optarg);
- }
+ einfo (_("%P%F: strange hex info for PE parameter '%s'\n"), optarg);
}
@@ -314,7 +456,8 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
link_info.base_file = (PTR) fopen (optarg, FOPEN_WB);
if (link_info.base_file == NULL)
{
- fprintf (stderr, "%s: Can't open base file %s\n",
+ /* xgettext:c-format */
+ fprintf (stderr, _("%s: Can't open base file %s\n"),
program_name, optarg);
xexit (1);
}
@@ -360,6 +503,44 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
case OPTION_IMAGE_BASE:
set_pe_value ("__image_base__");
break;
+ case OPTION_SUPPORT_OLD_CODE:
+ support_old_code = 1;
+ break;
+ case OPTION_THUMB_ENTRY:
+ thumb_entry_symbol = optarg;
+ break;
+#ifdef DLL_SUPPORT
+ case OPTION_OUT_DEF:
+ pe_out_def_filename = xstrdup (optarg);
+ break;
+ case OPTION_EXPORT_ALL:
+ pe_dll_export_everything = 1;
+ break;
+ case OPTION_EXCLUDE_SYMBOLS:
+ pe_dll_add_excludes (optarg);
+ break;
+ case OPTION_KILL_ATS:
+ pe_dll_kill_ats = 1;
+ break;
+ case OPTION_STDCALL_ALIASES:
+ pe_dll_stdcall_aliases = 1;
+ break;
+ case OPTION_ENABLE_STDCALL_FIXUP:
+ pe_enable_stdcall_fixup = 1;
+ break;
+ case OPTION_DISABLE_STDCALL_FIXUP:
+ pe_enable_stdcall_fixup = 0;
+ break;
+ case OPTION_IMPLIB_FILENAME:
+ pe_implib_filename = xstrdup (optarg);
+ break;
+ case OPTION_WARN_DUPLICATE_EXPORTS:
+ pe_dll_warn_dup_exports = 1;
+ break;
+ case OPTION_IMP_COMPAT:
+ pe_dll_compat_implib = 1;
+ break;
+#endif
}
return 1;
}
@@ -368,7 +549,7 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
read. */
static void
-gld_${EMULATION_NAME}_set_symbols()
+gld_${EMULATION_NAME}_set_symbols ()
{
/* Run through and invent symbols for all the
names and insert the defaults. */
@@ -379,7 +560,7 @@ gld_${EMULATION_NAME}_set_symbols()
{
if (link_info.relocateable)
init[IMAGEBASEOFF].value = 0;
- else if (init[DLLOFF].value)
+ else if (init[DLLOFF].value || link_info.shared)
init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
else
init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
@@ -397,7 +578,8 @@ gld_${EMULATION_NAME}_set_symbols()
for (j = 0; init[j].ptr; j++)
{
long val = init[j].value;
- lang_add_assignment (exp_assop ('=' ,init[j].symbol, exp_intop (val)));
+ lang_assignment_statement_type *rv;
+ rv = lang_add_assignment (exp_assop ('=' ,init[j].symbol, exp_intop (val)));
if (init[j].size == sizeof(short))
*(short *)init[j].ptr = val;
else if (init[j].size == sizeof(int))
@@ -408,6 +590,8 @@ gld_${EMULATION_NAME}_set_symbols()
else if (init[j].size == sizeof(bfd_vma))
*(bfd_vma *)init[j].ptr = val;
else abort();
+ if (j == IMAGEBASEOFF)
+ image_base_statement = rv;
}
/* Restore the pointer. */
stat_ptr = save;
@@ -415,209 +599,253 @@ gld_${EMULATION_NAME}_set_symbols()
if (pe.FileAlignment >
pe.SectionAlignment)
{
- einfo ("%P: warning, file alignment > section alignment.\n");
- }
-}
-
-static void
-gld_${EMULATION_NAME}_after_open()
-{
- /* Pass the wacky PE command line options into the output bfd.
- FIXME: This should be done via a function, rather than by
- including an internal BFD header. */
- if (!coff_data(output_bfd)->pe)
- {
- einfo ("%F%P: PE operations on non PE file.\n");
+ einfo (_("%P: warning, file alignment > section alignment.\n"));
}
-
- pe_data(output_bfd)->pe_opthdr = pe;
- pe_data(output_bfd)->dll = init[DLLOFF].value;
-
}
-
-/* Callback functions for qsort in sort_sections. */
-
-static int
-sort_by_file_name (a, b)
- void *a;
- void *b;
-{
- lang_statement_union_type **ra = a;
- lang_statement_union_type **rb = b;
- int i;
- i = strcmp ((*ra)->input_section.ifile->the_bfd->my_archive->filename,
- (*rb)->input_section.ifile->the_bfd->my_archive->filename);
- if (i != 0)
- return i;
+/* This is called after the linker script and the command line options
+ have been read. */
- return strcmp ((*ra)->input_section.ifile->filename,
- (*rb)->input_section.ifile->filename);
-}
-
-static int
-sort_by_section_name (a, b)
- void *a;
- void *b;
+static void
+gld_${EMULATION_NAME}_after_parse ()
{
- lang_statement_union_type **ra = a;
- lang_statement_union_type **rb = b;
- return strcmp ((*ra)->input_section.section->name,
- (*rb)->input_section.section->name);
+ /* The Windows libraries are designed for the linker to treat the
+ entry point as an undefined symbol. Otherwise, the .obj that
+ defines mainCRTStartup is brought in because it is the first
+ encountered in libc.lib and it has other symbols in it which will
+ be pulled in by the link process. To avoid this, we act as
+ though the user specified -u with the entry point symbol.
+
+ This function is called after the linker script and command line
+ options have been read, so at this point we know the right entry
+ point. This function is called before the input files are
+ opened, so registering the symbol as undefined will make a
+ difference. */
+
+ if (! link_info.relocateable && entry_symbol != NULL)
+ ldlang_add_undef (entry_symbol);
}
-/* Subroutine of sort_sections to a contiguous subset of a list of sections.
- NEXT_AFTER is the element after the last one to sort.
- The result is a pointer to the last element's "next" pointer. */
+static struct bfd_link_hash_entry *pe_undef_found_sym;
-static lang_statement_union_type **
-sort_sections_1 (startptr, next_after, count, sort_func)
- lang_statement_union_type **startptr,*next_after;
- int count;
- int (*sort_func) ();
+static boolean
+pe_undef_cdecl_match (h, string)
+ struct bfd_link_hash_entry *h;
+ PTR string;
{
- lang_statement_union_type **vec;
- lang_statement_union_type *p;
- int i;
- lang_statement_union_type **ret;
-
- if (count == 0)
- return startptr;
-
- vec = ((lang_statement_union_type **)
- xmalloc (count * sizeof (lang_statement_union_type *)));
-
- for (p = *startptr, i = 0; i < count; i++, p = p->next)
- vec[i] = p;
-
- qsort (vec, count, sizeof (vec[0]), sort_func);
-
- /* Fill in the next pointers again. */
- *startptr = vec[0];
- for (i = 0; i < count - 1; i++)
- vec[i]->header.next = vec[i + 1];
- vec[i]->header.next = next_after;
- ret = &vec[i]->header.next;
- free (vec);
- return ret;
+ int sl = strlen (string);
+ if (h->type == bfd_link_hash_defined
+ && strncmp (h->root.string, string, sl) == 0
+ && h->root.string[sl] == '@')
+ {
+ pe_undef_found_sym = h;
+ return false;
+ }
+ return true;
}
-/* Sort the .idata\$foo input sections of archives into filename order.
- The reason is so dlltool can arrange to have the pe dll import information
- generated correctly - the head of the list goes into dh.o, the tail into
- dt.o, and the guts into ds[nnnn].o. Note that this is only needed for the
- .idata section.
- FIXME: This may no longer be necessary with grouped sections. Instead of
- sorting on dh.o, ds[nnnn].o, dt.o, one could, for example, have dh.o use
- .idata\$4h, have ds[nnnn].o use .idata\$4s[nnnn], and have dt.o use .idata\$4t.
- This would have to be elaborated upon to handle multiple dll's
- [assuming such an eloboration is possible of course].
-
- We also sort sections in '\$' wild statements. These are created by the
- place_orphans routine to implement grouped sections. */
-
+#ifdef DLL_SUPPORT
static void
-sort_sections (s)
- lang_statement_union_type *s;
+pe_fixup_stdcalls ()
{
- for (; s ; s = s->next)
- switch (s->header.type)
+ static int gave_warning_message = 0;
+ struct bfd_link_hash_entry *undef, *sym;
+ char *at;
+ for (undef = link_info.hash->undefs; undef; undef=undef->next)
+ if (undef->type == bfd_link_hash_undefined)
+ {
+ at = strchr (undef->root.string, '@');
+ if (at)
{
- case lang_output_section_statement_enum:
- sort_sections (s->output_section_statement.children.head);
- break;
- case lang_wild_statement_enum:
+ /* The symbol is a stdcall symbol, so let's look for a cdecl
+ symbol with the same name and resolve to that */
+ char *cname = xstrdup (undef->root.string);
+ at = strchr (cname, '@');
+ *at = 0;
+ sym = bfd_link_hash_lookup (link_info.hash, cname, 0, 0, 1);
+ if (sym && sym->type == bfd_link_hash_defined)
{
- lang_statement_union_type **p = &s->wild_statement.children.head;
-
- /* Is this the .idata section? */
- if (s->wild_statement.section_name != NULL
- && strncmp (s->wild_statement.section_name, ".idata", 6) == 0)
+ undef->type = bfd_link_hash_defined;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+ if (pe_enable_stdcall_fixup == -1)
{
- /* Sort the children. We want to sort any objects in
- the same archive. In order to handle the case of
- including a single archive multiple times, we sort
- all the children by archive name and then by object
- name. After sorting them, we re-thread the pointer
- chain. */
-
- while (*p)
+ einfo (_("Warning: resolving %s by linking to %s\n"),
+ undef->root.string, cname);
+ if (! gave_warning_message)
{
- lang_statement_union_type *start = *p;
- if (start->header.type != lang_input_section_enum
- || !start->input_section.ifile->the_bfd->my_archive)
- p = &(start->header.next);
- else
- {
- lang_statement_union_type *end;
- int count;
-
- for (end = start, count = 0;
- end && end->header.type == lang_input_section_enum;
- end = end->next)
- count++;
-
- p = sort_sections_1 (p, end, count, sort_by_file_name);
- }
+ gave_warning_message = 1;
+ einfo(_("Use --enable-stdcall-fixup to disable these warnings\n"));
+ einfo(_("Use --disable-stdcall-fixup to disable these fixups\n"));
}
- break;
}
-
- /* If this is a collection of grouped sections, sort them.
- The linker script must explicitly mention "*(.foo\$)" or
- "*(.foo\$*)". Don't sort them if \$ is not the last
- character (not sure if this is really useful, but it
- allows explicitly mentioning some \$ sections and letting
- the linker handle the rest). */
- if (s->wild_statement.section_name != NULL)
+ }
+ }
+ else
+ {
+ /* The symbol is a cdecl symbol, so we look for stdcall
+ symbols - which means scanning the whole symbol table */
+ pe_undef_found_sym = 0;
+ bfd_link_hash_traverse (link_info.hash, pe_undef_cdecl_match,
+ (PTR) undef->root.string);
+ sym = pe_undef_found_sym;
+ if (sym)
+ {
+ undef->type = bfd_link_hash_defined;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+ if (pe_enable_stdcall_fixup == -1)
{
- char *q = strchr (s->wild_statement.section_name, '\$');
-
- if (q != NULL
- && (q[1] == '\0'
- || (q[1] == '*' && q[2] == '\0')))
+ einfo (_("Warning: resolving %s by linking to %s\n"),
+ undef->root.string, sym->root.string);
+ if (! gave_warning_message)
{
- lang_statement_union_type *end;
- int count;
-
- for (end = *p, count = 0; end; end = end->next)
- {
- if (end->header.type != lang_input_section_enum)
- abort ();
- count++;
- }
- (void) sort_sections_1 (p, end, count, sort_by_section_name);
+ gave_warning_message = 1;
+ einfo(_("Use --enable-stdcall-fixup to disable these warnings\n"));
+ einfo(_("Use --disable-stdcall-fixup to disable these fixups\n"));
}
- break;
}
}
- break;
- default:
- break;
}
+ }
}
+#endif /* DLL_SUPPORT */
+
+static void
+gld_${EMULATION_NAME}_after_open ()
+{
+ /* Pass the wacky PE command line options into the output bfd.
+ FIXME: This should be done via a function, rather than by
+ including an internal BFD header. */
+
+ if (!coff_data (output_bfd)->pe)
+ einfo (_("%F%P: PE operations on non PE file.\n"));
+ pe_data (output_bfd)->pe_opthdr = pe;
+ pe_data (output_bfd)->dll = init[DLLOFF].value;
+
+#ifdef DLL_SUPPORT
+ if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
+ pe_fixup_stdcalls ();
+
+ pe_process_import_defs(output_bfd, &link_info);
+ if (link_info.shared)
+ pe_dll_build_sections (output_bfd, &link_info);
+
+#ifndef TARGET_IS_i386pe
+#ifndef TARGET_IS_armpe
+ else
+ pe_exe_build_sections (output_bfd, &link_info);
+#endif
+#endif
+#endif
+
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+ if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
+ {
+ /* The arm backend needs special fields in the output hash structure.
+ These will only be created if the output format is an arm format,
+ hence we do not support linking and changing output formats at the
+ same time. Use a link followed by objcopy to change output formats. */
+ einfo ("%F%X%P: error: cannot change output format whilst linking ARM binaries\n");
+ return;
+ }
+ {
+ /* Find a BFD that can hold the interworking stubs. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (bfd_arm_pe_get_bfd_for_interworking (is->the_bfd, & link_info))
+ break;
+ }
+ }
+#endif
+
+ {
+ int is_ms_arch = 0;
+ bfd *cur_arch = 0;
+ lang_input_statement_type *is2;
+
+ /* Careful - this is a shell script. Watch those dollar signs! */
+ /* Microsoft import libraries have every member named the same,
+ and not in the right order for us to link them correctly. We
+ must detect these and rename the members so that they'll link
+ correctly. There are three types of objects: the head, the
+ thunks, and the sentinel(s). The head is easy; it's the one
+ with idata2. We assume that the sentinels won't have relocs,
+ and the thunks will. It's easier than checking the symbol
+ table for external references. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ bfd *arch = is->the_bfd->my_archive;
+ if (cur_arch != arch)
+ {
+ cur_arch = arch;
+ is_ms_arch = 1;
+ for (is2 = is;
+ is2 && is2->the_bfd->my_archive == arch;
+ is2 = (lang_input_statement_type *)is2->next)
+ {
+ if (strcmp (is->the_bfd->filename, is2->the_bfd->filename))
+ is_ms_arch = 0;
+ }
+ }
+
+ if (is_ms_arch)
+ {
+ int idata2 = 0, reloc_count=0;
+ asection *sec;
+ char *new_name, seq;
+
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strcmp (sec->name, ".idata\$2") == 0)
+ idata2 = 1;
+ reloc_count += sec->reloc_count;
+ }
+
+ if (idata2) /* .idata2 is the TOC */
+ seq = 'a';
+ else if (reloc_count > 0) /* thunks */
+ seq = 'b';
+ else /* sentinel */
+ seq = 'c';
+
+ new_name = xmalloc (strlen (is->the_bfd->filename) + 3);
+ sprintf (new_name, "%s.%c", is->the_bfd->filename, seq);
+ is->the_bfd->filename = new_name;
+
+ new_name = xmalloc (strlen(is->filename) + 3);
+ sprintf (new_name, "%s.%c", is->filename, seq);
+ is->filename = new_name;
+ }
+ }
+ }
+ }
+}
+
static void
gld_${EMULATION_NAME}_before_allocation()
{
- extern lang_statement_list_type *stat_ptr;
-
#ifdef TARGET_IS_ppcpe
/* Here we rummage through the found bfds to collect toc information */
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (!ppc_process_before_allocation(is->the_bfd, &link_info))
+ if (!ppc_process_before_allocation (is->the_bfd, &link_info))
{
- einfo("Errors encountered processing file %s\n", is->filename);
+ /* xgettext:c-format */
+ einfo (_("Errors encountered processing file %s\n"), is->filename);
}
}
}
/* We have seen it all. Allocate it, and carry on */
ppc_allocate_toc_section (&link_info);
-#else
-#ifdef TARGET_IS_armpe
+#endif /* TARGET_IS_ppcpe */
+
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
/* FIXME: we should be able to set the size of the interworking stub
section.
@@ -627,109 +855,458 @@ gld_${EMULATION_NAME}_before_allocation()
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (!arm_process_before_allocation (is->the_bfd, & link_info))
+ if (! bfd_arm_pe_process_before_allocation
+ (is->the_bfd, & link_info, support_old_code))
{
- einfo ("Errors encountered processing file %s", is->filename);
+ /* xgettext:c-format */
+ einfo (_("Errors encountered processing file %s for interworking"),
+ is->filename);
}
}
}
/* We have seen it all. Allocate it, and carry on */
- arm_allocate_interworking_sections (& link_info);
+ bfd_arm_pe_allocate_interworking_sections (& link_info);
#endif /* TARGET_IS_armpe */
-#endif /* TARGET_IS_ppcpe */
+}
+
+
+/* This is called when an input file isn't recognized as a BFD. We
+ check here for .DEF files and pull them in automatically. */
+#ifdef DLL_SUPPORT
+static int
+saw_option(char *option)
+{
+ int i;
+ for (i=0; init[i].ptr; i++)
+ if (strcmp (init[i].symbol, option) == 0)
+ return init[i].inited;
+ return 0;
+}
+#endif
+
+static boolean
+gld_${EMULATION_NAME}_unrecognized_file(entry)
+ lang_input_statement_type *entry ATTRIBUTE_UNUSED;
+{
+#ifdef DLL_SUPPORT
+ const char *ext = entry->filename + strlen (entry->filename) - 4;
+
+ if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
+ {
+ if (pe_def_file == 0)
+ pe_def_file = def_file_empty ();
+ def_file_parse (entry->filename, pe_def_file);
+ if (pe_def_file)
+ {
+ int i, buflen=0, len;
+ char *buf;
+ for (i=0; i<pe_def_file->num_exports; i++)
+ {
+ len = strlen(pe_def_file->exports[i].internal_name);
+ if (buflen < len+2)
+ buflen = len+2;
+ }
+ buf = (char *) xmalloc (buflen);
+ for (i=0; i<pe_def_file->num_exports; i++)
+ {
+ struct bfd_link_hash_entry *h;
+ sprintf(buf, "_%s", pe_def_file->exports[i].internal_name);
+
+ h = bfd_link_hash_lookup (link_info.hash, buf, true, true, true);
+ if (h == (struct bfd_link_hash_entry *) NULL)
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
+ if (h->type == bfd_link_hash_new)
+ {
+ h->type = bfd_link_hash_undefined;
+ h->u.undef.abfd = NULL;
+ bfd_link_add_undef (link_info.hash, h);
+ }
+ }
+ free (buf);
+
+ /* def_file_print (stdout, pe_def_file); */
+ if (pe_def_file->is_dll == 1)
+ link_info.shared = 1;
+
+ if (pe_def_file->base_address != (bfd_vma)(-1))
+ {
+ pe.ImageBase =
+ pe_data (output_bfd)->pe_opthdr.ImageBase =
+ init[IMAGEBASEOFF].value = pe_def_file->base_address;
+ init[IMAGEBASEOFF].inited = 1;
+ if (image_base_statement)
+ image_base_statement->exp =
+ exp_assop ('=', "__image_base__", exp_intop (pe.ImageBase));
+ }
+
+#if 0
+ /* Not sure if these *should* be set */
+ if (pe_def_file->version_major != -1)
+ {
+ pe.MajorImageVersion = pe_def_file->version_major;
+ pe.MinorImageVersion = pe_def_file->version_minor;
+ }
+#endif
+ if (pe_def_file->stack_reserve != -1
+ && ! saw_option ("__size_of_stack_reserve__"))
+ {
+ pe.SizeOfStackReserve = pe_def_file->stack_reserve;
+ if (pe_def_file->stack_commit != -1)
+ pe.SizeOfStackCommit = pe_def_file->stack_commit;
+ }
+ if (pe_def_file->heap_reserve != -1
+ && ! saw_option ("__size_of_heap_reserve__"))
+ {
+ pe.SizeOfHeapReserve = pe_def_file->heap_reserve;
+ if (pe_def_file->heap_commit != -1)
+ pe.SizeOfHeapCommit = pe_def_file->heap_commit;
+ }
+ return true;
+ }
+ }
+#endif
+ return false;
+
+}
- sort_sections (stat_ptr->head);
+static boolean
+gld_${EMULATION_NAME}_recognized_file(entry)
+ lang_input_statement_type *entry ATTRIBUTE_UNUSED;
+{
+#ifdef DLL_SUPPORT
+#ifdef TARGET_IS_i386pe
+ pe_dll_id_target ("pei-i386");
+#endif
+#ifdef TARGET_IS_shpe
+ pe_dll_id_target ("pei-shl");
+#endif
+#ifdef TARGET_IS_mipspe
+ pe_dll_id_target ("pei-mips");
+#endif
+#ifdef TARGET_IS_armpe
+ pe_dll_id_target ("pei-arm-little");
+#endif
+ if (bfd_get_format (entry->the_bfd) == bfd_object)
+ {
+ const char *ext = entry->filename + strlen (entry->filename) - 4;
+ if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
+ return pe_implied_import_dll (entry->filename);
+ }
+#endif
+ return false;
+}
+
+static void
+gld_${EMULATION_NAME}_finish ()
+{
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+ struct bfd_link_hash_entry * h;
+
+ if (thumb_entry_symbol != NULL)
+ {
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, false, false, true);
+
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ && h->u.def.section->output_section != NULL)
+ {
+ static char buffer[32];
+ bfd_vma val;
+
+ /* Special procesing is required for a Thumb entry symbol. The
+ bottom bit of its address must be set. */
+ val = (h->u.def.value
+ + bfd_get_section_vma (output_bfd,
+ h->u.def.section->output_section)
+ + h->u.def.section->output_offset);
+
+ val |= 1;
+
+ /* Now convert this value into a string and store it in entry_symbol
+ where the lang_finish() function will pick it up. */
+ buffer[0] = '0';
+ buffer[1] = 'x';
+
+ sprintf_vma (buffer + 2, val);
+
+ if (entry_symbol != NULL && entry_from_cmdline)
+ einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
+ thumb_entry_symbol, entry_symbol);
+ entry_symbol = buffer;
+ }
+ else
+ einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
+ }
+#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
+
+#ifdef DLL_SUPPORT
+ if (link_info.shared)
+ {
+ pe_dll_fill_sections (output_bfd, &link_info);
+ if (pe_implib_filename)
+ pe_dll_generate_implib (pe_def_file, pe_implib_filename);
+ }
+#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe)
+ else
+ {
+ pe_exe_fill_sections (output_bfd, &link_info);
+ }
+#endif
+
+ if (pe_out_def_filename)
+ pe_dll_generate_def_file (pe_out_def_filename);
+#endif
}
+
-/* Place an orphan section. We use this to put sections with a '\$' in them
- into the right place. Any section with a '\$' in them (e.g. .text\$foo)
- gets mapped to the output section with everything from the '\$' on stripped
- (e.g. .text).
- See the Microsoft Portable Executable and Common Object File Format
- Specification 4.1, section 4.2, Grouped Sections.
+/* Place an orphan section.
+
+ We use this to put sections in a reasonable place in the file, and
+ to ensure that they are aligned as required.
+
+ We handle grouped sections here as well. A section named .foo$nn
+ goes into the output section .foo. All grouped sections are sorted
+ by name.
+
+ Grouped sections for the default sections are handled by the
+ default linker script using wildcards, and are sorted by
+ sort_sections. */
+
+static asection *hold_section;
+static char *hold_section_name;
+static lang_output_section_statement_type *hold_use;
+static lang_output_section_statement_type *hold_text;
+static lang_output_section_statement_type *hold_rdata;
+static lang_output_section_statement_type *hold_data;
+static lang_output_section_statement_type *hold_bss;
- FIXME: This is now handled by the linker script using wildcards,
- but I'm leaving this here in case we want to enable it for sections
- which are not mentioned in the linker script. */
+/* Place an orphan section. We use this to put random SHF_ALLOC
+ sections in the right segment. */
/*ARGSUSED*/
static boolean
-gld${EMULATION_NAME}_place_orphan (file, s)
+gld_${EMULATION_NAME}_place_orphan (file, s)
lang_input_statement_type *file;
asection *s;
{
const char *secname;
- char *output_secname, *ps;
- lang_output_section_statement_type *os;
- lang_statement_union_type *l;
+ char *dollar = NULL;
if ((s->flags & SEC_ALLOC) == 0)
return false;
- /* Don't process grouped sections unless doing a final link.
- If they're marked as COMDAT sections, we don't want .text\$foo to
- end up in .text and then have .text disappear because it's marked
- link-once-discard. */
- if (link_info.relocateable)
- return false;
-
secname = bfd_get_section_name (s->owner, s);
- /* Everything from the '\$' on gets deleted so don't allow '\$' as the
- first character. */
- if (*secname == '\$')
- einfo ("%P%F: section %s has '\$' as first character\n", secname);
- if (strchr (secname + 1, '\$') == NULL)
- return false;
+ /* Look through the script to see where to place this section. */
- /* Look up the output section. The Microsoft specs say sections names in
- image files never contain a '\$'. Fortunately, lang_..._lookup creates
- the section if it doesn't exist. */
- output_secname = buystring (secname);
- ps = strchr (output_secname + 1, '\$');
- *ps = 0;
- os = lang_output_section_statement_lookup (output_secname);
-
- /* Find the '\$' wild statement for this section. We currently require the
- linker script to explicitly mention "*(.foo\$)".
- FIXME: ppcpe.sc has .CRT\$foo in the .rdata section. According to the
- Microsoft docs this isn't correct so it's not (currently) handled. */
-
- ps[0] = '\$';
- ps[1] = 0;
- for (l = os->children.head; l; l = l->next)
+ hold_section = s;
+
+ hold_section_name = xstrdup (secname);
+ if (!link_info.relocateable)
{
- if (l->header.type == lang_wild_statement_enum
- && strcmp (l->wild_statement.section_name, output_secname) == 0)
- break;
+ dollar = strchr (hold_section_name, '$');
+ if (dollar != NULL)
+ *dollar = '\0';
+ }
+
+ hold_use = NULL;
+ lang_for_each_statement (gld${EMULATION_NAME}_place_section);
+
+ if (hold_use == NULL)
+ {
+ lang_output_section_statement_type *place;
+ char *outsecname;
+ asection *snew, **pps;
+ lang_statement_list_type *old;
+ lang_statement_list_type add;
+ etree_type *address;
+
+ /* Try to put the new output section in a reasonable place based
+ on the section name and section flags. */
+ place = NULL;
+ if ((s->flags & SEC_HAS_CONTENTS) == 0
+ && hold_bss != NULL)
+ place = hold_bss;
+ else if ((s->flags & SEC_READONLY) == 0
+ && hold_data != NULL)
+ place = hold_data;
+ else if ((s->flags & SEC_CODE) == 0
+ && (s->flags & SEC_READONLY) != 0
+ && hold_rdata != NULL)
+ place = hold_rdata;
+ else if ((s->flags & SEC_READONLY) != 0
+ && hold_text != NULL)
+ place = hold_text;
+
+ /* Choose a unique name for the section. This will be needed if
+ the same section name appears in the input file with
+ different loadable or allocateable characteristics. */
+ outsecname = xstrdup (hold_section_name);
+ if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
+ {
+ unsigned int len;
+ char *newname;
+ unsigned int i;
+
+ len = strlen (outsecname);
+ newname = xmalloc (len + 5);
+ strcpy (newname, outsecname);
+ i = 0;
+ do
+ {
+ sprintf (newname + len, "%d", i);
+ ++i;
+ }
+ while (bfd_get_section_by_name (output_bfd, newname) != NULL);
+
+ free (outsecname);
+ outsecname = newname;
+ }
+
+ /* We don't want to free OUTSECNAME, as it may get attached to
+ the output section statement. */
+
+ /* Create the section in the output file, and put it in the
+ right place. This shuffling is to make the output file look
+ neater. */
+ snew = bfd_make_section (output_bfd, outsecname);
+ if (snew == NULL)
+ einfo ("%P%F: output format %s cannot represent section called %s\n",
+ output_bfd->xvec->name, outsecname);
+ if (place != NULL && place->bfd_section != NULL)
+ {
+ for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
+ ;
+ *pps = snew->next;
+ snew->next = place->bfd_section->next;
+ place->bfd_section->next = snew;
+ }
+
+ /* Start building a list of statements for this section. */
+ old = stat_ptr;
+ stat_ptr = &add;
+ lang_list_init (stat_ptr);
+
+ if (link_info.relocateable)
+ address = NULL;
+ else
+ {
+ /* All sections in an executable must be aligned to a page
+ boundary. */
+ address = exp_unop (ALIGN_K,
+ exp_nameop (NAME, "__section_alignment__"));
+ }
+
+ lang_enter_output_section_statement (outsecname, address, 0,
+ (bfd_vma) 0,
+ (etree_type *) NULL,
+ (etree_type *) NULL,
+ (etree_type *) NULL);
+
+ hold_use = lang_output_section_statement_lookup (outsecname);
+
+ lang_leave_output_section_statement
+ ((bfd_vma) 0, "*default*",
+ (struct lang_output_section_phdr_list *) NULL,
+ "*default*");
+
+ /* Now stick the new statement list right after PLACE. */
+ if (place != NULL)
+ {
+ *add.tail = place->header.next;
+ place->header.next = add.head;
+ }
+
+ stat_ptr = old;
}
- ps[0] = 0;
- if (l == NULL)
-#if 1
- einfo ("%P%F: *(%s\$) missing from linker script\n", output_secname);
-#else /* FIXME: This block is untried. It exists to convey the intent,
- should one decide to not require *(.foo\$) to appear in the linker
- script. */
+
+ if (dollar == NULL)
+ wild_doit (&hold_use->children, s, hold_use, file);
+ else
{
- lang_wild_statement_type *new = new_stat (lang_wild_statement,
- &os->children);
- new->section_name = xmalloc (strlen (output_secname) + 2);
- sprintf (new->section_name, "%s\$", output_secname);
- new->filename = NULL;
- lang_list_init (&new->children);
- l = new;
+ lang_statement_union_type **pl;
+ boolean found_dollar;
+ lang_statement_list_type list;
+
+ /* The section name has a '$'. Sort it with the other '$'
+ sections. */
+
+ found_dollar = false;
+ for (pl = &hold_use->children.head; *pl != NULL; pl = &(*pl)->next)
+ {
+ lang_input_section_type *ls;
+ const char *lname;
+
+ if ((*pl)->header.type != lang_input_section_enum)
+ continue;
+
+ ls = &(*pl)->input_section;
+
+ lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section);
+ if (strchr (lname, '$') == NULL)
+ {
+ if (found_dollar)
+ break;
+ }
+ else
+ {
+ found_dollar = true;
+ if (strcmp (secname, lname) < 0)
+ break;
+ }
+ }
+
+ lang_list_init (&list);
+ wild_doit (&list, s, hold_use, file);
+ if (list.head != NULL)
+ {
+ ASSERT (list.head->next == NULL);
+ list.head->next = *pl;
+ *pl = list.head;
+ }
}
-#endif
- /* Link the input section in and we're done for now.
- The sections still have to be sorted, but that has to wait until
- all such sections have been processed by us. The sorting is done by
- sort_sections. */
- wild_doit (&l->wild_statement.children, s, os, file);
+ free (hold_section_name);
return true;
}
+
+static void
+gld${EMULATION_NAME}_place_section (s)
+ lang_statement_union_type *s;
+{
+ lang_output_section_statement_type *os;
+
+ if (s->header.type != lang_output_section_statement_enum)
+ return;
+
+ os = &s->output_section_statement;
+
+ if (strcmp (os->name, hold_section_name) == 0
+ && os->bfd_section != NULL
+ && ((hold_section->flags & (SEC_LOAD | SEC_ALLOC))
+ == (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC))))
+ hold_use = os;
+
+ if (strcmp (os->name, ".text") == 0)
+ hold_text = os;
+ else if (strcmp (os->name, ".rdata") == 0)
+ hold_rdata = os;
+ else if (strcmp (os->name, ".data") == 0)
+ hold_data = os;
+ else if (strcmp (os->name, ".bss") == 0)
+ hold_bss = os;
+}
+
+static int
+gld_${EMULATION_NAME}_find_potential_libraries (name, entry)
+ char * name;
+ lang_input_statement_type * entry;
+{
+ return ldfile_open_file_search (name, entry, "", ".lib");
+}
static char *
gld_${EMULATION_NAME}_get_script(isfile)
@@ -737,7 +1314,7 @@ gld_${EMULATION_NAME}_get_script(isfile)
EOF
# Scripts compiled in.
# sed commands to quote an ld script as a C string.
-sc="-f ${srcdir}/emultempl/stringify.sed"
+sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
{
@@ -765,7 +1342,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld_${EMULATION_NAME}_before_parse,
syslib_default,
hll_default,
- after_parse_default,
+ gld_${EMULATION_NAME}_after_parse,
gld_${EMULATION_NAME}_after_open,
after_allocation_default,
set_output_arch_default,
@@ -774,11 +1351,15 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld_${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ gld_${EMULATION_NAME}_finish, /* finish */
NULL, /* create output section statements */
NULL, /* open dynamic archive */
- gld${EMULATION_NAME}_place_orphan,
+ gld_${EMULATION_NAME}_place_orphan,
gld_${EMULATION_NAME}_set_symbols,
- gld_${EMULATION_NAME}_parse_args
+ gld_${EMULATION_NAME}_parse_args,
+ gld_${EMULATION_NAME}_unrecognized_file,
+ gld_${EMULATION_NAME}_list_options,
+ gld_${EMULATION_NAME}_recognized_file,
+ gld_${EMULATION_NAME}_find_potential_libraries
};
EOF
diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em
index 04e36fb..0a74abd 100644
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ b/contrib/binutils/ld/emultempl/vanilla.em
@@ -64,6 +64,16 @@ struct ld_emulation_xfer_struct ld_vanilla_emulation =
before_allocation_default,
vanilla_get_script,
"vanilla",
- "a.out-sunos-big"
+ "a.out-sunos-big",
+ NULL, /* finish */
+ NULL, /* create output section statements */
+ NULL, /* open dynamic archive */
+ NULL, /* place orphan */
+ NULL, /* set symbols */
+ NULL, /* parse args */
+ NULL, /* unrecognized file */
+ NULL, /* list options */
+ NULL, /* recognized file */
+ NULL /* find_potential_libraries */
};
EOF
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
index eea5401..8294af7 100755
--- a/contrib/binutils/ld/genscripts.sh
+++ b/contrib/binutils/ld/genscripts.sh
@@ -14,7 +14,7 @@ libdir=$2
host=$3
target=$4
target_alias=$5
-DEFAULT_EMULATION=$6
+EMULATION_LIBPATH=$6
NATIVE_LIB_DIRS=$7
EMULATION_NAME=$8
tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib
@@ -36,26 +36,24 @@ fi
# To force a logically empty LIB_PATH, do LIBPATH=":".
if [ "x${LIB_PATH}" = "x" ] ; then
+ # Cross, or native non-default emulation not requesting LIB_PATH.
+ LIB_PATH=
+
if [ "x${host}" = "x${target}" ] ; then
- if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
- # Native.
- LIB_PATH=/lib:/usr/lib
- if [ -n "${NATIVE_LIB_DIRS}" ]; then
- LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
- fi
- if [ "${libdir}" != /usr/lib ]; then
- LIB_PATH=${LIB_PATH}:${libdir}
- fi
- if [ "${libdir}" != /usr/local/lib ] ; then
- LIB_PATH=${LIB_PATH}:/usr/local/lib
- fi
- else
- # Native, but not default emulation.
- LIB_PATH=
- fi
- else
- # Cross.
- LIB_PATH=
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ # Native, and default or emulation requesting LIB_PATH.
+ LIB_PATH=/lib:/usr/lib
+ if [ -n "${NATIVE_LIB_DIRS}" ]; then
+ LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
+ fi
+ if [ "${libdir}" != /usr/lib ]; then
+ LIB_PATH=${LIB_PATH}:${libdir}
+ fi
+ if [ "${libdir}" != /usr/local/lib ] ; then
+ LIB_PATH=${LIB_PATH}:/usr/local/lib
+ fi
+ esac
fi
fi
@@ -127,7 +125,9 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
ldscripts/${EMULATION_NAME}.xs
fi
-test "$DEFAULT_EMULATION" = "$EMULATION_NAME" && COMPILE_IN=true
+for i in $EMULATION_LIBPATH ; do
+ test "$i" = "$EMULATION_NAME" && COMPILE_IN=true
+done
# Generate e${EMULATION_NAME}.c.
. ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
index 79c9f10..58516b9 100644
--- a/contrib/binutils/ld/ld.1
+++ b/contrib/binutils/ld/ld.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools"
.de BP
@@ -42,6 +42,8 @@ ld \- the GNU linker
\& = \c
.I expression\c
\&\|]
+.RB "[\|" \-\-demangle "\|]"
+.RB "[\|" \-\-no\-demangle "\|]"
.RB "[\|" "\-e\ "\c
.I entry\c
\&\|]
@@ -92,6 +94,9 @@ ld \- the GNU linker
.RB "[\|" \-noinhibit-exec "\|]"
.RB "[\|" \-no\-keep\-memory "\|]"
.RB "[\|" \-no\-warn\-mismatch "\|]"
+.RB "[\|" \-O\c
+.I level\c
+\&\|]
.RB "[\|" "\-oformat\ "\c
.I output-format\c
\&\|]
@@ -468,12 +473,29 @@ constants or symbols. If you need more elaborate expressions, consider
using the linker command language from a script.
.TP
+.B \-\-demangle
+.TP
+.B \-\-no\-demangle
+These options control whether to demangle symbol names in error
+messages and other output. When the linker is told to demangle, it
+tries to present symbol names in a readable fashion: it strips leading
+underscores if they are used by the object file format, and converts
+C++ mangled symbol names into user readable names. The linker will
+demangle by default unless the environment variable
+.B COLLECT_NO_DEMANGLE
+is set. These options may be used to override the default.
+
+.TP
.BI "-e " "entry"\c
\&
Use \c
.I entry\c
\& as the explicit symbol for beginning execution of your
-program, rather than the default entry point. for a
+program, rather than the default entry point. See the `\|\c
+.B ld\c
+\|' entry in `\|\c
+.B info\c
+\|' for a
discussion of defaults and other ways of specifying the
entry point.
@@ -690,6 +712,16 @@ script command \c
\& can also specify the output file name.
.TP
+.BI "\-O" "level"
+Generate optimized output files. This might use significantly more
+time and therefore probably should be enabled only for generating the
+final binary.
+\c
+.I level\c
+\& is supposed to be a numeric value. Any value greater than zero enables
+the optimizations.
+
+.TP
.BI "\-oformat " "output\-format"
Specify the binary format for the output object file.
You don't usually need to specify this, as
@@ -774,7 +806,7 @@ will be used if it is defined.
The
.B \-rpath
option may also be used on SunOS. By default, on SunOS, the linker
-will form a runtime search patch out of all the
+will form a runtime search path out of all the
.B \-L
options it is given. If a
.B \-rpath
@@ -874,7 +906,7 @@ Use \c
.B text\c
\& segment of the output file.
\c
-.I textorg\c
+.I org\c
\& must be a hexadecimal integer.
.TP
@@ -1065,7 +1097,7 @@ The GNU Binary Utilities\c
, Roland H. Pesch.
.SH COPYING
-Copyright (c) 1991, 1992 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 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
diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h
index e0e2a4d..e2052a0 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -1,5 +1,6 @@
/* ld.h -- general linker header file
- Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -21,6 +22,31 @@
#ifndef LD_H
#define LD_H
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) gettext (String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# 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 _(String) (String)
+# define N_(String) (String)
+#endif
+
+#include "bin-bugs.h"
+
/* Look in this environment name for the linker to pretend to be */
#define EMULATION_ENVIRON "LDEMULATION"
/* If in there look for the strings: */
@@ -32,6 +58,23 @@
discarded. */
#define DISCARD_SECTION_NAME "/DISCARD/"
+/* A file name list */
+typedef struct name_list
+{
+ const char *name;
+ struct name_list *next;
+} name_list;
+
+/* A wildcard specification. This is only used in ldgram.y, but it
+ winds up in ldgram.h, so we need to define it outside. */
+
+struct wildcard_spec
+{
+ const char *name;
+ struct name_list *exclude_name_list;
+ boolean sorted;
+};
+
/* Extra information we hold on sections */
typedef struct user_section_struct
{
@@ -95,6 +138,9 @@ typedef struct
files. */
boolean warn_mismatch;
+ /* Remove unreferenced sections? */
+ boolean gc_sections;
+
/* Name of shared object whose symbol table should be filtered with
this shared object. From the --filter option. */
char *filter_shlib;
@@ -102,6 +148,15 @@ typedef struct
/* Name of shared object for whose symbol table this shared object
is an auxiliary filter. From the --auxiliary option. */
char **auxiliary_filters;
+
+ /* A version symbol to be applied to the symbol names found in the
+ .exports sections. */
+ char *version_exports_section;
+
+ /* If true (the default) check section addresses, once compute,
+ fpor overlaps. */
+ boolean check_section_addresses;
+
} args_type;
extern args_type command_line;
@@ -117,6 +172,12 @@ typedef struct
/* If true, doing a dynamic link. */
boolean dynamic_link;
+ /* If true, -shared is supported. */
+ /* ??? A better way to do this is perhaps to define this in the
+ ld_emulation_xfer_struct since this is really a target dependent
+ parameter. */
+ boolean has_shared;
+
/* If true, build constructors. */
boolean build_constructors;
@@ -171,4 +232,15 @@ extern void add_cref PARAMS ((const char *, bfd *, asection *, bfd_vma));
extern void output_cref PARAMS ((FILE *));
extern void check_nocrossrefs PARAMS ((void));
+extern void ld_abort PARAMS ((const char *, int, const char *))
+ ATTRIBUTE_NORETURN;
+
+/* If gcc >= 2.6, we can give a function name, too. */
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
+#define __PRETTY_FUNCTION__ ((char*) NULL)
+#endif
+
+#undef abort
+#define abort() ld_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
+
#endif
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 05f3984..c9d0fc6 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -3,6 +3,7 @@
@syncodeindex ky cp
@include configdoc.texi
@c (configdoc.texi is generated by the Makefile)
+@include ldver.texi
@c @smallbook
@@ -15,9 +16,9 @@ END-INFO-DIR-ENTRY
@end ifinfo
@ifinfo
-This file documents the @sc{gnu} linker LD.
+This file documents the @sc{gnu} linker LD version @value{VERSION}.
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+Copyright (C) 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
@@ -48,15 +49,16 @@ notice identical to this one except for the removal of this paragraph
@subtitle The GNU linker
@sp 1
@subtitle @code{ld} version 2
-@subtitle January 1994
+@subtitle Version @value{VERSION}
@author Steve Chamberlain
-@author Cygnus Support
+@author Ian Lance Taylor
+@author Cygnus Solutions
@page
@tex
{\parskip=0pt
-\hfill Cygnus Support\par
-\hfill steve\@cygnus.com, doc\@cygnus.com\par
+\hfill Cygnus Solutions\par
+\hfill ian\@cygnus.com, doc\@cygnus.com\par
\hfill {\it Using LD, the GNU linker}\par
\hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par
}
@@ -64,7 +66,7 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -84,12 +86,12 @@ into another language, under the above conditions for modified versions.
@ifinfo
@node Top
@top Using ld
-This file documents the @sc{gnu} linker ld.
+This file documents the @sc{gnu} linker ld version @value{VERSION}.
@menu
* Overview:: Overview
* Invocation:: Invocation
-* Commands:: Command Language
+* Scripts:: Linker Scripts
@ifset GENERIC
* Machine Dependent:: Machine Dependent Features
@end ifset
@@ -177,18 +179,21 @@ result of linking the file @code{/lib/crt0.o} with @code{hello.o} and
the library @code{libc.a}, which will come from the standard search
directories. (See the discussion of the @samp{-l} option below.)
-The command-line options to @code{ld} may be specified in any order, and
-may be repeated at will. Repeating most options with a different
-argument will either have no further effect, or override prior
+Some of the command-line options to @code{ld} may be specified at any
+point in the command line. However, options which refer to files, such
+as @samp{-l} or @samp{-T}, cause the file to be read at the point at
+which the option appears in the command line, relative to the object
+files and other file options. Repeating non-file options with a
+different argument will either have no further effect, or override prior
occurrences (those further to the left on the command line) of that
option. Options which may be meaningfully specified more than once are
noted in the descriptions below.
@cindex object files
-Non-option arguments are objects files which are to be linked together.
-They may follow, precede, or be mixed in with command-line options,
-except that an object file argument may not be placed between an option
-and its argument.
+Non-option arguments are object files or archives which are to be linked
+together. They may follow, precede, or be mixed in with command-line
+options, except that an object file argument may not be placed between
+an option and its argument.
Usually the linker is invoked with at least one object file, but you can
specify other forms of binary input files using @samp{-l}, @samp{-R},
@@ -207,7 +212,7 @@ specifying a script in this way should only be used to augment the main
linker script; if you want to use some command that logically can only
appear once, such as the @code{SECTIONS} or @code{MEMORY} command, you
must replace the default linker script using the @samp{-T} option.
-@xref{Commands}.
+@xref{Scripts}.
For options whose names are a single letter,
option arguments must either follow the option letter without intervening
@@ -223,6 +228,21 @@ requires them. For example, @samp{--oformat srec} and
@samp{--oformat=srec} are equivalent. Unique abbreviations of the names
of multiple-letter options are accepted.
+Note - if the linker is being invoked indirectly, via a compiler driver
+(eg @samp{gcc}) then all the linker command line options should be
+prefixed by @samp{-Wl,} (or whatever is appropriate for the particular
+compiler driver) like this:
+
+@smallexample
+ gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
+@end smallexample
+
+This is important, because otherwise the compiler driver program may
+silently drop the linker options, resulting in a bad link.
+
+Here is a table of the generic command line switches accepted by the GNU
+linker:
+
@table @code
@kindex -a@var{keyword}
@item -a@var{keyword}
@@ -280,9 +300,8 @@ The default format is taken from the environment variable
@ifset UsesEnvVars
@xref{Environment}.
@end ifset
-You can also define the input
-format from a script, using the command @code{TARGET}; see @ref{Option
-Commands}.
+You can also define the input format from a script, using the command
+@code{TARGET}; see @ref{Format Commands}.
@end ifclear
@kindex -c @var{MRI-cmdfile}
@@ -306,11 +325,10 @@ specified by any @samp{-L} options.
@itemx -dc
@itemx -dp
These three options are equivalent; multiple forms are supported for
-compatibility with other linkers. They
-assign space to common symbols even if a relocatable output file is
-specified (with @samp{-r}). The script command
-@code{FORCE_COMMON_ALLOCATION} has the same effect. @xref{Option
-Commands}.
+compatibility with other linkers. They assign space to common symbols
+even if a relocatable output file is specified (with @samp{-r}). The
+script command @code{FORCE_COMMON_ALLOCATION} has the same effect.
+@xref{Miscellaneous Commands}.
@cindex entry point, from command line
@kindex -e @var{entry}
@@ -318,9 +336,12 @@ Commands}.
@item -e @var{entry}
@itemx --entry=@var{entry}
Use @var{entry} as the explicit symbol for beginning execution of your
-program, rather than the default entry point. @xref{Entry Point}, for a
-discussion of defaults and other ways of specifying the
-entry point.
+program, rather than the default entry point. If there is no symbol
+named @var{entry}, the linker will try to parse @var{entry} as a number,
+and use that as the entry address (the number will be interpreted in
+base 10; you may use a leading @samp{0x} for base 16, or a leading
+@samp{0} for base 8). @xref{Entry Point}, for a discussion of defaults
+and other ways of specifying the entry point.
@cindex dynamic symbol table
@kindex -E
@@ -340,6 +361,17 @@ back to the symbols defined by the program, rather than some other
dynamic object, then you will probably need to use this option when
linking the program itself.
+@cindex big-endian objects
+@cindex endianness
+@kindex -EB
+@item -EB
+Link big-endian objects. This affects the default output format.
+
+@cindex little-endian objects
+@kindex -EL
+@item -EL
+Link little-endian objects. This affects the default output format.
+
@kindex -f
@kindex --auxiliary
@item -f
@@ -387,16 +419,13 @@ purpose: the @code{-b}, @code{--format}, @code{--oformat} options, the
environment variable. The @sc{gnu} linker will ignore the @code{-F}
option when not creating an ELF shared object.
-@kindex --force-exe-suffix
-@item --force-exe-suffix
-Make sure that an output file has a .exe suffix.
-
-If a successfully built fully linked output file does not have a
-@code{.exe} or @code{.dll} suffix, this option forces the linker to copy
-the output file to one of the same name with a @code{.exe} suffix. This
-option is useful when using unmodified Unix makefiles on a Microsoft
-Windows host, since some versions of Windows won't run an image unless
-it ends in a @code{.exe} suffix.
+@cindex finalization function
+@kindex -fini
+@item -fini @var{name}
+When creating an ELF executable or shared object, call NAME when the
+executable or shared object is unloaded, by setting DT_FINI to the
+address of the function. By default, the linker uses @code{_fini} as
+the function to call.
@kindex -g
@item -g
@@ -428,6 +457,14 @@ field rather than the using the file name given to the linker.
@item -i
Perform an incremental link (same as option @samp{-r}).
+@cindex initialization function
+@kindex -init
+@item -init @var{name}
+When creating an ELF executable or shared object, call NAME when the
+executable or shared object is loaded, by setting DT_INIT to the address
+of the function. By default, the linker uses @code{_init} as the
+function to call.
+
@cindex archive files, from cmd line
@kindex -l@var{archive}
@kindex --library=@var{archive}
@@ -522,8 +559,8 @@ which caused the archive member to be brought in.
@kindex --nmagic
@item -n
@itemx --nmagic
-Set the text segment to be read only, and mark the output as
-@code{NMAGIC} if possible.
+Turn off page alignment of sections, and mark the output as
+@code{NMAGIC} if possible.
@kindex -N
@kindex --omagic
@@ -544,6 +581,13 @@ Use @var{output} as the name for the program produced by @code{ld}; if this
option is not specified, the name @file{a.out} is used by default. The
script command @code{OUTPUT} can also specify the output file name.
+@kindex -O @var{level}
+@cindex generating optimized output
+@item -O @var{level}
+If @var{level} is a numeric values greater than zero @code{ld} optimizes
+the output. This might take significantly longer and therefore probably
+should only be enabled for the final binary.
+
@cindex partial link
@cindex relocatable output
@kindex -r
@@ -600,29 +644,40 @@ Print the names of the input files as @code{ld} processes them.
@kindex -T @var{script}
@kindex --script=@var{script}
@cindex script files
-@item -T @var{commandfile}
-@itemx --script=@var{commandfile}
-Read link commands from the file @var{commandfile}. These commands
-replace @code{ld}'s default link script (rather than adding to it), so
+@item -T @var{scriptfile}
+@itemx --script=@var{scriptfile}
+Use @var{scriptfile} as the linker script. This script replaces
+@code{ld}'s default linker script (rather than adding to it), so
@var{commandfile} must specify everything necessary to describe the
-target format. You must use this option if you want to use a command
+output file. You must use this option if you want to use a command
which can only appear once in a linker script, such as the
-@code{SECTIONS} or @code{MEMORY} command. @xref{Commands}. If
-@var{commandfile} does not exist, @code{ld} looks for it in the
-directories specified by any preceding @samp{-L} options. Multiple
-@samp{-T} options accumulate.
+@code{SECTIONS} or @code{MEMORY} command. @xref{Scripts}. If
+@var{scriptfile} does not exist in the current directory, @code{ld}
+looks for it in the directories specified by any preceding @samp{-L}
+options. Multiple @samp{-T} options accumulate.
@kindex -u @var{symbol}
@kindex --undefined=@var{symbol}
@cindex undefined symbol
@item -u @var{symbol}
@itemx --undefined=@var{symbol}
-Force @var{symbol} to be entered in the output file as an undefined symbol.
-Doing this may, for example, trigger linking of additional modules from
-standard libraries. @samp{-u} may be repeated with different option
-arguments to enter additional undefined symbols.
-@c Nice idea, but no such command: This option is equivalent
-@c to the @code{EXTERN} linker command.
+Force @var{symbol} to be entered in the output file as an undefined
+symbol. Doing this may, for example, trigger linking of additional
+modules from standard libraries. @samp{-u} may be repeated with
+different option arguments to enter additional undefined symbols. This
+option is equivalent to the @code{EXTERN} linker script command.
+
+@kindex -Ur
+@cindex constructors
+@item -Ur
+For anything other than C++ programs, this option is equivalent to
+@samp{-r}: it generates relocatable output---i.e., an output file that can in
+turn serve as input to @code{ld}. When linking C++ programs, @samp{-Ur}
+@emph{does} resolve references to constructors, unlike @samp{-r}.
+It does not work to use @samp{-Ur} on files that were themselves linked
+with @samp{-Ur}; once the constructor table has been built, it cannot
+be added to. Use @samp{-Ur} only for the last partial link, and
+@samp{-r} for the others.
@kindex -v
@kindex -V
@@ -730,6 +785,17 @@ for a program linked against a shared library to override the definition
within the shared library. This option is only meaningful on ELF
platforms which support shared libraries.
+@kindex --check-sections
+@kindex --no-check-sections
+@item --check-sections
+@itemx --no-check-sections
+Asks the linker @emph{not} to check section addresses after they have
+been assigned to see if there any overlaps. Normally the linker will
+perform this check, and if it finds any overlaps it will produce
+suitable error messages. The linker does know about, and does make
+allowances for sections in overlays. The default behaviour can be
+restored by using the command line switch @samp{--check-sections}.
+
@cindex cross reference table
@kindex --cref
@item --cref
@@ -753,11 +819,24 @@ limited form of arithmetic is supported for the @var{expression} in this
context: you may give a hexadecimal constant or the name of an existing
symbol, or use @code{+} and @code{-} to add or subtract hexadecimal
constants or symbols. If you need more elaborate expressions, consider
-using the linker command language from a script (@pxref{Assignment, ,
-Assignment: Symbol Definitions}). @emph{Note:} there should be no
-white space between @var{symbol}, the equals sign (``@key{=}''), and
+using the linker command language from a script (@pxref{Assignments,,
+Assignment: Symbol Definitions}). @emph{Note:} there should be no white
+space between @var{symbol}, the equals sign (``@key{=}''), and
@var{expression}.
+@cindex demangling, from command line
+@kindex --demangle
+@kindex --no-demangle
+@item --demangle
+@itemx --no-demangle
+These options control whether to demangle symbol names in error messages
+and other output. When the linker is told to demangle, it tries to
+present symbol names in a readable fashion: it strips leading
+underscores if they are used by the object file format, and converts C++
+mangled symbol names into user readable names. The linker will demangle
+by default unless the environment variable @samp{COLLECT_NO_DEMANGLE} is
+set. These options may be used to override the default.
+
@cindex dynamic linker, from command line
@kindex --dynamic-linker @var{file}
@item --dynamic-linker @var{file}
@@ -766,17 +845,6 @@ generating dynamically linked ELF executables. The default dynamic
linker is normally correct; don't use this unless you know what you are
doing.
-@cindex big-endian objects
-@cindex endianness
-@kindex -EB
-@item -EB
-Link big-endian objects. This affects the default output format.
-
-@cindex little-endian objects
-@kindex -EL
-@item -EL
-Link little-endian objects. This affects the default output format.
-
@cindex MIPS embedded PIC code
@kindex --embedded-relocs
@item --embedded-relocs
@@ -786,6 +854,28 @@ assembler. It causes the linker to create a table which may be used at
runtime to relocate any data which was statically initialized to pointer
values. See the code in testsuite/ld-empic for details.
+@kindex --force-exe-suffix
+@item --force-exe-suffix
+Make sure that an output file has a .exe suffix.
+
+If a successfully built fully linked output file does not have a
+@code{.exe} or @code{.dll} suffix, this option forces the linker to copy
+the output file to one of the same name with a @code{.exe} suffix. This
+option is useful when using unmodified Unix makefiles on a Microsoft
+Windows host, since some versions of Windows won't run an image unless
+it ends in a @code{.exe} suffix.
+
+@kindex --gc-sections
+@kindex --no-gc-sections
+@cindex garbage collection
+@item --no-gc-sections
+@itemx --gc-sections
+Enable garbage collection of unused input sections. It is ignored on
+targets that do not support this option. This option is not compatible
+with @samp{-r}, nor should it be used with dynamic linking. The default
+behaviour (of not performing this garbage collection) can be restored by
+specifying @samp{--no-gc-sections} on the command line.
+
@cindex help
@cindex usage
@kindex --help
@@ -806,6 +896,12 @@ instead optimize for memory usage, by rereading the symbol tables as
necessary. This may be required if @code{ld} runs out of memory space
while linking a large executable.
+@kindex --no-undefined
+@item --no-undefined
+Normally when creating a non-symbolic shared library, undefined symbols
+are allowed and left to be resolved by the runtime loader. This option
+disallows such undefined symbols.
+
@kindex --no-warn-mismatch
@item --no-warn-mismatch
Normally @code{ld} will give an error if you try to link together input
@@ -868,11 +964,19 @@ This option is only supported on a few targets.
@xref{i960,, @code{ld} and the Intel 960 family}.
@end ifset
+
On some platforms, the @samp{--relax} option performs global
optimizations that become possible when the linker resolves addressing
in the program, such as relaxing address modes and synthesizing new
instructions in the output object file.
+On some platforms these link time global optimizations may make symbolic
+debugging of the resulting executable impossible.
+@ifset GENERIC
+This is known to be
+the case for the Matsushita MN10200 and MN10300 family of processors.
+@end ifset
+
@ifset GENERIC
On platforms where this is not supported, @samp{--relax} is accepted,
but ignored.
@@ -933,7 +1037,7 @@ happens when an @code{ld -shared} link includes a shared library as one
of the input files.
When the linker encounters such a dependency when doing a non-shared,
-non-relocateable link, it will automatically try to locate the required
+non-relocatable link, it will automatically try to locate the required
shared library and include it in the link, if it is not included
explicitly. In such a case, the @code{-rpath-link} option
specifies the first set of directories to search. The
@@ -964,6 +1068,9 @@ For a native linker, the contents of the environment variable
@code{LD_LIBRARY_PATH}.
@item
The default directories, normally @file{/lib} and @file{/usr/lib}.
+@item
+For a native linker on an ELF system, if the file @file{/etc/ld.so.conf}
+exists, the list of directories found in that file.
@end enumerate
If the required shared library is not found, the linker will issue a
@@ -1039,21 +1146,10 @@ Use @var{org} as the starting address for---respectively---the
for compatibility with other linkers, you may omit the leading
@samp{0x} usually associated with hexadecimal values.
-@kindex -Ur
-@cindex constructors
-@item -Ur
-For anything other than C++ programs, this option is equivalent to
-@samp{-r}: it generates relocatable output---i.e., an output file that can in
-turn serve as input to @code{ld}. When linking C++ programs, @samp{-Ur}
-@emph{does} resolve references to constructors, unlike @samp{-r}.
-It does not work to use @samp{-Ur} on files that were themselves linked
-with @samp{-Ur}; once the constructor table has been built, it cannot
-be added to. Use @samp{-Ur} only for the last partial link, and
-@samp{-r} for the others.
-
@kindex --verbose
@cindex verbose
-@item --verbose
+@item --dll-verbose
+@itemx --verbose
Display the version number for @code{ld} and list the linker emulations
supported. Display which input files can and cannot be opened. Display
the linker script if using a default builtin script.
@@ -1065,7 +1161,7 @@ Specify the name of a version script to the linker. This is typically
used when creating shared libraries to specify additional information
about the version heirarchy for the library being created. This option
is only meaningful on ELF platforms which support shared libraries.
-@xref{Version Script}.
+@xref{VERSION}.
@kindex --warn-comon
@cindex warnings, on combining symbols
@@ -1235,12 +1331,169 @@ call before the linker has a chance to wrap it to @code{malloc}.
@end table
+@subsection Options specific to i386 PE targets
+
+The i386 PE linker supports the @code{-shared} option, which causes
+the output to be a dynamically linked library (DLL) instead of a
+normal executable. You should name the output @code{*.dll} when you
+use this option. In addition, the linker fully supports the standard
+@code{*.def} files, which may be specified on the linker command line
+like an object file (in fact, it should precede archives it exports
+symbols from, to ensure that they get linked in, just like a normal
+object file).
+
+In addition to the options common to all targets, the i386 PE linker
+support additional command line options that are specific to the i386
+PE target. Options that take values may be separated from their
+values by either a space or an equals sign.
+
+@table @code
+
+@kindex --add-stdcall-alias
+@item --add-stdcall-alias
+If given, symbols with a stdcall suffix (@@@var{nn}) will be exported
+as-is and also with the suffix stripped.
+
+@kindex --base-file
+@item --base-file @var{file}
+Use @var{file} as the name of a file in which to save the base
+addresses of all the relocations needed for generating DLLs with
+@file{dlltool}.
+
+@kindex --dll
+@item --dll
+Create a DLL instead of a regular executable. You may also use
+@code{-shared} or specify a @code{LIBRARY} in a given @code{.def}
+file.
+
+@kindex --enable-stdcall-fixup
+@kindex --disable-stdcall-fixup
+@item --enable-stdcall-fixup
+@itemx --disable-stdcall-fixup
+If the link finds a symbol that it cannot resolve, it will attempt to
+do "fuzzy linking" by looking for another defined symbol that differs
+only in the format of the symbol name (cdecl vs stdcall) and will
+resolve that symbol by linking to the match. For example, the
+undefined symbol @code{_foo} might be linked to the function
+@code{_foo@@12}, or the undefined symbol @code{_bar@@16} might be linked
+to the function @code{_bar}. When the linker does this, it prints a
+warning, since it normally should have failed to link, but sometimes
+import libraries generated from third-party dlls may need this feature
+to be usable. If you specify @code{--enable-stdcall-fixup}, this
+feature is fully enabled and warnings are not printed. If you specify
+@code{--disable-stdcall-fixup}, this feature is disabled and such
+mismatches are considered to be errors.
+
+@cindex DLLs, creating
+@kindex --export-all-symbols
+@item --export-all-symbols
+If given, all global symbols in the objects used to build a DLL will
+be exported by the DLL. Note that this is the default if there
+otherwise wouldn't be any exported symbols. When symbols are
+explicitly exported via DEF files or implicitly exported via function
+attributes, the default is to not export anything else unless this
+option is given. Note that the symbols @code{DllMain@@12},
+@code{DllEntryPoint@@0}, and @code{impure_ptr} will not be automatically
+exported.
+
+@kindex --exclude-symbols
+@item --exclude-symbols @var{symbol},@var{symbol},...
+Specifies a list of symbols which should not be automatically
+exported. The symbol names may be delimited by commas or colons.
+
+@kindex --file-alignment
+@item --file-alignment
+Specify the file alignment. Sections in the file will always begin at
+file offsets which are multiples of this number. This defaults to
+512.
+
+@cindex heap size
+@kindex --heap
+@item --heap @var{reserve}
+@itemx --heap @var{reserve},@var{commit}
+Specify the amount of memory to reserve (and optionally commit) to be
+used as heap for this program. The default is 1Mb reserved, 4K
+committed.
+
+@cindex image base
+@kindex --image-base
+@item --image-base @var{value}
+Use @var{value} as the base address of your program or dll. This is
+the lowest memory location that will be used when your program or dll
+is loaded. To reduce the need to relocate and improve performance of
+your dlls, each should have a unique base address and not overlap any
+other dlls. The default is 0x400000 for executables, and 0x10000000
+for dlls.
+
+@kindex --kill-at
+@item --kill-at
+If given, the stdcall suffixes (@@@var{nn}) will be stripped from
+symbols before they are exported.
+
+@kindex --major-image-version
+@item --major-image-version @var{value}
+Sets the major number of the "image version". Defaults to 1.
+
+@kindex --major-os-version
+@item --major-os-version @var{value}
+Sets the major number of the "os version". Defaults to 4.
+
+@kindex --major-subsystem-version
+@item --major-subsystem-version @var{value}
+Sets the major number of the "subsystem version". Defaults to 4.
+
+@kindex --minor-image-version
+@item --minor-image-version @var{value}
+Sets the minor number of the "image version". Defaults to 0.
+
+@kindex --minor-os-version
+@item --minor-os-version @var{value}
+Sets the minor number of the "os version". Defaults to 0.
+
+@kindex --minor-subsystem-version
+@item --minor-subsystem-version @var{value}
+Sets the minor number of the "subsystem version". Defaults to 0.
+
+@cindex DEF files, creating
+@cindex DLLs, creating
+@kindex --output-def
+@item --output-def @var{file}
+The linker will create the file @var{file} which will contain a DEF
+file corresponding to the DLL the linker is generating. This DEF file
+(which should be called @code{*.def}) may be used to create an import
+library with @code{dlltool} or may be used as a reference to
+automatically or implicitly exported symbols.
+
+@kindex --section-alignment
+@item --section-alignment
+Sets the section alignment. Sections in memory will always begin at
+addresses which are a multiple of this number. Defaults to 0x1000.
+
+@cindex stack size
+@kindex --stack
+@item --stack @var{reserve}
+@itemx --stack @var{reserve},@var{commit}
+Specify the amount of memory to reserve (and optionally commit) to be
+used as stack for this program. The default is 32Mb reserved, 4K
+committed.
+
+@kindex --subsystem
+@item --subsystem @var{which}
+@itemx --subsystem @var{which}:@var{major}
+@itemx --subsystem @var{which}:@var{major}.@var{minor}
+Specifies the subsystem under which your program will execute. The
+legal values for @var{which} are @code{native}, @code{windows},
+@code{console}, and @code{posix}. You may optionally set the
+subsystem version also.
+
+@end table
+
@ifset UsesEnvVars
@node Environment
@section Environment Variables
You can change the behavior of @code{ld} with the environment variables
-@code{GNUTARGET} and @code{LDEMULATION}.
+@code{GNUTARGET}, @code{LDEMULATION}, and @code{COLLECT_NO_DEMANGLE}.
@kindex GNUTARGET
@cindex default input format
@@ -1268,926 +1521,907 @@ variable is not defined, the default emulation depends upon how the
linker was configured.
@end ifset
-@node Commands
-@chapter Command Language
+@kindex COLLECT_NO_DEMANGLE
+@cindex demangling, default
+Normally, the linker will default to demangling symbols. However, if
+@code{COLLECT_NO_DEMANGLE} is set in the environment, then it will
+default to not demangling symbols. This environment variable is used in
+a similar fashion by the @code{gcc} linker wrapper program. The default
+may be overridden by the @samp{--demangle} and @samp{--no-demangle}
+options.
+
+@node Scripts
+@chapter Linker Scripts
+@cindex scripts
+@cindex linker scripts
@cindex command files
-The command language provides explicit control over the link process,
-allowing complete specification of the mapping between the linker's
-input files and its output. It controls:
-@itemize @bullet
-@item
-input files
-@item
-file formats
-@item
-output file layout
-@item
-addresses of sections
-@item
-placement of common blocks
-@end itemize
+Every link is controlled by a @dfn{linker script}. This script is
+written in the linker command language.
+
+The main purpose of the linker script is to describe how the sections in
+the input files should be mapped into the output file, and to control
+the memory layout of the output file. Most linker scripts do nothing
+more than this. However, when necessary, the linker script can also
+direct the linker to perform many other operations, using the commands
+described below.
+
+The linker always uses a linker script. If you do not supply one
+yourself, the linker will use a default script that is compiled into the
+linker executable. You can use the @samp{--verbose} command line option
+to display the default linker script. Certain command line options,
+such as @samp{-r} or @samp{-N}, will affect the default linker script.
+
+You may supply your own linker script by using the @samp{-T} command
+line option. When you do this, your linker script will replace the
+default linker script.
+
+You may also use linker scripts implicitly by naming them as input files
+to the linker, as though they were files to be linked. @xref{Implicit
+Linker Scripts}.
-You may supply a command file (also known as a linker script) to the
-linker either explicitly through the @samp{-T} option, or implicitly as
-an ordinary file. Normally you should use the @samp{-T} option. An
-implicit linker script should only be used when you want to augment,
-rather than replace, the default linker script; typically an implicit
-linker script would consist only of @code{INPUT} or @code{GROUP}
-commands.
+@menu
+* Basic Script Concepts:: Basic Linker Script Concepts
+* Script Format:: Linker Script Format
+* Simple Example:: Simple Linker Script Example
+* Simple Commands:: Simple Linker Script Commands
+* Assignments:: Assigning Values to Symbols
+* SECTIONS:: SECTIONS Command
+* MEMORY:: MEMORY Command
+* PHDRS:: PHDRS Command
+* VERSION:: VERSION Command
+* Expressions:: Expressions in Linker Scripts
+* Implicit Linker Scripts:: Implicit Linker Scripts
+@end menu
-If the linker opens a file which it cannot recognize as a supported
-object or archive format, nor as a linker script, it reports an error.
+@node Basic Script Concepts
+@section Basic Linker Script Concepts
+@cindex linker script concepts
+We need to define some basic concepts and vocabulary in order to
+describe the linker script language.
+
+The linker combines input files into a single output file. The output
+file and each input file are in a special data format known as an
+@dfn{object file format}. Each file is called an @dfn{object file}.
+The output file is often called an @dfn{executable}, but for our
+purposes we will also call it an object file. Each object file has,
+among other things, a list of @dfn{sections}. We sometimes refer to a
+section in an input file as an @dfn{input section}; similarly, a section
+in the output file is an @dfn{output section}.
+
+Each section in an object file has a name and a size. Most sections
+also have an associated block of data, known as the @dfn{section
+contents}. A section may be marked as @dfn{loadable}, which mean that
+the contents should be loaded into memory when the output file is run.
+A section with no contents may be @dfn{allocatable}, which means that an
+area in memory should be set aside, but nothing in particular should be
+loaded there (in some cases this memory must be zeroed out). A section
+which is neither loadable nor allocatable typically contains some sort
+of debugging information.
+
+Every loadable or allocatable output section has two addresses. The
+first is the @dfn{VMA}, or virtual memory address. This is the address
+the section will have when the output file is run. The second is the
+@dfn{LMA}, or load memory address. This is the address at which the
+section will be loaded. In most cases the two addresses will be the
+same. An example of when they might be different is when a data section
+is loaded into ROM, and then copied into RAM when the program starts up
+(this technique is often used to initialize global variables in a ROM
+based system). In this case the ROM address would be the LMA, and the
+RAM address would be the VMA.
+
+You can see the sections in an object file by using the @code{objdump}
+program with the @samp{-h} option.
+
+Every object file also has a list of @dfn{symbols}, known as the
+@dfn{symbol table}. A symbol may be defined or undefined. Each symbol
+has a name, and each defined symbol has an address, among other
+information. If you compile a C or C++ program into an object file, you
+will get a defined symbol for every defined function and global or
+static variable. Every undefined function or global variable which is
+referenced in the input file will become an undefined symbol.
+
+You can see the symbols in an object file by using the @code{nm}
+program, or by using the @code{objdump} program with the @samp{-t}
+option.
+
+@node Script Format
+@section Linker Script Format
+@cindex linker script format
+Linker scripts are text files.
+
+You write a linker script as a series of commands. Each command is
+either a keyword, possibly followed by arguments, or an assignment to a
+symbol. You may separate commands using semicolons. Whitespace is
+generally ignored.
+
+Strings such as file or format names can normally be entered directly.
+If the file name contains a character such as a comma which would
+otherwise serve to separate file names, you may put the file name in
+double quotes. There is no way to use a double quote character in a
+file name.
+
+You may include comments in linker scripts just as in C, delimited by
+@samp{/*} and @samp{*/}. As in C, comments are syntactically equivalent
+to whitespace.
+
+@node Simple Example
+@section Simple Linker Script Example
+@cindex linker script example
+@cindex example of linker script
+Many linker scripts are fairly simple.
+
+The simplest possible linker script has just one command:
+@samp{SECTIONS}. You use the @samp{SECTIONS} command to describe the
+memory layout of the output file.
+
+The @samp{SECTIONS} command is a powerful command. Here we will
+describe a simple use of it. Let's assume your program consists only of
+code, initialized data, and uninitialized data. These will be in the
+@samp{.text}, @samp{.data}, and @samp{.bss} sections, respectively.
+Let's assume further that these are the only sections which appear in
+your input files.
+
+For this example, let's say that the code should be loaded at address
+0x10000, and that the data should start at address 0x8000000. Here is a
+linker script which will do that:
+@smallexample
+SECTIONS
+@{
+ . = 0x10000;
+ .text : @{ *(.text) @}
+ . = 0x8000000;
+ .data : @{ *(.data) @}
+ .bss : @{ *(.bss) @}
+@}
+@end smallexample
+
+You write the @samp{SECTIONS} command as the keyword @samp{SECTIONS},
+followed by a series of symbol assignments and output section
+descriptions enclosed in curly braces.
+
+The first line inside the @samp{SECTIONS} command of the above example
+sets the value of the special symbol @samp{.}, which is the location
+counter. If you do not specify the address of an output section in some
+other way (other ways are described later), the address is set from the
+current value of the location counter. The location counter is then
+incremented by the size of the output section. At the start of the
+@samp{SECTIONS} command, the location counter has the value @samp{0}.
+
+The second line defines an output section, @samp{.text}. The colon is
+required syntax which may be ignored for now. Within the curly braces
+after the output section name, you list the names of the input sections
+which should be placed into this output section. The @samp{*} is a
+wildcard which matches any file name. The expression @samp{*(.text)}
+means all @samp{.text} input sections in all input files.
+
+Since the location counter is @samp{0x10000} when the output section
+@samp{.text} is defined, the linker will set the address of the
+@samp{.text} section in the output file to be @samp{0x10000}.
+
+The remaining lines define the @samp{.data} and @samp{.bss} sections in
+the output file. The linker will place the @samp{.data} output section
+at address @samp{0x8000000}. After the linker places the @samp{.data}
+output section, the value of the location counter will be
+@samp{0x8000000} plus the size of the @samp{.data} output section. The
+effect is that the linker will place the @samp{.bss} output section
+immediately after the @samp{.data} output section in memory
+
+The linker will ensure that each output section has the required
+alignment, by increasing the location counter if necessary. In this
+example, the specified addresses for the @samp{.text} and @samp{.data}
+sections will probably satisfy any alignment constraints, but the linker
+may have to create a small gap between the @samp{.data} and @samp{.bss}
+sections.
+
+That's it! That's a simple and complete linker script.
+
+@node Simple Commands
+@section Simple Linker Script Commands
+@cindex linker script simple commands
+In this section we describe the simple linker script commands.
@menu
-* Scripts:: Linker Scripts
-* Expressions:: Expressions
-* MEMORY:: MEMORY Command
-* SECTIONS:: SECTIONS Command
-* PHDRS:: PHDRS Command
-* Entry Point:: The Entry Point
-* Version Script:: Version Script
-* Option Commands:: Option Commands
+* Entry Point:: Setting the entry point
+* File Commands:: Commands dealing with files
+@ifclear SingleFormat
+* Format Commands:: Commands dealing with object file formats
+@end ifclear
+
+* Miscellaneous Commands:: Other linker script commands
@end menu
-@node Scripts
-@section Linker Scripts
-The @code{ld} command language is a collection of statements; some are
-simple keywords setting a particular option, some are used to select and
-group input files or name output files; and two statement
-types have a fundamental and pervasive impact on the linking process.
-
-@cindex fundamental script commands
-@cindex commands, fundamental
-@cindex output file layout
-@cindex layout of output file
-The most fundamental command of the @code{ld} command language is the
-@code{SECTIONS} command (@pxref{SECTIONS}). Every meaningful command
-script must have a @code{SECTIONS} command: it specifies a
-``picture'' of the output file's layout, in varying degrees of detail.
-No other command is required in all cases.
-
-The @code{MEMORY} command complements @code{SECTIONS} by describing the
-available memory in the target architecture. This command is optional;
-if you don't use a @code{MEMORY} command, @code{ld} assumes sufficient
-memory is available in a contiguous block for all output.
-@xref{MEMORY}.
-
-@cindex comments
-You may include comments in linker scripts just as in C: delimited
-by @samp{/*} and @samp{*/}. As in C, comments are syntactically
-equivalent to whitespace.
+@node Entry Point
+@subsection Setting the entry point
+@kindex ENTRY(@var{symbol})
+@cindex start of execution
+@cindex first instruction
+@cindex entry point
+The first instruction to execute in a program is called the @dfn{entry
+point}. You can use the @code{ENTRY} linker script command to set the
+entry point. The argument is a symbol name:
+@smallexample
+ENTRY(@var{symbol})
+@end smallexample
-@node Expressions
-@section Expressions
-@cindex expression syntax
-@cindex arithmetic
-Many useful commands involve arithmetic expressions. The syntax for
-expressions in the command language is identical to that of C
-expressions, with the following features:
+There are several ways to set the entry point. The linker will set the
+entry point by trying each of the following methods in order, and
+stopping when one of them succeeds:
@itemize @bullet
@item
-All expressions evaluated as integers and
-are of ``long'' or ``unsigned long'' type.
+the @samp{-e} @var{entry} command-line option;
@item
-All constants are integers.
+the @code{ENTRY(@var{symbol})} command in a linker script;
@item
-All of the C arithmetic operators are provided.
+the value of the symbol @code{start}, if defined;
@item
-You may reference, define, and create global variables.
+the address of the first byte of the @samp{.text} section, if present;
@item
-You may call special purpose built-in functions.
+The address @code{0}.
@end itemize
-@menu
-* Integers:: Integers
-* Symbols:: Symbol Names
-* Location Counter:: The Location Counter
-* Operators:: Operators
-* Evaluation:: Evaluation
-* Assignment:: Assignment: Defining Symbols
-* Arithmetic Functions:: Built-In Functions
-* Semicolons:: Semicolon Usage
-@end menu
+@node File Commands
+@subsection Commands dealing with files
+@cindex linker script file commands
+Several linker script commands deal with files.
-@node Integers
-@subsection Integers
-@cindex integer notation
-@cindex octal integers
-An octal integer is @samp{0} followed by zero or more of the octal
-digits (@samp{01234567}).
-@smallexample
-_as_octal = 0157255;
-@end smallexample
+@table @code
+@item INCLUDE @var{filename}
+@kindex INCLUDE @var{filename}
+@cindex including a linker script
+Include the linker script @var{filename} at this point. The file will
+be searched for in the current directory, and in any directory specified
+with the @code{-L} option. You can nest calls to @code{INCLUDE} up to
+10 levels deep.
-@cindex decimal integers
-A decimal integer starts with a non-zero digit followed by zero or
-more digits (@samp{0123456789}).
-@smallexample
-_as_decimal = 57005;
-@end smallexample
+@item INPUT(@var{file}, @var{file}, @dots{})
+@itemx INPUT(@var{file} @var{file} @dots{})
+@kindex INPUT(@var{files})
+@cindex input files in linker scripts
+@cindex input object files in linker scripts
+@cindex linker script input object files
+The @code{INPUT} command directs the linker to include the named files
+in the link, as though they were named on the command line.
+
+For example, if you always want to include @file{subr.o} any time you do
+a link, but you can't be bothered to put it on every link command line,
+then you can put @samp{INPUT (subr.o)} in your linker script.
+
+In fact, if you like, you can list all of your input files in the linker
+script, and then invoke the linker with nothing but a @samp{-T} option.
+
+The linker will first try to open the file in the current directory. If
+it is not found, the linker will search through the archive library
+search path. See the description of @samp{-L} in @ref{Options,,Command
+Line Options}.
+
+If you use @samp{INPUT (-l@var{file})}, @code{ld} will transform the
+name to @code{lib@var{file}.a}, as with the command line argument
+@samp{-l}.
+
+When you use the @code{INPUT} command in an implicit linker script, the
+files will be included in the link at the point at which the linker
+script file is included. This can affect archive searching.
+
+@item GROUP(@var{file}, @var{file}, @dots{})
+@itemx GROUP(@var{file} @var{file} @dots{})
+@kindex GROUP(@var{files})
+@cindex grouping input files
+The @code{GROUP} command is like @code{INPUT}, except that the named
+files should all be archives, and they are searched repeatedly until no
+new undefined references are created. See the description of @samp{-(}
+in @ref{Options,,Command Line Options}.
+
+@item OUTPUT(@var{filename})
+@kindex OUTPUT(@var{filename})
+@cindex output file name in linker scripot
+The @code{OUTPUT} command names the output file. Using
+@code{OUTPUT(@var{filename})} in the linker script is exactly like using
+@samp{-o @var{filename}} on the command line (@pxref{Options,,Command
+Line Options}). If both are used, the command line option takes
+precedence.
+
+You can use the @code{OUTPUT} command to define a default name for the
+output file other than the usual default of @file{a.out}.
+
+@item SEARCH_DIR(@var{path})
+@kindex SEARCH_DIR(@var{path})
+@cindex library search path in linker script
+@cindex archive search path in linker script
+@cindex search path in linker script
+The @code{SEARCH_DIR} command adds @var{path} to the list of paths where
+@code{ld} looks for archive libraries. Using
+@code{SEARCH_DIR(@var{path})} is exactly like using @samp{-L @var{path}}
+on the command line (@pxref{Options,,Command Line Options}). If both
+are used, then the linker will search both paths. Paths specified using
+the command line option are searched first.
+
+@item STARTUP(@var{filename})
+@kindex STARTUP(@var{filename})
+@cindex first input file
+The @code{STARTUP} command is just like the @code{INPUT} command, except
+that @var{filename} will become the first input file to be linked, as
+though it were specified first on the command line. This may be useful
+when using a system in which the entry point is always the start of the
+first file.
+@end table
-@cindex hexadecimal integers
-@kindex 0x
-A hexadecimal integer is @samp{0x} or @samp{0X} followed by one or
-more hexadecimal digits chosen from @samp{0123456789abcdefABCDEF}.
-@smallexample
-_as_hex = 0xdead;
-@end smallexample
+@ifclear SingleFormat
+@node Format Commands
+@subsection Commands dealing with object file formats
+A couple of linker script commands deal with object file formats.
-@cindex negative integers
-To write a negative integer, use
-the prefix operator @samp{-} (@pxref{Operators}).
+@table @code
+@item OUTPUT_FORMAT(@var{bfdname})
+@itemx OUTPUT_FORMAT(@var{default}, @var{big}, @var{little})
+@kindex OUTPUT_FORMAT(@var{bfdname})
+@cindex output file format in linker script
+The @code{OUTPUT_FORMAT} command names the BFD format to use for the
+output file (@pxref{BFD}). Using @code{OUTPUT_FORMAT(@var{bfdname})} is
+exactly like using @samp{-oformat @var{bfdname}} on the command line
+(@pxref{Options,,Command Line Options}). If both are used, the command
+line option takes precedence.
+
+You can use @code{OUTPUT_FORMAT} with three arguments to use different
+formats based on the @samp{-EB} and @samp{-EL} command line options.
+This permits the linker script to set the output format based on the
+desired endianness.
+
+If neither @samp{-EB} nor @samp{-EL} are used, then the output format
+will be the first argument, @var{default}. If @samp{-EB} is used, the
+output format will be the second argument, @var{big}. If @samp{-EL} is
+used, the output format will be the third argument, @var{little}.
+
+For example, the default linker script for the MIPS ELF target uses this
+command:
@smallexample
-_as_neg = -57005;
+OUTPUT_FORMAT(elf32-bigmips, elf32-bigmips, elf32-littlemips)
@end smallexample
+This says that the default format for the output file is
+@samp{elf32-bigmips}, but if the user uses the @samp{-EL} command line
+option, the output file will be created in the @samp{elf32-littlemips}
+format.
+
+@item TARGET(@var{bfdname})
+@kindex TARGET(@var{bfdname})
+@cindex input file format in linker script
+The @code{TARGET} command names the BFD format to use when reading input
+files. It affects subsequent @code{INPUT} and @code{GROUP} commands.
+This command is like using @samp{-b @var{bfdname}} on the command line
+(@pxref{Options,,Command Line Options}). If the @code{TARGET} command
+is used but @code{OUTPUT_FORMAT} is not, then the last @code{TARGET}
+command is also used to set the format for the output file. @xref{BFD}.
+@end table
+@end ifclear
-@cindex scaled integers
-@cindex K and M integer suffixes
-@cindex M and K integer suffixes
-@cindex suffixes for integers
-@cindex integer suffixes
-Additionally the suffixes @code{K} and @code{M} may be used to scale a
-constant by
-@c TEXI2ROFF-KILL
-@ifinfo
-@c END TEXI2ROFF-KILL
-@code{1024} or @code{1024*1024}
-@c TEXI2ROFF-KILL
-@end ifinfo
-@tex
-${\rm 1024}$ or ${\rm 1024}^2$
-@end tex
-@c END TEXI2ROFF-KILL
-respectively. For example, the following all refer to the same quantity:
-
-@smallexample
- _fourk_1 = 4K;
- _fourk_2 = 4096;
- _fourk_3 = 0x1000;
-@end smallexample
+@node Miscellaneous Commands
+@subsection Other linker script commands
+There are a few other linker scripts commands.
-@node Symbols
-@subsection Symbol Names
-@cindex symbol names
-@cindex names
-@cindex quoted symbol names
-@kindex "
-Unless quoted, symbol names start with a letter, underscore, or point
-and may include any letters, underscores, digits, points,
-and hyphens. Unquoted symbol names must not conflict with any
-keywords. You can specify a symbol which contains odd characters or has
-the same name as a keyword, by surrounding the symbol name in double quotes:
-@smallexample
- "SECTION" = 9;
- "with a space" = "also with a space" + 10;
-@end smallexample
+@table @code
+@item ASSERT(@var{exp}, @var{message})
+@kindex ASSERT
+@cindex assertion in linker script
+Ensure that @var{exp} is non-zero. If it is zero, then exit the linker
+with an error code, and print @var{message}.
+
+@item EXTERN(@var{symbol} @var{symbol} @dots{})
+@kindex EXTERN
+@cindex undefined symbol in linker script
+Force @var{symbol} to be entered in the output file as an undefined
+symbol. Doing this may, for example, trigger linking of additional
+modules from standard libraries. You may list several @var{symbol}s for
+each @code{EXTERN}, and you may use @code{EXTERN} multiple times. This
+command has the same effect as the @samp{-u} command-line option.
-Since symbols can contain many non-alphabetic characters, it is safest
-to delimit symbols with spaces. For example, @samp{A-B} is one symbol,
-whereas @samp{A - B} is an expression involving subtraction.
+@item FORCE_COMMON_ALLOCATION
+@kindex FORCE_COMMON_ALLOCATION
+@cindex common allocation in linker script
+This command has the same effect as the @samp{-d} command-line option:
+to make @code{ld} assign space to common symbols even if a relocatable
+output file is specified (@samp{-r}).
-@node Location Counter
-@subsection The Location Counter
-@kindex .
-@cindex dot
-@cindex location counter
-@cindex current output location
-The special linker variable @dfn{dot} @samp{.} always contains the
-current output location counter. Since the @code{.} always refers to
-a location in an output section, it must always appear in an
-expression within a @code{SECTIONS} command. The @code{.} symbol
-may appear anywhere that an ordinary symbol is allowed in an
-expression, but its assignments have a side effect. Assigning a value
-to the @code{.} symbol will cause the location counter to be moved.
-@cindex holes
-This may be used to create holes in the output section. The location
-counter may never be moved backwards.
-@smallexample
-SECTIONS
-@{
- output :
- @{
- file1(.text)
- . = . + 1000;
- file2(.text)
- . += 1000;
- file3(.text)
- @} = 0x1234;
-@}
-@end smallexample
-@noindent
-In the previous example, @code{file1} is located at the beginning of the
-output section, then there is a 1000 byte gap. Then @code{file2}
-appears, also with a 1000 byte gap following before @code{file3} is
-loaded. The notation @samp{= 0x1234} specifies what data to write in
-the gaps (@pxref{Section Options}).
+@item NOCROSSREFS(@var{section} @var{section} @dots{})
+@kindex NOCROSSREFS(@var{sections})
+@cindex cross references
+This command may be used to tell @code{ld} to issue an error about any
+references among certain output sections.
-@iftex
-@vfill
-@end iftex
+In certain types of programs, particularly on embedded systems when
+using overlays, when one section is loaded into memory, another section
+will not be. Any direct references between the two sections would be
+errors. For example, it would be an error if code in one section called
+a function defined in the other section.
-@need 2000
-@node Operators
-@subsection Operators
-@cindex Operators for arithmetic
-@cindex arithmetic operators
-@cindex precedence in expressions
-The linker recognizes the standard C set of arithmetic operators, with
-the standard bindings and precedence levels:
-@c TEXI2ROFF-KILL
-@ifinfo
-@c END TEXI2ROFF-KILL
-@smallexample
-precedence associativity Operators Notes
-(highest)
-1 left ! - ~ (1)
-2 left * / %
-3 left + -
-4 left >> <<
-5 left == != > < <= >=
-6 left &
-7 left |
-8 left &&
-9 left ||
-10 right ? :
-11 right &= += -= *= /= (2)
-(lowest)
-@end smallexample
-Notes:
-(1) Prefix operators
-(2) @xref{Assignment}.
-@c TEXI2ROFF-KILL
-@end ifinfo
-@tex
-\vskip \baselineskip
-%"lispnarrowing" is the extra indent used generally for smallexample
-\hskip\lispnarrowing\vbox{\offinterlineskip
-\hrule
-\halign
-{\vrule#&\strut\hfil\ #\ \hfil&\vrule#&\strut\hfil\ #\ \hfil&\vrule#&\strut\hfil\ {\tt #}\ \hfil&\vrule#\cr
-height2pt&\omit&&\omit&&\omit&\cr
-&Precedence&& Associativity &&{\rm Operators}&\cr
-height2pt&\omit&&\omit&&\omit&\cr
-\noalign{\hrule}
-height2pt&\omit&&\omit&&\omit&\cr
-&highest&&&&&\cr
-% '176 is tilde, '~' in tt font
-&1&&left&&\qquad- \char'176\ !\qquad\dag&\cr
-&2&&left&&* / \%&\cr
-&3&&left&&+ -&\cr
-&4&&left&&>> <<&\cr
-&5&&left&&== != > < <= >=&\cr
-&6&&left&&\&&\cr
-&7&&left&&|&\cr
-&8&&left&&{\&\&}&\cr
-&9&&left&&||&\cr
-&10&&right&&? :&\cr
-&11&&right&&\qquad\&= += -= *= /=\qquad\ddag&\cr
-&lowest&&&&&\cr
-height2pt&\omit&&\omit&&\omit&\cr}
-\hrule}
-@end tex
-@iftex
-{
-@obeylines@parskip=0pt@parindent=0pt
-@dag@quad Prefix operators.
-@ddag@quad @xref{Assignment}.
-}
-@end iftex
-@c END TEXI2ROFF-KILL
+The @code{NOCROSSREFS} command takes a list of output section names. If
+@code{ld} detects any cross references between the sections, it reports
+an error and returns a non-zero exit status. Note that the
+@code{NOCROSSREFS} command uses output section names, not input section
+names.
-@node Evaluation
-@subsection Evaluation
+@ifclear SingleFormat
+@item OUTPUT_ARCH(@var{bfdarch})
+@kindex OUTPUT_ARCH(@var{bfdarch})
+@cindex machine architecture
+@cindex architecture
+Specify a particular output machine architecture. The argument is one
+of the names used by the BFD library (@pxref{BFD}). You can see the
+architecture of an object file by using the @code{objdump} program with
+the @samp{-f} option.
+@end ifclear
+@end table
-@cindex lazy evaluation
-@cindex expression evaluation order
-The linker uses ``lazy evaluation'' for expressions; it only calculates
-an expression when absolutely necessary. The linker needs the value of
-the start address, and the lengths of memory regions, in order to do any
-linking at all; these values are computed as soon as possible when the
-linker reads in the command file. However, other values (such as symbol
-values) are not known or needed until after storage allocation. Such
-values are evaluated later, when other information (such as the sizes of
-output sections) is available for use in the symbol assignment
-expression.
-
-@node Assignment
-@subsection Assignment: Defining Symbols
+@node Assignments
+@section Assigning Values to Symbols
@cindex assignment in scripts
@cindex symbol definition, scripts
@cindex variables, defining
-You may create global symbols, and assign values (addresses) to global
-symbols, using any of the C assignment operators:
+You may assign a value to a symbol in a linker script. This will define
+the symbol as a global symbol.
+
+@menu
+* Simple Assignments:: Simple Assignments
+* PROVIDE:: PROVIDE
+@end menu
+
+@node Simple Assignments
+@subsection Simple Assignments
+
+You may assign to a symbol using any of the C assignment operators:
@table @code
-@item @var{symbol} = @var{expression} ;
-@itemx @var{symbol} &= @var{expression} ;
+@item @var{symbol} = @var{expression} ;
@itemx @var{symbol} += @var{expression} ;
@itemx @var{symbol} -= @var{expression} ;
@itemx @var{symbol} *= @var{expression} ;
@itemx @var{symbol} /= @var{expression} ;
+@itemx @var{symbol} <<= @var{expression} ;
+@itemx @var{symbol} >>= @var{expression} ;
+@itemx @var{symbol} &= @var{expression} ;
+@itemx @var{symbol} |= @var{expression} ;
@end table
-Two things distinguish assignment from other operators in @code{ld}
-expressions.
-@itemize @bullet
-@item
-Assignment may only be used at the root of an expression;
-@samp{a=b+3;} is allowed, but @samp{a+b=3;} is an error.
+The first case will define @var{symbol} to the value of
+@var{expression}. In the other cases, @var{symbol} must already be
+defined, and the value will be adjusted accordingly.
-@kindex ;
-@cindex semicolon
-@item
-You must place a trailing semicolon (``@key{;}'') at the end of an
-assignment statement.
-@end itemize
+The special symbol name @samp{.} indicates the location counter. You
+may only use this within a @code{SECTIONS} command.
-Assignment statements may appear:
-@itemize @bullet
-@item
-as commands in their own right in an @code{ld} script; or
-@item
-as independent statements within a @code{SECTIONS} command; or
-@item
-as part of the contents of a section definition in a
-@code{SECTIONS} command.
-@end itemize
+The semicolon after @var{expression} is required.
-The first two cases are equivalent in effect---both define a symbol with
-an absolute address. The last case defines a symbol whose address is
-relative to a particular section (@pxref{SECTIONS}).
+Expressions are defined below; see @ref{Expressions}.
-@cindex absolute and relocatable symbols
-@cindex relocatable and absolute symbols
-@cindex symbols, relocatable and absolute
-When a linker expression is evaluated and assigned to a variable, it is
-given either an absolute or a relocatable type. An absolute expression
-type is one in which the symbol contains the value that it will have in
-the output file; a relocatable expression type is one in which the
-value is expressed as a fixed offset from the base of a section.
-
-The type of the expression is controlled by its position in the script
-file. A symbol assigned within a section definition is created relative
-to the base of the section; a symbol assigned in any other place is
-created as an absolute symbol. Since a symbol created within a
-section definition is relative to the base of the section, it
-will remain relocatable if relocatable output is requested. A symbol
-may be created with an absolute value even when assigned to within a
-section definition by using the absolute assignment function
-@code{ABSOLUTE}. For example, to create an absolute symbol whose address
-is the last byte of an output section named @code{.data}:
-@smallexample
-SECTIONS@{ @dots{}
- .data :
- @{
- *(.data)
- _edata = ABSOLUTE(.) ;
- @}
-@dots{} @}
-@end smallexample
+You may write symbol assignments as commands in their own right, or as
+statements within a @code{SECTIONS} command, or as part of an output
+section description in a @code{SECTIONS} command.
+
+The section of the symbol will be set from the section of the
+expression; for more information, see @ref{Expression Section}.
+
+Here is an example showing the three different places that symbol
+assignments may be used:
-The linker tries to put off the evaluation of an assignment until all
-the terms in the source expression are known (@pxref{Evaluation}). For
-instance, the sizes of sections cannot be known until after allocation,
-so assignments dependent upon these are not performed until after
-allocation. Some expressions, such as those depending upon the location
-counter @dfn{dot}, @samp{.} must be evaluated during allocation. If the
-result of an expression is required, but the value is not available,
-then an error results. For example, a script like the following
@smallexample
-SECTIONS @{ @dots{}
- text 9+this_isnt_constant :
- @{ @dots{}
+floating_point = 0;
+SECTIONS
+@{
+ .text :
+ @{
+ *(.text)
+ _etext = .;
@}
-@dots{} @}
+ _bdata = (. + 3) & ~ 4;
+ .data : @{ *(.data) @}
+@}
@end smallexample
-@kindex Non constant expression
@noindent
-will cause the error message ``@code{Non constant expression for initial
-address}''.
-
-@cindex provide
+In this example, the symbol @samp{floating_point} will be defined as
+zero. The symbol @samp{_etext} will be defined as the address following
+the last @samp{.text} input section. The symbol @samp{_bdata} will be
+defined as the address following the @samp{.text} output section aligned
+upward to a 4 byte boundary.
+
+@node PROVIDE
+@subsection PROVIDE
+@cindex PROVIDE
In some cases, it is desirable for a linker script to define a symbol
-only if it is referenced, and only if it is not defined by any object
-included in the link. For example, traditional linkers defined the
-symbol @samp{etext}. However, ANSI C requires that the user be able to
-use @samp{etext} as a function name without encountering an error.
-The @code{PROVIDE} keyword may be used to define a symbol, such as
+only if it is referenced and is not defined by any object included in
+the link. For example, traditional linkers defined the symbol
+@samp{etext}. However, ANSI C requires that the user be able to use
+@samp{etext} as a function name without encountering an error. The
+@code{PROVIDE} keyword may be used to define a symbol, such as
@samp{etext}, only if it is referenced but not defined. The syntax is
@code{PROVIDE(@var{symbol} = @var{expression})}.
-@node Arithmetic Functions
-@subsection Arithmetic Functions
-@cindex functions in expression language
-The command language includes a number of built-in
-functions for use in link script expressions.
-@table @code
-@kindex ABSOLUTE(@var{exp})
-@cindex expression, absolute
-@item ABSOLUTE(@var{exp})
-Return the absolute (non-relocatable, as opposed to non-negative) value
-of the expression @var{exp}. Primarily useful to assign an absolute
-value to a symbol within a section definition, where symbol values are
-normally section-relative.
-
-@kindex ADDR(@var{section})
-@cindex section address
-@item ADDR(@var{section})
-Return the absolute address of the named @var{section}. Your script must
-previously have defined the location of that section. In the following
-example, @code{symbol_1} and @code{symbol_2} are assigned identical
-values:
+Here is an example of using @code{PROVIDE} to define @samp{etext}:
@smallexample
-@group
-SECTIONS@{ @dots{}
- .output1 :
- @{
- start_of_output_1 = ABSOLUTE(.);
- @dots{}
- @}
- .output :
+SECTIONS
+@{
+ .text :
@{
- symbol_1 = ADDR(.output1);
- symbol_2 = start_of_output_1;
+ *(.text)
+ _etext = .;
+ PROVIDE(etext = .);
@}
-@dots{} @}
-@end group
-@end smallexample
-
-@kindex LOADADDR(@var{section})
-@cindex section load address
-@item LOADADDR(@var{section})
-Return the absolute load address of the named @var{section}. This is
-normally the same as @code{ADDR}, but it may be different if the
-@code{AT} keyword is used in the section definition (@pxref{Section
-Options}).
-
-@kindex ALIGN(@var{exp})
-@cindex rounding up location counter
-@item ALIGN(@var{exp})
-Return the result of the current location counter (@code{.}) aligned to
-the next @var{exp} boundary. @var{exp} must be an expression whose
-value is a power of two. This is equivalent to
-@smallexample
-(. + @var{exp} - 1) & ~(@var{exp} - 1)
-@end smallexample
-
-@code{ALIGN} doesn't change the value of the location counter---it just
-does arithmetic on it. As an example, to align the output @code{.data}
-section to the next @code{0x2000} byte boundary after the preceding
-section and to set a variable within the section to the next
-@code{0x8000} boundary after the input sections:
-@smallexample
-@group
-SECTIONS@{ @dots{}
- .data ALIGN(0x2000): @{
- *(.data)
- variable = ALIGN(0x8000);
- @}
-@dots{} @}
-@end group
+@}
@end smallexample
-@noindent
-The first use of @code{ALIGN} in this example specifies the location of
-a section because it is used as the optional @var{start} attribute of a
-section definition (@pxref{Section Options}). The second use simply
-defines the value of a variable.
-The built-in @code{NEXT} is closely related to @code{ALIGN}.
-
-@kindex DEFINED(@var{symbol})
-@cindex symbol defaults
-@item DEFINED(@var{symbol})
-Return 1 if @var{symbol} is in the linker global symbol table and is
-defined, otherwise return 0. You can use this function to provide default
-values for symbols. For example, the following command-file fragment shows how
-to set a global symbol @code{begin} to the first location in the
-@code{.text} section---but if a symbol called @code{begin} already
-existed, its value is preserved:
+In this example, if the program defines @samp{_etext} (with a leading
+underscore), the linker will give a multiple definition error. If, on
+the other hand, the program defines @samp{etext} (with no leading
+underscore), the linker will silently use the definition in the program.
+If the program references @samp{etext} but does not define it, the
+linker will use the definition in the linker script.
-@smallexample
-@group
-SECTIONS@{ @dots{}
- .text : @{
- begin = DEFINED(begin) ? begin : . ;
- @dots{}
- @}
-@dots{} @}
-@end group
-@end smallexample
-
-@kindex NEXT(@var{exp})
-@cindex unallocated address, next
-@item NEXT(@var{exp})
-Return the next unallocated address that is a multiple of @var{exp}.
-This function is closely related to @code{ALIGN(@var{exp})}; unless you
-use the @code{MEMORY} command to define discontinuous memory for the
-output file, the two functions are equivalent.
+@node SECTIONS
+@section SECTIONS command
+@kindex SECTIONS
+The @code{SECTIONS} command tells the linker how to map input sections
+into output sections, and how to place the output sections in memory.
-@kindex SIZEOF(@var{section})
-@cindex section size
-@item SIZEOF(@var{section})
-Return the size in bytes of the named @var{section}, if that section has
-been allocated. In the following example, @code{symbol_1} and
-@code{symbol_2} are assigned identical values:
-@c What does it return if the section hasn't been allocated? 0?
+The format of the @code{SECTIONS} command is:
@smallexample
-@group
-SECTIONS@{ @dots{}
- .output @{
- .start = . ;
- @dots{}
- .end = . ;
- @}
- symbol_1 = .end - .start ;
- symbol_2 = SIZEOF(.output);
-@dots{} @}
-@end group
+SECTIONS
+@{
+ @var{sections-command}
+ @var{sections-command}
+ @dots{}
+@}
@end smallexample
-@kindex SIZEOF_HEADERS
-@cindex header size
-@kindex sizeof_headers
-@item SIZEOF_HEADERS
-@itemx sizeof_headers
-Return the size in bytes of the output file's headers. You can use this number
-as the start address of the first section, if you choose, to facilitate
-paging.
-
-@kindex MAX
-@item MAX(@var{exp1}, @var{exp2})
-Returns the maximum of @var{exp1} and @var{exp2}.
+Each @var{sections-command} may of be one of the following:
-@kindex MIN
-@item MIN(@var{exp1}, @var{exp2})
-Returns the minimum of @var{exp1} and @var{exp2}.
-
-@end table
+@itemize @bullet
+@item
+an @code{ENTRY} command (@pxref{Entry Point,,Entry command})
+@item
+a symbol assignment (@pxref{Assignments})
+@item
+an output section description
+@item
+an overlay description
+@end itemize
-@node Semicolons
-@subsection Semicolons
+The @code{ENTRY} command and symbol assignments are permitted inside the
+@code{SECTIONS} command for convenience in using the location counter in
+those commands. This can also make the linker script easier to
+understand because you can use those commands at meaningful points in
+the layout of the output file.
-Semicolons (``@key{;}'') are required in the following places. In all
-other places they can appear for aesthetic reasons but are otherwise ignored.
+Output section descriptions and overlay descriptions are described
+below.
-@table @code
-@item Assignment
-Semicolons must appear at the end of assignment expressions.
-@xref{Assignment}
+If you do not use a @code{SECTIONS} command in your linker script, the
+linker will place each input section into an identically named output
+section in the order that the sections are first encountered in the
+input files. If all input sections are present in the first file, for
+example, the order of sections in the output file will match the order
+in the first input file. The first section will be at address zero.
-@item PHDRS
-Semicolons must appear at the end of a @code{PHDRS} statement.
-@xref{PHDRS}
-@end table
+@menu
+* Output Section Description:: Output section description
+* Output Section Name:: Output section name
+* Output Section Address:: Output section address
+* Input Section:: Input section description
+* Output Section Data:: Output section data
+* Output Section Keywords:: Output section keywords
+* Output Section Discarding:: Output section discarding
+* Output Section Attributes:: Output section attributes
+* Overlay Description:: Overlay description
+@end menu
-@node MEMORY
-@section Memory Layout
-@kindex MEMORY
-@cindex regions of memory
-@cindex discontinuous memory
-@cindex allocating memory
-The linker's default configuration permits allocation of all available memory.
-You can override this configuration by using the @code{MEMORY} command. The
-@code{MEMORY} command describes the location and size of blocks of
-memory in the target. By using it carefully, you can describe which
-memory regions may be used by the linker, and which memory regions it
-must avoid. The linker does not shuffle sections to fit into the
-available regions, but does move the requested sections into the correct
-regions and issue errors when the regions become too full.
-
-A command file may contain at most one use of the @code{MEMORY}
-command; however, you can define as many blocks of memory within it as
-you wish. The syntax is:
-
+@node Output Section Description
+@subsection Output section description
+The full description of an output section looks like this:
@smallexample
-@group
-MEMORY
+@group
+@var{section} [@var{address}] [(@var{type})] : [AT(@var{lma})]
@{
- @var{name} (@var{attr}) : ORIGIN = @var{origin}, LENGTH = @var{len}
+ @var{output-section-command}
+ @var{output-section-command}
@dots{}
- @}
+ @} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
@end group
@end smallexample
-@table @code
-@cindex naming memory regions
-@item @var{name}
-is a name used internally by the linker to refer to the region. Any
-symbol name may be used. The region names are stored in a separate
-name space, and will not conflict with symbols, file names or section
-names. Use distinct names to specify multiple regions.
-
-@cindex memory region attributes
-@item (@var{attr})
-is an optional list of attributes that specify whether to use a
-particular memory to place sections that are not listed in the linker
-script. Valid attribute lists must be made up of the characters
-``@code{ALIRWX}'' that match section attributes. If you omit the
-attribute list, you may omit the parentheses around it as well. The
-attributes currently supported are:
-
-@table @samp
-@item @code{Letter}
-@code{Section Attribute}
-
-@item @code{R}
-Read-only sections.
-
-@item @code{W}
-Read/write sections.
-@item @code{X}
-Sections containing executable code.
+Most output sections do not use most of the optional section attributes.
-@item @code{A}
-Allocated sections.
+The whitespace around @var{section} is required, so that the section
+name is unambiguous. The colon and the curly braces are also required.
+The line breaks and other white space are optional.
-@item @code{I}
-Initialized sections.
+Each @var{output-section-command} may be one of the following:
-@item @code{L}
-Same as @code{I}.
-
-@item @code{!}
-Invert the sense of any of the following attributes.
-@end table
-
-@kindex ORIGIN =
-@kindex o =
-@kindex org =
-@item @var{origin}
-is the start address of the region in physical memory. It is
-an expression that must evaluate to a constant before
-memory allocation is performed. The keyword @code{ORIGIN} may be
-abbreviated to @code{org} or @code{o} (but not, for example, @samp{ORG}).
-
-@kindex LENGTH =
-@kindex len =
-@kindex l =
-@item @var{len}
-is the size in bytes of the region (an expression).
-The keyword @code{LENGTH} may be abbreviated to @code{len} or @code{l}.
-@end table
-
-For example, to specify that memory has two regions available for
-allocation---one starting at 0 for 256 kilobytes, and the other starting
-at @code{0x40000000} for four megabytes. The @code{rom} memory region
-will get all sections without an explicit memory register that are
-either read-only or contain code, while the @code{ram} memory region
-will get the sections.
+@itemize @bullet
+@item
+a symbol assignment (@pxref{Assignments})
+@item
+an input section description (@pxref{Input Section})
+@item
+data values to include directly (@pxref{Output Section Data})
+@item
+a special output section keyword (@pxref{Output Section Keywords})
+@end itemize
+@node Output Section Name
+@subsection Output section name
+@cindex name, section
+@cindex section name
+The name of the output section is @var{section}. @var{section} must
+meet the constraints of your output format. In formats which only
+support a limited number of sections, such as @code{a.out}, the name
+must be one of the names supported by the format (@code{a.out}, for
+example, allows only @samp{.text}, @samp{.data} or @samp{.bss}). If the
+output format supports any number of sections, but with numbers and not
+names (as is the case for Oasys), the name should be supplied as a
+quoted numeric string. A section name may consist of any sequence of
+characters, but a name which contains any unusual characters such as
+commas must be quoted.
+
+The output section name @samp{/DISCARD/} is special; @ref{Output Section
+Discarding}.
+
+@node Output Section Address
+@subsection Output section address
+@cindex address, section
+@cindex section address
+The @var{address} is an expression for the VMA (the virtual memory
+address) of the output section. If you do not provide @var{address},
+the linker will set it based on @var{region} if present, or otherwise
+based on the current value of the location counter.
+
+If you provide @var{address}, the address of the output section will be
+set to precisely that. If you provide neither @var{address} nor
+@var{region}, then the address of the output section will be set to the
+current value of the location counter aligned to the alignment
+requirements of the output section. The alignment requirement of the
+output section is the strictest alignment of any input section contained
+within the output section.
+
+For example,
@smallexample
-@group
-MEMORY
- @{
- rom (rx) : ORIGIN = 0, LENGTH = 256K
- ram (!rx) : org = 0x40000000, l = 4M
- @}
-@end group
+.text . : @{ *(.text) @}
@end smallexample
+@noindent
+and
+@smallexample
+.text : @{ *(.text) @}
+@end smallexample
+@noindent
+are subtly different. The first will set the address of the
+@samp{.text} output section to the current value of the location
+counter. The second will set it to the current value of the location
+counter aligned to the strictest alignment of a @samp{.text} input
+section.
+
+The @var{address} may be an arbitrary expression; @ref{Expressions}.
+For example, if you want to align the section on a 0x10 byte boundary,
+so that the lowest four bits of the section address are zero, you could
+do something like this:
+@smallexample
+.text ALIGN(0x10) : @{ *(.text) @}
+@end smallexample
+@noindent
+This works because @code{ALIGN} returns the current location counter
+aligned upward to the specified value.
-Once you have defined a region of memory named @var{mem}, you can direct
-specific output sections there by using a command ending in
-@samp{>@var{mem}} within the @code{SECTIONS} command (@pxref{Section
-Options}). If the combined output sections directed to a region are too
-big for the region, the linker will issue an error message.
-
-@node SECTIONS
-@section Specifying Output Sections
-
-@kindex SECTIONS
-The @code{SECTIONS} command controls exactly where input sections are
-placed into output sections, their order in the output file, and to
-which output sections they are allocated.
-
-You may use at most one @code{SECTIONS} command in a script file,
-but you can have as many statements within it as you wish. Statements
-within the @code{SECTIONS} command can do one of three things:
-
-@itemize @bullet
-@item
-define the entry point;
-
-@item
-assign a value to a symbol;
+Specifying @var{address} for a section will change the value of the
+location counter.
-@item
-describe the placement of a named output section, and which input
-sections go into it.
-@end itemize
-
-You can also use the first two operations---defining the entry point and
-defining symbols---outside the @code{SECTIONS} command: @pxref{Entry
-Point}, and @ref{Assignment}. They are permitted here as well for
-your convenience in reading the script, so that symbols and the entry
-point can be defined at meaningful points in your output-file layout.
+@node Input Section
+@subsection Input section description
+@cindex input sections
+@cindex mapping input sections to output sections
+The most common output section command is an input section description.
-If you do not use a @code{SECTIONS} command, the linker places each input
-section into an identically named output section in the order that the
-sections are first encountered in the input files. If all input sections
-are present in the first file, for example, the order of sections in the
-output file will match the order in the first input file.
+The input section description is the most basic linker script operation.
+You use output sections to tell the linker how to lay out your program
+in memory. You use input section descriptions to tell the linker how to
+map the input files into your memory layout.
@menu
-* Section Definition:: Section Definitions
-* Section Placement:: Section Placement
-* Section Data Expressions:: Section Data Expressions
-* Section Options:: Optional Section Attributes
-* Overlays:: Overlays
+* Input Section Basics:: Input section basics
+* Input Section Wildcards:: Input section wildcard patterns
+* Input Section Common:: Input section for common symbols
+* Input Section Keep:: Input section and garbage collection
+* Input Section Example:: Input section example
@end menu
-@node Section Definition
-@subsection Section Definitions
-@cindex section definition
-The most frequently used statement in the @code{SECTIONS} command is
-the @dfn{section definition}, which specifies the
-properties of an output section: its location, alignment, contents,
-fill pattern, and target memory region. Most of
-these specifications are optional; the simplest form of a section
-definition is
+@node Input Section Basics
+@subsubsection Input section basics
+@cindex input section basics
+An input section description consists of a file name optionally followed
+by a list of section names in parentheses.
+
+The file name and the section name may be wildcard patterns, which we
+describe further below (@pxref{Input Section Wildcards}).
+
+The most common input section description is to include all input
+sections with a particular name in the output section. For example, to
+include all input @samp{.text} sections, you would write:
@smallexample
-SECTIONS @{ @dots{}
- @var{secname} : @{
- @var{contents}
- @}
-@dots{} @}
+*(.text)
@end smallexample
-@cindex naming output sections
@noindent
-@var{secname} is the name of the output section, and @var{contents} a
-specification of what goes there---for example, a list of input files or
-sections of input files (@pxref{Section Placement}). The whitespace
-around @var{secname} is required, so that the section name is
-unambiguous. The other whitespace shown is optional. You do need the
-colon @samp{:} and the braces @samp{@{@}}, however.
-
-@var{secname} must meet the constraints of your output format. In
-formats which only support a limited number of sections, such as
-@code{a.out}, the name must be one of the names supported by the format
-(@code{a.out}, for example, allows only @code{.text}, @code{.data} or
-@code{.bss}). If the output format supports any number of sections, but
-with numbers and not names (as is the case for Oasys), the name should be
-supplied as a quoted numeric string. A section name may consist of any
-sequence of characters, but any name which does not conform to the standard
-@code{ld} symbol name syntax must be quoted.
-@xref{Symbols, , Symbol Names}.
-
-The special @var{secname} @samp{/DISCARD/} may be used to discard input
-sections. Any sections which are assigned to an output section named
-@samp{/DISCARD/} are not included in the final link output.
-
-The linker will not create output sections which do not have any
-contents. This is for convenience when referring to input sections that
-may or may not exist. For example,
+Here the @samp{*} is a wildcard which matches any file name. To exclude a list
+of files from matching the file name wildcard, EXCLUDE_FILE may be used to
+match all files except the ones specified in the EXCLUDE_FILE list. For
+example:
@smallexample
-.foo @{ *(.foo) @}
+(*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors))
@end smallexample
-will only create a @samp{.foo} section in the output file if there is a
-@samp{.foo} section in at least one input file.
-
-@node Section Placement
-@subsection Section Placement
-
-@cindex contents of a section
-In a section definition, you can specify the contents of an output
-section by listing particular input files, by listing particular
-input-file sections, or by a combination of the two. You can also place
-arbitrary data in the section, and define symbols relative to the
-beginning of the section.
+will cause all .ctors sections from all files except @file{crtend.o} and
+@file{otherfile.o} to be included.
-The @var{contents} of a section definition may include any of the
-following kinds of statement. You can include as many of these as you
-like in a single section definition, separated from one another by
-whitespace.
-
-@table @code
-@kindex @var{filename}
-@cindex input files, section defn
-@cindex files, including in output sections
-@item @var{filename}
-You may simply name a particular input file to be placed in the current
-output section; @emph{all} sections from that file are placed in the
-current section definition. If the file name has already been mentioned
-in another section definition, with an explicit section name list, then
-only those sections which have not yet been allocated are used.
-
-To specify a list of particular files by name:
+There are two ways to include more than one section:
@smallexample
-.data : @{ afile.o bfile.o cfile.o @}
+*(.text .rdata)
+*(.text) *(.rdata)
@end smallexample
@noindent
-The example also illustrates that multiple statements can be included in
-the contents of a section definition, since each file name is a separate
-statement.
-
-@kindex @var{filename}(@var{section})
-@cindex files and sections, section defn
-@item @var{filename}( @var{section} )
-@itemx @var{filename}( @var{section} , @var{section}, @dots{} )
-@itemx @var{filename}( @var{section} @var{section} @dots{} )
-You can name one or more sections from your input files, for insertion
-in the current output section. If you wish to specify a list of
-input-file sections inside the parentheses, separate the section names
-with whitespace.
-
-@cindex input sections to output section
-@kindex *(@var{section})
-@item * (@var{section})
-@itemx * (@var{section}, @var{section}, @dots{})
-@itemx * (@var{section} @var{section} @dots{})
-Instead of explicitly naming particular input files in a link control
-script, you can refer to @emph{all} files from the @code{ld} command
-line: use @samp{*} instead of a particular file name before the
-parenthesized input-file section list.
-
-If you have already explicitly included some files by name, @samp{*}
-refers to all @emph{remaining} files---those whose places in the output
-file have not yet been defined.
-
-For example, to copy sections @code{1} through @code{4} from an Oasys file
-into the @code{.text} section of an @code{a.out} file, and sections @code{13}
-and @code{14} into the @code{.data} section:
+The difference between these is the order in which the @samp{.text} and
+@samp{.rdata} input sections will appear in the output section. In the
+first example, they will be intermingled. In the second example, all
+@samp{.text} input sections will appear first, followed by all
+@samp{.rdata} input sections.
+
+You can specify a file name to include sections from a particular file.
+You would do this if one or more of your files contain special data that
+needs to be at a particular location in memory. For example:
@smallexample
-@group
-SECTIONS @{
- .text :@{
- *("1" "2" "3" "4")
- @}
-
- .data :@{
- *("13" "14")
- @}
-@}
-@end group
+data.o(.data)
@end smallexample
-@cindex @code{[@var{section}@dots{}]}, not supported
-@samp{[ @var{section} @dots{} ]} used to be accepted as an alternate way
-to specify named sections from all unallocated input files. Because
-some operating systems (VMS) allow brackets in file names, that notation
-is no longer supported.
-
-@cindex uninitialized data
-@cindex commons in output
-@kindex *( COMMON )
-@item @var{filename}@code{( COMMON )}
-@itemx *( COMMON )
-Specify where in your output file to place uninitialized data
-with this notation. @code{*(COMMON)} by itself refers to all
-uninitialized data from all input files (so far as it is not yet
-allocated); @var{filename}@code{(COMMON)} refers to uninitialized data
-from a particular file. Both are special cases of the general
-mechanisms for specifying where to place input-file sections:
-@code{ld} permits you to refer to uninitialized data as if it
-were in an input-file section named @code{COMMON}, regardless of the
-input file's format.
-@end table
+If you use a file name without a list of sections, then all sections in
+the input file will be included in the output section. This is not
+commonly done, but it may by useful on occasion. For example:
+@smallexample
+data.o
+@end smallexample
+
+When you use a file name which does not contain any wild card
+characters, the linker will first see if you also specified the file
+name on the linker command line or in an @code{INPUT} command. If you
+did not, the linker will attempt to open the file as an input file, as
+though it appeared on the command line. Note that this differs from an
+@code{INPUT} command, because the linker will not search for the file in
+the archive search path.
-In any place where you may use a specific file or section name, you may
-also use a wildcard pattern. The linker handles wildcards much as the
-Unix shell does. A @samp{*} character matches any number of characters.
-A @samp{?} character matches any single character. The sequence
-@samp{[@var{chars}]} will match a single instance of any of the
-@var{chars}; the @samp{-} character may be used to specify a range of
-characters, as in @samp{[a-z]} to match any lower case letter. A
-@samp{\} character may be used to quote the following character.
+@node Input Section Wildcards
+@subsubsection Input section wildcard patterns
+@cindex input section wildcards
+@cindex wildcard file name patterns
+@cindex file name wildcard patterns
+@cindex section name wildcard patterns
+In an input section description, either the file name or the section
+name or both may be wildcard patterns.
+
+The file name of @samp{*} seen in many examples is a simple wildcard
+pattern for the file name.
+
+The wildcard patterns are like those used by the Unix shell.
+
+@table @samp
+@item *
+matches any number of characters
+@item ?
+matches any single character
+@item [@var{chars}]
+matches a single instance of any of the @var{chars}; the @samp{-}
+character may be used to specify a range of characters, as in
+@samp{[a-z]} to match any lower case letter
+@item \
+quotes the following character
+@end table
When a file name is matched with a wildcard, the wildcard characters
will not match a @samp{/} character (used to separate directory names on
Unix). A pattern consisting of a single @samp{*} character is an
-exception; it will always match any file name. In a section name, the
-wildcard characters will match a @samp{/} character.
+exception; it will always match any file name, whether it contains a
+@samp{/} or not. In a section name, the wildcard characters will match
+a @samp{/} character.
+
+File name wildcard patterns only match files which are explicitly
+specified on the command line or in an @code{INPUT} command. The linker
+does not search directories to expand wildcards.
+
+If a file name matches more than one wildcard pattern, or if a file name
+appears explicitly and is also matched by a wildcard pattern, the linker
+will use the first match in the linker script. For example, this
+sequence of input section descriptions is probably in error, because the
+@file{data.o} rule will not be used:
+@smallexample
+.data : @{ *(.data) @}
+.data1 : @{ data.o(.data) @}
+@end smallexample
-Wildcards only match files which are explicitly specified on the command
-line. The linker does not search directories to expand wildcards.
-However, if you specify a simple file name---a name with no wildcard
-characters---in a linker script, and the file name is not also specified
-on the command line, the linker will attempt to open the file as though
-it appeared on the command line.
+@cindex SORT
+Normally, the linker will place files and sections matched by wildcards
+in the order in which they are seen during the link. You can change
+this by using the @code{SORT} keyword, which appears before a wildcard
+pattern in parentheses (e.g., @code{SORT(.text*)}). When the
+@code{SORT} keyword is used, the linker will sort the files or sections
+into ascending order by name before placing them in the output file.
-In the following example, the command script arranges the output file
-into three consecutive sections, named @code{.text}, @code{.data}, and
-@code{.bss}, taking the input for each from the correspondingly named
-sections of all the input files:
+If you ever get confused about where input sections are going, use the
+@samp{-M} linker option to generate a map file. The map file shows
+precisely how input sections are mapped to output sections.
+This example shows how wildcard patterns might be used to partition
+files. This linker script directs the linker to place all @samp{.text}
+sections in @samp{.text} and all @samp{.bss} sections in @samp{.bss}.
+The linker will place the @samp{.data} section from all files beginning
+with an upper case character in @samp{.DATA}; for all other files, the
+linker will place the @samp{.data} section in @samp{.data}.
@smallexample
@group
-SECTIONS @{
+SECTIONS @{
.text : @{ *(.text) @}
- .data : @{ *(.data) @}
- .bss : @{ *(.bss) *(COMMON) @}
-@}
+ .DATA : @{ [A-Z]*(.data) @}
+ .data : @{ *(.data) @}
+ .bss : @{ *(.bss) @}
+@}
@end group
@end smallexample
-The following example reads all of the sections from file @code{all.o}
-and places them at the start of output section @code{outputa} which
-starts at location @code{0x10000}. All of section @code{.input1} from
-file @code{foo.o} follows immediately, in the same output section. All
-of section @code{.input2} from @code{foo.o} goes into output section
-@code{outputb}, followed by section @code{.input1} from @code{foo1.o}.
-All of the remaining @code{.input1} and @code{.input2} sections from any
-files are written to output section @code{outputc}.
+@node Input Section Common
+@subsubsection Input section for common symbols
+@cindex common symbol placement
+@cindex uninitialized data placement
+A special notation is needed for common symbols, because in many object
+file formats common symbols do not have a particular input section. The
+linker treats common symbols as though they are in an input section
+named @samp{COMMON}.
+
+You may use file names with the @samp{COMMON} section just as with any
+other input sections. You can use this to place common symbols from a
+particular input file in one section while common symbols from other
+input files are placed in another section.
+
+In most cases, common symbols in input files will be placed in the
+@samp{.bss} section in the output file. For example:
+@smallexample
+.bss @{ *(.bss) *(COMMON) @}
+@end smallexample
+
+@cindex scommon section
+@cindex small common symbols
+Some object file formats have more than one type of common symbol. For
+example, the MIPS ELF object file format distinguishes standard common
+symbols and small common symbols. In this case, the linker will use a
+different special section name for other types of common symbols. In
+the case of MIPS ELF, the linker uses @samp{COMMON} for standard common
+symbols and @samp{.scommon} for small common symbols. This permits you
+to map the different types of common symbols into memory at different
+locations.
+
+@cindex [COMMON]
+You will sometimes see @samp{[COMMON]} in old linker scripts. This
+notation is now considered obsolete. It is equivalent to
+@samp{*(COMMON)}.
+
+@node Input Section Keep
+@subsubsection Input section and garbage collection
+@cindex KEEP
+@cindex garbage collection
+When link-time garbage collection is in use (@samp{--gc-sections}),
+it is often useful to mark sections that should not be eliminated.
+This is accomplished by surrounding an input section's wildcard entry
+with @code{KEEP()}, as in @code{KEEP(*(.init))} or
+@code{KEEP(SORT(*)(.ctors))}.
+
+@node Input Section Example
+@subsubsection Input section example
+The following example is a complete linker script. It tells the linker
+to read all of the sections from file @file{all.o} and place them at the
+start of output section @samp{outputa} which starts at location
+@samp{0x10000}. All of section @samp{.input1} from file @file{foo.o}
+follows immediately, in the same output section. All of section
+@samp{.input2} from @file{foo.o} goes into output section
+@samp{outputb}, followed by section @samp{.input1} from @file{foo1.o}.
+All of the remaining @samp{.input1} and @samp{.input2} sections from any
+files are written to output section @samp{outputc}.
@smallexample
@group
@@ -2211,259 +2445,266 @@ SECTIONS @{
@end group
@end smallexample
-This example shows how wildcard patterns might be used to partition
-files. All @code{.text} sections are placed in @code{.text}, and all
-@code{.bss} sections are placed in @code{.bss}. For all files beginning
-with an upper case character, the @code{.data} section is placed into
-@code{.DATA}; for all other files, the @code{.data} section is placed
-into @code{.data}.
+@node Output Section Data
+@subsection Output section data
+@cindex data
+@cindex section data
+@cindex output section data
+@kindex BYTE(@var{expression})
+@kindex SHORT(@var{expression})
+@kindex LONG(@var{expression})
+@kindex QUAD(@var{expression})
+@kindex SQUAD(@var{expression})
+You can include explicit bytes of data in an output section by using
+@code{BYTE}, @code{SHORT}, @code{LONG}, @code{QUAD}, or @code{SQUAD} as
+an output section command. Each keyword is followed by an expression in
+parentheses providing the value to store (@pxref{Expressions}). The
+value of the expression is stored at the current value of the location
+counter.
+
+The @code{BYTE}, @code{SHORT}, @code{LONG}, and @code{QUAD} commands
+store one, two, four, and eight bytes (respectively). After storing the
+bytes, the location counter is incremented by the number of bytes
+stored.
+
+For example, this will store the byte 1 followed by the four byte value
+of the symbol @samp{addr}:
+@smallexample
+BYTE(1)
+LONG(addr)
+@end smallexample
+
+When using a 64 bit host or target, @code{QUAD} and @code{SQUAD} are the
+same; they both store an 8 byte, or 64 bit, value. When both host and
+target are 32 bits, an expression is computed as 32 bits. In this case
+@code{QUAD} stores a 32 bit value zero extended to 64 bits, and
+@code{SQUAD} stores a 32 bit value sign extended to 64 bits.
+If the object file format of the output file has an explicit endianness,
+which is the normal case, the value will be stored in that endianness.
+When the object file format does not have an explicit endianness, as is
+true of, for example, S-records, the value will be stored in the
+endianness of the first input object file.
+
+@kindex FILL(@var{expression})
+@cindex holes, filling
+@cindex unspecified memory
+You may use the @code{FILL} command to set the fill pattern for the
+current section. It is followed by an expression in parentheses. Any
+otherwise unspecified regions of memory within the section (for example,
+gaps left due to the required alignment of input sections) are filled
+with the two least significant bytes of the expression, repeated as
+necessary. A @code{FILL} statement covers memory locations after the
+point at which it occurs in the section definition; by including more
+than one @code{FILL} statement, you can have different fill patterns in
+different parts of an output section.
+
+This example shows how to fill unspecified regions of memory with the
+value @samp{0x9090}:
@smallexample
-@group
-SECTIONS @{
- .text : @{ *(.text) @}
- .DATA : @{ [A-Z]*(.data) @}
- .data : @{ *(.data) @}
- .bss : @{ *(.bss) @}
-@}
-@end group
+FILL(0x9090)
@end smallexample
-@node Section Data Expressions
-@subsection Section Data Expressions
+The @code{FILL} command is similar to the @samp{=@var{fillexp}} output
+section attribute (@pxref{Output Section Fill}), but it only affects the
+part of the section following the @code{FILL} command, rather than the
+entire section. If both are used, the @code{FILL} command takes
+precedence.
-@cindex expressions in a section
-The foregoing statements arrange, in your output file, data originating
-from your input files. You can also place data directly in an output
-section from the link command script. Most of these additional
-statements involve expressions (@pxref{Expressions}). Although these
-statements are shown separately here for ease of presentation, no such
-segregation is needed within a section definition in the @code{SECTIONS}
-command; you can intermix them freely with any of the statements we've
-just described.
+@node Output Section Keywords
+@subsection Output section keywords
+There are a couple of keywords which can appear as output section
+commands.
@table @code
+@kindex CREATE_OBJECT_SYMBOLS
@cindex input filename symbols
@cindex filename symbols
-@kindex CREATE_OBJECT_SYMBOLS
@item CREATE_OBJECT_SYMBOLS
-Create a symbol for each input file
-in the current section, set to the address of the first byte of
-data written from that input file. For instance, with @code{a.out}
-files it is conventional to have a symbol for each input file. You can
-accomplish this by defining the output @code{.text} section as follows:
-@smallexample
-@group
-SECTIONS @{
- .text 0x2020 :
- @{
- CREATE_OBJECT_SYMBOLS
- *(.text)
- _etext = ALIGN(0x2000);
- @}
- @dots{}
-@}
-@end group
-@end smallexample
-
-If @code{sample.ld} is a file containing this script, and @code{a.o},
-@code{b.o}, @code{c.o}, and @code{d.o} are four input files with
-contents like the following---
-@smallexample
-@group
-/* a.c */
+The command tells the linker to create a symbol for each input file.
+The name of each symbol will be the name of the corresponding input
+file. The section of each symbol will be the output section in which
+the @code{CREATE_OBJECT_SYMBOLS} command appears.
-afunction() @{ @}
-int adata=1;
-int abss;
-@end group
-@end smallexample
+This is conventional for the a.out object file format. It is not
+normally used for any other object file format.
-@noindent
-@samp{ld -M -T sample.ld a.o b.o c.o d.o} would create a map like this,
-containing symbols matching the object file names:
-@smallexample
-00000000 A __DYNAMIC
-00004020 B _abss
-00004000 D _adata
-00002020 T _afunction
-00004024 B _bbss
-00004008 D _bdata
-00002038 T _bfunction
-00004028 B _cbss
-00004010 D _cdata
-00002050 T _cfunction
-0000402c B _dbss
-00004018 D _ddata
-00002068 T _dfunction
-00004020 D _edata
-00004030 B _end
-00004000 T _etext
-00002020 t a.o
-00002038 t b.o
-00002050 t c.o
-00002068 t d.o
-@end smallexample
+@kindex CONSTRUCTORS
+@cindex C++ constructors, arranging in link
+@cindex constructors, arranging in link
+@item CONSTRUCTORS
+When linking using the a.out object file format, the linker uses an
+unusual set construct to support C++ global constructors and
+destructors. When linking object file formats which do not support
+arbitrary sections, such as ECOFF and XCOFF, the linker will
+automatically recognize C++ global constructors and destructors by name.
+For these object file formats, the @code{CONSTRUCTORS} command tells the
+linker to place constructor information in the output section where the
+@code{CONSTRUCTORS} command appears. The @code{CONSTRUCTORS} command is
+ignored for other object file formats.
-@kindex @var{symbol} = @var{expression} ;
-@kindex @var{symbol} @var{f}= @var{expression} ;
-@item @var{symbol} = @var{expression} ;
-@itemx @var{symbol} @var{f}= @var{expression} ;
-@var{symbol} is any symbol name (@pxref{Symbols}). ``@var{f}=''
-refers to any of the operators @code{&= += -= *= /=} which combine
-arithmetic and assignment.
+The symbol @w{@code{__CTOR_LIST__}} marks the start of the global
+constructors, and the symbol @w{@code{__DTOR_LIST}} marks the end. The
+first word in the list is the number of entries, followed by the address
+of each constructor or destructor, followed by a zero word. The
+compiler must arrange to actually run the code. For these object file
+formats @sc{gnu} C++ normally calls constructors from a subroutine
+@code{__main}; a call to @code{__main} is automatically inserted into
+the startup code for @code{main}. @sc{gnu} C++ normally runs
+destructors either by using @code{atexit}, or directly from the function
+@code{exit}.
-@cindex assignment, in section defn
-When you assign a value to a symbol within a particular section
-definition, the value is relative to the beginning of the section
-(@pxref{Assignment}). If you write
+For object file formats such as @code{COFF} or @code{ELF} which support
+arbitrary section names, @sc{gnu} C++ will normally arrange to put the
+addresses of global constructors and destructors into the @code{.ctors}
+and @code{.dtors} sections. Placing the following sequence into your
+linker script will build the sort of table which the @sc{gnu} C++
+runtime code expects to see.
@smallexample
-@group
-SECTIONS @{
- abs = 14 ;
- @dots{}
- .data : @{ @dots{} rel = 14 ; @dots{} @}
- abs2 = 14 + ADDR(.data);
- @dots{}
-@}
-@end group
+ __CTOR_LIST__ = .;
+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
+ *(.ctors)
+ LONG(0)
+ __CTOR_END__ = .;
+ __DTOR_LIST__ = .;
+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
+ *(.dtors)
+ LONG(0)
+ __DTOR_END__ = .;
@end smallexample
-@c FIXME: Try above example!
-@noindent
-@code{abs} and @code{rel} do not have the same value; @code{rel} has the
-same value as @code{abs2}.
+If you are using the @sc{gnu} C++ support for initialization priority,
+which provides some control over the order in which global constructors
+are run, you must sort the constructors at link time to ensure that they
+are executed in the correct order. When using the @code{CONSTRUCTORS}
+command, use @samp{SORT(CONSTRUCTORS)} instead. When using the
+@code{.ctors} and @code{.dtors} sections, use @samp{*(SORT(.ctors))} and
+@samp{*(SORT(.dtors))} instead of just @samp{*(.ctors)} and
+@samp{*(.dtors)}.
-@kindex BYTE(@var{expression})
-@kindex SHORT(@var{expression})
-@kindex LONG(@var{expression})
-@kindex QUAD(@var{expression})
-@kindex SQUAD(@var{expression})
-@cindex direct output
-@item BYTE(@var{expression})
-@itemx SHORT(@var{expression})
-@itemx LONG(@var{expression})
-@itemx QUAD(@var{expression})
-@itemx SQUAD(@var{expression})
-By including one of these four statements in a section definition, you
-can explicitly place one, two, four, eight unsigned, or eight signed
-bytes (respectively) at the current address of that section. When using
-a 64 bit host or target, @code{QUAD} and @code{SQUAD} are the same.
-When both host and target are 32 bits, @code{QUAD} uses an unsigned 32
-bit value, and @code{SQUAD} sign extends the value. Both will use the
-correct endianness when writing out the value.
-
-@ifclear SingleFormat
-Multiple-byte quantities are represented in whatever byte order is
-appropriate for the output file format (@pxref{BFD}).
-@end ifclear
+Normally the compiler and linker will handle these issues automatically,
+and you will not need to concern yourself with them. However, you may
+need to consider this if you are using C++ and writing your own linker
+scripts.
-@kindex FILL(@var{expression})
-@cindex holes, filling
-@cindex unspecified memory
-@item FILL(@var{expression})
-Specify the ``fill pattern'' for the current section. Any otherwise
-unspecified regions of memory within the section (for example, regions
-you skip over by assigning a new value to the location counter @samp{.})
-are filled with the two least significant bytes from the
-@var{expression} argument. A @code{FILL} statement covers memory
-locations @emph{after} the point it occurs in the section definition; by
-including more than one @code{FILL} statement, you can have different
-fill patterns in different parts of an output section.
@end table
-@node Section Options
-@subsection Optional Section Attributes
-@cindex section defn, full syntax
-Here is the full syntax of a section definition, including all the
-optional portions:
-
+@node Output Section Discarding
+@subsection Output section discarding
+@cindex discarding sections
+@cindex sections, discarding
+@cindex removing sections
+The linker will not create output section which do not have any
+contents. This is for convenience when referring to input sections that
+may or may not be present in any of the input files. For example:
@smallexample
-@group
-SECTIONS @{
-@dots{}
-@var{secname} @var{start} BLOCK(@var{align}) (NOLOAD) : AT ( @var{ldadr} )
- @{ @var{contents} @} >@var{region} :@var{phdr} =@var{fill}
-@dots{}
-@}
-@end group
+.foo @{ *(.foo) @}
@end smallexample
+@noindent
+will only create a @samp{.foo} section in the output file if there is a
+@samp{.foo} section in at least one input file.
-@var{secname} and @var{contents} are required. @xref{Section
-Definition}, and @ref{Section Placement}, for details on
-@var{contents}. The remaining elements---@var{start},
-@code{BLOCK(@var{align)}}, @code{(NOLOAD)}, @code{AT ( @var{ldadr} )},
-@code{>@var{region}}, @code{:@var{phdr}}, and @code{=@var{fill}}---are
-all optional.
+If you use anything other than an input section description as an output
+section command, such as a symbol assignment, then the output section
+will always be created, even if there are no matching input sections.
-@table @code
-@cindex start address, section
-@cindex section start
-@cindex section address
-@item @var{start}
-You can force the output section to be loaded at a specified address by
-specifying @var{start} immediately following the section name.
-@var{start} can be represented as any expression. The following
-example generates section @var{output} at location
-@code{0x40000000}:
+@cindex /DISCARD/
+The special output section name @samp{/DISCARD/} may be used to discard
+input sections. Any input sections which are assigned to an output
+section named @samp{/DISCARD/} are not included in the output file.
+@node Output Section Attributes
+@subsection Output section attributes
+@cindex output section attributes
+We showed above that the full description of an output section looked
+like this:
@smallexample
-@group
-SECTIONS @{
- @dots{}
- output 0x40000000: @{
+@group
+@var{section} [@var{address}] [(@var{type})] : [AT(@var{lma})]
+ @{
+ @var{output-section-command}
+ @var{output-section-command}
@dots{}
- @}
- @dots{}
-@}
+ @} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
@end group
@end smallexample
+We've already described @var{section}, @var{address}, and
+@var{output-section-command}. In this section we will describe the
+remaining section attributes.
+
+@menu
+* Output Section Type:: Output section type
+* Output Section LMA:: Output section LMA
+* Output Section Region:: Output section region
+* Output Section Phdr:: Output section phdr
+* Output Section Fill:: Output section fill
+@end menu
+
+@node Output Section Type
+@subsubsection Output section type
+Each output section may have a type. The type is a keyword in
+parentheses. The following types are defined:
-@kindex BLOCK(@var{align})
-@cindex section alignment
-@cindex aligning sections
-@item BLOCK(@var{align})
-You can include @code{BLOCK()} specification to advance
-the location counter @code{.} prior to the beginning of the section, so
-that the section will begin at the specified alignment. @var{align} is
-an expression.
+@table @code
+@item NOLOAD
+The section should be marked as not loadable, so that it will not be
+loaded into memory when the program is run.
+@item DSECT
+@itemx COPY
+@itemx INFO
+@itemx OVERLAY
+These type names are supported for backward compatibility, and are
+rarely used. They all have the same effect: the section should be
+marked as not allocatable, so that no memory is allocated for the
+section when the program is run.
+@end table
@kindex NOLOAD
@cindex prevent unnecessary loading
@cindex loading, preventing
-@item (NOLOAD)
-The @samp{(NOLOAD)} directive will mark a section to not be loaded at
-run time. The linker will process the section normally, but will mark
-it so that a program loader will not load it into memory. For example,
-in the script sample below, the @code{ROM} section is addressed at
-memory location @samp{0} and does not need to be loaded when the program
-is run. The contents of the @code{ROM} section will appear in the
-linker output file as usual.
-
+The linker normally sets the attributes of an output section based on
+the input sections which map into it. You can override this by using
+the section type. For example, in the script sample below, the
+@samp{ROM} section is addressed at memory location @samp{0} and does not
+need to be loaded when the program is run. The contents of the
+@samp{ROM} section will appear in the linker output file as usual.
@smallexample
@group
SECTIONS @{
- ROM 0 (NOLOAD) : @{ @dots{} @}
+ ROM 0 (NOLOAD) : @{ @dots{} @}
@dots{}
@}
@end group
@end smallexample
-@kindex AT ( @var{ldadr} )
-@cindex specify load address
-@cindex load address, specifying
-@item AT ( @var{ldadr} )
-The expression @var{ldadr} that follows the @code{AT} keyword specifies
-the load address of the section. The default (if you do not use the
-@code{AT} keyword) is to make the load address the same as the
-relocation address. This feature is designed to make it easy to build a
-ROM image. For example, this @code{SECTIONS} definition creates two
-output sections: one called @samp{.text}, which starts at @code{0x1000},
-and one called @samp{.mdata}, which is loaded at the end of the
-@samp{.text} section even though its relocation address is
-@code{0x2000}. The symbol @code{_data} is defined with the value
-@code{0x2000}:
+@node Output Section LMA
+@subsubsection Output section LMA
+@kindex AT>@var{lma_region}
+@kindex AT(@var{lma})
+@cindex load address
+@cindex section load address
+Every section has a virtual address (VMA) and a load address (LMA); see
+@ref{Basic Script Concepts}. The address expression which may appear in
+an output section description sets the VMA (@pxref{Output Section
+Address}).
+
+The linker will normally set the LMA equal to the VMA. You can change
+that by using the @code{AT} keyword. The expression @var{lma} that
+follows the @code{AT} keyword specifies the load address of the
+section. Alternatively, with @samp{AT>@var{lma_region}} expression,
+you may specify a memory region for the section's load address. @xref{MEMORY}.
+
+@cindex ROM initialized data
+@cindex initialized data in ROM
+This feature is designed to make it easy to build a ROM image. For
+example, the following linker script creates three output sections: one
+called @samp{.text}, which starts at @code{0x1000}, one called
+@samp{.mdata}, which is loaded at the end of the @samp{.text} section
+even though its VMA is @code{0x2000}, and one called @samp{.bss} to hold
+uninitialized data at address @code{0x3000}. The symbol @code{_data} is
+defined with the value @code{0x2000}, which shows that the location
+counter holds the VMA value, not the LMA value.
@smallexample
@group
@@ -2471,7 +2712,7 @@ SECTIONS
@{
.text 0x1000 : @{ *(.text) _etext = . ; @}
.mdata 0x2000 :
- AT ( ADDR(.text) + SIZEOF ( .text ) )
+ AT ( ADDR (.text) + SIZEOF (.text) )
@{ _data = . ; *(.data); _edata = . ; @}
.bss 0x3000 :
@{ _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;@}
@@ -2479,82 +2720,121 @@ SECTIONS
@end group
@end smallexample
-The run-time initialization code (for C programs, usually @code{crt0})
-for use with a ROM generated this way has to include something like
-the following, to copy the initialized data from the ROM image to its runtime
-address:
+The run-time initialization code for use with a program generated with
+this linker script would include something like the following, to copy
+the initialized data from the ROM image to its runtime address. Notice
+how this code takes advantage of the symbols defined by the linker
+script.
@smallexample
@group
-char *src = _etext;
-char *dst = _data;
+extern char _etext, _data, _edata, _bstart, _bend;
+char *src = &_etext;
+char *dst = &_data;
/* ROM has data at end of text; copy it. */
-while (dst < _edata) @{
+while (dst < &_edata) @{
*dst++ = *src++;
@}
/* Zero bss */
-for (dst = _bstart; dst< _bend; dst++)
+for (dst = &_bstart; dst< &_bend; dst++)
*dst = 0;
@end group
@end smallexample
+@node Output Section Region
+@subsubsection Output section region
@kindex >@var{region}
@cindex section, assigning to memory region
@cindex memory regions and sections
-@item >@var{region}
-Assign this section to a previously defined region of memory.
-@xref{MEMORY}.
+You can assign a section to a previously defined region of memory by
+using @samp{>@var{region}}. @xref{MEMORY}.
+
+Here is a simple example:
+@smallexample
+@group
+MEMORY @{ rom : ORIGIN = 0x1000, LENGTH = 0x1000 @}
+SECTIONS @{ ROM : @{ *(.text) @} >rom @}
+@end group
+@end smallexample
+@node Output Section Phdr
+@subsubsection Output section phdr
@kindex :@var{phdr}
@cindex section, assigning to program header
@cindex program headers and sections
-@item :@var{phdr}
-Assign this section to a segment described by a program header.
-@xref{PHDRS}. If a section is assigned to one or more segments, then
-all subsequent allocated sections will be assigned to those segments as
-well, unless they use an explicitly @code{:@var{phdr}} modifier. To
-prevent a section from being assigned to a segment when it would
-normally default to one, use @code{:NONE}.
-
-@kindex =@var{fill}
+You can assign a section to a previously defined program segment by
+using @samp{:@var{phdr}}. @xref{PHDRS}. If a section is assigned to
+one or more segments, then all subsequent allocated sections will be
+assigned to those segments as well, unless they use an explicitly
+@code{:@var{phdr}} modifier. You can use @code{:NONE} to tell the
+linker to not put the section in any segment at all.
+
+Here is a simple example:
+@smallexample
+@group
+PHDRS @{ text PT_LOAD ; @}
+SECTIONS @{ .text : @{ *(.text) @} :text @}
+@end group
+@end smallexample
+
+@node Output Section Fill
+@subsubsection Output section fill
+@kindex =@var{fillexp}
@cindex section fill pattern
@cindex fill pattern, entire section
-@item =@var{fill}
-Including @code{=@var{fill}} in a section definition specifies the
-initial fill value for that section. You may use any expression to
-specify @var{fill}. Any unallocated holes in the current output section
-when written to the output file will be filled with the two least
-significant bytes of the value, repeated as necessary. You can also
-change the fill value with a @code{FILL} statement in the @var{contents}
-of a section definition.
+You can set the fill pattern for an entire section by using
+@samp{=@var{fillexp}}. @var{fillexp} is an expression
+(@pxref{Expressions}). Any otherwise unspecified regions of memory
+within the output section (for example, gaps left due to the required
+alignment of input sections) will be filled with the two least
+significant bytes of the value, repeated as necessary.
-@end table
+You can also change the fill value with a @code{FILL} command in the
+output section commands; see @ref{Output Section Data}.
+
+Here is a simple example:
+@smallexample
+@group
+SECTIONS @{ .text : @{ *(.text) @} =0x9090 @}
+@end group
+@end smallexample
-@node Overlays
-@subsection Overlays
+@node Overlay Description
+@subsection Overlay description
@kindex OVERLAY
@cindex overlays
-
-The @code{OVERLAY} command provides an easy way to describe sections
-which are to be loaded as part of a single memory image but are to be
-run at the same memory address. At run time, some sort of overlay
-manager will copy the overlaid sections in and out of the runtime memory
-address as required, perhaps by simply manipulating addressing bits.
-This approach can be useful, for example, when a certain region of
-memory is faster than another.
-
-The @code{OVERLAY} command is used within a @code{SECTIONS} command. It
-appears as follows:
+An overlay description provides an easy way to describe sections which
+are to be loaded as part of a single memory image but are to be run at
+the same memory address. At run time, some sort of overlay manager will
+copy the overlaid sections in and out of the runtime memory address as
+required, perhaps by simply manipulating addressing bits. This approach
+can be useful, for example, when a certain region of memory is faster
+than another.
+
+Overlays are described using the @code{OVERLAY} command. The
+@code{OVERLAY} command is used within a @code{SECTIONS} command, like an
+output section description. The full syntax of the @code{OVERLAY}
+command is as follows:
@smallexample
@group
- OVERLAY @var{start} : [ NOCROSSREFS ] AT ( @var{ldaddr} )
- @{
- @var{secname1} @{ @var{contents} @} :@var{phdr} =@var{fill}
- @var{secname2} @{ @var{contents} @} :@var{phdr} =@var{fill}
- @dots{}
- @} >@var{region} :@var{phdr} =@var{fill}
+OVERLAY [@var{start}] : [NOCROSSREFS] [AT ( @var{ldaddr} )]
+ @{
+ @var{secname1}
+ @{
+ @var{output-section-command}
+ @var{output-section-command}
+ @dots{}
+ @} [:@var{phdr}@dots{}] [=@var{fill}]
+ @var{secname2}
+ @{
+ @var{output-section-command}
+ @var{output-section-command}
+ @dots{}
+ @} [:@var{phdr}@dots{}] [=@var{fill}]
+ @dots{}
+ @} [>@var{region}] [:@var{phdr}@dots{}] [=@var{fill}]
@end group
@end smallexample
@@ -2570,12 +2850,12 @@ addresses of the sections are arranged such that they are consecutive in
memory starting at the load address used for the @code{OVERLAY} as a
whole (as with normal section definitions, the load address is optional,
and defaults to the start address; the start address is also optional,
-and defaults to @code{.}).
+and defaults to the current value of the location counter).
If the @code{NOCROSSREFS} keyword is used, and there any references
among the sections, the linker will report an error. Since the sections
all run at the same address, it normally does not make sense for one
-section to refer directly to another. @xref{Option Commands,
+section to refer directly to another. @xref{Miscellaneous Commands,
NOCROSSREFS}.
For each section within the @code{OVERLAY}, the linker automatically
@@ -2586,12 +2866,11 @@ the section. Any characters within @var{secname} which are not legal
within C identifiers are removed. C (or assembler) code may use these
symbols to move the overlaid sections around as necessary.
-At the end of the overlay, the value of @code{.} is set to the start
-address of the overlay plus the size of the largest section.
+At the end of the overlay, the value of the location counter is set to
+the start address of the overlay plus the size of the largest section.
Here is an example. Remember that this would appear inside a
@code{SECTIONS} construct.
-
@smallexample
@group
OVERLAY 0x1000 : AT (0x4000)
@@ -2601,10 +2880,10 @@ Here is an example. Remember that this would appear inside a
@}
@end group
@end smallexample
-
-This will define both @code{.text0} and @code{.text1} to start at
-address 0x1000. @code{.text0} will be loaded at address 0x4000, and
-@code{.text1} will be loaded immediately after @code{.text0}. The
+@noindent
+This will define both @samp{.text0} and @samp{.text1} to start at
+address 0x1000. @samp{.text0} will be loaded at address 0x4000, and
+@samp{.text1} will be loaded immediately after @samp{.text0}. The
following symbols will be defined: @code{__load_start_text0},
@code{__load_stop_text0}, @code{__load_start_text1},
@code{__load_stop_text1}.
@@ -2636,27 +2915,149 @@ example could have been written identically as follows.
@end group
@end smallexample
+@node MEMORY
+@section MEMORY command
+@kindex MEMORY
+@cindex memory regions
+@cindex regions of memory
+@cindex allocating memory
+@cindex discontinuous memory
+The linker's default configuration permits allocation of all available
+memory. You can override this by using the @code{MEMORY} command.
+
+The @code{MEMORY} command describes the location and size of blocks of
+memory in the target. You can use it to describe which memory regions
+may be used by the linker, and which memory regions it must avoid. You
+can then assign sections to particular memory regions. The linker will
+set section addresses based on the memory regions, and will warn about
+regions that become too full. The linker will not shuffle sections
+around to fit into the available regions.
+
+A linker script may contain at most one use of the @code{MEMORY}
+command. However, you can define as many blocks of memory within it as
+you wish. The syntax is:
+@smallexample
+@group
+MEMORY
+ @{
+ @var{name} [(@var{attr})] : ORIGIN = @var{origin}, LENGTH = @var{len}
+ @dots{}
+ @}
+@end group
+@end smallexample
+
+The @var{name} is a name used in the linker script to refer to the
+region. The region name has no meaning outside of the linker script.
+Region names are stored in a separate name space, and will not conflict
+with symbol names, file names, or section names. Each memory region
+must have a distinct name.
+
+@cindex memory region attributes
+The @var{attr} string is an optional list of attributes that specify
+whether to use a particular memory region for an input section which is
+not explicitly mapped in the linker script. As described in
+@ref{SECTIONS}, if you do not specify an output section for some input
+section, the linker will create an output section with the same name as
+the input section. If you define region attributes, the linker will use
+them to select the memory region for the output section that it creates.
+
+The @var{attr} string must consist only of the following characters:
+@table @samp
+@item R
+Read-only section
+@item W
+Read/write section
+@item X
+Executable section
+@item A
+Allocatable section
+@item I
+Initialized section
+@item L
+Same as @samp{I}
+@item !
+Invert the sense of any of the preceding attributes
+@end table
+
+If a unmapped section matches any of the listed attributes other than
+@samp{!}, it will be placed in the memory region. The @samp{!}
+attribute reverses this test, so that an unmapped section will be placed
+in the memory region only if it does not match any of the listed
+attributes.
+
+@kindex ORIGIN =
+@kindex o =
+@kindex org =
+The @var{origin} is an expression for the start address of the memory
+region. The expression must evaluate to a constant before memory
+allocation is performed, which means that you may not use any section
+relative symbols. The keyword @code{ORIGIN} may be abbreviated to
+@code{org} or @code{o} (but not, for example, @code{ORG}).
+
+@kindex LENGTH =
+@kindex len =
+@kindex l =
+The @var{len} is an expression for the size in bytes of the memory
+region. As with the @var{origin} expression, the expression must
+evaluate to a constant before memory allocation is performed. The
+keyword @code{LENGTH} may be abbreviated to @code{len} or @code{l}.
+
+In the following example, we specify that there are two memory regions
+available for allocation: one starting at @samp{0} for 256 kilobytes,
+and the other starting at @samp{0x40000000} for four megabytes. The
+linker will place into the @samp{rom} memory region every section which
+is not explicitly mapped into a memory region, and is either read-only
+or executable. The linker will place other sections which are not
+explicitly mapped into a memory region into the @samp{ram} memory
+region.
+
+@smallexample
+@group
+MEMORY
+ @{
+ rom (rx) : ORIGIN = 0, LENGTH = 256K
+ ram (!rx) : org = 0x40000000, l = 4M
+ @}
+@end group
+@end smallexample
+
+Once you define a memory region, you can direct the linker to place
+specific output sections into that memory region by using the
+@samp{>@var{region}} output section attribute. For example, if you have
+a memory region named @samp{mem}, you would use @samp{>mem} in the
+output section definition. @xref{Output Section Region}. If no address
+was specified for the output section, the linker will set the address to
+the next available address within the memory region. If the combined
+output sections directed to a memory region are too large for the
+region, the linker will issue an error message.
+
@node PHDRS
-@section ELF Program Headers
+@section PHDRS Command
@kindex PHDRS
@cindex program headers
@cindex ELF program headers
-
-The ELF object file format uses @dfn{program headers}, which are read by
-the system loader and describe how the program should be loaded into
-memory. These program headers must be set correctly in order to run the
-program on a native ELF system. The linker will create reasonable
-program headers by default. However, in some cases, it is desirable to
-specify the program headers more precisely; the @code{PHDRS} command may
-be used for this purpose. When the @code{PHDRS} command is used, the
-linker will not generate any program headers itself.
-
-The @code{PHDRS} command is only meaningful when generating an ELF
-output file. It is ignored in other cases. This manual does not
-describe the details of how the system loader interprets program
-headers; for more information, see the ELF ABI. The program headers of
-an ELF file may be displayed using the @samp{-p} option of the
-@code{objdump} command.
+@cindex program segments
+@cindex segments, ELF
+The ELF object file format uses @dfn{program headers}, also knows as
+@dfn{segments}. The program headers describe how the program should be
+loaded into memory. You can print them out by using the @code{objdump}
+program with the @samp{-p} option.
+
+When you run an ELF program on a native ELF system, the system loader
+reads the program headers in order to figure out how to load the
+program. This will only work if the program headers are set correctly.
+This manual does not describe the details of how the system loader
+interprets program headers; for more information, see the ELF ABI.
+
+The linker will create reasonable program headers by default. However,
+in some cases, you may need to specify the program headers more
+precisely. You may use the @code{PHDRS} command for this purpose. When
+the linker sees the @code{PHDRS} command in the linker script, it will
+not create any program headers other than the ones specified.
+
+The linker only pays attention to the @code{PHDRS} command when
+generating an ELF output file. In other cases, the linker will simply
+ignore @code{PHDRS}.
This is the syntax of the @code{PHDRS} command. The words @code{PHDRS},
@code{FILEHDR}, @code{AT}, and @code{FLAGS} are keywords.
@@ -2672,30 +3073,35 @@ PHDRS
@end smallexample
The @var{name} is used only for reference in the @code{SECTIONS} command
-of the linker script. It does not get put into the output file.
-
-Certain program header types describe segments of memory which are
-loaded from the file by the system loader. In the linker script, the
-contents of these segments are specified by directing allocated output
-sections to be placed in the segment. To do this, the command
-describing the output section in the @code{SECTIONS} command should use
-@samp{:@var{name}}, where @var{name} is the name of the program header
-as it appears in the @code{PHDRS} command. @xref{Section Options}.
-
-It is normal for certain sections to appear in more than one segment.
-This merely implies that one segment of memory contains another. This
-is specified by repeating @samp{:@var{name}}, using it once for each
-program header in which the section is to appear.
-
-If a section is placed in one or more segments using @samp{:@var{name}},
-then all subsequent allocated sections which do not specify
-@samp{:@var{name}} are placed in the same segments. This is for
+of the linker script. It is not put into the output file. Program
+header names are stored in a separate name space, and will not conflict
+with symbol names, file names, or section names. Each program header
+must have a distinct name.
+
+Certain program header types describe segments of memory which the
+system loader will load from the file. In the linker script, you
+specify the contents of these segments by placing allocatable output
+sections in the segments. You use the @samp{:@var{phdr}} output section
+attribute to place a section in a particular segment. @xref{Output
+Section Phdr}.
+
+It is normal to put certain sections in more than one segment. This
+merely implies that one segment of memory contains another. You may
+repeat @samp{:@var{phdr}}, using it once for each segment which should
+contain the section.
+
+If you place a section in one or more segments using @samp{:@var{phdr}},
+then the linker will place all subsequent allocatable sections which do
+not specify @samp{:@var{phdr}} in the same segments. This is for
convenience, since generally a whole set of contiguous sections will be
-placed in a single segment. To prevent a section from being assigned to
-a segment when it would normally default to one, use @code{:NONE}.
+placed in a single segment. You can use @code{:NONE} to override the
+default segment and tell the linker to not put the section in any
+segment at all.
-The @code{FILEHDR} and @code{PHDRS} keywords which may appear after the
-program header type also indicate contents of the segment of memory.
+@kindex FILEHDR
+@kindex PHDRS
+You may use the @code{FILEHDR} and @code{PHDRS} keywords appear after
+the program header type to further describe the contents of the segment.
The @code{FILEHDR} keyword means that the segment should include the ELF
file header. The @code{PHDRS} keyword means that the segment should
include the ELF program headers themselves.
@@ -2733,20 +3139,20 @@ An expression giving the numeric type of the program header. This may
be used for types not defined above.
@end table
-It is possible to specify that a segment should be loaded at a
-particular address in memory. This is done using an @code{AT}
-expression. This is identical to the @code{AT} command used in the
-@code{SECTIONS} command (@pxref{Section Options}). Using the @code{AT}
-command for a program header overrides any information in the
-@code{SECTIONS} command.
+You can specify that a segment should be loaded at a particular address
+in memory by using an @code{AT} expression. This is identical to the
+@code{AT} command used as an output section attribute (@pxref{Output
+Section LMA}). The @code{AT} command for a program header overrides the
+output section attribute.
-Normally the segment flags are set based on the sections. The
-@code{FLAGS} keyword may be used to explicitly specify the segment
-flags. The value of @var{flags} must be an integer. It is used to
-set the @code{p_flags} field of the program header.
+The linker will normally set the segment flags based on the sections
+which comprise the segment. You may use the @code{FLAGS} keyword to
+explicitly specify the segment flags. The value of @var{flags} must be
+an integer. It is used to set the @code{p_flags} field of the program
+header.
-Here is an example of the use of @code{PHDRS}. This shows a typical set
-of program headers used on a native ELF system.
+Here is an example of @code{PHDRS}. This shows a typical set of program
+headers used on a native ELF system.
@example
@group
@@ -2774,84 +3180,33 @@ SECTIONS
@end group
@end example
-@node Entry Point
-@section The Entry Point
-@kindex ENTRY(@var{symbol})
-@cindex start of execution
-@cindex first instruction
-The linker command language includes a command specifically for
-defining the first executable instruction in an output file (its
-@dfn{entry point}). Its argument is a symbol name:
-@smallexample
-ENTRY(@var{symbol})
-@end smallexample
-
-Like symbol assignments, the @code{ENTRY} command may be placed either
-as an independent command in the command file, or among the section
-definitions within the @code{SECTIONS} command---whatever makes the most
-sense for your layout.
-
-@cindex entry point, defaults
-@code{ENTRY} is only one of several ways of choosing the entry point.
-You may indicate it in any of the following ways (shown in descending
-order of priority: methods higher in the list override methods lower down).
-@itemize @bullet
-@item
-the @samp{-e} @var{entry} command-line option;
-@item
-the @code{ENTRY(@var{symbol})} command in a linker control script;
-@item
-the value of the symbol @code{start}, if present;
-@item
-the address of the first byte of the @code{.text} section, if present;
-@item
-The address @code{0}.
-@end itemize
-
-For example, you can use these rules to generate an entry point with an
-assignment statement: if no symbol @code{start} is defined within your
-input files, you can simply define it, assigning it an appropriate
-value---
-
-@smallexample
-start = 0x2020;
-@end smallexample
-
-@noindent
-The example shows an absolute address, but you can use any expression.
-For example, if your input object files use some other symbol-name
-convention for the entry point, you can just assign the value of
-whatever symbol contains the start address to @code{start}:
-
-@smallexample
-start = other_symbol ;
-@end smallexample
-
-@node Version Script
-@section Version Script
+@node VERSION
+@section VERSION Command
@kindex VERSION @{script text@}
@cindex symbol versions
@cindex version script
@cindex versions of symbols
-The linker command script includes a command specifically for
-specifying a version script, and is only meaningful for ELF platforms
-that support shared libraries. A version script can be
-build directly into the linker script that you are using, or you
-can supply the version script as just another input file to the linker
-at the time that you link. The command script syntax is:
+The linker supports symbol versions when using ELF. Symbol versions are
+only useful when using shared libraries. The dynamic linker can use
+symbol versions to select a specific version of a function when it runs
+a program that may have been linked against an earlier version of the
+shared library.
+
+You can include a version script directly in the main linker script, or
+you can supply the version script as an implicit linker script. You can
+also use the @samp{--version-script} linker option.
+
+The syntax of the @code{VERSION} command is simply
@smallexample
-VERSION @{ version script contents @}
+VERSION @{ version-script-commands @}
@end smallexample
-The version script can also be specified to the linker by means of the
-@samp{--version-script} linker command line option.
-Version scripts are only meaningful when creating shared libraries.
-
-The format of the version script itself is identical to that used by
-Sun's linker in Solaris 2.5. Versioning is done by defining a tree of
-version nodes with the names and interdependencies specified in the
-version script. The version script can specify which symbols are bound
-to which version nodes, and it can reduce a specified set of symbols to
-local scope so that they are not globally visible outside of the shared
+
+The format of the version script commands is identical to that used by
+Sun's linker in Solaris 2.5. The version script defines a tree of
+version nodes. You specify the node names and interdependencies in the
+version script. You can specify which symbols are bound to which
+version nodes, and you can reduce a specified set of symbols to local
+scope so that they are not globally visible outside of the shared
library.
The easiest way to demonstrate the version script language is with a few
@@ -2876,40 +3231,41 @@ VERS_2.0 @{
@} VERS_1.2;
@end smallexample
-In this example, three version nodes are defined. @samp{VERS_1.1} is the
-first version node defined, and has no other dependencies. The symbol
-@samp{foo1} is bound to this version node, and a number of symbols
-that have appeared within various object files are reduced in scope to
-local so that they are not visible outside of the shared library.
+This example version script defines three version nodes. The first
+version node defined is @samp{VERS_1.1}; it has no other dependencies.
+The script binds the symbol @samp{foo1} to @samp{VERS_1.1}. It reduces
+a number of symbols to local scope so that they are not visible outside
+of the shared library.
-Next, the node @samp{VERS_1.2} is defined. It depends upon
-@samp{VERS_1.1}. The symbol @samp{foo2} is bound to this version node.
+Next, the version script defines node @samp{VERS_1.2}. This node
+depends upon @samp{VERS_1.1}. The script binds the symbol @samp{foo2}
+to the version node @samp{VERS_1.2}.
-Finally, the node @samp{VERS_2.0} is defined. It depends upon
-@samp{VERS_1.2}. The symbols @samp{bar1} and @samp{bar2} are bound to
-this version node.
+Finally, the version script defines node @samp{VERS_2.0}. This node
+depends upon @samp{VERS_1.2}. The scripts binds the symbols @samp{bar1}
+and @samp{bar2} are bound to the version node @samp{VERS_2.0}.
-Symbols defined in the library which aren't specifically bound to a
-version node are effectively bound to an unspecified base version of the
-library. It is possible to bind all otherwise unspecified symbols to a
-given version node using @samp{global: *} somewhere in the version
-script.
+When the linker finds a symbol defined in a library which is not
+specifically bound to a version node, it will effectively bind it to an
+unspecified base version of the library. You can bind all otherwise
+unspecified symbols to a given version node by using @samp{global: *}
+somewhere in the version script.
-Lexically the names of the version nodes have no specific meaning other
-than what they might suggest to the person reading them. The @samp{2.0}
-version could just as well have appeared in between @samp{1.1} and
-@samp{1.2}. However, this would be a confusing way to write a version
-script.
+The names of the version nodes have no specific meaning other than what
+they might suggest to the person reading them. The @samp{2.0} version
+could just as well have appeared in between @samp{1.1} and @samp{1.2}.
+However, this would be a confusing way to write a version script.
When you link an application against a shared library that has versioned
-symbols, the application itself knows which version of each symbol it requires,
-and it also knows which version nodes it needs from each shared library it is
-linked against. Thus at runtime, the dynamic loader can make a quick check to
-make sure that the libraries you have linked against do in fact supply all
-of the version nodes that the application will need to resolve all of the
-dynamic symbols. In this way it is possible for the dynamic linker to know
-with certainty that all external symbols that it needs will be resolvable
-without having to search for each symbol reference.
+symbols, the application itself knows which version of each symbol it
+requires, and it also knows which version nodes it needs from each
+shared library it is linked against. Thus at runtime, the dynamic
+loader can make a quick check to make sure that the libraries you have
+linked against do in fact supply all of the version nodes that the
+application will need to resolve all of the dynamic symbols. In this
+way it is possible for the dynamic linker to know with certainty that
+all external symbols that it needs will be resolvable without having to
+search for each symbol reference.
The symbol versioning is in effect a much more sophisticated way of
doing minor version checking that SunOS does. The fundamental problem
@@ -2925,25 +3281,24 @@ There are several GNU extensions to Sun's versioning approach. The
first of these is the ability to bind a symbol to a version node in the
source file where the symbol is defined instead of in the versioning
script. This was done mainly to reduce the burden on the library
-maintainer. This can be done by putting something like:
-
+maintainer. You can do this by putting something like:
@smallexample
__asm__(".symver original_foo,foo@@VERS_1.1");
@end smallexample
-
-in the C source file. This renamed the function @samp{original_foo} to
+@noindent
+in the C source file. This renames the function @samp{original_foo} to
be an alias for @samp{foo} bound to the version node @samp{VERS_1.1}.
The @samp{local:} directive can be used to prevent the symbol
@samp{original_foo} from being exported.
-The second GNU extension is to allow multiple versions of the same function
-to appear in a given shared library. In this way an incompatible change to
-an interface can take place without increasing the major version number of
-the shared library, while still allowing applications linked against the old
-interface to continue to function.
+The second GNU extension is to allow multiple versions of the same
+function to appear in a given shared library. In this way you can make
+an incompatible change to an interface without increasing the major
+version number of the shared library, while still allowing applications
+linked against the old interface to continue to function.
-This can only be accomplished by using multiple @samp{.symver}
-directives in the assembler. An example of this would be:
+To do this, you must use multiple @samp{.symver} directives in the
+source file. Here is an example:
@smallexample
__asm__(".symver original_foo,foo@@");
@@ -2959,214 +3314,502 @@ example would define 4 C functions: @samp{original_foo}, @samp{old_foo},
When you have multiple definitions of a given symbol, there needs to be
some way to specify a default version to which external references to
-this symbol will be bound. This can be accomplished with the
-@samp{foo@@@@VERS_2.0} type of @samp{.symver} directive. Only one version of
-a symbol can be declared 'default' in this manner - otherwise you would
-effectively have multiple definitions of the same symbol.
+this symbol will be bound. You can do this with the
+@samp{foo@@@@VERS_2.0} type of @samp{.symver} directive. You can only
+declare one version of a symbol as the default in this manner; otherwise
+you would effectively have multiple definitions of the same symbol.
If you wish to bind a reference to a specific version of the symbol
within the shared library, you can use the aliases of convenience
(i.e. @samp{old_foo}), or you can use the @samp{.symver} directive to
specifically bind to an external version of the function in question.
-@node Option Commands
-@section Option Commands
-The command language includes a number of other commands that you can
-use for specialized purposes. They are similar in purpose to
-command-line options.
+@node Expressions
+@section Expressions in Linker Scripts
+@cindex expressions
+@cindex arithmetic
+The syntax for expressions in the linker script language is identical to
+that of C expressions. All expressions are evaluated as integers. All
+expressions are evaluated in the same size, which is 32 bits if both the
+host and target are 32 bits, and is otherwise 64 bits.
-@table @code
-@kindex CONSTRUCTORS
-@cindex C++ constructors, arranging in link
-@cindex constructors, arranging in link
-@item CONSTRUCTORS
-When linking using the @code{a.out} object file format, the linker uses
-an unusual set construct to support C++ global constructors and
-destructors. When linking object file formats which do not support
-arbitrary sections, such as @code{ECOFF} and @code{XCOFF}, the linker
-will automatically recognize C++ global constructors and destructors by
-name. For these object file formats, the @code{CONSTRUCTORS} command
-tells the linker where this information should be placed. The
-@code{CONSTRUCTORS} command is ignored for other object file formats.
+You can use and set symbol values in expressions.
-The symbol @w{@code{__CTOR_LIST__}} marks the start of the global
-constructors, and the symbol @w{@code{__DTOR_LIST}} marks the end. The
-first word in the list is the number of entries, followed by the address
-of each constructor or destructor, followed by a zero word. The
-compiler must arrange to actually run the code. For these object file
-formats @sc{gnu} C++ calls constructors from a subroutine @code{__main};
-a call to @code{__main} is automatically inserted into the startup code
-for @code{main}. @sc{gnu} C++ runs destructors either by using
-@code{atexit}, or directly from the function @code{exit}.
+The linker defines several special purpose builtin functions for use in
+expressions.
-For object file formats such as @code{COFF} or @code{ELF} which support
-multiple sections, @sc{gnu} C++ will normally arrange to put the
-addresses of global constructors and destructors into the @code{.ctors}
-and @code{.dtors} sections. Placing the following sequence into your
-linker script will build the sort of table which the @sc{gnu} C++
-runtime code expects to see.
+@menu
+* Constants:: Constants
+* Symbols:: Symbol Names
+* Location Counter:: The Location Counter
+* Operators:: Operators
+* Evaluation:: Evaluation
+* Expression Section:: The Section of an Expression
+* Builtin Functions:: Builtin Functions
+@end menu
+@node Constants
+@subsection Constants
+@cindex integer notation
+@cindex constants in linker scripts
+All constants are integers.
+
+As in C, the linker considers an integer beginning with @samp{0} to be
+octal, and an integer beginning with @samp{0x} or @samp{0X} to be
+hexadecimal. The linker considers other integers to be decimal.
+
+@cindex scaled integers
+@cindex K and M integer suffixes
+@cindex M and K integer suffixes
+@cindex suffixes for integers
+@cindex integer suffixes
+In addition, you can use the suffixes @code{K} and @code{M} to scale a
+constant by
+@c TEXI2ROFF-KILL
+@ifinfo
+@c END TEXI2ROFF-KILL
+@code{1024} or @code{1024*1024}
+@c TEXI2ROFF-KILL
+@end ifinfo
+@tex
+${\rm 1024}$ or ${\rm 1024}^2$
+@end tex
+@c END TEXI2ROFF-KILL
+respectively. For example, the following all refer to the same quantity:
@smallexample
- __CTOR_LIST__ = .;
- LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
- *(.ctors)
- LONG(0)
- __CTOR_END__ = .;
- __DTOR_LIST__ = .;
- LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
- *(.dtors)
- LONG(0)
- __DTOR_END__ = .;
+ _fourk_1 = 4K;
+ _fourk_2 = 4096;
+ _fourk_3 = 0x1000;
@end smallexample
-Normally the compiler and linker will handle these issues automatically,
-and you will not need to concern yourself with them. However, you may
-need to consider this if you are using C++ and writing your own linker
-scripts.
+@node Symbols
+@subsection Symbol Names
+@cindex symbol names
+@cindex names
+@cindex quoted symbol names
+@kindex "
+Unless quoted, symbol names start with a letter, underscore, or period
+and may include letters, digits, underscores, periods, and hyphens.
+Unquoted symbol names must not conflict with any keywords. You can
+specify a symbol which contains odd characters or has the same name as a
+keyword by surrounding the symbol name in double quotes:
+@smallexample
+ "SECTION" = 9;
+ "with a space" = "also with a space" + 10;
+@end smallexample
-@need 1000
-@kindex FLOAT
-@kindex NOFLOAT
-@item FLOAT
-@itemx NOFLOAT
-These keywords were used in some older linkers to request a particular
-math subroutine library. @code{ld} doesn't use the keywords, assuming
-instead that any necessary subroutines are in libraries specified using
-the general mechanisms for linking to archives; but to permit the use of
-scripts that were written for the older linkers, the keywords
-@code{FLOAT} and @code{NOFLOAT} are accepted and ignored.
+Since symbols can contain many non-alphabetic characters, it is safest
+to delimit symbols with spaces. For example, @samp{A-B} is one symbol,
+whereas @samp{A - B} is an expression involving subtraction.
-@kindex FORCE_COMMON_ALLOCATION
-@cindex common allocation
-@item FORCE_COMMON_ALLOCATION
-This command has the same effect as the @samp{-d} command-line option:
-to make @code{ld} assign space to common symbols even if a relocatable
-output file is specified (@samp{-r}).
+@node Location Counter
+@subsection The Location Counter
+@kindex .
+@cindex dot
+@cindex location counter
+@cindex current output location
+The special linker variable @dfn{dot} @samp{.} always contains the
+current output location counter. Since the @code{.} always refers to a
+location in an output section, it may only appear in an expression
+within a @code{SECTIONS} command. The @code{.} symbol may appear
+anywhere that an ordinary symbol is allowed in an expression.
-@kindex INCLUDE @var{filename}
-@cindex including a linker script
-@item INCLUDE @var{filename}
-Include the linker script @var{filename} at this point. The file will
-be searched for in the current directory, and in any directory specified
-with the @code{-L} option. You can nest calls to @code{INCLUDE} up to
-10 levels deep.
+@cindex holes
+Assigning a value to @code{.} will cause the location counter to be
+moved. This may be used to create holes in the output section. The
+location counter may never be moved backwards.
-@kindex INPUT ( @var{files} )
-@cindex binary input files
-@item INPUT ( @var{file}, @var{file}, @dots{} )
-@itemx INPUT ( @var{file} @var{file} @dots{} )
-Use this command to include binary input files in the link, without
-including them in a particular section definition.
-Specify the full name for each @var{file}, including @samp{.a} if
-required.
+@smallexample
+SECTIONS
+@{
+ output :
+ @{
+ file1(.text)
+ . = . + 1000;
+ file2(.text)
+ . += 1000;
+ file3(.text)
+ @} = 0x1234;
+@}
+@end smallexample
+@noindent
+In the previous example, the @samp{.text} section from @file{file1} is
+located at the beginning of the output section @samp{output}. It is
+followed by a 1000 byte gap. Then the @samp{.text} section from
+@file{file2} appears, also with a 1000 byte gap following before the
+@samp{.text} section from @file{file3}. The notation @samp{= 0x1234}
+specifies what data to write in the gaps (@pxref{Output Section Fill}).
+
+@cindex dot inside sections
+Note: @code{.} actually refers to the byte offset from the start of the
+current containing object. Normally this is the @code{SECTIONS}
+statement, whoes start address is 0, hence @code{.} can be used as an
+absolute address. If @code{.} is used inside a section description
+however, it refers to the byte offset from the start of that section,
+not an absolute address. Thus in a script like this:
-@code{ld} searches for each @var{file} through the archive-library
-search path, just as for files you specify on the command line.
-See the description of @samp{-L} in @ref{Options,,Command Line
-Options}.
+@smallexample
+SECTIONS
+@{
+ . = 0x100
+ .text: @{
+ *(.text)
+ . = 0x200
+ @}
+ . = 0x500
+ .data: @{
+ *(.data)
+ . += 0x600
+ @}
+@}
+@end smallexample
-If you use @samp{-l@var{file}}, @code{ld} will transform the name to
-@code{lib@var{file}.a} as with the command line argument @samp{-l}.
+The @samp{.text} section will be assigned a starting address of 0x100
+and a size of exactly 0x200 bytes, even if there is not enough data in
+the @samp{.text} input sections to fill this area. (If there is too
+much data, an error will be produced because this would be an attempt to
+move @code{.} backwards). The @samp{.data} section will start at 0x500
+and it will have an extra 0x600 bytes worth of space after the end of
+the values from the @samp{.data} input sections and before the end of
+the @samp{.data} output section itself.
-@kindex GROUP ( @var{files} )
-@cindex grouping input files
-@item GROUP ( @var{file}, @var{file}, @dots{} )
-@itemx GROUP ( @var{file} @var{file} @dots{} )
-This command is like @code{INPUT}, except that the named files should
-all be archives, and they are searched repeatedly until no new undefined
-references are created. See the description of @samp{-(} in
-@ref{Options,,Command Line Options}.
+@need 2000
+@node Operators
+@subsection Operators
+@cindex operators for arithmetic
+@cindex arithmetic operators
+@cindex precedence in expressions
+The linker recognizes the standard C set of arithmetic operators, with
+the standard bindings and precedence levels:
+@c TEXI2ROFF-KILL
+@ifinfo
+@c END TEXI2ROFF-KILL
+@smallexample
+precedence associativity Operators Notes
+(highest)
+1 left ! - ~ (1)
+2 left * / %
+3 left + -
+4 left >> <<
+5 left == != > < <= >=
+6 left &
+7 left |
+8 left &&
+9 left ||
+10 right ? :
+11 right &= += -= *= /= (2)
+(lowest)
+@end smallexample
+Notes:
+(1) Prefix operators
+(2) @xref{Assignments}.
+@c TEXI2ROFF-KILL
+@end ifinfo
+@tex
+\vskip \baselineskip
+%"lispnarrowing" is the extra indent used generally for smallexample
+\hskip\lispnarrowing\vbox{\offinterlineskip
+\hrule
+\halign
+{\vrule#&\strut\hfil\ #\ \hfil&\vrule#&\strut\hfil\ #\ \hfil&\vrule#&\strut\hfil\ {\tt #}\ \hfil&\vrule#\cr
+height2pt&\omit&&\omit&&\omit&\cr
+&Precedence&& Associativity &&{\rm Operators}&\cr
+height2pt&\omit&&\omit&&\omit&\cr
+\noalign{\hrule}
+height2pt&\omit&&\omit&&\omit&\cr
+&highest&&&&&\cr
+% '176 is tilde, '~' in tt font
+&1&&left&&\qquad- \char'176\ !\qquad\dag&\cr
+&2&&left&&* / \%&\cr
+&3&&left&&+ -&\cr
+&4&&left&&>> <<&\cr
+&5&&left&&== != > < <= >=&\cr
+&6&&left&&\&&\cr
+&7&&left&&|&\cr
+&8&&left&&{\&\&}&\cr
+&9&&left&&||&\cr
+&10&&right&&? :&\cr
+&11&&right&&\qquad\&= += -= *= /=\qquad\ddag&\cr
+&lowest&&&&&\cr
+height2pt&\omit&&\omit&&\omit&\cr}
+\hrule}
+@end tex
+@iftex
+{
+@obeylines@parskip=0pt@parindent=0pt
+@dag@quad Prefix operators.
+@ddag@quad @xref{Assignments}.
+}
+@end iftex
+@c END TEXI2ROFF-KILL
-@ignore
-@kindex MAP ( @var{name} )
-@item MAP ( @var{name} )
-@c MAP(...) appears to look for an F in the arg, ignoring all other
-@c chars; if it finds one, it sets "map_option_f" to true. But nothing
-@c checks map_option_f. Apparently a stub for the future...
-@end ignore
+@node Evaluation
+@subsection Evaluation
+@cindex lazy evaluation
+@cindex expression evaluation order
+The linker evaluates expressions lazily. It only computes the value of
+an expression when absolutely necessary.
-@kindex OUTPUT ( @var{filename} )
-@cindex naming the output file
-@item OUTPUT ( @var{filename} )
-Use this command to name the link output file @var{filename}. The
-effect of @code{OUTPUT(@var{filename})} is identical to the effect of
-@w{@samp{-o @var{filename}}}, which overrides it. You can use this
-command to supply a default output-file name other than @code{a.out}.
+The linker needs some information, such as the value of the start
+address of the first section, and the origins and lengths of memory
+regions, in order to do any linking at all. These values are computed
+as soon as possible when the linker reads in the linker script.
-@ifclear SingleFormat
-@kindex OUTPUT_ARCH ( @var{bfdname} )
-@cindex machine architecture, output
-@item OUTPUT_ARCH ( @var{bfdname} )
-Specify a particular output machine architecture, with one of the names
-used by the BFD back-end routines (@pxref{BFD}). This command is often
-unnecessary; the architecture is most often set implicitly by either the
-system BFD configuration or as a side effect of the @code{OUTPUT_FORMAT}
-command.
-
-@kindex OUTPUT_FORMAT ( @var{bfdname} )
-@cindex format, output file
-@item OUTPUT_FORMAT ( @var{bfdname} )
-When @code{ld} is configured to support multiple object code formats,
-you can use this command to specify a particular output format.
-@var{bfdname} is one of the names used by the BFD back-end routines
-(@pxref{BFD}). The effect is identical to the effect of the
-@samp{--oformat} command-line option. This selection affects only the
-output file; the related command @code{TARGET} affects primarily input
-files.
-@end ifclear
+However, other values (such as symbol values) are not known or needed
+until after storage allocation. Such values are evaluated later, when
+other information (such as the sizes of output sections) is available
+for use in the symbol assignment expression.
-@kindex SEARCH_DIR ( @var{path} )
-@cindex path for libraries
-@cindex search path, libraries
-@item SEARCH_DIR ( @var{path} )
-Add @var{path} to the list of paths where @code{ld} looks for
-archive libraries. @code{SEARCH_DIR(@var{path})} has the same
-effect as @samp{-L@var{path}} on the command line.
+The sizes of sections cannot be known until after allocation, so
+assignments dependent upon these are not performed until after
+allocation.
-@kindex STARTUP ( @var{filename} )
-@cindex first input file
-@item STARTUP ( @var{filename} )
-Ensure that @var{filename} is the first input file used in the link
-process.
+Some expressions, such as those depending upon the location counter
+@samp{.}, must be evaluated during section allocation.
-@ifclear SingleFormat
-@cindex input file format
-@kindex TARGET ( @var{format} )
-@item TARGET ( @var{format} )
-When @code{ld} is configured to support multiple object code formats,
-you can use this command to change the input-file object code format
-(like the command-line option @samp{-b} or its synonym @samp{--format}).
-The argument @var{format} is one of the strings used by BFD to name
-binary formats. If @code{TARGET} is specified but @code{OUTPUT_FORMAT}
-is not, the last @code{TARGET} argument is also used as the default
-format for the @code{ld} output file. @xref{BFD}.
+If the result of an expression is required, but the value is not
+available, then an error results. For example, a script like the
+following
+@smallexample
+@group
+SECTIONS
+ @{
+ .text 9+this_isnt_constant :
+ @{ *(.text) @}
+ @}
+@end group
+@end smallexample
+@noindent
+will cause the error message @samp{non constant expression for initial
+address}.
+
+@node Expression Section
+@subsection The Section of an Expression
+@cindex expression sections
+@cindex absolute expressions
+@cindex relative expressions
+@cindex absolute and relocatable symbols
+@cindex relocatable and absolute symbols
+@cindex symbols, relocatable and absolute
+When the linker evaluates an expression, the result is either absolute
+or relative to some section. A relative expression is expressed as a
+fixed offset from the base of a section.
+
+The position of the expression within the linker script determines
+whether it is absolute or relative. An expression which appears within
+an output section definition is relative to the base of the output
+section. An expression which appears elsewhere will be absolute.
+
+A symbol set to a relative expression will be relocatable if you request
+relocatable output using the @samp{-r} option. That means that a
+further link operation may change the value of the symbol. The symbol's
+section will be the section of the relative expression.
+
+A symbol set to an absolute expression will retain the same value
+through any further link operation. The symbol will be absolute, and
+will not have any particular associated section.
+
+You can use the builtin function @code{ABSOLUTE} to force an expression
+to be absolute when it would otherwise be relative. For example, to
+create an absolute symbol set to the address of the end of the output
+section @samp{.data}:
+@smallexample
+SECTIONS
+ @{
+ .data : @{ *(.data) _edata = ABSOLUTE(.); @}
+ @}
+@end smallexample
+@noindent
+If @samp{ABSOLUTE} were not used, @samp{_edata} would be relative to the
+@samp{.data} section.
-@kindex GNUTARGET
-If you don't use the @code{TARGET} command, @code{ld} uses the value of
-the environment variable @code{GNUTARGET}, if available, to select the
-output file format. If that variable is also absent, @code{ld} uses
-the default format configured for your machine in the BFD libraries.
-@end ifclear
+@node Builtin Functions
+@subsection Builtin Functions
+@cindex functions in expressions
+The linker script language includes a number of builtin functions for
+use in linker script expressions.
-@cindex cross references
-@kindex NOCROSSREFS ( @var{sections} )
-@item NOCROSSREFS ( @var{section} @var{section} @dots{} )
-This command may be used to tell @code{ld} to issue an error about any
-references among certain sections.
+@table @code
+@item ABSOLUTE(@var{exp})
+@kindex ABSOLUTE(@var{exp})
+@cindex expression, absolute
+Return the absolute (non-relocatable, as opposed to non-negative) value
+of the expression @var{exp}. Primarily useful to assign an absolute
+value to a symbol within a section definition, where symbol values are
+normally section relative. @xref{Expression Section}.
+
+@item ADDR(@var{section})
+@kindex ADDR(@var{section})
+@cindex section address in expression
+Return the absolute address (the VMA) of the named @var{section}. Your
+script must previously have defined the location of that section. In
+the following example, @code{symbol_1} and @code{symbol_2} are assigned
+identical values:
+@smallexample
+@group
+SECTIONS @{ @dots{}
+ .output1 :
+ @{
+ start_of_output_1 = ABSOLUTE(.);
+ @dots{}
+ @}
+ .output :
+ @{
+ symbol_1 = ADDR(.output1);
+ symbol_2 = start_of_output_1;
+ @}
+@dots{} @}
+@end group
+@end smallexample
-In certain types of programs, particularly on embedded systems, when one
-section is loaded into memory, another section will not be. Any direct
-references between the two sections would be errors. For example, it
-would be an error if code in one section called a function defined in
-the other section.
+@item ALIGN(@var{exp})
+@kindex ALIGN(@var{exp})
+@cindex round up location counter
+@cindex align location counter
+Return the location counter (@code{.}) aligned to the next @var{exp}
+boundary. @var{exp} must be an expression whose value is a power of
+two. This is equivalent to
+@smallexample
+(. + @var{exp} - 1) & ~(@var{exp} - 1)
+@end smallexample
-The @code{NOCROSSREFS} command takes a list of section names. If
-@code{ld} detects any cross references between the sections, it reports
-an error and returns a non-zero exit status. The @code{NOCROSSREFS}
-command uses output section names, defined in the @code{SECTIONS}
-command. It does not use the names of input sections.
+@code{ALIGN} doesn't change the value of the location counter---it just
+does arithmetic on it. Here is an example which aligns the output
+@code{.data} section to the next @code{0x2000} byte boundary after the
+preceding section and sets a variable within the section to the next
+@code{0x8000} boundary after the input sections:
+@smallexample
+@group
+SECTIONS @{ @dots{}
+ .data ALIGN(0x2000): @{
+ *(.data)
+ variable = ALIGN(0x8000);
+ @}
+@dots{} @}
+@end group
+@end smallexample
+@noindent
+The first use of @code{ALIGN} in this example specifies the location of
+a section because it is used as the optional @var{address} attribute of
+a section definition (@pxref{Output Section Address}). The second use
+of @code{ALIGN} is used to defines the value of a symbol.
+
+The builtin function @code{NEXT} is closely related to @code{ALIGN}.
+
+@item BLOCK(@var{exp})
+@kindex BLOCK(@var{exp})
+This is a synonym for @code{ALIGN}, for compatibility with older linker
+scripts. It is most often seen when setting the address of an output
+section.
+
+@item DEFINED(@var{symbol})
+@kindex DEFINED(@var{symbol})
+@cindex symbol defaults
+Return 1 if @var{symbol} is in the linker global symbol table and is
+defined, otherwise return 0. You can use this function to provide
+default values for symbols. For example, the following script fragment
+shows how to set a global symbol @samp{begin} to the first location in
+the @samp{.text} section---but if a symbol called @samp{begin} already
+existed, its value is preserved:
+
+@smallexample
+@group
+SECTIONS @{ @dots{}
+ .text : @{
+ begin = DEFINED(begin) ? begin : . ;
+ @dots{}
+ @}
+ @dots{}
+@}
+@end group
+@end smallexample
+
+@item LOADADDR(@var{section})
+@kindex LOADADDR(@var{section})
+@cindex section load address in expression
+Return the absolute LMA of the named @var{section}. This is normally
+the same as @code{ADDR}, but it may be different if the @code{AT}
+attribute is used in the output section definition (@pxref{Output
+Section LMA}).
+
+@kindex MAX
+@item MAX(@var{exp1}, @var{exp2})
+Returns the maximum of @var{exp1} and @var{exp2}.
+
+@kindex MIN
+@item MIN(@var{exp1}, @var{exp2})
+Returns the minimum of @var{exp1} and @var{exp2}.
+
+@item NEXT(@var{exp})
+@kindex NEXT(@var{exp})
+@cindex unallocated address, next
+Return the next unallocated address that is a multiple of @var{exp}.
+This function is closely related to @code{ALIGN(@var{exp})}; unless you
+use the @code{MEMORY} command to define discontinuous memory for the
+output file, the two functions are equivalent.
+
+@item SIZEOF(@var{section})
+@kindex SIZEOF(@var{section})
+@cindex section size
+Return the size in bytes of the named @var{section}, if that section has
+been allocated. If the section has not been allocated when this is
+evaluated, the linker will report an error. In the following example,
+@code{symbol_1} and @code{symbol_2} are assigned identical values:
+@smallexample
+@group
+SECTIONS@{ @dots{}
+ .output @{
+ .start = . ;
+ @dots{}
+ .end = . ;
+ @}
+ symbol_1 = .end - .start ;
+ symbol_2 = SIZEOF(.output);
+@dots{} @}
+@end group
+@end smallexample
+
+@item SIZEOF_HEADERS
+@itemx sizeof_headers
+@kindex SIZEOF_HEADERS
+@cindex header size
+Return the size in bytes of the output file's headers. This is
+information which appears at the start of the output file. You can use
+this number when setting the start address of the first section, if you
+choose, to facilitate paging.
+
+@cindex not enough room for program headers
+@cindex program headers, not enough room
+When producing an ELF output file, if the linker script uses the
+@code{SIZEOF_HEADERS} builtin function, the linker must compute the
+number of program headers before it has determined all the section
+addresses and sizes. If the linker later discovers that it needs
+additional program headers, it will report an error @samp{not enough
+room for program headers}. To avoid this error, you must avoid using
+the @code{SIZEOF_HEADERS} function, or you must rework your linker
+script to avoid forcing the linker to use additional program headers, or
+you must define the program headers yourself using the @code{PHDRS}
+command (@pxref{PHDRS}).
@end table
+@node Implicit Linker Scripts
+@section Implicit Linker Scripts
+@cindex implicit linker scripts
+If you specify a linker input file which the linker can not recognize as
+an object file or an archive file, it will try to read the file as a
+linker script. If the file can not be parsed as a linker script, the
+linker will report an error.
+
+An implicit linker script will not replace the default linker script.
+
+Typically an implicit linker script would contain only symbol
+assignments, or the @code{INPUT}, @code{GROUP}, or @code{VERSION}
+commands.
+
+Any input files read because of an implicit linker script will be read
+at the position in the command line where the implicit linker script was
+read. This can affect archive searching.
+
@ifset GENERIC
@node Machine Dependent
@chapter Machine Dependent Features
@@ -3179,6 +3822,7 @@ functionality are not listed.
@menu
* H8/300:: @code{ld} and the H8/300
* i960:: @code{ld} and the Intel 960 family
+* ARM:: @code{ld} and the ARM family
@end menu
@end ifset
@@ -3188,6 +3832,7 @@ functionality are not listed.
@ifclear GENERIC
@raisesections
@end ifclear
+
@node H8/300
@section @code{ld} and the H8/300
@@ -3213,6 +3858,7 @@ page of memory, and changes them to use the eight-bit address form.
@samp{mov.b @code{@@}@var{aa}:8} whenever the address @var{aa} is in the
top page of memory).
@end table
+
@ifclear GENERIC
@lowersections
@end ifclear
@@ -3235,6 +3881,7 @@ these chips.
@ifclear GENERIC
@raisesections
@end ifclear
+
@node i960
@section @code{ld} and the Intel 960 family
@@ -3287,6 +3934,39 @@ not itself call any subroutines).
@end ifclear
@end ifset
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node ARM
+@section @code{ld}'s support for interworking between ARM and Thumb code
+
+@cindex ARM interworking support
+@kindex --support-old-code
+For the ARM, @code{ld} will generate code stubs to allow functions calls
+betweem ARM and Thumb code. These stubs only work with code that has
+been compiled and assembled with the @samp{-mthumb-interwork} command
+line option. If it is necessary to link with old ARM object files or
+libraries, which have not been compiled with the -mthumb-interwork
+option then the @samp{--support-old-code} command line switch should be
+given to the linker. This will make it generate larger stub functions
+which will work with non-interworking aware ARM code. Note, however,
+the linker does not support generating stubs for function calls to
+non-interworking aware Thumb code.
+
+@cindex thumb entry point
+@cindex entry point, thumb
+@kindex --thumb-entry=@var{entry}
+The @samp{--thumb-entry} switch is a duplicate of the generic
+@samp{--entry} switch, in that it sets the program's starting address.
+But it also sets the bottom bit of the address, so that it can be
+branched to using a BX instruction, and the program will start
+executing in Thumb mode straight away.
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+
@ifclear SingleFormat
@node BFD
@chapter BFD
@@ -3393,8 +4073,8 @@ You can find contact information for many support companies and
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{ld}
-to @samp{bug-gnu-utils@@gnu.org}.
+Otherwise, send bug reports for @code{ld} to
+@samp{bug-gnu-utils@@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
@@ -3546,10 +4226,10 @@ things without first using the debugger to find the facts.
To aid users making the transition to @sc{gnu} @code{ld} from the MRI
linker, @code{ld} can use MRI compatible linker scripts as an
alternative to the more general-purpose linker scripting language
-described in @ref{Commands,,Command Language}. MRI compatible linker
-scripts have a much simpler command set than the scripting language
-otherwise used with @code{ld}. @sc{gnu} @code{ld} supports the most
-commonly used MRI linker commands; these commands are described here.
+described in @ref{Scripts}. MRI compatible linker scripts have a much
+simpler command set than the scripting language otherwise used with
+@code{ld}. @sc{gnu} @code{ld} supports the most commonly used MRI
+linker commands; these commands are described here.
In general, MRI scripts aren't of much use with the @code{a.out} object
file format, since it only has three sections and MRI scripts lack some
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
index 7022daf..e208106 100644
--- a/contrib/binutils/ld/ldcref.c
+++ b/contrib/binutils/ld/ldcref.c
@@ -1,5 +1,5 @@
/* ldcref.c -- output a cross reference table
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -151,7 +151,7 @@ add_cref (name, abfd, section, value)
const char *name;
bfd *abfd;
asection *section;
- bfd_vma value;
+ bfd_vma value ATTRIBUTE_UNUSED;
{
struct cref_hash_entry *h;
struct cref_ref *r;
@@ -159,13 +159,13 @@ add_cref (name, abfd, section, value)
if (! cref_initialized)
{
if (! bfd_hash_table_init (&cref_table.root, cref_hash_newfunc))
- einfo ("%X%P: bfd_hash_table_init of cref table failed: %E\n");
+ einfo (_("%X%P: bfd_hash_table_init of cref table failed: %E\n"));
cref_initialized = true;
}
h = cref_hash_lookup (&cref_table, name, true, false);
if (h == NULL)
- einfo ("%X%P: cref_hash_lookup failed: %E\n");
+ einfo (_("%X%P: cref_hash_lookup failed: %E\n"));
for (r = h->refs; r != NULL; r = r->next)
if (r->abfd == abfd)
@@ -234,20 +234,22 @@ output_cref (fp)
{
int len;
struct cref_hash_entry **csyms, **csym_fill, **csym, **csym_end;
+ const char *msg;
- fprintf (fp, "\nCross Reference Table\n\n");
- fprintf (fp, "Symbol");
- len = sizeof "Symbol" - 1;
+ fprintf (fp, _("\nCross Reference Table\n\n"));
+ msg = _("Symbol");
+ fprintf (fp, "%s", msg);
+ len = strlen (msg);
while (len < FILECOL)
{
putc (' ' , fp);
++len;
}
- fprintf (fp, "File\n");
+ fprintf (fp, _("File\n"));
if (! cref_initialized)
{
- fprintf (fp, "No symbols\n");
+ fprintf (fp, _("No symbols\n"));
return;
}
@@ -352,7 +354,7 @@ check_nocrossrefs ()
static boolean
check_nocrossref (h, ignore)
struct cref_hash_entry *h;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
struct bfd_link_hash_entry *hl;
asection *defsec;
@@ -364,7 +366,7 @@ check_nocrossref (h, ignore)
false, true);
if (hl == NULL)
{
- einfo ("%P: symbol `%T' missing from main hash table\n",
+ einfo (_("%P: symbol `%T' missing from main hash table\n"),
h->root.string);
return true;
}
@@ -436,11 +438,11 @@ check_refs (h, hl, ncrs)
symsize = bfd_get_symtab_upper_bound (ref->abfd);
if (symsize < 0)
- einfo ("%B%F: could not read symbols; %E\n", ref->abfd);
+ einfo (_("%B%F: could not read symbols; %E\n"), ref->abfd);
asymbols = (asymbol **) xmalloc (symsize);
symbol_count = bfd_canonicalize_symtab (ref->abfd, asymbols);
if (symbol_count < 0)
- einfo ("%B%F: could not read symbols: %E\n", ref->abfd);
+ einfo (_("%B%F: could not read symbols: %E\n"), ref->abfd);
if (li != NULL)
{
li->asymbols = asymbols;
@@ -512,14 +514,14 @@ check_reloc_refs (abfd, sec, iarg)
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
- einfo ("%B%F: could not read relocs: %E\n", abfd);
+ einfo (_("%B%F: could not read relocs: %E\n"), abfd);
if (relsize == 0)
return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
if (relcount < 0)
- einfo ("%B%F: could not read relocs: %E\n", abfd);
+ einfo (_("%B%F: could not read relocs: %E\n"), abfd);
p = relpp;
pend = p + relcount;
@@ -537,7 +539,7 @@ check_reloc_refs (abfd, sec, iarg)
in OUTSECNAME. This reloc is from a section which is
mapped into a section from which references to OUTSECNAME
are prohibited. We must report an error. */
- einfo ("%X%C: prohibited cross reference from %s to `%T' in %s\n",
+ einfo (_("%X%C: prohibited cross reference from %s to `%T' in %s\n"),
abfd, sec, q->address, outsecname,
bfd_asymbol_name (*q->sym_ptr_ptr), outdefsecname);
}
diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c
index 6e40938..0a434b8 100644
--- a/contrib/binutils/ld/ldctor.c
+++ b/contrib/binutils/ld/ldctor.c
@@ -1,5 +1,6 @@
/* ldctor.c -- constructor support routines
- Copyright (C) 1991, 92, 93, 94, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -15,13 +16,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
+#include <ctype.h>
+
#include "ld.h"
#include "ldexp.h"
#include "ldlang.h"
@@ -30,10 +34,18 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
#include "ldmain.h"
#include "ldctor.h"
+static int ctor_prio PARAMS ((const char *));
+static int ctor_cmp PARAMS ((const PTR, const PTR));
+
/* The list of statements needed to handle constructors. These are
invoked by the command CONSTRUCTORS in the linker script. */
lang_statement_list_type constructor_list;
+/* Whether the constructors should be sorted. Note that this is
+ global for the entire link; we assume that there is only a single
+ CONSTRUCTORS command in the linker script. */
+boolean constructors_sorted;
+
/* The sets we have seen. */
struct set_info *sets;
@@ -74,7 +86,7 @@ ldctor_add_set_entry (h, reloc, name, section, value)
{
if (p->reloc != reloc)
{
- einfo ("%P%X: Different relocs used in set %s\n", h->root.string);
+ einfo (_("%P%X: Different relocs used in set %s\n"), h->root.string);
return;
}
@@ -91,7 +103,7 @@ ldctor_add_set_entry (h, reloc, name, section, value)
&& strcmp (bfd_get_target (section->owner),
bfd_get_target (p->elements->section->owner)) != 0)
{
- einfo ("%P%X: Different object file formats composing set %s\n",
+ einfo (_("%P%X: Different object file formats composing set %s\n"),
h->root.string);
return;
}
@@ -110,6 +122,80 @@ ldctor_add_set_entry (h, reloc, name, section, value)
++p->count;
}
+/* Get the priority of a g++ global constructor or destructor from the
+ symbol name. */
+
+static int
+ctor_prio (name)
+ const char *name;
+{
+ /* The name will look something like _GLOBAL_$I$65535$test02__Fv.
+ There might be extra leading underscores, and the $ characters
+ might be something else. The I might be a D. */
+
+ while (*name == '_')
+ ++name;
+
+ if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
+ return -1;
+
+ name += sizeof "GLOBAL_" - 1;
+
+ if (name[0] != name[2])
+ return -1;
+ if (name[1] != 'I' && name[1] != 'D')
+ return -1;
+ if (! isdigit ((unsigned char) name[3]))
+ return -1;
+
+ return atoi (name + 3);
+}
+
+/* This function is used to sort constructor elements by priority. It
+ is called via qsort. */
+
+static int
+ctor_cmp (p1, p2)
+ const PTR p1;
+ const PTR p2;
+{
+ const struct set_element **pe1 = (const struct set_element **) p1;
+ const struct set_element **pe2 = (const struct set_element **) p2;
+ const char *n1;
+ const char *n2;
+ int prio1;
+ int prio2;
+
+ n1 = (*pe1)->name;
+ if (n1 == NULL)
+ n1 = "";
+ n2 = (*pe2)->name;
+ if (n2 == NULL)
+ n2 = "";
+
+ /* We need to sort in reverse order by priority. When two
+ constructors have the same priority, we should maintain their
+ current relative position. */
+
+ prio1 = ctor_prio (n1);
+ prio2 = ctor_prio (n2);
+
+ /* We sort in reverse order because that is what g++ expects. */
+ if (prio1 < prio2)
+ return 1;
+ else if (prio1 > prio2)
+ return -1;
+
+ /* Force a stable sort. */
+
+ if (pe1 < pe2)
+ return -1;
+ else if (pe1 > pe2)
+ return 1;
+ else
+ return 0;
+}
+
/* This function is called after the first phase of the link and
before the second phase. At this point all set information has
been gathered. We now put the statements to build the sets
@@ -129,6 +215,42 @@ ldctor_build_sets ()
return;
called = true;
+ if (constructors_sorted)
+ {
+ for (p = sets; p != NULL; p = p->next)
+ {
+ int c, i;
+ struct set_element *e;
+ struct set_element **array;
+
+ if (p->elements == NULL)
+ continue;
+
+ c = 0;
+ for (e = p->elements; e != NULL; e = e->next)
+ ++c;
+
+ array = (struct set_element **) xmalloc (c * sizeof *array);
+
+ i = 0;
+ for (e = p->elements; e != NULL; e = e->next)
+ {
+ array[i] = e;
+ ++i;
+ }
+
+ qsort (array, c, sizeof *array, ctor_cmp);
+
+ e = array[0];
+ p->elements = e;
+ for (i = 0; i < c - 1; i++)
+ array[i]->next = array[i + 1];
+ array[i]->next = NULL;
+
+ free (array);
+ }
+ }
+
old = stat_ptr;
stat_ptr = &constructor_list;
@@ -163,7 +285,7 @@ ldctor_build_sets ()
{
if (link_info.relocateable)
{
- einfo ("%P%X: %s does not support reloc %s for set %s\n",
+ einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
bfd_get_target (output_bfd),
bfd_get_reloc_code_name (p->reloc),
p->h->root.string);
@@ -172,11 +294,12 @@ ldctor_build_sets ()
/* If this is not a relocateable link, all we need is the
size, which we can get from the input BFD. */
- howto = bfd_reloc_type_lookup (p->elements->section->owner,
- p->reloc);
+ if (p->elements->section->owner != NULL)
+ howto = bfd_reloc_type_lookup (p->elements->section->owner,
+ p->reloc);
if (howto == NULL)
{
- einfo ("%P%X: %s does not support reloc %s for set %s\n",
+ einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
bfd_get_target (p->elements->section->owner),
bfd_get_reloc_code_name (p->reloc),
p->h->root.string);
@@ -197,7 +320,7 @@ ldctor_build_sets ()
size = QUAD;
break;
default:
- einfo ("%P%X: Unsupported size %d for set %s\n",
+ einfo (_("%P%X: Unsupported size %d for set %s\n"),
bfd_get_reloc_size (howto), p->h->root.string);
size = LONG;
break;
@@ -218,7 +341,7 @@ ldctor_build_sets ()
if (! header_printed)
{
- minfo ("\nSet Symbol\n\n");
+ minfo (_("\nSet Symbol\n\n"));
header_printed = true;
}
@@ -242,6 +365,10 @@ ldctor_build_sets ()
minfo ("%G\n", e->section->owner, e->section, e->value);
}
+ /* Need SEC_KEEP for --gc-sections */
+ if (! bfd_is_abs_section (e->section))
+ e->section->flags |= SEC_KEEP;
+
if (link_info.relocateable)
lang_add_reloc (p->reloc, howto, e->section, e->name,
exp_intop (e->value));
diff --git a/contrib/binutils/ld/ldctor.h b/contrib/binutils/ld/ldctor.h
index d87f0db..d873f77 100644
--- a/contrib/binutils/ld/ldctor.h
+++ b/contrib/binutils/ld/ldctor.h
@@ -1,5 +1,5 @@
/* ldctor.h - linker constructor support
- Copyright 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -14,8 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GLD; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
#ifndef LDCTOR_H
#define LDCTOR_H
@@ -23,6 +24,11 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
/* List of statements needed to handle constructors */
extern lang_statement_list_type constructor_list;
+/* Whether the constructors should be sorted. Note that this is
+ global for the entire link; we assume that there is only a single
+ CONSTRUCTORS command in the linker script. */
+extern boolean constructors_sorted;
+
/* We keep a list of these structures for each set we build. */
struct set_info
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index 41cc544..08a4e47 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -1,5 +1,6 @@
/* ldemul.c -- clearing house for ld emulation states
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -156,6 +157,17 @@ ldemul_unrecognized_file (entry)
return false;
}
+/* Let the emulation code handle a recognized file. */
+
+boolean
+ldemul_recognized_file (entry)
+ lang_input_statement_type *entry;
+{
+ if (ld_emulation->recognized_file)
+ return (*ld_emulation->recognized_file) (entry);
+ return false;
+}
+
char *
ldemul_choose_target()
{
@@ -207,17 +219,17 @@ set_output_arch_default()
/*ARGSUSED*/
void
syslib_default(ignore)
- char *ignore;
+ char *ignore ATTRIBUTE_UNUSED;
{
- info_msg ("%S SYSLIB ignored\n");
+ info_msg (_("%S SYSLIB ignored\n"));
}
/*ARGSUSED*/
void
hll_default(ignore)
- char *ignore;
+ char *ignore ATTRIBUTE_UNUSED;
{
- info_msg ("%S HLL ignored\n");
+ info_msg (_("%S HLL ignored\n"));
}
ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST };
@@ -238,8 +250,8 @@ ldemul_choose_mode(target)
return;
}
}
- einfo ("%P: unrecognised emulation mode: %s\n", target);
- einfo ("Supported emulations: ");
+ einfo (_("%P: unrecognised emulation mode: %s\n"), target);
+ einfo (_("Supported emulations: "));
ldemul_list_emulations (stderr);
einfo ("%F\n");
}
@@ -260,3 +272,39 @@ ldemul_list_emulations (f)
fprintf (f, "%s", (*eptr)->emulation_name);
}
}
+
+void
+ldemul_list_emulation_options (f)
+ FILE * f;
+{
+ ld_emulation_xfer_type ** eptr;
+ int options_found = 0;
+
+ for (eptr = ld_emulations; * eptr; eptr ++)
+ {
+ ld_emulation_xfer_type * emul = * eptr;
+
+ if (emul->list_options)
+ {
+ fprintf (f, "%s: \n", emul->emulation_name);
+
+ emul->list_options (f);
+
+ options_found = 1;
+ }
+ }
+
+ if (! options_found)
+ fprintf (f, _(" no emulation specific options.\n"));
+}
+
+int
+ldemul_find_potential_libraries (name, entry)
+ char * name;
+ lang_input_statement_type * entry;
+{
+ if (ld_emulation->find_potential_libraries)
+ return ld_emulation->find_potential_libraries (name, entry);
+
+ return 0;
+}
diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h
index f01f357..b2d9103 100644
--- a/contrib/binutils/ld/ldemul.h
+++ b/contrib/binutils/ld/ldemul.h
@@ -1,5 +1,5 @@
/* ld-emul.h - Linker emulation header file
- Copyright 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -32,6 +32,7 @@ extern void ldemul_set_output_arch PARAMS ((void));
extern char *ldemul_choose_target PARAMS ((void));
extern void ldemul_choose_mode PARAMS ((char *));
extern void ldemul_list_emulations PARAMS ((FILE *));
+extern void ldemul_list_emulation_options PARAMS ((FILE *));
extern char *ldemul_get_script PARAMS ((int *isfile));
extern void ldemul_finish PARAMS ((void));
extern void ldemul_set_symbols PARAMS ((void));
@@ -41,6 +42,8 @@ extern boolean ldemul_place_orphan
extern int ldemul_parse_args PARAMS ((int, char **));
extern boolean ldemul_unrecognized_file
PARAMS ((struct lang_input_statement_struct *));
+extern boolean ldemul_recognized_file
+ PARAMS ((struct lang_input_statement_struct *));
extern boolean ldemul_open_dynamic_archive
PARAMS ((const char *, struct search_dirs *,
struct lang_input_statement_struct *));
@@ -52,6 +55,8 @@ extern void before_allocation_default PARAMS ((void));
extern void set_output_arch_default PARAMS ((void));
extern void syslib_default PARAMS ((char*));
extern void hll_default PARAMS ((char*));
+extern int ldemul_find_potential_libraries
+ PARAMS ((char *, struct lang_input_statement_struct *));
typedef struct ld_emulation_xfer_struct
{
@@ -124,6 +129,21 @@ typedef struct ld_emulation_xfer_struct
boolean (*unrecognized_file)
PARAMS ((struct lang_input_statement_struct *));
+ /* Run to list the command line options which parse_args handles. */
+ void (* list_options) PARAMS ((FILE *));
+
+ /* Run to specially handle files which *are* recognized as object
+ files or archives. Return true if the file was handled. */
+ boolean (*recognized_file)
+ PARAMS ((struct lang_input_statement_struct *));
+
+ /* Called when looking for libraries in a directory specified
+ via a linker command line option or linker script option.
+ Files that match the pattern "lib*.a" have already been scanned.
+ (For VMS files matching ":lib*.a" have also been scanned). */
+ int (* find_potential_libraries)
+ PARAMS ((char *, struct lang_input_statement_struct *));
+
} ld_emulation_xfer_type;
typedef enum
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index 3471621..0c38314 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -1,6 +1,7 @@
/* This module handles expression trees.
-Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
-Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
+ Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
This file is part of GLD, the Gnu Linker.
@@ -140,7 +141,7 @@ new_abs (value)
bfd_vma value;
{
etree_value_type new;
- new.valid = true;
+ new.valid_p = true;
new.section = abs_output_section;
new.value = value;
return new;
@@ -153,9 +154,9 @@ check (os, name, op)
const char *op;
{
if (os == NULL)
- einfo ("%F%P: %s uses undefined section %s\n", op, name);
+ einfo (_("%F%P: %s uses undefined section %s\n"), op, name);
if (! os->processed)
- einfo ("%F%P: %s forward reference of section %s\n", op, name);
+ einfo (_("%F%P: %s forward reference of section %s\n"), op, name);
}
etree_type *
@@ -191,7 +192,7 @@ new_rel (value, section)
lang_output_section_statement_type *section;
{
etree_value_type new;
- new.valid = true;
+ new.valid_p = true;
new.value = value;
new.section = section;
return new;
@@ -203,7 +204,7 @@ new_rel_from_section (value, section)
lang_output_section_statement_type *section;
{
etree_value_type new;
- new.valid = true;
+ new.valid_p = true;
new.value = value;
new.section = section;
@@ -224,14 +225,14 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
result = exp_fold_tree (tree->binary.lhs, current_section,
allocation_done, dot, dotp);
- if (result.valid)
+ if (result.valid_p)
{
etree_value_type other;
other = exp_fold_tree (tree->binary.rhs,
current_section,
allocation_done, dot,dotp) ;
- if (other.valid)
+ if (other.valid_p)
{
/* If the values are from different sections, or this is an
absolute expression, make both the source arguments
@@ -267,14 +268,14 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
{
case '%':
if (other.value == 0)
- einfo ("%F%S %% by zero\n");
+ einfo (_("%F%S %% by zero\n"));
result.value = ((bfd_signed_vma) result.value
% (bfd_signed_vma) other.value);
break;
case '/':
if (other.value == 0)
- einfo ("%F%S / by zero\n");
+ einfo (_("%F%S / by zero\n"));
result.value = ((bfd_signed_vma) result.value
/ (bfd_signed_vma) other.value);
break;
@@ -297,12 +298,12 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
BOP(ANDAND,&&);
BOP(OROR,||);
- case MAX:
+ case MAX_K:
if (result.value < other.value)
result = other;
break;
- case MIN:
+ case MIN_K:
if (result.value > other.value)
result = other;
break;
@@ -313,7 +314,7 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
}
else
{
- result.valid = false;
+ result.valid_p = false;
}
}
@@ -324,7 +325,7 @@ etree_value_type
invalid ()
{
etree_value_type new;
- new.valid = false;
+ new.valid_p = false;
return new;
}
@@ -347,12 +348,12 @@ fold_name (tree, current_section, allocation_done, dot)
}
else
{
- result.valid = false;
+ result.valid_p = false;
}
break;
case DEFINED:
if (allocation_done == lang_first_phase_enum)
- result.valid = false;
+ result.valid_p = false;
else
{
struct bfd_link_hash_entry *h;
@@ -365,11 +366,11 @@ fold_name (tree, current_section, allocation_done, dot)
|| h->type == bfd_link_hash_defweak
|| h->type == bfd_link_hash_common));
result.section = 0;
- result.valid = true;
+ result.valid_p = true;
}
break;
case NAME:
- result.valid = false;
+ result.valid_p = false;
if (tree->name.name[0] == '.' && tree->name.name[1] == 0)
{
if (allocation_done != lang_first_phase_enum)
@@ -397,7 +398,7 @@ fold_name (tree, current_section, allocation_done, dot)
output_section = h->u.def.section->output_section;
if (output_section == NULL)
- einfo ("%X%S: unresolvable symbol `%s' referenced in expression\n",
+ einfo (_("%X%S: unresolvable symbol `%s' referenced in expression\n"),
tree->name.name);
else
{
@@ -416,7 +417,7 @@ fold_name (tree, current_section, allocation_done, dot)
}
}
else if (allocation_done == lang_final_phase_enum)
- einfo ("%F%S: undefined symbol `%s' referenced in expression\n",
+ einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"),
tree->name.name);
}
break;
@@ -455,11 +456,12 @@ fold_name (tree, current_section, allocation_done, dot)
case SIZEOF:
if (allocation_done != lang_first_phase_enum)
{
+ int opb = bfd_octets_per_byte (output_bfd);
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
check (os, tree->name.name, "SIZEOF");
- result = new_abs (os->bfd_section->_raw_size);
+ result = new_abs (os->bfd_section->_raw_size / opb);
}
else
result = invalid ();
@@ -484,7 +486,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
if (tree == NULL)
{
- result.valid = false;
+ result.valid_p = false;
return result;
}
@@ -496,7 +498,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
case etree_rel:
if (allocation_done != lang_final_phase_enum)
- result.valid = false;
+ result.valid_p = false;
else
result = new_rel ((tree->rel.value
+ tree->rel.section->output_section->vma
@@ -504,11 +506,23 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
current_section);
break;
+ case etree_assert:
+ result = exp_fold_tree (tree->assert_s.child,
+ current_section,
+ allocation_done, dot, dotp);
+ if (result.valid_p)
+ {
+ if (! result.value)
+ einfo ("%F%P: %s\n", tree->assert_s.message);
+ return result;
+ }
+ break;
+
case etree_unary:
result = exp_fold_tree (tree->unary.child,
current_section,
allocation_done, dot, dotp);
- if (result.valid)
+ if (result.valid_p)
{
switch (tree->type.node_code)
{
@@ -517,17 +531,17 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
result = new_rel_from_section (ALIGN_N (dot, result.value),
current_section);
else
- result.valid = false;
+ result.valid_p = false;
break;
case ABSOLUTE:
- if (allocation_done != lang_first_phase_enum && result.valid)
+ if (allocation_done != lang_first_phase_enum && result.valid_p)
{
result.value += result.section->bfd_section->vma;
result.section = abs_output_section;
}
else
- result.valid = false;
+ result.valid_p = false;
break;
case '~':
@@ -553,7 +567,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
result.value = ALIGN_N (dot, result.value);
}
else
- result.valid = false;
+ result.valid_p = false;
break;
default:
@@ -566,7 +580,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
case etree_trinary:
result = exp_fold_tree (tree->trinary.cond, current_section,
allocation_done, dot, dotp);
- if (result.valid)
+ if (result.valid_p)
result = exp_fold_tree ((result.value
? tree->trinary.lhs
: tree->trinary.rhs),
@@ -585,7 +599,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
{
/* Assignment to dot can only be done during allocation */
if (tree->type.node_class == etree_provide)
- einfo ("%F%S can not PROVIDE assignment to location counter\n");
+ einfo (_("%F%S can not PROVIDE assignment to location counter\n"));
if (allocation_done == lang_allocating_phase_enum
|| (allocation_done == lang_final_phase_enum
&& current_section == abs_output_section))
@@ -594,12 +608,12 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
current_section,
lang_allocating_phase_enum, dot,
dotp);
- if (! result.valid)
- einfo ("%F%S invalid assignment to location counter\n");
+ if (! result.valid_p)
+ einfo (_("%F%S invalid assignment to location counter\n"));
else
{
if (current_section == NULL)
- einfo ("%F%S assignment to location counter invalid outside of SECTION\n");
+ einfo (_("%F%S assignment to location counter invalid outside of SECTION\n"));
else
{
bfd_vma nextdot;
@@ -609,7 +623,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
if (nextdot < dot
&& current_section != abs_output_section)
{
- einfo ("%F%S cannot move location counter backwards (from %V to %V)\n",
+ einfo (_("%F%S cannot move location counter backwards (from %V to %V)\n"),
dot, nextdot);
}
else
@@ -623,7 +637,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
result = exp_fold_tree (tree->assign.src,
current_section, allocation_done,
dot, dotp);
- if (result.valid)
+ if (result.valid_p)
{
boolean create;
struct bfd_link_hash_entry *h;
@@ -637,7 +651,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
if (h == (struct bfd_link_hash_entry *) NULL)
{
if (tree->type.node_class == etree_assign)
- einfo ("%P%F:%s: hash creation failed\n",
+ einfo (_("%P%F:%s: hash creation failed\n"),
tree->assign.dst);
}
else if (tree->type.node_class == etree_provide
@@ -697,7 +711,7 @@ exp_binop (code, lhs, rhs)
r = exp_fold_tree_no_dot(&value,
abs_output_section,
lang_first_phase_enum );
- if (r.valid)
+ if (r.valid_p)
{
return exp_intop(r.value);
}
@@ -722,7 +736,7 @@ exp_trinop (code, cond, lhs, rhs)
value.type.node_class = etree_trinary;
r= exp_fold_tree_no_dot(&value, (lang_output_section_statement_type
*)NULL,lang_first_phase_enum);
- if (r.valid) {
+ if (r.valid_p) {
return exp_intop(r.value);
}
new = (etree_type *) stat_alloc (sizeof (new->trinary));
@@ -744,7 +758,7 @@ exp_unop (code, child)
value.unary.type.node_class = etree_unary;
r = exp_fold_tree_no_dot(&value,abs_output_section,
lang_first_phase_enum);
- if (r.valid) {
+ if (r.valid_p) {
return exp_intop(r.value);
}
new = (etree_type *) stat_alloc (sizeof (new->unary));
@@ -768,7 +782,7 @@ exp_nameop (code, name)
r = exp_fold_tree_no_dot(&value,
(lang_output_section_statement_type *)NULL,
lang_first_phase_enum);
- if (r.valid) {
+ if (r.valid_p) {
return exp_intop(r.value);
}
new = (etree_type *) stat_alloc (sizeof (new->name));
@@ -822,6 +836,23 @@ exp_provide (dst, src)
return n;
}
+/* Handle ASSERT. */
+
+etree_type *
+exp_assert (exp, message)
+ etree_type *exp;
+ const char *message;
+{
+ etree_type *n;
+
+ n = (etree_type *) stat_alloc (sizeof (n->assert_s));
+ n->assert_s.type.node_code = '!';
+ n->assert_s.type.node_class = etree_assert;
+ n->assert_s.child = exp;
+ n->assert_s.message = message;
+ return n;
+}
+
void
exp_print_tree (tree)
etree_type *tree;
@@ -872,13 +903,19 @@ exp_print_tree (tree)
exp_print_token(tree->unary.type.node_code);
if (tree->unary.child)
{
-
fprintf(config.map_file,"(");
exp_print_tree(tree->unary.child);
fprintf(config.map_file,")");
}
break;
+
+ case etree_assert:
+ fprintf (config.map_file, "ASSERT (");
+ exp_print_tree (tree->assert_s.child);
+ fprintf (config.map_file, ", %s)", tree->assert_s.message);
+ break;
+
case etree_undef:
fprintf(config.map_file,"????????");
break;
@@ -910,8 +947,8 @@ exp_get_vma (tree, def, name, allocation_done)
if (tree != NULL)
{
r = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
- if (! r.valid && name != NULL)
- einfo ("%F%S nonconstant expression for %s\n", name);
+ if (! r.valid_p && name != NULL)
+ einfo (_("%F%S nonconstant expression for %s\n"), name);
return r.value;
}
else
@@ -932,19 +969,19 @@ exp_get_value_int (tree,def,name, allocation_done)
bfd_vma
exp_get_abs_int (tree, def, name, allocation_done)
etree_type *tree;
- int def;
+ int def ATTRIBUTE_UNUSED;
char *name;
lang_phase_type allocation_done;
{
etree_value_type res;
res = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
- if (res.valid)
+ if (res.valid_p)
{
res.value += res.section->bfd_section->vma;
}
else {
- einfo ("%F%S non constant expression for %s\n",name);
+ einfo (_("%F%S non constant expression for %s\n"),name);
}
return res.value;
}
diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h
index 8726a01..b8e8ddf 100644
--- a/contrib/binutils/ld/ldexp.h
+++ b/contrib/binutils/ld/ldexp.h
@@ -1,5 +1,5 @@
/* ldexp.h -
- Copyright 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -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 GLD; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#ifndef LDEXP_H
#define LDEXP_H
@@ -25,7 +26,7 @@ typedef struct
{
bfd_vma value;
struct lang_output_section_statement_struct *section;
- boolean valid;
+ boolean valid_p;
} etree_value_type;
@@ -42,6 +43,7 @@ typedef struct
etree_undef,
etree_unspec,
etree_value,
+ etree_assert,
etree_rel } node_class;
} node_type;
@@ -84,7 +86,11 @@ typedef union etree_union
asection *section;
bfd_vma value;
} rel;
-
+ struct {
+ node_type type;
+ union etree_union *child;
+ const char *message;
+ } assert_s;
} etree_type;
@@ -101,6 +107,7 @@ etree_type *exp_unop PARAMS ((int, etree_type *));
etree_type *exp_nameop PARAMS ((int, CONST char *));
etree_type *exp_assop PARAMS ((int, CONST char *, etree_type *));
etree_type *exp_provide PARAMS ((const char *, etree_type *));
+etree_type *exp_assert PARAMS ((etree_type *, const char *));
void exp_print_tree PARAMS ((etree_type *));
bfd_vma exp_get_vma PARAMS ((etree_type *, bfd_vma, char *, lang_phase_type));
int exp_get_value_int PARAMS ((etree_type *, int, char *,lang_phase_type));
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
index 3597c4e..9613c07 100644
--- a/contrib/binutils/ld/ldfile.c
+++ b/contrib/binutils/ld/ldfile.c
@@ -1,10 +1,12 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
+/* Linker file opening and searching.
+ Copyright (C) 1991, 92, 93, 94, 95, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
GLD is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GLD is distributed in the hope that it will be useful,
@@ -74,9 +76,6 @@ typedef struct search_arch
static search_arch_type *search_arch_head;
static search_arch_type **search_arch_tail_ptr = &search_arch_head;
-static boolean ldfile_open_file_search
- PARAMS ((const char *arch, lang_input_statement_type *,
- const char *lib, const char *suffix));
static FILE *try_open PARAMS ((const char *name, const char *exten));
void
@@ -104,23 +103,56 @@ ldfile_try_open_bfd (attempt, entry)
entry->the_bfd = bfd_openr (attempt, entry->target);
if (trace_file_tries)
- info_msg ("attempt to open %s %s\n", attempt,
- entry->the_bfd == NULL ? "failed" : "succeeded");
+ {
+ if (entry->the_bfd == NULL)
+ info_msg (_("attempt to open %s failed\n"), attempt);
+ else
+ info_msg (_("attempt to open %s succeeded\n"), attempt);
+ }
- if (entry->the_bfd != NULL)
- return true;
- else
+ if (entry->the_bfd == NULL)
{
if (bfd_get_error () == bfd_error_invalid_target)
- einfo ("%F%P: invalid BFD target `%s'\n", entry->target);
+ einfo (_("%F%P: invalid BFD target `%s'\n"), entry->target);
return false;
}
+
+ /* If we are searching for this file, see if the architecture is
+ compatible with the output file. If it isn't, keep searching.
+ If we can't open the file as an object file, stop the search
+ here. */
+
+ if (entry->search_dirs_flag)
+ {
+ bfd *check;
+
+ if (bfd_check_format (entry->the_bfd, bfd_archive))
+ check = bfd_openr_next_archived_file (entry->the_bfd, NULL);
+ else
+ check = entry->the_bfd;
+
+ if (check != NULL)
+ {
+ if (! bfd_check_format (check, bfd_object))
+ return true;
+ if (bfd_arch_get_compatible (check, output_bfd) == NULL)
+ {
+ einfo (_("%P: skipping incompatible %s when searching for %s"),
+ attempt, entry->local_sym_name);
+ bfd_close (entry->the_bfd);
+ entry->the_bfd = NULL;
+ return false;
+ }
+ }
+ }
+
+ return true;
}
/* Search for and open the file specified by ENTRY. If it is an
archive, use ARCH, LIB and SUFFIX to modify the file name. */
-static boolean
+boolean
ldfile_open_file_search (arch, entry, lib, suffix)
const char *arch;
lang_input_statement_type *entry;
@@ -196,6 +228,11 @@ ldfile_open_file (entry)
{
if (ldfile_try_open_bfd (entry->filename, entry))
return;
+ if (strcmp (entry->filename, entry->local_sym_name) != 0)
+ einfo (_("%F%P: cannot open %s for %s: %E\n"),
+ entry->filename, entry->local_sym_name);
+ else
+ einfo(_("%F%P: cannot open %s: %E\n"), entry->local_sym_name);
}
else
{
@@ -212,10 +249,11 @@ ldfile_open_file (entry)
if (ldfile_open_file_search (arch->name, entry, ":lib", ".a"))
return;
#endif
+ if (ldemul_find_potential_libraries (arch->name, entry))
+ return;
}
+ einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name);
}
-
- einfo("%F%P: cannot open %s: %E\n", entry->local_sym_name);
}
/* Try to open NAME; if that fails, try NAME with EXTEN appended to it. */
@@ -232,10 +270,9 @@ try_open (name, exten)
if (trace_file_tries)
{
if (result == NULL)
- info_msg ("cannot find script file ");
+ info_msg (_("cannot find script file %s\n"), name);
else
- info_msg ("opened script file ");
- info_msg ("%s\n",name);
+ info_msg (_("opened script file %s\n"), name);
}
if (result != NULL)
@@ -248,10 +285,9 @@ try_open (name, exten)
if (trace_file_tries)
{
if (result == NULL)
- info_msg ("cannot find script file ");
+ info_msg (_("cannot find script file %s\n"), buff);
else
- info_msg ("opened script file ");
- info_msg ("%s\n", buff);
+ info_msg (_("opened script file %s\n"), buff);
}
}
@@ -294,7 +330,7 @@ ldfile_open_command_file (name)
if (ldlex_input_stack == (FILE *)NULL) {
bfd_set_error (bfd_error_system_call);
- einfo("%P%F: cannot open linker script file %s: %E\n",name);
+ einfo(_("%P%F: cannot open linker script file %s: %E\n"),name);
}
lex_push_file(ldlex_input_stack, name);
@@ -335,7 +371,7 @@ char *name;
}
if ( tp->cmd_switch == NULL ){
- einfo("%P%F: unknown architecture: %s\n",name);
+ einfo(_("%P%F: unknown architecture: %s\n"),name);
}
return tp->arch;
}
@@ -352,7 +388,7 @@ char *name;
if (*name != '\0') {
if (ldfile_output_machine_name[0] != '\0') {
- einfo("%P%F: target architecture respecified\n");
+ einfo(_("%P%F: target architecture respecified\n"));
return;
}
ldfile_output_machine_name = name;
@@ -405,6 +441,6 @@ ldfile_set_output_arch (string)
ldfile_output_machine_name = arch->printable_name;
}
else {
- einfo("%P%F: cannot represent machine `%s'\n", string);
+ einfo(_("%P%F: cannot represent machine `%s'\n"), string);
}
}
diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h
index f33c9ce..9c9a4d6 100644
--- a/contrib/binutils/ld/ldfile.h
+++ b/contrib/binutils/ld/ldfile.h
@@ -51,3 +51,6 @@ extern boolean ldfile_try_open_bfd
extern FILE *ldfile_find_command_file
PARAMS ((const char *name, const char *extend));
extern void ldfile_set_output_arch PARAMS ((CONST char *));
+extern boolean ldfile_open_file_search
+ PARAMS ((const char *arch, struct lang_input_statement_struct *,
+ const char *lib, const char *suffix));
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index 4023770..806ea1c 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -1,5 +1,6 @@
/* A YACC grammer to parse a superset of the AT&T linker scripting languaue.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of GNU ld.
@@ -37,6 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldmisc.h"
#include "ldmain.h"
#include "mri.h"
+#include "ldctor.h"
#include "ldlex.h"
#ifndef YYDEBUG
@@ -47,15 +49,15 @@ static enum section_type sectype;
lang_memory_region_type *region;
-
-char *current_file;
+struct wildcard_spec current_file;
boolean ldgram_want_filename = true;
boolean had_script = false;
boolean force_make_executable = false;
boolean ldgram_in_script = false;
boolean ldgram_had_equals = false;
-
+boolean ldgram_had_keep = false;
+char *ldgram_vers_current_lang = NULL;
#define ERROR_NAME_MAX 20
static char *error_names[ERROR_NAME_MAX];
@@ -66,6 +68,9 @@ static int error_index;
%union {
bfd_vma integer;
char *name;
+ const char *cname;
+ struct wildcard_spec wildcard;
+ struct name_list *name_list;
int token;
union etree_union *etree;
struct phdr_info
@@ -85,7 +90,11 @@ static int error_index;
%type <etree> exp opt_exp_with_type mustbe_exp opt_at phdr_type phdr_val
%type <etree> opt_exp_without_type
%type <integer> fill_opt
+%type <name_list> exclude_name_list
%type <name> memspec_opt casesymlist
+%type <name> memspec_at_opt
+%type <cname> wildcard_name
+%type <wildcard> wildcard_spec
%token <integer> INT
%token <name> NAME LNAME
%type <integer> length
@@ -112,7 +121,7 @@ static int error_index;
%token END
%left <token> '('
%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE
-%token SECTIONS PHDRS
+%token SECTIONS PHDRS SORT
%token '{' '}'
%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
%token SIZEOF_HEADERS
@@ -121,18 +130,20 @@ static int error_index;
%token NOLOAD DSECT COPY INFO OVERLAY
%token NAME LNAME DEFINED TARGET_K SEARCH_DIR MAP ENTRY
%token <integer> NEXT
-%token SIZEOF ADDR LOADADDR MAX MIN
+%token SIZEOF ADDR LOADADDR MAX_K MIN_K
%token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
%token ORIGIN FILL
%token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
%token ALIGNMOD AT PROVIDE
-%type <token> assign_op atype
+%type <token> assign_op atype attributes_opt
%type <name> filename
-%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD
+%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD ASSERT_K
%token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL
%token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM CASE EXTERN START
%token <name> VERS_TAG VERS_IDENTIFIER
%token GLOBAL LOCAL VERSIONK INPUT_VERSION_SCRIPT
+%token KEEP
+%token EXCLUDE_FILE
%type <versyms> vers_defns
%type <versnode> vers_tag
%type <deflist> verdep
@@ -162,7 +173,7 @@ defsym_expr:
mri_script_file:
{
ldlex_mri_script ();
- PUSH_ERROR ("MRI style script");
+ PUSH_ERROR (_("MRI style script"));
}
mri_script_lines
{
@@ -181,7 +192,7 @@ mri_script_command:
CHIP exp
| CHIP exp ',' exp
| NAME {
- einfo("%P%F: unrecognised keyword in MRI style script '%s'\n",$1);
+ einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),$1);
}
| LIST {
config.map_filename = "-";
@@ -259,6 +270,8 @@ casesymlist:
extern_name_list:
NAME
{ ldlang_add_undef ($1); }
+ | extern_name_list NAME
+ { ldlang_add_undef ($2); }
| extern_name_list ',' NAME
{ ldlang_add_undef ($3); }
;
@@ -320,6 +333,7 @@ ifile_p1:
{
lang_add_nocrossref ($3);
}
+ | EXTERN '(' extern_name_list ')'
;
input_list:
@@ -361,51 +375,117 @@ statement_anywhere:
/* The '*' and '?' cases are there because the lexer returns them as
separate tokens rather than as NAME. */
-file_NAME_list:
+wildcard_name:
NAME
- { lang_add_wild ($1, current_file); }
+ {
+ $$ = $1;
+ }
| '*'
- { lang_add_wild ("*", current_file); }
+ {
+ $$ = "*";
+ }
| '?'
- { lang_add_wild ("?", current_file); }
- | file_NAME_list opt_comma NAME
- { lang_add_wild ($3, current_file); }
- | file_NAME_list opt_comma '*'
- { lang_add_wild ("*", current_file); }
- | file_NAME_list opt_comma '?'
- { lang_add_wild ("?", current_file); }
+ {
+ $$ = "?";
+ }
;
-input_section_spec:
- NAME
- {
- lang_add_wild((char *)NULL, $1);
- }
- | '['
+wildcard_spec:
+ wildcard_name
{
- current_file = (char *)NULL;
+ $$.name = $1;
+ $$.sorted = false;
+ $$.exclude_name_list = NULL;
}
- file_NAME_list
- ']'
- | NAME
+ | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
{
- current_file = $1;
+ $$.name = $5;
+ $$.sorted = false;
+ $$.exclude_name_list = $3;
}
- '(' file_NAME_list ')'
- | '?'
- /* This case is needed because the lexer returns a
- single question mark as '?' rather than NAME. */
+ | SORT '(' wildcard_name ')'
{
- current_file = "?";
+ $$.name = $3;
+ $$.sorted = true;
+ $$.exclude_name_list = NULL;
}
- '(' file_NAME_list ')'
- | '*'
+ | SORT '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
{
- current_file = (char *)NULL;
+ $$.name = $7;
+ $$.sorted = true;
+ $$.exclude_name_list = $5;
+ }
+ ;
+
+
+
+exclude_name_list:
+ exclude_name_list wildcard_name
+ {
+ struct name_list *tmp;
+ tmp = (struct name_list *) xmalloc (sizeof *tmp);
+ tmp->name = $2;
+ tmp->next = $1;
+ $$ = tmp;
+ }
+ |
+ wildcard_name
+ {
+ struct name_list *tmp;
+ tmp = (struct name_list *) xmalloc (sizeof *tmp);
+ tmp->name = $1;
+ tmp->next = NULL;
+ $$ = tmp;
+ }
+ ;
+
+file_NAME_list:
+ wildcard_spec
+ {
+ lang_add_wild ($1.name, $1.sorted,
+ current_file.name,
+ current_file.sorted,
+ ldgram_had_keep, $1.exclude_name_list);
+ }
+ | file_NAME_list opt_comma wildcard_spec
+ {
+ lang_add_wild ($3.name, $3.sorted,
+ current_file.name,
+ current_file.sorted,
+ ldgram_had_keep, $3.exclude_name_list);
+ }
+ ;
+
+input_section_spec_no_keep:
+ NAME
+ {
+ lang_add_wild (NULL, false, $1, false,
+ ldgram_had_keep, NULL);
+ }
+ | '['
+ {
+ current_file.name = NULL;
+ current_file.sorted = false;
+ }
+ file_NAME_list ']'
+ | wildcard_spec
+ {
+ current_file = $1;
+ /* '*' matches any file name. */
+ if (strcmp (current_file.name, "*") == 0)
+ current_file.name = NULL;
}
'(' file_NAME_list ')'
;
+input_section_spec:
+ input_section_spec_no_keep
+ | KEEP '('
+ { ldgram_had_keep = true; }
+ input_section_spec_no_keep ')'
+ { ldgram_had_keep = false; }
+ ;
+
statement:
assignment end
| CREATE_OBJECT_SYMBOLS
@@ -418,6 +498,11 @@ statement:
lang_add_attribute(lang_constructors_statement_enum);
}
+ | SORT '(' CONSTRUCTORS ')'
+ {
+ constructors_sorted = true;
+ lang_add_attribute (lang_constructors_statement_enum);
+ }
| input_section_spec
| length '(' mustbe_exp ')'
{
@@ -549,15 +634,24 @@ length_spec:
"length",
lang_first_phase_enum);
}
-
+ ;
attributes_opt:
- '(' NAME ')'
- {
- lang_set_flags(region, $2);
- }
- |
-
+ /* empty */
+ { /* dummy action to avoid bison 1.25 error message */ }
+ | '(' attributes_list ')'
+ ;
+
+attributes_list:
+ attributes_string
+ | attributes_list attributes_string
+ ;
+
+attributes_string:
+ NAME
+ { lang_set_flags (region, $1, 0); }
+ | '!' NAME
+ { lang_set_flags (region, $2, 1); }
;
startup:
@@ -697,13 +791,20 @@ exp :
{ $$ = exp_unop(ALIGN_K,$3); }
| NAME
{ $$ = exp_nameop(NAME,$1); }
- | MAX '(' exp ',' exp ')'
- { $$ = exp_binop (MAX, $3, $5 ); }
- | MIN '(' exp ',' exp ')'
- { $$ = exp_binop (MIN, $3, $5 ); }
+ | MAX_K '(' exp ',' exp ')'
+ { $$ = exp_binop (MAX_K, $3, $5 ); }
+ | MIN_K '(' exp ',' exp ')'
+ { $$ = exp_binop (MIN_K, $3, $5 ); }
+ | ASSERT_K '(' exp ',' NAME ')'
+ { $$ = exp_assert ($3, $5); }
;
+memspec_at_opt:
+ AT '>' NAME { $$ = $3; }
+ | { $$ = "*default*"; }
+ ;
+
opt_at:
AT '(' exp ')' { $$ = $3; }
| { $$ = 0; }
@@ -720,10 +821,10 @@ section: NAME { ldlex_expression(); }
}
statement_list_opt
'}' { ldlex_popstate (); ldlex_expression (); }
- memspec_opt phdr_opt fill_opt
+ memspec_opt memspec_at_opt phdr_opt fill_opt
{
ldlex_popstate ();
- lang_leave_output_section_statement ($13, $11, $12);
+ lang_leave_output_section_statement ($14, $11, $13, $12);
}
opt_comma
| OVERLAY
@@ -737,10 +838,10 @@ section: NAME { ldlex_expression(); }
overlay_section
'}'
{ ldlex_popstate (); ldlex_expression (); }
- memspec_opt phdr_opt fill_opt
+ memspec_opt memspec_at_opt phdr_opt fill_opt
{
ldlex_popstate ();
- lang_leave_overlay ($14, $12, $13);
+ lang_leave_overlay ($15, $12, $14, $13);
}
opt_comma
| /* The GROUP case is just enough to support the gcc
@@ -900,7 +1001,7 @@ phdr_qualifiers:
else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL)
$$.flags = $2;
else
- einfo ("%X%P:%S: PHDRS syntax error at `%s'\n", $1);
+ einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"), $1);
}
| AT '(' exp ')' phdr_qualifiers
{
@@ -925,7 +1026,7 @@ phdr_val:
version_script_file:
{
ldlex_version_file ();
- PUSH_ERROR ("VERSION script");
+ PUSH_ERROR (_("VERSION script"));
}
vers_nodes
{
@@ -999,12 +1100,21 @@ vers_tag:
vers_defns:
VERS_IDENTIFIER
{
- $$ = lang_new_vers_regex (NULL, $1);
+ $$ = lang_new_vers_regex (NULL, $1, ldgram_vers_current_lang);
}
| vers_defns ';' VERS_IDENTIFIER
{
- $$ = lang_new_vers_regex ($1, $3);
+ $$ = lang_new_vers_regex ($1, $3, ldgram_vers_current_lang);
}
+ | EXTERN NAME '{'
+ {
+ $<name>$ = ldgram_vers_current_lang;
+ ldgram_vers_current_lang = $2;
+ }
+ vers_defns '}'
+ {
+ ldgram_vers_current_lang = $<name>4;
+ }
;
%%
@@ -1013,7 +1123,7 @@ yyerror(arg)
const char *arg;
{
if (ldfile_assumed_script)
- einfo ("%P:%s: file format not recognized; treating as linker script\n",
+ einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
ldfile_input_filename);
if (error_index > 0 && error_index < ERROR_NAME_MAX)
einfo ("%P%F:%S: %s in %s\n", arg, error_names[error_index-1]);
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
index 612fc2a..013e485 100644
--- a/contrib/binutils/ld/ldint.texinfo
+++ b/contrib/binutils/ld/ldint.texinfo
@@ -12,7 +12,7 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the internals of the GNU linker ld.
-Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
+Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Permission is granted to make and distribute verbatim copies of
@@ -37,13 +37,13 @@ regarded as a program in the language TeX).
@settitle GNU Linker Internals
@titlepage
@title{A guide to the internals of the GNU linker}
-@author Per Bothner, Steve Chamberlain, Ian Lance Taylor
+@author Per Bothner, Steve Chamberlain, Ian Lance Taylor, DJ Delorie
@author Cygnus Support
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.10 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.1.1.1 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill \manvers\par
@@ -52,7 +52,8 @@ regarded as a program in the language TeX).
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
+Copyright @copyright{} 1992, 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
@@ -72,6 +73,7 @@ GNU @code{ld} as you discover it (or as you design changes to @code{ld}).
@menu
* README:: The README File
* Emulations:: How linker emulations are generated
+* Emulation Walkthrough:: A Walkthrough of a Typical Emulation
@end menu
@node README
@@ -209,6 +211,10 @@ The @file{genscripts.sh} script uses this to set the default value of
@item TARGET_PAGE_SIZE
If @code{SEGMENT_SIZE} is not defined, the @file{genscripts.sh} script
uses this to define it.
+
+@item ALIGNMENT
+Some @file{scripttempl} scripts set this to a number to pass to
+@code{ALIGN} to set the required alignment for the @code{end} symbol.
@end table
@node linker scripts
@@ -408,5 +414,151 @@ the @code{get_scripts} entry point should just return a file name. See
At some point, the linker emulation entry points should be documented.
+@node Emulation Walkthrough
+@chapter A Walkthrough of a Typical Emulation
+
+This chapter is to help people who are new to the way emulations
+interact with the linker, or who are suddenly thrust into the position
+of having to work with existing emulations. It will discuss the files
+you need to be aware of. It will tell you when the given "hooks" in
+the emulation will be called. It will, hopefully, give you enough
+information about when and how things happen that you'll be able to
+get by. As always, the source is the definitive reference to this.
+
+The starting point for the linker is in @file{ldmain.c} where
+@code{main} is defined. The bulk of the code that's emulation
+specific will initially be in @code{emultempl/@var{emulation}.em} but
+will end up in @code{e@var{emulation}.c} when the build is done.
+Most of the work to select and interface with emulations is in
+@code{ldemul.h} and @code{ldemul.c}. Specifically, @code{ldemul.h}
+defines the @code{ld_emulation_xfer_struct} structure your emulation
+exports.
+
+Your emulation file exports a symbol
+@code{ld_@var{EMULATION_NAME}_emulation}. If your emulation is
+selected (it usually is, since usually there's only one),
+@code{ldemul.c} sets the variable @var{ld_emulation} to point to it.
+@code{ldemul.c} also defines a number of API functions that interface
+to your emulation, like @code{ldemul_after_parse} which simply calls
+your @code{ld_@var{EMULATION}_emulation.after_parse} function. For
+the rest of this section, the functions will be mentioned, but you
+should assume the indirect reference to your emulation also.
+
+We will also skip or gloss over parts of the link process that don't
+relate to emulations, like setting up internationalization.
+
+After initialization, @code{main} selects an emulation by pre-scanning
+the command line arguments. It calls @code{ldemul_choose_target} to
+choose a target. If you set @code{choose_target} to
+@code{ldemul_default_target}, it picks your @code{target_name} by
+default.
+
+@code{main} calls @code{ldemul_before_parse}, then @code{parse_args}.
+@code{parse_args} calls @code{ldemul_parse_args} for each arg, which
+must update the @code{getopt} globals if it recognizes the argument.
+If the emulation doesn't recognize it, then parse_args checks to see
+if it recognizes it.
+
+Now that the emulation has had access to all its command-line options,
+@code{main} calls @code{ldemul_set_symbols}. This can be used for any
+initialization that may be affected by options. It is also supposed
+to set up any variables needed by the emulation script.
+
+@code{main} now calls @code{ldemul_get_script} to get the emulation
+script to use (based on arguments, no doubt, @pxref{Emulations}) and
+runs it. While parsing, @code{ldgram.y} may call @code{ldemul_hll} or
+@code{ldemul_syslib} to handle the @code{HLL} or @code{SYSLIB}
+commands. It may call @code{ldemul_unrecognized_file} if you asked
+the linker to link a file it doesn't recognize. It will call
+@code{ldemul_recognized_file} for each file it does recognize, in case
+the emulation wants to handle some files specially. All the while,
+it's loading the files (possibly calling
+@code{ldemul_open_dynamic_archive}) and symbols and stuff. After it's
+done reading the script, @code{main} calls @code{ldemul_after_parse}.
+Use the after-parse hook to set up anything that depends on stuff the
+script might have set up, like the entry point.
+
+@code{main} next calls @code{lang_process} in @code{ldlang.c}. This
+appears to be the main core of the linking itself, as far as emulation
+hooks are concerned(*). It first opens the output file's BFD, calling
+@code{ldemul_set_output_arch}, and calls
+@code{ldemul_create_output_section_statements} in case you need to use
+other means to find or create object files (i.e. shared libraries
+found on a path, or fake stub objects). Despite the name, nobody
+creates output sections here.
+
+(*) In most cases, the BFD library does the bulk of the actual
+linking, handling symbol tables, symbol resolution, relocations, and
+building the final output file. See the BFD reference for all the
+details. Your emulation is usually concerned more with managing
+things at the file and section level, like "put this here, add this
+section", etc.
+
+Next, the objects to be linked are opened and BFDs created for them,
+and @code{ldemul_after_open} is called. At this point, you have all
+the objects and symbols loaded, but none of the data has been placed
+yet.
+
+Next comes the Big Linking Thingy (except for the parts BFD does).
+All input sections are mapped to output sections according to the
+script. If a section doesn't get mapped by default,
+@code{ldemul_place_orphan} will get called to figure out where it goes.
+Next it figures out the offsets for each section, calling
+@code{ldemul_before_allocation} before and
+@code{ldemul_after_allocation} after deciding where each input section
+ends up in the output sections.
+
+The last part of @code{lang_process} is to figure out all the symbols'
+values. After assigning final values to the symbols,
+@code{ldemul_finish} is called, and after that, any undefined symbols
+are turned into fatal errors.
+
+OK, back to @code{main}, which calls @code{ldwrite} in
+@file{ldwrite.c}. @code{ldwrite} calls BFD's final_link, which does
+all the relocation fixups and writes the output bfd to disk, and we're
+done.
+
+In summary,
+
+@itemize @bullet
+
+@item @code{main()} in @file{ldmain.c}
+@item @file{emultempl/@var{EMULATION}.em} has your code
+@item @code{ldemul_choose_target} (defaults to your @code{target_name})
+@item @code{ldemul_before_parse}
+@item Parse argv, calls @code{ldemul_parse_args} for each
+@item @code{ldemul_set_symbols}
+@item @code{ldemul_get_script}
+@item parse script
+
+@itemize @bullet
+@item may call @code{ldemul_hll} or @code{ldemul_syslib}
+@item may call @code{ldemul_open_dynamic_archive}
+@end itemize
+
+@item @code{ldemul_after_parse}
+@item @code{lang_process()} in @file{ldlang.c}
+
+@itemize @bullet
+@item create @code{output_bfd}
+@item @code{ldemul_set_output_arch}
+@item @code{ldemul_create_output_section_statements}
+@item read objects, create input bfds - all symbols exist, but have no values
+@item may call @code{ldemul_unrecognized_file}
+@item will call @code{ldemul_recognized_file}
+@item @code{ldemul_after_open}
+@item map input sections to output sections
+@item may call @code{ldemul_place_orphan} for remaining sections
+@item @code{ldemul_before_allocation}
+@item gives input sections offsets into output sections, places output sections
+@item @code{ldemul_after_allocation} - section addresses valid
+@item assigns values to symbols
+@item @code{ldemul_finish} - symbol values valid
+@end itemize
+
+@item output bfd is written to disk
+
+@end itemize
+
@contents
@bye
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 6cdab2b..d40ff07 100644
--- a/contrib/binutils/ld/ldlang.c
+++ b/contrib/binutils/ld/ldlang.c
@@ -1,12 +1,12 @@
/* Linker command language support.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
GLD is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GLD is distributed in the hope that it will be useful,
@@ -36,6 +36,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldctor.h"
#include "ldfile.h"
#include "fnmatch.h"
+#include "demangle.h"
#include <ctype.h>
@@ -72,17 +73,18 @@ static lang_input_statement_type *new_afile
static void init_os PARAMS ((lang_output_section_statement_type *s));
static void exp_init_os PARAMS ((etree_type *));
static void section_already_linked PARAMS ((bfd *, asection *, PTR));
+static struct bfd_hash_entry *already_linked_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
+ const char *string));
+static void already_linked_table_init PARAMS ((void));
+static void already_linked_table_free PARAMS ((void));
static boolean wildcardp PARAMS ((const char *));
-static void wild_section PARAMS ((lang_wild_statement_type *ptr,
- const char *section,
- lang_input_statement_type *file,
- lang_output_section_statement_type *output));
+static lang_statement_union_type *wild_sort
+ PARAMS ((lang_wild_statement_type *, lang_input_statement_type *,
+ asection *));
static lang_input_statement_type *lookup_name PARAMS ((const char *name));
static void load_symbols PARAMS ((lang_input_statement_type *entry,
lang_statement_list_type *));
-static void wild_file PARAMS ((lang_wild_statement_type *, const char *,
- lang_input_statement_type *,
- lang_output_section_statement_type *));
static void wild PARAMS ((lang_wild_statement_type *s,
const char *section, const char *file,
const char *target,
@@ -138,11 +140,34 @@ static int topower PARAMS ((int));
static void lang_set_startof PARAMS ((void));
static void reset_memory_regions PARAMS ((void));
static void lang_record_phdrs PARAMS ((void));
-
+static void lang_gc_wild
+ PARAMS ((lang_wild_statement_type *, const char *, const char *));
+static void lang_gc_sections_1 PARAMS ((lang_statement_union_type *));
+static void lang_gc_sections PARAMS ((void));
+static void lang_do_version_exports_section PARAMS ((void));
+static void lang_check_section_addresses PARAMS ((void));
+
+typedef void (*callback_t) PARAMS ((lang_wild_statement_type *,
+ asection *, lang_input_statement_type *,
+ void *));
+static void walk_wild_section
+ PARAMS ((lang_wild_statement_type *, const char *,
+ lang_input_statement_type *, callback_t, void *));
+static void walk_wild_file
+ PARAMS ((lang_wild_statement_type *, const char *,
+ lang_input_statement_type *, callback_t, void *));
+
+static int get_target PARAMS ((const bfd_target *, void *));
+static void stricpy PARAMS ((char *, char *));
+static void strcut PARAMS ((char *, char *));
+static int name_compare PARAMS ((char *, char *));
+static int closest_target_match PARAMS ((const bfd_target *, void *));
+static char * get_first_input_target PARAMS ((void));
+
/* EXPORTS */
lang_output_section_statement_type *abs_output_section;
lang_statement_list_type *stat_ptr = &statement_list;
-lang_statement_list_type file_chain = { 0 };
+lang_statement_list_type file_chain = { NULL, NULL };
const char *entry_symbol = NULL;
boolean entry_from_cmdline;
boolean lang_has_input_file = false;
@@ -176,6 +201,142 @@ stat_alloc (size)
}
/*----------------------------------------------------------------------
+ Generic traversal routines for finding matching sections.
+*/
+
+static void
+walk_wild_section (ptr, section, file, callback, data)
+ lang_wild_statement_type *ptr;
+ const char *section;
+ lang_input_statement_type *file;
+ callback_t callback;
+ void *data;
+{
+ /* Don't process sections from files which were excluded. */
+ if (ptr->exclude_filename_list != NULL)
+ {
+ struct name_list *list_tmp;
+ for (list_tmp = ptr->exclude_filename_list; list_tmp; list_tmp = list_tmp->next)
+ {
+ boolean match;
+
+ if (wildcardp (list_tmp->name))
+ match = fnmatch (list_tmp->name, file->filename, 0) == 0 ? true : false;
+ else
+ match = strcmp (list_tmp->name, file->filename) == 0 ? true : false;
+
+ if (match)
+ return;
+ }
+ }
+
+ if (file->just_syms_flag == false)
+ {
+ register asection *s;
+ boolean wildcard;
+
+ if (section == NULL)
+ wildcard = false;
+ else
+ wildcard = wildcardp (section);
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ boolean match;
+
+ if (section == NULL)
+ match = true;
+ else
+ {
+ const char *name;
+
+ name = bfd_get_section_name (file->the_bfd, s);
+ if (wildcard)
+ match = fnmatch (section, name, 0) == 0 ? true : false;
+ else
+ match = strcmp (section, name) == 0 ? true : false;
+ }
+
+ if (match)
+ (*callback) (ptr, s, file, data);
+ }
+ }
+}
+
+/* Handle a wild statement for a single file F. */
+
+static void
+walk_wild_file (s, section, f, callback, data)
+ lang_wild_statement_type *s;
+ const char *section;
+ lang_input_statement_type *f;
+ callback_t callback;
+ void *data;
+{
+ if (f->the_bfd == NULL
+ || ! bfd_check_format (f->the_bfd, bfd_archive))
+ walk_wild_section (s, section, f, callback, data);
+ else
+ {
+ bfd *member;
+
+ /* This is an archive file. We must map each member of the
+ archive separately. */
+ member = bfd_openr_next_archived_file (f->the_bfd, (bfd *) NULL);
+ while (member != NULL)
+ {
+ /* When lookup_name is called, it will call the add_symbols
+ entry point for the archive. For each element of the
+ archive which is included, BFD will call ldlang_add_file,
+ which will set the usrdata field of the member to the
+ lang_input_statement. */
+ if (member->usrdata != NULL)
+ {
+ walk_wild_section (s, section,
+ (lang_input_statement_type *) member->usrdata,
+ callback, data);
+ }
+
+ member = bfd_openr_next_archived_file (f->the_bfd, member);
+ }
+ }
+}
+
+static void
+walk_wild (s, section, file, callback, data)
+ lang_wild_statement_type *s;
+ const char *section;
+ const char *file;
+ callback_t callback;
+ void *data;
+{
+ if (file == (char *) NULL)
+ {
+ /* Perform the iteration over all files in the list. */
+ LANG_FOR_EACH_INPUT_STATEMENT (f)
+ {
+ walk_wild_file (s, section, f, callback, data);
+ }
+ }
+ else if (wildcardp (file))
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (f)
+ {
+ if (fnmatch (file, f->filename, FNM_FILE_NAME) == 0)
+ walk_wild_file (s, section, f, callback, data);
+ }
+ }
+ else
+ {
+ lang_input_statement_type *f;
+
+ /* Perform the iteration over a single file. */
+ f = lookup_name (file);
+ walk_wild_file (s, section, f, callback, data);
+ }
+}
+
+/*----------------------------------------------------------------------
lang_for_each_statement walks the parse tree and calls the provided
function for each node
*/
@@ -521,6 +682,7 @@ lang_output_section_statement_lookup (name)
lookup = (lang_output_section_statement_type *)
new_stat (lang_output_section_statement, stat_ptr);
lookup->region = (lang_memory_region_type *) NULL;
+ lookup->lma_region = (lang_memory_region_type *) NULL;
lookup->fill = 0;
lookup->block_value = 1;
lookup->name = name;
@@ -571,9 +733,9 @@ lang_map ()
{
lang_memory_region_type *m;
- minfo ("\nMemory Configuration\n\n");
+ minfo (_("\nMemory Configuration\n\n"));
fprintf (config.map_file, "%-16s %-18s %-18s %s\n",
- "Name", "Origin", "Length", "Attributes");
+ _("Name"), _("Origin"), _("Length"), _("Attributes"));
for (m = lang_memory_region_list;
m != (lang_memory_region_type *) NULL;
@@ -615,7 +777,7 @@ lang_map ()
print_nl ();
}
- fprintf (config.map_file, "\nLinker script and memory map\n\n");
+ fprintf (config.map_file, _("\nLinker script and memory map\n\n"));
print_statements ();
}
@@ -632,7 +794,7 @@ init_os (s)
return;
if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
- einfo ("%P%F: Illegal use of `%s' section", DISCARD_SECTION_NAME);
+ einfo (_("%P%F: Illegal use of `%s' section"), DISCARD_SECTION_NAME);
new = ((section_userdata_type *)
stat_alloc (sizeof (section_userdata_type)));
@@ -642,7 +804,7 @@ init_os (s)
s->bfd_section = bfd_make_section (output_bfd, s->name);
if (s->bfd_section == (asection *) NULL)
{
- einfo ("%P%F: output format %s cannot represent section called %s\n",
+ einfo (_("%P%F: output format %s cannot represent section called %s\n"),
output_bfd->xvec->name, s->name);
}
s->bfd_section->output_section = s->bfd_section;
@@ -706,13 +868,36 @@ exp_init_os (exp)
break;
}
}
-
+
/* Sections marked with the SEC_LINK_ONCE flag should only be linked
- once into the output. This routine checks each sections, and
- arranges to discard it if a section of the same name has already
- been linked. This code assumes that all relevant sections have the
- SEC_LINK_ONCE flag set; that is, it does not depend solely upon the
- section name. This is called via bfd_map_over_sections. */
+ once into the output. This routine checks each section, and
+ arrange to discard it if a section of the same name has already
+ been linked. If the section has COMDAT information, then it uses
+ that to decide whether the section should be included. This code
+ assumes that all relevant sections have the SEC_LINK_ONCE flag set;
+ that is, it does not depend solely upon the section name.
+ section_already_linked is called via bfd_map_over_sections. */
+
+/* This is the shape of the elements inside the already_linked hash
+ table. It maps a name onto a list of already_linked elements with
+ the same name. It's possible to get more than one element in a
+ list if the COMDAT sections have different names. */
+
+struct already_linked_hash_entry
+{
+ struct bfd_hash_entry root;
+ struct already_linked *entry;
+};
+
+struct already_linked
+{
+ struct already_linked *next;
+ asection *sec;
+};
+
+/* The hash table. */
+
+static struct bfd_hash_table already_linked_table;
/*ARGSUSED*/
static void
@@ -722,15 +907,10 @@ section_already_linked (abfd, sec, data)
PTR data;
{
lang_input_statement_type *entry = (lang_input_statement_type *) data;
- struct sec_link_once
- {
- struct sec_link_once *next;
- asection *sec;
- };
- static struct sec_link_once *sec_link_once_list;
flagword flags;
const char *name;
- struct sec_link_once *l;
+ struct already_linked *l;
+ struct already_linked_hash_entry *already_linked_list;
/* If we are only reading symbols from this object, then we want to
discard all sections. */
@@ -746,11 +926,34 @@ section_already_linked (abfd, sec, data)
if ((flags & SEC_LINK_ONCE) == 0)
return;
+ /* FIXME: When doing a relocateable link, we may have trouble
+ copying relocations in other sections that refer to local symbols
+ in the section being discarded. Those relocations will have to
+ be converted somehow; as of this writing I'm not sure that any of
+ the backends handle that correctly.
+
+ It is tempting to instead not discard link once sections when
+ doing a relocateable link (technically, they should be discarded
+ whenever we are building constructors). However, that fails,
+ because the linker winds up combining all the link once sections
+ into a single large link once section, which defeats the purpose
+ of having link once sections in the first place.
+
+ Also, not merging link once sections in a relocateable link
+ causes trouble for MIPS ELF, which relies in link once semantics
+ to handle the .reginfo section correctly. */
+
name = bfd_get_section_name (abfd, sec);
- for (l = sec_link_once_list; l != NULL; l = l->next)
+ already_linked_list =
+ ((struct already_linked_hash_entry *)
+ bfd_hash_lookup (&already_linked_table, name, true, false));
+
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
{
- if (strcmp (name, bfd_get_section_name (l->sec->owner, l->sec)) == 0)
+ if (sec->comdat == NULL
+ || l->sec->comdat == NULL
+ || strcmp (sec->comdat->name, l->sec->comdat->name) == 0)
{
/* The section has already been linked. See if we should
issue a warning. */
@@ -763,8 +966,12 @@ section_already_linked (abfd, sec, data)
break;
case SEC_LINK_DUPLICATES_ONE_ONLY:
- einfo ("%P: %B: warning: ignoring duplicate section `%s'\n",
- abfd, name);
+ if (sec->comdat == NULL)
+ einfo (_("%P: %B: warning: ignoring duplicate section `%s'\n"),
+ abfd, name);
+ else
+ einfo (_("%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"),
+ abfd, name, sec->comdat->name);
break;
case SEC_LINK_DUPLICATES_SAME_CONTENTS:
@@ -777,25 +984,65 @@ section_already_linked (abfd, sec, data)
case SEC_LINK_DUPLICATES_SAME_SIZE:
if (bfd_section_size (abfd, sec)
!= bfd_section_size (l->sec->owner, l->sec))
- einfo ("%P: %B: warning: duplicate section `%s' has different size\n",
+ einfo (_("%P: %B: warning: duplicate section `%s' has different size\n"),
abfd, name);
break;
}
/* Set the output_section field so that wild_doit does not
- create a lang_input_section structure for this section. */
+ create a lang_input_section structure for this section.
+ Since there might be a symbol in the section being
+ discarded, we must retain a pointer to the section which
+ we are really going to use. */
sec->output_section = bfd_abs_section_ptr;
+ if (sec->comdat != NULL)
+ sec->comdat->sec = l->sec;
return;
}
}
- /* This is the first section with this name. Record it. */
+ /* This is the first section with this name. Record it. Allocate
+ the memory from the same obstack as the hash table is kept in. */
+
+ l = ((struct already_linked *)
+ bfd_hash_allocate (&already_linked_table, sizeof *l));
- l = (struct sec_link_once *) xmalloc (sizeof *l);
l->sec = sec;
- l->next = sec_link_once_list;
- sec_link_once_list = l;
+ l->next = already_linked_list->entry;
+ already_linked_list->entry = l;
+}
+
+/* Support routines for the hash table used by section_already_linked,
+ initialize the table, fill in an entry and remove the table. */
+
+static struct bfd_hash_entry *
+already_linked_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry ATTRIBUTE_UNUSED;
+ struct bfd_hash_table *table;
+ const char *string ATTRIBUTE_UNUSED;
+{
+ struct already_linked_hash_entry *ret =
+ bfd_hash_allocate (table, sizeof (struct already_linked_hash_entry));
+
+ ret->entry = NULL;
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+static void
+already_linked_table_init ()
+{
+ if (! bfd_hash_table_init_n (&already_linked_table,
+ already_linked_newfunc,
+ 42))
+ einfo (_("%P%F: Failed to create hash table\n"));
+}
+
+static void
+already_linked_table_free ()
+{
+ bfd_hash_table_free (&already_linked_table);
}
/* The wild routines.
@@ -939,6 +1186,10 @@ wild_doit (ptr, section, output, file)
break;
}
+ /* Copy over SEC_SMALL_DATA. */
+ if (section->flags & SEC_SMALL_DATA)
+ section->output_section->flags |= SEC_SMALL_DATA;
+
if (section->alignment_power > output->bfd_section->alignment_power)
output->bfd_section->alignment_power = section->alignment_power;
@@ -948,52 +1199,158 @@ wild_doit (ptr, section, output, file)
}
}
-/* Expand a wild statement for a particular FILE. SECTION may be
- NULL, in which case it is a wild card. */
+/* Handle wildcard sorting. This returns the lang_input_section which
+ should follow the one we are going to create for SECTION and FILE,
+ based on the sorting requirements of WILD. It returns NULL if the
+ new section should just go at the end of the current list. */
-static void
-wild_section (ptr, section, file, output)
- lang_wild_statement_type *ptr;
- const char *section;
+static lang_statement_union_type *
+wild_sort (wild, file, section)
+ lang_wild_statement_type *wild;
lang_input_statement_type *file;
- lang_output_section_statement_type *output;
+ asection *section;
{
- if (file->just_syms_flag == false)
+ const char *section_name;
+ lang_statement_union_type *l;
+
+ if (! wild->filenames_sorted && ! wild->sections_sorted)
+ return NULL;
+
+ section_name = bfd_get_section_name (file->the_bfd, section);
+ for (l = wild->children.head; l != NULL; l = l->next)
{
- register asection *s;
- boolean wildcard;
+ lang_input_section_type *ls;
- if (section == NULL)
- wildcard = false;
- else
- wildcard = wildcardp (section);
+ if (l->header.type != lang_input_section_enum)
+ continue;
+ ls = &l->input_section;
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ /* Sorting by filename takes precedence over sorting by section
+ name. */
+
+ if (wild->filenames_sorted)
{
- boolean match;
+ const char *fn, *ln;
+ boolean fa, la;
+ int i;
- /* Attach all sections named SECTION. If SECTION is NULL,
- then attach all sections.
+ /* The PE support for the .idata section as generated by
+ dlltool assumes that files will be sorted by the name of
+ the archive and then the name of the file within the
+ archive. */
- Previously, if SECTION was NULL, this code did not call
- wild_doit if the SEC_IS_COMMON flag was set for the
- section. I did not understand that, and I took it out.
- --ian@cygnus.com. */
+ if (file->the_bfd != NULL
+ && bfd_my_archive (file->the_bfd) != NULL)
+ {
+ fn = bfd_get_filename (bfd_my_archive (file->the_bfd));
+ fa = true;
+ }
+ else
+ {
+ fn = file->filename;
+ fa = false;
+ }
- if (section == NULL)
- match = true;
+ if (ls->ifile->the_bfd != NULL
+ && bfd_my_archive (ls->ifile->the_bfd) != NULL)
+ {
+ ln = bfd_get_filename (bfd_my_archive (ls->ifile->the_bfd));
+ la = true;
+ }
else
{
- const char *name;
+ ln = ls->ifile->filename;
+ la = false;
+ }
- name = bfd_get_section_name (file->the_bfd, s);
- if (wildcard)
- match = fnmatch (section, name, 0) == 0 ? true : false;
- else
- match = strcmp (section, name) == 0 ? true : false;
+ i = strcmp (fn, ln);
+ if (i > 0)
+ continue;
+ else if (i < 0)
+ break;
+
+ if (fa || la)
+ {
+ if (fa)
+ fn = file->filename;
+ if (la)
+ ln = ls->ifile->filename;
+
+ i = strcmp (fn, ln);
+ if (i > 0)
+ continue;
+ else if (i < 0)
+ break;
}
- if (match)
- wild_doit (&ptr->children, s, output, file);
+ }
+
+ /* Here either the files are not sorted by name, or we are
+ looking at the sections for this file. */
+
+ if (wild->sections_sorted)
+ {
+ if (strcmp (section_name,
+ bfd_get_section_name (ls->ifile->the_bfd,
+ ls->section))
+ < 0)
+ break;
+ }
+ }
+
+ return l;
+}
+
+/* Expand a wild statement for a particular FILE. SECTION may be
+ NULL, in which case it is a wild card. */
+
+static void
+output_section_callback (ptr, section, file, output)
+ lang_wild_statement_type *ptr;
+ asection *section;
+ lang_input_statement_type *file;
+ void *output;
+{
+ lang_statement_union_type *before;
+
+ /* If the wild pattern was marked KEEP, the member sections
+ should be as well. */
+ if (ptr->keep_sections)
+ section->flags |= SEC_KEEP;
+
+ before = wild_sort (ptr, file, section);
+
+ /* Here BEFORE points to the lang_input_section which
+ should follow the one we are about to add. If BEFORE
+ is NULL, then the section should just go at the end
+ of the current list. */
+
+ if (before == NULL)
+ wild_doit (&ptr->children, section,
+ (lang_output_section_statement_type *) output,
+ file);
+ else
+ {
+ lang_statement_list_type list;
+ lang_statement_union_type **pp;
+
+ lang_list_init (&list);
+ wild_doit (&list, section,
+ (lang_output_section_statement_type *) output,
+ file);
+
+ /* If we are discarding the section, LIST.HEAD will
+ be NULL. */
+ if (list.head != NULL)
+ {
+ ASSERT (list.head->next == NULL);
+
+ for (pp = &ptr->children.head;
+ *pp != before;
+ pp = &(*pp)->next)
+ ASSERT (*pp != NULL);
+
+ list.head->next = *pp;
+ *pp = list.head;
}
}
}
@@ -1062,15 +1419,15 @@ load_symbols (entry, place)
{
char **p;
- einfo ("%B: file not recognized: %E\n", entry->the_bfd);
- einfo ("%B: matching formats:", entry->the_bfd);
+ einfo (_("%B: file not recognized: %E\n"), entry->the_bfd);
+ einfo (_("%B: matching formats:"), entry->the_bfd);
for (p = matching; *p != NULL; p++)
einfo (" %s", *p);
einfo ("%F\n");
}
else if (err != bfd_error_file_not_recognized
|| place == NULL)
- einfo ("%F%B: file not recognized: %E\n", entry->the_bfd);
+ einfo (_("%F%B: file not recognized: %E\n"), entry->the_bfd);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
@@ -1097,6 +1454,9 @@ load_symbols (entry, place)
return;
}
+ if (ldemul_recognized_file (entry))
+ return;
+
/* We don't call ldlang_add_file for an archive. Instead, the
add_symbols entry point will call ldlang_add_file, via the
add_archive_element callback, for each element of the archive
@@ -1120,13 +1480,13 @@ load_symbols (entry, place)
while (member != NULL)
{
if (! bfd_check_format (member, bfd_object))
- einfo ("%F%B: object %B in archive is not object\n",
+ einfo (_("%F%B: object %B in archive is not object\n"),
entry->the_bfd, member);
if (! ((*link_info.callbacks->add_archive_element)
(&link_info, member, "--whole-archive")))
abort ();
if (! bfd_link_add_symbols (member, &link_info))
- einfo ("%F%B: could not read symbols: %E\n", member);
+ einfo (_("%F%B: could not read symbols: %E\n"), member);
member = bfd_openr_next_archived_file (entry->the_bfd,
member);
}
@@ -1138,48 +1498,12 @@ load_symbols (entry, place)
}
if (! bfd_link_add_symbols (entry->the_bfd, &link_info))
- einfo ("%F%B: could not read symbols: %E\n", entry->the_bfd);
+ einfo (_("%F%B: could not read symbols: %E\n"), entry->the_bfd);
entry->loaded = true;
}
-/* Handle a wild statement for a single file F. */
-
-static void
-wild_file (s, section, f, output)
- lang_wild_statement_type *s;
- const char *section;
- lang_input_statement_type *f;
- lang_output_section_statement_type *output;
-{
- if (f->the_bfd == NULL
- || ! bfd_check_format (f->the_bfd, bfd_archive))
- wild_section (s, section, f, output);
- else
- {
- bfd *member;
-
- /* This is an archive file. We must map each member of the
- archive separately. */
- member = bfd_openr_next_archived_file (f->the_bfd, (bfd *) NULL);
- while (member != NULL)
- {
- /* When lookup_name is called, it will call the add_symbols
- entry point for the archive. For each element of the
- archive which is included, BFD will call ldlang_add_file,
- which will set the usrdata field of the member to the
- lang_input_statement. */
- if (member->usrdata != NULL)
- {
- wild_section (s, section,
- (lang_input_statement_type *) member->usrdata,
- output);
- }
-
- member = bfd_openr_next_archived_file (f->the_bfd, member);
- }
- }
-}
+
/* Handle a wild statement. SECTION or FILE or both may be NULL,
indicating that it is a wildcard. Separate lang_input_section
@@ -1191,72 +1515,250 @@ wild (s, section, file, target, output)
lang_wild_statement_type *s;
const char *section;
const char *file;
- const char *target;
+ const char *target ATTRIBUTE_UNUSED;
lang_output_section_statement_type *output;
{
- lang_input_statement_type *f;
+ walk_wild (s, section, file, output_section_callback, (void *) output);
- if (file == (char *) NULL)
+ if (section != (char *) NULL
+ && strcmp (section, "COMMON") == 0
+ && default_common_section == NULL)
{
- /* Perform the iteration over all files in the list */
- for (f = (lang_input_statement_type *) file_chain.head;
- f != (lang_input_statement_type *) NULL;
- f = (lang_input_statement_type *) f->next)
- {
- wild_file (s, section, f, output);
- }
+ /* Remember the section that common is going to in case we later
+ get something which doesn't know where to put it. */
+ default_common_section = output;
}
- else if (wildcardp (file))
+}
+
+/* Return true iff target is the sought target. */
+static int
+get_target (target, data)
+ const bfd_target * target;
+ void * data;
+{
+ const char * sought = (const char *) data;
+
+ return strcmp (target->name, sought) == 0;
+}
+
+/* Like strcpy() but convert to lower case as well. */
+static void
+stricpy (dest, src)
+ char * dest;
+ char * src;
+{
+ char c;
+
+ while ((c = * src ++) != 0)
{
- for (f = (lang_input_statement_type *) file_chain.head;
- f != (lang_input_statement_type *) NULL;
- f = (lang_input_statement_type *) f->next)
- {
- if (fnmatch (file, f->filename, FNM_FILE_NAME) == 0)
- wild_file (s, section, f, output);
- }
+ if (isupper ((unsigned char) c))
+ c = tolower (c);
+
+ * dest ++ = c;
}
- else
+
+ * dest = 0;
+}
+
+/* Remove the first occurance of needle (if any) in haystack
+ from haystack. */
+static void
+strcut (haystack, needle)
+ char * haystack;
+ char * needle;
+{
+ haystack = strstr (haystack, needle);
+
+ if (haystack)
{
- /* Perform the iteration over a single file */
- f = lookup_name (file);
- wild_file (s, section, f, output);
+ char * src;
+
+ for (src = haystack + strlen (needle); * src;)
+ * haystack ++ = * src ++;
+
+ * haystack = 0;
}
+}
- if (section != (char *) NULL
- && strcmp (section, "COMMON") == 0
- && default_common_section == NULL)
+/* Compare two target format name strings.
+ Return a value indicating how "similar" they are. */
+static int
+name_compare (first, second)
+ char * first;
+ char * second;
+{
+ char * copy1;
+ char * copy2;
+ int result;
+
+ copy1 = xmalloc (strlen (first) + 1);
+ copy2 = xmalloc (strlen (second) + 1);
+
+ /* Convert the names to lower case. */
+ stricpy (copy1, first);
+ stricpy (copy2, second);
+
+ /* Remove and endian strings from the name. */
+ strcut (copy1, "big");
+ strcut (copy1, "little");
+ strcut (copy2, "big");
+ strcut (copy2, "little");
+
+ /* Return a value based on how many characters match,
+ starting from the beginning. If both strings are
+ the same then return 10 * their length. */
+ for (result = 0; copy1 [result] == copy2 [result]; result ++)
+ if (copy1 [result] == 0)
+ {
+ result *= 10;
+ break;
+ }
+
+ free (copy1);
+ free (copy2);
+
+ return result;
+}
+
+/* Set by closest_target_match() below. */
+static const bfd_target * winner;
+
+/* Scan all the valid bfd targets looking for one that has the endianness
+ requirement that was specified on the command line, and is the nearest
+ match to the original output target. */
+static int
+closest_target_match (target, data)
+ const bfd_target * target;
+ void * data;
+{
+ const bfd_target * original = (const bfd_target *) data;
+
+ if (command_line.endian == ENDIAN_BIG && target->byteorder != BFD_ENDIAN_BIG)
+ return 0;
+
+ if (command_line.endian == ENDIAN_LITTLE && target->byteorder != BFD_ENDIAN_LITTLE)
+ return 0;
+
+ /* Must be the same flavour. */
+ if (target->flavour != original->flavour)
+ return 0;
+
+ /* If we have not found a potential winner yet, then record this one. */
+ if (winner == NULL)
{
- /* Remember the section that common is going to in case we later
- get something which doesn't know where to put it. */
- default_common_section = output;
+ winner = target;
+ return 0;
}
+
+ /* Oh dear, we now have two potential candidates for a successful match.
+ Compare their names and choose the better one. */
+ if (name_compare (target->name, original->name) > name_compare (winner->name, original->name))
+ winner = target;
+
+ /* Keep on searching until wqe have checked them all. */
+ return 0;
+}
+
+/* Return the BFD target format of the first input file. */
+static char *
+get_first_input_target ()
+{
+ char * target = NULL;
+
+ LANG_FOR_EACH_INPUT_STATEMENT (s)
+ {
+ if (s->header.type == lang_input_statement_enum
+ && s->real)
+ {
+ ldfile_open_file (s);
+
+ if (s->the_bfd != NULL
+ && bfd_check_format (s->the_bfd, bfd_object))
+ {
+ target = bfd_get_target (s->the_bfd);
+
+ if (target != NULL)
+ break;
+ }
+ }
+ }
+
+ return target;
}
/* Open the output file. */
static bfd *
open_output (name)
- const char *name;
+ const char * name;
{
- bfd *output;
+ bfd * output;
+ /* Has the user told us which output format to use ? */
if (output_target == (char *) NULL)
{
- if (current_target != (char *) NULL)
+ /* No - has the current target been set to something other than the default ? */
+ if (current_target != default_target)
output_target = current_target;
+
+ /* No - can we determine the format of the first input file ? */
+ else
+ {
+ output_target = get_first_input_target ();
+
+ /* Failed - use the default output target. */
+ if (output_target == NULL)
+ output_target = default_target;
+ }
+ }
+
+ /* Has the user requested a particular endianness on the command line ? */
+ if (command_line.endian != ENDIAN_UNSET)
+ {
+ const bfd_target * target;
+ enum bfd_endian desired_endian;
+
+ /* Get the chosen target. */
+ target = bfd_search_for_target (get_target, (void *) output_target);
+
+ if (command_line.endian == ENDIAN_BIG)
+ desired_endian = BFD_ENDIAN_BIG;
else
- output_target = default_target;
+ desired_endian = BFD_ENDIAN_LITTLE;
+
+ /* See if the target has the wrong endianness. This should not happen
+ if the linker script has provided big and little endian alternatives,
+ but some scrips don't do this. */
+ if (target->byteorder != desired_endian)
+ {
+ /* If it does, then see if the target provides
+ an alternative with the correct endianness. */
+ if (target->alternative_target != NULL
+ && (target->alternative_target->byteorder == desired_endian))
+ output_target = target->alternative_target->name;
+ else
+ {
+ /* Try to find a target as similar as possible to the default
+ target, but which has the desired endian characteristic. */
+ (void) bfd_search_for_target (closest_target_match, (void *) target);
+
+ /* Oh dear - we could not find any targets that satisfy our requirements. */
+ if (winner == NULL)
+ einfo (_("%P: warning: could not find any targets that match endianness requirement\n"));
+ else
+ output_target = winner->name;
+ }
+ }
}
+
output = bfd_openw (name, output_target);
if (output == (bfd *) NULL)
{
if (bfd_get_error () == bfd_error_invalid_target)
- {
- einfo ("%P%F: target %s not found\n", output_target);
- }
- einfo ("%P%F: cannot open output file %s: %E\n", name);
+ einfo (_("%P%F: target %s not found\n"), output_target);
+
+ einfo (_("%P%F: cannot open output file %s: %E\n"), name);
}
delete_output_file_on_failure = true;
@@ -1264,23 +1766,20 @@ open_output (name)
/* output->flags |= D_PAGED;*/
if (! bfd_set_format (output, bfd_object))
- einfo ("%P%F:%s: can not make object file: %E\n", name);
+ einfo (_("%P%F:%s: can not make object file: %E\n"), name);
if (! bfd_set_arch_mach (output,
ldfile_output_architecture,
ldfile_output_machine))
- einfo ("%P%F:%s: can not set architecture: %E\n", name);
+ einfo (_("%P%F:%s: can not set architecture: %E\n"), name);
link_info.hash = bfd_link_hash_table_create (output);
if (link_info.hash == (struct bfd_link_hash_table *) NULL)
- einfo ("%P%F: can not create link hash table: %E\n");
+ einfo (_("%P%F: can not create link hash table: %E\n"));
bfd_set_gp_size (output, g_switch_value);
return output;
}
-
-
-
static void
ldlang_open_output (statement)
lang_statement_union_type * statement;
@@ -1357,7 +1856,7 @@ open_input_bfds (s, force)
current_target = s->target_statement.target;
break;
case lang_input_statement_enum:
- if (s->input_statement.real == true)
+ if (s->input_statement.real)
{
lang_statement_list_type add;
@@ -1459,7 +1958,7 @@ lang_place_undefineds ()
h = bfd_link_hash_lookup (link_info.hash, ptr->name, true, false, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo ("%P%F: bfd_link_hash_lookup failed: %E\n");
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
@@ -1582,7 +2081,7 @@ print_output_section_statement (output_section_statement)
addr = exp_get_abs_int (output_section_statement->load_base, 0,
"load base", lang_final_phase_enum);
- minfo (" load address 0x%V", addr);
+ minfo (_(" load address 0x%V"), addr);
}
}
@@ -1606,7 +2105,7 @@ print_assignment (assignment, output_section)
result = exp_fold_tree (assignment->exp->assign.src, output_section,
lang_final_phase_enum, print_dot, &print_dot);
- if (result.valid)
+ if (result.valid_p)
minfo ("0x%V", result.value + result.section->bfd_section->vma);
else
{
@@ -1670,7 +2169,8 @@ print_input_section (in)
{
asection *i = in->section;
bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size;
-
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (size != 0)
{
print_space ();
@@ -1694,7 +2194,7 @@ print_input_section (in)
}
minfo ("0x%V %W %B\n",
- i->output_section->vma + i->output_offset, size,
+ i->output_section->vma + i->output_offset, size / opb,
i->owner);
if (i->_cooked_size != 0 && i->_cooked_size != i->_raw_size)
@@ -1711,12 +2211,12 @@ print_input_section (in)
--len;
}
- minfo ("%W (size before relaxing)\n", i->_raw_size);
+ minfo (_("%W (size before relaxing)\n"), i->_raw_size);
}
bfd_link_hash_traverse (link_info.hash, print_one_symbol, (PTR) i);
- print_dot = i->output_section->vma + i->output_offset + size;
+ print_dot = i->output_section->vma + i->output_offset + size / opb;
}
}
}
@@ -1736,6 +2236,8 @@ print_data_statement (data)
bfd_vma addr;
bfd_size_type size;
const char *name;
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
@@ -1780,7 +2282,8 @@ print_data_statement (data)
print_nl ();
- print_dot = addr + size;
+ print_dot = addr + size / opb;
+
}
/* Print an address statement. These are generated by options like
@@ -1790,7 +2293,7 @@ static void
print_address_statement (address)
lang_address_statement_type *address;
{
- minfo ("Address of section %s set to ", address->section_name);
+ minfo (_("Address of section %s set to "), address->section_name);
exp_print_tree (address->address);
print_nl ();
}
@@ -1804,6 +2307,8 @@ print_reloc_statement (reloc)
int i;
bfd_vma addr;
bfd_size_type size;
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
@@ -1825,7 +2330,7 @@ print_reloc_statement (reloc)
print_nl ();
- print_dot = addr + size;
+ print_dot = addr + size / opb;
}
static void
@@ -1834,6 +2339,8 @@ print_padding_statement (s)
{
int len;
bfd_vma addr;
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
minfo (" *fill*");
@@ -1854,7 +2361,7 @@ print_padding_statement (s)
print_nl ();
- print_dot = addr + s->size;
+ print_dot = addr + s->size / opb;
}
static void
@@ -1864,15 +2371,33 @@ print_wild_statement (w, os)
{
print_space ();
- if (w->filename != NULL)
+ if (w->filenames_sorted)
+ minfo ("SORT(");
+ if (w->exclude_filename_list != NULL)
+ {
+ name_list *tmp;
+ minfo ("EXCLUDE_FILE ( %s", w->exclude_filename_list->name);
+ for (tmp=w->exclude_filename_list->next; tmp; tmp = tmp->next)
+ minfo (", %s", tmp->name);
+ minfo (")");
+ }
+ if (w->filename != NULL)
minfo ("%s", w->filename);
else
minfo ("*");
+ if (w->filenames_sorted)
+ minfo (")");
+ minfo ("(");
+ if (w->sections_sorted)
+ minfo ("SORT(");
if (w->section_name != NULL)
- minfo ("(%s)", w->section_name);
+ minfo ("%s", w->section_name);
else
- minfo ("(*)");
+ minfo ("*");
+ if (w->sections_sorted)
+ minfo (")");
+ minfo (")");
print_nl ();
@@ -1917,13 +2442,16 @@ print_statement (s, os)
switch (s->header.type)
{
default:
- fprintf (config.map_file, "Fail with %d\n", s->header.type);
+ fprintf (config.map_file, _("Fail with %d\n"), s->header.type);
FAIL ();
break;
case lang_constructors_statement_enum:
if (constructor_list.head != NULL)
{
- minfo (" CONSTRUCTORS\n");
+ if (constructors_sorted)
+ minfo (" SORT (CONSTRUCTORS)\n");
+ else
+ minfo (" CONSTRUCTORS\n");
print_statement_list (constructor_list.head, os);
}
break;
@@ -2028,6 +2556,8 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
inserting a magic 'padding' statement.
*/
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
unsigned int alignment_needed = align_power (dot, power) - dot;
if (alignment_needed != 0)
@@ -2044,7 +2574,7 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
new->padding_statement.output_offset =
dot - output_section_statement->vma;
new->padding_statement.fill = fill;
- new->padding_statement.size = alignment_needed;
+ new->padding_statement.size = alignment_needed * opb;
}
@@ -2053,9 +2583,9 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
{
output_section_statement->alignment_power = power;
}
- output_section_statement->_raw_size += alignment_needed;
- return alignment_needed + dot;
+ output_section_statement->_raw_size += alignment_needed * opb;
+ return dot + alignment_needed;
}
/* Work out how much this section will move the dot point */
@@ -2065,10 +2595,12 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
lang_output_section_statement_type * output_section_statement;
fill_type fill;
bfd_vma dot;
- boolean relax;
+ boolean relax ATTRIBUTE_UNUSED;
{
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (is->ifile->just_syms_flag == false)
{
@@ -2086,10 +2618,11 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
/* Mark how big the output section must be to contain this now
*/
if (i->_cooked_size != 0)
- dot += i->_cooked_size;
+ dot += i->_cooked_size / opb;
else
- dot += i->_raw_size;
- output_section_statement->bfd_section->_raw_size = dot - output_section_statement->bfd_section->vma;
+ dot += i->_raw_size / opb;
+ output_section_statement->bfd_section->_raw_size =
+ (dot - output_section_statement->bfd_section->vma) * opb;
}
else
{
@@ -2099,11 +2632,107 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
return dot;
}
+#define IGNORE_SECTION(bfd, s) \
+ (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_LOAD)) != (SEC_ALLOC | SEC_LOAD)) \
+ || bfd_section_size (bfd, s) == 0)
+
+/* Check to see if any allocated sections overlap with other allocated
+ sections. This can happen when the linker script specifically specifies
+ the output section addresses of the two sections. */
+static void
+lang_check_section_addresses ()
+{
+ asection * s;
+ unsigned opb = bfd_octets_per_byte (output_bfd);
+
+ /* Scan all sections in the output list. */
+ for (s = output_bfd->sections; s != NULL; s = s->next)
+ {
+ asection * os;
+
+ /* Ignore sections which are not loaded or which have no contents. */
+ if (IGNORE_SECTION (output_bfd, s))
+ continue;
+
+ /* Once we reach section 's' stop our seach. This prevents two
+ warning messages from being produced, one for 'section A overlaps
+ section B' and one for 'section B overlaps section A'. */
+ for (os = output_bfd->sections; os != s; os = os->next)
+ {
+ bfd_vma s_start;
+ bfd_vma s_end;
+ bfd_vma os_start;
+ bfd_vma os_end;
+
+ /* Only consider loadable sections with real contents. */
+ if (IGNORE_SECTION (output_bfd, os))
+ continue;
+
+ /* We must check the sections' LMA addresses not their
+ VMA addresses because overlay sections can have
+ overlapping VMAs but they must have distinct LMAs. */
+ s_start = bfd_section_lma (output_bfd, s);
+ os_start = bfd_section_lma (output_bfd, os);
+ s_end = s_start + bfd_section_size (output_bfd, s) / opb - 1;
+ os_end = os_start + bfd_section_size (output_bfd, os) / opb - 1;
+
+ /* Look for an overlap. */
+ if ((s_end < os_start) || (s_start > os_end))
+ continue;
+
+ einfo (
+_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
+ s->name, s_start, s_end, os->name, os_start, os_end);
+
+ /* Once we have found one overlap for this section,
+ stop looking for others. */
+ break;
+ }
+ }
+}
+
/* This variable indicates whether bfd_relax_section should be called
again. */
static boolean relax_again;
+/* Make sure the new address is within the region. We explicitly permit the
+ current address to be at the exact end of the region when the address is
+ non-zero, in case the region is at the end of addressable memory and the
+ calculation wraps around. */
+
+static void
+os_region_check (os, region, tree, base)
+ lang_output_section_statement_type *os;
+ struct memory_region_struct *region;
+ etree_type *tree;
+ bfd_vma base;
+{
+ if ((region->current < region->origin
+ || (region->current - region->origin > region->length))
+ && ((region->current != region->origin + region->length)
+ || base == 0))
+ {
+ if (tree != (etree_type *) NULL)
+ {
+ einfo (_("%X%P: address 0x%v of %B section %s is not within region %s\n"),
+ region->current,
+ os->bfd_section->owner,
+ os->bfd_section->name,
+ region->name);
+ }
+ else
+ {
+ einfo (_("%X%P: region %s is full (%B section %s)\n"),
+ region->name,
+ os->bfd_section->owner,
+ os->bfd_section->name);
+ }
+ /* Reset the region pointer. */
+ region->current = region->origin;
+ }
+}
+
/* Set the sizes for all the output sections. */
bfd_vma
@@ -2115,347 +2744,371 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
bfd_vma dot;
boolean relax;
{
- /* Size up the sections from their constituent parts */
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
+
+ /* Size up the sections from their constituent parts. */
for (; s != (lang_statement_union_type *) NULL; s = s->next)
- {
- switch (s->header.type)
{
+ switch (s->header.type)
+ {
+ case lang_output_section_statement_enum:
+ {
+ bfd_vma after;
+ lang_output_section_statement_type *os = &s->output_section_statement;
- case lang_output_section_statement_enum:
- {
- bfd_vma after;
- lang_output_section_statement_type *os = &s->output_section_statement;
-
- if (os->bfd_section == NULL)
- {
- /* This section was never actually created. */
- break;
- }
-
- /* If this is a COFF shared library section, use the size and
- address from the input section. FIXME: This is COFF
- specific; it would be cleaner if there were some other way
- to do this, but nothing simple comes to mind. */
- if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
- {
- asection *input;
-
- if (os->children.head == NULL
- || os->children.head->next != NULL
- || os->children.head->header.type != lang_input_section_enum)
- einfo ("%P%X: Internal error on COFF shared library section %s\n",
- os->name);
-
- input = os->children.head->input_section.section;
- bfd_set_section_vma (os->bfd_section->owner,
- os->bfd_section,
- bfd_section_vma (input->owner, input));
- os->bfd_section->_raw_size = input->_raw_size;
- break;
- }
-
- if (bfd_is_abs_section (os->bfd_section))
- {
- /* No matter what happens, an abs section starts at zero */
- ASSERT (os->bfd_section->vma == 0);
- }
- else
- {
- if (os->addr_tree == (etree_type *) NULL)
- {
- /* No address specified for this section, get one
- from the region specification
- */
- if (os->region == (lang_memory_region_type *) NULL
- || (((bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD)) != 0)
- && os->region->name[0] == '*'
- && strcmp (os->region->name, "*default*") == 0))
- {
- os->region = lang_memory_default (os->bfd_section);
- }
-
- /* If a loadable section is using the default memory
- region, and some non default memory regions were
- defined, issue a warning. */
- if ((bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD)) != 0
- && ! link_info.relocateable
- && strcmp (os->region->name, "*default*") == 0
- && lang_memory_region_list != NULL
- && (strcmp (lang_memory_region_list->name, "*default*") != 0
- || lang_memory_region_list->next != NULL))
- einfo ("%P: warning: no memory region specified for section `%s'\n",
- bfd_get_section_name (output_bfd, os->bfd_section));
-
- dot = os->region->current;
- if (os->section_alignment == -1)
- {
- bfd_vma olddot;
-
- olddot = dot;
- dot = align_power (dot, os->bfd_section->alignment_power);
- if (dot != olddot && config.warn_section_align)
- einfo ("%P: warning: changing start of section %s by %u bytes\n",
- os->name, (unsigned int) (dot - olddot));
- }
- }
- else
- {
- etree_value_type r;
-
- r = exp_fold_tree (os->addr_tree,
- abs_output_section,
- lang_allocating_phase_enum,
- dot, &dot);
- if (r.valid == false)
- {
- einfo ("%F%S: non constant address expression for section %s\n",
- os->name);
- }
- dot = r.value + r.section->bfd_section->vma;
- }
- /* The section starts here */
- /* First, align to what the section needs */
-
- if (os->section_alignment != -1)
- dot = align_power (dot, os->section_alignment);
-
- bfd_set_section_vma (0, os->bfd_section, dot);
-
- os->bfd_section->output_offset = 0;
- }
-
- (void) lang_size_sections (os->children.head, os, &os->children.head,
- os->fill, dot, relax);
- /* Ignore the size of the input sections, use the vma and size to */
- /* align against */
-
- after = ALIGN_N (os->bfd_section->vma +
- os->bfd_section->_raw_size,
- /* The coercion here is important, see ld.h. */
- (bfd_vma) os->block_value);
-
- if (bfd_is_abs_section (os->bfd_section))
- ASSERT (after == os->bfd_section->vma);
- else
- os->bfd_section->_raw_size = after - os->bfd_section->vma;
- dot = os->bfd_section->vma + os->bfd_section->_raw_size;
- os->processed = true;
-
- /* Replace into region ? */
- if (os->region != (lang_memory_region_type *) NULL)
- {
- os->region->current = dot;
- /* Make sure this isn't silly. */
- if (os->region->current < os->region->origin
- || (os->region->current - os->region->origin
- > os->region->length))
- {
- if (os->addr_tree != (etree_type *) NULL)
- {
- einfo ("%X%P: address 0x%v of %B section %s is not within region %s\n",
- os->region->current,
- os->bfd_section->owner,
- os->bfd_section->name,
- os->region->name);
- }
- else
- {
- einfo ("%X%P: region %s is full (%B section %s)\n",
- os->region->name,
- os->bfd_section->owner,
- os->bfd_section->name);
- }
- /* Reset the region pointer. */
- os->region->current = os->region->origin;
- }
- }
- }
- break;
-
- case lang_constructors_statement_enum:
- dot = lang_size_sections (constructor_list.head,
- output_section_statement,
- &s->wild_statement.children.head,
- fill,
- dot, relax);
- break;
+ if (os->bfd_section == NULL)
+ /* This section was never actually created. */
+ break;
- case lang_data_statement_enum:
- {
- unsigned int size = 0;
-
- s->data_statement.output_vma = dot - output_section_statement->bfd_section->vma;
- s->data_statement.output_section =
- output_section_statement->bfd_section;
-
- switch (s->data_statement.type)
- {
- case QUAD:
- case SQUAD:
- size = QUAD_SIZE;
- break;
- case LONG:
- size = LONG_SIZE;
- break;
- case SHORT:
- size = SHORT_SIZE;
- break;
- case BYTE:
- size = BYTE_SIZE;
- break;
- }
-
- dot += size;
- output_section_statement->bfd_section->_raw_size += size;
- /* The output section gets contents, and then we inspect for
- any flags set in the input script which override any ALLOC */
- output_section_statement->bfd_section->flags |= SEC_HAS_CONTENTS;
- if (!(output_section_statement->flags & SEC_NEVER_LOAD)) {
- output_section_statement->bfd_section->flags |= SEC_ALLOC | SEC_LOAD;
- }
- }
- break;
+ /* If this is a COFF shared library section, use the size and
+ address from the input section. FIXME: This is COFF
+ specific; it would be cleaner if there were some other way
+ to do this, but nothing simple comes to mind. */
+ if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
+ {
+ asection * input;
+
+ if (os->children.head == NULL
+ || os->children.head->next != NULL
+ || os->children.head->header.type != lang_input_section_enum)
+ einfo (_("%P%X: Internal error on COFF shared library section %s\n"),
+ os->name);
+
+ input = os->children.head->input_section.section;
+ bfd_set_section_vma (os->bfd_section->owner,
+ os->bfd_section,
+ bfd_section_vma (input->owner, input));
+ os->bfd_section->_raw_size = input->_raw_size;
+ break;
+ }
- case lang_reloc_statement_enum:
- {
- int size;
-
- s->reloc_statement.output_vma =
- dot - output_section_statement->bfd_section->vma;
- s->reloc_statement.output_section =
- output_section_statement->bfd_section;
- size = bfd_get_reloc_size (s->reloc_statement.howto);
- dot += size;
- output_section_statement->bfd_section->_raw_size += size;
- }
- break;
-
- case lang_wild_statement_enum:
+ if (bfd_is_abs_section (os->bfd_section))
+ {
+ /* No matter what happens, an abs section starts at zero. */
+ ASSERT (os->bfd_section->vma == 0);
+ }
+ else
+ {
+ if (os->addr_tree == (etree_type *) NULL)
+ {
+ /* No address specified for this section, get one
+ from the region specification. */
+ if (os->region == (lang_memory_region_type *) NULL
+ || (((bfd_get_section_flags (output_bfd, os->bfd_section)
+ & (SEC_ALLOC | SEC_LOAD)) != 0)
+ && os->region->name[0] == '*'
+ && strcmp (os->region->name, "*default*") == 0))
+ {
+ os->region = lang_memory_default (os->bfd_section);
+ }
+
+ /* If a loadable section is using the default memory
+ region, and some non default memory regions were
+ defined, issue a warning. */
+ if ((bfd_get_section_flags (output_bfd, os->bfd_section)
+ & (SEC_ALLOC | SEC_LOAD)) != 0
+ && ! link_info.relocateable
+ && strcmp (os->region->name, "*default*") == 0
+ && lang_memory_region_list != NULL
+ && (strcmp (lang_memory_region_list->name, "*default*") != 0
+ || lang_memory_region_list->next != NULL))
+ einfo (_("%P: warning: no memory region specified for section `%s'\n"),
+ bfd_get_section_name (output_bfd, os->bfd_section));
+
+ dot = os->region->current;
+
+ if (os->section_alignment == -1)
+ {
+ bfd_vma olddot;
+
+ olddot = dot;
+ dot = align_power (dot, os->bfd_section->alignment_power);
+
+ if (dot != olddot && config.warn_section_align)
+ einfo (_("%P: warning: changing start of section %s by %u bytes\n"),
+ os->name, (unsigned int) (dot - olddot));
+ }
+ }
+ else
+ {
+ etree_value_type r;
+
+ r = exp_fold_tree (os->addr_tree,
+ abs_output_section,
+ lang_allocating_phase_enum,
+ dot, &dot);
+ if (r.valid_p == false)
+ {
+ einfo (_("%F%S: non constant address expression for section %s\n"),
+ os->name);
+ }
+ dot = r.value + r.section->bfd_section->vma;
+ }
+
+ /* The section starts here.
+ First, align to what the section needs. */
- dot = lang_size_sections (s->wild_statement.children.head,
- output_section_statement,
- &s->wild_statement.children.head,
+ if (os->section_alignment != -1)
+ dot = align_power (dot, os->section_alignment);
- fill, dot, relax);
+ bfd_set_section_vma (0, os->bfd_section, dot);
+
+ os->bfd_section->output_offset = 0;
+ }
- break;
+ (void) lang_size_sections (os->children.head, os, &os->children.head,
+ os->fill, dot, relax);
+
+ /* put the section within the requested block size, or align at
+ the block boundary */
+ after = ALIGN_N (os->bfd_section->vma
+ + os->bfd_section->_raw_size / opb,
+ /* The coercion here is important, see ld.h. */
+ (bfd_vma) os->block_value);
+
+ if (bfd_is_abs_section (os->bfd_section))
+ ASSERT (after == os->bfd_section->vma);
+ else
+ os->bfd_section->_raw_size =
+ (after - os->bfd_section->vma) * opb;
+ dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb;
+ os->processed = true;
+
+ /* Update dot in the region ?
+ We only do this if the section is going to be allocated,
+ since unallocated sections do not contribute to the region's
+ overall size in memory.
+
+ If the SEC_NEVER_LOAD bit is not set, it will affect the
+ addresses of sections after it. We have to update
+ dot. */
+ if (os->region != (lang_memory_region_type *) NULL
+ && ((bfd_get_section_flags (output_bfd, os->bfd_section)
+ & SEC_NEVER_LOAD) == 0
+ || (bfd_get_section_flags (output_bfd, os->bfd_section)
+ & (SEC_ALLOC | SEC_LOAD))))
+ {
+ os->region->current = dot;
+
+ /* Make sure the new address is within the region. */
+ os_region_check (os, os->region, os->addr_tree,
+ os->bfd_section->vma);
+
+ /* if there's no load address specified, use the run region as
+ the load region */
+ if (os->lma_region == NULL && os->load_base == NULL)
+ os->lma_region = os->region;
+
+ if (os->lma_region != NULL)
+ {
+ if (os->load_base != NULL)
+ {
+ einfo (_("%X%P: use an absolute load address or a load memory region, not both\n"));
+ }
+ else
+ {
+ /* don't allocate twice */
+ if (os->lma_region != os->region)
+ {
+ /* set load_base, which will be handled later */
+ os->load_base = exp_intop (os->lma_region->current);
+ os->lma_region->current +=
+ os->bfd_section->_raw_size / opb;
+ os_region_check (os, os->lma_region, NULL,
+ os->bfd_section->lma);
+ }
+ }
+ }
+ }
+ }
+ break;
- case lang_object_symbols_statement_enum:
- link_info.create_object_symbols_section =
- output_section_statement->bfd_section;
- break;
- case lang_output_statement_enum:
- case lang_target_statement_enum:
- break;
- case lang_input_section_enum:
- {
- asection *i;
+ case lang_constructors_statement_enum:
+ dot = lang_size_sections (constructor_list.head,
+ output_section_statement,
+ &s->wild_statement.children.head,
+ fill,
+ dot, relax);
+ break;
- i = (*prev)->input_section.section;
- if (! relax)
+ case lang_data_statement_enum:
{
- if (i->_cooked_size == 0)
- i->_cooked_size = i->_raw_size;
+ unsigned int size = 0;
+
+ s->data_statement.output_vma = dot - output_section_statement->bfd_section->vma;
+ s->data_statement.output_section =
+ output_section_statement->bfd_section;
+
+ switch (s->data_statement.type)
+ {
+ default:
+ abort();
+ case QUAD:
+ case SQUAD:
+ size = QUAD_SIZE;
+ break;
+ case LONG:
+ size = LONG_SIZE;
+ break;
+ case SHORT:
+ size = SHORT_SIZE;
+ break;
+ case BYTE:
+ size = BYTE_SIZE;
+ break;
+ }
+ if (size < opb)
+ size = opb;
+ dot += size / opb;
+ output_section_statement->bfd_section->_raw_size += size;
+ /* The output section gets contents, and then we inspect for
+ any flags set in the input script which override any ALLOC. */
+ output_section_statement->bfd_section->flags |= SEC_HAS_CONTENTS;
+ if (!(output_section_statement->flags & SEC_NEVER_LOAD)) {
+ output_section_statement->bfd_section->flags |= SEC_ALLOC | SEC_LOAD;
+ }
}
- else
+ break;
+
+ case lang_reloc_statement_enum:
{
- boolean again;
+ int size;
+
+ s->reloc_statement.output_vma =
+ dot - output_section_statement->bfd_section->vma;
+ s->reloc_statement.output_section =
+ output_section_statement->bfd_section;
+ size = bfd_get_reloc_size (s->reloc_statement.howto);
+ dot += size / opb;
+ output_section_statement->bfd_section->_raw_size += size;
+ }
+ break;
+
+ case lang_wild_statement_enum:
+
+ dot = lang_size_sections (s->wild_statement.children.head,
+ output_section_statement,
+ &s->wild_statement.children.head,
+
+ fill, dot, relax);
- if (! bfd_relax_section (i->owner, i, &link_info, &again))
- einfo ("%P%F: can't relax section: %E\n");
- if (again)
- relax_again = true;
+ break;
+
+ case lang_object_symbols_statement_enum:
+ link_info.create_object_symbols_section =
+ output_section_statement->bfd_section;
+ break;
+ case lang_output_statement_enum:
+ case lang_target_statement_enum:
+ break;
+ case lang_input_section_enum:
+ {
+ asection *i;
+
+ i = (*prev)->input_section.section;
+ if (! relax)
+ {
+ if (i->_cooked_size == 0)
+ i->_cooked_size = i->_raw_size;
+ }
+ else
+ {
+ boolean again;
+
+ if (! bfd_relax_section (i->owner, i, &link_info, &again))
+ einfo (_("%P%F: can't relax section: %E\n"));
+ if (again)
+ relax_again = true;
+ }
+ dot = size_input_section (prev,
+ output_section_statement,
+ output_section_statement->fill,
+ dot, relax);
}
- dot = size_input_section (prev,
- output_section_statement,
- output_section_statement->fill,
- dot, relax);
- }
- break;
- case lang_input_statement_enum:
- break;
- case lang_fill_statement_enum:
- s->fill_statement.output_section = output_section_statement->bfd_section;
+ break;
+ case lang_input_statement_enum:
+ break;
+ case lang_fill_statement_enum:
+ s->fill_statement.output_section = output_section_statement->bfd_section;
- fill = s->fill_statement.fill;
- break;
- case lang_assignment_statement_enum:
- {
- bfd_vma newdot = dot;
-
- exp_fold_tree (s->assignment_statement.exp,
- output_section_statement,
- lang_allocating_phase_enum,
- dot,
- &newdot);
-
- if (newdot != dot && !relax)
- {
- /* The assignment changed dot. Insert a pad. */
- if (output_section_statement == abs_output_section)
- {
- /* If we don't have an output section, then just adjust
- the default memory address. */
- lang_memory_region_lookup ("*default*")->current = newdot;
- }
- else
- {
- lang_statement_union_type *new =
- ((lang_statement_union_type *)
- stat_alloc (sizeof (lang_padding_statement_type)));
-
- /* Link into existing chain */
- new->header.next = *prev;
- *prev = new;
- new->header.type = lang_padding_statement_enum;
- new->padding_statement.output_section =
- output_section_statement->bfd_section;
- new->padding_statement.output_offset =
- dot - output_section_statement->bfd_section->vma;
- new->padding_statement.fill = fill;
- new->padding_statement.size = newdot - dot;
- output_section_statement->bfd_section->_raw_size +=
- new->padding_statement.size;
- }
-
- dot = newdot;
- }
- }
- break;
-
- case lang_padding_statement_enum:
- /* If we are relaxing, and this is not the first pass, some
- padding statements may have been inserted during previous
- passes. We may have to move the padding statement to a new
- location if dot has a different value at this point in this
- pass than it did at this point in the previous pass. */
- s->padding_statement.output_offset =
- dot - output_section_statement->bfd_section->vma;
- dot += s->padding_statement.size;
- output_section_statement->bfd_section->_raw_size +=
- s->padding_statement.size;
- break;
-
- case lang_group_statement_enum:
- dot = lang_size_sections (s->group_statement.children.head,
- output_section_statement,
- &s->group_statement.children.head,
- fill, dot, relax);
- break;
-
- default:
- FAIL ();
- break;
+ fill = s->fill_statement.fill;
+ break;
+ case lang_assignment_statement_enum:
+ {
+ bfd_vma newdot = dot;
- /* This can only get here when relaxing is turned on */
+ exp_fold_tree (s->assignment_statement.exp,
+ output_section_statement,
+ lang_allocating_phase_enum,
+ dot,
+ &newdot);
- case lang_address_statement_enum:
- break;
+ if (newdot != dot)
+ {
+ /* The assignment changed dot. Insert a pad. */
+ if (output_section_statement == abs_output_section)
+ {
+ /* If we don't have an output section, then just adjust
+ the default memory address. */
+ lang_memory_region_lookup ("*default*")->current = newdot;
+ }
+ else if (!relax)
+ {
+ lang_statement_union_type *new =
+ ((lang_statement_union_type *)
+ stat_alloc (sizeof (lang_padding_statement_type)));
+
+ /* Link into existing chain. */
+ new->header.next = *prev;
+ *prev = new;
+ new->header.type = lang_padding_statement_enum;
+ new->padding_statement.output_section =
+ output_section_statement->bfd_section;
+ new->padding_statement.output_offset =
+ dot - output_section_statement->bfd_section->vma;
+ new->padding_statement.fill = fill;
+ new->padding_statement.size = (newdot - dot) * opb;
+ output_section_statement->bfd_section->_raw_size +=
+ new->padding_statement.size;
+ }
+
+ dot = newdot;
+ }
+ }
+ break;
+
+ case lang_padding_statement_enum:
+ /* If we are relaxing, and this is not the first pass, some
+ padding statements may have been inserted during previous
+ passes. We may have to move the padding statement to a new
+ location if dot has a different value at this point in this
+ pass than it did at this point in the previous pass. */
+ s->padding_statement.output_offset =
+ dot - output_section_statement->bfd_section->vma;
+ dot += s->padding_statement.size / opb;
+ output_section_statement->bfd_section->_raw_size +=
+ s->padding_statement.size;
+ break;
+
+ case lang_group_statement_enum:
+ dot = lang_size_sections (s->group_statement.children.head,
+ output_section_statement,
+ &s->group_statement.children.head,
+ fill, dot, relax);
+ break;
+
+ default:
+ FAIL ();
+ break;
+
+ /* This can only get here when relaxing is turned on. */
+
+ case lang_address_statement_enum:
+ break;
+ }
+ prev = &s->header.next;
}
- prev = &s->header.next;
- }
return dot;
}
@@ -2466,6 +3119,9 @@ lang_do_assignments (s, output_section_statement, fill, dot)
fill_type fill;
bfd_vma dot;
{
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
+
for (; s != (lang_statement_union_type *) NULL; s = s->next)
{
switch (s->header.type)
@@ -2487,7 +3143,8 @@ lang_do_assignments (s, output_section_statement, fill, dot)
dot = os->bfd_section->vma;
(void) lang_do_assignments (os->children.head, os,
os->fill, dot);
- dot = os->bfd_section->vma + os->bfd_section->_raw_size;
+ dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb;
+
}
if (os->load_base)
{
@@ -2524,25 +3181,33 @@ lang_do_assignments (s, output_section_statement, fill, dot)
abs_output_section,
lang_final_phase_enum, dot, &dot);
s->data_statement.value = value.value;
- if (value.valid == false)
- einfo ("%F%P: invalid data statement\n");
+ if (value.valid_p == false)
+ einfo (_("%F%P: invalid data statement\n"));
}
- switch (s->data_statement.type)
- {
- case QUAD:
- case SQUAD:
- dot += QUAD_SIZE;
- break;
- case LONG:
- dot += LONG_SIZE;
- break;
- case SHORT:
- dot += SHORT_SIZE;
- break;
- case BYTE:
- dot += BYTE_SIZE;
- break;
- }
+ {
+ unsigned int size;
+ switch (s->data_statement.type)
+ {
+ default:
+ abort();
+ case QUAD:
+ case SQUAD:
+ size = QUAD_SIZE;
+ break;
+ case LONG:
+ size = LONG_SIZE;
+ break;
+ case SHORT:
+ size = SHORT_SIZE;
+ break;
+ case BYTE:
+ size = BYTE_SIZE;
+ break;
+ }
+ if (size < opb)
+ size = opb;
+ dot += size / opb;
+ }
break;
case lang_reloc_statement_enum:
@@ -2553,10 +3218,10 @@ lang_do_assignments (s, output_section_statement, fill, dot)
abs_output_section,
lang_final_phase_enum, dot, &dot);
s->reloc_statement.addend_value = value.value;
- if (value.valid == false)
- einfo ("%F%P: invalid reloc statement\n");
+ if (value.valid_p == false)
+ einfo (_("%F%P: invalid reloc statement\n"));
}
- dot += bfd_get_reloc_size (s->reloc_statement.howto);
+ dot += bfd_get_reloc_size (s->reloc_statement.howto) / opb;
break;
case lang_input_section_enum:
@@ -2564,9 +3229,9 @@ lang_do_assignments (s, output_section_statement, fill, dot)
asection *in = s->input_section.section;
if (in->_cooked_size != 0)
- dot += in->_cooked_size;
+ dot += in->_cooked_size / opb;
else
- dot += in->_raw_size;
+ dot += in->_raw_size / opb;
}
break;
@@ -2586,7 +3251,7 @@ lang_do_assignments (s, output_section_statement, fill, dot)
break;
case lang_padding_statement_enum:
- dot += s->padding_statement.size;
+ dot += s->padding_statement.size / opb;
break;
case lang_group_statement_enum:
@@ -2644,11 +3309,13 @@ lang_set_startof ()
h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true);
if (h != NULL && h->type == bfd_link_hash_undefined)
{
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
h->type = bfd_link_hash_defined;
if (s->_cooked_size != 0)
- h->u.def.value = s->_cooked_size;
+ h->u.def.value = s->_cooked_size / opb;
else
- h->u.def.value = s->_raw_size;
+ h->u.def.value = s->_raw_size / opb;
h->u.def.section = bfd_abs_section_ptr;
}
@@ -2688,29 +3355,44 @@ lang_finish ()
h->u.def.section->output_section)
+ h->u.def.section->output_offset);
if (! bfd_set_start_address (output_bfd, val))
- einfo ("%P%F:%s: can't set start address\n", entry_symbol);
+ einfo (_("%P%F:%s: can't set start address\n"), entry_symbol);
}
else
{
- asection *ts;
+ bfd_vma val;
+ CONST char *send;
- /* Can't find the entry symbol. Use the first address in the
- text section. */
- ts = bfd_get_section_by_name (output_bfd, ".text");
- if (ts != (asection *) NULL)
+ /* We couldn't find the entry symbol. Try parsing it as a
+ number. */
+ val = bfd_scan_vma (entry_symbol, &send, 0);
+ if (*send == '\0')
{
- if (warn)
- einfo ("%P: warning: cannot find entry symbol %s; defaulting to %V\n",
- entry_symbol, bfd_get_section_vma (output_bfd, ts));
- if (! bfd_set_start_address (output_bfd,
- bfd_get_section_vma (output_bfd, ts)))
- einfo ("%P%F: can't set start address\n");
+ if (! bfd_set_start_address (output_bfd, val))
+ einfo (_("%P%F: can't set start address\n"));
}
else
{
- if (warn)
- einfo ("%P: warning: cannot find entry symbol %s; not setting start address\n",
- entry_symbol);
+ asection *ts;
+
+ /* Can't find the entry symbol, and it's not a number. Use
+ the first address in the text section. */
+ ts = bfd_get_section_by_name (output_bfd, ".text");
+ if (ts != (asection *) NULL)
+ {
+ if (warn)
+ einfo (_("%P: warning: cannot find entry symbol %s; defaulting to %V\n"),
+ entry_symbol, bfd_get_section_vma (output_bfd, ts));
+ if (! bfd_set_start_address (output_bfd,
+ bfd_get_section_vma (output_bfd,
+ ts)))
+ einfo (_("%P%F: can't set start address\n"));
+ }
+ else
+ {
+ if (warn)
+ einfo (_("%P: warning: cannot find entry symbol %s; not setting start address\n"),
+ entry_symbol);
+ }
}
}
}
@@ -2720,10 +3402,10 @@ lang_finish ()
static void
#ifdef ANSI_PROTOTYPES
-ignore_bfd_errors (const char *s, ...)
+ignore_bfd_errors (const char *s ATTRIBUTE_UNUSED, ...)
#else
ignore_bfd_errors (s)
- const char *s;
+ const char *s ATTRIBUTE_UNUSED;
#endif
{
/* Don't do anything. */
@@ -2750,7 +3432,7 @@ lang_check ()
if (compatible == NULL)
{
if (command_line.warn_mismatch)
- einfo ("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n",
+ einfo (_("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n"),
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));
}
@@ -2768,7 +3450,7 @@ lang_check ()
if (! bfd_merge_private_bfd_data (input_bfd, output_bfd))
{
if (command_line.warn_mismatch)
- einfo ("%E%X: failed to merge target specific data of file %B\n",
+ einfo (_("%E%X: failed to merge target specific data of file %B\n"),
input_bfd);
}
if (! command_line.warn_mismatch)
@@ -2810,6 +3492,8 @@ lang_one_common (h, info)
unsigned int power_of_two;
bfd_vma size;
asection *section;
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (h->type != bfd_link_hash_common)
return true;
@@ -2824,8 +3508,8 @@ lang_one_common (h, info)
section = h->u.c.p->section;
/* Increase the size of the section. */
- section->_raw_size = ALIGN_N (section->_raw_size,
- (bfd_size_type) (1 << power_of_two));
+ section->_cooked_size = ALIGN_N ((section->_cooked_size + opb - 1) / opb,
+ (bfd_size_type) (1 << power_of_two)) * opb;
/* Adjust the alignment if necessary. */
if (power_of_two > section->alignment_power)
@@ -2834,10 +3518,10 @@ lang_one_common (h, info)
/* Change the symbol from common to defined. */
h->type = bfd_link_hash_defined;
h->u.def.section = section;
- h->u.def.value = section->_raw_size;
+ h->u.def.value = section->_cooked_size;
/* Increase the size of the section. */
- section->_raw_size += size;
+ section->_cooked_size += size;
/* Make sure the section is allocated in memory, and make sure that
it is no longer a common section. */
@@ -2853,8 +3537,8 @@ lang_one_common (h, info)
if (! header_printed)
{
- minfo ("\nAllocating common symbols\n");
- minfo ("Common symbol size file\n\n");
+ minfo (_("\nAllocating common symbols\n"));
+ minfo (_("Common symbol size file\n\n"));
header_printed = true;
}
@@ -2904,11 +3588,7 @@ into the statement tree.
static void
lang_place_orphans ()
{
- lang_input_statement_type *file;
-
- for (file = (lang_input_statement_type *) file_chain.head;
- file != (lang_input_statement_type *) NULL;
- file = (lang_input_statement_type *) file->next)
+ LANG_FOR_EACH_INPUT_STATEMENT (file)
{
asection *s;
@@ -2943,7 +3623,7 @@ lang_place_orphans ()
/* This message happens when using the
svr3.ifile linker script, so I have
disabled it. */
- info_msg ("%P: no [COMMON] command, defaulting to .bss\n");
+ info_msg (_("%P: no [COMMON] command, defaulting to .bss\n"));
#endif
default_common_section =
lang_output_section_statement_lookup (".bss");
@@ -2969,21 +3649,18 @@ lang_place_orphans ()
void
-lang_set_flags (ptr, flags)
+lang_set_flags (ptr, flags, invert)
lang_memory_region_type *ptr;
CONST char *flags;
+ int invert;
{
- flagword *ptr_flags = &ptr->flags;
+ flagword *ptr_flags;
- ptr->flags = ptr->not_flags = 0;
+ ptr_flags = invert ? &ptr->not_flags : &ptr->flags;
while (*flags)
{
switch (*flags)
{
- case '!':
- ptr_flags = (ptr_flags == &ptr->flags) ? &ptr->not_flags : &ptr->flags;
- break;
-
case 'A': case 'a':
*ptr_flags |= SEC_ALLOC;
break;
@@ -3006,7 +3683,7 @@ lang_set_flags (ptr, flags)
break;
default:
- einfo ("%P%F: invalid syntax in flags\n");
+ einfo (_("%P%F: invalid syntax in flags\n"));
break;
}
flags++;
@@ -3036,11 +3713,7 @@ void
lang_for_each_file (func)
void (*func) PARAMS ((lang_input_statement_type *));
{
- lang_input_statement_type *f;
-
- for (f = (lang_input_statement_type *) file_chain.head;
- f != (lang_input_statement_type *) NULL;
- f = (lang_input_statement_type *) f->next)
+ LANG_FOR_EACH_INPUT_STATEMENT (f)
{
func (f);
}
@@ -3054,13 +3727,9 @@ void
lang_for_each_input_section (func)
void (*func) PARAMS ((bfd * ab, asection * as));
{
- lang_input_statement_type *f;
-
- for (f = (lang_input_statement_type *) file_chain.head;
- f != (lang_input_statement_type *) NULL;
- f = (lang_input_statement_type *) f->next)
+ LANG_FOR_EACH_INPUT_STATEMENT (f)
{
- asection *s;
+ asection * s;
for (s = f->the_bfd->sections;
s != (asection *) NULL;
@@ -3219,6 +3888,103 @@ reset_memory_regions ()
}
}
+/* Expand a wild statement for a particular FILE, marking its sections KEEP
+ as needed. SECTION may be NULL, in which case it is a wild card. */
+
+static void
+gc_section_callback (ptr, section, file, data)
+ lang_wild_statement_type *ptr;
+ asection *section;
+ lang_input_statement_type *file ATTRIBUTE_UNUSED;
+ void *data ATTRIBUTE_UNUSED;
+{
+ /* If the wild pattern was marked KEEP, the member sections
+ should be as well. */
+ if (ptr->keep_sections)
+ section->flags |= SEC_KEEP;
+}
+
+/* Handle a wild statement, marking it against GC. SECTION or FILE or both
+ may be NULL, indicating that it is a wildcard. */
+
+static void
+lang_gc_wild (s, section, file)
+ lang_wild_statement_type *s;
+ const char *section;
+ const char *file;
+{
+ walk_wild (s, section, file, gc_section_callback, NULL);
+}
+
+/* Iterate over sections marking them against GC. */
+
+static void
+lang_gc_sections_1 (s)
+ lang_statement_union_type * s;
+{
+ for (; s != (lang_statement_union_type *) NULL; s = s->next)
+ {
+ switch (s->header.type)
+ {
+ case lang_wild_statement_enum:
+ lang_gc_wild (&s->wild_statement,
+ s->wild_statement.section_name,
+ s->wild_statement.filename);
+ break;
+ case lang_constructors_statement_enum:
+ lang_gc_sections_1 (constructor_list.head);
+ break;
+ case lang_output_section_statement_enum:
+ lang_gc_sections_1 (s->output_section_statement.children.head);
+ break;
+ case lang_group_statement_enum:
+ lang_gc_sections_1 (s->group_statement.children.head);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void
+lang_gc_sections ()
+{
+ struct bfd_link_hash_entry *h;
+ ldlang_undef_chain_list_type *ulist, fake_list_start;
+
+ /* Keep all sections so marked in the link script. */
+
+ lang_gc_sections_1 (statement_list.head);
+
+ /* Keep all sections containing symbols undefined on the command-line.
+ Handle the entry symbol at the same time. */
+
+ if (entry_symbol != NULL)
+ {
+ fake_list_start.next = ldlang_undef_chain_list_head;
+ fake_list_start.name = (char *) entry_symbol;
+ ulist = &fake_list_start;
+ }
+ else
+ ulist = ldlang_undef_chain_list_head;
+
+ for (; ulist; ulist = ulist->next)
+ {
+ h = bfd_link_hash_lookup (link_info.hash, ulist->name,
+ false, false, false);
+
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ && ! bfd_is_abs_section (h->u.def.section))
+ {
+ h->u.def.section->flags |= SEC_KEEP;
+ }
+ }
+
+ bfd_gc_sections (output_bfd, &link_info);
+}
+
void
lang_process ()
{
@@ -3232,12 +3998,16 @@ lang_process ()
/* Add to the hash table all undefineds on the command line */
lang_place_undefineds ();
+ already_linked_table_init ();
+
/* Create a bfd for each input file */
current_target = default_target;
open_input_bfds (statement_list.head, false);
ldemul_after_open ();
+ already_linked_table_free ();
+
/* Make sure that we're not mixing architectures. We call this
after all the input files have been opened, but before we do any
other processing, so that any operations merge_private_bfd_data
@@ -3245,10 +4015,18 @@ lang_process ()
link. */
lang_check ();
+ /* Handle .exports instead of a version script if we're told to do so. */
+ if (command_line.version_exports_section)
+ lang_do_version_exports_section ();
+
/* Build all sets based on the information gathered from the input
files. */
ldctor_build_sets ();
+ /* Remove unreferenced sections if asked to. */
+ if (command_line.gc_sections)
+ lang_gc_sections ();
+
/* Size up the common data */
lang_common ();
@@ -3284,6 +4062,10 @@ lang_process ()
relax_again = false;
+ /* Note: pe-dll.c does something like this also. If you find
+ you need to change this code, you probably need to change
+ pe-dll.c also. DJ */
+
/* Do all the assignments with our current guesses as to
section sizes. */
lang_do_assignments (statement_list.head,
@@ -3320,6 +4102,11 @@ lang_process ()
abs_output_section,
(fill_type) 0, (bfd_vma) 0);
+ /* Make sure that the section addresses make sense. */
+ if (! link_info.relocateable
+ && command_line.check_section_addresses)
+ lang_check_section_addresses ();
+
/* Final stuffs */
ldemul_finish ();
@@ -3329,9 +4116,14 @@ lang_process ()
/* EXPORTED TO YACC */
void
-lang_add_wild (section_name, filename)
- CONST char *CONST section_name;
- CONST char *CONST filename;
+lang_add_wild (section_name, sections_sorted, filename, filenames_sorted,
+ keep_sections, exclude_filename_list)
+ const char *const section_name;
+ boolean sections_sorted;
+ const char *const filename;
+ boolean filenames_sorted;
+ boolean keep_sections;
+ struct name_list *exclude_filename_list;
{
lang_wild_statement_type *new = new_stat (lang_wild_statement,
stat_ptr);
@@ -3340,12 +4132,16 @@ lang_add_wild (section_name, filename)
{
placed_commons = true;
}
- if (filename != (char *) NULL)
+ if (filename != NULL && ! wildcardp (filename))
{
lang_has_input_file = true;
}
new->section_name = section_name;
+ new->sections_sorted = sections_sorted;
new->filename = filename;
+ new->filenames_sorted = filenames_sorted;
+ new->keep_sections = keep_sections;
+ new->exclude_filename_list = exclude_filename_list;
lang_list_init (&new->children);
}
@@ -3365,21 +4161,6 @@ lang_section_start (name, address)
called by ENTRY in a linker script. Command line arguments take
precedence. */
-/* WINDOWS_NT. When an entry point has been specified, we will also force
- this symbol to be defined by calling ldlang_add_undef (equivalent to
- having switch -u entry_name on the command line). The reason we do
- this is so that the user doesn't have to because they would have to use
- the -u switch if they were specifying an entry point other than
- _mainCRTStartup. Specifically, if creating a windows application, entry
- point _WinMainCRTStartup must be specified.
- What I have found for non console applications (entry not _mainCRTStartup)
- is that the .obj that contains mainCRTStartup is brought in since it is
- the first encountered in libc.lib and it has other symbols in it which will
- be pulled in by the link process. To avoid this, adding -u with the entry
- point name specified forces the correct .obj to be used. We can avoid
- making the user do this by always adding the entry point name as an
- undefined symbol. */
-
void
lang_add_entry (name, cmdline)
CONST char *name;
@@ -3392,14 +4173,6 @@ lang_add_entry (name, cmdline)
entry_symbol = name;
entry_from_cmdline = cmdline;
}
-#if 0
- /* don't do this yet. It seems to work (the executables run), but the
- image created is very different from what I was getting before indicating
- that something else is being pulled in. When everything else is working,
- then try to put this back in to see if it will do the right thing for
- other more complicated applications */
- ldlang_add_undef (name);
-#endif
}
void
@@ -3481,7 +4254,7 @@ lang_add_reloc (reloc, howto, section, name, addend)
p->output_vma = 0;
}
-void
+lang_assignment_statement_type *
lang_add_assignment (exp)
etree_type * exp;
{
@@ -3489,6 +4262,7 @@ lang_add_assignment (exp)
stat_ptr);
new->exp = exp;
+ return new;
}
void
@@ -3504,7 +4278,7 @@ lang_startup (name)
{
if (startup_file != (char *) NULL)
{
- einfo ("%P%Fmultiple STARTUP files\n");
+ einfo (_("%P%Fmultiple STARTUP files\n"));
}
first_file->filename = name;
first_file->local_sym_name = name;
@@ -3521,13 +4295,22 @@ lang_float (maybe)
}
void
-lang_leave_output_section_statement (fill, memspec, phdrs)
+lang_leave_output_section_statement (fill, memspec, phdrs, lma_memspec)
bfd_vma fill;
const char *memspec;
struct lang_output_section_phdr_list *phdrs;
+ const char *lma_memspec;
{
current_section->fill = fill;
current_section->region = lang_memory_region_lookup (memspec);
+ if (strcmp (lma_memspec, "*default*") != 0)
+ {
+ current_section->lma_region = lang_memory_region_lookup (lma_memspec);
+ /* if no runtime region has been given, but the load region has been,
+ use the load region */
+ if (strcmp (memspec, "*default*") == 0)
+ current_section->region = lang_memory_region_lookup (lma_memspec);
+ }
current_section->phdrs = phdrs;
stat_ptr = &statement_list;
}
@@ -3547,7 +4330,7 @@ lang_abs_symbol_at_beginning_of (secname, name)
h = bfd_link_hash_lookup (link_info.hash, name, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo ("%P%F: bfd_link_hash_lookup failed: %E\n");
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new
|| h->type == bfd_link_hash_undefined)
@@ -3581,7 +4364,7 @@ lang_abs_symbol_at_end_of (secname, name)
h = bfd_link_hash_lookup (link_info.hash, name, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo ("%P%F: bfd_link_hash_lookup failed: %E\n");
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new
|| h->type == bfd_link_hash_undefined)
@@ -3595,7 +4378,8 @@ lang_abs_symbol_at_end_of (secname, name)
h->u.def.value = 0;
else
h->u.def.value = (bfd_get_section_vma (output_bfd, sec)
- + bfd_section_size (output_bfd, sec));
+ + bfd_section_size (output_bfd, sec) /
+ bfd_octets_per_byte (output_bfd));
h->u.def.section = bfd_abs_section_ptr;
}
@@ -3766,7 +4550,7 @@ lang_record_phdrs ()
flags,
l->at == NULL ? false : true,
at, l->filehdr, l->phdrs, c, secs))
- einfo ("%F%P: bfd_record_phdr failed: %E\n");
+ einfo (_("%F%P: bfd_record_phdr failed: %E\n"));
}
free (secs);
@@ -3785,7 +4569,7 @@ lang_record_phdrs ()
pl != NULL;
pl = pl->next)
if (! pl->used && strcmp (pl->name, "NONE") != 0)
- einfo ("%X%P: section `%s' assigned to non-existent phdr `%s'\n",
+ einfo (_("%X%P: section `%s' assigned to non-existent phdr `%s'\n"),
u->output_section_statement.name, pl->name);
}
}
@@ -3887,7 +4671,7 @@ lang_enter_overlay_section (name)
if (overlay_max == NULL)
overlay_max = size;
else
- overlay_max = exp_binop (MAX, overlay_max, size);
+ overlay_max = exp_binop (MAX_K, overlay_max, size);
}
/* Finish a section in an overlay. There isn't any special to do
@@ -3905,7 +4689,8 @@ lang_leave_overlay_section (fill, phdrs)
name = current_section->name;
- lang_leave_output_section_statement (fill, "*default*", phdrs);
+ lang_leave_output_section_statement (fill, "*default*",
+ phdrs, "*default*");
/* Define the magic symbols. */
@@ -3935,12 +4720,14 @@ lang_leave_overlay_section (fill, phdrs)
looks through all the sections in the overlay and sets them. */
void
-lang_leave_overlay (fill, memspec, phdrs)
+lang_leave_overlay (fill, memspec, phdrs, lma_memspec)
bfd_vma fill;
const char *memspec;
struct lang_output_section_phdr_list *phdrs;
+ const char *lma_memspec;
{
lang_memory_region_type *region;
+ lang_memory_region_type *lma_region;
struct overlay_list *l;
struct lang_nocrossref *nocrossref;
@@ -3949,6 +4736,11 @@ lang_leave_overlay (fill, memspec, phdrs)
else
region = lang_memory_region_lookup (memspec);
+ if (lma_memspec == NULL)
+ lma_region = NULL;
+ else
+ lma_region = lang_memory_region_lookup (lma_memspec);
+
nocrossref = NULL;
l = overlay_list;
@@ -3960,6 +4752,8 @@ lang_leave_overlay (fill, memspec, phdrs)
l->os->fill = fill;
if (region != NULL && l->os->region == NULL)
l->os->region = region;
+ if (lma_region != NULL && l->os->lma_region == NULL)
+ l->os->lma_region = lma_region;
if (phdrs != NULL && l->os->phdrs == NULL)
l->os->phdrs = phdrs;
@@ -3998,18 +4792,97 @@ lang_leave_overlay (fill, memspec, phdrs)
struct bfd_elf_version_tree *lang_elf_version_info;
+static int
+lang_vers_match_lang_c (expr, sym)
+ struct bfd_elf_version_expr *expr;
+ const char *sym;
+{
+ if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
+ return 1;
+ return fnmatch (expr->pattern, sym, 0) == 0;
+}
+
+static int
+lang_vers_match_lang_cplusplus (expr, sym)
+ struct bfd_elf_version_expr *expr;
+ const char *sym;
+{
+ char *alt_sym;
+ int result;
+
+ if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
+ return 1;
+
+ alt_sym = cplus_demangle(sym, /* DMGL_NO_TPARAMS */ 0);
+ if (!alt_sym)
+ {
+ /* cplus_demangle (also) returns NULL when it is not a C++ symbol.
+ Should we early out false in this case? */
+ result = fnmatch (expr->pattern, sym, 0) == 0;
+ }
+ else
+ {
+ result = fnmatch (expr->pattern, alt_sym, 0) == 0;
+ free (alt_sym);
+ }
+
+ return result;
+}
+
+static int
+lang_vers_match_lang_java (expr, sym)
+ struct bfd_elf_version_expr *expr;
+ const char *sym;
+{
+ char *alt_sym;
+ int result;
+
+ if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
+ return 1;
+
+ alt_sym = cplus_demangle(sym, DMGL_JAVA);
+ if (!alt_sym)
+ {
+ /* cplus_demangle (also) returns NULL when it is not a Java symbol.
+ Should we early out false in this case? */
+ result = fnmatch (expr->pattern, sym, 0) == 0;
+ }
+ else
+ {
+ result = fnmatch (expr->pattern, alt_sym, 0) == 0;
+ free (alt_sym);
+ }
+
+ return result;
+}
+
/* This is called for each variable name or match expression. */
struct bfd_elf_version_expr *
-lang_new_vers_regex (orig, new)
+lang_new_vers_regex (orig, new, lang)
struct bfd_elf_version_expr *orig;
const char *new;
+ const char *lang;
{
struct bfd_elf_version_expr *ret;
ret = (struct bfd_elf_version_expr *) xmalloc (sizeof *ret);
ret->next = orig;
- ret->match = new;
+ ret->pattern = new;
+
+ if (lang == NULL || strcasecmp (lang, "C") == 0)
+ ret->match = lang_vers_match_lang_c;
+ else if (strcasecmp (lang, "C++") == 0)
+ ret->match = lang_vers_match_lang_cplusplus;
+ else if (strcasecmp (lang, "Java") == 0)
+ ret->match = lang_vers_match_lang_java;
+ else
+ {
+ einfo (_("%X%P: unknown language `%s' in version information\n"),
+ lang);
+ ret->match = lang_vers_match_lang_c;
+ }
+
return ret;
}
@@ -4054,7 +4927,7 @@ lang_register_vers_node (name, version, deps)
/* Make sure this node has a unique name. */
for (t = lang_elf_version_info; t != NULL; t = t->next)
if (strcmp (t->name, name) == 0)
- einfo ("%X%P: duplicate version tag `%s'\n", name);
+ einfo (_("%X%P: duplicate version tag `%s'\n"), name);
/* Check the global and local match names, and make sure there
aren't any duplicates. */
@@ -4066,9 +4939,9 @@ lang_register_vers_node (name, version, deps)
struct bfd_elf_version_expr *e2;
for (e2 = t->locals; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->match, e2->match) == 0)
- einfo ("%X%P: duplicate expression `%s' in version information\n",
- e1->match);
+ if (strcmp (e1->pattern, e2->pattern) == 0)
+ einfo (_("%X%P: duplicate expression `%s' in version information\n"),
+ e1->pattern);
}
}
@@ -4079,9 +4952,9 @@ lang_register_vers_node (name, version, deps)
struct bfd_elf_version_expr *e2;
for (e2 = t->globals; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->match, e2->match) == 0)
- einfo ("%X%P: duplicate expression `%s' in version information\n",
- e1->match);
+ if (strcmp (e1->pattern, e2->pattern) == 0)
+ einfo (_("%X%P: duplicate expression `%s' in version information\n"),
+ e1->pattern);
}
}
@@ -4117,7 +4990,45 @@ lang_add_vers_depend (list, name)
}
}
- einfo ("%X%P: unable to find version dependency `%s'\n", name);
+ einfo (_("%X%P: unable to find version dependency `%s'\n"), name);
return ret;
}
+
+static void
+lang_do_version_exports_section ()
+{
+ struct bfd_elf_version_expr *greg = NULL, *lreg;
+
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ asection *sec = bfd_get_section_by_name (is->the_bfd, ".exports");
+ char *contents, *p;
+ bfd_size_type len;
+
+ if (sec == NULL)
+ continue;
+
+ len = bfd_section_size (is->the_bfd, sec);
+ contents = xmalloc (len);
+ if (!bfd_get_section_contents (is->the_bfd, sec, contents, 0, len))
+ einfo (_("%X%P: unable to read .exports section contents"), sec);
+
+ p = contents;
+ while (p < contents+len)
+ {
+ greg = lang_new_vers_regex (greg, p, NULL);
+ p = strchr (p, '\0') + 1;
+ }
+
+ /* Do not free the contents, as we used them creating the regex. */
+
+ /* Do not include this section in the link. */
+ bfd_set_section_flags (is->the_bfd, sec,
+ bfd_get_section_flags (is->the_bfd, sec) | SEC_EXCLUDE);
+ }
+
+ lreg = lang_new_vers_regex (NULL, "*", NULL);
+ lang_register_vers_node (command_line.version_exports_section,
+ lang_new_vers_node (greg, lreg), NULL);
+}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 60edc0f..068cd96 100644
--- a/contrib/binutils/ld/ldlang.h
+++ b/contrib/binutils/ld/ldlang.h
@@ -1,5 +1,6 @@
/* ldlang.h - linker command language support
- Copyright 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -135,6 +136,7 @@ typedef struct lang_output_section_statement_struct
flagword flags; /* Or together of all input sections */
enum section_type sectype;
struct memory_region_struct *region;
+ struct memory_region_struct *lma_region;
size_t block_value;
fill_type fill;
@@ -278,7 +280,11 @@ typedef struct lang_wild_statement_struct
{
lang_statement_header_type header;
const char *section_name;
+ boolean sections_sorted;
const char *filename;
+ boolean filenames_sorted;
+ boolean keep_sections;
+ struct name_list *exclude_filename_list;
lang_statement_list_type children;
} lang_wild_statement_type;
@@ -379,7 +385,8 @@ extern struct memory_region_struct *lang_memory_region_lookup
extern struct memory_region_struct *lang_memory_region_default
PARAMS ((asection *));
extern void lang_map PARAMS ((void));
-extern void lang_set_flags PARAMS ((lang_memory_region_type *, const char *));
+extern void lang_set_flags PARAMS ((lang_memory_region_type *, const char *,
+ int));
extern void lang_add_output PARAMS ((const char *, int from_script));
extern void lang_enter_output_section_statement
PARAMS ((const char *output_section_statement_name,
@@ -394,15 +401,17 @@ extern void lang_process PARAMS ((void));
extern void lang_section_start PARAMS ((const char *, union etree_union *));
extern void lang_add_entry PARAMS ((const char *, boolean));
extern void lang_add_target PARAMS ((const char *));
-extern void lang_add_wild PARAMS ((const char *const , const char *const));
+extern void lang_add_wild
+ PARAMS ((const char *, boolean, const char *, boolean, boolean, name_list *));
extern void lang_add_map PARAMS ((const char *));
extern void lang_add_fill PARAMS ((int));
-extern void lang_add_assignment PARAMS ((union etree_union *));
+extern lang_assignment_statement_type * lang_add_assignment PARAMS ((union etree_union *));
extern void lang_add_attribute PARAMS ((enum statement_enum));
extern void lang_startup PARAMS ((const char *));
extern void lang_float PARAMS ((enum bfd_boolean));
extern void lang_leave_output_section_statement
- PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *));
+ PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *,
+ const char *));
extern void lang_abs_symbol_at_end_of PARAMS ((const char *, const char *));
extern void lang_abs_symbol_at_beginning_of PARAMS ((const char *,
const char *));
@@ -468,12 +477,13 @@ extern void lang_enter_overlay_section PARAMS ((const char *));
extern void lang_leave_overlay_section
PARAMS ((bfd_vma, struct lang_output_section_phdr_list *));
extern void lang_leave_overlay
- PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *));
+ PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *,
+ const char *));
extern struct bfd_elf_version_tree *lang_elf_version_info;
extern struct bfd_elf_version_expr *lang_new_vers_regex
- PARAMS ((struct bfd_elf_version_expr *, const char *));
+ PARAMS ((struct bfd_elf_version_expr *, const char *, const char *));
extern struct bfd_elf_version_tree *lang_new_vers_node
PARAMS ((struct bfd_elf_version_expr *, struct bfd_elf_version_expr *));
extern struct bfd_elf_version_deps *lang_add_vers_depend
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index dfdf737..2eef80f 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -1,6 +1,6 @@
%{
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -74,6 +74,7 @@ static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static const char *file_name_stack[MAX_INCLUDE_DEPTH];
static unsigned int lineno_stack[MAX_INCLUDE_DEPTH];
static unsigned int include_stack_ptr = 0;
+static int vers_node_nesting = 0;
static YY_BUFFER_STATE yy_create_string_buffer PARAMS ((const char *string,
size_t size));
@@ -114,7 +115,7 @@ WHITE [ \t\n\r]+
NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
-V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
+V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
%s SCRIPT
%s EXPRESSION
@@ -239,9 +240,11 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
-<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX); }
-<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN); }
+<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
+<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
+<EXPRESSION,BOTH>"ASSERT" { RTOKEN(ASSERT_K); }
<BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
+<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
<EXPRESSION,BOTH,SCRIPT>"sizeof_headers" { RTOKEN(SIZEOF_HEADERS);}
<EXPRESSION,BOTH,SCRIPT>"SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);}
@@ -272,6 +275,7 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
<BOTH,SCRIPT>"NOFLOAT" { RTOKEN(NOFLOAT);}
<EXPRESSION,BOTH,SCRIPT>"NOCROSSREFS" { RTOKEN(NOCROSSREFS);}
<BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY); }
+<BOTH,SCRIPT>"SORT" { RTOKEN(SORT); }
<EXPRESSION,BOTH,SCRIPT>"NOLOAD" { RTOKEN(NOLOAD);}
<EXPRESSION,BOTH,SCRIPT>"DSECT" { RTOKEN(DSECT);}
<EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);}
@@ -285,6 +289,8 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
<BOTH,SCRIPT>"PHDRS" { RTOKEN (PHDRS); }
<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
+<EXPRESSION,BOTH,SCRIPT>"KEEP" { RTOKEN(KEEP); }
+<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
<MRI>"#".*\n? { ++ lineno; }
<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ }
@@ -302,7 +308,6 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
<MRI>"NAME" { RTOKEN(NAMEWORD); }
<MRI>"FORMAT" { RTOKEN(FORMAT); }
<MRI>"CASE" { RTOKEN(CASE); }
-<MRI>"EXTERN" { RTOKEN(EXTERN); }
<MRI>"START" { RTOKEN(START); }
<MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ }
<MRI>"SECT" { RTOKEN(SECT); }
@@ -358,7 +363,7 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
}
}
-<EXPRESSION,BOTH,SCRIPT>"\""[^\"]*"\"" {
+<EXPRESSION,BOTH,SCRIPT,VERS_NODE>"\""[^\"]*"\"" {
/* No matter the state, quotes
give what's inside */
yylval.name = buystring(yytext+1);
@@ -374,6 +379,8 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
<VERS_NODE>local { RTOKEN(LOCAL); }
+<VERS_NODE>extern { RTOKEN(EXTERN); }
+
<VERS_NODE>{V_IDENTIFIER} { yylval.name = buystring (yytext);
return VERS_IDENTIFIER; }
@@ -382,8 +389,16 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]*
<VERS_START>"{" { BEGIN(VERS_SCRIPT); return *yytext; }
-<VERS_SCRIPT>"{" { BEGIN(VERS_NODE); return *yytext; }
-<VERS_SCRIPT,VERS_NODE>"}" { BEGIN(VERS_SCRIPT); return *yytext; }
+<VERS_SCRIPT>"{" { BEGIN(VERS_NODE);
+ vers_node_nesting = 0;
+ return *yytext;
+ }
+<VERS_SCRIPT>"}" { return *yytext; }
+<VERS_NODE>"{" { vers_node_nesting++; return *yytext; }
+<VERS_NODE>"}" { if (--vers_node_nesting < 0)
+ BEGIN(VERS_SCRIPT);
+ return *yytext;
+ }
<VERS_START,VERS_NODE,VERS_SCRIPT>[\n] { lineno++; }
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index 97fed9d..ba2a592 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -1,5 +1,6 @@
/* Main program of GNU linker.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -82,6 +83,9 @@ boolean version_printed;
/* Nonzero means link in every member of an archive. */
boolean whole_archive;
+/* True if we should demangle symbol names. */
+boolean demangling;
+
args_type command_line;
ld_config_type config;
@@ -113,7 +117,7 @@ static boolean warning_callback PARAMS ((struct bfd_link_info *,
static void warning_find_reloc PARAMS ((bfd *, asection *, PTR));
static boolean undefined_symbol PARAMS ((struct bfd_link_info *,
const char *, bfd *,
- asection *, bfd_vma));
+ asection *, bfd_vma, boolean));
static boolean reloc_overflow PARAMS ((struct bfd_link_info *, const char *,
const char *, bfd_vma,
bfd *, asection *, bfd_vma));
@@ -162,6 +166,12 @@ main (argc, argv)
char *emulation;
long start_time = get_run_time ();
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
program_name = argv[0];
xmalloc_set_program_name (program_name);
@@ -179,7 +189,7 @@ main (argc, argv)
a different target. The macro TARGET is defined by Makefile. */
if (! bfd_set_default_target (TARGET))
{
- einfo ("%X%P: can't set BFD default target to `%s': %E\n", TARGET);
+ einfo (_("%X%P: can't set BFD default target to `%s': %E\n"), TARGET);
xexit (1);
}
@@ -188,10 +198,19 @@ main (argc, argv)
whole_archive = false;
config.build_constructors = true;
config.dynamic_link = false;
+ config.has_shared = false;
command_line.force_common_definition = false;
command_line.interpreter = NULL;
command_line.rpath = NULL;
command_line.warn_mismatch = true;
+ command_line.check_section_addresses = true;
+
+ /* We initialize DEMANGLING based on the environment variable
+ COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
+ output of the linker, unless COLLECT_NO_DEMANGLE is set in the
+ environment. Acting the same way here lets us provide the same
+ interface by default. */
+ demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;
link_info.callbacks = &link_callbacks;
link_info.relocateable = false;
@@ -199,6 +218,8 @@ main (argc, argv)
link_info.symbolic = false;
link_info.static_link = false;
link_info.traditional_format = false;
+ link_info.optimize = false;
+ link_info.no_undefined = false;
link_info.strip = strip_none;
link_info.discard = discard_none;
link_info.keep_memory = true;
@@ -209,7 +230,12 @@ main (argc, argv)
link_info.notice_all = false;
link_info.notice_hash = NULL;
link_info.wrap_hash = NULL;
-
+ link_info.mpc860c0 = 0;
+ /* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init
+ and _fini symbols. We are compatible. */
+ link_info.init_function = "_init";
+ link_info.fini_function = "_fini";
+
ldfile_add_arch ("");
config.make_executable = true;
@@ -230,10 +256,14 @@ main (argc, argv)
if (link_info.relocateable)
{
- if (command_line.relax)
- einfo ("%P%F: -relax and -r may not be used together\n");
+ if (command_line.gc_sections)
+ einfo ("%P%F: --gc-sections and -r may not be used together\n");
+ if (link_info.mpc860c0)
+ einfo (_("%P%F: -r and --mpc860c0 may not be used together\n"));
+ else if (command_line.relax)
+ einfo (_("%P%F: --relax and -r may not be used together\n"));
if (link_info.shared)
- einfo ("%P%F: -r and -shared may not be used together\n");
+ einfo (_("%P%F: -r and -shared may not be used together\n"));
}
/* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
@@ -262,7 +292,7 @@ main (argc, argv)
{
if (trace_file_tries)
{
- info_msg ("using internal linker script:\n");
+ info_msg (_("using internal linker script:\n"));
info_msg ("==================================================\n");
info_msg (s);
info_msg ("\n==================================================\n");
@@ -281,12 +311,12 @@ main (argc, argv)
{
if (version_printed)
xexit (0);
- einfo ("%P%F: no input files\n");
+ einfo (_("%P%F: no input files\n"));
}
if (trace_files)
{
- info_msg ("%P: mode %s\n", emulation);
+ info_msg (_("%P: mode %s\n"), emulation);
}
ldemul_after_parse ();
@@ -304,7 +334,7 @@ main (argc, argv)
if (config.map_file == (FILE *) NULL)
{
bfd_set_error (bfd_error_system_call);
- einfo ("%P%F: cannot open map file %s: %E\n",
+ einfo (_("%P%F: cannot open map file %s: %E\n"),
config.map_filename);
}
}
@@ -350,7 +380,7 @@ main (argc, argv)
{
if (trace_files == true)
{
- einfo ("%P: link errors found, deleting executable `%s'\n",
+ einfo (_("%P: link errors found, deleting executable `%s'\n"),
output_filename);
}
@@ -361,7 +391,7 @@ main (argc, argv)
else
{
if (! bfd_close (output_bfd))
- einfo ("%F%B: final close failed: %E\n", output_bfd);
+ einfo (_("%F%B: final close failed: %E\n"), output_bfd);
/* If the --force-exe-suffix is enabled, and we're making an
executable file and it doesn't end in .exe, copy it to one which does. */
@@ -385,21 +415,21 @@ main (argc, argv)
dst = fopen (dst_name, FOPEN_WB);
if (!src)
- einfo ("%X%P: unable to open for source of copy `%s'\n", output_filename);
+ einfo (_("%X%P: unable to open for source of copy `%s'\n"), output_filename);
if (!dst)
- einfo ("%X%P: unable to open for destination of copy `%s'\n", dst_name);
+ einfo (_("%X%P: unable to open for destination of copy `%s'\n"), dst_name);
while ((l = fread (buf, 1, bsize, src)) > 0)
{
int done = fwrite (buf, 1, l, dst);
if (done != l)
{
- einfo ("%P: Error writing file `%s'\n", dst_name);
+ einfo (_("%P: Error writing file `%s'\n"), dst_name);
}
}
fclose (src);
if (fclose (dst) == EOF)
{
- einfo ("%P: Error closing file `%s'\n", dst_name);
+ einfo (_("%P: Error closing file `%s'\n"), dst_name);
}
free (dst_name);
free (buf);
@@ -411,16 +441,15 @@ main (argc, argv)
if (config.stats)
{
- extern char **environ;
#ifdef HAVE_SBRK
char *lim = (char *) sbrk (0);
#endif
long run_time = get_run_time () - start_time;
- fprintf (stderr, "%s: total time in link: %ld.%06ld\n",
+ fprintf (stderr, _("%s: total time in link: %ld.%06ld\n"),
program_name, run_time / 1000000, run_time % 1000000);
#ifdef HAVE_SBRK
- fprintf (stderr, "%s: data size %ld\n", program_name,
+ fprintf (stderr, _("%s: data size %ld\n"), program_name,
(long) (lim - (char *) &environ));
#endif
}
@@ -461,7 +490,7 @@ get_emulation (argc, argv)
}
else
{
- einfo("%P%F: missing argument to -m\n");
+ einfo(_("%P%F: missing argument to -m\n"));
}
}
else if (strcmp (argv[i], "-mips1") == 0
@@ -575,12 +604,12 @@ add_ysym (name)
if (! bfd_hash_table_init_n (link_info.notice_hash,
bfd_hash_newfunc,
61))
- einfo ("%P%F: bfd_hash_table_init failed: %E\n");
+ einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.notice_hash, name, true, true)
== (struct bfd_hash_entry *) NULL)
- einfo ("%P%F: bfd_hash_lookup failed: %E\n");
+ einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
}
/* Record a symbol to be wrapped, from the --wrap option. */
@@ -596,10 +625,10 @@ add_wrap (name)
if (! bfd_hash_table_init_n (link_info.wrap_hash,
bfd_hash_newfunc,
61))
- einfo ("%P%F: bfd_hash_table_init failed: %E\n");
+ einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
- einfo ("%P%F: bfd_hash_lookup failed: %E\n");
+ einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
}
/* Handle the -retain-symbols-file option. */
@@ -614,7 +643,7 @@ add_keepsyms_file (filename)
int c;
if (link_info.strip == strip_some)
- einfo ("%X%P: error: duplicate retain-symbols-file\n");
+ einfo (_("%X%P: error: duplicate retain-symbols-file\n"));
file = fopen (filename, "r");
if (file == (FILE *) NULL)
@@ -627,7 +656,7 @@ add_keepsyms_file (filename)
link_info.keep_hash = ((struct bfd_hash_table *)
xmalloc (sizeof (struct bfd_hash_table)));
if (! bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc))
- einfo ("%P%F: bfd_hash_table_init failed: %E\n");
+ einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
bufsize = 100;
buf = (char *) xmalloc (bufsize);
@@ -658,12 +687,12 @@ add_keepsyms_file (filename)
if (bfd_hash_lookup (link_info.keep_hash, buf, true, true)
== (struct bfd_hash_entry *) NULL)
- einfo ("%P%F: bfd_hash_lookup for insertion failed: %E\n");
+ einfo (_("%P%F: bfd_hash_lookup for insertion failed: %E\n"));
}
}
if (link_info.strip != strip_none)
- einfo ("%P: `-retain-symbols-file' overrides `-s' and `-S'\n");
+ einfo (_("%P: `-retain-symbols-file' overrides `-s' and `-S'\n"));
link_info.strip = strip_some;
}
@@ -676,7 +705,7 @@ add_keepsyms_file (filename)
/*ARGSUSED*/
static boolean
add_archive_element (info, abfd, name)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *abfd;
const char *name;
{
@@ -740,8 +769,8 @@ add_archive_element (info, abfd, name)
{
char buf[100];
- sprintf (buf, "%-29s %s\n\n", "Archive member included",
- "because of file (symbol)");
+ sprintf (buf, "%-29s %s\n\n", _("Archive member included"),
+ _("because of file (symbol)"));
minfo ("%s", buf);
header_printed = true;
}
@@ -791,7 +820,7 @@ add_archive_element (info, abfd, name)
/*ARGSUSED*/
static boolean
multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *obfd;
asection *osec;
@@ -813,10 +842,10 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
&& bfd_is_abs_section (nsec->output_section)))
return true;
- einfo ("%X%C: multiple definition of `%T'\n",
+ einfo (_("%X%C: multiple definition of `%T'\n"),
nbfd, nsec, nval, name);
if (obfd != (bfd *) NULL)
- einfo ("%D: first defined here\n", obfd, osec, oval);
+ einfo (_("%D: first defined here\n"), obfd, osec, oval);
return true;
}
@@ -828,7 +857,7 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
/*ARGSUSED*/
static boolean
multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *obfd;
enum bfd_link_hash_type otype;
@@ -845,43 +874,43 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
|| ntype == bfd_link_hash_indirect)
{
ASSERT (otype == bfd_link_hash_common);
- einfo ("%B: warning: definition of `%T' overriding common\n",
+ einfo (_("%B: warning: definition of `%T' overriding common\n"),
nbfd, name);
if (obfd != NULL)
- einfo ("%B: warning: common is here\n", obfd);
+ einfo (_("%B: warning: common is here\n"), obfd);
}
else if (otype == bfd_link_hash_defined
|| otype == bfd_link_hash_defweak
|| otype == bfd_link_hash_indirect)
{
ASSERT (ntype == bfd_link_hash_common);
- einfo ("%B: warning: common of `%T' overridden by definition\n",
+ einfo (_("%B: warning: common of `%T' overridden by definition\n"),
nbfd, name);
if (obfd != NULL)
- einfo ("%B: warning: defined here\n", obfd);
+ einfo (_("%B: warning: defined here\n"), obfd);
}
else
{
ASSERT (otype == bfd_link_hash_common && ntype == bfd_link_hash_common);
if (osize > nsize)
{
- einfo ("%B: warning: common of `%T' overridden by larger common\n",
+ einfo (_("%B: warning: common of `%T' overridden by larger common\n"),
nbfd, name);
if (obfd != NULL)
- einfo ("%B: warning: larger common is here\n", obfd);
+ einfo (_("%B: warning: larger common is here\n"), obfd);
}
else if (nsize > osize)
{
- einfo ("%B: warning: common of `%T' overriding smaller common\n",
+ einfo (_("%B: warning: common of `%T' overriding smaller common\n"),
nbfd, name);
if (obfd != NULL)
- einfo ("%B: warning: smaller common is here\n", obfd);
+ einfo (_("%B: warning: smaller common is here\n"), obfd);
}
else
{
- einfo ("%B: warning: multiple common of `%T'\n", nbfd, name);
+ einfo (_("%B: warning: multiple common of `%T'\n"), nbfd, name);
if (obfd != NULL)
- einfo ("%B: warning: previous common is here\n", obfd);
+ einfo (_("%B: warning: previous common is here\n"), obfd);
}
}
@@ -895,7 +924,7 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
/*ARGSUSED*/
static boolean
add_to_set (info, h, reloc, abfd, section, value)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
struct bfd_link_hash_entry *h;
bfd_reloc_code_real_type reloc;
bfd *abfd;
@@ -903,7 +932,7 @@ add_to_set (info, h, reloc, abfd, section, value)
bfd_vma value;
{
if (config.warn_constructors)
- einfo ("%P: warning: global constructor %s used\n",
+ einfo (_("%P: warning: global constructor %s used\n"),
h->root.string);
if (! config.build_constructors)
@@ -942,7 +971,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
char set_name[1 + sizeof "__CTOR_LIST__"];
if (config.warn_constructors)
- einfo ("%P: warning: global constructor %s used\n", name);
+ einfo (_("%P: warning: global constructor %s used\n"), name);
if (! config.build_constructors)
return true;
@@ -952,7 +981,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
if (bfd_reloc_type_lookup (output_bfd, BFD_RELOC_CTOR) == NULL
&& (link_info.relocateable
|| bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
- einfo ("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n");
+ einfo (_("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
s = set_name;
if (bfd_get_symbol_leading_char (abfd) != '\0')
@@ -964,7 +993,7 @@ constructor_callback (info, constructor, name, abfd, section, value)
h = bfd_link_hash_lookup (info->hash, set_name, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo ("%P%F: bfd_link_hash_lookup failed: %E\n");
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
@@ -994,7 +1023,7 @@ struct warning_callback_info
/*ARGSUSED*/
static boolean
warning_callback (info, warning, symbol, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *warning;
const char *symbol;
bfd *abfd;
@@ -1032,11 +1061,11 @@ warning_callback (info, warning, symbol, abfd, section, address)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
- einfo ("%B%F: could not read symbols: %E\n", abfd);
+ einfo (_("%B%F: could not read symbols: %E\n"), abfd);
asymbols = (asymbol **) xmalloc (symsize);
symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
if (symbol_count < 0)
- einfo ("%B%F: could not read symbols: %E\n", abfd);
+ einfo (_("%B%F: could not read symbols: %E\n"), abfd);
if (entry != NULL)
{
entry->asymbols = asymbols;
@@ -1082,14 +1111,14 @@ warning_find_reloc (abfd, sec, iarg)
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
- einfo ("%B%F: could not read relocs: %E\n", abfd);
+ einfo (_("%B%F: could not read relocs: %E\n"), abfd);
if (relsize == 0)
return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
if (relcount < 0)
- einfo ("%B%F: could not read relocs: %E\n", abfd);
+ einfo (_("%B%F: could not read relocs: %E\n"), abfd);
p = relpp;
pend = p + relcount;
@@ -1115,12 +1144,13 @@ warning_find_reloc (abfd, sec, iarg)
/*ARGSUSED*/
static boolean
-undefined_symbol (info, name, abfd, section, address)
- struct bfd_link_info *info;
+undefined_symbol (info, name, abfd, section, address, fatal)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *abfd;
asection *section;
bfd_vma address;
+ boolean fatal;
{
static char *error_name;
static unsigned int error_count;
@@ -1138,14 +1168,14 @@ undefined_symbol (info, name, abfd, section, address)
hash = ((struct bfd_hash_table *)
xmalloc (sizeof (struct bfd_hash_table)));
if (! bfd_hash_table_init (hash, bfd_hash_newfunc))
- einfo ("%F%P: bfd_hash_table_init failed: %E\n");
+ einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (hash, name, false, false) != NULL)
return true;
if (bfd_hash_lookup (hash, name, true, true) == NULL)
- einfo ("%F%P: bfd_hash_lookup failed: %E\n");
+ einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
}
/* We never print more than a reasonable number of errors in a row
@@ -1164,19 +1194,27 @@ undefined_symbol (info, name, abfd, section, address)
if (section != NULL)
{
if (error_count < MAX_ERRORS_IN_A_ROW)
- einfo ("%X%C: undefined reference to `%T'\n",
- abfd, section, address, name);
+ {
+ einfo (_("%C: undefined reference to `%T'\n"),
+ abfd, section, address, name);
+ if (fatal)
+ einfo ("%X");
+ }
else if (error_count == MAX_ERRORS_IN_A_ROW)
- einfo ("%D: more undefined references to `%T' follow\n",
+ einfo (_("%D: more undefined references to `%T' follow\n"),
abfd, section, address, name);
}
else
{
if (error_count < MAX_ERRORS_IN_A_ROW)
- einfo ("%X%B: undefined reference to `%T'\n",
- abfd, name);
+ {
+ einfo (_("%B: undefined reference to `%T'\n"),
+ abfd, name);
+ if (fatal)
+ einfo ("%X");
+ }
else if (error_count == MAX_ERRORS_IN_A_ROW)
- einfo ("%B: more undefined references to `%T' follow\n",
+ einfo (_("%B: more undefined references to `%T' follow\n"),
abfd, name);
}
@@ -1188,7 +1226,7 @@ undefined_symbol (info, name, abfd, section, address)
/*ARGSUSED*/
static boolean
reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
const char *reloc_name;
bfd_vma addend;
@@ -1197,10 +1235,10 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
bfd_vma address;
{
if (abfd == (bfd *) NULL)
- einfo ("%P%X: generated");
+ einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
- einfo (" relocation truncated to fit: %s %T", reloc_name, name);
+ einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
einfo ("\n");
@@ -1212,17 +1250,17 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
/*ARGSUSED*/
static boolean
reloc_dangerous (info, message, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *message;
bfd *abfd;
asection *section;
bfd_vma address;
{
if (abfd == (bfd *) NULL)
- einfo ("%P%X: generated");
+ einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
- einfo ("dangerous relocation: %s\n", message);
+ einfo (_("dangerous relocation: %s\n"), message);
return true;
}
@@ -1232,17 +1270,17 @@ reloc_dangerous (info, message, abfd, section, address)
/*ARGSUSED*/
static boolean
unattached_reloc (info, name, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *abfd;
asection *section;
bfd_vma address;
{
if (abfd == (bfd *) NULL)
- einfo ("%P%X: generated");
+ einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
- einfo (" reloc refers to symbol `%T' which is not being output\n", name);
+ einfo (_(" reloc refers to symbol `%T' which is not being output\n"), name);
return true;
}
@@ -1261,9 +1299,12 @@ notice (info, name, abfd, section, value)
if (! info->notice_all
|| (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, name, false, false) != NULL))
- einfo ("%B: %s %s\n", abfd,
- bfd_is_und_section (section) ? "reference to" : "definition of",
- name);
+ {
+ if (bfd_is_und_section (section))
+ einfo ("%B: reference to %s\n", abfd, name);
+ else
+ einfo ("%B: definition of %s\n", abfd, name);
+ }
if (command_line.cref || nocrossref_list != NULL)
add_cref (name, abfd, section, value);
diff --git a/contrib/binutils/ld/ldmain.h b/contrib/binutils/ld/ldmain.h
index 5c5f38b..041bf3d 100644
--- a/contrib/binutils/ld/ldmain.h
+++ b/contrib/binutils/ld/ldmain.h
@@ -1,5 +1,5 @@
/* ldmain.h -
- Copyright 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 1999 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -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 GLD; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#ifndef LDMAIN_H
#define LDMAIN_H
@@ -27,6 +28,7 @@ extern boolean trace_files;
extern boolean trace_file_tries;
extern boolean version_printed;
extern boolean whole_archive;
+extern boolean demangling;
extern int g_switch_value;
extern const char *output_filename;
extern struct bfd_link_info link_info;
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index a292d40..e343944 100644
--- a/contrib/binutils/ld/ldmisc.c
+++ b/contrib/binutils/ld/ldmisc.c
@@ -1,5 +1,6 @@
/* ldmisc.c
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of GLD, the Gnu Linker.
@@ -173,8 +174,10 @@ vfinfo (fp, fmt, arg)
{
const char *name = va_arg (arg, const char *);
- if (name == (const char *) NULL)
- fprintf (fp, "no symbol");
+ if (name == (const char *) NULL || *name == 0)
+ fprintf (fp, _("no symbol"));
+ else if (! demangling)
+ fprintf (fp, "%s", name);
else
{
char *demangled;
@@ -210,7 +213,7 @@ vfinfo (fp, fmt, arg)
case 'E':
/* current bfd error or errno */
- fprintf (fp, bfd_errmsg (bfd_get_error ()));
+ fprintf (fp, "%s", bfd_errmsg (bfd_get_error ()));
break;
case 'I':
@@ -236,7 +239,7 @@ vfinfo (fp, fmt, arg)
else if (ldfile_input_filename != NULL)
fprintf (fp, "%s:%u", ldfile_input_filename, lineno);
else
- fprintf (fp, "built in linker script:%u", lineno);
+ fprintf (fp, _("built in linker script:%u"), lineno);
break;
case 'R':
@@ -286,11 +289,11 @@ vfinfo (fp, fmt, arg)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
- einfo ("%B%F: could not read symbols\n", abfd);
+ einfo (_("%B%F: could not read symbols\n"), abfd);
asymbols = (asymbol **) xmalloc (symsize);
symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
if (symbol_count < 0)
- einfo ("%B%F: could not read symbols\n", abfd);
+ einfo (_("%B%F: could not read symbols\n"), abfd);
if (entry != (lang_input_statement_type *) NULL)
{
entry->asymbols = asymbols;
@@ -326,7 +329,7 @@ vfinfo (fp, fmt, arg)
/* We use abfd->filename in this initial line,
in case filename is a .h file or something
similarly unhelpful. */
- lfinfo (fp, "%B: In function `%T':\n",
+ lfinfo (fp, _("%B: In function `%T':\n"),
abfd, functionname);
last_bfd = abfd;
@@ -458,7 +461,7 @@ info_assert (file, line)
const char *file;
unsigned int line;
{
- einfo ("%F%P: internal error %s %d\n", file, line);
+ einfo (_("%F%P: internal error %s %d\n"), file, line);
}
char *
@@ -533,3 +536,22 @@ print_nl ()
{
fprintf (config.map_file, "\n");
}
+
+/* A more or less friendly abort message. In ld.h abort is defined to
+ call this function. */
+
+void
+ld_abort (file, line, fn)
+ const char *file;
+ int line;
+ const char *fn;
+{
+ if (fn != NULL)
+ einfo (_("%P: internal error: aborting at %s line %d in %s\n"),
+ file, line, fn);
+ else
+ einfo (_("%P: internal error: aborting at %s line %d\n"),
+ file, line);
+ einfo (_("%P%F: please report this bug\n"));
+ xexit (1);
+}
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
index 6a5137b..5b600a2 100644
--- a/contrib/binutils/ld/ldver.c
+++ b/contrib/binutils/ld/ldver.c
@@ -1,5 +1,5 @@
/* ldver.c -- Print linker version.
- Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 1996, 1998 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -32,14 +32,14 @@ void
ldversion (noisy)
int noisy;
{
- fprintf (stdout, "GNU ld version %s (with BFD %s)\n",
+ fprintf (stdout, _("GNU ld version %s (with BFD %s)\n"),
ld_program_version, BFD_VERSION);
if (noisy)
{
ld_emulation_xfer_type **ptr = ld_emulations;
- printf (" Supported emulations:\n");
+ printf (_(" Supported emulations:\n"));
while (*ptr)
{
printf (" %s\n", (*ptr)->emulation_name);
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
index 0a18476..b56119a 100644
--- a/contrib/binutils/ld/ldwrite.c
+++ b/contrib/binutils/ld/ldwrite.c
@@ -56,7 +56,7 @@ build_link_order (statement)
link_order = bfd_new_link_order (output_bfd, output_section);
if (link_order == NULL)
- einfo ("%P%F: bfd_new_link_order failed\n");
+ einfo (_("%P%F: bfd_new_link_order failed\n"));
link_order->type = bfd_data_link_order;
link_order->offset = statement->data_statement.output_vma;
@@ -192,7 +192,7 @@ build_link_order (statement)
link_order = bfd_new_link_order (output_bfd, output_section);
if (link_order == NULL)
- einfo ("%P%F: bfd_new_link_order failed\n");
+ einfo (_("%P%F: bfd_new_link_order failed\n"));
link_order->offset = rs->output_vma;
link_order->size = bfd_get_reloc_size (rs->howto);
@@ -362,7 +362,7 @@ ds (s)
}
else
{
- printf ("%8x something else\n", l->offset);
+ printf (_("%8x something else\n"), l->offset);
}
l = l->next;
}
@@ -523,7 +523,7 @@ ldwrite ()
out. */
if (bfd_get_error () != bfd_error_no_error)
- einfo ("%F%P: final link failed: %E\n", output_bfd);
+ einfo (_("%F%P: final link failed: %E\n"), output_bfd);
else
xexit(1);
}
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index 257c2f8..7b5e89c 100644
--- a/contrib/binutils/ld/lexsup.c
+++ b/contrib/binutils/ld/lexsup.c
@@ -1,5 +1,5 @@
/* Parse options for the GNU linker.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -55,6 +55,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
that might disagree about consts. */
unsigned long strtoul ();
+static int is_num PARAMS ((const char *, int, int, int));
static void set_default_dirlist PARAMS ((char *dirlist_ptr));
static void set_section_start PARAMS ((char *sect, char *valstr));
static void help PARAMS ((void));
@@ -69,7 +70,8 @@ int parsing_defsym = 0;
#define OPTION_CALL_SHARED (OPTION_ASSERT + 1)
#define OPTION_CREF (OPTION_CALL_SHARED + 1)
#define OPTION_DEFSYM (OPTION_CREF + 1)
-#define OPTION_DYNAMIC_LINKER (OPTION_DEFSYM + 1)
+#define OPTION_DEMANGLE (OPTION_DEFSYM + 1)
+#define OPTION_DYNAMIC_LINKER (OPTION_DEMANGLE + 1)
#define OPTION_EB (OPTION_DYNAMIC_LINKER + 1)
#define OPTION_EL (OPTION_EB + 1)
#define OPTION_EMBEDDED_RELOCS (OPTION_EL + 1)
@@ -77,7 +79,8 @@ int parsing_defsym = 0;
#define OPTION_HELP (OPTION_EXPORT_DYNAMIC + 1)
#define OPTION_IGNORE (OPTION_HELP + 1)
#define OPTION_MAP (OPTION_IGNORE + 1)
-#define OPTION_NO_KEEP_MEMORY (OPTION_MAP + 1)
+#define OPTION_NO_DEMANGLE (OPTION_MAP + 1)
+#define OPTION_NO_KEEP_MEMORY (OPTION_NO_DEMANGLE + 1)
#define OPTION_NO_WARN_MISMATCH (OPTION_NO_KEEP_MEMORY + 1)
#define OPTION_NOINHIBIT_EXEC (OPTION_NO_WARN_MISMATCH + 1)
#define OPTION_NON_SHARED (OPTION_NOINHIBIT_EXEC + 1)
@@ -101,7 +104,8 @@ int parsing_defsym = 0;
#define OPTION_VERBOSE (OPTION_UR + 1)
#define OPTION_VERSION (OPTION_VERBOSE + 1)
#define OPTION_VERSION_SCRIPT (OPTION_VERSION + 1)
-#define OPTION_WARN_COMMON (OPTION_VERSION_SCRIPT + 1)
+#define OPTION_VERSION_EXPORTS_SECTION (OPTION_VERSION_SCRIPT + 1)
+#define OPTION_WARN_COMMON (OPTION_VERSION_EXPORTS_SECTION + 1)
#define OPTION_WARN_CONSTRUCTORS (OPTION_WARN_COMMON + 1)
#define OPTION_WARN_MULTIPLE_GP (OPTION_WARN_CONSTRUCTORS + 1)
#define OPTION_WARN_ONCE (OPTION_WARN_MULTIPLE_GP + 1)
@@ -111,6 +115,14 @@ int parsing_defsym = 0;
#define OPTION_WHOLE_ARCHIVE (OPTION_SPLIT_BY_FILE + 1)
#define OPTION_WRAP (OPTION_WHOLE_ARCHIVE + 1)
#define OPTION_FORCE_EXE_SUFFIX (OPTION_WRAP + 1)
+#define OPTION_GC_SECTIONS (OPTION_FORCE_EXE_SUFFIX + 1)
+#define OPTION_NO_GC_SECTIONS (OPTION_GC_SECTIONS + 1)
+#define OPTION_CHECK_SECTIONS (OPTION_NO_GC_SECTIONS + 1)
+#define OPTION_NO_CHECK_SECTIONS (OPTION_CHECK_SECTIONS + 1)
+#define OPTION_MPC860C0 (OPTION_NO_CHECK_SECTIONS + 1)
+#define OPTION_NO_UNDEFINED (OPTION_MPC860C0 + 1)
+#define OPTION_INIT (OPTION_NO_UNDEFINED + 1)
+#define OPTION_FINI (OPTION_INIT + 1)
/* The long options. This structure is used for both the option
parsing and the help text. */
@@ -140,96 +152,104 @@ struct ld_option
static const struct ld_option ld_options[] =
{
{ {NULL, required_argument, NULL, '\0'},
- 'a', "KEYWORD", "Shared library control for HP/UX compatibility",
+ 'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
ONE_DASH },
{ {"architecture", required_argument, NULL, 'A'},
- 'A', "ARCH", "Set architecture" , TWO_DASHES },
+ 'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
{ {"format", required_argument, NULL, 'b'},
- 'b', "TARGET", "Specify target for following input files", TWO_DASHES },
+ 'b', N_("TARGET"), N_("Specify target for following input files"), TWO_DASHES },
{ {"mri-script", required_argument, NULL, 'c'},
- 'c', "FILE", "Read MRI format linker script", TWO_DASHES },
+ 'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
{ {"dc", no_argument, NULL, 'd'},
- 'd', NULL, "Force common symbols to be defined", ONE_DASH },
+ 'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
{ {"dp", no_argument, NULL, 'd'},
'\0', NULL, NULL, ONE_DASH },
{ {"entry", required_argument, NULL, 'e'},
- 'e', "ADDRESS", "Set start address", TWO_DASHES },
+ 'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
{ {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC},
- 'E', NULL, "Export all dynamic symbols", TWO_DASHES },
+ 'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
+ { {"EB", no_argument, NULL, OPTION_EB},
+ '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
+ { {"EL", no_argument, NULL, OPTION_EL},
+ '\0', NULL, N_("Link little-endian objects"), ONE_DASH },
{ {"auxiliary", required_argument, NULL, 'f'},
- 'f', "SHLIB", "Auxiliary filter for shared object symbol table",
+ 'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
TWO_DASHES },
{ {"filter", required_argument, NULL, 'F'},
- 'F', "SHLIB", "Filter for shared object symbol table", TWO_DASHES },
+ 'F', N_("SHLIB"), N_("Filter for shared object symbol table"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'g', NULL, "Ignored", ONE_DASH },
+ 'g', NULL, N_("Ignored"), ONE_DASH },
{ {"gpsize", required_argument, NULL, 'G'},
- 'G', "SIZE", "Small data size (if no size, same as --shared)",
+ 'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
TWO_DASHES },
{ {"soname", required_argument, NULL, OPTION_SONAME},
- 'h', "FILENAME", "Set internal name of shared library", ONE_DASH },
+ 'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
{ {"library", required_argument, NULL, 'l'},
- 'l', "LIBNAME", "Search for library LIBNAME", TWO_DASHES },
+ 'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
{ {"library-path", required_argument, NULL, 'L'},
- 'L', "DIRECTORY", "Add DIRECTORY to library search path", TWO_DASHES },
+ 'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'm', "EMULATION", "Set emulation", ONE_DASH },
+ 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
{ {"print-map", no_argument, NULL, 'M'},
- 'M', NULL, "Print map file on standard output", TWO_DASHES },
+ 'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
{ {"nmagic", no_argument, NULL, 'n'},
- 'n', NULL, "Do not page align data", TWO_DASHES },
+ 'n', NULL, N_("Do not page align data"), TWO_DASHES },
{ {"omagic", no_argument, NULL, 'N'},
- 'N', NULL, "Do not page align data, do not make text readonly",
+ 'N', NULL, N_("Do not page align data, do not make text readonly"),
TWO_DASHES },
{ {"output", required_argument, NULL, 'o'},
- 'o', "FILE", "Set output file name", TWO_DASHES },
+ 'o', N_("FILE"), N_("Set output file name"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'O', NULL, "Ignored", ONE_DASH },
+ 'O', NULL, N_("Optimize output file"), ONE_DASH },
+ { {"Qy", no_argument, NULL, OPTION_IGNORE},
+ '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
{ {"relocateable", no_argument, NULL, 'r'},
- 'r', NULL, "Generate relocateable output", TWO_DASHES },
+ 'r', NULL, N_("Generate relocateable output"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
'i', NULL, NULL, ONE_DASH },
{ {"just-symbols", required_argument, NULL, 'R'},
- 'R', "FILE", "Just link symbols (if directory, same as --rpath)",
+ 'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
TWO_DASHES },
{ {"strip-all", no_argument, NULL, 's'},
- 's', NULL, "Strip all symbols", TWO_DASHES },
+ 's', NULL, N_("Strip all symbols"), TWO_DASHES },
{ {"strip-debug", no_argument, NULL, 'S'},
- 'S', NULL, "Strip debugging symbols", TWO_DASHES },
+ 'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
{ {"trace", no_argument, NULL, 't'},
- 't', NULL, "Trace file opens", TWO_DASHES },
+ 't', NULL, N_("Trace file opens"), TWO_DASHES },
{ {"script", required_argument, NULL, 'T'},
- 'T', "FILE", "Read linker script", TWO_DASHES },
+ 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
{ {"undefined", required_argument, NULL, 'u'},
- 'u', "SYMBOL", "Start with undefined reference to SYMBOL", TWO_DASHES },
+ 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES },
+ { {"Ur", no_argument, NULL, OPTION_UR},
+ '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
{ {"version", no_argument, NULL, OPTION_VERSION},
- 'v', NULL, "Print version information", TWO_DASHES },
+ 'v', NULL, N_("Print version information"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'V', NULL, "Print version and emulation information", ONE_DASH },
+ 'V', NULL, N_("Print version and emulation information"), ONE_DASH },
{ {"discard-all", no_argument, NULL, 'x'},
- 'x', NULL, "Discard all local symbols", TWO_DASHES },
+ 'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
{ {"discard-locals", no_argument, NULL, 'X'},
- 'X', NULL, "Discard temporary local symbols", TWO_DASHES },
+ 'X', NULL, N_("Discard temporary local symbols"), TWO_DASHES },
{ {"trace-symbol", required_argument, NULL, 'y'},
- 'y', "SYMBOL", "Trace mentions of SYMBOL", TWO_DASHES },
+ 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'Y', "PATH", "Default search path for Solaris compatibility", ONE_DASH },
+ 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"), ONE_DASH },
{ {NULL, required_argument, NULL, '\0'},
- 'z', "KEYWORD", "Ignored for Solaris compatibility", ONE_DASH },
+ 'z', N_("KEYWORD"), N_("Ignored for Solaris compatibility"), ONE_DASH },
{ {"start-group", no_argument, NULL, '('},
- '(', NULL, "Start a group", TWO_DASHES },
+ '(', NULL, N_("Start a group"), TWO_DASHES },
{ {"end-group", no_argument, NULL, ')'},
- ')', NULL, "End a group", TWO_DASHES },
+ ')', NULL, N_("End a group"), TWO_DASHES },
{ {"assert", required_argument, NULL, OPTION_ASSERT},
- '\0', "KEYWORD", "Ignored for SunOS compatibility", ONE_DASH },
+ '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
{ {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, "Link against shared libraries", ONE_DASH },
+ '\0', NULL, N_("Link against shared libraries"), ONE_DASH },
{ {"dy", no_argument, NULL, OPTION_CALL_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, "Do not link against shared libraries", ONE_DASH },
+ '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
{ {"dn", no_argument, NULL, OPTION_NON_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
@@ -237,102 +257,148 @@ static const struct ld_option ld_options[] =
{ {"static", no_argument, NULL, OPTION_NON_SHARED},
'\0', NULL, NULL, ONE_DASH },
{ {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
- '\0', NULL, "Bind global references locally", ONE_DASH },
+ '\0', NULL, N_("Bind global references locally"), ONE_DASH },
+ { {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
+ '\0', NULL, N_("Check section addresses for overlaps (default)"), TWO_DASHES },
+ { {"no-check-sections", no_argument, NULL, OPTION_NO_CHECK_SECTIONS},
+ '\0', NULL, N_("Do not check section addresses for overlaps"),
+ TWO_DASHES },
{ {"cref", no_argument, NULL, OPTION_CREF},
- '\0', NULL, "Output cross reference table", TWO_DASHES },
+ '\0', NULL, N_("Output cross reference table"), TWO_DASHES },
{ {"defsym", required_argument, NULL, OPTION_DEFSYM},
- '\0', "SYMBOL=EXPRESSION", "Define a symbol", TWO_DASHES },
+ '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
+ { {"demangle", no_argument, NULL, OPTION_DEMANGLE},
+ '\0', NULL, N_("Demangle symbol names"), TWO_DASHES },
{ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
- '\0', "PROGRAM", "Set the dynamic linker to use", TWO_DASHES },
- { {"EB", no_argument, NULL, OPTION_EB},
- '\0', NULL, "Link big-endian objects", ONE_DASH },
- { {"EL", no_argument, NULL, OPTION_EL},
- '\0', NULL, "Link little-endian objects", ONE_DASH },
+ '\0', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES },
{ {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
- '\0', NULL, "Generate embedded relocs", TWO_DASHES},
+ '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
+ { {"fini", required_argument, NULL, OPTION_FINI},
+ '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH },
{ {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX},
- '\0', NULL, "Force generation of file with .exe suffix", TWO_DASHES},
+ '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
+ { {"gc-sections", no_argument, NULL, OPTION_GC_SECTIONS},
+ '\0', NULL, N_("Remove unused sections (on some targets)"),
+ TWO_DASHES },
+ { {"no-gc-sections", no_argument, NULL, OPTION_NO_GC_SECTIONS},
+ '\0', NULL, N_("Don't remove unused sections (default)"),
+ TWO_DASHES },
{ {"help", no_argument, NULL, OPTION_HELP},
- '\0', NULL, "Print option help", TWO_DASHES },
+ '\0', NULL, N_("Print option help"), TWO_DASHES },
+ { {"init", required_argument, NULL, OPTION_INIT},
+ '\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
{ {"Map", required_argument, NULL, OPTION_MAP},
- '\0', "FILE", "Write a map file", ONE_DASH },
+ '\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
+ { {"no-demangle", no_argument, NULL, OPTION_NO_DEMANGLE },
+ '\0', NULL, N_("Do not demangle symbol names"), TWO_DASHES },
{ {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
- '\0', NULL, "Use less memory and more disk I/O", TWO_DASHES },
+ '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
+ { {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
+ '\0', NULL, N_("Allow no undefined symbols"), TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
- '\0', NULL, "Don't warn about mismatched input files", TWO_DASHES},
+ '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
- '\0', NULL, "Turn off --whole-archive", TWO_DASHES },
+ '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
{ {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
- '\0', NULL, "Create an output file even if errors occur", TWO_DASHES },
+ '\0', NULL, N_("Create an output file even if errors occur"), TWO_DASHES },
{ {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
'\0', NULL, NULL, NO_HELP },
{ {"oformat", required_argument, NULL, OPTION_OFORMAT},
- '\0', "TARGET", "Specify target of output file", TWO_DASHES },
+ '\0', N_("TARGET"), N_("Specify target of output file"), TWO_DASHES },
{ {"qmagic", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, "Ignored for Linux compatibility", ONE_DASH },
- { {"Qy", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, "Ignored for SVR4 compatibility", ONE_DASH },
+ '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
{ {"relax", no_argument, NULL, OPTION_RELAX},
- '\0', NULL, "Relax branches on certain targets", TWO_DASHES },
+ '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
{ {"retain-symbols-file", required_argument, NULL,
OPTION_RETAIN_SYMBOLS_FILE},
- '\0', "FILE", "Keep only symbols listed in FILE", TWO_DASHES },
+ '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
{ {"rpath", required_argument, NULL, OPTION_RPATH},
- '\0', "PATH", "Set runtime shared library search path", ONE_DASH },
+ '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
{ {"rpath-link", required_argument, NULL, OPTION_RPATH_LINK},
- '\0', "PATH", "Set link time shared library search path", ONE_DASH },
+ '\0', N_("PATH"), N_("Set link time shared library search path"), ONE_DASH },
{ {"shared", no_argument, NULL, OPTION_SHARED},
- '\0', NULL, "Create a shared library", ONE_DASH },
+ '\0', NULL, N_("Create a shared library"), ONE_DASH },
{ {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
'\0', NULL, NULL, ONE_DASH },
{ {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, "Sort common symbols by size", TWO_DASHES },
+ '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
'\0', NULL, NULL, NO_HELP },
{ {"split-by-file", no_argument, NULL, OPTION_SPLIT_BY_FILE},
- '\0', NULL, "Split output sections for each file", TWO_DASHES },
+ '\0', NULL, N_("Split output sections for each file"), TWO_DASHES },
{ {"split-by-reloc", required_argument, NULL, OPTION_SPLIT_BY_RELOC},
- '\0', "COUNT", "Split output sections every COUNT relocs", TWO_DASHES },
+ '\0', N_("COUNT"), N_("Split output sections every COUNT relocs"), TWO_DASHES },
{ {"stats", no_argument, NULL, OPTION_STATS},
- '\0', NULL, "Print memory usage statistics", TWO_DASHES },
+ '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
{ {"task-link", required_argument, NULL, OPTION_TASK_LINK},
- '\0', "SYMBOL", "Do task level linking", TWO_DASHES },
+ '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
{ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
- '\0', NULL, "Use same format as native linker", TWO_DASHES },
+ '\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
{ {"Tbss", required_argument, NULL, OPTION_TBSS},
- '\0', "ADDRESS", "Set address of .bss section", ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
{ {"Tdata", required_argument, NULL, OPTION_TDATA},
- '\0', "ADDRESS", "Set address of .data section", ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
{ {"Ttext", required_argument, NULL, OPTION_TTEXT},
- '\0', "ADDRESS", "Set address of .text section", ONE_DASH },
- { {"Ur", no_argument, NULL, OPTION_UR},
- '\0', NULL, "Build global constructor/destructor tables", ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
{ {"verbose", no_argument, NULL, OPTION_VERBOSE},
- '\0', NULL, "Output lots of information during link", TWO_DASHES },
+ '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
{ {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */
'\0', NULL, NULL, NO_HELP },
{ {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT },
- '\0', "FILE", "Read version information script", TWO_DASHES },
+ '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
+ { {"version-exports-section", required_argument, NULL,
+ OPTION_VERSION_EXPORTS_SECTION },
+ '\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n\t\t\t\tSYMBOL as the version."),
+ TWO_DASHES },
{ {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
- '\0', NULL, "Warn about duplicate common symbols", TWO_DASHES },
+ '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
{ {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS},
- '\0', NULL, "Warn if global constructors/destructors are seen",
+ '\0', NULL, N_("Warn if global constructors/destructors are seen"),
TWO_DASHES },
{ {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP},
- '\0', NULL, "Warn if the multiple GP values are used", TWO_DASHES },
+ '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
{ {"warn-once", no_argument, NULL, OPTION_WARN_ONCE},
- '\0', NULL, "Warn only once per undefined symbol", TWO_DASHES },
+ '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
{ {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN},
- '\0', NULL, "Warn if start of section changes due to alignment",
+ '\0', NULL, N_("Warn if start of section changes due to alignment"),
TWO_DASHES },
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
- '\0', NULL, "Include all objects from following archives", TWO_DASHES },
+ '\0', NULL, N_("Include all objects from following archives"), TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', "SYMBOL", "Use wrapper functions for SYMBOL", TWO_DASHES }
+ '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
+ { {"mpc860c0", optional_argument, NULL, OPTION_MPC860C0},
+ '\0', N_("[=WORDS]"), N_("Modify problematic branches in last WORDS (1-10,\n\t\t\t\tdefault 5) words of a page"), TWO_DASHES }
};
#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0]))
+/* Test STRING for containing a string of digits that form a number
+ between MIN and MAX. The return value is the number or ERR. */
+
+static int
+is_num (string, min, max, err)
+ const char *string;
+ int min;
+ int max;
+ int err;
+{
+ int result = 0;
+
+ for (; *string; ++string)
+ {
+ if (! isdigit (*string))
+ {
+ result = err;
+ break;
+ }
+ result = result * 10 + (*string - '0');
+ }
+ if (result < min || result > max)
+ result = err;
+
+ return result;
+}
+
void
parse_args (argc, argv)
int argc;
@@ -396,11 +462,35 @@ parse_args (argc, argv)
|| ! isdigit ((unsigned char) argv[i + 1][0])))
argv[i] = (char *) "--shared";
+ /* Because we permit long options to start with a single dash, and
+ we have a --library option, and the -l option is conventionally
+ used with an immediately following argument, we can have bad
+ results if somebody tries to use -l with a library whose name
+ happens to start with "ibrary", as in -li. We avoid problems by
+ simply turning -l into --library. This means that users will
+ have to use two dashes in order to use --library, which is OK
+ since that's how it is documented.
+
+ FIXME: It's possible that this problem can arise for other short
+ options as well, although the user does always have the recourse
+ of adding a space between the option and the argument. */
+ for (i = 1; i < argc; i++)
+ {
+ if (argv[i][0] == '-'
+ && argv[i][1] == 'l'
+ && argv[i][2] != '\0')
+ {
+ char *n;
+
+ n = (char *) xmalloc (strlen (argv[i]) + 20);
+ sprintf (n, "--library=%s", argv[i] + 2);
+ argv[i] = n;
+ }
+ }
+
last_optind = -1;
while (1)
{
- /* getopt_long_only is like getopt_long, but '-' as well as '--' can
- indicate a long option. */
int longind;
int optc;
@@ -417,6 +507,8 @@ parse_args (argc, argv)
last_optind = optind;
}
+ /* getopt_long_only is like getopt_long, but '-' as well as '--'
+ can indicate a long option. */
optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
if (optc == -1)
@@ -424,6 +516,9 @@ parse_args (argc, argv)
switch (optc)
{
default:
+ fprintf (stderr,
+ _("%s: use the --help option for usage information\n"),
+ program_name);
xexit (1);
case 1: /* File name. */
lang_add_input_file (optarg, lang_input_file_is_file_enum,
@@ -442,7 +537,7 @@ parse_args (argc, argv)
|| strcmp (optarg, "default") == 0)
config.dynamic_link = true;
else
- einfo ("%P%F: unrecognized -a option `%s'\n", optarg);
+ einfo (_("%P%F: unrecognized -a option `%s'\n"), optarg);
break;
case OPTION_ASSERT:
/* FIXME: We just ignore these, but we should handle them. */
@@ -455,7 +550,7 @@ parse_args (argc, argv)
else if (strcmp (optarg, "pure-text") == 0)
;
else
- einfo ("%P%F: unrecognized -assert option `%s'\n", optarg);
+ einfo (_("%P%F: unrecognized -assert option `%s'\n"), optarg);
break;
case 'A':
ldfile_add_arch (optarg);
@@ -490,6 +585,9 @@ parse_args (argc, argv)
parsing_defsym = 0;
lex_string = NULL;
break;
+ case OPTION_DEMANGLE:
+ demangling = true;
+ break;
case OPTION_DYNAMIC_LINKER:
command_line.interpreter = optarg;
break;
@@ -543,12 +641,15 @@ parse_args (argc, argv)
char *end;
g_switch_value = strtoul (optarg, &end, 0);
if (*end)
- einfo ("%P%F: invalid number `%s'\n", optarg);
+ einfo (_("%P%F: invalid number `%s'\n"), optarg);
}
break;
case 'g':
/* Ignore. */
break;
+ case OPTION_GC_SECTIONS:
+ command_line.gc_sections = true;
+ break;
case OPTION_HELP:
help ();
xexit (0);
@@ -578,9 +679,18 @@ parse_args (argc, argv)
config.magic_demand_paged = false;
config.dynamic_link = false;
break;
+ case OPTION_NO_DEMANGLE:
+ demangling = false;
+ break;
+ case OPTION_NO_GC_SECTIONS:
+ command_line.gc_sections = false;
+ break;
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = false;
break;
+ case OPTION_NO_UNDEFINED:
+ link_info.no_undefined = true;
+ break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = false;
break;
@@ -596,6 +706,9 @@ parse_args (argc, argv)
something, or can we create a new option to do that
(with a syntax similar to -defsym)?
getopt can't handle two args to an option without kludges. */
+
+ /* Enable optimizations of output files. */
+ link_info.optimize = strtoul (optarg, NULL, 0) ? true : false;
break;
case 'o':
lang_add_output (optarg, 0);
@@ -637,14 +750,36 @@ parse_args (argc, argv)
command_line.rpath = buystring (optarg);
else
{
+ size_t rpath_len = strlen (command_line.rpath);
+ size_t optarg_len = strlen (optarg);
char *buf;
+ char *cp = command_line.rpath;
- buf = xmalloc (strlen (command_line.rpath)
- + strlen (optarg)
- + 2);
- sprintf (buf, "%s:%s", command_line.rpath, optarg);
- free (command_line.rpath);
- command_line.rpath = buf;
+ /* First see whether OPTARG is already in the path. */
+ do
+ {
+ size_t idx = 0;
+ while (optarg[idx] != '\0' && optarg[idx] == cp[idx])
+ ++idx;
+ if (optarg[idx] == '\0'
+ && (cp[idx] == '\0' || cp[idx] == ':'))
+ /* We found it. */
+ break;
+
+ /* Not yet found. */
+ cp = strchr (cp, ':');
+ if (cp != NULL)
+ ++cp;
+ }
+ while (cp != NULL);
+
+ if (cp == NULL)
+ {
+ buf = xmalloc (rpath_len + optarg_len + 2);
+ sprintf (buf, "%s:%s", command_line.rpath, optarg);
+ free (command_line.rpath);
+ command_line.rpath = buf;
+ }
}
break;
case OPTION_RPATH_LINK:
@@ -675,7 +810,10 @@ parse_args (argc, argv)
link_info.strip = strip_all;
break;
case OPTION_SHARED:
- link_info.shared = true;
+ if (config.has_shared)
+ link_info.shared = true;
+ else
+ einfo (_("%P%F: -shared not supported\n"));
break;
case 'h': /* Used on Solaris. */
case OPTION_SONAME:
@@ -739,14 +877,14 @@ parse_args (argc, argv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf ("GNU ld %s\n", ld_program_version);
- printf ("Copyright 1997 Free Software Foundation, Inc.\n");
- printf ("\
+ printf (_("Copyright 1997 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");
+the GNU General Public License. This program has absolutely no warranty.\n"));
{
ld_emulation_xfer_type **ptr = ld_emulations;
- printf (" Supported emulations:\n");
+ printf (_(" Supported emulations:\n"));
while (*ptr)
{
printf (" %s\n", (*ptr)->emulation_name);
@@ -769,6 +907,12 @@ the GNU General Public License. This program has absolutely no warranty.\n");
yyparse ();
}
break;
+ case OPTION_VERSION_EXPORTS_SECTION:
+ /* This option records a version symbol to be applied to the
+ symbols listed for export to be found in the object files
+ .exports sections. */
+ command_line.version_exports_section = optarg;
+ break;
case OPTION_WARN_COMMON:
config.warn_common = true;
break;
@@ -810,16 +954,22 @@ the GNU General Public License. This program has absolutely no warranty.\n");
ignored. Someday we should handle it correctly. FIXME. */
break;
case OPTION_SPLIT_BY_RELOC:
- config.split_by_reloc = atoi (optarg);
+ config.split_by_reloc = strtoul (optarg, NULL, 0);
break;
case OPTION_SPLIT_BY_FILE:
config.split_by_file = true;
break;
+ case OPTION_CHECK_SECTIONS:
+ command_line.check_section_addresses = true;
+ break;
+ case OPTION_NO_CHECK_SECTIONS:
+ command_line.check_section_addresses = false;
+ break;
case '(':
if (ingroup)
{
fprintf (stderr,
- "%s: may not nest groups (--help for usage)\n",
+ _("%s: may not nest groups (--help for usage)\n"),
program_name);
xexit (1);
}
@@ -830,14 +980,39 @@ the GNU General Public License. This program has absolutely no warranty.\n");
if (! ingroup)
{
fprintf (stderr,
- "%s: group ended before it began (--help for usage)\n",
+ _("%s: group ended before it began (--help for usage)\n"),
program_name);
xexit (1);
}
lang_leave_group ();
ingroup = 0;
break;
+ case OPTION_MPC860C0:
+ link_info.mpc860c0 = 20; /* default value (in bytes) */
+ if (optarg)
+ {
+ unsigned words;
+ words = is_num (optarg, 1, 10, 0);
+ if (words == 0)
+ {
+ fprintf (stderr,
+ _("%s: Invalid argument to option \"mpc860c0\"\n"),
+ program_name);
+ xexit (1);
+ }
+ link_info.mpc860c0 = words * 4; /* convert words to bytes */
+ }
+ command_line.relax = true;
+ break;
+
+ case OPTION_INIT:
+ link_info.init_function = optarg;
+ break;
+
+ case OPTION_FINI:
+ link_info.fini_function = optarg;
+ break;
}
}
@@ -875,10 +1050,10 @@ static void
set_section_start (sect, valstr)
char *sect, *valstr;
{
- char *end;
- unsigned long val = strtoul (valstr, &end, 16);
+ const char *end;
+ bfd_vma val = bfd_scan_vma (valstr, &end, 16);
if (*end)
- einfo ("%P%F: invalid hex number `%s'\n", valstr);
+ einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
lang_section_start (sect, exp_intop (val));
}
@@ -890,9 +1065,9 @@ help ()
int i;
const char **targets, **pp;
- printf ("Usage: %s [options] file...\n", program_name);
+ printf (_("Usage: %s [options] file...\n"), program_name);
- printf ("Options:\n");
+ printf (_("Options:\n"));
for (i = 0; i < OPTION_COUNT; i++)
{
if (ld_options[i].doc != NULL)
@@ -921,8 +1096,8 @@ help ()
printf (" ");
++len;
}
- printf ("%s", ld_options[j].arg);
- len += strlen (ld_options[j].arg);
+ printf ("%s", _(ld_options[j].arg));
+ len += strlen (_(ld_options[j].arg));
}
comma = true;
}
@@ -946,8 +1121,8 @@ help ()
+ strlen (ld_options[j].opt.name));
if (ld_options[j].arg != NULL)
{
- printf (" %s", ld_options[j].arg);
- len += 1 + strlen (ld_options[j].arg);
+ printf (" %s", _(ld_options[j].arg));
+ len += 1 + strlen (_(ld_options[j].arg));
}
comma = true;
}
@@ -964,19 +1139,29 @@ help ()
for (; len < 30; len++)
putchar (' ');
- printf ("%s\n", ld_options[i].doc);
+ printf ("%s\n", _(ld_options[i].doc));
}
}
- printf ("%s: supported targets:", program_name);
+ /* Note: Various tools (such as libtool) depend upon the
+ format of the listings below - do not change them. */
+ /* xgettext:c-format */
+ printf (_("%s: supported targets:"), program_name);
targets = bfd_target_list ();
for (pp = targets; *pp != NULL; pp++)
printf (" %s", *pp);
free (targets);
printf ("\n");
- printf ("%s: supported emulations: ", program_name);
+ /* xgettext:c-format */
+ printf (_("%s: supported emulations: "), program_name);
ldemul_list_emulations (stdout);
printf ("\n");
- printf ("\nReport bugs to bug-gnu-utils@gnu.org\n");
+
+ /* xgettext:c-format */
+ printf (_("%s: emulation specific options:\n"), program_name);
+ ldemul_list_emulation_options (stdout);
+ printf ("\n");
+
+ printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
}
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
index d07622a..d39186c 100644
--- a/contrib/binutils/ld/mri.c
+++ b/contrib/binutils/ld/mri.c
@@ -1,11 +1,11 @@
/* mri.c -- handle MRI style linker scripts
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
GLD is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
any later version.
GLD is distributed in the hope that it will be useful,
@@ -256,17 +256,18 @@ mri_draw_tree ()
1, align, subalign,
(etree_type *) NULL);
base = 0;
- lang_add_wild(p->name, (char *)NULL);
+ lang_add_wild (p->name, false, (char *)NULL, false, false, NULL);
/* If there is an alias for this section, add it too */
for (aptr = alias; aptr; aptr = aptr->next) {
if (strcmp(aptr->alias, p->name)== 0) {
- lang_add_wild(aptr->name, (char *)NULL);
+ lang_add_wild (aptr->name, false, (char *)NULL, false, false, NULL);
}
}
lang_leave_output_section_statement
- (0, "*default*", (struct lang_output_section_phdr_list *) NULL);
+ (0, "*default*", (struct lang_output_section_phdr_list *) NULL,
+ "*default*");
p = p->next;
}
@@ -339,7 +340,7 @@ mri_format (name)
lang_add_output_format("coff-m68k", (char *) NULL, (char *) NULL, 1);
}
else {
- einfo("%P%F: unknown format type %s\n", name);
+ einfo(_("%P%F: unknown format type %s\n"), name);
}
}
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
new file mode 100644
index 0000000..6b8b1af
--- /dev/null
+++ b/contrib/binutils/ld/pe-dll.c
@@ -0,0 +1,1924 @@
+/* Routines to help build PEI-format DLLs (Win32 etc)
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Written by DJ Delorie <dj@cygnus.com>
+
+ This file is part of GLD, the Gnu Linker.
+
+ GLD is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libiberty.h"
+
+#include <time.h>
+#include <ctype.h>
+
+#include "ld.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldwrite.h"
+#include "ldmisc.h"
+#include "ldgram.h"
+#include "ldmain.h"
+#include "ldemul.h"
+#include "coff/internal.h"
+#include "../bfd/libcoff.h"
+#include "deffile.h"
+#include "pe-dll.h"
+
+/************************************************************************
+
+ This file turns a regular Windows PE image into a DLL. Because of
+ the complexity of this operation, it has been broken down into a
+ number of separate modules which are all called by the main function
+ at the end of this file. This function is not re-entrant and is
+ normally only called once, so static variables are used to reduce
+ the number of parameters and return values required.
+
+ See also: ld/emultempl/pe.em
+
+ ************************************************************************/
+
+/* for emultempl/pe.em */
+
+def_file *pe_def_file = 0;
+int pe_dll_export_everything = 0;
+int pe_dll_do_default_excludes = 1;
+int pe_dll_kill_ats = 0;
+int pe_dll_stdcall_aliases = 0;
+int pe_dll_warn_dup_exports = 0;
+int pe_dll_compat_implib = 0;
+
+/************************************************************************
+
+ static variables and types
+
+ ************************************************************************/
+
+static bfd_vma image_base;
+
+static bfd *filler_bfd;
+static struct sec *edata_s, *reloc_s;
+static unsigned char *edata_d, *reloc_d;
+static size_t edata_sz, reloc_sz;
+
+typedef struct {
+ char *target_name;
+ char *object_target;
+ unsigned int imagebase_reloc;
+ int pe_arch;
+ int bfd_arch;
+ int underscored;
+} pe_details_type;
+
+#define PE_ARCH_i386 1
+#define PE_ARCH_sh 2
+#define PE_ARCH_mips 3
+#define PE_ARCH_arm 4
+
+static pe_details_type pe_detail_list[] = {
+ {
+ "pei-i386",
+ "pe-i386",
+ 7 /* R_IMAGEBASE */,
+ PE_ARCH_i386,
+ bfd_arch_i386,
+ 1
+ },
+ {
+ "pei-shl",
+ "pe-shl",
+ 16 /* R_SH_IMAGEBASE */,
+ PE_ARCH_sh,
+ bfd_arch_sh,
+ 1
+ },
+ {
+ "pei-mips",
+ "pe-mips",
+ 34 /* MIPS_R_RVA */,
+ PE_ARCH_mips,
+ bfd_arch_mips,
+ 0
+ },
+ {
+ "pei-arm-little",
+ "pe-arm-little",
+ 11 /* ARM_RVA32 */,
+ PE_ARCH_arm,
+ bfd_arch_arm,
+ 0
+ },
+ { NULL, NULL, 0, 0, 0, 0 }
+};
+
+static pe_details_type *pe_details;
+
+#define U(str) (pe_details->underscored ? "_" str : str)
+
+void
+pe_dll_id_target (target)
+ const char *target;
+{
+ int i;
+ for (i=0; pe_detail_list[i].target_name; i++)
+ if (strcmp (pe_detail_list[i].target_name, target) == 0)
+ {
+ pe_details = pe_detail_list+i;
+ return;
+ }
+ einfo (_("%XUnsupported PEI architecture: %s\n"), target);
+ exit (1);
+}
+
+/************************************************************************
+
+ Helper functions for qsort. Relocs must be sorted so that we can write
+ them out by pages.
+
+ ************************************************************************/
+
+typedef struct {
+ bfd_vma vma;
+ char type;
+ short extra;
+} reloc_data_type;
+
+static int
+reloc_sort (va, vb)
+ const void *va, *vb;
+{
+ bfd_vma a = ((reloc_data_type *) va)->vma;
+ bfd_vma b = ((reloc_data_type *) vb)->vma;
+ return (a > b) ? 1 : ((a < b) ? -1 : 0);
+}
+
+static int
+pe_export_sort (va, vb)
+ const void *va, *vb;
+{
+ def_file_export *a = (def_file_export *) va;
+ def_file_export *b = (def_file_export *) vb;
+ return strcmp (a->name, b->name);
+}
+
+/************************************************************************
+
+ Read and process the .DEF file
+
+ ************************************************************************/
+
+/* These correspond to the entries in pe_def_file->exports[]. I use
+ exported_symbol_sections[i] to tag whether or not the symbol was
+ defined, since we can't export symbols we don't have. */
+
+static bfd_vma *exported_symbol_offsets;
+static struct sec **exported_symbol_sections;
+
+static int export_table_size;
+static int count_exported;
+static int count_exported_byname;
+static int count_with_ordinals;
+static const char *dll_name;
+static int min_ordinal, max_ordinal;
+static int *exported_symbols;
+
+typedef struct exclude_list_struct
+ {
+ char *string;
+ struct exclude_list_struct *next;
+ }
+exclude_list_struct;
+static struct exclude_list_struct *excludes = 0;
+
+void
+pe_dll_add_excludes (new_excludes)
+ const char *new_excludes;
+{
+ char *local_copy;
+ char *exclude_string;
+
+ local_copy = xstrdup (new_excludes);
+
+ exclude_string = strtok (local_copy, ",:");
+ for (; exclude_string; exclude_string = strtok (NULL, ",:"))
+ {
+ struct exclude_list_struct *new_exclude;
+
+ new_exclude = ((struct exclude_list_struct *)
+ xmalloc (sizeof (struct exclude_list_struct)));
+ new_exclude->string = (char *) xmalloc (strlen (exclude_string) + 1);
+ strcpy (new_exclude->string, exclude_string);
+ new_exclude->next = excludes;
+ excludes = new_exclude;
+ }
+
+ free (local_copy);
+}
+
+static int
+auto_export (d, n)
+ def_file *d;
+ const char *n;
+{
+ int i;
+ struct exclude_list_struct *ex;
+ for (i = 0; i < d->num_exports; i++)
+ if (strcmp (d->exports[i].name, n) == 0)
+ return 0;
+ if (pe_dll_do_default_excludes)
+ {
+ if (strcmp (n, "DllMain@12") == 0)
+ return 0;
+ if (strcmp (n, "DllEntryPoint@0") == 0)
+ return 0;
+ if (strcmp (n, "impure_ptr") == 0)
+ return 0;
+ }
+ for (ex = excludes; ex; ex = ex->next)
+ if (strcmp (n, ex->string) == 0)
+ return 0;
+ return 1;
+}
+
+static void
+process_def_file (abfd, info)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ int i, j;
+ struct bfd_link_hash_entry *blhe;
+ bfd *b;
+ struct sec *s;
+ def_file_export *e=0;
+
+ if (!pe_def_file)
+ pe_def_file = def_file_empty ();
+
+ /* First, run around to all the objects looking for the .drectve
+ sections, and push those into the def file too */
+
+ for (b = info->input_bfds; b; b = b->link_next)
+ {
+ s = bfd_get_section_by_name (b, ".drectve");
+ if (s)
+ {
+ int size = bfd_get_section_size_before_reloc (s);
+ char *buf = xmalloc (size);
+ bfd_get_section_contents (b, s, buf, 0, size);
+ def_file_add_directive (pe_def_file, buf, size);
+ free (buf);
+ }
+ }
+
+ /* Now, maybe export everything else the default way */
+
+ if (pe_dll_export_everything || pe_def_file->num_exports == 0)
+ {
+ for (b = info->input_bfds; b; b = b->link_next)
+ {
+ asymbol **symbols;
+ int nsyms, symsize;
+
+ symsize = bfd_get_symtab_upper_bound (b);
+ symbols = (asymbol **) xmalloc (symsize);
+ nsyms = bfd_canonicalize_symtab (b, symbols);
+
+ for (j = 0; j < nsyms; j++)
+ {
+ if ((symbols[j]->flags & (BSF_FUNCTION | BSF_GLOBAL))
+ == (BSF_FUNCTION | BSF_GLOBAL))
+ {
+ const char *sn = symbols[j]->name;
+ if (*sn == '_')
+ sn++;
+ if (auto_export (pe_def_file, sn))
+ def_file_add_export (pe_def_file, sn, 0, -1);
+ }
+ }
+ }
+ }
+
+#undef NE
+#define NE pe_def_file->num_exports
+
+ /* Canonicalize the export list */
+
+ if (pe_dll_kill_ats)
+ {
+ for (i = 0; i < NE; i++)
+ {
+ if (strchr (pe_def_file->exports[i].name, '@'))
+ {
+ /* This will preserve internal_name, which may have been pointing
+ to the same memory as name, or might not have */
+ char *tmp = xstrdup (pe_def_file->exports[i].name);
+ *(strchr (tmp, '@')) = 0;
+ pe_def_file->exports[i].name = tmp;
+ }
+ }
+ }
+
+ if (pe_dll_stdcall_aliases)
+ {
+ for (i = 0; i < NE; i++)
+ {
+ if (strchr (pe_def_file->exports[i].name, '@'))
+ {
+ char *tmp = xstrdup (pe_def_file->exports[i].name);
+ *(strchr (tmp, '@')) = 0;
+ if (auto_export (pe_def_file, tmp))
+ def_file_add_export (pe_def_file, tmp,
+ pe_def_file->exports[i].internal_name, -1);
+ else
+ free (tmp);
+ }
+ }
+ }
+
+ e = pe_def_file->exports; /* convenience, but watch out for it changing */
+
+ exported_symbol_offsets = (bfd_vma *) xmalloc (NE * sizeof (bfd_vma));
+ exported_symbol_sections = (struct sec **) xmalloc (NE * sizeof (struct sec *));
+
+ memset (exported_symbol_sections, 0, NE * sizeof (struct sec *));
+ max_ordinal = 0;
+ min_ordinal = 65536;
+ count_exported = 0;
+ count_exported_byname = 0;
+ count_with_ordinals = 0;
+
+ qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]), pe_export_sort);
+ for (i = 0, j = 0; i < NE; i++)
+ {
+ if (i > 0 && strcmp (e[i].name, e[i - 1].name) == 0)
+ {
+ /* This is a duplicate. */
+ if (e[j - 1].ordinal != -1
+ && e[i].ordinal != -1
+ && e[j - 1].ordinal != e[i].ordinal)
+ {
+ if (pe_dll_warn_dup_exports)
+ /* xgettext:c-format */
+ einfo (_("%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"),
+ e[j - 1].name, e[j - 1].ordinal, e[i].ordinal);
+ }
+ else
+ {
+ if (pe_dll_warn_dup_exports)
+ /* xgettext:c-format */
+ einfo (_("Warning, duplicate EXPORT: %s\n"),
+ e[j - 1].name);
+ }
+ if (e[i].ordinal)
+ e[j - 1].ordinal = e[i].ordinal;
+ e[j - 1].flag_private |= e[i].flag_private;
+ e[j - 1].flag_constant |= e[i].flag_constant;
+ e[j - 1].flag_noname |= e[i].flag_noname;
+ e[j - 1].flag_data |= e[i].flag_data;
+ }
+ else
+ {
+ if (i != j)
+ e[j] = e[i];
+ j++;
+ }
+ }
+ pe_def_file->num_exports = j; /* == NE */
+
+ for (i = 0; i < NE; i++)
+ {
+ char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
+ if (pe_details->underscored)
+ {
+ *name = '_';
+ strcpy (name + 1, pe_def_file->exports[i].internal_name);
+ }
+ else
+ strcpy (name, pe_def_file->exports[i].internal_name);
+
+ blhe = bfd_link_hash_lookup (info->hash,
+ name,
+ false, false, true);
+
+ if (blhe
+ && (blhe->type == bfd_link_hash_defined
+ || (blhe->type == bfd_link_hash_common)))
+ {
+ count_exported++;
+ if (!pe_def_file->exports[i].flag_noname)
+ count_exported_byname++;
+
+ /* Only fill in the sections. The actual offsets are computed
+ in fill_exported_offsets() after common symbols are laid
+ out. */
+ if (blhe->type == bfd_link_hash_defined)
+ exported_symbol_sections[i] = blhe->u.def.section;
+ else
+ exported_symbol_sections[i] = blhe->u.c.p->section;
+
+ if (pe_def_file->exports[i].ordinal != -1)
+ {
+ if (max_ordinal < pe_def_file->exports[i].ordinal)
+ max_ordinal = pe_def_file->exports[i].ordinal;
+ if (min_ordinal > pe_def_file->exports[i].ordinal)
+ min_ordinal = pe_def_file->exports[i].ordinal;
+ count_with_ordinals++;
+ }
+ }
+ else if (blhe && blhe->type == bfd_link_hash_undefined)
+ {
+ /* xgettext:c-format */
+ einfo (_("%XCannot export %s: symbol not defined\n"),
+ pe_def_file->exports[i].internal_name);
+ }
+ else if (blhe)
+ {
+ /* xgettext:c-format */
+ einfo (_("%XCannot export %s: symbol wrong type (%d vs %d)\n"),
+ pe_def_file->exports[i].internal_name,
+ blhe->type, bfd_link_hash_defined);
+ }
+ else
+ {
+ /* xgettext:c-format */
+ einfo (_("%XCannot export %s: symbol not found\n"),
+ pe_def_file->exports[i].internal_name);
+ }
+ free (name);
+ }
+}
+
+/************************************************************************
+
+ Build the bfd that will contain .edata and .reloc sections
+
+ ************************************************************************/
+
+static void
+build_filler_bfd (include_edata)
+ int include_edata;
+{
+ lang_input_statement_type *filler_file;
+ filler_file = lang_add_input_file ("dll stuff",
+ lang_input_file_is_fake_enum,
+ NULL);
+ filler_file->the_bfd = filler_bfd = bfd_create ("dll stuff", output_bfd);
+ if (filler_bfd == NULL
+ || !bfd_set_arch_mach (filler_bfd,
+ bfd_get_arch (output_bfd),
+ bfd_get_mach (output_bfd)))
+ {
+ einfo ("%X%P: can not create BFD %E\n");
+ return;
+ }
+
+ if (include_edata)
+ {
+ edata_s = bfd_make_section_old_way (filler_bfd, ".edata");
+ if (edata_s == NULL
+ || !bfd_set_section_flags (filler_bfd, edata_s,
+ (SEC_HAS_CONTENTS
+ | SEC_ALLOC
+ | SEC_LOAD
+ | SEC_KEEP
+ | SEC_IN_MEMORY)))
+ {
+ einfo ("%X%P: can not create .edata section: %E\n");
+ return;
+ }
+ bfd_set_section_size (filler_bfd, edata_s, edata_sz);
+ }
+
+ reloc_s = bfd_make_section_old_way (filler_bfd, ".reloc");
+ if (reloc_s == NULL
+ || !bfd_set_section_flags (filler_bfd, reloc_s,
+ (SEC_HAS_CONTENTS
+ | SEC_ALLOC
+ | SEC_LOAD
+ | SEC_KEEP
+ | SEC_IN_MEMORY)))
+ {
+ einfo ("%X%P: can not create .reloc section: %E\n");
+ return;
+ }
+ bfd_set_section_size (filler_bfd, reloc_s, 0);
+
+ ldlang_add_file (filler_file);
+}
+
+/************************************************************************
+
+ Gather all the exported symbols and build the .edata section
+
+ ************************************************************************/
+
+static void
+generate_edata (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ int i, next_ordinal;
+ int name_table_size = 0;
+ const char *dlnp;
+
+ /* First, we need to know how many exported symbols there are,
+ and what the range of ordinals is. */
+
+ if (pe_def_file->name)
+ {
+ dll_name = pe_def_file->name;
+ }
+ else
+ {
+ dll_name = abfd->filename;
+ for (dlnp = dll_name; *dlnp; dlnp++)
+ {
+ if (*dlnp == '\\' || *dlnp == '/' || *dlnp == ':')
+ dll_name = dlnp + 1;
+ }
+ }
+
+ if (count_with_ordinals && max_ordinal > count_exported)
+ {
+ if (min_ordinal > max_ordinal - count_exported + 1)
+ min_ordinal = max_ordinal - count_exported + 1;
+ }
+ else
+ {
+ min_ordinal = 1;
+ max_ordinal = count_exported;
+ }
+ export_table_size = max_ordinal - min_ordinal + 1;
+
+ exported_symbols = (int *) xmalloc (export_table_size * sizeof (int));
+ for (i = 0; i < export_table_size; i++)
+ exported_symbols[i] = -1;
+
+ /* Now we need to assign ordinals to those that don't have them */
+ for (i = 0; i < NE; i++)
+ {
+ if (exported_symbol_sections[i])
+ {
+ if (pe_def_file->exports[i].ordinal != -1)
+ {
+ int ei = pe_def_file->exports[i].ordinal - min_ordinal;
+ int pi = exported_symbols[ei];
+ if (pi != -1)
+ {
+ /* xgettext:c-format */
+ einfo (_("%XError, oridinal used twice: %d (%s vs %s)\n"),
+ pe_def_file->exports[i].ordinal,
+ pe_def_file->exports[i].name,
+ pe_def_file->exports[pi].name);
+ }
+ exported_symbols[ei] = i;
+ }
+ name_table_size += strlen (pe_def_file->exports[i].name) + 1;
+ }
+ }
+
+ next_ordinal = min_ordinal;
+ for (i = 0; i < NE; i++)
+ if (exported_symbol_sections[i])
+ if (pe_def_file->exports[i].ordinal == -1)
+ {
+ while (exported_symbols[next_ordinal - min_ordinal] != -1)
+ next_ordinal++;
+ exported_symbols[next_ordinal - min_ordinal] = i;
+ pe_def_file->exports[i].ordinal = next_ordinal;
+ }
+
+ /* OK, now we can allocate some memory */
+
+ edata_sz = (40 /* directory */
+ + 4 * export_table_size /* addresses */
+ + 4 * count_exported_byname /* name ptrs */
+ + 2 * count_exported_byname /* ordinals */
+ + name_table_size + strlen (dll_name) + 1);
+}
+
+/* Fill the exported symbol offsets. The preliminary work has already
+ been done in process_def_file(). */
+
+static void
+fill_exported_offsets (abfd, info)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ int i;
+ struct bfd_link_hash_entry *blhe;
+
+ for (i = 0; i < pe_def_file->num_exports; i++)
+ {
+ char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
+ if (pe_details->underscored)
+ {
+ *name = '_';
+ strcpy (name + 1, pe_def_file->exports[i].internal_name);
+ }
+ else
+ strcpy (name, pe_def_file->exports[i].internal_name);
+
+ blhe = bfd_link_hash_lookup (info->hash,
+ name,
+ false, false, true);
+
+ if (blhe && (blhe->type == bfd_link_hash_defined))
+ {
+ exported_symbol_offsets[i] = blhe->u.def.value;
+ }
+ free (name);
+ }
+}
+
+static void
+fill_edata (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ int i, hint;
+ unsigned char *edirectory;
+ unsigned long *eaddresses;
+ unsigned long *enameptrs;
+ unsigned short *eordinals;
+ unsigned char *enamestr;
+ time_t now;
+
+ time (&now);
+
+ edata_d = (unsigned char *) xmalloc (edata_sz);
+
+ /* Note use of array pointer math here */
+ edirectory = edata_d;
+ eaddresses = (unsigned long *) (edata_d + 40);
+ enameptrs = eaddresses + export_table_size;
+ eordinals = (unsigned short *) (enameptrs + count_exported_byname);
+ enamestr = (char *) (eordinals + count_exported_byname);
+
+#define ERVA(ptr) (((unsigned char *)(ptr) - edata_d) + edata_s->output_section->vma - image_base)
+
+ memset (edata_d, 0, 40);
+ bfd_put_32 (abfd, now, edata_d + 4);
+ if (pe_def_file->version_major != -1)
+ {
+ bfd_put_16 (abfd, pe_def_file->version_major, edata_d + 8);
+ bfd_put_16 (abfd, pe_def_file->version_minor, edata_d + 10);
+ }
+ bfd_put_32 (abfd, ERVA (enamestr), edata_d + 12);
+ strcpy (enamestr, dll_name);
+ enamestr += strlen (enamestr) + 1;
+ bfd_put_32 (abfd, min_ordinal, edata_d + 16);
+ bfd_put_32 (abfd, export_table_size, edata_d + 20);
+ bfd_put_32 (abfd, count_exported_byname, edata_d + 24);
+ bfd_put_32 (abfd, ERVA (eaddresses), edata_d + 28);
+ bfd_put_32 (abfd, ERVA (enameptrs), edata_d + 32);
+ bfd_put_32 (abfd, ERVA (eordinals), edata_d + 36);
+
+ fill_exported_offsets (abfd, info);
+
+ /* Ok, now for the filling in part */
+ hint = 0;
+ for (i = 0; i < export_table_size; i++)
+ {
+ int s = exported_symbols[i];
+ if (s != -1)
+ {
+ struct sec *ssec = exported_symbol_sections[s];
+ unsigned long srva = (exported_symbol_offsets[s]
+ + ssec->output_section->vma
+ + ssec->output_offset);
+
+ bfd_put_32 (abfd, srva - image_base, (void *) (eaddresses + i));
+ if (!pe_def_file->exports[s].flag_noname)
+ {
+ char *ename = pe_def_file->exports[s].name;
+ bfd_put_32 (abfd, ERVA (enamestr), (void *) enameptrs);
+ strcpy (enamestr, ename);
+ enamestr += strlen (enamestr) + 1;
+ bfd_put_16 (abfd, i, (void *) eordinals);
+ enameptrs++;
+ pe_def_file->exports[s].hint = hint++;
+ }
+ eordinals++;
+ }
+ }
+}
+
+/************************************************************************
+
+ Gather all the relocations and build the .reloc section
+
+ ************************************************************************/
+
+static void
+generate_reloc (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+
+ /* for .reloc stuff */
+ reloc_data_type *reloc_data;
+ int total_relocs = 0;
+ int i;
+ unsigned long sec_page = (unsigned long) (-1);
+ unsigned long page_ptr, page_count;
+ int bi;
+ bfd *b;
+ struct sec *s;
+
+ total_relocs = 0;
+ for (b = info->input_bfds; b; b = b->link_next)
+ for (s = b->sections; s; s = s->next)
+ total_relocs += s->reloc_count;
+
+ reloc_data = (reloc_data_type *) xmalloc (total_relocs * sizeof (reloc_data_type));
+
+ total_relocs = 0;
+ bi = 0;
+ for (bi = 0, b = info->input_bfds; b; bi++, b = b->link_next)
+ {
+ arelent **relocs;
+ int relsize, nrelocs, i;
+
+ for (s = b->sections; s; s = s->next)
+ {
+ unsigned long sec_vma = s->output_section->vma + s->output_offset;
+ asymbol **symbols;
+ int nsyms, symsize;
+
+ /* if it's not loaded, we don't need to relocate it this way */
+ if (!(s->output_section->flags & SEC_LOAD))
+ continue;
+
+ /* I don't know why there would be a reloc for these, but I've
+ seen it happen - DJ */
+ if (s->output_section == &bfd_abs_section)
+ continue;
+
+ if (s->output_section->vma == 0)
+ {
+ /* Huh? Shouldn't happen, but punt if it does */
+ einfo ("DJ: zero vma section reloc detected: `%s' #%d f=%d\n",
+ s->output_section->name, s->output_section->index,
+ s->output_section->flags);
+ continue;
+ }
+
+ symsize = bfd_get_symtab_upper_bound (b);
+ symbols = (asymbol **) xmalloc (symsize);
+ nsyms = bfd_canonicalize_symtab (b, symbols);
+
+ relsize = bfd_get_reloc_upper_bound (b, s);
+ relocs = (arelent **) xmalloc ((size_t) relsize);
+ nrelocs = bfd_canonicalize_reloc (b, s, relocs, symbols);
+
+ for (i = 0; i < nrelocs; i++)
+ {
+ if (!relocs[i]->howto->pc_relative
+ && relocs[i]->howto->type != pe_details->imagebase_reloc)
+ {
+ bfd_vma sym_vma;
+ struct symbol_cache_entry *sym = *relocs[i]->sym_ptr_ptr;
+ sym_vma = (relocs[i]->addend
+ + sym->value
+ + sym->section->vma
+ + sym->section->output_offset
+ + sym->section->output_section->vma);
+ reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
+
+#define BITS_AND_SHIFT(bits, shift) (bits * 1000 | shift)
+
+ switch BITS_AND_SHIFT (relocs[i]->howto->bitsize,
+ relocs[i]->howto->rightshift)
+ {
+ case BITS_AND_SHIFT (32, 0):
+ reloc_data[total_relocs].type = 3;
+ total_relocs++;
+ break;
+ case BITS_AND_SHIFT (16, 0):
+ reloc_data[total_relocs].type = 2;
+ total_relocs++;
+ break;
+ case BITS_AND_SHIFT (16, 16):
+ reloc_data[total_relocs].type = 4;
+ /* FIXME: we can't know the symbol's right value yet,
+ but we probably can safely assume that CE will relocate
+ us in 64k blocks, so leaving it zero is safe. */
+ reloc_data[total_relocs].extra = 0;
+ total_relocs++;
+ break;
+ case BITS_AND_SHIFT (26, 2):
+ reloc_data[total_relocs].type = 5;
+ total_relocs++;
+ break;
+ default:
+ /* xgettext:c-format */
+ einfo (_("%XError: %d-bit reloc in dll\n"),
+ relocs[i]->howto->bitsize);
+ break;
+ }
+ }
+ }
+ free (relocs);
+ /* Warning: the allocated symbols are remembered in BFD and reused
+ later, so don't free them! */
+ /* free (symbols); */
+ }
+ }
+
+ /* At this point, we have total_relocs relocation addresses in
+ reloc_addresses, which are all suitable for the .reloc section.
+ We must now create the new sections. */
+
+ qsort (reloc_data, total_relocs, sizeof (*reloc_data), reloc_sort);
+
+ for (i = 0; i < total_relocs; i++)
+ {
+ unsigned long this_page = (reloc_data[i].vma >> 12);
+
+ if (this_page != sec_page)
+ {
+ reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align */
+ reloc_sz += 8;
+ sec_page = this_page;
+ }
+
+ reloc_sz += 2;
+
+ if (reloc_data[i].type == 4)
+ reloc_sz += 2;
+ }
+ reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align */
+
+ reloc_d = (unsigned char *) xmalloc (reloc_sz);
+
+ sec_page = (unsigned long) (-1);
+ reloc_sz = 0;
+ page_ptr = (unsigned long) (-1);
+ page_count = 0;
+ for (i = 0; i < total_relocs; i++)
+ {
+ unsigned long rva = reloc_data[i].vma - image_base;
+ unsigned long this_page = (rva & ~0xfff);
+ if (this_page != sec_page)
+ {
+ while (reloc_sz & 3)
+ reloc_d[reloc_sz++] = 0;
+ if (page_ptr != (unsigned long) (-1))
+ bfd_put_32 (abfd, reloc_sz - page_ptr, reloc_d + page_ptr + 4);
+ bfd_put_32 (abfd, this_page, reloc_d + reloc_sz);
+ page_ptr = reloc_sz;
+ reloc_sz += 8;
+ sec_page = this_page;
+ page_count = 0;
+ }
+ bfd_put_16 (abfd, (rva & 0xfff) + (reloc_data[i].type<<12),
+ reloc_d + reloc_sz);
+ reloc_sz += 2;
+ if (reloc_data[i].type == 4)
+ {
+ bfd_put_16 (abfd, reloc_data[i].extra, reloc_d + reloc_sz);
+ reloc_sz += 2;
+ }
+ page_count++;
+ }
+ while (reloc_sz & 3)
+ reloc_d[reloc_sz++] = 0;
+ if (page_ptr != (unsigned long) (-1))
+ bfd_put_32 (abfd, reloc_sz - page_ptr, reloc_d + page_ptr + 4);
+ while (reloc_sz < reloc_s->_raw_size)
+ reloc_d[reloc_sz++] = 0;
+}
+
+/************************************************************************
+
+ Given the exiting def_file structure, print out a .DEF file that
+ corresponds to it.
+
+ ************************************************************************/
+
+static void
+quoteput (s, f, needs_quotes)
+ char *s;
+ FILE * f;
+ int needs_quotes;
+{
+ char *cp;
+ for (cp = s; *cp; cp++)
+ if (*cp == '\''
+ || *cp == '"'
+ || *cp == '\\'
+ || isspace ((unsigned char) *cp)
+ || *cp == ','
+ || *cp == ';')
+ needs_quotes = 1;
+ if (needs_quotes)
+ {
+ putc ('"', f);
+ while (*s)
+ {
+ if (*s == '"' || *s == '\\')
+ putc ('\\', f);
+ putc (*s, f);
+ s++;
+ }
+ putc ('"', f);
+ }
+ else
+ fputs (s, f);
+}
+
+void
+pe_dll_generate_def_file (pe_out_def_filename)
+ const char *pe_out_def_filename;
+{
+ int i;
+ FILE *out = fopen (pe_out_def_filename, "w");
+ if (out == NULL)
+ {
+ /* xgettext:c-format */
+ einfo (_("%s: Can't open output def file %s\n"),
+ program_name, pe_out_def_filename);
+ }
+
+ if (pe_def_file)
+ {
+ if (pe_def_file->name)
+ {
+ if (pe_def_file->is_dll)
+ fprintf (out, "LIBRARY ");
+ else
+ fprintf (out, "NAME ");
+ quoteput (pe_def_file->name, out, 1);
+ if (pe_data (output_bfd)->pe_opthdr.ImageBase)
+ fprintf (out, " BASE=0x%lx",
+ (unsigned long) pe_data (output_bfd)->pe_opthdr.ImageBase);
+ fprintf (out, "\n");
+ }
+
+ if (pe_def_file->description)
+ {
+ fprintf (out, "DESCRIPTION ");
+ quoteput (pe_def_file->description, out, 1);
+ fprintf (out, "\n");
+ }
+
+ if (pe_def_file->version_minor != -1)
+ fprintf (out, "VERSION %d.%d\n", pe_def_file->version_major,
+ pe_def_file->version_minor);
+ else if (pe_def_file->version_major != -1)
+ fprintf (out, "VERSION %d\n", pe_def_file->version_major);
+
+ if (pe_def_file->stack_reserve != -1 || pe_def_file->heap_reserve != -1)
+ fprintf (out, "\n");
+
+ if (pe_def_file->stack_commit != -1)
+ fprintf (out, "STACKSIZE 0x%x,0x%x\n",
+ pe_def_file->stack_reserve, pe_def_file->stack_commit);
+ else if (pe_def_file->stack_reserve != -1)
+ fprintf (out, "STACKSIZE 0x%x\n", pe_def_file->stack_reserve);
+ if (pe_def_file->heap_commit != -1)
+ fprintf (out, "HEAPSIZE 0x%x,0x%x\n",
+ pe_def_file->heap_reserve, pe_def_file->heap_commit);
+ else if (pe_def_file->heap_reserve != -1)
+ fprintf (out, "HEAPSIZE 0x%x\n", pe_def_file->heap_reserve);
+
+ if (pe_def_file->num_section_defs > 0)
+ {
+ fprintf (out, "\nSECTIONS\n\n");
+ for (i = 0; i < pe_def_file->num_section_defs; i++)
+ {
+ fprintf (out, " ");
+ quoteput (pe_def_file->section_defs[i].name, out, 0);
+ if (pe_def_file->section_defs[i].class)
+ {
+ fprintf (out, " CLASS ");
+ quoteput (pe_def_file->section_defs[i].class, out, 0);
+ }
+ if (pe_def_file->section_defs[i].flag_read)
+ fprintf (out, " READ");
+ if (pe_def_file->section_defs[i].flag_write)
+ fprintf (out, " WRITE");
+ if (pe_def_file->section_defs[i].flag_execute)
+ fprintf (out, " EXECUTE");
+ if (pe_def_file->section_defs[i].flag_shared)
+ fprintf (out, " SHARED");
+ fprintf (out, "\n");
+ }
+ }
+
+ if (pe_def_file->num_exports > 0)
+ {
+ fprintf (out, "\nEXPORTS\n\n");
+ for (i = 0; i < pe_def_file->num_exports; i++)
+ {
+ def_file_export *e = pe_def_file->exports + i;
+ fprintf (out, " ");
+ quoteput (e->name, out, 0);
+ if (e->internal_name && strcmp (e->internal_name, e->name))
+ {
+ fprintf (out, " = ");
+ quoteput (e->internal_name, out, 0);
+ }
+ if (e->ordinal != -1)
+ fprintf (out, " @%d", e->ordinal);
+ if (e->flag_private)
+ fprintf (out, " PRIVATE");
+ if (e->flag_constant)
+ fprintf (out, " CONSTANT");
+ if (e->flag_noname)
+ fprintf (out, " NONAME");
+ if (e->flag_data)
+ fprintf (out, " DATA");
+
+ fprintf (out, "\n");
+ }
+ }
+
+ if (pe_def_file->num_imports > 0)
+ {
+ fprintf (out, "\nIMPORTS\n\n");
+ for (i = 0; i < pe_def_file->num_imports; i++)
+ {
+ def_file_import *im = pe_def_file->imports + i;
+ fprintf (out, " ");
+ if (im->internal_name
+ && (!im->name || strcmp (im->internal_name, im->name)))
+ {
+ quoteput (im->internal_name, out, 0);
+ fprintf (out, " = ");
+ }
+ quoteput (im->module->name, out, 0);
+ fprintf (out, ".");
+ if (im->name)
+ quoteput (im->name, out, 0);
+ else
+ fprintf (out, "%d", im->ordinal);
+ fprintf (out, "\n");
+ }
+ }
+ }
+ else
+ fprintf (out, _("; no contents available\n"));
+
+ if (fclose (out) == EOF)
+ {
+ /* xgettext:c-format */
+ einfo (_("%P: Error closing file `%s'\n"), pe_out_def_filename);
+ }
+}
+
+/************************************************************************
+
+ Generate the import library
+
+ ************************************************************************/
+
+static asymbol **symtab;
+static int symptr;
+static int tmp_seq;
+static const char *dll_filename;
+static char *dll_symname;
+
+#define UNDSEC (asection *) &bfd_und_section
+
+static asection *
+quick_section(abfd, name, flags, align)
+ bfd *abfd;
+ const char *name;
+ int flags;
+ int align;
+{
+ asection *sec;
+ asymbol *sym;
+
+ sec = bfd_make_section_old_way (abfd, name);
+ bfd_set_section_flags (abfd, sec, flags
+ | SEC_ALLOC
+ | SEC_LOAD
+ | SEC_KEEP
+ );
+ bfd_set_section_alignment (abfd, sec, align);
+ /* remember to undo this before trying to link internally! */
+ sec->output_section = sec;
+
+ sym = bfd_make_empty_symbol (abfd);
+ symtab[symptr++] = sym;
+ sym->name = sec->name;
+ sym->section = sec;
+ sym->flags = BSF_LOCAL;
+ sym->value = 0;
+
+ return sec;
+}
+
+static void
+quick_symbol (abfd, n1, n2, n3, sec, flags, addr)
+ bfd *abfd;
+ char *n1;
+ char *n2;
+ char *n3;
+ asection *sec;
+ int flags;
+ int addr;
+{
+ asymbol *sym;
+ char *name = (char *) xmalloc (strlen (n1) + strlen (n2) + strlen (n3) + 1);
+ strcpy (name, n1);
+ strcat (name, n2);
+ strcat (name, n3);
+ sym = bfd_make_empty_symbol (abfd);
+ sym->name = name;
+ sym->section = sec;
+ sym->flags = flags;
+ sym->value = addr;
+ symtab[symptr++] = sym;
+}
+
+static arelent *reltab = 0;
+static int relcount = 0, relsize = 0;
+
+static void
+quick_reloc (abfd, address, which_howto, symidx)
+ bfd *abfd;
+ int address;
+ int which_howto;
+ int symidx;
+{
+ if (relcount >= (relsize-1))
+ {
+ relsize += 10;
+ if (reltab)
+ reltab = (arelent *) xrealloc (reltab, relsize * sizeof (arelent));
+ else
+ reltab = (arelent *) xmalloc (relsize * sizeof (arelent));
+ }
+ reltab[relcount].address = address;
+ reltab[relcount].addend = 0;
+ reltab[relcount].howto = bfd_reloc_type_lookup (abfd, which_howto);
+ reltab[relcount].sym_ptr_ptr = symtab + symidx;
+ relcount++;
+}
+
+static void
+save_relocs (asection *sec)
+{
+ int i;
+ sec->relocation = reltab;
+ sec->reloc_count = relcount;
+ sec->orelocation = (arelent **) xmalloc ((relcount+1) * sizeof (arelent *));
+ for (i=0; i<relcount; i++)
+ sec->orelocation[i] = sec->relocation + i;
+ sec->orelocation[relcount] = 0;
+ sec->flags |= SEC_RELOC;
+ reltab = 0;
+ relcount = relsize = 0;
+}
+
+/*
+ * .section .idata$2
+ * .global __head_my_dll
+ * __head_my_dll:
+ * .rva hname
+ * .long 0
+ * .long 0
+ * .rva __my_dll_iname
+ * .rva fthunk
+ *
+ * .section .idata$5
+ * .long 0
+ * fthunk:
+ *
+ * .section .idata$4
+ * .long 0
+ * hname:
+ */
+
+static bfd *
+make_head (parent)
+ bfd *parent;
+{
+ asection *id2, *id5, *id4;
+ unsigned char *d2, *d5, *d4;
+ char *oname;
+ bfd *abfd;
+
+ oname = (char *) xmalloc (20);
+ sprintf (oname, "d%06d.o", tmp_seq);
+ tmp_seq++;
+
+ abfd = bfd_create (oname, parent);
+ bfd_find_target (pe_details->object_target, abfd);
+ bfd_make_writable (abfd);
+
+ bfd_set_format (abfd, bfd_object);
+ bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
+
+ symptr = 0;
+ symtab = (asymbol **) xmalloc (6 * sizeof (asymbol *));
+ id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2);
+ id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2);
+ id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
+ quick_symbol (abfd, U("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
+ quick_symbol (abfd, U(""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
+
+ /* OK, pay attention here. I got confused myself looking back at
+ it. We create a four-byte section to mark the beginning of the
+ list, and we include an offset of 4 in the section, so that the
+ pointer to the list points to the *end* of this section, which is
+ the start of the list of sections from other objects. */
+
+ bfd_set_section_size (abfd, id2, 20);
+ d2 = (unsigned char *) xmalloc (20);
+ id2->contents = d2;
+ memset (d2, 0, 20);
+ d2[0] = d2[16] = 4; /* reloc addend */
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 2);
+ quick_reloc (abfd, 12, BFD_RELOC_RVA, 4);
+ quick_reloc (abfd, 16, BFD_RELOC_RVA, 1);
+ save_relocs (id2);
+
+ bfd_set_section_size (abfd, id5, 4);
+ d5 = (unsigned char *) xmalloc (4);
+ id5->contents = d5;
+ memset (d5, 0, 4);
+
+ bfd_set_section_size (abfd, id4, 4);
+ d4 = (unsigned char *) xmalloc (4);
+ id4->contents = d4;
+ memset (d4, 0, 4);
+
+ bfd_set_symtab (abfd, symtab, symptr);
+
+ bfd_set_section_contents (abfd, id2, d2, 0, 20);
+ bfd_set_section_contents (abfd, id5, d5, 0, 4);
+ bfd_set_section_contents (abfd, id4, d4, 0, 4);
+
+ bfd_make_readable (abfd);
+ return abfd;
+}
+
+/*
+ * .section .idata$4
+ * .long 0
+ * .section .idata$5
+ * .long 0
+ * .section idata$7
+ * .global __my_dll_iname
+ *__my_dll_iname:
+ * .asciz "my.dll"
+ */
+
+static bfd *
+make_tail (parent)
+ bfd *parent;
+{
+ asection *id4, *id5, *id7;
+ unsigned char *d4, *d5, *d7;
+ int len;
+ char *oname;
+ bfd *abfd;
+
+ oname = (char *) xmalloc (20);
+ sprintf (oname, "d%06d.o", tmp_seq);
+ tmp_seq++;
+
+ abfd = bfd_create (oname, parent);
+ bfd_find_target (pe_details->object_target, abfd);
+ bfd_make_writable (abfd);
+
+ bfd_set_format (abfd, bfd_object);
+ bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
+
+ symptr = 0;
+ symtab = (asymbol **) xmalloc (5 * sizeof (asymbol *));
+ id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
+ id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2);
+ id7 = quick_section (abfd, ".idata$7", SEC_HAS_CONTENTS, 2);
+ quick_symbol (abfd, U(""), dll_symname, "_iname", id7, BSF_GLOBAL, 0);
+
+ bfd_set_section_size (abfd, id4, 4);
+ d4 = (unsigned char *) xmalloc (4);
+ id4->contents = d4;
+ memset (d4, 0, 4);
+
+ bfd_set_section_size (abfd, id5, 4);
+ d5 = (unsigned char *) xmalloc (4);
+ id5->contents = d5;
+ memset (d5, 0, 4);
+
+ len = strlen (dll_filename)+1;
+ if (len & 1)
+ len ++;
+ bfd_set_section_size (abfd, id7, len);
+ d7 = (unsigned char *) xmalloc (len);
+ id7->contents = d7;
+ strcpy (d7, dll_filename);
+
+ bfd_set_symtab (abfd, symtab, symptr);
+
+ bfd_set_section_contents (abfd, id4, d4, 0, 4);
+ bfd_set_section_contents (abfd, id5, d5, 0, 4);
+ bfd_set_section_contents (abfd, id7, d7, 0, len);
+
+ bfd_make_readable (abfd);
+ return abfd;
+}
+
+/*
+ * .text
+ * .global _function
+ * .global ___imp_function
+ * .global __imp__function
+ *_function:
+ * jmp *__imp__function:
+ *
+ * .section idata$7
+ * .long __head_my_dll
+ *
+ * .section .idata$5
+ *___imp_function:
+ *__imp__function:
+ *iat?
+ * .section .idata$4
+ *iat?
+ * .section .idata$6
+ *ID<ordinal>:
+ * .short <hint>
+ * .asciz "function" xlate? (add underscore, kill at)
+ */
+
+static unsigned char jmp_ix86_bytes[] = {
+ 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
+};
+
+/*
+ *_function:
+ * mov.l ip+8,r0
+ * mov.l @r0,r0
+ * jmp @r0
+ * nop
+ * .dw __imp_function
+ */
+
+static unsigned char jmp_sh_bytes[] = {
+ 0x01, 0xd0, 0x02, 0x60, 0x2b, 0x40, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/*
+ *_function:
+ * lui $t0,<high:__imp_function>
+ * lw $t0,<low:__imp_function>
+ * jr $t0
+ * nop
+ */
+
+static unsigned char jmp_mips_bytes[] = {
+ 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
+ 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
+};
+
+static bfd *
+make_one (exp, parent)
+ def_file_export *exp;
+ bfd *parent;
+{
+ asection *tx, *id7, *id5, *id4, *id6;
+ unsigned char *td, *d7, *d5, *d4, *d6 = NULL;
+ int len;
+ char *oname;
+ bfd *abfd;
+ unsigned char *jmp_bytes = NULL;
+ int jmp_byte_count = 0;
+
+ switch (pe_details->pe_arch)
+ {
+ case PE_ARCH_i386:
+ jmp_bytes = jmp_ix86_bytes;
+ jmp_byte_count = sizeof (jmp_ix86_bytes);
+ break;
+ case PE_ARCH_sh:
+ jmp_bytes = jmp_sh_bytes;
+ jmp_byte_count = sizeof (jmp_sh_bytes);
+ break;
+ case PE_ARCH_mips:
+ jmp_bytes = jmp_mips_bytes;
+ jmp_byte_count = sizeof (jmp_mips_bytes);
+ break;
+ }
+
+ oname = (char *) xmalloc (20);
+ sprintf (oname, "d%06d.o", tmp_seq);
+ tmp_seq++;
+
+ abfd = bfd_create (oname, parent);
+ bfd_find_target (pe_details->object_target, abfd);
+ bfd_make_writable (abfd);
+
+ bfd_set_format (abfd, bfd_object);
+ bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
+
+ symptr = 0;
+ symtab = (asymbol **) xmalloc (10 * sizeof (asymbol *));
+ tx = quick_section (abfd, ".text", SEC_CODE|SEC_HAS_CONTENTS, 2);
+ id7 = quick_section (abfd, ".idata$7", SEC_HAS_CONTENTS, 2);
+ id5 = quick_section (abfd, ".idata$5", SEC_HAS_CONTENTS, 2);
+ id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
+ id6 = quick_section (abfd, ".idata$6", SEC_HAS_CONTENTS, 2);
+ if (! exp->flag_data)
+ quick_symbol (abfd, U(""), exp->internal_name, "", tx, BSF_GLOBAL, 0);
+ quick_symbol (abfd, U("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0);
+ quick_symbol (abfd, U("__imp_"), exp->internal_name, "", id5, BSF_GLOBAL, 0);
+ if (pe_dll_compat_implib)
+ quick_symbol (abfd, U("__imp_"), exp->internal_name, "",
+ id5, BSF_GLOBAL, 0);
+
+ bfd_set_section_size (abfd, tx, jmp_byte_count);
+ td = (unsigned char *) xmalloc (jmp_byte_count);
+ tx->contents = td;
+ memcpy (td, jmp_bytes, jmp_byte_count);
+ switch (pe_details->pe_arch)
+ {
+ case PE_ARCH_i386:
+ quick_reloc (abfd, 2, BFD_RELOC_32, 2);
+ break;
+ case PE_ARCH_sh:
+ quick_reloc (abfd, 8, BFD_RELOC_32, 2);
+ break;
+ case PE_ARCH_mips:
+ quick_reloc (abfd, 0, BFD_RELOC_HI16_S, 2);
+ quick_reloc (abfd, 0, BFD_RELOC_LO16, 0); /* MIPS_R_PAIR */
+ quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
+ break;
+ }
+ save_relocs (tx);
+
+ bfd_set_section_size (abfd, id7, 4);
+ d7 = (unsigned char *) xmalloc (4);
+ id7->contents = d7;
+ memset (d7, 0, 4);
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 6);
+ save_relocs (id7);
+
+ bfd_set_section_size (abfd, id5, 4);
+ d5 = (unsigned char *) xmalloc (4);
+ id5->contents = d5;
+ memset (d5, 0, 4);
+ if (exp->flag_noname)
+ {
+ d5[0] = exp->ordinal;
+ d5[1] = exp->ordinal >> 8;
+ d5[3] = 0x80;
+ }
+ else
+ {
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 4);
+ save_relocs (id5);
+ }
+
+ bfd_set_section_size (abfd, id4, 4);
+ d4 = (unsigned char *) xmalloc (4);
+ id4->contents = d4;
+ memset (d4, 0, 4);
+ if (exp->flag_noname)
+ {
+ d5[0] = exp->ordinal;
+ d5[1] = exp->ordinal >> 8;
+ d5[3] = 0x80;
+ }
+ else
+ {
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 4);
+ save_relocs (id4);
+ }
+
+ if (exp->flag_noname)
+ {
+ len = 0;
+ bfd_set_section_size (abfd, id6, 0);
+ }
+ else
+ {
+ len = strlen (exp->name) + 3;
+ if (len & 1)
+ len++;
+ bfd_set_section_size (abfd, id6, len);
+ d6 = (unsigned char *) xmalloc (len);
+ id6->contents = d6;
+ memset (d6, 0, len);
+ d6[0] = exp->hint & 0xff;
+ d6[1] = exp->hint >> 8;
+ strcpy (d6+2, exp->name);
+ }
+
+ bfd_set_symtab (abfd, symtab, symptr);
+
+ bfd_set_section_contents (abfd, tx, td, 0, jmp_byte_count);
+ bfd_set_section_contents (abfd, id7, d7, 0, 4);
+ bfd_set_section_contents (abfd, id5, d5, 0, 4);
+ bfd_set_section_contents (abfd, id4, d4, 0, 4);
+ if (!exp->flag_noname)
+ bfd_set_section_contents (abfd, id6, d6, 0, len);
+
+ bfd_make_readable (abfd);
+ return abfd;
+}
+
+void
+pe_dll_generate_implib (def, impfilename)
+ def_file *def;
+ const char *impfilename;
+{
+ int i;
+ bfd *ar_head;
+ bfd *ar_tail;
+ bfd *outarch;
+ bfd *head = 0;
+
+ dll_filename = (def->name) ? def->name : dll_name;
+ dll_symname = xstrdup (dll_filename);
+ for (i=0; dll_symname[i]; i++)
+ if (!isalnum ((unsigned char) dll_symname[i]))
+ dll_symname[i] = '_';
+
+ unlink (impfilename);
+
+ outarch = bfd_openw (impfilename, 0);
+
+ if (!outarch)
+ {
+ /* xgettext:c-format */
+ einfo (_("%XCan't open .lib file: %s\n"), impfilename);
+ return;
+ }
+
+ /* xgettext:c-format */
+ einfo (_("Creating library file: %s\n"), impfilename);
+
+ bfd_set_format (outarch, bfd_archive);
+ outarch->has_armap = 1;
+
+ /* Work out a reasonable size of things to put onto one line. */
+
+ ar_head = make_head (outarch);
+
+ for (i = 0; i<def->num_exports; i++)
+ {
+ /* The import library doesn't know about the internal name */
+ char *internal = def->exports[i].internal_name;
+ bfd *n;
+ def->exports[i].internal_name = def->exports[i].name;
+ n = make_one (def->exports+i, outarch);
+ n->next = head;
+ head = n;
+ def->exports[i].internal_name = internal;
+ }
+
+ ar_tail = make_tail (outarch);
+
+ if (ar_head == NULL || ar_tail == NULL)
+ return;
+
+ /* Now stick them all into the archive */
+
+ ar_head->next = head;
+ ar_tail->next = ar_head;
+ head = ar_tail;
+
+ if (! bfd_set_archive_head (outarch, head))
+ einfo ("%Xbfd_set_archive_head: %s\n", bfd_errmsg (bfd_get_error ()));
+
+ if (! bfd_close (outarch))
+ einfo ("%Xbfd_close %s: %s\n", impfilename, bfd_errmsg (bfd_get_error ()));
+
+ while (head != NULL)
+ {
+ bfd *n = head->next;
+ bfd_close (head);
+ head = n;
+ }
+}
+
+static void
+add_bfd_to_link (abfd, name, link_info)
+ bfd *abfd;
+ char *name;
+ struct bfd_link_info *link_info;
+{
+ lang_input_statement_type *fake_file;
+ fake_file = lang_add_input_file (name,
+ lang_input_file_is_fake_enum,
+ NULL);
+ fake_file->the_bfd = abfd;
+ ldlang_add_file (fake_file);
+ if (!bfd_link_add_symbols (abfd, link_info))
+ einfo ("%Xaddsym %s: %s\n", name, bfd_errmsg (bfd_get_error ()));
+}
+
+void
+pe_process_import_defs (output_bfd, link_info)
+ bfd *output_bfd;
+ struct bfd_link_info *link_info;
+{
+ def_file_module *module;
+ pe_dll_id_target(bfd_get_target (output_bfd));
+
+ if (!pe_def_file)
+ return;
+
+ for (module = pe_def_file->modules; module; module = module->next)
+ {
+ int i, do_this_dll;
+
+ dll_filename = module->name;
+ dll_symname = xstrdup (module->name);
+ for (i=0; dll_symname[i]; i++)
+ if (!isalnum (dll_symname[i]))
+ dll_symname[i] = '_';
+
+ do_this_dll = 0;
+
+ for (i=0; i<pe_def_file->num_imports; i++)
+ if (pe_def_file->imports[i].module == module)
+ {
+ def_file_export exp;
+ struct bfd_link_hash_entry *blhe;
+
+ /* see if we need this import */
+ char *name = (char *) xmalloc (strlen (pe_def_file->imports[i].internal_name) + 2);
+ sprintf (name, "%s%s", U(""), pe_def_file->imports[i].internal_name);
+ blhe = bfd_link_hash_lookup (link_info->hash, name,
+ false, false, false);
+ free (name);
+ if (blhe && blhe->type == bfd_link_hash_undefined)
+ {
+ bfd *one;
+ /* we do */
+ if (!do_this_dll)
+ {
+ bfd *ar_head = make_head (output_bfd);
+ add_bfd_to_link (ar_head, ar_head->filename, link_info);
+ do_this_dll = 1;
+ }
+ exp.internal_name = pe_def_file->imports[i].internal_name;
+ exp.name = pe_def_file->imports[i].name;
+ exp.ordinal = pe_def_file->imports[i].ordinal;
+ exp.hint = exp.ordinal >= 0 ? exp.ordinal : 0;
+ exp.flag_private = 0;
+ exp.flag_constant = 0;
+ exp.flag_data = 0;
+ exp.flag_noname = exp.name ? 0 : 1;
+ one = make_one (&exp, output_bfd);
+ add_bfd_to_link (one, one->filename, link_info);
+ }
+ }
+ if (do_this_dll)
+ {
+ bfd *ar_tail = make_tail (output_bfd);
+ add_bfd_to_link (ar_tail, ar_tail->filename, link_info);
+ }
+
+ free (dll_symname);
+ }
+}
+
+/************************************************************************
+
+ We were handed a *.DLL file. Parse it and turn it into a set of
+ IMPORTS directives in the def file. Return true if the file was
+ handled, false if not.
+
+ ************************************************************************/
+
+static unsigned int
+pe_get16 (abfd, where)
+ bfd *abfd;
+ int where;
+{
+ unsigned char b[2];
+ bfd_seek (abfd, where, SEEK_SET);
+ bfd_read (b, 1, 2, abfd);
+ return b[0] + (b[1]<<8);
+}
+
+static unsigned int
+pe_get32 (abfd, where)
+ bfd *abfd;
+ int where;
+{
+ unsigned char b[4];
+ bfd_seek (abfd, where, SEEK_SET);
+ bfd_read (b, 1, 4, abfd);
+ return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+}
+
+#if 0 /* This is not currently used. */
+
+static unsigned int
+pe_as16 (ptr)
+ void *ptr;
+{
+ unsigned char *b = ptr;
+ return b[0] + (b[1]<<8);
+}
+
+#endif
+
+static unsigned int
+pe_as32 (ptr)
+ void *ptr;
+{
+ unsigned char *b = ptr;
+ return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+}
+
+boolean
+pe_implied_import_dll (filename)
+ const char *filename;
+{
+ bfd *dll;
+ unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+ unsigned long export_rva, export_size, nsections, secptr, expptr;
+ unsigned char *expdata, *erva;
+ unsigned long name_rvas, ordinals, nexp, ordbase;
+ const char *dll_name;
+
+ /* No, I can't use bfd here. kernel32.dll puts its export table in
+ the middle of the .rdata section. */
+
+ dll = bfd_openr (filename, pe_details->target_name);
+ if (!dll)
+ {
+ einfo ("%Xopen %s: %s\n", filename, bfd_errmsg (bfd_get_error ()));
+ return false;
+ }
+ /* PEI dlls seem to be bfd_objects */
+ if (!bfd_check_format (dll, bfd_object))
+ {
+ einfo ("%X%s: this doesn't appear to be a DLL\n", filename);
+ return false;
+ }
+
+ dll_name = filename;
+ for (i=0; filename[i]; i++)
+ if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+ dll_name = filename + i + 1;
+
+ pe_header_offset = pe_get32 (dll, 0x3c);
+ opthdr_ofs = pe_header_offset + 4 + 20;
+ num_entries = pe_get32 (dll, opthdr_ofs + 92);
+ if (num_entries < 1) /* no exports */
+ return false;
+ export_rva = pe_get32 (dll, opthdr_ofs + 96);
+ export_size = pe_get32 (dll, opthdr_ofs + 100);
+ nsections = pe_get16 (dll, pe_header_offset + 4 + 2);
+ secptr = (pe_header_offset + 4 + 20 +
+ pe_get16 (dll, pe_header_offset + 4 + 16));
+ expptr = 0;
+ for (i=0; i<nsections; i++)
+ {
+ char sname[8];
+ unsigned long secptr1 = secptr + 40 * i;
+ unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+ unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+ unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+ bfd_seek(dll, secptr1, SEEK_SET);
+ bfd_read(sname, 1, 8, dll);
+ if (vaddr <= export_rva && vaddr+vsize > export_rva)
+ {
+ expptr = fptr + (export_rva - vaddr);
+ if (export_rva + export_size > vaddr + vsize)
+ export_size = vsize - (export_rva - vaddr);
+ break;
+ }
+ }
+
+ expdata = (unsigned char *) xmalloc (export_size);
+ bfd_seek (dll, expptr, SEEK_SET);
+ bfd_read (expdata, 1, export_size, dll);
+ erva = expdata - export_rva;
+
+ if (pe_def_file == 0)
+ pe_def_file = def_file_empty();
+
+ nexp = pe_as32 (expdata+24);
+ name_rvas = pe_as32 (expdata+32);
+ ordinals = pe_as32 (expdata+36);
+ ordbase = pe_as32 (expdata+16);
+ for (i=0; i<nexp; i++)
+ {
+ unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+ def_file_import *imp;
+ imp = def_file_add_import (pe_def_file, erva+name_rva, dll_name,
+ i, 0);
+ }
+
+ return true;
+}
+
+/************************************************************************
+
+ These are the main functions, called from the emulation. The first
+ is called after the bfds are read, so we can guess at how much space
+ we need. The second is called after everything is placed, so we
+ can put the right values in place.
+
+ ************************************************************************/
+
+void
+pe_dll_build_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ pe_dll_id_target (bfd_get_target (abfd));
+ process_def_file (abfd, info);
+
+ generate_edata (abfd, info);
+ build_filler_bfd (1);
+}
+
+void
+pe_exe_build_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ pe_dll_id_target (bfd_get_target (abfd));
+ build_filler_bfd (0);
+}
+
+void
+pe_dll_fill_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ pe_dll_id_target (bfd_get_target (abfd));
+ image_base = pe_data (abfd)->pe_opthdr.ImageBase;
+
+ generate_reloc (abfd, info);
+ if (reloc_sz > 0)
+ {
+ bfd_set_section_size (filler_bfd, reloc_s, reloc_sz);
+
+ /* Resize the sections. */
+ lang_size_sections (stat_ptr->head, abs_output_section,
+ &stat_ptr->head, 0, (bfd_vma) 0, false);
+
+ /* Redo special stuff. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments (stat_ptr->head,
+ abs_output_section,
+ (fill_type) 0, (bfd_vma) 0);
+ }
+
+ fill_edata (abfd, info);
+
+ pe_data (abfd)->dll = 1;
+
+ edata_s->contents = edata_d;
+ reloc_s->contents = reloc_d;
+}
+
+void
+pe_exe_fill_sections (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ pe_dll_id_target (bfd_get_target (abfd));
+ image_base = pe_data (abfd)->pe_opthdr.ImageBase;
+
+ generate_reloc (abfd, info);
+ if (reloc_sz > 0)
+ {
+ bfd_set_section_size (filler_bfd, reloc_s, reloc_sz);
+
+ /* Resize the sections. */
+ lang_size_sections (stat_ptr->head, abs_output_section,
+ &stat_ptr->head, 0, (bfd_vma) 0, false);
+
+ /* Redo special stuff. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments (stat_ptr->head,
+ abs_output_section,
+ (fill_type) 0, (bfd_vma) 0);
+ }
+ reloc_s->contents = reloc_d;
+}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
new file mode 100644
index 0000000..cf9e84a
--- /dev/null
+++ b/contrib/binutils/ld/pe-dll.h
@@ -0,0 +1,48 @@
+/* pe-dll.h: Header file for routines used to build Windows DLLs.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+ This file is part of GLD, the Gnu Linker.
+
+ GLD is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef PE_DLL_H
+#define PE_DLL_H
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "deffile.h"
+
+extern def_file *pe_def_file;
+extern int pe_dll_export_everything;
+extern int pe_dll_do_default_excludes;
+extern int pe_dll_kill_ats;
+extern int pe_dll_stdcall_aliases;
+extern int pe_dll_warn_dup_exports;
+extern int pe_dll_compat_implib;
+
+extern void pe_dll_id_target PARAMS ((const char *));
+extern void pe_dll_add_excludes PARAMS ((const char *));
+extern void pe_dll_generate_def_file PARAMS ((const char *));
+extern void pe_dll_generate_implib PARAMS ((def_file *, const char *));
+extern void pe_process_import_defs PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean pe_implied_import_dll PARAMS ((const char *));
+extern void pe_dll_build_sections PARAMS ((bfd *, struct bfd_link_info *));
+extern void pe_exe_build_sections PARAMS ((bfd *, struct bfd_link_info *));
+extern void pe_dll_fill_sections PARAMS ((bfd *, struct bfd_link_info *));
+extern void pe_exe_fill_sections PARAMS ((bfd *, struct bfd_link_info *));
+
+#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/po/Make-in b/contrib/binutils/ld/po/Make-in
new file mode 100644
index 0000000..4291090
--- /dev/null
+++ b/contrib/binutils/ld/po/Make-in
@@ -0,0 +1,251 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments -C --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-info:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/ld/po/POTFILES.in b/contrib/binutils/ld/po/POTFILES.in
new file mode 100644
index 0000000..55ae6ff
--- /dev/null
+++ b/contrib/binutils/ld/po/POTFILES.in
@@ -0,0 +1,29 @@
+deffile.h
+emultempl/armcoff.em
+emultempl/pe.em
+ldcref.c
+ldctor.c
+ldctor.h
+ldemul.c
+ldemul.h
+ldexp.c
+ldexp.h
+ldfile.c
+ldfile.h
+ld.h
+ldlang.c
+ldlang.h
+ldlex.h
+ldmain.c
+ldmain.h
+ldmisc.c
+ldmisc.h
+ldver.c
+ldver.h
+ldwrite.c
+ldwrite.h
+lexsup.c
+mri.c
+mri.h
+pe-dll.c
+pe-dll.h
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
new file mode 100644
index 0000000..6efdf65
--- /dev/null
+++ b/contrib/binutils/ld/po/ld.pot
@@ -0,0 +1,1502 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2000-04-05 14:09+0930\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: emultempl/armcoff.em:69
+msgid " --support-old-code Support interworking with old code\n"
+msgstr ""
+
+#: emultempl/armcoff.em:70
+msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
+msgstr ""
+
+#: emultempl/armcoff.em:139
+#, c-format
+msgid "Errors encountered processing file %s"
+msgstr ""
+
+#: emultempl/armcoff.em:205 emultempl/pe.em:1035
+msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
+msgstr ""
+
+#: emultempl/armcoff.em:210 emultempl/pe.em:1040
+msgid "%P: warning: connot find thumb start symbol %s\n"
+msgstr ""
+
+#: emultempl/pe.em:257
+msgid ""
+" --base_file <basefile> Generate a base file for relocatable "
+"DLLs\n"
+msgstr ""
+
+#: emultempl/pe.em:258
+msgid ""
+" --dll Set image base to the default for DLLs\n"
+msgstr ""
+
+#: emultempl/pe.em:259
+msgid " --file-alignment <size> Set file alignment\n"
+msgstr ""
+
+#: emultempl/pe.em:260
+msgid " --heap <size> Set initial size of the heap\n"
+msgstr ""
+
+#: emultempl/pe.em:261
+msgid ""
+" --image-base <address> Set start address of the executable\n"
+msgstr ""
+
+#: emultempl/pe.em:262
+msgid ""
+" --major-image-version <number> Set version number of the executable\n"
+msgstr ""
+
+#: emultempl/pe.em:263
+msgid " --major-os-version <number> Set minimum required OS version\n"
+msgstr ""
+
+#: emultempl/pe.em:264
+msgid ""
+" --major-subsystem-version <number> Set minimum required OS subsystem "
+"version\n"
+msgstr ""
+
+#: emultempl/pe.em:265
+msgid ""
+" --minor-image-version <number> Set revision number of the executable\n"
+msgstr ""
+
+#: emultempl/pe.em:266
+msgid " --minor-os-version <number> Set minimum required OS revision\n"
+msgstr ""
+
+#: emultempl/pe.em:267
+msgid ""
+" --minor-subsystem-version <number> Set minimum required OS subsystem "
+"revision\n"
+msgstr ""
+
+#: emultempl/pe.em:268
+msgid " --section-alignment <size> Set section alignment\n"
+msgstr ""
+
+#: emultempl/pe.em:269
+msgid " --stack <size> Set size of the initial stack\n"
+msgstr ""
+
+#: emultempl/pe.em:270
+msgid ""
+" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
+msgstr ""
+
+#: emultempl/pe.em:271
+msgid ""
+" --support-old-code Support interworking with old code\n"
+msgstr ""
+
+#: emultempl/pe.em:272
+msgid ""
+" --thumb-entry=<symbol> Set the entry point to be Thumb "
+"<symbol>\n"
+msgstr ""
+
+#: emultempl/pe.em:274
+msgid ""
+" --add-stdcall-alias Export symbols with and without @nn\n"
+msgstr ""
+
+#: emultempl/pe.em:275
+msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
+msgstr ""
+
+#: emultempl/pe.em:276
+msgid ""
+" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
+msgstr ""
+
+#: emultempl/pe.em:277
+msgid ""
+" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
+msgstr ""
+
+#: emultempl/pe.em:278
+msgid ""
+" --export-all-symbols Automatically export all globals to "
+"DLL\n"
+msgstr ""
+
+#: emultempl/pe.em:279
+msgid " --kill-at Remove @nn from exported symbols\n"
+msgstr ""
+
+#: emultempl/pe.em:280
+msgid " --out-implib <file> Generate import library\n"
+msgstr ""
+
+#: emultempl/pe.em:281
+msgid ""
+" --output-def <file> Generate a .DEF file for the built DLL\n"
+msgstr ""
+
+#: emultempl/pe.em:282
+msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
+msgstr ""
+
+#: emultempl/pe.em:283
+msgid ""
+" --compat-implib Create backward compatible import "
+"libs;\n"
+msgstr ""
+
+#: emultempl/pe.em:284
+msgid " create __imp_<SYMBOL> as well.\n"
+msgstr ""
+
+#: emultempl/pe.em:352
+msgid "%P: warning: bad version number in -subsystem option\n"
+msgstr ""
+
+#: emultempl/pe.em:388
+msgid "%P%F: invalid subsystem type %s\n"
+msgstr ""
+
+#: emultempl/pe.em:403
+msgid "%P%F: invalid hex number for PE parameter '%s'\n"
+msgstr ""
+
+#: emultempl/pe.em:421
+msgid "%P%F: strange hex info for PE parameter '%s'\n"
+msgstr ""
+
+#: emultempl/pe.em:460
+#, c-format
+msgid "%s: Can't open base file %s\n"
+msgstr ""
+
+#: emultempl/pe.em:602
+msgid "%P: warning, file alignment > section alignment.\n"
+msgstr ""
+
+#: emultempl/pe.em:673 emultempl/pe.em:699
+#, c-format
+msgid "Warning: resolving %s by linking to %s\n"
+msgstr ""
+
+#: emultempl/pe.em:678 emultempl/pe.em:704
+msgid "Use --enable-stdcall-fixup to disable these warnings\n"
+msgstr ""
+
+#: emultempl/pe.em:679 emultempl/pe.em:705
+msgid "Use --disable-stdcall-fixup to disable these fixups\n"
+msgstr ""
+
+#: emultempl/pe.em:722
+msgid "%F%P: PE operations on non PE file.\n"
+msgstr ""
+
+#: emultempl/pe.em:839
+#, c-format
+msgid "Errors encountered processing file %s\n"
+msgstr ""
+
+#: emultempl/pe.em:862
+#, c-format
+msgid "Errors encountered processing file %s for interworking"
+msgstr ""
+
+#: emultempl/pe.em:918 ldlang.c:1961 ldlang.c:4333 ldlang.c:4367 ldmain.c:996
+msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
+msgstr ""
+
+#: ldcref.c:162
+msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n"
+msgstr ""
+
+#: ldcref.c:168
+msgid "%X%P: cref_hash_lookup failed: %E\n"
+msgstr ""
+
+#: ldcref.c:239
+msgid ""
+"\n"
+"Cross Reference Table\n"
+"\n"
+msgstr ""
+
+#: ldcref.c:240
+msgid "Symbol"
+msgstr ""
+
+#: ldcref.c:248
+msgid "File\n"
+msgstr ""
+
+#: ldcref.c:252
+msgid "No symbols\n"
+msgstr ""
+
+#: ldcref.c:369
+msgid "%P: symbol `%T' missing from main hash table\n"
+msgstr ""
+
+#: ldcref.c:441
+msgid "%B%F: could not read symbols; %E\n"
+msgstr ""
+
+#: ldcref.c:445 ldmain.c:1064 ldmain.c:1068
+msgid "%B%F: could not read symbols: %E\n"
+msgstr ""
+
+#: ldcref.c:517 ldcref.c:524 ldmain.c:1114 ldmain.c:1121
+msgid "%B%F: could not read relocs: %E\n"
+msgstr ""
+
+#. We found a reloc for the symbol. The symbol is defined
+#. in OUTSECNAME. This reloc is from a section which is
+#. mapped into a section from which references to OUTSECNAME
+#. are prohibited. We must report an error.
+#: ldcref.c:542
+msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
+msgstr ""
+
+#: ldctor.c:89
+msgid "%P%X: Different relocs used in set %s\n"
+msgstr ""
+
+#: ldctor.c:106
+msgid "%P%X: Different object file formats composing set %s\n"
+msgstr ""
+
+#: ldctor.c:288 ldctor.c:302
+msgid "%P%X: %s does not support reloc %s for set %s\n"
+msgstr ""
+
+#: ldctor.c:323
+msgid "%P%X: Unsupported size %d for set %s\n"
+msgstr ""
+
+#: ldctor.c:344
+msgid ""
+"\n"
+"Set Symbol\n"
+"\n"
+msgstr ""
+
+#: ldemul.c:224
+msgid "%S SYSLIB ignored\n"
+msgstr ""
+
+#: ldemul.c:232
+msgid "%S HLL ignored\n"
+msgstr ""
+
+#: ldemul.c:253
+msgid "%P: unrecognised emulation mode: %s\n"
+msgstr ""
+
+#: ldemul.c:254
+msgid "Supported emulations: "
+msgstr ""
+
+#: ldemul.c:298
+msgid " no emulation specific options.\n"
+msgstr ""
+
+#: ldexp.c:157
+msgid "%F%P: %s uses undefined section %s\n"
+msgstr ""
+
+#: ldexp.c:159
+msgid "%F%P: %s forward reference of section %s\n"
+msgstr ""
+
+#: ldexp.c:271
+msgid "%F%S %% by zero\n"
+msgstr ""
+
+#: ldexp.c:278
+msgid "%F%S / by zero\n"
+msgstr ""
+
+#: ldexp.c:401
+msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:420
+msgid "%F%S: undefined symbol `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:602
+msgid "%F%S can not PROVIDE assignment to location counter\n"
+msgstr ""
+
+#: ldexp.c:612
+msgid "%F%S invalid assignment to location counter\n"
+msgstr ""
+
+#: ldexp.c:616
+msgid "%F%S assignment to location counter invalid outside of SECTION\n"
+msgstr ""
+
+#: ldexp.c:626
+msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
+msgstr ""
+
+#: ldexp.c:654
+msgid "%P%F:%s: hash creation failed\n"
+msgstr ""
+
+#: ldexp.c:951
+msgid "%F%S nonconstant expression for %s\n"
+msgstr ""
+
+#: ldexp.c:984
+msgid "%F%S non constant expression for %s\n"
+msgstr ""
+
+#: ldfile.c:108
+#, c-format
+msgid "attempt to open %s failed\n"
+msgstr ""
+
+#: ldfile.c:110
+#, c-format
+msgid "attempt to open %s succeeded\n"
+msgstr ""
+
+#: ldfile.c:116
+msgid "%F%P: invalid BFD target `%s'\n"
+msgstr ""
+
+#: ldfile.c:140
+msgid "%P: skipping incompatible %s when searching for %s"
+msgstr ""
+
+#: ldfile.c:232
+msgid "%F%P: cannot open %s for %s: %E\n"
+msgstr ""
+
+#: ldfile.c:235
+msgid "%F%P: cannot open %s: %E\n"
+msgstr ""
+
+#: ldfile.c:255
+msgid "%F%P: cannot find %s\n"
+msgstr ""
+
+#: ldfile.c:273 ldfile.c:288
+#, c-format
+msgid "cannot find script file %s\n"
+msgstr ""
+
+#: ldfile.c:275 ldfile.c:290
+#, c-format
+msgid "opened script file %s\n"
+msgstr ""
+
+#: ldfile.c:333
+msgid "%P%F: cannot open linker script file %s: %E\n"
+msgstr ""
+
+#: ldfile.c:374
+msgid "%P%F: unknown architecture: %s\n"
+msgstr ""
+
+#: ldfile.c:391
+msgid "%P%F: target architecture respecified\n"
+msgstr ""
+
+#: ldfile.c:444
+msgid "%P%F: cannot represent machine `%s'\n"
+msgstr ""
+
+#: ldlang.c:736
+msgid ""
+"\n"
+"Memory Configuration\n"
+"\n"
+msgstr ""
+
+#: ldlang.c:738
+msgid "Name"
+msgstr ""
+
+#: ldlang.c:738
+msgid "Origin"
+msgstr ""
+
+#: ldlang.c:738
+msgid "Length"
+msgstr ""
+
+#: ldlang.c:738
+msgid "Attributes"
+msgstr ""
+
+#: ldlang.c:780
+msgid ""
+"\n"
+"Linker script and memory map\n"
+"\n"
+msgstr ""
+
+#: ldlang.c:797
+msgid "%P%F: Illegal use of `%s' section"
+msgstr ""
+
+#: ldlang.c:807
+msgid "%P%F: output format %s cannot represent section called %s\n"
+msgstr ""
+
+#: ldlang.c:970
+msgid "%P: %B: warning: ignoring duplicate section `%s'\n"
+msgstr ""
+
+#: ldlang.c:973
+msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"
+msgstr ""
+
+#: ldlang.c:987
+msgid "%P: %B: warning: duplicate section `%s' has different size\n"
+msgstr ""
+
+#: ldlang.c:1039
+msgid "%P%F: Failed to create hash table\n"
+msgstr ""
+
+#: ldlang.c:1422
+msgid "%B: file not recognized: %E\n"
+msgstr ""
+
+#: ldlang.c:1423
+msgid "%B: matching formats:"
+msgstr ""
+
+#: ldlang.c:1430
+msgid "%F%B: file not recognized: %E\n"
+msgstr ""
+
+#: ldlang.c:1483
+msgid "%F%B: object %B in archive is not object\n"
+msgstr ""
+
+#: ldlang.c:1489 ldlang.c:1501
+msgid "%F%B: could not read symbols: %E\n"
+msgstr ""
+
+#: ldlang.c:1747
+msgid ""
+"%P: warning: could not find any targets that match endianness requirement\n"
+msgstr ""
+
+#: ldlang.c:1759
+msgid "%P%F: target %s not found\n"
+msgstr ""
+
+#: ldlang.c:1761
+msgid "%P%F: cannot open output file %s: %E\n"
+msgstr ""
+
+#: ldlang.c:1769
+msgid "%P%F:%s: can not make object file: %E\n"
+msgstr ""
+
+#: ldlang.c:1773
+msgid "%P%F:%s: can not set architecture: %E\n"
+msgstr ""
+
+#: ldlang.c:1777
+msgid "%P%F: can not create link hash table: %E\n"
+msgstr ""
+
+#: ldlang.c:2084
+msgid " load address 0x%V"
+msgstr ""
+
+#: ldlang.c:2214
+msgid "%W (size before relaxing)\n"
+msgstr ""
+
+#: ldlang.c:2296
+#, c-format
+msgid "Address of section %s set to "
+msgstr ""
+
+#: ldlang.c:2445
+#, c-format
+msgid "Fail with %d\n"
+msgstr ""
+
+#: ldlang.c:2684
+msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
+msgstr ""
+
+#: ldlang.c:2718
+msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
+msgstr ""
+
+#: ldlang.c:2726
+msgid "%X%P: region %s is full (%B section %s)\n"
+msgstr ""
+
+#: ldlang.c:2775
+msgid "%P%X: Internal error on COFF shared library section %s\n"
+msgstr ""
+
+#: ldlang.c:2816
+msgid "%P: warning: no memory region specified for section `%s'\n"
+msgstr ""
+
+#: ldlang.c:2829
+msgid "%P: warning: changing start of section %s by %u bytes\n"
+msgstr ""
+
+#: ldlang.c:2843
+msgid "%F%S: non constant address expression for section %s\n"
+msgstr ""
+
+#: ldlang.c:2907
+msgid "%X%P: use an absolute load address or a load memory region, not both\n"
+msgstr ""
+
+#: ldlang.c:3020
+msgid "%P%F: can't relax section: %E\n"
+msgstr ""
+
+#: ldlang.c:3185
+msgid "%F%P: invalid data statement\n"
+msgstr ""
+
+#: ldlang.c:3222
+msgid "%F%P: invalid reloc statement\n"
+msgstr ""
+
+#: ldlang.c:3358
+msgid "%P%F:%s: can't set start address\n"
+msgstr ""
+
+#: ldlang.c:3371 ldlang.c:3388
+msgid "%P%F: can't set start address\n"
+msgstr ""
+
+#: ldlang.c:3383
+msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
+msgstr ""
+
+#: ldlang.c:3393
+msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
+msgstr ""
+
+#: ldlang.c:3435
+msgid ""
+"%P: warning: %s architecture of input file `%B' is incompatible with %s "
+"output\n"
+msgstr ""
+
+#: ldlang.c:3453
+msgid "%E%X: failed to merge target specific data of file %B\n"
+msgstr ""
+
+#: ldlang.c:3540
+msgid ""
+"\n"
+"Allocating common symbols\n"
+msgstr ""
+
+#: ldlang.c:3541
+msgid ""
+"Common symbol size file\n"
+"\n"
+msgstr ""
+
+#. This message happens when using the
+#. svr3.ifile linker script, so I have
+#. disabled it.
+#: ldlang.c:3626
+msgid "%P: no [COMMON] command, defaulting to .bss\n"
+msgstr ""
+
+#: ldlang.c:3686
+msgid "%P%F: invalid syntax in flags\n"
+msgstr ""
+
+#: ldlang.c:4281
+msgid "%P%Fmultiple STARTUP files\n"
+msgstr ""
+
+#: ldlang.c:4553
+msgid "%F%P: bfd_record_phdr failed: %E\n"
+msgstr ""
+
+#: ldlang.c:4572
+msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
+msgstr ""
+
+#: ldlang.c:4881
+msgid "%X%P: unknown language `%s' in version information\n"
+msgstr ""
+
+#: ldlang.c:4930
+msgid "%X%P: duplicate version tag `%s'\n"
+msgstr ""
+
+#: ldlang.c:4943 ldlang.c:4956
+msgid "%X%P: duplicate expression `%s' in version information\n"
+msgstr ""
+
+#: ldlang.c:4993
+msgid "%X%P: unable to find version dependency `%s'\n"
+msgstr ""
+
+#: ldlang.c:5015
+msgid "%X%P: unable to read .exports section contents"
+msgstr ""
+
+#: ldmain.c:192
+msgid "%X%P: can't set BFD default target to `%s': %E\n"
+msgstr ""
+
+#: ldmain.c:262
+msgid "%P%F: -r and --mpc860c0 may not be used together\n"
+msgstr ""
+
+#: ldmain.c:264
+msgid "%P%F: --relax and -r may not be used together\n"
+msgstr ""
+
+#: ldmain.c:266
+msgid "%P%F: -r and -shared may not be used together\n"
+msgstr ""
+
+#: ldmain.c:295
+msgid "using internal linker script:\n"
+msgstr ""
+
+#: ldmain.c:314
+msgid "%P%F: no input files\n"
+msgstr ""
+
+#: ldmain.c:319
+msgid "%P: mode %s\n"
+msgstr ""
+
+#: ldmain.c:337
+msgid "%P%F: cannot open map file %s: %E\n"
+msgstr ""
+
+#: ldmain.c:383
+msgid "%P: link errors found, deleting executable `%s'\n"
+msgstr ""
+
+#: ldmain.c:394
+msgid "%F%B: final close failed: %E\n"
+msgstr ""
+
+#: ldmain.c:418
+msgid "%X%P: unable to open for source of copy `%s'\n"
+msgstr ""
+
+#: ldmain.c:420
+msgid "%X%P: unable to open for destination of copy `%s'\n"
+msgstr ""
+
+#: ldmain.c:426
+msgid "%P: Error writing file `%s'\n"
+msgstr ""
+
+#: ldmain.c:432 pe-dll.c:1082
+#, c-format
+msgid "%P: Error closing file `%s'\n"
+msgstr ""
+
+#: ldmain.c:449
+#, c-format
+msgid "%s: total time in link: %ld.%06ld\n"
+msgstr ""
+
+#: ldmain.c:452
+#, c-format
+msgid "%s: data size %ld\n"
+msgstr ""
+
+#: ldmain.c:493
+msgid "%P%F: missing argument to -m\n"
+msgstr ""
+
+#: ldmain.c:607 ldmain.c:628 ldmain.c:659
+msgid "%P%F: bfd_hash_table_init failed: %E\n"
+msgstr ""
+
+#: ldmain.c:612 ldmain.c:631
+msgid "%P%F: bfd_hash_lookup failed: %E\n"
+msgstr ""
+
+#: ldmain.c:646
+msgid "%X%P: error: duplicate retain-symbols-file\n"
+msgstr ""
+
+#: ldmain.c:690
+msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
+msgstr ""
+
+#: ldmain.c:695
+msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
+msgstr ""
+
+#: ldmain.c:772
+msgid "Archive member included"
+msgstr ""
+
+#: ldmain.c:773
+msgid "because of file (symbol)"
+msgstr ""
+
+#: ldmain.c:845
+msgid "%X%C: multiple definition of `%T'\n"
+msgstr ""
+
+#: ldmain.c:848
+msgid "%D: first defined here\n"
+msgstr ""
+
+#: ldmain.c:877
+msgid "%B: warning: definition of `%T' overriding common\n"
+msgstr ""
+
+#: ldmain.c:880
+msgid "%B: warning: common is here\n"
+msgstr ""
+
+#: ldmain.c:887
+msgid "%B: warning: common of `%T' overridden by definition\n"
+msgstr ""
+
+#: ldmain.c:890
+msgid "%B: warning: defined here\n"
+msgstr ""
+
+#: ldmain.c:897
+msgid "%B: warning: common of `%T' overridden by larger common\n"
+msgstr ""
+
+#: ldmain.c:900
+msgid "%B: warning: larger common is here\n"
+msgstr ""
+
+#: ldmain.c:904
+msgid "%B: warning: common of `%T' overriding smaller common\n"
+msgstr ""
+
+#: ldmain.c:907
+msgid "%B: warning: smaller common is here\n"
+msgstr ""
+
+#: ldmain.c:911
+msgid "%B: warning: multiple common of `%T'\n"
+msgstr ""
+
+#: ldmain.c:913
+msgid "%B: warning: previous common is here\n"
+msgstr ""
+
+#: ldmain.c:935 ldmain.c:974
+msgid "%P: warning: global constructor %s used\n"
+msgstr ""
+
+#: ldmain.c:984
+msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
+msgstr ""
+
+#: ldmain.c:1171
+msgid "%F%P: bfd_hash_table_init failed: %E\n"
+msgstr ""
+
+#: ldmain.c:1178
+msgid "%F%P: bfd_hash_lookup failed: %E\n"
+msgstr ""
+
+#: ldmain.c:1198
+msgid "%C: undefined reference to `%T'\n"
+msgstr ""
+
+#: ldmain.c:1204
+msgid "%D: more undefined references to `%T' follow\n"
+msgstr ""
+
+#: ldmain.c:1211
+msgid "%B: undefined reference to `%T'\n"
+msgstr ""
+
+#: ldmain.c:1217
+msgid "%B: more undefined references to `%T' follow\n"
+msgstr ""
+
+#: ldmain.c:1238 ldmain.c:1260 ldmain.c:1280
+msgid "%P%X: generated"
+msgstr ""
+
+#: ldmain.c:1241
+msgid " relocation truncated to fit: %s %T"
+msgstr ""
+
+#: ldmain.c:1263
+#, c-format
+msgid "dangerous relocation: %s\n"
+msgstr ""
+
+#: ldmain.c:1283
+msgid " reloc refers to symbol `%T' which is not being output\n"
+msgstr ""
+
+#: ldmisc.c:178
+msgid "no symbol"
+msgstr ""
+
+#: ldmisc.c:242
+#, c-format
+msgid "built in linker script:%u"
+msgstr ""
+
+#: ldmisc.c:292 ldmisc.c:296
+msgid "%B%F: could not read symbols\n"
+msgstr ""
+
+#. We use abfd->filename in this initial line,
+#. in case filename is a .h file or something
+#. similarly unhelpful.
+#: ldmisc.c:332
+msgid "%B: In function `%T':\n"
+msgstr ""
+
+#: ldmisc.c:464
+msgid "%F%P: internal error %s %d\n"
+msgstr ""
+
+#: ldmisc.c:550
+msgid "%P: internal error: aborting at %s line %d in %s\n"
+msgstr ""
+
+#: ldmisc.c:553
+msgid "%P: internal error: aborting at %s line %d\n"
+msgstr ""
+
+#: ldmisc.c:555
+msgid "%P%F: please report this bug\n"
+msgstr ""
+
+#: ldver.c:35
+#, c-format
+msgid "GNU ld version %s (with BFD %s)\n"
+msgstr ""
+
+#: ldver.c:42 lexsup.c:887
+msgid " Supported emulations:\n"
+msgstr ""
+
+#: ldwrite.c:59 ldwrite.c:195
+msgid "%P%F: bfd_new_link_order failed\n"
+msgstr ""
+
+#: ldwrite.c:365
+#, c-format
+msgid "%8x something else\n"
+msgstr ""
+
+#: ldwrite.c:526
+msgid "%F%P: final link failed: %E\n"
+msgstr ""
+
+#: lexsup.c:155 lexsup.c:238 lexsup.c:244
+msgid "KEYWORD"
+msgstr ""
+
+#: lexsup.c:155
+msgid "Shared library control for HP/UX compatibility"
+msgstr ""
+
+#: lexsup.c:158
+msgid "ARCH"
+msgstr ""
+
+#: lexsup.c:158
+msgid "Set architecture"
+msgstr ""
+
+#: lexsup.c:160 lexsup.c:307
+msgid "TARGET"
+msgstr ""
+
+#: lexsup.c:160
+msgid "Specify target for following input files"
+msgstr ""
+
+#: lexsup.c:162 lexsup.c:201 lexsup.c:211 lexsup.c:220 lexsup.c:291
+#: lexsup.c:314 lexsup.c:348
+msgid "FILE"
+msgstr ""
+
+#: lexsup.c:162
+msgid "Read MRI format linker script"
+msgstr ""
+
+#: lexsup.c:164
+msgid "Force common symbols to be defined"
+msgstr ""
+
+#: lexsup.c:168 lexsup.c:338 lexsup.c:340 lexsup.c:342
+msgid "ADDRESS"
+msgstr ""
+
+#: lexsup.c:168
+msgid "Set start address"
+msgstr ""
+
+#: lexsup.c:170
+msgid "Export all dynamic symbols"
+msgstr ""
+
+#: lexsup.c:172
+msgid "Link big-endian objects"
+msgstr ""
+
+#: lexsup.c:174
+msgid "Link little-endian objects"
+msgstr ""
+
+#: lexsup.c:176 lexsup.c:179
+msgid "SHLIB"
+msgstr ""
+
+#: lexsup.c:176
+msgid "Auxiliary filter for shared object symbol table"
+msgstr ""
+
+#: lexsup.c:179
+msgid "Filter for shared object symbol table"
+msgstr ""
+
+#: lexsup.c:181
+msgid "Ignored"
+msgstr ""
+
+#: lexsup.c:183
+msgid "SIZE"
+msgstr ""
+
+#: lexsup.c:183
+msgid "Small data size (if no size, same as --shared)"
+msgstr ""
+
+#: lexsup.c:186
+msgid "FILENAME"
+msgstr ""
+
+#: lexsup.c:186
+msgid "Set internal name of shared library"
+msgstr ""
+
+#: lexsup.c:188
+msgid "LIBNAME"
+msgstr ""
+
+#: lexsup.c:188
+msgid "Search for library LIBNAME"
+msgstr ""
+
+#: lexsup.c:190
+msgid "DIRECTORY"
+msgstr ""
+
+#: lexsup.c:190
+msgid "Add DIRECTORY to library search path"
+msgstr ""
+
+#: lexsup.c:192
+msgid "EMULATION"
+msgstr ""
+
+#: lexsup.c:192
+msgid "Set emulation"
+msgstr ""
+
+#: lexsup.c:194
+msgid "Print map file on standard output"
+msgstr ""
+
+#: lexsup.c:196
+msgid "Do not page align data"
+msgstr ""
+
+#: lexsup.c:198
+msgid "Do not page align data, do not make text readonly"
+msgstr ""
+
+#: lexsup.c:201
+msgid "Set output file name"
+msgstr ""
+
+#: lexsup.c:203
+msgid "Optimize output file"
+msgstr ""
+
+#: lexsup.c:205
+msgid "Ignored for SVR4 compatibility"
+msgstr ""
+
+#: lexsup.c:207
+msgid "Generate relocateable output"
+msgstr ""
+
+#: lexsup.c:211
+msgid "Just link symbols (if directory, same as --rpath)"
+msgstr ""
+
+#: lexsup.c:214
+msgid "Strip all symbols"
+msgstr ""
+
+#: lexsup.c:216
+msgid "Strip debugging symbols"
+msgstr ""
+
+#: lexsup.c:218
+msgid "Trace file opens"
+msgstr ""
+
+#: lexsup.c:220
+msgid "Read linker script"
+msgstr ""
+
+#: lexsup.c:222 lexsup.c:234 lexsup.c:277 lexsup.c:289 lexsup.c:334
+#: lexsup.c:351 lexsup.c:368
+msgid "SYMBOL"
+msgstr ""
+
+#: lexsup.c:222
+msgid "Start with undefined reference to SYMBOL"
+msgstr ""
+
+#: lexsup.c:224
+msgid "Build global constructor/destructor tables"
+msgstr ""
+
+#: lexsup.c:226
+msgid "Print version information"
+msgstr ""
+
+#: lexsup.c:228
+msgid "Print version and emulation information"
+msgstr ""
+
+#: lexsup.c:230
+msgid "Discard all local symbols"
+msgstr ""
+
+#: lexsup.c:232
+msgid "Discard temporary local symbols"
+msgstr ""
+
+#: lexsup.c:234
+msgid "Trace mentions of SYMBOL"
+msgstr ""
+
+#: lexsup.c:236 lexsup.c:316 lexsup.c:318
+msgid "PATH"
+msgstr ""
+
+#: lexsup.c:236
+msgid "Default search path for Solaris compatibility"
+msgstr ""
+
+#: lexsup.c:238
+msgid "Ignored for Solaris compatibility"
+msgstr ""
+
+#: lexsup.c:240
+msgid "Start a group"
+msgstr ""
+
+#: lexsup.c:242
+msgid "End a group"
+msgstr ""
+
+#: lexsup.c:244
+msgid "Ignored for SunOS compatibility"
+msgstr ""
+
+#: lexsup.c:246
+msgid "Link against shared libraries"
+msgstr ""
+
+#: lexsup.c:252
+msgid "Do not link against shared libraries"
+msgstr ""
+
+#: lexsup.c:260
+msgid "Bind global references locally"
+msgstr ""
+
+#: lexsup.c:262
+msgid "Check section addresses for overlaps (default)"
+msgstr ""
+
+#: lexsup.c:264
+msgid "Do not check section addresses for overlaps"
+msgstr ""
+
+#: lexsup.c:267
+msgid "Output cross reference table"
+msgstr ""
+
+#: lexsup.c:269
+msgid "SYMBOL=EXPRESSION"
+msgstr ""
+
+#: lexsup.c:269
+msgid "Define a symbol"
+msgstr ""
+
+#: lexsup.c:271
+msgid "Demangle symbol names"
+msgstr ""
+
+#: lexsup.c:273
+msgid "PROGRAM"
+msgstr ""
+
+#: lexsup.c:273
+msgid "Set the dynamic linker to use"
+msgstr ""
+
+#: lexsup.c:275
+msgid "Generate embedded relocs"
+msgstr ""
+
+#: lexsup.c:277
+msgid "Call SYMBOL at unload-time"
+msgstr ""
+
+#: lexsup.c:279
+msgid "Force generation of file with .exe suffix"
+msgstr ""
+
+#: lexsup.c:281
+msgid "Remove unused sections (on some targets)"
+msgstr ""
+
+#: lexsup.c:284
+msgid "Don't remove unused sections (default)"
+msgstr ""
+
+#: lexsup.c:287
+msgid "Print option help"
+msgstr ""
+
+#: lexsup.c:289
+msgid "Call SYMBOL at load-time"
+msgstr ""
+
+#: lexsup.c:291
+msgid "Write a map file"
+msgstr ""
+
+#: lexsup.c:293
+msgid "Do not demangle symbol names"
+msgstr ""
+
+#: lexsup.c:295
+msgid "Use less memory and more disk I/O"
+msgstr ""
+
+#: lexsup.c:297
+msgid "Allow no undefined symbols"
+msgstr ""
+
+#: lexsup.c:299
+msgid "Don't warn about mismatched input files"
+msgstr ""
+
+#: lexsup.c:301
+msgid "Turn off --whole-archive"
+msgstr ""
+
+#: lexsup.c:303
+msgid "Create an output file even if errors occur"
+msgstr ""
+
+#: lexsup.c:307
+msgid "Specify target of output file"
+msgstr ""
+
+#: lexsup.c:309
+msgid "Ignored for Linux compatibility"
+msgstr ""
+
+#: lexsup.c:311
+msgid "Relax branches on certain targets"
+msgstr ""
+
+#: lexsup.c:314
+msgid "Keep only symbols listed in FILE"
+msgstr ""
+
+#: lexsup.c:316
+msgid "Set runtime shared library search path"
+msgstr ""
+
+#: lexsup.c:318
+msgid "Set link time shared library search path"
+msgstr ""
+
+#: lexsup.c:320
+msgid "Create a shared library"
+msgstr ""
+
+#: lexsup.c:324
+msgid "Sort common symbols by size"
+msgstr ""
+
+#: lexsup.c:328
+msgid "Split output sections for each file"
+msgstr ""
+
+#: lexsup.c:330
+msgid "COUNT"
+msgstr ""
+
+#: lexsup.c:330
+msgid "Split output sections every COUNT relocs"
+msgstr ""
+
+#: lexsup.c:332
+msgid "Print memory usage statistics"
+msgstr ""
+
+#: lexsup.c:334
+msgid "Do task level linking"
+msgstr ""
+
+#: lexsup.c:336
+msgid "Use same format as native linker"
+msgstr ""
+
+#: lexsup.c:338
+msgid "Set address of .bss section"
+msgstr ""
+
+#: lexsup.c:340
+msgid "Set address of .data section"
+msgstr ""
+
+#: lexsup.c:342
+msgid "Set address of .text section"
+msgstr ""
+
+#: lexsup.c:344
+msgid "Output lots of information during link"
+msgstr ""
+
+#: lexsup.c:348
+msgid "Read version information script"
+msgstr ""
+
+#: lexsup.c:351
+msgid ""
+"Take export symbols list from .exports, using\n"
+"\t\t\t\tSYMBOL as the version."
+msgstr ""
+
+#: lexsup.c:354
+msgid "Warn about duplicate common symbols"
+msgstr ""
+
+#: lexsup.c:356
+msgid "Warn if global constructors/destructors are seen"
+msgstr ""
+
+#: lexsup.c:359
+msgid "Warn if the multiple GP values are used"
+msgstr ""
+
+#: lexsup.c:361
+msgid "Warn only once per undefined symbol"
+msgstr ""
+
+#: lexsup.c:363
+msgid "Warn if start of section changes due to alignment"
+msgstr ""
+
+#: lexsup.c:366
+msgid "Include all objects from following archives"
+msgstr ""
+
+#: lexsup.c:368
+msgid "Use wrapper functions for SYMBOL"
+msgstr ""
+
+#: lexsup.c:370
+msgid "[=WORDS]"
+msgstr ""
+
+#: lexsup.c:370
+msgid ""
+"Modify problematic branches in last WORDS (1-10,\n"
+"\t\t\t\tdefault 5) words of a page"
+msgstr ""
+
+#: lexsup.c:520
+#, c-format
+msgid "%s: use the --help option for usage information\n"
+msgstr ""
+
+#: lexsup.c:540
+msgid "%P%F: unrecognized -a option `%s'\n"
+msgstr ""
+
+#: lexsup.c:553
+msgid "%P%F: unrecognized -assert option `%s'\n"
+msgstr ""
+
+#: lexsup.c:644
+msgid "%P%F: invalid number `%s'\n"
+msgstr ""
+
+#: lexsup.c:816
+msgid "%P%F: -shared not supported\n"
+msgstr ""
+
+#: lexsup.c:880
+msgid "Copyright 1997 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: lexsup.c:881
+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 ""
+
+#: lexsup.c:972
+#, c-format
+msgid "%s: may not nest groups (--help for usage)\n"
+msgstr ""
+
+#: lexsup.c:983
+#, c-format
+msgid "%s: group ended before it began (--help for usage)\n"
+msgstr ""
+
+#: lexsup.c:1000
+#, c-format
+msgid "%s: Invalid argument to option \"mpc860c0\"\n"
+msgstr ""
+
+#: lexsup.c:1056
+msgid "%P%F: invalid hex number `%s'\n"
+msgstr ""
+
+#: lexsup.c:1068
+#, c-format
+msgid "Usage: %s [options] file...\n"
+msgstr ""
+
+#: lexsup.c:1070
+msgid "Options:\n"
+msgstr ""
+
+#. Note: Various tools (such as libtool) depend upon the
+#. format of the listings below - do not change them.
+#: lexsup.c:1149
+#, c-format
+msgid "%s: supported targets:"
+msgstr ""
+
+#: lexsup.c:1157
+#, c-format
+msgid "%s: supported emulations: "
+msgstr ""
+
+#: lexsup.c:1162
+#, c-format
+msgid "%s: emulation specific options:\n"
+msgstr ""
+
+#: lexsup.c:1166
+#, c-format
+msgid "Report bugs to %s\n"
+msgstr ""
+
+#: mri.c:343
+msgid "%P%F: unknown format type %s\n"
+msgstr ""
+
+#: pe-dll.c:144
+#, c-format
+msgid "%XUnsupported PEI architecture: %s\n"
+msgstr ""
+
+#: pe-dll.c:377
+#, c-format
+msgid "%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"
+msgstr ""
+
+#: pe-dll.c:384
+#, c-format
+msgid "Warning, duplicate EXPORT: %s\n"
+msgstr ""
+
+#: pe-dll.c:446
+#, c-format
+msgid "%XCannot export %s: symbol not defined\n"
+msgstr ""
+
+#: pe-dll.c:452
+#, c-format
+msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
+msgstr ""
+
+#: pe-dll.c:459
+#, c-format
+msgid "%XCannot export %s: symbol not found\n"
+msgstr ""
+
+#: pe-dll.c:584
+#, c-format
+msgid "%XError, oridinal used twice: %d (%s vs %s)\n"
+msgstr ""
+
+#: pe-dll.c:831
+#, c-format
+msgid "%XError: %d-bit reloc in dll\n"
+msgstr ""
+
+#: pe-dll.c:955
+#, c-format
+msgid "%s: Can't open output def file %s\n"
+msgstr ""
+
+#: pe-dll.c:1077
+msgid "; no contents available\n"
+msgstr ""
+
+#: pe-dll.c:1566
+#, c-format
+msgid "%XCan't open .lib file: %s\n"
+msgstr ""
+
+#: pe-dll.c:1571
+#, c-format
+msgid "Creating library file: %s\n"
+msgstr ""
diff --git a/contrib/binutils/ld/scripttempl/aout.sc b/contrib/binutils/ld/scripttempl/aout.sc
index 66cc42d..80dbb37 100644
--- a/contrib/binutils/ld/scripttempl/aout.sc
+++ b/contrib/binutils/ld/scripttempl/aout.sc
@@ -1,5 +1,6 @@
test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+test -z "${ALIGNMENT}" && ALIGNMENT="4"
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
@@ -48,8 +49,9 @@ SECTIONS
${RELOCATING+ __bss_start = .};
*(.bss)
*(COMMON)
- ${RELOCATING+_end = ALIGN(4) };
- ${RELOCATING+__end = ALIGN(4) };
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+_end = . };
+ ${RELOCATING+__end = . };
}
}
EOF
diff --git a/contrib/binutils/ld/scripttempl/armaout.sc b/contrib/binutils/ld/scripttempl/armaout.sc
new file mode 100644
index 0000000..e9276a8
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/armaout.sc
@@ -0,0 +1,35 @@
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+
+${RELOCATING+${LIB_SEARCH_DIRS}}
+${STACKZERO+${RELOCATING+${STACKZERO}}}
+SECTIONS
+{
+ .text ${RELOCATING+${TEXT_START_ADDR}} :
+ {
+ CREATE_OBJECT_SYMBOLS
+ ${RELOCATING+__stext_ = .;}
+ *(.text)
+ ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
+ ${RELOCATING+_etext = ${DATA_ALIGNMENT};}
+ ${RELOCATING+__etext = ${DATA_ALIGNMENT};}
+ }
+ .data ${RELOCATING+${DATA_ALIGNMENT}} :
+ {
+ ${RELOCATING+__sdata_ = .;}
+ *(.data)
+ ${CONSTRUCTING+CONSTRUCTORS}
+ ${RELOCATING+_edata = .;}
+ ${RELOCATING+__edata = .;}
+ }
+ .bss ${RELOCATING+ SIZEOF(.data) + ADDR (.data)} :
+ {
+ ${RELOCATING+ __bss_start = .};
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+_end = ALIGN(4) };
+ ${RELOCATING+__end = ALIGN(4) };
+ }
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/armcoff.sc b/contrib/binutils/ld/scripttempl/armcoff.sc
new file mode 100644
index 0000000..9f9cd7c
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/armcoff.sc
@@ -0,0 +1,62 @@
+# Linker script for ARM COFF.
+# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
+test -z "$ENTRY" && ENTRY=_start
+if test -z "${DATA_ADDR}"; then
+ if test "$LD_FLAG" = "N" || test "$LD_FLAG" = "n"; then
+ DATA_ADDR=.
+ fi
+fi
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
+${LIB_SEARCH_DIRS}
+
+ENTRY(${ENTRY})
+
+SECTIONS
+{
+ /* We start at 0x8000 because gdb assumes it (see FRAME_CHAIN).
+ This is an artifact of the ARM Demon monitor using the bottom 32k
+ as workspace (shared with the FP instruction emulator if
+ present): */
+ .text ${RELOCATING+ 0x8000} : {
+ *(.init)
+ *(.text)
+ *(.glue_7t)
+ *(.glue_7)
+ *(.rdata)
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1); *(.ctors); *(.ctor); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); LONG (0); }
+ *(.fini)
+ ${RELOCATING+ etext = .;}
+ }
+ .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xfffc0fff)}} : {
+ ${RELOCATING+ __data_start__ = . ;}
+ *(.data)
+ ${RELOCATING+ __data_end__ = . ;}
+ ${RELOCATING+ edata = .;}
+ ${RELOCATING+ _edata = .;}
+ }
+ .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+ {
+ ${RELOCATING+ __bss_start__ = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ __bss_end__ = . ;}
+ }
+
+ ${RELOCATING+ end = .;}
+ ${RELOCATING+ _end = .;}
+ ${RELOCATING+ __end__ = .;}
+
+ .stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+ .stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index 83e589a..ccc4b91 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -8,6 +8,7 @@
# OTHER_TEXT_SECTIONS - these get put in .text when relocating
# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
# (e.g., .PARISC.global)
+# OTHER_BSS_SECTIONS - other than .bss .sbss ...
# OTHER_SECTIONS - at the end
# EXECUTABLE_SYMBOLS - symbols that must be defined for an
# executable (e.g., _DYNAMIC_LINK)
@@ -24,6 +25,12 @@
# EMBEDDED - whether this is for an embedded system.
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
# start address of shared library.
+# INPUT_FILES - INPUT command of files to always include
+# WRITABLE_RODATA - if set, the .rodata section should be writable
+# INIT_START, INIT_END - statements just before and just after
+# combination of .init sections.
+# FINI_START, FINI_END - statements just before and just after
+# combination of .fini sections.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
@@ -34,10 +41,47 @@ test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test -z "${ELFSIZE}" && ELFSIZE=32
+test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r*)} }"
+CTOR=".ctors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${CTOR_START}}
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ ${CONSTRUCTING+${CTOR_END}}
+ }"
+
+DTOR=" .dtors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${DTOR_START}}
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ ${CONSTRUCTING+${DTOR_END}}
+ }"
# if this is for an embedded system, don't add SIZEOF_HEADERS.
if [ -z "$EMBEDDED" ]; then
@@ -56,10 +100,12 @@ ${RELOCATING+${LIB_SEARCH_DIRS}}
${RELOCATING+/* Do we need any of these for elf?
__DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
${RELOCATING+${EXECUTABLE_SYMBOLS}}
+${RELOCATING+${INPUT_FILES}}
${RELOCATING- /* For some reason, the Solaris linker makes bad executables
if gld -r is used and the intermediate file has sections starting
at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
bug. But for now assigning the zero vmas works. */}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -74,38 +120,88 @@ SECTIONS
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
.gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
.gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
+
+ .rel.init ${RELOCATING-0} : { *(.rel.init) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
.rel.text ${RELOCATING-0} :
- { *(.rel.text) ${RELOCATING+*(.rel.gnu.linkonce.t*)} }
+ {
+ *(.rel.text)
+ ${RELOCATING+*(.rel.text.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.t*)}
+ }
.rela.text ${RELOCATING-0} :
- { *(.rela.text) ${RELOCATING+*(.rela.gnu.linkonce.t*)} }
- .rel.data ${RELOCATING-0} :
- { *(.rel.data) ${RELOCATING+*(.rel.gnu.linkonce.d*)} }
- .rela.data ${RELOCATING-0} :
- { *(.rela.data) ${RELOCATING+*(.rela.gnu.linkonce.d*)} }
+ {
+ *(.rela.text)
+ ${RELOCATING+*(.rela.text.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.t*)}
+ }
+ .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
.rel.rodata ${RELOCATING-0} :
- { *(.rel.rodata) ${RELOCATING+*(.rel.gnu.linkonce.r*)} }
+ {
+ *(.rel.rodata)
+ ${RELOCATING+*(.rel.rodata.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.r*)}
+ }
.rela.rodata ${RELOCATING-0} :
- { *(.rela.rodata) ${RELOCATING+*(.rela.gnu.linkonce.r*)} }
- .rel.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ {
+ *(.rela.rodata)
+ ${RELOCATING+*(.rela.rodata.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.r*)}
+ }
+ ${OTHER_READONLY_RELOC_SECTIONS}
+ .rel.data ${RELOCATING-0} :
+ {
+ *(.rel.data)
+ ${RELOCATING+*(.rel.data.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.d*)}
+ }
+ .rela.data ${RELOCATING-0} :
+ {
+ *(.rela.data)
+ ${RELOCATING+*(.rela.data.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.d*)}
+ }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
.rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
.rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .rel.got ${RELOCATING-0} : { *(.rel.got) }
+ .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ ${OTHER_GOT_RELOC_SECTIONS}
+ .rel.sdata ${RELOCATING-0} :
+ {
+ *(.rel.sdata)
+ ${RELOCATING+*(.rel.sdata.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.s*)}
+ }
+ .rela.sdata ${RELOCATING-0} :
+ {
+ *(.rela.sdata)
+ ${RELOCATING+*(.rela.sdata.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.s*)}
+ }
+ .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
.rel.bss ${RELOCATING-0} : { *(.rel.bss) }
.rela.bss ${RELOCATING-0} : { *(.rela.bss) }
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
- .init ${RELOCATING-0} : { *(.init) } =${NOP-0}
+ ${OTHER_PLT_RELOC_SECTIONS}
+
+ .init ${RELOCATING-0} :
+ {
+ ${INIT_START}
+ KEEP (*(.init))
+ ${INIT_END}
+ } =${NOP-0}
+
${DATA_PLT-${PLT}}
.text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text)
+ ${RELOCATING+*(.text.*)}
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
@@ -114,8 +210,13 @@ SECTIONS
} =${NOP-0}
${RELOCATING+_etext = .;}
${RELOCATING+PROVIDE (etext = .);}
- .fini ${RELOCATING-0} : { *(.fini) } =${NOP-0}
- .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.gnu.linkonce.r*)} }
+ .fini ${RELOCATING-0} :
+ {
+ ${FINI_START}
+ KEEP (*(.fini))
+ ${FINI_END}
+ } =${NOP-0}
+ ${WRITABLE_RODATA-${RODATA}}
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
${RELOCATING+${OTHER_READONLY_SECTIONS}}
@@ -128,23 +229,17 @@ SECTIONS
{
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data)
+ ${RELOCATING+*(.data.*)}
${RELOCATING+*(.gnu.linkonce.d*)}
- ${CONSTRUCTING+CONSTRUCTORS}
+ ${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
+ .eh_frame : { *(.eh_frame) }
+ .gcc_except_table : { *(.gcc_except_table) }
+ ${WRITABLE_RODATA+${RODATA}}
${RELOCATING+${OTHER_READWRITE_SECTIONS}}
- .ctors ${RELOCATING-0} :
- {
- ${CONSTRUCTING+${CTOR_START}}
- *(.ctors)
- ${CONSTRUCTING+${CTOR_END}}
- }
- .dtors ${RELOCATING-0} :
- {
- ${CONSTRUCTING+${DTOR_START}}
- *(.dtors)
- ${CONSTRUCTING+${DTOR_END}}
- }
+ ${RELOCATING+${CTOR}}
+ ${RELOCATING+${DTOR}}
${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
@@ -152,21 +247,40 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} : { *(.sdata) }
+ .sdata ${RELOCATING-0} :
+ {
+ ${RELOCATING+${SDATA_START_SYMBOLS}}
+ *(.sdata)
+ ${RELOCATING+*(.sdata.*)}
+ ${RELOCATING+*(.gnu.linkonce.s.*)}
+ }
${RELOCATING+${OTHER_GOT_SECTIONS}}
- ${RELOCATING+_edata = .;}
+ ${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
- .sbss ${RELOCATING-0} : { *(.sbss) *(.scommon) }
+ .sbss ${RELOCATING-0} :
+ {
+ *(.dynsbss)
+ *(.sbss)
+ ${RELOCATING+*(.sbss.*)}
+ *(.scommon)
+ }
.bss ${RELOCATING-0} :
{
*(.dynbss)
*(.bss)
+ ${RELOCATING+*(.bss.*)}
*(COMMON)
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
}
- ${RELOCATING+. = ALIGN(${ELFSIZE} / 8);}
- ${RELOCATING+_end = . ;}
+ ${RELOCATING+${OTHER_BSS_SECTIONS}}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+_end = .;}
+ ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+PROVIDE (end = .);}
/* Stabs debugging sections. */
diff --git a/contrib/binutils/ld/scripttempl/elfppc.sc b/contrib/binutils/ld/scripttempl/elfppc.sc
new file mode 100644
index 0000000..ddab8f8
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/elfppc.sc
@@ -0,0 +1,288 @@
+#
+# Unusual variables checked by this code:
+# NOP - two byte opcode for no-op (defaults to 0)
+# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
+# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
+# (e.g., .PARISC.milli)
+# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
+# (e.g., .PARISC.global)
+# OTHER_SECTIONS - at the end
+# EXECUTABLE_SYMBOLS - symbols that must be defined for an
+# executable (e.g., _DYNAMIC_LINK)
+# TEXT_START_SYMBOLS - symbols that appear at the start of the
+# .text section.
+# DATA_START_SYMBOLS - symbols that appear at the start of the
+# .data section.
+# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
+# .bss section besides __bss_start.
+#
+# When adding sections, do note that the names of some sections are used
+# when specifying the start address of the next.
+#
+test -z "$ENTRY" && ENTRY=_start
+test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+test "$LD_FLAG" = "N" && DATA_ADDR=.
+SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) }"
+SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) }"
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+CTOR=".ctors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${CTOR_START}}
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ ${CONSTRUCTING+${CTOR_END}}
+ }"
+
+DTOR=" .dtors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${DTOR_START}}
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ ${CONSTRUCTING+${DTOR_END}}
+ }"
+
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
+ "${LITTLE_OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+ENTRY(${ENTRY})
+
+${RELOCATING+${LIB_SEARCH_DIRS}}
+${RELOCATING+/* Do we need any of these for elf?
+ __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
+${RELOCATING+${EXECUTABLE_SYMBOLS}}
+${RELOCATING- /* For some reason, the Solaris linker makes bad executables
+ if gld -r is used and the intermediate file has sections starting
+ at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
+ bug. But for now assigning the zero vmas works. */}
+
+${RELOCATING+PROVIDE (__stack = 0);}
+${RELOCATING+PROVIDE (___stack = 0);}
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ ${CREATE_SHLIB-${RELOCATING+. = ${TEXT_START_ADDR} + SIZEOF_HEADERS;}}
+ ${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}}
+ ${CREATE_SHLIB-${INTERP}}
+ .hash ${RELOCATING-0} : { *(.hash) }
+ .dynsym ${RELOCATING-0} : { *(.dynsym) }
+ .dynstr ${RELOCATING-0} : { *(.dynstr) }
+ .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
+ .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
+ .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
+ .rela.text ${RELOCATING-0} :
+ {
+ *(.rela.text)
+ ${RELOCATING+*(.rela.text.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.t*)}
+ }
+ .rela.data ${RELOCATING-0} :
+ {
+ *(.rela.data)
+ ${RELOCATING+*(.rela.data.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.d*)}
+ }
+ .rela.rodata ${RELOCATING-0} :
+ {
+ *(.rela.rodata)
+ ${RELOCATING+*(.rela.rodata.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.r*)}
+ }
+ .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
+ .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
+ .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
+ .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
+ .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
+ .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2) }
+ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2) }
+ .text ${RELOCATING-0} :
+ {
+ ${RELOCATING+${TEXT_START_SYMBOLS}}
+ *(.text)
+ ${RELOCATING+*(.text.*)}
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ ${RELOCATING+*(.gnu.linkonce.t*)}
+ } =${NOP-0}
+ .init ${RELOCATING-0} : { KEEP (*(.init)) } =${NOP-0}
+ .fini ${RELOCATING-0} : { KEEP (*(.fini)) } =${NOP-0}
+ .rodata ${RELOCATING-0} :
+ {
+ *(.rodata)
+ ${RELOCATING+*(.rodata.*)}
+ ${RELOCATING+*(.gnu.linkonce.r*)}
+ }
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ ${RELOCATING+_etext = .;}
+ ${RELOCATING+PROVIDE (etext = .);}
+ ${RELOCATING+PROVIDE (__etext = .);}
+ ${CREATE_SHLIB-${SDATA2}}
+ ${CREATE_SHLIB-${SBSS2}}
+ ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. It would
+ be more correct to do this:
+ ${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (ALIGN(8) & (${MAXPAGESIZE} - 1))};}
+ The current expression does not correctly handle the case of a
+ text segment ending precisely at the end of a page; it causes the
+ data segment to skip a page. The above expression does not have
+ this problem, but it will currently (2/95) cause BFD to allocate
+ a single segment, combining both text and data, for this case.
+ This will prevent the text segment from being shared among
+ multiple executions of the program; I think that is more
+ important than losing a page of the virtual address space (note
+ that no actual memory is lost; the page which is skipped can not
+ be referenced). */
+ ${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
+
+ .data ${RELOCATING-0} :
+ {
+ ${RELOCATING+${DATA_START_SYMBOLS}}
+ *(.data)
+ ${RELOCATING+*(.data.*)}
+ ${RELOCATING+*(.gnu.linkonce.d*)}
+ ${CONSTRUCTING+CONSTRUCTORS}
+ }
+ .data1 ${RELOCATING-0} : { *(.data1) }
+ ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .dynamic ${RELOCATING-0} : { *(.dynamic) }
+
+ /* Put .ctors and .dtors next to the .got2 section, so that the pointers
+ get relocated with -mrelocatable. Also put in the .fixup pointers.
+ The current compiler no longer needs this, but keep it around for 2.7.2 */
+
+ ${RELOCATING+PROVIDE (_GOT2_START_ = .);}
+ ${RELOCATING+PROVIDE (__GOT2_START_ = .);}
+ .got2 ${RELOCATING-0} : { *(.got2) }
+
+ ${RELOCATING+PROVIDE (__CTOR_LIST__ = .);}
+ ${RELOCATING+PROVIDE (___CTOR_LIST__ = .);}
+ ${RELOCATING+${CTOR}}
+ ${RELOCATING+PROVIDE (__CTOR_END__ = .);}
+ ${RELOCATING+PROVIDE (___CTOR_END__ = .);}
+
+ ${RELOCATING+PROVIDE (__DTOR_LIST__ = .);}
+ ${RELOCATING+PROVIDE (___DTOR_LIST__ = .);}
+ ${RELOCATING+${DTOR}}
+ ${RELOCATING+PROVIDE (__DTOR_END__ = .);}
+ ${RELOCATING+PROVIDE (___DTOR_END__ = .);}
+
+ ${RELOCATING+PROVIDE (_FIXUP_START_ = .);}
+ ${RELOCATING+PROVIDE (__FIXUP_START_ = .);}
+ .fixup ${RELOCATING-0} : { *(.fixup) }
+ ${RELOCATING+PROVIDE (_FIXUP_END_ = .);}
+ ${RELOCATING+PROVIDE (__FIXUP_END_ = .);}
+ ${RELOCATING+PROVIDE (_GOT2_END_ = .);}
+ ${RELOCATING+PROVIDE (__GOT2_END_ = .);}
+
+ ${RELOCATING+PROVIDE (_GOT_START_ = .);}
+ ${RELOCATING+PROVIDE (__GOT_START_ = .);}
+ .got ${RELOCATING-0} : { *(.got) }
+ .got.plt ${RELOCATING-0} : { *(.got.plt) }
+ ${CREATE_SHLIB+${SDATA2}}
+ ${CREATE_SHLIB+${SBSS2}}
+ ${RELOCATING+PROVIDE (_GOT_END_ = .);}
+ ${RELOCATING+PROVIDE (__GOT_END_ = .);}
+
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+ .sdata ${RELOCATING-0} : { *(.sdata) }
+ ${RELOCATING+_edata = .;}
+ ${RELOCATING+PROVIDE (edata = .);}
+ ${RELOCATING+PROVIDE (__edata = .);}
+ .sbss ${RELOCATING-0} :
+ {
+ ${RELOCATING+PROVIDE (__sbss_start = .);}
+ ${RELOCATING+PROVIDE (___sbss_start = .);}
+ *(.sbss)
+ *(.scommon)
+ *(.dynsbss)
+ ${RELOCATING+PROVIDE (__sbss_end = .);}
+ ${RELOCATING+PROVIDE (___sbss_end = .);}
+ }
+ ${PLT}
+ .bss ${RELOCATING-0} :
+ {
+ ${RELOCATING+${OTHER_BSS_SYMBOLS}}
+ ${RELOCATING+PROVIDE (__bss_start = .);}
+ ${RELOCATING+PROVIDE (___bss_start = .);}
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ }
+ ${RELOCATING+_end = . ;}
+ ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+PROVIDE (__end = .);}
+
+ /* These are needed for ELF backends which have not yet been
+ converted to the new style linker. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+
+ /* These must appear regardless of ${RELOCATING}. */
+ ${OTHER_SECTIONS}
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/pe.sc b/contrib/binutils/ld/scripttempl/pe.sc
index f5cfc70..ce1a502 100644
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ b/contrib/binutils/ld/scripttempl/pe.sc
@@ -6,21 +6,26 @@ fi
# We can't easily and portably get an unquoted $ in a shell
# substitution, so we do this instead.
+# Sorting of the .foo$* sections is required by the definition of
+# grouped sections in PE.
+# Sorting of the file names in R_IDATA is required by the
+# current implementation of dlltool (this could probably be changed to
+# use grouped sections instead).
if test "${RELOCATING}"; then
- R_TEXT='*(.text$*)'
- R_DATA='*(.data$*)'
- R_RDATA='*(.rdata$*)'
+ R_TEXT='*(SORT(.text$*))'
+ R_DATA='*(SORT(.data$*))'
+ R_RDATA='*(SORT(.rdata$*))'
R_IDATA='
- *(.idata$2)
- *(.idata$3)
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
/* These zeroes mark the end of the import list. */
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
- *(.idata$4)
- *(.idata$5)
- *(.idata$6)
- *(.idata$7)'
- R_CRT='*(.CRT$*)'
- R_RSRC='*(.rsrc$*)'
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)'
+ R_CRT='*(SORT(.CRT$*))'
+ R_RSRC='*(SORT(.rsrc$*))'
else
R_TEXT=
R_DATA=
@@ -33,10 +38,11 @@ fi
cat <<EOF
${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
+${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
${LIB_SEARCH_DIRS}
-ENTRY(_mainCRTStartup)
+ENTRY(${ENTRY})
SECTIONS
{
@@ -74,6 +80,18 @@ SECTIONS
${RELOCATING+*(.data_cygwin_nocopy)}
}
+ .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.rdata)
+ ${R_RDATA}
+ *(.eh_frame)
+ }
+
+ .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.pdata)
+ }
+
.bss ${RELOCATING+BLOCK(__section_alignment__)} :
{
${RELOCATING+__bss_start__ = . ;}
@@ -82,13 +100,6 @@ SECTIONS
${RELOCATING+__bss_end__ = . ;}
}
- .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.rdata)
- ${R_RDATA}
- *(.eh_frame)
- }
-
.edata ${RELOCATING+BLOCK(__section_alignment__)} :
{
*(.edata)
@@ -117,20 +128,21 @@ SECTIONS
{
/* end is deprecated, don't use it */
${RELOCATING+ end = .;}
+ ${RELOCATING+ _end = .;}
${RELOCATING+ __end__ = .;}
}
- .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
- {
- *(.reloc)
- }
-
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
{
*(.rsrc)
${R_RSRC}
}
+ .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.reloc)
+ }
+
.stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
diff --git a/contrib/binutils/ld/scripttempl/ppcpe.sc b/contrib/binutils/ld/scripttempl/ppcpe.sc
new file mode 100644
index 0000000..40fbe33
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/ppcpe.sc
@@ -0,0 +1,198 @@
+# A PE linker script for PowerPC.
+# Loosely based on Steve Chamberlain's pe.sc.
+# All new mistakes should be credited to Kim Knuttila (krk@cygnus.com)
+#
+# These are substituted in as variables in order to get '}' in a shell
+# conditional expansion.
+INIT='.init : { *(.init) }'
+FINI='.fini : { *(.fini) }'
+cat <<EOF
+OUTPUT_FORMAT(${OUTPUT_FORMAT})
+${LIB_SEARCH_DIRS}
+
+/* Much of this layout was determined by delving into .exe files for
+ the box generated by other compilers/linkers/etc. This means that
+ if a particular feature did not happen to appear in one of the
+ subject files, then it may not be yet supported.
+*/
+
+/* It's "mainCRTStartup", not "_mainCRTStartup", and it's located in
+ one of the two .lib files (libc.lib and kernel32.lib) that currently
+ must be present on the link line. This means that you must use
+ "-u mainCRTStartup" to make sure it gets included in the link.
+*/
+
+ENTRY(mainCRTStartup)
+
+SECTIONS
+{
+
+ /* text - the usual meaning */
+ .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ {
+ ${RELOCATING+ *(.init);}
+ *(.text)
+ *(.gcc_except_table)
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1); *(.ctors); *(.ctor); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); LONG (0); }
+ ${RELOCATING+ *(.fini);}
+ ${RELOCATING+ etext = .};
+ }
+
+ /* rdata - Read Only Runtime Data
+ CTR sections: All of the CRT (read only C runtime data) sections
+ appear at the start of the .rdata (read only runtime data)
+ section, in the following order. Don't know if it matters or not.
+ Not all sections are always present either.
+ .rdata: compiler generated read only data
+ .xdata: compiler generated exception handling table. (Most docs
+ seem to suggest that this section is now deprecated infavor
+ of the ydata section)
+ .edata: The exported names table.
+ */
+ .rdata BLOCK(__section_alignment__) :
+ {
+ *(.CRT\$XCA);
+ *(.CRT\$XCC);
+ *(.CRT\$XCZ);
+ *(.CRT\$XIA);
+ *(.CRT\$XIC);
+ *(.CRT\$XIZ);
+ *(.CRT\$XLA);
+ *(.CRT\$XLZ);
+ *(.CRT\$XPA);
+ *(.CRT\$XPX);
+ *(.CRT\$XPZ);
+ *(.CRT\$XTA);
+ *(.CRT\$XTZ);
+ *(.rdata);
+ *(.xdata);
+ }
+
+ .edata BLOCK(__section_alignment__) :
+ {
+ *(.edata);
+ }
+
+ /* data - initialized data
+ .ydata: exception handling information.
+ .data: the usual meaning.
+ .data2: more of the same.
+ .bss: For some reason, bss appears to be included in the data
+ section, as opposed to being given a section of it's own.
+ COMMON:
+ */
+ .data BLOCK(__section_alignment__) :
+ {
+ __data_start__ = . ;
+ *(.ydata);
+ *(.data);
+ *(.data2);
+ __bss_start__ = . ;
+ *(.bss) ;
+ *(COMMON);
+ __bss_end__ = . ;
+ ${RELOCATING+ end = .};
+ __data_end__ = . ;
+ }
+
+ /* The exception handling table. A sequence of 5 word entries. Section
+ address and extent are placed in the DataDirectory.
+ */
+ .pdata BLOCK(__section_alignment__) :
+ {
+ *(.pdata)
+ ;
+ }
+
+ /* The idata section is chock full of magic bits.
+ 1. Boundaries around various idata parts are used to initialize
+ some of the fields of the DataDirectory. In particular, the
+ magic for 2, 4 and 5 are known to be used. Some compilers
+ appear to generate magic section symbols for this purpose.
+ Where we can, we catch such symbols and use our own. This of
+ course is something less than a perfect strategy.
+ 2. The table of contents is placed immediately after idata4.
+ The ".private.toc" sections are generated by the ppc bfd. The
+ .toc variable is generated by gas, and resolved here. It is
+ used to initialized function descriptors (and anyone else who
+ needs the address of the module's toc). The only thing
+ interesting about it at all? Most ppc instructions using it
+ have a 16bit displacement field. The convention for addressing
+ is to initialize the .toc value to 32K past the start of the
+ actual toc, and subtract 32K from all references, thus using
+ the entire 64K range. Naturally, the reloc code must agree
+ on this number or you get pretty stupid results.
+ */
+ .idata BLOCK(__section_alignment__) :
+ {
+ __idata2_magic__ = .;
+ *(.idata\$2);
+ __idata3_magic__ = .;
+ *(.idata\$3);
+ __idata4_magic__ = .;
+ *(.idata\$4);
+ . = ALIGN(4);
+ .toc = . + 32768;
+ *(.private.toc);
+ __idata5_magic__ = .;
+ *(.idata\$5);
+ __idata6_magic__ = .;
+ *(.idata\$6);
+ __idata7_magic__ = .;
+ *(.idata\$7);
+ ;
+ }
+
+ /* reldata -- data that requires relocation
+ */
+ .reldata BLOCK(__section_alignment__) :
+ {
+ *(.reldata)
+ ;
+ }
+
+
+ /* Resources */
+ .rsrc BLOCK(__section_alignment__) :
+ {
+ *(.rsrc\$01)
+ *(.rsrc\$02)
+ ;
+ }
+
+ .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+
+ .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
+
+ /* The .reloc section is currently generated by the dlltool from Steve
+ Chamberlain in a second pass of linking. Section address and extent
+ are placed in the DataDirectory.
+ */
+ .reloc BLOCK(__section_alignment__) :
+ {
+ *(.reloc)
+ ;
+ }
+
+ /* We don't do anything useful with codeview debugger support or the
+ directive section (yet). Hopefully, we junk them correctly.
+ */
+ /DISCARD/ BLOCK(__section_alignment__) :
+ {
+ *(.debug\$S)
+ *(.debug\$T)
+ *(.debug\$F)
+ *(.drectve)
+ ;
+ }
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/sparccoff.sc b/contrib/binutils/ld/scripttempl/sparccoff.sc
new file mode 100644
index 0000000..6bbb7ad
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/sparccoff.sc
@@ -0,0 +1,48 @@
+# Linker script for Sparc COFF.
+# Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
+test -z "$ENTRY" && ENTRY=_start
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+${LIB_SEARCH_DIRS}
+
+ENTRY(${ENTRY})
+
+SECTIONS
+{
+ .text ${RELOCATING+ SIZEOF_HEADERS} : {
+ *(.init)
+ *(.text)
+ ${RELOCATING+ etext = .;}
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
+ ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
+ ${CONSTRUCTING+ *(.ctors)}
+ ${CONSTRUCTING+ LONG(0)}
+ ${CONSTRUCTING+ ___CTOR_END__ = .;}
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
+ ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
+ ${CONSTRUCTING+ *(.dtors)}
+ ${CONSTRUCTING+ LONG(0)}
+ ${CONSTRUCTING+ ___DTOR_END__ = .;}
+ *(.fini)
+ ${RELOCATING+ etext = .};
+ }
+ .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
+ *(.data)
+ ${RELOCATING+ edata = .};
+ }
+ .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+ {
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ end = .};
+ }
+ .stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+ .stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/v850.sc b/contrib/binutils/ld/scripttempl/v850.sc
index 6f3844e..0a20954 100644
--- a/contrib/binutils/ld/scripttempl/v850.sc
+++ b/contrib/binutils/ld/scripttempl/v850.sc
@@ -55,11 +55,12 @@ SECTIONS
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
- .init : { *(.init) } =0
+ .init : { KEEP (*(.init)) } =0
.plt : { *(.plt) }
.text : {
*(.text)
+ ${RELOCATING+*(.text.*)}
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
@@ -68,26 +69,42 @@ SECTIONS
${RELOCATING+_etext = .;}
${RELOCATING+PROVIDE (etext = .);}
+ /* This is special code area at the end of the normal text section.
+ It contains a small lookup table at the start followed by the
+ code pointed to by entries in the lookup table. */
- .fini : { *(.fini) } =0
- .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
+ .call_table_data ${CALL_TABLE_START_ADDR} : {
+ ${RELOCATING+PROVIDE(__ctbp = .);}
+ *(.call_table_data)
+ } = 0xff /* fill gaps with 0xff */
+ .call_table_text : {
+ *(.call_table_text)
+ }
+
+ .fini : { KEEP (*(.fini)) } =0
+ .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) }
.rodata1 : { *(.rodata1) }
.data : {
*(.data)
+ ${RELOCATING+*(.data.*)}
*(.gnu.linkonce.d*)
CONSTRUCTORS
}
.data1 : { *(.data1) }
.ctors : {
${RELOCATING+___ctors = .;}
- *(.ctors)
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend(.ctors))
${RELOCATING+___ctors_end = .;}
}
.dtors : {
${RELOCATING+___dtors = .;}
- *(.dtors)
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
${RELOCATING+___dtors_end = .;}
}
@@ -109,22 +126,30 @@ SECTIONS
.sdata ${SDATA_START_ADDR} : {
${RELOCATING+PROVIDE (__gp = . + 0x8000);}
*(.sdata)
- ${RELOCATING+__sbss_start = .;}
- *(.sbss)
- *(.scommon)
- }
+ }
- /* See comment about .rozdata */
+ /* See comment about .rozdata. */
.rosdata ${ROSDATA_START_ADDR} : {
*(.rosdata)
}
+ /* We place the .sbss data section AFTER the .rosdata section, so that
+ it can directly preceed the .bss section. This allows runtime startup
+ code to initialise all the zero-data sections by simply taking the
+ value of '_edata' and zeroing until it reaches '_end' */
+ .sbss : {
+ ${RELOCATING+__sbss_start = .;}
+ *(.sbss)
+ *(.scommon)
+ }
+
${RELOCATING+_edata = DEFINED (__sbss_start) ? __sbss_start : . ;}
${RELOCATING+PROVIDE (edata = _edata);}
.bss :
{
${RELOCATING+__bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;}
+ ${RELOCATING+__real_bss_start = . ;}
*(.dynbss)
*(.bss)
*(COMMON)
diff --git a/contrib/binutils/ld/sysdep.h b/contrib/binutils/ld/sysdep.h
index a018436..2ccc122 100644
--- a/contrib/binutils/ld/sysdep.h
+++ b/contrib/binutils/ld/sysdep.h
@@ -66,4 +66,8 @@ extern void free ();
extern char *getenv ();
#endif
+#ifdef NEED_DECLARATION_ENVIRON
+extern char **environ;
+#endif
+
#endif /* ! defined (LD_SYSDEP_H) */
diff --git a/contrib/binutils/libiberty/ChangeLog b/contrib/binutils/libiberty/ChangeLog
index e3f0773..c858409 100644
--- a/contrib/binutils/libiberty/ChangeLog
+++ b/contrib/binutils/libiberty/ChangeLog
@@ -1,3 +1,1226 @@
+Thu Mar 16 01:33:58 2000 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in (partition.o): Depend on config.h
+
+2000-03-14 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * hashtab.c (find_empty_slot_for_expand): New function.
+ (htab_expand): Use it instead of htab_find_slot.
+ (htab_find_with_hash): Renamed from htab_find; now accepts extra
+ argument HASH.
+ (htab_find_slot_with_hash): Likewise for htab_find_slot.
+ (htab_find): New wrapper function.
+ (htab_find_slot): Likewise.
+ (htab_traverse): Pass slot, not entry, to called function.
+
+2000-03-09 Alex Samuel <samuel@codesourcery.com>
+
+ * Makefile.in (CFILES): Add partition.c.
+ (REQUIRED_OFILES): Add partition.o.
+ (partition.o): New rule.
+ * partition.c: New file.
+
+2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
+
+ * hashtab.c (htab_create): Set del_f.
+ (htab_delete, htab_empty, htab_remove_elt, htab_clear_slot):
+ Use it.
+
+2000-03-08 Zack Weinberg <zack@wolery.cumb.org>
+
+ * hashtab.c: Remove debugging variables (all_searches,
+ all_collisions, all_expansions). Delete
+ all_hash_table_collisions.
+ (create_hash_table, delete_hash_table, empty_hash_table,
+ find_hash_table_entry, remove_element_from_hash_table_entry,
+ clear_hash_table_slot, traverse_hash_table, hash_table_size,
+ hash_table_elements_number, hash_table_collisions): Rename to:
+ htab_create, htab_delete, htab_empty, htab_find_slot,
+ htab_remove_elt, htab_clear_slot, htab_traverse, htab_size,
+ htab_elements, htab_collisions.
+ (htab_find): New function, handles common case where you don't
+ plan to add or delete an entry.
+ (htab_expand): Don't create a whole new table, just a new
+ entry vector.
+ (htab_find_slot): Simplify logic.
+
+1999-08-03 Ian Lance Taylor <ian@zembu.com>
+
+ * floatformat.c: Add casts to avoid signed/unsigned warnings.
+ * pexecute.c: Add ATTRIBUTE_UNUSED as needed on Unix.
+
+ * Makefile.in (install_to_libdir): Change $(TARGETLIB).n to
+ $(TARGETLIB)n so it works on MSDOS.
+ (install_to_tooldir): Likewise.
+
+1999-07-21 Ian Lance Taylor <ian@zembu.com>
+
+ From Mark Elbrecht:
+ * makefile.dos: Remove; obsolete.
+ * configure.bat: Remove; obsolete.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * splay-tree.c (splay_tree_insert): Add initialization to avoid
+ warning.
+
+2000-01-04 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * pexecute.c: Conditionally include string.h.
+ (fix_argv): Handle embedded whitespace in args for Mingw32.
+
+2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in (ac_libiberty_warn_cflags): Turn on warnings if
+ we're using gcc.
+
+ * Makefile.in (COMPILE.c): Add @ac_libiberty_warn_cflags@
+
+1999-12-27 Geoff Keating <geoffk@cygnus.com>
+
+ * vasprintf.c (int_vasprintf): Don't re-read the format character
+ as this mishandles strings like '%%s'.
+
+1999-12-05 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.c (splay_tree_new): Use struct splay_tree_node_s
+ rather than struct splay_tree_node.
+ (splay_tree_insert): Use struct splay_tree_s rather than struct
+ splay_tree.
+
+Sun Nov 28 00:59:39 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * hashtab.c (sys/types.h): File included.
+
+1999-11-22 Jason Merrill <jason@casey.cygnus.com>
+
+ * strtoul.c, strtol.c, random.c: Remove advertising clause from
+ BSD license, pursuant with
+
+ ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+
+Wed Nov 10 09:42:39 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hashtab.c: Include stdio.h.
+
+Mon Nov 8 09:23:41 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hashtab.c (traverse_hash_table): Protect prototype with PARAMS.
+
+Tue Nov 2 03:23:13 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * xstrdup (sys/types.h): Include this file.
+
+1999-10-28 Nathan Sidwell <nathan@acm.org>
+
+ * Makefile.in (SUBDIRS): New macro.
+ (mostlyclean, clean, distclean, maintainer-clean): Adjust to
+ avoid multiple subdirectory cleaning.
+ (*-subdir): Use SUBDIRS.
+
+1999-10-25 Jim Kingdon <http://developer.redhat.com/>
+
+ * cplus-dem.c: Move declarations of standard_symbol_characters and
+ hp_symbol_characters inside #ifdef MAIN to avoid compiler
+ warnings.
+
+1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
+
+ * hashtab.c (find_hash_table_entry): When returning a
+ DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
+ (clear_hash_table_slot): New function which deletes an entry
+ by its position in the table, not its value.
+ (traverse_hash_table): New function which calls a hook
+ function for every live entry in the table.
+
+1999-10-19 Mark Mitchell <mark@codesourcery.com>
+
+ * cplus-dem.c (INTBUF_SIZE): New macro.
+ (string_append_template_idx): New function.
+ (demangle_expression): Likewise.
+ (demangle_integral_value): Use it.
+ (demangle_real_value): New function, split out from ...
+ (demangle_template_value_parm): ... here. Use
+ string_append_template_idx. Use demangle_real_value.
+ (demangle_template): Use string_append_template_idx.
+ (demangle_qualified): Use consume_count_with_underscores.
+ (get_count): Tweak formatting.
+ (do_type): Use string_append_template_idx.
+
+1999-10-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * calloc.c: Add a public domain notice.
+
+Mon Oct 18 02:30:47 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * setenv.c (sys/types.h, stdio.h): Include those files unconditionaly.
+
+Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
+
+ * Makefile.in (CFILES): Add hashtab.c
+ (REQUIRED_OFILES): Add hashtab.o
+ (hashtab.o): Add dependencies.
+ * hashtab.c: New file
+
+Wed Oct 13 01:16:47 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * basename.c (DIR_SEPARATOR): New macro.
+ (DIR_SEPARATOR_2): Likewise.
+ (HAVE_DOS_BASED_FILESYSTEM): Likewise.
+ (IS_DIR_SEPARATOR): Likewise.
+ (main): Handle MSDOS style pathname.
+
+1999-10-11 Mark Mitchell <mark@codesourcery.com>
+
+ * cplus-dem.c (do_type): Handle pointer to member types whose
+ enclosing classes have namespace scope.
+
+Sun Oct 10 01:23:50 1999 Marc Espie <espie@cvs.openbsd.org>
+
+ * config.table: Provide a backup shell for executing move-if-change.
+
+1999-10-02 Mark Mitchell <mark@codesourcery.com>
+
+ * xmalloc.c (xmalloc): Fix spelling error.
+ (xcalloc, xrealloc): Likewise.
+
+1999-10-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cplus-dem.c (fancy_abort, demangle_integral_value,
+ demangle_arm_hp_template, recursively_demangle,
+ standard_symbol_characters, hp_symbol_characters, main): Add prototype.
+ (program_name, program_version, fatal): Constify a char*.
+ (usage, fatal): Mark with ATTRIBUTE_NORETURN.
+ (main): Call return, not exit.
+
+1999-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Remove obsolete comment about gcc.
+ (make_temp_file): Constify a char*.
+
+Wed Sep 8 20:03:28 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * xmemdup.c: Include sys/types.h.
+
+1999-09-07 Jeff Garzik <jgarzik@pobox.com>
+
+ * xmemdup.c: New xmemdup function.
+ * Makefile.in, makefile.vms, vmsbuild.com: Use xmemdup.[co].
+
+Tue Sep 7 23:32:18 1999 Linas Vepstas <linas@linas.org>
+
+ * config.table: Add openedition target.
+ * config/mh-openedition: New file.
+
+Thu Sep 2 01:36:12 1999 Marc Espie <espie@cvs.openbsd.org>
+
+ * pexecute.c (pexecute): Fill in temp_base when needed.
+
+1999-08-31 Richard Henderson <rth@cygnus.com>
+
+ * getpwd.c: Check HAVE_GETCWD before defining it away.
+
+1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (CFILES): Add calloc.c and getpwd.c.
+ (REQUIRED_OFILES): Add getpwd.o.
+ (getpwd.o): Add target.
+
+ * configure.in (AC_PREREQ): Bump to 2.13.
+ (AC_CHECK_HEADERS): Add check for <sys/stat.h>.
+
+ * getpwd.c: New file, moved here from gcc.
+
+1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cplus-dem.c (gnu_special): Cast a `size_t' to `long' when
+ comparing against a signed quantity.
+ (arm_special): Likewise.
+ (demangle_fund_type): Likewise.
+ (do_hpacc_template_const_value): Mark parameter `work' with
+ ATTRIBUTE_UNUSED.
+ (main): Constify variable `valid_symbols'.
+
+Tue Aug 24 02:50:45 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * strtoul.c (strtoul): Add parentheses around && within ||.
+
+Fri Aug 6 23:32:29 1999 Daniel Jacobowitz <drow@drow.them.org>
+
+ * Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
+ libdir, libsubdir and tooldir.
+
+1999-08-01 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.c (splay_tree_insert): Return the new node.
+
+1999-07-14 Richard Henderson <rth@cygnus.com>
+
+ * argv.c: Include stdlib.h and string.h instead of
+ prototyping directly.
+ * choose-temp.c: Conditionally include string.h.
+
+1999-07-12 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (NEEDED): Add bcmp, bcopy, bzero.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * splay-tree.c (splay_tree_insert): Add initialization to avoid
+ warning.
+
+1999-07-07 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Makefile.in (needed-list): Only include stuff we actually need
+ for libstdc++.
+
+1999-06-21 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * configure.in (checkfuncs): Add gettimeofday.
+ * config.in, configure: Regenerated.
+
+Mon Jun 21 05:56:01 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * configure.in (*-*-uwin*): UWIN has sys_{errlist,nerr} even if
+ the test fails.
+ * configure: Regenerate.
+
+1999-06-10 Mike Stump <mrs@wrs.com>
+
+ * Makefile.in (setenv.o): Add config.h dep for setenv.o to fix
+ parallel builds.
+
+1999-05-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * putenv.c: Include ansidecl.h to define `const'.
+ * setenv.c: Likewise.
+
+Wed May 26 03:58:20 1999 "Melissa O'Neill" <oneill@cs.sfu.ca>
+
+ * Makefile.in (CFILES): Add putenv.c and setenv.c.
+ * configure.in (funcs): Add putenv and setenv.
+ (AC_CHECK_FUNCS): Check for putenv and setenv.
+ * configure: Rebuilt.
+ * putenv.c setenv.c: New files.
+
+ * getcwd.c (getcwd): If pathname is NULL, then obtain SIZE
+ bytes of space using malloc.
+
+Mon May 17 01:42:34 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance
+ the *mangled pointer beyond the end of the string. Clean up code to
+ match prevailing coding style.
+
+1999-05-13 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * tmpnam.c (L_tmpnam): Fix typo.
+
+Thu May 13 01:14:46 1999 Marc Espie <espie@cvs.openbsd.org>
+
+ * cplus-dem.c (standard_symbol_characters): Renamed from
+ standard_symbol_alphabet. No longer modify TABLE.
+ (hp_symbol_characters): Renamed from hp_symbol_alphabet. No longer
+ modify TABLE.
+ (main): Corresponding changes. Use strchr to determine if a
+ character is valid.
+
+1999-05-11 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * cplus-dem.c (main): Use table lookup to distinguish identifier
+ characters from non-identifier characters.
+ (standard_symbol_alphabet, hp_symbol_alphabet): New functions.
+
+Thu May 6 20:34:42 1999 Fred Fish <fnf@be.com>
+
+ * configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
+ * getruntime.c: Only attempt to include sys/resource.h and
+ use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
+ are defined.
+
+Mon Apr 26 01:36:06 1999 Donn Terry (donn@interix.com)
+
+ * configure.in (alloca detection): Handle alloca directly for interix.
+ * configure: Rebuilt.
+
+Sun Apr 25 01:18:21 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * choose-temp.c (DIR_SEPARATOR): Use '\\' only for native windows32.
+
+1999-04-20 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Fix from Dale Hawkins:
+ * cplus-dem.c (mop_up): Set typevec_size to zero, so it'll be
+ reallocated properly if we use it again.
+
+ * cplus-dem.c (demangle_fund_type): Check for buffer overrun. Be
+ stricter about syntax. Always null-terminate string.
+
+Thu Apr 15 23:00:55 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * configure.in (checkfuncs): Check for sbrk.
+ * config.in: Rebuilt.
+ * configure: Likewise.
+ * xmalloc.c: Use HAVE_SBRK instead of the host specific definitions.
+
+1999-04-12 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Fix from Marcus Daniels:
+ * cplus-dem.c (demangle_fund_type): Don't run off the end of the
+ identifier looking for another underscore.
+
+Sun Apr 11 23:20:59 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * pexecute.c: Change all references to __UWIN__ to _UWIN.
+ * xmalloc.c: Likewise.
+ (xcalloc): UWIN has sbrk.
+ (xrealloc): Fix guard macro.
+
+1999-04-11 Richard Henderson <rth@cygnus.com>
+
+ * alloca-conf.h (alloca) [C_ALLOCA]: Don't use Gcc builtin
+ or <alloca.h>.
+ * clock.c (GNU_HZ): New definition.
+ (clock): Use it.
+ * getruntime.c: Likewise.
+
+ * config.table: Use mh-beos.
+ * config/mh-beos: New file.
+
+1999-04-11 Mark Mitchell <mark@codesourcery.com>
+
+ * cplus-dem.c (demangle_template_value_parm): Handle
+ pointers-to-members.
+ (do_type): Handle template parameters as qualifiers.
+
+1999-04-01 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * cplus-dem.c: Attempt to handle overflows in counts with some
+ semblance of grace.
+ (consume_count): Detect overflows. Return -1 to indicate errors,
+ instead of zero.
+ (demangle_template_value_parm, demangle_template): Handle change
+ to consume_count's return convention.
+
+1999-04-05 Tom Tromey <tromey@cygnus.com>
+
+ * testsuite/regress-demangle: New file.
+ * testsuite/demangle-expected: New file.
+
+ * Makefile.in (all, check, installcheck, info, install-info,
+ clean-info, dvi, install, etags, tags, mostlyclean, clean,
+ distclean, maintainer-clean, realclean): Depend on corresponding
+ `-subdir' target.
+ (all-subdir check-subdir installcheck-subdir info-subdir
+ install-info-subdir clean-info-subdir dvi-subdir
+ install-info-subdir etags-subdir mostlyclean-subdir clean-subdir
+ distclean-subdir maintainer-clean-subdir): New target.
+ * testsuite/Makefile.in: New file.
+ * configure: Rebuilt.
+ * configure.in: Create testsuite/Makefile.
+
+1999-04-02 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_compare_pointers): Define.
+
+1999-03-30 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.c (splay_tree_compare_ints): Define.
+
+1999-03-30 Tom Tromey <tromey@cygnus.com>
+
+ * cplus-dem.c (consume_count): If `count' wraps, return 0 and
+ don't advance input pointer.
+ (demangle_class_name): If consume_count didn't find a count, do
+ nothing. Don't bother with `strlen' sanity check; consume_count
+ does it for us.
+
+1999-03-16 Stan Shebs <shebs@andros.cygnus.com>
+
+ From Art Haas <ahaas@neosoft.com>:
+ * cplus-dem.c (demangle_prefix): Don't grab all the '__' strings
+ when doing arm or hp style.
+ (demangle_nested_args): Decr forgetting_types field when done.
+
+Thu Mar 11 01:22:58 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * pexecute.c (__CYGWIN32__): Rename to
+ (__CYGWIN__): this.
+ * xmalloc.c: Likewise.
+
+ Changes to support i386-pc-uwin.
+ * configure.in (*-*-uwin*): Workaround for vfork bug.
+ * configure: Regenerate.
+ * pexecute.c (pexecute): Be like standard Unix.
+ (pwait): Likewise.
+ * xmalloc.c (first_break): Define.
+ (xmalloc_set_program_name): Use.
+ (xmalloc): Use.
+
+Thu Mar 11 01:07:55 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
+
+Sun Feb 28 22:30:44 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * config.table: Check cygwin*, not cygwin32*.
+
+Tue Feb 9 16:39:01 1999 Dave Brolley <brolley@cygnus.com>
+
+ * Makefile.in: Change mkstemp -> mkstemps.
+
+Tue Feb 9 01:12:27 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
+
+ * Makefile.in (REQUIRED_OFILES): remove mkstemp.o
+ * configure.in (funcs): Check for and conditionally add mkstemps to
+ the list of functions libiberty will provide.
+ * configure: Rebuilt.
+
+Wed Feb 3 00:01:15 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on
+ platforms that don't have HZ.
+ * getruntime.c (HZ): Likewise.
+
+Sat Jan 30 13:28:04 1999 Richard Henderson <rth@cygnus.com>
+
+ * Makefile.in (xstrdup.o): Depend on config.h.
+
+Wed Jan 13 07:26:44 1999 H.J. Lu (hjl@gnu.org)
+
+ * cplus-dem.c (mop_up): Set work->previous_argument to NULL after
+ freeing it.
+
+Wed Jan 13 14:16:36 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * xstrdup.c (xstrdup): Switch from strcpy to memcpy for speed.
+
+Tue Jan 5 15:58:29 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Makefile.in (CFILES): fix typo, splay-tree.c instead of
+ splay-tree.o.
+
+1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Require autoconf 2.12.1 or higher.
+
+1998-12-30 Michael Meissner <meissner@cygnus.com>
+
+ * random.c (NULL): Don't redefine NULL if it is already defined.
+
+Tue Dec 22 09:43:35 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * argv.c (buildargv): Cast the result of alloca in assignment.
+
+ * choose-temp.c: Include stdlib.h.
+
+ * cplus-dem.c (demangle_arm_pt): Remove unused prototype.
+ (snarf_numeric_literal): Constify first parameter.
+ (code_for_qualifier): Avoid a gcc extension, make the parameter an
+ int, not a char.
+ (demangle_qualifier): Likewise.
+ (demangle_signature): Cast the argument of a ctype function to
+ unsigned char.
+ (arm_pt): Add parens around assignment used as truth value.
+ (demangle_arm_hp_template): Constify variable `args'.
+ (do_hpacc_template_const_value): Cast the argument of a ctype
+ function to unsigned char.
+ (do_hpacc_template_literal): Remove unused variable `i'.
+ (snarf_numeric_literal): Constify parameter `args'.
+ Cast the argument of a ctype function to unsigned char.
+
+ * floatformat.c (floatformat_to_double): Add explicit braces to
+ avoid ambiguous `else'.
+
+ * fnmatch.c (fnmatch): Change type of variables `c', `c1',
+ `cstart' and `cend' to unsigned char. Cast the argument of macro
+ `FOLD', which uses ctype functions, to unsigned char.
+
+ * objalloc.c (free): Add prototype.
+
+Sun Dec 20 16:03:46 1998 Hans-Peter Nilsson <hp@axis.se>
+
+ * Makefile.in (CFILES): Fix typo: splay-tree.c, not splay-tree.o
+
+Fri Dec 18 17:50:18 1998 David Taylor <taylor@texas.cygnus.com>
+
+ * cplus-dem.c (demangle_arm_pt): remove declaration -- function
+ doesn't exist.
+ (do_hpacc_template_literal): remove unused variable `i'.
+
+Fri Dec 18 16:11:43 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
+
+ * cplus-dem.c (demangle_fund_type): Process CV and u codes before
+ bumping the pointer we read from. Also prepend these codes,
+ as we do in other places.
+
+1998-12-18 Nick Clifton <nickc@cygnus.com>
+
+ * cplus-dem.c (demangle_arm_hp_template): Make variable 'args' be
+ 'const char *' in order to match its usage when calling siblings.
+ (snarf_numeric_literal): Make first arg 'const char **' in order
+ to match usage.
+
+Mon Dec 14 09:55:50 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Don't check IN_GCC anymore.
+
+ * floatformat.c (floatformat_from_double): Use `const', not `CONST'.
+ * memchr.c (memchr): Likewise.
+ * memcpy.c (memcpy): Likewise.
+ * memmove.c (memmove): Likewise.
+
+ * mkstemp.c: Don't check IN_GCC anymore.
+ * pexecute.c: Likewise.
+ * splay-tree.c: Likewise.
+
+ * strchr.c (strchr): Use `const', not `CONST'.
+ * strrchr.c (strrchr): Likewise.
+ * strtol.c (strtol): Likewise.
+ * strtoul.c (strtoul): Likewise.
+
+Fri Dec 4 13:51:04 1998 David Taylor <taylor@texas.cygnus.com>
+ Elena Zannoni <ezannoni@cygnus.com>
+ Stan Shebs <shebs@cygnus.com>
+ Edith Epstein <eepstein@cygnus.com>
+ Andres MacLeod <amacleod@cygnus.com>
+ Satish Pai <pai@apollo.hp.com>
+
+ * HP aCC demangling support.
+ * cplus-dem.c
+ (main): Remove default to HP style demangling, set to EDG
+ demangling correctly when -edg specified; set the demangling style
+ when user specifies 'edg'. Set strip_underscore to
+ prepends_underscore, if not HPUXHPPA. Set
+ current_demangling_style to hp_demangling if HPUXHPPA. Set
+ current demangling style correctly if the switch is hp. Read
+ label correctly also in the HP style case.
+ (work_stuff): add temp_start field; add field for volatile member
+ function.
+ (arm_pt): handle ARM_DEMANGLING and EDG_DEMANGLING styles; HP
+ style for this case is the same as ARM.
+ (demangle_args): handle EDG_DEMANGLING style; support HP style.
+ (demangle_arm_hp_template): new function. (It was
+ demangle_arm_pt.); check and set value of temp_start field in
+ multiple places. Also, when ceching for end of template args,
+ check to see if at end of static member of template class.
+ (demangle_class): new local variable : save_class_name_end Don't
+ include template args in string defining class.
+ (demangle_class_name): use demangel_arm_hp_template.
+ (demangle_function_name): handle case where demangling style is
+ HP_DEMANGLING and currently point at an 'X' in the mangled name.
+ Handle EDG_DEMANGLING style. Handle constructor and destructor
+ ops for HP style.
+ (demangle_prefix): handle EDG_DEMANGLING and ARM_DEMANGLING
+ styles. global destructor and constructor for HP style are same
+ as for ARM style. Same for local variables.
+ (demangle_qualified): handle EDG_DEMANGLING style.
+ (demangle_signature): add case for volatile member function. For
+ cases '1' - '9' : initialize the temp_start field to -1 and handle
+ the EDG_DEMANGLING style. for case 'F' : handle EDG_DEMANGLING
+ and AUTO_DEMANGLING styles. If expecting a function and managed
+ to demangle the funct args, then handle the LUCID_DEMANGLING,
+ ARM_DEMANGLING, and EDG_DEMANGLING styles. Add case for local
+ class name after "Lnnn_ in HP style case. HP style too needs to
+ forget types. _nnn is OK for HP style, so don't report failure.
+ (do_hpacc_template_const_value): new function. Handle template's
+ value param for HP/aCC.
+ (do_hpacc_template_literal): new function. Handle a template's
+ literal parameter for HP aCC.
+ (recursively_demangle): new function
+ (snarf_numeric_literal): new function.
+ (usage): add 'edg' to the list of demangling styles; add hp switch
+ to message.
+
+Sat Nov 28 17:25:22 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * pexecute.c: Remove obsolete ifdefed cygwin code.
+
+Fri Nov 27 13:26:06 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Always include libiberty.h. Avoid redundancies.
+ * cplus-dem.c: Likewise. Conform to libiberty.h.
+ * pexecute.c: Likewise.
+ * splay-tree.c: Likewise.
+
+1998-11-25 Mike Stump <mrs@wrs.com>
+
+ * Makefile.in (splay-tree.o): Add config.h dependency.
+
+Mon Nov 23 16:59:49 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Use AC_PREREQ(2.12.1).
+
+1998-11-16 Benjamin Kosnik <bkoz@haight.constant.com>
+
+ * cplus-dem.c (demangle_fund_type): Add demangling for C9x types.
+
+Thu Nov 19 22:15:50 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mpw.c (mpw_access): Add missing parens.
+
+Thu Nov 19 12:59:21 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Call AC_HEADER_SYS_WAIT.
+
+ * pexecute.c: Include sys/wait.h when !IN_GCC.
+
+Thu Nov 19 14:38:20 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * pexecute.c: revert back to checking old Cygwin
+ preprocessor symbol until some time has passed.
+
+Wed Nov 18 08:52:26 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * pexecute.c: Reorganize WIN32 case to accomodate Cygwin
+ since it will now support similar constructs.
+
+Fri Nov 13 19:18:05 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Check for calloc.
+
+ * calloc.c: New file.
+
+ * xmalloc.c (xcalloc): New function.
+
+Fri Nov 13 08:51:46 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
+
+ *cplus-dem.c (demangle_prefix): Use the last "__"
+ in the mangled name when looking for the signature. This allows
+ template names to begin with "__".
+
+1998-11-08 Mark Mitchell <mark@markmitchell.com>
+
+ * cplus-dem.c (type_kind_t): Add tk_reference.
+ (demangle_template_value_parm): Handle it.
+ (do_type): Use it for references, instead of tk_pointer.
+
+ * cplus-dem.c (demangle_template_value_parm): Use cplus_demangle,
+ not internal_cplus_demangle.
+
+Sat Nov 7 16:02:10 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Don't include gansidecl.h.
+ * mkstemp.c: Likewise.
+ * pexecute.c: Likewise.
+
+Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: detect cygwin* instead of cygwin32*
+ * configure: regenerate
+
+Mon Nov 2 10:22:01 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * pexecute.c: Check HAVE_CONFIG_H, not IN_GCC, when determining
+ whether to include config.h. Possibly include unistd.h in the
+ !IN_GCC case. Define VFORK_STRING as a printable function call
+ for error messages (either "vfork" or "fork".) If HAVE_VFORK_H is
+ defined, include vfork.h. If VMS is defined, define vfork()
+ appropriately. Remove vfork check on USG, we're using autoconf.
+ (pexecute): Set `errmsg_fmt' to VFORK_STRING instead of checking
+ locally what string to use.
+
+1998-10-26 Mark Mitchell <mark@markmitchell.com>
+
+ * splay-tree.c: Tweak include directives to make sure declarations of
+ xmalloc and free are available.
+
+1998-10-25 Mark Mitchell <mark@markmitchell.com>
+
+ * cplus-dem.c (gnu_special): Fix handling of virtual tables in
+ anonymous namespaces.
+
+1998-10-23 Mark Mitchell <mark@markmitchell.com>
+
+ * cplus-dem.c (work_stuff): Replace const_type and volatile_type
+ with type_quals.
+ (TYPE_UNQUALIFIED): New macro.
+ (TYPE_QUAL_CONST): Likewise.
+ (TYPE_QUAL_VOLATILE): Likewise.
+ (TYPE_QUAL_RESTRICT): Likewise.
+ (code_for_qualifier): New function.
+ (qualifier_string): Likewise.
+ (demangle_qualifier): Likewise.
+ (internal_cplus_demangle): Use them.
+ (demangle_signature): Likewise.
+ (demangle_template_value_parm): Likewise.
+ (do_type): Likewise.
+ (demangle_fund_type)): Likewise.
+
+Thu Oct 22 19:58:43 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * splay-tree.c (splay_tree_foreach_helper): Make definition static
+ to match prototype.
+
+1998-10-21 Mark Mitchell <mark@markmitchell.com>
+
+ * splay-tree.c: New file.
+ * Makefile.in (CFILES): Add it.
+ (REQUIRED_OFILES): Likewise.
+ (splay-tree.o): Add dependencies.
+
+Tue Oct 20 12:29:02 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * cplus-dem.c (demangle_qualified): Fix off-by-one when checking
+ range of 'K' index.
+
+Thu Oct 15 18:51:12 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Prototype mkstemps() when IN_GCC.
+
+ * cplus-dem.c (consume_count): Cast argument of ctype macro to
+ `unsigned char'.
+ (cplus_demangle_opname): Cast the result of `strlen' to (int) when
+ comparing against one.
+ (cplus_mangle_opname): Likewise.
+ (demangle_integral_value): Cast argument of ctype macro to
+ `unsigned char'.
+ (demangle_template_value_parm): Likewise.
+ (demangle_template): Initialize variable `bindex'. Cast the
+ result of `strlen' to (int) when comparing against one. Remove
+ unused variable `start_of_value_parm'.
+ (demangle_class_name): Cast the result of `strlen' to (int) when
+ comparing against one.
+ (demangle_prefix): Cast argument of ctype macro to `unsigned char'.
+ (gnu_special): Likewise. Cast the result of `strlen' to (int)
+ when comparing against one.
+ (demangle_qualified): Cast argument of ctype macro to `unsigned char'.
+ (get_count): Likewise.
+ (do_type): Likewise. Cast the result of `strlen' to (int) when
+ comparing against one.
+ (demangle_fund_type): Cast argument of ctype macro to `unsigned char'.
+ (demangle_function_name): Cast the result of `strlen' to (int)
+ when comparing against one.
+
+ * mkstemp.c (mkstemps): Cast variable `len' to (int) when
+ comparing against one.
+
+Tue Oct 13 23:51:51 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
+ * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too.
+ * config.in, configure: Rebuilt.
+
+ * getopt.c: Check HAVE_STRINGS_H before including strings.h.
+ * configure.in (AC_CHECK_HEADERS): Check for strings.h too.
+ * config.in, configure: Rebuilt.
+
+Mon Oct 12 19:15:59 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: in comment, call AC_EXEEXT instead of AM_EXEEXT
+
+Sun Oct 11 17:36:06 1998 Michael Tiemann <tiemann@holodeck.cygnus.com>
+
+ * Makefile.in (cplus-dem.o, obstack.o): Depend upon config.h.
+
+Thu Oct 8 23:42:08 1998 Jeffrey A Law (law@cygnus.com)
+
+ * Merge egcs & devo libiberty.
+
+1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
+
+ * cplus-dem.c (demangle_arm_pt): Demangle anonymous namespaces.
+
+Mon Sep 7 23:29:01 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * mkstemp.c: Include config.h even when not IN_GCC. Wrap header
+ inclusions inside HAVE_*_H macros. Include ansidecl.h when not
+ IN_GCC.
+
+ * vasprintf.c: Include stdarg.h/varargs.h first.
+
+ * vprintf.c: Likewise.
+
+Sat Sep 5 03:24:49 1998 Jeffrey A Law (law@cygnus.com)
+
+ * pexecute.c: Updates from gcc. Copy in gcc has been removed. This
+ is the canonical copy. Define ISSPACE if !IN_GCC.
+ * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c, getopt.c: Similarly.
+ * getopt1.c, obstack.c: Similarly.
+ * Makefile.in: Build mkstemp.o
+
+Tue Sep 1 23:12:47 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Include asprintf in list of functions known not
+ to be in newlib.
+ * configure: Rebuild.
+
+Wed Aug 19 14:05:01 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * cplus-dem.c (work_stuff): Add dllimported.
+ (demangled_prefix): Mark symbols imported from PE DLL.
+ (internal_cplus_demangled): Handle.
+
+1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
+
+ * cplus-dem.c (do_type): Fix simple array handling. If we fail,
+ stay failed.
+
+Mon Aug 17 10:40:34 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cplus-dem.c: Include config.h if it exists. Also, only
+ prototype malloc/realloc if we can't get stdlib.h.
+
+Sat Aug 15 16:15:01 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Switch back to checking --with-target-subdir when
+ deciding whether to check for newlib, undoing part of July 15
+ change.
+ * configure: Rebuild.
+
+Thu Aug 13 16:47:38 1998 Mark Mitchell <mark@markmitchell.com>
+
+ * cplus-dem.c (type_kind_t): New type.
+ (demangle_template_value_parm): Add type_kind_t parameter. Rely
+ on this paramter, rather than demangling the type again.
+ (demangle_integral_value): Pass tk_integral.
+ (demangle_template_: Pass the value returned from do_type.
+ (do_type): Return a type_kind_t. Pass tk_integral to
+ demangle_template_value_parm for array bounds.
+ (demangle_fund_type): Likewise.
+
+ Also incorporate from GCC version:
+
+ Tue Jul 21 13:28:19 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays.
+
+Thu Aug 13 16:47:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cplus-dem.c (demangle_nested_args): Make function definition
+ static to match the prototype.
+
+Tue Jul 28 11:33:09 1998 Mark Mitchell <mark@markmitchell.com>
+
+ * cplus-dem.c (type_kind_t): New type.
+ (demangle_template_value_parm): Add type_kind_t parameter. Rely
+ on this paramter, rather than demangling the type again.
+ (demangle_integral_value): Pass tk_integral.
+ (demangle_template_: Pass the value returned from do_type.
+ (do_type): Return a type_kind_t. Pass tk_integral to
+ demangle_template_value_parm for array bounds.
+ (demangle_fund_type): Likewise.
+
+ Also incorporate from GCC version:
+
+ Tue Jul 21 13:28:19 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays.
+
+Mon Jul 27 12:16:08 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (ALLOCA): New variable.
+ ($(TARGETLIB)): Add $(ALLOCA) to library.
+ (needed-list): Add $(ALLOCA).
+ ($(ALLOCA)): Depend upon stamp-picdir.
+
+Sun Jul 19 08:23:17 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cplus-dem.c (demangle_nested_args): Make function definition
+ static to match the prototype.
+
+Wed Jul 15 00:12:58 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Check --with-cross-host rather than
+ --with-target-subdir when deciding whether build uses a cross
+ compiler, and when deciding where to install the library.
+ * configure: Rebuild.
+
+Sun Jul 12 01:27:05 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * cplus-dem.c (demangle_nested_args): Return a value.
+
+Sat Jul 11 16:19:48 1998 Mark Mitchell <mark@markmitchell.com>
+
+ * cplus-dem.c (string): Move definition before work_stuff.
+ (work_stuff): Add volatile_type, forgetting_types,
+ previous_argument, and nrepeats fields.
+ (SCOPE_STRING): New macro.
+ (demangle_template): Add `remember' parameter. Add comment.
+ Register the `B' code type here, if remembering. Tidy. Fix crash
+ on NULL tmpl_argvec. Be consistent with use of tname/trawname.
+ (demangle_nested_args): New function.
+ (internal_cplus_demangle): Handle volatile-qualified member
+ functions.
+ (mop_up): Delete the previous_argument string if present.
+ (demangle_signature): Tidy. Handle volatile-qualified member
+ functions. Handle back-references using the `B' code. Use extra
+ parameter to demangle_template and SCOPE_STRING where appropriate.
+ (demangle_template_value_parm): Fix thinko; 'B' is not an integral
+ code.
+ (demangle_class): Use SCOPE_STRING.
+ (gnu_special): Pass additional argument to demangle_template.
+ Use SCOPE_STRING.
+ (demangle_qualified): Save qualified types for later
+ back-references. Handle constructors and destructors for template
+ types correctly.
+ (do_type): Tidy. Use SCOPE_STRING. Pass extra argument to
+ demangle_template. Use demangled_nested_args. Don't remember
+ qualified types here; that's now done in demangle_qualified.
+ Similarly for templates.
+ (do_arg): Improve commment. Handle 'n' repeat code.
+ (remember_type): Check forgetting_types.
+ (demangle_args): Deal with 'n' repeat codes. Tidy.
+
+Thu Jul 2 16:26:24 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.table: Only use mh-fbsd21 on *-*-freebsd2.2.[012], not on
+ *-*-freebsd2.2.*. From Dmitrij Tejblum <tejblum@arc.hq.cti.ru>.
+
+Mon Jun 15 16:29:01 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in (setobjs): Correct quoting error in cygwin32 case.
+ From Chris Faylor <cgf@cygnus.com>.
+
+Mon Jun 1 13:47:55 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * obstack.c: Update to latest FSF version.
+
+Mon Jun 1 14:17:36 1998 Mike Stump <mrs@wrs.com>
+
+ * Makefile.in: Add a dependency on stamp-picdir for the
+ objects, so that we can do a parallel build.
+
+Sat May 30 22:17:13 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * configure.in (checkfuncs): Add missing "'".
+
+Fri May 29 12:40:41 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * obstack.c (_obstack_memory_used): Elide this function if we're
+ on a system with GNU libc.
+
+Tue May 26 18:28:43 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (distclean): Remove config.log.
+
+Tue May 26 15:01:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Makefile.in (distclean): Don't remove alloca-conf.h.
+
+Fri May 22 01:38:07 1998 Hans-Peter Nilsson <hp@axis.se>
+
+ * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.
+
+1998-05-21 Mark Mitchell <mmitchell@usa.net>
+
+ * cplus-dem.c (do_type): Handle volatile qualification.
+
+1998-05-21 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure.in: Check for unistd.h as well.
+ * configure: Rebuild.
+ * config.in: Rebuild.
+ * getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
+ is defined in unistd.h. Reformat conditional block for easier reading.
+
+ * config.table (shared): Default to no if ${enable_shared}
+ is unset or empty; this logic is used by the toplevel
+ configure scripts, too.
+
+Sat May 16 14:01:26 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.table: Add line to set enable_shared in the Makefile
+ as needed.
+
+Wed May 13 14:24:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cplus-dem.c (squangle_mop_up): Change return type to void.
+ (internal_cplus_demangle): Remove unused parameter `options'.
+ All callers changed.
+ (cplus_demangle_opname): Remove function wide variable `int i' and
+ replace with `size_t i' at each location where it is used.
+ (cplus_mangle_opname): change type of `i' from int to size_t.
+
+Wed May 13 13:39:38 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * alloca-conf.h: Include config.h. Check HAVE_ALLOCA_H rather
+ than sparc or sun.
+ * Makefile.in (argv.o): Depend upon config.h and alloca-conf.h.
+
+Fri May 8 00:23:51 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set libiberty_topdir correctly when srcdir is
+ "." and with_target_subdir is not set.
+ * configure: Rebuild.
+
+Thu May 7 13:01:44 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add *-*-mingw32* case.
+ * configure: Rebuild.
+
+Wed May 6 11:33:51 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.table: Never use a PIC file for *-*-cygwin32*.
+
+ * Makefile.in (config.status): Depend upon config.table.
+
+ * configure.in: On a cygwin32 host, always compile random, and
+ don't test for sys_siglist, strsignal, or psignal.
+ * configure: Rebuild.
+
+ * clock.c: Check HAVE_SYS_PARAM_H rather than NO_SYS_PARAM_H.
+ * getcwd.c: Likewise.
+ * getpagesize.c: Likewise.
+ * getruntime.c: Likewise.
+
+Tue May 5 18:08:32 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ Use autoconf tests rather than the old dummy.c test:
+ * configure.in: Add AC_ARG_WITH calls for --with-target-subdir and
+ --with-newlib. Add AC_CONFIG_HEADER. Use AC_REPLACE_FUNCS for
+ most functions. Add special cases to handle newlib and VxWorks.
+ Remove target_makefile_frag. Create stamp-h in AC_OUTPUT if
+ CONFIG_HEADERS is set. Only call config-ml.in in AC_OUTPUT if
+ CONFIG_FILES is set; set ac_file before calling it.
+ * config.table (arm-*-riscix*, *-*-cygwin32): Remove.
+ (*-*-hpux*, *-*-hiux*, *-*-irix4*, *-*-solaris2*): Remove.
+ (*-*-sysv4*, *-*-go32, *-*-vxworks5*, *-*-vxworks): Remove
+ (i[3456]-*-mingw32*): Remove.
+ * Makefile.in (ERRORS_CC, CONFIG_H, NEEDED_LIST): Remove.
+ (LIBOBJS): New variable.
+ (HOST_OFILES, DO_ALSO, STAGESTUFF): Remove.
+ (all): Depend upon needed-list. Don't check RULE1.
+ (@target_makefile_frag@): Remove.
+ (COMPILE.c): Include @DEFS@.
+ (HFILES): Add alloca-conf.h.
+ (REQUIRED_OFILES): Remove basename.o.
+ ($(TARGETLIB)): New target.
+ (stamp-needed, lneeded-list, needed.awk, stamp-config): Remove.
+ (lconfig.h, needed2.awk, dummy.o, errors): Remove.
+ (needed-list, config.h): Rewrite.
+ (RULE1, $(RULE1), RULE2, $(RULE2)): Remove.
+ (.always.): Remove.
+ (Makefile): Set CONFIG_FILES and CONFIG_HEADERS.
+ (stamp-h): New target.
+ (atexit.o, clock.o, getcwd.o, getpagesize.o): New targets.
+ (basename.o): Don't depend upon config.h.
+ (getruntime.o): Depend upon config.h.
+ * atexit.c: Include config.h. Check HAVE_ON_EXIT rather than
+ NEED_on_exit.
+ * basename.c: Don't include config.h. Don't check NEED_basename.
+ * clock.c: Include config.h.
+ * getcwd.c: Likewise.
+ * getpagesize.c: Likewise.
+ * getruntime.c: Likewise. Fix checks which set HAVE_GETRUSAGE and
+ HAVE_TIMES.
+ * strerror.c: Change uses of NEED_sys_errlist to
+ HAVE_SYS_ERRLIST. Likewise for NEED_strerror and HAVE_STRERROR.
+ * strsignal.c: Likewise for NEED_sys_siglist and HAVE_SYS_SIGLIST,
+ and for NEED_strsignal and HAVE_STRSIGNAL and for NEED_psignal and
+ HAVE_PSIGNAL.
+ * acconfig.h: New file.
+ * dummy.c: Remove.
+ * functions.def: Remove.
+ * config/mh-cxux7 (HDEFINES): Remove -DHAVE_SYSCONF.
+ * config/mh-windows (HDEFINES): Remove.
+ * config/mh-cygwin32: Remove.
+ * config/mh-go32: Remove.
+ * config/mh-irix4: Remove.
+ * config/mh-riscix: Remove.
+ * config/mh-sysv4: Remove.
+ * config/mt-mingw32: Remove.
+ * config/mt-vxworks5: Remove.
+ * config.in: New file, generated using autoheader.
+ * configure: Rebuild.
+
+Mon May 4 13:00:28 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Rewrite to use autoconf.
+ * configure: Generate using autoconf.
+ * config/mh-a68bsd: Remove.
+ * config/mh-apollo68: Remove.
+ * config/mh-hpbsd: Remove.
+ * config/mh-ncr3000: Remove.
+ * config/mh-sysv: Remove.
+ * config/mh-aix (RANLIB, INSTALL): Don't define.
+ * config/mh-cxux7 (RANLIB, INSTALL): Don't define.
+ * config/mh-irix4 (CC, RANLIB, INSTALL): Don't define.
+ * config/mh-sysv4 (RANLIB, INSTALL): Don't define.
+ * config.table: Change config_shell to CONFIG_SHELL, and use
+ libiberty_topdir to find move-if-change.
+ (m68k-apollo-bsd*, m68k-apollo-sysv*): Remove.
+ (i[3456]86-ncr-sysv4*, *-*-dgux*, hppa*-hp-bsd*): Remove.
+ (*-*-irix*, *-*-m88kbcs*, *-*-sysv*): Remove.
+ * Makefile.in (srcdir): Set to @srcdir@.
+ (VPATH): Likewise.
+ (prefix, exec_prefix, bindir, libdir): Set to autoconf variables.
+ (SHELL, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Likewise.
+ (CC, CFLAGS, RANLIB)): Likewise.
+ (datadir, man*dir, infodir, includedir, MAKEINFO): Remove.
+ (target_makefile_frag, host_makefile_frag): Add substitutions.
+ (INSTALL_DEST): Set to @INSTALL_DEST@.
+ (Makefile): Depend upon config.status. Don't depend upon
+ $(host_makefile_frag) or $(target_makefile_frag).
+ (config.status): New target.
+
+Sun May 3 17:58:49 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/mt-sunos4: Remove. Should be handled by --with-headers
+ and --with-libraries options at top level.
+ * config.table: Never use mt-sunos4.
+
+ * alloca-conf.h: New file, combining alloca-norm.h and
+ alloca-botch.h.
+ * alloca-norm.h: Remove.
+ * alloca-botch.h: Remove.
+ * configure.in: Set shell variables files and links to empty.
+ * config.table: Don't set shell variable files.
+ * configure.bat: Don't create alloca-conf.h.
+ * makefile.vms: Likewise.
+ * mpw-config.in: Likewise.
+ * vmsbuild.com: Likewise.
+
+Fri May 1 11:41:42 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in ($(HOST_OFILES) $(REQUIRED_OFILES)): Remove old
+ target depending upon config.h.
+ (alloca.o): Add target depending upon config.h
+ (basename.o, choose-temp.o, fnmatch.o): Likewise.
+ (getopt.o, getopt1.o, pexecute.o, strerror.o): Likewise.
+ (strsignal.o, xstrerror.o): Likewise.
+
+Fri May 1 04:26:25 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ * cplus-dem.c (cplus_demangle_opname): Initialize work.
+
+Mon Apr 27 15:53:30 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
+
+ * cplus-dem.c (demangle_qualified): Replace missing else.
+
+Sun Apr 26 15:38:50 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * cplus-dem.c (gnu_special): Fix off-by-one bug when checking the
+ length in the name of a virtual table.
+
+Wed Apr 22 10:53:49 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
+
+ * cplus-dem.c (struct work stuff): Add field for B and K mangle codes.
+ (cplus_demangle_opname): Call mop_up_squangle.
+ (cplus_demangle): Initialize squangle info, then call
+ internal_cplus_demangle. (Most code moved there as well)
+ (internal_cplus_demangle): New function, performs most of what use
+ to be done in cplus_demangle, but is only called with this file.
+ (squangle_mop_up): New function to clean up B and K code data.
+ (mop_up): set pointers to NULL after freeing.
+ (demangle_signature, demangle_template, demangle_class): Add
+ switch elements to handle K and B codes.
+ (demangle_prefix, gnu_special, demangle_qualified): Add
+ code to handle K and B codes.
+ (do_type, demangle_fund_type): Handle B and K codes.
+ (remember_Ktype): New function to store K info.
+ (register_Btype, remember_Btype): New functions for B codes.
+ (forget_B_and_K_types): New function to destroy B and K info.
+
+Fri Apr 10 01:49:10 1998 Jeffrey A Law (law@cygnus.com)
+
+ * COPYING.LIB, choose-temp.c, cplus-dem.c: Sync with egcs & gcc.
+
+Thu Mar 5 09:23:28 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * config.table: Make locating frag files failsafe even for the
+ special case if configuring and building in srcdir.
+
Mon Feb 23 14:33:15 1998 Ian Lance Taylor <ian@cygnus.com>
* choose-temp.c: Fix handling of sys/file.h to work in libiberty.
@@ -16,10 +1239,16 @@ Tue Feb 10 16:58:33 1998 Stan Shebs <shebs@andros.cygnus.com>
* cplus-dem.c (gnu_special): Don't get confused by .<digits>
strings that are not actually lengths.
+Fri Feb 6 01:35:17 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * Makefile.in (FLAGS_TO_PASS): Don't pass PICFLAG.
+ (.c.o): Check value of enable_shared, not PICFLAG.
+ (stamp-picdir): Dito.
+
Thu Feb 5 18:48:56 1998 Geoffrey Noer <noer@cygnus.com>
- * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
- since it gets built automatically
+ * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
+ since it gets built automatically
Sun Feb 1 02:52:32 1998 Mike Stump <mrs@wrs.com>
@@ -42,7 +1271,7 @@ Sun Jan 18 15:57:28 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* vasprintf.c (int_vasprintf): Increase buffer size for float/double
values.
-Sat Jan 17 22:28:38 1997 Mumit Khan <khan@xraylith.wisc.edu>
+Sat Jan 17 22:28:38 1998 Mumit Khan <khan@xraylith.wisc.edu>
J.J. VanderHeijden <J.J.vanderHeijden@student.utwente.nl>
Add mingw32 support.
@@ -104,24 +1333,24 @@ Mon Sep 29 12:28:41 1997 Ian Lance Taylor <ian@cygnus.com>
Mon Sep 29 12:27:59 1997 Ian Lance Taylor <ian@cygnus.com>
- * pexecute.c: Use spawn if __CYGWIN32__.
+ * pexecute.c: Use spawn if __CYGWIN32__.
1997-08-08 Paul Eggert <eggert@twinsun.com>
- * pexecute.c: Include "config.h" first, as per autoconf manual.
+ * pexecute.c: Include "config.h" first, as per autoconf manual.
Fri Jun 27 15:20:29 1997 Scott Christley <scottc@net-community.com>
- * pexecute.c (fix_argv): New function.
- (pexecute): Win32 but not Cygwin32 needs its arguments fixed.
- Add underscore to cwait function call.
+ * pexecute.c (fix_argv): New function.
+ (pexecute): Win32 but not Cygwin32 needs its arguments fixed.
+ Add underscore to cwait function call.
Sun Sep 28 12:00:52 1997 Mark Mitchell <mmitchell@usa.net>
- * cplus-dem.c (demangle_template): Add new parameter. Handle new
- template-function mangling.
- (consume_count_with_underscores): New function.
- (demangle_signature): Handle new name-mangling scheme.
+ * cplus-dem.c (demangle_template): Add new parameter. Handle new
+ template-function mangling.
+ (consume_count_with_underscores): New function.
+ (demangle_signature): Handle new name-mangling scheme.
Wed Sep 24 00:31:59 1997 Felix Lee <flee@yin.cygnus.com>
@@ -161,10 +1390,10 @@ Tue Aug 19 17:10:56 1997 Jason Merrill <jason@yorick.cygnus.com>
Wed Jul 30 11:42:19 1997 Per Bothner <bothner@cygnus.com>
- * cplus-dem.c: Various changes to produce Java output when passed
+ * cplus-dem.c: Various changes to produce Java output when passed
DMGL_JAVA. Thus "::" becomes "." and "JArray<Foo>" becomes "Foo[]".
- (main): Support --java and -j flags to set DMGL_JAVA.
-
+ (main): Support --java and -j flags to set DMGL_JAVA.
+
Tue Jul 22 19:05:23 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* config/mh-go32 (CC, AR, RANLIB): Don't define.
@@ -219,7 +1448,7 @@ Wed Apr 30 12:15:45 1997 Jason Merrill <jason@yorick.cygnus.com>
Mon Apr 28 19:04:31 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
- * obstack.c: move _obstack_memory_used outside of ifdef. Cannot be
+ * obstack.c: move _obstack_memory_used outside of ifdef. Cannot be
elided; needed by gdb and not present in libc.
Thu Apr 24 19:33:47 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -228,7 +1457,7 @@ Thu Apr 24 19:33:47 1997 Ian Lance Taylor <ian@cygnus.com>
Tue Apr 22 10:25:15 1997 Fred Fish <fnf@cygnus.com>
- * floatformat.c (floatformat_ieee_double_littlebyte_bigword):
+ * floatformat.c (floatformat_ieee_double_littlebyte_bigword):
Add new floatformat, mainly for ARM doubles.
Mon Apr 14 12:11:16 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -285,7 +1514,7 @@ Sat Mar 15 18:49:41 1997 Ian Lance Taylor <ian@cygnus.com>
Fri Mar 14 14:18:47 1997 Ian Lance Taylor <ian@cygnus.com>
- * cplus-dem.c: Add prototypes for all static functions.
+ * cplus-dem.c: Add prototypes for all static functions.
(mystrstr): Make static. Make arguments and result const.
(cplus_match): Remove; not used.
@@ -356,13 +1585,13 @@ Mon Nov 18 14:08:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
Wed Nov 13 08:22:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
- * cplus-dem.c: Revert last two commits due to conflicts with
- hpux system headers.
+ * cplus-dem.c: Revert last two commits due to conflicts with
+ hpux system headers.
Wed Nov 13 08:22:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
* alloca.c, argv.c, spaces.c, strcasecmp.c, vasprintf.c, vprintf.c:
- Revert last commit due to conflicts with hpux system headers.
+ Revert last commit due to conflicts with hpux system headers.
Wed Nov 13 10:36:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
@@ -371,16 +1600,16 @@ Wed Nov 13 10:36:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
Tue Nov 12 16:31:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
- * alloca.c: Include libiberty.h for definition of xmalloc.
+ * alloca.c: Include libiberty.h for definition of xmalloc.
Don't redefine NULL.
* argv.c: Move prototypes to libiberty.h.
- * cplus-dem.c: Include libiberty.h for definition of xmalloc.
+ * cplus-dem.c: Include libiberty.h for definition of xmalloc.
Don't redefine NULL.
Use casts to eliminate compiler warnings.
- * spaces.c: Remove prototypes for malloc and free which are
+ * spaces.c: Remove prototypes for malloc and free which are
already in libibrty.h.
* strcasecmp.c: Use casts to eliminate compiler warnings.
- * vasprintf.c: Include libiberty.h for definition of malloc.
+ * vasprintf.c: Include libiberty.h for definition of malloc.
Don't redefine NULL.
* vprintf.c: Include stdarg.h if __STDC__.
@@ -499,7 +1728,7 @@ Tue Jun 25 23:01:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
Tue Jun 25 22:50:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
- * Makefile.in (datadir): Set to $(prefix)/share.
+ * Makefile.in (datadir): Set to $(prefix)/share.
Thu Jun 20 21:17:52 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -545,7 +1774,7 @@ Wed Apr 17 11:17:55 1996 Doug Evans <dje@canuck.cygnus.com>
Tue Apr 16 11:27:16 1996 Jeffrey A Law (law@cygnus.com)
- * Makefile.in (lneeded-list): If alloca.o is needed, so is xmalloc.o.
+ * Makefile.in (lneeded-list): If alloca.o is needed, so is xmalloc.o.
Reverts Feb 8, 1995 change.
Mon Apr 15 12:53:26 1996 Doug Evans <dje@canuck.cygnus.com>
@@ -591,7 +1820,7 @@ Tue Feb 27 12:00:50 1996 Raymond Jou <rjou@mexican.cygnus.com>
* mpw.c (mpwify_filename): Change 6 to 5 in
strncmp (unixname, "/tmp/", 5).
-
+
Tue Feb 20 10:55:53 1996 Ian Lance Taylor <ian@cygnus.com>
* cplus-dem.c (demangle_template): Initialize is_bool. Correctly
@@ -799,7 +2028,7 @@ Wed Jun 28 19:13:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* cplus-dem.c: Update from gcc.
* argv.c, dummy.c: If __STDC__, #include "alloca-conf.h" after
- <stddef.h>.
+ <stddef.h>.
* alloca-norm.h: If __STDC__, declare alloca with its parameter.
Thu Jun 22 18:57:47 1995 Stan Shebs <shebs@andros.cygnus.com>
@@ -892,17 +2121,17 @@ Mon May 15 19:53:17 1995 Per Bothner <bothner@kalessin.cygnus.com>
Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* cplus-dem.c: Use const instead of CONST. Don't include
- ansidecl.h directly.
+ ansidecl.h directly.
Wed Apr 19 01:30:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* cplus-dem.c: Don't include libiberty.h. Do declare xmalloc and
- xrealloc.
+ xrealloc.
(-DMAIN): Don't rely on an externally-defined version number;
- instead, require the version number to be defined as a
- preprocessor macro. Handle the RS/6000 leading dot. Define
- xmalloc, xrealloc and fatal. Don't strip a leading underscore
- if we couldn't demangle the word.
+ instead, require the version number to be defined as a
+ preprocessor macro. Handle the RS/6000 leading dot. Define
+ xmalloc, xrealloc and fatal. Don't strip a leading underscore
+ if we couldn't demangle the word.
Tue Apr 4 13:03:51 1995 Stan Shebs <shebs@andros.cygnus.com>
@@ -1076,7 +2305,7 @@ Fri Aug 19 15:29:12 1994 Kung Hsu (kung@mexican.cygnus.com)
Thu Aug 18 14:37:14 1994 Kung Hsu (kung@mexican.cygnus.com)
* cplus-dem.c (demangle args): Handle ARM repeat encoding where
- the type index is greater than 9.
+ the type index is greater than 9.
Wed Aug 17 16:13:49 1994 Kung Hsu (kung@mexican.cygnus.com)
@@ -1091,9 +2320,9 @@ Wed Aug 3 05:52:14 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
newlib; includes and such don't belong to us). This is specific
to the Cygnus Support environment.
-Tue Aug 2 15:25:12 1994 Kung Hsu (kung@mexican.cygnus.com)
+Tue Aug 2 15:25:12 1994 Kung Hsu (kung@mexican.cygnus.com)
- * cplus-dem.c (demangle_template): demangle as xxx<'Q'> not
+ * cplus-dem.c (demangle_template): demangle as xxx<'Q'> not
xxx<ch=81>.
Mon Aug 1 17:02:48 1994 Kung Hsu (kung@mexican.cygnus.com)
@@ -1138,7 +2367,7 @@ Thu Jun 16 17:54:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Sun Jun 12 01:37:09 1994 Jason Merrill (jason@deneb.cygnus.com)
* cplus-dem.c (demangle_template): Separate consecutive >'s with a
- space.
+ space.
(gnu_special): Demangle template and qualified names in a vtable name.
Fri May 27 12:27:52 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
@@ -1173,7 +2402,7 @@ Fri May 13 16:20:28 1994 Jason Merrill (jason@deneb.cygnus.com)
Fri May 6 14:44:21 1994 Steve Chamberlain (sac@cygnus.com)
- * config.table: Add go32
+ * config.table: Add go32
* config/mh-go32: New template.
Fri May 6 11:01:59 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
@@ -1182,13 +2411,13 @@ Fri May 6 11:01:59 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
Mon Apr 11 00:54:33 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
- * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]:
- Declare strlen to return int. Don't include stddef.h.
+ * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]:
+ Declare strlen to return int. Don't include stddef.h.
Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
- * getopt.c: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
+ * getopt.c: Delete use of IN_GCC to control whether
+ stddef.h or gstddef.h is included.
Thu Apr 14 14:00:56 1994 Kung Hsu (kung@mexican.cygnus.com)
@@ -1252,8 +2481,8 @@ Sun Feb 27 21:50:11 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
Thu Feb 24 11:51:12 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* getopt.c: Remove #ifdef GETOPT_COMPAT and #if 0 code.
- (_getopt_initialize): New function, broken out of _getopt_internal.
- (_getopt_internal):
+ (_getopt_initialize): New function, broken out of _getopt_internal.
+ (_getopt_internal):
If long_only and the ARGV-element has the form "-f", where f is
a valid short option, don't consider it an abbreviated form of
a long option that starts with f. Otherwise there would be no
@@ -1261,27 +2490,27 @@ Thu Feb 24 11:51:12 1994 David J. Mackenzie (djm@rtl.cygnus.com)
Thu Feb 10 14:44:16 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
- * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]:
- Test just __STDC__, not emacs.
+ * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]:
+ Test just __STDC__, not emacs.
Wed Feb 9 00:14:00 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
- * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]
- [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen.
+ * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]
+ [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen.
Fri Dec 24 19:43:00 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu)
- * getopt.c (_NO_PROTO): Define before config.h is included.
+ * getopt.c (_NO_PROTO): Define before config.h is included.
Mon Sep 20 15:59:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
- * getopt.c, getopt1.c [emacs || CONFIG_BROKETS]: Include
+ * getopt.c, getopt1.c [emacs || CONFIG_BROKETS]: Include
<config.h> only under these, else "config.h".
Thu Aug 12 18:16:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
- * getopt.c, getopt1.c [HAVE_CONFIG_H]: Include
- <config.h> instead of "config.h".
+ * getopt.c, getopt1.c [HAVE_CONFIG_H]: Include
+ <config.h> instead of "config.h".
Sun Feb 20 17:17:01 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
@@ -1585,7 +2814,7 @@ Fri Aug 6 17:03:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* obstack.c, alloca.c: Update from FSF.
* getopt.c, getopt1.c: Update to current FSF version, which
- doesn't use alloca.
+ doesn't use alloca.
Tue Jul 27 14:03:57 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
@@ -1657,7 +2886,7 @@ Fri May 21 09:53:57 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
Tue May 18 17:12:10 1993 Fred Fish (fnf@cygnus.com)
- (merge changes from dlong@cse.ucsc.edu)
+ (merge changes from dlong@cse.ucsc.edu)
* cplus-dem.c (consume_count): Simplify.
* cplus-dem.c (arm_pt, demangle_class_name): New functions.
* cplus-dem.c (various): Calls to arm_pt, demangle_class_name.
@@ -2228,7 +3457,7 @@ Wed Dec 11 17:40:39 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* msdos.c: stub functions for dos.
* makefile.dos, configdj.bat: new.
* getopt.c: Don't include alloca-conf.h in a GO32 world.
-
+
Tue Dec 10 04:14:49 1991 K. Richard Pixley (rich at rtl.cygnus.com)
diff --git a/contrib/binutils/libiberty/Makefile.in b/contrib/binutils/libiberty/Makefile.in
index 58fabd5..9aa57f0 100644
--- a/contrib/binutils/libiberty/Makefile.in
+++ b/contrib/binutils/libiberty/Makefile.in
@@ -1,6 +1,7 @@
#
# Makefile
-# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
+# Copyright (C) 1990, 91 - 99, 2000
+# Free Software Foundation
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
@@ -19,37 +20,22 @@
# Boston, MA 02111-1307, USA.
#
-# This file was written, and is maintained by K. Richard Pixley
-# <rich@cygnus.com>.
+# This file was written by K. Richard Pixley <rich@cygnus.com>.
#
# Makefile for libiberty directory
#
-srcdir = .
+srcdir = @srcdir@
+VPATH = @srcdir@
-prefix = /usr/local
+prefix = @prefix@
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
-datadir = $(prefix)/share
-
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-infodir = $(prefix)/info
-includedir = $(prefix)/include
-
-SHELL = /bin/sh
+SHELL = @SHELL@
# Multilib support variables.
MULTISRCTOP =
@@ -59,19 +45,17 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-INSTALL = $(SHELL) $(srcdir)/../install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
-AR = ar
+AR = @AR@
AR_FLAGS = rc
-ERRORS_CC = $(CC)
-CC = cc
-CFLAGS = -g
+CC = @CC@
+CFLAGS = @CFLAGS@
LIBCFLAGS = $(CFLAGS)
-MAKEINFO = makeinfo
-RANLIB = ranlib
+RANLIB = @RANLIB@
PICFLAG =
@@ -79,19 +63,8 @@ MAKEOVERRIDES =
TARGETLIB = libiberty.a
-CONFIG_H = lconfig.h
-NEEDED_LIST = lneeded-list
-
-# HOST_OFILES contains the list of objects that should be in the
-# library (in addition to the REQUIRED_OFILES and EXTRA_OFILES).
-# A configuration may override this with a fixed list a object files
-# names (hard to maintain), or some other way to generate a list.
-HOST_OFILES=`cat needed-list`
-
-# Extra targets that the top-level target depends on.
-# Specifically, what needs to be made before HOST_OFILES can be used.
-# Can be empty if HOST_OFILES is just a list of file names.
-DO_ALSO = needed-list
+LIBOBJS = @LIBOBJS@
+ALLOCA = @ALLOCA@
# A configuration can specify extra .o files that should be included,
# even if they are in libc. (Perhaps the libc version is buggy.)
@@ -111,174 +84,115 @@ FLAGS_TO_PASS = \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"LDFLAGS=$(LDFLAGS)" \
"LOADLIBES=$(LOADLIBES)" \
- "PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
- "SHELL=$(SHELL)"
+ "SHELL=$(SHELL)" \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "libdir=$(libdir)" \
+ "libsubdir=$(libsubdir)" \
+ "tooldir=$(tooldir)"
-all: stamp-picdir $(TARGETLIB) required-list
- @if [ "$(RULE1)" != "not-used" ]; then \
- $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all; \
- else true; \
- fi
+# Subdirectories to recurse into. We need to override this during cleaning
+SUBDIRS = testsuite
-.PHONY: check installcheck
-check installcheck:
+all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
+ @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
+.PHONY: check installcheck
+check: check-subdir
+installcheck: installcheck-subdir
-#### Host, target, and site specific Makefile fragments come in here.
-###
+@host_makefile_frag@
INCDIR=$(srcdir)/$(MULTISRCTOP)../include
-COMPILE.c = $(CC) -c $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
+COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
.c.o:
- test -z "$(PICFLAG)" || \
+ test x"$(enable_shared)" != xyes || \
$(COMPILE.c) $(PICFLAG) $< -o pic/$@
$(COMPILE.c) $<
-# The default target just invokes make recursively.
-# However, the automatic configuration (in config/mh_default).
-# first causes it to figure out the objects missing in libc.
-info install-info clean-info dvi:
+info: info-subdir
+install-info: install-info-subdir
+clean-info: clean-info-subdir
+dvi: dvi-subdir
# Include files that are in this directory.
-HFILES =
+HFILES = alloca-conf.h
# NOTE: If you add new files to the library, add them to this list
-# (alphabetical), and add them to REQUIRED_OFILES or 'functions.def'.
-CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c bzero.c \
- choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c fnmatch.c \
- getcwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
- floatformat.c hex.c index.c insque.c \
- memchr.c memcmp.c memcpy.c memmove.c memset.c objalloc.c \
- obstack.c pexecute.c random.c rename.c rindex.c sigsetmask.c spaces.c \
- strcasecmp.c strncasecmp.c \
- strchr.c strdup.c strerror.c strrchr.c strsignal.c \
- strstr.c strtod.c strtol.c strtoul.c tmpnam.c \
- vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \
- xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c
-# These are always included in the library.
-REQUIRED_OFILES = argv.o basename.o choose-temp.o concat.o cplus-dem.o \
- fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o \
- floatformat.o objalloc.o obstack.o pexecute.o spaces.o strerror.o \
- strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o
-
-# Do we want/need any config overrides?
-#
+# (alphabetical), and add them to REQUIRED_OFILES or funcs in
+# configure.in.
+CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
+ bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \
+ fnmatch.c getcwd.c getpwd.c getopt.c getopt1.c getpagesize.c \
+ getruntime.c floatformat.c hashtab.c hex.c index.c insque.c memchr.c \
+ memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \
+ partition.c pexecute.c putenv.c random.c rename.c rindex.c \
+ setenv.c sigsetmask.c spaces.c splay-tree.c strcasecmp.c \
+ strncasecmp.c strchr.c strdup.c strerror.c strrchr.c \
+ strsignal.c strstr.c strtod.c strtol.c strtoul.c tmpnam.c \
+ vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \
+ xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
-STAGESTUFF = $(TARGETLIB) *.o
+# These are always included in the library.
+REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \
+ fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o \
+ hex.o floatformat.o objalloc.o obstack.o partition.o pexecute.o spaces.o \
+ splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
+ xmemdup.o xstrdup.o xstrerror.o
+
+$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
+ rm -f $(TARGETLIB)
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
+ $(RANLIB) $(TARGETLIB)
-INSTALL_DEST = libdir
-install: install_to_$(INSTALL_DEST)
+INSTALL_DEST = @INSTALL_DEST@
+install: install_to_$(INSTALL_DEST) install-subdir
install_to_libdir: all
- $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n
- ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
- mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
+ $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
+ ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
install_to_tooldir: all
- $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n
- ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
- mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
+ ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-# The default configuration adds to libiberty all those functions that are
-# missing in libc. More precisely, it includes whatever $(CC) fails to find.
-# Then a sed+awk combination translates the ld error messages into
-# a list of .o files.
-
-stamp-needed: stamp-picdir $(NEEDED_LIST)
- cp $(NEEDED_LIST) needed-tmp
- $(SHELL) $(srcdir)/$(MULTISRCTOP)../move-if-change needed-tmp needed-list
- touch stamp-needed
-
-needed-list: stamp-needed ; @true
-
-lneeded-list: $(EXTRA_OFILES) needed.awk errors
- rm -f lneeded-list
- f=""; \
- for i in `awk -f needed.awk <errors` $(EXTRA_OFILES) ; do \
- case " $$f " in \
- *" $$i "*) ;; \
- *) f="$$f $$i" ;; \
- esac ; \
- done ; \
- case $$f in \
- *alloca.o*) f="$$f xmalloc.o xexit.o" ;; \
- esac ; \
- echo $$f >>lneeded-list
-
-# Generate an awk script that looks for functions in functions.def
-
-needed.awk: $(srcdir)/functions.def Makefile
- echo "# !Automatically generated from $(srcdir)/functions.def"\
- "- DO NOT EDIT!" >needed.awk
- grep '^DEF(' < $(srcdir)/functions.def \
- | sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf "\1.o " }|' \
- >>needed.awk
-
-stamp-config: $(CONFIG_H)
- cp $(CONFIG_H) config.tmp
- $(SHELL) $(srcdir)/$(MULTISRCTOP)../move-if-change config.tmp config.h
- touch stamp-config
-
-config.h: stamp-config ; @true
-
-lconfig.h: needed2.awk errors
- echo "/* !Automatically generated from $(srcdir)/functions.def"\
- "- DO NOT EDIT! */" >lconfig.h
- awk -f needed2.awk <errors >>lconfig.h
-
-# Generate an awk script that looks for variables in functions.def
-
-needed2.awk: $(srcdir)/functions.def Makefile
- echo "# !Automatically generated from $(srcdir)/functions.def"\
- "- DO NOT EDIT!" >needed2.awk
- grep '^DEFVAR(' < $(srcdir)/functions.def \
- | sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
- >>needed2.awk
- grep '^DEFFUNC(' < $(srcdir)/functions.def \
- | sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
- >>needed2.awk
-
-dummy.o: $(srcdir)/dummy.c $(srcdir)/functions.def
- $(CC) -c $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) $(srcdir)/dummy.c 2>/dev/null
-
-errors: dummy.o $(EXTRA_OFILES)
- -($(ERRORS_CC) -o dummy $(CFLAGS) $(LDFLAGS) $(ERRORS_LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true
-
-# required-list is used when building a shared bfd/opcodes/libiberty library.
+# needed-list is used by libstdc++. NEEDED is the list of functions
+# to include there. Do not add anything LGPL to this list; libstdc++
+# can't use anything encumbering.
+NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
+ strerror strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
+ vfork waitpid bcmp bcopy bzero
+needed-list: Makefile
+ rm -f needed-list; touch needed-list; \
+ for f in $(NEEDED); do \
+ for g in $(LIBOBJS) $(EXTRA_OFILES); do \
+ case "$$g" in \
+ *$$f*) echo $$g >> needed-list ;; \
+ esac; \
+ done; \
+ done
+
+# required-list was used when building a shared bfd/opcodes/libiberty
+# library. I don't know if it used by anything currently.
required-list: Makefile
echo $(REQUIRED_OFILES) > required-list
-$(HOST_OFILES) $(REQUIRED_OFILES) : config.h
-
-RULE1 = $(TARGETLIB)
-$(RULE1): $(REQUIRED_OFILES) $(DO_ALSO) .always.
- @$(MAKE) RULE1=not-used RULE2=$(TARGETLIB) $(FLAGS_TO_PASS) \
- "HOST_OFILES=$(HOST_OFILES)"
-
-# Rule invoked by recursive make in $(RULE1).
-RULE2 = not-used
-$(RULE2): $(REQUIRED_OFILES) $(HOST_OFILES)
- rm -rf $(TARGETLIB)
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
- $(REQUIRED_OFILES) $(HOST_OFILES)
- $(RANLIB) $(TARGETLIB)
-
stamp-picdir:
- if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
+ if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
-.always.:
-# Do nothing.
-
-.PHONY: all etags tags ls clean stage1 stage2 .always.
+.PHONY: all etags tags ls clean stage1 stage2
-etags tags: TAGS
+etags tags: TAGS etags-subdir
TAGS: $(CFILES) $(HFILES)
etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
@@ -294,43 +208,81 @@ ls:
# Need to deal with profiled libraries, too.
-mostlyclean:
+# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
+# multiple times, hence our explicit recursion with an empty SUBDIRS.
+mostlyclean: mostlyclean-subdir
rm -rf *.o pic core errs \#* *.E a.out
rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
@$(MULTICLEAN) multi-clean DO=mostlyclean
-clean: mostlyclean
+clean: clean-subdir
+ $(MAKE) SUBDIRS="" mostlyclean
rm -f *.a required-list tmpmulti.out
@$(MULTICLEAN) multi-clean DO=clean
-distclean: clean
+distclean: distclean-subdir
+ $(MAKE) SUBDIRS="" clean
@$(MULTICLEAN) multi-clean DO=distclean
- rm -f *~ Makefile config.status alloca-conf.h xhost-mkfrag TAGS multilib.out
-maintainer-clean realclean: distclean
+ rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
+ rm -f config.log
+maintainer-clean realclean: maintainer-clean-subdir
+ $(MAKE) SUBDIRS="" distclean
force:
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
- $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in config.status
+ CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+
+config.h: stamp-h ; @true
+stamp-h: config.in config.status
+ CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
+
+config.status: $(srcdir)/configure $(srcdir)/config.table
+ $(SHELL) ./config.status --recheck
+
+
+all-subdir check-subdir installcheck-subdir info-subdir \
+install-info-subdir clean-info-subdir dvi-subdir install-subdir \
+etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
+maintainer-clean-subdir:
+ @target=`echo $@ | sed -e 's/-subdir//'`; \
+ for dir in . $(SUBDIRS) ; do \
+ test $$dir = . || (cd $$dir && $(MAKE) $$target) || exit 1; \
+ done
+
+$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir
-argv.o: $(INCDIR)/libiberty.h
+alloca.o: config.h
+atexit.o: config.h
+argv.o: config.h alloca-conf.h $(INCDIR)/libiberty.h
basename.o: $(INCDIR)/libiberty.h
+choose-temp.o: config.h
+clock.o: config.h
concat.o: $(INCDIR)/libiberty.h
-cplus-dem.o: $(INCDIR)/demangle.h
+cplus-dem.o: config.h $(INCDIR)/demangle.h
fdmatch.o: $(INCDIR)/libiberty.h
-fnmatch.o: $(INCDIR)/fnmatch.h
-getopt.o: $(INCDIR)/getopt.h
-getopt1.o: $(INCDIR)/getopt.h
-getruntime.o: $(INCDIR)/libiberty.h
+fnmatch.o: config.h $(INCDIR)/fnmatch.h
+getcwd.o: config.h
+getopt.o: config.h $(INCDIR)/getopt.h
+getopt1.o: config.h $(INCDIR)/getopt.h
+getpagesize.o: config.h
+getpwd.o: config.h $(INCDIR)/libiberty.h
+getruntime.o: config.h $(INCDIR)/libiberty.h
hex.o: $(INCDIR)/libiberty.h
floatformat.o: $(INCDIR)/floatformat.h
+mkstemps.o: config.h
objalloc.o: $(INCDIR)/objalloc.h
-obstack.o: $(INCDIR)/obstack.h
-pexecute.o: $(INCDIR)/libiberty.h
+obstack.o: config.h $(INCDIR)/obstack.h
+partition.o: config.h $(INCDIR)/partition.h
+pexecute.o: config.h $(INCDIR)/libiberty.h
+setenv.o: config.h
spaces.o: $(INCDIR)/libiberty.h
-strerror.o: $(INCDIR)/libiberty.h
-strsignal.o: $(INCDIR)/libiberty.h
+splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h
+strerror.o: config.h $(INCDIR)/libiberty.h
+strsignal.o: config.h $(INCDIR)/libiberty.h
xatexit.o: $(INCDIR)/libiberty.h
xexit.o: $(INCDIR)/libiberty.h
xmalloc.o: $(INCDIR)/libiberty.h
-xstrdup.o: $(INCDIR)/libiberty.h
-xstrerror.o: $(INCDIR)/libiberty.h
+xmemdup.o: config.h $(INCDIR)/libiberty.h
+xstrdup.o: config.h $(INCDIR)/libiberty.h
+xstrerror.o: config.h $(INCDIR)/libiberty.h
+hashtab.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/ansidecl.h
diff --git a/contrib/binutils/libiberty/README b/contrib/binutils/libiberty/README
index 92dc202..9f5226a 100644
--- a/contrib/binutils/libiberty/README
+++ b/contrib/binutils/libiberty/README
@@ -27,62 +27,29 @@ that are "optional" will be included in the library only if "needed."
To add a new required file, edit Makefile to add the source file
name to CFILES and the object file to REQUIRED_OFILES.
-Adding a new optional file is more fragile. As a general rule,
-an optional file will be included in the library if it provides
-functionality missing in the "standard" C library.
-For most hosts, the Makefile automatically figures out which
-functionality is missing by compiling and linking a dummy test
-program, and examining the error messages.
-
-So to get this to work, you should do the following:
-
-1) Select one function defined in the file you're adding.
-For example, the getcwd function.
-2) Add that function to the list in the file functions.def.
-3) The name of the new file must be the same as the function
-you've chosen with the .c suffix added. E.g. getcwd() must be
-defined in getcwd.c. (The file can define other functions as well.)
-4) In Makefile.in, add the name of the source file (e.g. getcwd.c)
-to CFILES.
-
-The file you've added (e.g. getcwd.c) should compile and work
-on all hosts where it is needed (e.g. not found when linking
-the dummy.c program). It does not have to work or even
-compile on hosts where it is not needed.
+To add a new optional file, it must provide a single function, and the
+name of the function must be the same as the name of the file.
+
+ * Add the source file name to CFILES.
+
+ * Add the function to name to the funcs shell variable in
+ configure.in.
-HOW THE AUTOMATIC CONFIGURATION WORKS
-=====================================
-
-The libiberty.a target (in RULE1) depends on $(DO_ALSO).
-For normal configurations, DO_ALSO=needed-list.
-
-So needed-list is first made. The needed-list rule compiles
-dummy.c. Because dummy.c includes functions.def, the
-resulting object file will contain a call to each of the
-optional functions (for simplicity assume each optional file
-defines a single function). This object file will be linked
-against the standard libraries (as defined by using $(CC)
-and various flags). Any function missing will causes the
-linker to emit an error message. We assume the name
-of the missing function(s) are in the error message(s).
-The awk script find-needed.awk has been generated from
-functions.def. It is used to search the linker output
-messages for words that match the functions listed in
-functions.def. The list of functions found is written
-on a single line to the file needed-list.
-
-After needed-list has been generated, the libiberty.a
-target (in RULE1) just calls 'make' recursively.
-It passes the contents of needed-list using the
-definition (expanded) HOST_OFILES="`cat needed-list`".
-It also tells the inferior 'make' to use RULE2.
-
-The inferior 'make' is very conventional: The main
-rule is $(RULE2) (which is libiberty.a). It depends
-on a list of object files: $(REQUIRED_OFILES) $(HOST_OFILES)
-(and $(EXTRA_OFILES), which is usually empty). The superior
-'make' passes in $(HOST_OFILES); the others are fixed
-in the Makefile.
+ * Add the function to the AC_CHECK_FUNCS lists just after the
+ setting of the funcs shell variable. These AC_CHECK_FUNCS calls
+ are never executed; they are there to make autoheader work
+ better.
+
+ * Consider the special cases of building libiberty; as of this
+ writing, the special cases are newlib and VxWorks. If a
+ particular special case provides the function, you do not need
+ to do anything. If it does not provide the function, add the
+ object file to LIBOBJS, and add the function name to the case
+ controlling whether to define HAVE_func.
+
+The optional file you've added (e.g. getcwd.c) should compile and work
+on all hosts where it is needed. It does not have to work or even
+compile on hosts where it is not needed.
ADDING A NEW CONFIGURATION
==========================
@@ -95,34 +62,4 @@ If the fully automatic scheme doesn't work, you may be able to get
by with defining EXTRA_OFILES in your Makefile stub. This is
a list of object file names that should be treated as required
for this configuration - they will be included in libiberty.a,
-regardless of whatever might be in the C library. Moreover,
-when the dummy.c program is linked, it will be linked with
-$(EXTRA_OFILES). Therefore, if a function in functions.def
-is defined by one of the EXTRA_OFILES, it will not be listed as
-"needed". Thus if your hal9000 host needs a special implementation
-of getcwd, you can just create hal9000-getcwd.c, and define:
- EXTRA_OFILES=hal9000-getcwd.o
-Or if you want to use the libiberty version of strstr(),
-even though there is a version in the C library (it might be
-buggy or slow), just define:
- EXTRA_OFILES=strstr.o
-
-You can create a "manual" host configuration FOO with a file
-config/mh-FOO. In it, the HOST_OFILES macro should explicitly
-list that subset of the optional files that should be in the
-library. You should also set:
- DO_ALSO =
-This overrides all of the magic needed to automatically
-determine which files are "needed." However, keeping that list
-up to date is another matter...
-
-HOW THE MANUAL CONFIGURATION WORKS
-==================================
-
-This also uses a recursive make, but the superior make
-does not do anything interesting - it just calls the
-inferior make with HOST_OFILES defined as $(HOST_OFILES),
-which is the list you created in your configuration.
-
-You probably don't want to depend on manual configuration,
-because keeping the HOST_OFILES list up-to-date will be a pain.
+regardless of whatever might be in the C library.
diff --git a/contrib/binutils/libiberty/acconfig.h b/contrib/binutils/libiberty/acconfig.h
new file mode 100644
index 0000000..f7c599d
--- /dev/null
+++ b/contrib/binutils/libiberty/acconfig.h
@@ -0,0 +1,11 @@
+/* Define if you have the sys_errlist variable. */
+#undef HAVE_SYS_ERRLIST
+
+/* Define if you have the sys_nerr variable. */
+#undef HAVE_SYS_NERR
+
+/* Define if you have the sys_siglist variable. */
+#undef HAVE_SYS_SIGLIST
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
diff --git a/contrib/binutils/libiberty/alloca-conf.h b/contrib/binutils/libiberty/alloca-conf.h
new file mode 100644
index 0000000..9c3eea3
--- /dev/null
+++ b/contrib/binutils/libiberty/alloca-conf.h
@@ -0,0 +1,24 @@
+#include "config.h"
+
+#if defined(__GNUC__) && !defined(C_ALLOCA)
+# ifndef alloca
+# define alloca __builtin_alloca
+# endif
+#else /* ! defined (__GNUC__) */
+# ifdef _AIX
+ #pragma alloca
+# else
+# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
+# include <alloca.h>
+# else /* ! defined (HAVE_ALLOCA_H) */
+# ifdef __STDC__
+extern PTR alloca (size_t);
+# else /* ! defined (__STDC__) */
+extern PTR alloca ();
+# endif /* ! defined (__STDC__) */
+# endif /* ! defined (HAVE_ALLOCA_H) */
+# ifdef _WIN32
+# include <malloc.h>
+# endif
+# endif /* ! defined (_AIX) */
+#endif /* ! defined (__GNUC__) */
diff --git a/contrib/binutils/libiberty/alloca.c b/contrib/binutils/libiberty/alloca.c
index 911d42f..0f8a215 100644
--- a/contrib/binutils/libiberty/alloca.c
+++ b/contrib/binutils/libiberty/alloca.c
@@ -22,10 +22,26 @@
your main control loop, etc. to force garbage collection. */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-/* If compiling with GCC, this file's not needed. */
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef emacs
+#include "blockinput.h"
+#endif
+
+/* If compiling with GCC 2, this file's not needed. Except of course if
+ the C alloca is explicitly requested. */
+#if defined (USE_C_ALLOCA) || !defined (__GNUC__) || __GNUC__ < 2
+
+/* If someone has defined alloca as a macro,
+ there must be some other way alloca is supposed to work. */
#ifndef alloca
#ifdef emacs
@@ -53,11 +69,9 @@ long i00afunc ();
#endif
#if __STDC__
-#include <stddef.h>
typedef void *pointer;
#else
typedef char *pointer;
-typedef unsigned size_t;
#endif
#ifndef NULL
@@ -76,8 +90,8 @@ typedef unsigned size_t;
#ifndef emacs
#define malloc xmalloc
-extern pointer xmalloc ();
#endif
+extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
@@ -156,7 +170,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
pointer
alloca (size)
- size_t size;
+ unsigned size;
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
@@ -167,11 +181,15 @@ alloca (size)
#endif
/* Reclaim garbage, defined as all alloca'd storage that
- was allocated from deeper in the stack than currently. */
+ was allocated from deeper in the stack than currently. */
{
register header *hp; /* Traverses linked list. */
+#ifdef emacs
+ BLOCK_INPUT;
+#endif
+
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
@@ -186,6 +204,10 @@ alloca (size)
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
+
+#ifdef emacs
+ UNBLOCK_INPUT;
+#endif
}
if (size == 0)
@@ -197,6 +219,9 @@ alloca (size)
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
+ if (new == 0)
+ abort();
+
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;
@@ -326,7 +351,7 @@ struct stk_trailer
#ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
- I doubt that "lint" will like this much. */
+ I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
@@ -477,3 +502,4 @@ i00afunc (long address)
#endif /* CRAY */
#endif /* no alloca */
+#endif /* not GCC version 2 */
diff --git a/contrib/binutils/libiberty/argv.c b/contrib/binutils/libiberty/argv.c
index 824a029..f596ffd 100644
--- a/contrib/binutils/libiberty/argv.c
+++ b/contrib/binutils/libiberty/argv.c
@@ -35,12 +35,8 @@ Boston, MA 02111-1307, USA. */
#ifdef __STDC__
#include <stddef.h>
-extern void *memcpy (void *s1, const void *s2, size_t n); /* 4.11.2.1 */
-extern size_t strlen (const char *s); /* 4.11.6.3 */
-extern void *malloc (size_t size); /* 4.10.3.3 */
-extern void *realloc (void *ptr, size_t size); /* 4.10.3.4 */
-extern void free (void *ptr); /* 4.10.3.2 */
-extern char *strdup (const char *s); /* Non-ANSI */
+#include <string.h>
+#include <stdlib.h>
#else /* !__STDC__ */
@@ -82,7 +78,7 @@ SYNOPSIS
DESCRIPTION
Duplicate an argument vector. Simply scans through the
- vector, duplicating each argument argument until the
+ vector, duplicating each argument until the
terminating NULL is found.
RETURNS
@@ -225,7 +221,7 @@ char *input;
if (input != NULL)
{
- copybuf = alloca (strlen (input) + 1);
+ copybuf = (char *) alloca (strlen (input) + 1);
/* Is a do{}while to always execute the loop once. Always return an
argv, even for null strings. See NOTES above, test case below. */
do
diff --git a/contrib/binutils/libiberty/atexit.c b/contrib/binutils/libiberty/atexit.c
index 4463cb6..137d985 100644
--- a/contrib/binutils/libiberty/atexit.c
+++ b/contrib/binutils/libiberty/atexit.c
@@ -1,7 +1,10 @@
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
/* This function is in the public domain. --Mike Stump. */
-#ifndef NEED_on_exit
+#include "config.h"
+
+#ifdef HAVE_ON_EXIT
+
int
atexit(f)
void (*f)();
@@ -11,4 +14,5 @@ atexit(f)
on_exit (f, 0);
return 0;
}
+
#endif
diff --git a/contrib/binutils/libiberty/basename.c b/contrib/binutils/libiberty/basename.c
index 689b0c2..7698f06 100644
--- a/contrib/binutils/libiberty/basename.c
+++ b/contrib/binutils/libiberty/basename.c
@@ -14,30 +14,53 @@ DESCRIPTION
last component of the pathname ("ls.c" in this case).
BUGS
- Presumes a UNIX style path with UNIX style separators.
+ Presumes a UNIX or DOS/Windows style path with UNIX or DOS/Windows
+ style separators.
*/
#include "ansidecl.h"
#include "libiberty.h"
+#include <ctype.h>
-#include "config.h"
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
-#ifdef NEED_basename
+/* Define IS_DIR_SEPARATOR. */
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
char *
basename (name)
const char *name;
{
- const char *base = name;
+ const char *base;
- while (*name)
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha (name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
{
- if (*name++ == '/')
+ if (IS_DIR_SEPARATOR (*name))
{
- base = name;
+ base = name + 1;
}
}
return (char *) base;
}
-#endif
diff --git a/contrib/binutils/libiberty/calloc.c b/contrib/binutils/libiberty/calloc.c
new file mode 100644
index 0000000..334b18d
--- /dev/null
+++ b/contrib/binutils/libiberty/calloc.c
@@ -0,0 +1,29 @@
+/* calloc -- allocate memory which has been initialized to zero.
+ This function is in the public domain. */
+
+#include "ansidecl.h"
+#include "libiberty.h"
+
+#ifdef ANSI_PROTOTYPES
+#include <stddef.h>
+#else
+#define size_t unsigned long
+#endif
+
+/* For systems with larger pointers than ints, this must be declared. */
+PTR malloc PARAMS ((size_t));
+
+PTR
+calloc (nelem, elsize)
+ size_t nelem, elsize;
+{
+ register PTR ptr;
+
+ if (nelem == 0 || elsize == 0)
+ nelem = elsize = 1;
+
+ ptr = malloc (nelem * elsize);
+ if (ptr) bzero (ptr, nelem * elsize);
+
+ return ptr;
+}
diff --git a/contrib/binutils/libiberty/choose-temp.c b/contrib/binutils/libiberty/choose-temp.c
index 5668f74..826d818 100644
--- a/contrib/binutils/libiberty/choose-temp.c
+++ b/contrib/binutils/libiberty/choose-temp.c
@@ -17,22 +17,24 @@ License along with libiberty; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* This file exports one function: choose_temp_base. */
+/* This file exports two functions: choose_temp_base and make_temp_file. */
-/* This file lives in at least two places: libiberty and gcc.
- Don't change one without the other. */
-
-#if defined (IN_GCC) || defined (HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-/* If we are in gcc, or we have a config.h, we assume that
- HAVE_SYS_FILE_H tells us whether to include sys/file.h. However,
- libiberty does not have a config.h, and instead arranges to define
- NO_SYS_FILE_H on the command line when there is no sys/file.h. */
-
-#if (defined (IN_GCC) || defined (HAVE_CONFIG_H)) ? defined (HAVE_SYS_FILE_H) : ! defined (NO_SYS_FILE_H)
+#include <stdio.h> /* May get P_tmpdir. */
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
@@ -42,15 +44,11 @@ Boston, MA 02111-1307, USA. */
#define X_OK 1
#endif
-#include <stdio.h> /* May get P_tmpdir. */
-
-#ifdef IN_GCC
-#include "gansidecl.h"
-extern char *xmalloc ();
-#else
-#include "ansidecl.h"
#include "libiberty.h"
-#if defined (__MSDOS__) || defined (_WIN32)
+extern int mkstemps ();
+
+#ifndef IN_GCC
+#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN))
#define DIR_SEPARATOR '\\'
#endif
#endif
@@ -96,7 +94,10 @@ try (dir, base)
/* Return a prefix for temporary file names or NULL if unable to find one.
The current directory is chosen if all else fails so the program is
exited if a temporary directory can't be found (mktemp fails).
- The buffer for the result is obtained with xmalloc. */
+ The buffer for the result is obtained with xmalloc.
+
+ This function is provided for backwards compatability only. It use
+ is not recommended. */
char *
choose_temp_base ()
@@ -107,7 +108,6 @@ choose_temp_base ()
static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
static char usrtmp[] = { DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
-#ifndef MPW
base = try (getenv ("TMPDIR"), base);
base = try (getenv ("TMP"), base);
base = try (getenv ("TEMP"), base);
@@ -124,24 +124,15 @@ choose_temp_base ()
if (base == 0)
base = ".";
-#else /* MPW */
- base = ":";
-#endif
-
len = strlen (base);
temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
+ strlen (TEMP_FILE) + 1);
strcpy (temp_filename, base);
-#ifndef MPW
if (len != 0
&& temp_filename[len-1] != '/'
&& temp_filename[len-1] != DIR_SEPARATOR)
temp_filename[len++] = DIR_SEPARATOR;
-#else /* MPW */
- if (temp_filename[len-1] != ':')
- temp_filename[len++] = ':';
-#endif /* MPW */
strcpy (temp_filename + len, TEMP_FILE);
mktemp (temp_filename);
@@ -149,3 +140,64 @@ choose_temp_base ()
abort ();
return temp_filename;
}
+/* Return a temporary file name (as a string) or NULL if unable to create
+ one. */
+
+char *
+make_temp_file (suffix)
+ const char *suffix;
+{
+ char *base = 0;
+ char *temp_filename;
+ int base_len, suffix_len;
+ int fd;
+ static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
+ static char usrtmp[] = { DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
+
+ base = try (getenv ("TMPDIR"), base);
+ base = try (getenv ("TMP"), base);
+ base = try (getenv ("TEMP"), base);
+
+#ifdef P_tmpdir
+ base = try (P_tmpdir, base);
+#endif
+
+ /* Try /usr/tmp, then /tmp. */
+ base = try (usrtmp, base);
+ base = try (tmp, base);
+
+ /* If all else fails, use the current directory! */
+ if (base == 0)
+ base = ".";
+
+ base_len = strlen (base);
+
+ if (suffix)
+ suffix_len = strlen (suffix);
+ else
+ suffix_len = 0;
+
+ temp_filename = xmalloc (base_len + 1 /*DIR_SEPARATOR*/
+ + strlen (TEMP_FILE)
+ + suffix_len + 1);
+ strcpy (temp_filename, base);
+
+ if (base_len != 0
+ && temp_filename[base_len-1] != '/'
+ && temp_filename[base_len-1] != DIR_SEPARATOR)
+ temp_filename[base_len++] = DIR_SEPARATOR;
+ strcpy (temp_filename + base_len, TEMP_FILE);
+
+ if (suffix)
+ strcat (temp_filename, suffix);
+
+ fd = mkstemps (temp_filename, suffix_len);
+ /* If mkstemps failed, then something bad is happening. Maybe we should
+ issue a message about a possible security attack in progress? */
+ if (fd == -1)
+ abort ();
+ /* Similarly if we can not close the file. */
+ if (close (fd))
+ abort ();
+ return temp_filename;
+}
diff --git a/contrib/binutils/libiberty/clock.c b/contrib/binutils/libiberty/clock.c
index b60de16..db2509c 100644
--- a/contrib/binutils/libiberty/clock.c
+++ b/contrib/binutils/libiberty/clock.c
@@ -1,5 +1,5 @@
/* ANSI-compatible clock function.
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
@@ -22,18 +22,36 @@ the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
+#include "config.h"
+
#ifdef HAVE_GETRUSAGE
#include <sys/time.h>
#include <sys/resource.h>
#endif
#ifdef HAVE_TIMES
-#ifndef NO_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/times.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef _SC_CLK_TCK
+#define GNU_HZ sysconf(_SC_CLK_TCK)
+#else
+#ifdef HZ
+#define GNU_HZ HZ
+#else
+#ifdef CLOCKS_PER_SEC
+#define GNU_HZ CLOCKS_PER_SEC
+#endif
+#endif
+#endif
+
/* FIXME: should be able to declare as clock_t. */
long
@@ -50,7 +68,7 @@ clock ()
struct tms tms;
times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
+ return (tms.tms_utime + tms.tms_stime) * (1000000 / GNU_HZ);
#else
#ifdef VMS
struct
diff --git a/contrib/binutils/libiberty/config.in b/contrib/binutils/libiberty/config.in
new file mode 100644
index 0000000..6e64208
--- /dev/null
+++ b/contrib/binutils/libiberty/config.in
@@ -0,0 +1,224 @@
+/* config.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if you have <vfork.h>. */
+#undef HAVE_VFORK_H
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef pid_t
+
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define vfork as fork if vfork does not work. */
+#undef vfork
+
+/* Define if you have the sys_errlist variable. */
+#undef HAVE_SYS_ERRLIST
+
+/* Define if you have the sys_nerr variable. */
+#undef HAVE_SYS_NERR
+
+/* Define if you have the sys_siglist variable. */
+#undef HAVE_SYS_SIGLIST
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the asprintf function. */
+#undef HAVE_ASPRINTF
+
+/* Define if you have the atexit function. */
+#undef HAVE_ATEXIT
+
+/* Define if you have the basename function. */
+#undef HAVE_BASENAME
+
+/* Define if you have the bcmp function. */
+#undef HAVE_BCMP
+
+/* Define if you have the bcopy function. */
+#undef HAVE_BCOPY
+
+/* Define if you have the bzero function. */
+#undef HAVE_BZERO
+
+/* Define if you have the calloc function. */
+#undef HAVE_CALLOC
+
+/* Define if you have the clock function. */
+#undef HAVE_CLOCK
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the getrusage function. */
+#undef HAVE_GETRUSAGE
+
+/* Define if you have the gettimeofday function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define if you have the index function. */
+#undef HAVE_INDEX
+
+/* Define if you have the insque function. */
+#undef HAVE_INSQUE
+
+/* Define if you have the memchr function. */
+#undef HAVE_MEMCHR
+
+/* Define if you have the memcmp function. */
+#undef HAVE_MEMCMP
+
+/* Define if you have the memcpy function. */
+#undef HAVE_MEMCPY
+
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the memset function. */
+#undef HAVE_MEMSET
+
+/* Define if you have the mkstemps function. */
+#undef HAVE_MKSTEMPS
+
+/* Define if you have the on_exit function. */
+#undef HAVE_ON_EXIT
+
+/* Define if you have the psignal function. */
+#undef HAVE_PSIGNAL
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the random function. */
+#undef HAVE_RANDOM
+
+/* Define if you have the rename function. */
+#undef HAVE_RENAME
+
+/* Define if you have the rindex function. */
+#undef HAVE_RINDEX
+
+/* Define if you have the sbrk function. */
+#undef HAVE_SBRK
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the sigsetmask function. */
+#undef HAVE_SIGSETMASK
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strdup function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the strncasecmp function. */
+#undef HAVE_STRNCASECMP
+
+/* Define if you have the strrchr function. */
+#undef HAVE_STRRCHR
+
+/* Define if you have the strsignal function. */
+#undef HAVE_STRSIGNAL
+
+/* Define if you have the strstr function. */
+#undef HAVE_STRSTR
+
+/* Define if you have the strtod function. */
+#undef HAVE_STRTOD
+
+/* Define if you have the strtol function. */
+#undef HAVE_STRTOL
+
+/* Define if you have the strtoul function. */
+#undef HAVE_STRTOUL
+
+/* Define if you have the sysconf function. */
+#undef HAVE_SYSCONF
+
+/* Define if you have the times function. */
+#undef HAVE_TIMES
+
+/* Define if you have the tmpnam function. */
+#undef HAVE_TMPNAM
+
+/* Define if you have the vasprintf function. */
+#undef HAVE_VASPRINTF
+
+/* Define if you have the vfprintf function. */
+#undef HAVE_VFPRINTF
+
+/* Define if you have the vprintf function. */
+#undef HAVE_VPRINTF
+
+/* Define if you have the vsprintf function. */
+#undef HAVE_VSPRINTF
+
+/* Define if you have the waitpid function. */
+#undef HAVE_WAITPID
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
diff --git a/contrib/binutils/libiberty/config.table b/contrib/binutils/libiberty/config.table
index e367e1b..4e33746 100644
--- a/contrib/binutils/libiberty/config.table
+++ b/contrib/binutils/libiberty/config.table
@@ -1,50 +1,12 @@
case "${host}" in
rs6000-ibm-aix3.1 | rs6000-ibm-aix)
- frag=mh-aix
- files=${xsrcdir}alloca-botch.h ;;
- *-ibm-aix*) files=${xsrcdir}alloca-botch.h ;;
- arm-*-riscix*) frag=mh-riscix ;;
- m68k-apollo-bsd*) frag=mh-a68bsd ;;
- m68k-apollo-sysv*) frag=mh-apollo68 ;;
- i[3456]86-ncr-sysv4*) frag=mh-ncr3000 ;;
+ frag=mh-aix ;;
*-*-cxux7*) frag=mh-cxux7 ;;
- *-*-cygwin32) frag=mh-cygwin32 ;;
- *-*-dgux*) frag=mh-sysv ;;
*-*-freebsd2.1.*) frag=mh-fbsd21 ;;
- *-*-freebsd2.2.*) frag=mh-fbsd21 ;;
- hppa*-hp-bsd*) frag=mh-hpbsd ;;
- *-*-hpux*) frag=mh-hpux ;;
- *-*-hiux*) frag=mh-hpux ;;
- *-*-irix4*) frag=mh-irix4 ;;
- *-*-irix*) frag=mh-sysv ;;
- *-*-m88kbcs*) frag=mh-sysv ;;
- *-*-solaris2*) frag=mh-sysv4 ;;
- *-*-sysv4*) frag=mh-sysv4 ;;
- *-*-sysv*) frag=mh-sysv ;;
- *-*-go32) frag=mh-go32 ;;
+ *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
+ i370-*-opened*) frag=mh-openedition ;;
i[345]86-*-windows*) frag=mh-windows ;;
-
- *-*-vxworks5* | *-*-vxworks)
- # VxWorks 5 needs special action, because the usual
- # autoconfiguration scheme does not work.
- frag=mt-vxworks5
- ;;
-
- i[3456]86-*-mingw32*)
- # Mingw32 does not require strerror.o from REQUIRED_OFILES.
- # Worse: it will not compile it because of an incompatible sys_errlist
- # definition.
- frag=mt-mingw32
- ;;
-esac
-
-# Try to handle funky case of solaris 2 -> sun 4.
-case "${host}" in
- sparc-sun-sunos4.1.3)
- if [ "${with_cross_host}" != "${host}" ] ; then
- frag=mt-sunos4
- fi
- ;;
+ *-*-beos*) frag=mh-beos ;;
esac
frags=$frag
@@ -53,19 +15,33 @@ frags=$frag
case "${enable_shared}" in
yes) shared=yes ;;
no) shared=no ;;
+ "") shared=no ;;
*) shared=yes ;;
esac
if [ "${shared}" = "yes" ]; then
case "${host}" in
- hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
- i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
- *-*-*) frags="${frags} ../../config/mh-${host_cpu}pic" ;;
+ *-*-cygwin*) ;;
+ alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
+ arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
+ hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
+ i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
+ powerpc*-*-aix*) ;;
+ powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;;
+ *-*-*) frags="${frags} ../../config/mh-${host_cpu}pic" ;;
esac
fi
echo "# Warning: this fragment is automatically generated" > temp-frag
for frag in ${frags}; do
+ case ${frag} in
+ ../* )
+ if [ ${srcdir} = . ]; then
+ [ -n "${with_target_subdir}" ] && frag=../${frag}
+ [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
+ fi
+ ;;
+ esac
frag=${srcdir}/${xsrcdir}config/$frag
if [ -f ${frag} ]; then
echo "Appending ${frag} to xhost-mkfrag"
@@ -74,5 +50,12 @@ for frag in ${frags}; do
fi
done
+# record if we want to build shared libs.
+if [ "${shared}" = "yes" ]; then
+ echo enable_shared = yes >> temp-frag
+else
+ echo enable_shared = no >> temp-frag
+fi
+
frag=xhost-mkfrag
-${config_shell} ${moveifchange} temp-frag xhost-mkfrag
+${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
diff --git a/contrib/binutils/libiberty/config/mh-cxux7 b/contrib/binutils/libiberty/config/mh-cxux7
index 6d4d30b..a924b08 100644
--- a/contrib/binutils/libiberty/config/mh-cxux7
+++ b/contrib/binutils/libiberty/config/mh-cxux7
@@ -1,3 +1 @@
-HDEFINES = -DHAVE_SYSCONF -DHARRIS_FLOAT_FORMAT
-RANLIB=true
-INSTALL = cp
+HDEFINES = -DHARRIS_FLOAT_FORMAT
diff --git a/contrib/binutils/libiberty/config/mh-openedition b/contrib/binutils/libiberty/config/mh-openedition
new file mode 100644
index 0000000..6e8e354
--- /dev/null
+++ b/contrib/binutils/libiberty/config/mh-openedition
@@ -0,0 +1,3 @@
+HDEFINES = -D_ALL_SOURCE
+CC=c89
+
diff --git a/contrib/binutils/libiberty/configure b/contrib/binutils/libiberty/configure
new file mode 100755
index 0000000..02c826d
--- /dev/null
+++ b/contrib/binutils/libiberty/configure
@@ -0,0 +1,2953 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-target-subdir=SUBDIR Configuring in a subdirectory"
+ac_help="$ac_help
+ --with-cross-host=HOST Configuring with a cross compiler"
+ac_help="$ac_help
+ --with-newlib Configuring with newlib"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=pexecute.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+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"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+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
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+# Check whether --with-target-subdir or --without-target-subdir was given.
+if test "${with_target_subdir+set}" = set; then
+ withval="$with_target_subdir"
+ :
+fi
+
+# Check whether --with-cross-host or --without-cross-host was given.
+if test "${with_cross_host+set}" = set; then
+ withval="$with_cross_host"
+ :
+fi
+
+# Check whether --with-newlib or --without-newlib was given.
+if test "${with_newlib+set}" = set; then
+ withval="$with_newlib"
+ :
+fi
+
+
+if test "${srcdir}" = "."; then
+ if test -z "${with_target_subdir}"; then
+ libiberty_topdir="${srcdir}/.."
+ else
+ if test "${with_target_subdir}" != "."; then
+ libiberty_topdir="${srcdir}/${with_multisrctop}../.."
+ else
+ libiberty_topdir="${srcdir}/${with_multisrctop}.."
+ fi
+ fi
+else
+ libiberty_topdir="${srcdir}/.."
+fi
+ac_aux_dir=
+for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+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:591: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:614: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+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:640: 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
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:672: 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:704: 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
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+# 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:750: 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:780: 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
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:829: 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 <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$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
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ ac_libiberty_warn_cflags='-W -Wall -Wtraditional'
+ 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:854: 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
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ ac_libiberty_warn_cflags=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:884: 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:922: 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'
+
+
+. ${srcdir}/config.table
+host_makefile_frag=${frag}
+
+
+# It's OK to check for header files. Although the compiler may not be
+# able to link anything, it had better be able to at least compile
+# something.
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:983: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 998 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1004: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1015 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1021: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1032 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1038: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h sys/stat.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1066: 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
+#line 1071 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1076: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+echo "configure:1103: 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 <<EOF
+#line 1108 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int main() {
+int s;
+wait (&s);
+s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+; return 0; }
+EOF
+if { (eval echo configure:1124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+if test $ac_cv_header_sys_wait_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_WAIT_H 1
+EOF
+
+fi
+
+
+# This is the list of functions which libiberty will provide if they
+# are not available on the host.
+
+funcs="asprintf"
+funcs="$funcs atexit"
+funcs="$funcs basename"
+funcs="$funcs bcmp"
+funcs="$funcs bcopy"
+funcs="$funcs bzero"
+funcs="$funcs calloc"
+funcs="$funcs clock"
+funcs="$funcs getcwd"
+funcs="$funcs getpagesize"
+funcs="$funcs index"
+funcs="$funcs insque"
+funcs="$funcs memchr"
+funcs="$funcs memcmp"
+funcs="$funcs memcpy"
+funcs="$funcs memmove"
+funcs="$funcs memset"
+funcs="$funcs mkstemps"
+funcs="$funcs putenv"
+funcs="$funcs random"
+funcs="$funcs rename"
+funcs="$funcs rindex"
+funcs="$funcs setenv"
+funcs="$funcs sigsetmask"
+funcs="$funcs strcasecmp"
+funcs="$funcs strchr"
+funcs="$funcs strdup"
+funcs="$funcs strncasecmp"
+funcs="$funcs strrchr"
+funcs="$funcs strstr"
+funcs="$funcs strtod"
+funcs="$funcs strtol"
+funcs="$funcs strtoul"
+funcs="$funcs tmpnam"
+funcs="$funcs vasprintf"
+funcs="$funcs vfprintf"
+funcs="$funcs vprintf"
+funcs="$funcs vsprintf"
+funcs="$funcs waitpid"
+
+# Also in the old function.def file: alloca, vfork, getopt.
+
+vars="sys_errlist sys_nerr sys_siglist"
+
+checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
+
+# These are neither executed nor required, but they help keep
+# autoheader happy without adding a bunch of text to acconfig.h.
+if test "x" = "y"; then
+ for ac_func in asprintf atexit basename bcmp bcopy bzero calloc clock getcwd
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1200: 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 <<EOF
+#line 1205 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1228: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getpagesize index insque mkstemps memchr memcmp memcpy memmove
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1255: 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 <<EOF
+#line 1260 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1283: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in memset putenv random rename rindex sigsetmask strcasecmp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1310: 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 <<EOF
+#line 1315 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1338: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in setenv strchr strdup strncasecmp strrchr strstr strtod strtol
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1365: 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 <<EOF
+#line 1370 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1393: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1420: 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 <<EOF
+#line 1425 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1448: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_ERRLIST 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_NERR 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_SIGLIST 1
+EOF
+
+ for ac_func in getrusage on_exit psignal strerror strsignal sysconf times
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1487: 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 <<EOF
+#line 1492 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1515: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in sbrk gettimeofday
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1542: 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 <<EOF
+#line 1547 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1570: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+# For each of these functions, if the host does not provide the
+# function we want to put FN.o in LIBOBJS, and if the host does
+# provide the function, we want to define HAVE_FN in config.h. Also,
+# if the host does not provide alloca, we set ALLOCA to alloca.o
+
+setobjs=
+CHECK=
+if test -n "${with_target_subdir}"; then
+
+ # We are being configured as a target library. AC_REPLACE_FUNCS
+ # may not work correctly, because the compiler may not be able to
+ # link executables. Note that we may still be being configured
+ # native.
+
+ # If we are being configured for newlib, we know which functions
+ # newlib provide and which ones we will be expected to provide.
+
+ if test "x${with_newlib}" = "xyes"; then
+ ALLOCA="alloca.o"
+ LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
+
+ for f in $funcs; do
+ case "$f" in
+ asprintf | basename | insque | random | strdup | vasprintf)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $n 1
+EOF
+
+ ;;
+ esac
+ done
+
+ # newlib doesnt provide any of the variables in $vars, so we
+ # dont have to check them here.
+
+ # Of the functions in $checkfuncs, newlib only has strerror.
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRERROR 1
+EOF
+
+
+ setobjs=yes
+
+ fi
+
+else
+
+ # Not a target library, so we set things up to run the test suite.
+ CHECK=check-cplus-dem
+
+fi
+
+
+
+if test -z "${setobjs}"; then
+ case "${host}" in
+
+ *-*-vxworks*)
+ # Handle VxWorks configuration specially, since on VxWorks the
+ # libraries are actually on the target board, not in the file
+ # system.
+ LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
+ LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
+ for f in $funcs; do
+ case "$f" in
+ basename | getpagesize | insque | random | strcasecmp)
+ ;;
+ strncasecmp | strdup | vfork | waitpid | vasprintf)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $n 1
+EOF
+
+ ;;
+ esac
+ done
+
+ # VxWorks doesn't provide any of the variables in $vars, so we
+ # don't have to check them here.
+
+ # Of the functions in $checkfuncs, VxWorks only has strerror.
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRERROR 1
+EOF
+
+
+ setobjs=yes
+ ;;
+
+ esac
+fi
+
+if test -z "${setobjs}"; then
+
+ case "${host}" in
+
+ *-*-cygwin*)
+ # The Cygwin library actually uses a couple of files from
+ # libiberty when it is built. If we are building a native
+ # Cygwin, and we run the tests, we will appear to have these
+ # files. However, when we go on to build winsup, we will wind up
+ # with a library which does not have the files, since they should
+ # have come from libiberty.
+
+ # We handle this by removing the functions the winsup library
+ # provides from our shell variables, so that they appear to be
+ # missing.
+
+ funcs="`echo $funcs | sed -e 's/random//'`"
+ LIBOBJS="$LIBOBJS random.o"
+ vars="`echo $vars | sed -e 's/sys_siglist//'`"
+ checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
+ ;;
+
+ *-*-mingw32*)
+ # Under mingw32, sys_nerr and sys_errlist exist, but they are
+ # macros, so the test below won't find them.
+ vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_NERR 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_ERRLIST 1
+EOF
+
+ ;;
+
+ *-*-uwin*)
+ # Under some versions of uwin, vfork is notoriously buggy and the test
+ # can hang configure; on other versions, vfork exists just as a stub.
+ # FIXME: This should be removed once vfork in uwin's runtime is fixed.
+ ac_cv_func_vfork_works=no
+ # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
+ # macros (actually, these are imported from a DLL, but the end effect
+ # is the same), so the test below won't find them.
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_NERR 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_ERRLIST 1
+EOF
+
+ ;;
+
+ esac
+
+ # We haven't set the list of objects yet. Use the standard autoconf
+ # tests. This will only work if the compiler works.
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1752: 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 1763 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1768: \"$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:1794: 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
+
+ for ac_func in $funcs
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1801: 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 <<EOF
+#line 1806 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1829: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
+fi
+done
+
+
+
+ case "${host}" in
+ *-*-interix)
+ # On Interix, it wrongly concludes that the MSVC compiler supports alloca.
+ # (MSVC does on Win32, not on Interix.)
+ # This should be temporary.
+
+ ac_cv_header_alloca_h=no
+ ac_cv_func_alloca_works=no
+ ALLOCA=alloca.o
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+ cat >> confdefs.h <<EOF
+#define STACK_DIRECTION -1
+EOF
+ ;;
+ *)
+ # 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:1876: 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 <<EOF
+#line 1881 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:1888: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:1909: 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 <<EOF
+#line 1914 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:1942: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:1974: 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 <<EOF
+#line 1979 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&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:2004: 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 <<EOF
+#line 2009 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2032: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2059: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2067 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2086: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+ ;;
+ esac
+
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2111: 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 <<EOF
+#line 2116 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2124: \"$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*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+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
+#line 2141 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+#line 2159 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2180 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:2215: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2220 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_pid_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+ cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+
+fi
+
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:2249: checking for vfork.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
+#line 2254 "configure"
+#include "confdefs.h"
+#include <vfork.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2259: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_VFORK_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:2284: checking for working vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "checking for vfork""... $ac_c" 1>&6
+echo "configure:2290: checking for vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2295 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vfork(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vfork();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_vfork) || defined (__stub___vfork)
+choke me
+#else
+vfork();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_vfork=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_vfork=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2340 "configure"
+#include "confdefs.h"
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent.
+ The compiler is told about this with #include <vfork.h>,
+ but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+ Test for this by using a static variable whose address
+ is put into a register that is clobbered by the vfork. */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+main() {
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test ();
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems.
+ This test uses lots of local variables, at least
+ as many local variables as main has allocated so far
+ including compiler temporaries. 4 locals are enough for
+ gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+ A buggy compiler should reuse the register of parent
+ for one of the local variables, since it will think that
+ parent can't possibly be used any more in this routine.
+ Assigning to the local variable will thus munge parent
+ in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3),
+ vfork doesn't separate parent from child file descriptors.
+ If the child closes a descriptor before it execs or exits,
+ this munges the parent's descriptor as well.
+ Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ exit(
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+EOF
+if { (eval echo configure:2435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_vfork_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_vfork_works=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
+ cat >> confdefs.h <<\EOF
+#define vfork fork
+EOF
+
+fi
+
+ if test $ac_cv_func_vfork_works = no; then
+ LIBOBJS="$LIBOBJS vfork.o"
+ fi
+ for v in $vars; do
+ echo $ac_n "checking for $v""... $ac_c" 1>&6
+echo "configure:2462: checking for $v" >&5
+ if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2467 "configure"
+#include "confdefs.h"
+int *p;
+int main() {
+extern int $v; p = &$v;
+; return 0; }
+EOF
+if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "libiberty_cv_var_$v=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "libiberty_cv_var_$v=no"
+fi
+rm -f conftest*
+fi
+
+ if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $n 1
+EOF
+
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+ for ac_func in $checkfuncs
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2500: 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 <<EOF
+#line 2505 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2528: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+# Install a library built with a cross compiler in $(tooldir) rather
+# than $(libdir).
+if test -z "${with_cross_host}"; then
+ INSTALL_DEST=libdir
+else
+ INSTALL_DEST=tooldir
+fi
+
+
+# We need multilib support, but only if configuring for the target.
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@build@%$build%g
+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%@AR@%$AR%g
+s%@RANLIB@%$RANLIB%g
+s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+/@host_makefile_frag@/r $host_makefile_frag
+s%@host_makefile_frag@%%g
+s%@CPP@%$CPP%g
+s%@CHECK@%$CHECK%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@ALLOCA@%$ALLOCA%g
+s%@INSTALL_DEST@%$INSTALL_DEST%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h:config.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_target_subdir=${with_target_subdir}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="--enable-multilib ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libiberty_topdir=${libiberty_topdir}
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+if test -n "$CONFIG_FILES"; then
+ if test -n "${with_target_subdir}"; then
+ # FIXME: We shouldn't need to set ac_file
+ ac_file=Makefile
+ . ${libiberty_topdir}/config-ml.in
+ fi
+fi
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/contrib/binutils/libiberty/configure.in b/contrib/binutils/libiberty/configure.in
index b0020d8..cc1b2c2 100644
--- a/contrib/binutils/libiberty/configure.in
+++ b/contrib/binutils/libiberty/configure.in
@@ -1,66 +1,382 @@
-# This file is a shell script fragment that supplies the information
-# necessary for a configure script to process the program in
-# this directory. For more information, look at ../configure.
+dnl Process this file with autoconf to produce a configure script
-configdirs=
-srctrigger=getopt1.c
-srcname="-liberty library"
+AC_PREREQ(2.13)
+AC_INIT(pexecute.c)
-# per-host:
+dnl We use these options to decide which functions to include.
+AC_ARG_WITH(target-subdir,
+[ --with-target-subdir=SUBDIR Configuring in a subdirectory])
+AC_ARG_WITH(cross-host,
+[ --with-cross-host=HOST Configuring with a cross compiler])
+AC_ARG_WITH(newlib,
+[ --with-newlib Configuring with newlib])
-files="alloca-norm.h"
-links="alloca-conf.h"
+if test "${srcdir}" = "."; then
+ if test -z "${with_target_subdir}"; then
+ libiberty_topdir="${srcdir}/.."
+ else
+ if test "${with_target_subdir}" != "."; then
+ libiberty_topdir="${srcdir}/${with_multisrctop}../.."
+ else
+ libiberty_topdir="${srcdir}/${with_multisrctop}.."
+ fi
+ fi
+else
+ libiberty_topdir="${srcdir}/.."
+fi
+AC_CONFIG_AUX_DIR($libiberty_topdir)
+
+AC_CANONICAL_HOST
+
+dnl When we start using automake:
+dnl AM_INIT_AUTOMAKE(libiberty, 1.0)
+
+dnl These must be called before AM_PROG_LIBTOOL, because it may want
+dnl to call AC_CHECK_PROG.
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+AC_DEFUN(LIB_AC_PROG_CC,
+[AC_BEFORE([$0], [AC_PROG_CPP])dnl
+AC_PROVIDE([AC_PROG_CC])
+AC_CHECK_PROG(CC, gcc, gcc)
+if test -z "$CC"; then
+ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+fi
+
+AC_PROG_CC_GNU
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ ac_libiberty_warn_cflags='-W -Wall -Wtraditional'
+dnl Check whether -g works, even if CFLAGS is set, in case the package
+dnl plays around with CFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ AC_PROG_CC_G
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ ac_libiberty_warn_cflags=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+])
+AC_SUBST(ac_libiberty_warn_cflags)
+
+LIB_AC_PROG_CC
+
+AC_ISC_POSIX
+
+dnl When we start using libtool:
+dnl Default to a non shared library. This may be overridden by the
+dnl configure option --enable-shared.
+dnl AM_DISABLE_SHARED
+
+dnl When we start using libtool:
+dnl AM_PROG_LIBTOOL
+
+dnl When we start using automake:
+dnl AM_CONFIG_HEADER(config.h:config.in)
+AC_CONFIG_HEADER(config.h:config.in)
+
+dnl When we start using automake:
+dnl AM_MAINTAINER_MODE
+dnl AC_EXEEXT
+
+dnl When we start using automake:
+dnl AM_PROG_INSTALL
+AC_PROG_INSTALL
. ${srcdir}/config.table
host_makefile_frag=${frag}
+AC_SUBST_FILE(host_makefile_frag)
+
+# It's OK to check for header files. Although the compiler may not be
+# able to link anything, it had better be able to at least compile
+# something.
+AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h sys/stat.h)
+AC_HEADER_SYS_WAIT
+
+# This is the list of functions which libiberty will provide if they
+# are not available on the host.
+
+funcs="asprintf"
+funcs="$funcs atexit"
+funcs="$funcs basename"
+funcs="$funcs bcmp"
+funcs="$funcs bcopy"
+funcs="$funcs bzero"
+funcs="$funcs calloc"
+funcs="$funcs clock"
+funcs="$funcs getcwd"
+funcs="$funcs getpagesize"
+funcs="$funcs index"
+funcs="$funcs insque"
+funcs="$funcs memchr"
+funcs="$funcs memcmp"
+funcs="$funcs memcpy"
+funcs="$funcs memmove"
+funcs="$funcs memset"
+funcs="$funcs mkstemps"
+funcs="$funcs putenv"
+funcs="$funcs random"
+funcs="$funcs rename"
+funcs="$funcs rindex"
+funcs="$funcs setenv"
+funcs="$funcs sigsetmask"
+funcs="$funcs strcasecmp"
+funcs="$funcs strchr"
+funcs="$funcs strdup"
+funcs="$funcs strncasecmp"
+funcs="$funcs strrchr"
+funcs="$funcs strstr"
+funcs="$funcs strtod"
+funcs="$funcs strtol"
+funcs="$funcs strtoul"
+funcs="$funcs tmpnam"
+funcs="$funcs vasprintf"
+funcs="$funcs vfprintf"
+funcs="$funcs vprintf"
+funcs="$funcs vsprintf"
+funcs="$funcs waitpid"
+
+# Also in the old function.def file: alloca, vfork, getopt.
-# per-target:
-
-# post-target:
-
-# If this is the target libiberty, check at compile time whether we are using
-# newlib. If we are, we already know the files we need, since the linker
-# will fail when run on some of the newlib targets.
-if [ -n "${with_target_subdir}" ] ; then
- cat > Makefile.tem <<'!EOF!'
-CONFIG_H = xconfig.h
-NEEDED_LIST = xneeded-list
-
-xconfig.h: Makefile
- if [ -f ../newlib/Makefile ]; then \
- echo "#define NEED_sys_nerr 1" >xconfig.h; \
- echo "#define NEED_sys_errlist 1" >>xconfig.h; \
- echo "#define NEED_sys_siglist 1" >>xconfig.h; \
- echo "#define NEED_strsignal 1" >>xconfig.h; \
- echo "#define NEED_psignal 1" >>xconfig.h; \
- else \
- $(MAKE) $(FLAGS_TO_PASS) lconfig.h; \
- cp lconfig.h xconfig.h; \
- fi
-
-xneeded-list: Makefile
- if [ -f ../newlib/Makefile ]; then \
- echo insque.o random.o strdup.o alloca.o vasprintf.o >xneeded-list; \
- else \
- $(MAKE) $(FLAGS_TO_PASS) lneeded-list; \
- cp lneeded-list xneeded-list; \
- fi
-!EOF!
-sed -e "/^####/ r Makefile.tem" \
- -e '/INSTALL_DEST =/s/libdir/tooldir/' ${Makefile} > Makefile.tem3
-mv Makefile.tem3 ${Makefile}
-rm -f Makefile.tem
+vars="sys_errlist sys_nerr sys_siglist"
+
+checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
+
+# These are neither executed nor required, but they help keep
+# autoheader happy without adding a bunch of text to acconfig.h.
+if test "x" = "y"; then
+ AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bzero calloc clock getcwd)
+ AC_CHECK_FUNCS(getpagesize index insque mkstemps memchr memcmp memcpy memmove)
+ AC_CHECK_FUNCS(memset putenv random rename rindex sigsetmask strcasecmp)
+ AC_CHECK_FUNCS(setenv strchr strdup strncasecmp strrchr strstr strtod strtol)
+ AC_CHECK_FUNCS(strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
+ AC_DEFINE(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_SIGLIST)
+ AC_CHECK_FUNCS(getrusage on_exit psignal strerror strsignal sysconf times)
+ AC_CHECK_FUNCS(sbrk gettimeofday)
fi
-# We need multilib support, but only if configuring for the target.
-if [ -n "${with_target_subdir}" ] ; then
- if [ "${srcdir}" = "." ] ; then
- if [ "${with_target_subdir}" != "." ] ; then
- . ${with_multisrctop}../../config-ml.in
+# For each of these functions, if the host does not provide the
+# function we want to put FN.o in LIBOBJS, and if the host does
+# provide the function, we want to define HAVE_FN in config.h. Also,
+# if the host does not provide alloca, we set ALLOCA to alloca.o
+
+setobjs=
+CHECK=
+if test -n "${with_target_subdir}"; then
+
+ # We are being configured as a target library. AC_REPLACE_FUNCS
+ # may not work correctly, because the compiler may not be able to
+ # link executables. Note that we may still be being configured
+ # native.
+
+ # If we are being configured for newlib, we know which functions
+ # newlib provide and which ones we will be expected to provide.
+
+ if test "x${with_newlib}" = "xyes"; then
+ ALLOCA="alloca.o"
+ LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
+
+ for f in $funcs; do
+ case "$f" in
+ asprintf | basename | insque | random | strdup | vasprintf)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($n)
+ ;;
+ esac
+ done
+
+ # newlib doesnt provide any of the variables in $vars, so we
+ # dont have to check them here.
+
+ # Of the functions in $checkfuncs, newlib only has strerror.
+ AC_DEFINE(HAVE_STRERROR)
+
+ setobjs=yes
+
+ fi
+
+else
+
+ # Not a target library, so we set things up to run the test suite.
+ CHECK=check-cplus-dem
+
+fi
+
+AC_SUBST(CHECK)
+
+if test -z "${setobjs}"; then
+ case "${host}" in
+
+ *-*-vxworks*)
+ # Handle VxWorks configuration specially, since on VxWorks the
+ # libraries are actually on the target board, not in the file
+ # system.
+ LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
+ LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
+ for f in $funcs; do
+ case "$f" in
+ basename | getpagesize | insque | random | strcasecmp)
+ ;;
+ strncasecmp | strdup | vfork | waitpid | vasprintf)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($n)
+ ;;
+ esac
+ done
+
+ # VxWorks doesn't provide any of the variables in $vars, so we
+ # don't have to check them here.
+
+ # Of the functions in $checkfuncs, VxWorks only has strerror.
+ AC_DEFINE(HAVE_STRERROR)
+
+ setobjs=yes
+ ;;
+
+ esac
+fi
+
+if test -z "${setobjs}"; then
+
+ case "${host}" in
+
+ *-*-cygwin*)
+ # The Cygwin library actually uses a couple of files from
+ # libiberty when it is built. If we are building a native
+ # Cygwin, and we run the tests, we will appear to have these
+ # files. However, when we go on to build winsup, we will wind up
+ # with a library which does not have the files, since they should
+ # have come from libiberty.
+
+ # We handle this by removing the functions the winsup library
+ # provides from our shell variables, so that they appear to be
+ # missing.
+
+ funcs="`echo $funcs | sed -e 's/random//'`"
+ LIBOBJS="$LIBOBJS random.o"
+ vars="`echo $vars | sed -e 's/sys_siglist//'`"
+ checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
+ ;;
+
+ *-*-mingw32*)
+ # Under mingw32, sys_nerr and sys_errlist exist, but they are
+ # macros, so the test below won't find them.
+ vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
+ AC_DEFINE(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
+ ;;
+
+ *-*-uwin*)
+ # Under some versions of uwin, vfork is notoriously buggy and the test
+ # can hang configure; on other versions, vfork exists just as a stub.
+ # FIXME: This should be removed once vfork in uwin's runtime is fixed.
+ ac_cv_func_vfork_works=no
+ # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
+ # macros (actually, these are imported from a DLL, but the end effect
+ # is the same), so the test below won't find them.
+ AC_DEFINE(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
+ ;;
+
+ esac
+
+ # We haven't set the list of objects yet. Use the standard autoconf
+ # tests. This will only work if the compiler works.
+ AC_PROG_CC_WORKS
+ AC_REPLACE_FUNCS($funcs)
+
+ case "${host}" in
+ *-*-interix)
+ # On Interix, it wrongly concludes that the MSVC compiler supports alloca.
+ # (MSVC does on Win32, not on Interix.)
+ # This should be temporary.
+
+ ac_cv_header_alloca_h=no
+ ac_cv_func_alloca_works=no
+ ALLOCA=alloca.o
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+ cat >> confdefs.h <<EOF
+#define STACK_DIRECTION -1
+EOF
+ ;;
+ *)
+ AC_FUNC_ALLOCA
+ ;;
+ esac
+
+ AC_FUNC_VFORK
+ if test $ac_cv_func_vfork_works = no; then
+ LIBOBJS="$LIBOBJS vfork.o"
+ fi
+ for v in $vars; do
+ AC_MSG_CHECKING([for $v])
+ AC_CACHE_VAL(libiberty_cv_var_$v,
+ [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
+ [eval "libiberty_cv_var_$v=yes"],
+ [eval "libiberty_cv_var_$v=no"])])
+ if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($n)
else
- . ${with_multisrctop}../config-ml.in
+ AC_MSG_RESULT(no)
fi
- else
- . ${srcdir}/../config-ml.in
- fi
+ done
+ AC_CHECK_FUNCS($checkfuncs)
fi
+
+# Install a library built with a cross compiler in $(tooldir) rather
+# than $(libdir).
+if test -z "${with_cross_host}"; then
+ INSTALL_DEST=libdir
+else
+ INSTALL_DEST=tooldir
+fi
+AC_SUBST(INSTALL_DEST)
+
+# We need multilib support, but only if configuring for the target.
+AC_OUTPUT(Makefile testsuite/Makefile,
+[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+if test -n "$CONFIG_FILES"; then
+ if test -n "${with_target_subdir}"; then
+ # FIXME: We shouldn't need to set ac_file
+ ac_file=Makefile
+ . ${libiberty_topdir}/config-ml.in
+ fi
+fi],
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_target_subdir=${with_target_subdir}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="--enable-multilib ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libiberty_topdir=${libiberty_topdir}
+)
diff --git a/contrib/binutils/libiberty/cplus-dem.c b/contrib/binutils/libiberty/cplus-dem.c
index f4d7123..52249d2 100644
--- a/contrib/binutils/libiberty/cplus-dem.c
+++ b/contrib/binutils/libiberty/cplus-dem.c
@@ -1,8 +1,9 @@
-/* Demangler for GNU C++
- Copyright 1989, 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Demangler for GNU C++
+ Copyright 1989, 91, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp)
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
-
+ Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
+
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -28,16 +29,35 @@ Boston, MA 02111-1307, USA. */
/* This file lives in both GCC and libiberty. When making changes, please
try not to break either. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <ctype.h>
+#include <sys/types.h>
#include <string.h>
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else
+char * malloc ();
+char * realloc ();
+#endif
+
#include <demangle.h>
#undef CURRENT_DEMANGLING_STYLE
#define CURRENT_DEMANGLING_STYLE work->options
-extern char *xmalloc PARAMS((unsigned));
-extern char *xrealloc PARAMS((char *, unsigned));
+#include "libiberty.h"
+
+#define min(X,Y) (((X) < (Y)) ? (X) : (Y))
+
+/* A value at least one greater than the maximum number of characters
+ that will be output when using the `%d' format with `printf'. */
+#define INTBUF_SIZE 32
+
+extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
static const char *mystrstr PARAMS ((const char *, const char *));
@@ -82,6 +102,8 @@ enum demangling_styles current_demangling_style = gnu_demangling;
static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' };
+static char char_str[2] = { '\000', '\000' };
+
void
set_cplus_marker_for_demangling (ch)
int ch;
@@ -89,6 +111,13 @@ set_cplus_marker_for_demangling (ch)
cplus_markers[0] = ch;
}
+typedef struct string /* Beware: these aren't required to be */
+{ /* '\0' terminated. */
+ char *b; /* pointer to start of string */
+ char *p; /* pointer after last character */
+ char *e; /* pointer after end of allocated space */
+} string;
+
/* Stuff that is shared between sub-routines.
Using a shared structure allows cplus_demangle to be reentrant. */
@@ -96,14 +125,27 @@ struct work_stuff
{
int options;
char **typevec;
+ char **ktypevec;
+ char **btypevec;
+ int numk;
+ int numb;
+ int ksize;
+ int bsize;
int ntypes;
int typevec_size;
int constructor;
int destructor;
int static_type; /* A static member function */
- int const_type; /* A const member function */
+ int temp_start; /* index in demangled to start of template args */
+ int type_quals; /* The type qualifiers. */
+ int dllimported; /* Symbol imported from a PE DLL */
char **tmpl_argvec; /* Template function arguments. */
int ntmpl_args; /* The number of template function arguments. */
+ int forgetting_types; /* Nonzero if we are not remembering the types
+ we see. */
+ string* previous_argument; /* The last function argument demangled. */
+ int nrepeats; /* The number of times to repeat the previous
+ argument. */
};
#define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
@@ -192,22 +234,34 @@ static const struct optable
{"min", "<?", 0}, /* old */
{"mn", "<?", DMGL_ANSI}, /* pseudo-ansi */
{"nop", "", 0}, /* old (for operator=) */
- {"rm", "->*", DMGL_ANSI} /* ansi */
+ {"rm", "->*", DMGL_ANSI}, /* ansi */
+ {"sz", "sizeof ", DMGL_ANSI} /* pseudo-ansi */
};
-
-typedef struct string /* Beware: these aren't required to be */
-{ /* '\0' terminated. */
- char *b; /* pointer to start of string */
- char *p; /* pointer after last character */
- char *e; /* pointer after end of allocated space */
-} string;
+/* These values are used to indicate the various type varieties.
+ They are all non-zero so that they can be used as `success'
+ values. */
+typedef enum type_kind_t
+{
+ tk_none,
+ tk_pointer,
+ tk_reference,
+ tk_integral,
+ tk_bool,
+ tk_char,
+ tk_real
+} type_kind_t;
#define STRING_EMPTY(str) ((str) -> b == (str) -> p)
#define PREPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
string_prepend(str, " ");}
#define APPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
string_append(str, " ");}
+#define LEN_STRING(str) ( (STRING_EMPTY(str))?0:((str)->p - (str)->b))
+
+/* The scope separator appropriate for the language being demangled. */
+
+#define SCOPE_STRING(work) ((work->options & DMGL_JAVA) ? "." : "::")
#define ARM_VTABLE_STRING "__vtbl__" /* Lucid/ARM virtual table prefix */
#define ARM_VTABLE_STRLEN 8 /* strlen (ARM_VTABLE_STRING) */
@@ -217,22 +271,29 @@ typedef struct string /* Beware: these aren't required to be */
static char *
mop_up PARAMS ((struct work_stuff *, string *, int));
+static void
+squangle_mop_up PARAMS ((struct work_stuff *));
+
#if 0
static int
-demangle_method_args PARAMS ((struct work_stuff *work, const char **, string *));
+demangle_method_args PARAMS ((struct work_stuff *, const char **, string *));
#endif
+static char *
+internal_cplus_demangle PARAMS ((struct work_stuff *, const char *));
+
+static int
+demangle_template_template_parm PARAMS ((struct work_stuff *work,
+ const char **, string *));
+
static int
demangle_template PARAMS ((struct work_stuff *work, const char **, string *,
- string *, int));
+ string *, int, int));
static int
arm_pt PARAMS ((struct work_stuff *, const char *, int, const char **,
const char **));
-static void
-demangle_arm_pt PARAMS ((struct work_stuff *, const char **, int, string *));
-
static int
demangle_class_name PARAMS ((struct work_stuff *, const char **, string *));
@@ -256,7 +317,7 @@ static int
gnu_special PARAMS ((struct work_stuff *, const char **, string *));
static int
-arm_special PARAMS ((struct work_stuff *, const char **, string *));
+arm_special PARAMS ((const char **, string *));
static void
string_need PARAMS ((string *, int));
@@ -290,19 +351,25 @@ string_prepend PARAMS ((string *, const char *));
static void
string_prependn PARAMS ((string *, const char *, int));
+static void
+string_append_template_idx PARAMS ((string *, int));
+
static int
get_count PARAMS ((const char **, int *));
static int
consume_count PARAMS ((const char **));
-static int
+static int
consume_count_with_underscores PARAMS ((const char**));
static int
demangle_args PARAMS ((struct work_stuff *, const char **, string *));
static int
+demangle_nested_args PARAMS ((struct work_stuff*, const char**, string*));
+
+static int
do_type PARAMS ((struct work_stuff *, const char **, string *));
static int
@@ -316,15 +383,80 @@ static void
remember_type PARAMS ((struct work_stuff *, const char *, int));
static void
+remember_Btype PARAMS ((struct work_stuff *, const char *, int, int));
+
+static int
+register_Btype PARAMS ((struct work_stuff *));
+
+static void
+remember_Ktype PARAMS ((struct work_stuff *, const char *, int));
+
+static void
forget_types PARAMS ((struct work_stuff *));
static void
+forget_B_and_K_types PARAMS ((struct work_stuff *));
+
+static void
string_prepends PARAMS ((string *, string *));
-/* Translate count to integer, consuming tokens in the process.
- Conversion terminates on the first non-digit character.
- Trying to consume something that isn't a count results in
- no consumption of input and a return of 0. */
+static int
+demangle_template_value_parm PARAMS ((struct work_stuff*, const char**,
+ string*, type_kind_t));
+
+static int
+do_hpacc_template_const_value PARAMS ((struct work_stuff *, const char **, string *));
+
+static int
+do_hpacc_template_literal PARAMS ((struct work_stuff *, const char **, string *));
+
+static int
+snarf_numeric_literal PARAMS ((const char **, string *));
+
+/* There is a TYPE_QUAL value for each type qualifier. They can be
+ combined by bitwise-or to form the complete set of qualifiers for a
+ type. */
+
+#define TYPE_UNQUALIFIED 0x0
+#define TYPE_QUAL_CONST 0x1
+#define TYPE_QUAL_VOLATILE 0x2
+#define TYPE_QUAL_RESTRICT 0x4
+
+static int
+code_for_qualifier PARAMS ((int));
+
+static const char*
+qualifier_string PARAMS ((int));
+
+static const char*
+demangle_qualifier PARAMS ((int));
+
+static int
+demangle_expression PARAMS ((struct work_stuff *, const char **, string *,
+ type_kind_t));
+
+static int
+demangle_integral_value PARAMS ((struct work_stuff *, const char **,
+ string *));
+
+static int
+demangle_real_value PARAMS ((struct work_stuff *, const char **, string *));
+
+static void
+demangle_arm_hp_template PARAMS ((struct work_stuff *, const char **, int,
+ string *));
+
+static void
+recursively_demangle PARAMS ((struct work_stuff *, const char **, string *,
+ int));
+
+/* Translate count to integer, consuming tokens in the process.
+ Conversion terminates on the first non-digit character.
+
+ Trying to consume something that isn't a count results in no
+ consumption of input and a return of -1.
+
+ Overflow consumes the rest of the digits, and returns -1. */
static int
consume_count (type)
@@ -332,17 +464,34 @@ consume_count (type)
{
int count = 0;
- while (isdigit (**type))
+ if (! isdigit ((unsigned char)**type))
+ return -1;
+
+ while (isdigit ((unsigned char)**type))
{
count *= 10;
+
+ /* Check for overflow.
+ We assume that count is represented using two's-complement;
+ no power of two is divisible by ten, so if an overflow occurs
+ when multiplying by ten, the result will not be a multiple of
+ ten. */
+ if ((count % 10) != 0)
+ {
+ while (isdigit ((unsigned char) **type))
+ (*type)++;
+ return -1;
+ }
+
count += **type - '0';
(*type)++;
}
+
return (count);
}
-/* Like consume_count, but for counts that are preceeded and followed
+/* Like consume_count, but for counts that are preceded and followed
by '_' if they are greater than 10. Also, -1 is returned for
failure, since 0 can be a valid value. */
@@ -355,21 +504,21 @@ consume_count_with_underscores (mangled)
if (**mangled == '_')
{
(*mangled)++;
- if (!isdigit (**mangled))
+ if (!isdigit ((unsigned char)**mangled))
return -1;
idx = consume_count (mangled);
if (**mangled != '_')
/* The trailing underscore was missing. */
return -1;
-
+
(*mangled)++;
}
else
{
if (**mangled < '0' || **mangled > '9')
return -1;
-
+
idx = **mangled - '0';
(*mangled)++;
}
@@ -377,13 +526,91 @@ consume_count_with_underscores (mangled)
return idx;
}
+/* C is the code for a type-qualifier. Return the TYPE_QUAL
+ corresponding to this qualifier. */
+
+static int
+code_for_qualifier (c)
+ int c;
+{
+ switch (c)
+ {
+ case 'C':
+ return TYPE_QUAL_CONST;
+
+ case 'V':
+ return TYPE_QUAL_VOLATILE;
+
+ case 'u':
+ return TYPE_QUAL_RESTRICT;
+
+ default:
+ break;
+ }
+
+ /* C was an invalid qualifier. */
+ abort ();
+}
+
+/* Return the string corresponding to the qualifiers given by
+ TYPE_QUALS. */
+
+static const char*
+qualifier_string (type_quals)
+ int type_quals;
+{
+ switch (type_quals)
+ {
+ case TYPE_UNQUALIFIED:
+ return "";
+
+ case TYPE_QUAL_CONST:
+ return "const";
+
+ case TYPE_QUAL_VOLATILE:
+ return "volatile";
+
+ case TYPE_QUAL_RESTRICT:
+ return "__restrict";
+
+ case TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE:
+ return "const volatile";
+
+ case TYPE_QUAL_CONST | TYPE_QUAL_RESTRICT:
+ return "const __restrict";
+
+ case TYPE_QUAL_VOLATILE | TYPE_QUAL_RESTRICT:
+ return "volatile __restrict";
+
+ case TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE | TYPE_QUAL_RESTRICT:
+ return "const volatile __restrict";
+
+ default:
+ break;
+ }
+
+ /* TYPE_QUALS was an invalid qualifier set. */
+ abort ();
+}
+
+/* C is the code for a type-qualifier. Return the string
+ corresponding to this qualifier. This function should only be
+ called with a valid qualifier code. */
+
+static const char*
+demangle_qualifier (c)
+ int c;
+{
+ return qualifier_string (code_for_qualifier (c));
+}
+
int
cplus_demangle_opname (opname, result, options)
const char *opname;
char *result;
int options;
{
- int len, i, len1, ret;
+ int len, len1, ret;
string type;
struct work_stuff work[1];
const char *tem;
@@ -391,8 +618,9 @@ cplus_demangle_opname (opname, result, options)
len = strlen(opname);
result[0] = '\0';
ret = 0;
+ memset ((char *) work, 0, sizeof (work));
work->options = options;
-
+
if (opname[0] == '_' && opname[1] == '_'
&& opname[2] == 'o' && opname[3] == 'p')
{
@@ -414,6 +642,7 @@ cplus_demangle_opname (opname, result, options)
if (opname[4] == '\0')
{
/* Operator. */
+ size_t i;
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
if (strlen (optable[i].in) == 2
@@ -431,6 +660,7 @@ cplus_demangle_opname (opname, result, options)
if (opname[2] == 'a' && opname[5] == '\0')
{
/* Assignment. */
+ size_t i;
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
if (strlen (optable[i].in) == 3
@@ -440,12 +670,12 @@ cplus_demangle_opname (opname, result, options)
strcat (result, optable[i].out);
ret = 1;
break;
- }
+ }
}
}
}
}
- else if (len >= 3
+ else if (len >= 3
&& opname[0] == 'o'
&& opname[1] == 'p'
&& strchr (cplus_markers, opname[2]) != NULL)
@@ -454,10 +684,11 @@ cplus_demangle_opname (opname, result, options)
if (len >= 10 /* op$assign_ */
&& memcmp (opname + 3, "assign_", 7) == 0)
{
+ size_t i;
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
len1 = len - 10;
- if (strlen (optable[i].in) == len1
+ if ((int) strlen (optable[i].in) == len1
&& memcmp (optable[i].in, opname + 10, len1) == 0)
{
strcat (result, "operator");
@@ -470,10 +701,11 @@ cplus_demangle_opname (opname, result, options)
}
else
{
+ size_t i;
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
len1 = len - 3;
- if (strlen (optable[i].in) == len1
+ if ((int) strlen (optable[i].in) == len1
&& memcmp (optable[i].in, opname + 3, len1) == 0)
{
strcat (result, "operator");
@@ -497,6 +729,7 @@ cplus_demangle_opname (opname, result, options)
ret = 1;
}
}
+ squangle_mop_up (work);
return ret;
}
@@ -511,13 +744,13 @@ cplus_mangle_opname (opname, options)
const char *opname;
int options;
{
- int i;
+ size_t i;
int len;
len = strlen (opname);
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
- if (strlen (optable[i].out) == len
+ if ((int) strlen (optable[i].out) == len
&& (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI)
&& memcmp (optable[i].out, opname, len) == 0)
return optable[i].in;
@@ -540,7 +773,7 @@ cplus_mangle_opname (opname, options)
DMGL_PARAMS Function parameters are included.
For example,
-
+
cplus_demangle ("foo__1Ai", DMGL_PARAMS) => "A::foo(int)"
cplus_demangle ("foo__1Ai", DMGL_PARAMS | DMGL_ANSI) => "A::foo(int)"
cplus_demangle ("foo__1Ai", 0) => "A::foo"
@@ -558,18 +791,45 @@ cplus_demangle (mangled, options)
const char *mangled;
int options;
{
+ char *ret;
+ struct work_stuff work[1];
+ memset ((char *) work, 0, sizeof (work));
+ work -> options = options;
+ if ((work -> options & DMGL_STYLE_MASK) == 0)
+ work -> options |= (int) current_demangling_style & DMGL_STYLE_MASK;
+
+ ret = internal_cplus_demangle (work, mangled);
+ squangle_mop_up (work);
+ return (ret);
+}
+
+
+/* This function performs most of what cplus_demangle use to do, but
+ to be able to demangle a name with a B, K or n code, we need to
+ have a longer term memory of what types have been seen. The original
+ now intializes and cleans up the squangle code info, while internal
+ calls go directly to this routine to avoid resetting that info. */
+
+static char *
+internal_cplus_demangle (work, mangled)
+ struct work_stuff *work;
+ const char *mangled;
+{
+
string decl;
int success = 0;
- struct work_stuff work[1];
char *demangled = NULL;
+ int s1,s2,s3,s4;
+ s1 = work->constructor;
+ s2 = work->destructor;
+ s3 = work->static_type;
+ s4 = work->type_quals;
+ work->constructor = work->destructor = 0;
+ work->type_quals = TYPE_UNQUALIFIED;
+ work->dllimported = 0;
if ((mangled != NULL) && (*mangled != '\0'))
{
- memset ((char *) work, 0, sizeof (work));
- work -> options = options;
- if ((work->options & DMGL_STYLE_MASK) == 0)
- work->options |= (int)current_demangling_style & DMGL_STYLE_MASK;
-
string_init (&decl);
/* First check to see if gnu style demangling is active and if the
@@ -593,19 +853,48 @@ cplus_demangle (mangled, options)
}
if (work->constructor == 2)
{
- string_prepend(&decl, "global constructors keyed to ");
+ string_prepend (&decl, "global constructors keyed to ");
work->constructor = 0;
}
else if (work->destructor == 2)
{
- string_prepend(&decl, "global destructors keyed to ");
+ string_prepend (&decl, "global destructors keyed to ");
work->destructor = 0;
}
+ else if (work->dllimported == 1)
+ {
+ string_prepend (&decl, "import stub for ");
+ work->dllimported = 0;
+ }
demangled = mop_up (work, &decl, success);
}
+ work->constructor = s1;
+ work->destructor = s2;
+ work->static_type = s3;
+ work->type_quals = s4;
return (demangled);
}
+
+/* Clear out and squangling related storage */
+static void
+squangle_mop_up (work)
+ struct work_stuff *work;
+{
+ /* clean up the B and K type mangling types. */
+ forget_B_and_K_types (work);
+ if (work -> btypevec != NULL)
+ {
+ free ((char *) work -> btypevec);
+ }
+ if (work -> ktypevec != NULL)
+ {
+ free ((char *) work -> ktypevec);
+ }
+}
+
+/* Clear out any mangled storage */
+
static char *
mop_up (work, declp, success)
struct work_stuff *work;
@@ -615,11 +904,13 @@ mop_up (work, declp, success)
char *demangled = NULL;
/* Discard the remembered types, if any. */
-
+
forget_types (work);
if (work -> typevec != NULL)
{
free ((char *) work -> typevec);
+ work -> typevec = NULL;
+ work -> typevec_size = 0;
}
if (work->tmpl_argvec)
{
@@ -628,13 +919,20 @@ mop_up (work, declp, success)
for (i = 0; i < work->ntmpl_args; i++)
if (work->tmpl_argvec[i])
free ((char*) work->tmpl_argvec[i]);
-
+
free ((char*) work->tmpl_argvec);
+ work->tmpl_argvec = NULL;
+ }
+ if (work->previous_argument)
+ {
+ string_delete (work->previous_argument);
+ free ((char*) work->previous_argument);
+ work->previous_argument = NULL;
}
/* If demangling was successful, ensure that the demangled string is null
terminated and return it. Otherwise, free the demangling decl. */
-
+
if (!success)
{
string_delete (declp);
@@ -699,16 +997,22 @@ demangle_signature (work, mangled, declp)
oldmangled = *mangled;
success = demangle_qualified (work, mangled, declp, 1, 0);
if (success)
- {
- remember_type (work, oldmangled, *mangled - oldmangled);
- }
+ remember_type (work, oldmangled, *mangled - oldmangled);
+ if (AUTO_DEMANGLING || GNU_DEMANGLING)
+ expect_func = 1;
+ oldmangled = NULL;
+ break;
+
+ case 'K':
+ oldmangled = *mangled;
+ success = demangle_qualified (work, mangled, declp, 1, 0);
if (AUTO_DEMANGLING || GNU_DEMANGLING)
{
expect_func = 1;
}
oldmangled = NULL;
break;
-
+
case 'S':
/* Static member function */
if (oldmangled == NULL)
@@ -720,36 +1024,70 @@ demangle_signature (work, mangled, declp)
break;
case 'C':
- /* a const member function */
+ case 'V':
+ case 'u':
+ work->type_quals |= code_for_qualifier (**mangled);
+
+ /* a qualified member function */
if (oldmangled == NULL)
+ oldmangled = *mangled;
+ (*mangled)++;
+ break;
+
+ case 'L':
+ /* Local class name follows after "Lnnn_" */
+ if (HP_DEMANGLING)
{
- oldmangled = *mangled;
+ while (**mangled && (**mangled != '_'))
+ (*mangled)++;
+ if (!**mangled)
+ success = 0;
+ else
+ (*mangled)++;
}
- (*mangled)++;
- work -> const_type = 1;
+ else
+ success = 0;
break;
-
+
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
if (oldmangled == NULL)
{
oldmangled = *mangled;
}
+ work->temp_start = -1; /* uppermost call to demangle_class */
success = demangle_class (work, mangled, declp);
if (success)
{
remember_type (work, oldmangled, *mangled - oldmangled);
}
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
+ if (AUTO_DEMANGLING || GNU_DEMANGLING || EDG_DEMANGLING)
{
- expect_func = 1;
+ /* EDG and others will have the "F", so we let the loop cycle
+ if we are looking at one. */
+ if (**mangled != 'F')
+ expect_func = 1;
}
oldmangled = NULL;
break;
-
+
+ case 'B':
+ {
+ string s;
+ success = do_type (work, mangled, &s);
+ if (success)
+ {
+ string_append (&s, SCOPE_STRING (work));
+ string_prepends (declp, &s);
+ }
+ oldmangled = NULL;
+ expect_func = 1;
+ }
+ break;
+
case 'F':
/* Function */
- /* ARM style demangling includes a specific 'F' character after
+ /* ARM/HP style demangling includes a specific 'F' character after
the class name. For GNU style, it is just implied. So we can
safely just consume any 'F' at this point and be compatible
with either style. */
@@ -758,32 +1096,45 @@ demangle_signature (work, mangled, declp)
func_done = 1;
(*mangled)++;
- /* For lucid/ARM style we have to forget any types we might
+ /* For lucid/ARM/HP style we have to forget any types we might
have remembered up to this point, since they were not argument
types. GNU style considers all types seen as available for
back references. See comment in demangle_args() */
- if (LUCID_DEMANGLING || ARM_DEMANGLING)
+ if (LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING)
{
forget_types (work);
}
success = demangle_args (work, mangled, declp);
+ /* After picking off the function args, we expect to either
+ find the function return type (preceded by an '_') or the
+ end of the string. */
+ if (success && (AUTO_DEMANGLING || EDG_DEMANGLING) && **mangled == '_')
+ {
+ ++(*mangled);
+ /* At this level, we do not care about the return type. */
+ success = do_type (work, mangled, &tname);
+ string_delete (&tname);
+ }
+
break;
-
+
case 't':
/* G++ Template */
- string_init(&trawname);
+ string_init(&trawname);
string_init(&tname);
if (oldmangled == NULL)
{
oldmangled = *mangled;
}
- success = demangle_template (work, mangled, &tname, &trawname, 1);
+ success = demangle_template (work, mangled, &tname,
+ &trawname, 1, 1);
if (success)
{
remember_type (work, oldmangled, *mangled - oldmangled);
}
- string_append(&tname, (work -> options & DMGL_JAVA) ? "." : "::");
+ string_append (&tname, SCOPE_STRING (work));
+
string_prepends(declp, &tname);
if (work -> destructor & 1)
{
@@ -803,7 +1154,7 @@ demangle_signature (work, mangled, declp)
break;
case '_':
- if (GNU_DEMANGLING && expect_return_type)
+ if (GNU_DEMANGLING && expect_return_type)
{
/* Read the return type. */
string return_type;
@@ -823,14 +1174,25 @@ demangle_signature (work, mangled, declp)
a mangled name that is either bogus, or has been mangled by
some algorithm we don't know how to deal with. So just
reject the entire demangling. */
- success = 0;
+ /* However, "_nnn" is an expected suffix for alternate entry point
+ numbered nnn for a function, with HP aCC, so skip over that
+ without reporting failure. pai/1997-09-04 */
+ if (HP_DEMANGLING)
+ {
+ (*mangled)++;
+ while (**mangled && isdigit ((unsigned char)**mangled))
+ (*mangled)++;
+ }
+ else
+ success = 0;
break;
case 'H':
- if (GNU_DEMANGLING)
+ if (GNU_DEMANGLING)
{
/* A G++ template function. Read the template arguments. */
- success = demangle_template (work, mangled, declp, 0, 0);
+ success = demangle_template (work, mangled, declp, 0, 0,
+ 0);
if (!(work->constructor & 1))
expect_return_type = 1;
(*mangled)++;
@@ -838,7 +1200,7 @@ demangle_signature (work, mangled, declp)
}
else
/* fall through */
- ;
+ {;}
default:
if (AUTO_DEMANGLING || GNU_DEMANGLING)
@@ -852,7 +1214,7 @@ demangle_signature (work, mangled, declp)
{
/* Non-GNU demanglers use a specific token to mark the start
of the outermost function argument tokens. Typically 'F',
- for ARM-demangling, for example. So if we find something
+ for ARM/HP-demangling, for example. So if we find something
we are not prepared for, it must be an error. */
success = 0;
}
@@ -865,6 +1227,10 @@ demangle_signature (work, mangled, declp)
if (success && expect_func)
{
func_done = 1;
+ if (LUCID_DEMANGLING || ARM_DEMANGLING || EDG_DEMANGLING)
+ {
+ forget_types (work);
+ }
success = demangle_args (work, mangled, declp);
/* Since template include the mangling of their return types,
we must set expect_func to 0 so that we don't try do
@@ -880,20 +1246,23 @@ demangle_signature (work, mangled, declp)
/* With GNU style demangling, bar__3foo is 'foo::bar(void)', and
bar__3fooi is 'foo::bar(int)'. We get here when we find the
first case, and need to ensure that the '(void)' gets added to
- the current declp. Note that with ARM, the first case
+ the current declp. Note that with ARM/HP, the first case
represents the name of a static data member 'foo::bar',
which is in the current declp, so we leave it alone. */
success = demangle_args (work, mangled, declp);
}
}
- if (success && work -> static_type && PRINT_ARG_TYPES)
+ if (success && PRINT_ARG_TYPES)
{
- string_append (declp, " static");
- }
- if (success && work -> const_type && PRINT_ARG_TYPES)
- {
- string_append (declp, " const");
+ if (work->static_type)
+ string_append (declp, " static");
+ if (work->type_quals != TYPE_UNQUALIFIED)
+ {
+ APPEND_BLANK (declp);
+ string_append (declp, qualifier_string (work->type_quals));
+ }
}
+
return (success);
}
@@ -923,47 +1292,400 @@ demangle_method_args (work, mangled, declp)
#endif
static int
-demangle_template (work, mangled, tname, trawname, is_type)
+demangle_template_template_parm (work, mangled, tname)
+ struct work_stuff *work;
+ const char **mangled;
+ string *tname;
+{
+ int i;
+ int r;
+ int need_comma = 0;
+ int success = 1;
+ string temp;
+
+ string_append (tname, "template <");
+ /* get size of template parameter list */
+ if (get_count (mangled, &r))
+ {
+ for (i = 0; i < r; i++)
+ {
+ if (need_comma)
+ {
+ string_append (tname, ", ");
+ }
+
+ /* Z for type parameters */
+ if (**mangled == 'Z')
+ {
+ (*mangled)++;
+ string_append (tname, "class");
+ }
+ /* z for template parameters */
+ else if (**mangled == 'z')
+ {
+ (*mangled)++;
+ success =
+ demangle_template_template_parm (work, mangled, tname);
+ if (!success)
+ {
+ break;
+ }
+ }
+ else
+ {
+ /* temp is initialized in do_type */
+ success = do_type (work, mangled, &temp);
+ if (success)
+ {
+ string_appends (tname, &temp);
+ }
+ string_delete(&temp);
+ if (!success)
+ {
+ break;
+ }
+ }
+ need_comma = 1;
+ }
+
+ }
+ if (tname->p[-1] == '>')
+ string_append (tname, " ");
+ string_append (tname, "> class");
+ return (success);
+}
+
+static int
+demangle_expression (work, mangled, s, tk)
+ struct work_stuff *work;
+ const char** mangled;
+ string* s;
+ type_kind_t tk;
+{
+ int need_operator = 0;
+ int success;
+
+ success = 1;
+ string_appendn (s, "(", 1);
+ (*mangled)++;
+ while (success && **mangled != 'W' && **mangled != '\0')
+ {
+ if (need_operator)
+ {
+ size_t i;
+ size_t len;
+
+ success = 0;
+
+ len = strlen (*mangled);
+
+ for (i = 0;
+ i < sizeof (optable) / sizeof (optable [0]);
+ ++i)
+ {
+ size_t l = strlen (optable[i].in);
+
+ if (l <= len
+ && memcmp (optable[i].in, *mangled, l) == 0)
+ {
+ string_appendn (s, " ", 1);
+ string_append (s, optable[i].out);
+ string_appendn (s, " ", 1);
+ success = 1;
+ (*mangled) += l;
+ break;
+ }
+ }
+
+ if (!success)
+ break;
+ }
+ else
+ need_operator = 1;
+
+ success = demangle_template_value_parm (work, mangled, s, tk);
+ }
+
+ if (**mangled != 'W')
+ success = 0;
+ else
+ {
+ string_appendn (s, ")", 1);
+ (*mangled)++;
+ }
+
+ return success;
+}
+
+static int
+demangle_integral_value (work, mangled, s)
+ struct work_stuff *work;
+ const char** mangled;
+ string* s;
+{
+ int success;
+
+ if (**mangled == 'E')
+ success = demangle_expression (work, mangled, s, tk_integral);
+ else if (**mangled == 'Q' || **mangled == 'K')
+ success = demangle_qualified (work, mangled, s, 0, 1);
+ else
+ {
+ int value;
+
+ success = 0;
+
+ /* Negative numbers are indicated with a leading `m'. */
+ if (**mangled == 'm')
+ {
+ string_appendn (s, "-", 1);
+ (*mangled)++;
+ }
+
+ /* Read the rest of the number. */
+ value = consume_count_with_underscores (mangled);
+ if (value != -1)
+ {
+ char buf[INTBUF_SIZE];
+ sprintf (buf, "%d", value);
+ string_append (s, buf);
+
+ /* If the next character is an underscore, skip it. */
+ if (**mangled == '_')
+ (*mangled)++;
+
+ /* All is well. */
+ success = 1;
+ }
+ }
+
+ return success;
+}
+
+/* Demangle the real value in MANGLED. */
+
+static int
+demangle_real_value (work, mangled, s)
+ struct work_stuff *work;
+ const char **mangled;
+ string* s;
+{
+ if (**mangled == 'E')
+ return demangle_expression (work, mangled, s, tk_real);
+
+ if (**mangled == 'm')
+ {
+ string_appendn (s, "-", 1);
+ (*mangled)++;
+ }
+ while (isdigit ((unsigned char)**mangled))
+ {
+ string_appendn (s, *mangled, 1);
+ (*mangled)++;
+ }
+ if (**mangled == '.') /* fraction */
+ {
+ string_appendn (s, ".", 1);
+ (*mangled)++;
+ while (isdigit ((unsigned char)**mangled))
+ {
+ string_appendn (s, *mangled, 1);
+ (*mangled)++;
+ }
+ }
+ if (**mangled == 'e') /* exponent */
+ {
+ string_appendn (s, "e", 1);
+ (*mangled)++;
+ while (isdigit ((unsigned char)**mangled))
+ {
+ string_appendn (s, *mangled, 1);
+ (*mangled)++;
+ }
+ }
+
+ return 1;
+}
+
+static int
+demangle_template_value_parm (work, mangled, s, tk)
+ struct work_stuff *work;
+ const char **mangled;
+ string* s;
+ type_kind_t tk;
+{
+ int success = 1;
+
+ if (**mangled == 'Y')
+ {
+ /* The next argument is a template parameter. */
+ int idx;
+
+ (*mangled)++;
+ idx = consume_count_with_underscores (mangled);
+ if (idx == -1
+ || (work->tmpl_argvec && idx >= work->ntmpl_args)
+ || consume_count_with_underscores (mangled) == -1)
+ return -1;
+ if (work->tmpl_argvec)
+ string_append (s, work->tmpl_argvec[idx]);
+ else
+ string_append_template_idx (s, idx);
+ }
+ else if (tk == tk_integral)
+ success = demangle_integral_value (work, mangled, s);
+ else if (tk == tk_char)
+ {
+ char tmp[2];
+ int val;
+ if (**mangled == 'm')
+ {
+ string_appendn (s, "-", 1);
+ (*mangled)++;
+ }
+ string_appendn (s, "'", 1);
+ val = consume_count(mangled);
+ if (val <= 0)
+ success = 0;
+ else
+ {
+ tmp[0] = (char)val;
+ tmp[1] = '\0';
+ string_appendn (s, &tmp[0], 1);
+ string_appendn (s, "'", 1);
+ }
+ }
+ else if (tk == tk_bool)
+ {
+ int val = consume_count (mangled);
+ if (val == 0)
+ string_appendn (s, "false", 5);
+ else if (val == 1)
+ string_appendn (s, "true", 4);
+ else
+ success = 0;
+ }
+ else if (tk == tk_real)
+ success = demangle_real_value (work, mangled, s);
+ else if (tk == tk_pointer || tk == tk_reference)
+ {
+ if (**mangled == 'Q')
+ success = demangle_qualified (work, mangled, s,
+ /*isfuncname=*/0,
+ /*append=*/1);
+ else
+ {
+ int symbol_len = consume_count (mangled);
+ if (symbol_len == -1)
+ return -1;
+ if (symbol_len == 0)
+ string_appendn (s, "0", 1);
+ else
+ {
+ char *p = xmalloc (symbol_len + 1), *q;
+ strncpy (p, *mangled, symbol_len);
+ p [symbol_len] = '\0';
+ /* We use cplus_demangle here, rather than
+ internal_cplus_demangle, because the name of the entity
+ mangled here does not make use of any of the squangling
+ or type-code information we have built up thus far; it is
+ mangled independently. */
+ q = cplus_demangle (p, work->options);
+ if (tk == tk_pointer)
+ string_appendn (s, "&", 1);
+ /* FIXME: Pointer-to-member constants should get a
+ qualifying class name here. */
+ if (q)
+ {
+ string_append (s, q);
+ free (q);
+ }
+ else
+ string_append (s, p);
+ free (p);
+ }
+ *mangled += symbol_len;
+ }
+ }
+
+ return success;
+}
+
+/* Demangle the template name in MANGLED. The full name of the
+ template (e.g., S<int>) is placed in TNAME. The name without the
+ template parameters (e.g. S) is placed in TRAWNAME if TRAWNAME is
+ non-NULL. If IS_TYPE is nonzero, this template is a type template,
+ not a function template. If both IS_TYPE and REMEMBER are nonzero,
+ the tmeplate is remembered in the list of back-referenceable
+ types. */
+
+static int
+demangle_template (work, mangled, tname, trawname, is_type, remember)
struct work_stuff *work;
const char **mangled;
string *tname;
string *trawname;
int is_type;
+ int remember;
{
int i;
- int is_pointer;
- int is_real;
- int is_integral;
- int is_char;
- int is_bool;
int r;
int need_comma = 0;
int success = 0;
- int done;
- const char *old_p;
const char *start;
- int symbol_len;
int is_java_array = 0;
string temp;
+ int bindex = 0;
(*mangled)++;
if (is_type)
{
+ if (remember)
+ bindex = register_Btype (work);
start = *mangled;
/* get template name */
- if ((r = consume_count (mangled)) == 0 || strlen (*mangled) < r)
+ if (**mangled == 'z')
{
- return (0);
+ int idx;
+ (*mangled)++;
+ (*mangled)++;
+
+ idx = consume_count_with_underscores (mangled);
+ if (idx == -1
+ || (work->tmpl_argvec && idx >= work->ntmpl_args)
+ || consume_count_with_underscores (mangled) == -1)
+ return (0);
+
+ if (work->tmpl_argvec)
+ {
+ string_append (tname, work->tmpl_argvec[idx]);
+ if (trawname)
+ string_append (trawname, work->tmpl_argvec[idx]);
+ }
+ else
+ {
+ string_append_template_idx (tname, idx);
+ if (trawname)
+ string_append_template_idx (trawname, idx);
+ }
}
- if (trawname)
- string_appendn (trawname, *mangled, r);
- is_java_array = (work -> options & DMGL_JAVA)
- && strncmp (*mangled, "JArray1Z", 8) == 0;
- if (! is_java_array)
+ else
{
- string_appendn (tname, *mangled, r);
+ if ((r = consume_count (mangled)) <= 0
+ || (int) strlen (*mangled) < r)
+ {
+ return (0);
+ }
+ is_java_array = (work -> options & DMGL_JAVA)
+ && strncmp (*mangled, "JArray1Z", 8) == 0;
+ if (! is_java_array)
+ {
+ string_appendn (tname, *mangled, r);
+ }
+ if (trawname)
+ string_appendn (trawname, *mangled, r);
+ *mangled += r;
}
- *mangled += r;
}
if (!is_java_array)
string_append (tname, "<");
@@ -1011,35 +1733,46 @@ demangle_template (work, mangled, tname, trawname, is_type)
break;
}
}
+ /* z for template parameters */
+ else if (**mangled == 'z')
+ {
+ int r2;
+ (*mangled)++;
+ success = demangle_template_template_parm (work, mangled, tname);
+
+ if (success
+ && (r2 = consume_count (mangled)) > 0
+ && (int) strlen (*mangled) >= r2)
+ {
+ string_append (tname, " ");
+ string_appendn (tname, *mangled, r2);
+ if (!is_type)
+ {
+ /* Save the template argument. */
+ int len = r2;
+ work->tmpl_argvec[i] = xmalloc (len + 1);
+ memcpy (work->tmpl_argvec[i], *mangled, len);
+ work->tmpl_argvec[i][len] = '\0';
+ }
+ *mangled += r2;
+ }
+ if (!success)
+ {
+ break;
+ }
+ }
else
{
string param;
string* s;
/* otherwise, value parameter */
- old_p = *mangled;
- is_pointer = 0;
- is_real = 0;
- is_integral = 0;
- is_char = 0;
- is_bool = 0;
- done = 0;
+
/* temp is initialized in do_type */
success = do_type (work, mangled, &temp);
- /*
- if (success)
- {
- string_appends (s, &temp);
- }
- */
string_delete(&temp);
if (!success)
- {
- break;
- }
- /*
- string_append (s, "=");
- */
+ break;
if (!is_type)
{
@@ -1049,200 +1782,24 @@ demangle_template (work, mangled, tname, trawname, is_type)
else
s = tname;
- while (*old_p && !done)
- {
- switch (*old_p)
- {
- case 'P':
- case 'p':
- case 'R':
- done = is_pointer = 1;
- break;
- case 'C': /* const */
- case 'S': /* explicitly signed [char] */
- case 'U': /* unsigned */
- case 'V': /* volatile */
- case 'F': /* function */
- case 'M': /* member function */
- case 'O': /* ??? */
- case 'J': /* complex */
- old_p++;
- continue;
- case 'Q': /* qualified name */
- done = is_integral = 1;
- break;
- case 'T': /* remembered type */
- abort ();
- break;
- case 'v': /* void */
- abort ();
- break;
- case 'x': /* long long */
- case 'l': /* long */
- case 'i': /* int */
- case 's': /* short */
- case 'w': /* wchar_t */
- done = is_integral = 1;
- break;
- case 'b': /* bool */
- done = is_bool = 1;
- break;
- case 'c': /* char */
- done = is_char = 1;
- break;
- case 'r': /* long double */
- case 'd': /* double */
- case 'f': /* float */
- done = is_real = 1;
- break;
- default:
- /* it's probably user defined type, let's assume
- it's integral, it seems hard to figure out
- what it really is */
- done = is_integral = 1;
- }
- }
- if (**mangled == 'Y')
- {
- /* The next argument is a template parameter. */
- int idx;
+ success = demangle_template_value_parm (work, mangled, s,
+ (type_kind_t) success);
- (*mangled)++;
- idx = consume_count_with_underscores (mangled);
- if (idx == -1
- || (work->tmpl_argvec && idx >= work->ntmpl_args)
- || consume_count_with_underscores (mangled) == -1)
- {
- success = 0;
- if (!is_type)
- string_delete (s);
- break;
- }
- if (work->tmpl_argvec)
- string_append (s, work->tmpl_argvec[idx]);
- else
- {
- char buf[10];
- sprintf(buf, "T%d", idx);
- string_append (s, buf);
- }
- }
- else if (is_integral)
- {
- if (**mangled == 'm')
- {
- string_appendn (s, "-", 1);
- (*mangled)++;
- }
- while (isdigit (**mangled))
- {
- string_appendn (s, *mangled, 1);
- (*mangled)++;
- }
- }
- else if (is_char)
- {
- char tmp[2];
- int val;
- if (**mangled == 'm')
- {
- string_appendn (s, "-", 1);
- (*mangled)++;
- }
- string_appendn (s, "'", 1);
- val = consume_count(mangled);
- if (val == 0)
- {
- success = 0;
- if (!is_type)
- string_delete (s);
- break;
- }
- tmp[0] = (char)val;
- tmp[1] = '\0';
- string_appendn (s, &tmp[0], 1);
- string_appendn (s, "'", 1);
- }
- else if (is_bool)
- {
- int val = consume_count (mangled);
- if (val == 0)
- string_appendn (s, "false", 5);
- else if (val == 1)
- string_appendn (s, "true", 4);
- else
- success = 0;
- }
- else if (is_real)
- {
- if (**mangled == 'm')
- {
- string_appendn (s, "-", 1);
- (*mangled)++;
- }
- while (isdigit (**mangled))
- {
- string_appendn (s, *mangled, 1);
- (*mangled)++;
- }
- if (**mangled == '.') /* fraction */
- {
- string_appendn (s, ".", 1);
- (*mangled)++;
- while (isdigit (**mangled))
- {
- string_appendn (s, *mangled, 1);
- (*mangled)++;
- }
- }
- if (**mangled == 'e') /* exponent */
- {
- string_appendn (s, "e", 1);
- (*mangled)++;
- while (isdigit (**mangled))
- {
- string_appendn (s, *mangled, 1);
- (*mangled)++;
- }
- }
- }
- else if (is_pointer)
+ if (!success)
{
- symbol_len = consume_count (mangled);
- if (symbol_len == 0)
- {
- success = 0;
- if (!is_type)
- string_delete (s);
- break;
- }
- if (symbol_len == 0)
- string_appendn (s, "0", 1);
- else
- {
- char *p = xmalloc (symbol_len + 1), *q;
- strncpy (p, *mangled, symbol_len);
- p [symbol_len] = '\0';
- q = cplus_demangle (p, work->options);
- string_appendn (s, "&", 1);
- if (q)
- {
- string_append (s, q);
- free (q);
- }
- else
- string_append (s, p);
- free (p);
- }
- *mangled += symbol_len;
+ if (!is_type)
+ string_delete (s);
+ success = 0;
+ break;
}
+
if (!is_type)
{
int len = s->p - s->b;
work->tmpl_argvec[i] = xmalloc (len + 1);
memcpy (work->tmpl_argvec[i], s->b, len);
work->tmpl_argvec[i][len] = '\0';
-
+
string_appends (tname, s);
string_delete (s);
}
@@ -1259,7 +1816,10 @@ demangle_template (work, mangled, tname, trawname, is_type)
string_append (tname, " ");
string_append (tname, ">");
}
-
+
+ if (is_type && remember)
+ remember_Btype (work, tname->b, LEN_STRING (tname), bindex);
+
/*
if (work -> static_type)
{
@@ -1283,23 +1843,58 @@ arm_pt (work, mangled, n, anchor, args)
int n;
const char **anchor, **args;
{
- /* ARM template? */
- if (ARM_DEMANGLING && (*anchor = mystrstr (mangled, "__pt__")))
+ /* Check if ARM template with "__pt__" in it ("parameterized type") */
+ /* Allow HP also here, because HP's cfront compiler follows ARM to some extent */
+ if ((ARM_DEMANGLING || HP_DEMANGLING) && (*anchor = mystrstr (mangled, "__pt__")))
{
int len;
*args = *anchor + 6;
len = consume_count (args);
+ if (len == -1)
+ return 0;
if (*args + len == mangled + n && **args == '_')
{
++*args;
return 1;
}
}
+ if (AUTO_DEMANGLING || EDG_DEMANGLING)
+ {
+ if ((*anchor = mystrstr (mangled, "__tm__"))
+ || (*anchor = mystrstr (mangled, "__ps__"))
+ || (*anchor = mystrstr (mangled, "__pt__")))
+ {
+ int len;
+ *args = *anchor + 6;
+ len = consume_count (args);
+ if (len == -1)
+ return 0;
+ if (*args + len == mangled + n && **args == '_')
+ {
+ ++*args;
+ return 1;
+ }
+ }
+ else if ((*anchor = mystrstr (mangled, "__S")))
+ {
+ int len;
+ *args = *anchor + 3;
+ len = consume_count (args);
+ if (len == -1)
+ return 0;
+ if (*args + len == mangled + n && **args == '_')
+ {
+ ++*args;
+ return 1;
+ }
+ }
+ }
+
return 0;
}
static void
-demangle_arm_pt (work, mangled, n, declp)
+demangle_arm_hp_template (work, mangled, n, declp)
struct work_stuff *work;
const char **mangled;
int n;
@@ -1308,32 +1903,150 @@ demangle_arm_pt (work, mangled, n, declp)
const char *p;
const char *args;
const char *e = *mangled + n;
+ string arg;
- /* ARM template? */
- if (arm_pt (work, *mangled, n, &p, &args))
+ /* Check for HP aCC template spec: classXt1t2 where t1, t2 are
+ template args */
+ if (HP_DEMANGLING && ((*mangled)[n] == 'X'))
+ {
+ char *start_spec_args = NULL;
+
+ /* First check for and omit template specialization pseudo-arguments,
+ such as in "Spec<#1,#1.*>" */
+ start_spec_args = strchr (*mangled, '<');
+ if (start_spec_args && (start_spec_args - *mangled < n))
+ string_appendn (declp, *mangled, start_spec_args - *mangled);
+ else
+ string_appendn (declp, *mangled, n);
+ (*mangled) += n + 1;
+ string_init (&arg);
+ if (work->temp_start == -1) /* non-recursive call */
+ work->temp_start = declp->p - declp->b;
+ string_append (declp, "<");
+ while (1)
+ {
+ string_clear (&arg);
+ switch (**mangled)
+ {
+ case 'T':
+ /* 'T' signals a type parameter */
+ (*mangled)++;
+ if (!do_type (work, mangled, &arg))
+ goto hpacc_template_args_done;
+ break;
+
+ case 'U':
+ case 'S':
+ /* 'U' or 'S' signals an integral value */
+ if (!do_hpacc_template_const_value (work, mangled, &arg))
+ goto hpacc_template_args_done;
+ break;
+
+ case 'A':
+ /* 'A' signals a named constant expression (literal) */
+ if (!do_hpacc_template_literal (work, mangled, &arg))
+ goto hpacc_template_args_done;
+ break;
+
+ default:
+ /* Today, 1997-09-03, we have only the above types
+ of template parameters */
+ /* FIXME: maybe this should fail and return null */
+ goto hpacc_template_args_done;
+ }
+ string_appends (declp, &arg);
+ /* Check if we're at the end of template args.
+ 0 if at end of static member of template class,
+ _ if done with template args for a function */
+ if ((**mangled == '\000') || (**mangled == '_'))
+ break;
+ else
+ string_append (declp, ",");
+ }
+ hpacc_template_args_done:
+ string_append (declp, ">");
+ string_delete (&arg);
+ if (**mangled == '_')
+ (*mangled)++;
+ return;
+ }
+ /* ARM template? (Also handles HP cfront extensions) */
+ else if (arm_pt (work, *mangled, n, &p, &args))
{
- string arg;
+ string type_str;
+
string_init (&arg);
string_appendn (declp, *mangled, p - *mangled);
+ if (work->temp_start == -1) /* non-recursive call */
+ work->temp_start = declp->p - declp->b;
string_append (declp, "<");
/* should do error checking here */
while (args < e) {
string_clear (&arg);
- do_type (work, &args, &arg);
+
+ /* Check for type or literal here */
+ switch (*args)
+ {
+ /* HP cfront extensions to ARM for template args */
+ /* spec: Xt1Lv1 where t1 is a type, v1 is a literal value */
+ /* FIXME: We handle only numeric literals for HP cfront */
+ case 'X':
+ /* A typed constant value follows */
+ args++;
+ if (!do_type (work, &args, &type_str))
+ goto cfront_template_args_done;
+ string_append (&arg, "(");
+ string_appends (&arg, &type_str);
+ string_append (&arg, ")");
+ if (*args != 'L')
+ goto cfront_template_args_done;
+ args++;
+ /* Now snarf a literal value following 'L' */
+ if (!snarf_numeric_literal (&args, &arg))
+ goto cfront_template_args_done;
+ break;
+
+ case 'L':
+ /* Snarf a literal following 'L' */
+ args++;
+ if (!snarf_numeric_literal (&args, &arg))
+ goto cfront_template_args_done;
+ break;
+ default:
+ /* Not handling other HP cfront stuff */
+ if (!do_type (work, &args, &arg))
+ goto cfront_template_args_done;
+ }
string_appends (declp, &arg);
string_append (declp, ",");
}
+ cfront_template_args_done:
string_delete (&arg);
- --declp->p;
+ if (args >= e)
+ --declp->p; /* remove extra comma */
string_append (declp, ">");
}
+ else if (n>10 && strncmp (*mangled, "_GLOBAL_", 8) == 0
+ && (*mangled)[9] == 'N'
+ && (*mangled)[8] == (*mangled)[10]
+ && strchr (cplus_markers, (*mangled)[8]))
+ {
+ /* A member of the anonymous namespace. */
+ string_append (declp, "{anonymous}");
+ }
else
{
+ if (work->temp_start == -1) /* non-recursive call only */
+ work->temp_start = 0; /* disable in recursive calls */
string_appendn (declp, *mangled, n);
}
*mangled += n;
}
+/* Extract a class name, possibly a template with arguments, from the
+ mangled string; qualifiers, local class indicators, etc. have
+ already been dealt with */
+
static int
demangle_class_name (work, mangled, declp)
struct work_stuff *work;
@@ -1344,9 +2057,11 @@ demangle_class_name (work, mangled, declp)
int success = 0;
n = consume_count (mangled);
- if (strlen (*mangled) >= n)
+ if (n == -1)
+ return 0;
+ if ((int) strlen (*mangled) >= n)
{
- demangle_arm_pt (work, mangled, n, declp);
+ demangle_arm_hp_template (work, mangled, n, declp);
success = 1;
}
@@ -1395,13 +2110,22 @@ demangle_class (work, mangled, declp)
string *declp;
{
int success = 0;
+ int btype;
string class_name;
+ char *save_class_name_end = 0;
string_init (&class_name);
+ btype = register_Btype (work);
if (demangle_class_name (work, mangled, &class_name))
{
+ save_class_name_end = class_name.p;
if ((work->constructor & 1) || (work->destructor & 1))
{
+ /* adjust so we don't include template args */
+ if (work->temp_start && (work->temp_start != -1))
+ {
+ class_name.p = class_name.b + work->temp_start;
+ }
string_prepends (declp, &class_name);
if (work -> destructor & 1)
{
@@ -1410,10 +2134,13 @@ demangle_class (work, mangled, declp)
}
else
{
- work -> constructor -= 1;
+ work -> constructor -= 1;
}
}
- string_prepend (declp, (work -> options & DMGL_JAVA) ? "." : "::");
+ class_name.p = save_class_name_end;
+ remember_Ktype (work, class_name.b, LEN_STRING(&class_name));
+ remember_Btype (work, class_name.b, LEN_STRING(&class_name), btype);
+ string_prepend (declp, SCOPE_STRING (work));
string_prepends (declp, &class_name);
success = 1;
}
@@ -1448,7 +2175,7 @@ DESCRIPTION
the mangled name. Upon exit, it should point to the first character
of the signature if demangling was successful, or to the first
unconsumed character if demangling of the prefix was unsuccessful.
-
+
Returns 1 on success, 0 otherwise.
*/
@@ -1462,7 +2189,17 @@ demangle_prefix (work, mangled, declp)
const char *scan;
int i;
- if (strlen(*mangled) >= 11 && strncmp(*mangled, "_GLOBAL_", 8) == 0)
+ if (strlen(*mangled) > 6
+ && (strncmp(*mangled, "_imp__", 6) == 0
+ || strncmp(*mangled, "__imp_", 6) == 0))
+ {
+ /* it's a symbol imported from a PE dynamic library. Check for both
+ new style prefix _imp__ and legacy __imp_ used by older versions
+ of dlltool. */
+ (*mangled) += 6;
+ work->dllimported = 1;
+ }
+ else if (strlen(*mangled) >= 11 && strncmp(*mangled, "_GLOBAL_", 8) == 0)
{
char *marker = strchr (cplus_markers, (*mangled)[8]);
if (marker != NULL && *marker == (*mangled)[10])
@@ -1485,13 +2222,13 @@ demangle_prefix (work, mangled, declp)
}
}
}
- else if (ARM_DEMANGLING && strncmp(*mangled, "__std__", 7) == 0)
+ else if ((ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) && strncmp(*mangled, "__std__", 7) == 0)
{
/* it's a ARM global destructor to be executed at program exit */
(*mangled) += 7;
work->destructor = 2;
}
- else if (ARM_DEMANGLING && strncmp(*mangled, "__sti__", 7) == 0)
+ else if ((ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) && strncmp(*mangled, "__sti__", 7) == 0)
{
/* it's a ARM global constructor to be executed at program initial */
(*mangled) += 7;
@@ -1519,35 +2256,36 @@ demangle_prefix (work, mangled, declp)
i = strspn (scan, "_");
if (i > 2)
{
- scan += (i - 2);
+ scan += (i - 2);
}
}
-
+
if (scan == NULL)
{
success = 0;
}
else if (work -> static_type)
{
- if (!isdigit (scan[0]) && (scan[0] != 't'))
+ if (!isdigit ((unsigned char)scan[0]) && (scan[0] != 't'))
{
success = 0;
}
}
else if ((scan == *mangled)
- && (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't')
- || (scan[2] == 'H')))
+ && (isdigit ((unsigned char)scan[2]) || (scan[2] == 'Q')
+ || (scan[2] == 't') || (scan[2] == 'K') || (scan[2] == 'H')))
{
/* The ARM says nothing about the mangling of local variables.
But cfront mangles local variables by prepending __<nesting_level>
to them. As an extension to ARM demangling we handle this case. */
- if ((LUCID_DEMANGLING || ARM_DEMANGLING) && isdigit (scan[2]))
+ if ((LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING)
+ && isdigit ((unsigned char)scan[2]))
{
*mangled = scan + 2;
consume_count (mangled);
string_append (declp, *mangled);
*mangled += strlen (*mangled);
- success = 1;
+ success = 1;
}
else
{
@@ -1555,18 +2293,37 @@ demangle_prefix (work, mangled, declp)
names like __Q2_3foo3bar for nested type names. So don't accept
this style of constructor for cfront demangling. A GNU
style member-template constructor starts with 'H'. */
- if (!(LUCID_DEMANGLING || ARM_DEMANGLING))
+ if (!(LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING))
work -> constructor += 1;
*mangled = scan + 2;
}
}
- else if ((scan == *mangled) && !isdigit (scan[2]) && (scan[2] != 't'))
+ else if (ARM_DEMANGLING && scan[2] == 'p' && scan[3] == 't')
+ {
+ /* Cfront-style parameterized type. Handled later as a signature. */
+ success = 1;
+
+ /* ARM template? */
+ demangle_arm_hp_template (work, mangled, strlen (*mangled), declp);
+ }
+ else if (EDG_DEMANGLING && ((scan[2] == 't' && scan[3] == 'm')
+ || (scan[2] == 'p' && scan[3] == 's')
+ || (scan[2] == 'p' && scan[3] == 't')))
+ {
+ /* EDG-style parameterized type. Handled later as a signature. */
+ success = 1;
+
+ /* EDG template? */
+ demangle_arm_hp_template (work, mangled, strlen (*mangled), declp);
+ }
+ else if ((scan == *mangled) && !isdigit ((unsigned char)scan[2])
+ && (scan[2] != 't'))
{
/* Mangled name starts with "__". Skip over any leading '_' characters,
then find the next "__" that separates the prefix from the signature.
*/
- if (!(ARM_DEMANGLING || LUCID_DEMANGLING)
- || (arm_special (work, mangled, declp) == 0))
+ if (!(ARM_DEMANGLING || LUCID_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING)
+ || (arm_special (mangled, declp) == 0))
{
while (*scan == '_')
{
@@ -1580,18 +2337,22 @@ demangle_prefix (work, mangled, declp)
}
else
{
- demangle_function_name (work, mangled, declp, scan);
+ const char *tmp;
+
+ /* Look for the LAST occurrence of __, allowing names to
+ have the '__' sequence embedded in them. */
+ if (!(ARM_DEMANGLING || HP_DEMANGLING))
+ {
+ while ((tmp = mystrstr (scan + 2, "__")) != NULL)
+ scan = tmp;
+ }
+ if (*(scan + 2) == '\0')
+ success = 0;
+ else
+ demangle_function_name (work, mangled, declp, scan);
}
}
}
- else if (ARM_DEMANGLING && scan[2] == 'p' && scan[3] == 't')
- {
- /* Cfront-style parameterized type. Handled later as a signature. */
- success = 1;
-
- /* ARM template? */
- demangle_arm_pt (work, mangled, strlen (*mangled), declp);
- }
else if (*(scan + 2) != '\0')
{
/* Mangled name does not start with "__" but does have one somewhere
@@ -1610,7 +2371,7 @@ demangle_prefix (work, mangled, declp)
string_append (declp, *mangled);
*mangled += strlen (*mangled);
success = 1;
- }
+ }
return (success);
}
@@ -1679,24 +2440,25 @@ gnu_special (work, mangled, declp)
(*mangled) += 4; /* Old style, no thunks: "_vt<CPLUS_MARKER>" */
while (**mangled != '\0')
{
- p = strpbrk (*mangled, cplus_markers);
switch (**mangled)
{
case 'Q':
+ case 'K':
success = demangle_qualified (work, mangled, declp, 0, 1);
break;
case 't':
- success = demangle_template (work, mangled, declp, 0, 1);
+ success = demangle_template (work, mangled, declp, 0, 1,
+ 1);
break;
default:
- if (isdigit(*mangled[0]))
+ if (isdigit((unsigned char)*mangled[0]))
{
n = consume_count(mangled);
/* We may be seeing a too-large size, or else a
".<digits>" indicating a static local symbol. In
any case, declare victory and move on; *don't* try
to use n to allocate. */
- if (n >= strlen (*mangled))
+ if (n > (int) strlen (*mangled))
{
success = 1;
break;
@@ -1710,12 +2472,12 @@ gnu_special (work, mangled, declp)
(*mangled) += n;
}
+ p = strpbrk (*mangled, cplus_markers);
if (success && ((p == NULL) || (p == *mangled)))
{
if (p != NULL)
{
- string_append (declp,
- (work -> options & DMGL_JAVA) ? "." : "::");
+ string_append (declp, SCOPE_STRING (work));
(*mangled)++;
}
}
@@ -1737,13 +2499,19 @@ gnu_special (work, mangled, declp)
switch (**mangled)
{
case 'Q':
+ case 'K':
success = demangle_qualified (work, mangled, declp, 0, 1);
break;
case 't':
- success = demangle_template (work, mangled, declp, 0, 1);
+ success = demangle_template (work, mangled, declp, 0, 1, 1);
break;
default:
n = consume_count (mangled);
+ if (n < 0 || n > (long) strlen (*mangled))
+ {
+ success = 0;
+ break;
+ }
string_appendn (declp, *mangled, n);
(*mangled) += n;
}
@@ -1752,7 +2520,7 @@ gnu_special (work, mangled, declp)
/* Consumed everything up to the cplus_marker, append the
variable name. */
(*mangled)++;
- string_append (declp, (work -> options & DMGL_JAVA) ? "." : "::");
+ string_append (declp, SCOPE_STRING (work));
n = strlen (*mangled);
string_appendn (declp, *mangled, n);
(*mangled) += n;
@@ -1764,21 +2532,30 @@ gnu_special (work, mangled, declp)
}
else if (strncmp (*mangled, "__thunk_", 8) == 0)
{
- int delta = ((*mangled) += 8, consume_count (mangled));
- char *method = cplus_demangle (++*mangled, work->options);
- if (method)
- {
- char buf[50];
- sprintf (buf, "virtual function thunk (delta:%d) for ", -delta);
- string_append (declp, buf);
- string_append (declp, method);
- free (method);
- n = strlen (*mangled);
- (*mangled) += n;
- }
+ int delta;
+
+ (*mangled) += 8;
+ delta = consume_count (mangled);
+ if (delta == -1)
+ success = 0;
else
{
- success = 0;
+ char *method = internal_cplus_demangle (work, ++*mangled);
+
+ if (method)
+ {
+ char buf[50];
+ sprintf (buf, "virtual function thunk (delta:%d) for ", -delta);
+ string_append (declp, buf);
+ string_append (declp, method);
+ free (method);
+ n = strlen (*mangled);
+ (*mangled) += n;
+ }
+ else
+ {
+ success = 0;
+ }
}
}
else if (strncmp (*mangled, "__t", 3) == 0
@@ -1789,10 +2566,11 @@ gnu_special (work, mangled, declp)
switch (**mangled)
{
case 'Q':
+ case 'K':
success = demangle_qualified (work, mangled, declp, 0, 1);
break;
case 't':
- success = demangle_template (work, mangled, declp, 0, 1);
+ success = demangle_template (work, mangled, declp, 0, 1, 1);
break;
default:
success = demangle_fund_type (work, mangled, declp);
@@ -1810,6 +2588,35 @@ gnu_special (work, mangled, declp)
return (success);
}
+static void
+recursively_demangle(work, mangled, result, namelength)
+ struct work_stuff *work;
+ const char **mangled;
+ string *result;
+ int namelength;
+{
+ char * recurse = (char *)NULL;
+ char * recurse_dem = (char *)NULL;
+
+ recurse = (char *) xmalloc (namelength + 1);
+ memcpy (recurse, *mangled, namelength);
+ recurse[namelength] = '\000';
+
+ recurse_dem = cplus_demangle (recurse, work->options);
+
+ if (recurse_dem)
+ {
+ string_append (result, recurse_dem);
+ free (recurse_dem);
+ }
+ else
+ {
+ string_appendn (result, *mangled, namelength);
+ }
+ free (recurse);
+ *mangled += namelength;
+}
+
/*
LOCAL FUNCTION
@@ -1819,8 +2626,8 @@ LOCAL FUNCTION
SYNOPSIS
static int
- arm_special (struct work_stuff *work, const char **mangled,
- string *declp);
+ arm_special (const char **mangled,
+ string *declp);
DESCRIPTION
@@ -1834,8 +2641,7 @@ DESCRIPTION
*/
static int
-arm_special (work, mangled, declp)
- struct work_stuff *work;
+arm_special (mangled, declp)
const char **mangled;
string *declp;
{
@@ -1853,7 +2659,7 @@ arm_special (work, mangled, declp)
while (*scan != '\0') /* first check it can be demangled */
{
n = consume_count (&scan);
- if (n==0)
+ if (n == -1)
{
return (0); /* no good */
}
@@ -1867,6 +2673,9 @@ arm_special (work, mangled, declp)
while (**mangled != '\0')
{
n = consume_count (mangled);
+ if (n == -1
+ || n > (long) strlen (*mangled))
+ return 0;
string_prependn (declp, *mangled, n);
(*mangled) += n;
if ((*mangled)[0] == '_' && (*mangled)[1] == '_')
@@ -1924,33 +2733,43 @@ demangle_qualified (work, mangled, result, isfuncname, append)
int isfuncname;
int append;
{
- int qualifiers;
- int namelength;
+ int qualifiers = 0;
int success = 1;
- const char *p;
char num[2];
string temp;
+ string last_name;
+ int bindex = register_Btype (work);
+
+ /* We only make use of ISFUNCNAME if the entity is a constructor or
+ destructor. */
+ isfuncname = (isfuncname
+ && ((work->constructor & 1) || (work->destructor & 1)));
string_init (&temp);
- switch ((*mangled)[1])
+ string_init (&last_name);
+
+ if ((*mangled)[0] == 'K')
+ {
+ /* Squangling qualified name reuse */
+ int idx;
+ (*mangled)++;
+ idx = consume_count_with_underscores (mangled);
+ if (idx == -1 || idx >= work -> numk)
+ success = 0;
+ else
+ string_append (&temp, work -> ktypevec[idx]);
+ }
+ else
+ switch ((*mangled)[1])
{
case '_':
/* GNU mangled name with more than 9 classes. The count is preceded
by an underscore (to distinguish it from the <= 9 case) and followed
by an underscore. */
- p = *mangled + 2;
- qualifiers = atoi (p);
- if (!isdigit (*p) || *p == '0')
- success = 0;
-
- /* Skip the digits. */
- while (isdigit (*p))
- ++p;
-
- if (*p != '_')
+ (*mangled)++;
+ qualifiers = consume_count_with_underscores (mangled);
+ if (qualifiers == -1)
success = 0;
-
- *mangled = p + 1;
break;
case '1':
@@ -1990,67 +2809,98 @@ demangle_qualified (work, mangled, result, isfuncname, append)
while (qualifiers-- > 0)
{
- if (*mangled[0] == '_')
- *mangled = *mangled + 1;
+ int remember_K = 1;
+ string_clear (&last_name);
+
+ if (*mangled[0] == '_')
+ (*mangled)++;
+
if (*mangled[0] == 't')
{
- success = demangle_template(work, mangled, &temp, 0, 1);
- if (!success) break;
+ /* Here we always append to TEMP since we will want to use
+ the template name without the template parameters as a
+ constructor or destructor name. The appropriate
+ (parameter-less) value is returned by demangle_template
+ in LAST_NAME. We do not remember the template type here,
+ in order to match the G++ mangling algorithm. */
+ success = demangle_template(work, mangled, &temp,
+ &last_name, 1, 0);
+ if (!success)
+ break;
}
- else if (*mangled[0] == 'X')
+ else if (*mangled[0] == 'K')
{
- success = do_type (work, mangled, &temp);
+ int idx;
+ (*mangled)++;
+ idx = consume_count_with_underscores (mangled);
+ if (idx == -1 || idx >= work->numk)
+ success = 0;
+ else
+ string_append (&temp, work->ktypevec[idx]);
+ remember_K = 0;
+
if (!success) break;
}
else
- {
- namelength = consume_count (mangled);
- if (strlen (*mangled) < namelength)
- {
- /* Simple sanity check failed */
- success = 0;
- break;
- }
- string_appendn (&temp, *mangled, namelength);
- *mangled += namelength;
+ {
+ if (EDG_DEMANGLING)
+ {
+ int namelength;
+ /* Now recursively demangle the qualifier
+ * This is necessary to deal with templates in
+ * mangling styles like EDG */
+ namelength = consume_count (mangled);
+ if (namelength == -1)
+ {
+ success = 0;
+ break;
+ }
+ recursively_demangle(work, mangled, &temp, namelength);
+ }
+ else
+ {
+ success = do_type (work, mangled, &last_name);
+ if (!success)
+ break;
+ string_appends (&temp, &last_name);
+ }
}
+
+ if (remember_K)
+ remember_Ktype (work, temp.b, LEN_STRING (&temp));
+
if (qualifiers > 0)
- {
- string_append (&temp, (work -> options & DMGL_JAVA) ? "." : "::");
- }
+ string_append (&temp, SCOPE_STRING (work));
}
+ remember_Btype (work, temp.b, LEN_STRING (&temp), bindex);
+
/* If we are using the result as a function name, we need to append
the appropriate '::' separated constructor or destructor name.
We do this here because this is the most convenient place, where
we already have a pointer to the name and the length of the name. */
- if (isfuncname && (work->constructor & 1 || work->destructor & 1))
+ if (isfuncname)
{
- string_append (&temp, (work -> options & DMGL_JAVA) ? "." : "::");
+ string_append (&temp, SCOPE_STRING (work));
if (work -> destructor & 1)
- {
- string_append (&temp, "~");
- }
- string_appendn (&temp, (*mangled) - namelength, namelength);
+ string_append (&temp, "~");
+ string_appends (&temp, &last_name);
}
- /* Now either prepend the temp buffer to the result, or append it,
+ /* Now either prepend the temp buffer to the result, or append it,
depending upon the state of the append flag. */
if (append)
- {
- string_appends (result, &temp);
- }
+ string_appends (result, &temp);
else
{
if (!STRING_EMPTY (result))
- {
- string_append (&temp, (work -> options & DMGL_JAVA) ? "." : "::");
- }
+ string_append (&temp, SCOPE_STRING (work));
string_prepends (result, &temp);
}
+ string_delete (&last_name);
string_delete (&temp);
return (success);
}
@@ -2068,7 +2918,37 @@ SYNOPSIS
DESCRIPTION
- Return 0 if no conversion is performed, 1 if a string is converted.
+ Assume that *type points at a count in a mangled name; set
+ *count to its value, and set *type to the next character after
+ the count. There are some weird rules in effect here.
+
+ If *type does not point at a string of digits, return zero.
+
+ If *type points at a string of digits followed by an
+ underscore, set *count to their value as an integer, advance
+ *type to point *after the underscore, and return 1.
+
+ If *type points at a string of digits not followed by an
+ underscore, consume only the first digit. Set *count to its
+ value as an integer, leave *type pointing after that digit,
+ and return 1.
+
+ The excuse for this odd behavior: in the ARM and HP demangling
+ styles, a type can be followed by a repeat count of the form
+ `Nxy', where:
+
+ `x' is a single digit specifying how many additional copies
+ of the type to append to the argument list, and
+
+ `y' is one or more digits, specifying the zero-based index of
+ the first repeated argument in the list. Yes, as you're
+ unmangling the name you can figure this out yourself, but
+ it's there anyway.
+
+ So, for example, in `bar__3fooFPiN51', the first argument is a
+ pointer to an integer (`Pi'), and then the next five arguments
+ are the same (`N5'), and the first repeat is the function's
+ second argument (`1').
*/
static int
@@ -2079,25 +2959,23 @@ get_count (type, count)
const char *p;
int n;
- if (!isdigit (**type))
- {
- return (0);
- }
+ if (!isdigit ((unsigned char)**type))
+ return (0);
else
{
*count = **type - '0';
(*type)++;
- if (isdigit (**type))
+ if (isdigit ((unsigned char)**type))
{
p = *type;
n = *count;
- do
+ do
{
n *= 10;
n += *p - '0';
p++;
- }
- while (isdigit (*p));
+ }
+ while (isdigit ((unsigned char)*p));
if (*p == '_')
{
*type = p + 1;
@@ -2108,7 +2986,8 @@ get_count (type, count)
return (1);
}
-/* result will be initialised here; it will be freed on failure */
+/* RESULT will be initialised here; it will be freed on failure. The
+ value returned is really a type_kind_t. */
static int
do_type (work, mangled, result)
@@ -2121,9 +3000,11 @@ do_type (work, mangled, result)
int success;
string decl;
const char *remembered_type;
- int constp;
- int volatilep;
+ int type_quals;
+ string btype;
+ type_kind_t tk = tk_none;
+ string_init (&btype);
string_init (&decl);
string_init (result);
@@ -2141,33 +3022,35 @@ do_type (work, mangled, result)
(*mangled)++;
if (! (work -> options & DMGL_JAVA))
string_prepend (&decl, "*");
+ if (tk == tk_none)
+ tk = tk_pointer;
break;
/* A reference type */
case 'R':
(*mangled)++;
string_prepend (&decl, "&");
+ if (tk == tk_none)
+ tk = tk_reference;
break;
/* An array */
case 'A':
{
- const char *p = ++(*mangled);
-
- string_prepend (&decl, "(");
- string_append (&decl, ")[");
- /* Copy anything up until the next underscore (the size of the
- array). */
- while (**mangled && **mangled != '_')
- ++(*mangled);
- if (**mangled == '_')
+ ++(*mangled);
+ if (!STRING_EMPTY (&decl)
+ && (decl.b[0] == '*' || decl.b[0] == '&'))
{
- string_appendn (&decl, p, *mangled - p);
- string_append (&decl, "]");
- *mangled += 1;
+ string_prepend (&decl, "(");
+ string_append (&decl, ")");
}
- else
- success = 0;
+ string_append (&decl, "[");
+ if (**mangled != '_')
+ success = demangle_template_value_parm (work, mangled, &decl,
+ tk_integral);
+ if (**mangled == '_')
+ ++(*mangled);
+ string_append (&decl, "]");
break;
}
@@ -2188,7 +3071,8 @@ do_type (work, mangled, result)
/* A function */
case 'F':
(*mangled)++;
- if (!STRING_EMPTY (&decl) && decl.b[0] == '*')
+ if (!STRING_EMPTY (&decl)
+ && (decl.b[0] == '*' || decl.b[0] == '&'))
{
string_prepend (&decl, "(");
string_append (&decl, ")");
@@ -2196,37 +3080,36 @@ do_type (work, mangled, result)
/* After picking off the function args, we expect to either find the
function return type (preceded by an '_') or the end of the
string. */
- if (!demangle_args (work, mangled, &decl)
+ if (!demangle_nested_args (work, mangled, &decl)
|| (**mangled != '_' && **mangled != '\0'))
{
success = 0;
+ break;
}
if (success && (**mangled == '_'))
- {
- (*mangled)++;
- }
+ (*mangled)++;
break;
case 'M':
case 'O':
{
- constp = 0;
- volatilep = 0;
+ type_quals = TYPE_UNQUALIFIED;
member = **mangled == 'M';
(*mangled)++;
- if (!isdigit (**mangled) && **mangled != 't')
- {
- success = 0;
- break;
- }
string_append (&decl, ")");
- string_prepend (&decl, (work -> options & DMGL_JAVA) ? "." : "::");
- if (isdigit (**mangled))
+
+ /* We don't need to prepend `::' for a qualified name;
+ demangle_qualified will do that for us. */
+ if (**mangled != 'Q')
+ string_prepend (&decl, SCOPE_STRING (work));
+
+ if (isdigit ((unsigned char)**mangled))
{
n = consume_count (mangled);
- if (strlen (*mangled) < n)
+ if (n == -1
+ || (int) strlen (*mangled) < n)
{
success = 0;
break;
@@ -2234,11 +3117,18 @@ do_type (work, mangled, result)
string_prependn (&decl, *mangled, n);
*mangled += n;
}
- else
+ else if (**mangled == 'X' || **mangled == 'Y')
+ {
+ string temp;
+ do_type (work, mangled, &temp);
+ string_prepends (&decl, &temp);
+ }
+ else if (**mangled == 't')
{
string temp;
string_init (&temp);
- success = demangle_template (work, mangled, &temp, NULL, 1);
+ success = demangle_template (work, mangled, &temp,
+ NULL, 1, 1);
if (success)
{
string_prependn (&decl, temp.b, temp.p - temp.b);
@@ -2247,26 +3137,43 @@ do_type (work, mangled, result)
else
break;
}
+ else if (**mangled == 'Q')
+ {
+ success = demangle_qualified (work, mangled, &decl,
+ /*isfuncnam=*/0,
+ /*append=*/0);
+ if (!success)
+ break;
+ }
+ else
+ {
+ success = 0;
+ break;
+ }
+
string_prepend (&decl, "(");
if (member)
{
- if (**mangled == 'C')
- {
- (*mangled)++;
- constp = 1;
- }
- if (**mangled == 'V')
+ switch (**mangled)
{
+ case 'C':
+ case 'V':
+ case 'u':
+ type_quals |= code_for_qualifier (**mangled);
(*mangled)++;
- volatilep = 1;
+ break;
+
+ default:
+ break;
}
+
if (*(*mangled)++ != 'F')
{
success = 0;
break;
}
}
- if ((member && !demangle_args (work, mangled, &decl))
+ if ((member && !demangle_nested_args (work, mangled, &decl))
|| **mangled != '_')
{
success = 0;
@@ -2277,15 +3184,10 @@ do_type (work, mangled, result)
{
break;
}
- if (constp)
+ if (type_quals != TYPE_UNQUALIFIED)
{
APPEND_BLANK (&decl);
- string_append (&decl, "const");
- }
- if (volatilep)
- {
- APPEND_BLANK (&decl);
- string_append (&decl, "volatile");
+ string_append (&decl, qualifier_string (type_quals));
}
break;
}
@@ -2294,19 +3196,16 @@ do_type (work, mangled, result)
break;
case 'C':
- (*mangled)++;
- /*
- if ((*mangled)[1] == 'P')
- {
- */
+ case 'V':
+ case 'u':
if (PRINT_ANSI_QUALIFIERS)
{
if (!STRING_EMPTY (&decl))
- {
- string_prepend (&decl, " ");
- }
- string_prepend (&decl, "const");
+ string_prepend (&decl, " ");
+
+ string_prepend (&decl, demangle_qualifier (**mangled));
}
+ (*mangled)++;
break;
/*
}
@@ -2319,11 +3218,23 @@ do_type (work, mangled, result)
}
}
- switch (**mangled)
+ if (success) switch (**mangled)
{
/* A qualified name, such as "Outer::Inner". */
case 'Q':
- success = demangle_qualified (work, mangled, result, 0, 1);
+ case 'K':
+ {
+ success = demangle_qualified (work, mangled, result, 0, 1);
+ break;
+ }
+
+ /* A back reference to a previously seen squangled type */
+ case 'B':
+ (*mangled)++;
+ if (!get_count (mangled, &n) || n >= work -> numb)
+ success = 0;
+ else
+ string_append (result, work->btypevec[n]);
break;
case 'X':
@@ -2331,12 +3242,11 @@ do_type (work, mangled, result)
/* A template parm. We substitute the corresponding argument. */
{
int idx;
- int lvl;
(*mangled)++;
idx = consume_count_with_underscores (mangled);
- if (idx == -1
+ if (idx == -1
|| (work->tmpl_argvec && idx >= work->ntmpl_args)
|| consume_count_with_underscores (mangled) == -1)
{
@@ -2347,11 +3257,7 @@ do_type (work, mangled, result)
if (work->tmpl_argvec)
string_append (result, work->tmpl_argvec[idx]);
else
- {
- char buf[10];
- sprintf(buf, "T%d", idx);
- string_append (result, buf);
- }
+ string_append_template_idx (result, idx);
success = 1;
}
@@ -2359,6 +3265,8 @@ do_type (work, mangled, result)
default:
success = demangle_fund_type (work, mangled, result);
+ if (tk == tk_none)
+ tk = (type_kind_t) success;
break;
}
@@ -2371,11 +3279,14 @@ do_type (work, mangled, result)
}
}
else
- {
- string_delete (result);
- }
+ string_delete (result);
string_delete (&decl);
- return (success);
+
+ if (success)
+ /* Assume an integral type, if we're not sure. */
+ return (int) ((tk == tk_none) ? tk_integral : tk);
+ else
+ return 0;
}
/* Given a pointer to a type string that represents a fundamental type
@@ -2389,7 +3300,7 @@ do_type (work, mangled, result)
"Sl" => "signed long"
"CUs" => "const unsigned short"
- */
+ The value returned is really a type_kind_t. */
static int
demangle_fund_type (work, mangled, result)
@@ -2399,6 +3310,12 @@ demangle_fund_type (work, mangled, result)
{
int done = 0;
int success = 1;
+ char buf[10];
+ int dec = 0;
+ string btype;
+ type_kind_t tk = tk_integral;
+
+ string_init (&btype);
/* First pick off any type qualifiers. There can be more than one. */
@@ -2407,12 +3324,15 @@ demangle_fund_type (work, mangled, result)
switch (**mangled)
{
case 'C':
- (*mangled)++;
+ case 'V':
+ case 'u':
if (PRINT_ANSI_QUALIFIERS)
{
- APPEND_BLANK (result);
- string_append (result, "const");
+ if (!STRING_EMPTY (result))
+ string_prepend (result, " ");
+ string_prepend (result, demangle_qualifier (**mangled));
}
+ (*mangled)++;
break;
case 'U':
(*mangled)++;
@@ -2424,14 +3344,6 @@ demangle_fund_type (work, mangled, result)
APPEND_BLANK (result);
string_append (result, "signed");
break;
- case 'V':
- (*mangled)++;
- if (PRINT_ANSI_QUALIFIERS)
- {
- APPEND_BLANK (result);
- string_append (result, "volatile");
- }
- break;
case 'J':
(*mangled)++;
APPEND_BLANK (result);
@@ -2479,39 +3391,75 @@ demangle_fund_type (work, mangled, result)
(*mangled)++;
APPEND_BLANK (result);
string_append (result, "bool");
+ tk = tk_bool;
break;
case 'c':
(*mangled)++;
APPEND_BLANK (result);
string_append (result, "char");
+ tk = tk_char;
break;
case 'w':
(*mangled)++;
APPEND_BLANK (result);
string_append (result, "wchar_t");
+ tk = tk_char;
break;
case 'r':
(*mangled)++;
APPEND_BLANK (result);
string_append (result, "long double");
+ tk = tk_real;
break;
case 'd':
(*mangled)++;
APPEND_BLANK (result);
string_append (result, "double");
+ tk = tk_real;
break;
case 'f':
(*mangled)++;
APPEND_BLANK (result);
string_append (result, "float");
+ tk = tk_real;
break;
case 'G':
(*mangled)++;
- if (!isdigit (**mangled))
+ if (!isdigit ((unsigned char)**mangled))
{
success = 0;
break;
}
+ case 'I':
+ (*mangled)++;
+ if (**mangled == '_')
+ {
+ int i;
+ (*mangled)++;
+ for (i = 0;
+ i < (long) sizeof (buf) - 1 && **mangled && **mangled != '_';
+ (*mangled)++, i++)
+ buf[i] = **mangled;
+ if (**mangled != '_')
+ {
+ success = 0;
+ break;
+ }
+ buf[i] = '\0';
+ (*mangled)++;
+ }
+ else
+ {
+ strncpy (buf, *mangled, 2);
+ buf[2] = '\0';
+ *mangled += min (strlen (*mangled), 2);
+ }
+ sscanf (buf, "%x", &dec);
+ sprintf (buf, "int%i_t", dec);
+ APPEND_BLANK (result);
+ string_append (result, buf);
+ break;
+
/* fall through */
/* An explicit type, such as "6mytype" or "7integer" */
case '0':
@@ -2524,24 +3472,171 @@ demangle_fund_type (work, mangled, result)
case '7':
case '8':
case '9':
- APPEND_BLANK (result);
- if (!demangle_class_name (work, mangled, result)) {
- --result->p;
- success = 0;
+ {
+ int bindex = register_Btype (work);
+ string btype;
+ string_init (&btype);
+ if (demangle_class_name (work, mangled, &btype)) {
+ remember_Btype (work, btype.b, LEN_STRING (&btype), bindex);
+ APPEND_BLANK (result);
+ string_appends (result, &btype);
+ }
+ else
+ success = 0;
+ string_delete (&btype);
+ break;
}
- break;
case 't':
- success = demangle_template(work,mangled, result, 0, 1);
- break;
+ {
+ success = demangle_template (work, mangled, &btype, 0, 1, 1);
+ string_appends (result, &btype);
+ break;
+ }
default:
success = 0;
break;
}
- return (success);
+ return success ? ((int) tk) : 0;
+}
+
+
+/* Handle a template's value parameter for HP aCC (extension from ARM)
+ **mangled points to 'S' or 'U' */
+
+static int
+do_hpacc_template_const_value (work, mangled, result)
+ struct work_stuff *work ATTRIBUTE_UNUSED;
+ const char **mangled;
+ string *result;
+{
+ int unsigned_const;
+
+ if (**mangled != 'U' && **mangled != 'S')
+ return 0;
+
+ unsigned_const = (**mangled == 'U');
+
+ (*mangled)++;
+
+ switch (**mangled)
+ {
+ case 'N':
+ string_append (result, "-");
+ /* fall through */
+ case 'P':
+ (*mangled)++;
+ break;
+ case 'M':
+ /* special case for -2^31 */
+ string_append (result, "-2147483648");
+ (*mangled)++;
+ return 1;
+ default:
+ return 0;
+ }
+
+ /* We have to be looking at an integer now */
+ if (!(isdigit ((unsigned char)**mangled)))
+ return 0;
+
+ /* We only deal with integral values for template
+ parameters -- so it's OK to look only for digits */
+ while (isdigit ((unsigned char)**mangled))
+ {
+ char_str[0] = **mangled;
+ string_append (result, char_str);
+ (*mangled)++;
+ }
+
+ if (unsigned_const)
+ string_append (result, "U");
+
+ /* FIXME? Some day we may have 64-bit (or larger :-) ) constants
+ with L or LL suffixes. pai/1997-09-03 */
+
+ return 1; /* success */
+}
+
+/* Handle a template's literal parameter for HP aCC (extension from ARM)
+ **mangled is pointing to the 'A' */
+
+static int
+do_hpacc_template_literal (work, mangled, result)
+ struct work_stuff *work;
+ const char **mangled;
+ string *result;
+{
+ int literal_len = 0;
+ char * recurse;
+ char * recurse_dem;
+
+ if (**mangled != 'A')
+ return 0;
+
+ (*mangled)++;
+
+ literal_len = consume_count (mangled);
+
+ if (literal_len <= 0)
+ return 0;
+
+ /* Literal parameters are names of arrays, functions, etc. and the
+ canonical representation uses the address operator */
+ string_append (result, "&");
+
+ /* Now recursively demangle the literal name */
+ recurse = (char *) xmalloc (literal_len + 1);
+ memcpy (recurse, *mangled, literal_len);
+ recurse[literal_len] = '\000';
+
+ recurse_dem = cplus_demangle (recurse, work->options);
+
+ if (recurse_dem)
+ {
+ string_append (result, recurse_dem);
+ free (recurse_dem);
+ }
+ else
+ {
+ string_appendn (result, *mangled, literal_len);
+ }
+ (*mangled) += literal_len;
+ free (recurse);
+
+ return 1;
+}
+
+static int
+snarf_numeric_literal (args, arg)
+ const char ** args;
+ string * arg;
+{
+ if (**args == '-')
+ {
+ char_str[0] = '-';
+ string_append (arg, char_str);
+ (*args)++;
+ }
+ else if (**args == '+')
+ (*args)++;
+
+ if (!isdigit ((unsigned char)**args))
+ return 0;
+
+ while (isdigit ((unsigned char)**args))
+ {
+ char_str[0] = **args;
+ string_append (arg, char_str);
+ (*args)++;
+ }
+
+ return 1;
}
-/* `result' will be initialized in do_type; it will be freed on failure */
+/* Demangle the next argument, given by MANGLED into RESULT, which
+ *should be an uninitialized* string. It will be initialized here,
+ and free'd should anything go wrong. */
static int
do_arg (work, mangled, result)
@@ -2549,17 +3644,67 @@ do_arg (work, mangled, result)
const char **mangled;
string *result;
{
+ /* Remember where we started so that we can record the type, for
+ non-squangling type remembering. */
const char *start = *mangled;
- if (!do_type (work, mangled, result))
+ string_init (result);
+
+ if (work->nrepeats > 0)
{
- return (0);
+ --work->nrepeats;
+
+ if (work->previous_argument == 0)
+ return 0;
+
+ /* We want to reissue the previous type in this argument list. */
+ string_appends (result, work->previous_argument);
+ return 1;
+ }
+
+ if (**mangled == 'n')
+ {
+ /* A squangling-style repeat. */
+ (*mangled)++;
+ work->nrepeats = consume_count(mangled);
+
+ if (work->nrepeats <= 0)
+ /* This was not a repeat count after all. */
+ return 0;
+
+ if (work->nrepeats > 9)
+ {
+ if (**mangled != '_')
+ /* The repeat count should be followed by an '_' in this
+ case. */
+ return 0;
+ else
+ (*mangled)++;
+ }
+
+ /* Now, the repeat is all set up. */
+ return do_arg (work, mangled, result);
}
+
+ /* Save the result in WORK->previous_argument so that we can find it
+ if it's repeated. Note that saving START is not good enough: we
+ do not want to add additional types to the back-referenceable
+ type vector when processing a repeated type. */
+ if (work->previous_argument)
+ string_clear (work->previous_argument);
else
{
- remember_type (work, start, *mangled - start);
- return (1);
+ work->previous_argument = (string*) xmalloc (sizeof (string));
+ string_init (work->previous_argument);
}
+
+ if (!do_type (work, mangled, work->previous_argument))
+ return 0;
+
+ string_appends (result, work->previous_argument);
+
+ remember_type (work, start, *mangled - start);
+ return 1;
}
static void
@@ -2570,6 +3715,9 @@ remember_type (work, start, len)
{
char *tem;
+ if (work->forgetting_types)
+ return;
+
if (work -> ntypes >= work -> typevec_size)
{
if (work -> typevec_size == 0)
@@ -2592,6 +3740,112 @@ remember_type (work, start, len)
work -> typevec[work -> ntypes++] = tem;
}
+
+/* Remember a K type class qualifier. */
+static void
+remember_Ktype (work, start, len)
+ struct work_stuff *work;
+ const char *start;
+ int len;
+{
+ char *tem;
+
+ if (work -> numk >= work -> ksize)
+ {
+ if (work -> ksize == 0)
+ {
+ work -> ksize = 5;
+ work -> ktypevec
+ = (char **) xmalloc (sizeof (char *) * work -> ksize);
+ }
+ else
+ {
+ work -> ksize *= 2;
+ work -> ktypevec
+ = (char **) xrealloc ((char *)work -> ktypevec,
+ sizeof (char *) * work -> ksize);
+ }
+ }
+ tem = xmalloc (len + 1);
+ memcpy (tem, start, len);
+ tem[len] = '\0';
+ work -> ktypevec[work -> numk++] = tem;
+}
+
+/* Register a B code, and get an index for it. B codes are registered
+ as they are seen, rather than as they are completed, so map<temp<char> >
+ registers map<temp<char> > as B0, and temp<char> as B1 */
+
+static int
+register_Btype (work)
+ struct work_stuff *work;
+{
+ int ret;
+
+ if (work -> numb >= work -> bsize)
+ {
+ if (work -> bsize == 0)
+ {
+ work -> bsize = 5;
+ work -> btypevec
+ = (char **) xmalloc (sizeof (char *) * work -> bsize);
+ }
+ else
+ {
+ work -> bsize *= 2;
+ work -> btypevec
+ = (char **) xrealloc ((char *)work -> btypevec,
+ sizeof (char *) * work -> bsize);
+ }
+ }
+ ret = work -> numb++;
+ work -> btypevec[ret] = NULL;
+ return(ret);
+}
+
+/* Store a value into a previously registered B code type. */
+
+static void
+remember_Btype (work, start, len, index)
+ struct work_stuff *work;
+ const char *start;
+ int len, index;
+{
+ char *tem;
+
+ tem = xmalloc (len + 1);
+ memcpy (tem, start, len);
+ tem[len] = '\0';
+ work -> btypevec[index] = tem;
+}
+
+/* Lose all the info related to B and K type codes. */
+static void
+forget_B_and_K_types (work)
+ struct work_stuff *work;
+{
+ int i;
+
+ while (work -> numk > 0)
+ {
+ i = --(work -> numk);
+ if (work -> ktypevec[i] != NULL)
+ {
+ free (work -> ktypevec[i]);
+ work -> ktypevec[i] = NULL;
+ }
+ }
+
+ while (work -> numb > 0)
+ {
+ i = --(work -> numb);
+ if (work -> btypevec[i] != NULL)
+ {
+ free (work -> btypevec[i]);
+ work -> btypevec[i] = NULL;
+ }
+ }
+}
/* Forget the remembered types, but not the type vector itself. */
static void
@@ -2643,8 +3897,8 @@ forget_types (work)
foo__FiR3fooT1T2T1T2
__ct__3fooFiR3fooT1T2T1T2
- Note that g++ bases it's type numbers starting at zero and counts all
- previously seen types, while lucid/ARM bases it's type numbers starting
+ Note that g++ bases its type numbers starting at zero and counts all
+ previously seen types, while lucid/ARM bases its type numbers starting
at one and only considers types after it has seen the 'F' character
indicating the start of the function args. For lucid/ARM style, we
account for this difference by discarding any previously seen types when
@@ -2675,12 +3929,13 @@ demangle_args (work, mangled, declp)
}
}
- while (**mangled != '_' && **mangled != '\0' && **mangled != 'e')
+ while ((**mangled != '_' && **mangled != '\0' && **mangled != 'e')
+ || work->nrepeats > 0)
{
if ((**mangled == 'N') || (**mangled == 'T'))
{
temptype = *(*mangled)++;
-
+
if (temptype == 'N')
{
if (!get_count (mangled, &r))
@@ -2692,7 +3947,7 @@ demangle_args (work, mangled, declp)
{
r = 1;
}
- if (ARM_DEMANGLING && work -> ntypes >= 10)
+ if ((HP_DEMANGLING || ARM_DEMANGLING || EDG_DEMANGLING) && work -> ntypes >= 10)
{
/* If we have 10 or more types we might have more than a 1 digit
index so we'll have to consume the whole count here. This
@@ -2700,7 +3955,7 @@ demangle_args (work, mangled, declp)
count but it's impossible to demangle that case properly
anyway. Eg if we already have 12 types is T12Pc "(..., type1,
Pc, ...)" or "(..., type12, char *, ...)" */
- if ((t = consume_count(mangled)) == 0)
+ if ((t = consume_count(mangled)) <= 0)
{
return (0);
}
@@ -2712,7 +3967,7 @@ demangle_args (work, mangled, declp)
return (0);
}
}
- if (LUCID_DEMANGLING || ARM_DEMANGLING)
+ if (LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING)
{
t--;
}
@@ -2722,7 +3977,7 @@ demangle_args (work, mangled, declp)
{
return (0);
}
- while (--r >= 0)
+ while (work->nrepeats > 0 || --r >= 0)
{
tem = work -> typevec[t];
if (need_comma && PRINT_ARG_TYPES)
@@ -2743,18 +3998,12 @@ demangle_args (work, mangled, declp)
}
else
{
- if (need_comma & PRINT_ARG_TYPES)
- {
- string_append (declp, ", ");
- }
+ if (need_comma && PRINT_ARG_TYPES)
+ string_append (declp, ", ");
if (!do_arg (work, mangled, &arg))
- {
- return (0);
- }
+ return (0);
if (PRINT_ARG_TYPES)
- {
- string_appends (declp, &arg);
- }
+ string_appends (declp, &arg);
string_delete (&arg);
need_comma = 1;
}
@@ -2780,6 +4029,45 @@ demangle_args (work, mangled, declp)
return (1);
}
+/* Like demangle_args, but for demangling the argument lists of function
+ and method pointers or references, not top-level declarations. */
+
+static int
+demangle_nested_args (work, mangled, declp)
+ struct work_stuff *work;
+ const char **mangled;
+ string *declp;
+{
+ string* saved_previous_argument;
+ int result;
+ int saved_nrepeats;
+
+ /* The G++ name-mangling algorithm does not remember types on nested
+ argument lists, unless -fsquangling is used, and in that case the
+ type vector updated by remember_type is not used. So, we turn
+ off remembering of types here. */
+ ++work->forgetting_types;
+
+ /* For the repeat codes used with -fsquangling, we must keep track of
+ the last argument. */
+ saved_previous_argument = work->previous_argument;
+ saved_nrepeats = work->nrepeats;
+ work->previous_argument = 0;
+ work->nrepeats = 0;
+
+ /* Actually demangle the arguments. */
+ result = demangle_args (work, mangled, declp);
+
+ /* Restore the previous_argument field. */
+ if (work->previous_argument)
+ string_delete (work->previous_argument);
+ work->previous_argument = saved_previous_argument;
+ --work->forgetting_types;
+ work->nrepeats = saved_nrepeats;
+
+ return result;
+}
+
static void
demangle_function_name (work, mangled, declp, scan)
struct work_stuff *work;
@@ -2787,8 +4075,7 @@ demangle_function_name (work, mangled, declp, scan)
string *declp;
const char *scan;
{
- int i;
- int len;
+ size_t i;
string type;
const char *tem;
@@ -2801,8 +4088,18 @@ demangle_function_name (work, mangled, declp, scan)
separator. */
(*mangled) = scan + 2;
+ /* We may be looking at an instantiation of a template function:
+ foo__Xt1t2_Ft3t4, where t1, t2, ... are template arguments and a
+ following _F marks the start of the function arguments. Handle
+ the template arguments first. */
+
+ if (HP_DEMANGLING && (**mangled == 'X'))
+ {
+ demangle_arm_hp_template (work, mangled, 0, declp);
+ /* This leaves MANGLED pointing to the 'F' marking func args */
+ }
- if (LUCID_DEMANGLING || ARM_DEMANGLING)
+ if (LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING)
{
/* See if we have an ARM style constructor or destructor operator.
@@ -2824,7 +4121,7 @@ demangle_function_name (work, mangled, declp, scan)
}
}
- if (declp->p - declp->b >= 3
+ if (declp->p - declp->b >= 3
&& declp->b[0] == 'o'
&& declp->b[1] == 'p'
&& strchr (cplus_markers, declp->b[2]) != NULL)
@@ -2835,8 +4132,8 @@ demangle_function_name (work, mangled, declp, scan)
{
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
- len = declp->p - declp->b - 10;
- if (strlen (optable[i].in) == len
+ int len = declp->p - declp->b - 10;
+ if ((int) strlen (optable[i].in) == len
&& memcmp (optable[i].in, declp->b + 10, len) == 0)
{
string_clear (declp);
@@ -2852,7 +4149,7 @@ demangle_function_name (work, mangled, declp, scan)
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
int len = declp->p - declp->b - 3;
- if (strlen (optable[i].in) == len
+ if ((int) strlen (optable[i].in) == len
&& memcmp (optable[i].in, declp->b + 3, len) == 0)
{
string_clear (declp);
@@ -2923,7 +4220,7 @@ demangle_function_name (work, mangled, declp, scan)
string_append (declp, "operator");
string_append (declp, optable[i].out);
break;
- }
+ }
}
}
}
@@ -2977,7 +4274,7 @@ string_init (s)
s->b = s->p = s->e = NULL;
}
-static void
+static void
string_clear (s)
string *s;
{
@@ -3079,6 +4376,16 @@ string_prependn (p, s, n)
}
}
+static void
+string_append_template_idx (s, idx)
+ string *s;
+ int idx;
+{
+ char buf[INTBUF_SIZE + 1 /* 'T' */];
+ sprintf(buf, "T%d", idx);
+ string_append (s, buf);
+}
+
/* To generate a standalone demangler program for testing purposes,
just compile and link this file with -DMAIN and libiberty.a. When
run, it demangles each command line arg, or each stdin string, and
@@ -3088,13 +4395,13 @@ string_prependn (p, s, n)
#include "getopt.h"
-static char *program_name;
-static char *program_version = VERSION;
+static const char *program_name;
+static const char *program_version = VERSION;
static int flags = DMGL_PARAMS | DMGL_ANSI;
static void demangle_it PARAMS ((char *));
-static void usage PARAMS ((FILE *, int));
-static void fatal PARAMS ((char *));
+static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
+static void fatal PARAMS ((const char *)) ATTRIBUTE_NORETURN;
static void
demangle_it (mangled_name)
@@ -3118,16 +4425,16 @@ static void
usage (stream, status)
FILE *stream;
int status;
-{
+{
fprintf (stream, "\
-Usage: %s [-_] [-n] [-s {gnu,lucid,arm}] [--strip-underscores]\n\
- [--no-strip-underscores] [--format={gnu,lucid,arm}]\n\
+Usage: %s [-_] [-n] [-s {gnu,lucid,arm,hp,edg}] [--strip-underscores]\n\
+ [--no-strip-underscores] [--format={gnu,lucid,arm,hp,edg}]\n\
[--help] [--version] [arg...]\n",
program_name);
exit (status);
}
-#define MBUF_SIZE 512
+#define MBUF_SIZE 32767
char mbuffer[MBUF_SIZE];
/* Defined in the automatically-generated underscore.c. */
@@ -3145,6 +4452,72 @@ static struct option long_options[] = {
{0, no_argument, 0, 0}
};
+/* More 'friendly' abort that prints the line and file.
+ config.h can #define abort fancy_abort if you like that sort of thing. */
+
+void
+fancy_abort ()
+{
+ fatal ("Internal gcc abort.");
+}
+
+
+static const char *
+standard_symbol_characters PARAMS ((void));
+
+static const char *
+hp_symbol_characters PARAMS ((void));
+
+/* Return the string of non-alnum characters that may occur
+ as a valid symbol component, in the standard assembler symbol
+ syntax. */
+
+static const char *
+standard_symbol_characters ()
+{
+ return "_$.";
+}
+
+
+/* Return the string of non-alnum characters that may occur
+ as a valid symbol name component in an HP object file.
+
+ Note that, since HP's compiler generates object code straight from
+ C++ source, without going through an assembler, its mangled
+ identifiers can use all sorts of characters that no assembler would
+ tolerate, so the alphabet this function creates is a little odd.
+ Here are some sample mangled identifiers offered by HP:
+
+ typeid*__XT24AddressIndExpClassMember_
+ [Vftptr]key:__dt__32OrdinaryCompareIndExpClassMemberFv
+ __ct__Q2_9Elf64_Dyn18{unnamed.union.#1}Fv
+
+ This still seems really weird to me, since nowhere else in this
+ file is there anything to recognize curly brackets, parens, etc.
+ I've talked with Srikanth <srikanth@cup.hp.com>, and he assures me
+ this is right, but I still strongly suspect that there's a
+ misunderstanding here.
+
+ If we decide it's better for c++filt to use HP's assembler syntax
+ to scrape identifiers out of its input, here's the definition of
+ the symbol name syntax from the HP assembler manual:
+
+ Symbols are composed of uppercase and lowercase letters, decimal
+ digits, dollar symbol, period (.), ampersand (&), pound sign(#) and
+ underscore (_). A symbol can begin with a letter, digit underscore or
+ dollar sign. If a symbol begins with a digit, it must contain a
+ non-digit character.
+
+ So have fun. */
+static const char *
+hp_symbol_characters ()
+{
+ return "_$.<>#,*&[]:(){}";
+}
+
+
+extern int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -3152,6 +4525,7 @@ main (argc, argv)
{
char *result;
int c;
+ const char *valid_symbols;
program_name = argv[0];
@@ -3170,8 +4544,8 @@ main (argc, argv)
strip_underscore = 0;
break;
case 'v':
- printf ("GNU %s version %s\n", program_name, program_version);
- exit (0);
+ printf ("GNU %s (C++ demangler), version %s\n", program_name, program_version);
+ return (0);
case '_':
strip_underscore = 1;
break;
@@ -3191,11 +4565,19 @@ main (argc, argv)
{
current_demangling_style = arm_demangling;
}
+ else if (strcmp (optarg, "hp") == 0)
+ {
+ current_demangling_style = hp_demangling;
+ }
+ else if (strcmp (optarg, "edg") == 0)
+ {
+ current_demangling_style = edg_demangling;
+ }
else
{
fprintf (stderr, "%s: unknown demangling style `%s'\n",
program_name, optarg);
- exit (1);
+ return (1);
}
break;
}
@@ -3210,12 +4592,30 @@ main (argc, argv)
}
else
{
+ switch (current_demangling_style)
+ {
+ case gnu_demangling:
+ case lucid_demangling:
+ case arm_demangling:
+ case edg_demangling:
+ valid_symbols = standard_symbol_characters ();
+ break;
+ case hp_demangling:
+ valid_symbols = hp_symbol_characters ();
+ break;
+ default:
+ /* Folks should explicitly indicate the appropriate alphabet for
+ each demangling. Providing a default would allow the
+ question to go unconsidered. */
+ abort ();
+ }
+
for (;;)
{
int i = 0;
c = getchar ();
/* Try to read a label. */
- while (c != EOF && (isalnum(c) || c == '_' || c == '$' || c == '.'))
+ while (c != EOF && (isalnum (c) || strchr (valid_symbols, c)))
{
if (i >= MBUF_SIZE-1)
break;
@@ -3235,7 +4635,7 @@ main (argc, argv)
skip_first = i;
mbuffer[i] = 0;
-
+
result = cplus_demangle (mbuffer + skip_first, flags);
if (result)
{
@@ -3255,36 +4655,33 @@ main (argc, argv)
}
}
- exit (0);
+ return (0);
}
static void
fatal (str)
- char *str;
+ const char *str;
{
fprintf (stderr, "%s: %s\n", program_name, str);
exit (1);
}
-char * malloc ();
-char * realloc ();
-
-char *
+PTR
xmalloc (size)
- unsigned size;
+ size_t size;
{
- register char *value = (char *) malloc (size);
+ register PTR value = (PTR) malloc (size);
if (value == 0)
fatal ("virtual memory exhausted");
return value;
}
-char *
+PTR
xrealloc (ptr, size)
- char *ptr;
- unsigned size;
+ PTR ptr;
+ size_t size;
{
- register char *value = (char *) realloc (ptr, size);
+ register PTR value = (PTR) realloc (ptr, size);
if (value == 0)
fatal ("virtual memory exhausted");
return value;
diff --git a/contrib/binutils/libiberty/floatformat.c b/contrib/binutils/libiberty/floatformat.c
index 7f6086f..1d8f16d 100644
--- a/contrib/binutils/libiberty/floatformat.c
+++ b/contrib/binutils/libiberty/floatformat.c
@@ -1,5 +1,5 @@
/* IEEE floating point support routines, for GDB, the GNU Debugger.
- Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 1999 Free Software Foundation, Inc.
This file is part of GDB.
@@ -128,7 +128,7 @@ get_field (data, order, total_len, start, len)
--cur_byte;
/* Move towards the most significant part of the field. */
- while (cur_bitshift < len)
+ while ((unsigned int) cur_bitshift < len)
{
if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
/* This is the last byte; zero out the bits which are not part of
@@ -179,7 +179,7 @@ floatformat_to_double (fmt, from, to)
mant_off = fmt->man_start;
dto = 0.0;
- special_exponent = exponent == 0 || exponent == fmt->exp_nan;
+ special_exponent = exponent == 0 || (unsigned long) exponent == fmt->exp_nan;
/* Don't bias zero's, denorms or NaNs. */
if (!special_exponent)
@@ -192,10 +192,12 @@ floatformat_to_double (fmt, from, to)
increment the exponent by one to account for the integer bit. */
if (!special_exponent)
- if (fmt->intbit == floatformat_intbit_no)
- dto = ldexp (1.0, exponent);
- else
- exponent++;
+ {
+ if (fmt->intbit == floatformat_intbit_no)
+ dto = ldexp (1.0, exponent);
+ else
+ exponent++;
+ }
while (mant_bits_left > 0)
{
@@ -253,7 +255,7 @@ put_field (data, order, total_len, start, len, stuff_to_put)
--cur_byte;
/* Move towards the most significant part of the field. */
- while (cur_bitshift < len)
+ while ((unsigned int) cur_bitshift < len)
{
if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
{
@@ -279,7 +281,7 @@ put_field (data, order, total_len, start, len, stuff_to_put)
void
floatformat_from_double (fmt, from, to)
- CONST struct floatformat *fmt;
+ const struct floatformat *fmt;
double *from;
char *to;
{
@@ -333,7 +335,7 @@ floatformat_from_double (fmt, from, to)
If we are discarding a zero, we should be (but are not) creating
a denormalized number which means adjusting the exponent
(I think). */
- if (mant_bits_left == fmt->man_len
+ if ((unsigned int) mant_bits_left == fmt->man_len
&& fmt->intbit == floatformat_intbit_no)
{
mant_long &= 0x7fffffff;
diff --git a/contrib/binutils/libiberty/fnmatch.c b/contrib/binutils/libiberty/fnmatch.c
index 685d9e4..0a9bfe6 100644
--- a/contrib/binutils/libiberty/fnmatch.c
+++ b/contrib/binutils/libiberty/fnmatch.c
@@ -15,7 +15,8 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#if defined (CONFIG_BROKETS)
@@ -71,7 +72,7 @@ fnmatch (pattern, string, flags)
int flags;
{
register const char *p = pattern, *n = string;
- register char c;
+ register unsigned char c;
/* Note that this evalutes C many times. */
#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))
@@ -98,7 +99,7 @@ fnmatch (pattern, string, flags)
c = *p++;
c = FOLD (c);
}
- if (FOLD (*n) != c)
+ if (FOLD ((unsigned char)*n) != c)
return FNM_NOMATCH;
break;
@@ -116,10 +117,10 @@ fnmatch (pattern, string, flags)
return 0;
{
- char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
+ unsigned char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
c1 = FOLD (c1);
for (--p; *n != '\0'; ++n)
- if ((c == '[' || FOLD (*n) == c1) &&
+ if ((c == '[' || FOLD ((unsigned char)*n) == c1) &&
fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
return 0;
return FNM_NOMATCH;
@@ -144,7 +145,7 @@ fnmatch (pattern, string, flags)
c = *p++;
for (;;)
{
- register char cstart = c, cend = c;
+ register unsigned char cstart = c, cend = c;
if (!(flags & FNM_NOESCAPE) && c == '\\')
cstart = cend = *p++;
@@ -174,7 +175,8 @@ fnmatch (pattern, string, flags)
c = *p++;
}
- if (FOLD (*n) >= cstart && FOLD (*n) <= cend)
+ if (FOLD ((unsigned char)*n) >= cstart
+ && FOLD ((unsigned char)*n) <= cend)
goto matched;
if (c == ']')
@@ -203,7 +205,7 @@ fnmatch (pattern, string, flags)
break;
default:
- if (c != FOLD (*n))
+ if (c != FOLD ((unsigned char)*n))
return FNM_NOMATCH;
}
diff --git a/contrib/binutils/libiberty/getcwd.c b/contrib/binutils/libiberty/getcwd.c
index 60c1dd8..47b1c1e 100644
--- a/contrib/binutils/libiberty/getcwd.c
+++ b/contrib/binutils/libiberty/getcwd.c
@@ -14,13 +14,18 @@ DESCRIPTION
current directory's path doesn't fit in LEN characters, the result
is NULL and errno is set.
+ If pathname is a null pointer, getcwd() will obtain size bytes of
+ space using malloc.
+
BUGS
Emulated via the getwd() call, which is reasonable for most
systems that do not have getcwd().
*/
-#ifndef NO_SYS_PARAM_H
+#include "config.h"
+
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <errno.h>
@@ -46,6 +51,13 @@ getcwd (buf, len)
errno = ERANGE;
return 0;
}
+ if (!buf) {
+ buf = (char*)malloc(len);
+ if (!buf) {
+ errno = ENOMEM;
+ return 0;
+ }
+ }
strcpy (buf, ourbuf);
}
return buf;
diff --git a/contrib/binutils/libiberty/getopt.c b/contrib/binutils/libiberty/getopt.c
index fc87ce6..c41531e 100644
--- a/contrib/binutils/libiberty/getopt.c
+++ b/contrib/binutils/libiberty/getopt.c
@@ -1,13 +1,13 @@
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+ Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -27,19 +27,19 @@
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
#ifndef _NO_PROTO
-#define _NO_PROTO
+# define _NO_PROTO
#endif
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
-#if !defined (__STDC__) || !__STDC__
+#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
+# ifndef const
+# define const
+# endif
#endif
#include <stdio.h>
@@ -53,11 +53,11 @@
it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2
-#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+# include <gnu-versions.h>
+# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+# define ELIDE_CODE
+# endif
#endif
#ifndef ELIDE_CODE
@@ -68,26 +68,26 @@
#ifdef __GNU_LIBRARY__
/* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
-#include <stdlib.h>
-#include <unistd.h>
+# include <stdlib.h>
+# include <unistd.h>
#endif /* GNU C library. */
#ifdef VMS
-#include <unixlib.h>
-#if HAVE_STRING_H - 0
-#include <string.h>
-#endif
+# include <unixlib.h>
+# if HAVE_STRING_H - 0
+# include <string.h>
+# endif
#endif
#ifndef _
/* This is for other GNU distributions with internationalized messages.
When compiling libc, the _ macro is predefined. */
-#ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid) gettext (msgid)
-#else
-# define _(msgid) (msgid)
-#endif
+# ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+# else
+# define _(msgid) (msgid)
+# endif
#endif
/* This version of `getopt' appears to the caller like standard Unix `getopt'
@@ -197,14 +197,24 @@ static char *posixly_correct;
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
in GCC. */
-#include <string.h>
-#define my_index strchr
+# include <string.h>
+# define my_index strchr
#else
+# if HAVE_STRING_H
+# include <string.h>
+# else
+# if HAVE_STRINGS_H
+# include <strings.h>
+# endif
+# endif
+
/* Avoid depending on library functions or files
whose names are inconsistent. */
-char *getenv ();
+#ifndef getenv
+extern char *getenv ();
+#endif
static char *
my_index (str, chr)
@@ -225,11 +235,11 @@ my_index (str, chr)
#ifdef __GNUC__
/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
That was relevant to code that was here before. */
-#if !defined (__STDC__) || !__STDC__
+# if (!defined __STDC__ || !__STDC__) && !defined strlen
/* gcc with -traditional declares the built-in strlen to return int,
and has done so at least since version 2.4.5. -- rms. */
extern int strlen (const char *);
-#endif /* not __STDC__ */
+# endif /* not __STDC__ */
#endif /* __GNUC__ */
#endif /* not __GNU_LIBRARY__ */
@@ -292,7 +302,7 @@ text_set_element (__libc_subinit, store_args_and_env);
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
static void exchange (char **);
#endif
@@ -378,7 +388,7 @@ exchange (argv)
/* Initialize the internal data when the first call is made. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
static const char *_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
@@ -527,11 +537,11 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
from the shell indicating it is not an option. The later information
is only used when the used in the GNU libc. */
#ifdef _LIBC
-#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && __getopt_nonoption_flags[optind] == '1'))
#else
-#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
#endif
if (nextchar == NULL || *nextchar == '\0')
@@ -690,21 +700,23 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else
{
if (opterr)
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- _("%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- _("%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
-
- nextchar += strlen (nextchar);
-
- optopt = pfound->val;
- return '?';
+ {
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ _("%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ _("%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+
+ nextchar += strlen (nextchar);
+
+ optopt = pfound->val;
+ return '?';
+ }
}
}
else if (pfound->has_arg == 1)
diff --git a/contrib/binutils/libiberty/getopt1.c b/contrib/binutils/libiberty/getopt1.c
index af8e681..ff25737 100644
--- a/contrib/binutils/libiberty/getopt1.c
+++ b/contrib/binutils/libiberty/getopt1.c
@@ -1,8 +1,9 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
+ Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+ Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -25,7 +26,7 @@
#include "getopt.h"
-#if !defined (__STDC__) || !__STDC__
+#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
#ifndef const
@@ -44,7 +45,7 @@
it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2
-#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
#include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE
diff --git a/contrib/binutils/libiberty/getpagesize.c b/contrib/binutils/libiberty/getpagesize.c
index e9784b8..564d6c0 100644
--- a/contrib/binutils/libiberty/getpagesize.c
+++ b/contrib/binutils/libiberty/getpagesize.c
@@ -28,36 +28,43 @@ BUGS
#ifndef VMS
+#include "config.h"
+
#include <sys/types.h>
-#ifndef NO_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_SYSCONF
+#undef GNU_OUR_PAGESIZE
+#if defined (HAVE_SYSCONF) && defined (HAVE_UNISTD_H)
#include <unistd.h>
+#ifdef _SC_PAGESIZE
#define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE)
-#else
-#ifdef PAGESIZE
-#define GNU_OUR_PAGESIZE PAGESIZE
-#else /* no PAGESIZE */
-#ifdef EXEC_PAGESIZE
-#define GNU_OUR_PAGESIZE EXEC_PAGESIZE
-#else /* no EXEC_PAGESIZE */
-#ifdef NBPG
-#define GNU_OUR_PAGESIZE (NBPG * CLSIZE)
-#ifndef CLSIZE
-#define CLSIZE 1
-#endif /* CLSIZE */
-#else /* no NBPG */
-#ifdef NBPC
-#define GNU_OUR_PAGESIZE NBPC
-#else /* no NBPC */
-#define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */
-#endif /* NBPC */
-#endif /* NBPG */
-#endif /* EXEC_PAGESIZE */
-#endif /* PAGESIZE */
-#endif /* HAVE_SYSCONF */
+#endif
+#endif
+
+#ifndef GNU_OUR_PAGESIZE
+# ifdef PAGESIZE
+# define GNU_OUR_PAGESIZE PAGESIZE
+# else /* no PAGESIZE */
+# ifdef EXEC_PAGESIZE
+# define GNU_OUR_PAGESIZE EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define GNU_OUR_PAGESIZE (NBPG * CLSIZE)
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define GNU_OUR_PAGESIZE NBPC
+# else /* no NBPC */
+# define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */
+# endif /* NBPC */
+# endif /* NBPG */
+# endif /* EXEC_PAGESIZE */
+# endif /* PAGESIZE */
+#endif /* GNU_OUR_PAGESIZE */
int
getpagesize ()
diff --git a/contrib/binutils/libiberty/getpwd.c b/contrib/binutils/libiberty/getpwd.c
new file mode 100644
index 0000000..de6e039
--- /dev/null
+++ b/contrib/binutils/libiberty/getpwd.c
@@ -0,0 +1,115 @@
+/* getpwd.c - get the working directory */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+/* Prototype these in case the system headers don't provide them. */
+extern char *getpwd ();
+extern char *getwd ();
+
+#include "libiberty.h"
+
+/* Virtually every UN*X system now in common use (except for pre-4.3-tahoe
+ BSD systems) now provides getcwd as called for by POSIX. Allow for
+ the few exceptions to the general rule here. */
+
+#if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
+#define getcwd(buf,len) getwd(buf)
+#endif
+
+#ifdef MAXPATHLEN
+#define GUESSPATHLEN (MAXPATHLEN + 1)
+#else
+#define GUESSPATHLEN 100
+#endif
+
+#if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__)))
+
+/* Get the working directory. Use the PWD environment variable if it's
+ set correctly, since this is faster and gives more uniform answers
+ to the user. Yield the working directory if successful; otherwise,
+ yield 0 and set errno. */
+
+char *
+getpwd ()
+{
+ static char *pwd;
+ static int failure_errno;
+
+ char *p = pwd;
+ size_t s;
+ struct stat dotstat, pwdstat;
+
+ if (!p && !(errno = failure_errno))
+ {
+ if (! ((p = getenv ("PWD")) != 0
+ && *p == '/'
+ && stat (p, &pwdstat) == 0
+ && stat (".", &dotstat) == 0
+ && dotstat.st_ino == pwdstat.st_ino
+ && dotstat.st_dev == pwdstat.st_dev))
+
+ /* The shortcut didn't work. Try the slow, ``sure'' way. */
+ for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2)
+ {
+ int e = errno;
+ free (p);
+#ifdef ERANGE
+ if (e != ERANGE)
+#endif
+ {
+ errno = failure_errno = e;
+ p = 0;
+ break;
+ }
+ }
+
+ /* Cache the result. This assumes that the program does
+ not invoke chdir between calls to getpwd. */
+ pwd = p;
+ }
+ return p;
+}
+
+#else /* VMS || _WIN32 && !__CYGWIN__ */
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 255
+#endif
+
+char *
+getpwd ()
+{
+ static char *pwd = 0;
+
+ if (!pwd)
+ pwd = getcwd (xmalloc (MAXPATHLEN + 1), MAXPATHLEN + 1
+#ifdef VMS
+ , 0
+#endif
+ );
+ return pwd;
+}
+
+#endif /* VMS || _WIN32 && !__CYGWIN__ */
diff --git a/contrib/binutils/libiberty/getruntime.c b/contrib/binutils/libiberty/getruntime.c
index 1be3b4c..b855ea6 100644
--- a/contrib/binutils/libiberty/getruntime.c
+++ b/contrib/binutils/libiberty/getruntime.c
@@ -1,5 +1,5 @@
/* Return time used so far, in microseconds.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1999 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -17,6 +17,8 @@ License along with libiberty; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include "config.h"
+
#include "ansidecl.h"
#include "libiberty.h"
@@ -26,28 +28,22 @@ Boston, MA 02111-1307, USA. */
#include <time.h>
-/* These should go away when libiberty uses autoconf. */
-
-#if defined(__sun__) && !defined(__svr4__)
-#define HAVE_GETRUSAGE
-#endif
-
-#ifdef HAVE_SYSCONF
-#define HAVE_TIMES
-#endif
-
-#ifdef HAVE_GETRUSAGE
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
#include <sys/time.h>
#include <sys/resource.h>
#endif
#ifdef HAVE_TIMES
-#ifndef NO_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/times.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* This is a fallback; if wrong, it will likely make obviously wrong
results. */
@@ -55,10 +51,22 @@ Boston, MA 02111-1307, USA. */
#define CLOCKS_PER_SEC 1
#endif
+#ifdef _SC_CLK_TCK
+#define GNU_HZ sysconf(_SC_CLK_TCK)
+#else
+#ifdef HZ
+#define GNU_HZ HZ
+#else
+#ifdef CLOCKS_PER_SEC
+#define GNU_HZ CLOCKS_PER_SEC
+#endif
+#endif
+#endif
+
long
get_run_time ()
{
-#ifdef HAVE_GETRUSAGE
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
struct rusage rusage;
getrusage (0, &rusage);
@@ -69,7 +77,7 @@ get_run_time ()
struct tms tms;
times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
+ return (tms.tms_utime + tms.tms_stime) * (1000000 / GNU_HZ);
#else /* ! HAVE_TIMES */
/* Fall back on clock and hope it's correctly implemented. */
const long clocks_per_sec = CLOCKS_PER_SEC;
diff --git a/contrib/binutils/libiberty/hashtab.c b/contrib/binutils/libiberty/hashtab.c
new file mode 100644
index 0000000..16c5d3e
--- /dev/null
+++ b/contrib/binutils/libiberty/hashtab.c
@@ -0,0 +1,429 @@
+/* An expandable hash tables datatype.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Vladimir Makarov (vmakarov@cygnus.com).
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty 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
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* This package implements basic hash table functionality. It is possible
+ to search for an entry, create an entry and destroy an entry.
+
+ Elements in the table are generic pointers.
+
+ The size of the table is not fixed; if the occupancy of the table
+ grows too high the hash table will be expanded.
+
+ The abstract data implementation is based on generalized Algorithm D
+ from Knuth's book "The art of computer programming". Hash table is
+ expanded by creation of new hash table and transferring elements from
+ the old table to the new table. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <stdio.h>
+
+#include "libiberty.h"
+#include "hashtab.h"
+
+/* This macro defines reserved value for empty table entry. */
+
+#define EMPTY_ENTRY ((void *) 0)
+
+/* This macro defines reserved value for table entry which contained
+ a deleted element. */
+
+#define DELETED_ENTRY ((void *) 1)
+
+/* The following function returns the nearest prime number which is
+ greater than given source number. */
+
+static unsigned long
+higher_prime_number (n)
+ unsigned long n;
+{
+ unsigned long i;
+
+ n |= 0x01; /* Force N to be odd. */
+ if (n < 9)
+ return n; /* All odd numbers < 9 are prime. */
+
+ next:
+ n += 2;
+ i = 3;
+ do
+ {
+ if (n % i == 0)
+ goto next;
+ i += 2;
+ }
+ while ((i * i) <= n);
+
+ return n;
+}
+
+/* This function creates table with length slightly longer than given
+ source length. Created hash table is initiated as empty (all the
+ hash table entries are EMPTY_ENTRY). The function returns the
+ created hash table. */
+
+htab_t
+htab_create (size, hash_f, eq_f, del_f)
+ size_t size;
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+{
+ htab_t result;
+
+ size = higher_prime_number (size);
+ result = (htab_t) xcalloc (1, sizeof (struct htab));
+ result->entries = (void **) xcalloc (size, sizeof (void *));
+ result->size = size;
+ result->hash_f = hash_f;
+ result->eq_f = eq_f;
+ result->del_f = del_f;
+ return result;
+}
+
+/* This function frees all memory allocated for given hash table.
+ Naturally the hash table must already exist. */
+
+void
+htab_delete (htab)
+ htab_t htab;
+{
+ int i;
+ if (htab->del_f)
+ for (i = htab->size - 1; i >= 0; i--)
+ {
+ if (htab->entries[i] != EMPTY_ENTRY
+ && htab->entries[i] != DELETED_ENTRY)
+ (*htab->del_f) (htab->entries[i]);
+ }
+
+ free (htab->entries);
+ free (htab);
+}
+
+/* This function clears all entries in the given hash table. */
+
+void
+htab_empty (htab)
+ htab_t htab;
+{
+ int i;
+ if (htab->del_f)
+ for (i = htab->size - 1; i >= 0; i--)
+ {
+ if (htab->entries[i] != EMPTY_ENTRY
+ && htab->entries[i] != DELETED_ENTRY)
+ (*htab->del_f) (htab->entries[i]);
+ }
+
+ memset (htab->entries, 0, htab->size * sizeof (void *));
+}
+
+/* Similar to htab_find_slot, but without several unwanted side effects:
+ - Does not call htab->eq_f when it finds an existing entry.
+ - Does not change the count of elements/searches/collisions in the
+ hash table.
+ This function also assumes there are no deleted entries in the table.
+ HASH is the hash value for the element to be inserted. */
+static void **
+find_empty_slot_for_expand (htab, hash)
+ htab_t htab;
+ unsigned int hash;
+{
+ size_t size = htab->size;
+ unsigned int hash2 = 1 + hash % (size - 2);
+ unsigned int index = hash % size;
+
+ for (;;)
+ {
+ void **slot = htab->entries + index;
+ if (*slot == EMPTY_ENTRY)
+ return slot;
+
+ if (*slot == DELETED_ENTRY)
+ abort ();
+
+ index += hash2;
+ if (index >= size)
+ index -= size;
+ }
+}
+
+/* The following function changes size of memory allocated for the
+ entries and repeatedly inserts the table elements. The occupancy
+ of the table after the call will be about 50%. Naturally the hash
+ table must already exist. Remember also that the place of the
+ table entries is changed. */
+
+static void
+htab_expand (htab)
+ htab_t htab;
+{
+ void **oentries;
+ void **olimit;
+ void **p;
+
+ oentries = htab->entries;
+ olimit = oentries + htab->size;
+
+ htab->size = higher_prime_number (htab->size * 2);
+ htab->entries = xcalloc (htab->size, sizeof (void **));
+
+ htab->n_elements -= htab->n_deleted;
+ htab->n_deleted = 0;
+
+ p = oentries;
+ do
+ {
+ void *x = *p;
+ if (x != EMPTY_ENTRY && x != DELETED_ENTRY)
+ {
+ void **q = find_empty_slot_for_expand (htab, (*htab->hash_f) (x));
+ *q = x;
+ }
+ p++;
+ }
+ while (p < olimit);
+ free (oentries);
+}
+
+/* This function searches for a hash table entry equal to the given
+ element. It cannot be used to insert or delete an element. */
+
+void *
+htab_find_with_hash (htab, element, hash)
+ htab_t htab;
+ const void *element;
+ unsigned int hash;
+{
+ unsigned int index, hash2;
+ size_t size;
+
+ htab->searches++;
+ size = htab->size;
+ hash2 = 1 + hash % (size - 2);
+ index = hash % size;
+
+ for (;;)
+ {
+ void *entry = htab->entries[index];
+ if (entry == EMPTY_ENTRY)
+ return NULL;
+ else if (entry != DELETED_ENTRY && (*htab->eq_f) (entry, element))
+ return entry;
+
+ htab->collisions++;
+ index += hash2;
+ if (index >= size)
+ index -= size;
+ }
+}
+
+/* Like htab_find_slot_with_hash, but compute the hash value from the
+ element. */
+void *
+htab_find (htab, element)
+ htab_t htab;
+ const void *element;
+{
+ return htab_find_with_hash (htab, element, (*htab->hash_f) (element));
+}
+
+/* This function searches for a hash table slot containing an entry
+ equal to the given element. To delete an entry, call this with
+ INSERT = 0, then call htab_clear_slot on the slot returned (possibly
+ after doing some checks). To insert an entry, call this with
+ INSERT = 1, then write the value you want into the returned slot. */
+
+void **
+htab_find_slot_with_hash (htab, element, hash, insert)
+ htab_t htab;
+ const void *element;
+ unsigned int hash;
+ int insert;
+{
+ void **first_deleted_slot;
+ unsigned int index, hash2;
+ size_t size;
+
+ if (insert && htab->size * 3 <= htab->n_elements * 4)
+ htab_expand (htab);
+
+ size = htab->size;
+ hash2 = 1 + hash % (size - 2);
+ index = hash % size;
+
+ htab->searches++;
+ first_deleted_slot = NULL;
+
+ for (;;)
+ {
+ void *entry = htab->entries[index];
+ if (entry == EMPTY_ENTRY)
+ {
+ if (!insert)
+ return NULL;
+
+ htab->n_elements++;
+
+ if (first_deleted_slot)
+ {
+ *first_deleted_slot = EMPTY_ENTRY;
+ return first_deleted_slot;
+ }
+
+ return &htab->entries[index];
+ }
+
+ if (entry == DELETED_ENTRY)
+ {
+ if (!first_deleted_slot)
+ first_deleted_slot = &htab->entries[index];
+ }
+ else
+ {
+ if ((*htab->eq_f) (entry, element))
+ return &htab->entries[index];
+ }
+
+ htab->collisions++;
+ index += hash2;
+ if (index >= size)
+ index -= size;
+ }
+}
+
+/* Like htab_find_slot_with_hash, but compute the hash value from the
+ element. */
+void **
+htab_find_slot (htab, element, insert)
+ htab_t htab;
+ const void *element;
+ int insert;
+{
+ return htab_find_slot_with_hash (htab, element, (*htab->hash_f) (element),
+ insert);
+}
+
+/* This function deletes an element with the given value from hash
+ table. If there is no matching element in the hash table, this
+ function does nothing. */
+
+void
+htab_remove_elt (htab, element)
+ htab_t htab;
+ void *element;
+{
+ void **slot;
+
+ slot = htab_find_slot (htab, element, 0);
+ if (*slot == EMPTY_ENTRY)
+ return;
+
+ if (htab->del_f)
+ (*htab->del_f) (*slot);
+
+ *slot = DELETED_ENTRY;
+ htab->n_deleted++;
+}
+
+/* This function clears a specified slot in a hash table. It is
+ useful when you've already done the lookup and don't want to do it
+ again. */
+
+void
+htab_clear_slot (htab, slot)
+ htab_t htab;
+ void **slot;
+{
+ if (slot < htab->entries || slot >= htab->entries + htab->size
+ || *slot == EMPTY_ENTRY || *slot == DELETED_ENTRY)
+ abort ();
+ if (htab->del_f)
+ (*htab->del_f) (*slot);
+ *slot = DELETED_ENTRY;
+ htab->n_deleted++;
+}
+
+/* This function scans over the entire hash table calling
+ CALLBACK for each live entry. If CALLBACK returns false,
+ the iteration stops. INFO is passed as CALLBACK's second
+ argument. */
+
+void
+htab_traverse (htab, callback, info)
+ htab_t htab;
+ htab_trav callback;
+ void *info;
+{
+ void **slot, **limit;
+ slot = htab->entries;
+ limit = slot + htab->size;
+ do
+ {
+ void *x = *slot;
+ if (x != EMPTY_ENTRY && x != DELETED_ENTRY)
+ if (!(*callback) (slot, info))
+ break;
+ }
+ while (++slot < limit);
+}
+
+/* The following function returns current size of given hash table. */
+
+size_t
+htab_size (htab)
+ htab_t htab;
+{
+ return htab->size;
+}
+
+/* The following function returns current number of elements in given
+ hash table. */
+
+size_t
+htab_elements (htab)
+ htab_t htab;
+{
+ return htab->n_elements - htab->n_deleted;
+}
+
+/* The following function returns number of percents of fixed
+ collisions during all work with given hash table. */
+
+double
+htab_collisions (htab)
+ htab_t htab;
+{
+ int searches;
+
+ searches = htab->searches;
+ if (searches == 0)
+ return 0.0;
+ return (double)htab->collisions / (double)searches;
+}
diff --git a/contrib/binutils/libiberty/memchr.c b/contrib/binutils/libiberty/memchr.c
index 93ef43d..cce3003 100644
--- a/contrib/binutils/libiberty/memchr.c
+++ b/contrib/binutils/libiberty/memchr.c
@@ -44,11 +44,11 @@ QUICKREF
PTR
memchr (src_void, c, length)
- register CONST PTR src_void;
+ register const PTR src_void;
int c;
size_t length;
{
- CONST unsigned char *src = (CONST unsigned char *)src_void;
+ const unsigned char *src = (const unsigned char *)src_void;
while (--length >= 0)
{
diff --git a/contrib/binutils/libiberty/memcpy.c b/contrib/binutils/libiberty/memcpy.c
index c28208a0..707a9f5 100644
--- a/contrib/binutils/libiberty/memcpy.c
+++ b/contrib/binutils/libiberty/memcpy.c
@@ -21,7 +21,7 @@ DESCRIPTION
#endif
PTR
-DEFUN(memcpy, (out, in, length), PTR out AND CONST PTR in AND size_t length)
+DEFUN(memcpy, (out, in, length), PTR out AND const PTR in AND size_t length)
{
bcopy(in, out, length);
return out;
diff --git a/contrib/binutils/libiberty/memmove.c b/contrib/binutils/libiberty/memmove.c
index 818fc24..176c326 100644
--- a/contrib/binutils/libiberty/memmove.c
+++ b/contrib/binutils/libiberty/memmove.c
@@ -10,7 +10,7 @@
PTR
memmove (s1, s2, n)
PTR s1;
- CONST PTR s2;
+ const PTR s2;
size_t n;
{
bcopy (s2, s1, n);
diff --git a/contrib/binutils/libiberty/mkstemps.c b/contrib/binutils/libiberty/mkstemps.c
new file mode 100644
index 0000000..16c16a2
--- /dev/null
+++ b/contrib/binutils/libiberty/mkstemps.c
@@ -0,0 +1,128 @@
+/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
+ This file is derived from mkstemp.c from the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <errno.h>
+#include <stdio.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include "ansidecl.h"
+
+/* We need to provide a type for gcc_uint64_t. */
+#ifdef __GNUC__
+typedef unsigned long long gcc_uint64_t;
+#else
+typedef unsigned long gcc_uint64_t;
+#endif
+
+#ifndef TMP_MAX
+#define TMP_MAX 16384
+#endif
+
+/* Generate a unique temporary file name from TEMPLATE.
+
+ TEMPLATE has the form:
+
+ <path>/ccXXXXXX<suffix>
+
+ SUFFIX_LEN tells us how long <suffix> is (it can be zero length).
+
+ The last six characters of TEMPLATE before <suffix> must be "XXXXXX";
+ they are replaced with a string that makes the filename unique.
+
+ Returns a file descriptor open on the file for reading and writing. */
+int
+mkstemps (template, suffix_len)
+ char *template;
+ int suffix_len;
+{
+ static const char letters[]
+ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ static gcc_uint64_t value;
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval tv;
+#endif
+ char *XXXXXX;
+ size_t len;
+ int count;
+
+ len = strlen (template);
+
+ if ((int) len < 6 + suffix_len
+ || strncmp (&template[len - 6 - suffix_len], "XXXXXX", 6))
+ {
+ return -1;
+ }
+
+ XXXXXX = &template[len - 6 - suffix_len];
+
+#ifdef HAVE_GETTIMEOFDAY
+ /* Get some more or less random data. */
+ gettimeofday (&tv, NULL);
+ value += ((gcc_uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
+#else
+ value += getpid ();
+#endif
+
+ for (count = 0; count < TMP_MAX; ++count)
+ {
+ gcc_uint64_t v = value;
+ int fd;
+
+ /* Fill in the random bits. */
+ XXXXXX[0] = letters[v % 62];
+ v /= 62;
+ XXXXXX[1] = letters[v % 62];
+ v /= 62;
+ XXXXXX[2] = letters[v % 62];
+ v /= 62;
+ XXXXXX[3] = letters[v % 62];
+ v /= 62;
+ XXXXXX[4] = letters[v % 62];
+ v /= 62;
+ XXXXXX[5] = letters[v % 62];
+
+ fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
+ if (fd >= 0)
+ /* The file does not exist. */
+ return fd;
+
+ /* This is a random value. It is only necessary that the next
+ TMP_MAX values generated by adding 7777 to VALUE are different
+ with (module 2^32). */
+ value += 7777;
+ }
+
+ /* We return the null string if we can't find a unique file name. */
+ template[0] = '\0';
+ return -1;
+}
diff --git a/contrib/binutils/libiberty/objalloc.c b/contrib/binutils/libiberty/objalloc.c
index 34687d3..57754a8 100644
--- a/contrib/binutils/libiberty/objalloc.c
+++ b/contrib/binutils/libiberty/objalloc.c
@@ -14,7 +14,8 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
#include "objalloc.h"
@@ -34,6 +35,7 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* For systems with larger pointers than ints, this must be declared. */
extern PTR malloc PARAMS ((size_t));
+extern void free PARAMS ((PTR));
#endif
/* These routines allocate space for an object. Freeing allocated
diff --git a/contrib/binutils/libiberty/obstack.c b/contrib/binutils/libiberty/obstack.c
index a6880ca..bc318b3 100644
--- a/contrib/binutils/libiberty/obstack.c
+++ b/contrib/binutils/libiberty/obstack.c
@@ -1,19 +1,28 @@
/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@gnu.org.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "obstack.h"
@@ -39,23 +48,6 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif
#endif
-/* CYGNUS LOCAL (not to be elided!) */
-
-int
-_obstack_memory_used (h)
- struct obstack *h;
-{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
-
- for (lp = h->chunk; lp != 0; lp = lp->prev)
- {
- nbytes += lp->limit - (char *) lp;
- }
- return nbytes;
-}
-
-/* END CYGNUS LOCAL */
#ifndef ELIDE_CODE
@@ -84,6 +76,28 @@ union fooround {long x; double d;};
#define COPYING_UNIT int
#endif
+
+/* The functions allocating more room by calling `obstack_chunk_alloc'
+ jump to the handler pointed to by `obstack_alloc_failed_handler'.
+ This variable by default points to the internal function
+ `print_and_abort'. */
+#if defined (__STDC__) && __STDC__
+static void print_and_abort (void);
+void (*obstack_alloc_failed_handler) (void) = print_and_abort;
+#else
+static void print_and_abort ();
+void (*obstack_alloc_failed_handler) () = print_and_abort;
+#endif
+
+/* Exit value used when `print_and_abort' is used. */
+#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+int obstack_exit_failure = EXIT_FAILURE;
+
/* The non-GNU-C macros copy the obstack into this global variable
to avoid multiple evaluation. */
@@ -95,6 +109,20 @@ struct obstack *_obstack;
For free, do not use ?:, since some compilers, like the MIPS compilers,
do not allow (expr) ? void : void. */
+#if defined (__STDC__) && __STDC__
+#define CALL_CHUNKFUN(h, size) \
+ (((h) -> use_extra_arg) \
+ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
+ : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
+
+#define CALL_FREEFUN(h, old_chunk) \
+ do { \
+ if ((h) -> use_extra_arg) \
+ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
+ else \
+ (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
+ } while (0)
+#else
#define CALL_CHUNKFUN(h, size) \
(((h) -> use_extra_arg) \
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
@@ -107,6 +135,7 @@ struct obstack *_obstack;
else \
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
} while (0)
+#endif
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
@@ -123,13 +152,18 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
struct obstack *h;
int size;
int alignment;
+#if defined (__STDC__) && __STDC__
+ POINTER (*chunkfun) (long);
+ void (*freefun) (void *);
+#else
POINTER (*chunkfun) ();
void (*freefun) ();
+#endif
{
register struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
+ alignment = (int) DEFAULT_ALIGNMENT;
if (size == 0)
/* Default size is what GNU malloc can fit in a 4096-byte block. */
{
@@ -147,25 +181,27 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
size = 4096 - extra;
}
+#if defined (__STDC__) && __STDC__
+ h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
+#else
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
h->freefun = freefun;
+#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->use_extra_arg = 0;
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk)
- {
- h->alloc_failed = 1;
- return 0;
- }
- h->alloc_failed = 0;
+ (*obstack_alloc_failed_handler) ();
h->next_free = h->object_base = chunk->contents;
h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size;
chunk->prev = 0;
/* The initial chunk now contains no empty object. */
h->maybe_empty_object = 0;
+ h->alloc_failed = 0;
return 1;
}
@@ -174,14 +210,19 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
struct obstack *h;
int size;
int alignment;
+#if defined (__STDC__) && __STDC__
+ POINTER (*chunkfun) (POINTER, long);
+ void (*freefun) (POINTER, POINTER);
+#else
POINTER (*chunkfun) ();
void (*freefun) ();
+#endif
POINTER arg;
{
register struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
+ alignment = (int) DEFAULT_ALIGNMENT;
if (size == 0)
/* Default size is what GNU malloc can fit in a 4096-byte block. */
{
@@ -199,8 +240,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
size = 4096 - extra;
}
+#if defined(__STDC__) && __STDC__
+ h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
+#else
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
h->freefun = freefun;
+#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->extra_arg = arg;
@@ -208,17 +254,14 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk)
- {
- h->alloc_failed = 1;
- return 0;
- }
- h->alloc_failed = 0;
+ (*obstack_alloc_failed_handler) ();
h->next_free = h->object_base = chunk->contents;
h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size;
chunk->prev = 0;
/* The initial chunk now contains no empty object. */
h->maybe_empty_object = 0;
+ h->alloc_failed = 0;
return 1;
}
@@ -236,9 +279,9 @@ _obstack_newchunk (h, length)
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
register long new_size;
- register int obj_size = h->next_free - h->object_base;
- register int i;
- int already;
+ register long obj_size = h->next_free - h->object_base;
+ register long i;
+ long already;
/* Compute size for new chunk. */
new_size = (obj_size + length) + (obj_size >> 3) + 100;
@@ -248,11 +291,7 @@ _obstack_newchunk (h, length)
/* Allocate and initialize the new chunk. */
new_chunk = CALL_CHUNKFUN (h, new_size);
if (!new_chunk)
- {
- h->alloc_failed = 1;
- return;
- }
- h->alloc_failed = 0;
+ (*obstack_alloc_failed_handler) ();
h->chunk = new_chunk;
new_chunk->prev = old_chunk;
new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
@@ -396,6 +435,39 @@ obstack_free (h, obj)
abort ();
}
+int
+_obstack_memory_used (h)
+ struct obstack *h;
+{
+ register struct _obstack_chunk* lp;
+ register int nbytes = 0;
+
+ for (lp = h->chunk; lp != 0; lp = lp->prev)
+ {
+ nbytes += lp->limit - (char *) lp;
+ }
+ return nbytes;
+}
+
+/* Define the error handler. */
+#ifndef _
+# ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# ifndef _
+# define _(Str) gettext (Str)
+# endif
+# else
+# define _(Str) (Str)
+# endif
+#endif
+
+static void
+print_and_abort ()
+{
+ fputs (_("memory exhausted\n"), stderr);
+ exit (obstack_exit_failure);
+}
+
#if 0
/* These are now turned off because the applications do not use it
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
@@ -434,6 +506,13 @@ int (obstack_room) (obstack)
return obstack_room (obstack);
}
+int (obstack_make_room) (obstack, length)
+ struct obstack *obstack;
+ int length;
+{
+ return obstack_make_room (obstack, length);
+}
+
void (obstack_grow) (obstack, pointer, length)
struct obstack *obstack;
POINTER pointer;
diff --git a/contrib/binutils/libiberty/partition.c b/contrib/binutils/libiberty/partition.c
new file mode 100644
index 0000000..c1d5847
--- /dev/null
+++ b/contrib/binutils/libiberty/partition.c
@@ -0,0 +1,185 @@
+/* List implentation of a partition of consecutive integers.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by CodeSourcery, LLC.
+
+ This file is part of GNU CC.
+
+ GNU CC 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.
+
+ GNU CC 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 GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include "libiberty.h"
+#include "partition.h"
+
+/* Creates a partition of NUM_ELEMENTS elements. Initially each
+ element is in a class by itself. */
+
+partition
+partition_new (num_elements)
+ int num_elements;
+{
+ int e;
+
+ partition part = (partition)
+ xmalloc (sizeof (struct partition_def) +
+ (num_elements - 1) * sizeof (struct partition_elem));
+ part->num_elements = num_elements;
+ for (e = 0; e < num_elements; ++e)
+ {
+ part->elements[e].class_element = e;
+ part->elements[e].next = &(part->elements[e]);
+ part->elements[e].class_count = 1;
+ }
+
+ return part;
+}
+
+/* Freeds a partition. */
+
+void
+partition_delete (part)
+ partition part;
+{
+ free (part);
+}
+
+/* Unites the classes containing ELEM1 and ELEM2 into a single class
+ of partition PART. If ELEM1 and ELEM2 are already in the same
+ class, does nothing. Returns the canonical element of the
+ resulting union class. */
+
+int
+partition_union (part, elem1, elem2)
+ partition part;
+ int elem1;
+ int elem2;
+{
+ struct partition_elem *elements = part->elements;
+ struct partition_elem *e1;
+ struct partition_elem *e2;
+ struct partition_elem *p;
+ struct partition_elem *old_next;
+ /* The canonical element of the resulting union class. */
+ int class_element = elements[elem1].class_element;
+
+ /* If they're already in the same class, do nothing. */
+ if (class_element == elements[elem2].class_element)
+ return class_element;
+
+ /* Make sure ELEM1 is in the larger class of the two. If not, swap
+ them. This way we always scan the shorter list. */
+ if (elements[elem1].class_count < elements[elem2].class_count)
+ {
+ int temp = elem1;
+ elem1 = elem2;
+ elem2 = temp;
+ class_element = elements[elem1].class_element;
+ }
+
+ e1 = &(elements[elem1]);
+ e2 = &(elements[elem2]);
+
+ /* Keep a count of the number of elements in the list. */
+ elements[class_element].class_count
+ += elements[e2->class_element].class_count;
+
+ /* Update the class fields in elem2's class list. */
+ e2->class_element = class_element;
+ for (p = e2->next; p != e2; p = p->next)
+ p->class_element = class_element;
+
+ /* Splice ELEM2's class list into ELEM1's. These are circular
+ lists. */
+ old_next = e1->next;
+ e1->next = e2->next;
+ e2->next = old_next;
+
+ return class_element;
+}
+
+/* Compare elements ELEM1 and ELEM2 from array of integers, given a
+ pointer to each. Used to qsort such an array. */
+
+static int
+elem_compare (elem1, elem2)
+ const void *elem1;
+ const void *elem2;
+{
+ int e1 = * (int *) elem1;
+ int e2 = * (int *) elem2;
+ if (e1 < e2)
+ return -1;
+ else if (e1 > e2)
+ return 1;
+ else
+ return 0;
+}
+
+/* Prints PART to the file pointer FP. The elements of each
+ class are sorted. */
+
+void
+partition_print (part, fp)
+ partition part;
+ FILE *fp;
+{
+ char *done;
+ int num_elements = part->num_elements;
+ struct partition_elem *elements = part->elements;
+ int *class_elements;
+ int e;
+
+ /* Flag the elements we've already printed. */
+ done = (char *) xmalloc (num_elements);
+ memset (done, 0, num_elements);
+
+ /* A buffer used to sort elements in a class. */
+ class_elements = (int *) xmalloc (num_elements * sizeof (int));
+
+ fputc ('[', fp);
+ for (e = 0; e < num_elements; ++e)
+ /* If we haven't printed this element, print its entire class. */
+ if (! done[e])
+ {
+ int c = e;
+ int count = elements[elements[e].class_element].class_count;
+ int i;
+
+ /* Collect the elements in this class. */
+ for (i = 0; i < count; ++i) {
+ class_elements[i] = c;
+ done[c] = 1;
+ c = elements[c].next - elements;
+ }
+ /* Sort them. */
+ qsort ((void *) class_elements, count, sizeof (int), &elem_compare);
+ /* Print them. */
+ fputc ('(', fp);
+ for (i = 0; i < count; ++i)
+ fprintf (fp, i == 0 ? "%d" : " %d", class_elements[i]);
+ fputc (')', fp);
+ }
+ fputc (']', fp);
+
+ free (done);
+}
+
diff --git a/contrib/binutils/libiberty/pexecute.c b/contrib/binutils/libiberty/pexecute.c
index fbbea40..56ddec7 100644
--- a/contrib/binutils/libiberty/pexecute.c
+++ b/contrib/binutils/libiberty/pexecute.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996-2000 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -23,24 +23,37 @@ Boston, MA 02111-1307, USA. */
/* This file lives in at least two places: libiberty and gcc.
Don't change one without the other. */
-#ifdef IN_GCC
+#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#define ISSPACE (x) isspace(x)
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
-#ifdef IN_GCC
-#include "gansidecl.h"
-/* ??? Need to find a suitable header file. */
-#define PEXECUTE_FIRST 1
-#define PEXECUTE_LAST 2
-#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST)
-#define PEXECUTE_SEARCH 4
-#define PEXECUTE_VERBOSE 8
+#ifdef vfork /* Autoconf may define this to fork for us. */
+# define VFORK_STRING "fork"
#else
-#include "libiberty.h"
+# define VFORK_STRING "vfork"
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
#endif
+#ifdef VMS
+#define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \
+ lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
+#endif /* VMS */
+
+#include "libiberty.h"
/* stdin file number. */
#define STDIN_FILE_NO 0
@@ -146,6 +159,8 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
FILE *argfile;
int i, el = flags & PEXECUTE_SEARCH ? 4 : 0;
+ if (temp_base == 0)
+ temp_base = choose_temp_base ();
scmd = (char *) xmalloc (strlen (program) + strlen (temp_base) + 6 + el);
rf = scmd + strlen(program) + 2 + el;
sprintf (scmd, "%s%s @%s.gp", program,
@@ -166,7 +181,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
char *cp;
for (cp = argv[i]; *cp; cp++)
{
- if (*cp == '"' || *cp == '\'' || *cp == '\\' || isspace (*cp))
+ if (*cp == '"' || *cp == '\'' || *cp == '\\' || ISSPACE (*cp))
fputc ('\\', argfile);
fputc (*cp, argfile);
}
@@ -220,53 +235,18 @@ pwait (pid, status, flags)
#endif /* MSDOS */
-#if defined (_WIN32)
+#if defined (_WIN32) && ! defined (_UWIN)
#include <process.h>
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
#define fix_argv(argvec) (argvec)
extern int _spawnv ();
extern int _spawnvp ();
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
-{
- int pid;
-
- if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
- abort ();
- pid = (flags & PEXECUTE_SEARCH ? _spawnvp : _spawnv)
- (_P_NOWAIT, program, fix_argv(argv));
- if (pid == -1)
- {
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = program;
- return -1;
- }
- return pid;
-}
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
-{
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
- return cwait (status, pid, WAIT_CHILD);
-}
-
-#else /* ! __CYGWIN32__ */
+#else /* ! __CYGWIN__ */
/* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */
@@ -302,8 +282,48 @@ fix_argv (argvec)
argvec[i] = temp;
}
+ for (i = 0; argvec[i] != 0; i++)
+ {
+ if (strpbrk (argvec[i], " \t"))
+ {
+ int len, trailing_backslash;
+ char *temp;
+
+ len = strlen (argvec[i]);
+ trailing_backslash = 0;
+
+ /* There is an added complication when an arg with embedded white
+ space ends in a backslash (such as in the case of -iprefix arg
+ passed to cpp). The resulting quoted strings gets misinterpreted
+ by the command interpreter -- it thinks that the ending quote
+ is escaped by the trailing backslash and things get confused.
+ We handle this case by escaping the trailing backslash, provided
+ it was not escaped in the first place. */
+ if (len > 1
+ && argvec[i][len-1] == '\\'
+ && argvec[i][len-2] != '\\')
+ {
+ trailing_backslash = 1;
+ ++len; /* to escape the final backslash. */
+ }
+
+ len += 2; /* and for the enclosing quotes. */
+
+ temp = xmalloc (len + 1);
+ temp[0] = '"';
+ strcpy (temp + 1, argvec[i]);
+ if (trailing_backslash)
+ temp[len-2] = '\\';
+ temp[len-1] = '"';
+ temp[len] = '\0';
+
+ argvec[i] = temp;
+ }
+ }
+
return (const char * const *) argvec;
}
+#endif /* __CYGWIN__ */
#include <io.h>
#include <fcntl.h>
@@ -420,6 +440,9 @@ pwait (pid, status, flags)
int *status;
int flags;
{
+#ifdef __CYGWIN__
+ return wait (status);
+#else
int termstat;
pid = _cwait (&termstat, pid, WAIT_CHILD);
@@ -437,11 +460,10 @@ pwait (pid, status, flags)
*status = (((termstat) & 0xff) << 8);
return pid;
+#endif /* __CYGWIN__ */
}
-#endif /* ! defined (__CYGWIN32__) */
-
-#endif /* _WIN32 */
+#endif /* _WIN32 && ! _UWIN */
#ifdef OS2
@@ -509,7 +531,7 @@ static int first_time = 1;
int
pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
const char *program;
- char **argv;
+ char * const *argv;
const char *this_pname;
const char *temp_base;
char **errmsg_fmt, **errmsg_arg;
@@ -538,14 +560,18 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
fputc (' ', stdout);
for (i=1; argv[i]; i++)
{
- /* We have to quote every arg, so that when the echo is
- executed, the quotes are stripped and the original arg
- is left. */
fputc ('\'', stdout);
+ /* See if we have an argument that needs fixing. */
+ if (strchr(argv[i], '/'))
+ {
+ tmpname = (char *) xmalloc (256);
+ mpwify_filename (argv[i], tmpname);
+ argv[i] = tmpname;
+ }
for (cp = argv[i]; *cp; cp++)
{
- /* Write an Option-d esc char in front of special chars. */
- if (strchr ("\"'+", *cp))
+ /* Write an Option-d escape char in front of special chars. */
+ if (strchr("'+", *cp))
fputc ('\266', stdout);
fputc (*cp, stdout);
}
@@ -560,15 +586,20 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
for (i=1; argv[i]; i++)
{
+ /* See if we have an argument that needs fixing. */
+ if (strchr(argv[i], '/'))
+ {
+ tmpname = (char *) xmalloc (256);
+ mpwify_filename (argv[i], tmpname);
+ argv[i] = tmpname;
+ }
if (strchr (argv[i], ' '))
fputc ('\'', stdout);
for (cp = argv[i]; *cp; cp++)
{
- /* Write an Option-d esc char in front of special chars. */
- if (strchr ("\"'+", *cp))
- {
- fputc ('\266', stdout);
- }
+ /* Write an Option-d escape char in front of special chars. */
+ if (strchr("'+", *cp))
+ fputc ('\266', stdout);
fputc (*cp, stdout);
}
if (strchr (argv[i], ' '))
@@ -615,16 +646,7 @@ pfinish ()
/* include for Unix-like environments but not for Dos-like environments */
#if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
- && ! defined (_WIN32)
-
-#ifdef VMS
-#define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \
- lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
-#else
-#ifdef USG
-#define vfork fork
-#endif
-#endif
+ && ! (defined (_WIN32) && ! defined (_UWIN))
extern int execv ();
extern int execvp ();
@@ -634,7 +656,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
const char *program;
char * const *argv;
const char *this_pname;
- const char *temp_base;
+ const char *temp_base ATTRIBUTE_UNUSED;
char **errmsg_fmt, **errmsg_arg;
int flags;
{
@@ -689,11 +711,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
{
case -1:
{
-#ifdef vfork
- *errmsg_fmt = "fork";
-#else
- *errmsg_fmt = "vfork";
-#endif
+ *errmsg_fmt = VFORK_STRING;
*errmsg_arg = NULL;
return -1;
}
@@ -723,11 +741,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
/* Note: Calling fprintf and exit here doesn't seem right for vfork. */
fprintf (stderr, "%s: ", this_pname);
fprintf (stderr, install_error_msg, program);
-#ifdef IN_GCC
- fprintf (stderr, ": %s\n", my_strerror (errno));
-#else
fprintf (stderr, ": %s\n", xstrerror (errno));
-#endif
exit (-1);
/* NOTREACHED */
return 0;
@@ -749,7 +763,7 @@ int
pwait (pid, status, flags)
int pid;
int *status;
- int flags;
+ int flags ATTRIBUTE_UNUSED;
{
/* ??? Here's an opportunity to canonicalize the values in STATUS.
Needed? */
@@ -761,4 +775,4 @@ pwait (pid, status, flags)
return pid;
}
-#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! _WIN32 */
+#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! _UWIN) */
diff --git a/contrib/binutils/libiberty/putenv.c b/contrib/binutils/libiberty/putenv.c
new file mode 100644
index 0000000..9d56922
--- /dev/null
+++ b/contrib/binutils/libiberty/putenv.c
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file based on putenv.c in the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if defined (_AIX) && !defined (__GNUC__)
+ #pragma alloca
+#endif
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "ansidecl.h"
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#else
+# ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# else
+extern char *alloca ();
+# endif /* __GNUC__ */
+# endif /* alloca */
+#endif /* HAVE_ALLOCA_H */
+
+/* Below this point, it's verbatim code from the glibc-2.0 implementation */
+
+
+/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
+int
+putenv (string)
+ const char *string;
+{
+ const char *const name_end = strchr (string, '=');
+
+ if (name_end)
+ {
+ char *name = (char *) alloca (name_end - string + 1);
+ memcpy (name, string, name_end - string);
+ name[name_end - string] = '\0';
+ return setenv (name, name_end + 1, 1);
+ }
+
+ unsetenv (string);
+ return 0;
+}
diff --git a/contrib/binutils/libiberty/random.c b/contrib/binutils/libiberty/random.c
index e205719..ef00da0 100644
--- a/contrib/binutils/libiberty/random.c
+++ b/contrib/binutils/libiberty/random.c
@@ -2,17 +2,30 @@
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. [rescinded 22 July 1999]
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
/*
@@ -37,10 +50,14 @@
#ifdef __STDC__
# define PTR void *
-# define NULL (void *) 0
+# ifndef NULL
+# define NULL (void *) 0
+# endif
#else
# define PTR char *
-# define NULL 0
+# ifndef NULL
+# define NULL (void *) 0
+# endif
#endif
#endif
diff --git a/contrib/binutils/libiberty/setenv.c b/contrib/binutils/libiberty/setenv.c
new file mode 100644
index 0000000..eec1300
--- /dev/null
+++ b/contrib/binutils/libiberty/setenv.c
@@ -0,0 +1,163 @@
+/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file based on setenv.c in the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "ansidecl.h"
+#include <sys/types.h> /* For `size_t' */
+#include <stdio.h> /* For `NULL' */
+
+#include <errno.h>
+#if !defined(errno) && !defined(HAVE_ERRNO_DECL)
+extern int errno;
+#endif
+#define __set_errno(ev) ((errno) = (ev))
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#define __environ environ
+#ifndef HAVE_ENVIRON_DECL
+extern char **environ;
+#endif
+
+/* LOCK and UNLOCK are defined as no-ops. This makes the libiberty
+ * implementation MT-Unsafe. */
+#define LOCK
+#define UNLOCK
+
+/* Below this point, it's verbatim code from the glibc-2.0 implementation */
+
+/* If this variable is not a null pointer we allocated the current
+ environment. */
+static char **last_environ;
+
+
+int
+setenv (name, value, replace)
+ const char *name;
+ const char *value;
+ int replace;
+{
+ register char **ep;
+ register size_t size;
+ const size_t namelen = strlen (name);
+ const size_t vallen = strlen (value) + 1;
+
+ LOCK;
+
+ size = 0;
+ if (__environ != NULL)
+ for (ep = __environ; *ep != NULL; ++ep)
+ if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+ break;
+ else
+ ++size;
+
+ if (__environ == NULL || *ep == NULL)
+ {
+ char **new_environ;
+ if (__environ == last_environ && __environ != NULL)
+ /* We allocated this space; we can extend it. */
+ new_environ = (char **) realloc (last_environ,
+ (size + 2) * sizeof (char *));
+ else
+ new_environ = (char **) malloc ((size + 2) * sizeof (char *));
+
+ if (new_environ == NULL)
+ {
+ UNLOCK;
+ return -1;
+ }
+
+ new_environ[size] = malloc (namelen + 1 + vallen);
+ if (new_environ[size] == NULL)
+ {
+ free ((char *) new_environ);
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+
+ if (__environ != last_environ)
+ memcpy ((char *) new_environ, (char *) __environ,
+ size * sizeof (char *));
+
+ memcpy (new_environ[size], name, namelen);
+ new_environ[size][namelen] = '=';
+ memcpy (&new_environ[size][namelen + 1], value, vallen);
+
+ new_environ[size + 1] = NULL;
+
+ last_environ = __environ = new_environ;
+ }
+ else if (replace)
+ {
+ size_t len = strlen (*ep);
+ if (len + 1 < namelen + 1 + vallen)
+ {
+ /* The existing string is too short; malloc a new one. */
+ char *new = malloc (namelen + 1 + vallen);
+ if (new == NULL)
+ {
+ UNLOCK;
+ return -1;
+ }
+ *ep = new;
+ }
+ memcpy (*ep, name, namelen);
+ (*ep)[namelen] = '=';
+ memcpy (&(*ep)[namelen + 1], value, vallen);
+ }
+
+ UNLOCK;
+
+ return 0;
+}
+
+void
+unsetenv (name)
+ const char *name;
+{
+ const size_t len = strlen (name);
+ char **ep;
+
+ LOCK;
+
+ for (ep = __environ; *ep; ++ep)
+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ {
+ /* Found it. Remove this pointer by moving later ones back. */
+ char **dp = ep;
+ do
+ dp[0] = dp[1];
+ while (*dp++);
+ /* Continue the loop in case NAME appears again. */
+ }
+
+ UNLOCK;
+}
diff --git a/contrib/binutils/libiberty/splay-tree.c b/contrib/binutils/libiberty/splay-tree.c
new file mode 100644
index 0000000..22ea07d
--- /dev/null
+++ b/contrib/binutils/libiberty/splay-tree.c
@@ -0,0 +1,370 @@
+/* A splay-tree datatype.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Contributed by Mark Mitchell (mark@markmitchell.com).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* For an easily readable description of splay-trees, see:
+
+ Lewis, Harry R. and Denenberg, Larry. Data Structures and Their
+ Algorithms. Harper-Collins, Inc. 1991. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include "libiberty.h"
+#include "splay-tree.h"
+
+static void splay_tree_delete_helper PARAMS((splay_tree,
+ splay_tree_node));
+static void splay_tree_splay PARAMS((splay_tree,
+ splay_tree_key));
+static splay_tree_node splay_tree_splay_helper
+ PARAMS((splay_tree,
+ splay_tree_key,
+ splay_tree_node*,
+ splay_tree_node*,
+ splay_tree_node*));
+static int splay_tree_foreach_helper PARAMS((splay_tree,
+ splay_tree_node,
+ splay_tree_foreach_fn,
+ void*));
+
+/* Deallocate NODE (a member of SP), and all its sub-trees. */
+
+static void
+splay_tree_delete_helper (sp, node)
+ splay_tree sp;
+ splay_tree_node node;
+{
+ if (!node)
+ return;
+
+ splay_tree_delete_helper (sp, node->left);
+ splay_tree_delete_helper (sp, node->right);
+
+ if (sp->delete_key)
+ (*sp->delete_key)(node->key);
+ if (sp->delete_value)
+ (*sp->delete_value)(node->value);
+
+ free ((char*) node);
+}
+
+/* Help splay SP around KEY. PARENT and GRANDPARENT are the parent
+ and grandparent, respectively, of NODE. */
+
+static splay_tree_node
+splay_tree_splay_helper (sp, key, node, parent, grandparent)
+ splay_tree sp;
+ splay_tree_key key;
+ splay_tree_node *node;
+ splay_tree_node *parent;
+ splay_tree_node *grandparent;
+{
+ splay_tree_node *next;
+ splay_tree_node n;
+ int comparison;
+
+ n = *node;
+
+ if (!n)
+ return *parent;
+
+ comparison = (*sp->comp) (key, n->key);
+
+ if (comparison == 0)
+ /* We've found the target. */
+ next = 0;
+ else if (comparison < 0)
+ /* The target is to the left. */
+ next = &n->left;
+ else
+ /* The target is to the right. */
+ next = &n->right;
+
+ if (next)
+ {
+ /* Continue down the tree. */
+ n = splay_tree_splay_helper (sp, key, next, node, parent);
+
+ /* The recursive call will change the place to which NODE
+ points. */
+ if (*node != n)
+ return n;
+ }
+
+ if (!parent)
+ /* NODE is the root. We are done. */
+ return n;
+
+ /* First, handle the case where there is no grandparent (i.e.,
+ *PARENT is the root of the tree.) */
+ if (!grandparent)
+ {
+ if (n == (*parent)->left)
+ {
+ *node = n->right;
+ n->right = *parent;
+ }
+ else
+ {
+ *node = n->left;
+ n->left = *parent;
+ }
+ *parent = n;
+ return n;
+ }
+
+ /* Next handle the cases where both N and *PARENT are left children,
+ or where both are right children. */
+ if (n == (*parent)->left && *parent == (*grandparent)->left)
+ {
+ splay_tree_node p = *parent;
+
+ (*grandparent)->left = p->right;
+ p->right = *grandparent;
+ p->left = n->right;
+ n->right = p;
+ *grandparent = n;
+ return n;
+ }
+ else if (n == (*parent)->right && *parent == (*grandparent)->right)
+ {
+ splay_tree_node p = *parent;
+
+ (*grandparent)->right = p->left;
+ p->left = *grandparent;
+ p->right = n->left;
+ n->left = p;
+ *grandparent = n;
+ return n;
+ }
+
+ /* Finally, deal with the case where N is a left child, but *PARENT
+ is a right child, or vice versa. */
+ if (n == (*parent)->left)
+ {
+ (*parent)->left = n->right;
+ n->right = *parent;
+ (*grandparent)->right = n->left;
+ n->left = *grandparent;
+ *grandparent = n;
+ return n;
+ }
+ else
+ {
+ (*parent)->right = n->left;
+ n->left = *parent;
+ (*grandparent)->left = n->right;
+ n->right = *grandparent;
+ *grandparent = n;
+ return n;
+ }
+}
+
+/* Splay SP around KEY. */
+
+static void
+splay_tree_splay (sp, key)
+ splay_tree sp;
+ splay_tree_key key;
+{
+ if (sp->root == 0)
+ return;
+
+ splay_tree_splay_helper (sp, key, &sp->root,
+ /*grandparent=*/0, /*parent=*/0);
+}
+
+/* Call FN, passing it the DATA, for every node below NODE, all of
+ which are from SP, following an in-order traversal. If FN every
+ returns a non-zero value, the iteration ceases immediately, and the
+ value is returned. Otherwise, this function returns 0. */
+
+static int
+splay_tree_foreach_helper (sp, node, fn, data)
+ splay_tree sp;
+ splay_tree_node node;
+ splay_tree_foreach_fn fn;
+ void* data;
+{
+ int val;
+
+ if (!node)
+ return 0;
+
+ val = splay_tree_foreach_helper (sp, node->left, fn, data);
+ if (val)
+ return val;
+
+ val = (*fn)(node, data);
+ if (val)
+ return val;
+
+ return splay_tree_foreach_helper (sp, node->right, fn, data);
+}
+
+/* Allocate a new splay tree, using COMPARE_FN to compare nodes,
+ DELETE_KEY_FN to deallocate keys, and DELETE_VALUE_FN to deallocate
+ values. */
+
+splay_tree
+splay_tree_new (compare_fn, delete_key_fn, delete_value_fn)
+ splay_tree_compare_fn compare_fn;
+ splay_tree_delete_key_fn delete_key_fn;
+ splay_tree_delete_value_fn delete_value_fn;
+{
+ splay_tree sp = (splay_tree) xmalloc (sizeof (struct splay_tree_s));
+ sp->root = 0;
+ sp->comp = compare_fn;
+ sp->delete_key = delete_key_fn;
+ sp->delete_value = delete_value_fn;
+
+ return sp;
+}
+
+/* Deallocate SP. */
+
+void
+splay_tree_delete (sp)
+ splay_tree sp;
+{
+ splay_tree_delete_helper (sp, sp->root);
+ free ((char*) sp);
+}
+
+/* Insert a new node (associating KEY with DATA) into SP. If a
+ previous node with the indicated KEY exists, its data is replaced
+ with the new value. Returns the new node. */
+
+splay_tree_node
+splay_tree_insert (sp, key, value)
+ splay_tree sp;
+ splay_tree_key key;
+ splay_tree_value value;
+{
+ int comparison = 0;
+
+ splay_tree_splay (sp, key);
+
+ if (sp->root)
+ comparison = (*sp->comp)(sp->root->key, key);
+
+ if (sp->root && comparison == 0)
+ {
+ /* If the root of the tree already has the indicated KEY, just
+ replace the value with VALUE. */
+ if (sp->delete_value)
+ (*sp->delete_value)(sp->root->value);
+ sp->root->value = value;
+ }
+ else
+ {
+ /* Create a new node, and insert it at the root. */
+ splay_tree_node node;
+
+ node = (splay_tree_node) xmalloc (sizeof (struct splay_tree_node_s));
+ node->key = key;
+ node->value = value;
+
+ if (!sp->root)
+ node->left = node->right = 0;
+ else if (comparison < 0)
+ {
+ node->left = sp->root;
+ node->right = node->left->right;
+ node->left->right = 0;
+ }
+ else
+ {
+ node->right = sp->root;
+ node->left = node->right->left;
+ node->right->left = 0;
+ }
+
+ sp->root = node;
+ }
+
+ return sp->root;
+}
+
+/* Lookup KEY in SP, returning VALUE if present, and NULL
+ otherwise. */
+
+splay_tree_node
+splay_tree_lookup (sp, key)
+ splay_tree sp;
+ splay_tree_key key;
+{
+ splay_tree_splay (sp, key);
+
+ if (sp->root && (*sp->comp)(sp->root->key, key) == 0)
+ return sp->root;
+ else
+ return 0;
+}
+
+/* Call FN, passing it the DATA, for every node in SP, following an
+ in-order traversal. If FN every returns a non-zero value, the
+ iteration ceases immediately, and the value is returned.
+ Otherwise, this function returns 0. */
+
+int
+splay_tree_foreach (sp, fn, data)
+ splay_tree sp;
+ splay_tree_foreach_fn fn;
+ void *data;
+{
+ return splay_tree_foreach_helper (sp, sp->root, fn, data);
+}
+
+/* Splay-tree comparison function, treating the keys as ints. */
+
+int
+splay_tree_compare_ints (k1, k2)
+ splay_tree_key k1;
+ splay_tree_key k2;
+{
+ if ((int) k1 < (int) k2)
+ return -1;
+ else if ((int) k1 > (int) k2)
+ return 1;
+ else
+ return 0;
+}
+
+/* Splay-tree comparison function, treating the keys as pointers. */
+
+int
+splay_tree_compare_pointers (k1, k2)
+ splay_tree_key k1;
+ splay_tree_key k2;
+{
+ if ((char*) k1 < (char*) k2)
+ return -1;
+ else if ((char*) k1 > (char*) k2)
+ return 1;
+ else
+ return 0;
+}
diff --git a/contrib/binutils/libiberty/strchr.c b/contrib/binutils/libiberty/strchr.c
index 22976ce..550480f 100644
--- a/contrib/binutils/libiberty/strchr.c
+++ b/contrib/binutils/libiberty/strchr.c
@@ -21,7 +21,7 @@ BUGS
char *
strchr (s, c)
- register CONST char *s;
+ register const char *s;
int c;
{
do {
diff --git a/contrib/binutils/libiberty/strerror.c b/contrib/binutils/libiberty/strerror.c
index f5e2eeb..644cc75 100644
--- a/contrib/binutils/libiberty/strerror.c
+++ b/contrib/binutils/libiberty/strerror.c
@@ -7,7 +7,7 @@
#include "config.h"
-#ifndef NEED_sys_errlist
+#ifdef HAVE_SYS_ERRLIST
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
might declare sys_errlist in a way that the compiler might consider
incompatible with our later declaration, perhaps by using const
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <errno.h>
-#ifndef NEED_sys_errlist
+#ifdef HAVE_SYS_ERRLIST
#undef sys_errlist
#endif
@@ -55,12 +55,12 @@ struct error_info
{
int value; /* The numeric value from <errno.h> */
const char *name; /* The equivalent symbolic value */
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
const char *msg; /* Short message about this value */
#endif
};
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
# define ENTRY(value, name, msg) {value, name, msg}
#else
# define ENTRY(value, name, msg) {value, name}
@@ -455,7 +455,7 @@ static int num_error_names = 0;
same name, it differs from other implementations in that it is dynamically
initialized rather than statically initialized. */
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
static int sys_nerr;
static const char **sys_errlist;
@@ -532,7 +532,7 @@ init_error_tables ()
}
}
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
/* Now attempt to allocate the sys_errlist table, zero it out, and then
initialize it from the statically initialized error_table. */
@@ -595,7 +595,7 @@ errno_max ()
return (maxsize - 1);
}
-#ifdef NEED_strerror
+#ifndef HAVE_STRERROR
/*
@@ -634,7 +634,7 @@ strerror (errnoval)
char *msg;
static char buf[32];
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
if (error_names == NULL)
{
@@ -668,7 +668,7 @@ strerror (errnoval)
return (msg);
}
-#endif /* NEED_strerror */
+#endif /* ! HAVE_STRERROR */
/*
diff --git a/contrib/binutils/libiberty/strrchr.c b/contrib/binutils/libiberty/strrchr.c
index 30f9e8a..8c05bcb 100644
--- a/contrib/binutils/libiberty/strrchr.c
+++ b/contrib/binutils/libiberty/strrchr.c
@@ -21,7 +21,7 @@ BUGS
char *
strrchr (s, c)
- register CONST char *s;
+ register const char *s;
int c;
{
char *rtnval = 0;
diff --git a/contrib/binutils/libiberty/strsignal.c b/contrib/binutils/libiberty/strsignal.c
index d517eed..c7bb10c 100644
--- a/contrib/binutils/libiberty/strsignal.c
+++ b/contrib/binutils/libiberty/strsignal.c
@@ -64,12 +64,12 @@ struct signal_info
{
int value; /* The numeric value from <signal.h> */
const char *name; /* The equivalent symbolic value */
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
const char *msg; /* Short message about this value */
#endif
};
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
# define ENTRY(value, name, msg) {value, name, msg}
#else
# define ENTRY(value, name, msg) {value, name}
@@ -236,7 +236,7 @@ static int num_signal_names = 0;
same name, it differs from other implementations in that it is dynamically
initialized rather than statically initialized. */
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
static int sys_nsig;
static const char **sys_siglist;
@@ -319,7 +319,7 @@ init_signal_tables ()
}
}
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
/* Now attempt to allocate the sys_siglist table, zero it out, and then
initialize it from the statically initialized signal_table. */
@@ -414,7 +414,7 @@ DESCRIPTION
*/
-#ifdef NEED_strsignal
+#ifndef HAVE_STRSIGNAL
const char *
strsignal (signo)
@@ -423,7 +423,7 @@ strsignal (signo)
const char *msg;
static char buf[32];
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
if (signal_names == NULL)
{
@@ -452,7 +452,7 @@ strsignal (signo)
return (msg);
}
-#endif /* NEED_strsignal */
+#endif /* ! HAVE_STRSIGNAL */
/*
@@ -580,7 +580,7 @@ DESCRIPTION
followed by a newline.
*/
-#ifdef NEED_psignal
+#ifndef HAVE_PSIGNAL
void
psignal (signo, message)
@@ -601,7 +601,7 @@ psignal (signo, message)
}
}
-#endif /* NEED_psignal */
+#endif /* ! HAVE_PSIGNAL */
/* A simple little main that does nothing but print all the signal translations
diff --git a/contrib/binutils/libiberty/strtol.c b/contrib/binutils/libiberty/strtol.c
index db27ee0..5467cc3 100644
--- a/contrib/binutils/libiberty/strtol.c
+++ b/contrib/binutils/libiberty/strtol.c
@@ -10,10 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
+ * 3. [rescinded 22 July 1999]
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -63,11 +60,11 @@
*/
long
strtol(nptr, endptr, base)
- CONST char *nptr;
+ const char *nptr;
char **endptr;
register int base;
{
- register CONST char *s = nptr;
+ register const char *s = nptr;
register unsigned long acc;
register int c;
register unsigned long cutoff;
diff --git a/contrib/binutils/libiberty/strtoul.c b/contrib/binutils/libiberty/strtoul.c
index 4090245..2ec3204 100644
--- a/contrib/binutils/libiberty/strtoul.c
+++ b/contrib/binutils/libiberty/strtoul.c
@@ -10,10 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
+ * 3. [rescinded 22 July 1999]
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -51,11 +48,11 @@
*/
unsigned long
strtoul(nptr, endptr, base)
- CONST char *nptr;
+ const char *nptr;
char **endptr;
register int base;
{
- register CONST char *s = nptr;
+ register const char *s = nptr;
register unsigned long acc;
register int c;
register unsigned long cutoff;
@@ -91,7 +88,7 @@ strtoul(nptr, endptr, base)
break;
if (c >= base)
break;
- if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
diff --git a/contrib/binutils/libiberty/tmpnam.c b/contrib/binutils/libiberty/tmpnam.c
index c061467..8eb77e2 100644
--- a/contrib/binutils/libiberty/tmpnam.c
+++ b/contrib/binutils/libiberty/tmpnam.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#ifndef L_tmpnam
-#define L_tmpname 100
+#define L_tmpnam 100
#endif
#ifndef P_tmpdir
#define P_tmpdir "/usr/tmp"
diff --git a/contrib/binutils/libiberty/vasprintf.c b/contrib/binutils/libiberty/vasprintf.c
index da83db2..b959f5f 100644
--- a/contrib/binutils/libiberty/vasprintf.c
+++ b/contrib/binutils/libiberty/vasprintf.c
@@ -18,14 +18,14 @@ License along with libiberty; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <stdio.h>
-#include <string.h>
-#include <ansidecl.h>
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
+#include <stdio.h>
+#include <string.h>
+#include <ansidecl.h>
#ifdef TEST
int global_total_width;
@@ -105,6 +105,7 @@ int_vasprintf (result, format, args)
(void) va_arg (ap, char *);
break;
}
+ p++;
}
}
#ifdef TEST
diff --git a/contrib/binutils/libiberty/vfprintf.c b/contrib/binutils/libiberty/vfprintf.c
index ce3fdf9..db7b2ff 100644
--- a/contrib/binutils/libiberty/vfprintf.c
+++ b/contrib/binutils/libiberty/vfprintf.c
@@ -1,13 +1,21 @@
-#include <stdio.h>
+/* Provide a version vfprintf in terms of _doprnt.
+ By Kaveh Ghazi (ghazi@caip.rutgers.edu) 3/29/98
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ */
+
+#ifdef __STDC__
+#include <stdarg.h>
+#else
#include <varargs.h>
-#include <ansidecl.h>
+#endif
+#include <stdio.h>
#undef vfprintf
int
-vfprintf (file, format, ap)
- FILE *file;
- const char *format;
- va_list ap;
+vfprintf (stream, format, ap)
+ FILE * stream;
+ const char * format;
+ va_list ap;
{
- return _doprnt (format, ap, file);
+ return _doprnt (format, ap, stream);
}
diff --git a/contrib/binutils/libiberty/vprintf.c b/contrib/binutils/libiberty/vprintf.c
index 89c289e..65b425a 100644
--- a/contrib/binutils/libiberty/vprintf.c
+++ b/contrib/binutils/libiberty/vprintf.c
@@ -1,9 +1,9 @@
-#include <stdio.h>
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
+#include <stdio.h>
#include <ansidecl.h>
#undef vprintf
int
diff --git a/contrib/binutils/libiberty/xmalloc.c b/contrib/binutils/libiberty/xmalloc.c
index b88105a..621c6d2 100644
--- a/contrib/binutils/libiberty/xmalloc.c
+++ b/contrib/binutils/libiberty/xmalloc.c
@@ -36,28 +36,29 @@ Boston, MA 02111-1307, USA. */
/* For systems with larger pointers than ints, these must be declared. */
PTR malloc PARAMS ((size_t));
PTR realloc PARAMS ((PTR, size_t));
+PTR calloc PARAMS ((size_t, size_t));
PTR sbrk PARAMS ((ptrdiff_t));
#endif
/* The program name if set. */
static const char *name = "";
-#if ! defined (_WIN32) || defined (__CYGWIN32__)
+#ifdef HAVE_SBRK
/* The initial sbrk, set when the program name is set. Not used for win32
ports other than cygwin32. */
static char *first_break = NULL;
-#endif
+#endif /* HAVE_SBRK */
void
xmalloc_set_program_name (s)
const char *s;
{
name = s;
-#if ! defined (_WIN32) || defined (__CYGWIN32__)
+#ifdef HAVE_SBRK
/* Win32 ports other than cygwin32 don't have brk() */
if (first_break == NULL)
first_break = (char *) sbrk (0);
-#endif /* ! _WIN32 || __CYGWIN32 __ */
+#endif /* HAVE_SBRK */
}
PTR
@@ -71,7 +72,7 @@ xmalloc (size)
newmem = malloc (size);
if (!newmem)
{
-#if ! defined (_WIN32) || defined (__CYGWIN32__)
+#ifdef HAVE_SBRK
extern char **environ;
size_t allocated;
@@ -80,15 +81,50 @@ xmalloc (size)
else
allocated = (char *) sbrk (0) - (char *) &environ;
fprintf (stderr,
- "\n%s%sCan not allocate %lu bytes after allocating %lu bytes\n",
+ "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size, (unsigned long) allocated);
-#else
+#else /* HAVE_SBRK */
fprintf (stderr,
- "\n%s%sCan not allocate %lu bytes\n",
+ "\n%s%sCannot allocate %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size);
-#endif /* ! _WIN32 || __CYGWIN32 __ */
+#endif /* HAVE_SBRK */
+ xexit (1);
+ }
+ return (newmem);
+}
+
+PTR
+xcalloc (nelem, elsize)
+ size_t nelem, elsize;
+{
+ PTR newmem;
+
+ if (nelem == 0 || elsize == 0)
+ nelem = elsize = 1;
+
+ newmem = calloc (nelem, elsize);
+ if (!newmem)
+ {
+#ifdef HAVE_SBRK
+ extern char **environ;
+ size_t allocated;
+
+ if (first_break != NULL)
+ allocated = (char *) sbrk (0) - first_break;
+ else
+ allocated = (char *) sbrk (0) - (char *) &environ;
+ fprintf (stderr,
+ "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) (nelem * elsize), (unsigned long) allocated);
+#else /* HAVE_SBRK */
+ fprintf (stderr,
+ "\n%s%sCannot allocate %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) (nelem * elsize));
+#endif /* HAVE_SBRK */
xexit (1);
}
return (newmem);
@@ -109,7 +145,7 @@ xrealloc (oldmem, size)
newmem = realloc (oldmem, size);
if (!newmem)
{
-#ifndef __MINGW32__
+#ifdef HAVE_SBRK
extern char **environ;
size_t allocated;
@@ -118,15 +154,15 @@ xrealloc (oldmem, size)
else
allocated = (char *) sbrk (0) - (char *) &environ;
fprintf (stderr,
- "\n%s%sCan not reallocate %lu bytes after allocating %lu bytes\n",
+ "\n%s%sCannot reallocate %lu bytes after allocating %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size, (unsigned long) allocated);
-#else
+#else /* HAVE_SBRK */
fprintf (stderr,
- "\n%s%sCan not reallocate %lu bytes\n",
+ "\n%s%sCannot reallocate %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size);
-#endif /* __MINGW32__ */
+#endif /* HAVE_SBRK */
xexit (1);
}
return (newmem);
diff --git a/contrib/binutils/libiberty/xmemdup.c b/contrib/binutils/libiberty/xmemdup.c
new file mode 100644
index 0000000..f780041
--- /dev/null
+++ b/contrib/binutils/libiberty/xmemdup.c
@@ -0,0 +1,22 @@
+/* xmemdup.c -- Duplicate a memory buffer, using xcalloc.
+ This trivial function is in the public domain.
+ Jeff Garzik, September 1999. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "ansidecl.h"
+#include "libiberty.h"
+
+#include <sys/types.h> /* For size_t. */
+
+PTR
+xmemdup (input, copy_size, alloc_size)
+ const PTR input;
+ size_t copy_size;
+ size_t alloc_size;
+{
+ PTR output = xcalloc (1, alloc_size);
+ memcpy (output, input, copy_size);
+ return output;
+}
diff --git a/contrib/binutils/libiberty/xstrdup.c b/contrib/binutils/libiberty/xstrdup.c
index 9d08bc7..6f846cf 100644
--- a/contrib/binutils/libiberty/xstrdup.c
+++ b/contrib/binutils/libiberty/xstrdup.c
@@ -2,16 +2,22 @@
This trivial function is in the public domain.
Ian Lance Taylor, Cygnus Support, December 1995. */
+#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#include "ansidecl.h"
#include "libiberty.h"
char *
xstrdup (s)
- const char *s;
+ const char *s;
{
- char *ret;
-
- ret = xmalloc (strlen (s) + 1);
- strcpy (ret, s);
+ register size_t len = strlen (s) + 1;
+ register char *ret = xmalloc (len);
+ memcpy (ret, s, len);
return ret;
}
diff --git a/contrib/binutils/ltconfig b/contrib/binutils/ltconfig
index fe78498..a01334f 100755
--- a/contrib/binutils/ltconfig
+++ b/contrib/binutils/ltconfig
@@ -1,8 +1,8 @@
#! /bin/sh
# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# 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
@@ -25,30 +25,129 @@
# A lot of this script is taken from autoconf-2.10.
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+echo=echo
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec "$SHELL" "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+ UNAME=${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) PATH_SEPARATOR=';' ;;
+ *) PATH_SEPARATOR=':' ;;
+ esac
+fi
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
+ break
+ fi
+ done
+fi
-echo=echo
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
-else
- # The Solaris and AIX default echo program unquotes backslashes.
- # This makes it impossible to quote backslashes using
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
+ test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
- # So, we emulate echo with printf '%s\n'
- echo="printf %s\\n"
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
- else
- # Oops. We have no working printf. Try to find a not-so-buggy echo.
- echo=echo
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH /usr/ucb; do
- if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
- echo="$dir/echo"
- break
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH /usr/ucb; do
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running ltconfig again with it.
+ ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo='printf "%s\n"'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
fi
- done
- IFS="$save_ifs"
+ fi
fi
fi
@@ -60,24 +159,34 @@ sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
# The name of this program.
progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
-VERSION=1.2
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
+VERSION=1.3.4
+TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
rm="rm -f"
help="Try \`$progname --help' for more information."
# Global variables:
+default_ofile=libtool
can_build_shared=yes
enable_shared=yes
-# All known linkers require a `.a' archive for static linking.
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
enable_static=yes
+enable_fast_install=yes
+enable_dlopen=unknown
+enable_win32_dll=no
ltmain=
silent=
srcdir=
@@ -85,18 +194,30 @@ ac_config_guess=
ac_config_sub=
host=
nonopt=
+ofile="$default_ofile"
verify_host=yes
with_gcc=no
with_gnu_ld=no
+need_locks=yes
+ac_ext=c
+objext=o
+libext=a
+exeext=
+cache_file=
old_AR="$AR"
old_CC="$CC"
old_CFLAGS="$CFLAGS"
old_CPPFLAGS="$CPPFLAGS"
+old_LDFLAGS="$LDFLAGS"
old_LD="$LD"
old_LN_S="$LN_S"
+old_LIBS="$LIBS"
old_NM="$NM"
old_RANLIB="$RANLIB"
+old_DLLTOOL="$DLLTOOL"
+old_OBJDUMP="$OBJDUMP"
+old_AS="$AS"
# Parse the command line options.
args=
@@ -117,33 +238,51 @@ do
case "$option" in
--help) cat <<EOM
-Usage: $progname [OPTION]... LTMAIN [HOST]
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
Generate a system-specific libtool script.
+ --debug enable verbose shell tracing
--disable-shared do not build shared libraries
--disable-static do not build static libraries
+ --disable-fast-install do not optimize for fast installation
+ --enable-dlopen enable dlopen support
+ --enable-win32-dll enable building dlls on win32 hosts
--help display this help and exit
--no-verify do not verify that HOST is a valid host type
+-o, --output=FILE specify the output file [default=$default_ofile]
--quiet same as \`--silent'
--silent do not print informational messages
--srcdir=DIR find \`config.guess' in DIR
--version output version information and exit
--with-gcc assume that the GNU C compiler will be used
--with-gnu-ld assume that the C compiler uses the GNU linker
+ --disable-lock disable file locking
+ --cache-file=FILE configure cache file
-LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
-functionality.
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
HOST is the canonical host system name [default=guessed].
EOM
exit 0
;;
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
--disable-shared) enable_shared=no ;;
--disable-static) enable_static=no ;;
+ --disable-fast-install) enable_fast_install=no ;;
+
+ --enable-dlopen) enable_dlopen=yes ;;
+
+ --enable-win32-dll) enable_win32_dll=yes ;;
+
--quiet | --silent) silent=yes ;;
--srcdir) prev=srcdir ;;
@@ -151,11 +290,18 @@ EOM
--no-verify) verify_host=no ;;
- --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
+ --output | -o) prev=ofile ;;
+ --output=*) ofile="$optarg" ;;
+
+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
--with-gcc) with_gcc=yes ;;
--with-gnu-ld) with_gnu_ld=yes ;;
+ --disable-lock) need_locks=no ;;
+
+ --cache-file=*) cache_file="$optarg" ;;
+
-*)
echo "$progname: unrecognized option \`$option'" 1>&2
echo "$help" 1>&2
@@ -185,8 +331,7 @@ if test -z "$ltmain"; then
exit 1
fi
-if test -f "$ltmain"; then :
-else
+if test ! -f "$ltmain"; then
echo "$progname: \`$ltmain' does not exist" 1>&2
echo "$help" 1>&2
exit 1
@@ -224,8 +369,13 @@ exec 5>>./config.log
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
+if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
+
+if test -n "$cache_file" && test -r "$cache_file"; then
+ echo "loading cache $cache_file within ltconfig"
+ . $cache_file
+fi
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -240,8 +390,8 @@ else
fi
if test -z "$srcdir"; then
- # Assume the source directory is the same one as the path to ltmain.sh.
- srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
+ # Assume the source directory is the same one as the path to LTMAIN.
+ srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
test "$srcdir" = "$ltmain" && srcdir=.
fi
@@ -264,7 +414,7 @@ if test "$verify_host" = yes; then
ac_config_sub=$ac_aux_dir/config.sub
# Make sure we can run config.sub.
- if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
else
echo "$progname: cannot run $ac_config_sub" 1>&2
echo "$help" 1>&2
@@ -276,14 +426,14 @@ if test "$verify_host" = yes; then
host_alias=$host
case "$host_alias" in
"")
- if host_alias=`$ac_config_guess`; then :
+ if host_alias=`$SHELL $ac_config_guess`; then :
else
echo "$progname: cannot guess host type; you must specify one" 1>&2
echo "$help" 1>&2
exit 1
fi ;;
esac
- host=`$ac_config_sub $host_alias`
+ host=`$SHELL $ac_config_sub $host_alias`
echo "$ac_t$host" 1>&6
# Make sure the host verified.
@@ -312,7 +462,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test "${COLLECT_NAMES+set}" != set; then
+ if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -327,15 +477,18 @@ old_postuninstall_cmds=
# Set a sane default for `AR'.
test -z "$AR" && AR=ar
+# Set a sane default for `OBJDUMP'.
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
# If RANLIB is not set, then run the test.
if test "${RANLIB+set}" != "set"; then
result=no
echo $ac_n "checking for ranlib... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH; do
test -z "$dir" && dir=.
- if test -f $dir/ranlib; then
+ if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
RANLIB="ranlib"
result="ranlib"
break
@@ -347,20 +500,24 @@ if test "${RANLIB+set}" != "set"; then
fi
if test -n "$RANLIB"; then
- old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds"
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
fi
+# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$AS" && AS=as
+
# Check to see if we are using GCC.
if test "$with_gcc" != yes || test -z "$CC"; then
# If CC is not set, then try to find GCC or a usable CC.
if test -z "$CC"; then
echo $ac_n "checking for gcc... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH; do
- IFS="$save_ifs"
test -z "$dir" && dir=.
- if test -f $dir/gcc; then
+ if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
CC="gcc"
break
fi
@@ -377,11 +534,11 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
if test -z "$CC"; then
echo $ac_n "checking for cc... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
cc_rejected=no
for dir in $PATH; do
test -z "$dir" && dir=.
- if test -f $dir/cc; then
+ if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
if test "$dir/cc" = "/usr/ucb/cc"; then
cc_rejected=yes
continue
@@ -421,7 +578,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Now see if the compiler is really GCC.
with_gcc=no
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
- echo "$progname:424: checking whether we are using GNU C" >&5
+ echo "$progname:581: checking whether we are using GNU C" >&5
$rm conftest.c
cat > conftest.c <<EOF
@@ -429,7 +586,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
yes;
#endif
EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$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 $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
fi
$rm conftest.c
@@ -440,6 +597,60 @@ fi
set dummy $CC
compiler="$2"
+echo $ac_n "checking for object suffix... $ac_c" 1>&6
+$rm conftest*
+echo 'int i = 1;' > conftest.c
+echo "$progname:603: checking for object suffix" >& 5
+if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ cat conftest.err 1>&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+fi
+$rm conftest*
+echo "$ac_t$objext" 1>&6
+
+echo $ac_n "checking for executable suffix... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_exeext="no"
+ $rm conftest*
+ echo 'main () { return 0; }' > conftest.c
+ echo "$progname:629: checking for executable suffix" >& 5
+ if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c | *.err | *.$objext ) ;;
+ *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+ else
+ cat conftest.err 1>&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ $rm conftest*
+fi
+if test "X$ac_cv_exeext" = Xno; then
+ exeext=""
+else
+ exeext="$ac_cv_exeext"
+fi
+echo "$ac_t$ac_cv_exeext" 1>&6
+
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
pic_flag=
special_shlib_compile_flags=
@@ -450,13 +661,21 @@ no_builtin_flag=
if test "$with_gcc" = yes; then
wl='-Wl,'
link_static_flag='-static'
- no_builtin_flag=' -fno-builtin'
case "$host_os" in
- aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- os2*)
+ aix*)
+ # Below there is a dirty hack to force normal static linking with -ldl
+ # The problem is because libdl dynamically linked with both libc and
+ # libC (AIX C++ library), which obviously doesn't included in libraries
+ # list by gcc. This cause undefined symbols with -static flags.
+ # This hack allows C programs to be linked with "-static -ldl", but
+ # we not sure about C++ programs.
+ link_static_flag="$link_static_flag ${wl}-lC"
+ ;;
+ cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
amigaos*)
@@ -465,6 +684,11 @@ if test "$with_gcc" = yes; then
# like `-m68040'.
pic_flag='-m68020 -resident32 -malways-restore-a4'
;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ pic_flag=-Kconform_pic
+ fi
+ ;;
*)
pic_flag='-fPIC'
;;
@@ -490,11 +714,11 @@ else
# PIC (with -KPIC) is the default.
;;
- os2*)
+ cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
- osf3* | osf4*)
+ osf3* | osf4* | osf5*)
# All OSF/1 code is PIC.
wl='-Wl,'
link_static_flag='-non_shared'
@@ -506,7 +730,7 @@ else
special_shlib_compile_flags='-belf'
;;
- solaris2*)
+ solaris*)
pic_flag='-KPIC'
link_static_flag='-Bstatic'
wl='-Wl,'
@@ -518,7 +742,7 @@ else
wl='-Qoption ld '
;;
- sysv4.2uw2*)
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
pic_flag='-KPIC'
link_static_flag='-Bstatic'
wl='-Wl,'
@@ -528,7 +752,12 @@ else
pic_flag='-pic'
link_static_flag='-Bstatic'
;;
-
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ pic_flag='-Kconform_pic'
+ link_static_flag='-Bstatic'
+ fi
+ ;;
*)
can_build_shared=no
;;
@@ -541,25 +770,33 @@ if test -n "$pic_flag"; then
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
$rm conftest*
- echo > conftest.c
+ echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC"
- echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
- if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+ echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
-
- # On HP-UX, both CC and GCC only warn that PIC is supported... then they
- # create non-PIC objects. So, if there were any warnings, we assume that
- # PIC is not supported.
- if test -s conftest.err; then
- echo "$ac_t"no 1>&6
- can_build_shared=no
- pic_flag=
- else
+
+ case "$host_os" in
+ hpux9* | hpux10* | hpux11*)
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ can_build_shared=no
+ pic_flag=
+ else
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ fi
+ ;;
+ *)
echo "$ac_t"yes 1>&6
pic_flag=" $pic_flag"
- fi
+ ;;
+ esac
else
# Append any errors to the config.log.
cat conftest.err 1>&5
@@ -573,6 +810,136 @@ else
echo "$ac_t"none 1>&6
fi
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+$rm conftest*
+echo "int some_variable = 0;" > conftest.c
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+# that will create temporary files in the current directory regardless of
+# the output directory. Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do parallel
+# builds.
+chmod -w .
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -o out/conftest2.o"
+echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
+if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s out/conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_c_o=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_c_o=yes
+ fi
+else
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&5
+ compiler_c_o=no
+ echo "$ac_t"no 1>&6
+fi
+CFLAGS="$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+
+if test x"$compiler_c_o" = x"yes"; then
+ # Check to see if we can write to a .lo
+ echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -c -o conftest.lo"
+ echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
+if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_o_lo=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_o_lo=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_o_lo=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$ac_t$hard_links" 1>&6
+ $rm conftest*
+ if test "$hard_links" = no; then
+ echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+if test "$with_gcc" = yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
+ echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_rtti_exceptions=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_rtti_exceptions=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_rtti_exceptions=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+
+ if test "$compiler_rtti_exceptions" = "yes"; then
+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=' -fno-builtin'
+ fi
+
+fi
+
# Check for any special shared library compilation flags.
if test -n "$special_shlib_compile_flags"; then
echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
@@ -588,8 +955,8 @@ $rm conftest*
echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$ac_t$link_static_flag" 1>&6
else
echo "$ac_t"none 1>&6
@@ -601,9 +968,9 @@ $rm conftest*
if test -z "$LN_S"; then
# Check to see if we can use ln -s, or we need hard links.
echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
- $rm conftestdata
- if ln -s X conftestdata 2>/dev/null; then
- $rm conftestdata
+ $rm conftest.dat
+ if ln -s X conftest.dat 2>/dev/null; then
+ $rm conftest.dat
LN_S="ln -s"
else
LN_S=ln
@@ -621,11 +988,17 @@ if test -z "$LD"; then
if test "$with_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 "$progname:624: checking for ld used by GCC" >&5
+ echo "$progname:991: 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]:\\*)
+ [\\/]* | [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"
;;
"")
@@ -639,17 +1012,17 @@ if test -z "$LD"; then
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
- echo "$progname:642: checking for GNU ld" >&5
+ echo "$progname:1015: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
- echo "$progname:645: checking for non-GNU ld" >&5
+ echo "$progname:1018: checking for non-GNU ld" >&5
fi
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ 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"; then
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
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.
@@ -691,48 +1064,202 @@ echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c
allow_undefined_flag=
no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
archive_cmds=
+archive_expsym_cmds=
old_archive_from_new_cmds=
export_dynamic_flag_spec=
+whole_archive_flag_spec=
+thread_safe_flag_spec=
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
runpath_var=
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+# platforms (ab)use it in PIC code, but their linkers get confused if
+# the symbol is explicitly referenced. Since portable code cannot
+# rely on this symbol name, it's probably fine to never include it in
+# preloaded symbol tables.
case "$host_os" in
-amigaos* | sunos4*)
- # On these operating systems, we should treat GNU ld like the system ld.
- gnu_ld_acts_native=yes
- ;;
-*)
- gnu_ld_acts_native=no
+cygwin* | mingw*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$with_gcc" != yes; then
+ with_gnu_ld=no
+ fi
;;
+
esac
ld_shlibs=yes
-if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
+if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
# See if GNU ld supports shared libraries.
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
- runpath_var=LD_RUN_PATH
- ld_shlibs=yes
- else
+ case "$host_os" in
+ aix3* | aix4*)
+ # On AIX, the GNU linker is very broken
ld_shlibs=no
- fi
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ ;;
+
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
+ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
+
+ archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
+ _lt_hint=1;
+ for symbol in `cat $export_symbols`; do
+ echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done~
+ test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
+ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
+
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
+ # can we support soname and/or expsyms with a.out? -oliva
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
if test "$ld_shlibs" = yes; then
+ runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw*)
+ # dlltool doesn't understand --whole-archive et. al.
+ whole_archive_flag_spec=
+ ;;
+ *)
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ ;;
+ esac
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case "$host_os" in
aix3*)
allow_undefined_flag=unsupported
- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
@@ -744,16 +1271,67 @@ else
;;
aix4*)
- allow_undefined_flag=unsupported
- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname'
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
+ hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
+ hardcode_libdir_separator=':'
+ if test "$with_gcc" = yes; then
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ shared_flag='-shared'
+ else
+ shared_flag='${wl}-bM:SRE'
+ hardcode_direct=yes
+ fi
+ allow_undefined_flag=' ${wl}-berok'
+ archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
+ archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
+ case "$host_os" in aix4.[01]|aix4.[01].*)
+ # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
+ always_export_symbols=yes ;;
+ esac
+ ;;
amigaos*)
- archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+
+ cygwin* | mingw*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+ fix_srcfile_path='`cygpath -w $srcfile`'
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
@@ -761,61 +1339,64 @@ else
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
- hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
- # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
- freebsd3*)
- archive_cmds='$CC -shared -o $lib$libobjs'
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
- hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
- hpux9*)
- archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10* | hpux11*)
- archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
+ hpux9* | hpux10* | hpux11*)
+ case "$host_os" in
+ hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
+ esac
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
hardcode_direct=yes
- hardcode_minus_L=yes
+ hardcode_minus_L=yes # Not in the search PATH, but as the default
+ # location of the library.
export_dynamic_flag_spec='${wl}-E'
;;
irix5* | irix6*)
- archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
+ if test "$with_gcc" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
;;
netbsd*)
- # Tested with NetBSD 1.2 ld
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
- hardcode_libdir_flag_spec='-R$libdir'
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
+ fi
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
@@ -825,88 +1406,157 @@ else
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
;;
- osf3* | osf4*)
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
+ osf3*)
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # As osf3* with the addition of the -msym flag
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
sco3.2v5*)
- archive_cmds='$LD -G -o $lib$libobjs'
- hardcode_direct=yes
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
;;
- solaris2*)
+ solaris*)
no_undefined_flag=' -z text'
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
-
- # Solaris 2 before 2.5 hardcodes -L paths.
case "$host_os" in
- solaris2.[0-4]*)
- hardcode_minus_L=yes
- ;;
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
esac
;;
sunos4*)
- if test "$with_gcc" = yes; then
- archive_cmds='$CC -shared -o $lib$libobjs'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
- fi
-
- if test "$with_gnu_ld" = yes; then
- export_dynamic_flag_spec='${wl}-export-dynamic'
- fi
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
+ sysv4)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv5*)
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+ hardcode_libdir_flag_spec=
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
uts4*)
- archive_cmds='$LD -G -h $soname -o $lib$libobjs'
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=yes
hardcode_minus_L=no
hardcode_shlibpath_var=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ unixware7*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
;;
*)
ld_shlibs=no
- can_build_shared=no
;;
esac
fi
echo "$ac_t$ld_shlibs" 1>&6
+test "$ld_shlibs" = no && can_build_shared=no
if test -z "$NM"; then
echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
case "$NM" in
- /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path.
+ [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm; 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
- NM="$ac_dir/nm -B"
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- NM="$ac_dir/nm -p"
+ 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
+ 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
+ NM="$ac_dir/nm -p"
+ break
else
- NM="$ac_dir/nm"
+ NM=${NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
fi
- break
fi
done
IFS="$ac_save_ifs"
@@ -923,40 +1573,54 @@ echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
# Character class describing NM global symbol codes.
-symcode='[BCDEGRSTU]'
+symcode='[BCDEGRST]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \1'
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
# Define system-specific variables.
case "$host_os" in
aix*)
- symcode='[BCDTU]'
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
;;
irix*)
- # Cannot use undefined symbols on IRIX because inlined functions mess us up.
symcode='[BCDEGRST]'
;;
-solaris2*)
- symcode='[BDTU]'
+solaris*)
+ symcode='[BDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
;;
esac
# If we're using GNU nm, then use its standard symbol codes.
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[ABCDGISTUW]'
+ symcode='[ABCDGISTW]'
fi
-# Write the raw and C identifiers.
-global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
-# Check to see that the pipe works correctly.
-pipe_works=no
-$rm conftest*
-cat > conftest.c <<EOF
+ # Write the raw and C identifiers.
+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+ $rm conftest*
+ cat > conftest.c <<EOF
#ifdef __cplusplus
extern "C" {
#endif
@@ -968,93 +1632,100 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
-echo "$progname:971: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
-
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- wcout=`wc "$nlist" 2>/dev/null`
- count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
- (test "$count" -ge 0) 2>/dev/null || count=-1
- else
- rm -f "$nlist"T
- count=-1
- fi
+ echo "$progname:1635: checking if global_symbol_pipe works" >&5
+ if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.c
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.c
#ifdef __cplusplus
extern "C" {
#endif
EOF
- # Now generate the symbol file.
- sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
+ # Now generate the symbol file.
+ eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
- cat <<EOF >> conftest.c
+ cat <<EOF >> conftest.c
#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
+# define lt_ptr_t void *
#else
-# define __ptr_t char *
+# define lt_ptr_t char *
+# define const
#endif
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
/* The mapping between symbol names and symbols. */
-struct {
- char *name;
- __ptr_t address;
+const struct {
+ const char *name;
+ lt_ptr_t address;
}
-dld_preloaded_symbols[] =
+lt_preloaded_symbols[] =
{
EOF
- sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
- cat <<\EOF >> conftest.c
- {0, (__ptr_t) 0}
+ sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (lt_ptr_t) 0}
};
#ifdef __cplusplus
}
#endif
EOF
- # Now try linking the two files.
- mv conftest.o conftestm.o
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS='conftestm.o'
- CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- pipe_works=yes
- else
- echo "$progname: failed program was:" >&5
- cat conftest.c >&5
- fi
- LIBS="$save_LIBS"
+ # Now try linking the two files.
+ mv conftest.$objext conftstm.$objext
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ pipe_works=yes
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ LIBS="$save_LIBS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
else
- echo "cannot find nm_test_func in $nlist" >&5
+ echo "cannot find nm_test_var in $nlist" >&5
fi
else
- echo "cannot find nm_test_var in $nlist" >&5
+ echo "cannot run $global_symbol_pipe" >&5
fi
else
- echo "cannot run $global_symbol_pipe" >&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
fi
+ $rm conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ global_symbol_pipe=
+ fi
+done
+if test "$pipe_works" = yes; then
+ echo "${ac_t}ok" 1>&6
else
- echo "$progname: failed program was:" >&5
- cat conftest.c >&5
+ echo "${ac_t}failed" 1>&6
fi
-$rm conftest*
-# Do not use the global_symbol_pipe unless it works.
-echo "$ac_t$pipe_works" 1>&6
-test "$pipe_works" = yes || global_symbol_pipe=
+if test -z "$global_symbol_pipe"; then
+ global_symbol_to_cdecl=
+fi
# Check hardcoding attributes.
echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
@@ -1063,35 +1734,32 @@ if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var"; then
# We can hardcode non-existant directories.
- if test "$hardcode_direct" != no && \
- test "$hardcode_minus_L" != no && \
- test "$hardcode_shlibpath_var" != no; then
-
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$hardcode_shlibpath_var" != no &&
+ test "$hardcode_minus_L" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
hardcode_action=immediate
fi
-elif test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
- test "$hardcode_shlibpath_var" != yes; then
- # We cannot hardcode anything.
- hardcode_action=unsupported
else
- # We can only hardcode existing directories.
- hardcode_action=relink
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
echo "$ac_t$hardcode_action" 1>&6
-test "$hardcode_action" = unsupported && can_build_shared=no
reload_flag=
reload_cmds='$LD$reload_flag -o $output$reload_objs'
echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
-# PORTME Some linker may need a different reload flag.
+# PORTME Some linkers may need a different reload flag.
reload_flag='-r'
-echo "$ac_t$reload_flag"
+echo "$ac_t$reload_flag" 1>&6
test -n "$reload_flag" && reload_flag=" $reload_flag"
# PORTME Fill in your ld.so characteristics
@@ -1103,18 +1771,45 @@ postuninstall_cmds=
finish_cmds=
finish_eval=
shlibpath_var=
+shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
-
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+file_magic_cmd=
+file_magic_test_file=
+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.
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
case "$host_os" in
-aix3* | aix4*)
+aix3*)
version_type=linux
- library_names_spec='${libname}${release}.so.$versuffix $libname.a'
+ library_names_spec='${libname}${release}.so$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so.$major'
+ soname_spec='${libname}${release}.so$major'
+ ;;
+
+aix4*)
+ version_type=linux
+ # AIX has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ # We preserve .a as extension for shared libraries though AIX4.2
+ # and later linker supports .so
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
+ shlibpath_var=LIBPATH
+ deplibs_check_method=pass_all
;;
amigaos*)
@@ -1123,16 +1818,91 @@ amigaos*)
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
;;
-freebsd2* | freebsd3*)
- version_type=sunos
- library_names_spec='${libname}${release}.so.$versuffix $libname.so'
- finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+beos*)
+ library_names_spec='${libname}.so'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ deplibs_check_method=pass_all
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+bsdi4*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ export_dynamic_flag_spec=-rdynamic
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw*)
+ version_type=windows
+ need_version=no
+ need_lib_prefix=no
+ if test "$with_gcc" = yes; then
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
+ else
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+ fi
+ dynamic_linker='Win32 ld.exe'
+ deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ file_magic_cmd='${OBJDUMP} -f'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ case "$version_type" in
+ freebsd-elf*)
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so*`
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ deplibs_check_method=unknown
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
+ esac
shlibpath_var=LD_LIBRARY_PATH
+ case "$host_os" in
+ freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ ;;
+ esac
;;
gnu*)
- version_type=sunos
- library_names_spec='${libname}${release}.so.$versuffix'
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+ soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -1141,18 +1911,44 @@ hpux9* | hpux10* | hpux11*)
# link against other versions.
dynamic_linker="$host_os dld.sl"
version_type=sunos
+ need_lib_prefix=no
+ need_version=no
shlibpath_var=SHLIB_PATH
- library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl'
- soname_spec='${libname}${release}.sl.$major'
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+ soname_spec='${libname}${release}.sl$major'
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
;;
irix5* | irix6*)
- version_type=osf
- soname_spec='${libname}${release}.so'
- library_names_spec='${libname}${release}.so.$versuffix $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
+ version_type=irix
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}.so.$major'
+ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
+ case "$host_os" in
+ irix5*)
+ libsuff= shlibsuff=
+ # this will be overridden with pass_all, but let us keep it just in case
+ deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ deplibs_check_method='pass_all'
;;
# No shared lib support for Linux oldld, aout, or coff.
@@ -1163,10 +1959,16 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
# This must be Linux ELF.
linux-gnu*)
version_type=linux
- library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
- soname_spec='${libname}${release}.so.$major'
- finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
if test -f /lib/ld.so.1; then
dynamic_linker='GNU ld.so'
@@ -1179,85 +1981,196 @@ linux-gnu*)
fi
;;
-netbsd* | openbsd*)
+netbsd*)
version_type=sunos
- library_names_spec='${libname}${release}.so.$versuffix'
- finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec='${libname}${release}.so$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+openbsd*)
+ version_type=sunos
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ need_version=no
+ fi
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
;;
os2*)
libname_spec='$name'
+ need_lib_prefix=no
library_names_spec='$libname.dll $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
;;
-osf3* | osf4*)
+osf3* | osf4* | osf5*)
version_type=osf
+ need_version=no
soname_spec='${libname}${release}.so'
- library_names_spec='${libname}${release}.so.$versuffix $libname.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH
+ # this will be overridden with pass_all, but let us keep it just in case
+ deplibs_check_method='file_magic COFF format alpha shared library'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ deplibs_check_method='pass_all'
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
sco3.2v5*)
version_type=osf
- soname_spec='${libname}${release}.so.$major'
- library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
shlibpath_var=LD_LIBRARY_PATH
;;
-solaris2*)
+solaris*)
version_type=linux
- library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
- soname_spec='${libname}${release}.so.$major'
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/lib/libc.so
;;
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}.so.$versuffix'
- finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
;;
-sysv4.2uw2*)
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
version_type=linux
- library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
- soname_spec='${libname}${release}.so.$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
+ case "$host_vendor" in
+ ncr)
+ deplibs_check_method='pass_all'
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ 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]'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ esac
;;
uts4*)
version_type=linux
- library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
- soname_spec='${libname}${release}.so.$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
;;
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+ soname_spec='$libname.so.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
*)
dynamic_linker=no
;;
esac
-echo "$ac_t$dynamic_linker"
+echo "$ac_t$dynamic_linker" 1>&6
test "$dynamic_linker" = no && can_build_shared=no
# Report the final consequences.
echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
+# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
+# configure.in, otherwise build static only libraries.
+case "$host_os" in
+cygwin* | mingw* | os2*)
+ if test x$can_build_shared = xyes; then
+ test x$enable_win32_dll = xno && can_build_shared=no
+ echo "checking if package supports dlls... $can_build_shared" 1>&6
+ fi
+;;
+esac
+
+if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&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
+
echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case "$host_os" in
-aix*)
+aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds;\$RANLIB \$lib"
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
+
+aix4*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
esac
echo "$ac_t$enable_shared" 1>&6
@@ -1267,6 +2180,15 @@ test "$enable_shared" = yes || enable_static=yes
echo "checking whether to build static libraries... $enable_static" 1>&6
+if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
echo $ac_n "checking for objdir... $ac_c" 1>&6
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
@@ -1279,47 +2201,512 @@ fi
rmdir .libs 2>/dev/null
echo "$ac_t$objdir" 1>&6
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
+ lt_cv_dlopen=no lt_cv_dlopen_libs=
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "$progname:2212: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | 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="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2220 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo $progname:2233: \"$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
+ echo "$progname: 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
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+echo "$progname:2252: checking for dlopen" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2257 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+dlopen();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+echo "$progname:2299: checking for dld_link in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_link | 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="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2307 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link();
+
+int main() {
+dld_link()
+; return 0; }
+EOF
+if { (eval echo $progname:2320: \"$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
+ echo "$progname: 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
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+echo "$progname:2339: checking for shl_load" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2344 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+shl_load();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="shl_load"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+echo "$progname:2387: checking for shl_load in -ldld" >&5
+ac_lib_var=`echo dld'_'shl_load | 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="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2395 "ltconfig"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load();
+
+int main() {
+shl_load()
+; return 0; }
+EOF
+if { (eval echo $progname:2409: \"$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
+ echo "$progname: 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
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+fi
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ fi
+
+ case "$lt_cv_dlopen" in
+ dlopen)
+for ac_hdr in dlfcn.h; do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "$progname:2452: 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
+#line 2457 "ltconfig"
+#include <$ac_hdr>
+int fnord = 0;
+EOF
+ac_try="$ac_compile >/dev/null 2>conftest.out"
+{ (eval echo $progname:2462: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ if test "x$ac_cv_header_dlfcn_h" = xyes; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ fi
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2490: checking whether a program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self=cross
+ else
+ cat > conftest.c <<EOF
+#line 2498 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
+
+EOF
+if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
+
+ if test "$lt_cv_dlopen_self" = yes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self_static=cross
+ else
+ cat > conftest.c <<EOF
+#line 2571 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
+
+EOF
+if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self_static=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self_static=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
+fi
+ ;;
+ esac
+
+ case "$lt_cv_dlopen_self" in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case "$lt_cv_dlopen_self_static" in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
# Copy echo and quote the copy, instead of the original, because it is
# used later.
ltecho="$echo"
+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ ltecho="$CONFIG_SHELL \$0 --fallback-echo"
+fi
+LTSHELL="$SHELL"
-# Now quote all the things that may contain metacharacters.
-for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
- old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
- link_static_flag no_builtin_flag export_dynamic_flag_spec \
- libname_spec library_names_spec soname_spec RANLIB \
- old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
- allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe \
- hardcode_libdir_flag_spec hardcode_libdir_separator; do
-
- case "$var" in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
- postinstall_cmds | postuninstall_cmds | finish_cmds)
- # Double-quote double-evaled strings.
- eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
- ;;
- *)
- eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
+LTCONFIG_VERSION="$VERSION"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+ # Now quote all the things that may contain metacharacters.
+ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
+ old_LD old_LDFLAGS old_LIBS \
+ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
+ AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
+ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+ hardcode_libdir_flag_spec hardcode_libdir_separator \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+ case "$var" in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case "$ltecho" in
+ *'\$0 --fallback-echo"')
+ ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
-done
-ofile=libtool
-trap "$rm $ofile; exit 1" 1 2 15
-echo creating $ofile
-$rm $ofile
-cat <<EOF > $ofile
-#! /bin/sh
+ trap "$rm \"$ofile\"; exit 1" 1 2 15
+ echo "creating $ofile"
+ $rm "$ofile"
+ cat <<EOF > "$ofile"
+#! $SHELL
-# libtool - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1340,120 +2727,208 @@ cat <<EOF > $ofile
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# This program was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
-# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
-# $0$ltconfig_args
-#
-# Compiler and other test output produced by $progname, useful for
-# debugging $progname, is in ./config.log if it exists.
-
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="sed -e s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-# An echo program that does not interpret backslashes.
-echo="$ltecho"
+### BEGIN LIBTOOL CONFIG
+EOF
+ cfgfile="$ofile"
+ ;;
+
+*)
+ # Double-quote the variables that need it (for aesthetics).
+ for var in old_CC old_CFLAGS old_CPPFLAGS \
+ old_LD old_LDFLAGS old_LIBS \
+ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
+ eval "$var=\\\"\$var\\\""
+ done
+
+ # Just create a config file.
+ cfgfile="$ofile.cfg"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ echo "creating $cfgfile"
+ $rm "$cfgfile"
+ cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+EOF
+ ;;
+esac
+
+cat <<EOF >> "$cfgfile"
+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
+# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
+# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
+# $0$ltconfig_args
+#
+# Compiler and other test output produced by $progname, useful for
+# debugging $progname, is in ./config.log if it exists.
# The version of $progname that generated this script.
-LTCONFIG_VERSION="$VERSION"
+LTCONFIG_VERSION=$LTCONFIG_VERSION
# Shell to use when invoking shell scripts.
-SHELL=${CONFIG_SHELL-/bin/sh}
+SHELL=$LTSHELL
-# Whether or not to build libtool libraries.
+# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
-# Whether or not to build old-style libraries.
+# Whether or not to build static libraries.
build_old_libs=$enable_static
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
# The host system.
-host_alias="$host_alias"
-host="$host"
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$ltecho
# The archiver.
-AR="$AR"
+AR=$AR
# The default C compiler.
-CC="$CC"
+CC=$CC
# The linker used to build libraries.
-LD="$LD"
+LD=$LD
# Whether we need hard or soft links.
-LN_S="$LN_S"
+LN_S=$LN_S
# A BSD-compatible nm program.
-NM="$NM"
+NM=$NM
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
# The name of the directory that contains temporary libtool files.
-objdir="$objdir"
+objdir=$objdir
# How to create reloadable object files.
-reload_flag="$reload_flag"
-reload_cmds="$reload_cmds"
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
# How to pass a linker flag through the compiler.
-wl="$wl"
+wl=$wl
+
+# Object file suffix (normally "o").
+objext="$objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Executable file suffix (normally "").
+exeext="$exeext"
# Additional compiler flags for building library objects.
-pic_flag="$pic_flag"
+pic_flag=$pic_flag
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
-link_static_flag="$link_static_flag"
+link_static_flag=$link_static_flag
# Compiler flag to turn off builtin functions.
-no_builtin_flag="$no_builtin_flag"
+no_builtin_flag=$no_builtin_flag
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="$export_dynamic_flag_spec"
+export_dynamic_flag_spec=$export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$thread_safe_flag_spec
# Library versioning type.
version_type=$version_type
# Format of library name prefix.
-libname_spec="$libname_spec"
+libname_spec=$libname_spec
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
-library_names_spec="$library_names_spec"
+library_names_spec=$library_names_spec
# The coded name of the library, if different from the real name.
-soname_spec="$soname_spec"
+soname_spec=$soname_spec
# Commands used to build and install an old-style archive.
-RANLIB="$RANLIB"
-old_archive_cmds="$old_archive_cmds"
-old_postinstall_cmds="$old_postinstall_cmds"
-old_postuninstall_cmds="$old_postuninstall_cmds"
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds="$old_archive_from_new_cmds"
+old_archive_from_new_cmds=$old_archive_from_new_cmds
# Commands used to build and install a shared archive.
-archive_cmds="$archive_cmds"
-postinstall_cmds="$postinstall_cmds"
-postuninstall_cmds="$postuninstall_cmds"
+archive_cmds=$archive_cmds
+archive_expsym_cmds=$archive_expsym_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag="$allow_undefined_flag"
+allow_undefined_flag=$allow_undefined_flag
# Flag that forces no undefined symbols.
-no_undefined_flag="$no_undefined_flag"
+no_undefined_flag=$no_undefined_flag
# Commands used to finish a libtool library installation in a directory.
-finish_cmds="$finish_cmds"
+finish_cmds=$finish_cmds
# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval="$finish_eval"
+finish_eval=$finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="$global_symbol_pipe"
+global_symbol_pipe=$global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$global_symbol_to_cdecl
# This is the shared library runtime path variable.
runpath_var=$runpath_var
@@ -1461,15 +2936,18 @@ runpath_var=$runpath_var
# This is the shared library path variable.
shlibpath_var=$shlibpath_var
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
+hardcode_libdir_separator=$hardcode_libdir_separator
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
@@ -1483,27 +2961,115 @@ hardcode_minus_L=$hardcode_minus_L
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$include_expsyms
+
EOF
-case "$host_os" in
-aix3*)
- cat <<\EOF >> $ofile
+case "$ltmain" in
+*.sh)
+ echo '### END LIBTOOL CONFIG' >> "$ofile"
+ echo >> "$ofile"
+ case "$host_os" in
+ aix3*)
+ cat <<\EOF >> "$ofile"
+
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test "${COLLECT_NAMES+set}" != set; then
+if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
-
EOF
+ ;;
+ esac
+
+ # Append the ltmain.sh script.
+ sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+
+ chmod +x "$ofile"
+ ;;
+
+*)
+ # Compile the libtool program.
+ echo "FIXME: would compile $ltmain"
;;
esac
-# Append the ltmain.sh script.
-cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1)
+test -n "$cache_file" || exit 0
+
+# AC_CACHE_SAVE
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
-chmod +x $ofile
exit 0
# Local Variables:
diff --git a/contrib/binutils/ltmain.sh b/contrib/binutils/ltmain.sh
index e9350b3..c32939e 100644
--- a/contrib/binutils/ltmain.sh
+++ b/contrib/binutils/ltmain.sh
@@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun ltconfig.
#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+# Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,6 +23,30 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
# The name of this program.
progname=`$echo "$0" | sed 's%^.*/%%'`
modename="$progname"
@@ -30,7 +54,8 @@ modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.2
+VERSION=1.3.4
+TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
default_mode=
help="Try \`$progname --help' for more information."
@@ -41,15 +66,22 @@ rm="rm -f"
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
if test "$LTCONFIG_VERSION" != "$VERSION"; then
echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
@@ -72,6 +104,8 @@ run=
show="$echo"
show_help=
execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
# Parse our command line options once, thoroughly.
while test $# -gt 0
@@ -107,10 +141,20 @@ do
;;
--version)
- echo "$PROGRAM (GNU $PACKAGE) $VERSION"
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
exit 0
;;
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
--dry-run | -n)
run=:
;;
@@ -172,15 +216,15 @@ if test -z "$show_help"; then
mode=link
for arg
do
- case "$arg" in
- -c)
- mode=compile
- break
- ;;
- esac
+ case "$arg" in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
done
;;
- *db | *dbx)
+ *db | *dbx | *strace | *truss)
mode=execute
;;
*install*|cp|mv)
@@ -195,11 +239,11 @@ if test -z "$show_help"; then
# Just use the default operation mode.
if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
fi
;;
esac
@@ -227,23 +271,39 @@ if test -z "$show_help"; then
srcfile="$nonopt"
suppress_output=
+ user_target=no
for arg
do
# Accept any command-line options.
case "$arg" in
-o)
- $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
;;
-static)
- build_libtool_libs=no
build_old_libs=yes
continue
;;
esac
+ case "$user_target" in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
# Accept the current argument as the source file.
lastarg="$srcfile"
srcfile="$arg"
@@ -272,11 +332,22 @@ if test -z "$show_help"; then
fi
done
- # Get the name of the library object.
- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ case "$user_target" in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
# Recognize several different file suffixes.
- xform='[cCFSfms]'
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
case "$libobj" in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
@@ -293,9 +364,9 @@ if test -z "$show_help"; then
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
case "$libobj" in
- *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;;
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
- $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
exit 1
;;
esac
@@ -308,11 +379,54 @@ if test -z "$show_help"; then
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
- $run $rm $obj $libobj
- trap "$run $rm $obj $libobj; exit 1" 1 2 15
+ removelist="$obj $libobj"
else
- $run $rm $libobj
- trap "$run $rm $libobj; exit 1" 1 2 15
+ removelist="$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
fi
# Only build a PIC object if we are building libtool libraries.
@@ -321,23 +435,116 @@ if test -z "$show_help"; then
fbsd_hideous_sh_bug=$base_compile
# All platforms use -DPIC, to notify preprocessed assembler code.
- $show "$base_compile$pic_flag -DPIC $srcfile"
- if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
+ # However, make sure we only set it for non-Java code.
+ case "$srcfile" in
+ *.java|*.class)
+ command="$base_compile $pic_flag $srcfile";;
+ *)
+ command="$base_compile $srcfile $pic_flag -DPIC";;
+ esac
+ if test "$build_old_libs" = yes; then
+ lo_libobj="$libobj"
+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$libobj"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" = yes; then
+ output_obj="$libobj"
+ command="$command -o $output_obj"
+ elif test "$compiler_c_o" = yes; then
+ output_obj="$obj"
+ command="$command -o $output_obj"
+ fi
+
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
else
- test -n "$obj" && $run $rm $obj
- exit 1
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
fi
- # If we have no pic_flag, then copy the object into place and finish.
- if test -z "$pic_flag"; then
- $show "$LN_S $obj $libobj"
- $run $LN_S $obj $libobj
- exit $?
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
fi
- # Just move the object, then go on to compile the next one
- $show "$mv $obj $libobj"
- $run $mv $obj $libobj || exit 1
+ # Just move the object if needed, then go on to compile the next one
+ if test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if test -z "$pic_flag" && test "$build_old_libs" = yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+ libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ # Now arrange that obj and lo_libobj become the same file
+ $show "(cd $xdir && $LN_S $baseobj $libobj)"
+ if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
# Allow error messages only from the first compilation.
suppress_output=' >/dev/null 2>&1'
@@ -345,20 +552,73 @@ if test -z "$show_help"; then
# Only build a position-dependent object if we build old libraries.
if test "$build_old_libs" = yes; then
+ command="$base_compile $srcfile"
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
# Suppress compiler output if we already did a PIC compilation.
- $show "$base_compile $srcfile$suppress_output"
- if $run eval "$base_compile \$srcfile$suppress_output"; then :
+ command="$command$suppress_output"
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
else
- $run $rm $obj $libobj
- exit 1
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
fi
fi
- # Create an invalid libtool object if no PIC, so that we do not
- # accidentally link it into a program.
- if test "$build_libtool_libs" != yes; then
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > \$libobj" || exit $?
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $rm "$lockfile"
fi
exit 0
@@ -367,28 +627,252 @@ if test -z "$show_help"; then
# libtool link mode
link)
modename="$modename: link"
+ C_compiler="$CC" # save it, to compile generated C sources
+ # Always respect the CC configured in by ltconfig.
CC="$nonopt"
- allow_undefined=yes
- compile_command="$CC"
- finalize_command="$CC"
+ # CYGNUS LOCAL: tromey/java
+ # Add -B options to link line.
+ for arg
+ do
+ case "$arg" in
+ -B*)
+ CC="$CC $arg"
+ ;;
+ esac
+ done
+ # END CYGNUS LOCAL
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# # ifdef __CYGWIN32__
+# # define __CYGWIN__ __CYGWIN32__
+# # endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+# /* impgen.c starts here */
+# /* Copyright (C) 1999 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# */
+#
+# #include <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b = ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename = argv[1];
+#
+# dll = open(filename, O_RDONLY|O_BINARY);
+# if (!dll)
+# return 1;
+#
+# dll_name = filename;
+#
+# for (i=0; filename[i]; i++)
+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+# dll_name = filename + i +1;
+#
+# pe_header_offset = pe_get32 (dll, 0x3c);
+# opthdr_ofs = pe_header_offset + 4 + 20;
+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
+# export_size = pe_get32 (dll, opthdr_ofs + 100);
+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr = (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr = 0;
+# for (i = 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 = secptr + 40 * i;
+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# {
+# expptr = fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size = vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata = (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva = expdata - export_rva;
+#
+# nexp = pe_as32 (expdata+24);
+# name_rvas = pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i = 0; i<nexp; i++)
+# {
+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ compile_command="$nonopt"
+ finalize_command="$nonopt"
+ compile_rpath=
+ finalize_rpath=
compile_shlibpath=
finalize_shlibpath=
+ convenience=
+ old_convenience=
deplibs=
+ linkopts=
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ lib_search_path=
+ fi
+ # now prepend the system-specific ones
+ eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ avoid_version=no
dlfiles=
dlprefiles=
+ dlself=no
export_dynamic=no
- hardcode_libdirs=
+ export_symbols=
+ export_symbols_regex=
+ generated=
libobjs=
link_against_libtool_libs=
ltlibs=
+ module=no
objs=
+ prefer_static_libs=no
+ preload=no
prev=
prevarg=
release=
rpath=
+ xrpath=
perm_rpath=
temp_rpath=
+ thread_safe=no
vinfo=
# We need to know -static, to get the right output filenames.
@@ -396,13 +880,23 @@ if test -z "$show_help"; then
do
case "$arg" in
-all-static | -static)
- if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ if test "X$arg" = "X-all-static"; then
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
- fi
- build_libtool_libs=no
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ fi
+ build_libtool_libs=no
build_old_libs=yes
- break
- ;;
+ prefer_static_libs=yes
+ break
+ ;;
esac
done
@@ -410,44 +904,107 @@ if test -z "$show_help"; then
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
# Go through the arguments, transforming them on the way.
- for arg
- do
+ while test $# -gt 0; do
+ arg="$1"
+ shift
+
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
- case "$prev" in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- ;;
- esac
-
- case "$prev" in
- dlfiles|dlprefiles)
- case "$arg" in
- *.la | *.lo) ;; # We handle these cases below.
- *)
- dlprefiles="$dlprefiles $arg"
- test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
- prev=
- ;;
- esac
- ;;
+ case "$prev" in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case "$prev" in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case "$arg" in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
release)
release="-$arg"
prev=
continue
;;
- rpath)
- rpath="$rpath $arg"
+ rpath | xrpath)
+ # We need an absolute path.
+ case "$arg" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
prev=
continue
;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
+ esac
fi
prevarg="$arg"
@@ -455,10 +1012,10 @@ if test -z "$show_help"; then
case "$arg" in
-all-static)
if test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
+ compile_command="$compile_command $link_static_flag"
finalize_command="$finalize_command $link_static_flag"
- fi
- continue
+ fi
+ continue
;;
-allow-undefined)
@@ -467,46 +1024,97 @@ if test -z "$show_help"; then
continue
;;
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
-dlopen)
- prev=dlfiles
- continue
- ;;
+ prev=dlfiles
+ continue
+ ;;
-dlpreopen)
- prev=dlprefiles
- continue
- ;;
+ prev=dlprefiles
+ continue
+ ;;
-export-dynamic)
- if test "$export_dynamic" != yes; then
- export_dynamic=yes
- if test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- else
- arg=
- fi
+ export_dynamic=yes
+ continue
+ ;;
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
- fi
- ;;
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: not more than one -exported-symbols argument allowed"
+ exit 1
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
-L*)
- dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
- case "$dir" in
- /* | [A-Za-z]:\\*)
- # Add the corresponding hardcode_libdir_flag, if it is not identical.
- ;;
- *)
- $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
- exit 1
- ;;
- esac
- deplibs="$deplibs $arg"
- ;;
-
- -l*) deplibs="$deplibs $arg" ;;
+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ # We need an absolute path.
+ case "$dir" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ absdir="$dir"
+ fi
+ dir="$absdir"
+ ;;
+ esac
+ case " $deplibs " in
+ *" $arg "*) ;;
+ *) deplibs="$deplibs $arg";;
+ esac
+ case " $lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir";;
+ esac
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ case ":$dllsearchpath:" in
+ ::) dllsearchpath="$dllsearchdir";;
+ *":$dllsearchdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
+ esac
+ ;;
+ esac
+ ;;
+
+ -l*)
+ if test "$arg" = "-lc"; then
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+ # These systems don't actually have c library (as such)
+ continue
+ ;;
+ esac
+ elif test "$arg" = "-lm"; then
+ case "$host" in
+ *-*-cygwin* | *-*-beos*)
+ # These systems don't actually have math library (as such)
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
-no-undefined)
allow_undefined=no
@@ -521,23 +1129,50 @@ if test -z "$show_help"; then
;;
-rpath)
- prev=rpath
- continue
- ;;
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ # We need an absolute path.
+ case "$dir" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
-static)
# If we have no pic_flag, then this is the same as -all-static.
if test -z "$pic_flag" && test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
+ compile_command="$compile_command $link_static_flag"
finalize_command="$finalize_command $link_static_flag"
- fi
+ fi
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
continue
;;
-version-info)
- prev=vinfo
- continue
- ;;
+ prev=vinfo
+ continue
+ ;;
# Some other compiler flag.
-* | +*)
@@ -549,18 +1184,18 @@ if test -z "$show_help"; then
arg="\"$arg\""
;;
esac
- ;;
+ ;;
- *.o | *.a)
- # A standard object.
- objs="$objs $arg"
- ;;
+ *.o | *.obj | *.a | *.lib)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
*.lo)
- # A library object.
+ # A library object.
if test "$prev" = dlfiles; then
dlfiles="$dlfiles $arg"
- if test "$build_libtool_libs" = yes; then
+ if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
prev=
continue
else
@@ -571,191 +1206,277 @@ if test -z "$show_help"; then
if test "$prev" = dlprefiles; then
# Preload the old-style object.
- dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
prev=
fi
libobjs="$libobjs $arg"
- ;;
+ ;;
*.la)
- # A libtool-controlled library.
-
- dlname=
- libdir=
- library_names=
- old_library=
-
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
- exit 1
- fi
-
- # If there is no directory component, then add one.
- case "$arg" in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- if test -z "$libdir"; then
- $echo "$modename: \`$arg' contains no -rpath information" 1>&2
- exit 1
- fi
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
-
- if test -z "$linklib"; then
- $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
- exit 1
- fi
-
- # Find the relevant object directory and library name.
- name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
- dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$arg"; then
- dir="$objdir"
- else
- dir="$dir/$objdir"
- fi
-
- # This library was specified with -dlopen.
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- if test -z "$dlname"; then
- # If there is no dlname, we need to preload.
- prev=dlprefiles
- else
- # We should not create a dependency on this library, but we
+ # A libtool-controlled library.
+
+ dlname=
+ libdir=
+ library_names=
+ old_library=
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # Read the .la file
+ # If there is no directory component, then add one.
+ case "$arg" in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Find the relevant object directory and library name.
+ name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+
+ if test "X$installed" = Xyes; then
+ dir="$libdir"
+ else
+ dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$arg"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ fi
+
+ if test -n "$dependency_libs"; then
+ # Extract -R and -L from dependency_libs
+ temp_deplibs=
+ for deplib in $dependency_libs; do
+ case "$deplib" in
+ -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ case " $rpath $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ -L*) case "$compile_command $temp_deplibs " in
+ *" $deplib "*) ;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac
+ temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ case " $lib_search_path " in
+ *" $temp_dir "*) ;;
+ *) lib_search_path="$lib_search_path $temp_dir";;
+ esac
+ ;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ if test -z "$libdir"; then
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$deplibs$dependency_libs"
+ compile_command="$compile_command $dir/$old_library$dependency_libs"
+ finalize_command="$finalize_command $dir/$old_library$dependency_libs"
+ continue
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking statically,
+ # we need to preload.
+ prev=dlprefiles
+ else
+ # We should not create a dependency on this library, but we
# may need any libraries it requires.
compile_command="$compile_command$dependency_libs"
finalize_command="$finalize_command$dependency_libs"
- prev=
- continue
- fi
- fi
-
- # The library was specified with -dlpreopen.
- if test "$prev" = dlprefiles; then
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- dlprefiles="$dlprefiles $dir/$old_library"
- else
- dlprefiles="$dlprefiles $dir/$linklib"
- fi
- prev=
- fi
-
- if test "$build_libtool_libs" = yes && test -n "$library_names"; then
- link_against_libtool_libs="$link_against_libtool_libs $arg"
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
+ prev=
+ continue
+ fi
+ fi
+
+ # The library was specified with -dlpreopen.
+ if test "$prev" = dlprefiles; then
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ dlprefiles="$dlprefiles $dir/$old_library"
+ else
+ dlprefiles="$dlprefiles $dir/$linklib"
+ fi
+ prev=
+ fi
+
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+ # We need an absolute path.
+ case "$dir" in
+ [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ absdir="$dir"
+ fi
+ ;;
+ esac
+
# This is the magic to use -rpath.
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- compile_command="$compile_command $flag"
- finalize_command="$finalize_command $flag"
- fi
- elif test -n "$runpath_var"; then
- # Do the same for the permanent run path.
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
-
-
- case "$hardcode_action" in
- immediate)
- if test "$hardcode_direct" = no; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = no; then
- compile_command="$compile_command -L$dir -l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- compile_shlibpath="$compile_shlibpath$dir:"
- compile_command="$compile_command -l$name"
- fi
- ;;
-
- relink)
- # We need an absolute path.
- case "$dir" in
- /* | [A-Za-z]:\\*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
- dir="$absdir"
- ;;
- esac
-
- if test "$hardcode_direct" = yes; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- compile_command="$compile_command -L$dir -l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- compile_shlibpath="$compile_shlibpath$dir:"
- compile_command="$compile_command -l$name"
- fi
- ;;
-
- *)
- $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2
- exit 1
- ;;
- esac
-
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- finalize_command="$finalize_command $libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- finalize_command="$finalize_command -L$libdir -l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- finalize_shlibpath="$finalize_shlibpath$libdir:"
- finalize_command="$finalize_command -l$name"
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- finalize_command="$finalize_command -L$libdir -l$name"
- fi
- else
- # Transform directly to old archives if we don't build new libraries.
- if test -n "$pic_flag" && test -z "$old_library"; then
- $echo "$modename: cannot find static library for \`$arg'" 1>&2
- exit 1
- fi
+ # Skip directories that are in the system default run-time
+ # search path, unless they have been requested with -R.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+
+ lib_linked=yes
+ case "$hardcode_action" in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ compile_command="$compile_command $dir/$linklib"
+ deplibs="$deplibs $dir/$linklib"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ if test -n "$dllsearchpath"; then
+ dllsearchpath="$dllsearchpath:$dllsearchdir"
+ else
+ dllsearchpath="$dllsearchdir"
+ fi
+ ;;
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case "$host" in
+ *-*-sunos*)
+ compile_shlibpath="$compile_shlibpath$dir:"
+ ;;
+ esac
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ case ":$compile_shlibpath:" in
+ *":$dir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$dir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ relink)
+ if test "$hardcode_direct" = yes; then
+ compile_command="$compile_command $absdir/$linklib"
+ deplibs="$deplibs $absdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$compile_command " in
+ *" -L$absdir "*) ;;
+ *) compile_command="$compile_command -L$absdir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$absdir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$compile_shlibpath:" in
+ *":$absdir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$absdir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ *)
+ lib_linked=no
+ ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
+ fi
+
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ finalize_command="$finalize_command $libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$finalize_command " in
+ *" -L$libdir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$finalize_shlibpath:" in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ fi
+ else
+ # Transform directly to old archives if we don't build new libraries.
+ if test -n "$pic_flag" && test -z "$old_library"; then
+ $echo "$modename: cannot find static library for \`$arg'" 1>&2
+ exit 1
+ fi
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
@@ -765,16 +1486,24 @@ if test -z "$show_help"; then
compile_command="$compile_command $dir/$linklib"
finalize_command="$finalize_command $dir/$linklib"
else
- compile_command="$compile_command -L$dir -l$name"
- finalize_command="$finalize_command -L$dir -l$name"
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$dir";;
+ esac
+ finalize_command="$finalize_command -l$name"
fi
- fi
+ fi
# Add in any libraries that this one depends upon.
compile_command="$compile_command$dependency_libs"
finalize_command="$finalize_command$dependency_libs"
continue
- ;;
+ ;;
# Some other compiler argument.
*)
@@ -786,7 +1515,7 @@ if test -z "$show_help"; then
arg="\"$arg\""
;;
esac
- ;;
+ ;;
esac
# Now actually substitute the argument into the commands.
@@ -802,14 +1531,17 @@ if test -z "$show_help"; then
exit 1
fi
- if test -n "$vinfo" && test -n "$release"; then
- $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
fi
- oldlib=
- oldobjs=
+ oldlibs=
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
case "$output" in
"")
$echo "$modename: you must specify an output file" 1>&2
@@ -817,64 +1549,88 @@ if test -z "$show_help"; then
exit 1
;;
- */* | *\\*)
- $echo "$modename: output file \`$output' must have no directory components" 1>&2
- exit 1
- ;;
+ *.a | *.lib)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
- *.a)
# Now set the variables for building old libraries.
build_libtool_libs=no
- build_old_libs=yes
- oldlib="$output"
- $show "$rm $oldlib"
- $run $rm $oldlib
+ oldlibs="$output"
;;
*.la)
# Make sure we only generate libraries of the form `libNAME.la'.
- case "$output" in
- lib*) ;;
+ case "$outputname" in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+ ;;
*)
- $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
;;
esac
- name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- eval libname=\"$libname_spec\"
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
- current=0
- revision=0
- age=0
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
if test -n "$objs"; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
- exit 1
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+ exit 1
fi
# How the heck are we supposed to write a wrapper for a shared library?
if test -n "$link_against_libtool_libs"; then
- $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2
- exit 1
- fi
-
- if test -n "$dlfiles$dlprefiles"; then
- $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+ exit 1
fi
- if test -z "$rpath"; then
- $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
fi
set dummy $rpath
@@ -883,587 +1639,1216 @@ if test -z "$show_help"; then
fi
install_libdir="$2"
- # Parse the version information argument.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
- set dummy $vinfo
- IFS="$save_ifs"
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+ dependency_libs="$deplibs"
- if test -n "$5"; then
- $echo "$modename: too many parameters to \`-version-info'" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ fi
- test -n "$2" && current="$2"
- test -n "$3" && revision="$3"
- test -n "$4" && age="$4"
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
- # Check that each of the things are valid numbers.
- case "$current" in
- 0 | [1-9] | [1-9][0-9]*) ;;
- *)
- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- ;;
- esac
+ # Parse the version information argument.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
- case "$revision" in
- 0 | [1-9] | [1-9][0-9]*) ;;
- *)
- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- ;;
- esac
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
- case "$age" in
- 0 | [1-9] | [1-9][0-9]*) ;;
- *)
- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- ;;
- esac
+ current="$2"
+ revision="$3"
+ age="$4"
- if test $age -gt $current; then
- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- fi
-
- # Calculate the version variables.
- version_vars="version_type current age revision"
- case "$version_type" in
- none) ;;
-
- linux)
- version_vars="$version_vars major versuffix"
- major=`expr $current - $age`
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- version_vars="$version_vars versuffix verstring"
- major=`expr $current - $age`
- versuffix="$current.$age.$revision"
- verstring="$versuffix"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test $loop != 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- sunos)
- version_vars="$version_vars major versuffix"
- major="$current"
- versuffix="$current.$revision"
- ;;
+ # Check that each of the things are valid numbers.
+ case "$current" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
- ;;
- esac
+ case "$revision" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$age" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case "$version_type" in
+ none) ;;
+
+ irix)
+ major=`expr $current - $age + 1`
+ versuffix="$major.$revision"
+ verstring="sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test $loop != 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+ done
+ ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ windows)
+ # Like Linux, but with '-' rather than '.', since we only
+ # want one extension on Windows 95.
+ major=`expr $current - $age`
+ versuffix="-$major-$age-$revision"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ verstring="0.0"
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ dependency_libs="$deplibs"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *)
+ # Add libc to deplibs on all other systems.
+ deplibs="$deplibs -lc"
+ ;;
+ esac
+ fi
# Create the output directory, or remove our outputs if we need to.
- if test -d $objdir; then
- $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*"
- $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
else
- $show "$mkdir $objdir"
- $run $mkdir $objdir
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
status=$?
- if test $status -eq 0 || test -d $objdir; then :
- else
+ if test $status -ne 0 && test ! -d $output_objdir; then
exit $status
fi
fi
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
fi
- # Add libc to deplibs on all systems.
- dependency_libs="$deplibs"
- deplibs="$deplibs -lc"
+ if test "$build_libtool_libs" = yes; then
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case "$deplibs_check_method" in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $CC -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ $rm conftest
+ $CC -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ case "$potliblink" in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ echo "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
- # Get the real and link names of the library.
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- realname="$2"
- shift; shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- lib="$objdir/$realname"
+ # Get the real and link names of the library.
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ lib="$output_objdir/$realname"
for link
do
linknames="$linknames $link"
done
- # Use standard objects if they are PIC.
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) in case we are running --disable-static
+ for obj in $libobjs; do
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ if test ! -f $xdir/$oldobj; then
+ $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+ $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+ fi
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=\"$export_symbols_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
- # Do each of the archive commands.
- eval cmds=\"$archive_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case "$xlib" in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
- # Create links to the real library.
- for linkname in $linknames; do
- $show "(cd $objdir && $LN_S $realname $linkname)"
- $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $?
- done
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linkopts="$linkopts $flag"
+ fi
- # If -export-dynamic was specified, set the dlname.
- if test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=\"$archive_expsym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
- # Now set the variables for building old libraries.
- oldlib="$objdir/$libname.a"
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
;;
- *.lo | *.o)
+ *.lo | *.o | *.obj)
if test -n "$link_against_libtool_libs"; then
- $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2
- exit 1
+ $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
+ exit 1
fi
if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
fi
- if test -n "$dlfiles$dlprefiles"; then
- $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
fi
if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
fi
if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
fi
case "$output" in
*.lo)
- if test -n "$objs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'`
- ;;
+ if test -n "$objs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
*)
- libobj=
- obj="$output"
- ;;
+ libobj=
+ obj="$output"
+ ;;
esac
# Delete the old objects.
$run $rm $obj $libobj
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${obj}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case "$xlib" in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
# Create the old-style object.
- reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
+ reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
output="$obj"
eval cmds=\"$reload_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
# Exit if we aren't doing a library object file.
- test -z "$libobj" && exit 0
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ fi
if test "$build_libtool_libs" != yes; then
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > $libobj" || exit $?
- exit 0
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
fi
if test -n "$pic_flag"; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs"
- output="$libobj"
- eval cmds=\"$reload_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
else
- # Just create a symlink.
- $show "$LN_S $obj $libobj"
- $run $LN_S $obj $libobj || exit 1
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$libobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ $show "(cd $xdir && $LN_S $oldobj $baseobj)"
+ $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+ fi
+
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
fi
exit 0
;;
+ # Anything else should be a program.
*)
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
fi
if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
fi
- if test -n "$rpath"; then
+ if test "$preload" = yes; then
+ if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- compile_command="$compile_command $flag"
- finalize_command="$finalize_command $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$compile_rpath " in
+ *" $libdir "*) ;;
+ *) compile_rpath="$compile_rpath $libdir" ;;
+ esac
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
done
fi
- # Substitute the hardcoded libdirs into the compile commands.
- if test -n "$hardcode_libdir_separator"; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
fi
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
- finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
fi
+ finalize_rpath="$rpath"
- if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${output}S.c"
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
else
- dlsyms=
+ output_objdir="$output_objdir/$objdir"
fi
- if test -n "$dlsyms"; then
- # Add our own program objects to the preloaded list.
- dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
+ # Create the binary in the object directory, then wrap it.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
- # Discover the nlist of each of the dlfiles.
- nlist="$objdir/${output}.nm"
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
- if test -d $objdir; then
- $show "$rm $nlist ${nlist}T"
- $run $rm "$nlist" "${nlist}T"
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
else
- $show "$mkdir $objdir"
- $run $mkdir $objdir
- status=$?
- if test $status -eq 0 || test -d $objdir; then :
- else
- exit $status
- fi
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
fi
+ fi
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
+ if test -n "$dlsyms"; then
+ case "$dlsyms" in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${outputname}.nm"
- # Parse the name list into a source file.
- $show "creating $objdir/$dlsyms"
- if test -z "$run"; then
- # Make sure we at least have an empty file.
- test -f "$nlist" || : > "$nlist"
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- wcout=`wc "$nlist" 2>/dev/null`
- count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
- (test "$count" -ge 0) 2>/dev/null || count=-1
- else
- $rm "$nlist"T
- count=-1
- fi
+ # Parse the name list into a source file.
+ $show "creating $output_objdir/$dlsyms"
- case "$dlsyms" in
- "") ;;
- *.c)
- $echo > "$objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
#ifdef __cplusplus
extern \"C\" {
#endif
/* Prevent the only kind of declaration conflicts we can make. */
-#define dld_preloaded_symbol_count some_other_symbol
-#define dld_preloaded_symbols some_other_symbol
+#define lt_preloaded_symbols some_other_symbol
/* External symbol declarations for the compiler. */\
"
- if test -f "$nlist"; then
- sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ $run eval 'echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ :
else
- echo '/* NONE */' >> "$objdir/$dlsyms"
+ grep -v "^: " < "$nlist" > "$nlist"S
fi
- $echo >> "$objdir/$dlsyms" "\
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
-#undef dld_preloaded_symbol_count
-#undef dld_preloaded_symbols
+#undef lt_preloaded_symbols
#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
+# define lt_ptr_t void *
#else
-# define __ptr_t char *
+# define lt_ptr_t char *
+# define const
#endif
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
/* The mapping between symbol names and symbols. */
-struct {
- char *name;
- __ptr_t address;
+const struct {
+ const char *name;
+ lt_ptr_t address;
}
-dld_preloaded_symbols[] =
+lt_preloaded_symbols[] =
{\
"
- if test -f "$nlist"; then
- sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
- fi
+ sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
+ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
+ < "$nlist" >> "$output_objdir/$dlsyms"
- $echo >> "$objdir/$dlsyms" "\
- {0, (__ptr_t) 0}
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr_t) 0}
};
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
#ifdef __cplusplus
}
#endif\
"
- ;;
+ fi
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit 1
- ;;
+ pic_flag_for_symtable=
+ case "$host" in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ esac;;
+ *-*-hpux*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+ esac
esac
- fi
- # Now compile the dynamic symbol file.
- $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
- $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
+ # Now compile the dynamic symbol file.
+ $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+ # Clean up the generated files.
+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
- # Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
- elif test "$export_dynamic" != yes; then
- test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
else
- # We keep going just in case the user didn't refer to
- # dld_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
- # We have no uninstalled library dependencies, so finalize right now.
- $show "$compile_command"
- $run eval "$compile_command"
- exit $?
- fi
-
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'`
-
- # Create the binary in the object directory, then wrap it.
- if test -d $objdir; then :
- else
- $show "$mkdir $objdir"
- $run $mkdir $objdir
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
status=$?
- if test $status -eq 0 || test -d $objdir; then :
- else
- exit $status
+
+ # Delete the generated files.
+ if test -n "$dlsyms"; then
+ $show "$rm $output_objdir/${outputname}S.${objext}"
+ $run $rm "$output_objdir/${outputname}S.${objext}"
fi
+
+ exit $status
fi
if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case "$dir" in
- /* | [A-Za-z]:\\*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
- fi
-
- # Delete the old output file.
- $run $rm $output
-
- if test -n "$compile_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case "$dir" in
+ [\\/]* | [A-Za-z]:[\\/]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
fi
if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
- finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
fi
- case "$hardcode_action" in
- relink)
- # AGH! Flame the AIX and HP-UX people for me, will ya?
- $echo "$modename: warning: using a buggy system linker" 1>&2
- $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2
- ;;
- esac
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
- $show "$compile_command"
- $run eval "$compile_command" || exit $?
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
# Now create the wrapper script.
$show "creating $output"
- # Quote the finalize command for shipping.
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
# Quote $echo for shipping.
- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case "$0" in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
# Only actually do things if our run command is non-null.
if test -z "$run"; then
- $rm $output
- trap "$rm $output; exit 1" 1 2 15
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
- $echo > $output "\
-#! /bin/sh
+ $echo > $output "\
+#! $SHELL
-# $output - temporary wrapper script for $objdir/$output
-# Generated by ltmain.sh - GNU $PACKAGE $VERSION
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
-# This wrapper script should never be moved out of \``pwd`'.
+# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
+ # install mode needs the following variable:
link_against_libtool_libs='$link_against_libtool_libs'
- finalize_command=\"$finalize_command\"
else
# When we are sourced in execute mode, \$file and \$echo are already set.
- if test \"\$libtool_execute_magic\" = \"$magic\"; then :
- else
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
echo=\"$qecho\"
file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
fi\
"
- $echo >> $output "\
+ $echo >> $output "\
# Find the directory that this script lives in.
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
@@ -1477,7 +2862,7 @@ else
# If there was a directory component, then change thisdir.
if test \"x\$destdir\" != \"x\$file\"; then
case \"\$destdir\" in
- /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
*) thisdir=\"\$thisdir/\$destdir\" ;;
esac
fi
@@ -1489,35 +2874,97 @@ else
# Try to get the absolute directory name.
absdir=\`cd \"\$thisdir\" && pwd\`
test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ echo >> $output "\
+ program=lt-'$outputname'
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+ echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if (cd \"\$thisdir\" && eval \$relink_command); then :
+ else
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program='$outputname'
progdir=\"\$thisdir/$objdir\"
- program='$output'
+"
+ fi
+
+ echo >> $output "\
if test -f \"\$progdir/\$program\"; then"
- # Export our shlibpath_var if we have one.
- if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output "\
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var
"
- fi
+ fi
- $echo >> $output "\
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
-
+"
+ case $host in
+ *-*-cygwin* | *-*-mingw | *-*-os2*)
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+ *)
+ $echo >> $output "\
# Export the path to the program.
PATH=\"\$progdir:\$PATH\"
export PATH
exec \$program \${1+\"\$@\"}
-
+"
+ ;;
+ esac
+ $echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit 1
fi
@@ -1530,45 +2977,135 @@ else
fi
fi\
"
- chmod +x $output
+ chmod +x $output
fi
exit 0
;;
esac
# See if we need to build an old-fashioned archive.
- if test "$build_old_libs" = "yes"; then
- # Transform .lo files to .o files.
- oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ case "$xlib" in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
eval cmds=\"$old_archive_from_new_cmds\"
else
+ # Ensure that we have .o objects in place in case we decided
+ # not to build a shared library, and have fallen back to building
+ # static libs even though --disable-static was passed!
+ for oldobj in $oldobjs; do
+ if test ! -f $oldobj; then
+ xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$oldobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+ obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+ $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ fi
+ done
+
eval cmds=\"$old_archive_cmds\"
fi
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
fi
# Now create the libtool archive.
case "$output" in
*.la)
old_library=
- test "$build_old_libs" = yes && old_library="$libname.a"
-
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
$show "creating $output"
+ if test -n "$xrpath"; then
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ done
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+
# Only create the output if not a dry run.
if test -z "$run"; then
- $echo > $output "\
-# $output - a libtool library file
-# Generated by ltmain.sh - GNU $PACKAGE $VERSION
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ fi
+ $rm $output
+ $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='$dlname'
@@ -1587,15 +3124,19 @@ current=$current
age=$age
revision=$revision
+# Is this an already installed library?
+installed=$installed
+
# Directory that this library needs to be installed in:
libdir='$install_libdir'\
"
+ done
fi
# Do a symbolic link so that the libtool archive can be found in
# LD_LIBRARY_PATH before the program is installed.
- $show "(cd $objdir && $LN_S ../$output $output)"
- $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
;;
esac
exit 0
@@ -1605,9 +3146,9 @@ libdir='$install_libdir'\
install)
modename="$modename: install"
- # There may be an optional /bin/sh argument at the beginning of
+ # There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL"; then
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case "$arg" in
@@ -1639,14 +3180,14 @@ libdir='$install_libdir'\
opts=
prev=
install_type=
- isdir=
+ isdir=no
stripme=
for arg
do
if test -n "$dest"; then
- files="$files $dest"
- dest="$arg"
- continue
+ files="$files $dest"
+ dest="$arg"
+ continue
fi
case "$arg" in
@@ -1656,20 +3197,20 @@ libdir='$install_libdir'\
-m) prev="-m" ;;
-o) prev="-o" ;;
-s)
- stripme=" -s"
- continue
- ;;
+ stripme=" -s"
+ continue
+ ;;
-*) ;;
*)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest="$arg"
- continue
- fi
- ;;
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
esac
# Aesthetically quote the argument.
@@ -1696,9 +3237,9 @@ libdir='$install_libdir'\
if test -z "$files"; then
if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
+ $echo "$modename: no file or destination specified" 1>&2
else
- $echo "$modename: you must specify a destination" 1>&2
+ $echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
exit 1
@@ -1709,7 +3250,7 @@ libdir='$install_libdir'\
# Check to see that the destination is a directory.
test -d "$dest" && isdir=yes
- if test -n "$isdir"; then
+ if test "$isdir" = yes; then
destdir="$dest"
destname=
else
@@ -1720,23 +3261,23 @@ libdir='$install_libdir'\
# Not a directory, so check to see that there is only one file specified.
set dummy $files
if test $# -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit 1
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
fi
fi
case "$destdir" in
- /* | [A-Za-z]:\\*) ;;
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
*)
for file in $files; do
- case "$file" in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
+ case "$file" in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
done
;;
esac
@@ -1752,209 +3293,214 @@ libdir='$install_libdir'\
# Do each installation.
case "$file" in
- *.a)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
+ *.a | *.lib)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
*.la)
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- library_names=
- old_library=
- # If there is no directory component, then add one.
- case "$file" in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$realname $destdir/$realname"
- $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
- test "X$dlname" = "X$realname" && dlname=
-
- if test $# -gt 0; then
- # Delete the old symlinks.
- rmcmd="$rm"
- for linkname
- do
- rmcmd="$rmcmd $destdir/$linkname"
- done
- $show "$rmcmd"
- $run $rmcmd
-
- # ... and create new ones.
- for linkname
- do
- test "X$dlname" = "X$linkname" && dlname=
- $show "(cd $destdir && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $LN_S $realname $linkname)"
- done
- fi
-
- if test -n "$dlname"; then
- # Install the dynamically-loadable library.
- $show "$install_prog $dir/$dlname $destdir/$dlname"
- $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- eval cmds=\"$postinstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- $show "$install_prog $file $destdir/$name"
- $run eval "$install_prog $file $destdir/$name" || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
*.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case "$destfile" in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'`
- ;;
- *.o)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit 0
- ;;
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case "$destfile" in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.o | *.obj)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
*)
- # Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
- link_against_libtool_libs=
- finalize_command=
-
- # If there is no directory component, then add one.
- case "$file" in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
- $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
- exit 1
- fi
-
- finalize=yes
- for lib in $link_against_libtool_libs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case "$lib" in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
- if test -z "$libdir"; then
- $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2
- elif test -f "$libfile"; then :
- else
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- if test "$hardcode_action" = relink; then
- if test "$finalize" = yes; then
- $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
- $show "$finalize_command"
- if $run eval "$finalize_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- continue
- fi
- file="$objdir/$file"T
- else
- $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ link_against_libtool_libs=
+ relink_command=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$link_against_libtool_libs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $link_against_libtool_libs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+ tmpdir="$tmpdir/libtool-$$"
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+ continue
+ fi
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ ${rm}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
+ fi
+ fi
- $show "$install_prog$stripme $file $dest"
- $run eval "$install_prog\$stripme \$file \$dest" || exit $?
- ;;
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && ${rm}r "$tmpdir"
+ ;;
esac
done
@@ -1969,11 +3515,11 @@ libdir='$install_libdir'\
# Do each command in the postinstall commands.
eval cmds=\"$old_postinstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
@@ -1996,43 +3542,49 @@ libdir='$install_libdir'\
finish)
modename="$modename: finish"
libdirs="$nonopt"
+ admincmds=
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
for dir
do
- libdirs="$libdirs $dir"
+ libdirs="$libdirs $dir"
done
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
eval cmds=\"$finish_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd"
- done
- IFS="$save_ifs"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
fi
if test -n "$finish_eval"; then
# Do the single finish_eval.
eval cmds=\"$finish_eval\"
- $run eval "$cmds"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
fi
done
fi
- echo "------------------------------------------------------------------------------"
+ # Exit here if they wanted silent mode.
+ test "$show" = : && exit 0
+
+ echo "----------------------------------------------------------------------"
echo "Libraries have been installed in:"
for libdir in $libdirs; do
echo " $libdir"
done
echo
- echo "To link against installed libraries in a given directory, LIBDIR,"
- echo "you must use the \`-LLIBDIR' flag during linking."
- echo
- echo " You will also need to do one of the following:"
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
echo " during execution"
@@ -2047,13 +3599,16 @@ libdir='$install_libdir'\
echo " - use the \`$flag' linker flag"
fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admincmds"
+ fi
if test -f /etc/ld.so.conf; then
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
fi
echo
echo "See any operating system documentation about shared libraries for"
echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "------------------------------------------------------------------------------"
+ echo "----------------------------------------------------------------------"
exit 0
;;
@@ -2071,8 +3626,7 @@ libdir='$install_libdir'\
# Handle -dlopen flags immediately.
for file in $execute_dlfiles; do
- if test -f "$file"; then :
- else
+ if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2
exit 1
@@ -2081,22 +3635,22 @@ libdir='$install_libdir'\
dir=
case "$file" in
*.la)
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
# Read the libtool library.
dlname=
library_names=
- # If there is no directory component, then add one.
+ # If there is no directory component, then add one.
case "$file" in
*/* | *\\*) . $file ;;
- *) . ./$file ;;
+ *) . ./$file ;;
esac
# Skip this library if it cannot be dlopened.
@@ -2125,7 +3679,7 @@ libdir='$install_libdir'\
*)
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- continue
+ continue
;;
esac
@@ -2152,8 +3706,8 @@ libdir='$install_libdir'\
case "$file" in
-*) ;;
*)
- # Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one.
case "$file" in
*/* | *\\*) . $file ;;
@@ -2163,7 +3717,7 @@ libdir='$install_libdir'\
# Transform arg to wrapped name.
file="$progdir/$program"
fi
- ;;
+ ;;
esac
# Quote arguments (to preserve shell metacharacters).
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
@@ -2171,8 +3725,18 @@ libdir='$install_libdir'\
done
if test -z "$run"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved enviroment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
# Now actually exec the command.
eval "exec \$cmd$args"
@@ -2181,8 +3745,10 @@ libdir='$install_libdir'\
exit 1
else
# Display what would be done.
- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
- $echo "export $shlibpath_var"
+ if test -n "$shlibpath_var"; then
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ fi
$echo "$cmd$args"
exit 0
fi
@@ -2217,17 +3783,15 @@ libdir='$install_libdir'\
case "$name" in
*.la)
- # Possibly a libtool archive, so verify it.
- if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
- . $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $dir/$n"
- test "X$n" = "X$dlname" && dlname=
- done
- test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
- test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $dir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
$show "$rm $rmfiles"
$run $rm $rmfiles
@@ -2235,7 +3799,7 @@ libdir='$install_libdir'\
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
eval cmds=\"$postuninstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
@@ -2244,10 +3808,10 @@ libdir='$install_libdir'\
IFS="$save_ifs"
fi
- if test -n "$old_library"; then
+ if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
eval cmds=\"$old_postuninstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
@@ -2256,21 +3820,21 @@ libdir='$install_libdir'\
IFS="$save_ifs"
fi
- # FIXME: should reinstall the best remaining shared library.
- fi
- ;;
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ ;;
*.lo)
- if test "$build_old_libs" = yes; then
- oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'`
- rmfiles="$rmfiles $dir/$oldobj"
- fi
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
$show "$rm $rmfiles"
$run $rm $rmfiles
- ;;
+ ;;
*)
- $show "$rm $rmfiles"
+ $show "$rm $rmfiles"
$run $rm $rmfiles
;;
esac
@@ -2297,8 +3861,10 @@ case "$mode" in
Provide generalized library-building support services.
+ --config show all configuration variables
+ --debug enable verbose shell tracing
-n, --dry-run display commands without modifying any files
- --features display configuration information and exit
+ --features display basic configuration information and exit
--finish same as \`--mode=finish'
--help display this help message and exit
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
@@ -2326,6 +3892,11 @@ compile)
Compile a source file into a libtool library object.
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -static always build a \`.o' file suitable for static linking
+
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.
@@ -2392,18 +3963,25 @@ a program from several object files.
The following components of LINK-COMMAND are treated specially:
-all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-static do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
@@ -2411,18 +3989,19 @@ Every other argument is treated as a filename. Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
-library objects (\`.lo' files) may be specified, and \`-rpath' is required.
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
-If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar'
-and \`ranlib'.
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
-If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is
-created, otherwise an executable program is created."
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
;;
uninstall)
- $echo
+ $echo \
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
Remove libraries from an installation directory.
diff --git a/contrib/binutils/missing b/contrib/binutils/missing
index a6abd06..7789652 100644
--- a/contrib/binutils/missing
+++ b/contrib/binutils/missing
@@ -41,9 +41,11 @@ Supported PROGRAM values:
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
- bison touch file \`y.tab.c'
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
- yacc touch file \`y.tab.c'"
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
@@ -80,7 +82,17 @@ WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
- touch config.h.in
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
;;
automake)
@@ -89,9 +101,9 @@ WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print \
- | sed 's/^\(.*\).am$/touch \1.in/' \
- | sh
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
;;
bison|yacc)
@@ -100,7 +112,51 @@ WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
- touch y.tab.c
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
;;
makeinfo)
diff --git a/contrib/binutils/move-if-change b/contrib/binutils/move-if-change
index 565825f..ee1b348 100755
--- a/contrib/binutils/move-if-change
+++ b/contrib/binutils/move-if-change
@@ -14,7 +14,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., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if
test -r $2
diff --git a/contrib/binutils/opcodes/ChangeLog b/contrib/binutils/opcodes/ChangeLog
index 2d528c6..4e2cd47 100644
--- a/contrib/binutils/opcodes/ChangeLog
+++ b/contrib/binutils/opcodes/ChangeLog
@@ -1,10 +1,1628 @@
+2000-04-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * a29k-dis.c, alpha-dis.c, alpha-opc.c, arc-dis.c, arc-opc.c,
+ avr-dis.c, d10v-dis.c, d10v-opc.c, d30v-dis.c, d30v-opc.c,
+ disassemble.c, h8300-dis.c, h8500-dis.c, hppa-dis.c, i370-dis.c,
+ i370-opc.c, i960-dis.c, m10200-dis.c, m10200-opc.c, m10300-dis.c,
+ m10300-opc.c, m68k-dis.c, m68k-opc.c, m88k-dis.c, mcore-dis.c,
+ mips-dis.c, mips-opc.c, mips16-opc.c, pj-dis.c, pj-opc.c, ppc-dis.c,
+ ppc-opc.c, sh-dis.c, sparc-dis.c, sparc-opc.c, tic80-dis.c,
+ tic80-opc.c, v850-dis.c, v850-opc.c, vax-dis.c, w65-dis.c, z8k-dis.c,
+ z8kgen.c: Everyone includes sysdep.h. Remove ansidecl.h as sysdep.h
+ includes it.
+
+2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
+
+ * m10300-dis.c (HAVE_AM30, HAVE_AM33): Define.
+ (disassemble): Use them.
+
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * po/opcodes.pot: Regenerate.
+
+ * Makefile.am (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.
+
+2000-04-03 Denis Chertykov <denisc@overta.ru>
+
+ * avr-dis.c: Syntax cleanup.
+ (add0fff): Print the pc relative address as a signed number.
+ (add03f8): Likewise.
+
+2000-04-01 Ian Lance Taylor <ian@zembu.com>
+
+ * disassemble.c (disassembler_usage): Don't use a prototype. Mark
+ the parameter ATTRIBUTE_UNUSED.
+ * ppc-opc.c: Add ATTRIBUTE_UNUSED as needed.
+
+2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
+
+ * m10300-opc.c: SP-based offsets are always unsigned.
+
+2000-03-29 Thomas de Lellis <tdel@windriver.com>
+
+ * arm-opc.h (thumb_opcodes): Disassemble 0xde.. to "bal"
+ [branch always] instead of "undefined".
+
+2000-03-27 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c (d30v_format_table): Move SHORT_AR to end of list of
+ short instructions, from end of list of long instructions.
+
+2000-03-27 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.am (CFILES): Add avr-dis.c.
+ (ALL_MACHINES): Add avr-dis.lo.
+
+2000-03-27 Alan Modra <alan@linuxcare.com>
+
+ * avr-dis.c (add0fff, add03f8): Don't use structure bitfields to
+ truncate integers.
+ (print_insn_avr): Call function via pointer in K&R compatible way.
+ (dispLDD, regPP, reg50, reg104, reg40, reg20w, lit404, lit204,
+ add0fff, add03f8): Convert to old style function declaration and
+ add prototype.
+ (avrdis_opcode): Add prototype.
+
+2000-03-27 Denis Chertykov <denisc@overta.ru>
+
+ * avr-dis.c: New file. AVR disassembler.
+ * configure.in (bfd_avr_arch): New architecture support.
+ * disassemble.c: Likewise.
+ * configure: Regenerate.
+
+Mon Mar 6 19:52:05 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh-opc.h (sh_table): ldre and ldrs have a *signed* displacement.
+
+2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * d30v-dis.c (print_insn): Remove d*i hacks. Use per-operand
+ flag to determine if operand is pc-relative.
+ * d30v-opc.c:
+ (d30v_format_table):
+ (REL6S3): Renamed from IMM6S3.
+ Added flag OPERAND_PCREL.
+ (REL12S3, REL18S3, REL32): Split from IMM12S3, IMM18S3, REL32, with
+ added flag OPERAND_PCREL.
+ (IMM12S3U): Replaced with REL12S3.
+ (SHORT_D2, LONG_D): Delay target is pc-relative.
+ (SHORT_B2r, SHORT_B3r, SHORT_B3br, SHORT_D2r, LONG_Ur, LONG_2r):
+ Split from SHORT_B2, SHORT_D2, SHORT_B3b, SHORT_D2, LONG_U, LONG_2r,
+ using the REL* operands.
+ (LONG_2br, LONG_Dr): Likewise, from LONG_2b, LONG_D.
+ (SHORT_D1r, SHORT_D2Br, LONG_Dbr): Renamed from SHORT_D1, SHORT_D2B,
+ LONG_Db, using REL* operands.
+ (SHORT_U, SHORT_A5S): Removed stray alternatives.
+ (d30v_opcode_table): Use new *r formats.
+
+2000-02-28 Nick Clifton <nickc@cygnus.com>
+
+ * m32r-desc.c (m32r_cgen_cpu_open): Replace 'flags' with
+ 'signed_overflow_ok_p'.
+
+2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
+ name of the libtool directory.
+ * Makefile.in: Rebuild.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * cgen-opc.c (cgen_set_signed_overflow_ok): New function.
+ (cgen_clear_signed_overflow_ok): New function.
+ (cgen_signed_overflow_ok_p): New function.
+
+2000-02-23 Andrew Haley <aph@cygnus.com>
+
+ * m32r-asm.c, m32r-desc.c, m32r-desc.h, m32r-dis.c,
+ m32r-ibld.c,m32r-opc.h: Rebuild.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * i370-dis.c, i370-opc.c: New.
+
+ * disassemble.c (ARCH_i370): Define.
+ (disassembler): Handle it.
+
+ * Makefile.am: Add support for Linux/IBM 370.
+ * configure.in: Likewise.
+
+ * Makefile.in: Regenerate.
+ * configure: Likewise.
+
+2000-02-22 Chandra Chavva <cchavva@cygnus.com>
+
+ * d30v-opc.c (d30v_opcode_tab) : Added FLAG_NOT_WITH_ADDSUBppp to
+ ST2H, STB, STH, STHH, STW and ST2H opcodes to prohibit parallel
+ procedure.
+
+1999-12-30 Andrew Haley <aph@cygnus.com>
+
+ * mips-dis.c (_print_insn_mips): New arg for OPCODE_IS_MEMBER:
+ force gp32 to zero.
+ * mips-opc.c (G6): New define.
+ (mips_builtin_op): Add "move" definition for -gp32.
+
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
+
+ From Grant Erickson <gerickso@Brocade.COM>:
+ * ppc-opc.c: Correct dcread--it takes 3 arguments, not 2.
+
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * dis-buf.c (buffer_read_memory): Change `length' param and all int
+ vars to unsigned.
+
+Thu Feb 17 00:18:12 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
+ (print_insn_ppi): Likewise.
+ (print_insn_shx): Use info->mach to select appropriate insn set.
+ Add support for sh-dsp. Remove FD_REG_N support.
+ * sh-opc.h (sh_nibble_type): Add new values for sh-dsp support.
+ (sh_arg_type): Likewise. Remove FD_REG_N.
+ (sh_dsp_reg_nums): New enum.
+ (arch_sh1, arch_sh2, arch_sh3, arch_sh3e, arch_sh4): New macros.
+ (arch_sh_dsp, arch_sh3_dsp, arch_sh1_up, arch_sh2_up): Likewise.
+ (arch_sh3_up, arch_sh3e_up, arch_sh4_up, arch_sh_dsp_up): Likewise.
+ (arch_sh3_dsp_up): Likewise.
+ (sh_opcode_info): New field: arch.
+ (sh_table): Split up insn with FD_REG_N into ones with F_REG_N and
+ D_REG_N. Fill in arch field. Add sh-dsp insns.
+
+2000-02-14 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * arm-dis.c: Change flavor name from atpcs-special to
+ special-atpcs to prevent name conflict in gdb.
+ (get_arm_regname_num_options, set_arm_regname_option,
+ get_arm_regnames): New functions. API to access the several
+ flavor of register names. Note: Used by gdb.
+ (print_insn_thumb): Use the register name entry from the currently
+ selected flavor for LR and PC.
+
+2000-02-10 Nick Clifton <nickc@cygnus.com>
+
+ * mcore-opc.h (enum mcore_opclass): Add MULSH and OPSR
+ classes.
+ (mcore_table): Add "idly4", "psrclr", "psrset", "mulsh" and
+ "mulsh.h" instructions.
+ * mcore-dis.c (imsk array): Add masks for MULSH and OPSR
+ classes.
+ (print_insn_mcore): Add support for little endian targets.
+ Add support for MULSH and OPSR classes.
+
+2000-02-07 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (parse_arm_diassembler_option): Rename again.
+ Previous delat did not take.
+
+2000-02-03 Timothy Wall <twall@redhat.com>
+
+ * dis-buf.c (buffer_read_memory): Use octets_per_byte field
+ to adjust target address bounds checking and calculate the
+ appropriate octet offset into data.
+
+2000-01-27 Nick Clifton <nickc@redhat.com>
+
+ * arm-dis.c: (parse_disassembler_option): Rename to
+ parse_arm_disassembler_option and allow to be exported.
+
+ * disassemble.c (disassembler_usage): New function: Print out any
+ target specific disassembler options.
+ Call arm_disassembler_options() if the ARM architecture is being
+ supported.
+
+ * arm-dis.c (NUM_ELEM): Define this macro if not already
+ defined.
+ (arm_regname): New struct type for ARM register names.
+ (arm_toggle_regnames): Delete.
+ (parse_disassembler_option): Use register name structure.
+ (print_insn): New function: Combines duplicate code found in
+ print_insn_big_arm and print_insn_little_arm.
+ (print_insn_big_arm): Call print_insn.
+ (print_insn_little_arm): Call print_insn.
+ (print_arm_disassembler_options): Display list of supported,
+ ARM specific disassembler options.
+
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
+
+ * arm-dis.c (printf_insn_big_arm): Treat ELF symbols with the
+ ARM_STT_16BIT flag as Thumb code symbols.
+
+ * arm-dis.c (printf_insn_little_arm): Ditto.
+
+2000-01-25 Thomas de Lellis <tdel@windriver.com>
+
+ * arm-dis.c (printf_insn_thumb): Prevent double dumping
+ of raw thumb instructions.
+
+2000-01-20 Nick Clifton <nickc@cygnus.com>
+
+ * mcore-opc.h (mcore_table): Add "add" as an alias for "addu".
+
+2000-01-03 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (streq): New macro.
+ (strneq): New macro.
+ (force_thumb): ew local variable.
+ (parse_disassembler_option): New function: Parse a single, ARM
+ specific disassembler command line switch.
+ (parse_disassembler_option): Call parse_disassembler_option to
+ parse individual command line switches.
+ (print_insn_big_arm): Check force_thumb.
+ (print_insn_little_arm): Check force_thumb.
+
+1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c (grps[]): Correct GRP5 FF/3 from "call" to "lcall".
+
+Wed Dec 1 03:34:53 1999 Jeffrey A Law (law@cygnus.com)
+
+ * m10300-opc.c, m10300-dis.c: Add am33 support.
+
+Wed Nov 24 20:29:58 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-dis.c (unit_cond_names): Add PA2.0 unit condition names.
+ (print_insn_hppa): Handle 'B' operand.
+
+1999-11-22 Nick Clifton <nickc@cygnus.com>
+
+ * d10v-opc.c: Fix pattern for "cpfg,f{0|1},c" instruction.
+
+1999-11-18 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips-opc.c (I5): New.
+ (abs.ps,add.ps,alnv.ps,c.COND.ps,cvt.s.pl,cvt.s.pu,cvt.ps.s
+ madd.ps,movf.ps,movt.ps,mul.ps,net.ps,nmadd.ps,nmsub.ps,
+ pll.ps,plu.ps,pul.ps,puu.ps,sub.ps,suxc1,luxc1): New.
+
+Mon Nov 15 19:34:58 1999 Donald Lindsay <dlindsay@cygnus.com>
+
+ * arm-dis.c (print_insn_arm): Added general purpose 'X' format.
+ * arm-opc.h (print_insn_arm): Added comment documenting
+ the 'X' format just added to arm-dis.c.
+
+1999-11-15 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips-opc.c (la): Create a version that just uses addiu directly.
+ (dla): Expand to daddiu if possible.
+
+1999-11-11 Nick Clifton <nickc@cygnus.com>
+
+ * mips-opc.c: Add ssnop pattern.
+
+1999-11-01 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips-dis.c (_print_insn_mips): Use OPCODE_IS_MEMBER.
+
+1999-10-29 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c (mvtacc): Use format SHORT_AR not SHORT_AA
+ (d30v_format_tab): Define the SHORT_AR format.
+
+1999-10-28 Nick Clifton <nickc@cygnus.com>
+
+ * mcore-dis.c: Remove spurious code introduced in previous delta.
+
+1999-10-27 Scott Bambrough <scottb@netwinder.org>
+
+ * arm-dis.c: Include sysdep.h to prevent compile time warnings.
+
+1999-10-18 Michael Meissner <meissner@cygnus.com>
+
+ * alpha-opc.c (alpha_operands): Fill in missing initializer.
+ (alpha_num_operands): Convert to unsigned.
+ (alpha_num_opcodes): Ditto.
+ (insert_rba): Declare unused arguments ATTRIBUTE_UNUSED.
+ (insert_rca): Ditto.
+ (insert_za): Ditto.
+ (insert_zb): Ditto.
+ (insert_zc): Ditto.
+ (extract_bdisp): Ditto.
+ (extract_jhint): Ditto.
+ (extract_ev6hwjhint): Ditto.
+
+Sun Oct 10 01:48:01 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
+
+ * hppa-dis.c (print_insn_hppa): Add new codes 'cc', 'cd', 'cC',
+ 'co', '@'.
+
+ * hppa-dis.c (print_insn_hppa): Removed unused args. Fix '?W'.
+
+ * hppa-dis.c (print_insn_hppa): Implement codes "?N", "?Q".
+
+Thu Oct 7 00:12:43 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
+
+ * d10v-opc.c (d10v_operands): Add RESTRICTED_NUM3 flag for
+ rac/rachi instructions.
+ (d10v_opcodes): Added seven new instructions ld, ld2w, sac, sachi,
+ slae, st and st2w.
+
+1999-10-04 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-asm.c,fr30-desc.h: Rebuild.
+ * m32r-asm.c,m32r-desc.c,m32r-desc.h: Rebuild. Add m32rx support.
+ * m32r-dis.c,m32r-ibld.c,m32r-opc.c,m32r-opc.h,m32r-opinst.c: Ditto.
+
+1999-09-29 Nick Clifton <nickc@cygnus.com>
+
+ * sh-opc.h: Fix bit patterns for several load and store
+ instructions.
+
+Thu Sep 23 08:27:20 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org
+
+ * hppa-dis.c (print_insn_hppa): Replace 'B', 'M', 'g' and 'l' with
+ cleaner code using completer prefixes. Add 'Y'.
+
+Sun Sep 19 10:41:27 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-dis.c: (print_insn_hppa): Correct 'cJ', 'cc'.
+
+ * hppa-dis.c (extract_22): New function.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'J', 'K', and 'cc'.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'fe' and 'cJ'.
+
+ * hppa-dis.c (print_insn_hppa): Handle '#', 'd', and 'cq'.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'm', 'h', '='.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'X' operand.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'B' operand.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'M' and 'L' operands.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'l' operand.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'g' operand.
+
+Sat Sep 18 11:36:12 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-dis.c (print_insn_hppa): Output a space after 'X' completer.
+
+ * hppa-dis.c: (print_insn_hppa): Do output a space before a 'v'
+ operand.
+
+ * hppa-dis.c: (print_insn_hppa): Handle 'fX'.
+
+ * hppa-dis.c: (print_insn_hppa): Add missing break after
+ FP register case.
+
+ * hppa-dis.c: Finish constifying various completers, register
+ names, etc etc.
+
+1999-09-14 Michael Meissner <meissner@cygnus.com>
+
+ * 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.
+
+Tue Sep 7 13:50:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-dis.c (print_insn_hppa): Escape '%' in output strings.
+
+ * hppa-dis.c (print_insn_hppa): Handle 'Z' argument.
+
+1999-09-07 Nick Clifton <nickc@cygnus.com>
+
+ * sh-opc.h: Add mulu.w and muls.w patterns. These are the correct
+ names for the mulu and muls patterns.
+
+1999-09-04 Steve Chamberlain <sac@pobox.com>
+
+ * pj-opc.c: New file.
+ * pj-dis.c: New file.
+ * disassemble.c (disassembler): Handle bfd_arch_pj.
+ * configure.in: Handle bfd_pj_arch.
+ * Makefile.am: Rebuild dependencies.
+ (CFILES): Add pj-dis.c and pj-opc.c.
+ (ALL_MACHINES): Add pj-dis.lo and pj-opc.lo.
+ * configure, Makefile.in: Rebuild.
+
+1999-09-04 H.J. Lu <hjl@gnu.org>
+
+ * i386-dis.c (print_insn_i386): Set bytes_per_line to 7.
+
+Mon Aug 30 18:56:14 1999 Richard Henderson <rth@cygnus.com>
+
+ * alpha-opc.c (fetch, fetch_m, ecb, wh64): RA must be R31.
+
+1999-08-04 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-asm.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
+ * m32r-asm.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
+ * m32r-opinst.c: Rebuild.
+
+Sat Aug 28 00:27:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa-dis.c (print_insn_hppa): Replace 'f' by 'v'. Prefix float
+ register args by 'f'.
+
+ * hppa-dis.c (print_insn_hppa): Add args q, %, !, and |.
+
+ * hppa-dis.c (MASK_10, read_write_names, add_compl_names,
+ extract_10U_store): New.
+ (print_insn_hppa): Add new completers.
+
+ * hppa-dis.c (signed_unsigned_names,mix_half_names,
+ saturation_names): New.
+ (print_insn_hppa): Add completer codes 'a', 'ch', 'cH', 'cS', and 'c*'.
+
+ * hppa-dis.c (print_insn_hppa): Place completers behind prefix 'c'.
+
+ * hppa-dis.c (print_insn_hppa): Add cases for '.', '~'. '$'. and '!'
+
+ * hppa-dis.c (print_insn_hppa): Look at next arg instead of bits
+ to decide to print a space.
+
+1999-08-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c: Add AMD athlon instruction support.
+
+1999-08-10 Ian Lance Taylor <ian@zembu.com>
+
+ From Wally Iimura <iimura@microunity.com>:
+ * dis-buf.c (buffer_read_memory): Rewrite expression to avoid
+ overflow at end of address space.
+ (generic_print_address): Use sprintf_vma.
+
+1999-08-08 Ian Lance Taylor <ian@zembu.com>
+
+ * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
+ MKDEP. Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa-dis.c (compare_cond_64_names, cmpib_cond_64_names,
+ add_cond_64_names, wide_add_cond_names, logical_cond_64_names,
+ unit_cond_64_names, shift_cond_64_names, bb_cond_64_names): New.
+ (print_insn_hppa): Add 64 bit condition completers.
+
+Thu Aug 5 16:59:58 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa-dis.c (print_insn_hppa): Change condition args to use
+ '?' prefix.
+
+Wed Jul 28 04:33:58 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+
+ * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
+ code.
+
+1999-07-21 Ian Lance Taylor <ian@zembu.com>
+
+ From Mark Elbrecht:
+ * configure.bat: Remove; obsolete.
+
+1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * dis-buf.c: Add ATTRIBUTE_UNUSED as appropriate.
+ (generic_strcat_address): Add cast to avoid warning.
+ * i386-dis.c: Initialize all structure fields to avoid warnings.
+ Add ATTRIBUTE_UNUSED as appropriate.
+
+1999-07-08 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sparc-dis.c (print_insn_sparc): Differentiate between
+ addition and oring when guessing symbol for comment.
+
+1999-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (print_insn_arm): Display hex equivalent of rotated
+ constant.
+
+1999-06-23 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c: Mention intel mode specials in macro char comment.
+
+1999-06-21 Ian Lance Taylor <ian@zembu.com>
+
+ * alpha-dis.c: Don't include <stdlib.h>.
+ * arm-dis.c: Include "sysdep.h".
+ * tic30-dis.c: Don't include <stdlib.h> or <string.h>. Include
+ "sysdep.h".
+ * Makefile.am: Rebuild dependencies.
+ * Makefile.in: Rebuild.
+
+1999-06-16 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (print_insn_arm): Add detection of IMB and IMBRange
+ SWIs.
+
+1999-06-14 Nick Clifton <nickc@cygnus.com> & Drew Mosley <dmoseley@cygnus.com>
+
+ * arm-dis.c (arm_regnames): Turn into a pointer to a register
+ name set.
+ (arm_regnames_standard): New variable: Array of ARM register
+ names according to ARM instruction set nomenclature.
+ (arm_regnames_apcs): New variable: Array of ARM register names
+ according to ARM Procedure Call Standard.
+ (arm_regnames_raw): New variable: Array of ARM register names
+ using just 'r' and the register number.
+ (arm_toggle_regnames): New function: Toggle the chosen register set
+ naming scheme.
+ (parse_disassembler_options): New function: Parse any target
+ disassembler command line options.
+ (print_insn_big_arm): Call parse_disassembler_options if any
+ are defined.
+ (print_insn_little_arm): Call parse_disassembler_options if any
+ are defined.
+
+1999-06-13 Ian Lance Taylor <ian@zembu.com>
+
+ * i386-dis.c (FWAIT_OPCODE): Define.
+ (used_prefixes): New static variable.
+ (fetch_data): Don't print an error message if we have already
+ fetched some bytes successfully.
+ (ckprefix): Clear used_prefixes. Use FWAIT_OPCODE, not 0x9b.
+ (prefix_name): New static function.
+ (print_insn_i386): If setjmp fails, indicating a data error, but
+ we have managed to fetch some bytes, print the first one as a
+ prefix or a .byte pseudo-op. If fwait is followed by a non
+ floating point instruction, print the first prefix. Set
+ used_prefixes when prefixes are used. If any prefixes were not
+ used after disassembling the instruction, print the first prefix
+ instead of printing the instruction.
+ (putop): Set used_prefixes when prefixes are used.
+ (append_seg, OP_E, OP_G, OP_REG, OP_I, OP_sI, OP_J): Likewise.
+ (OP_DIR, OP_SIMD_Suffix): Likewise.
+
+1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sparc-opc.c: Fix up set, setsw, setuw operand kinds.
+ Support signx %reg, clruw %reg.
+
+1999-06-07 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sparc-opc.c: Add aliases Solaris as supports.
+
+Mon Jun 7 12:04:52 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * Makefile.am (CFILES): Add arc-{dis,opc}.c and v850-{dis,opc}.c.
+ * Makefile.in: Regenerated.
+
+1999-06-03 Philip Blundell <philb@gnu.org>
+
+ * arm-dis.c (print_insn_arm): Make LDRH/LDRB consistent with LDR
+ when target is PC-relative.
+
+1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
+
+ * m68k-opc.c: Rename MACL/MSACL to MAC/MSAC. Add MACM/MSACM. Add
+ MOVE MACSR,CCR.
+
+ * m68k-dis.c (fetch_arg): Add places `n', `o'.
+
+ * m68k-opc.c: Add MSAC, MACL, MOVE to/from ACC, MACSR, MASK.
+ Add mcf5206e to appropriate instructions.
+ Add alias for MAC, MSAC.
+
+ * m68k-dis.c (print_insn_arg): Add formats `E', `G', `H' and place
+ `N'.
+
+ * m68k-opc.c (m68k_opcodes): Add divsw, divsl, divuw, divul, macl,
+ macw, remsl, remul for mcf5307. Change mcf5200 --> mcf.
+
+ * m68k-dis.c: Add format `u' and places `h', `m', `M'.
+
+1999-05-18 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c (Ed): Define.
+ (dis386_twobyte_att, dis386_twobyte_intel): Use Ed for movd.
+ (Rw): Remove.
+ (OP_rm): Rename to OP_Rd.
+ (ONE): Remove.
+ (OP_ONE): Remove.
+ (putop): Add const to template and p.
+ (print_insn_x86): Delete.
+ (print_insn_i386): Merge old function print_insn_x86. Add const
+ to dp.
+ (struct dis386): Add const to name.
+ (dis386_att, dis386_intel): Add const.
+ (dis386_twobyte_att, dis386_twobyte_intel): Add const.
+ (names32, names16, names8, names_seg, index16): Add const.
+ (grps, prefix_user_table, float_reg): Add const.
+ (float_mem_att, float_mem_intel): Add const.
+ (oappend): Add const to s.
+ (OP_REG): Add const to s.
+ (ptr_reg): Add const to s.
+ (dofloat): Add const to dp.
+ (OP_C): Don't skip modrm, it's now done in OP_Rd.
+ (OP_D): Ditto.
+ (OP_T): Ditto.
+ (OP_Rd): Check for valid mod. Call Op_E to print.
+ (OP_E): Handle d_mode arg. Check for bad sfence,lea,lds etc.
+ (OP_MS): Check for valid mod. Call Op_EM to print.
+ (OP_3DNowSuffix): Set obufp and use oappend rather than
+ strcat. Call BadOp() for errors.
+ (OP_SIMD_Suffix): Likewise.
+ (BadOp): New function.
+
+1999-05-12 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c (dis386_intel): Remove macro chars, except for
+ jEcxz. Change cWtR and cRtd to cW and cR.
+ (dis386_twobyte_intel): Remove macro chars here too.
+ (putop): Handle R and W macros for intel mode.
+
+ * i386-dis.c (SIMD_Fixup): New function.
+ (dis386_twobyte_att): Use it on movlps and movhps, and change
+ Ev to EX on these insns. Change movmskps Ev, XM to Gv, EX.
+ (dis386_twobyte_intel): Same here.
+
+ * i386-dis.c (Av): Remove.
+ (Ap): remove lptr.
+ (lptr): Remove.
+ (OPSIMD): Define.
+ (OP_SIMD_Suffix): New function.
+ (OP_DIR): Remove dead code.
+ (eAX_reg..eDI_reg): Renumber.
+ (onebyte_has_modrm): Table numbering comments.
+ (INTERNAL_DISASSEMBLER_ERROR): Move to before print_insn_x86.
+ (print_insn_x86): Move all prefix oappends to after uses_f3_prefix
+ checks. Print error on invalid dp->bytemode2. Remove simd_cmp,
+ and handle SIMD cmp insns in OP_SIMD_Suffix.
+ (info->bytes_per_line): Bump from 5 to 6.
+ (OP_None): Remove.
+ (OP_E): Use INTERNAL_DISASSEMBLER_ERROR. Handle sfence.
+ (OP_3DNowSuffix): Ensure mnemonic index unsigned.
+
+ PIII SIMD support from Doug Ledford <dledford@redhat.com>
+ * i386-dis.c (XM, EX, None): Define.
+ (OP_XMM, OP_EX, OP_None): New functions.
+ (USE_GROUPS, USE_PREFIX_USER_TABLE): Define.
+ (GRP14): Rename to GRPAMD.
+ (GRP*): Add USE_GROUPS flag.
+ (PREGRP*): Define.
+ (dis386_twobyte_att, dis386_twobyte_intel): Add SIMD insns.
+ (twobyte_has_modrm): Add SIMD entries.
+ (twobyte_uses_f3_prefix, simd_cmp_op, prefix_user_table): New.
+ (grps): Add SIMD insns.
+ (print_insn_x86): New vars uses_f3_prefix and simd_cmp. Don't
+ oappend repz if uses_f3_prefix. Add code to handle new groups for
+ SIMD insns.
+
+ From Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * i386-dis.c (dis386_att, dis386_intel): Change 0xE8 call insn
+ operand from Av to Jv.
+
+1999-05-07 Nick Clifton <nickc@cygnus.com>
+
+ * mcore-dis.c (print_insn_mcore): Use .short to display
+ unidentified instructions, not .word.
+
+1999-04-26 Tom Tromey <tromey@cygnus.com>
+
+ * aclocal.m4, configure: Updated for new version of libtool.
+
+1999-04-14 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
+ * m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
+
+Mon Apr 12 23:46:17 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-dis.c (print_insn_hppa, case '3'): New case for PA2.0
+ instructions.
+
+1999-04-10 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-desc.c,fr30-desc.h,fr30-ibld.c: Rebuild.
+ * m32r-desc.c,m32r-desc.h,m32r-opinst.c: Rebuild.
+
+1999-04-06 Ian Lance Taylor <ian@zembu.com>
+
+ * opintl.h (LC_MESSAGES): Never define.
+
+1999-04-04 Ian Lance Taylor <ian@zembu.com>
+
+ * i386-dis.c (intel_syntax, open_char, close_char): Make static.
+ (separator_char, scale_char): Likewise.
+ (print_insn_x86): Likewise.
+ (print_insn_i386): Likewise. Add declaration.
+
+1999-03-26 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-dis.c: Rebuild.
+ * m32r-dis.c: Rebuild.
+
+1999-03-23 Ian Lance Taylor <ian@zembu.com>
+
+ * m68k-opc.c: Change compare instructions to use "@s" rather than
+ ";s" when used with an immediate operand.
+
+1999-03-22 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen-opc.c (cgen_set_cpu): Delete.
+ (cgen_lookup_insn): max_insn_size renamed to max_insn_bitsize.
+ * fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c,fr30-opc.h:
+ Rebuild.
+ * m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c,m32r-opc.h:
+ Rebuild.
+ * po/opcodes.pot: Rebuild.
+
+1999-03-16 Martin Hunt <hunt@cygnus.com>
+
+ * d30v-opc.c (mvtsys): Remove FLAG_LKR.
+
+1999-03-11 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen-opc.c (cgen_set_cpu): New arg `isa'. All callers updated.
+ (cgen_operand_lookup_by_name,cgen_operand_lookup_by_num): New fns.
+ (cgen_get_insn_operands): Rewrite test for hardcoded/operand index.
+ * fr30-asm.c,fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c: Rebuild.
+ * m32r-asm.c,m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c: Rebuild.
+ * m32r-opinst.c: Rebuild.
+
+1999-02-25 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen-opc.c (cgen_hw_lookup_by_name): Rewrite.
+ (cgen_hw_lookup_by_num): Rewrite.
+ * fr30-desc.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
+ * m32r-desc.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
+ * m32r-opinst.c: Rebuild.
+
+Sat Feb 13 14:06:19 1999 Richard Henderson <rth@cygnus.com>
+
+ * alpha-opc.c: Add sqrt+flags patterns. Add EV6 PALcode insns.
+ (insert_jhint): Fix insertion mask.
+ * alpha-dis.c (print_insn_alpha): Disassemble EV6 PALcode insns.
+
+1999-02-10 Doug Evans <devans@casey.cygnus.com>
+
+ * Makefile.in: Rebuild.
+
+1999-02-09 Doug Evans <devans@casey.cygnus.com>
+
+ * i960c-asm.c,i960c-dis.c,i960c-opc.c,i960c-opc.h: Delete.
+ * i960-dis.c (print_insn_i960): Rename from print_insn_i960_orig.
+ * Makefile.am: Remove references to them.
+ (HFILES): Add fr30-desc.h,m32r-desc.h.
+ (CFILES): Add fr30-desc.c,fr30-ibld.c,m32r-desc.c,m32r-ibld.c,
+ m32r-opinst.c.
+ (ALL_MACHINES): Update.
+ * configure.in: Redo handling of cgen_files.
+ (bfd_i960_arch): Delete i960c-*.lo files.
+ * configure: Regenerate.
+ * cgen-asm.c (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
+ (hash_insn_array): Rewrite.
+ * cgen-dis.c (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
+ (hash_insn_array): Rewrite.
+ * cgen-opc.c (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
+ (cgen_lookup_insn,cgen_get_insn_operands): Define here.
+ (cgen_lookup_get_insn_operands): Ditto.
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerate.
+ * m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
+ * po/POTFILES.in: Rebuild.
+ * po/opcodes.pot: Rebuild.
+
+Fri Feb 5 00:04:24 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: Rebuild dependencies.
+ (HFILES): Add fr30-opc.h.
+ (CFILES): Add fr30-asm.c, fr30-dis.c, fr30-opc.c.
+ * Makefile.in: Rebuild.
+
+ * 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.
+ * acconfig.h: Remove.
+ * configure: Rebuild with current autoconf/automake.
+ * aclocal.m4: Likewise.
+ * config.in: Likewise.
+ * Makefile.in: Likewise.
+
+Thu Feb 4 13:48:52 1999 Ian Lance Taylor <ian@cygnus.com>
+
+ * m68k-opc.c: Correct move (not movew) to status word on 5200.
+
+Mon Feb 1 20:54:36 1999 Catherine Moore <clm@cygnus.com>
+
+ * disassemble.c (disassembler): Handle bfd_mach_i386_i386_intel_syntax.
+ * i386-dis.c (x_mode): Define.
+ (dis386): Remove.
+ (dis386_att): New.
+ (dis386_intel): New.
+ (dis386_twobyte): Remove.
+ (dis386_twobyte_att): New.
+ (dis386_twobyte_intel): New.
+ (print_insn_x86): Use new arrays.
+ (float_mem): Remove.
+ (float_mem_intel): New.
+ (float_mem_att): New.
+ (dofloat): Use new float_mem arrays.
+ (print_insn_i386_att): New.
+ (print_insn_i386_intel): New.
+ (print_insn_i386): Handle bfd_mach_i386_i386_intel_syntax.
+ (putop): Handle intel syntax.
+ (OP_indirE): Handle intel syntax.
+ (OP_E): Handle intel syntax.
+ (OP_I): Handle intel syntax.
+ (OP_sI): Handle intel syntax.
+ (OP_OFF): Handle intel syntax.
+
+
+
+1999-01-27 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-opc.h,fr30-opc.c: Rebuild.
+ * i960c-opc.h,i960c-opc.c: Rebuild.
+ * m32r-opc.c: Rebuild.
+
+Tue Jan 19 18:01:54 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * hppa-dis.c: revert HP merge changes until HP gives us
+ an updated file.
+
+1999-01-19 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (print_insn_arm): Display ARM syntax for PC relative
+ offsets as well as symbloic address.
+
+Tue Jan 19 10:51:01 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * hppa-dis.c: fix comments and some indentation.
+
+1999-01-12 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-opc.c,i960c-opc.c: Regenerate.
+
+1999-01-11 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-opc.c: Regenerate.
+
+1999-01-06 Doug Evans <devans@casey.cygnus.com>
+
+ * m32r-dis.c: Regenerate.
+
+1999-01-05 Doug Evans <devans@casey.cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.h,fr30-opc.c: Regenerate.
+ * i960c-asm.c,i960c-dis.c,i960c-opc.h,i960c-opc.c: Regenerate.
+ * m32r-asm.c,m32r-dis.c,m32r-opc.h,m32r-opc.c: Regenerate.
+
+1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Require autoconf 2.12.1 or higher.
+
+1998-12-30 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips16-opc.c: Mark branch insns with MIPS16_INSN_BRANCH.
+
+Wed Dec 16 16:17:49 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c: Regenerated.
+
+1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips-dis.c (set_mips_isa_type): Handle bfd_mach_mips4111.
+
+1998-12-15 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c,fr30-opc.h: Regenerated.
+
+1998-12-14 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c,fr30-opc.h: Regenerated.
+
+Thu Dec 10 18:39:46 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c,fr30-opc.h: Regenerated.
+
+Thu Dec 10 12:49:24 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-opc.c: Regenerate.
+
+Tue Dec 8 13:56:18 1998 David Taylor <taylor@texas.cygnus.com>
+
+ * dis-buf.c (generic_strcat_address): reformat to GNU coding
+ conventions. change sprintf call to an sprintf_vma call.
+
+Tue Dec 8 13:12:44 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
+
+Tue Dec 8 10:50:46 1998 David Taylor <taylor@texas.cygnus.com>
+
+ The following changes were made by
+ Elena Zannoni <ezannoni@kwikemart.cygnus.com>,
+ David Taylor <taylor@texas.cygnus.com>, and
+ Edith Epstein <eepstein@sophia.cygnus.com> as part of a project to
+ merge in changes by HP; HP did not create ChangeLog entries.
+
+ * dis-buf.c (generic_strcat_address): new function.
+
+ * hppa-dis.c: Changes to improve hppa disassembly.
+ Changed formatting in : reg_names, fp_reg_names,control_reg,
+ New variables : sign_extension_names, deposit_names, conversion_names
+ float_test_names, compare_cond_names_double, add_cond_names_double,
+ logical_cond_names_double, unit_cond_names_double,
+ branch_push_pop_names, saturation_names, shift_names, mix_names,
+ New Macros : GET_COMPL_O, GET_PUSH_POP,MERGED_REG
+ Move some definitions to libhppa.h: GET_FIELD, GET_BIT
+ (fput_const): renamed as fput_hex_const
+ (print_insn_hppa):
+ - use the macros fputs_filtered and
+ fput_decimal_const whenever possible; calls to sign_extend require
+ 2 params -- add a missing second param of 0.
+ - Some new code ifdefed for LOCAL_ONLY, all related to figuring out
+ architecture version number of current machine. HP folks are
+ trying to handle situation where the target program was compiled
+ for PA 1.x (32-bit), but is running on a PA 2.0 machine and
+ visa versa.
+ - added new cases : 'g', 'B', 'm'
+ - added cases specifically for PA 2.0
+ - changed the following cases : '"', 'n', 'N', 'p', 'Z',
+ - calls to fput_const become calls to fput_hex_const
+
+1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
+
+ * Makefile.am (CFILES): Add i960c-asm, i960c-dis.c, i960c-opc.c.
+ (ALL_MACHINES): Add i960c-asm.lo, i960c-dis.lo, i960-opc.lo.
+ (i960-asm.lo, i960c-dis.lo, i960c-opc.lo): New Makefile rules.
+ * Makefile.in: Rebuilt.
+ * configure.in (bfd_i960_arch): Add i960c-opc.lo, i960-asm.o,
+ i960-dis.c to ta.
+ * i960-dis.c (print_insn_i960): Rename to print_insn_i960_orig.
+ * i960c-asm.c, i960c-dis.c, i960c-opc.c, i960c-opc.h: New files.
+
+Mon Dec 7 14:33:44 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
+
+Sun Dec 6 14:06:48 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips-opc.c (mips_builtin_opcodes): Add dmfc2 and dmtc2.
+
+ * ppc-opc.c (powerpc_opcodes): Add PowerPC403 GC[X] instructions.
+ From Saitoh Masanobu <msaitoh@spa.is.uec.ac.jp>.
+
+Fri Dec 4 17:45:51 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * fr30-opc.c: Regenerate.
+
+Fri Dec 4 17:08:08 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
+
+Thu Dec 3 14:26:20 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
+
+Thu Dec 3 00:09:17 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerate.
+
+1998-11-30 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen-dis.c (hash_insn_array): CGEN_INSN_VALUE ->
+ CGEN_INSN_BASE_VALUE.
+ * m32r-opc.c,m32r-opc.h,m32r-asm.c,m32r-dis.c: Regenerate.
+ * fr30-opc.c,fr30-opc.h,fr30-asm.c,fr30-dis.c: Regenerate.
+
+Thu Nov 26 11:26:32 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c: Regenerated.
+
+Tue Nov 24 11:20:54 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c: Regenerated.
+
+Mon Nov 23 18:28:48 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c,fr30-opc.h: Regenerated.
+
+1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
+
+ * fr30-opc.c: Regenerated.
+
+Thu Nov 19 16:02:46 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c: Regenerated.
+ * fr30-opc.h: Regenerated.
+ * fr30-dis.c: Regenerated.
+ * fr30-asm.c: Regenerated.
+
+Thu Nov 19 07:54:15 1998 Doug Evans <devans@charmed.cygnus.com>
+
+ * mips-opc.c (sync.p,sync.l): Swap insn values.
+
+1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
+
+ * fr30-opc.c: Regenerate.
+
+Wed Nov 18 21:36:37 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c: Regenerated.
+ * fr30-opc.h: Regenerated.
+
+1998-11-18 Doug Evans <devans@casey.cygnus.com>
+
+ * m32r-asm.c,m32r-dis.c,m32r-opc.c: Rebuild.
+ * fr30-asm.c,fr30-dis.c,fr30-opc.c: Rebuild.
+
+Wed Nov 18 11:30:04 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c: Regenerated.
+
+Mon Nov 16 19:21:48 1998 Dave Brolley <brolley@cygnus.com>
+
+ * fr30-opc.c: Regenerated.
+ * fr30-opc.h: Regenerated.
+ * fr30-dis.c: Regenerated.
+ * fr30-asm.c: Regenerated.
+
+Thu Nov 12 19:24:18 1998 Dave Brolley <brolley@cygnus.com>
+
+ * po/opcodes.pot: Regenerated.
+ * fr30-opc.c: Regenerated.
+ * fr30-opc.h: Regenerated.
+ * fr30-dis.c: Regenerated.
+ * fr30-asm.c: Regenerated.
+
+Tue Nov 10 15:26:27 1998 Nick Clifton <nickc@cygnus.com>
+
+ * disassemble.c (disassembler): Add support for FR30 target.
+
+Tue Nov 10 11:00:04 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-dis.c,m32r-opc.c,m32r-opc.h: Rebuild.
+ * fr30-dis.c,fr30-opc.c,fr30-opc.h: Rebuild.
+
+Mon Nov 9 18:22:55 1998 Dave Brolley <brolley@cygnus.com>
+
+ * po/opcodes.pot: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * fr30-opc.c: Regenerate.
+ * fr30-opc.h: Regenerate.
+
+Fri Nov 6 17:21:38 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-asm.c: Regenerate.
+
+Wed Nov 4 18:46:47 1998 Dave Brolley <brolley@cygnus.com>
+
+ * configure.in: Added case for bfd_fr30_arch.
+ * Makefile.am (CFILES): Added fr30-asm.c, fr30-dis.c, fr30-opc.c.
+ (ALL_MACHINES): Added fr30-asm.lo, fr30-dis.lo, fr30-opc.lo.
+ (CLEANFILES): Added stamp-fr30.
+ (FR30_DEPS): Added.
+ * fr30-asm.c: New file.
+ * fr30-dis.c: New file.
+ * fr30-opc.c: New file.
+ * fr30-opc.h: New file.
+ * po/POTFILES.in: Regenerated
+ * po/opcodes.pot: Regenerated
+
+Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: detect cygwin* instead of cygwin32*
+ * configure: regenerate
+
+Tue Oct 27 08:58:37 1998 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips-opc.c (IS_M): Added.
+
+Mon Oct 19 13:03:19 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * m32r-opc.c,m32r-opc.h,m32r-asm.c,m32r-dis.c: Regenerate.
+
+Fri Oct 9 14:01:56 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * m32r-opc.h,m32r-opc.c: Regenerate.
+
+Sun Oct 4 21:01:44 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c (OP_3DNowSuffix): New static function.
+ (OPSUF): Define.
+ (GRP14): Define.
+ (dis386_twobyte): Add GRP14, femms, and 3DNow entries.
+ (twobyte_has_modrm): Set entries corresponding to GRP14, 3DNow.
+ (insn_codep): New static variable.
+ (print_insn_x86): Init insn_codep after prefixes.
+ (grps): Add GRP14 entries for prefetch, prefetchw.
+ (OP_REG): Reformat.
+
+ From Jeff B Epler <jepler@usgs.gov>
+ * i386-dis.c (Suffix3DNow): New table.
+
+Wed Sep 30 10:17:50 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d10v-opc.c: Treat TRAP as if it were a branch type instruction.
+
+Mon Sep 28 14:35:43 1998 Martin M. Hunt <hunt@cygnus.com>
+
+ * d10v-dis.c (print_operand): If num is nonzero, then
+ add OPERAND_ACC1, not OPERAND_ACC0.
+
+Thu Sep 24 09:20:03 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c: Add FLAG_JSR attribute to DBT, REIT, RTD, and TRAP
+ insns.
+
+Tue Sep 22 17:55:14 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c: Add use of EITHER_BUT_PREFER_MU execution unit
+ class.
+
+Tue Sep 15 15:14:45 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-opc.h,m32r-opc.c: Add bbpc,bbpsw support.
+
+1998-09-09 Michael Meissner <meissner@cygnus.com>
+
+ * ppc-opc.c (powerpc_opcodes): Add support for PowerPC 750 move
+ to/from SPRs.
+
+Fri Sep 4 19:42:59 1998 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (print_insn_big_arm): Detect Thumb symbols in elf
+ object files.
+ (print_insn_little_arm): Detect Thumb symbols in elf object
+ files.
+
+Sat Aug 29 22:24:09 1998 Richard Henderson <rth@cygnus.com>
+
+ * alpha-dis.c (print_insn_alpha): Use the machine type to
+ decide which PALcode set to include.
+
+Sun Aug 23 02:16:18 1998 Richard Henderson <rth@cygnus.com>
+
+ * sparc-opc.c (FBRX): Fix typo in ",a,pn %fcc3" case.
+
+Fri Aug 21 16:07:52 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c (d30v_opcode_table): Add FLAG_MUL32 to MAC, MACS,
+ MSUB and MSUBS instructions.
+
+Thu Aug 13 16:23:04 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * ppc-opc.c (powerpc_operands): Omit parens around additions in
+ operand name macros.
+
+Wed Aug 12 14:00:38 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ From Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>:
+ * m68k-opc.c: Correct mulsl and mulul to use q rather than D, a,
+ +, -, and d for ColdFire.
+
+ From Peter Thiemann <thiemann@informatik.uni-tuebingen.de>:
+ * ppc-opc.c (insert_mbe): Handle wrapping bitmasks.
+ (extract_mbe): Likewise.
+
+Wed Aug 12 11:11:34 1998 Jeffrey A Law (law@cygnus.com)
+
+ * m10300-opc.c: Fix typo in udf20 .. udf25 instruction opcodes.
+
+ * m10300-opc.c: First cut at UDF instructions.
+
+Mon Aug 10 14:08:22 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-opc.c: Regenerate (remove semantic descriptions).
+
+Mon Aug 10 12:51:12 1998 Catherine Moore <clm@cygnus.com>
+
+ * arm-dis.c (print_insn_big_arm): Fix indentation.
+ (print_insn_little_arm): Likewise.
+
+Sun Aug 9 20:17:28 1998 Catherine Moore <clm@cygnus.com>
+
+ * arm-dis.c (print_insn_big_arm): Check for thumb symbol
+ attributes.
+ (print_insn_little_arm): Likewise.
+
+Mon Aug 3 12:43:16 1998 Doug Evans <devans@seba.cygnus.com>
+
+ Move all global state data into opcode table struct, and treat
+ opcode table as something that is "opened/closed".
+ * cgen-asm.c (all fns): New first arg of opcode table descriptor.
+ (cgen_asm_init): Delete.
+ (cgen_set_parse_operand_fn): New function.
+ * cgen-dis.c (all fns): New first arg of opcode table descriptor.
+ (cgen_dis_init): Delete.
+ * cgen-opc.c (all fns): New first arg of opcode table descriptor.
+ (cgen_current_{opcode_table_mach,endian}): Delete.
+ * m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
+
+Thu Jul 30 21:41:10 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * d30v-opc.c (d30v_opcode_table): Add new "LKR" flag to some
+ instructions.
+
+Tue Jul 28 11:00:09 1998 Jeffrey A Law (law@cygnus.com)
+
+ * m10300-opc.c: Add entries for "no_match_operands" field in
+ the opcode table.
+
+Fri Jul 24 11:41:37 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-asm.c,m32r-opc.c: Regenerate (-Wall cleanups).
+
+Tue Jul 21 13:41:07 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
+
+Mon Jul 13 14:53:59 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c (ckprefix): Handle fwait specially only when it isn't
+ the first prefix.
+ (dofloat): Correct test for fnstsw. Print `fnstsw %ax' rather
+ than `fnstsw %eax'.
+ (OP_J): Remove unnecessary subtraction when 16-bit displacement
+ will be masked later.
+
+Thu Jul 2 17:11:27 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * m32r-opc.h (CGEN_MIN_INSN_SIZE): New #define.
+
+Wed Jul 1 16:11:16 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
+
+Fri Jun 26 11:08:55 1998 Jeffrey A Law (law@cygnus.com)
+
+ * m10300-dis.c: Only recognize instructions from the currently
+ selected machine.
+ * m10300-opc.c: Add field indicating the particular variant of
+ the mn10300 each instruction is available on.
+
+Fri Jun 26 12:04:21 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: For bfd_vax_arch, build vax-dis.lo.
+ * Makefile.am: Rebuild dependencies.
+ (CFILES): Add vax-dis.c.
+ (ALL_MACHINES): Add vax-dis.lo.
+ * aclocal.m4: Rebuild with current libtool.
+ * configure, Makefile.in: Rebuild.
+
+Fri Jun 26 12:03:20 1998 Klaus Kaempf <kkaempf@progis.de>
+
+ * vax-dis.c: New file, from work by Pauline Middelink
+ <middelin@polyware.iaf.nl>.
+ * disassemble.c (ARCH_vax): Define if ARCH_all.
+ (disassembler): Add case for ARCH_vax.
+ * makefile.vms: Support compilation on vms/vax.
+
+Tue Jun 23 19:42:18 1998 Mark Alexander <marka@cygnus.com>
+
+ * m10200-dis.c (print_insn_mn10200): Fix various non-portabilities
+ related to sign extension and the size of ints.
+
+Tue Jun 23 10:59:26 1998 Jeffrey A Law (law@cygnus.com)
+
+ * m10300-opc.c: Support one operand "asr", "lsr" and "asl"
+ instructions. Support (sp) addressing mode by expanding it into
+ (0,sp).
+
+Sat Jun 20 14:46:20 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * mips-dis.c (_print_insn_mips): Fix argument interchange typo.
+
+Fri Jun 19 09:16:42 1998 Mark Alexander <marka@cygnus.com>
+
+ * m10200-dis.c (print_insn_mn10200): Recognize 'break' pseudo-op.
+
+1998-06-18 Ulrich Drepper <drepper@cygnus.com>
+
+ * i386-dis.c: Add support for fxsave, fxrstor, sysenter and
+ sysexit.
+
+Thu Jun 18 10:22:24 1998 John Metzler <jmetzler@cygnus.com>
+
+ * mips-dis.c (print_insn_little_mips): Previously, instruction
+ printing references the symbol table to determine whether the
+ instruction resides in a block regular instructions or mips16
+ instructions. However, when the disassembler gets used in other
+ environments where the symbol table is not present, we no longer
+ rely in the symbol table, rather, use the low bit of the
+ instructions address to guess. There should be no change for usage
+ of the disassembler in host based programs, gdb, objdump.
+ (print_insn_big_mips): ditto.
+ (print_insn_mips): ditto
+
+Wed Jun 17 21:19:01 1998 Mark Alexander <marka@cygnus.com>
+
+ * m10200-dis.c (print_insn_mn10200): Don't bomb on unknown opcodes.
+
+Wed Jun 17 17:49:23 1998 Jeffrey A Law (law@cygnus.com)
+
+ * m10300-opc.c (mn10300_opcodes): Change opcode for "syscall".
+
+Tue Jun 16 13:10:51 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c (index16): Add '%' to register names. Use ','
+ instead of '+'.
+
+Sat Jun 13 11:33:55 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c: Don't print opcode suffix when we can figure out the
+ size (and gas can!) by register operands, or from the default
+ size.
+ (putop): Handle 'A', 'B', 'L', 'P', 'Q', 'R' macros. Rename 'C'
+ macro to 'E'.
+ (dis386, dis386_twobyte, grps): Use new suffix macros.
+ (dis386): Correct imul Ib to imul sIb. Change jnl to jge to be
+ consistent. Add suffix for call, jmp, lcall, ljmp, iret. Reverse
+ order of cmps operands to agree with Intel docs. Correct operand
+ of aad and aam (Ib -> sIb). Change ud2b from 0fb8 to 0fb9 to
+ agree with Intel docs.
+ (print_insn_x86): Print orphan fwait before other prefixes.
+ Return correct byte count for orphan fwait with prefixes. Don't
+ print `bound' operands in reverse order.
+ (ckprefix): Stop accumulating prefixes if we get fwait.
+ (OP_DIR): Print `$' before Ap operands of ljmp, lcall.
+
+Fri Jun 12 13:40:38 1998 Tom Tromey <tromey@cygnus.com>
+
+ * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
+ ($(PACKAGE).pot): Unconditionally depend on POTFILES.
+
+Fri Jun 12 11:04:06 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ Fix problems when bfd_vma is wider than long.
+ * i386-dis.c: Make op_address and start_pc unsigned.
+ (set_op): Make parameter unsigned.
+ (print_insn_x86): Cast to bfd_vma when passing a value to
+ print_address_func.
+ * ns32k-dis.c (CORE_ADDR): Don't define.
+ (print_insn_ns32k): Change type of addr to bfd_vma. Use
+ bfd_scan_vma to read back address.
+ (print_insn_arg): Change type of addr to bfd_vma. Use sprintf_vma
+ to format it.
+ * m68k-dis.c (COERCE32): Cast to bfd_signed_vma to avoid overflow.
+ (NEXTULONG): New definition.
+ (print_insn_m68k): Avoid overflow when computing third argument of
+ print_insn_arg.
+ (print_insn_arg): Use NEXTULONG to fetch 32 bit address values.
+ Use disp instead of val to store offset values.
+ (print_indexed): Use base_disp instead of word to store base
+ displacement, to avoid overflow.
+ * m10300-dis.c (disassemble): Cast value to long when computing
+ pc-relative address, to get correct sign extension.
+
+Wed Jun 10 15:58:37 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-opc.c: Regenerate.
+
+Tue Jun 9 14:27:57 1998 Nick Clifton <nickc@cygnus.com>
+
+ * arm-opc.h (thumb_opcodes): Display 'add rx, rY, #0' insns as
+ 'mov rX, rY'. Patch courtesy of Tony Thompson <Tony.Thompson@arm.com>
+
+Mon Jun 8 18:17:21 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c: Remove FALG_MUL32 attribyte from MULX2H insn.
+
+Fri Jun 5 23:47:55 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386-dis.c: Combine aflag and dflag into sizeflag. Change OP_*
+ functions to void.
+ (OP_DSreg): Rename from OP_DSSI.
+ (OP_ESreg): Rename from OP_ESDI.
+ (Xb, Xv, Yb, Yv): Use index reg code, not b_mode or v_mode.
+ (DSBX): Define.
+ (append_seg): Rename from append_prefix.
+ (ptr_reg): New function.
+ (dis386): Add S suffix to pushf, popf, ret, lret, enter, leave.
+ Add DSBX for xlat.
+ (PREFIX_ADDR): Rename from PREFIX_ADR.
+ (float_reg): Add non-broken opcodes for people who don't want
+ UNIXWARE_COMPAT.
+
+Fri Jun 5 19:15:04 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * m68k-opc.c (tstb, tstw, tstl): Don't allow pcrel on
+ 68000/68008/68010.
+
+Wed Jun 3 18:56:22 1998 H.J. Lu <hjl@gnu.org>
+
+ * i386-dis.c (dis386): Change 0x60 to "pushaS", 0x61 to "popaS".
+
+Tue Jun 2 15:06:46 1998 Geoff Keating <geoffk@ozemail.com.au>
+
+ * ppc-opc.c (powerpc_macros): Support shifts and rotates of size
+ 0; produce error message for shifts of size 32 (or 64 for 64-bit
+ shifts), because the hardware doesn't support them.
+
+Wed May 27 15:29:13 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c: Add new operand: Ra3. Change SHORT_B3, SHORT_B3b,
+ LONG_2, LONG_2b formats to use this new operand.
+
+Tue May 26 20:47:48 1998 Stan Cox <scox@cygnus.com>
+
+ * sparc-dis.c (compute_arch_mask): Added bfd_mach_sparc_sparclite_le.
+
+Tue May 26 20:45:33 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc-dis.c (print_insn_sparc): big endian instruction / little
+ endian data support.
+
+Tue May 26 16:14:39 1998 Nick Clifton <nickc@cygnus.com>
+
+ * d30v-opc.c (d30v_format_table): Change definition of SHORT_B3
+ and SHORT_B3b formats to use Rb instead of Ra.
+
+ Add FLAG_MUL16 to MUL2XH opcode.
+
+ Add FLAG_ADDSUBppp to SRC and SATHp opcodes to implement extension
+ to existing 1.1.1 parallelisation prohibition procedure.
+
+Fri May 22 16:00:00 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-asm.c,m32r-dis.c: Regenerate.
+
+Tue May 19 17:36:08 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips-dis.c (print_mips16_insn_arg): Handle type ']' correctly
+ with a shift count of 0.
+
+Fri May 15 14:58:31 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen-opc.c (cgen_hw_lookup_by_name): Renamed from cgen_hw_lookup.
+ (cgen_hw_lookup_by_num): New function.
+
+Wed May 13 17:03:59 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-asm.c: Regenerate (handle uppercase HIGH/SHIGH/LOW/SDA).
+
+Wed May 13 14:34:31 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc-dis.c (print_insn_sparc): Always fetch instructions
+ as big-endian on SPARClite.
+
+Tue May 12 11:46:31 1998 Richard Henderson <rth@cygnus.com>
+
+ * d30v-opc.c (pre_defined_register): Remove alias for r0.
+
+Sun May 10 22:37:22 1998 Jeffrey A Law (law@cygnus.com)
+
+ * po/Make-in (install-info): New target.
+
+Thu May 7 17:15:59 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
+ * configure: Rebuild.
+
+Thu May 7 12:49:46 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * mips-opc.c (teq,tge,tgeu,tlt,tltu,tne): Added three-operand
+ variety of ISA2 instructions to set bottom ten bits of trap code.
+
+Thu May 7 11:54:25 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (config.status): Add explicit target so that
+ config.status depends upon bfd/configure.in.
+ * Makefile.in: Rebuild.
+
+Thu May 7 09:33:02 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * mips-opc.c (break, sdbbp): Added two-operand variety of ISA1
+ instructions to set bottom ten bits of break code.
+ * mips-dis.c (print_insn_arg): Implement 'q' operand format used
+ for above optional argument.
+
+Wed May 6 15:30:06 1998 Klaus Kaempf <kkaempf@progis.de>
+
+ * makefile.vms: Run dec c with /nodebug.
+
+Mon May 4 10:19:57 1998 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in: Rebuilt.
+ * Makefile.am: Regenerated dependencies with mkdep.
+
+ * opintl.h (_): Define as dgettext.
+
+Tue Apr 28 14:12:12 1998 Nick Clifton <nickc@cygnus.com>
+
+ * cgen-asm.c: Internationalised.
+ * m32r-asm.c: Internationalised.
+ * m32r-dis.c: Internationalised.
+ * m32r-opc.c: Internationalised.
+
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+ * Makefile.am (POTFILES): Remove inclusion of BFD_H.
+ * Makefile.in: Rebuild.
+ * po/POTFILES.in: Rebuilt using rule in Makefile.in.
+ * po/opcodes.pot: Rebuilt after changing POTFILES.in.
+
+Tue Apr 28 13:13:13 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Call AC_ISC_POSIX near start. Move CY_GNU_GETTEXT
+ after AC_PROG_CC.
+ * aclocal.m4, configure: Rebuild with current tools.
+
+Mon Apr 27 14:31:00 1998 Nick Clifton <nickc@cygnus.com>
+
+ * opintl.h: New file - contains internationalisation macros used
+ by source files in this directory.
+ * po/: New subdirectory - contains internationalisation files.
+ * po/Make-in: New file - Makefile constructor.
+ * po/POTFILES.in: New file - list of files in opcodes directory
+ that should be scan for internationalisation macros.
+ * po/opcodes.pot: New file - list of internationisation strings
+ found in files mentioned in po/POTFILES.in.
+ * Makefile.am: Add rule to build po/POTFILES.in. Add SUBDIRS
+ entry. Add intl directory to include paths.
+ * acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETEXT,
+ HAVE_STRCPY, HAVE_LC_MESSAGES
+ * configure.in: Add rule to build Makefile in po subdirectory.
+ * Makefile.in: Rebuilt.
+ * aclocal.m4: Rebuilt.
+ * config.in: Rebuilt.
+ * configure: Rebuilt.
+ * alpha-opc.c: Internationalised.
+ * arc-dis.c: Internationalised.
+ * arc-opc.c: Internationalised.
+ * arm-dis.c: Internationalised.
+ * cgen-asm.c: Internationalised.
+ * d30v-dis.c: Internationalised.
+ * dis-buf.c: Internationalised.
+ * h8300-dis.c: Internationalised.
+ * h8500-dis.c: Internationalised.
+ * i386-dis.c: Internationalised.
+ * m10200-dis.c: Internationalised.
+ * m10300-dis.c: Internationalised.
+ * m68k-dis.c: Internationalised.
+ * m88k-dis.c: Internationalised.
+ * mips-dis.c: Internationalised.
+ * ns32k-dis.c: Internationalised.
+ * opintl.h: Internationalised.
+ * ppc-opc.c: Internationalised.
+ * sparc-dis.c: Internationalised.
+ * v850-dis.c: Internationalised.
+ * v850-opc.c: Internationalised.
+
+Mon Apr 27 10:33:56 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * cgen-asm.c (cgen_current_opcode_table): Renamed from ..._data.
+ (asm_hash_table_entries): New variable.
+ (cgen_asm_init): Free asm_hash_table_entries.
+ (hash_insn_array,hash_insn_list): New functions.
+ (build_asm_hash_table): Use them. Hash macro insns as well.
+ (cgen_asm_lookup_insn): Update.
+ * cgen_dis.c (cgen_current_opcode_table): Renamed from ..._data.
+ (dis_hash_table_entries): New variable.
+ (cgen_dis_init): Free dis_hash_table_entries.
+ (hash_insn_array,hash_insn_list): New functions.
+ (build_dis_hash_table): Use them. Hash macro insns as well.
+ (cgen_dis_lookup_insn): Update.
+ * cgen-opc.c (cgen_current_opcode_table): Renamed from ..._data.
+ (cgen_set_cpu,cgen_hw_lookup,cgen_insn_count): Update.
+ (cgen_macro_insn_count): New function.
+ * m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
+
Fri Apr 24 16:07:57 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
* i386-dis.c (OP_DSSI): Print segment override.
-Tue Apr 21 16:31:51 1998 Ian Lance Taylor <ian@cygnus.com>
+Mon Apr 13 16:59:39 1998 Nick Clifton <nickc@cygnus.com>
+
+ * arm-dis.c (print_insn_arm): Add "_all" extension to 'C'
+ operator.
- * mips-dis.c (print_insn_arg): Restore accidentally lost code.
+Mon Apr 13 16:50:27 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (libopcodes_la_LIBADD): Add @WIN32LIBADD@.
+ (libopcodes_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 18:14:31 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r-opc.c: Regenerate.
Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
@@ -12,15 +1630,32 @@ Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
before trying to copy it.
* Makefile.in: Rebuild.
-Tue Mar 31 11:09:08 1998 Ian Lance Taylor <ian@cygnus.com>
+Thu Apr 2 17:25:49 1998 Nick Clifton <nickc@cygnus.com>
- * Makefile.am: Rebuild dependencies.
- * Makefile.in: Rebuild.
+ * m32r-opc.c: Use signed immediate values for CMPUI instruction.
+
+Wed Apr 1 16:20:27 1998 Ian Dall <Ian.Dall@dsto.defence.gov.au>
+
+ * ns32k-dis.c (bit_extract_simple): New function to extract bits
+ from an arbitrary valid buffer instead of fetching them on demand
+ using fetch_data().
+ (invalid_float): use bit_extract_simple() instead of bit_extract().
+
+Tue Mar 31 11:09:08 1998 Ian Lance Taylor <ian@cygnus.com>
From H.J. Lu <hjl@gnu.org>:
* i386-dis.c (dis386): Change 0x8c and 0x8e to movS, and change Ew
to Ev for both.
+Mon Mar 30 17:32:03 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Branched binutils 2.9.
+
+Mon Mar 30 15:18:00 1998 Ken Raeburn <raeburn@cygnus.com>
+
+ * d30v-dis.c (print_insn_d30v): Don't use uninitialized "num" when
+ disassembling last 4 bytes of a section.
+
Fri Mar 27 18:08:13 1998 Ian Lance Taylor <ian@cygnus.com>
Fix some gcc -Wall warnings:
@@ -34,12 +1669,17 @@ Fri Mar 27 18:08:13 1998 Ian Lance Taylor <ian@cygnus.com>
* cgen-dis.c (build_dis_hash_table): Remove used local variables.
* cgen-opc.c (cgen_keyword_search_next): Likewise.
* d10v-dis.c (dis_long, dis_2_short): Likewise.
+ * d30v-dis.c (print_insn_d30v, lookup_opcode): Likewise.
* ns32k-dis.c (bit_extract, print_insn_ns32k): Likewise.
+ * tic80-dis.c (print_one_instruction): Likewise.
* w65-dis.c (print_operand): Likewise.
* z8k-dis.c (fetch_data): Likewise.
* a29k-dis.c: Add return type for find_byte_func_type.
* arc-opc.c: Include <stdio.h>. Remove declarations of
insert_multshift and extract_multshift.
+ * d30v-dis.c (lookup_opcode): Parenthesize assignments in
+ conditionals.
+ (extract_value): Fully parenthesize expression.
* h8500-dis.c (print_insn_h8500): Initialize local variables.
* h8500-opc.h (h8500_table): Fully bracket initializer.
* w65-opc.h (optable): Likewise.
@@ -106,7 +1746,7 @@ Thu Mar 19 15:46:53 1998 Nick Clifton <nickc@cygnus.com>
These patches are courtesy of Jonathan Walton and Tony Thompson
(athompso@cambridge.arm.com).
-
+
* arm-dis.c (print_insn_thumb): Ignore bottom two bits of PC
relative addresses.
@@ -121,15 +1761,6 @@ Wed Mar 4 12:08:14 1998 Doug Evans <devans@canuck.cygnus.com>
* m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
-Tue Mar 3 18:51:22 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen-asm.in: Move insertion of generated routines to top of file.
- (insert_normal): Add prototype. Delete `shift' arg.
- * cgen-dis.in: Move insertion of generated routines to top of file.
- (extract_normal): Add prototype. Delete `shift' arg.
- (print_normal): Add prototype. Call CGEN_PRINT_NORMAL if defined.
- (print_keyword): Add prototype. Fix type of `attrs' arg.
-
Sat Feb 28 16:02:34 1998 Nick Clifton <nickc@cygnus.com>
* arm-dis.c (print_insn_big_arm, print_insn_little_arm): Do not
@@ -140,6 +1771,11 @@ Sat Feb 28 12:19:05 1998 Richard Henderson <rth@cygnus.com>
* alpha-opc.c (cvtqs) There is no such thing.
(cvttq): Missing most of the /*d variants.
+Thu Feb 26 15:53:09 1998 Michael Meissner <meissner@cygnus.com>
+
+ * d30v-opc.c (d30v_opcode_table): Indicate which instructions are
+ delayed branches or jumps.
+
Tue Feb 24 10:46:44 1998 Doug Evans <devans@canuck.cygnus.com>
* arm-dis.c (print_insn_{big,little}_arm): info->symbol changed
@@ -155,8 +1791,7 @@ Tue Feb 24 11:06:18 1998 Nick Clifton <nickc@cygnus.com>
Mon Feb 23 13:16:17 1998 Doug Evans <devans@seba.cygnus.com>
* cgen-asm.c: Include symcat.h.
- * cgen-dis.c,cgen-opc.c,cgen-asm.in,cgen-dis.in: Ditto.
-
+ * cgen-dis.c,cgen-opc.c: Ditto.
* m32r-asm.c,m32r-dis.c,m32r-opc.h,m32r-opc.c: Regenerate.
Mon Feb 23 10:34:58 1998 Jeffrey A Law (law@cygnus.com)
@@ -169,20 +1804,12 @@ Thu Feb 19 16:51:13 1998 Doug Evans <devans@canuck.cygnus.com>
Tue Feb 17 17:14:50 1998 Doug Evans <devans@seba.cygnus.com>
- * Makefile.am (CGENFILES): Update.
- * Makefile.in: Regenerate.
- * cgen-asm.in (insert_normal): Result is error message now.
- Validate value to be inserted.
- (insert_insn_normal): Result is error message now.
- (@arch@_cgen_assemble_insn): Update.
* cgen-asm.c (cgen_parse_{signed,unsigned}_integer): Delete min,max
arguments. Don't perform validation here.
* m32r-asm.c,m32r-dis.c,m32r-opc.c: Regenerate.
Fri Feb 13 14:26:06 1998 Doug Evans <devans@canuck.cygnus.com>
- * cgen-opc.in (@arch@_cgen_get_insn_operands): Handle empty
- operand instance list.
* m32r-opc.c: Regenerate.
Fri Feb 13 14:53:02 1998 Ian Lance Taylor <ian@cygnus.com>
@@ -205,14 +1832,11 @@ Fri Feb 13 13:12:14 1998 Ian Lance Taylor <ian@cygnus.com>
Fri Feb 13 09:50:32 1998 Nick Clifton <nickc@cygnus.com>
- * m32r-opc.c: Regenerate.
- * m32r-opc.h: Regenerate.
+ * m32r-opc.c: Regenerate.
+ * m32r-opc.h: Regenerate.
Thu Feb 12 11:01:40 1998 Doug Evans <devans@canuck.cygnus.com>
- * cgen-opc.in (@arch@_cgen_lookup_insn): New argument alias_p.
- Ignore ALIAS insns if asked to.
- (@arch@_cgen_get_insn_operands): Pass 0 for alias_p, NULL for insn.
* m32r-opc.c: Regenerate.
Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
@@ -225,23 +1849,19 @@ Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
Wed Feb 11 18:58:34 1998 Doug Evans <devans@seba.cygnus.com>
- * cgen-opc.in: New file.
- * cgen.sh: Translate @ARCH@. Cat cgen-opc.in into @arch@-opc.c.
- * Makefile.am (CGENFILES): Add cgen-opc.in.
- * Makefile.in: Regenerate.
-
* cgen-opc.c (cgen_set_cpu): Delete init of hw list `next' chain.
(cgen_hw_lookup): Make result const.
-
- * cgen-dis.in (*): Use PTR instead of void *.
- (print_insn): Delete unused vars `i', `syntax'.
-
* m32r-opc.h, m32r-opc.c, m32r-asm.c, m32r-dis.c: Regenerate.
Sat Feb 7 15:30:27 1998 Ian Lance Taylor <ian@cygnus.com>
* configure, aclocal.m4: Rebuild with new libtool.
+Thu Feb 5 17:56:10 1998 Michael Meissner <meissner@cygnus.com>
+
+ * d30v-opc.c (repeat{,i} instructions): Repeat/repeati
+ instructions use a PC relative branch, not absolute.
+
Wed Feb 4 19:17:37 1998 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Set libtool_enable_shared rather than
@@ -309,6 +1929,17 @@ Wed Dec 17 11:38:29 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
* m68k-opc.c (halt, pulse): Enable them on the 68060.
+Tue Dec 16 15:22:53 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_opcodes): Revert change that put the 32 bit
+ PC relative offset forms before the 15 bit forms. An assembler command
+ line option now chooses the default.
+
+Tue Dec 16 15:22:51 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v-opc.c (d30v_opcode_table): Set new flags bits
+ FLAG_{2WORD,MUL{16,32},ADDSUBppp}, in appropriate instructions.
+
1997-12-15 Brendan Kehoe <brendan@lisa.cygnus.com>
* configure: Only build libopcodes shared if --enable-shared's value
@@ -318,6 +1949,12 @@ Wed Dec 17 11:38:29 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
original source of this bit of code. It's not clear what the best fix
would be, though.
+Fri Dec 12 11:57:04 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (OFF_SL_PC, OFF_SL_BR): Minor formatting change.
+ (tic80_opcodes): Reorder table entries to put the 32 bit PC relative
+ offset forms before the 15 bit forms, to default to the long forms.
+
Fri Dec 12 01:32:30 1997 Richard Henderson <rth@cygnus.com>
* alpha-opc.c (cvttq/*u*): Remove, as that suffix is invalid.
@@ -327,12 +1964,12 @@ Wed Dec 10 17:42:35 1997 Nick Clifton <nickc@cygnus.com>
* arm-dis.c (print_insn_little_arm): Prevent examination of stored
symbol if none is present.
(print_insn_big_arm): Prevent examination of stored symbol if
- none is present.
+ none is present.
Thu Oct 23 21:13:37 1997 Fred Fish <fnf@cygnus.com>
-
+
* d10v-opc.c (d10v_opcodes): Correct entry for RTE.
-
+
Mon Dec 8 11:21:07 1997 Nick Clifton <nickc@cygnus.com>
* disassemble.c: Remove disasm_symaddr() function.
@@ -364,11 +2001,11 @@ Mon Dec 1 11:56:50 1997 Ian Lance Taylor <ian@cygnus.com>
* m68k-dis.c (print_insn_m68k): Handle special case of lpstop,
which has a two word opcode with a one word argument.
-Wed Nov 19 17:42:35 1997 Richard Henderson <rth@cygnus.com>
+Sun Nov 23 22:25:21 1997 Michael Meissner <meissner@cygnus.com>
- * sh-dis.c (print_insn_shx): Recognize all sh4 additions.
- * sh-opc.h (fmov): Add @<REG_M>+,<DX_REG_N> variant for sh4.
- (ftrv): Slay the cut-and-paste monster.
+ * d30v-opc.c (d30v_opcode_table, case cmpu): Immediate field is
+ unsigned, not signed.
+ (d30v_format_table): Add SHORT_CMPU cases for cmpu.
Tue Nov 18 23:10:03 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
@@ -400,6 +2037,11 @@ Tue Oct 28 17:59:32 1997 Ken Raeburn <raeburn@cygnus.com>
* mips-opc.c (ffc, ffs): Fix mask.
+Tue Oct 28 16:34:54 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v-opc.c (pre_defined_registers): Add eit_vb, int_s, and int_m
+ control registers.
+
Mon Oct 27 22:34:03 1997 Ken Raeburn <raeburn@cygnus.com>
* mips-opc.c: Fix bug in mask for "not" pseudo-instruction.
@@ -463,6 +2105,11 @@ Fri Oct 3 17:26:54 1997 Ian Lance Taylor <ian@cygnus.com>
values, rather than assuming that short is 16 bits.
(OP_sI, OP_J, OP_DIR): Likewise.
+Thu Oct 2 13:36:45 1997 Nick Clifton <nickc@cygnus.com>
+
+ * v850-dis.c (v850_sreg_names): Use symbolic names for higher
+ system registers.
+
Wed Oct 1 16:58:54 1997 Nick Clifton <nickc@cygnus.com>
* v850-opc.c: Fix typo in comment.
@@ -494,13 +2141,21 @@ Wed Sep 24 11:29:35 1997 Ian Lance Taylor <ian@cygnus.com>
* aclocal.m4: Rebuild with new libtool.
* configure: Rebuild.
+Fri Sep 19 11:45:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * v850-opc.c ("cmov"): Order reg param r1, r2 not r2, r2.
+
Thu Sep 18 11:21:43 1997 Doug Evans <dje@canuck.cygnus.com>
* sparc-opc.c (sparclet_cpreg_table): Add %ccsr2, %cccrr, %ccrstr.
Tue Sep 16 15:18:20 1997 Nick Clifton <nickc@cygnus.com>
- * v850-opc.c (v850_opcodes): Further rearrangements.
+ * v850-opc.c (v850_opcodes): Further rearrangements.
+
+Tue Sep 16 16:12:11 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ * d30v-opc.c (rot2h, sra2h, srl2h insns): Revert last change.
Tue Sep 16 09:48:50 1997 Nick Clifton <nickc@cygnus.com>
@@ -515,6 +2170,60 @@ Mon Sep 15 18:31:52 1997 Nick Clifton <nickc@cygnus.com>
* v850-opc.c: Initialise processors field of v850_opcode structure.
+Wed Aug 27 21:42:39 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ Merge changes from Martin Hunt:
+
+ * d30v-opc.c: Change mvfacc to accept 6-bit unsigned values.
+
+ * d30v-opc.c (pre_defined_registers): Add control registers from 0-63.
+ (d30v_opcode_tabel): Add dbt, rtd, srah, and srlh instructions. Fix
+ rot2h, sra2h, and srl2h to use new SHORT_A5S format.
+
+ * d30v-dis.c (print_insn): Fix disassembly of SHORT_D2 opcodes.
+
+ * d30v-dis.c (print_insn): First operand of d*i (delayed
+ branch) instructions is relative.
+
+ * d30v-opc.c (d30v_opcode_table): Change form for repeati.
+ (d30v_operand_table): Add IMM6S3 type.
+ (d30v_format_table): Change SHORT_D2. Add LONG_Db.
+
+ * d30v-dis.c: Fix bug with ".s" and ".l" extensions
+ and cmp instructions.
+
+ * d30v-opc.c: Correct entries for repeat*, and sat*.
+ Make IMM5 unsigned. Create IMM6U and IMM12S3U operand
+ types. Correct several formats.
+
+ * d30v-opc.c: (pre_defined_registers): Add dpsw and dpc.
+
+ * d30v-opc.c (pre_defined_registers): Change control registers.
+
+ * d30v-opc.c (d30v_format_table): Correct SHORT_C1 and
+ SHORT_C2. Manual was incorrect.
+
+ * d30v-dis.c (lookup_opcode): Return value now indicates
+ if an opcode has a short and a long form. Used for deciding
+ to append a ".s" or ".l".
+ (print_insn): Append a ".s" to an instruction if it is
+ the short form and ".l" if it is a long form. Do not append
+ anything if the instruction has only one possible size.
+
+ * d30v-opc.c: Change mulx2h to require an even register.
+ New form: SHORT_A2; a SHORT_A form that needs an even
+ register as the first operand.
+
+ * d30v-dis.c (print_insn_d30v): Fix problem where the last
+ instruction was not being disassembled if there were an odd
+ number of instructions.
+
+ * d30v-opc.c (SHORT_M2, LONG_M2): Two new forms.
+
+Fri Sep 12 11:43:54 1997 Nick Clifton <nickc@cygnus.com>
+
+ * v850-dis.c (disassemble): Improved display of register lists.
+
Thu Sep 11 17:35:10 1997 Doug Evans <dje@canuck.cygnus.com>
* sparc-opc.c (sparc_opcodes): Fix assembler args to
@@ -564,19 +2273,29 @@ Fri Aug 22 10:35:15 1997 Nick Clifton <nickc@cygnus.com>
* v850-opc.c (v850_opcodes[]): Add NOT_R0 flag to decect cases
where r0 is being used as a destination register.
+Thu Aug 21 11:09:09 1997 Nick Clifton <nickc@cygnus.com>
-Wed Aug 20 00:43:11 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh-opc.h (sh_arg_type): Add A_SGR and A_DBR.
- (sh_nibble_type, sh_arg_type): Add SH4 floating point extensions.
- (sh_table): Likewise. Add movca.l, ocbi, ocbp, ocbwb.
- Add insns to access SGR and DBR.
- * sh-dis.c (print_insn_shx): Add SH4 floating point extensions.
+ * v850-opc.c (v850_opcodes[]): Move divh opcodes next to each other.
Tue Aug 19 10:59:59 1997 Richard Henderson <rth@cygnus.com>
* alpha-opc.c (alpha_opcodes): Fix hw_rei_stall mungage.
+Mon Aug 18 11:10:03 1997 Nick Clifton <nickc@cygnus.com>
+
+ * v850-opc.c (v850_opcodes[]): Remove use of flag field.
+ * v850-opc.c (v850_opcodes[]): Add support for reversed short load
+ opcodes..
+
+Mon Aug 18 11:08:25 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure (cgen_files): Add support for v850e target.
+ * configure.in (cgen_files): Add support for v850e target.
+
+Mon Aug 18 11:08:25 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure (cgen_files): Add support for v850ea target.
+ * configure.in (cgen_files): Add support for v850ea target.
Fri Aug 15 05:17:48 1997 Doug Evans <dje@canuck.cygnus.com>
@@ -590,7 +2309,18 @@ Fri Aug 15 05:17:48 1997 Doug Evans <dje@canuck.cygnus.com>
Wed Aug 13 18:52:11 1997 Nick Clifton <nickc@cygnus.com>
-
+ * v850-dis.c (disassemble): Add support for v850EA instructions.
+
+ * v850-opc.c (insert_i5div, extract_i5div): New Functions.
+ (v850_opcodes): Add v850EA instructions.
+
+ * v850-dis.c (disassemble): Add support for v850E instructions.
+
+ * v850-opc.c (insert_d5_4, extract_d5_4, insert_d16_16,
+ extract_d16_16, insert_i9, extract_i9, insert_u9, extract_u9,
+ insert_spe, extract_spe): New Functions.
+ (v850_opcodes): Add v850E instructions.
+
* v850-opc.c: Reorganised and re-layed out to improve readability
and portability.
@@ -659,7 +2389,7 @@ Wed Jun 25 15:25:57 1997 Felix Lee <flee@cirdan.cygnus.com>
negating it.
(UNUSED): remove one level of parens, so MSVC doesn't choke on
nesting depth when all the macros are expanded.
-
+
Tue Jun 17 17:02:17 1997 Ian Lance Taylor <ian@cygnus.com>
* sparc-opc.c: The fcmp v9a instructions take an integer register
@@ -718,7 +2448,7 @@ Thu May 22 14:06:02 1997 Doug Evans <dje@canuck.cygnus.com>
Tue May 20 11:26:27 1997 Gavin Koch <gavin@cygnus.com>
- * mips-opc.c (mips_builtin_opcodes): Moved INSN_ISA field into new
+ * mips-opc.c (mips_builtin_opcodes): Moved INSN_ISA field into new
field membership.
* mips16-opc.c (mip16_opcodes): same.
@@ -866,6 +2596,11 @@ Mon Mar 24 13:22:13 1997 Ian Lance Taylor <ian@cygnus.com>
* mips-opc.c: Add dctr and dctw.
+Sun Mar 23 18:08:10 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * d30v-dis.c (print_insn): Change the way signed constants
+ are displayed.
+
Fri Mar 21 14:37:52 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (BFD_H): New variable.
@@ -888,7 +2623,7 @@ Mon Mar 17 08:48:03 1997 J.T. Conklin <jtc@beauty.cygnus.com>
* m68k-opc.c (m68k_opcodes): Provide correct entries for mulsl and
mulul insns on the coldfire.
-
+
Sat Mar 15 17:13:05 1997 Ian Lance Taylor <ian@cygnus.com>
* arm-dis.c (print_insn_arm): Don't print instruction bytes.
@@ -936,11 +2671,19 @@ Mon Mar 3 07:45:20 1997 J.T. Conklin <jtc@cygnus.com>
* m68k-opc.c (m68k_opcodes): Added entries for the tst insns on
the mc68000.
-
+
Thu Feb 27 14:04:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* m68k-opc.c (m68k_opcodes): Added swbegl pseudo-instruction.
+Thu Feb 27 11:36:41 1997 Michael Meissner <meissner@cygnus.com>
+
+ * tic80-dis.c (print_insn_tic80): Set info->bytes_per_line to 8.
+
+Wed Feb 26 15:34:48 1997 Michael Meissner <meissner@cygnus.com>
+
+ * tic80-opc.c (tic80_predefined_symbols): Define r25 properly.
+
Wed Feb 26 13:38:30 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68k-dis.c (NEXTSINGLE, NEXTDOUBLE, NEXTEXTEND): Use
@@ -955,21 +2698,67 @@ Mon Feb 24 19:26:12 1997 Dawn Perchik <dawn@cygnus.com>
Mon Feb 24 15:19:01 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
- * d10v-dis.c, d10v-opc.c: Change pre_defined_registers to
+ * d10v-dis.c, d10v-opc.c: Change pre_defined_registers to
d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
+Mon Feb 24 14:33:26 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (LSI_SCALED): Renamed from this ...
+ (OFF_SL_BR_SCALED): ... to this, and added the flag
+ TIC80_OPERAND_BASEREL to the flags word.
+ (tic80_opcodes): Replace all occurances of LSI_SCALED with
+ OFF_SL_BR_SCALED.
+
Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
* mips-opc.c: Add macros for cop0, cop1 cop2 and cop3.
- Change mips_opcodes from const array to a pointer,
+ Change mips_opcodes from const array to a pointer,
and change bfd_mips_num_opcodes from const int to int,
- so that we can increase the size of the mips opcodes table
+ so that we can increase the size of the mips opcodes table
dynamically.
+Sat Feb 22 21:03:47 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_predefined_symbols): Revert change to
+ store BITNUM values in the table in one's complement form
+ to match behavior when assembler is given a raw numeric
+ value for a BITNUM operand.
+ * tic80-dis.c (print_operand_bitnum): Ditto.
+
+Fri Feb 21 16:31:18 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * d30v-opc.c: Removed references to FLAG_X.
+
Wed Feb 19 14:51:20 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in: Add dependencies on ../bfd/bfd.h as required.
+Tue Feb 18 17:43:43 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+
+ * Makefile.in: Added d30v object files.
+ * configure: (bfd_d30v_arch) Rebuilt.
+ * configure.in: (bfd_d30v_arch) Added new case.
+ * d30v-dis.c: New file.
+ * d30v-opc.c: New file.
+ * disassemble.c (disassembler) Add entry for d30v.
+
+Tue Feb 18 16:32:08 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_predefined_symbols): Add symbolic
+ representations for the floating point BITNUM values.
+
+Fri Feb 14 12:14:05 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_predefined_symbols): Store BITNUM values
+ in the table in one's complement form, as they appear in the
+ actual instruction.
+ (tic80_symbol_to_value): Use macros to access predefined
+ symbol fields.
+ (tic80_value_to_symbol): Ditto.
+ (tic80_next_predefined_symbol): New function.
+ * tic80-dis.c (print_operand_bitnum): Remove code that did
+ one's complement for BITNUM values.
+
Thu Feb 13 21:56:51 1997 Klaus Kaempf <kkaempf@progis.de>
* makefile.vms: Remove 8 bit characters. Update to latest
@@ -995,12 +2784,36 @@ Wed Feb 12 12:27:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
* m68k-dis.c (print_insn_m68k): Set bytes_per_chunk and
bytes_per_line.
+Tue Feb 11 16:36:31 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_operands): Fix typo '+' -> '|'.
+ (tic80_opcodes): Sort entries so that long immediate forms
+ come after short immediate forms, making it easier for
+ assembler to select the right one for a given operand.
+
Tue Feb 11 15:26:47 1997 Ian Lance Taylor <ian@cygnus.com>
* mips-dis.c (_print_insn_mips): Set bytes_per_chunk and
display_endian.
(print_insn_mips16): Likewise.
+Mon Feb 10 10:12:41 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_symbol_to_value): Changed to accept
+ a symbol class that restricts translation to just that
+ class (general register, condition code, etc).
+
+Thu Feb 6 17:34:09 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_operands): Add REG_0_E, REG_22_E,
+ and REG_DEST_E for register operands that have to be
+ an even numbered register. Add REG_FPA for operands that
+ are one of the floating point accumulator registers.
+ Add TIC80_OPERAND_MASK to flags for ENDMASK operand.
+ (tic80_opcodes): Change entries that need even numbered
+ register operands to use the new operand table entries.
+ Add "or" entries that are identical to "or.tt" entries.
+
Wed Feb 5 11:12:44 1997 Ian Lance Taylor <ian@cygnus.com>
* mips16-opc.c: Add new cases of exit instruction for
@@ -1009,6 +2822,17 @@ Wed Feb 5 11:12:44 1997 Ian Lance Taylor <ian@cygnus.com>
registers in operands of exit instruction. Print `$' before
register names in operands of entry and exit instructions.
+Thu Jan 30 14:09:03 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_predefined_symbols): Table of name/value
+ pairs for all predefined symbols recognized by the assembler.
+ Also used by the disassembling routines.
+ (tic80_symbol_to_value): New function.
+ (tic80_value_to_symbol): New function.
+ * tic80-dis.c (print_operand_control_register,
+ print_operand_condition_code, print_operand_bitnum):
+ Remove private tables and use tic80_value_to_symbol function.
+
Thu Jan 30 11:30:45 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-dis.c (print_operand): Change address printing
@@ -1032,36 +2856,155 @@ Fri Jan 24 12:08:21 1997 J.T. Conklin <jtc@cygnus.com>
* m68k-opc.c (m68k_opcodes): Changed operand specifier for the
coldfire moveb instruction to not allow an address register as
destination. Although the documentation does not indicate that
- this is invalid, experiments uncovered unexpected behavior.
+ this is invalid, experiments uncovered unexpected behavior.
Added a comment explaining the situation. Thanks to Andreas
Schwab for pointing this out to me.
+Wed Jan 22 20:13:51 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_opcodes): Expand comment to note that the
+ entries are presorted so that entries with the same mnemonic are
+ adjacent to each other in the table. Sort the entries for each
+ instruction so that this is true.
+
Mon Jan 20 12:48:57 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68k-dis.c: Include <libiberty.h>.
(print_insn_m68k): Sort the opcode table on the most significant
nibble of the opcode.
+Sat Jan 18 15:15:05 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-dis.c (tic80_opcodes): Add "wrcr", "vmpy", "vrnd",
+ "vsub", "vst", "xnor", and "xor" instructions.
+ (V_a1): Renamed from V_a, msb of accumulator reg number.
+ (V_a0): Add macro, lsb of accumulator reg number.
+
+Fri Jan 17 18:24:31 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-dis.c (print_insn_tic80): Broke excessively long
+ function up into several smaller ones and arranged for
+ the instruction printing function to be callable recursively
+ to print vector instructions that have both a load and a
+ math instruction packed into a single opcode.
+ * tic80-opc.c (tic80_opcodes): Expand comment for vld opcode
+ to explain why it comes after the other vector opcodes.
+
Fri Jan 17 16:19:15 1997 J.T. Conklin <jtc@beauty.cygnus.com>
- * m68k-opc.c (m68k_opcodes): add b, w, or l specifier to coldfire
+ * m68k-opc.c (m68k_opcodes): add b, w, or l specifier to coldfire
move insns to handle immediate operands.
-
+
Thu Jan 17 16:19:00 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68k-opc.c (m68k_opcodes): Delete duplicate entry for "cmpil".
fix operand mask in the "moveml" entries for the coldfire.
+Thu Jan 16 20:54:40 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (V_a, V_m, V_S, V_Z, V_p, OP_V, MASK_V):
+ New macros for building vector instruction opcodes.
+ (tic80_opcodes): Remove all uses of FMT_SI, FMT_REG, and
+ FMT_LI, which were unused. The field is now a flags field.
+ Remove some opcodes that are possible, but illegal, such
+ as long immediate instructions with doubles for immediate
+ values. Add "vadd" and "vld" instructions.
+
+Wed Jan 15 18:59:51 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (tic80_operands): Reorder some table entries to make
+ the order more logical. Move the shift alias instructions ("rotl",
+ "shl", "ins", "rotr", "extu", "exts", "srl", and "sra" to be
+ interspersed with the regular sr.x and sl.x instructions. Add
+ and test new instruction opcodes for "sl", "sli", "sr", "sri", "st",
+ "sub", "subu", "swcr", and "trap".
+
+Tue Jan 14 19:42:50 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-opc.c (OFF_SS_PC): Renamed from OFF_SS.
+ (OFF_SL_PC): Renamed from OFF_SL.
+ (OFF_SS_BR): New operand type for base relative operand.
+ (OFF_SL_BR): New operand type for base relative operand.
+ (REG_BASE): New operand type for base register operand.
+ (tic80_opcodes): Add and test "fmpy", "frndm", "frndn", "frndp",
+ "frndz", "fsqrt", "fsub", "illop0", "illopF", "ins", "jsr",
+ "ld", "ld.u", "lmo", "or", "rdcr", "rmo", "rotl", and "rotr"
+ instructions.
+ * tic80-dis.c (print_insn_tic80): Print opcode name with fixed width
+ 10 char field, padded with spaces on rhs, rather than a string
+ followed by a tab. Use renamed TIC80_OPERAND_PCREL flag bit rather
+ than old TIC80_OPERAND_RELATIVE. Add support for new
+ TIC80_OPERAND_BASEREL flag bit.
+
+Mon Jan 13 15:58:56 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-dis.c (print_insn_tic80): Print floating point operands
+ as floats.
+ * tic80-opc.c (SPFI): Add single precision floating point
+ immediate operand type.
+ (ROTATE): Add rotate operand type for shifts.
+ (ENDMASK): Add for shifts.
+ (n): Macro for the 'n' bit.
+ (i): Macro for the 'i' bit.
+ (PD): Macro for the 'PD' field.
+ (P2): Macro for the 'P2' field.
+ (P1): Macro for the 'P1' field.
+ (tic80_opcodes): Add entries for "exts", "extu", "fadd",
+ "fcmp", and "fdiv".
+
Mon Jan 6 15:06:55 1997 Jeffrey A Law (law@cygnus.com)
* mn10200-dis.c (disassemble): Mask off unwanted bits after
adding in current address for pc-relative operands.
+Mon Jan 6 10:56:25 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-dis.c (R_SCALED): Add macro to test for ":s" modifier bit.
+ (print_insn_tic80): If R_SCALED then print ":s" modifier for operand.
+ * tic80-opc.c (REG0, REG22, REG27, SSOFF, LSOFF): Names
+ changed to REG_0, REG_22, REG_DEST, OFF_SS, OFF_SL respectively.
+ (SICR, LICR, REGM_SI, REGM_LI): Names changed to CR_SI, CR_LI,
+ REG_BASE_M_SI, REG_BASE_M_LI respectively.
+ (REG_SCALED, LSI_SCALED): New operand types.
+ (E): New macro for 'E' bit at bit 27.
+ (tic80_opcodes): Add and test dld, dld.u, dst, estop, and etrap
+ opcodes, including the various size flavors (b,h,w,d) for
+ the direct load and store instructions.
+
+Sun Jan 5 12:18:14 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-dis.c (M_SI, M_LI): Add macros to test for ":m" modifier bit
+ in an instruction.
+ * tic80-dis.c (print_insn_tic80): Change comma and paren handling.
+ Use M_SI and M_LI macros to check for ":m" modifier for GPR operands.
+ * tic80-opc.c (tic80_operands): Add REGM_SI and REGM_LI operands.
+ (F, M_REG, M_LI, M_SI, SZ_REG, SZ_LI, SZ_SI, D, S): New bit-twiddlers.
+ (MASK_LI_M, MASK_SI_M, MASK_REG_M): Remove and replace in opcode
+ masks with "MASK_* & ~M_*" to get the M bit reset.
+ (tic80_opcodes): Add bsr, bsr.a, cmnd, cmp, dcachec, and dcachef.
+
+Sat Jan 4 19:05:05 1997 Fred Fish <fnf@cygnus.com>
+
+ * tic80-dis.c (print_insn_tic80): Print TIC80_OPERAND_RELATIVE
+ correctly. Add support for printing TIC80_OPERAND_BITNUM and
+ TIC80_OPERAND_CC, and TIC80_OPERAND_CR operands in symbolic
+ form.
+ * tic80-opc.c (tic80_operands): Add SSOFF, LSOFF, BITNUM,
+ CC, SICR, and LICR table entries.
+ (tic80_opcodes): Add and test "nop", "br", "bbo", "bbz",
+ "bcnd", and "brcr" opcodes.
+
Fri Jan 3 18:32:11 1997 Fred Fish <fnf@cygnus.com>
* ppc-opc.c (powerpc_operands): Make comment match the
actual fields (no shift field).
* sparc-opc.c (sparc_opcodes): Document why this cannot be "const".
+ * tic80-dis.c (print_insn_tic80): Replace abort stub with a
+ partial implementation, work in progress.
+ * tic80-opc.c (tic80_operands): Begin construction operands table.
+ (tic80_opcodes): Continue populating opcodes table and start
+ filling in the operand indices.
+ (tic80_num_opcodes): Add this.
Fri Jan 3 12:13:52 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -1090,11 +3033,27 @@ Tue Dec 31 15:09:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
Mon Dec 30 17:02:11 1996 Fred Fish <fnf@cygnus.com>
* Makefile.in (m68k-opc.o, alpha-opc.o): Remove dis-asm.h dependency.
-
+ (tic80-dis.o, tic80-opc.o): Add rules per comment in Makefile.in.
+
Mon Dec 30 11:38:01 1996 Ian Lance Taylor <ian@cygnus.com>
* mips16-opc.c: Add "abs".
+Sun Dec 29 10:58:22 1996 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (ALL_MACHINES): Add tic80-dis.o and tic80-opc.o.
+ * disassemble.c (ARCH_tic80): Define if ARCH_all is defined.
+ (disassembler): Add bfd_arch_tic80 support to set disassemble
+ to print_insn_tic80.
+ * tic80-dis.c (print_insn_tic80): Add stub.
+
+Fri Dec 27 22:30:57 1996 Fred Fish <fnf@cygnus.com>
+
+ * configure.in (arch in $selarchs): Add bfd_tic80_arch entry.
+ * configure: Regenerate with autoconf.
+ * tic80-dis.c: Add file.
+ * tic80-opc.c: Add file.
+
Fri Dec 20 14:30:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-opc.c (pre_defined_registers): Add cr[0-15], dpc, dpsw, link.
@@ -1220,7 +3179,7 @@ Mon Nov 25 16:15:17 1996 J.T. Conklin <jtc@cygnus.com>
* m68k-opc.c (m68k_opcodes): The coldfire (mcf5200) can only use
register operands for immediate arithmetic, not, neg, negx, and
set according to condition instructions.
-
+
* m68k-opc.c (m68k_opcodes): Consistantly Use "s" as the storage
specifier of the effective-address operand in immediate forms of
arithmetic instructions. The specifier for the immediate operand
@@ -1231,7 +3190,7 @@ Mon Nov 25 11:17:01 1996 Jeffrey A Law (law@cygnus.com)
* mn10300-opc.c (mn10300_opcodes): Remove redundant "lcc"
opcode.
- * mn10300-dis.c (disassemble): Use '$' instead of '%' for
+ * mn10300-dis.c (disassemble): Use '$' instead of '%' for
register prefix.
* mn10300-dis.c (disassemble): Prefix registers with '%'.
@@ -1262,7 +3221,7 @@ Tue Nov 19 13:33:01 1996 Jeffrey A Law (law@cygnus.com)
* mn10300-opc.c (mn10300_operands): Add "REGS" for a register
list.
(mn10300_opcodes): Use REGS for register list in "movm" instructions.
-
+
Mon Nov 18 15:20:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* d10v-opc.c (d10v_opcodes): Add3 sets the carry.
@@ -1282,7 +3241,7 @@ Wed Nov 6 13:42:32 1996 Jeffrey A Law (law@cygnus.com)
* mn10300-opc.c (mn10300_operands): Hijack "bits" field
in MN10300_OPERAND_SPLIT operands for how many bits
appear in the basic insn word. Add IMM32_HIGH24,
- IMM32_HIGH24_LOWSHIFT8, IMM8E_SHIFT8.
+ IMM32_HIGH24_LOWSHIFT8, IMM8E_SHIFT8.
(mn10300_opcodes): Use new operands as needed.
* mn10300-opc.c (mn10300_operands): Add IMM32_LOWSHIFT8
@@ -1323,7 +3282,7 @@ Fri Nov 1 10:29:11 1996 Richard Henderson <rth@tamu.edu>
standard disassembly.
* alpha-opc.c (alpha_operands): Rearrange flags slot.
- (alpha_opcodes): Add new BWX, CIX, and MAX instructions.
+ (alpha_opcodes): Add new BWX, CIX, and MAX instructions.
Recategorize PALcode instructions.
Wed Oct 30 16:46:58 1996 Jeffrey A Law (law@cygnus.com)
@@ -1391,7 +3350,7 @@ Wed Oct 9 11:19:26 1996 Jeffrey A Law (law@cygnus.com)
* mn10300-opc.c (mn10300_opcodes): Add "extended" instructions,
"putx", "getx", "mulq", "mulqu", "sat16", "sat24", "bsch".
-
+
Tue Oct 8 11:55:35 1996 Jeffrey A Law (law@cygnus.com)
* mn10300-opc.c (mn10300_operands): Remove "REGS" operand.
@@ -1412,7 +3371,7 @@ Mon Oct 7 16:48:45 1996 Jeffrey A Law (law@cygnus.com)
Update many operand fields to deal with signed vs unsigned
issues. Fix one or two typos in the "mov" instruction
opcode, mask and/or operand fields.
-
+
Mon Oct 7 11:39:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68k-opc.c (plusha): Prefer encoding for m68040up, in case
@@ -1661,7 +3620,7 @@ Tue Aug 20 14:41:03 1996 J.T. Conklin <jtc@hippo.cygnus.com>
* configure: (bfd_v850v_arch) Add new case.
* configure.in: (bfd_v850_arch) Add new case.
* v850-opc.c: New file.
-
+
Mon Aug 19 15:21:38 1996 Doug Evans <dje@canuck.cygnus.com>
* sparc-dis.c (print_insn_sparc): Handle little endian sparcs.
@@ -2395,7 +4354,7 @@ Wed Sep 6 15:08:09 1995 Jim Wilson <wilson@chestnut.cygnus.com>
* sh-opc.h (sh_arg_type): Add F_FR0.
(sh_table, case fmac): Add F_FR0 as first argument.
-
+
Wed Sep 6 15:08:09 1995 Jim Wilson <wilson@chestnut.cygnus.com>
* sh-opc.h (sh_opcode_info): Increase arg array size to 4.
@@ -2614,7 +4573,7 @@ Wed May 24 14:16:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
* sh-opc.h: Added bsrf and braf.
-Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
+Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
* arm-opc.h (arm_opcodes): Add 64-bit multiply patterns. Delete
bogus [ls]fm{ea,fd} patterns.
@@ -2662,7 +4621,7 @@ Mon Apr 10 15:55:01 1995 Stan Shebs <shebs@andros.cygnus.com>
* mpw-config.in (target_arch): Compute from canonical target.
(m68k, mips, powerpc, sparc): Add architectures.
* mpw-make.in (disassemble.c.o): Add.
- (ALL_CFLAGS): Remove special flags (-mc68020 -mc68881 -model far).
+ (ALL_CFLAGS): Remove special flags (-mc68020 -mc68881 -model far).
* mpw-config.in (BFD_MACHINES): Set to a default value.
* mpw-make.in (BFD_MACHINES): Remove wired-in value.
@@ -3161,7 +5120,7 @@ Fri Jan 21 19:01:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Mon Jan 17 20:05:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* hppa-dis.c (print_insn_hppa): Handle 'N' in assembler template.
- No space before 'u', 'f', or 'N'.
+ No space before 'u', 'f', or 'N'.
Sun Jan 16 14:20:16 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
@@ -3193,7 +5152,7 @@ Mon Nov 8 12:37:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Sun Nov 7 23:52:34 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* alpha-opc.h, alpha-dis.c (print_insn_alpha): Add
- FLOAT_MEMORY_FORMAT_CODE, FLOAT_BRANCH_FORMAT_CODE, correct
+ FLOAT_MEMORY_FORMAT_CODE, FLOAT_BRANCH_FORMAT_CODE, correct
FLOAT_FORMAT_CODE to put out floating point register names.
Mon Nov 1 18:17:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -3466,7 +5425,7 @@ Fri Jun 11 18:40:21 1993 Ken Raeburn (raeburn@cygnus.com)
defined, since gdb has been fixed.
Changes from Jeff Law, law@cs.utah.edu:
- * hppa-dis.c (print_insn_hppa): Last argument to fput_reg,
+ * hppa-dis.c (print_insn_hppa): Last argument to fput_reg,
fput_reg_r, fput_creg, fput_const, and fputs_filtered should
be a *disassemble_info, not a *FILE.
* hppa-dis.c: Support 'd', '!', and 'a'.
diff --git a/contrib/binutils/opcodes/Makefile.am b/contrib/binutils/opcodes/Makefile.am
index 5dda6953..77beb4d 100644
--- a/contrib/binutils/opcodes/Makefile.am
+++ b/contrib/binutils/opcodes/Makefile.am
@@ -2,9 +2,11 @@
AUTOMAKE_OPTIONS = cygnus
+SUBDIRS = po
+
INCDIR = $(srcdir)/../include
BFDDIR = $(srcdir)/../bfd
-DEP = mkdep
+MKDEP = gcc -MM
lib_LTLIBRARIES = libopcodes.la
@@ -14,7 +16,10 @@ BFD_H = ../bfd/bfd.h
# Header files.
HFILES = \
arm-opc.h \
+ fr30-desc.h fr30-opc.h \
h8500-opc.h \
+ m32r-desc.h m32r-opc.h \
+ mcore-opc.h \
sh-opc.h \
sysdep.h \
w65-opc.h \
@@ -25,25 +30,41 @@ CFILES = \
a29k-dis.c \
alpha-dis.c \
alpha-opc.c \
+ arc-dis.c \
+ arc-opc.c \
arm-dis.c \
+ avr-dis.c \
cgen-asm.c \
cgen-dis.c \
cgen-opc.c \
d10v-dis.c \
d10v-opc.c \
+ d30v-dis.c \
+ d30v-opc.c \
dis-buf.c \
disassemble.c \
+ fr30-asm.c \
+ fr30-desc.c \
+ fr30-dis.c \
+ fr30-ibld.c \
+ fr30-opc.c \
h8300-dis.c \
h8500-dis.c \
hppa-dis.c \
+ i370-dis.c \
+ i370-opc.c \
i386-dis.c \
i960-dis.c \
m32r-asm.c \
+ m32r-desc.c \
m32r-dis.c \
+ m32r-ibld.c \
m32r-opc.c \
+ m32r-opinst.c \
m68k-dis.c \
m68k-opc.c \
m88k-dis.c \
+ mcore-dis.c \
mips-dis.c \
mips-opc.c \
mips16-opc.c \
@@ -52,12 +73,19 @@ CFILES = \
m10300-dis.c \
m10300-opc.c \
ns32k-dis.c \
+ pj-dis.c \
+ pj-opc.c \
ppc-dis.c \
ppc-opc.c \
sh-dis.c \
sparc-dis.c \
sparc-opc.c \
tic30-dis.c \
+ tic80-dis.c \
+ tic80-opc.c \
+ v850-dis.c \
+ v850-opc.c \
+ vax-dis.c \
w65-dis.c \
z8k-dis.c \
z8kgen.c
@@ -69,19 +97,32 @@ ALL_MACHINES = \
arc-dis.lo \
arc-opc.lo \
arm-dis.lo \
+ avr-dis.lo \
cgen-asm.lo \
cgen-dis.lo \
cgen-opc.lo \
d10v-dis.lo \
d10v-opc.lo \
+ d30v-dis.lo \
+ d30v-opc.lo \
+ fr30-asm.lo \
+ fr30-desc.lo \
+ fr30-dis.lo \
+ fr30-ibld.lo \
+ fr30-opc.lo \
h8300-dis.lo \
h8500-dis.lo \
hppa-dis.lo \
i386-dis.lo \
+ i370-dis.lo \
+ i370-opc.lo \
i960-dis.lo \
m32r-asm.lo \
+ m32r-desc.lo \
m32r-dis.lo \
+ m32r-ibld.lo \
m32r-opc.lo \
+ m32r-opinst.lo \
m68k-dis.lo \
m68k-opc.lo \
m88k-dis.lo \
@@ -89,9 +130,12 @@ ALL_MACHINES = \
m10200-opc.lo \
m10300-dis.lo \
m10300-opc.lo \
+ mcore-dis.lo \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
+ pj-dis.lo \
+ pj-opc.lo \
ppc-dis.lo \
ppc-opc.lo \
ns32k-dis.lo \
@@ -99,22 +143,25 @@ ALL_MACHINES = \
sparc-dis.lo \
sparc-opc.lo \
tic30-dis.lo \
+ tic80-dis.lo \
+ tic80-opc.lo \
v850-dis.lo \
v850-opc.lo \
+ vax-dis.lo \
w65-dis.lo \
z8k-dis.lo
OFILES = @BFD_MACHINES@
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
libopcodes_la_SOURCES = dis-buf.c disassemble.c
libopcodes_la_DEPENDENCIES = $(OFILES)
-libopcodes_la_LIBADD = $(OFILES)
-libopcodes_la_LDFLAGS = -release $(VERSION)
+libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
+libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
# the build directory so that we don't have to convert all the
@@ -124,35 +171,48 @@ libopcodes_la_LDFLAGS = -release $(VERSION)
noinst_LIBRARIES = libopcodes.a
stamp-lib: libopcodes.la
- if [ -f .libs/libopcodes.a ]; then \
- cp .libs/libopcodes.a libopcodes.tmp; \
+ libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+ if [ -f $$libtooldir/libopcodes.a ]; then \
+ cp $$libtooldir/libopcodes.a libopcodes.tmp; \
$(SHELL) $(srcdir)/../move-if-change libopcodes.tmp libopcodes.a; \
else true; fi
touch stamp-lib
libopcodes.a: stamp-lib ; @true
-CLEANFILES = libopcodes.a stamp-lib dep.sed .dep .dep1
+POTFILES = $(HFILES) $(CFILES)
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
+# We should reconfigure whenever bfd/configure.in changes, because
+# that's where the version number comes from.
+config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in
+ $(SHELL) ./config.status --recheck
+
+CLEANFILES = \
+ libopcodes.a stamp-lib dep.sed DEP DEP1 DEP2
+
+# The start marker is written this way to pass through automake unscathed.
+
# This dependency stuff is copied from BFD.
-.dep: dep.sed $(CFILES) $(HFILES) config.h
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- sed -f dep.sed < .dep1 > .dep
+DEP: dep.sed $(CFILES) $(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' >> $@
-.dep1: $(CFILES)
- rm -f .dep2 .dep2a
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- echo > .dep2a
- $(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
- sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
- rm -f .dep2a
- $(srcdir)/../move-if-change .dep2 .dep1
+DEP1: $(CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
@@ -161,19 +221,19 @@ dep.sed: dep-in.sed config.status
-e 's!@BFDDIR@!$(BFDDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
@@ -187,12 +247,24 @@ a29k-dis.lo: a29k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
alpha-dis.lo: alpha-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/alpha.h \
- $(BFD_H)
-arm-dis.lo: arm-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h arm-opc.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(BFD_H) opintl.h
+arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h $(BFDDIR)/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 \
+ opintl.h
+arc-opc.lo: arc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h \
+ opintl.h
+arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) arm-opc.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h \
+ $(INCDIR)/elf/reloc-macros.h
+avr-dis.lo: avr-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h opintl.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
+ opintl.h
cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/libiberty.h \
$(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
@@ -200,56 +272,106 @@ cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
d10v-dis.lo: d10v-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h \
$(INCDIR)/dis-asm.h $(BFD_H)
d10v-opc.lo: d10v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h
+d30v-dis.lo: d30v-dis.c $(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
+d30v-opc.lo: d30v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d30v.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H)
+ $(BFD_H) opintl.h
disassemble.lo: disassemble.c $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H)
+fr30-asm.lo: fr30-asm.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-desc.lo: fr30-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-opc.lo: fr30-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h
h8300-dis.lo: h8300-dis.c $(INCDIR)/opcode/h8300.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
h8500-dis.lo: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+i370-dis.lo: i370-dis.c $(INCDIR)/ansidecl.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/i370.h
+i370-opc.lo: i370-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i370.h
i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h sysdep.h config.h
+ $(INCDIR)/ansidecl.h sysdep.h config.h opintl.h
i960-dis.lo: i960-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h m32r-opc.h $(INCDIR)/opcode/cgen.h
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
+m32r-desc.lo: m32r-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-opc.h $(INCDIR)/opcode/cgen.h
-m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-opc.h $(INCDIR)/opcode/cgen.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
+m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
+m32r-opc.lo: m32r-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h
+m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h
m68k-dis.lo: m68k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h $(INCDIR)/opcode/m68k.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h opintl.h \
+ $(INCDIR)/opcode/m68k.h
m68k-opc.lo: m68k-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h opintl.h
+mcore-dis.lo: mcore-dis.c mcore-opc.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/opcode/mips.h $(BFDDIR)/elf-bfd.h \
+ $(BFD_H) $(INCDIR)/opcode/mips.h opintl.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)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
mips-opc.lo: mips-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
mips16-opc.lo: mips16-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
m10200-dis.lo: m10200-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
m10200-opc.lo: m10200-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h
m10300-dis.lo: m10300-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
m10300-opc.lo: m10300-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h
+ sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h \
+ opintl.h
+pj-dis.lo: pj-dis.c $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h
+pj-opc.lo: pj-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/pj.h
ppc-dis.lo: ppc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
-ppc-opc.lo: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h
+ppc-opc.lo: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h \
+ opintl.h
sh-dis.lo: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h
sparc-dis.lo: sparc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/libiberty.h opintl.h
sparc-opc.lo: sparc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/sparc.h
-tic30-dis.lo: tic30-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic30.h
+tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/opcode/tic30.h
+tic80-dis.lo: tic80-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic80.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
+tic80-opc.lo: tic80-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic80.h
+v850-dis.lo: v850-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/v850.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+v850-opc.lo: v850-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/v850.h \
+ opintl.h
+vax-dis.lo: vax-dis.c $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h
w65-dis.lo: w65-dis.c w65-opc.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
diff --git a/contrib/binutils/opcodes/Makefile.in b/contrib/binutils/opcodes/Makefile.in
index b1d1b0f..0cf1c27 100644
--- a/contrib/binutils/opcodes/Makefile.in
+++ b/contrib/binutils/opcodes/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,8 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
+DESTDIR =
+
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,7 +46,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
@@ -62,26 +64,52 @@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AR = @AR@
+AS = @AS@
BFD_MACHINES = @BFD_MACHINES@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
-LD = @LD@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-NM = @NM@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WIN32LDFLAGS = @WIN32LDFLAGS@
+WIN32LIBADD = @WIN32LIBADD@
archdefs = @archdefs@
+l = @l@
AUTOMAKE_OPTIONS = cygnus
+SUBDIRS = po
+
INCDIR = $(srcdir)/../include
BFDDIR = $(srcdir)/../bfd
-DEP = mkdep
+MKDEP = gcc -MM
lib_LTLIBRARIES = libopcodes.la
@@ -91,36 +119,56 @@ BFD_H = ../bfd/bfd.h
# Header files.
HFILES = \
arm-opc.h \
+ fr30-desc.h fr30-opc.h \
h8500-opc.h \
+ m32r-desc.h m32r-opc.h \
+ mcore-opc.h \
sh-opc.h \
sysdep.h \
w65-opc.h \
z8k-opc.h
+
# C source files that correspond to .o's.
CFILES = \
a29k-dis.c \
alpha-dis.c \
alpha-opc.c \
+ arc-dis.c \
+ arc-opc.c \
arm-dis.c \
+ avr-dis.c \
cgen-asm.c \
cgen-dis.c \
cgen-opc.c \
d10v-dis.c \
d10v-opc.c \
+ d30v-dis.c \
+ d30v-opc.c \
dis-buf.c \
disassemble.c \
+ fr30-asm.c \
+ fr30-desc.c \
+ fr30-dis.c \
+ fr30-ibld.c \
+ fr30-opc.c \
h8300-dis.c \
h8500-dis.c \
hppa-dis.c \
+ i370-dis.c \
+ i370-opc.c \
i386-dis.c \
i960-dis.c \
m32r-asm.c \
+ m32r-desc.c \
m32r-dis.c \
+ m32r-ibld.c \
m32r-opc.c \
+ m32r-opinst.c \
m68k-dis.c \
m68k-opc.c \
m88k-dis.c \
+ mcore-dis.c \
mips-dis.c \
mips-opc.c \
mips16-opc.c \
@@ -129,16 +177,24 @@ CFILES = \
m10300-dis.c \
m10300-opc.c \
ns32k-dis.c \
+ pj-dis.c \
+ pj-opc.c \
ppc-dis.c \
ppc-opc.c \
sh-dis.c \
sparc-dis.c \
sparc-opc.c \
tic30-dis.c \
+ tic80-dis.c \
+ tic80-opc.c \
+ v850-dis.c \
+ v850-opc.c \
+ vax-dis.c \
w65-dis.c \
z8k-dis.c \
z8kgen.c
+
ALL_MACHINES = \
a29k-dis.lo \
alpha-dis.lo \
@@ -146,19 +202,32 @@ ALL_MACHINES = \
arc-dis.lo \
arc-opc.lo \
arm-dis.lo \
+ avr-dis.lo \
cgen-asm.lo \
cgen-dis.lo \
cgen-opc.lo \
d10v-dis.lo \
d10v-opc.lo \
+ d30v-dis.lo \
+ d30v-opc.lo \
+ fr30-asm.lo \
+ fr30-desc.lo \
+ fr30-dis.lo \
+ fr30-ibld.lo \
+ fr30-opc.lo \
h8300-dis.lo \
h8500-dis.lo \
hppa-dis.lo \
i386-dis.lo \
+ i370-dis.lo \
+ i370-opc.lo \
i960-dis.lo \
m32r-asm.lo \
+ m32r-desc.lo \
m32r-dis.lo \
+ m32r-ibld.lo \
m32r-opc.lo \
+ m32r-opinst.lo \
m68k-dis.lo \
m68k-opc.lo \
m88k-dis.lo \
@@ -166,9 +235,12 @@ ALL_MACHINES = \
m10200-opc.lo \
m10300-dis.lo \
m10300-opc.lo \
+ mcore-dis.lo \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
+ pj-dis.lo \
+ pj-opc.lo \
ppc-dis.lo \
ppc-opc.lo \
ns32k-dis.lo \
@@ -176,19 +248,23 @@ ALL_MACHINES = \
sparc-dis.lo \
sparc-opc.lo \
tic30-dis.lo \
+ tic80-dis.lo \
+ tic80-opc.lo \
v850-dis.lo \
v850-opc.lo \
+ vax-dis.lo \
w65-dis.lo \
z8k-dis.lo
+
OFILES = @BFD_MACHINES@
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl
-libopcodes_la_SOURCES = dis-buf.c disassemble.c
+libopcodes_la_SOURCES = dis-buf.c disassemble.c
libopcodes_la_DEPENDENCIES = $(OFILES)
-libopcodes_la_LIBADD = $(OFILES)
-libopcodes_la_LDFLAGS = -release $(VERSION)
+libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
+libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
# the build directory so that we don't have to convert all the
@@ -197,7 +273,11 @@ libopcodes_la_LDFLAGS = -release $(VERSION)
noinst_LIBRARIES = libopcodes.a
-CLEANFILES = libopcodes.a stamp-lib dep.sed .dep .dep1
+POTFILES = $(HFILES) $(CFILES)
+
+CLEANFILES = \
+ libopcodes.a stamp-lib dep.sed DEP DEP1 DEP2
+
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -216,50 +296,54 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo
CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = ChangeLog Makefile.am Makefile.in acconfig.h acinclude.m4 \
-aclocal.m4 config.in configure configure.in stamp-h.in
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = ./stamp-h.in ChangeLog Makefile.am Makefile.in \
+acinclude.m4 aclocal.m4 config.in configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
-GZIP = --best
+GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.o $(libopcodes_la_OBJECTS)
-default: all
-
+all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
- @:
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
$(SHELL) ./config.status
- @echo timestamp > stamp-h
-$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
@@ -328,32 +412,96 @@ maintainer-clean-libLTLIBRARIES:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(libdir)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
- $(NORMAL_UNINSTALL)
+ @$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$$p; \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libopcodes_la_LDFLAGS) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS)
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+ && mkid -f$$here/ID $$unique $(LISP)
-TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
@@ -378,29 +526,31 @@ top_distdir = $(distdir)
# tarfile.
distcheck: dist
-rm -rf $(distdir)
- GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
- @echo "========================"; \
- echo "$(distdir).tar.gz is ready for distribution"; \
- echo "========================"
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
@@ -408,114 +558,158 @@ distdir: $(DISTFILES)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
done
-info:
-dvi:
-check:
- $(MAKE)
-installcheck:
-install-info:
-install-exec: install-libLTLIBRARIES
- @$(NORMAL_INSTALL)
-
-install-data:
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall: uninstall-libLTLIBRARIES
-
-all: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
-
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am:
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-info-am:
+install-info: install-info-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am: install-libLTLIBRARIES
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-libLTLIBRARIES
+uninstall: uninstall-recursive
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
+all-redirect: all-recursive-am
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
- $(mkinstalldirs) $(libdir)
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
+mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-libLTLIBRARIES mostlyclean-tags \
mostlyclean-generic
-clean: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
clean-libLTLIBRARIES clean-tags clean-generic \
- mostlyclean
+ mostlyclean-am
+
+clean: clean-recursive
-distclean: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
+distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
distclean-libtool distclean-libLTLIBRARIES \
- distclean-tags distclean-generic clean
- -rm -f config.status
+ distclean-tags distclean-generic clean-am
-rm -f libtool
-maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstLIBRARIES \
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr \
+ maintainer-clean-noinstLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-libLTLIBRARIES maintainer-clean-tags \
- maintainer-clean-generic distclean
+ maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstLIBRARIES \
-distclean-noinstLIBRARIES clean-noinstLIBRARIES \
-maintainer-clean-noinstLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES tags mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
-installcheck install-info install-exec install-data install uninstall \
-all installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \
+distclean-libLTLIBRARIES clean-libLTLIBRARIES \
+maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \
+install-libLTLIBRARIES install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info all-recursive-am install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
stamp-lib: libopcodes.la
- if [ -f .libs/libopcodes.a ]; then \
- cp .libs/libopcodes.a libopcodes.tmp; \
+ libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
+ if [ -f $$libtooldir/libopcodes.a ]; then \
+ cp $$libtooldir/libopcodes.a libopcodes.tmp; \
$(SHELL) $(srcdir)/../move-if-change libopcodes.tmp libopcodes.a; \
else true; fi
touch stamp-lib
libopcodes.a: stamp-lib ; @true
+po/POTFILES.in: @MAINT@ Makefile
+ for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/POTFILES.in
+
+# We should reconfigure whenever bfd/configure.in changes, because
+# that's where the version number comes from.
+config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in
+ $(SHELL) ./config.status --recheck
+
+# The start marker is written this way to pass through automake unscathed.
# This dependency stuff is copied from BFD.
-.dep: dep.sed $(CFILES) $(HFILES) config.h
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- sed -f dep.sed < .dep1 > .dep
+DEP: dep.sed $(CFILES) $(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' >> $@
-.dep1: $(CFILES)
- rm -f .dep2 .dep2a
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- echo > .dep2a
- $(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
- sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
- rm -f .dep2a
- $(srcdir)/../move-if-change .dep2 .dep1
+DEP1: $(CFILES)
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
+ mv -f DEP2 $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
@@ -524,19 +718,19 @@ dep.sed: dep-in.sed config.status
-e 's!@BFDDIR@!$(BFDDIR)!' \
-e 's!@SRCDIR@!$(srcdir)!'
-dep: .dep
+dep: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
- cat .dep >> tmp-Makefile
+ cat DEP >> tmp-Makefile
$(srcdir)/../move-if-change tmp-Makefile Makefile
-dep-in: .dep
+dep-in: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
- cat .dep >> tmp-Makefile.in
+ cat DEP >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
+dep-am: DEP
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
+ cat DEP >> tmp-Makefile.am
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
@@ -550,12 +744,24 @@ a29k-dis.lo: a29k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
alpha-dis.lo: alpha-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/alpha.h \
- $(BFD_H)
-arm-dis.lo: arm-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h arm-opc.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(BFD_H) opintl.h
+arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h $(BFDDIR)/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 \
+ opintl.h
+arc-opc.lo: arc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h \
+ opintl.h
+arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) arm-opc.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h \
+ $(INCDIR)/elf/reloc-macros.h
+avr-dis.lo: avr-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h opintl.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
+ opintl.h
cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/libiberty.h \
$(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
@@ -563,56 +769,106 @@ cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
d10v-dis.lo: d10v-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h \
$(INCDIR)/dis-asm.h $(BFD_H)
d10v-opc.lo: d10v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h
+d30v-dis.lo: d30v-dis.c $(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
+d30v-opc.lo: d30v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d30v.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H)
+ $(BFD_H) opintl.h
disassemble.lo: disassemble.c $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H)
+fr30-asm.lo: fr30-asm.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-desc.lo: fr30-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
+fr30-opc.lo: fr30-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h
h8300-dis.lo: h8300-dis.c $(INCDIR)/opcode/h8300.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
h8500-dis.lo: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/ansidecl.h opintl.h
hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+i370-dis.lo: i370-dis.c $(INCDIR)/ansidecl.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/i370.h
+i370-opc.lo: i370-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i370.h
i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h sysdep.h config.h
+ $(INCDIR)/ansidecl.h sysdep.h config.h opintl.h
i960-dis.lo: i960-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/symcat.h m32r-opc.h $(INCDIR)/opcode/cgen.h
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
+m32r-desc.lo: m32r-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-opc.h $(INCDIR)/opcode/cgen.h
-m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/libiberty.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-opc.h $(INCDIR)/opcode/cgen.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
+m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
+m32r-opc.lo: m32r-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h
+m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h
m68k-dis.lo: m68k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h $(INCDIR)/opcode/m68k.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h opintl.h \
+ $(INCDIR)/opcode/m68k.h
m68k-opc.lo: m68k-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h opintl.h
+mcore-dis.lo: mcore-dis.c mcore-opc.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/opcode/mips.h $(BFDDIR)/elf-bfd.h \
+ $(BFD_H) $(INCDIR)/opcode/mips.h opintl.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)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
mips-opc.lo: mips-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
mips16-opc.lo: mips16-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
m10200-dis.lo: m10200-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
m10200-opc.lo: m10200-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h
m10300-dis.lo: m10300-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
m10300-opc.lo: m10300-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h
+ sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h \
+ opintl.h
+pj-dis.lo: pj-dis.c $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h
+pj-opc.lo: pj-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/pj.h
ppc-dis.lo: ppc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
-ppc-opc.lo: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h
+ppc-opc.lo: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h \
+ opintl.h
sh-dis.lo: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h
sparc-dis.lo: sparc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/libiberty.h opintl.h
sparc-opc.lo: sparc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/sparc.h
-tic30-dis.lo: tic30-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic30.h
+tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/opcode/tic30.h
+tic80-dis.lo: tic80-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic80.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
+tic80-opc.lo: tic80-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/tic80.h
+v850-dis.lo: v850-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/v850.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+v850-opc.lo: v850-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/v850.h \
+ opintl.h
+vax-dis.lo: vax-dis.c $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h
w65-dis.lo: w65-dis.c w65-opc.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
diff --git a/contrib/binutils/opcodes/aclocal.m4 b/contrib/binutils/opcodes/aclocal.m4
index ea7ce9b..7ba1f4e 100644
--- a/contrib/binutils/opcodes/aclocal.m4
+++ b/contrib/binutils/opcodes/aclocal.m4
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.2e
+dnl aclocal.m4 generated automatically by aclocal 1.4
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,7 +22,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@@ -32,8 +32,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
@@ -45,15 +45,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
#
# Check to make sure that the build environment is sane.
#
@@ -114,32 +105,75 @@ fi
AC_SUBST($1)])
-# serial 24 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AM_ENABLE_SHARED])dnl
-AC_REQUIRE([AM_ENABLE_STATIC])dnl
+# 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([AM_PROG_LD])dnl
-AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -161,30 +195,42 @@ case "$host" in
*-*-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
;;
-esac
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
+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
])
-# AM_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# 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(AM_ENABLE_SHARED,
-[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@@ -201,29 +247,23 @@ no) enable_shared=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
-# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AM_DISABLE_SHARED,
-[AM_ENABLE_SHARED(no)])
-
-# AM_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AM_DISABLE_STATIC,
-[AM_ENABLE_STATIC(no)])
+# 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)])
-# AM_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# 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(AM_ENABLE_STATIC,
-[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+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 build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@@ -240,28 +280,73 @@ no) enable_static=no ;;
IFS="$ac_save_ifs"
;;
esac],
-enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+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)])
+
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
+# 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])
+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.
+ # Accept absolute paths.
changequote(,)dnl
- /* | [A-Za-z]:\\*)
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
changequote([,])dnl
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -278,10 +363,10 @@ else
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ 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"; then
+ 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.
@@ -289,7 +374,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -304,11 +389,10 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
+AC_PROG_LD_GNU
])
-AC_DEFUN(AM_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 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -318,43 +402,117 @@ else
fi])
])
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
+# 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,
-[case "$NM" in
-changequote(,)dnl
-/* | [A-Za-z]:\\*)
-changequote([,])dnl
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+[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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
+fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
-AC_SUBST(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,
@@ -392,69 +550,367 @@ AC_DEFUN(AM_MAINTAINER_MODE,
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
-# Check to see if we're running under Cygwin32, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN32()
-AC_DEFUN(AM_CYGWIN32,
-[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin32=yes, am_cv_cygwin32=no)
-rm -f conftest*])
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
-
-# Check to see if we're running under Win32, without using
-# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
-# Otherwise set it to "".
-
-dnl AM_EXEEXT()
-dnl This knows we add .exe if we're building in the Cygwin32
-dnl environment. But if we're not, then it compiles a test program
-dnl to see if there is a suffix for executables.
-AC_DEFUN(AM_EXEEXT,
-[AC_REQUIRE([AM_CYGWIN32])
-AC_REQUIRE([AM_MINGW32])
-AC_MSG_CHECKING([for executable suffix])
-AC_CACHE_VAL(am_cv_exeext,
-[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $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 <drepper@cygnus.com>, 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 <libintl.h>], [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 <locale.h> in the installed <libintl.h> 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 <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. 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 <drepper@cygnus.com>, 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
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*])
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
+ AC_MSG_RESULT(no)
fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-AC_MSG_RESULT(${am_cv_exeext})
-AC_SUBST(EXEEXT)])
-
-# Check to see if we're running under Mingw, without using
-# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_MINGW32()
-AC_DEFUN(AM_MINGW32,
-[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
-[AC_TRY_COMPILE(,[return __MINGW32__;],
-am_cv_mingw32=yes, am_cv_mingw32=no)
-rm -f conftest*])
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes])
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 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 <locale.h>], [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/opcodes/alpha-dis.c b/contrib/binutils/opcodes/alpha-dis.c
index 583f1ea..ce770bb 100644
--- a/contrib/binutils/opcodes/alpha-dis.c
+++ b/contrib/binutils/opcodes/alpha-dis.c
@@ -1,5 +1,5 @@
/* alpha-dis.c -- Disassemble Alpha AXP instructions
- Copyright 1996 Free Software Foundation, Inc.
+ Copyright 1996, 1999 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
@@ -20,9 +20,7 @@ along with this file; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-#include <stdlib.h>
#include <stdio.h>
-#include "ansidecl.h"
#include "sysdep.h"
#include "dis-asm.h"
#include "opcode/alpha.h"
@@ -66,7 +64,7 @@ print_insn_alpha (memaddr, info)
const char * const * regnames;
const struct alpha_opcode *opcode, *opcode_end;
const unsigned char *opindex;
- unsigned insn, op;
+ unsigned insn, op, isa_mask;
int need_comma;
/* Initialize the majorop table the first time through */
@@ -89,6 +87,20 @@ print_insn_alpha (memaddr, info)
else
regnames = osf_regnames;
+ isa_mask = AXP_OPCODE_NOPAL;
+ switch (info->mach)
+ {
+ case bfd_mach_alpha_ev4:
+ isa_mask |= AXP_OPCODE_EV4;
+ break;
+ case bfd_mach_alpha_ev5:
+ isa_mask |= AXP_OPCODE_EV5;
+ break;
+ case bfd_mach_alpha_ev6:
+ isa_mask |= AXP_OPCODE_EV6;
+ break;
+ }
+
/* Read the insn into a host word */
{
bfd_byte buffer[4];
@@ -111,7 +123,7 @@ print_insn_alpha (memaddr, info)
if ((insn & opcode->mask) != opcode->opcode)
continue;
- if (!(opcode->flags & AXP_OPCODE_NOPAL))
+ if (!(opcode->flags & isa_mask))
continue;
/* Make two passes over the operands. First see if any of them
diff --git a/contrib/binutils/opcodes/alpha-opc.c b/contrib/binutils/opcodes/alpha-opc.c
index 46b7223..9945891 100644
--- a/contrib/binutils/opcodes/alpha-opc.c
+++ b/contrib/binutils/opcodes/alpha-opc.c
@@ -1,6 +1,6 @@
/* alpha-opc.c -- Alpha AXP opcode list
- Copyright 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson <rth@tamu.edu>,
+ Copyright (c) 1996, 1998, 1999 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@cygnus.com>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
This file is part of GDB, GAS, and the GNU binutils.
@@ -21,9 +21,10 @@
02111-1307, USA. */
#include <stdio.h>
-#include "ansidecl.h"
+#include "sysdep.h"
#include "opcode/alpha.h"
#include "bfd.h"
+#include "opintl.h"
/* This file holds the Alpha AXP opcode table. The opcode table includes
almost all of the extended instruction mnemonics. This permits the
@@ -61,6 +62,7 @@ static unsigned insert_zb PARAMS((unsigned, int, const char **));
static unsigned insert_zc PARAMS((unsigned, int, const char **));
static unsigned insert_bdisp PARAMS((unsigned, int, const char **));
static unsigned insert_jhint PARAMS((unsigned, int, const char **));
+static unsigned insert_ev6hwjhint PARAMS((unsigned, int, const char **));
static int extract_rba PARAMS((unsigned, int *));
static int extract_rca PARAMS((unsigned, int *));
@@ -69,6 +71,7 @@ static int extract_zb PARAMS((unsigned, int *));
static int extract_zc PARAMS((unsigned, int *));
static int extract_bdisp PARAMS((unsigned, int *));
static int extract_jhint PARAMS((unsigned, int *));
+static int extract_ev6hwjhint PARAMS((unsigned, int *));
/* The operands table */
@@ -78,7 +81,7 @@ const struct alpha_operand alpha_operands[] =
/* The fields are bits, shift, insert, extract, flags */
/* The zero index is used to indicate end-of-list */
#define UNUSED 0
- { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0 },
/* The plain integer register fields */
#define RA (UNUSED + 1)
@@ -170,8 +173,9 @@ const struct alpha_operand alpha_operands[] =
{ 14, 0, -RETHINT,
AXP_OPERAND_UNSIGNED|AXP_OPERAND_DEFAULT_ZERO, 0, 0 },
- /* The 12-bit displacement for the ev4 hw_{ld,st} (pal1b/pal1f) insns */
+ /* The 12-bit displacement for the ev[46] hw_{ld,st} (pal1b/pal1f) insns */
#define EV4HWDISP (RETHINT + 1)
+#define EV6HWDISP (EV4HWDISP)
{ 12, 0, -EV4HWDISP, AXP_OPERAND_SIGNED, 0, 0 },
/* The 5-bit index for the ev4 hw_m[ft]pr (pal19/pal1d) insns */
@@ -190,9 +194,20 @@ const struct alpha_operand alpha_operands[] =
/* The 16-bit index for the ev5 hw_m[ft]pr (pal19/pal1d) insns */
#define EV5HWINDEX (EV5HWDISP + 1)
{ 16, 0, -EV5HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
+
+ /* The 16-bit combined index/scoreboard mask for the ev6
+ hw_m[ft]pr (pal19/pal1d) insns */
+#define EV6HWINDEX (EV5HWINDEX + 1)
+ { 16, 0, -EV6HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
+
+ /* The 13-bit branch hint for the ev6 hw_jmp/jsr (pal1e) insn */
+#define EV6HWJMPHINT (EV6HWINDEX+ 1)
+ { 8, 0, -EV6HWJMPHINT,
+ AXP_OPERAND_RELATIVE|AXP_OPERAND_DEFAULT_ZERO|AXP_OPERAND_NOOVERFLOW,
+ insert_ev6hwjhint, extract_ev6hwjhint }
};
-const int alpha_num_operands = sizeof(alpha_operands)/sizeof(*alpha_operands);
+const unsigned alpha_num_operands = sizeof(alpha_operands)/sizeof(*alpha_operands);
/* The RB field when it is the same as the RA field in the same insn.
This operand is marked fake. The insertion function just copies
@@ -203,8 +218,8 @@ const int alpha_num_operands = sizeof(alpha_operands)/sizeof(*alpha_operands);
static unsigned
insert_rba(insn, value, errmsg)
unsigned insn;
- int value;
- const char **errmsg;
+ int value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (((insn >> 21) & 0x1f) << 16);
}
@@ -227,8 +242,8 @@ extract_rba(insn, invalid)
static unsigned
insert_rca(insn, value, errmsg)
unsigned insn;
- int value;
- const char **errmsg;
+ int value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | ((insn >> 21) & 0x1f);
}
@@ -251,8 +266,8 @@ extract_rca(insn, invalid)
static unsigned
insert_za(insn, value, errmsg)
unsigned insn;
- int value;
- const char **errmsg;
+ int value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (31 << 21);
}
@@ -271,8 +286,8 @@ extract_za(insn, invalid)
static unsigned
insert_zb(insn, value, errmsg)
unsigned insn;
- int value;
- const char **errmsg;
+ int value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (31 << 16);
}
@@ -291,8 +306,8 @@ extract_zb(insn, invalid)
static unsigned
insert_zc(insn, value, errmsg)
unsigned insn;
- int value;
- const char **errmsg;
+ int value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | 31;
}
@@ -317,7 +332,7 @@ insert_bdisp(insn, value, errmsg)
const char **errmsg;
{
if (errmsg != (const char **)NULL && (value & 3))
- *errmsg = "branch operand unaligned";
+ *errmsg = _("branch operand unaligned");
return insn | ((value / 4) & 0x1FFFFF);
}
@@ -325,7 +340,7 @@ insert_bdisp(insn, value, errmsg)
static int
extract_bdisp(insn, invalid)
unsigned insn;
- int *invalid;
+ int *invalid ATTRIBUTE_UNUSED;
{
return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
}
@@ -340,19 +355,41 @@ insert_jhint(insn, value, errmsg)
const char **errmsg;
{
if (errmsg != (const char **)NULL && (value & 3))
- *errmsg = "jump hint unaligned";
- return insn | ((value / 4) & 0xFFFF);
+ *errmsg = _("jump hint unaligned");
+ return insn | ((value / 4) & 0x3FFF);
}
/*ARGSUSED*/
static int
extract_jhint(insn, invalid)
unsigned insn;
- int *invalid;
+ int *invalid ATTRIBUTE_UNUSED;
{
return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
}
+/* The hint field of an EV6 HW_JMP/JSR insn. */
+
+static unsigned
+insert_ev6hwjhint(insn, value, errmsg)
+ unsigned insn;
+ int value;
+ const char **errmsg;
+{
+ if (errmsg != (const char **)NULL && (value & 3))
+ *errmsg = _("jump hint unaligned");
+ return insn | ((value / 4) & 0x1FFF);
+}
+
+/*ARGSUSED*/
+static int
+extract_ev6hwjhint(insn, invalid)
+ unsigned insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
+}
+
/* Macros used to form opcodes */
@@ -412,10 +449,19 @@ extract_jhint(insn, invalid)
#define EV5HWMEM_MASK (OP_MASK | 0xF800)
#define EV5HWMEM(oo,f) EV5HWMEM_(oo,f), EV5HWMEM_MASK
+#define EV6HWMEM_(oo,f) (OP(oo) | (((f) & 0xF) << 12))
+#define EV6HWMEM_MASK (OP_MASK | 0xF000)
+#define EV6HWMEM(oo,f) EV6HWMEM_(oo,f), EV6HWMEM_MASK
+
+#define EV6HWMBR_(oo,h) (OP(oo) | (((h) & 7) << 13))
+#define EV6HWMBR_MASK (OP_MASK | 0xE000)
+#define EV6HWMBR(oo,h) EV6HWMBR_(oo,h), EV6HWMBR_MASK
+
/* Abbreviations for instruction subsets. */
#define BASE AXP_OPCODE_BASE
#define EV4 AXP_OPCODE_EV4
#define EV5 AXP_OPCODE_EV5
+#define EV6 AXP_OPCODE_EV6
#define BWX AXP_OPCODE_BWX
#define CIX AXP_OPCODE_CIX
#define MAX AXP_OPCODE_MAX
@@ -436,7 +482,7 @@ extract_jhint(insn, invalid)
#define ARG_EV4HWMEM { RA, EV4HWDISP, PRB }
#define ARG_EV4HWMPR { RA, RBA, EV4HWINDEX }
#define ARG_EV5HWMEM { RA, EV5HWDISP, PRB }
-
+#define ARG_EV6HWMEM { RA, EV6HWDISP, PRB }
/* The opcode table.
@@ -560,7 +606,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "and", OPR(0x11,0x00), BASE, ARG_OPR },
{ "and", OPRL(0x11,0x00), BASE, ARG_OPRL },
- { "andnot", OPR(0x11,0x08), BASE, ARG_OPR }, /* alias */
+ { "andnot", OPR(0x11,0x08), BASE, ARG_OPR }, /* alias */
{ "andnot", OPRL(0x11,0x08), BASE, ARG_OPRL }, /* alias */
{ "bic", OPR(0x11,0x08), BASE, ARG_OPR },
{ "bic", OPRL(0x11,0x08), BASE, ARG_OPRL },
@@ -573,7 +619,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "mov", OPR(0x11,0x20), BASE, { ZA, RB, RC } }, /* pseudo */
{ "mov", OPR(0x11,0x20), BASE, { RA, RBA, RC } }, /* pseudo */
{ "mov", OPRL(0x11,0x20), BASE, { ZA, LIT, RC } }, /* pseudo */
- { "or", OPR(0x11,0x20), BASE, ARG_OPR }, /* alias */
+ { "or", OPR(0x11,0x20), BASE, ARG_OPR }, /* alias */
{ "or", OPRL(0x11,0x20), BASE, ARG_OPRL }, /* alias */
{ "bis", OPR(0x11,0x20), BASE, ARG_OPR },
{ "bis", OPRL(0x11,0x20), BASE, ARG_OPRL },
@@ -669,12 +715,56 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "mulq/v", OPRL(0x13,0x60), BASE, ARG_OPRL },
{ "itofs", FP(0x14,0x004), CIX, { RA, ZB, FC } },
+ { "sqrtf/c", FP(0x14,0x00A), CIX, ARG_FPZ1 },
+ { "sqrts/c", FP(0x14,0x00B), CIX, ARG_FPZ1 },
{ "itoff", FP(0x14,0x014), CIX, { RA, ZB, FC } },
{ "itoft", FP(0x14,0x024), CIX, { RA, ZB, FC } },
+ { "sqrtg/c", FP(0x14,0x02A), CIX, ARG_FPZ1 },
+ { "sqrtt/c", FP(0x14,0x02B), CIX, ARG_FPZ1 },
+ { "sqrts/m", FP(0x14,0x04B), CIX, ARG_FPZ1 },
+ { "sqrtt/m", FP(0x14,0x06B), CIX, ARG_FPZ1 },
{ "sqrtf", FP(0x14,0x08A), CIX, ARG_FPZ1 },
- { "sqrtg", FP(0x14,0x0AA), CIX, ARG_FPZ1 },
{ "sqrts", FP(0x14,0x08B), CIX, ARG_FPZ1 },
+ { "sqrtg", FP(0x14,0x0AA), CIX, ARG_FPZ1 },
{ "sqrtt", FP(0x14,0x0AB), CIX, ARG_FPZ1 },
+ { "sqrts/d", FP(0x14,0x0CB), CIX, ARG_FPZ1 },
+ { "sqrtt/d", FP(0x14,0x0EB), CIX, ARG_FPZ1 },
+ { "sqrtf/uc", FP(0x14,0x10A), CIX, ARG_FPZ1 },
+ { "sqrts/uc", FP(0x14,0x10B), CIX, ARG_FPZ1 },
+ { "sqrtg/uc", FP(0x14,0x12A), CIX, ARG_FPZ1 },
+ { "sqrtt/uc", FP(0x14,0x12B), CIX, ARG_FPZ1 },
+ { "sqrts/um", FP(0x14,0x14B), CIX, ARG_FPZ1 },
+ { "sqrtt/um", FP(0x14,0x16B), CIX, ARG_FPZ1 },
+ { "sqrtf/u", FP(0x14,0x18A), CIX, ARG_FPZ1 },
+ { "sqrts/u", FP(0x14,0x18B), CIX, ARG_FPZ1 },
+ { "sqrtg/u", FP(0x14,0x1AA), CIX, ARG_FPZ1 },
+ { "sqrtt/u", FP(0x14,0x1AB), CIX, ARG_FPZ1 },
+ { "sqrts/ud", FP(0x14,0x1CB), CIX, ARG_FPZ1 },
+ { "sqrtt/ud", FP(0x14,0x1EB), CIX, ARG_FPZ1 },
+ { "sqrtf/sc", FP(0x14,0x40A), CIX, ARG_FPZ1 },
+ { "sqrtg/sc", FP(0x14,0x42A), CIX, ARG_FPZ1 },
+ { "sqrtf/s", FP(0x14,0x48A), CIX, ARG_FPZ1 },
+ { "sqrtg/s", FP(0x14,0x4AA), CIX, ARG_FPZ1 },
+ { "sqrtf/suc", FP(0x14,0x50A), CIX, ARG_FPZ1 },
+ { "sqrts/suc", FP(0x14,0x50B), CIX, ARG_FPZ1 },
+ { "sqrtg/suc", FP(0x14,0x52A), CIX, ARG_FPZ1 },
+ { "sqrtt/suc", FP(0x14,0x52B), CIX, ARG_FPZ1 },
+ { "sqrts/sum", FP(0x14,0x54B), CIX, ARG_FPZ1 },
+ { "sqrtt/sum", FP(0x14,0x56B), CIX, ARG_FPZ1 },
+ { "sqrtf/su", FP(0x14,0x58A), CIX, ARG_FPZ1 },
+ { "sqrts/su", FP(0x14,0x58B), CIX, ARG_FPZ1 },
+ { "sqrtg/su", FP(0x14,0x5AA), CIX, ARG_FPZ1 },
+ { "sqrtt/su", FP(0x14,0x5AB), CIX, ARG_FPZ1 },
+ { "sqrts/sud", FP(0x14,0x5CB), CIX, ARG_FPZ1 },
+ { "sqrtt/sud", FP(0x14,0x5EB), CIX, ARG_FPZ1 },
+ { "sqrts/suic", FP(0x14,0x70B), CIX, ARG_FPZ1 },
+ { "sqrtt/suic", FP(0x14,0x72B), CIX, ARG_FPZ1 },
+ { "sqrts/suim", FP(0x14,0x74B), CIX, ARG_FPZ1 },
+ { "sqrtt/suim", FP(0x14,0x76B), CIX, ARG_FPZ1 },
+ { "sqrts/sui", FP(0x14,0x78B), CIX, ARG_FPZ1 },
+ { "sqrtt/sui", FP(0x14,0x7AB), CIX, ARG_FPZ1 },
+ { "sqrts/suid", FP(0x14,0x7CB), CIX, ARG_FPZ1 },
+ { "sqrtt/suid", FP(0x14,0x7EB), CIX, ARG_FPZ1 },
{ "addf/c", FP(0x15,0x000), BASE, ARG_FP },
{ "subf/c", FP(0x15,0x001), BASE, ARG_FP },
@@ -1006,16 +1096,17 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "excb", MFC(0x18,0x0400), BASE, ARG_NONE },
{ "mb", MFC(0x18,0x4000), BASE, ARG_NONE },
{ "wmb", MFC(0x18,0x4400), BASE, ARG_NONE },
- { "fetch", MFC(0x18,0x8000), BASE, { PRB } },
- { "fetch_m", MFC(0x18,0xA000), BASE, { PRB } },
+ { "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } },
+ { "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } },
{ "rpcc", MFC(0x18,0xC000), BASE, { RA } },
{ "rc", MFC(0x18,0xE000), BASE, { RA } },
- { "ecb", MFC(0x18,0xE800), BASE, { PRB } }, /* ev56 una */
+ { "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */
{ "rs", MFC(0x18,0xF000), BASE, { RA } },
- { "wh64", MFC(0x18,0xF800), BASE, { PRB } }, /* ev56 una */
+ { "wh64", MFC(0x18,0xF800), BASE, { ZA, PRB } }, /* ev56 una */
{ "hw_mfpr", OPR(0x19,0x00), EV4, { RA, RBA, EV4EXTHWINDEX } },
{ "hw_mfpr", OP(0x19), OP_MASK, EV5, { RA, RBA, EV5HWINDEX } },
+ { "hw_mfpr", OP(0x19), OP_MASK, EV6, { RA, ZB, EV6HWINDEX } },
{ "hw_mfpr/i", OPR(0x19,0x01), EV4, ARG_EV4HWMPR },
{ "hw_mfpr/a", OPR(0x19,0x02), EV4, ARG_EV4HWMPR },
{ "hw_mfpr/ai", OPR(0x19,0x03), EV4, ARG_EV4HWMPR },
@@ -1033,8 +1124,10 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldl", EV4HWMEM(0x1B,0x0), EV4, ARG_EV4HWMEM },
{ "hw_ldl", EV5HWMEM(0x1B,0x00), EV5, ARG_EV5HWMEM },
+ { "hw_ldl", EV6HWMEM(0x1B,0x8), EV6, ARG_EV6HWMEM },
{ "hw_ldl/a", EV4HWMEM(0x1B,0x4), EV4, ARG_EV4HWMEM },
{ "hw_ldl/a", EV5HWMEM(0x1B,0x10), EV5, ARG_EV5HWMEM },
+ { "hw_ldl/a", EV6HWMEM(0x1B,0xC), EV6, ARG_EV6HWMEM },
{ "hw_ldl/al", EV5HWMEM(0x1B,0x11), EV5, ARG_EV5HWMEM },
{ "hw_ldl/ar", EV4HWMEM(0x1B,0x6), EV4, ARG_EV4HWMEM },
{ "hw_ldl/av", EV5HWMEM(0x1B,0x12), EV5, ARG_EV5HWMEM },
@@ -1046,6 +1139,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldl/l", EV5HWMEM(0x1B,0x01), EV5, ARG_EV5HWMEM },
{ "hw_ldl/p", EV4HWMEM(0x1B,0x8), EV4, ARG_EV4HWMEM },
{ "hw_ldl/p", EV5HWMEM(0x1B,0x20), EV5, ARG_EV5HWMEM },
+ { "hw_ldl/p", EV6HWMEM(0x1B,0x0), EV6, ARG_EV6HWMEM },
{ "hw_ldl/pa", EV4HWMEM(0x1B,0xC), EV4, ARG_EV4HWMEM },
{ "hw_ldl/pa", EV5HWMEM(0x1B,0x30), EV5, ARG_EV5HWMEM },
{ "hw_ldl/pal", EV5HWMEM(0x1B,0x31), EV5, ARG_EV5HWMEM },
@@ -1066,8 +1160,11 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldl/pwvl", EV5HWMEM(0x1B,0x2b), EV5, ARG_EV5HWMEM },
{ "hw_ldl/r", EV4HWMEM(0x1B,0x2), EV4, ARG_EV4HWMEM },
{ "hw_ldl/v", EV5HWMEM(0x1B,0x02), EV5, ARG_EV5HWMEM },
+ { "hw_ldl/v", EV6HWMEM(0x1B,0x4), EV6, ARG_EV6HWMEM },
{ "hw_ldl/vl", EV5HWMEM(0x1B,0x03), EV5, ARG_EV5HWMEM },
{ "hw_ldl/w", EV5HWMEM(0x1B,0x08), EV5, ARG_EV5HWMEM },
+ { "hw_ldl/w", EV6HWMEM(0x1B,0xA), EV6, ARG_EV6HWMEM },
+ { "hw_ldl/wa", EV6HWMEM(0x1B,0xE), EV6, ARG_EV6HWMEM },
{ "hw_ldl/wl", EV5HWMEM(0x1B,0x09), EV5, ARG_EV5HWMEM },
{ "hw_ldl/wv", EV5HWMEM(0x1B,0x0a), EV5, ARG_EV5HWMEM },
{ "hw_ldl/wvl", EV5HWMEM(0x1B,0x0b), EV5, ARG_EV5HWMEM },
@@ -1077,6 +1174,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldl_l/aw", EV5HWMEM(0x1B,0x19), EV5, ARG_EV5HWMEM },
{ "hw_ldl_l/awv", EV5HWMEM(0x1B,0x1b), EV5, ARG_EV5HWMEM },
{ "hw_ldl_l/p", EV5HWMEM(0x1B,0x21), EV5, ARG_EV5HWMEM },
+ { "hw_ldl_l/p", EV6HWMEM(0x1B,0x2), EV6, ARG_EV6HWMEM },
{ "hw_ldl_l/pa", EV5HWMEM(0x1B,0x31), EV5, ARG_EV5HWMEM },
{ "hw_ldl_l/pav", EV5HWMEM(0x1B,0x33), EV5, ARG_EV5HWMEM },
{ "hw_ldl_l/paw", EV5HWMEM(0x1B,0x39), EV5, ARG_EV5HWMEM },
@@ -1089,8 +1187,10 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldl_l/wv", EV5HWMEM(0x1B,0x0b), EV5, ARG_EV5HWMEM },
{ "hw_ldq", EV4HWMEM(0x1B,0x1), EV4, ARG_EV4HWMEM },
{ "hw_ldq", EV5HWMEM(0x1B,0x04), EV5, ARG_EV5HWMEM },
+ { "hw_ldq", EV6HWMEM(0x1B,0x9), EV6, ARG_EV6HWMEM },
{ "hw_ldq/a", EV4HWMEM(0x1B,0x5), EV4, ARG_EV4HWMEM },
{ "hw_ldq/a", EV5HWMEM(0x1B,0x14), EV5, ARG_EV5HWMEM },
+ { "hw_ldq/a", EV6HWMEM(0x1B,0xD), EV6, ARG_EV6HWMEM },
{ "hw_ldq/al", EV5HWMEM(0x1B,0x15), EV5, ARG_EV5HWMEM },
{ "hw_ldq/ar", EV4HWMEM(0x1B,0x7), EV4, ARG_EV4HWMEM },
{ "hw_ldq/av", EV5HWMEM(0x1B,0x16), EV5, ARG_EV5HWMEM },
@@ -1102,6 +1202,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldq/l", EV5HWMEM(0x1B,0x05), EV5, ARG_EV5HWMEM },
{ "hw_ldq/p", EV4HWMEM(0x1B,0x9), EV4, ARG_EV4HWMEM },
{ "hw_ldq/p", EV5HWMEM(0x1B,0x24), EV5, ARG_EV5HWMEM },
+ { "hw_ldq/p", EV6HWMEM(0x1B,0x1), EV6, ARG_EV6HWMEM },
{ "hw_ldq/pa", EV4HWMEM(0x1B,0xD), EV4, ARG_EV4HWMEM },
{ "hw_ldq/pa", EV5HWMEM(0x1B,0x34), EV5, ARG_EV5HWMEM },
{ "hw_ldq/pal", EV5HWMEM(0x1B,0x35), EV5, ARG_EV5HWMEM },
@@ -1122,8 +1223,11 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldq/pwvl", EV5HWMEM(0x1B,0x2f), EV5, ARG_EV5HWMEM },
{ "hw_ldq/r", EV4HWMEM(0x1B,0x3), EV4, ARG_EV4HWMEM },
{ "hw_ldq/v", EV5HWMEM(0x1B,0x06), EV5, ARG_EV5HWMEM },
+ { "hw_ldq/v", EV6HWMEM(0x1B,0x5), EV6, ARG_EV6HWMEM },
{ "hw_ldq/vl", EV5HWMEM(0x1B,0x07), EV5, ARG_EV5HWMEM },
{ "hw_ldq/w", EV5HWMEM(0x1B,0x0c), EV5, ARG_EV5HWMEM },
+ { "hw_ldq/w", EV6HWMEM(0x1B,0xB), EV6, ARG_EV6HWMEM },
+ { "hw_ldq/wa", EV6HWMEM(0x1B,0xF), EV6, ARG_EV6HWMEM },
{ "hw_ldq/wl", EV5HWMEM(0x1B,0x0d), EV5, ARG_EV5HWMEM },
{ "hw_ldq/wv", EV5HWMEM(0x1B,0x0e), EV5, ARG_EV5HWMEM },
{ "hw_ldq/wvl", EV5HWMEM(0x1B,0x0f), EV5, ARG_EV5HWMEM },
@@ -1133,6 +1237,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_ldq_l/aw", EV5HWMEM(0x1B,0x1d), EV5, ARG_EV5HWMEM },
{ "hw_ldq_l/awv", EV5HWMEM(0x1B,0x1f), EV5, ARG_EV5HWMEM },
{ "hw_ldq_l/p", EV5HWMEM(0x1B,0x25), EV5, ARG_EV5HWMEM },
+ { "hw_ldq_l/p", EV6HWMEM(0x1B,0x3), EV6, ARG_EV6HWMEM },
{ "hw_ldq_l/pa", EV5HWMEM(0x1B,0x35), EV5, ARG_EV5HWMEM },
{ "hw_ldq_l/pav", EV5HWMEM(0x1B,0x37), EV5, ARG_EV5HWMEM },
{ "hw_ldq_l/paw", EV5HWMEM(0x1B,0x3d), EV5, ARG_EV5HWMEM },
@@ -1256,6 +1361,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_mtpr", OPR(0x1D,0x00), EV4, { RA, RBA, EV4EXTHWINDEX } },
{ "hw_mtpr", OP(0x1D), OP_MASK, EV5, { RA, RBA, EV5HWINDEX } },
+ { "hw_mtpr", OP(0x1D), OP_MASK, EV6, { ZA, RB, EV6HWINDEX } },
{ "hw_mtpr/i", OPR(0x1D,0x01), EV4, ARG_EV4HWMPR },
{ "hw_mtpr/a", OPR(0x1D,0x02), EV4, ARG_EV4HWMPR },
{ "hw_mtpr/ai", OPR(0x1D,0x03), EV4, ARG_EV4HWMPR },
@@ -1267,12 +1373,24 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_rei", SPCD(0x1E,0x3FF8000), EV4|EV5, ARG_NONE },
{ "hw_rei_stall", SPCD(0x1E,0x3FFC000), EV5, ARG_NONE },
+ { "hw_jmp", EV6HWMBR(0x1E,0x0), EV6, { ZA, PRB, EV6HWJMPHINT } },
+ { "hw_jsr", EV6HWMBR(0x1E,0x2), EV6, { ZA, PRB, EV6HWJMPHINT } },
+ { "hw_ret", EV6HWMBR(0x1E,0x4), EV6, { ZA, PRB } },
+ { "hw_jcr", EV6HWMBR(0x1E,0x6), EV6, { ZA, PRB } },
+ { "hw_coroutine", EV6HWMBR(0x1E,0x6), EV6, { ZA, PRB } }, /* alias */
+ { "hw_jmp/stall", EV6HWMBR(0x1E,0x1), EV6, { ZA, PRB, EV6HWJMPHINT } },
+ { "hw_jsr/stall", EV6HWMBR(0x1E,0x3), EV6, { ZA, PRB, EV6HWJMPHINT } },
+ { "hw_ret/stall", EV6HWMBR(0x1E,0x5), EV6, { ZA, PRB } },
+ { "hw_jcr/stall", EV6HWMBR(0x1E,0x7), EV6, { ZA, PRB } },
+ { "hw_coroutine/stall", EV6HWMBR(0x1E,0x7), EV6, { ZA, PRB } }, /* alias */
{ "pal1e", PCD(0x1E), BASE, ARG_PCD },
{ "hw_stl", EV4HWMEM(0x1F,0x0), EV4, ARG_EV4HWMEM },
{ "hw_stl", EV5HWMEM(0x1F,0x00), EV5, ARG_EV5HWMEM },
+ { "hw_stl", EV6HWMEM(0x1F,0x4), EV6, ARG_EV6HWMEM }, /* ??? 8 */
{ "hw_stl/a", EV4HWMEM(0x1F,0x4), EV4, ARG_EV4HWMEM },
{ "hw_stl/a", EV5HWMEM(0x1F,0x10), EV5, ARG_EV5HWMEM },
+ { "hw_stl/a", EV6HWMEM(0x1F,0xC), EV6, ARG_EV6HWMEM },
{ "hw_stl/ac", EV5HWMEM(0x1F,0x11), EV5, ARG_EV5HWMEM },
{ "hw_stl/ar", EV4HWMEM(0x1F,0x6), EV4, ARG_EV4HWMEM },
{ "hw_stl/av", EV5HWMEM(0x1F,0x12), EV5, ARG_EV5HWMEM },
@@ -1280,6 +1398,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_stl/c", EV5HWMEM(0x1F,0x01), EV5, ARG_EV5HWMEM },
{ "hw_stl/p", EV4HWMEM(0x1F,0x8), EV4, ARG_EV4HWMEM },
{ "hw_stl/p", EV5HWMEM(0x1F,0x20), EV5, ARG_EV5HWMEM },
+ { "hw_stl/p", EV6HWMEM(0x1F,0x0), EV6, ARG_EV6HWMEM },
{ "hw_stl/pa", EV4HWMEM(0x1F,0xC), EV4, ARG_EV4HWMEM },
{ "hw_stl/pa", EV5HWMEM(0x1F,0x30), EV5, ARG_EV5HWMEM },
{ "hw_stl/pac", EV5HWMEM(0x1F,0x31), EV5, ARG_EV5HWMEM },
@@ -1296,14 +1415,17 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_stl_c/a", EV5HWMEM(0x1F,0x11), EV5, ARG_EV5HWMEM },
{ "hw_stl_c/av", EV5HWMEM(0x1F,0x13), EV5, ARG_EV5HWMEM },
{ "hw_stl_c/p", EV5HWMEM(0x1F,0x21), EV5, ARG_EV5HWMEM },
+ { "hw_stl_c/p", EV6HWMEM(0x1F,0x2), EV6, ARG_EV6HWMEM },
{ "hw_stl_c/pa", EV5HWMEM(0x1F,0x31), EV5, ARG_EV5HWMEM },
{ "hw_stl_c/pav", EV5HWMEM(0x1F,0x33), EV5, ARG_EV5HWMEM },
{ "hw_stl_c/pv", EV5HWMEM(0x1F,0x23), EV5, ARG_EV5HWMEM },
{ "hw_stl_c/v", EV5HWMEM(0x1F,0x03), EV5, ARG_EV5HWMEM },
{ "hw_stq", EV4HWMEM(0x1F,0x1), EV4, ARG_EV4HWMEM },
{ "hw_stq", EV5HWMEM(0x1F,0x04), EV5, ARG_EV5HWMEM },
+ { "hw_stq", EV6HWMEM(0x1F,0x5), EV6, ARG_EV6HWMEM }, /* ??? 9 */
{ "hw_stq/a", EV4HWMEM(0x1F,0x5), EV4, ARG_EV4HWMEM },
{ "hw_stq/a", EV5HWMEM(0x1F,0x14), EV5, ARG_EV5HWMEM },
+ { "hw_stq/a", EV6HWMEM(0x1F,0xD), EV6, ARG_EV6HWMEM },
{ "hw_stq/ac", EV5HWMEM(0x1F,0x15), EV5, ARG_EV5HWMEM },
{ "hw_stq/ar", EV4HWMEM(0x1F,0x7), EV4, ARG_EV4HWMEM },
{ "hw_stq/av", EV5HWMEM(0x1F,0x16), EV5, ARG_EV5HWMEM },
@@ -1311,6 +1433,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_stq/c", EV5HWMEM(0x1F,0x05), EV5, ARG_EV5HWMEM },
{ "hw_stq/p", EV4HWMEM(0x1F,0x9), EV4, ARG_EV4HWMEM },
{ "hw_stq/p", EV5HWMEM(0x1F,0x24), EV5, ARG_EV5HWMEM },
+ { "hw_stq/p", EV6HWMEM(0x1F,0x1), EV6, ARG_EV6HWMEM },
{ "hw_stq/pa", EV4HWMEM(0x1F,0xD), EV4, ARG_EV4HWMEM },
{ "hw_stq/pa", EV5HWMEM(0x1F,0x34), EV5, ARG_EV5HWMEM },
{ "hw_stq/pac", EV5HWMEM(0x1F,0x35), EV5, ARG_EV5HWMEM },
@@ -1329,6 +1452,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "hw_stq_c/a", EV5HWMEM(0x1F,0x15), EV5, ARG_EV5HWMEM },
{ "hw_stq_c/av", EV5HWMEM(0x1F,0x17), EV5, ARG_EV5HWMEM },
{ "hw_stq_c/p", EV5HWMEM(0x1F,0x25), EV5, ARG_EV5HWMEM },
+ { "hw_stq_c/p", EV6HWMEM(0x1F,0x3), EV6, ARG_EV6HWMEM },
{ "hw_stq_c/pa", EV5HWMEM(0x1F,0x35), EV5, ARG_EV5HWMEM },
{ "hw_stq_c/pav", EV5HWMEM(0x1F,0x37), EV5, ARG_EV5HWMEM },
{ "hw_stq_c/pv", EV5HWMEM(0x1F,0x27), EV5, ARG_EV5HWMEM },
@@ -1419,4 +1543,4 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "bgt", BRA(0x3F), BASE, ARG_BRA },
};
-const int alpha_num_opcodes = sizeof(alpha_opcodes)/sizeof(*alpha_opcodes);
+const unsigned alpha_num_opcodes = sizeof(alpha_opcodes)/sizeof(*alpha_opcodes);
diff --git a/contrib/binutils/opcodes/arc-dis.c b/contrib/binutils/opcodes/arc-dis.c
index 3a597aa..03f1379 100644
--- a/contrib/binutils/opcodes/arc-dis.c
+++ b/contrib/binutils/opcodes/arc-dis.c
@@ -16,10 +16,12 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include "sysdep.h"
#include "dis-asm.h"
#include "opcode/arc.h"
#include "elf-bfd.h"
#include "elf/arc.h"
+#include "opintl.h"
static int print_insn_arc_base_little PARAMS ((bfd_vma, disassemble_info *));
static int print_insn_arc_base_big PARAMS ((bfd_vma, disassemble_info *));
@@ -227,7 +229,7 @@ print_insn (pc, info, mach, big_p)
return got_limm_p ? 8 : 4;
}
- (*func) (stream, "*unknown*");
+ (*func) (stream, _("*unknown*"));
return 4;
}
diff --git a/contrib/binutils/opcodes/arc-opc.c b/contrib/binutils/opcodes/arc-opc.c
index 5ee928b..f17ffc0 100644
--- a/contrib/binutils/opcodes/arc-opc.c
+++ b/contrib/binutils/opcodes/arc-opc.c
@@ -1,5 +1,5 @@
/* Opcode table for the ARC.
- Copyright 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (c) 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,9 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
-#include "ansidecl.h"
+#include "sysdep.h"
#include "opcode/arc.h"
+#include "opintl.h"
#ifndef NULL
#define NULL 0
@@ -625,7 +626,7 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
}
else
{
- *errmsg = "unable to fit different valued constants into instruction";
+ *errmsg = _("unable to fit different valued constants into instruction");
}
}
else
@@ -635,7 +636,7 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
if (reg->type == AUXREG)
{
if (!(mods & ARC_MOD_AUXREG))
- *errmsg = "auxiliary register not allowed here";
+ *errmsg = _("auxiliary register not allowed here");
else
{
insn |= ARC_REG_SHIMM << operand->shift;
@@ -647,7 +648,8 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
/* We should never get an invalid register number here. */
if ((unsigned int) reg->value > 60)
{
- sprintf (buf, "invalid register number `%d'", reg->value);
+ /* xgettext:c-format */
+ sprintf (buf, _("invalid register number `%d'"), reg->value);
*errmsg = buf;
}
else
@@ -769,7 +771,8 @@ insert_shimmoffset (insn, operand, mods, reg, value, errmsg)
}
if (value < minval || value > maxval)
{
- sprintf (buf, "value won't fit in range %ld - %ld",
+ /* xgettext:c-format */
+ sprintf (buf, _("value won't fit in range %ld - %ld"),
minval, maxval);
*errmsg = buf;
}
@@ -865,7 +868,7 @@ insert_reladdr (insn, operand, mods, reg, value, errmsg)
const char **errmsg;
{
if (value & 3)
- *errmsg = "branch address not on 4 byte boundary";
+ *errmsg = _("branch address not on 4 byte boundary");
insn |= ((value >> 2) & ((1 << operand->bits) - 1)) << operand->shift;
return insn;
}
diff --git a/contrib/binutils/opcodes/arm-dis.c b/contrib/binutils/opcodes/arm-dis.c
new file mode 100644
index 0000000..f131ada
--- /dev/null
+++ b/contrib/binutils/opcodes/arm-dis.c
@@ -0,0 +1,1065 @@
+/* Instruction printing code for the ARM
+ Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+ Modification by James G. Smith (jsmith@cygnus.co.uk)
+
+This file is part of libopcodes.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "sysdep.h"
+#include "dis-asm.h"
+#define DEFINE_TABLE
+#include "arm-opc.h"
+#include "coff/internal.h"
+#include "libcoff.h"
+#include "opintl.h"
+
+/* FIXME: This shouldn't be done here */
+#include "elf-bfd.h"
+#include "elf/internal.h"
+#include "elf/arm.h"
+
+#ifndef streq
+#define streq(a,b) (strcmp ((a), (b)) == 0)
+#endif
+
+#ifndef strneq
+#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
+#endif
+
+#ifndef NUM_ELEM
+#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
+#endif
+
+static char * arm_conditional[] =
+{"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
+ "hi", "ls", "ge", "lt", "gt", "le", "", "nv"};
+
+typedef struct
+{
+ const char * name;
+ const char * description;
+ const char * reg_names[16];
+}
+arm_regname;
+
+static arm_regname regnames[] =
+{
+ { "raw" , "Select raw register names",
+ { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
+ { "std", "Select register names used in ARM's ISA documentation",
+ { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc" }},
+ { "apcs", "Select register names used in the APCS",
+ { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl", "fp", "ip", "sp", "lr", "pc" }},
+ { "atpcs", "Select register names used in the ATPCS",
+ { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "IP", "SP", "LR", "PC" }},
+ { "special-atpcs", "Select special register names used in the ATPCS",
+ { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }}
+};
+
+/* Default to standard register name set. */
+static unsigned int regname_selected = 1;
+
+#define NUM_ARM_REGNAMES NUM_ELEM (regnames)
+#define arm_regnames regnames[regname_selected].reg_names
+
+static boolean force_thumb = false;
+
+static char * arm_fp_const[] =
+{"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
+
+static char * arm_shift[] =
+{"lsl", "lsr", "asr", "ror"};
+
+/* Forward declarations. */
+static void arm_decode_shift PARAMS ((long, fprintf_ftype, void *));
+static int print_insn_arm PARAMS ((bfd_vma, struct disassemble_info *, long));
+static int print_insn_thumb PARAMS ((bfd_vma, struct disassemble_info *, long));
+static void parse_disassembler_options PARAMS ((char *));
+static int print_insn PARAMS ((bfd_vma, struct disassemble_info *, boolean));
+int get_arm_regname_num_options (void);
+int set_arm_regname_option (int option);
+int get_arm_regnames (int option, const char **setname,
+ const char **setdescription,
+ const char ***register_names);
+
+/* Functions. */
+int
+get_arm_regname_num_options (void)
+{
+ return NUM_ARM_REGNAMES;
+}
+
+int
+set_arm_regname_option (int option)
+{
+ int old = regname_selected;
+ regname_selected = option;
+ return old;
+}
+
+int
+get_arm_regnames (int option, const char **setname,
+ const char **setdescription,
+ const char ***register_names)
+{
+ *setname = regnames[option].name;
+ *setdescription = regnames[option].description;
+ *register_names = regnames[option].reg_names;
+ return 16;
+}
+
+static void
+arm_decode_shift (given, func, stream)
+ long given;
+ fprintf_ftype func;
+ void * stream;
+{
+ func (stream, "%s", arm_regnames[given & 0xf]);
+
+ if ((given & 0xff0) != 0)
+ {
+ if ((given & 0x10) == 0)
+ {
+ int amount = (given & 0xf80) >> 7;
+ int shift = (given & 0x60) >> 5;
+
+ if (amount == 0)
+ {
+ if (shift == 3)
+ {
+ func (stream, ", rrx");
+ return;
+ }
+
+ amount = 32;
+ }
+
+ func (stream, ", %s #%d", arm_shift[shift], amount);
+ }
+ else
+ func (stream, ", %s %s", arm_shift[(given & 0x60) >> 5],
+ arm_regnames[(given & 0xf00) >> 8]);
+ }
+}
+
+/* Print one instruction from PC on INFO->STREAM.
+ Return the size of the instruction (always 4 on ARM). */
+static int
+print_insn_arm (pc, info, given)
+ bfd_vma pc;
+ struct disassemble_info * info;
+ long given;
+{
+ struct arm_opcode * insn;
+ void * stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ for (insn = arm_opcodes; insn->assembler; insn++)
+ {
+ if ((given & insn->mask) == insn->value)
+ {
+ char * c;
+
+ for (c = insn->assembler; *c; c++)
+ {
+ if (*c == '%')
+ {
+ switch (*++c)
+ {
+ case '%':
+ func (stream, "%%");
+ break;
+
+ case 'a':
+ if (((given & 0x000f0000) == 0x000f0000)
+ && ((given & 0x02000000) == 0))
+ {
+ int offset = given & 0xfff;
+
+ func (stream, "[pc");
+
+ if (given & 0x01000000)
+ {
+ if ((given & 0x00800000) == 0)
+ offset = - offset;
+
+ /* pre-indexed */
+ func (stream, ", #%x]", offset);
+
+ offset += pc + 8;
+
+ /* Cope with the possibility of write-back
+ being used. Probably a very dangerous thing
+ for the programmer to do, but who are we to
+ argue ? */
+ if (given & 0x00200000)
+ func (stream, "!");
+ }
+ else
+ {
+ /* Post indexed. */
+ func (stream, "], #%x", offset);
+
+ offset = pc + 8; /* ie ignore the offset. */
+ }
+
+ func (stream, "\t; ");
+ info->print_address_func (offset, info);
+ }
+ else
+ {
+ func (stream, "[%s",
+ arm_regnames[(given >> 16) & 0xf]);
+ if ((given & 0x01000000) != 0)
+ {
+ if ((given & 0x02000000) == 0)
+ {
+ int offset = given & 0xfff;
+ if (offset)
+ func (stream, ", %s#%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ }
+ else
+ {
+ func (stream, ", %s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""));
+ arm_decode_shift (given, func, stream);
+ }
+
+ func (stream, "]%s",
+ ((given & 0x00200000) != 0) ? "!" : "");
+ }
+ else
+ {
+ if ((given & 0x02000000) == 0)
+ {
+ int offset = given & 0xfff;
+ if (offset)
+ func (stream, "], %s#%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ else
+ func (stream, "]");
+ }
+ else
+ {
+ func (stream, "], %s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""));
+ arm_decode_shift (given, func, stream);
+ }
+ }
+ }
+ break;
+
+ case 's':
+ if ((given & 0x004f0000) == 0x004f0000)
+ {
+ /* PC relative with immediate offset. */
+ int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+
+ if ((given & 0x00800000) == 0)
+ offset = -offset;
+
+ func (stream, "[pc, #%x]\t; ", offset);
+
+ (*info->print_address_func)
+ (offset + pc + 8, info);
+ }
+ else
+ {
+ func (stream, "[%s",
+ arm_regnames[(given >> 16) & 0xf]);
+ if ((given & 0x01000000) != 0)
+ {
+ /* Pre-indexed. */
+ if ((given & 0x00400000) == 0x00400000)
+ {
+ /* Immediate. */
+ int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+ if (offset)
+ func (stream, ", %s#%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ }
+ else
+ {
+ /* Register. */
+ func (stream, ", %s%s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""),
+ arm_regnames[given & 0xf]);
+ }
+
+ func (stream, "]%s",
+ ((given & 0x00200000) != 0) ? "!" : "");
+ }
+ else
+ {
+ /* Post-indexed. */
+ if ((given & 0x00400000) == 0x00400000)
+ {
+ /* Immediate. */
+ int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+ if (offset)
+ func (stream, "], %s#%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ else
+ func (stream, "]");
+ }
+ else
+ {
+ /* Register. */
+ func (stream, "], %s%s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""),
+ arm_regnames[given & 0xf]);
+ }
+ }
+ }
+ break;
+
+ case 'b':
+ (*info->print_address_func)
+ (BDISP (given) * 4 + pc + 8, info);
+ break;
+
+ case 'c':
+ func (stream, "%s",
+ arm_conditional [(given >> 28) & 0xf]);
+ break;
+
+ case 'm':
+ {
+ int started = 0;
+ int reg;
+
+ func (stream, "{");
+ for (reg = 0; reg < 16; reg++)
+ if ((given & (1 << reg)) != 0)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ func (stream, "}");
+ }
+ break;
+
+ case 'o':
+ if ((given & 0x02000000) != 0)
+ {
+ int rotate = (given & 0xf00) >> 7;
+ int immed = (given & 0xff);
+ immed = (((immed << (32 - rotate))
+ | (immed >> rotate)) & 0xffffffff);
+ func (stream, "#%d\t; 0x%x", immed, immed);
+ }
+ else
+ arm_decode_shift (given, func, stream);
+ break;
+
+ case 'p':
+ if ((given & 0x0000f000) == 0x0000f000)
+ func (stream, "p");
+ break;
+
+ case 't':
+ if ((given & 0x01200000) == 0x00200000)
+ func (stream, "t");
+ break;
+
+ case 'h':
+ if ((given & 0x00000020) == 0x00000020)
+ func (stream, "h");
+ else
+ func (stream, "b");
+ break;
+
+ case 'A':
+ func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
+ if ((given & 0x01000000) != 0)
+ {
+ int offset = given & 0xff;
+ if (offset)
+ func (stream, ", %s#%d]%s",
+ ((given & 0x00800000) == 0 ? "-" : ""),
+ offset * 4,
+ ((given & 0x00200000) != 0 ? "!" : ""));
+ else
+ func (stream, "]");
+ }
+ else
+ {
+ int offset = given & 0xff;
+ if (offset)
+ func (stream, "], %s#%d",
+ ((given & 0x00800000) == 0 ? "-" : ""),
+ offset * 4);
+ else
+ func (stream, "]");
+ }
+ break;
+
+ case 'C':
+ switch (given & 0x00090000)
+ {
+ default:
+ func (stream, "_???");
+ break;
+ case 0x90000:
+ func (stream, "_all");
+ break;
+ case 0x10000:
+ func (stream, "_ctl");
+ break;
+ case 0x80000:
+ func (stream, "_flg");
+ break;
+ }
+ break;
+
+ case 'F':
+ switch (given & 0x00408000)
+ {
+ case 0:
+ func (stream, "4");
+ break;
+ case 0x8000:
+ func (stream, "1");
+ break;
+ case 0x00400000:
+ func (stream, "2");
+ break;
+ default:
+ func (stream, "3");
+ }
+ break;
+
+ case 'P':
+ switch (given & 0x00080080)
+ {
+ case 0:
+ func (stream, "s");
+ break;
+ case 0x80:
+ func (stream, "d");
+ break;
+ case 0x00080000:
+ func (stream, "e");
+ break;
+ default:
+ func (stream, _("<illegal precision>"));
+ break;
+ }
+ break;
+ case 'Q':
+ switch (given & 0x00408000)
+ {
+ case 0:
+ func (stream, "s");
+ break;
+ case 0x8000:
+ func (stream, "d");
+ break;
+ case 0x00400000:
+ func (stream, "e");
+ break;
+ default:
+ func (stream, "p");
+ break;
+ }
+ break;
+ case 'R':
+ switch (given & 0x60)
+ {
+ case 0:
+ break;
+ case 0x20:
+ func (stream, "p");
+ break;
+ case 0x40:
+ func (stream, "m");
+ break;
+ default:
+ func (stream, "z");
+ break;
+ }
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ int bitstart = *c++ - '0';
+ int bitend = 0;
+ while (*c >= '0' && *c <= '9')
+ bitstart = (bitstart * 10) + *c++ - '0';
+
+ switch (*c)
+ {
+ case '-':
+ c++;
+
+ while (*c >= '0' && *c <= '9')
+ bitend = (bitend * 10) + *c++ - '0';
+
+ if (!bitend)
+ abort ();
+
+ switch (*c)
+ {
+ case 'r':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ break;
+ case 'd':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%d", reg);
+ }
+ break;
+ case 'x':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "0x%08x", reg);
+
+ /* Some SWI instructions have special
+ meanings. */
+ if ((given & 0x0fffffff) == 0x0FF00000)
+ func (stream, "\t; IMB");
+ else if ((given & 0x0fffffff) == 0x0FF00001)
+ func (stream, "\t; IMBRange");
+ }
+ break;
+ case 'X':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%01x", reg & 0xf);
+ }
+ break;
+ case 'f':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ if (reg > 7)
+ func (stream, "#%s",
+ arm_fp_const[reg & 7]);
+ else
+ func (stream, "f%d", reg);
+ }
+ break;
+ default:
+ abort ();
+ }
+ break;
+
+ case '`':
+ c++;
+ if ((given & (1 << bitstart)) == 0)
+ func (stream, "%c", *c);
+ break;
+ case '\'':
+ c++;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c);
+ break;
+ case '?':
+ ++c;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c++);
+ else
+ func (stream, "%c", *++c);
+ break;
+ default:
+ abort ();
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ }
+ else
+ func (stream, "%c", *c);
+ }
+ return 4;
+ }
+ }
+ abort ();
+}
+
+/* Print one instruction from PC on INFO->STREAM.
+ Return the size of the instruction. */
+static int
+print_insn_thumb (pc, info, given)
+ bfd_vma pc;
+ struct disassemble_info * info;
+ long given;
+{
+ struct thumb_opcode * insn;
+ void * stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ for (insn = thumb_opcodes; insn->assembler; insn++)
+ {
+ if ((given & insn->mask) == insn->value)
+ {
+ char * c = insn->assembler;
+
+ /* Special processing for Thumb 2 instruction BL sequence: */
+ if (!*c) /* Check for empty (not NULL) assembler string. */
+ {
+ info->bytes_per_chunk = 4;
+ info->bytes_per_line = 4;
+
+ func (stream, "bl\t");
+
+ info->print_address_func (BDISP23 (given) * 2 + pc + 4, info);
+ return 4;
+ }
+ else
+ {
+ info->bytes_per_chunk = 2;
+ info->bytes_per_line = 4;
+
+ given &= 0xffff;
+
+ for (; *c; c++)
+ {
+ if (*c == '%')
+ {
+ int domaskpc = 0;
+ int domasklr = 0;
+
+ switch (*++c)
+ {
+ case '%':
+ func (stream, "%%");
+ break;
+
+ case 'S':
+ {
+ long reg;
+
+ reg = (given >> 3) & 0x7;
+ if (given & (1 << 6))
+ reg += 8;
+
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ break;
+
+ case 'D':
+ {
+ long reg;
+
+ reg = given & 0x7;
+ if (given & (1 << 7))
+ reg += 8;
+
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ break;
+
+ case 'T':
+ func (stream, "%s",
+ arm_conditional [(given >> 8) & 0xf]);
+ break;
+
+ case 'N':
+ if (given & (1 << 8))
+ domasklr = 1;
+ /* Fall through. */
+ case 'O':
+ if (*c == 'O' && (given & (1 << 8)))
+ domaskpc = 1;
+ /* Fall through. */
+ case 'M':
+ {
+ int started = 0;
+ int reg;
+
+ func (stream, "{");
+
+ /* It would be nice if we could spot
+ ranges, and generate the rS-rE format: */
+ for (reg = 0; (reg < 8); reg++)
+ if ((given & (1 << reg)) != 0)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, "%s", arm_regnames[reg]);
+ }
+
+ if (domasklr)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, arm_regnames[14] /* "lr" */);
+ }
+
+ if (domaskpc)
+ {
+ if (started)
+ func (stream, ", ");
+ func (stream, arm_regnames[15] /* "pc" */);
+ }
+
+ func (stream, "}");
+ }
+ break;
+
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ int bitstart = *c++ - '0';
+ int bitend = 0;
+
+ while (*c >= '0' && *c <= '9')
+ bitstart = (bitstart * 10) + *c++ - '0';
+
+ switch (*c)
+ {
+ case '-':
+ {
+ long reg;
+
+ c++;
+ while (*c >= '0' && *c <= '9')
+ bitend = (bitend * 10) + *c++ - '0';
+ if (!bitend)
+ abort ();
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+ switch (*c)
+ {
+ case 'r':
+ func (stream, "%s", arm_regnames[reg]);
+ break;
+
+ case 'd':
+ func (stream, "%d", reg);
+ break;
+
+ case 'H':
+ func (stream, "%d", reg << 1);
+ break;
+
+ case 'W':
+ func (stream, "%d", reg << 2);
+ break;
+
+ case 'a':
+ /* PC-relative address -- the bottom two
+ bits of the address are dropped
+ before the calculation. */
+ info->print_address_func
+ (((pc + 4) & ~3) + (reg << 2), info);
+ break;
+
+ case 'x':
+ func (stream, "0x%04x", reg);
+ break;
+
+ case 'I':
+ reg = ((reg ^ (1 << bitend)) - (1 << bitend));
+ func (stream, "%d", reg);
+ break;
+
+ case 'B':
+ reg = ((reg ^ (1 << bitend)) - (1 << bitend));
+ (*info->print_address_func)
+ (reg * 2 + pc + 4, info);
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ case '\'':
+ c++;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c);
+ break;
+
+ case '?':
+ ++c;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c++);
+ else
+ func (stream, "%c", *++c);
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ else
+ func (stream, "%c", *c);
+ }
+ }
+ return 2;
+ }
+ }
+
+ /* No match. */
+ abort ();
+}
+
+/* Parse an individual disassembler option. */
+void
+parse_arm_disassembler_option (option)
+ char * option;
+{
+ if (option == NULL)
+ return;
+
+ if (strneq (option, "reg-names-", 10))
+ {
+ int i;
+
+ option += 10;
+
+ for (i = NUM_ARM_REGNAMES; i--;)
+ if (streq (option, regnames[i].name))
+ {
+ regname_selected = i;
+ break;
+ }
+
+ if (i < 0)
+ fprintf (stderr, _("Unrecognised register name set: %s\n"), option);
+ }
+ else if (streq (option, "force-thumb"))
+ force_thumb = 1;
+ else if (streq (option, "no-force-thumb"))
+ force_thumb = 0;
+ else
+ fprintf (stderr, _("Unrecognised disassembler option: %s\n"), option);
+
+ return;
+}
+
+/* Parse the string of disassembler options, spliting it at whitespaces. */
+static void
+parse_disassembler_options (options)
+ char * options;
+{
+ char * space;
+
+ if (options == NULL)
+ return;
+
+ do
+ {
+ space = strchr (options, ' ');
+
+ if (space)
+ {
+ * space = '\0';
+ parse_arm_disassembler_option (options);
+ * space = ' ';
+ options = space + 1;
+ }
+ else
+ parse_arm_disassembler_option (options);
+ }
+ while (space);
+}
+
+/* NOTE: There are no checks in these routines that
+ the relevant number of data bytes exist. */
+static int
+print_insn (pc, info, little)
+ bfd_vma pc;
+ struct disassemble_info * info;
+ boolean little;
+{
+ unsigned char b[4];
+ long given;
+ int status;
+ int is_thumb;
+
+ if (info->disassembler_options)
+ {
+ parse_disassembler_options (info->disassembler_options);
+
+ /* To avoid repeated parsing of these options, we remove them here. */
+ info->disassembler_options = NULL;
+ }
+
+ is_thumb = force_thumb;
+
+ if (!is_thumb && info->symbols != NULL)
+ {
+ if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
+ {
+ coff_symbol_type * cs;
+
+ cs = coffsymbol (*info->symbols);
+ is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT
+ || cs->native->u.syment.n_sclass == C_THUMBSTAT
+ || cs->native->u.syment.n_sclass == C_THUMBLABEL
+ || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
+ || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
+ }
+ else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour)
+ {
+ elf_symbol_type * es;
+ unsigned int type;
+
+ es = *(elf_symbol_type **)(info->symbols);
+ type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
+
+ is_thumb = (type == STT_ARM_TFUNC) || (type == STT_ARM_16BIT);
+ }
+ }
+
+ info->bytes_per_chunk = 4;
+ info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
+
+ if (little)
+ {
+ status = info->read_memory_func (pc, (bfd_byte *) &b[0], 4, info);
+ if (status != 0 && is_thumb)
+ {
+ info->bytes_per_chunk = 2;
+
+ status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
+ b[3] = b[2] = 0;
+ }
+
+ if (status != 0)
+ {
+ info->memory_error_func (status, pc, info);
+ return -1;
+ }
+
+ given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
+ }
+ else
+ {
+ status = info->read_memory_func
+ (pc & ~ 0x3, (bfd_byte *) &b[0], 4, info);
+ if (status != 0)
+ {
+ info->memory_error_func (status, pc, info);
+ return -1;
+ }
+
+ if (is_thumb)
+ {
+ if (pc & 0x2)
+ {
+ given = (b[2] << 8) | b[3];
+
+ status = info->read_memory_func
+ ((pc + 4) & ~ 0x3, (bfd_byte *) b, 4, info);
+ if (status != 0)
+ {
+ info->memory_error_func (status, pc + 4, info);
+ return -1;
+ }
+
+ given |= (b[0] << 24) | (b[1] << 16);
+ }
+ else
+ given = (b[0] << 8) | b[1] | (b[2] << 24) | (b[3] << 16);
+ }
+ else
+ given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]);
+ }
+
+ if (is_thumb)
+ status = print_insn_thumb (pc, info, given);
+ else
+ status = print_insn_arm (pc, info, given);
+
+ return status;
+}
+
+int
+print_insn_big_arm (pc, info)
+ bfd_vma pc;
+ struct disassemble_info * info;
+{
+ return print_insn (pc, info, false);
+}
+
+int
+print_insn_little_arm (pc, info)
+ bfd_vma pc;
+ struct disassemble_info * info;
+{
+ return print_insn (pc, info, true);
+}
+
+void
+print_arm_disassembler_options (FILE * stream)
+{
+ int i;
+
+ fprintf (stream, _("\n\
+The following ARM specific disassembler options are supported for use with\n\
+the -M switch:\n"));
+
+ for (i = NUM_ARM_REGNAMES; i--;)
+ fprintf (stream, " reg-names-%s %*c%s\n",
+ regnames[i].name,
+ 14 - strlen (regnames[i].name), ' ',
+ regnames[i].description);
+
+ fprintf (stream, " force-thumb Assume all insns are Thumb insns\n");
+ fprintf (stream, " no-force-thumb Examine preceeding label to determine an insn's type\n\n");
+}
diff --git a/contrib/binutils/opcodes/arm-opc.h b/contrib/binutils/opcodes/arm-opc.h
new file mode 100644
index 0000000..44a16a4
--- /dev/null
+++ b/contrib/binutils/opcodes/arm-opc.h
@@ -0,0 +1,284 @@
+/* Opcode table for the ARM.
+
+ Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+struct arm_opcode {
+ unsigned long value, mask; /* recognise instruction if (op&mask)==value */
+ char *assembler; /* how to disassemble this instruction */
+};
+
+struct thumb_opcode
+{
+ unsigned short value, mask; /* recognise instruction if (op&mask)==value */
+ char * assembler; /* how to disassemble this instruction */
+};
+
+/* format of the assembler string :
+
+ %% %
+ %<bitfield>d print the bitfield in decimal
+ %<bitfield>x print the bitfield in hex
+ %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
+ %<bitfield>r print as an ARM register
+ %<bitfield>f print a floating point constant if >7 else a
+ floating point register
+ %c print condition code (always bits 28-31)
+ %P print floating point precision in arithmetic insn
+ %Q print floating point precision in ldf/stf insn
+ %R print floating point rounding mode
+ %<bitnum>'c print specified char iff bit is one
+ %<bitnum>`c print specified char iff bit is zero
+ %<bitnum>?ab print a if bit is one else print b
+ %p print 'p' iff bits 12-15 are 15
+ %t print 't' iff bit 21 set and bit 24 clear
+ %h print 'h' iff bit 5 set, else print 'b'
+ %o print operand2 (immediate or register + shift)
+ %a print address for ldr/str instruction
+ %s print address for ldr/str halfword/signextend instruction
+ %b print branch destination
+ %A print address for ldc/stc/ldf/stf instruction
+ %m print register mask for ldm/stm instruction
+ %C print the PSR sub type.
+ %F print the COUNT field of a LFM/SFM instruction.
+Thumb specific format options:
+ %D print Thumb register (bits 0..2 as high number if bit 7 set)
+ %S print Thumb register (bits 3..5 as high number if bit 6 set)
+ %<bitfield>I print bitfield as a signed decimal
+ (top bit of range being the sign bit)
+ %M print Thumb register mask
+ %N print Thumb register mask (with LR)
+ %O print Thumb register mask (with PC)
+ %T print Thumb condition code (always bits 8-11)
+ %<bitfield>B print Thumb branch destination (signed displacement)
+ %<bitfield>W print (bitfield * 4) as a decimal
+ %<bitfield>H print (bitfield * 2) as a decimal
+ %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
+*/
+
+/* Note: There is a partial ordering in this table - it must be searched from
+ the top to obtain a correct match. */
+
+static struct arm_opcode arm_opcodes[] =
+{
+ /* ARM instructions */
+ {0xe1a00000, 0xffffffff, "nop\t\t\t(mov r0,r0)"},
+ {0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
+ {0x00000090, 0x0fe000f0, "mul%c%20's\t%16-19r, %0-3r, %8-11r"},
+ {0x00200090, 0x0fe000f0, "mla%c%20's\t%16-19r, %0-3r, %8-11r, %12-15r"},
+ {0x01000090, 0x0fb00ff0, "swp%c%22'b\t%12-15r, %0-3r, [%16-19r]"},
+ {0x00800090, 0x0fa000f0, "%22?sumull%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {0x00a00090, 0x0fa000f0, "%22?sumlal%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {0x00000090, 0x0e100090, "str%c%6's%h\t%12-15r, %s"},
+ {0x00100090, 0x0e100090, "ldr%c%6's%h\t%12-15r, %s"},
+ {0x00000000, 0x0de00000, "and%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00200000, 0x0de00000, "eor%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00400000, 0x0de00000, "sub%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00600000, 0x0de00000, "rsb%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00800000, 0x0de00000, "add%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00a00000, 0x0de00000, "adc%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00c00000, 0x0de00000, "sbc%c%20's\t%12-15r, %16-19r, %o"},
+ {0x00e00000, 0x0de00000, "rsc%c%20's\t%12-15r, %16-19r, %o"},
+ {0x0120f000, 0x0db6f000, "msr%c\t%22?scpsr%C, %o"},
+ {0x010f0000, 0x0fbf0fff, "mrs%c\t%12-15r, %22?scpsr"},
+ {0x01000000, 0x0de00000, "tst%c%p\t%16-19r, %o"},
+ {0x01200000, 0x0de00000, "teq%c%p\t%16-19r, %o"},
+ {0x01400000, 0x0de00000, "cmp%c%p\t%16-19r, %o"},
+ {0x01600000, 0x0de00000, "cmn%c%p\t%16-19r, %o"},
+ {0x01800000, 0x0de00000, "orr%c%20's\t%12-15r, %16-19r, %o"},
+ {0x01a00000, 0x0de00000, "mov%c%20's\t%12-15r, %o"},
+ {0x01c00000, 0x0de00000, "bic%c%20's\t%12-15r, %16-19r, %o"},
+ {0x01e00000, 0x0de00000, "mvn%c%20's\t%12-15r, %o"},
+ {0x04000000, 0x0e100000, "str%c%22'b%t\t%12-15r, %a"},
+ {0x06000000, 0x0e100ff0, "str%c%22'b%t\t%12-15r, %a"},
+ {0x04000000, 0x0c100010, "str%c%22'b%t\t%12-15r, %a"},
+ {0x06000010, 0x0e000010, "undefined"},
+ {0x04100000, 0x0c100000, "ldr%c%22'b%t\t%12-15r, %a"},
+ {0x08000000, 0x0e100000, "stm%c%23?id%24?ba\t%16-19r%21'!, %m%22'^"},
+ {0x08100000, 0x0e100000, "ldm%c%23?id%24?ba\t%16-19r%21'!, %m%22'^"},
+ {0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
+ {0x0f000000, 0x0f000000, "swi%c\t%0-23x"},
+
+ /* Floating point coprocessor instructions */
+ {0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
+ {0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
+ {0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
+ {0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
+ {0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
+ {0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
+ {0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
+ {0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
+ {0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
+ {0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
+ {0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
+ {0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
+ {0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
+ {0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
+ {0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
+ {0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
+ {0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
+ {0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
+ {0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
+ {0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
+ {0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
+ {0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
+ {0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
+ {0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
+ {0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
+ {0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
+ {0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
+ {0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
+ {0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
+ {0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
+
+ /* Generic coprocessor instructions */
+ {0x0e000000, 0x0f000010, "cdp%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
+ {0x0e100010, 0x0f100010, "mrc%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
+ {0x0e000010, 0x0f100010, "mcr%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
+ {0x0c000000, 0x0e100000, "stc%c%22'l\t%8-11d, cr%12-15d, %A"},
+ {0x0c100000, 0x0e100000, "ldc%c%22'l\t%8-11d, cr%12-15d, %A"},
+
+ /* The rest. */
+ {0x00000000, 0x00000000, "undefined instruction %0-31x"},
+ {0x00000000, 0x00000000, 0}
+};
+
+#define BDISP(x) ((((x) & 0xffffff) ^ 0x800000) - 0x800000) /* 26 bit */
+
+static struct thumb_opcode thumb_opcodes[] =
+{
+ /* Thumb instructions */
+ {0x46C0, 0xFFFF, "nop\t\t\t(mov r8,r8)"}, /* format 5 instructions do not update the PSR */
+ {0x1C00, 0xFFC0, "mov\t%0-2r, %3-5r\t\t(add %0-2r, %3-5r, #%6-8d)"},
+ /* format 4 */
+ {0x4000, 0xFFC0, "and\t%0-2r, %3-5r"},
+ {0x4040, 0xFFC0, "eor\t%0-2r, %3-5r"},
+ {0x4080, 0xFFC0, "lsl\t%0-2r, %3-5r"},
+ {0x40C0, 0xFFC0, "lsr\t%0-2r, %3-5r"},
+ {0x4100, 0xFFC0, "asr\t%0-2r, %3-5r"},
+ {0x4140, 0xFFC0, "adc\t%0-2r, %3-5r"},
+ {0x4180, 0xFFC0, "sbc\t%0-2r, %3-5r"},
+ {0x41C0, 0xFFC0, "ror\t%0-2r, %3-5r"},
+ {0x4200, 0xFFC0, "tst\t%0-2r, %3-5r"},
+ {0x4240, 0xFFC0, "neg\t%0-2r, %3-5r"},
+ {0x4280, 0xFFC0, "cmp\t%0-2r, %3-5r"},
+ {0x42C0, 0xFFC0, "cmn\t%0-2r, %3-5r"},
+ {0x4300, 0xFFC0, "orr\t%0-2r, %3-5r"},
+ {0x4340, 0xFFC0, "mul\t%0-2r, %3-5r"},
+ {0x4380, 0xFFC0, "bic\t%0-2r, %3-5r"},
+ {0x43C0, 0xFFC0, "mvn\t%0-2r, %3-5r"},
+ /* format 13 */
+ {0xB000, 0xFF80, "add\tsp, #%0-6W"},
+ {0xB080, 0xFF80, "sub\tsp, #%0-6W"},
+ /* format 5 */
+ {0x4700, 0xFF80, "bx\t%S"},
+ {0x4400, 0xFF00, "add\t%D, %S"},
+ {0x4500, 0xFF00, "cmp\t%D, %S"},
+ {0x4600, 0xFF00, "mov\t%D, %S"},
+ /* format 14 */
+ {0xB400, 0xFE00, "push\t%N"},
+ {0xBC00, 0xFE00, "pop\t%O"},
+ /* format 2 */
+ {0x1800, 0xFE00, "add\t%0-2r, %3-5r, %6-8r"},
+ {0x1A00, 0xFE00, "sub\t%0-2r, %3-5r, %6-8r"},
+ {0x1C00, 0xFE00, "add\t%0-2r, %3-5r, #%6-8d"},
+ {0x1E00, 0xFE00, "sub\t%0-2r, %3-5r, #%6-8d"},
+ /* format 8 */
+ {0x5200, 0xFE00, "strh\t%0-2r, [%3-5r, %6-8r]"},
+ {0x5A00, 0xFE00, "ldrh\t%0-2r, [%3-5r, %6-8r]"},
+ {0x5600, 0xF600, "lds%11?hb\t%0-2r, [%3-5r, %6-8r]"},
+ /* format 7 */
+ {0x5000, 0xFA00, "str%10'b\t%0-2r, [%3-5r, %6-8r]"},
+ {0x5800, 0xFA00, "ldr%10'b\t%0-2r, [%3-5r, %6-8r]"},
+ /* format 1 */
+ {0x0000, 0xF800, "lsl\t%0-2r, %3-5r, #%6-10d"},
+ {0x0800, 0xF800, "lsr\t%0-2r, %3-5r, #%6-10d"},
+ {0x1000, 0xF800, "asr\t%0-2r, %3-5r, #%6-10d"},
+ /* format 3 */
+ {0x2000, 0xF800, "mov\t%8-10r, #%0-7d"},
+ {0x2800, 0xF800, "cmp\t%8-10r, #%0-7d"},
+ {0x3000, 0xF800, "add\t%8-10r, #%0-7d"},
+ {0x3800, 0xF800, "sub\t%8-10r, #%0-7d"},
+ /* format 6 */
+ {0x4800, 0xF800, "ldr\t%8-10r, [pc, #%0-7W]\t(%0-7a)"}, /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
+ /* format 9 */
+ {0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"},
+ {0x6800, 0xF800, "ldr\t%0-2r, [%3-5r, #%6-10W]"},
+ {0x7000, 0xF800, "strb\t%0-2r, [%3-5r, #%6-10d]"},
+ {0x7800, 0xF800, "ldrb\t%0-2r, [%3-5r, #%6-10d]"},
+ /* format 10 */
+ {0x8000, 0xF800, "strh\t%0-2r, [%3-5r, #%6-10H]"},
+ {0x8800, 0xF800, "ldrh\t%0-2r, [%3-5r, #%6-10H]"},
+ /* format 11 */
+ {0x9000, 0xF800, "str\t%8-10r, [sp, #%0-7W]"},
+ {0x9800, 0xF800, "ldr\t%8-10r, [sp, #%0-7W]"},
+ /* format 12 */
+ {0xA000, 0xF800, "add\t%8-10r, pc, #%0-7W\t(adr %8-10r,%0-7a)"},
+ {0xA800, 0xF800, "add\t%8-10r, sp, #%0-7W"},
+ /* format 15 */
+ {0xC000, 0xF800, "stmia\t%8-10r!,%M"},
+ {0xC800, 0xF800, "ldmia\t%8-10r!,%M"},
+ /* format 18 */
+ {0xE000, 0xF800, "b\t%0-10B"},
+ {0xE800, 0xF800, "undefined"},
+ /* format 19 */
+ {0xF000, 0xF800, ""}, /* special processing required in disassembler */
+ {0xF800, 0xF800, "second half of BL instruction %0-15x"},
+ /* format 16 */
+ {0xD000, 0xFF00, "beq\t%0-7B"},
+ {0xD100, 0xFF00, "bne\t%0-7B"},
+ {0xD200, 0xFF00, "bcs\t%0-7B"},
+ {0xD300, 0xFF00, "bcc\t%0-7B"},
+ {0xD400, 0xFF00, "bmi\t%0-7B"},
+ {0xD500, 0xFF00, "bpl\t%0-7B"},
+ {0xD600, 0xFF00, "bvs\t%0-7B"},
+ {0xD700, 0xFF00, "bvc\t%0-7B"},
+ {0xD800, 0xFF00, "bhi\t%0-7B"},
+ {0xD900, 0xFF00, "bls\t%0-7B"},
+ {0xDA00, 0xFF00, "bge\t%0-7B"},
+ {0xDB00, 0xFF00, "blt\t%0-7B"},
+ {0xDC00, 0xFF00, "bgt\t%0-7B"},
+ {0xDD00, 0xFF00, "ble\t%0-7B"},
+ /* format 17 */
+ {0xDE00, 0xFF00, "bal\t%0-7B"},
+ {0xDF00, 0xFF00, "swi\t%0-7d"},
+ /* format 9 */
+ {0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"},
+ {0x6800, 0xF800, "ldr\t%0-2r, [%3-5r, #%6-10W]"},
+ {0x7000, 0xF800, "strb\t%0-2r, [%3-5r, #%6-10d]"},
+ {0x7800, 0xF800, "ldrb\t%0-2r, [%3-5r, #%6-10d]"},
+ /* the rest */
+ {0x0000, 0x0000, "undefined instruction %0-15x"},
+ {0x0000, 0x0000, 0}
+};
+
+#define BDISP23(x) ((((((x) & 0x07ff) << 11) | (((x) & 0x07ff0000) >> 16)) \
+ ^ 0x200000) - 0x200000) /* 23bit */
+
diff --git a/contrib/binutils/opcodes/cgen-asm.c b/contrib/binutils/opcodes/cgen-asm.c
index 6dd558b..4ed6936 100644
--- a/contrib/binutils/opcodes/cgen-asm.c
+++ b/contrib/binutils/opcodes/cgen-asm.c
@@ -26,113 +26,166 @@
#include "bfd.h"
#include "symcat.h"
#include "opcode/cgen.h"
+#include "opintl.h"
-/* Operand parsing callback. */
-const char * (*cgen_parse_operand_fn)
- PARAMS ((enum cgen_parse_operand_type, const char **, int, int,
- enum cgen_parse_operand_result *, bfd_vma *));
+/* Set the cgen_parse_operand_fn callback. */
-/* This is not published as part of the public interface so we don't
- declare this in cgen.h. */
-extern CGEN_OPCODE_DATA *cgen_current_opcode_data;
-
-/* Assembler instruction hash table. */
-static CGEN_INSN_LIST **asm_hash_table;
+void
+cgen_set_parse_operand_fn (cd, fn)
+ CGEN_CPU_DESC cd;
+ cgen_parse_operand_fn fn;
+{
+ cd->parse_operand_fn = fn;
+}
-/* Called once at startup and whenever machine/endian change. */
+/* Called whenever starting to parse an insn. */
void
-cgen_asm_init ()
+cgen_init_parse_operand (cd)
+ CGEN_CPU_DESC cd;
+{
+ /* This tells the callback to re-initialize. */
+ (void) (* cd->parse_operand_fn)
+ (cd, CGEN_PARSE_OPERAND_INIT, NULL, 0, 0, NULL, NULL);
+}
+
+/* Subroutine of build_asm_hash_table to add INSNS to the hash table.
+
+ COUNT is the number of elements in INSNS.
+ ENTSIZE is sizeof (CGEN_IBASE) for the target.
+ ??? No longer used but leave in for now.
+ HTABLE points to the hash table.
+ HENTBUF is a pointer to sufficiently large buffer of hash entries.
+ The result is a pointer to the next entry to use.
+
+ The table is scanned backwards as additions are made to the front of the
+ list and we want earlier ones to be prefered. */
+
+static CGEN_INSN_LIST *
+hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN *insns;
+ int count;
+ int entsize;
+ CGEN_INSN_LIST **htable;
+ CGEN_INSN_LIST *hentbuf;
{
- if (asm_hash_table)
+ int i;
+
+ for (i = count - 1; i >= 0; --i, ++hentbuf)
{
- free (asm_hash_table);
- asm_hash_table = NULL;
+ unsigned int hash;
+ const CGEN_INSN *insn = &insns[i];
+
+ if (! (* cd->asm_hash_p) (insn))
+ continue;
+ hash = (* cd->asm_hash) (CGEN_INSN_MNEMONIC (insn));
+ hentbuf->next = htable[hash];
+ hentbuf->insn = insn;
+ htable[hash] = hentbuf;
}
+
+ return hentbuf;
}
-/* Called whenever starting to parse an insn. */
+/* Subroutine of build_asm_hash_table to add INSNS to the hash table.
+ This function is identical to hash_insn_array except the insns are
+ in a list. */
-void
-cgen_init_parse_operand ()
+static CGEN_INSN_LIST *
+hash_insn_list (cd, insns, htable, hentbuf)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN_LIST *insns;
+ CGEN_INSN_LIST **htable;
+ CGEN_INSN_LIST *hentbuf;
{
- /* This tells the callback to re-initialize. */
- (void) (*cgen_parse_operand_fn) (CGEN_PARSE_OPERAND_INIT, NULL, 0, 0,
- NULL, NULL);
+ const CGEN_INSN_LIST *ilist;
+
+ for (ilist = insns; ilist != NULL; ilist = ilist->next, ++ hentbuf)
+ {
+ unsigned int hash;
+
+ if (! (* cd->asm_hash_p) (ilist->insn))
+ continue;
+ hash = (* cd->asm_hash) (CGEN_INSN_MNEMONIC (ilist->insn));
+ hentbuf->next = htable[hash];
+ hentbuf->insn = ilist->insn;
+ htable[hash] = hentbuf;
+ }
+
+ return hentbuf;
}
/* Build the assembler instruction hash table. */
static void
-build_asm_hash_table ()
+build_asm_hash_table (cd)
+ CGEN_CPU_DESC cd;
{
- unsigned int hash;
- int count = cgen_insn_count ();
- CGEN_OPCODE_DATA *data = cgen_current_opcode_data;
- CGEN_INSN_TABLE *insn_table = data->insn_table;
- unsigned int entry_size = insn_table->entry_size;
- unsigned int hash_size = insn_table->asm_hash_table_size;
- const CGEN_INSN *insn;
- CGEN_INSN_LIST *insn_lists,*new_insns;
+ int count = cgen_insn_count (cd) + cgen_macro_insn_count (cd);
+ CGEN_INSN_TABLE *insn_table = &cd->insn_table;
+ CGEN_INSN_TABLE *macro_insn_table = &cd->macro_insn_table;
+ unsigned int hash_size = cd->asm_hash_size;
+ CGEN_INSN_LIST *hash_entry_buf;
+ CGEN_INSN_LIST **asm_hash_table;
+ CGEN_INSN_LIST *asm_hash_table_entries;
/* The space allocated for the hash table consists of two parts:
the hash table and the hash lists. */
asm_hash_table = (CGEN_INSN_LIST **)
- xmalloc (hash_size * sizeof (CGEN_INSN_LIST *)
- + count * sizeof (CGEN_INSN_LIST));
- memset (asm_hash_table, 0,
- hash_size * sizeof (CGEN_INSN_LIST *)
- + count * sizeof (CGEN_INSN_LIST));
- insn_lists = (CGEN_INSN_LIST *) (asm_hash_table + hash_size);
+ xmalloc (hash_size * sizeof (CGEN_INSN_LIST *));
+ memset (asm_hash_table, 0, hash_size * sizeof (CGEN_INSN_LIST *));
+ asm_hash_table_entries = hash_entry_buf = (CGEN_INSN_LIST *)
+ xmalloc (count * sizeof (CGEN_INSN_LIST));
/* Add compiled in insns.
- The table is scanned backwards as later additions are inserted in
- front of earlier ones and we want earlier ones to be prefered.
- We stop at the first one as it is a reserved entry.
- This is a bit tricky as the attribute member of CGEN_INSN is variable
- among architectures. This code could be moved to cgen-asm.in, but
- I prefer to keep it here for now. */
-
- for (insn = (CGEN_INSN *)
- ((char *) insn_table->init_entries
- + entry_size * (insn_table->num_init_entries - 1));
- insn > insn_table->init_entries;
- insn = (CGEN_INSN *) ((char *) insn - entry_size), ++insn_lists)
- {
- hash = (*insn_table->asm_hash) CGEN_INSN_MNEMONIC (insn);
- insn_lists->next = asm_hash_table[hash];
- insn_lists->insn = insn;
- asm_hash_table[hash] = insn_lists;
- }
+ Don't include the first one as it is a reserved entry. */
+ /* ??? It was the end of all hash chains, and also the special
+ "invalid insn" marker. May be able to do it differently now. */
+
+ hash_entry_buf = hash_insn_array (cd,
+ insn_table->init_entries + 1,
+ insn_table->num_init_entries - 1,
+ insn_table->entry_size,
+ asm_hash_table, hash_entry_buf);
+
+ /* Add compiled in macro-insns. */
+
+ hash_entry_buf = hash_insn_array (cd, macro_insn_table->init_entries,
+ macro_insn_table->num_init_entries,
+ macro_insn_table->entry_size,
+ asm_hash_table, hash_entry_buf);
/* Add runtime added insns.
- ??? Currently later added insns will be prefered over earlier ones.
- Not sure this is a bug or not. */
- for (new_insns = insn_table->new_entries;
- new_insns != NULL;
- new_insns = new_insns->next, ++insn_lists)
- {
- hash = (*insn_table->asm_hash) CGEN_INSN_MNEMONIC (new_insns->insn);
- insn_lists->next = asm_hash_table[hash];
- insn_lists->insn = new_insns->insn;
- asm_hash_table[hash] = insn_lists;
- }
+ Later added insns will be prefered over earlier ones. */
+
+ hash_entry_buf = hash_insn_list (cd, insn_table->new_entries,
+ asm_hash_table, hash_entry_buf);
+
+ /* Add runtime added macro-insns. */
+
+ hash_insn_list (cd, macro_insn_table->new_entries,
+ asm_hash_table, hash_entry_buf);
+
+ cd->asm_hash_table = asm_hash_table;
+ cd->asm_hash_table_entries = asm_hash_table_entries;
}
/* Return the first entry in the hash list for INSN. */
CGEN_INSN_LIST *
-cgen_asm_lookup_insn (insn)
+cgen_asm_lookup_insn (cd, insn)
+ CGEN_CPU_DESC cd;
const char *insn;
{
unsigned int hash;
- if (asm_hash_table == NULL)
- build_asm_hash_table ();
+ if (cd->asm_hash_table == NULL)
+ build_asm_hash_table (cd);
- hash = (*cgen_current_opcode_data->insn_table->asm_hash) (insn);
- return asm_hash_table[hash];
+ hash = (* cd->asm_hash) (insn);
+ return cd->asm_hash_table[hash];
}
/* Keyword parser.
@@ -144,7 +197,8 @@ cgen_asm_lookup_insn (insn)
recording something in the keyword table]. */
const char *
-cgen_parse_keyword (strp, keyword_table, valuep)
+cgen_parse_keyword (cd, strp, keyword_table, valuep)
+ CGEN_CPU_DESC cd;
const char **strp;
CGEN_KEYWORD *keyword_table;
long *valuep;
@@ -167,7 +221,7 @@ cgen_parse_keyword (strp, keyword_table, valuep)
++p;
if (p - start >= (int) sizeof (buf))
- return "unrecognized keyword/register name";
+ return _("unrecognized keyword/register name");
memcpy (buf, start, p - start);
buf[p - start] = 0;
@@ -186,10 +240,14 @@ cgen_parse_keyword (strp, keyword_table, valuep)
return "unrecognized keyword/register name";
}
-/* Signed integer parser. */
+/* Parse a small signed integer parser.
+ ??? VALUEP is not a bfd_vma * on purpose, though this is confusing.
+ Note that if the caller expects a bfd_vma result, it should call
+ cgen_parse_address. */
const char *
-cgen_parse_signed_integer (strp, opindex, valuep)
+cgen_parse_signed_integer (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
const char **strp;
int opindex;
long *valuep;
@@ -198,19 +256,23 @@ cgen_parse_signed_integer (strp, opindex, valuep)
enum cgen_parse_operand_result result;
const char *errmsg;
- errmsg = (*cgen_parse_operand_fn) (CGEN_PARSE_OPERAND_INTEGER, strp,
- opindex, BFD_RELOC_NONE,
- &result, &value);
+ errmsg = (* cd->parse_operand_fn)
+ (cd, CGEN_PARSE_OPERAND_INTEGER, strp, opindex, BFD_RELOC_NONE,
+ &result, &value);
/* FIXME: Examine `result'. */
if (!errmsg)
*valuep = value;
return errmsg;
}
-/* Unsigned integer parser. */
+/* Parse a small unsigned integer parser.
+ ??? VALUEP is not a bfd_vma * on purpose, though this is confusing.
+ Note that if the caller expects a bfd_vma result, it should call
+ cgen_parse_address. */
const char *
-cgen_parse_unsigned_integer (strp, opindex, valuep)
+cgen_parse_unsigned_integer (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
const char **strp;
int opindex;
unsigned long *valuep;
@@ -219,9 +281,9 @@ cgen_parse_unsigned_integer (strp, opindex, valuep)
enum cgen_parse_operand_result result;
const char *errmsg;
- errmsg = (*cgen_parse_operand_fn) (CGEN_PARSE_OPERAND_INTEGER, strp,
- opindex, BFD_RELOC_NONE,
- &result, &value);
+ errmsg = (* cd->parse_operand_fn)
+ (cd, CGEN_PARSE_OPERAND_INTEGER, strp, opindex, BFD_RELOC_NONE,
+ &result, &value);
/* FIXME: Examine `result'. */
if (!errmsg)
*valuep = value;
@@ -231,20 +293,21 @@ cgen_parse_unsigned_integer (strp, opindex, valuep)
/* Address parser. */
const char *
-cgen_parse_address (strp, opindex, opinfo, resultp, valuep)
+cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep)
+ CGEN_CPU_DESC cd;
const char **strp;
int opindex;
int opinfo;
enum cgen_parse_operand_result *resultp;
- long *valuep;
+ bfd_vma *valuep;
{
bfd_vma value;
enum cgen_parse_operand_result result_type;
const char *errmsg;
- errmsg = (*cgen_parse_operand_fn) (CGEN_PARSE_OPERAND_ADDRESS, strp,
- opindex, opinfo,
- &result_type, &value);
+ errmsg = (* cd->parse_operand_fn)
+ (cd, CGEN_PARSE_OPERAND_ADDRESS, strp, opindex, opinfo,
+ &result_type, &value);
/* FIXME: Examine `result'. */
if (!errmsg)
{
@@ -263,11 +326,11 @@ cgen_validate_signed_integer (value, min, max)
{
if (value < min || value > max)
{
- const char *err =
- "operand out of range (%ld not between %ld and %ld)";
static char buf[100];
- sprintf (buf, err, value, min, max);
+ /* xgettext:c-format */
+ sprintf (buf, _("operand out of range (%ld not between %ld and %ld)"),
+ value, min, max);
return buf;
}
@@ -284,11 +347,11 @@ cgen_validate_unsigned_integer (value, min, max)
{
if (value < min || value > max)
{
- const char *err =
- "operand out of range (%lu not between %lu and %lu)";
static char buf[100];
- sprintf (buf, err, value, min, max);
+ /* xgettext:c-format */
+ sprintf (buf, _("operand out of range (%lu not between %lu and %lu)"),
+ value, min, max);
return buf;
}
diff --git a/contrib/binutils/opcodes/cgen-dis.c b/contrib/binutils/opcodes/cgen-dis.c
index f7ee88f..78b1cd9 100644
--- a/contrib/binutils/opcodes/cgen-dis.c
+++ b/contrib/binutils/opcodes/cgen-dis.c
@@ -1,6 +1,6 @@
/* CGEN generic disassembler support code.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -26,82 +26,57 @@
#include "symcat.h"
#include "opcode/cgen.h"
-/* This is not published as part of the public interface so we don't
- declare this in cgen.h. */
-extern CGEN_OPCODE_DATA * cgen_current_opcode_data;
-
-/* Disassembler instruction hash table. */
-static CGEN_INSN_LIST ** dis_hash_table;
-
-void
-cgen_dis_init ()
+/* Subroutine of build_dis_hash_table to add INSNS to the hash table.
+
+ COUNT is the number of elements in INSNS.
+ ENTSIZE is sizeof (CGEN_IBASE) for the target.
+ ??? No longer used but leave in for now.
+ HTABLE points to the hash table.
+ HENTBUF is a pointer to sufficiently large buffer of hash entries.
+ The result is a pointer to the next entry to use.
+
+ The table is scanned backwards as additions are made to the front of the
+ list and we want earlier ones to be prefered. */
+
+static CGEN_INSN_LIST *
+hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN * insns;
+ int count;
+ int entsize;
+ CGEN_INSN_LIST ** htable;
+ CGEN_INSN_LIST * hentbuf;
{
- if (dis_hash_table)
- {
- free (dis_hash_table);
- dis_hash_table = NULL;
- }
-}
-
-/* Build the disassembler instruction hash table. */
+ int big_p = CGEN_CPU_ENDIAN (cd) == CGEN_ENDIAN_BIG;
+ int i;
-static void
-build_dis_hash_table ()
-{
- int bigend = cgen_current_endian == CGEN_ENDIAN_BIG;
- unsigned int hash;
- char buf [4];
- unsigned long value;
- int count = cgen_insn_count ();
- CGEN_OPCODE_DATA * data = cgen_current_opcode_data;
- CGEN_INSN_TABLE * insn_table = data->insn_table;
- unsigned int entry_size = insn_table->entry_size;
- unsigned int hash_size = insn_table->dis_hash_table_size;
- const CGEN_INSN * insn;
- CGEN_INSN_LIST * insn_lists;
- CGEN_INSN_LIST * new_insns;
-
- /* The space allocated for the hash table consists of two parts:
- the hash table and the hash lists. */
+ for (i = count - 1; i >= 0; --i, ++hentbuf)
+ {
+ unsigned int hash;
+ char buf [4];
+ unsigned long value;
+ const CGEN_INSN *insn = &insns[i];
- dis_hash_table = (CGEN_INSN_LIST **)
- xmalloc (hash_size * sizeof (CGEN_INSN_LIST *)
- + count * sizeof (CGEN_INSN_LIST));
- memset (dis_hash_table, 0,
- hash_size * sizeof (CGEN_INSN_LIST *)
- + count * sizeof (CGEN_INSN_LIST));
- insn_lists = (CGEN_INSN_LIST *) (dis_hash_table + hash_size);
+ if (! (* cd->dis_hash_p) (insn))
+ continue;
- /* Add compiled in insns.
- The table is scanned backwards as later additions are inserted in
- front of earlier ones and we want earlier ones to be prefered.
- We stop at the first one as it is a reserved entry.
- This is a bit tricky as the attribute member of CGEN_INSN is variable
- among architectures. This code could be moved to cgen-asm.in, but
- I prefer to keep it here for now. */
-
- for (insn = (CGEN_INSN *)
- ((char *) insn_table->init_entries
- + entry_size * (insn_table->num_init_entries - 1));
- insn > insn_table->init_entries;
- insn = (CGEN_INSN *) ((char *) insn - entry_size), ++ insn_lists)
- {
/* We don't know whether the target uses the buffer or the base insn
to hash on, so set both up. */
- value = CGEN_INSN_VALUE (insn);
+
+ value = CGEN_INSN_BASE_VALUE (insn);
switch (CGEN_INSN_MASK_BITSIZE (insn))
{
case 8:
buf[0] = value;
break;
case 16:
- if (bigend)
+ if (big_p)
bfd_putb16 ((bfd_vma) value, buf);
else
bfd_putl16 ((bfd_vma) value, buf);
break;
case 32:
- if (bigend)
+ if (big_p)
bfd_putb32 ((bfd_vma) value, buf);
else
bfd_putl32 ((bfd_vma) value, buf);
@@ -110,37 +85,55 @@ build_dis_hash_table ()
abort ();
}
- hash = insn_table->dis_hash (buf, value);
+ hash = (* cd->dis_hash) (buf, value);
+ hentbuf->next = htable[hash];
+ hentbuf->insn = insn;
+ htable[hash] = hentbuf;
+ }
+
+ return hentbuf;
+}
- insn_lists->next = dis_hash_table [hash];
- insn_lists->insn = insn;
+/* Subroutine of build_dis_hash_table to add INSNS to the hash table.
+ This function is identical to hash_insn_array except the insns are
+ in a list. */
- dis_hash_table [hash] = insn_lists;
- }
+static CGEN_INSN_LIST *
+hash_insn_list (cd, insns, htable, hentbuf)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN_LIST *insns;
+ CGEN_INSN_LIST **htable;
+ CGEN_INSN_LIST *hentbuf;
+{
+ int big_p = CGEN_CPU_ENDIAN (cd) == CGEN_ENDIAN_BIG;
+ const CGEN_INSN_LIST *ilist;
- /* Add runtime added insns.
- ??? Currently later added insns will be prefered over earlier ones.
- Not sure this is a bug or not. */
- for (new_insns = insn_table->new_entries;
- new_insns != NULL;
- new_insns = new_insns->next, ++ insn_lists)
+ for (ilist = insns; ilist != NULL; ilist = ilist->next, ++ hentbuf)
{
+ unsigned int hash;
+ char buf[4];
+ unsigned long value;
+
+ if (! (* cd->dis_hash_p) (ilist->insn))
+ continue;
+
/* We don't know whether the target uses the buffer or the base insn
to hash on, so set both up. */
- value = CGEN_INSN_VALUE (new_insns->insn);
- switch (CGEN_INSN_MASK_BITSIZE (new_insns->insn))
+
+ value = CGEN_INSN_BASE_VALUE (ilist->insn);
+ switch (CGEN_INSN_MASK_BITSIZE (ilist->insn))
{
case 8:
buf[0] = value;
break;
case 16:
- if (bigend)
+ if (big_p)
bfd_putb16 ((bfd_vma) value, buf);
else
bfd_putl16 ((bfd_vma) value, buf);
break;
case 32:
- if (bigend)
+ if (big_p)
bfd_putb32 ((bfd_vma) value, buf);
else
bfd_putl32 ((bfd_vma) value, buf);
@@ -149,28 +142,85 @@ build_dis_hash_table ()
abort ();
}
- hash = insn_table->dis_hash (buf, value);
+ hash = (* cd->dis_hash) (buf, value);
+ hentbuf->next = htable [hash];
+ hentbuf->insn = ilist->insn;
+ htable [hash] = hentbuf;
+ }
- insn_lists->next = dis_hash_table [hash];
- insn_lists->insn = new_insns->insn;
+ return hentbuf;
+}
- dis_hash_table [hash] = insn_lists;
- }
+/* Build the disassembler instruction hash table. */
+
+static void
+build_dis_hash_table (cd)
+ CGEN_CPU_DESC cd;
+{
+ int count = cgen_insn_count (cd) + cgen_macro_insn_count (cd);
+ CGEN_INSN_TABLE *insn_table = & cd->insn_table;
+ CGEN_INSN_TABLE *macro_insn_table = & cd->macro_insn_table;
+ unsigned int hash_size = cd->dis_hash_size;
+ CGEN_INSN_LIST *hash_entry_buf;
+ CGEN_INSN_LIST **dis_hash_table;
+ CGEN_INSN_LIST *dis_hash_table_entries;
+
+ /* The space allocated for the hash table consists of two parts:
+ the hash table and the hash lists. */
+
+ dis_hash_table = (CGEN_INSN_LIST **)
+ xmalloc (hash_size * sizeof (CGEN_INSN_LIST *));
+ memset (dis_hash_table, 0, hash_size * sizeof (CGEN_INSN_LIST *));
+ dis_hash_table_entries = hash_entry_buf = (CGEN_INSN_LIST *)
+ xmalloc (count * sizeof (CGEN_INSN_LIST));
+
+ /* Add compiled in insns.
+ Don't include the first one as it is a reserved entry. */
+ /* ??? It was the end of all hash chains, and also the special
+ "invalid insn" marker. May be able to do it differently now. */
+
+ hash_entry_buf = hash_insn_array (cd,
+ insn_table->init_entries + 1,
+ insn_table->num_init_entries - 1,
+ insn_table->entry_size,
+ dis_hash_table, hash_entry_buf);
+
+ /* Add compiled in macro-insns. */
+
+ hash_entry_buf = hash_insn_array (cd, macro_insn_table->init_entries,
+ macro_insn_table->num_init_entries,
+ macro_insn_table->entry_size,
+ dis_hash_table, hash_entry_buf);
+
+ /* Add runtime added insns.
+ Later added insns will be prefered over earlier ones. */
+
+ hash_entry_buf = hash_insn_list (cd, insn_table->new_entries,
+ dis_hash_table, hash_entry_buf);
+
+ /* Add runtime added macro-insns. */
+
+ hash_insn_list (cd, macro_insn_table->new_entries,
+ dis_hash_table, hash_entry_buf);
+
+ cd->dis_hash_table = dis_hash_table;
+ cd->dis_hash_table_entries = dis_hash_table_entries;
}
/* Return the first entry in the hash list for INSN. */
CGEN_INSN_LIST *
-cgen_dis_lookup_insn (buf, value)
+cgen_dis_lookup_insn (cd, buf, value)
+ CGEN_CPU_DESC cd;
const char * buf;
- unsigned long value;
+ CGEN_INSN_INT value;
{
unsigned int hash;
- if (dis_hash_table == NULL)
- build_dis_hash_table ();
+ if (cd->dis_hash_table == NULL)
+ build_dis_hash_table (cd);
- hash = cgen_current_opcode_data->insn_table->dis_hash (buf, value);
+ hash = (* cd->dis_hash) (buf, value);
- return dis_hash_table [hash];
+ return cd->dis_hash_table[hash];
}
diff --git a/contrib/binutils/opcodes/cgen-opc.c b/contrib/binutils/opcodes/cgen-opc.c
index a9d937b..ede3add 100644
--- a/contrib/binutils/opcodes/cgen-opc.c
+++ b/contrib/binutils/opcodes/cgen-opc.c
@@ -1,6 +1,6 @@
/* CGEN generic opcode support.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -27,51 +27,6 @@
#include "symcat.h"
#include "opcode/cgen.h"
-/* State variables.
- These record the state of the currently selected cpu, machine, endian, etc.
- They are set by cgen_set_cpu. */
-
-/* Current opcode data. */
-CGEN_OPCODE_DATA *cgen_current_opcode_data;
-
-/* Current machine (a la BFD machine number). */
-int cgen_current_mach;
-
-/* Current endian. */
-enum cgen_endian cgen_current_endian = CGEN_ENDIAN_UNKNOWN;
-
-/* FIXME: To support multiple architectures, we need to return a handle
- to the state set up by this function, and pass the handle back to the
- other functions. Later. */
-
-void
-cgen_set_cpu (data, mach, endian)
- CGEN_OPCODE_DATA *data;
- int mach;
- enum cgen_endian endian;
-{
- static int init_once_p;
-
- cgen_current_opcode_data = data;
- cgen_current_mach = mach;
- cgen_current_endian = endian;
-
- /* Initialize those things that only need be done once. */
- if (! init_once_p)
- {
- /* Nothing to do currently. */
- init_once_p = 1;
- }
-
-#if 0 /* This isn't done here because it would put assembler support in the
- disassembler, etc. The caller is required to call these after calling
- us. */
- /* Reset the hash tables. */
- cgen_asm_init ();
- cgen_dis_init ();
-#endif
-}
-
static unsigned int hash_keyword_name
PARAMS ((const CGEN_KEYWORD *, const char *, int));
static unsigned int hash_keyword_value
@@ -299,34 +254,368 @@ build_keyword_hash_tables (kt)
/* Hardware support. */
+/* Lookup a hardware element by its name.
+ Returns NULL if NAME is not supported by the currently selected
+ mach/isa. */
+
const CGEN_HW_ENTRY *
-cgen_hw_lookup (name)
+cgen_hw_lookup_by_name (cd, name)
+ CGEN_CPU_DESC cd;
const char *name;
{
- const CGEN_HW_ENTRY *hw = cgen_current_opcode_data->hw_list;
+ int i;
+ const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
- while (hw != NULL)
- {
- if (strcmp (name, hw->name) == 0)
- return hw;
- hw = hw->next;
- }
+ for (i = 0; i < cd->hw_table.num_entries; ++i)
+ if (hw[i] && strcmp (name, hw[i]->name) == 0)
+ return hw[i];
+
+ return NULL;
+}
+
+/* Lookup a hardware element by its number.
+ Hardware elements are enumerated, however it may be possible to add some
+ at runtime, thus HWNUM is not an enum type but rather an int.
+ Returns NULL if HWNUM is not supported by the currently selected mach. */
+
+const CGEN_HW_ENTRY *
+cgen_hw_lookup_by_num (cd, hwnum)
+ CGEN_CPU_DESC cd;
+ int hwnum;
+{
+ int i;
+ const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
+
+ /* ??? This can be speeded up. */
+ for (i = 0; i < cd->hw_table.num_entries; ++i)
+ if (hw[i] && hwnum == hw[i]->type)
+ return hw[i];
return NULL;
}
+/* Operand support. */
+
+/* Lookup an operand by its name.
+ Returns NULL if NAME is not supported by the currently selected
+ mach/isa. */
+
+const CGEN_OPERAND *
+cgen_operand_lookup_by_name (cd, name)
+ CGEN_CPU_DESC cd;
+ const char *name;
+{
+ int i;
+ const CGEN_OPERAND **op = cd->operand_table.entries;
+
+ for (i = 0; i < cd->operand_table.num_entries; ++i)
+ if (op[i] && strcmp (name, op[i]->name) == 0)
+ return op[i];
+
+ return NULL;
+}
+
+/* Lookup an operand by its number.
+ Operands are enumerated, however it may be possible to add some
+ at runtime, thus OPNUM is not an enum type but rather an int.
+ Returns NULL if OPNUM is not supported by the currently selected
+ mach/isa. */
+
+const CGEN_OPERAND *
+cgen_operand_lookup_by_num (cd, opnum)
+ CGEN_CPU_DESC cd;
+ int opnum;
+{
+ return cd->operand_table.entries[opnum];
+}
+
/* Instruction support. */
/* Return number of instructions. This includes any added at runtime. */
int
-cgen_insn_count ()
+cgen_insn_count (cd)
+ CGEN_CPU_DESC cd;
{
- int count = cgen_current_opcode_data->insn_table->num_init_entries;
- CGEN_INSN_LIST *insn = cgen_current_opcode_data->insn_table->new_entries;
+ int count = cd->insn_table.num_init_entries;
+ CGEN_INSN_LIST *rt_insns = cd->insn_table.new_entries;
- for ( ; insn != NULL; insn = insn->next)
+ for ( ; rt_insns != NULL; rt_insns = rt_insns->next)
++count;
return count;
}
+
+/* Return number of macro-instructions.
+ This includes any added at runtime. */
+
+int
+cgen_macro_insn_count (cd)
+ CGEN_CPU_DESC cd;
+{
+ int count = cd->macro_insn_table.num_init_entries;
+ CGEN_INSN_LIST *rt_insns = cd->macro_insn_table.new_entries;
+
+ for ( ; rt_insns != NULL; rt_insns = rt_insns->next)
+ ++count;
+
+ return count;
+}
+
+/* Cover function to read and properly byteswap an insn value. */
+
+CGEN_INSN_INT
+cgen_get_insn_value (cd, buf, length)
+ CGEN_CPU_DESC cd;
+ unsigned char *buf;
+ int length;
+{
+ CGEN_INSN_INT value;
+
+ switch (length)
+ {
+ case 8:
+ value = *buf;
+ break;
+ case 16:
+ if (cd->insn_endian == CGEN_ENDIAN_BIG)
+ value = bfd_getb16 (buf);
+ else
+ value = bfd_getl16 (buf);
+ break;
+ case 32:
+ if (cd->insn_endian == CGEN_ENDIAN_BIG)
+ value = bfd_getb32 (buf);
+ else
+ value = bfd_getl32 (buf);
+ break;
+ default:
+ abort ();
+ }
+
+ return value;
+}
+
+/* Cover function to store an insn value properly byteswapped. */
+
+void
+cgen_put_insn_value (cd, buf, length, value)
+ CGEN_CPU_DESC cd;
+ unsigned char *buf;
+ int length;
+ CGEN_INSN_INT value;
+{
+ switch (length)
+ {
+ case 8:
+ buf[0] = value;
+ break;
+ case 16:
+ if (cd->insn_endian == CGEN_ENDIAN_BIG)
+ bfd_putb16 (value, buf);
+ else
+ bfd_putl16 (value, buf);
+ break;
+ case 32:
+ if (cd->insn_endian == CGEN_ENDIAN_BIG)
+ bfd_putb32 (value, buf);
+ else
+ bfd_putl32 (value, buf);
+ break;
+ default:
+ abort ();
+ }
+}
+
+/* Look up instruction INSN_*_VALUE and extract its fields.
+ INSN_INT_VALUE is used if CGEN_INT_INSN_P.
+ Otherwise INSN_BYTES_VALUE is used.
+ INSN, if non-null, is the insn table entry.
+ Otherwise INSN_*_VALUE is examined to compute it.
+ LENGTH is the bit length of INSN_*_VALUE if known, otherwise 0.
+ 0 is only valid if `insn == NULL && ! CGEN_INT_INSN_P'.
+ If INSN != NULL, LENGTH must be valid.
+ ALIAS_P is non-zero if alias insns are to be included in the search.
+
+ The result is a pointer to the insn table entry, or NULL if the instruction
+ wasn't recognized. */
+
+/* ??? Will need to be revisited for VLIW architectures. */
+
+const CGEN_INSN *
+cgen_lookup_insn (cd, insn, insn_int_value, insn_bytes_value, length, fields,
+ alias_p)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN *insn;
+ CGEN_INSN_INT insn_int_value;
+ /* ??? CGEN_INSN_BYTES would be a nice type name to use here. */
+ unsigned char *insn_bytes_value;
+ int length;
+ CGEN_FIELDS *fields;
+ int alias_p;
+{
+ unsigned char *buf;
+ CGEN_INSN_INT base_insn;
+ CGEN_EXTRACT_INFO ex_info;
+ CGEN_EXTRACT_INFO *info;
+
+ if (cd->int_insn_p)
+ {
+ info = NULL;
+ buf = (unsigned char *) alloca (cd->max_insn_bitsize / 8);
+ cgen_put_insn_value (cd, buf, length, insn_int_value);
+ base_insn = insn_int_value;
+ }
+ else
+ {
+ info = &ex_info;
+ ex_info.dis_info = NULL;
+ ex_info.insn_bytes = insn_bytes_value;
+ ex_info.valid = -1;
+ buf = insn_bytes_value;
+ base_insn = cgen_get_insn_value (cd, buf, length);
+ }
+
+ if (!insn)
+ {
+ const CGEN_INSN_LIST *insn_list;
+
+ /* The instructions are stored in hash lists.
+ Pick the first one and keep trying until we find the right one. */
+
+ insn_list = cgen_dis_lookup_insn (cd, buf, base_insn);
+ while (insn_list != NULL)
+ {
+ insn = insn_list->insn;
+
+ if (alias_p
+ /* FIXME: Ensure ALIAS attribute always has same index. */
+ || ! CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_ALIAS))
+ {
+ /* Basic bit mask must be correct. */
+ /* ??? May wish to allow target to defer this check until the
+ extract handler. */
+ if ((base_insn & CGEN_INSN_BASE_MASK (insn))
+ == CGEN_INSN_BASE_VALUE (insn))
+ {
+ /* ??? 0 is passed for `pc' */
+ int elength = CGEN_EXTRACT_FN (cd, insn)
+ (cd, insn, info, base_insn, fields, (bfd_vma) 0);
+ if (elength > 0)
+ {
+ /* sanity check */
+ if (length != 0 && length != elength)
+ abort ();
+ return insn;
+ }
+ }
+ }
+
+ insn_list = insn_list->next;
+ }
+ }
+ else
+ {
+ /* Sanity check: can't pass an alias insn if ! alias_p. */
+ if (! alias_p
+ && CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_ALIAS))
+ abort ();
+ /* Sanity check: length must be correct. */
+ if (length != CGEN_INSN_BITSIZE (insn))
+ abort ();
+
+ /* ??? 0 is passed for `pc' */
+ length = CGEN_EXTRACT_FN (cd, insn)
+ (cd, insn, info, base_insn, fields, (bfd_vma) 0);
+ /* Sanity check: must succeed.
+ Could relax this later if it ever proves useful. */
+ if (length == 0)
+ abort ();
+ return insn;
+ }
+
+ return NULL;
+}
+
+/* Fill in the operand instances used by INSN whose operands are FIELDS.
+ INDICES is a pointer to a buffer of MAX_OPERAND_INSTANCES ints to be filled
+ in. */
+
+void
+cgen_get_insn_operands (cd, insn, fields, indices)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN *insn;
+ const CGEN_FIELDS *fields;
+ int *indices;
+{
+ const CGEN_OPINST *opinst;
+ int i;
+
+ if (insn->opinst == NULL)
+ abort ();
+ for (i = 0, opinst = insn->opinst; opinst->type != CGEN_OPINST_END; ++i, ++opinst)
+ {
+ enum cgen_operand_type op_type = opinst->op_type;
+ if (op_type == CGEN_OPERAND_NIL)
+ indices[i] = opinst->index;
+ else
+ indices[i] = (*cd->get_int_operand) (cd, op_type, fields);
+ }
+}
+
+/* Cover function to cgen_get_insn_operands when either INSN or FIELDS
+ isn't known.
+ The INSN, INSN_*_VALUE, and LENGTH arguments are passed to
+ cgen_lookup_insn unchanged.
+ INSN_INT_VALUE is used if CGEN_INT_INSN_P.
+ Otherwise INSN_BYTES_VALUE is used.
+
+ The result is the insn table entry or NULL if the instruction wasn't
+ recognized. */
+
+const CGEN_INSN *
+cgen_lookup_get_insn_operands (cd, insn, insn_int_value, insn_bytes_value,
+ length, indices, fields)
+ CGEN_CPU_DESC cd;
+ const CGEN_INSN *insn;
+ CGEN_INSN_INT insn_int_value;
+ /* ??? CGEN_INSN_BYTES would be a nice type name to use here. */
+ unsigned char *insn_bytes_value;
+ int length;
+ int *indices;
+ CGEN_FIELDS *fields;
+{
+ /* Pass non-zero for ALIAS_P only if INSN != NULL.
+ If INSN == NULL, we want a real insn. */
+ insn = cgen_lookup_insn (cd, insn, insn_int_value, insn_bytes_value,
+ length, fields, insn != NULL);
+ if (! insn)
+ return NULL;
+
+ cgen_get_insn_operands (cd, insn, fields, indices);
+ return insn;
+}
+
+/* Allow signed overflow of instruction fields. */
+void
+cgen_set_signed_overflow_ok (cd)
+ CGEN_CPU_DESC cd;
+{
+ cd->signed_overflow_ok_p = 1;
+}
+
+/* Generate an error message if a signed field in an instruction overflows. */
+void
+cgen_clear_signed_overflow_ok (cd)
+ CGEN_CPU_DESC cd;
+{
+ cd->signed_overflow_ok_p = 0;
+}
+
+/* Will an error message be generated if a signed field in an instruction overflows ? */
+unsigned int
+cgen_signed_overflow_ok_p (cd)
+ CGEN_CPU_DESC cd;
+{
+ return cd->signed_overflow_ok_p;
+}
diff --git a/contrib/binutils/opcodes/config.in b/contrib/binutils/opcodes/config.in
index 6be7c59..c60a321 100644
--- a/contrib/binutils/opcodes/config.in
+++ b/contrib/binutils/opcodes/config.in
@@ -1,10 +1,101 @@
/* config.in. Generated automatically from configure.in by autoheader. */
-/* Name of package. */
-#undef PACKAGE
+/* Define if using alloca.c. */
+#undef C_ALLOCA
-/* Version of package. */
-#undef VERSION
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> 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 <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -14,3 +105,31 @@
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
diff --git a/contrib/binutils/opcodes/configure b/contrib/binutils/opcodes/configure
index ab71c7a..72c9726 100755
--- a/contrib/binutils/opcodes/configure
+++ b/contrib/binutils/opcodes/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,22 +12,26 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared build shared libraries [default=no]
- --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-shared[=PKGS] build shared libraries [default=no]"
ac_help="$ac_help
- --enable-static build static libraries [default=yes]
- --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
+ --enable-static[=PKGS] build static libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+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-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
+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"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -45,6 +49,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -159,6 +164,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
@@ -329,6 +335,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=*)
@@ -350,7 +361,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
+ echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@@ -494,12 +505,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
@@ -520,9 +535,11 @@ 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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
+ac_exeext=
+ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -584,7 +601,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:588: checking host system type" >&5
+echo "configure:605: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -605,7 +622,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:609: checking target system type" >&5
+echo "configure:626: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -623,7 +640,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:627: checking build system type" >&5
+echo "configure:644: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -645,6 +662,249 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:669: 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:699: 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:750: 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:782: 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 793 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:798: \"$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:824: 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:829: 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 <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$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
+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:857: 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:889: 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
+
# We currently only use the version number for the name of any shared
# library. For user convenience, we always use the same version
@@ -663,12 +923,12 @@ BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[
# 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:667: checking for a BSD compatible install" >&5
+echo "configure:927: 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="${IFS}:"
+ 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
@@ -711,13 +971,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
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:721: checking whether build environment is sane" >&5
+echo "configure:980: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -774,7 +1033,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:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1037: 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
@@ -820,7 +1079,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:824: checking for working aclocal" >&5
+echo "configure:1083: 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.
@@ -833,7 +1092,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:837: checking for working autoconf" >&5
+echo "configure:1096: 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.
@@ -846,7 +1105,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:850: checking for working automake" >&5
+echo "configure:1109: 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.
@@ -859,7 +1118,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:863: checking for working autoheader" >&5
+echo "configure:1122: 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.
@@ -872,7 +1131,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:876: checking for working makeinfo" >&5
+echo "configure:1135: 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.
@@ -895,15 +1154,16 @@ 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:899: checking for $ac_word" >&5
+echo "configure:1158: 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
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
@@ -926,15 +1186,16 @@ 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:930: checking for $ac_word" >&5
+echo "configure:1190: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
@@ -957,15 +1218,16 @@ 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:961: checking for $ac_word" >&5
+echo "configure:1222: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -1036,18 +1298,42 @@ else
enable_static=yes
fi
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+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
+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:1043: checking for $ac_word" >&5
+echo "configure:1328: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
@@ -1065,176 +1351,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:1072: 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="${IFS}:"
- for ac_dir in $PATH; 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:1101: 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="${IFS}:"
- ac_prog_rejected=no
- for ac_dir in $PATH; 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
-
- 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:1149: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 1159 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:1163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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*
-
-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:1183: 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:1188: 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 <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1197: \"$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
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- 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:1212: 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
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1243,18 +1359,23 @@ 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:1252: checking for ld used by GCC" >&5
+echo "configure:1367: 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]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # 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
@@ -1266,19 +1387,19 @@ echo "configure:1252: 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:1270: checking for GNU ld" >&5
+echo "configure:1391: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1273: checking for non-GNU ld" >&5
+echo "configure:1394: 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}:"
+ 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"; then
+ 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.
@@ -1286,7 +1407,7 @@ else
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
+ test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -1303,9 +1424,8 @@ 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:1309: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1429: 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
@@ -1321,44 +1441,43 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1325: checking for BSD-compatible nm" >&5
+echo "configure:1445: 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
- case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ 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; then
+ 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"
+ 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"
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
else
- ac_cv_path_NM="$ac_dir/nm"
+ 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
- break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac
+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:1362: checking whether ln -s works" >&5
+echo "configure:1481: 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
@@ -1378,24 +1497,37 @@ else
echo "$ac_t""no" 1>&6
fi
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
# Check for any special flags to pass to ltconfig.
-libtool_flags=
+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 "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+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 "$host" in
+case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1398 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1530 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1413,17 +1545,122 @@ case "$host" in
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1552: 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 <<EOF
+#line 1557 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1564: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
;;
+
+
esac
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+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 \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# 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'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
@@ -1473,7 +1710,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1477: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:1714: 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"
@@ -1483,96 +1720,112 @@ else
fi
echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
-echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:1495: checking for Cygwin32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+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:1737: 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 <<EOF
-#line 1500 "configure"
+#line 1742 "configure"
#include "confdefs.h"
int main() {
-return __CYGWIN32__;
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_cygwin32=yes
+ ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_cygwin32=no
+ ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_cygwin32" 1>&6
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:1524: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+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:1770: 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 <<EOF
-#line 1529 "configure"
+#line 1775 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- am_cv_mingw32=yes
+ ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- am_cv_mingw32=no
+ ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
-echo "$ac_t""$am_cv_mingw32" 1>&6
+echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
+test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1555: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+echo "configure:1801: 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 "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:1811: \"$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
-
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
fi
+
EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
# host-specific stuff:
@@ -1580,15 +1833,16 @@ echo "$ac_t""${am_cv_exeext}" 1>&6
# 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:1584: checking for $ac_word" >&5
+echo "configure:1837: 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="${IFS}:"
- for ac_dir in $PATH; 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/$ac_word; then
ac_cv_prog_CC="gcc"
@@ -1609,16 +1863,17 @@ 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:1613: checking for $ac_word" >&5
+echo "configure:1867: 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="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- for ac_dir in $PATH; do
+ 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
@@ -1653,25 +1908,61 @@ 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:1918: 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:1661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1950: 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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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 1671 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1961 "configure"
#include "confdefs.h"
+
main(){return(0);}
EOF
-if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1966: \"$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
@@ -1685,18 +1976,24 @@ else
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:1695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1992: 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:1700: checking whether we are using GNU C" >&5
+echo "configure:1997: 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
@@ -1705,7 +2002,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1709: \"$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:2006: \"$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
@@ -1716,11 +2013,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- 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:1724: checking whether ${CC-cc} accepts -g" >&5
+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:2025: 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
@@ -1735,28 +2036,26 @@ 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 "$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="-O2"
+ CFLAGS="-g"
fi
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
fi
-. ${srcdir}/../bfd/configure.host
-
-
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-
+ALL_LINGUAS=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1760: checking how to run the C preprocessor" >&5
+echo "configure:2059: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1771,14 +2070,14 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1775 "configure"
+#line 2074 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2080: \"$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
:
else
@@ -1788,14 +2087,31 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1792 "configure"
+#line 2091 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:2097: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 2108 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2114: \"$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
:
else
@@ -1808,6 +2124,8 @@ fi
rm -f conftest*
fi
rm -f conftest*
+fi
+rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
@@ -1816,22 +2134,1699 @@ else
fi
echo "$ac_t""$CPP" 1>&6
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2139: 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 <<EOF
+#line 2144 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2152: \"$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*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+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
+#line 2169 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+#line 2187 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2208 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2243: 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 <<EOF
+#line 2248 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2318: 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 <<EOF
+#line 2325 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2358: 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 <<EOF
+#line 2363 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2391: 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 <<EOF
+#line 2396 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+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:2426: 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 <<EOF
+#line 2431 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2438: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2459: 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 <<EOF
+#line 2464 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2492: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2524: 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 <<EOF
+#line 2529 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&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:2554: 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 <<EOF
+#line 2559 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2582: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2609: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2617 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2636: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+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:2661: 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
+#line 2666 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2671: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2700: 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 <<EOF
+#line 2705 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2728: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2753: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2761 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2901: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+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:2929: 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
+#line 2934 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2939: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2969: 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 <<EOF
+#line 2974 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2997: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3026: 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 <<EOF
+#line 3031 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3054: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3088: 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 <<EOF
+#line 3093 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3100: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3121: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3141: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3160: 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
+#line 3165 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3170: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+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:3187: 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 <<EOF
+#line 3192 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3199: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+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:3215: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3223 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3234: \"$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
+ 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
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:3250: 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 <<EOF
+#line 3255 "configure"
+#include "confdefs.h"
+
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3262: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:3290: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3324: 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 <<EOF
+#line 3329 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3352: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:3379: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3415: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3447 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:3487: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3521: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ 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_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3557: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3647: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ if test -f $srcdir/po2tbl.sed.in; then
+ 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:3675: 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
+#line 3680 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3685: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/po2tbl.sed.in > po2tbl.sed
+ fi
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+
+
+ l=
+
+
+ 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
+
+
+. ${srcdir}/../bfd/configure.host
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# 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:3762: 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'
+
+
for ac_hdr in string.h strings.h stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1824: checking for $ac_hdr" >&5
+echo "configure:3819: 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
-#line 1829 "configure"
+#line 3824 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3829: \"$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*
eval "ac_cv_header_$ac_safe=yes"
@@ -1858,13 +3853,29 @@ done
+using_cgen=no
+
+# Horrible hacks to build DLLs on Windows.
+WIN32LDFLAGS=
+WIN32LIBADD=
+case "${host}" in
+*-*-cygwin*)
+ if test "$enable_shared" = "yes"; then
+ WIN32LDFLAGS="-no-undefined"
+ WIN32LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
+ fi
+ ;;
+esac
+
+
+
# target-specific stuff:
# Canonicalize the secondary target names.
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
+ result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
else
@@ -1907,21 +3918,27 @@ if test x${all_targets} = xfalse ; then
bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
+ bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_convex_arch) ;;
bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
+ bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
+ bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
+ bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
bfd_i386_arch) ta="$ta i386-dis.lo" ;;
bfd_i860_arch) ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
- bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.lo m32r-asm.lo m32r-dis.lo" ;;
+ bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
+ bfd_mcore_arch) ta="$ta mcore-dis.lo" ;;
bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
+ bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
bfd_romp_arch) ;;
@@ -1930,8 +3947,11 @@ if test x${all_targets} = xfalse ; then
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
+ bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
- bfd_vax_arch) ;;
+ bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
+ bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
+ bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
@@ -1941,6 +3961,10 @@ if test x${all_targets} = xfalse ; then
esac
done
+ if test $using_cgen = yes ; then
+ ta="$ta $cgen_files"
+ fi
+
# Weed out duplicate .o files.
f=""
for i in $ta ; do
@@ -1994,7 +4018,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -2061,7 +4085,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -2072,7 +4096,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2085,6 +4109,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -2118,9 +4143,10 @@ 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_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g
@@ -2131,15 +4157,37 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%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%@HDEFINES@%$HDEFINES%g
s%@CPP@%$CPP%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
+s%@HDEFINES@%$HDEFINES%g
+s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
+s%@WIN32LIBADD@%$WIN32LIBADD%g
s%@archdefs@%$archdefs%g
s%@BFD_MACHINES@%$BFD_MACHINES%g
@@ -2183,7 +4231,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -2356,7 +4404,7 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-
+sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/binutils/opcodes/configure.in b/contrib/binutils/opcodes/configure.in
index 3a24a43..6ef461f 100644
--- a/contrib/binutils/opcodes/configure.in
+++ b/contrib/binutils/opcodes/configure.in
@@ -1,10 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.5)
+AC_PREREQ(2.13)
AC_INIT(z8k-dis.c)
AC_CANONICAL_SYSTEM
+AC_ISC_POSIX
# We currently only use the version number for the name of any shared
# library. For user convenience, we always use the same version
@@ -50,28 +51,46 @@ fi
AC_ARG_PROGRAM
AM_MAINTAINER_MODE
-AM_CYGWIN32
-AM_EXEEXT
+AC_EXEEXT
# host-specific stuff:
AC_PROG_CC
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
. ${srcdir}/../bfd/configure.host
AC_SUBST(HDEFINES)
-AM_PROG_INSTALL
+AC_PROG_INSTALL
AC_CHECK_HEADERS(string.h strings.h stdlib.h)
+using_cgen=no
+
+# Horrible hacks to build DLLs on Windows.
+WIN32LDFLAGS=
+WIN32LIBADD=
+case "${host}" in
+*-*-cygwin*)
+ if test "$enable_shared" = "yes"; then
+ WIN32LDFLAGS="-no-undefined"
+ WIN32LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
+ fi
+ ;;
+esac
+AC_SUBST(WIN32LDFLAGS)
+AC_SUBST(WIN32LIBADD)
+
# target-specific stuff:
# Canonicalize the secondary target names.
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
do
- result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
+ result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
else
@@ -114,21 +133,27 @@ if test x${all_targets} = xfalse ; then
bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
+ bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_convex_arch) ;;
bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
+ bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
+ bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
+ bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
bfd_i386_arch) ta="$ta i386-dis.lo" ;;
bfd_i860_arch) ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
- bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.lo m32r-asm.lo m32r-dis.lo" ;;
+ bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
+ bfd_mcore_arch) ta="$ta mcore-dis.lo" ;;
bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
+ bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
bfd_romp_arch) ;;
@@ -137,8 +162,11 @@ if test x${all_targets} = xfalse ; then
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
+ bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
- bfd_vax_arch) ;;
+ bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
+ bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
+ bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
@@ -148,6 +176,10 @@ if test x${all_targets} = xfalse ; then
esac
done
+ if test $using_cgen = yes ; then
+ ta="$ta $cgen_files"
+ fi
+
# Weed out duplicate .o files.
f=""
for i in $ta ; do
@@ -178,4 +210,5 @@ fi
AC_SUBST(archdefs)
AC_SUBST(BFD_MACHINES)
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
+[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
diff --git a/contrib/binutils/opcodes/dis-buf.c b/contrib/binutils/opcodes/dis-buf.c
index befbd59..b828206 100644
--- a/contrib/binutils/opcodes/dis-buf.c
+++ b/contrib/binutils/opcodes/dis-buf.c
@@ -1,5 +1,5 @@
/* Disassemble from a buffer, for GNU.
- Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "dis-asm.h"
#include <errno.h>
+#include "opintl.h"
/* Get LENGTH bytes from info's buffer, at target address memaddr.
Transfer them to myaddr. */
@@ -25,14 +26,20 @@ int
buffer_read_memory (memaddr, myaddr, length, info)
bfd_vma memaddr;
bfd_byte *myaddr;
- int length;
+ unsigned int length;
struct disassemble_info *info;
{
+ unsigned int opb = info->octets_per_byte;
+ unsigned int end_addr_offset = length / opb;
+ unsigned int max_addr_offset = info->buffer_length / opb;
+ unsigned int octets = (memaddr - info->buffer_vma) * opb;
+
if (memaddr < info->buffer_vma
- || memaddr + length > info->buffer_vma + info->buffer_length)
+ || memaddr - info->buffer_vma + end_addr_offset > max_addr_offset)
/* Out of bounds. Use EIO because GDB uses it. */
return EIO;
- memcpy (myaddr, info->buffer + (memaddr - info->buffer_vma), length);
+ memcpy (myaddr, info->buffer + octets, length);
+
return 0;
}
@@ -46,12 +53,12 @@ perror_memory (status, memaddr, info)
{
if (status != EIO)
/* Can't happen. */
- (*info->fprintf_func) (info->stream, "Unknown error %d\n", status);
+ info->fprintf_func (info->stream, _("Unknown error %d\n"), status);
else
/* Actually, address between memaddr and memaddr + len was
out of bounds. */
- (*info->fprintf_func) (info->stream,
- "Address 0x%x is out of bounds.\n", memaddr);
+ info->fprintf_func (info->stream,
+ _("Address 0x%x is out of bounds.\n"), memaddr);
}
/* This could be in a separate file, to save miniscule amounts of space
@@ -66,15 +73,41 @@ generic_print_address (addr, info)
bfd_vma addr;
struct disassemble_info *info;
{
- (*info->fprintf_func) (info->stream, "0x%x", addr);
+ char buf[30];
+
+ sprintf_vma (buf, addr);
+ (*info->fprintf_func) (info->stream, "0x%s", buf);
+}
+
+/* Just concatenate the address as hex. This is included for
+ completeness even though both GDB and objdump provide their own (to
+ print symbolic addresses). */
+
+void
+generic_strcat_address (addr, buf, len)
+ bfd_vma addr;
+ char *buf;
+ int len;
+{
+ if (buf != (char *)NULL && len > 0)
+ {
+ char tmpBuf[30];
+
+ sprintf_vma (tmpBuf, addr);
+ if ((strlen (buf) + strlen (tmpBuf)) <= (unsigned int) len)
+ strcat (buf, tmpBuf);
+ else
+ strncat (buf, tmpBuf, (len - strlen(buf)));
+ }
+ return;
}
/* Just return the given address. */
int
generic_symbol_at_address (addr, info)
- bfd_vma addr;
- struct disassemble_info * info;
+ bfd_vma addr ATTRIBUTE_UNUSED;
+ struct disassemble_info *info ATTRIBUTE_UNUSED;
{
return 1;
}
diff --git a/contrib/binutils/opcodes/disassemble.c b/contrib/binutils/opcodes/disassemble.c
index 213ff7f..373b652 100644
--- a/contrib/binutils/opcodes/disassemble.c
+++ b/contrib/binutils/opcodes/disassemble.c
@@ -1,5 +1,6 @@
/* Select disassembly routine for specified architecture.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +16,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. */
-#include "ansidecl.h"
+#include "sysdep.h"
#include "dis-asm.h"
#ifdef ARCH_all
@@ -23,25 +24,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_alpha
#define ARCH_arc
#define ARCH_arm
+#define ARCH_avr
#define ARCH_d10v
+#define ARCH_d30v
#define ARCH_h8300
#define ARCH_h8500
#define ARCH_hppa
+#define ARCH_i370
#define ARCH_i386
#define ARCH_i960
+#define ARCH_fr30
#define ARCH_m32r
#define ARCH_m68k
#define ARCH_m88k
+#define ARCH_mcore
#define ARCH_mips
#define ARCH_mn10200
#define ARCH_mn10300
#define ARCH_ns32k
+#define ARCH_pj
#define ARCH_powerpc
#define ARCH_rs6000
#define ARCH_sh
#define ARCH_sparc
#define ARCH_tic30
+#define ARCH_tic80
#define ARCH_v850
+#define ARCH_vax
#define ARCH_w65
#define ARCH_z8k
#endif
@@ -85,11 +94,21 @@ disassembler (abfd)
disassemble = print_insn_little_arm;
break;
#endif
+#ifdef ARCH_avr
+ case bfd_arch_avr:
+ disassemble = print_insn_avr;
+ break;
+#endif
#ifdef ARCH_d10v
case bfd_arch_d10v:
disassemble = print_insn_d10v;
break;
#endif
+#ifdef ARCH_d30v
+ case bfd_arch_d30v:
+ disassemble = print_insn_d30v;
+ break;
+#endif
#ifdef ARCH_h8300
case bfd_arch_h8300:
if (bfd_get_mach(abfd) == bfd_mach_h8300h)
@@ -110,9 +129,17 @@ disassembler (abfd)
disassemble = print_insn_hppa;
break;
#endif
+#ifdef ARCH_i370
+ case bfd_arch_i370:
+ disassemble = print_insn_i370;
+ break;
+#endif
#ifdef ARCH_i386
case bfd_arch_i386:
- disassemble = print_insn_i386;
+ if (bfd_get_mach (abfd) == bfd_mach_i386_i386_intel_syntax)
+ disassemble = print_insn_i386_intel;
+ else
+ disassemble = print_insn_i386_att;
break;
#endif
#ifdef ARCH_i960
@@ -120,6 +147,11 @@ disassembler (abfd)
disassemble = print_insn_i960;
break;
#endif
+#ifdef ARCH_fr30
+ case bfd_arch_fr30:
+ disassemble = print_insn_fr30;
+ break;
+#endif
#ifdef ARCH_m32r
case bfd_arch_m32r:
disassemble = print_insn_m32r;
@@ -140,6 +172,11 @@ disassembler (abfd)
disassemble = print_insn_ns32k;
break;
#endif
+#ifdef ARCH_mcore
+ case bfd_arch_mcore:
+ disassemble = print_insn_mcore;
+ break;
+#endif
#ifdef ARCH_mips
case bfd_arch_mips:
if (bfd_big_endian (abfd))
@@ -158,6 +195,11 @@ disassembler (abfd)
disassemble = print_insn_mn10300;
break;
#endif
+#ifdef ARCH_pj
+ case bfd_arch_pj:
+ disassemble = print_insn_pj;
+ break;
+#endif
#ifdef ARCH_powerpc
case bfd_arch_powerpc:
if (bfd_big_endian (abfd))
@@ -189,6 +231,11 @@ disassembler (abfd)
disassemble = print_insn_tic30;
break;
#endif
+#ifdef ARCH_tic80
+ case bfd_arch_tic80:
+ disassemble = print_insn_tic80;
+ break;
+#endif
#ifdef ARCH_v850
case bfd_arch_v850:
disassemble = print_insn_v850;
@@ -207,9 +254,24 @@ disassembler (abfd)
disassemble = print_insn_z8002;
break;
#endif
+#ifdef ARCH_vax
+ case bfd_arch_vax:
+ disassemble = print_insn_vax;
+ break;
+#endif
default:
return 0;
}
return disassemble;
}
+void
+disassembler_usage (stream)
+ FILE *stream ATTRIBUTE_UNUSED;
+{
+#ifdef ARCH_arm
+ print_arm_disassembler_options (stream);
+#endif
+
+ return;
+}
diff --git a/contrib/binutils/opcodes/i386-dis.c b/contrib/binutils/opcodes/i386-dis.c
index 63b7d9c..a75d6e3 100644
--- a/contrib/binutils/opcodes/i386-dis.c
+++ b/contrib/binutils/opcodes/i386-dis.c
@@ -1,5 +1,5 @@
/* Print i386 instructions for GDB, the GNU debugger.
- Copyright (C) 1988, 89, 91, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1988, 89, 91, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GDB.
@@ -29,17 +29,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
* of the "Opcode Map" chapter (Appendix A) of the Intel 80386
* Programmers Manual. Usually, there is a capital letter, followed
* by a small letter. The capital letter tell the addressing mode,
- * and the small letter tells about the operand size. Refer to
+ * and the small letter tells about the operand size. Refer to
* the Intel manual for details.
*/
#include "dis-asm.h"
#include "sysdep.h"
+#include "opintl.h"
#define MAXLEN 20
#include <setjmp.h>
+#ifndef UNIXWARE_COMPAT
+/* Set non-zero for broken, compatible instructions. Set to zero for
+ non-broken opcodes. */
+#define UNIXWARE_COMPAT 1
+#endif
+
static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *));
struct dis_private
@@ -51,6 +58,31 @@ struct dis_private
jmp_buf bailout;
};
+/* The opcode for the fwait instruction, which we treat as a prefix
+ when we can. */
+#define FWAIT_OPCODE (0x9b)
+
+/* Flags for the prefixes for the current instruction. See below. */
+static int prefixes;
+
+/* Flags for prefixes which we somehow handled when printing the
+ current instruction. */
+static int used_prefixes;
+
+/* Flags stored in PREFIXES. */
+#define PREFIX_REPZ 1
+#define PREFIX_REPNZ 2
+#define PREFIX_LOCK 4
+#define PREFIX_CS 8
+#define PREFIX_SS 0x10
+#define PREFIX_DS 0x20
+#define PREFIX_ES 0x40
+#define PREFIX_FS 0x80
+#define PREFIX_GS 0x100
+#define PREFIX_DATA 0x200
+#define PREFIX_ADDR 0x400
+#define PREFIX_FWAIT 0x800
+
/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
to ADDR (exclusive) are valid. Returns 1 for success, longjmps
on error. */
@@ -73,7 +105,12 @@ fetch_data (info, addr)
info);
if (status != 0)
{
- (*info->memory_error_func) (status, start, info);
+ /* If we did manage to read at least one byte, then
+ print_insn_i386 will do something sensible. Otherwise, print
+ an error. We do that here because this is where we know
+ STATUS. */
+ if (priv->max_fetched == priv->the_buffer)
+ (*info->memory_error_func) (status, start, info);
longjmp (priv->bailout, 1);
}
else
@@ -81,28 +118,27 @@ fetch_data (info, addr)
return 1;
}
+#define XX NULL, 0
+
#define Eb OP_E, b_mode
#define indirEb OP_indirE, b_mode
#define Gb OP_G, b_mode
#define Ev OP_E, v_mode
+#define Ed OP_E, d_mode
#define indirEv OP_indirE, v_mode
#define Ew OP_E, w_mode
#define Ma OP_E, v_mode
-#define M OP_E, 0
-#define Mp OP_E, 0 /* ? */
+#define M OP_E, 0 /* lea */
+#define Mp OP_E, 0 /* 32 or 48 bit memory operand for LDS, LES etc */
#define Gv OP_G, v_mode
#define Gw OP_G, w_mode
-#define Rw OP_rm, w_mode
-#define Rd OP_rm, d_mode
+#define Rd OP_Rd, d_mode
#define Ib OP_I, b_mode
#define sIb OP_sI, b_mode /* sign extened byte */
#define Iv OP_I, v_mode
#define Iw OP_I, w_mode
#define Jb OP_J, b_mode
#define Jv OP_J, v_mode
-#if 0
-#define ONE OP_ONE, 0
-#endif
#define Cd OP_C, d_mode
#define Dd OP_D, d_mode
#define Td OP_T, d_mode
@@ -128,14 +164,14 @@ fetch_data (info, addr)
#define indirDX OP_REG, indir_dx_reg
#define Sw OP_SEG, w_mode
-#define Ap OP_DIR, lptr
-#define Av OP_DIR, v_mode
+#define Ap OP_DIR, 0
#define Ob OP_OFF, b_mode
#define Ov OP_OFF, v_mode
-#define Xb OP_DSSI, b_mode
-#define Xv OP_DSSI, v_mode
-#define Yb OP_ESDI, b_mode
-#define Yv OP_ESDI, v_mode
+#define Xb OP_DSreg, eSI_reg
+#define Xv OP_DSreg, eSI_reg
+#define Yb OP_ESreg, eDI_reg
+#define Yv OP_ESreg, eDI_reg
+#define DSBX OP_DSreg, eBX_reg
#define es OP_REG, es_reg
#define ss OP_REG, ss_reg
@@ -145,48 +181,66 @@ fetch_data (info, addr)
#define gs OP_REG, gs_reg
#define MX OP_MMX, 0
+#define XM OP_XMM, 0
#define EM OP_EM, v_mode
-#define MS OP_MS, b_mode
-
-typedef int (*op_rtn) PARAMS ((int bytemode, int aflag, int dflag));
-
-static int OP_E PARAMS ((int, int, int));
-static int OP_G PARAMS ((int, int, int));
-static int OP_I PARAMS ((int, int, int));
-static int OP_indirE PARAMS ((int, int, int));
-static int OP_sI PARAMS ((int, int, int));
-static int OP_REG PARAMS ((int, int, int));
-static int OP_J PARAMS ((int, int, int));
-static int OP_DIR PARAMS ((int, int, int));
-static int OP_OFF PARAMS ((int, int, int));
-static int OP_ESDI PARAMS ((int, int, int));
-static int OP_DSSI PARAMS ((int, int, int));
-static int OP_SEG PARAMS ((int, int, int));
-static int OP_C PARAMS ((int, int, int));
-static int OP_D PARAMS ((int, int, int));
-static int OP_T PARAMS ((int, int, int));
-static int OP_rm PARAMS ((int, int, int));
-static int OP_ST PARAMS ((int, int, int));
-static int OP_STi PARAMS ((int, int, int));
-#if 0
-static int OP_ONE PARAMS ((int, int, int));
+#define EX OP_EX, v_mode
+#define MS OP_MS, v_mode
+#define None OP_E, 0
+#define OPSUF OP_3DNowSuffix, 0
+#define OPSIMD OP_SIMD_Suffix, 0
+
+/* bits in sizeflag */
+#if 0 /* leave undefined until someone adds the extra flag to objdump */
+#define SUFFIX_ALWAYS 4
#endif
-static int OP_MMX PARAMS ((int, int, int));
-static int OP_EM PARAMS ((int, int, int));
-static int OP_MS PARAMS ((int, int, int));
-
-static void append_prefix PARAMS ((void));
-static void set_op PARAMS ((int op));
-static void putop PARAMS ((char *template, int aflag, int dflag));
-static void dofloat PARAMS ((int aflag, int dflag));
+#define AFLAG 2
+#define DFLAG 1
+
+typedef void (*op_rtn) PARAMS ((int bytemode, int sizeflag));
+
+static void OP_E PARAMS ((int, int));
+static void OP_G PARAMS ((int, int));
+static void OP_I PARAMS ((int, int));
+static void OP_indirE PARAMS ((int, int));
+static void OP_sI PARAMS ((int, int));
+static void OP_REG PARAMS ((int, int));
+static void OP_J PARAMS ((int, int));
+static void OP_DIR PARAMS ((int, int));
+static void OP_OFF PARAMS ((int, int));
+static void OP_ESreg PARAMS ((int, int));
+static void OP_DSreg PARAMS ((int, int));
+static void OP_SEG PARAMS ((int, int));
+static void OP_C PARAMS ((int, int));
+static void OP_D PARAMS ((int, int));
+static void OP_T PARAMS ((int, int));
+static void OP_Rd PARAMS ((int, int));
+static void OP_ST PARAMS ((int, int));
+static void OP_STi PARAMS ((int, int));
+static void OP_MMX PARAMS ((int, int));
+static void OP_XMM PARAMS ((int, int));
+static void OP_EM PARAMS ((int, int));
+static void OP_EX PARAMS ((int, int));
+static void OP_MS PARAMS ((int, int));
+static void OP_3DNowSuffix PARAMS ((int, int));
+static void OP_SIMD_Suffix PARAMS ((int, int));
+static void SIMD_Fixup PARAMS ((int, int));
+
+static void append_seg PARAMS ((void));
+static void set_op PARAMS ((unsigned int op));
+static void putop PARAMS ((const char *template, int sizeflag));
+static void dofloat PARAMS ((int sizeflag));
static int get16 PARAMS ((void));
static int get32 PARAMS ((void));
static void ckprefix PARAMS ((void));
+static const char *prefix_name PARAMS ((int, int));
+static void ptr_reg PARAMS ((int, int));
+static void BadOp PARAMS ((void));
#define b_mode 1
#define v_mode 2
#define w_mode 3
#define d_mode 4
+#define x_mode 5
#define es_reg 100
#define cs_reg 101
@@ -194,16 +248,15 @@ static void ckprefix PARAMS ((void));
#define ds_reg 103
#define fs_reg 104
#define gs_reg 105
-#define eAX_reg 107
-#define eCX_reg 108
-#define eDX_reg 109
-#define eBX_reg 110
-#define eSP_reg 111
-#define eBP_reg 112
-#define eSI_reg 113
-#define eDI_reg 114
-#define lptr 115
+#define eAX_reg 108
+#define eCX_reg 109
+#define eDX_reg 110
+#define eBX_reg 111
+#define eSP_reg 112
+#define eBP_reg 113
+#define eSI_reg 114
+#define eDI_reg 115
#define al_reg 116
#define cl_reg 117
@@ -225,32 +278,54 @@ static void ckprefix PARAMS ((void));
#define indir_dx_reg 150
-#define GRP1b NULL, NULL, 0
-#define GRP1S NULL, NULL, 1
-#define GRP1Ss NULL, NULL, 2
-#define GRP2b NULL, NULL, 3
-#define GRP2S NULL, NULL, 4
-#define GRP2b_one NULL, NULL, 5
-#define GRP2S_one NULL, NULL, 6
-#define GRP2b_cl NULL, NULL, 7
-#define GRP2S_cl NULL, NULL, 8
-#define GRP3b NULL, NULL, 9
-#define GRP3S NULL, NULL, 10
-#define GRP4 NULL, NULL, 11
-#define GRP5 NULL, NULL, 12
-#define GRP6 NULL, NULL, 13
-#define GRP7 NULL, NULL, 14
-#define GRP8 NULL, NULL, 15
-#define GRP9 NULL, NULL, 16
-#define GRP10 NULL, NULL, 17
-#define GRP11 NULL, NULL, 18
-#define GRP12 NULL, NULL, 19
+#define USE_GROUPS 1
+#define USE_PREFIX_USER_TABLE 2
+
+#define GRP1b NULL, NULL, 0, NULL, USE_GROUPS, NULL, 0
+#define GRP1S NULL, NULL, 1, NULL, USE_GROUPS, NULL, 0
+#define GRP1Ss NULL, NULL, 2, NULL, USE_GROUPS, NULL, 0
+#define GRP2b NULL, NULL, 3, NULL, USE_GROUPS, NULL, 0
+#define GRP2S NULL, NULL, 4, NULL, USE_GROUPS, NULL, 0
+#define GRP2b_one NULL, NULL, 5, NULL, USE_GROUPS, NULL, 0
+#define GRP2S_one NULL, NULL, 6, NULL, USE_GROUPS, NULL, 0
+#define GRP2b_cl NULL, NULL, 7, NULL, USE_GROUPS, NULL, 0
+#define GRP2S_cl NULL, NULL, 8, NULL, USE_GROUPS, NULL, 0
+#define GRP3b NULL, NULL, 9, NULL, USE_GROUPS, NULL, 0
+#define GRP3S NULL, NULL, 10, NULL, USE_GROUPS, NULL, 0
+#define GRP4 NULL, NULL, 11, NULL, USE_GROUPS, NULL, 0
+#define GRP5 NULL, NULL, 12, NULL, USE_GROUPS, NULL, 0
+#define GRP6 NULL, NULL, 13, NULL, USE_GROUPS, NULL, 0
+#define GRP7 NULL, NULL, 14, NULL, USE_GROUPS, NULL, 0
+#define GRP8 NULL, NULL, 15, NULL, USE_GROUPS, NULL, 0
+#define GRP9 NULL, NULL, 16, NULL, USE_GROUPS, NULL, 0
+#define GRP10 NULL, NULL, 17, NULL, USE_GROUPS, NULL, 0
+#define GRP11 NULL, NULL, 18, NULL, USE_GROUPS, NULL, 0
+#define GRP12 NULL, NULL, 19, NULL, USE_GROUPS, NULL, 0
+#define GRP13 NULL, NULL, 20, NULL, USE_GROUPS, NULL, 0
+#define GRP14 NULL, NULL, 21, NULL, USE_GROUPS, NULL, 0
+#define GRPAMD NULL, NULL, 22, NULL, USE_GROUPS, NULL, 0
+
+#define PREGRP0 NULL, NULL, 0, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP1 NULL, NULL, 1, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP2 NULL, NULL, 2, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP3 NULL, NULL, 3, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP4 NULL, NULL, 4, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP5 NULL, NULL, 5, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP6 NULL, NULL, 6, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP7 NULL, NULL, 7, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP8 NULL, NULL, 8, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP9 NULL, NULL, 9, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP10 NULL, NULL, 10, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP11 NULL, NULL, 11, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP12 NULL, NULL, 12, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP13 NULL, NULL, 13, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP14 NULL, NULL, 14, NULL, USE_PREFIX_USER_TABLE, NULL, 0
#define FLOATCODE 50
-#define FLOAT NULL, NULL, FLOATCODE
+#define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
struct dis386 {
- char *name;
+ const char *name;
op_rtn op1;
int bytemode1;
op_rtn op2;
@@ -259,250 +334,264 @@ struct dis386 {
int bytemode3;
};
-static struct dis386 dis386[] = {
+/* Upper case letters in the instruction names here are macros.
+ 'A' => print 'b' if no register operands or suffix_always is true
+ 'B' => print 'b' if suffix_always is true
+ 'E' => print 'e' if 32-bit form of jcxz
+ 'L' => print 'l' if suffix_always is true
+ 'N' => print 'n' if instruction has no wait "prefix"
+ 'P' => print 'w' or 'l' if instruction has an operand size prefix,
+ or suffix_always is true
+ 'Q' => print 'w' or 'l' if no register operands or suffix_always is true
+ 'R' => print 'w' or 'l' ("wd" or "dq" in intel mode)
+ 'S' => print 'w' or 'l' if suffix_always is true
+ 'W' => print 'b' or 'w' ("w" or "de" in intel mode)
+*/
+
+static const struct dis386 dis386_att[] = {
/* 00 */
- { "addb", Eb, Gb },
- { "addS", Ev, Gv },
- { "addb", Gb, Eb },
- { "addS", Gv, Ev },
- { "addb", AL, Ib },
- { "addS", eAX, Iv },
- { "pushS", es },
- { "popS", es },
+ { "addB", Eb, Gb, XX },
+ { "addS", Ev, Gv, XX },
+ { "addB", Gb, Eb, XX },
+ { "addS", Gv, Ev, XX },
+ { "addB", AL, Ib, XX },
+ { "addS", eAX, Iv, XX },
+ { "pushP", es, XX, XX },
+ { "popP", es, XX, XX },
/* 08 */
- { "orb", Eb, Gb },
- { "orS", Ev, Gv },
- { "orb", Gb, Eb },
- { "orS", Gv, Ev },
- { "orb", AL, Ib },
- { "orS", eAX, Iv },
- { "pushS", cs },
- { "(bad)" }, /* 0x0f extended opcode escape */
+ { "orB", Eb, Gb, XX },
+ { "orS", Ev, Gv, XX },
+ { "orB", Gb, Eb, XX },
+ { "orS", Gv, Ev, XX },
+ { "orB", AL, Ib, XX },
+ { "orS", eAX, Iv, XX },
+ { "pushP", cs, XX, XX },
+ { "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
/* 10 */
- { "adcb", Eb, Gb },
- { "adcS", Ev, Gv },
- { "adcb", Gb, Eb },
- { "adcS", Gv, Ev },
- { "adcb", AL, Ib },
- { "adcS", eAX, Iv },
- { "pushS", ss },
- { "popS", ss },
+ { "adcB", Eb, Gb, XX },
+ { "adcS", Ev, Gv, XX },
+ { "adcB", Gb, Eb, XX },
+ { "adcS", Gv, Ev, XX },
+ { "adcB", AL, Ib, XX },
+ { "adcS", eAX, Iv, XX },
+ { "pushP", ss, XX, XX },
+ { "popP", ss, XX, XX },
/* 18 */
- { "sbbb", Eb, Gb },
- { "sbbS", Ev, Gv },
- { "sbbb", Gb, Eb },
- { "sbbS", Gv, Ev },
- { "sbbb", AL, Ib },
- { "sbbS", eAX, Iv },
- { "pushS", ds },
- { "popS", ds },
+ { "sbbB", Eb, Gb, XX },
+ { "sbbS", Ev, Gv, XX },
+ { "sbbB", Gb, Eb, XX },
+ { "sbbS", Gv, Ev, XX },
+ { "sbbB", AL, Ib, XX },
+ { "sbbS", eAX, Iv, XX },
+ { "pushP", ds, XX, XX },
+ { "popP", ds, XX, XX },
/* 20 */
- { "andb", Eb, Gb },
- { "andS", Ev, Gv },
- { "andb", Gb, Eb },
- { "andS", Gv, Ev },
- { "andb", AL, Ib },
- { "andS", eAX, Iv },
- { "(bad)" }, /* SEG ES prefix */
- { "daa" },
+ { "andB", Eb, Gb, XX },
+ { "andS", Ev, Gv, XX },
+ { "andB", Gb, Eb, XX },
+ { "andS", Gv, Ev, XX },
+ { "andB", AL, Ib, XX },
+ { "andS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG ES prefix */
+ { "daa", XX, XX, XX },
/* 28 */
- { "subb", Eb, Gb },
- { "subS", Ev, Gv },
- { "subb", Gb, Eb },
- { "subS", Gv, Ev },
- { "subb", AL, Ib },
- { "subS", eAX, Iv },
- { "(bad)" }, /* SEG CS prefix */
- { "das" },
+ { "subB", Eb, Gb, XX },
+ { "subS", Ev, Gv, XX },
+ { "subB", Gb, Eb, XX },
+ { "subS", Gv, Ev, XX },
+ { "subB", AL, Ib, XX },
+ { "subS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG CS prefix */
+ { "das", XX, XX, XX },
/* 30 */
- { "xorb", Eb, Gb },
- { "xorS", Ev, Gv },
- { "xorb", Gb, Eb },
- { "xorS", Gv, Ev },
- { "xorb", AL, Ib },
- { "xorS", eAX, Iv },
- { "(bad)" }, /* SEG SS prefix */
- { "aaa" },
+ { "xorB", Eb, Gb, XX },
+ { "xorS", Ev, Gv, XX },
+ { "xorB", Gb, Eb, XX },
+ { "xorS", Gv, Ev, XX },
+ { "xorB", AL, Ib, XX },
+ { "xorS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG SS prefix */
+ { "aaa", XX, XX, XX },
/* 38 */
- { "cmpb", Eb, Gb },
- { "cmpS", Ev, Gv },
- { "cmpb", Gb, Eb },
- { "cmpS", Gv, Ev },
- { "cmpb", AL, Ib },
- { "cmpS", eAX, Iv },
- { "(bad)" }, /* SEG DS prefix */
- { "aas" },
+ { "cmpB", Eb, Gb, XX },
+ { "cmpS", Ev, Gv, XX },
+ { "cmpB", Gb, Eb, XX },
+ { "cmpS", Gv, Ev, XX },
+ { "cmpB", AL, Ib, XX },
+ { "cmpS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG DS prefix */
+ { "aas", XX, XX, XX },
/* 40 */
- { "incS", eAX },
- { "incS", eCX },
- { "incS", eDX },
- { "incS", eBX },
- { "incS", eSP },
- { "incS", eBP },
- { "incS", eSI },
- { "incS", eDI },
+ { "incS", eAX, XX, XX },
+ { "incS", eCX, XX, XX },
+ { "incS", eDX, XX, XX },
+ { "incS", eBX, XX, XX },
+ { "incS", eSP, XX, XX },
+ { "incS", eBP, XX, XX },
+ { "incS", eSI, XX, XX },
+ { "incS", eDI, XX, XX },
/* 48 */
- { "decS", eAX },
- { "decS", eCX },
- { "decS", eDX },
- { "decS", eBX },
- { "decS", eSP },
- { "decS", eBP },
- { "decS", eSI },
- { "decS", eDI },
+ { "decS", eAX, XX, XX },
+ { "decS", eCX, XX, XX },
+ { "decS", eDX, XX, XX },
+ { "decS", eBX, XX, XX },
+ { "decS", eSP, XX, XX },
+ { "decS", eBP, XX, XX },
+ { "decS", eSI, XX, XX },
+ { "decS", eDI, XX, XX },
/* 50 */
- { "pushS", eAX },
- { "pushS", eCX },
- { "pushS", eDX },
- { "pushS", eBX },
- { "pushS", eSP },
- { "pushS", eBP },
- { "pushS", eSI },
- { "pushS", eDI },
+ { "pushS", eAX, XX, XX },
+ { "pushS", eCX, XX, XX },
+ { "pushS", eDX, XX, XX },
+ { "pushS", eBX, XX, XX },
+ { "pushS", eSP, XX, XX },
+ { "pushS", eBP, XX, XX },
+ { "pushS", eSI, XX, XX },
+ { "pushS", eDI, XX, XX },
/* 58 */
- { "popS", eAX },
- { "popS", eCX },
- { "popS", eDX },
- { "popS", eBX },
- { "popS", eSP },
- { "popS", eBP },
- { "popS", eSI },
- { "popS", eDI },
+ { "popS", eAX, XX, XX },
+ { "popS", eCX, XX, XX },
+ { "popS", eDX, XX, XX },
+ { "popS", eBX, XX, XX },
+ { "popS", eSP, XX, XX },
+ { "popS", eBP, XX, XX },
+ { "popS", eSI, XX, XX },
+ { "popS", eDI, XX, XX },
/* 60 */
- { "pusha" },
- { "popa" },
- { "boundS", Gv, Ma },
- { "arpl", Ew, Gw },
- { "(bad)" }, /* seg fs */
- { "(bad)" }, /* seg gs */
- { "(bad)" }, /* op size prefix */
- { "(bad)" }, /* adr size prefix */
+ { "pushaP", XX, XX, XX },
+ { "popaP", XX, XX, XX },
+ { "boundS", Gv, Ma, XX },
+ { "arpl", Ew, Gw, XX },
+ { "(bad)", XX, XX, XX }, /* seg fs */
+ { "(bad)", XX, XX, XX }, /* seg gs */
+ { "(bad)", XX, XX, XX }, /* op size prefix */
+ { "(bad)", XX, XX, XX }, /* adr size prefix */
/* 68 */
- { "pushS", Iv }, /* 386 book wrong */
+ { "pushP", Iv, XX, XX }, /* 386 book wrong */
{ "imulS", Gv, Ev, Iv },
- { "pushS", sIb }, /* push of byte really pushes 2 or 4 bytes */
- { "imulS", Gv, Ev, Ib },
- { "insb", Yb, indirDX },
- { "insS", Yv, indirDX },
- { "outsb", indirDX, Xb },
- { "outsS", indirDX, Xv },
+ { "pushP", sIb, XX, XX }, /* push of byte really pushes 2 or 4 bytes */
+ { "imulS", Gv, Ev, sIb },
+ { "insb", Yb, indirDX, XX },
+ { "insR", Yv, indirDX, XX },
+ { "outsb", indirDX, Xb, XX },
+ { "outsR", indirDX, Xv, XX },
/* 70 */
- { "jo", Jb },
- { "jno", Jb },
- { "jb", Jb },
- { "jae", Jb },
- { "je", Jb },
- { "jne", Jb },
- { "jbe", Jb },
- { "ja", Jb },
+ { "jo", Jb, XX, XX },
+ { "jno", Jb, XX, XX },
+ { "jb", Jb, XX, XX },
+ { "jae", Jb, XX, XX },
+ { "je", Jb, XX, XX },
+ { "jne", Jb, XX, XX },
+ { "jbe", Jb, XX, XX },
+ { "ja", Jb, XX, XX },
/* 78 */
- { "js", Jb },
- { "jns", Jb },
- { "jp", Jb },
- { "jnp", Jb },
- { "jl", Jb },
- { "jnl", Jb },
- { "jle", Jb },
- { "jg", Jb },
+ { "js", Jb, XX, XX },
+ { "jns", Jb, XX, XX },
+ { "jp", Jb, XX, XX },
+ { "jnp", Jb, XX, XX },
+ { "jl", Jb, XX, XX },
+ { "jge", Jb, XX, XX },
+ { "jle", Jb, XX, XX },
+ { "jg", Jb, XX, XX },
/* 80 */
{ GRP1b },
{ GRP1S },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
{ GRP1Ss },
- { "testb", Eb, Gb },
- { "testS", Ev, Gv },
- { "xchgb", Eb, Gb },
- { "xchgS", Ev, Gv },
+ { "testB", Eb, Gb, XX },
+ { "testS", Ev, Gv, XX },
+ { "xchgB", Eb, Gb, XX },
+ { "xchgS", Ev, Gv, XX },
/* 88 */
- { "movb", Eb, Gb },
- { "movS", Ev, Gv },
- { "movb", Gb, Eb },
- { "movS", Gv, Ev },
- { "movS", Ev, Sw },
- { "leaS", Gv, M },
- { "movS", Sw, Ev },
- { "popS", Ev },
+ { "movB", Eb, Gb, XX },
+ { "movS", Ev, Gv, XX },
+ { "movB", Gb, Eb, XX },
+ { "movS", Gv, Ev, XX },
+ { "movQ", Ev, Sw, XX },
+ { "leaS", Gv, M, XX },
+ { "movQ", Sw, Ev, XX },
+ { "popQ", Ev, XX, XX },
/* 90 */
- { "nop" },
- { "xchgS", eCX, eAX },
- { "xchgS", eDX, eAX },
- { "xchgS", eBX, eAX },
- { "xchgS", eSP, eAX },
- { "xchgS", eBP, eAX },
- { "xchgS", eSI, eAX },
- { "xchgS", eDI, eAX },
+ { "nop", XX, XX, XX },
+ { "xchgS", eCX, eAX, XX },
+ { "xchgS", eDX, eAX, XX },
+ { "xchgS", eBX, eAX, XX },
+ { "xchgS", eSP, eAX, XX },
+ { "xchgS", eBP, eAX, XX },
+ { "xchgS", eSI, eAX, XX },
+ { "xchgS", eDI, eAX, XX },
/* 98 */
- { "cWtS" },
- { "cStd" },
- { "lcall", Ap },
- { "(bad)" }, /* fwait */
- { "pushf" },
- { "popf" },
- { "sahf" },
- { "lahf" },
+ { "cWtR", XX, XX, XX },
+ { "cRtd", XX, XX, XX },
+ { "lcallP", Ap, XX, XX },
+ { "(bad)", XX, XX, XX }, /* fwait */
+ { "pushfP", XX, XX, XX },
+ { "popfP", XX, XX, XX },
+ { "sahf", XX, XX, XX },
+ { "lahf", XX, XX, XX },
/* a0 */
- { "movb", AL, Ob },
- { "movS", eAX, Ov },
- { "movb", Ob, AL },
- { "movS", Ov, eAX },
- { "movsb", Yb, Xb },
- { "movsS", Yv, Xv },
- { "cmpsb", Yb, Xb },
- { "cmpsS", Yv, Xv },
+ { "movB", AL, Ob, XX },
+ { "movS", eAX, Ov, XX },
+ { "movB", Ob, AL, XX },
+ { "movS", Ov, eAX, XX },
+ { "movsb", Yb, Xb, XX },
+ { "movsR", Yv, Xv, XX },
+ { "cmpsb", Xb, Yb, XX },
+ { "cmpsR", Xv, Yv, XX },
/* a8 */
- { "testb", AL, Ib },
- { "testS", eAX, Iv },
- { "stosb", Yb, AL },
- { "stosS", Yv, eAX },
- { "lodsb", AL, Xb },
- { "lodsS", eAX, Xv },
- { "scasb", AL, Yb },
- { "scasS", eAX, Yv },
+ { "testB", AL, Ib, XX },
+ { "testS", eAX, Iv, XX },
+ { "stosB", Yb, AL, XX },
+ { "stosS", Yv, eAX, XX },
+ { "lodsB", AL, Xb, XX },
+ { "lodsS", eAX, Xv, XX },
+ { "scasB", AL, Yb, XX },
+ { "scasS", eAX, Yv, XX },
/* b0 */
- { "movb", AL, Ib },
- { "movb", CL, Ib },
- { "movb", DL, Ib },
- { "movb", BL, Ib },
- { "movb", AH, Ib },
- { "movb", CH, Ib },
- { "movb", DH, Ib },
- { "movb", BH, Ib },
+ { "movB", AL, Ib, XX },
+ { "movB", CL, Ib, XX },
+ { "movB", DL, Ib, XX },
+ { "movB", BL, Ib, XX },
+ { "movB", AH, Ib, XX },
+ { "movB", CH, Ib, XX },
+ { "movB", DH, Ib, XX },
+ { "movB", BH, Ib, XX },
/* b8 */
- { "movS", eAX, Iv },
- { "movS", eCX, Iv },
- { "movS", eDX, Iv },
- { "movS", eBX, Iv },
- { "movS", eSP, Iv },
- { "movS", eBP, Iv },
- { "movS", eSI, Iv },
- { "movS", eDI, Iv },
+ { "movS", eAX, Iv, XX },
+ { "movS", eCX, Iv, XX },
+ { "movS", eDX, Iv, XX },
+ { "movS", eBX, Iv, XX },
+ { "movS", eSP, Iv, XX },
+ { "movS", eBP, Iv, XX },
+ { "movS", eSI, Iv, XX },
+ { "movS", eDI, Iv, XX },
/* c0 */
{ GRP2b },
{ GRP2S },
- { "ret", Iw },
- { "ret" },
- { "lesS", Gv, Mp },
- { "ldsS", Gv, Mp },
- { "movb", Eb, Ib },
- { "movS", Ev, Iv },
+ { "retP", Iw, XX, XX },
+ { "retP", XX, XX, XX },
+ { "lesS", Gv, Mp, XX },
+ { "ldsS", Gv, Mp, XX },
+ { "movA", Eb, Ib, XX },
+ { "movQ", Ev, Iv, XX },
/* c8 */
- { "enter", Iw, Ib },
- { "leave" },
- { "lret", Iw },
- { "lret" },
- { "int3" },
- { "int", Ib },
- { "into" },
- { "iret" },
+ { "enterP", Iw, Ib, XX },
+ { "leaveP", XX, XX, XX },
+ { "lretP", Iw, XX, XX },
+ { "lretP", XX, XX, XX },
+ { "int3", XX, XX, XX },
+ { "int", Ib, XX, XX },
+ { "into", XX, XX, XX},
+ { "iretP", XX, XX, XX },
/* d0 */
{ GRP2b_one },
{ GRP2S_one },
{ GRP2b_cl },
{ GRP2S_cl },
- { "aam", Ib },
- { "aad", Ib },
- { "(bad)" },
- { "xlat" },
+ { "aam", sIb, XX, XX },
+ { "aad", sIb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "xlat", DSBX, XX, XX },
/* d8 */
{ FLOAT },
{ FLOAT },
@@ -513,576 +602,1357 @@ static struct dis386 dis386[] = {
{ FLOAT },
{ FLOAT },
/* e0 */
- { "loopne", Jb },
- { "loope", Jb },
- { "loop", Jb },
- { "jCcxz", Jb },
- { "inb", AL, Ib },
- { "inS", eAX, Ib },
- { "outb", Ib, AL },
- { "outS", Ib, eAX },
+ { "loopne", Jb, XX, XX },
+ { "loope", Jb, XX, XX },
+ { "loop", Jb, XX, XX },
+ { "jEcxz", Jb, XX, XX },
+ { "inB", AL, Ib, XX },
+ { "inS", eAX, Ib, XX },
+ { "outB", Ib, AL, XX },
+ { "outS", Ib, eAX, XX },
/* e8 */
- { "call", Av },
- { "jmp", Jv },
- { "ljmp", Ap },
- { "jmp", Jb },
- { "inb", AL, indirDX },
- { "inS", eAX, indirDX },
- { "outb", indirDX, AL },
- { "outS", indirDX, eAX },
+ { "callP", Jv, XX, XX },
+ { "jmpP", Jv, XX, XX },
+ { "ljmpP", Ap, XX, XX },
+ { "jmp", Jb, XX, XX },
+ { "inB", AL, indirDX, XX },
+ { "inS", eAX, indirDX, XX },
+ { "outB", indirDX, AL, XX },
+ { "outS", indirDX, eAX, XX },
/* f0 */
- { "(bad)" }, /* lock prefix */
- { "(bad)" },
- { "(bad)" }, /* repne */
- { "(bad)" }, /* repz */
- { "hlt" },
- { "cmc" },
+ { "(bad)", XX, XX, XX }, /* lock prefix */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* repne */
+ { "(bad)", XX, XX, XX }, /* repz */
+ { "hlt", XX, XX, XX },
+ { "cmc", XX, XX, XX },
{ GRP3b },
{ GRP3S },
/* f8 */
- { "clc" },
- { "stc" },
- { "cli" },
- { "sti" },
- { "cld" },
- { "std" },
+ { "clc", XX, XX, XX },
+ { "stc", XX, XX, XX },
+ { "cli", XX, XX, XX },
+ { "sti", XX, XX, XX },
+ { "cld", XX, XX, XX },
+ { "std", XX, XX, XX },
{ GRP4 },
{ GRP5 },
};
-static struct dis386 dis386_twobyte[] = {
+static const struct dis386 dis386_intel[] = {
+ /* 00 */
+ { "add", Eb, Gb, XX },
+ { "add", Ev, Gv, XX },
+ { "add", Gb, Eb, XX },
+ { "add", Gv, Ev, XX },
+ { "add", AL, Ib, XX },
+ { "add", eAX, Iv, XX },
+ { "push", es, XX, XX },
+ { "pop", es, XX, XX },
+ /* 08 */
+ { "or", Eb, Gb, XX },
+ { "or", Ev, Gv, XX },
+ { "or", Gb, Eb, XX },
+ { "or", Gv, Ev, XX },
+ { "or", AL, Ib, XX },
+ { "or", eAX, Iv, XX },
+ { "push", cs, XX, XX },
+ { "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
+ /* 10 */
+ { "adc", Eb, Gb, XX },
+ { "adc", Ev, Gv, XX },
+ { "adc", Gb, Eb, XX },
+ { "adc", Gv, Ev, XX },
+ { "adc", AL, Ib, XX },
+ { "adc", eAX, Iv, XX },
+ { "push", ss, XX, XX },
+ { "pop", ss, XX, XX },
+ /* 18 */
+ { "sbb", Eb, Gb, XX },
+ { "sbb", Ev, Gv, XX },
+ { "sbb", Gb, Eb, XX },
+ { "sbb", Gv, Ev, XX },
+ { "sbb", AL, Ib, XX },
+ { "sbb", eAX, Iv, XX },
+ { "push", ds, XX, XX },
+ { "pop", ds, XX, XX },
+ /* 20 */
+ { "and", Eb, Gb, XX },
+ { "and", Ev, Gv, XX },
+ { "and", Gb, Eb, XX },
+ { "and", Gv, Ev, XX },
+ { "and", AL, Ib, XX },
+ { "and", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG ES prefix */
+ { "daa", XX, XX, XX },
+ /* 28 */
+ { "sub", Eb, Gb, XX },
+ { "sub", Ev, Gv, XX },
+ { "sub", Gb, Eb, XX },
+ { "sub", Gv, Ev, XX },
+ { "sub", AL, Ib, XX },
+ { "sub", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG CS prefix */
+ { "das", XX, XX, XX },
+ /* 30 */
+ { "xor", Eb, Gb, XX },
+ { "xor", Ev, Gv, XX },
+ { "xor", Gb, Eb, XX },
+ { "xor", Gv, Ev, XX },
+ { "xor", AL, Ib, XX },
+ { "xor", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG SS prefix */
+ { "aaa", XX, XX, XX },
+ /* 38 */
+ { "cmp", Eb, Gb, XX },
+ { "cmp", Ev, Gv, XX },
+ { "cmp", Gb, Eb, XX },
+ { "cmp", Gv, Ev, XX },
+ { "cmp", AL, Ib, XX },
+ { "cmp", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG DS prefix */
+ { "aas", XX, XX, XX },
+ /* 40 */
+ { "inc", eAX, XX, XX },
+ { "inc", eCX, XX, XX },
+ { "inc", eDX, XX, XX },
+ { "inc", eBX, XX, XX },
+ { "inc", eSP, XX, XX },
+ { "inc", eBP, XX, XX },
+ { "inc", eSI, XX, XX },
+ { "inc", eDI, XX, XX },
+ /* 48 */
+ { "dec", eAX, XX, XX },
+ { "dec", eCX, XX, XX },
+ { "dec", eDX, XX, XX },
+ { "dec", eBX, XX, XX },
+ { "dec", eSP, XX, XX },
+ { "dec", eBP, XX, XX },
+ { "dec", eSI, XX, XX },
+ { "dec", eDI, XX, XX },
+ /* 50 */
+ { "push", eAX, XX, XX },
+ { "push", eCX, XX, XX },
+ { "push", eDX, XX, XX },
+ { "push", eBX, XX, XX },
+ { "push", eSP, XX, XX },
+ { "push", eBP, XX, XX },
+ { "push", eSI, XX, XX },
+ { "push", eDI, XX, XX },
+ /* 58 */
+ { "pop", eAX, XX, XX },
+ { "pop", eCX, XX, XX },
+ { "pop", eDX, XX, XX },
+ { "pop", eBX, XX, XX },
+ { "pop", eSP, XX, XX },
+ { "pop", eBP, XX, XX },
+ { "pop", eSI, XX, XX },
+ { "pop", eDI, XX, XX },
+ /* 60 */
+ { "pusha", XX, XX, XX },
+ { "popa", XX, XX, XX },
+ { "bound", Gv, Ma, XX },
+ { "arpl", Ew, Gw, XX },
+ { "(bad)", XX, XX, XX }, /* seg fs */
+ { "(bad)", XX, XX, XX }, /* seg gs */
+ { "(bad)", XX, XX, XX }, /* op size prefix */
+ { "(bad)", XX, XX, XX }, /* adr size prefix */
+ /* 68 */
+ { "push", Iv, XX, XX }, /* 386 book wrong */
+ { "imul", Gv, Ev, Iv },
+ { "push", sIb, XX, XX }, /* push of byte really pushes 2 or 4 bytes */
+ { "imul", Gv, Ev, sIb },
+ { "ins", Yb, indirDX, XX },
+ { "ins", Yv, indirDX, XX },
+ { "outs", indirDX, Xb, XX },
+ { "outs", indirDX, Xv, XX },
+ /* 70 */
+ { "jo", Jb, XX, XX },
+ { "jno", Jb, XX, XX },
+ { "jb", Jb, XX, XX },
+ { "jae", Jb, XX, XX },
+ { "je", Jb, XX, XX },
+ { "jne", Jb, XX, XX },
+ { "jbe", Jb, XX, XX },
+ { "ja", Jb, XX, XX },
+ /* 78 */
+ { "js", Jb, XX, XX },
+ { "jns", Jb, XX, XX },
+ { "jp", Jb, XX, XX },
+ { "jnp", Jb, XX, XX },
+ { "jl", Jb, XX, XX },
+ { "jge", Jb, XX, XX },
+ { "jle", Jb, XX, XX },
+ { "jg", Jb, XX, XX },
+ /* 80 */
+ { GRP1b },
+ { GRP1S },
+ { "(bad)", XX, XX, XX },
+ { GRP1Ss },
+ { "test", Eb, Gb, XX },
+ { "test", Ev, Gv, XX },
+ { "xchg", Eb, Gb, XX },
+ { "xchg", Ev, Gv, XX },
+ /* 88 */
+ { "mov", Eb, Gb, XX },
+ { "mov", Ev, Gv, XX },
+ { "mov", Gb, Eb, XX },
+ { "mov", Gv, Ev, XX },
+ { "mov", Ev, Sw, XX },
+ { "lea", Gv, M, XX },
+ { "mov", Sw, Ev, XX },
+ { "pop", Ev, XX, XX },
+ /* 90 */
+ { "nop", XX, XX, XX },
+ { "xchg", eCX, eAX, XX },
+ { "xchg", eDX, eAX, XX },
+ { "xchg", eBX, eAX, XX },
+ { "xchg", eSP, eAX, XX },
+ { "xchg", eBP, eAX, XX },
+ { "xchg", eSI, eAX, XX },
+ { "xchg", eDI, eAX, XX },
+ /* 98 */
+ { "cW", XX, XX, XX }, /* cwde and cbw */
+ { "cR", XX, XX, XX }, /* cdq and cwd */
+ { "lcall", Ap, XX, XX },
+ { "(bad)", XX, XX, XX }, /* fwait */
+ { "pushf", XX, XX, XX },
+ { "popf", XX, XX, XX },
+ { "sahf", XX, XX, XX },
+ { "lahf", XX, XX, XX },
+ /* a0 */
+ { "mov", AL, Ob, XX },
+ { "mov", eAX, Ov, XX },
+ { "mov", Ob, AL, XX },
+ { "mov", Ov, eAX, XX },
+ { "movs", Yb, Xb, XX },
+ { "movs", Yv, Xv, XX },
+ { "cmps", Xb, Yb, XX },
+ { "cmps", Xv, Yv, XX },
+ /* a8 */
+ { "test", AL, Ib, XX },
+ { "test", eAX, Iv, XX },
+ { "stos", Yb, AL, XX },
+ { "stos", Yv, eAX, XX },
+ { "lods", AL, Xb, XX },
+ { "lods", eAX, Xv, XX },
+ { "scas", AL, Yb, XX },
+ { "scas", eAX, Yv, XX },
+ /* b0 */
+ { "mov", AL, Ib, XX },
+ { "mov", CL, Ib, XX },
+ { "mov", DL, Ib, XX },
+ { "mov", BL, Ib, XX },
+ { "mov", AH, Ib, XX },
+ { "mov", CH, Ib, XX },
+ { "mov", DH, Ib, XX },
+ { "mov", BH, Ib, XX },
+ /* b8 */
+ { "mov", eAX, Iv, XX },
+ { "mov", eCX, Iv, XX },
+ { "mov", eDX, Iv, XX },
+ { "mov", eBX, Iv, XX },
+ { "mov", eSP, Iv, XX },
+ { "mov", eBP, Iv, XX },
+ { "mov", eSI, Iv, XX },
+ { "mov", eDI, Iv, XX },
+ /* c0 */
+ { GRP2b },
+ { GRP2S },
+ { "ret", Iw, XX, XX },
+ { "ret", XX, XX, XX },
+ { "les", Gv, Mp, XX },
+ { "lds", Gv, Mp, XX },
+ { "mov", Eb, Ib, XX },
+ { "mov", Ev, Iv, XX },
+ /* c8 */
+ { "enter", Iw, Ib, XX },
+ { "leave", XX, XX, XX },
+ { "lret", Iw, XX, XX },
+ { "lret", XX, XX, XX },
+ { "int3", XX, XX, XX },
+ { "int", Ib, XX, XX },
+ { "into", XX, XX, XX },
+ { "iret", XX, XX, XX },
+ /* d0 */
+ { GRP2b_one },
+ { GRP2S_one },
+ { GRP2b_cl },
+ { GRP2S_cl },
+ { "aam", sIb, XX, XX },
+ { "aad", sIb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "xlat", DSBX, XX, XX },
+ /* d8 */
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ /* e0 */
+ { "loopne", Jb, XX, XX },
+ { "loope", Jb, XX, XX },
+ { "loop", Jb, XX, XX },
+ { "jEcxz", Jb, XX, XX },
+ { "in", AL, Ib, XX },
+ { "in", eAX, Ib, XX },
+ { "out", Ib, AL, XX },
+ { "out", Ib, eAX, XX },
+ /* e8 */
+ { "call", Jv, XX, XX },
+ { "jmp", Jv, XX, XX },
+ { "ljmp", Ap, XX, XX },
+ { "jmp", Jb, XX, XX },
+ { "in", AL, indirDX, XX },
+ { "in", eAX, indirDX, XX },
+ { "out", indirDX, AL, XX },
+ { "out", indirDX, eAX, XX },
+ /* f0 */
+ { "(bad)", XX, XX, XX }, /* lock prefix */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* repne */
+ { "(bad)", XX, XX, XX }, /* repz */
+ { "hlt", XX, XX, XX },
+ { "cmc", XX, XX, XX },
+ { GRP3b },
+ { GRP3S },
+ /* f8 */
+ { "clc", XX, XX, XX },
+ { "stc", XX, XX, XX },
+ { "cli", XX, XX, XX },
+ { "sti", XX, XX, XX },
+ { "cld", XX, XX, XX },
+ { "std", XX, XX, XX },
+ { GRP4 },
+ { GRP5 },
+};
+
+static const struct dis386 dis386_twobyte_att[] = {
/* 00 */
{ GRP6 },
{ GRP7 },
- { "larS", Gv, Ew },
- { "lslS", Gv, Ew },
- { "(bad)" },
- { "(bad)" },
- { "clts" },
- { "(bad)" },
+ { "larS", Gv, Ew, XX },
+ { "lslS", Gv, Ew, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "clts", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
/* 08 */
- { "invd" },
- { "wbinvd" },
- { "(bad)" }, { "ud2a" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "invd", XX, XX, XX },
+ { "wbinvd", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "ud2a", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { GRPAMD },
+ { "femms", XX, XX, XX },
+ { "", MX, EM, OPSUF }, /* See OP_3DNowSuffix */
/* 10 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { PREGRP8 },
+ { PREGRP9 },
+ { "movlps", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { "movlps", EX, XM, SIMD_Fixup, 'h' },
+ { "unpcklps", XM, EX, XX },
+ { "unpckhps", XM, EX, XX },
+ { "movhps", XM, EX, SIMD_Fixup, 'l' },
+ { "movhps", EX, XM, SIMD_Fixup, 'l' },
/* 18 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { GRP14 },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
/* 20 */
/* these are all backward in appendix A of the intel book */
- { "movl", Rd, Cd },
- { "movl", Rd, Dd },
- { "movl", Cd, Rd },
- { "movl", Dd, Rd },
- { "movl", Rd, Td },
- { "(bad)" },
- { "movl", Td, Rd },
- { "(bad)" },
+ { "movL", Rd, Cd, XX },
+ { "movL", Rd, Dd, XX },
+ { "movL", Cd, Rd, XX },
+ { "movL", Dd, Rd, XX },
+ { "movL", Rd, Td, XX },
+ { "(bad)", XX, XX, XX },
+ { "movL", Td, Rd, XX },
+ { "(bad)", XX, XX, XX },
/* 28 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "movaps", XM, EX, XX },
+ { "movaps", EX, XM, XX },
+ { PREGRP2 },
+ { "movntps", Ev, XM, XX },
+ { PREGRP4 },
+ { PREGRP3 },
+ { "ucomiss", XM, EX, XX },
+ { "comiss", XM, EX, XX },
/* 30 */
- { "wrmsr" }, { "rdtsc" }, { "rdmsr" }, { "rdpmc" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "wrmsr", XX, XX, XX },
+ { "rdtsc", XX, XX, XX },
+ { "rdmsr", XX, XX, XX },
+ { "rdpmc", XX, XX, XX },
+ { "sysenter", XX, XX, XX },
+ { "sysexit", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
/* 38 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
/* 40 */
- { "cmovo", Gv,Ev }, { "cmovno", Gv,Ev }, { "cmovb", Gv,Ev }, { "cmovae", Gv,Ev },
- { "cmove", Gv,Ev }, { "cmovne", Gv,Ev }, { "cmovbe", Gv,Ev }, { "cmova", Gv,Ev },
+ { "cmovo", Gv, Ev, XX },
+ { "cmovno", Gv, Ev, XX },
+ { "cmovb", Gv, Ev, XX },
+ { "cmovae", Gv, Ev, XX },
+ { "cmove", Gv, Ev, XX },
+ { "cmovne", Gv, Ev, XX },
+ { "cmovbe", Gv, Ev, XX },
+ { "cmova", Gv, Ev, XX },
/* 48 */
- { "cmovs", Gv,Ev }, { "cmovns", Gv,Ev }, { "cmovp", Gv,Ev }, { "cmovnp", Gv,Ev },
- { "cmovl", Gv,Ev }, { "cmovge", Gv,Ev }, { "cmovle", Gv,Ev }, { "cmovg", Gv,Ev },
+ { "cmovs", Gv, Ev, XX },
+ { "cmovns", Gv, Ev, XX },
+ { "cmovp", Gv, Ev, XX },
+ { "cmovnp", Gv, Ev, XX },
+ { "cmovl", Gv, Ev, XX },
+ { "cmovge", Gv, Ev, XX },
+ { "cmovle", Gv, Ev, XX },
+ { "cmovg", Gv, Ev, XX },
/* 50 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { "movmskps", Gv, EX, XX },
+ { PREGRP13 },
+ { PREGRP12 },
+ { PREGRP11 },
+ { "andps", XM, EX, XX },
+ { "andnps", XM, EX, XX },
+ { "orps", XM, EX, XX },
+ { "xorps", XM, EX, XX },
/* 58 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
+ { PREGRP0 },
+ { PREGRP10 },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { PREGRP14 },
+ { PREGRP7 },
+ { PREGRP5 },
+ { PREGRP6 },
/* 60 */
- { "punpcklbw", MX, EM },
- { "punpcklwd", MX, EM },
- { "punpckldq", MX, EM },
- { "packsswb", MX, EM },
- { "pcmpgtb", MX, EM },
- { "pcmpgtw", MX, EM },
- { "pcmpgtd", MX, EM },
- { "packuswb", MX, EM },
+ { "punpcklbw", MX, EM, XX },
+ { "punpcklwd", MX, EM, XX },
+ { "punpckldq", MX, EM, XX },
+ { "packsswb", MX, EM, XX },
+ { "pcmpgtb", MX, EM, XX },
+ { "pcmpgtw", MX, EM, XX },
+ { "pcmpgtd", MX, EM, XX },
+ { "packuswb", MX, EM, XX },
/* 68 */
- { "punpckhbw", MX, EM },
- { "punpckhwd", MX, EM },
- { "punpckhdq", MX, EM },
- { "packssdw", MX, EM },
- { "(bad)" }, { "(bad)" },
- { "movd", MX, Ev },
- { "movq", MX, EM },
+ { "punpckhbw", MX, EM, XX },
+ { "punpckhwd", MX, EM, XX },
+ { "punpckhdq", MX, EM, XX },
+ { "packssdw", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "movd", MX, Ed, XX },
+ { "movq", MX, EM, XX },
/* 70 */
- { "(bad)" },
+ { "pshufw", MX, EM, Ib },
{ GRP10 },
{ GRP11 },
{ GRP12 },
- { "pcmpeqb", MX, EM },
- { "pcmpeqw", MX, EM },
- { "pcmpeqd", MX, EM },
- { "emms" },
+ { "pcmpeqb", MX, EM, XX },
+ { "pcmpeqw", MX, EM, XX },
+ { "pcmpeqd", MX, EM, XX },
+ { "emms", XX, XX, XX },
/* 78 */
- { "(bad)" }, { "(bad)" }, { "(bad)" }, { "(bad)" },
- { "(bad)" }, { "(bad)" },
- { "movd", Ev, MX },
- { "movq", EM, MX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "movd", Ed, MX, XX },
+ { "movq", EM, MX, XX },
/* 80 */
- { "jo", Jv },
- { "jno", Jv },
- { "jb", Jv },
- { "jae", Jv },
- { "je", Jv },
- { "jne", Jv },
- { "jbe", Jv },
- { "ja", Jv },
+ { "jo", Jv, XX, XX },
+ { "jno", Jv, XX, XX },
+ { "jb", Jv, XX, XX },
+ { "jae", Jv, XX, XX },
+ { "je", Jv, XX, XX },
+ { "jne", Jv, XX, XX },
+ { "jbe", Jv, XX, XX },
+ { "ja", Jv, XX, XX },
/* 88 */
- { "js", Jv },
- { "jns", Jv },
- { "jp", Jv },
- { "jnp", Jv },
- { "jl", Jv },
- { "jge", Jv },
- { "jle", Jv },
- { "jg", Jv },
+ { "js", Jv, XX, XX },
+ { "jns", Jv, XX, XX },
+ { "jp", Jv, XX, XX },
+ { "jnp", Jv, XX, XX },
+ { "jl", Jv, XX, XX },
+ { "jge", Jv, XX, XX },
+ { "jle", Jv, XX, XX },
+ { "jg", Jv, XX, XX },
/* 90 */
- { "seto", Eb },
- { "setno", Eb },
- { "setb", Eb },
- { "setae", Eb },
- { "sete", Eb },
- { "setne", Eb },
- { "setbe", Eb },
- { "seta", Eb },
+ { "seto", Eb, XX, XX },
+ { "setno", Eb, XX, XX },
+ { "setb", Eb, XX, XX },
+ { "setae", Eb, XX, XX },
+ { "sete", Eb, XX, XX },
+ { "setne", Eb, XX, XX },
+ { "setbe", Eb, XX, XX },
+ { "seta", Eb, XX, XX },
/* 98 */
- { "sets", Eb },
- { "setns", Eb },
- { "setp", Eb },
- { "setnp", Eb },
- { "setl", Eb },
- { "setge", Eb },
- { "setle", Eb },
- { "setg", Eb },
+ { "sets", Eb, XX, XX },
+ { "setns", Eb, XX, XX },
+ { "setp", Eb, XX, XX },
+ { "setnp", Eb, XX, XX },
+ { "setl", Eb, XX, XX },
+ { "setge", Eb, XX, XX },
+ { "setle", Eb, XX, XX },
+ { "setg", Eb, XX, XX },
/* a0 */
- { "pushS", fs },
- { "popS", fs },
- { "cpuid" },
- { "btS", Ev, Gv },
+ { "pushP", fs, XX, XX },
+ { "popP", fs, XX, XX },
+ { "cpuid", XX, XX, XX },
+ { "btS", Ev, Gv, XX },
{ "shldS", Ev, Gv, Ib },
{ "shldS", Ev, Gv, CL },
- { "(bad)" },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
/* a8 */
- { "pushS", gs },
- { "popS", gs },
- { "rsm" },
- { "btsS", Ev, Gv },
+ { "pushP", gs, XX, XX },
+ { "popP", gs, XX, XX },
+ { "rsm", XX, XX, XX },
+ { "btsS", Ev, Gv, XX },
{ "shrdS", Ev, Gv, Ib },
{ "shrdS", Ev, Gv, CL },
- { "(bad)" },
- { "imulS", Gv, Ev },
+ { GRP13 },
+ { "imulS", Gv, Ev, XX },
/* b0 */
- { "cmpxchgb", Eb, Gb },
- { "cmpxchgS", Ev, Gv },
- { "lssS", Gv, Mp }, /* 386 lists only Mp */
- { "btrS", Ev, Gv },
- { "lfsS", Gv, Mp }, /* 386 lists only Mp */
- { "lgsS", Gv, Mp }, /* 386 lists only Mp */
- { "movzbS", Gv, Eb },
- { "movzwS", Gv, Ew },
+ { "cmpxchgB", Eb, Gb, XX },
+ { "cmpxchgS", Ev, Gv, XX },
+ { "lssS", Gv, Mp, XX },
+ { "btrS", Ev, Gv, XX },
+ { "lfsS", Gv, Mp, XX },
+ { "lgsS", Gv, Mp, XX },
+ { "movzbR", Gv, Eb, XX },
+ { "movzwR", Gv, Ew, XX }, /* yes, there really is movzww ! */
/* b8 */
- { "ud2b" },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "ud2b", XX, XX, XX },
{ GRP8 },
- { "btcS", Ev, Gv },
- { "bsfS", Gv, Ev },
- { "bsrS", Gv, Ev },
- { "movsbS", Gv, Eb },
- { "movswS", Gv, Ew },
+ { "btcS", Ev, Gv, XX },
+ { "bsfS", Gv, Ev, XX },
+ { "bsrS", Gv, Ev, XX },
+ { "movsbR", Gv, Eb, XX },
+ { "movswR", Gv, Ew, XX }, /* yes, there really is movsww ! */
/* c0 */
- { "xaddb", Eb, Gb },
- { "xaddS", Ev, Gv },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { GRP9 },
+ { "xaddB", Eb, Gb, XX },
+ { "xaddS", Ev, Gv, XX },
+ { PREGRP1 },
+ { "(bad)", XX, XX, XX },
+ { "pinsrw", MX, Ev, Ib },
+ { "pextrw", Ev, MX, Ib },
+ { "shufps", XM, EX, Ib },
+ { GRP9 },
/* c8 */
- { "bswap", eAX },
- { "bswap", eCX },
- { "bswap", eDX },
- { "bswap", eBX },
- { "bswap", eSP },
- { "bswap", eBP },
- { "bswap", eSI },
- { "bswap", eDI },
+ { "bswap", eAX, XX, XX }, /* bswap doesn't support 16 bit regs */
+ { "bswap", eCX, XX, XX },
+ { "bswap", eDX, XX, XX },
+ { "bswap", eBX, XX, XX },
+ { "bswap", eSP, XX, XX },
+ { "bswap", eBP, XX, XX },
+ { "bswap", eSI, XX, XX },
+ { "bswap", eDI, XX, XX },
/* d0 */
- { "(bad)" },
- { "psrlw", MX, EM },
- { "psrld", MX, EM },
- { "psrlq", MX, EM },
- { "(bad)" },
- { "pmullw", MX, EM },
- { "(bad)" }, { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "psrlw", MX, EM, XX },
+ { "psrld", MX, EM, XX },
+ { "psrlq", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "pmullw", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "pmovmskb", Ev, MX, XX },
/* d8 */
- { "psubusb", MX, EM },
- { "psubusw", MX, EM },
- { "(bad)" },
- { "pand", MX, EM },
- { "paddusb", MX, EM },
- { "paddusw", MX, EM },
- { "(bad)" },
- { "pandn", MX, EM },
+ { "psubusb", MX, EM, XX },
+ { "psubusw", MX, EM, XX },
+ { "pminub", MX, EM, XX },
+ { "pand", MX, EM, XX },
+ { "paddusb", MX, EM, XX },
+ { "paddusw", MX, EM, XX },
+ { "pmaxub", MX, EM, XX },
+ { "pandn", MX, EM, XX },
/* e0 */
- { "(bad)" },
- { "psraw", MX, EM },
- { "psrad", MX, EM },
- { "(bad)" },
- { "(bad)" },
- { "pmulhw", MX, EM },
- { "(bad)" }, { "(bad)" },
+ { "pavgb", MX, EM, XX },
+ { "psraw", MX, EM, XX },
+ { "psrad", MX, EM, XX },
+ { "pavgw", MX, EM, XX },
+ { "pmulhuw", MX, EM, XX },
+ { "pmulhw", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "movntq", Ev, MX, XX },
/* e8 */
- { "psubsb", MX, EM },
- { "psubsw", MX, EM },
- { "(bad)" },
- { "por", MX, EM },
- { "paddsb", MX, EM },
- { "paddsw", MX, EM },
- { "(bad)" },
- { "pxor", MX, EM },
+ { "psubsb", MX, EM, XX },
+ { "psubsw", MX, EM, XX },
+ { "pminsw", MX, EM, XX },
+ { "por", MX, EM, XX },
+ { "paddsb", MX, EM, XX },
+ { "paddsw", MX, EM, XX },
+ { "pmaxsw", MX, EM, XX },
+ { "pxor", MX, EM, XX },
/* f0 */
- { "(bad)" },
- { "psllw", MX, EM },
- { "pslld", MX, EM },
- { "psllq", MX, EM },
- { "(bad)" },
- { "pmaddwd", MX, EM },
- { "(bad)" }, { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "psllw", MX, EM, XX },
+ { "pslld", MX, EM, XX },
+ { "psllq", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "pmaddwd", MX, EM, XX },
+ { "psadbw", MX, EM, XX },
+ { "maskmovq", MX, EM, XX },
/* f8 */
- { "psubb", MX, EM },
- { "psubw", MX, EM },
- { "psubd", MX, EM },
- { "(bad)" },
- { "paddb", MX, EM },
- { "paddw", MX, EM },
- { "paddd", MX, EM },
- { "(bad)" }
+ { "psubb", MX, EM, XX },
+ { "psubw", MX, EM, XX },
+ { "psubd", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "paddb", MX, EM, XX },
+ { "paddw", MX, EM, XX },
+ { "paddd", MX, EM, XX },
+ { "(bad)", XX, XX, XX }
+};
+
+static const struct dis386 dis386_twobyte_intel[] = {
+ /* 00 */
+ { GRP6 },
+ { GRP7 },
+ { "lar", Gv, Ew, XX },
+ { "lsl", Gv, Ew, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "clts", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 08 */
+ { "invd", XX, XX, XX },
+ { "wbinvd", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "ud2a", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { GRPAMD },
+ { "femms" , XX, XX, XX},
+ { "", MX, EM, OPSUF }, /* See OP_3DNowSuffix */
+ /* 10 */
+ { PREGRP8 },
+ { PREGRP9 },
+ { "movlps", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { "movlps", EX, XM, SIMD_Fixup, 'h' },
+ { "unpcklps", XM, EX, XX },
+ { "unpckhps", XM, EX, XX },
+ { "movhps", XM, EX, SIMD_Fixup, 'l' },
+ { "movhps", EX, XM, SIMD_Fixup, 'l' },
+ /* 18 */
+ { GRP14 },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 20 */
+ /* these are all backward in appendix A of the intel book */
+ { "mov", Rd, Cd, XX },
+ { "mov", Rd, Dd, XX },
+ { "mov", Cd, Rd, XX },
+ { "mov", Dd, Rd, XX },
+ { "mov", Rd, Td, XX },
+ { "(bad)", XX, XX, XX },
+ { "mov", Td, Rd, XX },
+ { "(bad)", XX, XX, XX },
+ /* 28 */
+ { "movaps", XM, EX, XX },
+ { "movaps", EX, XM, XX },
+ { PREGRP2 },
+ { "movntps", Ev, XM, XX },
+ { PREGRP4 },
+ { PREGRP3 },
+ { "ucomiss", XM, EX, XX },
+ { "comiss", XM, EX, XX },
+ /* 30 */
+ { "wrmsr", XX, XX, XX },
+ { "rdtsc", XX, XX, XX },
+ { "rdmsr", XX, XX, XX },
+ { "rdpmc", XX, XX, XX },
+ { "sysenter", XX, XX, XX },
+ { "sysexit", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 38 */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 40 */
+ { "cmovo", Gv, Ev, XX },
+ { "cmovno", Gv, Ev, XX },
+ { "cmovb", Gv, Ev, XX },
+ { "cmovae", Gv, Ev, XX },
+ { "cmove", Gv, Ev, XX },
+ { "cmovne", Gv, Ev, XX },
+ { "cmovbe", Gv, Ev, XX },
+ { "cmova", Gv, Ev, XX },
+ /* 48 */
+ { "cmovs", Gv, Ev, XX },
+ { "cmovns", Gv, Ev, XX },
+ { "cmovp", Gv, Ev, XX },
+ { "cmovnp", Gv, Ev, XX },
+ { "cmovl", Gv, Ev, XX },
+ { "cmovge", Gv, Ev, XX },
+ { "cmovle", Gv, Ev, XX },
+ { "cmovg", Gv, Ev, XX },
+ /* 50 */
+ { "movmskps", Gv, EX, XX },
+ { PREGRP13 },
+ { PREGRP12 },
+ { PREGRP11 },
+ { "andps", XM, EX, XX },
+ { "andnps", XM, EX, XX },
+ { "orps", XM, EX, XX },
+ { "xorps", XM, EX, XX },
+ /* 58 */
+ { PREGRP0 },
+ { PREGRP10 },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { PREGRP14 },
+ { PREGRP7 },
+ { PREGRP5 },
+ { PREGRP6 },
+ /* 60 */
+ { "punpcklbw", MX, EM, XX },
+ { "punpcklwd", MX, EM, XX },
+ { "punpckldq", MX, EM, XX },
+ { "packsswb", MX, EM, XX },
+ { "pcmpgtb", MX, EM, XX },
+ { "pcmpgtw", MX, EM, XX },
+ { "pcmpgtd", MX, EM, XX },
+ { "packuswb", MX, EM, XX },
+ /* 68 */
+ { "punpckhbw", MX, EM, XX },
+ { "punpckhwd", MX, EM, XX },
+ { "punpckhdq", MX, EM, XX },
+ { "packssdw", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "movd", MX, Ed, XX },
+ { "movq", MX, EM, XX },
+ /* 70 */
+ { "pshufw", MX, EM, Ib },
+ { GRP10 },
+ { GRP11 },
+ { GRP12 },
+ { "pcmpeqb", MX, EM, XX },
+ { "pcmpeqw", MX, EM, XX },
+ { "pcmpeqd", MX, EM, XX },
+ { "emms", XX, XX, XX },
+ /* 78 */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "movd", Ed, MX, XX },
+ { "movq", EM, MX, XX },
+ /* 80 */
+ { "jo", Jv, XX, XX },
+ { "jno", Jv, XX, XX },
+ { "jb", Jv, XX, XX },
+ { "jae", Jv, XX, XX },
+ { "je", Jv, XX, XX },
+ { "jne", Jv, XX, XX },
+ { "jbe", Jv, XX, XX },
+ { "ja", Jv, XX, XX },
+ /* 88 */
+ { "js", Jv, XX, XX },
+ { "jns", Jv, XX, XX },
+ { "jp", Jv, XX, XX },
+ { "jnp", Jv, XX, XX },
+ { "jl", Jv, XX, XX },
+ { "jge", Jv, XX, XX },
+ { "jle", Jv, XX, XX },
+ { "jg", Jv, XX, XX },
+ /* 90 */
+ { "seto", Eb, XX, XX },
+ { "setno", Eb, XX, XX },
+ { "setb", Eb, XX, XX },
+ { "setae", Eb, XX, XX },
+ { "sete", Eb, XX, XX },
+ { "setne", Eb, XX, XX },
+ { "setbe", Eb, XX, XX },
+ { "seta", Eb, XX, XX },
+ /* 98 */
+ { "sets", Eb, XX, XX },
+ { "setns", Eb, XX, XX },
+ { "setp", Eb, XX, XX },
+ { "setnp", Eb, XX, XX },
+ { "setl", Eb, XX, XX },
+ { "setge", Eb, XX, XX },
+ { "setle", Eb, XX, XX },
+ { "setg", Eb, XX, XX },
+ /* a0 */
+ { "push", fs, XX, XX },
+ { "pop", fs, XX, XX },
+ { "cpuid", XX, XX, XX },
+ { "bt", Ev, Gv, XX },
+ { "shld", Ev, Gv, Ib },
+ { "shld", Ev, Gv, CL },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* a8 */
+ { "push", gs, XX, XX },
+ { "pop", gs, XX, XX },
+ { "rsm" , XX, XX, XX},
+ { "bts", Ev, Gv, XX },
+ { "shrd", Ev, Gv, Ib },
+ { "shrd", Ev, Gv, CL },
+ { GRP13 },
+ { "imul", Gv, Ev, XX },
+ /* b0 */
+ { "cmpxchg", Eb, Gb, XX },
+ { "cmpxchg", Ev, Gv, XX },
+ { "lss", Gv, Mp, XX },
+ { "btr", Ev, Gv, XX },
+ { "lfs", Gv, Mp, XX },
+ { "lgs", Gv, Mp, XX },
+ { "movzx", Gv, Eb, XX },
+ { "movzx", Gv, Ew, XX },
+ /* b8 */
+ { "(bad)", XX, XX, XX },
+ { "ud2b", XX, XX, XX },
+ { GRP8 },
+ { "btc", Ev, Gv, XX },
+ { "bsf", Gv, Ev, XX },
+ { "bsr", Gv, Ev, XX },
+ { "movsx", Gv, Eb, XX },
+ { "movsx", Gv, Ew, XX },
+ /* c0 */
+ { "xadd", Eb, Gb, XX },
+ { "xadd", Ev, Gv, XX },
+ { PREGRP1 },
+ { "(bad)", XX, XX, XX },
+ { "pinsrw", MX, Ev, Ib },
+ { "pextrw", Ev, MX, Ib },
+ { "shufps", XM, EX, Ib },
+ { GRP9 },
+ /* c8 */
+ { "bswap", eAX, XX, XX }, /* bswap doesn't support 16 bit regs */
+ { "bswap", eCX, XX, XX },
+ { "bswap", eDX, XX, XX },
+ { "bswap", eBX, XX, XX },
+ { "bswap", eSP, XX, XX },
+ { "bswap", eBP, XX, XX },
+ { "bswap", eSI, XX, XX },
+ { "bswap", eDI, XX, XX },
+ /* d0 */
+ { "(bad)", XX, XX, XX },
+ { "psrlw", MX, EM, XX },
+ { "psrld", MX, EM, XX },
+ { "psrlq", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "pmullw", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "pmovmskb", Ev, MX, XX },
+ /* d8 */
+ { "psubusb", MX, EM, XX },
+ { "psubusw", MX, EM, XX },
+ { "pminub", MX, EM, XX },
+ { "pand", MX, EM, XX },
+ { "paddusb", MX, EM, XX },
+ { "paddusw", MX, EM, XX },
+ { "pmaxub", MX, EM, XX },
+ { "pandn", MX, EM, XX },
+ /* e0 */
+ { "pavgb", MX, EM, XX },
+ { "psraw", MX, EM, XX },
+ { "psrad", MX, EM, XX },
+ { "pavgw", MX, EM, XX },
+ { "pmulhuw", MX, EM, XX },
+ { "pmulhw", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "movntq", Ev, MX, XX },
+ /* e8 */
+ { "psubsb", MX, EM, XX },
+ { "psubsw", MX, EM, XX },
+ { "pminsw", MX, EM, XX },
+ { "por", MX, EM, XX },
+ { "paddsb", MX, EM, XX },
+ { "paddsw", MX, EM, XX },
+ { "pmaxsw", MX, EM, XX },
+ { "pxor", MX, EM, XX },
+ /* f0 */
+ { "(bad)", XX, XX, XX },
+ { "psllw", MX, EM, XX },
+ { "pslld", MX, EM, XX },
+ { "psllq", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "pmaddwd", MX, EM, XX },
+ { "psadbw", MX, EM, XX },
+ { "maskmovq", MX, EM, XX },
+ /* f8 */
+ { "psubb", MX, EM, XX },
+ { "psubw", MX, EM, XX },
+ { "psubd", MX, EM, XX },
+ { "(bad)", XX, XX, XX },
+ { "paddb", MX, EM, XX },
+ { "paddw", MX, EM, XX },
+ { "paddd", MX, EM, XX },
+ { "(bad)", XX, XX, XX }
};
static const unsigned char onebyte_has_modrm[256] = {
- 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,
- 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,
- 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,
- 1,1,1,1,0,0,0,0,1,1,1,1,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,1,1,0,0,0,0,0,1,0,1,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 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,
- 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,
- 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
+ /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
+ /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
+ /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
+ /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
+ /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
+ /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
+ /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
+ /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
static const unsigned char twobyte_has_modrm[256] = {
- /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* 2f */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
+ /* 10 */ 1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 2f */
/* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
/* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 50 */ 1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1, /* 5f */
/* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1, /* 6f */
- /* 70 */ 0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1, /* 7f */
+ /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
/* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
/* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */
/* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,1,1,1,0,1,0,0,1,1,0,1,1,1,0,1, /* df */
- /* e0 */ 0,1,1,0,0,1,0,0,1,1,0,1,1,1,0,1, /* ef */
- /* f0 */ 0,1,1,1,0,1,0,0,1,1,1,0,1,1,1,0 /* ff */
+ /* d0 */ 0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1, /* df */
+ /* e0 */ 1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1, /* ef */
+ /* f0 */ 0,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0 /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+static const unsigned char twobyte_uses_f3_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,1,1,1,0,0,0,0,1,1,0,0,1,1,1,1, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
static char obuf[100];
static char *obufp;
static char scratchbuf[100];
static unsigned char *start_codep;
+static unsigned char *insn_codep;
static unsigned char *codep;
static disassemble_info *the_info;
static int mod;
static int rm;
static int reg;
-static void oappend PARAMS ((char *s));
+static void oappend PARAMS ((const char *s));
-static char *names32[]={
+static const char *names32[]={
"%eax","%ecx","%edx","%ebx", "%esp","%ebp","%esi","%edi",
};
-static char *names16[] = {
+static const char *names16[] = {
"%ax","%cx","%dx","%bx","%sp","%bp","%si","%di",
};
-static char *names8[] = {
+static const char *names8[] = {
"%al","%cl","%dl","%bl","%ah","%ch","%dh","%bh",
};
-static char *names_seg[] = {
+static const char *names_seg[] = {
"%es","%cs","%ss","%ds","%fs","%gs","%?","%?",
};
-static char *index16[] = {
- "bx+si","bx+di","bp+si","bp+di","si","di","bp","bx"
+static const char *index16[] = {
+ "%bx,%si","%bx,%di","%bp,%si","%bp,%di","%si","%di","%bp","%bx"
};
-static struct dis386 grps[][8] = {
+static const struct dis386 grps[][8] = {
/* GRP1b */
{
- { "addb", Eb, Ib },
- { "orb", Eb, Ib },
- { "adcb", Eb, Ib },
- { "sbbb", Eb, Ib },
- { "andb", Eb, Ib },
- { "subb", Eb, Ib },
- { "xorb", Eb, Ib },
- { "cmpb", Eb, Ib }
+ { "addA", Eb, Ib, XX },
+ { "orA", Eb, Ib, XX },
+ { "adcA", Eb, Ib, XX },
+ { "sbbA", Eb, Ib, XX },
+ { "andA", Eb, Ib, XX },
+ { "subA", Eb, Ib, XX },
+ { "xorA", Eb, Ib, XX },
+ { "cmpA", Eb, Ib, XX }
},
/* GRP1S */
{
- { "addS", Ev, Iv },
- { "orS", Ev, Iv },
- { "adcS", Ev, Iv },
- { "sbbS", Ev, Iv },
- { "andS", Ev, Iv },
- { "subS", Ev, Iv },
- { "xorS", Ev, Iv },
- { "cmpS", Ev, Iv }
+ { "addQ", Ev, Iv, XX },
+ { "orQ", Ev, Iv, XX },
+ { "adcQ", Ev, Iv, XX },
+ { "sbbQ", Ev, Iv, XX },
+ { "andQ", Ev, Iv, XX },
+ { "subQ", Ev, Iv, XX },
+ { "xorQ", Ev, Iv, XX },
+ { "cmpQ", Ev, Iv, XX }
},
/* GRP1Ss */
{
- { "addS", Ev, sIb },
- { "orS", Ev, sIb },
- { "adcS", Ev, sIb },
- { "sbbS", Ev, sIb },
- { "andS", Ev, sIb },
- { "subS", Ev, sIb },
- { "xorS", Ev, sIb },
- { "cmpS", Ev, sIb }
+ { "addQ", Ev, sIb, XX },
+ { "orQ", Ev, sIb, XX },
+ { "adcQ", Ev, sIb, XX },
+ { "sbbQ", Ev, sIb, XX },
+ { "andQ", Ev, sIb, XX },
+ { "subQ", Ev, sIb, XX },
+ { "xorQ", Ev, sIb, XX },
+ { "cmpQ", Ev, sIb, XX }
},
/* GRP2b */
{
- { "rolb", Eb, Ib },
- { "rorb", Eb, Ib },
- { "rclb", Eb, Ib },
- { "rcrb", Eb, Ib },
- { "shlb", Eb, Ib },
- { "shrb", Eb, Ib },
- { "(bad)" },
- { "sarb", Eb, Ib },
+ { "rolA", Eb, Ib, XX },
+ { "rorA", Eb, Ib, XX },
+ { "rclA", Eb, Ib, XX },
+ { "rcrA", Eb, Ib, XX },
+ { "shlA", Eb, Ib, XX },
+ { "shrA", Eb, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarA", Eb, Ib, XX },
},
/* GRP2S */
{
- { "rolS", Ev, Ib },
- { "rorS", Ev, Ib },
- { "rclS", Ev, Ib },
- { "rcrS", Ev, Ib },
- { "shlS", Ev, Ib },
- { "shrS", Ev, Ib },
- { "(bad)" },
- { "sarS", Ev, Ib },
+ { "rolQ", Ev, Ib, XX },
+ { "rorQ", Ev, Ib, XX },
+ { "rclQ", Ev, Ib, XX },
+ { "rcrQ", Ev, Ib, XX },
+ { "shlQ", Ev, Ib, XX },
+ { "shrQ", Ev, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarQ", Ev, Ib, XX },
},
/* GRP2b_one */
{
- { "rolb", Eb },
- { "rorb", Eb },
- { "rclb", Eb },
- { "rcrb", Eb },
- { "shlb", Eb },
- { "shrb", Eb },
- { "(bad)" },
- { "sarb", Eb },
+ { "rolA", Eb, XX, XX },
+ { "rorA", Eb, XX, XX },
+ { "rclA", Eb, XX, XX },
+ { "rcrA", Eb, XX, XX },
+ { "shlA", Eb, XX, XX },
+ { "shrA", Eb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarA", Eb, XX, XX },
},
/* GRP2S_one */
{
- { "rolS", Ev },
- { "rorS", Ev },
- { "rclS", Ev },
- { "rcrS", Ev },
- { "shlS", Ev },
- { "shrS", Ev },
- { "(bad)" },
- { "sarS", Ev },
+ { "rolQ", Ev, XX, XX },
+ { "rorQ", Ev, XX, XX },
+ { "rclQ", Ev, XX, XX },
+ { "rcrQ", Ev, XX, XX },
+ { "shlQ", Ev, XX, XX },
+ { "shrQ", Ev, XX, XX },
+ { "(bad)", XX, XX, XX},
+ { "sarQ", Ev, XX, XX },
},
/* GRP2b_cl */
{
- { "rolb", Eb, CL },
- { "rorb", Eb, CL },
- { "rclb", Eb, CL },
- { "rcrb", Eb, CL },
- { "shlb", Eb, CL },
- { "shrb", Eb, CL },
- { "(bad)" },
- { "sarb", Eb, CL },
+ { "rolA", Eb, CL, XX },
+ { "rorA", Eb, CL, XX },
+ { "rclA", Eb, CL, XX },
+ { "rcrA", Eb, CL, XX },
+ { "shlA", Eb, CL, XX },
+ { "shrA", Eb, CL, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarA", Eb, CL, XX },
},
/* GRP2S_cl */
{
- { "rolS", Ev, CL },
- { "rorS", Ev, CL },
- { "rclS", Ev, CL },
- { "rcrS", Ev, CL },
- { "shlS", Ev, CL },
- { "shrS", Ev, CL },
- { "(bad)" },
- { "sarS", Ev, CL }
+ { "rolQ", Ev, CL, XX },
+ { "rorQ", Ev, CL, XX },
+ { "rclQ", Ev, CL, XX },
+ { "rcrQ", Ev, CL, XX },
+ { "shlQ", Ev, CL, XX },
+ { "shrQ", Ev, CL, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarQ", Ev, CL, XX }
},
/* GRP3b */
{
- { "testb", Eb, Ib },
- { "(bad)", Eb },
- { "notb", Eb },
- { "negb", Eb },
- { "mulb", AL, Eb },
- { "imulb", AL, Eb },
- { "divb", AL, Eb },
- { "idivb", AL, Eb }
+ { "testA", Eb, Ib, XX },
+ { "(bad)", Eb, XX, XX },
+ { "notA", Eb, XX, XX },
+ { "negA", Eb, XX, XX },
+ { "mulB", AL, Eb, XX },
+ { "imulB", AL, Eb, XX },
+ { "divB", AL, Eb, XX },
+ { "idivB", AL, Eb, XX }
},
/* GRP3S */
{
- { "testS", Ev, Iv },
- { "(bad)" },
- { "notS", Ev },
- { "negS", Ev },
- { "mulS", eAX, Ev },
- { "imulS", eAX, Ev },
- { "divS", eAX, Ev },
- { "idivS", eAX, Ev },
+ { "testQ", Ev, Iv, XX },
+ { "(bad)", XX, XX, XX },
+ { "notQ", Ev, XX, XX },
+ { "negQ", Ev, XX, XX },
+ { "mulS", eAX, Ev, XX },
+ { "imulS", eAX, Ev, XX },
+ { "divS", eAX, Ev, XX },
+ { "idivS", eAX, Ev, XX },
},
/* GRP4 */
{
- { "incb", Eb },
- { "decb", Eb },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
+ { "incA", Eb, XX, XX },
+ { "decA", Eb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
},
/* GRP5 */
{
- { "incS", Ev },
- { "decS", Ev },
- { "call", indirEv },
- { "lcall", indirEv },
- { "jmp", indirEv },
- { "ljmp", indirEv },
- { "pushS", Ev },
- { "(bad)" },
+ { "incQ", Ev, XX, XX },
+ { "decQ", Ev, XX, XX },
+ { "callP", indirEv, XX, XX },
+ { "lcallP", indirEv, XX, XX },
+ { "jmpP", indirEv, XX, XX },
+ { "ljmpP", indirEv, XX, XX },
+ { "pushQ", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
},
/* GRP6 */
{
- { "sldt", Ew },
- { "str", Ew },
- { "lldt", Ew },
- { "ltr", Ew },
- { "verr", Ew },
- { "verw", Ew },
- { "(bad)" },
- { "(bad)" }
+ { "sldt", Ew, XX, XX },
+ { "str", Ew, XX, XX },
+ { "lldt", Ew, XX, XX },
+ { "ltr", Ew, XX, XX },
+ { "verr", Ew, XX, XX },
+ { "verw", Ew, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }
},
/* GRP7 */
{
- { "sgdt", Ew },
- { "sidt", Ew },
- { "lgdt", Ew },
- { "lidt", Ew },
- { "smsw", Ew },
- { "(bad)" },
- { "lmsw", Ew },
- { "invlpg", Ew },
+ { "sgdt", Ew, XX, XX },
+ { "sidt", Ew, XX, XX },
+ { "lgdt", Ew, XX, XX },
+ { "lidt", Ew, XX, XX },
+ { "smsw", Ew, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "lmsw", Ew, XX, XX },
+ { "invlpg", Ew, XX, XX },
},
/* GRP8 */
{
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "btS", Ev, Ib },
- { "btsS", Ev, Ib },
- { "btrS", Ev, Ib },
- { "btcS", Ev, Ib },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "btQ", Ev, Ib, XX },
+ { "btsQ", Ev, Ib, XX },
+ { "btrQ", Ev, Ib, XX },
+ { "btcQ", Ev, Ib, XX },
},
/* GRP9 */
{
- { "(bad)" },
- { "cmpxchg8b", Ev },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "cmpxchg8b", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
},
/* GRP10 */
{
- { "(bad)" },
- { "(bad)" },
- { "psrlw", MS, Ib },
- { "(bad)" },
- { "psraw", MS, Ib },
- { "(bad)" },
- { "psllw", MS, Ib },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrlw", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "psraw", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "psllw", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
},
/* GRP11 */
{
- { "(bad)" },
- { "(bad)" },
- { "psrld", MS, Ib },
- { "(bad)" },
- { "psrad", MS, Ib },
- { "(bad)" },
- { "pslld", MS, Ib },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrld", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrad", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "pslld", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
},
/* GRP12 */
{
- { "(bad)" },
- { "(bad)" },
- { "psrlq", MS, Ib },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "psllq", MS, Ib },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrlq", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psllq", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRP13 */
+ {
+ { "fxsave", Ev, XX, XX },
+ { "fxrstor", Ev, XX, XX },
+ { "ldmxcsr", Ev, XX, XX },
+ { "stmxcsr", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "sfence", None, XX, XX },
+ },
+ /* GRP14 */
+ {
+ { "prefetchnta", Ev, XX, XX },
+ { "prefetcht0", Ev, XX, XX },
+ { "prefetcht1", Ev, XX, XX },
+ { "prefetcht2", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRPAMD */
+ {
+ { "prefetch", Eb, XX, XX },
+ { "prefetchw", Eb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
}
+
};
-#define PREFIX_REPZ 1
-#define PREFIX_REPNZ 2
-#define PREFIX_LOCK 4
-#define PREFIX_CS 8
-#define PREFIX_SS 0x10
-#define PREFIX_DS 0x20
-#define PREFIX_ES 0x40
-#define PREFIX_FS 0x80
-#define PREFIX_GS 0x100
-#define PREFIX_DATA 0x200
-#define PREFIX_ADR 0x400
-#define PREFIX_FWAIT 0x800
+static const struct dis386 prefix_user_table[][2] = {
+ /* PREGRP0 */
+ {
+ { "addps", XM, EX, XX },
+ { "addss", XM, EX, XX },
+ },
+ /* PREGRP1 */
+ {
+ { "", XM, EX, OPSIMD }, /* See OP_SIMD_SUFFIX */
+ { "", XM, EX, OPSIMD },
+ },
+ /* PREGRP2 */
+ {
+ { "cvtpi2ps", XM, EM, XX },
+ { "cvtsi2ss", XM, Ev, XX },
+ },
+ /* PREGRP3 */
+ {
+ { "cvtps2pi", MX, EX, XX },
+ { "cvtss2si", Gv, EX, XX },
+ },
+ /* PREGRP4 */
+ {
+ { "cvttps2pi", MX, EX, XX },
+ { "cvttss2si", Gv, EX, XX },
+ },
+ /* PREGRP5 */
+ {
+ { "divps", XM, EX, XX },
+ { "divss", XM, EX, XX },
+ },
+ /* PREGRP6 */
+ {
+ { "maxps", XM, EX, XX },
+ { "maxss", XM, EX, XX },
+ },
+ /* PREGRP7 */
+ {
+ { "minps", XM, EX, XX },
+ { "minss", XM, EX, XX },
+ },
+ /* PREGRP8 */
+ {
+ { "movups", XM, EX, XX },
+ { "movss", XM, EX, XX },
+ },
+ /* PREGRP9 */
+ {
+ { "movups", EX, XM, XX },
+ { "movss", EX, XM, XX },
+ },
+ /* PREGRP10 */
+ {
+ { "mulps", XM, EX, XX },
+ { "mulss", XM, EX, XX },
+ },
+ /* PREGRP11 */
+ {
+ { "rcpps", XM, EX, XX },
+ { "rcpss", XM, EX, XX },
+ },
+ /* PREGRP12 */
+ {
+ { "rsqrtps", XM, EX, XX },
+ { "rsqrtss", XM, EX, XX },
+ },
+ /* PREGRP13 */
+ {
+ { "sqrtps", XM, EX, XX },
+ { "sqrtss", XM, EX, XX },
+ },
+ /* PREGRP14 */
+ {
+ { "subps", XM, EX, XX },
+ { "subss", XM, EX, XX },
+ }
+};
-static int prefixes;
+#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
static void
ckprefix ()
{
prefixes = 0;
+ used_prefixes = 0;
while (1)
{
FETCH_DATA (the_info, codep + 1);
@@ -1119,10 +1989,19 @@ ckprefix ()
prefixes |= PREFIX_DATA;
break;
case 0x67:
- prefixes |= PREFIX_ADR;
+ prefixes |= PREFIX_ADDR;
break;
- case 0x9b:
- prefixes |= PREFIX_FWAIT;
+ case FWAIT_OPCODE:
+ /* fwait is really an instruction. If there are prefixes
+ before the fwait, they belong to the fwait, *not* to the
+ following instruction. */
+ if (prefixes)
+ {
+ prefixes |= PREFIX_FWAIT;
+ codep++;
+ return;
+ }
+ prefixes = PREFIX_FWAIT;
break;
default:
return;
@@ -1131,9 +2010,49 @@ ckprefix ()
}
}
+/* Return the name of the prefix byte PREF, or NULL if PREF is not a
+ prefix byte. */
+
+static const char *
+prefix_name (pref, sizeflag)
+ int pref;
+ int sizeflag;
+{
+ switch (pref)
+ {
+ case 0xf3:
+ return "repz";
+ case 0xf2:
+ return "repnz";
+ case 0xf0:
+ return "lock";
+ case 0x2e:
+ return "cs";
+ case 0x36:
+ return "ss";
+ case 0x3e:
+ return "ds";
+ case 0x26:
+ return "es";
+ case 0x64:
+ return "fs";
+ case 0x65:
+ return "gs";
+ case 0x66:
+ return (sizeflag & DFLAG) ? "data16" : "data32";
+ case 0x67:
+ return (sizeflag & AFLAG) ? "addr16" : "addr32";
+ case FWAIT_OPCODE:
+ return "fwait";
+ default:
+ return NULL;
+ }
+}
+
static char op1out[100], op2out[100], op3out[100];
-static int op_address[3], op_ad, op_index[3];
-static int start_pc;
+static int op_ad, op_index[3];
+static unsigned int op_address[3];
+static unsigned int start_pc;
/*
@@ -1145,48 +2064,77 @@ static int start_pc;
* The function returns the length of this instruction in bytes.
*/
-int print_insn_x86 PARAMS ((bfd_vma pc, disassemble_info *info, int aflag,
- int dflag));
+static int print_insn_i386
+ PARAMS ((bfd_vma pc, disassemble_info *info));
+
+static char intel_syntax;
+static char open_char;
+static char close_char;
+static char separator_char;
+static char scale_char;
+
int
-print_insn_i386 (pc, info)
+print_insn_i386_att (pc, info)
bfd_vma pc;
disassemble_info *info;
{
- if (info->mach == bfd_mach_i386_i386)
- return print_insn_x86 (pc, info, 1, 1);
- else if (info->mach == bfd_mach_i386_i8086)
- return print_insn_x86 (pc, info, 0, 0);
- else
- abort ();
+ intel_syntax = 0;
+ open_char = '(';
+ close_char = ')';
+ separator_char = ',';
+ scale_char = ',';
+
+ return print_insn_i386 (pc, info);
}
int
-print_insn_x86 (pc, info, aflag, dflag)
+print_insn_i386_intel (pc, info)
bfd_vma pc;
disassemble_info *info;
- int aflag;
- int dflag;
{
- struct dis386 *dp;
+ intel_syntax = 1;
+ open_char = '[';
+ close_char = ']';
+ separator_char = '+';
+ scale_char = '*';
+
+ return print_insn_i386 (pc, info);
+}
+
+static int
+print_insn_i386 (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ const struct dis386 *dp;
int i;
- int enter_instruction;
+ int two_source_ops;
char *first, *second, *third;
int needcomma;
unsigned char need_modrm;
+ unsigned char uses_f3_prefix;
+ VOLATILE int sizeflag;
+ VOLATILE int orig_sizeflag;
struct dis_private priv;
bfd_byte *inbuf = priv.the_buffer;
- /* The output looks better if we put 5 bytes on a line, since that
- puts long word instructions on a single line. */
- info->bytes_per_line = 5;
+ if (info->mach == bfd_mach_i386_i386
+ || info->mach == bfd_mach_i386_i386_intel_syntax)
+ sizeflag = AFLAG|DFLAG;
+ else if (info->mach == bfd_mach_i386_i8086)
+ sizeflag = 0;
+ else
+ abort ();
+ orig_sizeflag = sizeflag;
+
+ /* The output looks better if we put 7 bytes on a line, since that
+ puts most long word instructions on a single line. */
+ info->bytes_per_line = 7;
info->private_data = (PTR) &priv;
priv.max_fetched = priv.the_buffer;
priv.insn_start = pc;
- if (setjmp (priv.bailout) != 0)
- /* Error return. */
- return -1;
obuf[0] = 0;
op1out[0] = 0;
@@ -1199,57 +2147,105 @@ print_insn_x86 (pc, info, aflag, dflag)
start_pc = pc;
start_codep = inbuf;
codep = inbuf;
-
+
+ if (setjmp (priv.bailout) != 0)
+ {
+ const char *name;
+
+ /* Getting here means we tried for data but didn't get it. That
+ means we have an incomplete instruction of some sort. Just
+ print the first byte as a prefix or a .byte pseudo-op. */
+ if (codep > inbuf)
+ {
+ name = prefix_name (inbuf[0], orig_sizeflag);
+ if (name != NULL)
+ (*info->fprintf_func) (info->stream, "%s", name);
+ else
+ {
+ /* Just print the first byte as a .byte instruction. */
+ (*info->fprintf_func) (info->stream, ".byte 0x%x",
+ (unsigned int) inbuf[0]);
+ }
+
+ return 1;
+ }
+
+ return -1;
+ }
+
ckprefix ();
+ insn_codep = codep;
+
FETCH_DATA (info, codep + 1);
- if (*codep == 0xc8)
- enter_instruction = 1;
- else
- enter_instruction = 0;
-
+ two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
+
obufp = obuf;
-
- if (prefixes & PREFIX_REPZ)
- oappend ("repz ");
- if (prefixes & PREFIX_REPNZ)
- oappend ("repnz ");
- if (prefixes & PREFIX_LOCK)
- oappend ("lock ");
-
+
if ((prefixes & PREFIX_FWAIT)
&& ((*codep < 0xd8) || (*codep > 0xdf)))
{
- /* fwait not followed by floating point instruction */
- (*info->fprintf_func) (info->stream, "fwait");
- return (1);
+ const char *name;
+
+ /* fwait not followed by floating point instruction. Print the
+ first prefix, which is probably fwait itself. */
+ name = prefix_name (inbuf[0], orig_sizeflag);
+ if (name == NULL)
+ name = INTERNAL_DISASSEMBLER_ERROR;
+ (*info->fprintf_func) (info->stream, "%s", name);
+ return 1;
}
-
- if (prefixes & PREFIX_DATA)
- dflag ^= 1;
-
- if (prefixes & PREFIX_ADR)
- {
- aflag ^= 1;
- if (aflag)
- oappend ("addr32 ");
- else
- oappend ("addr16 ");
- }
-
+
if (*codep == 0x0f)
{
FETCH_DATA (info, codep + 2);
- dp = &dis386_twobyte[*++codep];
+ if (intel_syntax)
+ dp = &dis386_twobyte_intel[*++codep];
+ else
+ dp = &dis386_twobyte_att[*++codep];
need_modrm = twobyte_has_modrm[*codep];
+ uses_f3_prefix = twobyte_uses_f3_prefix[*codep];
}
else
{
- dp = &dis386[*codep];
+ if (intel_syntax)
+ dp = &dis386_intel[*codep];
+ else
+ dp = &dis386_att[*codep];
need_modrm = onebyte_has_modrm[*codep];
+ uses_f3_prefix = 0;
}
codep++;
+ if (!uses_f3_prefix && (prefixes & PREFIX_REPZ))
+ {
+ oappend ("repz ");
+ used_prefixes |= PREFIX_REPZ;
+ }
+ if (prefixes & PREFIX_REPNZ)
+ {
+ oappend ("repnz ");
+ used_prefixes |= PREFIX_REPNZ;
+ }
+ if (prefixes & PREFIX_LOCK)
+ {
+ oappend ("lock ");
+ used_prefixes |= PREFIX_LOCK;
+ }
+
+ if (prefixes & PREFIX_DATA)
+ sizeflag ^= DFLAG;
+
+ if (prefixes & PREFIX_ADDR)
+ {
+ sizeflag ^= AFLAG;
+ if (sizeflag & AFLAG)
+ oappend ("addr32 ");
+ else
+ oappend ("addr16 ");
+ used_prefixes |= PREFIX_ADDR;
+ }
+
if (need_modrm)
{
FETCH_DATA (info, codep + 1);
@@ -1260,42 +2256,69 @@ print_insn_x86 (pc, info, aflag, dflag)
if (dp->name == NULL && dp->bytemode1 == FLOATCODE)
{
- dofloat (aflag, dflag);
+ dofloat (sizeflag);
}
else
{
if (dp->name == NULL)
- dp = &grps[dp->bytemode1][reg];
-
- putop (dp->name, aflag, dflag);
-
+ {
+ switch(dp->bytemode2)
+ {
+ case USE_GROUPS:
+ dp = &grps[dp->bytemode1][reg];
+ break;
+ case USE_PREFIX_USER_TABLE:
+ dp = &prefix_user_table[dp->bytemode1][prefixes & PREFIX_REPZ ? 1 : 0];
+ used_prefixes |= (prefixes & PREFIX_REPZ);
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ break;
+ }
+ }
+
+ putop (dp->name, sizeflag);
+
obufp = op1out;
op_ad = 2;
if (dp->op1)
- (*dp->op1)(dp->bytemode1, aflag, dflag);
-
+ (*dp->op1)(dp->bytemode1, sizeflag);
+
obufp = op2out;
op_ad = 1;
if (dp->op2)
- (*dp->op2)(dp->bytemode2, aflag, dflag);
-
+ (*dp->op2)(dp->bytemode2, sizeflag);
+
obufp = op3out;
op_ad = 0;
if (dp->op3)
- (*dp->op3)(dp->bytemode3, aflag, dflag);
+ (*dp->op3)(dp->bytemode3, sizeflag);
+ }
+
+ /* See if any prefixes were not used. If so, print the first one
+ separately. If we don't do this, we'll wind up printing an
+ instruction stream which does not precisely correspond to the
+ bytes we are disassembling. */
+ if ((prefixes & ~used_prefixes) != 0)
+ {
+ const char *name;
+
+ name = prefix_name (inbuf[0], orig_sizeflag);
+ if (name == NULL)
+ name = INTERNAL_DISASSEMBLER_ERROR;
+ (*info->fprintf_func) (info->stream, "%s", name);
+ return 1;
}
-
+
obufp = obuf + strlen (obuf);
for (i = strlen (obuf); i < 6; i++)
oappend (" ");
oappend (" ");
(*info->fprintf_func) (info->stream, "%s", obuf);
-
- /* enter instruction is printed with operands in the
- * same order as the intel book; everything else
- * is printed in reverse order
- */
- if (enter_instruction)
+
+ /* The enter and bound instructions are printed with operands in the same
+ order as the intel book; everything else is printed in reverse order. */
+ if (intel_syntax || two_source_ops)
{
first = op1out;
second = op2out;
@@ -1314,7 +2337,7 @@ print_insn_x86 (pc, info, aflag, dflag)
if (*first)
{
if (op_index[0] != -1)
- (*info->print_address_func) (op_address[op_index[0]], info);
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[0]], info);
else
(*info->fprintf_func) (info->stream, "%s", first);
needcomma = 1;
@@ -1324,7 +2347,7 @@ print_insn_x86 (pc, info, aflag, dflag)
if (needcomma)
(*info->fprintf_func) (info->stream, ",");
if (op_index[1] != -1)
- (*info->print_address_func) (op_address[op_index[1]], info);
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[1]], info);
else
(*info->fprintf_func) (info->stream, "%s", second);
needcomma = 1;
@@ -1334,14 +2357,14 @@ print_insn_x86 (pc, info, aflag, dflag)
if (needcomma)
(*info->fprintf_func) (info->stream, ",");
if (op_index[2] != -1)
- (*info->print_address_func) (op_address[op_index[2]], info);
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[2]], info);
else
(*info->fprintf_func) (info->stream, "%s", third);
}
- return (codep - inbuf);
+ return codep - inbuf;
}
-static char *float_mem[] = {
+static const char *float_mem_att[] = {
/* d8 */
"fadds",
"fmuls",
@@ -1416,37 +2439,112 @@ static char *float_mem[] = {
"fistpll",
};
+static const char *float_mem_intel[] = {
+ /* d8 */
+ "fadd",
+ "fmul",
+ "fcom",
+ "fcomp",
+ "fsub",
+ "fsubr",
+ "fdiv",
+ "fdivr",
+ /* d9 */
+ "fld",
+ "(bad)",
+ "fst",
+ "fstp",
+ "fldenv",
+ "fldcw",
+ "fNstenv",
+ "fNstcw",
+ /* da */
+ "fiadd",
+ "fimul",
+ "ficom",
+ "ficomp",
+ "fisub",
+ "fisubr",
+ "fidiv",
+ "fidivr",
+ /* db */
+ "fild",
+ "(bad)",
+ "fist",
+ "fistp",
+ "(bad)",
+ "fld",
+ "(bad)",
+ "fstp",
+ /* dc */
+ "fadd",
+ "fmul",
+ "fcom",
+ "fcomp",
+ "fsub",
+ "fsubr",
+ "fdiv",
+ "fdivr",
+ /* dd */
+ "fld",
+ "(bad)",
+ "fst",
+ "fstp",
+ "frstor",
+ "(bad)",
+ "fNsave",
+ "fNstsw",
+ /* de */
+ "fiadd",
+ "fimul",
+ "ficom",
+ "ficomp",
+ "fisub",
+ "fisubr",
+ "fidiv",
+ "fidivr",
+ /* df */
+ "fild",
+ "(bad)",
+ "fist",
+ "fistp",
+ "fbld",
+ "fild",
+ "fbstp",
+ "fistpll",
+};
+
#define ST OP_ST, 0
#define STi OP_STi, 0
-#define FGRPd9_2 NULL, NULL, 0
-#define FGRPd9_4 NULL, NULL, 1
-#define FGRPd9_5 NULL, NULL, 2
-#define FGRPd9_6 NULL, NULL, 3
-#define FGRPd9_7 NULL, NULL, 4
-#define FGRPda_5 NULL, NULL, 5
-#define FGRPdb_4 NULL, NULL, 6
-#define FGRPde_3 NULL, NULL, 7
-#define FGRPdf_4 NULL, NULL, 8
-
-static struct dis386 float_reg[][8] = {
+#define FGRPd9_2 NULL, NULL, 0, NULL, 0, NULL, 0
+#define FGRPd9_4 NULL, NULL, 1, NULL, 0, NULL, 0
+#define FGRPd9_5 NULL, NULL, 2, NULL, 0, NULL, 0
+#define FGRPd9_6 NULL, NULL, 3, NULL, 0, NULL, 0
+#define FGRPd9_7 NULL, NULL, 4, NULL, 0, NULL, 0
+#define FGRPda_5 NULL, NULL, 5, NULL, 0, NULL, 0
+#define FGRPdb_4 NULL, NULL, 6, NULL, 0, NULL, 0
+#define FGRPde_3 NULL, NULL, 7, NULL, 0, NULL, 0
+#define FGRPdf_4 NULL, NULL, 8, NULL, 0, NULL, 0
+
+static const struct dis386 float_reg[][8] = {
/* d8 */
{
- { "fadd", ST, STi },
- { "fmul", ST, STi },
- { "fcom", STi },
- { "fcomp", STi },
- { "fsub", ST, STi },
- { "fsubr", ST, STi },
- { "fdiv", ST, STi },
- { "fdivr", ST, STi },
+ { "fadd", ST, STi, XX },
+ { "fmul", ST, STi, XX },
+ { "fcom", STi, XX, XX },
+ { "fcomp", STi, XX, XX },
+ { "fsub", ST, STi, XX },
+ { "fsubr", ST, STi, XX },
+ { "fdiv", ST, STi, XX },
+ { "fdivr", ST, STi, XX },
},
/* d9 */
{
- { "fld", STi },
- { "fxch", STi },
+ { "fld", STi, XX, XX },
+ { "fxch", STi, XX, XX },
{ FGRPd9_2 },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
{ FGRPd9_4 },
{ FGRPd9_5 },
{ FGRPd9_6 },
@@ -1454,69 +2552,83 @@ static struct dis386 float_reg[][8] = {
},
/* da */
{
- { "fcmovb", ST, STi },
- { "fcmove", ST, STi },
- { "fcmovbe",ST, STi },
- { "fcmovu", ST, STi },
- { "(bad)" },
+ { "fcmovb", ST, STi, XX },
+ { "fcmove", ST, STi, XX },
+ { "fcmovbe",ST, STi, XX },
+ { "fcmovu", ST, STi, XX },
+ { "(bad)", XX, XX, XX },
{ FGRPda_5 },
- { "(bad)" },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
},
/* db */
{
- { "fcmovnb",ST, STi },
- { "fcmovne",ST, STi },
- { "fcmovnbe",ST, STi },
- { "fcmovnu",ST, STi },
+ { "fcmovnb",ST, STi, XX },
+ { "fcmovne",ST, STi, XX },
+ { "fcmovnbe",ST, STi, XX },
+ { "fcmovnu",ST, STi, XX },
{ FGRPdb_4 },
- { "fucomi", ST, STi },
- { "fcomi", ST, STi },
- { "(bad)" },
+ { "fucomi", ST, STi, XX },
+ { "fcomi", ST, STi, XX },
+ { "(bad)", XX, XX, XX },
},
/* dc */
{
- { "fadd", STi, ST },
- { "fmul", STi, ST },
- { "(bad)" },
- { "(bad)" },
- { "fsub", STi, ST },
- { "fsubr", STi, ST },
- { "fdiv", STi, ST },
- { "fdivr", STi, ST },
+ { "fadd", STi, ST, XX },
+ { "fmul", STi, ST, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+#if UNIXWARE_COMPAT
+ { "fsub", STi, ST, XX },
+ { "fsubr", STi, ST, XX },
+ { "fdiv", STi, ST, XX },
+ { "fdivr", STi, ST, XX },
+#else
+ { "fsubr", STi, ST, XX },
+ { "fsub", STi, ST, XX },
+ { "fdivr", STi, ST, XX },
+ { "fdiv", STi, ST, XX },
+#endif
},
/* dd */
{
- { "ffree", STi },
- { "(bad)" },
- { "fst", STi },
- { "fstp", STi },
- { "fucom", STi },
- { "fucomp", STi },
- { "(bad)" },
- { "(bad)" },
+ { "ffree", STi, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "fst", STi, XX, XX },
+ { "fstp", STi, XX, XX },
+ { "fucom", STi, XX, XX },
+ { "fucomp", STi, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
},
/* de */
{
- { "faddp", STi, ST },
- { "fmulp", STi, ST },
- { "(bad)" },
+ { "faddp", STi, ST, XX },
+ { "fmulp", STi, ST, XX },
+ { "(bad)", XX, XX, XX },
{ FGRPde_3 },
- { "fsubp", STi, ST },
- { "fsubrp", STi, ST },
- { "fdivp", STi, ST },
- { "fdivrp", STi, ST },
+#if UNIXWARE_COMPAT
+ { "fsubp", STi, ST, XX },
+ { "fsubrp", STi, ST, XX },
+ { "fdivp", STi, ST, XX },
+ { "fdivrp", STi, ST, XX },
+#else
+ { "fsubrp", STi, ST, XX },
+ { "fsubp", STi, ST, XX },
+ { "fdivrp", STi, ST, XX },
+ { "fdivp", STi, ST, XX },
+#endif
},
/* df */
{
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
- { "(bad)" },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
{ FGRPdf_4 },
- { "fucomip",ST, STi },
- { "fcomip", ST, STi },
- { "(bad)" },
+ { "fucomip",ST, STi, XX },
+ { "fcomip", ST, STi, XX },
+ { "(bad)", XX, XX, XX },
},
};
@@ -1570,79 +2682,81 @@ static char *fgrps[][8] = {
};
static void
-dofloat (aflag, dflag)
- int aflag;
- int dflag;
+dofloat (sizeflag)
+ int sizeflag;
{
- struct dis386 *dp;
+ const struct dis386 *dp;
unsigned char floatop;
-
+
floatop = codep[-1];
-
+
if (mod != 3)
{
- putop (float_mem[(floatop - 0xd8) * 8 + reg], aflag, dflag);
+ if (intel_syntax)
+ putop (float_mem_intel[(floatop - 0xd8 ) * 8 + reg], sizeflag);
+ else
+ putop (float_mem_att[(floatop - 0xd8 ) * 8 + reg], sizeflag);
obufp = op1out;
- OP_E (v_mode, aflag, dflag);
+ if (floatop == 0xdb)
+ OP_E (x_mode, sizeflag);
+ else if (floatop == 0xdd)
+ OP_E (d_mode, sizeflag);
+ else
+ OP_E (v_mode, sizeflag);
return;
}
codep++;
-
+
dp = &float_reg[floatop - 0xd8][reg];
if (dp->name == NULL)
{
- putop (fgrps[dp->bytemode1][rm], aflag, dflag);
+ putop (fgrps[dp->bytemode1][rm], sizeflag);
+
/* instruction fnstsw is only one with strange arg */
- if (floatop == 0xdf
- && FETCH_DATA (the_info, codep + 1)
- && *codep == 0xe0)
- strcpy (op1out, "%eax");
+ if (floatop == 0xdf && codep[-1] == 0xe0)
+ strcpy (op1out, names16[0]);
}
else
{
- putop (dp->name, aflag, dflag);
+ putop (dp->name, sizeflag);
+
obufp = op1out;
if (dp->op1)
- (*dp->op1)(dp->bytemode1, aflag, dflag);
+ (*dp->op1)(dp->bytemode1, sizeflag);
obufp = op2out;
if (dp->op2)
- (*dp->op2)(dp->bytemode2, aflag, dflag);
+ (*dp->op2)(dp->bytemode2, sizeflag);
}
}
/* ARGSUSED */
-static int
-OP_ST (ignore, aflag, dflag)
- int ignore;
- int aflag;
- int dflag;
+static void
+OP_ST (ignore, sizeflag)
+ int ignore ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
oappend ("%st");
- return (0);
}
/* ARGSUSED */
-static int
-OP_STi (ignore, aflag, dflag)
- int ignore;
- int aflag;
- int dflag;
+static void
+OP_STi (ignore, sizeflag)
+ int ignore ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
sprintf (scratchbuf, "%%st(%d)", rm);
oappend (scratchbuf);
- return (0);
}
/* capital letters in template are macros */
static void
-putop (template, aflag, dflag)
- char *template;
- int aflag;
- int dflag;
+putop (template, sizeflag)
+ const char *template;
+ int sizeflag;
{
- char *p;
-
+ const char *p;
+
for (p = template; *p; p++)
{
switch (*p)
@@ -1650,27 +2764,130 @@ putop (template, aflag, dflag)
default:
*obufp++ = *p;
break;
- case 'C': /* For jcxz/jecxz */
- if (aflag)
+ case 'A':
+ if (intel_syntax)
+ break;
+ if (mod != 3
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ *obufp++ = 'b';
+ break;
+ case 'B':
+ if (intel_syntax)
+ break;
+#ifdef SUFFIX_ALWAYS
+ if (sizeflag & SUFFIX_ALWAYS)
+ *obufp++ = 'b';
+#endif
+ break;
+ case 'E': /* For jcxz/jecxz */
+ if (sizeflag & AFLAG)
*obufp++ = 'e';
break;
+ case 'L':
+ if (intel_syntax)
+ break;
+#ifdef SUFFIX_ALWAYS
+ if (sizeflag & SUFFIX_ALWAYS)
+ *obufp++ = 'l';
+#endif
+ break;
case 'N':
if ((prefixes & PREFIX_FWAIT) == 0)
*obufp++ = 'n';
+ else
+ used_prefixes |= PREFIX_FWAIT;
break;
- case 'S':
- /* operand size flag */
- if (dflag)
- *obufp++ = 'l';
+ case 'P':
+ if (intel_syntax)
+ break;
+ if ((prefixes & PREFIX_DATA)
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ break;
+ case 'Q':
+ if (intel_syntax)
+ break;
+ if (mod != 3
+#ifdef SUFFIX_ALWAYS
+ || (sizeflag & SUFFIX_ALWAYS)
+#endif
+ )
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ break;
+ case 'R':
+ if (intel_syntax)
+ {
+ if (sizeflag & DFLAG)
+ {
+ *obufp++ = 'd';
+ *obufp++ = 'q';
+ }
+ else
+ {
+ *obufp++ = 'w';
+ *obufp++ = 'd';
+ }
+ }
else
- *obufp++ = 'w';
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case 'S':
+ if (intel_syntax)
+ break;
+#ifdef SUFFIX_ALWAYS
+ if (sizeflag & SUFFIX_ALWAYS)
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+#endif
break;
case 'W':
/* operand size flag for cwtl, cbtw */
- if (dflag)
+ if (sizeflag & DFLAG)
*obufp++ = 'w';
else
*obufp++ = 'b';
+ if (intel_syntax)
+ {
+ if (sizeflag & DFLAG)
+ {
+ *obufp++ = 'd';
+ *obufp++ = 'e';
+ }
+ else
+ {
+ *obufp++ = 'w';
+ }
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
}
}
@@ -1679,45 +2896,61 @@ putop (template, aflag, dflag)
static void
oappend (s)
- char *s;
+ const char *s;
{
strcpy (obufp, s);
obufp += strlen (s);
- *obufp = 0;
}
static void
-append_prefix ()
+append_seg ()
{
if (prefixes & PREFIX_CS)
- oappend ("%cs:");
+ {
+ oappend ("%cs:");
+ used_prefixes |= PREFIX_CS;
+ }
if (prefixes & PREFIX_DS)
- oappend ("%ds:");
+ {
+ oappend ("%ds:");
+ used_prefixes |= PREFIX_DS;
+ }
if (prefixes & PREFIX_SS)
- oappend ("%ss:");
+ {
+ oappend ("%ss:");
+ used_prefixes |= PREFIX_SS;
+ }
if (prefixes & PREFIX_ES)
- oappend ("%es:");
+ {
+ oappend ("%es:");
+ used_prefixes |= PREFIX_ES;
+ }
if (prefixes & PREFIX_FS)
- oappend ("%fs:");
+ {
+ oappend ("%fs:");
+ used_prefixes |= PREFIX_FS;
+ }
if (prefixes & PREFIX_GS)
- oappend ("%gs:");
+ {
+ oappend ("%gs:");
+ used_prefixes |= PREFIX_GS;
+ }
}
-static int
-OP_indirE (bytemode, aflag, dflag)
+static void
+OP_indirE (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
- oappend ("*");
- return OP_E (bytemode, aflag, dflag);
+ if (!intel_syntax)
+ oappend ("*");
+ OP_E (bytemode, sizeflag);
}
-static int
-OP_E (bytemode, aflag, dflag)
+static void
+OP_E (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
int disp;
@@ -1734,23 +2967,31 @@ OP_E (bytemode, aflag, dflag)
case w_mode:
oappend (names16[rm]);
break;
+ case d_mode:
+ oappend (names32[rm]);
+ break;
case v_mode:
- if (dflag)
+ if (sizeflag & DFLAG)
oappend (names32[rm]);
else
oappend (names16[rm]);
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case 0:
+ if ( !(codep[-2] == 0xAE && codep[-1] == 0xF8 /* sfence */))
+ BadOp(); /* bad sfence,lea,lds,les,lfs,lgs,lss modrm */
break;
default:
- oappend ("<bad dis table>");
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
break;
}
- return 0;
+ return;
}
disp = 0;
- append_prefix ();
+ append_seg ();
- if (aflag) /* 32 bit address mode */
+ if (sizeflag & AFLAG) /* 32 bit address mode */
{
int havesib;
int havebase;
@@ -1792,29 +3033,106 @@ OP_E (bytemode, aflag, dflag)
break;
}
- if (mod != 0 || base == 5)
- {
- sprintf (scratchbuf, "0x%x", disp);
- oappend (scratchbuf);
- }
+ if (!intel_syntax)
+ if (mod != 0 || base == 5)
+ {
+ sprintf (scratchbuf, "0x%x", disp);
+ oappend (scratchbuf);
+ }
if (havebase || (havesib && (index != 4 || scale != 0)))
{
- oappend ("(");
+ if (intel_syntax)
+ {
+ switch (bytemode)
+ {
+ case b_mode:
+ oappend("BYTE PTR ");
+ break;
+ case w_mode:
+ oappend("WORD PTR ");
+ break;
+ case v_mode:
+ oappend("DWORD PTR ");
+ break;
+ case d_mode:
+ oappend("QWORD PTR ");
+ break;
+ case x_mode:
+ oappend("XWORD PTR ");
+ break;
+ default:
+ break;
+ }
+ }
+ *obufp++ = open_char;
+ *obufp = '\0';
if (havebase)
oappend (names32[base]);
if (havesib)
{
if (index != 4)
{
- sprintf (scratchbuf, ",%s", names32[index]);
+ if (intel_syntax)
+ {
+ if (havebase)
+ {
+ *obufp++ = separator_char;
+ *obufp = '\0';
+ }
+ sprintf (scratchbuf, "%s", names32[index]);
+ }
+ else
+ sprintf (scratchbuf, ",%s", names32[index]);
oappend (scratchbuf);
}
- sprintf (scratchbuf, ",%d", 1 << scale);
- oappend (scratchbuf);
+ if (!intel_syntax
+ || (intel_syntax
+ && bytemode != b_mode
+ && bytemode != w_mode
+ && bytemode != v_mode))
+ {
+ *obufp++ = scale_char;
+ *obufp = '\0';
+ sprintf (scratchbuf, "%d", 1 << scale);
+ oappend (scratchbuf);
+ }
}
- oappend (")");
+ if (intel_syntax)
+ if (mod != 0 || base == 5)
+ {
+ /* Don't print zero displacements */
+ if (disp > 0)
+ {
+ sprintf (scratchbuf, "+%d", disp);
+ oappend (scratchbuf);
+ }
+ else if (disp < 0)
+ {
+ sprintf (scratchbuf, "%d", disp);
+ oappend (scratchbuf);
+ }
+ }
+
+ *obufp++ = close_char;
+ *obufp = '\0';
}
+ else if (intel_syntax)
+ {
+ if (mod != 0 || base == 5)
+ {
+ if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS))
+ ;
+ else
+ {
+ oappend (names_seg[3]);
+ oappend (":");
+ }
+ sprintf (scratchbuf, "0x%x", disp);
+ oappend (scratchbuf);
+ }
+ }
}
else
{ /* 16 bit address mode */
@@ -1841,29 +3159,30 @@ OP_E (bytemode, aflag, dflag)
break;
}
- if (mod != 0 || rm == 6)
- {
- sprintf (scratchbuf, "0x%x", disp);
- oappend (scratchbuf);
- }
+ if (!intel_syntax)
+ if (mod != 0 || rm == 6)
+ {
+ sprintf (scratchbuf, "%d", disp);
+ oappend (scratchbuf);
+ }
if (mod != 0 || rm != 6)
{
- oappend ("(");
+ *obufp++ = open_char;
+ *obufp = '\0';
oappend (index16[rm]);
- oappend (")");
+ *obufp++ = close_char;
+ *obufp = '\0';
}
}
- return 0;
}
-static int
-OP_G (bytemode, aflag, dflag)
+static void
+OP_G (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
- switch (bytemode)
+ switch (bytemode)
{
case b_mode:
oappend (names8[reg]);
@@ -1875,16 +3194,16 @@ OP_G (bytemode, aflag, dflag)
oappend (names32[reg]);
break;
case v_mode:
- if (dflag)
+ if (sizeflag & DFLAG)
oappend (names32[reg]);
else
oappend (names16[reg]);
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
default:
- oappend ("<internal disassembler error>");
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
break;
}
- return (0);
}
static int
@@ -1897,7 +3216,7 @@ get32 ()
x |= (*codep++ & 0xff) << 8;
x |= (*codep++ & 0xff) << 16;
x |= (*codep++ & 0xff) << 24;
- return (x);
+ return x;
}
static int
@@ -1908,96 +3227,100 @@ get16 ()
FETCH_DATA (the_info, codep + 2);
x = *codep++ & 0xff;
x |= (*codep++ & 0xff) << 8;
- return (x);
+ return x;
}
static void
set_op (op)
- int op;
+ unsigned int op;
{
op_index[op_ad] = op_ad;
op_address[op_ad] = op;
}
-static int
-OP_REG (code, aflag, dflag)
+static void
+OP_REG (code, sizeflag)
int code;
- int aflag;
- int dflag;
+ int sizeflag;
{
- char *s;
-
- switch (code)
+ const char *s;
+
+ switch (code)
{
- case indir_dx_reg: s = "(%dx)"; break;
- case ax_reg: case cx_reg: case dx_reg: case bx_reg:
- case sp_reg: case bp_reg: case si_reg: case di_reg:
- s = names16[code - ax_reg];
- break;
- case es_reg: case ss_reg: case cs_reg:
- case ds_reg: case fs_reg: case gs_reg:
- s = names_seg[code - es_reg];
- break;
- case al_reg: case ah_reg: case cl_reg: case ch_reg:
- case dl_reg: case dh_reg: case bl_reg: case bh_reg:
- s = names8[code - al_reg];
- break;
- case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
- case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
- if (dflag)
+ case indir_dx_reg:
+ s = "(%dx)";
+ break;
+ case ax_reg: case cx_reg: case dx_reg: case bx_reg:
+ case sp_reg: case bp_reg: case si_reg: case di_reg:
+ s = names16[code - ax_reg];
+ break;
+ case es_reg: case ss_reg: case cs_reg:
+ case ds_reg: case fs_reg: case gs_reg:
+ s = names_seg[code - es_reg];
+ break;
+ case al_reg: case ah_reg: case cl_reg: case ch_reg:
+ case dl_reg: case dh_reg: case bl_reg: case bh_reg:
+ s = names8[code - al_reg];
+ break;
+ case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
+ case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
+ if (sizeflag & DFLAG)
s = names32[code - eAX_reg];
else
s = names16[code - eAX_reg];
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
default:
- s = "<internal disassembler error>";
+ s = INTERNAL_DISASSEMBLER_ERROR;
break;
}
oappend (s);
- return (0);
}
-static int
-OP_I (bytemode, aflag, dflag)
+static void
+OP_I (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
int op;
-
- switch (bytemode)
+
+ switch (bytemode)
{
case b_mode:
FETCH_DATA (the_info, codep + 1);
op = *codep++ & 0xff;
break;
case v_mode:
- if (dflag)
+ if (sizeflag & DFLAG)
op = get32 ();
else
op = get16 ();
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
case w_mode:
op = get16 ();
break;
default:
- oappend ("<internal disassembler error>");
- return (0);
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
}
- sprintf (scratchbuf, "$0x%x", op);
+
+ if (intel_syntax)
+ sprintf (scratchbuf, "0x%x", op);
+ else
+ sprintf (scratchbuf, "$0x%x", op);
oappend (scratchbuf);
- return (0);
+ scratchbuf[0] = '\0';
}
-static int
-OP_sI (bytemode, aflag, dflag)
+static void
+OP_sI (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
int op;
-
- switch (bytemode)
+
+ switch (bytemode)
{
case b_mode:
FETCH_DATA (the_info, codep + 1);
@@ -2006,7 +3329,7 @@ OP_sI (bytemode, aflag, dflag)
op -= 0x100;
break;
case v_mode:
- if (dflag)
+ if (sizeflag & DFLAG)
op = get32 ();
else
{
@@ -2014,6 +3337,7 @@ OP_sI (bytemode, aflag, dflag)
if ((op & 0x8000) != 0)
op -= 0x10000;
}
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
case w_mode:
op = get16 ();
@@ -2021,24 +3345,25 @@ OP_sI (bytemode, aflag, dflag)
op -= 0x10000;
break;
default:
- oappend ("<internal disassembler error>");
- return (0);
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
}
- sprintf (scratchbuf, "$0x%x", op);
+ if (intel_syntax)
+ sprintf (scratchbuf, "%d", op);
+ else
+ sprintf (scratchbuf, "$0x%x", op);
oappend (scratchbuf);
- return (0);
}
-static int
-OP_J (bytemode, aflag, dflag)
+static void
+OP_J (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
int disp;
int mask = -1;
-
- switch (bytemode)
+
+ switch (bytemode)
{
case b_mode:
FETCH_DATA (the_info, codep + 1);
@@ -2047,131 +3372,120 @@ OP_J (bytemode, aflag, dflag)
disp -= 0x100;
break;
case v_mode:
- if (dflag)
+ if (sizeflag & DFLAG)
disp = get32 ();
else
{
disp = get16 ();
- if ((disp & 0x8000) != 0)
- disp -= 0x10000;
/* for some reason, a data16 prefix on a jump instruction
means that the pc is masked to 16 bits after the
displacement is added! */
mask = 0xffff;
}
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
default:
- oappend ("<internal disassembler error>");
- return (0);
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
}
disp = (start_pc + codep - start_codep + disp) & mask;
set_op (disp);
sprintf (scratchbuf, "0x%x", disp);
oappend (scratchbuf);
- return (0);
}
/* ARGSUSED */
-static int
-OP_SEG (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
+static void
+OP_SEG (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
static char *sreg[] = {
"%es","%cs","%ss","%ds","%fs","%gs","%?","%?",
};
oappend (sreg[reg]);
- return (0);
}
-static int
-OP_DIR (size, aflag, dflag)
- int size;
- int aflag;
- int dflag;
+/* ARGSUSED */
+static void
+OP_DIR (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag;
{
int seg, offset;
-
- switch (size)
+
+ if (sizeflag & DFLAG)
{
- case lptr:
- if (aflag)
- {
- offset = get32 ();
- seg = get16 ();
- }
- else
- {
- offset = get16 ();
- seg = get16 ();
- }
- sprintf (scratchbuf, "0x%x,0x%x", seg, offset);
- oappend (scratchbuf);
- break;
- case v_mode:
- if (aflag)
- offset = get32 ();
- else
- {
- offset = get16 ();
- if ((offset & 0x8000) != 0)
- offset -= 0x10000;
- }
-
- offset = start_pc + codep - start_codep + offset;
- set_op (offset);
- sprintf (scratchbuf, "0x%x", offset);
- oappend (scratchbuf);
- break;
- default:
- oappend ("<internal disassembler error>");
- break;
+ offset = get32 ();
+ seg = get16 ();
}
- return (0);
+ else
+ {
+ offset = get16 ();
+ seg = get16 ();
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
+ oappend (scratchbuf);
}
/* ARGSUSED */
-static int
-OP_OFF (bytemode, aflag, dflag)
- int bytemode;
- int aflag;
- int dflag;
+static void
+OP_OFF (ignore, sizeflag)
+ int ignore ATTRIBUTE_UNUSED;
+ int sizeflag;
{
int off;
- append_prefix ();
+ append_seg ();
- if (aflag)
+ if (sizeflag & AFLAG)
off = get32 ();
else
off = get16 ();
-
+
+ if (intel_syntax)
+ {
+ if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
+ {
+ oappend (names_seg[3]);
+ oappend (":");
+ }
+ }
sprintf (scratchbuf, "0x%x", off);
oappend (scratchbuf);
- return (0);
}
-/* ARGSUSED */
-static int
-OP_ESDI (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
+static void
+ptr_reg (code, sizeflag)
+ int code;
+ int sizeflag;
{
- oappend ("%es:(");
- oappend (aflag ? "%edi" : "%di");
+ const char *s;
+ oappend ("(");
+ if (sizeflag & AFLAG)
+ s = names32[code - eAX_reg];
+ else
+ s = names16[code - eAX_reg];
+ oappend (s);
oappend (")");
- return (0);
}
-/* ARGSUSED */
-static int
-OP_DSSI (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
+static void
+OP_ESreg (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ oappend ("%es:");
+ ptr_reg (code, sizeflag);
+}
+
+static void
+OP_DSreg (code, sizeflag)
+ int code;
+ int sizeflag;
{
if ((prefixes
& (PREFIX_CS
@@ -2181,120 +3495,265 @@ OP_DSSI (dummy, aflag, dflag)
| PREFIX_FS
| PREFIX_GS)) == 0)
prefixes |= PREFIX_DS;
- append_prefix ();
- oappend ("(");
- oappend (aflag ? "%esi" : "%si");
- oappend (")");
- return (0);
+ append_seg();
+ ptr_reg (code, sizeflag);
}
-#if 0
-/* Not used. */
-
/* ARGSUSED */
-static int
-OP_ONE (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
-{
- oappend ("1");
- return (0);
-}
-
-#endif
-
-/* ARGSUSED */
-static int
-OP_C (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
+static void
+OP_C (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
- codep++; /* skip mod/rm */
sprintf (scratchbuf, "%%cr%d", reg);
oappend (scratchbuf);
- return (0);
}
/* ARGSUSED */
-static int
-OP_D (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
+static void
+OP_D (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
- codep++; /* skip mod/rm */
sprintf (scratchbuf, "%%db%d", reg);
oappend (scratchbuf);
- return (0);
}
/* ARGSUSED */
-static int
-OP_T (dummy, aflag, dflag)
- int dummy;
- int aflag;
- int dflag;
+static void
+OP_T (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
- codep++; /* skip mod/rm */
sprintf (scratchbuf, "%%tr%d", reg);
oappend (scratchbuf);
- return (0);
}
-static int
-OP_rm (bytemode, aflag, dflag)
+static void
+OP_Rd (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
- switch (bytemode)
- {
- case d_mode:
- oappend (names32[rm]);
- break;
- case w_mode:
- oappend (names16[rm]);
- break;
- }
- return (0);
+ if (mod == 3)
+ OP_E (bytemode, sizeflag);
+ else
+ BadOp();
}
-static int
-OP_MMX (bytemode, aflag, dflag)
- int bytemode;
- int aflag;
- int dflag;
+static void
+OP_MMX (ignore, sizeflag)
+ int ignore ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
{
sprintf (scratchbuf, "%%mm%d", reg);
oappend (scratchbuf);
- return 0;
}
-static int
-OP_EM (bytemode, aflag, dflag)
+static void
+OP_XMM (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ sprintf (scratchbuf, "%%xmm%d", reg);
+ oappend (scratchbuf);
+}
+
+static void
+OP_EM (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
if (mod != 3)
- return OP_E (bytemode, aflag, dflag);
+ {
+ OP_E (bytemode, sizeflag);
+ return;
+ }
codep++;
sprintf (scratchbuf, "%%mm%d", rm);
oappend (scratchbuf);
- return 0;
}
-static int
-OP_MS (bytemode, aflag, dflag)
+static void
+OP_EX (bytemode, sizeflag)
int bytemode;
- int aflag;
- int dflag;
+ int sizeflag;
{
- ++codep;
- sprintf (scratchbuf, "%%mm%d", rm);
+ if (mod != 3)
+ {
+ OP_E (bytemode, sizeflag);
+ return;
+ }
+
+ codep++;
+ sprintf (scratchbuf, "%%xmm%d", rm);
oappend (scratchbuf);
- return 0;
+}
+
+static void
+OP_MS (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ if (mod == 3)
+ OP_EM (bytemode, sizeflag);
+ else
+ BadOp();
+}
+
+static const char *Suffix3DNow[] = {
+/* 00 */ NULL, NULL, NULL, NULL,
+/* 04 */ NULL, NULL, NULL, NULL,
+/* 08 */ NULL, NULL, NULL, NULL,
+/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
+/* 10 */ NULL, NULL, NULL, NULL,
+/* 14 */ NULL, NULL, NULL, NULL,
+/* 18 */ NULL, NULL, NULL, NULL,
+/* 1C */ "pf2iw", "pf2id", NULL, NULL,
+/* 20 */ NULL, NULL, NULL, NULL,
+/* 24 */ NULL, NULL, NULL, NULL,
+/* 28 */ NULL, NULL, NULL, NULL,
+/* 2C */ NULL, NULL, NULL, NULL,
+/* 30 */ NULL, NULL, NULL, NULL,
+/* 34 */ NULL, NULL, NULL, NULL,
+/* 38 */ NULL, NULL, NULL, NULL,
+/* 3C */ NULL, NULL, NULL, NULL,
+/* 40 */ NULL, NULL, NULL, NULL,
+/* 44 */ NULL, NULL, NULL, NULL,
+/* 48 */ NULL, NULL, NULL, NULL,
+/* 4C */ NULL, NULL, NULL, NULL,
+/* 50 */ NULL, NULL, NULL, NULL,
+/* 54 */ NULL, NULL, NULL, NULL,
+/* 58 */ NULL, NULL, NULL, NULL,
+/* 5C */ NULL, NULL, NULL, NULL,
+/* 60 */ NULL, NULL, NULL, NULL,
+/* 64 */ NULL, NULL, NULL, NULL,
+/* 68 */ NULL, NULL, NULL, NULL,
+/* 6C */ NULL, NULL, NULL, NULL,
+/* 70 */ NULL, NULL, NULL, NULL,
+/* 74 */ NULL, NULL, NULL, NULL,
+/* 78 */ NULL, NULL, NULL, NULL,
+/* 7C */ NULL, NULL, NULL, NULL,
+/* 80 */ NULL, NULL, NULL, NULL,
+/* 84 */ NULL, NULL, NULL, NULL,
+/* 88 */ NULL, NULL, "pfnacc", NULL,
+/* 8C */ NULL, NULL, "pfpnacc", NULL,
+/* 90 */ "pfcmpge", NULL, NULL, NULL,
+/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
+/* 98 */ NULL, NULL, "pfsub", NULL,
+/* 9C */ NULL, NULL, "pfadd", NULL,
+/* A0 */ "pfcmpgt", NULL, NULL, NULL,
+/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
+/* A8 */ NULL, NULL, "pfsubr", NULL,
+/* AC */ NULL, NULL, "pfacc", NULL,
+/* B0 */ "pfcmpeq", NULL, NULL, NULL,
+/* B4 */ "pfmul", NULL, "pfrcpit2", "pfmulhrw",
+/* B8 */ NULL, NULL, NULL, "pswapd",
+/* BC */ NULL, NULL, NULL, "pavgusb",
+/* C0 */ NULL, NULL, NULL, NULL,
+/* C4 */ NULL, NULL, NULL, NULL,
+/* C8 */ NULL, NULL, NULL, NULL,
+/* CC */ NULL, NULL, NULL, NULL,
+/* D0 */ NULL, NULL, NULL, NULL,
+/* D4 */ NULL, NULL, NULL, NULL,
+/* D8 */ NULL, NULL, NULL, NULL,
+/* DC */ NULL, NULL, NULL, NULL,
+/* E0 */ NULL, NULL, NULL, NULL,
+/* E4 */ NULL, NULL, NULL, NULL,
+/* E8 */ NULL, NULL, NULL, NULL,
+/* EC */ NULL, NULL, NULL, NULL,
+/* F0 */ NULL, NULL, NULL, NULL,
+/* F4 */ NULL, NULL, NULL, NULL,
+/* F8 */ NULL, NULL, NULL, NULL,
+/* FC */ NULL, NULL, NULL, NULL,
+};
+
+static void
+OP_3DNowSuffix (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ const char *mnemonic;
+
+ FETCH_DATA (the_info, codep + 1);
+ /* AMD 3DNow! instructions are specified by an opcode suffix in the
+ place where an 8-bit immediate would normally go. ie. the last
+ byte of the instruction. */
+ obufp = obuf + strlen(obuf);
+ mnemonic = Suffix3DNow[*codep++ & 0xff];
+ if (mnemonic)
+ oappend (mnemonic);
+ else
+ {
+ /* Since a variable sized modrm/sib chunk is between the start
+ of the opcode (0x0f0f) and the opcode suffix, we need to do
+ all the modrm processing first, and don't know until now that
+ we have a bad opcode. This necessitates some cleaning up. */
+ op1out[0] = '\0';
+ op2out[0] = '\0';
+ BadOp();
+ }
+}
+
+
+static const char *simd_cmp_op [] = {
+ "eq",
+ "lt",
+ "le",
+ "unord",
+ "neq",
+ "nlt",
+ "nle",
+ "ord"
+};
+
+static void
+OP_SIMD_Suffix (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ unsigned int cmp_type;
+
+ FETCH_DATA (the_info, codep + 1);
+ obufp = obuf + strlen(obuf);
+ cmp_type = *codep++ & 0xff;
+ if (cmp_type < 8)
+ {
+ sprintf (scratchbuf, "cmp%s%cs",
+ simd_cmp_op[cmp_type],
+ prefixes & PREFIX_REPZ ? 's' : 'p');
+ used_prefixes |= (prefixes & PREFIX_REPZ);
+ oappend (scratchbuf);
+ }
+ else
+ {
+ /* We have a bad extension byte. Clean up. */
+ op1out[0] = '\0';
+ op2out[0] = '\0';
+ BadOp();
+ }
+}
+
+static void
+SIMD_Fixup (extrachar, sizeflag)
+ int extrachar;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ /* Change movlps/movhps to movhlps/movlhps for 2 register operand
+ forms of these instructions. */
+ if (mod == 3)
+ {
+ char *p = obuf + strlen(obuf);
+ *(p+1) = '\0';
+ *p = *(p-1);
+ *(p-1) = *(p-2);
+ *(p-2) = *(p-3);
+ *(p-3) = extrachar;
+ }
+}
+
+static void BadOp (void)
+{
+ codep = insn_codep + 1; /* throw away prefixes and 1st. opcode byte */
+ oappend ("(bad)");
}
diff --git a/contrib/binutils/opcodes/opintl.h b/contrib/binutils/opcodes/opintl.h
new file mode 100644
index 0000000..a590160
--- /dev/null
+++ b/contrib/binutils/opcodes/opintl.h
@@ -0,0 +1,30 @@
+/* opintl.h - opcodes specific header for gettext code.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+
+ Written by Tom Tromey <tromey@cygnus.com>
+
+ This file is part of the opcodes library used by GAS and the GNU binutils.
+
+ 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. */
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) dgettext (PACKAGE, String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# 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 _(String) (String)
+# define N_(String) (String)
+#endif
diff --git a/contrib/binutils/opcodes/po/Make-in b/contrib/binutils/opcodes/po/Make-in
new file mode 100644
index 0000000..0552db1
--- /dev/null
+++ b/contrib/binutils/opcodes/po/Make-in
@@ -0,0 +1,251 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in
+ rm -f $(srcdir)/$(PACKAGE).pot
+ mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-info:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/POTFILES.in
+
+Makefile: Make-in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
+ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/opcodes/po/POTFILES.in b/contrib/binutils/opcodes/po/POTFILES.in
new file mode 100644
index 0000000..f88ddb1
--- /dev/null
+++ b/contrib/binutils/opcodes/po/POTFILES.in
@@ -0,0 +1,73 @@
+a29k-dis.c
+alpha-dis.c
+alpha-opc.c
+arc-dis.c
+arc-opc.c
+arm-dis.c
+arm-opc.h
+avr-dis.c
+cgen-asm.c
+cgen-dis.c
+cgen-opc.c
+d10v-dis.c
+d10v-opc.c
+d30v-dis.c
+d30v-opc.c
+disassemble.c
+dis-buf.c
+fr30-asm.c
+fr30-desc.c
+fr30-desc.h
+fr30-dis.c
+fr30-ibld.c
+fr30-opc.c
+fr30-opc.h
+h8300-dis.c
+h8500-dis.c
+h8500-opc.h
+hppa-dis.c
+i370-dis.c
+i370-opc.c
+i386-dis.c
+i960-dis.c
+m10200-dis.c
+m10200-opc.c
+m10300-dis.c
+m10300-opc.c
+m32r-asm.c
+m32r-desc.c
+m32r-desc.h
+m32r-dis.c
+m32r-ibld.c
+m32r-opc.c
+m32r-opc.h
+m32r-opinst.c
+m68k-dis.c
+m68k-opc.c
+m88k-dis.c
+mcore-dis.c
+mcore-opc.h
+mips16-opc.c
+mips-dis.c
+mips-opc.c
+ns32k-dis.c
+pj-dis.c
+pj-opc.c
+ppc-dis.c
+ppc-opc.c
+sh-dis.c
+sh-opc.h
+sparc-dis.c
+sparc-opc.c
+sysdep.h
+tic30-dis.c
+tic80-dis.c
+tic80-opc.c
+v850-dis.c
+v850-opc.c
+vax-dis.c
+w65-dis.c
+w65-opc.h
+z8k-dis.c
+z8kgen.c
+z8k-opc.h
diff --git a/contrib/binutils/opcodes/po/opcodes.pot b/contrib/binutils/opcodes/po/opcodes.pot
new file mode 100644
index 0000000..c5c26b8
--- /dev/null
+++ b/contrib/binutils/opcodes/po/opcodes.pot
@@ -0,0 +1,345 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2000-04-04 22:10+0930\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: alpha-opc.c:335
+msgid "branch operand unaligned"
+msgstr ""
+
+#: alpha-opc.c:358 alpha-opc.c:380
+msgid "jump hint unaligned"
+msgstr ""
+
+#: arc-dis.c:231
+msgid "*unknown*"
+msgstr ""
+
+#: arc-opc.c:629
+msgid "unable to fit different valued constants into instruction"
+msgstr ""
+
+#: arc-opc.c:639
+msgid "auxiliary register not allowed here"
+msgstr ""
+
+#: arc-opc.c:652
+#, c-format
+msgid "invalid register number `%d'"
+msgstr ""
+
+#: arc-opc.c:775
+#, c-format
+msgid "value won't fit in range %ld - %ld"
+msgstr ""
+
+#: arc-opc.c:871
+msgid "branch address not on 4 byte boundary"
+msgstr ""
+
+#: arm-dis.c:470
+msgid "<illegal precision>"
+msgstr ""
+
+#: arm-dis.c:882
+#, c-format
+msgid "Unrecognised register name set: %s\n"
+msgstr ""
+
+#: arm-dis.c:889
+#, c-format
+msgid "Unrecognised disassembler option: %s\n"
+msgstr ""
+
+#: arm-dis.c:1053
+msgid ""
+"\n"
+"The following ARM specific disassembler options are supported for use with\n"
+"the -M switch:\n"
+msgstr ""
+
+#: cgen-asm.c:224
+msgid "unrecognized keyword/register name"
+msgstr ""
+
+#: cgen-asm.c:332 fr30-ibld.c:223 m32r-ibld.c:227
+#, c-format
+msgid "operand out of range (%ld not between %ld and %ld)"
+msgstr ""
+
+#: cgen-asm.c:353
+#, c-format
+msgid "operand out of range (%lu not between %lu and %lu)"
+msgstr ""
+
+#: d30v-dis.c:305
+#, c-format
+msgid "<unknown register %d>"
+msgstr ""
+
+#. Can't happen.
+#: dis-buf.c:56
+#, c-format
+msgid "Unknown error %d\n"
+msgstr ""
+
+#: dis-buf.c:61
+#, c-format
+msgid "Address 0x%x is out of bounds.\n"
+msgstr ""
+
+#: fr30-asm.c:305 m32r-asm.c:313
+#, c-format
+msgid "Unrecognized field %d while parsing.\n"
+msgstr ""
+
+#. We couldn't parse it.
+#: fr30-asm.c:369 fr30-asm.c:373 fr30-asm.c:447 m32r-asm.c:377 m32r-asm.c:381
+#: m32r-asm.c:455
+msgid "unrecognized instruction"
+msgstr ""
+
+#. Syntax char didn't match. Can't be this insn.
+#. FIXME: would like to return something like
+#. "expected char `c'"
+#: fr30-asm.c:415 m32r-asm.c:423
+msgid "syntax error"
+msgstr ""
+
+#: fr30-asm.c:441 m32r-asm.c:449
+msgid "junk at end of line"
+msgstr ""
+
+#: fr30-asm.c:534 m32r-asm.c:552
+#, c-format
+msgid "bad instruction `%.50s...'"
+msgstr ""
+
+#: fr30-asm.c:537 m32r-asm.c:555
+#, c-format
+msgid "bad instruction `%.50s'"
+msgstr ""
+
+#: fr30-dis.c:300 m32r-dis.c:239
+#, c-format
+msgid "Unrecognized field %d while printing insn.\n"
+msgstr ""
+
+#: fr30-ibld.c:210 m32r-ibld.c:211
+#, c-format
+msgid "operand out of range (%lu not between 0 and %lu)"
+msgstr ""
+
+#: fr30-ibld.c:745 m32r-ibld.c:679
+#, c-format
+msgid "Unrecognized field %d while building insn.\n"
+msgstr ""
+
+#: fr30-ibld.c:947 m32r-ibld.c:809
+#, c-format
+msgid "Unrecognized field %d while decoding insn.\n"
+msgstr ""
+
+#: fr30-ibld.c:1091 m32r-ibld.c:914
+#, c-format
+msgid "Unrecognized field %d while getting int operand.\n"
+msgstr ""
+
+#: fr30-ibld.c:1220 m32r-ibld.c:1004
+#, c-format
+msgid "Unrecognized field %d while getting vma operand.\n"
+msgstr ""
+
+#: fr30-ibld.c:1349 m32r-ibld.c:1097
+#, c-format
+msgid "Unrecognized field %d while setting int operand.\n"
+msgstr ""
+
+#: fr30-ibld.c:1471 m32r-ibld.c:1183
+#, c-format
+msgid "Unrecognized field %d while setting vma operand.\n"
+msgstr ""
+
+#: h8300-dis.c:404
+#, c-format
+msgid "Hmmmm %x"
+msgstr ""
+
+#: h8300-dis.c:416
+#, c-format
+msgid "Don't understand %x \n"
+msgstr ""
+
+#: h8500-dis.c:139
+#, c-format
+msgid "can't cope with insert %d\n"
+msgstr ""
+
+#. Couldn't understand anything
+#: h8500-dis.c:344
+#, c-format
+msgid "%02x\t\t*unknown*"
+msgstr ""
+
+#: m10200-dis.c:199
+#, c-format
+msgid "unknown\t0x%02x"
+msgstr ""
+
+#: m10200-dis.c:339
+#, c-format
+msgid "unknown\t0x%04lx"
+msgstr ""
+
+#: m10300-dis.c:680
+#, c-format
+msgid "unknown\t0x%04x"
+msgstr ""
+
+#: m68k-dis.c:410
+#, c-format
+msgid "<internal error in opcode table: %s %s>\n"
+msgstr ""
+
+#: m68k-dis.c:988
+#, c-format
+msgid "<function code %d>"
+msgstr ""
+
+#: m88k-dis.c:273
+#, c-format
+msgid "# <dis error: %08x>"
+msgstr ""
+
+#: mips-dis.c:237
+#, c-format
+msgid "# internal error, undefined modifier(%c)"
+msgstr ""
+
+#. I and Z are output operands and can`t be immediate
+#. * A is an address and we can`t have the address of
+#. * an immediate either. We don't know how much to increase
+#. * aoffsetp by since whatever generated this is broken
+#. * anyway!
+#.
+#: ns32k-dis.c:618
+msgid "$<undefined>"
+msgstr ""
+
+#: ppc-opc.c:586 ppc-opc.c:617
+msgid "invalid conditional option"
+msgstr ""
+
+#: ppc-opc.c:619
+msgid "attempt to set y bit when using + or - modifier"
+msgstr ""
+
+#: ppc-opc.c:674
+msgid "ignoring least significant bits in branch offset"
+msgstr ""
+
+#: ppc-opc.c:709 ppc-opc.c:746
+msgid "illegal bitmask"
+msgstr ""
+
+#: ppc-opc.c:815
+msgid "value out of range"
+msgstr ""
+
+#: ppc-opc.c:889
+msgid "index register in load range"
+msgstr ""
+
+#: ppc-opc.c:904
+msgid "invalid register operand when updating"
+msgstr ""
+
+#. Mark as non-valid instruction
+#: sparc-dis.c:744
+msgid "unknown"
+msgstr ""
+
+#: sparc-dis.c:816
+#, c-format
+msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
+msgstr ""
+
+#: sparc-dis.c:827
+#, c-format
+msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
+msgstr ""
+
+#: sparc-dis.c:876
+#, c-format
+msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
+msgstr ""
+
+#: v850-dis.c:221
+#, c-format
+msgid "unknown operand shift: %x\n"
+msgstr ""
+
+#: v850-dis.c:233
+#, c-format
+msgid "unknown pop reg: %d\n"
+msgstr ""
+
+#. The functions used to insert and extract complicated operands.
+#. Note: There is a conspiracy between these functions and
+#. v850_insert_operand() in gas/config/tc-v850.c. Error messages
+#. containing the string 'out of range' will be ignored unless a
+#. specific command line option is given to GAS.
+#: v850-opc.c:46
+msgid "displacement value is not in range and is not aligned"
+msgstr ""
+
+#: v850-opc.c:47
+msgid "displacement value is out of range"
+msgstr ""
+
+#: v850-opc.c:48
+msgid "displacement value is not aligned"
+msgstr ""
+
+#: v850-opc.c:50
+msgid "immediate value is out of range"
+msgstr ""
+
+#: v850-opc.c:61
+msgid "branch value not in range and to odd offset"
+msgstr ""
+
+#: v850-opc.c:63 v850-opc.c:95
+msgid "branch value out of range"
+msgstr ""
+
+#: v850-opc.c:66 v850-opc.c:98
+msgid "branch to odd offset"
+msgstr ""
+
+#: v850-opc.c:93
+msgid "branch value not in range and to an odd offset"
+msgstr ""
+
+#: v850-opc.c:321
+msgid "invalid register for stack adjustment"
+msgstr ""
+
+#: v850-opc.c:343
+msgid "immediate value not in range and not even"
+msgstr ""
+
+#: v850-opc.c:348
+msgid "immediate value must be even"
+msgstr ""
diff --git a/contrib/binutils/opcodes/ppc-dis.c b/contrib/binutils/opcodes/ppc-dis.c
new file mode 100644
index 0000000..f256632
--- /dev/null
+++ b/contrib/binutils/opcodes/ppc-dis.c
@@ -0,0 +1,237 @@
+/* ppc-dis.c -- Disassemble PowerPC instructions
+ Copyright 1994 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support
+
+This file is part of GDB, GAS, and the GNU binutils.
+
+GDB, GAS, and the GNU binutils are free software; you can redistribute
+them and/or modify them 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.
+
+GDB, GAS, and the GNU binutils are distributed in the hope that they
+will be useful, but WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this file; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <stdio.h>
+#include "sysdep.h"
+#include "dis-asm.h"
+#include "opcode/ppc.h"
+
+/* This file provides several disassembler functions, all of which use
+ the disassembler interface defined in dis-asm.h. Several functions
+ are provided because this file handles disassembly for the PowerPC
+ in both big and little endian mode and also for the POWER (RS/6000)
+ chip. */
+
+static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
+ int bigendian, int dialect));
+
+/* Print a big endian PowerPC instruction. For convenience, also
+ disassemble instructions supported by the Motorola PowerPC 601. */
+
+int
+print_insn_big_powerpc (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ return print_insn_powerpc (memaddr, info, 1,
+ PPC_OPCODE_PPC | PPC_OPCODE_601);
+}
+
+/* Print a little endian PowerPC instruction. For convenience, also
+ disassemble instructions supported by the Motorola PowerPC 601. */
+
+int
+print_insn_little_powerpc (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ return print_insn_powerpc (memaddr, info, 0,
+ PPC_OPCODE_PPC | PPC_OPCODE_601);
+}
+
+/* Print a POWER (RS/6000) instruction. */
+
+int
+print_insn_rs6000 (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_POWER);
+}
+
+/* Print a PowerPC or POWER instruction. */
+
+static int
+print_insn_powerpc (memaddr, info, bigendian, dialect)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+ int bigendian;
+ int dialect;
+{
+ bfd_byte buffer[4];
+ int status;
+ unsigned long insn;
+ const struct powerpc_opcode *opcode;
+ const struct powerpc_opcode *opcode_end;
+ unsigned long op;
+
+ status = (*info->read_memory_func) (memaddr, buffer, 4, info);
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, memaddr, info);
+ return -1;
+ }
+
+ if (bigendian)
+ insn = bfd_getb32 (buffer);
+ else
+ insn = bfd_getl32 (buffer);
+
+ /* Get the major opcode of the instruction. */
+ op = PPC_OP (insn);
+
+ /* Find the first match in the opcode table. We could speed this up
+ a bit by doing a binary search on the major opcode. */
+ opcode_end = powerpc_opcodes + powerpc_num_opcodes;
+ for (opcode = powerpc_opcodes; opcode < opcode_end; opcode++)
+ {
+ unsigned long table_op;
+ const unsigned char *opindex;
+ const struct powerpc_operand *operand;
+ int invalid;
+ int need_comma;
+ int need_paren;
+
+ table_op = PPC_OP (opcode->opcode);
+ if (op < table_op)
+ break;
+ if (op > table_op)
+ continue;
+
+ if ((insn & opcode->mask) != opcode->opcode
+ || (opcode->flags & dialect) == 0)
+ continue;
+
+ /* Make two passes over the operands. First see if any of them
+ have extraction functions, and, if they do, make sure the
+ instruction is valid. */
+ invalid = 0;
+ for (opindex = opcode->operands; *opindex != 0; opindex++)
+ {
+ operand = powerpc_operands + *opindex;
+ if (operand->extract)
+ (*operand->extract) (insn, &invalid);
+ }
+ if (invalid)
+ continue;
+
+ /* The instruction is valid. */
+ (*info->fprintf_func) (info->stream, "%s", opcode->name);
+ if (opcode->operands[0] != 0)
+ (*info->fprintf_func) (info->stream, "\t");
+
+ /* Now extract and print the operands. */
+ need_comma = 0;
+ need_paren = 0;
+ for (opindex = opcode->operands; *opindex != 0; opindex++)
+ {
+ long value;
+
+ operand = powerpc_operands + *opindex;
+
+ /* Operands that are marked FAKE are simply ignored. We
+ already made sure that the extract function considered
+ the instruction to be valid. */
+ if ((operand->flags & PPC_OPERAND_FAKE) != 0)
+ continue;
+
+ /* Extract the value from the instruction. */
+ if (operand->extract)
+ value = (*operand->extract) (insn, (int *) NULL);
+ else
+ {
+ value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0
+ && (value & (1 << (operand->bits - 1))) != 0)
+ value -= 1 << operand->bits;
+ }
+
+ /* If the operand is optional, and the value is zero, don't
+ print anything. */
+ if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
+ && (operand->flags & PPC_OPERAND_NEXT) == 0
+ && value == 0)
+ continue;
+
+ if (need_comma)
+ {
+ (*info->fprintf_func) (info->stream, ",");
+ need_comma = 0;
+ }
+
+ /* Print the operand as directed by the flags. */
+ if ((operand->flags & PPC_OPERAND_GPR) != 0)
+ (*info->fprintf_func) (info->stream, "r%ld", value);
+ else if ((operand->flags & PPC_OPERAND_FPR) != 0)
+ (*info->fprintf_func) (info->stream, "f%ld", value);
+ else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0)
+ (*info->print_address_func) (memaddr + value, info);
+ else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
+ (*info->print_address_func) ((bfd_vma) value & 0xffffffff, info);
+ else if ((operand->flags & PPC_OPERAND_CR) == 0
+ || (dialect & PPC_OPCODE_PPC) == 0)
+ (*info->fprintf_func) (info->stream, "%ld", value);
+ else
+ {
+ if (operand->bits == 3)
+ (*info->fprintf_func) (info->stream, "cr%d", value);
+ else
+ {
+ static const char *cbnames[4] = { "lt", "gt", "eq", "so" };
+ int cr;
+ int cc;
+
+ cr = value >> 2;
+ if (cr != 0)
+ (*info->fprintf_func) (info->stream, "4*cr%d", cr);
+ cc = value & 3;
+ if (cc != 0)
+ {
+ if (cr != 0)
+ (*info->fprintf_func) (info->stream, "+");
+ (*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
+ }
+ }
+ }
+
+ if (need_paren)
+ {
+ (*info->fprintf_func) (info->stream, ")");
+ need_paren = 0;
+ }
+
+ if ((operand->flags & PPC_OPERAND_PARENS) == 0)
+ need_comma = 1;
+ else
+ {
+ (*info->fprintf_func) (info->stream, "(");
+ need_paren = 1;
+ }
+ }
+
+ /* We have found and printed an instruction; return. */
+ return 4;
+ }
+
+ /* We could not find a match. */
+ (*info->fprintf_func) (info->stream, ".long 0x%lx", insn);
+
+ return 4;
+}
diff --git a/contrib/binutils/opcodes/ppc-opc.c b/contrib/binutils/opcodes/ppc-opc.c
new file mode 100644
index 0000000..02fb7a4
--- /dev/null
+++ b/contrib/binutils/opcodes/ppc-opc.c
@@ -0,0 +1,3124 @@
+/* ppc-opc.c -- PowerPC opcode list
+ Copyright (c) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support
+
+This file is part of GDB, GAS, and the GNU binutils.
+
+GDB, GAS, and the GNU binutils are free software; you can redistribute
+them and/or modify them 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.
+
+GDB, GAS, and the GNU binutils are distributed in the hope that they
+will be useful, but WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this file; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
+
+#include <stdio.h>
+#include "sysdep.h"
+#include "opcode/ppc.h"
+#include "opintl.h"
+
+/* This file holds the PowerPC opcode table. The opcode table
+ includes almost all of the extended instruction mnemonics. This
+ permits the disassembler to use them, and simplifies the assembler
+ logic, at the cost of increasing the table size. The table is
+ strictly constant data, so the compiler should be able to put it in
+ the .text section.
+
+ This file also holds the operand table. All knowledge about
+ inserting operands into instructions and vice-versa is kept in this
+ file. */
+
+/* Local insertion and extraction functions. */
+
+static unsigned long insert_bat PARAMS ((unsigned long, long, const char **));
+static long extract_bat PARAMS ((unsigned long, int *));
+static unsigned long insert_bba PARAMS ((unsigned long, long, const char **));
+static long extract_bba PARAMS ((unsigned long, int *));
+static unsigned long insert_bd PARAMS ((unsigned long, long, const char **));
+static long extract_bd PARAMS ((unsigned long, int *));
+static unsigned long insert_bdm PARAMS ((unsigned long, long, const char **));
+static long extract_bdm PARAMS ((unsigned long, int *));
+static unsigned long insert_bdp PARAMS ((unsigned long, long, const char **));
+static long extract_bdp PARAMS ((unsigned long, int *));
+static int valid_bo PARAMS ((long));
+static unsigned long insert_bo PARAMS ((unsigned long, long, const char **));
+static long extract_bo PARAMS ((unsigned long, int *));
+static unsigned long insert_boe PARAMS ((unsigned long, long, const char **));
+static long extract_boe PARAMS ((unsigned long, int *));
+static unsigned long insert_ds PARAMS ((unsigned long, long, const char **));
+static long extract_ds PARAMS ((unsigned long, int *));
+static unsigned long insert_li PARAMS ((unsigned long, long, const char **));
+static long extract_li PARAMS ((unsigned long, int *));
+static unsigned long insert_mbe PARAMS ((unsigned long, long, const char **));
+static long extract_mbe PARAMS ((unsigned long, int *));
+static unsigned long insert_mb6 PARAMS ((unsigned long, long, const char **));
+static long extract_mb6 PARAMS ((unsigned long, int *));
+static unsigned long insert_nb PARAMS ((unsigned long, long, const char **));
+static long extract_nb PARAMS ((unsigned long, int *));
+static unsigned long insert_nsi PARAMS ((unsigned long, long, const char **));
+static long extract_nsi PARAMS ((unsigned long, int *));
+static unsigned long insert_ral PARAMS ((unsigned long, long, const char **));
+static unsigned long insert_ram PARAMS ((unsigned long, long, const char **));
+static unsigned long insert_ras PARAMS ((unsigned long, long, const char **));
+static unsigned long insert_rbs PARAMS ((unsigned long, long, const char **));
+static long extract_rbs PARAMS ((unsigned long, int *));
+static unsigned long insert_sh6 PARAMS ((unsigned long, long, const char **));
+static long extract_sh6 PARAMS ((unsigned long, int *));
+static unsigned long insert_spr PARAMS ((unsigned long, long, const char **));
+static long extract_spr PARAMS ((unsigned long, int *));
+static unsigned long insert_tbr PARAMS ((unsigned long, long, const char **));
+static long extract_tbr PARAMS ((unsigned long, int *));
+
+/* The operands table.
+
+ The fields are bits, shift, insert, extract, flags.
+
+ We used to put parens around the various additions, like the one
+ for BA just below. However, that caused trouble with feeble
+ compilers with a limit on depth of a parenthesized expression, like
+ (reportedly) the compiler in Microsoft Developer Studio 5. So we
+ omit the parens, since the macros are never used in a context where
+ the addition will be ambiguous. */
+
+const struct powerpc_operand powerpc_operands[] =
+{
+ /* The zero index is used to indicate the end of the list of
+ operands. */
+#define UNUSED 0
+ { 0, 0, 0, 0, 0 },
+
+ /* The BA field in an XL form instruction. */
+#define BA UNUSED + 1
+#define BA_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_CR },
+
+ /* The BA field in an XL form instruction when it must be the same
+ as the BT field in the same instruction. */
+#define BAT BA + 1
+ { 5, 16, insert_bat, extract_bat, PPC_OPERAND_FAKE },
+
+ /* The BB field in an XL form instruction. */
+#define BB BAT + 1
+#define BB_MASK (0x1f << 11)
+ { 5, 11, 0, 0, PPC_OPERAND_CR },
+
+ /* The BB field in an XL form instruction when it must be the same
+ as the BA field in the same instruction. */
+#define BBA BB + 1
+ { 5, 11, insert_bba, extract_bba, PPC_OPERAND_FAKE },
+
+ /* The BD field in a B form instruction. The lower two bits are
+ forced to zero. */
+#define BD BBA + 1
+ { 16, 0, insert_bd, extract_bd, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when absolute addressing is
+ used. */
+#define BDA BD + 1
+ { 16, 0, insert_bd, extract_bd, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the - modifier is used.
+ This sets the y bit of the BO field appropriately. */
+#define BDM BDA + 1
+ { 16, 0, insert_bdm, extract_bdm,
+ PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the - modifier is used
+ and absolute address is used. */
+#define BDMA BDM + 1
+ { 16, 0, insert_bdm, extract_bdm,
+ PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the + modifier is used.
+ This sets the y bit of the BO field appropriately. */
+#define BDP BDMA + 1
+ { 16, 0, insert_bdp, extract_bdp,
+ PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the + modifier is used
+ and absolute addressing is used. */
+#define BDPA BDP + 1
+ { 16, 0, insert_bdp, extract_bdp,
+ PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The BF field in an X or XL form instruction. */
+#define BF BDPA + 1
+ { 3, 23, 0, 0, PPC_OPERAND_CR },
+
+ /* An optional BF field. This is used for comparison instructions,
+ in which an omitted BF field is taken as zero. */
+#define OBF BF + 1
+ { 3, 23, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+
+ /* The BFA field in an X or XL form instruction. */
+#define BFA OBF + 1
+ { 3, 18, 0, 0, PPC_OPERAND_CR },
+
+ /* The BI field in a B form or XL form instruction. */
+#define BI BFA + 1
+#define BI_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_CR },
+
+ /* The BO field in a B form instruction. Certain values are
+ illegal. */
+#define BO BI + 1
+#define BO_MASK (0x1f << 21)
+ { 5, 21, insert_bo, extract_bo, 0 },
+
+ /* The BO field in a B form instruction when the + or - modifier is
+ used. This is like the BO field, but it must be even. */
+#define BOE BO + 1
+ { 5, 21, insert_boe, extract_boe, 0 },
+
+ /* The BT field in an X or XL form instruction. */
+#define BT BOE + 1
+ { 5, 21, 0, 0, PPC_OPERAND_CR },
+
+ /* The condition register number portion of the BI field in a B form
+ or XL form instruction. This is used for the extended
+ conditional branch mnemonics, which set the lower two bits of the
+ BI field. This field is optional. */
+#define CR BT + 1
+ { 3, 18, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+
+ /* The D field in a D form instruction. This is a displacement off
+ a register, and implies that the next operand is a register in
+ parentheses. */
+#define D CR + 1
+ { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+
+ /* The DS field in a DS form instruction. This is like D, but the
+ lower two bits are forced to zero. */
+#define DS D + 1
+ { 16, 0, insert_ds, extract_ds, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+
+ /* The E field in a wrteei instruction. */
+#define E DS + 1
+ { 1, 15, 0, 0, 0 },
+
+ /* The FL1 field in a POWER SC form instruction. */
+#define FL1 E + 1
+ { 4, 12, 0, 0, 0 },
+
+ /* The FL2 field in a POWER SC form instruction. */
+#define FL2 FL1 + 1
+ { 3, 2, 0, 0, 0 },
+
+ /* The FLM field in an XFL form instruction. */
+#define FLM FL2 + 1
+ { 8, 17, 0, 0, 0 },
+
+ /* The FRA field in an X or A form instruction. */
+#define FRA FLM + 1
+#define FRA_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FRB field in an X or A form instruction. */
+#define FRB FRA + 1
+#define FRB_MASK (0x1f << 11)
+ { 5, 11, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FRC field in an A form instruction. */
+#define FRC FRB + 1
+#define FRC_MASK (0x1f << 6)
+ { 5, 6, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FRS field in an X form instruction or the FRT field in a D, X
+ or A form instruction. */
+#define FRS FRC + 1
+#define FRT FRS
+ { 5, 21, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FXM field in an XFX instruction. */
+#define FXM FRS + 1
+#define FXM_MASK (0xff << 12)
+ { 8, 12, 0, 0, 0 },
+
+ /* The L field in a D or X form instruction. */
+#define L FXM + 1
+ { 1, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+
+ /* The LEV field in a POWER SC form instruction. */
+#define LEV L + 1
+ { 7, 5, 0, 0, 0 },
+
+ /* The LI field in an I form instruction. The lower two bits are
+ forced to zero. */
+#define LI LEV + 1
+ { 26, 0, insert_li, extract_li, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The LI field in an I form instruction when used as an absolute
+ address. */
+#define LIA LI + 1
+ { 26, 0, insert_li, extract_li, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The MB field in an M form instruction. */
+#define MB LIA + 1
+#define MB_MASK (0x1f << 6)
+ { 5, 6, 0, 0, 0 },
+
+ /* The ME field in an M form instruction. */
+#define ME MB + 1
+#define ME_MASK (0x1f << 1)
+ { 5, 1, 0, 0, 0 },
+
+ /* The MB and ME fields in an M form instruction expressed a single
+ operand which is a bitmask indicating which bits to select. This
+ is a two operand form using PPC_OPERAND_NEXT. See the
+ description in opcode/ppc.h for what this means. */
+#define MBE ME + 1
+ { 5, 6, 0, 0, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
+ { 32, 0, insert_mbe, extract_mbe, 0 },
+
+ /* The MB or ME field in an MD or MDS form instruction. The high
+ bit is wrapped to the low end. */
+#define MB6 MBE + 2
+#define ME6 MB6
+#define MB6_MASK (0x3f << 5)
+ { 6, 5, insert_mb6, extract_mb6, 0 },
+
+ /* The NB field in an X form instruction. The value 32 is stored as
+ 0. */
+#define NB MB6 + 1
+ { 6, 11, insert_nb, extract_nb, 0 },
+
+ /* The NSI field in a D form instruction. This is the same as the
+ SI field, only negated. */
+#define NSI NB + 1
+ { 16, 0, insert_nsi, extract_nsi,
+ PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
+
+ /* The RA field in an D, DS, X, XO, M, or MDS form instruction. */
+#define RA NSI + 1
+#define RA_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_GPR },
+
+ /* The RA field in a D or X form instruction which is an updating
+ load, which means that the RA field may not be zero and may not
+ equal the RT field. */
+#define RAL RA + 1
+ { 5, 16, insert_ral, 0, PPC_OPERAND_GPR },
+
+ /* The RA field in an lmw instruction, which has special value
+ restrictions. */
+#define RAM RAL + 1
+ { 5, 16, insert_ram, 0, PPC_OPERAND_GPR },
+
+ /* The RA field in a D or X form instruction which is an updating
+ store or an updating floating point load, which means that the RA
+ field may not be zero. */
+#define RAS RAM + 1
+ { 5, 16, insert_ras, 0, PPC_OPERAND_GPR },
+
+ /* The RB field in an X, XO, M, or MDS form instruction. */
+#define RB RAS + 1
+#define RB_MASK (0x1f << 11)
+ { 5, 11, 0, 0, PPC_OPERAND_GPR },
+
+ /* The RB field in an X form instruction when it must be the same as
+ the RS field in the instruction. This is used for extended
+ mnemonics like mr. */
+#define RBS RB + 1
+ { 5, 1, insert_rbs, extract_rbs, PPC_OPERAND_FAKE },
+
+ /* The RS field in a D, DS, X, XFX, XS, M, MD or MDS form
+ instruction or the RT field in a D, DS, X, XFX or XO form
+ instruction. */
+#define RS RBS + 1
+#define RT RS
+#define RT_MASK (0x1f << 21)
+ { 5, 21, 0, 0, PPC_OPERAND_GPR },
+
+ /* The SH field in an X or M form instruction. */
+#define SH RS + 1
+#define SH_MASK (0x1f << 11)
+ { 5, 11, 0, 0, 0 },
+
+ /* The SH field in an MD form instruction. This is split. */
+#define SH6 SH + 1
+#define SH6_MASK ((0x1f << 11) | (1 << 1))
+ { 6, 1, insert_sh6, extract_sh6, 0 },
+
+ /* The SI field in a D form instruction. */
+#define SI SH6 + 1
+ { 16, 0, 0, 0, PPC_OPERAND_SIGNED },
+
+ /* The SI field in a D form instruction when we accept a wide range
+ of positive values. */
+#define SISIGNOPT SI + 1
+ { 16, 0, 0, 0, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
+
+ /* The SPR field in an XFX form instruction. This is flipped--the
+ lower 5 bits are stored in the upper 5 and vice- versa. */
+#define SPR SISIGNOPT + 1
+#define SPR_MASK (0x3ff << 11)
+ { 10, 11, insert_spr, extract_spr, 0 },
+
+ /* The BAT index number in an XFX form m[ft]ibat[lu] instruction. */
+#define SPRBAT SPR + 1
+#define SPRBAT_MASK (0x3 << 17)
+ { 2, 17, 0, 0, 0 },
+
+ /* The SPRG register number in an XFX form m[ft]sprg instruction. */
+#define SPRG SPRBAT + 1
+#define SPRG_MASK (0x3 << 16)
+ { 2, 16, 0, 0, 0 },
+
+ /* The SR field in an X form instruction. */
+#define SR SPRG + 1
+ { 4, 16, 0, 0, 0 },
+
+ /* The SV field in a POWER SC form instruction. */
+#define SV SR + 1
+ { 14, 2, 0, 0, 0 },
+
+ /* The TBR field in an XFX form instruction. This is like the SPR
+ field, but it is optional. */
+#define TBR SV + 1
+ { 10, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL },
+
+ /* The TO field in a D or X form instruction. */
+#define TO TBR + 1
+#define TO_MASK (0x1f << 21)
+ { 5, 21, 0, 0, 0 },
+
+ /* The U field in an X form instruction. */
+#define U TO + 1
+ { 4, 12, 0, 0, 0 },
+
+ /* The UI field in a D form instruction. */
+#define UI U + 1
+ { 16, 0, 0, 0, 0 },
+};
+
+/* The functions used to insert and extract complicated operands. */
+
+/* The BA field in an XL form instruction when it must be the same as
+ the BT field in the same instruction. This operand is marked FAKE.
+ The insertion function just copies the BT field into the BA field,
+ and the extraction function just checks that the fields are the
+ same. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bat (insn, value, errmsg)
+ unsigned long insn;
+ long value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | (((insn >> 21) & 0x1f) << 16);
+}
+
+static long
+extract_bat (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The BB field in an XL form instruction when it must be the same as
+ the BA field in the same instruction. This operand is marked FAKE.
+ The insertion function just copies the BA field into the BB field,
+ and the extraction function just checks that the fields are the
+ same. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bba (insn, value, errmsg)
+ unsigned long insn;
+ long value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | (((insn >> 16) & 0x1f) << 11);
+}
+
+static long
+extract_bba (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The BD field in a B form instruction. The lower two bits are
+ forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bd (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | (value & 0xfffc);
+}
+
+/*ARGSUSED*/
+static long
+extract_bd (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* The BD field in a B form instruction when the - modifier is used.
+ This modifier means that the branch is not expected to be taken.
+ We must set the y bit of the BO field to 1 if the offset is
+ negative. When extracting, we require that the y bit be 1 and that
+ the offset be positive, since if the y bit is 0 we just want to
+ print the normal form of the instruction. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bdm (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ if ((value & 0x8000) != 0)
+ insn |= 1 << 21;
+ return insn | (value & 0xfffc);
+}
+
+static long
+extract_bdm (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn & (1 << 21)) == 0
+ || (insn & (1 << 15)) == 0))
+ *invalid = 1;
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* The BD field in a B form instruction when the + modifier is used.
+ This is like BDM, above, except that the branch is expected to be
+ taken. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bdp (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ if ((value & 0x8000) == 0)
+ insn |= 1 << 21;
+ return insn | (value & 0xfffc);
+}
+
+static long
+extract_bdp (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn & (1 << 21)) == 0
+ || (insn & (1 << 15)) != 0))
+ *invalid = 1;
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* Check for legal values of a BO field. */
+
+static int
+valid_bo (value)
+ long value;
+{
+ /* Certain encodings have bits that are required to be zero. These
+ are (z must be zero, y may be anything):
+ 001zy
+ 011zy
+ 1z00y
+ 1z01y
+ 1z1zz
+ */
+ switch (value & 0x14)
+ {
+ default:
+ case 0:
+ return 1;
+ case 0x4:
+ return (value & 0x2) == 0;
+ case 0x10:
+ return (value & 0x8) == 0;
+ case 0x14:
+ return value == 0x14;
+ }
+}
+
+/* The BO field in a B form instruction. Warn about attempts to set
+ the field to an illegal value. */
+
+static unsigned long
+insert_bo (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (errmsg != (const char **) NULL
+ && ! valid_bo (value))
+ *errmsg = _("invalid conditional option");
+ return insn | ((value & 0x1f) << 21);
+}
+
+static long
+extract_bo (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long value;
+
+ value = (insn >> 21) & 0x1f;
+ if (invalid != (int *) NULL
+ && ! valid_bo (value))
+ *invalid = 1;
+ return value;
+}
+
+/* The BO field in a B form instruction when the + or - modifier is
+ used. This is like the BO field, but it must be even. When
+ extracting it, we force it to be even. */
+
+static unsigned long
+insert_boe (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (errmsg != (const char **) NULL)
+ {
+ if (! valid_bo (value))
+ *errmsg = _("invalid conditional option");
+ else if ((value & 1) != 0)
+ *errmsg = _("attempt to set y bit when using + or - modifier");
+ }
+ return insn | ((value & 0x1f) << 21);
+}
+
+static long
+extract_boe (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long value;
+
+ value = (insn >> 21) & 0x1f;
+ if (invalid != (int *) NULL
+ && ! valid_bo (value))
+ *invalid = 1;
+ return value & 0x1e;
+}
+
+/* The DS field in a DS form instruction. This is like D, but the
+ lower two bits are forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_ds (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | (value & 0xfffc);
+}
+
+/*ARGSUSED*/
+static long
+extract_ds (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* The LI field in an I form instruction. The lower two bits are
+ forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_li (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if ((value & 3) != 0 && errmsg != (const char **) NULL)
+ *errmsg = _("ignoring least significant bits in branch offset");
+ return insn | (value & 0x3fffffc);
+}
+
+/*ARGSUSED*/
+static long
+extract_li (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ if ((insn & 0x2000000) != 0)
+ return (insn & 0x3fffffc) - 0x4000000;
+ else
+ return insn & 0x3fffffc;
+}
+
+/* The MB and ME fields in an M form instruction expressed as a single
+ operand which is itself a bitmask. The extraction function always
+ marks it as invalid, since we never want to recognize an
+ instruction which uses a field of this type. */
+
+static unsigned long
+insert_mbe (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ unsigned long uval, mask;
+ int mb, me, mx, count, last;
+
+ uval = value;
+
+ if (uval == 0)
+ {
+ if (errmsg != (const char **) NULL)
+ *errmsg = _("illegal bitmask");
+ return insn;
+ }
+
+ mb = 0;
+ me = 32;
+ if ((uval & 1) != 0)
+ last = 1;
+ else
+ last = 0;
+ count = 0;
+
+ /* mb: location of last 0->1 transition */
+ /* me: location of last 1->0 transition */
+ /* count: # transitions */
+
+ for (mx = 0, mask = 1 << 31; mx < 32; ++mx, mask >>= 1)
+ {
+ if ((uval & mask) && !last)
+ {
+ ++count;
+ mb = mx;
+ last = 1;
+ }
+ else if (!(uval & mask) && last)
+ {
+ ++count;
+ me = mx;
+ last = 0;
+ }
+ }
+ if (me == 0)
+ me = 32;
+
+ if (count != 2 && (count != 0 || ! last))
+ {
+ if (errmsg != (const char **) NULL)
+ *errmsg = _("illegal bitmask");
+ }
+
+ return insn | (mb << 6) | ((me - 1) << 1);
+}
+
+static long
+extract_mbe (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long ret;
+ int mb, me;
+ int i;
+
+ if (invalid != (int *) NULL)
+ *invalid = 1;
+
+ mb = (insn >> 6) & 0x1f;
+ me = (insn >> 1) & 0x1f;
+ if (mb < me + 1)
+ {
+ ret = 0;
+ for (i = mb; i <= me; i++)
+ ret |= (long) 1 << (31 - i);
+ }
+ else if (mb == me + 1)
+ ret = ~0;
+ else /* (mb > me + 1) */
+ {
+ ret = ~ (long) 0;
+ for (i = me + 1; i < mb; i++)
+ ret &= ~ ((long) 1 << (31 - i));
+ }
+ return ret;
+}
+
+/* The MB or ME field in an MD or MDS form instruction. The high bit
+ is wrapped to the low end. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_mb6 (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | ((value & 0x1f) << 6) | (value & 0x20);
+}
+
+/*ARGSUSED*/
+static long
+extract_mb6 (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return ((insn >> 6) & 0x1f) | (insn & 0x20);
+}
+
+/* The NB field in an X form instruction. The value 32 is stored as
+ 0. */
+
+static unsigned long
+insert_nb (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value < 0 || value > 32)
+ *errmsg = _("value out of range");
+ if (value == 32)
+ value = 0;
+ return insn | ((value & 0x1f) << 11);
+}
+
+/*ARGSUSED*/
+static long
+extract_nb (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ long ret;
+
+ ret = (insn >> 11) & 0x1f;
+ if (ret == 0)
+ ret = 32;
+ return ret;
+}
+
+/* The NSI field in a D form instruction. This is the same as the SI
+ field, only negated. The extraction function always marks it as
+ invalid, since we never want to recognize an instruction which uses
+ a field of this type. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_nsi (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | ((- value) & 0xffff);
+}
+
+static long
+extract_nsi (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL)
+ *invalid = 1;
+ if ((insn & 0x8000) != 0)
+ return - ((long)(insn & 0xffff) - 0x10000);
+ else
+ return - (long)(insn & 0xffff);
+}
+
+/* The RA field in a D or X form instruction which is an updating
+ load, which means that the RA field may not be zero and may not
+ equal the RT field. */
+
+static unsigned long
+insert_ral (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value == 0
+ || (unsigned long) value == ((insn >> 21) & 0x1f))
+ *errmsg = "invalid register operand when updating";
+ return insn | ((value & 0x1f) << 16);
+}
+
+/* The RA field in an lmw instruction, which has special value
+ restrictions. */
+
+static unsigned long
+insert_ram (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if ((unsigned long) value >= ((insn >> 21) & 0x1f))
+ *errmsg = _("index register in load range");
+ return insn | ((value & 0x1f) << 16);
+}
+
+/* The RA field in a D or X form instruction which is an updating
+ store or an updating floating point load, which means that the RA
+ field may not be zero. */
+
+static unsigned long
+insert_ras (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value == 0)
+ *errmsg = _("invalid register operand when updating");
+ return insn | ((value & 0x1f) << 16);
+}
+
+/* The RB field in an X form instruction when it must be the same as
+ the RS field in the instruction. This is used for extended
+ mnemonics like mr. This operand is marked FAKE. The insertion
+ function just copies the BT field into the BA field, and the
+ extraction function just checks that the fields are the same. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_rbs (insn, value, errmsg)
+ unsigned long insn;
+ long value ATTRIBUTE_UNUSED;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | (((insn >> 21) & 0x1f) << 11);
+}
+
+static long
+extract_rbs (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The SH field in an MD form instruction. This is split. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_sh6 (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
+}
+
+/*ARGSUSED*/
+static long
+extract_sh6 (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20);
+}
+
+/* The SPR field in an XFX form instruction. This is flipped--the
+ lower 5 bits are stored in the upper 5 and vice- versa. */
+
+static unsigned long
+insert_spr (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
+}
+
+static long
+extract_spr (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
+}
+
+/* The TBR field in an XFX instruction. This is just like SPR, but it
+ is optional. When TBR is omitted, it must be inserted as 268 (the
+ magic number of the TB register). These functions treat 0
+ (indicating an omitted optional operand) as 268. This means that
+ ``mftb 4,0'' is not handled correctly. This does not matter very
+ much, since the architecture manual does not define mftb as
+ accepting any values other than 268 or 269. */
+
+#define TB (268)
+
+static unsigned long
+insert_tbr (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg ATTRIBUTE_UNUSED;
+{
+ if (value == 0)
+ value = TB;
+ return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
+}
+
+static long
+extract_tbr (insn, invalid)
+ unsigned long insn;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ long ret;
+
+ ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
+ if (ret == TB)
+ ret = 0;
+ return ret;
+}
+
+/* Macros used to form opcodes. */
+
+/* The main opcode. */
+#define OP(x) ((((unsigned long)(x)) & 0x3f) << 26)
+#define OP_MASK OP (0x3f)
+
+/* The main opcode combined with a trap code in the TO field of a D
+ form instruction. Used for extended mnemonics for the trap
+ instructions. */
+#define OPTO(x,to) (OP (x) | ((((unsigned long)(to)) & 0x1f) << 21))
+#define OPTO_MASK (OP_MASK | TO_MASK)
+
+/* The main opcode combined with a comparison size bit in the L field
+ of a D form or X form instruction. Used for extended mnemonics for
+ the comparison instructions. */
+#define OPL(x,l) (OP (x) | ((((unsigned long)(l)) & 1) << 21))
+#define OPL_MASK OPL (0x3f,1)
+
+/* An A form instruction. */
+#define A(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1) | (((unsigned long)(rc)) & 1))
+#define A_MASK A (0x3f, 0x1f, 1)
+
+/* An A_MASK with the FRB field fixed. */
+#define AFRB_MASK (A_MASK | FRB_MASK)
+
+/* An A_MASK with the FRC field fixed. */
+#define AFRC_MASK (A_MASK | FRC_MASK)
+
+/* An A_MASK with the FRA and FRC fields fixed. */
+#define AFRAFRC_MASK (A_MASK | FRA_MASK | FRC_MASK)
+
+/* A B form instruction. */
+#define B(op, aa, lk) (OP (op) | ((((unsigned long)(aa)) & 1) << 1) | ((lk) & 1))
+#define B_MASK B (0x3f, 1, 1)
+
+/* A B form instruction setting the BO field. */
+#define BBO(op, bo, aa, lk) (B ((op), (aa), (lk)) | ((((unsigned long)(bo)) & 0x1f) << 21))
+#define BBO_MASK BBO (0x3f, 0x1f, 1, 1)
+
+/* A BBO_MASK with the y bit of the BO field removed. This permits
+ matching a conditional branch regardless of the setting of the y
+ bit. */
+#define Y_MASK (((unsigned long)1) << 21)
+#define BBOY_MASK (BBO_MASK &~ Y_MASK)
+
+/* A B form instruction setting the BO field and the condition bits of
+ the BI field. */
+#define BBOCB(op, bo, cb, aa, lk) \
+ (BBO ((op), (bo), (aa), (lk)) | ((((unsigned long)(cb)) & 0x3) << 16))
+#define BBOCB_MASK BBOCB (0x3f, 0x1f, 0x3, 1, 1)
+
+/* A BBOCB_MASK with the y bit of the BO field removed. */
+#define BBOYCB_MASK (BBOCB_MASK &~ Y_MASK)
+
+/* A BBOYCB_MASK in which the BI field is fixed. */
+#define BBOYBI_MASK (BBOYCB_MASK | BI_MASK)
+
+/* The main opcode mask with the RA field clear. */
+#define DRA_MASK (OP_MASK | RA_MASK)
+
+/* A DS form instruction. */
+#define DSO(op, xop) (OP (op) | ((xop) & 0x3))
+#define DS_MASK DSO (0x3f, 3)
+
+/* An M form instruction. */
+#define M(op, rc) (OP (op) | ((rc) & 1))
+#define M_MASK M (0x3f, 1)
+
+/* An M form instruction with the ME field specified. */
+#define MME(op, me, rc) (M ((op), (rc)) | ((((unsigned long)(me)) & 0x1f) << 1))
+
+/* An M_MASK with the MB and ME fields fixed. */
+#define MMBME_MASK (M_MASK | MB_MASK | ME_MASK)
+
+/* An M_MASK with the SH and ME fields fixed. */
+#define MSHME_MASK (M_MASK | SH_MASK | ME_MASK)
+
+/* An MD form instruction. */
+#define MD(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x7) << 2) | ((rc) & 1))
+#define MD_MASK MD (0x3f, 0x7, 1)
+
+/* An MD_MASK with the MB field fixed. */
+#define MDMB_MASK (MD_MASK | MB6_MASK)
+
+/* An MD_MASK with the SH field fixed. */
+#define MDSH_MASK (MD_MASK | SH6_MASK)
+
+/* An MDS form instruction. */
+#define MDS(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0xf) << 1) | ((rc) & 1))
+#define MDS_MASK MDS (0x3f, 0xf, 1)
+
+/* An MDS_MASK with the MB field fixed. */
+#define MDSMB_MASK (MDS_MASK | MB6_MASK)
+
+/* An SC form instruction. */
+#define SC(op, sa, lk) (OP (op) | ((((unsigned long)(sa)) & 1) << 1) | ((lk) & 1))
+#define SC_MASK (OP_MASK | (((unsigned long)0x3ff) << 16) | (((unsigned long)1) << 1) | 1)
+
+/* An X form instruction. */
+#define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
+
+/* An X form instruction with the RC bit specified. */
+#define XRC(op, xop, rc) (X ((op), (xop)) | ((rc) & 1))
+
+/* The mask for an X form instruction. */
+#define X_MASK XRC (0x3f, 0x3ff, 1)
+
+/* An X_MASK with the RA field fixed. */
+#define XRA_MASK (X_MASK | RA_MASK)
+
+/* An X_MASK with the RB field fixed. */
+#define XRB_MASK (X_MASK | RB_MASK)
+
+/* An X_MASK with the RT field fixed. */
+#define XRT_MASK (X_MASK | RT_MASK)
+
+/* An X_MASK with the RA and RB fields fixed. */
+#define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
+
+/* An X_MASK with the RT and RA fields fixed. */
+#define XRTRA_MASK (X_MASK | RT_MASK | RA_MASK)
+
+/* An X form comparison instruction. */
+#define XCMPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21))
+
+/* The mask for an X form comparison instruction. */
+#define XCMP_MASK (X_MASK | (((unsigned long)1) << 22))
+
+/* The mask for an X form comparison instruction with the L field
+ fixed. */
+#define XCMPL_MASK (XCMP_MASK | (((unsigned long)1) << 21))
+
+/* An X form trap instruction with the TO field specified. */
+#define XTO(op, xop, to) (X ((op), (xop)) | ((((unsigned long)(to)) & 0x1f) << 21))
+#define XTO_MASK (X_MASK | TO_MASK)
+
+/* An XFL form instruction. */
+#define XFL(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1) | (((unsigned long)(rc)) & 1))
+#define XFL_MASK (XFL (0x3f, 0x3ff, 1) | (((unsigned long)1) << 25) | (((unsigned long)1) << 16))
+
+/* An XL form instruction with the LK field set to 0. */
+#define XL(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
+
+/* An XL form instruction which uses the LK field. */
+#define XLLK(op, xop, lk) (XL ((op), (xop)) | ((lk) & 1))
+
+/* The mask for an XL form instruction. */
+#define XL_MASK XLLK (0x3f, 0x3ff, 1)
+
+/* An XL form instruction which explicitly sets the BO field. */
+#define XLO(op, bo, xop, lk) \
+ (XLLK ((op), (xop), (lk)) | ((((unsigned long)(bo)) & 0x1f) << 21))
+#define XLO_MASK (XL_MASK | BO_MASK)
+
+/* An XL form instruction which explicitly sets the y bit of the BO
+ field. */
+#define XLYLK(op, xop, y, lk) (XLLK ((op), (xop), (lk)) | ((((unsigned long)(y)) & 1) << 21))
+#define XLYLK_MASK (XL_MASK | Y_MASK)
+
+/* An XL form instruction which sets the BO field and the condition
+ bits of the BI field. */
+#define XLOCB(op, bo, cb, xop, lk) \
+ (XLO ((op), (bo), (xop), (lk)) | ((((unsigned long)(cb)) & 3) << 16))
+#define XLOCB_MASK XLOCB (0x3f, 0x1f, 0x3, 0x3ff, 1)
+
+/* An XL_MASK or XLYLK_MASK or XLOCB_MASK with the BB field fixed. */
+#define XLBB_MASK (XL_MASK | BB_MASK)
+#define XLYBB_MASK (XLYLK_MASK | BB_MASK)
+#define XLBOCBBB_MASK (XLOCB_MASK | BB_MASK)
+
+/* An XL_MASK with the BO and BB fields fixed. */
+#define XLBOBB_MASK (XL_MASK | BO_MASK | BB_MASK)
+
+/* An XL_MASK with the BO, BI and BB fields fixed. */
+#define XLBOBIBB_MASK (XL_MASK | BO_MASK | BI_MASK | BB_MASK)
+
+/* An XO form instruction. */
+#define XO(op, xop, oe, rc) \
+ (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 1) | ((((unsigned long)(oe)) & 1) << 10) | (((unsigned long)(rc)) & 1))
+#define XO_MASK XO (0x3f, 0x1ff, 1, 1)
+
+/* An XO_MASK with the RB field fixed. */
+#define XORB_MASK (XO_MASK | RB_MASK)
+
+/* An XS form instruction. */
+#define XS(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 2) | (((unsigned long)(rc)) & 1))
+#define XS_MASK XS (0x3f, 0x1ff, 1)
+
+/* A mask for the FXM version of an XFX form instruction. */
+#define XFXFXM_MASK (X_MASK | (((unsigned long)1) << 20) | (((unsigned long)1) << 11))
+
+/* An XFX form instruction with the FXM field filled in. */
+#define XFXM(op, xop, fxm) \
+ (X ((op), (xop)) | ((((unsigned long)(fxm)) & 0xff) << 12))
+
+/* An XFX form instruction with the SPR field filled in. */
+#define XSPR(op, xop, spr) \
+ (X ((op), (xop)) | ((((unsigned long)(spr)) & 0x1f) << 16) | ((((unsigned long)(spr)) & 0x3e0) << 6))
+#define XSPR_MASK (X_MASK | SPR_MASK)
+
+/* An XFX form instruction with the SPR field filled in except for the
+ SPRBAT field. */
+#define XSPRBAT_MASK (XSPR_MASK &~ SPRBAT_MASK)
+
+/* An XFX form instruction with the SPR field filled in except for the
+ SPRG field. */
+#define XSPRG_MASK (XSPR_MASK &~ SPRG_MASK)
+
+/* An X form instruction with everything filled in except the E field. */
+#define XE_MASK (0xffff7fff)
+
+/* The BO encodings used in extended conditional branch mnemonics. */
+#define BODNZF (0x0)
+#define BODNZFP (0x1)
+#define BODZF (0x2)
+#define BODZFP (0x3)
+#define BOF (0x4)
+#define BOFP (0x5)
+#define BODNZT (0x8)
+#define BODNZTP (0x9)
+#define BODZT (0xa)
+#define BODZTP (0xb)
+#define BOT (0xc)
+#define BOTP (0xd)
+#define BODNZ (0x10)
+#define BODNZP (0x11)
+#define BODZ (0x12)
+#define BODZP (0x13)
+#define BOU (0x14)
+
+/* The BI condition bit encodings used in extended conditional branch
+ mnemonics. */
+#define CBLT (0)
+#define CBGT (1)
+#define CBEQ (2)
+#define CBSO (3)
+
+/* The TO encodings used in extended trap mnemonics. */
+#define TOLGT (0x1)
+#define TOLLT (0x2)
+#define TOEQ (0x4)
+#define TOLGE (0x5)
+#define TOLNL (0x5)
+#define TOLLE (0x6)
+#define TOLNG (0x6)
+#define TOGT (0x8)
+#define TOGE (0xc)
+#define TONL (0xc)
+#define TOLT (0x10)
+#define TOLE (0x14)
+#define TONG (0x14)
+#define TONE (0x18)
+#define TOU (0x1f)
+
+/* Smaller names for the flags so each entry in the opcodes table will
+ fit on a single line. */
+#undef PPC
+#define PPC PPC_OPCODE_PPC | PPC_OPCODE_ANY
+#define PPCCOM PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
+#define PPC32 PPC_OPCODE_PPC | PPC_OPCODE_32 | PPC_OPCODE_ANY
+#define PPC64 PPC_OPCODE_PPC | PPC_OPCODE_64 | PPC_OPCODE_ANY
+#define PPCONLY PPC_OPCODE_PPC
+#define PPC403 PPC
+#define PPC750 PPC
+#define PPC860 PPC
+#define POWER PPC_OPCODE_POWER | PPC_OPCODE_ANY
+#define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
+#define PPCPWR2 PPC_OPCODE_PPC | PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
+#define POWER32 PPC_OPCODE_POWER | PPC_OPCODE_ANY | PPC_OPCODE_32
+#define COM PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
+#define COM32 PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY | PPC_OPCODE_32
+#define M601 PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_ANY
+#define PWRCOM PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
+#define MFDEC1 PPC_OPCODE_POWER
+#define MFDEC2 PPC_OPCODE_PPC | PPC_OPCODE_601
+
+/* The opcode table.
+
+ The format of the opcode table is:
+
+ NAME OPCODE MASK FLAGS { OPERANDS }
+
+ NAME is the name of the instruction.
+ OPCODE is the instruction opcode.
+ MASK is the opcode mask; this is used to tell the disassembler
+ which bits in the actual opcode must match OPCODE.
+ FLAGS are flags indicated what processors support the instruction.
+ OPERANDS is the list of operands.
+
+ The disassembler reads the table in order and prints the first
+ instruction which matches, so this table is sorted to put more
+ specific instructions before more general instructions. It is also
+ sorted by major opcode. */
+
+const struct powerpc_opcode powerpc_opcodes[] = {
+{ "tdlgti", OPTO(2,TOLGT), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdllti", OPTO(2,TOLLT), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdeqi", OPTO(2,TOEQ), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdlgei", OPTO(2,TOLGE), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdlnli", OPTO(2,TOLNL), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdllei", OPTO(2,TOLLE), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdlngi", OPTO(2,TOLNG), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdgti", OPTO(2,TOGT), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdgei", OPTO(2,TOGE), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdnli", OPTO(2,TONL), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdlti", OPTO(2,TOLT), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdlei", OPTO(2,TOLE), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdngi", OPTO(2,TONG), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdnei", OPTO(2,TONE), OPTO_MASK, PPC64, { RA, SI } },
+{ "tdi", OP(2), OP_MASK, PPC64, { TO, RA, SI } },
+
+{ "twlgti", OPTO(3,TOLGT), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tlgti", OPTO(3,TOLGT), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twllti", OPTO(3,TOLLT), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tllti", OPTO(3,TOLLT), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "tweqi", OPTO(3,TOEQ), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "teqi", OPTO(3,TOEQ), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twlgei", OPTO(3,TOLGE), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tlgei", OPTO(3,TOLGE), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twlnli", OPTO(3,TOLNL), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tlnli", OPTO(3,TOLNL), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twllei", OPTO(3,TOLLE), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tllei", OPTO(3,TOLLE), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twlngi", OPTO(3,TOLNG), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tlngi", OPTO(3,TOLNG), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twgti", OPTO(3,TOGT), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tgti", OPTO(3,TOGT), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twgei", OPTO(3,TOGE), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tgei", OPTO(3,TOGE), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twnli", OPTO(3,TONL), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tnli", OPTO(3,TONL), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twlti", OPTO(3,TOLT), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tlti", OPTO(3,TOLT), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twlei", OPTO(3,TOLE), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tlei", OPTO(3,TOLE), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twngi", OPTO(3,TONG), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tngi", OPTO(3,TONG), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twnei", OPTO(3,TONE), OPTO_MASK, PPCCOM, { RA, SI } },
+{ "tnei", OPTO(3,TONE), OPTO_MASK, PWRCOM, { RA, SI } },
+{ "twi", OP(3), OP_MASK, PPCCOM, { TO, RA, SI } },
+{ "ti", OP(3), OP_MASK, PWRCOM, { TO, RA, SI } },
+
+{ "mulli", OP(7), OP_MASK, PPCCOM, { RT, RA, SI } },
+{ "muli", OP(7), OP_MASK, PWRCOM, { RT, RA, SI } },
+
+{ "subfic", OP(8), OP_MASK, PPCCOM, { RT, RA, SI } },
+{ "sfi", OP(8), OP_MASK, PWRCOM, { RT, RA, SI } },
+
+{ "dozi", OP(9), OP_MASK, M601, { RT, RA, SI } },
+
+{ "cmplwi", OPL(10,0), OPL_MASK, PPCCOM, { OBF, RA, UI } },
+{ "cmpldi", OPL(10,1), OPL_MASK, PPC64, { OBF, RA, UI } },
+{ "cmpli", OP(10), OP_MASK, PPCONLY, { BF, L, RA, UI } },
+{ "cmpli", OP(10), OP_MASK, PWRCOM, { BF, RA, UI } },
+
+{ "cmpwi", OPL(11,0), OPL_MASK, PPCCOM, { OBF, RA, SI } },
+{ "cmpdi", OPL(11,1), OPL_MASK, PPC64, { OBF, RA, SI } },
+{ "cmpi", OP(11), OP_MASK, PPCONLY, { BF, L, RA, SI } },
+{ "cmpi", OP(11), OP_MASK, PWRCOM, { BF, RA, SI } },
+
+{ "addic", OP(12), OP_MASK, PPCCOM, { RT, RA, SI } },
+{ "ai", OP(12), OP_MASK, PWRCOM, { RT, RA, SI } },
+{ "subic", OP(12), OP_MASK, PPCCOM, { RT, RA, NSI } },
+
+{ "addic.", OP(13), OP_MASK, PPCCOM, { RT, RA, SI } },
+{ "ai.", OP(13), OP_MASK, PWRCOM, { RT, RA, SI } },
+{ "subic.", OP(13), OP_MASK, PPCCOM, { RT, RA, NSI } },
+
+{ "li", OP(14), DRA_MASK, PPCCOM, { RT, SI } },
+{ "lil", OP(14), DRA_MASK, PWRCOM, { RT, SI } },
+{ "addi", OP(14), OP_MASK, PPCCOM, { RT, RA, SI } },
+{ "cal", OP(14), OP_MASK, PWRCOM, { RT, D, RA } },
+{ "subi", OP(14), OP_MASK, PPCCOM, { RT, RA, NSI } },
+{ "la", OP(14), OP_MASK, PPCCOM, { RT, D, RA } },
+
+{ "lis", OP(15), DRA_MASK, PPCCOM, { RT, SISIGNOPT } },
+{ "liu", OP(15), DRA_MASK, PWRCOM, { RT, SISIGNOPT } },
+{ "addis", OP(15), OP_MASK, PPCCOM, { RT,RA,SISIGNOPT } },
+{ "cau", OP(15), OP_MASK, PWRCOM, { RT,RA,SISIGNOPT } },
+{ "subis", OP(15), OP_MASK, PPCCOM, { RT, RA, NSI } },
+
+{ "bdnz-", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BDM } },
+{ "bdnz+", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BDP } },
+{ "bdnz", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM, { BD } },
+{ "bdn", BBO(16,BODNZ,0,0), BBOYBI_MASK, PWRCOM, { BD } },
+{ "bdnzl-", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BDM } },
+{ "bdnzl+", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BDP } },
+{ "bdnzl", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM, { BD } },
+{ "bdnl", BBO(16,BODNZ,0,1), BBOYBI_MASK, PWRCOM, { BD } },
+{ "bdnza-", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdnza+", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdnza", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM, { BDA } },
+{ "bdna", BBO(16,BODNZ,1,0), BBOYBI_MASK, PWRCOM, { BDA } },
+{ "bdnzla-", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdnzla+", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdnzla", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM, { BDA } },
+{ "bdnla", BBO(16,BODNZ,1,1), BBOYBI_MASK, PWRCOM, { BDA } },
+{ "bdz-", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC, { BDM } },
+{ "bdz+", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC, { BDP } },
+{ "bdz", BBO(16,BODZ,0,0), BBOYBI_MASK, COM, { BD } },
+{ "bdzl-", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC, { BDM } },
+{ "bdzl+", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC, { BDP } },
+{ "bdzl", BBO(16,BODZ,0,1), BBOYBI_MASK, COM, { BD } },
+{ "bdza-", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdza+", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdza", BBO(16,BODZ,1,0), BBOYBI_MASK, COM, { BDA } },
+{ "bdzla-", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdzla+", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdzla", BBO(16,BODZ,1,1), BBOYBI_MASK, COM, { BDA } },
+{ "blt-", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "blt+", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "blt", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bltl-", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bltl+", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bltl", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "blta-", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "blta+", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "blta", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bltla-", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bltla+", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bltla", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bgt-", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bgt+", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bgt", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgtl-", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bgtl+", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bgtl", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgta-", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgta+", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgta", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bgtla-", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgtla+", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgtla", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "beq-", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "beq+", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "beq", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "beql-", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "beql+", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "beql", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "beqa-", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "beqa+", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "beqa", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "beqla-", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "beqla+", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "beqla", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bso-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bso+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bso", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bsol-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bsol+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bsol", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bsoa-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bsoa+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bsoa", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bsola-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bsola+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bsola", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bun-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bun+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bun", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "bunl-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bunl+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bunl", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "buna-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "buna+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "buna", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bunla-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bunla+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bunla", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bge-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bge+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bge", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgel-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bgel+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bgel", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bgea-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgea+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgea", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bgela-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgela+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgela", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnl-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnl+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnl", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnll-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnll+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnll", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnla-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnla+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnla", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnlla-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnlla+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnlla", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "ble-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "ble+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "ble", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "blel-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "blel+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "blel", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "blea-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "blea+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "blea", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "blela-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "blela+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "blela", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bng-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bng+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bng", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bngl-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bngl+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bngl", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnga-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnga+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnga", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bngla-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bngla+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bngla", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bne-", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bne+", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bne", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnel-", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnel+", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnel", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnea-", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnea+", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnea", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnela-", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnela+", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnela", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bns-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bns+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bns", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnsl-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnsl+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnsl", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
+{ "bnsa-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnsa+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnsa", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnsla-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnsla+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnsla", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
+{ "bnu-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnu+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnu", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "bnul-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnul+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnul", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
+{ "bnua-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnua+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnua", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bnula-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnula+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnula", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
+{ "bdnzt-", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnzt+", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzt", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnztl", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzta", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnztla", BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bdnzf-", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnzf+", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzf", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzfl", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzfa", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzfla", BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bt-", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bt+", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bt", BBO(16,BOT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bbt", BBO(16,BOT,0,0), BBOY_MASK, PWRCOM, { BI, BD } },
+{ "btl-", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "btl+", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "btl", BBO(16,BOT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bbtl", BBO(16,BOT,0,1), BBOY_MASK, PWRCOM, { BI, BD } },
+{ "bta-", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bta+", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bta", BBO(16,BOT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bbta", BBO(16,BOT,1,0), BBOY_MASK, PWRCOM, { BI, BDA } },
+{ "btla-", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "btla+", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "btla", BBO(16,BOT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bbtla", BBO(16,BOT,1,1), BBOY_MASK, PWRCOM, { BI, BDA } },
+{ "bf-", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bf+", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bf", BBO(16,BOF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bbf", BBO(16,BOF,0,0), BBOY_MASK, PWRCOM, { BI, BD } },
+{ "bfl-", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bfl+", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bfl", BBO(16,BOF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bbfl", BBO(16,BOF,0,1), BBOY_MASK, PWRCOM, { BI, BD } },
+{ "bfa-", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bfa+", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bfa", BBO(16,BOF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bbfa", BBO(16,BOF,1,0), BBOY_MASK, PWRCOM, { BI, BDA } },
+{ "bfla-", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bfla+", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bfla", BBO(16,BOF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bbfla", BBO(16,BOF,1,1), BBOY_MASK, PWRCOM, { BI, BDA } },
+{ "bdzt-", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdzt+", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzt", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdztl-", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdztl+", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdztl", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdzta-", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdzta+", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzta", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdztla", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bdzf-", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdzf+", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzf", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdzfl-", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdzfl+", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzfl", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
+{ "bdzfa-", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdzfa+", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzfa", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzfla", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
+{ "bc-", B(16,0,0), B_MASK, PPC, { BOE, BI, BDM } },
+{ "bc+", B(16,0,0), B_MASK, PPC, { BOE, BI, BDP } },
+{ "bc", B(16,0,0), B_MASK, COM, { BO, BI, BD } },
+{ "bcl-", B(16,0,1), B_MASK, PPC, { BOE, BI, BDM } },
+{ "bcl+", B(16,0,1), B_MASK, PPC, { BOE, BI, BDP } },
+{ "bcl", B(16,0,1), B_MASK, COM, { BO, BI, BD } },
+{ "bca-", B(16,1,0), B_MASK, PPC, { BOE, BI, BDMA } },
+{ "bca+", B(16,1,0), B_MASK, PPC, { BOE, BI, BDPA } },
+{ "bca", B(16,1,0), B_MASK, COM, { BO, BI, BDA } },
+{ "bcla-", B(16,1,1), B_MASK, PPC, { BOE, BI, BDMA } },
+{ "bcla+", B(16,1,1), B_MASK, PPC, { BOE, BI, BDPA } },
+{ "bcla", B(16,1,1), B_MASK, COM, { BO, BI, BDA } },
+
+{ "sc", SC(17,1,0), 0xffffffff, PPC, { 0 } },
+{ "svc", SC(17,0,0), SC_MASK, POWER, { LEV, FL1, FL2 } },
+{ "svcl", SC(17,0,1), SC_MASK, POWER, { LEV, FL1, FL2 } },
+{ "svca", SC(17,1,0), SC_MASK, PWRCOM, { SV } },
+{ "svcla", SC(17,1,1), SC_MASK, POWER, { SV } },
+
+{ "b", B(18,0,0), B_MASK, COM, { LI } },
+{ "bl", B(18,0,1), B_MASK, COM, { LI } },
+{ "ba", B(18,1,0), B_MASK, COM, { LIA } },
+{ "bla", B(18,1,1), B_MASK, COM, { LIA } },
+
+{ "mcrf", XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM, { BF, BFA } },
+
+{ "blr", XLO(19,BOU,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "br", XLO(19,BOU,16,0), XLBOBIBB_MASK, PWRCOM, { 0 } },
+{ "blrl", XLO(19,BOU,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "brl", XLO(19,BOU,16,1), XLBOBIBB_MASK, PWRCOM, { 0 } },
+{ "bdnzlr", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlrl", XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlr", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlrl", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bltlr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bltlrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bgtlr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtlr-", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bgtlrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "beqlr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqlr-", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "beqlrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bsolr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsolr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsor", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bsolrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsorl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bunlr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunlr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bger", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bgelrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgerl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnllr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnllr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnllrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "blelr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blelr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bler", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "blelrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blerl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnglr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnglr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnglrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnelr", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnelr-", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bner", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnelrl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnerl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnslr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnslr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnslrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
+{ "bnulr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnulr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "btlr", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bbtr", XLO(19,BOT,16,0), XLBOBB_MASK, PWRCOM, { BI } },
+{ "btlrl", XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btlrl-", XLO(19,BOT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bbtrl", XLO(19,BOT,16,1), XLBOBB_MASK, PWRCOM, { BI } },
+{ "bflr", XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bflr-", XLO(19,BOF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bbfr", XLO(19,BOF,16,0), XLBOBB_MASK, PWRCOM, { BI } },
+{ "bflrl", XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bflrl-", XLO(19,BOF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bbfrl", XLO(19,BOF,16,1), XLBOBB_MASK, PWRCOM, { BI } },
+{ "bdnztlr", XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnztlr-",XLO(19,BODNZT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlrl",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflr", XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflrl",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlr", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlrl", XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflr", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bclr", XLLK(19,16,0), XLYBB_MASK, PPCCOM, { BO, BI } },
+{ "bclrl", XLLK(19,16,1), XLYBB_MASK, PPCCOM, { BO, BI } },
+{ "bclr+", XLYLK(19,16,1,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bclrl+", XLYLK(19,16,1,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bclr-", XLYLK(19,16,0,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bclrl-", XLYLK(19,16,0,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcr", XLLK(19,16,0), XLBB_MASK, PWRCOM, { BO, BI } },
+{ "bcrl", XLLK(19,16,1), XLBB_MASK, PWRCOM, { BO, BI } },
+
+{ "crnot", XL(19,33), XL_MASK, PPCCOM, { BT, BA, BBA } },
+{ "crnor", XL(19,33), XL_MASK, COM, { BT, BA, BB } },
+
+{ "rfi", XL(19,50), 0xffffffff, COM, { 0 } },
+{ "rfci", XL(19,51), 0xffffffff, PPC, { 0 } },
+
+{ "rfsvc", XL(19,82), 0xffffffff, POWER, { 0 } },
+
+{ "crandc", XL(19,129), XL_MASK, COM, { BT, BA, BB } },
+
+{ "isync", XL(19,150), 0xffffffff, PPCCOM, { 0 } },
+{ "ics", XL(19,150), 0xffffffff, PWRCOM, { 0 } },
+
+{ "crclr", XL(19,193), XL_MASK, PPCCOM, { BT, BAT, BBA } },
+{ "crxor", XL(19,193), XL_MASK, COM, { BT, BA, BB } },
+
+{ "crnand", XL(19,225), XL_MASK, COM, { BT, BA, BB } },
+
+{ "crand", XL(19,257), XL_MASK, COM, { BT, BA, BB } },
+
+{ "crset", XL(19,289), XL_MASK, PPCCOM, { BT, BAT, BBA } },
+{ "creqv", XL(19,289), XL_MASK, COM, { BT, BA, BB } },
+
+{ "crorc", XL(19,417), XL_MASK, COM, { BT, BA, BB } },
+
+{ "crmove", XL(19,449), XL_MASK, PPCCOM, { BT, BA, BBA } },
+{ "cror", XL(19,449), XL_MASK, COM, { BT, BA, BB } },
+
+{ "bctr", XLO(19,BOU,528,0), XLBOBIBB_MASK, COM, { 0 } },
+{ "bctrl", XLO(19,BOU,528,1), XLBOBIBB_MASK, COM, { 0 } },
+{ "bltctr", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltctr-", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctrl", XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctr", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctrl", XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctr", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctrl", XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectr", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectrl", XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "btctr", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "btctrl", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bfctr", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "bfctrl", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPCCOM, { BO, BI } },
+{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctr+", XLYLK(19,528,1,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctrl", XLLK(19,528,1), XLYBB_MASK, PPCCOM, { BO, BI } },
+{ "bcctrl-", XLYLK(19,528,0,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcc", XLLK(19,528,0), XLBB_MASK, PWRCOM, { BO, BI } },
+{ "bccl", XLLK(19,528,1), XLBB_MASK, PWRCOM, { BO, BI } },
+
+{ "rlwimi", M(20,0), M_MASK, PPCCOM, { RA,RS,SH,MBE,ME } },
+{ "rlimi", M(20,0), M_MASK, PWRCOM, { RA,RS,SH,MBE,ME } },
+
+{ "rlwimi.", M(20,1), M_MASK, PPCCOM, { RA,RS,SH,MBE,ME } },
+{ "rlimi.", M(20,1), M_MASK, PWRCOM, { RA,RS,SH,MBE,ME } },
+
+{ "rotlwi", MME(21,31,0), MMBME_MASK, PPCCOM, { RA, RS, SH } },
+{ "clrlwi", MME(21,31,0), MSHME_MASK, PPCCOM, { RA, RS, MB } },
+{ "rlwinm", M(21,0), M_MASK, PPCCOM, { RA,RS,SH,MBE,ME } },
+{ "rlinm", M(21,0), M_MASK, PWRCOM, { RA,RS,SH,MBE,ME } },
+{ "rotlwi.", MME(21,31,1), MMBME_MASK, PPCCOM, { RA,RS,SH } },
+{ "clrlwi.", MME(21,31,1), MSHME_MASK, PPCCOM, { RA, RS, MB } },
+{ "rlwinm.", M(21,1), M_MASK, PPCCOM, { RA,RS,SH,MBE,ME } },
+{ "rlinm.", M(21,1), M_MASK, PWRCOM, { RA,RS,SH,MBE,ME } },
+
+{ "rlmi", M(22,0), M_MASK, M601, { RA,RS,RB,MBE,ME } },
+{ "rlmi.", M(22,1), M_MASK, M601, { RA,RS,RB,MBE,ME } },
+
+{ "rotlw", MME(23,31,0), MMBME_MASK, PPCCOM, { RA, RS, RB } },
+{ "rlwnm", M(23,0), M_MASK, PPCCOM, { RA,RS,RB,MBE,ME } },
+{ "rlnm", M(23,0), M_MASK, PWRCOM, { RA,RS,RB,MBE,ME } },
+{ "rotlw.", MME(23,31,1), MMBME_MASK, PPCCOM, { RA, RS, RB } },
+{ "rlwnm.", M(23,1), M_MASK, PPCCOM, { RA,RS,RB,MBE,ME } },
+{ "rlnm.", M(23,1), M_MASK, PWRCOM, { RA,RS,RB,MBE,ME } },
+
+{ "nop", OP(24), 0xffffffff, PPCCOM, { 0 } },
+{ "ori", OP(24), OP_MASK, PPCCOM, { RA, RS, UI } },
+{ "oril", OP(24), OP_MASK, PWRCOM, { RA, RS, UI } },
+
+{ "oris", OP(25), OP_MASK, PPCCOM, { RA, RS, UI } },
+{ "oriu", OP(25), OP_MASK, PWRCOM, { RA, RS, UI } },
+
+{ "xori", OP(26), OP_MASK, PPCCOM, { RA, RS, UI } },
+{ "xoril", OP(26), OP_MASK, PWRCOM, { RA, RS, UI } },
+
+{ "xoris", OP(27), OP_MASK, PPCCOM, { RA, RS, UI } },
+{ "xoriu", OP(27), OP_MASK, PWRCOM, { RA, RS, UI } },
+
+{ "andi.", OP(28), OP_MASK, PPCCOM, { RA, RS, UI } },
+{ "andil.", OP(28), OP_MASK, PWRCOM, { RA, RS, UI } },
+
+{ "andis.", OP(29), OP_MASK, PPCCOM, { RA, RS, UI } },
+{ "andiu.", OP(29), OP_MASK, PWRCOM, { RA, RS, UI } },
+
+{ "rotldi", MD(30,0,0), MDMB_MASK, PPC64, { RA, RS, SH6 } },
+{ "clrldi", MD(30,0,0), MDSH_MASK, PPC64, { RA, RS, MB6 } },
+{ "rldicl", MD(30,0,0), MD_MASK, PPC64, { RA, RS, SH6, MB6 } },
+{ "rotldi.", MD(30,0,1), MDMB_MASK, PPC64, { RA, RS, SH6 } },
+{ "clrldi.", MD(30,0,1), MDSH_MASK, PPC64, { RA, RS, MB6 } },
+{ "rldicl.", MD(30,0,1), MD_MASK, PPC64, { RA, RS, SH6, MB6 } },
+
+{ "rldicr", MD(30,1,0), MD_MASK, PPC64, { RA, RS, SH6, ME6 } },
+{ "rldicr.", MD(30,1,1), MD_MASK, PPC64, { RA, RS, SH6, ME6 } },
+
+{ "rldic", MD(30,2,0), MD_MASK, PPC64, { RA, RS, SH6, MB6 } },
+{ "rldic.", MD(30,2,1), MD_MASK, PPC64, { RA, RS, SH6, MB6 } },
+
+{ "rldimi", MD(30,3,0), MD_MASK, PPC64, { RA, RS, SH6, MB6 } },
+{ "rldimi.", MD(30,3,1), MD_MASK, PPC64, { RA, RS, SH6, MB6 } },
+
+{ "rotld", MDS(30,8,0), MDSMB_MASK, PPC64, { RA, RS, RB } },
+{ "rldcl", MDS(30,8,0), MDS_MASK, PPC64, { RA, RS, RB, MB6 } },
+{ "rotld.", MDS(30,8,1), MDSMB_MASK, PPC64, { RA, RS, RB } },
+{ "rldcl.", MDS(30,8,1), MDS_MASK, PPC64, { RA, RS, RB, MB6 } },
+
+{ "rldcr", MDS(30,9,0), MDS_MASK, PPC64, { RA, RS, RB, ME6 } },
+{ "rldcr.", MDS(30,9,1), MDS_MASK, PPC64, { RA, RS, RB, ME6 } },
+
+{ "cmpw", XCMPL(31,0,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
+{ "cmpd", XCMPL(31,0,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
+{ "cmp", X(31,0), XCMP_MASK, PPCONLY, { BF, L, RA, RB } },
+{ "cmp", X(31,0), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
+
+{ "twlgt", XTO(31,4,TOLGT), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tlgt", XTO(31,4,TOLGT), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twllt", XTO(31,4,TOLLT), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tllt", XTO(31,4,TOLLT), XTO_MASK, PWRCOM, { RA, RB } },
+{ "tweq", XTO(31,4,TOEQ), XTO_MASK, PPCCOM, { RA, RB } },
+{ "teq", XTO(31,4,TOEQ), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twlge", XTO(31,4,TOLGE), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tlge", XTO(31,4,TOLGE), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twlnl", XTO(31,4,TOLNL), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tlnl", XTO(31,4,TOLNL), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twlle", XTO(31,4,TOLLE), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tlle", XTO(31,4,TOLLE), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twlng", XTO(31,4,TOLNG), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tlng", XTO(31,4,TOLNG), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twgt", XTO(31,4,TOGT), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tgt", XTO(31,4,TOGT), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twge", XTO(31,4,TOGE), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tge", XTO(31,4,TOGE), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twnl", XTO(31,4,TONL), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tnl", XTO(31,4,TONL), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twlt", XTO(31,4,TOLT), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tlt", XTO(31,4,TOLT), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twle", XTO(31,4,TOLE), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tle", XTO(31,4,TOLE), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twng", XTO(31,4,TONG), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tng", XTO(31,4,TONG), XTO_MASK, PWRCOM, { RA, RB } },
+{ "twne", XTO(31,4,TONE), XTO_MASK, PPCCOM, { RA, RB } },
+{ "tne", XTO(31,4,TONE), XTO_MASK, PWRCOM, { RA, RB } },
+{ "trap", XTO(31,4,TOU), 0xffffffff, PPCCOM, { 0 } },
+{ "tw", X(31,4), X_MASK, PPCCOM, { TO, RA, RB } },
+{ "t", X(31,4), X_MASK, PWRCOM, { TO, RA, RB } },
+
+{ "subfc", XO(31,8,0,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sf", XO(31,8,0,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subc", XO(31,8,0,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfc.", XO(31,8,0,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sf.", XO(31,8,0,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subc.", XO(31,8,0,1), XO_MASK, PPCCOM, { RT, RB, RA } },
+{ "subfco", XO(31,8,1,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sfo", XO(31,8,1,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subco", XO(31,8,1,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfco.", XO(31,8,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sfo.", XO(31,8,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subco.", XO(31,8,1,1), XO_MASK, PPC, { RT, RB, RA } },
+
+{ "mulhdu", XO(31,9,0,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "mulhdu.", XO(31,9,0,1), XO_MASK, PPC64, { RT, RA, RB } },
+
+{ "addc", XO(31,10,0,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "a", XO(31,10,0,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addc.", XO(31,10,0,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "a.", XO(31,10,0,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addco", XO(31,10,1,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "ao", XO(31,10,1,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addco.", XO(31,10,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "ao.", XO(31,10,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "mulhwu", XO(31,11,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "mulhwu.", XO(31,11,0,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "mfcr", X(31,19), XRARB_MASK, COM, { RT } },
+
+{ "lwarx", X(31,20), X_MASK, PPC, { RT, RA, RB } },
+
+{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA, RB } },
+
+{ "lwzx", X(31,23), X_MASK, PPCCOM, { RT, RA, RB } },
+{ "lx", X(31,23), X_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "slw", XRC(31,24,0), X_MASK, PPCCOM, { RA, RS, RB } },
+{ "sl", XRC(31,24,0), X_MASK, PWRCOM, { RA, RS, RB } },
+{ "slw.", XRC(31,24,1), X_MASK, PPCCOM, { RA, RS, RB } },
+{ "sl.", XRC(31,24,1), X_MASK, PWRCOM, { RA, RS, RB } },
+
+{ "cntlzw", XRC(31,26,0), XRB_MASK, PPCCOM, { RA, RS } },
+{ "cntlz", XRC(31,26,0), XRB_MASK, PWRCOM, { RA, RS } },
+{ "cntlzw.", XRC(31,26,1), XRB_MASK, PPCCOM, { RA, RS } },
+{ "cntlz.", XRC(31,26,1), XRB_MASK, PWRCOM, { RA, RS } },
+
+{ "sld", XRC(31,27,0), X_MASK, PPC64, { RA, RS, RB } },
+{ "sld.", XRC(31,27,1), X_MASK, PPC64, { RA, RS, RB } },
+
+{ "and", XRC(31,28,0), X_MASK, COM, { RA, RS, RB } },
+{ "and.", XRC(31,28,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "maskg", XRC(31,29,0), X_MASK, M601, { RA, RS, RB } },
+{ "maskg.", XRC(31,29,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "cmplw", XCMPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
+{ "cmpld", XCMPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
+{ "cmpl", X(31,32), XCMP_MASK, PPCONLY, { BF, L, RA, RB } },
+{ "cmpl", X(31,32), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
+
+{ "subf", XO(31,40,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "sub", XO(31,40,0,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subf.", XO(31,40,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "sub.", XO(31,40,0,1), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfo", XO(31,40,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "subo", XO(31,40,1,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfo.", XO(31,40,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "subo.", XO(31,40,1,1), XO_MASK, PPC, { RT, RB, RA } },
+
+{ "ldux", X(31,53), X_MASK, PPC64, { RT, RAL, RB } },
+
+{ "dcbst", X(31,54), XRT_MASK, PPC, { RA, RB } },
+
+{ "lwzux", X(31,55), X_MASK, PPCCOM, { RT, RAL, RB } },
+{ "lux", X(31,55), X_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "cntlzd", XRC(31,58,0), XRB_MASK, PPC64, { RA, RS } },
+{ "cntlzd.", XRC(31,58,1), XRB_MASK, PPC64, { RA, RS } },
+
+{ "andc", XRC(31,60,0), X_MASK, COM, { RA, RS, RB } },
+{ "andc.", XRC(31,60,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "tdlgt", XTO(31,68,TOLGT), XTO_MASK, PPC64, { RA, RB } },
+{ "tdllt", XTO(31,68,TOLLT), XTO_MASK, PPC64, { RA, RB } },
+{ "tdeq", XTO(31,68,TOEQ), XTO_MASK, PPC64, { RA, RB } },
+{ "tdlge", XTO(31,68,TOLGE), XTO_MASK, PPC64, { RA, RB } },
+{ "tdlnl", XTO(31,68,TOLNL), XTO_MASK, PPC64, { RA, RB } },
+{ "tdlle", XTO(31,68,TOLLE), XTO_MASK, PPC64, { RA, RB } },
+{ "tdlng", XTO(31,68,TOLNG), XTO_MASK, PPC64, { RA, RB } },
+{ "tdgt", XTO(31,68,TOGT), XTO_MASK, PPC64, { RA, RB } },
+{ "tdge", XTO(31,68,TOGE), XTO_MASK, PPC64, { RA, RB } },
+{ "tdnl", XTO(31,68,TONL), XTO_MASK, PPC64, { RA, RB } },
+{ "tdlt", XTO(31,68,TOLT), XTO_MASK, PPC64, { RA, RB } },
+{ "tdle", XTO(31,68,TOLE), XTO_MASK, PPC64, { RA, RB } },
+{ "tdng", XTO(31,68,TONG), XTO_MASK, PPC64, { RA, RB } },
+{ "tdne", XTO(31,68,TONE), XTO_MASK, PPC64, { RA, RB } },
+{ "td", X(31,68), X_MASK, PPC64, { TO, RA, RB } },
+
+{ "mulhd", XO(31,73,0,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "mulhd.", XO(31,73,0,1), XO_MASK, PPC64, { RT, RA, RB } },
+
+{ "mulhw", XO(31,75,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "mulhw.", XO(31,75,0,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "mfmsr", X(31,83), XRARB_MASK, COM, { RT } },
+
+{ "ldarx", X(31,84), X_MASK, PPC64, { RT, RA, RB } },
+
+{ "dcbf", X(31,86), XRT_MASK, PPC, { RA, RB } },
+
+{ "lbzx", X(31,87), X_MASK, COM, { RT, RA, RB } },
+
+{ "neg", XO(31,104,0,0), XORB_MASK, COM, { RT, RA } },
+{ "neg.", XO(31,104,0,1), XORB_MASK, COM, { RT, RA } },
+{ "nego", XO(31,104,1,0), XORB_MASK, COM, { RT, RA } },
+{ "nego.", XO(31,104,1,1), XORB_MASK, COM, { RT, RA } },
+
+{ "mul", XO(31,107,0,0), XO_MASK, M601, { RT, RA, RB } },
+{ "mul.", XO(31,107,0,1), XO_MASK, M601, { RT, RA, RB } },
+{ "mulo", XO(31,107,1,0), XO_MASK, M601, { RT, RA, RB } },
+{ "mulo.", XO(31,107,1,1), XO_MASK, M601, { RT, RA, RB } },
+
+{ "clf", X(31,118), XRB_MASK, POWER, { RT, RA } },
+
+{ "lbzux", X(31,119), X_MASK, COM, { RT, RAL, RB } },
+
+{ "not", XRC(31,124,0), X_MASK, COM, { RA, RS, RBS } },
+{ "nor", XRC(31,124,0), X_MASK, COM, { RA, RS, RB } },
+{ "not.", XRC(31,124,1), X_MASK, COM, { RA, RS, RBS } },
+{ "nor.", XRC(31,124,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "wrtee", X(31,131), XRARB_MASK, PPC403, { RS } },
+
+{ "subfe", XO(31,136,0,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sfe", XO(31,136,0,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subfe.", XO(31,136,0,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sfe.", XO(31,136,0,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subfeo", XO(31,136,1,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sfeo", XO(31,136,1,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "subfeo.", XO(31,136,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "sfeo.", XO(31,136,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "adde", XO(31,138,0,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "ae", XO(31,138,0,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "adde.", XO(31,138,0,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "ae.", XO(31,138,0,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addeo", XO(31,138,1,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "aeo", XO(31,138,1,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addeo.", XO(31,138,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "aeo.", XO(31,138,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "mtcr", XFXM(31,144,0xff), XFXFXM_MASK|FXM_MASK, COM, { RS }},
+{ "mtcrf", X(31,144), XFXFXM_MASK, COM, { FXM, RS } },
+
+{ "mtmsr", X(31,146), XRARB_MASK, COM, { RS } },
+
+{ "stdx", X(31,149), X_MASK, PPC64, { RS, RA, RB } },
+
+{ "stwcx.", XRC(31,150,1), X_MASK, PPC, { RS, RA, RB } },
+
+{ "stwx", X(31,151), X_MASK, PPCCOM, { RS, RA, RB } },
+{ "stx", X(31,151), X_MASK, PWRCOM, { RS, RA, RB } },
+
+{ "slq", XRC(31,152,0), X_MASK, M601, { RA, RS, RB } },
+{ "slq.", XRC(31,152,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "sle", XRC(31,153,0), X_MASK, M601, { RA, RS, RB } },
+{ "sle.", XRC(31,153,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "wrteei", X(31,163), XE_MASK, PPC403, { E } },
+
+{ "stdux", X(31,181), X_MASK, PPC64, { RS, RAS, RB } },
+
+{ "stwux", X(31,183), X_MASK, PPCCOM, { RS, RAS, RB } },
+{ "stux", X(31,183), X_MASK, PWRCOM, { RS, RA, RB } },
+
+{ "sliq", XRC(31,184,0), X_MASK, M601, { RA, RS, SH } },
+{ "sliq.", XRC(31,184,1), X_MASK, M601, { RA, RS, SH } },
+
+{ "subfze", XO(31,200,0,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfze", XO(31,200,0,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "subfze.", XO(31,200,0,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfze.", XO(31,200,0,1), XORB_MASK, PWRCOM, { RT, RA } },
+{ "subfzeo", XO(31,200,1,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfzeo", XO(31,200,1,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "subfzeo.",XO(31,200,1,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfzeo.", XO(31,200,1,1), XORB_MASK, PWRCOM, { RT, RA } },
+
+{ "addze", XO(31,202,0,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "aze", XO(31,202,0,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "addze.", XO(31,202,0,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "aze.", XO(31,202,0,1), XORB_MASK, PWRCOM, { RT, RA } },
+{ "addzeo", XO(31,202,1,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "azeo", XO(31,202,1,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "addzeo.", XO(31,202,1,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "azeo.", XO(31,202,1,1), XORB_MASK, PWRCOM, { RT, RA } },
+
+{ "mtsr", X(31,210), XRB_MASK|(1<<20), COM32, { SR, RS } },
+
+{ "stdcx.", XRC(31,214,1), X_MASK, PPC64, { RS, RA, RB } },
+
+{ "stbx", X(31,215), X_MASK, COM, { RS, RA, RB } },
+
+{ "sllq", XRC(31,216,0), X_MASK, M601, { RA, RS, RB } },
+{ "sllq.", XRC(31,216,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "sleq", XRC(31,217,0), X_MASK, M601, { RA, RS, RB } },
+{ "sleq.", XRC(31,217,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "subfme", XO(31,232,0,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfme", XO(31,232,0,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "subfme.", XO(31,232,0,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfme.", XO(31,232,0,1), XORB_MASK, PWRCOM, { RT, RA } },
+{ "subfmeo", XO(31,232,1,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfmeo", XO(31,232,1,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "subfmeo.",XO(31,232,1,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "sfmeo.", XO(31,232,1,1), XORB_MASK, PWRCOM, { RT, RA } },
+
+{ "mulld", XO(31,233,0,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "mulld.", XO(31,233,0,1), XO_MASK, PPC64, { RT, RA, RB } },
+{ "mulldo", XO(31,233,1,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "mulldo.", XO(31,233,1,1), XO_MASK, PPC64, { RT, RA, RB } },
+
+{ "addme", XO(31,234,0,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "ame", XO(31,234,0,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "addme.", XO(31,234,0,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "ame.", XO(31,234,0,1), XORB_MASK, PWRCOM, { RT, RA } },
+{ "addmeo", XO(31,234,1,0), XORB_MASK, PPCCOM, { RT, RA } },
+{ "ameo", XO(31,234,1,0), XORB_MASK, PWRCOM, { RT, RA } },
+{ "addmeo.", XO(31,234,1,1), XORB_MASK, PPCCOM, { RT, RA } },
+{ "ameo.", XO(31,234,1,1), XORB_MASK, PWRCOM, { RT, RA } },
+
+{ "mullw", XO(31,235,0,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "muls", XO(31,235,0,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "mullw.", XO(31,235,0,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "muls.", XO(31,235,0,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "mullwo", XO(31,235,1,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "mulso", XO(31,235,1,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "mullwo.", XO(31,235,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "mulso.", XO(31,235,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "mtsrin", X(31,242), XRA_MASK, PPC32, { RS, RB } },
+{ "mtsri", X(31,242), XRA_MASK, POWER32, { RS, RB } },
+
+{ "dcbtst", X(31,246), XRT_MASK, PPC, { RA, RB } },
+
+{ "stbux", X(31,247), X_MASK, COM, { RS, RAS, RB } },
+
+{ "slliq", XRC(31,248,0), X_MASK, M601, { RA, RS, SH } },
+{ "slliq.", XRC(31,248,1), X_MASK, M601, { RA, RS, SH } },
+
+{ "doz", XO(31,264,0,0), XO_MASK, M601, { RT, RA, RB } },
+{ "doz.", XO(31,264,0,1), XO_MASK, M601, { RT, RA, RB } },
+{ "dozo", XO(31,264,1,0), XO_MASK, M601, { RT, RA, RB } },
+{ "dozo.", XO(31,264,1,1), XO_MASK, M601, { RT, RA, RB } },
+
+{ "add", XO(31,266,0,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "cax", XO(31,266,0,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "add.", XO(31,266,0,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "cax.", XO(31,266,0,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addo", XO(31,266,1,0), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "caxo", XO(31,266,1,0), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "addo.", XO(31,266,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
+{ "caxo.", XO(31,266,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "lscbx", XRC(31,277,0), X_MASK, M601, { RT, RA, RB } },
+{ "lscbx.", XRC(31,277,1), X_MASK, M601, { RT, RA, RB } },
+
+{ "dcbt", X(31,278), XRT_MASK, PPC, { RA, RB } },
+
+{ "lhzx", X(31,279), X_MASK, COM, { RT, RA, RB } },
+
+{ "icbt", X(31,262), XRT_MASK, PPC, { RA, RB } },
+
+{ "eqv", XRC(31,284,0), X_MASK, COM, { RA, RS, RB } },
+{ "eqv.", XRC(31,284,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "tlbie", X(31,306), XRTRA_MASK, PPC, { RB } },
+{ "tlbi", X(31,306), XRT_MASK, POWER, { RA, RB } },
+
+{ "eciwx", X(31,310), X_MASK, PPC, { RT, RA, RB } },
+
+{ "lhzux", X(31,311), X_MASK, COM, { RT, RAL, RB } },
+
+{ "xor", XRC(31,316,0), X_MASK, COM, { RA, RS, RB } },
+{ "xor.", XRC(31,316,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "mfexisr", XSPR(31,323,64), XSPR_MASK, PPC403, { RT } },
+{ "mfexier", XSPR(31,323,66), XSPR_MASK, PPC403, { RT } },
+{ "mfbr0", XSPR(31,323,128), XSPR_MASK, PPC403, { RT } },
+{ "mfbr1", XSPR(31,323,129), XSPR_MASK, PPC403, { RT } },
+{ "mfbr2", XSPR(31,323,130), XSPR_MASK, PPC403, { RT } },
+{ "mfbr3", XSPR(31,323,131), XSPR_MASK, PPC403, { RT } },
+{ "mfbr4", XSPR(31,323,132), XSPR_MASK, PPC403, { RT } },
+{ "mfbr5", XSPR(31,323,133), XSPR_MASK, PPC403, { RT } },
+{ "mfbr6", XSPR(31,323,134), XSPR_MASK, PPC403, { RT } },
+{ "mfbr7", XSPR(31,323,135), XSPR_MASK, PPC403, { RT } },
+{ "mfbear", XSPR(31,323,144), XSPR_MASK, PPC403, { RT } },
+{ "mfbesr", XSPR(31,323,145), XSPR_MASK, PPC403, { RT } },
+{ "mfiocr", XSPR(31,323,160), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacr0", XSPR(31,323,192), XSPR_MASK, PPC403, { RT } },
+{ "mfdmact0", XSPR(31,323,193), XSPR_MASK, PPC403, { RT } },
+{ "mfdmada0", XSPR(31,323,194), XSPR_MASK, PPC403, { RT } },
+{ "mfdmasa0", XSPR(31,323,195), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacc0", XSPR(31,323,196), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacr1", XSPR(31,323,200), XSPR_MASK, PPC403, { RT } },
+{ "mfdmact1", XSPR(31,323,201), XSPR_MASK, PPC403, { RT } },
+{ "mfdmada1", XSPR(31,323,202), XSPR_MASK, PPC403, { RT } },
+{ "mfdmasa1", XSPR(31,323,203), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacc1", XSPR(31,323,204), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacr2", XSPR(31,323,208), XSPR_MASK, PPC403, { RT } },
+{ "mfdmact2", XSPR(31,323,209), XSPR_MASK, PPC403, { RT } },
+{ "mfdmada2", XSPR(31,323,210), XSPR_MASK, PPC403, { RT } },
+{ "mfdmasa2", XSPR(31,323,211), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacc2", XSPR(31,323,212), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacr3", XSPR(31,323,216), XSPR_MASK, PPC403, { RT } },
+{ "mfdmact3", XSPR(31,323,217), XSPR_MASK, PPC403, { RT } },
+{ "mfdmada3", XSPR(31,323,218), XSPR_MASK, PPC403, { RT } },
+{ "mfdmasa3", XSPR(31,323,219), XSPR_MASK, PPC403, { RT } },
+{ "mfdmacc3", XSPR(31,323,220), XSPR_MASK, PPC403, { RT } },
+{ "mfdmasr", XSPR(31,323,224), XSPR_MASK, PPC403, { RT } },
+{ "mfdcr", X(31,323), X_MASK, PPC, { RT, SPR } },
+
+{ "div", XO(31,331,0,0), XO_MASK, M601, { RT, RA, RB } },
+{ "div.", XO(31,331,0,1), XO_MASK, M601, { RT, RA, RB } },
+{ "divo", XO(31,331,1,0), XO_MASK, M601, { RT, RA, RB } },
+{ "divo.", XO(31,331,1,1), XO_MASK, M601, { RT, RA, RB } },
+
+{ "mfmq", XSPR(31,339,0), XSPR_MASK, M601, { RT } },
+{ "mfxer", XSPR(31,339,1), XSPR_MASK, COM, { RT } },
+{ "mfrtcu", XSPR(31,339,4), XSPR_MASK, COM, { RT } },
+{ "mfrtcl", XSPR(31,339,5), XSPR_MASK, COM, { RT } },
+{ "mfdec", XSPR(31,339,6), XSPR_MASK, MFDEC1, { RT } },
+{ "mflr", XSPR(31,339,8), XSPR_MASK, COM, { RT } },
+{ "mfctr", XSPR(31,339,9), XSPR_MASK, COM, { RT } },
+{ "mftid", XSPR(31,339,17), XSPR_MASK, POWER, { RT } },
+{ "mfdsisr", XSPR(31,339,18), XSPR_MASK, COM, { RT } },
+{ "mfdar", XSPR(31,339,19), XSPR_MASK, COM, { RT } },
+{ "mfdec", XSPR(31,339,22), XSPR_MASK, MFDEC2, { RT } },
+{ "mfsdr0", XSPR(31,339,24), XSPR_MASK, POWER, { RT } },
+{ "mfsdr1", XSPR(31,339,25), XSPR_MASK, COM, { RT } },
+{ "mfsrr0", XSPR(31,339,26), XSPR_MASK, COM, { RT } },
+{ "mfsrr1", XSPR(31,339,27), XSPR_MASK, COM, { RT } },
+{ "mfcmpa", XSPR(31,339,144), XSPR_MASK, PPC860, { RT } },
+{ "mfcmpb", XSPR(31,339,145), XSPR_MASK, PPC860, { RT } },
+{ "mfcmpc", XSPR(31,339,146), XSPR_MASK, PPC860, { RT } },
+{ "mfcmpd", XSPR(31,339,147), XSPR_MASK, PPC860, { RT } },
+{ "mficr", XSPR(31,339,148), XSPR_MASK, PPC860, { RT } },
+{ "mfder", XSPR(31,339,149), XSPR_MASK, PPC860, { RT } },
+{ "mfcounta", XSPR(31,339,150), XSPR_MASK, PPC860, { RT } },
+{ "mfcountb", XSPR(31,339,151), XSPR_MASK, PPC860, { RT } },
+{ "mfcmpe", XSPR(31,339,152), XSPR_MASK, PPC860, { RT } },
+{ "mfcmpf", XSPR(31,339,153), XSPR_MASK, PPC860, { RT } },
+{ "mfcmpg", XSPR(31,339,154), XSPR_MASK, PPC860, { RT } },
+{ "mfcmph", XSPR(31,339,155), XSPR_MASK, PPC860, { RT } },
+{ "mflctrl1", XSPR(31,339,156), XSPR_MASK, PPC860, { RT } },
+{ "mflctrl2", XSPR(31,339,157), XSPR_MASK, PPC860, { RT } },
+{ "mfictrl", XSPR(31,339,158), XSPR_MASK, PPC860, { RT } },
+{ "mfbar", XSPR(31,339,159), XSPR_MASK, PPC860, { RT } },
+{ "mfsprg", XSPR(31,339,272), XSPRG_MASK, PPC, { RT, SPRG } },
+{ "mfsprg0", XSPR(31,339,272), XSPR_MASK, PPC, { RT } },
+{ "mfsprg1", XSPR(31,339,273), XSPR_MASK, PPC, { RT } },
+{ "mfsprg2", XSPR(31,339,274), XSPR_MASK, PPC, { RT } },
+{ "mfsprg3", XSPR(31,339,275), XSPR_MASK, PPC, { RT } },
+{ "mfasr", XSPR(31,339,280), XSPR_MASK, PPC64, { RT } },
+{ "mfear", XSPR(31,339,282), XSPR_MASK, PPC, { RT } },
+{ "mfpvr", XSPR(31,339,287), XSPR_MASK, PPC, { RT } },
+{ "mfibatu", XSPR(31,339,528), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfibatl", XSPR(31,339,529), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfdbatu", XSPR(31,339,536), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfdbatl", XSPR(31,339,537), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfic_cst", XSPR(31,339,560), XSPR_MASK, PPC860, { RT } },
+{ "mfic_adr", XSPR(31,339,561), XSPR_MASK, PPC860, { RT } },
+{ "mfic_dat", XSPR(31,339,562), XSPR_MASK, PPC860, { RT } },
+{ "mfdc_cst", XSPR(31,339,568), XSPR_MASK, PPC860, { RT } },
+{ "mfdc_adr", XSPR(31,339,569), XSPR_MASK, PPC860, { RT } },
+{ "mfdc_dat", XSPR(31,339,570), XSPR_MASK, PPC860, { RT } },
+{ "mfdpdr", XSPR(31,339,630), XSPR_MASK, PPC860, { RT } },
+{ "mfdpir", XSPR(31,339,631), XSPR_MASK, PPC860, { RT } },
+{ "mfimmr", XSPR(31,339,638), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_ctr", XSPR(31,339,784), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_ap", XSPR(31,339,786), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_epn", XSPR(31,339,787), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_twc", XSPR(31,339,789), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_rpn", XSPR(31,339,790), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_ctr", XSPR(31,339,792), XSPR_MASK, PPC860, { RT } },
+{ "mfm_casid",XSPR(31,339,793), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_ap", XSPR(31,339,794), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_epn", XSPR(31,339,795), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_twb", XSPR(31,339,796), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_twc", XSPR(31,339,797), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_rpn", XSPR(31,339,798), XSPR_MASK, PPC860, { RT } },
+{ "mfm_tw", XSPR(31,339,799), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_dbcam",XSPR(31,339,816), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_dbram0",XSPR(31,339,817), XSPR_MASK, PPC860, { RT } },
+{ "mfmi_dbram1",XSPR(31,339,818), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_dbcam", XSPR(31,339,824), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_dbram0",XSPR(31,339,825), XSPR_MASK, PPC860, { RT } },
+{ "mfmd_dbram1",XSPR(31,339,826), XSPR_MASK, PPC860, { RT } },
+{ "mfzpr", XSPR(31,339,944), XSPR_MASK, PPC403, { RT } },
+{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
+{ "mficdbdr",XSPR(31,339,979), XSPR_MASK, PPC403, { RT } },
+{ "mfummcr0", XSPR(31,339,936), XSPR_MASK, PPC750, { RT } },
+{ "mfupmc1", XSPR(31,339,937), XSPR_MASK, PPC750, { RT } },
+{ "mfupmc2", XSPR(31,339,938), XSPR_MASK, PPC750, { RT } },
+{ "mfusia", XSPR(31,339,939), XSPR_MASK, PPC750, { RT } },
+{ "mfummcr1", XSPR(31,339,940), XSPR_MASK, PPC750, { RT } },
+{ "mfupmc3", XSPR(31,339,941), XSPR_MASK, PPC750, { RT } },
+{ "mfupmc4", XSPR(31,339,942), XSPR_MASK, PPC750, { RT } },
+{ "mfmmcr0", XSPR(31,339,952), XSPR_MASK, PPC750, { RT } },
+{ "mfpmc1", XSPR(31,339,953), XSPR_MASK, PPC750, { RT } },
+{ "mfpmc2", XSPR(31,339,954), XSPR_MASK, PPC750, { RT } },
+{ "mfsia", XSPR(31,339,955), XSPR_MASK, PPC750, { RT } },
+{ "mfmmcr1", XSPR(31,339,956), XSPR_MASK, PPC750, { RT } },
+{ "mfpmc3", XSPR(31,339,957), XSPR_MASK, PPC750, { RT } },
+{ "mfpmc4", XSPR(31,339,958), XSPR_MASK, PPC750, { RT } },
+{ "mfesr", XSPR(31,339,980), XSPR_MASK, PPC403, { RT } },
+{ "mfdear", XSPR(31,339,981), XSPR_MASK, PPC403, { RT } },
+{ "mfevpr", XSPR(31,339,982), XSPR_MASK, PPC403, { RT } },
+{ "mfcdbcr", XSPR(31,339,983), XSPR_MASK, PPC403, { RT } },
+{ "mftsr", XSPR(31,339,984), XSPR_MASK, PPC403, { RT } },
+{ "mftcr", XSPR(31,339,986), XSPR_MASK, PPC403, { RT } },
+{ "mfpit", XSPR(31,339,987), XSPR_MASK, PPC403, { RT } },
+{ "mftbhi", XSPR(31,339,988), XSPR_MASK, PPC403, { RT } },
+{ "mftblo", XSPR(31,339,989), XSPR_MASK, PPC403, { RT } },
+{ "mfsrr2", XSPR(31,339,990), XSPR_MASK, PPC403, { RT } },
+{ "mfsrr3", XSPR(31,339,991), XSPR_MASK, PPC403, { RT } },
+{ "mfdbsr", XSPR(31,339,1008), XSPR_MASK, PPC403, { RT } },
+{ "mfiac1", XSPR(31,339,1012), XSPR_MASK, PPC403, { RT } },
+{ "mfiac2", XSPR(31,339,1013), XSPR_MASK, PPC403, { RT } },
+{ "mfdac1", XSPR(31,339,1014), XSPR_MASK, PPC403, { RT } },
+{ "mfdac2", XSPR(31,339,1015), XSPR_MASK, PPC403, { RT } },
+{ "mfdccr", XSPR(31,339,1018), XSPR_MASK, PPC403, { RT } },
+{ "mficcr", XSPR(31,339,1019), XSPR_MASK, PPC403, { RT } },
+{ "mfpbl1", XSPR(31,339,1020), XSPR_MASK, PPC403, { RT } },
+{ "mfpbu1", XSPR(31,339,1021), XSPR_MASK, PPC403, { RT } },
+{ "mfpbl2", XSPR(31,339,1022), XSPR_MASK, PPC403, { RT } },
+{ "mfpbu2", XSPR(31,339,1023), XSPR_MASK, PPC403, { RT } },
+{ "mfl2cr", XSPR(31,339,1017), XSPR_MASK, PPC750, { RT } },
+{ "mfictc", XSPR(31,339,1019), XSPR_MASK, PPC750, { RT } },
+{ "mfthrm1", XSPR(31,339,1020), XSPR_MASK, PPC750, { RT } },
+{ "mfthrm2", XSPR(31,339,1021), XSPR_MASK, PPC750, { RT } },
+{ "mfthrm3", XSPR(31,339,1022), XSPR_MASK, PPC750, { RT } },
+{ "mfspr", X(31,339), X_MASK, COM, { RT, SPR } },
+
+{ "lwax", X(31,341), X_MASK, PPC64, { RT, RA, RB } },
+
+{ "lhax", X(31,343), X_MASK, COM, { RT, RA, RB } },
+
+{ "dccci", X(31,454), XRT_MASK, PPC, { RA, RB } },
+
+{ "abs", XO(31,360,0,0), XORB_MASK, M601, { RT, RA } },
+{ "abs.", XO(31,360,0,1), XORB_MASK, M601, { RT, RA } },
+{ "abso", XO(31,360,1,0), XORB_MASK, M601, { RT, RA } },
+{ "abso.", XO(31,360,1,1), XORB_MASK, M601, { RT, RA } },
+
+{ "divs", XO(31,363,0,0), XO_MASK, M601, { RT, RA, RB } },
+{ "divs.", XO(31,363,0,1), XO_MASK, M601, { RT, RA, RB } },
+{ "divso", XO(31,363,1,0), XO_MASK, M601, { RT, RA, RB } },
+{ "divso.", XO(31,363,1,1), XO_MASK, M601, { RT, RA, RB } },
+
+{ "tlbia", X(31,370), 0xffffffff, PPC, { 0 } },
+
+{ "mftbu", XSPR(31,371,269), XSPR_MASK, PPC, { RT } },
+{ "mftb", X(31,371), X_MASK, PPC, { RT, TBR } },
+
+{ "lwaux", X(31,373), X_MASK, PPC64, { RT, RAL, RB } },
+
+{ "lhaux", X(31,375), X_MASK, COM, { RT, RAL, RB } },
+
+{ "sthx", X(31,407), X_MASK, COM, { RS, RA, RB } },
+
+{ "lfqx", X(31,791), X_MASK, POWER2, { FRT, RA, RB } },
+
+{ "lfqux", X(31,823), X_MASK, POWER2, { FRT, RA, RB } },
+
+{ "stfqx", X(31,919), X_MASK, POWER2, { FRS, RA, RB } },
+
+{ "stfqux", X(31,951), X_MASK, POWER2, { FRS, RA, RB } },
+
+{ "orc", XRC(31,412,0), X_MASK, COM, { RA, RS, RB } },
+{ "orc.", XRC(31,412,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "sradi", XS(31,413,0), XS_MASK, PPC64, { RA, RS, SH6 } },
+{ "sradi.", XS(31,413,1), XS_MASK, PPC64, { RA, RS, SH6 } },
+
+{ "slbie", X(31,434), XRTRA_MASK, PPC64, { RB } },
+
+{ "ecowx", X(31,438), X_MASK, PPC, { RT, RA, RB } },
+
+{ "sthux", X(31,439), X_MASK, COM, { RS, RAS, RB } },
+
+{ "mr", XRC(31,444,0), X_MASK, COM, { RA, RS, RBS } },
+{ "or", XRC(31,444,0), X_MASK, COM, { RA, RS, RB } },
+{ "mr.", XRC(31,444,1), X_MASK, COM, { RA, RS, RBS } },
+{ "or.", XRC(31,444,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "mtexisr", XSPR(31,451,64), XSPR_MASK, PPC403, { RT } },
+{ "mtexier", XSPR(31,451,66), XSPR_MASK, PPC403, { RT } },
+{ "mtbr0", XSPR(31,451,128), XSPR_MASK, PPC403, { RT } },
+{ "mtbr1", XSPR(31,451,129), XSPR_MASK, PPC403, { RT } },
+{ "mtbr2", XSPR(31,451,130), XSPR_MASK, PPC403, { RT } },
+{ "mtbr3", XSPR(31,451,131), XSPR_MASK, PPC403, { RT } },
+{ "mtbr4", XSPR(31,451,132), XSPR_MASK, PPC403, { RT } },
+{ "mtbr5", XSPR(31,451,133), XSPR_MASK, PPC403, { RT } },
+{ "mtbr6", XSPR(31,451,134), XSPR_MASK, PPC403, { RT } },
+{ "mtbr7", XSPR(31,451,135), XSPR_MASK, PPC403, { RT } },
+{ "mtbear", XSPR(31,451,144), XSPR_MASK, PPC403, { RT } },
+{ "mtbesr", XSPR(31,451,145), XSPR_MASK, PPC403, { RT } },
+{ "mtiocr", XSPR(31,451,160), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacr0", XSPR(31,451,192), XSPR_MASK, PPC403, { RT } },
+{ "mtdmact0", XSPR(31,451,193), XSPR_MASK, PPC403, { RT } },
+{ "mtdmada0", XSPR(31,451,194), XSPR_MASK, PPC403, { RT } },
+{ "mtdmasa0", XSPR(31,451,195), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacc0", XSPR(31,451,196), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacr1", XSPR(31,451,200), XSPR_MASK, PPC403, { RT } },
+{ "mtdmact1", XSPR(31,451,201), XSPR_MASK, PPC403, { RT } },
+{ "mtdmada1", XSPR(31,451,202), XSPR_MASK, PPC403, { RT } },
+{ "mtdmasa1", XSPR(31,451,203), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacc1", XSPR(31,451,204), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacr2", XSPR(31,451,208), XSPR_MASK, PPC403, { RT } },
+{ "mtdmact2", XSPR(31,451,209), XSPR_MASK, PPC403, { RT } },
+{ "mtdmada2", XSPR(31,451,210), XSPR_MASK, PPC403, { RT } },
+{ "mtdmasa2", XSPR(31,451,211), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacc2", XSPR(31,451,212), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacr3", XSPR(31,451,216), XSPR_MASK, PPC403, { RT } },
+{ "mtdmact3", XSPR(31,451,217), XSPR_MASK, PPC403, { RT } },
+{ "mtdmada3", XSPR(31,451,218), XSPR_MASK, PPC403, { RT } },
+{ "mtdmasa3", XSPR(31,451,219), XSPR_MASK, PPC403, { RT } },
+{ "mtdmacc3", XSPR(31,451,220), XSPR_MASK, PPC403, { RT } },
+{ "mtdmasr", XSPR(31,451,224), XSPR_MASK, PPC403, { RT } },
+{ "mtummcr0", XSPR(31,451,936), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc1", XSPR(31,451,937), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc2", XSPR(31,451,938), XSPR_MASK, PPC750, { RT } },
+{ "mtusia", XSPR(31,451,939), XSPR_MASK, PPC750, { RT } },
+{ "mtummcr1", XSPR(31,451,940), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc3", XSPR(31,451,941), XSPR_MASK, PPC750, { RT } },
+{ "mtupmc4", XSPR(31,451,942), XSPR_MASK, PPC750, { RT } },
+{ "mtmmcr0", XSPR(31,451,952), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc1", XSPR(31,451,953), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc2", XSPR(31,451,954), XSPR_MASK, PPC750, { RT } },
+{ "mtsia", XSPR(31,451,955), XSPR_MASK, PPC750, { RT } },
+{ "mtmmcr1", XSPR(31,451,956), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc3", XSPR(31,451,957), XSPR_MASK, PPC750, { RT } },
+{ "mtpmc4", XSPR(31,451,958), XSPR_MASK, PPC750, { RT } },
+{ "mtl2cr", XSPR(31,451,1017), XSPR_MASK, PPC750, { RT } },
+{ "mtictc", XSPR(31,451,1019), XSPR_MASK, PPC750, { RT } },
+{ "mtthrm1", XSPR(31,451,1020), XSPR_MASK, PPC750, { RT } },
+{ "mtthrm2", XSPR(31,451,1021), XSPR_MASK, PPC750, { RT } },
+{ "mtthrm3", XSPR(31,451,1022), XSPR_MASK, PPC750, { RT } },
+{ "mtdcr", X(31,451), X_MASK, PPC, { SPR, RS } },
+
+{ "divdu", XO(31,457,0,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "divdu.", XO(31,457,0,1), XO_MASK, PPC64, { RT, RA, RB } },
+{ "divduo", XO(31,457,1,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "divduo.", XO(31,457,1,1), XO_MASK, PPC64, { RT, RA, RB } },
+
+{ "divwu", XO(31,459,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwu.", XO(31,459,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwuo", XO(31,459,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwuo.", XO(31,459,1,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "mtmq", XSPR(31,467,0), XSPR_MASK, M601, { RS } },
+{ "mtxer", XSPR(31,467,1), XSPR_MASK, COM, { RS } },
+{ "mtlr", XSPR(31,467,8), XSPR_MASK, COM, { RS } },
+{ "mtctr", XSPR(31,467,9), XSPR_MASK, COM, { RS } },
+{ "mttid", XSPR(31,467,17), XSPR_MASK, POWER, { RS } },
+{ "mtdsisr", XSPR(31,467,18), XSPR_MASK, COM, { RS } },
+{ "mtdar", XSPR(31,467,19), XSPR_MASK, COM, { RS } },
+{ "mtrtcu", XSPR(31,467,20), XSPR_MASK, COM, { RS } },
+{ "mtrtcl", XSPR(31,467,21), XSPR_MASK, COM, { RS } },
+{ "mtdec", XSPR(31,467,22), XSPR_MASK, COM, { RS } },
+{ "mtsdr0", XSPR(31,467,24), XSPR_MASK, POWER, { RS } },
+{ "mtsdr1", XSPR(31,467,25), XSPR_MASK, COM, { RS } },
+{ "mtsrr0", XSPR(31,467,26), XSPR_MASK, COM, { RS } },
+{ "mtsrr1", XSPR(31,467,27), XSPR_MASK, COM, { RS } },
+{ "mtcmpa", XSPR(31,467,144), XSPR_MASK, PPC860, { RT } },
+{ "mtcmpb", XSPR(31,467,145), XSPR_MASK, PPC860, { RT } },
+{ "mtcmpc", XSPR(31,467,146), XSPR_MASK, PPC860, { RT } },
+{ "mtcmpd", XSPR(31,467,147), XSPR_MASK, PPC860, { RT } },
+{ "mticr", XSPR(31,467,148), XSPR_MASK, PPC860, { RT } },
+{ "mtder", XSPR(31,467,149), XSPR_MASK, PPC860, { RT } },
+{ "mtcounta", XSPR(31,467,150), XSPR_MASK, PPC860, { RT } },
+{ "mtcountb", XSPR(31,467,151), XSPR_MASK, PPC860, { RT } },
+{ "mtcmpe", XSPR(31,467,152), XSPR_MASK, PPC860, { RT } },
+{ "mtcmpf", XSPR(31,467,153), XSPR_MASK, PPC860, { RT } },
+{ "mtcmpg", XSPR(31,467,154), XSPR_MASK, PPC860, { RT } },
+{ "mtcmph", XSPR(31,467,155), XSPR_MASK, PPC860, { RT } },
+{ "mtlctrl1", XSPR(31,467,156), XSPR_MASK, PPC860, { RT } },
+{ "mtlctrl2", XSPR(31,467,157), XSPR_MASK, PPC860, { RT } },
+{ "mtictrl", XSPR(31,467,158), XSPR_MASK, PPC860, { RT } },
+{ "mtbar", XSPR(31,467,159), XSPR_MASK, PPC860, { RT } },
+{ "mtsprg", XSPR(31,467,272), XSPRG_MASK, PPC, { SPRG, RS } },
+{ "mtsprg0", XSPR(31,467,272), XSPR_MASK, PPC, { RT } },
+{ "mtsprg1", XSPR(31,467,273), XSPR_MASK, PPC, { RT } },
+{ "mtsprg2", XSPR(31,467,274), XSPR_MASK, PPC, { RT } },
+{ "mtsprg3", XSPR(31,467,275), XSPR_MASK, PPC, { RT } },
+{ "mtasr", XSPR(31,467,280), XSPR_MASK, PPC64, { RS } },
+{ "mtear", XSPR(31,467,282), XSPR_MASK, PPC, { RS } },
+{ "mttbl", XSPR(31,467,284), XSPR_MASK, PPC, { RS } },
+{ "mttbu", XSPR(31,467,285), XSPR_MASK, PPC, { RS } },
+{ "mtibatu", XSPR(31,467,528), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtibatl", XSPR(31,467,529), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtdbatu", XSPR(31,467,536), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtdbatl", XSPR(31,467,537), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtzpr", XSPR(31,467,944), XSPR_MASK, PPC403, { RT } },
+{ "mtpid", XSPR(31,467,945), XSPR_MASK, PPC403, { RT } },
+{ "mticdbdr",XSPR(31,467,979), XSPR_MASK, PPC403, { RT } },
+{ "mtesr", XSPR(31,467,980), XSPR_MASK, PPC403, { RT } },
+{ "mtevpr", XSPR(31,467,982), XSPR_MASK, PPC403, { RT } },
+{ "mtcdbcr", XSPR(31,467,983), XSPR_MASK, PPC403, { RT } },
+{ "mttsr", XSPR(31,467,984), XSPR_MASK, PPC403, { RT } },
+{ "mttcr", XSPR(31,467,986), XSPR_MASK, PPC403, { RT } },
+{ "mtpit", XSPR(31,467,987), XSPR_MASK, PPC403, { RT } },
+{ "mttbhi", XSPR(31,467,988), XSPR_MASK, PPC403, { RT } },
+{ "mttblo", XSPR(31,467,989), XSPR_MASK, PPC403, { RT } },
+{ "mtsrr2", XSPR(31,467,990), XSPR_MASK, PPC403, { RT } },
+{ "mtsrr3", XSPR(31,467,991), XSPR_MASK, PPC403, { RT } },
+{ "mtdbsr", XSPR(31,467,1008), XSPR_MASK, PPC403, { RT } },
+{ "mtiac1", XSPR(31,467,1012), XSPR_MASK, PPC403, { RT } },
+{ "mtiac2", XSPR(31,467,1013), XSPR_MASK, PPC403, { RT } },
+{ "mtdac1", XSPR(31,467,1014), XSPR_MASK, PPC403, { RT } },
+{ "mtdac2", XSPR(31,467,1015), XSPR_MASK, PPC403, { RT } },
+{ "mtdccr", XSPR(31,467,1018), XSPR_MASK, PPC403, { RT } },
+{ "mticcr", XSPR(31,467,1019), XSPR_MASK, PPC403, { RT } },
+{ "mtpbl1", XSPR(31,467,1020), XSPR_MASK, PPC403, { RT } },
+{ "mtpbu1", XSPR(31,467,1021), XSPR_MASK, PPC403, { RT } },
+{ "mtpbl2", XSPR(31,467,1022), XSPR_MASK, PPC403, { RT } },
+{ "mtpbu2", XSPR(31,467,1023), XSPR_MASK, PPC403, { RT } },
+{ "mtspr", X(31,467), X_MASK, COM, { SPR, RS } },
+
+{ "dcbi", X(31,470), XRT_MASK, PPC, { RA, RB } },
+
+{ "nand", XRC(31,476,0), X_MASK, COM, { RA, RS, RB } },
+{ "nand.", XRC(31,476,1), X_MASK, COM, { RA, RS, RB } },
+
+{ "dcread", X(31,486), X_MASK, PPC403, { RT, RA, RB }},
+
+{ "nabs", XO(31,488,0,0), XORB_MASK, M601, { RT, RA } },
+{ "nabs.", XO(31,488,0,1), XORB_MASK, M601, { RT, RA } },
+{ "nabso", XO(31,488,1,0), XORB_MASK, M601, { RT, RA } },
+{ "nabso.", XO(31,488,1,1), XORB_MASK, M601, { RT, RA } },
+
+{ "divd", XO(31,489,0,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "divd.", XO(31,489,0,1), XO_MASK, PPC64, { RT, RA, RB } },
+{ "divdo", XO(31,489,1,0), XO_MASK, PPC64, { RT, RA, RB } },
+{ "divdo.", XO(31,489,1,1), XO_MASK, PPC64, { RT, RA, RB } },
+
+{ "divw", XO(31,491,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divw.", XO(31,491,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwo", XO(31,491,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwo.", XO(31,491,1,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "slbia", X(31,498), 0xffffffff, PPC64, { 0 } },
+
+{ "cli", X(31,502), XRB_MASK, POWER, { RT, RA } },
+
+{ "mcrxr", X(31,512), XRARB_MASK|(3<<21), COM, { BF } },
+
+{ "clcs", X(31,531), XRB_MASK, M601, { RT, RA } },
+
+{ "lswx", X(31,533), X_MASK, PPCCOM, { RT, RA, RB } },
+{ "lsx", X(31,533), X_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "lwbrx", X(31,534), X_MASK, PPCCOM, { RT, RA, RB } },
+{ "lbrx", X(31,534), X_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "lfsx", X(31,535), X_MASK, COM, { FRT, RA, RB } },
+
+{ "srw", XRC(31,536,0), X_MASK, PPCCOM, { RA, RS, RB } },
+{ "sr", XRC(31,536,0), X_MASK, PWRCOM, { RA, RS, RB } },
+{ "srw.", XRC(31,536,1), X_MASK, PPCCOM, { RA, RS, RB } },
+{ "sr.", XRC(31,536,1), X_MASK, PWRCOM, { RA, RS, RB } },
+
+{ "rrib", XRC(31,537,0), X_MASK, M601, { RA, RS, RB } },
+{ "rrib.", XRC(31,537,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "srd", XRC(31,539,0), X_MASK, PPC64, { RA, RS, RB } },
+{ "srd.", XRC(31,539,1), X_MASK, PPC64, { RA, RS, RB } },
+
+{ "maskir", XRC(31,541,0), X_MASK, M601, { RA, RS, RB } },
+{ "maskir.", XRC(31,541,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "tlbsync", X(31,566), 0xffffffff, PPC, { 0 } },
+
+{ "lfsux", X(31,567), X_MASK, COM, { FRT, RAS, RB } },
+
+{ "mfsr", X(31,595), XRB_MASK|(1<<20), COM32, { RT, SR } },
+
+{ "lswi", X(31,597), X_MASK, PPCCOM, { RT, RA, NB } },
+{ "lsi", X(31,597), X_MASK, PWRCOM, { RT, RA, NB } },
+
+{ "sync", X(31,598), 0xffffffff, PPCCOM, { 0 } },
+{ "dcs", X(31,598), 0xffffffff, PWRCOM, { 0 } },
+
+{ "lfdx", X(31,599), X_MASK, COM, { FRT, RA, RB } },
+
+{ "mfsri", X(31,627), X_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "dclst", X(31,630), XRB_MASK, PWRCOM, { RS, RA } },
+
+{ "lfdux", X(31,631), X_MASK, COM, { FRT, RAS, RB } },
+
+{ "mfsrin", X(31,659), XRA_MASK, PPC32, { RT, RB } },
+
+{ "stswx", X(31,661), X_MASK, PPCCOM, { RS, RA, RB } },
+{ "stsx", X(31,661), X_MASK, PWRCOM, { RS, RA, RB } },
+
+{ "stwbrx", X(31,662), X_MASK, PPCCOM, { RS, RA, RB } },
+{ "stbrx", X(31,662), X_MASK, PWRCOM, { RS, RA, RB } },
+
+{ "stfsx", X(31,663), X_MASK, COM, { FRS, RA, RB } },
+
+{ "srq", XRC(31,664,0), X_MASK, M601, { RA, RS, RB } },
+{ "srq.", XRC(31,664,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "sre", XRC(31,665,0), X_MASK, M601, { RA, RS, RB } },
+{ "sre.", XRC(31,665,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "stfsux", X(31,695), X_MASK, COM, { FRS, RAS, RB } },
+
+{ "sriq", XRC(31,696,0), X_MASK, M601, { RA, RS, SH } },
+{ "sriq.", XRC(31,696,1), X_MASK, M601, { RA, RS, SH } },
+
+{ "stswi", X(31,725), X_MASK, PPCCOM, { RS, RA, NB } },
+{ "stsi", X(31,725), X_MASK, PWRCOM, { RS, RA, NB } },
+
+{ "stfdx", X(31,727), X_MASK, COM, { FRS, RA, RB } },
+
+{ "srlq", XRC(31,728,0), X_MASK, M601, { RA, RS, RB } },
+{ "srlq.", XRC(31,728,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "sreq", XRC(31,729,0), X_MASK, M601, { RA, RS, RB } },
+{ "sreq.", XRC(31,729,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "stfdux", X(31,759), X_MASK, COM, { FRS, RAS, RB } },
+
+{ "srliq", XRC(31,760,0), X_MASK, M601, { RA, RS, SH } },
+{ "srliq.", XRC(31,760,1), X_MASK, M601, { RA, RS, SH } },
+
+{ "lhbrx", X(31,790), X_MASK, COM, { RT, RA, RB } },
+
+{ "sraw", XRC(31,792,0), X_MASK, PPCCOM, { RA, RS, RB } },
+{ "sra", XRC(31,792,0), X_MASK, PWRCOM, { RA, RS, RB } },
+{ "sraw.", XRC(31,792,1), X_MASK, PPCCOM, { RA, RS, RB } },
+{ "sra.", XRC(31,792,1), X_MASK, PWRCOM, { RA, RS, RB } },
+
+{ "srad", XRC(31,794,0), X_MASK, PPC64, { RA, RS, RB } },
+{ "srad.", XRC(31,794,1), X_MASK, PPC64, { RA, RS, RB } },
+
+{ "rac", X(31,818), X_MASK, PWRCOM, { RT, RA, RB } },
+
+{ "srawi", XRC(31,824,0), X_MASK, PPCCOM, { RA, RS, SH } },
+{ "srai", XRC(31,824,0), X_MASK, PWRCOM, { RA, RS, SH } },
+{ "srawi.", XRC(31,824,1), X_MASK, PPCCOM, { RA, RS, SH } },
+{ "srai.", XRC(31,824,1), X_MASK, PWRCOM, { RA, RS, SH } },
+
+{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
+
+{ "tlbsx", XRC(31,914,0), X_MASK, PPC403, { RT, RA, RB } },
+{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, RB } },
+
+{ "sthbrx", X(31,918), X_MASK, COM, { RS, RA, RB } },
+
+{ "sraq", XRC(31,920,0), X_MASK, M601, { RA, RS, RB } },
+{ "sraq.", XRC(31,920,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "srea", XRC(31,921,0), X_MASK, M601, { RA, RS, RB } },
+{ "srea.", XRC(31,921,1), X_MASK, M601, { RA, RS, RB } },
+
+{ "extsh", XRC(31,922,0), XRB_MASK, PPCCOM, { RA, RS } },
+{ "exts", XRC(31,922,0), XRB_MASK, PWRCOM, { RA, RS } },
+{ "extsh.", XRC(31,922,1), XRB_MASK, PPCCOM, { RA, RS } },
+{ "exts.", XRC(31,922,1), XRB_MASK, PWRCOM, { RA, RS } },
+
+{ "tlbre", X(31,946), X_MASK, PPC403, { RT, RA, SH } },
+
+{ "sraiq", XRC(31,952,0), X_MASK, M601, { RA, RS, SH } },
+{ "sraiq.", XRC(31,952,1), X_MASK, M601, { RA, RS, SH } },
+
+{ "extsb", XRC(31,954,0), XRB_MASK, PPC, { RA, RS} },
+{ "extsb.", XRC(31,954,1), XRB_MASK, PPC, { RA, RS} },
+
+{ "iccci", X(31,966), XRT_MASK, PPC, { RA, RB } },
+
+{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
+{ "tlbwe", X(31,978), X_MASK, PPC403, { RS, RA, SH } },
+
+{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
+
+{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA, RB } },
+
+{ "extsw", XRC(31,986,0), XRB_MASK, PPC, { RA, RS } },
+{ "extsw.", XRC(31,986,1), XRB_MASK, PPC, { RA, RS } },
+
+{ "icread", X(31,998), XRT_MASK, PPC403, { RA, RB } },
+
+{ "tlbli", X(31,1010), XRTRA_MASK, PPC, { RB } },
+
+{ "dcbz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
+{ "dclz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
+
+{ "lwz", OP(32), OP_MASK, PPCCOM, { RT, D, RA } },
+{ "l", OP(32), OP_MASK, PWRCOM, { RT, D, RA } },
+
+{ "lwzu", OP(33), OP_MASK, PPCCOM, { RT, D, RAL } },
+{ "lu", OP(33), OP_MASK, PWRCOM, { RT, D, RA } },
+
+{ "lbz", OP(34), OP_MASK, COM, { RT, D, RA } },
+
+{ "lbzu", OP(35), OP_MASK, COM, { RT, D, RAL } },
+
+{ "stw", OP(36), OP_MASK, PPCCOM, { RS, D, RA } },
+{ "st", OP(36), OP_MASK, PWRCOM, { RS, D, RA } },
+
+{ "stwu", OP(37), OP_MASK, PPCCOM, { RS, D, RAS } },
+{ "stu", OP(37), OP_MASK, PWRCOM, { RS, D, RA } },
+
+{ "stb", OP(38), OP_MASK, COM, { RS, D, RA } },
+
+{ "stbu", OP(39), OP_MASK, COM, { RS, D, RAS } },
+
+{ "lhz", OP(40), OP_MASK, COM, { RT, D, RA } },
+
+{ "lhzu", OP(41), OP_MASK, COM, { RT, D, RAL } },
+
+{ "lha", OP(42), OP_MASK, COM, { RT, D, RA } },
+
+{ "lhau", OP(43), OP_MASK, COM, { RT, D, RAL } },
+
+{ "sth", OP(44), OP_MASK, COM, { RS, D, RA } },
+
+{ "sthu", OP(45), OP_MASK, COM, { RS, D, RAS } },
+
+{ "lmw", OP(46), OP_MASK, PPCCOM, { RT, D, RAM } },
+{ "lm", OP(46), OP_MASK, PWRCOM, { RT, D, RA } },
+
+{ "stmw", OP(47), OP_MASK, PPCCOM, { RS, D, RA } },
+{ "stm", OP(47), OP_MASK, PWRCOM, { RS, D, RA } },
+
+{ "lfs", OP(48), OP_MASK, COM, { FRT, D, RA } },
+
+{ "lfsu", OP(49), OP_MASK, COM, { FRT, D, RAS } },
+
+{ "lfd", OP(50), OP_MASK, COM, { FRT, D, RA } },
+
+{ "lfdu", OP(51), OP_MASK, COM, { FRT, D, RAS } },
+
+{ "stfs", OP(52), OP_MASK, COM, { FRS, D, RA } },
+
+{ "stfsu", OP(53), OP_MASK, COM, { FRS, D, RAS } },
+
+{ "stfd", OP(54), OP_MASK, COM, { FRS, D, RA } },
+
+{ "stfdu", OP(55), OP_MASK, COM, { FRS, D, RAS } },
+
+{ "lfq", OP(56), OP_MASK, POWER2, { FRT, D, RA } },
+
+{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA } },
+
+{ "ld", DSO(58,0), DS_MASK, PPC64, { RT, DS, RA } },
+
+{ "ldu", DSO(58,1), DS_MASK, PPC64, { RT, DS, RAL } },
+
+{ "lwa", DSO(58,2), DS_MASK, PPC64, { RT, DS, RA } },
+
+{ "fdivs", A(59,18,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fdivs.", A(59,18,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+
+{ "fsubs", A(59,20,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fsubs.", A(59,20,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+
+{ "fadds", A(59,21,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fadds.", A(59,21,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+
+{ "fsqrts", A(59,22,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "fsqrts.", A(59,22,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+
+{ "fres", A(59,24,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "fres.", A(59,24,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+
+{ "fmuls", A(59,25,0), AFRB_MASK, PPC, { FRT, FRA, FRC } },
+{ "fmuls.", A(59,25,1), AFRB_MASK, PPC, { FRT, FRA, FRC } },
+
+{ "fmsubs", A(59,28,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fmsubs.", A(59,28,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fmadds", A(59,29,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fmadds.", A(59,29,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fnmsubs", A(59,30,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnmsubs.",A(59,30,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fnmadds", A(59,31,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnmadds.",A(59,31,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "stfq", OP(60), OP_MASK, POWER2, { FRS, D, RA } },
+
+{ "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } },
+
+{ "std", DSO(62,0), DS_MASK, PPC64, { RS, DS, RA } },
+
+{ "stdu", DSO(62,1), DS_MASK, PPC64, { RS, DS, RAS } },
+
+{ "fcmpu", X(63,0), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
+
+{ "frsp", XRC(63,12,0), XRA_MASK, COM, { FRT, FRB } },
+{ "frsp.", XRC(63,12,1), XRA_MASK, COM, { FRT, FRB } },
+
+{ "fctiw", XRC(63,14,0), XRA_MASK, PPCCOM, { FRT, FRB } },
+{ "fcir", XRC(63,14,0), XRA_MASK, POWER2, { FRT, FRB } },
+{ "fctiw.", XRC(63,14,1), XRA_MASK, PPCCOM, { FRT, FRB } },
+{ "fcir.", XRC(63,14,1), XRA_MASK, POWER2, { FRT, FRB } },
+
+{ "fctiwz", XRC(63,15,0), XRA_MASK, PPCCOM, { FRT, FRB } },
+{ "fcirz", XRC(63,15,0), XRA_MASK, POWER2, { FRT, FRB } },
+{ "fctiwz.", XRC(63,15,1), XRA_MASK, PPCCOM, { FRT, FRB } },
+{ "fcirz.", XRC(63,15,1), XRA_MASK, POWER2, { FRT, FRB } },
+
+{ "fdiv", A(63,18,0), AFRC_MASK, PPCCOM, { FRT, FRA, FRB } },
+{ "fd", A(63,18,0), AFRC_MASK, PWRCOM, { FRT, FRA, FRB } },
+{ "fdiv.", A(63,18,1), AFRC_MASK, PPCCOM, { FRT, FRA, FRB } },
+{ "fd.", A(63,18,1), AFRC_MASK, PWRCOM, { FRT, FRA, FRB } },
+
+{ "fsub", A(63,20,0), AFRC_MASK, PPCCOM, { FRT, FRA, FRB } },
+{ "fs", A(63,20,0), AFRC_MASK, PWRCOM, { FRT, FRA, FRB } },
+{ "fsub.", A(63,20,1), AFRC_MASK, PPCCOM, { FRT, FRA, FRB } },
+{ "fs.", A(63,20,1), AFRC_MASK, PWRCOM, { FRT, FRA, FRB } },
+
+{ "fadd", A(63,21,0), AFRC_MASK, PPCCOM, { FRT, FRA, FRB } },
+{ "fa", A(63,21,0), AFRC_MASK, PWRCOM, { FRT, FRA, FRB } },
+{ "fadd.", A(63,21,1), AFRC_MASK, PPCCOM, { FRT, FRA, FRB } },
+{ "fa.", A(63,21,1), AFRC_MASK, PWRCOM, { FRT, FRA, FRB } },
+
+{ "fsqrt", A(63,22,0), AFRAFRC_MASK, PPCPWR2, { FRT, FRB } },
+{ "fsqrt.", A(63,22,1), AFRAFRC_MASK, PPCPWR2, { FRT, FRB } },
+
+{ "fsel", A(63,23,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fsel.", A(63,23,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fmul", A(63,25,0), AFRB_MASK, PPCCOM, { FRT, FRA, FRC } },
+{ "fm", A(63,25,0), AFRB_MASK, PWRCOM, { FRT, FRA, FRC } },
+{ "fmul.", A(63,25,1), AFRB_MASK, PPCCOM, { FRT, FRA, FRC } },
+{ "fm.", A(63,25,1), AFRB_MASK, PWRCOM, { FRT, FRA, FRC } },
+
+{ "frsqrte", A(63,26,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "frsqrte.",A(63,26,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+
+{ "fmsub", A(63,28,0), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fms", A(63,28,0), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+{ "fmsub.", A(63,28,1), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fms.", A(63,28,1), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+
+{ "fmadd", A(63,29,0), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fma", A(63,29,0), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+{ "fmadd.", A(63,29,1), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fma.", A(63,29,1), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+
+{ "fnmsub", A(63,30,0), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fnms", A(63,30,0), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+{ "fnmsub.", A(63,30,1), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fnms.", A(63,30,1), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+
+{ "fnmadd", A(63,31,0), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fnma", A(63,31,0), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+{ "fnmadd.", A(63,31,1), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
+{ "fnma.", A(63,31,1), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
+
+{ "fcmpo", X(63,32), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
+
+{ "mtfsb1", XRC(63,38,0), XRARB_MASK, COM, { BT } },
+{ "mtfsb1.", XRC(63,38,1), XRARB_MASK, COM, { BT } },
+
+{ "fneg", XRC(63,40,0), XRA_MASK, COM, { FRT, FRB } },
+{ "fneg.", XRC(63,40,1), XRA_MASK, COM, { FRT, FRB } },
+
+{ "mcrfs", X(63,64), XRB_MASK|(3<<21)|(3<<16), COM, { BF, BFA } },
+
+{ "mtfsb0", XRC(63,70,0), XRARB_MASK, COM, { BT } },
+{ "mtfsb0.", XRC(63,70,1), XRARB_MASK, COM, { BT } },
+
+{ "fmr", XRC(63,72,0), XRA_MASK, COM, { FRT, FRB } },
+{ "fmr.", XRC(63,72,1), XRA_MASK, COM, { FRT, FRB } },
+
+{ "mtfsfi", XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
+{ "mtfsfi.", XRC(63,134,1), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
+
+{ "fnabs", XRC(63,136,0), XRA_MASK, COM, { FRT, FRB } },
+{ "fnabs.", XRC(63,136,1), XRA_MASK, COM, { FRT, FRB } },
+
+{ "fabs", XRC(63,264,0), XRA_MASK, COM, { FRT, FRB } },
+{ "fabs.", XRC(63,264,1), XRA_MASK, COM, { FRT, FRB } },
+
+{ "mffs", XRC(63,583,0), XRARB_MASK, COM, { FRT } },
+{ "mffs.", XRC(63,583,1), XRARB_MASK, COM, { FRT } },
+
+{ "mtfsf", XFL(63,711,0), XFL_MASK, COM, { FLM, FRB } },
+{ "mtfsf.", XFL(63,711,1), XFL_MASK, COM, { FLM, FRB } },
+
+{ "fctid", XRC(63,814,0), XRA_MASK, PPC64, { FRT, FRB } },
+{ "fctid.", XRC(63,814,1), XRA_MASK, PPC64, { FRT, FRB } },
+
+{ "fctidz", XRC(63,815,0), XRA_MASK, PPC64, { FRT, FRB } },
+{ "fctidz.", XRC(63,815,1), XRA_MASK, PPC64, { FRT, FRB } },
+
+{ "fcfid", XRC(63,846,0), XRA_MASK, PPC64, { FRT, FRB } },
+{ "fcfid.", XRC(63,846,1), XRA_MASK, PPC64, { FRT, FRB } },
+
+};
+
+const int powerpc_num_opcodes =
+ sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
+
+/* The macro table. This is only used by the assembler. */
+
+/* The expressions of the form (-x ! 31) & (x | 31) have the value 0
+ when x=0; 32-x when x is between 1 and 31; are negative if x is
+ negative; and are 32 or more otherwise. This is what you want
+ when, for instance, you are emulating a right shift by a
+ rotate-left-and-mask, because the underlying instructions support
+ shifts of size 0 but not shifts of size 32. By comparison, when
+ extracting x bits from some word you want to use just 32-x, because
+ the underlying instructions don't support extracting 0 bits but do
+ support extracting the whole word (32 bits in this case). */
+
+const struct powerpc_macro powerpc_macros[] = {
+{ "extldi", 4, PPC64, "rldicr %0,%1,%3,(%2)-1" },
+{ "extldi.", 4, PPC64, "rldicr. %0,%1,%3,(%2)-1" },
+{ "extrdi", 4, PPC64, "rldicl %0,%1,(%2)+(%3),64-(%2)" },
+{ "extrdi.", 4, PPC64, "rldicl. %0,%1,(%2)+(%3),64-(%2)" },
+{ "insrdi", 4, PPC64, "rldimi %0,%1,64-((%2)+(%3)),%3" },
+{ "insrdi.", 4, PPC64, "rldimi. %0,%1,64-((%2)+(%3)),%3" },
+{ "rotrdi", 3, PPC64, "rldicl %0,%1,(-(%2)!63)&((%2)|63),0" },
+{ "rotrdi.", 3, PPC64, "rldicl. %0,%1,(-(%2)!63)&((%2)|63),0" },
+{ "sldi", 3, PPC64, "rldicr %0,%1,%2,63-(%2)" },
+{ "sldi.", 3, PPC64, "rldicr. %0,%1,%2,63-(%2)" },
+{ "srdi", 3, PPC64, "rldicl %0,%1,(-(%2)!63)&((%2)|63),%2" },
+{ "srdi.", 3, PPC64, "rldicl. %0,%1,(-(%2)!63)&((%2)|63),%2" },
+{ "clrrdi", 3, PPC64, "rldicr %0,%1,0,63-(%2)" },
+{ "clrrdi.", 3, PPC64, "rldicr. %0,%1,0,63-(%2)" },
+{ "clrlsldi",4, PPC64, "rldic %0,%1,%3,(%2)-(%3)" },
+{ "clrlsldi.",4, PPC64, "rldic. %0,%1,%3,(%2)-(%3)" },
+
+{ "extlwi", 4, PPCCOM, "rlwinm %0,%1,%3,0,(%2)-1" },
+{ "extlwi.", 4, PPCCOM, "rlwinm. %0,%1,%3,0,(%2)-1" },
+{ "extrwi", 4, PPCCOM, "rlwinm %0,%1,(%2)+(%3),32-(%2),31" },
+{ "extrwi.", 4, PPCCOM, "rlwinm. %0,%1,(%2)+(%3),32-(%2),31" },
+{ "inslwi", 4, PPCCOM, "rlwimi %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1" },
+{ "inslwi.", 4, PPCCOM, "rlwimi. %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1"},
+{ "insrwi", 4, PPCCOM, "rlwimi %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1" },
+{ "insrwi.", 4, PPCCOM, "rlwimi. %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1"},
+{ "rotrwi", 3, PPCCOM, "rlwinm %0,%1,(-(%2)!31)&((%2)|31),0,31" },
+{ "rotrwi.", 3, PPCCOM, "rlwinm. %0,%1,(-(%2)!31)&((%2)|31),0,31" },
+{ "slwi", 3, PPCCOM, "rlwinm %0,%1,%2,0,31-(%2)" },
+{ "sli", 3, PWRCOM, "rlinm %0,%1,%2,0,31-(%2)" },
+{ "slwi.", 3, PPCCOM, "rlwinm. %0,%1,%2,0,31-(%2)" },
+{ "sli.", 3, PWRCOM, "rlinm. %0,%1,%2,0,31-(%2)" },
+{ "srwi", 3, PPCCOM, "rlwinm %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
+{ "sri", 3, PWRCOM, "rlinm %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
+{ "srwi.", 3, PPCCOM, "rlwinm. %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
+{ "sri.", 3, PWRCOM, "rlinm. %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
+{ "clrrwi", 3, PPCCOM, "rlwinm %0,%1,0,0,31-(%2)" },
+{ "clrrwi.", 3, PPCCOM, "rlwinm. %0,%1,0,0,31-(%2)" },
+{ "clrlslwi",4, PPCCOM, "rlwinm %0,%1,%3,(%2)-(%3),31-(%3)" },
+{ "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" },
+
+};
+
+const int powerpc_num_macros =
+ sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff --git a/contrib/binutils/opcodes/sh-dis.c b/contrib/binutils/opcodes/sh-dis.c
index 2ebfdb6..c4e960c 100644
--- a/contrib/binutils/opcodes/sh-dis.c
+++ b/contrib/binutils/opcodes/sh-dis.c
@@ -15,6 +15,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. */
+#include "sysdep.h"
#include <stdio.h>
#define STATIC_TABLE
#define DEFINE_TABLE
@@ -24,6 +25,256 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define LITTLE_BIT 2
+static void
+print_movxy (op, rn, rm, fprintf_fn, stream)
+ sh_opcode_info *op;
+ int rn, rm;
+ fprintf_ftype fprintf_fn;
+ void *stream;
+{
+ int n;
+
+ fprintf_fn (stream,"%s\t", op->name);
+ for (n = 0; n < 2; n++)
+ {
+ switch (op->arg[n])
+ {
+ case A_IND_N:
+ fprintf_fn (stream, "@r%d", rn);
+ break;
+ case A_INC_N:
+ fprintf_fn (stream, "@r%d+", rn);
+ break;
+ case A_PMOD_N:
+ fprintf_fn (stream, "@r%d+r8", rn);
+ break;
+ case A_PMODY_N:
+ fprintf_fn (stream, "@r%d+r9", rn);
+ break;
+ case DSP_REG_M:
+ fprintf_fn (stream, "a%c", '0' + rm);
+ break;
+ case DSP_REG_X:
+ fprintf_fn (stream, "x%c", '0' + rm);
+ break;
+ case DSP_REG_Y:
+ fprintf_fn (stream, "y%c", '0' + rm);
+ break;
+ default:
+ abort ();
+ }
+ if (n == 0)
+ fprintf_fn (stream, ",");
+ }
+}
+
+/* Print a double data transfer insn. INSN is just the lower three
+ nibbles of the insn, i.e. field a and the bit that indicates if
+ a parallel processing insn follows.
+ Return nonzero if a field b of a parallel processing insns follows. */
+static void
+print_insn_ddt (insn, info)
+ int insn;
+ struct disassemble_info *info;
+{
+ fprintf_ftype fprintf_fn = info->fprintf_func;
+ void *stream = info->stream;
+
+ /* If this is just a nop, make sure to emit something. */
+ if (insn == 0x000)
+ fprintf_fn (stream, "nopx\tnopy");
+
+ /* If a parallel processing insn was printed before,
+ and we got a non-nop, emit a tab. */
+ if ((insn & 0x800) && (insn & 0x3ff))
+ fprintf_fn (stream, "\t");
+
+ /* Check if either the x or y part is invalid. */
+ if (((insn & 0xc) == 0 && (insn & 0x2a0))
+ || ((insn & 3) == 0 && (insn & 0x150)))
+ fprintf_fn (stream, ".word 0x%x", insn);
+ else
+ {
+ static sh_opcode_info *first_movx, *first_movy;
+ sh_opcode_info *opx, *opy;
+ int insn_x, insn_y;
+
+ if (! first_movx)
+ {
+ for (first_movx = sh_table; first_movx->nibbles[1] != MOVX; )
+ first_movx++;
+ for (first_movy = first_movx; first_movy->nibbles[1] != MOVY; )
+ first_movy++;
+ }
+ insn_x = (insn >> 2) & 0xb;
+ if (insn_x)
+ {
+ for (opx = first_movx; opx->nibbles[2] != insn_x; ) opx++;
+ print_movxy (opx, ((insn >> 9) & 1) + 4, (insn >> 7) & 1,
+ fprintf_fn, stream);
+ }
+ insn_y = (insn & 3) | ((insn >> 1) & 8);
+ if (insn_y)
+ {
+ if (insn_x)
+ fprintf_fn (stream, "\t");
+ for (opy = first_movy; opy->nibbles[2] != insn_y; ) opy++;
+ print_movxy (opy, ((insn >> 8) & 1) + 6, (insn >> 6) & 1,
+ fprintf_fn, stream);
+ }
+ }
+}
+
+static void
+print_dsp_reg (rm, fprintf_fn, stream)
+ int rm;
+ fprintf_ftype fprintf_fn;
+ void *stream;
+{
+ switch (rm)
+ {
+ case A_A1_NUM:
+ fprintf_fn (stream, "a1");
+ break;
+ case A_A0_NUM:
+ fprintf_fn (stream, "a0");
+ break;
+ case A_X0_NUM:
+ fprintf_fn (stream, "x0");
+ break;
+ case A_X1_NUM:
+ fprintf_fn (stream, "x1");
+ break;
+ case A_Y0_NUM:
+ fprintf_fn (stream, "y0");
+ break;
+ case A_Y1_NUM:
+ fprintf_fn (stream, "y1");
+ break;
+ case A_M0_NUM:
+ fprintf_fn (stream, "m0");
+ break;
+ case A_A1G_NUM:
+ fprintf_fn (stream, "a1g");
+ break;
+ case A_M1_NUM:
+ fprintf_fn (stream, "m1");
+ break;
+ case A_A0G_NUM:
+ fprintf_fn (stream, "a0g");
+ break;
+ default:
+ fprintf_fn (stream, "0x%x", rm);
+ break;
+ }
+}
+
+static void
+print_insn_ppi (field_b, info)
+ int field_b;
+ struct disassemble_info *info;
+{
+ static char *sx_tab[] = {"x0","x1","a0","a1"};
+ static char *sy_tab[] = {"y0","y1","m0","m1"};
+ fprintf_ftype fprintf_fn = info->fprintf_func;
+ void *stream = info->stream;
+ int nib1, nib2, nib3;
+ char *dc;
+ sh_opcode_info *op;
+
+ if ((field_b & 0xe800) == 0)
+ {
+ fprintf_fn (stream, "psh%c\t#%d,",
+ field_b & 0x1000 ? 'a' : 'l',
+ (field_b >> 4) & 127);
+ print_dsp_reg (field_b & 0xf, fprintf_fn, stream);
+ return;
+ }
+ if ((field_b & 0xc000) == 0x4000 && (field_b & 0x3000) != 0x1000)
+ {
+ static char *du_tab[] = {"x0","y0","a0","a1"};
+ static char *se_tab[] = {"x0","x1","y0","a1"};
+ static char *sf_tab[] = {"y0","y1","x0","a1"};
+ static char *sg_tab[] = {"m0","m1","a0","a1"};
+
+ if (field_b & 0x2000)
+ {
+ fprintf_fn (stream, "p%s %s,%s,%s\t",
+ (field_b & 0x1000) ? "add" : "sub",
+ sx_tab[(field_b >> 6) & 3],
+ sy_tab[(field_b >> 4) & 3],
+ du_tab[(field_b >> 0) & 3]);
+ }
+ fprintf_fn (stream, "pmuls%c%s,%s,%s",
+ field_b & 0x2000 ? ' ' : '\t',
+ se_tab[(field_b >> 10) & 3],
+ sf_tab[(field_b >> 8) & 3],
+ sg_tab[(field_b >> 2) & 3]);
+ return;
+ }
+
+ nib1 = PPIC;
+ nib2 = field_b >> 12 & 0xf;
+ nib3 = field_b >> 8 & 0xf;
+ switch (nib3 & 0x3)
+ {
+ case 0:
+ dc = "";
+ nib1 = PPI3;
+ break;
+ case 1:
+ dc = "";
+ break;
+ case 2:
+ dc = "dct ";
+ nib3 -= 1;
+ break;
+ case 3:
+ dc = "dcf ";
+ nib3 -= 2;
+ break;
+ }
+ for (op = sh_table; op->name; op++)
+ {
+ if (op->nibbles[1] == nib1
+ && op->nibbles[2] == nib2
+ && op->nibbles[3] == nib3)
+ {
+ int n;
+
+ fprintf_fn (stream, "%s%s\t", dc, op->name);
+ for (n = 0; n < 3 && op->arg[n] != A_END; n++)
+ {
+ if (n && op->arg[1] != A_END)
+ fprintf_fn (stream, ",");
+ switch (op->arg[n])
+ {
+ case DSP_REG_N:
+ print_dsp_reg (field_b & 0xf, fprintf_fn, stream);
+ break;
+ case DSP_REG_X:
+ fprintf_fn (stream, sx_tab[(field_b >> 6) & 3]);
+ break;
+ case DSP_REG_Y:
+ fprintf_fn (stream, sy_tab[(field_b >> 4) & 3]);
+ break;
+ case A_MACH:
+ fprintf_fn (stream, "mach");
+ break;
+ case A_MACL:
+ fprintf_fn (stream ,"macl");
+ break;
+ default:
+ abort ();
+ }
+ }
+ return;
+ }
+ }
+ /* Not found. */
+ fprintf_fn (stream, ".word 0x%x", field_b);
+}
+
static int
print_insn_shx (memaddr, info)
bfd_vma memaddr;
@@ -36,6 +287,34 @@ print_insn_shx (memaddr, info)
int status;
bfd_vma relmask = ~ (bfd_vma) 0;
sh_opcode_info *op;
+ int target_arch;
+
+ switch (info->mach)
+ {
+ case bfd_mach_sh:
+ target_arch = arch_sh1;
+ break;
+ case bfd_mach_sh2:
+ target_arch = arch_sh2;
+ break;
+ case bfd_mach_sh_dsp:
+ target_arch = arch_sh_dsp;
+ break;
+ case bfd_mach_sh3:
+ target_arch = arch_sh3;
+ break;
+ case bfd_mach_sh3_dsp:
+ target_arch = arch_sh3_dsp;
+ break;
+ case bfd_mach_sh3e:
+ target_arch = arch_sh3e;
+ break;
+ case bfd_mach_sh4:
+ target_arch = arch_sh4;
+ break;
+ default:
+ abort ();
+ }
status = info->read_memory_func (memaddr, insn, 2, info);
@@ -62,6 +341,32 @@ print_insn_shx (memaddr, info)
nibs[3] = insn[1] & 0xf;
}
+ if (nibs[0] == 0xf && (nibs[1] & 4) == 0 && target_arch & arch_sh_dsp_up)
+ {
+ if (nibs[1] & 8)
+ {
+ int field_b;
+
+ status = info->read_memory_func (memaddr + 2, insn, 2, info);
+
+ if (status != 0)
+ {
+ info->memory_error_func (status, memaddr + 2, info);
+ return -1;
+ }
+
+ if (info->flags & LITTLE_BIT)
+ field_b = insn[1] << 8 | insn[0];
+ else
+ field_b = insn[0] << 8 | insn[1];
+
+ print_insn_ppi (field_b, info);
+ print_insn_ddt ((nibs[1] << 8) | (nibs[2] << 4) | nibs[3], info);
+ return 4;
+ }
+ print_insn_ddt ((nibs[1] << 8) | (nibs[2] << 4) | nibs[3], info);
+ return 2;
+ }
for (op = sh_table; op->name; op++)
{
int n;
@@ -72,6 +377,8 @@ print_insn_shx (memaddr, info)
int disp_pc;
bfd_vma disp_pc_addr = 0;
+ if ((op->arch & target_arch) == 0)
+ goto fail;
for (n = 0; n < 4; n++)
{
int i = op->nibbles[n];
@@ -141,6 +448,16 @@ print_insn_shx (memaddr, info)
case REG_B:
rb = nibs[n] & 0x07;
break;
+ case SDT_REG_N:
+ /* sh-dsp: single data transfer. */
+ rn = nibs[n];
+ if ((rn & 0xc) != 4)
+ goto fail;
+ rn = rn & 0x3;
+ rn |= (rn & 2) << 1;
+ break;
+ case PPI:
+ goto fail;
default:
abort();
}
@@ -176,6 +493,9 @@ print_insn_shx (memaddr, info)
case A_DISP_REG_N:
fprintf_fn (stream, "@(%d,r%d)", imm, rn);
break;
+ case A_PMOD_N:
+ fprintf_fn (stream, "@r%d+r8", rn);
+ break;
case A_REG_M:
fprintf_fn (stream, "r%d", rm);
break;
@@ -224,6 +544,36 @@ print_insn_shx (memaddr, info)
case A_VBR:
fprintf_fn (stream, "vbr");
break;
+ case A_DSR:
+ fprintf_fn (stream, "dsr");
+ break;
+ case A_MOD:
+ fprintf_fn (stream, "mod");
+ break;
+ case A_RE:
+ fprintf_fn (stream, "re");
+ break;
+ case A_RS:
+ fprintf_fn (stream, "rs");
+ break;
+ case A_A0:
+ fprintf_fn (stream, "a0");
+ break;
+ case A_X0:
+ fprintf_fn (stream, "x0");
+ break;
+ case A_X1:
+ fprintf_fn (stream, "x1");
+ break;
+ case A_Y0:
+ fprintf_fn (stream, "y0");
+ break;
+ case A_Y1:
+ fprintf_fn (stream, "y1");
+ break;
+ case DSP_REG_M:
+ print_dsp_reg (rm, fprintf_fn, stream);
+ break;
case A_SSR:
fprintf_fn (stream, "ssr");
break;
@@ -245,9 +595,6 @@ print_insn_shx (memaddr, info)
case A_DBR:
fprintf_fn (stream, "dbr");
break;
- case FD_REG_N:
- if (0)
- goto d_reg_n;
case F_REG_N:
fprintf_fn (stream, "fr%d", rn);
break;
diff --git a/contrib/binutils/opcodes/sh-opc.h b/contrib/binutils/opcodes/sh-opc.h
index dc1aae5..38bfbcd 100644
--- a/contrib/binutils/opcodes/sh-opc.h
+++ b/contrib/binutils/opcodes/sh-opc.h
@@ -34,6 +34,7 @@ typedef enum {
HEX_F,
REG_N,
REG_M,
+ SDT_REG_N,
REG_NM,
REG_B,
BRANCH_12,
@@ -47,7 +48,17 @@ typedef enum {
PCRELIMM_8BY4,
IMM_8,
IMM_8BY2,
- IMM_8BY4
+ IMM_8BY4,
+ PPI,
+ NOPX,
+ NOPY,
+ MOVX,
+ MOVY,
+ PSH,
+ PMUL,
+ PPI3,
+ PDC,
+ PPIC
} sh_nibble_type;
typedef enum {
@@ -66,6 +77,8 @@ typedef enum {
A_INC_N,
A_IND_M,
A_IND_N,
+ A_PMOD_N,
+ A_PMODY_N,
A_IND_R0_REG_M,
A_IND_R0_REG_N,
A_MACH,
@@ -78,6 +91,22 @@ typedef enum {
A_REG_B,
A_SR,
A_VBR,
+ A_MOD,
+ A_RE,
+ A_RS,
+ A_DSR,
+ DSP_REG_M,
+ DSP_REG_N,
+ DSP_REG_X,
+ DSP_REG_Y,
+ DSP_REG_E,
+ DSP_REG_F,
+ DSP_REG_G,
+ A_A0,
+ A_X0,
+ A_X1,
+ A_Y0,
+ A_Y1,
A_SSR,
A_SPC,
A_SGR,
@@ -92,7 +121,6 @@ typedef enum {
DX_REG_M,
V_REG_N,
V_REG_M,
- FD_REG_N,
XMTRX_M4,
F_FR0,
FPUL_N,
@@ -101,471 +129,700 @@ typedef enum {
FPSCR_M
} sh_arg_type;
+typedef enum {
+ A_A1_NUM = 5,
+ A_A0_NUM = 7,
+ A_X0_NUM, A_X1_NUM, A_Y0_NUM, A_Y1_NUM,
+ A_M0_NUM, A_A1G_NUM, A_M1_NUM, A_A0G_NUM
+} sh_dsp_reg_nums;
+
+#define arch_sh1 0x0001
+#define arch_sh2 0x0002
+#define arch_sh3 0x0004
+#define arch_sh3e 0x0008
+#define arch_sh4 0x0010
+#define arch_sh_dsp 0x0100
+#define arch_sh3_dsp 0x0200
+
+#define arch_sh1_up (arch_sh1 | arch_sh2_up)
+#define arch_sh2_up (arch_sh2 | arch_sh3_up | arch_sh_dsp)
+#define arch_sh3_up (arch_sh3 | arch_sh3e_up | arch_sh3_dsp)
+#define arch_sh3e_up (arch_sh3e | arch_sh4_up)
+#define arch_sh4_up arch_sh4
+
+#define arch_sh_dsp_up (arch_sh_dsp | arch_sh3_dsp_up)
+#define arch_sh3_dsp_up arch_sh3_dsp
+
typedef struct {
char *name;
sh_arg_type arg[4];
sh_nibble_type nibbles[4];
+ int arch;
} sh_opcode_info;
#ifdef DEFINE_TABLE
sh_opcode_info sh_table[] = {
-/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM_8}},
+/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM_8}, arch_sh1_up},
+
+/* 0011nnnnmmmm1100 add <REG_M>,<REG_N> */{"add",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_C}, arch_sh1_up},
+
+/* 0011nnnnmmmm1110 addc <REG_M>,<REG_N>*/{"addc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_E}, arch_sh1_up},
+
+/* 0011nnnnmmmm1111 addv <REG_M>,<REG_N>*/{"addv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_F}, arch_sh1_up},
+
+/* 11001001i8*1.... and #<imm>,R0 */{"and",{A_IMM,A_R0},{HEX_C,HEX_9,IMM_8}, arch_sh1_up},
+
+/* 0010nnnnmmmm1001 and <REG_M>,<REG_N> */{"and",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_9}, arch_sh1_up},
+
+/* 11001101i8*1.... and.b #<imm>,@(R0,GBR)*/{"and.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_D,IMM_8}, arch_sh1_up},
+
+/* 1010i12......... bra <bdisp12> */{"bra",{A_BDISP12},{HEX_A,BRANCH_12}, arch_sh1_up},
+
+/* 1011i12......... bsr <bdisp12> */{"bsr",{A_BDISP12},{HEX_B,BRANCH_12}, arch_sh1_up},
+
+/* 10001001i8p1.... bt <bdisp8> */{"bt",{A_BDISP8},{HEX_8,HEX_9,BRANCH_8}, arch_sh1_up},
+
+/* 10001011i8p1.... bf <bdisp8> */{"bf",{A_BDISP8},{HEX_8,HEX_B,BRANCH_8}, arch_sh1_up},
+
+/* 10001101i8p1.... bt.s <bdisp8> */{"bt.s",{A_BDISP8},{HEX_8,HEX_D,BRANCH_8}, arch_sh2_up},
+
+/* 10001101i8p1.... bt/s <bdisp8> */{"bt/s",{A_BDISP8},{HEX_8,HEX_D,BRANCH_8}, arch_sh2_up},
+
+/* 10001111i8p1.... bf.s <bdisp8> */{"bf.s",{A_BDISP8},{HEX_8,HEX_F,BRANCH_8}, arch_sh2_up},
+
+/* 10001111i8p1.... bf/s <bdisp8> */{"bf/s",{A_BDISP8},{HEX_8,HEX_F,BRANCH_8}, arch_sh2_up},
+
+/* 0000000000101000 clrmac */{"clrmac",{0},{HEX_0,HEX_0,HEX_2,HEX_8}, arch_sh1_up},
+
+/* 0000000001001000 clrs */{"clrs",{0},{HEX_0,HEX_0,HEX_4,HEX_8}, arch_sh1_up},
+
+/* 0000000000001000 clrt */{"clrt",{0},{HEX_0,HEX_0,HEX_0,HEX_8}, arch_sh1_up},
+
+/* 10001000i8*1.... cmp/eq #<imm>,R0 */{"cmp/eq",{A_IMM,A_R0},{HEX_8,HEX_8,IMM_8}, arch_sh1_up},
+
+/* 0011nnnnmmmm0000 cmp/eq <REG_M>,<REG_N>*/{"cmp/eq",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_0}, arch_sh1_up},
+
+/* 0011nnnnmmmm0011 cmp/ge <REG_M>,<REG_N>*/{"cmp/ge",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_3}, arch_sh1_up},
+
+/* 0011nnnnmmmm0111 cmp/gt <REG_M>,<REG_N>*/{"cmp/gt",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_7}, arch_sh1_up},
+
+/* 0011nnnnmmmm0110 cmp/hi <REG_M>,<REG_N>*/{"cmp/hi",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_6}, arch_sh1_up},
+
+/* 0011nnnnmmmm0010 cmp/hs <REG_M>,<REG_N>*/{"cmp/hs",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_2}, arch_sh1_up},
+
+/* 0100nnnn00010101 cmp/pl <REG_N> */{"cmp/pl",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_5}, arch_sh1_up},
+
+/* 0100nnnn00010001 cmp/pz <REG_N> */{"cmp/pz",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_1}, arch_sh1_up},
+
+/* 0010nnnnmmmm1100 cmp/str <REG_M>,<REG_N>*/{"cmp/str",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_C}, arch_sh1_up},
+
+/* 0010nnnnmmmm0111 div0s <REG_M>,<REG_N>*/{"div0s",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_7}, arch_sh1_up},
+
+/* 0000000000011001 div0u */{"div0u",{0},{HEX_0,HEX_0,HEX_1,HEX_9}, arch_sh1_up},
+
+/* 0011nnnnmmmm0100 div1 <REG_M>,<REG_N>*/{"div1",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_4}, arch_sh1_up},
+
+/* 0110nnnnmmmm1110 exts.b <REG_M>,<REG_N>*/{"exts.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_E}, arch_sh1_up},
+
+/* 0110nnnnmmmm1111 exts.w <REG_M>,<REG_N>*/{"exts.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_F}, arch_sh1_up},
+
+/* 0110nnnnmmmm1100 extu.b <REG_M>,<REG_N>*/{"extu.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_C}, arch_sh1_up},
+
+/* 0110nnnnmmmm1101 extu.w <REG_M>,<REG_N>*/{"extu.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_D}, arch_sh1_up},
+
+/* 0100nnnn00101011 jmp @<REG_N> */{"jmp",{A_IND_N},{HEX_4,REG_N,HEX_2,HEX_B}, arch_sh1_up},
+
+/* 0100nnnn00001011 jsr @<REG_N> */{"jsr",{A_IND_N},{HEX_4,REG_N,HEX_0,HEX_B}, arch_sh1_up},
+
+/* 0100nnnn00001110 ldc <REG_N>,SR */{"ldc",{A_REG_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_E}, arch_sh1_up},
+
+/* 0100nnnn00011110 ldc <REG_N>,GBR */{"ldc",{A_REG_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_E}, arch_sh1_up},
+
+/* 0100nnnn00101110 ldc <REG_N>,VBR */{"ldc",{A_REG_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_E}, arch_sh1_up},
+
+/* 0100nnnn01011110 ldc <REG_N>,MOD */{"ldc",{A_REG_N,A_MOD},{HEX_4,REG_N,HEX_5,HEX_E}, arch_sh_dsp_up},
+
+/* 0100nnnn01111110 ldc <REG_N>,RE */{"ldc",{A_REG_N,A_RE},{HEX_4,REG_N,HEX_7,HEX_E}, arch_sh_dsp_up},
+
+/* 0100nnnn01101110 ldc <REG_N>,RS */{"ldc",{A_REG_N,A_RS},{HEX_4,REG_N,HEX_6,HEX_E}, arch_sh_dsp_up},
+
+/* 0100nnnn00111110 ldc <REG_N>,SSR */{"ldc",{A_REG_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_E}, arch_sh3_up},
+
+/* 0100nnnn01001110 ldc <REG_N>,SPC */{"ldc",{A_REG_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_E}, arch_sh3_up},
+
+/* 0100nnnn11111010 ldc <REG_N>,DBR */{"ldc",{A_REG_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_A}, arch_sh4_up},
+
+/* 0100nnnn1xxx1110 ldc <REG_N>,Rn_BANK */{"ldc",{A_REG_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_E}, arch_sh3_up},
+
+/* 0100nnnn00000111 ldc.l @<REG_N>+,SR */{"ldc.l",{A_INC_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_7}, arch_sh1_up},
+
+/* 0100nnnn00010111 ldc.l @<REG_N>+,GBR */{"ldc.l",{A_INC_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_7}, arch_sh1_up},
+
+/* 0100nnnn00100111 ldc.l @<REG_N>+,VBR */{"ldc.l",{A_INC_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_7}, arch_sh1_up},
+
+/* 0100nnnn01010111 ldc.l @<REG_N>+,MOD */{"ldc.l",{A_INC_N,A_MOD},{HEX_4,REG_N,HEX_5,HEX_7}, arch_sh_dsp_up},
+
+/* 0100nnnn01110111 ldc.l @<REG_N>+,RE */{"ldc.l",{A_INC_N,A_RE},{HEX_4,REG_N,HEX_7,HEX_7}, arch_sh_dsp_up},
+
+/* 0100nnnn01100111 ldc.l @<REG_N>+,RS */{"ldc.l",{A_INC_N,A_RS},{HEX_4,REG_N,HEX_6,HEX_7}, arch_sh_dsp_up},
+
+/* 0100nnnn00110111 ldc.l @<REG_N>+,SSR */{"ldc.l",{A_INC_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_7}, arch_sh3_up},
+
+/* 0100nnnn01000111 ldc.l @<REG_N>+,SPC */{"ldc.l",{A_INC_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_7}, arch_sh3_up},
+
+/* 0100nnnn11110110 ldc.l @<REG_N>+,DBR */{"ldc.l",{A_INC_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_6}, arch_sh4_up},
+
+/* 0100nnnn1xxx0111 ldc.l <REG_N>,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}, arch_sh3_up},
+
+/* 10001110i8p2.... ldre @(<disp>,PC) */{"ldre",{A_BDISP8},{HEX_8,HEX_E,BRANCH_8}, arch_sh_dsp_up},
-/* 0011nnnnmmmm1100 add <REG_M>,<REG_N> */{"add",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_C}},
+/* 10001100i8p2.... ldrs @(<disp>,PC) */{"ldrs",{A_BDISP8},{HEX_8,HEX_C,BRANCH_8}, arch_sh_dsp_up},
-/* 0011nnnnmmmm1110 addc <REG_M>,<REG_N>*/{"addc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_E}},
+/* 0100nnnn00001010 lds <REG_N>,MACH */{"lds",{A_REG_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_A}, arch_sh1_up},
-/* 0011nnnnmmmm1111 addv <REG_M>,<REG_N>*/{"addv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_F}},
+/* 0100nnnn00011010 lds <REG_N>,MACL */{"lds",{A_REG_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_A}, arch_sh1_up},
-/* 11001001i8*1.... and #<imm>,R0 */{"and",{A_IMM,A_R0},{HEX_C,HEX_9,IMM_8}},
+/* 0100nnnn00101010 lds <REG_N>,PR */{"lds",{A_REG_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_A}, arch_sh1_up},
-/* 0010nnnnmmmm1001 and <REG_M>,<REG_N> */{"and",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_9}},
+/* 0100nnnn01101010 lds <REG_N>,DSR */{"lds",{A_REG_N,A_DSR},{HEX_4,REG_N,HEX_6,HEX_A}, arch_sh_dsp_up},
-/* 11001101i8*1.... and.b #<imm>,@(R0,GBR)*/{"and.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_D,IMM_8}},
+/* 0100nnnn01111010 lds <REG_N>,A0 */{"lds",{A_REG_N,A_A0},{HEX_4,REG_N,HEX_7,HEX_A}, arch_sh_dsp_up},
-/* 1010i12......... bra <bdisp12> */{"bra",{A_BDISP12},{HEX_A,BRANCH_12}},
+/* 0100nnnn10001010 lds <REG_N>,X0 */{"lds",{A_REG_N,A_X0},{HEX_4,REG_N,HEX_8,HEX_A}, arch_sh_dsp_up},
-/* 1011i12......... bsr <bdisp12> */{"bsr",{A_BDISP12},{HEX_B,BRANCH_12}},
+/* 0100nnnn10011010 lds <REG_N>,X1 */{"lds",{A_REG_N,A_X1},{HEX_4,REG_N,HEX_9,HEX_A}, arch_sh_dsp_up},
-/* 10001001i8p1.... bt <bdisp8> */{"bt",{A_BDISP8},{HEX_8,HEX_9,BRANCH_8}},
+/* 0100nnnn10101010 lds <REG_N>,Y0 */{"lds",{A_REG_N,A_Y0},{HEX_4,REG_N,HEX_A,HEX_A}, arch_sh_dsp_up},
-/* 10001011i8p1.... bf <bdisp8> */{"bf",{A_BDISP8},{HEX_8,HEX_B,BRANCH_8}},
+/* 0100nnnn10111010 lds <REG_N>,Y1 */{"lds",{A_REG_N,A_Y1},{HEX_4,REG_N,HEX_B,HEX_A}, arch_sh_dsp_up},
-/* 10001101i8p1.... bt.s <bdisp8> */{"bt.s",{A_BDISP8},{HEX_8,HEX_D,BRANCH_8}},
+/* 0100nnnn01011010 lds <REG_N>,FPUL */{"lds",{A_REG_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_A}, arch_sh3e_up},
-/* 10001101i8p1.... bt/s <bdisp8> */{"bt/s",{A_BDISP8},{HEX_8,HEX_D,BRANCH_8}},
+/* 0100nnnn01101010 lds <REG_M>,FPSCR */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}, arch_sh3e_up},
-/* 10001111i8p1.... bf.s <bdisp8> */{"bf.s",{A_BDISP8},{HEX_8,HEX_F,BRANCH_8}},
+/* 0100nnnn00000110 lds.l @<REG_N>+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}, arch_sh1_up},
-/* 10001111i8p1.... bf/s <bdisp8> */{"bf/s",{A_BDISP8},{HEX_8,HEX_F,BRANCH_8}},
+/* 0100nnnn00010110 lds.l @<REG_N>+,MACL*/{"lds.l",{A_INC_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_6}, arch_sh1_up},
-/* 0000000000101000 clrmac */{"clrmac",{0},{HEX_0,HEX_0,HEX_2,HEX_8}},
+/* 0100nnnn00100110 lds.l @<REG_N>+,PR */{"lds.l",{A_INC_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_6}, arch_sh1_up},
-/* 0000000001001000 clrs */{"clrs",{0},{HEX_0,HEX_0,HEX_4,HEX_8}},
+/* 0100nnnn01100110 lds.l @<REG_N>+,DSR */{"lds.l",{A_INC_N,A_DSR},{HEX_4,REG_N,HEX_6,HEX_6}, arch_sh_dsp_up},
-/* 0000000000001000 clrt */{"clrt",{0},{HEX_0,HEX_0,HEX_0,HEX_8}},
+/* 0100nnnn01110110 lds.l @<REG_N>+,A0 */{"lds.l",{A_INC_N,A_A0},{HEX_4,REG_N,HEX_7,HEX_6}, arch_sh_dsp_up},
-/* 10001000i8*1.... cmp/eq #<imm>,R0 */{"cmp/eq",{A_IMM,A_R0},{HEX_8,HEX_8,IMM_8}},
+/* 0100nnnn10000110 lds.l @<REG_N>+,X0 */{"lds.l",{A_INC_N,A_X0},{HEX_4,REG_N,HEX_8,HEX_6}, arch_sh_dsp_up},
-/* 0011nnnnmmmm0000 cmp/eq <REG_M>,<REG_N>*/{"cmp/eq",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_0}},
+/* 0100nnnn10010110 lds.l @<REG_N>+,X1 */{"lds.l",{A_INC_N,A_X1},{HEX_4,REG_N,HEX_9,HEX_6}, arch_sh_dsp_up},
-/* 0011nnnnmmmm0011 cmp/ge <REG_M>,<REG_N>*/{"cmp/ge",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_3}},
+/* 0100nnnn10100110 lds.l @<REG_N>+,Y0 */{"lds.l",{A_INC_N,A_Y0},{HEX_4,REG_N,HEX_A,HEX_6}, arch_sh_dsp_up},
-/* 0011nnnnmmmm0111 cmp/gt <REG_M>,<REG_N>*/{"cmp/gt",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_7}},
+/* 0100nnnn10110110 lds.l @<REG_N>+,Y1 */{"lds.l",{A_INC_N,A_Y1},{HEX_4,REG_N,HEX_B,HEX_6}, arch_sh_dsp_up},
-/* 0011nnnnmmmm0110 cmp/hi <REG_M>,<REG_N>*/{"cmp/hi",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_6}},
+/* 0100nnnn01010110 lds.l @<REG_M>+,FPUL*/{"lds.l",{A_INC_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_6}, arch_sh3e_up},
-/* 0011nnnnmmmm0010 cmp/hs <REG_M>,<REG_N>*/{"cmp/hs",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_2}},
+/* 0100nnnn01100110 lds.l @<REG_M>+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}, arch_sh3e_up},
-/* 0100nnnn00010101 cmp/pl <REG_N> */{"cmp/pl",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_5}},
+/* 0000000000111000 ldtlb */{"ldtlb",{0},{HEX_0,HEX_0,HEX_3,HEX_8}, arch_sh3_up},
-/* 0100nnnn00010001 cmp/pz <REG_N> */{"cmp/pz",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_1}},
+/* 0100nnnnmmmm1111 mac.w @<REG_M>+,@<REG_N>+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}, arch_sh1_up},
-/* 0010nnnnmmmm1100 cmp/str <REG_M>,<REG_N>*/{"cmp/str",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_C}},
+/* 1110nnnni8*1.... mov #<imm>,<REG_N> */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM_8}, arch_sh1_up},
-/* 0010nnnnmmmm0111 div0s <REG_M>,<REG_N>*/{"div0s",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_7}},
+/* 0110nnnnmmmm0011 mov <REG_M>,<REG_N> */{"mov",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_3}, arch_sh1_up},
-/* 0000000000011001 div0u */{"div0u",{0},{HEX_0,HEX_0,HEX_1,HEX_9}},
+/* 0000nnnnmmmm0100 mov.b <REG_M>,@(R0,<REG_N>)*/{"mov.b",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_4}, arch_sh1_up},
-/* 0011nnnnmmmm0100 div1 <REG_M>,<REG_N>*/{"div1",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_4}},
+/* 0010nnnnmmmm0100 mov.b <REG_M>,@-<REG_N>*/{"mov.b",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_4}, arch_sh1_up},
-/* 0110nnnnmmmm1110 exts.b <REG_M>,<REG_N>*/{"exts.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_E}},
+/* 0010nnnnmmmm0000 mov.b <REG_M>,@<REG_N>*/{"mov.b",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_0}, arch_sh1_up},
-/* 0110nnnnmmmm1111 exts.w <REG_M>,<REG_N>*/{"exts.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_F}},
+/* 10000100mmmmi4*1 mov.b @(<disp>,<REG_M>),R0*/{"mov.b",{A_DISP_REG_M,A_R0},{HEX_8,HEX_4,REG_M,IMM_4}, arch_sh1_up},
-/* 0110nnnnmmmm1100 extu.b <REG_M>,<REG_N>*/{"extu.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_C}},
+/* 11000100i8*1.... mov.b @(<disp>,GBR),R0*/{"mov.b",{A_DISP_GBR,A_R0},{HEX_C,HEX_4,IMM_8}, arch_sh1_up},
-/* 0110nnnnmmmm1101 extu.w <REG_M>,<REG_N>*/{"extu.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_D}},
+/* 0000nnnnmmmm1100 mov.b @(R0,<REG_M>),<REG_N>*/{"mov.b",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_C}, arch_sh1_up},
-/* 0100nnnn00101011 jmp @<REG_N> */{"jmp",{A_IND_N},{HEX_4,REG_N,HEX_2,HEX_B}},
+/* 0110nnnnmmmm0100 mov.b @<REG_M>+,<REG_N>*/{"mov.b",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_4}, arch_sh1_up},
-/* 0100nnnn00001011 jsr @<REG_N> */{"jsr",{A_IND_N},{HEX_4,REG_N,HEX_0,HEX_B}},
+/* 0110nnnnmmmm0000 mov.b @<REG_M>,<REG_N>*/{"mov.b",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_0}, arch_sh1_up},
-/* 0100nnnn00001110 ldc <REG_N>,SR */{"ldc",{A_REG_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_E}},
+/* 10000000mmmmi4*1 mov.b R0,@(<disp>,<REG_M>)*/{"mov.b",{A_R0,A_DISP_REG_M},{HEX_8,HEX_0,REG_M,IMM_4}, arch_sh1_up},
-/* 0100nnnn00011110 ldc <REG_N>,GBR */{"ldc",{A_REG_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_E}},
+/* 11000000i8*1.... mov.b R0,@(<disp>,GBR)*/{"mov.b",{A_R0,A_DISP_GBR},{HEX_C,HEX_0,IMM_8}, arch_sh1_up},
-/* 0100nnnn00101110 ldc <REG_N>,VBR */{"ldc",{A_REG_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_E}},
+/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM_4BY4}, arch_sh1_up},
-/* 0100nnnn00111110 ldc <REG_N>,SSR */{"ldc",{A_REG_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_E}},
+/* 0000nnnnmmmm0110 mov.l <REG_M>,@(R0,<REG_N>)*/{"mov.l",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_6}, arch_sh1_up},
-/* 0100nnnn01001110 ldc <REG_N>,SPC */{"ldc",{A_REG_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_E}},
+/* 0010nnnnmmmm0110 mov.l <REG_M>,@-<REG_N>*/{"mov.l",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_6}, arch_sh1_up},
-/* 0100nnnn01111110 ldc <REG_N>,DBR */{"ldc",{A_REG_N,A_DBR},{HEX_4,REG_N,HEX_7,HEX_E}},
+/* 0010nnnnmmmm0010 mov.l <REG_M>,@<REG_N>*/{"mov.l",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_2}, arch_sh1_up},
-/* 0100nnnn1xxx1110 ldc <REG_N>,Rn_BANK */{"ldc",{A_REG_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_E}},
+/* 0101nnnnmmmmi4*4 mov.l @(<disp>,<REG_M>),<REG_N>*/{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_5,REG_N,REG_M,IMM_4BY4}, arch_sh1_up},
-/* 0100nnnn00000111 ldc.l @<REG_N>+,SR */{"ldc.l",{A_INC_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_7}},
+/* 11000110i8*4.... mov.l @(<disp>,GBR),R0*/{"mov.l",{A_DISP_GBR,A_R0},{HEX_C,HEX_6,IMM_8BY4}, arch_sh1_up},
-/* 0100nnnn00010111 ldc.l @<REG_N>+,GBR */{"ldc.l",{A_INC_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_7}},
+/* 1101nnnni8p4.... mov.l @(<disp>,PC),<REG_N>*/{"mov.l",{A_DISP_PC,A_REG_N},{HEX_D,REG_N,PCRELIMM_8BY4}, arch_sh1_up},
-/* 0100nnnn00100111 ldc.l @<REG_N>+,VBR */{"ldc.l",{A_INC_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_7}},
+/* 0000nnnnmmmm1110 mov.l @(R0,<REG_M>),<REG_N>*/{"mov.l",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_E}, arch_sh1_up},
-/* 0100nnnn00110111 ldc.l @<REG_N>+,SSR */{"ldc.l",{A_INC_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_7}},
+/* 0110nnnnmmmm0110 mov.l @<REG_M>+,<REG_N>*/{"mov.l",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_6}, arch_sh1_up},
-/* 0100nnnn01000111 ldc.l @<REG_N>+,SPC */{"ldc.l",{A_INC_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_7}},
+/* 0110nnnnmmmm0010 mov.l @<REG_M>,<REG_N>*/{"mov.l",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_2}, arch_sh1_up},
-/* 0100nnnn01110111 ldc.l @<REG_N>+,DBR */{"ldc.l",{A_INC_N,A_DBR},{HEX_4,REG_N,HEX_7,HEX_7}},
+/* 11000010i8*4.... mov.l R0,@(<disp>,GBR)*/{"mov.l",{A_R0,A_DISP_GBR},{HEX_C,HEX_2,IMM_8BY4}, arch_sh1_up},
-/* 0100nnnn1xxx0111 ldc.l <REG_N>,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}},
+/* 0000nnnnmmmm0101 mov.w <REG_M>,@(R0,<REG_N>)*/{"mov.w",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_5}, arch_sh1_up},
-/* 0100nnnn00001010 lds <REG_N>,MACH */{"lds",{A_REG_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_A}},
+/* 0010nnnnmmmm0101 mov.w <REG_M>,@-<REG_N>*/{"mov.w",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_5}, arch_sh1_up},
-/* 0100nnnn00011010 lds <REG_N>,MACL */{"lds",{A_REG_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_A}},
+/* 0010nnnnmmmm0001 mov.w <REG_M>,@<REG_N>*/{"mov.w",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_1}, arch_sh1_up},
-/* 0100nnnn00101010 lds <REG_N>,PR */{"lds",{A_REG_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_A}},
+/* 10000101mmmmi4*2 mov.w @(<disp>,<REG_M>),R0*/{"mov.w",{A_DISP_REG_M,A_R0},{HEX_8,HEX_5,REG_M,IMM_4BY2}, arch_sh1_up},
-/* 0100nnnn01011010 lds <REG_N>,FPUL */{"lds",{A_REG_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_A}},
+/* 11000101i8*2.... mov.w @(<disp>,GBR),R0*/{"mov.w",{A_DISP_GBR,A_R0},{HEX_C,HEX_5,IMM_8BY2}, arch_sh1_up},
-/* 0100nnnn01101010 lds <REG_M>,FPSCR */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}},
+/* 1001nnnni8p2.... mov.w @(<disp>,PC),<REG_N>*/{"mov.w",{A_DISP_PC,A_REG_N},{HEX_9,REG_N,PCRELIMM_8BY2}, arch_sh1_up},
-/* 0100nnnn00000110 lds.l @<REG_N>+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}},
+/* 0000nnnnmmmm1101 mov.w @(R0,<REG_M>),<REG_N>*/{"mov.w",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_D}, arch_sh1_up},
-/* 0100nnnn00010110 lds.l @<REG_N>+,MACL*/{"lds.l",{A_INC_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_6}},
+/* 0110nnnnmmmm0101 mov.w @<REG_M>+,<REG_N>*/{"mov.w",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_5}, arch_sh1_up},
-/* 0100nnnn00100110 lds.l @<REG_N>+,PR */{"lds.l",{A_INC_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_6}},
+/* 0110nnnnmmmm0001 mov.w @<REG_M>,<REG_N>*/{"mov.w",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_1}, arch_sh1_up},
-/* 0100nnnn01010110 lds.l @<REG_M>+,FPUL*/{"lds.l",{A_INC_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_6}},
+/* 10000001mmmmi4*2 mov.w R0,@(<disp>,<REG_M>)*/{"mov.w",{A_R0,A_DISP_REG_M},{HEX_8,HEX_1,REG_M,IMM_4BY2}, arch_sh1_up},
-/* 0100nnnn01100110 lds.l @<REG_M>+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}},
+/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM_8BY2}, arch_sh1_up},
-/* 0000000000111000 ldtlb */{"ldtlb",{0},{HEX_0,HEX_0,HEX_3,HEX_8}},
+/* 11000111i8p4.... mova @(<disp>,PC),R0*/{"mova",{A_DISP_PC,A_R0},{HEX_C,HEX_7,PCRELIMM_8BY4}, arch_sh1_up},
+/* 0000nnnn11000011 movca.l R0,@<REG_N> */{"movca.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_C,HEX_3}, arch_sh4_up},
-/* 0100nnnnmmmm1111 mac.w @<REG_M>+,@<REG_N>+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}},
-/* 1110nnnni8*1.... mov #<imm>,<REG_N> */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM_8}},
+/* 0000nnnn00101001 movt <REG_N> */{"movt",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_9}, arch_sh1_up},
-/* 0110nnnnmmmm0011 mov <REG_M>,<REG_N> */{"mov",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_3}},
+/* 0010nnnnmmmm1111 muls.w <REG_M>,<REG_N>*/{"muls.w",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}, arch_sh1_up},
+/* 0010nnnnmmmm1111 muls <REG_M>,<REG_N>*/{"muls",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}, arch_sh1_up},
-/* 0000nnnnmmmm0100 mov.b <REG_M>,@(R0,<REG_N>)*/{"mov.b",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_4}},
+/* 0000nnnnmmmm0111 mul.l <REG_M>,<REG_N>*/{"mul.l",{ A_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_7}, arch_sh2_up},
-/* 0010nnnnmmmm0100 mov.b <REG_M>,@-<REG_N>*/{"mov.b",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_4}},
+/* 0010nnnnmmmm1110 mulu.w <REG_M>,<REG_N>*/{"mulu.w",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}, arch_sh1_up},
+/* 0010nnnnmmmm1110 mulu <REG_M>,<REG_N>*/{"mulu",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}, arch_sh1_up},
-/* 0010nnnnmmmm0000 mov.b <REG_M>,@<REG_N>*/{"mov.b",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_0}},
+/* 0110nnnnmmmm1011 neg <REG_M>,<REG_N> */{"neg",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_B}, arch_sh1_up},
-/* 10000100mmmmi4*1 mov.b @(<disp>,<REG_M>),R0*/{"mov.b",{A_DISP_REG_M,A_R0},{HEX_8,HEX_4,REG_M,IMM_4}},
+/* 0110nnnnmmmm1010 negc <REG_M>,<REG_N>*/{"negc",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_A}, arch_sh1_up},
-/* 11000100i8*1.... mov.b @(<disp>,GBR),R0*/{"mov.b",{A_DISP_GBR,A_R0},{HEX_C,HEX_4,IMM_8}},
+/* 0000000000001001 nop */{"nop",{0},{HEX_0,HEX_0,HEX_0,HEX_9}, arch_sh1_up},
-/* 0000nnnnmmmm1100 mov.b @(R0,<REG_M>),<REG_N>*/{"mov.b",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_C}},
+/* 0110nnnnmmmm0111 not <REG_M>,<REG_N> */{"not",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_7}, arch_sh1_up},
+/* 0000nnnn10010011 ocbi @<REG_N> */{"ocbi",{A_IND_N},{HEX_0,REG_N,HEX_9,HEX_3}, arch_sh4_up},
-/* 0110nnnnmmmm0100 mov.b @<REG_M>+,<REG_N>*/{"mov.b",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_4}},
+/* 0000nnnn10100011 ocbp @<REG_N> */{"ocbp",{A_IND_N},{HEX_0,REG_N,HEX_A,HEX_3}, arch_sh4_up},
-/* 0110nnnnmmmm0000 mov.b @<REG_M>,<REG_N>*/{"mov.b",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_0}},
+/* 0000nnnn10110011 ocbwb @<REG_N> */{"ocbwb",{A_IND_N},{HEX_0,REG_N,HEX_B,HEX_3}, arch_sh4_up},
-/* 10000000mmmmi4*1 mov.b R0,@(<disp>,<REG_M>)*/{"mov.b",{A_R0,A_DISP_REG_M},{HEX_8,HEX_0,REG_M,IMM_4}},
-/* 11000000i8*1.... mov.b R0,@(<disp>,GBR)*/{"mov.b",{A_R0,A_DISP_GBR},{HEX_C,HEX_0,IMM_8}},
+/* 11001011i8*1.... or #<imm>,R0 */{"or",{A_IMM,A_R0},{HEX_C,HEX_B,IMM_8}, arch_sh1_up},
-/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM_4BY4}},
+/* 0010nnnnmmmm1011 or <REG_M>,<REG_N> */{"or",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_B}, arch_sh1_up},
-/* 0000nnnnmmmm0110 mov.l <REG_M>,@(R0,<REG_N>)*/{"mov.l",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_6}},
+/* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM_8}, arch_sh1_up},
-/* 0010nnnnmmmm0110 mov.l <REG_M>,@-<REG_N>*/{"mov.l",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_6}},
+/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh4_up},
-/* 0010nnnnmmmm0010 mov.l <REG_M>,@<REG_N>*/{"mov.l",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_2}},
+/* 0100nnnn00100100 rotcl <REG_N> */{"rotcl",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_4}, arch_sh1_up},
-/* 0101nnnnmmmmi4*4 mov.l @(<disp>,<REG_M>),<REG_N>*/{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_5,REG_N,REG_M,IMM_4BY4}},
+/* 0100nnnn00100101 rotcr <REG_N> */{"rotcr",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_5}, arch_sh1_up},
-/* 11000110i8*4.... mov.l @(<disp>,GBR),R0*/{"mov.l",{A_DISP_GBR,A_R0},{HEX_C,HEX_6,IMM_8BY4}},
+/* 0100nnnn00000100 rotl <REG_N> */{"rotl",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_4}, arch_sh1_up},
-/* 1101nnnni8p4.... mov.l @(<disp>,PC),<REG_N>*/{"mov.l",{A_DISP_PC,A_REG_N},{HEX_D,REG_N,PCRELIMM_8BY4}},
+/* 0100nnnn00000101 rotr <REG_N> */{"rotr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_5}, arch_sh1_up},
-/* 0000nnnnmmmm1110 mov.l @(R0,<REG_M>),<REG_N>*/{"mov.l",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_E}},
+/* 0000000000101011 rte */{"rte",{0},{HEX_0,HEX_0,HEX_2,HEX_B}, arch_sh1_up},
-/* 0110nnnnmmmm0110 mov.l @<REG_M>+,<REG_N>*/{"mov.l",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_6}},
+/* 0000000000001011 rts */{"rts",{0},{HEX_0,HEX_0,HEX_0,HEX_B}, arch_sh1_up},
-/* 0110nnnnmmmm0010 mov.l @<REG_M>,<REG_N>*/{"mov.l",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_2}},
+/* 0000000001011000 sets */{"sets",{0},{HEX_0,HEX_0,HEX_5,HEX_8}, arch_sh1_up},
+/* 0000000000011000 sett */{"sett",{0},{HEX_0,HEX_0,HEX_1,HEX_8}, arch_sh1_up},
-/* 11000010i8*4.... mov.l R0,@(<disp>,GBR)*/{"mov.l",{A_R0,A_DISP_GBR},{HEX_C,HEX_2,IMM_8BY4}},
+/* 0100nnnn00010100 setrc <REG_N> */{"setrc",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_4}, arch_sh_dsp_up},
-/* 0000nnnnmmmm0101 mov.w <REG_M>,@(R0,<REG_N>)*/{"mov.w",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_5}},
+/* 10000010i8*1.... setrc #<imm> */{"setrc",{A_IMM},{HEX_8,HEX_2,IMM_8}, arch_sh_dsp_up},
-/* 0010nnnnmmmm0101 mov.w <REG_M>,@-<REG_N>*/{"mov.w",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_5}},
+/* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}, arch_sh3_up},
-/* 0010nnnnmmmm0001 mov.w <REG_M>,@<REG_N>*/{"mov.w",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_1}},
+/* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}, arch_sh3_up},
-/* 10000101mmmmi4*2 mov.w @(<disp>,<REG_M>),R0*/{"mov.w",{A_DISP_REG_M,A_R0},{HEX_8,HEX_5,REG_M,IMM_4BY2}},
+/* 0100nnnn00100000 shal <REG_N> */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}, arch_sh1_up},
-/* 11000101i8*2.... mov.w @(<disp>,GBR),R0*/{"mov.w",{A_DISP_GBR,A_R0},{HEX_C,HEX_5,IMM_8BY2}},
+/* 0100nnnn00100001 shar <REG_N> */{"shar",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_1}, arch_sh1_up},
-/* 1001nnnni8p2.... mov.w @(<disp>,PC),<REG_N>*/{"mov.w",{A_DISP_PC,A_REG_N},{HEX_9,REG_N,PCRELIMM_8BY2}},
+/* 0100nnnn00000000 shll <REG_N> */{"shll",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_0}, arch_sh1_up},
-/* 0000nnnnmmmm1101 mov.w @(R0,<REG_M>),<REG_N>*/{"mov.w",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_D}},
+/* 0100nnnn00101000 shll16 <REG_N> */{"shll16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_8}, arch_sh1_up},
-/* 0110nnnnmmmm0101 mov.w @<REG_M>+,<REG_N>*/{"mov.w",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_5}},
+/* 0100nnnn00001000 shll2 <REG_N> */{"shll2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_8}, arch_sh1_up},
-/* 0110nnnnmmmm0001 mov.w @<REG_M>,<REG_N>*/{"mov.w",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_1}},
+/* 0100nnnn00011000 shll8 <REG_N> */{"shll8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_8}, arch_sh1_up},
-/* 10000001mmmmi4*2 mov.w R0,@(<disp>,<REG_M>)*/{"mov.w",{A_R0,A_DISP_REG_M},{HEX_8,HEX_1,REG_M,IMM_4BY2}},
+/* 0100nnnn00000001 shlr <REG_N> */{"shlr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_1}, arch_sh1_up},
-/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM_8BY2}},
+/* 0100nnnn00101001 shlr16 <REG_N> */{"shlr16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_9}, arch_sh1_up},
-/* 11000111i8p4.... mova @(<disp>,PC),R0*/{"mova",{A_DISP_PC,A_R0},{HEX_C,HEX_7,PCRELIMM_8BY4}},
-/* 0000nnnn11000011 movca.l R0,@<REG_N> */{"movca.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_C,HEX_3}},
+/* 0100nnnn00001001 shlr2 <REG_N> */{"shlr2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_9}, arch_sh1_up},
+/* 0100nnnn00011001 shlr8 <REG_N> */{"shlr8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_9}, arch_sh1_up},
-/* 0000nnnn00101001 movt <REG_N> */{"movt",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_9}},
+/* 0000000000011011 sleep */{"sleep",{0},{HEX_0,HEX_0,HEX_1,HEX_B}, arch_sh1_up},
-/* 0010nnnnmmmm1111 muls <REG_M>,<REG_N>*/{"muls",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}},
+/* 0000nnnn00000010 stc SR,<REG_N> */{"stc",{A_SR,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_2}, arch_sh1_up},
-/* 0000nnnnmmmm0111 mul.l <REG_M>,<REG_N>*/{"mul.l",{ A_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_7}},
+/* 0000nnnn00010010 stc GBR,<REG_N> */{"stc",{A_GBR,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_2}, arch_sh1_up},
-/* 0010nnnnmmmm1110 mulu <REG_M>,<REG_N>*/{"mulu",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}},
+/* 0000nnnn00100010 stc VBR,<REG_N> */{"stc",{A_VBR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_2}, arch_sh1_up},
-/* 0110nnnnmmmm1011 neg <REG_M>,<REG_N> */{"neg",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_B}},
+/* 0000nnnn01010010 stc MOD,<REG_N> */{"stc",{A_MOD,A_REG_N},{HEX_0,REG_N,HEX_5,HEX_2}, arch_sh_dsp_up},
-/* 0110nnnnmmmm1010 negc <REG_M>,<REG_N>*/{"negc",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_A}},
+/* 0000nnnn01110010 stc RE,<REG_N> */{"stc",{A_RE,A_REG_N},{HEX_0,REG_N,HEX_7,HEX_2}, arch_sh_dsp_up},
-/* 0000000000001001 nop */{"nop",{0},{HEX_0,HEX_0,HEX_0,HEX_9}},
+/* 0000nnnn01100010 stc RS,<REG_N> */{"stc",{A_RS,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_2}, arch_sh_dsp_up},
-/* 0110nnnnmmmm0111 not <REG_M>,<REG_N> */{"not",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_7}},
-/* 0000nnnn10010011 ocbi @<REG_N> */{"ocbi",{A_IND_N},{HEX_0,REG_N,HEX_9,HEX_3}},
+/* 0000nnnn00110010 stc SSR,<REG_N> */{"stc",{A_SSR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_2}, arch_sh3_up},
-/* 0000nnnn10100011 ocbp @<REG_N> */{"ocbp",{A_IND_N},{HEX_0,REG_N,HEX_A,HEX_3}},
+/* 0000nnnn01000010 stc SPC,<REG_N> */{"stc",{A_SPC,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_2}, arch_sh3_up},
-/* 0000nnnn10110011 ocbwb @<REG_N> */{"ocbwb",{A_IND_N},{HEX_0,REG_N,HEX_B,HEX_3}},
+/* 0000nnnn00111010 stc SGR,<REG_N> */{"stc",{A_SGR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_A}, arch_sh4_up},
+/* 0000nnnn11111010 stc DBR,<REG_N> */{"stc",{A_DBR,A_REG_N},{HEX_0,REG_N,HEX_F,HEX_A}, arch_sh4_up},
-/* 11001011i8*1.... or #<imm>,R0 */{"or",{A_IMM,A_R0},{HEX_C,HEX_B,IMM_8}},
+/* 0000nnnn1xxx0010 stc Rn_BANK,<REG_N> */{"stc",{A_REG_B,A_REG_N},{HEX_0,REG_N,REG_B,HEX_2}, arch_sh3_up},
-/* 0010nnnnmmmm1011 or <REG_M>,<REG_N> */{"or",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_B}},
+/* 0100nnnn00000011 stc.l SR,@-<REG_N> */{"stc.l",{A_SR,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_3}, arch_sh1_up},
-/* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM_8}},
+/* 0100nnnn00100011 stc.l VBR,@-<REG_N> */{"stc.l",{A_VBR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_3}, arch_sh1_up},
-/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}},
+/* 0100nnnn01010011 stc.l MOD,@-<REG_N> */{"stc.l",{A_MOD,A_DEC_N},{HEX_4,REG_N,HEX_5,HEX_3}, arch_sh_dsp_up},
-/* 0100nnnn00100100 rotcl <REG_N> */{"rotcl",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_4}},
+/* 0100nnnn01110011 stc.l RE,@-<REG_N> */{"stc.l",{A_RE,A_DEC_N},{HEX_4,REG_N,HEX_7,HEX_3}, arch_sh_dsp_up},
-/* 0100nnnn00100101 rotcr <REG_N> */{"rotcr",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_5}},
+/* 0100nnnn01100011 stc.l RS,@-<REG_N> */{"stc.l",{A_RS,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_3}, arch_sh_dsp_up},
-/* 0100nnnn00000100 rotl <REG_N> */{"rotl",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_4}},
+/* 0100nnnn00110011 stc.l SSR,@-<REG_N> */{"stc.l",{A_SSR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_3}, arch_sh3_up},
-/* 0100nnnn00000101 rotr <REG_N> */{"rotr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_5}},
+/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}, arch_sh3_up},
-/* 0000000000101011 rte */{"rte",{0},{HEX_0,HEX_0,HEX_2,HEX_B}},
+/* 0100nnnn00010011 stc.l GBR,@-<REG_N> */{"stc.l",{A_GBR,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_3}, arch_sh4_up},
-/* 0000000000001011 rts */{"rts",{0},{HEX_0,HEX_0,HEX_0,HEX_B}},
+/* 0100nnnn00110010 stc.l SGR,@-<REG_N> */{"stc.l",{A_SGR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_2}, arch_sh4_up},
-/* 0000000001011000 sets */{"sets",{0},{HEX_0,HEX_0,HEX_5,HEX_8}},
-/* 0000000000011000 sett */{"sett",{0},{HEX_0,HEX_0,HEX_1,HEX_8}},
+/* 0100nnnn11110010 stc.l DBR,@-<REG_N> */{"stc.l",{A_DBR,A_DEC_N},{HEX_4,REG_N,HEX_F,HEX_2}, arch_sh4_up},
-/* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}},
+/* 0100nnnn1xxx0011 stc.l Rn_BANK,@-<REG_N> */{"stc.l",{A_REG_B,A_DEC_N},{HEX_4,REG_N,REG_B,HEX_3}, arch_sh3_up},
-/* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}},
+/* 0000nnnn00001010 sts MACH,<REG_N> */{"sts",{A_MACH,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_A}, arch_sh1_up},
-/* 0100nnnn00100000 shal <REG_N> */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}},
+/* 0000nnnn00011010 sts MACL,<REG_N> */{"sts",{A_MACL,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_A}, arch_sh1_up},
-/* 0100nnnn00100001 shar <REG_N> */{"shar",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_1}},
+/* 0000nnnn00101010 sts PR,<REG_N> */{"sts",{A_PR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_A}, arch_sh1_up},
-/* 0100nnnn00000000 shll <REG_N> */{"shll",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_0}},
+/* 0000nnnn01101010 sts DSR,<REG_N> */{"sts",{A_DSR,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn00101000 shll16 <REG_N> */{"shll16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_8}},
+/* 0000nnnn01111010 sts A0,<REG_N> */{"sts",{A_A0,A_REG_N},{HEX_0,REG_N,HEX_7,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn00001000 shll2 <REG_N> */{"shll2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_8}},
+/* 0000nnnn10001010 sts X0,<REG_N> */{"sts",{A_X0,A_REG_N},{HEX_0,REG_N,HEX_8,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn00011000 shll8 <REG_N> */{"shll8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_8}},
+/* 0000nnnn10011010 sts X1,<REG_N> */{"sts",{A_X1,A_REG_N},{HEX_0,REG_N,HEX_9,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn00000001 shlr <REG_N> */{"shlr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_1}},
+/* 0000nnnn10101010 sts Y0,<REG_N> */{"sts",{A_Y0,A_REG_N},{HEX_0,REG_N,HEX_A,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn00101001 shlr16 <REG_N> */{"shlr16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_9}},
+/* 0000nnnn10111010 sts Y1,<REG_N> */{"sts",{A_Y1,A_REG_N},{HEX_0,REG_N,HEX_B,HEX_A}, arch_sh_dsp_up},
-/* 0100nnnn00001001 shlr2 <REG_N> */{"shlr2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_9}},
+/* 0000nnnn01011010 sts FPUL,<REG_N> */{"sts",{FPUL_M,A_REG_N},{HEX_0,REG_N,HEX_5,HEX_A}, arch_sh3e_up},
-/* 0100nnnn00011001 shlr8 <REG_N> */{"shlr8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_9}},
+/* 0000nnnn01101010 sts FPSCR,<REG_N> */{"sts",{FPSCR_M,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}, arch_sh3e_up},
-/* 0000000000011011 sleep */{"sleep",{0},{HEX_0,HEX_0,HEX_1,HEX_B}},
+/* 0100nnnn00000010 sts.l MACH,@-<REG_N>*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}, arch_sh1_up},
-/* 0000nnnn00000010 stc SR,<REG_N> */{"stc",{A_SR,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_2}},
+/* 0100nnnn00010010 sts.l MACL,@-<REG_N>*/{"sts.l",{A_MACL,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_2}, arch_sh1_up},
-/* 0000nnnn00010010 stc GBR,<REG_N> */{"stc",{A_GBR,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_2}},
+/* 0100nnnn00100010 sts.l PR,@-<REG_N> */{"sts.l",{A_PR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_2}, arch_sh1_up},
-/* 0000nnnn00100010 stc VBR,<REG_N> */{"stc",{A_VBR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_2}},
+/* 0100nnnn01100110 sts.l DSR,@-<REG_N> */{"sts.l",{A_DSR,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn00110010 stc SSR,<REG_N> */{"stc",{A_SSR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_2}},
+/* 0100nnnn01110110 sts.l A0,@-<REG_N> */{"sts.l",{A_A0,A_DEC_N},{HEX_4,REG_N,HEX_7,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn01000010 stc SPC,<REG_N> */{"stc",{A_SPC,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_2}},
+/* 0100nnnn10000110 sts.l X0,@-<REG_N> */{"sts.l",{A_X0,A_DEC_N},{HEX_4,REG_N,HEX_8,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn01100010 stc SGR,<REG_N> */{"stc",{A_SGR,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_2}},
+/* 0100nnnn10010110 sts.l X1,@-<REG_N> */{"sts.l",{A_X1,A_DEC_N},{HEX_4,REG_N,HEX_9,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn01110010 stc DBR,<REG_N> */{"stc",{A_DBR,A_REG_N},{HEX_0,REG_N,HEX_7,HEX_2}},
+/* 0100nnnn10100110 sts.l Y0,@-<REG_N> */{"sts.l",{A_Y0,A_DEC_N},{HEX_4,REG_N,HEX_A,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn1xxx0012 stc Rn_BANK,<REG_N> */{"stc",{A_REG_B,A_REG_N},{HEX_0,REG_N,REG_B,HEX_2}},
+/* 0100nnnn10110110 sts.l Y1,@-<REG_N> */{"sts.l",{A_Y1,A_DEC_N},{HEX_4,REG_N,HEX_B,HEX_2}, arch_sh_dsp_up},
-/* 0100nnnn00000011 stc.l SR,@-<REG_N> */{"stc.l",{A_SR,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_3}},
+/* 0100nnnn01010010 sts.l FPUL,@-<REG_N>*/{"sts.l",{FPUL_M,A_DEC_N},{HEX_4,REG_N,HEX_5,HEX_2}, arch_sh3e_up},
-/* 0100nnnn00010011 stc.l GBR,@-<REG_N> */{"stc.l",{A_GBR,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_3}},
+/* 0100nnnn01100010 sts.l FPSCR,@-<REG_N>*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}, arch_sh3e_up},
-/* 0100nnnn00100011 stc.l VBR,@-<REG_N> */{"stc.l",{A_VBR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_3}},
+/* 0011nnnnmmmm1000 sub <REG_M>,<REG_N> */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}, arch_sh1_up},
-/* 0100nnnn00110011 stc.l SSR,@-<REG_N> */{"stc.l",{A_SSR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_3}},
+/* 0011nnnnmmmm1010 subc <REG_M>,<REG_N>*/{"subc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_A}, arch_sh1_up},
-/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}},
+/* 0011nnnnmmmm1011 subv <REG_M>,<REG_N>*/{"subv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_B}, arch_sh1_up},
-/* 0100nnnn01100011 stc.l SGR,@-<REG_N> */{"stc.l",{A_SGR,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_3}},
+/* 0110nnnnmmmm1000 swap.b <REG_M>,<REG_N>*/{"swap.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_8}, arch_sh1_up},
-/* 0100nnnn01110011 stc.l DBR,@-<REG_N> */{"stc.l",{A_DBR,A_DEC_N},{HEX_4,REG_N,HEX_7,HEX_3}},
+/* 0110nnnnmmmm1001 swap.w <REG_M>,<REG_N>*/{"swap.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_9}, arch_sh1_up},
-/* 0100nnnn1xxx0012 stc.l Rn_BANK,@-<REG_N> */{"stc.l",{A_REG_B,A_DEC_N},{HEX_4,REG_N,REG_B,HEX_3}},
+/* 0100nnnn00011011 tas.b @<REG_N> */{"tas.b",{A_IND_N},{HEX_4,REG_N,HEX_1,HEX_B}, arch_sh1_up},
-/* 0000nnnn00001010 sts MACH,<REG_N> */{"sts",{A_MACH,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_A}},
+/* 11000011i8*1.... trapa #<imm> */{"trapa",{A_IMM},{HEX_C,HEX_3,IMM_8}, arch_sh1_up},
-/* 0000nnnn00011010 sts MACL,<REG_N> */{"sts",{A_MACL,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_A}},
+/* 11001000i8*1.... tst #<imm>,R0 */{"tst",{A_IMM,A_R0},{HEX_C,HEX_8,IMM_8}, arch_sh1_up},
-/* 0000nnnn00101010 sts PR,<REG_N> */{"sts",{A_PR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_A}},
+/* 0010nnnnmmmm1000 tst <REG_M>,<REG_N> */{"tst",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_8}, arch_sh1_up},
-/* 0000nnnn01011010 sts FPUL,<REG_N> */{"sts",{FPUL_M,A_REG_N},{HEX_0,REG_N,HEX_5,HEX_A}},
+/* 11001100i8*1.... tst.b #<imm>,@(R0,GBR)*/{"tst.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_C,IMM_8}, arch_sh1_up},
-/* 0000nnnn01101010 sts FPSCR,<REG_N> */{"sts",{FPSCR_M,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}},
+/* 11001010i8*1.... xor #<imm>,R0 */{"xor",{A_IMM,A_R0},{HEX_C,HEX_A,IMM_8}, arch_sh1_up},
-/* 0100nnnn00000010 sts.l MACH,@-<REG_N>*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}},
+/* 0010nnnnmmmm1010 xor <REG_M>,<REG_N> */{"xor",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_A}, arch_sh1_up},
-/* 0100nnnn00010010 sts.l MACL,@-<REG_N>*/{"sts.l",{A_MACL,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_2}},
+/* 11001110i8*1.... xor.b #<imm>,@(R0,GBR)*/{"xor.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_E,IMM_8}, arch_sh1_up},
-/* 0100nnnn00100010 sts.l PR,@-<REG_N> */{"sts.l",{A_PR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_2}},
+/* 0010nnnnmmmm1101 xtrct <REG_M>,<REG_N>*/{"xtrct",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_D}, arch_sh1_up},
-/* 0100nnnn01010010 sts.l FPUL,@-<REG_N>*/{"sts.l",{FPUL_M,A_DEC_N},{HEX_4,REG_N,HEX_5,HEX_2}},
+/* 0000nnnnmmmm0111 mul.l <REG_M>,<REG_N>*/{"mul.l",{ A_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_7}, arch_sh1_up},
-/* 0100nnnn01100010 sts.l FPSCR,@-<REG_N>*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}},
+/* 0100nnnn00010000 dt <REG_N> */{"dt",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_0}, arch_sh2_up},
-/* 0011nnnnmmmm1000 sub <REG_M>,<REG_N> */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}},
+/* 0011nnnnmmmm1101 dmuls.l <REG_M>,<REG_N>*/{"dmuls.l",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_D}, arch_sh2_up},
-/* 0011nnnnmmmm1010 subc <REG_M>,<REG_N>*/{"subc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_A}},
+/* 0011nnnnmmmm0101 dmulu.l <REG_M>,<REG_N>*/{"dmulu.l",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_5}, arch_sh2_up},
-/* 0011nnnnmmmm1011 subv <REG_M>,<REG_N>*/{"subv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_B}},
+/* 0000nnnnmmmm1111 mac.l @<REG_M>+,@<REG_N>+*/{"mac.l",{A_INC_M,A_INC_N},{HEX_0,REG_N,REG_M,HEX_F}, arch_sh2_up},
-/* 0110nnnnmmmm1000 swap.b <REG_M>,<REG_N>*/{"swap.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_8}},
+/* 0000nnnn00100011 braf <REG_N> */{"braf",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_3}, arch_sh2_up},
-/* 0110nnnnmmmm1001 swap.w <REG_M>,<REG_N>*/{"swap.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_9}},
+/* 0000nnnn00000011 bsrf <REG_N> */{"bsrf",{A_REG_N},{HEX_0,REG_N,HEX_0,HEX_3}, arch_sh2_up},
-/* 0100nnnn00011011 tas.b @<REG_N> */{"tas.b",{A_IND_N},{HEX_4,REG_N,HEX_1,HEX_B}},
+/* 111101nnmmmm0000 movs.w @-<REG_N>,<DSP_REG_M> */ {"movs.w",{A_DEC_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_0}, arch_sh_dsp_up},
-/* 11000011i8*1.... trapa #<imm> */{"trapa",{A_IMM},{HEX_C,HEX_3,IMM_8}},
+/* 111101nnmmmm0001 movs.w @<REG_N>,<DSP_REG_M> */ {"movs.w",{A_IND_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_1}, arch_sh_dsp_up},
-/* 11001000i8*1.... tst #<imm>,R0 */{"tst",{A_IMM,A_R0},{HEX_C,HEX_8,IMM_8}},
+/* 111101nnmmmm0010 movs.w @<REG_N>+,<DSP_REG_M> */ {"movs.w",{A_INC_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_2}, arch_sh_dsp_up},
-/* 0010nnnnmmmm1000 tst <REG_M>,<REG_N> */{"tst",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_8}},
+/* 111101nnmmmm0011 movs.w @<REG_N>+r8,<DSP_REG_M> */ {"movs.w",{A_PMOD_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_3}, arch_sh_dsp_up},
-/* 11001100i8*1.... tst.b #<imm>,@(R0,GBR)*/{"tst.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_C,IMM_8}},
+/* 111101nnmmmm0100 movs.w <DSP_REG_M>,@-<REG_N> */ {"movs.w",{DSP_REG_M,A_DEC_N},{HEX_F,SDT_REG_N,REG_M,HEX_4}, arch_sh_dsp_up},
-/* 11001010i8*1.... xor #<imm>,R0 */{"xor",{A_IMM,A_R0},{HEX_C,HEX_A,IMM_8}},
+/* 111101nnmmmm0101 movs.w <DSP_REG_M>,@<REG_N> */ {"movs.w",{DSP_REG_M,A_IND_N},{HEX_F,SDT_REG_N,REG_M,HEX_5}, arch_sh_dsp_up},
-/* 0010nnnnmmmm1010 xor <REG_M>,<REG_N> */{"xor",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_A}},
+/* 111101nnmmmm0110 movs.w <DSP_REG_M>,@<REG_N>+ */ {"movs.w",{DSP_REG_M,A_INC_N},{HEX_F,SDT_REG_N,REG_M,HEX_6}, arch_sh_dsp_up},
-/* 11001110i8*1.... xor.b #<imm>,@(R0,GBR)*/{"xor.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_E,IMM_8}},
+/* 111101nnmmmm0111 movs.w <DSP_REG_M>,@<REG_N>+r8 */ {"movs.w",{DSP_REG_M,A_PMOD_N},{HEX_F,SDT_REG_N,REG_M,HEX_7}, arch_sh_dsp_up},
-/* 0010nnnnmmmm1101 xtrct <REG_M>,<REG_N>*/{"xtrct",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_D}},
+/* 111101nnmmmm1000 movs.l @-<REG_N>,<DSP_REG_M> */ {"movs.l",{A_DEC_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_8}, arch_sh_dsp_up},
-/* 0000nnnnmmmm0111 mul.l <REG_M>,<REG_N>*/{"mul.l",{ A_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_7}},
+/* 111101nnmmmm1001 movs.l @<REG_N>,<DSP_REG_M> */ {"movs.l",{A_IND_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_9}, arch_sh_dsp_up},
-/* 0100nnnn00010000 dt <REG_N> */{"dt",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_0}},
+/* 111101nnmmmm1010 movs.l @<REG_N>+,<DSP_REG_M> */ {"movs.l",{A_INC_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_A}, arch_sh_dsp_up},
-/* 0011nnnnmmmm1101 dmuls.l <REG_M>,<REG_N>*/{"dmuls.l",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_D}},
+/* 111101nnmmmm1011 movs.l @<REG_N>+r8,<DSP_REG_M> */ {"movs.l",{A_PMOD_N,DSP_REG_M},{HEX_F,SDT_REG_N,REG_M,HEX_B}, arch_sh_dsp_up},
-/* 0011nnnnmmmm0101 dmulu.l <REG_M>,<REG_N>*/{"dmulu.l",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_5}},
+/* 111101nnmmmm1100 movs.l <DSP_REG_M>,@-<REG_N> */ {"movs.l",{DSP_REG_M,A_DEC_N},{HEX_F,SDT_REG_N,REG_M,HEX_C}, arch_sh_dsp_up},
-/* 0000nnnnmmmm1111 mac.l @<REG_M>+,@<REG_N>+*/{"mac.l",{A_INC_M,A_INC_N},{HEX_0,REG_N,REG_M,HEX_F}},
+/* 111101nnmmmm1101 movs.l <DSP_REG_M>,@<REG_N> */ {"movs.l",{DSP_REG_M,A_IND_N},{HEX_F,SDT_REG_N,REG_M,HEX_D}, arch_sh_dsp_up},
-/* 0000nnnn00100011 braf <REG_N> */{"braf",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_3}},
+/* 111101nnmmmm1110 movs.l <DSP_REG_M>,@<REG_N>+ */ {"movs.l",{DSP_REG_M,A_INC_N},{HEX_F,SDT_REG_N,REG_M,HEX_E}, arch_sh_dsp_up},
-/* 0000nnnn00000011 bsrf <REG_N> */{"bsrf",{A_REG_N},{HEX_0,REG_N,HEX_0,HEX_3}},
+/* 111101nnmmmm1111 movs.l <DSP_REG_M>,@<REG_N>+r8 */ {"movs.l",{DSP_REG_M,A_PMOD_N},{HEX_F,SDT_REG_N,REG_M,HEX_F}, arch_sh_dsp_up},
-/* 1111nnnn01011101 fabs <F_REG_N> */{"fabs",{FD_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}},
+/* 0*0*0*00** nopx */ {"nopx",{0},{PPI,NOPX}, arch_sh_dsp_up},
+/* *0*0*0**00 nopy */ {"nopy",{0},{PPI,NOPY}, arch_sh_dsp_up},
+/* n*m*0*01** movx.w @<REG_N>,<DSP_REG_X> */ {"movx.w",{A_IND_N,DSP_REG_X},{PPI,MOVX,HEX_1}, arch_sh_dsp_up},
+/* n*m*0*10** movx.w @<REG_N>+,<DSP_REG_X> */ {"movx.w",{A_INC_N,DSP_REG_X},{PPI,MOVX,HEX_2}, arch_sh_dsp_up},
+/* n*m*0*11** movx.w @<REG_N>+r8,<DSP_REG_X> */ {"movx.w",{A_PMOD_N,DSP_REG_X},{PPI,MOVX,HEX_3}, arch_sh_dsp_up},
+/* n*m*1*01** movx.w <DSP_REG_M>,@<REG_N> */ {"movx.w",{DSP_REG_M,A_IND_N},{PPI,MOVX,HEX_9}, arch_sh_dsp_up},
+/* n*m*1*10** movx.w <DSP_REG_M>,@<REG_N>+ */ {"movx.w",{DSP_REG_M,A_INC_N},{PPI,MOVX,HEX_A}, arch_sh_dsp_up},
+/* n*m*1*11** movx.w <DSP_REG_M>,@<REG_N>+r8 */ {"movx.w",{DSP_REG_M,A_PMOD_N},{PPI,MOVX,HEX_B}, arch_sh_dsp_up},
+/* *n*m*0**01 movy.w @<REG_N>,<DSP_REG_Y> */ {"movy.w",{A_IND_N,DSP_REG_Y},{PPI,MOVY,HEX_1}, arch_sh_dsp_up},
+/* *n*m*0**10 movy.w @<REG_N>+,<DSP_REG_Y> */ {"movy.w",{A_INC_N,DSP_REG_Y},{PPI,MOVY,HEX_2}, arch_sh_dsp_up},
+/* *n*m*0**11 movy.w @<REG_N>+r9,<DSP_REG_Y> */ {"movy.w",{A_PMODY_N,DSP_REG_Y},{PPI,MOVY,HEX_3}, arch_sh_dsp_up},
+/* *n*m*1**01 movy.w <DSP_REG_M>,@<REG_N> */ {"movy.w",{DSP_REG_M,A_IND_N},{PPI,MOVY,HEX_9}, arch_sh_dsp_up},
+/* *n*m*1**10 movy.w <DSP_REG_M>,@<REG_N>+ */ {"movy.w",{DSP_REG_M,A_INC_N},{PPI,MOVY,HEX_A}, arch_sh_dsp_up},
+/* *n*m*1**11 movy.w <DSP_REG_M>,@<REG_N>+r9 */ {"movy.w",{DSP_REG_M,A_PMODY_N},{PPI,MOVY,HEX_B}, arch_sh_dsp_up},
-/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}},
-/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}},
+/* 01aaeeffxxyyggnn pmuls Se,Sf,Dg */ {"pmuls",{DSP_REG_E,DSP_REG_F,DSP_REG_G},{PPI,PMUL}, arch_sh_dsp_up},
+/* 10100000xxyynnnn psubc <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"psubc",{DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_A,HEX_0}, arch_sh_dsp_up},
+/* 10110000xxyynnnn paddc <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"paddc",{DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_B,HEX_0}, arch_sh_dsp_up},
+/* 10000100xxyynnnn pcmp <DSP_REG_X>,<DSP_REG_Y> */
+{"pcmp", {DSP_REG_X,DSP_REG_Y},{PPI,PPI3,HEX_8,HEX_4}, arch_sh_dsp_up},
+/* 10100100xxyynnnn pwsb <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"pwsb", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_A,HEX_4}, arch_sh_dsp_up},
+/* 10110100xxyynnnn pwad <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"pwad", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_B,HEX_4}, arch_sh_dsp_up},
+/* 10001000xxyynnnn pabs <DSP_REG_X>,<DSP_REG_N> */
+{"pabs", {DSP_REG_X,DSP_REG_N},{PPI,PPI3,HEX_8,HEX_8}, arch_sh_dsp_up},
+/* 10011000xxyynnnn prnd <DSP_REG_X>,<DSP_REG_N> */
+{"prnd", {DSP_REG_X,DSP_REG_N},{PPI,PPI3,HEX_9,HEX_8}, arch_sh_dsp_up},
+/* 10101000xxyynnnn pabs <DSP_REG_Y>,<DSP_REG_N> */
+{"pabs", {DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_A,HEX_8}, arch_sh_dsp_up},
+/* 10111000xxyynnnn prnd <DSP_REG_Y>,<DSP_REG_N> */
+{"prnd", {DSP_REG_Y,DSP_REG_N},{PPI,PPI3,HEX_B,HEX_8}, arch_sh_dsp_up},
-/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}},
-/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}},
+{"dct",{0},{PPI,PDC,HEX_1}, arch_sh_dsp_up},
+{"dcf",{0},{PPI,PDC,HEX_2}, arch_sh_dsp_up},
-/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}},
-/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}},
+/* 00000iiiiiiinnnn pshl #<imm>,<DSP_REG_N> */ {"pshl",{A_IMM,DSP_REG_N},{PPI,PSH,HEX_0}, arch_sh_dsp_up},
+/* 10000001xxyynnnn pshl <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"pshl", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_8,HEX_1}, arch_sh_dsp_up},
+/* 00010iiiiiiinnnn psha #<imm>,<DSP_REG_N> */ {"psha",{A_IMM,DSP_REG_N},{PPI,PSH,HEX_1}, arch_sh_dsp_up},
+/* 10010001xxyynnnn psha <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"psha", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_1}, arch_sh_dsp_up},
+/* 10100001xxyynnnn psub <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"psub", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_A,HEX_1}, arch_sh_dsp_up},
+/* 10110001xxyynnnn padd <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"padd", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_1}, arch_sh_dsp_up},
+/* 10010101xxyynnnn pand <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"pand", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_5}, arch_sh_dsp_up},
+/* 10100101xxyynnnn pxor <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"pxor", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_A,HEX_5}, arch_sh_dsp_up},
+/* 10110101xxyynnnn por <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
+{"por", {DSP_REG_X,DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_5}, arch_sh_dsp_up},
+/* 10001001xxyynnnn pdec <DSP_REG_X>,<DSP_REG_N> */
+{"pdec", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_8,HEX_9}, arch_sh_dsp_up},
+/* 10011001xxyynnnn pinc <DSP_REG_X>,<DSP_REG_N> */
+{"pinc", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_9}, arch_sh_dsp_up},
+/* 10101001xxyynnnn pdec <DSP_REG_Y>,<DSP_REG_N> */
+{"pdec", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_A,HEX_9}, arch_sh_dsp_up},
+/* 10111001xxyynnnn pinc <DSP_REG_Y>,<DSP_REG_N> */
+{"pinc", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_9}, arch_sh_dsp_up},
+/* 10001101xxyynnnn pclr <DSP_REG_N> */
+{"pclr", {DSP_REG_N},{PPI,PPIC,HEX_8,HEX_D}, arch_sh_dsp_up},
+/* 10011101xxyynnnn pdmsb <DSP_REG_X>,<DSP_REG_N> */
+{"pdmsb", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_9,HEX_D}, arch_sh_dsp_up},
+/* 10111101xxyynnnn pdmsb <DSP_REG_Y>,<DSP_REG_N> */
+{"pdmsb", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_D}, arch_sh_dsp_up},
+/* 11001001xxyynnnn pneg <DSP_REG_X>,<DSP_REG_N> */
+{"pneg", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_C,HEX_9}, arch_sh_dsp_up},
+/* 11011001xxyynnnn pcopy <DSP_REG_X>,<DSP_REG_N> */
+{"pcopy", {DSP_REG_X,DSP_REG_N},{PPI,PPIC,HEX_D,HEX_9}, arch_sh_dsp_up},
+/* 11101001xxyynnnn pneg <DSP_REG_Y>,<DSP_REG_N> */
+{"pneg", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_E,HEX_9}, arch_sh_dsp_up},
+/* 11111001xxyynnnn pcopy <DSP_REG_Y>,<DSP_REG_N> */
+{"pcopy", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_F,HEX_9}, arch_sh_dsp_up},
+/* 11001101xxyynnnn psts MACH,<DSP_REG_N> */
+{"psts", {A_MACH,DSP_REG_N},{PPI,PPIC,HEX_C,HEX_D}, arch_sh_dsp_up},
+/* 11011101xxyynnnn psts MACL,<DSP_REG_N> */
+{"psts", {A_MACL,DSP_REG_N},{PPI,PPIC,HEX_D,HEX_D}, arch_sh_dsp_up},
+/* 11101101xxyynnnn plds <DSP_REG_N>,MACH */
+{"plds", {DSP_REG_N,A_MACH},{PPI,PPIC,HEX_E,HEX_D}, arch_sh_dsp_up},
+/* 11111101xxyynnnn plds <DSP_REG_N>,MACL */
+{"plds", {DSP_REG_N,A_MACL},{PPI,PPIC,HEX_F,HEX_D}, arch_sh_dsp_up},
-/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_B,HEX_D}},
+/* 1111nnnn01011101 fabs <F_REG_N> */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh3e_up},
+/* 1111nnnn01011101 fabs <D_REG_N> */{"fabs",{D_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh4_up},
-/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_A,HEX_D}},
+/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh3e_up},
+/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh4_up},
-/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}},
-/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}},
+/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh3e_up},
+/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh4_up},
-/* 1111nnmm11101101 fipr <V_REG_M>,<V_REG_N>*/{"fipr",{V_REG_M,V_REG_N},{HEX_F,REG_NM,HEX_E,HEX_D}},
+/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh3e_up},
+/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh4_up},
+
+/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_B,HEX_D}, arch_sh4_up},
+
+/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_A,HEX_D}, arch_sh4_up},
+
+/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh3e_up},
+/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh4_up},
+
+/* 1111nnmm11101101 fipr <V_REG_M>,<V_REG_N>*/{"fipr",{V_REG_M,V_REG_N},{HEX_F,REG_NM,HEX_E,HEX_D}, arch_sh4_up},
-/* 1111nnnn10001101 fldi0 <F_REG_N> */{"fldi0",{F_REG_N},{HEX_F,REG_N,HEX_8,HEX_D}},
+/* 1111nnnn10001101 fldi0 <F_REG_N> */{"fldi0",{F_REG_N},{HEX_F,REG_N,HEX_8,HEX_D}, arch_sh3e_up},
-/* 1111nnnn10011101 fldi1 <F_REG_N> */{"fldi1",{F_REG_N},{HEX_F,REG_N,HEX_9,HEX_D}},
+/* 1111nnnn10011101 fldi1 <F_REG_N> */{"fldi1",{F_REG_N},{HEX_F,REG_N,HEX_9,HEX_D}, arch_sh3e_up},
-/* 1111nnnn00011101 flds <F_REG_N>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}},
+/* 1111nnnn00011101 flds <F_REG_N>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}, arch_sh3e_up},
-/* 1111nnnn00101101 float FPUL,<FD_REG_N>*/{"float",{FPUL_M,FD_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}},
+/* 1111nnnn00101101 float FPUL,<F_REG_N>*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh3e_up},
+/* 1111nnnn00101101 float FPUL,<D_REG_N>*/{"float",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh4_up},
-/* 1111nnnnmmmm1110 fmac FR0,<F_REG_M>,<F_REG_N>*/{"fmac",{F_FR0,F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}},
+/* 1111nnnnmmmm1110 fmac FR0,<F_REG_M>,<F_REG_N>*/{"fmac",{F_FR0,F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}, arch_sh3e_up},
-/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}},
-/* 1111nnnnmmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}},
+/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh3e_up},
+/* 1111nnnnmmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh4_up},
-/* 1111nnnnmmmm1000 fmov @<REG_M>,<F_REG_N>*/{"fmov",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}},
-/* 1111nnnnmmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}},
+/* 1111nnnnmmmm1000 fmov @<REG_M>,<F_REG_N>*/{"fmov",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh3e_up},
+/* 1111nnnnmmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
-/* 1111nnnnmmmm1010 fmov <F_REG_M>,@<REG_N>*/{"fmov",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}},
-/* 1111nnnnmmmm1010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}},
+/* 1111nnnnmmmm1010 fmov <F_REG_M>,@<REG_N>*/{"fmov",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh3e_up},
+/* 1111nnnnmmmm1010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
-/* 1111nnnnmmmm1001 fmov @<REG_M>+,<F_REG_N>*/{"fmov",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}},
-/* 1111nnnnmmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}},
+/* 1111nnnnmmmm1001 fmov @<REG_M>+,<F_REG_N>*/{"fmov",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh3e_up},
+/* 1111nnnnmmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
-/* 1111nnnnmmmm1011 fmov <F_REG_M>,@-<REG_N>*/{"fmov",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}},
-/* 1111nnnnmmmm1011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}},
+/* 1111nnnnmmmm1011 fmov <F_REG_M>,@-<REG_N>*/{"fmov",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh3e_up},
+/* 1111nnnnmmmm1011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
-/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<F_REG_N>*/{"fmov",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}},
-/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}},
+/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<F_REG_N>*/{"fmov",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh3e_up},
+/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
-/* 1111nnnnmmmm0111 fmov <F_REG_M>,@(R0,<REG_N>)*/{"fmov",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}},
-/* 1111nnnnmmmm0111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}},
+/* 1111nnnnmmmm0111 fmov <F_REG_M>,@(R0,<REG_N>)*/{"fmov",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh3e_up},
+/* 1111nnnnmmmm0111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
-/* 1111nnnnmmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}},
+/* 1111nnnnmmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
-/* 1111nnnnmmmm1010 fmov.d <DX_REG_M>,@<REG_N>*/{"fmov.d",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}},
+/* 1111nnnnmmmm1010 fmov.d <DX_REG_M>,@<REG_N>*/{"fmov.d",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
-/* 1111nnnnmmmm1001 fmov.d @<REG_M>+,<DX_REG_N>*/{"fmov.d",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}},
+/* 1111nnnnmmmm1001 fmov.d @<REG_M>+,<DX_REG_N>*/{"fmov.d",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
-/* 1111nnnnmmmm1011 fmov.d <DX_REG_M>,@-<REG_N>*/{"fmov.d",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}},
+/* 1111nnnnmmmm1011 fmov.d <DX_REG_M>,@-<REG_N>*/{"fmov.d",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
-/* 1111nnnnmmmm0110 fmov.d @(R0,<REG_M>),<DX_REG_N>*/{"fmov.d",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}},
+/* 1111nnnnmmmm0110 fmov.d @(R0,<REG_M>),<DX_REG_N>*/{"fmov.d",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
-/* 1111nnnnmmmm0111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}},
+/* 1111nnnnmmmm0111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
-/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}},
+/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh3e_up},
-/* 1111nnnnmmmm1010 fmov.s <F_REG_M>,@<REG_N>*/{"fmov.s",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}},
+/* 1111nnnnmmmm1010 fmov.s <F_REG_M>,@<REG_N>*/{"fmov.s",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh3e_up},
-/* 1111nnnnmmmm1001 fmov.s @<REG_M>+,<F_REG_N>*/{"fmov.s",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}},
+/* 1111nnnnmmmm1001 fmov.s @<REG_M>+,<F_REG_N>*/{"fmov.s",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh3e_up},
-/* 1111nnnnmmmm1011 fmov.s <F_REG_M>,@-<REG_N>*/{"fmov.s",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}},
+/* 1111nnnnmmmm1011 fmov.s <F_REG_M>,@-<REG_N>*/{"fmov.s",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh3e_up},
-/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}},
+/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh3e_up},
-/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}},
+/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh3e_up},
-/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}},
-/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}},
+/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh3e_up},
+/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh4_up},
-/* 1111nnnn01001101 fneg <FD_REG_N> */{"fneg",{FD_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}},
+/* 1111nnnn01001101 fneg <F_REG_N> */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh3e_up},
+/* 1111nnnn01001101 fneg <D_REG_N> */{"fneg",{D_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh4_up},
-/* 1111101111111101 frchg */{"frchg",{0},{HEX_F,HEX_B,HEX_F,HEX_D}},
+/* 1111101111111101 frchg */{"frchg",{0},{HEX_F,HEX_B,HEX_F,HEX_D}, arch_sh4_up},
-/* 1111001111111101 fschg */{"fschg",{0},{HEX_F,HEX_3,HEX_F,HEX_D}},
+/* 1111001111111101 fschg */{"fschg",{0},{HEX_F,HEX_3,HEX_F,HEX_D}, arch_sh4_up},
-/* 1111nnnn01101101 fsqrt <FD_REG_N> */{"fsqrt",{FD_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}},
+/* 1111nnnn01101101 fsqrt <F_REG_N> */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh3e_up},
+/* 1111nnnn01101101 fsqrt <D_REG_N> */{"fsqrt",{D_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh4_up},
-/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}},
+/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}, arch_sh3e_up},
-/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}},
-/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}},
+/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh3e_up},
+/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh4_up},
-/* 1111nnnn00111101 ftrc <FD_REG_N>,FPUL*/{"ftrc",{FD_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}},
+/* 1111nnnn00111101 ftrc <F_REG_N>,FPUL*/{"ftrc",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh3e_up},
+/* 1111nnnn00111101 ftrc <D_REG_N>,FPUL*/{"ftrc",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh4_up},
-/* 1111nn0111111101 ftrv XMTRX_M4,<V_REG_n>*/{"ftrv",{XMTRX_M4,V_REG_N},{HEX_F,REG_NM,HEX_F,HEX_D}},
+/* 1111nn0111111101 ftrv XMTRX_M4,<V_REG_n>*/{"ftrv",{XMTRX_M4,V_REG_N},{HEX_F,REG_NM,HEX_F,HEX_D}, arch_sh4_up},
{ 0 }
};
diff --git a/contrib/binutils/opcodes/sparc-dis.c b/contrib/binutils/opcodes/sparc-dis.c
index 0f5a091..a595d0f 100644
--- a/contrib/binutils/opcodes/sparc-dis.c
+++ b/contrib/binutils/opcodes/sparc-dis.c
@@ -1,5 +1,5 @@
/* Print SPARC instructions.
- Copyright (C) 1989, 91-94, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 91-97, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,11 +17,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
-#include "ansidecl.h"
#include "sysdep.h"
#include "opcode/sparc.h"
#include "dis-asm.h"
#include "libiberty.h"
+#include "opintl.h"
/* Bitmask of v9 architectures. */
#define MASK_V9 ((1 << SPARC_OPCODE_ARCH_V9) \
@@ -221,6 +221,7 @@ print_insn_sparc (memaddr, info)
static int opcodes_initialized = 0;
/* bfd mach number of last call. */
static unsigned long current_mach = 0;
+ bfd_vma (*getword) PARAMS ((const unsigned char *));
if (!opcodes_initialized
|| info->mach != current_mach)
@@ -253,10 +254,14 @@ print_insn_sparc (memaddr, info)
}
}
- if (info->endian == BFD_ENDIAN_BIG)
- insn = bfd_getb32 (buffer);
+ /* On SPARClite variants such as DANlite (sparc86x), instructions
+ are always big-endian even when the machine is in little-endian mode. */
+ if (info->endian == BFD_ENDIAN_BIG || info->mach == bfd_mach_sparc_sparclite)
+ getword = bfd_getb32;
else
- insn = bfd_getl32 (buffer);
+ getword = bfd_getl32;
+
+ insn = getword (buffer);
info->insn_info_valid = 1; /* We do return this info */
info->insn_type = dis_nonbranch; /* Assume non branch insn */
@@ -277,6 +282,7 @@ print_insn_sparc (memaddr, info)
/* Nonzero means that we have found an instruction which has
the effect of adding or or'ing the imm13 field to rs1. */
int imm_added_to_rs1 = 0;
+ int imm_ored_to_rs1 = 0;
/* Nonzero means that we have found a plus sign in the args
field of the opcode table. */
@@ -287,8 +293,9 @@ print_insn_sparc (memaddr, info)
/* Do we have an `add' or `or' instruction combining an
immediate with rs1? */
- if (opcode->match == 0x80102000 || opcode->match == 0x80002000)
- /* (or) (add) */
+ if (opcode->match == 0x80102000) /* or */
+ imm_ored_to_rs1 = 1;
+ if (opcode->match == 0x80002000) /* add */
imm_added_to_rs1 = 1;
if (X_RS1 (insn) != X_RD (insn)
@@ -664,7 +671,7 @@ print_insn_sparc (memaddr, info)
If so, attempt to print the result of the add or
or (in this context add and or do the same thing)
and its symbolic value. */
- if (imm_added_to_rs1)
+ if (imm_ored_to_rs1 || imm_added_to_rs1)
{
unsigned long prev_insn;
int errcode;
@@ -672,10 +679,7 @@ print_insn_sparc (memaddr, info)
errcode =
(*info->read_memory_func)
(memaddr - 4, buffer, sizeof (buffer), info);
- if (info->endian == BFD_ENDIAN_BIG)
- prev_insn = bfd_getb32 (buffer);
- else
- prev_insn = bfd_getl32 (buffer);
+ prev_insn = getword (buffer);
if (errcode == 0)
{
@@ -692,10 +696,7 @@ print_insn_sparc (memaddr, info)
{
errcode = (*info->read_memory_func)
(memaddr - 8, buffer, sizeof (buffer), info);
- if (info->endian == BFD_ENDIAN_BIG)
- prev_insn = bfd_getb32 (buffer);
- else
- prev_insn = bfd_getl32 (buffer);
+ prev_insn = getword (buffer);
}
}
@@ -709,8 +710,11 @@ print_insn_sparc (memaddr, info)
{
(*info->fprintf_func) (stream, "\t! ");
info->target =
- (0xFFFFFFFF & (int) X_IMM22 (prev_insn) << 10)
- | X_SIMM (insn, 13);
+ (0xFFFFFFFF & (int) X_IMM22 (prev_insn) << 10);
+ if (imm_added_to_rs1)
+ info->target += X_SIMM (insn, 13);
+ else
+ info->target |= X_SIMM (insn, 13);
(*info->print_address_func) (info->target, info);
info->insn_type = dis_dref;
info->data_size = 4; /* FIXME!!! */
@@ -736,7 +740,7 @@ print_insn_sparc (memaddr, info)
}
info->insn_type = dis_noninsn; /* Mark as non-valid instruction */
- (*info->fprintf_func) (stream, "unknown");
+ (*info->fprintf_func) (stream, _("unknown"));
return sizeof (buffer);
}
@@ -754,6 +758,7 @@ compute_arch_mask (mach)
case bfd_mach_sparc_sparclet :
return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLET);
case bfd_mach_sparc_sparclite :
+ case bfd_mach_sparc_sparclite_le :
/* sparclites insns are recognized by default (because that's how
they've always been treated, for better or worse). Kludge this by
indicating generic v8 is also selected. */
@@ -804,16 +809,22 @@ compare_opcodes (a, b)
wrong with the opcode table. */
if (match0 & lose0)
{
- fprintf (stderr, "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n",
- op0->name, match0, lose0);
+ fprintf
+ (stderr,
+ /* xgettext:c-format */
+ _("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
+ op0->name, match0, lose0);
op0->lose &= ~op0->match;
lose0 = op0->lose;
}
if (match1 & lose1)
{
- fprintf (stderr, "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n",
- op1->name, match1, lose1);
+ fprintf
+ (stderr,
+ /* xgettext:c-format */
+ _("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
+ op1->name, match1, lose1);
op1->lose &= ~op1->match;
lose1 = op1->lose;
}
@@ -860,7 +871,8 @@ compare_opcodes (a, b)
return i;
else
fprintf (stderr,
- "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n",
+ /* xgettext:c-format */
+ _("Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"),
op0->name, op1->name);
}
diff --git a/contrib/binutils/opcodes/sparc-opc.c b/contrib/binutils/opcodes/sparc-opc.c
index b50b39b..a7132bb 100644
--- a/contrib/binutils/opcodes/sparc-opc.c
+++ b/contrib/binutils/opcodes/sparc-opc.c
@@ -1,5 +1,5 @@
/* Table of opcodes for the sparc.
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of the BFD library.
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
slower, but would mess up some macros a bit. xoxorich. */
#include <stdio.h>
-#include "ansidecl.h"
+#include "sysdep.h"
#include "opcode/sparc.h"
/* Some defines to make life easy. */
@@ -378,7 +378,7 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "lduwa", F3(3, 0x10, 1), F3(~3, ~0x10, ~1)|RS1_G0, "[i]o,d", F_ALIAS, v9 },
{ "lduwa", F3(3, 0x10, 1), F3(~3, ~0x10, ~1)|SIMM13(~0), "[1]o,d", F_ALIAS, v9 }, /* ld [rs1+0],d */
-{ "ldxa", F3(3, 0x1b, 0), F3(~3, ~0x1b, ~0), "[1+2]A,d", 0, v9 }, /* lduwa === lda */
+{ "ldxa", F3(3, 0x1b, 0), F3(~3, ~0x1b, ~0), "[1+2]A,d", 0, v9 },
{ "ldxa", F3(3, 0x1b, 0), F3(~3, ~0x1b, ~0)|RS2_G0, "[1]A,d", 0, v9 }, /* lda [rs1+%g0],d */
{ "ldxa", F3(3, 0x1b, 1), F3(~3, ~0x1b, ~1), "[1+i]o,d", 0, v9 },
{ "ldxa", F3(3, 0x1b, 1), F3(~3, ~0x1b, ~1), "[i+1]o,d", 0, v9 },
@@ -424,6 +424,25 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "stw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[i+1]", F_ALIAS, v9 },
{ "stw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0, "d,[i]", F_ALIAS, v9 },
{ "stw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v9 }, /* st d,[rs1+0] */
+{ "stsw", F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v9 },
+{ "stsw", F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v9 }, /* st d,[rs1+%g0] */
+{ "stsw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[1+i]", F_ALIAS, v9 },
+{ "stsw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[i+1]", F_ALIAS, v9 },
+{ "stsw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0, "d,[i]", F_ALIAS, v9 },
+{ "stsw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v9 }, /* st d,[rs1+0] */
+{ "stuw", F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v9 },
+{ "stuw", F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v9 }, /* st d,[rs1+%g0] */
+{ "stuw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[1+i]", F_ALIAS, v9 },
+{ "stuw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[i+1]", F_ALIAS, v9 },
+{ "stuw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0, "d,[i]", F_ALIAS, v9 },
+{ "stuw", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v9 }, /* st d,[rs1+0] */
+
+{ "spill", F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v6 },
+{ "spill", F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v6 }, /* st d,[rs1+%g0] */
+{ "spill", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[1+i]", F_ALIAS, v6 },
+{ "spill", F3(3, 0x04, 1), F3(~3, ~0x04, ~1), "d,[i+1]", F_ALIAS, v6 },
+{ "spill", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0, "d,[i]", F_ALIAS, v6 },
+{ "spill", F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v6 }, /* st d,[rs1+0] */
{ "sta", F3(3, 0x14, 0), F3(~3, ~0x14, ~0), "d,[1+2]A", 0, v6 },
{ "sta", F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0), "d,[1]A", 0, v6 }, /* sta d,[rs1+%g0] */
@@ -445,6 +464,18 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "stwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1), "d,[i+1]o", F_ALIAS, v9 },
{ "stwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
{ "stwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* st d,[rs1+0] */
+{ "stswa", F3(3, 0x14, 0), F3(~3, ~0x14, ~0), "d,[1+2]A", F_ALIAS, v9 },
+{ "stswa", F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0), "d,[1]A", F_ALIAS, v9 }, /* sta d,[rs1+%g0] */
+{ "stswa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1), "d,[1+i]o", F_ALIAS, v9 },
+{ "stswa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1), "d,[i+1]o", F_ALIAS, v9 },
+{ "stswa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
+{ "stswa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* st d,[rs1+0] */
+{ "stuwa", F3(3, 0x14, 0), F3(~3, ~0x14, ~0), "d,[1+2]A", F_ALIAS, v9 },
+{ "stuwa", F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0), "d,[1]A", F_ALIAS, v9 }, /* sta d,[rs1+%g0] */
+{ "stuwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1), "d,[1+i]o", F_ALIAS, v9 },
+{ "stuwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1), "d,[i+1]o", F_ALIAS, v9 },
+{ "stuwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
+{ "stuwa", F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* st d,[rs1+0] */
{ "stb", F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI(~0), "d,[1+2]", 0, v6 },
{ "stb", F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI_RS2(~0), "d,[1]", 0, v6 }, /* stb d,[rs1+%g0] */
@@ -453,6 +484,19 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "stb", F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RS1_G0, "d,[i]", 0, v6 },
{ "stb", F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|SIMM13(~0), "d,[1]", 0, v6 }, /* stb d,[rs1+0] */
+{ "stsb", F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v6 },
+{ "stsb", F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+%g0] */
+{ "stsb", F3(3, 0x05, 1), F3(~3, ~0x05, ~1), "d,[1+i]", F_ALIAS, v6 },
+{ "stsb", F3(3, 0x05, 1), F3(~3, ~0x05, ~1), "d,[i+1]", F_ALIAS, v6 },
+{ "stsb", F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RS1_G0, "d,[i]", F_ALIAS, v6 },
+{ "stsb", F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+0] */
+{ "stub", F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v6 },
+{ "stub", F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+%g0] */
+{ "stub", F3(3, 0x05, 1), F3(~3, ~0x05, ~1), "d,[1+i]", F_ALIAS, v6 },
+{ "stub", F3(3, 0x05, 1), F3(~3, ~0x05, ~1), "d,[i+1]", F_ALIAS, v6 },
+{ "stub", F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RS1_G0, "d,[i]", F_ALIAS, v6 },
+{ "stub", F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+0] */
+
{ "stba", F3(3, 0x15, 0), F3(~3, ~0x15, ~0), "d,[1+2]A", 0, v6 },
{ "stba", F3(3, 0x15, 0), F3(~3, ~0x15, ~0)|RS2(~0), "d,[1]A", 0, v6 }, /* stba d,[rs1+%g0] */
{ "stba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1), "d,[1+i]o", 0, v9 },
@@ -460,6 +504,19 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "stba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|RS1_G0, "d,[i]o", 0, v9 },
{ "stba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|SIMM13(~0), "d,[1]o", 0, v9 }, /* stb d,[rs1+0] */
+{ "stsba", F3(3, 0x15, 0), F3(~3, ~0x15, ~0), "d,[1+2]A", F_ALIAS, v6 },
+{ "stsba", F3(3, 0x15, 0), F3(~3, ~0x15, ~0)|RS2(~0), "d,[1]A", F_ALIAS, v6 }, /* stba d,[rs1+%g0] */
+{ "stsba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1), "d,[1+i]o", F_ALIAS, v9 },
+{ "stsba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1), "d,[i+1]o", F_ALIAS, v9 },
+{ "stsba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
+{ "stsba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* stb d,[rs1+0] */
+{ "stuba", F3(3, 0x15, 0), F3(~3, ~0x15, ~0), "d,[1+2]A", F_ALIAS, v6 },
+{ "stuba", F3(3, 0x15, 0), F3(~3, ~0x15, ~0)|RS2(~0), "d,[1]A", F_ALIAS, v6 }, /* stba d,[rs1+%g0] */
+{ "stuba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1), "d,[1+i]o", F_ALIAS, v9 },
+{ "stuba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1), "d,[i+1]o", F_ALIAS, v9 },
+{ "stuba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
+{ "stuba", F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* stb d,[rs1+0] */
+
{ "std", F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI(~0), "d,[1+2]", 0, v6 },
{ "std", F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI_RS2(~0), "d,[1]", 0, v6 }, /* std d,[rs1+%g0] */
{ "std", F3(3, 0x07, 1), F3(~3, ~0x07, ~1), "d,[1+i]", 0, v6 },
@@ -493,6 +550,13 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "std", F3(3, 0x37, 1), F3(~3, ~0x37, ~1)|RS1_G0, "D,[i]", 0, v6notv9 },
{ "std", F3(3, 0x37, 1), F3(~3, ~0x37, ~1)|SIMM13(~0), "D,[1]", 0, v6notv9 }, /* std d,[rs1+0] */
+{ "spilld", F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v6 },
+{ "spilld", F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v6 }, /* std d,[rs1+%g0] */
+{ "spilld", F3(3, 0x07, 1), F3(~3, ~0x07, ~1), "d,[1+i]", F_ALIAS, v6 },
+{ "spilld", F3(3, 0x07, 1), F3(~3, ~0x07, ~1), "d,[i+1]", F_ALIAS, v6 },
+{ "spilld", F3(3, 0x07, 1), F3(~3, ~0x07, ~1)|RS1_G0, "d,[i]", F_ALIAS, v6 },
+{ "spilld", F3(3, 0x07, 1), F3(~3, ~0x07, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v6 }, /* std d,[rs1+0] */
+
{ "stda", F3(3, 0x17, 0), F3(~3, ~0x17, ~0), "d,[1+2]A", 0, v6 },
{ "stda", F3(3, 0x17, 0), F3(~3, ~0x17, ~0)|RS2(~0), "d,[1]A", 0, v6 }, /* stda d,[rs1+%g0] */
{ "stda", F3(3, 0x17, 1), F3(~3, ~0x17, ~1), "d,[1+i]o", 0, v9 },
@@ -513,6 +577,19 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "sth", F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RS1_G0, "d,[i]", 0, v6 },
{ "sth", F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|SIMM13(~0), "d,[1]", 0, v6 }, /* sth d,[rs1+0] */
+{ "stsh", F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v6 },
+{ "stsh", F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+%g0] */
+{ "stsh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1), "d,[1+i]", F_ALIAS, v6 },
+{ "stsh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1), "d,[i+1]", F_ALIAS, v6 },
+{ "stsh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RS1_G0, "d,[i]", F_ALIAS, v6 },
+{ "stsh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+0] */
+{ "stuh", F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI(~0), "d,[1+2]", F_ALIAS, v6 },
+{ "stuh", F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI_RS2(~0), "d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+%g0] */
+{ "stuh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1), "d,[1+i]", F_ALIAS, v6 },
+{ "stuh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1), "d,[i+1]", F_ALIAS, v6 },
+{ "stuh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RS1_G0, "d,[i]", F_ALIAS, v6 },
+{ "stuh", F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|SIMM13(~0), "d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+0] */
+
{ "stha", F3(3, 0x16, 0), F3(~3, ~0x16, ~0), "d,[1+2]A", 0, v6 },
{ "stha", F3(3, 0x16, 0), F3(~3, ~0x16, ~0)|RS2(~0), "d,[1]A", 0, v6 }, /* stha ,[rs1+%g0] */
{ "stha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1), "d,[1+i]o", 0, v9 },
@@ -520,6 +597,19 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "stha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|RS1_G0, "d,[i]o", 0, v9 },
{ "stha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|SIMM13(~0), "d,[1]o", 0, v9 }, /* sth d,[rs1+0] */
+{ "stsha", F3(3, 0x16, 0), F3(~3, ~0x16, ~0), "d,[1+2]A", F_ALIAS, v6 },
+{ "stsha", F3(3, 0x16, 0), F3(~3, ~0x16, ~0)|RS2(~0), "d,[1]A", F_ALIAS, v6 }, /* stha ,[rs1+%g0] */
+{ "stsha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1), "d,[1+i]o", F_ALIAS, v9 },
+{ "stsha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1), "d,[i+1]o", F_ALIAS, v9 },
+{ "stsha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
+{ "stsha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* sth d,[rs1+0] */
+{ "stuha", F3(3, 0x16, 0), F3(~3, ~0x16, ~0), "d,[1+2]A", F_ALIAS, v6 },
+{ "stuha", F3(3, 0x16, 0), F3(~3, ~0x16, ~0)|RS2(~0), "d,[1]A", F_ALIAS, v6 }, /* stha ,[rs1+%g0] */
+{ "stuha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1), "d,[1+i]o", F_ALIAS, v9 },
+{ "stuha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1), "d,[i+1]o", F_ALIAS, v9 },
+{ "stuha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|RS1_G0, "d,[i]o", F_ALIAS, v9 },
+{ "stuha", F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|SIMM13(~0), "d,[1]o", F_ALIAS, v9 }, /* sth d,[rs1+0] */
+
{ "stx", F3(3, 0x0e, 0), F3(~3, ~0x0e, ~0)|ASI(~0), "d,[1+2]", 0, v9 },
{ "stx", F3(3, 0x0e, 0), F3(~3, ~0x0e, ~0)|ASI_RS2(~0), "d,[1]", 0, v9 }, /* stx d,[rs1+%g0] */
{ "stx", F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1), "d,[1+i]", 0, v9 },
@@ -1374,9 +1464,9 @@ CONDFC ("fbule", "cb013", 0xe, 0),
{ "nop", F2(0, 4), 0xfeffffff, "", 0, v6 }, /* sethi 0, %g0 */
-{ "set", F2(0x0, 0x4), F2(~0x0, ~0x4), "Sh,d", F_ALIAS, v6 },
-{ "setuw", F2(0x0, 0x4), F2(~0x0, ~0x4), "Sh,d", F_ALIAS, v9 },
-{ "setsw", F2(0x0, 0x4), F2(~0x0, ~0x4), "Sh,d", F_ALIAS, v9 },
+{ "set", F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,d", F_ALIAS, v6 },
+{ "setuw", F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,d", F_ALIAS, v9 },
+{ "setsw", F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,d", F_ALIAS, v9 },
{ "setx", F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,1,d", F_ALIAS, v9 },
{ "sethi", F2(0x0, 0x4), F2(~0x0, ~0x4), "h,d", 0, v6 },
@@ -1444,33 +1534,42 @@ CONDFC ("fbule", "cb013", 0xe, 0),
{ "fdivd", F3F(2, 0x34, 0x04e), F3F(~2, ~0x34, ~0x04e), "v,B,H", F_FLOAT, v6 },
{ "fdivq", F3F(2, 0x34, 0x04f), F3F(~2, ~0x34, ~0x04f), "V,R,J", F_FLOAT, v8 },
+{ "fdivx", F3F(2, 0x34, 0x04f), F3F(~2, ~0x34, ~0x04f), "V,R,J", F_FLOAT|F_ALIAS, v8 },
{ "fdivs", F3F(2, 0x34, 0x04d), F3F(~2, ~0x34, ~0x04d), "e,f,g", F_FLOAT, v6 },
{ "fmuld", F3F(2, 0x34, 0x04a), F3F(~2, ~0x34, ~0x04a), "v,B,H", F_FLOAT, v6 },
{ "fmulq", F3F(2, 0x34, 0x04b), F3F(~2, ~0x34, ~0x04b), "V,R,J", F_FLOAT, v8 },
+{ "fmulx", F3F(2, 0x34, 0x04b), F3F(~2, ~0x34, ~0x04b), "V,R,J", F_FLOAT|F_ALIAS, v8 },
{ "fmuls", F3F(2, 0x34, 0x049), F3F(~2, ~0x34, ~0x049), "e,f,g", F_FLOAT, v6 },
{ "fdmulq", F3F(2, 0x34, 0x06e), F3F(~2, ~0x34, ~0x06e), "v,B,J", F_FLOAT, v8 },
+{ "fdmulx", F3F(2, 0x34, 0x06e), F3F(~2, ~0x34, ~0x06e), "v,B,J", F_FLOAT|F_ALIAS, v8 },
{ "fsmuld", F3F(2, 0x34, 0x069), F3F(~2, ~0x34, ~0x069), "e,f,H", F_FLOAT, v8 },
{ "fsqrtd", F3F(2, 0x34, 0x02a), F3F(~2, ~0x34, ~0x02a)|RS1_G0, "B,H", F_FLOAT, v7 },
{ "fsqrtq", F3F(2, 0x34, 0x02b), F3F(~2, ~0x34, ~0x02b)|RS1_G0, "R,J", F_FLOAT, v8 },
+{ "fsqrtx", F3F(2, 0x34, 0x02b), F3F(~2, ~0x34, ~0x02b)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v8 },
{ "fsqrts", F3F(2, 0x34, 0x029), F3F(~2, ~0x34, ~0x029)|RS1_G0, "f,g", F_FLOAT, v7 },
{ "fabsd", F3F(2, 0x34, 0x00a), F3F(~2, ~0x34, ~0x00a)|RS1_G0, "B,H", F_FLOAT, v9 },
{ "fabsq", F3F(2, 0x34, 0x00b), F3F(~2, ~0x34, ~0x00b)|RS1_G0, "R,J", F_FLOAT, v9 },
+{ "fabsx", F3F(2, 0x34, 0x00b), F3F(~2, ~0x34, ~0x00b)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v9 },
{ "fabss", F3F(2, 0x34, 0x009), F3F(~2, ~0x34, ~0x009)|RS1_G0, "f,g", F_FLOAT, v6 },
{ "fmovd", F3F(2, 0x34, 0x002), F3F(~2, ~0x34, ~0x002)|RS1_G0, "B,H", F_FLOAT, v9 },
{ "fmovq", F3F(2, 0x34, 0x003), F3F(~2, ~0x34, ~0x003)|RS1_G0, "R,J", F_FLOAT, v9 },
+{ "fmovx", F3F(2, 0x34, 0x003), F3F(~2, ~0x34, ~0x003)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v9 },
{ "fmovs", F3F(2, 0x34, 0x001), F3F(~2, ~0x34, ~0x001)|RS1_G0, "f,g", F_FLOAT, v6 },
{ "fnegd", F3F(2, 0x34, 0x006), F3F(~2, ~0x34, ~0x006)|RS1_G0, "B,H", F_FLOAT, v9 },
{ "fnegq", F3F(2, 0x34, 0x007), F3F(~2, ~0x34, ~0x007)|RS1_G0, "R,J", F_FLOAT, v9 },
+{ "fnegx", F3F(2, 0x34, 0x007), F3F(~2, ~0x34, ~0x007)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v9 },
{ "fnegs", F3F(2, 0x34, 0x005), F3F(~2, ~0x34, ~0x005)|RS1_G0, "f,g", F_FLOAT, v6 },
{ "faddd", F3F(2, 0x34, 0x042), F3F(~2, ~0x34, ~0x042), "v,B,H", F_FLOAT, v6 },
{ "faddq", F3F(2, 0x34, 0x043), F3F(~2, ~0x34, ~0x043), "V,R,J", F_FLOAT, v8 },
+{ "faddx", F3F(2, 0x34, 0x043), F3F(~2, ~0x34, ~0x043), "V,R,J", F_FLOAT|F_ALIAS, v8 },
{ "fadds", F3F(2, 0x34, 0x041), F3F(~2, ~0x34, ~0x041), "e,f,g", F_FLOAT, v6 },
{ "fsubd", F3F(2, 0x34, 0x046), F3F(~2, ~0x34, ~0x046), "v,B,H", F_FLOAT, v6 },
{ "fsubq", F3F(2, 0x34, 0x047), F3F(~2, ~0x34, ~0x047), "V,R,J", F_FLOAT, v8 },
+{ "fsubx", F3F(2, 0x34, 0x047), F3F(~2, ~0x34, ~0x047), "V,R,J", F_FLOAT|F_ALIAS, v8 },
{ "fsubs", F3F(2, 0x34, 0x045), F3F(~2, ~0x34, ~0x045), "e,f,g", F_FLOAT, v6 },
#define CMPFCC(x) (((x)&0x3)<<25)
@@ -1495,6 +1594,16 @@ CONDFC ("fbule", "cb013", 0xe, 0),
{ "fcmpeq", CMPFCC(1)|F3F(2, 0x35, 0x057), CMPFCC(~1)|F3F(~2, ~0x35, ~0x057), "7,V,R", F_FLOAT, v9 },
{ "fcmpeq", CMPFCC(2)|F3F(2, 0x35, 0x057), CMPFCC(~2)|F3F(~2, ~0x35, ~0x057), "8,V,R", F_FLOAT, v9 },
{ "fcmpeq", CMPFCC(3)|F3F(2, 0x35, 0x057), CMPFCC(~3)|F3F(~2, ~0x35, ~0x057), "9,V,R", F_FLOAT, v9 },
+{ "fcmpx", F3F(2, 0x35, 0x053), F3F(~2, ~0x35, ~0x053)|RD_G0, "V,R", F_FLOAT|F_ALIAS, v8 },
+{ "fcmpx", CMPFCC(0)|F3F(2, 0x35, 0x053), CMPFCC(~0)|F3F(~2, ~0x35, ~0x053), "6,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpx", CMPFCC(1)|F3F(2, 0x35, 0x053), CMPFCC(~1)|F3F(~2, ~0x35, ~0x053), "7,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpx", CMPFCC(2)|F3F(2, 0x35, 0x053), CMPFCC(~2)|F3F(~2, ~0x35, ~0x053), "8,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpx", CMPFCC(3)|F3F(2, 0x35, 0x053), CMPFCC(~3)|F3F(~2, ~0x35, ~0x053), "9,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpex", F3F(2, 0x35, 0x057), F3F(~2, ~0x35, ~0x057)|RD_G0, "V,R", F_FLOAT|F_ALIAS, v8 },
+{ "fcmpex", CMPFCC(0)|F3F(2, 0x35, 0x057), CMPFCC(~0)|F3F(~2, ~0x35, ~0x057), "6,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpex", CMPFCC(1)|F3F(2, 0x35, 0x057), CMPFCC(~1)|F3F(~2, ~0x35, ~0x057), "7,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpex", CMPFCC(2)|F3F(2, 0x35, 0x057), CMPFCC(~2)|F3F(~2, ~0x35, ~0x057), "8,V,R", F_FLOAT|F_ALIAS, v9 },
+{ "fcmpex", CMPFCC(3)|F3F(2, 0x35, 0x057), CMPFCC(~3)|F3F(~2, ~0x35, ~0x057), "9,V,R", F_FLOAT|F_ALIAS, v9 },
{ "fcmps", F3F(2, 0x35, 0x051), F3F(~2, ~0x35, ~0x051)|RD_G0, "e,f", F_FLOAT, v6 },
{ "fcmps", CMPFCC(0)|F3F(2, 0x35, 0x051), CMPFCC(~0)|F3F(~2, ~0x35, ~0x051), "6,e,f", F_FLOAT, v9 },
{ "fcmps", CMPFCC(1)|F3F(2, 0x35, 0x051), CMPFCC(~1)|F3F(~2, ~0x35, ~0x051), "7,e,f", F_FLOAT, v9 },
@@ -1608,10 +1717,11 @@ SLCBCC("cbnefr", 15),
{ "casxa", F3(3, 0x3e, 1), F3(~3, ~0x3e, ~1), "[1]o,2,d", 0, v9 },
/* v9 synthetic insns */
-/* FIXME: still missing "signx d", and "clruw d". Can't be done here. */
{ "iprefetch", F2(0, 1)|(2<<20)|BPRED, F2(~0, ~1)|(1<<20)|ANNUL|COND(~0), "G", 0, v9 }, /* bn,a,pt %xcc,label */
{ "signx", F3(2, 0x27, 0), F3(~2, ~0x27, ~0)|(1<<12)|ASI(~0)|RS2_G0, "1,d", F_ALIAS, v9 }, /* sra rs1,%g0,rd */
+{ "signx", F3(2, 0x27, 0), F3(~2, ~0x27, ~0)|(1<<12)|ASI(~0)|RS2_G0, "r", F_ALIAS, v9 }, /* sra rd,%g0,rd */
{ "clruw", F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|ASI(~0)|RS2_G0, "1,d", F_ALIAS, v9 }, /* srl rs1,%g0,rd */
+{ "clruw", F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|ASI(~0)|RS2_G0, "r", F_ALIAS, v9 }, /* srl rd,%g0,rd */
{ "cas", F3(3, 0x3c, 0)|ASI(0x80), F3(~3, ~0x3c, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, v9 }, /* casa [rs1]ASI_P,rs2,rd */
{ "casl", F3(3, 0x3c, 0)|ASI(0x88), F3(~3, ~0x3c, ~0)|ASI(~0x88), "[1],2,d", F_ALIAS, v9 }, /* casa [rs1]ASI_P_L,rs2,rd */
{ "casx", F3(3, 0x3e, 0)|ASI(0x80), F3(~3, ~0x3e, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, v9 }, /* casxa [rs1]ASI_P,rs2,rd */
diff --git a/contrib/binutils/opcodes/tic30-dis.c b/contrib/binutils/opcodes/tic30-dis.c
index 1051457..5ccf893 100644
--- a/contrib/binutils/opcodes/tic30-dis.c
+++ b/contrib/binutils/opcodes/tic30-dis.c
@@ -1,5 +1,5 @@
/* Disassembly routines for TMS320C30 architecture
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,7 @@
#include <errno.h>
#include <math.h>
-#include <stdlib.h>
-#include <string.h>
+#include "sysdep.h"
#include "dis-asm.h"
#include "opcode/tic30.h"
diff --git a/contrib/binutils/opcodes/v850-dis.c b/contrib/binutils/opcodes/v850-dis.c
index da099bf..d817f80 100644
--- a/contrib/binutils/opcodes/v850-dis.c
+++ b/contrib/binutils/opcodes/v850-dis.c
@@ -18,9 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
-#include "ansidecl.h"
+#include "sysdep.h"
#include "opcode/v850.h"
#include "dis-asm.h"
+#include "opintl.h"
static const char *const v850_reg_names[] =
{ "r0", "r1", "r2", "sp", "gp", "r5", "r6", "r7",
@@ -31,6 +32,8 @@ static const char *const v850_reg_names[] =
static const char *const v850_sreg_names[] =
{ "eipc", "eipsw", "fepc", "fepsw", "ecr", "psw", "sr6", "sr7",
"sr8", "sr9", "sr10", "sr11", "sr12", "sr13", "sr14", "sr15",
+ "ctpc", "ctpsw", "dbpc", "dbpsw", "ctbp", "sr21", "sr22", "sr23",
+ "sr24", "sr25", "sr26", "sr27", "sr28", "sr29", "sr30", "sr31",
"sr16", "sr17", "sr18", "sr19", "sr20", "sr21", "sr22", "sr23",
"sr24", "sr25", "sr26", "sr27", "sr28", "sr29", "sr30", "sr31" };
@@ -51,6 +54,9 @@ disassemble (memaddr, info, insn)
int bytes_read;
int target_processor;
+ /* Special case: 32 bit MOV */
+ if ((insn & 0xffe0) == 0x0620)
+ short_op = true;
bytes_read = short_op ? 2 : 4;
@@ -65,6 +71,13 @@ disassemble (memaddr, info, insn)
target_processor = PROCESSOR_V850;
break;
+ case bfd_mach_v850e:
+ target_processor = PROCESSOR_V850E;
+ break;
+
+ case bfd_mach_v850ea:
+ target_processor = PROCESSOR_V850EA;
+ break;
}
/* Find the opcode. */
@@ -186,6 +199,121 @@ disassemble (memaddr, info, insn)
break;
}
+ case V850E_PUSH_POP:
+ {
+ static int list12_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 list18_h_regs[32] = { 19, 18, 17, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 30, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 };
+ static int list18_l_regs[32] = { 3, 2, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 14, 15, 13, 12, 7, 6, 5, 4, 11, 10, 9, 8 };
+ int * regs;
+ int i;
+ unsigned long int mask = 0;
+ int pc = false;
+ int sr = false;
+
+
+ switch (operand->shift)
+ {
+ case 0xffe00001: regs = list12_regs; break;
+ case 0xfff8000f: regs = list18_h_regs; break;
+ case 0xfff8001f: regs = list18_l_regs; value &= ~0x10; break; /* Do not include magic bit */
+ default:
+ /* xgettext:c-format */
+ fprintf (stderr, _("unknown operand shift: %x\n"), operand->shift );
+ abort();
+ }
+
+ for (i = 0; i < 32; i++)
+ {
+ if (value & (1 << i))
+ {
+ switch (regs[ i ])
+ {
+ default: mask |= (1 << regs[ i ]); break;
+ /* xgettext:c-format */
+ case 0: fprintf (stderr, _("unknown pop reg: %d\n"), i ); abort();
+ case -1: pc = true; break;
+ case -2: sr = true; break;
+ }
+ }
+ }
+
+ info->fprintf_func (info->stream, "{");
+
+ if (mask || pc || sr)
+ {
+ if (mask)
+ {
+ unsigned int bit;
+ int shown_one = false;
+
+ for (bit = 0; bit < 32; bit++)
+ if (mask & (1 << bit))
+ {
+ unsigned long int first = bit;
+ unsigned long int last;
+
+ if (shown_one)
+ info->fprintf_func (info->stream, ", ");
+ else
+ shown_one = true;
+
+ info->fprintf_func (info->stream, v850_reg_names[first]);
+
+ for (bit++; bit < 32; bit++)
+ if ((mask & (1 << bit)) == 0)
+ break;
+
+ last = bit;
+
+ if (last > first + 1)
+ {
+ info->fprintf_func (info->stream, " - %s", v850_reg_names[ last - 1 ]);
+ }
+ }
+ }
+
+ if (pc)
+ info->fprintf_func (info->stream, "%sPC", mask ? ", " : "");
+ if (sr)
+ info->fprintf_func (info->stream, "%sSR", (mask || pc) ? ", " : "");
+ }
+
+ info->fprintf_func (info->stream, "}");
+ }
+ break;
+
+ case V850E_IMMEDIATE16:
+ status = info->read_memory_func (memaddr + bytes_read, buffer, 2, info);
+ if (status == 0)
+ {
+ bytes_read += 2;
+ value = bfd_getl16 (buffer);
+
+ /* If this is a DISPOSE instruction with ff set to 0x10, then shift value up by 16. */
+ if ((insn & 0x001fffc0) == 0x00130780)
+ value <<= 16;
+
+ info->fprintf_func (info->stream, "0x%x", value);
+ }
+ else
+ {
+ info->memory_error_func (status, memaddr + bytes_read, info);
+ }
+ break;
+
+ case V850E_IMMEDIATE32:
+ status = info->read_memory_func (memaddr + bytes_read, buffer, 4, info);
+ if (status == 0)
+ {
+ bytes_read += 4;
+ value = bfd_getl32 (buffer);
+ info->fprintf_func (info->stream, "0x%lx", value);
+ }
+ else
+ {
+ info->memory_error_func (status, memaddr + bytes_read, info);
+ }
+ break;
}
/* Handle jmp correctly. */
diff --git a/contrib/binutils/opcodes/v850-opc.c b/contrib/binutils/opcodes/v850-opc.c
index 3a6624b..874db1b 100644
--- a/contrib/binutils/opcodes/v850-opc.c
+++ b/contrib/binutils/opcodes/v850-opc.c
@@ -15,9 +15,10 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include "ansidecl.h"
+#include "sysdep.h"
#include "opcode/v850.h"
#include <stdio.h>
+#include "opintl.h"
/* regular opcode */
#define OP(x) ((x & 0x3f) << 5)
@@ -42,11 +43,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
containing the string 'out of range' will be ignored unless a
specific command line option is given to GAS. */
-static const char * not_valid = "displacement value is not in range and is not aligned";
-static const char * out_of_range = "displacement value is out of range";
-static const char * not_aligned = "displacement value is not aligned";
+static const char * not_valid = N_ ("displacement value is not in range and is not aligned");
+static const char * out_of_range = N_ ("displacement value is out of range");
+static const char * not_aligned = N_ ("displacement value is not aligned");
-static const char * immediate_out_of_range = "immediate value is out of range";
+static const char * immediate_out_of_range = N_ ("immediate value is out of range");
static unsigned long
insert_d9 (insn, value, errmsg)
@@ -57,12 +58,12 @@ insert_d9 (insn, value, errmsg)
if (value > 0xff || value < -0x100)
{
if ((value % 2) != 0)
- * errmsg = "branch value not in range and to odd offset";
+ * errmsg = _("branch value not in range and to odd offset");
else
- * errmsg = "branch value out of range";
+ * errmsg = _("branch value out of range");
}
else if ((value % 2) != 0)
- * errmsg = "branch to odd offset";
+ * errmsg = _("branch to odd offset");
return (insn | ((value & 0x1f0) << 7) | ((value & 0x0e) << 3));
}
@@ -89,12 +90,12 @@ insert_d22 (insn, value, errmsg)
if (value > 0x1fffff || value < -0x200000)
{
if ((value % 2) != 0)
- * errmsg = "branch value not in range and to an odd offset";
+ * errmsg = _("branch value not in range and to an odd offset");
else
- * errmsg = "branch value out of range";
+ * errmsg = _("branch value out of range");
}
else if ((value % 2) != 0)
- * errmsg = "branch to odd offset";
+ * errmsg = _("branch to odd offset");
return (insn | ((value & 0xfffe) << 16) | ((value & 0x3f0000) >> 16));
}
@@ -118,12 +119,12 @@ insert_d16_15 (insn, value, errmsg)
if (value > 0x7fff || value < -0x8000)
{
if ((value % 2) != 0)
- * errmsg = not_valid;
+ * errmsg = _(not_valid);
else
- * errmsg = out_of_range;
+ * errmsg = _(out_of_range);
}
else if ((value % 2) != 0)
- * errmsg = not_aligned;
+ * errmsg = _(not_aligned);
return insn | ((value & 0xfffe) << 16);
}
@@ -147,12 +148,12 @@ insert_d8_7 (insn, value, errmsg)
if (value > 0xff || value < 0)
{
if ((value % 2) != 0)
- * errmsg = not_valid;
+ * errmsg = _(not_valid);
else
- * errmsg = out_of_range;
+ * errmsg = _(out_of_range);
}
else if ((value % 2) != 0)
- * errmsg = not_aligned;
+ * errmsg = _(not_aligned);
value >>= 1;
@@ -178,12 +179,12 @@ insert_d8_6 (insn, value, errmsg)
if (value > 0xff || value < 0)
{
if ((value % 4) != 0)
- *errmsg = not_valid;
+ *errmsg = _(not_valid);
else
- * errmsg = out_of_range;
+ * errmsg = _(out_of_range);
}
else if ((value % 4) != 0)
- * errmsg = not_aligned;
+ * errmsg = _(not_aligned);
value >>= 1;
@@ -200,6 +201,170 @@ extract_d8_6 (insn, invalid)
return ret << 1;
}
+static unsigned long
+insert_d5_4 (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char ** errmsg;
+{
+ if (value > 0x1f || value < 0)
+ {
+ if (value & 1)
+ * errmsg = _(not_valid);
+ else
+ *errmsg = _(out_of_range);
+ }
+ else if (value & 1)
+ * errmsg = _(not_aligned);
+
+ value >>= 1;
+
+ return (insn | (value & 0x0f));
+}
+
+static unsigned long
+extract_d5_4 (insn, invalid)
+ unsigned long insn;
+ int * invalid;
+{
+ unsigned long ret = (insn & 0x0f);
+
+ return ret << 1;
+}
+
+static unsigned long
+insert_d16_16 (insn, value, errmsg)
+ unsigned long insn;
+ signed long value;
+ const char ** errmsg;
+{
+ if (value > 0x7fff || value < -0x8000)
+ * errmsg = _(out_of_range);
+
+ return (insn | ((value & 0xfffe) << 16) | ((value & 1) << 5));
+}
+
+static unsigned long
+extract_d16_16 (insn, invalid)
+ unsigned long insn;
+ int * invalid;
+{
+ signed long ret = insn & 0xfffe0000;
+
+ ret >>= 16;
+
+ ret |= ((insn & 0x20) >> 5);
+
+ return ret;
+}
+
+static unsigned long
+insert_i9 (insn, value, errmsg)
+ unsigned long insn;
+ signed long value;
+ const char ** errmsg;
+{
+ if (value > 0xff || value < -0x100)
+ * errmsg = _(immediate_out_of_range);
+
+ return insn | ((value & 0x1e0) << 13) | (value & 0x1f);
+}
+
+static unsigned long
+extract_i9 (insn, invalid)
+ unsigned long insn;
+ int * invalid;
+{
+ signed long ret = insn & 0x003c0000;
+
+ ret <<= 10;
+ ret >>= 23;
+
+ ret |= (insn & 0x1f);
+
+ return ret;
+}
+
+static unsigned long
+insert_u9 (insn, value, errmsg)
+ unsigned long insn;
+ unsigned long value;
+ const char ** errmsg;
+{
+ if (value > 0x1ff)
+ * errmsg = _(immediate_out_of_range);
+
+ return insn | ((value & 0x1e0) << 13) | (value & 0x1f);
+}
+
+static unsigned long
+extract_u9 (insn, invalid)
+ unsigned long insn;
+ int * invalid;
+{
+ unsigned long ret = insn & 0x003c0000;
+
+ ret >>= 13;
+
+ ret |= (insn & 0x1f);
+
+ return ret;
+}
+
+static unsigned long
+insert_spe (insn, value, errmsg)
+ unsigned long insn;
+ unsigned long value;
+ const char ** errmsg;
+{
+ if (value != 3)
+ * errmsg = _("invalid register for stack adjustment");
+
+ return insn & (~ 0x180000);
+}
+
+static unsigned long
+extract_spe (insn, invalid)
+ unsigned long insn;
+ int * invalid;
+{
+ return 3;
+}
+
+static unsigned long
+insert_i5div (insn, value, errmsg)
+ unsigned long insn;
+ unsigned long value;
+ const char ** errmsg;
+{
+ if (value > 0x1ff)
+ {
+ if (value & 1)
+ * errmsg = _("immediate value not in range and not even");
+ else
+ * errmsg = _(immediate_out_of_range);
+ }
+ else if (value & 1)
+ * errmsg = _("immediate value must be even");
+
+ value = 32 - value;
+
+ return insn | ((value & 0x1e) << 17);
+}
+
+static unsigned long
+extract_i5div (insn, invalid)
+ unsigned long insn;
+ int * invalid;
+{
+ unsigned long ret = insn & 0x3c0000;
+
+ ret >>= 17;
+
+ ret = 32 - ret;
+
+ return ret;
+}
/* Warning: code in gas/config/tc-v850.c examines the contents of this array.
@@ -292,6 +457,73 @@ const struct v850_operand v850_operands[] =
#define D22 (D9_RELAX + 1)
{ 22, 0, insert_d22, extract_d22, V850_OPERAND_SIGNED | V850_OPERAND_DISP },
+/* The signed disp4 field in a format 4 insn. */
+#define D4 (D22 + 1)
+ { 4, 0, NULL, NULL, 0},
+
+/* The unsigned disp5 field in a format 4 insn. */
+#define D5_4 (D4 + 1)
+ { 4, 0, insert_d5_4, extract_d5_4, 0 },
+
+/* The disp16 field in an format 7 unsigned byte load insn. */
+#define D16_16 (D5_4 + 1)
+ { -1, 0xfffe0020, insert_d16_16, extract_d16_16, 0 },
+
+/* Third register in conditional moves. */
+#define R3 (D16_16 + 1)
+ { 5, 27, NULL, NULL, V850_OPERAND_REG },
+
+/* Condition code in conditional moves. */
+#define MOVCC (R3 + 1)
+ { 4, 17, NULL, NULL, V850_OPERAND_CC },
+
+/* The imm9 field in a multiply word. */
+#define I9 (MOVCC + 1)
+ { 9, 0, insert_i9, extract_i9, V850_OPERAND_SIGNED },
+
+/* The unsigned imm9 field in a multiply word. */
+#define U9 (I9 + 1)
+ { 9, 0, insert_u9, extract_u9, 0 },
+
+/* A list of registers in a prepare/dispose instruction. */
+#define LIST12 (U9 + 1)
+ { -1, 0xffe00001, NULL, NULL, V850E_PUSH_POP },
+
+/* The IMM6 field in a call instruction. */
+#define I6 (LIST12 + 1)
+ { 6, 0, NULL, NULL, 0 },
+
+/* The 16 bit immediate following a 32 bit instruction. */
+#define IMM16 (I6 + 1)
+ { 16, 16, NULL, NULL, V850_OPERAND_SIGNED | V850E_IMMEDIATE16 },
+
+/* The 32 bit immediate following a 32 bit instruction. */
+#define IMM32 (IMM16 + 1)
+ { 0, 0, NULL, NULL, V850E_IMMEDIATE32 },
+
+/* The imm5 field in a push/pop instruction. */
+#define IMM5 (IMM32 + 1)
+ { 5, 1, NULL, NULL, 0 },
+
+/* Reg2 in dispose instruction. */
+#define R2DISPOSE (IMM5 + 1)
+ { 5, 16, NULL, NULL, V850_OPERAND_REG | V850_NOT_R0 },
+
+/* Stack pointer in prepare instruction. */
+#define SP (R2DISPOSE + 1)
+ { 2, 19, insert_spe, extract_spe, V850_OPERAND_REG },
+
+/* The IMM5 field in a divide N step instruction. */
+#define I5DIV (SP + 1)
+ { 9, 0, insert_i5div, extract_i5div, V850_OPERAND_SIGNED },
+
+ /* The list of registers in a PUSHMH/POPMH instruction. */
+#define LIST18_H (I5DIV + 1)
+ { -1, 0xfff8000f, NULL, NULL, V850E_PUSH_POP },
+
+ /* The list of registers in a PUSHML/POPML instruction. */
+#define LIST18_L (LIST18_H + 1)
+ { -1, 0xfff8001f, NULL, NULL, V850E_PUSH_POP }, /* The setting of the 4th bit is a flag to disassmble() in v850-dis.c */
} ;
@@ -349,32 +581,87 @@ const struct v850_opcode v850_opcodes[] =
{ "jmp", one (0x0060), one (0xffe0), {R1}, 1, PROCESSOR_ALL },
/* load/store instructions */
+{ "sld.bu", one (0x0300), one (0x0780), {D7, EP, R2_NOTR0}, 1, PROCESSOR_V850EA },
+{ "sld.bu", one (0x0060), one (0x07f0), {D4, EP, R2_NOTR0}, 1, PROCESSOR_V850E },
+
+{ "sld.hu", one (0x0400), one (0x0780), {D8_7, EP, R2_NOTR0}, 1, PROCESSOR_V850EA },
+{ "sld.hu", one (0x0070), one (0x07f0), {D5_4, EP, R2_NOTR0}, 1, PROCESSOR_V850E },
+
+{ "sld.b", one (0x0060), one (0x07f0), {D4, EP, R2}, 1, PROCESSOR_V850EA },
+{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850E },
{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850 },
-
+{ "sld.h", one (0x0070), one (0x07f0), {D5_4, EP, R2}, 1, PROCESSOR_V850EA },
+{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850E },
{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850 },
{ "sld.w", one (0x0500), one (0x0781), {D8_6, EP, R2}, 1, PROCESSOR_ALL },
{ "sst.b", one (0x0380), one (0x0780), {R2, D7, EP}, 2, PROCESSOR_ALL },
{ "sst.h", one (0x0480), one (0x0780), {R2, D8_7, EP}, 2, PROCESSOR_ALL },
{ "sst.w", one (0x0501), one (0x0781), {R2, D8_6, EP}, 2, PROCESSOR_ALL },
-
+{ "pushml", two (0x07e0, 0x0001), two (0xfff0, 0x0007), {LIST18_L}, 0, PROCESSOR_V850EA },
+{ "pushmh", two (0x07e0, 0x0003), two (0xfff0, 0x0007), {LIST18_H}, 0, PROCESSOR_V850EA },
+{ "popml", two (0x07f0, 0x0001), two (0xfff0, 0x0007), {LIST18_L}, 0, PROCESSOR_V850EA },
+{ "popmh", two (0x07f0, 0x0003), two (0xfff0, 0x0007), {LIST18_H}, 0, PROCESSOR_V850EA },
+{ "prepare", two (0x0780, 0x0003), two (0xffc0, 0x001f), {LIST12, IMM5, SP}, 0, PROCESSOR_NOT_V850 },
+{ "prepare", two (0x0780, 0x000b), two (0xffc0, 0x001f), {LIST12, IMM5, IMM16}, 0, PROCESSOR_NOT_V850 },
+{ "prepare", two (0x0780, 0x0013), two (0xffc0, 0x001f), {LIST12, IMM5, IMM16}, 0, PROCESSOR_NOT_V850 },
+{ "prepare", two (0x0780, 0x001b), two (0xffc0, 0x001f), {LIST12, IMM5, IMM32}, 0, PROCESSOR_NOT_V850 },
+{ "prepare", two (0x0780, 0x0001), two (0xffc0, 0x001f), {LIST12, IMM5}, 0, PROCESSOR_NOT_V850 },
+{ "dispose", one (0x0640), one (0xffc0), {IMM5, LIST12, R2DISPOSE},0, PROCESSOR_NOT_V850 },
+{ "dispose", two (0x0640, 0x0000), two (0xffc0, 0x001f), {IMM5, LIST12}, 0, PROCESSOR_NOT_V850 },
{ "ld.b", two (0x0700, 0x0000), two (0x07e0, 0x0000), {D16, R1, R2}, 1, PROCESSOR_ALL },
{ "ld.h", two (0x0720, 0x0000), two (0x07e0, 0x0001), {D16_15, R1, R2}, 1, PROCESSOR_ALL },
{ "ld.w", two (0x0720, 0x0001), two (0x07e0, 0x0001), {D16_15, R1, R2}, 1, PROCESSOR_ALL },
+{ "ld.bu", two (0x0780, 0x0001), two (0x07c0, 0x0001), {D16_16, R1, R2_NOTR0}, 1, PROCESSOR_NOT_V850 },
+{ "ld.hu", two (0x07e0, 0x0001), two (0x07e0, 0x0001), {D16_15, R1, R2_NOTR0}, 1, PROCESSOR_NOT_V850 },
{ "st.b", two (0x0740, 0x0000), two (0x07e0, 0x0000), {R2, D16, R1}, 2, PROCESSOR_ALL },
{ "st.h", two (0x0760, 0x0000), two (0x07e0, 0x0001), {R2, D16_15, R1}, 2, PROCESSOR_ALL },
{ "st.w", two (0x0760, 0x0001), two (0x07e0, 0x0001), {R2, D16_15, R1}, 2, PROCESSOR_ALL },
+/* byte swap/extend instructions */
+{ "zxb", one (0x0080), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
+{ "zxh", one (0x00c0), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
+{ "sxb", one (0x00a0), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
+{ "sxh", one (0x00e0), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
+{ "bsh", two (0x07e0, 0x0342), two (0x07ff, 0x07ff), {R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "bsw", two (0x07e0, 0x0340), two (0x07ff, 0x07ff), {R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "hsw", two (0x07e0, 0x0344), two (0x07ff, 0x07ff), {R2, R3}, 0, PROCESSOR_NOT_V850 },
+
+/* jump table instructions */
+{ "switch", one (0x0040), one (0xffe0), {R1}, 1, PROCESSOR_NOT_V850 },
+{ "callt", one (0x0200), one (0xffc0), {I6}, 0, PROCESSOR_NOT_V850 },
+{ "ctret", two (0x07e0, 0x0144), two (0xffff, 0xffff), {0}, 0, PROCESSOR_NOT_V850 },
/* arithmetic operation instructions */
{ "setf", two (0x07e0, 0x0000), two (0x07f0, 0xffff), {CCCC, R2}, 0, PROCESSOR_ALL },
+{ "cmov", two (0x07e0, 0x0320), two (0x07e0, 0x07e1), {MOVCC, R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "cmov", two (0x07e0, 0x0300), two (0x07e0, 0x07e1), {MOVCC, I5, R2, R3}, 0, PROCESSOR_NOT_V850 },
+
+{ "mul", two (0x07e0, 0x0220), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "mul", two (0x07e0, 0x0240), two (0x07e0, 0x07c3), {I9, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "mulu", two (0x07e0, 0x0222), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "mulu", two (0x07e0, 0x0242), two (0x07e0, 0x07c3), {U9, R2, R3}, 0, PROCESSOR_NOT_V850 },
+
+{ "div", two (0x07e0, 0x02c0), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "divu", two (0x07e0, 0x02c2), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "divhu", two (0x07e0, 0x0282), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
+{ "divh", two (0x07e0, 0x0280), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
{ "divh", OP (0x02), OP_MASK, {R1, R2_NOTR0}, 0, PROCESSOR_ALL },
+{ "divhn", two (0x07e0, 0x0280), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "divhun", two (0x07e0, 0x0282), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "divn", two (0x07e0, 0x02c0), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "divun", two (0x07e0, 0x02c2), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "sdivhn", two (0x07e0, 0x0180), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "sdivhun", two (0x07e0, 0x0182), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "sdivn", two (0x07e0, 0x01c0), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
+{ "sdivun", two (0x07e0, 0x01c2), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
{ "nop", one (0x00), one (0xffff), {0}, 0, PROCESSOR_ALL },
{ "mov", OP (0x10), OP_MASK, {I5, R2_NOTR0}, 0, PROCESSOR_ALL },
+{ "mov", one (0x0620), one (0xffe0), {IMM32, R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
{ "mov", OP (0x00), OP_MASK, {R1, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "movea", OP (0x31), OP_MASK, {I16, R1, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "movhi", OP (0x32), OP_MASK, {I16U, R1, R2_NOTR0}, 0, PROCESSOR_ALL },
@@ -411,6 +698,7 @@ const struct v850_opcode v850_opcodes[] =
{ "shl", two (0x07e0, 0x00c0), two (0x07e0, 0xffff), {R1, R2}, 0, PROCESSOR_ALL },
{ "shr", OP (0x14), OP_MASK, {I5U, R2}, 0, PROCESSOR_ALL },
{ "shr", two (0x07e0, 0x0080), two (0x07e0, 0xffff), {R1, R2}, 0, PROCESSOR_ALL },
+{ "sasf", two (0x07e0, 0x0200), two (0x07f0, 0xffff), {CCCC, R2}, 0, PROCESSOR_NOT_V850 },
/* branch instructions */
/* signed integer */
@@ -473,9 +761,13 @@ const struct v850_opcode v850_opcodes[] =
/* bit manipulation instructions */
{ "set1", two (0x07c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
+{ "set1", two (0x07e0, 0x00e0), two (0x07e0, 0xffff), {R2, R1}, 2, PROCESSOR_NOT_V850 },
{ "not1", two (0x47c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
+{ "not1", two (0x07e0, 0x00e2), two (0x07e0, 0xffff), {R2, R1}, 2, PROCESSOR_NOT_V850 },
{ "clr1", two (0x87c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
+{ "clr1", two (0x07e0, 0x00e4), two (0x07e0, 0xffff), {R2, R1}, 2, PROCESSOR_NOT_V850 },
{ "tst1", two (0xc7c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
+{ "tst1", two (0x07e0, 0x00e6), two (0x07e0, 0xffff), {R2, R1}, 2, PROCESSOR_NOT_V850 },
/* special instructions */
{ "di", two (0x07e0, 0x0160), two (0xffff, 0xffff), {0}, 0, PROCESSOR_ALL },
diff --git a/contrib/binutils/opcodes/z8k-dis.c b/contrib/binutils/opcodes/z8k-dis.c
index 7123622..590f9d3 100644
--- a/contrib/binutils/opcodes/z8k-dis.c
+++ b/contrib/binutils/opcodes/z8k-dis.c
@@ -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. */
-#include <ansidecl.h>
#include "sysdep.h"
#include "dis-asm.h"
diff --git a/contrib/binutils/opcodes/z8kgen.c b/contrib/binutils/opcodes/z8kgen.c
index e786bbb..44df0b2 100644
--- a/contrib/binutils/opcodes/z8kgen.c
+++ b/contrib/binutils/opcodes/z8kgen.c
@@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This program generates z8k-opc.h */
-#include <ansidecl.h>
#include "sysdep.h"
#define BYTE_INFO_LEN 10
diff --git a/contrib/binutils/ylwrap b/contrib/binutils/ylwrap
index b5b6218..2288ccd 100755
--- a/contrib/binutils/ylwrap
+++ b/contrib/binutils/ylwrap
@@ -31,7 +31,7 @@ prog="$1"
shift
# Make any relative path in $prog absolute.
case "$prog" in
- /*) ;;
+ /* | [A-Za-z]:\\*) ;;
*/*) prog="`pwd`/$prog" ;;
esac
@@ -39,7 +39,7 @@ esac
input="$1"
shift
case "$input" in
- /*)
+ /* | [A-Za-z]:\\*)
# Absolute path; do nothing.
;;
*)
@@ -50,6 +50,13 @@ case "$input" in
;;
esac
+# We don't want to use the absolute path if the input in the current
+# directory like when making a tar ball.
+input_base=`echo $input | sed -e 's|.*/||'`
+if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then
+ input=$input_base
+fi
+
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
@@ -67,6 +74,15 @@ trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
+case "$input" in
+ /* | [A-Za-z]:\\*)
+ # Absolute path; do nothing.
+ ;;
+ *)
+ # Make a symbolic link, hard link or hardcopy.
+ ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" .
+ ;;
+esac
$prog ${1+"$@"} "$input"
status=$?
@@ -79,7 +95,7 @@ if test $status -eq 0; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
- /*) target="$2";;
+ /* | [A-Za-z]:\\*) target="$2";;
*) target="../$2";;
esac
mv "$1" "$target" || status=$?
OpenPOWER on IntegriCloud